CVS commit: src/sys/arch/amd64

2011-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 16:23:44 UTC 2011

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

Log Message:
Implement sparse dumps for amd64 (copied from i386). Disabled for now via
sysctl.
XXX: most of the code can be merged.


To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/amd64/include/pmap.h

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

Modified files:

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.164 src/sys/arch/amd64/amd64/machdep.c:1.165
--- src/sys/arch/amd64/amd64/machdep.c:1.164	Thu Aug 11 14:11:17 2011
+++ src/sys/arch/amd64/amd64/machdep.c	Sat Aug 27 12:23:44 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: machdep.c,v 1.164 2011/08/11 18:11:17 cherry Exp $	*/
+/*	$NetBSD: machdep.c,v 1.165 2011/08/27 16:23:44 christos Exp $	*/
 
 /*-
- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
+ * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
  * The NetBSD Foundation, Inc.
  * All rights reserved.
  *
@@ -9,6 +9,10 @@
  * by Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace
  * Simulation Facility, NASA Ames Research Center.
  *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Coyote Point Systems, Inc. which was written under contract to Coyote
+ * Point by Jed Davis and Devon O'Dell.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -107,7 +111,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.164 2011/08/11 18:11:17 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.165 2011/08/27 16:23:44 christos Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -239,6 +243,25 @@
 uint64_t	dumpmem_high;
 int	cpu_class;
 
+
+#ifndef NO_SPARSE_DUMP
+int sparse_dump = 0;
+
+paddr_t max_paddr = 0;
+unsigned char *sparse_dump_physmap;
+#endif
+
+char *dump_headerbuf, *dump_headerbuf_ptr;
+#define dump_headerbuf_size PAGE_SIZE
+#define dump_headerbuf_end (dump_headerbuf + dump_headerbuf_size)
+#define dump_headerbuf_avail (dump_headerbuf_end - dump_headerbuf_ptr)
+daddr_t dump_header_blkno;
+
+size_t dump_nmemsegs;
+size_t dump_npages;
+size_t dump_header_size;
+size_t dump_totalbytesleft;
+
 vaddr_t	msgbuf_vaddr;
 paddr_t msgbuf_paddr;
 
@@ -290,8 +313,28 @@
 int	cpu_dump(void);
 int	cpu_dumpsize(void);
 u_long	cpu_dump_mempagecnt(void);
-void	dumpsys(void);
 void	dodumpsys(void);
+void	dumpsys(void);
+
+void dump_misc_init(void);
+void dump_seg_prep(void);
+int dump_seg_iter(int (*)(paddr_t, paddr_t));
+
+#ifndef NO_SPARSE_DUMP
+void sparse_dump_reset(void);
+void sparse_dump_mark(vaddr_t, vaddr_t, int);
+void cpu_dump_prep_sparse(void);
+#endif
+
+void dump_header_start(void);
+int dump_header_flush(void);
+int dump_header_addbytes(const void*, size_t);
+int dump_header_addseg(paddr_t, paddr_t);
+int dump_header_finish(void);
+
+int dump_seg_count_range(paddr_t, paddr_t);
+int dumpsys_seg(paddr_t, paddr_t);
+
 void	init_x86_64(paddr_t);
 
 /*
@@ -530,6 +573,14 @@
 		   SYSCTL_DESCR(Whether the kernel uses PAE),
 		   NULL, 1, NULL, 0,
 		   CTL_MACHDEP, CTL_CREATE, CTL_EOL);
+#ifndef NO_SPARSE_DUMP
+	/* XXXjld Does this really belong under machdep, and not e.g. kern? */
+	sysctl_createv(clog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLTYPE_INT, sparse_dump, NULL,
+		   NULL, 0, sparse_dump, 0,
+		   CTL_MACHDEP, CTL_CREATE, CTL_EOL);
+#endif
 }
 
 void
@@ -746,6 +797,259 @@
  * XXXfvdl share dumpcode.
  */
 
+ /*
+ * Perform assorted dump-related initialization tasks.  Assumes that
+ * the maximum physical memory address will not increase afterwards.
+ */
+void
+dump_misc_init(void)
+{
+#ifndef NO_SPARSE_DUMP
+	int i;
+#endif
+
+	if (dump_headerbuf != NULL)
+		return; /* already called */
+
+#ifndef NO_SPARSE_DUMP
+	for (i = 0; i  mem_cluster_cnt; ++i) {
+		paddr_t top = mem_clusters[i].start + mem_clusters[i].size;
+		if (max_paddr  top)
+			max_paddr = top;
+	}
+#ifdef DEBUG
+	printf(dump_misc_init: max_paddr = 0x%lx\n,
+	(unsigned long)max_paddr);
+#endif
+
+	sparse_dump_physmap = (void*)uvm_km_alloc(kernel_map,
+	roundup(max_paddr / (PAGE_SIZE * NBBY), PAGE_SIZE),
+	PAGE_SIZE, UVM_KMF_WIRED|UVM_KMF_ZERO);
+#endif
+	dump_headerbuf = (void*)uvm_km_alloc(kernel_map,
+	dump_headerbuf_size,
+	PAGE_SIZE, UVM_KMF_WIRED|UVM_KMF_ZERO);
+	/* XXXjld should check for failure here, disable dumps if so. */
+}
+
+#ifndef NO_SPARSE_DUMP
+/*
+ * Clear the set of pages to include in a sparse dump.
+ */
+void
+sparse_dump_reset(void)
+{
+	memset(sparse_dump_physmap, 0,
+	roundup(max_paddr / (PAGE_SIZE * NBBY), PAGE_SIZE));
+}
+
+/*
+ * Include or exclude pages 

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

2011-08-11 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Thu Aug 11 07:36:17 UTC 2011

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

Log Message:
Add commented out sample entry for pwdog(4).


To generate a diff of this commit:
cvs rdiff -u -r1.332 -r1.333 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.332 src/sys/arch/amd64/conf/GENERIC:1.333
--- src/sys/arch/amd64/conf/GENERIC:1.332	Tue Aug  9 02:52:29 2011
+++ src/sys/arch/amd64/conf/GENERIC	Thu Aug 11 07:36:17 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.332 2011/08/09 02:52:29 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.333 2011/08/11 07:36:17 mbalmer Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.332 $
+#ident 		GENERIC-$Revision: 1.333 $
 
 maxusers	64		# estimated number of users
 
@@ -334,6 +334,8 @@
 #amdpcib* at pci? dev ? function ?	# AMD 8111 PCI-ISA w/ HPET
 #hpet*	at amdpcib?
 
+#pwdog*	at pci? dev ? function ?	# QUANCOM PWDOG1
+
 ichlpcib* at pci? dev ? function ?	# Intel ICH PCI-LPC w/ timecounter,
 	# watchdog and Speedstep and HPET
 fwhrng* at ichlpcib?		# Intel 82802 FWH Random Number Generator



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

2011-08-10 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Wed Aug 10 06:33:13 UTC 2011

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

Log Message:
Correct offset calculation for ci


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/amd64/include/frameasm.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/frameasm.h
diff -u src/sys/arch/amd64/include/frameasm.h:1.15 src/sys/arch/amd64/include/frameasm.h:1.16
--- src/sys/arch/amd64/include/frameasm.h:1.15	Wed Jan 12 23:12:11 2011
+++ src/sys/arch/amd64/include/frameasm.h	Wed Aug 10 06:33:13 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: frameasm.h,v 1.15 2011/01/12 23:12:11 joerg Exp $	*/
+/*	$NetBSD: frameasm.h,v 1.16 2011/08/10 06:33:13 cherry Exp $	*/
 
 #ifndef _AMD64_MACHINE_FRAMEASM_H
 #define _AMD64_MACHINE_FRAMEASM_H
@@ -132,15 +132,13 @@
 
 #ifdef XEN
 #define CLI(temp_reg) \
- 	movl CPUVAR(CPUID),%e ## temp_reg ;			\
- 	shlq $6,%r ## temp_reg ;\
- 	addq CPUVAR(VCPU),%r ## temp_reg ;			\
- 	movb $1,EVTCHN_UPCALL_MASK(%r ## temp_reg)
+ 	movq CPUVAR(VCPU),%r ## temp_reg ;			\
+	movb $1,EVTCHN_UPCALL_MASK(%r ## temp_reg);
+
 #define STI(temp_reg) \
- 	movl CPUVAR(CPUID),%e ## temp_reg ;			\
- 	shlq $6,%r ## temp_reg ;\
- 	addq CPUVAR(VCPU),%r ## temp_reg ;			\
- 	movb $0,EVTCHN_UPCALL_MASK(%r ## temp_reg)
+ 	movq CPUVAR(VCPU),%r ## temp_reg ;			\
+	movb $0,EVTCHN_UPCALL_MASK(%r ## temp_reg);
+
 #else /* XEN */
 #define CLI(temp_reg) cli
 #define STI(temp_reg) sti



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

2011-08-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Aug  8 16:13:42 UTC 2011

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

Log Message:
Finish reverting premature modularization of amd64 kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/amd64/conf/INSTALL

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.328 src/sys/arch/amd64/conf/GENERIC:1.329
--- src/sys/arch/amd64/conf/GENERIC:1.328	Sat Jul 30 18:41:34 2011
+++ src/sys/arch/amd64/conf/GENERIC	Mon Aug  8 16:13:42 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.328 2011/07/30 18:41:34 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.329 2011/08/08 16:13:42 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,15 +22,10 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.328 $
+#ident 		GENERIC-$Revision: 1.329 $
 
 maxusers	64		# estimated number of users
 
-# Common binary formats are statically compiled in by default.
-options 	EXEC_ELF32	# exec ELF 32-bits binaries
-#no options 	EXEC_ELF64	# exec ELF 64-bits binaries
-#no options 	EXEC_SCRIPT	# exec #! scripts
-
 # delay between rebooting ... message and hardware reset, in milliseconds
 #options 	CPURESET_DELAY=2000
 
@@ -70,8 +65,6 @@
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
 #options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
-no options	AIO		# POSIX asynchronous I/O, built as a module(7)
-no options	MQUEUE		# POSIX messsage queues, built as a module(7)
 
 options 	MODULAR		# new style module(7) framework
 options 	USERCONF	# userconf(4) support
@@ -124,8 +117,9 @@
 
 options 	COMPAT_OSSAUDIO
 options 	COMPAT_NETBSD32
-#options 	COMPAT_LINUX
-#options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
+options 	COMPAT_LINUX
+options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
+options 	EXEC_ELF32
 options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 
 # Wedge support
@@ -139,23 +133,22 @@
 file-system	MFS		# memory file system
 file-system 	NFS		# Network File System client
 file-system	TMPFS		# Efficient memory file-system
-# File systems, built as module(7)s by default
-#file-system	EXT2FS		# second extended file system (linux)
-#file-system	LFS		# log-structured file system
-#file-system	NTFS		# Windows/NT file system (experimental)
-#file-system	CD9660		# ISO 9660 + Rock Ridge file system
-#file-system	MSDOSFS		# MS-DOS file system
-#file-system	FDESC		# /dev/fd
-#file-system	KERNFS		# /kern
-#file-system	NULLFS		# loopback file system
-#file-system	OVERLAY		# overlay file system
-#file-system	PROCFS		# /proc
-#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
-#file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
-#file-system	UMAPFS		# NULLFS + uid and gid remapping
-#file-system	UNION		# union file system
-#file-system	CODA		# Coda File System; also needs vcoda (below)
-#file-system	PTYFS		# /dev/ptm support
+file-system	EXT2FS		# second extended file system (linux)
+file-system	LFS		# log-structured file system
+file-system	NTFS		# Windows/NT file system (experimental)
+file-system	CD9660		# ISO 9660 + Rock Ridge file system
+file-system	MSDOSFS		# MS-DOS file system
+file-system	FDESC		# /dev/fd
+file-system	KERNFS		# /kern
+file-system	NULLFS		# loopback file system
+file-system	OVERLAY		# overlay file system
+file-system	PROCFS		# /proc
+file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
+file-system	UMAPFS		# NULLFS + uid and gid remapping
+file-system	UNION		# union file system
+file-system	CODA		# Coda File System; also needs vcoda (below)
+file-system	PTYFS		# /dev/ptm support
 #file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
 #file-system	HFS		# experimental - Apple HFS+ (read-only)
 #file-system	NILFS		# experimental - NTT's NiLFS(2)
@@ -1157,9 +1150,9 @@
 pseudo-device	agr			# IEEE 802.3ad link aggregation
 
 #
-# accept filters, built as module(7)s by default
-#pseudo-device   accf_data		# dataready accept filter
-#pseudo-device   accf_http		# httpready accept filter
+# accept filters
+pseudo-device   accf_data		# dataready accept filter
+pseudo-device   accf_http		# httpready accept filter
 
 # miscellaneous pseudo-devices
 pseudo-device	pty			# pseudo-terminals
@@ -1176,7 +1169,7 @@
 pseudo-device	btuart			# Bluetooth HCI UART (H4)
 
 # a pseudo device needed for Coda	# also needs CODA (above)
-#pseudo-device	vcoda		4	# coda minicache - venus comm.
+pseudo-device	vcoda		4	# coda minicache - venus comm.
 
 # a pseudo device needed for SMBFS
 pseudo-device	nsmb			# experimental - SMB requester

Index: src/sys/arch/amd64/conf/INSTALL
diff -u 

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

2011-08-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Aug  8 16:27:46 UTC 2011

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

Log Message:
Add P1003_1B_SEMAPHORE to match i386.


To generate a diff of this commit:
cvs rdiff -u -r1.329 -r1.330 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.329 src/sys/arch/amd64/conf/GENERIC:1.330
--- src/sys/arch/amd64/conf/GENERIC:1.329	Mon Aug  8 16:13:42 2011
+++ src/sys/arch/amd64/conf/GENERIC	Mon Aug  8 16:27:46 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.329 2011/08/08 16:13:42 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.330 2011/08/08 16:27:46 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.329 $
+#ident 		GENERIC-$Revision: 1.330 $
 
 maxusers	64		# estimated number of users
 
@@ -64,7 +64,7 @@
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
-#options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
+options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
 
 options 	MODULAR		# new style module(7) framework
 options 	USERCONF	# userconf(4) support



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

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug  8 18:57:59 UTC 2011

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

Log Message:
remove dtv (available as a module)


To generate a diff of this commit:
cvs rdiff -u -r1.330 -r1.331 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.330 src/sys/arch/amd64/conf/GENERIC:1.331
--- src/sys/arch/amd64/conf/GENERIC:1.330	Mon Aug  8 16:27:46 2011
+++ src/sys/arch/amd64/conf/GENERIC	Mon Aug  8 18:57:58 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.330 2011/08/08 16:27:46 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.331 2011/08/08 18:57:58 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.330 $
+#ident 		GENERIC-$Revision: 1.331 $
 
 maxusers	64		# estimated number of users
 
@@ -1025,7 +1025,7 @@
 pseye* at uhub?		# Sony PLAYSTATION(R) Eye webcam
 uvideo* at uhub?	# USB Video Class capture devices
 video* at videobus?
-dtv* at dtvbus?
+#dtv* at dtvbus?
 
 
 # TV cards
@@ -1035,7 +1035,7 @@
 radio* at bktr?
 
 # Conexant CX2388[0-3]-based DTV cards
-cxdtv* at pci? dev ? function ?
+#cxdtv* at pci? dev ? function ?
 #iic* at cxdtv?
 
 



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

2011-08-01 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Aug  1 22:21:01 UTC 2011

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

Log Message:
Remove redundant , after .balign.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amd64/amd64/linux32_sigcode.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/linux32_sigcode.S
diff -u src/sys/arch/amd64/amd64/linux32_sigcode.S:1.1 src/sys/arch/amd64/amd64/linux32_sigcode.S:1.2
--- src/sys/arch/amd64/amd64/linux32_sigcode.S:1.1	Thu Feb  9 19:18:56 2006
+++ src/sys/arch/amd64/amd64/linux32_sigcode.S	Mon Aug  1 22:21:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_sigcode.S,v 1.1 2006/02/09 19:18:56 manu Exp $ */
+/*	$NetBSD: linux32_sigcode.S,v 1.2 2011/08/01 22:21:01 joerg Exp $ */
 
 #include assym.h
 #include machine/asm.h
@@ -13,7 +13,7 @@
 	 movl$LINUX32_SYS_exit,%eax
 	 int $0x80
   
-	.balign 16,,
+	.balign 16
 NENTRY(linux32_rt_sigcode)
 	 call*LINUX32_RT_SF_HANDLER(%esp)
 	 lealLINUX32_RT_SF_UC(%esp),%ebx # scp
@@ -22,7 +22,7 @@
 	 int $0x80
 	 movl$LINUX32_SYS_exit,%eax
 	 int $0x80
-	.balign 16,,
+	.balign 16
 	 .globl  _C_LABEL(linux32_esigcode)
 _C_LABEL(linux32_esigcode): 
 



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

2011-07-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jul 30 18:41:35 UTC 2011

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

Log Message:
add PCKBD_CNATTACH_MAY_FAIL to be consistent with i386


To generate a diff of this commit:
cvs rdiff -u -r1.327 -r1.328 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.327 src/sys/arch/amd64/conf/GENERIC:1.328
--- src/sys/arch/amd64/conf/GENERIC:1.327	Sat Jul 23 21:12:57 2011
+++ src/sys/arch/amd64/conf/GENERIC	Sat Jul 30 18:41:34 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.327 2011/07/23 21:12:57 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.328 2011/07/30 18:41:34 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.327 $
+#ident 		GENERIC-$Revision: 1.328 $
 
 maxusers	64		# estimated number of users
 
@@ -236,6 +236,8 @@
 options 	WSDISPLAY_COMPAT_SYSCONS	# emulate some ioctls
 options 	WSDISPLAY_COMPAT_USL		# 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/include

2011-07-26 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Jul 26 12:55:35 UTC 2011

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

Log Message:
g/c round_pdr


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/include/param.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/param.h
diff -u src/sys/arch/amd64/include/param.h:1.13 src/sys/arch/amd64/include/param.h:1.14
--- src/sys/arch/amd64/include/param.h:1.13	Mon Feb  8 19:02:26 2010
+++ src/sys/arch/amd64/include/param.h	Tue Jul 26 12:55:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.13 2010/02/08 19:02:26 joerg Exp $	*/
+/*	$NetBSD: param.h,v 1.14 2011/07/26 12:55:35 yamt Exp $	*/
 
 #ifdef __x86_64__
 
@@ -118,7 +118,6 @@
 
 #define btop(x)x86_btop(x)
 #define ptob(x)x86_ptob(x)
-#define round_pdr(x)			x86_round_pdr(x)
 
 #define mstohz(ms) ((ms + 0UL) * hz / 1000)
 



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

2011-07-20 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Jul 21 04:00:26 UTC 2011

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

Log Message:
Add dtv* at dtvbus? because I'll get weird looks if I introduce a #if NDTV  0,
and also if I don't un-Break the build.


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.325 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.324 src/sys/arch/amd64/conf/GENERIC:1.325
--- src/sys/arch/amd64/conf/GENERIC:1.324	Wed Jul 20 20:29:54 2011
+++ src/sys/arch/amd64/conf/GENERIC	Thu Jul 21 04:00:25 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.324 2011/07/20 20:29:54 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.325 2011/07/21 04:00:25 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.324 $
+#ident 		GENERIC-$Revision: 1.325 $
 
 maxusers	64		# estimated number of users
 
@@ -1029,6 +1029,7 @@
 pseye* at uhub?		# Sony PLAYSTATION(R) Eye webcam
 uvideo* at uhub?	# USB Video Class capture devices
 video* at videobus?
+dtv* at dtvbus?
 
 
 # TV cards



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

2011-07-20 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Jul 21 04:05:14 UTC 2011

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

Log Message:
Add wmieeepc(4) to amd64 GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 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.325 src/sys/arch/amd64/conf/GENERIC:1.326
--- src/sys/arch/amd64/conf/GENERIC:1.325	Thu Jul 21 04:00:25 2011
+++ src/sys/arch/amd64/conf/GENERIC	Thu Jul 21 04:05:14 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.325 2011/07/21 04:00:25 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.326 2011/07/21 04:05:14 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.325 $
+#ident 		GENERIC-$Revision: 1.326 $
 
 maxusers	64		# estimated number of users
 
@@ -318,6 +318,7 @@
 wb*		at acpi?		# Winbond W83L518D SD/MMC reader
 sdmmc*		at wb?			# SD/MMC bus
 wmidell*	at acpiwmibus?		# Dell WMI mappings
+wmieeepc*	at acpiwmibus?		# Asus Eee PC WMI mappings
 wmihp*		at acpiwmibus?		# HP WMI mappings
 wmimsi* 	at acpiwmibus?		# MSI WMI mappings
 



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

2011-07-17 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sun Jul 17 15:16:59 UTC 2011

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

Log Message:
CR4_PAE is always set to 1 under amd64, so indicate that PAE mode is
enabled. Can be useful for 32-bits test runs on amd64 hosts.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 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.161 src/sys/arch/amd64/amd64/machdep.c:1.162
--- src/sys/arch/amd64/amd64/machdep.c:1.161	Sun Jun 12 03:35:37 2011
+++ src/sys/arch/amd64/amd64/machdep.c	Sun Jul 17 15:16:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.161 2011/06/12 03:35:37 rmind Exp $	*/
+/*	$NetBSD: machdep.c,v 1.162 2011/07/17 15:16:58 jym Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.161 2011/06/12 03:35:37 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.162 2011/07/17 15:16:58 jym Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -524,6 +524,12 @@
 		   CTLTYPE_QUAD, tsc_freq, NULL,
 		   NULL, 0, tsc_freq, 0,
 		   CTL_MACHDEP, CTL_CREATE, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT | CTLFLAG_IMMEDIATE,
+		   CTLTYPE_INT, pae,
+		   SYSCTL_DESCR(Whether the kernel uses PAE),
+		   NULL, 1, NULL, 0,
+		   CTL_MACHDEP, CTL_CREATE, CTL_EOL);
 }
 
 void



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

2011-07-16 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Sun Jul 17 01:17:27 UTC 2011

Modified Files:
src/sys/arch/amd64/include: Makefile
Removed Files:
src/sys/arch/amd64/include: bus.h

Log Message:
On amd64, good-bye machine/bus.h.

Up next: update set lists.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/include/Makefile
cvs rdiff -u -r1.1 -r0 src/sys/arch/amd64/include/bus.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/Makefile
diff -u src/sys/arch/amd64/include/Makefile:1.11 src/sys/arch/amd64/include/Makefile:1.12
--- src/sys/arch/amd64/include/Makefile:1.11	Sat Jul 31 21:47:53 2010
+++ src/sys/arch/amd64/include/Makefile	Sun Jul 17 01:17:27 2011
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.11 2010/07/31 21:47:53 joerg Exp $
+#	$NetBSD: Makefile,v 1.12 2011/07/17 01:17:27 dyoung Exp $
 
 INCSDIR= /usr/include/amd64
 
 INCS=	ansi.h aout_machdep.h asm.h \
-	bootinfo.h bswap.h bus.h byte_swap.h \
+	bootinfo.h bswap.h byte_swap.h \
 	cdefs.h cpu.h cpufunc.h \
 	disklabel.h \
 	elf_machdep.h endian.h endian_machdep.h \



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

2011-07-01 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jul  1 19:24:14 UTC 2011

Modified Files:
src/sys/arch/amd64/amd64: fpu.c genassym.cf rbus_machdep.c

Log Message:
#include sys/bus.h instead of machine/bus.h.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amd64/amd64/fpu.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/amd64/amd64/genassym.cf
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/amd64/rbus_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/fpu.c
diff -u src/sys/arch/amd64/amd64/fpu.c:1.34 src/sys/arch/amd64/amd64/fpu.c:1.35
--- src/sys/arch/amd64/amd64/fpu.c:1.34	Mon Mar  7 02:24:57 2011
+++ src/sys/arch/amd64/amd64/fpu.c	Fri Jul  1 19:24:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.34 2011/03/07 02:24:57 cherry Exp $	*/
+/*	$NetBSD: fpu.c,v 1.35 2011/07/01 19:24:14 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.  All
@@ -100,7 +100,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fpu.c,v 1.34 2011/03/07 02:24:57 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: fpu.c,v 1.35 2011/07/01 19:24:14 dyoung Exp $);
 
 #include opt_multiprocessor.h
 
@@ -114,7 +114,7 @@
 #include sys/vmmeter.h
 #include sys/kernel.h
 
-#include machine/bus.h
+#include sys/bus.h
 #include machine/cpu.h
 #include machine/intr.h
 #include machine/cpufunc.h

Index: src/sys/arch/amd64/amd64/genassym.cf
diff -u src/sys/arch/amd64/amd64/genassym.cf:1.47 src/sys/arch/amd64/amd64/genassym.cf:1.48
--- src/sys/arch/amd64/amd64/genassym.cf:1.47	Sun Jun 12 03:35:37 2011
+++ src/sys/arch/amd64/amd64/genassym.cf	Fri Jul  1 19:24:14 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.47 2011/06/12 03:35:37 rmind Exp $
+#	$NetBSD: genassym.cf,v 1.48 2011/07/01 19:24:14 dyoung Exp $
 
 #
 # Copyright (c) 1998, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -122,7 +122,7 @@
 include xen/xen3-public/xen.h
 endif  
 
-include x86/bus.h
+include sys/bus.h
 
 define	LSRUN			LSRUN
 define	LSONPROC		LSONPROC

Index: src/sys/arch/amd64/amd64/rbus_machdep.c
diff -u src/sys/arch/amd64/amd64/rbus_machdep.c:1.4 src/sys/arch/amd64/amd64/rbus_machdep.c:1.5
--- src/sys/arch/amd64/amd64/rbus_machdep.c:1.4	Mon Dec 20 00:25:24 2010
+++ src/sys/arch/amd64/amd64/rbus_machdep.c	Fri Jul  1 19:24:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbus_machdep.c,v 1.4 2010/12/20 00:25:24 matt Exp $	*/
+/*	$NetBSD: rbus_machdep.c,v 1.5 2011/07/01 19:24:14 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1999
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rbus_machdep.c,v 1.4 2010/12/20 00:25:24 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: rbus_machdep.c,v 1.5 2011/07/01 19:24:14 dyoung Exp $);
 
 #include opt_pcifixup.h
 
@@ -36,7 +36,7 @@
 
 #include sys/sysctl.h
 
-#include machine/bus.h
+#include sys/bus.h
 #include dev/cardbus/rbus.h
 
 #include sys/device.h



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

2011-06-09 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jun 10 03:17:35 UTC 2011

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

Log Message:
Explicitly disable use of SSE. LLVM generates SSE by default on AMD64
and we certainly don't want that in the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/amd64/conf/Makefile.amd64

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/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.35 src/sys/arch/amd64/conf/Makefile.amd64:1.36
--- src/sys/arch/amd64/conf/Makefile.amd64:1.35	Mon May 30 15:06:32 2011
+++ src/sys/arch/amd64/conf/Makefile.amd64	Fri Jun 10 03:17:35 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.amd64,v 1.35 2011/05/30 15:06:32 joerg Exp $
+#	$NetBSD: Makefile.amd64,v 1.36 2011/06/10 03:17:35 joerg Exp $
 
 # Makefile for NetBSD
 #
@@ -36,7 +36,7 @@
 DEFCOPTS=	-O2
 CPPFLAGS+=	-Damd64 -Dx86_64
 CFLAGS+=	-mcmodel=kernel
-CFLAGS+=	-mno-red-zone
+CFLAGS+=	-mno-red-zone -mno-sse -mno-sse2 -mno-sse3
 
 ##
 ## (3) libkern and compat



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

2011-06-09 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jun 10 03:18:27 UTC 2011

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

Log Message:
Disable LLVM MC for spl.S for now. The different spllower sizes break
patchfunc.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/amd64/conf/Makefile.amd64

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/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.36 src/sys/arch/amd64/conf/Makefile.amd64:1.37
--- src/sys/arch/amd64/conf/Makefile.amd64:1.36	Fri Jun 10 03:17:35 2011
+++ src/sys/arch/amd64/conf/Makefile.amd64	Fri Jun 10 03:18:27 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.amd64,v 1.36 2011/06/10 03:17:35 joerg Exp $
+#	$NetBSD: Makefile.amd64,v 1.37 2011/06/10 03:18:27 joerg Exp $
 
 # Makefile for NetBSD
 #
@@ -67,6 +67,7 @@
 AFLAGS.mptramp.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:}
 AFLAGS.linux32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:}
 AFLAGS.netbsd32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:}
+AFLAGS.spl.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:}
 CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == clang:?-Wno-error:}
 
 ##



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

2011-05-28 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat May 28 16:58:52 UTC 2011

Modified Files:
src/sys/arch/amd64/conf: GENERIC INSTALL INSTALL_XEN3_DOMU XEN3_DOM0
XEN3_DOMU

Log Message:
many whitespace cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.318 -r1.319 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/amd64/conf/INSTALL
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/conf/INSTALL_XEN3_DOMU
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.29 -r1.30 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/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.318 src/sys/arch/amd64/conf/GENERIC:1.319
--- src/sys/arch/amd64/conf/GENERIC:1.318	Fri Apr  1 12:11:17 2011
+++ src/sys/arch/amd64/conf/GENERIC	Sat May 28 16:58:51 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.318 2011/04/01 12:11:17 jruoho Exp $
+# $NetBSD: GENERIC,v 1.319 2011/05/28 16:58:51 ryo Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.318 $
+#ident 		GENERIC-$Revision: 1.319 $
 
 maxusers	64		# estimated number of users
 
@@ -100,13 +100,13 @@
 # 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
+makeoptions	COPTS=-O2 -fno-omit-frame-pointer
 options 	DDB		# in-kernel debugger
 #options 	DDB_ONPANIC=1	# see also sysctl(8): `ddb.onpanic'
 options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
 #options 	KGDB		# remote debugger
 #options 	KGDB_DEVNAME=\com\,KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
-#makeoptions 	DEBUG=-g	# compile full symbol table
+#makeoptions	DEBUG=-g	# compile full symbol table
 #options 	SYSCALL_STATS	# per syscall counts
 #options 	SYSCALL_TIMES	# per syscall times
 #options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
@@ -180,7 +180,7 @@
 #options 	IPSEC_ESP	# IP security (encryption part; define w/IPSEC)
 #options 	IPSEC_NAT_T	# IPsec NAT traversal (NAT-T)
 #options 	IPSEC_DEBUG	# debug for IP security
-#options	MPLS		# MultiProtocol Label Switching (needs ifmpls)
+#options 	MPLS		# MultiProtocol Label Switching (needs ifmpls)
 #options 	MROUTING	# IP multicast routing
 #options 	PIM		# Protocol Independent Multicast
 #options 	ISO,TPIP	# OSI
@@ -250,7 +250,7 @@
 # enable VGA raster mode capable of displaying multilingual text on console
 #options 	VGA_RASTERCONSOLE
 # enable splash screen support; requires genfb or radeonfb
-#optionsSPLASHSCREEN
+#options 	SPLASHSCREEN
 
 # Kernel root file system and dump configuration.
 config		netbsd	root on ? type ?
@@ -265,7 +265,7 @@
 ipmi0		at mainbus?
 
 # ACPI will be used if present. If not it will fall back to MPBIOS
-acpi0 		at mainbus0
+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
@@ -276,14 +276,14 @@
 options 	VGA_POST		# in-kernel support for VGA POST
 
 # ACPI devices
-acpiacad* 	at acpi?		# ACPI AC Adapter
-acpibat* 	at acpi?		# ACPI Battery
-acpibut* 	at acpi?		# ACPI Button
+acpiacad*	at acpi?		# ACPI AC Adapter
+acpibat*	at acpi?		# ACPI Battery
+acpibut*	at acpi?		# ACPI Button
 acpidalb*	at acpi?		# Direct Application Launch Button
 acpiec* 	at acpi?		# ACPI Embedded Controller (late)
-acpiecdt* 	at acpi?		# ACPI Embedded Controller (early)
-acpifan* 	at acpi?		# ACPI Fan
-acpilid* 	at acpi?		# ACPI Lid Switch
+acpiecdt*	at acpi?		# ACPI Embedded Controller (early)
+acpifan*	at acpi?		# ACPI Fan
+acpilid*	at acpi?		# ACPI Lid Switch
 #acpipmtr*	at acpi?		# ACPI Power Meter (experimental)
 #acpismbus*	at acpi?		# ACPI SMBus CMI (experimental)
 acpitz* 	at acpi?		# ACPI Thermal Zone
@@ -296,27 +296,27 @@
 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
+#com*		at acpi?		# Serial communications interface
+#fdc*		at acpi?		# Floppy disk controller
 fujbp*		at acpi?		# Fujitsu Brightness  Pointer
 fujhk*		at acpi?		# Fujitsu Hotkeys
 hpqlb*		at acpi?		# HP Quick Launch Buttons
 hpet*		at acpi?		# High Precision Event Timer
 joy*		at acpi?		# Joystick/Game port
-#lpt* 		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
+pckbc*		at acpi?		# PC keyboard controller
+pcppi*		at acpi?		# AT-style speaker sound
 sony*		at acpi?		# Sony Notebook Controller
-spic* 		at acpi?		# Sony Programmable I/O Controller
-wsmouse* 	at spic?		# 

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

2011-05-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 20 13:18:42 UTC 2011

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

Log Message:
LLVM's assembler parser doesn't support .code32 yet, so disable it as
needed.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amd64/conf/Makefile.amd64

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/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.30 src/sys/arch/amd64/conf/Makefile.amd64:1.31
--- src/sys/arch/amd64/conf/Makefile.amd64:1.30	Wed Jan 12 23:12:11 2011
+++ src/sys/arch/amd64/conf/Makefile.amd64	Fri May 20 13:18:42 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.amd64,v 1.30 2011/01/12 23:12:11 joerg Exp $
+#	$NetBSD: Makefile.amd64,v 1.31 2011/05/20 13:18:42 joerg Exp $
 
 # Makefile for NetBSD
 #
@@ -64,6 +64,11 @@
 spl.o: ${AMD64}/amd64/spl.S assym.h
 	${NORMAL_S}
 
+AFLAGS.locore.S=		-no-integrated-as
+AFLAGS.mptramp.S=		-no-integrated-as
+AFLAGS.linux32_sigcode.S=	-no-integrated-as
+AFLAGS.netbsd32_sigcode.S=	-no-integrated-as
+
 ##
 ## (5) link settings
 ##



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

2011-05-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 20 13:19:59 UTC 2011

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

Log Message:
Reuse -x assembler-with-cpp from sys.mk.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/conf/Makefile.amd64

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/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.31 src/sys/arch/amd64/conf/Makefile.amd64:1.32
--- src/sys/arch/amd64/conf/Makefile.amd64:1.31	Fri May 20 13:18:42 2011
+++ src/sys/arch/amd64/conf/Makefile.amd64	Fri May 20 13:19:59 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.amd64,v 1.31 2011/05/20 13:18:42 joerg Exp $
+#	$NetBSD: Makefile.amd64,v 1.32 2011/05/20 13:19:59 joerg Exp $
 
 # Makefile for NetBSD
 #
@@ -37,7 +37,6 @@
 CPPFLAGS+=	-Damd64 -Dx86_64
 CFLAGS+=	-mcmodel=kernel
 CFLAGS+=	-mno-red-zone
-AFLAGS+=	-x assembler-with-cpp
 
 ##
 ## (3) libkern and compat



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

2011-05-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 20 13:21:19 UTC 2011

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

Log Message:
Really apply the -no-integrated-as only for clang.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amd64/conf/Makefile.amd64

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/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.32 src/sys/arch/amd64/conf/Makefile.amd64:1.33
--- src/sys/arch/amd64/conf/Makefile.amd64:1.32	Fri May 20 13:19:59 2011
+++ src/sys/arch/amd64/conf/Makefile.amd64	Fri May 20 13:21:19 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.amd64,v 1.32 2011/05/20 13:19:59 joerg Exp $
+#	$NetBSD: Makefile.amd64,v 1.33 2011/05/20 13:21:19 joerg Exp $
 
 # Makefile for NetBSD
 #
@@ -63,10 +63,10 @@
 spl.o: ${AMD64}/amd64/spl.S assym.h
 	${NORMAL_S}
 
-AFLAGS.locore.S=		-no-integrated-as
-AFLAGS.mptramp.S=		-no-integrated-as
-AFLAGS.linux32_sigcode.S=	-no-integrated-as
-AFLAGS.netbsd32_sigcode.S=	-no-integrated-as
+AFLAGS.locore.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} -I${.CURDIR}
+AFLAGS.mptramp.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} -I${.CURDIR}
+AFLAGS.linux32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} -I${.CURDIR}
+AFLAGS.netbsd32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} -I${.CURDIR}
 
 ##
 ## (5) link settings



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

2011-05-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 20 13:21:54 UTC 2011

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

Log Message:
Drop redundant -I.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amd64/conf/Makefile.amd64

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/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.33 src/sys/arch/amd64/conf/Makefile.amd64:1.34
--- src/sys/arch/amd64/conf/Makefile.amd64:1.33	Fri May 20 13:21:19 2011
+++ src/sys/arch/amd64/conf/Makefile.amd64	Fri May 20 13:21:54 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.amd64,v 1.33 2011/05/20 13:21:19 joerg Exp $
+#	$NetBSD: Makefile.amd64,v 1.34 2011/05/20 13:21:54 joerg Exp $
 
 # Makefile for NetBSD
 #
@@ -63,10 +63,10 @@
 spl.o: ${AMD64}/amd64/spl.S assym.h
 	${NORMAL_S}
 
-AFLAGS.locore.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} -I${.CURDIR}
-AFLAGS.mptramp.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} -I${.CURDIR}
-AFLAGS.linux32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} -I${.CURDIR}
-AFLAGS.netbsd32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} -I${.CURDIR}
+AFLAGS.locore.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:}
+AFLAGS.mptramp.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:}
+AFLAGS.linux32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:}
+AFLAGS.netbsd32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:}
 
 ##
 ## (5) link settings



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

2011-05-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 20 13:32:35 UTC 2011

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

Log Message:
Be more explicit that the w part of %r11 is meant.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 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.64 src/sys/arch/amd64/amd64/locore.S:1.65
--- src/sys/arch/amd64/amd64/locore.S:1.64	Mon Dec 20 00:25:24 2010
+++ src/sys/arch/amd64/amd64/locore.S	Fri May 20 13:32:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.64 2010/12/20 00:25:24 matt Exp $	*/
+/*	$NetBSD: locore.S,v 1.65 2011/05/20 13:32:35 joerg Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -1132,8 +1132,8 @@
 	swapgs
 #endif
 	INTR_RESTORE_GPRS
-	movw	$(LSEL(LUDATA_SEL, SEL_UPL)),%r11
-	movw	%r11,%ds
+	movw	$(LSEL(LUDATA_SEL, SEL_UPL)), %r11w
+	movw	%r11w,%ds
 	addq	$TF_REGSIZE+16,%rsp	/* + T_xxx and error code */
 #ifndef XEN
 	popq	%rcx	/* return rip */



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

2011-05-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 20 13:33:11 UTC 2011

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

Log Message:
The %dx argument of in/out is not a memory reference, so don't use it as
such.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amd64/amd64/busfunc.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/busfunc.S
diff -u src/sys/arch/amd64/amd64/busfunc.S:1.9 src/sys/arch/amd64/amd64/busfunc.S:1.10
--- src/sys/arch/amd64/amd64/busfunc.S:1.9	Wed May  5 16:53:57 2010
+++ src/sys/arch/amd64/amd64/busfunc.S	Fri May 20 13:33:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: busfunc.S,v 1.9 2010/05/05 16:53:57 dyoung Exp $	*/
+/*	$NetBSD: busfunc.S,v 1.10 2011/05/20 13:33:11 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
 	movq	%rcx, %rdi
 	movq	%r8, %rcx
 	rep
-	insb	(%dx), %es:(%rdi)
+	insb	%dx, %es:(%rdi)
 	ret
 	.align	16
 1:
@@ -192,7 +192,7 @@
 	movq	%rcx, %rdi
 	movq	%r8, %rcx
 	rep
-	insw	(%dx), %es:(%rdi)
+	insw	%dx, %es:(%rdi)
 	ret
 	.align	16
 1:
@@ -214,7 +214,7 @@
 	movq	%rcx, %rdi
 	movq	%r8, %rcx
 	rep
-	insl	(%dx), %es:(%rdi)
+	insl	%dx, %es:(%rdi)
 	ret
 	.align	16
 1:
@@ -258,7 +258,7 @@
 	movq	%rcx, %rsi
 	movq	%r8, %rcx
 	rep
-	outsb	%ds:(%rsi), (%dx)
+	outsb	%ds:(%rsi), %dx
 	ret
 	.align	16
 1:
@@ -280,7 +280,7 @@
 	movq	%rcx, %rsi
 	movq	%r8, %rcx
 	rep
-	outsw	%ds:(%rsi), (%dx)
+	outsw	%ds:(%rsi), %dx
 	ret
 	.align	16
 1:
@@ -302,7 +302,7 @@
 	movq	%rcx, %rsi
 	movq	%r8, %rcx
 	rep
-	outsl	%ds:(%rsi), (%dx)
+	outsl	%ds:(%rsi), %dx
 	ret
 	.align	16
 1:



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

2011-04-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Mon Apr  4 21:35:31 UTC 2011

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

Log Message:
Don't need x86_stub.c here, we'll pick it up from files.x86.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amd64/conf/files.amd64

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/files.amd64
diff -u src/sys/arch/amd64/conf/files.amd64:1.70 src/sys/arch/amd64/conf/files.amd64:1.71
--- src/sys/arch/amd64/conf/files.amd64:1.70	Sun Apr  3 22:29:26 2011
+++ src/sys/arch/amd64/conf/files.amd64	Mon Apr  4 21:35:31 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amd64,v 1.70 2011/04/03 22:29:26 dyoung Exp $
+#	$NetBSD: files.amd64,v 1.71 2011/04/04 21:35:31 dyoung Exp $
 #
 # new style config file for amd64 architecture
 #
@@ -111,9 +111,6 @@
 # TSC timecounter support
 file	arch/x86/x86/tsc.c
 
-# Stubs for x86 routines not included in the system
-file	arch/x86/x86/x86_stub.c
-
 # attribute used to represent the keyboard controller
 # XXX should be a real device
 define	pckbcport { [irq = -1], [port = -1] }



CVS commit: src/sys/arch/amd64

2011-03-18 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Mar 18 19:46:20 UTC 2011

Modified Files:
src/sys/arch/amd64: Makefile

Log Message:
Fix tags target.


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

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/Makefile
diff -u src/sys/arch/amd64/Makefile:1.6 src/sys/arch/amd64/Makefile:1.7
--- src/sys/arch/amd64/Makefile:1.6	Wed Apr 28 20:22:46 2010
+++ src/sys/arch/amd64/Makefile	Fri Mar 18 19:46:19 2011
@@ -1,12 +1,20 @@
-#	$NetBSD: Makefile,v 1.6 2010/04/28 20:22:46 dyoung Exp $
+#	$NetBSD: Makefile,v 1.7 2011/03/18 19:46:19 dyoung Exp $
 
 # Makefile for amd64 tags file and boot blocks
 
 TAMD64=		${SYSDIR}/arch/amd64/tags
 SAMD64=		${SYSDIR}/arch/amd64/amd64/*.[ch] \
-		${SYSDIR}/arch/amd64/include/*.h
-AAMD64=		${SYSDIR}/arch/amd64/amd64/*.S
-
+		${SYSDIR}/arch/amd64/include/*.h \
+		${SYSDIR}/external/isc/atheros_hal/dist/*.[ch] \
+		${SYSDIR}/external/isc/atheros_hal/dist/*/*.[ch] \
+		${SYSDIR}/external/isc/atheros_hal/ic/*.[ch]
+SAMD64+=	${SYSDIR}/arch/x86/x86/*.[ch] \
+		${SYSDIR}/arch/x86/acpi/*.[ch] \
+		${SYSDIR}/arch/x86/include/*.h \
+		${SYSDIR}/arch/x86/isa/*.[ch] \
+		${SYSDIR}/arch/x86/pci/*.[ch]
+AAMD64=		${SYSDIR}/arch/amd64/amd64/*.S \
+		${SYSDIR}/arch/amd64/acpi/*.S
 # Directories in which to place tags links
 DAMD64=		amd64 isa include pci
 
@@ -20,7 +28,7 @@
 	-${FINDCOMM} | xargs ctags -wadtf ${TAMD64}
 	egrep ^ENTRY(.*)|^ALTENTRY(.*) ${AAMD64} | \
 	${TOOL_SED} -e \
-		s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/; \
+		s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3	\1	/^\2(\3\4$$/; \
 		 ${TAMD64}
 	sort -o ${TAMD64} ${TAMD64}
 



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

2011-03-06 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Mon Mar  7 02:24:57 UTC 2011

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

Log Message:
Use macros clts/stts instead of directly manipulating CR0 flags.
Expose fpuinit to XEN build. (remove #ifdef XEN)


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amd64/amd64/fpu.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/fpu.c
diff -u src/sys/arch/amd64/amd64/fpu.c:1.33 src/sys/arch/amd64/amd64/fpu.c:1.34
--- src/sys/arch/amd64/amd64/fpu.c:1.33	Mon Dec 20 00:25:24 2010
+++ src/sys/arch/amd64/amd64/fpu.c	Mon Mar  7 02:24:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.33 2010/12/20 00:25:24 matt Exp $	*/
+/*	$NetBSD: fpu.c,v 1.34 2011/03/07 02:24:57 cherry Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.  All
@@ -100,7 +100,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fpu.c,v 1.33 2010/12/20 00:25:24 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: fpu.c,v 1.34 2011/03/07 02:24:57 cherry Exp $);
 
 #include opt_multiprocessor.h
 
@@ -155,18 +155,16 @@
 void fpudna(struct cpu_info *);
 static int x86fpflags_to_ksiginfo(uint32_t);
 
-#ifndef XEN
 /*
  * Init the FPU.
  */
 void
 fpuinit(struct cpu_info *ci)
 {
-	lcr0(rcr0()  ~(CR0_EM|CR0_TS));
+	clts();
 	fninit();
-	lcr0(rcr0() | (CR0_TS));
+	stts();
 }
-#endif
 
 /*
  * Record the FPU state and reinitialize it all except for the control word.



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

2011-03-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Mar  4 03:34:24 UTC 2011

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

Log Message:
Reduce MAXSSIZ to 64MB, otherwise netbsd32 binaries crash in ld.elf_so,
including the trivial main(){}. Add a warning to not modify this without
testing compatibility mode.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/amd64/include/vmparam.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/vmparam.h
diff -u src/sys/arch/amd64/include/vmparam.h:1.25 src/sys/arch/amd64/include/vmparam.h:1.26
--- src/sys/arch/amd64/include/vmparam.h:1.25	Thu Feb 17 18:07:50 2011
+++ src/sys/arch/amd64/include/vmparam.h	Fri Mar  4 03:34:24 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.25 2011/02/17 18:07:50 drochner Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.26 2011/03/04 03:34:24 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -82,8 +82,9 @@
 #ifndef	DFLSSIZ
 #define	DFLSSIZ		(4*1024*1024)		/* initial stack size limit */
 #endif
+/* Warning: Do not change this constant without testing netbsd32! */
 #ifndef	MAXSSIZ
-#define	MAXSSIZ		(128*1024*1024)		/* max stack size */
+#define	MAXSSIZ		(64*1024*1024)		/* max stack size */
 #endif
 
 /*



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

2011-02-22 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Feb 23 00:46:29 UTC 2011

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

Log Message:
add alc@pci


To generate a diff of this commit:
cvs rdiff -u -r1.311 -r1.312 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.311 src/sys/arch/amd64/conf/GENERIC:1.312
--- src/sys/arch/amd64/conf/GENERIC:1.311	Mon Feb 21 16:24:29 2011
+++ src/sys/arch/amd64/conf/GENERIC	Wed Feb 23 00:46:29 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.311 2011/02/21 16:24:29 pooka Exp $
+# $NetBSD: GENERIC,v 1.312 2011/02/23 00:46:29 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.311 $
+#ident 		GENERIC-$Revision: 1.312 $
 
 maxusers	64		# estimated number of users
 
@@ -659,6 +659,7 @@
 
 # PCI network interfaces
 age*	at pci? dev ? function ?	# Attansic/Atheros L1 Gigabit Ethernet
+alc*	at pci? dev ? function ?	# Attansic/Atheros L1C/L2C Ethernet
 ale*	at pci? dev ? function ?	# Attansic/Atheros L1E Ethernet
 an*	at pci? dev ? function ?	# Aironet PC4500/PC4800 (802.11)
 ath*	at pci? dev ? function ?	# Atheros 5210/5211/5212 802.11



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

2011-02-22 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Feb 23 03:31:49 UTC 2011

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

Log Message:
CP error


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/amd64/amd64/netbsd32_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/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.71 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.72
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.71	Wed Feb 23 02:58:38 2011
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Wed Feb 23 03:31:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.71 2011/02/23 02:58:38 joerg Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.72 2011/02/23 03:31:49 joerg Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.71 2011/02/23 02:58:38 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.72 2011/02/23 03:31:49 joerg Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -870,7 +870,7 @@
 			fpusave_lwp(l, false);
 		}
 		memcpy(pcb-pcb_savefpu.fp_fxsave, mcp-__fpregs,
-+		sizeof (pcb-pcb_savefpu.fp_fxsave));
+		sizeof (pcb-pcb_savefpu.fp_fxsave));
 		/* If not set already. */
 		l-l_md.md_flags |= MDP_USEDFPU;
 	}



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

2011-02-21 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb 21 16:24:30 UTC 2011

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

Log Message:
Put coredumps back as a built-in.  Until it can autoload or something,
there's no point in causing user-visible (and test-visible)
regressions.


To generate a diff of this commit:
cvs rdiff -u -r1.310 -r1.311 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.310 src/sys/arch/amd64/conf/GENERIC:1.311
--- src/sys/arch/amd64/conf/GENERIC:1.310	Sun Feb 20 13:42:45 2011
+++ src/sys/arch/amd64/conf/GENERIC	Mon Feb 21 16:24:29 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.310 2011/02/20 13:42:45 jruoho Exp $
+# $NetBSD: GENERIC,v 1.311 2011/02/21 16:24:29 pooka Exp $
 #
 # GENERIC machine description file
 #
@@ -22,11 +22,10 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.310 $
+#ident 		GENERIC-$Revision: 1.311 $
 
 maxusers	64		# estimated number of users
 
-no options 	COREDUMP	# coredump support, built as module(7)
 # Common binary formats are statically compiled in by default.
 options 	EXEC_ELF32	# exec ELF 32-bits binaries
 #no options 	EXEC_ELF64	# exec ELF 64-bits binaries



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

2011-02-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Feb 22 05:07:36 UTC 2011

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

Log Message:
Be explicit about the member of the fld family wanted here.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/amd64/cpufunc.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/cpufunc.S
diff -u src/sys/arch/amd64/amd64/cpufunc.S:1.17 src/sys/arch/amd64/amd64/cpufunc.S:1.18
--- src/sys/arch/amd64/amd64/cpufunc.S:1.17	Wed Jul  7 01:14:52 2010
+++ src/sys/arch/amd64/amd64/cpufunc.S	Tue Feb 22 05:07:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.S,v 1.17 2010/07/07 01:14:52 chs Exp $	*/
+/*	$NetBSD: cpufunc.S,v 1.18 2011/02/22 05:07:36 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -427,7 +427,7 @@
 
 ENTRY(fldummy)
 	ffree	%st(7)
-	fld	(%rdi)
+	flds	(%rdi)
 	ret
 
 ENTRY(x86_ldmxcsr)



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

2011-02-21 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Tue Feb 22 07:12:29 UTC 2011

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

Log Message:
Fix build in admittedly quixotic case with IPMI but no PCI or ACPI.
(ACPI currently doesn't work without PCI, fwiw.)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/amd64/mainbus.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/mainbus.c
diff -u src/sys/arch/amd64/amd64/mainbus.c:1.31 src/sys/arch/amd64/amd64/mainbus.c:1.32
--- src/sys/arch/amd64/amd64/mainbus.c:1.31	Wed Apr 28 19:17:03 2010
+++ src/sys/arch/amd64/amd64/mainbus.c	Tue Feb 22 07:12:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.31 2010/04/28 19:17:03 dyoung Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.32 2011/02/22 07:12:29 dholland Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.31 2010/04/28 19:17:03 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.32 2011/02/22 07:12:29 dholland Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -149,9 +149,11 @@
 void
 mainbus_attach(device_t parent, device_t self, void *aux)
 {
+#if NPCI  0 || NACPICA  0 || NIPMI  0
+	union mainbus_attach_args mba;
+#endif
 #if NPCI  0
 	int mode;
-	union mainbus_attach_args mba;
 #endif
 #if NACPICA  0
 	int acpi_present = 0;



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

2011-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 18 18:00:52 UTC 2011

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

Log Message:
fix misinterpretation of REX prefixes where use of the accumulator
as operand is hardwired into the instruction code,
mostly from Wolfgang Stukenbrock per PR port-amd64/44405


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 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.13 src/sys/arch/amd64/amd64/db_disasm.c:1.14
--- src/sys/arch/amd64/amd64/db_disasm.c:1.13	Sat Mar 14 21:04:03 2009
+++ src/sys/arch/amd64/amd64/db_disasm.c	Fri Feb 18 18:00:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.13 2009/03/14 21:04:03 dsl Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.14 2011/02/18 18:00:52 drochner Exp $	*/
 
 /* 
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.13 2009/03/14 21:04:03 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.14 2011/02/18 18:00:52 drochner Exp $);
 
 #ifndef _KERNEL
 #include stubs.h
@@ -1393,11 +1393,9 @@
 		case Si:
 			db_printf(%s, db_seg_reg[f_reg(inst)]);
 			break;
-		case A: {
-			int ext = ((rex  REX_w) != 0);
-			db_printf(%s, db_reg[ext][size][0]);	/* acc */
+		case A:
+			db_printf(%s, db_reg[0][size][0]);	/* acc */
 			break;
-		}
 		case BX:
 			if (seg)
 db_printf(%s:, seg);



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

2011-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 18 23:38:58 UTC 2011

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

Log Message:
add ifmpls since MPLS was added


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 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.307 src/sys/arch/amd64/conf/GENERIC:1.308
--- src/sys/arch/amd64/conf/GENERIC:1.307	Wed Feb 16 15:23:21 2011
+++ src/sys/arch/amd64/conf/GENERIC	Fri Feb 18 18:38:58 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.307 2011/02/16 20:23:21 jym Exp $
+# $NetBSD: GENERIC,v 1.308 2011/02/18 23:38:58 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.307 $
+#ident 		GENERIC-$Revision: 1.308 $
 
 maxusers	64		# estimated number of users
 
@@ -1131,6 +1131,7 @@
 #pseudo-device	carp			# Common Address Redundancy Protocol
 pseudo-device	ipfilter		# IP filter (firewall) and NAT
 pseudo-device	loop			# network loopback
+#pseudo-device	ifmpls			# MPLS pseudo-interface 
 pseudo-device	ppp			# Point-to-Point Protocol
 pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
 pseudo-device	sl			# Serial Line IP



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

2011-02-17 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Thu Feb 17 18:07:51 UTC 2011

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

Log Message:
make stack size limit (both initial and maximum) for native code
the double of that in 32-but emul mode, so that code which works
in emulation (or on the i386 port) will likely not overflow the
stack if built as native 64-bit program
This is still very conservative.
(before, the max stack size was natively even less than for 32bit emul)


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amd64/include/vmparam.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/vmparam.h
diff -u src/sys/arch/amd64/include/vmparam.h:1.24 src/sys/arch/amd64/include/vmparam.h:1.25
--- src/sys/arch/amd64/include/vmparam.h:1.24	Sun Nov 14 13:33:21 2010
+++ src/sys/arch/amd64/include/vmparam.h	Thu Feb 17 18:07:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.24 2010/11/14 13:33:21 uebayasi Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.25 2011/02/17 18:07:50 drochner Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -80,10 +80,10 @@
 #define	MAXDSIZ		(8L*1024*1024*1024)	/* max data size */
 #endif
 #ifndef	DFLSSIZ
-#define	DFLSSIZ		(2*1024*1024)		/* initial stack size limit */
+#define	DFLSSIZ		(4*1024*1024)		/* initial stack size limit */
 #endif
 #ifndef	MAXSSIZ
-#define	MAXSSIZ		(32*1024*1024)		/* max stack size */
+#define	MAXSSIZ		(128*1024*1024)		/* max stack size */
 #endif
 
 /*



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

2011-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 09:57:57 UTC 2011

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

Log Message:
Add (commented) aps(4) from i386 GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 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.305 src/sys/arch/amd64/conf/GENERIC:1.306
--- src/sys/arch/amd64/conf/GENERIC:1.305	Wed Feb 16 03:16:57 2011
+++ src/sys/arch/amd64/conf/GENERIC	Wed Feb 16 09:57:57 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.305 2011/02/16 03:16:57 jym Exp $
+# $NetBSD: GENERIC,v 1.306 2011/02/16 09:57:57 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.305 $
+#ident 		GENERIC-$Revision: 1.306 $
 
 maxusers	64		# estimated number of users
 
@@ -476,6 +476,9 @@
 #dbcool* at iic? addr 0x2D		# Tyan S2881
 #dbcool* at iic? addr 0x2E		# Tyan S2882-D
 
+# IBM Thinkpad Active Protection System
+#aps0 	at isa? port 0x1600
+
 # Fintek Super I/O with hardware monitor
 #finsio0 	at isa? port 0x4e
 



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

2011-02-16 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Wed Feb 16 20:23:21 UTC 2011

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

Log Message:
Per mrg@ request, add MFS as default builtin, for things like init(8).

XXX should be replaced by TMPFS eventually.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/amd64/conf/INSTALL

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.306 src/sys/arch/amd64/conf/GENERIC:1.307
--- src/sys/arch/amd64/conf/GENERIC:1.306	Wed Feb 16 09:57:57 2011
+++ src/sys/arch/amd64/conf/GENERIC	Wed Feb 16 20:23:21 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.306 2011/02/16 09:57:57 jruoho Exp $
+# $NetBSD: GENERIC,v 1.307 2011/02/16 20:23:21 jym Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.306 $
+#ident 		GENERIC-$Revision: 1.307 $
 
 maxusers	64		# estimated number of users
 
@@ -139,12 +139,12 @@
 #options 	DKWEDGE_METHOD_MBR	# Support MBR partitions as wedges
 
 file-system 	FFS		# UFS
+file-system	MFS		# memory file system
 file-system 	NFS		# Network File System client
 file-system	TMPFS		# Efficient memory file-system
 # File systems, built as module(7)s by default
 #file-system	EXT2FS		# second extended file system (linux)
 #file-system	LFS		# log-structured file system
-#file-system	MFS		# memory file system
 #file-system	NTFS		# Windows/NT file system (experimental)
 #file-system	CD9660		# ISO 9660 + Rock Ridge file system
 #file-system	MSDOSFS		# MS-DOS file system

Index: src/sys/arch/amd64/conf/INSTALL
diff -u src/sys/arch/amd64/conf/INSTALL:1.84 src/sys/arch/amd64/conf/INSTALL:1.85
--- src/sys/arch/amd64/conf/INSTALL:1.84	Wed Feb 16 03:16:57 2011
+++ src/sys/arch/amd64/conf/INSTALL	Wed Feb 16 20:23:21 2011
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.84 2011/02/16 03:16:57 jym Exp $
+# $NetBSD: INSTALL,v 1.85 2011/02/16 20:23:21 jym Exp $
 #
 #	INSTALL - Installation kernel.
 #
@@ -7,13 +7,13 @@
 
 include	arch/amd64/conf/GENERIC
 
-#ident 		INSTALL-$Revision: 1.84 $
+#ident 		INSTALL-$Revision: 1.85 $
 
 # INSTALL kernels do not have access to module(7)s. Compile some
 # file-systems statically.
 file-system	EXT2FS		# second extended file system (linux)
 file-system	LFS		# log-structured file system
-file-system	MFS		# memory file system
+#file-system	MFS		# memory file system
 file-system	NTFS		# Windows/NT file system (experimental)
 file-system	CD9660		# ISO 9660 + Rock Ridge file system
 file-system	MSDOSFS		# MS-DOS file system



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

2011-02-15 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Wed Feb 16 03:16:58 UTC 2011

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

Log Message:
Build certain file-systems and options(7) as module(7). 32 and 64 bits
support are still builtin, as well as FFS, NFS, TMPFS, and most COMPAT
code. Saves approx. 750kiB.

Reflect this in INSTALL kernel, where we have to support more file systems
statically.

See http://mail-index.netbsd.org/port-amd64/2011/02/13/msg001318.html


To generate a diff of this commit:
cvs rdiff -u -r1.304 -r1.305 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/amd64/conf/INSTALL

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.304 src/sys/arch/amd64/conf/GENERIC:1.305
--- src/sys/arch/amd64/conf/GENERIC:1.304	Mon Feb 14 08:50:39 2011
+++ src/sys/arch/amd64/conf/GENERIC	Wed Feb 16 03:16:57 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.304 2011/02/14 08:50:39 hannken Exp $
+# $NetBSD: GENERIC,v 1.305 2011/02/16 03:16:57 jym Exp $
 #
 # GENERIC machine description file
 #
@@ -22,10 +22,16 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.304 $
+#ident 		GENERIC-$Revision: 1.305 $
 
 maxusers	64		# estimated number of users
 
+no options 	COREDUMP	# coredump support, built as module(7)
+# Common binary formats are statically compiled in by default.
+options 	EXEC_ELF32	# exec ELF 32-bits binaries
+#no options 	EXEC_ELF64	# exec ELF 64-bits binaries
+#no options 	EXEC_SCRIPT	# exec #! scripts
+
 # delay between rebooting ... message and hardware reset, in milliseconds
 #options 	CPURESET_DELAY=2000
 
@@ -65,6 +71,8 @@
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
 #options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
+no options	AIO		# POSIX asynchronous I/O, built as a module(7)
+no options	MQUEUE		# POSIX messsage queues, built as a module(7)
 
 options 	MODULAR		# new style module(7) framework
 options 	USERCONF	# userconf(4) support
@@ -119,9 +127,8 @@
 
 options 	COMPAT_OSSAUDIO
 options 	COMPAT_NETBSD32
-options 	COMPAT_LINUX
-options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
-options 	EXEC_ELF32
+#options 	COMPAT_LINUX
+#options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
 options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 
 # Wedge support
@@ -131,29 +138,30 @@
 #options 	DKWEDGE_METHOD_BSDLABEL	# Support disklabel entries as wedges
 #options 	DKWEDGE_METHOD_MBR	# Support MBR partitions as wedges
 
-# File systems
 file-system 	FFS		# UFS
-file-system 	EXT2FS		# second extended file system (linux)
-file-system 	LFS		# log-structured file system
-file-system 	MFS		# memory file system
 file-system 	NFS		# Network File System client
-file-system 	NTFS		# Windows/NT file system (experimental)
-file-system 	CD9660		# ISO 9660 + Rock Ridge file system
-file-system 	MSDOSFS		# MS-DOS file system
-file-system 	FDESC		# /dev/fd
-file-system 	KERNFS		# /kern
-file-system 	NULLFS		# loopback file system
-file-system 	OVERLAY		# overlay file system
-file-system 	PROCFS		# /proc
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
-file-system 	SMBFS		# experimental - SMB/CIFS file-system
-file-system 	UMAPFS		# NULLFS + uid and gid remapping
-file-system 	UNION		# union file system
-file-system 	CODA		# Coda File System; also needs vcoda (below)
-file-system 	PTYFS		# /dev/pts/N support
-file-system 	TMPFS		# Efficient memory file-system
-#file-system 	UDF		# experimental - OSTA UDF CD/DVD file-system
-#file-system 	HFS		# experimental - Apple HFS+ (read-only)
+file-system	TMPFS		# Efficient memory file-system
+# File systems, built as module(7)s by default
+#file-system	EXT2FS		# second extended file system (linux)
+#file-system	LFS		# log-structured file system
+#file-system	MFS		# memory file system
+#file-system	NTFS		# Windows/NT file system (experimental)
+#file-system	CD9660		# ISO 9660 + Rock Ridge file system
+#file-system	MSDOSFS		# MS-DOS file system
+#file-system	FDESC		# /dev/fd
+#file-system	KERNFS		# /kern
+#file-system	NULLFS		# loopback file system
+#file-system	OVERLAY		# overlay file system
+#file-system	PROCFS		# /proc
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+#file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+#file-system	UNION		# union file system
+#file-system	CODA		# Coda File System; also needs vcoda (below)
+#file-system	PTYFS		# /dev/ptm support
+#file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
+#file-system	HFS		# experimental - Apple HFS+ (read-only)
+#file-system	NILFS		# experimental - NTT's NiLFS(2)
 
 # File system options
 options 	QUOTA		# UFS quotas
@@ -1137,9 +1145,9 @@
 pseudo-device	agr			# IEEE 

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

2011-02-12 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sun Feb 13 04:21:23 UTC 2011

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

Log Message:
Missing MPLS options (commented out).


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 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.302 src/sys/arch/amd64/conf/GENERIC:1.303
--- src/sys/arch/amd64/conf/GENERIC:1.302	Fri Feb 11 02:06:09 2011
+++ src/sys/arch/amd64/conf/GENERIC	Sun Feb 13 04:21:23 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.302 2011/02/11 02:06:09 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.303 2011/02/13 04:21:23 jym Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.302 $
+#ident 		GENERIC-$Revision: 1.303 $
 
 maxusers	64		# estimated number of users
 
@@ -175,6 +175,7 @@
 #options 	IPSEC_ESP	# IP security (encryption part; define w/IPSEC)
 #options 	IPSEC_NAT_T	# IPsec NAT traversal (NAT-T)
 #options 	IPSEC_DEBUG	# debug for IP security
+#options	MPLS		# MultiProtocol Label Switching (needs ifmpls)
 #options 	MROUTING	# IP multicast routing
 #options 	PIM		# Protocol Independent Multicast
 #options 	ISO,TPIP	# OSI



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

2011-02-10 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 11 02:06:10 UTC 2011

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

Log Message:
attach drm hw drivers to 'drm' not 'vga'


To generate a diff of this commit:
cvs rdiff -u -r1.301 -r1.302 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/amd64/conf/INSTALL

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.301 src/sys/arch/amd64/conf/GENERIC:1.302
--- src/sys/arch/amd64/conf/GENERIC:1.301	Sun Feb  6 23:25:16 2011
+++ src/sys/arch/amd64/conf/GENERIC	Fri Feb 11 02:06:09 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.301 2011/02/06 23:25:16 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.302 2011/02/11 02:06:09 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.301 $
+#ident 		GENERIC-$Revision: 1.302 $
 
 maxusers	64		# estimated number of users
 
@@ -374,14 +374,14 @@
 sysbeep0	at pcppi?
 
 # DRI driver
-i915drm*	at vga?		# Intel i915, i945 DRM driver
-mach64drm*	at vga?		# mach64 (3D Rage Pro, Rage) DRM driver
-mgadrm*		at vga?		# Matrox G[24]00, G[45]50 DRM driver
-r128drm*	at vga?		# ATI Rage 128 DRM driver
-radeondrm*	at vga?		# ATI Radeon DRM driver
-savagedrm*	at vga?		# S3 Savage DRM driver
-sisdrm*		at vga?		# SiS DRM driver
-tdfxdrm*	at vga?		# 3dfx (voodoo) DRM driver
+i915drm*	at drm?		# Intel i915, i945 DRM driver
+mach64drm*	at drm?		# mach64 (3D Rage Pro, Rage) DRM driver
+mgadrm*		at drm?		# Matrox G[24]00, G[45]50 DRM driver
+r128drm*	at drm?		# ATI Rage 128 DRM driver
+radeondrm*	at drm?		# ATI Radeon DRM driver
+savagedrm*	at drm?		# S3 Savage DRM driver
+sisdrm*		at drm?		# SiS DRM driver
+tdfxdrm*	at drm?		# 3dfx (voodoo) DRM driver
 
 # Cryptographic Devices
 

Index: src/sys/arch/amd64/conf/INSTALL
diff -u src/sys/arch/amd64/conf/INSTALL:1.82 src/sys/arch/amd64/conf/INSTALL:1.83
--- src/sys/arch/amd64/conf/INSTALL:1.82	Sun Aug  9 21:32:16 2009
+++ src/sys/arch/amd64/conf/INSTALL	Fri Feb 11 02:06:09 2011
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.82 2009/08/09 21:32:16 christos Exp $
+# $NetBSD: INSTALL,v 1.83 2011/02/11 02:06:09 jmcneill Exp $
 #
 #	INSTALL - Installation kernel.
 #
@@ -7,7 +7,7 @@
 
 include	arch/amd64/conf/GENERIC
 
-#ident 		INSTALL-$Revision: 1.82 $
+#ident 		INSTALL-$Revision: 1.83 $
 
 no options	MEMORY_DISK_DYNAMIC
 options 	MEMORY_DISK_IS_ROOT # force root on memory disk
@@ -17,11 +17,11 @@
 
 no options	MTRR
 # DRI driver
-no i915drm*	at vga?		# Intel i915, i945 DRM driver
-no mach64drm*	at vga?		# mach64 (3D Rage Pro, Rage) DRM driver
-no mgadrm*	at vga?		# Matrox G[24]00, G[45]50 DRM driver
-no r128drm*	at vga?		# ATI Rage 128 DRM driver
-no radeondrm*	at vga?		# ATI Radeon DRM driver
-no savagedrm*	at vga?		# S3 Savage DRM driver
-no sisdrm*	at vga?		# SiS DRM driver
-no tdfxdrm*	at vga?		# 3dfx (voodoo) DRM driver
+no i915drm*	at drm?		# Intel i915, i945 DRM driver
+no mach64drm*	at drm?		# mach64 (3D Rage Pro, Rage) DRM driver
+no mgadrm*	at drm?		# Matrox G[24]00, G[45]50 DRM driver
+no r128drm*	at drm?		# ATI Rage 128 DRM driver
+no radeondrm*	at drm?		# ATI Radeon DRM driver
+no savagedrm*	at drm?		# S3 Savage DRM driver
+no sisdrm*	at drm?		# SiS DRM driver
+no tdfxdrm*	at drm?		# 3dfx (voodoo) DRM driver



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

2011-01-26 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Jan 26 21:44:32 UTC 2011

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

Log Message:
Do mask the upper 16 bits, when sanity checking fs/gs register values.
Fix my own PR/43842.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/amd64/amd64/netbsd32_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/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.68 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.69
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.68	Wed Nov 17 18:22:17 2010
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Wed Jan 26 21:44:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.68 2010/11/17 18:22:17 dholland Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.69 2011/01/26 21:44:31 njoly Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.68 2010/11/17 18:22:17 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.69 2011/01/26 21:44:31 njoly Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -952,6 +952,12 @@
  * and rely on catching invalid user contexts on exit from the kernel.
  * These functions perform the needed checks.
  */
+
+#define	VALID_FS32(s) \
+(((s)  0x) == GSEL(GUFS_SEL, SEL_UPL))
+#define	VALID_GS32(s) \
+(((s)  0x) == GSEL(GUGS_SEL, SEL_UPL))
+
 static int
 check_sigcontext32(struct lwp *l, const struct netbsd32_sigcontext *scp)
 {
@@ -965,10 +971,10 @@
 	!VALID_USER_CSEL32(scp-sc_cs))
 		return EINVAL;
 	if (scp-sc_fs != 0  !VALID_USER_DSEL32(scp-sc_fs) 
-	!(scp-sc_fs == GSEL(GUFS_SEL, SEL_UPL)  pcb-pcb_fs != 0))
+	!(VALID_FS32(scp-sc_fs)  pcb-pcb_fs != 0))
 		return EINVAL;
 	if (scp-sc_gs != 0  !VALID_USER_DSEL32(scp-sc_gs) 
-	!(scp-sc_gs == GSEL(GUGS_SEL, SEL_UPL)  pcb-pcb_gs != 0))
+	!(VALID_GS32(scp-sc_gs)  pcb-pcb_gs != 0))
 		return EINVAL;
 	if (scp-sc_es != 0  !VALID_USER_DSEL32(scp-sc_es))
 		return EINVAL;
@@ -994,10 +1000,10 @@
 	!VALID_USER_CSEL32(gr[_REG32_CS]))
 		return EINVAL;
 	if (gr[_REG32_FS] != 0  !VALID_USER_DSEL32(gr[_REG32_FS]) 
-	!(gr[_REG32_FS] == GSEL(GUFS_SEL, SEL_UPL)  pcb-pcb_fs != 0))
+	!(VALID_FS32(gr[_REG32_FS])  pcb-pcb_fs != 0))
 		return EINVAL;
 	if (gr[_REG32_GS] != 0  !VALID_USER_DSEL32(gr[_REG32_GS]) 
-	!(gr[_REG32_GS] == GSEL(GUGS_SEL, SEL_UPL)  pcb-pcb_gs != 0))
+	!(VALID_GS32(gr[_REG32_GS])  pcb-pcb_gs != 0))
 		return EINVAL;
 	if (gr[_REG32_ES] != 0  !VALID_USER_DSEL32(gr[_REG32_ES]))
 		return EINVAL;



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

2011-01-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Jan  9 08:05:47 UTC 2011

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

Log Message:
Remove APM. (Already commented out.)


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 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.296 src/sys/arch/amd64/conf/GENERIC:1.297
--- src/sys/arch/amd64/conf/GENERIC:1.296	Wed Jan  5 20:08:12 2011
+++ src/sys/arch/amd64/conf/GENERIC	Sun Jan  9 08:05:47 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.296 2011/01/05 20:08:12 jruoho Exp $
+# $NetBSD: GENERIC,v 1.297 2011/01/09 08:05:47 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.296 $
+#ident 		GENERIC-$Revision: 1.297 $
 
 maxusers	64		# estimated number of users
 
@@ -312,16 +312,6 @@
 #wmihp*		at acpiwmibus?		# HP WMI mappings
 wmimsi*		at acpiwmibus?		# MSI WMI mappings
 
-#apm0	at mainbus0			# Advanced power management
-
-# Tuning for power management, see apm(4) for more details.
-#options 	APM_NO_IDLE		# Don't call BIOS CPU idle function
-#options 	APM_V10_ONLY		# Use only the APM 1.0 calls
-#options 	APM_NO_POWEROFF		# Don't power off on halt(8)
-#options 	APM_POWER_PRINT		# Print stats on the console
-#options 	APM_DISABLE_INTERRUPTS=0 # Don't disable interrupts
-
-
 # Basic Bus Support
 
 # PCI bus support



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

2010-12-22 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Dec 22 22:08:47 UTC 2010

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

Log Message:
__HAVE_CPU_INFO_FIRST - __HAVE_CPU_DATA_FIRST.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amd64/include/types.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/types.h
diff -u src/sys/arch/amd64/include/types.h:1.34 src/sys/arch/amd64/include/types.h:1.35
--- src/sys/arch/amd64/include/types.h:1.34	Wed Dec 22 04:15:02 2010
+++ src/sys/arch/amd64/include/types.h	Wed Dec 22 22:08:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.34 2010/12/22 04:15:02 christos Exp $	*/
+/*	$NetBSD: types.h,v 1.35 2010/12/22 22:08:47 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -78,7 +78,7 @@
 
 #define	__HAVE_DEVICE_REGISTER
 #define	__HAVE_CPU_COUNTER
-#define	__HAVE_CPU_INFO_FIRST
+#define	__HAVE_CPU_DATA_FIRST
 #define	__HAVE_MD_CPU_OFFLINE
 #define	__HAVE_SYSCALL_INTERN
 #define	__HAVE_MINIMAL_EMUL



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

2010-12-18 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sat Dec 18 13:53:34 UTC 2010

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

Log Message:
Free tables are already zeroed in xen_pmap_bootstrap. No need to
do it a second time in assembly code.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 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.62 src/sys/arch/amd64/amd64/locore.S:1.63
--- src/sys/arch/amd64/amd64/locore.S:1.62	Thu Oct 21 11:43:22 2010
+++ src/sys/arch/amd64/amd64/locore.S	Sat Dec 18 13:53:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.62 2010/10/21 11:43:22 yamt Exp $	*/
+/*	$NetBSD: locore.S,v 1.63 2010/12/18 13:53:34 jym Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -786,12 +786,6 @@
 	movq	%rax, %rsi
 	movq	%rsi,(_C_LABEL(lwp0)+L_PCB)	/* XXX L_PCB != uarea */
 	
-	xorq	%rax,%rax
-	movq	%rsi,%rdi
-	movq	$USPACE,%rcx
-	rep
-	stosb
-
 	/*
 	 * Set new stack and clear segments
 	 */
@@ -799,6 +793,7 @@
 	leaq	(USPACE-FRAMESIZE)(%rsi),%rsp
 	xorq	%rbp,%rbp
 
+	xorw	%ax,%ax
 	movw	%ax,%gs
 	movw	%ax,%fs
 	



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

2010-11-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 27 20:19:41 UTC 2010

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

Log Message:
add ihphy


To generate a diff of this commit:
cvs rdiff -u -r1.292 -r1.293 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.60 -r1.61 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/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.292 src/sys/arch/amd64/conf/GENERIC:1.293
--- src/sys/arch/amd64/conf/GENERIC:1.292	Tue Nov 23 06:13:53 2010
+++ src/sys/arch/amd64/conf/GENERIC	Sat Nov 27 15:19:41 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.292 2010/11/23 11:13:53 hannken Exp $
+# $NetBSD: GENERIC,v 1.293 2010/11/27 20:19:41 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.292 $
+#ident 		GENERIC-$Revision: 1.293 $
 
 maxusers	64		# estimated number of users
 
@@ -755,6 +755,7 @@
 gphyter* at mii? phy ?			# NS83861 Gig-E PHY
 icsphy* at mii? phy ?			# Integrated Circuit Systems ICS189x
 igphy*  at mii? phy ?			# Intel IGP01E1000
+ihphy*	at mii? phy ?			# Intel 82577 PHYs
 ikphy*	at mii? phy ?			# Intel 82563 PHYs
 inphy*	at mii? phy ?			# Intel 82555 PHYs
 iophy*	at mii? phy ?			# Intel 82553 PHYs

Index: src/sys/arch/amd64/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.60 src/sys/arch/amd64/conf/XEN3_DOM0:1.61
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.60	Tue Nov 23 06:13:54 2010
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Sat Nov 27 15:19:41 2010
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.60 2010/11/23 11:13:54 hannken Exp $
+# $NetBSD: XEN3_DOM0,v 1.61 2010/11/27 20:19:41 christos Exp $
 
 include 	arch/amd64/conf/std.xen
 
@@ -386,6 +386,7 @@
 gphyter* at mii? phy ?			# NS83861 Gig-E PHY
 icsphy* at mii? phy ?			# Integrated Circuit Systems ICS189x
 igphy*	at mii? phy ?			# Intel IGP01E1000
+ihphy*	at mii? phy ?			# Intel 82577 PHYs
 ikphy*	at mii? phy ?			# Intel 82563 PHYs
 inphy*	at mii? phy ?			# Intel 82555 PHYs
 iophy*	at mii? phy ?			# Intel 82553 PHYs



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

2010-11-17 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Nov 17 18:22:17 UTC 2010

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

Log Message:
Fix build with COMPAT_13.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/amd64/amd64/netbsd32_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/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.67 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.68
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.67	Sun Sep  5 20:52:38 2010
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Wed Nov 17 18:22:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.67 2010/09/05 20:52:38 chs Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.68 2010/11/17 18:22:17 dholland Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.67 2010/09/05 20:52:38 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.68 2010/11/17 18:22:17 dholland Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -1085,7 +1085,7 @@
 	/*
 	 * Check for security violations.
 	 */
-	error = check_sigcontext32((const struct netbsd32_sigcontext *)context, tf);
+	error = check_sigcontext32(l, (const struct netbsd32_sigcontext *)context);
 	if (error != 0)
 		return error;
 



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

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:12:28 UTC 2010

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

Log Message:
struct lwp * and struct proc * derefs.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 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.156 src/sys/arch/amd64/amd64/machdep.c:1.157
--- src/sys/arch/amd64/amd64/machdep.c:1.156	Fri Nov 12 13:18:56 2010
+++ src/sys/arch/amd64/amd64/machdep.c	Mon Nov 15 06:12:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.156 2010/11/12 13:18:56 uebayasi Exp $	*/
+/*	$NetBSD: machdep.c,v 1.157 2010/11/15 06:12:28 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.156 2010/11/12 13:18:56 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.157 2010/11/15 06:12:28 uebayasi Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -148,6 +148,8 @@
 #include sys/syscallargs.h
 #include sys/ksyms.h
 #include sys/device.h
+#include sys/lwp.h
+#include sys/proc.h
 
 #ifdef KGDB
 #include sys/kgdb.h



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

2010-11-10 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Nov 10 10:07:44 UTC 2010

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

Log Message:
spacetab

I went and wrote a gizmo to automate this a while back, but I seem to
have *lost* the thing. grr.


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 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.289 src/sys/arch/amd64/conf/GENERIC:1.290
--- src/sys/arch/amd64/conf/GENERIC:1.289	Fri Nov  5 10:28:21 2010
+++ src/sys/arch/amd64/conf/GENERIC	Wed Nov 10 10:07:44 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.289 2010/11/05 10:28:21 gsutre Exp $
+# $NetBSD: GENERIC,v 1.290 2010/11/10 10:07:44 dholland Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.289 $
+#ident 		GENERIC-$Revision: 1.290 $
 
 maxusers	64		# estimated number of users
 
@@ -66,7 +66,7 @@
 options 	SYSVSHM		# System V-like memory sharing
 #options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
 
-options		MODULAR		# new style module framework
+options 	MODULAR		# new style module framework
 options 	USERCONF	# userconf(4) support
 #options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
@@ -265,8 +265,8 @@
 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_BUS_FIXUP		# fixup PCI bus numbering
-#options	PCI_ADDR_FIXUP		# fixup PCI I/O addresses
+#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
 
@@ -611,7 +611,7 @@
 
 # ATA (IDE) bus support
 atabus* at ata?
-options	ATADEBUG
+options 	ATADEBUG
 
 # IDE drives
 # Flags are used only with controllers that support DMA operations
@@ -673,7 +673,7 @@
 gsip*	at pci? dev ? function ?	# NS83820 Gigabit Ethernet
 ipw*	at pci? dev ? function ?	# Intel PRO/Wireless 2100
 iwi*	at pci? dev ? function ?	# Intel PRO/Wireless 2200BG
-iwn*at pci? dev ? function ?# Intel PRO/Wireless 4965AGN
+iwn*	at pci? dev ? function ?	# Intel PRO/Wireless 4965AGN
 jme*	at pci? dev ? function ?	# JMicron JMC2[56]0 ethernet
 hme*	at pci? dev ? function ?	# Sun Microelectronics STP2002-STQ
 le*	at pci? dev ? function ?	# PCnet-PCI Ethernet
@@ -1108,8 +1108,8 @@
 pseudo-device	putter			# for puffs and pud
 
 pseudo-device	md		1	# memory disk device (ramdisk)
-options		MEMORY_DISK_HOOKS	# enable root ramdisk
-options		MEMORY_DISK_DYNAMIC	# loaded via kernel module
+options 	MEMORY_DISK_HOOKS	# enable root ramdisk
+options 	MEMORY_DISK_DYNAMIC	# loaded via kernel module
 
 pseudo-device	vnd			# disk-like interface to files
 #options 	VND_COMPRESSION		# compressed vnd(4)



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

2010-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  3 20:09:09 UTC 2010

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

Log Message:
add otus


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 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.287 src/sys/arch/amd64/conf/GENERIC:1.288
--- src/sys/arch/amd64/conf/GENERIC:1.287	Sun Oct 24 04:54:14 2010
+++ src/sys/arch/amd64/conf/GENERIC	Wed Nov  3 16:09:09 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.287 2010/10/24 08:54:14 jruoho Exp $
+# $NetBSD: GENERIC,v 1.288 2010/11/03 20:09:09 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.287 $
+#ident 		GENERIC-$Revision: 1.288 $
 
 maxusers	64		# estimated number of users
 
@@ -910,6 +910,7 @@
 
 # USB 802.11 adapters
 atu*	at uhub? port ?		# Atmel at76c50x 802.11b
+otus*	at uhub? port ?		# Atheros AR9001U
 ral*	at uhub? port ?		# Ralink Technology RT25x0 802.11a/b/g
 rum* 	at uhub? port ?		# Ralink Technology RT2501/RT2601 802.11a/b/g
 zyd*	at uhub? port ?		# Zydas ZD1211



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

2010-10-21 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Oct 21 11:22:55 UTC 2010

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

Log Message:
cpu_fsgs_zero: always clear tf_fs and tf_gs.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 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.150 src/sys/arch/amd64/amd64/machdep.c:1.151
--- src/sys/arch/amd64/amd64/machdep.c:1.150	Thu Oct 21 11:17:55 2010
+++ src/sys/arch/amd64/amd64/machdep.c	Thu Oct 21 11:22:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.150 2010/10/21 11:17:55 yamt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.151 2010/10/21 11:22:55 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.150 2010/10/21 11:17:55 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.151 2010/10/21 11:22:55 yamt Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -1863,6 +1863,8 @@
 		update_descriptor(curcpu()-ci_gdt[GUGS_SEL], zero);
 		kpreempt_enable();
 	} else {
+		tf-tf_fs = 0;
+		tf-tf_gs = 0;
 		pcb-pcb_fs = 0;
 		pcb-pcb_gs = 0;
 	}



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

2010-10-21 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Oct 21 11:27:46 UTC 2010

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

Log Message:
cpu_fsgs_zero: clear %fs and %gs even in the case of !PK_32.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 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.151 src/sys/arch/amd64/amd64/machdep.c:1.152
--- src/sys/arch/amd64/amd64/machdep.c:1.151	Thu Oct 21 11:22:55 2010
+++ src/sys/arch/amd64/amd64/machdep.c	Thu Oct 21 11:27:46 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.151 2010/10/21 11:22:55 yamt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.152 2010/10/21 11:27:46 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.151 2010/10/21 11:22:55 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.152 2010/10/21 11:27:46 yamt Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -1831,24 +1831,22 @@
 void
 cpu_fsgs_zero(struct lwp *l)
 {
-	struct trapframe *tf;
+	struct trapframe * const tf = l-l_md.md_regs;
 	struct pcb *pcb;
 	uint64_t zero = 0;
 
 	pcb = lwp_getpcb(l);
 	if (l == curlwp) {
-		tf = l-l_md.md_regs;
 		kpreempt_disable();
 		tf-tf_fs = 0;
 		tf-tf_gs = 0;
-		if (l-l_proc-p_flag  PK_32) {
-			setfs(0);
+		setfs(0);
 #ifndef XEN
-			setusergs(0);
+		setusergs(0);
 #else
-			HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, 0);
+		HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, 0);
 #endif
-		} else {
+		if ((l-l_proc-p_flag  PK_32) == 0) {
 #ifndef XEN
 			wrmsr(MSR_FSBASE, 0);
 			wrmsr(MSR_KERNELGSBASE, 0);



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

2010-10-21 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Oct 21 11:28:34 UTC 2010

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

Log Message:
cpu_setmcontext: add a comment


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 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.152 src/sys/arch/amd64/amd64/machdep.c:1.153
--- src/sys/arch/amd64/amd64/machdep.c:1.152	Thu Oct 21 11:27:46 2010
+++ src/sys/arch/amd64/amd64/machdep.c	Thu Oct 21 11:28:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.152 2010/10/21 11:27:46 yamt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.153 2010/10/21 11:28:34 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.152 2010/10/21 11:27:46 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.153 2010/10/21 11:28:34 yamt Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -1632,6 +1632,9 @@
 		if (error != 0)
 			return error;
 		/*
+		 * save and restore some values we don't want to change.
+		 * _FRAME_GREG(copy_to_tf) below overwrites them.
+		 *
 		 * XXX maybe inline this.
 		 */
 		rflags = tf-tf_rflags;



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

2010-10-21 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Oct 21 11:39:45 UTC 2010

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

Log Message:
Xsyscall: save %es before enabling interrupts.  otherwise it can be
clobbered by preemption.  PR/43903.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 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.58 src/sys/arch/amd64/amd64/locore.S:1.59
--- src/sys/arch/amd64/amd64/locore.S:1.58	Wed Jul  7 01:14:52 2010
+++ src/sys/arch/amd64/amd64/locore.S	Thu Oct 21 11:39:45 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.58 2010/07/07 01:14:52 chs Exp $	*/
+/*	$NetBSD: locore.S,v 1.59 2010/10/21 11:39:45 yamt Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -1085,12 +1085,12 @@
 	pushq	$(LSEL(LUDATA_SEL, SEL_UPL))	/* Known to be user ss */
 	pushq	%r15/* User space rsp */
 	movq	CPUVAR(SCRATCH),%r15
-	sti
 	subq	$TF_REGSIZE+(TF_RSP-TF_TRAPNO),%rsp
+	movw	%es,TF_ES(%rsp)
+	sti
 	INTR_SAVE_GPRS
 	movw	%fs,TF_FS(%rsp)
 	movw	%gs,TF_GS(%rsp)
-	movw	%es,TF_ES(%rsp)
 	movw	$(LSEL(LUDATA_SEL, SEL_UPL)),TF_DS(%rsp)
 	movq	%r11, TF_RFLAGS(%rsp)	/* old rflags from syscall insn */
 	movq	$(LSEL(LUCODE_SEL, SEL_UPL)), TF_CS(%rsp)



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

2010-10-21 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Oct 21 11:41:31 UTC 2010

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

Log Message:
Xsyscall: remove an unused label.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 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.59 src/sys/arch/amd64/amd64/locore.S:1.60
--- src/sys/arch/amd64/amd64/locore.S:1.59	Thu Oct 21 11:39:45 2010
+++ src/sys/arch/amd64/amd64/locore.S	Thu Oct 21 11:41:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.59 2010/10/21 11:39:45 yamt Exp $	*/
+/*	$NetBSD: locore.S,v 1.60 2010/10/21 11:41:31 yamt Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -1128,7 +1128,6 @@
 	jnz	9f
 	testl	$MDP_IRET, L_MD_FLAGS(%r14)
 	jne	iret_return;
-syscall_return:
 #ifdef DIAGNOSTIC
 	cmpl	$IPL_NONE,CPUVAR(ILEVEL)
 	jne	3f



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

2010-10-21 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Oct 21 11:42:27 UTC 2010

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

Log Message:
Xsyscall: remove a stale comment.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 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.60 src/sys/arch/amd64/amd64/locore.S:1.61
--- src/sys/arch/amd64/amd64/locore.S:1.60	Thu Oct 21 11:41:31 2010
+++ src/sys/arch/amd64/amd64/locore.S	Thu Oct 21 11:42:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.60 2010/10/21 11:41:31 yamt Exp $	*/
+/*	$NetBSD: locore.S,v 1.61 2010/10/21 11:42:26 yamt Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -1171,7 +1171,6 @@
 	call	_C_LABEL(do_pmap_load)
 	jmp	.Lsyscall_checkast	/* re-check ASTs */
 10:
-	/* Always returning to user mode here. */
 	CLEAR_ASTPENDING(%r14)
 	STI(si)
 	/* Pushed T_ASTFLT into tf_trapno on entry. */



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

2010-10-21 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Oct 21 11:43:23 UTC 2010

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

Log Message:
Xosyscall: sync with Xsyscall.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 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.61 src/sys/arch/amd64/amd64/locore.S:1.62
--- src/sys/arch/amd64/amd64/locore.S:1.61	Thu Oct 21 11:42:26 2010
+++ src/sys/arch/amd64/amd64/locore.S	Thu Oct 21 11:43:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.61 2010/10/21 11:42:26 yamt Exp $	*/
+/*	$NetBSD: locore.S,v 1.62 2010/10/21 11:43:22 yamt Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -1258,37 +1258,41 @@
 .Losyscall_checkast:
 	/* Check for ASTs on exit to user mode. */
 	CLI(si)
-	CHECK_ASTPENDING(%r14)
-	je	1f
-	/* Always returning to user mode here. */
-	CLEAR_ASTPENDING(%r14)
-	STI(si)
-	/* Pushed T_ASTFLT into tf_trapno on entry. */
-	movq	%rsp,%rdi
-	call	_C_LABEL(trap)
-	jmp	.Losyscall_checkast
-1:	CHECK_DEFERRED_SWITCH
+	movl	L_MD_ASTPENDING(%r14), %eax
+	orl	CPUVAR(WANT_PMAPLOAD), %eax
 	jnz	9f
 iret_return:
-#ifndef DIAGNOSTIC
-	INTRFASTEXIT
-#else /* DIAGNOSTIC */
+#ifdef DIAGNOSTIC
 	cmpl	$IPL_NONE,CPUVAR(ILEVEL)
 	jne	3f
+#endif
 	INTRFASTEXIT
-3:
-	STI(si)
-	movabsq	$4f, %rdi
+#ifdef DIAGNOSTIC
+3:	movabsq	$4f, %rdi
+	movl	TF_RAX(%rsp),%esi
+	movl	TF_RDI(%rsp),%edx
+	movl	%ebx,%ecx
+	movl	CPUVAR(ILEVEL),%r8d
 	xorq	%rax,%rax
 	call	_C_LABEL(printf)
 	movl	$IPL_NONE,%edi
 	call	_C_LABEL(spllower)
 	jmp	.Losyscall_checkast
-4:	.asciz	WARNING: SPL NOT LOWERED ON SYSCALL EXIT\n
-#endif /* DIAGNOSTIC */
-9:	STI(si)
+4:	.asciz	WARNING: SPL NOT LOWERED ON SYSCALL %d %d EXIT %x %x\n
+#endif
+9:
+	cmpl	$0, CPUVAR(WANT_PMAPLOAD)
+	jz	10f
+	STI(si)
 	call	_C_LABEL(do_pmap_load)
 	jmp	.Losyscall_checkast	/* re-check ASTs */
+10:
+	CLEAR_ASTPENDING(%r14)
+	STI(si)
+	/* Pushed T_ASTFLT into tf_trapno on entry. */
+	movq	%rsp,%rdi
+	call	_C_LABEL(trap)
+	jmp	.Losyscall_checkast	/* re-check ASTs */
 
 /*
  * void sse2_idlezero_page(void *pg)



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

2010-09-22 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Sep 22 16:16:52 UTC 2010

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

Log Message:
Avoid fault if acpi_softc is NULL at attempted power-off.
XXX at least some of this should be factored off into arch/x86.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 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.148 src/sys/arch/amd64/amd64/machdep.c:1.149
--- src/sys/arch/amd64/amd64/machdep.c:1.148	Sat Aug  7 20:07:25 2010
+++ src/sys/arch/amd64/amd64/machdep.c	Wed Sep 22 16:16:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.148 2010/08/07 20:07:25 jruoho Exp $	*/
+/*	$NetBSD: machdep.c,v 1.149 2010/09/22 16:16:51 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.148 2010/08/07 20:07:25 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.149 2010/09/22 16:16:51 jakllsch Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -697,8 +697,10 @@
 if ((howto  RB_POWERDOWN) == RB_POWERDOWN) {
 #ifndef XEN
 #if NACPICA  0
-		acpi_enter_sleep_state(acpi_softc, ACPI_STATE_S5);
-		printf(WARNING: powerdown failed!\n);
+		if (acpi_softc != NULL) {
+			acpi_enter_sleep_state(acpi_softc, ACPI_STATE_S5);
+			printf(WARNING: ACPI powerdown failed!\n);
+		}
 #endif
 #else /* XEN */
 		HYPERVISOR_shutdown();



CVS commit: src/sys/arch/amd64

2010-09-05 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep  5 20:14:40 UTC 2010

Modified Files:
src/sys/arch/amd64/amd64: netbsd32_machdep.c
src/sys/arch/amd64/include: segments.h

Log Message:
in check_mcontext32(), accept the LDT selector for 32-bit user code
as well as the GDT selector.  fixes PR 43835.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.20 -r1.21 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/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.65 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.66
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.65	Sun Aug  8 18:13:54 2010
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Sun Sep  5 20:14:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.65 2010/08/08 18:13:54 chs Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.66 2010/09/05 20:14:39 chs Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.65 2010/08/08 18:13:54 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.66 2010/09/05 20:14:39 chs Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -991,7 +991,7 @@
 	pcb = lwp_getpcb(l);
 
 	if (((gr[_REG32_EFL] ^ tf-tf_rflags)  PSL_USERSTATIC) != 0 ||
-	gr[_REG32_CS] != GSEL(GUCODE32_SEL, SEL_UPL))
+	!VALID_USER_CSEL32(gr[_REG32_CS]))
 		return EINVAL;
 	if (gr[_REG32_FS] != 0  !VALID_USER_DSEL32(gr[_REG32_FS]) 
 	!(gr[_REG32_FS] == GSEL(GUFS_SEL, SEL_UPL)  pcb-pcb_fs != 0))

Index: src/sys/arch/amd64/include/segments.h
diff -u src/sys/arch/amd64/include/segments.h:1.20 src/sys/arch/amd64/include/segments.h:1.21
--- src/sys/arch/amd64/include/segments.h:1.20	Wed Jul  7 01:14:52 2010
+++ src/sys/arch/amd64/include/segments.h	Sun Sep  5 20:14:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: segments.h,v 1.20 2010/07/07 01:14:52 chs Exp $	*/
+/*	$NetBSD: segments.h,v 1.21 2010/09/05 20:14:40 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -395,10 +395,8 @@
 #define VALID_USER_DSEL32(s) \
 (((s)  0x) == GSEL(GUDATA32_SEL, SEL_UPL) || \
  ((s)  0x) == LSEL(LUDATA32_SEL, SEL_UPL))
-#if 0 /* not used */
 #define VALID_USER_CSEL32(s) \
 ((s) == GSEL(GUCODE32_SEL, SEL_UPL) || (s) == LSEL(LUCODE32_SEL, SEL_UPL))
-#endif
 
 #define VALID_USER_CSEL(s) \
 ((s) == GSEL(GUCODE_SEL, SEL_UPL) || (s) == LSEL(LUCODE_SEL, SEL_UPL))



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

2010-09-05 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep  5 20:52:38 UTC 2010

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

Log Message:
accept the LDT selector in check_sigcontext32() too.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/amd64/amd64/netbsd32_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/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.66 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.67
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.66	Sun Sep  5 20:14:39 2010
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Sun Sep  5 20:52:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.66 2010/09/05 20:14:39 chs Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.67 2010/09/05 20:52:38 chs Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.66 2010/09/05 20:14:39 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.67 2010/09/05 20:52:38 chs Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -962,7 +962,7 @@
 	pcb = lwp_getpcb(curlwp);
 
 	if (((scp-sc_eflags ^ tf-tf_rflags)  PSL_USERSTATIC) != 0 ||
-	scp-sc_cs != GSEL(GUCODE32_SEL, SEL_UPL))
+	!VALID_USER_CSEL32(scp-sc_cs))
 		return EINVAL;
 	if (scp-sc_fs != 0  !VALID_USER_DSEL32(scp-sc_fs) 
 	!(scp-sc_fs == GSEL(GUFS_SEL, SEL_UPL)  pcb-pcb_fs != 0))



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

2010-08-08 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Aug  8 18:28:00 UTC 2010

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

Log Message:
add more (commented-out) spdmem instances for HP xw-series workstations.


To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 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.283 src/sys/arch/amd64/conf/GENERIC:1.284
--- src/sys/arch/amd64/conf/GENERIC:1.283	Fri Jul 23 00:43:20 2010
+++ src/sys/arch/amd64/conf/GENERIC	Sun Aug  8 18:28:00 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.283 2010/07/23 00:43:20 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.284 2010/08/08 18:28:00 chs Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.283 $
+#ident 		GENERIC-$Revision: 1.284 $
 
 maxusers	64		# estimated number of users
 
@@ -484,6 +484,10 @@
 #spdmem* at iic? addr 0x51
 #spdmem* at iic? addr 0x52
 #spdmem* at iic? addr 0x53
+#spdmem* at iic? addr 0x54
+#spdmem* at iic? addr 0x55
+#spdmem* at iic? addr 0x56
+#spdmem* at iic? addr 0x57
 
 # I2O devices
 iop*	at pci? dev ? function ?	# I/O processor



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

2010-07-31 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jul 31 18:38:33 UTC 2010

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

Log Message:
Add machdep.fpu_present, machdep.sse and machdep.sse2 sysctls for
compatibility with i386 and compat32.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 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.146 src/sys/arch/amd64/amd64/machdep.c:1.147
--- src/sys/arch/amd64/amd64/machdep.c:1.146	Wed Jul  7 01:14:52 2010
+++ src/sys/arch/amd64/amd64/machdep.c	Sat Jul 31 18:38:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.146 2010/07/07 01:14:52 chs Exp $	*/
+/*	$NetBSD: machdep.c,v 1.147 2010/07/31 18:38:32 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.146 2010/07/07 01:14:52 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.147 2010/07/31 18:38:32 joerg Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -500,6 +500,21 @@
 		   sysctl_machdep_diskinfo, 0, NULL, 0,
 		   CTL_MACHDEP, CPU_DISKINFO, CTL_EOL);
 	sysctl_createv(clog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT | CTLFLAG_IMMEDIATE,
+		   CTLTYPE_INT, fpu_present, NULL,
+		   NULL, 1, NULL, 0,
+		   CTL_MACHDEP, CPU_FPU_PRESENT, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT | CTLFLAG_IMMEDIATE,
+		   CTLTYPE_INT, sse, NULL,
+		   NULL, 1, NULL, 0,
+		   CTL_MACHDEP, CPU_SSE, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT | CTLFLAG_IMMEDIATE,
+		   CTLTYPE_INT, sse2, NULL,
+		   NULL, 1, NULL, 0,
+		   CTL_MACHDEP, CPU_SSE2, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT,
 		   CTLTYPE_QUAD, tsc_freq, NULL,
 		   NULL, 0, tsc_freq, 0,



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

2010-07-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 26 12:39:04 UTC 2010

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

Log Message:
follow suit with the i386, and correct the siginfo codes for integer overflow
and zerodivide.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/amd64/amd64/trap.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/trap.c
diff -u src/sys/arch/amd64/amd64/trap.c:1.63 src/sys/arch/amd64/amd64/trap.c:1.64
--- src/sys/arch/amd64/amd64/trap.c:1.63	Tue Jul  6 21:15:34 2010
+++ src/sys/arch/amd64/amd64/trap.c	Mon Jul 26 08:39:04 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.63 2010/07/07 01:15:34 chs Exp $	*/
+/*	$NetBSD: trap.c,v 1.64 2010/07/26 12:39:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.63 2010/07/07 01:15:34 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.64 2010/07/26 12:39:04 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -464,13 +464,15 @@
 		ksi.ksi_signo = SIGFPE;
 		ksi.ksi_trap = type  ~T_USER;
 		ksi.ksi_addr = (void *)frame-tf_rip;
-		switch (type ) {
+		switch (type) {
 		case T_BOUND|T_USER:
+			ksi.ksi_code = FPE_FLTSUB;
+			break;
 		case T_OFLOW|T_USER:
-			ksi.ksi_code = FPE_FLTOVF;
+			ksi.ksi_code = FPE_INTOVF;
 			break;
 		case T_DIVIDE|T_USER:
-			ksi.ksi_code = FPE_FLTDIV;
+			ksi.ksi_code = FPE_INTDIV;
 			break;
 		default:
 #ifdef DIAGNOSTIC



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

2010-07-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 24 17:43:47 UTC 2010

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

Log Message:
Pull i386 pte.h on amd64 for 32bit compat.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/include/pte.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/pte.h
diff -u src/sys/arch/amd64/include/pte.h:1.7 src/sys/arch/amd64/include/pte.h:1.8
--- src/sys/arch/amd64/include/pte.h:1.7	Tue Jul  6 20:50:34 2010
+++ src/sys/arch/amd64/include/pte.h	Sat Jul 24 17:43:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pte.h,v 1.7 2010/07/06 20:50:34 cegger Exp $	*/
+/*	$NetBSD: pte.h,v 1.8 2010/07/24 17:43:47 njoly Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -38,6 +38,8 @@
 #ifndef _AMD64_PTE_H_
 #define _AMD64_PTE_H_
 
+#ifdef __x86_64__
+
 /*
  * amd64 MMU hardware structure:
  *
@@ -132,4 +134,10 @@
 
 #include x86/pte.h
 
+#else   /*  !__x86_64__  */
+
+#include i386/pte.h
+
+#endif  /*  !__x86_64__  */
+
 #endif /* _AMD64_PTE_H_ */



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

2010-06-22 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Tue Jun 22 18:26:05 UTC 2010

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

Log Message:
Fix ucas_32/ucas_64 on amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 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.16 src/sys/arch/amd64/amd64/copy.S:1.17
--- src/sys/arch/amd64/amd64/copy.S:1.16	Fri Nov 27 03:23:04 2009
+++ src/sys/arch/amd64/amd64/copy.S	Tue Jun 22 18:26:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: copy.S,v 1.16 2009/11/27 03:23:04 rmind Exp $	*/
+/*	$NetBSD: copy.S,v 1.17 2010/06/22 18:26:05 rmind Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -501,7 +501,7 @@
 	/* Fail if kernel-space */
 	movq	$VM_MAXUSER_ADDRESS-8, %r8
 	cmpq	%r8, %rdi
-	ja	1f
+	ja	_C_LABEL(ucas_fault)
 	/* Label for fault handler */
 .Lucas64_start:
 	/* Perform the CAS */
@@ -518,9 +518,6 @@
 	xorq	%rax, %rax
 	/* Clear the fault handler */
 	movq	%rax, PCB_ONFAULT(%r8)
-1:
-	/* Failure case */
-	movq	$EFAULT, %rax
 	ret
 	DEFERRED_SWITCH_CALL
 
@@ -532,7 +529,7 @@
 	/* Fail if kernel-space */
 	movq	$VM_MAXUSER_ADDRESS-4, %r8
 	cmpq	%r8, %rdi
-	ja	1f
+	ja	_C_LABEL(ucas_fault)
 	/* Label for fault handler */
 .Lucas32_start:
 	/* Perform the CAS */
@@ -545,9 +542,6 @@
 	 */
 	movl	%eax, (%rcx)
 	xorq	%rax, %rax
-1:
-	/* Failure case */
-	movq	$EFAULT, %rax
 	ret
 	DEFERRED_SWITCH_CALL
 



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

2010-06-02 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jun  2 18:02:58 UTC 2010

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

Log Message:
COMPAT_43 should not be sorted between COMPAT_40 and COMPAT_50.


To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 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.279 src/sys/arch/amd64/conf/GENERIC:1.280
--- src/sys/arch/amd64/conf/GENERIC:1.279	Sat May 22 19:02:07 2010
+++ src/sys/arch/amd64/conf/GENERIC	Wed Jun  2 18:02:57 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.279 2010/05/22 19:02:07 plunky Exp $
+# $NetBSD: GENERIC,v 1.280 2010/06/02 18:02:57 dholland Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.279 $
+#ident 		GENERIC-$Revision: 1.280 $
 
 maxusers	64		# estimated number of users
 
@@ -112,9 +112,9 @@
 options 	COMPAT_16	# NetBSD 1.6,
 options 	COMPAT_20	# NetBSD 2.0,
 options 	COMPAT_30	# NetBSD 3.0,
-options 	COMPAT_40	# NetBSD 4.0 compatibility.
+options 	COMPAT_40	# NetBSD 4.0,
+options 	COMPAT_50	# NetBSD 5.0 compatibility,
 options 	COMPAT_43	# and 4.3BSD
-options 	COMPAT_50	# NetBSD 5.0
 #options 	COMPAT_386BSD_MBRPART # recognize old partition ID
 
 options 	COMPAT_OSSAUDIO



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

2010-06-02 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jun  2 18:05:28 UTC 2010

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

Log Message:
Remove orphaned heading Mice


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 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.280 src/sys/arch/amd64/conf/GENERIC:1.281
--- src/sys/arch/amd64/conf/GENERIC:1.280	Wed Jun  2 18:02:57 2010
+++ src/sys/arch/amd64/conf/GENERIC	Wed Jun  2 18:05:28 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.280 2010/06/02 18:02:57 dholland Exp $
+# $NetBSD: GENERIC,v 1.281 2010/06/02 18:05:28 dholland Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.280 $
+#ident 		GENERIC-$Revision: 1.281 $
 
 maxusers	64		# estimated number of users
 
@@ -1066,8 +1066,6 @@
 ld*at sdmmc?
 
 
-# Mice
-
 # Middle Digital, Inc. PCI-Weasel serial console board control
 # devices (watchdog timer, etc.)
 weasel* at pci?



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

2010-05-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue May 11 02:34:40 UTC 2010

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

Log Message:
Fix indentation


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/amd64/amd64/netbsd32_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/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.62 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.63
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.62	Fri Apr 23 19:18:09 2010
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Tue May 11 02:34:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.62 2010/04/23 19:18:09 rmind Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.63 2010/05/11 02:34:39 joerg Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.62 2010/04/23 19:18:09 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.63 2010/05/11 02:34:39 joerg Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -612,21 +612,21 @@
 	int error;
 
 	switch (SCARG(uap, op)) {
-		case X86_IOPL:
-			error = x86_iopl(l,
-			NETBSD32PTR64(SCARG(uap, parms)), retval);
-			break;
-		case X86_GET_MTRR:
-			error = x86_64_get_mtrr32(l,
-			NETBSD32PTR64(SCARG(uap, parms)), retval);
-			break;
-		case X86_SET_MTRR:
-			error = x86_64_set_mtrr32(l,
-			NETBSD32PTR64(SCARG(uap, parms)), retval);
-			break;
-		default:
-			error = EINVAL;
-			break;
+	case X86_IOPL:
+		error = x86_iopl(l,
+		NETBSD32PTR64(SCARG(uap, parms)), retval);
+		break;
+	case X86_GET_MTRR:
+		error = x86_64_get_mtrr32(l,
+		NETBSD32PTR64(SCARG(uap, parms)), retval);
+		break;
+	case X86_SET_MTRR:
+		error = x86_64_set_mtrr32(l,
+		NETBSD32PTR64(SCARG(uap, parms)), retval);
+		break;
+	default:
+		error = EINVAL;
+		break;
 	}
 	return error;
 }



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

2010-05-05 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed May  5 16:53:58 UTC 2010

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

Log Message:
As Andrew Doran points out, _ALIGN_TEXT is unused, and to test that
X86_BUS_SPACE_IO equals 0 is no longer necessary.  Get rid of the
_ALIGN_TEXT definition, and do not assert that X86_BUS_SPACE_IO == 0.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amd64/amd64/busfunc.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/busfunc.S
diff -u src/sys/arch/amd64/amd64/busfunc.S:1.8 src/sys/arch/amd64/amd64/busfunc.S:1.9
--- src/sys/arch/amd64/amd64/busfunc.S:1.8	Wed Apr 28 19:17:03 2010
+++ src/sys/arch/amd64/amd64/busfunc.S	Wed May  5 16:53:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: busfunc.S,v 1.8 2010/04/28 19:17:03 dyoung Exp $	*/
+/*	$NetBSD: busfunc.S,v 1.9 2010/05/05 16:53:57 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -33,14 +33,6 @@
 
 #include assym.h
 
-/* XXX */
-#undef	_ALIGN_TEXT
-#define	_ALIGN_TEXT	.align 16
-
-#if X86_BUS_SPACE_IO != 0
-#error depends on X86_BUS_SPACE_IO == 0
-#endif
-
 .Ldopanic:
 	movq	$.Lpstr, %rdi
 	call	_C_LABEL(panic)



CVS commit: src/sys/arch/amd64

2010-04-28 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Apr 28 20:22:46 UTC 2010

Modified Files:
src/sys/arch/amd64: Makefile

Log Message:
Fix 'tags' target.


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

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/Makefile
diff -u src/sys/arch/amd64/Makefile:1.5 src/sys/arch/amd64/Makefile:1.6
--- src/sys/arch/amd64/Makefile:1.5	Sun Oct 26 02:14:59 2008
+++ src/sys/arch/amd64/Makefile	Wed Apr 28 20:22:46 2010
@@ -1,13 +1,11 @@
-#	$NetBSD: Makefile,v 1.5 2008/10/26 02:14:59 mrg Exp $
+#	$NetBSD: Makefile,v 1.6 2010/04/28 20:22:46 dyoung Exp $
 
 # Makefile for amd64 tags file and boot blocks
 
 TAMD64=		${SYSDIR}/arch/amd64/tags
 SAMD64=		${SYSDIR}/arch/amd64/amd64/*.[ch] \
-		${SYSDIR}/arch/amd64/include/*.h \
-		${SYSDIR}/arch/amd64/isa/*.[ch] \
-		${SYSDIR}/arch/amd64/pci/*.[ch]
-AAMD64=		${SYSDIR}/arch/amd64/amd64/*.s ${SYSDIR}/arch/amd64/isa/*.s
+		${SYSDIR}/arch/amd64/include/*.h
+AAMD64=		${SYSDIR}/arch/amd64/amd64/*.S
 
 # Directories in which to place tags links
 DAMD64=		amd64 isa include pci
@@ -15,8 +13,11 @@
 .include ../../kern/Make.tags.inc
 
 tags:
-	rm -f ${TAMD64}
-	-echo ${SAMD64} ${COMM} | xargs ctags -wadtf ${TAMD64}
+	-rm -f ${TAMD64}
+	-echo ${SAMD64} | xargs ctags -wadtf ${TAMD64}
+	-find -H ${SYSDIR}/external/intel-public/acpica/dist/ -name '*.[ch]' | \
+	sort -t / -u | xargs ctags -wadtf ${TAMD64}
+	-${FINDCOMM} | xargs ctags -wadtf ${TAMD64}
 	egrep ^ENTRY(.*)|^ALTENTRY(.*) ${AAMD64} | \
 	${TOOL_SED} -e \
 		s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/; \



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

2010-04-20 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Tue Apr 20 15:42:21 UTC 2010

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

Log Message:
Enable the NX bit feature early in the MP trampoline code (do not rely on
cpu_init_msrs() to do it). Having NX bit set on a page will raise a #GP
on fetch if NXE is not enabled, which can happen early when structures
(like idlelwp) are allocated with just rw- rights.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/amd64/mptramp.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/mptramp.S
diff -u src/sys/arch/amd64/amd64/mptramp.S:1.11 src/sys/arch/amd64/amd64/mptramp.S:1.12
--- src/sys/arch/amd64/amd64/mptramp.S:1.11	Sun Apr 18 23:47:50 2010
+++ src/sys/arch/amd64/amd64/mptramp.S	Tue Apr 20 15:42:21 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mptramp.S,v 1.11 2010/04/18 23:47:50 jym Exp $	*/
+/*	$NetBSD: mptramp.S,v 1.12 2010/04/20 15:42:21 jym Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -216,6 +216,18 @@
 
 	
 _C_LABEL(cpu_spinup_trampoline_end):	#end of code copied to MP_TRAMPOLINE
+	/*
+	 * If EFER_NXE is not enabled, fetching a page with a NX bit set
+	 * will raise a #GP. Avoid that by setting the NXE feature now.
+	 */
+	movl	_C_LABEL(cpu_feature)+2*4,%eax	/* cpu_feature[2] */
+	andl	$CPUID_NOX,%eax
+	jz	1f
+	movl	$MSR_EFER,%ecx
+	rdmsr
+	orl	$EFER_NXE,%eax	/* enable No-Execute feature */
+	wrmsr
+
 1:
 	/* Don't touch lapic until BP has done init sequence. */
 	movq	_C_LABEL(cpu_starting),%rdi
@@ -223,7 +235,6 @@
 	testq	%rdi, %rdi
 	jz	1b
 
-1:
 	movq	CPU_INFO_IDLELWP(%rdi),%rsi
 	movq	L_PCB(%rsi),%rsi
 	



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

2010-04-18 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sun Apr 18 15:24:54 UTC 2010

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

Log Message:
When kernel remaps to high memory in amd64 locore, the GDT used before
becomes invalid. As such, split it in two parts, one for use when system
boots in low memory, and one for use when it jumps to high memory.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 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.55 src/sys/arch/amd64/amd64/locore.S:1.56
--- src/sys/arch/amd64/amd64/locore.S:1.55	Fri Nov 27 03:23:04 2009
+++ src/sys/arch/amd64/amd64/locore.S	Sun Apr 18 15:24:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.55 2009/11/27 03:23:04 rmind Exp $	*/
+/*	$NetBSD: locore.S,v 1.56 2010/04/18 15:24:54 jym Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -269,13 +269,25 @@
 #define	RELOC(x)	_RELOC(_C_LABEL(x))
 
 #ifndef XEN
-	.globl	gdt64
+	.globl	gdt64_lo
+	.globl	gdt64_hi
 
-gdt64:
-	.word	gdt64_end-gdt64_start
+#define GDT64_LIMIT gdt64_end-gdt64_start-1
+
+/* Temporary gdt64, with base address in low memory */
+gdt64_lo:
+	.word	GDT64_LIMIT
 	.quad	_RELOC(gdt64_start)
 .align 64
 
+/* Temporary gdt64, with base address in high memory */
+gdt64_hi:
+	.word	GDT64_LIMIT
+	.quad	gdt64_start
+.align 64
+
+#undef GDT64_LIMIT
+
 gdt64_start:
 	.quad 0x	/* always empty */
 	.quad 0x00af9a00	/* kernel CS */
@@ -638,7 +650,7 @@
 	 * in it to do that.
 	 */
 
-	movl	$RELOC(gdt64),%eax
+	movl	$RELOC(gdt64_lo),%eax
 	lgdt	(%eax)
 	movl	$RELOC(farjmp64),%eax
 	ljmp	*(%eax)
@@ -654,9 +666,17 @@
 	 */
 	movabsq	$longmode_hi,%rax
 	jmp	*%rax
+
 longmode_hi:
+
+	/*
+	 * We left the identity mapped area. Base address of
+	 * the temporary gdt64 should now be in high memory.
+	 */
+	movq	$RELOC(gdt64_hi),%rax
+	lgdt	(%rax)
+
 	/*
-	 * We have arrived.
 	 * There's no need anymore for the identity mapping in low
 	 * memory, remove it.
 	 */



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

2010-04-09 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Fri Apr  9 14:37:57 UTC 2010

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

Log Message:
revert last change, amd64 doesnt have monolith so dont remove pad.


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 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.275 src/sys/arch/amd64/conf/GENERIC:1.276
--- src/sys/arch/amd64/conf/GENERIC:1.275	Fri Apr  9 14:02:05 2010
+++ src/sys/arch/amd64/conf/GENERIC	Fri Apr  9 14:37:57 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.275 2010/04/09 14:02:05 ahoka Exp $
+# $NetBSD: GENERIC,v 1.276 2010/04/09 14:37:57 ahoka Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.275 $
+#ident 		GENERIC-$Revision: 1.276 $
 
 maxusers	64		# estimated number of users
 
@@ -1149,6 +1149,9 @@
 pseudo-device	wsmux			# mouse  keyboard multiplexor
 pseudo-device	wsfont
 
+# pseudo audio device driver
+pseudo-device	pad
+
 # userland interface to drivers, including autoconf and properties retrieval
 pseudo-device	drvctl
 



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

2010-03-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 28 00:00:07 UTC 2010

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

Log Message:
sort a couple things


To generate a diff of this commit:
cvs rdiff -u -r1.271 -r1.272 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.271 src/sys/arch/amd64/conf/GENERIC:1.272
--- src/sys/arch/amd64/conf/GENERIC:1.271	Sun Mar  7 09:39:42 2010
+++ src/sys/arch/amd64/conf/GENERIC	Sun Mar 28 00:00:07 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.271 2010/03/07 09:39:42 plunky Exp $
+# $NetBSD: GENERIC,v 1.272 2010/03/28 00:00:07 dholland Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.271 $
+#ident 		GENERIC-$Revision: 1.272 $
 
 maxusers	64		# estimated number of users
 
@@ -144,8 +144,8 @@
 file-system 	KERNFS		# /kern
 file-system 	NULLFS		# loopback file system
 file-system 	OVERLAY		# overlay file system
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
 file-system 	PROCFS		# /proc
+file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
 file-system 	SMBFS		# experimental - SMB/CIFS file-system
 file-system 	UMAPFS		# NULLFS + uid and gid remapping
 file-system 	UNION		# union file system
@@ -641,8 +641,8 @@
 
 # PCI network interfaces
 age*	at pci? dev ? function ?	# Attansic/Atheros L1 Gigabit Ethernet
-an*	at pci? dev ? function ?	# Aironet PC4500/PC4800 (802.11)
 ale*	at pci? dev ? function ?	# Attansic/Atheros L1E Ethernet
+an*	at pci? dev ? function ?	# Aironet PC4500/PC4800 (802.11)
 ath*	at pci? dev ? function ?	# Atheros 5210/5211/5212 802.11
 atw*	at pci? dev ? function ?	# ADMtek ADM8211 (802.11)
 bce* 	at pci? dev ? function ?	# Broadcom 440x 10/100 Ethernet



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

2010-03-18 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Mar 18 08:28:33 UTC 2010

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

Log Message:
buildfix: invert comparison to get the 64bit defines by default.
Fixes 'i386/elf_machdep.h: No such file or directory error' when compiling
amd64 toolchain on OSX.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/include/elf_machdep.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/elf_machdep.h
diff -u src/sys/arch/amd64/include/elf_machdep.h:1.3 src/sys/arch/amd64/include/elf_machdep.h:1.4
--- src/sys/arch/amd64/include/elf_machdep.h:1.3	Sat May 30 05:56:52 2009
+++ src/sys/arch/amd64/include/elf_machdep.h	Thu Mar 18 08:28:33 2010
@@ -1,6 +1,6 @@
-/*	$NetBSD: elf_machdep.h,v 1.3 2009/05/30 05:56:52 skrll Exp $	*/
+/*	$NetBSD: elf_machdep.h,v 1.4 2010/03/18 08:28:33 cegger Exp $	*/
 
-#ifdef __x86_64__
+#if !defined __i386__
 
 #define	ELF32_MACHDEP_ENDIANNESS	ELFDATA2LSB
 #define	ELF32_MACHDEP_ID_CASES		\
@@ -48,8 +48,8 @@
 
 #define	R_TYPE(name)	__CONCAT(R_X86_64_,name)
 
-#else	/*	__x86_64__	*/
+#else	/*	!__i386__	*/
 
 #include i386/elf_machdep.h
 
-#endif	/*	__x86_64__	*/
+#endif	/*	!__i386__	*/



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

2010-01-31 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Jan 31 12:20:23 UTC 2010

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

Log Message:
Remove ACPICA_PEDANTIC.


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 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.262 src/sys/arch/amd64/conf/GENERIC:1.263
--- src/sys/arch/amd64/conf/GENERIC:1.262	Thu Jan  7 18:49:30 2010
+++ src/sys/arch/amd64/conf/GENERIC	Sun Jan 31 12:20:22 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.262 2010/01/07 18:49:30 tnn Exp $
+# $NetBSD: GENERIC,v 1.263 2010/01/31 12:20:22 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.262 $
+#ident 		GENERIC-$Revision: 1.263 $
 
 maxusers	64		# estimated number of users
 
@@ -264,7 +264,6 @@
 #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 	ACPICA_PEDANTIC		# force strict conformance to the Spec.
 options 	VGA_POST		# in-kernel support for VGA POST
 
 # ACPI devices



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

2010-01-18 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jan 18 21:55:40 UTC 2010

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

Log Message:
Do not check more than 32 bits against ci_feature_flags, to avoid printing
bogus data on /proc/cpuinfo flags line.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amd64/amd64/procfs_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/procfs_machdep.c
diff -u src/sys/arch/amd64/amd64/procfs_machdep.c:1.12 src/sys/arch/amd64/amd64/procfs_machdep.c:1.13
--- src/sys/arch/amd64/amd64/procfs_machdep.c:1.12	Sun Aug 16 11:04:48 2009
+++ src/sys/arch/amd64/amd64/procfs_machdep.c	Mon Jan 18 21:55:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_machdep.c,v 1.12 2009/08/16 11:04:48 yamt Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.13 2010/01/18 21:55:40 njoly Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: procfs_machdep.c,v 1.12 2009/08/16 11:04:48 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: procfs_machdep.c,v 1.13 2010/01/18 21:55:40 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -151,7 +151,7 @@
 
 	p = featurebuf;
 	left = sizeof featurebuf;
-	for (i = 0; i  sizeof(i386_features)/sizeof(*i386_features); i++) {
+	for (i = 0; i  32; i++) {
 		if ((ci-ci_feature_flags  (1  i)) 
 		(i386_features[i] != NULL)) {
 			l = snprintf(p, left, %s , i386_features[i]);



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

2009-12-30 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Thu Dec 31 01:11:28 UTC 2009

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

Log Message:
Use banner() instead of amd64's custom use of printf's for copyright
notice and total/available memory.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 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.140 src/sys/arch/amd64/amd64/machdep.c:1.141
--- src/sys/arch/amd64/amd64/machdep.c:1.140	Thu Dec 10 14:13:48 2009
+++ src/sys/arch/amd64/amd64/machdep.c	Thu Dec 31 01:11:28 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.140 2009/12/10 14:13:48 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.141 2009/12/31 01:11:28 jym Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.140 2009/12/10 14:13:48 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.141 2009/12/31 01:11:28 jym Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -301,7 +301,6 @@
 	int x, y;
 	vaddr_t minaddr, maxaddr;
 	psize_t sz;
-	char pbuf[9];
 
 	/*
 	 * For console drivers that require uvm and pmap to be initialized,
@@ -334,11 +333,6 @@
 
 	initmsgbuf((void *)msgbuf_vaddr, round_page(sz));
 
-	printf(%s%s, copyright, version);
-
-	format_bytes(pbuf, sizeof(pbuf), ptoa(physmem));
-	printf(total memory = %s\n, pbuf);
-
 	minaddr = 0;
 
 	/*
@@ -357,8 +351,8 @@
 	module_map_store.vmk_map.pmap = pmap_kernel();
 	module_map = module_map_store.vmk_map;
 
-	format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
-	printf(avail memory = %s\n, pbuf);
+	/* Say hello. */
+	banner();
 
 #if NISA  0 || NPCI  0
 	/* Safe for i/o port / memory space allocation to use malloc now. */



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

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 11:37:55 UTC 2009

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

Log Message:
Add udl(4)


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 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.257 src/sys/arch/amd64/conf/GENERIC:1.258
--- src/sys/arch/amd64/conf/GENERIC:1.257	Fri Oct  2 16:47:52 2009
+++ src/sys/arch/amd64/conf/GENERIC	Thu Dec  3 11:37:55 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.257 2009/10/02 16:47:52 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.258 2009/12/03 11:37:55 sborrill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.257 $
+#ident 		GENERIC-$Revision: 1.258 $
 
 maxusers	64		# estimated number of users
 
@@ -793,6 +793,10 @@
 # USB Generic HID devices
 uhid*	at uhidev? reportid ?
 
+# USB LCDs and USB-VGA adaptors
+udl*	at uhub? port ?		# DisplayLink DL-1x0/1x5
+wsdisplay* at udl?
+
 # USB Printer
 ulpt*	at uhub? port ? configuration ? interface ?
 



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

2009-11-15 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Nov 15 18:41:32 UTC 2009

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

Log Message:
Declare trap name array as extern const char *const [] to match how
it's defined in trap.c. (Should really be in a header, of course.)
Compile-tested.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 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.20 src/sys/arch/amd64/amd64/db_interface.c:1.21
--- src/sys/arch/amd64/amd64/db_interface.c:1.20	Thu Jan 29 13:52:20 2009
+++ src/sys/arch/amd64/amd64/db_interface.c	Sun Nov 15 18:41:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.20 2009/01/29 13:52:20 joerg Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.21 2009/11/15 18:41:31 dholland Exp $	*/
 
 /*
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.20 2009/01/29 13:52:20 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.21 2009/11/15 18:41:31 dholland Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -63,7 +63,7 @@
 #include ddb/db_output.h
 #include ddb/ddbvar.h
 
-extern const char *trap_type[];
+extern const char *const trap_type[];
 extern int trap_types;
 
 int	db_active;



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

2009-11-13 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Fri Nov 13 22:49:47 UTC 2009

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

Log Message:
tlbstate is 'int', so use 'cmpl' not 'cmpq'.
Fixes gprof on amd64 PR/40960.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 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.14 src/sys/arch/amd64/amd64/copy.S:1.15
--- src/sys/arch/amd64/amd64/copy.S:1.14	Sat Mar 28 22:56:19 2009
+++ src/sys/arch/amd64/amd64/copy.S	Fri Nov 13 22:49:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: copy.S,v 1.14 2009/03/28 22:56:19 rmind Exp $	*/
+/*	$NetBSD: copy.S,v 1.15 2009/11/13 22:49:46 dsl Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -386,7 +386,7 @@
 	DEFERRED_SWITCH_CALL
 	
 ENTRY(fuswintr)
-	cmpq	$TLBSTATE_VALID, CPUVAR(TLBSTATE)
+	cmpl	$TLBSTATE_VALID, CPUVAR(TLBSTATE)
 	jnz	_C_LABEL(fusuaddrfault)
 	movq	$VM_MAXUSER_ADDRESS-2,%r11
 	cmpq	%r11,%rdi
@@ -444,7 +444,7 @@
 	DEFERRED_SWITCH_CALL
 
 ENTRY(suswintr)
-	cmpq	$TLBSTATE_VALID, CPUVAR(TLBSTATE)
+	cmpl	$TLBSTATE_VALID, CPUVAR(TLBSTATE)
 	jnz	_C_LABEL(fusuaddrfault)
 	movq	$VM_MAXUSER_ADDRESS-2,%r11
 	cmpq	%r11,%rdi



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

2009-11-11 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Wed Nov 11 23:53:39 UTC 2009

Modified Files:
src/sys/arch/amd64/include: param.h
Added Files:
src/sys/arch/amd64/include: Makefile.inc

Log Message:
Build kernel modules with -mno-red-zone like kernel is build. This fixes
frequent panics in amd64 zfs module. This should also fix problem reported
by Nicolas Joly in:

http://mail-index.netbsd.org/port-amd64/2008/12/09/msg000646.html

Thanks to cube@ for his help with this.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/include/Makefile.inc
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/amd64/include/param.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/param.h
diff -u src/sys/arch/amd64/include/param.h:1.10 src/sys/arch/amd64/include/param.h:1.11
--- src/sys/arch/amd64/include/param.h:1.10	Sat Dec 20 12:42:36 2008
+++ src/sys/arch/amd64/include/param.h	Wed Nov 11 23:53:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.10 2008/12/20 12:42:36 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.11 2009/11/11 23:53:39 haad Exp $	*/
 
 #ifdef __x86_64__
 
@@ -56,12 +56,12 @@
 #define	MAXPHYS		(64 * 1024)	/* max raw I/O transfer size */
 #endif
 
-#define	SSIZE		1		/* initial stack size/NBPG */
-#define	SINCR		1		/* increment of stack/NBPG */
+#define	SSIZE		8		/* initial stack size/NBPG */
+#define	SINCR		2		/* increment of stack/NBPG */
 #ifdef DIAGNOSTIC
-#define	UPAGES		4		/* pages of u-area (1 for redzone) */
+#define	UPAGES		16		/* pages of u-area (1 for redzone) */
 #else
-#define	UPAGES		3		/* pages of u-area */
+#define	UPAGES		12		/* pages of u-area */
 #endif
 #define	USPACE		(UPAGES * NBPG)	/* total size of u-area */
 #define	INTRSTACKSIZE	4096

Added files:

Index: src/sys/arch/amd64/include/Makefile.inc
diff -u /dev/null src/sys/arch/amd64/include/Makefile.inc:1.1
--- /dev/null	Wed Nov 11 23:53:39 2009
+++ src/sys/arch/amd64/include/Makefile.inc	Wed Nov 11 23:53:38 2009
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2009/11/11 23:53:38 haad Exp $
+
+CFLAGS+=-mno-red-zone



CVS commit: src/sys/arch/amd64

2009-10-26 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Tue Oct 27 03:05:28 UTC 2009

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/amd64/include: pcb.h

Log Message:
Make pcb_ldt_sel, in amd64, an unused field.  Unlike in i386, it was
missed during clean-up of LDT handling.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/amd64/include/pcb.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/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.134 src/sys/arch/amd64/amd64/machdep.c:1.135
--- src/sys/arch/amd64/amd64/machdep.c:1.134	Mon Oct 19 18:41:10 2009
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Oct 27 03:05:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.134 2009/10/19 18:41:10 bouyer Exp $	*/
+/*	$NetBSD: machdep.c,v 1.135 2009/10/27 03:05:27 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.134 2009/10/19 18:41:10 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.135 2009/10/27 03:05:27 rmind Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -415,13 +415,12 @@
 	pcb-pcb_rsp0 = (USER_TO_UAREA(l-l_addr) + KSTACK_SIZE - 16)  ~0xf;
 	pcb-pcb_iopl = SEL_KPL;
 
-	pcb-pcb_ldt_sel = pmap_kernel()-pm_ldt_sel =
-	GSYSSEL(GLDT_SEL, SEL_KPL);
+	pmap_kernel()-pm_ldt_sel = GSYSSEL(GLDT_SEL, SEL_KPL);
 	pcb-pcb_cr0 = rcr0()  ~CR0_TS;
 	l-l_md.md_regs = (struct trapframe *)pcb-pcb_rsp0 - 1;
 
 #if !defined(XEN)
-	lldt(pcb-pcb_ldt_sel);
+	lldt(pmap_kernel()-pm_ldt_sel);
 #else
 	{
 	struct physdev_op physop;

Index: src/sys/arch/amd64/include/pcb.h
diff -u src/sys/arch/amd64/include/pcb.h:1.15 src/sys/arch/amd64/include/pcb.h:1.16
--- src/sys/arch/amd64/include/pcb.h:1.15	Sun Oct 26 00:08:15 2008
+++ src/sys/arch/amd64/include/pcb.h	Tue Oct 27 03:05:28 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcb.h,v 1.15 2008/10/26 00:08:15 mrg Exp $	*/
+/*	$NetBSD: pcb.h,v 1.16 2009/10/27 03:05:28 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 	uint64_t pcb_rsp;
 	uint64_t pcb_rbp;
 	uint64_t pcb_usersp;
-	uint64_t pcb_ldt_sel;
+	uint64_t pcb_unused;		/* unused */
 	struct	savefpu pcb_savefpu __aligned(16); /* floating point state */
 	void *pcb_onfault;		/* copyin/out fault recovery */
 	struct cpu_info *pcb_fpcpu;	/* cpu holding our fp state. */



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

2009-10-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct  1 09:13:54 UTC 2009

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

Log Message:
Fix up mwait/monitor now that gas has been fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/amd64/amd64/cpufunc.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/cpufunc.S
diff -u src/sys/arch/amd64/amd64/cpufunc.S:1.15 src/sys/arch/amd64/amd64/cpufunc.S:1.16
--- src/sys/arch/amd64/amd64/cpufunc.S:1.15	Tue Jun 24 16:32:53 2008
+++ src/sys/arch/amd64/amd64/cpufunc.S	Thu Oct  1 09:13:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.S,v 1.15 2008/06/24 16:32:53 ad Exp $	*/
+/*	$NetBSD: cpufunc.S,v 1.16 2009/10/01 09:13:54 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -333,7 +333,7 @@
 ENTRY(x86_monitor)
 	movq	%rdi, %rax
 	movq	%rsi, %rcx
-	monitor	%eax, %ecx, %edx	/* XXXgas %rax */
+	monitor	%rax, %rcx, %rdx
 	ret
 
 /* Waits - set up stack frame. */
@@ -342,7 +342,7 @@
 	movq	%rsp, %rbp
 	movq	%rdi, %rax
 	movq	%rsi, %rcx
-	mwait	%eax, %ecx
+	mwait	%rax, %rcx
 	leave
 	ret
 



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

2009-10-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct  1 09:15:19 UTC 2009

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

Log Message:
MAXPAGESIZE got bumped to 0x20. Use -z maxpagesize=0x10 until
someone(tm) decides that kernels should have that alignment, etc.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/amd64/conf/Makefile.amd64

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/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.26 src/sys/arch/amd64/conf/Makefile.amd64:1.27
--- src/sys/arch/amd64/conf/Makefile.amd64:1.26	Thu Dec 11 05:27:42 2008
+++ src/sys/arch/amd64/conf/Makefile.amd64	Thu Oct  1 09:15:19 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.amd64,v 1.26 2008/12/11 05:27:42 alc Exp $
+#	$NetBSD: Makefile.amd64,v 1.27 2009/10/01 09:15:19 skrll Exp $
 
 # Makefile for NetBSD
 #
@@ -66,6 +66,7 @@
 ## (5) link settings
 ##
 TEXTADDR?=	0x8010
+EXTRA_LINKFLAGS=	-z maxpagesize=0x10
 LINKFLAGS_NORMAL=	-X
 KERN_LDSCRIPT?= kern.ldscript
 LINKFORMAT=	-T ${AMD64}/conf/${KERN_LDSCRIPT}



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

2009-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Sep 30 20:48:09 UTC 2009

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

Log Message:
add and enable wb(4)


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 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.253 src/sys/arch/amd64/conf/GENERIC:1.254
--- src/sys/arch/amd64/conf/GENERIC:1.253	Sun Sep 20 01:14:31 2009
+++ src/sys/arch/amd64/conf/GENERIC	Wed Sep 30 20:48:09 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.253 2009/09/20 01:14:31 christos Exp $
+# $NetBSD: GENERIC,v 1.254 2009/09/30 20:48:09 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.253 $
+#ident 		GENERIC-$Revision: 1.254 $
 
 maxusers	64		# estimated number of users
 
@@ -298,6 +298,7 @@
 wsmouse* 	at spic?		# mouse
 thinkpad*	at acpi?		# IBM/Lenovo Thinkpad hotkeys
 ug* 		at acpi?		# Abit uGuru Hardware monitor
+wb*		at acpi?		# Winbond W83L518D SD/MMC reader
 wss* 		at acpi?		# NeoMagic 256AV in wss mode
 
 #apm0	at mainbus0			# Advanced power management



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

2009-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Sep 30 20:49:07 UTC 2009

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

Log Message:
w...@acpi doesn't make much sense on amd64, so remove it


To generate a diff of this commit:
cvs rdiff -u -r1.254 -r1.255 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.254 src/sys/arch/amd64/conf/GENERIC:1.255
--- src/sys/arch/amd64/conf/GENERIC:1.254	Wed Sep 30 20:48:09 2009
+++ src/sys/arch/amd64/conf/GENERIC	Wed Sep 30 20:49:07 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.254 2009/09/30 20:48:09 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.255 2009/09/30 20:49:07 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.254 $
+#ident 		GENERIC-$Revision: 1.255 $
 
 maxusers	64		# estimated number of users
 
@@ -299,7 +299,6 @@
 thinkpad*	at acpi?		# IBM/Lenovo Thinkpad hotkeys
 ug* 		at acpi?		# Abit uGuru Hardware monitor
 wb*		at acpi?		# Winbond W83L518D SD/MMC reader
-wss* 		at acpi?		# NeoMagic 256AV in wss mode
 
 #apm0	at mainbus0			# Advanced power management
 



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

2009-09-25 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Sep 25 13:56:32 UTC 2009

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

Log Message:
Ensure FP state is reset, if FP is used in a signal handler.
Fixes PR kern/39299 for 32bit code.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/amd64/amd64/netbsd32_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/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.58 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.59
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.58	Sun Aug 16 17:12:47 2009
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Fri Sep 25 13:56:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.58 2009/08/16 17:12:47 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.59 2009/09/25 13:56:32 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.58 2009/08/16 17:12:47 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.59 2009/09/25 13:56:32 mlelstv Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -269,6 +269,9 @@
 	tf-tf_fs = GSEL(GUDATA32_SEL, SEL_UPL);
 	tf-tf_gs = GSEL(GUDATA32_SEL, SEL_UPL);
 
+	/* Ensure FP state is reset, if FP is used. */
+	l-l_md.md_flags = ~MDP_USEDFPU;
+
 	tf-tf_rip = (uint64_t)catcher;
 	tf-tf_cs = GSEL(GUCODE32_SEL, SEL_UPL);
 	tf-tf_rflags = ~PSL_CLEARSIG;
@@ -360,6 +363,9 @@
 	tf-tf_rsp = (uint64_t)fp;
 	tf-tf_ss = GSEL(GUDATA32_SEL, SEL_UPL);
 
+	/* Ensure FP state is reset, if FP is used. */
+	l-l_md.md_flags = ~MDP_USEDFPU;
+
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
 		l-l_sigstk.ss_flags |= SS_ONSTACK;



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

2009-08-24 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug 24 22:06:50 UTC 2009

Modified Files:
src/sys/arch/amd64/acpi: acpi_wakecode.S

Log Message:
Add definition for WAKEUP_vesa_modenum


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amd64/acpi/acpi_wakecode.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/acpi/acpi_wakecode.S
diff -u src/sys/arch/amd64/acpi/acpi_wakecode.S:1.9 src/sys/arch/amd64/acpi/acpi_wakecode.S:1.10
--- src/sys/arch/amd64/acpi/acpi_wakecode.S:1.9	Mon Aug 24 10:16:12 2009
+++ src/sys/arch/amd64/acpi/acpi_wakecode.S	Mon Aug 24 22:06:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakecode.S,v 1.9 2009/08/24 10:16:12 jmcneill Exp $	*/
+/*	$NetBSD: acpi_wakecode.S,v 1.10 2009/08/24 22:06:50 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger jo...@netbsd.org
@@ -265,6 +265,8 @@
 
 	.global WAKEUP_vbios_reset
 WAKEUP_vbios_reset:	.byte 0
+	.global WAKEUP_vesa_modenum
+WAKEUP_vesa_modenum:.word 0
 	.global WAKEUP_beep_on_reset
 WAKEUP_beep_on_reset:	.byte 0
 



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

2009-08-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  9 20:27:06 UTC 2009

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

Log Message:
remove drm stuff for now


To generate a diff of this commit:
cvs rdiff -u -r1.247 -r1.248 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.247 src/sys/arch/amd64/conf/GENERIC:1.248
--- src/sys/arch/amd64/conf/GENERIC:1.247	Sun Aug  9 15:37:35 2009
+++ src/sys/arch/amd64/conf/GENERIC	Sun Aug  9 16:27:06 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.247 2009/08/09 19:37:35 christos Exp $
+# $NetBSD: GENERIC,v 1.248 2009/08/09 20:27:06 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.247 $
+#ident 		GENERIC-$Revision: 1.248 $
 
 maxusers	64		# estimated number of users
 
@@ -369,16 +369,6 @@
 pcppi0		at isa?
 sysbeep0	at pcppi?
 
-# DRI driver
-i915drm*	at vga?		# Intel i915, i945 DRM driver
-mach64drm*	at vga?		# mach64 (3D Rage Pro, Rage) DRM driver
-mgadrm*		at vga?		# Matrox G[24]00, G[45]50 DRM driver
-r128drm*	at vga?		# ATI Rage 128 DRM driver
-radeondrm*	at vga?		# ATI Radeon DRM driver
-savagedrm*	at vga?		# S3 Savage DRM driver
-sisdrm*		at vga?		# SiS DRM driver
-tdfxdrm*	at vga?		# 3dfx (voodoo) DRM driver
-
 # Cryptographic Devices
 
 # PCI cryptographic devices



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

2009-08-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  9 21:32:17 UTC 2009

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

Log Message:
put back drm.


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/amd64/conf/INSTALL

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.248 src/sys/arch/amd64/conf/GENERIC:1.249
--- src/sys/arch/amd64/conf/GENERIC:1.248	Sun Aug  9 16:27:06 2009
+++ src/sys/arch/amd64/conf/GENERIC	Sun Aug  9 17:32:16 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.248 2009/08/09 20:27:06 christos Exp $
+# $NetBSD: GENERIC,v 1.249 2009/08/09 21:32:16 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.248 $
+#ident 		GENERIC-$Revision: 1.249 $
 
 maxusers	64		# estimated number of users
 
@@ -369,6 +369,16 @@
 pcppi0		at isa?
 sysbeep0	at pcppi?
 
+# DRI driver
+i915drm*	at vga?		# Intel i915, i945 DRM driver
+mach64drm*	at vga?		# mach64 (3D Rage Pro, Rage) DRM driver
+mgadrm*		at vga?		# Matrox G[24]00, G[45]50 DRM driver
+r128drm*	at vga?		# ATI Rage 128 DRM driver
+radeondrm*	at vga?		# ATI Radeon DRM driver
+savagedrm*	at vga?		# S3 Savage DRM driver
+sisdrm*		at vga?		# SiS DRM driver
+tdfxdrm*	at vga?		# 3dfx (voodoo) DRM driver
+
 # Cryptographic Devices
 
 # PCI cryptographic devices

Index: src/sys/arch/amd64/conf/INSTALL
diff -u src/sys/arch/amd64/conf/INSTALL:1.81 src/sys/arch/amd64/conf/INSTALL:1.82
--- src/sys/arch/amd64/conf/INSTALL:1.81	Fri Feb  6 13:50:26 2009
+++ src/sys/arch/amd64/conf/INSTALL	Sun Aug  9 17:32:16 2009
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.81 2009/02/06 18:50:26 jym Exp $
+# $NetBSD: INSTALL,v 1.82 2009/08/09 21:32:16 christos Exp $
 #
 #	INSTALL - Installation kernel.
 #
@@ -7,7 +7,7 @@
 
 include	arch/amd64/conf/GENERIC
 
-#ident 		INSTALL-$Revision: 1.81 $
+#ident 		INSTALL-$Revision: 1.82 $
 
 no options	MEMORY_DISK_DYNAMIC
 options 	MEMORY_DISK_IS_ROOT # force root on memory disk
@@ -16,3 +16,12 @@
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 no options	MTRR
+# DRI driver
+no i915drm*	at vga?		# Intel i915, i945 DRM driver
+no mach64drm*	at vga?		# mach64 (3D Rage Pro, Rage) DRM driver
+no mgadrm*	at vga?		# Matrox G[24]00, G[45]50 DRM driver
+no r128drm*	at vga?		# ATI Rage 128 DRM driver
+no radeondrm*	at vga?		# ATI Radeon DRM driver
+no savagedrm*	at vga?		# S3 Savage DRM driver
+no sisdrm*	at vga?		# SiS DRM driver
+no tdfxdrm*	at vga?		# 3dfx (voodoo) DRM driver



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

2009-07-29 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Wed Jul 29 17:14:38 UTC 2009

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

Log Message:
T_ASTFLT|T_USER: check for LP_OWEUPC in l_lpflag, not l_flag.  Also, flag
unset was on p-p_flag.  Luckily, it did not corrupt the p_flag, because
we don't have LW_ flag matching LP_OWEUPC.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/amd64/amd64/trap.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/trap.c
diff -u src/sys/arch/amd64/amd64/trap.c:1.57 src/sys/arch/amd64/amd64/trap.c:1.58
--- src/sys/arch/amd64/amd64/trap.c:1.57	Thu Jul 16 14:21:12 2009
+++ src/sys/arch/amd64/amd64/trap.c	Wed Jul 29 17:14:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.57 2009/07/16 14:21:12 christos Exp $	*/
+/*	$NetBSD: trap.c,v 1.58 2009/07/29 17:14:38 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.57 2009/07/16 14:21:12 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.58 2009/07/29 17:14:38 rmind Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -400,10 +400,11 @@
 	case T_ARITHTRAP|T_USER:
 	case T_XMM|T_USER:
 		/* Already handled by fputrap(), fall through. */
-	case T_ASTFLT|T_USER:		/* Allow process switch */
+	case T_ASTFLT|T_USER:
+		/* Allow process switch. */
 		uvmexp.softs++;
-		if (l-l_flag  LP_OWEUPC) {
-			p-p_flag = ~LP_OWEUPC;
+		if (l-l_pflag  LP_OWEUPC) {
+			l-l_pflag = ~LP_OWEUPC;
 			ADDUPROF(l);
 		}
 		/* Allow a forced task switch. */



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

2009-07-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jul 16 14:18:09 UTC 2009

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

Log Message:
handle protection fault properly.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/amd64/amd64/trap.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/trap.c
diff -u src/sys/arch/amd64/amd64/trap.c:1.55 src/sys/arch/amd64/amd64/trap.c:1.56
--- src/sys/arch/amd64/amd64/trap.c:1.55	Sat Mar 28 18:56:19 2009
+++ src/sys/arch/amd64/amd64/trap.c	Thu Jul 16 10:18:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.55 2009/03/28 22:56:19 rmind Exp $	*/
+/*	$NetBSD: trap.c,v 1.56 2009/07/16 14:18:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.55 2009/03/28 22:56:19 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.56 2009/07/16 14:18:09 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -338,26 +338,35 @@
 	case T_STKFLT|T_USER:
 	case T_ALIGNFLT|T_USER:
 #ifdef TRAP_SIGDEBUG
-		printf(pid %d (%s): BUS (%x) at rip %lx addr %lx\n,
+		printf(pid %d (%s): BUS/SEGV (%x) at rip %lx addr %lx\n,
 		p-p_pid, p-p_comm, type, frame-tf_rip, rcr2());
 		frame_dump(frame);
 #endif
 		KSI_INIT_TRAP(ksi);
-		ksi.ksi_signo = SIGBUS;
 		ksi.ksi_trap = type  ~T_USER;
 		ksi.ksi_addr = (void *)rcr2();
 		switch (type) {
 		case T_SEGNPFLT|T_USER:
 		case T_STKFLT|T_USER:
+			ksi.ksi_signo = SIGBUS;
 			ksi.ksi_code = BUS_ADRERR;
 			break;
 		case T_TSSFLT|T_USER:
+			ksi.ksi_signo = SIGBUS;
 			ksi.ksi_code = BUS_OBJERR;
 			break;
 		case T_ALIGNFLT|T_USER:
+			ksi.ksi_signo = SIGBUS;
 			ksi.ksi_code = BUS_ADRALN;
 			break;
+		case T_PROTFLT|T_USER:
+			ksi.ksi_signo = SIGSEGV;
+			ksi.ksi_code = SEGV_ACCERR;
+			break;
 		default:
+#ifdef DIAGNOSTIC
+			panic(unhandled type %x\n, type);
+#endif
 			break;
 		}
 		goto trapsignal;



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

2009-07-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jul 16 14:21:12 UTC 2009

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

Log Message:
a little more diagnostic


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/amd64/amd64/trap.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/trap.c
diff -u src/sys/arch/amd64/amd64/trap.c:1.56 src/sys/arch/amd64/amd64/trap.c:1.57
--- src/sys/arch/amd64/amd64/trap.c:1.56	Thu Jul 16 10:18:09 2009
+++ src/sys/arch/amd64/amd64/trap.c	Thu Jul 16 10:21:12 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.56 2009/07/16 14:18:09 christos Exp $	*/
+/*	$NetBSD: trap.c,v 1.57 2009/07/16 14:21:12 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.56 2009/07/16 14:18:09 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.57 2009/07/16 14:21:12 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -390,6 +390,9 @@
 			ksi.ksi_code = ILL_COPROC;
 			break;
 		default:
+#ifdef DIAGNOSTIC
+			panic(unhandled type %x\n, type);
+#endif
 			break;
 		}
 		goto trapsignal;
@@ -436,6 +439,9 @@
 			ksi.ksi_code = FPE_FLTDIV;
 			break;
 		default:
+#ifdef DIAGNOSTIC
+			panic(unhandled type %x\n, type);
+#endif
 			break;
 		}
 		goto trapsignal;



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

2009-05-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 22 18:57:40 UTC 2009

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

Log Message:
add uhmodem, uncomment wd* at umass


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 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.243 src/sys/arch/amd64/conf/GENERIC:1.244
--- src/sys/arch/amd64/conf/GENERIC:1.243	Mon Apr 27 08:02:10 2009
+++ src/sys/arch/amd64/conf/GENERIC	Fri May 22 14:57:40 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.243 2009/04/27 12:02:10 joerg Exp $
+# $NetBSD: GENERIC,v 1.244 2009/05/22 18:57:40 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.243 $
+#ident 		GENERIC-$Revision: 1.244 $
 
 maxusers	64		# estimated number of users
 
@@ -783,9 +783,13 @@
 umodem*	at uhub? port ? configuration ?
 ucom*	at umodem?
 
+# Huawei E220 3G/HSDPA modem
+uhmodem* at uhub? port ? configuration ? interface ?
+ucom*   at uhmodem? portno ?
+
 # USB Mass Storage
 umass*	at uhub? port ? configuration ? interface ?
-#wd* at umass?
+wd* at umass?
 
 # USB audio
 uaudio*	at uhub? port ? configuration ?



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

2009-05-16 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat May 16 07:46:45 UTC 2009

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

Log Message:
KNF, same object code generated


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/amd64/bios32.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/bios32.c
diff -u src/sys/arch/amd64/amd64/bios32.c:1.17 src/sys/arch/amd64/amd64/bios32.c:1.18
--- src/sys/arch/amd64/amd64/bios32.c:1.17	Wed Mar 18 17:06:41 2009
+++ src/sys/arch/amd64/amd64/bios32.c	Sat May 16 07:46:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bios32.c,v 1.17 2009/03/18 17:06:41 cegger Exp $	*/
+/*	$NetBSD: bios32.c,v 1.18 2009/05/16 07:46:45 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bios32.c,v 1.17 2009/03/18 17:06:41 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: bios32.c,v 1.18 2009/05/16 07:46:45 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -306,7 +306,7 @@
 	if (i == indx) {
 		if (va + len  end) {
 			ret = dest;
-			memcpy( ret, va, len);
+			memcpy(ret, va, len);
 			ret[len - 1] = '\0';
 		}
 	}



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

2009-04-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Apr 27 12:02:11 UTC 2009

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

Log Message:
Add commented out h...@ichlpcib entry.


To generate a diff of this commit:
cvs rdiff -u -r1.242 -r1.243 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.242 src/sys/arch/amd64/conf/GENERIC:1.243
--- src/sys/arch/amd64/conf/GENERIC:1.242	Tue Apr 21 03:00:29 2009
+++ src/sys/arch/amd64/conf/GENERIC	Mon Apr 27 12:02:10 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.242 2009/04/21 03:00:29 nonaka Exp $
+# $NetBSD: GENERIC,v 1.243 2009/04/27 12:02:10 joerg Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.242 $
+#ident 		GENERIC-$Revision: 1.243 $
 
 maxusers	64		# estimated number of users
 
@@ -327,6 +327,7 @@
 
 ichlpcib* at pci? dev ? function ?	# Intel ICH PCI-ISA w/ timecounter,
 	# watchdog and Speedstep support.
+#hpet* 	at ichlpcib?
 
 aapic* 	at pci? dev ? function ?	# AMD 8131 IO apic
 



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

2009-04-20 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Apr 20 20:50:38 UTC 2009

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

Log Message:
add age(4)


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 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.41 src/sys/arch/amd64/conf/XEN3_DOM0:1.42
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.41	Mon Apr 20 20:49:22 2009
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Mon Apr 20 20:50:37 2009
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.41 2009/04/20 20:49:22 cegger Exp $
+# $NetBSD: XEN3_DOM0,v 1.42 2009/04/20 20:50:37 cegger Exp $
 
 include 	arch/amd64/conf/std.xen
 
@@ -298,6 +298,7 @@
 
 
 # PCI network interfaces
+age*	at pci? dev ? function ?	# Attansic/Atheros L1 Gigabit Ethernet
 an*	at pci? dev ? function ?	# Aironet PC4500/PC4800 (802.11)
 ale*	at pci? dev ? function ?	# Attansic/Atheros L1E Ethernet
 ath*	at pci? dev ? function ?	# Atheros 5210/5211/5212 802.11



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

2009-04-10 Thread Perry E. Metzger
Module Name:src
Committed By:   perry
Date:   Fri Apr 10 23:01:47 UTC 2009

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

Log Message:
add (commented out) options LOCKDEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 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.239 src/sys/arch/amd64/conf/GENERIC:1.240
--- src/sys/arch/amd64/conf/GENERIC:1.239	Fri Mar  6 09:58:14 2009
+++ src/sys/arch/amd64/conf/GENERIC	Fri Apr 10 23:01:46 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.239 2009/03/06 09:58:14 cegger Exp $
+# $NetBSD: GENERIC,v 1.240 2009/04/10 23:01:46 perry Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.239 $
+#ident 		GENERIC-$Revision: 1.240 $
 
 maxusers	64		# estimated number of users
 
@@ -89,6 +89,7 @@
 # Diagnostic/debugging support options
 #options 	DIAGNOSTIC	# expensive kernel consistency checks
 #options 	DEBUG		# expensive debugging checks/support
+#options 	LOCKDEBUG	# expensive locking checks/support
 #options 	KMEMSTATS	# kernel memory statistics (vmstat -m)
 
 #



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

2009-03-28 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Mar 28 22:03:27 UTC 2009

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

Log Message:
x86_64_ipi_halt: unset CPU as running (sync with i386).


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/amd64/ipifuncs.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/ipifuncs.c
diff -u src/sys/arch/amd64/amd64/ipifuncs.c:1.20 src/sys/arch/amd64/amd64/ipifuncs.c:1.21
--- src/sys/arch/amd64/amd64/ipifuncs.c:1.20	Tue Nov 11 13:45:10 2008
+++ src/sys/arch/amd64/amd64/ipifuncs.c	Sat Mar 28 22:03:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipifuncs.c,v 1.20 2008/11/11 13:45:10 ad Exp $ */
+/*	$NetBSD: ipifuncs.c,v 1.21 2009/03/28 22:03:27 rmind Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
-__KERNEL_RCSID(0, $NetBSD: ipifuncs.c,v 1.20 2008/11/11 13:45:10 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipifuncs.c,v 1.21 2009/03/28 22:03:27 rmind Exp $);
 
 /*
  * Interprocessor interrupt handlers.
@@ -97,6 +97,7 @@
 x86_64_ipi_halt(struct cpu_info *ci)
 {
 	x86_disable_intr();
+	atomic_and_32(ci-ci_flags, ~CPUF_RUNNING);
 
 	for(;;) {
 		x86_hlt();



<    2   3   4   5   6   7