From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by mx.groups.io with SMTP id smtpd.web12.6626.1614222372392866006 for ; Wed, 24 Feb 2021 19:06:13 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: linux.alibaba.com, ip: 115.124.30.43, mailfrom: huangming@linux.alibaba.com) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=huangming@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UPV7XSu_1614222368; Received: from MingdeMacBook-Pro.local(mailfrom:huangming@linux.alibaba.com fp:SMTPD_---0UPV7XSu_1614222368) by smtp.aliyun-inc.com(127.0.0.1); Thu, 25 Feb 2021 11:06:08 +0800 Subject: Re: [edk2-devel] [PATCH edk2 v2 1/1] ArmPkg/ArmGic: Fix GICR_IPRIORITYR address wrong issue To: Leif Lindholm , devel@edk2.groups.io Cc: Ard Biesheuvel , guoheyi@linux.alibaba.com References: <20210223110642.90020-1-huangming@linux.alibaba.com> <20210223125808.GA1664@vanye> <20210224114940.GL1664@vanye> From: "Ming Huang" Message-ID: <9cf2019d-8ae9-0a2a-ea94-f8d6533f0a38@linux.alibaba.com> Date: Thu, 25 Feb 2021 11:06:08 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210224114940.GL1664@vanye> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 2/24/21 7:49 PM, Leif Lindholm wrote: > Hi Ming, > > Thanks for this. > However, just after I sent my reply, Heyi suggested another > improvement to this patch. Can you please implement that, and submit a > v2? OK, I will implement that in v2. As one issue in my email filter, I miss Heyi's email, sorry for that. Thanks, Ming > > Best Regards, > > Leif > > On Wed, Feb 24, 2021 at 16:26:33 +0800, Ming Huang wrote: >> >> >> On 2/23/21 8:58 PM, Leif Lindholm wrote: >>> On Tue, Feb 23, 2021 at 13:42:49 +0100, Ard Biesheuvel wrote: >>>> On Tue, 23 Feb 2021 at 12:07, Ming Huang wrote: >>>>> >>>>> The register address of GICR_IPRIORITYR is in SGI_base frame. Add >>>>> IPRIORITY_ADDRESS macro for getting GICR_IPRIORITYR address. Otherwise >>>>> GIC RAS error(Uncorrected software error) may report in ArmGicDxe. >>>> >>>> NOTE: missing sign-off >>>> >>>> Patch seems fine to me >>>> >>>> Tested-by: Ard Biesheuvel # QEMU/kvm guest on ThunderX2 >>> >>> Also looks good in QEMU. >>> Reviewed-by: Leif Lindholm >>> >>> Ming, can you confirm that the contribution conforms to the developer >>> certificate of origin by replyint with your Signed-off-by: ? >> >> Sorry, I miss the Signed-off-by. >> please help to add my Signed-off-by: >> Signed-off-by: Ming Huang >> >> Thanks, >> Ming >> >>> >>>> >>>> >>>> >>>>> --- >>>>> ArmPkg/Drivers/ArmGic/ArmGicLib.c | 5 ++++- >>>>> 1 file changed, 4 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c >>>>> index 8ef32b33a1..b4d3965acb 100644 >>>>> --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c >>>>> +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c >>>>> @@ -30,6 +30,9 @@ >>>>> #define ICENABLER_ADDRESS(base,offset) ((base) + \ >>>>> ARM_GICR_CTLR_FRAME_SIZE + ARM_GICR_ICENABLER + (4 * offset)) >>>>> >>>>> +#define IPRIORITY_ADDRESS(base,offset) ((base) + \ >>>>> + ARM_GICR_CTLR_FRAME_SIZE + ARM_GIC_ICDIPR + (4 * offset)) >>>>> + >>>>> /** >>>>> * >>>>> * Return whether the Source interrupt index refers to a shared interrupt (SPI) >>>>> @@ -236,7 +239,7 @@ ArmGicSetInterruptPriority ( >>>>> } >>>>> >>>>> MmioAndThenOr32 ( >>>>> - GicCpuRedistributorBase + ARM_GIC_ICDIPR + (4 * RegOffset), >>>>> + IPRIORITY_ADDRESS (GicCpuRedistributorBase, RegOffset), >>>>> ~(0xff << RegShift), >>>>> Priority << RegShift >>>>> ); >>>>> -- >>>>> 2.17.1 >>>>> >> >> >> >> >>