2022-12-07 13:48:08 +00:00
|
|
|
#pragma once
|
2022-12-04 11:42:43 +00:00
|
|
|
#include <luna/Types.h>
|
2022-11-16 16:37:18 +00:00
|
|
|
|
|
|
|
struct Registers // Saved CPU registers for x86-64
|
|
|
|
{
|
|
|
|
u64 r15, r14, r13, r12, r11, r10, r9, r8;
|
|
|
|
u64 rbp, rdi, rsi, rdx, rcx, rbx, rax;
|
|
|
|
u64 isr, error;
|
|
|
|
u64 rip, cs, rflags, rsp, ss;
|
2022-12-17 14:45:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct [[gnu::packed]] TSS
|
|
|
|
{
|
|
|
|
u32 reserved0;
|
|
|
|
u64 rsp[3];
|
|
|
|
u64 reserved1;
|
|
|
|
u64 ist[7];
|
|
|
|
u64 reserved2;
|
|
|
|
u16 reserved3;
|
|
|
|
u16 iomap_base;
|
|
|
|
};
|
|
|
|
|
|
|
|
static_assert(sizeof(TSS) == 104UL);
|
|
|
|
|
2023-01-02 12:07:29 +00:00
|
|
|
extern TSS task_state_segment;
|