Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jun 2002 06:53:27 -0700 (PDT)
From:      Bosko Milekic <bmilekic@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 13448 for review
Message-ID:  <200206261353.g5QDrRnI068319@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=13448

Change 13448 by bmilekic@bmilekic_angela on 2002/06/26 06:52:31

	IFC, keep up with pre-KSE III -CURRENT.  TODO:
	- Move heavyweight int. sched routine [back] to C, hopefully
	- Re-enable preemption for the heavyweight scheduling case
	- Prepare self psychologically and emotionally for KSE milestone 3
	  and bug julian to commit it or something; :-)

Affected files ...

.. //depot/projects/interrupt/sys/alpha/alpha/trap.c#6 integrate
.. //depot/projects/interrupt/sys/alpha/alpha/vm_machdep.c#4 integrate
.. //depot/projects/interrupt/sys/arm/include/types.h#3 integrate
.. //depot/projects/interrupt/sys/boot/common/ufsread.c#2 integrate
.. //depot/projects/interrupt/sys/boot/i386/Makefile#3 integrate
.. //depot/projects/interrupt/sys/boot/i386/boot2/Makefile#3 integrate
.. //depot/projects/interrupt/sys/boot/i386/boot2/boot2.c#5 integrate
.. //depot/projects/interrupt/sys/boot/i386/libi386/Makefile#3 integrate
.. //depot/projects/interrupt/sys/boot/i386/loader/Makefile#3 integrate
.. //depot/projects/interrupt/sys/boot/sparc64/loader/Makefile#4 integrate
.. //depot/projects/interrupt/sys/conf/NOTES#2 integrate
.. //depot/projects/interrupt/sys/conf/files#9 integrate
.. //depot/projects/interrupt/sys/conf/options#7 integrate
.. //depot/projects/interrupt/sys/ddb/db_examine.c#3 integrate
.. //depot/projects/interrupt/sys/ddb/db_expr.c#3 integrate
.. //depot/projects/interrupt/sys/ddb/db_run.c#3 integrate
.. //depot/projects/interrupt/sys/dev/bge/if_bge.c#4 integrate
.. //depot/projects/interrupt/sys/dev/bge/if_bgereg.h#4 integrate
.. //depot/projects/interrupt/sys/dev/hea/eni_receive.c#3 integrate
.. //depot/projects/interrupt/sys/dev/hea/eni_transmit.c#3 integrate
.. //depot/projects/interrupt/sys/dev/hfa/fore_buffer.c#3 integrate
.. //depot/projects/interrupt/sys/dev/hfa/fore_command.c#3 integrate
.. //depot/projects/interrupt/sys/dev/hfa/fore_if.c#2 integrate
.. //depot/projects/interrupt/sys/dev/hfa/fore_init.c#3 integrate
.. //depot/projects/interrupt/sys/dev/hfa/fore_load.c#4 integrate
.. //depot/projects/interrupt/sys/dev/hfa/fore_output.c#3 integrate
.. //depot/projects/interrupt/sys/dev/hfa/fore_receive.c#3 integrate
.. //depot/projects/interrupt/sys/dev/hfa/fore_stats.c#2 integrate
.. //depot/projects/interrupt/sys/dev/hfa/fore_transmit.c#2 integrate
.. //depot/projects/interrupt/sys/dev/hfa/hfa_freebsd.c#3 integrate
.. //depot/projects/interrupt/sys/dev/md/md.c#7 integrate
.. //depot/projects/interrupt/sys/dev/sio/sio.c#5 integrate
.. //depot/projects/interrupt/sys/dev/sound/pci/maestro3.c#3 integrate
.. //depot/projects/interrupt/sys/dev/wi/if_wavelan_ieee.h#3 integrate
.. //depot/projects/interrupt/sys/dev/wi/if_wireg.h#6 integrate
.. //depot/projects/interrupt/sys/dev/wi/wi_hostap.c#2 integrate
.. //depot/projects/interrupt/sys/dev/wi/wi_hostap.h#2 integrate
.. //depot/projects/interrupt/sys/i386/Makefile#3 integrate
.. //depot/projects/interrupt/sys/i386/conf/Makefile#3 integrate
.. //depot/projects/interrupt/sys/i386/conf/OLDCARD#1 branch
.. //depot/projects/interrupt/sys/i386/i386/in_cksum.c#3 integrate
.. //depot/projects/interrupt/sys/i386/i386/machdep.c#7 integrate
.. //depot/projects/interrupt/sys/i386/i386/pmap.c#6 integrate
.. //depot/projects/interrupt/sys/i386/i386/trap.c#8 integrate
.. //depot/projects/interrupt/sys/i386/i386/vm_machdep.c#4 integrate
.. //depot/projects/interrupt/sys/i386/include/in_cksum.h#3 integrate
.. //depot/projects/interrupt/sys/i386/include/specialreg.h#3 integrate
.. //depot/projects/interrupt/sys/i386/include/types.h#3 integrate
.. //depot/projects/interrupt/sys/i386/isa/clock.c#4 integrate
.. //depot/projects/interrupt/sys/ia64/ia64/pmap.c#7 integrate
.. //depot/projects/interrupt/sys/ia64/ia64/trap.c#7 integrate
.. //depot/projects/interrupt/sys/ia64/ia64/vm_machdep.c#5 integrate
.. //depot/projects/interrupt/sys/kern/kern_exec.c#6 integrate
.. //depot/projects/interrupt/sys/kern/kern_exit.c#5 integrate
.. //depot/projects/interrupt/sys/kern/kern_fork.c#5 integrate
.. //depot/projects/interrupt/sys/kern/kern_jail.c#5 integrate
.. //depot/projects/interrupt/sys/kern/kern_module.c#4 integrate
.. //depot/projects/interrupt/sys/kern/kern_proc.c#4 integrate
.. //depot/projects/interrupt/sys/kern/kern_prot.c#7 integrate
.. //depot/projects/interrupt/sys/kern/kern_subr.c#5 integrate
.. //depot/projects/interrupt/sys/kern/kern_synch.c#4 integrate
.. //depot/projects/interrupt/sys/kern/md5c.c#3 integrate
.. //depot/projects/interrupt/sys/kern/subr_disklabel.c#4 integrate
.. //depot/projects/interrupt/sys/kern/subr_diskslice.c#5 integrate
.. //depot/projects/interrupt/sys/kern/subr_trap.c#4 integrate
.. //depot/projects/interrupt/sys/kern/uipc_cow.c#1 branch
.. //depot/projects/interrupt/sys/kern/uipc_jumbo.c#1 branch
.. //depot/projects/interrupt/sys/kern/uipc_socket.c#6 integrate
.. //depot/projects/interrupt/sys/kern/uipc_syscalls.c#6 integrate
.. //depot/projects/interrupt/sys/kern/vfs_bio.c#7 integrate
.. //depot/projects/interrupt/sys/kern/vfs_cluster.c#5 integrate
.. //depot/projects/interrupt/sys/kern/vfs_init.c#4 integrate
.. //depot/projects/interrupt/sys/kern/vfs_syscalls.c#8 integrate
.. //depot/projects/interrupt/sys/kern/vfs_vnops.c#7 integrate
.. //depot/projects/interrupt/sys/modules/ti/Makefile#2 integrate
.. //depot/projects/interrupt/sys/net/bpf.h#3 integrate
.. //depot/projects/interrupt/sys/net/bridge.c#5 integrate
.. //depot/projects/interrupt/sys/net/if_ethersubr.c#4 integrate
.. //depot/projects/interrupt/sys/net/if_ieee80211.h#3 integrate
.. //depot/projects/interrupt/sys/net/if_media.c#3 integrate
.. //depot/projects/interrupt/sys/netatm/atm_if.h#4 integrate
.. //depot/projects/interrupt/sys/netatm/port.h#4 integrate
.. //depot/projects/interrupt/sys/netgraph/ng_pppoe.c#4 integrate
.. //depot/projects/interrupt/sys/netinet/ip_divert.c#4 integrate
.. //depot/projects/interrupt/sys/netinet/ip_dummynet.c#4 integrate
.. //depot/projects/interrupt/sys/netinet/ip_dummynet.h#3 integrate
.. //depot/projects/interrupt/sys/netinet/ip_fw.c#5 integrate
.. //depot/projects/interrupt/sys/netinet/ip_fw.h#3 integrate
.. //depot/projects/interrupt/sys/netinet/ip_input.c#4 integrate
.. //depot/projects/interrupt/sys/netinet/ip_output.c#4 integrate
.. //depot/projects/interrupt/sys/netinet/ip_var.h#3 integrate
.. //depot/projects/interrupt/sys/netinet/tcp_input.c#6 integrate
.. //depot/projects/interrupt/sys/netinet/tcp_output.c#4 integrate
.. //depot/projects/interrupt/sys/netinet/tcp_subr.c#6 integrate
.. //depot/projects/interrupt/sys/netinet/udp_usrreq.c#5 integrate
.. //depot/projects/interrupt/sys/pc98/i386/machdep.c#6 integrate
.. //depot/projects/interrupt/sys/pc98/pc98/clock.c#4 integrate
.. //depot/projects/interrupt/sys/pc98/pc98/sio.c#7 integrate
.. //depot/projects/interrupt/sys/pccard/i82365.h#2 integrate
.. //depot/projects/interrupt/sys/pccard/pccard.c#4 integrate
.. //depot/projects/interrupt/sys/pccard/pcic.c#4 integrate
.. //depot/projects/interrupt/sys/pccard/pcic_pci.c#5 integrate
.. //depot/projects/interrupt/sys/pccard/pcic_pci.h#3 integrate
.. //depot/projects/interrupt/sys/pccard/plxcard.c#2 delete
.. //depot/projects/interrupt/sys/pccard/plxcardreg.h#2 delete
.. //depot/projects/interrupt/sys/pci/if_ti.c#4 integrate
.. //depot/projects/interrupt/sys/pci/if_tireg.h#2 integrate
.. //depot/projects/interrupt/sys/pci/ti_fw.h#2 integrate
.. //depot/projects/interrupt/sys/pci/ti_fw2.h#2 integrate
.. //depot/projects/interrupt/sys/powerpc/include/types.h#2 integrate
.. //depot/projects/interrupt/sys/powerpc/powerpc/trap.c#6 integrate
.. //depot/projects/interrupt/sys/powerpc/powerpc/vm_machdep.c#5 integrate
.. //depot/projects/interrupt/sys/sparc64/include/clock.h#3 integrate
.. //depot/projects/interrupt/sys/sparc64/include/pmap.h#5 integrate
.. //depot/projects/interrupt/sys/sparc64/sparc64/bus_machdep.c#5 integrate
.. //depot/projects/interrupt/sys/sparc64/sparc64/critical.c#2 integrate
.. //depot/projects/interrupt/sys/sparc64/sparc64/elf_machdep.c#3 integrate
.. //depot/projects/interrupt/sys/sparc64/sparc64/pmap.c#7 integrate
.. //depot/projects/interrupt/sys/sparc64/sparc64/trap.c#7 integrate
.. //depot/projects/interrupt/sys/sparc64/sparc64/vm_machdep.c#6 integrate
.. //depot/projects/interrupt/sys/sys/jumbo.h#1 branch
.. //depot/projects/interrupt/sys/sys/ktr.h#3 integrate
.. //depot/projects/interrupt/sys/sys/mbuf.h#5 integrate
.. //depot/projects/interrupt/sys/sys/md5.h#3 integrate
.. //depot/projects/interrupt/sys/sys/mount.h#6 integrate
.. //depot/projects/interrupt/sys/sys/proc.h#5 integrate
.. //depot/projects/interrupt/sys/sys/resource.h#3 integrate
.. //depot/projects/interrupt/sys/sys/snoop.h#3 integrate
.. //depot/projects/interrupt/sys/sys/socketvar.h#5 integrate
.. //depot/projects/interrupt/sys/sys/stat.h#4 integrate
.. //depot/projects/interrupt/sys/sys/tiio.h#1 branch
.. //depot/projects/interrupt/sys/sys/tree.h#1 branch
.. //depot/projects/interrupt/sys/sys/types.h#6 integrate
.. //depot/projects/interrupt/sys/sys/ucred.h#6 integrate
.. //depot/projects/interrupt/sys/sys/uio.h#4 integrate
.. //depot/projects/interrupt/sys/sys/vnode.h#4 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_alloc.c#4 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_balloc.c#4 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_extern.h#4 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_inode.c#4 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_snapshot.c#6 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_softdep.c#6 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_softdep_stub.c#3 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_subr.c#3 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_tables.c#3 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_vfsops.c#6 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/ffs_vnops.c#4 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/fs.h#4 integrate
.. //depot/projects/interrupt/sys/ufs/ffs/softdep.h#3 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/dinode.h#4 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/inode.h#3 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/quota.h#3 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufs_acl.c#5 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufs_bmap.c#4 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufs_extattr.c#6 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufs_extern.h#3 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufs_inode.c#4 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufs_lookup.c#5 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufs_quota.c#4 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufs_readwrite.c#6 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufs_vnops.c#5 integrate
.. //depot/projects/interrupt/sys/ufs/ufs/ufsmount.h#3 integrate
.. //depot/projects/interrupt/sys/vm/device_pager.c#3 integrate
.. //depot/projects/interrupt/sys/vm/phys_pager.c#3 integrate
.. //depot/projects/interrupt/sys/vm/swap_pager.c#6 integrate
.. //depot/projects/interrupt/sys/vm/uma_core.c#4 integrate
.. //depot/projects/interrupt/sys/vm/vm_fault.c#6 integrate
.. //depot/projects/interrupt/sys/vm/vm_glue.c#6 integrate
.. //depot/projects/interrupt/sys/vm/vm_kern.c#6 integrate
.. //depot/projects/interrupt/sys/vm/vm_map.c#8 integrate
.. //depot/projects/interrupt/sys/vm/vm_map.h#6 integrate
.. //depot/projects/interrupt/sys/vm/vm_mmap.c#7 integrate
.. //depot/projects/interrupt/sys/vm/vm_object.c#6 integrate
.. //depot/projects/interrupt/sys/vm/vm_object.h#3 integrate
.. //depot/projects/interrupt/sys/vm/vm_page.c#6 integrate
.. //depot/projects/interrupt/sys/vm/vm_page.h#7 integrate
.. //depot/projects/interrupt/sys/vm/vm_pager.c#6 integrate
.. //depot/projects/interrupt/sys/vm/vm_unix.c#4 integrate
.. //depot/projects/interrupt/sys/vm/vnode_pager.c#5 integrate

Differences ...

==== //depot/projects/interrupt/sys/alpha/alpha/trap.c#6 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.94 2002/06/07 05:47:34 jhb Exp $ */
+/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.95 2002/06/24 06:21:52 mini Exp $ */
 /* $NetBSD: trap.c,v 1.31 1998/03/26 02:21:46 thorpej Exp $ */
 
 /*
@@ -589,9 +589,6 @@
 		framep->tf_regs[FRAME_SP] = alpha_pal_rdusp();
 		userret(td, framep, sticks);
 		mtx_assert(&Giant, MA_NOTOWNED);
-#ifdef DIAGNOSTIC
-		cred_free_thread(td);
-#endif
 	}
 	return;
 
@@ -778,9 +775,6 @@
 	 */
 	STOPEVENT(p, S_SCX, code);
 
-#ifdef DIAGNOSTIC
-	cred_free_thread(td);
-#endif
 #ifdef WITNESS
 	if (witness_list(td)) {
 		panic("system call %s returning with mutex(s) held\n",

==== //depot/projects/interrupt/sys/alpha/alpha/vm_machdep.c#4 (text+ko) ====

@@ -38,7 +38,7 @@
  *
  *	from: @(#)vm_machdep.c	7.3 (Berkeley) 5/13/91
  *	Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.66 2002/04/05 00:52:15 alc Exp $
+ * $FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.67 2002/06/24 15:48:00 jake Exp $
  */
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -248,6 +248,12 @@
 }
 
 void
+cpu_sched_exit(td)
+	register struct thread *td;
+{
+}
+
+void
 cpu_wait(p)
 	struct proc *p;
 {

==== //depot/projects/interrupt/sys/arm/include/types.h#3 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)types.h	8.3 (Berkeley) 1/5/94
- * $FreeBSD: src/sys/arm/include/types.h,v 1.2 2002/03/20 18:22:19 alfred Exp $
+ * $FreeBSD: src/sys/arm/include/types.h,v 1.3 2002/06/23 21:57:17 iedowse Exp $
  */
 
 #ifndef _MACHINE_TYPES_H_
@@ -49,7 +49,7 @@
 
 typedef	unsigned int	vm_offset_t;
 typedef	__int64_t	vm_ooffset_t;
-typedef	unsigned int	vm_pindex_t;
+typedef	__uint64_t	vm_pindex_t;
 typedef	unsigned int	vm_size_t;
 
 typedef	__int32_t	register_t;

==== //depot/projects/interrupt/sys/boot/common/ufsread.c#2 (text+ko) ====

@@ -1,4 +1,13 @@
 /*
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Marshall
+ * Kirk McKusick and Network Associates Laboratories, the Security
+ * Research Division of Network Associates, Inc. under DARPA/SPAWAR
+ * contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS
+ * research program
+ *
  * Copyright (c) 1998 Robert Nordier
  * All rights reserved.
  *
@@ -14,34 +23,36 @@
  */
 
 /*
- * $FreeBSD: src/sys/boot/common/ufsread.c,v 1.3 2002/06/05 12:00:49 phk Exp $
+ * $FreeBSD: src/sys/boot/common/ufsread.c,v 1.5 2002/06/21 22:33:56 jake Exp $
  */
 
+#include <ufs/ufs/dinode.h>
 #include <ufs/ffs/fs.h>
-#include <ufs/ufs/dinode.h>
 
 /*
  * We use 4k `virtual' blocks for filesystem data, whatever the actual
  * filesystem block size. FFS blocks are always a multiple of 4k.
  */
 #define VBLKSIZE	4096
+#define	VBLKSHIFT	12
 #define VBLKMASK	(VBLKSIZE - 1)
 #define DBPERVBLK	(VBLKSIZE / DEV_BSIZE)
-#define IPERVBLK	(VBLKSIZE / sizeof(struct dinode))
-#define INDIRPERVBLK	(VBLKSIZE / sizeof(ufs_daddr_t))
-#define INO_TO_VBA(fs, x) (fsbtodb(fs, ino_to_fsba(fs, x)) + \
-    (ino_to_fsbo(fs, x) / IPERVBLK) * DBPERVBLK)
-#define INO_TO_VBO(fs, x) (ino_to_fsbo(fs, x) % IPERVBLK)
+#define INDIRPERVBLK(fs) (NINDIR(fs) / ((fs)->fs_bsize / VBLKSIZE))
+#define IPERVBLK(fs)	(INOPB(fs) / ((fs)->fs_bsize / VBLKSIZE))
+#define INO_TO_VBA(fs, ipervblk, x) \
+    (fsbtodb(fs, cgimin(fs, ino_to_cg(fs, x))) + \
+    (((x) % (fs)->fs_ipg) / (ipervblk) * DBPERVBLK))
+#define INO_TO_VBO(ipervblk, x) ((x) % ipervblk)
 #define FS_TO_VBA(fs, fsb, off) (fsbtodb(fs, fsb) + \
     ((off) / VBLKSIZE) * DBPERVBLK)
 #define FS_TO_VBO(fs, fsb, off) ((off) & VBLKMASK)
 
 /* Buffers that must not span a 64k boundary. */
 struct dmadat {
-	char blkbuf[VBLKSIZE];				/* filesystem blocks */
-	ufs_daddr_t indbuf[VBLKSIZE / sizeof(ufs_daddr_t)]; /* indir blocks */
-	char sbbuf[SBSIZE];				/* superblock */
-	char secbuf[DEV_BSIZE];				/* for MBR/disklabel */
+	char blkbuf[VBLKSIZE];	/* filesystem blocks */
+	char indbuf[VBLKSIZE];	/* indir blocks */
+	char sbbuf[SBLOCKSIZE];	/* superblock */
+	char secbuf[DEV_BSIZE];	/* for MBR/disklabel */
 };
 static struct dmadat *dmadat;
 
@@ -61,16 +72,16 @@
 
 	fs_off = 0;
 	while ((n = fsread(*ino, buf, DEV_BSIZE)) > 0)
-	for (s = buf; s < buf + DEV_BSIZE;) {
-		d = (void *)s;
-		if (ls)
-			printf("%s ", d->d_name);
-		else if (!strcmp(name, d->d_name)) {
-			*ino = d->d_fileno;
-			return d->d_type;
+		for (s = buf; s < buf + DEV_BSIZE;) {
+			d = (void *)s;
+			if (ls)
+				printf("%s ", d->d_name);
+			else if (!strcmp(name, d->d_name)) {
+				*ino = d->d_fileno;
+				return d->d_type;
+			}
+			s += d->d_reclen;
 		}
-		s += d->d_reclen;
-	}
 	if (n != -1 && ls)
 		printf("\n");
 	return 0;
@@ -95,8 +106,8 @@
 		if (!*path)
 			break;
 		for (s = path; *s && *s != '/'; s++);
-			if ((n = s - path) > MAXNAMLEN)
-				return 0;
+		if ((n = s - path) > MAXNAMLEN)
+			return 0;
 		ls = *path == '?' && n == 1 && !*s;
 		memcpy(name, path, n);
 		name[n] = 0;
@@ -111,28 +122,134 @@
 	return dt == DT_REG ? ino : 0;
 }
 
+#ifndef __sparc64__
+#define UFS1_ONLY
+#endif
+#ifdef UFS1_ONLY
+
 static ssize_t
 fsread(ino_t inode, void *buf, size_t nbyte)
 {
-	static struct dinode din;
+	static struct ufs1_dinode dp1;
 	static ino_t inomap;
-	static daddr_t blkmap, indmap;
 	char *blkbuf;
-	ufs_daddr_t *indbuf;
+	caddr_t indbuf;
 	struct fs *fs;
 	char *s;
-	ufs_daddr_t lbn, addr;
-	daddr_t vbaddr;
-	size_t n, nb, off, vboff;
+	size_t n, nb, size, off, vboff;
+	long lbn;
+	ufs1_daddr_t addr, vbaddr;
+	static ufs1_daddr_t blkmap, indmap;
 
 	blkbuf = dmadat->blkbuf;
 	indbuf = dmadat->indbuf;
 	fs = (struct fs *)dmadat->sbbuf;
 	if (!dsk_meta) {
 		inomap = 0;
-		if (dskread(fs, SBOFF / DEV_BSIZE, SBSIZE / DEV_BSIZE))
+		if (dskread(fs, SBLOCK_UFS1 / DEV_BSIZE, SBLOCKSIZE / DEV_BSIZE))
+			return -1;
+		if (fs->fs_magic != FS_UFS1_MAGIC) {
+			printf("Not ufs\n");
+			return -1;
+		}
+		dsk_meta++;
+	}
+	if (!inode)
+		return 0;
+	if (inomap != inode) {
+		n = IPERVBLK(fs);
+		if (dskread(blkbuf, INO_TO_VBA(fs, n, inode), DBPERVBLK))
 			return -1;
-		if (fs->fs_magic != FS_MAGIC) {
+		dp1 = ((struct ufs1_dinode *)blkbuf)[INO_TO_VBO(n, inode)];
+		inomap = inode;
+		fs_off = 0;
+		blkmap = indmap = 0;
+	}
+	s = buf;
+	size = dp1.di_size;
+	n = size - fs_off;
+	if (nbyte > n)
+		nbyte = n;
+	nb = nbyte;
+	while (nb) {
+		lbn = lblkno(fs, fs_off);
+		off = blkoff(fs, fs_off);
+		if (lbn < NDADDR) {
+			addr = dp1.di_db[lbn];
+		} else {
+			n = INDIRPERVBLK(fs);
+			addr = dp1.di_ib[0];
+			vbaddr = fsbtodb(fs, addr) +
+			    (lbn - NDADDR) / n * DBPERVBLK;
+			if (indmap != vbaddr) {
+				if (dskread(indbuf, vbaddr, DBPERVBLK))
+					return -1;
+				indmap = vbaddr;
+			}
+			addr = ((ufs1_daddr_t *)indbuf)[(lbn - NDADDR) % n];
+		}
+		vbaddr = fsbtodb(fs, addr) + (off >> VBLKSHIFT) * DBPERVBLK;
+		vboff = off & VBLKMASK;
+		n = sblksize(fs, size, lbn) - (off & ~VBLKMASK);
+		if (n > VBLKSIZE)
+			n = VBLKSIZE;
+		if (blkmap != vbaddr) {
+			if (dskread(blkbuf, vbaddr, n >> DEV_BSHIFT))
+				return -1;
+			blkmap = vbaddr;
+		}
+		n -= vboff;
+		if (n > nb)
+			n = nb;
+		memcpy(s, blkbuf + vboff, n);
+		s += n;
+		fs_off += n;
+		nb -= n;
+	}
+	return nbyte;
+}
+
+#else /* UFS1_AND_UFS2 */
+
+/*
+ * Possible superblock locations ordered from most to least likely.
+ */
+static int sblock_try[] = SBLOCKSEARCH;
+
+#define DIP(field) fs->fs_magic == FS_UFS1_MAGIC ? dp1.field : dp2.field
+
+static ssize_t
+fsread(ino_t inode, void *buf, size_t nbyte)
+{
+	static struct ufs1_dinode dp1;
+	static struct ufs2_dinode dp2;
+	static ino_t inomap;
+	char *blkbuf;
+	caddr_t indbuf;
+	struct fs *fs;
+	char *s;
+	size_t n, nb, size, off, vboff;
+	ufs_lbn_t lbn;
+	ufs2_daddr_t addr, vbaddr;
+	static ufs2_daddr_t blkmap, indmap;
+
+	blkbuf = dmadat->blkbuf;
+	indbuf = dmadat->indbuf;
+	fs = (struct fs *)dmadat->sbbuf;
+	if (!dsk_meta) {
+		inomap = 0;
+		for (n = 0; sblock_try[n] != -1; n++) {
+			if (dskread(fs, sblock_try[n] / DEV_BSIZE,
+			    SBLOCKSIZE / DEV_BSIZE))
+				return -1;
+			if ((fs->fs_magic == FS_UFS1_MAGIC ||
+			    (fs->fs_magic == FS_UFS2_MAGIC &&
+			    fs->fs_sblockloc == numfrags(fs, sblock_try[n]))) &&
+			    fs->fs_bsize <= MAXBSIZE &&
+			    fs->fs_bsize >= sizeof(struct fs))
+				break;
+		}
+		if (sblock_try[n] == -1) {
 			printf("Not ufs\n");
 			return -1;
 		}
@@ -141,35 +258,51 @@
 	if (!inode)
 		return 0;
 	if (inomap != inode) {
-		if (dskread(blkbuf, INO_TO_VBA(fs, inode), DBPERVBLK))
+		n = IPERVBLK(fs);
+		if (dskread(blkbuf, INO_TO_VBA(fs, n, inode), DBPERVBLK))
 			return -1;
-		din = ((struct dinode *)blkbuf)[INO_TO_VBO(fs, inode)];
+		n = INO_TO_VBO(n, inode);
+		if (fs->fs_magic == FS_UFS1_MAGIC)
+			dp1 = ((struct ufs1_dinode *)blkbuf)[n];
+		else
+			dp2 = ((struct ufs2_dinode *)blkbuf)[n];
 		inomap = inode;
 		fs_off = 0;
 		blkmap = indmap = 0;
 	}
 	s = buf;
-	if (nbyte > (n = din.di_size - fs_off))
+	size = DIP(di_size);
+	n = size - fs_off;
+	if (nbyte > n)
 		nbyte = n;
 	nb = nbyte;
 	while (nb) {
 		lbn = lblkno(fs, fs_off);
 		off = blkoff(fs, fs_off);
-		if (lbn < NDADDR)
-			addr = din.di_db[lbn];
-		else {
-			vbaddr = FS_TO_VBA(fs, din.di_ib[0], sizeof(indbuf[0]) *
-			((lbn - NDADDR) % NINDIR(fs)));
+		if (lbn < NDADDR) {
+			addr = DIP(di_db[lbn]);
+		} else if (lbn < NDADDR + NINDIR(fs)) {
+			n = INDIRPERVBLK(fs);
+			addr = DIP(di_ib[0]);
+			vbaddr = fsbtodb(fs, addr) +
+			    (lbn - NDADDR) / n * DBPERVBLK;
 			if (indmap != vbaddr) {
 				if (dskread(indbuf, vbaddr, DBPERVBLK))
 					return -1;
 				indmap = vbaddr;
 			}
-			addr = indbuf[(lbn - NDADDR) % INDIRPERVBLK];
+			n = (lbn - NDADDR) % n;
+			if (fs->fs_magic == FS_UFS1_MAGIC)
+				addr = ((ufs1_daddr_t *)indbuf)[n];
+			else
+				addr = ((ufs2_daddr_t *)indbuf)[n];
+		} else {
+			printf("file too big\n");
+			return -1;
 		}
-		vbaddr = FS_TO_VBA(fs, addr, off);
-		vboff = FS_TO_VBO(fs, addr, off);
-		n = dblksize(fs, &din, lbn) - (off & ~VBLKMASK);
+		vbaddr = fsbtodb(fs, addr) + (off >> VBLKSHIFT) * DBPERVBLK;
+		vboff = off & VBLKMASK;
+		n = sblksize(fs, size, lbn) - (off & ~VBLKMASK);
 		if (n > VBLKSIZE)
 			n = VBLKSIZE;
 		if (blkmap != vbaddr) {
@@ -187,3 +320,5 @@
 	}
 	return nbyte;
 }
+
+#endif /* UFS1_AND_UFS2 */

==== //depot/projects/interrupt/sys/boot/i386/Makefile#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/i386/Makefile,v 1.16 2002/05/11 21:41:03 peter Exp $
+# $FreeBSD: src/sys/boot/i386/Makefile,v 1.18 2002/06/21 10:59:57 phk Exp $
 
 SUBDIR=		mbr boot0 btx boot2 cdboot kgzldr libi386 loader
 

==== //depot/projects/interrupt/sys/boot/i386/boot2/Makefile#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.29 2002/06/05 12:30:41 phk Exp $
+# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.31 2002/06/21 11:00:00 phk Exp $
 
 PROG=		boot2
 NOMAN=

==== //depot/projects/interrupt/sys/boot/i386/boot2/boot2.c#5 (text+ko) ====

@@ -14,7 +14,7 @@
  */
 
 /*
- * $FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.42 2002/06/05 11:10:38 phk Exp $
+ * $FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.43 2002/06/21 06:18:01 mckusick Exp $
  */
 
 #include <sys/param.h>
@@ -73,9 +73,10 @@
 
 #define TYPE_AD		0
 #define TYPE_WD		1
-#define TYPE_WFD 	2
-#define TYPE_FD		3
-#define TYPE_DA		4
+#define TYPE_DA		2
+#define TYPE_MAXHARD	TYPE_DA
+#define TYPE_WFD 	3
+#define TYPE_FD		4
 
 extern uint32_t _end;
 
@@ -97,8 +98,8 @@
     RBX_VERBOSE
 };
 
-static const char *const dev_nm[] = {"ad", "wd", "  ", "fd", "da"};
-static const unsigned dev_maj[] = {30, 0, 1, 2, 4};
+static const char *const dev_nm[NDEV] = {"ad", "wd", "da", "  ", "fd"};
+static const unsigned char dev_maj[NDEV] = {30, 0, 4, 1, 2};
 
 static struct dsk {
     unsigned drive;
@@ -111,16 +112,14 @@
 } dsk;
 static char cmd[512];
 static char kname[1024];
-static uint32_t opts;
+static uint32_t opts = RB_BOOTINFO;
 static struct bootinfo bootinfo;
 static uint8_t ioctrl = IO_KEYBOARD;
 
 void exit(int);
 static void load(const char *);
 static int parse(char *);
-static ino_t lookup(const char *);
 static int xfsread(ino_t, void *, size_t);
-static ssize_t fsread(ino_t, void *, size_t);
 static int dskread(void *, unsigned, unsigned);
 static int printf(const char *,...);
 static int putchar(int);
@@ -131,16 +130,17 @@
 static int xgetc(int);
 static int getc(int);
 
+#if 1
 #define memcpy __builtin_memcpy
-
-static inline void
-readfile(const char *fname, void *buf, size_t size)
+#else
+static void memcpy(char *, const char *, int);
+static void
+memcpy(char *dst, const char *src, int len)
 {
-    ino_t ino;
-
-    if ((ino = lookup(fname)))
-	fsread(ino, buf, size);
+    while (len--)
+	*dst++ = *src++;
 }
+#endif
 
 static inline int
 strcmp(const char *s1, const char *s2)
@@ -151,15 +151,14 @@
 
 #include "ufsread.c"
 
-static inline int
-getchar(void)
+static int
+xfsread(ino_t inode, void *buf, size_t nbyte)
 {
-    int c;
-
-    c = xgetc(0);
-    if (c == '\r')
-	c = '\n';
-    return c;
+    if (fsread(inode, buf, nbyte) != nbyte) {
+	printf("Invalid %s\n", "format");
+	return -1;
+    }
+    return 0;
 }
 
 static inline void
@@ -169,12 +168,13 @@
     int c;
 
     s = str;
-    do {
-	switch (c = getchar()) {
+    for (;;) {
+	switch (c = xgetc(0)) {
 	case 0:
 	    break;
+	case '\177':
+	    c = '\b';
 	case '\b':
-	case '\177':
 	    if (s > str) {
 		s--;
 		putchar('\b');
@@ -183,15 +183,16 @@
 		c = 0;
 	    break;
 	case '\n':
+	case '\r':
 	    *s = 0;
-	    break;
+	    return;
 	default:
 	    if (s - str < size - 1)
 		*s++ = c;
 	}
 	if (c)
 	    putchar(c);
-    } while (c != '\n');
+    }
 }
 
 static inline uint32_t
@@ -220,6 +221,7 @@
 main(void)
 {
     int autoboot, i;
+    ino_t ino;
 
     dmadat = (void *)(roundup2(__base + _end, 0x10000) - __base);
     v86.ctl = V86_FLAGS;
@@ -238,7 +240,10 @@
     /* Process configuration file */
 
     autoboot = 1;
-    readfile(PATH_CONFIG, cmd, sizeof(cmd));
+
+    if ((ino = lookup(PATH_CONFIG)))
+	fsread(ino, cmd, sizeof(cmd));
+
     if (*cmd) {
 	printf("%s: %s", PATH_CONFIG, cmd);
 	if (parse(cmd))
@@ -328,7 +333,7 @@
 	    return;
 	p += hdr.ex.a_data + roundup2(hdr.ex.a_bss, PAGE_SIZE);
 	bootinfo.bi_symtab = VTOP(p);
-	memcpy(p, &hdr.ex.a_syms, sizeof(hdr.ex.a_syms));
+	memcpy(p, (char *)&hdr.ex.a_syms, sizeof(hdr.ex.a_syms));
 	p += sizeof(hdr.ex.a_syms);
 	if (hdr.ex.a_syms) {
 	    if (xfsread(ino, p, hdr.ex.a_syms))
@@ -365,7 +370,7 @@
 	    if (xfsread(ino, &es, sizeof(es)))
 		return;
 	    for (i = 0; i < 2; i++) {
-		memcpy(p, &es[i].sh_size, sizeof(es[i].sh_size));
+		memcpy(p, (char *)&es[i].sh_size, sizeof(es[i].sh_size));
 		p += sizeof(es[i].sh_size);
 		fs_off = es[i].sh_offset;
 		if (xfsread(ino, p, es[i].sh_size))
@@ -378,7 +383,7 @@
     bootinfo.bi_esymtab = VTOP(p);
     bootinfo.bi_kernelname = VTOP(fname);
     bootinfo.bi_bios_dev = dsk.drive;
-    __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK),
+    __exec((caddr_t)addr, opts & RBX_MASK,
 	   MAKEBOOTDEV(dev_maj[dsk.type], 0, dsk.slice, dsk.unit, dsk.part),
 	   0, 0, 0, VTOP(&bootinfo));
 }
@@ -449,9 +454,8 @@
 		arg += 2;
 		if (drv == -1)
 		    drv = dsk.unit;
-		dsk.drive = (dsk.type == TYPE_WD ||
-			     dsk.type == TYPE_AD ||
-			     dsk.type == TYPE_DA ? DRV_HARD : 0) + drv;
+		dsk.drive = (dsk.type <= TYPE_MAXHARD
+			     ? DRV_HARD : 0) + drv;
 		dsk_meta = 0;
 		fsread(0, NULL, 0);
 	    }
@@ -467,16 +471,6 @@
 }
 
 static int
-xfsread(ino_t inode, void *buf, size_t nbyte)
-{
-    if (fsread(inode, buf, nbyte) != nbyte) {
-	printf("Invalid %s\n", "format");
-	return -1;
-    }
-    return 0;
-}
-
-static int
 dskread(void *buf, unsigned lba, unsigned nblk)
 {
     struct dos_partition *dp;

==== //depot/projects/interrupt/sys/boot/i386/libi386/Makefile#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.25 2002/05/13 11:09:06 ru Exp $
+# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.27 2002/06/21 11:00:00 phk Exp $
 #
 LIB=			i386
 INTERNALLIB=		true

==== //depot/projects/interrupt/sys/boot/i386/loader/Makefile#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/i386/loader/Makefile,v 1.57 2002/05/10 00:53:45 obrien Exp $
+# $FreeBSD: src/sys/boot/i386/loader/Makefile,v 1.59 2002/06/21 11:00:00 phk Exp $
 
 BASE=		loader
 PROG=		${BASE}

==== //depot/projects/interrupt/sys/boot/sparc64/loader/Makefile#4 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/sparc64/loader/Makefile,v 1.8 2002/05/28 23:09:59 jake Exp $
+# $FreeBSD: src/sys/boot/sparc64/loader/Makefile,v 1.9 2002/06/21 22:34:51 jake Exp $
 
 BASE=		loader
 PROG=		${BASE}
@@ -13,7 +13,7 @@
 
 LOADER_DISK_SUPPORT?=	yes
 LOADER_UFS_SUPPORT?=	yes
-LOADER_CD9660_SUPPORT?=	no
+LOADER_CD9660_SUPPORT?=	yes
 LOADER_NET_SUPPORT?=	no
 LOADER_NFS_SUPPORT?=	no
 LOADER_TFTP_SUPPORT?=	no

==== //depot/projects/interrupt/sys/conf/NOTES#2 (text+ko) ====

@@ -14,7 +14,7 @@
 # This file contains machine independent kernel configuration notes.  For
 # machine dependent notes, look in /sys/<arch>/conf/NOTES.
 #
-# $FreeBSD: src/sys/conf/NOTES,v 1.1039 2002/06/10 18:49:37 phk Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1041 2002/06/26 03:34:43 ken Exp $
 #
 
 #
@@ -533,6 +533,13 @@
 options 	DUMMYNET
 options 	BRIDGE
 
+# Zero copy sockets support.  This enables "zero copy" for sending and
+# receving data via a socket.  The send side works for any type of NIC,
+# the receive side only works for NICs that support MTUs greater than the
+# page size of your architecture and that support header splitting.  See
+# zero_copy(9) for more details.
+options 	ZERO_COPY_SOCKETS
+
 #
 # ATM (HARP version) options
 #
@@ -1670,6 +1677,13 @@
 device		ti
 device		fpa	1
 
+# Use "private" jumbo buffers allocated exclusively for the ti(4) driver.
+# This option is incompatible with the TI_JUMBO_HDRSPLIT option below.
+#options 	TI_PRIVATE_JUMBOS
+# Turn on the header splitting option for the ti(4) driver firmware.  This
+# only works for Tigon II chips, and has no effect for Tigon I chips.
+options 	TI_JUMBO_HDRSPLIT
+
 #
 # ATM related options (Cranor version)
 # (note: this driver cannot be used with the HARP ATM stack)
@@ -2255,6 +2269,8 @@
 
 options 	NBUF=512	# Number of buffer headers
 
+options 	MSIZE=256	# mbuf size in bytes
+options 	MCLSHIFT=12	# mbuf cluster shift in bits, 12 == 4KB
 options 	NMBCLUSTERS=1024	# Number of mbuf clusters
 
 options 	SCSI_NCR_DEBUG
@@ -2284,8 +2300,6 @@
 # driver still mostly spells this option BROOKTREE_ALLOC_PAGES.
 ##options 	BKTR_ALLOC_PAGES="(217*4+1)"
 options 	BROOKTREE_ALLOC_PAGES="(217*4+1)"
-# Broken:
-##options 	CAPABILITIES
 options 	MAXFILES=999
 # METEOR_TEST_VIDEO has no effect since meteor is broken.
 options 	METEOR_TEST_VIDEO

==== //depot/projects/interrupt/sys/conf/files#9 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.650 2002/06/18 21:32:33 julian Exp $
+# $FreeBSD: src/sys/conf/files,v 1.654 2002/06/26 03:34:43 ken Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -22,7 +22,7 @@
 kern/device_if.m		standard
 kern/bus_if.m			standard
 kern/clock_if.m			optional genclock
-kern/linker_if.m			standard
+kern/linker_if.m		standard
 cam/cam.c		optional scbus
 cam/cam_extend.c	optional scbus
 cam/cam_periph.c	optional scbus
@@ -472,10 +472,10 @@
 dev/pci/ignore_pci.c	optional pci
 dev/pci/isa_pci.c	optional pci
 dev/pci/pci.c		count pci
-dev/pci/pci_if.m	optional pci
+dev/pci/pci_if.m	standard
 dev/pci/pci_pci.c	optional pci
 dev/pci/pci_user.c	optional pci
-dev/pci/pcib_if.m	optional pci
+dev/pci/pcib_if.m	standard
 dev/pcic/i82365.c	optional pcic pccard
 dev/pcic/i82365_isa.c	optional pcic pccard isa
 dev/pdq/if_fea.c	optional fea eisa
@@ -811,7 +811,7 @@
 i4b/layer4/i4b_l4mgmt.c		optional i4b
 i4b/layer4/i4b_l4timer.c	optional i4b
 #
-isa/isa_if.m		optional isa
+isa/isa_if.m		standard
 isa/isa_common.c	optional isa
 isa/isahint.c		optional isa
 isa/orm.c		optional isa
@@ -921,7 +921,9 @@
 kern/tty_subr.c		standard
 kern/tty_tty.c		standard
 kern/uipc_accf.c	optional inet
+kern/uipc_cow.c		optional zero_copy_sockets
 kern/uipc_domain.c	standard
+kern/uipc_jumbo.c	standard
 kern/uipc_mbuf.c	standard
 kern/uipc_mbuf2.c	standard
 kern/uipc_proto.c	standard
@@ -1273,7 +1275,6 @@
 pccard/pcic.c		optional pcic card
 pccard/pcic_isa.c	optional pcic card isa
 pccard/pcic_pci.c	optional pcic card pci
-pccard/plxcard.c	optional plxcard pci
 pci/agp.c		optional agp
 pci/agp_if.m		optional agp
 pci/agp_intel.c		optional agp

==== //depot/projects/interrupt/sys/conf/options#7 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.326 2002/06/18 21:30:36 n_hibma Exp $
+# $FreeBSD: src/sys/conf/options,v 1.327 2002/06/26 03:34:43 ken Exp $
 #
 #        On the handling of kernel options
 #
@@ -345,6 +345,11 @@
 DRM_LINUX		opt_drm.h
 DRM_DEBUG		opt_drm.h
 
+
+ZERO_COPY_SOCKETS	opt_zero.h
+TI_PRIVATE_JUMBOS	opt_ti.h
+TI_JUMBO_HDRSPLIT	opt_ti.h
+
 # ATM (HARP version)
 ATM_CORE		opt_atm.h
 ATM_IP			opt_atm.h
@@ -405,6 +410,8 @@
 REGRESSION		opt_global.h
 RESTARTABLE_PANICS	opt_global.h
 VFS_BIO_DEBUG		opt_global.h
+MSIZE			opt_global.h
+MCLSHIFT		opt_global.h
 
 # These are VM related options
 VM_KMEM_SIZE		opt_vm.h

==== //depot/projects/interrupt/sys/ddb/db_examine.c#3 (text+ko) ====

@@ -23,7 +23,7 @@

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

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




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