From 1d958a301eb6860ac2b3a6ce6749a8163408a80e Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 28 Sep 2009 09:42:59 +0000 Subject: [PATCH] Moved the "disable APIC" menu(s) to smp.cpp. Also only enable them if there's an APIC. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33333 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/bios_ia32/menu.cpp | 13 ------------- src/system/boot/platform/bios_ia32/smp.cpp | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/system/boot/platform/bios_ia32/menu.cpp b/src/system/boot/platform/bios_ia32/menu.cpp index 174a1a9173..97b00a3593 100644 --- a/src/system/boot/platform/bios_ia32/menu.cpp +++ b/src/system/boot/platform/bios_ia32/menu.cpp @@ -48,19 +48,6 @@ platform_add_menus(Menu *menu) "Interface hardware support, overriding the ACPI setting " "in the kernel settings file."); -#if 0 - // TODO: IOAPIC isn't yet used anywhere - 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 - menu->AddItem(item = new(nothrow) MenuItem("Disable LOCAL APIC")); - item->SetType(MENU_ITEM_MARKABLE); - item->SetData(B_SAFEMODE_DISABLE_APIC); - item->SetHelpText("Disables using the LOCAL APIC for timekeeping."); - break; default: break; diff --git a/src/system/boot/platform/bios_ia32/smp.cpp b/src/system/boot/platform/bios_ia32/smp.cpp index 6e7b41cb52..b300e840d4 100644 --- a/src/system/boot/platform/bios_ia32/smp.cpp +++ b/src/system/boot/platform/bios_ia32/smp.cpp @@ -570,10 +570,28 @@ dprintf("wait for delivery\n"); void smp_add_safemode_menus(Menu *menu) { + MenuItem *item; +#if 0 + if (gKernelArgs.arch_args.ioapic_phys != 0) { + // TODO: IOAPIC isn't yet used anywhere + 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_phys != 0) { + menu->AddItem(item = new(nothrow) MenuItem("Disable LOCAL APIC")); + item->SetType(MENU_ITEM_MARKABLE); + item->SetData(B_SAFEMODE_DISABLE_APIC); + item->SetHelpText("Disables using the LOCAL APIC for timekeeping."); + } + if (gKernelArgs.num_cpus < 2) return; - MenuItem *item = new(nothrow) MenuItem("Disable SMP"); + item = new(nothrow) MenuItem("Disable SMP"); menu->AddItem(item); item->SetData(B_SAFEMODE_DISABLE_SMP); item->SetType(MENU_ITEM_MARKABLE);