diff options
| author | Alexey Gavrilov <rebovas@yahoo.com> | 2024-03-06 15:32:17 +0700 |
|---|---|---|
| committer | Alexey Gavrilov <rebovas@yahoo.com> | 2024-03-06 15:32:17 +0700 |
| commit | 244a9154e42a49470bd28e3a95ebe9f4a5fe5ff7 (patch) | |
| tree | 4999e8c789a036511a1b6bbaec594b712bb1f64a /kernel | |
| parent | 1af53b431da6d3b5dcf7132f98f9eb2af88b57fa (diff) | |
Initialization mechanism
Diffstat (limited to 'kernel')
| -rwxr-xr-x | kernel/GlobalConstruct.cpp | 15 | ||||
| -rwxr-xr-x | kernel/GlobalConstruct.h | 14 | ||||
| -rw-r--r-- | kernel/kernel.c | 13 |
3 files changed, 7 insertions, 35 deletions
diff --git a/kernel/GlobalConstruct.cpp b/kernel/GlobalConstruct.cpp deleted file mode 100755 index b16b6ae..0000000 --- a/kernel/GlobalConstruct.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "GlobalConstruct.h" - -void GlobalConstruct::terminalInit() -{ - display = VGADisplay(); -}; - -void GlobalConstruct::gdtInit() -{ - mngGdt = MngGdt(); - - mngGdt.addDescriptor(DescSeg32::flatCodeKernel()); - mngGdt.addDescriptor(DescSeg32::flatDataKernel()); - mngGdt.loadGdt(); -}; diff --git a/kernel/GlobalConstruct.h b/kernel/GlobalConstruct.h deleted file mode 100755 index 2b0a675..0000000 --- a/kernel/GlobalConstruct.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef GLOBALCONSTRUCT_H -#define GLOBALCONSTRUCT_H - -#include "../arch/x86/io/GlobalObj.h" -#include "../arch/x86/gdt/GlobalObj.h" - -class GlobalConstruct -{ - public: - static void terminalInit(); - static void gdtInit(); -}; - -#endif diff --git a/kernel/kernel.c b/kernel/kernel.c index 3d9a3cc..dfb03e4 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -1,12 +1,13 @@ -#include "GlobalConstruct.h" -#include <TypeConverter.h> -#include <types.h> +#include "../arch/SecondaryInit.h" #include "../arch/x86/cpuinfo/Cpuinfo.h" void main() { - GlobalConstruct::terminalInit(); - GlobalConstruct::gdtInit(); - Cpuinfo cpuinf; + SecondaryInitialization init; + + init.processorInitialize(); + init.devicesInitialize(); + + out::display << "Hello, World!\n"; }; |
