From 396886d88ed7634c81e35de61a87cd386f44a463 Mon Sep 17 00:00:00 2001 From: Kinjal Pravinbhai Patel Date: Mon, 21 Jul 2014 17:42:49 +0530 Subject: [PATCH] BSP: change for IAR compiler This patch make changes for IAR compiler in default handler routine for data abort and prefetch abort. Also it contains one modification in xil_cache.c for correct register in Xil_DCacheInvalidateRange routine for IAR compiler. Signed-off-by: Kinjal Pravinbhai Patel Acked-by: Anirudha Sarangi --- lib/bsp/standalone/src/cortexa9/xil_cache.c | 2 +- lib/bsp/standalone/src/cortexa9/xil_exception.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/bsp/standalone/src/cortexa9/xil_cache.c b/lib/bsp/standalone/src/cortexa9/xil_cache.c index cac40dcb..7428550b 100755 --- a/lib/bsp/standalone/src/cortexa9/xil_cache.c +++ b/lib/bsp/standalone/src/cortexa9/xil_cache.c @@ -355,7 +355,7 @@ void Xil_DCacheInvalidateRange(unsigned int adr, unsigned len) XREG_CP15_INVAL_DC_LINE_MVA_POC :: "r" (tempadr)); #elif defined (__ICCARM__) __asm volatile ("mcr " \ - XREG_CP15_INVAL_IC_LINE_MVA_POU :: "r" (tempadr)); + XREG_CP15_INVAL_DC_LINE_MVA_POU :: "r" (tempadr)); #else { volatile register unsigned int Reg __asm(XREG_CP15_INVAL_DC_LINE_MVA_POC); diff --git a/lib/bsp/standalone/src/cortexa9/xil_exception.c b/lib/bsp/standalone/src/cortexa9/xil_exception.c index 09e6b44a..ce5fd931 100755 --- a/lib/bsp/standalone/src/cortexa9/xil_exception.c +++ b/lib/bsp/standalone/src/cortexa9/xil_exception.c @@ -115,11 +115,11 @@ DieLoop: goto DieLoop; /****************************************************************************/ /** * The function is a common API used to initialize exception handlers across all -* processors supported. For ARM CortexA9, the exception handlers are being +* processors supported. For ARM CortexA9, the exception handlers are being * initialized statically and hence this function does not do anything. -* However, it is still present to avoid any compilation issues in case an -* application uses this API and also to take care of backward compatibility -* issues (in earlier versions of BSPs, this API was being used to initialize +* However, it is still present to avoid any compilation issues in case an +* application uses this API and also to take care of backward compatibility +* issues (in earlier versions of BSPs, this API was being used to initialize * exception handlers). * * @param None. @@ -203,6 +203,8 @@ void Xil_DataAbortHandler(void *CallBackRef){ u32 FaultStatus; #ifdef __GNUC__ FaultStatus = mfcp(XREG_CP15_DATA_FAULT_STATUS); + #elif defined (__ICCARM__) + #else { volatile register unsigned int Reg __asm(XREG_CP15_DATA_FAULT_STATUS); FaultStatus = Reg; } @@ -228,6 +230,8 @@ void Xil_PrefetchAbortHandler(void *CallBackRef){ u32 FaultStatus; #ifdef __GNUC__ FaultStatus = mfcp(XREG_CP15_INST_FAULT_STATUS); + #elif defined (__ICCARM__) + #else { volatile register unsigned int Reg __asm(XREG_CP15_INST_FAULT_STATUS); FaultStatus = Reg; }