Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2003 17:31:29 -0800 (PST)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 26800 for review
Message-ID:  <200303130131.h2D1VT3G066163@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=26800

Change 26800 by peter@peter_daintree on 2003/03/12 17:30:46

	IFC @26797 i386_hammer branch

Affected files ...

.. //depot/projects/hammer/lib/csu/x86_64/crt1.c#5 integrate
.. //depot/projects/hammer/sys/x86_64/acpica/OsdEnvironment.c#4 integrate
.. //depot/projects/hammer/sys/x86_64/acpica/acpi_machdep.c#6 integrate
.. //depot/projects/hammer/sys/x86_64/acpica/acpi_wakeup.c#5 integrate
.. //depot/projects/hammer/sys/x86_64/conf/GENERIC.hints#5 integrate
.. //depot/projects/hammer/sys/x86_64/conf/Makefile#2 integrate
.. //depot/projects/hammer/sys/x86_64/include/bus_at386.h#2 integrate
.. //depot/projects/hammer/sys/x86_64/include/bus_dma.h#3 integrate
.. //depot/projects/hammer/sys/x86_64/include/clock.h#5 integrate
.. //depot/projects/hammer/sys/x86_64/include/cpu.h#5 integrate
.. //depot/projects/hammer/sys/x86_64/include/float.h#3 integrate
.. //depot/projects/hammer/sys/x86_64/include/floatingpoint.h#2 integrate
.. //depot/projects/hammer/sys/x86_64/include/md_var.h#9 integrate
.. //depot/projects/hammer/sys/x86_64/include/pci_cfgreg.h#4 integrate
.. //depot/projects/hammer/sys/x86_64/include/pmap.h#5 integrate
.. //depot/projects/hammer/sys/x86_64/include/segments.h#10 integrate
.. //depot/projects/hammer/sys/x86_64/include/signal.h#7 integrate
.. //depot/projects/hammer/sys/x86_64/include/specialreg.h#5 integrate
.. //depot/projects/hammer/sys/x86_64/include/ucontext.h#6 integrate
.. //depot/projects/hammer/sys/x86_64/include/vmparam.h#3 integrate
.. //depot/projects/hammer/sys/x86_64/isa/clock.c#7 integrate
.. //depot/projects/hammer/sys/x86_64/isa/npx.c#16 integrate
.. //depot/projects/hammer/sys/x86_64/pci/pci_bus.c#8 integrate
.. //depot/projects/hammer/sys/x86_64/pci/pci_cfgreg.c#9 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/autoconf.c#5 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/busdma_machdep.c#3 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/critical.c#4 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/elf_machdep.c#5 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/exception.s#9 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/genassym.c#11 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#29 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/mem.c#5 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/pmap.c#9 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#6 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/sys_machdep.c#8 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/trap.c#15 integrate
.. //depot/projects/hammer/sys/x86_64/x86_64/vm_machdep.c#8 integrate

Differences ...

==== //depot/projects/hammer/lib/csu/x86_64/crt1.c#5 (text+ko) ====

@@ -1,3 +1,4 @@
+/* LINTLIBRARY */
 /*-
  * Copyright 1996-1998 John D. Polstra.
  * All rights reserved.
@@ -100,37 +101,7 @@
 	monstartup(&eprol, &etext);
 #endif
 	_init();
-#ifndef __GNUC__dont_care_yet
 	exit( main(argc, argv, env) );
-#else
-	/*
-	 * Some versions of gcc-2 expect the stack frame to be aligned as
-	 * follows after it is set up in main():
-	 *
-	 *  +--------------+ <--- aligned by PREFERRED_STACK_BOUNDARY
-	 *  +%ebp (if any) +
-	 *  +--------------+
-	 *  |return address|
-	 *  +--------------+
-	 *  |  arguments   |
-	 *  |      :       |
-	 *  |      :       |
-	 *  +--------------+
-	 *
-	 * We implement the above to fix just the usual case in FreeBSD-4.
-	 * Alignment for main() is too compiler-dependent to handle correctly
-	 * in all cases here (or in the kernel).  E.g., a different alignment
-	 * is required for at least gcc-2.95.4 even for the small variation
-	 * of compiling main() with -fomit-frame-pointer.
-	 */
-	__asm__("
-	andl	$~0xf, %%rsp		# align stack to 16-byte boundary
-	subq	$8, %%rsp		# align after return address
-	call	main
-	movl	%%eax, %%edi
-	call	exit
-	" : : "D" (argc), "S" (argv), "d" (env) : "ax", "dx", "si", "di", "memory");
-#endif
 }
 
 #ifdef GCRT
@@ -139,4 +110,4 @@
 __asm__(".previous");
 #endif
 
-__asm__(".ident\t\"$FreeBSD: src/lib/csu/i386-elf/crt1.c,v 1.10 2002/09/29 13:42:27 bde Exp $\"");
+__asm__(".ident\t\"$FreeBSD: src/lib/csu/i386-elf/crt1.c,v 1.12 2003/01/26 23:14:47 markm Exp $\"");

==== //depot/projects/hammer/sys/x86_64/acpica/OsdEnvironment.c#4 (text+ko) ====

@@ -24,36 +24,54 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/i386/acpica/OsdEnvironment.c,v 1.6 2002/09/30 18:45:20 jhb Exp $
+ *	$FreeBSD: src/sys/i386/acpica/OsdEnvironment.c,v 1.7 2002/12/18 08:47:07 marcel Exp $
  */
 
 /*
  * 6.1 : Environmental support
  */
+#include <sys/types.h>
+#include <sys/linker_set.h>
+#include <sys/sysctl.h>
 
 #include "acpi.h"
 
+u_long i386_acpi_root;
+
+SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &i386_acpi_root, 0,
+    "The physical address of the RSDP");
+
 ACPI_STATUS
 AcpiOsInitialize(void)
 {
-    return(0);
+	return(0);
 }
 
 ACPI_STATUS
 AcpiOsTerminate(void)
 {
-    return(0);
+	return(0);
 }
 
 ACPI_STATUS
-AcpiOsGetRootPointer(
-    UINT32			Flags,
-    ACPI_POINTER         	*RsdpPhysicalAddress)
+AcpiOsGetRootPointer(UINT32 Flags, ACPI_POINTER *RsdpPhysicalAddress)
 {
-    /*
-     * The loader passes the physical address at which it found the
-     * RSDP in a hint.  We could recover this rather than searching
-     * manually here.
-     */
-    return(AcpiFindRootPointer(Flags, RsdpPhysicalAddress));
+	ACPI_POINTER ptr;
+	ACPI_STATUS status;
+
+	if (i386_acpi_root == 0) {
+		/*
+		 * The loader passes the physical address at which it found the
+		 * RSDP in a hint.  We could recover this rather than searching
+		 * manually here.
+		 */
+		status = AcpiFindRootPointer(Flags, &ptr);
+		if (status == AE_OK)
+			i386_acpi_root = ptr.Pointer.Physical;
+	} else
+		status = AE_OK;
+
+	RsdpPhysicalAddress->PointerType = ACPI_PHYSICAL_POINTER;
+	RsdpPhysicalAddress->Pointer.Physical = i386_acpi_root;
+	return (status);
 }

==== //depot/projects/hammer/sys/x86_64/acpica/acpi_machdep.c#6 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *      $FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.5 2002/10/16 17:20:43 jhb Exp $
+ *      $FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.7 2003/03/03 12:15:48 phk Exp $
  */
 
 #include <sys/param.h>

==== //depot/projects/hammer/sys/x86_64/acpica/acpi_wakeup.c#5 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *      $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.15 2002/10/16 17:22:03 jhb Exp $
+ *      $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.17 2002/12/04 18:40:39 alc Exp $
  */
 #include <sys/param.h>
 #include <sys/bus.h>

==== //depot/projects/hammer/sys/x86_64/conf/GENERIC.hints#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/i386/conf/GENERIC.hints,v 1.10 2002/10/22 17:32:27 jhb Exp $
+# $FreeBSD: src/sys/i386/conf/GENERIC.hints,v 1.11 2002/12/05 22:49:47 jhb Exp $
 hint.fdc.0.at="isa"
 hint.fdc.0.port="0x3F0"
 hint.fdc.0.irq="6"
@@ -14,9 +14,13 @@
 hint.ata.1.port="0x170"
 hint.ata.1.irq="15"
 hint.adv.0.at="isa"
+hint.adv.0.disabled="1"
 hint.bt.0.at="isa"
+hint.bt.0.disabled="1"
 hint.aha.0.at="isa"
+hint.aha.0.disabled="1"
 hint.aic.0.at="isa"
+hint.aic.0.disabled="1"
 hint.atkbdc.0.at="isa"
 hint.atkbdc.0.port="0x060"
 hint.atkbd.0.at="atkbdc"
@@ -28,6 +32,7 @@
 hint.sc.0.at="isa"
 hint.sc.0.flags="0x100"
 hint.vt.0.at="isa"
+hint.vt.0.disabled="1"
 hint.pcic.0.at="isa"
 # hint.pcic.0.irq="10"	# Default to polling
 hint.pcic.0.port="0x3e0"
@@ -55,25 +60,32 @@
 hint.ppc.0.at="isa"
 hint.ppc.0.irq="7"
 hint.ed.0.at="isa"
+hint.ed.0.disabled="1"
 hint.ed.0.port="0x280"
 hint.ed.0.irq="10"
 hint.ed.0.maddr="0xd8000"
 hint.cs.0.at="isa"
+hint.cs.0.disabled="1"
 hint.cs.0.port="0x300"
 hint.sn.0.at="isa"
+hint.sn.0.disabled="1"
 hint.sn.0.port="0x300"
 hint.sn.0.irq="10"
 hint.ie.0.at="isa"
+hint.ie.0.disabled="1"
 hint.ie.0.port="0x300"
 hint.ie.0.irq="10"
 hint.ie.0.maddr="0xd0000"
 hint.fe.0.at="isa"
+hint.fe.0.disabled="1"
 hint.fe.0.port="0x300"
 hint.le.0.at="isa"
+hint.le.0.disabled="1"
 hint.le.0.port="0x300"
 hint.le.0.irq="5"
 hint.le.0.maddr="0xd0000"
 hint.lnc.0.at="isa"
+hint.lnc.0.disabled="1"
 hint.lnc.0.port="0x280"
 hint.lnc.0.irq="10"
 hint.lnc.0.drq="0"

==== //depot/projects/hammer/sys/x86_64/conf/Makefile#2 (text+ko) ====

@@ -1,10 +1,3 @@
-# $FreeBSD: src/sys/i386/conf/Makefile,v 1.7 2002/07/15 17:48:47 jhb Exp $
+# $FreeBSD: src/sys/i386/conf/Makefile,v 1.9 2003/02/26 23:36:58 ru Exp $
 
-all:
-	@echo "make LINT only"
-
-clean:
-	rm -f LINT
-
-LINT: ../../conf/NOTES NOTES ../../conf/makeLINT.sed
-	cat ../../conf/NOTES NOTES | sed -E -n -f ../../conf/makeLINT.sed > LINT
+.include "${.CURDIR}/../../conf/makeLINT.mk"

==== //depot/projects/hammer/sys/x86_64/include/bus_at386.h#2 (text+ko) ====

@@ -67,7 +67,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* $FreeBSD: src/sys/i386/include/bus_at386.h,v 1.19 2002/07/15 13:25:15 markm Exp $ */
+/* $FreeBSD: src/sys/i386/include/bus_at386.h,v 1.21 2003/03/11 19:43:38 jake Exp $ */
 
 #ifndef _I386_BUS_AT386_H_
 #define _I386_BUS_AT386_H_
@@ -97,7 +97,7 @@
 
 #define BUS_SPACE_MAXSIZE_24BIT	0xFFFFFF
 #define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
-#define BUS_SPACE_MAXSIZE	(64 * 1024) /* Maximum supported size */
+#define BUS_SPACE_MAXSIZE	0xFFFFFFFF
 #define BUS_SPACE_MAXADDR_24BIT	0xFFFFFF
 #define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF
 #define BUS_SPACE_MAXADDR	0xFFFFFFFF
@@ -866,7 +866,7 @@
 bus_space_set_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 		      bus_size_t offset, u_int8_t value, size_t count)
 {
-	bus_addr_t addr = bsh + offset;
+	bus_space_handle_t addr = bsh + offset;
 
 #if defined(_I386_BUS_PIO_H_)
 #if defined(_I386_BUS_MEMIO_H_)
@@ -888,7 +888,7 @@
 bus_space_set_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 		     bus_size_t offset, u_int16_t value, size_t count)
 {
-	bus_addr_t addr = bsh + offset;
+	bus_space_handle_t addr = bsh + offset;
 
 #if defined(_I386_BUS_PIO_H_)
 #if defined(_I386_BUS_MEMIO_H_)
@@ -910,7 +910,7 @@
 bus_space_set_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 		      bus_size_t offset, u_int32_t value, size_t count)
 {
-	bus_addr_t addr = bsh + offset;
+	bus_space_handle_t addr = bsh + offset;
 
 #if defined(_I386_BUS_PIO_H_)
 #if defined(_I386_BUS_MEMIO_H_)
@@ -954,7 +954,7 @@
 bus_space_set_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 		       bus_size_t offset, u_int8_t value, size_t count)
 {
-	bus_addr_t addr = bsh + offset;
+	bus_space_handle_t addr = bsh + offset;
 
 #if defined(_I386_BUS_PIO_H_)
 #if defined(_I386_BUS_MEMIO_H_)
@@ -976,7 +976,7 @@
 bus_space_set_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 		       bus_size_t offset, u_int16_t value, size_t count)
 {
-	bus_addr_t addr = bsh + offset;
+	bus_space_handle_t addr = bsh + offset;
 
 #if defined(_I386_BUS_PIO_H_)
 #if defined(_I386_BUS_MEMIO_H_)
@@ -998,7 +998,7 @@
 bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 		       bus_size_t offset, u_int32_t value, size_t count)
 {
-	bus_addr_t addr = bsh + offset;
+	bus_space_handle_t addr = bsh + offset;
 
 #if defined(_I386_BUS_PIO_H_)
 #if defined(_I386_BUS_MEMIO_H_)
@@ -1048,8 +1048,8 @@
 			bus_size_t off1, bus_space_handle_t bsh2,
 			bus_size_t off2, size_t count)
 {
-	bus_addr_t addr1 = bsh1 + off1;
-	bus_addr_t addr2 = bsh2 + off2;
+	bus_space_handle_t addr1 = bsh1 + off1;
+	bus_space_handle_t addr2 = bsh2 + off2;
 
 #if defined(_I386_BUS_PIO_H_)
 #if defined(_I386_BUS_MEMIO_H_)
@@ -1094,8 +1094,8 @@
 			bus_size_t off1, bus_space_handle_t bsh2,
 			bus_size_t off2, size_t count)
 {
-	bus_addr_t addr1 = bsh1 + off1;
-	bus_addr_t addr2 = bsh2 + off2;
+	bus_space_handle_t addr1 = bsh1 + off1;
+	bus_space_handle_t addr2 = bsh2 + off2;
 
 #if defined(_I386_BUS_PIO_H_)
 #if defined(_I386_BUS_MEMIO_H_)
@@ -1140,8 +1140,8 @@
 			bus_size_t off1, bus_space_handle_t bsh2,
 			bus_size_t off2, size_t count)
 {
-	bus_addr_t addr1 = bsh1 + off1;
-	bus_addr_t addr2 = bsh2 + off2;
+	bus_space_handle_t addr1 = bsh1 + off1;
+	bus_space_handle_t addr2 = bsh2 + off2;
 
 #if defined(_I386_BUS_PIO_H_)
 #if defined(_I386_BUS_MEMIO_H_)

==== //depot/projects/hammer/sys/x86_64/include/bus_dma.h#3 (text+ko) ====

@@ -67,7 +67,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* $FreeBSD: src/sys/i386/include/bus_dma.h,v 1.16 2002/10/04 20:40:37 sam Exp $ */
+/* $FreeBSD: src/sys/i386/include/bus_dma.h,v 1.17 2003/01/29 07:25:26 scottl Exp $ */
 
 #ifndef _I386_BUS_DMA_H_
 #define _I386_BUS_DMA_H_
@@ -180,6 +180,9 @@
  * bus device space based on the constraints lited in the dma tag.
  * A dmamap to for use with dmamap_load is also allocated.
  */
+int bus_dmamem_alloc_size(bus_dma_tag_t dmat, void** vaddr, int flags,
+			  bus_dmamap_t *mapp, bus_size_t size);
+
 int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
 		     bus_dmamap_t *mapp);
 
@@ -187,6 +190,9 @@
  * Free a piece of memory and it's allociated dmamap, that was allocated
  * via bus_dmamem_alloc.
  */
+void bus_dmamem_free_size(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map,
+			  bus_size_t size);
+
 void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map);
 
 /*

==== //depot/projects/hammer/sys/x86_64/include/clock.h#5 (text+ko) ====

@@ -3,7 +3,7 @@
  * Garrett Wollman, September 1994.
  * This file is in the public domain.
  *
- * $FreeBSD: src/sys/i386/include/clock.h,v 1.41 2002/03/20 05:48:58 alfred Exp $
+ * $FreeBSD: src/sys/i386/include/clock.h,v 1.44 2003/02/05 09:20:40 phk Exp $
  */
 
 #ifndef _MACHINE_CLOCK_H_
@@ -16,10 +16,12 @@
  */
 extern int	adjkerntz;
 extern int	disable_rtc_set;
+extern int	pscnt;
+extern int	psdiv;
 extern int	statclock_disable;
 extern u_int	timer_freq;
 extern int	timer0_max_count;
-extern u_int	tsc_freq;
+extern uint64_t	tsc_freq;
 extern int	tsc_is_broken;
 extern int	wall_cmos_clock;
 
@@ -34,6 +36,7 @@
 int	release_timer2(void);
 int	rtcin(int val);
 int	sysbeep(int pitch, int period);
+void	init_TSC(void);
 
 #endif /* _KERNEL */
 

==== //depot/projects/hammer/sys/x86_64/include/cpu.h#5 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)cpu.h	5.4 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/i386/include/cpu.h,v 1.66 2002/03/20 05:48:58 alfred Exp $
+ * $FreeBSD: src/sys/i386/include/cpu.h,v 1.67 2003/02/05 08:55:10 phk Exp $
  */
 
 #ifndef _MACHINE_CPU_H_
@@ -84,7 +84,7 @@
 
 /*
  * Return contents of in-cpu fast counter as a sort of "bogo-time"
- * for non-critical timing.
+ * for random-harvesting purposes.
  */
 static __inline u_int64_t
 get_cyclecount(void)

==== //depot/projects/hammer/sys/x86_64/include/float.h#3 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)float.h	7.1 (Berkeley) 5/8/90
- * $FreeBSD: src/sys/i386/include/float.h,v 1.9 2002/10/25 07:02:52 imp Exp $
+ * $FreeBSD: src/sys/i386/include/float.h,v 1.10 2003/02/08 20:37:54 mike Exp $
  */
 
 #ifndef _MACHINE_FLOAT_H_
@@ -39,6 +39,8 @@
 
 #define FLT_RADIX	2		/* b */
 #define FLT_ROUNDS	1		/* FP addition rounds to nearest */
+#define	FLT_EVAL_METHOD	(-1)		/* i387 semantics are...interesting */
+#define	DECIMAL_DIG	21		/* max precision in decimal digits */
 
 #define FLT_MANT_DIG	24		/* p */
 #define FLT_EPSILON	1.19209290E-07F	/* b**(1-p) */

==== //depot/projects/hammer/sys/x86_64/include/floatingpoint.h#2 (text+ko) ====

@@ -31,100 +31,12 @@
  * SUCH DAMAGE.
  *
  *	from: @(#) floatingpoint.h	1.0 (Berkeley) 9/23/93
- * $FreeBSD: src/sys/i386/include/floatingpoint.h,v 1.12 2002/06/01 17:39:46 bde Exp $
+ * $FreeBSD: src/sys/i386/include/floatingpoint.h,v 1.13 2003/01/19 06:01:33 marcel Exp $
  */
 
 #ifndef _FLOATINGPOINT_H_
 #define _FLOATINGPOINT_H_
 
-/*
- * IEEE floating point structure and function definitions
- */
-
-/*-
- * XXX the following undocumented pollution is exported:
- *	fpsetsticky().
- *	FP*FLD, FP*OFF and FP*REG from <machine/ieeefp.h>
- */
-
-#include <sys/cdefs.h>
 #include <machine/ieeefp.h>
 
-#ifdef __GNUC__
-
-#define __fldenv(addr)	__asm __volatile("fldenv %0" : : "m" (*(addr)))
-#define __fnstenv(addr)	__asm __volatile("fnstenv %0" : "=m" (*(addr)))
-#define __fnstcw(addr)	__asm __volatile("fnstcw %0" : "=m" (*(addr)))
-#define __fnstsw(addr)	__asm __volatile("fnstsw %0" : "=m" (*(addr)))
-
-/*
- * return the contents of a FP register
- */
-static __inline__ int
-__fpgetreg(int _reg)
-{
-	unsigned short _mem;
-
-	/*-
-	 * This is more efficient than it looks.  The switch gets optimized
-	 * away if _reg is constant.
-	 *
-	 * The default case only supports _reg == 0.  We could handle more
-	 * registers (e.g., tags) using fnstenv, but the interface doesn't
-	 * support more.
-	 */
-	switch(_reg) {
-	default:
-		__fnstcw(&_mem);
-		break;
-	case FP_STKY_REG:
-		__fnstsw(&_mem);
-		break;
-	}
-	return _mem;
-}
-
-/*
- * set a FP mode; return previous mode
- */
-static __inline__ int
-__fpsetreg(int _m, int _reg, int _fld, int _off)
-{
-	unsigned _env[7];
-	unsigned _p;
-
-	/*
-	 * _reg == 0 could be handled better using fnstcw/fldcw.
-	 */
-	__fnstenv(_env);
-	_p =  (_env[_reg] & _fld) >> _off;
-	_env[_reg] = (_env[_reg] & ~_fld) | (_m << _off & _fld);
-	__fldenv(_env);
-	return _p;
-}
-
-#endif /* __GNUC__ */
-
-/*
- * SysV/386 FP control interface
- */
-#define	fpgetround()	((fp_rnd_t)					\
-	((__fpgetreg(FP_RND_REG) & FP_RND_FLD) >> FP_RND_OFF))
-#define	fpsetround(m)	((fp_rnd_t)					\
-	__fpsetreg((m), FP_RND_REG, FP_RND_FLD, FP_RND_OFF))
-#define	fpgetprec()	((fp_prec_t)					\
-	((__fpgetreg(FP_PRC_REG) & FP_PRC_FLD) >> FP_PRC_OFF))
-#define	fpsetprec(m)	((fp_prec_t)					\
-	__fpsetreg((m), FP_PRC_REG, FP_PRC_FLD, FP_PRC_OFF))
-#define	fpgetmask()	((fp_except_t)					\
-	((~__fpgetreg(FP_MSKS_REG) & FP_MSKS_FLD) >> FP_MSKS_OFF))
-#define	fpsetmask(m)	((fp_except_t)					\
-	(~__fpsetreg(~(m), FP_MSKS_REG, FP_MSKS_FLD, FP_MSKS_OFF)) &	\
-	    (FP_MSKS_FLD >> FP_MSKS_OFF))
-#define	fpgetsticky()	((fp_except_t)					\
-	((__fpgetreg(FP_STKY_REG) & FP_STKY_FLD) >> FP_STKY_OFF))
-#define	fpresetsticky(m) ((fp_except_t)					\
-	__fpsetreg(0, FP_STKY_REG, (m), FP_STKY_OFF))
-#define	fpsetsticky(m)	fpresetsticky(m)
-
 #endif /* !_FLOATINGPOINT_H_ */

==== //depot/projects/hammer/sys/x86_64/include/md_var.h#9 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/include/md_var.h,v 1.54 2002/10/25 19:10:56 peter Exp $
+ * $FreeBSD: src/sys/i386/include/md_var.h,v 1.59 2003/01/22 18:18:45 jhb Exp $
  */
 
 #ifndef _MACHINE_MD_VAR_H_
@@ -39,9 +39,12 @@
 extern	long	Maxmem;
 extern	u_int	atdevbase;	/* offset in virtual memory of ISA io mem */
 extern	int	busdma_swi_pending;
+extern	u_int	cpu_exthigh;
 extern	u_int	cpu_feature;
+extern	u_int	cpu_fxsr;
 extern	u_int	cpu_high;
 extern	u_int	cpu_id;
+extern	u_int	cpu_procinfo;
 extern	char	cpu_vendor[];
 extern	uint16_t *elan_mmcr;
 extern	char	kstack[];
@@ -71,6 +74,7 @@
 void	doreti_popl_es_fault(void) __asm(__STRING(doreti_popl_es_fault));
 void	doreti_popl_fs(void) __asm(__STRING(doreti_popl_fs));
 void	doreti_popl_fs_fault(void) __asm(__STRING(doreti_popl_fs_fault));
+void	enable_sse(void);
 void	fillw(int /*u_short*/ pat, void *base, size_t cnt);
 void	pagezero(void *addr);
 void	init_AMD_Elan_sc520(void);

==== //depot/projects/hammer/sys/x86_64/include/pci_cfgreg.h#4 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/include/pci_cfgreg.h,v 1.8 2002/09/06 22:15:44 jhb Exp $
+ * $FreeBSD: src/sys/i386/include/pci_cfgreg.h,v 1.9 2003/02/18 03:36:48 peter Exp $
  *
  */
 

==== //depot/projects/hammer/sys/x86_64/include/pmap.h#5 (text+ko) ====

@@ -42,7 +42,7 @@
  *
  *	from: hp300: @(#)pmap.h	7.2 (Berkeley) 12/16/90
  *	from: @(#)pmap.h	7.4 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/i386/include/pmap.h,v 1.81 2002/08/05 03:40:28 alc Exp $
+ * $FreeBSD: src/sys/i386/include/pmap.h,v 1.88 2003/02/27 20:13:20 alc Exp $
  */
 
 #ifndef _MACHINE_PMAP_H_
@@ -131,10 +131,10 @@
 typedef u_int64_t pdp_entry_t;
 typedef u_int64_t pml4_entry_t;
 
-#define PML4ESIZE	sizeof(pml4_entry_t) /* for assembly files */
-#define PDPESIZE	sizeof(pdp_entry_t) /* for assembly files */
-#define PDESIZE		sizeof(pd_entry_t) /* for assembly files */
-#define PTESIZE		sizeof(pt_entry_t) /* for assembly files */
+#define	PML4ESHIFT	(2)
+#define	PDPESHIFT	(2)
+#define	PTESHIFT	(2)
+#define	PDESHIFT	(2)
 
 /*
  * Address of current and alternate address space page table maps
@@ -150,8 +150,7 @@
 extern pd_entry_t	PDmap[], APDmap[];
 extern pdp_entry_t	PDPmap[], APDPmap[];
 extern pml4_entry_t	PML4[], APML4;
-extern pd_entry_t	PML4pml4e, APML4pml4e;
-
+extern pd_entry_t	PML4pml4e[], APML4pml4e[];
 
 extern pd_entry_t *IdlePML4;	/* physical address of "Idle" state directory */
 #endif
@@ -206,7 +205,6 @@
 	TAILQ_HEAD(,pv_entry)	pm_pvlist;	/* list of mappings in pmap */
 	int			pm_active;	/* active on cpus */
 	struct pmap_statistics	pm_stats;	/* pmap statistics */
-	struct	vm_page		*pm_ptphint;	/* pmap ptp hint */
 	LIST_ENTRY(pmap) 	pm_list;	/* List of all pmaps */
 };
 
@@ -232,11 +230,6 @@
 	vm_page_t	pv_ptem;	/* VM page for pte */
 } *pv_entry_t;
 
-#define	PV_ENTRY_NULL	((pv_entry_t) 0)
-
-#define	PV_CI		0x01	/* all entries must be cache inhibited */
-#define	PV_PTPAGE	0x02	/* entry maps a page table page */
-
 #ifdef	_KERNEL
 
 #define NPPROVMTRR		8
@@ -262,7 +255,6 @@
 void	*pmap_mapdev(vm_offset_t, vm_size_t);
 void	pmap_unmapdev(vm_offset_t, vm_size_t);
 pt_entry_t *pmap_pte(pmap_t, vm_offset_t) __pure2;
-vm_page_t pmap_use_pt(pmap_t, vm_offset_t);
 void	pmap_set_opt(void);
 void	pmap_invalidate_page(pmap_t, vm_offset_t);
 void	pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t);

==== //depot/projects/hammer/sys/x86_64/include/segments.h#10 (text+ko) ====

@@ -35,7 +35,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)segments.h	7.1 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/i386/include/segments.h,v 1.32 2002/09/26 05:07:41 peter Exp $
+ * $FreeBSD: src/sys/i386/include/segments.h,v 1.33 2003/01/28 19:05:44 jake Exp $
  */
 
 #ifndef _MACHINE_SEGMENTS_H_

==== //depot/projects/hammer/sys/x86_64/include/signal.h#7 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)signal.h	8.1 (Berkeley) 6/11/93
- * $FreeBSD: src/sys/i386/include/signal.h,v 1.19 2002/11/16 06:35:52 deischen Exp $
+ * $FreeBSD: src/sys/i386/include/signal.h,v 1.20 2002/12/02 19:58:55 deischen Exp $
  */
 
 #ifndef _MACHINE_SIGNAL_H_
@@ -74,7 +74,7 @@
 struct sigcontext {
 	struct __sigset sc_mask;	/* signal mask to restore */
 	int	sc_onstack;		/* sigstack state to restore */
-	int	sc_gs;			/* machine state (struct trapframe): */
+	int	sc_gs;			/* machine state (struct trapframe) */
 	int	sc_fs;
 	int	sc_es;
 	int	sc_ds;
@@ -100,7 +100,7 @@
 	int	sc_fpformat;
 	int	sc_ownedfp;
 	int	sc_spare1[1];
-	int	sc_fpstate[128];
+	int	sc_fpstate[128] __aligned(16);
 	int	sc_spare2[8];
 };
 

==== //depot/projects/hammer/sys/x86_64/include/specialreg.h#5 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)specialreg.h	7.1 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/i386/include/specialreg.h,v 1.21 2002/06/22 23:00:33 mp Exp $
+ * $FreeBSD: src/sys/i386/include/specialreg.h,v 1.23 2003/01/22 17:26:18 jhb Exp $
  */
 
 #ifndef _MACHINE_SPECIALREG_H_
@@ -114,12 +114,20 @@
 #define	CPUID_XMM	0x02000000
 #define	CPUID_SSE2	0x04000000
 #define	CPUID_SS	0x08000000
-#define	CPUID_HHT	0x10000000
+#define	CPUID_HTT	0x10000000
 #define	CPUID_TM	0x20000000
 #define	CPUID_B30	0x40000000
 #define	CPUID_PBE	0x80000000
 
 /*
+ * CPUID instruction 1 ebx info
+ */
+#define	CPUID_BRAND_INDEX	0x000000ff
+#define	CPUID_CLFUSH_SIZE	0x0000ff00
+#define	CPUID_HTT_CORES		0x00ff0000
+#define	CPUID_LOCAL_APIC_ID	0xff000000
+
+/*
  * Model-specific registers for the i386 family
  */
 #define MSR_P5_MC_ADDR		0x000

==== //depot/projects/hammer/sys/x86_64/include/ucontext.h#6 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/include/ucontext.h,v 1.9 2002/11/16 06:35:52 deischen Exp $
+ * $FreeBSD: src/sys/i386/include/ucontext.h,v 1.10 2002/12/02 19:58:55 deischen Exp $
  */
 
 #ifndef _MACHINE_UCONTEXT_H_
@@ -38,7 +38,7 @@
 	 * and ucontext_t at the same time.
 	 */
 	int	mc_onstack;		/* XXX - sigcontext compat. */
-	int	mc_gs;			/* machine state (trapframe) */
+	int	mc_gs;			/* machine state (struct trapframe) */
 	int	mc_fs;
 	int	mc_es;
 	int	mc_ds;
@@ -67,15 +67,17 @@
 #define	_MC_FPOWNED_PCB		0x20002	/* FP state came from PCB */
 	int	mc_ownedfp;
 	int	mc_spare1[1];		/* align next field to 16 bytes */
-	int	mc_fpstate[128];	/* must be multiple of 16 bytes */
+	/*
+	 * See <machine/npx.h> for the internals of mc_fpstate[].
+	 */
+	int	mc_fpstate[128] __aligned(16);
 	int	mc_spare2[8];
 } mcontext_t;
 
 #if defined(_KERNEL) && defined(COMPAT_FREEBSD4)
-/* For 4.x binaries */
 struct mcontext4 {
 	int	mc_onstack;		/* XXX - sigcontext compat. */
-	int	mc_gs;
+	int	mc_gs;			/* machine state (struct trapframe) */
 	int	mc_fs;
 	int	mc_es;
 	int	mc_ds;

==== //depot/projects/hammer/sys/x86_64/include/vmparam.h#3 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)vmparam.h	5.9 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/i386/include/vmparam.h,v 1.33 2000/03/30 07:17:01 peter Exp $
+ * $FreeBSD: src/sys/i386/include/vmparam.h,v 1.34 2003/02/24 20:29:52 jake Exp $
  */
 
 

==== //depot/projects/hammer/sys/x86_64/isa/clock.c#7 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)clock.c	7.2 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/i386/isa/clock.c,v 1.190 2002/10/17 13:55:39 iwasaki Exp $
+ * $FreeBSD: src/sys/i386/isa/clock.c,v 1.195 2003/02/11 11:43:25 phk Exp $
  */
 
 /*
@@ -52,6 +52,7 @@
 #include "opt_isa.h"
 
 #include <sys/param.h>
+#include <sys/stdint.h>
 #include <sys/systm.h>
 #include <sys/bus.h>
 #include <sys/lock.h>
@@ -110,15 +111,14 @@
 int	adjkerntz;		/* local offset from GMT in seconds */
 int	clkintr_pending;
 int	disable_rtc_set;	/* disable resettodr() if != 0 */
+int	pscnt = 1;
+int	psdiv = 1;
 int	statclock_disable;
 #ifndef TIMER_FREQ
 #define TIMER_FREQ   1193182
 #endif
 u_int	timer_freq = TIMER_FREQ;
 int	timer0_max_count;
-u_int	tsc_freq;
-int	tsc_is_broken;
-u_int	tsc_present;
 int	wall_cmos_clock;	/* wall CMOS clock assumed if != 0 */
 struct mtx clock_lock;
 
@@ -151,17 +151,8 @@
 static	void	(*timer_func)(struct clockframe *frame) = hardclock;
 
 static	unsigned i8254_get_timecount(struct timecounter *tc);
-static	unsigned tsc_get_timecount(struct timecounter *tc);
 static	void	set_timer_freq(u_int freq, int intr_freq);
 
-static struct timecounter tsc_timecounter = {
-	tsc_get_timecount,	/* get_timecount */
-	0,			/* no poll_pps */
- 	~0u,			/* counter_mask */
-	0,			/* frequency */
-	 "TSC"			/* name */
-};
-
 static struct timecounter i8254_timecounter = {
 	i8254_get_timecount,	/* get_timecount */
 	0,			/* no poll_pps */
@@ -345,7 +336,13 @@
 rtcintr(struct clockframe frame)
 {
 	while (rtcin(RTC_INTR) & RTCIR_PERIOD) {
-		statclock(&frame);
+		if (profprocs != 0) {
+			if (--pscnt == 0)
+				pscnt = psdiv;
+			profclock(&frame);
+		}
+		if (pscnt == psdiv)
+			statclock(&frame);
 	}
 }
 
@@ -546,7 +543,6 @@
 static u_int
 calibrate_clocks(void)
 {
-	u_int64_t old_tsc;
 	u_int count, prev_count, tot_count;
 	int sec, start_sec, timeout;
 
@@ -584,11 +580,6 @@
 		goto fail;
 	tot_count = 0;
 
-	if (tsc_present) 
-		old_tsc = rdtsc();
-	else
-		old_tsc = 0;		/* shut up gcc */
-
 	/*
 	 * Wait for the mc146818A seconds counter to change.  Read the i8254
 	 * counter for each iteration since this is convenient and only
@@ -617,16 +608,7 @@
 			goto fail;
 	}
 
-	/*
-	 * Read the cpu cycle counter.  The timing considerations are
-	 * similar to those for the i8254 clock.
-	 */
-	if (tsc_present) 
-		tsc_freq = rdtsc() - old_tsc;
-
 	if (bootverbose) {
-		if (tsc_present)
-		        printf("TSC clock: %u Hz, ", tsc_freq);
 	        printf("i8254 clock: %u Hz\n", tot_count);
 	}
 	return (tot_count);
@@ -664,11 +646,6 @@
 {
 	u_int delta, freq;
 
-	if (cpu_feature & CPUID_TSC)
-		tsc_present = 1;
-	else
-		tsc_present = 0;
-
 	writertc(RTC_STATUSA, rtc_statusa);
 	writertc(RTC_STATUSB, RTCSB_24HR);
 
@@ -702,64 +679,13 @@
 			printf(
 		    "%d Hz differs from default of %d Hz by more than 1%%\n",
 			       freq, timer_freq);
-		tsc_freq = 0;
 	}
 
 	set_timer_freq(timer_freq, hz);
 	i8254_timecounter.tc_frequency = timer_freq;
 	tc_init(&i8254_timecounter);
 
-#ifndef CLK_USE_TSC_CALIBRATION
-	if (tsc_freq != 0) {
-		if (bootverbose)
-			printf(
-"CLK_USE_TSC_CALIBRATION not specified - using old calibration method\n");
-		tsc_freq = 0;
-	}
-#endif
-	if (tsc_present && tsc_freq == 0) {
-		/*
-		 * Calibration of the i586 clock relative to the mc146818A
-		 * clock failed.  Do a less accurate calibration relative
-		 * to the i8254 clock.
-		 */
-		u_int64_t old_tsc = rdtsc();
-
-		DELAY(1000000);
-		tsc_freq = rdtsc() - old_tsc;
-#ifdef CLK_USE_TSC_CALIBRATION
-		if (bootverbose)
-			printf("TSC clock: %u Hz (Method B)\n", tsc_freq);
-#endif
-	}
-
-	/*
-	 * We can not use the TSC in SMP mode, until we figure out a
-	 * cheap (impossible), reliable and precise (yeah right!)  way
-	 * to synchronize the TSCs of all the CPUs.
-	 * Curse Intel for leaving the counter out of the I/O APIC.
-	 */
-
-	/*
-	 * We can not use the TSC if we support APM. Precise timekeeping
-	 * on an APM'ed machine is at best a fools pursuit, since 
-	 * any and all of the time spent in various SMM code can't 
-	 * be reliably accounted for.  Reading the RTC is your only
-	 * source of reliable time info.  The i8254 looses too of course

>>> TRUNCATED FOR MAIL (1000 lines) <<<

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303130131.h2D1VT3G066163>