summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-07-10 13:05:38 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-07-10 13:05:38 +0000
commita85411f1658e1ab02227f7a418aa70b7e804a56f (patch)
treeffca1c7e8b5f6c5179bc89da272181ba65705c02
parentbff6d97a5d792d5919e274687ab7d30064d1517b (diff)
Add a "machine acpi" command to force booting with ACPI enabled.
-rw-r--r--sys/arch/arm64/stand/efiboot/efiboot.c14
1 files changed, 12 insertions, 2 deletions
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 <yasuoka@yasuoka.net>
@@ -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,16 +740,25 @@ 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)
{
EFI_CALL(BS->Exit, IH, 0, 0, NULL);