[][src]Struct kernel::process::trapframe::TrapFrame

#[repr(C)]#[repr(align(4096))]pub struct TrapFrame {
    pub regs: [usize; 32],
    pub fregs: [usize; 32],
    pub satp: usize,
    pub sp: usize,
    pub hartid: usize,
    pub trap: usize,
    pub epc: usize,
}

Trap frame contains information for switching to and switching back from user space

Fields

regs: [usize; 32]

integer registers

fregs: [usize; 32]

floating point registers

satp: usize

kernel satp register

sp: usize

kernel sp

hartid: usize

kernel hartid

trap: usize

usertrap function address

epc: usize

sret target address

Implementations

impl TrapFrame[src]

pub const fn zero() -> Self[src]

create an initialized trapframe