From 5a2f104d9a0e85fa6947c6da6a4916c4e82d0422 Mon Sep 17 00:00:00 2001 From: Malo Lecomte Date: Wed, 14 Jul 2021 03:16:49 +0200 Subject: [PATCH] fix(gdt): revert gdt_r bitfield --- k/gdt.c | 5 ----- k/gdt.h | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/k/gdt.c b/k/gdt.c index 64dde20..c8e0182 100644 --- a/k/gdt.c +++ b/k/gdt.c @@ -110,18 +110,13 @@ static void load_cs() static void reload_segment_selectors() { - printf("Before load_ds\r\n"); load_ds(); load_cs(); } void init_gdt() { - printf("Before create_gdt\r\n"); create_gdt(); - printf("Before load_gdt\r\n"); load_gdt(); - printf("Before reload_segment_selectors\r\n"); reload_segment_selectors(); - printf("All good\r\n"); } diff --git a/k/gdt.h b/k/gdt.h index 9e1adbb..95028f7 100644 --- a/k/gdt.h +++ b/k/gdt.h @@ -36,8 +36,8 @@ struct gdt struct gdt_r { - uint32_t addr; uint16_t limit; + uint32_t addr; } __attribute__ ((packed)); struct segment_selector