From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web08.4292.1622105444692143297 for ; Thu, 27 May 2021 01:50:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PFcwAHt6; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622105443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OROgdLGlvjKfW0OQWz0VCRvz6ScfltJK6v4FgEDDCMI=; b=PFcwAHt6MRDKyV5rabokJoWbLYwinYjJ4sUwuqlmhRIVJTsmr9iiJ/uKn5ZmEhpmWw5qOP JhOoc46AMDO+KTFwkEDQyHNvrR//Jbmy2RAUXRddejHK3OA7PB7cBdx+a0ZQjeTIrzh0XA wI/iDWapSckWGwbSC5UrZIHz4JsamRY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-312-XpvsmKMEOQGbsaA_gsfeig-1; Thu, 27 May 2021 04:50:40 -0400 X-MC-Unique: XpvsmKMEOQGbsaA_gsfeig-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C45F6802690; Thu, 27 May 2021 08:50:38 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-44.ams2.redhat.com [10.36.115.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8999C6A857; Thu, 27 May 2021 08:50:36 +0000 (UTC) Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtlZGsyLWRldmVsMjAyMTA1IFBBVENIIHYyIDEvMV0gQXJtUGtnL0FybUdpYzogRml4IG1heGltdW0gbnVtYmVyIG9mIGludGVycnVwdHMgaW4gR0lDdjM=?= To: gaoliming , devel@edk2.groups.io, sami.mujawar@arm.com Cc: ardb@kernel.org, leif@nuviainc.com, Matteo.Carlini@arm.com, Andreas.Sandberg@arm.com, joey.gouly@arm.com, nd@arm.com References: <20210524130130.22280-1-sami.mujawar@arm.com> <16827C85E5A0E1A5.4904@groups.io> <006e01d752a0$82e0bb10$88a23130$@byosoft.com.cn> From: "Laszlo Ersek" Message-ID: <04a59e4c-8a9d-d483-893f-5dc83fa9046c@redhat.com> Date: Thu, 27 May 2021 10:50:35 +0200 MIME-Version: 1.0 In-Reply-To: <006e01d752a0$82e0bb10$88a23130$@byosoft.com.cn> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Hi Liming, On 05/27/21 04:32, gaoliming wrote: > If no objection, I will merge this patch today. Then, tomorrow, I will create stable tag 202105. yes, please do that -- TBH, I thought Sami would merge it sooner, as Sami does have maintainer access through DynamicTablesPkg and StandaloneMmPkg. Thanks! Laszlo > > Thanks > Liming >> -----邮件原件----- >> 发件人: devel@edk2.groups.io 代表 gaoliming >> 发送时间: 2021年5月26日 10:22 >> 收件人: devel@edk2.groups.io; lersek@redhat.com; >> sami.mujawar@arm.com >> 抄送: ardb@kernel.org; leif@nuviainc.com; Matteo.Carlini@arm.com; >> Andreas.Sandberg@arm.com; joey.gouly@arm.com; nd@arm.com >> 主题: 回复: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: >> Fix maximum number of interrupts in GICv3 >> >> Laszlo, Ard, Sami: >> I am OK to merge this patch for stable tag 202105. >> >> Thanks >> Liming >>> -----邮件原件----- >>> 发件人: devel@edk2.groups.io 代表 Laszlo >> Ersek >>> 发送时间: 2021年5月25日 19:55 >>> 收件人: devel@edk2.groups.io; sami.mujawar@arm.com >>> 抄送: ardb@kernel.org; leif@nuviainc.com; Matteo.Carlini@arm.com; >>> Andreas.Sandberg@arm.com; joey.gouly@arm.com; nd@arm.com >>> 主题: Re: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: >>> Fix maximum number of interrupts in GICv3 >>> >>> Hi Sami, >>> >>> On 05/24/21 15:01, Sami Mujawar wrote: >>>> From: Andreas Sandberg >>>> >>>> Bugzilla: 3415 (https://bugzilla.tianocore.org/show_bug.cgi?id=3415) >>>> >>>> The GICv3 architecture supports up to 1020 ordinary interrupt >>>> lines. The actual number of interrupts supported is described by the >>>> ITLinesNumber field in the GICD_TYPER register. The total number of >>>> implemented registers is normally calculated as >>>> 32*(ITLinesNumber+1). However, maximum value (0x1f) is a special case >>>> since that would indicate that 1024 interrupts are implemented. >>>> >>>> Add handling for this special case in ArmGicGetMaxNumInterrupts. >>>> >>>> Signed-off-by: Andreas Sandberg >>>> Signed-off-by: Joey Gouly >>>> Signed-off-by: Sami Mujawar >>>> Reviewed-by: Ard Biesheuvel >>>> --- >>>> The changes can be seen at: >>>> https://github.com/samimujawar/edk2/tree/1396_gic_max_num_intr_v2 >>>> >>>> Notes: >>>> v2: >>>> - Fix comment style. >>> [Laszlo] >>>> - Updated comment style. >>> [Sami] >>>> >>>> ArmPkg/Drivers/ArmGic/ArmGicLib.c | 11 +++++++++-- >>>> 1 file changed, 9 insertions(+), 2 deletions(-) >>> >>> I think this patch should be merged really soon, as long as Ard agrees. >>> >>> Thanks, >>> Laszlo >>> >>>> >>>> diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c >>> b/ArmPkg/Drivers/ArmGic/ArmGicLib.c >>>> index >>> >> 6b01c88206ad8adef3100dd44c0d57660db77783..bd4b5edb903f3846f4f0e43 >>> 1f93e001f01cd9e7d 100644 >>>> --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c >>>> +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c >>>> @@ -1,6 +1,6 @@ >>>> /** @file >>>> * >>>> -* Copyright (c) 2011-2018, ARM Limited. All rights reserved. >>>> +* Copyright (c) 2011-2021, Arm Limited. All rights reserved. >>>> * >>>> * SPDX-License-Identifier: BSD-2-Clause-Patent >>>> * >>>> @@ -120,7 +120,14 @@ ArmGicGetMaxNumInterrupts ( >>>> IN INTN GicDistributorBase >>>> ) >>>> { >>>> - return 32 * ((MmioRead32 (GicDistributorBase + ARM_GIC_ICDICTR) & >>> 0x1F) + 1); >>>> + UINTN ItLines; >>>> + >>>> + ItLines = MmioRead32 (GicDistributorBase + ARM_GIC_ICDICTR) & >>> 0x1F; >>>> + >>>> + // >>>> + // Interrupt ID 1020-1023 are reserved. >>>> + // >>>> + return (ItLines == 0x1f) ? 1020 : 32 * (ItLines + 1); >>>> } >>>> >>>> VOID >>>> >>> >>> >>> >>> >>> >> >> >> >> >> >> >> > > >