diff options
Diffstat (limited to 'Kernel/HALKit')
| -rw-r--r-- | Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | 9 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/HalKernelMain.cxx | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp index e4a2d99c..dfa02b11 100644 --- a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp +++ b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp @@ -160,6 +160,7 @@ namespace NewOS::HAL } STATIC HAL::StackFramePtr cFramePtr = nullptr; + STATIC Int32 cSMPInterrupt = 0x40; EXTERN_C Void hal_apic_acknowledge_cont(Void) { @@ -186,12 +187,13 @@ namespace NewOS::HAL { Semaphore sem; - sem.LockOrWait(&ProcessScheduler::The().Leak().TheCurrent().Leak(), Seconds(5)); + HardwareTimer timer(Seconds(5)); + sem.LockOrWait(&ProcessScheduler::The().Leak().TheCurrent().Leak(), &timer); cFramePtr = stackFrame; /// yes the exception field contains the core id. - hal_send_start_ipi(stackFrame->Rcx, 0x40, cBaseAddressAPIC); + hal_send_start_ipi(stackFrame->Rcx, cSMPInterrupt, cBaseAddressAPIC); sem.Unlock(); } @@ -245,10 +247,9 @@ namespace NewOS::HAL cProgramInitialized = new Boolean(true); - constexpr auto cWhereToInterrupt = 0x40; constexpr auto cWhatCore = 1; - hal_send_start_ipi(cWhatCore, cWhereToInterrupt, cBaseAddressAPIC); + hal_send_start_ipi(cWhatCore, cSMPInterrupt, cBaseAddressAPIC); } else { diff --git a/Kernel/HALKit/AMD64/HalKernelMain.cxx b/Kernel/HALKit/AMD64/HalKernelMain.cxx index 31732022..7d641153 100644 --- a/Kernel/HALKit/AMD64/HalKernelMain.cxx +++ b/Kernel/HALKit/AMD64/HalKernelMain.cxx @@ -16,6 +16,7 @@ #include <NewKit/Json.hpp> #include <Modules/CoreCG/Accessibility.hxx> #include <KernelKit/CodeManager.hpp> +#include <Modules/ACPI/ACPIFactoryInterface.hxx> #define KERNEL_INIT(X) X; \ NewOS::ke_stop(RUNTIME_CHECK_BOOTSTRAP); @@ -179,12 +180,12 @@ EXTERN_C void hal_init_platform( }; kSyscalls[cRebootInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { - NewOS::ACPIFactoryInterface acpi; + NewOS::ACPIFactoryInterface acpi(kHandoverHeader->f_HardwareTables.f_RsdPtr); acpi.Reboot(); }; kSyscalls[cShutdownInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx) -> void { - NewOS::ACPIFactoryInterface acpi; + NewOS::ACPIFactoryInterface acpi(kHandoverHeader->f_HardwareTables.f_RsdPtr); acpi.Shutdown(); }; |
