software/libbase/isr.c: Move ISR handling in more logical order (RISC-V PLIC first).
This commit is contained in:
parent
38e060c354
commit
45753a3cc2
|
@ -18,24 +18,10 @@ void isr(void);
|
|||
|
||||
#ifdef CONFIG_CPU_HAS_INTERRUPT
|
||||
|
||||
/*************************************/
|
||||
/* ISR Handling for BlackParrot CPU. */
|
||||
/*************************************/
|
||||
|
||||
#if defined(__blackparrot__) /*TODO: Update this function for BP.*/
|
||||
void isr(void)
|
||||
{
|
||||
static int onetime = 0;
|
||||
if (onetime == 0) {
|
||||
printf("ISR blackparrot\n");
|
||||
printf("TRAP!!\n");
|
||||
onetime++;
|
||||
}
|
||||
}
|
||||
/***********************************************************/
|
||||
/* ISR and PLIC Initialization for RISC-V PLIC-based CPUs. */
|
||||
/***********************************************************/
|
||||
#elif defined(__riscv_plic__)
|
||||
#if defined(__riscv_plic__)
|
||||
|
||||
/* PLIC initialization. */
|
||||
void plic_init(void)
|
||||
|
@ -119,6 +105,21 @@ void isr(void)
|
|||
}
|
||||
}
|
||||
|
||||
/*************************************/
|
||||
/* ISR Handling for BlackParrot CPU. */
|
||||
/*************************************/
|
||||
|
||||
#elif defined(__blackparrot__) /*TODO: Update this function for BP.*/
|
||||
void isr(void)
|
||||
{
|
||||
static int onetime = 0;
|
||||
if (onetime == 0) {
|
||||
printf("ISR blackparrot\n");
|
||||
printf("TRAP!!\n");
|
||||
onetime++;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************/
|
||||
/* ISR Handling for Microwatt CPU. */
|
||||
/***********************************/
|
||||
|
|
Loading…
Reference in New Issue