Add NOX2APIC boot parameter to bypass hardware detection
This commit is contained in:
@@ -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`
|
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
|
(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.
|
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
|
* **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
|
bootloader, which configures paging and selects the appropriate Page Map Level (PML) before transferring control to
|
||||||
the kernel.
|
the kernel.
|
||||||
|
|||||||
@@ -102,6 +102,14 @@ BOOLEAN
|
|||||||
HL::Pic::CheckX2ApicSupport(VOID)
|
HL::Pic::CheckX2ApicSupport(VOID)
|
||||||
{
|
{
|
||||||
PKPROCESSOR_CONTROL_BLOCK Prcb;
|
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 */
|
/* Get current processor control block */
|
||||||
Prcb = KE::Processor::GetCurrentProcessorControlBlock();
|
Prcb = KE::Processor::GetCurrentProcessorControlBlock();
|
||||||
|
|||||||
Reference in New Issue
Block a user