coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
exception.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 
3 #ifndef _ARCH_EXCEPTION_H
4 #define _ARCH_EXCEPTION_H
5 
6 #include <arch/transition.h>
7 
8 /* Initialize the exception handling on the current CPU. */
9 void exception_init(void);
10 
11 /* Initialize VBAR and SP_EL3. */
13 
14 /*
15  * Order matters for handling return values. The larger the value the higher
16  * the precedence.
17  */
18 enum {
23 };
24 
26  int (*handler)(struct exc_state *state, uint64_t vector_id);
28 };
29 
30 /*
31  * Register a handler provided with the associated vector id. Returns 0 on
32  * success, < 0 on error. Note that registration is not thread/interrupt safe.
33  */
35 
36 /*
37  * Unregister a handler from the vector id. Return 0 on success, < 0 on error.
38  * Note that the unregistration is not thread/interrupt safe.
39  */
41 
42 #endif
void exception_init_asm(void *exception_stack_end)
int exception_handler_register(uint64_t vid, struct exception_handler *h)
Definition: exception.c:68
@ EXC_RET_ABORT
Definition: exception.h:20
@ EXC_RET_IGNORED
Definition: exception.h:19
@ EXC_RET_HANDLED
Definition: exception.h:21
@ EXC_RET_HANDLED_DUMP_STATE
Definition: exception.h:22
int exception_handler_unregister(uint64_t vid, struct exception_handler *h)
Definition: exception.c:80
void * exception_stack_end
void exception_init(void)
Definition: exception.c:120
uint16_t vid
Definition: tis.c:15
state
Definition: raminit.c:1787
unsigned long long uint64_t
Definition: stdint.h:17
int(* handler)(struct exc_state *state, uint64_t vector_id)
Definition: exception.h:26
struct exception_handler * next
Definition: exception.h:27