hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * (C) Copyright 2008 - 2013 Tensilica Inc.
 * (C) Copyright 2014 - 2016 Cadence Design Systems Inc.
 *
 * SPDX-License-Identifier:    GPL-2.0+
 */
 
/*
 * Exception handling.
 *  We currently don't handle any exception and force a reset.
 *  (Note that alloca is a special case and handled in start.S)
 */
 
#include <common.h>
#include <command.h>
#include <asm/string.h>
#include <asm/regs.h>
 
typedef void (*handler_t)(struct pt_regs *);
 
void unhandled_exception(struct pt_regs *regs)
{
   printf("Unhandled Exception: EXCCAUSE = %ld, EXCVADDR = %lx, pc = %lx\n",
          regs->exccause, regs->excvaddr, regs->pc);
   panic("*** PANIC\n");
}
 
handler_t exc_table[EXCCAUSE_LAST] = {
   [0 ... EXCCAUSE_LAST-1]            = unhandled_exception,
};
 
int interrupt_init(void)
{
   return 0;
}
 
void enable_interrupts(void)
{
}
 
int disable_interrupts(void)
{
   return 0;
}