mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/arm7_common: uncrustify vectors.c
This commit is contained in:
parent
97a81f7461
commit
bca6f44edc
@ -34,34 +34,34 @@ void isr_fio(void)
|
|||||||
{
|
{
|
||||||
LOG_ERROR("Kernel Panic,\nEarly FIQ call\n");
|
LOG_ERROR("Kernel Panic,\nEarly FIQ call\n");
|
||||||
|
|
||||||
while (1) {};
|
while (1) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
void isr_swi(void)
|
void isr_swi(void)
|
||||||
{
|
{
|
||||||
LOG_ERROR("Kernel Panic,\nEarly SWI call\n");
|
LOG_ERROR("Kernel Panic,\nEarly SWI call\n");
|
||||||
|
|
||||||
while (1) {};
|
while (1) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
void abtorigin(const char *vector, unsigned long *lnk_ptr1)
|
void abtorigin(const char *vector, unsigned long *lnk_ptr1)
|
||||||
{
|
{
|
||||||
register unsigned long *lnk_ptr2;
|
register unsigned long *lnk_ptr2;
|
||||||
register unsigned long *sp;
|
register unsigned long *sp;
|
||||||
register unsigned int cpsr, spsr;
|
register unsigned int cpsr, spsr;
|
||||||
|
|
||||||
__asm__ __volatile__("mrs %0, cpsr" : "=r"(cpsr)); // copy current mode
|
__asm__ __volatile__ ("mrs %0, cpsr" : "=r" (cpsr)); // copy current mode
|
||||||
__asm__ __volatile__("mrs %0, spsr" : "=r"(spsr)); // copy dabt generating mode
|
__asm__ __volatile__ ("mrs %0, spsr" : "=r" (spsr)); // copy dabt generating mode
|
||||||
__asm__ __volatile__("msr cpsr_c, %0" :: "r"(spsr)); // switch to dabt generating mode
|
__asm__ __volatile__ ("msr cpsr_c, %0" : : "r" (spsr)); // switch to dabt generating mode
|
||||||
__asm__ __volatile__("mov %0, lr" : "=r"(lnk_ptr2)); // copy lr
|
__asm__ __volatile__ ("mov %0, lr" : "=r" (lnk_ptr2)); // copy lr
|
||||||
__asm__ __volatile__("mov %0, sp" : "=r"(sp)); // copy sp
|
__asm__ __volatile__ ("mov %0, sp" : "=r" (sp)); // copy sp
|
||||||
__asm__ __volatile__("msr cpsr_c, %0" :: "r"(cpsr)); // switch back to abt mode
|
__asm__ __volatile__ ("msr cpsr_c, %0" : : "r" (cpsr)); // switch back to abt mode
|
||||||
|
|
||||||
LOG_ERROR("#!%s abort at %p (0x%08lX) originating from %p (0x%08lX) in mode 0x%X\n",
|
LOG_ERROR("#!%s abort at %p (0x%08lX) originating from %p (0x%08lX) in mode 0x%X\n",
|
||||||
vector, (void *)lnk_ptr1, *(lnk_ptr1), (void *)lnk_ptr2, *(lnk_ptr2), spsr
|
vector, (void *)lnk_ptr1, *(lnk_ptr1), (void *)lnk_ptr2, *(lnk_ptr2), spsr
|
||||||
);
|
);
|
||||||
|
|
||||||
while (1) {};
|
while (1) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
void isr_undef(void)
|
void isr_undef(void)
|
||||||
@ -69,14 +69,15 @@ void isr_undef(void)
|
|||||||
/* cppcheck-suppress variableScope
|
/* cppcheck-suppress variableScope
|
||||||
* (reason: used within __asm__ which cppcheck doesn't pick up) */
|
* (reason: used within __asm__ which cppcheck doesn't pick up) */
|
||||||
register unsigned long *lnk_ptr;
|
register unsigned long *lnk_ptr;
|
||||||
__asm__ __volatile__("sub %0, lr, #8" : "=r"(lnk_ptr)); // get aborting instruction
|
|
||||||
|
__asm__ __volatile__ ("sub %0, lr, #8" : "=r" (lnk_ptr)); // get aborting instruction
|
||||||
|
|
||||||
if (arm_abortflag == 0) {
|
if (arm_abortflag == 0) {
|
||||||
arm_abortflag = 1; // remember state (if printing should fail again)
|
arm_abortflag = 1; // remember state (if printing should fail again)
|
||||||
abtorigin("undef", lnk_ptr);
|
abtorigin("undef", lnk_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (1) {};
|
while (1) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
void isr_pabt(void)
|
void isr_pabt(void)
|
||||||
@ -84,14 +85,15 @@ void isr_pabt(void)
|
|||||||
/* cppcheck-suppress variableScope
|
/* cppcheck-suppress variableScope
|
||||||
* (reason: used within __asm__ which cppcheck doesn't pick up) */
|
* (reason: used within __asm__ which cppcheck doesn't pick up) */
|
||||||
register unsigned long *lnk_ptr;
|
register unsigned long *lnk_ptr;
|
||||||
__asm__ __volatile__("sub %0, lr, #8" : "=r"(lnk_ptr)); // get aborting instruction
|
|
||||||
|
__asm__ __volatile__ ("sub %0, lr, #8" : "=r" (lnk_ptr)); // get aborting instruction
|
||||||
|
|
||||||
if (arm_abortflag == 0) {
|
if (arm_abortflag == 0) {
|
||||||
arm_abortflag = 1; // remember state (if printing should fail again)
|
arm_abortflag = 1; // remember state (if printing should fail again)
|
||||||
abtorigin("pabt", lnk_ptr);
|
abtorigin("pabt", lnk_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (1) {};
|
while (1) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
void isr_dabt(void)
|
void isr_dabt(void)
|
||||||
@ -99,12 +101,13 @@ void isr_dabt(void)
|
|||||||
/* cppcheck-suppress variableScope
|
/* cppcheck-suppress variableScope
|
||||||
* (reason: used within __asm__ which cppcheck doesn't pick up) */
|
* (reason: used within __asm__ which cppcheck doesn't pick up) */
|
||||||
register unsigned long *lnk_ptr;
|
register unsigned long *lnk_ptr;
|
||||||
__asm__ __volatile__("sub %0, lr, #8" : "=r"(lnk_ptr)); // get aborting instruction
|
|
||||||
|
__asm__ __volatile__ ("sub %0, lr, #8" : "=r" (lnk_ptr)); // get aborting instruction
|
||||||
|
|
||||||
if (arm_abortflag == 0) {
|
if (arm_abortflag == 0) {
|
||||||
arm_abortflag = 1; // remember state (if printing should fail again)
|
arm_abortflag = 1; // remember state (if printing should fail again)
|
||||||
abtorigin("data", lnk_ptr);
|
abtorigin("data", lnk_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (1) {};
|
while (1) {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user