Got it. Thanks!
Liming 发件人: Sami Mujawar <sami.muja...@arm.com> 发送时间: 2021年5月27日 18:13 收件人: devel@edk2.groups.io; Laszlo Ersek <ler...@redhat.com>; gaoliming <gaolim...@byosoft.com.cn> 抄送: a...@kernel.org; l...@nuviainc.com; Matteo Carlini <matteo.carl...@arm.com>; Andreas Sandberg <andreas.sandb...@arm.com>; Joey Gouly <joey.go...@arm.com>; nd <n...@arm.com>; phi...@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:ler...@redhat.com> <ler...@redhat.com> Date: Thursday, 27 May 2021 at 09:50 To: gaoliming <mailto:gaolim...@byosoft.com.cn> <gaolim...@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.muja...@arm.com> <sami.muja...@arm.com> Cc: a...@kernel.org <mailto:a...@kernel.org> <mailto:a...@kernel.org> <a...@kernel.org>, l...@nuviainc.com <mailto:l...@nuviainc.com> <mailto:l...@nuviainc.com> <l...@nuviainc.com>, Matteo Carlini <mailto:matteo.carl...@arm.com> <matteo.carl...@arm.com>, Andreas Sandberg <mailto:andreas.sandb...@arm.com> <andreas.sandb...@arm.com>, Joey Gouly <mailto:joey.go...@arm.com> <joey.go...@arm.com>, nd <mailto:n...@arm.com> <n...@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> ; ler...@redhat.com >> <mailto:ler...@redhat.com> ; >> sami.muja...@arm.com <mailto:sami.muja...@arm.com> >> 抄送: a...@kernel.org <mailto:a...@kernel.org> ; l...@nuviainc.com >> <mailto:l...@nuviainc.com> ; matteo.carl...@arm.com >> <mailto:matteo.carl...@arm.com> ; >> andreas.sandb...@arm.com <mailto:andreas.sandb...@arm.com> ; >> joey.go...@arm.com <mailto:joey.go...@arm.com> ; n...@arm.com >> <mailto:n...@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.muja...@arm.com <mailto:sami.muja...@arm.com> >>> 抄送: a...@kernel.org <mailto:a...@kernel.org> ; l...@nuviainc.com >>> <mailto:l...@nuviainc.com> ; matteo.carl...@arm.com >>> <mailto:matteo.carl...@arm.com> ; >>> andreas.sandb...@arm.com <mailto:andreas.sandb...@arm.com> ; >>> joey.go...@arm.com <mailto:joey.go...@arm.com> ; n...@arm.com >>> <mailto:n...@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.sandb...@arm.com> >>>> <andreas.sandb...@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.sandb...@arm.com> >>>> <andreas.sandb...@arm.com> >>>> Signed-off-by: Joey Gouly <mailto:joey.go...@arm.com> <joey.go...@arm.com> >>>> Signed-off-by: Sami Mujawar <mailto:sami.muja...@arm.com> >>>> <sami.muja...@arm.com> >>>> Reviewed-by: Ard Biesheuvel <mailto:a...@kernel.org> <a...@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 >>>> >>> >>> >>> >>> >>> >> >> >> >> >> >> >> > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75815): https://edk2.groups.io/g/devel/message/75815 Mute This Topic: https://groups.io/mt/83124574/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-