From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by mx.groups.io with SMTP id smtpd.web10.3959.1613804945728056272 for ; Fri, 19 Feb 2021 23:09:06 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: linux.alibaba.com, ip: 115.124.30.133, mailfrom: huangming@linux.alibaba.com) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=huangming@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UP0IKpU_1613804922; Received: from 842effaa37a8.tbsite.net(mailfrom:huangming@linux.alibaba.com fp:SMTPD_---0UP0IKpU_1613804922) by smtp.aliyun-inc.com(127.0.0.1); Sat, 20 Feb 2021 15:08:59 +0800 From: "Ming Huang" To: devel@edk2.groups.io, ardb+tianocore@kernel.org, leif@nuviainc.com Cc: guoheyi@linux.alibaba.com, Ming Huang Subject: [PATCH edk2 v1 1/1] ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issue Date: Sat, 20 Feb 2021 15:08:39 +0800 Message-Id: <20210220070839.29988-1-huangming@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 The address of GICR_IPRIORITYR is in SGI_base frame. ARM_GICR_CTLR_FRAME_SIZE should add to GicCpuRedistributorBase for GICR_IPRIORITYR. Otherwise RAS error(Uncorrected software error) will reported in ArmGicDxe. Signed-off-by: Ming Huang --- ArmPkg/Drivers/ArmGic/ArmGicLib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c index 8ef32b33a1..7a54972455 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c @@ -235,6 +235,9 @@ ArmGicSetInterruptPriority ( return; } + // The address of GICR_IPRIORITYR is in SGI_base frame. + // ARM_GICR_CTLR_FRAME_SIZE should add to GicCpuRedistributorBase for GICR_IPRIORITYR. + GicCpuRedistributorBase += ARM_GICR_CTLR_FRAME_SIZE; MmioAndThenOr32 ( GicCpuRedistributorBase + ARM_GIC_ICDIPR + (4 * RegOffset), ~(0xff << RegShift), -- 2.17.1