From owner-p4-projects@FreeBSD.ORG Sun Oct 16 04:35:50 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5395316A422; Sun, 16 Oct 2005 04:35:49 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F6C016A420 for ; Sun, 16 Oct 2005 04:35:48 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E15443D46 for ; Sun, 16 Oct 2005 04:35:48 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j9G4ZmVH019419 for ; Sun, 16 Oct 2005 04:35:48 GMT (envelope-from gnn@neville-neil.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j9G4Zl4M019416 for perforce@freebsd.org; Sun, 16 Oct 2005 04:35:47 GMT (envelope-from gnn@neville-neil.com) Date: Sun, 16 Oct 2005 04:35:47 GMT Message-Id: <200510160435.j9G4Zl4M019416@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gnn@neville-neil.com using -f From: "George V. Neville-Neil" To: Perforce Change Reviews Cc: Subject: PERFORCE change 85357 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 04:35:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=85357 Change 85357 by gnn@gnn_laptop_fast_ipsec on 2005/10/16 04:35:01 Clean up my view wrt the HEAD and the fast_ipsec branch Affected files ... .. //depot/projects/fast_ipsec/src/sys/boot/i386/boot2/boot2.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/dev/pccard/pccardvarp.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/i386/svr4/svr4_machdep.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/kern/subr_param.c#3 integrate Differences ... ==== //depot/projects/fast_ipsec/src/sys/boot/i386/boot2/boot2.c#3 (text+ko) ==== @@ -14,7 +14,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.75 2005/09/22 11:20:33 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.76 2005/10/16 01:55:35 sobomax Exp $"); #include #include @@ -60,20 +60,22 @@ /* 0x12 is reserved for boot programs. */ /* 0x13 is reserved for boot programs. */ #define RBX_PAUSE 0x14 /* -p */ -#define RBX_NOINTR 0x1c /* -n */ /* 0x1d is reserved for log2(RB_MULTIPLE) and is just misnamed here. */ #define RBX_DUAL 0x1d /* -D */ /* 0x1f is reserved for log2(RB_BOOTINFO). */ +/* group of internal options below */ +#define RBX_NOINTR 0x20 /* -n */ +#define RBX_QUIET 0x21 /* -q */ /* pass: -a, -s, -r, -d, -c, -v, -h, -C, -g, -m, -p, -D */ -#define RBX_MASK 0x2011ffff +#define RBX_MASK 0xffffffff #define PATH_CONFIG "/boot.config" #define PATH_BOOT3 "/boot/loader" #define PATH_KERNEL "/boot/kernel/kernel" #define ARGS 0x900 -#define NOPT 11 +#define NOPT 12 #define NDEV 3 #define MEM_BASE 0x12 #define MEM_EXT 0x15 @@ -88,9 +90,11 @@ #define TYPE_MAXHARD TYPE_DA #define TYPE_FD 2 +#define OPT_CHECK(opt) ((opts >> (opt)) & 0x1) + extern uint32_t _end; -static const char optstr[NOPT] = "DhaCgmnprsv"; /* Also 'P', 'S' */ +static const char optstr[NOPT] = "DhaCgmnpqrsv"; /* Also 'P', 'S' */ static const unsigned char flags[NOPT] = { RBX_DUAL, RBX_SERIAL, @@ -100,6 +104,7 @@ RBX_MUTE, RBX_NOINTR, RBX_PAUSE, + RBX_QUIET, RBX_DFLTROOT, RBX_SINGLE, RBX_VERBOSE @@ -119,7 +124,7 @@ } dsk; static char cmd[512]; static char kname[1024]; -static uint32_t opts; +static uint64_t opts; static int comspeed = SIOSPD; static struct bootinfo bootinfo; static uint8_t ioctrl = IO_KEYBOARD; @@ -158,7 +163,7 @@ #include "ufsread.c" -static int +static inline int xfsread(ino_t inode, void *buf, size_t nbyte) { if ((size_t)fsread(inode, buf, nbyte) != nbyte) { @@ -244,7 +249,8 @@ if (*cmd) { if (parse()) autoboot = 0; - printf("%s: %s", PATH_CONFIG, cmd); + if (!OPT_CHECK(RBX_QUIET)) + printf("%s: %s", PATH_CONFIG, cmd); /* Do not process this command twice */ *cmd = 0; } @@ -265,16 +271,17 @@ /* Present the user with the boot2 prompt. */ for (;;) { - printf("\nFreeBSD/i386 boot\n" - "Default: %u:%s(%u,%c)%s\n" - "boot: ", - dsk.drive & DRV_MASK, dev_nm[dsk.type], dsk.unit, - 'a' + dsk.part, kname); + if (!autoboot || !OPT_CHECK(RBX_QUIET)) + printf("\nFreeBSD/i386 boot\n" + "Default: %u:%s(%u,%c)%s\n" + "boot: ", + dsk.drive & DRV_MASK, dev_nm[dsk.type], dsk.unit, + 'a' + dsk.part, kname); if (ioctrl & IO_SERIAL) sio_flush(); if (!autoboot || keyhit(5*SECOND)) getstr(); - else + else if (!autoboot || !OPT_CHECK(RBX_QUIET)) putchar('\n'); autoboot = 0; if (parse()) @@ -293,12 +300,12 @@ static void load(void) { - union { + static union { struct exec ex; Elf32_Ehdr eh; } hdr; - Elf32_Phdr ep[2]; - Elf32_Shdr es[2]; + static Elf32_Phdr ep[2]; + static Elf32_Shdr es[2]; caddr_t p; ino_t ino; uint32_t addr, x; @@ -380,7 +387,7 @@ bootinfo.bi_esymtab = VTOP(p); bootinfo.bi_kernelname = VTOP(kname); bootinfo.bi_bios_dev = dsk.drive; - __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), + __exec((caddr_t)addr, RB_BOOTINFO | (uint32_t)(opts & RBX_MASK), MAKEBOOTDEV(dev_maj[dsk.type], 0, dsk.slice, dsk.unit, dsk.part), 0, 0, 0, VTOP(&bootinfo)); } @@ -407,7 +414,7 @@ if (*(uint8_t *)PTOV(0x496) & 0x10) { cp = "yes"; } else { - opts |= 1 << RBX_DUAL | 1 << RBX_SERIAL; + opts |= (uint64_t)1 << RBX_DUAL | (uint64_t)1 << RBX_SERIAL; cp = "no"; } printf("Keyboard: %s\n", cp); @@ -425,10 +432,10 @@ for (i = 0; c != optstr[i]; i++) if (i == NOPT - 1) return -1; - opts ^= 1 << flags[i]; + opts ^= (uint64_t)1 << flags[i]; } - ioctrl = opts & 1 << RBX_DUAL ? (IO_SERIAL|IO_KEYBOARD) : - opts & 1 << RBX_SERIAL ? IO_SERIAL : IO_KEYBOARD; + ioctrl = opts & (uint64_t)1 << RBX_DUAL ? (IO_SERIAL|IO_KEYBOARD) : + opts & (uint64_t)1 << RBX_SERIAL ? IO_SERIAL : IO_KEYBOARD; if (ioctrl & IO_SERIAL) sio_init(115200 / comspeed); } else { @@ -596,7 +603,8 @@ { static unsigned c = 0x2d5c7c2f; - printf("%c\b", c = c << 8 | c >> 24); + if (!OPT_CHECK(RBX_QUIET)) + printf("%c\b", c = c << 8 | c >> 24); v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; v86.addr = XREADORG; /* call to xread in boot1 */ v86.es = VTOPSEG(buf); @@ -618,7 +626,7 @@ { uint32_t t0, t1; - if (opts & 1 << RBX_NOINTR) + if (OPT_CHECK(RBX_NOINTR)) return 0; t0 = 0; for (;;) { @@ -645,7 +653,7 @@ static int xgetc(int fn) { - if (opts & 1 << RBX_NOINTR) + if (OPT_CHECK(RBX_NOINTR)) return 0; for (;;) { if (ioctrl & IO_KEYBOARD && getc(1)) ==== //depot/projects/fast_ipsec/src/sys/dev/pccard/pccardvarp.h#2 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pccard/pccardvarp.h,v 1.1 2005/09/20 06:47:33 imp Exp $ + * $FreeBSD: src/sys/dev/pccard/pccardvarp.h,v 1.2 2005/10/16 03:58:06 imp Exp $ */ #ifndef _PCCARD_PCCARDVARP_H @@ -32,7 +32,7 @@ /* pccard itself */ -#define PCCARD_MEM_PAGE_SIZE 4096 +#define PCCARD_MEM_PAGE_SIZE 1024 #define PCCARD_CFE_MWAIT_REQUIRED 0x0001 #define PCCARD_CFE_RDYBSY_ACTIVE 0x0002 ==== //depot/projects/fast_ipsec/src/sys/i386/svr4/svr4_machdep.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/svr4/svr4_machdep.c,v 1.36 2005/10/14 12:43:45 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/svr4/svr4_machdep.c,v 1.37 2005/10/15 22:57:39 davidxu Exp $"); #include #include @@ -413,7 +413,7 @@ void svr4_sendsig(catcher, ksi, mask) sig_t catcher; - ksiginfo_t ksi; + ksiginfo_t *ksi; sigset_t *mask; { register struct thread *td = curthread; ==== //depot/projects/fast_ipsec/src/sys/kern/subr_param.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_param.c,v 1.72 2005/10/14 19:15:10 kris Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_param.c,v 1.73 2005/10/16 03:58:10 kris Exp $"); #include "opt_param.h" #include "opt_maxusers.h"