From 24ca62447ca937f3c657584bb14af9fa2f62793d Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Tue, 15 Sep 2009 17:43:30 +0000 Subject: [PATCH] Only show the "Disable APIC" option if an APIC is found. Same for the IOAPIC, but commented out the code, since we're not using the IOAPIC yet. Also renamed the option to "Disable LOCAL APIC", since it's more correct. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33147 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/bios_ia32/menu.cpp | 31 +++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/system/boot/platform/bios_ia32/menu.cpp b/src/system/boot/platform/bios_ia32/menu.cpp index 19d8aac223..35906d6fa6 100644 --- a/src/system/boot/platform/bios_ia32/menu.cpp +++ b/src/system/boot/platform/bios_ia32/menu.cpp @@ -7,6 +7,10 @@ #include "smp.h" #include "video.h" +// TODO: Move these away! +#include +#include + #include #include #include @@ -48,17 +52,22 @@ platform_add_menus(Menu *menu) "Interface hardware support, overriding the ACPI setting " "in the kernel settings file."); - menu->AddItem(item = new(nothrow) MenuItem("Disable IO-APIC")); - item->SetType(MENU_ITEM_MARKABLE); - item->SetData(B_SAFEMODE_DISABLE_IOAPIC); - item->SetHelpText("Disables using the IO APIC for interrupt handling, " - "forcing instead the use of the PIC."); - - menu->AddItem(item = new(nothrow) MenuItem("Disable APIC Timers")); - item->SetType(MENU_ITEM_MARKABLE); - item->SetData(B_SAFEMODE_DISABLE_APIC); - item->SetHelpText("Disables using the APIC timers for timekeeping"); - +#if 0 + // TODO: IOAPIC isn't yet used anywhere + if (gKernelArgs.arch_args.ioapic != NULL) { + menu->AddItem(item = new(nothrow) MenuItem("Disable IO-APIC")); + item->SetType(MENU_ITEM_MARKABLE); + item->SetData(B_SAFEMODE_DISABLE_IOAPIC); + item->SetHelpText("Disables using the IO APIC for interrupt handling, " + "forcing instead the use of the PIC."); + } +#endif + if (gKernelArgs.arch_args.apic != NULL) { + menu->AddItem(item = new(nothrow) MenuItem("Disable APIC Timers")); + item->SetType(MENU_ITEM_MARKABLE); + item->SetData(B_SAFEMODE_DISABLE_APIC); + item->SetHelpText("Disables using the LOCAL APIC for timekeeping."); + } break; default: break;