blob: 9b0294b19aa77fdc6e336528f15d6a913f140895 [file] [log] [blame]
#include "com_type.h"
#include "debug.h"
#include "lgpl_printf.h"
#define UNUSED(var) do { (void)(var); } while(0)
typedef unsigned int uint32_t;
struct pt_regs{
unsigned long elr;
unsigned long regs[31];
};
void EnableIRQ(void)
{
__asm__ __volatile__(
"MSR DAIFCLR, #2" "\n\t"
:
:
:"cc"
);
}
uint32_t getMPid(void)
{
unsigned int val;
asm volatile("mrs %0, MPIDR_EL1" : "=r" (val) : : "cc");
val &= 0xf;
return val;
}
void do_sync(struct pt_regs *pt_regs, unsigned int esr)
{
UNUSED(pt_regs);
UNUSED(esr);
lgpl_printf("\"Synchronous Abort\" handler, esr 0x%08x\n", esr);
while(1);
}