mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
Kernel: Allow switching to IOAPIC mode even without enabling SMP
This small change allows to use the IOAPIC by default without to enable SMP mode, which emulates Uni-Processor setup with IOAPIC instead of using the PIC. This opens the opportunity to utilize other types of interrupts like MSI and MSI-X interrupts.
This commit is contained in:
parent
f57900a41b
commit
ac7953f945
5 changed files with 41 additions and 29 deletions
|
@ -111,6 +111,16 @@ UNMAP_AFTER_INIT bool CommandLine::is_smp_enabled() const
|
|||
return lookup("smp"sv).value_or("off"sv) == "on"sv;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT bool CommandLine::is_ioapic_enabled() const
|
||||
{
|
||||
auto value = lookup("enable_ioapic"sv).value_or("on"sv);
|
||||
if (value == "on"sv)
|
||||
return true;
|
||||
if (value == "off"sv)
|
||||
return false;
|
||||
PANIC("Unknown enable_ioapic setting: {}", value);
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT bool CommandLine::is_vmmouse_enabled() const
|
||||
{
|
||||
return lookup("vmmouse"sv).value_or("on"sv) == "on"sv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue