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 <
stdint.h
>
7
8
typedef
struct
{
9
uintptr_t
gpr[32];
10
uintptr_t
status
;
11
uintptr_t
epc
;
12
uintptr_t
badvaddr
;
13
uintptr_t
cause
;
14
uintptr_t
insn
;
15
}
trapframe
;
16
17
typedef
uint32_t
insn_t
;
18
19
typedef
struct
{
20
uintptr_t
error
;
21
insn_t
insn
;
22
}
insn_fetch_t
;
23
24
static
inline
void
exception_init
(
void
)
25
{
26
}
27
28
void
redirect_trap
(
void
);
29
void
trap_handler
(
trapframe
*tf);
30
void
handle_supervisor_call
(
trapframe
*tf);
31
void
handle_misaligned
(
trapframe
*tf);
32
33
#endif
exception_init
void exception_init(void)
Definition:
exception.c:120
handle_supervisor_call
void handle_supervisor_call(trapframe *tf)
trap_handler
void trap_handler(trapframe *tf)
Definition:
trap_handler.c:111
handle_misaligned
void handle_misaligned(trapframe *tf)
Definition:
misaligned.c:159
redirect_trap
void redirect_trap(void)
Definition:
trap_handler.c:151
insn_t
uint32_t insn_t
Definition:
exception.h:17
stdint.h
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
uintptr_t
unsigned long uintptr_t
Definition:
stdint.h:21
insn_fetch_t
Definition:
exception.h:19
insn_fetch_t::insn
insn_t insn
Definition:
exception.h:21
insn_fetch_t::error
uintptr_t error
Definition:
exception.h:20
trapframe
Definition:
exception.h:8
trapframe::insn
uintptr_t insn
Definition:
exception.h:14
trapframe::badvaddr
uintptr_t badvaddr
Definition:
exception.h:12
trapframe::cause
uintptr_t cause
Definition:
exception.h:13
trapframe::status
uintptr_t status
Definition:
exception.h:10
trapframe::epc
uintptr_t epc
Definition:
exception.h:11
src
arch
riscv
include
arch
exception.h
Generated by
1.9.1