diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-04-26 14:06:51 +0000 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-04-26 14:06:51 +0000 |
| commit | db0681412191dcceb5aa99cf31fb8339d6bc4adb (patch) | |
| tree | 590a4ccfa858b45ddeef4a4a279bdbb57f2c80e8 /Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | |
| parent | 97eb8462433a831f8a02a08acfc7ca32e794d37d (diff) | |
| parent | 3210d2e3f38a73090bcdbdd68623c676868529ce (diff) | |
Merged in MHR-16 (pull request #7)
MHR-16
Diffstat (limited to 'Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp')
| -rw-r--r-- | Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp index 0761114d..37e8f0cc 100644 --- a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp +++ b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp @@ -6,6 +6,7 @@ #include <Builtins/ACPI/ACPIFactoryInterface.hxx> #include <HALKit/AMD64/Processor.hpp> +#include "NewKit/KernelCheck.hpp" /////////////////////////////////////////////////////////////////////////////////////// @@ -45,12 +46,12 @@ STATIC const char* kApicSignature = "APIC"; /// @brief Multiple APIC descriptor table. struct MadtType final : public SDT { struct MadtAddress final { - UInt32 fPhysicalAddress; UInt32 fFlags; // 1 = Dual Legacy PICs installed + UInt32 fPhysicalAddress; Char fType; Char fRecLen; // record length - }; + } Madt[]; }; struct MadtProcessorLocalApic final { @@ -97,11 +98,12 @@ void hal_system_get_cores(voidPtr rsdPtr) { auto acpi = ACPIFactoryInterface(rsdPtr); kApicMadt = acpi.Find(kApicSignature).Leak().Leak(); - MUST_PASS(kApicMadt); // MADT must exist. - - kcout << "New OS: Successfuly fetched the MADT!\r\n"; - - kApicInfoBlock = (MadtType*)kApicMadt; + if (kApicMadt) { + kcout << "New OS: Successfuly fetched the MADT!\r\n"; + kApicInfoBlock = (MadtType*)kApicMadt; + } else { + MUST_PASS(false); + } } } // namespace NewOS::HAL |
