Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2003 16:03:09 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 30174 for review
Message-ID:  <200304302303.h3UN39l4041392@repoman.freebsd.org>

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

Change 30174 by peter@peter_daintree on 2003/04/30 16:02:34

	rename x86_64/... into amd64/...

Affected files ...

.. //depot/projects/hammer/sys/amd64/Makefile#1 branch
.. //depot/projects/hammer/sys/amd64/acpica/OsdEnvironment.c#1 branch
.. //depot/projects/hammer/sys/amd64/acpica/acpi_machdep.c#1 branch
.. //depot/projects/hammer/sys/amd64/acpica/acpi_wakeup.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/atomic.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/autoconf.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/busdma_machdep.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/critical.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/dump_machdep.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/elf_machdep.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/exception.s#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/genassym.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/identcpu.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/in_cksum.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/initcpu.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/legacy.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/locore.s#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/machdep.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/mem.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/nexus.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/pmap.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/sigtramp.s#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/support.s#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/swtch.s#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/sys_machdep.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/trap.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/tsc.c#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#1 branch
.. //depot/projects/hammer/sys/amd64/compile/.cvsignore#2 integrate
.. //depot/projects/hammer/sys/amd64/conf/GENERIC#1 branch
.. //depot/projects/hammer/sys/amd64/conf/GENERIC.hints#1 branch
.. //depot/projects/hammer/sys/amd64/conf/Makefile#1 branch
.. //depot/projects/hammer/sys/amd64/conf/gethints.awk#1 branch
.. //depot/projects/hammer/sys/amd64/include/_inttypes.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/_limits.h#2 integrate
.. //depot/projects/hammer/sys/amd64/include/_stdint.h#2 integrate
.. //depot/projects/hammer/sys/amd64/include/_types.h#2 integrate
.. //depot/projects/hammer/sys/amd64/include/asm.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/asmacros.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/atomic.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/bus.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/bus_at386.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/bus_dma.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/bus_memio.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/bus_pio.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/clock.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/cpu.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/cpufunc.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/cputypes.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/critical.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/db_machdep.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/elf.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/endian.h#2 integrate
.. //depot/projects/hammer/sys/amd64/include/exec.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/float.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/floatingpoint.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/frame.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/in_cksum.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/kse.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/legacyvar.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/limits.h#2 integrate
.. //depot/projects/hammer/sys/amd64/include/md_var.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/mutex.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/npx.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/param.h#2 integrate
.. //depot/projects/hammer/sys/amd64/include/pc/display.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/pcb.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/pcb_ext.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/pci_cfgreg.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/pcpu.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/pmap.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/proc.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/profile.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/psl.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/ptrace.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/reg.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/reloc.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/resource.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/runq.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/segments.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/setjmp.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/sigframe.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/signal.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/smp.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/specialreg.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/stdarg.h#2 integrate
.. //depot/projects/hammer/sys/amd64/include/sysarch.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/trap.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/tss.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/ucontext.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/varargs.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/vmparam.h#1 branch
.. //depot/projects/hammer/sys/amd64/isa/clock.c#1 branch
.. //depot/projects/hammer/sys/amd64/isa/icu.h#1 branch
.. //depot/projects/hammer/sys/amd64/isa/icu_ipl.s#1 branch
.. //depot/projects/hammer/sys/amd64/isa/icu_vector.s#1 branch
.. //depot/projects/hammer/sys/amd64/isa/intr_machdep.c#1 branch
.. //depot/projects/hammer/sys/amd64/isa/intr_machdep.h#1 branch
.. //depot/projects/hammer/sys/amd64/isa/isa.c#1 branch
.. //depot/projects/hammer/sys/amd64/isa/isa.h#1 branch
.. //depot/projects/hammer/sys/amd64/isa/isa_dma.c#1 branch
.. //depot/projects/hammer/sys/amd64/isa/isa_dma.h#1 branch
.. //depot/projects/hammer/sys/amd64/isa/ithread.c#1 branch
.. //depot/projects/hammer/sys/amd64/isa/npx.c#1 branch
.. //depot/projects/hammer/sys/amd64/isa/timerreg.h#1 branch
.. //depot/projects/hammer/sys/amd64/isa/vector.s#1 branch
.. //depot/projects/hammer/sys/amd64/pci/pci_bus.c#1 branch
.. //depot/projects/hammer/sys/amd64/pci/pci_cfgreg.c#1 branch

Differences ...

==== //depot/projects/hammer/sys/amd64/compile/.cvsignore#2 (text+ko) ====


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


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


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

@@ -56,6 +56,8 @@
  */
 typedef	__int32_t	__clock_t;		/* clock()... */
 typedef	__int64_t	__critical_t;
+typedef	double		__double_t;
+typedef	double		__float_t;
 typedef	__int64_t	__intfptr_t;
 typedef	__int64_t	__intmax_t;
 typedef	__int64_t	__intptr_t;
@@ -72,7 +74,7 @@
 typedef	__int64_t	__segsz_t;		/* segment size (in pages) */
 typedef	__uint64_t	__size_t;		/* sizeof() */
 typedef	__int64_t	__ssize_t;		/* byte count or error */
-typedef	__int32_t	__time_t;		/* time()... */
+typedef	__int64_t	__time_t;		/* time()... */
 typedef	__uint64_t	__uintfptr_t;
 typedef	__uint64_t	__uintmax_t;
 typedef	__uint64_t	__uintptr_t;

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

@@ -74,25 +74,26 @@
    __asm ("rorl $16, %0" : "+r" (__X)); \
    __X; })
 
-#if defined(_KERNEL)
 #define __byte_swap_int(x) \
 __extension__ ({ register __uint32_t __X = (x); \
    __asm ("bswap %0" : "+r" (__X)); \
    __X; })
-#endif
+
+#define __byte_swap_long(x) \
+__extension__ ({ register __uint64_t __X = (x); \
+   __asm ("bswap %0" : "+r" (__X)); \
+   __X; })
 
 #define __byte_swap_word(x) \
 __extension__ ({ register __uint16_t __X = (x); \
-   __asm ("xchgb %h0, %b0" : "+q" (__X)); \
+   __asm ("xchgb %h0, %b0" : "+Q" (__X)); \
    __X; })
 
 static __inline __uint64_t
 __bswap64(__uint64_t _x)
 {
-	return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) |
-	    ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) |
-	    ((_x << 24) & ((__uint64_t)0xff << 40)) |
-	    ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56)));
+
+	return (__byte_swap_long(_x));
 }
 
 static __inline __uint32_t

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


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

@@ -40,7 +40,7 @@
  */
 
 /*
- * Machine dependent constants for the AMD64.
+ * Machine dependent constants for AMD64.
  */
 
 /*
@@ -55,7 +55,7 @@
  *
  */
 #ifndef _ALIGNBYTES
-#define	_ALIGNBYTES	(sizeof(int) - 1)
+#define	_ALIGNBYTES	(sizeof(long) - 1)
 #endif
 #ifndef _ALIGN
 #define	_ALIGN(p)	(((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
@@ -83,40 +83,71 @@
 #define	MACHINE_ARCH	"amd64"
 #endif
 
-#ifdef SMP
-#define MAXCPU		16
-#else
 #define MAXCPU		1
-#endif /* SMP */
 
 #define	ALIGNBYTES		_ALIGNBYTES
 #define	ALIGN(p)		_ALIGN(p)
 #define	ALIGNED_POINTER(p,t)	_ALIGNED_POINTER((p),(t))
 
+/* Size of the level 1 page table units */
+#define NPTEPG		(PAGE_SIZE/(sizeof (pt_entry_t)))
 #define PAGE_SHIFT	12		/* LOG2(PAGE_SIZE) */
 #define PAGE_SIZE	(1<<PAGE_SHIFT)	/* bytes/page */
 #define PAGE_MASK	(PAGE_SIZE-1)
-#define NPTEPG		(PAGE_SIZE/(sizeof (pt_entry_t)))
+/* Size of the level 2 page directory units */
+#define	NPDEPG		(PAGE_SIZE/(sizeof (pd_entry_t)))
+#define	PDRSHIFT	21              /* LOG2(NBPDR) */
+#define	NBPDR		(1<<PDRSHIFT)   /* bytes/page dir */
+#define	PDRMASK		(NBPDR-1)
+/* Size of the level 3 page directory pointer table units */
+#define	NPDPEPG		(PAGE_SIZE/(sizeof (pdp_entry_t)))
+#define	PDPSHIFT	30		/* LOG2(NBPDP) */
+#define	NBPDP		(1<<PDPSHIFT)	/* bytes/page dir ptr table */
+#define	PDPMASK		(NBPDP-1)
+/* Size of the level 4 page-map level-4 table units */
+#define	NPML4EPG	(PAGE_SIZE/(sizeof (pml4_entry_t)))
+#define	PML4SHIFT	39		/* LOG2(NBPML4T) */
+#define	NBPML4T		(1ul<<PML4SHIFT)/* bytes/page map lev4 table */
+#define	PML4MASK	(NBPML4T-1)
 
-#define	KERNBASE	0x0000000000000000LL	/* start of kernel virtual */
-#define	BTOPKERNBASE	((u_long)KERNBASE >> PGSHIFT)
+#define NKPML4E		1		/* addressable number of page tables/pde's */
+#define NKPDPE		1		/* addressable number of page tables/pde's */
+#define NPGPTD		4
+ 
+#define NBPTD           (NPGPTD<<PAGE_SHIFT)
+#define NPDEPTD         (NBPTD/(sizeof (pd_entry_t)))
 
 #define IOPAGES	2		/* pages of i/o permission bitmap */
 
-#ifndef KSTACK_PAGES
-#define	KSTACK_PAGES	2		/* pages of kstack (with pcb) */
+#define	KSTACK_PAGES	4	/* pages of kstack (with pcb) */
+#define UAREA_PAGES	1	/* holds struct user WITHOUT PCB (see def.) */
+
+#define KSTACK_GUARD	1	/* compile in the kstack guard page */
+
+/*
+ * Ceiling on amount of swblock kva space, can be changed via
+ * the kern.maxswzone /boot/loader.conf variable.
+ */
+#ifndef VM_SWZONE_SIZE_MAX
+#define	VM_SWZONE_SIZE_MAX	(32 * 1024 * 1024)
 #endif
-#define UAREA_PAGES	1	/* holds struct user WITHOUT PCB (see def.) */
 
-#define KSTACK_GUARD	1		/* compile in the kstack guard page */
+/*
+ * Ceiling on size of buffer cache (really only effects write queueing,
+ * the VM page cache is not effected), can be changed via
+ * the kern.maxbcache /boot/loader.conf variable.
+ */
+#ifndef VM_BCACHE_SIZE_MAX
+#define	VM_BCACHE_SIZE_MAX	(200 * 1024 * 1024)
+#endif
 
 /*
  * Mach derived conversion macros
  */
 #define	round_page(x)	((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK))
 #define	trunc_page(x)	((unsigned long)(x) & ~(PAGE_MASK))
-#define trunc_4mpage(x)	((unsigned)(x) & ~PDRMASK)
-#define round_4mpage(x)	((((unsigned)(x)) + PDRMASK) & ~PDRMASK)
+#define trunc_2mpage(x)	((unsigned long)(x) & ~PDRMASK)
+#define round_2mpage(x)	((((unsigned long)(x)) + PDRMASK) & ~PDRMASK)
 
 #define	atop(x)		((unsigned long)(x) >> PAGE_SHIFT)
 #define	ptoa(x)		((unsigned long)(x) << PAGE_SHIFT)
@@ -124,7 +155,7 @@
 #define	amd64_btop(x)	((unsigned long)(x) >> PAGE_SHIFT)
 #define	amd64_ptob(x)	((unsigned long)(x) << PAGE_SHIFT)
 
-#define	pgtok(x)	((x) * (PAGE_SIZE / 1024)) 
+#define	pgtok(x)	((unsigned long)(x) * (PAGE_SIZE / 1024)) 
 
 #endif /* !_MACHINE_PARAM_H_ */
 #endif /* !_NO_NAMESPACE_POLLUTION */

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



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