Added the start of the page structures.

This commit is contained in:
2020-12-12 21:03:19 -06:00
parent 49efafe173
commit 8ba77bcd69
4 changed files with 26 additions and 3 deletions
+4
View File
@@ -8,3 +8,7 @@
*.pdf *.pdf
*.aux *.aux
*.gz *.gz
.gitignore.save
GPATH
GRTAGS
GTAGS
+1 -1
View File
@@ -1,3 +1,3 @@
#ifndef KERNEL_VERSION_NUMBER #ifndef KERNEL_VERSION_NUMBER
#define KERNEL_VERSION_NUMBER "0.0.3-46" #define KERNEL_VERSION_NUMBER "0.0.3-50"
#endif #endif
+2 -2
View File
@@ -9,7 +9,7 @@ struct idt_entry
unsigned short base_hi; unsigned short base_hi;
} __attribute__((packed)); } __attribute__((packed));
struct idt_ptr struct idt
{ {
unsigned short size; unsigned short size;
struct idt_entry* idt_entries_start; struct idt_entry* idt_entries_start;
@@ -17,5 +17,5 @@ struct idt_ptr
void install_idt(void); void install_idt(void);
void idt_set_gate(unsigned char, unsigned long, unsigned short, unsigned char); void idt_set_gate(unsigned char, unsigned long, unsigned short, unsigned char);
void load_idt(struct idt_ptr*); void load_idt(struct idt*);
#endif #endif
+19
View File
@@ -0,0 +1,19 @@
#ifndef PAGE_STRUCTS_H
#define PAGE_STRUCTS_H
enum X86_PTE_FLAGS
{
X86_PTE_PRESENT = 0x01,
X86_PTE_WRITEABLE = 0x02,
X86_PTE_USER = 0x04, //User mode, 0 for supervisor mode, 1 for user mode.
X86_PTE_WRITETHROUGH = 0x08, //
X86_PTE_NOT_CACHEABLE = 0x10, //
X86_PTE_ACCESSED = 0x20,
X86_PTE_DIRTY = 0x40,
X86_PTE_PAT = 0x80,
X86_PTE_CPU_GLOBAL = 0x100,
X86_PTE_LV4_GLOBAL = 0x200,
X86_PTE_FRAME = 0x7FFFF000
};
#endif