// Only the primary core should set the Non Secure bit to the SPIs (Shared Peripheral Interrupt).\r
if (IS_PRIMARY_CORE(MpId)) {\r
// Ensure all GIC interrupts are Non-Secure\r
- for (Index = 0; Index < (PcdGet32(PcdGicNumInterrupts) / 32); Index++) {\r
+ for (Index = 0; Index < (ArmGicGetMaxNumInterrupts (GicDistributorBase) / 32); Index++) {\r
MmioWrite32 (GicDistributorBase + ARM_GIC_ICDISR + (Index * 4), 0xffffffff);\r
}\r
} else {\r
UINT32 InterruptStatus;\r
\r
// We must not have more interrupts defined by the mask than the number of available interrupts\r
- ASSERT(GicSecureInterruptMaskSize <= (PcdGet32(PcdGicNumInterrupts) / 32));\r
+ ASSERT(GicSecureInterruptMaskSize <= (ArmGicGetMaxNumInterrupts (GicDistributorBase) / 32));\r
\r
// Set all the interrupts defined by the mask as Secure\r
for (Index = 0; Index < GicSecureInterruptMaskSize; Index++) {\r