summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/arm64/stand/efiboot/efiboot.c7
-rw-r--r--sys/arch/arm64/stand/efiboot/efiboot.h4
-rw-r--r--sys/arch/arm64/stand/efiboot/exec.c4
3 files changed, 9 insertions, 6 deletions
diff --git a/sys/arch/arm64/stand/efiboot/efiboot.c b/sys/arch/arm64/stand/efiboot/efiboot.c
index 786e4a60122..bf25c07fd38 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.28 2020/04/21 07:54:01 kettenis Exp $ */
+/* $OpenBSD: efiboot.c,v 1.29 2020/05/10 11:55:42 kettenis Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -483,12 +483,13 @@ static EFI_GUID fdt_guid = FDT_TABLE_GUID;
#define efi_guidcmp(_a, _b) memcmp((_a), (_b), sizeof(EFI_GUID))
void *
-efi_makebootargs(char *bootargs)
+efi_makebootargs(char *bootargs, int howto)
{
struct sr_boot_volume *bv;
u_char bootduid[8];
u_char zero[8] = { 0 };
uint64_t uefi_system_table = htobe64((uintptr_t)ST);
+ uint32_t boothowto = htobe32(howto);
void *node;
size_t len;
int i;
@@ -513,6 +514,8 @@ efi_makebootargs(char *bootargs)
len = strlen(bootargs) + 1;
fdt_node_add_property(node, "bootargs", bootargs, len);
+ fdt_node_add_property(node, "openbsd,boothowto",
+ &boothowto, sizeof(boothowto));
/* Pass DUID of the boot disk. */
if (bootdev_dip) {
diff --git a/sys/arch/arm64/stand/efiboot/efiboot.h b/sys/arch/arm64/stand/efiboot/efiboot.h
index 47da16cdc1c..749d309c477 100644
--- a/sys/arch/arm64/stand/efiboot/efiboot.h
+++ b/sys/arch/arm64/stand/efiboot/efiboot.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: efiboot.h,v 1.4 2019/08/12 19:17:35 kettenis Exp $ */
+/* $OpenBSD: efiboot.h,v 1.5 2020/05/10 11:55:42 kettenis Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -20,7 +20,7 @@ void *efi_acpi(void);
void efi_cleanup(void);
void efi_diskprobe(void);
void efi_pxeprobe(void);
-void *efi_makebootargs(char *);
+void *efi_makebootargs(char *, int);
void efi_cons_probe(struct consdev *);
void efi_cons_init(struct consdev *);
int efi_cons_getc(dev_t);
diff --git a/sys/arch/arm64/stand/efiboot/exec.c b/sys/arch/arm64/stand/efiboot/exec.c
index 07886ad2dce..d478c44716d 100644
--- a/sys/arch/arm64/stand/efiboot/exec.c
+++ b/sys/arch/arm64/stand/efiboot/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.7 2019/04/10 04:17:34 deraadt Exp $ */
+/* $OpenBSD: exec.c,v 1.8 2020/05/10 11:55:42 kettenis Exp $ */
/*
* Copyright (c) 2006, 2016 Mark Kettenis
@@ -112,7 +112,7 @@ run_loadfile(uint64_t *marks, int howto)
else
*++cp = 0;
- fdt = efi_makebootargs(args);
+ fdt = efi_makebootargs(args, howto);
efi_cleanup();