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.web12.7080.1622123430011012536 for ; Thu, 27 May 2021 06:50:31 -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 ([101.224.112.124]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 27 May 2021 21:50:19 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 101.224.112.124 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Sami Mujawar'" , , "'Laszlo Ersek'" Cc: , , "'Matteo Carlini'" , "'Andreas Sandberg'" , "'Joey Gouly'" , "'nd'" , References: <20210524130130.22280-1-sami.mujawar@arm.com> <16827C85E5A0E1A5.4904@groups.io> <006e01d752a0$82e0bb10$88a23130$@byosoft.com.cn> <04a59e4c-8a9d-d483-893f-5dc83fa9046c@redhat.com> <1682E1EE63CD4105.7325@groups.io> <5c20d3f0-fea9-ec33-6900-bff13fe86112@arm.com> In-Reply-To: <5c20d3f0-fea9-ec33-6900-bff13fe86112@arm.com> Subject: =?UTF-8?B?5Zue5aSNOiDlm57lpI06IFtlZGsyLWRldmVsXSBbZWRrMi1kZXZlbDIwMjEwNSBQQVRDSCB2MiAxLzFdIEFybVBrZy9Bcm1HaWM6IEZpeCBtYXhpbXVtIG51bWJlciBvZiBpbnRlcnJ1cHRzIGluIEdJQ3Yz?= Date: Thu, 27 May 2021 21:50:10 +0800 Message-ID: <00d101d752ff$3c3b5b20$b4b21160$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHNeds1RqbQMhqNd5QNgl+daW7fcQDwADgoArmqNSECcOLbyQFtMO9OAp0fyu0CGU8LvqqpGTWA Content-Type: multipart/alternative; boundary="----=_NextPart_000_00D2_01D75342.4A6048D0" Content-Language: zh-cn ------=_NextPart_000_00D2_01D75342.4A6048D0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Got it. Thanks! =20 Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: Sami Mujawar =20 =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B45=E6=9C=8827=E6=97=A5 1= 8:13 =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; Laszlo Ersek ; gaoliming =E6=8A=84=E9=80=81: ardb@kernel.org; leif@nuviainc.com; Matteo Carlini ; Andreas Sandberg ; Joey Go= uly ; nd ; philmd@redhat.com =E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-devel202105= PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3 =20 Hi All, I have pushed this change to edk2 master at cfa6ffb113f2..e1999b264f1f Regards, Sami Mujawar =20 On 27/05/2021 10:19 AM, Sami Mujawar via groups.io wrote: Hi Laszlo, Liming, =20 Apologies for not doing it earlier. I was not sure if it was within my rig= ht to merge the change. I will merge this in the next 2 hours. =20 Regards, =20 Sami Mujawar =20 =20 From: Laszlo Ersek Date: Thursday, 27 May 2021 at 09:50 To: gaoliming , devel@edk2.groups.io , Sami Mujawar Cc: ardb@kernel.org , leif@nuviainc.com , Matteo Carlini , Andreas Sandberg , Joey Gouly , nd Subject: Re: =E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-devel202105 PATCH v2 1= /1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3 Hi Liming, On 05/27/21 04:32, gaoliming wrote: > If no objection, I will merge this patch today. Then, tomorrow, I will c= reate stable tag 202105.=20 yes, please do that -- TBH, I thought Sami would merge it sooner, as Sami does have maintainer access through DynamicTablesPkg and StandaloneMmPkg. Thanks! Laszlo >=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 =20 >> =E6=8A=84=E9=80=81: ardb@kernel.org ; leif@nuv= iainc.com ; Matteo.Carlini@arm.com ; >> Andreas.Sandberg@arm.com ; joey.gouly= @arm.com ; nd@arm.com =20 >> =E4=B8=BB=E9=A2=98: =E5=9B=9E=E5=A4=8D: [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 >>> -----=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.com =20 >>> =E6=8A=84=E9=80=81: ardb@kernel.org ; leif@nu= viainc.com ; Matteo.Carlini@arm.com ; >>> Andreas.Sandberg@arm.com ; joey.goul= y@arm.com ; nd@arm.com =20 >>> =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=3D3415= ) >>>> >>>> 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 =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 ------=_NextPart_000_00D2_01D75342.4A6048D0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Got it. Thanks!

 

Liming

<= div style=3D'border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4= .0pt'>

=E5=8F=91=E4=BB=B6=E4=BA=BA: Sami Mujawar <sami.mujawar@arm.com> = = =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4:= 2021=E5=B9=B45=E6=9C=8827=E6=97=A5 18:13
=E6=94=B6=E4=BB=B6=E4=BA= =BA: devel@edk2.groups.io= ; Laszlo Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.c= om.cn>
=E6=8A=84=E9=80=81: ardb@kernel.org; leif@nuviainc.com; Matteo Carlini <Mat= teo.Carlini@arm.com>; Andreas Sandberg <Andreas.Sandberg@arm.com>;= Joey Gouly <Joey.Gouly@arm.com>; nd <nd@arm.com>; philmd@redha= t.com
=E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D: [edk2-devel]= [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of inter= rupts in GICv3

 

Hi Al= l,

I have pushed this change to = edk2 master at cfa6ffb113f2..e1999b264f1f

Regards,

Sami Mujawar<= o:p>

 

On 27/05/2021 10= :19 AM, Sami Mujawar via groups.io wrote:

<= span lang=3DEN-US style=3D'mso-fareast-language:EN-US'>Hi Laszlo, Liming,

 

Apologies for not doing it earlier. I was not = sure if it was within my right to merge the change.

I will merge this in the next 2 hours.

 

Regards,

 

Sami Mujawar

 

 

From: Laszlo Ersek <lersek@redhat.com>
Date: Thursday, 27 May 2021 at= 09:50
To: gaoliming = <gaoliming@byosoft.com.cn>, devel@edk2.groups.io <dev= el@edk2.groups.io>, Sami Mujawar <Sami.Mujawar@arm.com>
Cc: ardb@kernel.org <ardb= @kernel.org>, leif@nuviainc.com= <leif@nuviainc.com>, Ma= tteo Carlini <Matteo.Carlini@a= rm.com>, Andreas Sandberg <Andreas.Sandberg@arm.com>, Joey Gouly <Joey.Gouly@arm.com>, nd <nd@arm.com>
Subject: Re:
=E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-devel202105 = PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3

Hi Liming,

On 05/2= 7/21 04:32, gaoliming wrote:
> If no objection, I will merge this pat= ch today. Then, tomorrow, I will create stable tag 202105.

yes, ple= ase do that -- TBH, I thought Sami would merge it sooner, as
Sami does h= ave maintainer access through DynamicTablesPkg and
StandaloneMmPkg.
<= br>Thanks!
Laszlo

>
> Thanks
> Liming
>>= -----
=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6<= /span>-----
>>
=E5=8F=91devel@edk2.groups.io <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; ler= sek@redhat.com;
>> sam= i.mujawar@arm.com
>>
=E6=8A=84=E9=80=81: ardb@kernel.org; leif@nuviainc.com; Matteo.Ca= rlini@arm.com;
>> = Andreas.Sandberg@arm.com; joey.go= uly@arm.com; nd@arm.com
>> <= /span>=E4=B8=BB=E9=A2=98= : =E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmP= kg/ArmGic:
>> Fix maximum number of interrupts in GICv3
>>= ;
>> Laszlo, Ard, Sami:
>>   I am OK to merge t= his patch for stable tag 202105.
>>
>> 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 <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<= span lang=3DEN-US>: devel@edk2.grou= ps.io; sami.mujawar@arm.com=
>>>
=E6= =8A=84=E9=80=81: ardb@kernel.org; leif@nuviainc= .com; Matteo.Carlini@arm.com<= /a>;
>>>
Andreas.Sa= ndberg@arm.com; joey.gouly@arm.co= m; nd@arm.com
>>>
= =E4=B8=BB=E9=A2=98: R= e: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic:
>>&= gt; Fix maximum number of interrupts in GICv3
>>>
>>&g= t; Hi Sami,
>>>
>>> On 05/24/21 15:01, Sami Mujawar= wrote:
>>>> From: Andreas Sandberg <andreas.sandberg@arm.com>
>>>>= ;
>>>> Bugzilla: 3415 (https://bugzilla.tianocore.org/show_bug.cgi?id= = =3D3415)
>>>>
>>>> The GICv3 architectur= e supports up to 1020 ordinary interrupt
>>>> lines. The act= ual 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 imp= lemented.
>>>>
>>>> Add handling for this spe= cial case in ArmGicGetMaxNumInterrupts.
>>>>
>>>= > Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
>>>> Signed-off-b= y: Joey Gouly <joey.gouly@arm.com&= gt;
>>>> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
>>>> R= eviewed-by: Ard Biesheuvel <ardb@kern= el.org>
>>>> ---
>>>> 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 +++++++++--
>>>>&nb= sp; 1 file changed, 9 insertions(+), 2 deletions(-)
>>>
>= >> I think this patch should be merged really soon, as long as Ard ag= rees.
>>>
>>> Thanks,
>>> Laszlo
>= ;>>
>>>>
>>>> diff --git a/ArmPkg/Drive= rs/ArmGic/ArmGicLib.c
>>> b/ArmPkg/Drivers/ArmGic/ArmGicLib.c>>>> index
>>>
>> 6b01c88206ad8adef3100d= d44c0d57660db77783..bd4b5edb903f3846f4f0e43
>>> 1f93e001f01cd9e= 7d 100644
>>>> --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c
&g= t;>>> +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
>>>> = @@ -1,6 +1,6 @@
>>>>  /** @file
>>>>&nbs= p; *
>>>> -*  Copyright (c) 2011-2018, ARM Limited. All= rights reserved.
>>>> +*  Copyright (c) 2011-2021, Arm= Limited. All rights reserved.
>>>>  *
>>>&= gt;  *  SPDX-License-Identifier: BSD-2-Clause-Patent
>>&= gt;>  *
>>>> @@ -120,7 +120,14 @@ ArmGicGetMaxNumInt= errupts (
>>>>    IN  INTN  &n= bsp;       GicDistributorBase
>>>= >    )
>>>>  {
>>>> -&= nbsp; return 32 * ((MmioRead32 (GicDistributorBase + ARM_GIC_ICDICTR) &=
>>> 0x1F) + 1);
>>>> +  UINTN ItLines;
= >>>> +
>>>> +  ItLines =3D MmioRead32 (GicD= istributorBase + ARM_GIC_ICDICTR) &
>>> 0x1F;
>>&g= t;> +
>>>> +  //
>>>> +  // Inte= rrupt ID 1020-1023 are reserved.
>>>> +  //
>>= >> +  return (ItLines =3D=3D 0x1f) ? 1020 : 32 * (ItLines + 1);<= br>>>>>  }
>>>>
>>>>  V= OID
>>>>
>>>
>>>
>>>
= >>>
>>>
>>
>>
>>
>>= ;
>>
>>
>>
>
>
>

 

= ------=_NextPart_000_00D2_01D75342.4A6048D0--