21enum L4_riscv_exc_cause
23 L4_riscv_exc_inst_misaligned = 0,
24 L4_riscv_exc_inst_access = 1,
25 L4_riscv_exc_illegal_inst = 2,
26 L4_riscv_exc_breakpoint = 3,
27 L4_riscv_exc_load_access = 5,
28 L4_riscv_exc_store_access = 7,
29 L4_riscv_exc_ecall = 8,
30 L4_riscv_exc_hcall = 10,
31 L4_riscv_exc_inst_page_fault = 12,
32 L4_riscv_exc_load_page_fault = 13,
33 L4_riscv_exc_store_page_fault = 15,
34 L4_riscv_exc_guest_inst_page_fault = 20,
35 L4_riscv_exc_guest_load_page_fault = 21,
36 L4_riscv_exc_virtual_inst = 22,
37 L4_riscv_exc_guest_store_page_fault = 23,
39 L4_riscv_ec_l4_ipc_upcall = 0x18,
40 L4_riscv_ec_l4_exregs_exception = 0x19,
41 L4_riscv_ec_l4_debug_ipi = 0x1a,
42 L4_riscv_ec_l4_alien_after_syscall = 0x1b,
64 l4_umword_t s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;
77#define L4_UTCB_EXCEPTION_REGS_SIZE (sizeof(l4_exc_regs_t) / sizeof(l4_umword_t))
78#define L4_UTCB_GENERIC_DATA_SIZE 63
79#define L4_UTCB_GENERIC_BUFFERS_SIZE 58
81#define L4_UTCB_MSG_REGS_OFFSET 0
82#define L4_UTCB_BUF_REGS_OFFSET (64 * sizeof(l4_umword_t))
83#define L4_UTCB_THREAD_REGS_OFFSET (123 * sizeof(l4_umword_t))
85#define L4_UTCB_INHERIT_FPU (1UL << 24)
87#define L4_UTCB_OFFSET (128 * sizeof(l4_umword_t))
98 __asm__ (
"mv %0, tp" :
"=r" (tp));
99 return *(
l4_utcb_t **)(tp - 3 *
sizeof(
void*));
121 case L4_riscv_exc_inst_access:
122 case L4_riscv_exc_load_access:
123 case L4_riscv_exc_store_access:
124 case L4_riscv_exc_inst_page_fault:
125 case L4_riscv_exc_load_page_fault:
126 case L4_riscv_exc_store_page_fault:
135 return u->tval | (u->cause == L4_riscv_exc_store_page_fault ? 2 : 0);
unsigned long l4_umword_t
Unsigned machine word.
unsigned long l4_addr_t
Address type.
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
l4_addr_t l4_utcb_exc_pfa(l4_exc_regs_t const *u) L4_NOTHROW
Function to get the L4 style page fault address out of an exception.
int l4_utcb_exc_is_ex_regs_exception(l4_exc_regs_t const *u) L4_NOTHROW
Check whether an exception IPC was triggered via l4_thread_ex_regs().
int l4_utcb_exc_is_pf(l4_exc_regs_t const *u) L4_NOTHROW
Check whether an exception IPC is a page fault.
l4_umword_t l4_utcb_exc_pc(l4_exc_regs_t const *u) L4_NOTHROW
Access function to get the program counter of the exception state.
l4_umword_t l4_utcb_exc_typeval(l4_exc_regs_t const *u) L4_NOTHROW
Get the value out of an exception UTCB that describes the type of exception.
void l4_utcb_exc_pc_set(l4_exc_regs_t *u, l4_addr_t pc) L4_NOTHROW
Set the program counter register in the exception state.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
#define L4_INLINE
L4 Inline function attribute.
Common L4 ABI Data Types.
UTCB structure for exceptions.
l4_umword_t r[13]
registers
l4_umword_t sp
stack pointer
l4_umword_t pfa
page fault address
l4_umword_t ip
instruction pointer