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

2023-07-30 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jul 31 02:38:16 UTC 2023

Modified Files:
src/sys/arch/amd64/amd64: db_interface.c

Log Message:
when cpus are paused (spinning) in DDB, call x86_pause() in the loop,
hopefully this can reduce power usage while doing nothing.

ok chs@

XXX: pullup-*
XXX: apply to i386


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/amd64/amd64/db_interface.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/amd64/amd64/db_interface.c
diff -u src/sys/arch/amd64/amd64/db_interface.c:1.41 src/sys/arch/amd64/amd64/db_interface.c:1.42
--- src/sys/arch/amd64/amd64/db_interface.c:1.41	Wed Oct 26 23:38:06 2022
+++ src/sys/arch/amd64/amd64/db_interface.c	Mon Jul 31 02:38:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.41 2022/10/26 23:38:06 riastradh Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.42 2023/07/31 02:38:16 mrg Exp $	*/
 
 /*
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.41 2022/10/26 23:38:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.42 2023/07/31 02:38:16 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -303,7 +303,7 @@ ddb_suspend(struct trapframe *frame)
 	atomic_or_32(>ci_flags, CPUF_PAUSE);
 
 	while (ci->ci_flags & CPUF_PAUSE)
-		;
+		x86_pause();
 	ci->ci_ddb_regs = 0;
 	tlbflushg();
 }



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

2023-07-30 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jul 31 02:38:16 UTC 2023

Modified Files:
src/sys/arch/amd64/amd64: db_interface.c

Log Message:
when cpus are paused (spinning) in DDB, call x86_pause() in the loop,
hopefully this can reduce power usage while doing nothing.

ok chs@

XXX: pullup-*
XXX: apply to i386


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/amd64/amd64/db_interface.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/amd64/conf

2023-07-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jul 22 15:18:48 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOMU

Log Message:
amd64/XEN3_DOMU: Pass -g to build debug data like GENERIC.

Needed for CTF data by dtrace when MKDEBUG=no MKDEBUGKERNEL=no.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/amd64/conf/XEN3_DOMU

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/conf/XEN3_DOMU
diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.101 src/sys/arch/amd64/conf/XEN3_DOMU:1.102
--- src/sys/arch/amd64/conf/XEN3_DOMU:1.101	Fri Jul 21 02:04:52 2023
+++ src/sys/arch/amd64/conf/XEN3_DOMU	Sat Jul 22 15:18:48 2023
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOMU,v 1.101 2023/07/21 02:04:52 riastradh Exp $
+# $NetBSD: XEN3_DOMU,v 1.102 2023/07/22 15:18:48 riastradh Exp $
 
 include 	"arch/amd64/conf/std.xen"
 
@@ -11,7 +11,7 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #options 	UVMHIST_PRINT
 #options 	SYSCALL_DEBUG
 
-#ident		"XEN3_DOMU-$Revision: 1.101 $"
+#ident		"XEN3_DOMU-$Revision: 1.102 $"
 
 maxusers	32		# estimated number of users
 
@@ -51,7 +51,7 @@ options 	DDB_ONPANIC=1	# see also sysctl
 options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
 #options 	KGDB		# remote debugger
 #options 	KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x2f8,KGDB_DEVRATE=57600
-#makeoptions	DEBUG="-g"	# compile full symbol table
+makeoptions	DEBUG="-g"	# compile full symbol table for CTF
 makeoptions	COPTS="-O2 -fno-omit-frame-pointer"
 options DDB_COMMANDONENTER="trace;show registers"
 options 	KDTRACE_HOOKS	# kernel DTrace hooks



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

2023-07-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jul 22 15:18:48 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOMU

Log Message:
amd64/XEN3_DOMU: Pass -g to build debug data like GENERIC.

Needed for CTF data by dtrace when MKDEBUG=no MKDEBUGKERNEL=no.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/amd64/conf/XEN3_DOMU

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



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

2023-07-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul 21 02:04:52 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOMU

Log Message:
amd64/XEN3_DOMU: Enable KDTRACE_HOOKS.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/amd64/conf/XEN3_DOMU

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/conf/XEN3_DOMU
diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.100 src/sys/arch/amd64/conf/XEN3_DOMU:1.101
--- src/sys/arch/amd64/conf/XEN3_DOMU:1.100	Thu Feb  9 14:09:48 2023
+++ src/sys/arch/amd64/conf/XEN3_DOMU	Fri Jul 21 02:04:52 2023
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOMU,v 1.100 2023/02/09 14:09:48 abs Exp $
+# $NetBSD: XEN3_DOMU,v 1.101 2023/07/21 02:04:52 riastradh Exp $
 
 include 	"arch/amd64/conf/std.xen"
 
@@ -11,7 +11,7 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #options 	UVMHIST_PRINT
 #options 	SYSCALL_DEBUG
 
-#ident		"XEN3_DOMU-$Revision: 1.100 $"
+#ident		"XEN3_DOMU-$Revision: 1.101 $"
 
 maxusers	32		# estimated number of users
 
@@ -54,6 +54,7 @@ options 	DDB_HISTORY_SIZE=512	# enable h
 #makeoptions	DEBUG="-g"	# compile full symbol table
 makeoptions	COPTS="-O2 -fno-omit-frame-pointer"
 options DDB_COMMANDONENTER="trace;show registers"
+options 	KDTRACE_HOOKS	# kernel DTrace hooks
 
 # Compatibility options
 include 	"conf/compat_netbsd15.config"



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

2023-07-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul 21 02:04:52 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOMU

Log Message:
amd64/XEN3_DOMU: Enable KDTRACE_HOOKS.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/amd64/conf/XEN3_DOMU

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



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

2023-07-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jul 15 22:16:00 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
amd64: Enable HEARTBEAT option, not just a HEARTBEAT option comment.


To generate a diff of this commit:
cvs rdiff -u -r1.603 -r1.604 src/sys/arch/amd64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.603 src/sys/arch/amd64/conf/GENERIC:1.604
--- src/sys/arch/amd64/conf/GENERIC:1.603	Sat Jul 15 22:14:39 2023
+++ src/sys/arch/amd64/conf/GENERIC	Sat Jul 15 22:16:00 2023
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.603 2023/07/15 22:14:39 riastradh Exp $
+# $NetBSD: GENERIC,v 1.604 2023/07/15 22:16:00 riastradh Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.603 $"
+#ident		"GENERIC-$Revision: 1.604 $"
 
 maxusers	64		# estimated number of users
 
@@ -172,8 +172,8 @@ options 	KDTRACE_HOOKS	# kernel DTrace h
 #options 	FAULT
 
 # Heartbeat checks
-#options 	HEARTBEAT
-#options 	HEARTBEAT_MAX_PERIOD_DEFAULT=15
+options 	HEARTBEAT
+options 	HEARTBEAT_MAX_PERIOD_DEFAULT=15
 
 # Compatibility options
 # x86_64 never shipped with a.out binaries; the two options below are



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

2023-07-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jul 15 22:16:00 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
amd64: Enable HEARTBEAT option, not just a HEARTBEAT option comment.


To generate a diff of this commit:
cvs rdiff -u -r1.603 -r1.604 src/sys/arch/amd64/conf/GENERIC

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



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

2023-07-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul  7 12:46:50 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
amd64/ALL: Turn on heartbeat checks.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/arch/amd64/conf/ALL

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/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.177 src/sys/arch/amd64/conf/ALL:1.178
--- src/sys/arch/amd64/conf/ALL:1.177	Thu Feb  9 14:09:48 2023
+++ src/sys/arch/amd64/conf/ALL	Fri Jul  7 12:46:50 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.177 2023/02/09 14:09:48 abs Exp $
+# $NetBSD: ALL,v 1.178 2023/07/07 12:46:50 riastradh Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.177 $"
+#ident		"ALL-$Revision: 1.178 $"
 
 maxusers	64		# estimated number of users
 
@@ -142,6 +142,10 @@ options		KCOV
 # Fault Injection Driver.
 options 	FAULT
 
+# Heartbeat checks
+options 	HEARTBEAT
+options 	HEARTBEAT_MAX_PERIOD_DEFAULT=15
+
 # Compatibility options
 options 	EXEC_AOUT	# required by binaries from before 1.5
 options 	COMPAT_386BSD_MBRPART # recognize old partition ID



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

2023-07-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul  7 12:46:50 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
amd64/ALL: Turn on heartbeat checks.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/arch/amd64/conf/ALL

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



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

2023-06-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun  5 13:59:55 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: NOCOMPAT

Log Message:
Un-comment the ident line


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/conf/NOCOMPAT

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/conf/NOCOMPAT
diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.6 src/sys/arch/amd64/conf/NOCOMPAT:1.7
--- src/sys/arch/amd64/conf/NOCOMPAT:1.6	Wed Jan 20 21:38:44 2021
+++ src/sys/arch/amd64/conf/NOCOMPAT	Mon Jun  5 13:59:54 2023
@@ -1,6 +1,6 @@
 include "arch/amd64/conf/GENERIC"
 
-#ident		"NOCOMPAT-$Revision: 1.6 $"
+ident		"NOCOMPAT-$Revision: 1.7 $"
 
 no options 	SYSVMSG		# System V-like message queues
 no options 	SYSVSEM		# System V-like semaphores



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

2023-06-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun  5 13:59:55 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: NOCOMPAT

Log Message:
Un-comment the ident line


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/conf/NOCOMPAT

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



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

2023-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Apr  9 08:17:56 UTC 2023

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

Log Message:
amd64: Make curlwp and curcpu() flushable.

The only effect of the `volatile' qualifier on an asm block with
outputs is to force the instructions to appear in the generated code,
even if the outputs end up being unused.  Since these instructions
have no (architectural) side effects -- provided %gs is set
correctly, which must be the case here -- there's no need for the
volatile qualifier, so nix it.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amd64/include/cpu.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/cpu.h
diff -u src/sys/arch/amd64/include/cpu.h:1.70 src/sys/arch/amd64/include/cpu.h:1.71
--- src/sys/arch/amd64/include/cpu.h:1.70	Tue Nov  2 11:26:03 2021
+++ src/sys/arch/amd64/include/cpu.h	Sun Apr  9 08:17:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.70 2021/11/02 11:26:03 ryo Exp $	*/
+/*	$NetBSD: cpu.h,v 1.71 2023/04/09 08:17:56 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -53,7 +53,7 @@ x86_curcpu(void)
 {
 	struct cpu_info *ci;
 
-	__asm volatile("movq %%gs:%1, %0" :
+	__asm("movq %%gs:%1, %0" :
 	"=r" (ci) :
 	"m"
 	(*(struct cpu_info * const *)offsetof(struct cpu_info, ci_self)));
@@ -65,7 +65,7 @@ x86_curlwp(void)
 {
 	lwp_t *l;
 
-	__asm volatile("movq %%gs:%1, %0" :
+	__asm("movq %%gs:%1, %0" :
 	"=r" (l) :
 	"m"
 	(*(struct cpu_info * const *)offsetof(struct cpu_info, ci_curlwp)));



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

2023-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Apr  9 08:17:56 UTC 2023

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

Log Message:
amd64: Make curlwp and curcpu() flushable.

The only effect of the `volatile' qualifier on an asm block with
outputs is to force the instructions to appear in the generated code,
even if the outputs end up being unused.  Since these instructions
have no (architectural) side effects -- provided %gs is set
correctly, which must be the case here -- there's no need for the
volatile qualifier, so nix it.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amd64/include/cpu.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/amd64/amd64

2023-02-27 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 27 16:24:28 UTC 2023

Modified Files:
src/sys/arch/amd64/amd64: amd64_trap.S

Log Message:
amd64_trap.S: Annotate trap vectors with their mnemonics.

Derived from Intel and AMD manuals.

Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3
(3A, 3B, 3C, & 3D: System Programming Guide, Order Number:
325384-077US, April 2022.
https://cdrdv2.intel.com/v1/dl/getContent/671447

AMD64 Technology: AMD64 Architecture Programmers' Manual, Volume 2:
System Programming, Publication No. 24953, Revision 3.40, January 2023.
https://www.amd.com/system/files/TechDocs/24593.pdf

No functional change intended.

XXX Should apply the same treatment to i386_trap.S.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/amd64/amd64/amd64_trap.S

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/amd64/amd64_trap.S
diff -u src/sys/arch/amd64/amd64/amd64_trap.S:1.54 src/sys/arch/amd64/amd64/amd64_trap.S:1.55
--- src/sys/arch/amd64/amd64/amd64_trap.S:1.54	Wed Sep  7 00:40:18 2022
+++ src/sys/arch/amd64/amd64/amd64_trap.S	Mon Feb 27 16:24:28 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: amd64_trap.S,v 1.54 2022/09/07 00:40:18 knakahara Exp $	*/
+/*	$NetBSD: amd64_trap.S,v 1.55 2023/02/27 16:24:28 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc.
@@ -159,7 +159,7 @@
 
 	TEXT_USER_BEGIN
 
-IDTVEC(trap00)
+IDTVEC(trap00)		/* #DE - Divide-by-zero error */
 	ZTRAP(T_DIVIDE)
 IDTVEC_END(trap00)
 
@@ -178,7 +178,7 @@ IDTVEC_END(trap00)
  * not a problem, because in this particular case, the frame is known not
  * to contain secrets.
  */
-IDTVEC(trap01)
+IDTVEC(trap01)		/* #DB - Debug */
 #ifndef XENPV
 	subq	$(TF_REGSIZE+16),%rsp
 
@@ -247,7 +247,7 @@ IDTVEC_END(trap01)
  * We need to be careful about %gs too, because it is possible that we were
  * running in kernel mode with a userland %gs.
  */
-IDTVEC(trap02)
+IDTVEC(trap02)		/* NMI - Non-maskable interrupt */
 #if defined(XENPV)
 	ZTRAP(T_NMI)
 #else /* XENPV */
@@ -302,7 +302,7 @@ IDTVEC(trap02)
 #endif /* XENPV */
 IDTVEC_END(trap02)
 
-IDTVEC(trap03)
+IDTVEC(trap03)		/* #BP - Breakpoint */
 #ifndef KDTRACE_HOOKS
 	ZTRAP(T_BPTFLT)
 #else
@@ -331,19 +331,19 @@ IDTVEC(trap03)
 #endif
 IDTVEC_END(trap03)
 
-IDTVEC(trap04)
+IDTVEC(trap04)		/* #OF - Overflow */
 	ZTRAP(T_OFLOW)
 IDTVEC_END(trap04)
 
-IDTVEC(trap05)
+IDTVEC(trap05)		/* #BR - BOUND range exceeded */
 	ZTRAP(T_BOUND)
 IDTVEC_END(trap05)
 
-IDTVEC(trap06)
+IDTVEC(trap06)		/* #UD - Invalid opcode */
 	ZTRAP(T_PRIVINFLT)
 IDTVEC_END(trap06)
 
-IDTVEC(trap07)
+IDTVEC(trap07)		/* #NM - Device not available (x87) */
 	ZTRAP_NJ(T_DNA)
 	INTRENTRY
 #ifdef DIAGNOSTIC
@@ -358,7 +358,7 @@ IDTVEC_END(trap07)
  * Double faults execute on a particular stack, and we must not jump out
  * of it. So don't enable interrupts.
  */
-IDTVEC(trap08)
+IDTVEC(trap08)		/* #DF - Double fault */
 #if defined(XENPV)
 	TRAP(T_DOUBLEFLT)
 #else /* XENPV */
@@ -399,11 +399,11 @@ IDTVEC(trap08)
 #endif /* XENPV */
 IDTVEC_END(trap08)
 
-IDTVEC(trap09)
+IDTVEC(trap09)		/* Coprocessor segment overrun (legacy x87) */
 	ZTRAP(T_FPOPFLT)
 IDTVEC_END(trap09)
 
-IDTVEC(trap10)
+IDTVEC(trap10)		/* #TS - Invalid TSS */
 	TRAP(T_TSSFLT)
 IDTVEC_END(trap10)
 
@@ -416,26 +416,26 @@ IDTVEC_END(trap10)
 #define kernuser_reenter alltraps
 #endif /* XENPV */
 
-IDTVEC(trap11)		/* #NP() Segment not present */
+IDTVEC(trap11)		/* #NP - Segment not present */
 	TRAP_NJ(T_SEGNPFLT)
 	jmp	kernuser_reenter
 IDTVEC_END(trap11)
 
-IDTVEC(trap12)		/* #SS() Stack exception */
+IDTVEC(trap12)		/* #SS - Stack fault */
 	TRAP_NJ(T_STKFLT)
 	jmp	kernuser_reenter
 IDTVEC_END(trap12)
 
-IDTVEC(trap13)		/* #GP() General protection */
+IDTVEC(trap13)		/* #GP - General protection */
 	TRAP_NJ(T_PROTFLT)
 	jmp	kernuser_reenter
 IDTVEC_END(trap13)
 
-IDTVEC(trap14)
+IDTVEC(trap14)		/* #PF - Page fault */
 	TRAP(T_PAGEFLT)
 IDTVEC_END(trap14)
 
-IDTVEC(trap15)
+IDTVEC(trap15)		/* XXX ??? */
 	ZTRAP_NJ(T_ASTFLT)
 	INTRENTRY
 #ifdef DIAGNOSTIC
@@ -444,7 +444,7 @@ IDTVEC(trap15)
 	jmp	.Lalltraps_checkusr
 IDTVEC_END(trap15)
 
-IDTVEC(trap16)
+IDTVEC(trap16)		/* #MF - x87 floating-point exception */
 	ZTRAP_NJ(T_ARITHTRAP)
 .Ldo_fputrap:
 	INTRENTRY
@@ -464,30 +464,30 @@ IDTVEC(trap16)
 	jmp	.Lalltraps_checkusr
 IDTVEC_END(trap16)
 
-IDTVEC(trap17)
+IDTVEC(trap17)		/* #AC - Alignment check */
 	TRAP(T_ALIGNFLT)
 IDTVEC_END(trap17)
 
-IDTVEC(trap18)
+IDTVEC(trap18)		/* #MC - Machine check */
 	ZTRAP(T_MCA)
 IDTVEC_END(trap18)
 
-IDTVEC(trap19)
+IDTVEC(trap19)		/* #XM - SIMD floating-point exception */
 	ZTRAP_NJ(T_XMM)
 	jmp	.Ldo_fputrap
 IDTVEC_END(trap19)
 
-IDTVEC(trap20)
-IDTVEC(trap21)
+IDTVEC(trap20)		/* #VE - Virtualization (Intel) */
+IDTVEC(trap21)		/* #CP - Control protection */
 IDTVEC(trap22)
 IDTVEC(trap23)
 IDTVEC(trap24)
 

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

2023-02-27 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 27 16:24:28 UTC 2023

Modified Files:
src/sys/arch/amd64/amd64: amd64_trap.S

Log Message:
amd64_trap.S: Annotate trap vectors with their mnemonics.

Derived from Intel and AMD manuals.

Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3
(3A, 3B, 3C, & 3D: System Programming Guide, Order Number:
325384-077US, April 2022.
https://cdrdv2.intel.com/v1/dl/getContent/671447

AMD64 Technology: AMD64 Architecture Programmers' Manual, Volume 2:
System Programming, Publication No. 24953, Revision 3.40, January 2023.
https://www.amd.com/system/files/TechDocs/24593.pdf

No functional change intended.

XXX Should apply the same treatment to i386_trap.S.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/amd64/amd64/amd64_trap.S

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



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

2022-12-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 26 17:46:00 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: locore.S

Log Message:
sysret -> sysretl for new binutils


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/sys/arch/amd64/amd64/locore.S

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/amd64/locore.S
diff -u src/sys/arch/amd64/amd64/locore.S:1.214 src/sys/arch/amd64/amd64/locore.S:1.215
--- src/sys/arch/amd64/amd64/locore.S:1.214	Tue Sep  6 20:40:18 2022
+++ src/sys/arch/amd64/amd64/locore.S	Mon Dec 26 12:46:00 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.214 2022/09/07 00:40:18 knakahara Exp $	*/
+/*	$NetBSD: locore.S,v 1.215 2022/12/26 17:46:00 christos Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -1527,7 +1527,7 @@ SYSCALL_ENTRY	syscall_svs,is_svs=1
 #endif
 
 IDTVEC(syscall32)
-	sysret		/* go away please */
+	sysretl		/* go away please */
 IDTVEC_END(syscall32)
 
 	TEXT_USER_END



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

2022-12-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 26 17:46:00 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: locore.S

Log Message:
sysret -> sysretl for new binutils


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/sys/arch/amd64/amd64/locore.S

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



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

2022-12-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Dec 18 07:53:31 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: copy.S

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amd64/amd64/copy.S

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



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

2022-12-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Dec 18 07:53:31 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: copy.S

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amd64/amd64/copy.S

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/amd64/copy.S
diff -u src/sys/arch/amd64/amd64/copy.S:1.34 src/sys/arch/amd64/amd64/copy.S:1.35
--- src/sys/arch/amd64/amd64/copy.S:1.34	Tue Jun 30 16:20:00 2020
+++ src/sys/arch/amd64/amd64/copy.S	Sun Dec 18 07:53:30 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: copy.S,v 1.34 2020/06/30 16:20:00 maxv Exp $	*/
+/*	$NetBSD: copy.S,v 1.35 2022/12/18 07:53:30 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -120,7 +120,7 @@ END(do_pmap_load)
  * However the use of 'rep movsb' for the final bytes should be killed.
  *
  * Newer Intel cpus have a much lower setup time, and may (someday)
- * be ably to do cache-line size copies
+ * be able to do cache-line size copies
  */
 
 /*



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

2022-09-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep 13 09:39:50 UTC 2022

Modified Files:
src/sys/arch/amd64/include: asan.h msan.h

Log Message:
amd64/asan.h, amd64/msan.h: Add include guards.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/include/asan.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/include/msan.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/asan.h
diff -u src/sys/arch/amd64/include/asan.h:1.11 src/sys/arch/amd64/include/asan.h:1.12
--- src/sys/arch/amd64/include/asan.h:1.11	Mon Aug 22 13:57:24 2022
+++ src/sys/arch/amd64/include/asan.h	Tue Sep 13 09:39:49 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: asan.h,v 1.11 2022/08/22 13:57:24 hannken Exp $	*/
+/*	$NetBSD: asan.h,v 1.12 2022/09/13 09:39:49 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -28,6 +28,9 @@
  * SUCH DAMAGE.
  */
 
+#ifndef	_AMD64_ASAN_H_
+#define	_AMD64_ASAN_H_
+
 #include 
 
 #include 
@@ -294,3 +297,5 @@ kasan_md_unwind(void)
 		}
 	}
 }
+
+#endif	/* _AMD64_ASAN_H_ */

Index: src/sys/arch/amd64/include/msan.h
diff -u src/sys/arch/amd64/include/msan.h:1.7 src/sys/arch/amd64/include/msan.h:1.8
--- src/sys/arch/amd64/include/msan.h:1.7	Mon Aug 22 13:21:47 2022
+++ src/sys/arch/amd64/include/msan.h	Tue Sep 13 09:39:49 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: msan.h,v 1.7 2022/08/22 13:21:47 riastradh Exp $	*/
+/*	$NetBSD: msan.h,v 1.8 2022/09/13 09:39:49 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2019-2020 Maxime Villard, m00nbsd.net
@@ -28,6 +28,9 @@
  * SUCH DAMAGE.
  */
 
+#ifndef	_AMD64_MSAN_H_
+#define	_AMD64_MSAN_H_
+
 #include 
 
 #include 
@@ -275,3 +278,5 @@ kmsan_md_unwind(void)
 		}
 	}
 }
+
+#endif	/* _AMD64_MSAN_H_ */



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

2022-09-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Sep 13 09:39:50 UTC 2022

Modified Files:
src/sys/arch/amd64/include: asan.h msan.h

Log Message:
amd64/asan.h, amd64/msan.h: Add include guards.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/include/asan.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/include/msan.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/amd64/amd64

2022-09-12 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Sep 13 05:36:29 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: lock_stubs.S

Log Message:
Fix PR kern/57007.  I missed applying a part of the original patch.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amd64/amd64/lock_stubs.S

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/amd64/lock_stubs.S
diff -u src/sys/arch/amd64/amd64/lock_stubs.S:1.37 src/sys/arch/amd64/amd64/lock_stubs.S:1.38
--- src/sys/arch/amd64/amd64/lock_stubs.S:1.37	Wed Sep  7 00:40:18 2022
+++ src/sys/arch/amd64/amd64/lock_stubs.S	Tue Sep 13 05:36:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_stubs.S,v 1.37 2022/09/07 00:40:18 knakahara Exp $	*/
+/*	$NetBSD: lock_stubs.S,v 1.38 2022/09/13 05:36:29 knakahara Exp $	*/
 
 /*
  * Copyright (c) 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -124,13 +124,13 @@ ENTRY(mutex_spin_exit)
 	movl	CPU_INFO_MTX_OLDSPL(%r8), %edi
 	incl	CPU_INFO_MTX_COUNT(%r8)
 	jnz	1f
-	cmpl	CPU_INFO_ILEVEL(%r8), %edi
+	cmpb	CPU_INFO_ILEVEL(%r8), %dil
 	jae	1f
-	movl	CPU_INFO_IUNMASK(%r8,%rdi,4), %esi
+	movq	CPU_INFO_IUNMASK(%r8,%rdi,8), %rsi
 	CLI(ax)
-	testl	CPU_INFO_IPENDING(%r8), %esi
+	testq	CPU_INFO_IPENDING(%r8), %rsi
 	jnz	_C_LABEL(Xspllower)
-	movl	%edi, CPU_INFO_ILEVEL(%r8)
+	movb	%dil, CPU_INFO_ILEVEL(%r8)
 	STI(ax)
 1:	rep	/* double byte ret as branch */
 	ret	/* target: see AMD docs */
@@ -141,23 +141,27 @@ ENTRY(mutex_spin_exit)
 	movb	$0x00, MTX_LOCK(%rdi)
 	movl	CPU_INFO_MTX_OLDSPL(%rsi), %ecx
 	incl	CPU_INFO_MTX_COUNT(%rsi)
-	movl	CPU_INFO_ILEVEL(%rsi),%edx
+	movzbl	CPU_INFO_ILEVEL(%rsi),%edx
 	cmovnzl	%edx,%ecx
-	pushq	%rbx
 	cmpl	%edx,%ecx			/* new level is lower? */
 	jae	2f
+	xorq	%rdi,%rdi			/* rdi: ci_ipending mask */
+	notq	%rdi
+	shrq	$8,%rdi
+	movq	%rcx,%r9			/* r9: shifted new level */
+	shlq	$56,%r9
 1:
-	movl	CPU_INFO_IPENDING(%rsi),%eax
-	testl	%eax,CPU_INFO_IUNMASK(%rsi,%rcx,4)/* deferred interrupts? */
+	movq	CPU_INFO_IPENDING(%rsi),%rax
+	testq	%rax,CPU_INFO_IUNMASK(%rsi,%rcx,8)/* deferred interrupts? */
 	jnz	3f
-	movl	%eax,%ebx
-	cmpxchg8b CPU_INFO_ISTATE(%rsi)		/* swap in new ilevel */
+	movq	%rax,%r8
+	andq	%rdi,%r8
+	orq	%r9,%r8
+	cmpxchgq %r8,CPU_INFO_ISTATE(%rsi)	/* swap in new ilevel */
 	jnz	4f
 2:
-	popq	%rbx
 	ret
 3:
-	popq	%rbx
 	movl	%ecx, %edi
 	jmp	_C_LABEL(Xspllower)
 4:



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

2022-09-12 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Sep 13 05:36:29 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: lock_stubs.S

Log Message:
Fix PR kern/57007.  I missed applying a part of the original patch.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amd64/amd64/lock_stubs.S

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



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

2022-09-11 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Sep 12 02:21:11 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: vector.S

Log Message:
Update register name at fault.  Pointed out by hgutch@n.o, thanks.

In vetor.S:r1.78

IDTVEC(handle_hypervisor_callback)
  movlCPUVAR(ILEVEL),%edi
  pushq   %rdi /* for Xdoreti */

So, use %edi as before.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/amd64/amd64/vector.S

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



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

2022-09-11 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Sep 12 02:21:11 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: vector.S

Log Message:
Update register name at fault.  Pointed out by hgutch@n.o, thanks.

In vetor.S:r1.78

IDTVEC(handle_hypervisor_callback)
  movlCPUVAR(ILEVEL),%edi
  pushq   %rdi /* for Xdoreti */

So, use %edi as before.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/amd64/amd64/vector.S

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/amd64/vector.S
diff -u src/sys/arch/amd64/amd64/vector.S:1.79 src/sys/arch/amd64/amd64/vector.S:1.80
--- src/sys/arch/amd64/amd64/vector.S:1.79	Wed Sep  7 00:40:18 2022
+++ src/sys/arch/amd64/amd64/vector.S	Mon Sep 12 02:21:11 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: vector.S,v 1.79 2022/09/07 00:40:18 knakahara Exp $	*/
+/*	$NetBSD: vector.S,v 1.80 2022/09/12 02:21:11 knakahara Exp $	*/
 
 /*
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -728,7 +728,7 @@ ENTRY(hypervisor_callback)
 	pushq	$T_ASTFLT
 	INTRENTRY
 IDTVEC(handle_hypervisor_callback)
-	movzbl	CPUVAR(ILEVEL),%rdi
+	movzbl	CPUVAR(ILEVEL),%edi
 	pushq   %rdi /* for Xdoreti */
 	incl	CPUVAR(IDEPTH)
 	movq	%rsp,%rdi



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

2022-09-01 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Sep  1 12:35:02 UTC 2022

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Add commented out experimental PVH dom0 options and pseudo-device


To generate a diff of this commit:
cvs rdiff -u -r1.596 -r1.597 src/sys/arch/amd64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.596 src/sys/arch/amd64/conf/GENERIC:1.597
--- src/sys/arch/amd64/conf/GENERIC:1.596	Sun Aug  7 02:52:23 2022
+++ src/sys/arch/amd64/conf/GENERIC	Thu Sep  1 12:35:02 2022
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.596 2022/08/07 02:52:23 simonb Exp $
+# $NetBSD: GENERIC,v 1.597 2022/09/01 12:35:02 bouyer Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.596 $"
+#ident		"GENERIC-$Revision: 1.597 $"
 
 maxusers	64		# estimated number of users
 
@@ -91,7 +91,7 @@ hyperv0 	at cpu0		# Microsoft Hyper-V
 powernow0	at cpu0		# AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 vmt0		at cpu0		# VMware Tools
 
-#Xen PV support for HVM guests
+#Xen PV support for PVH and HVM guests
 options 	XENPVHVM
 options 	XEN
 hypervisor*	at mainbus?		# Xen hypervisor
@@ -99,6 +99,12 @@ xenbus*	 	at hypervisor?		# Xen virtual 
 xencons*	at hypervisor?		# Xen virtual console
 xennet*  	at xenbus?		# Xen virtual network interface
 xbd*		at xenbus?		# Xen virtual block device
+# experimental: PVH dom0 support
+#options 	DOM0OPS
+#pseudo-device  xenevt
+#pseudo-device  xvif
+#pseudo-device  xbdback
+
 
 # Alternate buffer queue strategies for better responsiveness under high
 # disk I/O load.



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

2022-09-01 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Sep  1 12:35:02 UTC 2022

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Add commented out experimental PVH dom0 options and pseudo-device


To generate a diff of this commit:
cvs rdiff -u -r1.596 -r1.597 src/sys/arch/amd64/conf/GENERIC

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



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

2022-08-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Aug 22 13:21:47 UTC 2022

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

Log Message:
amd64/msan.h: Fix includes for private pmap.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/include/msan.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/msan.h
diff -u src/sys/arch/amd64/include/msan.h:1.6 src/sys/arch/amd64/include/msan.h:1.7
--- src/sys/arch/amd64/include/msan.h:1.6	Wed Nov 18 16:13:34 2020
+++ src/sys/arch/amd64/include/msan.h	Mon Aug 22 13:21:47 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: msan.h,v 1.6 2020/11/18 16:13:34 hannken Exp $	*/
+/*	$NetBSD: msan.h,v 1.7 2022/08/22 13:21:47 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2019-2020 Maxime Villard, m00nbsd.net
@@ -32,8 +32,12 @@
 
 #include 
 
-#include 
-#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
 
 #ifdef __HAVE_PCPU_AREA
 #error "PCPU area not allowed with KMSAN"



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

2022-08-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Aug 22 13:21:47 UTC 2022

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

Log Message:
amd64/msan.h: Fix includes for private pmap.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/include/msan.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/amd64

2022-08-21 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Aug 21 14:05:52 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: prekern.c
src/sys/arch/amd64/stand/prekern: pdir.h prekern.h

Log Message:
Adapt to pmap/bootspace migrations.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/amd64/prekern.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/stand/prekern/pdir.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amd64/stand/prekern/prekern.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/amd64/prekern.c
diff -u src/sys/arch/amd64/amd64/prekern.c:1.5 src/sys/arch/amd64/amd64/prekern.c:1.6
--- src/sys/arch/amd64/amd64/prekern.c:1.5	Sun Aug 12 15:31:01 2018
+++ src/sys/arch/amd64/amd64/prekern.c	Sun Aug 21 14:05:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: prekern.c,v 1.5 2018/08/12 15:31:01 maxv Exp $	*/
+/*	$NetBSD: prekern.c,v 1.6 2022/08/21 14:05:52 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved.
@@ -40,9 +40,12 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 

Index: src/sys/arch/amd64/stand/prekern/pdir.h
diff -u src/sys/arch/amd64/stand/prekern/pdir.h:1.7 src/sys/arch/amd64/stand/prekern/pdir.h:1.8
--- src/sys/arch/amd64/stand/prekern/pdir.h:1.7	Sat May 23 08:25:32 2020
+++ src/sys/arch/amd64/stand/prekern/pdir.h	Sun Aug 21 14:05:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pdir.h,v 1.7 2020/05/23 08:25:32 maxv Exp $	*/
+/*	$NetBSD: pdir.h,v 1.8 2022/08/21 14:05:52 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved.
@@ -70,7 +70,3 @@
 #define VA_SIGN_MASK		0x
 #define VA_SIGN_NEG(va)		((va) | VA_SIGN_MASK)
 
-#define pl1_i(va)	(((va) & L1_FRAME) >> L1_SHIFT)
-#define pl2_i(va)	(((va) & L2_FRAME) >> L2_SHIFT)
-#define pl3_i(va)	(((va) & L3_FRAME) >> L3_SHIFT)
-#define pl4_i(va)	(((va) & L4_FRAME) >> L4_SHIFT)

Index: src/sys/arch/amd64/stand/prekern/prekern.h
diff -u src/sys/arch/amd64/stand/prekern/prekern.h:1.24 src/sys/arch/amd64/stand/prekern/prekern.h:1.25
--- src/sys/arch/amd64/stand/prekern/prekern.h:1.24	Tue May  4 21:09:16 2021
+++ src/sys/arch/amd64/stand/prekern/prekern.h	Sun Aug 21 14:05:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: prekern.h,v 1.24 2021/05/04 21:09:16 khorben Exp $	*/
+/*	$NetBSD: prekern.h,v 1.25 2022/08/21 14:05:52 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved.
@@ -32,8 +32,12 @@
 #include 
 #include 
 #include 
+
+#include 
 #include 
 
+#include 
+
 #include "pdir.h"
 #include "redef.h"
 
@@ -59,34 +63,6 @@ typedef enum
 
 /* -- */
 
-#define BTSEG_NONE	0
-#define BTSEG_TEXT	1
-#define BTSEG_RODATA	2
-#define BTSEG_DATA	3
-#define BTSPACE_NSEGS	64
-struct bootspace {
-	struct {
-		vaddr_t va;
-		paddr_t pa;
-		size_t sz;
-	} head;
-	struct {
-		int type;
-		vaddr_t va;
-		paddr_t pa;
-		size_t sz;
-	} segs[BTSPACE_NSEGS];
-	struct {
-		vaddr_t va;
-		paddr_t pa;
-		size_t sz;
-	} boot;
-	vaddr_t spareva;
-	vaddr_t pdir;
-	vaddr_t smodule;
-	vaddr_t emodule;
-};
-
 /* console.c */
 void init_cons(void);
 void print_ext(int, char *);



CVS commit: src/sys/arch/amd64

2022-08-21 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Aug 21 14:05:52 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: prekern.c
src/sys/arch/amd64/stand/prekern: pdir.h prekern.h

Log Message:
Adapt to pmap/bootspace migrations.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/amd64/prekern.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/stand/prekern/pdir.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amd64/stand/prekern/prekern.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/amd64/amd64

2022-06-27 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jun 27 23:36:48 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: db_machdep.c

Log Message:
amd64: Handle __syscall trap frames specially too.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amd64/amd64/db_machdep.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/amd64/amd64/db_machdep.c
diff -u src/sys/arch/amd64/amd64/db_machdep.c:1.12 src/sys/arch/amd64/amd64/db_machdep.c:1.13
--- src/sys/arch/amd64/amd64/db_machdep.c:1.12	Sun Jun 26 22:31:12 2022
+++ src/sys/arch/amd64/amd64/db_machdep.c	Mon Jun 27 23:36:48 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.c,v 1.12 2022/06/26 22:31:12 riastradh Exp $	*/
+/*	$NetBSD: db_machdep.c,v 1.13 2022/06/27 23:36:48 riastradh Exp $	*/
 
 /*
  * Mach Operating System
@@ -26,7 +26,7 @@
  * rights to redistribute these changes.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.12 2022/06/26 22:31:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.13 2022/06/27 23:36:48 riastradh Exp $");
 
 #include 
 #include 
@@ -130,7 +130,7 @@ db_nextframe(long **nextframe, long **re
 	case SYSCALL:
 		tf = (struct trapframe *)argp;
 		syscallno = db_get_value((long)>tf_rax, 8, false);
-		if (syscallno == SYS_syscall) {
+		if (syscallno == SYS_syscall || syscallno == SYS___syscall) {
 			syscallno = db_get_value((long)>tf_rdi, 8, false);
 			(*pr)("--- syscall (number %"DDB_EXPR_FMT"u"
 			" via SYS_syscall) ---\n",



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

2022-06-27 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jun 27 23:36:48 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: db_machdep.c

Log Message:
amd64: Handle __syscall trap frames specially too.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amd64/amd64/db_machdep.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/amd64/amd64

2022-06-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun 26 22:31:12 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: db_machdep.c

Log Message:
amd64: Print effective syscall number for SYS_syscall stack traces.

This time with compile-testing, at least.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/amd64/db_machdep.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/amd64/amd64/db_machdep.c
diff -u src/sys/arch/amd64/amd64/db_machdep.c:1.11 src/sys/arch/amd64/amd64/db_machdep.c:1.12
--- src/sys/arch/amd64/amd64/db_machdep.c:1.11	Sun Jun 26 22:29:28 2022
+++ src/sys/arch/amd64/amd64/db_machdep.c	Sun Jun 26 22:31:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.c,v 1.11 2022/06/26 22:29:28 riastradh Exp $	*/
+/*	$NetBSD: db_machdep.c,v 1.12 2022/06/26 22:31:12 riastradh Exp $	*/
 
 /*
  * Mach Operating System
@@ -26,11 +26,12 @@
  * rights to redistribute these changes.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.11 2022/06/26 22:29:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.12 2022/06/26 22:31:12 riastradh Exp $");
 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -111,6 +112,7 @@ db_nextframe(long **nextframe, long **re
 	struct x86_64_frame *fp;
 	struct intrframe *ifp;
 	int traptype, trapno, err, i;
+	db_expr_t syscallno;
 
 	switch (is_trap) {
 	case NONE:
@@ -127,8 +129,16 @@ db_nextframe(long **nextframe, long **re
 
 	case SYSCALL:
 		tf = (struct trapframe *)argp;
-		(*pr)("--- syscall (number %"DDB_EXPR_FMT"u) ---\n",
-		db_get_value((long)>tf_rax, 8, false));
+		syscallno = db_get_value((long)>tf_rax, 8, false);
+		if (syscallno == SYS_syscall) {
+			syscallno = db_get_value((long)>tf_rdi, 8, false);
+			(*pr)("--- syscall (number %"DDB_EXPR_FMT"u"
+			" via SYS_syscall) ---\n",
+			syscallno);
+		} else {
+			(*pr)("--- syscall (number %"DDB_EXPR_FMT"u) ---\n",
+			syscallno);
+		}
 		return 0;
 
 	case TRAP:



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

2022-06-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun 26 22:31:12 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: db_machdep.c

Log Message:
amd64: Print effective syscall number for SYS_syscall stack traces.

This time with compile-testing, at least.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/amd64/db_machdep.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/amd64/amd64

2022-06-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun 26 22:29:28 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: db_machdep.c

Log Message:
Revert "amd64: Print effective syscall number for SYS_syscall stack traces."

Built the wrong kernel (arm64 is not amd64), oops.  Will redo.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/amd64/amd64/db_machdep.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/amd64/amd64/db_machdep.c
diff -u src/sys/arch/amd64/amd64/db_machdep.c:1.10 src/sys/arch/amd64/amd64/db_machdep.c:1.11
--- src/sys/arch/amd64/amd64/db_machdep.c:1.10	Sun Jun 26 22:18:30 2022
+++ src/sys/arch/amd64/amd64/db_machdep.c	Sun Jun 26 22:29:28 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.c,v 1.10 2022/06/26 22:18:30 riastradh Exp $	*/
+/*	$NetBSD: db_machdep.c,v 1.11 2022/06/26 22:29:28 riastradh Exp $	*/
 
 /*
  * Mach Operating System
@@ -26,7 +26,7 @@
  * rights to redistribute these changes.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.10 2022/06/26 22:18:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.11 2022/06/26 22:29:28 riastradh Exp $");
 
 #include 
 #include 
@@ -111,7 +111,6 @@ db_nextframe(long **nextframe, long **re
 	struct x86_64_frame *fp;
 	struct intrframe *ifp;
 	int traptype, trapno, err, i;
-	db_expr_t syscallno;
 
 	switch (is_trap) {
 	case NONE:
@@ -128,16 +127,8 @@ db_nextframe(long **nextframe, long **re
 
 	case SYSCALL:
 		tf = (struct trapframe *)argp;
-		syscallno = db_get_value((long)>tf_rax, 8, false);
-		if (syscallno == SYS_syscall) {
-			syscallno = db_get_value((long)>tf_rdi, 8, false);
-			(*pr)("--- syscall (number %"DDB_EXPR_FMT"u"
-			" via SYS_syscall) ---\n",
-			syscallno);
-		} else {
-			(*pr)("--- syscall (number %"DDB_EXPR_FMT"u) ---\n",
-			syscallno);
-		}
+		(*pr)("--- syscall (number %"DDB_EXPR_FMT"u) ---\n",
+		db_get_value((long)>tf_rax, 8, false));
 		return 0;
 
 	case TRAP:



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

2022-06-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun 26 22:29:28 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: db_machdep.c

Log Message:
Revert "amd64: Print effective syscall number for SYS_syscall stack traces."

Built the wrong kernel (arm64 is not amd64), oops.  Will redo.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/amd64/amd64/db_machdep.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/amd64/amd64

2022-06-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun 26 22:18:30 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: db_machdep.c

Log Message:
amd64: Print effective syscall number for SYS_syscall stack traces.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amd64/amd64/db_machdep.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/amd64/amd64/db_machdep.c
diff -u src/sys/arch/amd64/amd64/db_machdep.c:1.9 src/sys/arch/amd64/amd64/db_machdep.c:1.10
--- src/sys/arch/amd64/amd64/db_machdep.c:1.9	Mon Dec 13 01:25:29 2021
+++ src/sys/arch/amd64/amd64/db_machdep.c	Sun Jun 26 22:18:30 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.c,v 1.9 2021/12/13 01:25:29 chs Exp $	*/
+/*	$NetBSD: db_machdep.c,v 1.10 2022/06/26 22:18:30 riastradh Exp $	*/
 
 /*
  * Mach Operating System
@@ -26,7 +26,7 @@
  * rights to redistribute these changes.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.9 2021/12/13 01:25:29 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.10 2022/06/26 22:18:30 riastradh Exp $");
 
 #include 
 #include 
@@ -111,6 +111,7 @@ db_nextframe(long **nextframe, long **re
 	struct x86_64_frame *fp;
 	struct intrframe *ifp;
 	int traptype, trapno, err, i;
+	db_expr_t syscallno;
 
 	switch (is_trap) {
 	case NONE:
@@ -127,8 +128,16 @@ db_nextframe(long **nextframe, long **re
 
 	case SYSCALL:
 		tf = (struct trapframe *)argp;
-		(*pr)("--- syscall (number %"DDB_EXPR_FMT"u) ---\n",
-		db_get_value((long)>tf_rax, 8, false));
+		syscallno = db_get_value((long)>tf_rax, 8, false);
+		if (syscallno == SYS_syscall) {
+			syscallno = db_get_value((long)>tf_rdi, 8, false);
+			(*pr)("--- syscall (number %"DDB_EXPR_FMT"u"
+			" via SYS_syscall) ---\n",
+			syscallno);
+		} else {
+			(*pr)("--- syscall (number %"DDB_EXPR_FMT"u) ---\n",
+			syscallno);
+		}
 		return 0;
 
 	case TRAP:



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

2022-06-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun 26 22:18:30 UTC 2022

Modified Files:
src/sys/arch/amd64/amd64: db_machdep.c

Log Message:
amd64: Print effective syscall number for SYS_syscall stack traces.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amd64/amd64/db_machdep.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/amd64/conf

2022-05-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun May 29 08:06:40 UTC 2022

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
Add missing Hyper-V devices from GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/arch/amd64/conf/ALL

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/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.171 src/sys/arch/amd64/conf/ALL:1.172
--- src/sys/arch/amd64/conf/ALL:1.171	Fri May 13 10:45:24 2022
+++ src/sys/arch/amd64/conf/ALL	Sun May 29 08:06:40 2022
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.171 2022/05/13 10:45:24 msaitoh Exp $
+# $NetBSD: ALL,v 1.172 2022/05/29 08:06:40 rin Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.171 $"
+#ident		"ALL-$Revision: 1.172 $"
 
 maxusers	64		# estimated number of users
 
@@ -1575,6 +1575,18 @@ viornd* at virtio?			# Virtio entropy de
 vioscsi* at virtio?			# Virtio SCSI device
 vio9p*	at virtio?			# Virtio 9P device
 
+# Hyper-V devices
+vmbus*		at acpi?		# Hyper-V VMBus
+genfb*		at vmbus?		# Hyper-V Synthetic Video Framebuffer
+hvkbd*		at vmbus?		# Hyper-V Synthetic Keyboard
+wskbd*		at hvkbd? console ? mux 1
+hvn*		at vmbus?		# Hyper-V NetVSC
+hvs*		at vmbus?		# Hyper-V StorVSC
+hvheartbeat*	at vmbus?		# Hyper-V Heartbeat Service
+hvshutdown*	at vmbus?		# Hyper-V Guest Shutdown Service
+hvtimesync*	at vmbus?		# Hyper-V Time Synchronization Service
+#hvkvp*		at vmbus?		# Hyper-V Data Exchange Service
+
 # Flash subsystem
 flash* at flashbus?
 



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

2022-05-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun May 29 08:06:40 UTC 2022

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
Add missing Hyper-V devices from GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/arch/amd64/conf/ALL

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



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

2022-05-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue May 24 16:01:25 UTC 2022

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
Looks like we finally can enable MSI/MSI-X on Xen
Should fix PR kern/56793 and PR kern/55667


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/sys/arch/amd64/conf/XEN3_DOM0

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/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.194 src/sys/arch/amd64/conf/XEN3_DOM0:1.195
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.194	Fri Sep 24 00:29:46 2021
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Tue May 24 16:01:25 2022
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.194 2021/09/24 00:29:46 manu Exp $
+# $NetBSD: XEN3_DOM0,v 1.195 2022/05/24 16:01:25 bouyer Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -14,7 +14,7 @@ include 	"arch/amd64/conf/std.xen"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"XEN3_DOM0-$Revision: 1.194 $"
+#ident		"XEN3_DOM0-$Revision: 1.195 $"
 
 maxusers	32		# estimated number of users
 
@@ -384,9 +384,6 @@ pci*	at hypervisor? bus ?
 pci*	at pchb? bus ?
 pci*	at ppb? bus ?
 
-# MSIX bugs with XEN3_DOM0: kern/55667, kern/56291
-options NO_PCI_MSI_MSIX
-
 # PCI bridges
 pchb*	at pci? dev ? function ?	# PCI-Host bridges
 #options 	AGP_X86			# INTENTIONAL OMISSION - crashes reported with agp



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

2022-05-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue May 24 16:01:25 UTC 2022

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
Looks like we finally can enable MSI/MSI-X on Xen
Should fix PR kern/56793 and PR kern/55667


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/sys/arch/amd64/conf/XEN3_DOM0

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



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

2022-05-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat May  7 04:32:29 UTC 2022

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
Add MODULAR_DEFAULT_VERBOSE.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/arch/amd64/conf/ALL

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



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

2022-05-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat May  7 04:32:29 UTC 2022

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
Add MODULAR_DEFAULT_VERBOSE.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/arch/amd64/conf/ALL

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/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.169 src/sys/arch/amd64/conf/ALL:1.170
--- src/sys/arch/amd64/conf/ALL:1.169	Thu Dec 23 17:13:13 2021
+++ src/sys/arch/amd64/conf/ALL	Sat May  7 04:32:29 2022
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.169 2021/12/23 17:13:13 hannken Exp $
+# $NetBSD: ALL,v 1.170 2022/05/07 04:32:29 rin Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.169 $"
+#ident		"ALL-$Revision: 1.170 $"
 
 maxusers	64		# estimated number of users
 
@@ -97,6 +97,7 @@ options 	SYSVSHM		# System V-like memory
 
 options 	MODULAR		# new style module(7) framework
 options 	MODULAR_DEFAULT_AUTOLOAD
+options 	MODULAR_DEFAULT_VERBOSE
 
 options 	USERCONF	# userconf(4) support
 options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)



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

2021-11-29 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Nov 29 20:03:15 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOMU

Log Message:
enable UFS_ACL option for XEN3_DOMU, it's useful for e.g. running Samba in DomU

idea from Matthias Petermann via current-users@


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/amd64/conf/XEN3_DOMU

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/conf/XEN3_DOMU
diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.97 src/sys/arch/amd64/conf/XEN3_DOMU:1.98
--- src/sys/arch/amd64/conf/XEN3_DOMU:1.97	Wed Jan 20 13:22:08 2021
+++ src/sys/arch/amd64/conf/XEN3_DOMU	Mon Nov 29 20:03:15 2021
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOMU,v 1.97 2021/01/20 13:22:08 nia Exp $
+# $NetBSD: XEN3_DOMU,v 1.98 2021/11/29 20:03:15 jdolecek Exp $
 
 include 	"arch/amd64/conf/std.xen"
 
@@ -11,7 +11,7 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #options 	UVMHIST_PRINT
 #options 	SYSCALL_DEBUG
 
-#ident		"XEN3_DOMU-$Revision: 1.97 $"
+#ident		"XEN3_DOMU-$Revision: 1.98 $"
 
 maxusers	32		# estimated number of users
 
@@ -80,6 +80,7 @@ options 	QUOTA2		# new, in-filesystem UF
 #options 	FFS_EI		# FFS Endian Independent support
 options 	WAPBL		# File system journaling support
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
+options		UFS_ACL		# UFS Access Control Lists
 options 	NFSSERVER	# Network File System server
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 options 	UFS_EXTATTR	# Extended attribute support for UFS1



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

2021-11-29 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Nov 29 20:03:15 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOMU

Log Message:
enable UFS_ACL option for XEN3_DOMU, it's useful for e.g. running Samba in DomU

idea from Matthias Petermann via current-users@


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/amd64/conf/XEN3_DOMU

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



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

2021-11-24 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Nov 25 02:36:35 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
add missing options EXEC_ELF32


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/arch/amd64/conf/ALL

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/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.167 src/sys/arch/amd64/conf/ALL:1.168
--- src/sys/arch/amd64/conf/ALL:1.167	Tue Jun 29 10:22:34 2021
+++ src/sys/arch/amd64/conf/ALL	Thu Nov 25 02:36:35 2021
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.167 2021/06/29 10:22:34 nia Exp $
+# $NetBSD: ALL,v 1.168 2021/11/25 02:36:35 ryo Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.167 $"
+#ident		"ALL-$Revision: 1.168 $"
 
 maxusers	64		# estimated number of users
 
@@ -150,6 +150,7 @@ options 	COMPAT_OSSAUDIO	# OSS (Voxware)
 options 	COMPAT_NETBSD32 # NetBSD 32-bit
 options 	COMPAT_LINUX	# binary compatibility with Linux
 options 	COMPAT_LINUX32	# binary compatibility with Linux 32-bit
+options 	EXEC_ELF32
 
 # Wedge support
 options 	DKWEDGE_AUTODISCOVER	# Automatically add dk(4) instances



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

2021-11-24 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Nov 25 02:36:35 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
add missing options EXEC_ELF32


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/arch/amd64/conf/ALL

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



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

2021-10-30 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Oct 31 00:31:48 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
options


To generate a diff of this commit:
cvs rdiff -u -r1.592 -r1.593 src/sys/arch/amd64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.592 src/sys/arch/amd64/conf/GENERIC:1.593
--- src/sys/arch/amd64/conf/GENERIC:1.592	Sat Oct 16 13:09:40 2021
+++ src/sys/arch/amd64/conf/GENERIC	Sun Oct 31 00:31:48 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.592 2021/10/16 13:09:40 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.593 2021/10/31 00:31:48 simonb Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.592 $"
+#ident		"GENERIC-$Revision: 1.593 $"
 
 maxusers	64		# estimated number of users
 
@@ -138,7 +138,7 @@ options 	KDTRACE_HOOKS	# kernel DTrace h
 # Use KASAN_PANIC if you want panics instead of warnings.
 #makeoptions 	KASAN=1		# mandatory
 #options 	KASAN		# mandatory
-#no options	SVS		# mandatory
+#no options 	SVS		# mandatory
 #options 	POOL_QUARANTINE	# optional
 #options 	KASAN_PANIC	# optional
 
@@ -152,7 +152,7 @@ options 	KDTRACE_HOOKS	# kernel DTrace h
 # memory in pool caches. Note that KMSAN requires at least 4GB of RAM.
 #makeoptions 	KMSAN=1		# mandatory
 #options 	KMSAN		# mandatory
-#no options	SVS		# mandatory
+#no options 	SVS		# mandatory
 #no options 	MODULAR		# mandatory
 #no options 	MODULAR_DEFAULT_AUTOLOAD	# mandatory
 #options 	POOL_NOCACHE	# optional
@@ -201,7 +201,7 @@ options 	WAPBL		# File system journaling
 # Note that UFS_DIRHASH is suspected of causing kernel memory corruption.
 # It is not recommended for general use.
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
-options		UFS_ACL		# UFS Access Control Lists
+options 	UFS_ACL		# UFS Access Control Lists
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 options 	UFS_EXTATTR	# Extended attribute support for UFS1
 # ext2fs
@@ -1153,7 +1153,7 @@ options 	RAID_AUTOCONFIG		# auto-configu
 pseudo-device	fss			# file system snapshot device
 
 pseudo-device	md			# memory disk device (ramdisk)
-options		MEMORY_DISK_HOOKS	# enable md specific hooks
+options 	MEMORY_DISK_HOOKS	# enable md specific hooks
 options 	MEMORY_DISK_DYNAMIC	# enable dynamic resizing
 
 pseudo-device	vnd			# disk-like interface to files



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

2021-10-30 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Oct 31 00:31:48 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
options


To generate a diff of this commit:
cvs rdiff -u -r1.592 -r1.593 src/sys/arch/amd64/conf/GENERIC

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



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

2021-10-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 16 13:09:41 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Enable com and lpt at ACPI attachments.


To generate a diff of this commit:
cvs rdiff -u -r1.591 -r1.592 src/sys/arch/amd64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.591 src/sys/arch/amd64/conf/GENERIC:1.592
--- src/sys/arch/amd64/conf/GENERIC:1.591	Fri Oct 15 19:22:12 2021
+++ src/sys/arch/amd64/conf/GENERIC	Sat Oct 16 13:09:40 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.591 2021/10/15 19:22:12 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.592 2021/10/16 13:09:40 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.591 $"
+#ident		"GENERIC-$Revision: 1.592 $"
 
 maxusers	64		# estimated number of users
 
@@ -337,7 +337,9 @@ acpiwmi*	at acpi?		# ACPI WMI Mapper
 aibs*		at acpi?		# ASUSTeK AI Booster hardware monitor
 asus*		at acpi?		# ASUS hotkeys
 attimer*	at acpi?		# AT Timer
-#com*		at acpi?		# Serial communications interface
+com0		at acpi?		# Serial communications interface
+com1		at acpi?		# Serial communications interface
+com*		at acpi?		# Serial communications interface
 fdc*		at acpi?		# Floppy disk controller
 fd*		at fdc? drive ?		# the drives themselves
 fujbp*		at acpi?		# Fujitsu Brightness & Pointer
@@ -347,7 +349,9 @@ fujhk*		at acpi?		# Fujitsu Hotkeys
 hpet*		at acpihpetbus?		# High Precision Event Timer (table)
 hpet*		at acpinodebus?		# High Precision Event Timer (device)
 joy*		at acpi?		# Joystick/Game port
-#lpt*		at acpi?		# Parallel port
+lpt0		at acpi?		# Parallel port
+lpt1		at acpi?		# Parallel port
+lpt*		at acpi?		# Parallel port
 mpu*		at acpi?		# Roland MPU-401 MIDI UART
 pckbc*		at acpi?		# PC keyboard controller
 pcppi*		at acpi?		# AT-style speaker sound



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

2021-10-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 16 13:09:41 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Enable com and lpt at ACPI attachments.


To generate a diff of this commit:
cvs rdiff -u -r1.591 -r1.592 src/sys/arch/amd64/conf/GENERIC

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



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

2021-10-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 15 19:22:12 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Swap fdc@isa for fdc@acpi as the former takes over a second to probe.


To generate a diff of this commit:
cvs rdiff -u -r1.590 -r1.591 src/sys/arch/amd64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.590 src/sys/arch/amd64/conf/GENERIC:1.591
--- src/sys/arch/amd64/conf/GENERIC:1.590	Thu Sep  9 13:22:50 2021
+++ src/sys/arch/amd64/conf/GENERIC	Fri Oct 15 19:22:12 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.590 2021/09/09 13:22:50 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.591 2021/10/15 19:22:12 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.590 $"
+#ident		"GENERIC-$Revision: 1.591 $"
 
 maxusers	64		# estimated number of users
 
@@ -338,7 +338,8 @@ aibs*		at acpi?		# ASUSTeK AI Booster ha
 asus*		at acpi?		# ASUS hotkeys
 attimer*	at acpi?		# AT Timer
 #com*		at acpi?		# Serial communications interface
-#fdc*		at acpi?		# Floppy disk controller
+fdc*		at acpi?		# Floppy disk controller
+fd*		at fdc? drive ?		# the drives themselves
 fujbp*		at acpi?		# Fujitsu Brightness & Pointer
 fujhk*		at acpi?		# Fujitsu Hotkeys
 #hpacel* 	at acpi?		# HP 3D DriveGuard accelerometer
@@ -784,11 +785,8 @@ ld*	at nvme? nsid ?
 # Miscellaneous mass storage devices
 
 # ISA floppy
-fdc0	at isa? port 0x3f0 irq 6 drq 2	# standard PC floppy controllers
+#fdc0	at isa? port 0x3f0 irq 6 drq 2	# standard PC floppy controllers
 #fdc1	at isa? port 0x370 irq ? drq ?
-fd*	at fdc? drive ?			# the drives themselves
-# some machines need you to do this instead of fd*
-#fd0	at fdc0 drive 0
 
 # Network Interfaces
 



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

2021-10-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 15 19:22:12 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Swap fdc@isa for fdc@acpi as the former takes over a second to probe.


To generate a diff of this commit:
cvs rdiff -u -r1.590 -r1.591 src/sys/arch/amd64/conf/GENERIC

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



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

2021-09-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Sep 24 00:29:46 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
Move XEN3_DOM0 as close as possible to GENERIC.
Document why some options are disabled
Set NO_PCI_MSI_MSIX to work around crashes reported in multiple PR


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/sys/arch/amd64/conf/XEN3_DOM0

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/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.193 src/sys/arch/amd64/conf/XEN3_DOM0:1.194
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.193	Tue Jun 29 10:22:34 2021
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Fri Sep 24 00:29:46 2021
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.193 2021/06/29 10:22:34 nia Exp $
+# $NetBSD: XEN3_DOM0,v 1.194 2021/09/24 00:29:46 manu Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -14,7 +14,7 @@ include 	"arch/amd64/conf/std.xen"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"XEN3_DOM0-$Revision: 1.193 $"
+#ident		"XEN3_DOM0-$Revision: 1.194 $"
 
 maxusers	32		# estimated number of users
 
@@ -86,14 +86,15 @@ options 	SYSVSEM		# System V-like semaph
 options 	SYSVSHM		# System V-like memory sharing
 
 options 	MODULAR		# new style module(7) framework
-#options 	MODULAR_DEFAULT_AUTOLOAD
+options 	MODULAR_DEFAULT_AUTOLOAD
 options 	USERCONF	# userconf(4) support
 #options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
 # CPU features
 #acpicpu*	at cpu?		# ACPI CPU (including frequency scaling)
-#coretemp*	at cpu?		# Intel on-die thermal sensor
+# needs x86_cpu_idle_halt in cpu.c (!xenpv)
+coretemp*	at cpu?		# Intel on-die thermal sensor
 est0		at cpu0		# Intel Enhanced SpeedStep (non-ACPI)
 #hyperv0 	at cpu0		# Microsoft Hyper-V
 #odcm0		at cpu0		# On-demand clock modulation
@@ -117,16 +118,17 @@ options 	DIAGNOSTIC	# inexpensive kernel
 #
 makeoptions	COPTS="-O2 -fno-omit-frame-pointer"
 options 	DDB		# in-kernel debugger
-options		DDB_COMMANDONENTER="show registers"
-options 	DDB_ONPANIC=1	# see also sysctl(7): `ddb.onpanic'
+#options 	DDB_COMMANDONENTER="bt"	# execute command when ddb is entered
+#options 	DDB_ONPANIC=1	# see also sysctl(7): `ddb.onpanic'
 options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
 #options 	KGDB		# remote debugger
 #options 	KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x2f8,KGDB_DEVRATE=57600
-#makeoptions	DEBUG="-g"	# compile full symbol table
+makeoptions	DEBUG="-g"	# compile full symbol table for CTF
+options DDB_COMMANDONENTER="trace;show registers"
 #options 	SYSCALL_STATS	# per syscall counts
 #options 	SYSCALL_TIMES	# per syscall times
 #options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
-#options 	KDTRACE_HOOKS	# kernel DTrace hooks
+options 	KDTRACE_HOOKS	# kernel DTrace hooks
 
 # Kernel Undefined Behavior Sanitizer (kUBSan).
 #options 	KUBSAN			# mandatory
@@ -195,19 +197,19 @@ include "conf/filesystems.config"
 # ffs
 options 	QUOTA		# legacy UFS quotas
 options 	QUOTA2		# new, in-filesystem UFS quotas
-#options 	FFS_EI		# FFS Endian Independent support
+options 	FFS_EI		# FFS Endian Independent support
 options 	WAPBL		# File system journaling support
 # Note that UFS_DIRHASH is suspected of causing kernel memory corruption.
 # It is not recommended for general use.
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
-#options		UFS_ACL		# UFS Access Control Lists
+options		UFS_ACL		# UFS Access Control Lists
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 options 	UFS_EXTATTR	# Extended attribute support for UFS1
 # ext2fs
 #options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
 # immutable) behave as system flags.
 # other
-#options 	DISKLABEL_EI	# disklabel Endian Independent support
+options 	DISKLABEL_EI	# disklabel Endian Independent support
 options 	NFSSERVER	# Network File System server
 
 # Networking options
@@ -252,12 +254,6 @@ options 	SCSIVERBOSE	# human readable SC
 #options 	HDAUDIOVERBOSE	# verbose HDAUDIO driver messages
 
 options 	NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM
-#options 	NFS_BOOT_BOOTSTATIC
-#options 	NFS_BOOTSTATIC_MYIP="\"169.254.1.2\""
-#options 	NFS_BOOTSTATIC_GWIP="\"169.254.1.1\""
-#options 	NFS_BOOTSTATIC_MASK="\"255.255.255.0\""
-#options 	NFS_BOOTSTATIC_SERVADDR="\"169.254.1.1\""
-#options 	NFS_BOOTSTATIC_SERVER="\"server:/path/to/root\""
 
 #
 # wscons options
@@ -329,11 +325,7 @@ options 	MPBIOS_SCANPCI		# MPBIOS config
 #options 	PCI_BUS_FIXUP		# fixup PCI bus numbering
 #options 	PCI_ADDR_FIXUP		# fixup PCI I/O addresses
 #options 	ACPI_ACTIVATE_DEV	# If set, activate inactive devices
-#options 	VGA_POST		# in-kernel support for VGA POST
-
-#options 	ACPICA_PEDANTIC		# force strict conformance to the Spec.
-#options 	MPDEBUG			# MPBIOS configures PCI roots
-#options 	

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

2021-09-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Sep 24 00:29:46 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
Move XEN3_DOM0 as close as possible to GENERIC.
Document why some options are disabled
Set NO_PCI_MSI_MSIX to work around crashes reported in multiple PR


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/sys/arch/amd64/conf/XEN3_DOM0

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



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

2021-09-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Sep  9 13:22:50 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Enable WSDISPLAY_CUSTOM_OUTPUT and WSDISPLAY_CUSTOM_BORDER on
amd64 GENERIC as i386 GENERIC already does.


To generate a diff of this commit:
cvs rdiff -u -r1.589 -r1.590 src/sys/arch/amd64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.589 src/sys/arch/amd64/conf/GENERIC:1.590
--- src/sys/arch/amd64/conf/GENERIC:1.589	Mon May 17 04:07:42 2021
+++ src/sys/arch/amd64/conf/GENERIC	Thu Sep  9 13:22:50 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.589 2021/05/17 04:07:42 yamaguchi Exp $
+# $NetBSD: GENERIC,v 1.590 2021/09/09 13:22:50 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.589 $"
+#ident		"GENERIC-$Revision: 1.590 $"
 
 maxusers	64		# estimated number of users
 
@@ -262,8 +262,11 @@ options 	WSEMUL_VT100		# VT100 / VT220 e
 #options 	WSEMUL_SUN		# sun terminal emulation
 #options 	WSEMUL_DEFAULT="\"vt100\""  # NB: default is "sun" if enabled
 # different kernel output - see dev/wscons/wsdisplayvar.h
+options 	WSDISPLAY_CUSTOM_OUTPUT	# color customization from wsconsctl(8)
 options 	WS_KERNEL_FG=WSCOL_GREEN
 #options 	WS_KERNEL_BG=WSCOL_BLACK
+# customization of console border color
+options 	WSDISPLAY_CUSTOM_BORDER	# custom border colors via wsconsctl(8)
 # compatibility to other console drivers
 options 	WSDISPLAY_COMPAT_PCVT		# emulate some ioctls
 options 	WSDISPLAY_COMPAT_SYSCONS	# emulate some ioctls



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

2021-09-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Sep  9 13:22:50 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Enable WSDISPLAY_CUSTOM_OUTPUT and WSDISPLAY_CUSTOM_BORDER on
amd64 GENERIC as i386 GENERIC already does.


To generate a diff of this commit:
cvs rdiff -u -r1.589 -r1.590 src/sys/arch/amd64/conf/GENERIC

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



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

2021-05-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 23 08:59:08 UTC 2021

Modified Files:
src/sys/arch/amd64/amd64: db_disasm.c

Log Message:
ddb/amd64: Don't go out of the way to detect invalid addresses.

db_disasm had logic to detect invalid addresses before trying to
disassemble them.  But when disassembling a null instruction address,
the logic to detect invalid addresses itself tried to dereference an
invalid address.

db_get_value can already handle this situation gracefully, so there is
no need for this faulty fault-avoidance logic.

Fixes double-fault in ddb on calling null function pointers.  With
any luck, this should make diagnosing such bugs easier in the future!


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/amd64/db_disasm.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/amd64/amd64

2021-05-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 23 08:59:08 UTC 2021

Modified Files:
src/sys/arch/amd64/amd64: db_disasm.c

Log Message:
ddb/amd64: Don't go out of the way to detect invalid addresses.

db_disasm had logic to detect invalid addresses before trying to
disassemble them.  But when disassembling a null instruction address,
the logic to detect invalid addresses itself tried to dereference an
invalid address.

db_get_value can already handle this situation gracefully, so there is
no need for this faulty fault-avoidance logic.

Fixes double-fault in ddb on calling null function pointers.  With
any luck, this should make diagnosing such bugs easier in the future!


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/amd64/db_disasm.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/amd64/amd64/db_disasm.c
diff -u src/sys/arch/amd64/amd64/db_disasm.c:1.27 src/sys/arch/amd64/amd64/db_disasm.c:1.28
--- src/sys/arch/amd64/amd64/db_disasm.c:1.27	Sat Mar  9 08:42:25 2019
+++ src/sys/arch/amd64/amd64/db_disasm.c	Sun May 23 08:59:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.27 2019/03/09 08:42:25 maxv Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.28 2021/05/23 08:59:08 riastradh Exp $	*/
 
 /* 
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.27 2019/03/09 08:42:25 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.28 2021/05/23 08:59:08 riastradh Exp $");
 
 #ifndef _KERNEL
 #include 
@@ -1191,33 +1191,8 @@ db_disasm(db_addr_t loc, bool altfmt)
 	uint64_t imm64;
 	int	len;
 	struct i_addr	address;
-#ifdef _KERNEL
-	pt_entry_t *pte, *pde;
-#endif
 	u_int	rex = 0;
 
-#ifdef _KERNEL
-	/*
-	 * Don't try to disassemble the location if the mapping is invalid.
-	 * If we do, we'll fault, and end up debugging the debugger!
-	 * in the case of largepages, "pte" is really the pde and "pde" is
-	 * really the entry for the pdp itself.
-	 */
-	if ((vaddr_t)loc >= VM_MIN_KERNEL_ADDRESS)
-		pte = kvtopte((vaddr_t)loc);
-	else
-		pte = vtopte((vaddr_t)loc);
-	if ((vaddr_t)pte >= VM_MIN_KERNEL_ADDRESS)
-		pde = kvtopte((vaddr_t)pte);
-	else
-		pde = vtopte((vaddr_t)pte);
-
-	if ((*pde & PTE_P) == 0 || (*pte & PTE_P) == 0) {
-		db_printf("invalid address\n");
-		return (loc);
-	}
-#endif
-
 	get_value_inc(inst, loc, 1, false);
 	short_addr = false;
 	size = LONG;



CVS commit: src/sys/arch/amd64/stand/prekern

2021-05-04 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Tue May  4 21:13:38 UTC 2021

Modified Files:
src/sys/arch/amd64/stand/prekern: prng.c

Log Message:
prekern: add warnings upon problems collecting entropy

As submitted on port-amd64@ (part 3/3)

Tested on NetBSD/amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/stand/prekern/prng.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/amd64/stand/prekern/prng.c
diff -u src/sys/arch/amd64/stand/prekern/prng.c:1.4 src/sys/arch/amd64/stand/prekern/prng.c:1.5
--- src/sys/arch/amd64/stand/prekern/prng.c:1.4	Tue May  4 21:10:25 2021
+++ src/sys/arch/amd64/stand/prekern/prng.c	Tue May  4 21:13:38 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: prng.c,v 1.4 2021/05/04 21:10:25 khorben Exp $	*/
+/*	$NetBSD: prng.c,v 1.5 2021/05/04 21:13:38 khorben Exp $	*/
 
 /*
  * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved.
@@ -84,6 +84,7 @@ prng_get_entropy_file(SHA512_CTX *ctx)
 	uint8_t digest[SHA1_DIGEST_LENGTH];
 	rndsave_t *rndsave;
 	SHA1_CTX sig;
+	size_t count = 0;
 
 	biml =
 	(struct btinfo_modulelist *)prng_lookup_bootinfo(BTINFO_MODULELIST);
@@ -117,7 +118,10 @@ prng_get_entropy_file(SHA512_CTX *ctx)
 		}
 
 		SHA512_Update(ctx, rndsave->data, sizeof(rndsave->data));
+		count++;
 	}
+	if (count == 0)
+		print_state(STATE_WARNING, "No entropy file could be loaded");
 }
 
 /*
@@ -168,6 +172,8 @@ prng_init(void)
 		cpuid(0x01, 0x00, descs);
 		has_rdrand = (descs[2] & CPUID2_RDRAND) != 0;
 	}
+	if (!has_rdseed && !has_rdrand)
+		print_state(STATE_WARNING, "No CPU entropy feature detected");
 
 	SHA512_Init();
 	prng_get_entropy_file();



CVS commit: src/sys/arch/amd64/stand/prekern

2021-05-04 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Tue May  4 21:13:38 UTC 2021

Modified Files:
src/sys/arch/amd64/stand/prekern: prng.c

Log Message:
prekern: add warnings upon problems collecting entropy

As submitted on port-amd64@ (part 3/3)

Tested on NetBSD/amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/stand/prekern/prng.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/amd64/stand/prekern

2021-05-04 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Tue May  4 21:10:25 UTC 2021

Modified Files:
src/sys/arch/amd64/stand/prekern: prng.c

Log Message:
prekern: do not choke on bad entropy files

As submitted on port-amd64@ (part 2/3)

Tested on NetBSD/amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/stand/prekern/prng.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/amd64/stand/prekern/prng.c
diff -u src/sys/arch/amd64/stand/prekern/prng.c:1.3 src/sys/arch/amd64/stand/prekern/prng.c:1.4
--- src/sys/arch/amd64/stand/prekern/prng.c:1.3	Thu May 21 08:20:25 2020
+++ src/sys/arch/amd64/stand/prekern/prng.c	Tue May  4 21:10:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: prng.c,v 1.3 2020/05/21 08:20:25 maxv Exp $	*/
+/*	$NetBSD: prng.c,v 1.4 2021/05/04 21:10:25 khorben Exp $	*/
 
 /*
  * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved.
@@ -98,7 +98,9 @@ prng_get_entropy_file(SHA512_CTX *ctx)
 			continue;
 		}
 		if (bi->len != sizeof(rndsave_t)) {
-			fatal("rndsave_t size mismatch");
+			print_state(STATE_WARNING,
+	"size mismatch in entropy file");
+			continue;
 		}
 		rndsave = (rndsave_t *)(vaddr_t)bi->base;
 
@@ -109,7 +111,9 @@ prng_get_entropy_file(SHA512_CTX *ctx)
 		SHA1Update(, rndsave->data, sizeof(rndsave->data));
 		SHA1Final(digest, );
 		if (memcmp(digest, rndsave->digest, sizeof(digest))) {
-			fatal("bad SHA1 checksum");
+			print_state(STATE_WARNING,
+	"bad SHA1 checksum in entropy file");
+			continue;
 		}
 
 		SHA512_Update(ctx, rndsave->data, sizeof(rndsave->data));



CVS commit: src/sys/arch/amd64/stand/prekern

2021-05-04 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Tue May  4 21:10:25 UTC 2021

Modified Files:
src/sys/arch/amd64/stand/prekern: prng.c

Log Message:
prekern: do not choke on bad entropy files

As submitted on port-amd64@ (part 2/3)

Tested on NetBSD/amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/stand/prekern/prng.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/amd64/stand/prekern

2021-05-04 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Tue May  4 21:09:16 UTC 2021

Modified Files:
src/sys/arch/amd64/stand/prekern: console.c elf.c mm.c prekern.c
prekern.h

Log Message:
prekern: add support for warning messages

As submitted on port-amd64@ (part 1/3)

Tested on NetBSD/amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/stand/prekern/console.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/stand/prekern/elf.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/stand/prekern/mm.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/stand/prekern/prekern.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/stand/prekern/prekern.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/stand/prekern/console.c
diff -u src/sys/arch/amd64/stand/prekern/console.c:1.6 src/sys/arch/amd64/stand/prekern/console.c:1.7
--- src/sys/arch/amd64/stand/prekern/console.c:1.6	Sat May 23 08:25:32 2020
+++ src/sys/arch/amd64/stand/prekern/console.c	Tue May  4 21:09:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: console.c,v 1.6 2020/05/23 08:25:32 maxv Exp $	*/
+/*	$NetBSD: console.c,v 1.7 2021/05/04 21:09:16 khorben Exp $	*/
 
 /*
  * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved.
@@ -100,13 +100,24 @@ void print(char *buf)
 	print_ext(WHITE_ON_BLACK, buf);
 }
 
-void print_state(bool ok, char *buf)
+void print_state(state_t state, char *buf)
 {
 	print("[");
-	if (ok)
-		print_ext(GREEN_ON_BLACK, "+");
-	else
-		print_ext(RED_ON_BLACK, "!");
+	switch (state)
+	{
+		case STATE_NORMAL:
+			print_ext(GREEN_ON_BLACK, "+");
+			break;
+		case STATE_ERROR:
+			print_ext(RED_ON_BLACK, "!");
+			break;
+		case STATE_WARNING:
+			print_ext(YELLOW_ON_BLACK, "*");
+			break;
+		default:
+			print_ext(WHITE_ON_BLACK, "?");
+			break;
+	}
 	print("] ");
 	print(buf);
 	print("\n");

Index: src/sys/arch/amd64/stand/prekern/elf.c
diff -u src/sys/arch/amd64/stand/prekern/elf.c:1.21 src/sys/arch/amd64/stand/prekern/elf.c:1.22
--- src/sys/arch/amd64/stand/prekern/elf.c:1.21	Thu May  7 17:58:26 2020
+++ src/sys/arch/amd64/stand/prekern/elf.c	Tue May  4 21:09:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf.c,v 1.21 2020/05/07 17:58:26 maxv Exp $	*/
+/*	$NetBSD: elf.c,v 1.22 2021/05/04 21:09:16 khorben Exp $	*/
 
 /*
  * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved.
@@ -426,7 +426,7 @@ elf_kernel_reloc(void)
 	Elf_Sym *sym;
 	size_t i, j;
 
-	print_state(true, "ELF info created");
+	print_state(STATE_NORMAL, "ELF info created");
 
 	/*
 	 * Update all symbol values with the appropriate offset.
@@ -447,7 +447,7 @@ elf_kernel_reloc(void)
 		}
 	}
 
-	print_state(true, "Symbol values updated");
+	print_state(STATE_NORMAL, "Symbol values updated");
 
 	/*
 	 * Perform relocations without addend if there are any.
@@ -482,7 +482,7 @@ elf_kernel_reloc(void)
 		}
 	}
 
-	print_state(true, "REL relocations applied");
+	print_state(STATE_NORMAL, "REL relocations applied");
 
 	/*
 	 * Perform relocations with addend if there are any.
@@ -517,7 +517,7 @@ elf_kernel_reloc(void)
 		}
 	}
 
-	print_state(true, "RELA relocations applied");
+	print_state(STATE_NORMAL, "RELA relocations applied");
 
 	/*
 	 * Get the entry point.
@@ -527,7 +527,7 @@ elf_kernel_reloc(void)
 		fatal("elf_kernel_reloc: entry point not found");
 	}
 
-	print_state(true, "Entry point found");
+	print_state(STATE_NORMAL, "Entry point found");
 
 	return ent;
 }

Index: src/sys/arch/amd64/stand/prekern/mm.c
diff -u src/sys/arch/amd64/stand/prekern/mm.c:1.27 src/sys/arch/amd64/stand/prekern/mm.c:1.28
--- src/sys/arch/amd64/stand/prekern/mm.c:1.27	Thu May  7 17:58:26 2020
+++ src/sys/arch/amd64/stand/prekern/mm.c	Tue May  4 21:09:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mm.c,v 1.27 2020/05/07 17:58:26 maxv Exp $	*/
+/*	$NetBSD: mm.c,v 1.28 2021/05/04 21:09:16 khorben Exp $	*/
 
 /*
  * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved.
@@ -148,7 +148,7 @@ mm_bootspace_mprotect(void)
 		mm_mprotect(bootspace.segs[i].va, bootspace.segs[i].sz, prot);
 	}
 
-	print_state(true, "Segments protection updated");
+	print_state(STATE_NORMAL, "Segments protection updated");
 }
 
 static size_t
@@ -493,9 +493,9 @@ mm_map_kernel(void)
 {
 	memset(, 0, sizeof(bootspace));
 	mm_map_head();
-	print_state(true, "Head region mapped");
+	print_state(STATE_NORMAL, "Head region mapped");
 	elf_map_sections();
-	print_state(true, "Segments mapped");
+	print_state(STATE_NORMAL, "Segments mapped");
 	mm_map_boot();
-	print_state(true, "Boot region mapped");
+	print_state(STATE_NORMAL, "Boot region mapped");
 }

Index: src/sys/arch/amd64/stand/prekern/prekern.c
diff -u src/sys/arch/amd64/stand/prekern/prekern.c:1.13 src/sys/arch/amd64/stand/prekern/prekern.c:1.14
--- src/sys/arch/amd64/stand/prekern/prekern.c:1.13	Sat May 23 08:25:32 2020
+++ src/sys/arch/amd64/stand/prekern/prekern.c	Tue May  4 

CVS commit: src/sys/arch/amd64/stand/prekern

2021-05-04 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Tue May  4 21:09:16 UTC 2021

Modified Files:
src/sys/arch/amd64/stand/prekern: console.c elf.c mm.c prekern.c
prekern.h

Log Message:
prekern: add support for warning messages

As submitted on port-amd64@ (part 1/3)

Tested on NetBSD/amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/stand/prekern/console.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/stand/prekern/elf.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/stand/prekern/mm.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/stand/prekern/prekern.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/stand/prekern/prekern.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/amd64/include

2021-04-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Apr 17 20:12:55 UTC 2021

Modified Files:
src/sys/arch/amd64/include: asm.h byte_swap.h cpu.h db_machdep.h
frame_regs.h frameasm.h i82093reg.h int_limits.h profile.h
segments.h

Log Message:
sys/arch/amd64: remove trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/include/asm.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/include/byte_swap.h \
src/sys/arch/amd64/include/frame_regs.h
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/amd64/include/cpu.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amd64/include/db_machdep.h
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amd64/include/frameasm.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amd64/include/i82093reg.h \
src/sys/arch/amd64/include/int_limits.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amd64/include/profile.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amd64/include/segments.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/asm.h
diff -u src/sys/arch/amd64/include/asm.h:1.21 src/sys/arch/amd64/include/asm.h:1.22
--- src/sys/arch/amd64/include/asm.h:1.21	Sat Apr 25 15:26:16 2020
+++ src/sys/arch/amd64/include/asm.h	Sat Apr 17 20:12:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.21 2020/04/25 15:26:16 bouyer Exp $	*/
+/*	$NetBSD: asm.h,v 1.22 2021/04/17 20:12:55 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -81,12 +81,12 @@
 	ALIGN_TEXT; .globl X ## name; .type X ## name,@function; X ## name:
 #define	IDTVEC_END(name) \
 	.size X ## name, . - X ## name
-#else 
+#else
 #define	IDTVEC(name) \
 	ALIGN_TEXT; .globl X/**/name; .type X/**/name,@function; X/**/name:
 #define	IDTVEC_END(name) \
 	.size X/**/name, . - X/**/name
-#endif /* __STDC__ */ 
+#endif /* __STDC__ */
 #endif /* _KERNEL */
 
 #ifdef __STDC__

Index: src/sys/arch/amd64/include/byte_swap.h
diff -u src/sys/arch/amd64/include/byte_swap.h:1.7 src/sys/arch/amd64/include/byte_swap.h:1.8
--- src/sys/arch/amd64/include/byte_swap.h:1.7	Thu Jan 14 02:06:04 2010
+++ src/sys/arch/amd64/include/byte_swap.h	Sat Apr 17 20:12:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: byte_swap.h,v 1.7 2010/01/14 02:06:04 joerg Exp $	*/
+/*	$NetBSD: byte_swap.h,v 1.8 2021/04/17 20:12:55 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2010 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@ static __inline uint16_t __byte_swap_u16
 static __inline uint16_t
 __byte_swap_u16_variable(uint16_t x)
 {
-	__asm volatile ("rorw $8, %w1" : "=r" (x) : "0" (x)); 
+	__asm volatile ("rorw $8, %w1" : "=r" (x) : "0" (x));
 	return (x);
 }
 
Index: src/sys/arch/amd64/include/frame_regs.h
diff -u src/sys/arch/amd64/include/frame_regs.h:1.7 src/sys/arch/amd64/include/frame_regs.h:1.8
--- src/sys/arch/amd64/include/frame_regs.h:1.7	Sun Apr 26 18:49:39 2015
+++ src/sys/arch/amd64/include/frame_regs.h	Sat Apr 17 20:12:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame_regs.h,v 1.7 2015/04/26 18:49:39 mrg Exp $	*/
+/*	$NetBSD: frame_regs.h,v 1.8 2021/04/17 20:12:55 rillig Exp $	*/
 
 #ifndef _AMD64_FRAME_REGS_H_
 #define _AMD64_FRAME_REGS_H_
@@ -11,7 +11,7 @@
  * has been changed to improve syscall efficiency.
  *
  * Notes:
- * 1) gdb (amd64nbsd-tdep.c) has a lookup table that assumes the __greg_t 
+ * 1) gdb (amd64nbsd-tdep.c) has a lookup table that assumes the __greg_t
  *ordering.
  * 2) src/lib/libc/arch/x86_64/gen/makecontext.c assumes that the first
  *6 entries in the __greg_t array match the registers used to pass

Index: src/sys/arch/amd64/include/cpu.h
diff -u src/sys/arch/amd64/include/cpu.h:1.68 src/sys/arch/amd64/include/cpu.h:1.69
--- src/sys/arch/amd64/include/cpu.h:1.68	Tue Mar 17 17:18:49 2020
+++ src/sys/arch/amd64/include/cpu.h	Sat Apr 17 20:12:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.68 2020/03/17 17:18:49 maxv Exp $	*/
+/*	$NetBSD: cpu.h,v 1.69 2021/04/17 20:12:55 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -84,7 +84,7 @@ x86_curlwp(void)
 #define CLKF_INTR(frame)	(curcpu()->ci_idepth > 0)
 #define LWP_PC(l)		((l)->l_md.md_regs->tf_rip)
 
-void *cpu_uarea_alloc(bool);		
+void *cpu_uarea_alloc(bool);
 bool cpu_uarea_free(void *);
 
 #endif	/* _KERNEL */

Index: src/sys/arch/amd64/include/db_machdep.h
diff -u src/sys/arch/amd64/include/db_machdep.h:1.16 src/sys/arch/amd64/include/db_machdep.h:1.17
--- src/sys/arch/amd64/include/db_machdep.h:1.16	Mon Nov  6 03:47:45 2017
+++ src/sys/arch/amd64/include/db_machdep.h	Sat Apr 17 20:12:55 2021
@@ -1,27 +1,27 @@
-/*	$NetBSD: db_machdep.h,v 1.16 2017/11/06 03:47:45 christos Exp $	*/
+/*	$NetBSD: db_machdep.h,v 1.17 2021/04/17 20:12:55 rillig Exp $	*/
 
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * 

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

2021-04-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Apr 17 20:12:55 UTC 2021

Modified Files:
src/sys/arch/amd64/include: asm.h byte_swap.h cpu.h db_machdep.h
frame_regs.h frameasm.h i82093reg.h int_limits.h profile.h
segments.h

Log Message:
sys/arch/amd64: remove trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/include/asm.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/include/byte_swap.h \
src/sys/arch/amd64/include/frame_regs.h
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/amd64/include/cpu.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amd64/include/db_machdep.h
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amd64/include/frameasm.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amd64/include/i82093reg.h \
src/sys/arch/amd64/include/int_limits.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amd64/include/profile.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amd64/include/segments.h

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



Re: CVS commit: src/sys/arch/amd64/conf

2021-03-05 Thread Greg Troxel

matthew green  writes:

> could this be done with include and "no foo" statement?
> eg, like sys/arch/sparc/conf/INSTALL does.

Maybe, but I'm not sure it will end up working.  Right now we don't know
if any of the missing things will be trouble, and even if we do move to
include/no I'd like to do that via an intermediate step of a config with
small differences.

Also I think we should also consider extracting lots of things into
includable files, similar to how

  include "dev/usb/usbdevices.config"

is used now in GENERIC.   That will raise interesting cross-arch issues
about value vs kernel memory usage probably.

These include files would allow a simplification of XEN3_DOMU which as I
see it should have ~no drivers but all the rest of the options.


signature.asc
Description: PGP signature


re: CVS commit: src/sys/arch/amd64/conf

2021-03-05 Thread matthew green
"Greg Troxel" writes:
> Module Name:  src
> Committed By: gdt
> Date: Fri Mar  5 20:30:56 UTC 2021
>
> Modified Files:
>   src/sys/arch/amd64/conf: XEN3_DOM0
>
> Log Message:
> XEN3_DOM0: Approach GENERIC
>
> When processed to remove comments, blank lines, normalize whitespace,
> and sort/uniq (one line was previously duplicated), this file is
> identical to the previous version.  It has been reorganized to reduce
> diffs to GENERIC, and many missing lines from GENERIC have been added
> but commented out.

could this be done with include and "no foo" statement?
eg, like sys/arch/sparc/conf/INSTALL does.


.mrg.


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

2021-03-05 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Fri Mar  5 20:30:56 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Approach GENERIC

When processed to remove comments, blank lines, normalize whitespace,
and sort/uniq (one line was previously duplicated), this file is
identical to the previous version.  It has been reorganized to reduce
diffs to GENERIC, and many missing lines from GENERIC have been added
but commented out.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/arch/amd64/conf/XEN3_DOM0

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



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

2021-03-05 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Fri Mar  5 20:30:56 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Approach GENERIC

When processed to remove comments, blank lines, normalize whitespace,
and sort/uniq (one line was previously duplicated), this file is
identical to the previous version.  It has been reorganized to reduce
diffs to GENERIC, and many missing lines from GENERIC have been added
but commented out.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/arch/amd64/conf/XEN3_DOM0

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/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.191 src/sys/arch/amd64/conf/XEN3_DOM0:1.192
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.191	Thu Mar  4 16:02:10 2021
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Fri Mar  5 20:30:56 2021
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.191 2021/03/04 16:02:10 gdt Exp $
+# $NetBSD: XEN3_DOM0,v 1.192 2021/03/05 20:30:56 gdt Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -14,7 +14,7 @@ include 	"arch/amd64/conf/std.xen"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"XEN3_DOM0-$Revision: 1.191 $"
+#ident		"XEN3_DOM0-$Revision: 1.192 $"
 
 maxusers	32		# estimated number of users
 
@@ -43,9 +43,20 @@ maxusers	32		# estimated number of users
 #options 	PHYSMEM_MAX_SIZE=64	# max size of physical memory (in MB)
 #options 	PHYSMEM_MAX_ADDR=2048	# don't use memory above this (in MB)
 
+## Replace std.amd64 content
+
+mainbus0 at root
+cpu* at mainbus?
+ioapic* at mainbus? apid ?
+
+# Atheros HAL options
+include "external/isc/atheros_hal/conf/std.ath_hal"
+
+## end std.amd64
+
 ## Xen-specific options
 
-options		XENPV		# PV dom0 support
+options 	XENPV		# PV dom0 support
 options 	DOM0OPS
 options 	MULTIPROCESSOR
 #options 	NO_PREEMPTION	# needed if MULTIPROCESSOR is disabled
@@ -58,10 +69,6 @@ options 	MULTIPROCESSOR
 # boot messages with MPBIOS, acpi and ioapic can be quite large
 options 	MSGBUFSIZE=24576
 
-# CPU features
-est0		at cpu0		# Intel Enhanced SpeedStep (non-ACPI)
-powernow0	at cpu0		# AMD PowerNow! and Cool'n'Quiet (non-ACPI)
-
 # Standard system options
 
 options 	INSECURE	# disable kernel security levels - X needs this
@@ -79,10 +86,20 @@ options 	SYSVSEM		# System V-like semaph
 options 	SYSVSHM		# System V-like memory sharing
 
 options 	MODULAR		# new style module(7) framework
+#options 	MODULAR_DEFAULT_AUTOLOAD
 options 	USERCONF	# userconf(4) support
 #options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
+# CPU features
+#acpicpu*	at cpu?		# ACPI CPU (including frequency scaling)
+#coretemp*	at cpu?		# Intel on-die thermal sensor
+est0		at cpu0		# Intel Enhanced SpeedStep (non-ACPI)
+#hyperv0 	at cpu0		# Microsoft Hyper-V
+#odcm0		at cpu0		# On-demand clock modulation
+powernow0	at cpu0		# AMD PowerNow! and Cool'n'Quiet (non-ACPI)
+#vmt0		at cpu0		# VMware Tools
+
 # Alternate buffer queue strategies for better responsiveness under high
 # disk I/O load.
 #options 	BUFQ_READPRIO
@@ -286,10 +303,6 @@ config		netbsd	root on ? type ?
 #
 
 ## Xen-specific options
-mainbus0 at root
-
-cpu* at mainbus?
-
 hypervisor*	at mainbus?		# Xen hypervisor
 
 vcpu*		at hypervisor?		# Xen virtual CPUs
@@ -306,8 +319,8 @@ ipmi_acpi*	at acpi?
 ipmi0		at ipmi_acpi?
 
 # ACPI will be used if present. If not it will fall back to MPBIOS
-acpi0		at hypervisor?		# ACPI access in PV mode
 acpi0		at mainbus?		# ACPI access in PVH(VM) mode
+acpi0		at hypervisor?		# ACPI access in PV mode
 
 options 	ACPI_SCANPCI		# find PCI roots using ACPI
 options 	MPBIOS			# configure CPUs and APICs using MPBIOS
@@ -322,8 +335,6 @@ options 	MPBIOS_SCANPCI		# MPBIOS config
 #options 	MPDEBUG			# MPBIOS configures PCI roots
 #options 	MPVERBOSE		# verbose MPBIOS autoconfig messages
 
-ioapic* 	at mainbus? apid ?
-
 # ACPI devices
 acpiacad*	at acpi?		# ACPI AC Adapter
 acpibat*	at acpi?		# ACPI Battery
@@ -343,30 +354,44 @@ acpitz* 	at acpi?		# ACPI Thermal Zone
 
 # Mainboard devices
 aibs*		at acpi?		# ASUSTeK AI Booster hardware monitor
+#asus*		at acpi?		# ASUS hotkeys
+#attimer*	at acpi?		# AT Timer
 #com*		at acpi?		# Serial communications interface
 #fdc*		at acpi?		# Floppy disk controller
+#fujbp*		at acpi?		# Fujitsu Brightness & Pointer
+#fujhk*		at acpi?		# Fujitsu Hotkeys
 #hpacel* 	at acpi?		# HP 3D DriveGuard accelerometer
-#hpqlb*		at acpi?		# HP Quick Launch Buttons
 hpqlb*		at acpi?		# HP Quick Launch Buttons
+#hpet*		at acpihpetbus?		# High Precision Event Timer (table)
+#hpet*		at acpinodebus?		# High Precision Event Timer (device)
+#joy*		at acpi?		# Joystick/Game port
+#lpt*		at acpi?		# Parallel port
+#mpu*		at acpi?		# Roland MPU-401 MIDI UART
 #lpt*		at acpi?		# Parallel port
 pckbc*		at acpi?		# PC keyboard controller
 pcppi*		at 

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

2021-03-05 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Fri Mar  5 20:18:39 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
GENERIC: comment typo fix (spacing)


To generate a diff of this commit:
cvs rdiff -u -r1.585 -r1.586 src/sys/arch/amd64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.585 src/sys/arch/amd64/conf/GENERIC:1.586
--- src/sys/arch/amd64/conf/GENERIC:1.585	Thu Mar  4 15:58:50 2021
+++ src/sys/arch/amd64/conf/GENERIC	Fri Mar  5 20:18:39 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.585 2021/03/04 15:58:50 gdt Exp $
+# $NetBSD: GENERIC,v 1.586 2021/03/05 20:18:39 gdt Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.585 $"
+#ident		"GENERIC-$Revision: 1.586 $"
 
 maxusers	64		# estimated number of users
 
@@ -1133,7 +1133,7 @@ pseudo-device	ccd			# concatenated/strip
 pseudo-device	cgd			# cryptographic disk devices
 pseudo-device	raid			# RAIDframe disk driver
 options 	RAID_AUTOCONFIG		# auto-configuration of RAID components
-#Options to enable various other RAIDframe RAID types.
+# Options to enable various other RAIDframe RAID types.
 #options 	RF_INCLUDE_EVENODD=1
 #options 	RF_INCLUDE_RAID5_RS=1
 #options 	RF_INCLUDE_PARITYLOGGING=1



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

2021-03-05 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Fri Mar  5 20:18:39 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
GENERIC: comment typo fix (spacing)


To generate a diff of this commit:
cvs rdiff -u -r1.585 -r1.586 src/sys/arch/amd64/conf/GENERIC

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



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

2021-03-04 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Mar  4 19:01:41 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: std.xen

Log Message:
std.xen: Move towards std.amd64

(No functional change.)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/conf/std.xen

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/conf/std.xen
diff -u src/sys/arch/amd64/conf/std.xen:1.13 src/sys/arch/amd64/conf/std.xen:1.14
--- src/sys/arch/amd64/conf/std.xen:1.13	Sat Apr 25 15:26:16 2020
+++ src/sys/arch/amd64/conf/std.xen	Thu Mar  4 19:01:41 2021
@@ -1,20 +1,20 @@
-# $NetBSD: std.xen,v 1.13 2020/04/25 15:26:16 bouyer Exp $
-# NetBSD: std.i386,v 1.24 2003/02/26 21:33:36 fvdl Exp 
+# $NetBSD: std.xen,v 1.14 2021/03/04 19:01:41 gdt Exp $
 #
-# standard, required NetBSD/i386 'options'
+# standard, required NetBSD/xen 'options'
+# Note that this file is used by both DOM0 and DOMU.
 
 machine xen amd64 x86
 include 	"conf/std"	# MI standard options
-include		"arch/xen/conf/files.xen.pv"
-
-options 	XEN	#Xen support
-
-include		"arch/xen/conf/std.xenversion"
+include 	"arch/xen/conf/std.xenversion"
 
 options 	CPU_IN_CKSUM
 options 	EXEC_ELF64	# exec ELF binaries
 options 	EXEC_SCRIPT	# exec #! scripts
 options 	MTRR
+#options 	MULTIPROCESSOR
 
 options 	CHILD_MAX=1024	# 160 is too few
 options 	OPEN_MAX=1024	# 128 is too few
+
+options 	XEN		# Xen support
+include 	"arch/xen/conf/files.xen.pv"



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

2021-03-04 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Mar  4 19:01:41 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: std.xen

Log Message:
std.xen: Move towards std.amd64

(No functional change.)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/conf/std.xen

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



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

2021-03-04 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Mar  4 16:02:11 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Move closer to GENERIC (NFC)

This is another step in making XEN3_DOM0 closer to GENERIC.  It is
just reordering lines, adding commented out lines, and adding a few
comments.  (Test-booted with no dmesg change.)

This pass is showing cases where there are substantive and likely
undesired changes (e.g., UFS_ACL is not defined in XEN3_DOM0).  Often
I added them but commented them out to preserve the NFC property of
this commit.  My plan is to finish the easy NFC stuff first before
addressing functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/amd64/conf/XEN3_DOM0

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



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

2021-03-04 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Mar  4 16:02:11 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Move closer to GENERIC (NFC)

This is another step in making XEN3_DOM0 closer to GENERIC.  It is
just reordering lines, adding commented out lines, and adding a few
comments.  (Test-booted with no dmesg change.)

This pass is showing cases where there are substantive and likely
undesired changes (e.g., UFS_ACL is not defined in XEN3_DOM0).  Often
I added them but commented them out to preserve the NFC property of
this commit.  My plan is to finish the easy NFC stuff first before
addressing functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/amd64/conf/XEN3_DOM0

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/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.190 src/sys/arch/amd64/conf/XEN3_DOM0:1.191
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.190	Wed Mar  3 12:31:19 2021
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Thu Mar  4 16:02:10 2021
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.190 2021/03/03 12:31:19 gdt Exp $
+# $NetBSD: XEN3_DOM0,v 1.191 2021/03/04 16:02:10 gdt Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -14,7 +14,7 @@ include 	"arch/amd64/conf/std.xen"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"XEN3_DOM0-$Revision: 1.190 $"
+#ident		"XEN3_DOM0-$Revision: 1.191 $"
 
 maxusers	32		# estimated number of users
 
@@ -80,6 +80,7 @@ options 	SYSVSHM		# System V-like memory
 
 options 	MODULAR		# new style module(7) framework
 options 	USERCONF	# userconf(4) support
+#options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
 # Alternate buffer queue strategies for better responsiveness under high
@@ -108,9 +109,55 @@ options 	DDB_HISTORY_SIZE=512	# enable h
 #options 	SYSCALL_STATS	# per syscall counts
 #options 	SYSCALL_TIMES	# per syscall times
 #options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
+#options 	KDTRACE_HOOKS	# kernel DTrace hooks
+
+# Kernel Undefined Behavior Sanitizer (kUBSan).
+#options 	KUBSAN			# mandatory
+#options 	UBSAN_ALWAYS_FATAL	# optional: panic on all kUBSan reports
+
+# Kernel Address Sanitizer (kASan). You need to disable SVS to use it.
+# The quarantine is optional and can help KASAN find more use-after-frees.
+# Use KASAN_PANIC if you want panics instead of warnings.
+#makeoptions 	KASAN=1		# mandatory
+#options 	KASAN		# mandatory
+#no options	SVS		# mandatory
+#options 	POOL_QUARANTINE	# optional
+#options 	KASAN_PANIC	# optional
+
+# Kernel Concurrency Sanitizer (kCSan).
+#makeoptions 	KCSAN=1		# mandatory
+#options 	KCSAN		# mandatory
+#options 	KCSAN_PANIC	# optional
+
+# Kernel Memory Sanitizer (kMSan). You need to disable SVS and kernel modules
+# to use it. POOL_NOCACHE is optional and can help KMSAN find uninitialized
+# memory in pool caches. Note that KMSAN requires at least 4GB of RAM.
+#makeoptions 	KMSAN=1		# mandatory
+#options 	KMSAN		# mandatory
+#no options	SVS		# mandatory
+#no options 	MODULAR		# mandatory
+#no options 	MODULAR_DEFAULT_AUTOLOAD	# mandatory
+#options 	POOL_NOCACHE	# optional
+#options 	KMSAN_PANIC	# optional
+
+# Kernel Code Coverage Driver.
+#makeoptions	KCOV=1
+#options 	KCOV
+
+# Fault Injection Driver.
+#options 	FAULT
 
 # Compatibility options
+# x86_64 never shipped with a.out binaries; the two options below are
+# only relevant to 32-bit i386 binaries
+#options 	EXEC_AOUT	# required by binaries from before 1.5
+#options 	COMPAT_NOMID	# NetBSD 0.8, 386BSD, and BSDI
+
+# NetBSD backward compatibility. Support goes from COMPAT_15 up until
+# the latest release. Note that really old compat (< COMPAT_16) is only
+# useful for 32-bit i386 binaries.
 include 	"conf/compat_netbsd15.config"
+
 #options 	COMPAT_386BSD_MBRPART # recognize old partition ID
 
 options 	COMPAT_NETBSD32
@@ -128,17 +175,23 @@ options 	DKWEDGE_METHOD_APPLE	# Support 
 include "conf/filesystems.config"
 
 # File system options
+# ffs
 options 	QUOTA		# legacy UFS quotas
 options 	QUOTA2		# new, in-filesystem UFS quotas
-#options 	DISKLABEL_EI	# disklabel Endian Independent support
 #options 	FFS_EI		# FFS Endian Independent support
 options 	WAPBL		# File system journaling support
+# Note that UFS_DIRHASH is suspected of causing kernel memory corruption.
+# It is not recommended for general use.
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
-options 	NFSSERVER	# Network File System server
+#options		UFS_ACL		# UFS Access Control Lists
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 options 	UFS_EXTATTR	# Extended attribute support for UFS1
+# ext2fs
 #options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
 # immutable) behave as system flags.
+# other
+#options 	DISKLABEL_EI	

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

2021-03-04 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Mar  4 15:58:50 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
GENERIC: Tiny comment adjustment (NFC)

While making XEN3_DOM0 more like GENERIC, I noticed a few differences
where GENERIC was off -- trivial things like missing spaces in
comments, inconsistent comment workding.  This fixes those, both
because they are valid fixes in their own right once noticed, and to
make the diff to XEN smaller.


To generate a diff of this commit:
cvs rdiff -u -r1.584 -r1.585 src/sys/arch/amd64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.584 src/sys/arch/amd64/conf/GENERIC:1.585
--- src/sys/arch/amd64/conf/GENERIC:1.584	Mon Mar  1 18:12:58 2021
+++ src/sys/arch/amd64/conf/GENERIC	Thu Mar  4 15:58:50 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.584 2021/03/01 18:12:58 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.585 2021/03/04 15:58:50 gdt Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.584 $"
+#ident		"GENERIC-$Revision: 1.585 $"
 
 maxusers	64		# estimated number of users
 
@@ -297,7 +297,7 @@ config		netbsd	root on ? type ?
 # Device configuration
 #
 
-#IPMI support
+# IPMI support
 ipmi0		at mainbus?
 ipmi_acpi*	at acpi?
 ipmi0		at ipmi_acpi?
@@ -307,7 +307,7 @@ acpi0		at mainbus0
 options 	ACPI_SCANPCI		# find PCI roots using ACPI
 options 	MPBIOS			# configure CPUs and APICs using MPBIOS
 options 	MPBIOS_SCANPCI		# MPBIOS configures PCI roots
-#options 	PCI_INTR_FIXUP		# PCI interrupt routing via ACPI
+#options 	PCI_INTR_FIXUP		# fixup PCI interrupt routing via ACPI
 #options 	PCI_BUS_FIXUP		# fixup PCI bus numbering
 #options 	PCI_ADDR_FIXUP		# fixup PCI I/O addresses
 #options 	ACPI_ACTIVATE_DEV	# If set, activate inactive devices
@@ -317,7 +317,7 @@ options 	VGA_POST		# in-kernel support f
 acpiacad*	at acpi?		# ACPI AC Adapter
 acpibat*	at acpi?		# ACPI Battery
 acpibut*	at acpi?		# ACPI Button
-acpidalb*	at acpi?		# Direct Application Launch Button
+acpidalb*	at acpi?		# ACPI Direct Application Launch Button
 acpiec* 	at acpi?		# ACPI Embedded Controller (late)
 acpiecdt*	at acpi?		# ACPI Embedded Controller (early)
 acpifan*	at acpi?		# ACPI Fan



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

2021-03-04 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Mar  4 15:58:50 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
GENERIC: Tiny comment adjustment (NFC)

While making XEN3_DOM0 more like GENERIC, I noticed a few differences
where GENERIC was off -- trivial things like missing spaces in
comments, inconsistent comment workding.  This fixes those, both
because they are valid fixes in their own right once noticed, and to
make the diff to XEN smaller.


To generate a diff of this commit:
cvs rdiff -u -r1.584 -r1.585 src/sys/arch/amd64/conf/GENERIC

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



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

2021-03-03 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Wed Mar  3 12:31:19 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Move closer to GENERIC (NFC)

This commit reorders some lines, and brings in commented lines from
GENERIC to reduce the diff.  It also brings in two agp lines,
commented out, and with a warning that they are intentionally omitted.


To generate a diff of this commit:
cvs rdiff -u -r1.189 -r1.190 src/sys/arch/amd64/conf/XEN3_DOM0

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/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.189 src/sys/arch/amd64/conf/XEN3_DOM0:1.190
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.189	Tue Mar  2 18:10:31 2021
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Wed Mar  3 12:31:19 2021
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.189 2021/03/02 18:10:31 gdt Exp $
+# $NetBSD: XEN3_DOM0,v 1.190 2021/03/03 12:31:19 gdt Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -12,22 +12,48 @@
 
 include 	"arch/amd64/conf/std.xen"
 
-options		XENPV		# PV dom0 support
-options 	MULTIPROCESSOR
-#options 	NO_PREEMPTION	# needed if MULTIPROCESSOR is disabled
-
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#options 	UVMHIST
-#options 	UVMHIST_PRINT
-#options 	SYSCALL_DEBUG
-
-#ident		"XEN3_DOM0-$Revision: 1.189 $"
+#ident		"XEN3_DOM0-$Revision: 1.190 $"
 
 maxusers	32		# estimated number of users
 
-#
+# delay between "rebooting ..." message and hardware reset, in milliseconds
+#options 	CPURESET_DELAY=2000
+
+# This option allows you to force a serial console at the specified
+# I/O address.   see console(4) for details.
+#options 	CONSDEVNAME="\"com\"",CONADDR=0x2f8,CONSPEED=57600
+#	you don't want the option below ON iff you are using the
+#	serial console option of the new boot strap code.
+#options 	CONS_OVERRIDE	# Always use above! independent of boot info
+
+# The following options override the memory sizes passed in from the boot
+# block.  Use them *only* if the boot block is unable to determine the correct
+# values.  Note that the BIOS may *correctly* report less than 640k of base
+# memory if the extended BIOS data area is located at the top of base memory
+# (as is the case on most recent systems).
+#options 	REALBASEMEM=639		# size of base memory (in KB)
+#options 	REALEXTMEM=15360	# size of extended memory (in KB)
+
+# The following options limit the overall size of physical memory
+# and/or the maximum address used by the system.
+# Contrary to REALBASEMEM and REALEXTMEM, they still use the BIOS memory map
+# and can deal with holes in the memory layout.
+#options 	PHYSMEM_MAX_SIZE=64	# max size of physical memory (in MB)
+#options 	PHYSMEM_MAX_ADDR=2048	# don't use memory above this (in MB)
+
+## Xen-specific options
+
+options		XENPV		# PV dom0 support
 options 	DOM0OPS
+options 	MULTIPROCESSOR
+#options 	NO_PREEMPTION	# needed if MULTIPROCESSOR is disabled
+
+#options 	CONSDEVNAME="\"xencons\""
+#options 	CONS_OVERRIDE
+
+## end Xen-specific options
 
 # boot messages with MPBIOS, acpi and ioapic can be quite large
 options 	MSGBUFSIZE=24576
@@ -36,10 +62,7 @@ options 	MSGBUFSIZE=24576
 est0		at cpu0		# Intel Enhanced SpeedStep (non-ACPI)
 powernow0	at cpu0		# AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 
-#options 	MTRR		# memory-type range register syscall support
-
-#options 	CONSDEVNAME="\"xencons\""
-#options 	CONS_OVERRIDE
+# Standard system options
 
 options 	INSECURE	# disable kernel security levels - X needs this
 
@@ -50,6 +73,7 @@ options 	KTRACE		# system call tracing v
 
 options 	CPU_UCODE	# cpu ucode loading support
 
+# Note: SysV IPC parameters could be changed dynamically, see sysctl(8).
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
@@ -65,15 +89,25 @@ options 	BUFQ_PRIOCSCAN
 
 # Diagnostic/debugging support options
 options 	DIAGNOSTIC	# inexpensive kernel consistency checks
+# XXX to be commented out on release branch
 #options 	DEBUG		# expensive debugging checks/support
+#options 	LOCKDEBUG	# expensive locking checks/support
+
+#
+# Because gcc omits the frame pointer for any -O level, the line below
+# is needed to make backtraces in DDB work.
+#
+makeoptions	COPTS="-O2 -fno-omit-frame-pointer"
 options 	DDB		# in-kernel debugger
+options		DDB_COMMANDONENTER="show registers"
 options 	DDB_ONPANIC=1	# see also sysctl(7): `ddb.onpanic'
 options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
 #options 	KGDB		# remote debugger
 #options 	KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x2f8,KGDB_DEVRATE=57600
 #makeoptions	DEBUG="-g"	# compile full symbol table
-makeoptions	COPTS="-O2 -fno-omit-frame-pointer"
-options DDB_COMMANDONENTER="show registers"
+#options 	SYSCALL_STATS	# per syscall counts
+#options 	SYSCALL_TIMES	# per syscall times
+#options 	

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

2021-03-03 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Wed Mar  3 12:31:19 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Move closer to GENERIC (NFC)

This commit reorders some lines, and brings in commented lines from
GENERIC to reduce the diff.  It also brings in two agp lines,
commented out, and with a warning that they are intentionally omitted.


To generate a diff of this commit:
cvs rdiff -u -r1.189 -r1.190 src/sys/arch/amd64/conf/XEN3_DOM0

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



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

2021-03-02 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Tue Mar  2 18:10:31 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Fix pckbc console attachment logic

Copy PCKBD_CNATTACH_MAY_FAIL lines from GENERIC to XEN3_DOM0.

GENERIC defines PCKBD_CNATTACH_MAY_FAIL, which means that an attempt
to activate console input on pckbc will fail if there is no keyboard
present.  This is a problem on semi-modern machines that have pckbc
silicon but not ports, and thus almost always have a USB keyboard
also.  What I suspect are bugs in console attachment logic lead to
attempting to attach a ukbd while there already is a console keyboard,
and with DIAGNOSTIC this is (properly) fatal, so XEN3_DOM0 blows up
with a USB keyboard in current, and probably not in 9.

Live tested on a machine that previously paniced on boot.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/sys/arch/amd64/conf/XEN3_DOM0

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



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

2021-03-02 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Tue Mar  2 18:10:31 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Fix pckbc console attachment logic

Copy PCKBD_CNATTACH_MAY_FAIL lines from GENERIC to XEN3_DOM0.

GENERIC defines PCKBD_CNATTACH_MAY_FAIL, which means that an attempt
to activate console input on pckbc will fail if there is no keyboard
present.  This is a problem on semi-modern machines that have pckbc
silicon but not ports, and thus almost always have a USB keyboard
also.  What I suspect are bugs in console attachment logic lead to
attempting to attach a ukbd while there already is a console keyboard,
and with DIAGNOSTIC this is (properly) fatal, so XEN3_DOM0 blows up
with a USB keyboard in current, and probably not in 9.

Live tested on a machine that previously paniced on boot.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/sys/arch/amd64/conf/XEN3_DOM0

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/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.188 src/sys/arch/amd64/conf/XEN3_DOM0:1.189
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.188	Tue Mar  2 18:06:12 2021
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Tue Mar  2 18:10:31 2021
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.188 2021/03/02 18:06:12 gdt Exp $
+# $NetBSD: XEN3_DOM0,v 1.189 2021/03/02 18:10:31 gdt Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -22,7 +22,7 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #options 	UVMHIST_PRINT
 #options 	SYSCALL_DEBUG
 
-#ident		"XEN3_DOM0-$Revision: 1.188 $"
+#ident		"XEN3_DOM0-$Revision: 1.189 $"
 
 maxusers	32		# estimated number of users
 
@@ -166,6 +166,8 @@ options 	WSDISPLAY_COMPAT_PCVT		# emulat
 options 	WSDISPLAY_COMPAT_SYSCONS	# emulate some ioctls
 options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
 options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
+# don't attach pckbd as the console if no PS/2 keyboard is found
+options 	PCKBD_CNATTACH_MAY_FAIL
 # see dev/pckbport/wskbdmap_mfii.c for implemented layouts
 #options 	PCKBD_LAYOUT="(KB_DE | KB_NODEAD)"
 # allocate a number of virtual screens at autoconfiguration time



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

2021-03-02 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Tue Mar  2 18:06:12 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Sync VERBOSE with GENERIC

Copy the *VERBOSE option block from GENERIC, and prune the scattered
verbose options in XEN3_DOM0, surely dating from a time they were
copied from an earlier GENERIC.  This amounts to adding PCIVERBOSE and
SCSIVERBOSE, and the diff from GENERIC to DOM0 boots is markedly
reduced.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/arch/amd64/conf/XEN3_DOM0

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/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.187 src/sys/arch/amd64/conf/XEN3_DOM0:1.188
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.187	Mon Mar  1 13:52:50 2021
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Tue Mar  2 18:06:12 2021
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.187 2021/03/01 13:52:50 gdt Exp $
+# $NetBSD: XEN3_DOM0,v 1.188 2021/03/02 18:06:12 gdt Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -22,7 +22,7 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #options 	UVMHIST_PRINT
 #options 	SYSCALL_DEBUG
 
-#ident		"XEN3_DOM0-$Revision: 1.187 $"
+#ident		"XEN3_DOM0-$Revision: 1.188 $"
 
 maxusers	32		# estimated number of users
 
@@ -133,6 +133,17 @@ options 	PPP_FILTER	# Active filter supp
 #options 	ALTQ_RIO	# RED with IN/OUT
 #options 	ALTQ_WFQ	# Weighted Fair Queueing
 
+# These options enable verbose messages for several subsystems.
+# Warning, these may compile large string tables into the kernel!
+#options 	ACPIVERBOSE	# verbose ACPI configuration messages
+#options 	MIIVERBOSE	# verbose PHY autoconfig messages
+options 	PCIVERBOSE	# verbose PCI device autoconfig messages
+#options 	PCI_CONFIG_DUMP	# verbosely dump PCI config space
+#options 	PCMCIAVERBOSE	# verbose PCMCIA configuration messages
+options 	SCSIVERBOSE	# human readable SCSI error messages
+#options 	USBVERBOSE	# verbose USB device autoconfig messages
+#options 	HDAUDIOVERBOSE	# verbose HDAUDIO driver messages
+
 options 	NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM
 #options 	NFS_BOOT_BOOTSTATIC
 #options 	NFS_BOOTSTATIC_MYIP="\"169.254.1.2\""
@@ -197,8 +208,6 @@ acpi0		at mainbus?		# ACPI access in PVH
 #options 	ACPI_ACTIVATE_DEV	# If set, activate inactive devices
 options 	ACPI_SCANPCI		# find PCI roots using ACPI
 #options 	ACPICA_PEDANTIC		# force strict conformance to the Spec.
-#options 	ACPIVERBOSE		# verbose ACPI configuration messages
-#options 	MIIVERBOSE		# verbose PHY autoconfig messages
 options 	MPBIOS			# configure CPUs and APICs using MPBIOS
 #options 	MPDEBUG			# MPBIOS configures PCI roots
 #options 	MPVERBOSE		# verbose MPBIOS autoconfig messages
@@ -206,9 +215,6 @@ options 	MPBIOS_SCANPCI		# MPBIOS config
 #options 	PCI_ADDR_FIXUP		# fixup PCI I/O addresses
 #options 	PCI_BUS_FIXUP		# fixup PCI bus numbering
 #options 	PCI_INTR_FIXUP		# fixup PCI interrupt routing
-#options 	PCIVERBOSE		# verbose PCI device autoconfig messages
-#options 	USBVERBOSE		# verbose USB device autoconfig messages
-#options 	HDAUDIOVERBOSE		# verbose HDAUDIO driver messages
 
 ioapic* 	at mainbus? apid ?
 



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

2021-03-02 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Tue Mar  2 18:06:12 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Sync VERBOSE with GENERIC

Copy the *VERBOSE option block from GENERIC, and prune the scattered
verbose options in XEN3_DOM0, surely dating from a time they were
copied from an earlier GENERIC.  This amounts to adding PCIVERBOSE and
SCSIVERBOSE, and the diff from GENERIC to DOM0 boots is markedly
reduced.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/arch/amd64/conf/XEN3_DOM0

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



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

2021-03-01 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Mon Mar  1 13:52:50 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
amd64/conf/XEN3_DOM0: Add comment

This commit merely adds a comment explaining how XEN3_DOM0 ought to
relate to GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/arch/amd64/conf/XEN3_DOM0

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/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.186 src/sys/arch/amd64/conf/XEN3_DOM0:1.187
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.186	Wed Jan 20 13:22:08 2021
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Mon Mar  1 13:52:50 2021
@@ -1,4 +1,14 @@
-# $NetBSD: XEN3_DOM0,v 1.186 2021/01/20 13:22:08 nia Exp $
+# $NetBSD: XEN3_DOM0,v 1.187 2021/03/01 13:52:50 gdt Exp $
+
+# XEN3_DOM0 machine description file
+#
+# This machine description file is used to generate a kernel to be
+# used as a PV dom0 under Xen.  It is similar to GENERIC in that it is
+# intended to be useful for most applications.  Generally, besides
+# changes that are specifically required for Xen (e.g., XENPV), it
+# should be similar to GENERIC.  Some differences are currently
+# necessary, such as drivers that fail under Xen but work in GENERIC,
+# for reasons that do not follow from Xen architecture.
 
 include 	"arch/amd64/conf/std.xen"
 
@@ -12,7 +22,7 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #options 	UVMHIST_PRINT
 #options 	SYSCALL_DEBUG
 
-#ident		"XEN3_DOM0-$Revision: 1.186 $"
+#ident		"XEN3_DOM0-$Revision: 1.187 $"
 
 maxusers	32		# estimated number of users
 



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

2021-03-01 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Mon Mar  1 13:52:50 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
amd64/conf/XEN3_DOM0: Add comment

This commit merely adds a comment explaining how XEN3_DOM0 ought to
relate to GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/arch/amd64/conf/XEN3_DOM0

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



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

2021-01-24 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Jan 24 14:17:11 UTC 2021

Modified Files:
src/sys/arch/amd64/amd64: machdep.c

Log Message:
Fix a tyop in a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.357 -r1.358 src/sys/arch/amd64/amd64/machdep.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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.357 src/sys/arch/amd64/amd64/machdep.c:1.358
--- src/sys/arch/amd64/amd64/machdep.c:1.357	Mon Sep  7 00:47:27 2020
+++ src/sys/arch/amd64/amd64/machdep.c	Sun Jan 24 14:17:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.357 2020/09/07 00:47:27 mrg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.358 2021/01/24 14:17:10 simonb Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.357 2020/09/07 00:47:27 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.358 2021/01/24 14:17:10 simonb Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -344,7 +344,7 @@ cpu_startup(void)
 	consinit();
 
 	/*
-	 * Initialize error message buffer (et end of core).
+	 * Initialize error message buffer (at end of core).
 	 */
 	if (msgbuf_p_cnt == 0)
 		panic("msgbuf paddr map has not been set up");



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

2021-01-24 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Jan 24 14:17:11 UTC 2021

Modified Files:
src/sys/arch/amd64/amd64: machdep.c

Log Message:
Fix a tyop in a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.357 -r1.358 src/sys/arch/amd64/amd64/machdep.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/amd64/conf

2021-01-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 20 21:38:44 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: NOCOMPAT

Log Message:
COMPAT_OSSAUDIO no longer exists; remove dangling reference


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/conf/NOCOMPAT

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/conf/NOCOMPAT
diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.5 src/sys/arch/amd64/conf/NOCOMPAT:1.6
--- src/sys/arch/amd64/conf/NOCOMPAT:1.5	Sun Aug 16 10:27:47 2020
+++ src/sys/arch/amd64/conf/NOCOMPAT	Wed Jan 20 21:38:44 2021
@@ -1,6 +1,6 @@
 include "arch/amd64/conf/GENERIC"
 
-#ident		"NOCOMPAT-$Revision: 1.5 $"
+#ident		"NOCOMPAT-$Revision: 1.6 $"
 
 no options 	SYSVMSG		# System V-like message queues
 no options 	SYSVSEM		# System V-like semaphores
@@ -31,6 +31,5 @@ no options	COMPAT_15
 #no options	COMPAT_80
 #no options	COMPAT_90
  
-no options 	COMPAT_OSSAUDIO
 no options 	COMPAT_NETBSD32
 no options 	EXEC_ELF32	# requires COMPAT_NETBSD32



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

2021-01-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 20 21:38:44 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: NOCOMPAT

Log Message:
COMPAT_OSSAUDIO no longer exists; remove dangling reference


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/conf/NOCOMPAT

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



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

2021-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 16 01:43:42 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Enable tpm @ acpi (now that it can match TPM 1.2 devices, which are not,
as the comment implies, experimental).


To generate a diff of this commit:
cvs rdiff -u -r1.580 -r1.581 src/sys/arch/amd64/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.580 src/sys/arch/amd64/conf/GENERIC:1.581
--- src/sys/arch/amd64/conf/GENERIC:1.580	Sun Sep 27 13:48:49 2020
+++ src/sys/arch/amd64/conf/GENERIC	Sat Jan 16 01:43:42 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.580 2020/09/27 13:48:49 roy Exp $
+# $NetBSD: GENERIC,v 1.581 2021/01/16 01:43:42 thorpej Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.580 $"
+#ident		"GENERIC-$Revision: 1.581 $"
 
 maxusers	64		# estimated number of users
 
@@ -354,7 +354,7 @@ sony*		at acpi?		# Sony Notebook Control
 spic*		at acpi?		# Sony Programmable I/O Controller
 wsmouse*	at spic?		# mouse
 thinkpad*	at acpi?		# IBM/Lenovo Thinkpad hotkeys
-#tpm*		at acpi?		# ACPI TPM (Experimental)
+tpm*		at acpi?		# ACPI TPM (Experimental)
 ug*		at acpi?		# Abit uGuru Hardware monitor
 valz*		at acpi?		# Toshiba Dynabook hotkeys
 wb*		at acpi?		# Winbond W83L518D SD/MMC reader



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

2021-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 16 01:43:42 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Enable tpm @ acpi (now that it can match TPM 1.2 devices, which are not,
as the comment implies, experimental).


To generate a diff of this commit:
cvs rdiff -u -r1.580 -r1.581 src/sys/arch/amd64/conf/GENERIC

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



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

2020-12-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 13 08:23:52 UTC 2020

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
Add atppc* at acpi?


To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/sys/arch/amd64/conf/ALL

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



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

2020-12-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 13 08:23:52 UTC 2020

Modified Files:
src/sys/arch/amd64/conf: ALL

Log Message:
Add atppc* at acpi?


To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/sys/arch/amd64/conf/ALL

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/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.164 src/sys/arch/amd64/conf/ALL:1.165
--- src/sys/arch/amd64/conf/ALL:1.164	Sun Sep 27 13:48:49 2020
+++ src/sys/arch/amd64/conf/ALL	Sun Dec 13 08:23:52 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.164 2020/09/27 13:48:49 roy Exp $
+# $NetBSD: ALL,v 1.165 2020/12/13 08:23:52 martin Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.164 $"
+#ident		"ALL-$Revision: 1.165 $"
 
 maxusers	64		# estimated number of users
 
@@ -377,6 +377,7 @@ aibs*		at acpi?		# ASUSTeK AI Booster ha
 applesmc*	at acpi?		# Apple System Management Controller
 asus*		at acpi?		# ASUS hotkeys
 attimer*	at acpi?		# AT Timer
+atppc*		at acpi?		# AT-style parallel port
 com*		at acpi?		# Serial communications interface
 fdc*		at acpi?		# Floppy disk controller
 fujbp*		at acpi?		# Fujitsu Brightness & Pointer



CVS commit: src/sys/arch/amd64

2020-11-30 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Nov 30 17:02:27 UTC 2020

Modified Files:
src/sys/arch/amd64/amd64: cpufunc.S
src/sys/arch/amd64/include: cpufunc.h

Log Message:
Introduce smap_enable()/smap_disable() functions, to be used from
C code.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/amd64/amd64/cpufunc.S
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amd64/include/cpufunc.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/amd64/cpufunc.S
diff -u src/sys/arch/amd64/amd64/cpufunc.S:1.64 src/sys/arch/amd64/amd64/cpufunc.S:1.65
--- src/sys/arch/amd64/amd64/cpufunc.S:1.64	Sun Jul 19 07:35:08 2020
+++ src/sys/arch/amd64/amd64/cpufunc.S	Mon Nov 30 17:02:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.S,v 1.64 2020/07/19 07:35:08 maxv Exp $	*/
+/*	$NetBSD: cpufunc.S,v 1.65 2020/11/30 17:02:27 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1998, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -167,6 +167,16 @@ END(x86_write_flags)
 
 STRONG_ALIAS(x86_write_psl,x86_write_flags)
 
+ENTRY(smap_enable)
+	SMAP_ENABLE
+	ret
+END(smap_enable)
+
+ENTRY(smap_disable)
+	SMAP_DISABLE
+	ret
+END(smap_disable)
+
 /*
  * %rdi = name
  * %rsi = sel

Index: src/sys/arch/amd64/include/cpufunc.h
diff -u src/sys/arch/amd64/include/cpufunc.h:1.19 src/sys/arch/amd64/include/cpufunc.h:1.20
--- src/sys/arch/amd64/include/cpufunc.h:1.19	Wed Oct 17 19:53:03 2007
+++ src/sys/arch/amd64/include/cpufunc.h	Mon Nov 30 17:02:27 2020
@@ -1,3 +1,6 @@
-/*	$NetBSD: cpufunc.h,v 1.19 2007/10/17 19:53:03 garbled Exp $	*/
+/*	$NetBSD: cpufunc.h,v 1.20 2020/11/30 17:02:27 bouyer Exp $	*/
 
 #include 
+
+void smap_enable(void);
+void smap_disable(void);



CVS commit: src/sys/arch/amd64

2020-11-30 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Nov 30 17:02:27 UTC 2020

Modified Files:
src/sys/arch/amd64/amd64: cpufunc.S
src/sys/arch/amd64/include: cpufunc.h

Log Message:
Introduce smap_enable()/smap_disable() functions, to be used from
C code.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/amd64/amd64/cpufunc.S
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amd64/include/cpufunc.h

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



  1   2   3   4   5   6   7   8   9   10   >