From 67ec69bdde5e56a9edb04edd5f85da5b10923452 Mon Sep 17 00:00:00 2001 From: Julien CLEMENT Date: Tue, 13 Jul 2021 20:10:35 +0200 Subject: [PATCH] fix(gdt): put lsb first in gdt-entry bitfields Signed-off-by: Julien CLEMENT --- k/gdt.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/k/gdt.h b/k/gdt.h index 672678c..2272b7f 100644 --- a/k/gdt.h +++ b/k/gdt.h @@ -5,19 +5,19 @@ struct gdt_entry { - uint8_t base_3 : 8; - uint8_t granularity : 1; - uint8_t db : 1; - uint8_t l : 1; - uint8_t available : 1; - uint8_t limit_2 : 4; - uint8_t present : 1; - uint8_t desc_priv : 2; - uint8_t desc_type : 1; - uint8_t seg_type : 4; - uint8_t base_2 : 8; - uint16_t base_1 : 16; uint16_t limit_1 : 16; + uint16_t base_1 : 16; + uint8_t base_2 : 8; + uint8_t seg_type : 4; + uint8_t desc_type : 1; + uint8_t desc_priv : 2; + uint8_t present : 1; + uint8_t limit_2 : 4; + uint8_t available : 1; + uint8_t l : 1; + uint8_t db : 1; + uint8_t granularity : 1; + uint8_t base_3 : 8; } __attribute__ ((packed)); #endif /* !GDT_H */