Commit 02b9b7e9 authored by Johannes Wiesboeck's avatar Johannes Wiesboeck Committed by Oliver Horst
Browse files

[fix] Fixed XScuGic to support arbitrary CPU IDs.

parent bed34fe9
......@@ -303,7 +303,7 @@ for (Int_Id = 32U; Int_Id<XSCUGIC_MAX_NUM_INTR_INPUTS;Int_Id=Int_Id+1){
static void DistributorInit(XScuGic *InstancePtr, u32 CpuID)
{
u32 Int_Id;
u32 LocalCpuID = CpuID;
u32 LocalCpuID = 1U << CpuID;
u32 RegValue;
#if USE_AMP==1 && (defined (ARMA9) || defined(__aarch64__))
......@@ -420,7 +420,7 @@ s32 XScuGic_CfgInitialize(XScuGic *InstancePtr,
u32 EffectiveAddr)
{
u32 Int_Id;
u32 Cpu_Id = CpuId + (u32)1;
u32 Cpu_Id = CpuId;
(void) EffectiveAddr;
Xil_AssertNonvoid(InstancePtr != NULL);
......@@ -1112,7 +1112,7 @@ void XScuGic_Stop(XScuGic *InstancePtr)
*****************************************************************************/
void XScuGic_SetCpuID(u32 CpuCoreId)
{
Xil_AssertVoid(CpuCoreId <= 1U);
Xil_AssertVoid(CpuCoreId < XPAR_CPU_NUM_INSTANCES);
CpuId = CpuCoreId;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment