summaryrefslogtreecommitdiff
path: root/kernel/GDT/gdt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/GDT/gdt.cpp')
-rw-r--r--kernel/GDT/gdt.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/GDT/gdt.cpp b/kernel/GDT/gdt.cpp
index c3a5d43..a01477f 100644
--- a/kernel/GDT/gdt.cpp
+++ b/kernel/GDT/gdt.cpp
@@ -16,8 +16,14 @@ Gdt::~Gdt(){
}
-void Gdt::initGdtDesc(u32 base, u32 limit, u8 type, u8 param, gdtDescriptorStruct *Descriptor){
- //Load parameter into "Descriptor"
+void Gdt::initGdtDesc(u32 base, u32 limit, u8 access, u8 flags, gdtDescriptorStruct *Descriptor){
+ Descriptor->limit1 = limit & 0xFFFF;
+ Descriptor->base1 = base & 0xFFFF;
+ Descriptor->base2 = (base & 0xFF0000) >> 16;
+ Descriptor->access = access;
+ Descriptor->limit2 = (limit & 0xF0000 ) >> 16;
+ Descriptor->flags = flags & 0xFF;
+ Descriptor->base3 = (base & 0xFF000000) >> 24;
}
void Gdt::loadGdt(){