From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web11.1824.1622082743571189256 for ; Wed, 26 May 2021 19:32:24 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 27 May 2021 10:32:15 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , , Cc: , , , , , References: <20210524130130.22280-1-sami.mujawar@arm.com> <16827C85E5A0E1A5.4904@groups.io> In-Reply-To: <16827C85E5A0E1A5.4904@groups.io> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW2VkazItZGV2ZWwyMDIxMDUgUEFUQ0ggdjIgMS8xXSBBcm1Qa2cvQXJtR2ljOiBGaXggbWF4aW11bSBudW1iZXIgb2YgaW50ZXJydXB0cyBpbiBHSUN2Mw==?= Date: Thu, 27 May 2021 10:32:17 +0800 Message-ID: <006e01d752a0$82e0bb10$88a23130$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHNeds1RqbQMhqNd5QNgl+daW7fcQDwADgoArmqNSGq7P9doA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn If no objection, I will merge this patch today. Then, tomorrow, I will crea= te stable tag 202105.=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 gaoliming > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B45=E6=9C=8826=E6=97=A5= 10:22 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; lersek@redhat.com; > sami.mujawar@arm.com > =E6=8A=84=E9=80=81: ardb@kernel.org; leif@nuviainc.com; Matteo.Carlini@a= rm.com; > Andreas.Sandberg@arm.com; joey.gouly@arm.com; nd@arm.com > =E4=B8=BB=E9=A2=98: =E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-devel202105 P= ATCH v2 1/1] ArmPkg/ArmGic: > Fix maximum number of interrupts in GICv3 >=20 > Laszlo, Ard, Sami: > I am OK to merge this patch for stable tag 202105. >=20 > Thanks > Liming > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =E4=BB=A3=E8=A1=A8 Laszlo > Ersek > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B45=E6=9C=8825=E6=97= =A5 19:55 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; sami.mujawar@arm.co= m > > =E6=8A=84=E9=80=81: ardb@kernel.org; leif@nuviainc.com; Matteo.Carlini= @arm.com; > > Andreas.Sandberg@arm.com; joey.gouly@arm.com; nd@arm.com > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] A= rmPkg/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=3D341= 5) > > > > > > 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 cas= e > > > 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 =3D MmioRead32 (GicDistributorBase + ARM_GIC_ICDICTR) & > > 0x1F; > > > + > > > + // > > > + // Interrupt ID 1020-1023 are reserved. > > > + // > > > + return (ItLines =3D=3D 0x1f) ? 1020 : 32 * (ItLines + 1); > > > } > > > > > > VOID > > > > > > > > > > > > > >=20 >=20 >=20 >=20 >=20 >=20 >=20