diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-17 19:54:32 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-17 19:54:32 +0100 |
| commit | a8366afaf39321ae2bbae70740f5ca65bee06769 (patch) | |
| tree | e7c7384a2611a02dacae4e1f0e43b863b541fad5 /Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | |
| parent | 5a0a901f6d4a4499c13877376ff34e6411500410 (diff) | |
unrelated: Rework the ACPI interface.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp')
| -rw-r--r-- | Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp index edb821b9..d9161d17 100644 --- a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp +++ b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include <Builtins/ACPI/ACPIManager.hxx> +#include <Builtins/ACPI/ACPIFactoryInterface.hxx> #include <HALKit/AMD64/Processor.hpp> /////////////////////////////////////////////////////////////////////////////////////// @@ -39,10 +39,11 @@ struct ProcessorInfoAMD64 final { } Selector; }; -static voidPtr kApicMadt = nullptr; -static const char* kApicSignature = "APIC"; +STATIC voidPtr kApicMadt = nullptr; +STATIC const char* kApicSignature = "APIC"; -struct Madt final { +/// @brief Multiple APIC descriptor table. +struct MadtType final { char fMag[4]; Int32 fLength; char fRev; @@ -90,10 +91,10 @@ struct MadtLocalApicAddressOverride final { /////////////////////////////////////////////////////////////////////////////////////// -static Madt kApicMadtList[256]; +STATIC MadtType kApicMadtList[256]; -Madt* system_find_core(Madt* madt) { - madt = madt + sizeof(Madt); +MadtType* system_find_core(MadtType* madt) { + madt = madt + sizeof(MadtType); if (rt_string_cmp(madt->fMag, kApicSignature, rt_string_len(kApicSignature)) == 0) @@ -105,13 +106,13 @@ Madt* system_find_core(Madt* madt) { /////////////////////////////////////////////////////////////////////////////////////// void hal_system_get_cores(voidPtr rsdPtr) { - auto acpi = ACPIManager(rsdPtr); + auto acpi = ACPIFactoryInterface(rsdPtr); kApicMadt = acpi.Find(kApicSignature).Leak().Leak(); MUST_PASS(kApicMadt); // MADT must exist. SizeT counter = 0UL; - Madt* offset = system_find_core((Madt*)kApicMadt); + MadtType* offset = system_find_core((MadtType*)kApicMadt); //! now find core addresses. while (offset != nullptr) { // calls rt_copy_memory in NewC++ |
