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
This commit is contained in:
Stefano Ceccherini
2009-09-15 17:43:30 +00:00
parent 9142bf3404
commit 24ca62447c
+20 -11
View File
@@ -7,6 +7,10 @@
#include "smp.h" #include "smp.h"
#include "video.h" #include "video.h"
// TODO: Move these away!
#include <arch/x86/arch_apic.h>
#include <boot/stage2.h>
#include <boot/menu.h> #include <boot/menu.h>
#include <boot/platform/generic/text_menu.h> #include <boot/platform/generic/text_menu.h>
#include <safemode.h> #include <safemode.h>
@@ -48,17 +52,22 @@ platform_add_menus(Menu *menu)
"Interface hardware support, overriding the ACPI setting " "Interface hardware support, overriding the ACPI setting "
"in the kernel settings file."); "in the kernel settings file.");
menu->AddItem(item = new(nothrow) MenuItem("Disable IO-APIC")); #if 0
item->SetType(MENU_ITEM_MARKABLE); // TODO: IOAPIC isn't yet used anywhere
item->SetData(B_SAFEMODE_DISABLE_IOAPIC); if (gKernelArgs.arch_args.ioapic != NULL) {
item->SetHelpText("Disables using the IO APIC for interrupt handling, " menu->AddItem(item = new(nothrow) MenuItem("Disable IO-APIC"));
"forcing instead the use of the PIC."); item->SetType(MENU_ITEM_MARKABLE);
item->SetData(B_SAFEMODE_DISABLE_IOAPIC);
menu->AddItem(item = new(nothrow) MenuItem("Disable APIC Timers")); item->SetHelpText("Disables using the IO APIC for interrupt handling, "
item->SetType(MENU_ITEM_MARKABLE); "forcing instead the use of the PIC.");
item->SetData(B_SAFEMODE_DISABLE_APIC); }
item->SetHelpText("Disables using the APIC timers for timekeeping"); #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; break;
default: default:
break; break;