syscalls: pass cpu state to handler

This commit is contained in:
Samuel Tebbs 2022-05-02 02:13:18 +01:00 committed by Sam Tebbs
parent 6eb0037694
commit bdcb6f4a79
4 changed files with 84 additions and 22 deletions

View file

@ -54,6 +54,31 @@ pub const CpuState = struct {
eflags: u32,
user_esp: u32,
user_ss: u32,
pub fn empty() CpuState {
return .{
.ss = undefined,
.gs = undefined,
.fs = undefined,
.es = undefined,
.ds = undefined,
.edi = undefined,
.esi = undefined,
.ebp = undefined,
.esp = undefined,
.ebx = undefined,
.edx = undefined,
.ecx = undefined,
.eax = undefined,
.int_num = undefined,
.error_code = undefined,
.eip = undefined,
.cs = undefined,
.eflags = undefined,
.user_esp = undefined,
.user_ss = undefined,
};
}
};
pub const VmmPayload = switch (builtin.cpu.arch) {