summaryrefslogtreecommitdiff
path: root/sys/include/fs
diff options
context:
space:
mode:
authorQuinn Stephens <quinn@osmora.org>2025-05-22 15:11:35 -0400
committerIan Moffett <ian@osmora.org>2025-05-22 15:18:45 -0400
commit92e385d64d9883896b4cf55e7e0d5e110621cb0c (patch)
tree3e65b693c4179d326736a4e0d31839f9f32cda3b /sys/include/fs
parent6dfbc839f81f757b5e9635508fa4f31800807f2b (diff)
kernel/amd64: Improve GDT implementation
* 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>
Diffstat (limited to 'sys/include/fs')
0 files changed, 0 insertions, 0 deletions