public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
@ 2021-05-24 13:01 Sami Mujawar
  2021-05-25 11:55 ` [edk2-devel] " Laszlo Ersek
  2021-05-27  9:38 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 9+ messages in thread
From: Sami Mujawar @ 2021-05-24 13:01 UTC (permalink / raw)
  To: devel
  Cc: Sami Mujawar, ardb, leif, Matteo.Carlini, lersek,
	Andreas.Sandberg, joey.gouly, nd

From: Andreas Sandberg <andreas.sandberg@arm.com>

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 <andreas.sandberg@arm.com>
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.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 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
index 6b01c88206ad8adef3100dd44c0d57660db77783..bd4b5edb903f3846f4f0e431f93e001f01cd9e7d 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
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
  2021-05-24 13:01 [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3 Sami Mujawar
@ 2021-05-25 11:55 ` Laszlo Ersek
  2021-05-26  2:22   ` 回复: " gaoliming
       [not found]   ` <16827C85E5A0E1A5.4904@groups.io>
  2021-05-27  9:38 ` Philippe Mathieu-Daudé
  1 sibling, 2 replies; 9+ messages in thread
From: Laszlo Ersek @ 2021-05-25 11:55 UTC (permalink / raw)
  To: devel, sami.mujawar
  Cc: ardb, leif, Matteo.Carlini, Andreas.Sandberg, joey.gouly, nd

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=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 <andreas.sandberg@arm.com>
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
> Reviewed-by: Ard Biesheuvel <ardb@kernel.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 +++++++++--
>  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..bd4b5edb903f3846f4f0e431f93e001f01cd9e7d 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
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* 回复: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
  2021-05-25 11:55 ` [edk2-devel] " Laszlo Ersek
@ 2021-05-26  2:22   ` gaoliming
       [not found]   ` <16827C85E5A0E1A5.4904@groups.io>
  1 sibling, 0 replies; 9+ messages in thread
From: gaoliming @ 2021-05-26  2:22 UTC (permalink / raw)
  To: devel, lersek, sami.mujawar
  Cc: ardb, leif, Matteo.Carlini, Andreas.Sandberg, joey.gouly, nd

Laszlo, Ard, Sami:
  I am OK to merge this patch for stable tag 202105. 

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <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 <andreas.sandberg@arm.com>
> >
> > 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 <andreas.sandberg@arm.com>
> > Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> > Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
> > Reviewed-by: Ard Biesheuvel <ardb@kernel.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 +++++++++--
> >  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
> >
> 
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 9+ messages in thread

* 回复: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
       [not found]   ` <16827C85E5A0E1A5.4904@groups.io>
@ 2021-05-27  2:32     ` gaoliming
  2021-05-27  8:50       ` Laszlo Ersek
  0 siblings, 1 reply; 9+ messages in thread
From: gaoliming @ 2021-05-27  2:32 UTC (permalink / raw)
  To: devel, gaoliming, lersek, sami.mujawar
  Cc: ardb, leif, Matteo.Carlini, Andreas.Sandberg, joey.gouly, nd

If no objection, I will merge this patch today. Then, tomorrow, I will create stable tag 202105. 

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <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 <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 <andreas.sandberg@arm.com>
> > >
> > > 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 <andreas.sandberg@arm.com>
> > > Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> > > Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
> > > Reviewed-by: Ard Biesheuvel <ardb@kernel.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 +++++++++--
> > >  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
> > >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 回复: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
  2021-05-27  2:32     ` gaoliming
@ 2021-05-27  8:50       ` Laszlo Ersek
  2021-05-27  9:19         ` Sami Mujawar
       [not found]         ` <1682E1EE63CD4105.7325@groups.io>
  0 siblings, 2 replies; 9+ messages in thread
From: Laszlo Ersek @ 2021-05-27  8:50 UTC (permalink / raw)
  To: gaoliming, devel, sami.mujawar
  Cc: ardb, leif, Matteo.Carlini, Andreas.Sandberg, joey.gouly, nd

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 <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 <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 <andreas.sandberg@arm.com>
>>>>
>>>> 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 <andreas.sandberg@arm.com>
>>>> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
>>>> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
>>>> Reviewed-by: Ard Biesheuvel <ardb@kernel.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 +++++++++--
>>>>  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
>>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>> 
>>
> 
> 
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 回复: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
  2021-05-27  8:50       ` Laszlo Ersek
@ 2021-05-27  9:19         ` Sami Mujawar
       [not found]         ` <1682E1EE63CD4105.7325@groups.io>
  1 sibling, 0 replies; 9+ messages in thread
From: Sami Mujawar @ 2021-05-27  9:19 UTC (permalink / raw)
  To: Laszlo Ersek, gaoliming, devel@edk2.groups.io
  Cc: ardb@kernel.org, leif@nuviainc.com, Matteo Carlini,
	Andreas Sandberg, Joey Gouly, nd

[-- Attachment #1: Type: text/plain, Size: 4651 bytes --]

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 <devel@edk2.groups.io>, Sami Mujawar <Sami.Mujawar@arm.com>
Cc: ardb@kernel.org <ardb@kernel.org>, leif@nuviainc.com <leif@nuviainc.com>, Matteo Carlini <Matteo.Carlini@arm.com>, Andreas Sandberg <Andreas.Sandberg@arm.com>, Joey Gouly <Joey.Gouly@arm.com>, nd <nd@arm.com>
Subject: Re: 回复: [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 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 <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 <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 <andreas.sandberg@arm.com>
>>>>
>>>> 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 <andreas.sandberg@arm.com>
>>>> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
>>>> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
>>>> Reviewed-by: Ard Biesheuvel <ardb@kernel.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 +++++++++--
>>>>  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
>>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>> 
>>
>
>
>

[-- Attachment #2: Type: text/html, Size: 11567 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
  2021-05-24 13:01 [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3 Sami Mujawar
  2021-05-25 11:55 ` [edk2-devel] " Laszlo Ersek
@ 2021-05-27  9:38 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-27  9:38 UTC (permalink / raw)
  To: devel, sami.mujawar
  Cc: ardb, leif, Matteo.Carlini, lersek, Andreas.Sandberg, joey.gouly,
	nd

On 5/24/21 3:01 PM, Sami Mujawar wrote:
> From: Andreas Sandberg <andreas.sandberg@arm.com>
> 
> 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 <andreas.sandberg@arm.com>
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
> Reviewed-by: Ard Biesheuvel <ardb@kernel.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 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 回复: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
       [not found]         ` <1682E1EE63CD4105.7325@groups.io>
@ 2021-05-27 10:12           ` Sami Mujawar
  2021-05-27 13:50             ` 回复: " gaoliming
  0 siblings, 1 reply; 9+ messages in thread
From: Sami Mujawar @ 2021-05-27 10:12 UTC (permalink / raw)
  To: devel, Laszlo Ersek, gaoliming
  Cc: ardb@kernel.org, leif@nuviainc.com, Matteo Carlini,
	Andreas Sandberg, Joey Gouly, nd, philmd

[-- Attachment #1: Type: text/plain, Size: 5044 bytes --]

Hi All,

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

Regards,

Sami Mujawar


On 27/05/2021 10:19 AM, Sami Mujawar via groups.io wrote:
>
> 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 
> <devel@edk2.groups.io>, Sami Mujawar <Sami.Mujawar@arm.com>
> *Cc: *ardb@kernel.org <ardb@kernel.org>, leif@nuviainc.com 
> <leif@nuviainc.com>, Matteo Carlini <Matteo.Carlini@arm.com>, Andreas 
> Sandberg <Andreas.Sandberg@arm.com>, Joey Gouly <Joey.Gouly@arm.com>, 
> nd <nd@arm.com>
> *Subject: *Re: 回复: [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 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 <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 <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 <andreas.sandberg@arm.com>
> >>>>
> >>>> 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 <andreas.sandberg@arm.com>
> >>>> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> >>>> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
> >>>> Reviewed-by: Ard Biesheuvel <ardb@kernel.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 +++++++++--
> >>>>  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
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
>
> 


[-- Attachment #2: Type: text/html, Size: 17123 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 回复: 回复: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
  2021-05-27 10:12           ` Sami Mujawar
@ 2021-05-27 13:50             ` gaoliming
  0 siblings, 0 replies; 9+ messages in thread
From: gaoliming @ 2021-05-27 13:50 UTC (permalink / raw)
  To: 'Sami Mujawar', devel, 'Laszlo Ersek'
  Cc: ardb, leif, 'Matteo Carlini', 'Andreas Sandberg',
	'Joey Gouly', 'nd', philmd

[-- Attachment #1: Type: text/plain, Size: 6636 bytes --]

Got it. Thanks!

 

Liming

发件人: Sami Mujawar <sami.mujawar@arm.com> 
发送时间: 2021年5月27日 18:13
收件人: devel@edk2.groups.io; Laszlo Ersek <lersek@redhat.com>; gaoliming <gaoliming@byosoft.com.cn>
抄送: ardb@kernel.org; leif@nuviainc.com; Matteo Carlini <Matteo.Carlini@arm.com>; Andreas Sandberg <Andreas.Sandberg@arm.com>; Joey Gouly <Joey.Gouly@arm.com>; nd <nd@arm.com>; philmd@redhat.com
主题: Re: 回复: [edk2-devel] [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3

 

Hi All,

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

Regards,

Sami Mujawar

 

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

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  <mailto:lersek@redhat.com> <lersek@redhat.com>
Date: Thursday, 27 May 2021 at 09:50
To: gaoliming  <mailto:gaoliming@byosoft.com.cn> <gaoliming@byosoft.com.cn>, devel@edk2.groups.io <mailto:devel@edk2.groups.io>   <mailto:devel@edk2.groups.io> <devel@edk2.groups.io>, Sami Mujawar  <mailto:Sami.Mujawar@arm.com> <Sami.Mujawar@arm.com>
Cc: ardb@kernel.org <mailto:ardb@kernel.org>   <mailto:ardb@kernel.org> <ardb@kernel.org>, leif@nuviainc.com <mailto:leif@nuviainc.com>   <mailto:leif@nuviainc.com> <leif@nuviainc.com>, Matteo Carlini  <mailto:Matteo.Carlini@arm.com> <Matteo.Carlini@arm.com>, Andreas Sandberg  <mailto:Andreas.Sandberg@arm.com> <Andreas.Sandberg@arm.com>, Joey Gouly  <mailto:Joey.Gouly@arm.com> <Joey.Gouly@arm.com>, nd  <mailto:nd@arm.com> <nd@arm.com>
Subject: Re: 回复: [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 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 <mailto:devel@edk2.groups.io>   <mailto:devel@edk2.groups.io> <devel@edk2.groups.io> 代表 gaoliming
>> 发送时间: 2021年5月26日 10:22
>> 收件人: devel@edk2.groups.io <mailto:devel@edk2.groups.io> ; lersek@redhat.com <mailto:lersek@redhat.com> ;
>> sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> 
>> 抄送: ardb@kernel.org <mailto:ardb@kernel.org> ; leif@nuviainc.com <mailto:leif@nuviainc.com> ; Matteo.Carlini@arm.com <mailto:Matteo.Carlini@arm.com> ;
>> Andreas.Sandberg@arm.com <mailto:Andreas.Sandberg@arm.com> ; joey.gouly@arm.com <mailto:joey.gouly@arm.com> ; nd@arm.com <mailto: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 <mailto:devel@edk2.groups.io>   <mailto:devel@edk2.groups.io> <devel@edk2.groups.io> 代表 Laszlo
>> Ersek
>>> 发送时间: 2021年5月25日 19:55
>>> 收件人: devel@edk2.groups.io <mailto:devel@edk2.groups.io> ; sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> 
>>> 抄送: ardb@kernel.org <mailto:ardb@kernel.org> ; leif@nuviainc.com <mailto:leif@nuviainc.com> ; Matteo.Carlini@arm.com <mailto:Matteo.Carlini@arm.com> ;
>>> Andreas.Sandberg@arm.com <mailto:Andreas.Sandberg@arm.com> ; joey.gouly@arm.com <mailto:joey.gouly@arm.com> ; nd@arm.com <mailto: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  <mailto:andreas.sandberg@arm.com> <andreas.sandberg@arm.com>
>>>>
>>>> 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  <mailto:andreas.sandberg@arm.com> <andreas.sandberg@arm.com>
>>>> Signed-off-by: Joey Gouly  <mailto:joey.gouly@arm.com> <joey.gouly@arm.com>
>>>> Signed-off-by: Sami Mujawar  <mailto:sami.mujawar@arm.com> <sami.mujawar@arm.com>
>>>> Reviewed-by: Ard Biesheuvel  <mailto:ardb@kernel.org> <ardb@kernel.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 +++++++++--
>>>>  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
>>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>> 
>>
> 
> 
> 



 


[-- Attachment #2: Type: text/html, Size: 16723 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-27 13:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-24 13:01 [edk2-devel202105 PATCH v2 1/1] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3 Sami Mujawar
2021-05-25 11:55 ` [edk2-devel] " Laszlo Ersek
2021-05-26  2:22   ` 回复: " gaoliming
     [not found]   ` <16827C85E5A0E1A5.4904@groups.io>
2021-05-27  2:32     ` gaoliming
2021-05-27  8:50       ` Laszlo Ersek
2021-05-27  9:19         ` Sami Mujawar
     [not found]         ` <1682E1EE63CD4105.7325@groups.io>
2021-05-27 10:12           ` Sami Mujawar
2021-05-27 13:50             ` 回复: " gaoliming
2021-05-27  9:38 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox