Date: Wed, 11 Feb 2004 13:10:30 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 46815 for review Message-ID: <200402112110.i1BLAUFu033646@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=46815 Change 46815 by jhb@jhb_slimer on 2004/02/11 13:09:41 IFC @46814. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/cpu_switch.S#9 integrate .. //depot/projects/smpng/sys/amd64/conf/NOTES#2 integrate .. //depot/projects/smpng/sys/boot/Makefile#13 integrate .. //depot/projects/smpng/sys/boot/common/Makefile.inc#6 integrate .. //depot/projects/smpng/sys/boot/ficl/Makefile#8 integrate .. //depot/projects/smpng/sys/boot/i386/Makefile.inc#5 integrate .. //depot/projects/smpng/sys/boot/i386/boot0/Makefile#8 integrate .. //depot/projects/smpng/sys/boot/i386/boot0sio/Makefile#2 integrate .. //depot/projects/smpng/sys/boot/i386/boot2/Makefile#13 integrate .. //depot/projects/smpng/sys/boot/i386/btx/Makefile.inc#2 integrate .. //depot/projects/smpng/sys/boot/i386/btx/btx/Makefile#5 integrate .. //depot/projects/smpng/sys/boot/i386/btx/btx/btx.S#1 branch .. //depot/projects/smpng/sys/boot/i386/btx/btx/btx.s#9 delete .. //depot/projects/smpng/sys/boot/i386/btx/btxldr/Makefile#5 integrate .. //depot/projects/smpng/sys/boot/i386/btx/btxldr/btxldr.S#1 branch .. //depot/projects/smpng/sys/boot/i386/btx/btxldr/btxldr.s#4 delete .. //depot/projects/smpng/sys/boot/i386/btx/lib/Makefile#6 integrate .. //depot/projects/smpng/sys/boot/i386/cdboot/Makefile#4 integrate .. //depot/projects/smpng/sys/boot/i386/kgzldr/Makefile#10 integrate .. //depot/projects/smpng/sys/boot/i386/libi386/Makefile#11 integrate .. //depot/projects/smpng/sys/boot/i386/loader/Makefile#14 integrate .. //depot/projects/smpng/sys/boot/i386/mbr/Makefile#5 integrate .. //depot/projects/smpng/sys/boot/i386/pxeldr/Makefile#6 integrate .. //depot/projects/smpng/sys/boot/i386/pxeldr/pxeldr.S#1 branch .. //depot/projects/smpng/sys/boot/i386/pxeldr/pxeldr.s#4 delete .. //depot/projects/smpng/sys/boot/pc98/Makefile.inc#3 integrate .. //depot/projects/smpng/sys/boot/pc98/boot0.5/Makefile#2 integrate .. //depot/projects/smpng/sys/boot/pc98/boot0/Makefile#2 integrate .. //depot/projects/smpng/sys/boot/pc98/boot2/Makefile#11 integrate .. //depot/projects/smpng/sys/boot/pc98/btx/Makefile.inc#1 branch .. //depot/projects/smpng/sys/boot/pc98/btx/btx/Makefile#4 integrate .. //depot/projects/smpng/sys/boot/pc98/btx/btxldr/Makefile#3 integrate .. //depot/projects/smpng/sys/boot/pc98/btx/lib/Makefile#5 integrate .. //depot/projects/smpng/sys/boot/pc98/kgzldr/Makefile#8 integrate .. //depot/projects/smpng/sys/boot/pc98/libpc98/Makefile#10 integrate .. //depot/projects/smpng/sys/boot/pc98/loader/Makefile#10 integrate .. //depot/projects/smpng/sys/boot/powerpc/loader/Makefile#9 integrate .. //depot/projects/smpng/sys/boot/sparc64/Makefile.inc#1 branch .. //depot/projects/smpng/sys/boot/sparc64/boot1/Makefile#6 integrate .. //depot/projects/smpng/sys/boot/sparc64/boot1/_start.s#1 branch .. //depot/projects/smpng/sys/boot/sparc64/loader/Makefile#14 integrate .. //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#37 integrate .. //depot/projects/smpng/sys/compat/ndis/kern_ndis.c#8 integrate .. //depot/projects/smpng/sys/compat/ndis/ndis_var.h#7 integrate .. //depot/projects/smpng/sys/compat/ndis/ntoskrnl_var.h#4 integrate .. //depot/projects/smpng/sys/compat/ndis/subr_hal.c#5 integrate .. //depot/projects/smpng/sys/compat/ndis/subr_ndis.c#9 integrate .. //depot/projects/smpng/sys/compat/ndis/subr_ntoskrnl.c#7 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_types.h#2 integrate .. //depot/projects/smpng/sys/conf/files#102 integrate .. //depot/projects/smpng/sys/conf/kern.mk#9 integrate .. //depot/projects/smpng/sys/conf/majors#35 integrate .. //depot/projects/smpng/sys/conf/options#69 integrate .. //depot/projects/smpng/sys/dev/aac/aac.c#34 integrate .. //depot/projects/smpng/sys/dev/aac/aac_debug.c#13 integrate .. //depot/projects/smpng/sys/dev/aac/aac_ioctl.h#6 integrate .. //depot/projects/smpng/sys/dev/aac/aac_pci.c#28 integrate .. //depot/projects/smpng/sys/dev/aac/aacvar.h#21 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi.c#58 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_button.c#12 integrate .. //depot/projects/smpng/sys/dev/acpica/acpivar.h#37 integrate .. //depot/projects/smpng/sys/dev/amr/amr.c#18 integrate .. //depot/projects/smpng/sys/dev/ata/atapi-cam.c#19 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#30 integrate .. //depot/projects/smpng/sys/dev/em/if_em_hw.c#12 integrate .. //depot/projects/smpng/sys/dev/em/if_em_hw.h#12 integrate .. //depot/projects/smpng/sys/dev/if_ndis/if_ndis.c#8 integrate .. //depot/projects/smpng/sys/dev/isp/isp.c#32 integrate .. //depot/projects/smpng/sys/dev/isp/isp_freebsd.c#27 integrate .. //depot/projects/smpng/sys/dev/isp/isp_freebsd.h#21 integrate .. //depot/projects/smpng/sys/dev/isp/isp_ioctl.h#10 integrate .. //depot/projects/smpng/sys/dev/isp/isp_pci.c#22 integrate .. //depot/projects/smpng/sys/dev/isp/ispvar.h#20 integrate .. //depot/projects/smpng/sys/dev/vinum/vinumconfig.c#19 integrate .. //depot/projects/smpng/sys/fs/pseudofs/pseudofs_vnops.c#29 integrate .. //depot/projects/smpng/sys/fs/smbfs/smbfs_node.c#14 integrate .. //depot/projects/smpng/sys/fs/smbfs/smbfs_node.h#6 integrate .. //depot/projects/smpng/sys/fs/smbfs/smbfs_vnops.c#24 integrate .. //depot/projects/smpng/sys/geom/bde/g_bde.c#12 integrate .. //depot/projects/smpng/sys/geom/bde/g_bde_work.c#11 integrate .. //depot/projects/smpng/sys/geom/geom.h#34 integrate .. //depot/projects/smpng/sys/geom/geom_ccd.c#9 integrate .. //depot/projects/smpng/sys/geom/geom_disk.c#33 integrate .. //depot/projects/smpng/sys/geom/geom_event.c#26 integrate .. //depot/projects/smpng/sys/geom/geom_fox.c#4 integrate .. //depot/projects/smpng/sys/geom/geom_io.c#27 integrate .. //depot/projects/smpng/sys/geom/geom_kern.c#17 integrate .. //depot/projects/smpng/sys/kern/kern_resource.c#44 integrate .. //depot/projects/smpng/sys/kern/uipc_syscalls.c#47 integrate .. //depot/projects/smpng/sys/kern/vfs_bio.c#57 integrate .. //depot/projects/smpng/sys/net/pfkeyv2.h#6 integrate .. //depot/projects/smpng/sys/netinet/ip.h#8 integrate .. //depot/projects/smpng/sys/netinet/ip_output.c#50 integrate .. //depot/projects/smpng/sys/netinet/tcp.h#4 integrate .. //depot/projects/smpng/sys/netinet/tcp_input.c#47 integrate .. //depot/projects/smpng/sys/netinet/tcp_output.c#21 integrate .. //depot/projects/smpng/sys/netinet/tcp_subr.c#42 integrate .. //depot/projects/smpng/sys/netinet/tcp_syncache.c#26 integrate .. //depot/projects/smpng/sys/netinet/tcp_usrreq.c#25 integrate .. //depot/projects/smpng/sys/netinet/tcp_var.h#19 integrate .. //depot/projects/smpng/sys/netinet6/in6_pcb.c#27 integrate .. //depot/projects/smpng/sys/netinet6/ip6_output.c#29 integrate .. //depot/projects/smpng/sys/netinet6/ipsec.h#9 integrate .. //depot/projects/smpng/sys/netipsec/ipsec.h#6 integrate .. //depot/projects/smpng/sys/netipsec/key.c#8 integrate .. //depot/projects/smpng/sys/netsmb/smb_dev.c#13 integrate .. //depot/projects/smpng/sys/netsmb/smb_dev.h#2 integrate .. //depot/projects/smpng/sys/nfs4client/nfs4_dev.c#2 integrate .. //depot/projects/smpng/sys/powerpc/include/hid.h#2 integrate .. //depot/projects/smpng/sys/powerpc/include/intr_machdep.h#4 integrate .. //depot/projects/smpng/sys/powerpc/include/param.h#10 integrate .. //depot/projects/smpng/sys/powerpc/include/pmap.h#11 integrate .. //depot/projects/smpng/sys/powerpc/include/spr.h#4 integrate .. //depot/projects/smpng/sys/powerpc/include/sr.h#2 integrate .. //depot/projects/smpng/sys/powerpc/include/vmparam.h#3 integrate .. //depot/projects/smpng/sys/powerpc/ofw/ofw_pci.c#4 integrate .. //depot/projects/smpng/sys/powerpc/powermac/grackle.c#2 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/clock.c#13 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/copyinout.c#8 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/cpu.c#3 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/critical.c#5 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/db_memrw.c#3 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/fpu.c#4 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/genassym.c#20 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/intr_machdep.c#4 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/locore.S#4 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/machdep.c#49 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/nexus.c#7 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/pmap.c#37 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/suswintr.c#3 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/uma_machdep.c#2 integrate .. //depot/projects/smpng/sys/powerpc/psim/ata_iobus.c#7 integrate .. //depot/projects/smpng/sys/sys/mbuf.h#33 integrate .. //depot/projects/smpng/sys/sys/param.h#55 integrate .. //depot/projects/smpng/sys/sys/socket.h#17 integrate .. //depot/projects/smpng/sys/sys/uio.h#16 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_vnops.c#27 integrate .. //depot/projects/smpng/sys/vm/swap_pager.c#41 integrate .. //depot/projects/smpng/sys/vm/vm_pageout.c#41 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/cpu_switch.S#9 (text+ko) ==== @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.146 2004/01/29 00:02:54 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.147 2004/02/06 20:38:39 peter Exp $ */ #include <machine/asmacros.h> @@ -48,6 +48,12 @@ .text +#ifdef SMP +#define LK lock ; +#else +#define LK +#endif + /* * cpu_throw() * @@ -66,10 +72,7 @@ /* release bit from old pm_active */ movq TD_PROC(%rdi), %rdx /* oldtd->td_proc */ movq P_VMSPACE(%rdx), %rdx /* proc->p_vmspace */ -#ifdef SMP - lock -#endif - btrl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* clear old */ + LK btrl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* clear old */ 1: movq TD_PCB(%rsi),%rdx /* newtd->td_proc */ movq PCB_CR3(%rdx),%rdx @@ -77,10 +80,7 @@ /* set bit in new pm_active */ movq TD_PROC(%rsi),%rdx movq P_VMSPACE(%rdx), %rdx -#ifdef SMP - lock -#endif - btsl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* set new */ + LK btsl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* set new */ jmp sw1 /* @@ -92,13 +92,7 @@ * %rsi = newtd */ ENTRY(cpu_switch) - /* Switch to new thread. First, save context. */ -#ifdef INVARIANTS - testq %rdi,%rdi /* no thread? */ - jz badsw2 /* no, panic */ -#endif - movq TD_PCB(%rdi),%r8 movq (%rsp),%rax /* Hardware registers */ @@ -164,10 +158,6 @@ 1: /* Save is done. Now fire up new thread. Leave old vmspace. */ -#ifdef INVARIANTS - testq %rsi,%rsi /* no thread? */ - jz badsw3 /* no, panic */ -#endif movq TD_PCB(%rsi),%r8 /* switch address space */ @@ -185,18 +175,12 @@ /* Release bit from old pmap->pm_active */ movq TD_PROC(%rdi), %rdx /* oldproc */ movq P_VMSPACE(%rdx), %rdx -#ifdef SMP - lock -#endif - btrl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* clear old */ + LK btrl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* clear old */ /* Set bit in new pmap->pm_active */ movq TD_PROC(%rsi),%rdx /* newproc */ movq P_VMSPACE(%rdx), %rdx -#ifdef SMP - lock -#endif - btsl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* set new */ + LK btsl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* set new */ sw1: /* @@ -275,76 +259,6 @@ ret -#ifdef INVARIANTS -badsw1: - pushq %rax - pushq %rcx - pushq %rdx - pushq %rbx - pushq %rbp - pushq %rsi - pushq %rdi - pushq %r8 - pushq %r9 - pushq %r10 - pushq %r11 - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq $0,%rdi - movq $0,%rsi - leaq sw0_1,%rdx - call __panic -sw0_1: .asciz "cpu_throw: no newthread supplied" - -badsw2: - pushq %rax - pushq %rcx - pushq %rdx - pushq %rbx - pushq %rbp - pushq %rsi - pushq %rdi - pushq %r8 - pushq %r9 - pushq %r10 - pushq %r11 - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq $0,%rdi - movq $0,%rsi - leaq sw0_2,%rdx - call __panic -sw0_2: .asciz "cpu_switch: no curthread supplied" - -badsw3: - pushq %rax - pushq %rcx - pushq %rdx - pushq %rbx - pushq %rbp - pushq %rsi - pushq %rdi - pushq %r8 - pushq %r9 - pushq %r10 - pushq %r11 - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq $0,%rdi - movq $0,%rsi - leaq sw0_3,%rdx - call __panic -sw0_3: .asciz "cpu_switch: no newthread supplied" -#endif - -noswitch: .asciz "cpu_switch: called!" -nothrow: .asciz "cpu_throw: called!" /* * savectx(pcb) * Update pcb, saving current processor state. ==== //depot/projects/smpng/sys/amd64/conf/NOTES#2 (text+ko) ==== @@ -4,9 +4,12 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # (XXX from i386:NOTES,v 1.1106; merge in updates) -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.2 2004/02/06 01:51:58 peter Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.3 2004/02/08 00:39:38 peter Exp $ # +# We don't have modules on amd64. +makeoptions NO_MODULES=not_yet + # # This directive is mandatory; it defines the architecture to be # configured for; in this case, the 386 family based IBM-PC and ==== //depot/projects/smpng/sys/boot/Makefile#13 (text+ko) ==== @@ -1,8 +1,4 @@ -# $FreeBSD: src/sys/boot/Makefile,v 1.20 2004/01/27 22:15:03 schweikh Exp $ - -.if ${MACHINE_ARCH} == "amd64" -.MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true -.endif +# $FreeBSD: src/sys/boot/Makefile,v 1.21 2004/02/07 08:10:06 ru Exp $ .if !defined(NOFORTH) # Build the add-in FORTH interpreter. @@ -15,7 +11,7 @@ .endif # Pick the machine-dependent subdir based on the target architecture. -SUBDIR+= ${MACHINE} +SUBDIR+= ${MACHINE:S/amd64/i386/} # Build ARC / AlphaBIOS executable on the Alpha # (this is a WIP (work in progress)). ==== //depot/projects/smpng/sys/boot/common/Makefile.inc#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/common/Makefile.inc,v 1.16 2003/06/26 03:51:57 peter Exp $ +# $FreeBSD: src/sys/boot/common/Makefile.inc,v 1.17 2004/02/07 11:05:10 ru Exp $ SRCS+= bcache.c boot.c commands.c console.c devopen.c interp.c SRCS+= interp_backslash.c interp_parse.c ls.c misc.c @@ -19,15 +19,15 @@ .endif # Machine-independant ISA PnP -.if HAVE_ISABUS +.if defined(HAVE_ISABUS) SRCS+= isapnp.c .endif -.if HAVE_PNP +.if defined(HAVE_PNP) SRCS+= pnp.c .endif # Forth interpreter -.if BOOT_FORTH +.if defined(BOOT_FORTH) SRCS+= interp_forth.c MAN+= ../forth/loader.conf.5 MAN+= ../forth/loader.4th.8 ==== //depot/projects/smpng/sys/boot/ficl/Makefile#8 (text+ko) ==== @@ -1,10 +1,6 @@ -# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.36 2003/12/10 09:10:54 grehan Exp $ +# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.37 2004/02/07 08:10:07 ru Exp $ # -.if ${MACHINE_ARCH} == "amd64" -.MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true -.endif - -.PATH: ${.CURDIR}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ prefix.c search.c stack.c tools.c vm.c words.c @@ -14,7 +10,7 @@ .if ${MACHINE_ARCH} == "alpha" CFLAGS+= -mno-fp-regs .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" CFLAGS+= -mpreferred-stack-boundary=2 .endif .if ${MACHINE_ARCH} == "powerpc" @@ -44,17 +40,18 @@ # Optional OO extension softwords #SOFTWORDS+= oo.fr classes.fr -.if defined(REALLY_AMD64) +.if ${MACHINE_ARCH} == "amd64" CFLAGS+= -m32 -I. .endif -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR}/../common +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} \ + -I${.CURDIR}/../common softcore.c: ${SOFTWORDS} softcore.awk (cd ${.CURDIR}/softwords; cat ${SOFTWORDS} \ | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET} -.if defined(REALLY_AMD64) +.if ${MACHINE_ARCH} == "amd64" ${SRCS:M*.c:R:S/$/.o/g}: machine beforedepend ${OBJS}: machine ==== //depot/projects/smpng/sys/boot/i386/Makefile.inc#5 (text+ko) ==== @@ -1,18 +1,25 @@ # Common defines for all of /sys/boot/i386/ # -# $FreeBSD: src/sys/boot/i386/Makefile.inc,v 1.6 2004/02/06 12:58:31 ru Exp $ +# $FreeBSD: src/sys/boot/i386/Makefile.inc,v 1.9 2004/02/09 14:11:55 ru Exp $ BINDIR?= /boot -LOADER_ADDRESS?= 0x200000 -CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 +LOADER_ADDRESS?=0x200000 +CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 +LDFLAGS+= -nostdlib .if ${MACHINE_ARCH} == "amd64" -.MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true +CFLAGS+= -m32 +LDFLAGS+= -m elf_i386_fbsd +AFLAGS+= --32 .endif -.if defined(REALLY_AMD64) -CFLAGS+= -m32 -LDFLAGS+= -m elf_i386_fbsd -AFLAGS+= --32 +# BTX components +.if exists(${.OBJDIR}/../btx) +BTXDIR= ${.OBJDIR}/../btx +.else +BTXDIR= ${.CURDIR}/../btx .endif +BTXLDR= ${BTXDIR}/btxldr/btxldr +BTXKERN= ${BTXDIR}/btx/btx +BTXCRT= ${BTXDIR}/lib/crt0.o ==== //depot/projects/smpng/sys/boot/i386/boot0/Makefile#8 (text+ko) ==== @@ -1,11 +1,13 @@ -# $FreeBSD: src/sys/boot/i386/boot0/Makefile,v 1.21 2004/02/06 12:58:31 ru Exp $ +# $FreeBSD: src/sys/boot/i386/boot0/Makefile,v 1.23 2004/02/09 14:11:56 ru Exp $ -PROG?= boot0 +PROG= ${BOOT}.out +INTERNALPROG= +FILES= ${BOOT} NOMAN= -STRIP= -BINMODE= 444 +SRCS= ${BOOT}.s +CLEANFILES= ${BOOT} -M4?= m4 +BOOT?= boot0 # The default set of flags compiled into boot0. This enables update (writing # the modified boot0 back to disk after running so that the selection made is @@ -28,16 +30,13 @@ # command line BOOT_BOOT0_COMCONSOLE_SPEED?= 0xE3 -${PROG}: ${PROG}.o - ${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o ${PROG}.out ${PROG}.o - objcopy -S -O binary ${PROG}.out ${.TARGET} +AFLAGS+=--defsym FLAGS=${BOOT_BOOT0_FLAGS} \ + --defsym TICKS=${BOOT_BOOT0_TICKS} \ + --defsym COMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED} -${PROG}.o: ${PROG}.s - ${AS} ${AFLAGS} --defsym FLAGS=${BOOT_BOOT0_FLAGS} \ - --defsym TICKS=${BOOT_BOOT0_TICKS} \ - --defsym COMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED} \ - ${.IMPSRC} -o ${.TARGET} +LDFLAGS=-N -e start -Ttext ${BOOT_BOOT0_ORG} -CLEANFILES+= ${PROG}.out ${PROG}.o +${BOOT}: ${BOOT}.out + objcopy -S -O binary ${BOOT}.out ${.TARGET} .include <bsd.prog.mk> ==== //depot/projects/smpng/sys/boot/i386/boot0sio/Makefile#2 (text+ko) ==== @@ -1,7 +1,7 @@ -# $FreeBSD: src/sys/boot/i386/boot0sio/Makefile,v 1.1 2003/12/08 19:02:06 obrien Exp $ +# $FreeBSD: src/sys/boot/i386/boot0sio/Makefile,v 1.2 2004/02/06 21:58:31 ru Exp $ .PATH: ${.CURDIR}/../boot0 -PROG= boot0sio +BOOT= boot0sio .include "${.CURDIR}/../boot0/Makefile" ==== //depot/projects/smpng/sys/boot/i386/boot2/Makefile#13 (text+ko) ==== @@ -1,12 +1,6 @@ -# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.48 2004/02/06 12:58:31 ru Exp $ +# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.54 2004/02/09 14:11:56 ru Exp $ -PROG= boot2 -NOMAN= -STRIP= -BINMODE= 444 -CLEANFILES= boot boot1 boot1.out boot1.o \ - boot2.ldr boot2.bin boot2.ld boot2.out boot2.o boot2.h \ - boot2.s sio.o +FILES= boot boot1 boot2 NM?= nm @@ -17,23 +11,21 @@ BOOT_COMCONSOLE_SPEED?= 9600 B2SIOFMT?= 0x3 -.if exists(${.OBJDIR}/../btx) -BTX= ${.OBJDIR}/../btx -.else -BTX= ${.CURDIR}/../btx -.endif - REL1= 0x700 ORG1= 0x7c00 ORG2= 0x2000 -# Decide Level of UFS support. UFS1_AND_UFS2 doesn't fit. +# Decide level of UFS support. +BOOT2_UFS?= UFS1_AND_UFS2 +#BOOT2_UFS?= UFS2_ONLY +#BOOT2_UFS?= UFS1_ONLY -# BOOT2_UFS?= UFS2_ONLY -BOOT2_UFS?= UFS1_AND_UFS2 -# BOOT2_UFS?= UFS1_ONLY +AFLAGS+=--defsym FLAGS=${B1FLAGS} \ + --defsym SIOPRT=${BOOT_COMCONSOLE_PORT} \ + --defsym SIOFMT=${B2SIOFMT} \ + --defsym SIOSPD=${BOOT_COMCONSOLE_SPEED} -CFLAGS= -elf -ffreestanding -Os -fno-builtin \ +CFLAGS= -Os \ -fno-guess-branch-probability -fomit-frame-pointer\ -mno-align-long-strings \ -mrtd \ @@ -44,13 +36,18 @@ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -LDFLAGS=-nostdlib -static -N --gc-sections +LDFLAGS=-static -N --gc-sections + +# Pick up ../Makefile.inc early. +.include <bsd.init.mk> -all: boot1 boot2 boot +CLEANFILES= boot boot: boot1 boot2 cat boot1 boot2 > boot +CLEANFILES+= boot1 boot1.out boot1.o + boot1: boot1.out objcopy -S -O binary boot1.out ${.TARGET} @@ -58,65 +55,51 @@ ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o boot1.o: boot1.s - ${CPP} ${CFLAGS} ${.IMPSRC} | \ - ${AS} ${AFLAGS} --defsym FLAGS=${B1FLAGS} -o ${.TARGET} + ${CPP} ${CFLAGS} ${.CURDIR}/boot1.s | \ + ${AS} ${AFLAGS} -o ${.TARGET} -boot2.o: boot2.c ${.CURDIR}/../../common/ufsread.c - ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.IMPSRC} - sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s - rm -f boot2.s.tmp - ${AS} ${AFLAGS} -o boot2.o boot2.s +CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ + boot2.s boot2.s.tmp boot2.h sio.o -boot2.h: boot1.out - ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \ - { x = $$1 - ORG1; \ - printf("#define XREADORG %#x\n", REL1 + x) }' \ - ORG1=`printf "%d" ${ORG1}` \ - REL1=`printf "%d" ${REL1}` > boot2.h +boot2: boot2.ld + @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ + echo "$$x bytes available"; test $$x -ge 0 + dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync -boot2: boot2.ldr boot2.bin ${BTX}/btx/btx - btxld -v -E ${ORG2} -f bin -b ${BTX}/btx/btx -l boot2.ldr \ - -o boot2.ld -P 1 boot2.bin - @ls -l boot2.ld | awk '{ x = 7680 - $$5; \ - print x " bytes available"; if (x < 0) exit 1 }' - dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync 2>/dev/null +boot2.ld: boot2.ldr boot2.bin ${BTXKERN} + btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ + -o ${.TARGET} -P 1 boot2.bin boot2.ldr: - dd if=/dev/zero of=${.TARGET} bs=276 count=1 2>/dev/null + dd if=/dev/zero of=${.TARGET} bs=276 count=1 boot2.bin: boot2.out objcopy -S -O binary boot2.out ${.TARGET} -boot2.out: boot2.o sio.o - ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} \ - ${BTX}/lib/crt0.o ${.ALLSRC} +boot2.out: ${BTXCRT} boot2.o sio.o + ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} -boot2.o: boot2.h +boot2.o: boot2.s -sio.o: sio.s - ${AS} ${AFLAGS} --defsym SIOPRT=${BOOT_COMCONSOLE_PORT} \ - --defsym SIOFMT=${B2SIOFMT} \ - --defsym SIOSPD=${BOOT_COMCONSOLE_SPEED} \ - ${.IMPSRC} -o ${.TARGET} +SRCS= boot2.c boot2.h -install: - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - boot ${DESTDIR}${BINDIR}/boot - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - boot1 ${DESTDIR}${BINDIR}/boot1 - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - boot2 ${DESTDIR}${BINDIR}/boot2 +boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c + ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c + sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s + rm -f boot2.s.tmp -.include <bsd.prog.mk> +boot2.h: boot1.out + ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \ + { x = $$1 - ORG1; \ + printf("#define XREADORG %#x\n", REL1 + x) }' \ + ORG1=`printf "%d" ${ORG1}` \ + REL1=`printf "%d" ${REL1}` > ${.TARGET} -.if defined(REALLY_AMD64) -boot2.o: machine - -beforedepend ${OBJS}: machine - +.if ${MACHINE_ARCH} == "amd64" +beforedepend boot2.s: machine +CLEANFILES+= machine machine: ln -sf ${.CURDIR}/../../../i386/include machine - -CLEANFILES+= machine .endif +.include <bsd.prog.mk> ==== //depot/projects/smpng/sys/boot/i386/btx/Makefile.inc#2 (text+ko) ==== @@ -1,2 +1,3 @@ -# $FreeBSD: src/sys/boot/i386/btx/Makefile.inc,v 1.1 2003/06/26 03:51:57 peter Exp $ -.include <${.CURDIR}/../../Makefile.inc> +# $FreeBSD: src/sys/boot/i386/btx/Makefile.inc,v 1.2 2004/02/06 21:58:31 ru Exp $ + +.include "../Makefile.inc" ==== //depot/projects/smpng/sys/boot/i386/btx/btx/Makefile#5 (text+ko) ==== @@ -1,9 +1,13 @@ -# $FreeBSD: src/sys/boot/i386/btx/btx/Makefile,v 1.13 2002/09/17 01:48:54 peter Exp $ +# $FreeBSD: src/sys/boot/i386/btx/btx/Makefile,v 1.15 2004/02/11 08:42:37 ru Exp $ -M4?= m4 +PROG= btx.out +INTERNALPROG= +NOMAN= +SRCS= btx.S +CLEANFILES= btx .if defined(PAGING) -M4FLAGS+= -DPAGING +CFLAGS+=-DPAGING .endif .if defined(BOOT_BTX_NOHANG) @@ -12,29 +16,24 @@ BOOT_BTX_FLAGS=0x0 .endif -AFLAGS+= --defsym BTX_FLAGS=${BOOT_BTX_FLAGS} +CFLAGS+=-DBTX_FLAGS=${BOOT_BTX_FLAGS} .if defined(BTX_SERIAL) BOOT_COMCONSOLE_PORT?= 0x3f8 BOOT_COMCONSOLE_SPEED?= 9600 B2SIOFMT?= 0x3 -M4FLAGS+= -DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ - -DSIOFMT=${B2SIOFMT} -DSIOSPD=${BOOT_COMCONSOLE_SPEED} +CFLAGS+=-DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ + -DSIOFMT=${B2SIOFMT} -DSIOSPD=${BOOT_COMCONSOLE_SPEED} .endif ORG= 0x9000 all: btx -btx: btx.o - ${LD} -N -e start -Ttext ${ORG} -o btx.out btx.o +LDFLAGS=-N -e start -Ttext ${ORG} + +btx: btx.out objcopy -S -O binary btx.out ${.TARGET} -btx.o: btx.s - (cd ${.CURDIR}; ${M4} ${M4FLAGS} btx.s) | \ - ${AS} ${AFLAGS} -o ${.TARGET} - -CLEANFILES+= btx btx.out btx.o - .include <bsd.prog.mk> ==== //depot/projects/smpng/sys/boot/i386/btx/btxldr/Makefile#5 (text+ko) ==== @@ -1,22 +1,22 @@ -# $FreeBSD: src/sys/boot/i386/btx/btxldr/Makefile,v 1.12 2003/06/26 03:51:57 peter Exp $ +# $FreeBSD: src/sys/boot/i386/btx/btxldr/Makefile,v 1.14 2004/02/11 08:42:37 ru Exp $ + +PROG= btxldr.out +INTERNALPROG= +NOMAN= +SRCS= btxldr.S +CLEANFILES= btxldr -M4?= m4 -M4FLAGS+= -DLOADER_ADDRESS=${LOADER_ADDRESS} +CFLAGS+=-DLOADER_ADDRESS=${LOADER_ADDRESS} .if defined(BTXLDR_VERBOSE) -M4FLAGS+= -DBTXLDR_VERBOSE +CFLAGS+=-DBTXLDR_VERBOSE .endif all: btxldr -btxldr: btxldr.o - ${LD} -N -e start -Ttext ${LOADER_ADDRESS} -o btxldr.out btxldr.o +LDFLAGS=-N -e start -Ttext ${LOADER_ADDRESS} + +btxldr: btxldr.out objcopy -S -O binary btxldr.out ${.TARGET} -btxldr.o: btxldr.s - (cd ${.CURDIR}; ${M4} ${M4FLAGS} btxldr.s ) | \ - ${AS} ${AFLAGS} -o ${.TARGET} - -CLEANFILES+= btxldr btxldr.out btxldr.o - .include <bsd.prog.mk> ==== //depot/projects/smpng/sys/boot/i386/btx/lib/Makefile#6 (text+ko) ==== @@ -1,11 +1,9 @@ -# $FreeBSD: src/sys/boot/i386/btx/lib/Makefile,v 1.11 2003/06/30 14:10:57 ru Exp $ +# $FreeBSD: src/sys/boot/i386/btx/lib/Makefile,v 1.12 2004/02/09 14:11:57 ru Exp $ -OBJS= btxcsu.o btxsys.o btxv86.o -CLEANFILES= crt0.o - -all: crt0.o - -crt0.o: ${OBJS} - ${LD} ${LDFLAGS} -i -o ${.TARGET} ${OBJS} +PROG= crt0.o +INTERNALPROG= +NOMAN= +SRCS= btxcsu.s btxsys.s btxv86.s +LDFLAGS=-Wl,-r .include <bsd.prog.mk> ==== //depot/projects/smpng/sys/boot/i386/cdboot/Makefile#4 (text+ko) ==== @@ -1,17 +1,18 @@ -# $FreeBSD: src/sys/boot/i386/cdboot/Makefile,v 1.6 2004/02/06 12:58:31 ru Exp $ +# $FreeBSD: src/sys/boot/i386/cdboot/Makefile,v 1.8 2004/02/09 14:11:57 ru Exp $ -MAINTAINER=jhb@FreeBSD.org +PROG= ${BOOT}.out +INTERNALPROG= +FILES= ${BOOT} +NOMAN= +SRCS= ${BOOT}.s +CLEANFILES= ${BOOT} -ORG= 0x7c00 +BOOT= cdboot +ORG= 0x7c00 -PROG= cdboot -NOMAN= -STRIP= +${BOOT}: ${BOOT}.out + objcopy -S -O binary ${BOOT}.out ${.TARGET} -${PROG}: ${PROG}.o - ${LD} -N -e start -Ttext ${ORG} -o ${PROG}.out ${PROG}.o - objcopy -S -O binary ${PROG}.out ${.TARGET} - -CLEANFILES+= ${PROG}.o ${PROG}.out +LDFLAGS=-N -e start -Ttext ${ORG} .include <bsd.prog.mk> ==== //depot/projects/smpng/sys/boot/i386/kgzldr/Makefile#10 (text+ko) ==== @@ -1,25 +1,18 @@ -# $FreeBSD: src/sys/boot/i386/kgzldr/Makefile,v 1.16 2003/06/30 00:15:38 ru Exp $ +# $FreeBSD: src/sys/boot/i386/kgzldr/Makefile,v 1.19 2004/02/09 14:11:57 ru Exp $ + +PROG= kgzldr.o +BINMODE=${LIBMODE} +BINDIR= ${LIBDIR} +NOMAN= SRCS= start.s boot.c inflate.c lib.c crt.s sio.s -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -CFLAGS= -ffreestanding -CFLAGS+=-Os +CFLAGS= -Os CFLAGS+=-DKZIP -LDFLAGS=-nostdlib -static -Wl,-r +NOSHARED= +LDFLAGS=-Wl,-r .PATH: ${.CURDIR}/../../../kern -CLEANFILES=kgzldr.o - BOOT_COMCONSOLE_PORT?= 0x3f8 AFLAGS+=--defsym SIO_PRT=${BOOT_COMCONSOLE_PORT} -all: kgzldr.o - -kgzldr.o: ${OBJS} - ${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS} - -realinstall: - ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - kgzldr.o ${DESTDIR}${LIBDIR} - .include <bsd.prog.mk> ==== //depot/projects/smpng/sys/boot/i386/libi386/Makefile#11 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.32 2003/07/02 12:45:45 ru Exp $ +# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.36 2004/02/07 23:30:45 ru Exp $ # LIB= i386 INTERNALLIB= true @@ -10,7 +10,6 @@ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ time.c vidconsole.c amd64_tramp.S -CFLAGS+= -ffreestanding BOOT_COMCONSOLE_PORT?= 0x3f8 CFLAGS+= -DCOMPORT=${BOOT_COMCONSOLE_PORT} @@ -31,18 +30,14 @@ # the location of libstand CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ -# Make "machine" required for all objects -# (based on the more complete case in sys/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}/../../../i386/include) -beforedepend ${OBJS}: machine - +.if ${MACHINE_ARCH} == "amd64" CLEANFILES+= machine machine: ln -sf ${.CURDIR}/../../../i386/include machine - .endif .include <bsd.lib.mk> + +.if ${MACHINE_ARCH} == "amd64" +beforedepend ${OBJS}: machine +.endif ==== //depot/projects/smpng/sys/boot/i386/loader/Makefile#14 (text+ko) ==== @@ -1,14 +1,12 @@ -# $FreeBSD: src/sys/boot/i386/loader/Makefile,v 1.68 2004/02/06 12:58:31 ru Exp $ +# $FreeBSD: src/sys/boot/i386/loader/Makefile,v 1.73 2004/02/09 14:11:57 ru Exp $ -PROG= loader -STRIP= +PROG= loader.sym +INTERNALPROG= NEWVERSWHAT= "bootstrap loader" i386 -INSTALLFLAGS= -b # architecture-specific loader code -SRCS= main.c conf.c +SRCS= main.c conf.c vers.c -CFLAGS+= -ffreestanding # Enable PXE TFTP or NFS support, not both. .if defined(LOADER_TFTP_SUPPORT) CFLAGS+= -DLOADER_TFTP_SUPPORT @@ -24,12 +22,8 @@ # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 -.if exists(${.OBJDIR}/../../ficl/libficl.a) LIBFICL= ${.OBJDIR}/../../ficl/libficl.a -.else -LIBFICL= ${.CURDIR}/../../ficl/libficl.a .endif -.endif .if defined(LOADER_BZIP2_SUPPORT) CFLAGS+= -DLOADER_BZIP2_SUPPORT @@ -42,86 +36,62 @@ .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common -CFLAGS+= -I${.CURDIR}/../../.. -I. +CFLAGS+= -I. -CLEANFILES+= vers.c vers.o ${PROG}.list ${PROG}.bin ${PROG}.sym ${PROG}.help +CLEANFILES= vers.c loader loader.list loader.bin loader.help CFLAGS+= -Wall -LDFLAGS= -nostdlib -static -Ttext 0x0 +LDFLAGS= -static -Ttext 0x0 # i386 standalone support library LIBI386= ${.OBJDIR}/../libi386/libi386.a CFLAGS+= -I${.CURDIR}/.. -# where to get libstand from -#XXX need a better way to do this -LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a -.if !exists(${LIBSTAND}) -LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a -.if !exists(${LIBSTAND}) -LIBSTAND= -lstand -.endif -.endif -CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ - # BTX components -.if exists(${.OBJDIR}/../btx) -BTXDIR= ${.OBJDIR}/../btx -.else >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402112110.i1BLAUFu033646>