Added a temporary opt-in option "enable_ioapic" to the boot menu. This way the
IO-APIC can be easily enabled to test it on various configurations. Note that the previous default opt-out didn't work because the safemode options would not be touched at all when not actually entering the boot menu. Once IO-APIC is more broadly tested this can be removed again and the opt-out option reenabled. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41370 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -21,5 +21,7 @@
|
||||
# define B_SAFEMODE_DISABLE_LATENCY_CHECK "disable_latency_check"
|
||||
#endif
|
||||
|
||||
#define B_SAFEMODE_ENABLE_IOAPIC "enable_ioapic"
|
||||
// TODO: temprary opt-in, can be removed once IO-APIC code is broadly tested
|
||||
|
||||
#endif /* _SYSTEM_SAFEMODE_DEFS_H */
|
||||
|
||||
@@ -580,13 +580,19 @@ smp_add_safemode_menus(Menu *menu)
|
||||
MenuItem *item;
|
||||
|
||||
if (gKernelArgs.arch_args.ioapic_phys != 0) {
|
||||
#if 0
|
||||
menu->AddItem(item = new(nothrow) MenuItem("Disable IO-APIC"));
|
||||
item->SetType(MENU_ITEM_MARKABLE);
|
||||
item->SetMarked(true);
|
||||
// TODO: disabled by default for now
|
||||
item->SetData(B_SAFEMODE_DISABLE_IOAPIC);
|
||||
item->SetHelpText("Disables using the IO APIC for interrupt handling, "
|
||||
"forcing instead the use of the PIC.");
|
||||
item->SetHelpText("Disables using the IO APIC for interrupt routing, "
|
||||
"forcing the use of the legacy PIC instead.");
|
||||
#else
|
||||
// TODO: This can be removed once IO-APIC code is broadly tested
|
||||
menu->AddItem(item = new(nothrow) MenuItem("Enable IO-APIC"));
|
||||
item->SetType(MENU_ITEM_MARKABLE);
|
||||
item->SetData(B_SAFEMODE_ENABLE_IOAPIC);
|
||||
item->SetHelpText("Enables using the IO APIC for interrupt routing.");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (gKernelArgs.arch_args.apic_phys != 0) {
|
||||
|
||||
@@ -614,11 +614,20 @@ ioapic_init(kernel_args* args)
|
||||
if (sIOAPIC == NULL)
|
||||
return;
|
||||
|
||||
if (get_safemode_boolean(B_SAFEMODE_DISABLE_IOAPIC, true)) {
|
||||
#if 0
|
||||
if (get_safemode_boolean(B_SAFEMODE_DISABLE_IOAPIC, false)) {
|
||||
dprintf("ioapic explicitly disabled, not using ioapics for interrupt "
|
||||
"routing\n");
|
||||
return;
|
||||
}
|
||||
#else
|
||||
// TODO: This can be removed once IO-APIC code is broadly tested
|
||||
if (!get_safemode_boolean(B_SAFEMODE_ENABLE_IOAPIC, false)) {
|
||||
dprintf("ioapic not enabled, not using ioapics for interrupt "
|
||||
"routing\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32 version = ioapic_read_32(IO_APIC_VERSION);
|
||||
if (version == 0xffffffff) {
|
||||
|
||||
Reference in New Issue
Block a user