diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-07-20 19:12:26 +0400 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-07-20 19:12:26 +0400 |
| commit | 54463cc2520dcaa73c8248b8e8eb195558d31589 (patch) | |
| tree | 0e973a965099504733393162126e1bc4e951a6cd /kernel/GDT/gdt.cpp | |
| parent | 55a449dc65a44d307f10a3dc4a2c19d66e2a65c3 (diff) | |
Implement initGdtDesc in Gdt class
Diffstat (limited to 'kernel/GDT/gdt.cpp')
| -rw-r--r-- | kernel/GDT/gdt.cpp | 10 |
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(){ |
