TianoCore EDK2 master
Loading...
Searching...
No Matches
CpuExceptionHandlerLib.h File Reference

Go to the source code of this file.

Data Structures

struct  SMODE_TRAP_REGISTERS
 

Macros

#define SMODE_TRAP_REGS_zero   0
 
#define SMODE_TRAP_REGS_ra   1
 
#define SMODE_TRAP_REGS_sp   2
 
#define SMODE_TRAP_REGS_gp   3
 
#define SMODE_TRAP_REGS_tp   4
 
#define SMODE_TRAP_REGS_t0   5
 
#define SMODE_TRAP_REGS_t1   6
 
#define SMODE_TRAP_REGS_t2   7
 
#define SMODE_TRAP_REGS_s0   8
 
#define SMODE_TRAP_REGS_s1   9
 
#define SMODE_TRAP_REGS_a0   10
 
#define SMODE_TRAP_REGS_a1   11
 
#define SMODE_TRAP_REGS_a2   12
 
#define SMODE_TRAP_REGS_a3   13
 
#define SMODE_TRAP_REGS_a4   14
 
#define SMODE_TRAP_REGS_a5   15
 
#define SMODE_TRAP_REGS_a6   16
 
#define SMODE_TRAP_REGS_a7   17
 
#define SMODE_TRAP_REGS_s2   18
 
#define SMODE_TRAP_REGS_s3   19
 
#define SMODE_TRAP_REGS_s4   20
 
#define SMODE_TRAP_REGS_s5   21
 
#define SMODE_TRAP_REGS_s6   22
 
#define SMODE_TRAP_REGS_s7   23
 
#define SMODE_TRAP_REGS_s8   24
 
#define SMODE_TRAP_REGS_s9   25
 
#define SMODE_TRAP_REGS_s10   26
 
#define SMODE_TRAP_REGS_s11   27
 
#define SMODE_TRAP_REGS_t3   28
 
#define SMODE_TRAP_REGS_t4   29
 
#define SMODE_TRAP_REGS_t5   30
 
#define SMODE_TRAP_REGS_t6   31
 
#define SMODE_TRAP_REGS_sepc   32
 
#define SMODE_TRAP_REGS_sstatus   33
 
#define SMODE_TRAP_REGS_stval   34
 
#define SMODE_TRAP_REGS_last   35
 
#define SMODE_TRAP_REGS_OFFSET(x)   ((SMODE_TRAP_REGS_##x) * __SIZEOF_POINTER__)
 
#define SMODE_TRAP_REGS_SIZE   SMODE_TRAP_REGS_OFFSET(last)
 

Functions

VOID SupervisorModeTrap (VOID)
 

Detailed Description

RISC-V Exception Handler library definition file.

Copyright (c) 2019-2022, Hewlett Packard Enterprise Development LP. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file CpuExceptionHandlerLib.h.

Macro Definition Documentation

◆ SMODE_TRAP_REGS_a0

#define SMODE_TRAP_REGS_a0   10

Definition at line 38 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_a1

#define SMODE_TRAP_REGS_a1   11

Definition at line 39 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_a2

#define SMODE_TRAP_REGS_a2   12

Definition at line 40 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_a3

#define SMODE_TRAP_REGS_a3   13

Definition at line 41 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_a4

#define SMODE_TRAP_REGS_a4   14

Definition at line 42 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_a5

#define SMODE_TRAP_REGS_a5   15

Definition at line 43 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_a6

#define SMODE_TRAP_REGS_a6   16

Definition at line 44 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_a7

#define SMODE_TRAP_REGS_a7   17

Definition at line 45 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_gp

#define SMODE_TRAP_REGS_gp   3

Definition at line 31 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_last

#define SMODE_TRAP_REGS_last   35

Definition at line 63 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_OFFSET

#define SMODE_TRAP_REGS_OFFSET (   x)    ((SMODE_TRAP_REGS_##x) * __SIZEOF_POINTER__)

Definition at line 65 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_ra

#define SMODE_TRAP_REGS_ra   1

Definition at line 29 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s0

#define SMODE_TRAP_REGS_s0   8

Definition at line 36 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s1

#define SMODE_TRAP_REGS_s1   9

Definition at line 37 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s10

#define SMODE_TRAP_REGS_s10   26

Definition at line 54 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s11

#define SMODE_TRAP_REGS_s11   27

Definition at line 55 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s2

#define SMODE_TRAP_REGS_s2   18

Definition at line 46 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s3

#define SMODE_TRAP_REGS_s3   19

Definition at line 47 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s4

#define SMODE_TRAP_REGS_s4   20

Definition at line 48 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s5

#define SMODE_TRAP_REGS_s5   21

Definition at line 49 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s6

#define SMODE_TRAP_REGS_s6   22

Definition at line 50 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s7

#define SMODE_TRAP_REGS_s7   23

Definition at line 51 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s8

#define SMODE_TRAP_REGS_s8   24

Definition at line 52 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_s9

#define SMODE_TRAP_REGS_s9   25

Definition at line 53 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_sepc

#define SMODE_TRAP_REGS_sepc   32

Definition at line 60 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_SIZE

#define SMODE_TRAP_REGS_SIZE   SMODE_TRAP_REGS_OFFSET(last)

Definition at line 66 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_sp

#define SMODE_TRAP_REGS_sp   2

Definition at line 30 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_sstatus

#define SMODE_TRAP_REGS_sstatus   33

Definition at line 61 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_stval

#define SMODE_TRAP_REGS_stval   34

Definition at line 62 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_t0

#define SMODE_TRAP_REGS_t0   5

Definition at line 33 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_t1

#define SMODE_TRAP_REGS_t1   6

Definition at line 34 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_t2

#define SMODE_TRAP_REGS_t2   7

Definition at line 35 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_t3

#define SMODE_TRAP_REGS_t3   28

Definition at line 56 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_t4

#define SMODE_TRAP_REGS_t4   29

Definition at line 57 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_t5

#define SMODE_TRAP_REGS_t5   30

Definition at line 58 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_t6

#define SMODE_TRAP_REGS_t6   31

Definition at line 59 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_tp

#define SMODE_TRAP_REGS_tp   4

Definition at line 32 of file CpuExceptionHandlerLib.h.

◆ SMODE_TRAP_REGS_zero

#define SMODE_TRAP_REGS_zero   0

Definition at line 28 of file CpuExceptionHandlerLib.h.

Function Documentation

◆ SupervisorModeTrap()

VOID SupervisorModeTrap ( VOID  )

Trap Handler for S-mode