summaryrefslogtreecommitdiffstats
path: root/arch/x86/gdt
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/gdt')
-rwxr-xr-xarch/x86/gdt/Gdt.cpp4
-rwxr-xr-xarch/x86/gdt/Gdt.h2
-rw-r--r--arch/x86/gdt/GlobalObj.cpp6
-rw-r--r--arch/x86/gdt/GlobalObj.h11
-rw-r--r--arch/x86/gdt/SwitchToGdt.s (renamed from arch/x86/gdt/GoToGdtMemSeg.s)4
5 files changed, 6 insertions, 21 deletions
diff --git a/arch/x86/gdt/Gdt.cpp b/arch/x86/gdt/Gdt.cpp
index 88c7bbd..21941b4 100755
--- a/arch/x86/gdt/Gdt.cpp
+++ b/arch/x86/gdt/Gdt.cpp
@@ -1,6 +1,8 @@
#include "Gdt.h"
+uint64 MngGdt::gdt[MngGdt::size];
+
DescSeg32::DescSeg32(uint32 base, uint32 limit, uint8 access, uint8 flags)
{
this->baseLow = base & 0x0000FFFF;
@@ -88,7 +90,7 @@ bool MngGdt::loadGdt()
pointer <<= 16;
pointer |= size;
- GOTOGDTMEMSEG(pointer);
+ SWITCHTOGDT(pointer);
isGdtLoaded = 1;
return true;
diff --git a/arch/x86/gdt/Gdt.h b/arch/x86/gdt/Gdt.h
index a8d7dc2..6667d93 100755
--- a/arch/x86/gdt/Gdt.h
+++ b/arch/x86/gdt/Gdt.h
@@ -59,7 +59,7 @@ class DescSeg32 // Segment descriptor
#ifdef __cplusplus
extern "C" {
#endif
-extern void GOTOGDTMEMSEG(uint64 pointer);
+extern void SWITCHTOGDT(uint64 pointer);
#ifdef __cplusplus
};
#endif
diff --git a/arch/x86/gdt/GlobalObj.cpp b/arch/x86/gdt/GlobalObj.cpp
deleted file mode 100644
index fbceeef..0000000
--- a/arch/x86/gdt/GlobalObj.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "GlobalObj.h"
-
-
-uint64 MngGdt::gdt[MngGdt::size];
-
-MngGdt mngGdt;
diff --git a/arch/x86/gdt/GlobalObj.h b/arch/x86/gdt/GlobalObj.h
deleted file mode 100644
index 3c62847..0000000
--- a/arch/x86/gdt/GlobalObj.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef GDTGLOBALOBJ_H
-#define GDTGLOBALOBJ_H
-
-#include <types.h>
-#include "Gdt.h"
-
-extern MngGdt mngGdt;
-
-void mngGdtInit();
-
-#endif
diff --git a/arch/x86/gdt/GoToGdtMemSeg.s b/arch/x86/gdt/SwitchToGdt.s
index 2b5dd62..52ebbc7 100644
--- a/arch/x86/gdt/GoToGdtMemSeg.s
+++ b/arch/x86/gdt/SwitchToGdt.s
@@ -1,5 +1,5 @@
-global GOTOGDTMEMSEG
-GOTOGDTMEMSEG:
+global SWITCHTOGDT
+SWITCHTOGDT:
lgdt [esp + 4]
jmp 0x08:.reloadCS
.reloadCS: