From: kettenis Date: Tue, 10 Jul 2018 13:05:37 +0000 (+0000) Subject: Add a "machine acpi" command to force booting with ACPI enabled. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=be07ee62c2bb6548c6c3cff8b6b034d6e9e2b44d;p=openbsd Add a "machine acpi" command to force booting with ACPI enabled. --- diff --git a/sys/arch/arm64/stand/efiboot/efiboot.c b/sys/arch/arm64/stand/efiboot/efiboot.c index adf9b434457..df21ad22758 100644 --- a/sys/arch/arm64/stand/efiboot/efiboot.c +++ b/sys/arch/arm64/stand/efiboot/efiboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efiboot.c,v 1.17 2018/06/25 22:39:14 kettenis Exp $ */ +/* $OpenBSD: efiboot.c,v 1.18 2018/07/10 13:05:37 kettenis Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko @@ -358,6 +358,7 @@ efi_framebuffer(void) "simple-framebuffer", strlen("simple-framebuffer") + 1); } +int acpi = 0; char *bootmac = NULL; static EFI_GUID fdt_guid = FDT_TABLE_GUID; @@ -380,7 +381,7 @@ efi_makebootargs(char *bootargs) fdt = ST->ConfigurationTable[i].VendorTable; } - if (fdt == NULL) + if (fdt == NULL || acpi) fdt = efi_acpi(); if (!fdt_init(fdt)) @@ -739,15 +740,24 @@ efi_memprobe_find(UINTN pages, UINTN align, EFI_PHYSICAL_ADDRESS *addr) * Commands */ +int Xacpi_efi(void); int Xexit_efi(void); int Xpoweroff_efi(void); const struct cmd_table cmd_machine[] = { + { "acpi", CMDT_CMD, Xacpi_efi }, { "exit", CMDT_CMD, Xexit_efi }, { "poweroff", CMDT_CMD, Xpoweroff_efi }, { NULL, 0 } }; +int +Xacpi_efi(void) +{ + acpi = 1; + return (0); +} + int Xexit_efi(void) {