Correct some mistake
This commit is contained in:
parent
dd1226fb1f
commit
7173bb91ce
7 changed files with 22 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "gdt.hpp"
|
||||
#include "../Helpers/types.hpp"
|
||||
#include "../Helpers/memory.hpp"
|
||||
|
||||
|
||||
Gdt::Gdt(){
|
||||
|
@ -39,7 +40,14 @@ void Gdt::initGdtDesc(u32 base, u32 limit, u8 access, u8 flags, gdtDescriptorStr
|
|||
}
|
||||
|
||||
void Gdt::loadGdt(){
|
||||
int *gdtAdress=(int *)&m_Pointer;
|
||||
//Copy Gdt into memory and init registers
|
||||
memcpy((u32)m_Descriptors, (u32)m_Pointer.segment, (u32)m_Pointer.size);
|
||||
|
||||
__asm__("lgdtl (%0);"
|
||||
:
|
||||
:"r"(gdtAdress)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue