diff options
Diffstat (limited to 'dev/Kernel/HALKit')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalApplicationProcessor.cc | 10 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Processor.h | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/dev/Kernel/HALKit/AMD64/HalApplicationProcessor.cc b/dev/Kernel/HALKit/AMD64/HalApplicationProcessor.cc index 4234f11e..c6074d72 100644 --- a/dev/Kernel/HALKit/AMD64/HalApplicationProcessor.cc +++ b/dev/Kernel/HALKit/AMD64/HalApplicationProcessor.cc @@ -219,15 +219,9 @@ namespace Kernel::HAL kcout << "SMP: Starting APs...\r"; + UInt32 eax, edx; kApicBaseAddress = kMADTBlock->Address; - constexpr auto kMemoryAPStart = 0x7C000; - Char* ptr_ap_code = reinterpret_cast<Char*>(kMemoryAPStart); - - SizeT hal_ap_blob_len = hal_ap_blob_end - hal_ap_blob_start; - - rt_copy_memory((Char*)hal_ap_blob_start, ptr_ap_code, hal_ap_blob_len); - while (Yes) { if (kMADTBlock->List[index].Type > 9 || @@ -252,7 +246,7 @@ namespace Kernel::HAL /// TODO: HAL helper to create an address. - hal_send_sipi(kApicBaseAddress, kAPICLocales[kSMPCount], (UInt8)(((UIntPtr)ptr_ap_code) >> 12)); + hal_send_sipi(kApicBaseAddress, kAPICLocales[kSMPCount], (UInt8)(((UIntPtr)0x7c00) >> 12)); ++kSMPCount; break; diff --git a/dev/Kernel/HALKit/AMD64/Processor.h b/dev/Kernel/HALKit/AMD64/Processor.h index acdf7e42..623c8245 100644 --- a/dev/Kernel/HALKit/AMD64/Processor.h +++ b/dev/Kernel/HALKit/AMD64/Processor.h @@ -233,14 +233,16 @@ namespace Kernel::HAL /// @param lo low byte /// @param hi high byte /***********************************************************************************/ - inline Void hal_get_msr(UInt32 msr, UInt32* lo, UInt32* hi) noexcept + inline UInt32 hal_get_msr(UInt32 msr, UInt32* lo, UInt32* hi) noexcept { if (!lo || !hi) - return; + return 0; asm volatile("rdmsr" : "=a"(*lo), "=d"(*hi) : "c"(msr)); + + return *lo + *hi; } /// @brief Set Model-specific register. |
