* [PATCH edk2 v2 1/2] ArmPkg/ArmGicLib: Fix two macros issue for offset parameter
2021-02-25 3:32 [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib Ming Huang
@ 2021-02-25 3:32 ` Ming Huang
2021-02-25 3:32 ` [PATCH edk2 v2 2/2] ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issue Ming Huang
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Ming Huang @ 2021-02-25 3:32 UTC (permalink / raw)
To: devel, ardb+tianocore, leif; +Cc: guoheyi, Ming Huang
Modify two macros to put "offset" in parentheses and remove
parentheses from "4 * offset".
Signed-off-by: Ming Huang <huangming@linux.alibaba.com>
---
ArmPkg/Drivers/ArmGic/ArmGicLib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
index 8ef32b33a1..5d04ed3dac 100644
--- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c
+++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
@@ -25,10 +25,10 @@
+ ARM_GICR_SGI_RESERVED_FRAME_SIZE)
#define ISENABLER_ADDRESS(base,offset) ((base) + \
- ARM_GICR_CTLR_FRAME_SIZE + ARM_GICR_ISENABLER + (4 * offset))
+ ARM_GICR_CTLR_FRAME_SIZE + ARM_GICR_ISENABLER + 4 * (offset))
#define ICENABLER_ADDRESS(base,offset) ((base) + \
- ARM_GICR_CTLR_FRAME_SIZE + ARM_GICR_ICENABLER + (4 * offset))
+ ARM_GICR_CTLR_FRAME_SIZE + ARM_GICR_ICENABLER + 4 * (offset))
/**
*
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2 v2 2/2] ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issue
2021-02-25 3:32 [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib Ming Huang
2021-02-25 3:32 ` [PATCH edk2 v2 1/2] ArmPkg/ArmGicLib: Fix two macros issue for offset parameter Ming Huang
@ 2021-02-25 3:32 ` Ming Huang
2021-02-25 12:04 ` edk2-stable202102 Re: [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib Leif Lindholm
2021-03-01 13:20 ` Leif Lindholm
3 siblings, 0 replies; 7+ messages in thread
From: Ming Huang @ 2021-02-25 3:32 UTC (permalink / raw)
To: devel, ardb+tianocore, leif; +Cc: guoheyi, Ming Huang
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.
Signed-off-by: Ming Huang <huangming@linux.alibaba.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
---
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 5d04ed3dac..6b01c88206 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* edk2-stable202102 Re: [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib
2021-02-25 3:32 [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib Ming Huang
2021-02-25 3:32 ` [PATCH edk2 v2 1/2] ArmPkg/ArmGicLib: Fix two macros issue for offset parameter Ming Huang
2021-02-25 3:32 ` [PATCH edk2 v2 2/2] ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issue Ming Huang
@ 2021-02-25 12:04 ` Leif Lindholm
2021-02-25 13:50 ` 回复: " gaoliming
2021-03-01 13:20 ` Leif Lindholm
3 siblings, 1 reply; 7+ messages in thread
From: Leif Lindholm @ 2021-02-25 12:04 UTC (permalink / raw)
To: Ming Huang, gaoliming; +Cc: devel, ardb+tianocore, guoheyi, Quan Nguyen
On Thu, Feb 25, 2021 at 11:32:10 +0800, Ming Huang wrote:
> The first patch is prepare for the second one.
I have raised
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3236
to track this issue, and I would like to include this fix in the
stable tag.
> Ming Huang (2):
> ArmPkg/ArmGicLib: Fix two macros issue for offset parameter
> ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issue
>
> ArmPkg/Drivers/ArmGic/ArmGicLib.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* 回复: edk2-stable202102 Re: [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib
2021-02-25 12:04 ` edk2-stable202102 Re: [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib Leif Lindholm
@ 2021-02-25 13:50 ` gaoliming
2021-02-26 3:23 ` [edk2-devel] " Quan Nguyen
0 siblings, 1 reply; 7+ messages in thread
From: gaoliming @ 2021-02-25 13:50 UTC (permalink / raw)
To: 'Leif Lindholm', 'Ming Huang'
Cc: devel, ardb+tianocore, guoheyi, 'Quan Nguyen'
Leif:
They are bug fixes. I am OK to merge them for this stable tag after they
pass code review.
Thanks
Liming
> -----邮件原件-----
> 发件人: Leif Lindholm <leif@nuviainc.com>
> 发送时间: 2021年2月25日 20:04
> 收件人: Ming Huang <huangming@linux.alibaba.com>; gaoliming
> <gaoliming@byosoft.com.cn>
> 抄送: devel@edk2.groups.io; ardb+tianocore@kernel.org;
> guoheyi@linux.alibaba.com; Quan Nguyen <quan@os.amperecomputing.com>
> 主题: edk2-stable202102 Re: [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib
>
> On Thu, Feb 25, 2021 at 11:32:10 +0800, Ming Huang wrote:
> > The first patch is prepare for the second one.
>
> I have raised
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3236
> to track this issue, and I would like to include this fix in the
> stable tag.
>
> > Ming Huang (2):
> > ArmPkg/ArmGicLib: Fix two macros issue for offset parameter
> > ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issue
> >
> > ArmPkg/Drivers/ArmGic/ArmGicLib.c | 9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > --
> > 2.17.1
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] 回复: edk2-stable202102 Re: [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib
2021-02-25 13:50 ` 回复: " gaoliming
@ 2021-02-26 3:23 ` Quan Nguyen
0 siblings, 0 replies; 7+ messages in thread
From: Quan Nguyen @ 2021-02-26 3:23 UTC (permalink / raw)
To: devel, gaoliming, 'Leif Lindholm', 'Ming Huang'
Cc: ardb+tianocore, guoheyi
Tested these patches in my Ampere Altra Mt.Jade server and they look good.
I hope this fix could be included in stable tag too.
Thanks,
Quan
On 25/02/2021 20:50, gaoliming via groups.io wrote:
> Leif:
> They are bug fixes. I am OK to merge them for this stable tag after they
> pass code review.
>
> Thanks
> Liming
>> -----邮件原件-----
>> 发件人: Leif Lindholm <leif@nuviainc.com>
>> 发送时间: 2021年2月25日 20:04
>> 收件人: Ming Huang <huangming@linux.alibaba.com>; gaoliming
>> <gaoliming@byosoft.com.cn>
>> 抄送: devel@edk2.groups.io; ardb+tianocore@kernel.org;
>> guoheyi@linux.alibaba.com; Quan Nguyen <quan@os.amperecomputing.com>
>> 主题: edk2-stable202102 Re: [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib
>>
>> On Thu, Feb 25, 2021 at 11:32:10 +0800, Ming Huang wrote:
>>> The first patch is prepare for the second one.
>>
>> I have raised
>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3236
>> to track this issue, and I would like to include this fix in the
>> stable tag.
>>
>>> Ming Huang (2):
>>> ArmPkg/ArmGicLib: Fix two macros issue for offset parameter
>>> ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issue
>>>
>>> ArmPkg/Drivers/ArmGic/ArmGicLib.c | 9 ++++++---
>>> 1 file changed, 6 insertions(+), 3 deletions(-)
>>>
>>> --
>>> 2.17.1
>>>
>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib
2021-02-25 3:32 [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib Ming Huang
` (2 preceding siblings ...)
2021-02-25 12:04 ` edk2-stable202102 Re: [PATCH edk2 v2 0/2] Fix two issue in ArmGicLib Leif Lindholm
@ 2021-03-01 13:20 ` Leif Lindholm
3 siblings, 0 replies; 7+ messages in thread
From: Leif Lindholm @ 2021-03-01 13:20 UTC (permalink / raw)
To: Ming Huang; +Cc: devel, ardb+tianocore, guoheyi
On Thu, Feb 25, 2021 at 11:32:10 +0800, Ming Huang wrote:
> The first patch is prepare for the second one.
>
> Ming Huang (2):
> ArmPkg/ArmGicLib: Fix two macros issue for offset parameter
> ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issue
>
> ArmPkg/Drivers/ArmGic/ArmGicLib.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
For the series:
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
I added a reference to the BZ ticket to 2/2 before pushing.
Pushed as 31eaefd4df78..0996a7883c6d.
Thanks!
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread