Add support for Symmetric Multiprocessing (SMP) #26

Merged
harraiken merged 33 commits from smp into master 2026-05-18 18:44:54 +02:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit 8ee97ac0ae - Show all commits

View File

@@ -15,6 +15,9 @@ The following is a consolidated list of available kernel parameters:
scheduler tick. Valid values include `LAPIC` (Local APIC Timer), `HPET` (High Precision Event Timer), and `PIT`
(Legacy Programmable Interval Timer). If this parameter is omitted, the kernel will autonomously probe the hardware
and select the most optimal clock source for the current CPU topology, (defaulting to the Local APIC on modern systems.
* **NOX2APIC**: Explicitly disables x2APIC support. When specified, the kernel bypasses hardware feature detection for
x2APIC and forces the use of the classic, memory-mapped (MMIO) xAPIC mode. This parameter is particularly useful for
troubleshooting interrupt routing issues or ensuring compatibility with specific hypervisors and legacy emulators.
* **NOXPA**: Disables PAE or LA57 support, depending on the CPU architecture. This parameter is handled by the
bootloader, which configures paging and selects the appropriate Page Map Level (PML) before transferring control to
the kernel.

View File

@@ -102,6 +102,14 @@ BOOLEAN
HL::Pic::CheckX2ApicSupport(VOID)
{
PKPROCESSOR_CONTROL_BLOCK Prcb;
PCWSTR KernelParameter;
/* Check if the user forced xAPIC via boot parameters */
if(KE::BootInformation::GetKernelParameter(L"NOX2APIC", &KernelParameter) == STATUS_SUCCESS)
{
/* The NOX2APIC flag is present, explicitly disable x2APIC support */
return FALSE;
}
/* Get current processor control block */
Prcb = KE::Processor::GetCurrentProcessorControlBlock();