diff options
author | Quan Nguyen <quan@os.amperecomputing.com> | 2020-12-16 20:25:21 +0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-12-18 18:09:18 +0000 |
commit | 1159fc3230aee02acc60aa245ce047217fd8b87e (patch) | |
tree | a9136b0704428931057854719f1ec182ac885fb0 /ArmPkg | |
parent | 0d49b82e4fa5d7eaeb5f73dfb93a932893832437 (diff) | |
download | edk2-1159fc3230aee02acc60aa245ce047217fd8b87e.tar.gz edk2-1159fc3230aee02acc60aa245ce047217fd8b87e.tar.bz2 edk2-1159fc3230aee02acc60aa245ce047217fd8b87e.zip |
ArmPkg/ArmGicV3Dxe: Use ArmGicSetInterruptPriority() to set priority
When Affinity Routing enabled, the GICR_IPRIORITYR<n> is used to set
priority for SGIs and PPIs instead of GICD_IPRIORITYR<n>.
This patch calls ArmGicSetInterruptPriority() helper function when
setting priority to handle the difference.
Cc: Leif Lindholm <leif@nuviainc.com>
Signed-off-by: Quan Nguyen <quan@os.amperecomputing.com>
Reviewed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'ArmPkg')
-rw-r--r-- | ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c index d7da1f198d..16bccbff41 100644 --- a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c +++ b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c @@ -374,8 +374,6 @@ GicV3DxeInitialize ( {
EFI_STATUS Status;
UINTN Index;
- UINT32 RegOffset;
- UINTN RegShift;
UINT64 CpuTarget;
UINT64 MpId;
@@ -397,12 +395,11 @@ GicV3DxeInitialize ( GicV3DisableInterruptSource (&gHardwareInterruptV3Protocol, Index);
// Set Priority
- RegOffset = Index / 4;
- RegShift = (Index % 4) * 8;
- MmioAndThenOr32 (
- mGicDistributorBase + ARM_GIC_ICDIPR + (4 * RegOffset),
- ~(0xff << RegShift),
- ARM_GIC_DEFAULT_PRIORITY << RegShift
+ ArmGicSetInterruptPriority (
+ mGicDistributorBase,
+ mGicRedistributorsBase,
+ Index,
+ ARM_GIC_DEFAULT_PRIORITY
);
}
|