UEFI Console, remove Mac quirk fixes #16753

Keyboard don't work on either my machines without removing it

Change-Id: I52285187cbefa5b2c71bd4c086a269153dfdccec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3724
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Fredrik Holmqvist 2021-01-31 21:36:18 +01:00 committed by waddlesplash
parent 3f6f7f7420
commit b08e283a2e

View File

@ -213,46 +213,9 @@ static void update_screen_size(void)
}
static void
console_control(bool graphics)
{
TRACE("Checking for EFI Console Control...\n");
efi_guid consoleControlProtocolGUID = EFI_CONSOLE_CONTROL_PROTOCOL_GUID;
efi_console_control_protocol* consoleControl = NULL;
efi_status status = kSystemTable->BootServices->LocateProtocol(
&consoleControlProtocolGUID, NULL, (void**)&consoleControl);
// Some EFI implementations boot up in an EFI graphics mode (Apple)
// If this protocol doesn't exist, we can assume we're already in text mode.
if (status != EFI_SUCCESS || consoleControl == NULL) {
TRACE("EFI Console Control not found. Skipping.\n");
return;
}
TRACE("Located EFI Console Control. Setting EFI %s mode...\n",
graphics ? "graphics" : "text");
if (graphics) {
status = consoleControl->SetMode(consoleControl,
EfiConsoleControlScreenGraphics);
} else {
status = consoleControl->SetMode(consoleControl,
EfiConsoleControlScreenText);
}
TRACE("Setting EFI %s mode was%s successful.\n",
graphics ? "graphics" : "text", (status == EFI_SUCCESS) ? "" : " not");
}
status_t
console_init(void)
{
// Solves video issues on Apple hardware. This is non-standard and
// deprecated and should not be used for anything else!
console_control(false);
update_screen_size();
console_hide_cursor();
console_clear_screen();
@ -291,7 +254,6 @@ console_check_boot_keys(void)
extern "C" void
platform_switch_to_text_mode(void)
{
console_control(false);
kSystemTable->ConOut->Reset(kSystemTable->ConOut, false);
kSystemTable->ConOut->SetMode(kSystemTable->ConOut, sScreenMode);
}