Index: sys/arch/aarch64/conf/kern.ldscript =================================================================== RCS file: /cvsroot/src/sys/arch/aarch64/conf/kern.ldscript,v retrieving revision 1.9 diff -u -p -r1.9 kern.ldscript --- sys/arch/aarch64/conf/kern.ldscript 10 Sep 2018 17:25:21 -0000 1.9 +++ sys/arch/aarch64/conf/kern.ldscript 24 Sep 2018 08:42:58 -0000 @@ -8,7 +8,7 @@ ENTRY(_start) SECTIONS { - .text : + .text : AT (ADDR(.text) & 0x0fffffff) { PROVIDE(__kernel_text = .); *(.text) Index: sys/arch/evbarm/include/loadfile_machdep.h =================================================================== RCS file: /cvsroot/src/sys/arch/evbarm/include/loadfile_machdep.h,v retrieving revision 1.6 diff -u -p -r1.6 loadfile_machdep.h --- sys/arch/evbarm/include/loadfile_machdep.h 15 Sep 2018 17:05:56 -0000 1.6 +++ sys/arch/evbarm/include/loadfile_machdep.h 24 Sep 2018 08:43:01 -0000 @@ -8,12 +8,7 @@ #define LOAD_KERNEL (LOAD_ALL & ~LOAD_TEXTA) #define COUNT_KERNEL (COUNT_ALL & ~COUNT_TEXTA) -#if defined(__aarch64__) -extern u_long load_offset; -#define LOADADDR(a) (((((u_long)(a)) + offset) & 0x3fffffffff) + load_offset) -#else #define LOADADDR(a) (((u_long)(a))) -#endif #define ALIGNENTRY(a) ((u_long)(a)) #define READ(f, b, c) read((f), (void*)LOADADDR(b), (c)) #define BCOPY(s, d, c) memmove((void*)LOADADDR(d), (void*)(s), (c)) Index: sys/stand/efiboot/exec.c =================================================================== RCS file: /cvsroot/src/sys/stand/efiboot/exec.c,v retrieving revision 1.6 diff -u -p -r1.6 exec.c --- sys/stand/efiboot/exec.c 15 Sep 2018 17:06:32 -0000 1.6 +++ sys/stand/efiboot/exec.c 24 Sep 2018 08:43:18 -0000 @@ -31,8 +31,6 @@ #include -u_long load_offset = 0; - #define FDT_SPACE (4 * 1024 * 1024) #define FDT_ALIGN ((2 * 1024 * 1024) - 1) @@ -143,14 +141,13 @@ exec_netbsd(const char *fname, const cha } memset(marks, 0, sizeof(marks)); - load_offset = (addr + EFIBOOT_ALIGN) & ~(EFIBOOT_ALIGN - 1); + marks[MARK_START] = (addr + EFIBOOT_ALIGN) & ~(EFIBOOT_ALIGN - 1); fd = loadfile(fname, marks, LOAD_KERNEL); if (fd < 0) { printf("boot: %s: %s\n", fname, strerror(errno)); goto cleanup; } close(fd); - load_offset = 0; if (dtb_addr && efi_fdt_set_data((void *)dtb_addr) != 0) { printf("boot: invalid DTB data\n");