summaryrefslogtreecommitdiffhomepage
path: root/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-08 14:19:42 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-08 14:19:42 +0200
commitdf8393cebbae61ed7686be17a28d80c657f49b7e (patch)
tree96a67cbbe80a69f2b3c59a94a517741b6583a88b /Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx
parent209ebb8caa774c8d73ead8e0eba3bd65d138930f (diff)
[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 <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx')
-rw-r--r--Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx18
1 files changed, 6 insertions, 12 deletions
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