AMP
adamTaylor
#migrated

Zybo > Chronicles blog 48 > AMPの使用 > 6. CPU1の割込み設定

More than 1 year has passed since last update.

MicroZed Chronicles リスト http://adiuvoengineering.com/?page_id=285

@ Adam Taylor blog

https://forums.xilinx.com/t5/Xcell-Daily-Blog/Adam-Taylor-s-MicroZed-Chronicles-Part-48-Bare-Metal-AMP/ba-p/515105

CPU0でCPU1を起動するが、CPU1の割込みを使うためにCPU0のコードにてGICを設定するようだ


However, we plan to use the Core 1’s interrupt controller so we must first configure the GIC (General Interrupt Controller) using the code below as part of the Core 0 application:


http://qiita.com/7of9/items/3a68aaa9ef800fa480a2

のコードの SetupIntrSystem()は以下

static int SetupIntrSystem(INTC *IntcInstancePtr)

{
int Status;

XScuGic_Config *IntcConfig;
IntcConfig = XScuGic_LookupConfig(INTC_DEVICE_ID);
if (NULL == IntcConfig) {
return XST_FAILURE;
}
Status = XScuGic_CfgInitialize(IntcInstancePtr, IntcConfig,
IntcConfig->CpuBaseAddress);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
Xil_ExceptionInit();
Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
(Xil_ExceptionHandler)INTC_HANDLER,
IntcInstancePtr);
Xil_ExceptionEnable();

return XST_SUCCESS;
}