summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-05-14 18:04:03 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-05-14 18:04:03 +0000
commit8c28b10a3a8470f4406e5beae41ec0221373751e (patch)
tree724d34939d2f5d9940300c4696e87aec647805fb /sys/arch
parent8cf53b93e72e0b00e611f9dcf3248ba05fe1e14e (diff)
Load the kernel at the address pre-allocated by the EFI bootloader.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/armv7/include/loadfile_machdep.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/armv7/include/loadfile_machdep.h b/sys/arch/armv7/include/loadfile_machdep.h
index bc9c62ed082..ec044802bba 100644
--- a/sys/arch/armv7/include/loadfile_machdep.h
+++ b/sys/arch/armv7/include/loadfile_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: loadfile_machdep.h,v 1.3 2015/07/17 20:44:38 miod Exp $ */
+/* $OpenBSD: loadfile_machdep.h,v 1.4 2016/05/14 18:04:02 kettenis Exp $ */
/* $NetBSD: loadfile_machdep.h,v 1.1 1999/04/29 03:17:12 tsubai Exp $ */
/*-
@@ -36,7 +36,9 @@
#define LOAD_KERNEL LOAD_ALL
#define COUNT_KERNEL COUNT_ALL
-#define LOADADDR(a) ((((u_long)(a)) + offset)&0xfffffff)
+extern u_long efi_loadaddr;
+#define LOADADDR(a) (((((u_long)(a)) + offset)&0xfffffff) + \
+ efi_loadaddr)
#define ALIGNENTRY(a) ((u_long)(a))
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))