From owner-p4-projects Thu Jun 6 12:19:10 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 747F737B408; Thu, 6 Jun 2002 12:17:33 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0727E37B406 for ; Thu, 6 Jun 2002 12:17:31 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g56JHUR08515 for perforce@freebsd.org; Thu, 6 Jun 2002 12:17:30 -0700 (PDT) (envelope-from jhb@freebsd.org) Date: Thu, 6 Jun 2002 12:17:30 -0700 (PDT) Message-Id: <200206061917.g56JHUR08515@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 12446 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12446 Change 12446 by jhb@jhb_laptop on 2002/06/06 12:16:34 IFC. Affected files ... ... //depot/projects/smpng/sys/boot/common/ufsread.c#1 branch ... //depot/projects/smpng/sys/boot/i386/boot2/Makefile#5 integrate ... //depot/projects/smpng/sys/boot/i386/boot2/boot2.c#10 integrate ... //depot/projects/smpng/sys/boot/sparc64/boot1/Makefile#5 integrate ... //depot/projects/smpng/sys/boot/sparc64/boot1/boot1.c#4 integrate ... //depot/projects/smpng/sys/cam/scsi/scsi_all.c#10 integrate ... //depot/projects/smpng/sys/cam/scsi/scsi_iu.h#1 branch ... //depot/projects/smpng/sys/cam/scsi/scsi_message.h#2 integrate ... //depot/projects/smpng/sys/conf/NOTES#15 integrate ... //depot/projects/smpng/sys/conf/files#42 integrate ... //depot/projects/smpng/sys/conf/options#28 integrate ... //depot/projects/smpng/sys/ddb/ddb.h#4 integrate ... //depot/projects/smpng/sys/dev/aic7xxx/ahd_pci.c#1 branch ... //depot/projects/smpng/sys/dev/aic7xxx/aic79xx.c#1 branch ... //depot/projects/smpng/sys/dev/aic7xxx/aic79xx.h#1 branch ... //depot/projects/smpng/sys/dev/aic7xxx/aic79xx.reg#1 branch ... //depot/projects/smpng/sys/dev/aic7xxx/aic79xx.seq#1 branch ... //depot/projects/smpng/sys/dev/aic7xxx/aic79xx_inline.h#1 branch ... //depot/projects/smpng/sys/dev/aic7xxx/aic79xx_osm.c#1 branch ... //depot/projects/smpng/sys/dev/aic7xxx/aic79xx_osm.h#1 branch ... //depot/projects/smpng/sys/dev/aic7xxx/aic79xx_pci.c#1 branch ... //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm.c#4 integrate ... //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm.h#4 integrate ... //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm_gram.y#4 integrate ... //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm_insformat.h#3 integrate ... //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm_scan.l#5 integrate ... //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm_symbol.c#4 integrate ... //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm_symbol.h#4 integrate ... //depot/projects/smpng/sys/dev/fxp/if_fxp.c#14 integrate ... //depot/projects/smpng/sys/dev/hme/if_hmereg.h#2 integrate ... //depot/projects/smpng/sys/dev/pci/pcireg.h#2 integrate ... //depot/projects/smpng/sys/dev/syscons/syscons.c#20 integrate ... //depot/projects/smpng/sys/fs/pseudofs/pseudofs.c#14 integrate ... //depot/projects/smpng/sys/fs/pseudofs/pseudofs.h#12 integrate ... //depot/projects/smpng/sys/fs/pseudofs/pseudofs_fileno.c#5 integrate ... //depot/projects/smpng/sys/fs/pseudofs/pseudofs_vncache.c#9 integrate ... //depot/projects/smpng/sys/fs/pseudofs/pseudofs_vnops.c#17 integrate ... //depot/projects/smpng/sys/geom/geom.h#8 integrate ... //depot/projects/smpng/sys/geom/geom_bsd.c#9 integrate ... //depot/projects/smpng/sys/geom/geom_mbr.c#7 integrate ... //depot/projects/smpng/sys/geom/geom_subr.c#7 integrate ... //depot/projects/smpng/sys/geom/geom_sunlabel.c#7 integrate ... //depot/projects/smpng/sys/i386/conf/GENERIC#22 integrate ... //depot/projects/smpng/sys/kern/kern_mutex.c#38 integrate ... //depot/projects/smpng/sys/kern/subr_diskslice.c#10 integrate ... //depot/projects/smpng/sys/kern/subr_witness.c#52 integrate ... //depot/projects/smpng/sys/kern/vfs_bio.c#22 integrate ... //depot/projects/smpng/sys/kern/vfs_subr.c#26 integrate ... //depot/projects/smpng/sys/netgraph/ng_cisco.c#4 integrate ... //depot/projects/smpng/sys/netgraph/ng_ether.c#7 integrate ... //depot/projects/smpng/sys/netgraph/ng_lmi.c#2 integrate ... //depot/projects/smpng/sys/netgraph/ng_pppoe.c#9 integrate ... //depot/projects/smpng/sys/netgraph/ng_pptpgre.c#5 integrate ... //depot/projects/smpng/sys/netgraph/ng_rfc1490.c#3 integrate ... //depot/projects/smpng/sys/netgraph/ng_socket.c#14 integrate ... //depot/projects/smpng/sys/sparc64/sparc64/machdep.c#29 integrate ... //depot/projects/smpng/sys/sys/wait.h#5 integrate ... //depot/projects/smpng/sys/vm/vm_mmap.c#19 integrate Differences ... ==== //depot/projects/smpng/sys/boot/i386/boot2/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.27 2002/05/13 16:16:00 ru Exp $ +# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.29 2002/06/05 12:30:41 phk Exp $ PROG= boot2 NOMAN= @@ -30,6 +30,7 @@ CFLAGS= -elf -ffreestanding -Os -fno-builtin \ -fno-guess-branch-probability \ -mrtd \ + -I${.CURDIR}/../../common \ -I${.CURDIR}/../btx/lib -I. \ -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ @@ -48,7 +49,7 @@ boot1.o: boot1.s ${AS} ${AFLAGS} --defsym FLAGS=${B1FLAGS} ${.IMPSRC} -o ${.TARGET} -boot2.o: boot2.c +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 ==== //depot/projects/smpng/sys/boot/i386/boot2/boot2.c#10 (text+ko) ==== @@ -14,7 +14,7 @@ */ /* - * $FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.41 2002/05/11 21:49:39 peter Exp $ + * $FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.42 2002/06/05 11:10:38 phk Exp $ */ #include @@ -25,9 +25,6 @@ #include #include -#include -#include - #include #include @@ -71,22 +68,6 @@ #define V86_CY(x) ((x) & 1) #define V86_ZR(x) ((x) & 0x40) -/* - * 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 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 FS_TO_VBA(fs, fsb, off) (fsbtodb(fs, fsb) + \ - ((off) / VBLKSIZE) * DBPERVBLK) -#define FS_TO_VBO(fs, fsb, off) ((off) & VBLKMASK) - #define DRV_HARD 0x80 #define DRV_MASK 0x7f @@ -96,14 +77,6 @@ #define TYPE_FD 3 #define TYPE_DA 4 -/* Buffers that must not span a 64k boundary. */ -static 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 */ -} *dmadat; - extern uint32_t _end; static const char optstr[NOPT] = "DhaCcdgmnPprsv"; @@ -135,14 +108,11 @@ unsigned part; unsigned start; int init; - int meta; } dsk; static char cmd[512]; static char kname[1024]; static uint32_t opts; static struct bootinfo bootinfo; -static int ls; -static uint32_t fs_off; static uint8_t ioctrl = IO_KEYBOARD; void exit(int); @@ -179,31 +149,8 @@ return (u_char)*s1 - (u_char)*s2; } -static inline int -fsfind(const char *name, ino_t * ino) -{ - char buf[DEV_BSIZE]; - struct dirent *d; - char *s; - ssize_t n; +#include "ufsread.c" - 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; - } - s += d->d_reclen; - } - if (n != -1 && ls) - putchar('\n'); - return 0; -} - static inline int getchar(void) { @@ -505,7 +452,7 @@ dsk.drive = (dsk.type == TYPE_WD || dsk.type == TYPE_AD || dsk.type == TYPE_DA ? DRV_HARD : 0) + drv; - dsk.meta = 0; + dsk_meta = 0; fsread(0, NULL, 0); } if ((i = p - arg - !*(p - 1))) { @@ -519,34 +466,6 @@ return 0; } -static ino_t -lookup(const char *path) -{ - char name[MAXNAMLEN + 1]; - const char *s; - ino_t ino; - ssize_t n; - int dt; - - ino = ROOTINO; - dt = DT_DIR; - for (;;) { - if (*path == '/') - path++; - if (!*path) - break; - for (s = path; *s && *s != '/'; s++); - if ((n = s - path) > MAXNAMLEN) - return 0; - ls = *path == '?' && n == 1 && !*s; - memcpy(name, path, n); - name[n] = 0; - if ((dt = fsfind(name, &ino)) <= 0) - break; - path = s; - } - return dt == DT_REG ? ino : 0; -} static int xfsread(ino_t inode, void *buf, size_t nbyte) { @@ -557,83 +476,6 @@ return 0; } -static ssize_t -fsread(ino_t inode, void *buf, size_t nbyte) -{ - static struct dinode din; - static ino_t inomap; - static daddr_t blkmap, indmap; - char *blkbuf; - ufs_daddr_t *indbuf; - struct fs *fs; - char *s; - ufs_daddr_t lbn, addr; - daddr_t vbaddr; - size_t n, nb, off, vboff; - - 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)) - return -1; - if (fs->fs_magic != FS_MAGIC) { - printf("Not ufs\n"); - return -1; - } - dsk.meta++; - } - if (!inode) - return 0; - if (inomap != inode) { - if (dskread(blkbuf, INO_TO_VBA(fs, inode), DBPERVBLK)) - return -1; - din = ((struct dinode *)blkbuf)[INO_TO_VBO(fs, inode)]; - inomap = inode; - fs_off = 0; - blkmap = indmap = 0; - } - s = buf; - if (nbyte > (n = din.di_size - fs_off)) - 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 (indmap != vbaddr) { - if (dskread(indbuf, vbaddr, DBPERVBLK)) - return -1; - indmap = vbaddr; - } - addr = indbuf[(lbn - NDADDR) % INDIRPERVBLK]; - } - vbaddr = FS_TO_VBA(fs, addr, off); - vboff = FS_TO_VBO(fs, addr, off); - n = dblksize(fs, &din, 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; -} - static int dskread(void *buf, unsigned lba, unsigned nblk) { @@ -642,7 +484,7 @@ char *sec; unsigned sl, i; - if (!dsk.meta) { + if (!dsk_meta) { sec = dmadat->secbuf; dsk.start = 0; if (drvread(sec, DOSBBSECTOR, 1)) ==== //depot/projects/smpng/sys/boot/sparc64/boot1/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/sparc64/boot1/Makefile,v 1.6 2002/05/10 09:26:35 obrien Exp $ +# $FreeBSD: src/sys/boot/sparc64/boot1/Makefile,v 1.8 2002/06/05 12:30:45 phk Exp $ PROG= boot1 SRCS= _start.S boot1.c @@ -9,7 +9,7 @@ BOOTBLOCKBASE= 0x4000 -CFLAGS= -ffreestanding -mcmodel=medlow -Os -I../.. -I../../common +CFLAGS= -ffreestanding -mcmodel=medlow -Os -I../.. -I../../common -I${.CURDIR}/../../common boot1.elf: _start.o boot1.o ${LD} -N -Ttext ${BOOTBLOCKBASE} -o ${.TARGET} ${.ALLSRC} @@ -17,6 +17,8 @@ boot1.aout: boot1.elf elf2aout -o ${.TARGET} ${.ALLSRC} +boot1.o: ${.CURDIR}/../../common/ufsread.c + # Construct boot1. disklabel expects it to contain zeroed-out space for the # label, and to be of the correct size. boot1: boot1.aout ==== //depot/projects/smpng/sys/boot/sparc64/boot1/boot1.c#4 (text+ko) ==== @@ -17,7 +17,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/sparc64/boot1/boot1.c,v 1.11 2002/05/13 05:09:34 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/sparc64/boot1/boot1.c,v 1.14 2002/06/05 12:12:25 phk Exp $"); #include #include @@ -27,9 +27,6 @@ #include #include -#include -#include - #define _PATH_LOADER "/boot/loader" #define _PATH_KERNEL "/boot/kernel/kernel" @@ -62,8 +59,6 @@ static void exit(int) __dead2; static void load(const char *); -static ino_t lookup(const char *); -static ssize_t fsread(ino_t, void *, size_t); static int dskread(void *, u_int64_t, int); static void usage(void); @@ -296,13 +291,19 @@ } static void -bcopy(const void *dst, void *src, size_t len) +bcopy(const void *src, void *dst, size_t len) { - const char *d = dst; - char *s = src; + const char *s = src; + char *d = dst; while (len-- != 0) - *s++ = *d++; + *d++ = *s++; +} + +static void +memcpy(void *dst, const void *src, size_t len) +{ + bcopy(src, dst, len); } static void @@ -322,28 +323,8 @@ return ((u_char)*s1 - (u_char)*s2); } -static int -fsfind(const char *name, ino_t * ino) -{ - char buf[DEV_BSIZE]; - struct dirent *d; - char *s; - ssize_t n; +#include "ufsread.c" - fs_off = 0; - while ((n = fsread(*ino, buf, DEV_BSIZE)) > 0) { - for (s = buf; s < buf + DEV_BSIZE;) { - d = (void *)s; - if (!strcmp(name, d->d_name)) { - *ino = d->d_fileno; - return (d->d_type); - } - s += d->d_reclen; - } - } - return (0); -} - int main(int ac, char **av) { @@ -391,25 +372,21 @@ ofw_exit(); } +static struct dmadat __dmadat; + static int mount(const char *device) { + dmadat = &__dmadat; if ((bootdev = ofw_open(device)) == -1) { printf("mount: can't open device\n"); return (-1); } - if (dskread(blkbuf, SBOFF / DEV_BSIZE, SBSIZE / DEV_BSIZE)) { + if (fsread(0, NULL, 0)) { printf("mount: can't read superblock\n"); return (-1); } - inomap = 0; - bcopy(blkbuf, &fs, sizeof(fs)); - if (fs.fs_magic != FS_MAGIC) { - printf("mount: not ufs\n"); - return (-1); - } - fsblks = fs.fs_bsize >> DEV_BSHIFT; return (0); } @@ -455,100 +432,6 @@ (*(void (*)(int, int, int, int, ofwfp_t))eh.e_entry)(0, 0, 0, 0, ofw); } -static ino_t -lookup(const char *path) -{ - char name[MAXNAMLEN + 1]; - const char *s; - ino_t ino; - ssize_t n; - int dt; - - ino = ROOTINO; - dt = DT_DIR; - name[0] = '/'; - name[1] = '\0'; - for (;;) { - if (*path == '/') - path++; - if (!*path) - break; - for (s = path; *s && *s != '/'; s++) - ; - if ((n = s - path) > MAXNAMLEN) - return (0); - bcopy(path, name, n); - name[n] = 0; - if (dt != DT_DIR) { - printf("%s: not a directory.\n", name); - return (0); - } - if ((dt = fsfind(name, &ino)) <= 0) - break; - path = s; - } - return (dt == DT_REG ? ino : 0); -} - -static ssize_t -fsread(ino_t inode, void *buf, size_t nbyte) -{ - static struct dinode din; - static ufs_daddr_t indbuf[BSIZEMAX / sizeof(ufs_daddr_t)]; - static ufs_daddr_t blkmap, indmap; - char *s; - ufs_daddr_t lbn, addr; - size_t n, nb, off; - - if (!inode) - return (0); - if (inomap != inode) { - if (dskread(blkbuf, fsbtodb(&fs, ino_to_fsba(&fs, inode)), - fsblks)) - return (-1); - bcopy(blkbuf + ((inode % INOPB(&fs)) * sizeof(din)), &din, - sizeof(din)); - inomap = inode; - fs_off = 0; - blkmap = indmap = 0; - } - s = buf; - if (nbyte > (n = din.di_size - fs_off)) - nbyte = n; - nb = nbyte; - while (nb) { - lbn = lblkno(&fs, fs_off); - if (lbn < NDADDR) - addr = din.di_db[lbn]; - else { - if (indmap != din.di_ib[0]) { - if (dskread(indbuf, fsbtodb(&fs, din.di_ib[0]), - fsblks)) - return (-1); - indmap = din.di_ib[0]; - } - addr = indbuf[(lbn - NDADDR) % NINDIR(&fs)]; - } - n = dblksize(&fs, &din, lbn); - if (blkmap != addr) { - if (dskread(blkbuf, fsbtodb(&fs, addr), - n >> DEV_BSHIFT)) { - return (-1); - } - blkmap = addr; - } - off = blkoff(&fs, fs_off); - n -= off; - if (n > nb) - n = nb; - bcopy(blkbuf + off, s, n); - s += n; - fs_off += n; - nb -= n; - } - return (nbyte); -} - static int dskread(void *buf, u_int64_t lba, int nblk) { ==== //depot/projects/smpng/sys/cam/scsi/scsi_all.c#10 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.34 2002/06/04 17:41:47 mjacob Exp $ + * $FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.35 2002/06/05 19:10:57 gibbs Exp $ */ #include @@ -2256,12 +2256,13 @@ */ static struct { u_int period_factor; - u_int period; /* in 10ths of ns */ + u_int period; /* in 100ths of ns */ } scsi_syncrates[] = { - { 0x09, 125 }, /* FAST-80 */ - { 0x0a, 250 }, /* FAST-40 40MHz */ - { 0x0b, 303 }, /* FAST-40 33MHz */ - { 0x0c, 500 } /* FAST-20 */ + { 0x08, 625 }, /* FAST-160 */ + { 0x09, 1250 }, /* FAST-80 */ + { 0x0a, 2500 }, /* FAST-40 40MHz */ + { 0x0b, 3030 }, /* FAST-40 33MHz */ + { 0x0c, 5000 } /* FAST-20 */ }; /* @@ -2280,7 +2281,7 @@ if (period_factor == scsi_syncrates[i].period_factor) { /* Period in kHz */ - return (10000000 / scsi_syncrates[i].period); + return (100000000 / scsi_syncrates[i].period); } } ==== //depot/projects/smpng/sys/cam/scsi/scsi_message.h#2 (text+ko) ==== @@ -1,6 +1,6 @@ /* * This file is in the public domain. - * $FreeBSD: src/sys/cam/scsi/scsi_message.h,v 1.5 2000/10/31 18:00:23 gibbs Exp $ + * $FreeBSD: src/sys/cam/scsi/scsi_message.h,v 1.6 2002/06/05 19:05:01 gibbs Exp $ */ /* Messages (1 byte) */ /* I/T (M)andatory or (O)ptional */ @@ -17,7 +17,7 @@ #define MSG_NOOP 0x08 /* M/M */ #define MSG_PARITY_ERROR 0x09 /* M/M */ #define MSG_LINK_CMD_COMPLETE 0x0a /* O/O */ -#define MSG_LINK_CMD_COMPLETEF 0x0b /* O/O */ +#define MSG_LINK_CMD_COMPLETEF 0x0b /* O/O */ /* Obsolete */ #define MSG_BUS_DEV_RESET 0x0c /* O/M */ #define MSG_TARGET_RESET 0x0c /* O/M */ /* SPI3 Terminology */ #define MSG_ABORT_TAG 0x0d /* O/O */ @@ -58,8 +58,13 @@ #define MSG_EXT_WDTR_BUS_16_BIT 0x01 #define MSG_EXT_WDTR_BUS_32_BIT 0x02 /* Deprecated in SPI3 */ -#define MSG_EXT_PPR 0x04 /* SPI3 */ -#define MSG_EXT_PPR_LEN 0x06 -#define MSG_EXT_PPR_QAS_REQ 0x04 -#define MSG_EXT_PPR_DT_REQ 0x02 -#define MSG_EXT_PPR_IU_REQ 0x01 +#define MSG_EXT_PPR 0x04 /* SPI3/SPI4 */ +#define MSG_EXT_PPR_LEN 0x06 +#define MSG_EXT_PPR_PCOMP_EN 0x80 +#define MSG_EXT_PPR_RTI 0x40 +#define MSG_EXT_PPR_RD_STRM 0x20 +#define MSG_EXT_PPR_WR_FLOW 0x10 +#define MSG_EXT_PPR_HOLD_MCS 0x08 +#define MSG_EXT_PPR_QAS_REQ 0x04 +#define MSG_EXT_PPR_DT_REQ 0x02 +#define MSG_EXT_PPR_IU_REQ 0x01 ==== //depot/projects/smpng/sys/conf/NOTES#15 (text+ko) ==== @@ -14,7 +14,7 @@ # This file contains machine independent kernel configuration notes. For # machine dependent notes, look in /sys//conf/NOTES. # -# $FreeBSD: src/sys/conf/NOTES,v 1.1035 2002/05/31 06:28:13 brooks Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1036 2002/06/06 16:35:55 gibbs Exp $ # # @@ -1139,6 +1139,7 @@ # ahb: Adaptec 174x EISA controllers # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx +# ahd: Adaptec 29320/39320 Controllers. # aic: Adaptec 6260/6360, APA-1460 (PC Card), NEC PC9801-100 (C-BUS) # amd: Support for the AMD 53C974 SCSI host adapter chip as found on devices # such as the Tekram DC-390(T). @@ -1176,6 +1177,7 @@ hint.aic.0.at="isa" device ahb device ahc +device ahd device amd device isp hint.isp.0.disable="1" @@ -1223,6 +1225,13 @@ # Bitmap of units to enable targetmode operations. options AHC_TMODE_ENABLE +# Compile in aic79xx debugging code. +options AHD_DEBUG + +# Aic79xx driver debugging options. +# See sys/dev/aic79xx/aic79xx.h +options AHD_DEBUG_OPTS=0xFFFFFFFF + # The adw driver will attempt to use memory mapped I/O for all PCI # controllers that have it configured only if this option is set. options ADW_ALLOW_MEMIO ==== //depot/projects/smpng/sys/conf/files#42 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.643 2002/06/03 09:14:12 mdodd Exp $ +# $FreeBSD: src/sys/conf/files,v 1.644 2002/06/06 16:35:55 gibbs Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -14,6 +14,11 @@ no-obj no-implicit-rule before-depend \ clean "aic7xxx_seq.h aic7xxx_reg.h" \ dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" +aic79xx_{seq,reg}.h optional ahd pci \ + compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h $S/dev/aic7xxx/aic79xx.seq" \ + no-obj no-implicit-rule before-depend \ + clean "aic79xx_seq.h aic79xx_reg.h" \ + dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" kern/device_if.m standard kern/bus_if.m standard kern/clock_if.m optional genclock @@ -243,6 +248,10 @@ dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci +dev/aic7xxx/ahd_pci.c optional ahd pci +dev/aic7xxx/aic79xx.c optional ahd pci +dev/aic7xxx/aic79xx_osm.c optional ahd pci +dev/aic7xxx/aic79xx_pci.c optional ahd pci dev/amr/amr.c optional amr dev/amr/amr_disk.c optional amr dev/amr/amr_pci.c optional amr ==== //depot/projects/smpng/sys/conf/options#28 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.320 2002/06/02 04:32:52 alfred Exp $ +# $FreeBSD: src/sys/conf/options,v 1.321 2002/06/06 16:35:55 gibbs Exp $ # # On the handling of kernel options # @@ -52,6 +52,12 @@ AHC_DEBUG_SEQUENCER opt_aic7xxx.h # Enable diagnostic sequencer code +# Adaptec aic79xx SCSI controller options +AHD_DEBUG opt_aic79xx.h # Compile in aic79xx debugging code. + +AHD_DEBUG_OPTS opt_aic79xx.h # Aic79xx driver debugging options. + # See sys/dev/aic79xx/aic79xx.h + ADW_ALLOW_MEMIO opt_adw.h # Allow PCI devices to use memory # mapped I/O ==== //depot/projects/smpng/sys/ddb/ddb.h#4 (text+ko) ==== @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ddb/ddb.h,v 1.27 2002/03/23 11:53:03 bde Exp $ + * $FreeBSD: src/sys/ddb/ddb.h,v 1.28 2002/06/05 19:00:02 gibbs Exp $ */ /* @@ -43,18 +43,18 @@ char *modif); #define DB_COMMAND(cmd_name, func_name) \ - DB_SET(cmd_name, func_name, db_cmd_set) + DB_SET(cmd_name, func_name, db_cmd_set, 0, NULL) #define DB_SHOW_COMMAND(cmd_name, func_name) \ - DB_SET(cmd_name, func_name, db_show_cmd_set) + DB_SET(cmd_name, func_name, db_show_cmd_set, 0, NULL) -#define DB_SET(cmd_name, func_name, set) \ +#define DB_SET(cmd_name, func_name, set, flag, more) \ static db_cmdfcn_t func_name; \ \ static const struct command __CONCAT(func_name,_cmd) = { \ __STRING(cmd_name), \ func_name, \ - 0, \ - 0, \ + flag, \ + more \ }; \ TEXT_SET(set, __CONCAT(func_name,_cmd)); \ \ ==== //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm.c#4 (text+ko) ==== @@ -37,9 +37,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm.c#14 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm.c#17 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm.c,v 1.33 2002/04/24 16:24:43 gibbs Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm.c,v 1.34 2002/06/05 22:51:54 gibbs Exp $ */ #include #include @@ -288,9 +288,9 @@ { (void)fprintf(stderr, -"usage: %-16s [-nostdinc] [-I-] [-I directory] [-o output_file] - [-r register_output_file] [-l program_list_file] - input_file\n", +"usage: %-16s [-nostdinc] [-I-] [-I directory] [-o output_file]\n" +" [-r register_output_file] [-l program_list_file]\n" +" input_file\n", appname); exit(EX_USAGE); } @@ -335,11 +335,11 @@ instrcount = 0; fprintf(ofile, -"/* - * DO NOT EDIT - This file is automatically generated - * from the following source files: - * -%s */\n", versions); +"/*\n" +" * DO NOT EDIT - This file is automatically generated\n" +" * from the following source files:\n" +" *\n" +"%s */\n", versions); fprintf(ofile, "static uint8_t seqprog[] = {\n"); for (cur_instr = STAILQ_FIRST(&seq_program); @@ -374,13 +374,13 @@ cur_node != NULL; cur_node = SLIST_NEXT(cur_node,links)) { fprintf(ofile, -"static int aic_patch%d_func(%s); - -static int -aic_patch%d_func(%s) -{ - return (%s); -}\n\n", +"static int aic_patch%d_func(%s);\n" +"\n" +"static int\n" +"aic_patch%d_func(%s)\n" +"{\n" +" return (%s);\n" +"}\n\n", cur_node->symbol->info.condinfo->func_num, patch_arg_list, cur_node->symbol->info.condinfo->func_num, @@ -389,44 +389,44 @@ } fprintf(ofile, -"typedef int patch_func_t (%s); -static struct patch { - patch_func_t *patch_func; - uint32_t begin :10, - skip_instr :10, - skip_patch :12; -} patches[] = {\n", patch_arg_list); +"typedef int patch_func_t (%s);\n" +"static struct patch {\n" +" patch_func_t *patch_func;\n" +" uint32_t begin :10,\n" +" skip_instr :10,\n" +" skip_patch :12;\n" +"} patches[] = {\n", patch_arg_list); - for(cur_patch = STAILQ_FIRST(&patches); - cur_patch != NULL; - cur_patch = STAILQ_NEXT(cur_patch,links)) { + for (cur_patch = STAILQ_FIRST(&patches); + cur_patch != NULL; + cur_patch = STAILQ_NEXT(cur_patch,links)) { fprintf(ofile, "%s\t{ aic_patch%d_func, %d, %d, %d }", cur_patch == STAILQ_FIRST(&patches) ? "" : ",\n", cur_patch->patch_func, cur_patch->begin, cur_patch->skip_instr, cur_patch->skip_patch); } - fprintf(ofile, "\n};\n"); + fprintf(ofile, "\n};\n\n"); fprintf(ofile, -"static struct cs { - u_int16_t begin; - u_int16_t end; -} critical_sections[] = {\n"); +"static struct cs {\n" +" u_int16_t begin;\n" +" u_int16_t end;\n" +"} critical_sections[] = {\n"); - for(cs = TAILQ_FIRST(&cs_tailq); - cs != NULL; - cs = TAILQ_NEXT(cs, links)) { + for (cs = TAILQ_FIRST(&cs_tailq); + cs != NULL; + cs = TAILQ_NEXT(cs, links)) { fprintf(ofile, "%s\t{ %d, %d }", cs == TAILQ_FIRST(&cs_tailq) ? "" : ",\n", cs->begin_addr, cs->end_addr); } - fprintf(ofile, "\n};\n"); + fprintf(ofile, "\n};\n\n"); fprintf(ofile, -"static const int num_critical_sections = sizeof(critical_sections) - / sizeof(*critical_sections);\n"); +"static const int num_critical_sections = sizeof(critical_sections)\n" +" / sizeof(*critical_sections);\n"); fprintf(stderr, "%s: %d instructions used\n", appname, instrcount); } @@ -569,9 +569,9 @@ /* Now output the listing */ cur_patch = STAILQ_FIRST(&patches); - for(cur_instr = STAILQ_FIRST(&seq_program); - cur_instr != NULL; - cur_instr = STAILQ_NEXT(cur_instr, links), instrcount++) { + for (cur_instr = STAILQ_FIRST(&seq_program); + cur_instr != NULL; + cur_instr = STAILQ_NEXT(cur_instr, links), instrcount++) { if (check_patch(&cur_patch, instrcount, &skip_addr, func_values) == 0) { ==== //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm.h#4 (text+ko) ==== @@ -37,9 +37,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm.h#9 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm.h#10 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm.h,v 1.14 2002/04/24 16:24:43 gibbs Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm.h,v 1.15 2002/06/05 22:51:54 gibbs Exp $ */ #ifdef __linux__ ==== //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm_gram.y#4 (text+ko) ==== @@ -38,9 +38,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#14 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#15 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm_gram.y,v 1.16 2002/04/24 16:24:43 gibbs Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm_gram.y,v 1.17 2002/06/05 22:51:54 gibbs Exp $ */ #include ==== //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm_insformat.h#3 (text+ko) ==== @@ -37,9 +37,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_insformat.h#8 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_insformat.h#9 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm_insformat.h,v 1.5 2002/04/24 16:24:43 gibbs Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm_insformat.h,v 1.6 2002/06/05 22:51:54 gibbs Exp $ */ struct ins_format1 { ==== //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm_scan.l#5 (text+ko) ==== @@ -38,9 +38,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_scan.l#10 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_scan.l#11 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm_scan.l,v 1.17 2002/04/24 16:24:43 gibbs Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aicasm/aicasm_scan.l,v 1.18 2002/06/05 22:51:54 gibbs Exp $ */ #include ==== //depot/projects/smpng/sys/dev/aic7xxx/aicasm/aicasm_symbol.c#4 (text+ko) ==== @@ -36,9 +36,9 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message