diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-24 15:52:36 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-24 15:52:36 +0200 |
| commit | 7faa5e2fcf41c4fbb2241b605e8f2a11738fc4d9 (patch) | |
| tree | 4395820c8cab023c8e794e44e93eabefc26ac9b6 /dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc | |
| parent | de88c44c68f3941e003ddaf13042875370f10978 (diff) | |
dev, kernel: scheduler, timer: hw timer and scheduler improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc index 3b98e9e8..1f865057 100644 --- a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc +++ b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc @@ -219,17 +219,9 @@ namespace Kernel::HAL 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 | kMMFlagsPCD); - - 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) { + /// @note Anything bigger than x2APIC type doesn't exist. if (kMADTBlock->List[index].Type > 9 || kSMPCount > kSchedProcessLimitPerTeam) break; @@ -243,17 +235,6 @@ namespace Kernel::HAL 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)); - ++kSMPCount; break; } @@ -264,7 +245,7 @@ namespace Kernel::HAL ++index; } - (void)(kout << "SMP: number of APs: " << number(kSMPCount) << kendl); + (void)(kout << "SMP: Number of APs: " << number(kSMPCount) << kendl); // Kernel is now SMP aware. // That means that the scheduler is now available (on MP Kernels) |
