CVS commit: src/sys/modules/arch/arm/arm-lpae

2015-04-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Apr 17 20:13:51 UTC 2015

Added Files:
src/sys/modules/arch/arm/arm-lpae: Makefile bsd.arm-lpae.mk

Log Message:
Latent support for ARM_HAS_LPAE.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/arm/arm-lpae/Makefile \
src/sys/modules/arch/arm/arm-lpae/bsd.arm-lpae.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/modules/arch/arm/arm-lpae

2015-04-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Apr 17 20:13:51 UTC 2015

Added Files:
src/sys/modules/arch/arm/arm-lpae: Makefile bsd.arm-lpae.mk

Log Message:
Latent support for ARM_HAS_LPAE.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/arm/arm-lpae/Makefile \
src/sys/modules/arch/arm/arm-lpae/bsd.arm-lpae.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/modules/arch/arm/arm-lpae/Makefile
diff -u /dev/null src/sys/modules/arch/arm/arm-lpae/Makefile:1.1
--- /dev/null	Fri Apr 17 20:13:51 2015
+++ src/sys/modules/arch/arm/arm-lpae/Makefile	Fri Apr 17 20:13:51 2015
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2015/04/17 20:13:51 matt Exp $
+
+BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.arm-lpae.mk
+
+.include ../../compatsubdir.mk
Index: src/sys/modules/arch/arm/arm-lpae/bsd.arm-lpae.mk
diff -u /dev/null src/sys/modules/arch/arm/arm-lpae/bsd.arm-lpae.mk:1.1
--- /dev/null	Fri Apr 17 20:13:51 2015
+++ src/sys/modules/arch/arm/arm-lpae/bsd.arm-lpae.mk	Fri Apr 17 20:13:51 2015
@@ -0,0 +1,11 @@
+#	$NetBSD: bsd.arm-lpae.mk,v 1.1 2015/04/17 20:13:51 matt Exp $
+
+.ifndef _BSD_ARM_LPAE_MK_
+_BSD_ARM_LPAE_MK_=1
+
+KMODULEARCHDIR:=	arm-lpae
+
+# gcc emits bad code with these options
+CPPFLAGS+=	-DARM_HAS_LPAE
+
+.endif # _BSD_ARM_LPAE_MK_



CVS commit: src/sys/modules/arch/arm

2013-08-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Aug  7 17:06:22 UTC 2013

Added Files:
src/sys/modules/arch/arm: kmodhide.awk kmodtramp.awk kmodwrap.awk

Log Message:
awk support scripts to generate trampolines in modules.
(adapted from previous LKM method).
machine/asm.h now has a KMODTRAMPOLINE macro to generate the trampoline


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/arm/kmodhide.awk \
src/sys/modules/arch/arm/kmodtramp.awk \
src/sys/modules/arch/arm/kmodwrap.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/modules/arch/arm/kmodhide.awk
diff -u /dev/null src/sys/modules/arch/arm/kmodhide.awk:1.1
--- /dev/null	Wed Aug  7 17:06:22 2013
+++ src/sys/modules/arch/arm/kmodhide.awk	Wed Aug  7 17:06:22 2013
@@ -0,0 +1,5 @@
+#	$NetBSD: kmodhide.awk,v 1.1 2013/08/07 17:06:22 matt Exp $
+
+substr($NF, 1, 7) == __wrap_ {
+	print  --localize-symbol $NF;
+}
Index: src/sys/modules/arch/arm/kmodtramp.awk
diff -u /dev/null src/sys/modules/arch/arm/kmodtramp.awk:1.1
--- /dev/null	Wed Aug  7 17:06:22 2013
+++ src/sys/modules/arch/arm/kmodtramp.awk	Wed Aug  7 17:06:22 2013
@@ -0,0 +1,18 @@
+#	$NetBSD: kmodtramp.awk,v 1.1 2013/08/07 17:06:22 matt Exp $
+#
+BEGIN {
+	print #include machine/asm.h
+}
+
+$2 == R_ARM_PC24 || $2 == R_ARM_CALL || $2 == R_ARM_JUMP24 {
+	if (x[$3] != )
+		next;
+	if (index($3, .text)  0)
+		next;
+	fn=$3
+	sub(__wrap_, , fn)
+	if (fn == $3)
+		next;
+	print KMODTRAMPOLINE(fn)
+	x[$3]=.;
+}
Index: src/sys/modules/arch/arm/kmodwrap.awk
diff -u /dev/null src/sys/modules/arch/arm/kmodwrap.awk:1.1
--- /dev/null	Wed Aug  7 17:06:22 2013
+++ src/sys/modules/arch/arm/kmodwrap.awk	Wed Aug  7 17:06:22 2013
@@ -0,0 +1,10 @@
+#	$NetBSD: kmodwrap.awk,v 1.1 2013/08/07 17:06:22 matt Exp $
+
+$2 == R_ARM_PC24 || $2 == R_ARM_CALL || $2 == R_ARM_JUMP24 {
+	if (x[$3] != )
+		next;
+	if (index($3, .text)  0)
+		next
+	printf  --wrap=$3;
+	x[$3]=.;
+}



CVS commit: src/sys/modules/arch/arm

2013-08-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Aug  7 17:29:15 UTC 2013

Modified Files:
src/sys/modules/arch/arm: kmodwrap.awk

Log Message:
Keep track of undefined symbols and then use to determine whether a wrap
is required.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/arch/arm/kmodwrap.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/arch/arm/kmodwrap.awk
diff -u src/sys/modules/arch/arm/kmodwrap.awk:1.1 src/sys/modules/arch/arm/kmodwrap.awk:1.2
--- src/sys/modules/arch/arm/kmodwrap.awk:1.1	Wed Aug  7 17:06:22 2013
+++ src/sys/modules/arch/arm/kmodwrap.awk	Wed Aug  7 17:29:15 2013
@@ -1,10 +1,12 @@
-#	$NetBSD: kmodwrap.awk,v 1.1 2013/08/07 17:06:22 matt Exp $
+#	$NetBSD: kmodwrap.awk,v 1.2 2013/08/07 17:29:15 matt Exp $
+
+$2 == *UND* {
+	undef[$4]=.;
+}
 
 $2 == R_ARM_PC24 || $2 == R_ARM_CALL || $2 == R_ARM_JUMP24 {
-	if (x[$3] != )
+	if (x[$3] !=  || undef[$3] != .)
 		next;
-	if (index($3, .text)  0)
-		next
 	printf  --wrap=$3;
 	x[$3]=.;
 }



CVS commit: src/sys/modules/arch/arm

2013-08-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Aug  7 17:06:22 UTC 2013

Added Files:
src/sys/modules/arch/arm: kmodhide.awk kmodtramp.awk kmodwrap.awk

Log Message:
awk support scripts to generate trampolines in modules.
(adapted from previous LKM method).
machine/asm.h now has a KMODTRAMPOLINE macro to generate the trampoline


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/arm/kmodhide.awk \
src/sys/modules/arch/arm/kmodtramp.awk \
src/sys/modules/arch/arm/kmodwrap.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/modules/arch/arm

2013-08-07 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Aug  7 17:29:15 UTC 2013

Modified Files:
src/sys/modules/arch/arm: kmodwrap.awk

Log Message:
Keep track of undefined symbols and then use to determine whether a wrap
is required.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/arch/arm/kmodwrap.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.