Remove magic numbers. Also, no code segment - not needed.
This commit is contained in:
6
src/kernel/include/x86_64/gdt.h
Normal file
6
src/kernel/include/x86_64/gdt.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define GDT_CODE (3<<11)
|
||||
#define GDT_DPL(lvl) ((lvl)<<13)
|
||||
#define GDT_PRESENT (1<<15)
|
||||
#define GDT_LONG (1<<21)
|
||||
8
src/kernel/include/x86_64/memory.h
Normal file
8
src/kernel/include/x86_64/memory.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#define PAGE_PRESENT 0x001
|
||||
#define PAGE_WRITE 0x002
|
||||
#define PAGE_HUGE 0x080
|
||||
|
||||
#define PAGE_SIZE 0x1000
|
||||
#define ENTRIES_PER_PT 512
|
||||
Reference in New Issue
Block a user