1 /* 2 * Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7 #include "smp.h" 8 #include "video.h" 9 10 #include <boot/menu.h> 11 #include <boot/platform/generic/text_menu.h> 12 #include <safemode.h> 13 14 15 void 16 platform_add_menus(Menu *menu) 17 { 18 MenuItem *item; 19 20 switch (menu->Type()) { 21 case MAIN_MENU: 22 menu->AddItem(item = new(nothrow) MenuItem("Select fail-safe video mode", video_mode_menu())); 23 item->SetTarget(video_mode_hook); 24 break; 25 case SAFE_MODE_MENU: 26 menu->AddItem(item = new(nothrow) MenuItem("Use fail-safe video mode")); 27 item->SetType(MENU_ITEM_MARKABLE); 28 item->SetData(B_SAFEMODE_FAIL_SAFE_VIDEO_MODE); 29 item->SetHelpText("The system will use VESA mode and won't try to open any video graphics driver"); 30 31 smp_add_safemode_menus(menu); 32 33 menu->AddItem(item = new(nothrow) MenuItem("Don't call the BIOS")); 34 item->SetType(MENU_ITEM_MARKABLE); 35 36 menu->AddItem(item = new(nothrow) MenuItem("Disable APM")); 37 item->SetType(MENU_ITEM_MARKABLE); 38 item->SetData("disable_apm"); 39 item->SetHelpText("This overrides the APM setting in the kernel settings file"); 40 41 menu->AddItem(item = new(nothrow) MenuItem("Disable ACPI")); 42 item->SetType(MENU_ITEM_MARKABLE); 43 item->SetData(B_SAFEMODE_DISABLE_ACPI); 44 item->SetHelpText("This overrides the ACPI setting in the kernel settings file"); 45 break; 46 default: 47 break; 48 } 49 } 50 51 52 void 53 platform_update_menu_item(Menu *menu, MenuItem *item) 54 { 55 platform_generic_update_text_menu_item(menu, item); 56 } 57 58 59 void 60 platform_run_menu(Menu *menu) 61 { 62 platform_generic_run_text_menu(menu); 63 } 64 65