Signed-off-by: Arbel Moshe <arbel.moshe@xxxxxxxxxx> Reviewed-by: Liran Alon <liran.alon@xxxxxxxxxx> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> --- lib/x86/desc.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/x86/desc.h b/lib/x86/desc.h index 3bf8fbe..181b59e 100644 --- a/lib/x86/desc.h +++ b/lib/x86/desc.h @@ -167,6 +167,31 @@ typedef struct { u8 base_high; } gdt_entry_t; +struct segment_desc64 { + uint16_t limit1; + uint16_t base1; + uint8_t base2; + union { + uint16_t type_limit_flags; /* Type and limit flags */ + struct { + uint16_t type:4; + uint16_t s:1; + uint16_t dpl:2; + uint16_t p:1; + uint16_t limit:4; + uint16_t avl:1; + uint16_t l:1; + uint16_t db:1; + uint16_t g:1; + } __attribute__((__packed__)); + } __attribute__((__packed__)); + uint8_t base3; + uint32_t base4; + uint32_t zero; +} __attribute__((__packed__)); + +#define DESC_BUSY ((uint64_t) 1 << 41) + extern idt_entry_t boot_idt[256]; #ifndef __x86_64__ -- 2.14.1