blob: c43cdc5ff3d003d1d4b06ac41edaff6c4d20d05d [file] [log] [blame]
#include <common.h>
#include <asm/uboot-arc.h>
#if defined(CONFIG_BOOTMQX)
int init_mqx_context(void)
{
unsigned long addr = 0;
enable_interrupts();
/* indeed only 10 bits of address should be 0 but we already
* have function for rounding */
addr = round_page((unsigned)&__bss_end + CONFIG_SYS_MALLOC_LEN);
write_new_aux_reg(ARC_REG_INT_VEC_BASE, addr);
printf("interrupt vector base address is set to the: 0x%x\n", (unsigned)addr);
return 0;
}
int cleanup_mqx_context(void)
{
unsigned long addr = 0;
disable_interrupts();
addr = (unsigned)&__vector_start;
write_new_aux_reg(ARC_REG_INT_VEC_BASE, addr);
printf("interrupt vector base address is restored to the: 0x%x\n", addr);
return 0;
}
#endif