summaryrefslogtreecommitdiff
path: root/stand
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2018-08-27 11:14:49 +0000
committerAndrew Turner <andrew@FreeBSD.org>2018-08-27 11:14:49 +0000
commit78da60464191371524fd3d85da0a9efe63369497 (patch)
tree092d295c18b5d98a95294d4103909062803b580b /stand
parent9ea0458663f0e58baf933e9919eed9a2de571828 (diff)
downloadsrc-test2-78da60464191371524fd3d85da0a9efe63369497.tar.gz
src-test2-78da60464191371524fd3d85da0a9efe63369497.zip
Notes
Diffstat (limited to 'stand')
-rw-r--r--stand/efi/boot1/Makefile1
-rw-r--r--stand/efi/loader/arch/arm64/start.S17
2 files changed, 18 insertions, 0 deletions
diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile
index 57610292bd83..88bbb312970c 100644
--- a/stand/efi/boot1/Makefile
+++ b/stand/efi/boot1/Makefile
@@ -6,6 +6,7 @@ PROG= boot1.sym
INTERNALPROG=
WARNS?= 6
+CFLAGS+= -DEFI_BOOT1
# We implement a slightly non-standard %S in that it always takes a
# CHAR16 that's common in UEFI-land instead of a wchar_t. This only
# seems to matter on arm64 where wchar_t defaults to an int instead
diff --git a/stand/efi/loader/arch/arm64/start.S b/stand/efi/loader/arch/arm64/start.S
index b58c2c50be9f..bddc2d088a64 100644
--- a/stand/efi/loader/arch/arm64/start.S
+++ b/stand/efi/loader/arch/arm64/start.S
@@ -160,6 +160,23 @@ _start:
ldp x0, x1, [sp], #16
+#ifndef EFI_BOOT1
+ /*
+ * Load the stack to use. The default stack may be too small for
+ * the lua loader.
+ */
+ adr x2, initstack_end
+ mov sp, x2
+#endif
+
bl efi_main
1: b 1b
+
+#ifndef EFI_BOOT1
+.bss
+ .align 4
+initstack:
+ .space (64 * 1024)
+initstack_end:
+#endif