From a92953496ab9da27b410a3b3d5a28405decc38d3 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 7 Nov 2006 06:43:25 +0000 Subject: [PATCH] Major kernel build infrastructure changes, part 1/2 (sys). These changes are primarily designed to create a 2-layer machine and cpu build hierarchy in order to support virtual kernel builds in the near term and future porting efforts in the long term. * Split arch/ into a set of platform architectures under machine/ and a set of cpu architectures under cpu/. All platform and cpu header files will be accessible via . Platform header files may override cpu header files (the platform header file then typically #include's the cpu header file). * Any cpu header files that are not overridden will be copied directly into /usr/include/machine/, allowing the platform to omit those header files (not have to create degenerate forwarding header files). * All source files access platform and cpu architecture files via the path. The path should only be used by platform header files when including the lower level cpu header files. * Require both the 'machine' and the 'machine_arch' directives in the kernel config file. * When building modules in the presence of a kernel config, use the IF files, use*.h files, and opt*.h files provided by the kernel config and do not generate them in each module's object directory. This streamlines the module build considerably. --- sys/Makefile | 6 +- sys/boot/pc32/libi386/Makefile | 29 +-- sys/bus/cam/scsi/scsi_low.h | 4 +- sys/bus/isa/i386/isa_dma.c | 4 +- sys/bus/isa/pnpeat.c | 6 +- sys/bus/isa/syscons_isa.c | 4 +- sys/conf/acpi.mk | 4 +- sys/conf/bsd.kern.mk | 4 +- sys/conf/kern.post.mk | 10 +- sys/conf/kern.pre.mk | 28 ++- sys/conf/kmod.mk | 44 +++- sys/config/GENERIC | 5 +- sys/config/LINT | 11 +- sys/config/TINDERBOX | 5 +- sys/config/VKERNEL | 6 +- sys/cpu/i386/include/asm.h | 8 +- sys/cpu/i386/include/asmacros.h | 8 +- sys/cpu/i386/include/atomic.h | 8 +- sys/cpu/i386/include/bus_at386.h | 11 +- sys/cpu/i386/include/bus_dma.h | 12 +- sys/cpu/i386/include/coredump.h | 6 +- sys/cpu/i386/include/cpu.h | 8 +- sys/cpu/i386/include/cpufunc.h | 8 +- sys/cpu/i386/include/cputypes.h | 8 +- sys/cpu/i386/include/db_machdep.h | 15 +- sys/cpu/i386/include/elf.h | 8 +- sys/cpu/i386/include/endian.h | 8 +- sys/cpu/i386/include/frame.h | 8 +- sys/cpu/i386/include/inttypes.h | 8 +- sys/cpu/i386/include/limits.h | 8 +- sys/cpu/i386/include/npx.h | 8 +- sys/cpu/i386/include/param.h | 32 +-- sys/cpu/i386/include/pmap.h | 210 +----------------- sys/cpu/i386/include/psl.h | 8 +- sys/cpu/i386/include/reg.h | 28 +-- sys/cpu/i386/include/segments.h | 8 +- sys/cpu/i386/include/signal.h | 8 +- sys/cpu/i386/include/specialreg.h | 12 +- sys/cpu/i386/include/stdarg.h | 8 +- sys/cpu/i386/include/stdint.h | 16 +- sys/cpu/i386/include/trap.h | 8 +- sys/cpu/i386/include/tss.h | 8 +- sys/cpu/i386/include/types.h | 13 +- sys/cpu/i386/include/ucontext.h | 8 +- sys/cpu/i386/include/vm86.h | 8 +- sys/ddb/ddb.h | 6 +- sys/dev/acpica5/Makefile | 4 +- sys/dev/est/Makefile | 4 +- sys/dev/misc/syscons/apm/apm_saver.c | 4 +- sys/dev/netif/fe/if_fe.c | 4 +- sys/dev/netif/fe/if_fe_isa.c | 4 +- sys/dev/netif/fe/if_fe_pccard.c | 4 +- sys/dev/netif/ie/if_ie.c | 6 +- sys/dev/netif/le/if_le.c | 8 +- sys/dev/netif/pdq_layer/pdq_ifsubr.c | 4 +- sys/dev/netif/rdp/if_rdp.c | 6 +- sys/dev/netif/rdp/if_rdpreg.h | 4 +- sys/dev/serial/cy/cy.c | 4 +- sys/dev/serial/cy/cy_pci.c | 4 +- sys/dev/serial/rc/rc.c | 4 +- sys/dev/serial/stl/stallion.c | 6 +- sys/emulation/linux/Makefile | 4 +- sys/kern/Makefile | 4 +- sys/kern/Makefile.misc | 6 +- sys/kern/kern_memio.c | 4 +- sys/kern/kern_mib.c | 6 +- sys/netgraph/tty/ng_tty.c | 4 +- sys/platform/pc32/acpica5/acpi_machdep.c | 4 +- sys/platform/pc32/acpica5/acpi_wakeup.c | 4 +- sys/platform/pc32/acpica5/madt.c | 6 +- sys/platform/pc32/apic/apic_abi.c | 6 +- sys/platform/pc32/apic/apic_vector.s | 6 +- sys/platform/pc32/apic/mpapic.c | 6 +- sys/platform/pc32/apic/mpapic.h | 4 +- sys/platform/pc32/apm/apm.c | 4 +- sys/platform/pc32/conf/Makefile | 4 +- sys/platform/pc32/conf/files | 130 +++++------ sys/platform/pc32/i386/autoconf.c | 4 +- sys/platform/pc32/i386/genassym.c | 4 +- sys/platform/pc32/i386/identcpu.c | 6 +- sys/platform/pc32/i386/machdep.c | 4 +- sys/platform/pc32/i386/mem.c | 4 +- sys/platform/pc32/i386/mp_machdep.c | 10 +- sys/platform/pc32/i386/mpboot.s | 4 +- sys/platform/pc32/i386/mplock.s | 4 +- sys/platform/pc32/i386/nexus.c | 6 +- sys/platform/pc32/i386/pmap.c | 4 +- sys/platform/pc32/i386/swtch.s | 4 +- sys/platform/pc32/i386/trap.c | 4 +- sys/platform/pc32/i386/userconfig.c | 4 +- sys/platform/pc32/i386/vm86.c | 4 +- sys/platform/pc32/icu/icu_abi.c | 4 +- sys/platform/pc32/icu/icu_vector.s | 4 +- sys/platform/pc32/include/ipl.h | 6 +- sys/platform/pc32/include/lock.h | 4 +- sys/platform/pc32/include/param.h | 26 +++ .../i386 => platform/pc32}/include/pmap.h | 40 +--- sys/platform/pc32/include/smp.h | 4 +- .../i386 => platform/pc32}/include/types.h | 37 +-- sys/platform/pc32/isa/clock.c | 8 +- sys/platform/pc32/isa/intr_machdep.c | 6 +- sys/platform/pc32/isa/ipl_funcs.c | 4 +- sys/platform/pc32/isa/npx.c | 6 +- sys/platform/pc32/isa/prof_machdep.c | 4 +- sys/platform/vkernel/conf/Makefile | 4 +- sys/platform/vkernel/i386/genassym.c | 4 +- sys/{cpu/i386/include/types.h => sys/reg.h} | 65 ++---- sys/sys/sysctl.h | 5 +- 108 files changed, 513 insertions(+), 747 deletions(-) create mode 100644 sys/platform/pc32/include/param.h copy sys/{cpu/i386 => platform/pc32}/include/pmap.h (84%) copy sys/{cpu/i386 => platform/pc32}/include/types.h (67%) copy sys/{cpu/i386/include/types.h => sys/reg.h} (54%) diff --git a/sys/Makefile b/sys/Makefile index 76ddce3553..df1802adc5 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -1,10 +1,8 @@ # $FreeBSD: src/sys/Makefile,v 1.20.2.1 2000/07/10 08:22:34 obrien Exp $ -# $DragonFly: src/sys/Makefile,v 1.14 2006/10/22 16:09:09 dillon Exp $ +# $DragonFly: src/sys/Makefile,v 1.15 2006/11/07 06:43:18 dillon Exp $ # This is the old aout only boot loader. -.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/boot) && ${OBJFORMAT} == "aout" -SUBDIR= arch/${MACHINE_ARCH}/boot -.elif exists(${.CURDIR}/boot) && ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" +.if exists(${.CURDIR}/boot) && ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" SUBDIR= boot .endif diff --git a/sys/boot/pc32/libi386/Makefile b/sys/boot/pc32/libi386/Makefile index 19467f48a5..812cb6c3aa 100644 --- a/sys/boot/pc32/libi386/Makefile +++ b/sys/boot/pc32/libi386/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.32 2003/07/02 12:45:45 ru Exp $ -# $DragonFly: src/sys/boot/pc32/libi386/Makefile,v 1.7 2006/10/22 18:43:52 dillon Exp $ +# $DragonFly: src/sys/boot/pc32/libi386/Makefile,v 1.8 2006/11/07 06:43:19 dillon Exp $ # LIB= i386 INTERNALLIB= true @@ -35,18 +35,19 @@ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../btx/lib \ # the location of libstand CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ -# Make "machine" required for all objects -# (based on the more complete case in sys/arch/i386/boot/Makefile.inc) -${SRCS:M*.c:R:S/$/.o/g}: machine - -# If it's not there, don't consider it a target -.if exists(${.CURDIR}/../../../arch/i386/include) -beforedepend ${OBJS}: machine - -CLEANFILES+= machine -machine: - ${LN} -sf ${.CURDIR}/../../../arch/i386/include machine - -.endif +# XXX removed +## Make "machine" required for all objects +## (based on the more complete case in sys/arch/i386/boot/Makefile.inc) +#${SRCS:M*.c:R:S/$/.o/g}: machine +# +## If it's not there, don't consider it a target +#.if exists(${.CURDIR}/../../../arch/i386/include) +#beforedepend ${OBJS}: machine +# +#CLEANFILES+= machine +#machine: +# ${LN} -sf ${.CURDIR}/../../../arch/i386/include machine +# +#.endif .include diff --git a/sys/bus/cam/scsi/scsi_low.h b/sys/bus/cam/scsi/scsi_low.h index 79a8414cd3..3dd4367cbe 100644 --- a/sys/bus/cam/scsi/scsi_low.h +++ b/sys/bus/cam/scsi/scsi_low.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/cam/scsi/scsi_low.h,v 1.1.2.4 2001/07/22 00:21:41 non Exp $ */ -/* $DragonFly: src/sys/bus/cam/scsi/scsi_low.h,v 1.10 2006/10/23 21:50:31 dillon Exp $ */ +/* $DragonFly: src/sys/bus/cam/scsi/scsi_low.h,v 1.11 2006/11/07 06:43:20 dillon Exp $ */ /* $NecBSD: scsi_low.h,v 1.24.10.5 2001/06/26 07:31:46 honda Exp $ */ /* $NetBSD$ */ @@ -55,7 +55,7 @@ #include #include "scsi_dvcfg.h" -#include +#include #undef MSG_IDENTIFY #define SCSI_LOW_DEBUGGER(dev) Debugger((dev)) diff --git a/sys/bus/isa/i386/isa_dma.c b/sys/bus/isa/i386/isa_dma.c index 08080363f8..2b50556ee9 100644 --- a/sys/bus/isa/i386/isa_dma.c +++ b/sys/bus/isa/i386/isa_dma.c @@ -35,7 +35,7 @@ * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 * $FreeBSD: src/sys/i386/isa/isa_dma.c,v 1.4.2.1 2000/08/08 19:49:53 peter Exp $ - * $DragonFly: src/sys/bus/isa/i386/isa_dma.c,v 1.10 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/bus/isa/i386/isa_dma.c,v 1.11 2006/11/07 06:43:22 dillon Exp $ */ /* @@ -58,7 +58,7 @@ #include #include #include "isa.h" -#include +#include #include /* diff --git a/sys/bus/isa/pnpeat.c b/sys/bus/isa/pnpeat.c index 08346e97fb..f12fea6860 100644 --- a/sys/bus/isa/pnpeat.c +++ b/sys/bus/isa/pnpeat.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/nexus.c,v 1.26.2.10 2003/02/22 13:16:45 imp Exp $ - * $DragonFly: src/sys/bus/isa/pnpeat.c,v 1.3 2006/10/25 20:55:51 dillon Exp $ + * $DragonFly: src/sys/bus/isa/pnpeat.c,v 1.4 2006/11/07 06:43:21 dillon Exp $ */ /* @@ -56,11 +56,11 @@ #include #include -#include +#include #include #include -#include +#include /* * Placeholder which claims PnP 'devices' which describe system diff --git a/sys/bus/isa/syscons_isa.c b/sys/bus/isa/syscons_isa.c index e7853c4665..4c84ba7c05 100644 --- a/sys/bus/isa/syscons_isa.c +++ b/sys/bus/isa/syscons_isa.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/isa/syscons_isa.c,v 1.11.2.2 2001/08/01 10:42:28 yokota Exp $ - * $DragonFly: src/sys/bus/isa/syscons_isa.c,v 1.8 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/bus/isa/syscons_isa.c,v 1.9 2006/11/07 06:43:21 dillon Exp $ */ #include "opt_syscons.h" @@ -48,7 +48,7 @@ #include #include -#include +#include #define BIOS_CLKED (1 << 6) #define BIOS_NLKED (1 << 5) diff --git a/sys/conf/acpi.mk b/sys/conf/acpi.mk index a9583b2d2d..677c04384e 100644 --- a/sys/conf/acpi.mk +++ b/sys/conf/acpi.mk @@ -1,10 +1,10 @@ -# $DragonFly: src/sys/conf/acpi.mk,v 1.3 2006/10/22 16:09:19 dillon Exp $ +# $DragonFly: src/sys/conf/acpi.mk,v 1.4 2006/11/07 06:43:22 dillon Exp $ # ACPICA_VERSION= 20050309 ACPICA_DIR?= contrib/dev/acpica-unix-${ACPICA_VERSION} OSACPI_MI_DIR?= dev/acpica5 -OSACPI_MD_DIR?= arch/${MACHINE_ARCH}/acpica5 +OSACPI_MD_DIR?= machine/${MACHINE}/acpica5 .if !defined(SYSDIR) && defined(S) SYSDIR= $S diff --git a/sys/conf/bsd.kern.mk b/sys/conf/bsd.kern.mk index 0c2e278ff5..1853fbb852 100644 --- a/sys/conf/bsd.kern.mk +++ b/sys/conf/bsd.kern.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.kern.mk,v 1.17.2.1 2001/08/01 16:56:56 obrien Exp $ -# $DragonFly: src/sys/conf/bsd.kern.mk,v 1.10 2006/10/22 16:09:19 dillon Exp $ +# $DragonFly: src/sys/conf/bsd.kern.mk,v 1.11 2006/11/07 06:43:22 dillon Exp $ # # Warning flags for compiling the kernel and components of the kernel. @@ -32,4 +32,4 @@ CFLAGS+= -fno-common # CFLAGS+= -ffreestanding -.include "../arch/${MACHINE_ARCH}/conf/kern-${MACHINE_ARCH}.mk" +.include "../machine/${MACHINE}/conf/kern.mk" diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index abc87c8cdc..4a70cd5ab4 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -1,4 +1,4 @@ -# $DragonFly: src/sys/conf/kern.post.mk,v 1.2 2006/10/22 16:09:19 dillon Exp $ +# $DragonFly: src/sys/conf/kern.post.mk,v 1.3 2006/11/07 06:43:22 dillon Exp $ # # This Makefile covers the bottom part of the MI build instructions # @@ -42,11 +42,11 @@ kernel-clean: #lint: /tmp # @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \ -# $S/arch/$M/$M/Locore.c ${CFILES} ioconf.c | \ +# $S/machine/$P/$M/Locore.c ${CFILES} ioconf.c | \ # grep -v 'struct/union .* never defined' | \ # grep -v 'possible pointer alignment problem' -locore.o: $S/arch/$M/$M/locore.s assym.s +locore.o: $S/machine/$P/$M/locore.s assym.s ${NORMAL_S} # This is a hack. BFD "optimizes" away dynamic mode if there are no @@ -63,8 +63,8 @@ hack.So: Makefile assym.s: $S/kern/genassym.sh genassym.o sh $S/kern/genassym.sh genassym.o > ${.TARGET} -genassym.o: $S/arch/$M/$M/genassym.c - ${CC} -c ${CFLAGS:N-fno-common} $S/arch/$M/$M/genassym.c +genassym.o: $S/machine/$P/$M/genassym.c + ${CC} -c ${CFLAGS:N-fno-common} $S/machine/$P/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index eb9e83f56d..5709d31436 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -1,4 +1,4 @@ -# $DragonFly: src/sys/conf/kern.pre.mk,v 1.2 2006/10/22 16:09:19 dillon Exp $ +# $DragonFly: src/sys/conf/kern.pre.mk,v 1.3 2006/11/07 06:43:22 dillon Exp $ # # This Makefile covers the top part of the MI kernel build instructions # @@ -9,6 +9,9 @@ KERNEL?= kernel # build this target if none is specified on the command line .MAIN: all +# Set the platform and machine architectures +# +P= ${MACHINE} M= ${MACHINE_ARCH} SIZE?= size @@ -19,8 +22,18 @@ COPTFLAGS?=-O -pipe COPTFLAGS+= ${_CPUCFLAGS} .endif # don't use -I- so we can use proper source-relative locality for local -# includes -INCLUDES= -nostdinc -I. -I$S -I$S/arch +# includes. +# +# -I. - this is to access the opt_*.h and use_*.h header files generated +# in the kernel build directory. +# +# -Iinclude +# - this is used to access forwarding header files for +# that exist in the cpu architecture but do not +# exist in the platform (machine/) architecture. This allows +# the platform to trivially override the cpu header files. +# +INCLUDES= -nostdinc -I. -Iinclude -I$S # This hack is to allow kernel compiles to succeed on machines w/out srcdist .if exists($S/../include) INCLUDES+= -I$S/../include @@ -64,18 +77,17 @@ PROFILE_C= ${CC} -c ${CFLAGS} ${.IMPSRC} NORMAL_M= awk -f $S/tools/makeobjops.awk -- -c $<; \ ${CC} -c ${CFLAGS} ${PROF} ${.PREFIX}.c -GEN_CFILES= $S/arch/$M/$M/genassym.c +GEN_CFILES= $S/machine/$P/$M/genassym.c SYSTEM_CFILES= ioconf.c config.c -SYSTEM_SFILES= $S/arch/$M/$M/locore.s +SYSTEM_SFILES= $S/machine/$P/$M/locore.s SYSTEM_DEP= Makefile ${SYSTEM_OBJS} SYSTEM_OBJS= locore.o ${OBJS} ioconf.o config.o hack.So -SYSTEM_LD= @${LD} -Bdynamic -T $S/arch/$M/conf/ldscript.$M \ +SYSTEM_LD= @${LD} -Bdynamic -T $S/machine/$P/conf/ldscript.$M \ -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ ${SIZE} ${.TARGET} ; chmod 755 ${.TARGET} -SYSTEM_DEP+= $S/arch/$M/conf/ldscript.$M - +SYSTEM_DEP+= $S/machine/$P/conf/ldscript.$M # Normalize output files to make it absolutely crystal clear to # anyone examining the build directory. diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 15e6c8f324..bed2e10efd 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -1,6 +1,6 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 # $FreeBSD: src/sys/conf/kmod.mk,v 1.82.2.15 2003/02/10 13:11:50 nyan Exp $ -# $DragonFly: src/sys/conf/kmod.mk,v 1.27 2006/10/23 21:50:31 dillon Exp $ +# $DragonFly: src/sys/conf/kmod.mk,v 1.28 2006/11/07 06:43:22 dillon Exp $ # # The include file handles installing Kernel Loadable Device # drivers (KLD's). @@ -83,12 +83,19 @@ CFLAGS+= -nostdinc ${_ICFLAGS} # set because there are no standard paths for non-headers. # # NOTE! Traditional architecture paths such as -# must run through the "arch" softlink using . An -# explicit cross-architecture path must operate relative to /usr/src/sys -# using e.g. +# must run through the "machine_base" softlink using +# . An explicit cross-architecture path must +# operate relative to /usr/src/sys using e.g. # CFLAGS+= -I. -I@ +# Add -I paths for headers in the kernel build directory +# +.if defined(BUILDING_WITH_KERNEL) +CFLAGS+= -I${BUILDING_WITH_KERNEL} +CFLAGS+= -I${BUILDING_WITH_KERNEL}/include +.endif + # Add a -I path to standard headers like . Use a relative # path to src/include if possible. If the @ symlink hasn't been built # yet, then we can't tell if the relative path exists. Add both the @@ -138,7 +145,15 @@ ${KMOD}.kld: ${OBJS} .include .endif -_ILINKS=@ arch machine +# links to platform and cpu architecture include files. If we are +# building with a kernel these already exist in the kernel build dir. +# '@' is a link to the system source. +.if defined(BUILDING_WITH_KERNEL) +_ILINKS=@ +.else +_ILINKS=@ machine_base machine cpu_base cpu +.endif + .if defined(ARCH) _ILINKS+=${ARCH} .endif @@ -172,10 +187,14 @@ S= ${SYSDIR} ${_ILINKS}: @case ${.TARGET} in \ - arch) \ - path=${SYSDIR}/arch/${MACHINE_ARCH} ;; \ machine) \ - path=${SYSDIR}/arch/${MACHINE_ARCH}/include ;; \ + path=${SYSDIR}/machine/${MACHINE}/include ;; \ + machine_base) \ + path=${SYSDIR}/machine/${MACHINE} ;; \ + cpu) \ + path=${SYSDIR}/cpu/${MACHINE_ARCH}/include ;; \ + cpu_base) \ + path=${SYSDIR}/cpu/${MACHINE_ARCH} ;; \ @) \ path=${SYSDIR} ;; \ arch_*) \ @@ -231,7 +250,9 @@ CLEANFILES+= ${_src} .if !target(${_src}) .if defined(BUILDING_WITH_KERNEL) && exists(${BUILDING_WITH_KERNEL}/${_src}) ${_src}: ${BUILDING_WITH_KERNEL}/${_src} - cp ${BUILDING_WITH_KERNEL}/${_src} ${.TARGET} +# we do not have to copy these files any more, the kernel build +# directory is included in the path now. +# cp ${BUILDING_WITH_KERNEL}/${_src} ${.TARGET} .else ${_src}: touch ${.TARGET} @@ -257,8 +278,13 @@ ${_src}: @ .if exists(@) ${_src}: @/tools/makeobjops.awk @/${_srcsrc} .endif + +.if defined(BUILDING_WITH_KERNEL) && \ + exists(${BUILDING_WITH_KERNEL}/${_src}) +.else awk -f @/tools/makeobjops.awk -- -${_ext} @/${_srcsrc} .endif +.endif .endfor # _src .endfor # _ext .endfor # _srcsrc diff --git a/sys/config/GENERIC b/sys/config/GENERIC index bdfad0fd0a..c405244bdb 100644 --- a/sys/config/GENERIC +++ b/sys/config/GENERIC @@ -4,9 +4,10 @@ # Check the LINT configuration file in sys/config, for an # exhaustive list of options. # -# $DragonFly: src/sys/config/GENERIC,v 1.41 2006/10/24 17:09:46 swildner Exp $ +# $DragonFly: src/sys/config/GENERIC,v 1.42 2006/11/07 06:43:22 dillon Exp $ -machine i386 +machine pc32 +machine_arch i386 cpu I386_CPU cpu I486_CPU cpu I586_CPU diff --git a/sys/config/LINT b/sys/config/LINT index 374f4bfed7..643b712151 100644 --- a/sys/config/LINT +++ b/sys/config/LINT @@ -3,19 +3,18 @@ # as much of the source tree as it can. # # $FreeBSD: src/sys/i386/conf/LINT,v 1.749.2.144 2003/06/04 17:56:59 sam Exp $ -# $DragonFly: src/sys/config/LINT,v 1.93 2006/09/05 15:38:58 dillon Exp $ +# $DragonFly: src/sys/config/LINT,v 1.94 2006/11/07 06:43:22 dillon Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from # this file as required. # +# These directives are mandatory. The machine directive specifies the +# platform and the machine_arch directive specifies the cpu architecture. # -# This directive is mandatory; it defines the architecture to be -# configured for; in this case, the 386 family based IBM-PC and -# compatibles. -# -machine i386 +machine pc32 +machine_arch i386 # # This is the ``identification'' of the kernel. Usually this should diff --git a/sys/config/TINDERBOX b/sys/config/TINDERBOX index 5027535d49..4559c929ba 100644 --- a/sys/config/TINDERBOX +++ b/sys/config/TINDERBOX @@ -1,8 +1,9 @@ # DragonFly BSD Tinderbox Configuration File # -# $DragonFly: src/sys/config/Attic/TINDERBOX,v 1.20 2006/10/22 16:09:19 dillon Exp $ +# $DragonFly: src/sys/config/Attic/TINDERBOX,v 1.21 2006/11/07 06:43:22 dillon Exp $ -machine i386 +machine pc32 +machine_arch i386 cpu I686_CPU ident TINDERBOX maxusers 0 diff --git a/sys/config/VKERNEL b/sys/config/VKERNEL index 601adb092e..ee24905ff4 100644 --- a/sys/config/VKERNEL +++ b/sys/config/VKERNEL @@ -1,9 +1,9 @@ # VKERNEL - test rid for virtual kernel # -# $DragonFly: src/sys/config/VKERNEL,v 1.2 2006/10/23 18:01:15 dillon Exp $ +# $DragonFly: src/sys/config/VKERNEL,v 1.3 2006/11/07 06:43:22 dillon Exp $ -machine vkernel # machine architecture -cpu_arch i386 # creates infrastructure +machine vkernel # platform architecture (i386, vkernel, etc) +machine_arch i386 # cpu architecture (i386, etc) ident VKERNEL maxusers 0 diff --git a/sys/cpu/i386/include/asm.h b/sys/cpu/i386/include/asm.h index 9dba110909..fec6f805e1 100644 --- a/sys/cpu/i386/include/asm.h +++ b/sys/cpu/i386/include/asm.h @@ -35,11 +35,11 @@ * * from: @(#)DEFS.h 5.1 (Berkeley) 4/23/90 * $FreeBSD: src/sys/i386/include/asm.h,v 1.7 2000/01/25 09:01:55 bde Exp $ - * $DragonFly: src/sys/cpu/i386/include/asm.h,v 1.3 2004/03/20 16:27:41 drhodus Exp $ + * $DragonFly: src/sys/cpu/i386/include/asm.h,v 1.4 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_ASM_H_ -#define _MACHINE_ASM_H_ +#ifndef _CPU_ASM_H_ +#define _CPU_ASM_H_ #include @@ -164,4 +164,4 @@ #endif /* _ARCH_INDIRECT */ -#endif /* !_MACHINE_ASM_H_ */ +#endif /* !_CPU_ASM_H_ */ diff --git a/sys/cpu/i386/include/asmacros.h b/sys/cpu/i386/include/asmacros.h index 82062462b6..f385c9c9d5 100644 --- a/sys/cpu/i386/include/asmacros.h +++ b/sys/cpu/i386/include/asmacros.h @@ -31,11 +31,11 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/asmacros.h,v 1.18 1999/08/28 00:44:06 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/asmacros.h,v 1.10 2006/05/20 02:42:06 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/asmacros.h,v 1.11 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_ASMACROS_H_ -#define _MACHINE_ASMACROS_H_ +#ifndef _CPU_ASMACROS_H_ +#define _CPU_ASMACROS_H_ #ifndef _SYS_CDEFS_H_ #include @@ -153,4 +153,4 @@ #define MEXITCOUNT #endif /* GPROF */ -#endif /* !_MACHINE_ASMACROS_H_ */ +#endif /* !_CPU_ASMACROS_H_ */ diff --git a/sys/cpu/i386/include/atomic.h b/sys/cpu/i386/include/atomic.h index 0f66afe5f0..3274c7649d 100644 --- a/sys/cpu/i386/include/atomic.h +++ b/sys/cpu/i386/include/atomic.h @@ -24,10 +24,10 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/atomic.h,v 1.9.2.1 2000/07/07 00:38:47 obrien Exp $ - * $DragonFly: src/sys/cpu/i386/include/atomic.h,v 1.22 2006/10/01 12:09:29 victor Exp $ + * $DragonFly: src/sys/cpu/i386/include/atomic.h,v 1.23 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_ATOMIC_H_ -#define _MACHINE_ATOMIC_H_ +#ifndef _CPU_ATOMIC_H_ +#define _CPU_ATOMIC_H_ #ifndef _SYS_TYPES_H_ #include @@ -367,4 +367,4 @@ atomic_cmpset_int(volatile u_int *_dst, u_int _old, u_int _new) } #endif /* KLD_MODULE */ -#endif /* ! _MACHINE_ATOMIC_H_ */ +#endif /* ! _CPU_ATOMIC_H_ */ diff --git a/sys/cpu/i386/include/bus_at386.h b/sys/cpu/i386/include/bus_at386.h index 86cb36693f..3b36bb6abb 100644 --- a/sys/cpu/i386/include/bus_at386.h +++ b/sys/cpu/i386/include/bus_at386.h @@ -66,12 +66,13 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (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.8.2.3 2002/03/03 05:42:50 nyan Exp $ + * $DragonFly: src/sys/cpu/i386/include/bus_at386.h,v 1.10 2006/11/07 06:43:22 dillon Exp $ */ -/* $FreeBSD: src/sys/i386/include/bus_at386.h,v 1.8.2.3 2002/03/03 05:42:50 nyan Exp $ */ -/* $DragonFly: src/sys/cpu/i386/include/bus_at386.h,v 1.9 2006/10/25 20:55:51 dillon Exp $ */ -#ifndef _MACHINE_BUS_AT386_H_ -#define _MACHINE_BUS_AT386_H_ +#ifndef _CPU_BUS_AT386_H_ +#define _CPU_BUS_AT386_H_ #include @@ -884,4 +885,4 @@ bus_space_barrier(bus_space_tag_t tag __unused, bus_space_handle_t bsh __unused, __asm __volatile("" : : : "memory"); } -#endif /* _MACHINE_BUS_AT386_H_ */ +#endif /* _CPU_BUS_AT386_H_ */ diff --git a/sys/cpu/i386/include/bus_dma.h b/sys/cpu/i386/include/bus_dma.h index 972441a441..c30e0cb302 100644 --- a/sys/cpu/i386/include/bus_dma.h +++ b/sys/cpu/i386/include/bus_dma.h @@ -29,14 +29,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/bus.h,v 1.7.2.2 2002/03/03 05:42:50 nyan Exp $ - * $DragonFly: src/sys/cpu/i386/include/bus_dma.h,v 1.7 2006/10/25 20:55:51 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/bus_dma.h,v 1.8 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_BUS_DMA_H_ -#define _MACHINE_BUS_DMA_H_ +#ifndef _CPU_BUS_DMA_H_ +#define _CPU_BUS_DMA_H_ -#ifndef _MACHINE_BUS_AT386_H_ -#include +#ifndef _CPU_BUS_AT386_H_ +#include #endif /* @@ -103,4 +103,4 @@ #define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ bus_space_copy_region_4((t), (h1), (o1), (h2), (o2), (c)) -#endif /* _MACHINE_BUS_DMA_H_ */ +#endif /* _CPU_BUS_DMA_H_ */ diff --git a/sys/cpu/i386/include/coredump.h b/sys/cpu/i386/include/coredump.h index 834f3ecf85..8ed3fd9bee 100644 --- a/sys/cpu/i386/include/coredump.h +++ b/sys/cpu/i386/include/coredump.h @@ -1,9 +1,9 @@ /* - * $DragonFly: src/sys/cpu/i386/include/coredump.h,v 1.1 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/coredump.h,v 1.2 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_COREDUMP_H_ -#define _MACHINE_COREDUMP_H_ +#ifndef _CPU_COREDUMP_H_ +#define _CPU_COREDUMP_H_ /* * The pcb is augmented with machine-dependent additional data for * core dumps. For the i386: ??? diff --git a/sys/cpu/i386/include/cpu.h b/sys/cpu/i386/include/cpu.h index c302326d39..7de9f15e65 100644 --- a/sys/cpu/i386/include/cpu.h +++ b/sys/cpu/i386/include/cpu.h @@ -35,7 +35,7 @@ * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/cpu.h,v 1.43.2.2 2001/06/15 09:37:57 scottl Exp $ - * $DragonFly: src/sys/cpu/i386/include/cpu.h,v 1.19 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/cpu.h,v 1.20 2006/11/07 06:43:24 dillon Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -44,13 +44,13 @@ /* * Definitions unique to i386 cpu support. */ -#ifndef _MACHINE_PSL_H_ +#ifndef _CPU_PSL_H_ #include #endif -#ifndef _MACHINE_FRAME_H_ +#ifndef _CPU_FRAME_H_ #include #endif -#ifndef _MACHINE_SEGMENTS_H_ +#ifndef _CPU_SEGMENTS_H_ #include #endif diff --git a/sys/cpu/i386/include/cpufunc.h b/sys/cpu/i386/include/cpufunc.h index 13e5c83d5c..35e49a66b2 100644 --- a/sys/cpu/i386/include/cpufunc.h +++ b/sys/cpu/i386/include/cpufunc.h @@ -31,15 +31,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.96.2.3 2002/04/28 22:50:54 dwmalone Exp $ - * $DragonFly: src/sys/cpu/i386/include/cpufunc.h,v 1.16 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/cpufunc.h,v 1.17 2006/11/07 06:43:22 dillon Exp $ */ /* * Functions to provide access to special i386 instructions. */ -#ifndef _MACHINE_CPUFUNC_H_ -#define _MACHINE_CPUFUNC_H_ +#ifndef _CPU_CPUFUNC_H_ +#define _CPU_CPUFUNC_H_ #ifndef _SYS_TYPES_H_ #include @@ -706,4 +706,4 @@ u_int rcr4 (void); void reset_dbregs (void); __END_DECLS -#endif /* !_MACHINE_CPUFUNC_H_ */ +#endif /* !_CPU_CPUFUNC_H_ */ diff --git a/sys/cpu/i386/include/cputypes.h b/sys/cpu/i386/include/cputypes.h index b264e7b740..ab210d156a 100644 --- a/sys/cpu/i386/include/cputypes.h +++ b/sys/cpu/i386/include/cputypes.h @@ -25,11 +25,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/cputypes.h,v 1.13.2.1 2000/09/30 03:32:20 ps Exp $ - * $DragonFly: src/sys/cpu/i386/include/cputypes.h,v 1.3 2005/11/06 07:28:50 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/cputypes.h,v 1.4 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_CPUTYPES_H_ -#define _MACHINE_CPUTYPES_H_ +#ifndef _CPU_CPUTYPES_H_ +#define _CPU_CPUTYPES_H_ /* * Classes of processor. @@ -73,4 +73,4 @@ extern int cpu_class; extern void additional_cpu_info(const char *); #endif -#endif /* !_MACHINE_CPUTYPES_H_ */ +#endif /* !_CPU_CPUTYPES_H_ */ diff --git a/sys/cpu/i386/include/db_machdep.h b/sys/cpu/i386/include/db_machdep.h index 465c952fb1..2d04024ced 100644 --- a/sys/cpu/i386/include/db_machdep.h +++ b/sys/cpu/i386/include/db_machdep.h @@ -24,16 +24,15 @@ * the rights to redistribute these changes. * * $FreeBSD: src/sys/i386/include/db_machdep.h,v 1.16 1999/10/04 13:55:35 marcel Exp $ - * $DragonFly: src/sys/cpu/i386/include/db_machdep.h,v 1.8 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/db_machdep.h,v 1.9 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_DB_MACHDEP_H_ -#define _MACHINE_DB_MACHDEP_H_ +#ifndef _CPU_DB_MACHDEP_H_ +#define _CPU_DB_MACHDEP_H_ -#include -#include -#include -#include +#include +#include +#include #define i386_saved_state trapframe @@ -95,4 +94,4 @@ extern db_addr_t BP_REGS(db_regs_t *regs); #define DB_SMALL_VALUE_MAX 0x7fffffff #define DB_SMALL_VALUE_MIN (-0x400001) -#endif /* !_MACHINE_DB_MACHDEP_H_ */ +#endif /* !_CPU_DB_MACHDEP_H_ */ diff --git a/sys/cpu/i386/include/elf.h b/sys/cpu/i386/include/elf.h index fbbd329bb3..ae963506f8 100644 --- a/sys/cpu/i386/include/elf.h +++ b/sys/cpu/i386/include/elf.h @@ -24,11 +24,11 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/elf.h,v 1.9.2.1 2001/11/03 01:41:08 ps Exp $ - * $DragonFly: src/sys/cpu/i386/include/elf.h,v 1.7 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/elf.h,v 1.8 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_ELF_H_ -#define _MACHINE_ELF_H_ +#ifndef _CPU_ELF_H_ +#define _CPU_ELF_H_ /* * ELF definitions for the i386 architecture. @@ -162,4 +162,4 @@ __ElfType(Auxinfo); (round_page((vm_offset_t)(vmspace)->vm_daddr + maxdsiz)) #endif /* _KERNEL */ -#endif /* !_MACHINE_ELF_H_ */ +#endif /* !_CPU_ELF_H_ */ diff --git a/sys/cpu/i386/include/endian.h b/sys/cpu/i386/include/endian.h index c9d6bdbd6b..1ac79f1337 100644 --- a/sys/cpu/i386/include/endian.h +++ b/sys/cpu/i386/include/endian.h @@ -34,11 +34,11 @@ * * from: @(#)endian.h 7.8 (Berkeley) 4/3/91 * $FreeBSD: src/sys/i386/include/endian.h,v 1.18 1999/12/29 04:33:01 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/endian.h,v 1.6 2004/11/15 08:16:02 joerg Exp $ + * $DragonFly: src/sys/cpu/i386/include/endian.h,v 1.7 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_ENDIAN_H_ -#define _MACHINE_ENDIAN_H_ +#ifndef _CPU_ENDIAN_H_ +#define _CPU_ENDIAN_H_ #include #include @@ -180,4 +180,4 @@ __bswap64(__uint64_t _x) __END_DECLS -#endif /* !_MACHINE_ENDIAN_H_ */ +#endif /* !_CPU_ENDIAN_H_ */ diff --git a/sys/cpu/i386/include/frame.h b/sys/cpu/i386/include/frame.h index 89b81871da..be4725b5b5 100644 --- a/sys/cpu/i386/include/frame.h +++ b/sys/cpu/i386/include/frame.h @@ -35,11 +35,11 @@ * * from: @(#)frame.h 5.2 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/frame.h,v 1.20 1999/09/29 15:06:22 marcel Exp $ - * $DragonFly: src/sys/cpu/i386/include/frame.h,v 1.5 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/frame.h,v 1.6 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_FRAME_H_ -#define _MACHINE_FRAME_H_ +#ifndef _CPU_FRAME_H_ +#define _CPU_FRAME_H_ /* * System stack frames. @@ -134,4 +134,4 @@ extern int (*pmath_emulate) (struct trapframe *); #define INTR_TO_TRAPFRAME(frame) ((struct trapframe *)&(frame)->if_fs) -#endif /* _MACHINE_FRAME_H_ */ +#endif /* _CPU_FRAME_H_ */ diff --git a/sys/cpu/i386/include/inttypes.h b/sys/cpu/i386/include/inttypes.h index a384f0e0d4..bc259e8411 100644 --- a/sys/cpu/i386/include/inttypes.h +++ b/sys/cpu/i386/include/inttypes.h @@ -35,11 +35,11 @@ * * From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $ * $FreeBSD: src/sys/i386/include/_inttypes.h,v 1.2 2002/06/30 05:48:02 mike Exp $ - * $DragonFly: src/sys/cpu/i386/include/inttypes.h,v 1.1 2003/11/09 02:22:35 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/inttypes.h,v 1.2 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_INTTYPES_H_ -#define _MACHINE_INTTYPES_H_ +#ifndef _CPU_INTTYPES_H_ +#define _CPU_INTTYPES_H_ /* * Macros for format specifiers. @@ -218,4 +218,4 @@ #define SCNxMAX "jx" /* uintmax_t */ #define SCNxPTR "x" /* uintptr_t */ -#endif /* !_MACHINE_INTTYPES_H_ */ +#endif /* !_CPU_INTTYPES_H_ */ diff --git a/sys/cpu/i386/include/limits.h b/sys/cpu/i386/include/limits.h index f5320e5a7b..d1bd50ad69 100644 --- a/sys/cpu/i386/include/limits.h +++ b/sys/cpu/i386/include/limits.h @@ -32,11 +32,11 @@ * * @(#)limits.h 8.3 (Berkeley) 1/4/94 * $FreeBSD: src/sys/i386/include/limits.h,v 1.14.2.2 2000/11/05 09:21:42 obrien Exp $ - * $DragonFly: src/sys/cpu/i386/include/limits.h,v 1.3 2004/09/10 01:45:37 joerg Exp $ + * $DragonFly: src/sys/cpu/i386/include/limits.h,v 1.4 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_LIMITS_H_ -#define _MACHINE_LIMITS_H_ +#ifndef _CPU_LIMITS_H_ +#define _CPU_LIMITS_H_ #define CHAR_BIT 8 /* number of bits in a char */ #define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ @@ -105,4 +105,4 @@ #endif /* !_POSIX_SOURCE */ #endif /* !_ANSI_SOURCE */ -#endif /* !_MACHINE_LIMITS_H_ */ +#endif /* !_CPU_LIMITS_H_ */ diff --git a/sys/cpu/i386/include/npx.h b/sys/cpu/i386/include/npx.h index ce77adfd72..962cb07de8 100644 --- a/sys/cpu/i386/include/npx.h +++ b/sys/cpu/i386/include/npx.h @@ -35,7 +35,7 @@ * * from: @(#)npx.h 5.3 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/npx.h,v 1.18.2.1 2001/08/15 01:23:52 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/npx.h,v 1.9 2006/09/19 11:47:35 corecode Exp $ + * $DragonFly: src/sys/cpu/i386/include/npx.h,v 1.10 2006/11/07 06:43:22 dillon Exp $ */ /* @@ -43,8 +43,8 @@ * W. Jolitz 1/90 */ -#ifndef _MACHINE_NPX_H_ -#define _MACHINE_NPX_H_ +#ifndef _CPU_NPX_H_ +#define _CPU_NPX_H_ #ifndef _SYS_TYPES_H_ #include @@ -155,4 +155,4 @@ void npxinit (u_short control); void npxsave (union savefpu *addr); #endif -#endif /* !_MACHINE_NPX_H_ */ +#endif /* !_CPU_NPX_H_ */ diff --git a/sys/cpu/i386/include/param.h b/sys/cpu/i386/include/param.h index bd570faf04..4324d9b920 100644 --- a/sys/cpu/i386/include/param.h +++ b/sys/cpu/i386/include/param.h @@ -35,24 +35,24 @@ * * from: @(#)param.h 5.8 (Berkeley) 6/28/91 * $FreeBSD: src/sys/i386/include/param.h,v 1.54.2.8 2002/08/31 21:15:55 dillon Exp $ - * $DragonFly: src/sys/cpu/i386/include/param.h,v 1.9 2006/03/24 18:35:33 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/param.h,v 1.10 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_PARAM_H_ +#ifndef _CPU_PARAM_H_ /* * Do not prevent re-includes of if the file was included * with NO_NAMESPACE_POLLUTION, or expected macros will not exist. */ #ifndef _NO_NAMESPACE_POLLUTION -#define _MACHINE_PARAM_H_ +#define _CPU_PARAM_H_ #endif /* * Machine dependent constants for Intel 386. */ -#ifndef _MACHINE_PARAM_H1_ -#define _MACHINE_PARAM_H1_ +#ifndef _CPU_PARAM_H1_ +#define _CPU_PARAM_H1_ /* * Round p (pointer or byte index) up to a correctly-aligned value @@ -66,23 +66,25 @@ #define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) #endif -#ifndef _MACHINE -#define _MACHINE i386 -#endif #ifndef _MACHINE_ARCH -#define _MACHINE_ARCH i386 +#define _MACHINE_ARCH i386 /* cpu architecture */ +#endif +#ifndef _MACHINE_CPU +#define _MACHINE_CPU i386 /* minimum supported cpu rev */ #endif -#endif /* _MACHINE_PARAM_H1_ */ +#endif /* _CPU_PARAM_H1_ */ #ifndef _NO_NAMESPACE_POLLUTION -#ifndef MACHINE -#define MACHINE "i386" -#endif #ifndef MACHINE_ARCH -#define MACHINE_ARCH "i386" +#define MACHINE_ARCH "i386" /* cpu architecture */ #endif + +#ifndef MACHINE_CPU +#define MACHINE_CPU "i386" /* minimum supported cpu rev */ +#endif + #define MID_MACHINE MID_I386 /* @@ -236,4 +238,4 @@ extern void _TSTMP(u_int32_t argument); #endif /* _KERNEL */ #endif /* !_NO_NAMESPACE_POLLUTION */ -#endif /* !_MACHINE_PARAM_H_ */ +#endif /* !_CPU_PARAM_H_ */ diff --git a/sys/cpu/i386/include/pmap.h b/sys/cpu/i386/include/pmap.h index a3d8aafef2..796adc6633 100644 --- a/sys/cpu/i386/include/pmap.h +++ b/sys/cpu/i386/include/pmap.h @@ -43,11 +43,11 @@ * 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.65.2.3 2001/10/03 07:15:37 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/pmap.h,v 1.11 2006/10/21 04:28:21 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/pmap.h,v 1.12 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_PMAP_H_ -#define _MACHINE_PMAP_H_ +#ifndef _CPU_PMAP_H_ +#define _CPU_PMAP_H_ /* * Page-directory and page-table entires follow this format, with a few @@ -83,206 +83,4 @@ #define PGEX_W 0x02 /* during a Write cycle */ #define PGEX_U 0x04 /* access from User mode (UPL) */ -/* - * Size of Kernel address space. This is the number of page table pages - * (4MB each) to use for the kernel. 256 pages == 1 Gigabyte. - * This **MUST** be a multiple of 4 (eg: 252, 256, 260, etc). - */ -#ifndef KVA_PAGES -#define KVA_PAGES 256 -#endif - -/* - * Pte related macros - */ -#define VADDR(pdi, pti) ((vm_offset_t)(((pdi)< KVA_PAGES - 2 -#error "Maximum NKPDE is KVA_PAGES - 2" -#endif - -/* - * The *PTDI values control the layout of virtual memory - * - * XXX This works for now, but I am not real happy with it, I'll fix it - * right after I fix locore.s and the magic 28K hole - * - * SMP_PRIVPAGES: The per-cpu address space is 0xff80000 -> 0xffbfffff - */ -#define APTDPTDI (NPDEPG-1) /* alt ptd entry that points to APTD */ -#define MPPTDI (APTDPTDI-1) /* per cpu ptd entry */ -#define KPTDI (MPPTDI-NKPDE) /* start of kernel virtual pde's */ -#define PTDPTDI (KPTDI-1) /* ptd entry that points to ptd! */ -#define UMAXPTDI (PTDPTDI-1) /* ptd entry for user space end */ -#define UMAXPTEOFF (NPTEPG) /* pte entry for user space end */ - -/* - * XXX doesn't really belong here I guess... - */ -#define ISA_HOLE_START 0xa0000 -#define ISA_HOLE_LENGTH (0x100000-ISA_HOLE_START) - -#ifndef LOCORE - -#ifndef _SYS_TYPES_H_ -#include -#endif -#ifndef _SYS_QUEUE_H_ -#include -#endif -#ifndef _MACHINE_TYPES_H_ -#include -#endif -#ifndef _MACHINE_PARAM_H_ -#include -#endif - -/* - * Address of current and alternate address space page table maps - * and directories. - */ -#ifdef _KERNEL -extern pt_entry_t PTmap[], APTmap[], Upte; -extern pd_entry_t PTD[], APTD[], PTDpde, APTDpde, Upde; - -extern pd_entry_t IdlePTD; /* physical address of "Idle" state directory */ -#endif - -#ifdef _KERNEL -/* - * virtual address to page table entry and - * to physical address. Likewise for alternate address space. - * Note: these work recursively, thus vtopte of a pte will give - * the corresponding pde that in turn maps it. - */ -#define vtopte(va) (PTmap + i386_btop(va)) - -#define avtopte(va) (APTmap + i386_btop(va)) - -/* - * Routine: pmap_kextract - * Function: - * Extract the physical page address associated - * kernel virtual address. - */ -static __inline vm_paddr_t -pmap_kextract(vm_offset_t va) -{ - vm_paddr_t pa; - - if ((pa = (vm_offset_t) PTD[va >> PDRSHIFT]) & PG_PS) { - pa = (pa & ~(NBPDR - 1)) | (va & (NBPDR - 1)); - } else { - pa = *(vm_offset_t *)vtopte(va); - pa = (pa & PG_FRAME) | (va & PAGE_MASK); - } - return pa; -} - -/* - * XXX - */ -#define vtophys(va) pmap_kextract(((vm_offset_t)(va))) -#define vtophys_pte(va) ((pt_entry_t)pmap_kextract(((vm_offset_t)(va)))) - -#define avtophys(va) (((vm_offset_t) (*avtopte(va))&PG_FRAME) | ((vm_offset_t)(va) & PAGE_MASK)) - -#endif - -/* - * Pmap stuff - */ -struct pv_entry; -struct vm_page; -struct vm_object; - -struct md_page { - int pv_list_count; - TAILQ_HEAD(,pv_entry) pv_list; -}; - -/* - * Each machine dependent implementation is expected to - * keep certain statistics. They may do this anyway they - * so choose, but are expected to return the statistics - * in the following structure. - */ -struct pmap_statistics { - long resident_count; /* # of pages mapped (total) */ - long wired_count; /* # of pages wired */ -}; -typedef struct pmap_statistics *pmap_statistics_t; - -struct pmap { - pd_entry_t *pm_pdir; /* KVA of page directory */ - struct vm_object *pm_pteobj; /* Container for pte's */ - TAILQ_ENTRY(pmap) pm_pmnode; /* list of pmaps */ - TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ - int pm_count; /* reference count */ - cpumask_t pm_active; /* active on cpus */ - struct pmap_statistics pm_stats; /* pmap statistics */ - struct vm_page *pm_ptphint; /* pmap ptp hint */ -}; - -#define pmap_resident_count(pmap) (pmap)->pm_stats.resident_count - -typedef struct pmap *pmap_t; - -#ifdef _KERNEL -extern pmap_t kernel_pmap; -#endif - -/* - * For each vm_page_t, there is a list of all currently valid virtual - * mappings of that page. An entry is a pv_entry_t, the list is pv_table. - */ -typedef struct pv_entry { - pmap_t pv_pmap; /* pmap where mapping lies */ - vm_offset_t pv_va; /* virtual address for mapping */ - TAILQ_ENTRY(pv_entry) pv_list; - TAILQ_ENTRY(pv_entry) pv_plist; - struct vm_page *pv_ptem; /* VM page for pte */ -} *pv_entry_t; - -#ifdef _KERNEL - -#define NPPROVMTRR 8 -#define PPRO_VMTRRphysBase0 0x200 -#define PPRO_VMTRRphysMask0 0x201 -struct ppro_vmtrr { - u_int64_t base, mask; -}; -extern struct ppro_vmtrr PPro_vmtrr[NPPROVMTRR]; - -extern caddr_t CADDR1; -extern pt_entry_t *CMAP1; -extern vm_paddr_t avail_end; -extern vm_paddr_t avail_start; -extern vm_offset_t clean_eva; -extern vm_offset_t clean_sva; -extern vm_paddr_t phys_avail[]; -extern char *ptvmmap; /* poor name! */ -extern vm_offset_t virtual_avail; -extern vm_offset_t virtual_end; - -void pmap_bootstrap ( vm_paddr_t, vm_paddr_t); -pmap_t pmap_kernel (void); -void *pmap_mapdev (vm_paddr_t, vm_size_t); -void pmap_unmapdev (vm_offset_t, vm_size_t); -unsigned *pmap_pte (pmap_t, vm_offset_t) __pure2; -struct vm_page *pmap_use_pt (pmap_t, vm_offset_t); -#ifdef SMP -void pmap_set_opt (void); -#endif - -#endif /* _KERNEL */ - -#endif /* !LOCORE */ - -#endif /* !_MACHINE_PMAP_H_ */ +#endif /* !_CPU_PMAP_H_ */ diff --git a/sys/cpu/i386/include/psl.h b/sys/cpu/i386/include/psl.h index 8ac79c5a4e..4a7c4d30e0 100644 --- a/sys/cpu/i386/include/psl.h +++ b/sys/cpu/i386/include/psl.h @@ -35,11 +35,11 @@ * * from: @(#)psl.h 5.2 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/psl.h,v 1.10.2.1 2001/11/22 08:53:35 sobomax Exp $ - * $DragonFly: src/sys/cpu/i386/include/psl.h,v 1.2 2003/06/17 04:28:36 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/psl.h,v 1.3 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_PSL_H_ -#define _MACHINE_PSL_H_ +#ifndef _CPU_PSL_H_ +#define _CPU_PSL_H_ /* * 386 processor status longword. @@ -86,4 +86,4 @@ #define PSL_USERCHANGE (PSL_C | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_T \ | PSL_D | PSL_V | PSL_NT | PSL_AC | PSL_ID) -#endif /* !_MACHINE_PSL_H_ */ +#endif /* !_CPU_PSL_H_ */ diff --git a/sys/cpu/i386/include/reg.h b/sys/cpu/i386/include/reg.h index 5a5bf4c144..3bad279315 100644 --- a/sys/cpu/i386/include/reg.h +++ b/sys/cpu/i386/include/reg.h @@ -35,11 +35,11 @@ * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/reg.h,v 1.22.2.2 2002/11/07 22:47:55 alfred Exp $ - * $DragonFly: src/sys/cpu/i386/include/reg.h,v 1.6 2006/09/19 11:47:35 corecode Exp $ + * $DragonFly: src/sys/cpu/i386/include/reg.h,v 1.7 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_REG_H_ -#define _MACHINE_REG_H_ +#ifndef _CPU_REG_H_ +#define _CPU_REG_H_ /* * Indices for registers in `struct trapframe' and `struct regs'. @@ -139,24 +139,4 @@ struct dbreg { #define DBREG_DRX(d,x) ((&(d)->dr0)[x]) /* reference dr0 - dr7 by register number */ - -#ifdef _KERNEL - -#ifndef _SYS_TYPES_H_ -#include -#endif - -struct proc; -struct lwp; - -/* - * XXX these interfaces are MI, so they should be declared in a MI place. - */ -int set_fpregs (struct lwp *, struct fpreg *); -int set_regs (struct lwp *lp, struct reg *regs); -void setregs (struct lwp *, u_long, u_long, u_long); -int set_dbregs (struct lwp *lp, struct dbreg *dbregs); - -#endif - -#endif /* !_MACHINE_REG_H_ */ +#endif /* !_CPU_REG_H_ */ diff --git a/sys/cpu/i386/include/segments.h b/sys/cpu/i386/include/segments.h index f39a32c71c..3426063f74 100644 --- a/sys/cpu/i386/include/segments.h +++ b/sys/cpu/i386/include/segments.h @@ -36,11 +36,11 @@ * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/segments.h,v 1.24 1999/12/29 04:33:07 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/segments.h,v 1.11 2006/05/20 02:42:06 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/segments.h,v 1.12 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_SEGMENTS_H_ -#define _MACHINE_SEGMENTS_H_ +#ifndef _CPU_SEGMENTS_H_ +#define _CPU_SEGMENTS_H_ /* * 386 Segmentation Data Structures and definitions @@ -271,4 +271,4 @@ void ssdtosd (struct soft_segment_descriptor *ssdp, struct segment_descriptor *sdp); #endif /* _KERNEL */ -#endif /* !_MACHINE_SEGMENTS_H_ */ +#endif /* !_CPU_SEGMENTS_H_ */ diff --git a/sys/cpu/i386/include/signal.h b/sys/cpu/i386/include/signal.h index ad4933efd9..1d3be6203d 100644 --- a/sys/cpu/i386/include/signal.h +++ b/sys/cpu/i386/include/signal.h @@ -32,11 +32,11 @@ * * @(#)signal.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/i386/include/signal.h,v 1.12 1999/11/12 13:52:11 marcel Exp $ - * $DragonFly: src/sys/cpu/i386/include/signal.h,v 1.6 2006/05/20 02:42:06 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/signal.h,v 1.7 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_SIGNAL_H_ -#define _MACHINE_SIGNAL_H_ +#ifndef _CPU_SIGNAL_H_ +#define _CPU_SIGNAL_H_ /* * Machine-dependent signal definitions @@ -109,4 +109,4 @@ struct sigcontext { #endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ -#endif /* !_MACHINE_SIGNAL_H_ */ +#endif /* !_CPU_SIGNAL_H_ */ diff --git a/sys/cpu/i386/include/specialreg.h b/sys/cpu/i386/include/specialreg.h index 04eefeba2b..5fe5b968d2 100644 --- a/sys/cpu/i386/include/specialreg.h +++ b/sys/cpu/i386/include/specialreg.h @@ -32,11 +32,11 @@ * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/specialreg.h,v 1.19.2.3 2003/01/22 17:24:28 jhb Exp $ - * $DragonFly: src/sys/cpu/i386/include/specialreg.h,v 1.5 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/specialreg.h,v 1.6 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_SPECIALREG_H_ -#define _MACHINE_SPECIALREG_H_ +#ifndef _CPU_SPECIALREG_H_ +#define _CPU_SPECIALREG_H_ /* * Bits in 386 special registers: @@ -357,8 +357,8 @@ #ifndef _SYS_TYPES_H_ #include #endif -#ifndef _MACHINE_CPUFUNC_H_ -#include +#ifndef _CPU_CPUFUNC_H_ +#include #endif static __inline u_char @@ -376,4 +376,4 @@ write_cyrix_reg(u_char reg, u_char data) } #endif -#endif /* !_MACHINE_SPECIALREG_H_ */ +#endif /* !_CPU_SPECIALREG_H_ */ diff --git a/sys/cpu/i386/include/stdarg.h b/sys/cpu/i386/include/stdarg.h index c64092a965..8499f03404 100644 --- a/sys/cpu/i386/include/stdarg.h +++ b/sys/cpu/i386/include/stdarg.h @@ -32,11 +32,11 @@ * * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/i386/include/stdarg.h,v 1.10 1999/08/28 00:44:26 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/stdarg.h,v 1.6 2005/04/24 10:58:19 asmodai Exp $ + * $DragonFly: src/sys/cpu/i386/include/stdarg.h,v 1.7 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_STDARG_H_ -#define _MACHINE_STDARG_H_ +#ifndef _CPU_STDARG_H_ +#define _CPU_STDARG_H_ /* * GNUC mess @@ -97,4 +97,4 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif /* __GNUC__ */ -#endif /* !_MACHINE_STDARG_H_ */ +#endif /* !_CPU_STDARG_H_ */ diff --git a/sys/cpu/i386/include/stdint.h b/sys/cpu/i386/include/stdint.h index 936f1ffaa8..80c057f15e 100644 --- a/sys/cpu/i386/include/stdint.h +++ b/sys/cpu/i386/include/stdint.h @@ -36,11 +36,11 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/_stdint.h,v 1.1 2002/07/29 17:41:07 mike Exp $ - * $DragonFly: src/sys/cpu/i386/include/stdint.h,v 1.6 2006/08/26 17:43:54 joerg Exp $ + * $DragonFly: src/sys/cpu/i386/include/stdint.h,v 1.7 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_STDINT_H_ -#define _MACHINE_STDINT_H_ +#ifndef _CPU_STDINT_H_ +#define _CPU_STDINT_H_ /* * Basic types upon which most other types are built. @@ -130,15 +130,15 @@ typedef volatile int __atomic_intr_t; #define __arysize(ary) (sizeof(ary)/sizeof((ary)[0])) -#endif /* _MACHINE_STDINT_H_ */ +#endif /* _CPU_STDINT_H_ */ /* * OpenGroup stdint.h extensions. Since these are protected by a define we * do not have to generate __ versions of them. */ #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) -#ifndef _MACHINE_STDINT_H_STDC_CONSTANT_MACROS_ -#define _MACHINE_STDINT_H_STDC_CONSTANT_MACROS_ +#ifndef _CPU_STDINT_H_STDC_CONSTANT_MACROS_ +#define _CPU_STDINT_H_STDC_CONSTANT_MACROS_ #define INT8_C(c) (c) #define INT16_C(c) (c) @@ -157,8 +157,8 @@ typedef volatile int __atomic_intr_t; #endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) -#ifndef _MACHINE_STDINT_H_STDC_LIMIT_MAVROS_ -#define _MACHINE_STDINT_H_STDC_LIMIT_MAVROS_ +#ifndef _CPU_STDINT_H_STDC_LIMIT_MAVROS_ +#define _CPU_STDINT_H_STDC_LIMIT_MAVROS_ /* * ISO/IEC 9899:1999 diff --git a/sys/cpu/i386/include/trap.h b/sys/cpu/i386/include/trap.h index 2d14660e85..4db8379255 100644 --- a/sys/cpu/i386/include/trap.h +++ b/sys/cpu/i386/include/trap.h @@ -35,11 +35,11 @@ * * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/trap.h,v 1.10.2.2 2001/08/15 01:23:52 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/trap.h,v 1.2 2003/06/17 04:28:36 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/trap.h,v 1.3 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_TRAP_H_ -#define _MACHINE_TRAP_H_ +#ifndef _CPU_TRAP_H_ +#define _CPU_TRAP_H_ /* * Trap type values @@ -106,4 +106,4 @@ /* Trap's coming from user mode */ #define T_USER 0x100 -#endif /* !_MACHINE_TRAP_H_ */ +#endif /* !_CPU_TRAP_H_ */ diff --git a/sys/cpu/i386/include/tss.h b/sys/cpu/i386/include/tss.h index ad89ac0650..be4f5a9818 100644 --- a/sys/cpu/i386/include/tss.h +++ b/sys/cpu/i386/include/tss.h @@ -35,11 +35,11 @@ * * from: @(#)tss.h 5.4 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/tss.h,v 1.11 1999/12/29 04:33:09 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/tss.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/tss.h,v 1.5 2006/11/07 06:43:22 dillon Exp $ */ -#ifndef _MACHINE_TSS_H_ -#define _MACHINE_TSS_H_ +#ifndef _CPU_TSS_H_ +#define _CPU_TSS_H_ /* * Intel 386 Context Data Type @@ -81,5 +81,5 @@ struct i386tss { /* XXX unimplemented .. i/o permission bitmap */ }; -#endif /* _MACHINE_TSS_H_ */ +#endif /* _CPU_TSS_H_ */ diff --git a/sys/cpu/i386/include/types.h b/sys/cpu/i386/include/types.h index 327a2b0a43..22eb5424a5 100644 --- a/sys/cpu/i386/include/types.h +++ b/sys/cpu/i386/include/types.h @@ -30,13 +30,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)types.h 8.3 (Berkeley) 1/5/94 + * @(#)types.h 8.3 (Berkeley) 1/5/94 * $FreeBSD: src/sys/i386/include/types.h,v 1.19.2.1 2001/03/21 10:50:58 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/types.h,v 1.10 2006/05/20 02:42:06 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/types.h,v 1.11 2006/11/07 06:43:23 dillon Exp $ */ -#ifndef _MACHINE_TYPES_H_ -#define _MACHINE_TYPES_H_ +#ifndef _CPU_TYPES_H_ +#define _CPU_TYPES_H_ #ifndef _MACHINE_STDINT_H_ #include @@ -77,8 +77,5 @@ typedef __uint32_t cpumask_t; /* mask representing a set of cpus */ #define PDESIZE sizeof(pd_entry_t) /* for assembly files */ #define PTESIZE sizeof(pt_entry_t) /* for assembly files */ -/* Interrupt mask (spl, xxx_imask, etc) */ -typedef __uint32_t intrmask_t; - -#endif /* !_MACHINE_TYPES_H_ */ +#endif /* !_CPU_TYPES_H_ */ diff --git a/sys/cpu/i386/include/ucontext.h b/sys/cpu/i386/include/ucontext.h index 459d676e37..dbf6c7c820 100644 --- a/sys/cpu/i386/include/ucontext.h +++ b/sys/cpu/i386/include/ucontext.h @@ -26,11 +26,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/ucontext.h,v 1.4 1999/10/11 20:33:09 luoqi Exp $ - * $DragonFly: src/sys/cpu/i386/include/ucontext.h,v 1.2 2003/06/17 04:28:36 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/ucontext.h,v 1.3 2006/11/07 06:43:23 dillon Exp $ */ -#ifndef _MACHINE_UCONTEXT_H_ -#define _MACHINE_UCONTEXT_H_ +#ifndef _CPU_UCONTEXT_H_ +#define _CPU_UCONTEXT_H_ typedef struct __mcontext { /* @@ -63,4 +63,4 @@ typedef struct __mcontext { int __spare__[17]; } mcontext_t; -#endif /* !_MACHINE_UCONTEXT_H_ */ +#endif /* !_CPU_UCONTEXT_H_ */ diff --git a/sys/cpu/i386/include/vm86.h b/sys/cpu/i386/include/vm86.h index 9024f253ea..7a54c75c83 100644 --- a/sys/cpu/i386/include/vm86.h +++ b/sys/cpu/i386/include/vm86.h @@ -27,11 +27,11 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/vm86.h,v 1.13 1999/09/02 20:59:50 luoqi Exp $ - * $DragonFly: src/sys/cpu/i386/include/vm86.h,v 1.7 2006/05/20 02:42:06 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/vm86.h,v 1.8 2006/11/07 06:43:23 dillon Exp $ */ -#ifndef _MACHINE_VM86_H_ -#define _MACHINE_VM86_H_ +#ifndef _CPU_VM86_H_ +#define _CPU_VM86_H_ #ifndef _SYS_TYPES_H_ #include @@ -167,4 +167,4 @@ extern int vm86_getptr (struct vm86context *, vm_offset_t, extern vm_offset_t vm86_getaddr (struct vm86context *, u_short, u_short); -#endif /* _MACHINE_VM86_H_ */ +#endif /* _CPU_VM86_H_ */ diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h index b4518208ea..ddd8561ec6 100644 --- a/sys/ddb/ddb.h +++ b/sys/ddb/ddb.h @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ddb/ddb.h,v 1.24.2.2 2002/08/30 22:27:49 gibbs Exp $ - * $DragonFly: src/sys/ddb/ddb.h,v 1.10 2006/09/10 01:26:33 dillon Exp $ + * $DragonFly: src/sys/ddb/ddb.h,v 1.11 2006/11/07 06:43:23 dillon Exp $ */ /* @@ -46,6 +46,10 @@ #include /* type definitions */ #endif +#ifndef _MACHINE_GLOBALDATA_H_ +#include +#endif + typedef void db_cmdfcn_t (db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif); diff --git a/sys/dev/acpica5/Makefile b/sys/dev/acpica5/Makefile index 3cb197ffb0..816cad888d 100644 --- a/sys/dev/acpica5/Makefile +++ b/sys/dev/acpica5/Makefile @@ -1,11 +1,11 @@ # $FreeBSD: src/sys/modules/acpi/acpi/Makefile,v 1.3 2004/01/08 16:38:32 njl Exp $ -# $DragonFly: src/sys/dev/acpica5/Makefile,v 1.13 2006/10/22 16:09:19 dillon Exp $ +# $DragonFly: src/sys/dev/acpica5/Makefile,v 1.14 2006/11/07 06:43:23 dillon Exp $ SYSDIR?= ${.CURDIR}/../.. .include "Makefile.inc" .PATH: ${SYSDIR}/${OSACPI_MD_DIR} \ - ${SYSDIR}/arch/${MACHINE_ARCH}/isa \ + ${SYSDIR}/machine/${MACHINE}/isa \ ${SYSDIR}/bus/pci \ ${.CURDIR}/Osd \ ${.CURDIR} \ diff --git a/sys/dev/est/Makefile b/sys/dev/est/Makefile index e18f99d138..93c8f28866 100644 --- a/sys/dev/est/Makefile +++ b/sys/dev/est/Makefile @@ -1,7 +1,7 @@ -# $DragonFly: src/sys/dev/est/Makefile,v 1.2 2006/10/22 16:09:20 dillon Exp $ +# $DragonFly: src/sys/dev/est/Makefile,v 1.3 2006/11/07 06:43:23 dillon Exp $ # -.PATH: ${.CURDIR}/../../arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/../../machine/${MACHINE}/${MACHINE_ARCH} SRCS= est.c KMOD= est diff --git a/sys/dev/misc/syscons/apm/apm_saver.c b/sys/dev/misc/syscons/apm/apm_saver.c index 683fe55b74..5ff1f2d51c 100644 --- a/sys/dev/misc/syscons/apm/apm_saver.c +++ b/sys/dev/misc/syscons/apm/apm_saver.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/modules/syscons/apm/apm_saver.c,v 1.1.4.2 2001/03/07 21:47:24 nsayer Exp $ - * $DragonFly: src/sys/dev/misc/syscons/apm/apm_saver.c,v 1.7 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/misc/syscons/apm/apm_saver.c,v 1.8 2006/11/07 06:43:23 dillon Exp $ */ #include @@ -43,7 +43,7 @@ #include #include #include -#include +#include extern int apm_display (int newstate); diff --git a/sys/dev/netif/fe/if_fe.c b/sys/dev/netif/fe/if_fe.c index b9501570c7..894fae7a04 100644 --- a/sys/dev/netif/fe/if_fe.c +++ b/sys/dev/netif/fe/if_fe.c @@ -22,7 +22,7 @@ /* * $FreeBSD: src/sys/dev/fe/if_fe.c,v 1.65.2.1 2000/09/22 10:01:47 nyan Exp $ - * $DragonFly: src/sys/dev/netif/fe/if_fe.c,v 1.26 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/fe/if_fe.c,v 1.27 2006/11/07 06:43:23 dillon Exp $ * * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. * Contributed by M. Sekiguchi. @@ -97,7 +97,7 @@ #include -#include +#include #include "if_fereg.h" #include "if_fevar.h" diff --git a/sys/dev/netif/fe/if_fe_isa.c b/sys/dev/netif/fe/if_fe_isa.c index c88f316cf4..cb7d4bb7ee 100644 --- a/sys/dev/netif/fe/if_fe_isa.c +++ b/sys/dev/netif/fe/if_fe_isa.c @@ -20,7 +20,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fe/if_fe_isa.c,v 1.2.2.1 2000/09/22 10:01:47 nyan Exp $ - * $DragonFly: src/sys/dev/netif/fe/if_fe_isa.c,v 1.6 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/fe/if_fe_isa.c,v 1.7 2006/11/07 06:43:23 dillon Exp $ */ #include "opt_fe.h" @@ -44,7 +44,7 @@ #include #include -#include +#include #include "if_fereg.h" #include "if_fevar.h" diff --git a/sys/dev/netif/fe/if_fe_pccard.c b/sys/dev/netif/fe/if_fe_pccard.c index c3c4fc7371..cfeb722897 100644 --- a/sys/dev/netif/fe/if_fe_pccard.c +++ b/sys/dev/netif/fe/if_fe_pccard.c @@ -20,7 +20,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fe/if_fe_pccard.c,v 1.2.2.1 2000/09/22 10:01:47 nyan Exp $ - * $DragonFly: src/sys/dev/netif/fe/if_fe_pccard.c,v 1.11 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/fe/if_fe_pccard.c,v 1.12 2006/11/07 06:43:23 dillon Exp $ */ #include "opt_fe.h" @@ -42,7 +42,7 @@ #include #include -#include +#include #include "if_fereg.h" #include "if_fevar.h" diff --git a/sys/dev/netif/ie/if_ie.c b/sys/dev/netif/ie/if_ie.c index b49a052ce0..002b347835 100644 --- a/sys/dev/netif/ie/if_ie.c +++ b/sys/dev/netif/ie/if_ie.c @@ -48,7 +48,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ie/if_ie.c,v 1.72.2.4 2003/03/27 21:01:49 mdodd Exp $ - * $DragonFly: src/sys/dev/netif/ie/if_ie.c,v 1.29 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ie/if_ie.c,v 1.30 2006/11/07 06:43:23 dillon Exp $ */ /* @@ -136,8 +136,8 @@ iomem and and with 0xffff. #include #include -#include -#include +#include +#include #include "if_iereg.h" #include "if_ie507.h" #include "if_iee16.h" diff --git a/sys/dev/netif/le/if_le.c b/sys/dev/netif/le/if_le.c index 5652a016e0..a2041201e2 100644 --- a/sys/dev/netif/le/if_le.c +++ b/sys/dev/netif/le/if_le.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/if_le.c,v 1.56.2.4 2002/06/05 23:24:10 paul Exp $ - * $DragonFly: src/sys/dev/netif/le/if_le.c,v 1.35 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/netif/le/if_le.c,v 1.36 2006/11/07 06:43:23 dillon Exp $ */ /* @@ -63,7 +63,7 @@ #include #include -#include +#include #include #include @@ -86,7 +86,7 @@ struct le_board { * Start of DEC EtherWORKS III (LEMAC) dependent structures * */ -#include /* Include LEMAC definitions */ +#include /* Include LEMAC definitions */ DECLARE_DUMMY_MODULE(if_le); @@ -119,7 +119,7 @@ struct le_lemac_info { * */ -#include +#include #ifndef LN_DOSTATS #define LN_DOSTATS 1 diff --git a/sys/dev/netif/pdq_layer/pdq_ifsubr.c b/sys/dev/netif/pdq_layer/pdq_ifsubr.c index 72f149eb58..d506f397a6 100644 --- a/sys/dev/netif/pdq_layer/pdq_ifsubr.c +++ b/sys/dev/netif/pdq_layer/pdq_ifsubr.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/pdq/pdq_ifsubr.c,v 1.11.2.1 2000/08/02 22:39:30 peter Exp $ - * $DragonFly: src/sys/dev/netif/pdq_layer/Attic/pdq_ifsubr.c,v 1.15 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/netif/pdq_layer/Attic/pdq_ifsubr.c,v 1.16 2006/11/07 06:43:23 dillon Exp $ * */ @@ -61,7 +61,7 @@ #endif #if defined(__bsdi__) -#include +#include #endif #ifdef NS diff --git a/sys/dev/netif/rdp/if_rdp.c b/sys/dev/netif/rdp/if_rdp.c index 5f7ea866e1..53d0dc2743 100644 --- a/sys/dev/netif/rdp/if_rdp.c +++ b/sys/dev/netif/rdp/if_rdp.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/if_rdp.c,v 1.6.2.2 2000/07/17 21:24:32 archie Exp $ - * $DragonFly: src/sys/dev/netif/rdp/if_rdp.c,v 1.23 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/netif/rdp/if_rdp.c,v 1.24 2006/11/07 06:43:23 dillon Exp $ */ /* @@ -102,9 +102,9 @@ #include #include -#include +#include #include "if_rdpreg.h" -#include +#include #define IOCTL_CMD_T u_long diff --git a/sys/dev/netif/rdp/if_rdpreg.h b/sys/dev/netif/rdp/if_rdpreg.h index b5d1b6169c..f8527f1af7 100644 --- a/sys/dev/netif/rdp/if_rdpreg.h +++ b/sys/dev/netif/rdp/if_rdpreg.h @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/if_rdpreg.h,v 1.2 1999/08/28 00:44:49 peter Exp $ - * $DragonFly: src/sys/dev/netif/rdp/if_rdpreg.h,v 1.3 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/netif/rdp/if_rdpreg.h,v 1.4 2006/11/07 06:43:23 dillon Exp $ */ /* @@ -43,7 +43,7 @@ /* * We're hanging upon an LPT port, thus suck in the lpt defs as well. */ -#include +#include struct rdphdr { /* RTL8002 header that is prepended to the actual packet */ diff --git a/sys/dev/serial/cy/cy.c b/sys/dev/serial/cy/cy.c index ff7491ea61..e0f73352e4 100644 --- a/sys/dev/serial/cy/cy.c +++ b/sys/dev/serial/cy/cy.c @@ -28,7 +28,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/cy.c,v 1.97.2.2 2001/08/22 13:04:58 bde Exp $ - * $DragonFly: src/sys/dev/serial/cy/cy.c,v 1.23 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/serial/cy/cy.c,v 1.24 2006/11/07 06:43:23 dillon Exp $ */ #include "opt_compat.h" @@ -89,7 +89,7 @@ #include #include "cyreg.h" -#include +#include #ifdef SMP #define disable_intr() com_lock() diff --git a/sys/dev/serial/cy/cy_pci.c b/sys/dev/serial/cy/cy_pci.c index bb2f203bd7..686654d1a8 100644 --- a/sys/dev/serial/cy/cy_pci.c +++ b/sys/dev/serial/cy/cy_pci.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/cy_pci.c,v 1.17.2.1 2002/03/17 04:14:18 bde Exp $ - * $DragonFly: src/sys/dev/serial/cy/cy_pci.c,v 1.7 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/serial/cy/cy_pci.c,v 1.8 2006/11/07 06:43:23 dillon Exp $ */ /* @@ -46,7 +46,7 @@ #include "cy_pcireg.h" #ifdef CY_PCI_FASTINTR -#include +#include #endif static const char *cy_probe (pcici_t, pcidi_t); diff --git a/sys/dev/serial/rc/rc.c b/sys/dev/serial/rc/rc.c index 823a006a71..d7b974f179 100644 --- a/sys/dev/serial/rc/rc.c +++ b/sys/dev/serial/rc/rc.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/rc.c,v 1.53.2.1 2001/02/26 04:23:10 jlemon Exp $ - * $DragonFly: src/sys/dev/serial/rc/rc.c,v 1.19 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/serial/rc/rc.c,v 1.20 2006/11/07 06:43:23 dillon Exp $ * */ @@ -53,7 +53,7 @@ #include -#include +#include #include "rcreg.h" /* Prototypes */ diff --git a/sys/dev/serial/stl/stallion.c b/sys/dev/serial/stl/stallion.c index 892218160c..04c85cb504 100644 --- a/sys/dev/serial/stl/stallion.c +++ b/sys/dev/serial/stl/stallion.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/stallion.c,v 1.39.2.2 2001/08/30 12:29:57 murray Exp $ - * $DragonFly: src/sys/dev/serial/stl/stallion.c,v 1.22 2006/10/23 21:50:32 dillon Exp $ + * $DragonFly: src/sys/dev/serial/stl/stallion.c,v 1.23 2006/11/07 06:43:24 dillon Exp $ */ /*****************************************************************************/ @@ -54,8 +54,8 @@ #include #include #include -#include -#include +#include +#include #include #if NPCI > 0 diff --git a/sys/emulation/linux/Makefile b/sys/emulation/linux/Makefile index 73f5558f5e..0f9af643ed 100644 --- a/sys/emulation/linux/Makefile +++ b/sys/emulation/linux/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/sys/modules/linux/Makefile,v 1.34.2.12 2003/01/02 20:41:34 kan Exp $ -# $DragonFly: src/sys/emulation/linux/Makefile,v 1.9 2006/05/11 08:23:20 swildner Exp $ +# $DragonFly: src/sys/emulation/linux/Makefile,v 1.10 2006/11/07 06:43:24 dillon Exp $ .PATH: ${.CURDIR}/../../emulation/linux ${.CURDIR}/../../emulation/linux/${MACHINE_ARCH} @@ -28,7 +28,7 @@ linux_locore.o: linux_locore.s linux_assym.h ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} -linux_genassym.o: linux_genassym.c linux.h @ machine +linux_genassym.o: linux_genassym.c linux.h @ ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} opt_compat.h: diff --git a/sys/kern/Makefile b/sys/kern/Makefile index ebc4356c19..6220474e81 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -1,6 +1,6 @@ # @(#)Makefile 8.2 (Berkeley) 3/21/94 # $FreeBSD: src/sys/kern/Makefile,v 1.6.2.1 2003/02/10 12:21:08 des Exp $ -# $DragonFly: src/sys/kern/Makefile,v 1.11 2006/10/22 16:09:22 dillon Exp $ +# $DragonFly: src/sys/kern/Makefile,v 1.12 2006/11/07 06:43:24 dillon Exp $ # Makefile for kernel tags files, init_sysent, etc. @@ -14,7 +14,7 @@ SUBDIR= libmchain # are placed in each source directory. We need to have links to tags files # from the generic directories that are relative to the machine type, even # via remote mounts; therefore we use symlinks to $SYSTAGS, which points at -# ${SYSDIR}/arch/${MACHINE_ARCH}/tags. +# ${SYSDIR}/machine/${MACHINE}/tags. SYSTAGS=/var/db/sys_tags SYSDIR=${.CURDIR:H} diff --git a/sys/kern/Makefile.misc b/sys/kern/Makefile.misc index 6f0f9a4c2f..eae6b00586 100644 --- a/sys/kern/Makefile.misc +++ b/sys/kern/Makefile.misc @@ -1,4 +1,4 @@ -# $DragonFly: src/sys/kern/Makefile.misc,v 1.5 2006/10/22 16:09:22 dillon Exp $ +# $DragonFly: src/sys/kern/Makefile.misc,v 1.6 2006/11/07 06:43:24 dillon Exp $ # # Makefile for kernel tags files, init_sysent, etc. @@ -29,7 +29,7 @@ ${.CURDIR}/../sys/sysunion.h: ${.CURDIR}/makesyscalls.sh ${.CURDIR}/syscalls.mas # are placed in each source directory. We need to have links to tags files # from the generic directories that are relative to the machine type, even # via remote mounts; therefore we use symlinks to $SYSTAGS, which points at -# ${SYSDIR}/arch/${MACHINE_ARCH}/tags. +# ${SYSDIR}/machine/${MACHINE}/tags. SYSTAGS=/var/db/sys_tags SYSDIR=${.CURDIR:H} @@ -52,7 +52,7 @@ DGEN= conf \ # #links:: # rm -f ${.CURDIR}/${SYSTAGS} -# -${LN} -s ${SYSDIR}/arch/${MACHINE_ARCH}/tags ${.CURDIR}/${SYSTAGS} +# -${LN} -s ${SYSDIR}/machine/${MACHINE}/tags ${.CURDIR}/${SYSTAGS} # -cd ${.CURDIR} && for i in ${DGEN}; do \ # (cd ../$$i && { rm -f tags; ${LN} -s ${SYSTAGS} tags; }) done # -cd ${.CURDIR} && for i in ${TAGARCH}; do \ diff --git a/sys/kern/kern_memio.c b/sys/kern/kern_memio.c index cdcbc8697e..f784ff9efc 100644 --- a/sys/kern/kern_memio.c +++ b/sys/kern/kern_memio.c @@ -39,7 +39,7 @@ * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $ - * $DragonFly: src/sys/kern/kern_memio.c,v 1.22 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/kern/kern_memio.c,v 1.23 2006/11/07 06:43:24 dillon Exp $ */ /* @@ -65,7 +65,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index c29a420bd0..b829f75af5 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -38,7 +38,7 @@ * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 * $FreeBSD: src/sys/kern/kern_mib.c,v 1.29.2.4 2001/07/30 23:28:00 peter Exp $ - * $DragonFly: src/sys/kern/kern_mib.c,v 1.10 2006/09/09 19:07:28 dillon Exp $ + * $DragonFly: src/sys/kern/kern_mib.c,v 1.11 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -152,6 +152,10 @@ static char machine_arch[] = MACHINE_ARCH; SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD, machine_arch, 0, "System architecture"); +static char machine_cpu[] = MACHINE_CPU; +SYSCTL_STRING(_hw, HW_MACHINE_CPU, machine_cpu, CTLFLAG_RD, + machine_arch, 0, "Cpu architecture"); + char hostname[MAXHOSTNAMELEN]; static int diff --git a/sys/netgraph/tty/ng_tty.c b/sys/netgraph/tty/ng_tty.c index 9e7c120288..a223e46671 100644 --- a/sys/netgraph/tty/ng_tty.c +++ b/sys/netgraph/tty/ng_tty.c @@ -37,7 +37,7 @@ * Author: Archie Cobbs * * $FreeBSD: src/sys/netgraph/ng_tty.c,v 1.7.2.3 2002/02/13 00:43:12 dillon Exp $ - * $DragonFly: src/sys/netgraph/tty/ng_tty.c,v 1.14 2006/10/23 21:50:33 dillon Exp $ + * $DragonFly: src/sys/netgraph/tty/ng_tty.c,v 1.15 2006/11/07 06:43:25 dillon Exp $ * $Whistle: ng_tty.c,v 1.21 1999/11/01 09:24:52 julian Exp $ */ @@ -80,7 +80,7 @@ #ifdef __i386__ /* fiddle with the spl locking */ #include -#include +#include #endif /* Misc defs */ diff --git a/sys/platform/pc32/acpica5/acpi_machdep.c b/sys/platform/pc32/acpica5/acpi_machdep.c index 162ed01348..168485e6bf 100644 --- a/sys/platform/pc32/acpica5/acpi_machdep.c +++ b/sys/platform/pc32/acpica5/acpi_machdep.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.20 2004/05/05 19:51:15 njl Exp $ - * $DragonFly: src/sys/platform/pc32/acpica5/acpi_machdep.c,v 1.10 2006/10/23 21:50:28 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/acpica5/acpi_machdep.c,v 1.11 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -50,7 +50,7 @@ static device_t acpi_dev; #include #include -#include +#include uint32_t acpi_reset_video = 1; TUNABLE_INT("hw.acpi.reset_video", &acpi_reset_video); diff --git a/sys/platform/pc32/acpica5/acpi_wakeup.c b/sys/platform/pc32/acpica5/acpi_wakeup.c index a1943d99fc..800ee4b387 100644 --- a/sys/platform/pc32/acpica5/acpi_wakeup.c +++ b/sys/platform/pc32/acpica5/acpi_wakeup.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.33 2004/05/06 02:18:58 njl Exp $ - * $DragonFly: src/sys/platform/pc32/acpica5/acpi_wakeup.c,v 1.11 2006/10/25 20:55:48 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/acpica5/acpi_wakeup.c,v 1.12 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -44,7 +44,7 @@ #include #include -#include +#include #include "acpi.h" #include diff --git a/sys/platform/pc32/acpica5/madt.c b/sys/platform/pc32/acpica5/madt.c index 5fbb71ffa7..00931f212d 100644 --- a/sys/platform/pc32/acpica5/madt.c +++ b/sys/platform/pc32/acpica5/madt.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/acpica/madt.c,v 1.17 2004/06/10 20:03:46 jhb Exp $ - * $DragonFly: src/sys/platform/pc32/acpica5/madt.c,v 1.6 2006/09/03 17:43:59 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/acpica5/madt.c,v 1.7 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -41,11 +41,11 @@ #include #include -#include +#include #include /*#include */ #include -#include +#include #include #include #include diff --git a/sys/platform/pc32/apic/apic_abi.c b/sys/platform/pc32/apic/apic_abi.c index a072a418f9..3f774cc382 100644 --- a/sys/platform/pc32/apic/apic_abi.c +++ b/sys/platform/pc32/apic/apic_abi.c @@ -37,7 +37,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/platform/pc32/apic/apic_abi.c,v 1.10 2006/10/23 21:50:29 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/apic/apic_abi.c,v 1.11 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -50,8 +50,8 @@ #include #include #include /* apic_8254_intr */ -#include -#include +#include +#include #include "apic_ipl.h" #ifdef APIC_IO diff --git a/sys/platform/pc32/apic/apic_vector.s b/sys/platform/pc32/apic/apic_vector.s index 7630dc436d..b7596c0210 100644 --- a/sys/platform/pc32/apic/apic_vector.s +++ b/sys/platform/pc32/apic/apic_vector.s @@ -1,7 +1,7 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/apic_vector.s,v 1.47.2.5 2001/09/01 22:33:38 tegge Exp $ - * $DragonFly: src/sys/platform/pc32/apic/apic_vector.s,v 1.32 2006/10/23 21:50:29 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/apic/apic_vector.s,v 1.33 2006/11/07 06:43:24 dillon Exp $ */ #include "use_npx.h" @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include "assym.s" @@ -21,7 +21,7 @@ #include "apicreg.h" #include "apic_ipl.h" #include -#include +#include /* convert an absolute IRQ# into a bitmask */ #define IRQ_LBIT(irq_num) (1 << (irq_num)) diff --git a/sys/platform/pc32/apic/mpapic.c b/sys/platform/pc32/apic/mpapic.c index 08125b55ad..b195b7d6f7 100644 --- a/sys/platform/pc32/apic/mpapic.c +++ b/sys/platform/pc32/apic/mpapic.c @@ -23,18 +23,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/mpapic.c,v 1.37.2.7 2003/01/25 02:31:47 peter Exp $ - * $DragonFly: src/sys/platform/pc32/apic/mpapic.c,v 1.18 2006/10/23 21:50:29 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/apic/mpapic.c,v 1.19 2006/11/07 06:43:24 dillon Exp $ */ #include #include #include #include -#include +#include #include #include -#include /* Xspuriousint() */ +#include /* Xspuriousint() */ /* EISA Edge/Level trigger control registers */ #define ELCR0 0x4d0 /* eisa irq 0-7 */ diff --git a/sys/platform/pc32/apic/mpapic.h b/sys/platform/pc32/apic/mpapic.h index 3ca273d46e..1ad5e6392d 100644 --- a/sys/platform/pc32/apic/mpapic.h +++ b/sys/platform/pc32/apic/mpapic.h @@ -23,7 +23,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/mpapic.h,v 1.14.2.2 2000/09/30 02:49:34 ps Exp $ - * $DragonFly: src/sys/platform/pc32/apic/mpapic.h,v 1.10 2006/10/23 21:50:29 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/apic/mpapic.h,v 1.11 2006/11/07 06:43:24 dillon Exp $ */ #ifndef _MACHINE_MPAPIC_H_ @@ -31,7 +31,7 @@ #include "apicreg.h" -#include +#include /* * Size of APIC ID list. diff --git a/sys/platform/pc32/apm/apm.c b/sys/platform/pc32/apm/apm.c index 2f9c295891..9532dbd297 100644 --- a/sys/platform/pc32/apm/apm.c +++ b/sys/platform/pc32/apm/apm.c @@ -16,7 +16,7 @@ * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * * $FreeBSD: src/sys/i386/apm/apm.c,v 1.114.2.5 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/apm/apm.c,v 1.18 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/apm/apm.c,v 1.19 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -46,7 +46,7 @@ #include #include -#include +#include /* Used by the apm_saver screen saver module */ int apm_display (int newstate); diff --git a/sys/platform/pc32/conf/Makefile b/sys/platform/pc32/conf/Makefile index 608a97554a..69f57334d9 100644 --- a/sys/platform/pc32/conf/Makefile +++ b/sys/platform/pc32/conf/Makefile @@ -2,7 +2,7 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 # $FreeBSD: src/sys/conf/Makefile.i386,v 1.179.2.16 2002/11/18 11:26:49 ru Exp $ -# $DragonFly: src/sys/platform/pc32/conf/Makefile,v 1.2 2006/10/23 18:01:15 dillon Exp $ +# $DragonFly: src/sys/platform/pc32/conf/Makefile,v 1.3 2006/11/07 06:43:24 dillon Exp $ # # Makefile for DragonFly BSD # @@ -24,7 +24,7 @@ # -DDESTDIR Where to install, defaults to / # Which version of config(8) is required. -%VERSREQ= 400024 +%VERSREQ= 400025 .if !defined(S) .if exists(./@/.) diff --git a/sys/platform/pc32/conf/files b/sys/platform/pc32/conf/files index 04e10ce0c8..ed41963f14 100644 --- a/sys/platform/pc32/conf/files +++ b/sys/platform/pc32/conf/files @@ -2,7 +2,7 @@ # files marked standard are always included. # # $FreeBSD: src/sys/conf/files.i386,v 1.307.2.38 2003/01/02 20:41:33 kan Exp $ -# $DragonFly: src/sys/platform/pc32/conf/files,v 1.1 2006/10/22 16:09:13 dillon Exp $ +# $DragonFly: src/sys/platform/pc32/conf/files,v 1.2 2006/11/07 06:43:24 dillon Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -148,72 +148,72 @@ vfs/smbfs/smbfs_smb.c optional smbfs vfs/smbfs/smbfs_subr.c optional smbfs vfs/smbfs/smbfs_vfsops.c optional smbfs vfs/smbfs/smbfs_vnops.c optional smbfs -arch/i386/gnu/isa/dgb.c optional dgb -arch/i386/apm/apm.c optional apm -arch/i386/i386/atomic.c standard \ +machine/pc32/gnu/isa/dgb.c optional dgb +machine/pc32/apm/apm.c optional apm +machine/pc32/i386/atomic.c standard \ compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} ${.IMPSRC}" -arch/i386/i386/autoconf.c standard -arch/i386/i386/bios.c standard -arch/i386/i386/bioscall.s standard -arch/i386/i386/busdma_machdep.c standard -arch/i386/i386/db_disasm.c optional ddb -arch/i386/i386/db_interface.c optional ddb -arch/i386/i386/db_trace.c optional ddb -arch/i386/i386/elan-mmcr.c optional cpu_elan -arch/i386/i386/elf_machdep.c standard -arch/i386/i386/exception.s standard -arch/i386/isa/ipl.s standard -arch/i386/i386/globals.s standard -arch/i386/i386/i386-gdbstub.c optional ddb -arch/i386/i386/i686_mem.c standard -arch/i386/i386/identcpu.c standard -arch/i386/i386/in_cksum2.s optional inet -arch/i386/i386/initcpu.c standard -arch/i386/i386/k6_mem.c standard -arch/i386/i386/ktr.c optional ktr -arch/i386/i386/tls.c standard +machine/pc32/i386/autoconf.c standard +machine/pc32/i386/bios.c standard +machine/pc32/i386/bioscall.s standard +machine/pc32/i386/busdma_machdep.c standard +machine/pc32/i386/db_disasm.c optional ddb +machine/pc32/i386/db_interface.c optional ddb +machine/pc32/i386/db_trace.c optional ddb +machine/pc32/i386/elan-mmcr.c optional cpu_elan +machine/pc32/i386/elf_machdep.c standard +machine/pc32/i386/exception.s standard +machine/pc32/isa/ipl.s standard +machine/pc32/i386/globals.s standard +machine/pc32/i386/i386-gdbstub.c optional ddb +machine/pc32/i386/i686_mem.c standard +machine/pc32/i386/identcpu.c standard +machine/pc32/i386/in_cksum2.s optional inet +machine/pc32/i386/initcpu.c standard +machine/pc32/i386/k6_mem.c standard +machine/pc32/i386/ktr.c optional ktr +machine/pc32/i386/tls.c standard # locore.s needs to be handled in Makefile to put it first. Otherwise it's # now normal. # arch/i386/i386/locore.s standard -arch/i386/i386/machdep.c standard -arch/i386/i386/math_emulate.c optional math_emulate -arch/i386/i386/mem.c standard -arch/i386/icu/icu_abi.c standard -arch/i386/icu/icu_ipl.s standard -arch/i386/icu/icu_vector.s standard -arch/i386/apic/apic_abi.c optional smp -arch/i386/apic/mpapic.c optional smp -arch/i386/apic/apic_ipl.s optional smp -arch/i386/apic/apic_vector.s optional smp -arch/i386/i386/est.c optional cpu_enable_est +machine/pc32/i386/machdep.c standard +machine/pc32/i386/math_emulate.c optional math_emulate +machine/pc32/i386/mem.c standard +machine/pc32/icu/icu_abi.c standard +machine/pc32/icu/icu_ipl.s standard +machine/pc32/icu/icu_vector.s standard +machine/pc32/apic/apic_abi.c optional smp +machine/pc32/apic/mpapic.c optional smp +machine/pc32/apic/apic_ipl.s optional smp +machine/pc32/apic/apic_vector.s optional smp +machine/pc32/i386/est.c optional cpu_enable_est # temporarily not in build until we get the 'apic' option working on UP #arch/i386/i386/io_apic.c optional smp #arch/i386/i386/local_apic.c optional smp -arch/i386/i386/mpboot.s optional smp -arch/i386/i386/mplock.s optional smp -arch/i386/i386/mp_clock.c optional smp -arch/i386/i386/mp_machdep.c optional smp -arch/i386/i386/nexus.c standard -arch/i386/i386/p4tcc.c optional cpu_enable_tcc -arch/i386/i386/perfmon.c optional perfmon -arch/i386/i386/perfmon.c optional perfmon profiling-routine -arch/i386/i386/pmap.c standard -arch/i386/i386/pmap_inval.c standard -arch/i386/i386/pnpbios.c optional pnpbios -arch/i386/i386/procfs_machdep.c standard -arch/i386/i386/spinlock.s standard -arch/i386/i386/support.s standard -arch/i386/i386/bcopy.s standard -arch/i386/i386/bzero.s standard -arch/i386/i386/swtch.s standard -arch/i386/i386/sys_machdep.c standard -arch/i386/i386/trap.c standard -arch/i386/i386/uio_machdep.c standard -arch/i386/i386/userconfig.c optional userconfig -arch/i386/i386/vm86.c standard -arch/i386/i386/vm_machdep.c standard -arch/i386/isa/asc.c optional asc -arch/i386/isa/clock.c standard +machine/pc32/i386/mpboot.s optional smp +machine/pc32/i386/mplock.s optional smp +machine/pc32/i386/mp_clock.c optional smp +machine/pc32/i386/mp_machdep.c optional smp +machine/pc32/i386/nexus.c standard +machine/pc32/i386/p4tcc.c optional cpu_enable_tcc +machine/pc32/i386/perfmon.c optional perfmon +machine/pc32/i386/perfmon.c optional perfmon profiling-routine +machine/pc32/i386/pmap.c standard +machine/pc32/i386/pmap_inval.c standard +machine/pc32/i386/pnpbios.c optional pnpbios +machine/pc32/i386/procfs_machdep.c standard +machine/pc32/i386/spinlock.s standard +machine/pc32/i386/support.s standard +machine/pc32/i386/bcopy.s standard +machine/pc32/i386/bzero.s standard +machine/pc32/i386/swtch.s standard +machine/pc32/i386/sys_machdep.c standard +machine/pc32/i386/trap.c standard +machine/pc32/i386/uio_machdep.c standard +machine/pc32/i386/userconfig.c optional userconfig +machine/pc32/i386/vm86.c standard +machine/pc32/i386/vm_machdep.c standard +machine/pc32/isa/asc.c optional asc +machine/pc32/isa/clock.c standard dev/serial/cronyx/cronyx.c optional cx dev/video/ctx/ctx.c optional ctx dev/serial/cy/cy.c optional cy @@ -228,8 +228,8 @@ dev/netif/el/if_el.c optional el dev/netif/le/if_le.c optional le dev/netif/rdp/if_rdp.c optional rdp dev/netif/wl/if_wl.c optional wl -arch/i386/isa/intr_machdep.c standard -arch/i386/isa/ipl_funcs.c standard \ +machine/pc32/isa/intr_machdep.c standard +machine/pc32/isa/ipl_funcs.c standard \ compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} ${.IMPSRC}" bus/isa/i386/isa.c optional isa bus/isa/i386/isa_compat.c optional isa compat_oldisa @@ -238,13 +238,13 @@ dev/serial/stli/istallion.c optional stli dev/misc/labpc/labpc.c optional labpc dev/disk/mcd/mcd.c optional mcd dev/misc/mse/mse.c optional mse -arch/i386/isa/npx.c mandatory npx +machine/pc32/isa/npx.c mandatory npx bus/iicbus/i386/pcf.c optional pcf bus/pci/i386/pci_cfgreg.c optional pci bus/pci/i386/pcibus.c optional pci -arch/i386/isa/pmtimer.c optional pmtimer acpi +machine/pc32/isa/pmtimer.c optional pmtimer acpi # XXX drhodus -arch/i386/isa/prof_machdep.c optional profiling-routine +machine/pc32/isa/prof_machdep.c optional profiling-routine dev/serial/rc/rc.c optional rc dev/disk/scd/scd.c optional scd dev/misc/spic/spic.c optional spic diff --git a/sys/platform/pc32/i386/autoconf.c b/sys/platform/pc32/i386/autoconf.c index 4ea003beb6..ec6e0c0823 100644 --- a/sys/platform/pc32/i386/autoconf.c +++ b/sys/platform/pc32/i386/autoconf.c @@ -35,7 +35,7 @@ * * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/i386/autoconf.c,v 1.146.2.2 2001/06/07 06:05:58 dd Exp $ - * $DragonFly: src/sys/platform/pc32/i386/autoconf.c,v 1.29 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/autoconf.c,v 1.30 2006/11/07 06:43:24 dillon Exp $ */ /* @@ -76,7 +76,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/platform/pc32/i386/genassym.c b/sys/platform/pc32/i386/genassym.c index ae7d411ab0..01f4db39a3 100644 --- a/sys/platform/pc32/i386/genassym.c +++ b/sys/platform/pc32/i386/genassym.c @@ -35,7 +35,7 @@ * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $ - * $DragonFly: src/sys/platform/pc32/i386/genassym.c,v 1.51 2006/09/19 11:47:35 corecode Exp $ + * $DragonFly: src/sys/platform/pc32/i386/genassym.c,v 1.52 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -66,7 +66,7 @@ #include #include #ifdef SMP -#include +#include #endif #include #include diff --git a/sys/platform/pc32/i386/identcpu.c b/sys/platform/pc32/i386/identcpu.c index 808afe7373..ff13f704b6 100644 --- a/sys/platform/pc32/i386/identcpu.c +++ b/sys/platform/pc32/i386/identcpu.c @@ -39,7 +39,7 @@ * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp * $FreeBSD: src/sys/i386/i386/identcpu.c,v 1.80.2.15 2003/04/11 17:06:41 jhb Exp $ - * $DragonFly: src/sys/platform/pc32/i386/identcpu.c,v 1.12 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/identcpu.c,v 1.13 2006/11/07 06:43:24 dillon Exp $ */ #include "opt_cpu.h" @@ -57,7 +57,7 @@ #include #include -#include +#include #define IDENTBLUE_CYRIX486 0 #define IDENTBLUE_IBMCPU 1 @@ -85,7 +85,7 @@ static void setup_tmx86_longrun(void); int cpu_class = CPUCLASS_386; u_int cpu_exthigh; /* Highest arg to extended CPUID */ u_int cyrix_did; /* Device ID of Cyrix CPU */ -char machine[] = "i386"; +char machine[] = MACHINE; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "Machine class"); diff --git a/sys/platform/pc32/i386/machdep.c b/sys/platform/pc32/i386/machdep.c index 6c6574669a..bb08d4a6c5 100644 --- a/sys/platform/pc32/i386/machdep.c +++ b/sys/platform/pc32/i386/machdep.c @@ -36,7 +36,7 @@ * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.385.2.30 2003/05/31 08:48:05 alc Exp $ - * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.100 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.101 2006/11/07 06:43:24 dillon Exp $ */ #include "use_apm.h" @@ -111,7 +111,7 @@ #ifdef OLD_BUS_ARCH #include #endif -#include +#include #include #include #include diff --git a/sys/platform/pc32/i386/mem.c b/sys/platform/pc32/i386/mem.c index a386c67597..bd02707fd4 100644 --- a/sys/platform/pc32/i386/mem.c +++ b/sys/platform/pc32/i386/mem.c @@ -39,7 +39,7 @@ * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $ - * $DragonFly: src/sys/platform/pc32/i386/Attic/mem.c,v 1.22 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/Attic/mem.c,v 1.23 2006/11/07 06:43:24 dillon Exp $ */ /* @@ -65,7 +65,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/platform/pc32/i386/mp_machdep.c b/sys/platform/pc32/i386/mp_machdep.c index dac4254b6d..ecb90a3f99 100644 --- a/sys/platform/pc32/i386/mp_machdep.c +++ b/sys/platform/pc32/i386/mp_machdep.c @@ -23,7 +23,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.115.2.15 2003/03/14 21:22:35 jhb Exp $ - * $DragonFly: src/sys/platform/pc32/i386/mp_machdep.c,v 1.52 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/mp_machdep.c,v 1.53 2006/11/07 06:43:24 dillon Exp $ */ #include "opt_cpu.h" @@ -50,10 +50,10 @@ #endif #include -#include +#include #include #include -#include +#include #include #include #include @@ -61,8 +61,8 @@ #include #include /* setidt() */ -#include /* IPIs */ -#include /* IPIs */ +#include /* IPIs */ +#include /* IPIs */ #define FIXUP_EXTRA_APIC_INTS 8 /* additional entries we may create */ diff --git a/sys/platform/pc32/i386/mpboot.s b/sys/platform/pc32/i386/mpboot.s index 9487d28890..91a4e9de78 100644 --- a/sys/platform/pc32/i386/mpboot.s +++ b/sys/platform/pc32/i386/mpboot.s @@ -32,11 +32,11 @@ * multiprocessor systems. * * $FreeBSD: src/sys/i386/i386/mpboot.s,v 1.13.2.3 2000/09/07 01:18:26 tegge Exp $ - * $DragonFly: src/sys/platform/pc32/i386/mpboot.s,v 1.10 2005/11/03 20:07:20 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/mpboot.s,v 1.11 2006/11/07 06:43:24 dillon Exp $ */ #include /* miscellaneous asm macros */ -#include +#include #include #include "assym.s" diff --git a/sys/platform/pc32/i386/mplock.s b/sys/platform/pc32/i386/mplock.s index a0f0c5fdb6..08a1d446d4 100644 --- a/sys/platform/pc32/i386/mplock.s +++ b/sys/platform/pc32/i386/mplock.s @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/i386/i386/mplock.s,v 1.29.2.2 2000/05/16 06:58:06 dillon Exp $ - * $DragonFly: src/sys/platform/pc32/i386/mplock.s,v 1.20 2006/05/29 07:29:13 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/mplock.s,v 1.21 2006/11/07 06:43:24 dillon Exp $ * * Copyright (c) 2003,2004 The DragonFly Project. All rights reserved. * @@ -63,7 +63,7 @@ */ #include -#include +#include #include "assym.s" diff --git a/sys/platform/pc32/i386/nexus.c b/sys/platform/pc32/i386/nexus.c index 315708cd74..80f4b62978 100644 --- a/sys/platform/pc32/i386/nexus.c +++ b/sys/platform/pc32/i386/nexus.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/nexus.c,v 1.26.2.10 2003/02/22 13:16:45 imp Exp $ - * $DragonFly: src/sys/platform/pc32/i386/nexus.c,v 1.27 2006/10/25 20:55:51 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/nexus.c,v 1.28 2006/11/07 06:43:24 dillon Exp $ */ /* @@ -56,8 +56,8 @@ #include #include -#include -#include +#include +#include static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); struct nexus_device { diff --git a/sys/platform/pc32/i386/pmap.c b/sys/platform/pc32/i386/pmap.c index e0945a2b8e..c0389e4f48 100644 --- a/sys/platform/pc32/i386/pmap.c +++ b/sys/platform/pc32/i386/pmap.c @@ -40,7 +40,7 @@ * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/i386/pmap.c,v 1.250.2.18 2002/03/06 22:48:53 silby Exp $ - * $DragonFly: src/sys/platform/pc32/i386/pmap.c,v 1.60 2006/10/21 04:28:20 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/pmap.c,v 1.61 2006/11/07 06:43:24 dillon Exp $ */ /* @@ -101,7 +101,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/platform/pc32/i386/swtch.s b/sys/platform/pc32/i386/swtch.s index 54d17d0b43..017b349b8e 100644 --- a/sys/platform/pc32/i386/swtch.s +++ b/sys/platform/pc32/i386/swtch.s @@ -66,7 +66,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/swtch.s,v 1.89.2.10 2003/01/23 03:36:24 ps Exp $ - * $DragonFly: src/sys/platform/pc32/i386/swtch.s,v 1.40 2005/11/03 23:45:11 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/swtch.s,v 1.41 2006/11/07 06:43:24 dillon Exp $ */ #include "use_npx.h" @@ -78,7 +78,7 @@ #include #include -#include +#include #include #include "assym.s" diff --git a/sys/platform/pc32/i386/trap.c b/sys/platform/pc32/i386/trap.c index af1b2df7eb..3a366031bb 100644 --- a/sys/platform/pc32/i386/trap.c +++ b/sys/platform/pc32/i386/trap.c @@ -36,7 +36,7 @@ * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 * $FreeBSD: src/sys/i386/i386/trap.c,v 1.147.2.11 2003/02/27 19:09:59 luoqi Exp $ - * $DragonFly: src/sys/platform/pc32/i386/trap.c,v 1.83 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/trap.c,v 1.84 2006/11/07 06:43:24 dillon Exp $ */ /* @@ -90,7 +90,7 @@ #include #include -#include +#include #ifdef POWERFAIL_NMI #include diff --git a/sys/platform/pc32/i386/userconfig.c b/sys/platform/pc32/i386/userconfig.c index 4e405c37ee..7ff2b6a3a0 100644 --- a/sys/platform/pc32/i386/userconfig.c +++ b/sys/platform/pc32/i386/userconfig.c @@ -47,7 +47,7 @@ ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ** $FreeBSD: src/sys/i386/i386/userconfig.c,v 1.175.2.10 2002/10/05 18:31:48 scottl Exp $ - ** $DragonFly: src/sys/platform/pc32/i386/userconfig.c,v 1.9 2006/10/23 21:50:30 dillon Exp $ + ** $DragonFly: src/sys/platform/pc32/i386/userconfig.c,v 1.10 2006/11/07 06:43:24 dillon Exp $ **/ /** @@ -119,7 +119,7 @@ #define NPNP 0 #if NPNP > 0 -#include +#include #endif static MALLOC_DEFINE(M_DEVL, "uc_devlist", "uc_device lists in userconfig()"); diff --git a/sys/platform/pc32/i386/vm86.c b/sys/platform/pc32/i386/vm86.c index 12275ce330..bafc01dc11 100644 --- a/sys/platform/pc32/i386/vm86.c +++ b/sys/platform/pc32/i386/vm86.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/vm86.c,v 1.31.2.2 2001/10/05 06:18:55 peter Exp $ - * $DragonFly: src/sys/platform/pc32/i386/vm86.c,v 1.21 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/vm86.c,v 1.22 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -52,7 +52,7 @@ #include #include #include -#include +#include extern int i386_extend_pcb (struct lwp *); extern int vm86pa; diff --git a/sys/platform/pc32/icu/icu_abi.c b/sys/platform/pc32/icu/icu_abi.c index 7b71dcb7f6..43e20f1466 100644 --- a/sys/platform/pc32/icu/icu_abi.c +++ b/sys/platform/pc32/icu/icu_abi.c @@ -36,7 +36,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/platform/pc32/icu/icu_abi.c,v 1.10 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/icu/icu_abi.c,v 1.11 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -48,7 +48,7 @@ #include #include -#include +#include #include "icu.h" #include "icu_ipl.h" diff --git a/sys/platform/pc32/icu/icu_vector.s b/sys/platform/pc32/icu/icu_vector.s index 3b841af389..05cc72857f 100644 --- a/sys/platform/pc32/icu/icu_vector.s +++ b/sys/platform/pc32/icu/icu_vector.s @@ -1,7 +1,7 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/icu_vector.s,v 1.14.2.2 2000/07/18 21:12:42 dfr Exp $ - * $DragonFly: src/sys/platform/pc32/icu/icu_vector.s,v 1.26 2006/10/23 21:50:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/icu/icu_vector.s,v 1.27 2006/11/07 06:43:24 dillon Exp $ */ /* * WARNING! SMP builds can use the ICU now so this code must be MP safe. @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include "assym.s" diff --git a/sys/platform/pc32/include/ipl.h b/sys/platform/pc32/include/ipl.h index e17553fc8a..01d189f5fe 100644 --- a/sys/platform/pc32/include/ipl.h +++ b/sys/platform/pc32/include/ipl.h @@ -31,14 +31,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/ipl.h,v 1.17.2.3 2002/12/17 18:04:02 sam Exp $ - * $DragonFly: src/sys/platform/pc32/include/ipl.h,v 1.10 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/ipl.h,v 1.11 2006/11/07 06:43:24 dillon Exp $ */ #ifndef _MACHINE_IPL_H_ #define _MACHINE_IPL_H_ -#include -#include +#include +#include /* * Software interrupt bit numbers in priority order. The priority only diff --git a/sys/platform/pc32/include/lock.h b/sys/platform/pc32/include/lock.h index 4945e66b34..39b4d27eb1 100644 --- a/sys/platform/pc32/include/lock.h +++ b/sys/platform/pc32/include/lock.h @@ -32,13 +32,13 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/lock.h,v 1.11.2.2 2000/09/30 02:49:34 ps Exp $ - * $DragonFly: src/sys/platform/pc32/include/lock.h,v 1.14 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/lock.h,v 1.15 2006/11/07 06:43:24 dillon Exp $ */ #ifndef _MACHINE_LOCK_H_ #define _MACHINE_LOCK_H_ -#ifndef _MACHINE_PSL_H_ +#ifndef _CPU_PSL_H_ #include #endif diff --git a/sys/platform/pc32/include/param.h b/sys/platform/pc32/include/param.h new file mode 100644 index 0000000000..1bf2e139d5 --- /dev/null +++ b/sys/platform/pc32/include/param.h @@ -0,0 +1,26 @@ +/* + * $DragonFly: src/sys/platform/pc32/include/param.h,v 1.1 2006/11/07 06:43:24 dillon Exp $ + */ + +#ifndef _MACHINE_PARAM_H_ + +#ifndef _NO_NAMESPACE_POLLUTION +#define _MACHINE_PARAM_H_ +#endif + +#ifndef _MACHINE +#define _MACHINE pc32 +#endif + +#ifndef _NO_NAMESPACE_POLLUTION + +#ifndef MACHINE +#define MACHINE "pc32" +#endif + +#endif + +#include + +#endif + diff --git a/sys/cpu/i386/include/pmap.h b/sys/platform/pc32/include/pmap.h similarity index 84% copy from sys/cpu/i386/include/pmap.h copy to sys/platform/pc32/include/pmap.h index a3d8aafef2..59b908c61b 100644 --- a/sys/cpu/i386/include/pmap.h +++ b/sys/platform/pc32/include/pmap.h @@ -40,48 +40,16 @@ * reduce the impact on kernel virtual memory for lots of sparse address * space, and to reduce the cost of memory to each process. * - * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 - * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 + * 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.65.2.3 2001/10/03 07:15:37 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/pmap.h,v 1.11 2006/10/21 04:28:21 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/pmap.h,v 1.1 2006/11/07 06:43:24 dillon Exp $ */ #ifndef _MACHINE_PMAP_H_ #define _MACHINE_PMAP_H_ -/* - * Page-directory and page-table entires follow this format, with a few - * of the fields not present here and there, depending on a lot of things. - */ - /* ---- Intel Nomenclature ---- */ -#define PG_V 0x001 /* P Valid */ -#define PG_RW 0x002 /* R/W Read/Write */ -#define PG_U 0x004 /* U/S User/Supervisor */ -#define PG_NC_PWT 0x008 /* PWT Write through */ -#define PG_NC_PCD 0x010 /* PCD Cache disable */ -#define PG_A 0x020 /* A Accessed */ -#define PG_M 0x040 /* D Dirty */ -#define PG_PS 0x080 /* PS Page size (0=4k,1=4M) */ -#define PG_G 0x100 /* G Global */ -#define PG_AVAIL1 0x200 /* / Available for system */ -#define PG_AVAIL2 0x400 /* < programmers use */ -#define PG_AVAIL3 0x800 /* \ */ - - -/* Our various interpretations of the above */ -#define PG_W PG_AVAIL1 /* "Wired" pseudoflag */ -#define PG_MANAGED PG_AVAIL2 -#define PG_FRAME (~((vm_paddr_t)PAGE_MASK)) -#define PG_PROT (PG_RW|PG_U) /* all protection bits . */ -#define PG_N (PG_NC_PWT|PG_NC_PCD) /* Non-cacheable */ - -/* - * Page Protection Exception bits - */ - -#define PGEX_P 0x01 /* Protection violation vs. not present */ -#define PGEX_W 0x02 /* during a Write cycle */ -#define PGEX_U 0x04 /* access from User mode (UPL) */ +#include /* * Size of Kernel address space. This is the number of page table pages diff --git a/sys/platform/pc32/include/smp.h b/sys/platform/pc32/include/smp.h index c9244b992b..7af4292c59 100644 --- a/sys/platform/pc32/include/smp.h +++ b/sys/platform/pc32/include/smp.h @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/i386/include/smp.h,v 1.50.2.5 2001/02/13 22:32:45 tegge Exp $ - * $DragonFly: src/sys/platform/pc32/include/smp.h,v 1.19 2006/09/30 21:28:43 swildner Exp $ + * $DragonFly: src/sys/platform/pc32/include/smp.h,v 1.20 2006/11/07 06:43:24 dillon Exp $ * */ @@ -35,7 +35,7 @@ extern int current_postcode; /** XXX currently in mp_machdep.c */ outb(0x80, current_postcode) -#include +#include #include /* global data in mpboot.s */ diff --git a/sys/cpu/i386/include/types.h b/sys/platform/pc32/include/types.h similarity index 67% copy from sys/cpu/i386/include/types.h copy to sys/platform/pc32/include/types.h index 327a2b0a43..469400cede 100644 --- a/sys/cpu/i386/include/types.h +++ b/sys/platform/pc32/include/types.h @@ -32,7 +32,7 @@ * * @(#)types.h 8.3 (Berkeley) 1/5/94 * $FreeBSD: src/sys/i386/include/types.h,v 1.19.2.1 2001/03/21 10:50:58 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/types.h,v 1.10 2006/05/20 02:42:06 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/types.h,v 1.1 2006/11/07 06:43:24 dillon Exp $ */ #ifndef _MACHINE_TYPES_H_ @@ -42,40 +42,7 @@ #include #endif -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) -typedef struct _physadr { - int r[1]; -} *physadr; - -typedef struct label_t { - int val[6]; -} label_t; -#endif - -typedef unsigned int vm_offset_t; /* address space bounded offset */ -typedef unsigned int vm_size_t; /* address space bounded size */ -typedef __int64_t vm_ooffset_t; /* VM object bounded offset */ -typedef unsigned int vm_pindex_t; /* physical page index */ -typedef __uint64_t vm_poff_t; /* physical offset */ -typedef __uint64_t vm_paddr_t; /* physical addr (same as vm_poff_t) */ - -typedef __int32_t register_t; -typedef __uint32_t u_register_t; - -#ifdef _KERNEL -typedef int intfptr_t; -typedef unsigned int uintfptr_t; -#endif - -/* - * MMU page tables - */ -typedef __uint32_t pd_entry_t; -typedef __uint32_t pt_entry_t; -typedef __uint32_t cpumask_t; /* mask representing a set of cpus */ - -#define PDESIZE sizeof(pd_entry_t) /* for assembly files */ -#define PTESIZE sizeof(pt_entry_t) /* for assembly files */ +#include /* Interrupt mask (spl, xxx_imask, etc) */ typedef __uint32_t intrmask_t; diff --git a/sys/platform/pc32/isa/clock.c b/sys/platform/pc32/isa/clock.c index 1fa6fde777..f0d53c1324 100644 --- a/sys/platform/pc32/isa/clock.c +++ b/sys/platform/pc32/isa/clock.c @@ -35,7 +35,7 @@ * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/isa/clock.c,v 1.149.2.6 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/isa/clock.c,v 1.47 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/clock.c,v 1.48 2006/11/07 06:43:24 dillon Exp $ */ /* @@ -82,12 +82,12 @@ #include #include -#include +#include #include #include -#include +#include -#include +#include #ifdef APIC_IO /* The interrupt triggered by the 8254 (timer) chip */ diff --git a/sys/platform/pc32/isa/intr_machdep.c b/sys/platform/pc32/isa/intr_machdep.c index 75dacfd466..05775b4560 100644 --- a/sys/platform/pc32/isa/intr_machdep.c +++ b/sys/platform/pc32/isa/intr_machdep.c @@ -35,7 +35,7 @@ * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 * $FreeBSD: src/sys/i386/isa/intr_machdep.c,v 1.29.2.5 2001/10/14 06:54:27 luigi Exp $ - * $DragonFly: src/sys/platform/pc32/isa/intr_machdep.c,v 1.46 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/intr_machdep.c,v 1.47 2006/11/07 06:43:24 dillon Exp $ */ /* * This file contains an aggregated module marked: @@ -67,12 +67,12 @@ #include #include -#include +#include #if NISA > 0 #include #endif -#include +#include #include #include #include diff --git a/sys/platform/pc32/isa/ipl_funcs.c b/sys/platform/pc32/isa/ipl_funcs.c index 67ea22e71d..011e4b2cb3 100644 --- a/sys/platform/pc32/isa/ipl_funcs.c +++ b/sys/platform/pc32/isa/ipl_funcs.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/ipl_funcs.c,v 1.32.2.5 2002/12/17 18:04:02 sam Exp $ - * $DragonFly: src/sys/platform/pc32/isa/ipl_funcs.c,v 1.13 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/ipl_funcs.c,v 1.14 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -35,7 +35,7 @@ #include #include #include -#include +#include /* * Bits in the ipending bitmap variable must be set atomically because diff --git a/sys/platform/pc32/isa/npx.c b/sys/platform/pc32/isa/npx.c index c4a9330b7e..4acfa7af89 100644 --- a/sys/platform/pc32/isa/npx.c +++ b/sys/platform/pc32/isa/npx.c @@ -33,7 +33,7 @@ * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/isa/npx.c,v 1.80.2.3 2001/10/20 19:04:38 tegge Exp $ - * $DragonFly: src/sys/platform/pc32/isa/npx.c,v 1.36 2006/10/25 20:55:51 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/npx.c,v 1.37 2006/11/07 06:43:24 dillon Exp $ */ #include "opt_cpu.h" @@ -72,8 +72,8 @@ #include #ifndef SMP -#include -#include +#include +#include #include #endif diff --git a/sys/platform/pc32/isa/prof_machdep.c b/sys/platform/pc32/isa/prof_machdep.c index 3ba0c5f537..f0694c40cd 100644 --- a/sys/platform/pc32/isa/prof_machdep.c +++ b/sys/platform/pc32/isa/prof_machdep.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/prof_machdep.c,v 1.14.2.1 2000/08/03 00:09:30 ps Exp $ - * $DragonFly: src/sys/platform/pc32/isa/prof_machdep.c,v 1.7 2006/10/23 21:50:31 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/prof_machdep.c,v 1.8 2006/11/07 06:43:25 dillon Exp $ */ #ifdef GUPROF @@ -46,7 +46,7 @@ #include #include -#include +#include #ifdef GUPROF #define CPUTIME_CLOCK_UNINITIALIZED 0 diff --git a/sys/platform/vkernel/conf/Makefile b/sys/platform/vkernel/conf/Makefile index 3550ee7b9d..2d54fdd917 100644 --- a/sys/platform/vkernel/conf/Makefile +++ b/sys/platform/vkernel/conf/Makefile @@ -1,7 +1,7 @@ -# $DragonFly: src/sys/platform/vkernel/conf/Makefile,v 1.2 2006/10/23 18:01:15 dillon Exp $ +# $DragonFly: src/sys/platform/vkernel/conf/Makefile,v 1.3 2006/11/07 06:43:25 dillon Exp $ # # Which version of config(8) is required. -%VERSREQ= 400024 +%VERSREQ= 400025 .if !defined(S) .if exists(./@/.) diff --git a/sys/platform/vkernel/i386/genassym.c b/sys/platform/vkernel/i386/genassym.c index a9e92c2f2a..4ac6f0b0db 100644 --- a/sys/platform/vkernel/i386/genassym.c +++ b/sys/platform/vkernel/i386/genassym.c @@ -35,7 +35,7 @@ * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $ - * $DragonFly: src/sys/platform/vkernel/i386/genassym.c,v 1.51 2006/09/19 11:47:35 corecode Exp $ + * $DragonFly: src/sys/platform/vkernel/i386/genassym.c,v 1.52 2006/11/07 06:43:24 dillon Exp $ */ #include @@ -66,7 +66,7 @@ #include #include #ifdef SMP -#include +#include #endif #include #include diff --git a/sys/cpu/i386/include/types.h b/sys/sys/reg.h similarity index 54% copy from sys/cpu/i386/include/types.h copy to sys/sys/reg.h index 327a2b0a43..ec1a9cd27d 100644 --- a/sys/cpu/i386/include/types.h +++ b/sys/sys/reg.h @@ -1,6 +1,9 @@ /*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,55 +33,33 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)types.h 8.3 (Berkeley) 1/5/94 - * $FreeBSD: src/sys/i386/include/types.h,v 1.19.2.1 2001/03/21 10:50:58 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/types.h,v 1.10 2006/05/20 02:42:06 dillon Exp $ + * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 + * $FreeBSD: src/sys/i386/include/reg.h,v 1.22.2.2 2002/11/07 22:47:55 alfred Exp $ + * $DragonFly: src/sys/sys/reg.h,v 1.1 2006/11/07 06:43:24 dillon Exp $ */ -#ifndef _MACHINE_TYPES_H_ -#define _MACHINE_TYPES_H_ +#ifndef _MACHINE_REG_H_ +#define _MACHINE_REG_H_ -#ifndef _MACHINE_STDINT_H_ -#include -#endif +#include -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) -typedef struct _physadr { - int r[1]; -} *physadr; +#ifdef _KERNEL -typedef struct label_t { - int val[6]; -} label_t; +#ifndef _SYS_TYPES_H_ +#include #endif -typedef unsigned int vm_offset_t; /* address space bounded offset */ -typedef unsigned int vm_size_t; /* address space bounded size */ -typedef __int64_t vm_ooffset_t; /* VM object bounded offset */ -typedef unsigned int vm_pindex_t; /* physical page index */ -typedef __uint64_t vm_poff_t; /* physical offset */ -typedef __uint64_t vm_paddr_t; /* physical addr (same as vm_poff_t) */ - -typedef __int32_t register_t; -typedef __uint32_t u_register_t; - -#ifdef _KERNEL -typedef int intfptr_t; -typedef unsigned int uintfptr_t; -#endif +struct proc; +struct lwp; /* - * MMU page tables + * XXX these interfaces are MI, so they should be declared in a MI place. */ -typedef __uint32_t pd_entry_t; -typedef __uint32_t pt_entry_t; -typedef __uint32_t cpumask_t; /* mask representing a set of cpus */ - -#define PDESIZE sizeof(pd_entry_t) /* for assembly files */ -#define PTESIZE sizeof(pt_entry_t) /* for assembly files */ +int set_fpregs (struct lwp *, struct fpreg *); +int set_regs (struct lwp *lp, struct reg *regs); +void setregs (struct lwp *, u_long, u_long, u_long); +int set_dbregs (struct lwp *lp, struct dbreg *dbregs); -/* Interrupt mask (spl, xxx_imask, etc) */ -typedef __uint32_t intrmask_t; - -#endif /* !_MACHINE_TYPES_H_ */ +#endif +#endif /* !_MACHINE_REG_H_ */ diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index fc1b572760..c85ee18ef9 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -35,7 +35,7 @@ * * @(#)sysctl.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/sys/sys/sysctl.h,v 1.81.2.10 2003/05/01 22:48:09 trhodes Exp $ - * $DragonFly: src/sys/sys/sysctl.h,v 1.18 2006/09/10 01:26:40 dillon Exp $ + * $DragonFly: src/sys/sys/sysctl.h,v 1.19 2006/11/07 06:43:25 dillon Exp $ */ #ifndef _SYS_SYSCTL_H_ @@ -458,7 +458,8 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define HW_DISKSTATS 9 /* struct: diskstats[] */ #define HW_FLOATINGPT 10 /* int: has HW floating point? */ #define HW_MACHINE_ARCH 11 /* string: machine architecture */ -#define HW_MAXID 12 /* number of valid hw ids */ +#define HW_MACHINE_CPU 12 /* string: cpu architecture */ +#define HW_MAXID 13 /* number of valid hw ids */ #define CTL_HW_NAMES { \ { 0, 0 }, \ -- 2.41.0