ArmPkg: ArmGic: Cast CpuTarget to UINT32 for legacy GIC
The current code path supporting `PcdArmGicV3WithV2Legacy` will read 32 bit CPU target and try to program ARM_GIC_ICDIPTR. However, all these operations are 32bit wide. This change casts the CpuTarget variable to be UINT32 before calling MMIO read. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This commit is contained in:
parent
95972f966e
commit
957fcbe7a3
|
@ -374,7 +374,6 @@ GicV3DxeInitialize (
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
UINT64 CpuTarget;
|
||||
UINT64 MpId;
|
||||
|
||||
// Make sure the Interrupt Controller Protocol is not already installed in
|
||||
|
@ -406,6 +405,8 @@ GicV3DxeInitialize (
|
|||
// Targets the interrupts to the Primary Cpu
|
||||
|
||||
if (FeaturePcdGet (PcdArmGicV3WithV2Legacy)) {
|
||||
UINT32 CpuTarget;
|
||||
|
||||
// Only Primary CPU will run this code. We can identify our GIC CPU ID by
|
||||
// reading the GIC Distributor Target register. The 8 first
|
||||
// GICD_ITARGETSRn are banked to each connected CPU. These 8 registers
|
||||
|
@ -428,6 +429,8 @@ GicV3DxeInitialize (
|
|||
}
|
||||
}
|
||||
} else {
|
||||
UINT64 CpuTarget;
|
||||
|
||||
MpId = ArmReadMpidr ();
|
||||
CpuTarget = MpId &
|
||||
(ARM_CORE_AFF0 | ARM_CORE_AFF1 | ARM_CORE_AFF2 | ARM_CORE_AFF3);
|
||||
|
|
Loading…
Reference in New Issue