From 244a9154e42a49470bd28e3a95ebe9f4a5fe5ff7 Mon Sep 17 00:00:00 2001 From: Alexey Gavrilov Date: Wed, 6 Mar 2024 15:32:17 +0700 Subject: Initialization mechanism --- arch/x86/gdt/Gdt.cpp | 2 ++ arch/x86/gdt/GlobalObj.cpp | 6 ------ arch/x86/gdt/GlobalObj.h | 11 ----------- arch/x86/gdt/GoToGdtMemSeg.s | 13 ------------- 4 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 arch/x86/gdt/GlobalObj.cpp delete mode 100644 arch/x86/gdt/GlobalObj.h delete mode 100644 arch/x86/gdt/GoToGdtMemSeg.s (limited to 'arch/x86/gdt') diff --git a/arch/x86/gdt/Gdt.cpp b/arch/x86/gdt/Gdt.cpp index 80fcd13..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; 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 -#include "Gdt.h" - -extern MngGdt mngGdt; - -void mngGdtInit(); - -#endif diff --git a/arch/x86/gdt/GoToGdtMemSeg.s b/arch/x86/gdt/GoToGdtMemSeg.s deleted file mode 100644 index 2b5dd62..0000000 --- a/arch/x86/gdt/GoToGdtMemSeg.s +++ /dev/null @@ -1,13 +0,0 @@ -global GOTOGDTMEMSEG -GOTOGDTMEMSEG: - lgdt [esp + 4] - jmp 0x08:.reloadCS -.reloadCS: - mov ax, 0x10 - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - ret -.end: -- cgit v1.2.3