|
* Switched to using macros for the GDT entry bits, to improve clarity
and make the code easier to modify. Also got rid of some junk values
in a few of the entries.
* Shrunk the GDT data array from 256 entries to 7 (GDT_ENTRY_COUNT)
since the GDT will only ever use 7 of the entries for now.
* Aligned the GDT using __cacheline_aligned, because the GDT entries
will be read every time a segment selector is loaded.
* Modified code dealing with the GDTR to just use `g_gdtr`, since the
same GDT/GDTR is always used.
* In `gdt_load()`, changed `eax` -> `ax`, since segment registers are
only 16 bits. Also replaced the `gdtr` to just use `g_gdtr`.
Additionally, used the inline assembly formatting to supply segment
selectors with KERNEL_CS/DS macros.
Signed-off-by: Quinn Stephens <quinn@osmora.org>
Signed-off-by: Ian Moffett <ian@osmora.org>
|