interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / libc / src / unix / bsd / netbsdlike / openbsd / x86_64.rs

65 lines · 1737 bytes Raw Blame History
1use crate::prelude::*;
2use crate::PT_FIRSTMACH;
3
4pub type ucontext_t = sigcontext;
5
6s! {
7 pub struct sigcontext {
8 pub sc_rdi: c_long,
9 pub sc_rsi: c_long,
10 pub sc_rdx: c_long,
11 pub sc_rcx: c_long,
12 pub sc_r8: c_long,
13 pub sc_r9: c_long,
14 pub sc_r10: c_long,
15 pub sc_r11: c_long,
16 pub sc_r12: c_long,
17 pub sc_r13: c_long,
18 pub sc_r14: c_long,
19 pub sc_r15: c_long,
20 pub sc_rbp: c_long,
21 pub sc_rbx: c_long,
22 pub sc_rax: c_long,
23 pub sc_gs: c_long,
24 pub sc_fs: c_long,
25 pub sc_es: c_long,
26 pub sc_ds: c_long,
27 pub sc_trapno: c_long,
28 pub sc_err: c_long,
29 pub sc_rip: c_long,
30 pub sc_cs: c_long,
31 pub sc_rflags: c_long,
32 pub sc_rsp: c_long,
33 pub sc_ss: c_long,
34 pub sc_fpstate: *mut fxsave64,
35 __sc_unused: Padding<c_int>,
36 pub sc_mask: c_int,
37 pub sc_cookie: c_long,
38 }
39
40 #[repr(packed)]
41 pub struct fxsave64 {
42 pub fx_fcw: u16,
43 pub fx_fsw: u16,
44 pub fx_ftw: u8,
45 __fx_unused1: Padding<u8>,
46 pub fx_fop: u16,
47 pub fx_rip: u64,
48 pub fx_rdp: u64,
49 pub fx_mxcsr: u32,
50 pub fx_mxcsr_mask: u32,
51 pub fx_st: [[u64; 2]; 8],
52 pub fx_xmm: [[u64; 2]; 16],
53 __fx_unused3: Padding<[u8; 96]>,
54 }
55}
56
57pub(crate) const _ALIGNBYTES: usize = size_of::<c_long>() - 1;
58
59pub const _MAX_PAGE_SHIFT: u32 = 12;
60
61pub const PT_STEP: c_int = PT_FIRSTMACH + 0;
62pub const PT_GETREGS: c_int = PT_FIRSTMACH + 1;
63pub const PT_SETREGS: c_int = PT_FIRSTMACH + 2;
64pub const PT_GETFPREGS: c_int = PT_FIRSTMACH + 3;
65pub const PT_SETFPREGS: c_int = PT_FIRSTMACH + 4;