[edk2-devel] [PATCH v2 0/2] ArmPkg/ArmGicV3Dxe: fix writes to GICD_IPRIORITYR<n> when ARE enable

Quan Nguyen via groups.io posted 2 patches 3 years, 4 months ago
Failed in applying to current master (apply log)
ArmPkg/Drivers/ArmGic/ArmGicLib.c         | 44 +++++++++++++++++++++++
ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c | 13 +++----
ArmPkg/Include/Library/ArmGicLib.h        |  9 +++++
3 files changed, 58 insertions(+), 8 deletions(-)
[edk2-devel] [PATCH v2 0/2] ArmPkg/ArmGicV3Dxe: fix writes to GICD_IPRIORITYR<n> when ARE enable
Posted by Quan Nguyen via groups.io 3 years, 4 months ago
According to ARM IHI 0069F, section 11.9.18 GICD_IPRIORITYR<n>,
Interrupt Priority Registers, n = 0 - 254, when affinity routing is
enabled for the Security state of an interrupt, GICR_IPRIORITYR<n> is
used instead of GICD_IPRIORITYR<n> where n = 0 to 7 (that is, for SGIs
and PPIs).

Current ArmGicV3Dxe tries to initialize all GICD_IPRIORITYR<n> to
a default state, so it should write to GICR_IPRIORITYR<n> registers
when Affinity Routing is Enabled.

v2:
- Update Ard's comment on stack variable and FeaturePcdGet [Ard]
- Introduce new helper function to handle register discrepancy [Quan]
- Set priority using new helper function [Quan]

Quan Nguyen (2):
  ArmPkg/ArmGicLib: Add ArmGicSetInterruptPriority() helper function
  ArmPkg/ArmGicV3Dxe: Use ArmGicSetInterruptPriority() to set priority

 ArmPkg/Drivers/ArmGic/ArmGicLib.c         | 44 +++++++++++++++++++++++
 ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c | 13 +++----
 ArmPkg/Include/Library/ArmGicLib.h        |  9 +++++
 3 files changed, 58 insertions(+), 8 deletions(-)

-- 
2.28.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68962): https://edk2.groups.io/g/devel/message/68962
Mute This Topic: https://groups.io/mt/79000093/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH v2 0/2] ArmPkg/ArmGicV3Dxe: fix writes to GICD_IPRIORITYR<n> when ARE enable
Posted by Ard Biesheuvel 3 years, 4 months ago
On 12/16/20 2:25 PM, Quan Nguyen wrote:
> According to ARM IHI 0069F, section 11.9.18 GICD_IPRIORITYR<n>,
> Interrupt Priority Registers, n = 0 - 254, when affinity routing is
> enabled for the Security state of an interrupt, GICR_IPRIORITYR<n> is
> used instead of GICD_IPRIORITYR<n> where n = 0 to 7 (that is, for SGIs
> and PPIs).
> 
> Current ArmGicV3Dxe tries to initialize all GICD_IPRIORITYR<n> to
> a default state, so it should write to GICR_IPRIORITYR<n> registers
> when Affinity Routing is Enabled.
> 
> v2:
> - Update Ard's comment on stack variable and FeaturePcdGet [Ard]
> - Introduce new helper function to handle register discrepancy [Quan]
> - Set priority using new helper function [Quan]
> 
> Quan Nguyen (2):
>   ArmPkg/ArmGicLib: Add ArmGicSetInterruptPriority() helper function
>   ArmPkg/ArmGicV3Dxe: Use ArmGicSetInterruptPriority() to set priority
> 

Reviewed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>

Merged as #1245

Thanks,

>  ArmPkg/Drivers/ArmGic/ArmGicLib.c         | 44 +++++++++++++++++++++++
>  ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c | 13 +++----
>  ArmPkg/Include/Library/ArmGicLib.h        |  9 +++++
>  3 files changed, 58 insertions(+), 8 deletions(-)
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69215): https://edk2.groups.io/g/devel/message/69215
Mute This Topic: https://groups.io/mt/79000093/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-