diff options
Diffstat (limited to 'include/arch/x86_64/processor.h')
-rw-r--r-- | include/arch/x86_64/processor.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/include/arch/x86_64/processor.h b/include/arch/x86_64/processor.h index f8a93ce..1afa6cc 100644 --- a/include/arch/x86_64/processor.h +++ b/include/arch/x86_64/processor.h @@ -18,13 +18,22 @@ typedef struct jove_TSS { uint32_t resv0; - uint64_t rsp[3]; - uint32_t resv1; - uint64_t ist[8]; - uint32_t resv2[2]; - uint16_t resv3; + uint64_t rsp0; + uint64_t rsp1; + uint64_t rsp2; + uint64_t resv1; + uint64_t resv2; + uint64_t ist1; + uint64_t ist2; + uint64_t ist3; + uint64_t ist4; + uint64_t ist5; + uint64_t ist6; + uint64_t ist7; + uint64_t resv3; + uint16_t resv4; uint16_t iopb; -} tss_t; +} __attribute__((packed)) tss_t; enum { @@ -39,6 +48,12 @@ enum GDT_ENTRY_COUNT }; +#define GDT_OFFSET_KERNEL_CODE (GDT_ENTRY_KERNEL_CODE * sizeof(segment_descriptor_t)) +#define GDT_OFFSET_KERNEL_DATA (GDT_ENTRY_KERNEL_DATA * sizeof(segment_descriptor_t)) +#define GDT_OFFSET_USER_DATA (GDT_ENTRY_USER_DATA * sizeof(segment_descriptor_t)) +#define GDT_OFFSET_USER_CODE (GDT_ENTRY_USER_CODE * sizeof(segment_descriptor_t)) +#define GDT_OFFSET_TSS (GDT_ENTRY_TSS_LOW * sizeof(segment_descriptor_t)) + typedef struct jove_Processor { physptr_t pdir; |