CVS commit: src/bin/sh

2018-08-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Aug 18 03:09:37 UTC 2018

Modified Files:
src/bin/sh: mknodenames.sh

Log Message:
In the older debug code (not using the new macros added in the
previous rev) the two values (node name, and node number) were
arbitrarily printed in different formats and orders (depending
upon my mood at the time I guess...)   The new macros will standardise
that usage (in the debug output) once some use of them actually begins.

When the macros were added, I arbitrarily copied the format of one
use I was looking at at that instant (the one which inspired the change),
but after gazing at DEBUG mode output over the intervening time, I
have concluded that I did not pick the easiest to read/follow format.

So, even before they are used, change the style...Also, conform
to standard PRI macro style by omitting the leading '%'.

NFC (since they aren't used at all, anywhere, yet, not even the
possibility of anything changing!)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/bin/sh/mknodenames.sh

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

Modified files:

Index: src/bin/sh/mknodenames.sh
diff -u src/bin/sh/mknodenames.sh:1.5 src/bin/sh/mknodenames.sh:1.6
--- src/bin/sh/mknodenames.sh:1.5	Thu Aug 16 15:02:05 2018
+++ src/bin/sh/mknodenames.sh	Sat Aug 18 03:09:37 2018
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: mknodenames.sh,v 1.5 2018/08/16 15:02:05 kre Exp $
+# $NetBSD: mknodenames.sh,v 1.6 2018/08/18 03:09:37 kre Exp $
 
 # Use this script however you like, but it would be amazing if
 # it has any purpose other than as part of building the shell...
@@ -56,13 +56,13 @@ echo
 echo '#define NODETYPENAME(type) \'
 echo '	((unsigned)(type) <= '"${MAX}"' ? NodeNames[(type)] : "??OOR??")'
 echo
-echo '#define NODETYPE(type)	(type), NODETYPENAME(type)'
-echo '#define PRIdsNT		"%d(%s)"'
+echo '#define NODETYPE(type)	NODETYPENAME(type), (type)'
+echo '#define PRIdsNT		"s(%d)"'
 echo
 echo '#else /* DEBUG */'
 echo
 echo '#define NODETYPE(type)	(type)'
-echo '#define PRIdsNT		"%d"'
+echo '#define PRIdsNT		"d"'
 echo
 echo '#endif /* DEBUG */'
 echo



CVS commit: src/bin/sh

2018-08-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Aug 18 03:09:37 UTC 2018

Modified Files:
src/bin/sh: mknodenames.sh

Log Message:
In the older debug code (not using the new macros added in the
previous rev) the two values (node name, and node number) were
arbitrarily printed in different formats and orders (depending
upon my mood at the time I guess...)   The new macros will standardise
that usage (in the debug output) once some use of them actually begins.

When the macros were added, I arbitrarily copied the format of one
use I was looking at at that instant (the one which inspired the change),
but after gazing at DEBUG mode output over the intervening time, I
have concluded that I did not pick the easiest to read/follow format.

So, even before they are used, change the style...Also, conform
to standard PRI macro style by omitting the leading '%'.

NFC (since they aren't used at all, anywhere, yet, not even the
possibility of anything changing!)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/bin/sh/mknodenames.sh

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



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

2018-08-17 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Aug 17 20:16:07 UTC 2018

Modified Files:
src/sys/arch/usermode/conf: Makefile.usermode kern.ldscript

Log Message:
Start using the kernel ld script.

There are still issues with the .init placement and ./build.sh creating bad
images.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/usermode/conf/Makefile.usermode
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/usermode/conf/kern.ldscript

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



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

2018-08-17 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Aug 17 20:16:07 UTC 2018

Modified Files:
src/sys/arch/usermode/conf: Makefile.usermode kern.ldscript

Log Message:
Start using the kernel ld script.

There are still issues with the .init placement and ./build.sh creating bad
images.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/usermode/conf/Makefile.usermode
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/usermode/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/usermode/conf/Makefile.usermode
diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.42 src/sys/arch/usermode/conf/Makefile.usermode:1.43
--- src/sys/arch/usermode/conf/Makefile.usermode:1.42	Fri Jun  1 07:22:33 2018
+++ src/sys/arch/usermode/conf/Makefile.usermode	Fri Aug 17 20:16:07 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.usermode,v 1.42 2018/06/01 07:22:33 reinoud Exp $
+# $NetBSD: Makefile.usermode,v 1.43 2018/08/17 20:16:07 reinoud Exp $
 
 MKCTF?=no
 USETOOLS?=			no
@@ -74,9 +74,9 @@ KERNLDSCRIPT?=	${USERMODE}/conf/kern.lds
 SYSTEM_LD=	@do_system_ld() { \
 		${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}"; \
 		${_MKSHECHO}\
-		${CC} -static ${COPTS} -Wl,-Map,$${target}.map -o ${.TARGET} ${LINKFORMAT} -Ttext ${TEXTADDR} '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o ${USERMODE_LIBS} $$@; \
+		${CC} -static ${COPTS} -Wl,-Map,$${target}.map -o ${.TARGET} ${LINKFORMAT} -Wl,-Ttext,${TEXTADDR} '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o netbsd.ldscript ${USERMODE_LIBS} $$@; \
 		${SYSTEM_LD_FIX} \
-		${CC} -static ${COPTS} -Wl,-Map,$${target}.map -o ${.TARGET} ${LINKFORMAT} -Ttext ${TEXTADDR} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o ${USERMODE_LIBS} $$@; \
+		${CC} -static ${COPTS} -Wl,-Map,$${target}.map -o ${.TARGET} ${LINKFORMAT} -Wl,-Ttext,${TEXTADDR} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o netbsd.ldscript ${USERMODE_LIBS} $$@; \
 		}; \
 		do_system_ld
 NVFLAGS=	-n

Index: src/sys/arch/usermode/conf/kern.ldscript
diff -u src/sys/arch/usermode/conf/kern.ldscript:1.1 src/sys/arch/usermode/conf/kern.ldscript:1.2
--- src/sys/arch/usermode/conf/kern.ldscript:1.1	Fri May 18 19:04:10 2018
+++ src/sys/arch/usermode/conf/kern.ldscript	Fri Aug 17 20:16:07 2018
@@ -1,20 +1,28 @@
-/*	$NetBSD: kern.ldscript,v 1.1 2018/05/18 19:04:10 reinoud Exp $	*/
+/*	$NetBSD: kern.ldscript,v 1.2 2018/08/17 20:16:07 reinoud Exp $	*/
 
 #include "assym.h"
 
+__PAGE_SIZE = 0x1000 ;
+
 ENTRY(_start)
 SECTIONS
 {
 	/* Read-only sections, merged into text segment: */
 	.text :
 	{
+		. = ALIGN(__PAGE_SIZE);
+		*(.text.user)
+		. = ALIGN(__PAGE_SIZE);
 		*(.text)
 		*(.text.*)
 		*(.stub)
-	}
+		. = ALIGN(__PAGE_SIZE);
+	} =0xCC
+
 	_etext = . ;
 	PROVIDE (etext = .) ;
 
+	. = ALIGN(__PAGE_SIZE);
 	.rodata :
 	{
 		*(.rodata)
@@ -25,7 +33,7 @@ SECTIONS
 	 * Adjust the address for the data segment.  We want to adjust up to
 	 * the same address within the page on the next page up.
 	 */
-	. = ALIGN(0x10) + (. & (0x10 - 1));
+	. = ALIGN(__PAGE_SIZE);
 	__data_start = . ;
 	.data :
 	{
@@ -52,22 +60,17 @@ SECTIONS
 		*(.bss)
 		*(.bss.*)
 		*(COMMON)
-		. = ALIGN(64 / 8);
 	}
-	. = ALIGN(64 / 8);
+
+	. = ALIGN(__PAGE_SIZE);
 	_end = . ;
 	PROVIDE (end = .) ;
-	.note.netbsd.ident :
-	{
-		KEEP(*(.note.netbsd.ident));
-	}
-}
 
-SECTIONS
-{
-	.text :
-	AT (ADDR(.text) & 0x0fff)
-	{
-		*(.text)
-	} = 0
+	/*
+	 * .note.netbsd.ident :
+	 * {
+	 * 	KEEP(*(.note.netbsd.ident));
+	 * }
+	 */
 }
+



CVS commit: src/sys/arch/macppc/stand/ofwboot

2018-08-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Aug 17 16:04:39 UTC 2018

Modified Files:
src/sys/arch/macppc/stand/ofwboot: Locore.c

Log Message:
- add some G5-specific setup
- OF_claim() more heap space on G5
With this, and -DHEAP_VARIABLE my G5s boot from harddisk


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/macppc/stand/ofwboot/Locore.c

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/macppc/stand/ofwboot/Locore.c
diff -u src/sys/arch/macppc/stand/ofwboot/Locore.c:1.31 src/sys/arch/macppc/stand/ofwboot/Locore.c:1.32
--- src/sys/arch/macppc/stand/ofwboot/Locore.c:1.31	Wed Jun  6 23:50:29 2018
+++ src/sys/arch/macppc/stand/ofwboot/Locore.c	Fri Aug 17 16:04:39 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: Locore.c,v 1.31 2018/06/06 23:50:29 uwe Exp $	*/
+/*	$NetBSD: Locore.c,v 1.32 2018/08/17 16:04:39 macallan Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -35,6 +35,7 @@
 #include 
 
 #include 
+#include 
 
 #include "openfirm.h"
 
@@ -81,9 +82,13 @@ __asm(
 "	mfspr	%r0,287		\n" /* mfpvbr %r0 PVR = 287 */
 "	srwi	%r0,%r0,0x10	\n"
 "	cmpi	0,1,%r0,0x02	\n" /* 601 CPU = 0x0001 */
-"	blt	1f		\n" /* skip over non-601 BAT setup */
+"	blt	2f		\n" /* skip over non-601 BAT setup */
+"	cmpi	0,1,%r0,0x39	\n" /* PPC970 */
+"	blt	0f		\n"
+"	cmpi	0,1,%r0,0x45	\n" /* PPC970GX */
+"	ble	1f		\n"
 	/* non PPC 601 BATs */
-"	li	%r0,0		\n"
+"0:	li	%r0,0		\n"
 "	mtibatu	0,%r0		\n"
 "	mtibatu	1,%r0		\n"
 "	mtibatu	2,%r0		\n"
@@ -99,10 +104,31 @@ __asm(
 "	li	%r9,0x1ffe	\n"	/* BATU(0, BAT_BL_256M, BAT_Vs) */
 "	mtibatu	0,%r9		\n"
 "	mtdbatu	0,%r9		\n"
-"	b	2f		\n"
-
+"	b	3f		\n"
+	/* 970 initialization stuff */
+"1:\n"
+	/* make sure we're in bridge mode */
+"	clrldi	%r8,%r8,3	\n"
+"	mtmsrd	%r8		\n"
+"	isync			\n"
+	 /* clear HID5 DCBZ bits (56/57), need to do this early */
+"	mfspr	%r9,0x3f6	\n"
+"	rldimi	%r9,0,6,56	\n"
+"	sync			\n"
+"	mtspr	0x3f6,%r9	\n"
+"	isync			\n"
+"	sync			\n"
+	/* Setup HID1 features, prefetch + i-cacheability controlled by PTE */
+"	mfspr	%r9,0x3f1	\n"
+"	li	%r11,0x1200	\n"
+"	sldi	%r11,%r11,44	\n"
+"	or	%r9,%r9,%r11	\n"
+"	mtspr	0x3f1,%r9	\n"
+"	isync			\n"
+"	sync			\n"
+"	b	3f		\n"	
 	/* PPC 601 BATs */
-"1:	li	%r0,0		\n"
+"2:	li	%r0,0		\n"
 "	mtibatu	0,%r0		\n"
 "	mtibatu	1,%r0		\n"
 "	mtibatu	2,%r0		\n"
@@ -134,7 +160,7 @@ __asm(
 "	addi	%r9,%r9,0x1a	\n"
 "	mtibatu	3,%r9		\n"
 "\n"
-"2:	isync			\n"
+"3:	isync			\n"
 "\n"
 "	mtmsr	%r8		\n"
 "	isync			\n"
@@ -649,7 +675,13 @@ setup(void)
 		OF_exit();
 
 #ifdef HEAP_VARIABLE
-	heapspace = OF_claim(0, HEAP_SIZE, NBPG);
+	uint32_t pvr, vers, hsize = HEAP_SIZE;
+
+	__asm volatile ("mfpvr %0" : "=r"(pvr));
+	vers = pvr >> 16;
+	if (vers >= IBM970 && vers <= IBM970GX) hsize = 0x80;
+
+	heapspace = OF_claim(0, hsize, NBPG);
 	if (heapspace == (char *)-1) {
 		panic("Failed to allocate heap");
 	}



CVS commit: src/sys/arch/macppc/stand/ofwboot

2018-08-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Aug 17 16:04:39 UTC 2018

Modified Files:
src/sys/arch/macppc/stand/ofwboot: Locore.c

Log Message:
- add some G5-specific setup
- OF_claim() more heap space on G5
With this, and -DHEAP_VARIABLE my G5s boot from harddisk


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/macppc/stand/ofwboot/Locore.c

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



CVS commit: src/sys/arch/powerpc/oea

2018-08-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Aug 17 15:54:35 UTC 2018

Modified Files:
src/sys/arch/powerpc/oea: ofw_autoconf.c

Log Message:
parse G5 device paths


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/oea/ofw_autoconf.c

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/powerpc/oea/ofw_autoconf.c
diff -u src/sys/arch/powerpc/oea/ofw_autoconf.c:1.21 src/sys/arch/powerpc/oea/ofw_autoconf.c:1.22
--- src/sys/arch/powerpc/oea/ofw_autoconf.c:1.21	Sun Mar  4 00:21:20 2018
+++ src/sys/arch/powerpc/oea/ofw_autoconf.c	Fri Aug 17 15:54:35 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_autoconf.c,v 1.21 2018/03/04 00:21:20 macallan Exp $ */
+/* $NetBSD: ofw_autoconf.c,v 1.22 2018/08/17 15:54:35 macallan Exp $ */
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
  * Copyright (C) 1995, 1996 TooLs GmbH.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.21 2018/03/04 00:21:20 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.22 2018/08/17 15:54:35 macallan Exp $");
 
 #ifdef ofppc
 #include "gtpci.h"
@@ -231,6 +231,11 @@ device_register(device_t dev, void *aux)
 		return;
 	}
 
+	/* skip over CPUs */
+	if (device_is_a(dev, "cpu")) {
+		return;
+	}
+
 	if (device_is_a(dev, "valkyriefb")) {
 		struct confargs *ca = aux;
 		prop_dictionary_t dict;
@@ -306,7 +311,10 @@ device_register(device_t dev, void *aux)
 		CACHELINESIZE);
 	}
 #endif
-	if (device_is_a(dev, "atapibus") || device_is_a(dev, "pci") ||
+	if (device_is_a(dev, "atapibus") ||
+#ifndef PMAC_G5
+	device_is_a(dev, "pci") ||
+#endif
 	device_is_a(dev, "scsibus") || device_is_a(dev, "atabus"))
 		return;
 
@@ -379,13 +387,17 @@ device_register(device_t dev, void *aux)
 	 * Skip over devices that are really just layers of NetBSD
 	 * autoconf(9) we should just skip as they do not have any
 	 * OFW devices.
+	 * XXX except on G5, where we have /ht/pci* instead of /pci*
 	 */
 	if (device_is_a(device_parent(dev), "atapibus") ||
 	device_is_a(device_parent(dev), "atabus") ||
+#ifndef PMAC_G5
 	device_is_a(device_parent(dev), "pci") ||
+#endif
 	device_is_a(device_parent(dev), "scsibus")) {
-		if (device_parent(device_parent(dev)) != parent)
+		if (device_parent(device_parent(dev)) != parent) {
 			return;
+		}
 	} else {
 		if (device_parent(dev) != parent)
 			return;
@@ -416,13 +428,14 @@ device_register(device_t dev, void *aux)
 
 	if (device_is_a(device_parent(dev), "mainbus")) {
 		struct confargs *ca = aux;
-
 		if (strcmp(ca->ca_name, "ofw") == 0)		/* XXX */
 			return;
 		if (strcmp(ca->ca_name, "gt") == 0)
 			parent = dev;
 		if (addr != ca->ca_reg[0])
 			return;
+		if (addr2 != 0 && addr2 != ca->ca_reg[1])
+			return;
 	} else if (device_is_a(device_parent(dev), "gt")) {
 		/*
 		 * Special handle for MV64361 on PegasosII(ofppc).
@@ -477,13 +490,27 @@ device_register(device_t dev, void *aux)
 
 		if (addr != adev->adev_drv_data->drive)
 			return;
+	} else if (device_is_a(dev, "pci")) {
+		if (addr != device_unit(dev))
+			return;
+	} else if (device_is_a(device_parent(dev), "atabus")) {
+		/*
+		 * XXX
+		 * on svwsata this is the channel number and we ignore the
+		 * drive number which is always 0 anyway
+		 * needs to be revisited for other (S)ATA cards
+		 */
+		struct ata_device *adev = aux;
+		if (addr != adev->adev_channel)
+			return;
+		/* we have our match, cut off the rest */
+		if (p) *p = 0;
 	} else
 		return;
 
 	/* If we reach this point, then dev is a match for the current
 	 * path component.
 	 */
-
 	if (p && *p) {
 		parent = dev;
 		cp = p;



CVS commit: src/sys/arch/powerpc/oea

2018-08-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Aug 17 15:54:35 UTC 2018

Modified Files:
src/sys/arch/powerpc/oea: ofw_autoconf.c

Log Message:
parse G5 device paths


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/oea/ofw_autoconf.c

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



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

2018-08-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug 17 14:47:21 UTC 2018

Modified Files:
src/sys/arch/evbarm/conf: files.exynos

Log Message:
Fix build the easiest way...

Restructure to allow generic builds will come later.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/files.exynos

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



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

2018-08-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug 17 14:47:21 UTC 2018

Modified Files:
src/sys/arch/evbarm/conf: files.exynos

Log Message:
Fix build the easiest way...

Restructure to allow generic builds will come later.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/files.exynos

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/evbarm/conf/files.exynos
diff -u src/sys/arch/evbarm/conf/files.exynos:1.3 src/sys/arch/evbarm/conf/files.exynos:1.4
--- src/sys/arch/evbarm/conf/files.exynos:1.3	Sat Jun 10 15:13:19 2017
+++ src/sys/arch/evbarm/conf/files.exynos	Fri Aug 17 14:47:21 2018
@@ -1,8 +1,8 @@
-#	$NetBSD: files.exynos,v 1.3 2017/06/10 15:13:19 jmcneill Exp $
+#	$NetBSD: files.exynos,v 1.4 2018/08/17 14:47:21 skrll Exp $
 #
 # EXYNOS board configuration info
 #
 
-include	"arch/evbarm/conf/files.fdt"
-
 include	"arch/arm/samsung/files.exynos"
+
+include	"arch/evbarm/conf/files.fdt"



CVS commit: src/sys/arch/amd64/include

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 14:39:51 UTC 2018

Modified Files:
src/sys/arch/amd64/include: pmap.h

Log Message:
Remove big outdated comment, remove unused macros, remove XXX that has
nothing to do here, style.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/amd64/include/pmap.h

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/amd64/include/pmap.h
diff -u src/sys/arch/amd64/include/pmap.h:1.53 src/sys/arch/amd64/include/pmap.h:1.54
--- src/sys/arch/amd64/include/pmap.h:1.53	Sun Aug 12 15:31:01 2018
+++ src/sys/arch/amd64/include/pmap.h	Fri Aug 17 14:39:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.53 2018/08/12 15:31:01 maxv Exp $	*/
+/*	$NetBSD: pmap.h,v 1.54 2018/08/17 14:39:51 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -81,60 +81,14 @@
 #ifdef XEN
 #include 
 #include 
-#endif /* XEN */
-
-/*
- * The x86_64 pmap module closely resembles the i386 one and it 
- * uses the same recursive entry scheme. See the i386 pmap.h
- * for a description. The obvious difference is that 3 extra
- * levels of page table need to be dealt with. The level 1 page
- * table pages are at:
- *
- * l1: 0x7f80 - 0x7fff (39 bits, needs PML4 entry)
- *
- * The rest is kept as physical pages in 3 UVM objects, and is
- * temporarily mapped for virtual access when needed.
- *
- * Note that address space is signed, so the layout for 48 bits is:
- *
- *  +-+ 0x
- *  | |
- *  | Unused  |
- *  | |
- *  +-+ 0xff80
- *  ~ ~
- *  | |
- *  | Kernel Space|
- *  | |
- *  | |
- *  +-+ 0x8000 = 0x8000
- *  | |
- *  |alt.L1 table (PTE pages) |
- *  | |
- *  +-+ 0x7f80
- *  ~ ~
- *  | |
- *  | User Space  |
- *  | |
- *  | |
- *  +-+ 0x
- *
- * In other words, there is a 'VA hole' at 0x8000 -
- * 0x8000 which will trap, just as on, for example,
- * sparcv9.
- *
- * The unused space can be used if needed, but it adds a little more
- * complexity to the calculations.
- */
+#endif
 
 /*
  * Mask to get rid of the sign-extended part of addresses.
  */
 #define VA_SIGN_MASK		0x
 #define VA_SIGN_NEG(va)		((va) | VA_SIGN_MASK)
-/*
- * XXXfvdl this one's not right.
- */
+/* XXXfvdl this one's not right. */
 #define VA_SIGN_POS(va)		((va) & ~VA_SIGN_MASK)
 
 #ifndef XEN
@@ -154,7 +108,6 @@
  * data structures:
  * PTE_BASE: the base VA of the linear PTE mappings
  * PDP_BASE: the base VA of the recursive mapping of the PTD
- * PDP_PDE: the VA of the PDE that points back to the PDP
  */
 
 #ifndef XEN
@@ -169,8 +122,6 @@ extern pt_entry_t *pte_base;
 #define L3_BASE	((pd_entry_t *)((char *)L2_BASE + L4_SLOT_PTE * NBPD_L2))
 #define L4_BASE	((pd_entry_t *)((char *)L3_BASE + L4_SLOT_PTE * NBPD_L1))
 
-#define PDP_PDE		(L4_BASE + PDIR_SLOT_PTE)
-
 #define PDP_BASE	L4_BASE
 
 #define NKL4_MAX_ENTRIES	(unsigned long)64
@@ -189,11 +140,7 @@ extern pt_entry_t *pte_base;
 #define NKL4_START_ENTRIES	0
 #define NKL3_START_ENTRIES	0
 #define NKL2_START_ENTRIES	0
-#define NKL1_START_ENTRIES	0	/* XXX */
-
-#define NTOPLEVEL_PDES		(PAGE_SIZE / (sizeof (pd_entry_t)))
-
-#define NPDPG			(PAGE_SIZE / sizeof (pd_entry_t))
+#define NKL1_START_ENTRIES	0
 
 #define PTP_MASK_INITIALIZER	{ L1_FRAME, L2_FRAME, L3_FRAME, L4_FRAME }
 #define PTP_SHIFT_INITIALIZER	{ L1_SHIFT, L2_SHIFT, L3_SHIFT, L4_SHIFT }



CVS commit: src/sys/arch/amd64/include

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 14:39:51 UTC 2018

Modified Files:
src/sys/arch/amd64/include: pmap.h

Log Message:
Remove big outdated comment, remove unused macros, remove XXX that has
nothing to do here, style.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/amd64/include/pmap.h

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



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

2018-08-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug 17 14:21:30 UTC 2018

Modified Files:
src/sys/arch/arm/fdt: files.fdt

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/fdt/files.fdt

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/arm/fdt/files.fdt
diff -u src/sys/arch/arm/fdt/files.fdt:1.22 src/sys/arch/arm/fdt/files.fdt:1.23
--- src/sys/arch/arm/fdt/files.fdt:1.22	Wed Aug  8 19:03:08 2018
+++ src/sys/arch/arm/fdt/files.fdt	Fri Aug 17 14:21:30 2018
@@ -1,4 +1,4 @@
-# $NetBSD: files.fdt,v 1.22 2018/08/08 19:03:08 jmcneill Exp $
+# $NetBSD: files.fdt,v 1.23 2018/08/17 14:21:30 skrll Exp $
 
 include	"dev/pckbport/files.pckbport"
 
@@ -23,14 +23,14 @@ file	arch/arm/fdt/gtmr_fdt.c			gtmr_fdt
 
 device  gic: mpcorebus
 attach  gic at fdt with gic_fdt
-filearch/arm/fdt/gic_fdt.c 	gic_fdt
+filearch/arm/fdt/gic_fdt.c			gic_fdt
 
 attach	gicvthree at fdt with gicv3_fdt
 file	arch/arm/fdt/gicv3_fdt.c		gicv3_fdt
 
 device  l2cc: mpcorebus
 attach  l2cc at fdt with l2cc_fdt
-filearch/arm/fdt/l2cc_fdt.c 	l2cc_fdt
+filearch/arm/fdt/l2cc_fdt.c			l2cc_fdt
 
 attach	plcom at fdt with plcom_fdt
 file	arch/arm/fdt/plcom_fdt.c		plcom_fdt



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

2018-08-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug 17 14:21:30 UTC 2018

Modified Files:
src/sys/arch/arm/fdt: files.fdt

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/fdt/files.fdt

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



CVS commit: src/dist/pf/share/man

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 12:36:53 UTC 2018

Modified Files:
src/dist/pf/share/man/man4: pflog.4 pfsync.4
src/dist/pf/share/man/man5: pf.conf.5 pf.os.5

Log Message:
Add a deprecation note in each of the PF man pages (instead of just pf.4),
so that it's really clear.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/dist/pf/share/man/man4/pflog.4 \
src/dist/pf/share/man/man4/pfsync.4
cvs rdiff -u -r1.16 -r1.17 src/dist/pf/share/man/man5/pf.conf.5
cvs rdiff -u -r1.6 -r1.7 src/dist/pf/share/man/man5/pf.os.5

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

Modified files:

Index: src/dist/pf/share/man/man4/pflog.4
diff -u src/dist/pf/share/man/man4/pflog.4:1.6 src/dist/pf/share/man/man4/pflog.4:1.7
--- src/dist/pf/share/man/man4/pflog.4:1.6	Sun Mar 22 14:29:34 2009
+++ src/dist/pf/share/man/man4/pflog.4	Fri Aug 17 12:36:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pflog.4,v 1.6 2009/03/22 14:29:34 perry Exp $
+.\"	$NetBSD: pflog.4,v 1.7 2018/08/17 12:36:53 maxv Exp $
 .\"	$OpenBSD: pflog.4,v 1.10 2007/05/31 19:19:51 jmc Exp $
 .\"
 .\" Copyright (c) 2001 Tobias Weingartner
@@ -24,7 +24,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 31, 2007
+.Dd August 17, 2018
 .Dt PFLOG 4
 .Os
 .Sh NAME
@@ -33,6 +33,13 @@
 .Sh SYNOPSIS
 .Cd "pseudo-device pflog"
 .Sh DESCRIPTION
+.Bf -symbolic
+The NetBSD version of PF is obsolete, and its use is strongly discouraged.
+Use
+.Xr npf 7
+instead.
+.Pp
+.Ef
 The
 .Nm pflog
 interface is a pseudo-device which makes visible all packets logged by
Index: src/dist/pf/share/man/man4/pfsync.4
diff -u src/dist/pf/share/man/man4/pfsync.4:1.6 src/dist/pf/share/man/man4/pfsync.4:1.7
--- src/dist/pf/share/man/man4/pfsync.4:1.6	Mon Apr 12 21:28:23 2010
+++ src/dist/pf/share/man/man4/pfsync.4	Fri Aug 17 12:36:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pfsync.4,v 1.6 2010/04/12 21:28:23 wiz Exp $
+.\"	$NetBSD: pfsync.4,v 1.7 2018/08/17 12:36:53 maxv Exp $
 .\"	$OpenBSD: pfsync.4,v 1.25 2007/05/31 19:19:51 jmc Exp $
 .\"
 .\" Copyright (c) 2002 Michael Shalayeff
@@ -25,7 +25,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 12, 2010
+.Dd August 17, 2018
 .Dt PFSYNC 4
 .Os
 .Sh NAME
@@ -34,6 +34,13 @@
 .Sh SYNOPSIS
 .Cd "pseudo-device pfsync"
 .Sh DESCRIPTION
+.Bf -symbolic
+The NetBSD version of PF is obsolete, and its use is strongly discouraged.
+Use
+.Xr npf 7
+instead.
+.Pp
+.Ef
 The
 .Nm
 interface is a pseudo-device which exposes certain changes to the state

Index: src/dist/pf/share/man/man5/pf.conf.5
diff -u src/dist/pf/share/man/man5/pf.conf.5:1.16 src/dist/pf/share/man/man5/pf.conf.5:1.17
--- src/dist/pf/share/man/man5/pf.conf.5:1.16	Wed Oct 14 17:44:25 2009
+++ src/dist/pf/share/man/man5/pf.conf.5	Fri Aug 17 12:36:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pf.conf.5,v 1.16 2009/10/14 17:44:25 joerg Exp $
+.\"	$NetBSD: pf.conf.5,v 1.17 2018/08/17 12:36:53 maxv Exp $
 .\"	$OpenBSD: pf.conf.5,v 1.383 2007/07/17 16:27:38 jmc Exp $
 .\"
 .\" Copyright (c) 2002, Daniel Hartmeier
@@ -28,13 +28,20 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 26, 2007
+.Dd August 17, 2018
 .Dt PF.CONF 5
 .Os
 .Sh NAME
 .Nm pf.conf
 .Nd packet filter configuration file
 .Sh DESCRIPTION
+.Bf -symbolic
+The NetBSD version of PF is obsolete, and its use is strongly discouraged.
+Use
+.Xr npf 7
+instead.
+.Pp
+.Ef
 The
 .Xr pf 4
 packet filter modifies, drops or passes packets according to rules or

Index: src/dist/pf/share/man/man5/pf.os.5
diff -u src/dist/pf/share/man/man5/pf.os.5:1.6 src/dist/pf/share/man/man5/pf.os.5:1.7
--- src/dist/pf/share/man/man5/pf.os.5:1.6	Sun Mar 22 14:29:35 2009
+++ src/dist/pf/share/man/man5/pf.os.5	Fri Aug 17 12:36:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pf.os.5,v 1.6 2009/03/22 14:29:35 perry Exp $
+.\"	$NetBSD: pf.os.5,v 1.7 2018/08/17 12:36:53 maxv Exp $
 .\"	$OpenBSD: pf.os.5,v 1.8 2007/05/31 19:19:58 jmc Exp $
 .\"
 .\" Copyright (c) 2003 Mike Frantzen 
@@ -14,13 +14,20 @@
 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.Dd May 31, 2007
+.Dd August 17, 2018
 .Dt PF.OS 5
 .Os
 .Sh NAME
 .Nm pf.os
 .Nd format of the operating system fingerprints file
 .Sh DESCRIPTION
+.Bf -symbolic
+The NetBSD version of PF is obsolete, and its use is strongly discouraged.
+Use
+.Xr npf 7
+instead.
+.Pp
+.Ef
 The
 .Xr pf 4
 firewall and the



CVS commit: src/dist/pf/share/man

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 12:36:53 UTC 2018

Modified Files:
src/dist/pf/share/man/man4: pflog.4 pfsync.4
src/dist/pf/share/man/man5: pf.conf.5 pf.os.5

Log Message:
Add a deprecation note in each of the PF man pages (instead of just pf.4),
so that it's really clear.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/dist/pf/share/man/man4/pflog.4 \
src/dist/pf/share/man/man4/pfsync.4
cvs rdiff -u -r1.16 -r1.17 src/dist/pf/share/man/man5/pf.conf.5
cvs rdiff -u -r1.6 -r1.7 src/dist/pf/share/man/man5/pf.os.5

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



CVS commit: src/usr.sbin/npf/npfctl

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 12:20:49 UTC 2018

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Add the values of "algo" in the grammar, and use # as comment marker for
man-k.org (and others) not to highlight things in an incorrect way.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.sbin/npf/npfctl/npf.conf.5

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



CVS commit: src/usr.sbin/npf/npfctl

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 12:20:49 UTC 2018

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Add the values of "algo" in the grammar, and use # as comment marker for
man-k.org (and others) not to highlight things in an incorrect way.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.sbin/npf/npfctl/npf.conf.5

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

Modified files:

Index: src/usr.sbin/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.62 src/usr.sbin/npf/npfctl/npf.conf.5:1.63
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.62	Fri Aug 17 12:04:20 2018
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Fri Aug 17 12:20:49 2018
@@ -1,4 +1,4 @@
-.\"$NetBSD: npf.conf.5,v 1.62 2018/08/17 12:04:20 maxv Exp $
+.\"$NetBSD: npf.conf.5,v 1.63 2018/08/17 12:20:49 maxv Exp $
 .\"
 .\" Copyright (c) 2009-2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -329,52 +329,53 @@ The following is a non-formal BNF-like d
 The definition is simplified and is intended to be human readable,
 therefore it does not strictly represent the formal grammar.
 .Bd -literal
-; Syntax of a single line.  Lines can be separated by LF (\\n) or
-; a semicolon.  Comments start with a hash (#) character.
+# Syntax of a single line.  Lines can be separated by LF (\\n) or
+# a semicolon.  Comments start with a hash (#) character.
 
 syntax		= var-def | set-param | alg | table-def |
 		  map | group | proc | comment
 
-; Variable definition.  Names can be alpha-numeric, including "_" character.
+# Variable definition.  Names can be alpha-numeric, including "_" character.
 
 var-name	= "$" . string
 interface	= interface-name | var-name
 var-def		= var "=" ( var-value | "{" value *[ "," value ] "}" )
 
-; Parameter setting.
+# Parameter setting.
 set-param	= "set" param-value
 
-; Application level gateway.  The name should be in the double quotes.
+# Application level gateway.  The name should be in the double quotes.
 
 alg		= "alg" alg-name
 
-; Table definition.  Table ID shall be numeric.  Path is in the double quotes.
+# Table definition.  Table ID shall be numeric.  Path is in the double quotes.
 
 table-id	= 
 table-def	= "table" table-id "type" ( "hash" | "tree" | "cdb" )
 		  ( "dynamic" | "file" path )
 
-; Mapping for address translation.
+# Mapping for address translation.
 
 map		= "map" interface
-		  ( "static" [ "algo" algorithm ] | "dynamic" )
+		  ( "static" [ "algo" map-algo ] | "dynamic" )
 		  [ map-flags ] [ proto ]
 		  net-seg ( "->" | "<-" | "<->" ) net-seg
 		  [ "pass" [ proto ] filt-opts ]
 
+map-algo	= "npt66"
 map-flags	= "no-ports"
 
-; Rule procedure definition.  The name should be in the double quotes.
-;
-; Each call can have its own options in a form of key-value pairs.
-; Both key and values may be strings (either in double quotes or not)
-; and numbers, depending on the extension.
+# Rule procedure definition.  The name should be in the double quotes.
+#
+# Each call can have its own options in a form of key-value pairs.
+# Both key and values may be strings (either in double quotes or not)
+# and numbers, depending on the extension.
 
 proc		= "procedure" proc-name "{" *( proc-call [ new-line ] ) "}"
 proc-opts	= key [ " " val ] [ "," proc-opts ]
 proc-call	= call-name ":" proc-opts new-line
 
-; Group definition and the rule list.
+# Group definition and the rule list.
 
 group		= "group" ( "default" | group-opts ) "{" rule-list "}"
 group-opts	= name-string [ "in" | "out" ] [ "on" interface ]



CVS commit: src/usr.sbin/npf/npfctl

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 12:04:20 UTC 2018

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Add missing quote in static-rule, it causes man-k.org (and other tools)
to wrongly highlight the grammar.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.sbin/npf/npfctl/npf.conf.5

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



CVS commit: src/usr.sbin/npf/npfctl

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 12:04:20 UTC 2018

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Add missing quote in static-rule, it causes man-k.org (and other tools)
to wrongly highlight the grammar.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.sbin/npf/npfctl/npf.conf.5

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

Modified files:

Index: src/usr.sbin/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.61 src/usr.sbin/npf/npfctl/npf.conf.5:1.62
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.61	Fri Aug 17 10:24:19 2018
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Fri Aug 17 12:04:20 2018
@@ -1,4 +1,4 @@
-.\"$NetBSD: npf.conf.5,v 1.61 2018/08/17 10:24:19 maxv Exp $
+.\"$NetBSD: npf.conf.5,v 1.62 2018/08/17 12:04:20 maxv Exp $
 .\"
 .\" Copyright (c) 2009-2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -383,7 +383,7 @@ rule-list	= [ rule new-line ] rule-list
 npf-filter	= [ "family" family-opt ] [ proto ] ( "all" | filt-opts )
 static-rule	= ( "block" [ block-opts ] | "pass" )
 		  [ "stateful" | "stateful-ends" ]
-		  [ "in" | out" ] [ "final" ] [ "on" interface ]
+		  [ "in" | "out" ] [ "final" ] [ "on" interface ]
 		  ( npf-filter | "pcap-filter" pcap-filter-expr )
 		  [ "apply" proc-name ]
 



CVS commit: src/usr.sbin/npf/npfctl

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 10:24:19 UTC 2018

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Replace "rproc"->"proc" in the grammar (spotted by he@), and slightly
reword.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/npf/npfctl/npf.conf.5

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

Modified files:

Index: src/usr.sbin/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.60 src/usr.sbin/npf/npfctl/npf.conf.5:1.61
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.60	Fri Aug 17 10:16:24 2018
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Fri Aug 17 10:24:19 2018
@@ -1,4 +1,4 @@
-.\"$NetBSD: npf.conf.5,v 1.60 2018/08/17 10:16:24 maxv Exp $
+.\"$NetBSD: npf.conf.5,v 1.61 2018/08/17 10:24:19 maxv Exp $
 .\"
 .\" Copyright (c) 2009-2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -225,7 +225,7 @@ the following syntax:
 .Pp
 Where
 .Ar match
-is the set of TCP flags we want to match out of the
+is the set of TCP flags to be matched, out of the
 .Ar mask
 set, both sets being represented as a string combination of: S (SYN),
 A (ACK), F (FIN), R (RST). The flags that are not present in
@@ -333,7 +333,7 @@ therefore it does not strictly represent
 ; a semicolon.  Comments start with a hash (#) character.
 
 syntax		= var-def | set-param | alg | table-def |
-		  map | group | rproc | comment
+		  map | group | proc | comment
 
 ; Variable definition.  Names can be alpha-numeric, including "_" character.
 



CVS commit: src/usr.sbin/npf/npfctl

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 10:24:19 UTC 2018

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Replace "rproc"->"proc" in the grammar (spotted by he@), and slightly
reword.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/npf/npfctl/npf.conf.5

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



CVS commit: src/usr.sbin/npf/npfctl

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 10:16:24 UTC 2018

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Replace () by [] in tcp-flags.

Fix proc-opts, the value is optional, noted by he@.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/npf/npfctl/npf.conf.5

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

Modified files:

Index: src/usr.sbin/npf/npfctl/npf.conf.5
diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.59 src/usr.sbin/npf/npfctl/npf.conf.5:1.60
--- src/usr.sbin/npf/npfctl/npf.conf.5:1.59	Thu Aug 16 09:58:00 2018
+++ src/usr.sbin/npf/npfctl/npf.conf.5	Fri Aug 17 10:16:24 2018
@@ -1,4 +1,4 @@
-.\"$NetBSD: npf.conf.5,v 1.59 2018/08/16 09:58:00 maxv Exp $
+.\"$NetBSD: npf.conf.5,v 1.60 2018/08/17 10:16:24 maxv Exp $
 .\"
 .\" Copyright (c) 2009-2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 16, 2018
+.Dd August 17, 2018
 .Dt NPF.CONF 5
 .Os
 .Sh NAME
@@ -371,7 +371,7 @@ map-flags	= "no-ports"
 ; and numbers, depending on the extension.
 
 proc		= "procedure" proc-name "{" *( proc-call [ new-line ] ) "}"
-proc-opts	= key " " val [ "," proc-opts ]
+proc-opts	= key [ " " val ] [ "," proc-opts ]
 proc-call	= call-name ":" proc-opts new-line
 
 ; Group definition and the rule list.
@@ -391,7 +391,7 @@ dynamic-ruleset	= "ruleset" group-opts
 rule		= static-rule | dynamic-ruleset
 
 tcp-flag-mask	= tcp-flags
-tcp-flags	= ("S")("A")("F")("R")
+tcp-flags	= [ "S" ] [ "A" ] [ "F" ] [ "R" ]
 proto		= "proto" protocol [ proto-opts ]
 block-opts	= "return-rst" | "return-icmp" | "return"
 family-opt	= "inet4" | "inet6"



CVS commit: src/usr.sbin/npf/npfctl

2018-08-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Aug 17 10:16:24 UTC 2018

Modified Files:
src/usr.sbin/npf/npfctl: npf.conf.5

Log Message:
Replace () by [] in tcp-flags.

Fix proc-opts, the value is optional, noted by he@.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/npf/npfctl/npf.conf.5

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