efi: Actually add items to safemode menu.

The call to smp_... is not working since it relies on gKernelArgs being
fully initialized, which it isn't at this stage in the EFI loader. Jessica
says that in order to have that happen, the heap would also need to be
initialized early, which it also is not.

At least you can now force a safe videomode, which is enough for me to
be able to test video drivers.
This commit is contained in:
Augustin Cavalier
2018-06-09 22:21:21 -04:00
parent a9edb9bffa
commit 98a4ebbe3c
+26
View File
@@ -6,9 +6,11 @@
#include <boot/menu.h>
#include <boot/platform/generic/text_menu.h>
#include <safemode.h>
#include "efi_platform.h"
#include "video.h"
#include "smp.h"
void
@@ -26,6 +28,30 @@ platform_add_menus(Menu *menu)
}
break;
case SAFE_MODE_MENU:
item = new(std::nothrow) MenuItem("Use fail-safe graphics driver");
if (item != NULL) {
menu->AddItem(item);
item->SetType(MENU_ITEM_MARKABLE);
item->SetData(B_SAFEMODE_FAIL_SAFE_VIDEO_MODE);
item->SetHelpText("The system will use VESA mode "
"and won't try to use any video graphics drivers.");
}
smp_add_safemode_menus(menu);
item = new(std::nothrow) MenuItem("Disable ACPI");
if (item != NULL) {
menu->AddItem(item);
item->SetType(MENU_ITEM_MARKABLE);
item->SetData(B_SAFEMODE_DISABLE_ACPI);
item->SetHelpText("Disables Advanced Configuration and Power "
"Interface hardware support, overriding the ACPI setting "
"in the kernel settings file.");
}
break;
default:
break;
}