CVS commit: src/sys/arch/aarch64/conf

2021-05-27 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu May 27 06:19:38 UTC 2021

Modified Files:
src/sys/arch/aarch64/conf: Makefile.aarch64

Log Message:
In gcc10, -msign-return-address is no longer supported.
Instead, (LLVM-compatible) -mbranch-protection option is supported.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 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/conf/Makefile.aarch64
diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.22 src/sys/arch/aarch64/conf/Makefile.aarch64:1.23
--- src/sys/arch/aarch64/conf/Makefile.aarch64:1.22	Wed Feb 10 08:25:01 2021
+++ src/sys/arch/aarch64/conf/Makefile.aarch64	Thu May 27 06:19:38 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.aarch64,v 1.22 2021/02/10 08:25:01 ryo Exp $
+#	$NetBSD: Makefile.aarch64,v 1.23 2021/05/27 06:19:38 ryo Exp $
 
 # Makefile for NetBSD
 #
@@ -44,7 +44,6 @@ CFLAGS+=	-mno-omit-leaf-frame-pointer
 CFLAGS+=	-fno-optimize-sibling-calls
 .endif
 
-.if ${HAVE_LLVM:Uno} == "yes"
 .if ${ARMV83_PAC:U0} > 0 && ${ARMV85_BTI:U0} > 0
 CFLAGS+=	-mbranch-protection=pac-ret+bti
 .else
@@ -55,16 +54,6 @@ CFLAGS+=	-mbranch-protection=pac-ret
 CFLAGS+=	-mbranch-protection=bti
 .endif
 .endif
-.endif
-
-.if ${HAVE_GCC:U0} > 0
-.if ${ARMV83_PAC:U0} > 0
-CFLAGS+=	-msign-return-address=all
-.endif
-.if ${ARMV85_BTI:U0} > 0
-# XXX: notyet for gcc
-.endif
-.endif
 
 .if ${KASAN:U0} > 0 && ${HAVE_GCC:U0} > 0
 KASANFLAGS=	-fsanitize=kernel-address \



CVS commit: src/sys/arch/aarch64/conf

2020-04-13 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Apr 13 07:32:36 UTC 2020

Modified Files:
src/sys/arch/aarch64/conf: Makefile.aarch64

Log Message:
Add KASAN instrumentation on on-stack VLAs, same as amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 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/conf/Makefile.aarch64
diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.19 src/sys/arch/aarch64/conf/Makefile.aarch64:1.20
--- src/sys/arch/aarch64/conf/Makefile.aarch64:1.19	Mon Apr 13 05:40:25 2020
+++ src/sys/arch/aarch64/conf/Makefile.aarch64	Mon Apr 13 07:32:36 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.aarch64,v 1.19 2020/04/13 05:40:25 maxv Exp $
+#	$NetBSD: Makefile.aarch64,v 1.20 2020/04/13 07:32:36 maxv Exp $
 
 # Makefile for NetBSD
 #
@@ -55,6 +55,7 @@ CFLAGS+=	-mbranch-protection=bti
 .if ${KASAN:U0} > 0 && ${HAVE_GCC:U0} > 0
 KASANFLAGS=	-fsanitize=kernel-address \
 		--param asan-globals=1 --param asan-stack=1 \
+		--param asan-instrument-allocas=1 \
 		-fsanitize-address-use-after-scope \
 		-fasan-shadow-offset=0xDFFF6000
 .for f in subr_asan.c



CVS commit: src/sys/arch/aarch64/conf

2020-01-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan 21 04:54:11 UTC 2020

Modified Files:
src/sys/arch/aarch64/conf: files.aarch64

Log Message:
Small re-org.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/conf/files.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/conf/files.aarch64
diff -u src/sys/arch/aarch64/conf/files.aarch64:1.17 src/sys/arch/aarch64/conf/files.aarch64:1.18
--- src/sys/arch/aarch64/conf/files.aarch64:1.17	Wed Jan 15 08:34:04 2020
+++ src/sys/arch/aarch64/conf/files.aarch64	Tue Jan 21 04:54:11 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.aarch64,v 1.17 2020/01/15 08:34:04 mrg Exp $
+#	$NetBSD: files.aarch64,v 1.18 2020/01/21 04:54:11 skrll Exp $
 
 defflag opt_cpuoptions.h	AARCH64_ALIGNMENT_CHECK
 defflag opt_cpuoptions.h	AARCH64_EL0_STACK_ALIGNMENT_CHECK
@@ -40,10 +40,6 @@ defparam opt_console.h		CONADDR
 # FP support
 file	arch/aarch64/aarch64/fpu.c
 
-file	arch/arm/arm/arm_generic_dma.c
-file	arch/arm/arm/arm_cpu_topology.c
-file	arch/arm/arm32/bus_dma.c
-
 device	psci
 file	arch/arm/arm/psci.c			psci
 file	arch/arm/arm/psci_arm.S			psci
@@ -87,7 +83,10 @@ file	arch/aarch64/aarch64/bus_space_asm_
 file	arch/aarch64/aarch64/bus_space_notimpl.S
 
 # Standard files
+file	arch/arm/arm/arm_cpu_topology.c
+file	arch/arm/arm/arm_generic_dma.c
 file	arch/arm/arm/bootconfig.c
+file	arch/arm/arm32/bus_dma.c
 file	arch/aarch64/aarch64/aarch64_machdep.c
 file	arch/aarch64/aarch64/aarch64_reboot.c
 file	arch/aarch64/aarch64/core_machdep.c		coredump



CVS commit: src/sys/arch/aarch64/conf

2019-03-02 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Mar  3 07:04:40 UTC 2019

Modified Files:
src/sys/arch/aarch64/conf: Makefile.aarch64

Log Message:
Add KASAN use-after-scope detection in aarch64, tested by Ryo Shimizu,
thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 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/conf/Makefile.aarch64
diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.14 src/sys/arch/aarch64/conf/Makefile.aarch64:1.15
--- src/sys/arch/aarch64/conf/Makefile.aarch64:1.14	Thu Nov  8 08:28:07 2018
+++ src/sys/arch/aarch64/conf/Makefile.aarch64	Sun Mar  3 07:04:40 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.aarch64,v 1.14 2018/11/08 08:28:07 maxv Exp $
+#	$NetBSD: Makefile.aarch64,v 1.15 2019/03/03 07:04:40 maxv Exp $
 
 # Makefile for NetBSD
 #
@@ -42,6 +42,7 @@ CFLAGS+=	-mno-omit-leaf-frame-pointer
 .if ${KASAN:U0} > 0 && ${HAVE_GCC:U0} > 0
 KASANFLAGS=	-fsanitize=kernel-address \
 		--param asan-globals=1 --param asan-stack=1 \
+		-fsanitize-address-use-after-scope \
 		-fasan-shadow-offset=0xDFFF2080
 .for f in subr_asan.c
 KASANFLAGS.${f}=	# empty



CVS commit: src/sys/arch/aarch64/conf

2018-12-05 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Dec  5 22:42:27 UTC 2018

Modified Files:
src/sys/arch/aarch64/conf: files.aarch64

Log Message:
Add needs-flag to tprof_armv8.c


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/aarch64/conf/files.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/conf/files.aarch64
diff -u src/sys/arch/aarch64/conf/files.aarch64:1.11 src/sys/arch/aarch64/conf/files.aarch64:1.12
--- src/sys/arch/aarch64/conf/files.aarch64:1.11	Wed Dec  5 21:43:33 2018
+++ src/sys/arch/aarch64/conf/files.aarch64	Wed Dec  5 22:42:27 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.aarch64,v 1.11 2018/12/05 21:43:33 jmcneill Exp $
+#	$NetBSD: files.aarch64,v 1.12 2018/12/05 22:42:27 jmcneill Exp $
 
 defflag opt_cpuoptions.h	AARCH64_ALIGNMENT_CHECK
 defflag opt_cpuoptions.h	AARCH64_EL0_STACK_ALIGNMENT_CHECK
@@ -139,4 +139,4 @@ file	arch/aarch64/aarch64/netbsd32_sysca
 #file	arch/aarch64/aarch64/linux_trap.c	compat_linux
 
 # profiling support
-file	dev/tprof/tprof_armv8.c			tprof
+file	dev/tprof/tprof_armv8.c			tprof	needs-flag



CVS commit: src/sys/arch/aarch64/conf

2018-10-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct  7 18:03:59 UTC 2018

Modified Files:
src/sys/arch/aarch64/conf: kern.ldscript

Log Message:
Don't use a magic number for COHERENCY_UNIT use COHERENCY_UNIT


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/conf/kern.ldscript

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/conf/kern.ldscript
diff -u src/sys/arch/aarch64/conf/kern.ldscript:1.9 src/sys/arch/aarch64/conf/kern.ldscript:1.10
--- src/sys/arch/aarch64/conf/kern.ldscript:1.9	Mon Sep 10 17:25:21 2018
+++ src/sys/arch/aarch64/conf/kern.ldscript	Sun Oct  7 18:03:59 2018
@@ -42,17 +42,17 @@ SECTIONS
 		*(.data)
 	}
 
-	. = ALIGN(64);	/* COHERENCY_UNIT */
+	. = ALIGN(COHERENCY_UNIT);
 	.data.cacheline_aligned :
 	{
 		*(.data.cacheline_aligned)
 	}
-	. = ALIGN(64);	/* COHERENCY_UNIT */
+	. = ALIGN(COHERENCY_UNIT);
 	.data.read_mostly :
 	{
 		*(.data.read_mostly)
 	}
-	. = ALIGN(64);	/* COHERENCY_UNIT */
+	. = ALIGN(COHERENCY_UNIT);
 
 	_edata = .;
 	PROVIDE (edata = .);



CVS commit: src/sys/arch/aarch64/conf

2018-09-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Sep 21 16:53:20 UTC 2018

Modified Files:
src/sys/arch/aarch64/conf: files.aarch64

Log Message:
catch up to files.arm's recent "opt_console.h" changes


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/aarch64/conf/files.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/conf/files.aarch64
diff -u src/sys/arch/aarch64/conf/files.aarch64:1.3 src/sys/arch/aarch64/conf/files.aarch64:1.4
--- src/sys/arch/aarch64/conf/files.aarch64:1.3	Sun Apr  1 04:35:03 2018
+++ src/sys/arch/aarch64/conf/files.aarch64	Fri Sep 21 16:53:20 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.aarch64,v 1.3 2018/04/01 04:35:03 ryo Exp $
+#	$NetBSD: files.aarch64,v 1.4 2018/09/21 16:53:20 jakllsch Exp $
 
 defflag opt_cpuoptions.h	AARCH64_ALIGNMENT_CHECK
 defflag opt_cpuoptions.h	AARCH64_EL0_STACK_ALIGNMENT_CHECK
@@ -27,13 +27,19 @@ defflag  opt_arm_bus_space.h	__BUS_SPACE
 _ARM32_NEED_BUS_DMA_BOUNCE
 BUSDMA_COUNTERS
 
+# Console options
+defparam opt_console.h		CONSADDR
+defparam opt_console.h		CONSPEED
+defparam opt_console.h		CONMODE
+defparam opt_console.h		CONADDR
+
+# Power State Coordination Interface (PSCI)
 # FP support
 file	arch/aarch64/aarch64/fpu.c
 
 file	arch/arm/arm/arm_generic_dma.c
 file	arch/arm/arm32/bus_dma.c
 
-# Power State Coordination Interface (PSCI)
 device	psci
 file	arch/arm/arm/psci.c			psci
 file	arch/arm/arm/psci_arm.S			psci



CVS commit: src/sys/arch/aarch64/conf

2018-09-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Sep 14 08:51:07 UTC 2018

Modified Files:
src/sys/arch/aarch64/conf: Makefile.aarch64

Log Message:
s/A64/ARM/

no functional change


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 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/conf/Makefile.aarch64
diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.10 src/sys/arch/aarch64/conf/Makefile.aarch64:1.11
--- src/sys/arch/aarch64/conf/Makefile.aarch64:1.10	Sat Jun 23 01:51:03 2018
+++ src/sys/arch/aarch64/conf/Makefile.aarch64	Fri Sep 14 08:51:06 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.aarch64,v 1.10 2018/06/23 01:51:03 jakllsch Exp $
+#	$NetBSD: Makefile.aarch64,v 1.11 2018/09/14 08:51:06 skrll Exp $
 
 # Makefile for NetBSD
 #
@@ -25,8 +25,8 @@ NEED_OWN_INSTALL_TARGET?=no
 ## (1) port identification
 ##
 THISARM=	$S/arch/${MACHINE}
-A64=		$S/arch/aarch64
-GENASSYM_CONF=	${A64}/aarch64/genassym.cf
+ARM=		$S/arch/aarch64
+GENASSYM_CONF=	${ARM}/aarch64/genassym.cf
 .-include "$S/arch/${MACHINE}/conf/Makefile.${MACHINE}.inc"
 
 ##
@@ -50,20 +50,20 @@ KERN_AS=	obj
 ##
 MD_OBJS+=	${SYSTEM_FIRST_OBJ} locore.o
 MD_CFILES+=
-MD_SFILES+=	${SYSTEM_FIRST_SFILE} ${A64}/aarch64/locore.S
+MD_SFILES+=	${SYSTEM_FIRST_SFILE} ${ARM}/aarch64/locore.S
 
 .if defined(SYSTEM_FIRST_OBJ)
 ${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFILE} assym.h
 	${NORMAL_S}
 .endif
 
-locore.o: ${A64}/aarch64/locore.S assym.h
+locore.o: ${ARM}/aarch64/locore.S assym.h
 	${NORMAL_S}
 
 ##
 ## (5) link settings
 ##
-KERNLDSCRIPT?=	${A64}/conf/kern.ldscript
+KERNLDSCRIPT?=	${ARM}/conf/kern.ldscript
 LOADADDRESS?=	0xffc00040
 LINKFLAGS_NORMAL=	-X
 



CVS commit: src/sys/arch/aarch64/conf

2018-09-10 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Sep 10 17:25:21 UTC 2018

Modified Files:
src/sys/arch/aarch64/conf: kern.ldscript

Log Message:
reduce the battlefield


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/conf/kern.ldscript

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/conf/kern.ldscript
diff -u src/sys/arch/aarch64/conf/kern.ldscript:1.8 src/sys/arch/aarch64/conf/kern.ldscript:1.9
--- src/sys/arch/aarch64/conf/kern.ldscript:1.8	Thu Aug 30 10:30:05 2018
+++ src/sys/arch/aarch64/conf/kern.ldscript	Mon Sep 10 17:25:21 2018
@@ -10,55 +10,37 @@ SECTIONS
 {
 	.text :
 	{
-		PROVIDE (__kernel_text = .);
-		PROVIDE_HIDDEN (__eprol = .);
+		PROVIDE(__kernel_text = .);
 		*(.text)
-		*(.text.unlikely .text.*_unlikely)
-		*(.text.exit .text.exit.*)
-		*(.text.startup .text.startup.*)
-		*(.text.hot .text.hot.*)
-		*(.stub .text.* .gnu.linkonce.t.*)
-		/* .gnu.warning sections are handled specially by elf32.em.  */
+		*(.text.*)
+		*(.stub)
 	} =0
 
 	/* Move .rodata to the next L2 block to set unexecutable */
-	. = ALIGN (L2_SIZE);
-	PROVIDE (__rodata_start = .);
-	.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
-	.rodata1: { *(.rodata1) }
-	.eh_frame_hdr : { *(.eh_frame_hdr) }
-	.eh_frame   : ONLY_IF_RO { KEEP (*(.eh_frame)) }
-	.gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
-	.gcc_except_table.*) }
-
-	/* These sections are generated by the Sun/Oracle C++ compiler.  */
-	.exception_ranges   : ONLY_IF_RO { *(.exception_ranges
-	.exception_ranges*) }
-	PROVIDE (__etext = .);
-	PROVIDE (_etext = .);
-	PROVIDE (etext = .);
+	. = ALIGN(L2_SIZE);
+
+	PROVIDE(__rodata_start = .);
+	.rodata :
+	{
+		*(.rodata)
+		*(.rodata.*)
+	}
+
+	PROVIDE(_etext = .);
+	PROVIDE(etext = .);
 
 	/*
 	 * Adjust the address for the data segment. Move .data to the next
 	 * L2 block, and .text and .rodata will be set readonly if needed.
 	 */
-	PROVIDE (_erodata = .);
-	. = ALIGN (L2_SIZE);
-	. = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
-	/* Exception handling  */
-	.eh_frame   : ONLY_IF_RW { KEEP (*(.eh_frame)) }
-	.gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
-	.exception_ranges   : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
-	.got: { *(.got) *(.igot) }
-	. = DATA_SEGMENT_RELRO_END (24, .);
-	.got.plt: { *(.got.plt)  *(.igot.plt) }
-	.data   :
+	PROVIDE(_erodata = .);
+	. = ALIGN(L2_SIZE);
+
+	.data :
 	{
-		PROVIDE (__data_start = .);
-		*(.data .gnu.linkonce.d.*)
-		SORT(CONSTRUCTORS)
+		PROVIDE(__data_start = .);
+		*(.data)
 	}
-	.data1  : { *(.data1) }
 
 	. = ALIGN(64);	/* COHERENCY_UNIT */
 	.data.cacheline_aligned :
@@ -72,15 +54,15 @@ SECTIONS
 	}
 	. = ALIGN(64);	/* COHERENCY_UNIT */
 
-	_edata = .; PROVIDE (edata = .);
-	. = .;
+	_edata = .;
+	PROVIDE (edata = .);
 
 	__bss_start = .;
 	__bss_start__ = .;
 	.bss :
 	{
-		*(.dynbss)
-		*(.bss .bss.* .gnu.linkonce.b.*)
+		*(.bss)
+		*(.bss.*)
 		*(COMMON)
 
 		/*
@@ -94,13 +76,11 @@ SECTIONS
 		 */
 		. = ALIGN(. != 0 ? 32 / 8 : 1);
 	}
-	_bss_end__ = . ; __bss_end__ = . ;
-	. = ALIGN(32 / 8);
+	_bss_end__ = . ;
+	__bss_end__ = . ;
 	. = ALIGN(32 / 8);
 
 	__end__ = . ;
-	_end = .; PROVIDE (end = .);
-	. = DATA_SEGMENT_END (.);
-	.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
-	.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
+	_end = .;
+	PROVIDE(end = .);
 }



CVS commit: src/sys/arch/aarch64/conf

2018-08-30 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu Aug 30 10:30:06 UTC 2018

Modified Files:
src/sys/arch/aarch64/conf: kern.ldscript

Log Message:
style, no functional change


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/conf/kern.ldscript

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/conf/kern.ldscript
diff -u src/sys/arch/aarch64/conf/kern.ldscript:1.7 src/sys/arch/aarch64/conf/kern.ldscript:1.8
--- src/sys/arch/aarch64/conf/kern.ldscript:1.7	Mon Aug  6 20:05:26 2018
+++ src/sys/arch/aarch64/conf/kern.ldscript	Thu Aug 30 10:30:05 2018
@@ -5,90 +5,102 @@ OUTPUT_FORMAT("elf64-littleaarch64", "el
 	  "elf64-littleaarch64")
 OUTPUT_ARCH(aarch64)
 ENTRY(_start)
+
 SECTIONS
 {
-  /* Read-only sections, merged into text segment: */
-  .text   :
-  {
-PROVIDE (__kernel_text = .);
-PROVIDE_HIDDEN (__eprol = .);
-*(.text)
-*(.text.unlikely .text.*_unlikely)
-*(.text.exit .text.exit.*)
-*(.text.startup .text.startup.*)
-*(.text.hot .text.hot.*)
-*(.stub .text.* .gnu.linkonce.t.*)
-/* .gnu.warning sections are handled specially by elf32.em.  */
-  } =0
-  /* Move .rodata to the next L2 block to set unexecutable */
-  . = ALIGN (L2_SIZE);
-  PROVIDE (__rodata_start = .);
-  .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
-  .rodata1: { *(.rodata1) }
-  .eh_frame_hdr : { *(.eh_frame_hdr) }
-  .eh_frame   : ONLY_IF_RO { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
-  .gcc_except_table.*) }
-  /* These sections are generated by the Sun/Oracle C++ compiler.  */
-  .exception_ranges   : ONLY_IF_RO { *(.exception_ranges
-  .exception_ranges*) }
-  PROVIDE (__etext = .);
-  PROVIDE (_etext = .);
-  PROVIDE (etext = .);
-  /* Adjust the address for the data segment. Move .data to the next L2 block,
- and .text and .rodata will be set readonly if needed. */
-  PROVIDE (_erodata = .);
-  . = ALIGN (L2_SIZE);
-  . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
-  /* Exception handling  */
-  .eh_frame   : ONLY_IF_RW { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
-  .exception_ranges   : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
-  .got: { *(.got) *(.igot) }
-  . = DATA_SEGMENT_RELRO_END (24, .);
-  .got.plt: { *(.got.plt)  *(.igot.plt) }
-  .data   :
-  {
-PROVIDE (__data_start = .);
-*(.data .gnu.linkonce.d.*)
-SORT(CONSTRUCTORS)
-  }
-  .data1  : { *(.data1) }
-
-  . = ALIGN(64);	/* COHERENCY_UNIT */
-  .data.cacheline_aligned :
-  {
-*(.data.cacheline_aligned)
-  }
-  . = ALIGN(64);	/* COHERENCY_UNIT */
-  .data.read_mostly :
-  {
-*(.data.read_mostly)
-  }
-  . = ALIGN(64);	/* COHERENCY_UNIT */
-
-  _edata = .; PROVIDE (edata = .);
-  . = .;
-  __bss_start = .;
-  __bss_start__ = .;
-  .bss:
-  {
-*(.dynbss)
-*(.bss .bss.* .gnu.linkonce.b.*)
-*(COMMON)
-/* Align here to ensure that the .bss section occupies space up to
-   _end.  Align after .bss to ensure correct alignment even if the
-   .bss section disappears because there are no input sections.
-   FIXME: Why do we need it? When there is no .bss section, we don't
-   pad the .data section.  */
-. = ALIGN(. != 0 ? 32 / 8 : 1);
-  }
-  _bss_end__ = . ; __bss_end__ = . ;
-  . = ALIGN(32 / 8);
-  . = ALIGN(32 / 8);
-  __end__ = . ;
-  _end = .; PROVIDE (end = .);
-  . = DATA_SEGMENT_END (.);
-  .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
-  .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
+	.text :
+	{
+		PROVIDE (__kernel_text = .);
+		PROVIDE_HIDDEN (__eprol = .);
+		*(.text)
+		*(.text.unlikely .text.*_unlikely)
+		*(.text.exit .text.exit.*)
+		*(.text.startup .text.startup.*)
+		*(.text.hot .text.hot.*)
+		*(.stub .text.* .gnu.linkonce.t.*)
+		/* .gnu.warning sections are handled specially by elf32.em.  */
+	} =0
+
+	/* Move .rodata to the next L2 block to set unexecutable */
+	. = ALIGN (L2_SIZE);
+	PROVIDE (__rodata_start = .);
+	.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
+	.rodata1: { *(.rodata1) }
+	.eh_frame_hdr : { *(.eh_frame_hdr) }
+	.eh_frame   : ONLY_IF_RO { KEEP (*(.eh_frame)) }
+	.gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
+	.gcc_except_table.*) }
+
+	/* These sections are generated by the Sun/Oracle C++ compiler.  */
+	.exception_ranges   : ONLY_IF_RO { *(.exception_ranges
+	.exception_ranges*) }
+	PROVIDE (__etext = .);
+	PROVIDE (_etext = .);
+	PROVIDE (etext = .);
+
+	/*
+	 * Adjust the address for the data segment. Move .data to the next
+	 * L2 block, and .text and .rodata will be set readonly if needed.
+	 */
+	PROVIDE (_erodata = .);
+	. = ALIGN (L2_SIZE);
+	. = DATA_SEGMENT_ALIGN (CONSTANT 

CVS commit: src/sys/arch/aarch64/conf

2018-06-22 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jun 23 01:51:03 UTC 2018

Modified Files:
src/sys/arch/aarch64/conf: Makefile.aarch64

Log Message:
locore.S is a MD_SFILES.

This keeps the dependency handling in the loop, so rebuilds after
changing options, say EARLYCONS, don't fail.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 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/conf/Makefile.aarch64
diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.9 src/sys/arch/aarch64/conf/Makefile.aarch64:1.10
--- src/sys/arch/aarch64/conf/Makefile.aarch64:1.9	Sun Apr  1 04:35:03 2018
+++ src/sys/arch/aarch64/conf/Makefile.aarch64	Sat Jun 23 01:51:03 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.aarch64,v 1.9 2018/04/01 04:35:03 ryo Exp $
+#	$NetBSD: Makefile.aarch64,v 1.10 2018/06/23 01:51:03 jakllsch Exp $
 
 # Makefile for NetBSD
 #
@@ -50,7 +50,7 @@ KERN_AS=	obj
 ##
 MD_OBJS+=	${SYSTEM_FIRST_OBJ} locore.o
 MD_CFILES+=
-MD_SFILES+=	${SYSTEM_FIRST_SFILE}
+MD_SFILES+=	${SYSTEM_FIRST_SFILE} ${A64}/aarch64/locore.S
 
 .if defined(SYSTEM_FIRST_OBJ)
 ${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFILE} assym.h



CVS commit: src/sys/arch/aarch64/conf

2017-08-16 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Aug 16 22:52:41 UTC 2017

Modified Files:
src/sys/arch/aarch64/conf: files.aarch64

Log Message:
retire copyinout.S and fusu.S


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/conf/files.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/conf/files.aarch64
diff -u src/sys/arch/aarch64/conf/files.aarch64:1.1 src/sys/arch/aarch64/conf/files.aarch64:1.2
--- src/sys/arch/aarch64/conf/files.aarch64:1.1	Sun Aug 10 05:47:37 2014
+++ src/sys/arch/aarch64/conf/files.aarch64	Wed Aug 16 22:52:40 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: files.aarch64,v 1.1 2014/08/10 05:47:37 matt Exp $
+#	$NetBSD: files.aarch64,v 1.2 2017/08/16 22:52:40 nisimura Exp $
 
 # CPU types.
 defflag	opt_cputypes.h		CPU_CORTEXA53
@@ -71,10 +71,10 @@ file	arch/aarch64/dev/a64gtmr.c			a64gtm
 #file	arch/aarch64/aarch64/bus_space_asm_generic.S	bus_space_generic
 #file	arch/aarch64/aarch64/bus_space_notimpl.S
 
-file	arch/aarch64/aarch64/copyinout.S
+#file	arch/aarch64/aarch64/copyinout.S
 file	arch/aarch64/aarch64/cpu_in_cksum.S		inet | inet6
 file	arch/aarch64/aarch64/exception.S
-file	arch/aarch64/aarch64/fusu.S
+#file	arch/aarch64/aarch64/fusu.S
 file	arch/aarch64/aarch64/idle_machdep.S
 file	arch/aarch64/aarch64/pmap_page.S
 file	arch/aarch64/aarch64/vectors.S



CVS commit: src/sys/arch/aarch64/conf

2017-08-16 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Aug 16 22:37:34 UTC 2017

Modified Files:
src/sys/arch/aarch64/conf: kern.ldscript

Log Message:
add more sence. now compilable


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/aarch64/conf/kern.ldscript

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/conf/kern.ldscript
diff -u src/sys/arch/aarch64/conf/kern.ldscript:1.3 src/sys/arch/aarch64/conf/kern.ldscript:1.4
--- src/sys/arch/aarch64/conf/kern.ldscript:1.3	Mon Aug 24 08:13:07 2015
+++ src/sys/arch/aarch64/conf/kern.ldscript	Wed Aug 16 22:37:34 2017
@@ -6,7 +6,7 @@ ENTRY(_start)
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  PROVIDE (__kernel_text = .;
+  PROVIDE (__kernel_text = .);
   .text   :
   {
 PROVIDE_HIDDEN (__eprol = .);
@@ -17,7 +17,7 @@ SECTIONS
 *(.text.hot .text.hot.*)
 *(.stub .text.* .gnu.linkonce.t.*)
 /* .gnu.warning sections are handled specially by elf32.em.  */
-. = ALIGN(0x800)
+/*. = ALIGN(0x800) */
 *(.vectors)
   } =0
   .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }



CVS commit: src/sys/arch/aarch64/conf

2015-08-20 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Aug 20 06:19:36 UTC 2015

Modified Files:
src/sys/arch/aarch64/conf: Makefile.aarch64

Log Message:
Use ${KERNLDSCRIPT}.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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/conf/Makefile.aarch64
diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.4 src/sys/arch/aarch64/conf/Makefile.aarch64:1.5
--- src/sys/arch/aarch64/conf/Makefile.aarch64:1.4	Sat Nov 15 14:25:10 2014
+++ src/sys/arch/aarch64/conf/Makefile.aarch64	Thu Aug 20 06:19:36 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.aarch64,v 1.4 2014/11/15 14:25:10 uebayasi Exp $
+#	$NetBSD: Makefile.aarch64,v 1.5 2015/08/20 06:19:36 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -58,11 +58,11 @@ locore.o: ${A64}/aarch64/locore.S assym.
 ##
 ## (5) link settings
 ##
-LDSCRIPT?=	${A64}/conf/kern.ldscript
+KERNLDSCRIPT?=	${A64}/conf/kern.ldscript
 LOADADDRESS?=	0x
 LINKFLAGS_NORMAL=	-X
-.if ${LDSCRIPT} != 
-LINKSCRIPT=	-T ${LDSCRIPT}
+.if ${KERNLDSCRIPT} != 
+LINKSCRIPT=	-T ${KERNLDSCRIPT}
 .endif
 
 # Strip AArch64 mapping symbols from the kernel image, as they interfere



CVS commit: src/sys/arch/aarch64/conf

2014-11-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 14:25:10 UTC 2014

Modified Files:
src/sys/arch/aarch64/conf: Makefile.aarch64

Log Message:
Use LINKSCRIPT.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 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/conf/Makefile.aarch64
diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.3 src/sys/arch/aarch64/conf/Makefile.aarch64:1.4
--- src/sys/arch/aarch64/conf/Makefile.aarch64:1.3	Sun Aug 17 21:17:43 2014
+++ src/sys/arch/aarch64/conf/Makefile.aarch64	Sat Nov 15 14:25:10 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.aarch64,v 1.3 2014/08/17 21:17:43 joerg Exp $
+#	$NetBSD: Makefile.aarch64,v 1.4 2014/11/15 14:25:10 uebayasi Exp $
 
 # Makefile for NetBSD
 #
@@ -62,7 +62,7 @@ LDSCRIPT?=	${A64}/conf/kern.ldscript
 LOADADDRESS?=	0x
 LINKFLAGS_NORMAL=	-X
 .if ${LDSCRIPT} != 
-LINKFLAGS_NORMAL+=	-T ${LDSCRIPT}
+LINKSCRIPT=	-T ${LDSCRIPT}
 .endif
 
 # Strip AArch64 mapping symbols from the kernel image, as they interfere