From bc7870aea4c437e1a80b779eb7a968d55733d24c Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 13 Jul 2024 00:20:21 +0200 Subject: [IMP] Kernel properties (such as \KernelVersion) [REFACTOR] Rename KernelHeap to just Heap. [FIX] Scheduler's way of checking boundaries was not correct. Signed-off-by: Amlal El Mahrouss --- Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx | 2 +- Kernel/HALKit/AMD64/HalInterruptAPI.asm | 8 -------- Kernel/HALKit/AMD64/HalKernelMain.cxx | 15 ++++++++++++++- Kernel/HALKit/ARM64/HalKernelMain.cxx | 2 +- 4 files changed, 16 insertions(+), 11 deletions(-) (limited to 'Kernel/HALKit') diff --git a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx index d9bb4baa..d9918570 100644 --- a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx +++ b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx @@ -8,7 +8,7 @@ #include #include #include -#include +#include namespace Kernel { diff --git a/Kernel/HALKit/AMD64/HalInterruptAPI.asm b/Kernel/HALKit/AMD64/HalInterruptAPI.asm index 5eaf60b4..c09d5a06 100644 --- a/Kernel/HALKit/AMD64/HalInterruptAPI.asm +++ b/Kernel/HALKit/AMD64/HalInterruptAPI.asm @@ -121,19 +121,11 @@ IntNormal 31 [extern hal_apic_acknowledge] -%define cAPICAddress 0xFEE00000 - __NEW_INT_34: -;; make this active, SMP works again. push rax call hal_apic_acknowledge pop rax - mov rax, 0 - - ;; tell there local apic that we're done. - mov qword [cAPICAddress + 0xB0], rax ; send end of interrupt. - iretq IntNormal 32 diff --git a/Kernel/HALKit/AMD64/HalKernelMain.cxx b/Kernel/HALKit/AMD64/HalKernelMain.cxx index 869e4ae4..fcd12247 100644 --- a/Kernel/HALKit/AMD64/HalKernelMain.cxx +++ b/Kernel/HALKit/AMD64/HalKernelMain.cxx @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include @@ -18,11 +18,16 @@ #include #include #include +#include #define mInitKernel(X) \ X; \ Kernel::ke_stop(RUNTIME_CHECK_BOOTSTRAP); + + +Kernel::Property cKernelVersion; + /// @brief This symbol is the kernel main symbol. EXTERN_C void KeMain(); @@ -210,6 +215,14 @@ EXTERN_C void hal_init_platform( kSyscalls[cRebootInterrupt].Leak().Leak()->fHooked = true; kSyscalls[cLPCSanitizeMsg].Leak().Leak()->fHooked = true; + // newoskrnl version 1.00 + // + Kernel::StringView strVer(cMaxPropLen); + strVer += "\\Properties\\KernelVersion"; + + cKernelVersion.GetKey() = strVer; + cKernelVersion.GetValue() = 1100; + Kernel::HAL::hal_system_get_cores(kHandoverHeader->f_HardwareTables.f_RsdPtr); mInitKernel(KeMain()); diff --git a/Kernel/HALKit/ARM64/HalKernelMain.cxx b/Kernel/HALKit/ARM64/HalKernelMain.cxx index 54a75365..5e66a3d8 100644 --- a/Kernel/HALKit/ARM64/HalKernelMain.cxx +++ b/Kernel/HALKit/ARM64/HalKernelMain.cxx @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3