Module Name: src Committed By: jmcneill Date: Wed Dec 4 11:24:31 UTC 2019
Modified Files: src/sys/arch/aarch64/aarch64: start.S src/sys/arch/aarch64/conf: Makefile.aarch64 Log Message: Fix alignment of .text section by changing load address to 0xffffffc000000000 and adding 64 bytes of padding before the entry point. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/aarch64/start.S cvs rdiff -u -r1.15 -r1.16 src/sys/arch/aarch64/conf/Makefile.aarch64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/aarch64/aarch64/start.S diff -u src/sys/arch/aarch64/aarch64/start.S:1.2 src/sys/arch/aarch64/aarch64/start.S:1.3 --- src/sys/arch/aarch64/aarch64/start.S:1.2 Thu Oct 18 09:01:51 2018 +++ src/sys/arch/aarch64/aarch64/start.S Wed Dec 4 11:24:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: start.S,v 1.2 2018/10/18 09:01:51 skrll Exp $ */ +/* $NetBSD: start.S,v 1.3 2019/12/04 11:24:31 jmcneill Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu <r...@nerv.org> @@ -32,7 +32,7 @@ #include <aarch64/asm.h> -RCSID("$NetBSD: start.S,v 1.2 2018/10/18 09:01:51 skrll Exp $") +RCSID("$NetBSD: start.S,v 1.3 2019/12/04 11:24:31 jmcneill Exp $") /* load far effective address (pc relative) */ .macro ADDR, reg, addr @@ -41,6 +41,11 @@ RCSID("$NetBSD: start.S,v 1.2 2018/10/18 .endm /* + * Padding at start of kernel image to make room for 64-byte header (non-ELF booting) + */ +.space 64, 0x0 + +/* * Kernel start routine for aarch64 boards. */ .global start Index: src/sys/arch/aarch64/conf/Makefile.aarch64 diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.15 src/sys/arch/aarch64/conf/Makefile.aarch64:1.16 --- src/sys/arch/aarch64/conf/Makefile.aarch64:1.15 Sun Mar 3 07:04:40 2019 +++ src/sys/arch/aarch64/conf/Makefile.aarch64 Wed Dec 4 11:24:31 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.aarch64,v 1.15 2019/03/03 07:04:40 maxv Exp $ +# $NetBSD: Makefile.aarch64,v 1.16 2019/12/04 11:24:31 jmcneill Exp $ # Makefile for NetBSD # @@ -74,7 +74,7 @@ locore.o: ${ARM}/aarch64/locore.S assym. ## (5) link settings ## KERNLDSCRIPT?= ${ARM}/conf/kern.ldscript -LOADADDRESS?= 0xffffffc000000040 +LOADADDRESS?= 0xffffffc000000000 LINKFLAGS_NORMAL= -X # Strip AArch64 mapping symbols from the kernel image, as they interfere