From df8393cebbae61ed7686be17a28d80c657f49b7e Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Thu, 8 Aug 2024 14:19:42 +0200 Subject: [IMP] Code cleanup and improvements of the bootloader, still trying to figure what is going wrong on the kernel's DLL. Signed-off-by: Amlal EL Mahrouss --- Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx') diff --git a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx index dd912d2b..5c1a4323 100644 --- a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx +++ b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx @@ -183,8 +183,8 @@ namespace Kernel::HAL struct PROCESS_CONTROL_BLOCK final { - PROCESS_HEADER_BLOCK* f_Header; - HAL::StackFramePtr f_StackFrame; + PROCESS_HEADER_BLOCK* f_Header; + HAL::StackFramePtr f_StackFrame; } fBlocks[cMaxPCBBlocks] = {0}; STATIC Void hal_switch_context(HAL::StackFramePtr stackFrame) @@ -198,7 +198,7 @@ namespace Kernel::HAL cFramePtr = stackFrame; - fBlocks[ProcessScheduler::The().Leak().TheCurrent().Leak().ProcessId % cMaxPCBBlocks].f_Header = &ProcessScheduler::The().Leak().TheCurrent().Leak(); + fBlocks[ProcessScheduler::The().Leak().TheCurrent().Leak().ProcessId % cMaxPCBBlocks].f_Header = &ProcessScheduler::The().Leak().TheCurrent().Leak(); fBlocks[ProcessScheduler::The().Leak().TheCurrent().Leak().ProcessId % cMaxPCBBlocks].f_StackFrame = stackFrame; sem.Unlock(); @@ -234,15 +234,9 @@ namespace Kernel::HAL auto acpi = ACPIFactoryInterface(rsdPtr); kApicMadt = acpi.Find(kApicSignature).Leak().Leak(); - if (kApicMadt != nullptr) - { - kApicInfoBlock = (MadtType*)kApicMadt; - } - else - { - kcout << "newoskrnl: APIC is not present! it is a vital component to enable SMP.\r"; - ke_stop(RUNTIME_CHECK_FAILED); - } + MUST_PASS(kApicMadt); + + kApicInfoBlock = (MadtType*)kApicMadt; } } // namespace Kernel::HAL -- cgit v1.2.3