diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-17 23:55:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-17 23:55:24 +0200 |
| commit | 8ccccad87b171890cbf5040e63b613307cdc5a30 (patch) | |
| tree | 4dfb464d36a409ab4686ff4e2cfbf0ed8310f6a8 /dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc | |
| parent | 496f814adf3b9cbcaab2e73188a6730d0a780912 (diff) | |
| parent | 2363e0ef10e1c34b4a6224199304cc6fda4526bb (diff) | |
Merge pull request #21 from amlel-el-mahrouss/dev
kernel, boot: recovering lost changes because of some git issue.
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc index 43888f3b..938907f4 100644 --- a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc +++ b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc @@ -210,24 +210,15 @@ namespace Kernel::HAL if (kMADTBlock) { - SizeT index = 1; + SizeT index = 1UL; kSMPInterrupt = 0; kSMPCount = 0; - kout << "SMP: Starting APs...\r"; + kout << "SMP: Registering APIC IDs...\r"; kApicBaseAddress = kMADTBlock->Address; - constexpr auto kMemoryAPStart = 0x7C000; - Char* ptr_ap_code = reinterpret_cast<Char*>(kMemoryAPStart); - - mm_map_page(ptr_ap_code, ptr_ap_code, kMMFlagsWr); - - 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 || @@ -241,18 +232,7 @@ namespace Kernel::HAL break; kAPICLocales[kSMPCount] = kMADTBlock->List[kSMPCount].LAPIC.ProcessorID; - (void)(kout << "SMP: APIC ID: " << number(kAPICLocales[kSMPCount]) << kendl); - - // I'll just make the AP start from scratch here. - - hal_send_start_ipi(kApicBaseAddress, kAPICLocales[kSMPCount]); - - HardwareTimer timer(Kernel::rtl_ms(10)); - timer.Wait(); - - /// TODO: HAL helper to create an address. - - hal_send_sipi(kApicBaseAddress, kAPICLocales[kSMPCount], (UInt8)(((UIntPtr)ptr_ap_code) >> 12)); + (Void)(kout << "SMP: APIC ID: " << number(kAPICLocales[kSMPCount]) << kendl); ++kSMPCount; break; @@ -264,7 +244,7 @@ namespace Kernel::HAL ++index; } - (void)(kout << "SMP: number of APs: " << number(kSMPCount) << kendl); + (Void)(kout << "SMP: Number of IDs: " << number(kSMPCount) << kendl); // Kernel is now SMP aware. // That means that the scheduler is now available (on MP Kernels) |
