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
This commit is contained in:
Stefano Ceccherini 2009-09-28 09:42:59 +00:00
parent 1c750281d6
commit 1d958a301e
2 changed files with 19 additions and 14 deletions

View File

@ -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;

View File

@ -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);