From edaf05c85ddfc91904643b603bb5dd074b7d3e8f Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sat, 9 Oct 2021 18:23:12 -0500 Subject: arch: i386: rename the GDT array pointer Rename the array/pointer to the GDT array in gdt.c pointer to be a bit clearer. Signed-off-by: Danny Holman --- arch/i386/boot/gdt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/i386/boot/gdt.c b/arch/i386/boot/gdt.c index d7873cc..6552721 100644 --- a/arch/i386/boot/gdt.c +++ b/arch/i386/boot/gdt.c @@ -46,7 +46,7 @@ struct gpt_ptr { uint32_t base; }__attribute__((packed)); -uint64_t desc[5]; +uint64_t gdt_desc[5]; struct gpt_ptr gp; extern void flush_gdt(struct gpt_ptr *ptr); @@ -69,12 +69,12 @@ uint64_t create_gdt_entry(uint32_t base, uint32_t limit, uint16_t flag) { void gdt_install(void) { gp.limit = 64 * 5 - 1; - gp.base = (uint32_t)&desc; + gp.base = (uint32_t)&gdt_desc; - desc[0] = create_gdt_entry(0, 0, 0); - desc[1] = create_gdt_entry(0, 0x000FFFFF, GDT_CODE_PL0); - desc[2] = create_gdt_entry(0, 0x000FFFFF, GDT_DATA_PL0); - desc[3] = create_gdt_entry(0, 0x000FFFFF, GDT_DATA_PL3); - desc[4] = create_gdt_entry(0, 0x000FFFFF, GDT_DATA_PL3); + gdt_desc[0] = create_gdt_entry(0, 0, 0); + gdt_desc[1] = create_gdt_entry(0, 0x000FFFFF, GDT_CODE_PL0); + gdt_desc[2] = create_gdt_entry(0, 0x000FFFFF, GDT_DATA_PL0); + gdt_desc[3] = create_gdt_entry(0, 0x000FFFFF, GDT_DATA_PL3); + gdt_desc[4] = create_gdt_entry(0, 0x000FFFFF, GDT_DATA_PL3); flush_gdt(&gp); } -- cgit v1.2.3