Add NOX2APIC boot parameter to bypass hardware detection
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in -59m32s
Builds / ExectOS (amd64, release) (push) Successful in 31s
Builds / ExectOS (i686, debug) (push) Successful in -59m31s
Builds / ExectOS (i686, release) (push) Successful in 37s

This commit is contained in:
2026-05-15 12:00:50 +02:00
parent 6bbeb657ea
commit 8ee97ac0ae
2 changed files with 11 additions and 0 deletions

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();