diff options
author | Danny Holman <dholman@gymli.xyz> | 2021-10-09 18:23:12 -0500 |
---|---|---|
committer | Danny Holman <dholman@gymli.xyz> | 2021-10-09 18:23:12 -0500 |
commit | edaf05c85ddfc91904643b603bb5dd074b7d3e8f (patch) | |
tree | 65144091b8952bbf574bbfc928e43e682c109cd2 /arch/i386/boot | |
parent | 376ec895110deb142a9162984e50ad6f0616758e (diff) |
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 <dholman@gymli.xyz>
Diffstat (limited to 'arch/i386/boot')
-rw-r--r-- | arch/i386/boot/gdt.c | 14 |
1 files 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); } |