From owner-p4-projects@FreeBSD.ORG Sun May 11 14:56:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 118E537B404; Sun, 11 May 2003 14:56:11 -0700 (PDT) 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 A2BC837B401 for ; Sun, 11 May 2003 14:56:10 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E240E43FE5 for ; Sun, 11 May 2003 14:56:08 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BLu80U017964 for ; Sun, 11 May 2003 14:56:08 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BLu7MN017961 for perforce@freebsd.org; Sun, 11 May 2003 14:56:07 -0700 (PDT) Date: Sun, 11 May 2003 14:56:07 -0700 (PDT) Message-Id: <200305112156.h4BLu7MN017961@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30960 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 21:56:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=30960 Change 30960 by peter@peter_daintree on 2003/05/11 14:55:18 IFC @30959 Affected files ... .. //depot/projects/hammer/crypto/telnet/telnet/commands.c#6 integrate .. //depot/projects/hammer/crypto/telnet/telnet/externs.h#2 integrate .. //depot/projects/hammer/crypto/telnet/telnet/main.c#4 integrate .. //depot/projects/hammer/crypto/telnet/telnet/telnet.c#4 integrate .. //depot/projects/hammer/crypto/telnet/telnetd/telnetd.c#5 integrate .. //depot/projects/hammer/kerberos5/include/config.h#5 integrate .. //depot/projects/hammer/kerberos5/usr.bin/kadmin/Makefile#2 integrate .. //depot/projects/hammer/kerberos5/usr.sbin/ktutil/Makefile#3 integrate .. //depot/projects/hammer/libexec/Makefile#14 integrate .. //depot/projects/hammer/libexec/telnetd/global.c#2 integrate .. //depot/projects/hammer/libexec/telnetd/slc.c#2 integrate .. //depot/projects/hammer/libexec/telnetd/state.c#3 integrate .. //depot/projects/hammer/libexec/telnetd/sys_term.c#2 integrate .. //depot/projects/hammer/libexec/telnetd/telnetd.c#4 integrate .. //depot/projects/hammer/libexec/telnetd/termstat.c#2 integrate .. //depot/projects/hammer/libexec/telnetd/utility.c#2 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#17 integrate .. //depot/projects/hammer/release/i386/drivers.conf#9 integrate .. //depot/projects/hammer/sbin/mount_nfs/mount_nfs.8#5 integrate .. //depot/projects/hammer/sbin/newfs/mkfs.c#8 integrate .. //depot/projects/hammer/share/examples/netgraph/bluetooth/rc.bluetooth#1 branch .. //depot/projects/hammer/share/man/man4/Makefile#12 integrate .. //depot/projects/hammer/share/man/man4/ng_bluetooth.4#3 integrate .. //depot/projects/hammer/share/man/man4/ng_bt3c.4#3 integrate .. //depot/projects/hammer/share/man/man4/ng_btsocket.4#3 integrate .. //depot/projects/hammer/share/man/man4/ng_h4.4#3 integrate .. //depot/projects/hammer/share/man/man4/ng_hci.4#3 integrate .. //depot/projects/hammer/share/man/man4/ng_l2cap.4#3 integrate .. //depot/projects/hammer/share/man/man4/ng_ubt.4#3 integrate .. //depot/projects/hammer/share/man/man4/ubtbcmfw.4#1 branch .. //depot/projects/hammer/sys/conf/Makefile.amd64#9 integrate .. //depot/projects/hammer/sys/conf/files#19 integrate .. //depot/projects/hammer/sys/conf/majors#10 integrate .. //depot/projects/hammer/sys/dev/ata/ata-chipset.c#9 integrate .. //depot/projects/hammer/sys/dev/ata/ata-pci.h#7 integrate .. //depot/projects/hammer/sys/dev/firewire/firewire.c#11 integrate .. //depot/projects/hammer/sys/dev/ips/ips.c#1 branch .. //depot/projects/hammer/sys/dev/ips/ips.h#1 branch .. //depot/projects/hammer/sys/dev/ips/ips_commands.c#1 branch .. //depot/projects/hammer/sys/dev/ips/ips_disk.c#1 branch .. //depot/projects/hammer/sys/dev/ips/ips_disk.h#1 branch .. //depot/projects/hammer/sys/dev/ips/ips_ioctl.c#1 branch .. //depot/projects/hammer/sys/dev/ips/ips_ioctl.h#1 branch .. //depot/projects/hammer/sys/dev/ips/ips_pci.c#1 branch .. //depot/projects/hammer/sys/i386/conf/GENERIC#10 integrate .. //depot/projects/hammer/sys/i386/conf/NOTES#14 integrate .. //depot/projects/hammer/sys/kern/subr_mbuf.c#9 integrate .. //depot/projects/hammer/sys/modules/Makefile#16 integrate .. //depot/projects/hammer/sys/modules/ips/Makefile#1 branch .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/bluetooth/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/bt3c/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/h4/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/hci/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/l2cap/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/socket/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/ubt/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#1 branch .. //depot/projects/hammer/sys/netgraph/bluetooth/common/ng_bluetooth.c#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/ubt/TODO#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#1 branch .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/TODO#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_cmds.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_cmds.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_evnt.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_evnt.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_main.c#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_misc.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_misc.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_prse.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/hci/ng_hci_var.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_bluetooth.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_bt3c.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_btsocket.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h#1 branch .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_h4.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_hci.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_l2cap.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/include/ng_ubt.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/TODO#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_prse.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/socket/TODO#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/socket/ng_btsocket.c#2 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#4 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#1 branch .. //depot/projects/hammer/usr.bin/bluetooth/Makefile#2 integrate .. //depot/projects/hammer/usr.bin/bluetooth/btsockstat/Makefile#2 integrate .. //depot/projects/hammer/usr.bin/bluetooth/btsockstat/btsockstat.1#3 integrate .. //depot/projects/hammer/usr.bin/bluetooth/btsockstat/btsockstat.c#2 integrate .. //depot/projects/hammer/usr.bin/bluetooth/rfcomm_sppd/Makefile#1 branch .. //depot/projects/hammer/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1#1 branch .. //depot/projects/hammer/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c#1 branch .. //depot/projects/hammer/usr.bin/telnet/commands.c#5 integrate .. //depot/projects/hammer/usr.bin/telnet/externs.h#2 integrate .. //depot/projects/hammer/usr.bin/telnet/main.c#3 integrate .. //depot/projects/hammer/usr.bin/telnet/network.c#3 integrate .. //depot/projects/hammer/usr.bin/telnet/ring.c#2 integrate .. //depot/projects/hammer/usr.bin/telnet/sys_bsd.c#3 integrate .. //depot/projects/hammer/usr.bin/telnet/telnet.c#5 integrate .. //depot/projects/hammer/usr.bin/telnet/terminal.c#3 integrate .. //depot/projects/hammer/usr.bin/telnet/utilities.c#3 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/bcmfw/BCM-LEGAL.txt#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/bcmfw/Makefile#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/bcmfw/README#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/bcmfw/bcmfw.8#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/bcmfw/bcmfw.c#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/bt3cfw/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/bt3cfw/bt3cfw.8#3 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/bt3cfw/bt3cfw.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/hccontrol.8#3 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/hccontrol.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/hccontrol.h#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/info.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/link_control.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/link_policy.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/node.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/send_recv.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/status.c#3 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hccontrol/util.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hcsecd/Makefile#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/hcsecd/hcsecd.8#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/hcsecd/hcsecd.c#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/hcsecd/hcsecd.conf#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/hcsecd/hcsecd.h#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/hcsecd/lexer.l#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/hcsecd/parser.y#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/hcseriald/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hcseriald/hcseriald.8#3 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/hcseriald/hcseriald.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/l2control/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/l2control/l2cap.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/l2control/l2control.8#3 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/l2control/l2control.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/l2control/l2control.h#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/l2ping/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/l2ping/l2ping.8#3 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/l2ping/l2ping.c#2 integrate .. //depot/projects/hammer/usr.sbin/bluetooth/rfcomm_pppd/Makefile#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8#1 branch .. //depot/projects/hammer/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c#1 branch .. //depot/projects/hammer/usr.sbin/sysinstall/devices.c#6 integrate Differences ... ==== //depot/projects/hammer/crypto/telnet/telnet/commands.c#6 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/commands.c,v 1.30 2003/05/04 02:54:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/commands.c,v 1.31 2003/05/11 18:17:00 markm Exp $"); #include #include @@ -532,11 +532,11 @@ { #ifndef NOT43 if (net > 0 && - (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, debug)) < 0) { + (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, telnet_debug)) < 0) { perror("setsockopt (SO_DEBUG)"); } #else /* NOT43 */ - if (debug) { + if (telnet_debug) { if (net > 0 && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) perror("setsockopt (SO_DEBUG)"); } else @@ -741,7 +741,7 @@ { "debug", "debugging", (int (*)(int))togdebug, - &debug, + &telnet_debug, "turn on socket level debugging" }, { "netdata", "printing of hexadecimal network data (debugging)", @@ -2404,7 +2404,7 @@ } #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ - if (debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { + if (telnet_debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { perror("setsockopt (SO_DEBUG)"); } ==== //depot/projects/hammer/crypto/telnet/telnet/externs.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)externs.h 8.3 (Berkeley) 5/30/95 - * $FreeBSD: src/crypto/telnet/telnet/externs.h,v 1.9 2001/11/30 22:28:07 markm Exp $ + * $FreeBSD: src/crypto/telnet/telnet/externs.h,v 1.10 2003/05/11 18:17:00 markm Exp $ */ #ifndef BSD @@ -127,7 +127,7 @@ netdata, /* Print out network data flow */ prettydump, /* Print "netdata" output in user readable format */ termdata, /* Print out terminal data flow */ - debug, /* Debug level */ + telnet_debug, /* Debug level */ doaddrlookup, /* do a reverse lookup? */ clienteof; /* Client received EOF */ ==== //depot/projects/hammer/crypto/telnet/telnet/main.c#4 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/main.c,v 1.17 2003/05/04 02:54:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/main.c,v 1.18 2003/05/11 18:17:00 markm Exp $"); #include #include @@ -213,7 +213,7 @@ skiprc = 1; break; case 'd': - debug = 1; + telnet_debug = 1; break; case 'e': set_escape_char(optarg); ==== //depot/projects/hammer/crypto/telnet/telnet/telnet.c#4 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/telnet.c,v 1.13 2003/05/04 02:54:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/telnet.c,v 1.14 2003/05/11 18:17:00 markm Exp $"); #include @@ -95,7 +95,7 @@ connected, showoptions, ISend, /* trying to send network data in */ - debug = 0, + telnet_debug = 0, crmod, netdata, /* Print out network data flow */ crlf, /* Should '\r' be mapped to (or )? */ ==== //depot/projects/hammer/crypto/telnet/telnetd/telnetd.c#5 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnetd/telnetd.c,v 1.22 2003/05/04 02:54:49 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnetd/telnetd.c,v 1.23 2003/05/11 18:17:00 markm Exp $"); #include "telnetd.h" #include "pathnames.h" @@ -78,7 +78,7 @@ int hostinfo = 1; /* do we print login banner? */ -int debug = 0; +static int debug = 0; int keepalive = 1; const char *altlogin; ==== //depot/projects/hammer/kerberos5/include/config.h#5 (text+ko) ==== @@ -1,7 +1,7 @@ /* include/config.h. Generated automatically by configure. */ /* include/config.h.in. Generated automatically from configure.in by autoheader. */ -/* $FreeBSD: src/kerberos5/include/config.h,v 1.11 2002/11/24 21:00:51 nectar Exp $ */ +/* $FreeBSD: src/kerberos5/include/config.h,v 1.12 2003/05/11 18:49:28 markm Exp $ */ #include @@ -1118,9 +1118,6 @@ /* Define if you are running IRIX 4. */ /* #undef IRIX4 */ -/* Define if you have the krb4 package. */ -/* #undef KRB4 */ - /* Enable Kerberos 5 support in applications. */ #define KRB5 1 @@ -1328,13 +1325,7 @@ /* Define to `int' if doesn't define. */ /* #undef uid_t */ -#if defined(HAVE_FOUR_VALUED_KRB_PUT_INT) || !defined(KRB4) #define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (L), (S)) -#else -#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (S)) -#endif - - #if defined(ENCRYPTION) && !defined(AUTHENTICATION) #define AUTHENTICATION 1 ==== //depot/projects/hammer/kerberos5/usr.bin/kadmin/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/kerberos5/usr.bin/kadmin/Makefile,v 1.11 2003/03/09 21:56:54 markm Exp $ +# $FreeBSD: src/kerberos5/usr.bin/kadmin/Makefile,v 1.12 2003/05/11 18:49:29 markm Exp $ PROG= kadmin SRCS= \ @@ -33,17 +33,17 @@ -I${ASN1OBJDIR} \ -I${HDBOBJDIR} \ -I${.OBJDIR} -LDADD= -L${KRB5OBJDIR} -lkrb5 \ +LDADD= -L${KADM5COBJDIR} -lkadm5clnt -L${KADM5SOBJDIR} -lkadm5srv \ + -L${KRB5OBJDIR} -lkrb5 \ -L${ROKENOBJDIR} -lroken \ -L${VERSOBJDIR} -lvers \ - -L${KADM5COBJDIR} -lkadm5clnt -L${KADM5SOBJDIR} -lkadm5srv \ -L${HDBOBJDIR} -lhdb \ -L${ASN1OBJDIR} -lasn1 -lcrypto -lcrypt -lcom_err \ - -L${SLOBJDIR} -lsl -lreadline + -L${SLOBJDIR} -lsl -lreadline -lcurses DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBROKEN} \ ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} \ ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBSL} ${LIBREADLINE} + ${LIBSL} ${LIBREADLINE} ${LIBCURSES} MAN= kadmin.8 .include ==== //depot/projects/hammer/kerberos5/usr.sbin/ktutil/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/kerberos5/usr.sbin/ktutil/Makefile,v 1.11 2003/03/09 21:56:55 markm Exp $ +# $FreeBSD: src/kerberos5/usr.sbin/ktutil/Makefile,v 1.12 2003/05/11 18:49:29 markm Exp $ PROG= ktutil SRCS= \ @@ -25,15 +25,16 @@ -I${KRB5DIR}/admin \ -I${ASN1OBJDIR} \ -I${.OBJDIR} -LDADD= -L${KRB5OBJDIR} -lkrb5 \ +LDADD= -L${KADM5COBJDIR} -lkadm5clnt \ + -L${KRB5OBJDIR} -lkrb5 \ -L${ROKENOBJDIR} -lroken \ -L${VERSOBJDIR} -lvers \ -L${SLOBJDIR} -lsl -L${ASN1OBJDIR} -lasn1 \ - -L${KADM5COBJDIR} -lkadm5clnt \ - -lcrypto -lcrypt -lcom_err -lreadline + -lcrypto -lcrypt -lcom_err -lreadline -lcurses DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBROKEN} \ ${LIBSL} ${LIBASN1} ${LIBKADM5CLNT} \ - ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LIBREADLINE} + ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} ${LIBREADLINE} \ + ${LIBCURSES} MAN= ktutil.8 .include ==== //depot/projects/hammer/libexec/Makefile#14 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/libexec/Makefile,v 1.59 2003/05/08 06:37:12 peter Exp $ +# $FreeBSD: src/libexec/Makefile,v 1.60 2003/05/11 18:48:29 markm Exp $ # Present but disabled: kpasswdd SUBDIR= atrun \ ==== //depot/projects/hammer/libexec/telnetd/global.c#2 (text+ko) ==== @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ +#if 0 #ifndef lint -#if 0 static const char sccsid[] = "@(#)global.c 8.1 (Berkeley) 6/4/93"; +#endif /* not lint */ #endif -static const char rcsid[] = - "$FreeBSD: src/libexec/telnetd/global.c,v 1.4 2001/08/20 12:12:27 markm Exp $"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD: src/libexec/telnetd/global.c,v 1.5 2003/05/11 18:27:49 markm Exp $"); /* * Allocate global variables. We do this ==== //depot/projects/hammer/libexec/telnetd/slc.c#2 (text+ko) ==== @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD: src/libexec/telnetd/slc.c,v 1.13 2001/11/30 22:03:20 markm Exp $"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)slc.c 8.2 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD: src/libexec/telnetd/slc.c,v 1.14 2003/05/11 18:27:49 markm Exp $"); #include "telnetd.h" ==== //depot/projects/hammer/libexec/telnetd/state.c#3 (text+ko) ==== @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD: src/libexec/telnetd/state.c,v 1.18 2002/08/25 13:07:55 charnier Exp $"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)state.c 8.5 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD: src/libexec/telnetd/state.c,v 1.19 2003/05/11 18:27:49 markm Exp $"); #include #include "telnetd.h" ==== //depot/projects/hammer/libexec/telnetd/sys_term.c#2 (text+ko) ==== @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD: src/libexec/telnetd/sys_term.c,v 1.38 2002/05/27 08:10:24 jmallett Exp $"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD: src/libexec/telnetd/sys_term.c,v 1.39 2003/05/11 18:27:49 markm Exp $"); #include #include ==== //depot/projects/hammer/libexec/telnetd/telnetd.c#4 (text+ko) ==== @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD: src/libexec/telnetd/telnetd.c,v 1.33 2001/11/30 22:37:28 markm Exp $"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD: src/libexec/telnetd/telnetd.c,v 1.34 2003/05/11 18:27:49 markm Exp $"); #include "telnetd.h" #include "pathnames.h" @@ -71,7 +71,7 @@ int hostinfo = 1; /* do we print login banner? */ -int debug = 0; +static int debug = 0; int keepalive = 1; const char *altlogin; ==== //depot/projects/hammer/libexec/telnetd/termstat.c#2 (text+ko) ==== @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD: src/libexec/telnetd/termstat.c,v 1.15 2001/11/30 22:03:20 markm Exp $"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)termstat.c 8.2 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD: src/libexec/telnetd/termstat.c,v 1.16 2003/05/11 18:27:49 markm Exp $"); #include "telnetd.h" ==== //depot/projects/hammer/libexec/telnetd/utility.c#2 (text+ko) ==== @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ +#if 0 #ifndef lint -#if 0 static const char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95"; +#endif /* not lint */ #endif -static const char rcsid[] = - "$FreeBSD: src/libexec/telnetd/utility.c,v 1.18 2001/11/30 22:03:20 markm Exp $"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD: src/libexec/telnetd/utility.c,v 1.19 2003/05/11 18:27:49 markm Exp $"); #ifdef __FreeBSD__ #include ==== //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#17 (text+ko) ==== @@ -31,7 +31,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.147 2003/05/09 23:14:02 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.148 2003/05/10 16:30:56 bmah Exp $ Supported Devices @@ -3398,7 +3398,7 @@ Genius and Mustek hand scanners GPB and Transputer drivers - VGA-compatible video cards + VGA-compatible video cards (&man.vga.4; driver) ==== //depot/projects/hammer/release/i386/drivers.conf#9 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/i386/drivers.conf,v 1.25 2003/04/22 07:57:19 simokawa Exp $ +# $FreeBSD: src/release/i386/drivers.conf,v 1.26 2003/05/11 06:42:09 scottl Exp $ # # drv: driver name in kernel config file @@ -66,6 +66,7 @@ agp agp 3 video "AGP Host Bridge support" amr amr 3 disk "AMI MegaRAID" +ips ips 3 disk "IBM ServeRAID" mlx mlx 3 disk "Mylex DAC-family RAID" mly mly 3 disk "Mylex AcceleRAID/eXtremeRAID family" trm trm 3 disk "Tekram DC395X SCSI cards" ==== //depot/projects/hammer/sbin/mount_nfs/mount_nfs.8#5 (text+ko) ==== @@ -31,7 +31,7 @@ .\" .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" -.\" $FreeBSD: src/sbin/mount_nfs/mount_nfs.8,v 1.37 2003/03/25 01:25:30 mdodd Exp $ +.\" $FreeBSD: src/sbin/mount_nfs/mount_nfs.8,v 1.38 2003/05/11 00:38:58 trhodes Exp $ .\"" .Dd March 29, 1995 .Dt MOUNT_NFS 8 @@ -134,9 +134,6 @@ Use a reserved socket port number. This flag is obsolete, and only retained for compatibility reasons. Reserved port numbers are used by default now. -This is useful for mounting servers that require clients to use a -reserved port number on the mistaken belief that this makes NFS -more secure. (For the rare case where the client has a trusted root account but untrustworthy users and the network cables are in secure areas this does help, but for normal desktop clients this does not apply.) @@ -269,9 +266,6 @@ .It resvport Same as .Fl P . -.It seqpacket -Same as -.Fl p . .It soft Same as .Fl s . ==== //depot/projects/hammer/sbin/newfs/mkfs.c#8 (text+ko) ==== @@ -46,7 +46,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/sbin/newfs/mkfs.c,v 1.75 2003/05/03 18:41:58 obrien Exp $"); +__FBSDID("$FreeBSD: src/sbin/newfs/mkfs.c,v 1.76 2003/05/10 18:58:17 iedowse Exp $"); #include #include @@ -849,7 +849,8 @@ { if (Nflag) return; - bwrite(&disk, bno, bf, size); + if (bwrite(&disk, bno, bf, size) < 0) + err(36, "wtfs: %d bytes at sector %jd", size, (intmax_t)bno); } /* ==== //depot/projects/hammer/share/man/man4/Makefile#12 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD: src/share/man/man4/Makefile,v 1.200 2003/05/03 10:16:55 akiyama Exp $ +# $FreeBSD: src/share/man/man4/Makefile,v 1.201 2003/05/10 21:44:37 julian Exp $ MAN= aac.4 \ acpi.4 \ @@ -232,6 +232,7 @@ txp.4 \ ubsa.4 \ ubsec.4 \ + ubtbcmfw.4 \ ucom.4 \ udbp.4 \ udp.4 \ ==== //depot/projects/hammer/share/man/man4/ng_bluetooth.4#3 (text+ko) ==== @@ -1,6 +1,8 @@ +.\" ng_bluetooth.4 +.\" .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -9,7 +11,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -21,97 +23,81 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.\" -.\" $FreeBSD: src/share/man/man4/ng_bluetooth.4,v 1.3 2002/12/27 12:15:33 schweikh Exp $ -.\" +.\" +.\" $Id: ng_bluetooth.4,v 1.2 2003/04/26 22:38:25 max Exp $ +.\" $FreeBSD: src/share/man/man4/ng_bluetooth.4,v 1.4 2003/05/10 21:44:37 julian Exp $ .Dd November 9, 2002 .Dt NG_BLUETOOTH 4 .Os .Sh NAME -.Nm ng_bluetooth +.Nm bluetooth .Nd placeholder for global Bluetooth variables .Sh SYNOPSIS .In sys/types.h .In ng_bluetooth.h .Sh DESCRIPTION The -.Nm -module is a placeholder for global Bluetooth variables. -All Bluetooth variables can be examined and changed via +.Nm +module is a placeholder for global Bluetooth variables. All Bluetooth +variables can be examined and changed via .Xr sysctl 8 . -.Ss Bluetooth Variables -Below is the description of default variables. -Each Bluetooth module might add its own variables to the tree. -.Bl -tag -width indent -.It Va net.bluetooth.version -A read-only integer variable that shows the current version of the +.Sh BLUETOOTH VARIABLES +Below is the description of default variables. Each Bluetooth module +might add its own variables to the tree. +.Bl -tag -width foobar +.It net.bluetooth.version +A read only integer variable that shows the current version of the Bluetooth stack. -.It Va net.bluetooth.hci.command_timeout +.It net.bluetooth.hci.command_timeout A read-write interger variable that controls the Host Controller Interface -(HCI) command timeout (in seconds), i.e. how long the HCI layer will wait +(HCI) command timeout (in seconds), i.e. how long the HCI layer will wait for the .Dv Command_Complete or .Dv Command_Status event from a Bluetooth device. -.It Va net.bluetooth.hci.connection_timeout -A read-write integer variable that controls the HCI connection timeout, i.e.\& -how long the HCI layer will wait for the +.It net.bluetooth.hci.connection_timeout +A read-write integer variable that controls the HCI connection timeout, i.e. +how long the HCI layer will wait for the .Dv Connection_Complete -event. -Normally this should not be required as Bluetooth devices have -connection timeout of their own and will send event back. -This timeout -is required to ensure that no connection will stall in case when the HCI -transport layer is broken. -Be careful when changing this variable. +event. Normaly this should not be required as Bluetooth devices have +connection timeout of their own and will send event back. This timeout +is required to ensure that no connection will stall in case when the HCI +transport layer is broken. Be careful when changing this variable. Make sure you understand what you are doing. -.It Va net.bluetooth.hci.watchdog_timeout -A read-write integer variable that controls the HCI connection watchdog -timeout in seconds), i.e. how long the HCI layer should wait before -disconnecting an inactive baseband connection. -.Bf -emphasis -This has not been implemented yet. -.Ef -.It Va net.bluetooth.hci.max_neighbor_age +.It net.bluetooth.hci.max_neighbor_age A read-write integer variable that controls time-to-live (in seconds) for -entries in the HCI neighbor cache. -Every time a Bluetooth device performs an +entries in the HCI neighbor cache. Every time a Bluetooth device performs +an .Dv Inquiry -operation, the results will be put in cache. -Later when a Bluetooth device -establishes a baseband connection, it will try to find the matching entry in -the cache and use it. -This might speed up establishment of the baseband +operation, the results will be put in cache. Later when a Bluetooth device +establishes a baseband connection, it will try to find the matching entry in +the cache and use it. This might speed up establishment of the baseband connection. -.It Va net.bluetooth.l2cap.rtx_timeout -A read-write integer variable that controls the Link Layer Control and -Adaptation Protocol (L2CAP) Retransmission Timeout (RTX) (in seconds). -Every time the L2CAP layer submits a control command, the RTX timeout is set. -The value of the RTX timeout should be greater or equal to the value of -the HCI connection timeout. -Be careful when changing this variable. -Make sure you understand what you are doing. -.It Va net.bluetooth.l2cap.ertx_timeout -A read-write integer variable that controls the L2CAP Extended Retransmission -Timeout (ERTX) (in seconds). -In some cases remote peer may respond with +.It net.bluetooth.l2cap.rtx_timeout +A read-write integer variable that controls the Link Layer Control and +Adaptation Protocol (L2CAP) Retransmission Timeout (RTX) (in seconds). +Every time the L2CAP layer submits a control command, the RTX timeout is set. +The value of the RTX timeout should be greater or equal to the value of +the HCI connection timeout. Be careful when changing this variable. Make +sure you understand what you are doing. +.It net.bluetooth.l2cap.ertx_timeout +A read-write integer variable that controls the L2CAP Extended Retransmission +Timeout (ERTX) (in seconds). In some cases remote peer may respond with .Dv PENDING -status to the L2CAP control command. -In this case the L2CAP command timeout is reset to the ERTX timeout value. -The value of the ERTX timeout should be -greater or equal to the value of the RTX timeout. -Be careful when changing this variable. -Make sure you understand what you are doing. +status to the L2CAP control command. In this case the L2CAP command timeout +is reset to the ERTX timeout value. The value of the ERTX timeout should be +greater or equal to the value of the RTX timeout. Be careful when changing +this variable. Make sure you understand what you are doing. .El .Sh SEE ALSO -.Xr ng_btsocket 4 , +.Xr sysctl 8 , .Xr ng_hci 4 , .Xr ng_l2cap 4 , -.Xr sysctl 8 +.Xr ng_btsocket 4 .Sh HISTORY The -.Nm +.Nm module was implemented in .Fx 5.0 . .Sh AUTHORS ==== //depot/projects/hammer/share/man/man4/ng_bt3c.4#3 (text+ko) ==== @@ -1,6 +1,8 @@ +.\" ng_bt3c.4 +.\" .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -9,7 +11,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -21,46 +23,40 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.\" -.\" $FreeBSD: src/share/man/man4/ng_bt3c.4,v 1.2 2002/12/13 10:38:42 ru Exp $ -.\" +.\" +.\" $Id: ng_bt3c.4,v 1.1 2002/11/24 19:37:54 max Exp $ +.\" $FreeBSD: src/share/man/man4/ng_bt3c.4,v 1.3 2003/05/10 21:44:37 julian Exp $ .Dd June 14, 2002 .Dt NG_BT3C 4 .Os .Sh NAME -.Nm ng_bt3c +.Nm BTCCC .Nd Netgraph node type that is also a 3Com Bluetooth PC card driver .Sh SYNOPSIS .In sys/types.h .In ng_bt3c.h .Sh DESCRIPTION The -.Nm btccc +.Nm BTCCC node type is both a persistent Netgraph node type and a driver for -3Com Bluetooth PC card (3CRWB6096-HP). -It implements a Bluetooth HCI +3Com Bluetooth PC card (3CRWB6096-HP). It implements a Bluetooth HCI UART transport layer as per chapter H4 of the Bluetooth Specification -Book v1.1. -A new node is created when the card is plugged. +Book v1.1. A new node is created when the card is plugged. .Pp In order to use the card one .Em MUST -download firmware first. -Due to copyright issues I will no longer provide firmware with the driver. -The firmware can be obtained -from the Windows driver package that can be downloaded from the 3COM web -site at no charge. -The firmware name is -.Pa BT3CPCC.BIN . -To load firmware into the card, use +download firmware first. Due to copyright issues I will no longer +provide firmware with the driver. The firmware can be obtained +from the Windows driver package that can be downloaded from the 3COM web +site at no charge. The firmware name is BT3CPCC.BIN. To load firmware +info the card use .Xr bt3cfw 8 . -I am using original firmware that came with the card on CD-ROM. +I'm using original firmware that came with the card on CD-ROM. +.Bd -literal -offset indent +MD5 (BT3CPCC.BIN) = 36170fda56ea9fdbf1702c966f8a97f1 +.Ed .Pp -.Dl "MD5 (BT3CPCC.BIN) = 36170fda56ea9fdbf1702c966f8a97f1" -.Pp -For -.Pa OLDCARD -systems the entry in +For OLDCARD systems the entry in .Xr pccard.conf 5 might look like this .Bd -literal -offset indent @@ -70,30 +66,29 @@ insert /usr/sbin/bt3cfw -n $device -f /etc/BT3CPCC.bin .Ed .Pp -Do not forget to load module and -.Dv SIGHUP +Do not forget to load module and SIGHUP .Xr pccardd 8 . .Pp The node has a single hook called .Dv hook . Incoming bytes received on the device are re-assembled into HCI frames -(according to the length). -Full HCI frames are sent out on the hook. -HCI frames received on +(according to the length). Full HCI frames are sent out on the hook. HCI +frames received on .Dv hook -are transmitted out. -No modification to the data is performed in either direction. +are transmitted out. No modification to the data is performed in +either direction. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width indent +.Pp +.Bl -tag -width foobar .It Dv hook single HCI frame contained in single -.Vt mbuf +.Dv mbuf structure. .El .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: -.Bl -tag -width indent +.Bl -tag -width foo .It Dv NGM_BT3C_NODE_GET_STATE Returns current receiving state for the node. .It Dv NGM_BT3C_NODE_GET_DEBUG @@ -102,15 +97,15 @@ This command takes an integer argument and sets current debug level for the node. .It Dv NGM_BT3C_NODE_GET_QLEN -This command takes a parameter that specifies queue number and returns +This command takes a parameter that specifies queue number and returns current length of the queue for the node. .It Dv NGM_BT3C_NODE_SET_QLEN -This command takes two parameters that specify queue number and and -maximum length of the queue and sets maximum length of the queue for +This command takes two parameters that specify queue number and and +maximum length of the queue and sets maximum length of the queue for the node. .It Dv NGM_BT3C_NODE_GET_STAT -Returns various statistic information for the node, such as: number of -bytes (frames) sent, number of bytes (frames) received and number of +Returns various statistic information for the node, such as: number of +bytes (frames) sent, number of bytes (frames) received and number of input (output) errors. .It Dv NGM_BT3C_NODE_RESET_STAT Reset all statistic counters to zero. @@ -120,22 +115,21 @@ .Sh SHUTDOWN This node shuts down when the corresponding card is un-plugged. .Sh BUGS -The driver is based on information obtained from -.An Jose Orlando Pereira Aq jop@di.uminho.pt >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun May 11 14:59:15 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A392137B401; Sun, 11 May 2003 14:59:14 -0700 (PDT) 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 51F0437B404 for ; Sun, 11 May 2003 14:59:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBFCF43F85 for ; Sun, 11 May 2003 14:59:13 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BLxD0U018125 for ; Sun, 11 May 2003 14:59:13 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BLxDsm018122 for perforce@freebsd.org; Sun, 11 May 2003 14:59:13 -0700 (PDT) Date: Sun, 11 May 2003 14:59:13 -0700 (PDT) Message-Id: <200305112159.h4BLxDsm018122@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30962 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 21:59:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=30962 Change 30962 by peter@peter_daintree on 2003/05/11 14:59:05 remove unnecessary casts. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#17 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#17 (text+ko) ==== @@ -1085,44 +1085,44 @@ /* Read-only from zero to physfree */ /* XXX not fully used, underneath 2M pages */ for (i = 0; (i << PAGE_SHIFT) < physfree; i++) { - ((pt_entry_t *)KPTphys)[i] = i << PAGE_SHIFT; - ((pt_entry_t *)KPTphys)[i] |= PG_RW | PG_V; + KPTphys[i] = i << PAGE_SHIFT; + KPTphys[i] |= PG_RW | PG_V; } /* Now map the page tables at their location within PTmap */ for (i = 0; i < NKPT; i++) { - ((pd_entry_t *)IdlePTD)[i + KPTDI] = KPTphys + (i << PAGE_SHIFT); - ((pd_entry_t *)IdlePTD)[i + KPTDI] |= PG_RW | PG_V; + IdlePTD[i + KPTDI] = KPTphys + (i << PAGE_SHIFT); + IdlePTD[i + KPTDI] |= PG_RW | PG_V; } /* Map from zero to end of allocations under 2M pages */ /* This replaces some of the PTD entries above */ for (i = 0; (i << PDRSHIFT) < physfree; i++) { - ((pd_entry_t *)IdlePTD)[i] = i << PDRSHIFT; - ((pd_entry_t *)IdlePTD)[i] |= PG_RW | PG_V | PG_PS; + IdlePTD[i] = i << PDRSHIFT; + IdlePTD[i] |= PG_RW | PG_V | PG_PS; } /* Now map the page tables at their location within PTmap */ for (i = 0; i < NKPT; i++) { - ((pd_entry_t *)IdlePTD)[i] = KPTphys + (i << PAGE_SHIFT); - ((pd_entry_t *)IdlePTD)[i] |= PG_RW | PG_V; + IdlePTD[i] = KPTphys + (i << PAGE_SHIFT); + IdlePTD[i] |= PG_RW | PG_V; } /* Now map the PTD at the top of the PTmap (ie: PTD[]) */ for (i = 0; i < NPGPTD; i++) { - ((pd_entry_t *)IdlePTD)[i + PTDPTDI] = IdlePTD + (i << PAGE_SHIFT); - ((pd_entry_t *)IdlePTD)[i + PTDPTDI] |= PG_RW | PG_V; + IdlePTD[i + PTDPTDI] = IdlePTD + (i << PAGE_SHIFT); + IdlePTD[i + PTDPTDI] |= PG_RW | PG_V; } /* And connect up the PTD to the PDP */ for (i = 0; i < NPGPTD; i++) { - ((pdp_entry_t *)IdlePDP)[i] = IdlePTD + (i << PAGE_SHIFT); - ((pdp_entry_t *)IdlePDP)[i] |= PG_RW | PG_V | PG_U; + IdlePDP[i] = IdlePTD + (i << PAGE_SHIFT); + IdlePDP[i] |= PG_RW | PG_V | PG_U; } /* And connect up the PDP to the PML4 */ - ((pdp_entry_t *)IdlePML4)[0] = IdlePDP; - ((pdp_entry_t *)IdlePML4)[0] |= PG_RW | PG_V | PG_U; + IdlePML4[0] = IdlePDP; + IdlePML4[0] |= PG_RW | PG_V | PG_U; } void From owner-p4-projects@FreeBSD.ORG Sun May 11 15:01:18 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A04B237B404; Sun, 11 May 2003 15:01:17 -0700 (PDT) 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 3F5C337B401 for ; Sun, 11 May 2003 15:01:17 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEC8243FB1 for ; Sun, 11 May 2003 15:01:16 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BM1G0U018272 for ; Sun, 11 May 2003 15:01:16 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BM1GaJ018269 for perforce@freebsd.org; Sun, 11 May 2003 15:01:16 -0700 (PDT) Date: Sun, 11 May 2003 15:01:16 -0700 (PDT) Message-Id: <200305112201.h4BM1GaJ018269@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30963 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 22:01:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=30963 Change 30963 by peter@peter_daintree on 2003/05/11 15:00:34 Allow for KERNBASE to be >4G Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#18 edit .. //depot/projects/hammer/sys/amd64/include/md_var.h#8 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#18 (text+ko) ==== @@ -130,7 +130,7 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) int _udatasel, _ucodesel; -u_int atdevbase; +u_long atdevbase; u_int64_t modulep; /* phys addr of metadata table */ u_int64_t physfree; /* first free page after kernel */ ==== //depot/projects/hammer/sys/amd64/include/md_var.h#8 (text+ko) ==== @@ -37,7 +37,7 @@ */ extern long Maxmem; -extern u_int atdevbase; /* offset in virtual memory of ISA io mem */ +extern u_long atdevbase; /* offset in virtual memory of ISA io mem */ extern int busdma_swi_pending; extern u_int cpu_exthigh; extern u_int cpu_feature; From owner-p4-projects@FreeBSD.ORG Sun May 11 15:02:20 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A071037B404; Sun, 11 May 2003 15:02:19 -0700 (PDT) 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 4082937B401 for ; Sun, 11 May 2003 15:02:19 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA6B143F3F for ; Sun, 11 May 2003 15:02:18 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BM2I0U018313 for ; Sun, 11 May 2003 15:02:18 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BM2IWC018310 for perforce@freebsd.org; Sun, 11 May 2003 15:02:18 -0700 (PDT) Date: Sun, 11 May 2003 15:02:18 -0700 (PDT) Message-Id: <200305112202.h4BM2IWC018310@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30964 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 22:02:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=30964 Change 30964 by peter@peter_hammer on 2003/05/11 15:01:54 export PDPSHIFT and PML4SHIFT Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#6 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#6 (text+ko) ==== @@ -106,6 +106,8 @@ ASSYM(PAGE_SHIFT, PAGE_SHIFT); ASSYM(PAGE_MASK, PAGE_MASK); ASSYM(PDRSHIFT, PDRSHIFT); +ASSYM(PDPSHIFT, PDPSHIFT); +ASSYM(PML4SHIFT, PML4SHIFT); ASSYM(USRSTACK, USRSTACK); ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); ASSYM(KERNBASE, KERNBASE); From owner-p4-projects@FreeBSD.ORG Sun May 11 15:08:29 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F371537B404; Sun, 11 May 2003 15:08:28 -0700 (PDT) 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 2E5EE37B401 for ; Sun, 11 May 2003 15:08:28 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACB2943F3F for ; Sun, 11 May 2003 15:08:27 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BM8R0U019560 for ; Sun, 11 May 2003 15:08:27 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BM8RjB019557 for perforce@freebsd.org; Sun, 11 May 2003 15:08:27 -0700 (PDT) Date: Sun, 11 May 2003 15:08:27 -0700 (PDT) Message-Id: <200305112208.h4BM8RjB019557@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30966 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 22:08:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=30966 Change 30966 by peter@peter_hammer on 2003/05/11 15:07:38 Well, that was clever. I'd have sworn that I'd not only compiled this before, but booted it as well. Add back the rather necessary "unnecessary" casts. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#19 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#19 (text+ko) ==== @@ -1085,44 +1085,44 @@ /* Read-only from zero to physfree */ /* XXX not fully used, underneath 2M pages */ for (i = 0; (i << PAGE_SHIFT) < physfree; i++) { - KPTphys[i] = i << PAGE_SHIFT; - KPTphys[i] |= PG_RW | PG_V; + ((pt_entry_t *)KPTphys)[i] = i << PAGE_SHIFT; + ((pt_entry_t *)KPTphys)[i] |= PG_RW | PG_V; } /* Now map the page tables at their location within PTmap */ for (i = 0; i < NKPT; i++) { - IdlePTD[i + KPTDI] = KPTphys + (i << PAGE_SHIFT); - IdlePTD[i + KPTDI] |= PG_RW | PG_V; + ((pd_entry_t *)IdlePTD)[i + KPTDI] = KPTphys + (i << PAGE_SHIFT); + ((pd_entry_t *)IdlePTD)[i + KPTDI] |= PG_RW | PG_V; } /* Map from zero to end of allocations under 2M pages */ /* This replaces some of the PTD entries above */ for (i = 0; (i << PDRSHIFT) < physfree; i++) { - IdlePTD[i] = i << PDRSHIFT; - IdlePTD[i] |= PG_RW | PG_V | PG_PS; + ((pd_entry_t *)IdlePTD)[i] = i << PDRSHIFT; + ((pd_entry_t *)IdlePTD)[i] |= PG_RW | PG_V | PG_PS; } /* Now map the page tables at their location within PTmap */ for (i = 0; i < NKPT; i++) { - IdlePTD[i] = KPTphys + (i << PAGE_SHIFT); - IdlePTD[i] |= PG_RW | PG_V; + ((pd_entry_t *)IdlePTD)[i] = KPTphys + (i << PAGE_SHIFT); + ((pd_entry_t *)IdlePTD)[i] |= PG_RW | PG_V; } /* Now map the PTD at the top of the PTmap (ie: PTD[]) */ for (i = 0; i < NPGPTD; i++) { - IdlePTD[i + PTDPTDI] = IdlePTD + (i << PAGE_SHIFT); - IdlePTD[i + PTDPTDI] |= PG_RW | PG_V; + ((pd_entry_t *)IdlePTD)[i + PTDPTDI] = IdlePTD + (i << PAGE_SHIFT); + ((pd_entry_t *)IdlePTD)[i + PTDPTDI] |= PG_RW | PG_V; } /* And connect up the PTD to the PDP */ for (i = 0; i < NPGPTD; i++) { - IdlePDP[i] = IdlePTD + (i << PAGE_SHIFT); - IdlePDP[i] |= PG_RW | PG_V | PG_U; + ((pdp_entry_t *)IdlePDP)[i] = IdlePTD + (i << PAGE_SHIFT); + ((pdp_entry_t *)IdlePDP)[i] |= PG_RW | PG_V | PG_U; } /* And connect up the PDP to the PML4 */ - IdlePML4[0] = IdlePDP; - IdlePML4[0] |= PG_RW | PG_V | PG_U; + ((pdp_entry_t *)IdlePML4)[0] = IdlePDP; + ((pdp_entry_t *)IdlePML4)[0] |= PG_RW | PG_V | PG_U; } void From owner-p4-projects@FreeBSD.ORG Sun May 11 15:21:45 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1263337B404; Sun, 11 May 2003 15:21:45 -0700 (PDT) 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 A39FB37B401 for ; Sun, 11 May 2003 15:21:44 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49C6743F93 for ; Sun, 11 May 2003 15:21:44 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BMLi0U020133 for ; Sun, 11 May 2003 15:21:44 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BMLhUg020130 for perforce@freebsd.org; Sun, 11 May 2003 15:21:43 -0700 (PDT) Date: Sun, 11 May 2003 15:21:43 -0700 (PDT) Message-Id: <200305112221.h4BMLhUg020130@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30967 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 22:21:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=30967 Change 30967 by peter@peter_overcee on 2003/05/11 15:21:05 I dont know why I didn't think of this before. Duplicate the same 1GB window over the entire address space for ease of KERNBASE selection. Very easy. Affected files ... .. //depot/projects/hammer/sys/boot/i386/libi386/elf64_freebsd.c#15 edit Differences ... ==== //depot/projects/hammer/sys/boot/i386/libi386/elf64_freebsd.c#15 (text+ko) ==== @@ -86,20 +86,20 @@ bzero(PT3, PAGE_SIZE); bzero(PT2, PAGE_SIZE); - /* single PML4 entry */ - PT4[0] = (p4_entry_t)VTOP((uintptr_t)&PT3[0]); - PT4[0] |= PG_V | PG_RW | PG_U; + /* + * This is kinda brutal, but every single 1GB VM memory segment points to + * the same first 1GB of physical memory. But it is more than adequate. + */ + for (i = 0; i < 512; i++) { + /* Each slot of the level 4 pages points to the same level 3 page */ + PT4[i] = (p4_entry_t)VTOP((uintptr_t)&PT3[0]); + PT4[i] |= PG_V | PG_RW | PG_U; - /* Direct map 1GB at address zero */ - PT3[0] = (p3_entry_t)VTOP((uintptr_t)&PT2[0]); - PT3[0] |= PG_V | PG_RW | PG_U; + /* Each slot of the level 3 pages points to the same level 2 page */ + PT3[i] = (p3_entry_t)VTOP((uintptr_t)&PT2[0]); + PT3[i] |= PG_V | PG_RW | PG_U; - /* Direct map 1GB at KERNBASE (hardcoded for now) */ - PT3[1] = (p3_entry_t)VTOP((uintptr_t)&PT2[0]); - PT3[1] |= PG_V | PG_RW | PG_U; - - /* 512 PG_PS (2MB) page mappings for 1GB of direct mapping */ - for (i = 0; i < 512; i++) { + /* The level 2 page slots are mapped with 2MB pages for 1GB. */ PT2[i] = i * (2 * 1024 * 1024); PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; } From owner-p4-projects@FreeBSD.ORG Sun May 11 15:50:23 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 93CAD37B404; Sun, 11 May 2003 15:50:22 -0700 (PDT) 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 468A337B401 for ; Sun, 11 May 2003 15:50:22 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB39143FBF for ; Sun, 11 May 2003 15:50:21 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BMoL0U021365 for ; Sun, 11 May 2003 15:50:21 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BMoLKM021362 for perforce@freebsd.org; Sun, 11 May 2003 15:50:21 -0700 (PDT) Date: Sun, 11 May 2003 15:50:21 -0700 (PDT) Message-Id: <200305112250.h4BMoLKM021362@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30971 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 22:50:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=30971 Change 30971 by peter@peter_daintree on 2003/05/11 15:50:00 IFC @30970 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/elf_machdep.c#7 integrate .. //depot/projects/hammer/sys/amd64/amd64/exception.S#5 integrate .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#7 integrate .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#20 integrate .. //depot/projects/hammer/sys/amd64/amd64/pmap.c#7 integrate .. //depot/projects/hammer/sys/amd64/amd64/support.S#5 integrate .. //depot/projects/hammer/sys/amd64/amd64/trap.c#10 integrate .. //depot/projects/hammer/sys/boot/i386/libi386/elf64_freebsd.c#16 integrate .. //depot/projects/hammer/sys/i386/linux/linux_sysvec.c#8 integrate .. //depot/projects/hammer/usr.sbin/diskinfo/diskinfo.8#2 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/elf_machdep.c#7 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.14 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.15 2003/05/11 22:40:24 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#5 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.106 2003/05/08 00:05:00 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.107 2003/05/11 22:38:54 peter Exp $ */ #include @@ -199,7 +199,7 @@ * XXX The PCPU stuff is stubbed out right now... */ IDTVEC(fast_syscall) - /* swapgs */ + /* XXX swapgs */ movq %rsp,PCPU(SCRATCH_RSP) movq common_tss+COMMON_TSS_RSP0,%rsp /* Now emulate a trapframe. Ugh. */ @@ -255,7 +255,7 @@ movq TF_RIP(%rsp),%rcx /* original %rip */ movq TF_RSP(%rsp),%r9 /* user stack pointer */ movq %r9,%rsp /* original %rsp */ - /* swapgs */ + /* XXX swapgs */ sysretq 3: /* Requested full context restore, use doreti for that */ andq $~PCB_FULLCTX,PCB_FLAGS(%rax) ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#7 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.141 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.142 2003/05/11 22:39:40 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#20 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.569 2003/05/10 00:49:56 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.570 2003/05/11 22:40:24 peter Exp $ */ #include "opt_atalk.h" ==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#7 (text+ko) ==== @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.406 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.407 2003/05/11 22:40:24 peter Exp $ */ /*- * Copyright (c) 2003 Networks Associates Technology, Inc. ==== //depot/projects/hammer/sys/amd64/amd64/support.S#5 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.98 2003/05/10 00:49:56 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.99 2003/05/11 22:38:54 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#10 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.253 2003/05/08 08:25:51 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.254 2003/05/11 22:40:25 peter Exp $ */ /* @@ -567,7 +567,8 @@ struct trapframe *frame; vm_offset_t eva; { - int code, type, ss, esp; + int code, type, ss; + long esp; struct soft_segment_descriptor softseg; code = frame->tf_err; @@ -594,7 +595,7 @@ ss = GSEL(GDATA_SEL, SEL_KPL); esp = (long)&frame->tf_rsp; } - printf("stack pointer = 0x%x:0x%x\n", ss, esp); + printf("stack pointer = 0x%x:0x%lx\n", ss, esp); printf("frame pointer = 0x%x:0x%lx\n", ss, frame->tf_rbp); printf("code segment = base 0x%lx, limit 0x%lx, type 0x%x\n", softseg.ssd_base, softseg.ssd_limit, softseg.ssd_type); ==== //depot/projects/hammer/sys/boot/i386/libi386/elf64_freebsd.c#16 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/i386/libi386/elf64_freebsd.c,v 1.12 2003/05/01 03:56:29 peter Exp $ + * $FreeBSD: src/sys/boot/i386/libi386/elf64_freebsd.c,v 1.13 2003/05/11 22:42:29 peter Exp $ */ #define __ELF_WORD_SIZE 64 ==== //depot/projects/hammer/sys/i386/linux/linux_sysvec.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.121 2003/04/17 22:18:07 jhb Exp $ + * $FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.122 2003/05/11 21:51:11 mdodd Exp $ */ /* XXX we use functions that might not exist. */ @@ -111,6 +111,8 @@ caddr_t *params); static void linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code); +static void exec_linux_setregs(struct thread *td, u_long entry, + u_long stack, u_long ps_strings); /* * Linux syscalls return negative errno's, we do positive and map them @@ -805,6 +807,23 @@ return(error); } +/* + * exec_setregs may initialize some registers differently than Linux + * does, thus potentially confusing Linux binaries. If necessary, we + * override the exec_setregs default(s) here. + */ +static void +exec_linux_setregs(struct thread *td, u_long entry, + u_long stack, u_long ps_strings) +{ + struct pcb *pcb = td->td_pcb; + + exec_setregs(td, entry, stack, ps_strings); + + /* Linux sets %gs to 0, we default to _udatasel */ + pcb->pcb_gs = 0; load_gs(0); +} + struct sysentvec linux_sysvec = { LINUX_SYS_MAXSYSCALL, linux_sysent, @@ -830,7 +849,7 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_linux_setregs }; struct sysentvec elf_linux_sysvec = { @@ -858,7 +877,7 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_linux_setregs }; static Elf32_Brandinfo linux_brand = { ==== //depot/projects/hammer/usr.sbin/diskinfo/diskinfo.8#2 (text+ko) ==== @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/usr.sbin/diskinfo/diskinfo.8,v 1.1 2003/04/09 10:52:10 phk Exp $ +.\" $FreeBSD: src/usr.sbin/diskinfo/diskinfo.8,v 1.2 2003/05/11 22:22:10 gordon Exp $ .\" .Dd April 9, 2003 .Dt DISKINFO 8 @@ -60,8 +60,8 @@ .Sh AUTHORS .An Poul-Henning Kamp .Sh BUGS -There are in order of increasing severity lies, -damn lines, statistics and computer benchmarks. +There are in order of increasing severity: lies, +damn lies, statistics, and computer benchmarks. .Sh HISTORY .The .Nm From owner-p4-projects@FreeBSD.ORG Sun May 11 15:51:25 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A919F37B404; Sun, 11 May 2003 15:51:24 -0700 (PDT) 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 5E9CF37B401 for ; Sun, 11 May 2003 15:51:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBD1743FB1 for ; Sun, 11 May 2003 15:51:23 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BMpN0U021450 for ; Sun, 11 May 2003 15:51:23 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BMpNkF021447 for perforce@freebsd.org; Sun, 11 May 2003 15:51:23 -0700 (PDT) Date: Sun, 11 May 2003 15:51:23 -0700 (PDT) Message-Id: <200305112251.h4BMpNkF021447@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30972 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 22:51:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=30972 Change 30972 by peter@peter_daintree on 2003/05/11 15:51:07 IFC @30970 Affected files ... .. //depot/projects/hammer/lib/libc/amd64/gen/ldexp.c#5 integrate Differences ... ==== //depot/projects/hammer/lib/libc/amd64/gen/ldexp.c#5 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Sun May 11 15:59:37 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AFA5F37B404; Sun, 11 May 2003 15:59:36 -0700 (PDT) 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 3ED0937B401 for ; Sun, 11 May 2003 15:59:36 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA65143FCB for ; Sun, 11 May 2003 15:59:35 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BMxZ0U022106 for ; Sun, 11 May 2003 15:59:35 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BMxZLs022103 for perforce@freebsd.org; Sun, 11 May 2003 15:59:35 -0700 (PDT) Date: Sun, 11 May 2003 15:59:35 -0700 (PDT) Message-Id: <200305112259.h4BMxZLs022103@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30975 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 22:59:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=30975 Change 30975 by peter@peter_daintree on 2003/05/11 15:59:18 IFC @30974 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#21 integrate .. //depot/projects/hammer/sys/amd64/amd64/trap.c#11 integrate .. //depot/projects/hammer/sys/amd64/include/md_var.h#9 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#21 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.570 2003/05/11 22:40:24 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.571 2003/05/11 22:53:42 peter Exp $ */ #include "opt_atalk.h" ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#11 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.254 2003/05/11 22:40:25 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.255 2003/05/11 22:55:40 peter Exp $ */ /* ==== //depot/projects/hammer/sys/amd64/include/md_var.h#9 (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/amd64/include/md_var.h,v 1.64 2003/05/10 00:51:29 peter Exp $ + * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.65 2003/05/11 22:53:43 peter Exp $ */ #ifndef _MACHINE_MD_VAR_H_ From owner-p4-projects@FreeBSD.ORG Sun May 11 16:03:43 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1073837B404; Sun, 11 May 2003 16:03:43 -0700 (PDT) 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 B705737B401 for ; Sun, 11 May 2003 16:03:42 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BEDC43FAF for ; Sun, 11 May 2003 16:03:42 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BN3g0U023371 for ; Sun, 11 May 2003 16:03:42 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BN3feE023368 for perforce@freebsd.org; Sun, 11 May 2003 16:03:41 -0700 (PDT) Date: Sun, 11 May 2003 16:03:41 -0700 (PDT) Message-Id: <200305112303.h4BN3feE023368@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30977 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 23:03:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=30977 Change 30977 by peter@peter_daintree on 2003/05/11 16:02:52 IFC @30976 (cvs diff reduction merge-o-tron) Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/identcpu.c#8 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/identcpu.c#8 (text+ko) ==== @@ -38,7 +38,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.123 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.124 2003/05/11 23:01:04 peter Exp $ */ #include "opt_cpu.h" From owner-p4-projects@FreeBSD.ORG Sun May 11 18:18:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 150BA37B401; Sun, 11 May 2003 18:18:31 -0700 (PDT) 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 A0AE537B404 for ; Sun, 11 May 2003 18:18:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BB1543FD7 for ; Sun, 11 May 2003 18:18:29 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4C1IT0U035841 for ; Sun, 11 May 2003 18:18:29 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4C1IT5N035838 for perforce@freebsd.org; Sun, 11 May 2003 18:18:29 -0700 (PDT) Date: Sun, 11 May 2003 18:18:29 -0700 (PDT) Message-Id: <200305120118.h4C1IT5N035838@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30984 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 01:18:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=30984 Change 30984 by peter@peter_hammer on 2003/05/11 18:17:36 Use swapgs. Ouch; this is hairy. We have to avoid doing it a second time when trapping from kernel context, so check the frame's TF_CS to see if we're coming from kernel context. This means converting *all* the trap gates to interrupt gates so that we can do the swapgs without the risk of an intermediate interrupt firing after entering supervisor mode but before swapgs. This means that we have to undo the effects of the interrupt gate when we really want the trap gate. Ugh. The other option is to have the regular entry points use the rdmsr/wrmsr stuff to save/restore the %GS.base etc *in the trap handlers*! and load the kernel %gs values and leave swapgs for the fast syscall stuff. I'll do a time comparison later to see if this is infact faster. Update comments. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/exception.S#6 edit .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#22 edit .. //depot/projects/hammer/sys/amd64/isa/icu_vector.S#2 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#6 (text+ko) ==== @@ -51,16 +51,16 @@ /* * Trap and fault vector routines. * - * Most traps are 'trap gates', SDT_SYS386TGT. A trap gate pushes state on - * the stack that mostly looks like an interrupt, but does not disable - * interrupts. A few of the traps we are use are interrupt gates, - * SDT_SYS386IGT, which are nearly the same thing except interrupts are - * disabled on entry. + * All traps are 'interrupt gates', SDT_SYSIGT. An interrupt gate pushes + * state on the stack but also disables interrupts. This is important for + * us for the use of the swapgs instruction. We cannot be interrupted + * until the GS.base value is correct. For most traps, we automatically + * then enable interrupts if the interrupted context had them enabled. + * This is equivalent to the i386 port's use of SDT_SYS386TGT. * * The cpu will push a certain amount of state onto the kernel stack for - * the current process. The amount of state depends on the type of trap - * and whether the trap crossed rings or not. See i386/include/frame.h. - * At the very least the current EFLAGS (status register, which includes + * the current process. See amd64/include/frame.h. + * This includes the current RFLAGS (status register, which includes * the interrupt disable state prior to the trap), the code segment register, * and the return instruction pointer are pushed by the cpu. The cpu * will also push an 'error' code for certain traps. We push a dummy @@ -75,6 +75,7 @@ #define IDTVEC(name) ALIGN_TEXT; .globl __CONCAT(X,name); \ .type __CONCAT(X,name),@function; __CONCAT(X,name): #define TRAP(a) pushq $(a) ; jmp alltraps +#define TRAP_NOEN(a) pushq $(a) ; jmp alltraps_noen MCOUNT_LABEL(user) MCOUNT_LABEL(btrap) @@ -82,11 +83,11 @@ IDTVEC(div) pushq $0; TRAP(T_DIVIDE) IDTVEC(dbg) - pushq $0; TRAP(T_TRCTRAP) + pushq $0; TRAP_NOEN(T_TRCTRAP) IDTVEC(nmi) pushq $0; TRAP(T_NMI) IDTVEC(bpt) - pushq $0; TRAP(T_BPTFLT) + pushq $0; TRAP_NOEN(T_BPTFLT) IDTVEC(ofl) pushq $0; TRAP(T_OFLOW) IDTVEC(bnd) @@ -106,7 +107,7 @@ IDTVEC(prot) TRAP(T_PROTFLT) IDTVEC(page) - TRAP(T_PAGEFLT) + TRAP_NOEN(T_PAGEFLT) IDTVEC(mchk) pushq $0; TRAP(T_MCHK) IDTVEC(rsvd) @@ -119,10 +120,9 @@ pushq $0; TRAP(T_XMMFLT) /* - * alltraps entry point. Interrupts are enabled if this was a trap - * gate (TGT), else disabled if this was an interrupt gate (IGT). - * Note that int0x80_syscall is a trap gate. Only page faults - * use an interrupt gate. + * alltraps entry point. Use swapgs if this is the first time in the + * kernel from userland. Reenable interrupts if they were enabled + * before the trap. This approximates SDT_SYS386TGT on the i386 port. */ SUPERALIGN_TEXT @@ -130,6 +130,14 @@ .type alltraps,@function alltraps: subq $TF_TRAPNO,%rsp /* tf_err and tf_trapno already pushed */ + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz alltraps_testi /* already running with kernel GS.base */ + swapgs +alltraps_testi: + testl $PSL_I,TF_RFLAGS(%rsp) + jz alltraps_pushregs + sti +alltraps_pushregs: movq %rdi,TF_RDI(%rsp) movq %rsi,TF_RSI(%rsp) movq %rdx,TF_RDX(%rsp) @@ -153,22 +161,43 @@ MEXITCOUNT jmp doreti /* Handle any pending ASTs */ + /* + * alltraps_noen entry point. Unlike alltraps above, we want to + * leave the interrupts disabled. This corresponds to + * SDT_SYS386IGT on the i386 port. + */ + SUPERALIGN_TEXT + .globl alltraps_noen + .type alltraps_noen,@function +alltraps_noen: + subq $TF_TRAPNO,%rsp /* tf_err and tf_trapno already pushed */ + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz alltraps_pushregs /* already running with kernel GS.base */ + swapgs + jmp alltraps_pushregs + +IDTVEC(dblfault) + pushq $T_DOUBLEFLT + subq $TF_TRAPNO,%rsp /* tf_err and tf_trapno already pushed */ + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz 1f /* already running with kernel GS.base */ + swapgs +1: call dblfault_handler +2: hlt + jmp 2b + /* * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) * - * Even though the name says 'int0x80', this is actually a TGT (trap gate) - * rather then an IGT (interrupt gate). Thus interrupts are enabled on - * entry just as they are for a normal syscall. - * - * This leaves a place to put eflags so that the call frame can be - * converted to a trap frame. Note that the eflags is (semi-)bogusly - * pushed into (what will be) tf_err and then copied later into the - * final spot. It has to be done this way because esp can't be just - * temporarily altered for the pushfl - an interrupt might come in - * and clobber the saved cs/eip. + * This is a SDT_SYSIDT entry point (unlike the i386 port) so that we + * can do a swapgs before enabling interrupts. This is critical because + * if we took an interrupt before swapgs, the interrupt code would see + * that it originated in supervisor mode and skip the swapgs. */ SUPERALIGN_TEXT IDTVEC(int0x80_syscall) + swapgs + sti pushq $2 /* sizeof "int 0x80" */ subq $TF_ERR,%rsp /* skip over tf_trapno */ movq %rdi,TF_RDI(%rsp) @@ -196,19 +225,21 @@ * and the new privilige level. We are still running on the old user stack * pointer. We have to juggle a few things around to find our stack etc. * swapgs gives us access to our PCPU space only. - * XXX The PCPU stuff is stubbed out right now... */ IDTVEC(fast_syscall) - /* XXX swapgs */ + swapgs movq %rsp,PCPU(SCRATCH_RSP) movq common_tss+COMMON_TSS_RSP0,%rsp /* Now emulate a trapframe. Ugh. */ subq $TF_SIZE,%rsp - movq $KUDSEL,TF_SS(%rsp) /* defer TF_RSP till we have a spare register */ movq %r11,TF_RFLAGS(%rsp) + movq %rcx,TF_RIP(%rsp) /* %rcx original value is in %r10 */ + movq PCPU(SCRATCH_RSP),%r11 /* %r11 already saved */ + movq %r11,TF_RSP(%rsp) /* user stack pointer */ + sti + movq $KUDSEL,TF_SS(%rsp) movq $KUCSEL,TF_CS(%rsp) - movq %rcx,TF_RIP(%rsp) /* %rcx original value is in %r10 */ movq $2,TF_ERR(%rsp) movq %rdi,TF_RDI(%rsp) /* arg 1 */ movq %rsi,TF_RSI(%rsp) /* arg 2 */ @@ -223,14 +254,10 @@ movq %r13,TF_R13(%rsp) /* C preserved */ movq %r14,TF_R14(%rsp) /* C preserved */ movq %r15,TF_R15(%rsp) /* C preserved */ - movq PCPU(SCRATCH_RSP),%r12 /* %r12 already saved */ - movq %r12,TF_RSP(%rsp) /* user stack pointer */ - sti call syscall movq PCPU(CURPCB),%rax testq $PCB_FULLCTX,PCB_FLAGS(%rax) jne 3f - /* simplified from doreti */ 1: /* Check for and handle AST's on return to userland */ cli movq PCPU(CURTHREAD),%rax @@ -255,7 +282,7 @@ movq TF_RIP(%rsp),%rcx /* original %rip */ movq TF_RSP(%rsp),%r9 /* user stack pointer */ movq %r9,%rsp /* original %rsp */ - /* XXX swapgs */ + swapgs sysretq 3: /* Requested full context restore, use doreti for that */ andq $~PCB_FULLCTX,PCB_FLAGS(%rax) @@ -344,12 +371,16 @@ movq TF_R13(%rsp),%r13 movq TF_R14(%rsp),%r14 movq TF_R15(%rsp),%r15 - addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz 1f /* keep running with kernel GS.base */ + cli + swapgs +1: addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ .globl doreti_iret doreti_iret: iretq - /* + /* * doreti_iret_fault and friends. Alternative return code for * the case where we get a fault in the doreti_exit code * above. trap() (i386/i386/trap.c) catches this specific @@ -360,7 +391,13 @@ .globl doreti_iret_fault doreti_iret_fault: subq $TF_RIP,%rsp /* space including tf_err, tf_trapno */ - movq %rdi,TF_RDI(%rsp) + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz 1f /* already running with kernel GS.base */ + swapgs +1: testl $PSL_I,TF_RFLAGS(%rsp) + jz 2f + sti +2: movq %rdi,TF_RDI(%rsp) movq %rsi,TF_RSI(%rsp) movq %rdx,TF_RDX(%rsp) movq %rcx,TF_RCX(%rsp) ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#22 (text+ko) ==== @@ -654,7 +654,7 @@ IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm), IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot), IDTVEC(page), IDTVEC(mchk), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), - IDTVEC(xmm), IDTVEC(int0x80_syscall), + IDTVEC(xmm), IDTVEC(dblfault), IDTVEC(int0x80_syscall), IDTVEC(fast_syscall), IDTVEC(fast_syscall32); void @@ -1182,9 +1182,9 @@ lgdt(&r_gdt); pc = &__pcpu; - wrmsr(MSR_FSBASE, (u_int64_t)pc); + wrmsr(MSR_FSBASE, 0); /* User value */ wrmsr(MSR_GSBASE, (u_int64_t)pc); - wrmsr(MSR_KGSBASE, (u_int64_t)pc); + wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ pcpu_init(pc, 0, sizeof(struct pcpu)); PCPU_SET(prvspace, pc); @@ -1204,28 +1204,28 @@ /* exceptions */ for (x = 0; x < NIDT; x++) - setidt(x, &IDTVEC(rsvd), SDT_SYSTGT, SEL_KPL, 0); - setidt(0, &IDTVEC(div), SDT_SYSTGT, SEL_KPL, 0); + setidt(x, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); + setidt(0, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); setidt(1, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); - setidt(2, &IDTVEC(nmi), SDT_SYSTGT, SEL_KPL, 0); + setidt(2, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0); setidt(3, &IDTVEC(bpt), SDT_SYSIGT, SEL_KPL, 0); - setidt(4, &IDTVEC(ofl), SDT_SYSTGT, SEL_KPL, 0); - setidt(5, &IDTVEC(bnd), SDT_SYSTGT, SEL_KPL, 0); - setidt(6, &IDTVEC(ill), SDT_SYSTGT, SEL_KPL, 0); - setidt(7, &IDTVEC(dna), SDT_SYSTGT, SEL_KPL, 0); - setidt(8, (inthand_t *)dblfault_handler, SDT_SYSIGT, SEL_KPL, 1); - setidt(9, &IDTVEC(fpusegm), SDT_SYSTGT, SEL_KPL, 0); - setidt(10, &IDTVEC(tss), SDT_SYSTGT, SEL_KPL, 0); - setidt(11, &IDTVEC(missing), SDT_SYSTGT, SEL_KPL, 0); - setidt(12, &IDTVEC(stk), SDT_SYSTGT, SEL_KPL, 0); - setidt(13, &IDTVEC(prot), SDT_SYSTGT, SEL_KPL, 0); + setidt(4, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); + setidt(5, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); + setidt(6, &IDTVEC(ill), SDT_SYSIGT, SEL_KPL, 0); + setidt(7, &IDTVEC(dna), SDT_SYSIGT, SEL_KPL, 0); + setidt(8, &IDTVEC(dblfault), SDT_SYSIGT, SEL_KPL, 1); + setidt(9, &IDTVEC(fpusegm), SDT_SYSIGT, SEL_KPL, 0); + setidt(10, &IDTVEC(tss), SDT_SYSIGT, SEL_KPL, 0); + setidt(11, &IDTVEC(missing), SDT_SYSIGT, SEL_KPL, 0); + setidt(12, &IDTVEC(stk), SDT_SYSIGT, SEL_KPL, 0); + setidt(13, &IDTVEC(prot), SDT_SYSIGT, SEL_KPL, 0); setidt(14, &IDTVEC(page), SDT_SYSIGT, SEL_KPL, 0); - setidt(15, &IDTVEC(rsvd), SDT_SYSTGT, SEL_KPL, 0); - setidt(16, &IDTVEC(fpu), SDT_SYSTGT, SEL_KPL, 0); - setidt(17, &IDTVEC(align), SDT_SYSTGT, SEL_KPL, 0); - setidt(18, &IDTVEC(mchk), SDT_SYSTGT, SEL_KPL, 0); - setidt(19, &IDTVEC(xmm), SDT_SYSTGT, SEL_KPL, 0); - setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSTGT, SEL_UPL, 0); + setidt(15, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); + setidt(16, &IDTVEC(fpu), SDT_SYSIGT, SEL_KPL, 0); + setidt(17, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0); + setidt(18, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0); + setidt(19, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0); + setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0); r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (long) idt; @@ -1251,8 +1251,6 @@ /* make an initial tss so cpu can get interrupt stack on syscall! */ common_tss.tss_rsp0 = thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb); - /* XXX we need to update tss_rsp0 in cpu_switch */ - /* XXX maybe not yet, everything is still running in supervisor mode */ /* doublefault stack space, runs on ist1 */ common_tss.tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)]; ==== //depot/projects/hammer/sys/amd64/isa/icu_vector.S#2 (text+ko) ==== @@ -25,7 +25,10 @@ SUPERALIGN_TEXT ; \ IDTVEC(vec_name) ; \ subq $TF_RIP,%rsp ; /* skip dummy tf_err and tf_trapno */ \ - movq %rdi,TF_RDI(%rsp) ; \ + testb $SEL_RPL_MASK,TF_CS(%rsp) ; /* come from kernel? */ \ + jz 1f ; /* Yes, dont swapgs again */ \ + swapgs ; \ +1: movq %rdi,TF_RDI(%rsp) ; \ movq %rsi,TF_RSI(%rsp) ; \ movq %rdx,TF_RDX(%rsp) ; \ movq %rcx,TF_RCX(%rsp) ; \ @@ -69,7 +72,10 @@ SUPERALIGN_TEXT ; \ IDTVEC(vec_name) ; \ subq $TF_RIP,%rsp ; /* skip dummy tf_err and tf_trapno */ \ - movq %rdi,TF_RDI(%rsp) ; \ + testb $SEL_RPL_MASK,TF_CS(%rsp) ; /* come from kernel? */ \ + jz 1f ; /* Yes, dont swapgs again */ \ + swapgs ; \ +1: movq %rdi,TF_RDI(%rsp) ; \ movq %rsi,TF_RSI(%rsp) ; \ movq %rdx,TF_RDX(%rsp) ; \ movq %rcx,TF_RCX(%rsp) ; \ From owner-p4-projects@FreeBSD.ORG Sun May 11 19:03:26 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2D3F737B404; Sun, 11 May 2003 19:03:26 -0700 (PDT) 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 BC5B637B401 for ; Sun, 11 May 2003 19:03:25 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48DB243F93 for ; Sun, 11 May 2003 19:03:25 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4C23P0U038905 for ; Sun, 11 May 2003 19:03:25 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4C23OtD038902 for perforce@freebsd.org; Sun, 11 May 2003 19:03:24 -0700 (PDT) Date: Sun, 11 May 2003 19:03:24 -0700 (PDT) Message-Id: <200305120203.h4C23OtD038902@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30986 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 02:03:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=30986 Change 30986 by peter@peter_hammer on 2003/05/11 19:02:49 Implement userland %fs and %gs. It uses a sysarch() to get and set the 64 bit base addresses. Unfortunately, setting the %fs and %gs selectors directly in userland gives you a truncated 32 bit base value which isn't entirely useful. But that is unpriviliged, while the wrmsr() calls *are* priviliged. Hence the sysarch syscall. Presumably these could also be maintained via get/setcontext. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#2 edit .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#8 edit .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#23 edit .. //depot/projects/hammer/sys/amd64/amd64/sys_machdep.c#6 edit .. //depot/projects/hammer/sys/amd64/include/pcb.h#6 edit .. //depot/projects/hammer/sys/amd64/include/sysarch.h#6 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#2 (text+ko) ==== @@ -92,27 +92,39 @@ jz badsw2 /* no, panic */ #endif - movq TD_PCB(%rdi),%rdx + movq TD_PCB(%rdi),%r8 movq (%rsp),%rax /* Hardware registers */ - movq %rax,PCB_RIP(%rdx) - movq %rbx,PCB_RBX(%rdx) - movq %rsp,PCB_RSP(%rdx) - movq %rbp,PCB_RBP(%rdx) - movq %r12,PCB_R12(%rdx) - movq %r13,PCB_R13(%rdx) - movq %r14,PCB_R14(%rdx) - movq %r15,PCB_R15(%rdx) + movq %rax,PCB_RIP(%r8) + movq %rbx,PCB_RBX(%r8) + movq %rsp,PCB_RSP(%r8) + movq %rbp,PCB_RBP(%r8) + movq %r12,PCB_R12(%r8) + movq %r13,PCB_R13(%r8) + movq %r14,PCB_R14(%r8) + movq %r15,PCB_R15(%r8) pushfq /* PSL */ - popq PCB_RFLAGS(%rdx) + popq PCB_RFLAGS(%r8) + + /* Save userland %fs */ + movl $MSR_FSBASE,%ecx + rdmsr + movl %eax,PCB_FSBASE(%r8) + movl %edx,PCB_FSBASE+4(%r8) + + /* Save userland %gs */ + movl $MSR_KGSBASE,%ecx + rdmsr + movl %eax,PCB_GSBASE(%r8) + movl %edx,PCB_GSBASE+4(%r8) /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) jne 1f pushq %rdi pushq %rsi - addq $PCB_SAVEFPU,%rdx /* h/w bugs make saving complicated */ - movq %rdx, %rdi + addq $PCB_SAVEFPU,%r8 /* h/w bugs make saving complicated */ + movq %r8, %rdi call npxsave /* do it in a big C function */ popq %rsi popq %rdi @@ -123,12 +135,12 @@ testq %rsi,%rsi /* no thread? */ jz badsw3 /* no, panic */ #endif - movq TD_PCB(%rsi),%rdx + movq TD_PCB(%rsi),%r8 xorq %rax, %rax movl PCPU(CPUID), %eax /* switch address space */ - movq PCB_CR3(%rdx),%rdx + movq PCB_CR3(%r8),%rdx movq %rdx,%cr3 /* new address space */ /* Release bit from old pmap->pm_active */ @@ -146,26 +158,38 @@ * At this point, we've switched address spaces and are ready * to load up the rest of the next context. */ - movq TD_PCB(%rsi),%rdx + movq TD_PCB(%rsi),%r8 + + /* Restore userland %fs */ + movl $MSR_FSBASE,%ecx + movl PCB_FSBASE(%r8),%eax + movl PCB_FSBASE+4(%r8),%edx + wrmsr + + /* Restore userland %gs */ + movl $MSR_KGSBASE,%ecx + movl PCB_GSBASE(%r8),%eax + movl PCB_GSBASE+4(%r8),%edx + wrmsr /* Update the TSS_RSP0 pointer for the next interrupt */ - leaq -16(%rdx), %rbx + leaq -16(%r8), %rbx movq %rbx, common_tss + COMMON_TSS_RSP0 /* Restore context. */ - movq PCB_RBX(%rdx),%rbx - movq PCB_RSP(%rdx),%rsp - movq PCB_RBP(%rdx),%rbp - movq PCB_R12(%rdx),%r12 - movq PCB_R13(%rdx),%r13 - movq PCB_R14(%rdx),%r14 - movq PCB_R15(%rdx),%r15 - movq PCB_RIP(%rdx),%rax + movq PCB_RBX(%r8),%rbx + movq PCB_RSP(%r8),%rsp + movq PCB_RBP(%r8),%rbp + movq PCB_R12(%r8),%r12 + movq PCB_R13(%r8),%r13 + movq PCB_R14(%r8),%r14 + movq PCB_R15(%r8),%r15 + movq PCB_RIP(%r8),%rax movq %rax,(%rsp) - pushq PCB_RFLAGS(%rdx) + pushq PCB_RFLAGS(%r8) popfq - movq %rdx, PCPU(CURPCB) + movq %r8, PCPU(CURPCB) movq %rsi, PCPU(CURTHREAD) /* into next thread */ ret ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#8 (text+ko) ==== @@ -70,6 +70,7 @@ #include #include #include +#include ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace)); ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); @@ -122,6 +123,8 @@ ASSYM(PCB_RBX, offsetof(struct pcb, pcb_rbx)); ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip)); ASSYM(PCB_RFLAGS, offsetof(struct pcb, pcb_rflags)); +ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); +ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_FULLCTX, PCB_FULLCTX); @@ -178,6 +181,8 @@ ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL)); ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL)); +ASSYM(MSR_FSBASE, MSR_FSBASE); +ASSYM(MSR_KGSBASE, MSR_KGSBASE); ASSYM(GPROC0_SEL, GPROC0_SEL); ASSYM(MTX_LOCK, offsetof(struct mtx, mtx_lock)); ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#23 (text+ko) ==== @@ -465,6 +465,12 @@ u_long ps_strings; { struct trapframe *regs = td->td_frame; + struct pcb *pcb = td->td_pcb; + + pcb->pcb_fsbase = 0; + pcb->pcb_gsbase = 0; + wrmsr(MSR_FSBASE, 0); + wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ bzero((char *)regs, sizeof(struct trapframe)); regs->tf_rip = entry; ==== //depot/projects/hammer/sys/amd64/amd64/sys_machdep.c#6 (text+ko) ==== @@ -40,6 +40,9 @@ #include #include #include +#include +#include +#include #ifndef _SYS_SYSPROTO_H_ struct sysarch_args { @@ -53,9 +56,30 @@ struct thread *td; register struct sysarch_args *uap; { - int error; + int error = 0; + struct pcb *pcb = curthread->td_pcb; switch(uap->op) { + case AMD64_GET_FSBASE: + error = copyout(&pcb->pcb_fsbase, uap->parms, sizeof(pcb->pcb_fsbase)); + break; + + case AMD64_SET_FSBASE: + error = copyin(uap->parms, &pcb->pcb_fsbase, sizeof(pcb->pcb_fsbase)); + if (!error) + wrmsr(MSR_FSBASE, pcb->pcb_fsbase); + break; + + case AMD64_GET_GSBASE: + error = copyout(&pcb->pcb_gsbase, uap->parms, sizeof(pcb->pcb_gsbase)); + break; + + case AMD64_SET_GSBASE: + error = copyin(uap->parms, &pcb->pcb_gsbase, sizeof(pcb->pcb_gsbase)); + if (!error) + wrmsr(MSR_KGSBASE, pcb->pcb_fsbase); + break; + default: error = EINVAL; break; ==== //depot/projects/hammer/sys/amd64/include/pcb.h#6 (text+ko) ==== @@ -57,6 +57,8 @@ register_t pcb_rbx; register_t pcb_rip; register_t pcb_rflags; + register_t pcb_fsbase; + register_t pcb_gsbase; struct savefpu pcb_save; u_long pcb_flags; ==== //depot/projects/hammer/sys/amd64/include/sysarch.h#6 (text+ko) ==== @@ -34,9 +34,27 @@ */ /* - * Architecture specific syscalls (i386) + * Architecture specific syscalls (AMD64) */ #ifndef _MACHINE_SYSARCH_H_ #define _MACHINE_SYSARCH_H_ +#define AMD64_GET_FSBASE 0 +#define AMD64_SET_FSBASE 1 +#define AMD64_GET_GSBASE 2 +#define AMD64_SET_GSBASE 3 + +#if 0 /* these wrappers need to be implemented in libc first */ +#ifndef _KERNEL +#include + +__BEGIN_DECLS +unsigned long amd64_get_fsbase(void); +unsigned long amd64_set_fsbase(unsigned long); +unsigned long amd64_get_gsbase(void); +unsigned long amd64_set_gsbase(unsigned long); +__END_DECLS +#endif +#endif + #endif /* !_MACHINE_SYSARCH_H_ */ From owner-p4-projects@FreeBSD.ORG Sun May 11 19:17:46 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DEF7A37B404; Sun, 11 May 2003 19:17:45 -0700 (PDT) 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 9455A37B401 for ; Sun, 11 May 2003 19:17:45 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAAF443FFB for ; Sun, 11 May 2003 19:17:43 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4C2Hh0U039763 for ; Sun, 11 May 2003 19:17:43 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4C2HhFB039760 for perforce@freebsd.org; Sun, 11 May 2003 19:17:43 -0700 (PDT) Date: Sun, 11 May 2003 19:17:43 -0700 (PDT) Message-Id: <200305120217.h4C2HhFB039760@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30988 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 02:17:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=30988 Change 30988 by peter@peter_hammer on 2003/05/11 19:17:42 IFC @30987 Affected files ... .. //depot/projects/hammer/share/man/man4/umass.4#6 integrate .. //depot/projects/hammer/sys/amd64/include/bus_amd64.h#1 branch .. //depot/projects/hammer/sys/dev/firewire/sbp.c#13 integrate .. //depot/projects/hammer/sys/dev/usb/umass.c#6 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs#9 integrate .. //depot/projects/hammer/usr.bin/stat/stat.1#3 integrate .. //depot/projects/hammer/usr.bin/stat/stat.c#4 integrate Differences ... ==== //depot/projects/hammer/share/man/man4/umass.4#6 (text+ko) ==== @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/umass.4,v 1.27 2003/04/07 11:26:54 murray Exp $ +.\" $FreeBSD: src/share/man/man4/umass.4,v 1.28 2003/05/11 23:55:27 joe Exp $ .\" .Dd May 3, 1999 .Dt UMASS 4 @@ -69,6 +69,13 @@ Sitecom CN-300 MultiFlash (MMC/SD, SmartMedia, CF, MemoryStick) .El .Pp +Among the supported digital cameras are: +.Pp +.Bl -item -compact +.It +Asahi Optical (PENTAX) Optio 230 & 330 +.El +.Pp .Nm usb and one of .Nm uhci ==== //depot/projects/hammer/sys/dev/firewire/sbp.c#13 (text+ko) ==== @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.50 2003/05/05 14:50:24 simokawa Exp $ + * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.51 2003/05/12 00:42:28 simokawa Exp $ * */ @@ -2304,10 +2304,18 @@ } SBP_DEBUG(1) printf("%s:%d:%d:%d:XPT_CALC_GEOMETRY: " +#if __FreeBSD_version >= 500000 "Volume size = %jd\n", - device_get_nameunit(sbp->fd.dev), cam_sim_path(sbp->sim), +#else + "Volume size = %d\n", +#endif + device_get_nameunit(sbp->fd.dev), + cam_sim_path(sbp->sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun, - (uintmax_t)ccg->volume_size); +#if __FreeBSD_version >= 500000 + (uintmax_t) +#endif + ccg->volume_size); END_DEBUG size_mb = ccg->volume_size ==== //depot/projects/hammer/sys/dev/usb/umass.c#6 (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/usb/umass.c,v 1.80 2003/04/14 14:28:17 ticso Exp $ + * $FreeBSD: src/sys/dev/usb/umass.c,v 1.81 2003/05/11 23:55:27 joe Exp $ * $NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp $ */ @@ -313,6 +313,11 @@ UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, RS_NO_CLEAR_UA }, + { USB_VENDOR_ASAHIOPTICAL, USB_PRODUCT_ASAHIOPTICAL_OPTIO330, + RID_WILDCARD, + UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, + RS_NO_CLEAR_UA + }, { USB_VENDOR_FUJIPHOTO, USB_PRODUCT_FUJIPHOTO_MASS0100, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, RS_NO_CLEAR_UA ==== //depot/projects/hammer/sys/dev/usb/usbdevs#9 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.123 2003/05/05 08:18:53 murray Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.124 2003/05/11 23:55:28 joe Exp $ /* * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -455,6 +455,7 @@ /* Asahi Optical products */ product ASAHIOPTICAL OPTIO230 0x0004 Digital camera +product ASAHIOPTICAL OPTIO330 0x0006 Digital camera /* ASIX Electronics products */ product ASIX AX88172 0x1720 USB 2.0 10/100 ethernet controller ==== //depot/projects/hammer/usr.bin/stat/stat.1#3 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $NetBSD: stat.1,v 1.5 2002/07/08 18:48:42 atatat Exp $ +.\" $NetBSD: stat.1,v 1.11 2003/05/08 13:07:10 wiz Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -34,9 +34,9 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/usr.bin/stat/stat.1,v 1.3 2002/08/13 20:07:36 dougb Exp $ +.\" $FreeBSD: src/usr.bin/stat/stat.1,v 1.4 2003/05/11 23:07:07 dougb Exp $ .\" -.Dd April 24, 2002 +.Dd May 8, 2003 .Dt STAT 1 .Os .Sh NAME @@ -65,14 +65,15 @@ .Ar file . Read, write or execute permissions of the named file are not required, but all directories listed in the path name leading to the file must be -searchable. If no argument is given, +searchable. +If no argument is given, .Nm displays information about the file descriptor for standard input. .Pp When invoked as .Nm readlink , -only the target of the symbolic link is printed. If the given argument -is not a symbolic link, +only the target of the symbolic link is printed. +If the given argument is not a symbolic link, .Nm readlink will print nothing and exit with an error. .Pp @@ -88,7 +89,8 @@ display a slash (/) immediately after each pathname that is a directory, an asterisk (*) after each that is executable, an at sign (@) after each symbolic link, a percent sign (%) after each whiteout, an equal sign (=) after each -socket, and a vertical bar (|) after each that is a FIFO. The use of +socket, and a vertical bar (|) after each that is a FIFO. +The use of .Fl F implies .Fl l . @@ -116,14 +118,16 @@ .Nm readlink , error messages are automatically suppressed. .It Fl f Ar format -Display information using the specified format. See the FORMATS section +Display information using the specified format. +See the FORMATS section for a description of valid formats. .It Fl l Display output in .Ic ls Fl lT format. .It Fl r -Display raw information. That is, for all the fields in the stat-structure, +Display raw information. +That is, for all the fields in the stat-structure, display the raw, numerical value (for example, times in seconds since the epoch, etc.) .It Fl s @@ -132,7 +136,8 @@ Display information in a more verbose way as known from some Linux distributions. .It Fl t Ar timefmt -Display timestamps using the specified format. This format is +Display timestamps using the specified format. +This format is passed directly to .Xr strftime 3 . .El @@ -143,7 +148,8 @@ .Cm % , are then followed by a sequence of formatting characters, and end in a character that selects the field of the struct stat which is to be -formatted. If the +formatted. +If the .Cm % is immediately followed by one of .Cm n , @@ -163,7 +169,8 @@ hexadecimal output will have ``0x'' prepended to it. .It Cm + Asserts that a sign indicating whether a number is positive or negative -should always be printed. Non-negative numbers are not usually printed +should always be printed. +Non-negative numbers are not usually printed with a sign. .It Cm - Aligns string output to the left of the field, instead of to the right. @@ -171,7 +178,8 @@ Sets the fill character for left padding to the 0 character, instead of a space. .It space -Reserves a space at the front of non-negative signed output fields. A +Reserves a space at the front of non-negative signed output fields. +A .Sq Cm + overrides a space if both are used. .El @@ -197,7 +205,8 @@ .Cm S . These represent signed decimal output, octal output, unsigned decimal output, hexadecimal output, floating point output, and string output, -respectively. Some output formats do not apply to all fields. +respectively. +Some output formats do not apply to all fields. Floating point output only applies to timespec fields (the .Cm a , .Cm m , @@ -208,7 +217,8 @@ The special output specifier .Cm S may be used to indicate that the output, if -applicable, should be in string format. May be used in combination with +applicable, should be in string format. +May be used in combination with .Bl -tag -width Ds .It Cm amc Display date in strftime(3) format. @@ -228,21 +238,24 @@ Displays the type of .Ar file . .It Cm Y -Insert a `` -\*[Gt] '' into the output. Note that the default output format +Insert a `` -\*[Gt] '' into the output. +Note that the default output format for .Cm Y is a string, but if specified explicitly, these four characters are prepended. .El .It Cm sub -An optional sub field specifier (high, middle, low). Only applies to +An optional sub field specifier (high, middle, low). +Only applies to the .Cm p , .Cm d , .Cm r , and .Cm T -output formats. It can be one of the following: +output formats. +It can be one of the following: .Bl -tag -width Ds .It Cm H ``High'' -- specifies the major number for devices from @@ -299,10 +312,11 @@ owner. .It Cm r Device number for character and block device special files. -.It Cm a , m , c +.It Cm a , m , c , B The time .Ar file -was last accessed, modified, or of when the inode was last changed. +was last accessed or modified, of when the inode was last changed, or +the birth time of the inode. .It Cm z The size of .Ar file @@ -340,8 +354,8 @@ .Pp Only the .Cm % -and the field specifier are required. Most field -specifiers default to +and the field specifier are required. +Most field specifiers default to .Cm U as an output form, with the exception of @@ -371,7 +385,7 @@ lrwxrwxrwx 1 jschauma cs 1 Apr 24 16:37:28 2002 /tmp/foo@ -\*[Gt] / \*[Gt] stat -LF /tmp/foo -lrwxrwxrwx 16 root wheel 512 Apr 19 10:57:54 2002 /tmp/foo/ +drwxr-xr-x 16 root wheel 512 Apr 19 10:57:54 2002 /tmp/foo/ .Ed .Pp To initialize some shell-variables, you could use the @@ -447,8 +461,9 @@ .Sh AUTHORS The .Nm -utility was written by Andrew Brown -.Aq atatat@netbsd.org . -This man page -was written by Jan Schaumann -.Aq jschauma@netbsd.org . +utility was written by +.An Andrew Brown +.Aq atatat@NetBSD.org . +This man page was written by +.An Jan Schaumann +.Aq jschauma@NetBSD.org . ==== //depot/projects/hammer/usr.bin/stat/stat.c#4 (text+ko) ==== @@ -34,14 +34,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include #if 0 #ifndef lint -__RCSID("$NetBSD: stat.c,v 1.9 2002/10/19 20:33:19 provos Exp $"); +__RCSID("$NetBSD: stat.c,v 1.10 2003/05/08 13:05:38 atatat Exp $"); #endif #endif -#include -__FBSDID("$FreeBSD: src/usr.bin/stat/stat.c,v 1.4 2002/10/25 07:26:36 dougb Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/stat/stat.c,v 1.5 2003/05/11 23:02:09 dougb Exp $"); #include #include @@ -58,14 +58,14 @@ #include #define DEF_FORMAT \ - "%d %i %Sp %l %Su %Sg %r %z \"%Sa\" \"%Sm\" \"%Sc\" %k %b %N" -#define RAW_FORMAT "%d %i %#p %l %u %g %r %z %a %m %c %k %b %N" + "%d %i %Sp %l %Su %Sg %r %z \"%Sa\" \"%Sm\" \"%Sc\" \"%SB\" %k %b %N" +#define RAW_FORMAT "%d %i %#p %l %u %g %r %z %a %m %c %B %k %b %N" #define LS_FORMAT "%Sp %l %Su %Sg %Z %Sm %N%SY" #define LSF_FORMAT "%Sp %l %Su %Sg %Z %Sm %N%T%SY" #define SHELL_FORMAT \ "st_dev=%d st_ino=%i st_mode=%#p st_nlink=%l " \ "st_uid=%u st_gid=%g st_rdev=%r st_size=%z " \ - "st_atimespec=%a st_mtimespec=%m st_ctimespec=%c " \ + "st_atime=%a st_mtime=%m st_ctime=%c st_birthtime=%B " \ "st_blksize=%k st_blocks=%b" #define LINUX_FORMAT \ " File: \"%N\"%n" \ @@ -129,6 +129,7 @@ #define SHOW_st_atime 'a' #define SHOW_st_mtime 'm' #define SHOW_st_ctime 'c' +#define SHOW_st_btime 'B' #define SHOW_st_size 'z' #define SHOW_st_blocks 'b' #define SHOW_st_blksize 'k' @@ -453,6 +454,7 @@ fmtcase(what, SHOW_st_atime); fmtcase(what, SHOW_st_mtime); fmtcase(what, SHOW_st_ctime); + fmtcase(what, SHOW_st_btime); fmtcase(what, SHOW_st_size); fmtcase(what, SHOW_st_blocks); fmtcase(what, SHOW_st_blksize); @@ -629,6 +631,10 @@ case SHOW_st_ctime: if (tsp == NULL) tsp = &st->st_ctimespec; + /* FALLTHROUGH */ + case SHOW_st_btime: + if (tsp == NULL) + tsp = &st->st_birthtimespec; ts = *tsp; /* copy so we can muck with it */ small = (sizeof(ts.tv_sec) == 4); data = ts.tv_sec; From owner-p4-projects@FreeBSD.ORG Sun May 11 19:40:13 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E71237B404; Sun, 11 May 2003 19:40:13 -0700 (PDT) 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 EB14B37B401 for ; Sun, 11 May 2003 19:40:12 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8179A43FE1 for ; Sun, 11 May 2003 19:40:12 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4C2eC0U040703 for ; Sun, 11 May 2003 19:40:12 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4C2eBnG040696 for perforce@freebsd.org; Sun, 11 May 2003 19:40:11 -0700 (PDT) Date: Sun, 11 May 2003 19:40:11 -0700 (PDT) Message-Id: <200305120240.h4C2eBnG040696@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30990 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 02:40:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=30990 Change 30990 by peter@peter_daintree on 2003/05/11 19:39:12 IFC @30989 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#3 integrate .. //depot/projects/hammer/sys/amd64/amd64/exception.S#7 integrate .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#9 integrate .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#24 integrate .. //depot/projects/hammer/sys/amd64/amd64/sys_machdep.c#7 integrate .. //depot/projects/hammer/sys/amd64/include/pcb.h#7 integrate .. //depot/projects/hammer/sys/amd64/include/sysarch.h#7 integrate .. //depot/projects/hammer/sys/amd64/isa/icu_vector.S#3 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#3 (text+ko) ==== @@ -33,7 +33,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.138 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.139 2003/05/12 02:37:28 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#7 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.107 2003/05/11 22:38:54 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.108 2003/05/12 02:37:28 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#9 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.142 2003/05/11 22:39:40 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.143 2003/05/12 02:37:29 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#24 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.571 2003/05/11 22:53:42 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.572 2003/05/12 02:37:29 peter Exp $ */ #include "opt_atalk.h" ==== //depot/projects/hammer/sys/amd64/amd64/sys_machdep.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 - * $FreeBSD: src/sys/amd64/amd64/sys_machdep.c,v 1.82 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/sys_machdep.c,v 1.83 2003/05/12 02:37:29 peter Exp $ * */ ==== //depot/projects/hammer/sys/amd64/include/pcb.h#7 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)pcb.h 5.10 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.50 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.51 2003/05/12 02:37:29 peter Exp $ */ #ifndef _I386_PCB_H_ ==== //depot/projects/hammer/sys/amd64/include/sysarch.h#7 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/sysarch.h,v 1.18 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/sysarch.h,v 1.19 2003/05/12 02:37:29 peter Exp $ */ /* ==== //depot/projects/hammer/sys/amd64/isa/icu_vector.S#3 (text+ko) ==== @@ -1,6 +1,6 @@ /* * from: vector.s, 386BSD 0.1 unknown origin - * $FreeBSD: src/sys/amd64/isa/icu_vector.S,v 1.38 2003/05/01 01:05:24 peter Exp $ + * $FreeBSD: src/sys/amd64/isa/icu_vector.S,v 1.39 2003/05/12 02:37:29 peter Exp $ */ #define IRQ_BIT(irq_num) (1 << ((irq_num) % 8)) From owner-p4-projects@FreeBSD.ORG Sun May 11 19:46:23 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CB9EE37B401; Sun, 11 May 2003 19:46:22 -0700 (PDT) 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 577A937B404 for ; Sun, 11 May 2003 19:46:22 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1352A43FD7 for ; Sun, 11 May 2003 19:46:21 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4C2kK0U041149 for ; Sun, 11 May 2003 19:46:21 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4C2kKAj041146 for perforce@freebsd.org; Sun, 11 May 2003 19:46:20 -0700 (PDT) Date: Sun, 11 May 2003 19:46:20 -0700 (PDT) Message-Id: <200305120246.h4C2kKAj041146@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30992 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 02:46:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=30992 Change 30992 by peter@peter_daintree on 2003/05/11 19:46:04 IFC @30991 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/nexus.c#6 integrate .. //depot/projects/hammer/sys/amd64/include/bus.h#6 integrate .. //depot/projects/hammer/sys/amd64/include/bus_amd64.h#2 integrate .. //depot/projects/hammer/sys/amd64/include/bus_at386.h#6 delete .. //depot/projects/hammer/sys/amd64/include/bus_dma.h#5 integrate .. //depot/projects/hammer/sys/amd64/include/bus_memio.h#5 integrate .. //depot/projects/hammer/sys/amd64/include/bus_pio.h#5 integrate .. //depot/projects/hammer/sys/dev/kbd/atkbdc.c#6 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/nexus.c#6 (text+ko) ==== @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.50 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.51 2003/05/12 02:44:37 peter Exp $ */ /* @@ -323,9 +323,9 @@ return 0; if (type == SYS_RES_MEMORY) { - rman_set_bustag(rv, I386_BUS_SPACE_MEM); + rman_set_bustag(rv, AMD64_BUS_SPACE_MEM); } else if (type == SYS_RES_IOPORT) { - rman_set_bustag(rv, I386_BUS_SPACE_IO); + rman_set_bustag(rv, AMD64_BUS_SPACE_IO); rman_set_bushandle(rv, rv->r_start); } @@ -346,7 +346,7 @@ /* * If this is a memory resource, map it into the kernel. */ - if (rman_get_bustag(r) == I386_BUS_SPACE_MEM) { + if (rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) { caddr_t vaddr = 0; if (rman_get_end(r) < 1024 * 1024) { @@ -378,7 +378,7 @@ /* * If this is a memory resource, unmap it. */ - if ((rman_get_bustag(r) == I386_BUS_SPACE_MEM) && + if ((rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) && (rman_get_end(r) >= 1024 * 1024)) { u_int32_t psize; ==== //depot/projects/hammer/sys/amd64/include/bus.h#6 (text+ko) ==== @@ -28,17 +28,17 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/bus.h,v 1.11 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/bus.h,v 1.12 2003/05/12 02:44:37 peter Exp $ */ -#ifndef _I386_BUS_H_ -#define _I386_BUS_H_ +#ifndef _AMD64_BUS_H_ +#define _AMD64_BUS_H_ -#include +#include #include /* - * Stream accesses are the same as normal accesses on i386; there are no + * Stream accesses are the same as normal accesses on amd64; there are no * supported bus systems with an endianess different from the host one. */ #define bus_space_read_stream_1(t, h, o) bus_space_read_1((t), (h), (o)) @@ -101,4 +101,4 @@ #define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ bus_space_copy_region_4((t), (h1), (o1), (h2), (o2), (c)) -#endif /* _I386_BUS_H_ */ +#endif /* _AMD64_BUS_H_ */ ==== //depot/projects/hammer/sys/amd64/include/bus_amd64.h#2 (text+ko) ==== @@ -67,10 +67,10 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.23 2003/05/01 01:05:23 peter Exp $ */ +/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.24 2003/05/12 02:44:37 peter Exp $ */ -#ifndef _I386_BUS_AT386_H_ -#define _I386_BUS_AT386_H_ +#ifndef _AMD64_BUS_AMD64_H_ +#define _AMD64_BUS_AMD64_H_ #include @@ -78,16 +78,16 @@ * To remain compatible with NetBSD's interface, default to both memio and * pio when neither of them is defined. */ -#if !defined(_I386_BUS_PIO_H_) && !defined(_I386_BUS_MEMIO_H_) -#define _I386_BUS_PIO_H_ -#define _I386_BUS_MEMIO_H_ +#if !defined(_AMD64_BUS_PIO_H_) && !defined(_AMD64_BUS_MEMIO_H_) +#define _AMD64_BUS_PIO_H_ +#define _AMD64_BUS_MEMIO_H_ #endif /* - * Values for the i386 bus space tag, not to be used directly by MI code. + * Values for the amd64 bus space tag, not to be used directly by MI code. */ -#define I386_BUS_SPACE_IO 0 /* space is i/o space */ -#define I386_BUS_SPACE_MEM 1 /* space is mem space */ +#define AMD64_BUS_SPACE_IO 0 /* space is i/o space */ +#define AMD64_BUS_SPACE_MEM 1 /* space is mem space */ /* * Bus address and size types @@ -175,7 +175,7 @@ } -#if defined(_I386_BUS_PIO_H_) || defined(_I386_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) || defined(_AMD64_BUS_MEMIO_H_) /* * Read a 1, 2, 4, or 8 byte quantity from bus space @@ -197,13 +197,13 @@ bus_space_read_1(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t offset) { -#if defined (_I386_BUS_PIO_H_) -#if defined (_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined (_AMD64_BUS_PIO_H_) +#if defined (_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif return (inb(handle + offset)); #endif -#if defined (_I386_BUS_MEMIO_H_) +#if defined (_AMD64_BUS_MEMIO_H_) return (*(volatile u_int8_t *)(handle + offset)); #endif } @@ -212,13 +212,13 @@ bus_space_read_2(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t offset) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif return (inw(handle + offset)); #endif -#if defined(_I386_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) return (*(volatile u_int16_t *)(handle + offset)); #endif } @@ -227,13 +227,13 @@ bus_space_read_4(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t offset) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif return (inl(handle + offset)); #endif -#if defined(_I386_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) return (*(volatile u_int32_t *)(handle + offset)); #endif } @@ -265,14 +265,14 @@ bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif insb(bsh + offset, addr, count); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -294,14 +294,14 @@ bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif insw(bsh + offset, addr, count); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -323,14 +323,14 @@ bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif insl(bsh + offset, addr, count); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -377,9 +377,9 @@ bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif { int _port_ = bsh + offset; @@ -396,8 +396,8 @@ #endif } #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -419,9 +419,9 @@ bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif { int _port_ = bsh + offset; @@ -438,8 +438,8 @@ #endif } #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -461,9 +461,9 @@ bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif { int _port_ = bsh + offset; @@ -480,8 +480,8 @@ #endif } #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -524,14 +524,14 @@ bus_space_write_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t value) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif outb(bsh + offset, value); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif *(volatile u_int8_t *)(bsh + offset) = value; @@ -542,14 +542,14 @@ bus_space_write_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int16_t value) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif outw(bsh + offset, value); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif *(volatile u_int16_t *)(bsh + offset) = value; @@ -560,14 +560,14 @@ bus_space_write_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int32_t value) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif outl(bsh + offset, value); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif *(volatile u_int32_t *)(bsh + offset) = value; @@ -604,14 +604,14 @@ bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int8_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif outsb(bsh + offset, addr, count); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -633,14 +633,14 @@ bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int16_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif outsw(bsh + offset, addr, count); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -662,14 +662,14 @@ bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int32_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif outsl(bsh + offset, addr, count); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -717,9 +717,9 @@ bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int8_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif { int _port_ = bsh + offset; @@ -736,8 +736,8 @@ #endif } #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -759,9 +759,9 @@ bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int16_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif { int _port_ = bsh + offset; @@ -778,8 +778,8 @@ #endif } #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -801,9 +801,9 @@ bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, const u_int32_t *addr, size_t count) { -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif { int _port_ = bsh + offset; @@ -820,8 +820,8 @@ #endif } #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -868,15 +868,15 @@ { bus_space_handle_t addr = bsh + offset; -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif while (count--) outb(addr, value); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif while (count--) @@ -890,15 +890,15 @@ { bus_space_handle_t addr = bsh + offset; -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif while (count--) outw(addr, value); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif while (count--) @@ -912,15 +912,15 @@ { bus_space_handle_t addr = bsh + offset; -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif while (count--) outl(addr, value); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif while (count--) @@ -956,15 +956,15 @@ { bus_space_handle_t addr = bsh + offset; -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif for (; count != 0; count--, addr++) outb(addr, value); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif for (; count != 0; count--, addr++) @@ -978,15 +978,15 @@ { bus_space_handle_t addr = bsh + offset; -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif for (; count != 0; count--, addr += 2) outw(addr, value); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif for (; count != 0; count--, addr += 2) @@ -1000,15 +1000,15 @@ { bus_space_handle_t addr = bsh + offset; -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif for (; count != 0; count--, addr += 4) outl(addr, value); #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif for (; count != 0; count--, addr += 4) @@ -1051,9 +1051,9 @@ bus_space_handle_t addr1 = bsh1 + off1; bus_space_handle_t addr2 = bsh2 + off2; -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif { if (addr1 >= addr2) { @@ -1068,8 +1068,8 @@ } } #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -1097,9 +1097,9 @@ bus_space_handle_t addr1 = bsh1 + off1; bus_space_handle_t addr2 = bsh2 + off2; -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif { if (addr1 >= addr2) { @@ -1114,8 +1114,8 @@ } } #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -1143,9 +1143,9 @@ bus_space_handle_t addr1 = bsh1 + off1; bus_space_handle_t addr2 = bsh2 + off2; -#if defined(_I386_BUS_PIO_H_) -#if defined(_I386_BUS_MEMIO_H_) - if (tag == I386_BUS_SPACE_IO) +#if defined(_AMD64_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) + if (tag == AMD64_BUS_SPACE_IO) #endif { if (addr1 >= addr2) { @@ -1160,8 +1160,8 @@ } } #endif -#if defined(_I386_BUS_MEMIO_H_) -#if defined(_I386_BUS_PIO_H_) +#if defined(_AMD64_BUS_MEMIO_H_) +#if defined(_AMD64_BUS_PIO_H_) else #endif { @@ -1181,7 +1181,7 @@ #endif } -#endif /* defined(_I386_BUS_PIO_H_) || defined(_I386_MEM_IO_H_) */ +#endif /* defined(_AMD64_BUS_PIO_H_) || defined(_AMD64_MEM_IO_H_) */ #if 0 /* Cause a link error for bus_space_copy_8 */ #define bus_space_copy_region_8 !!! bus_space_copy_region_8 unimplemented !!! @@ -1213,4 +1213,4 @@ #endif } -#endif /* _I386_BUS_AT386_H_ */ +#endif /* _AMD64_BUS_AMD64_H_ */ ==== //depot/projects/hammer/sys/amd64/include/bus_dma.h#5 (text+ko) ==== @@ -67,10 +67,10 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/amd64/include/bus_dma.h,v 1.18 2003/04/10 23:03:33 mux Exp $ */ +/* $FreeBSD: src/sys/amd64/include/bus_dma.h,v 1.19 2003/05/12 02:44:37 peter Exp $ */ -#ifndef _I386_BUS_DMA_H_ -#define _I386_BUS_DMA_H_ +#ifndef _AMD64_BUS_DMA_H_ +#define _AMD64_BUS_DMA_H_ /* * Flags used in various bus DMA methods. @@ -243,4 +243,4 @@ if ((dmamap) != NULL) \ _bus_dmamap_unload(dmat, dmamap) -#endif /* _I386_BUS_DMA_H_ */ +#endif /* _AMD64_BUS_DMA_H_ */ ==== //depot/projects/hammer/sys/amd64/include/bus_memio.h#5 (text+ko) ==== @@ -23,9 +23,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/bus_memio.h,v 1.2 1999/08/28 00:44:08 peter Exp $ + * $FreeBSD: src/sys/amd64/include/bus_memio.h,v 1.3 2003/05/12 02:44:37 peter Exp $ */ -#ifndef _I386_BUS_MEMIO_H_ -#define _I386_BUS_MEMIO_H_ -#endif /* _I386_BUS_MEMIO_H_ */ +#ifndef _AMD64_BUS_MEMIO_H_ +#define _AMD64_BUS_MEMIO_H_ +#endif /* _AMD64_BUS_MEMIO_H_ */ ==== //depot/projects/hammer/sys/amd64/include/bus_pio.h#5 (text+ko) ==== @@ -23,9 +23,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/bus_pio.h,v 1.2 1999/08/28 00:44:08 peter Exp $ + * $FreeBSD: src/sys/amd64/include/bus_pio.h,v 1.3 2003/05/12 02:44:37 peter Exp $ */ -#ifndef _I386_BUS_PIO_H_ -#define _I386_BUS_PIO_H_ -#endif /* _I386_BUS_PIO_H_ */ +#ifndef _AMD64_BUS_PIO_H_ +#define _AMD64_BUS_PIO_H_ +#endif /* _AMD64_BUS_PIO_H_ */ ==== //depot/projects/hammer/sys/dev/kbd/atkbdc.c#6 (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/dev/kbd/atkbdc.c,v 1.13 2003/05/01 04:19:19 peter Exp $ + * $FreeBSD: src/sys/dev/kbd/atkbdc.c,v 1.14 2003/05/12 02:44:37 peter Exp $ * from kbdio.c,v 1.13 1998/09/25 11:55:46 yokota Exp */ @@ -154,8 +154,10 @@ #endif /* XXX: tag should be passed from the caller */ -#if defined(__i386__) || defined(__amd64__) +#if defined(__i386__) tag = I386_BUS_SPACE_IO; +#elif defined(__amd64__) + tag = AMD64_BUS_SPACE_IO; #elif defined(__alpha__) tag = busspace_isa_io; #elif defined(__ia64__) From owner-p4-projects@FreeBSD.ORG Sun May 11 22:51:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1882B37B404; Sun, 11 May 2003 22:51:11 -0700 (PDT) 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 AA6D537B401 for ; Sun, 11 May 2003 22:51:10 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0848A43FE0 for ; Sun, 11 May 2003 22:51:10 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4C5p90U057221 for ; Sun, 11 May 2003 22:51:09 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4C5p9mU057218 for perforce@freebsd.org; Sun, 11 May 2003 22:51:09 -0700 (PDT) Date: Sun, 11 May 2003 22:51:09 -0700 (PDT) Message-Id: <200305120551.h4C5p9mU057218@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31001 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 05:51:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=31001 Change 31001 by peter@peter_daintree on 2003/05/11 22:51:05 IFC @31000 Affected files ... .. //depot/projects/hammer/release/i386/drivers.conf#10 integrate .. //depot/projects/hammer/sbin/growfs/growfs.c#6 integrate .. //depot/projects/hammer/sys/boot/common/load_elf.c#12 integrate .. //depot/projects/hammer/sys/boot/i386/libi386/i386_module.c#5 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4.h#2 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs.h#9 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs_data.h#9 integrate .. //depot/projects/hammer/sys/kern/kern_malloc.c#8 integrate Differences ... ==== //depot/projects/hammer/release/i386/drivers.conf#10 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/i386/drivers.conf,v 1.26 2003/05/11 06:42:09 scottl Exp $ +# $FreeBSD: src/release/i386/drivers.conf,v 1.27 2003/05/12 02:40:24 scottl Exp $ # # drv: driver name in kernel config file @@ -42,6 +42,7 @@ cue if_cue 2 network "CATC USB ethernet adapter" dc if_dc 2 network "DEC/Intel 21143 (and clones) PCI fast ethernet card" ed if_ed 2 network "NE[12]000, SMC Ultra, 3c503, DS8390 ISA ethernet cards" +em if_em 2 network "Intel Pro/1000 PCI gigabit ethernet card" fe if_fe 2 network "Fujitsu MB8696x based cards" fxp if_fxp 2 network "Intel EtherExpress Pro/100B PCI Fast Ethernet card" kue if_kue 2 network "Kawasaki LSI USB ethernet adapter" @@ -76,7 +77,6 @@ an if_an 3 network "Aironet 4500/4800 802.11 PCMCIA/ISA/PCI card" awi if_awi 3 network "BayStack 660 and others" de if_de 3 network "DEC DE435 PCI NIC or other DC21040-AA based card" -em if_em 3 network "Intel Pro/1000 PCI gigabit ethernet card" ex if_ex 3 network "Intel EtherExpress Pro/10 and Pro/10+" ie if_ie 3 network "EtherExpress 8/16, 3C507, StarLAN 10 etc." plip plip 3 network "TCP/IP over parallel" ==== //depot/projects/hammer/sbin/growfs/growfs.c#6 (text+ko) ==== @@ -48,7 +48,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/sbin/growfs/growfs.c,v 1.14 2003/04/26 15:22:29 schweikh Exp $"; + "$FreeBSD: src/sbin/growfs/growfs.c,v 1.15 2003/05/12 05:37:16 grog Exp $"; #endif /* not lint */ /* ********************************************************** INCLUDES ***** */ @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -110,6 +111,7 @@ static ufs2_daddr_t inoblk; /* inode block address */ static char inobuf[MAXBSIZE]; /* inode block */ static int maxino; /* last valid inode */ +static int unlabeled; /* unlabeled partition, e.g. vinum volume etc. */ /* * An array of elements of type struct gfs_bpp describes all blocks to @@ -148,6 +150,7 @@ static void updrefs(int, ino_t, struct gfs_bpp *, int, int, unsigned int); static void indirchk(ufs_lbn_t, ufs_lbn_t, ufs2_daddr_t, ufs_lbn_t, struct gfs_bpp *, int, int, unsigned int); +static void get_dev_size(int, int *); /* ************************************************************ growfs ***** */ /* @@ -1880,6 +1883,28 @@ return columns; } +/* ****************************************************** get_dev_size ***** */ +/* + * Get the size of the partition if we can't figure it out from the disklabel, + * e.g. from vinum volumes. + */ +static void +get_dev_size(int fd, int *size) +{ + int sectorsize; + off_t mediasize; + + if (ioctl(fd, DIOCGSECTORSIZE, §orsize) == -1) + err(1,"DIOCGSECTORSIZE"); + if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) == -1) + err(1,"DIOCGMEDIASIZE"); + + if (sectorsize <= 0) + errx(1, "bogus sectorsize: %d", sectorsize); + + *size = mediasize / sectorsize; +} + /* ************************************************************** main ***** */ /* * growfs(8) is a utility which allows to increase the size of an existing @@ -1917,6 +1942,7 @@ struct disklabel *lp; struct partition *pp; int i,fsi,fso; + u_int32_t p_size; char reply[5]; #ifdef FSMAXSNAP int j; @@ -2016,25 +2042,25 @@ */ cp=device+strlen(device)-1; lp = get_disklabel(fsi); - if(lp->d_type == DTYPE_VINUM) { - pp = &lp->d_partitions[0]; - } else if (isdigit(*cp)) { - pp = &lp->d_partitions[2]; - } else if (*cp>='a' && *cp<='h') { - pp = &lp->d_partitions[*cp - 'a']; - } else { - errx(1, "unknown device"); - } + if (lp != NULL) { + if (isdigit(*cp)) { + pp = &lp->d_partitions[2]; + } else if (*cp>='a' && *cp<='h') { + pp = &lp->d_partitions[*cp - 'a']; + } else { + errx(1, "unknown device"); + } + p_size = pp->p_size; + } else { + get_dev_size(fsi, &p_size); + } /* * Check if that partition is suitable for growing a file system. */ - if (pp->p_size < 1) { + if (p_size < 1) { errx(1, "partition is unavailable"); } - if (pp->p_fstype != FS_BSDFFS) { - errx(1, "partition not 4.2BSD"); - } /* * Read the current superblock, and take a backup. @@ -2063,11 +2089,11 @@ * Determine size to grow to. Default to the full size specified in * the disk label. */ - sblock.fs_size = dbtofsb(&osblock, pp->p_size); + sblock.fs_size = dbtofsb(&osblock, p_size); if (size != 0) { - if (size > pp->p_size){ + if (size > p_size){ errx(1, "There is not enough space (%d < %d)", - pp->p_size, size); + p_size, size); } sblock.fs_size = dbtofsb(&osblock, size); } @@ -2117,7 +2143,7 @@ * later on realize we have to abort our operation, on that block * there should be no data, so we can't destroy something yet. */ - wtfs((ufs2_daddr_t)pp->p_size-1, (size_t)DEV_BSIZE, (void *)&sblock, + wtfs((ufs2_daddr_t)p_size-1, (size_t)DEV_BSIZE, (void *)&sblock, fso, Nflag); /* @@ -2178,12 +2204,14 @@ /* * Update the disk label. */ - pp->p_fsize = sblock.fs_fsize; - pp->p_frag = sblock.fs_frag; - pp->p_cpg = sblock.fs_fpg; + if (!unlabeled) { + pp->p_fsize = sblock.fs_fsize; + pp->p_frag = sblock.fs_frag; + pp->p_cpg = sblock.fs_fpg; - return_disklabel(fso, lp, Nflag); - DBG_PRINT0("label rewritten\n"); + return_disklabel(fso, lp, Nflag); + DBG_PRINT0("label rewritten\n"); + } close(fsi); if(fso>-1) close(fso); @@ -2247,15 +2275,16 @@ DBG_ENTER; lab=(struct disklabel *)malloc(sizeof(struct disklabel)); - if (!lab) { + if (!lab) errx(1, "malloc failed"); - } - if (ioctl(fd, DIOCGDINFO, (char *)lab) < 0) { - errx(1, "DIOCGDINFO failed"); - } + + if (!ioctl(fd, DIOCGDINFO, (char *)lab)) + return (lab); + + unlabeled++; DBG_LEAVE; - return (lab); + return (NULL); } ==== //depot/projects/hammer/sys/boot/common/load_elf.c#12 (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/boot/common/load_elf.c,v 1.27 2003/05/01 03:56:29 peter Exp $ + * $FreeBSD: src/sys/boot/common/load_elf.c,v 1.28 2003/05/12 05:48:09 peter Exp $ */ #include @@ -568,23 +568,35 @@ return fp; } +#if defined(__i386__) && __ELF_WORD_SIZE == 64 +struct mod_metadata64 { + int md_version; /* structure version MDTV_* */ + int md_type; /* type of entry MDT_* */ + u_int64_t md_data; /* specific data */ + u_int64_t md_cval; /* common string label */ +}; +#endif + int __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef) { struct mod_metadata md; +#if defined(__i386__) && __ELF_WORD_SIZE == 64 + struct mod_metadata64 md64; +#endif struct mod_depend *mdepend; struct mod_version mver; Elf_Sym sym; - char *s, **p, **p_stop; + char *s; int modcnt, minfolen; - Elf_Addr v; + Elf_Addr v, p, p_stop; if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0) return ENOENT; - p = (char **)(uintptr_t)(sym.st_value + ef->off); + p = sym.st_value + ef->off; if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0) return ENOENT; - p_stop = (char **)(uintptr_t)(sym.st_value + ef->off); + p_stop = sym.st_value + ef->off; modcnt = 0; while (p < p_stop) { @@ -594,6 +606,13 @@ #else v += ef->off; #endif +#if defined(__i386__) && __ELF_WORD_SIZE == 64 + COPYOUT(v, &md64, sizeof(md64)); + md.md_version = md64.md_version; + md.md_type = md64.md_type; + md.md_cval = (const char *)(uintptr_t)(md64.md_cval + ef->off); + md.md_data = (void *)(uintptr_t)(md64.md_data + ef->off); +#else COPYOUT(v, &md, sizeof(md)); #ifdef __sparc64__ __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md)); @@ -601,7 +620,8 @@ md.md_cval += ef->off; md.md_data += ef->off; #endif - p++; +#endif + p += sizeof(Elf_Addr); switch(md.md_type) { case MDT_DEPEND: if (ef->kernel) /* kernel must not depend on anything */ ==== //depot/projects/hammer/sys/boot/i386/libi386/i386_module.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/i386/libi386/i386_module.c,v 1.10 2003/04/30 22:02:39 peter Exp $ + * $FreeBSD: src/sys/boot/i386/libi386/i386_module.c,v 1.11 2003/05/12 04:57:05 peter Exp $ */ /* @@ -50,9 +50,6 @@ /* XXX use PnP to locate stuff here */ /* autoload ACPI support */ - if (file_findfile(NULL, "elf64 kernel") != NULL) - return (0); /* ACPI is mandatory */ - /* XXX should be in 4th keyed off acpi_load */ disabled = 0; rv = getenv("hint.acpi.0.disabled"); ==== //depot/projects/hammer/sys/compat/svr4/svr4.h#2 (text+ko) ==== @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/svr4/svr4.h,v 1.6 2000/01/09 12:29:45 bde Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4.h,v 1.7 2003/05/12 05:08:38 phk Exp $ */ #include "opt_svr4.h" @@ -34,8 +34,6 @@ extern struct sysentvec svr4_sysvec; -#define memset(x,y,z) bzero(x,z) - #define COMPAT_SVR4_SOLARIS2 #define KTRACE ==== //depot/projects/hammer/sys/dev/usb/usbdevs.h#9 (text+ko) ==== @@ -1,10 +1,10 @@ -/* $FreeBSD: src/sys/dev/usb/usbdevs.h,v 1.132 2003/05/05 08:22:15 murray Exp $ */ +/* $FreeBSD: src/sys/dev/usb/usbdevs.h,v 1.133 2003/05/12 04:27:22 murray Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.123 2003/05/05 08:18:53 murray Exp + * FreeBSD: src/sys/dev/usb/usbdevs,v 1.124 2003/05/11 23:55:28 joe Exp */ /* @@ -462,6 +462,7 @@ /* Asahi Optical products */ #define USB_PRODUCT_ASAHIOPTICAL_OPTIO230 0x0004 /* Digital camera */ +#define USB_PRODUCT_ASAHIOPTICAL_OPTIO330 0x0006 /* Digital camera */ /* ASIX Electronics products */ #define USB_PRODUCT_ASIX_AX88172 0x1720 /* USB 2.0 10/100 ethernet controller */ ==== //depot/projects/hammer/sys/dev/usb/usbdevs_data.h#9 (text+ko) ==== @@ -1,10 +1,10 @@ -/* $FreeBSD: src/sys/dev/usb/usbdevs_data.h,v 1.132 2003/05/05 08:22:15 murray Exp $ */ +/* $FreeBSD: src/sys/dev/usb/usbdevs_data.h,v 1.133 2003/05/12 04:27:22 murray Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.123 2003/05/05 08:18:53 murray Exp + * FreeBSD: src/sys/dev/usb/usbdevs,v 1.124 2003/05/11 23:55:28 joe Exp */ /* @@ -394,6 +394,12 @@ "Digital camera", }, { + USB_VENDOR_ASAHIOPTICAL, USB_PRODUCT_ASAHIOPTICAL_OPTIO330, + 0, + "Asahi Optical", + "Digital camera", + }, + { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88172, 0, "ASIX Electronics", ==== //depot/projects/hammer/sys/kern/kern_malloc.c#8 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/kern/kern_malloc.c,v 1.123 2003/05/05 08:32:53 phk Exp $ + * $FreeBSD: src/sys/kern/kern_malloc.c,v 1.124 2003/05/12 05:09:56 phk Exp $ */ #include "opt_vm.h" @@ -250,13 +250,12 @@ ksp->ks_maxused = ksp->ks_memuse; mtx_unlock(&ksp->ks_mtx); - if (!(flags & M_NOWAIT)) + if (flags & M_WAITOK) KASSERT(va != NULL, ("malloc(M_WAITOK) returned NULL")); - if (va == NULL) { + else if (va == NULL) t_malloc_fail = time_uptime; - } #ifdef DIAGNOSTIC - if (!(flags & M_ZERO)) { + if (va != NULL && !(flags & M_ZERO)) { memset(va, 0x70, osize); } #endif From owner-p4-projects@FreeBSD.ORG Sun May 11 22:57:19 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 15C6437B404; Sun, 11 May 2003 22:57:19 -0700 (PDT) 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 A97FD37B401 for ; Sun, 11 May 2003 22:57:18 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1605F43F75 for ; Sun, 11 May 2003 22:57:18 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4C5vH0U057492 for ; Sun, 11 May 2003 22:57:17 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4C5vHKu057489 for perforce@freebsd.org; Sun, 11 May 2003 22:57:17 -0700 (PDT) Date: Sun, 11 May 2003 22:57:17 -0700 (PDT) Message-Id: <200305120557.h4C5vHKu057489@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31002 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 05:57:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=31002 Change 31002 by peter@peter_hammer on 2003/05/11 22:57:08 Really shut up the loader and stop it trying to load acpi. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#25 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#25 (text+ko) ==== @@ -1701,3 +1701,5 @@ } #endif /* DDB */ + +MODULE_VERSION(acpi, 100); From owner-p4-projects@FreeBSD.ORG Mon May 12 02:22:27 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3B1DE37B408; Mon, 12 May 2003 02:22:26 -0700 (PDT) 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 D0B3E37B407 for ; Mon, 12 May 2003 02:22:25 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 480C443FE1 for ; Mon, 12 May 2003 02:22:25 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4C9MO0U076701 for ; Mon, 12 May 2003 02:22:24 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4C9MOAT076698 for perforce@freebsd.org; Mon, 12 May 2003 02:22:24 -0700 (PDT) Date: Mon, 12 May 2003 02:22:24 -0700 (PDT) Message-Id: <200305120922.h4C9MOAT076698@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31003 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 09:22:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=31003 Change 31003 by peter@peter_hammer on 2003/05/12 02:21:50 create tf_addr in trapframe to store the fault address. This avoids having to run the page fault handler with interrupts disabled for so long. Adjust exception.S to enable this. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/exception.S#8 edit .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#10 edit .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#26 edit .. //depot/projects/hammer/sys/amd64/amd64/trap.c#12 edit .. //depot/projects/hammer/sys/amd64/include/frame.h#6 edit .. //depot/projects/hammer/sys/amd64/include/ucontext.h#6 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#8 (text+ko) ==== @@ -74,50 +74,63 @@ */ #define IDTVEC(name) ALIGN_TEXT; .globl __CONCAT(X,name); \ .type __CONCAT(X,name),@function; __CONCAT(X,name): -#define TRAP(a) pushq $(a) ; jmp alltraps -#define TRAP_NOEN(a) pushq $(a) ; jmp alltraps_noen MCOUNT_LABEL(user) MCOUNT_LABEL(btrap) +/* Traps that we leave interrupts disabled for.. */ +#define TRAP_NOEN(a) \ + subq $TF_RIP,%rsp; \ + movq $(a),TF_TRAPNO(%rsp) ; \ + jmp alltraps_noen +IDTVEC(dbg) + TRAP_NOEN(T_TRCTRAP) +IDTVEC(bpt) + TRAP_NOEN(T_BPTFLT) + +/* Regular traps */ +#define TRAP(a) \ + subq $TF_RIP,%rsp; \ + movq $(a),TF_TRAPNO(%rsp) ; \ + jmp alltraps IDTVEC(div) - pushq $0; TRAP(T_DIVIDE) -IDTVEC(dbg) - pushq $0; TRAP_NOEN(T_TRCTRAP) + TRAP(T_DIVIDE) IDTVEC(nmi) - pushq $0; TRAP(T_NMI) -IDTVEC(bpt) - pushq $0; TRAP_NOEN(T_BPTFLT) + TRAP(T_NMI) IDTVEC(ofl) - pushq $0; TRAP(T_OFLOW) + TRAP(T_OFLOW) IDTVEC(bnd) - pushq $0; TRAP(T_BOUND) + TRAP(T_BOUND) IDTVEC(ill) - pushq $0; TRAP(T_PRIVINFLT) + TRAP(T_PRIVINFLT) IDTVEC(dna) - pushq $0; TRAP(T_DNA) + TRAP(T_DNA) IDTVEC(fpusegm) - pushq $0; TRAP(T_FPOPFLT) + TRAP(T_FPOPFLT) +IDTVEC(mchk) + TRAP(T_MCHK) +IDTVEC(rsvd) + TRAP(T_RESERVED) +IDTVEC(fpu) + TRAP(T_ARITHTRAP) +IDTVEC(xmm) + TRAP(T_XMMFLT) + +/* This group of traps have tf_err already pushed by the cpu */ +#define TRAP_ERR(a) \ + subq $TF_ERR,%rsp; \ + movq $(a),TF_TRAPNO(%rsp) ; \ + jmp alltraps_noen IDTVEC(tss) - TRAP(T_TSSFLT) + TRAP_ERR(T_TSSFLT) IDTVEC(missing) - TRAP(T_SEGNPFLT) + TRAP_ERR(T_SEGNPFLT) IDTVEC(stk) - TRAP(T_STKFLT) + TRAP_ERR(T_STKFLT) IDTVEC(prot) - TRAP(T_PROTFLT) -IDTVEC(page) - TRAP_NOEN(T_PAGEFLT) -IDTVEC(mchk) - pushq $0; TRAP(T_MCHK) -IDTVEC(rsvd) - pushq $0; TRAP(T_RESERVED) -IDTVEC(fpu) - pushq $0; TRAP(T_ARITHTRAP) + TRAP_ERR(T_PROTFLT) IDTVEC(align) - TRAP(T_ALIGNFLT) -IDTVEC(xmm) - pushq $0; TRAP(T_XMMFLT) + TRAP_ERR(T_ALIGNFLT) /* * alltraps entry point. Use swapgs if this is the first time in the @@ -129,7 +142,6 @@ .globl alltraps .type alltraps,@function alltraps: - subq $TF_TRAPNO,%rsp /* tf_err and tf_trapno already pushed */ testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz alltraps_testi /* already running with kernel GS.base */ swapgs @@ -139,6 +151,7 @@ sti alltraps_pushregs: movq %rdi,TF_RDI(%rsp) +alltraps_pushregs_no_rdi: movq %rsi,TF_RSI(%rsp) movq %rdx,TF_RDX(%rsp) movq %rcx,TF_RCX(%rsp) @@ -170,15 +183,14 @@ .globl alltraps_noen .type alltraps_noen,@function alltraps_noen: - subq $TF_TRAPNO,%rsp /* tf_err and tf_trapno already pushed */ testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz alltraps_pushregs /* already running with kernel GS.base */ swapgs jmp alltraps_pushregs IDTVEC(dblfault) - pushq $T_DOUBLEFLT - subq $TF_TRAPNO,%rsp /* tf_err and tf_trapno already pushed */ + subq $TF_ERR,%rsp + movq $T_DOUBLEFLT,TF_TRAPNO(%rsp) testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz 1f /* already running with kernel GS.base */ swapgs @@ -186,6 +198,20 @@ 2: hlt jmp 2b +IDTVEC(page) + subq $TF_ERR,%rsp + movq $T_PAGEFLT,TF_TRAPNO(%rsp) + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz 1f /* already running with kernel GS.base */ + swapgs +1: movq %rdi,TF_RDI(%rsp) + movq %cr2,%rdi + movq %rdi,TF_ADDR(%rsp) + testl $PSL_I,TF_RFLAGS(%rsp) + jz alltraps_pushregs_no_rdi + sti + jmp alltraps_pushregs_no_rdi + /* * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) * ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#10 (text+ko) ==== @@ -152,6 +152,7 @@ ASSYM(TF_RCX, offsetof(struct trapframe, tf_rcx)); ASSYM(TF_RAX, offsetof(struct trapframe, tf_rax)); ASSYM(TF_TRAPNO, offsetof(struct trapframe, tf_trapno)); +ASSYM(TF_ADDR, offsetof(struct trapframe, tf_addr)); ASSYM(TF_ERR, offsetof(struct trapframe, tf_err)); ASSYM(TF_RIP, offsetof(struct trapframe, tf_rip)); ASSYM(TF_CS, offsetof(struct trapframe, tf_cs)); ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#26 (text+ko) ==== @@ -245,7 +245,7 @@ sf.sf_uc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK) ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - bcopy(regs, &sf.sf_uc.uc_mcontext.mc_r15, sizeof(*regs)); + bcopy(regs, &sf.sf_uc.uc_mcontext.mc_rdi, sizeof(*regs)); sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); @@ -280,11 +280,11 @@ /* Fill in POSIX parts */ sf.sf_si.si_signo = sig; sf.sf_si.si_code = code; - regs->tf_rcx = regs->tf_err; /* arg 4 in %rcx */ + regs->tf_rcx = regs->tf_addr; /* arg 4 in %rcx */ } else { /* Old FreeBSD-style arguments. */ regs->tf_rsi = code; /* arg 2 in %rsi */ - regs->tf_rcx = regs->tf_err; /* arg 4 in %rcx */ + regs->tf_rcx = regs->tf_addr; /* arg 4 in %rcx */ sf.sf_ahu.sf_handler = catcher; } PROC_UNLOCK(p); @@ -371,7 +371,7 @@ ret = set_fpcontext(td, &ucp->uc_mcontext); if (ret != 0) return (ret); - bcopy(&ucp->uc_mcontext.mc_r15, regs, sizeof(*regs)); + bcopy(&ucp->uc_mcontext.mc_rdi, regs, sizeof(*regs)); PROC_LOCK(p); #if defined(COMPAT_43) || defined(COMPAT_SUNOS) ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#12 (text+ko) ==== @@ -168,7 +168,7 @@ #ifdef DDB if (db_active) { - eva = (type == T_PAGEFLT ? rcr2() : 0); + eva = (type == T_PAGEFLT ? frame.tf_addr : 0); trap_fatal(&frame, eva); goto out; } @@ -194,11 +194,10 @@ printf("kernel trap %d with interrupts disabled\n", type); /* - * Page faults need interrupts diasabled until later, - * and we shouldn't enable interrupts while holding a + * We shouldn't enable interrupts while holding a * spin lock. */ - if (type != T_PAGEFLT && PCPU_GET(spinlocks) == NULL) + if (PCPU_GET(spinlocks) == NULL) enable_intr(); } } @@ -213,17 +212,9 @@ * do the VM lookup, so just consider it a fatal trap so the * kernel can print out a useful trap message and even get * to the debugger. - * - * Note that T_PAGEFLT is registered as an interrupt gate. This - * is just like a trap gate, except interrupts are disabled. This - * happens to be critically important, because we could otherwise - * preempt and run another process that may cause %cr2 to be - * clobbered for something else. */ - eva = rcr2(); - if (PCPU_GET(spinlocks) == NULL) - enable_intr(); - else + eva = frame.tf_addr; + if (PCPU_GET(spinlocks) != NULL) trap_fatal(&frame, eva); } @@ -454,7 +445,7 @@ uprintf("fatal process exception: %s", trap_msg[type]); if ((type == T_PAGEFLT) || (type == T_PROTFLT)) - uprintf(", fault VA = 0x%lx", (u_long)eva); + uprintf(", fault VA = 0x%lx", eva); uprintf("\n"); } #endif @@ -556,8 +547,6 @@ frame->tf_err & PGEX_W ? "write" : "read", frame->tf_err & PGEX_P ? "protection violation" : "page not present", (void *)eva, (void *)frame->tf_rip, (void *)frame->tf_rax, (void *)frame->tf_rbx, (void *)frame->tf_rcx, (void *)frame->tf_rdx, (void *)frame->tf_rsp, (void *)frame->tf_rbp, (void *)frame->tf_rsi, (void *)frame->tf_rdi); - /* kludge to pass faulting virtual address to sendsig */ - frame->tf_err = eva; return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); } ==== //depot/projects/hammer/sys/amd64/include/frame.h#6 (text+ko) ==== @@ -68,6 +68,7 @@ register_t tf_r14; register_t tf_r15; register_t tf_trapno; + register_t tf_addr; /* below portion defined in hardware */ register_t tf_err; register_t tf_rip; @@ -96,6 +97,7 @@ register_t if_r14; register_t if_r15; register_t :64; /* compat with trap frame - trapno */ + register_t :64; /* compat with trap frame - addr */ register_t :64; /* compat with trap frame - err */ /* below portion defined in hardware */ register_t if_rip; @@ -124,6 +126,7 @@ register_t cf_r14; register_t cf_r15; register_t :64; /* compat with trap frame - trapno */ + register_t :64; /* compat with trap frame - addr */ register_t :64; /* compat with trap frame - err */ /* below portion defined in hardware */ register_t cf_rip; ==== //depot/projects/hammer/sys/amd64/include/ucontext.h#6 (text+ko) ==== @@ -38,22 +38,24 @@ * and ucontext_t at the same time. */ register_t mc_onstack; /* XXX - sigcontext compat. */ - register_t mc_r15; /* machine state (struct trapframe) */ - register_t mc_r14; - register_t mc_r13; - register_t mc_r12; - register_t mc_r11; - register_t mc_r10; - register_t mc_r9; - register_t mc_r8; - register_t mc_rdi; + + register_t mc_rdi; /* machine state (struct trapframe) */ register_t mc_rsi; - register_t mc_rbp; - register_t mc_rbx; register_t mc_rdx; register_t mc_rcx; + register_t mc_r8; + register_t mc_r9; register_t mc_rax; + register_t mc_rbx; + register_t mc_rbp; + register_t mc_r10; + register_t mc_r11; + register_t mc_r12; + register_t mc_r13; + register_t mc_r14; + register_t mc_r15; register_t mc_trapno; + register_t mc_addr; register_t mc_err; register_t mc_rip; register_t mc_cs; From owner-p4-projects@FreeBSD.ORG Mon May 12 02:29:35 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2F2D437B401; Mon, 12 May 2003 02:29:35 -0700 (PDT) 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 C157237B404 for ; Mon, 12 May 2003 02:29:34 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BEE743FE3 for ; Mon, 12 May 2003 02:29:34 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4C9TY0U076921 for ; Mon, 12 May 2003 02:29:34 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4C9TXe2076918 for perforce@freebsd.org; Mon, 12 May 2003 02:29:33 -0700 (PDT) Date: Mon, 12 May 2003 02:29:33 -0700 (PDT) Message-Id: <200305120929.h4C9TXe2076918@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31004 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 09:29:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=31004 Change 31004 by peter@peter_hammer on 2003/05/12 02:28:52 This is probably unnecessary, but avoid information leakage to userland. Better safe than sorry. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/exception.S#9 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#9 (text+ko) ==== @@ -82,6 +82,8 @@ #define TRAP_NOEN(a) \ subq $TF_RIP,%rsp; \ movq $(a),TF_TRAPNO(%rsp) ; \ + movq $0,TF_ADDR(%rsp) ; \ + movq $0,TF_ERR(%rsp) ; \ jmp alltraps_noen IDTVEC(dbg) TRAP_NOEN(T_TRCTRAP) @@ -92,6 +94,8 @@ #define TRAP(a) \ subq $TF_RIP,%rsp; \ movq $(a),TF_TRAPNO(%rsp) ; \ + movq $0,TF_ADDR(%rsp) ; \ + movq $0,TF_ERR(%rsp) ; \ jmp alltraps IDTVEC(div) TRAP(T_DIVIDE) @@ -120,6 +124,7 @@ #define TRAP_ERR(a) \ subq $TF_ERR,%rsp; \ movq $(a),TF_TRAPNO(%rsp) ; \ + movq $0,TF_ADDR(%rsp) ; \ jmp alltraps_noen IDTVEC(tss) TRAP_ERR(T_TSSFLT) From owner-p4-projects@FreeBSD.ORG Mon May 12 09:09:44 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9CF1337B404; Mon, 12 May 2003 09:09:43 -0700 (PDT) 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 4E4B537B401 for ; Mon, 12 May 2003 09:09:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EF2843FCB for ; Mon, 12 May 2003 09:09:42 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4CG9g0U009304 for ; Mon, 12 May 2003 09:09:42 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4CG9fhT009301 for perforce@freebsd.org; Mon, 12 May 2003 09:09:41 -0700 (PDT) Date: Mon, 12 May 2003 09:09:41 -0700 (PDT) Message-Id: <200305121609.h4CG9fhT009301@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31014 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 16:09:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=31014 Change 31014 by peter@peter_daintree on 2003/05/12 09:08:44 IFC @31013 Affected files ... .. //depot/projects/hammer/etc/network.subr#2 integrate .. //depot/projects/hammer/etc/pccard_ether#4 integrate .. //depot/projects/hammer/etc/rc.d/network_ipv6#4 integrate .. //depot/projects/hammer/lib/libthr/thread/thr_kern.c#3 integrate .. //depot/projects/hammer/lib/libthr/thread/thr_mutex.c#3 integrate .. //depot/projects/hammer/lib/libthr/thread/thr_private.h#2 integrate .. //depot/projects/hammer/lib/libthr/thread/thr_sig.c#3 integrate .. //depot/projects/hammer/release/alpha/drivers.conf#7 integrate .. //depot/projects/hammer/sys/dev/ata/ata-card.c#6 integrate .. //depot/projects/hammer/sys/kern/link_elf.c#12 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#15 integrate Differences ... ==== //depot/projects/hammer/etc/network.subr#2 (text+ko) ==== @@ -22,7 +22,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/network.subr,v 1.146 2003/04/18 17:51:53 mtm Exp $ +# $FreeBSD: src/etc/network.subr,v 1.147 2003/05/12 11:36:49 ume Exp $ # # @@ -212,3 +212,299 @@ esac return 0 } + +hexdigit() +{ + if [ $1 -lt 10 ]; then + echo $1 + else + case $1 in + 10) echo a ;; + 11) echo b ;; + 12) echo c ;; + 13) echo d ;; + 14) echo e ;; + 15) echo f ;; + esac + fi +} + +hexprint() +{ + val=$1 + str='' + + dig=`hexdigit $((${val} & 15))` + str=${dig}${str} + val=$((${val} >> 4)) + while [ ${val} -gt 0 ]; do + dig=`hexdigit $((${val} & 15))` + str=${dig}${str} + val=$((${val} >> 4)) + done + + echo ${str} +} + +# Setup the interfaces for IPv6 +network6_interface_setup() +{ + interfaces=$* + rtsol_interfaces='' + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + rtsol_available=no + ;; + *) + rtsol_available=yes + ;; + esac + for i in $interfaces; do + rtsol_interface=yes + eval prefix=\$ipv6_prefix_$i + if [ -n "${prefix}" ]; then + rtsol_available=no + rtsol_interface=no + laddr=`network6_getladdr $i` + hostid=`expr "${laddr}" : 'fe80::\(.*\)%\(.*\)'` + for j in ${prefix}; do + address=$j\:${hostid} + ifconfig $i inet6 ${address} prefixlen 64 alias + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # subnet-router anycast address + # (rfc2373) + ifconfig $i inet6 $j:: prefixlen 64 \ + alias anycast + ;; + esac + done + fi + eval ipv6_ifconfig=\$ipv6_ifconfig_$i + if [ -n "${ipv6_ifconfig}" ]; then + rtsol_available=no + rtsol_interface=no + ifconfig $i inet6 ${ipv6_ifconfig} alias + fi + + if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] + then + case ${i} in + lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*) + ;; + *) + rtsol_interfaces="${rtsol_interfaces} ${i}" + ;; + esac + else + ifconfig $i inet6 + fi + done + + if [ ${rtsol_available} = yes -a -n "${rtsol_interfaces}" ]; then + # Act as endhost - automatically configured. + # You can configure only single interface, as + # specification assumes that autoconfigured host has + # single interface only. + sysctl net.inet6.ip6.accept_rtadv=1 + set ${rtsol_interfaces} + ifconfig $1 up + rtsol $1 + fi + + for i in $interfaces; do + alias=0 + while : ; do + eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} + if [ -z "${ipv6_ifconfig}" ]; then + break; + fi + ifconfig $i inet6 ${ipv6_ifconfig} alias + alias=$((${alias} + 1)) + done + done +} + +# Setup IPv6 to IPv4 mapping +network6_stf_setup() +{ + case ${stf_interface_ipv4addr} in + [Nn][Oo] | '') + ;; + *) + # assign IPv6 addr and interface route for 6to4 interface + stf_prefixlen=$((16+${stf_interface_ipv4plen:-0})) + OIFS="$IFS" + IFS=".$IFS" + set ${stf_interface_ipv4addr} + IFS="$OIFS" + hexfrag1=`hexprint $(($1*256 + $2))` + hexfrag2=`hexprint $(($3*256 + $4))` + ipv4_in_hexformat="${hexfrag1}:${hexfrag2}" + case ${stf_interface_ipv6_ifid} in + [Aa][Uu][Tt][Oo] | '') + for i in ${ipv6_network_interfaces}; do + laddr=`network6_getladdr ${i}` + case ${laddr} in + '') + ;; + *) + break + ;; + esac + done + stf_interface_ipv6_ifid=`expr "${laddr}" : \ + 'fe80::\(.*\)%\(.*\)'` + case ${stf_interface_ipv6_ifid} in + '') + stf_interface_ipv6_ifid=0:0:0:1 + ;; + esac + ;; + esac + ifconfig stf0 create >/dev/null 2>&1 + ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \ + prefixlen ${stf_prefixlen} + # disallow packets to malicious 6to4 prefix + route add -inet6 2002:e000:: -prefixlen 20 ::1 -reject + route add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject + route add -inet6 2002:0000:: -prefixlen 24 ::1 -reject + route add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject + ;; + esac +} + +# Setup static routes +network6_static_routes_setup() +{ + # Set up any static routes. + case ${ipv6_defaultrouter} in + [Nn][Oo] | '') + ;; + *) + ipv6_static_routes="default ${ipv6_static_routes}" + ipv6_route_default="default ${ipv6_defaultrouter}" + ;; + esac + case ${ipv6_static_routes} in + [Nn][Oo] | '') + ;; + *) + for i in ${ipv6_static_routes}; do + eval ipv6_route_args=\$ipv6_route_${i} + route add -inet6 ${ipv6_route_args} + done + ;; + esac +} + +# Setup faith +network6_faith_setup() +{ + case ${ipv6_faith_prefix} in + [Nn][Oo] | '') + ;; + *) + sysctl net.inet6.ip6.keepfaith=1 + ifconfig faith0 create >/dev/null 2>&1 + ifconfig faith0 up + for prefix in ${ipv6_faith_prefix}; do + prefixlen=`expr "${prefix}" : ".*/\(.*\)"` + case ${prefixlen} in + '') + prefixlen=96 + ;; + *) + prefix=`expr "${prefix}" : \ + "\(.*\)/${prefixlen}"` + ;; + esac + route add -inet6 ${prefix} -prefixlen ${prefixlen} ::1 + route change -inet6 ${prefix} -prefixlen ${prefixlen} \ + -ifp faith0 + done + ;; + esac +} + +# Install the "default interface" to kernel, which will be used +# as the default route when there's no router. +network6_default_interface_setup() +{ + # Choose IPv6 default interface if it is not clearly specified. + case ${ipv6_default_interface} in + '') + for i in ${ipv6_network_interfaces}; do + case $i in + lo0|faith[0-9]*) + continue + ;; + esac + laddr=`network6_getladdr $i exclude_tentative` + case ${laddr} in + '') + ;; + *) + ipv6_default_interface=$i + break + ;; + esac + done + ;; + esac + + # Disallow unicast packets without outgoing scope identifiers, + # or route such packets to a "default" interface, if it is specified. + route add -inet6 fe80:: -prefixlen 10 ::1 -reject + case ${ipv6_default_interface} in + [Nn][Oo] | '') + route add -inet6 ff02:: -prefixlen 16 ::1 -reject + ;; + *) + laddr=`network6_getladdr ${ipv6_default_interface}` + route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface \ + -cloning + + # Disable installing the default interface with the + # case net.inet6.ip6.forwarding=0 and + # net.inet6.ip6.accept_rtadv=0, due to avoid conflict + # between the default router list and the manual + # configured default route. + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + ;; + *) + if [ `sysctl -n net.inet6.ip6.accept_rtadv` -eq 1 ] + then + ndp -I ${ipv6_default_interface} + fi + ;; + esac + ;; + esac +} + +network6_getladdr() +{ + ifconfig $1 2>/dev/null | while read proto addr rest; do + case ${proto} in + inet6) + case ${addr} in + fe80::*) + if [ -z "$2" ]; then + echo ${addr} + return + fi + case ${rest} in + *tentative*) + continue + ;; + *) + echo ${addr} + return + esac + esac + esac + done +} ==== //depot/projects/hammer/etc/pccard_ether#4 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh - # -# $FreeBSD: src/etc/pccard_ether,v 1.29 2003/05/05 19:06:46 ume Exp $ +# $FreeBSD: src/etc/pccard_ether,v 1.30 2003/05/12 11:36:49 ume Exp $ # # pccard_ether interfacename [start|stop] [ifconfig option] # @@ -134,8 +134,8 @@ # IPv6 setup case ${ipv6_enable} in [Yy][Ee][Ss]) - if [ -r /etc/rc.d/network_ipv6 ]; then - . /etc/rc.d/network_ipv6 + if [ -r /etc/network.subr ]; then + . /etc/network.subr network6_interface_setup ${interface} fi ;; ==== //depot/projects/hammer/etc/rc.d/network_ipv6#4 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/network_ipv6,v 1.33 2003/04/29 12:08:43 jwd Exp $ +# $FreeBSD: src/etc/rc.d/network_ipv6,v 1.34 2003/05/12 11:36:50 ume Exp $ # From: src/etc/rc.network6,v 1.29 2002/04/06 15:15:43 # @@ -33,301 +33,11 @@ # KEYWORD: FreeBSD . /etc/rc.subr +. /etc/network.subr name="network_ipv6" rcvar=`set_rcvar ipv6` start_cmd="network_ipv6_start" -#required_files="/etc/rc.network6" - -hexdigit() -{ - if [ $1 -lt 10 ]; then - echo $1 - else - case $1 in - 10) echo a ;; - 11) echo b ;; - 12) echo c ;; - 13) echo d ;; - 14) echo e ;; - 15) echo f ;; - esac - fi -} - -hexprint() -{ - val=$1 - str='' - - dig=`hexdigit $((${val} & 15))` - str=${dig}${str} - val=$((${val} >> 4)) - while [ ${val} -gt 0 ]; do - dig=`hexdigit $((${val} & 15))` - str=${dig}${str} - val=$((${val} >> 4)) - done - - echo ${str} -} - -network6_interface_setup() -{ - interfaces=$* - rtsol_interfaces='' - case ${ipv6_gateway_enable} in - [Yy][Ee][Ss]) - rtsol_available=no - ;; - *) - rtsol_available=yes - ;; - esac - for i in $interfaces; do - rtsol_interface=yes - eval prefix=\$ipv6_prefix_$i - if [ -n "${prefix}" ]; then - rtsol_available=no - rtsol_interface=no - laddr=`network6_getladdr $i` - hostid=`expr "${laddr}" : 'fe80::\(.*\)%\(.*\)'` - for j in ${prefix}; do - address=$j\:${hostid} - ifconfig $i inet6 ${address} prefixlen 64 alias - - case ${ipv6_gateway_enable} in - [Yy][Ee][Ss]) - # subnet-router anycast address - # (rfc2373) - ifconfig $i inet6 $j:: prefixlen 64 \ - alias anycast - ;; - esac - done - fi - eval ipv6_ifconfig=\$ipv6_ifconfig_$i - if [ -n "${ipv6_ifconfig}" ]; then - rtsol_available=no - rtsol_interface=no - ifconfig $i inet6 ${ipv6_ifconfig} alias - fi - - if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] - then - case ${i} in - lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*) - ;; - *) - rtsol_interfaces="${rtsol_interfaces} ${i}" - ;; - esac - else - ifconfig $i inet6 - fi - done - - if [ ${rtsol_available} = yes -a -n "${rtsol_interfaces}" ]; then - # Act as endhost - automatically configured. - # You can configure only single interface, as - # specification assumes that autoconfigured host has - # single interface only. - sysctl net.inet6.ip6.accept_rtadv=1 - set ${rtsol_interfaces} - ifconfig $1 up - rtsol $1 - fi - - for i in $interfaces; do - alias=0 - while : ; do - eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} - if [ -z "${ipv6_ifconfig}" ]; then - break; - fi - ifconfig $i inet6 ${ipv6_ifconfig} alias - alias=$((${alias} + 1)) - done - done -} - -network6_stf_setup() -{ - case ${stf_interface_ipv4addr} in - [Nn][Oo] | '') - ;; - *) - # assign IPv6 addr and interface route for 6to4 interface - stf_prefixlen=$((16+${stf_interface_ipv4plen:-0})) - OIFS="$IFS" - IFS=".$IFS" - set ${stf_interface_ipv4addr} - IFS="$OIFS" - hexfrag1=`hexprint $(($1*256 + $2))` - hexfrag2=`hexprint $(($3*256 + $4))` - ipv4_in_hexformat="${hexfrag1}:${hexfrag2}" - case ${stf_interface_ipv6_ifid} in - [Aa][Uu][Tt][Oo] | '') - for i in ${ipv6_network_interfaces}; do - laddr=`network6_getladdr ${i}` - case ${laddr} in - '') - ;; - *) - break - ;; - esac - done - stf_interface_ipv6_ifid=`expr "${laddr}" : \ - 'fe80::\(.*\)%\(.*\)'` - case ${stf_interface_ipv6_ifid} in - '') - stf_interface_ipv6_ifid=0:0:0:1 - ;; - esac - ;; - esac - ifconfig stf0 create >/dev/null 2>&1 - ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \ - prefixlen ${stf_prefixlen} - # disallow packets to malicious 6to4 prefix - route add -inet6 2002:e000:: -prefixlen 20 ::1 -reject - route add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject - route add -inet6 2002:0000:: -prefixlen 24 ::1 -reject - route add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject - ;; - esac -} - -network6_static_routes_setup() -{ - # Set up any static routes. - case ${ipv6_defaultrouter} in - [Nn][Oo] | '') - ;; - *) - ipv6_static_routes="default ${ipv6_static_routes}" - ipv6_route_default="default ${ipv6_defaultrouter}" - ;; - esac - case ${ipv6_static_routes} in - [Nn][Oo] | '') - ;; - *) - for i in ${ipv6_static_routes}; do - eval ipv6_route_args=\$ipv6_route_${i} - route add -inet6 ${ipv6_route_args} - done - ;; - esac -} - -network6_faith_setup() -{ - case ${ipv6_faith_prefix} in - [Nn][Oo] | '') - ;; - *) - sysctl net.inet6.ip6.keepfaith=1 - ifconfig faith0 create >/dev/null 2>&1 - ifconfig faith0 up - for prefix in ${ipv6_faith_prefix}; do - prefixlen=`expr "${prefix}" : ".*/\(.*\)"` - case ${prefixlen} in - '') - prefixlen=96 - ;; - *) - prefix=`expr "${prefix}" : \ - "\(.*\)/${prefixlen}"` - ;; - esac - route add -inet6 ${prefix} -prefixlen ${prefixlen} ::1 - route change -inet6 ${prefix} -prefixlen ${prefixlen} \ - -ifp faith0 - done - ;; - esac -} - -network6_default_interface_setup() -{ - # Choose IPv6 default interface if it is not clearly specified. - case ${ipv6_default_interface} in - '') - for i in ${ipv6_network_interfaces}; do - case $i in - lo0|faith[0-9]*) - continue - ;; - esac - laddr=`network6_getladdr $i exclude_tentative` - case ${laddr} in - '') - ;; - *) - ipv6_default_interface=$i - break - ;; - esac - done - ;; - esac - - # Disallow unicast packets without outgoing scope identifiers, - # or route such packets to a "default" interface, if it is specified. - route add -inet6 fe80:: -prefixlen 10 ::1 -reject - case ${ipv6_default_interface} in - [Nn][Oo] | '') - route add -inet6 ff02:: -prefixlen 16 ::1 -reject - ;; - *) - laddr=`network6_getladdr ${ipv6_default_interface}` - route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface \ - -cloning - - # Disable installing the default interface with the - # case net.inet6.ip6.forwarding=0 and - # net.inet6.ip6.accept_rtadv=0, due to avoid conflict - # between the default router list and the manual - # configured default route. - case ${ipv6_gateway_enable} in - [Yy][Ee][Ss]) - ;; - *) - if [ `sysctl -n net.inet6.ip6.accept_rtadv` -eq 1 ] - then - ndp -I ${ipv6_default_interface} - fi - ;; - esac - ;; - esac -} - -network6_getladdr() -{ - ifconfig $1 2>/dev/null | while read proto addr rest; do - case ${proto} in - inet6) - case ${addr} in - fe80::*) - if [ -z "$2" ]; then - echo ${addr} - return - fi - case ${rest} in - *tentative*) - continue - ;; - *) - echo ${addr} - return - esac - esac - esac - done -} network_ipv6_start() { ==== //depot/projects/hammer/lib/libthr/thread/thr_kern.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_kern.c,v 1.3 2003/04/20 02:58:30 marcel Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_kern.c,v 1.5 2003/05/12 10:48:02 mtm Exp $ */ #include @@ -52,6 +52,56 @@ static sigset_t restore; void +_thread_critical_enter(pthread_t pthread) +{ + sigset_t set; + sigset_t sav; + + /* + * Block all signals. + */ + SIGFILLSET(set); + + /* + * We can not use the global 'restore' set until after we have + * acquired the giant lock. + */ + _SPINLOCK(&pthread->lock); + if (__sys_sigprocmask(SIG_SETMASK, &set, &sav)) { + _thread_printf(STDERR_FILENO, "Critical Enter: sig err %d\n", + errno); + abort(); + } + + restore = sav; +} + +void +_thread_critical_exit(pthread_t pthread) +{ + sigset_t set; + int error; + + /* + * restore is protected by giant. We could restore our signal state + * incorrectly if someone else set restore between unlocking giant + * and restoring the signal mask. To avoid this we cache a copy prior + * to the unlock. + */ + set = restore; + + /* + * Restore signals. + */ + if (__sys_sigprocmask(SIG_SETMASK, &set, NULL)) { + _thread_printf(STDERR_FILENO, "Critical Exit: sig err %d\n", + errno); + abort(); + } + _SPINUNLOCK(&pthread->lock); +} + +void GIANT_LOCK(pthread_t pthread) { sigset_t set; ==== //depot/projects/hammer/lib/libthr/thread/thr_mutex.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.4 2003/05/06 02:30:52 mtm Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.6 2003/05/12 10:48:02 mtm Exp $ */ #include #include @@ -62,6 +62,8 @@ /* * Prototypes */ +static int get_muncontested(pthread_mutex_t, int); +static void get_mcontested(pthread_mutex_t); static inline int mutex_self_trylock(pthread_mutex_t); static inline int mutex_self_lock(pthread_mutex_t); static inline int mutex_unlock_common(pthread_mutex_t *, int); @@ -297,138 +299,6 @@ return (ret); } -static int -mutex_trylock_common(pthread_mutex_t *mutex) -{ - int ret = 0; - - PTHREAD_ASSERT((mutex != NULL) && (*mutex != NULL), - "Uninitialized mutex in pthread_mutex_trylock_basic"); - - /* - * Defer signals to protect the scheduling queues from - * access by the signal handler: - */ - /* _thread_kern_sig_defer(); XXXThr */ - - /* Lock the mutex structure: */ - _SPINLOCK(&(*mutex)->lock); - - /* - * If the mutex was statically allocated, properly - * initialize the tail queue. - */ - if (((*mutex)->m_flags & MUTEX_FLAGS_INITED) == 0) { - TAILQ_INIT(&(*mutex)->m_queue); - _MUTEX_INIT_LINK(*mutex); - (*mutex)->m_flags |= MUTEX_FLAGS_INITED; - } - - /* Process according to mutex type: */ - switch ((*mutex)->m_protocol) { - /* Default POSIX mutex: */ - case PTHREAD_PRIO_NONE: - /* Check if this mutex is not locked: */ - if ((*mutex)->m_owner == NULL) { - /* Lock the mutex for the running thread: */ - (*mutex)->m_owner = curthread; - - /* Add to the list of owned mutexes: */ - _MUTEX_ASSERT_NOT_OWNED(*mutex); - TAILQ_INSERT_TAIL(&curthread->mutexq, - (*mutex), m_qe); - } else if ((*mutex)->m_owner == curthread) - ret = mutex_self_trylock(*mutex); - else - /* Return a busy error: */ - ret = EBUSY; - break; - - /* POSIX priority inheritence mutex: */ - case PTHREAD_PRIO_INHERIT: - /* Check if this mutex is not locked: */ - if ((*mutex)->m_owner == NULL) { - /* Lock the mutex for the running thread: */ - (*mutex)->m_owner = curthread; - - /* Track number of priority mutexes owned: */ - curthread->priority_mutex_count++; - - /* - * The mutex takes on the attributes of the - * running thread when there are no waiters. - */ - (*mutex)->m_prio = curthread->active_priority; - (*mutex)->m_saved_prio = - curthread->inherited_priority; - - /* Add to the list of owned mutexes: */ - _MUTEX_ASSERT_NOT_OWNED(*mutex); - TAILQ_INSERT_TAIL(&curthread->mutexq, - (*mutex), m_qe); - } else if ((*mutex)->m_owner == curthread) - ret = mutex_self_trylock(*mutex); - else - /* Return a busy error: */ - ret = EBUSY; - break; - - /* POSIX priority protection mutex: */ - case PTHREAD_PRIO_PROTECT: - /* Check for a priority ceiling violation: */ - if (curthread->active_priority > (*mutex)->m_prio) - ret = EINVAL; - - /* Check if this mutex is not locked: */ - else if ((*mutex)->m_owner == NULL) { - /* Lock the mutex for the running thread: */ - (*mutex)->m_owner = curthread; - - /* Track number of priority mutexes owned: */ - curthread->priority_mutex_count++; - - /* - * The running thread inherits the ceiling - * priority of the mutex and executes at that - * priority. - */ - curthread->active_priority = (*mutex)->m_prio; - (*mutex)->m_saved_prio = - curthread->inherited_priority; - curthread->inherited_priority = - (*mutex)->m_prio; - - /* Add to the list of owned mutexes: */ - _MUTEX_ASSERT_NOT_OWNED(*mutex); - TAILQ_INSERT_TAIL(&curthread->mutexq, - (*mutex), m_qe); - } else if ((*mutex)->m_owner == curthread) - ret = mutex_self_trylock(*mutex); - else - /* Return a busy error: */ - ret = EBUSY; - break; - - /* Trap invalid mutex types: */ - default: - /* Return an invalid argument error: */ - ret = EINVAL; - break; - } - - /* Unlock the mutex structure: */ - _SPINUNLOCK(&(*mutex)->lock); - - /* - * Undefer and handle pending signals, yielding if - * necessary: - */ - /* _thread_kern_sig_undefer(); */ - - /* Return the completion status: */ - return (ret); -} - int __pthread_mutex_trylock(pthread_mutex_t *mutex) { @@ -442,7 +312,7 @@ * initialization: */ else if ((*mutex != NULL) || (ret = init_static(mutex)) == 0) - ret = mutex_trylock_common(mutex); + ret = mutex_lock_common(mutex, 1); return (ret); } @@ -460,15 +330,17 @@ * initialization marking the mutex private (delete safe): */ else if ((*mutex != NULL) || (ret = init_static_private(mutex)) == 0) - ret = mutex_trylock_common(mutex); + ret = mutex_lock_common(mutex, 1); return (ret); } static int -mutex_lock_common(pthread_mutex_t * mutex) +mutex_lock_common(pthread_mutex_t * mutex, int nonblock) { - int ret = 0; + int ret, error, inCancel; + + ret = error = inCancel = 0; PTHREAD_ASSERT((mutex != NULL) && (*mutex != NULL), "Uninitialized mutex in mutex_lock_common"); @@ -505,51 +377,20 @@ switch ((*mutex)->m_protocol) { /* Default POSIX mutex: */ case PTHREAD_PRIO_NONE: - if ((*mutex)->m_owner == NULL) { - /* Lock the mutex for this thread: */ - (*mutex)->m_owner = curthread; - - /* Add to the list of owned mutexes: */ - _MUTEX_ASSERT_NOT_OWNED(*mutex); - TAILQ_INSERT_TAIL(&curthread->mutexq, - (*mutex), m_qe); - - } else if ((*mutex)->m_owner == curthread) - ret = mutex_self_lock(*mutex); - else { - /* - * Join the queue of threads waiting to lock - * the mutex: - */ - mutex_queue_enq(*mutex, curthread); - - /* - * Keep a pointer to the mutex this thread - * is waiting on: - */ - curthread->data.mutex = *mutex; - - /* - * Unlock the mutex structure and schedule the - * next thread: - */ - /* XXX Sched lock. */ - PTHREAD_SET_STATE(curthread, PS_MUTEX_WAIT); - _SPINUNLOCK(&(*mutex)->lock); - _thread_suspend(curthread, NULL); - - /* Lock the mutex structure again: */ - _SPINLOCK(&(*mutex)->lock); - } + if ((error = get_muncontested(*mutex, nonblock)) == -1) + if (nonblock) { + ret = EBUSY; + break; + } else { + get_mcontested(*mutex); + } + else + ret = error; break; /* POSIX priority inheritence mutex: */ case PTHREAD_PRIO_INHERIT: - /* Check if this mutex is not locked: */ - if ((*mutex)->m_owner == NULL) { - /* Lock the mutex for this thread: */ - (*mutex)->m_owner = curthread; - + if ((error = get_muncontested(*mutex, nonblock)) == 0) { /* Track number of priority mutexes owned: */ curthread->priority_mutex_count++; @@ -562,43 +403,20 @@ curthread->inherited_priority; curthread->inherited_priority = (*mutex)->m_prio; - - /* Add to the list of owned mutexes: */ - _MUTEX_ASSERT_NOT_OWNED(*mutex); - TAILQ_INSERT_TAIL(&curthread->mutexq, - (*mutex), m_qe); - - } else if ((*mutex)->m_owner == curthread) >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon May 12 09:36:16 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AE89337B404; Mon, 12 May 2003 09:36:15 -0700 (PDT) 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 4E3B837B401 for ; Mon, 12 May 2003 09:36:15 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB29343FA3 for ; Mon, 12 May 2003 09:36:14 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4CGaE0U010641 for ; Mon, 12 May 2003 09:36:14 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4CGaEFC010638 for perforce@freebsd.org; Mon, 12 May 2003 09:36:14 -0700 (PDT) Date: Mon, 12 May 2003 09:36:14 -0700 (PDT) Message-Id: <200305121636.h4CGaEFC010638@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31015 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 16:36:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=31015 Change 31015 by peter@peter_hammer on 2003/05/12 09:35:40 This stuff is fixed, at last. Affected files ... .. //depot/projects/hammer/lib/libpam/modules/modules.inc#7 edit .. //depot/projects/hammer/share/mk/bsd.libnames.mk#8 edit Differences ... ==== //depot/projects/hammer/lib/libpam/modules/modules.inc#7 (text+ko) ==== @@ -25,8 +25,7 @@ MODULES += pam_securetty MODULES += pam_self .if !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(NO_OPENSSH) && \ - !defined(NOSECURE) && !defined(NOPIC) && \ - (!defined(NOSHARED) || ( ${NOSHARED} == "no" || ${NOSHARED} == "NO" )) + !defined(NOSECURE) MODULES += pam_ssh .endif MODULES += pam_tacplus ==== //depot/projects/hammer/share/mk/bsd.libnames.mk#8 (text+ko) ==== @@ -81,9 +81,7 @@ ${LIBUTIL} ${LIBOPIE} ${LIBMD} ${LIBYPCLNT} MINUSLPAM+= -lradius -lrpcsvc -ltacplus -lcrypt \ -lutil -lopie -lmd -lypclnt -.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(NO_OPENSSH) && \ - !defined(NOPIC) && \ - (!defined(NOSHARED) || ( ${NOSHARED} == "no" || ${NOSHARED} == "NO" )) +.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(NO_OPENSSH) LIBPAM+= ${LIBSSH} ${LIBCRYPTO} MINUSLPAM+= -lssh -lcrypto .endif From owner-p4-projects@FreeBSD.ORG Mon May 12 11:24:29 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8F69037B404; Mon, 12 May 2003 11:24:28 -0700 (PDT) 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 4526437B401 for ; Mon, 12 May 2003 11:24:28 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D086443FCB for ; Mon, 12 May 2003 11:24:27 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4CIOR0U016751 for ; Mon, 12 May 2003 11:24:27 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4CIORFY016748 for perforce@freebsd.org; Mon, 12 May 2003 11:24:27 -0700 (PDT) Date: Mon, 12 May 2003 11:24:27 -0700 (PDT) Message-Id: <200305121824.h4CIORFY016748@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31019 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 18:24:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=31019 Change 31019 by peter@peter_daintree on 2003/05/12 11:24:02 whitespace sync with cvs Affected files ... .. //depot/projects/hammer/sys/amd64/include/ucontext.h#7 edit Differences ... ==== //depot/projects/hammer/sys/amd64/include/ucontext.h#7 (text+ko) ==== @@ -38,7 +38,6 @@ * and ucontext_t at the same time. */ register_t mc_onstack; /* XXX - sigcontext compat. */ - register_t mc_rdi; /* machine state (struct trapframe) */ register_t mc_rsi; register_t mc_rdx; From owner-p4-projects@FreeBSD.ORG Mon May 12 11:25:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5616337B404; Mon, 12 May 2003 11:25:31 -0700 (PDT) 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 D359737B401 for ; Mon, 12 May 2003 11:25:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6946D43FE0 for ; Mon, 12 May 2003 11:25:30 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4CIPU0U016840 for ; Mon, 12 May 2003 11:25:30 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4CIPT0l016837 for perforce@freebsd.org; Mon, 12 May 2003 11:25:29 -0700 (PDT) Date: Mon, 12 May 2003 11:25:29 -0700 (PDT) Message-Id: <200305121825.h4CIPT0l016837@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31021 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 18:25:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=31021 Change 31021 by peter@peter_daintree on 2003/05/12 11:24:54 IFC @31020 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#27 integrate .. //depot/projects/hammer/sys/amd64/include/ucontext.h#8 integrate .. //depot/projects/hammer/sys/dev/acpica/Osd/OsdHardware.c#3 integrate .. //depot/projects/hammer/sys/dev/ata/ata-chipset.c#10 integrate .. //depot/projects/hammer/sys/dev/fxp/if_fxpreg.h#7 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#27 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.572 2003/05/12 02:37:29 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.573 2003/05/12 18:23:04 peter Exp $ */ #include "opt_atalk.h" ==== //depot/projects/hammer/sys/amd64/include/ucontext.h#8 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/ucontext.h,v 1.11 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/ucontext.h,v 1.12 2003/05/12 18:23:04 peter Exp $ */ #ifndef _MACHINE_UCONTEXT_H_ ==== //depot/projects/hammer/sys/dev/acpica/Osd/OsdHardware.c#3 (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/acpica/Osd/OsdHardware.c,v 1.6 2003/04/29 18:50:34 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.7 2003/05/12 16:54:55 njl Exp $ */ /* @@ -175,7 +175,8 @@ /* Try to get the _BBN object of the root, otherwise assume it is 0 */ bus = 0; if (root == curr) { - if (ACPI_FAILURE(acpi_EvaluateInteger(root, "_BBN", &bus))) + if (ACPI_FAILURE(acpi_EvaluateInteger(root, "_BBN", &bus)) && + bootverbose) printf("acpi_bus_number: root bus has no _BBN, assuming 0\n"); return (bus); } @@ -234,7 +235,8 @@ /* Try to read _BBN for bus number if we're at the root */ bus = 0; if (rhandle == chandle) { - if (ACPI_FAILURE(acpi_EvaluateInteger(rhandle, "_BBN", &bus))) + if (ACPI_FAILURE(acpi_EvaluateInteger(rhandle, "_BBN", &bus)) && + bootverbose) printf("AcpiOsDerivePciId: root bus has no _BBN, assuming 0\n"); } /* ==== //depot/projects/hammer/sys/dev/ata/ata-chipset.c#10 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.25 2003/05/10 14:49:19 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.26 2003/05/12 16:43:13 sos Exp $ */ #include "opt_ata.h" #include @@ -516,15 +516,15 @@ if (!error) { if (mode >= ATA_UDMA0) { ATA_OUTL(ch->r_io[ATA_BMCMD_PORT].res, - 0x24 + (devno << 3), udmatiming[mode % ATA_MODE_MASK]); + 0x24 + (devno << 3), udmatiming[mode & ATA_MODE_MASK]); } else if (mode >= ATA_WDMA0) { ATA_OUTL(ch->r_io[ATA_BMCMD_PORT].res, - 0x24 + (devno << 3), dmatiming[mode % ATA_MODE_MASK]); + 0x24 + (devno << 3), dmatiming[mode & ATA_MODE_MASK]); } else { ATA_OUTL(ch->r_io[ATA_BMCMD_PORT].res, - 0x20 + (devno << 3), piotiming[mode % ATA_MODE_MASK]); + 0x20 + (devno << 3), piotiming[mode & ATA_MODE_MASK]); } atadev->mode = mode; } ==== //depot/projects/hammer/sys/dev/fxp/if_fxpreg.h#7 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/fxp/if_fxpreg.h,v 1.33 2003/04/06 21:35:45 mux Exp $ + * $FreeBSD: src/sys/dev/fxp/if_fxpreg.h,v 1.34 2003/05/12 18:15:33 mux Exp $ */ #define FXP_VENDORID_INTEL 0x8086 @@ -362,7 +362,7 @@ u_int8_t rfax_csum_sts; u_int8_t rfax_zerocopy_sts; u_int8_t rfax_pad[8]; -}; +} __packed; #define FXP_RFAX_LEN 16 #define FXP_RFA_STATUS_RCOL 0x0001 /* receive collision */ From owner-p4-projects@FreeBSD.ORG Mon May 12 11:36:47 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BDF6E37B404; Mon, 12 May 2003 11:36:46 -0700 (PDT) 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 465E737B401 for ; Mon, 12 May 2003 11:36:46 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4C2A43FA3 for ; Mon, 12 May 2003 11:36:45 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4CIaj0U017410 for ; Mon, 12 May 2003 11:36:45 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4CIaiDT017407 for perforce@freebsd.org; Mon, 12 May 2003 11:36:45 -0700 (PDT) Date: Mon, 12 May 2003 11:36:45 -0700 (PDT) Message-Id: <200305121836.h4CIaiDT017407@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31023 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 18:36:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=31023 Change 31023 by peter@peter_daintree on 2003/05/12 11:35:46 IFC @31022 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/exception.S#10 integrate .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#11 integrate .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#28 integrate .. //depot/projects/hammer/sys/amd64/amd64/trap.c#13 integrate .. //depot/projects/hammer/sys/amd64/include/frame.h#7 integrate .. //depot/projects/hammer/sys/amd64/include/ucontext.h#9 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#10 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.108 2003/05/12 02:37:28 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.109 2003/05/12 18:33:19 peter Exp $ */ #include @@ -90,7 +90,7 @@ IDTVEC(bpt) TRAP_NOEN(T_BPTFLT) -/* Regular traps */ +/* Regular traps; The cpu does not supply tf_err for these. */ #define TRAP(a) \ subq $TF_RIP,%rsp; \ movq $(a),TF_TRAPNO(%rsp) ; \ @@ -209,9 +209,9 @@ testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz 1f /* already running with kernel GS.base */ swapgs -1: movq %rdi,TF_RDI(%rsp) - movq %cr2,%rdi - movq %rdi,TF_ADDR(%rsp) +1: movq %rdi,TF_RDI(%rsp) /* free up a GP register */ + movq %cr2,%rdi /* preserve %cr2 before .. */ + movq %rdi,TF_ADDR(%rsp) /* enabling interrupts. */ testl $PSL_I,TF_RFLAGS(%rsp) jz alltraps_pushregs_no_rdi sti ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#11 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.143 2003/05/12 02:37:29 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.144 2003/05/12 18:33:19 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#28 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.573 2003/05/12 18:23:04 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.574 2003/05/12 18:33:19 peter Exp $ */ #include "opt_atalk.h" ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#13 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.255 2003/05/11 22:55:40 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.256 2003/05/12 18:33:19 peter Exp $ */ /* ==== //depot/projects/hammer/sys/amd64/include/frame.h#7 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)frame.h 5.2 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/amd64/include/frame.h,v 1.23 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/frame.h,v 1.24 2003/05/12 18:33:19 peter Exp $ */ #ifndef _MACHINE_FRAME_H_ ==== //depot/projects/hammer/sys/amd64/include/ucontext.h#9 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/ucontext.h,v 1.12 2003/05/12 18:23:04 peter Exp $ + * $FreeBSD: src/sys/amd64/include/ucontext.h,v 1.13 2003/05/12 18:33:19 peter Exp $ */ #ifndef _MACHINE_UCONTEXT_H_ From owner-p4-projects@FreeBSD.ORG Mon May 12 11:41:54 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2B02837B404; Mon, 12 May 2003 11:41:54 -0700 (PDT) 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 C04D837B401 for ; Mon, 12 May 2003 11:41:53 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55BDF43FD7 for ; Mon, 12 May 2003 11:41:53 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4CIfr0U017686 for ; Mon, 12 May 2003 11:41:53 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4CIfqIV017683 for perforce@freebsd.org; Mon, 12 May 2003 11:41:52 -0700 (PDT) Date: Mon, 12 May 2003 11:41:52 -0700 (PDT) Message-Id: <200305121841.h4CIfqIV017683@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31025 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 18:41:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=31025 Change 31025 by peter@peter_daintree on 2003/05/12 11:41:12 IFC @31024 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#29 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#29 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.574 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.575 2003/05/12 18:37:56 peter Exp $ */ #include "opt_atalk.h" From owner-p4-projects@FreeBSD.ORG Mon May 12 13:06:39 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DA06437B404; Mon, 12 May 2003 13:06:38 -0700 (PDT) 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 6ECCE37B401 for ; Mon, 12 May 2003 13:06:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0132D43FA3 for ; Mon, 12 May 2003 13:06:38 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4CK6b0U028018 for ; Mon, 12 May 2003 13:06:37 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4CK6bCH028015 for perforce@freebsd.org; Mon, 12 May 2003 13:06:37 -0700 (PDT) Date: Mon, 12 May 2003 13:06:37 -0700 (PDT) Message-Id: <200305122006.h4CK6bCH028015@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31028 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 20:06:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=31028 Change 31028 by peter@peter_daintree on 2003/05/12 13:06:28 IFC @31027 Affected files ... .. //depot/projects/hammer/crypto/openssh/log.h#3 integrate .. //depot/projects/hammer/sys/pci/if_dc.c#10 integrate .. //depot/projects/hammer/sys/pci/if_dcreg.h#6 integrate .. //depot/projects/hammer/usr.sbin/Makefile#14 integrate .. //depot/projects/hammer/usr.sbin/pppd/main.c#3 integrate Differences ... ==== //depot/projects/hammer/crypto/openssh/log.h#3 (text+ko) ==== @@ -1,4 +1,5 @@ /* $OpenBSD: log.h,v 1.8 2002/07/19 15:43:33 markus Exp $ */ +/* $FreeBSD: src/crypto/openssh/log.h,v 1.2 2003/05/12 19:22:47 des Exp $ */ /* * Author: Tatu Ylonen @@ -53,13 +54,21 @@ SyslogFacility log_facility_number(char *); LogLevel log_level_number(char *); -void fatal(const char *, ...) __attribute__((format(printf, 1, 2))); -void error(const char *, ...) __attribute__((format(printf, 1, 2))); -void log(const char *, ...) __attribute__((format(printf, 1, 2))); -void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); -void debug(const char *, ...) __attribute__((format(printf, 1, 2))); -void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); -void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); +#define fatal ssh_fatal +#define error ssh_error +#define log ssh_log +#define verbose ssh_verbose +#define debug ssh_debug +#define debug2 ssh_debug2 +#define debug3 ssh_debug3 + +void ssh_fatal(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_error(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_log(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_verbose(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_debug(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_debug2(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_debug3(const char *, ...) __attribute__((format(printf, 1, 2))); void fatal_cleanup(void); void fatal_add_cleanup(void (*) (void *), void *); ==== //depot/projects/hammer/sys/pci/if_dc.c#10 (text+ko) ==== @@ -46,6 +46,7 @@ * Xircom X3201 (www.xircom.com) * Abocom FE2500 * Conexant LANfinity (www.conexant.com) + * 3Com OfficeConnect 10/100B 3CSOHO100B (www.3com.com) * * Datasheets for the 21143 are available at developer.intel.com. * Datasheets for the clone parts can be found at their respective sites. @@ -88,7 +89,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/pci/if_dc.c,v 1.106 2003/05/01 09:31:01 mbr Exp $"); +__FBSDID("$FreeBSD: src/sys/pci/if_dc.c,v 1.107 2003/05/12 19:50:20 mbr Exp $"); #include #include @@ -196,6 +197,8 @@ "Hawking CB102 CardBus 10/100" }, { DC_VENDORID_PLANEX, DC_DEVICEID_FNW3602T, "PlaneX FNW-3602-T CardBus 10/100" }, + { DC_VENDORID_3COM, DC_DEVICEID_3CSOHOB, + "3Com OfficeConnect 10/100B" }, { 0, 0, NULL } }; @@ -1987,6 +1990,7 @@ case DC_DEVICEID_FE2500: case DC_DEVICEID_EN2242: case DC_DEVICEID_HAWKING_PN672TX: + case DC_DEVICEID_3CSOHOB: sc->dc_type = DC_TYPE_AN985; sc->dc_flags |= DC_64BIT_HASH; sc->dc_flags |= DC_TX_USE_TX_INTR; ==== //depot/projects/hammer/sys/pci/if_dcreg.h#6 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/pci/if_dcreg.h,v 1.31 2003/04/18 15:42:25 sanpei Exp $ + * $FreeBSD: src/sys/pci/if_dcreg.h,v 1.32 2003/05/12 19:50:20 mbr Exp $ */ /* @@ -868,6 +868,16 @@ #define DC_DEVICEID_AN985 0x0985 /* + * 3COM PCI vendor ID + */ +#define DC_VENDORID_3COM 0x10b7 + +/* + * 3COM OfficeConnect 10/100B (3CSOHO100B-TX) + */ +#define DC_DEVICEID_3CSOHOB 0x9300 + +/* * ASIX vendor ID. */ #define DC_VENDORID_ASIX 0x125B ==== //depot/projects/hammer/usr.sbin/Makefile#14 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)Makefile 5.20 (Berkeley) 6/12/93 -# $FreeBSD: src/usr.sbin/Makefile,v 1.251 2003/05/09 21:06:41 peter Exp $ +# $FreeBSD: src/usr.sbin/Makefile,v 1.252 2003/05/12 18:51:31 peter Exp $ .if ${MACHINE_ARCH} != "powerpc" _sysinstall=sysinstall ==== //depot/projects/hammer/usr.sbin/pppd/main.c#3 (text+ko) ==== @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$FreeBSD: src/usr.sbin/pppd/main.c,v 1.20 2002/07/30 03:49:27 peter Exp $"; +static char rcsid[] = "$FreeBSD: src/usr.sbin/pppd/main.c,v 1.21 2003/05/12 18:51:31 peter Exp $"; #endif #include From owner-p4-projects@FreeBSD.ORG Mon May 12 17:37:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3FB9937B404; Mon, 12 May 2003 17:37:11 -0700 (PDT) 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 CA37137B401 for ; Mon, 12 May 2003 17:37:10 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7076B43FA3 for ; Mon, 12 May 2003 17:37:10 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D0bA0U047379 for ; Mon, 12 May 2003 17:37:10 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D0b9YR047376 for perforce@freebsd.org; Mon, 12 May 2003 17:37:09 -0700 (PDT) Date: Mon, 12 May 2003 17:37:09 -0700 (PDT) Message-Id: <200305130037.h4D0b9YR047376@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31037 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 00:37:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=31037 Change 31037 by jmallett@jmallett_dalek on 2003/05/12 17:36:28 Use implicit-operand-is-destination (two-register) syntax for the atomic ops so that we can fit more on one line. Remember to not (and re-not to loop) the val we and with in clear. This is significantly better than doing it before and after we loop, and thus fudging up the API here, but it would be a lot faster to avoid these nots, so probably that's a mess to be made once that matters. Affected files ... .. //depot/projects/mips/sys/mips/include/atomic.h#16 edit Differences ... ==== //depot/projects/mips/sys/mips/include/atomic.h#16 (text+ko) ==== @@ -113,10 +113,10 @@ ); \ } -ATOMIC_OP(add, "addu %[temp], %[temp], %[val]") -ATOMIC_OP(clear, "and %[temp], %[temp], %[val]") -ATOMIC_OP(set, "or %[temp], %[temp], %[val]") -ATOMIC_OP(subtract, "subu %[temp], %[temp], %[val]") +ATOMIC_OP(add, "addu %[temp], %[val]") +ATOMIC_OP(clear, "not %[val] ; and %[temp], %[val] ; not %[val]") +ATOMIC_OP(set, "or %[temp], %[val]") +ATOMIC_OP(subtract, "subu %[temp], %[val]") ATOMIC_ACQ_OP(int, add) ATOMIC_REL_OP(int, add) @@ -201,10 +201,10 @@ ); \ } -ATOMIC_DOP(add, "daddu %[temp], %[temp], %[val]") -ATOMIC_DOP(clear, "and %[temp], %[temp], %[val]") -ATOMIC_DOP(set, "or %[temp], %[temp], %[val]") -ATOMIC_DOP(subtract, "dsubu %[temp], %[temp], %[val]") +ATOMIC_DOP(add, "daddu %[temp], %[val]") +ATOMIC_DOP(clear, "not %[val] ; and %[temp], %[val] ; not %[val]") +ATOMIC_DOP(set, "or %[temp], %[val]") +ATOMIC_DOP(subtract, "dsubu %[temp], %[val]") ATOMIC_ACQ_OP(long, add) ATOMIC_REL_OP(long, add) From owner-p4-projects@FreeBSD.ORG Mon May 12 17:39:14 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C2A737B404; Mon, 12 May 2003 17:39:14 -0700 (PDT) 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 DF8E537B401 for ; Mon, 12 May 2003 17:39:13 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A44D43FB1 for ; Mon, 12 May 2003 17:39:13 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D0dD0U047444 for ; Mon, 12 May 2003 17:39:13 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D0dD1a047441 for perforce@freebsd.org; Mon, 12 May 2003 17:39:13 -0700 (PDT) Date: Mon, 12 May 2003 17:39:13 -0700 (PDT) Message-Id: <200305130039.h4D0dD1a047441@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31038 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 00:39:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=31038 Change 31038 by jmallett@jmallett_dalek on 2003/05/12 17:38:36 We're running in KSEG0 for now. Affected files ... .. //depot/projects/mips/sys/mips/include/vmparam.h#6 edit Differences ... ==== //depot/projects/mips/sys/mips/include/vmparam.h#6 (text+ko) ==== @@ -124,11 +124,11 @@ #define VM_MIN_ADDRESS ((vm_offset_t)0x0000000000000000) #define VM_MAXUSER_ADDRESS ((vm_offset_t)0xFFFFFFFF80000000) #define VM_MAX_ADDRESS ((vm_offset_t)0xFFFFFFFF80000000) -#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xFFFFFFFFC0000000) +#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xFFFFFFFF80000000) #ifdef ENABLE_MIPS_TX3900 #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFF000000) #else -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFFFFFFFFFFFFC000) +#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFFFFFFFFA0000000) #endif #define KERNBASE (VM_MIN_KERNEL_ADDRESS) From owner-p4-projects@FreeBSD.ORG Mon May 12 17:40:16 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3714A37B404; Mon, 12 May 2003 17:40:16 -0700 (PDT) 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 CC2C537B401 for ; Mon, 12 May 2003 17:40:15 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 768D043F93 for ; Mon, 12 May 2003 17:40:15 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D0eF0U047528 for ; Mon, 12 May 2003 17:40:15 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D0eETJ047523 for perforce@freebsd.org; Mon, 12 May 2003 17:40:14 -0700 (PDT) Date: Mon, 12 May 2003 17:40:14 -0700 (PDT) Message-Id: <200305130040.h4D0eETJ047523@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31039 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 00:40:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=31039 Change 31039 by jmallett@jmallett_dalek on 2003/05/12 17:40:05 Setup uarea for proc/thread0. This fixes use of a NULL resource struct, among other things. Affected files ... .. //depot/projects/mips/sys/mips/mips/machdep.c#22 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/machdep.c#22 (text+ko) ==== @@ -179,6 +179,7 @@ static struct pcpu pcpu0; struct pcpu *pcpup = &pcpu0; +char uarea0[UAREA_PAGES * PAGE_SIZE]; struct cpu_info cpu_info_store; @@ -190,6 +191,8 @@ { cpu_identify(); proc_linkup(&proc0, &ksegrp0, &kse0, &thread0); + proc0.p_uarea = (struct user *)uarea0; + proc0.p_stats = &proc0.p_uarea->u_stats; thread0.td_kstack = kstack0; pcpu_init(pcpup, 0, sizeof(struct pcpu)); pcpup->pc_curthread = &thread0; From owner-p4-projects@FreeBSD.ORG Mon May 12 17:43:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E318037B401; Mon, 12 May 2003 17:43:20 -0700 (PDT) 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 92DEC37B404 for ; Mon, 12 May 2003 17:43:20 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5F3F43FBD for ; Mon, 12 May 2003 17:43:19 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D0hJ0U047656 for ; Mon, 12 May 2003 17:43:19 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D0hJJn047653 for perforce@freebsd.org; Mon, 12 May 2003 17:43:19 -0700 (PDT) Date: Mon, 12 May 2003 17:43:19 -0700 (PDT) Message-Id: <200305130043.h4D0hJJn047653@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31040 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 00:43:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=31040 Change 31040 by jmallett@jmallett_dalek on 2003/05/12 17:42:23 Cheatingly do things in KSEG0. Instead of fooling with physmem in sgimips_machdep, fool with physsz, and convert and print it as physmem in pmap_bootstrap, as a placeholder for using this variable. Cheat and run with what we've got to work with from ARCS. Affected files ... .. //depot/projects/mips/sys/mips/include/pmap.h#8 edit .. //depot/projects/mips/sys/mips/mips/pmap.c#12 edit .. //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#15 edit Differences ... ==== //depot/projects/mips/sys/mips/include/pmap.h#8 (text+ko) ==== @@ -52,6 +52,7 @@ extern vm_offset_t avail_start; extern vm_offset_t avail_end; extern vm_offset_t phys_avail[]; +extern vm_size_t physsz; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; extern struct segtab *segbase; ==== //depot/projects/mips/sys/mips/mips/pmap.c#12 (text+ko) ==== @@ -55,6 +55,7 @@ vm_offset_t avail_start; vm_offset_t avail_end; vm_offset_t phys_avail[10]; /* XXX this is wrong */ +vm_size_t physsz; vm_offset_t virtual_avail; vm_offset_t virtual_end; @@ -177,7 +178,7 @@ vm_offset_t pmap_map(vm_offset_t *va, vm_offset_t start, vm_offset_t end, int prot) { - return (MIPS_PHYS_TO_KSEG1(start)); + return (MIPS_PHYS_TO_KSEG0(start)); } int @@ -344,6 +345,9 @@ { int i; + printf("Bootstrapping with %lu bytes of physical memory\n", physsz); + physmem = btoc(physsz); + kptemapsize = PAGE_SIZE; /* XXX placeholder */ kptemap = pmap_steal_memory(sizeof *kptemap * kptemapsize); @@ -364,8 +368,9 @@ /* * Set the start and end of kva. */ - virtual_avail = VM_MIN_KERNEL_ADDRESS; - virtual_end = VM_MAX_KERNEL_ADDRESS; + virtual_avail = avail_start; + virtual_end = avail_end; + kernel_vm_end = virtual_end; } /* ==== //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#15 (text+ko) ==== @@ -29,18 +29,19 @@ #include #include +#include +#include + #include #include #include #include +#include #include #include #include -#include -#include - #include #include @@ -143,10 +144,8 @@ first, last, mem->Type); break; } - physmem += btoc(size); + physsz += size; } - printf("total memory = %ld (%ld MB)\n", ctob(physmem), - ctob(physmem) / (1024 * 1024)); printf("ARCS memory = %d (%d KB)\n", ctob(arcsmem), ctob(arcsmem) / 1024); printf("avail memory = %d (%d MB)\n", ctob(availmem), From owner-p4-projects@FreeBSD.ORG Mon May 12 19:09:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5DA4337B404; Mon, 12 May 2003 19:09:06 -0700 (PDT) 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 11A5D37B401 for ; Mon, 12 May 2003 19:09:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CA7843FAF for ; Mon, 12 May 2003 19:09:05 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D2950U053235 for ; Mon, 12 May 2003 19:09:05 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D294xs053232 for perforce@freebsd.org; Mon, 12 May 2003 19:09:04 -0700 (PDT) Date: Mon, 12 May 2003 19:09:04 -0700 (PDT) Message-Id: <200305130209.h4D294xs053232@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31043 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 02:09:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=31043 Change 31043 by peter@peter_hammer on 2003/05/12 19:08:19 And now for something completely different... i386 binary emulation! This was submitted by p4/i386 on the amd64 box itself! Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#4 edit .. //depot/projects/hammer/sys/amd64/amd64/exception.S#11 edit .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#12 edit .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#30 edit .. //depot/projects/hammer/sys/amd64/amd64/support.S#6 edit .. //depot/projects/hammer/sys/amd64/amd64/trap.c#14 edit .. //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#6 edit .. //depot/projects/hammer/sys/amd64/conf/GENERIC#8 edit .. //depot/projects/hammer/sys/amd64/ia32/Makefile#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32.h#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_util.h#1 add .. //depot/projects/hammer/sys/amd64/ia32/syscalls.conf#1 add .. //depot/projects/hammer/sys/amd64/ia32/syscalls.master#1 add .. //depot/projects/hammer/sys/amd64/include/cpufunc.h#6 edit .. //depot/projects/hammer/sys/amd64/include/elf.h#7 edit .. //depot/projects/hammer/sys/amd64/include/pcb.h#8 edit .. //depot/projects/hammer/sys/conf/files.amd64#9 edit .. //depot/projects/hammer/sys/conf/options.amd64#8 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#4 (text+ko) ==== @@ -106,6 +106,12 @@ pushfq /* PSL */ popq PCB_RFLAGS(%r8) + /* Save kernel %gs.base */ + movl $MSR_GSBASE,%ecx + rdmsr + movl %eax,PCB_KGSBASE(%r8) + movl %edx,PCB_KGSBASE+4(%r8) + /* Save userland %fs */ movl $MSR_FSBASE,%ecx rdmsr @@ -118,6 +124,12 @@ movl %eax,PCB_GSBASE(%r8) movl %edx,PCB_GSBASE+4(%r8) + /* Save segment selector numbers */ + movl %ds,PCB_DS(%r8) + movl %es,PCB_ES(%r8) + movl %fs,PCB_FS(%r8) + movl %gs,PCB_GS(%r8) + /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) jne 1f @@ -160,6 +172,18 @@ */ movq TD_PCB(%rsi),%r8 + /* Restore segment selector numbers */ + movl PCB_DS(%r8),%ds + movl PCB_ES(%r8),%es + movl PCB_FS(%r8),%fs + movl PCB_GS(%r8),%gs + + /* Restore kernel %gs.base */ + movl $MSR_GSBASE,%ecx + movl PCB_KGSBASE(%r8),%eax + movl PCB_KGSBASE+4(%r8),%edx + wrmsr + /* Restore userland %fs */ movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#11 (text+ko) ==== @@ -247,7 +247,7 @@ movq %r14,TF_R14(%rsp) movq %r15,TF_R15(%rsp) FAKE_MCOUNT(13*4(%rsp)) - call syscall + call ia32_syscall MEXITCOUNT jmp doreti ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#12 (text+ko) ==== @@ -125,6 +125,11 @@ ASSYM(PCB_RFLAGS, offsetof(struct pcb, pcb_rflags)); ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); +ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase)); +ASSYM(PCB_DS, offsetof(struct pcb, pcb_ds)); +ASSYM(PCB_ES, offsetof(struct pcb, pcb_es)); +ASSYM(PCB_FS, offsetof(struct pcb, pcb_fs)); +ASSYM(PCB_GS, offsetof(struct pcb, pcb_gs)); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_FULLCTX, PCB_FULLCTX); @@ -181,8 +186,10 @@ ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL)); ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL)); ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL)); +ASSYM(KUC32SEL, GSEL(GUCODE32_SEL, SEL_UPL)); ASSYM(MSR_FSBASE, MSR_FSBASE); +ASSYM(MSR_GSBASE, MSR_GSBASE); ASSYM(MSR_KGSBASE, MSR_KGSBASE); ASSYM(GPROC0_SEL, GPROC0_SEL); ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#30 (text+ko) ==== @@ -129,7 +129,7 @@ static int set_fpcontext(struct thread *td, const mcontext_t *mcp); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) -int _udatasel, _ucodesel; +int _udatasel, _ucodesel, _ucode32sel; u_long atdevbase; u_int64_t modulep; /* phys addr of metadata table */ @@ -466,11 +466,25 @@ { struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; + u_int64_t pc; + wrmsr(MSR_FSBASE, 0); + wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ pcb->pcb_fsbase = 0; pcb->pcb_gsbase = 0; - wrmsr(MSR_FSBASE, 0); - wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ + pcb->pcb_kgsbase = rdmsr(MSR_GSBASE); + load_ds(_udatasel); + load_es(_udatasel); + load_fs(_udatasel); + critical_enter(); + pc = rdmsr(MSR_GSBASE); + load_gs(_udatasel); /* Clobbers kernel %GS.base */ + wrmsr(MSR_GSBASE, pc); + critical_exit(); + pcb->pcb_ds = _udatasel; + pcb->pcb_es = _udatasel; + pcb->pcb_fs = _udatasel; + pcb->pcb_gs = _udatasel; bzero((char *)regs, sizeof(struct trapframe)); regs->tf_rip = entry; @@ -589,7 +603,7 @@ 0xfffff, /* length - all address space */ SDT_MEMERA, /* segment type */ SEL_UPL, /* segment descriptor priority level */ - 0, /* segment descriptor present */ + 1, /* segment descriptor present */ 0, /* long */ 1, /* default 32 vs 16 bit size */ 1 /* limit granularity (byte/page units)*/ }, @@ -1289,10 +1303,12 @@ _ucodesel = GSEL(GUCODE_SEL, SEL_UPL); _udatasel = GSEL(GUDATA_SEL, SEL_UPL); + _ucode32sel = GSEL(GUCODE32_SEL, SEL_UPL); /* setup proc 0's pcb */ thread0.td_pcb->pcb_flags = 0; /* XXXKSE */ thread0.td_pcb->pcb_cr3 = IdlePML4; + thread0.td_pcb->pcb_kgsbase = (u_int64_t)pc; thread0.td_frame = &proc0_tf; } ==== //depot/projects/hammer/sys/amd64/amd64/support.S#6 (text+ko) ==== @@ -358,6 +358,9 @@ movq $0,PCB_ONFAULT(%rcx) ret +ENTRY(fuword) + jmp fuword64 + ENTRY(fuword32) movq PCPU(CURPCB),%rcx movq $fusufault,PCB_ONFAULT(%rcx) @@ -366,15 +369,10 @@ cmpq %rax,%rdi /* verify address is valid */ ja fusufault -/* XXX use the 64 extend */ - xorq %rax, %rax movl (%rdi),%eax movq $0,PCB_ONFAULT(%rcx) ret -ENTRY(fuword) - jmp fuword32 - /* * These two routines are called from the profiling code, potentially * at interrupt time. If they fail, that's okay, good things will @@ -397,8 +395,6 @@ cmpq %rax,%rdi ja fusufault -/* XXX use the 64 extend */ - xorq %rax, %rax movzwl (%rdi),%eax movq $0,PCB_ONFAULT(%rcx) ret @@ -414,8 +410,6 @@ cmpq %rax,%rdi ja fusufault -/* XXX use the 64 extend */ - xorq %rax, %rax movzbl (%rdi),%eax movq $0,PCB_ONFAULT(%rcx) ret @@ -448,6 +442,9 @@ movq %rax,PCB_ONFAULT(%rcx) ret +ENTRY(suword) + jmp suword64 + ENTRY(suword32) movq PCPU(CURPCB),%rcx movq $fusufault,PCB_ONFAULT(%rcx) @@ -462,9 +459,6 @@ movq %rax,PCB_ONFAULT(%rcx) ret -ENTRY(suword) - jmp suword32 - /* * suword16 - MP SAFE */ ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#14 (text+ko) ==== @@ -91,7 +91,7 @@ extern void trap(struct trapframe frame); extern void syscall(struct trapframe frame); -static int trap_pfault(struct trapframe *, int, vm_offset_t); +static int trap_pfault(struct trapframe *, int); static void trap_fatal(struct trapframe *, vm_offset_t); void dblfault_handler(void); @@ -161,13 +161,13 @@ struct proc *p = td->td_proc; u_int sticks = 0; int i = 0, ucode = 0, type, code; - vm_offset_t eva; atomic_add_int(&cnt.v_trap, 1); type = frame.tf_trapno; #ifdef DDB if (db_active) { + vm_offset_t eva; eva = (type == T_PAGEFLT ? frame.tf_addr : 0); trap_fatal(&frame, eva); goto out; @@ -202,7 +202,6 @@ } } - eva = 0; code = frame.tf_err; if (type == T_PAGEFLT) { /* @@ -213,9 +212,8 @@ * kernel can print out a useful trap message and even get * to the debugger. */ - eva = frame.tf_addr; if (PCPU_GET(spinlocks) != NULL) - trap_fatal(&frame, eva); + trap_fatal(&frame, frame.tf_addr); } #ifdef DEVICE_POLLING @@ -261,7 +259,7 @@ break; case T_PAGEFLT: /* page fault */ - i = trap_pfault(&frame, TRUE, eva); + i = trap_pfault(&frame, TRUE); if (i == -1) goto userout; if (i == 0) @@ -331,7 +329,7 @@ ("kernel trap doesn't have ucred")); switch (type) { case T_PAGEFLT: /* page fault */ - (void) trap_pfault(&frame, FALSE, eva); + (void) trap_pfault(&frame, FALSE); goto out; case T_DNA: @@ -430,7 +428,7 @@ #endif /* DEV_ISA */ } - trap_fatal(&frame, eva); + trap_fatal(&frame, 0); goto out; } @@ -445,7 +443,7 @@ uprintf("fatal process exception: %s", trap_msg[type]); if ((type == T_PAGEFLT) || (type == T_PROTFLT)) - uprintf(", fault VA = 0x%lx", eva); + uprintf(", fault VA = 0x%lx", frame.tf_addr); uprintf("\n"); } #endif @@ -462,10 +460,9 @@ } static int -trap_pfault(frame, usermode, eva) +trap_pfault(frame, usermode) struct trapframe *frame; int usermode; - vm_offset_t eva; { vm_offset_t va; struct vmspace *vm = NULL; @@ -474,6 +471,7 @@ vm_prot_t ftype; struct thread *td = curthread; struct proc *p = td->td_proc; + vm_offset_t eva = frame->tf_addr; va = trunc_page(eva); if (va >= KERNBASE) { @@ -542,7 +540,7 @@ return (-1); } -printf("trap_pfault: pid %d %s %s %s eva %p, rip %p, rax %p, rbx %p, rcx %p, rdx %p, rsp %p, rvp %p, rsi %p, rdi %p\n", p->p_pid, +printf("trap_pfault: pid %d %s %s %s eva %p, rip %p, rax %p, rbx %p, rcx %p, rdx %p, rsp %p, rbp %p, rsi %p, rdi %p\n", p->p_pid, frame->tf_err & PGEX_U ? "user" : "supervisor", frame->tf_err & PGEX_W ? "write" : "read", frame->tf_err & PGEX_P ? "protection violation" : "page not present", @@ -820,3 +818,173 @@ mtx_assert(&Giant, MA_NOTOWNED); } +void ia32_syscall(struct trapframe frame); +void +ia32_syscall(struct trapframe frame) +{ + caddr_t params; + int i; + struct sysent *callp; + struct thread *td = curthread; + struct proc *p = td->td_proc; + register_t orig_tf_rflags; + u_int sticks; + int error; + int narg; + u_int32_t args[8]; + u_int64_t args64[8]; + u_int code; + + /* + * note: PCPU_LAZY_INC() can only be used if we can afford + * occassional inaccuracy in the count. + */ + cnt.v_syscall++; + + sticks = td->td_sticks; + td->td_frame = &frame; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + params = (caddr_t)frame.tf_rsp + sizeof(u_int32_t); + code = frame.tf_rax; + orig_tf_rflags = frame.tf_rflags; + + if (p->p_sysent->sv_prepsyscall) { + /* + * The prep code is MP aware. + */ + (*p->p_sysent->sv_prepsyscall)(&frame, args, &code, ¶ms); + } else { + /* + * Need to check if this is a 32 bit or 64 bit syscall. + * fuword is MP aware. + */ + if (code == SYS_syscall) { + /* + * Code is first argument, followed by actual args. + */ + code = fuword32(params); + params += sizeof(int); + } else if (code == SYS___syscall) { + /* + * Like syscall, but code is a quad, so as to maintain + * quad alignment for the rest of the arguments. + * We use a 32-bit fetch in case params is not + * aligned. + */ + code = fuword32(params); + params += sizeof(quad_t); + } + } + + if (p->p_sysent->sv_mask) + code &= p->p_sysent->sv_mask; + + if (code >= p->p_sysent->sv_size) + callp = &p->p_sysent->sv_table[0]; + else + callp = &p->p_sysent->sv_table[code]; + + narg = callp->sy_narg & SYF_ARGMASK; + + /* + * copyin and the ktrsyscall()/ktrsysret() code is MP-aware + */ + if (params != NULL && narg != 0) + error = copyin(params, (caddr_t)args, + (u_int)(narg * sizeof(int))); + else + error = 0; + + for (i = 0; i < narg; i++) + args64[i] = args[i]; + +#ifdef KTRACE + if (KTRPOINT(td, KTR_SYSCALL)) + ktrsyscall(code, narg, args64); +#endif + /* + * Try to run the syscall without Giant if the syscall + * is MP safe. + */ + if ((callp->sy_narg & SYF_MPSAFE) == 0) + mtx_lock(&Giant); + + if (error == 0) { + td->td_retval[0] = 0; + td->td_retval[1] = frame.tf_rdx; + + STOPEVENT(p, S_SCE, narg); + + error = (*callp->sy_call)(td, args64); + } + + switch (error) { + case 0: + frame.tf_rax = td->td_retval[0]; + frame.tf_rdx = td->td_retval[1]; + frame.tf_rflags &= ~PSL_C; + break; + + case ERESTART: + /* + * Reconstruct pc, assuming lcall $X,y is 7 bytes, + * int 0x80 is 2 bytes. We saved this in tf_err. + */ + frame.tf_rip -= frame.tf_err; + break; + + case EJUSTRETURN: + break; + + default: + if (p->p_sysent->sv_errsize) { + if (error >= p->p_sysent->sv_errsize) + error = -1; /* XXX */ + else + error = p->p_sysent->sv_errtbl[error]; + } + frame.tf_rax = error; + frame.tf_rflags |= PSL_C; + break; + } + + /* + * Release Giant if we previously set it. + */ + if ((callp->sy_narg & SYF_MPSAFE) == 0) + mtx_unlock(&Giant); + + /* + * Traced syscall. + */ + if (orig_tf_rflags & PSL_T) { + frame.tf_rflags &= ~PSL_T; + trapsignal(td, SIGTRAP, 0); + } + + /* + * Handle reschedule and other end-of-syscall issues + */ + userret(td, &frame, sticks); + +#ifdef KTRACE + if (KTRPOINT(td, KTR_SYSRET)) + ktrsysret(code, error, td->td_retval[0]); +#endif + + /* + * This works because errno is findable through the + * register set. If we ever support an emulation where this + * is not the case, this code will need to be revisited. + */ + STOPEVENT(p, S_SCX, code); + +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); + mtx_assert(&sched_lock, MA_NOTOWNED); + mtx_assert(&Giant, MA_NOTOWNED); +} ==== //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#6 (text+ko) ==== @@ -76,7 +76,6 @@ #include static void cpu_reset_real(void); -extern int _ucodesel, _udatasel; /* * Finish a fork operation, with process p2 nearly set up. @@ -143,6 +142,7 @@ * pcb2->pcb_savefpu: cloned above. * pcb2->pcb_flags: cloned above. * pcb2->pcb_onfault: cloned above (always NULL here?). + * pcb2->pcb_[fg]sbase: cloned above */ /* ==== //depot/projects/hammer/sys/amd64/conf/GENERIC#8 (text+ko) ==== @@ -23,6 +23,7 @@ ident GENERIC maxusers 0 options NDA #Avoid accidental cut/paste of NDA'ed stuff +options IA32 makeoptions NO_MODULES=not_yet @@ -42,6 +43,10 @@ options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options SYSVMSG +options SYSVSEM +options SYSVSHM + device isa device pci ==== //depot/projects/hammer/sys/amd64/include/cpufunc.h#6 (text+ko) ==== @@ -447,7 +447,6 @@ __asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory"); } -/* XXX these are replaced with rdmsr/wrmsr */ static __inline u_int rfs(void) { @@ -465,6 +464,18 @@ } static __inline void +load_ds(u_int sel) +{ + __asm __volatile("movl %0,%%ds" : : "rm" (sel)); +} + +static __inline void +load_es(u_int sel) +{ + __asm __volatile("movl %0,%%es" : : "rm" (sel)); +} + +static __inline void load_fs(u_int sel) { __asm __volatile("movl %0,%%fs" : : "rm" (sel)); ==== //depot/projects/hammer/sys/amd64/include/elf.h#7 (text+ko) ==== @@ -33,9 +33,12 @@ * ELF definitions for the AMD64 architecture. */ -#include /* Definitions common to all 64 bit architectures. */ +#ifndef __ELF_WORD_SIZE #define __ELF_WORD_SIZE 64 /* Used by */ +#endif +#include /* Definitions common to all 32 bit architectures. */ +#include /* Definitions common to all 64 bit architectures. */ #include #define ELF_ARCH EM_X86_64 @@ -48,6 +51,13 @@ * The i386 supplement to the SVR4 ABI specification names this "auxv_t", * but POSIX lays claim to all symbols ending with "_t". */ +typedef struct { /* Auxiliary vector entry on initial stack */ + int a_type; /* Entry type. */ + union { + int a_val; /* Integer value. */ + } a_un; +} Elf32_Auxinfo; + typedef struct { /* Auxiliary vector entry on initial stack */ long a_type; /* Entry type. */ @@ -118,7 +128,11 @@ #define R_X86_64_COUNT 16 /* Count of defined relocation types. */ /* Define "machine" characteristics */ -#define ELF_TARG_CLASS ELFCLASS64 +#if __ELF_WORD_SIZE == 32 +#define ELF_TARG_CLASS ELFCLASS32 +#else +#define ELF_TARG_CLASS ELFCLASS64 +#endif #define ELF_TARG_DATA ELFDATA2LSB #define ELF_TARG_MACH EM_X86_64 #define ELF_TARG_VER 1 ==== //depot/projects/hammer/sys/amd64/include/pcb.h#8 (text+ko) ==== @@ -59,6 +59,11 @@ register_t pcb_rflags; register_t pcb_fsbase; register_t pcb_gsbase; + register_t pcb_kgsbase; + u_int32_t pcb_ds; + u_int32_t pcb_es; + u_int32_t pcb_fs; + u_int32_t pcb_gs; struct savefpu pcb_save; u_long pcb_flags; ==== //depot/projects/hammer/sys/conf/files.amd64#9 (text+ko) ==== @@ -64,7 +64,10 @@ amd64/pci/pci_cfgreg.c optional pci amd64/pci/pci_bus.c optional pci - +amd64/ia32/ia32_misc.c optional ia32 +amd64/ia32/ia32_sysent.c optional ia32 +amd64/ia32/ia32_sysvec.c optional ia32 +kern/imgact_elf32.c optional ia32 # This file tells config what files go into building a kernel, # files marked standard are always included. ==== //depot/projects/hammer/sys/conf/options.amd64#8 (text+ko) ==== @@ -60,3 +60,4 @@ PSM_HOOKRESUME opt_psm.h PSM_RESETAFTERSUSPEND opt_psm.h PSM_DEBUG opt_psm.h +IA32 From owner-p4-projects@FreeBSD.ORG Mon May 12 20:20:34 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 25ED637B404; Mon, 12 May 2003 20:20:34 -0700 (PDT) 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 9BBA437B401 for ; Mon, 12 May 2003 20:20:33 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3919D43FB1 for ; Mon, 12 May 2003 20:20:33 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D3KX0U057045 for ; Mon, 12 May 2003 20:20:33 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D3KWOB057042 for perforce@freebsd.org; Mon, 12 May 2003 20:20:32 -0700 (PDT) Date: Mon, 12 May 2003 20:20:32 -0700 (PDT) Message-Id: <200305130320.h4D3KWOB057042@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31046 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 03:20:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=31046 Change 31046 by marcel@marcel_nfs on 2003/05/12 20:19:31 I don't know what I've been drinking or smoking, but using a stacked register while switching the register stack can only be bad news. So, use r14/r15 instead of r31/r32. We could continue to use r31 of course, but r15 pairs better with r14 than r31 does. This significantly improves the stability under high load. While here, define savectx(x) as swapctx(x,NULL) instead of as savectx__(x). The latter was implemented as swapctx() anyway. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/context.s#17 edit .. //depot/projects/ia64_epc/sys/ia64/include/pcb.h#9 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/context.s#17 (text+ko) ==== @@ -50,7 +50,7 @@ { .mmi ld8 r17=[r30],16 // rp ld8 r18=[r31],16 // pr - add r32=SIZEOF_SPECIAL,r32 + add r14=SIZEOF_SPECIAL,r32 ;; } { .mmi @@ -66,7 +66,7 @@ ;; } { .mmi - ld8 r17=[r32],8 // unat (after) + ld8 r17=[r14],8 // unat (after) mov ar.bspstore=r20 mov ar.pfs=r19 ;; @@ -74,18 +74,18 @@ { .mmi mov ar.unat=r17 mov ar.rnat=r21 - add r31=8,r32 + add r15=8,r14 ;; } { .mmi - ld8.fill r4=[r32],16 // r4 - ld8.fill r5=[r31],16 // r5 + ld8.fill r4=[r14],16 // r4 + ld8.fill r5=[r15],16 // r5 nop 0 ;; } { .mmi - ld8.fill r6=[r32],16 // r6 - ld8.fill r7=[r31],16 // r7 + ld8.fill r6=[r14],16 // r6 + ld8.fill r7=[r15],16 // r7 nop 1 ;; } @@ -95,86 +95,76 @@ nop 2 } { .mmi - ld8 r17=[r32],16 // b1 - ld8 r18=[r31],16 // b2 + ld8 r17=[r14],16 // b1 + ld8 r18=[r15],16 // b2 nop 3 ;; } { .mmi - ld8 r19=[r32],16 // b3 - ld8 r20=[r31],16 // b4 + ld8 r19=[r14],16 // b3 + ld8 r20=[r15],16 // b4 mov b1=r17 ;; } { .mmi - ld8 r16=[r32],24 // b5 - ld8 r17=[r31],32 // lc + ld8 r16=[r14],24 // b5 + ld8 r17=[r15],32 // lc mov b2=r18 ;; } { .mmi - ldf.fill f2=[r32],32 - ldf.fill f3=[r31],32 + ldf.fill f2=[r14],32 + ldf.fill f3=[r15],32 mov b3=r19 ;; } { .mmi - ldf.fill f4=[r32],32 - ldf.fill f5=[r31],32 + ldf.fill f4=[r14],32 + ldf.fill f5=[r15],32 mov b4=r20 ;; } { .mmi - ldf.fill f16=[r32],32 - ldf.fill f17=[r31],32 + ldf.fill f16=[r14],32 + ldf.fill f17=[r15],32 mov b5=r16 ;; } { .mmi - ldf.fill f18=[r32],32 - ldf.fill f19=[r31],32 + ldf.fill f18=[r14],32 + ldf.fill f19=[r15],32 mov ar.lc=r17 ;; } - ldf.fill f20=[r32],32 - ldf.fill f21=[r31],32 + ldf.fill f20=[r14],32 + ldf.fill f21=[r15],32 ;; - ldf.fill f22=[r32],32 - ldf.fill f23=[r31],32 + ldf.fill f22=[r14],32 + ldf.fill f23=[r15],32 ;; - ldf.fill f24=[r32],32 - ldf.fill f25=[r31],32 + ldf.fill f24=[r14],32 + ldf.fill f25=[r15],32 ;; - ldf.fill f26=[r32],32 - ldf.fill f27=[r31],32 + ldf.fill f26=[r14],32 + ldf.fill f27=[r15],32 ;; { .mmi - ldf.fill f28=[r32],32 - ldf.fill f29=[r31],32 + ldf.fill f28=[r14],32 + ldf.fill f29=[r15],32 add r8=1,r0 ;; } { .mmb - ldf.fill f30=[r32] - ldf.fill f31=[r31] + ldf.fill f30=[r14] + ldf.fill f31=[r15] br.ret.sptk rp ;; } END(restorectx) /* - * void savectx__(struct pcb *) * void swapctx(struct pcb *old, struct pcb *new) */ - -ENTRY(savectx__,1) -{ .mib - alloc r16=ar.pfs,1,1,0,0 - add r33=0,r0 - nop 0 - ;; -} - /* FALLTHROUGH */ ENTRY(swapctx, 2) { .mmi ==== //depot/projects/ia64_epc/sys/ia64/include/pcb.h#9 (text+ko) ==== @@ -59,10 +59,9 @@ #ifdef _KERNEL -#define savectx savectx__ +#define savectx(p) swapctx(p, NULL) void restorectx(struct pcb *) __dead2; -int savectx(struct pcb *); -void swapctx(struct pcb *old, struct pcb *new); +int swapctx(struct pcb *old, struct pcb *new); #if IA32 void ia32_restorectx(struct pcb *); From owner-p4-projects@FreeBSD.ORG Mon May 12 21:15:41 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E0C0437B404; Mon, 12 May 2003 21:15:40 -0700 (PDT) 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 91E5137B401 for ; Mon, 12 May 2003 21:15:40 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D7DB43F93 for ; Mon, 12 May 2003 21:15:40 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D4Fe0U065412 for ; Mon, 12 May 2003 21:15:40 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D4FdPk065409 for perforce@freebsd.org; Mon, 12 May 2003 21:15:39 -0700 (PDT) Date: Mon, 12 May 2003 21:15:39 -0700 (PDT) Message-Id: <200305130415.h4D4FdPk065409@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31047 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 04:15:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=31047 Change 31047 by jmallett@jmallett_dalek on 2003/05/12 21:15:33 Fix things without loader, if nbuckets is 0, don't look in the hash, that's a divide by zero. Affected files ... .. //depot/projects/mips/sys/kern/link_elf.c#8 edit Differences ... ==== //depot/projects/mips/sys/kern/link_elf.c#8 (text+ko) ==== @@ -1003,9 +1003,12 @@ unsigned long hash; int i; - /* First, search hashed global symbols */ - hash = elf_hash(name); - symnum = ef->buckets[hash % ef->nbuckets]; + /* First, search hashed global symbols, if we have any */ + if (ef->nbuckets != 0) { + hash = elf_hash(name); + symnum = ef->buckets[hash % ef->nbuckets]; + } else + symnum = STN_UNDEF; while (symnum != STN_UNDEF) { if (symnum >= ef->nchains) { From owner-p4-projects@FreeBSD.ORG Mon May 12 21:22:53 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7EBC737B404; Mon, 12 May 2003 21:22:52 -0700 (PDT) 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 286B837B401 for ; Mon, 12 May 2003 21:22:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5FB243F75 for ; Mon, 12 May 2003 21:22:50 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D4Mo0U065867 for ; Mon, 12 May 2003 21:22:50 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D4MnOW065844 for perforce@freebsd.org; Mon, 12 May 2003 21:22:49 -0700 (PDT) Date: Mon, 12 May 2003 21:22:49 -0700 (PDT) Message-Id: <200305130422.h4D4MnOW065844@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31048 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 04:22:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=31048 Change 31048 by marcel@marcel_pluto1 on 2003/05/12 21:22:18 IFC @31036 Affected files ... .. //depot/projects/ia64/bin/echo/echo.1#3 integrate .. //depot/projects/ia64/contrib/gcc/config/i386/freebsd.h#16 integrate .. //depot/projects/ia64/crypto/openssh/log.h#5 integrate .. //depot/projects/ia64/crypto/telnet/telnet/commands.c#9 integrate .. //depot/projects/ia64/crypto/telnet/telnet/externs.h#3 integrate .. //depot/projects/ia64/crypto/telnet/telnet/main.c#5 integrate .. //depot/projects/ia64/crypto/telnet/telnet/telnet.c#5 integrate .. //depot/projects/ia64/crypto/telnet/telnetd/telnetd.c#4 integrate .. //depot/projects/ia64/etc/devd.conf#5 integrate .. //depot/projects/ia64/etc/network.subr#3 integrate .. //depot/projects/ia64/etc/pccard_ether#6 integrate .. //depot/projects/ia64/etc/rc.d/network_ipv6#5 integrate .. //depot/projects/ia64/kerberos5/include/config.h#7 integrate .. //depot/projects/ia64/kerberos5/usr.bin/kadmin/Makefile#2 integrate .. //depot/projects/ia64/kerberos5/usr.sbin/ktutil/Makefile#6 integrate .. //depot/projects/ia64/lib/libc/alpha/arith.h#2 integrate .. //depot/projects/ia64/lib/libc/amd64/arith.h#3 integrate .. //depot/projects/ia64/lib/libc/amd64/gen/Makefile.inc#3 integrate .. //depot/projects/ia64/lib/libc/amd64/gen/ldexp.c#1 branch .. //depot/projects/ia64/lib/libc/amd64/gen/setjmp.S#3 integrate .. //depot/projects/ia64/lib/libc/i386/arith.h#2 integrate .. //depot/projects/ia64/lib/libc/ia64/arith.h#2 integrate .. //depot/projects/ia64/lib/libc/powerpc/arith.h#2 integrate .. //depot/projects/ia64/lib/libc/sparc64/arith.h#2 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_kern.c#4 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_mutex.c#3 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_private.h#2 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_sig.c#3 integrate .. //depot/projects/ia64/lib/libwrap/Makefile#4 integrate .. //depot/projects/ia64/libexec/Makefile#15 integrate .. //depot/projects/ia64/libexec/telnetd/global.c#2 integrate .. //depot/projects/ia64/libexec/telnetd/slc.c#3 integrate .. //depot/projects/ia64/libexec/telnetd/state.c#4 integrate .. //depot/projects/ia64/libexec/telnetd/sys_term.c#6 integrate .. //depot/projects/ia64/libexec/telnetd/telnetd.c#3 integrate .. //depot/projects/ia64/libexec/telnetd/termstat.c#3 integrate .. //depot/projects/ia64/libexec/telnetd/utility.c#3 integrate .. //depot/projects/ia64/release/alpha/drivers.conf#11 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#48 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#90 integrate .. //depot/projects/ia64/release/i386/drivers.conf#19 integrate .. //depot/projects/ia64/release/scripts/doFS.sh#15 integrate .. //depot/projects/ia64/release/scripts/print-cdrom-packages.sh#24 integrate .. //depot/projects/ia64/sbin/bsdlabel/bsdlabel.c#5 integrate .. //depot/projects/ia64/sbin/growfs/growfs.c#10 integrate .. //depot/projects/ia64/sbin/ldconfig/ldconfig.8#4 integrate .. //depot/projects/ia64/sbin/mount_nfs/mount_nfs.8#8 integrate .. //depot/projects/ia64/sbin/mount_nfs/mount_nfs.c#13 integrate .. //depot/projects/ia64/sbin/newfs/mkfs.c#28 integrate .. //depot/projects/ia64/share/examples/netgraph/bluetooth/rc.bluetooth#1 branch .. //depot/projects/ia64/share/man/man4/Makefile#43 integrate .. //depot/projects/ia64/share/man/man4/agp.4#3 integrate .. //depot/projects/ia64/share/man/man4/dc.4#4 integrate .. //depot/projects/ia64/share/man/man4/man4.i386/gsc.4#3 integrate .. //depot/projects/ia64/share/man/man4/ng_bluetooth.4#4 integrate .. //depot/projects/ia64/share/man/man4/ng_bt3c.4#3 integrate .. //depot/projects/ia64/share/man/man4/ng_btsocket.4#4 integrate .. //depot/projects/ia64/share/man/man4/ng_h4.4#3 integrate .. //depot/projects/ia64/share/man/man4/ng_hci.4#4 integrate .. //depot/projects/ia64/share/man/man4/ng_l2cap.4#3 integrate .. //depot/projects/ia64/share/man/man4/ng_ubt.4#3 integrate .. //depot/projects/ia64/share/man/man4/ubtbcmfw.4#1 branch .. //depot/projects/ia64/share/man/man4/umass.4#8 integrate .. //depot/projects/ia64/share/man/man5/procfs.5#5 integrate .. //depot/projects/ia64/share/man/man8/Makefile#8 integrate .. //depot/projects/ia64/share/man/man9/Makefile#21 integrate .. //depot/projects/ia64/sys/amd64/amd64/cpu_switch.S#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/elf_machdep.c#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/exception.S#3 integrate .. //depot/projects/ia64/sys/amd64/amd64/genassym.c#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/identcpu.c#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/machdep.c#3 integrate .. //depot/projects/ia64/sys/amd64/amd64/nexus.c#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/pmap.c#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/support.S#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/sys_machdep.c#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/trap.c#2 integrate .. //depot/projects/ia64/sys/amd64/conf/GENERIC#2 integrate .. //depot/projects/ia64/sys/amd64/include/_types.h#3 integrate .. //depot/projects/ia64/sys/amd64/include/asm.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/bus.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/bus_amd64.h#1 branch .. //depot/projects/ia64/sys/amd64/include/bus_at386.h#2 delete .. //depot/projects/ia64/sys/amd64/include/bus_dma.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/bus_memio.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/bus_pio.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/frame.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/md_var.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/npx.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/pcb.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/stdarg.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/sysarch.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/ucontext.h#2 integrate .. //depot/projects/ia64/sys/amd64/isa/icu_vector.S#2 integrate .. //depot/projects/ia64/sys/boot/common/load_elf.c#12 integrate .. //depot/projects/ia64/sys/boot/i386/libi386/elf64_freebsd.c#2 integrate .. //depot/projects/ia64/sys/boot/i386/libi386/i386_module.c#6 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4.h#2 integrate .. //depot/projects/ia64/sys/conf/Makefile.amd64#3 integrate .. //depot/projects/ia64/sys/conf/files#78 integrate .. //depot/projects/ia64/sys/conf/majors#22 integrate .. //depot/projects/ia64/sys/dev/acpica/Osd/OsdHardware.c#6 integrate .. //depot/projects/ia64/sys/dev/ata/ata-card.c#9 integrate .. //depot/projects/ia64/sys/dev/ata/ata-chipset.c#14 integrate .. //depot/projects/ia64/sys/dev/ata/ata-pci.h#9 integrate .. //depot/projects/ia64/sys/dev/ata/ata-raid.c#22 integrate .. //depot/projects/ia64/sys/dev/firewire/firewire.c#28 integrate .. //depot/projects/ia64/sys/dev/firewire/sbp.c#32 integrate .. //depot/projects/ia64/sys/dev/fxp/if_fxpreg.h#5 integrate .. //depot/projects/ia64/sys/dev/ips/ips.c#1 branch .. //depot/projects/ia64/sys/dev/ips/ips.h#1 branch .. //depot/projects/ia64/sys/dev/ips/ips_commands.c#1 branch .. //depot/projects/ia64/sys/dev/ips/ips_disk.c#1 branch .. //depot/projects/ia64/sys/dev/ips/ips_disk.h#1 branch .. //depot/projects/ia64/sys/dev/ips/ips_ioctl.c#1 branch .. //depot/projects/ia64/sys/dev/ips/ips_ioctl.h#1 branch .. //depot/projects/ia64/sys/dev/ips/ips_pci.c#1 branch .. //depot/projects/ia64/sys/dev/kbd/atkbdc.c#7 integrate .. //depot/projects/ia64/sys/dev/syscons/syscons.c#19 integrate .. //depot/projects/ia64/sys/dev/usb/umass.c#25 integrate .. //depot/projects/ia64/sys/dev/usb/usbdevs#35 integrate .. //depot/projects/ia64/sys/dev/usb/usbdevs.h#34 integrate .. //depot/projects/ia64/sys/dev/usb/usbdevs_data.h#34 integrate .. //depot/projects/ia64/sys/geom/geom_dev.c#35 integrate .. //depot/projects/ia64/sys/geom/geom_disk.c#32 integrate .. //depot/projects/ia64/sys/i386/conf/GENERIC#34 integrate .. //depot/projects/ia64/sys/i386/conf/NOTES#40 integrate .. //depot/projects/ia64/sys/i386/linux/linux_sysvec.c#23 integrate .. //depot/projects/ia64/sys/kern/kern_mac.c#26 integrate .. //depot/projects/ia64/sys/kern/kern_malloc.c#22 integrate .. //depot/projects/ia64/sys/kern/kern_sig.c#49 integrate .. //depot/projects/ia64/sys/kern/link_elf.c#18 integrate .. //depot/projects/ia64/sys/kern/subr_mbuf.c#25 integrate .. //depot/projects/ia64/sys/kern/vfs_subr.c#46 integrate .. //depot/projects/ia64/sys/modules/Makefile#48 integrate .. //depot/projects/ia64/sys/modules/ips/Makefile#1 branch .. //depot/projects/ia64/sys/modules/netgraph/bluetooth/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/netgraph/bluetooth/bluetooth/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/netgraph/bluetooth/bt3c/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/netgraph/bluetooth/h4/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/netgraph/bluetooth/hci/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/netgraph/bluetooth/l2cap/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/netgraph/bluetooth/socket/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/netgraph/bluetooth/ubt/Makefile#2 integrate .. //depot/projects/ia64/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#1 branch .. //depot/projects/ia64/sys/netgraph/bluetooth/common/ng_bluetooth.c#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/ubt/TODO#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#6 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#1 branch .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/TODO#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_cmds.c#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_cmds.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_evnt.c#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_evnt.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_main.c#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_misc.c#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_misc.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_prse.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/hci/ng_hci_var.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_bluetooth.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_bt3c.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_btsocket.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h#1 branch .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_h4.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_hci.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_l2cap.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/include/ng_ubt.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/TODO#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c#4 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_prse.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/socket/TODO#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/socket/ng_btsocket.c#2 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#7 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#6 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#5 integrate .. //depot/projects/ia64/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#1 branch .. //depot/projects/ia64/sys/pci/if_dc.c#34 integrate .. //depot/projects/ia64/sys/pci/if_dcreg.h#11 integrate .. //depot/projects/ia64/sys/sys/_label.h#4 integrate .. //depot/projects/ia64/sys/sys/mbuf.h#23 integrate .. //depot/projects/ia64/sys/vm/vm_object.c#53 integrate .. //depot/projects/ia64/usr.bin/bluetooth/Makefile#4 integrate .. //depot/projects/ia64/usr.bin/bluetooth/btsockstat/Makefile#4 integrate .. //depot/projects/ia64/usr.bin/bluetooth/btsockstat/btsockstat.1#5 integrate .. //depot/projects/ia64/usr.bin/bluetooth/btsockstat/btsockstat.c#4 integrate .. //depot/projects/ia64/usr.bin/bluetooth/rfcomm_sppd/Makefile#1 branch .. //depot/projects/ia64/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1#1 branch .. //depot/projects/ia64/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c#1 branch .. //depot/projects/ia64/usr.bin/sockstat/sockstat.c#3 integrate .. //depot/projects/ia64/usr.bin/stat/stat.1#3 integrate .. //depot/projects/ia64/usr.bin/stat/stat.c#5 integrate .. //depot/projects/ia64/usr.bin/telnet/commands.c#8 integrate .. //depot/projects/ia64/usr.bin/telnet/externs.h#3 integrate .. //depot/projects/ia64/usr.bin/telnet/main.c#5 integrate .. //depot/projects/ia64/usr.bin/telnet/network.c#4 integrate .. //depot/projects/ia64/usr.bin/telnet/ring.c#3 integrate .. //depot/projects/ia64/usr.bin/telnet/sys_bsd.c#5 integrate .. //depot/projects/ia64/usr.bin/telnet/telnet.c#6 integrate .. //depot/projects/ia64/usr.bin/telnet/terminal.c#4 integrate .. //depot/projects/ia64/usr.bin/telnet/utilities.c#4 integrate .. //depot/projects/ia64/usr.sbin/Makefile#37 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/Makefile#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/bcmfw/BCM-LEGAL.txt#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/bcmfw/Makefile#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/bcmfw/README#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/bcmfw/bcmfw.8#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/bcmfw/bcmfw.c#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/bt3cfw/Makefile#2 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/bt3cfw/bt3cfw.8#3 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/bt3cfw/bt3cfw.c#2 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/Makefile#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/hccontrol.8#5 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/hccontrol.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/hccontrol.h#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/info.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/link_control.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/link_policy.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/node.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/send_recv.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/status.c#5 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hccontrol/util.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hcsecd/Makefile#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/hcsecd/hcsecd.8#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/hcsecd/hcsecd.c#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/hcsecd/hcsecd.conf#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/hcsecd/hcsecd.h#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/hcsecd/lexer.l#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/hcsecd/parser.y#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/hcseriald/Makefile#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hcseriald/hcseriald.8#5 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/hcseriald/hcseriald.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/l2control/Makefile#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/l2control/l2cap.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/l2control/l2control.8#5 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/l2control/l2control.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/l2control/l2control.h#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/l2ping/Makefile#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/l2ping/l2ping.8#5 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/l2ping/l2ping.c#4 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/rfcomm_pppd/Makefile#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8#1 branch .. //depot/projects/ia64/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c#1 branch .. //depot/projects/ia64/usr.sbin/diskinfo/diskinfo.8#2 integrate .. //depot/projects/ia64/usr.sbin/pppd/main.c#3 integrate .. //depot/projects/ia64/usr.sbin/sysinstall/devices.c#12 integrate Differences ... ==== //depot/projects/ia64/bin/echo/echo.1#3 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)echo.1 8.1 (Berkeley) 7/22/93 -.\" $FreeBSD: src/bin/echo/echo.1,v 1.14 2003/04/12 03:49:28 tjr Exp $ +.\" $FreeBSD: src/bin/echo/echo.1,v 1.15 2003/05/08 17:47:28 schweikh Exp $ .\" .Dd April 12, 2003 .Dt ECHO 1 @@ -58,11 +58,20 @@ The following option is available: .Bl -tag -width flag .It Fl n -Do not print the trailing newline character. This may also be -achieved by appending +Do not print the trailing newline character. +This may also be achieved by appending .Ql \ec to the end of the string, as is done by iBCS2 compatible systems. +Note that this option as well as the effect of +.Ql \ec +are implementation-defined in +.St -p1003.1-2001 +as amended by Cor. 1-2002. +Applications aiming for maximum +portability are strongly encouraged to use +.Xr printf 1 +to suppress the newline character. .El .Pp Some shells may provide a builtin ==== //depot/projects/ia64/contrib/gcc/config/i386/freebsd.h#16 (text+ko) ==== @@ -22,7 +22,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h,v 1.61 2003/04/26 19:16:54 obrien Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h,v 1.62 2003/05/08 16:02:22 obrien Exp $ */ #undef CC1_SPEC #define CC1_SPEC "%(cc1_cpu) %{profile:-p}" @@ -135,7 +135,7 @@ #define FUNCTION_PROFILER(FILE, LABELNO) \ do { \ if (flag_pic) \ - fprintf ((FILE), "\tcall *.mcount%s@GOT(%%ebx)\n"); \ + fprintf ((FILE), "\tcall *.mcount@GOT(%%ebx)\n"); \ else \ fprintf ((FILE), "\tcall .mcount\n"); \ } while (0) ==== //depot/projects/ia64/crypto/openssh/log.h#5 (text+ko) ==== @@ -1,4 +1,5 @@ /* $OpenBSD: log.h,v 1.8 2002/07/19 15:43:33 markus Exp $ */ +/* $FreeBSD: src/crypto/openssh/log.h,v 1.2 2003/05/12 19:22:47 des Exp $ */ /* * Author: Tatu Ylonen @@ -53,13 +54,21 @@ SyslogFacility log_facility_number(char *); LogLevel log_level_number(char *); -void fatal(const char *, ...) __attribute__((format(printf, 1, 2))); -void error(const char *, ...) __attribute__((format(printf, 1, 2))); -void log(const char *, ...) __attribute__((format(printf, 1, 2))); -void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); -void debug(const char *, ...) __attribute__((format(printf, 1, 2))); -void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); -void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); +#define fatal ssh_fatal +#define error ssh_error +#define log ssh_log +#define verbose ssh_verbose +#define debug ssh_debug +#define debug2 ssh_debug2 +#define debug3 ssh_debug3 + +void ssh_fatal(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_error(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_log(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_verbose(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_debug(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_debug2(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_debug3(const char *, ...) __attribute__((format(printf, 1, 2))); void fatal_cleanup(void); void fatal_add_cleanup(void (*) (void *), void *); ==== //depot/projects/ia64/crypto/telnet/telnet/commands.c#9 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/commands.c,v 1.30 2003/05/04 02:54:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/commands.c,v 1.31 2003/05/11 18:17:00 markm Exp $"); #include #include @@ -532,11 +532,11 @@ { #ifndef NOT43 if (net > 0 && - (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, debug)) < 0) { + (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, telnet_debug)) < 0) { perror("setsockopt (SO_DEBUG)"); } #else /* NOT43 */ - if (debug) { + if (telnet_debug) { if (net > 0 && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) perror("setsockopt (SO_DEBUG)"); } else @@ -741,7 +741,7 @@ { "debug", "debugging", (int (*)(int))togdebug, - &debug, + &telnet_debug, "turn on socket level debugging" }, { "netdata", "printing of hexadecimal network data (debugging)", @@ -2404,7 +2404,7 @@ } #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ - if (debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { + if (telnet_debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { perror("setsockopt (SO_DEBUG)"); } ==== //depot/projects/ia64/crypto/telnet/telnet/externs.h#3 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)externs.h 8.3 (Berkeley) 5/30/95 - * $FreeBSD: src/crypto/telnet/telnet/externs.h,v 1.9 2001/11/30 22:28:07 markm Exp $ + * $FreeBSD: src/crypto/telnet/telnet/externs.h,v 1.10 2003/05/11 18:17:00 markm Exp $ */ #ifndef BSD @@ -127,7 +127,7 @@ netdata, /* Print out network data flow */ prettydump, /* Print "netdata" output in user readable format */ termdata, /* Print out terminal data flow */ - debug, /* Debug level */ + telnet_debug, /* Debug level */ doaddrlookup, /* do a reverse lookup? */ clienteof; /* Client received EOF */ ==== //depot/projects/ia64/crypto/telnet/telnet/main.c#5 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/main.c,v 1.17 2003/05/04 02:54:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/main.c,v 1.18 2003/05/11 18:17:00 markm Exp $"); #include #include @@ -213,7 +213,7 @@ skiprc = 1; break; case 'd': - debug = 1; + telnet_debug = 1; break; case 'e': set_escape_char(optarg); ==== //depot/projects/ia64/crypto/telnet/telnet/telnet.c#5 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/telnet.c,v 1.13 2003/05/04 02:54:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/telnet.c,v 1.14 2003/05/11 18:17:00 markm Exp $"); #include @@ -95,7 +95,7 @@ connected, showoptions, ISend, /* trying to send network data in */ - debug = 0, + telnet_debug = 0, crmod, netdata, /* Print out network data flow */ crlf, /* Should '\r' be mapped to (or )? */ ==== //depot/projects/ia64/crypto/telnet/telnetd/telnetd.c#4 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnetd/telnetd.c,v 1.22 2003/05/04 02:54:49 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnetd/telnetd.c,v 1.23 2003/05/11 18:17:00 markm Exp $"); #include "telnetd.h" #include "pathnames.h" @@ -78,7 +78,7 @@ int hostinfo = 1; /* do we print login banner? */ -int debug = 0; +static int debug = 0; int keepalive = 1; const char *altlogin; ==== //depot/projects/ia64/etc/devd.conf#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/devd.conf,v 1.4 2003/05/07 15:48:20 imp Exp $ +# $FreeBSD: src/etc/devd.conf,v 1.5 2003/05/09 05:58:22 imp Exp $ # # Refer to devd.conf(5) and devd(8) man pages for the details on how to # run and configure devd. @@ -66,9 +66,9 @@ # Don't even try to second guess what to do about drivers that don't # match here. Instead, pass it off to syslog. Commented out for the # moment, as pnpinfo isn't set in devd yet -nomatch 0 { - // action "logger Unknown device: $pnpinfo $location $bus"; -}; +#nomatch 0 { +# action "logger Unknown device: $pnpinfo $location $bus"; +#}; /* EXAMPLES TO END OF FILE ==== //depot/projects/ia64/etc/network.subr#3 (text+ko) ==== @@ -22,7 +22,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/network.subr,v 1.146 2003/04/18 17:51:53 mtm Exp $ +# $FreeBSD: src/etc/network.subr,v 1.147 2003/05/12 11:36:49 ume Exp $ # # @@ -212,3 +212,299 @@ esac return 0 } + +hexdigit() +{ + if [ $1 -lt 10 ]; then + echo $1 + else + case $1 in + 10) echo a ;; + 11) echo b ;; + 12) echo c ;; + 13) echo d ;; + 14) echo e ;; + 15) echo f ;; + esac + fi +} + +hexprint() +{ + val=$1 + str='' + + dig=`hexdigit $((${val} & 15))` + str=${dig}${str} + val=$((${val} >> 4)) + while [ ${val} -gt 0 ]; do + dig=`hexdigit $((${val} & 15))` + str=${dig}${str} + val=$((${val} >> 4)) + done + + echo ${str} +} + +# Setup the interfaces for IPv6 +network6_interface_setup() +{ + interfaces=$* + rtsol_interfaces='' + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + rtsol_available=no + ;; + *) + rtsol_available=yes + ;; + esac + for i in $interfaces; do + rtsol_interface=yes + eval prefix=\$ipv6_prefix_$i + if [ -n "${prefix}" ]; then + rtsol_available=no + rtsol_interface=no + laddr=`network6_getladdr $i` + hostid=`expr "${laddr}" : 'fe80::\(.*\)%\(.*\)'` + for j in ${prefix}; do + address=$j\:${hostid} + ifconfig $i inet6 ${address} prefixlen 64 alias + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # subnet-router anycast address + # (rfc2373) + ifconfig $i inet6 $j:: prefixlen 64 \ + alias anycast + ;; + esac + done + fi + eval ipv6_ifconfig=\$ipv6_ifconfig_$i + if [ -n "${ipv6_ifconfig}" ]; then + rtsol_available=no + rtsol_interface=no + ifconfig $i inet6 ${ipv6_ifconfig} alias + fi + + if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] + then + case ${i} in + lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*) + ;; + *) + rtsol_interfaces="${rtsol_interfaces} ${i}" + ;; + esac + else + ifconfig $i inet6 + fi + done + + if [ ${rtsol_available} = yes -a -n "${rtsol_interfaces}" ]; then + # Act as endhost - automatically configured. + # You can configure only single interface, as + # specification assumes that autoconfigured host has + # single interface only. + sysctl net.inet6.ip6.accept_rtadv=1 + set ${rtsol_interfaces} + ifconfig $1 up + rtsol $1 + fi + + for i in $interfaces; do + alias=0 + while : ; do + eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} + if [ -z "${ipv6_ifconfig}" ]; then + break; + fi + ifconfig $i inet6 ${ipv6_ifconfig} alias + alias=$((${alias} + 1)) + done + done +} + +# Setup IPv6 to IPv4 mapping +network6_stf_setup() +{ + case ${stf_interface_ipv4addr} in + [Nn][Oo] | '') + ;; + *) + # assign IPv6 addr and interface route for 6to4 interface + stf_prefixlen=$((16+${stf_interface_ipv4plen:-0})) + OIFS="$IFS" + IFS=".$IFS" + set ${stf_interface_ipv4addr} + IFS="$OIFS" + hexfrag1=`hexprint $(($1*256 + $2))` + hexfrag2=`hexprint $(($3*256 + $4))` + ipv4_in_hexformat="${hexfrag1}:${hexfrag2}" + case ${stf_interface_ipv6_ifid} in + [Aa][Uu][Tt][Oo] | '') + for i in ${ipv6_network_interfaces}; do + laddr=`network6_getladdr ${i}` + case ${laddr} in + '') + ;; + *) + break + ;; + esac + done + stf_interface_ipv6_ifid=`expr "${laddr}" : \ + 'fe80::\(.*\)%\(.*\)'` + case ${stf_interface_ipv6_ifid} in + '') + stf_interface_ipv6_ifid=0:0:0:1 + ;; + esac + ;; + esac + ifconfig stf0 create >/dev/null 2>&1 + ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \ + prefixlen ${stf_prefixlen} + # disallow packets to malicious 6to4 prefix + route add -inet6 2002:e000:: -prefixlen 20 ::1 -reject + route add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject + route add -inet6 2002:0000:: -prefixlen 24 ::1 -reject + route add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject + ;; + esac +} + +# Setup static routes +network6_static_routes_setup() +{ + # Set up any static routes. + case ${ipv6_defaultrouter} in + [Nn][Oo] | '') + ;; + *) + ipv6_static_routes="default ${ipv6_static_routes}" + ipv6_route_default="default ${ipv6_defaultrouter}" + ;; + esac + case ${ipv6_static_routes} in + [Nn][Oo] | '') + ;; + *) + for i in ${ipv6_static_routes}; do + eval ipv6_route_args=\$ipv6_route_${i} + route add -inet6 ${ipv6_route_args} + done + ;; + esac +} + +# Setup faith +network6_faith_setup() +{ + case ${ipv6_faith_prefix} in + [Nn][Oo] | '') + ;; + *) + sysctl net.inet6.ip6.keepfaith=1 + ifconfig faith0 create >/dev/null 2>&1 + ifconfig faith0 up + for prefix in ${ipv6_faith_prefix}; do + prefixlen=`expr "${prefix}" : ".*/\(.*\)"` + case ${prefixlen} in + '') + prefixlen=96 + ;; + *) + prefix=`expr "${prefix}" : \ + "\(.*\)/${prefixlen}"` + ;; + esac + route add -inet6 ${prefix} -prefixlen ${prefixlen} ::1 + route change -inet6 ${prefix} -prefixlen ${prefixlen} \ + -ifp faith0 + done + ;; + esac +} + +# Install the "default interface" to kernel, which will be used +# as the default route when there's no router. +network6_default_interface_setup() +{ + # Choose IPv6 default interface if it is not clearly specified. + case ${ipv6_default_interface} in + '') + for i in ${ipv6_network_interfaces}; do + case $i in + lo0|faith[0-9]*) + continue + ;; + esac + laddr=`network6_getladdr $i exclude_tentative` + case ${laddr} in + '') + ;; + *) + ipv6_default_interface=$i + break + ;; + esac + done + ;; + esac + + # Disallow unicast packets without outgoing scope identifiers, + # or route such packets to a "default" interface, if it is specified. + route add -inet6 fe80:: -prefixlen 10 ::1 -reject + case ${ipv6_default_interface} in + [Nn][Oo] | '') + route add -inet6 ff02:: -prefixlen 16 ::1 -reject + ;; + *) + laddr=`network6_getladdr ${ipv6_default_interface}` + route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface \ + -cloning + + # Disable installing the default interface with the + # case net.inet6.ip6.forwarding=0 and + # net.inet6.ip6.accept_rtadv=0, due to avoid conflict + # between the default router list and the manual + # configured default route. + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + ;; + *) + if [ `sysctl -n net.inet6.ip6.accept_rtadv` -eq 1 ] + then + ndp -I ${ipv6_default_interface} + fi + ;; + esac + ;; + esac +} + +network6_getladdr() +{ + ifconfig $1 2>/dev/null | while read proto addr rest; do + case ${proto} in + inet6) + case ${addr} in + fe80::*) + if [ -z "$2" ]; then + echo ${addr} + return + fi + case ${rest} in + *tentative*) + continue + ;; + *) + echo ${addr} + return + esac + esac + esac + done +} ==== //depot/projects/ia64/etc/pccard_ether#6 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh - # -# $FreeBSD: src/etc/pccard_ether,v 1.29 2003/05/05 19:06:46 ume Exp $ +# $FreeBSD: src/etc/pccard_ether,v 1.30 2003/05/12 11:36:49 ume Exp $ # # pccard_ether interfacename [start|stop] [ifconfig option] # @@ -134,8 +134,8 @@ # IPv6 setup case ${ipv6_enable} in [Yy][Ee][Ss]) - if [ -r /etc/rc.d/network_ipv6 ]; then - . /etc/rc.d/network_ipv6 + if [ -r /etc/network.subr ]; then + . /etc/network.subr network6_interface_setup ${interface} fi ;; ==== //depot/projects/ia64/etc/rc.d/network_ipv6#5 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/network_ipv6,v 1.33 2003/04/29 12:08:43 jwd Exp $ +# $FreeBSD: src/etc/rc.d/network_ipv6,v 1.34 2003/05/12 11:36:50 ume Exp $ # From: src/etc/rc.network6,v 1.29 2002/04/06 15:15:43 # @@ -33,301 +33,11 @@ # KEYWORD: FreeBSD . /etc/rc.subr +. /etc/network.subr name="network_ipv6" rcvar=`set_rcvar ipv6` start_cmd="network_ipv6_start" -#required_files="/etc/rc.network6" - -hexdigit() -{ - if [ $1 -lt 10 ]; then - echo $1 - else - case $1 in - 10) echo a ;; - 11) echo b ;; - 12) echo c ;; - 13) echo d ;; - 14) echo e ;; - 15) echo f ;; - esac - fi -} - -hexprint() -{ - val=$1 - str='' - - dig=`hexdigit $((${val} & 15))` - str=${dig}${str} - val=$((${val} >> 4)) - while [ ${val} -gt 0 ]; do - dig=`hexdigit $((${val} & 15))` - str=${dig}${str} - val=$((${val} >> 4)) - done - - echo ${str} -} - -network6_interface_setup() -{ - interfaces=$* - rtsol_interfaces='' - case ${ipv6_gateway_enable} in - [Yy][Ee][Ss]) - rtsol_available=no - ;; - *) - rtsol_available=yes - ;; - esac - for i in $interfaces; do - rtsol_interface=yes - eval prefix=\$ipv6_prefix_$i - if [ -n "${prefix}" ]; then - rtsol_available=no - rtsol_interface=no - laddr=`network6_getladdr $i` - hostid=`expr "${laddr}" : 'fe80::\(.*\)%\(.*\)'` - for j in ${prefix}; do - address=$j\:${hostid} - ifconfig $i inet6 ${address} prefixlen 64 alias - - case ${ipv6_gateway_enable} in - [Yy][Ee][Ss]) - # subnet-router anycast address - # (rfc2373) - ifconfig $i inet6 $j:: prefixlen 64 \ - alias anycast - ;; - esac - done - fi - eval ipv6_ifconfig=\$ipv6_ifconfig_$i - if [ -n "${ipv6_ifconfig}" ]; then - rtsol_available=no - rtsol_interface=no - ifconfig $i inet6 ${ipv6_ifconfig} alias - fi - - if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] - then - case ${i} in - lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*) - ;; - *) - rtsol_interfaces="${rtsol_interfaces} ${i}" - ;; - esac - else - ifconfig $i inet6 - fi - done - - if [ ${rtsol_available} = yes -a -n "${rtsol_interfaces}" ]; then - # Act as endhost - automatically configured. - # You can configure only single interface, as - # specification assumes that autoconfigured host has - # single interface only. - sysctl net.inet6.ip6.accept_rtadv=1 - set ${rtsol_interfaces} - ifconfig $1 up - rtsol $1 - fi - - for i in $interfaces; do - alias=0 - while : ; do - eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} - if [ -z "${ipv6_ifconfig}" ]; then - break; - fi - ifconfig $i inet6 ${ipv6_ifconfig} alias - alias=$((${alias} + 1)) - done - done -} - -network6_stf_setup() -{ - case ${stf_interface_ipv4addr} in - [Nn][Oo] | '') - ;; - *) - # assign IPv6 addr and interface route for 6to4 interface - stf_prefixlen=$((16+${stf_interface_ipv4plen:-0})) - OIFS="$IFS" - IFS=".$IFS" - set ${stf_interface_ipv4addr} >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon May 12 21:30:03 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60ADC37B404; Mon, 12 May 2003 21:30:03 -0700 (PDT) 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 EE53E37B401 for ; Mon, 12 May 2003 21:30:02 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BC2643FAF for ; Mon, 12 May 2003 21:30:01 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D4U10U068380 for ; Mon, 12 May 2003 21:30:01 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D4Txfr068367 for perforce@freebsd.org; Mon, 12 May 2003 21:29:59 -0700 (PDT) Date: Mon, 12 May 2003 21:29:59 -0700 (PDT) Message-Id: <200305130429.h4D4Txfr068367@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31049 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 04:30:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=31049 Change 31049 by marcel@marcel_pluto1 on 2003/05/12 21:29:03 IFia64 Affected files ... .. //depot/projects/ia64_epc/bin/echo/echo.1#3 integrate .. //depot/projects/ia64_epc/contrib/gcc/config/i386/freebsd.h#4 integrate .. //depot/projects/ia64_epc/crypto/openssh/log.h#2 integrate .. //depot/projects/ia64_epc/crypto/telnet/telnet/commands.c#3 integrate .. //depot/projects/ia64_epc/crypto/telnet/telnet/externs.h#2 integrate .. //depot/projects/ia64_epc/crypto/telnet/telnet/main.c#3 integrate .. //depot/projects/ia64_epc/crypto/telnet/telnet/telnet.c#3 integrate .. //depot/projects/ia64_epc/crypto/telnet/telnetd/telnetd.c#3 integrate .. //depot/projects/ia64_epc/etc/devd.conf#5 integrate .. //depot/projects/ia64_epc/etc/network.subr#3 integrate .. //depot/projects/ia64_epc/etc/pccard_ether#3 integrate .. //depot/projects/ia64_epc/etc/rc.d/network_ipv6#3 integrate .. //depot/projects/ia64_epc/kerberos5/include/config.h#2 integrate .. //depot/projects/ia64_epc/kerberos5/usr.bin/kadmin/Makefile#2 integrate .. //depot/projects/ia64_epc/kerberos5/usr.sbin/ktutil/Makefile#3 integrate .. //depot/projects/ia64_epc/lib/libc/alpha/arith.h#2 integrate .. //depot/projects/ia64_epc/lib/libc/amd64/arith.h#3 integrate .. //depot/projects/ia64_epc/lib/libc/amd64/gen/Makefile.inc#3 integrate .. //depot/projects/ia64_epc/lib/libc/amd64/gen/ldexp.c#1 branch .. //depot/projects/ia64_epc/lib/libc/amd64/gen/setjmp.S#3 integrate .. //depot/projects/ia64_epc/lib/libc/i386/arith.h#2 integrate .. //depot/projects/ia64_epc/lib/libc/ia64/arith.h#2 integrate .. //depot/projects/ia64_epc/lib/libc/powerpc/arith.h#2 integrate .. //depot/projects/ia64_epc/lib/libc/sparc64/arith.h#2 integrate .. //depot/projects/ia64_epc/lib/libthr/thread/thr_kern.c#4 integrate .. //depot/projects/ia64_epc/lib/libthr/thread/thr_mutex.c#3 integrate .. //depot/projects/ia64_epc/lib/libthr/thread/thr_private.h#2 integrate .. //depot/projects/ia64_epc/lib/libthr/thread/thr_sig.c#3 integrate .. //depot/projects/ia64_epc/lib/libwrap/Makefile#2 integrate .. //depot/projects/ia64_epc/libexec/Makefile#7 integrate .. //depot/projects/ia64_epc/libexec/telnetd/global.c#2 integrate .. //depot/projects/ia64_epc/libexec/telnetd/slc.c#2 integrate .. //depot/projects/ia64_epc/libexec/telnetd/state.c#2 integrate .. //depot/projects/ia64_epc/libexec/telnetd/sys_term.c#2 integrate .. //depot/projects/ia64_epc/libexec/telnetd/telnetd.c#2 integrate .. //depot/projects/ia64_epc/libexec/telnetd/termstat.c#2 integrate .. //depot/projects/ia64_epc/libexec/telnetd/utility.c#2 integrate .. //depot/projects/ia64_epc/release/alpha/drivers.conf#4 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#12 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#21 integrate .. //depot/projects/ia64_epc/release/i386/drivers.conf#7 integrate .. //depot/projects/ia64_epc/release/scripts/doFS.sh#8 integrate .. //depot/projects/ia64_epc/release/scripts/print-cdrom-packages.sh#3 integrate .. //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.c#5 integrate .. //depot/projects/ia64_epc/sbin/growfs/growfs.c#3 integrate .. //depot/projects/ia64_epc/sbin/ldconfig/ldconfig.8#2 integrate .. //depot/projects/ia64_epc/sbin/mount_nfs/mount_nfs.8#3 integrate .. //depot/projects/ia64_epc/sbin/mount_nfs/mount_nfs.c#4 integrate .. //depot/projects/ia64_epc/sbin/newfs/mkfs.c#5 integrate .. //depot/projects/ia64_epc/share/examples/netgraph/bluetooth/rc.bluetooth#1 branch .. //depot/projects/ia64_epc/share/man/man4/Makefile#9 integrate .. //depot/projects/ia64_epc/share/man/man4/agp.4#2 integrate .. //depot/projects/ia64_epc/share/man/man4/dc.4#3 integrate .. //depot/projects/ia64_epc/share/man/man4/man4.i386/gsc.4#2 integrate .. //depot/projects/ia64_epc/share/man/man4/ng_bluetooth.4#2 integrate .. //depot/projects/ia64_epc/share/man/man4/ng_bt3c.4#2 integrate .. //depot/projects/ia64_epc/share/man/man4/ng_btsocket.4#2 integrate .. //depot/projects/ia64_epc/share/man/man4/ng_h4.4#2 integrate .. //depot/projects/ia64_epc/share/man/man4/ng_hci.4#2 integrate .. //depot/projects/ia64_epc/share/man/man4/ng_l2cap.4#2 integrate .. //depot/projects/ia64_epc/share/man/man4/ng_ubt.4#2 integrate .. //depot/projects/ia64_epc/share/man/man4/ubtbcmfw.4#1 branch .. //depot/projects/ia64_epc/share/man/man4/umass.4#3 integrate .. //depot/projects/ia64_epc/share/man/man5/procfs.5#2 integrate .. //depot/projects/ia64_epc/share/man/man8/Makefile#3 integrate .. //depot/projects/ia64_epc/share/man/man9/Makefile#5 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/cpu_switch.S#2 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/elf_machdep.c#2 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/exception.S#3 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/genassym.c#2 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/identcpu.c#2 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/machdep.c#3 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/nexus.c#2 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/pmap.c#2 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/support.S#2 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/sys_machdep.c#2 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/trap.c#2 integrate .. //depot/projects/ia64_epc/sys/amd64/conf/GENERIC#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/_types.h#3 integrate .. //depot/projects/ia64_epc/sys/amd64/include/asm.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/bus.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/bus_amd64.h#1 branch .. //depot/projects/ia64_epc/sys/amd64/include/bus_at386.h#2 delete .. //depot/projects/ia64_epc/sys/amd64/include/bus_dma.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/bus_memio.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/bus_pio.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/frame.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/md_var.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/npx.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/pcb.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/stdarg.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/sysarch.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/ucontext.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/isa/icu_vector.S#2 integrate .. //depot/projects/ia64_epc/sys/boot/common/load_elf.c#4 integrate .. //depot/projects/ia64_epc/sys/boot/i386/libi386/elf64_freebsd.c#2 integrate .. //depot/projects/ia64_epc/sys/boot/i386/libi386/i386_module.c#3 integrate .. //depot/projects/ia64_epc/sys/compat/svr4/svr4.h#2 integrate .. //depot/projects/ia64_epc/sys/conf/Makefile.amd64#3 integrate .. //depot/projects/ia64_epc/sys/conf/files#15 integrate .. //depot/projects/ia64_epc/sys/conf/majors#5 integrate .. //depot/projects/ia64_epc/sys/dev/acpica/Osd/OsdHardware.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/ata/ata-card.c#6 integrate .. //depot/projects/ia64_epc/sys/dev/ata/ata-chipset.c#11 integrate .. //depot/projects/ia64_epc/sys/dev/ata/ata-pci.h#8 integrate .. //depot/projects/ia64_epc/sys/dev/ata/ata-raid.c#9 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/firewire.c#11 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/sbp.c#16 integrate .. //depot/projects/ia64_epc/sys/dev/fxp/if_fxpreg.h#5 integrate .. //depot/projects/ia64_epc/sys/dev/ips/ips.c#1 branch .. //depot/projects/ia64_epc/sys/dev/ips/ips.h#1 branch .. //depot/projects/ia64_epc/sys/dev/ips/ips_commands.c#1 branch .. //depot/projects/ia64_epc/sys/dev/ips/ips_disk.c#1 branch .. //depot/projects/ia64_epc/sys/dev/ips/ips_disk.h#1 branch .. //depot/projects/ia64_epc/sys/dev/ips/ips_ioctl.c#1 branch .. //depot/projects/ia64_epc/sys/dev/ips/ips_ioctl.h#1 branch .. //depot/projects/ia64_epc/sys/dev/ips/ips_pci.c#1 branch .. //depot/projects/ia64_epc/sys/dev/kbd/atkbdc.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/syscons/syscons.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/usb/umass.c#7 integrate .. //depot/projects/ia64_epc/sys/dev/usb/usbdevs#10 integrate .. //depot/projects/ia64_epc/sys/dev/usb/usbdevs.h#10 integrate .. //depot/projects/ia64_epc/sys/dev/usb/usbdevs_data.h#10 integrate .. //depot/projects/ia64_epc/sys/geom/geom_dev.c#9 integrate .. //depot/projects/ia64_epc/sys/geom/geom_disk.c#10 integrate .. //depot/projects/ia64_epc/sys/i386/conf/GENERIC#5 integrate .. //depot/projects/ia64_epc/sys/i386/conf/NOTES#11 integrate .. //depot/projects/ia64_epc/sys/i386/linux/linux_sysvec.c#7 integrate .. //depot/projects/ia64_epc/sys/kern/kern_mac.c#10 integrate .. //depot/projects/ia64_epc/sys/kern/kern_malloc.c#7 integrate .. //depot/projects/ia64_epc/sys/kern/kern_sig.c#14 integrate .. //depot/projects/ia64_epc/sys/kern/link_elf.c#4 integrate .. //depot/projects/ia64_epc/sys/kern/subr_mbuf.c#9 integrate .. //depot/projects/ia64_epc/sys/kern/vfs_subr.c#13 integrate .. //depot/projects/ia64_epc/sys/modules/Makefile#12 integrate .. //depot/projects/ia64_epc/sys/modules/ips/Makefile#1 branch .. //depot/projects/ia64_epc/sys/modules/netgraph/bluetooth/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/modules/netgraph/bluetooth/bluetooth/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/modules/netgraph/bluetooth/bt3c/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/modules/netgraph/bluetooth/h4/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/modules/netgraph/bluetooth/hci/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/modules/netgraph/bluetooth/l2cap/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/modules/netgraph/bluetooth/socket/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/modules/netgraph/bluetooth/ubt/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#1 branch .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/common/ng_bluetooth.c#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/ubt/TODO#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#1 branch .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/TODO#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_cmds.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_cmds.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_evnt.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_evnt.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_main.c#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_misc.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_misc.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_prse.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/hci/ng_hci_var.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_bluetooth.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_bt3c.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_btsocket.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h#1 branch .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_h4.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_hci.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_l2cap.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/include/ng_ubt.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/TODO#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_prse.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/socket/TODO#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/socket/ng_btsocket.c#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#4 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#3 integrate .. //depot/projects/ia64_epc/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#1 branch .. //depot/projects/ia64_epc/sys/pci/if_dc.c#9 integrate .. //depot/projects/ia64_epc/sys/pci/if_dcreg.h#3 integrate .. //depot/projects/ia64_epc/sys/sys/_label.h#2 integrate .. //depot/projects/ia64_epc/sys/sys/mbuf.h#9 integrate .. //depot/projects/ia64_epc/sys/vm/vm_object.c#17 integrate .. //depot/projects/ia64_epc/usr.bin/bluetooth/Makefile#2 integrate .. //depot/projects/ia64_epc/usr.bin/bluetooth/btsockstat/Makefile#2 integrate .. //depot/projects/ia64_epc/usr.bin/bluetooth/btsockstat/btsockstat.1#2 integrate .. //depot/projects/ia64_epc/usr.bin/bluetooth/btsockstat/btsockstat.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/bluetooth/rfcomm_sppd/Makefile#1 branch .. //depot/projects/ia64_epc/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1#1 branch .. //depot/projects/ia64_epc/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c#1 branch .. //depot/projects/ia64_epc/usr.bin/sockstat/sockstat.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/stat/stat.1#2 integrate .. //depot/projects/ia64_epc/usr.bin/stat/stat.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/telnet/commands.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/telnet/externs.h#2 integrate .. //depot/projects/ia64_epc/usr.bin/telnet/main.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/telnet/network.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/telnet/ring.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/telnet/sys_bsd.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/telnet/telnet.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/telnet/terminal.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/telnet/utilities.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/Makefile#6 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/Makefile#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/bcmfw/BCM-LEGAL.txt#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/bcmfw/Makefile#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/bcmfw/README#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/bcmfw/bcmfw.8#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/bcmfw/bcmfw.c#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/bt3cfw/Makefile#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/bt3cfw/bt3cfw.8#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/bt3cfw/bt3cfw.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/Makefile#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/hccontrol.8#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/hccontrol.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/hccontrol.h#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/info.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/link_control.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/link_policy.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/node.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/send_recv.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/status.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hccontrol/util.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcsecd/Makefile#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcsecd/hcsecd.8#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcsecd/hcsecd.c#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcsecd/hcsecd.conf#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcsecd/hcsecd.h#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcsecd/lexer.l#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcsecd/parser.y#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcseriald/Makefile#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcseriald/hcseriald.8#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/hcseriald/hcseriald.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/l2control/Makefile#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/l2control/l2cap.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/l2control/l2control.8#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/l2control/l2control.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/l2control/l2control.h#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/l2ping/Makefile#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/l2ping/l2ping.8#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/l2ping/l2ping.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/bluetooth/rfcomm_pppd/Makefile#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8#1 branch .. //depot/projects/ia64_epc/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c#1 branch .. //depot/projects/ia64_epc/usr.sbin/diskinfo/diskinfo.8#2 integrate .. //depot/projects/ia64_epc/usr.sbin/pppd/main.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/sysinstall/devices.c#4 integrate Differences ... ==== //depot/projects/ia64_epc/bin/echo/echo.1#3 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)echo.1 8.1 (Berkeley) 7/22/93 -.\" $FreeBSD: src/bin/echo/echo.1,v 1.14 2003/04/12 03:49:28 tjr Exp $ +.\" $FreeBSD: src/bin/echo/echo.1,v 1.15 2003/05/08 17:47:28 schweikh Exp $ .\" .Dd April 12, 2003 .Dt ECHO 1 @@ -58,11 +58,20 @@ The following option is available: .Bl -tag -width flag .It Fl n -Do not print the trailing newline character. This may also be -achieved by appending +Do not print the trailing newline character. +This may also be achieved by appending .Ql \ec to the end of the string, as is done by iBCS2 compatible systems. +Note that this option as well as the effect of +.Ql \ec +are implementation-defined in +.St -p1003.1-2001 +as amended by Cor. 1-2002. +Applications aiming for maximum +portability are strongly encouraged to use +.Xr printf 1 +to suppress the newline character. .El .Pp Some shells may provide a builtin ==== //depot/projects/ia64_epc/contrib/gcc/config/i386/freebsd.h#4 (text+ko) ==== @@ -22,7 +22,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h,v 1.61 2003/04/26 19:16:54 obrien Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h,v 1.62 2003/05/08 16:02:22 obrien Exp $ */ #undef CC1_SPEC #define CC1_SPEC "%(cc1_cpu) %{profile:-p}" @@ -135,7 +135,7 @@ #define FUNCTION_PROFILER(FILE, LABELNO) \ do { \ if (flag_pic) \ - fprintf ((FILE), "\tcall *.mcount%s@GOT(%%ebx)\n"); \ + fprintf ((FILE), "\tcall *.mcount@GOT(%%ebx)\n"); \ else \ fprintf ((FILE), "\tcall .mcount\n"); \ } while (0) ==== //depot/projects/ia64_epc/crypto/openssh/log.h#2 (text+ko) ==== @@ -1,4 +1,5 @@ /* $OpenBSD: log.h,v 1.8 2002/07/19 15:43:33 markus Exp $ */ +/* $FreeBSD: src/crypto/openssh/log.h,v 1.2 2003/05/12 19:22:47 des Exp $ */ /* * Author: Tatu Ylonen @@ -53,13 +54,21 @@ SyslogFacility log_facility_number(char *); LogLevel log_level_number(char *); -void fatal(const char *, ...) __attribute__((format(printf, 1, 2))); -void error(const char *, ...) __attribute__((format(printf, 1, 2))); -void log(const char *, ...) __attribute__((format(printf, 1, 2))); -void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); -void debug(const char *, ...) __attribute__((format(printf, 1, 2))); -void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); -void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); +#define fatal ssh_fatal +#define error ssh_error +#define log ssh_log +#define verbose ssh_verbose +#define debug ssh_debug +#define debug2 ssh_debug2 +#define debug3 ssh_debug3 + +void ssh_fatal(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_error(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_log(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_verbose(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_debug(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_debug2(const char *, ...) __attribute__((format(printf, 1, 2))); +void ssh_debug3(const char *, ...) __attribute__((format(printf, 1, 2))); void fatal_cleanup(void); void fatal_add_cleanup(void (*) (void *), void *); ==== //depot/projects/ia64_epc/crypto/telnet/telnet/commands.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/commands.c,v 1.30 2003/05/04 02:54:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/commands.c,v 1.31 2003/05/11 18:17:00 markm Exp $"); #include #include @@ -532,11 +532,11 @@ { #ifndef NOT43 if (net > 0 && - (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, debug)) < 0) { + (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, telnet_debug)) < 0) { perror("setsockopt (SO_DEBUG)"); } #else /* NOT43 */ - if (debug) { + if (telnet_debug) { if (net > 0 && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) perror("setsockopt (SO_DEBUG)"); } else @@ -741,7 +741,7 @@ { "debug", "debugging", (int (*)(int))togdebug, - &debug, + &telnet_debug, "turn on socket level debugging" }, { "netdata", "printing of hexadecimal network data (debugging)", @@ -2404,7 +2404,7 @@ } #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ - if (debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { + if (telnet_debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { perror("setsockopt (SO_DEBUG)"); } ==== //depot/projects/ia64_epc/crypto/telnet/telnet/externs.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)externs.h 8.3 (Berkeley) 5/30/95 - * $FreeBSD: src/crypto/telnet/telnet/externs.h,v 1.9 2001/11/30 22:28:07 markm Exp $ + * $FreeBSD: src/crypto/telnet/telnet/externs.h,v 1.10 2003/05/11 18:17:00 markm Exp $ */ #ifndef BSD @@ -127,7 +127,7 @@ netdata, /* Print out network data flow */ prettydump, /* Print "netdata" output in user readable format */ termdata, /* Print out terminal data flow */ - debug, /* Debug level */ + telnet_debug, /* Debug level */ doaddrlookup, /* do a reverse lookup? */ clienteof; /* Client received EOF */ ==== //depot/projects/ia64_epc/crypto/telnet/telnet/main.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/main.c,v 1.17 2003/05/04 02:54:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/main.c,v 1.18 2003/05/11 18:17:00 markm Exp $"); #include #include @@ -213,7 +213,7 @@ skiprc = 1; break; case 'd': - debug = 1; + telnet_debug = 1; break; case 'e': set_escape_char(optarg); ==== //depot/projects/ia64_epc/crypto/telnet/telnet/telnet.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/telnet.c,v 1.13 2003/05/04 02:54:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/telnet.c,v 1.14 2003/05/11 18:17:00 markm Exp $"); #include @@ -95,7 +95,7 @@ connected, showoptions, ISend, /* trying to send network data in */ - debug = 0, + telnet_debug = 0, crmod, netdata, /* Print out network data flow */ crlf, /* Should '\r' be mapped to (or )? */ ==== //depot/projects/ia64_epc/crypto/telnet/telnetd/telnetd.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ #endif #endif #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnetd/telnetd.c,v 1.22 2003/05/04 02:54:49 obrien Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnetd/telnetd.c,v 1.23 2003/05/11 18:17:00 markm Exp $"); #include "telnetd.h" #include "pathnames.h" @@ -78,7 +78,7 @@ int hostinfo = 1; /* do we print login banner? */ -int debug = 0; +static int debug = 0; int keepalive = 1; const char *altlogin; ==== //depot/projects/ia64_epc/etc/devd.conf#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/devd.conf,v 1.4 2003/05/07 15:48:20 imp Exp $ +# $FreeBSD: src/etc/devd.conf,v 1.5 2003/05/09 05:58:22 imp Exp $ # # Refer to devd.conf(5) and devd(8) man pages for the details on how to # run and configure devd. @@ -66,9 +66,9 @@ # Don't even try to second guess what to do about drivers that don't # match here. Instead, pass it off to syslog. Commented out for the # moment, as pnpinfo isn't set in devd yet -nomatch 0 { - // action "logger Unknown device: $pnpinfo $location $bus"; -}; +#nomatch 0 { +# action "logger Unknown device: $pnpinfo $location $bus"; +#}; /* EXAMPLES TO END OF FILE ==== //depot/projects/ia64_epc/etc/network.subr#3 (text+ko) ==== @@ -22,7 +22,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/network.subr,v 1.146 2003/04/18 17:51:53 mtm Exp $ +# $FreeBSD: src/etc/network.subr,v 1.147 2003/05/12 11:36:49 ume Exp $ # # @@ -212,3 +212,299 @@ esac return 0 } + +hexdigit() +{ + if [ $1 -lt 10 ]; then + echo $1 + else + case $1 in + 10) echo a ;; + 11) echo b ;; + 12) echo c ;; + 13) echo d ;; + 14) echo e ;; + 15) echo f ;; + esac + fi +} + +hexprint() +{ + val=$1 + str='' + + dig=`hexdigit $((${val} & 15))` + str=${dig}${str} + val=$((${val} >> 4)) + while [ ${val} -gt 0 ]; do + dig=`hexdigit $((${val} & 15))` + str=${dig}${str} + val=$((${val} >> 4)) + done + + echo ${str} +} + +# Setup the interfaces for IPv6 +network6_interface_setup() +{ + interfaces=$* + rtsol_interfaces='' + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + rtsol_available=no + ;; + *) + rtsol_available=yes + ;; + esac + for i in $interfaces; do + rtsol_interface=yes + eval prefix=\$ipv6_prefix_$i + if [ -n "${prefix}" ]; then + rtsol_available=no + rtsol_interface=no + laddr=`network6_getladdr $i` + hostid=`expr "${laddr}" : 'fe80::\(.*\)%\(.*\)'` + for j in ${prefix}; do + address=$j\:${hostid} + ifconfig $i inet6 ${address} prefixlen 64 alias + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # subnet-router anycast address + # (rfc2373) + ifconfig $i inet6 $j:: prefixlen 64 \ + alias anycast + ;; + esac + done + fi + eval ipv6_ifconfig=\$ipv6_ifconfig_$i + if [ -n "${ipv6_ifconfig}" ]; then + rtsol_available=no + rtsol_interface=no + ifconfig $i inet6 ${ipv6_ifconfig} alias + fi + + if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] + then + case ${i} in + lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*) + ;; + *) + rtsol_interfaces="${rtsol_interfaces} ${i}" + ;; + esac + else + ifconfig $i inet6 + fi + done + + if [ ${rtsol_available} = yes -a -n "${rtsol_interfaces}" ]; then + # Act as endhost - automatically configured. + # You can configure only single interface, as + # specification assumes that autoconfigured host has + # single interface only. + sysctl net.inet6.ip6.accept_rtadv=1 + set ${rtsol_interfaces} + ifconfig $1 up + rtsol $1 + fi + + for i in $interfaces; do + alias=0 + while : ; do + eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} + if [ -z "${ipv6_ifconfig}" ]; then + break; + fi + ifconfig $i inet6 ${ipv6_ifconfig} alias + alias=$((${alias} + 1)) + done + done +} + +# Setup IPv6 to IPv4 mapping +network6_stf_setup() +{ + case ${stf_interface_ipv4addr} in + [Nn][Oo] | '') + ;; + *) + # assign IPv6 addr and interface route for 6to4 interface + stf_prefixlen=$((16+${stf_interface_ipv4plen:-0})) + OIFS="$IFS" + IFS=".$IFS" + set ${stf_interface_ipv4addr} + IFS="$OIFS" + hexfrag1=`hexprint $(($1*256 + $2))` + hexfrag2=`hexprint $(($3*256 + $4))` + ipv4_in_hexformat="${hexfrag1}:${hexfrag2}" + case ${stf_interface_ipv6_ifid} in + [Aa][Uu][Tt][Oo] | '') + for i in ${ipv6_network_interfaces}; do + laddr=`network6_getladdr ${i}` + case ${laddr} in + '') + ;; + *) + break + ;; + esac + done + stf_interface_ipv6_ifid=`expr "${laddr}" : \ + 'fe80::\(.*\)%\(.*\)'` + case ${stf_interface_ipv6_ifid} in + '') + stf_interface_ipv6_ifid=0:0:0:1 + ;; + esac + ;; + esac + ifconfig stf0 create >/dev/null 2>&1 + ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \ + prefixlen ${stf_prefixlen} + # disallow packets to malicious 6to4 prefix + route add -inet6 2002:e000:: -prefixlen 20 ::1 -reject + route add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject + route add -inet6 2002:0000:: -prefixlen 24 ::1 -reject + route add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject + ;; + esac +} + +# Setup static routes +network6_static_routes_setup() +{ + # Set up any static routes. + case ${ipv6_defaultrouter} in + [Nn][Oo] | '') + ;; + *) + ipv6_static_routes="default ${ipv6_static_routes}" + ipv6_route_default="default ${ipv6_defaultrouter}" + ;; + esac + case ${ipv6_static_routes} in + [Nn][Oo] | '') + ;; + *) + for i in ${ipv6_static_routes}; do + eval ipv6_route_args=\$ipv6_route_${i} + route add -inet6 ${ipv6_route_args} + done + ;; + esac +} + +# Setup faith +network6_faith_setup() +{ + case ${ipv6_faith_prefix} in + [Nn][Oo] | '') + ;; + *) + sysctl net.inet6.ip6.keepfaith=1 + ifconfig faith0 create >/dev/null 2>&1 + ifconfig faith0 up + for prefix in ${ipv6_faith_prefix}; do + prefixlen=`expr "${prefix}" : ".*/\(.*\)"` + case ${prefixlen} in + '') + prefixlen=96 + ;; + *) + prefix=`expr "${prefix}" : \ + "\(.*\)/${prefixlen}"` + ;; + esac + route add -inet6 ${prefix} -prefixlen ${prefixlen} ::1 + route change -inet6 ${prefix} -prefixlen ${prefixlen} \ + -ifp faith0 + done + ;; + esac +} + +# Install the "default interface" to kernel, which will be used +# as the default route when there's no router. +network6_default_interface_setup() +{ + # Choose IPv6 default interface if it is not clearly specified. + case ${ipv6_default_interface} in + '') + for i in ${ipv6_network_interfaces}; do + case $i in + lo0|faith[0-9]*) + continue + ;; + esac + laddr=`network6_getladdr $i exclude_tentative` + case ${laddr} in + '') + ;; + *) + ipv6_default_interface=$i + break + ;; + esac + done + ;; + esac + + # Disallow unicast packets without outgoing scope identifiers, + # or route such packets to a "default" interface, if it is specified. + route add -inet6 fe80:: -prefixlen 10 ::1 -reject + case ${ipv6_default_interface} in + [Nn][Oo] | '') + route add -inet6 ff02:: -prefixlen 16 ::1 -reject + ;; + *) + laddr=`network6_getladdr ${ipv6_default_interface}` + route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface \ + -cloning + + # Disable installing the default interface with the + # case net.inet6.ip6.forwarding=0 and + # net.inet6.ip6.accept_rtadv=0, due to avoid conflict + # between the default router list and the manual + # configured default route. + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + ;; + *) + if [ `sysctl -n net.inet6.ip6.accept_rtadv` -eq 1 ] + then + ndp -I ${ipv6_default_interface} + fi + ;; + esac + ;; + esac +} + +network6_getladdr() +{ + ifconfig $1 2>/dev/null | while read proto addr rest; do + case ${proto} in + inet6) + case ${addr} in + fe80::*) + if [ -z "$2" ]; then + echo ${addr} + return + fi + case ${rest} in + *tentative*) + continue + ;; + *) + echo ${addr} + return + esac + esac + esac + done +} ==== //depot/projects/ia64_epc/etc/pccard_ether#3 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh - # -# $FreeBSD: src/etc/pccard_ether,v 1.29 2003/05/05 19:06:46 ume Exp $ +# $FreeBSD: src/etc/pccard_ether,v 1.30 2003/05/12 11:36:49 ume Exp $ # # pccard_ether interfacename [start|stop] [ifconfig option] # @@ -134,8 +134,8 @@ # IPv6 setup case ${ipv6_enable} in [Yy][Ee][Ss]) - if [ -r /etc/rc.d/network_ipv6 ]; then - . /etc/rc.d/network_ipv6 + if [ -r /etc/network.subr ]; then + . /etc/network.subr network6_interface_setup ${interface} fi ;; ==== //depot/projects/ia64_epc/etc/rc.d/network_ipv6#3 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/network_ipv6,v 1.33 2003/04/29 12:08:43 jwd Exp $ +# $FreeBSD: src/etc/rc.d/network_ipv6,v 1.34 2003/05/12 11:36:50 ume Exp $ # From: src/etc/rc.network6,v 1.29 2002/04/06 15:15:43 # @@ -33,301 +33,11 @@ # KEYWORD: FreeBSD . /etc/rc.subr +. /etc/network.subr name="network_ipv6" rcvar=`set_rcvar ipv6` start_cmd="network_ipv6_start" -#required_files="/etc/rc.network6" - -hexdigit() -{ - if [ $1 -lt 10 ]; then - echo $1 - else - case $1 in - 10) echo a ;; - 11) echo b ;; - 12) echo c ;; - 13) echo d ;; - 14) echo e ;; - 15) echo f ;; - esac - fi -} - -hexprint() -{ - val=$1 - str='' - - dig=`hexdigit $((${val} & 15))` - str=${dig}${str} - val=$((${val} >> 4)) - while [ ${val} -gt 0 ]; do - dig=`hexdigit $((${val} & 15))` - str=${dig}${str} - val=$((${val} >> 4)) - done - - echo ${str} -} - -network6_interface_setup() -{ - interfaces=$* - rtsol_interfaces='' - case ${ipv6_gateway_enable} in - [Yy][Ee][Ss]) - rtsol_available=no - ;; - *) - rtsol_available=yes - ;; - esac - for i in $interfaces; do - rtsol_interface=yes - eval prefix=\$ipv6_prefix_$i - if [ -n "${prefix}" ]; then - rtsol_available=no - rtsol_interface=no - laddr=`network6_getladdr $i` - hostid=`expr "${laddr}" : 'fe80::\(.*\)%\(.*\)'` - for j in ${prefix}; do - address=$j\:${hostid} - ifconfig $i inet6 ${address} prefixlen 64 alias - - case ${ipv6_gateway_enable} in - [Yy][Ee][Ss]) - # subnet-router anycast address - # (rfc2373) - ifconfig $i inet6 $j:: prefixlen 64 \ - alias anycast - ;; - esac - done - fi - eval ipv6_ifconfig=\$ipv6_ifconfig_$i - if [ -n "${ipv6_ifconfig}" ]; then - rtsol_available=no - rtsol_interface=no - ifconfig $i inet6 ${ipv6_ifconfig} alias - fi - - if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] - then - case ${i} in - lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*) - ;; - *) - rtsol_interfaces="${rtsol_interfaces} ${i}" - ;; - esac - else - ifconfig $i inet6 - fi - done - - if [ ${rtsol_available} = yes -a -n "${rtsol_interfaces}" ]; then - # Act as endhost - automatically configured. - # You can configure only single interface, as - # specification assumes that autoconfigured host has - # single interface only. - sysctl net.inet6.ip6.accept_rtadv=1 - set ${rtsol_interfaces} - ifconfig $1 up - rtsol $1 - fi - - for i in $interfaces; do - alias=0 - while : ; do - eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} - if [ -z "${ipv6_ifconfig}" ]; then - break; - fi - ifconfig $i inet6 ${ipv6_ifconfig} alias - alias=$((${alias} + 1)) - done - done -} - -network6_stf_setup() -{ - case ${stf_interface_ipv4addr} in - [Nn][Oo] | '') - ;; - *) - # assign IPv6 addr and interface route for 6to4 interface - stf_prefixlen=$((16+${stf_interface_ipv4plen:-0})) - OIFS="$IFS" - IFS=".$IFS" - set ${stf_interface_ipv4addr} >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon May 12 21:39:15 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2B2EE37B404; Mon, 12 May 2003 21:39:15 -0700 (PDT) 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 D5E0637B401 for ; Mon, 12 May 2003 21:39:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AA4943FA3 for ; Mon, 12 May 2003 21:39:14 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D4dE0U068753 for ; Mon, 12 May 2003 21:39:14 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D4dDpt068750 for perforce@freebsd.org; Mon, 12 May 2003 21:39:13 -0700 (PDT) Date: Mon, 12 May 2003 21:39:13 -0700 (PDT) Message-Id: <200305130439.h4D4dDpt068750@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31051 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 04:39:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=31051 Change 31051 by jmallett@jmallett_dalek on 2003/05/12 21:38:17 Print and return error from elf load functions, since we are not doing the right thing yet with regard to modules and whatnot. Add a parameter to pmap_bootstrap, the end of the loaded kernel. This makes it safe to run the system, as we stop overwriting kernel memory, due to using a small block before the kernel. D'oh! Add cpu_startup and related (platform) callouts for great SI_SUB_CPU justice. Add a note about where NetBSD stuff begins in machdep.c, I want to go at it with an axe. If0 some unused stuff accompanying other if0 code. Point to FreeBSD/MIPS list, not NetBSD. Cheat very bad and run without virtual memory. Mark virtual memory beginning at the end of the kernel, and going as far as we have memory. That doesn't really work, but for now, why not. Track loaded program memory, and the top of the kernel. Print such. Affected files ... .. //depot/projects/mips/sys/mips/include/md_var.h#7 edit .. //depot/projects/mips/sys/mips/include/pmap.h#9 edit .. //depot/projects/mips/sys/mips/mips/elf_machdep.c#2 edit .. //depot/projects/mips/sys/mips/mips/machdep.c#23 edit .. //depot/projects/mips/sys/mips/mips/pmap.c#13 edit .. //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#16 edit Differences ... ==== //depot/projects/mips/sys/mips/include/md_var.h#7 (text+ko) ==== @@ -39,4 +39,7 @@ void mips_init(void); void swi_vm(void *); +/* Platform call-downs. */ +void platform_identify(void); + #endif /* !_MACHINE_MD_VAR_H_ */ ==== //depot/projects/mips/sys/mips/include/pmap.h#9 (text+ko) ==== @@ -57,7 +57,7 @@ extern vm_offset_t virtual_end; extern struct segtab *segbase; -void pmap_bootstrap(void); +void pmap_bootstrap(vm_offset_t); vm_offset_t pmap_kextract(vm_offset_t); vm_offset_t pmap_steal_memory(vm_size_t); ==== //depot/projects/mips/sys/mips/mips/elf_machdep.c#2 (text+ko) ==== @@ -34,23 +34,27 @@ int elf_cpu_load_file(linker_file_t fil) { - return (0); + printf("%s unimplemented at %s:%d, returning error.\n", __func__, __FILE__, __LINE__); + return (ENXIO); } int elf_cpu_unload_file(linker_file_t fil) { - return (0); + printf("%s unimplemented at %s:%d, returning error.\n", __func__, __FILE__, __LINE__); + return (ENXIO); } int elf_reloc(linker_file_t fil, const void *data, int rmode) { - return (0); + printf("%s unimplemented at %s:%d, returning error.\n", __func__, __FILE__, __LINE__); + return (ENXIO); } int elf_reloc_local(linker_file_t fil, const void *data, int rmode) { - return (0); + printf("%s unimplemented at %s:%d, returning error.\n", __func__, __FILE__, __LINE__); + return (ENXIO); } ==== //depot/projects/mips/sys/mips/mips/machdep.c#23 (text+ko) ==== @@ -147,6 +147,7 @@ #include #include +#include #include #include #include @@ -155,6 +156,9 @@ #include #include +#include +#include + #include #include #include @@ -183,13 +187,18 @@ struct cpu_info cpu_info_store; +struct kva_md_info kmi; + vm_offset_t kstack0; vm_paddr_t kstack0_phys; +static void cpu_identify(void); +void cpu_startup(void *); +SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); + void mips_init(void) { - cpu_identify(); proc_linkup(&proc0, &ksegrp0, &kse0, &thread0); proc0.p_uarea = (struct user *)uarea0; proc0.p_stats = &proc0.p_uarea->u_stats; @@ -203,6 +212,19 @@ } void +cpu_startup(void *dummy) +{ + cpu_identify(); + + printf("real memory = %lu (%lu MB)\n", physsz, physsz / 1024); + + vm_ksubmap_init(&kmi); + bufinit(); + vm_pager_bufferinit(); + +} + +void cpu_halt(void) { printf("Halting...\n"); @@ -310,6 +332,10 @@ return (-1); } +/* + * XXX begin NetBSD stuff, I want to rewrite or move out most. + */ + static void mips64_vector_init(void); extern long *mips64_locoresw[]; @@ -559,8 +585,10 @@ /* Cache error handler */ extern char mips64_cache[], mips64_cacheEnd[]; +#if 0 /* MIPS32/MIPS64 interrupt exception handler */ extern char mips64_intr[], mips64_intrEnd[]; +#endif /* * Copy down exception vector code. @@ -761,7 +789,7 @@ /* * Identify product revision IDs of cpu and fpu. */ -void +static void cpu_identify(void) { static const char * const waynames[] = { @@ -832,7 +860,7 @@ MIPS_PRID_RSVD(cpu_id) != 0) { printf("%s: NOTE: top 8 bits of prehistoric PRID not 0!\n", label); - printf("%s: Please mail port-mips@netbsd.org with cpu0 " + printf("%s: Please mail freebsd-mips@FreeBSD.org with cpu0 " "dmesg lines.\n", label); } @@ -868,4 +896,5 @@ default: panic("cpu_identify: impossible"); } + platform_identify(); } ==== //depot/projects/mips/sys/mips/mips/pmap.c#13 (text+ko) ==== @@ -139,8 +139,9 @@ vm_offset_t pmap_extract(pmap_t pmap, vm_offset_t va) { - UNIMPL(); - return (0); + if (pmap == kernel_pmap) + return (pmap_kextract(va)); + return (va); } void @@ -171,8 +172,7 @@ vm_offset_t pmap_kextract(vm_offset_t va) { - UNIMPL(); - return (0); + return (va); } vm_offset_t @@ -341,7 +341,7 @@ } void -pmap_bootstrap(void) +pmap_bootstrap(vm_offset_t kend) { int i; @@ -368,8 +368,8 @@ /* * Set the start and end of kva. */ - virtual_avail = avail_start; - virtual_end = avail_end; + virtual_avail = kend; + virtual_end = kend + physsz; kernel_vm_end = virtual_end; } ==== //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#16 (text+ko) ==== @@ -56,7 +56,7 @@ { NULL, NULL, 0 } }; -int arcsmem, availmem; +int arcsmem, availmem, lpmem; int mach_type, mach_subtype, mach_boardrev; struct platform platform; @@ -82,7 +82,10 @@ struct machine_type *mtp; const char *cpufreq; int first, i, j, last, size; + vm_offset_t kend; + kend = 0; + /* * Initialise the ARCBIOS stuff. */ @@ -129,6 +132,21 @@ case ARCBIOS_MEM_FirmwarePermanent: arcsmem += btoc(size); break; + case ARCBIOS_MEM_LoadedProgram: + /* XXX does not allow for kernels loaded + * at the very end of the available space. + * XXX assumes sorted memory, but it is? + */ + /* + * If this kend is higher than the + * current kend, and we have memory + * before it, then mark the end of + * kernel memory. + */ + if (j > 0 && phys_avail[j - 1] >= kend) + kend = MIPS_PHYS_TO_KSEG0(last); + lpmem += btoc(size); + break; case ARCBIOS_MEM_FreeContiguous: case ARCBIOS_MEM_FreeMemory: availmem += btoc(size); @@ -146,15 +164,26 @@ } physsz += size; } + if (kend == 0) + panic("End of kernel should not be 0"); + printf("kernel memory ends at %lx\n", kend); + + init_param2(ctob(availmem)); + mips_vector_init(); + pmap_bootstrap(kend); + mips_init(); +} + +void +platform_identify(void) +{ printf("ARCS memory = %d (%d KB)\n", ctob(arcsmem), ctob(arcsmem) / 1024); + printf("Loaded program memory = %d (%d KB)\n", ctob(lpmem), + ctob(lpmem) / 1024); printf("avail memory = %d (%d MB)\n", ctob(availmem), ctob(availmem) / (1024 * 1024)); - - init_param2(ctob(availmem)); - mips_vector_init(); - pmap_bootstrap(); - mips_init(); + printf("machine: %s\n", arcbios_system_identifier); } void From owner-p4-projects@FreeBSD.ORG Mon May 12 23:48:55 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7264337B404; Mon, 12 May 2003 23:48:55 -0700 (PDT) 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 0E86C37B401 for ; Mon, 12 May 2003 23:48:55 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AED3343F85 for ; Mon, 12 May 2003 23:48:54 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D6ms0U075614 for ; Mon, 12 May 2003 23:48:54 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D6ms3w075611 for perforce@freebsd.org; Mon, 12 May 2003 23:48:54 -0700 (PDT) Date: Mon, 12 May 2003 23:48:54 -0700 (PDT) Message-Id: <200305130648.h4D6ms3w075611@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31053 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 06:48:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=31053 Change 31053 by jmallett@jmallett_dalek on 2003/05/12 23:48:52 Print the machine type first, so that the memory stuff ends up together. Affected files ... .. //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#17 edit Differences ... ==== //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#17 (text+ko) ==== @@ -177,13 +177,13 @@ void platform_identify(void) { + printf("machine: %s\n", arcbios_system_identifier); printf("ARCS memory = %d (%d KB)\n", ctob(arcsmem), ctob(arcsmem) / 1024); printf("Loaded program memory = %d (%d KB)\n", ctob(lpmem), ctob(lpmem) / 1024); printf("avail memory = %d (%d MB)\n", ctob(availmem), ctob(availmem) / (1024 * 1024)); - printf("machine: %s\n", arcbios_system_identifier); } void From owner-p4-projects@FreeBSD.ORG Tue May 13 00:14:27 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BC1A437B404; Tue, 13 May 2003 00:14:26 -0700 (PDT) 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 6C61037B401 for ; Tue, 13 May 2003 00:14:26 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E280F43FD7 for ; Tue, 13 May 2003 00:14:25 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D7EP0U077727 for ; Tue, 13 May 2003 00:14:25 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D7EPmL077724 for perforce@freebsd.org; Tue, 13 May 2003 00:14:25 -0700 (PDT) Date: Tue, 13 May 2003 00:14:25 -0700 (PDT) Message-Id: <200305130714.h4D7EPmL077724@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31054 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 07:14:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=31054 Change 31054 by jmallett@jmallett_dalek on 2003/05/13 00:13:36 Remove these printfs, adding some to the mutex code in specific locations fixes whatever the hell it is that's going wrong. Affected files ... .. //depot/projects/mips/sys/vm/vm_init.c#4 integrate Differences ... ==== //depot/projects/mips/sys/vm/vm_init.c#4 (text+ko) ==== @@ -110,21 +110,15 @@ * memory is accounted for, and we use only virtual addresses. */ vm_set_page_size(); - printf("Doing page startup...\n"); virtual_avail = vm_page_startup(avail_start, avail_end, virtual_avail); /* * Initialize other VM packages */ - printf("vm_object_init...\n"); vm_object_init(); - printf("vm_map_startup...\n"); vm_map_startup(); - printf("kmem_init...\n"); kmem_init(virtual_avail, virtual_end); - printf("pmap_init...\n"); pmap_init(avail_start, avail_end); - printf("vm_pager_init...\n"); vm_pager_init(); } From owner-p4-projects@FreeBSD.ORG Tue May 13 01:13:39 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 391D937B404; Tue, 13 May 2003 01:13:39 -0700 (PDT) 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 DDB0937B401 for ; Tue, 13 May 2003 01:13:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69FB243F75 for ; Tue, 13 May 2003 01:13:38 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D8Dc0U086321 for ; Tue, 13 May 2003 01:13:38 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D8Dbd4086318 for perforce@freebsd.org; Tue, 13 May 2003 01:13:37 -0700 (PDT) Date: Tue, 13 May 2003 01:13:37 -0700 (PDT) Message-Id: <200305130813.h4D8Dbd4086318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31056 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 08:13:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=31056 Change 31056 by marcel@marcel_nfs on 2003/05/13 01:13:09 Do not lazily allocate region IDs. It creates a race for SMP kernels and adds needless tests on the critial path. Allocate all RIDs when the pmap is created. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#11 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#11 (text+ko) ==== @@ -640,6 +640,7 @@ { int rid; + mtx_lock(&pmap_ridmutex); if (pmap_ridcount == pmap_ridmax) panic("pmap_allocate_rid: All Region IDs used"); @@ -648,6 +649,7 @@ } while (pmap_ridbusy[rid / 64] & (1L << (rid & 63))); pmap_ridbusy[rid / 64] |= (1L << (rid & 63)); pmap_ridcount++; + mtx_unlock(&pmap_ridmutex); return rid; } @@ -661,33 +663,6 @@ mtx_unlock(&pmap_ridmutex); } -static void -pmap_ensure_rid(pmap_t pmap, vm_offset_t va) -{ - int rr; - - rr = va >> 61; - - /* - * We get called for virtual addresses that may just as well be - * kernel addresses (ie region 5, 6 or 7). Since the pm_rid field - * only holds region IDs for user regions, we have to make sure - * the region is within bounds. - */ - if (rr >= 5) - return; - - if (pmap->pm_rid[rr]) - return; - - mtx_lock(&pmap_ridmutex); - pmap->pm_rid[rr] = pmap_allocate_rid(); - if (pmap == PCPU_GET(current_pmap)) - ia64_set_rr(IA64_RR_BASE(rr), - (pmap->pm_rid[rr] << 8)|(PAGE_SHIFT << 2)|1); - mtx_unlock(&pmap_ridmutex); -} - /*************************************************** * Low level helper routines..... ***************************************************/ @@ -847,6 +822,10 @@ void pmap_pinit2(struct pmap *pmap) { + int i; + + for (i = 0; i < 5; i++) + pmap->pm_rid[i] = pmap_allocate_rid(); } /*************************************************** @@ -1642,8 +1621,6 @@ if (pmap == NULL) return; - pmap_ensure_rid(pmap, va); - oldpmap = pmap_install(pmap); va &= ~PAGE_MASK; @@ -1760,8 +1737,6 @@ struct ia64_lpte *pte; pmap_t oldpmap; - pmap_ensure_rid(pmap, va); - oldpmap = pmap_install(pmap); pte = pmap_find_pte(va); From owner-p4-projects@FreeBSD.ORG Tue May 13 01:41:14 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2F06F37B404; Tue, 13 May 2003 01:41:14 -0700 (PDT) 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 DA55537B401 for ; Tue, 13 May 2003 01:41:13 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64CA743F75 for ; Tue, 13 May 2003 01:41:13 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D8fD0U087346 for ; Tue, 13 May 2003 01:41:13 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D8fCG0087343 for perforce@freebsd.org; Tue, 13 May 2003 01:41:12 -0700 (PDT) Date: Tue, 13 May 2003 01:41:12 -0700 (PDT) Message-Id: <200305130841.h4D8fCG0087343@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31058 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 08:41:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=31058 Change 31058 by marcel@marcel_nfs on 2003/05/13 01:40:27 Avoid using a random number generator to generate unique RIDs. We don't need randomness, nor uniform distribution. The cost generally increases with the number of RIDs allocated due to picking a RID that is in use already. Instead we maintain an index into a bitmap to the 64-bit word that still has unset bits (=unallocated RIDs). We advance the index if all bits are set. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#12 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#12 (text+ko) ==== @@ -224,8 +224,11 @@ /* * Data for the RID allocator */ -static u_int64_t *pmap_ridbusy; -static int pmap_ridmax, pmap_ridcount; +static int pmap_ridcount; +static int pmap_rididx; +static int pmap_ridmapsz; +static int pmap_ridmax; +static u_int64_t *pmap_ridmap; struct mtx pmap_ridmutex; /* @@ -338,12 +341,18 @@ printf("Processor supports %d Region ID bits\n", ridbits); } - pmap_ridmax = (1 << ridbits); + + /* + * XXX: If we have enough bits in the RID to use the thread ID then + * we should avoid the overhead of the map and create unique RIDs + * based on the thread ID. + */ + pmap_ridmax = (1 << ridbits); + pmap_ridmapsz = pmap_ridmax / 64; + pmap_ridmap = (u_int64_t *)pmap_steal_memory(pmap_ridmax / 8); + pmap_ridmap[0] |= 0xff; + pmap_rididx = 0; pmap_ridcount = 8; - pmap_ridbusy = (u_int64_t *) - pmap_steal_memory(pmap_ridmax / 8); - bzero(pmap_ridbusy, pmap_ridmax / 8); - pmap_ridbusy[0] |= 0xff; mtx_init(&pmap_ridmutex, "RID allocator lock", NULL, MTX_DEF); /* @@ -638,16 +647,29 @@ static u_int32_t pmap_allocate_rid(void) { + uint64_t bit, bits; int rid; mtx_lock(&pmap_ridmutex); if (pmap_ridcount == pmap_ridmax) panic("pmap_allocate_rid: All Region IDs used"); - do { - rid = arc4random() & (pmap_ridmax - 1); - } while (pmap_ridbusy[rid / 64] & (1L << (rid & 63))); - pmap_ridbusy[rid / 64] |= (1L << (rid & 63)); + /* Find an index with a free bit. */ + while ((bits = pmap_ridmap[pmap_rididx]) == ~0UL) { + pmap_rididx++; + if (pmap_rididx == pmap_ridmapsz) + pmap_rididx = 0; + } + rid = pmap_rididx * 64; + + /* Find a free bit. */ + bit = 1UL; + while (bits & bit) { + rid++; + bit <<= 1; + } + + pmap_ridmap[pmap_rididx] |= bit; pmap_ridcount++; mtx_unlock(&pmap_ridmutex); @@ -657,8 +679,14 @@ static void pmap_free_rid(u_int32_t rid) { + uint64_t bit; + int idx; + + idx = rid / 64; + bit = ~(1UL << (rid & 63)); + mtx_lock(&pmap_ridmutex); - pmap_ridbusy[rid / 64] &= ~(1L << (rid & 63)); + pmap_ridmap[idx] &= bit; pmap_ridcount--; mtx_unlock(&pmap_ridmutex); } From owner-p4-projects@FreeBSD.ORG Tue May 13 02:37:24 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C4BC37B404; Tue, 13 May 2003 02:37:24 -0700 (PDT) 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 C62B737B401 for ; Tue, 13 May 2003 02:37:23 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51ADA43F3F for ; Tue, 13 May 2003 02:37:23 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D9bN0U090366 for ; Tue, 13 May 2003 02:37:23 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D9bMmp090363 for perforce@freebsd.org; Tue, 13 May 2003 02:37:22 -0700 (PDT) Date: Tue, 13 May 2003 02:37:22 -0700 (PDT) Message-Id: <200305130937.h4D9bMmp090363@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31060 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 09:37:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=31060 Change 31060 by marcel@marcel_nfs on 2003/05/13 02:36:36 Make sure we purge the TLB when we update the VHPT by having pmap_update_vhpt() do the purge. Remove purging the TLB from the callers of pmap_update_vhpt(). This also affects callers of pmap_set_pte(). Also make sure we purge the TLB when we remove a PTE from the VHPT. Invalidate the PTE before we purge to avoid a race. Remove pmap_clear_pte(). It's mostly redundant. This further improves stability. While here, sanitize the statistics. We now count the number of insertions, deletions and updates. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#13 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#13 (text+ko) ==== @@ -249,16 +249,16 @@ * VHPT instrumentation. */ static int pmap_vhpt_inserts; -static int pmap_vhpt_collisions; -static int pmap_vhpt_resident; +static int pmap_vhpt_removals; +static int pmap_vhpt_updates; SYSCTL_DECL(_vm_stats); SYSCTL_NODE(_vm_stats, OID_AUTO, vhpt, CTLFLAG_RD, 0, ""); SYSCTL_INT(_vm_stats_vhpt, OID_AUTO, inserts, CTLFLAG_RD, - &pmap_vhpt_inserts, 0, ""); -SYSCTL_INT(_vm_stats_vhpt, OID_AUTO, collisions, CTLFLAG_RD, - &pmap_vhpt_collisions, 0, ""); -SYSCTL_INT(_vm_stats_vhpt, OID_AUTO, resident, CTLFLAG_RD, - &pmap_vhpt_resident, 0, ""); + &pmap_vhpt_inserts, 0, "VHPT insertion counter"); +SYSCTL_INT(_vm_stats_vhpt, OID_AUTO, removals, CTLFLAG_RD, + &pmap_vhpt_removals, 0, "VHPT removal counter"); +SYSCTL_INT(_vm_stats_vhpt, OID_AUTO, updates, CTLFLAG_RD, + &pmap_vhpt_updates, 0, "VHPT update counter"); static PMAP_INLINE void free_pv_entry(pv_entry_t pv); static pv_entry_t get_pv_entry(void); @@ -952,13 +952,9 @@ struct ia64_lpte *vhpte; pmap_vhpt_inserts++; - pmap_vhpt_resident++; - vhpte = (struct ia64_lpte *) ia64_thash(va); + vhpte = (struct ia64_lpte *)ia64_thash(va); - if (vhpte->pte_chain) - pmap_vhpt_collisions++; - pte->pte_chain = vhpte->pte_chain; vhpte->pte_chain = ia64_tpa((vm_offset_t) pte); @@ -976,11 +972,14 @@ { struct ia64_lpte *vhpte; - vhpte = (struct ia64_lpte *) ia64_thash(va); + pmap_vhpt_updates++; + + vhpte = (struct ia64_lpte *)ia64_thash(va); - if ((!vhpte->pte_p || vhpte->pte_tag == pte->pte_tag) - && pte->pte_p) + if ((!vhpte->pte_p || vhpte->pte_tag == pte->pte_tag) && pte->pte_p) pmap_install_pte(vhpte, pte); + + ia64_ptc_g(va, pte->pte_ps << 2); } /* @@ -1021,11 +1020,15 @@ } } - /* - * Snip this pv_entry out of the collision chain. - */ + pmap_vhpt_removals++; + + /* Snip this pv_entry out of the collision chain. */ lpte->pte_chain = pte->pte_chain; + /* Invalidate the entry and purge the TLB. */ + pte->pte_p = 0; + ia64_ptc_g(va, pte->pte_ps << 2); + /* * If the VHPTE matches as well, change it to map the first * element from the chain if there is one. @@ -1041,7 +1044,6 @@ } } - pmap_vhpt_resident--; error = 0; done: return error; @@ -1250,19 +1252,6 @@ } /* - * If a pte contains a valid mapping, clear it and update the VHPT. - */ -static void -pmap_clear_pte(struct ia64_lpte *pte, vm_offset_t va) -{ - if (pte->pte_p) { - pmap_remove_vhpt(va); - ia64_ptc_g(va, PAGE_SHIFT << 2); - pte->pte_p = 0; - } -} - -/* * Remove the (possibly managed) mapping represented by pte from the * given pmap. */ @@ -1283,11 +1272,6 @@ if (error) return error; - /* - * Make sure pmap_set_pte() knows it isn't in the VHPT. - */ - pte->pte_p = 0; - if (pte->pte_ig & PTE_IG_WIRED) pmap->pm_stats.wired_count -= 1; @@ -1357,13 +1341,9 @@ for (i = 0; i < count; i++) { vm_offset_t tva = va + i * PAGE_SIZE; - int wasvalid; pte = pmap_find_kpte(tva); - wasvalid = pte->pte_p; - pmap_set_pte(pte, tva, VM_PAGE_TO_PHYS(m[i]), - 0, PTE_PL_KERN, PTE_AR_RWX); - if (wasvalid) - ia64_ptc_g(tva, PAGE_SHIFT << 2); + pmap_set_pte(pte, tva, VM_PAGE_TO_PHYS(m[i]), 0, PTE_PL_KERN, + PTE_AR_RWX); } } @@ -1379,8 +1359,9 @@ for (i = 0; i < count; i++) { pte = pmap_find_kpte(va); - pmap_clear_pte(pte, va); - va += PAGE_SIZE; + if (pte->pte_p) + pmap_remove_vhpt(va); + va += PAGE_SIZE; } } @@ -1391,13 +1372,9 @@ pmap_kenter(vm_offset_t va, vm_offset_t pa) { struct ia64_lpte *pte; - int wasvalid; pte = pmap_find_kpte(va); - wasvalid = pte->pte_p; pmap_set_pte(pte, va, pa, 0, PTE_PL_KERN, PTE_AR_RWX); - if (wasvalid) - ia64_ptc_g(va, PAGE_SHIFT << 2); } /* @@ -1409,7 +1386,8 @@ struct ia64_lpte *pte; pte = pmap_find_kpte(va); - pmap_clear_pte(pte, va); + if (pte->pte_p) + pmap_remove_vhpt(va); } /* @@ -1615,7 +1593,6 @@ } pmap_pte_set_prot(pte, newprot); pmap_update_vhpt(pte, sva); - pmap_invalidate_page(pmap, sva); } sva += PAGE_SIZE; @@ -1736,7 +1713,7 @@ * adds the pte to the VHPT if necessary. */ pmap_set_pte(pte, va, pa, managed | (wired ? PTE_IG_WIRED : 0), - pte_prot_pl(pmap, prot), pte_prot_ar(pmap, prot)); + pte_prot_pl(pmap, prot), pte_prot_ar(pmap, prot)); /* * if the mapping or permission bits are different, we need @@ -1784,9 +1761,8 @@ /* * Initialise PTE with read-only protection and enter into VHPT. */ - pmap_set_pte(pte, va, VM_PAGE_TO_PHYS(m), - PTE_IG_MANAGED, - PTE_PL_USER, PTE_AR_R); + pmap_set_pte(pte, va, VM_PAGE_TO_PHYS(m), PTE_IG_MANAGED, PTE_PL_USER, + PTE_AR_R); pmap_install(oldpmap); } @@ -2231,7 +2207,6 @@ pte = pmap_find_vhpt(pv->pv_va); pmap_pte_set_prot(pte, newprot); pmap_update_vhpt(pte, pv->pv_va); - pmap_invalidate_page(pv->pv_pmap, pv->pv_va); pmap_install(oldpmap); } vm_page_flag_clear(m, PG_WRITEABLE); @@ -2269,7 +2244,6 @@ count++; pte->pte_a = 0; pmap_update_vhpt(pte, pv->pv_va); - pmap_invalidate_page(pv->pv_pmap, pv->pv_va); } pmap_install(oldpmap); } @@ -2346,7 +2320,6 @@ if (pte->pte_d) { pte->pte_d = 0; pmap_update_vhpt(pte, pv->pv_va); - pmap_invalidate_page(pv->pv_pmap, pv->pv_va); } pmap_install(oldpmap); } @@ -2371,7 +2344,6 @@ if (pte->pte_a) { pte->pte_a = 0; pmap_update_vhpt(pte, pv->pv_va); - pmap_invalidate_page(pv->pv_pmap, pv->pv_va); } pmap_install(oldpmap); } From owner-p4-projects@FreeBSD.ORG Tue May 13 05:38:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3939937B404; Tue, 13 May 2003 05:38:06 -0700 (PDT) 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 D558737B401 for ; Tue, 13 May 2003 05:38:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F57143F85 for ; Tue, 13 May 2003 05:38:05 -0700 (PDT) (envelope-from des@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DCc50U006482 for ; Tue, 13 May 2003 05:38:05 -0700 (PDT) (envelope-from des@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DCc4gj006479 for perforce@freebsd.org; Tue, 13 May 2003 05:38:04 -0700 (PDT) Date: Tue, 13 May 2003 05:38:04 -0700 (PDT) Message-Id: <200305131238.h4DCc4gj006479@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to des@freebsd.org using -f From: Dag-Erling Smorgrav To: Perforce Change Reviews Subject: PERFORCE change 31065 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 12:38:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=31065 Change 31065 by des@des.at.des.thinksec.com on 2003/05/13 05:37:12 Propagate version numbers and installation directories throughout the tree using Makefile.inc. Affected files ... .. //depot/projects/openpam/MANIFEST#14 edit .. //depot/projects/openpam/Makefile.inc#1 add .. //depot/projects/openpam/bin/Makefile.inc#1 add .. //depot/projects/openpam/lib/Makefile#17 edit Differences ... ==== //depot/projects/openpam/MANIFEST#14 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/openpam/MANIFEST#13 $ +# $P4: //depot/projects/openpam/MANIFEST#14 $ # CREDITS HISTORY @@ -7,9 +7,11 @@ LICENSE MANIFEST Makefile +Makefile.inc README RELNOTES bin/Makefile +bin/Makefile.inc bin/su/Makefile bin/su/su.c doc/Makefile ==== //depot/projects/openpam/lib/Makefile#17 (text+ko) ==== @@ -31,12 +31,10 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $P4: //depot/projects/openpam/lib/Makefile#16 $ +# $P4: //depot/projects/openpam/lib/Makefile#17 $ # LIB = pam -SHLIB_MAJOR = 2 -SHLIB_MINOR = 0 WARNS ?= 4 NO_WERROR = yes From owner-p4-projects@FreeBSD.ORG Tue May 13 05:41:12 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 98CF237B404; Tue, 13 May 2003 05:41:11 -0700 (PDT) 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 49F2F37B401 for ; Tue, 13 May 2003 05:41:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB0BB43F85 for ; Tue, 13 May 2003 05:41:10 -0700 (PDT) (envelope-from des@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DCfA0U006648 for ; Tue, 13 May 2003 05:41:10 -0700 (PDT) (envelope-from des@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DCfAlU006645 for perforce@freebsd.org; Tue, 13 May 2003 05:41:10 -0700 (PDT) Date: Tue, 13 May 2003 05:41:10 -0700 (PDT) Message-Id: <200305131241.h4DCfAlU006645@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to des@freebsd.org using -f From: Dag-Erling Smorgrav To: Perforce Change Reviews Subject: PERFORCE change 31067 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 12:41:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=31067 Change 31067 by des@des.at.des.thinksec.com on 2003/05/13 05:40:18 Support su'ing to another user with arguments. Drop privs in the child rather than in the parent so that pam_close_session(3) will be called with privs. Simplify some of the error handling. Based on patches received from Mike Petullo . Affected files ... .. //depot/projects/openpam/bin/su/su.c#9 edit Differences ... ==== //depot/projects/openpam/bin/su/su.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/bin/su/su.c#8 $ + * $P4: //depot/projects/openpam/bin/su/su.c#9 $ */ #include @@ -81,9 +81,17 @@ argc -= optind; argv += optind; + if (argc > 0) { + user = *argv; + --argc; + ++argv; + } else { + user = "root"; + } + /* initialize PAM */ pamc.conv = &openpam_ttyconv; - pam_start("su", argc ? *argv : "root", &pamc, &pamh); + pam_start("su", user, &pamc, &pamh); /* set some items */ gethostname(hostname, sizeof(hostname)); @@ -117,20 +125,6 @@ if (pam_err != PAM_SUCCESS || (pwd = getpwnam(user)) == NULL) goto pamerr; - /* set uid and groups */ - if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) { - warn("initgroups()"); - goto err; - } - if (setgid(pwd->pw_gid) == -1) { - warn("setgid()"); - goto err; - } - if (setuid(pwd->pw_uid) == -1) { - warn("setuid()"); - goto err; - } - /* export PAM environment */ if ((pam_envlist = pam_getenvlist(pamh)) != NULL) { for (pam_env = pam_envlist; *pam_env != NULL; ++pam_env) { @@ -154,7 +148,21 @@ warn("fork()"); goto err; case 0: - /* child: start a shell */ + /* child: give up privs and start a shell */ + + /* set uid and groups */ + if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) { + warn("initgroups()"); + _exit(1); + } + if (setgid(pwd->pw_gid) == -1) { + warn("setgid()"); + _exit(1); + } + if (setuid(pwd->pw_uid) == -1) { + warn("setuid()"); + _exit(1); + } execve(*args, args, environ); warn("execve()"); _exit(1); @@ -170,9 +178,7 @@ } pamerr: - pam_end(pamh, pam_err); fprintf(stderr, "Sorry\n"); - exit(1); err: pam_end(pamh, pam_err); exit(1); From owner-p4-projects@FreeBSD.ORG Tue May 13 05:42:17 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DB40737B404; Tue, 13 May 2003 05:42:13 -0700 (PDT) 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 56BA237B401 for ; Tue, 13 May 2003 05:42:13 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0031243FAF for ; Tue, 13 May 2003 05:42:12 -0700 (PDT) (envelope-from des@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DCgC0U006683 for ; Tue, 13 May 2003 05:42:12 -0700 (PDT) (envelope-from des@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DCgCkD006680 for perforce@freebsd.org; Tue, 13 May 2003 05:42:12 -0700 (PDT) Date: Tue, 13 May 2003 05:42:12 -0700 (PDT) Message-Id: <200305131242.h4DCgCkD006680@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to des@freebsd.org using -f From: Dag-Erling Smorgrav To: Perforce Change Reviews Subject: PERFORCE change 31068 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 12:42:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=31068 Change 31068 by des@des.at.des.thinksec.com on 2003/05/13 05:42:04 Use RTLD_LAZY rather than RTLD_NOW (which apparently isn't supported on all platforms, notably OpenBSD). Submitted by: Mike Petullo Affected files ... .. //depot/projects/openpam/lib/openpam_dynamic.c#8 edit Differences ... ==== //depot/projects/openpam/lib/openpam_dynamic.c#8 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#7 $ + * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#8 $ */ #include @@ -64,10 +64,10 @@ /* try versioned module first, then unversioned module */ if (asprintf(&vpath, "%s.%d", path, LIB_MAJ) == -1) goto buf_err; - if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) { + if ((dlh = dlopen(vpath, RTLD_LAZY)) == NULL) { openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror()); *strrchr(vpath, '.') = '\0'; - if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) { + if ((dlh = dlopen(vpath, RTLD_LAZY)) == NULL) { openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror()); free(module); return (NULL); From owner-p4-projects@FreeBSD.ORG Tue May 13 05:43:17 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BDA7937B404; Tue, 13 May 2003 05:43:15 -0700 (PDT) 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 5E45737B401 for ; Tue, 13 May 2003 05:43:15 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B4A643FB1 for ; Tue, 13 May 2003 05:43:15 -0700 (PDT) (envelope-from des@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DChE0U006739 for ; Tue, 13 May 2003 05:43:14 -0700 (PDT) (envelope-from des@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DChE3J006736 for perforce@freebsd.org; Tue, 13 May 2003 05:43:14 -0700 (PDT) Date: Tue, 13 May 2003 05:43:14 -0700 (PDT) Message-Id: <200305131243.h4DChE3J006736@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to des@freebsd.org using -f From: Dag-Erling Smorgrav To: Perforce Change Reviews Subject: PERFORCE change 31069 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 12:43:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=31069 Change 31069 by des@des.at.des.thinksec.com on 2003/05/13 05:42:26 Credit Mike Petullo for his OpenBSD patches. Affected files ... .. //depot/projects/openpam/CREDITS#7 edit Differences ... ==== //depot/projects/openpam/CREDITS#7 (text+ko) ==== @@ -19,10 +19,11 @@ Joe Marcus Clarke Juli Mallett Mark Murray + Mike Petullo Mikko Työläjärvi Robert Watson Ruslan Ermilov Solar Designer Takanori Saneto -$P4: //depot/projects/openpam/CREDITS#6 $ +$P4: //depot/projects/openpam/CREDITS#7 $ From owner-p4-projects@FreeBSD.ORG Tue May 13 05:46:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4CC8137B405; Tue, 13 May 2003 05:46:20 -0700 (PDT) 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 C8C7A37B401 for ; Tue, 13 May 2003 05:46:19 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7265F43F85 for ; Tue, 13 May 2003 05:46:19 -0700 (PDT) (envelope-from des@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DCkJ0U006897 for ; Tue, 13 May 2003 05:46:19 -0700 (PDT) (envelope-from des@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DCkIM8006894 for perforce@freebsd.org; Tue, 13 May 2003 05:46:18 -0700 (PDT) Date: Tue, 13 May 2003 05:46:18 -0700 (PDT) Message-Id: <200305131246.h4DCkIM8006894@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to des@freebsd.org using -f From: Dag-Erling Smorgrav To: Perforce Change Reviews Subject: PERFORCE change 31070 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 12:46:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=31070 Change 31070 by des@des.at.des.thinksec.com on 2003/05/13 05:45:45 Build everything (rather than just the man pages) so the release will fail if the code won't build. Finish the release by showing the MD5 checksum of the tarball. Affected files ... .. //depot/projects/openpam/dist.sh#6 edit Differences ... ==== //depot/projects/openpam/dist.sh#6 (text+ko) ==== @@ -1,21 +1,26 @@ #!/bin/sh # -# $P4: //depot/projects/openpam/dist.sh#5 $ +# $P4: //depot/projects/openpam/dist.sh#6 $ # set -e release=$(date '+%Y%m%d') distname="openpam-${release}" +tarball="${distname}.tar.gz" make cleandir make cleandir -(cd doc/man && make) +make depend && make install -d -m 0755 "${distname}" grep -v '^#' MANIFEST | while read file; do - install -d -m 0755 "${distname}/$(dirname ${file})" - install -c -m 0644 "${file}" "${distname}/${file}" + install -d -m 0755 "${distname}/$(dirname ${file})" || exit 1 + install -c -m 0644 "${file}" "${distname}/${file}" || exit 1 done -tar zcf "${distname}.tar.gz" "${distname}" +tar zcf "${tarball}" "${distname}" rm -rf "${distname}" make cleandir +make cleandir + +echo +md5 "${tarball}" From owner-p4-projects@FreeBSD.ORG Tue May 13 05:49:25 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7535637B404; Tue, 13 May 2003 05:49:24 -0700 (PDT) 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 26E9D37B401 for ; Tue, 13 May 2003 05:49:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5AE643F93 for ; Tue, 13 May 2003 05:49:23 -0700 (PDT) (envelope-from des@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DCnN0U006971 for ; Tue, 13 May 2003 05:49:23 -0700 (PDT) (envelope-from des@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DCnNMR006966 for perforce@freebsd.org; Tue, 13 May 2003 05:49:23 -0700 (PDT) Date: Tue, 13 May 2003 05:49:23 -0700 (PDT) Message-Id: <200305131249.h4DCnNMR006966@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to des@freebsd.org using -f From: Dag-Erling Smorgrav To: Perforce Change Reviews Subject: PERFORCE change 31071 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 12:49:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=31071 Change 31071 by des@des.at.des.thinksec.com on 2003/05/13 05:48:36 OpenBSD doesn't create libpam.so at build time, and FreeBSD ignores the minor number, so the only file we can safely depend on is libpam.a. Affected files ... .. //depot/projects/openpam/bin/su/Makefile#6 edit Differences ... ==== //depot/projects/openpam/bin/su/Makefile#6 (text+ko) ==== @@ -32,13 +32,13 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $P4: //depot/projects/openpam/bin/su/Makefile#5 $ +# $P4: //depot/projects/openpam/bin/su/Makefile#6 $ # PROG = su WARNS ?= 4 CFLAGS += -I${.CURDIR}/../../include -DPADD = ${.OBJDIR}/../../lib/libpam.so +DPADD = ${.OBJDIR}/../../lib/libpam.a LDADD = -L${.OBJDIR}/../../lib -R${.OBJDIR}/../../lib -lpam NOMAN = YES From owner-p4-projects@FreeBSD.ORG Tue May 13 05:49:26 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EAEF237B404; Tue, 13 May 2003 05:49:25 -0700 (PDT) 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 3D5D537B423 for ; Tue, 13 May 2003 05:49:25 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D9FD43FAF for ; Tue, 13 May 2003 05:49:24 -0700 (PDT) (envelope-from des@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DCnO0U006977 for ; Tue, 13 May 2003 05:49:24 -0700 (PDT) (envelope-from des@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DCnNSU006974 for perforce@freebsd.org; Tue, 13 May 2003 05:49:23 -0700 (PDT) Date: Tue, 13 May 2003 05:49:23 -0700 (PDT) Message-Id: <200305131249.h4DCnNSU006974@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to des@freebsd.org using -f From: Dag-Erling Smorgrav To: Perforce Change Reviews Subject: PERFORCE change 31072 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 12:49:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=31072 Change 31072 by des@des.at.des.thinksec.com on 2003/05/13 05:48:56 Update portability status. Affected files ... .. //depot/projects/openpam/RELNOTES#16 edit Differences ... ==== //depot/projects/openpam/RELNOTES#16 (text+ko) ==== @@ -6,8 +6,12 @@ accumulated since the previous release. This release corresponds to the code used in FreeBSD-CURRENT as of the -release date. It may or may not build on other platforms; previous -releases have been built on NetBSD and (with partial success) MacOS X. +release date. It is also known to build cleanly on NetBSD 1.6 and +OpenBSD 3.1. It may or may not build on other platforms; you will +need a BSD-compatible make(1) (NetBSD's make(1) is easy to port to +most POSIX platforms). Previous versions were successfully built on +MacOS X 10.1, but there seem to be issues with the heavily modified +version of GCC 3.1 that ships with MacOS X 10.2. The library itself is complete. Documentation exists in the form of man pages for the library functions. These man pages are generated by @@ -26,4 +30,4 @@ Please direct bug reports and inquiries to des@freebsd.org. -$P4: //depot/projects/openpam/RELNOTES#15 $ +$P4: //depot/projects/openpam/RELNOTES#16 $ From owner-p4-projects@FreeBSD.ORG Tue May 13 05:54:33 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6D90737B404; Tue, 13 May 2003 05:54:32 -0700 (PDT) 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 05E4737B401 for ; Tue, 13 May 2003 05:54:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2345743F75 for ; Tue, 13 May 2003 05:54:31 -0700 (PDT) (envelope-from des@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DCsV0U007208 for ; Tue, 13 May 2003 05:54:31 -0700 (PDT) (envelope-from des@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DCsUwZ007205 for perforce@freebsd.org; Tue, 13 May 2003 05:54:30 -0700 (PDT) Date: Tue, 13 May 2003 05:54:30 -0700 (PDT) Message-Id: <200305131254.h4DCsUwZ007205@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to des@freebsd.org using -f From: Dag-Erling Smorgrav To: Perforce Change Reviews Subject: PERFORCE change 31073 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 12:54:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=31073 Change 31073 by des@des.at.des.thinksec.com on 2003/05/13 05:54:04 Update copyright dates for files that have changed this year. Also change the copyright date on generated man pages from 2002 to 2001-2003 since work on this part of OpenPAM started in late 2001. Affected files ... .. //depot/projects/openpam/bin/su/Makefile#7 edit .. //depot/projects/openpam/bin/su/su.c#10 edit .. //depot/projects/openpam/include/security/openpam_version.h#8 edit .. //depot/projects/openpam/include/security/pam_appl.h#12 edit .. //depot/projects/openpam/include/security/pam_constants.h#21 edit .. //depot/projects/openpam/include/security/pam_types.h#10 edit .. //depot/projects/openpam/lib/Makefile#18 edit .. //depot/projects/openpam/lib/openpam_borrow_cred.c#5 edit .. //depot/projects/openpam/lib/openpam_dispatch.c#20 edit .. //depot/projects/openpam/lib/openpam_dynamic.c#9 edit .. //depot/projects/openpam/lib/openpam_findenv.c#11 edit .. //depot/projects/openpam/lib/openpam_get_option.c#7 edit .. //depot/projects/openpam/lib/openpam_impl.h#22 edit .. //depot/projects/openpam/lib/openpam_log.c#19 edit .. //depot/projects/openpam/lib/openpam_restore_cred.c#5 edit .. //depot/projects/openpam/lib/openpam_set_option.c#8 edit .. //depot/projects/openpam/lib/openpam_ttyconv.c#16 edit .. //depot/projects/openpam/lib/pam_acct_mgmt.c#12 edit .. //depot/projects/openpam/lib/pam_authenticate.c#14 edit .. //depot/projects/openpam/lib/pam_chauthtok.c#15 edit .. //depot/projects/openpam/lib/pam_close_session.c#12 edit .. //depot/projects/openpam/lib/pam_get_authtok.c#22 edit .. //depot/projects/openpam/lib/pam_get_data.c#11 edit .. //depot/projects/openpam/lib/pam_get_item.c#16 edit .. //depot/projects/openpam/lib/pam_get_user.c#15 edit .. //depot/projects/openpam/lib/pam_getenv.c#14 edit .. //depot/projects/openpam/lib/pam_open_session.c#12 edit .. //depot/projects/openpam/lib/pam_set_data.c#13 edit .. //depot/projects/openpam/lib/pam_set_item.c#19 edit .. //depot/projects/openpam/lib/pam_setcred.c#13 edit .. //depot/projects/openpam/lib/pam_vprompt.c#10 edit .. //depot/projects/openpam/misc/gendoc.pl#20 edit Differences ... ==== //depot/projects/openpam/bin/su/Makefile#7 (text+ko) ==== @@ -1,5 +1,5 @@ #- -# Copyright (c) 2002 Networks Associates Technology, Inc. +# Copyright (c) 2002,2003 Networks Associates Technology, Inc. # All rights reserved. # # This software was developed for the FreeBSD Project by ThinkSec AS @@ -32,7 +32,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $P4: //depot/projects/openpam/bin/su/Makefile#6 $ +# $P4: //depot/projects/openpam/bin/su/Makefile#7 $ # PROG = su ==== //depot/projects/openpam/bin/su/su.c#10 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/bin/su/su.c#9 $ + * $P4: //depot/projects/openpam/bin/su/su.c#10 $ */ #include ==== //depot/projects/openpam/include/security/openpam_version.h#8 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/openpam_version.h#7 $ + * $P4: //depot/projects/openpam/include/security/openpam_version.h#8 $ */ #ifndef _OPENPAM_VERSION_H_INCLUDED ==== //depot/projects/openpam/include/security/pam_appl.h#12 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/pam_appl.h#11 $ + * $P4: //depot/projects/openpam/include/security/pam_appl.h#12 $ */ #ifndef _PAM_APPL_H_INCLUDED ==== //depot/projects/openpam/include/security/pam_constants.h#21 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/pam_constants.h#20 $ + * $P4: //depot/projects/openpam/include/security/pam_constants.h#21 $ */ #ifndef _PAM_CONSTANTS_H_INCLUDED ==== //depot/projects/openpam/include/security/pam_types.h#10 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/pam_types.h#9 $ + * $P4: //depot/projects/openpam/include/security/pam_types.h#10 $ */ #ifndef _PAM_TYPES_H_INCLUDED ==== //depot/projects/openpam/lib/Makefile#18 (text+ko) ==== @@ -1,5 +1,5 @@ #- -# Copyright (c) 2002 Networks Associates Technology, Inc. +# Copyright (c) 2002,2003 Networks Associates Technology, Inc. # All rights reserved. # # This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $P4: //depot/projects/openpam/lib/Makefile#17 $ +# $P4: //depot/projects/openpam/lib/Makefile#18 $ # LIB = pam ==== //depot/projects/openpam/lib/openpam_borrow_cred.c#5 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_borrow_cred.c#4 $ + * $P4: //depot/projects/openpam/lib/openpam_borrow_cred.c#5 $ */ #include ==== //depot/projects/openpam/lib/openpam_dispatch.c#20 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_dispatch.c#19 $ + * $P4: //depot/projects/openpam/lib/openpam_dispatch.c#20 $ */ #include ==== //depot/projects/openpam/lib/openpam_dynamic.c#9 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#8 $ + * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#9 $ */ #include ==== //depot/projects/openpam/lib/openpam_findenv.c#11 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_findenv.c#10 $ + * $P4: //depot/projects/openpam/lib/openpam_findenv.c#11 $ */ #include ==== //depot/projects/openpam/lib/openpam_get_option.c#7 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_get_option.c#6 $ + * $P4: //depot/projects/openpam/lib/openpam_get_option.c#7 $ */ #include ==== //depot/projects/openpam/lib/openpam_impl.h#22 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2001 Networks Associates Technology, Inc. + * Copyright (c) 2001-2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_impl.h#21 $ + * $P4: //depot/projects/openpam/lib/openpam_impl.h#22 $ */ #ifndef _OPENPAM_IMPL_H_INCLUDED ==== //depot/projects/openpam/lib/openpam_log.c#19 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_log.c#18 $ + * $P4: //depot/projects/openpam/lib/openpam_log.c#19 $ */ #include ==== //depot/projects/openpam/lib/openpam_restore_cred.c#5 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_restore_cred.c#4 $ + * $P4: //depot/projects/openpam/lib/openpam_restore_cred.c#5 $ */ #include ==== //depot/projects/openpam/lib/openpam_set_option.c#8 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_set_option.c#7 $ + * $P4: //depot/projects/openpam/lib/openpam_set_option.c#8 $ */ #include ==== //depot/projects/openpam/lib/openpam_ttyconv.c#16 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#15 $ + * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#16 $ */ #include ==== //depot/projects/openpam/lib/pam_acct_mgmt.c#12 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_acct_mgmt.c#11 $ + * $P4: //depot/projects/openpam/lib/pam_acct_mgmt.c#12 $ */ #include ==== //depot/projects/openpam/lib/pam_authenticate.c#14 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_authenticate.c#13 $ + * $P4: //depot/projects/openpam/lib/pam_authenticate.c#14 $ */ #include ==== //depot/projects/openpam/lib/pam_chauthtok.c#15 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_chauthtok.c#14 $ + * $P4: //depot/projects/openpam/lib/pam_chauthtok.c#15 $ */ #include ==== //depot/projects/openpam/lib/pam_close_session.c#12 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_close_session.c#11 $ + * $P4: //depot/projects/openpam/lib/pam_close_session.c#12 $ */ #include ==== //depot/projects/openpam/lib/pam_get_authtok.c#22 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#21 $ + * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#22 $ */ #include ==== //depot/projects/openpam/lib/pam_get_data.c#11 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_data.c#10 $ + * $P4: //depot/projects/openpam/lib/pam_get_data.c#11 $ */ #include ==== //depot/projects/openpam/lib/pam_get_item.c#16 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_item.c#15 $ + * $P4: //depot/projects/openpam/lib/pam_get_item.c#16 $ */ #include ==== //depot/projects/openpam/lib/pam_get_user.c#15 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_user.c#14 $ + * $P4: //depot/projects/openpam/lib/pam_get_user.c#15 $ */ #include ==== //depot/projects/openpam/lib/pam_getenv.c#14 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_getenv.c#13 $ + * $P4: //depot/projects/openpam/lib/pam_getenv.c#14 $ */ #include ==== //depot/projects/openpam/lib/pam_open_session.c#12 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_open_session.c#11 $ + * $P4: //depot/projects/openpam/lib/pam_open_session.c#12 $ */ #include ==== //depot/projects/openpam/lib/pam_set_data.c#13 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_set_data.c#12 $ + * $P4: //depot/projects/openpam/lib/pam_set_data.c#13 $ */ #include ==== //depot/projects/openpam/lib/pam_set_item.c#19 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_set_item.c#18 $ + * $P4: //depot/projects/openpam/lib/pam_set_item.c#19 $ */ #include ==== //depot/projects/openpam/lib/pam_setcred.c#13 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_setcred.c#12 $ + * $P4: //depot/projects/openpam/lib/pam_setcred.c#13 $ */ #include ==== //depot/projects/openpam/lib/pam_vprompt.c#10 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Networks Associates Technology, Inc. + * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_vprompt.c#9 $ + * $P4: //depot/projects/openpam/lib/pam_vprompt.c#10 $ */ #include ==== //depot/projects/openpam/misc/gendoc.pl#20 (text+ko) ==== @@ -1,6 +1,6 @@ #!/usr/bin/perl -w #- -# Copyright (c) 2002 Networks Associates Technology, Inc. +# Copyright (c) 2002,2003 Networks Associates Technology, Inc. # All rights reserved. # # This software was developed for the FreeBSD Project by ThinkSec AS and @@ -32,7 +32,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $P4: //depot/projects/openpam/misc/gendoc.pl#19 $ +# $P4: //depot/projects/openpam/misc/gendoc.pl#20 $ # use strict; @@ -42,7 +42,7 @@ use vars qw($COPYRIGHT $TODAY %FUNCTIONS %PAMERR); $COPYRIGHT = ".\\\"- -.\\\" Copyright (c) 2002 Networks Associates Technology, Inc. +.\\\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. .\\\" All rights reserved. .\\\" .\\\" This software was developed for the FreeBSD Project by ThinkSec AS and From owner-p4-projects@FreeBSD.ORG Tue May 13 09:35:54 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7FC0637B405; Tue, 13 May 2003 09:35:53 -0700 (PDT) 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 0B39837B404 for ; Tue, 13 May 2003 09:35:53 -0700 (PDT) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4863D43FB1 for ; Tue, 13 May 2003 09:35:50 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 3277 invoked from network); 13 May 2003 16:35:50 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 13 May 2003 16:35:50 -0000 Received: from laptop.baldwin.cx ([216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h4DGZgp0027841; Tue, 13 May 2003 12:35:42 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200305130209.h4D294xs053232@repoman.freebsd.org> Date: Tue, 13 May 2003 12:35:50 -0400 (EDT) From: John Baldwin To: Peter Wemm cc: Perforce Change Reviews Subject: RE: PERFORCE change 31043 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 16:35:54 -0000 On 13-May-2003 Peter Wemm wrote: > http://perforce.freebsd.org/chv.cgi?CH=31043 > > Change 31043 by peter@peter_hammer on 2003/05/12 19:08:19 > > And now for something completely different... i386 binary emulation! > This was submitted by p4/i386 on the amd64 box itself! Can we possibly have a shared compat/ia32? syscalls.master should be able to be shared for example. > Affected files ... > > .. //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#4 edit > .. //depot/projects/hammer/sys/amd64/amd64/exception.S#11 edit > .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#12 edit > .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#30 edit > .. //depot/projects/hammer/sys/amd64/amd64/support.S#6 edit > .. //depot/projects/hammer/sys/amd64/amd64/trap.c#14 edit > .. //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#6 edit > .. //depot/projects/hammer/sys/amd64/conf/GENERIC#8 edit > .. //depot/projects/hammer/sys/amd64/ia32/Makefile#1 add > .. //depot/projects/hammer/sys/amd64/ia32/ia32.h#1 add > .. //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#1 add > .. //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#1 add > .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#1 add > .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#1 add > .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#1 add > .. //depot/projects/hammer/sys/amd64/ia32/ia32_util.h#1 add > .. //depot/projects/hammer/sys/amd64/ia32/syscalls.conf#1 add > .. //depot/projects/hammer/sys/amd64/ia32/syscalls.master#1 add > .. //depot/projects/hammer/sys/amd64/include/cpufunc.h#6 edit > .. //depot/projects/hammer/sys/amd64/include/elf.h#7 edit > .. //depot/projects/hammer/sys/amd64/include/pcb.h#8 edit > .. //depot/projects/hammer/sys/conf/files.amd64#9 edit > .. //depot/projects/hammer/sys/conf/options.amd64#8 edit > > Differences ... > > ==== //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#4 (text+ko) ==== > > @@ -106,6 +106,12 @@ > pushfq /* PSL */ > popq PCB_RFLAGS(%r8) > > + /* Save kernel %gs.base */ > + movl $MSR_GSBASE,%ecx > + rdmsr > + movl %eax,PCB_KGSBASE(%r8) > + movl %edx,PCB_KGSBASE+4(%r8) > + > /* Save userland %fs */ > movl $MSR_FSBASE,%ecx > rdmsr > @@ -118,6 +124,12 @@ > movl %eax,PCB_GSBASE(%r8) > movl %edx,PCB_GSBASE+4(%r8) > > + /* Save segment selector numbers */ > + movl %ds,PCB_DS(%r8) > + movl %es,PCB_ES(%r8) > + movl %fs,PCB_FS(%r8) > + movl %gs,PCB_GS(%r8) > + > /* have we used fp, and need a save? */ > cmpq %rdi,PCPU(FPCURTHREAD) > jne 1f > @@ -160,6 +172,18 @@ > */ > movq TD_PCB(%rsi),%r8 > > + /* Restore segment selector numbers */ > + movl PCB_DS(%r8),%ds > + movl PCB_ES(%r8),%es > + movl PCB_FS(%r8),%fs > + movl PCB_GS(%r8),%gs > + > + /* Restore kernel %gs.base */ > + movl $MSR_GSBASE,%ecx > + movl PCB_KGSBASE(%r8),%eax > + movl PCB_KGSBASE+4(%r8),%edx > + wrmsr > + > /* Restore userland %fs */ > movl $MSR_FSBASE,%ecx > movl PCB_FSBASE(%r8),%eax > > ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#11 (text+ko) ==== > > @@ -247,7 +247,7 @@ > movq %r14,TF_R14(%rsp) > movq %r15,TF_R15(%rsp) > FAKE_MCOUNT(13*4(%rsp)) > - call syscall > + call ia32_syscall > MEXITCOUNT > jmp doreti > > > ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#12 (text+ko) ==== > > @@ -125,6 +125,11 @@ > ASSYM(PCB_RFLAGS, offsetof(struct pcb, pcb_rflags)); > ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); > ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); > +ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase)); > +ASSYM(PCB_DS, offsetof(struct pcb, pcb_ds)); > +ASSYM(PCB_ES, offsetof(struct pcb, pcb_es)); > +ASSYM(PCB_FS, offsetof(struct pcb, pcb_fs)); > +ASSYM(PCB_GS, offsetof(struct pcb, pcb_gs)); > > ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); > ASSYM(PCB_FULLCTX, PCB_FULLCTX); > @@ -181,8 +186,10 @@ > ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL)); > ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL)); > ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL)); > +ASSYM(KUC32SEL, GSEL(GUCODE32_SEL, SEL_UPL)); > > ASSYM(MSR_FSBASE, MSR_FSBASE); > +ASSYM(MSR_GSBASE, MSR_GSBASE); > ASSYM(MSR_KGSBASE, MSR_KGSBASE); > ASSYM(GPROC0_SEL, GPROC0_SEL); > > > ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#30 (text+ko) ==== > > @@ -129,7 +129,7 @@ > static int set_fpcontext(struct thread *td, const mcontext_t *mcp); > SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) > > -int _udatasel, _ucodesel; > +int _udatasel, _ucodesel, _ucode32sel; > u_long atdevbase; > > u_int64_t modulep; /* phys addr of metadata table */ > @@ -466,11 +466,25 @@ > { > struct trapframe *regs = td->td_frame; > struct pcb *pcb = td->td_pcb; > + u_int64_t pc; > > + wrmsr(MSR_FSBASE, 0); > + wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ > pcb->pcb_fsbase = 0; > pcb->pcb_gsbase = 0; > - wrmsr(MSR_FSBASE, 0); > - wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ > + pcb->pcb_kgsbase = rdmsr(MSR_GSBASE); > + load_ds(_udatasel); > + load_es(_udatasel); > + load_fs(_udatasel); > + critical_enter(); > + pc = rdmsr(MSR_GSBASE); > + load_gs(_udatasel); /* Clobbers kernel %GS.base */ > + wrmsr(MSR_GSBASE, pc); > + critical_exit(); > + pcb->pcb_ds = _udatasel; > + pcb->pcb_es = _udatasel; > + pcb->pcb_fs = _udatasel; > + pcb->pcb_gs = _udatasel; > > bzero((char *)regs, sizeof(struct trapframe)); > regs->tf_rip = entry; > @@ -589,7 +603,7 @@ > 0xfffff, /* length - all address space */ > SDT_MEMERA, /* segment type */ > SEL_UPL, /* segment descriptor priority level */ > - 0, /* segment descriptor present */ > + 1, /* segment descriptor present */ > 0, /* long */ > 1, /* default 32 vs 16 bit size */ > 1 /* limit granularity (byte/page units)*/ }, > @@ -1289,10 +1303,12 @@ > > _ucodesel = GSEL(GUCODE_SEL, SEL_UPL); > _udatasel = GSEL(GUDATA_SEL, SEL_UPL); > + _ucode32sel = GSEL(GUCODE32_SEL, SEL_UPL); > > /* setup proc 0's pcb */ > thread0.td_pcb->pcb_flags = 0; /* XXXKSE */ > thread0.td_pcb->pcb_cr3 = IdlePML4; > + thread0.td_pcb->pcb_kgsbase = (u_int64_t)pc; > thread0.td_frame = &proc0_tf; > } > > > ==== //depot/projects/hammer/sys/amd64/amd64/support.S#6 (text+ko) ==== > > @@ -358,6 +358,9 @@ > movq $0,PCB_ONFAULT(%rcx) > ret > > +ENTRY(fuword) > + jmp fuword64 > + > ENTRY(fuword32) > movq PCPU(CURPCB),%rcx > movq $fusufault,PCB_ONFAULT(%rcx) > @@ -366,15 +369,10 @@ > cmpq %rax,%rdi /* verify address is valid */ > ja fusufault > > -/* XXX use the 64 extend */ > - xorq %rax, %rax > movl (%rdi),%eax > movq $0,PCB_ONFAULT(%rcx) > ret > > -ENTRY(fuword) > - jmp fuword32 > - > /* > * These two routines are called from the profiling code, potentially > * at interrupt time. If they fail, that's okay, good things will > @@ -397,8 +395,6 @@ > cmpq %rax,%rdi > ja fusufault > > -/* XXX use the 64 extend */ > - xorq %rax, %rax > movzwl (%rdi),%eax > movq $0,PCB_ONFAULT(%rcx) > ret > @@ -414,8 +410,6 @@ > cmpq %rax,%rdi > ja fusufault > > -/* XXX use the 64 extend */ > - xorq %rax, %rax > movzbl (%rdi),%eax > movq $0,PCB_ONFAULT(%rcx) > ret > @@ -448,6 +442,9 @@ > movq %rax,PCB_ONFAULT(%rcx) > ret > > +ENTRY(suword) > + jmp suword64 > + > ENTRY(suword32) > movq PCPU(CURPCB),%rcx > movq $fusufault,PCB_ONFAULT(%rcx) > @@ -462,9 +459,6 @@ > movq %rax,PCB_ONFAULT(%rcx) > ret > > -ENTRY(suword) > - jmp suword32 > - > /* > * suword16 - MP SAFE > */ > > ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#14 (text+ko) ==== > > @@ -91,7 +91,7 @@ > extern void trap(struct trapframe frame); > extern void syscall(struct trapframe frame); > > -static int trap_pfault(struct trapframe *, int, vm_offset_t); > +static int trap_pfault(struct trapframe *, int); > static void trap_fatal(struct trapframe *, vm_offset_t); > void dblfault_handler(void); > > @@ -161,13 +161,13 @@ > struct proc *p = td->td_proc; > u_int sticks = 0; > int i = 0, ucode = 0, type, code; > - vm_offset_t eva; > > atomic_add_int(&cnt.v_trap, 1); > type = frame.tf_trapno; > > #ifdef DDB > if (db_active) { > + vm_offset_t eva; > eva = (type == T_PAGEFLT ? frame.tf_addr : 0); > trap_fatal(&frame, eva); > goto out; > @@ -202,7 +202,6 @@ > } > } > > - eva = 0; > code = frame.tf_err; > if (type == T_PAGEFLT) { > /* > @@ -213,9 +212,8 @@ > * kernel can print out a useful trap message and even get > * to the debugger. > */ > - eva = frame.tf_addr; > if (PCPU_GET(spinlocks) != NULL) > - trap_fatal(&frame, eva); > + trap_fatal(&frame, frame.tf_addr); > } > > #ifdef DEVICE_POLLING > @@ -261,7 +259,7 @@ > break; > > case T_PAGEFLT: /* page fault */ > - i = trap_pfault(&frame, TRUE, eva); > + i = trap_pfault(&frame, TRUE); > if (i == -1) > goto userout; > if (i == 0) > @@ -331,7 +329,7 @@ > ("kernel trap doesn't have ucred")); > switch (type) { > case T_PAGEFLT: /* page fault */ > - (void) trap_pfault(&frame, FALSE, eva); > + (void) trap_pfault(&frame, FALSE); > goto out; > > case T_DNA: > @@ -430,7 +428,7 @@ > #endif /* DEV_ISA */ > } > > - trap_fatal(&frame, eva); > + trap_fatal(&frame, 0); > goto out; > } > > @@ -445,7 +443,7 @@ > uprintf("fatal process exception: %s", > trap_msg[type]); > if ((type == T_PAGEFLT) || (type == T_PROTFLT)) > - uprintf(", fault VA = 0x%lx", eva); > + uprintf(", fault VA = 0x%lx", frame.tf_addr); > uprintf("\n"); > } > #endif > @@ -462,10 +460,9 @@ > } > > static int > -trap_pfault(frame, usermode, eva) > +trap_pfault(frame, usermode) > struct trapframe *frame; > int usermode; > - vm_offset_t eva; > { > vm_offset_t va; > struct vmspace *vm = NULL; > @@ -474,6 +471,7 @@ > vm_prot_t ftype; > struct thread *td = curthread; > struct proc *p = td->td_proc; > + vm_offset_t eva = frame->tf_addr; > > va = trunc_page(eva); > if (va >= KERNBASE) { > @@ -542,7 +540,7 @@ > return (-1); > } > > -printf("trap_pfault: pid %d %s %s %s eva %p, rip %p, rax %p, rbx %p, rcx %p, rdx %p, rsp %p, rvp > %p, rsi %p, rdi %p\n", p->p_pid, > +printf("trap_pfault: pid %d %s %s %s eva %p, rip %p, rax %p, rbx %p, rcx %p, rdx %p, rsp %p, rbp > %p, rsi %p, rdi %p\n", p->p_pid, > frame->tf_err & PGEX_U ? "user" : "supervisor", > frame->tf_err & PGEX_W ? "write" : "read", > frame->tf_err & PGEX_P ? "protection violation" : "page not present", > @@ -820,3 +818,173 @@ > mtx_assert(&Giant, MA_NOTOWNED); > } > > +void ia32_syscall(struct trapframe frame); > +void > +ia32_syscall(struct trapframe frame) > +{ > + caddr_t params; > + int i; > + struct sysent *callp; > + struct thread *td = curthread; > + struct proc *p = td->td_proc; > + register_t orig_tf_rflags; > + u_int sticks; > + int error; > + int narg; > + u_int32_t args[8]; > + u_int64_t args64[8]; > + u_int code; > + > + /* > + * note: PCPU_LAZY_INC() can only be used if we can afford > + * occassional inaccuracy in the count. > + */ > + cnt.v_syscall++; > + > + sticks = td->td_sticks; > + td->td_frame = &frame; > + if (td->td_ucred != p->p_ucred) > + cred_update_thread(td); > + params = (caddr_t)frame.tf_rsp + sizeof(u_int32_t); > + code = frame.tf_rax; > + orig_tf_rflags = frame.tf_rflags; > + > + if (p->p_sysent->sv_prepsyscall) { > + /* > + * The prep code is MP aware. > + */ > + (*p->p_sysent->sv_prepsyscall)(&frame, args, &code, ¶ms); > + } else { > + /* > + * Need to check if this is a 32 bit or 64 bit syscall. > + * fuword is MP aware. > + */ > + if (code == SYS_syscall) { > + /* > + * Code is first argument, followed by actual args. > + */ > + code = fuword32(params); > + params += sizeof(int); > + } else if (code == SYS___syscall) { > + /* > + * Like syscall, but code is a quad, so as to maintain > + * quad alignment for the rest of the arguments. > + * We use a 32-bit fetch in case params is not > + * aligned. > + */ > + code = fuword32(params); > + params += sizeof(quad_t); > + } > + } > + > + if (p->p_sysent->sv_mask) > + code &= p->p_sysent->sv_mask; > + > + if (code >= p->p_sysent->sv_size) > + callp = &p->p_sysent->sv_table[0]; > + else > + callp = &p->p_sysent->sv_table[code]; > + > + narg = callp->sy_narg & SYF_ARGMASK; > + > + /* > + * copyin and the ktrsyscall()/ktrsysret() code is MP-aware > + */ > + if (params != NULL && narg != 0) > + error = copyin(params, (caddr_t)args, > + (u_int)(narg * sizeof(int))); > + else > + error = 0; > + > + for (i = 0; i < narg; i++) > + args64[i] = args[i]; > + > +#ifdef KTRACE > + if (KTRPOINT(td, KTR_SYSCALL)) > + ktrsyscall(code, narg, args64); > +#endif > + /* > + * Try to run the syscall without Giant if the syscall > + * is MP safe. > + */ > + if ((callp->sy_narg & SYF_MPSAFE) == 0) > + mtx_lock(&Giant); > + > + if (error == 0) { > + td->td_retval[0] = 0; > + td->td_retval[1] = frame.tf_rdx; > + > + STOPEVENT(p, S_SCE, narg); > + > + error = (*callp->sy_call)(td, args64); > + } > + > + switch (error) { > + case 0: > + frame.tf_rax = td->td_retval[0]; > + frame.tf_rdx = td->td_retval[1]; > + frame.tf_rflags &= ~PSL_C; > + break; > + > + case ERESTART: > + /* > + * Reconstruct pc, assuming lcall $X,y is 7 bytes, > + * int 0x80 is 2 bytes. We saved this in tf_err. > + */ > + frame.tf_rip -= frame.tf_err; > + break; > + > + case EJUSTRETURN: > + break; > + > + default: > + if (p->p_sysent->sv_errsize) { > + if (error >= p->p_sysent->sv_errsize) > + error = -1; /* XXX */ > + else > + error = p->p_sysent->sv_errtbl[error]; > + } > + frame.tf_rax = error; > + frame.tf_rflags |= PSL_C; > + break; > + } > + > + /* > + * Release Giant if we previously set it. > + */ > + if ((callp->sy_narg & SYF_MPSAFE) == 0) > + mtx_unlock(&Giant); > + > + /* > + * Traced syscall. > + */ > + if (orig_tf_rflags & PSL_T) { > + frame.tf_rflags &= ~PSL_T; > + trapsignal(td, SIGTRAP, 0); > + } > + > + /* > + * Handle reschedule and other end-of-syscall issues > + */ > + userret(td, &frame, sticks); > + > +#ifdef KTRACE > + if (KTRPOINT(td, KTR_SYSRET)) > + ktrsysret(code, error, td->td_retval[0]); > +#endif > + > + /* > + * This works because errno is findable through the > + * register set. If we ever support an emulation where this > + * is not the case, this code will need to be revisited. > + */ > + STOPEVENT(p, S_SCX, code); > + > +#ifdef DIAGNOSTIC > + cred_free_thread(td); > +#endif > + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", > + (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); > + mtx_assert(&sched_lock, MA_NOTOWNED); > + mtx_assert(&Giant, MA_NOTOWNED); > +} > > ==== //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#6 (text+ko) ==== > > @@ -76,7 +76,6 @@ > #include > > static void cpu_reset_real(void); > -extern int _ucodesel, _udatasel; > > /* > * Finish a fork operation, with process p2 nearly set up. > @@ -143,6 +142,7 @@ > * pcb2->pcb_savefpu: cloned above. > * pcb2->pcb_flags: cloned above. > * pcb2->pcb_onfault: cloned above (always NULL here?). > + * pcb2->pcb_[fg]sbase: cloned above > */ > > /* > > ==== //depot/projects/hammer/sys/amd64/conf/GENERIC#8 (text+ko) ==== > > @@ -23,6 +23,7 @@ > ident GENERIC > maxusers 0 > options NDA #Avoid accidental cut/paste of NDA'ed stuff > +options IA32 > > makeoptions NO_MODULES=not_yet > > @@ -42,6 +43,10 @@ > options INVARIANTS #Enable calls of extra sanity checking > options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS > > +options SYSVMSG > +options SYSVSEM > +options SYSVSHM > + > device isa > device pci > > > ==== //depot/projects/hammer/sys/amd64/include/cpufunc.h#6 (text+ko) ==== > > @@ -447,7 +447,6 @@ > __asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory"); > } > > -/* XXX these are replaced with rdmsr/wrmsr */ > static __inline u_int > rfs(void) > { > @@ -465,6 +464,18 @@ > } > > static __inline void > +load_ds(u_int sel) > +{ > + __asm __volatile("movl %0,%%ds" : : "rm" (sel)); > +} > + > +static __inline void > +load_es(u_int sel) > +{ > + __asm __volatile("movl %0,%%es" : : "rm" (sel)); > +} > + > +static __inline void > load_fs(u_int sel) > { > __asm __volatile("movl %0,%%fs" : : "rm" (sel)); > > ==== //depot/projects/hammer/sys/amd64/include/elf.h#7 (text+ko) ==== > > @@ -33,9 +33,12 @@ > * ELF definitions for the AMD64 architecture. > */ > > -#include /* Definitions common to all 64 bit architectures. */ > > +#ifndef __ELF_WORD_SIZE > #define __ELF_WORD_SIZE 64 /* Used by */ > +#endif > +#include /* Definitions common to all 32 bit architectures. */ > +#include /* Definitions common to all 64 bit architectures. */ > #include > > #define ELF_ARCH EM_X86_64 > @@ -48,6 +51,13 @@ > * The i386 supplement to the SVR4 ABI specification names this "auxv_t", > * but POSIX lays claim to all symbols ending with "_t". > */ > +typedef struct { /* Auxiliary vector entry on initial stack */ > + int a_type; /* Entry type. */ > + union { > + int a_val; /* Integer value. */ > + } a_un; > +} Elf32_Auxinfo; > + > > typedef struct { /* Auxiliary vector entry on initial stack */ > long a_type; /* Entry type. */ > @@ -118,7 +128,11 @@ > #define R_X86_64_COUNT 16 /* Count of defined relocation types. */ > > /* Define "machine" characteristics */ > -#define ELF_TARG_CLASS ELFCLASS64 > +#if __ELF_WORD_SIZE == 32 > +#define ELF_TARG_CLASS ELFCLASS32 > +#else > +#define ELF_TARG_CLASS ELFCLASS64 > +#endif > #define ELF_TARG_DATA ELFDATA2LSB > #define ELF_TARG_MACH EM_X86_64 > #define ELF_TARG_VER 1 > > ==== //depot/projects/hammer/sys/amd64/include/pcb.h#8 (text+ko) ==== > > @@ -59,6 +59,11 @@ > register_t pcb_rflags; > register_t pcb_fsbase; > register_t pcb_gsbase; > + register_t pcb_kgsbase; > + u_int32_t pcb_ds; > + u_int32_t pcb_es; > + u_int32_t pcb_fs; > + u_int32_t pcb_gs; > > struct savefpu pcb_save; > u_long pcb_flags; > > ==== //depot/projects/hammer/sys/conf/files.amd64#9 (text+ko) ==== > > @@ -64,7 +64,10 @@ > amd64/pci/pci_cfgreg.c optional pci > amd64/pci/pci_bus.c optional pci > > - > +amd64/ia32/ia32_misc.c optional ia32 > +amd64/ia32/ia32_sysent.c optional ia32 > +amd64/ia32/ia32_sysvec.c optional ia32 > +kern/imgact_elf32.c optional ia32 > > # This file tells config what files go into building a kernel, > # files marked standard are always included. > > ==== //depot/projects/hammer/sys/conf/options.amd64#8 (text+ko) ==== > > @@ -60,3 +60,4 @@ > PSM_HOOKRESUME opt_psm.h > PSM_RESETAFTERSUSPEND opt_psm.h > PSM_DEBUG opt_psm.h > +IA32 -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ From owner-p4-projects@FreeBSD.ORG Tue May 13 09:49:16 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 579F637B404; Tue, 13 May 2003 09:49:16 -0700 (PDT) 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 0219D37B401 for ; Tue, 13 May 2003 09:49:16 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCB3C43F75 for ; Tue, 13 May 2003 09:49:14 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DGnE0U024951 for ; Tue, 13 May 2003 09:49:14 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DGnDDv024948 for perforce@freebsd.org; Tue, 13 May 2003 09:49:13 -0700 (PDT) Date: Tue, 13 May 2003 09:49:13 -0700 (PDT) Message-Id: <200305131649.h4DGnDDv024948@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 31075 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 16:49:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=31075 Change 31075 by jhb@jhb_laptop on 2003/05/13 09:48:29 IFC @31064. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/cpu_switch.S#2 integrate .. //depot/projects/smpng/sys/amd64/amd64/elf_machdep.c#2 integrate .. //depot/projects/smpng/sys/amd64/amd64/exception.S#3 integrate .. //depot/projects/smpng/sys/amd64/amd64/genassym.c#2 integrate .. //depot/projects/smpng/sys/amd64/amd64/identcpu.c#2 integrate .. //depot/projects/smpng/sys/amd64/amd64/machdep.c#3 integrate .. //depot/projects/smpng/sys/amd64/amd64/nexus.c#2 integrate .. //depot/projects/smpng/sys/amd64/amd64/pmap.c#2 integrate .. //depot/projects/smpng/sys/amd64/amd64/support.S#2 integrate .. //depot/projects/smpng/sys/amd64/amd64/sys_machdep.c#2 integrate .. //depot/projects/smpng/sys/amd64/amd64/trap.c#3 integrate .. //depot/projects/smpng/sys/amd64/include/_types.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/asm.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/bus.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/bus_amd64.h#1 branch .. //depot/projects/smpng/sys/amd64/include/bus_at386.h#2 delete .. //depot/projects/smpng/sys/amd64/include/bus_dma.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/bus_memio.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/bus_pio.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/frame.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/md_var.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/pcb.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/stdarg.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/sysarch.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/ucontext.h#2 integrate .. //depot/projects/smpng/sys/amd64/isa/icu_vector.S#2 integrate .. //depot/projects/smpng/sys/boot/common/load_elf.c#9 integrate .. //depot/projects/smpng/sys/boot/i386/libi386/elf64_freebsd.c#2 integrate .. //depot/projects/smpng/sys/boot/i386/libi386/i386_module.c#8 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4.h#2 integrate .. //depot/projects/smpng/sys/conf/Makefile.amd64#2 integrate .. //depot/projects/smpng/sys/conf/files#77 integrate .. //depot/projects/smpng/sys/conf/majors#24 integrate .. //depot/projects/smpng/sys/dev/acpica/Osd/OsdHardware.c#7 integrate .. //depot/projects/smpng/sys/dev/ata/ata-card.c#10 integrate .. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#12 integrate .. //depot/projects/smpng/sys/dev/ata/ata-pci.h#8 integrate .. //depot/projects/smpng/sys/dev/firewire/firewire.c#17 integrate .. //depot/projects/smpng/sys/dev/firewire/sbp.c#17 integrate .. //depot/projects/smpng/sys/dev/fxp/if_fxpreg.h#7 integrate .. //depot/projects/smpng/sys/dev/ips/ips.c#1 branch .. //depot/projects/smpng/sys/dev/ips/ips.h#1 branch .. //depot/projects/smpng/sys/dev/ips/ips_commands.c#1 branch .. //depot/projects/smpng/sys/dev/ips/ips_disk.c#1 branch .. //depot/projects/smpng/sys/dev/ips/ips_disk.h#1 branch .. //depot/projects/smpng/sys/dev/ips/ips_ioctl.c#1 branch .. //depot/projects/smpng/sys/dev/ips/ips_ioctl.h#1 branch .. //depot/projects/smpng/sys/dev/ips/ips_pci.c#1 branch .. //depot/projects/smpng/sys/dev/kbd/atkbdc.c#6 integrate .. //depot/projects/smpng/sys/dev/usb/umass.c#23 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#31 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs.h#32 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs_data.h#32 integrate .. //depot/projects/smpng/sys/geom/geom_dev.c#24 integrate .. //depot/projects/smpng/sys/geom/geom_disk.c#25 integrate .. //depot/projects/smpng/sys/i386/conf/GENERIC#36 integrate .. //depot/projects/smpng/sys/i386/conf/NOTES#58 integrate .. //depot/projects/smpng/sys/i386/linux/linux_sysvec.c#31 integrate .. //depot/projects/smpng/sys/kern/kern_malloc.c#21 integrate .. //depot/projects/smpng/sys/kern/link_elf.c#20 integrate .. //depot/projects/smpng/sys/kern/subr_mbuf.c#31 integrate .. //depot/projects/smpng/sys/kern/vfs_subr.c#52 integrate .. //depot/projects/smpng/sys/modules/Makefile#52 integrate .. //depot/projects/smpng/sys/modules/ips/Makefile#1 branch .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/bluetooth/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/bt3c/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/h4/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/hci/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/l2cap/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/socket/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/ubt/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#1 branch .. //depot/projects/smpng/sys/netgraph/bluetooth/common/ng_bluetooth.c#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/ubt/TODO#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#5 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#1 branch .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/TODO#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_cmds.c#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_cmds.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_evnt.c#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_evnt.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_main.c#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_misc.c#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_misc.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_prse.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/hci/ng_hci_var.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_bluetooth.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_bt3c.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_btsocket.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h#1 branch .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_h4.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_hci.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_l2cap.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/include/ng_ubt.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/TODO#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c#3 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_prse.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/TODO#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/ng_btsocket.c#2 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#6 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#5 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#4 integrate .. //depot/projects/smpng/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#1 branch .. //depot/projects/smpng/sys/pci/if_dc.c#36 integrate .. //depot/projects/smpng/sys/pci/if_dcreg.h#13 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/cpu_switch.S#2 (text+ko) ==== @@ -33,7 +33,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.138 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.139 2003/05/12 02:37:28 peter Exp $ */ #include @@ -92,27 +92,39 @@ jz badsw2 /* no, panic */ #endif - movq TD_PCB(%rdi),%rdx + movq TD_PCB(%rdi),%r8 movq (%rsp),%rax /* Hardware registers */ - movq %rax,PCB_RIP(%rdx) - movq %rbx,PCB_RBX(%rdx) - movq %rsp,PCB_RSP(%rdx) - movq %rbp,PCB_RBP(%rdx) - movq %r12,PCB_R12(%rdx) - movq %r13,PCB_R13(%rdx) - movq %r14,PCB_R14(%rdx) - movq %r15,PCB_R15(%rdx) + movq %rax,PCB_RIP(%r8) + movq %rbx,PCB_RBX(%r8) + movq %rsp,PCB_RSP(%r8) + movq %rbp,PCB_RBP(%r8) + movq %r12,PCB_R12(%r8) + movq %r13,PCB_R13(%r8) + movq %r14,PCB_R14(%r8) + movq %r15,PCB_R15(%r8) pushfq /* PSL */ - popq PCB_RFLAGS(%rdx) + popq PCB_RFLAGS(%r8) + + /* Save userland %fs */ + movl $MSR_FSBASE,%ecx + rdmsr + movl %eax,PCB_FSBASE(%r8) + movl %edx,PCB_FSBASE+4(%r8) + + /* Save userland %gs */ + movl $MSR_KGSBASE,%ecx + rdmsr + movl %eax,PCB_GSBASE(%r8) + movl %edx,PCB_GSBASE+4(%r8) /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) jne 1f pushq %rdi pushq %rsi - addq $PCB_SAVEFPU,%rdx /* h/w bugs make saving complicated */ - movq %rdx, %rdi + addq $PCB_SAVEFPU,%r8 /* h/w bugs make saving complicated */ + movq %r8, %rdi call npxsave /* do it in a big C function */ popq %rsi popq %rdi @@ -123,12 +135,12 @@ testq %rsi,%rsi /* no thread? */ jz badsw3 /* no, panic */ #endif - movq TD_PCB(%rsi),%rdx + movq TD_PCB(%rsi),%r8 xorq %rax, %rax movl PCPU(CPUID), %eax /* switch address space */ - movq PCB_CR3(%rdx),%rdx + movq PCB_CR3(%r8),%rdx movq %rdx,%cr3 /* new address space */ /* Release bit from old pmap->pm_active */ @@ -146,26 +158,38 @@ * At this point, we've switched address spaces and are ready * to load up the rest of the next context. */ - movq TD_PCB(%rsi),%rdx + movq TD_PCB(%rsi),%r8 + + /* Restore userland %fs */ + movl $MSR_FSBASE,%ecx + movl PCB_FSBASE(%r8),%eax + movl PCB_FSBASE+4(%r8),%edx + wrmsr + + /* Restore userland %gs */ + movl $MSR_KGSBASE,%ecx + movl PCB_GSBASE(%r8),%eax + movl PCB_GSBASE+4(%r8),%edx + wrmsr /* Update the TSS_RSP0 pointer for the next interrupt */ - leaq -16(%rdx), %rbx + leaq -16(%r8), %rbx movq %rbx, common_tss + COMMON_TSS_RSP0 /* Restore context. */ - movq PCB_RBX(%rdx),%rbx - movq PCB_RSP(%rdx),%rsp - movq PCB_RBP(%rdx),%rbp - movq PCB_R12(%rdx),%r12 - movq PCB_R13(%rdx),%r13 - movq PCB_R14(%rdx),%r14 - movq PCB_R15(%rdx),%r15 - movq PCB_RIP(%rdx),%rax + movq PCB_RBX(%r8),%rbx + movq PCB_RSP(%r8),%rsp + movq PCB_RBP(%r8),%rbp + movq PCB_R12(%r8),%r12 + movq PCB_R13(%r8),%r13 + movq PCB_R14(%r8),%r14 + movq PCB_R15(%r8),%r15 + movq PCB_RIP(%r8),%rax movq %rax,(%rsp) - pushq PCB_RFLAGS(%rdx) + pushq PCB_RFLAGS(%r8) popfq - movq %rdx, PCPU(CURPCB) + movq %r8, PCPU(CURPCB) movq %rsi, PCPU(CURTHREAD) /* into next thread */ ret ==== //depot/projects/smpng/sys/amd64/amd64/elf_machdep.c#2 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.14 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.15 2003/05/11 22:40:24 peter Exp $ */ #include @@ -170,7 +170,7 @@ break; default: - printf("kldload: unexpected relocation type %d\n", + printf("kldload: unexpected relocation type %ld\n", rtype); return -1; } ==== //depot/projects/smpng/sys/amd64/amd64/exception.S#3 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.106 2003/05/08 00:05:00 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.109 2003/05/12 18:33:19 peter Exp $ */ #include @@ -51,16 +51,16 @@ /* * Trap and fault vector routines. * - * Most traps are 'trap gates', SDT_SYS386TGT. A trap gate pushes state on - * the stack that mostly looks like an interrupt, but does not disable - * interrupts. A few of the traps we are use are interrupt gates, - * SDT_SYS386IGT, which are nearly the same thing except interrupts are - * disabled on entry. + * All traps are 'interrupt gates', SDT_SYSIGT. An interrupt gate pushes + * state on the stack but also disables interrupts. This is important for + * us for the use of the swapgs instruction. We cannot be interrupted + * until the GS.base value is correct. For most traps, we automatically + * then enable interrupts if the interrupted context had them enabled. + * This is equivalent to the i386 port's use of SDT_SYS386TGT. * * The cpu will push a certain amount of state onto the kernel stack for - * the current process. The amount of state depends on the type of trap - * and whether the trap crossed rings or not. See i386/include/frame.h. - * At the very least the current EFLAGS (status register, which includes + * the current process. See amd64/include/frame.h. + * This includes the current RFLAGS (status register, which includes * the interrupt disable state prior to the trap), the code segment register, * and the return instruction pointer are pushed by the cpu. The cpu * will also push an 'error' code for certain traps. We push a dummy @@ -74,63 +74,89 @@ */ #define IDTVEC(name) ALIGN_TEXT; .globl __CONCAT(X,name); \ .type __CONCAT(X,name),@function; __CONCAT(X,name): -#define TRAP(a) pushq $(a) ; jmp alltraps MCOUNT_LABEL(user) MCOUNT_LABEL(btrap) +/* Traps that we leave interrupts disabled for.. */ +#define TRAP_NOEN(a) \ + subq $TF_RIP,%rsp; \ + movq $(a),TF_TRAPNO(%rsp) ; \ + movq $0,TF_ADDR(%rsp) ; \ + movq $0,TF_ERR(%rsp) ; \ + jmp alltraps_noen +IDTVEC(dbg) + TRAP_NOEN(T_TRCTRAP) +IDTVEC(bpt) + TRAP_NOEN(T_BPTFLT) + +/* Regular traps; The cpu does not supply tf_err for these. */ +#define TRAP(a) \ + subq $TF_RIP,%rsp; \ + movq $(a),TF_TRAPNO(%rsp) ; \ + movq $0,TF_ADDR(%rsp) ; \ + movq $0,TF_ERR(%rsp) ; \ + jmp alltraps IDTVEC(div) - pushq $0; TRAP(T_DIVIDE) -IDTVEC(dbg) - pushq $0; TRAP(T_TRCTRAP) + TRAP(T_DIVIDE) IDTVEC(nmi) - pushq $0; TRAP(T_NMI) -IDTVEC(bpt) - pushq $0; TRAP(T_BPTFLT) + TRAP(T_NMI) IDTVEC(ofl) - pushq $0; TRAP(T_OFLOW) + TRAP(T_OFLOW) IDTVEC(bnd) - pushq $0; TRAP(T_BOUND) + TRAP(T_BOUND) IDTVEC(ill) - pushq $0; TRAP(T_PRIVINFLT) + TRAP(T_PRIVINFLT) IDTVEC(dna) - pushq $0; TRAP(T_DNA) + TRAP(T_DNA) IDTVEC(fpusegm) - pushq $0; TRAP(T_FPOPFLT) + TRAP(T_FPOPFLT) +IDTVEC(mchk) + TRAP(T_MCHK) +IDTVEC(rsvd) + TRAP(T_RESERVED) +IDTVEC(fpu) + TRAP(T_ARITHTRAP) +IDTVEC(xmm) + TRAP(T_XMMFLT) + +/* This group of traps have tf_err already pushed by the cpu */ +#define TRAP_ERR(a) \ + subq $TF_ERR,%rsp; \ + movq $(a),TF_TRAPNO(%rsp) ; \ + movq $0,TF_ADDR(%rsp) ; \ + jmp alltraps_noen IDTVEC(tss) - TRAP(T_TSSFLT) + TRAP_ERR(T_TSSFLT) IDTVEC(missing) - TRAP(T_SEGNPFLT) + TRAP_ERR(T_SEGNPFLT) IDTVEC(stk) - TRAP(T_STKFLT) + TRAP_ERR(T_STKFLT) IDTVEC(prot) - TRAP(T_PROTFLT) -IDTVEC(page) - TRAP(T_PAGEFLT) -IDTVEC(mchk) - pushq $0; TRAP(T_MCHK) -IDTVEC(rsvd) - pushq $0; TRAP(T_RESERVED) -IDTVEC(fpu) - pushq $0; TRAP(T_ARITHTRAP) + TRAP_ERR(T_PROTFLT) IDTVEC(align) - TRAP(T_ALIGNFLT) -IDTVEC(xmm) - pushq $0; TRAP(T_XMMFLT) + TRAP_ERR(T_ALIGNFLT) /* - * alltraps entry point. Interrupts are enabled if this was a trap - * gate (TGT), else disabled if this was an interrupt gate (IGT). - * Note that int0x80_syscall is a trap gate. Only page faults - * use an interrupt gate. + * alltraps entry point. Use swapgs if this is the first time in the + * kernel from userland. Reenable interrupts if they were enabled + * before the trap. This approximates SDT_SYS386TGT on the i386 port. */ SUPERALIGN_TEXT .globl alltraps .type alltraps,@function alltraps: - subq $TF_TRAPNO,%rsp /* tf_err and tf_trapno already pushed */ + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz alltraps_testi /* already running with kernel GS.base */ + swapgs +alltraps_testi: + testl $PSL_I,TF_RFLAGS(%rsp) + jz alltraps_pushregs + sti +alltraps_pushregs: movq %rdi,TF_RDI(%rsp) +alltraps_pushregs_no_rdi: movq %rsi,TF_RSI(%rsp) movq %rdx,TF_RDX(%rsp) movq %rcx,TF_RCX(%rsp) @@ -153,22 +179,56 @@ MEXITCOUNT jmp doreti /* Handle any pending ASTs */ + /* + * alltraps_noen entry point. Unlike alltraps above, we want to + * leave the interrupts disabled. This corresponds to + * SDT_SYS386IGT on the i386 port. + */ + SUPERALIGN_TEXT + .globl alltraps_noen + .type alltraps_noen,@function +alltraps_noen: + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz alltraps_pushregs /* already running with kernel GS.base */ + swapgs + jmp alltraps_pushregs + +IDTVEC(dblfault) + subq $TF_ERR,%rsp + movq $T_DOUBLEFLT,TF_TRAPNO(%rsp) + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz 1f /* already running with kernel GS.base */ + swapgs +1: call dblfault_handler +2: hlt + jmp 2b + +IDTVEC(page) + subq $TF_ERR,%rsp + movq $T_PAGEFLT,TF_TRAPNO(%rsp) + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz 1f /* already running with kernel GS.base */ + swapgs +1: movq %rdi,TF_RDI(%rsp) /* free up a GP register */ + movq %cr2,%rdi /* preserve %cr2 before .. */ + movq %rdi,TF_ADDR(%rsp) /* enabling interrupts. */ + testl $PSL_I,TF_RFLAGS(%rsp) + jz alltraps_pushregs_no_rdi + sti + jmp alltraps_pushregs_no_rdi + /* * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) * - * Even though the name says 'int0x80', this is actually a TGT (trap gate) - * rather then an IGT (interrupt gate). Thus interrupts are enabled on - * entry just as they are for a normal syscall. - * - * This leaves a place to put eflags so that the call frame can be - * converted to a trap frame. Note that the eflags is (semi-)bogusly - * pushed into (what will be) tf_err and then copied later into the - * final spot. It has to be done this way because esp can't be just - * temporarily altered for the pushfl - an interrupt might come in - * and clobber the saved cs/eip. + * This is a SDT_SYSIDT entry point (unlike the i386 port) so that we + * can do a swapgs before enabling interrupts. This is critical because + * if we took an interrupt before swapgs, the interrupt code would see + * that it originated in supervisor mode and skip the swapgs. */ SUPERALIGN_TEXT IDTVEC(int0x80_syscall) + swapgs + sti pushq $2 /* sizeof "int 0x80" */ subq $TF_ERR,%rsp /* skip over tf_trapno */ movq %rdi,TF_RDI(%rsp) @@ -196,19 +256,21 @@ * and the new privilige level. We are still running on the old user stack * pointer. We have to juggle a few things around to find our stack etc. * swapgs gives us access to our PCPU space only. - * XXX The PCPU stuff is stubbed out right now... */ IDTVEC(fast_syscall) - #swapgs + swapgs movq %rsp,PCPU(SCRATCH_RSP) movq common_tss+COMMON_TSS_RSP0,%rsp /* Now emulate a trapframe. Ugh. */ subq $TF_SIZE,%rsp - movq $KUDSEL,TF_SS(%rsp) /* defer TF_RSP till we have a spare register */ movq %r11,TF_RFLAGS(%rsp) + movq %rcx,TF_RIP(%rsp) /* %rcx original value is in %r10 */ + movq PCPU(SCRATCH_RSP),%r11 /* %r11 already saved */ + movq %r11,TF_RSP(%rsp) /* user stack pointer */ + sti + movq $KUDSEL,TF_SS(%rsp) movq $KUCSEL,TF_CS(%rsp) - movq %rcx,TF_RIP(%rsp) /* %rcx original value is in %r10 */ movq $2,TF_ERR(%rsp) movq %rdi,TF_RDI(%rsp) /* arg 1 */ movq %rsi,TF_RSI(%rsp) /* arg 2 */ @@ -223,14 +285,10 @@ movq %r13,TF_R13(%rsp) /* C preserved */ movq %r14,TF_R14(%rsp) /* C preserved */ movq %r15,TF_R15(%rsp) /* C preserved */ - movq PCPU(SCRATCH_RSP),%r12 /* %r12 already saved */ - movq %r12,TF_RSP(%rsp) /* user stack pointer */ - sti call syscall movq PCPU(CURPCB),%rax testq $PCB_FULLCTX,PCB_FLAGS(%rax) jne 3f - /* simplified from doreti */ 1: /* Check for and handle AST's on return to userland */ cli movq PCPU(CURTHREAD),%rax @@ -255,7 +313,7 @@ movq TF_RIP(%rsp),%rcx /* original %rip */ movq TF_RSP(%rsp),%r9 /* user stack pointer */ movq %r9,%rsp /* original %rsp */ - #swapgs + swapgs sysretq 3: /* Requested full context restore, use doreti for that */ andq $~PCB_FULLCTX,PCB_FLAGS(%rax) @@ -344,12 +402,16 @@ movq TF_R13(%rsp),%r13 movq TF_R14(%rsp),%r14 movq TF_R15(%rsp),%r15 - addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz 1f /* keep running with kernel GS.base */ + cli + swapgs +1: addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ .globl doreti_iret doreti_iret: iretq - /* + /* * doreti_iret_fault and friends. Alternative return code for * the case where we get a fault in the doreti_exit code * above. trap() (i386/i386/trap.c) catches this specific @@ -360,7 +422,13 @@ .globl doreti_iret_fault doreti_iret_fault: subq $TF_RIP,%rsp /* space including tf_err, tf_trapno */ - movq %rdi,TF_RDI(%rsp) + testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ + jz 1f /* already running with kernel GS.base */ + swapgs +1: testl $PSL_I,TF_RFLAGS(%rsp) + jz 2f + sti +2: movq %rdi,TF_RDI(%rsp) movq %rsi,TF_RSI(%rsp) movq %rdx,TF_RDX(%rsp) movq %rcx,TF_RCX(%rsp) ==== //depot/projects/smpng/sys/amd64/amd64/genassym.c#2 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.141 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.144 2003/05/12 18:33:19 peter Exp $ */ #include "opt_compat.h" @@ -70,6 +70,7 @@ #include #include #include +#include ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace)); ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); @@ -106,6 +107,8 @@ ASSYM(PAGE_SHIFT, PAGE_SHIFT); ASSYM(PAGE_MASK, PAGE_MASK); ASSYM(PDRSHIFT, PDRSHIFT); +ASSYM(PDPSHIFT, PDPSHIFT); +ASSYM(PML4SHIFT, PML4SHIFT); ASSYM(USRSTACK, USRSTACK); ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); ASSYM(KERNBASE, KERNBASE); @@ -120,6 +123,8 @@ ASSYM(PCB_RBX, offsetof(struct pcb, pcb_rbx)); ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip)); ASSYM(PCB_RFLAGS, offsetof(struct pcb, pcb_rflags)); +ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); +ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_FULLCTX, PCB_FULLCTX); @@ -147,6 +152,7 @@ ASSYM(TF_RCX, offsetof(struct trapframe, tf_rcx)); ASSYM(TF_RAX, offsetof(struct trapframe, tf_rax)); ASSYM(TF_TRAPNO, offsetof(struct trapframe, tf_trapno)); +ASSYM(TF_ADDR, offsetof(struct trapframe, tf_addr)); ASSYM(TF_ERR, offsetof(struct trapframe, tf_err)); ASSYM(TF_RIP, offsetof(struct trapframe, tf_rip)); ASSYM(TF_CS, offsetof(struct trapframe, tf_cs)); @@ -176,6 +182,8 @@ ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL)); ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL)); +ASSYM(MSR_FSBASE, MSR_FSBASE); +ASSYM(MSR_KGSBASE, MSR_KGSBASE); ASSYM(GPROC0_SEL, GPROC0_SEL); ASSYM(MTX_LOCK, offsetof(struct mtx, mtx_lock)); ==== //depot/projects/smpng/sys/amd64/amd64/identcpu.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.123 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.124 2003/05/11 23:01:04 peter Exp $ */ #include "opt_cpu.h" @@ -129,9 +129,9 @@ * (also describes ``Features'' encodings. */ strcpy(cpu_model, "AMD "); - switch (cpu_id & 0xFF0) { + switch (cpu_id & 0xF00) { case 0xf00: - strcat(cpu_model, "Hammer"); + strcat(cpu_model, "AMD64 Processor"); break; default: strcat(cpu_model, "Unknown"); ==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.568 2003/05/08 08:25:51 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.575 2003/05/12 18:37:56 peter Exp $ */ #include "opt_atalk.h" @@ -130,7 +130,7 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) int _udatasel, _ucodesel; -u_int atdevbase; +u_long atdevbase; u_int64_t modulep; /* phys addr of metadata table */ u_int64_t physfree; /* first free page after kernel */ @@ -245,7 +245,7 @@ sf.sf_uc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK) ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - bcopy(regs, &sf.sf_uc.uc_mcontext.mc_r15, sizeof(*regs)); + bcopy(regs, &sf.sf_uc.uc_mcontext.mc_rdi, sizeof(*regs)); sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); @@ -280,11 +280,11 @@ /* Fill in POSIX parts */ sf.sf_si.si_signo = sig; sf.sf_si.si_code = code; - regs->tf_rcx = regs->tf_err; /* arg 4 in %rcx */ + regs->tf_rcx = regs->tf_addr; /* arg 4 in %rcx */ } else { /* Old FreeBSD-style arguments. */ regs->tf_rsi = code; /* arg 2 in %rsi */ - regs->tf_rcx = regs->tf_err; /* arg 4 in %rcx */ + regs->tf_rcx = regs->tf_addr; /* arg 4 in %rcx */ sf.sf_ahu.sf_handler = catcher; } PROC_UNLOCK(p); @@ -352,7 +352,7 @@ * one less debugger trap, so allowing it is fairly harmless. */ if (!EFL_SECURE(rflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { - printf("sigreturn: rflags = 0x%x\n", rflags); + printf("sigreturn: rflags = 0x%lx\n", rflags); return (EINVAL); } @@ -371,7 +371,7 @@ ret = set_fpcontext(td, &ucp->uc_mcontext); if (ret != 0) return (ret); - bcopy(&ucp->uc_mcontext.mc_r15, regs, sizeof(*regs)); + bcopy(&ucp->uc_mcontext.mc_rdi, regs, sizeof(*regs)); PROC_LOCK(p); #if defined(COMPAT_43) || defined(COMPAT_SUNOS) @@ -465,6 +465,12 @@ u_long ps_strings; { struct trapframe *regs = td->td_frame; + struct pcb *pcb = td->td_pcb; + + pcb->pcb_fsbase = 0; + pcb->pcb_gsbase = 0; + wrmsr(MSR_FSBASE, 0); + wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ bzero((char *)regs, sizeof(struct trapframe)); regs->tf_rip = entry; @@ -654,7 +660,7 @@ IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm), IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot), IDTVEC(page), IDTVEC(mchk), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), - IDTVEC(xmm), IDTVEC(int0x80_syscall), + IDTVEC(xmm), IDTVEC(dblfault), IDTVEC(int0x80_syscall), IDTVEC(fast_syscall), IDTVEC(fast_syscall32); void @@ -1182,9 +1188,9 @@ lgdt(&r_gdt); pc = &__pcpu; - wrmsr(MSR_FSBASE, (u_int64_t)pc); + wrmsr(MSR_FSBASE, 0); /* User value */ wrmsr(MSR_GSBASE, (u_int64_t)pc); - wrmsr(MSR_KGSBASE, (u_int64_t)pc); + wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ pcpu_init(pc, 0, sizeof(struct pcpu)); PCPU_SET(prvspace, pc); @@ -1204,28 +1210,28 @@ /* exceptions */ for (x = 0; x < NIDT; x++) - setidt(x, &IDTVEC(rsvd), SDT_SYSTGT, SEL_KPL, 0); - setidt(0, &IDTVEC(div), SDT_SYSTGT, SEL_KPL, 0); + setidt(x, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); + setidt(0, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); setidt(1, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); - setidt(2, &IDTVEC(nmi), SDT_SYSTGT, SEL_KPL, 0); + setidt(2, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0); setidt(3, &IDTVEC(bpt), SDT_SYSIGT, SEL_KPL, 0); - setidt(4, &IDTVEC(ofl), SDT_SYSTGT, SEL_KPL, 0); - setidt(5, &IDTVEC(bnd), SDT_SYSTGT, SEL_KPL, 0); - setidt(6, &IDTVEC(ill), SDT_SYSTGT, SEL_KPL, 0); - setidt(7, &IDTVEC(dna), SDT_SYSTGT, SEL_KPL, 0); - setidt(8, (inthand_t *)dblfault_handler, SDT_SYSIGT, SEL_KPL, 1); - setidt(9, &IDTVEC(fpusegm), SDT_SYSTGT, SEL_KPL, 0); - setidt(10, &IDTVEC(tss), SDT_SYSTGT, SEL_KPL, 0); - setidt(11, &IDTVEC(missing), SDT_SYSTGT, SEL_KPL, 0); - setidt(12, &IDTVEC(stk), SDT_SYSTGT, SEL_KPL, 0); - setidt(13, &IDTVEC(prot), SDT_SYSTGT, SEL_KPL, 0); + setidt(4, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); + setidt(5, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); + setidt(6, &IDTVEC(ill), SDT_SYSIGT, SEL_KPL, 0); + setidt(7, &IDTVEC(dna), SDT_SYSIGT, SEL_KPL, 0); + setidt(8, &IDTVEC(dblfault), SDT_SYSIGT, SEL_KPL, 1); + setidt(9, &IDTVEC(fpusegm), SDT_SYSIGT, SEL_KPL, 0); + setidt(10, &IDTVEC(tss), SDT_SYSIGT, SEL_KPL, 0); + setidt(11, &IDTVEC(missing), SDT_SYSIGT, SEL_KPL, 0); + setidt(12, &IDTVEC(stk), SDT_SYSIGT, SEL_KPL, 0); + setidt(13, &IDTVEC(prot), SDT_SYSIGT, SEL_KPL, 0); setidt(14, &IDTVEC(page), SDT_SYSIGT, SEL_KPL, 0); - setidt(15, &IDTVEC(rsvd), SDT_SYSTGT, SEL_KPL, 0); - setidt(16, &IDTVEC(fpu), SDT_SYSTGT, SEL_KPL, 0); - setidt(17, &IDTVEC(align), SDT_SYSTGT, SEL_KPL, 0); - setidt(18, &IDTVEC(mchk), SDT_SYSTGT, SEL_KPL, 0); - setidt(19, &IDTVEC(xmm), SDT_SYSTGT, SEL_KPL, 0); - setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSTGT, SEL_UPL, 0); + setidt(15, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); + setidt(16, &IDTVEC(fpu), SDT_SYSIGT, SEL_KPL, 0); + setidt(17, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0); + setidt(18, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0); + setidt(19, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0); + setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0); r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (long) idt; @@ -1251,8 +1257,6 @@ /* make an initial tss so cpu can get interrupt stack on syscall! */ common_tss.tss_rsp0 = thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb); - /* XXX we need to update tss_rsp0 in cpu_switch */ - /* XXX maybe not yet, everything is still running in supervisor mode */ /* doublefault stack space, runs on ist1 */ common_tss.tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)]; @@ -1698,63 +1702,4 @@ #endif /* DDB */ -void -bcopy(const void *src, void *dest, size_t len) -{ - const char *csrc; - char *cdest; - size_t i; - - csrc = (const char *)src; - cdest = (char *)dest; - if (src < dest) { - for (i = len - 1; i != (size_t)-1; i--) - cdest[i] = csrc[i]; - } else { - for (i = 0; i < len; i++) - cdest[i] = csrc[i]; - } -} - -void * -memcpy(void *dest, const void *src, size_t len) -{ - - bcopy(src, dest, len); - return dest; -} - -void -bzero(void *buf, size_t len) -{ - char *cbuf; - size_t i; - - cbuf = (char *)buf; - for (i = 0; i < len; i++) - cbuf[i] = 0; -} - -void -pagezero(void *buf) -{ - - bzero(buf, PAGE_SIZE); -} - -int -bcmp(const void *s1, const void *s2, size_t len) -{ - const char *cs1, *cs2; - int diff; - size_t i; - - cs1 = (const char *)s1; - cs2 = (const char *)s2; - for (i = 0; i < len; i++) { - diff = cs2[i] - cs1[i]; - if (diff) - return diff; - } - return 0; -} +MODULE_VERSION(acpi, 100); ==== //depot/projects/smpng/sys/amd64/amd64/nexus.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.50 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.51 2003/05/12 02:44:37 peter Exp $ */ /* @@ -323,9 +323,9 @@ return 0; if (type == SYS_RES_MEMORY) { - rman_set_bustag(rv, I386_BUS_SPACE_MEM); + rman_set_bustag(rv, AMD64_BUS_SPACE_MEM); } else if (type == SYS_RES_IOPORT) { - rman_set_bustag(rv, I386_BUS_SPACE_IO); + rman_set_bustag(rv, AMD64_BUS_SPACE_IO); rman_set_bushandle(rv, rv->r_start); } @@ -346,7 +346,7 @@ /* * If this is a memory resource, map it into the kernel. */ - if (rman_get_bustag(r) == I386_BUS_SPACE_MEM) { + if (rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) { caddr_t vaddr = 0; if (rman_get_end(r) < 1024 * 1024) { @@ -378,7 +378,7 @@ /* * If this is a memory resource, unmap it. */ - if ((rman_get_bustag(r) == I386_BUS_SPACE_MEM) && + if ((rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) && (rman_get_end(r) >= 1024 * 1024)) { u_int32_t psize; ==== //depot/projects/smpng/sys/amd64/amd64/pmap.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.406 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.407 2003/05/11 22:40:24 peter Exp $ */ /*- * Copyright (c) 2003 Networks Associates Technology, Inc. @@ -1797,8 +1797,8 @@ * Page Directory table entry not valid, we need a new PT page */ if (pte == NULL) { - panic("pmap_enter: invalid page directory pdir=%#jx, va=%#x\n", - (uintmax_t)pmap->pm_pdir[PTDPTDI], va); + panic("pmap_enter: invalid page directory pdir=%#lx, va=%#lx\n", + pmap->pm_pdir[PTDPTDI], va); } pa = VM_PAGE_TO_PHYS(m) & PG_FRAME; @@ -1869,7 +1869,7 @@ err = pmap_remove_pte(pmap, pte, va); vm_page_unlock_queues(); if (err) - panic("pmap_enter: pte vanished, va: 0x%x", va); + panic("pmap_enter: pte vanished, va: 0x%lx", va); } /* @@ -2563,7 +2563,7 @@ tpte = *pte; if (tpte == 0) { - printf("TPTE at %p IS ZERO @ VA %08x\n", + printf("TPTE at %p IS ZERO @ VA %08lx\n", pte, pv->pv_va); panic("bad pte"); } ==== //depot/projects/smpng/sys/amd64/amd64/support.S#2 (text+ko) ==== @@ -30,19 +30,157 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.97 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.99 2003/05/11 22:38:54 peter Exp $ */ #include -#include #include -#include #include "assym.s" .text +/* + * bcopy family >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue May 13 13:07:10 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4FE537B404; Tue, 13 May 2003 13:07:09 -0700 (PDT) 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 41FEB37B401; Tue, 13 May 2003 13:07:09 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9F5843F3F; Tue, 13 May 2003 13:07:08 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id BE6F42A7EA; Tue, 13 May 2003 13:07:08 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: John Baldwin In-Reply-To: Date: Tue, 13 May 2003 13:07:08 -0700 From: Peter Wemm Message-Id: <20030513200708.BE6F42A7EA@canning.wemm.org> cc: Perforce Change Reviews Subject: Re: PERFORCE change 31043 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 20:07:10 -0000 John Baldwin wrote: > > On 13-May-2003 Peter Wemm wrote: > > http://perforce.freebsd.org/chv.cgi?CH=31043 > > > > Change 31043 by peter@peter_hammer on 2003/05/12 19:08:19 > > > > And now for something completely different... i386 binary emulation! > > This was submitted by p4/i386 on the amd64 box itself! > > Can we possibly have a shared compat/ia32? syscalls.master should be > able to be shared for example. Yes. I think compat/freebsd32 (generic 32 bit on 64 bit platform) and compat/ia32 (x86 specifically) is the right breakup. And the truely MD parts go in $arch/compat/ia32. For example: ia64/ia32 has a custom mmap implementation for partial pages. This isn't needed on amd64, but I suppose it could be #ifdef'ed in the common area. ia64 has a very different ia32_setregs() for the exec interface while the amd64 version is very similar to the i386 version. This is highly MD. sendsig/sigreturn probably would have to be MD since they deal with the native kernel's trapframes. I can't think of anything specific for compat/ia32 at the moment, but perhaps the sysarch stuff to interface with the user_ldt stuff could go there. However, I'm not sure I want to go here yet. I only did this because it took about 30 minutes and I needed something to test the extra context switch code to deal with the segment registers and userland %fs/%gs. If I couldn't have stolen it directly from ia64 I wouldn't have done it yet and would probably have spent the 30 minutes trying to figure out how to switch a userland binary into 32 bit mode while in userland and not bothered with the syscalls etc. Anyway, it was a useful validation of the context switch stuff. pmap is more urgent. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-p4-projects@FreeBSD.ORG Tue May 13 13:37:52 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1914B37B404; Tue, 13 May 2003 13:37:52 -0700 (PDT) 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 A5BE337B401 for ; Tue, 13 May 2003 13:37:51 -0700 (PDT) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12B2643F85 for ; Tue, 13 May 2003 13:37:51 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 10171 invoked from network); 13 May 2003 20:37:50 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 13 May 2003 20:37:50 -0000 Received: from laptop.baldwin.cx ([216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h4DKbmp0028584; Tue, 13 May 2003 16:37:48 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030513200708.BE6F42A7EA@canning.wemm.org> Date: Tue, 13 May 2003 16:37:56 -0400 (EDT) From: John Baldwin To: Peter Wemm cc: Perforce Change Reviews Subject: Re: PERFORCE change 31043 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 20:37:52 -0000 On 13-May-2003 Peter Wemm wrote: > John Baldwin wrote: >> >> On 13-May-2003 Peter Wemm wrote: >> > http://perforce.freebsd.org/chv.cgi?CH=31043 >> > >> > Change 31043 by peter@peter_hammer on 2003/05/12 19:08:19 >> > >> > And now for something completely different... i386 binary emulation! >> > This was submitted by p4/i386 on the amd64 box itself! >> >> Can we possibly have a shared compat/ia32? syscalls.master should be >> able to be shared for example. > > Yes. I think compat/freebsd32 (generic 32 bit on 64 bit platform) and > compat/ia32 (x86 specifically) is the right breakup. And the truely MD > parts go in $arch/compat/ia32. *nod* > the syscalls etc. Anyway, it was a useful validation of the context switch > stuff. pmap is more urgent. Yes, pmap is indeed much more urgent. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ From owner-p4-projects@FreeBSD.ORG Tue May 13 13:49:32 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1FC5037B404; Tue, 13 May 2003 13:49:31 -0700 (PDT) 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 A80CD37B401 for ; Tue, 13 May 2003 13:49:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9931343FB1 for ; Tue, 13 May 2003 13:49:29 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DKnT0U045632 for ; Tue, 13 May 2003 13:49:29 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DKnS2T045629 for perforce@freebsd.org; Tue, 13 May 2003 13:49:28 -0700 (PDT) Date: Tue, 13 May 2003 13:49:28 -0700 (PDT) Message-Id: <200305132049.h4DKnS2T045629@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 31093 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 20:49:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=31093 Change 31093 by jhb@jhb_laptop on 2003/05/13 13:49:26 IFC @31091 (loop back sigacts locking). Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/machdep.c#56 integrate .. //depot/projects/smpng/sys/alpha/osf1/osf1_signal.c#20 integrate .. //depot/projects/smpng/sys/amd64/amd64/machdep.c#4 integrate .. //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#27 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_filio.c#11 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#24 integrate .. //depot/projects/smpng/sys/dev/acpica/Osd/OsdHardware.c#8 integrate .. //depot/projects/smpng/sys/dev/acpica/acpivar.h#25 integrate .. //depot/projects/smpng/sys/i386/acpica/acpi_machdep.c#8 integrate .. //depot/projects/smpng/sys/i386/acpica/acpi_wakeup.c#15 integrate .. //depot/projects/smpng/sys/i386/i386/machdep.c#59 integrate .. //depot/projects/smpng/sys/i386/linux/linux_sysvec.c#32 integrate .. //depot/projects/smpng/sys/i386/svr4/svr4_machdep.c#12 integrate .. //depot/projects/smpng/sys/ia64/ia64/machdep.c#54 integrate .. //depot/projects/smpng/sys/kern/init_main.c#34 integrate .. //depot/projects/smpng/sys/kern/kern_condvar.c#28 integrate .. //depot/projects/smpng/sys/kern/kern_exec.c#57 integrate .. //depot/projects/smpng/sys/kern/kern_exit.c#65 integrate .. //depot/projects/smpng/sys/kern/kern_fork.c#60 integrate .. //depot/projects/smpng/sys/kern/kern_kthread.c#12 integrate .. //depot/projects/smpng/sys/kern/kern_proc.c#52 integrate .. //depot/projects/smpng/sys/kern/kern_sig.c#67 integrate .. //depot/projects/smpng/sys/kern/kern_synch.c#49 integrate .. //depot/projects/smpng/sys/kern/kern_time.c#23 integrate .. //depot/projects/smpng/sys/kern/subr_trap.c#53 integrate .. //depot/projects/smpng/sys/kern/tty.c#34 integrate .. //depot/projects/smpng/sys/kern/tty_pty.c#22 integrate .. //depot/projects/smpng/sys/netncp/ncp_ncp.c#8 integrate .. //depot/projects/smpng/sys/netsmb/smb_subr.c#12 integrate .. //depot/projects/smpng/sys/nfsclient/nfs_socket.c#18 integrate .. //depot/projects/smpng/sys/pc98/i386/machdep.c#53 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/machdep.c#38 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/machdep.c#50 integrate .. //depot/projects/smpng/sys/sys/proc.h#86 integrate .. //depot/projects/smpng/sys/sys/signalvar.h#16 integrate .. //depot/projects/smpng/sys/sys/user.h#15 integrate .. //depot/projects/smpng/sys/vm/vm_glue.c#27 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/machdep.c#56 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.201 2003/04/25 01:50:28 deischen Exp $ + * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.202 2003/05/13 20:35:56 jhb Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1133,11 +1133,13 @@ td = curthread; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); + psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); + frame = td->td_frame; - oonstack = sigonstack(alpha_pal_rdusp()); fsize = sizeof ksi; rndfsize = ((fsize + 15) / 16) * 16; - psp = p->p_sigacts; + oonstack = sigonstack(alpha_pal_rdusp()); /* * Allocate and validate space for the signal handler @@ -1155,6 +1157,7 @@ #endif } else sip = (osiginfo_t *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -1210,7 +1213,8 @@ frame->tf_regs[FRAME_A0] = sig; frame->tf_regs[FRAME_FLAGS] = 0; /* full restore */ PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) frame->tf_regs[FRAME_A1] = (u_int64_t)sip; else frame->tf_regs[FRAME_A1] = code; @@ -1235,6 +1239,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(alpha_pal_rdusp()); @@ -1276,6 +1281,7 @@ #endif } else sfp = (struct sigframe4 *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* save the floating-point state, if necessary, then copy it. */ @@ -1311,7 +1317,8 @@ frame->tf_regs[FRAME_PC] = PS_STRINGS - szfreebsd4_sigcode; frame->tf_regs[FRAME_A0] = sig; PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { frame->tf_regs[FRAME_A1] = (u_int64_t)&(sfp->sf_si); /* Fill in POSIX parts */ @@ -1343,6 +1350,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); #ifdef COMPAT_FREEBSD4 if (SIGISMEMBER(psp->ps_freebsd4, sig)) { freebsd4_sendsig(catcher, sig, mask, code); @@ -1397,6 +1405,7 @@ #endif } else sfp = (struct sigframe *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* save the floating-point state, if necessary, then copy it. */ @@ -1432,7 +1441,8 @@ frame->tf_regs[FRAME_PC] = PS_STRINGS - szsigcode; frame->tf_regs[FRAME_A0] = sig; PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { frame->tf_regs[FRAME_A1] = (u_int64_t)&(sfp->sf_si); /* Fill in POSIX parts */ ==== //depot/projects/smpng/sys/alpha/osf1/osf1_signal.c#20 (text+ko) ==== @@ -30,7 +30,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.32 2003/04/29 06:33:03 alc Exp $ + * $FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.33 2003/05/13 20:35:56 jhb Exp $ */ #include "opt_compat.h" @@ -471,6 +471,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(alpha_pal_rdusp()); @@ -490,6 +491,7 @@ p->p_sigstk.ss_flags |= SS_ONSTACK; } else sip = (osiginfo_t *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -551,6 +553,7 @@ frame->tf_regs[FRAME_FLAGS] = 0; /* full restore */ alpha_pal_wrusp((unsigned long)sip); PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } ==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.575 2003/05/12 18:37:56 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.576 2003/05/13 20:35:57 jhb Exp $ */ #include "opt_atalk.h" @@ -235,6 +235,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); regs = td->td_frame; oonstack = sigonstack(regs->tf_rsp); @@ -262,7 +263,6 @@ sp = (char *)regs->tf_rsp - sizeof(struct sigframe) - 128; /* Align to 16 bytes. */ sfp = (struct sigframe *)((unsigned long)sp & ~0xF); - PROC_UNLOCK(p); /* Translate the signal if appropriate. */ if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) @@ -271,8 +271,7 @@ /* Build the argument list for the signal handler. */ regs->tf_rdi = sig; /* arg 1 in %rdi */ regs->tf_rdx = (register_t)&sfp->sf_uc; /* arg 3 in %rdx */ - PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ regs->tf_rsi = (register_t)&sfp->sf_si; /* arg 2 in %rsi */ sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; @@ -287,6 +286,7 @@ regs->tf_rcx = regs->tf_addr; /* arg 4 in %rcx */ sf.sf_ahu.sf_handler = catcher; } + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -305,6 +305,7 @@ regs->tf_rflags &= ~PSL_T; regs->tf_cs = _ucodesel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } /* ==== //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#27 (text+ko) ==== @@ -38,7 +38,7 @@ * * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94 * - * $FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.64 2003/04/17 21:58:45 jhb Exp $ + * $FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.65 2003/05/13 20:35:57 jhb Exp $ */ #include @@ -547,6 +547,7 @@ char *state; segsz_t lsize; struct thread *td2; + struct sigacts *ps; int i; PROC_LOCK(p); @@ -653,8 +654,11 @@ * relation to struct proc, so SigBlk is left unimplemented. */ sbuf_printf(sb, "SigBlk:\t%08x\n", 0); /* XXX */ - sbuf_printf(sb, "SigIgn:\t%08x\n", p->p_sigignore.__bits[0]); - sbuf_printf(sb, "SigCgt:\t%08x\n", p->p_sigcatch.__bits[0]); + ps = p->p_sigacts; + mtx_lock(&ps->ps_mtx); + sbuf_printf(sb, "SigIgn:\t%08x\n", ps->ps_sigignore.__bits[0]); + sbuf_printf(sb, "SigCgt:\t%08x\n", ps->ps_sigcatch.__bits[0]); + mtx_unlock(&ps->ps_mtx); PROC_UNLOCK(p); /* ==== //depot/projects/smpng/sys/compat/svr4/svr4_filio.c#11 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/svr4/svr4_filio.c,v 1.27 2003/03/31 22:49:14 jeff Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_filio.c,v 1.28 2003/05/13 20:35:57 jhb Exp $ */ #include @@ -132,10 +132,21 @@ DPRINTF(("svr4_read(%d, 0x%0x, %d) = %d\n", uap->fd, uap->buf, uap->nbyte, rv)); if (rv == EAGAIN) { +#ifdef DEBUG_SVR4 + struct sigacts *ps; + + PROC_LOCK(td->td_proc); + ps = td->td_proc->p_sigacts; + mtx_lock(&ps->ps_mtx); +#endif DPRINTF(("sigmask = 0x%x\n", td->td_sigmask)); - DPRINTF(("sigignore = 0x%x\n", td->td_proc->p_sigignore)); - DPRINTF(("sigcaught = 0x%x\n", td->td_proc->p_sigcatch)); + DPRINTF(("sigignore = 0x%x\n", ps->ps_sigignore)); + DPRINTF(("sigcaught = 0x%x\n", ps->ps_sigcatch)); DPRINTF(("siglist = 0x%x\n", td->td_siglist)); +#ifdef DEBUG_SVR4 + mtx_unlock(&ps->ps_mtx); + PROC_UNLOCK(td->td_proc); +#endif } #if defined(GROTTY_READ_HACK) ==== //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#24 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.62 2003/04/17 22:09:08 jhb Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.63 2003/05/13 20:35:57 jhb Exp $ */ /* @@ -1363,12 +1363,8 @@ sx_xunlock(&proctree_lock); PROC_LOCK(q); - if (--q->p_procsig->ps_refcnt == 0) { - if (q->p_sigacts != &q->p_uarea->u_sigacts) - FREE(q->p_sigacts, M_SUBPROC); - FREE(q->p_procsig, M_SUBPROC); - q->p_procsig = NULL; - } + sigacts_free(q->p_sigacts); + q->p_sigacts = NULL; PROC_UNLOCK(q); /* ==== //depot/projects/smpng/sys/dev/acpica/Osd/OsdHardware.c#8 (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/acpica/Osd/OsdHardware.c,v 1.7 2003/05/12 16:54:55 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.8 2003/05/13 16:59:46 jhb Exp $ */ /* @@ -36,7 +36,11 @@ #include #include #include +#if __FreeBSD_version >= 500000 #include +#else +#include +#endif /* * ACPICA's rather gung-ho approach to hardware resource ownership is a little ==== //depot/projects/smpng/sys/dev/acpica/acpivar.h#25 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.40 2003/04/29 18:50:33 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.41 2003/05/13 16:59:46 jhb Exp $ */ #include "bus_if.h" @@ -39,6 +39,10 @@ #include #include +#if __FreeBSD_version < 500000 +typedef vm_offset_t vm_paddr_t; +#endif + struct acpi_softc { device_t acpi_dev; dev_t acpi_dev_t; @@ -389,12 +393,14 @@ extern int acpi_acad_get_acline(int *); +#if __FreeBSD_version >= 500000 #ifndef ACPI_MAX_THREADS #define ACPI_MAX_THREADS 3 #endif #if ACPI_MAX_THREADS > 0 #define ACPI_USE_THREADS #endif +#endif #ifdef ACPI_USE_THREADS /* ==== //depot/projects/smpng/sys/i386/acpica/acpi_machdep.c#8 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.8 2003/03/24 19:14:45 mdodd Exp $ + * $FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.9 2003/05/13 16:59:46 jhb Exp $ */ #include @@ -52,7 +52,11 @@ #include #include +#if __FreeBSD_version < 500000 +#include +#else #include +#endif static struct apm_softc apm_softc; ==== //depot/projects/smpng/sys/i386/acpica/acpi_wakeup.c#15 (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/i386/acpica/acpi_wakeup.c,v 1.18 2003/03/25 00:07:01 jake Exp $ + * $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.19 2003/05/13 16:59:46 jhb Exp $ */ #include @@ -58,6 +58,11 @@ #include "acpi_wakecode.h" +#if __FreeBSD_version < 500000 +#define vm_page_lock_queues() +#define vm_page_unlock_queues() +#endif + extern void initializecpu(void); static struct region_descriptor r_idt, r_gdt, *p_gdt; ==== //depot/projects/smpng/sys/i386/i386/machdep.c#59 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.563 2003/04/25 01:50:28 deischen Exp $ + * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.564 2003/05/13 20:35:58 jhb Exp $ */ #include "opt_atalk.h" @@ -295,6 +295,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); regs = td->td_frame; oonstack = sigonstack(regs->tf_esp); @@ -308,7 +309,6 @@ #endif } else fp = (struct osigframe *)regs->tf_esp - 1; - PROC_UNLOCK(p); /* Translate the signal if appropriate. */ if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) @@ -317,8 +317,7 @@ /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc; - PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_arg2 = (register_t)&fp->sf_siginfo; sf.sf_siginfo.si_signo = sig; @@ -330,6 +329,7 @@ sf.sf_addr = regs->tf_err; sf.sf_ahu.sf_handler = catcher; } + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* Save most if not all of trap frame. */ @@ -402,6 +402,7 @@ load_gs(_udatasel); regs->tf_ss = _udatasel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } #endif /* COMPAT_43 */ @@ -424,6 +425,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); regs = td->td_frame; oonstack = sigonstack(regs->tf_esp); @@ -447,7 +449,6 @@ #endif } else sfp = (struct sigframe4 *)regs->tf_esp - 1; - PROC_UNLOCK(p); /* Translate the signal if appropriate. */ if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) @@ -456,8 +457,7 @@ /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; - PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; @@ -472,6 +472,7 @@ sf.sf_addr = regs->tf_err; sf.sf_ahu.sf_handler = catcher; } + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -523,6 +524,7 @@ regs->tf_fs = _udatasel; regs->tf_ss = _udatasel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } #endif /* COMPAT_FREEBSD4 */ @@ -545,6 +547,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); #ifdef COMPAT_FREEBSD4 if (SIGISMEMBER(psp->ps_freebsd4, sig)) { freebsd4_sendsig(catcher, sig, mask, code); @@ -585,7 +588,6 @@ sp = (char *)regs->tf_esp - sizeof(struct sigframe); /* Align to 16 bytes. */ sfp = (struct sigframe *)((unsigned int)sp & ~0xF); - PROC_UNLOCK(p); /* Translate the signal if appropriate. */ if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) @@ -594,8 +596,7 @@ /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; - PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; @@ -610,6 +611,7 @@ sf.sf_addr = regs->tf_err; sf.sf_ahu.sf_handler = catcher; } + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -661,6 +663,7 @@ regs->tf_fs = _udatasel; regs->tf_ss = _udatasel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } /* ==== //depot/projects/smpng/sys/i386/linux/linux_sysvec.c#32 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.122 2003/05/11 21:51:11 mdodd Exp $ + * $FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.123 2003/05/13 20:35:58 jhb Exp $ */ /* XXX we use functions that might not exist. */ @@ -268,11 +268,14 @@ { struct thread *td = curthread; struct proc *p = td->td_proc; + struct sigacts *psp; struct trapframe *regs; struct l_rt_sigframe *fp, frame; int oonstack; PROC_LOCK_ASSERT(p, MA_OWNED); + psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); regs = td->td_frame; oonstack = sigonstack(regs->tf_esp); @@ -285,11 +288,12 @@ * Allocate space for the signal handler context. */ if ((p->p_flag & P_ALTSTACK) && !oonstack && - SIGISMEMBER(p->p_sigacts->ps_sigonstack, sig)) { + SIGISMEMBER(psp->ps_sigonstack, sig)) { fp = (struct l_rt_sigframe *)(p->p_sigstk.ss_sp + p->p_sigstk.ss_size - sizeof(struct l_rt_sigframe)); } else fp = (struct l_rt_sigframe *)regs->tf_esp - 1; + mtx_unlock(&psp->ps_mtx); /* * Build the argument list for the signal handler. @@ -378,6 +382,7 @@ regs->tf_fs = _udatasel; regs->tf_ss = _udatasel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } @@ -396,13 +401,16 @@ { struct thread *td = curthread; struct proc *p = td->td_proc; + struct sigacts *psp; struct trapframe *regs; struct l_sigframe *fp, frame; l_sigset_t lmask; int oonstack, i; PROC_LOCK_ASSERT(p, MA_OWNED); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ linux_rt_sendsig(catcher, sig, mask, code); return; @@ -421,11 +429,12 @@ * Allocate space for the signal handler context. */ if ((p->p_flag & P_ALTSTACK) && !oonstack && - SIGISMEMBER(p->p_sigacts->ps_sigonstack, sig)) { + SIGISMEMBER(psp->ps_sigonstack, sig)) { fp = (struct l_sigframe *)(p->p_sigstk.ss_sp + p->p_sigstk.ss_size - sizeof(struct l_sigframe)); } else fp = (struct l_sigframe *)regs->tf_esp - 1; + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -489,6 +498,7 @@ regs->tf_fs = _udatasel; regs->tf_ss = _udatasel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } /* ==== //depot/projects/smpng/sys/i386/svr4/svr4_machdep.c#12 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/svr4/svr4_machdep.c,v 1.31 2003/04/17 22:19:47 jhb Exp $ + * $FreeBSD: src/sys/i386/svr4/svr4_machdep.c,v 1.32 2003/05/13 20:35:58 jhb Exp $ */ #include @@ -428,6 +428,7 @@ #endif PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); tf = td->td_frame; oonstack = sigonstack(tf->tf_esp); @@ -443,6 +444,7 @@ } else { fp = (struct svr4_sigframe *)tf->tf_esp - 1; } + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -505,6 +507,7 @@ load_gs(_udatasel); tf->tf_ss = _udatasel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); #endif } ==== //depot/projects/smpng/sys/ia64/ia64/machdep.c#54 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.130 2003/05/02 20:34:15 marcel Exp $ + * $FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.131 2003/05/13 20:35:58 jhb Exp $ */ #include "opt_compat.h" @@ -756,6 +756,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(frame->tf_r[FRAME_SP]); rndfsize = ((sizeof(sf) + 15) / 16) * 16; @@ -822,6 +823,7 @@ #endif } else sfp = (struct sigframe *)(frame->tf_r[FRAME_SP] - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); #ifdef DEBUG @@ -870,7 +872,8 @@ frame->tf_cr_iip = PS_STRINGS - (esigcode - sigcode); frame->tf_r[FRAME_R1] = sig; PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { frame->tf_r[FRAME_R15] = (u_int64_t)&(sfp->sf_si); /* Fill in POSIX parts */ ==== //depot/projects/smpng/sys/kern/init_main.c#34 (text+ko) ==== @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)init_main.c 8.9 (Berkeley) 1/21/94 - * $FreeBSD: src/sys/kern/init_main.c,v 1.230 2003/05/01 16:59:22 des Exp $ + * $FreeBSD: src/sys/kern/init_main.c,v 1.231 2003/05/13 20:35:59 jhb Exp $ */ #include "opt_init_path.h" @@ -90,7 +90,6 @@ struct thread thread0; struct kse kse0; struct ksegrp ksegrp0; -static struct procsig procsig0; static struct filedesc0 filedesc0; static struct plimit limit0; struct vmspace vmspace0; @@ -399,9 +398,8 @@ #endif td->td_ucred = crhold(p->p_ucred); - /* Create procsig. */ - p->p_procsig = &procsig0; - p->p_procsig->ps_refcnt = 1; + /* Create sigacts. */ + p->p_sigacts = sigacts_alloc(); /* Initialize signal state for process 0. */ siginit(&proc0); @@ -441,11 +439,10 @@ vmspace0.vm_map.pmap = vmspace_pmap(&vmspace0); /* - * We continue to place resource usage info and signal - * actions in the user struct so they're pageable. + * We continue to place resource usage info + * in the user struct so that it's pageable. */ p->p_stats = &p->p_uarea->u_stats; - p->p_sigacts = &p->p_uarea->u_sigacts; /* * Charge root for one process. ==== //depot/projects/smpng/sys/kern/kern_condvar.c#28 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/kern_condvar.c,v 1.40 2003/04/17 22:21:05 jhb Exp $ + * $FreeBSD: src/sys/kern/kern_condvar.c,v 1.41 2003/05/13 20:35:59 jhb Exp $ */ #include "opt_ktrace.h" @@ -146,7 +146,9 @@ mtx_unlock_spin(&sched_lock); p = td->td_proc; PROC_LOCK(p); + mtx_lock(&p->p_sigacts->ps_mtx); sig = cursig(td); + mtx_unlock(&p->p_sigacts->ps_mtx); if (thread_suspend_check(1)) sig = SIGSTOP; mtx_lock_spin(&sched_lock); @@ -283,6 +285,7 @@ mtx_unlock_spin(&sched_lock); PROC_LOCK(p); + mtx_lock(&p->p_sigacts->ps_mtx); if (sig == 0) sig = cursig(td); /* XXXKSE */ if (sig != 0) { @@ -291,6 +294,7 @@ else rval = ERESTART; } + mtx_unlock(&p->p_sigacts->ps_mtx); if (p->p_flag & P_WEXIT) rval = EINTR; PROC_UNLOCK(p); @@ -446,6 +450,7 @@ mtx_unlock_spin(&sched_lock); PROC_LOCK(p); + mtx_lock(&p->p_sigacts->ps_mtx); if (sig == 0) sig = cursig(td); if (sig != 0) { @@ -454,6 +459,7 @@ else rval = ERESTART; } + mtx_unlock(&p->p_sigacts->ps_mtx); if (p->p_flag & P_WEXIT) rval = EINTR; PROC_UNLOCK(p); ==== //depot/projects/smpng/sys/kern/kern_exec.c#57 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/kern_exec.c,v 1.218 2003/04/01 01:26:20 jeff Exp $ + * $FreeBSD: src/sys/kern/kern_exec.c,v 1.219 2003/05/13 20:35:59 jhb Exp $ */ #include "opt_ktrace.h" @@ -163,7 +163,7 @@ struct vattr attr; int (*img_first)(struct image_params *); struct pargs *oldargs = NULL, *newargs = NULL; - struct procsig *oldprocsig, *newprocsig; + struct sigacts *oldsigacts, *newsigacts; #ifdef KTRACE struct vnode *tracevp = NULL; struct ucred *tracecred = NULL; @@ -413,23 +413,16 @@ * reset. */ PROC_LOCK(p); - mp_fixme("procsig needs a lock"); - if (p->p_procsig->ps_refcnt > 1) { - oldprocsig = p->p_procsig; + if (sigacts_shared(p->p_sigacts)) { + oldsigacts = p->p_sigacts; PROC_UNLOCK(p); - MALLOC(newprocsig, struct procsig *, sizeof(struct procsig), - M_SUBPROC, M_WAITOK); - bcopy(oldprocsig, newprocsig, sizeof(*newprocsig)); - newprocsig->ps_refcnt = 1; - oldprocsig->ps_refcnt--; + newsigacts = sigacts_alloc(); + sigacts_copy(newsigacts, oldsigacts); PROC_LOCK(p); - p->p_procsig = newprocsig; - if (p->p_sigacts == &p->p_uarea->u_sigacts) - panic("shared procsig but private sigacts?"); + p->p_sigacts = newsigacts; + } else + oldsigacts = NULL; - p->p_uarea->u_sigacts = *p->p_sigacts; - p->p_sigacts = &p->p_uarea->u_sigacts; - } /* Stop profiling */ stopprofclock(p); @@ -628,6 +621,8 @@ pargs_drop(oldargs); if (newargs != NULL) pargs_drop(newargs); + if (oldsigacts != NULL) + sigacts_free(oldsigacts); exec_fail_dealloc: ==== //depot/projects/smpng/sys/kern/kern_exit.c#65 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 - * $FreeBSD: src/sys/kern/kern_exit.c,v 1.213 2003/05/01 21:16:38 jhb Exp $ + * $FreeBSD: src/sys/kern/kern_exit.c,v 1.214 2003/05/13 20:35:59 jhb Exp $ */ #include "opt_compat.h" @@ -431,9 +431,11 @@ * 1 instead (and hope it will handle this situation). */ PROC_LOCK(p->p_pptr); - if (p->p_pptr->p_procsig->ps_flag & (PS_NOCLDWAIT | PS_CLDSIGIGN)) { + mtx_lock(&p->p_pptr->p_sigacts->ps_mtx); + if (p->p_pptr->p_sigacts->ps_flag & (PS_NOCLDWAIT | PS_CLDSIGIGN)) { struct proc *pp; + mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx); pp = p->p_pptr; PROC_UNLOCK(pp); proc_reparent(p, initproc); @@ -445,7 +447,8 @@ */ if (LIST_EMPTY(&pp->p_children)) wakeup(pp); - } + } else + mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx); if (p->p_sigparent && p->p_pptr != initproc) psignal(p->p_pptr, p->p_sigparent); @@ -656,23 +659,14 @@ (void)chgproccnt(p->p_ucred->cr_ruidinfo, -1, 0); /* - * Free up credentials. + * Free credentials, arguments, and sigacts */ crfree(p->p_ucred); - p->p_ucred = NULL; /* XXX: why? */ - - /* - * Remove unused arguments - */ + p->p_ucred = NULL; pargs_drop(p->p_args); p->p_args = NULL; - - if (--p->p_procsig->ps_refcnt == 0) { - if (p->p_sigacts != &p->p_uarea->u_sigacts) - FREE(p->p_sigacts, M_SUBPROC); - FREE(p->p_procsig, M_SUBPROC); - p->p_procsig = NULL; - } + sigacts_free(p->p_sigacts); + p->p_sigacts = NULL; /* * do any thread-system specific cleanups ==== //depot/projects/smpng/sys/kern/kern_fork.c#60 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 - * $FreeBSD: src/sys/kern/kern_fork.c,v 1.197 2003/05/01 21:16:38 jhb Exp $ + * $FreeBSD: src/sys/kern/kern_fork.c,v 1.198 2003/05/13 20:35:59 jhb Exp $ */ #include "opt_ktrace.h" @@ -214,7 +214,6 @@ struct kse *ke2; struct ksegrp *kg2; struct sigacts *newsigacts; - struct procsig *newprocsig; int error; /* Can't copy and clear */ @@ -412,15 +411,10 @@ /* * Malloc things while we don't hold any locks. */ - if (flags & RFSIGSHARE) { - MALLOC(newsigacts, struct sigacts *, - sizeof(struct sigacts), M_SUBPROC, M_WAITOK); - newprocsig = NULL; - } else { + if (flags & RFSIGSHARE) newsigacts = NULL; - MALLOC(newprocsig, struct procsig *, sizeof(struct procsig), - M_SUBPROC, M_WAITOK); - } + else >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue May 13 15:01:38 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7EB3837B404; Tue, 13 May 2003 15:01:37 -0700 (PDT) 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 07B0F37B401; Tue, 13 May 2003 15:01:37 -0700 (PDT) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30B7A43F75; Tue, 13 May 2003 15:01:36 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.9/8.12.9) with ESMTP id h4DM1Vm2075768; Tue, 13 May 2003 15:01:35 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.9/8.12.9/Submit) id h4DM1UkZ075767; Tue, 13 May 2003 15:01:30 -0700 (PDT) Date: Tue, 13 May 2003 15:01:29 -0700 From: "David O'Brien" To: John Baldwin Message-ID: <20030513220129.GA75616@dragon.nuxi.com> References: <200305130209.h4D294xs053232@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: Perforce Change Reviews cc: Peter Wemm Subject: Re: PERFORCE change 31043 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 22:01:38 -0000 On Tue, May 13, 2003 at 12:35:50PM -0400, John Baldwin wrote: > > On 13-May-2003 Peter Wemm wrote: > > http://perforce.freebsd.org/chv.cgi?CH=31043 > > > > Change 31043 by peter@peter_hammer on 2003/05/12 19:08:19 > > > > And now for something completely different... i386 binary emulation! > > This was submitted by p4/i386 on the amd64 box itself! > > Can we possibly have a shared compat/ia32? Not by that name. > syscalls.master should be able to be shared for example. I certainly hope so -- we must make sure these stay in sync. -- David P.S. Peter is lucky he isn't answering his cell phone -- he'd just have gotten a "Yipie!!!" scream in his ear. From owner-p4-projects@FreeBSD.ORG Tue May 13 16:17:35 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0CCBD37B404; Tue, 13 May 2003 16:17:35 -0700 (PDT) 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 9A4D637B401 for ; Tue, 13 May 2003 16:17:34 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2403943F75 for ; Tue, 13 May 2003 16:17:34 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4DNHX0U054845 for ; Tue, 13 May 2003 16:17:33 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4DNHX4A054842 for perforce@freebsd.org; Tue, 13 May 2003 16:17:33 -0700 (PDT) Date: Tue, 13 May 2003 16:17:33 -0700 (PDT) Message-Id: <200305132317.h4DNHX4A054842@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31101 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 23:17:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=31101 Change 31101 by marcel@marcel_nfs on 2003/05/13 16:17:14 Don't create a RID map that covers the full range imposed by the number of bits implemented by the processor for the region ID. We only need 19 bits to cover 5 regions per process (5*PID_MAX=0x7a11b). Since the minimum number of bits guaranteed to be implemented is 18, we either need a 32KB map (16-bit RID) or otherwise a 64KB map (all other cases). Don't create a 2MB map simply because the processor has 24-bits in the region ID... Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#14 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#14 (text+ko) ==== @@ -329,6 +329,24 @@ /* * Setup RIDs. RIDs 0..7 are reserved for the kernel. + * + * We currently need at least 19 bits in the RID because PID_MAX + * can only be encoded in 17 bits and we need RIDs for 5 regions + * per process. With PID_MAX equalling 99999 this means that we + * need to be able to encode 499995 (=5*PID_MAX). + * The Itanium processor only has 18 bits and the architected + * minimum is exactly that. So, we cannot use a PID based scheme + * in those cases. Enter pmap_ridmap... + * We should avoid the map when running on a processor that has + * implemented enough bits. This means that we should pass the + * process/thread ID to pmap. This we currently don't do, so we + * use the map anyway. However, we don't want to allocate a map + * that is large enough to cover the range dictated by the number + * of bits in the RID, because that may result in a RID map of + * 2MB in size for a 24-bit RID. A 64KB map is enough. + * The bottomline: we create a 32KB map when the processor only + * implements 18 bits (or when we can't figure it out). Otherwise + * we create a 64KB map. */ res = ia64_call_pal_static(PAL_VM_SUMMARY, 0, 0, 0); if (res.pal_status != 0) { @@ -339,14 +357,11 @@ ridbits = (res.pal_result[1] >> 8) & 0xff; if (bootverbose) printf("Processor supports %d Region ID bits\n", - ridbits); + ridbits); } + if (ridbits > 19) + ridbits = 19; - /* - * XXX: If we have enough bits in the RID to use the thread ID then - * we should avoid the overhead of the map and create unique RIDs - * based on the thread ID. - */ pmap_ridmax = (1 << ridbits); pmap_ridmapsz = pmap_ridmax / 64; pmap_ridmap = (u_int64_t *)pmap_steal_memory(pmap_ridmax / 8); From owner-p4-projects@FreeBSD.ORG Tue May 13 18:24:14 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 63BC937B404; Tue, 13 May 2003 18:24:13 -0700 (PDT) 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 F141A37B401 for ; Tue, 13 May 2003 18:24:12 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECC1143F75 for ; Tue, 13 May 2003 18:24:11 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E1OB0U066469 for ; Tue, 13 May 2003 18:24:11 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E1OBri066466 for perforce@freebsd.org; Tue, 13 May 2003 18:24:11 -0700 (PDT) Date: Tue, 13 May 2003 18:24:11 -0700 (PDT) Message-Id: <200305140124.h4E1OBri066466@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31109 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 01:24:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=31109 Change 31109 by peter@peter_hammer on 2003/05/13 18:23:33 Implement i386 signals properly. This works for both the 4.x and 5.x signal interfaces. I have not done the 3.x syscall interface. We can't run a.out binaries anyway because the lcall syscall method isn't implemented, so this isn't much of a loss. The 3.x sigaction/sigreturn (for elf binaries) could be done with a bit more cut/paste though. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#31 edit .. //depot/projects/hammer/sys/amd64/conf/GENERIC#9 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_genassym.c#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#2 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#2 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_signal.h#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_sigtramp.S#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#2 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#2 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#2 edit .. //depot/projects/hammer/sys/amd64/ia32/syscalls.master#2 edit .. //depot/projects/hammer/sys/amd64/include/md_var.h#10 edit .. //depot/projects/hammer/sys/conf/files.amd64#10 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#31 (text+ko) ==== @@ -124,7 +124,6 @@ #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) static void cpu_startup(void *); -static void fpstate_drop(struct thread *td); static void get_fpcontext(struct thread *td, mcontext_t *mcp); static int set_fpcontext(struct thread *td, const mcontext_t *mcp); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) @@ -389,6 +388,16 @@ return (EJUSTRETURN); } +#ifdef COMPAT_FREEBSD4 +int +freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) +{ + + return sigreturn(td, (struct sigreturn_args *)uap); +} +#endif + + /* * Machine dependent boot() routine * @@ -1628,7 +1637,7 @@ return (0); } -static void +void fpstate_drop(struct thread *td) { register_t s; ==== //depot/projects/hammer/sys/amd64/conf/GENERIC#9 (text+ko) ==== @@ -24,6 +24,7 @@ maxusers 0 options NDA #Avoid accidental cut/paste of NDA'ed stuff options IA32 +options COMPAT_FREEBSD4 makeoptions NO_MODULES=not_yet ==== //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#2 (text+ko) ==== @@ -1170,40 +1170,31 @@ return (error); } -#if 0 - +#ifdef COMPAT_FREEBSD4 int -ia32_xxx(struct thread *td, struct ia32_xxx_args *uap) +freebsd4_ia32_sigaction(struct thread *td, struct freebsd4_ia32_sigaction_args *uap) { + struct sigaction32 s32; + struct sigaction sa, osa, *sap; int error; - caddr_t sg; - struct yyy32 *p32, s32; - struct yyy *p = NULL, s; - p32 = uap->zzz; - if (p32) { - sg = stackgap_init(); - p = stackgap_alloc(&sg, sizeof(struct yyy)); - uap->zzz = (struct yyy32 *)p; - error = copyin(p32, &s32, sizeof(s32)); + if (uap->act) { + error = copyin(uap->act, &s32, sizeof(s32)); if (error) return (error); - /* translate in */ - error = copyout(&s, p, sizeof(s)); - if (error) - return (error); + sa.sa_handler = PTRIN(s32.sa_u); + CP(s32, sa, sa_flags); + CP(s32, sa, sa_mask); + sap = &sa; + } else + sap = NULL; + error = kern_sigaction(td, uap->sig, sap, &osa, KSA_FREEBSD4); + if (error != 0 && uap->oact != NULL) { + s32.sa_u = PTROUT(osa.sa_handler); + CP(osa, s32, sa_flags); + CP(osa, s32, sa_mask); + error = copyout(&s32, uap->oact, sizeof(s32)); } - error = xxx(td, (struct xxx_args *) uap); - if (error) - return (error); - if (p32) { - error = copyin(p, &s, sizeof(s)); - if (error) - return (error); - /* translate out */ - error = copyout(&s32, p32, sizeof(s32)); - } return (error); } - #endif ==== //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#2 (text+ko) ==== @@ -201,11 +201,6 @@ char new_l_[PADL_(void *)]; void * new; char new_r_[PADR_(void *)]; char newlen_l_[PADL_(u_int32_t)]; u_int32_t newlen; char newlen_r_[PADR_(u_int32_t)]; }; -struct ia32_sigaction_args { - char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; - char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; - char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; -}; struct ia32_sendfile_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; @@ -216,6 +211,14 @@ char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; +struct ia32_sigreturn_args { + char sigcntxp_l_[PADL_(const struct ia32_ucontext *)]; const struct ia32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct ia32_ucontext *)]; +}; +struct ia32_sigaction_args { + char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; + char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; + char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; +}; int ia32_open(struct thread *, struct ia32_open_args *); int ia32_wait4(struct thread *, struct ia32_wait4_args *); int ia32_getfsstat(struct thread *, struct ia32_getfsstat_args *); @@ -247,8 +250,9 @@ int ia32_truncate(struct thread *, struct ia32_truncate_args *); int ia32_ftruncate(struct thread *, struct ia32_ftruncate_args *); int ia32_sysctl(struct thread *, struct ia32_sysctl_args *); +int ia32_sendfile(struct thread *, struct ia32_sendfile_args *); +int ia32_sigreturn(struct thread *, struct ia32_sigreturn_args *); int ia32_sigaction(struct thread *, struct ia32_sigaction_args *); -int ia32_sendfile(struct thread *, struct ia32_sendfile_args *); #ifdef COMPAT_43 @@ -268,7 +272,17 @@ char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; +struct freebsd4_ia32_sigaction_args { + char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; + char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; + char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; +}; +struct freebsd4_ia32_sigreturn_args { + char sigcntxp_l_[PADL_(const struct __ucontext *)]; const struct __ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct __ucontext *)]; +}; int freebsd4_ia32_sendfile(struct thread *, struct freebsd4_ia32_sendfile_args *); +int freebsd4_ia32_sigaction(struct thread *, struct freebsd4_ia32_sigaction_args *); +int freebsd4_ia32_sigreturn(struct thread *, struct freebsd4_ia32_sigreturn_args *); #endif /* COMPAT_FREEBSD4 */ ==== //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#2 (text+ko) ==== @@ -252,9 +252,9 @@ #define IA32_SYS_jail 338 #define IA32_SYS_sigprocmask 340 #define IA32_SYS_sigsuspend 341 -#define IA32_SYS_ia32_sigaction 342 + /* 342 is old ia32_sigaction */ #define IA32_SYS_sigpending 343 -#define IA32_SYS_sigreturn 344 + /* 344 is old ia32_sigreturn */ #define IA32_SYS___acl_get_file 347 #define IA32_SYS___acl_set_file 348 #define IA32_SYS___acl_get_fd 349 @@ -286,6 +286,8 @@ #define IA32_SYS_lchflags 391 #define IA32_SYS_uuidgen 392 #define IA32_SYS_ia32_sendfile 393 +#define IA32_SYS_ia32_sigreturn 416 +#define IA32_SYS_ia32_sigaction 417 #define IA32_SYS_thr_create 430 #define IA32_SYS_thr_exit 431 #define IA32_SYS_thr_self 432 ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#2 (text+ko) ==== @@ -367,9 +367,9 @@ { 0, (sy_call_t *)nosys }, /* 339 = pioctl */ { SYF_MPSAFE | AS(sigprocmask_args), (sy_call_t *)sigprocmask }, /* 340 = sigprocmask */ { SYF_MPSAFE | AS(sigsuspend_args), (sy_call_t *)sigsuspend }, /* 341 = sigsuspend */ - { AS(ia32_sigaction_args), (sy_call_t *)ia32_sigaction }, /* 342 = ia32_sigaction */ + { compat4(AS(freebsd4_ia32_sigaction_args),ia32_sigaction) }, /* 342 = old ia32_sigaction */ { SYF_MPSAFE | AS(sigpending_args), (sy_call_t *)sigpending }, /* 343 = sigpending */ - { SYF_MPSAFE | AS(sigreturn_args), (sy_call_t *)sigreturn }, /* 344 = sigreturn */ + { compat4(SYF_MPSAFE | AS(freebsd4_ia32_sigreturn_args),ia32_sigreturn) }, /* 344 = old ia32_sigreturn */ { 0, (sy_call_t *)nosys }, /* 345 = sigtimedwait */ { 0, (sy_call_t *)nosys }, /* 346 = sigwaitinfo */ { SYF_MPSAFE | AS(__acl_get_file_args), (sy_call_t *)__acl_get_file }, /* 347 = __acl_get_file */ @@ -441,8 +441,8 @@ { 0, (sy_call_t *)nosys }, /* 413 = extattr_get_link */ { 0, (sy_call_t *)nosys }, /* 414 = extattr_delete_link */ { 0, (sy_call_t *)nosys }, /* 415 = __mac_execve */ - { 0, (sy_call_t *)nosys }, /* 416 = newsigreturn */ - { 0, (sy_call_t *)nosys }, /* 417 = newsigaction */ + { SYF_MPSAFE | AS(ia32_sigreturn_args), (sy_call_t *)ia32_sigreturn }, /* 416 = ia32_sigreturn */ + { AS(ia32_sigaction_args), (sy_call_t *)ia32_sigaction }, /* 417 = ia32_sigaction */ { 0, (sy_call_t *)nosys }, /* 418 = __xstat */ { 0, (sy_call_t *)nosys }, /* 419 = __xfstat */ { 0, (sy_call_t *)nosys }, /* 420 = __xlstat */ ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#2 (text+ko) ==== @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002 Doug Rabson + * Copyright (c) 2003 Peter Wemm * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,6 +27,8 @@ * $FreeBSD: src/sys/ia64/ia32/ia32_sysvec.c,v 1.2 2002/09/01 21:41:23 jake Exp $ */ +#include "opt_compat.h" + #define __ELF_WORD_SIZE 32 #include @@ -61,33 +64,33 @@ #include #include +#include +#include #include #include #include #include #include #include +#include static register_t *ia32_copyout_strings(struct image_params *imgp); static void ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings); +#ifdef COMPAT_FREEBSD4 +static void freebsd4_ia32_sendsig(sig_t, int, sigset_t *, u_long); +#endif +static void ia32_sendsig(sig_t, int, sigset_t *, u_long); +static void ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp); +static int ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp); + extern struct sysent ia32_sysent[]; -static char ia32_sigcode[] = { - 0xff, 0x54, 0x24, 0x10, /* call *SIGF_HANDLER(%esp) */ - 0x8d, 0x44, 0x24, 0x14, /* lea SIGF_UC(%esp),%eax */ - 0x50, /* pushl %eax */ - 0xf7, 0x40, 0x54, 0x00, 0x00, 0x02, 0x02, /* testl $PSL_VM,UC_EFLAGS(%eax) */ - 0x75, 0x03, /* jne 9f */ - 0x8e, 0x68, 0x14, /* movl UC_GS(%eax),%gs */ - 0xb8, 0x57, 0x01, 0x00, 0x00, /* 9: movl $SYS_sigreturn,%eax */ - 0x50, /* pushl %eax */ - 0xcd, 0x80, /* int $0x80 */ - 0xeb, 0xfe, /* 0: jmp 0b */ - 0, 0, 0, 0 -}; -static int ia32_szsigcode = sizeof(ia32_sigcode) & ~3; +extern char ia32_sigcode[]; +extern char freebsd4_ia32_sigcode[]; +extern int sz_ia32_sigcode; +extern int sz_freebsd4_ia32_sigcode; struct sysentvec ia32_freebsd_sysvec = { SYS_MAXSYSCALL, @@ -99,9 +102,9 @@ NULL, NULL, elf32_freebsd_fixup, - sendsig, + ia32_sendsig, ia32_sigcode, - &ia32_szsigcode, + &sz_ia32_sigcode, NULL, "FreeBSD ELF32", elf32_coredump, @@ -134,6 +137,9 @@ extern int _ucode32sel, _udatasel; +#define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) +#define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) + static register_t * ia32_copyout_strings(struct image_params *imgp) { @@ -290,15 +296,485 @@ */ load_cr0(rcr0() | CR0_MP | CR0_TS); - /* Initialize the npx (if any) for the current process. */ - s = intr_disable(); - if (PCPU_GET(fpcurthread) == td) - npxdrop(); - pcb->pcb_flags &= ~PCB_NPXINITDONE; - intr_restore(s); + fpstate_drop(td); /* Return via doreti so that we can change to a different %cs */ pcb->pcb_flags |= PCB_FULLCTX; td->td_retval[1] = 0; } + +static void +ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp) +{ + struct savefpu *addr; + + /* + * XXX mc_fpstate might be misaligned, since its declaration is not + * unportabilized using __attribute__((aligned(16))) like the + * declaration of struct savemm, and anyway, alignment doesn't work + * for auto variables since we don't use gcc's pessimal stack + * alignment. Work around this by abusing the spare fields after + * mcp->mc_fpstate. + * + * XXX unpessimize most cases by only aligning when fxsave might be + * called, although this requires knowing too much about + * npxgetregs()'s internals. + */ + addr = (struct savefpu *)&mcp->mc_fpstate; + if (td == PCPU_GET(fpcurthread) && ((uintptr_t)(void *)addr & 0xF)) { + do + addr = (void *)((char *)addr + 4); + while ((uintptr_t)(void *)addr & 0xF); + } + mcp->mc_ownedfp = npxgetregs(td, addr); + if (addr != (struct savefpu *)&mcp->mc_fpstate) { + bcopy(addr, &mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); + bzero(&mcp->mc_spare2, sizeof(mcp->mc_spare2)); + } + mcp->mc_fpformat = npxformat(); +} + +static int +ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp) +{ + struct savefpu *addr; + + if (mcp->mc_fpformat == _MC_FPFMT_NODEV) + return (0); + else if (mcp->mc_fpformat != _MC_FPFMT_XMM) + return (EINVAL); + else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE) + /* We don't care what state is left in the FPU or PCB. */ + fpstate_drop(td); + else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || + mcp->mc_ownedfp == _MC_FPOWNED_PCB) { + /* XXX align as above. */ + addr = (struct savefpu *)&mcp->mc_fpstate; + if (td == PCPU_GET(fpcurthread) && + ((uintptr_t)(void *)addr & 0xF)) { + do + addr = (void *)((char *)addr + 4); + while ((uintptr_t)(void *)addr & 0xF); + bcopy(&mcp->mc_fpstate, addr, sizeof(mcp->mc_fpstate)); + } + /* + * XXX we violate the dubious requirement that npxsetregs() + * be called with interrupts disabled. + */ + npxsetregs(td, addr); + /* + * Don't bother putting things back where they were in the + * misaligned case, since we know that the caller won't use + * them again. + */ + } else + return (EINVAL); + return (0); +} +/* + * Send an interrupt to process. + * + * Stack is set up to allow sigcode stored + * at top to call routine, followed by kcall + * to sigreturn routine below. After sigreturn + * resets the signal mask, the stack, and the + * frame pointer, it returns to the user + * specified pc, psl. + */ +#ifdef COMPAT_FREEBSD4 +static void +freebsd4_ia32_sendsig(catcher, sig, mask, code) + sig_t catcher; + int sig; + sigset_t *mask; + u_long code; +{ + struct ia32_sigframe4 sf, *sfp; + struct proc *p; + struct thread *td; + struct sigacts *psp; + struct trapframe *regs; + int oonstack; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + psp = p->p_sigacts; + regs = td->td_frame; + oonstack = sigonstack(regs->tf_rsp); + + /* Save user context. */ + bzero(&sf, sizeof(sf)); + sf.sf_uc.uc_sigmask = *mask; + sf.sf_uc.uc_stack.ss_sp = (uintptr_t)p->p_sigstk.ss_sp; + sf.sf_uc.uc_stack.ss_size = p->p_sigstk.ss_size; + sf.sf_uc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK) + ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; + sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; + sf.sf_uc.uc_mcontext.mc_gs = rgs(); + sf.sf_uc.uc_mcontext.mc_fs = rfs(); + __asm __volatile("movl %%es,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_es)); + __asm __volatile("movl %%ds,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_ds)); + sf.sf_uc.uc_mcontext.mc_edi = regs->tf_rdi; + sf.sf_uc.uc_mcontext.mc_esi = regs->tf_rsi; + sf.sf_uc.uc_mcontext.mc_ebp = regs->tf_rbp; + sf.sf_uc.uc_mcontext.mc_isp = regs->tf_rsp; /* XXX */ + sf.sf_uc.uc_mcontext.mc_ebx = regs->tf_rbx; + sf.sf_uc.uc_mcontext.mc_edx = regs->tf_rdx; + sf.sf_uc.uc_mcontext.mc_ecx = regs->tf_rcx; + sf.sf_uc.uc_mcontext.mc_eax = regs->tf_rax; + sf.sf_uc.uc_mcontext.mc_trapno = regs->tf_trapno; + sf.sf_uc.uc_mcontext.mc_err = regs->tf_err; + sf.sf_uc.uc_mcontext.mc_eip = regs->tf_rip; + sf.sf_uc.uc_mcontext.mc_cs = regs->tf_cs; + sf.sf_uc.uc_mcontext.mc_eflags = regs->tf_rflags; + sf.sf_uc.uc_mcontext.mc_esp = regs->tf_rsp; + sf.sf_uc.uc_mcontext.mc_ss = regs->tf_ss; + + /* Allocate space for the signal handler context. */ + if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack && + SIGISMEMBER(psp->ps_sigonstack, sig)) { + sfp = (struct ia32_sigframe4 *)(p->p_sigstk.ss_sp + + p->p_sigstk.ss_size - sizeof(sf)); + } else + sfp = (struct ia32_sigframe4 *)regs->tf_rsp - 1; + PROC_UNLOCK(p); + + /* Translate the signal if appropriate. */ + if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) + sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; + + /* Build the argument list for the signal handler. */ + sf.sf_signum = sig; + sf.sf_ucontext = (register_t)&sfp->sf_uc; + PROC_LOCK(p); + if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + /* Signal handler installed with SA_SIGINFO. */ + sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; + sf.sf_ah = (u_int32_t)(uintptr_t)catcher; + + /* Fill in POSIX parts */ + sf.sf_si.si_signo = sig; + sf.sf_si.si_code = code; + sf.sf_si.si_addr = regs->tf_addr; + } else { + /* Old FreeBSD-style arguments. */ + sf.sf_siginfo = code; + sf.sf_addr = regs->tf_addr; + sf.sf_ah = (u_int32_t)(uintptr_t)catcher; + } + PROC_UNLOCK(p); + + /* + * Copy the sigframe out to the user's stack. + */ + if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { +#ifdef DEBUG + printf("process %ld has trashed its stack\n", (long)p->p_pid); +#endif + PROC_LOCK(p); + sigexit(td, SIGILL); + } + + regs->tf_rsp = (uintptr_t)sfp; + regs->tf_rip = PS_STRINGS - sz_freebsd4_ia32_sigcode; + regs->tf_rflags &= ~PSL_T; + regs->tf_cs = _ucode32sel; + regs->tf_ss = _udatasel; + load_ds(_udatasel); + load_es(_udatasel); + load_fs(_udatasel); + PROC_LOCK(p); +} +#endif /* COMPAT_FREEBSD4 */ + +static void +ia32_sendsig(catcher, sig, mask, code) + sig_t catcher; + int sig; + sigset_t *mask; + u_long code; +{ + struct ia32_sigframe sf, *sfp; + struct proc *p; + struct thread *td; + struct sigacts *psp; + char *sp; + struct trapframe *regs; + int oonstack; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + psp = p->p_sigacts; +#ifdef COMPAT_FREEBSD4 + if (SIGISMEMBER(psp->ps_freebsd4, sig)) { + freebsd4_ia32_sendsig(catcher, sig, mask, code); + return; + } +#endif + regs = td->td_frame; + oonstack = sigonstack(regs->tf_rsp); + + /* Save user context. */ + bzero(&sf, sizeof(sf)); + sf.sf_uc.uc_sigmask = *mask; + sf.sf_uc.uc_stack.ss_sp = (uintptr_t)p->p_sigstk.ss_sp; + sf.sf_uc.uc_stack.ss_size = p->p_sigstk.ss_size; + sf.sf_uc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK) + ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; + sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; + sf.sf_uc.uc_mcontext.mc_gs = rgs(); + sf.sf_uc.uc_mcontext.mc_fs = rfs(); + __asm __volatile("movl %%es,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_es)); + __asm __volatile("movl %%ds,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_ds)); + sf.sf_uc.uc_mcontext.mc_edi = regs->tf_rdi; + sf.sf_uc.uc_mcontext.mc_esi = regs->tf_rsi; + sf.sf_uc.uc_mcontext.mc_ebp = regs->tf_rbp; + sf.sf_uc.uc_mcontext.mc_isp = regs->tf_rsp; /* XXX */ + sf.sf_uc.uc_mcontext.mc_ebx = regs->tf_rbx; + sf.sf_uc.uc_mcontext.mc_edx = regs->tf_rdx; + sf.sf_uc.uc_mcontext.mc_ecx = regs->tf_rcx; + sf.sf_uc.uc_mcontext.mc_eax = regs->tf_rax; + sf.sf_uc.uc_mcontext.mc_trapno = regs->tf_trapno; + sf.sf_uc.uc_mcontext.mc_err = regs->tf_err; + sf.sf_uc.uc_mcontext.mc_eip = regs->tf_rip; + sf.sf_uc.uc_mcontext.mc_cs = regs->tf_cs; + sf.sf_uc.uc_mcontext.mc_eflags = regs->tf_rflags; + sf.sf_uc.uc_mcontext.mc_esp = regs->tf_rsp; + sf.sf_uc.uc_mcontext.mc_ss = regs->tf_ss; + sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ + ia32_get_fpcontext(td, &sf.sf_uc.uc_mcontext); + fpstate_drop(td); + + /* Allocate space for the signal handler context. */ + if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack && + SIGISMEMBER(psp->ps_sigonstack, sig)) { + sp = p->p_sigstk.ss_sp + + p->p_sigstk.ss_size - sizeof(sf); + } else + sp = (char *)regs->tf_rsp - sizeof(sf); + /* Align to 16 bytes. */ + sfp = (struct ia32_sigframe *)((uintptr_t)sp & ~0xF); + PROC_UNLOCK(p); + + /* Translate the signal if appropriate. */ + if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) + sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; + + /* Build the argument list for the signal handler. */ + sf.sf_signum = sig; + sf.sf_ucontext = (register_t)&sfp->sf_uc; + PROC_LOCK(p); + if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + /* Signal handler installed with SA_SIGINFO. */ + sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; + sf.sf_ah = (u_int32_t)(uintptr_t)catcher; + + /* Fill in POSIX parts */ + sf.sf_si.si_signo = sig; + sf.sf_si.si_code = code; + sf.sf_si.si_addr = regs->tf_addr; + } else { + /* Old FreeBSD-style arguments. */ + sf.sf_siginfo = code; + sf.sf_addr = regs->tf_err; + sf.sf_ah = (u_int32_t)(uintptr_t)catcher; + } + PROC_UNLOCK(p); + + /* + * Copy the sigframe out to the user's stack. + */ + if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { +#ifdef DEBUG + printf("process %ld has trashed its stack\n", (long)p->p_pid); +#endif + PROC_LOCK(p); + sigexit(td, SIGILL); + } + + regs->tf_rsp = (uintptr_t)sfp; + regs->tf_rip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); + regs->tf_rflags &= ~PSL_T; + regs->tf_cs = _ucode32sel; + regs->tf_ss = _udatasel; + load_ds(_udatasel); + load_es(_udatasel); + load_fs(_udatasel); + PROC_LOCK(p); +} + +/* + * System call to cleanup state after a signal + * has been taken. Reset signal mask and + * stack state from context left by sendsig (above). + * Return to previous pc and psl as specified by + * context left by sendsig. Check carefully to + * make sure that the user has not modified the + * state to gain improper privileges. + */ +#ifdef COMPAT_FREEBSD4 +/* + * MPSAFE + */ +int +freebsd4_ia32_sigreturn(td, uap) + struct thread *td; + struct freebsd4_ia32_sigreturn_args /* { + const struct freebsd4_ucontext *sigcntxp; + } */ *uap; +{ + struct ia32_ucontext4 uc; + struct proc *p = td->td_proc; + struct trapframe *regs; + const struct ia32_ucontext4 *ucp; + int cs, eflags, error; + + error = copyin(uap->sigcntxp, &uc, sizeof(uc)); + if (error != 0) + return (error); + ucp = &uc; + regs = td->td_frame; + eflags = ucp->uc_mcontext.mc_eflags; + /* + * Don't allow users to change privileged or reserved flags. + */ + /* + * XXX do allow users to change the privileged flag PSL_RF. + * The cpu sets PSL_RF in tf_eflags for faults. Debuggers + * should sometimes set it there too. tf_eflags is kept in + * the signal context during signal handling and there is no + * other place to remember it, so the PSL_RF bit may be + * corrupted by the signal handler without us knowing. + * Corruption of the PSL_RF bit at worst causes one more or + * one less debugger trap, so allowing it is fairly harmless. + */ + if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + printf("freebsd4_ia32_sigreturn: eflags = 0x%x\n", eflags); + return (EINVAL); + } + + /* + * Don't allow users to load a valid privileged %cs. Let the + * hardware check for invalid selectors, excess privilege in + * other selectors, invalid %eip's and invalid %esp's. + */ + cs = ucp->uc_mcontext.mc_cs; + if (!CS_SECURE(cs)) { + printf("freebsd4_sigreturn: cs = 0x%x\n", cs); + trapsignal(td, SIGBUS, T_PROTFLT); + return (EINVAL); + } + + /* mc_gs is done by sigtramp.S */ + load_fs(ucp->uc_mcontext.mc_fs); + load_es(ucp->uc_mcontext.mc_es); + load_ds(ucp->uc_mcontext.mc_ds); + regs->tf_rdi = ucp->uc_mcontext.mc_edi; + regs->tf_rsi = ucp->uc_mcontext.mc_esi; + regs->tf_rbp = ucp->uc_mcontext.mc_ebp; + regs->tf_rbx = ucp->uc_mcontext.mc_ebx; + regs->tf_rdx = ucp->uc_mcontext.mc_edx; + regs->tf_rcx = ucp->uc_mcontext.mc_ecx; + regs->tf_rax = ucp->uc_mcontext.mc_eax; + regs->tf_trapno = ucp->uc_mcontext.mc_trapno; + regs->tf_err = ucp->uc_mcontext.mc_err; + regs->tf_rip = ucp->uc_mcontext.mc_eip; + regs->tf_cs = cs; + regs->tf_rflags = ucp->uc_mcontext.mc_eflags; + regs->tf_rsp = ucp->uc_mcontext.mc_esp; + regs->tf_ss = ucp->uc_mcontext.mc_ss; + + PROC_LOCK(p); + td->td_sigmask = ucp->uc_sigmask; + SIG_CANTMASK(td->td_sigmask); + signotify(td); + PROC_UNLOCK(p); + return (EJUSTRETURN); +} +#endif /* COMPAT_FREEBSD4 */ + +/* + * MPSAFE + */ +int +ia32_sigreturn(td, uap) + struct thread *td; + struct ia32_sigreturn_args /* { + const struct ia32_ucontext *sigcntxp; + } */ *uap; +{ + struct ia32_ucontext uc; + struct proc *p = td->td_proc; + struct trapframe *regs; + const struct ia32_ucontext *ucp; + int cs, eflags, error, ret; + + error = copyin(uap->sigcntxp, &uc, sizeof(uc)); + if (error != 0) + return (error); + ucp = &uc; + regs = td->td_frame; + eflags = ucp->uc_mcontext.mc_eflags; + /* + * Don't allow users to change privileged or reserved flags. + */ + /* + * XXX do allow users to change the privileged flag PSL_RF. + * The cpu sets PSL_RF in tf_eflags for faults. Debuggers + * should sometimes set it there too. tf_eflags is kept in + * the signal context during signal handling and there is no + * other place to remember it, so the PSL_RF bit may be + * corrupted by the signal handler without us knowing. + * Corruption of the PSL_RF bit at worst causes one more or + * one less debugger trap, so allowing it is fairly harmless. + */ + if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + printf("ia32_sigreturn: eflags = 0x%x\n", eflags); + return (EINVAL); + } + + /* + * Don't allow users to load a valid privileged %cs. Let the + * hardware check for invalid selectors, excess privilege in + * other selectors, invalid %eip's and invalid %esp's. + */ + cs = ucp->uc_mcontext.mc_cs; + if (!CS_SECURE(cs)) { + printf("sigreturn: cs = 0x%x\n", cs); + trapsignal(td, SIGBUS, T_PROTFLT); + return (EINVAL); + } + + ret = ia32_set_fpcontext(td, &ucp->uc_mcontext); + if (ret != 0) + return (ret); + + /* mc_gs is done by sigtramp.S */ + load_fs(ucp->uc_mcontext.mc_fs); + load_es(ucp->uc_mcontext.mc_es); + load_ds(ucp->uc_mcontext.mc_ds); + regs->tf_rdi = ucp->uc_mcontext.mc_edi; + regs->tf_rsi = ucp->uc_mcontext.mc_esi; + regs->tf_rbp = ucp->uc_mcontext.mc_ebp; + regs->tf_rbx = ucp->uc_mcontext.mc_ebx; + regs->tf_rdx = ucp->uc_mcontext.mc_edx; + regs->tf_rcx = ucp->uc_mcontext.mc_ecx; + regs->tf_rax = ucp->uc_mcontext.mc_eax; + regs->tf_trapno = ucp->uc_mcontext.mc_trapno; + regs->tf_err = ucp->uc_mcontext.mc_err; + regs->tf_rip = ucp->uc_mcontext.mc_eip; + regs->tf_cs = cs; + regs->tf_rflags = ucp->uc_mcontext.mc_eflags; + regs->tf_rsp = ucp->uc_mcontext.mc_esp; + regs->tf_ss = ucp->uc_mcontext.mc_ss; + + PROC_LOCK(p); + td->td_sigmask = ucp->uc_sigmask; + SIG_CANTMASK(td->td_sigmask); + signotify(td); + PROC_UNLOCK(p); + return (EJUSTRETURN); +} ==== //depot/projects/hammer/sys/amd64/ia32/syscalls.master#2 (text+ko) ==== @@ -484,11 +484,11 @@ 340 MNOPROTO POSIX { int sigprocmask(int how, const sigset_t *set, \ sigset_t *oset); } 341 MNOPROTO POSIX { int sigsuspend(const sigset_t *sigmask); } -342 STD POSIX { int ia32_sigaction(int sig, \ +342 COMPAT4 POSIX { int ia32_sigaction(int sig, \ struct sigaction32 *act, \ struct sigaction32 *oact); } 343 MNOPROTO POSIX { int sigpending(sigset_t *set); } -344 MNOPROTO BSD { int sigreturn(const struct __ucontext *sigcntxp); } +344 MCOMPAT4 BSD { int ia32_sigreturn(const struct __ucontext *sigcntxp); } 345 UNIMPL NOHIDE sigtimedwait 346 UNIMPL NOHIDE sigwaitinfo 347 MNOPROTO BSD { int __acl_get_file(const char *path, \ @@ -586,8 +586,10 @@ 413 UNIMPL BSD extattr_get_link 414 UNIMPL BSD extattr_delete_link 415 UNIMPL BSD __mac_execve -416 UNIMPL BSD newsigreturn -417 UNIMPL BSD newsigaction +416 MSTD BSD { int ia32_sigreturn(const struct ia32_ucontext *sigcntxp); } +417 STD POSIX { int ia32_sigaction(int sig, \ + struct sigaction32 *act, \ + struct sigaction32 *oact); } 418 UNIMPL BSD __xstat 419 UNIMPL BSD __xfstat 420 UNIMPL BSD __xlstat ==== //depot/projects/hammer/sys/amd64/include/md_var.h#10 (text+ko) ==== @@ -69,5 +69,6 @@ int is_physical_memory(vm_offset_t addr); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); void swi_vm(void *); +void fpstate_drop(struct thread *td); #endif /* !_MACHINE_MD_VAR_H_ */ ==== //depot/projects/hammer/sys/conf/files.amd64#10 (text+ko) ==== @@ -8,6 +8,19 @@ # dependency lines other than the first are silently ignored. # +ia32_genassym.o optional ia32 \ + dependency "$S/amd64/ia32/ia32_genassym.c" \ + compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + no-obj no-implicit-rule \ + clean "ia32_genassym.o" +# +ia32_assym.h optional ia32 \ + dependency "$S/kern/genassym.sh ia32_genassym.o" \ + compile-with "sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "ia32_assym.h" +# + dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd @@ -67,6 +80,7 @@ amd64/ia32/ia32_misc.c optional ia32 amd64/ia32/ia32_sysent.c optional ia32 amd64/ia32/ia32_sysvec.c optional ia32 +amd64/ia32/ia32_sigtramp.S optional ia32 kern/imgact_elf32.c optional ia32 # This file tells config what files go into building a kernel, From owner-p4-projects@FreeBSD.ORG Tue May 13 19:14:15 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 18A2437B404; Tue, 13 May 2003 19:14:15 -0700 (PDT) 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 C165A37B401 for ; Tue, 13 May 2003 19:14:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47B9343F85 for ; Tue, 13 May 2003 19:14:14 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E2EE0U069382 for ; Tue, 13 May 2003 19:14:14 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E2EDWe069378 for perforce@freebsd.org; Tue, 13 May 2003 19:14:13 -0700 (PDT) Date: Tue, 13 May 2003 19:14:13 -0700 (PDT) Message-Id: <200305140214.h4E2EDWe069378@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31112 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 02:14:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=31112 Change 31112 by peter@peter_hammer on 2003/05/13 19:13:51 Oh Joy. We need to swab the kevent structures too. With this, the kernel no longer printf's about unknown filters on the console when running the p4 client. Affected files ... .. //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#3 edit .. //depot/projects/hammer/sys/amd64/ia32/syscalls.master#3 edit Differences ... ==== //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#3 (text+ko) ==== @@ -536,6 +536,83 @@ return (select(td, (struct select_args *) uap)); } +struct kevent32 { + u_int32_t ident; /* identifier for this event */ + short filter; /* filter for event */ + u_short flags; + u_int fflags; + int32_t data; + u_int32_t udata; /* opaque user data identifier */ +}; + +int +ia32_kevent(struct thread *td, struct ia32_kevent_args *uap) +{ + int error; + caddr_t sg; + struct timespec32 ts32; + struct timespec ts; + struct kevent32 ks32; + struct kevent *ks; + struct kevent_args a; + int i; + + sg = stackgap_init(); + + a.fd = uap->fd; + a.changelist = uap->changelist; + a.nchanges = uap->nchanges; + a.eventlist = uap->eventlist; + a.nevents = uap->nevents; + a.timeout = NULL; + + if (uap->timeout) { + a.timeout = stackgap_alloc(&sg, sizeof(struct timespec)); + error = copyin(uap->timeout, &ts32, sizeof(ts32)); + if (error) + return (error); + CP(ts32, ts, tv_sec); + CP(ts32, ts, tv_nsec); + error = copyout(&ts, (void *)(uintptr_t)a.timeout, sizeof(ts)); + if (error) + return (error); + } + if (uap->changelist) { + a.changelist = (struct kevent *)stackgap_alloc(&sg, uap->nchanges * sizeof(struct kevent)); + for (i = 0; i < uap->nchanges; i++) { + error = copyin(&uap->changelist[i], &ks32, sizeof(ks32)); + if (error) + return (error); + ks = (struct kevent *)(uintptr_t)&a.changelist[i]; + CP(ks32, *ks, ident); + CP(ks32, *ks, filter); + CP(ks32, *ks, flags); + CP(ks32, *ks, fflags); + CP(ks32, *ks, data); + PTRIN_CP(ks32, *ks, udata); + } + } + if (uap->eventlist) { + a.eventlist = stackgap_alloc(&sg, uap->nevents * sizeof(struct kevent)); + } + error = kevent(td, &a); + if (uap->eventlist && error > 0) { + for (i = 0; i < error; i++) { + ks = &a.eventlist[i]; + CP(*ks, ks32, ident); + CP(*ks, ks32, filter); + CP(*ks, ks32, flags); + CP(*ks, ks32, fflags); + CP(*ks, ks32, data); + PTROUT_CP(*ks, ks32, udata); + error = copyout(&ks32, &uap->eventlist[i], sizeof(ks32)); + if (error) + return (error); + } + } + return error; +} + int ia32_gettimeofday(struct thread *td, struct ia32_gettimeofday_args *uap) { ==== //depot/projects/hammer/sys/amd64/ia32/syscalls.master#3 (text+ko) ==== @@ -521,7 +521,7 @@ 360 MNOPROTO BSD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } 361 MNOPROTO BSD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } 362 MNOPROTO BSD { int kqueue(void); } -363 MNOPROTO BSD { int kevent(int fd, \ +363 MSTD BSD { int ia32_kevent(int fd, \ const struct kevent *changelist, int nchanges, \ struct kevent *eventlist, int nevents, \ const struct timespec *timeout); } From owner-p4-projects@FreeBSD.ORG Tue May 13 19:15:17 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 05AF637B404; Tue, 13 May 2003 19:15:17 -0700 (PDT) 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 AFF8E37B401 for ; Tue, 13 May 2003 19:15:16 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 396CF43F93 for ; Tue, 13 May 2003 19:15:16 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E2FG0U069439 for ; Tue, 13 May 2003 19:15:16 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E2FFsC069436 for perforce@freebsd.org; Tue, 13 May 2003 19:15:15 -0700 (PDT) Date: Tue, 13 May 2003 19:15:15 -0700 (PDT) Message-Id: <200305140215.h4E2FFsC069436@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31113 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 02:15:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=31113 Change 31113 by peter@peter_hammer on 2003/05/13 19:14:31 Regen (oops, forgot these last time) Affected files ... .. //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#3 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#3 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#3 edit Differences ... ==== //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#3 (text+ko) ==== @@ -201,6 +201,14 @@ char new_l_[PADL_(void *)]; void * new; char new_r_[PADR_(void *)]; char newlen_l_[PADL_(u_int32_t)]; u_int32_t newlen; char newlen_r_[PADR_(u_int32_t)]; }; +struct ia32_kevent_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char changelist_l_[PADL_(const struct kevent *)]; const struct kevent * changelist; char changelist_r_[PADR_(const struct kevent *)]; + char nchanges_l_[PADL_(int)]; int nchanges; char nchanges_r_[PADR_(int)]; + char eventlist_l_[PADL_(struct kevent *)]; struct kevent * eventlist; char eventlist_r_[PADR_(struct kevent *)]; + char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)]; + char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; +}; struct ia32_sendfile_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; @@ -250,6 +258,7 @@ int ia32_truncate(struct thread *, struct ia32_truncate_args *); int ia32_ftruncate(struct thread *, struct ia32_ftruncate_args *); int ia32_sysctl(struct thread *, struct ia32_sysctl_args *); +int ia32_kevent(struct thread *, struct ia32_kevent_args *); int ia32_sendfile(struct thread *, struct ia32_sendfile_args *); int ia32_sigreturn(struct thread *, struct ia32_sigreturn_args *); int ia32_sigaction(struct thread *, struct ia32_sigaction_args *); ==== //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#3 (text+ko) ==== @@ -270,7 +270,7 @@ #define IA32_SYS_getresuid 360 #define IA32_SYS_getresgid 361 #define IA32_SYS_kqueue 362 -#define IA32_SYS_kevent 363 +#define IA32_SYS_ia32_kevent 363 #define IA32_SYS_extattr_set_fd 371 #define IA32_SYS_extattr_get_fd 372 #define IA32_SYS_extattr_delete_fd 373 ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#3 (text+ko) ==== @@ -388,7 +388,7 @@ { SYF_MPSAFE | AS(getresuid_args), (sy_call_t *)getresuid }, /* 360 = getresuid */ { SYF_MPSAFE | AS(getresgid_args), (sy_call_t *)getresgid }, /* 361 = getresgid */ { SYF_MPSAFE | 0, (sy_call_t *)kqueue }, /* 362 = kqueue */ - { SYF_MPSAFE | AS(kevent_args), (sy_call_t *)kevent }, /* 363 = kevent */ + { SYF_MPSAFE | AS(ia32_kevent_args), (sy_call_t *)ia32_kevent }, /* 363 = ia32_kevent */ { 0, (sy_call_t *)nosys }, /* 364 = __cap_get_proc */ { 0, (sy_call_t *)nosys }, /* 365 = __cap_set_proc */ { 0, (sy_call_t *)nosys }, /* 366 = __cap_get_fd */ From owner-p4-projects@FreeBSD.ORG Tue May 13 19:27:33 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B168737B404; Tue, 13 May 2003 19:27:32 -0700 (PDT) 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 49B6B37B401 for ; Tue, 13 May 2003 19:27:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 847D343FA3 for ; Tue, 13 May 2003 19:27:31 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E2RV0U069829 for ; Tue, 13 May 2003 19:27:31 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E2RVNI069826 for perforce@freebsd.org; Tue, 13 May 2003 19:27:31 -0700 (PDT) Date: Tue, 13 May 2003 19:27:31 -0700 (PDT) Message-Id: <200305140227.h4E2RVNI069826@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31114 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 02:27:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=31114 Change 31114 by peter@peter_hammer on 2003/05/13 19:27:00 Split the signal code into its own file, since it was cut/pasted from UCB copyrighted code. Affected files ... .. //depot/projects/hammer/sys/amd64/ia32/ia32_signal.c#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_signal.h#2 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#3 edit .. //depot/projects/hammer/sys/conf/files.amd64#11 edit Differences ... ==== //depot/projects/hammer/sys/amd64/ia32/ia32_signal.h#2 (text+ko) ==== @@ -157,3 +157,8 @@ struct ia32_siginfo sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ }; +extern char ia32_sigcode[]; +extern char freebsd4_ia32_sigcode[]; +extern int sz_ia32_sigcode; +extern int sz_freebsd4_ia32_sigcode; +extern void ia32_sendsig(sig_t, int, sigset_t *, u_long); ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#3 (text+ko) ==== @@ -78,20 +78,8 @@ static void ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings); -#ifdef COMPAT_FREEBSD4 -static void freebsd4_ia32_sendsig(sig_t, int, sigset_t *, u_long); -#endif -static void ia32_sendsig(sig_t, int, sigset_t *, u_long); -static void ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp); -static int ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp); - extern struct sysent ia32_sysent[]; -extern char ia32_sigcode[]; -extern char freebsd4_ia32_sigcode[]; -extern int sz_ia32_sigcode; -extern int sz_freebsd4_ia32_sigcode; - struct sysentvec ia32_freebsd_sysvec = { SYS_MAXSYSCALL, ia32_sysent, @@ -137,9 +125,6 @@ extern int _ucode32sel, _udatasel; -#define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) -#define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) - static register_t * ia32_copyout_strings(struct image_params *imgp) { @@ -301,480 +286,4 @@ /* Return via doreti so that we can change to a different %cs */ pcb->pcb_flags |= PCB_FULLCTX; td->td_retval[1] = 0; - -} - -static void -ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp) -{ - struct savefpu *addr; - - /* - * XXX mc_fpstate might be misaligned, since its declaration is not - * unportabilized using __attribute__((aligned(16))) like the - * declaration of struct savemm, and anyway, alignment doesn't work - * for auto variables since we don't use gcc's pessimal stack - * alignment. Work around this by abusing the spare fields after - * mcp->mc_fpstate. - * - * XXX unpessimize most cases by only aligning when fxsave might be - * called, although this requires knowing too much about - * npxgetregs()'s internals. - */ - addr = (struct savefpu *)&mcp->mc_fpstate; - if (td == PCPU_GET(fpcurthread) && ((uintptr_t)(void *)addr & 0xF)) { - do - addr = (void *)((char *)addr + 4); - while ((uintptr_t)(void *)addr & 0xF); - } - mcp->mc_ownedfp = npxgetregs(td, addr); - if (addr != (struct savefpu *)&mcp->mc_fpstate) { - bcopy(addr, &mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); - bzero(&mcp->mc_spare2, sizeof(mcp->mc_spare2)); - } - mcp->mc_fpformat = npxformat(); -} - -static int -ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp) -{ - struct savefpu *addr; - - if (mcp->mc_fpformat == _MC_FPFMT_NODEV) - return (0); - else if (mcp->mc_fpformat != _MC_FPFMT_XMM) - return (EINVAL); - else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE) - /* We don't care what state is left in the FPU or PCB. */ - fpstate_drop(td); - else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || - mcp->mc_ownedfp == _MC_FPOWNED_PCB) { - /* XXX align as above. */ - addr = (struct savefpu *)&mcp->mc_fpstate; - if (td == PCPU_GET(fpcurthread) && - ((uintptr_t)(void *)addr & 0xF)) { - do - addr = (void *)((char *)addr + 4); - while ((uintptr_t)(void *)addr & 0xF); - bcopy(&mcp->mc_fpstate, addr, sizeof(mcp->mc_fpstate)); - } - /* - * XXX we violate the dubious requirement that npxsetregs() - * be called with interrupts disabled. - */ - npxsetregs(td, addr); - /* - * Don't bother putting things back where they were in the - * misaligned case, since we know that the caller won't use - * them again. - */ - } else - return (EINVAL); - return (0); -} -/* - * Send an interrupt to process. - * - * Stack is set up to allow sigcode stored - * at top to call routine, followed by kcall - * to sigreturn routine below. After sigreturn - * resets the signal mask, the stack, and the - * frame pointer, it returns to the user - * specified pc, psl. - */ -#ifdef COMPAT_FREEBSD4 -static void -freebsd4_ia32_sendsig(catcher, sig, mask, code) - sig_t catcher; - int sig; - sigset_t *mask; - u_long code; -{ - struct ia32_sigframe4 sf, *sfp; - struct proc *p; - struct thread *td; - struct sigacts *psp; - struct trapframe *regs; - int oonstack; - - td = curthread; - p = td->td_proc; - PROC_LOCK_ASSERT(p, MA_OWNED); - psp = p->p_sigacts; - regs = td->td_frame; - oonstack = sigonstack(regs->tf_rsp); - - /* Save user context. */ - bzero(&sf, sizeof(sf)); - sf.sf_uc.uc_sigmask = *mask; - sf.sf_uc.uc_stack.ss_sp = (uintptr_t)p->p_sigstk.ss_sp; - sf.sf_uc.uc_stack.ss_size = p->p_sigstk.ss_size; - sf.sf_uc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK) - ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; - sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - sf.sf_uc.uc_mcontext.mc_gs = rgs(); - sf.sf_uc.uc_mcontext.mc_fs = rfs(); - __asm __volatile("movl %%es,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_es)); - __asm __volatile("movl %%ds,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_ds)); - sf.sf_uc.uc_mcontext.mc_edi = regs->tf_rdi; - sf.sf_uc.uc_mcontext.mc_esi = regs->tf_rsi; - sf.sf_uc.uc_mcontext.mc_ebp = regs->tf_rbp; - sf.sf_uc.uc_mcontext.mc_isp = regs->tf_rsp; /* XXX */ - sf.sf_uc.uc_mcontext.mc_ebx = regs->tf_rbx; - sf.sf_uc.uc_mcontext.mc_edx = regs->tf_rdx; - sf.sf_uc.uc_mcontext.mc_ecx = regs->tf_rcx; - sf.sf_uc.uc_mcontext.mc_eax = regs->tf_rax; - sf.sf_uc.uc_mcontext.mc_trapno = regs->tf_trapno; - sf.sf_uc.uc_mcontext.mc_err = regs->tf_err; - sf.sf_uc.uc_mcontext.mc_eip = regs->tf_rip; - sf.sf_uc.uc_mcontext.mc_cs = regs->tf_cs; - sf.sf_uc.uc_mcontext.mc_eflags = regs->tf_rflags; - sf.sf_uc.uc_mcontext.mc_esp = regs->tf_rsp; - sf.sf_uc.uc_mcontext.mc_ss = regs->tf_ss; - - /* Allocate space for the signal handler context. */ - if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack && - SIGISMEMBER(psp->ps_sigonstack, sig)) { - sfp = (struct ia32_sigframe4 *)(p->p_sigstk.ss_sp + - p->p_sigstk.ss_size - sizeof(sf)); - } else - sfp = (struct ia32_sigframe4 *)regs->tf_rsp - 1; - PROC_UNLOCK(p); - - /* Translate the signal if appropriate. */ - if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; - - /* Build the argument list for the signal handler. */ - sf.sf_signum = sig; - sf.sf_ucontext = (register_t)&sfp->sf_uc; - PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { - /* Signal handler installed with SA_SIGINFO. */ - sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; - sf.sf_ah = (u_int32_t)(uintptr_t)catcher; - - /* Fill in POSIX parts */ - sf.sf_si.si_signo = sig; - sf.sf_si.si_code = code; - sf.sf_si.si_addr = regs->tf_addr; - } else { - /* Old FreeBSD-style arguments. */ - sf.sf_siginfo = code; - sf.sf_addr = regs->tf_addr; - sf.sf_ah = (u_int32_t)(uintptr_t)catcher; - } - PROC_UNLOCK(p); - - /* - * Copy the sigframe out to the user's stack. - */ - if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { -#ifdef DEBUG - printf("process %ld has trashed its stack\n", (long)p->p_pid); -#endif - PROC_LOCK(p); - sigexit(td, SIGILL); - } - - regs->tf_rsp = (uintptr_t)sfp; - regs->tf_rip = PS_STRINGS - sz_freebsd4_ia32_sigcode; - regs->tf_rflags &= ~PSL_T; - regs->tf_cs = _ucode32sel; - regs->tf_ss = _udatasel; - load_ds(_udatasel); - load_es(_udatasel); - load_fs(_udatasel); - PROC_LOCK(p); -} -#endif /* COMPAT_FREEBSD4 */ - -static void -ia32_sendsig(catcher, sig, mask, code) - sig_t catcher; - int sig; - sigset_t *mask; - u_long code; -{ - struct ia32_sigframe sf, *sfp; - struct proc *p; - struct thread *td; - struct sigacts *psp; - char *sp; - struct trapframe *regs; - int oonstack; - - td = curthread; - p = td->td_proc; - PROC_LOCK_ASSERT(p, MA_OWNED); - psp = p->p_sigacts; -#ifdef COMPAT_FREEBSD4 - if (SIGISMEMBER(psp->ps_freebsd4, sig)) { - freebsd4_ia32_sendsig(catcher, sig, mask, code); - return; - } -#endif - regs = td->td_frame; - oonstack = sigonstack(regs->tf_rsp); - - /* Save user context. */ - bzero(&sf, sizeof(sf)); - sf.sf_uc.uc_sigmask = *mask; - sf.sf_uc.uc_stack.ss_sp = (uintptr_t)p->p_sigstk.ss_sp; - sf.sf_uc.uc_stack.ss_size = p->p_sigstk.ss_size; - sf.sf_uc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK) - ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; - sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - sf.sf_uc.uc_mcontext.mc_gs = rgs(); - sf.sf_uc.uc_mcontext.mc_fs = rfs(); - __asm __volatile("movl %%es,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_es)); - __asm __volatile("movl %%ds,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_ds)); - sf.sf_uc.uc_mcontext.mc_edi = regs->tf_rdi; - sf.sf_uc.uc_mcontext.mc_esi = regs->tf_rsi; - sf.sf_uc.uc_mcontext.mc_ebp = regs->tf_rbp; - sf.sf_uc.uc_mcontext.mc_isp = regs->tf_rsp; /* XXX */ - sf.sf_uc.uc_mcontext.mc_ebx = regs->tf_rbx; - sf.sf_uc.uc_mcontext.mc_edx = regs->tf_rdx; - sf.sf_uc.uc_mcontext.mc_ecx = regs->tf_rcx; - sf.sf_uc.uc_mcontext.mc_eax = regs->tf_rax; - sf.sf_uc.uc_mcontext.mc_trapno = regs->tf_trapno; - sf.sf_uc.uc_mcontext.mc_err = regs->tf_err; - sf.sf_uc.uc_mcontext.mc_eip = regs->tf_rip; - sf.sf_uc.uc_mcontext.mc_cs = regs->tf_cs; - sf.sf_uc.uc_mcontext.mc_eflags = regs->tf_rflags; - sf.sf_uc.uc_mcontext.mc_esp = regs->tf_rsp; - sf.sf_uc.uc_mcontext.mc_ss = regs->tf_ss; - sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ - ia32_get_fpcontext(td, &sf.sf_uc.uc_mcontext); - fpstate_drop(td); - - /* Allocate space for the signal handler context. */ - if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack && - SIGISMEMBER(psp->ps_sigonstack, sig)) { - sp = p->p_sigstk.ss_sp + - p->p_sigstk.ss_size - sizeof(sf); - } else - sp = (char *)regs->tf_rsp - sizeof(sf); - /* Align to 16 bytes. */ - sfp = (struct ia32_sigframe *)((uintptr_t)sp & ~0xF); - PROC_UNLOCK(p); - - /* Translate the signal if appropriate. */ - if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; - - /* Build the argument list for the signal handler. */ - sf.sf_signum = sig; - sf.sf_ucontext = (register_t)&sfp->sf_uc; - PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { - /* Signal handler installed with SA_SIGINFO. */ - sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; - sf.sf_ah = (u_int32_t)(uintptr_t)catcher; - - /* Fill in POSIX parts */ - sf.sf_si.si_signo = sig; - sf.sf_si.si_code = code; - sf.sf_si.si_addr = regs->tf_addr; - } else { - /* Old FreeBSD-style arguments. */ - sf.sf_siginfo = code; - sf.sf_addr = regs->tf_err; - sf.sf_ah = (u_int32_t)(uintptr_t)catcher; - } - PROC_UNLOCK(p); - - /* - * Copy the sigframe out to the user's stack. - */ - if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { -#ifdef DEBUG - printf("process %ld has trashed its stack\n", (long)p->p_pid); -#endif - PROC_LOCK(p); - sigexit(td, SIGILL); - } - - regs->tf_rsp = (uintptr_t)sfp; - regs->tf_rip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); - regs->tf_rflags &= ~PSL_T; - regs->tf_cs = _ucode32sel; - regs->tf_ss = _udatasel; - load_ds(_udatasel); - load_es(_udatasel); - load_fs(_udatasel); - PROC_LOCK(p); -} - -/* - * System call to cleanup state after a signal - * has been taken. Reset signal mask and - * stack state from context left by sendsig (above). - * Return to previous pc and psl as specified by - * context left by sendsig. Check carefully to - * make sure that the user has not modified the - * state to gain improper privileges. - */ -#ifdef COMPAT_FREEBSD4 -/* - * MPSAFE - */ -int -freebsd4_ia32_sigreturn(td, uap) - struct thread *td; - struct freebsd4_ia32_sigreturn_args /* { - const struct freebsd4_ucontext *sigcntxp; - } */ *uap; -{ - struct ia32_ucontext4 uc; - struct proc *p = td->td_proc; - struct trapframe *regs; - const struct ia32_ucontext4 *ucp; - int cs, eflags, error; - - error = copyin(uap->sigcntxp, &uc, sizeof(uc)); - if (error != 0) - return (error); - ucp = &uc; - regs = td->td_frame; - eflags = ucp->uc_mcontext.mc_eflags; - /* - * Don't allow users to change privileged or reserved flags. - */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { - printf("freebsd4_ia32_sigreturn: eflags = 0x%x\n", eflags); - return (EINVAL); - } - - /* - * Don't allow users to load a valid privileged %cs. Let the - * hardware check for invalid selectors, excess privilege in - * other selectors, invalid %eip's and invalid %esp's. - */ - cs = ucp->uc_mcontext.mc_cs; - if (!CS_SECURE(cs)) { - printf("freebsd4_sigreturn: cs = 0x%x\n", cs); - trapsignal(td, SIGBUS, T_PROTFLT); - return (EINVAL); - } - - /* mc_gs is done by sigtramp.S */ - load_fs(ucp->uc_mcontext.mc_fs); - load_es(ucp->uc_mcontext.mc_es); - load_ds(ucp->uc_mcontext.mc_ds); - regs->tf_rdi = ucp->uc_mcontext.mc_edi; - regs->tf_rsi = ucp->uc_mcontext.mc_esi; - regs->tf_rbp = ucp->uc_mcontext.mc_ebp; - regs->tf_rbx = ucp->uc_mcontext.mc_ebx; - regs->tf_rdx = ucp->uc_mcontext.mc_edx; - regs->tf_rcx = ucp->uc_mcontext.mc_ecx; - regs->tf_rax = ucp->uc_mcontext.mc_eax; - regs->tf_trapno = ucp->uc_mcontext.mc_trapno; - regs->tf_err = ucp->uc_mcontext.mc_err; - regs->tf_rip = ucp->uc_mcontext.mc_eip; - regs->tf_cs = cs; - regs->tf_rflags = ucp->uc_mcontext.mc_eflags; - regs->tf_rsp = ucp->uc_mcontext.mc_esp; - regs->tf_ss = ucp->uc_mcontext.mc_ss; - - PROC_LOCK(p); - td->td_sigmask = ucp->uc_sigmask; - SIG_CANTMASK(td->td_sigmask); - signotify(td); - PROC_UNLOCK(p); - return (EJUSTRETURN); -} -#endif /* COMPAT_FREEBSD4 */ - -/* - * MPSAFE - */ -int -ia32_sigreturn(td, uap) - struct thread *td; - struct ia32_sigreturn_args /* { - const struct ia32_ucontext *sigcntxp; - } */ *uap; -{ - struct ia32_ucontext uc; - struct proc *p = td->td_proc; - struct trapframe *regs; - const struct ia32_ucontext *ucp; - int cs, eflags, error, ret; - - error = copyin(uap->sigcntxp, &uc, sizeof(uc)); - if (error != 0) - return (error); - ucp = &uc; - regs = td->td_frame; - eflags = ucp->uc_mcontext.mc_eflags; - /* - * Don't allow users to change privileged or reserved flags. - */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { - printf("ia32_sigreturn: eflags = 0x%x\n", eflags); - return (EINVAL); - } - - /* - * Don't allow users to load a valid privileged %cs. Let the - * hardware check for invalid selectors, excess privilege in - * other selectors, invalid %eip's and invalid %esp's. - */ - cs = ucp->uc_mcontext.mc_cs; - if (!CS_SECURE(cs)) { - printf("sigreturn: cs = 0x%x\n", cs); - trapsignal(td, SIGBUS, T_PROTFLT); - return (EINVAL); - } - - ret = ia32_set_fpcontext(td, &ucp->uc_mcontext); - if (ret != 0) - return (ret); - - /* mc_gs is done by sigtramp.S */ - load_fs(ucp->uc_mcontext.mc_fs); - load_es(ucp->uc_mcontext.mc_es); - load_ds(ucp->uc_mcontext.mc_ds); - regs->tf_rdi = ucp->uc_mcontext.mc_edi; - regs->tf_rsi = ucp->uc_mcontext.mc_esi; - regs->tf_rbp = ucp->uc_mcontext.mc_ebp; - regs->tf_rbx = ucp->uc_mcontext.mc_ebx; - regs->tf_rdx = ucp->uc_mcontext.mc_edx; - regs->tf_rcx = ucp->uc_mcontext.mc_ecx; - regs->tf_rax = ucp->uc_mcontext.mc_eax; - regs->tf_trapno = ucp->uc_mcontext.mc_trapno; - regs->tf_err = ucp->uc_mcontext.mc_err; - regs->tf_rip = ucp->uc_mcontext.mc_eip; - regs->tf_cs = cs; - regs->tf_rflags = ucp->uc_mcontext.mc_eflags; - regs->tf_rsp = ucp->uc_mcontext.mc_esp; - regs->tf_ss = ucp->uc_mcontext.mc_ss; - - PROC_LOCK(p); - td->td_sigmask = ucp->uc_sigmask; - SIG_CANTMASK(td->td_sigmask); - signotify(td); - PROC_UNLOCK(p); - return (EJUSTRETURN); } ==== //depot/projects/hammer/sys/conf/files.amd64#11 (text+ko) ==== @@ -80,6 +80,7 @@ amd64/ia32/ia32_misc.c optional ia32 amd64/ia32/ia32_sysent.c optional ia32 amd64/ia32/ia32_sysvec.c optional ia32 +amd64/ia32/ia32_signal.c optional ia32 amd64/ia32/ia32_sigtramp.S optional ia32 kern/imgact_elf32.c optional ia32 From owner-p4-projects@FreeBSD.ORG Tue May 13 19:38:47 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A5B6537B404; Tue, 13 May 2003 19:38:46 -0700 (PDT) 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 2E30537B401 for ; Tue, 13 May 2003 19:38:46 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCBF643F93 for ; Tue, 13 May 2003 19:38:45 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E2cj0U070352 for ; Tue, 13 May 2003 19:38:45 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E2cjpp070349 for perforce@freebsd.org; Tue, 13 May 2003 19:38:45 -0700 (PDT) Date: Tue, 13 May 2003 19:38:45 -0700 (PDT) Message-Id: <200305140238.h4E2cjpp070349@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31115 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 02:38:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=31115 Change 31115 by peter@peter_hammer on 2003/05/13 19:38:39 In theory, the user segment registers are never used while in long mode. But I dont want to have to check during an iret to 32 bit compatability mode, so let the sigtramp itself restore the segment selectors rather than messing with them in the kernel. Affected files ... .. //depot/projects/hammer/sys/amd64/ia32/ia32_genassym.c#2 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_signal.c#2 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_sigtramp.S#2 edit Differences ... ==== //depot/projects/hammer/sys/amd64/ia32/ia32_genassym.c#2 (text+ko) ==== @@ -5,13 +5,20 @@ #include #include #include +#include #include ASSYM(IA32_SIGF_HANDLER, offsetof(struct ia32_sigframe, sf_ah)); ASSYM(IA32_SIGF_UC, offsetof(struct ia32_sigframe, sf_uc)); ASSYM(IA32_UC_GS, offsetof(struct ia32_ucontext, uc_mcontext.mc_gs)); +ASSYM(IA32_UC_FS, offsetof(struct ia32_ucontext, uc_mcontext.mc_fs)); +ASSYM(IA32_UC_ES, offsetof(struct ia32_ucontext, uc_mcontext.mc_es)); +ASSYM(IA32_UC_DS, offsetof(struct ia32_ucontext, uc_mcontext.mc_ds)); #ifdef COMPAT_FREEBSD4 ASSYM(IA32_SIGF_UC4, offsetof(struct ia32_sigframe, sf_uc)); ASSYM(IA32_UC4_GS, offsetof(struct ia32_ucontext4, uc_mcontext.mc_gs)); +ASSYM(IA32_UC4_FS, offsetof(struct ia32_ucontext4, uc_mcontext.mc_fs)); +ASSYM(IA32_UC4_ES, offsetof(struct ia32_ucontext4, uc_mcontext.mc_es)); +ASSYM(IA32_UC4_DS, offsetof(struct ia32_ucontext4, uc_mcontext.mc_ds)); #endif ==== //depot/projects/hammer/sys/amd64/ia32/ia32_signal.c#2 (text+ko) ==== @@ -268,8 +268,10 @@ regs->tf_cs = _ucode32sel; regs->tf_ss = _udatasel; load_ds(_udatasel); + td->td_pcb->pcb_ds = _udatasel; load_es(_udatasel); - load_fs(_udatasel); + td->td_pcb->pcb_es = _udatasel; + /* leave user %fs and %gs untouched */ PROC_LOCK(p); } #endif /* COMPAT_FREEBSD4 */ @@ -382,8 +384,10 @@ regs->tf_cs = _ucode32sel; regs->tf_ss = _udatasel; load_ds(_udatasel); + td->td_pcb->pcb_ds = _udatasel; load_es(_udatasel); - load_fs(_udatasel); + td->td_pcb->pcb_es = _udatasel; + /* leave user %fs and %gs untouched */ PROC_LOCK(p); } @@ -449,10 +453,7 @@ return (EINVAL); } - /* mc_gs is done by sigtramp.S */ - load_fs(ucp->uc_mcontext.mc_fs); - load_es(ucp->uc_mcontext.mc_es); - load_ds(ucp->uc_mcontext.mc_ds); + /* Segment selectors restored by sigtramp.S */ regs->tf_rdi = ucp->uc_mcontext.mc_edi; regs->tf_rsi = ucp->uc_mcontext.mc_esi; regs->tf_rbp = ucp->uc_mcontext.mc_ebp; @@ -533,10 +534,7 @@ if (ret != 0) return (ret); - /* mc_gs is done by sigtramp.S */ - load_fs(ucp->uc_mcontext.mc_fs); - load_es(ucp->uc_mcontext.mc_es); - load_ds(ucp->uc_mcontext.mc_ds); + /* Segment selectors restored by sigtramp.S */ regs->tf_rdi = ucp->uc_mcontext.mc_edi; regs->tf_rsi = ucp->uc_mcontext.mc_esi; regs->tf_rbp = ucp->uc_mcontext.mc_ebp; ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sigtramp.S#2 (text+ko) ==== @@ -62,6 +62,9 @@ leal IA32_SIGF_UC(%esp),%eax /* get ucontext */ pushl %eax movl IA32_UC_GS(%eax),%gs /* restore %gs */ + movl IA32_UC_FS(%eax),%fs /* restore %fs */ + movl IA32_UC_ES(%eax),%es /* restore %es */ + movl IA32_UC_DS(%eax),%ds /* restore %ds */ movl $SYS_sigreturn,%eax pushl %eax /* junk to fake return addr. */ int $0x80 /* enter kernel with args */ @@ -76,6 +79,9 @@ leal IA32_SIGF_UC4(%esp),%eax/* get ucontext */ pushl %eax movl IA32_UC4_GS(%eax),%gs /* restore %gs */ + movl IA32_UC4_FS(%eax),%fs /* restore %fs */ + movl IA32_UC4_ES(%eax),%es /* restore %es */ + movl IA32_UC4_DS(%eax),%ds /* restore %ds */ movl $344,%eax /* 4.x SYS_sigreturn */ pushl %eax /* junk to fake return addr. */ int $0x80 /* enter kernel with args */ From owner-p4-projects@FreeBSD.ORG Tue May 13 20:18:37 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2133537B404; Tue, 13 May 2003 20:18:37 -0700 (PDT) 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 A7DD837B401 for ; Tue, 13 May 2003 20:18:36 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CBE543F3F for ; Tue, 13 May 2003 20:18:36 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E3Ia0U072998 for ; Tue, 13 May 2003 20:18:36 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E3IZYq072995 for perforce@freebsd.org; Tue, 13 May 2003 20:18:35 -0700 (PDT) Date: Tue, 13 May 2003 20:18:35 -0700 (PDT) Message-Id: <200305140318.h4E3IZYq072995@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31118 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 03:18:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=31118 Change 31118 by peter@peter_hammer on 2003/05/13 20:17:52 Move int0x80 handler into the i386 emulator support code. Note, if you have any old-style binaries that use int $0x80 still, it would be a really good thing to recompile them before booting this kernel. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/exception.S#12 edit .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#32 edit .. //depot/projects/hammer/sys/amd64/amd64/trap.c#15 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_exception.S#1 add .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.c#1 add .. //depot/projects/hammer/sys/conf/files.amd64#12 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#12 (text+ko) ==== @@ -218,40 +218,6 @@ jmp alltraps_pushregs_no_rdi /* - * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) - * - * This is a SDT_SYSIDT entry point (unlike the i386 port) so that we - * can do a swapgs before enabling interrupts. This is critical because - * if we took an interrupt before swapgs, the interrupt code would see - * that it originated in supervisor mode and skip the swapgs. - */ - SUPERALIGN_TEXT -IDTVEC(int0x80_syscall) - swapgs - sti - pushq $2 /* sizeof "int 0x80" */ - subq $TF_ERR,%rsp /* skip over tf_trapno */ - movq %rdi,TF_RDI(%rsp) - movq %rsi,TF_RSI(%rsp) - movq %rdx,TF_RDX(%rsp) - movq %rcx,TF_RCX(%rsp) - movq %r8,TF_R8(%rsp) - movq %r9,TF_R9(%rsp) - movq %rax,TF_RAX(%rsp) - movq %rbx,TF_RBX(%rsp) - movq %rbp,TF_RBP(%rsp) - movq %r10,TF_R10(%rsp) - movq %r11,TF_R11(%rsp) - movq %r12,TF_R12(%rsp) - movq %r13,TF_R13(%rsp) - movq %r14,TF_R14(%rsp) - movq %r15,TF_R15(%rsp) - FAKE_MCOUNT(13*4(%rsp)) - call ia32_syscall - MEXITCOUNT - jmp doreti - -/* * Fast syscall entry point. We enter here with just our new %cs/%ss set, * and the new privilige level. We are still running on the old user stack * pointer. We have to juggle a few things around to find our stack etc. @@ -353,6 +319,7 @@ */ .text SUPERALIGN_TEXT + .globl doreti .type doreti,@function doreti: FAKE_MCOUNT(bintr) /* init "from" bintr -> doreti */ ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#32 (text+ko) ==== @@ -683,7 +683,7 @@ IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm), IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot), IDTVEC(page), IDTVEC(mchk), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), - IDTVEC(xmm), IDTVEC(dblfault), IDTVEC(int0x80_syscall), + IDTVEC(xmm), IDTVEC(dblfault), IDTVEC(fast_syscall), IDTVEC(fast_syscall32); void @@ -1254,7 +1254,6 @@ setidt(17, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0); setidt(18, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0); setidt(19, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0); - setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0); r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (long) idt; ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#15 (text+ko) ==== @@ -817,174 +817,3 @@ mtx_assert(&sched_lock, MA_NOTOWNED); mtx_assert(&Giant, MA_NOTOWNED); } - -void ia32_syscall(struct trapframe frame); -void -ia32_syscall(struct trapframe frame) -{ - caddr_t params; - int i; - struct sysent *callp; - struct thread *td = curthread; - struct proc *p = td->td_proc; - register_t orig_tf_rflags; - u_int sticks; - int error; - int narg; - u_int32_t args[8]; - u_int64_t args64[8]; - u_int code; - - /* - * note: PCPU_LAZY_INC() can only be used if we can afford - * occassional inaccuracy in the count. - */ - cnt.v_syscall++; - - sticks = td->td_sticks; - td->td_frame = &frame; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); - params = (caddr_t)frame.tf_rsp + sizeof(u_int32_t); - code = frame.tf_rax; - orig_tf_rflags = frame.tf_rflags; - - if (p->p_sysent->sv_prepsyscall) { - /* - * The prep code is MP aware. - */ - (*p->p_sysent->sv_prepsyscall)(&frame, args, &code, ¶ms); - } else { - /* - * Need to check if this is a 32 bit or 64 bit syscall. - * fuword is MP aware. - */ - if (code == SYS_syscall) { - /* - * Code is first argument, followed by actual args. - */ - code = fuword32(params); - params += sizeof(int); - } else if (code == SYS___syscall) { - /* - * Like syscall, but code is a quad, so as to maintain - * quad alignment for the rest of the arguments. - * We use a 32-bit fetch in case params is not - * aligned. - */ - code = fuword32(params); - params += sizeof(quad_t); - } - } - - if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; - - if (code >= p->p_sysent->sv_size) - callp = &p->p_sysent->sv_table[0]; - else - callp = &p->p_sysent->sv_table[code]; - - narg = callp->sy_narg & SYF_ARGMASK; - - /* - * copyin and the ktrsyscall()/ktrsysret() code is MP-aware - */ - if (params != NULL && narg != 0) - error = copyin(params, (caddr_t)args, - (u_int)(narg * sizeof(int))); - else - error = 0; - - for (i = 0; i < narg; i++) - args64[i] = args[i]; - -#ifdef KTRACE - if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(code, narg, args64); -#endif - /* - * Try to run the syscall without Giant if the syscall - * is MP safe. - */ - if ((callp->sy_narg & SYF_MPSAFE) == 0) - mtx_lock(&Giant); - - if (error == 0) { - td->td_retval[0] = 0; - td->td_retval[1] = frame.tf_rdx; - - STOPEVENT(p, S_SCE, narg); - - error = (*callp->sy_call)(td, args64); - } - - switch (error) { - case 0: - frame.tf_rax = td->td_retval[0]; - frame.tf_rdx = td->td_retval[1]; - frame.tf_rflags &= ~PSL_C; - break; - - case ERESTART: - /* - * Reconstruct pc, assuming lcall $X,y is 7 bytes, - * int 0x80 is 2 bytes. We saved this in tf_err. - */ - frame.tf_rip -= frame.tf_err; - break; - - case EJUSTRETURN: - break; - - default: - if (p->p_sysent->sv_errsize) { - if (error >= p->p_sysent->sv_errsize) - error = -1; /* XXX */ - else - error = p->p_sysent->sv_errtbl[error]; - } - frame.tf_rax = error; - frame.tf_rflags |= PSL_C; - break; - } - - /* - * Release Giant if we previously set it. - */ - if ((callp->sy_narg & SYF_MPSAFE) == 0) - mtx_unlock(&Giant); - - /* - * Traced syscall. - */ - if (orig_tf_rflags & PSL_T) { - frame.tf_rflags &= ~PSL_T; - trapsignal(td, SIGTRAP, 0); - } - - /* - * Handle reschedule and other end-of-syscall issues - */ - userret(td, &frame, sticks); - -#ifdef KTRACE - if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(code, error, td->td_retval[0]); -#endif - - /* - * This works because errno is findable through the - * register set. If we ever support an emulation where this - * is not the case, this code will need to be revisited. - */ - STOPEVENT(p, S_SCX, code); - -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); - mtx_assert(&sched_lock, MA_NOTOWNED); - mtx_assert(&Giant, MA_NOTOWNED); -} ==== //depot/projects/hammer/sys/conf/files.amd64#12 (text+ko) ==== @@ -82,6 +82,8 @@ amd64/ia32/ia32_sysvec.c optional ia32 amd64/ia32/ia32_signal.c optional ia32 amd64/ia32/ia32_sigtramp.S optional ia32 +amd64/ia32/ia32_exception.S optional ia32 +amd64/ia32/ia32_syscall.c optional ia32 kern/imgact_elf32.c optional ia32 # This file tells config what files go into building a kernel, From owner-p4-projects@FreeBSD.ORG Tue May 13 20:19:39 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D686837B404; Tue, 13 May 2003 20:19:38 -0700 (PDT) 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 879E837B401 for ; Tue, 13 May 2003 20:19:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BF2E43F75 for ; Tue, 13 May 2003 20:19:38 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E3Jb0U073029 for ; Tue, 13 May 2003 20:19:37 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E3JbxP073026 for perforce@freebsd.org; Tue, 13 May 2003 20:19:37 -0700 (PDT) Date: Tue, 13 May 2003 20:19:37 -0700 (PDT) Message-Id: <200305140319.h4E3JbxP073026@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31119 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 03:19:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=31119 Change 31119 by peter@peter_hammer on 2003/05/13 20:19:09 Just allow all 256 IDT slots. We are not that short of memory and the APIC code will use it shortly anyway. Affected files ... .. //depot/projects/hammer/sys/amd64/include/segments.h#7 edit Differences ... ==== //depot/projects/hammer/sys/amd64/include/segments.h#7 (text+ko) ==== @@ -166,7 +166,7 @@ /* * Size of IDT table */ -#define NIDT 129 /* 32 reserved, 16 h/w, 0 s/w, linux's 0x80 */ +#define NIDT 256 /* 32 reserved, 16 h/w, 0 s/w, linux's 0x80 */ #define NRSVIDT 32 /* reserved entries for cpu exceptions */ /* From owner-p4-projects@FreeBSD.ORG Tue May 13 20:28:53 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E461737B404; Tue, 13 May 2003 20:28:52 -0700 (PDT) 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 7FBAE37B401 for ; Tue, 13 May 2003 20:28:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A8AC43F3F for ; Tue, 13 May 2003 20:28:51 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E3Sp0U073687 for ; Tue, 13 May 2003 20:28:51 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E3SoGr073684 for perforce@freebsd.org; Tue, 13 May 2003 20:28:50 -0700 (PDT) Date: Tue, 13 May 2003 20:28:50 -0700 (PDT) Message-Id: <200305140328.h4E3SoGr073684@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31121 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 03:28:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=31121 Change 31121 by peter@peter_daintree on 2003/05/13 20:28:11 IFC @31120 Affected files ... .. //depot/projects/hammer/crypto/openssh/log.h#4 integrate .. //depot/projects/hammer/lib/libc/sys/stat.2#3 integrate .. //depot/projects/hammer/lib/libwrap/Makefile#3 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#18 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#23 integrate .. //depot/projects/hammer/sbin/bsdlabel/bsdlabel.c#6 integrate .. //depot/projects/hammer/sbin/ifconfig/ifconfig.8#8 integrate .. //depot/projects/hammer/sbin/mount_nfs/mount_nfs.c#6 integrate .. //depot/projects/hammer/share/man/man4/agp.4#2 integrate .. //depot/projects/hammer/share/man/man4/dc.4#3 integrate .. //depot/projects/hammer/share/man/man4/man4.i386/gsc.4#2 integrate .. //depot/projects/hammer/share/man/man8/Makefile#4 integrate .. //depot/projects/hammer/sys/alpha/alpha/machdep.c#11 integrate .. //depot/projects/hammer/sys/alpha/osf1/osf1_signal.c#9 integrate .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#33 integrate .. //depot/projects/hammer/sys/amd64/ia32/Makefile#2 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32.h#2 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#4 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#4 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#4 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#4 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#4 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_util.h#2 integrate .. //depot/projects/hammer/sys/amd64/ia32/syscalls.conf#2 integrate .. //depot/projects/hammer/sys/amd64/ia32/syscalls.master#4 integrate .. //depot/projects/hammer/sys/compat/linprocfs/linprocfs.c#9 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_filio.c#6 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_misc.c#5 integrate .. //depot/projects/hammer/sys/dev/acpica/Osd/OsdHardware.c#4 integrate .. //depot/projects/hammer/sys/dev/acpica/acpivar.h#8 integrate .. //depot/projects/hammer/sys/geom/geom_disk.c#11 integrate .. //depot/projects/hammer/sys/i386/acpica/acpi_machdep.c#7 integrate .. //depot/projects/hammer/sys/i386/acpica/acpi_wakeup.c#7 integrate .. //depot/projects/hammer/sys/i386/i386/machdep.c#15 integrate .. //depot/projects/hammer/sys/i386/linux/linux_sysvec.c#9 integrate .. //depot/projects/hammer/sys/i386/svr4/svr4_machdep.c#5 integrate .. //depot/projects/hammer/sys/ia64/ia64/machdep.c#12 integrate .. //depot/projects/hammer/sys/kern/init_main.c#12 integrate .. //depot/projects/hammer/sys/kern/kern_condvar.c#9 integrate .. //depot/projects/hammer/sys/kern/kern_exec.c#10 integrate .. //depot/projects/hammer/sys/kern/kern_exit.c#14 integrate .. //depot/projects/hammer/sys/kern/kern_fork.c#16 integrate .. //depot/projects/hammer/sys/kern/kern_kthread.c#6 integrate .. //depot/projects/hammer/sys/kern/kern_proc.c#16 integrate .. //depot/projects/hammer/sys/kern/kern_sig.c#14 integrate .. //depot/projects/hammer/sys/kern/kern_synch.c#16 integrate .. //depot/projects/hammer/sys/kern/kern_time.c#6 integrate .. //depot/projects/hammer/sys/kern/subr_trap.c#12 integrate .. //depot/projects/hammer/sys/kern/tty.c#7 integrate .. //depot/projects/hammer/sys/kern/tty_pty.c#4 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#16 integrate .. //depot/projects/hammer/sys/modules/Makefile#17 integrate .. //depot/projects/hammer/sys/netncp/ncp_ncp.c#6 integrate .. //depot/projects/hammer/sys/netsmb/smb_subr.c#6 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_socket.c#7 integrate .. //depot/projects/hammer/sys/pc98/i386/machdep.c#13 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/machdep.c#14 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/machdep.c#18 integrate .. //depot/projects/hammer/sys/sys/proc.h#22 integrate .. //depot/projects/hammer/sys/sys/signalvar.h#6 integrate .. //depot/projects/hammer/sys/sys/user.h#7 integrate .. //depot/projects/hammer/sys/vm/vm_glue.c#15 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/install.c#9 integrate Differences ... ==== //depot/projects/hammer/crypto/openssh/log.h#4 (text+ko) ==== @@ -1,5 +1,5 @@ /* $OpenBSD: log.h,v 1.8 2002/07/19 15:43:33 markus Exp $ */ -/* $FreeBSD: src/crypto/openssh/log.h,v 1.2 2003/05/12 19:22:47 des Exp $ */ +/* $FreeBSD: src/crypto/openssh/log.h,v 1.3 2003/05/13 10:18:49 des Exp $ */ /* * Author: Tatu Ylonen @@ -62,13 +62,13 @@ #define debug2 ssh_debug2 #define debug3 ssh_debug3 -void ssh_fatal(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_error(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_log(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_verbose(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_debug(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_debug2(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_debug3(const char *, ...) __attribute__((format(printf, 1, 2))); +void fatal(const char *, ...) __attribute__((format(printf, 1, 2))); +void error(const char *, ...) __attribute__((format(printf, 1, 2))); +void log(const char *, ...) __attribute__((format(printf, 1, 2))); +void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); void fatal_cleanup(void); void fatal_add_cleanup(void (*) (void *), void *); ==== //depot/projects/hammer/lib/libc/sys/stat.2#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 -.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.31 2002/12/19 09:40:25 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.32 2003/05/13 08:10:05 dougb Exp $ .\" .Dd February 15, 2002 .Dt STAT 2 @@ -85,36 +85,7 @@ structure as defined by .Aq Pa sys/stat.h -(shown below) and into which information is placed concerning the file. -.Bd -literal -struct stat { - dev_t st_dev; /* inode's device */ - ino_t st_ino; /* inode's number */ - mode_t st_mode; /* inode protection mode */ - nlink_t st_nlink; /* number of hard links */ - uid_t st_uid; /* user ID of the file's owner */ - gid_t st_gid; /* group ID of the file's group */ - dev_t st_rdev; /* device type */ -#ifndef _POSIX_SOURCE - struct timespec st_atimespec; /* time of last access */ - struct timespec st_mtimespec; /* time of last data modification */ - struct timespec st_ctimespec; /* time of last file status change */ -#else - time_t st_atime; /* time of last access */ - long st_atimensec; /* nsec of last access */ - time_t st_mtime; /* time of last data modification */ - long st_mtimensec; /* nsec of last data modification */ - time_t st_ctime; /* time of last file status change */ - long st_ctimensec; /* nsec of last file status change */ -#endif - off_t st_size; /* file size, in bytes */ - int64_t st_blocks; /* blocks allocated for file */ - u_int32_t st_blksize; /* optimal blocksize for I/O */ - fflags_t st_flags; /* user defined flags for file */ - u_int32_t st_gen; /* file generation number */ -}; -.Ed .Pp The time-related fields of .Fa struct stat @@ -149,6 +120,8 @@ and .Xr write 2 system calls. +.It st_birthtime +Time when the inode was created. .El .Pp If ==== //depot/projects/hammer/lib/libwrap/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/lib/libwrap/Makefile,v 1.11 2002/09/28 00:25:32 peter Exp $ +# $FreeBSD: src/lib/libwrap/Makefile,v 1.12 2003/05/12 21:59:16 hmp Exp $ # MAINTAINER=markm@FreeBSD.org @@ -9,6 +9,8 @@ INCS= tcpd.h MAN= hosts_access.3 MAN+= hosts_access.5 hosts_options.5 +MLINKS= hosts_access.3 hosts_ctl.3 hosts_access.3 request_init.3 \ + hosts_access.3 request_set.3 .PATH: ${.CURDIR}/../../contrib/tcp_wrappers ==== //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#18 (text+ko) ==== @@ -31,7 +31,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.148 2003/05/10 16:30:56 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.149 2003/05/13 18:15:28 bmah Exp $ Supported Devices @@ -834,6 +834,8 @@ + IBM / Adaptec ServeRAID series (ips driver) + LSI Logic Fusion/MP architecture Fiber Channel controllers (mpt driver) ==== //depot/projects/hammer/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#23 (text+ko) ==== @@ -3,7 +3,7 @@ The FreeBSD Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.566 2003/05/08 22:31:00 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.567 2003/05/13 18:15:28 bmah Exp $ 2000 @@ -439,6 +439,9 @@ believed to fix problems detecting attached disks during installation. + The ips driver, which supports the IBM (now + Adaptec) ServeRAID series, has been added. + A bug in the &man.mly.4; driver that caused hangs has been corrected. ==== //depot/projects/hammer/sbin/bsdlabel/bsdlabel.c#6 (text+ko) ==== @@ -54,7 +54,7 @@ #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/sbin/bsdlabel/bsdlabel.c,v 1.92 2003/05/09 20:26:17 phk Exp $"); +__FBSDID("$FreeBSD: src/sbin/bsdlabel/bsdlabel.c,v 1.93 2003/05/13 19:42:52 phk Exp $"); #include #include @@ -165,6 +165,10 @@ labeloffset = 512; bbsize = 8192; alphacksum = 0; + } else if (!strcmp(optarg, "pc98")) { + labeloffset = 512; + bbsize = 8192; + alphacksum = 0; } else if (!strcmp(optarg, "alpha")) { labeloffset = 64; bbsize = 8192; ==== //depot/projects/hammer/sbin/ifconfig/ifconfig.8#8 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 -.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.69 2003/04/28 16:47:40 sam Exp $ +.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.70 2003/05/13 08:29:49 sheldonh Exp $ .\" .Dd April 28, 2003 .Dt IFCONFIG 8 @@ -466,7 +466,7 @@ See the .Ar address option above for more information. -3\" see +.\" see .\" Xr eon 5 . .\" .It Cm nsellength Ar n .\" .Pf ( Tn ISO ==== //depot/projects/hammer/sbin/mount_nfs/mount_nfs.c#6 (text+ko) ==== @@ -46,7 +46,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/sbin/mount_nfs/mount_nfs.c,v 1.60 2003/05/03 18:41:58 obrien Exp $"); +__FBSDID("$FreeBSD: src/sbin/mount_nfs/mount_nfs.c,v 1.61 2003/05/12 19:48:47 trhodes Exp $"); #include #include @@ -264,7 +264,7 @@ nfsargs = nfsdefargs; nfsargsp = &nfsargs; while ((c = getopt(argc, argv, - "23a:bcdD:g:I:iLl:No:PpR:r:sTt:w:x:U")) != -1) + "23a:bcdD:g:I:iLl:No:PR:r:sTt:w:x:U")) != -1) switch (c) { case '2': mountmode = V2; ==== //depot/projects/hammer/share/man/man4/agp.4#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/agp.4,v 1.3 2001/11/19 07:15:45 kuriyama Exp $ +.\" $FreeBSD: src/share/man/man4/agp.4,v 1.4 2003/05/12 21:34:29 hmp Exp $ .\" .Dd October 5, 2001 .Dt AGP 4 @@ -58,6 +58,105 @@ is for running .Xr XFree86 1 on the Intel i81x controllers. +.Sh IOCTLS +The following +.Xr ioctl 2 +operations can be performed on +.Pa /dev/agpgart , +which are defined in +.Aq Pa sys/agpio.h : +.Ss Dv AGPIOC_INFO +Returns state of the +.Nm +system. +The result is a pointer to the following structure: +.Bd -literal +typedef struct _agp_info { + agp_version version; /* version of the driver */ + u_int32_t bridge_id; /* bridge vendor/device */ + u_int32_t agp_mode; /* mode info of bridge */ + off_t aper_base; /* base of aperture */ + size_t aper_size; /* size of aperture */ + size_t pg_total; /* max pages (swap + system) */ + size_t pg_system; /* max pages (system) */ + size_t pg_used; /* current pages used */ +} agp_info; +.Ed +.Ss Dv AGPIOC_ACQUIRE +Acquire control of the AGP chipset for use by this client. +Returns +.Er EBUSY +if the AGP chipset is already acquired by another client. +.Ss Dv AGPIOC_RELEASE +Release control of the AGP chipset. +This does not unbind or free any allocated memory, which is the +responsibility of the client to handle if necessary. +.Ss Dv AGPIOC_SETUP +Enable the AGP hardware with the relevant mode. +This +.Xr ioctl 2 +takes the following structure: +.Bd -literal +typedef struct _agp_setup { + u_int32_t agp_mode; /* mode info of bridge */ +} agp_setup; +.Ed +.Pp +The mode bits are defined in +.Aq Pa sys/agpio.h . +.Ss Dv AGPIOC_ALLOCATE +Allocate physical memory suitable for mapping into the AGP aperture. +This +.Xr ioctl 2 +takes the following structure: +.Bd -literal +typedef struct _agp_allocate { + int key; /* tag of allocation */ + size_t pg_count; /* number of pages */ + u_int32_t type; /* 0 == normal, other devspec */ + u_int32_t physical; /* device specific (some devices + * need a phys address of the + * actual page behind the gatt + * table) */ +} agp_allocate; +.Ed +.Pp +Returns a handle to the allocated memory. +.Ss Dv AGPIOC_DEALLOCATE +Free the previously allocated memory associated with the handle passed. +.Ss Dv AGPIOC_BIND +Bind the allocated memory at given offset with the AGP aperture. +Returns +.Er EINVAL +if the memory is already bound or the offset is not at AGP page boundary. +This +.Xr ioctl 2 +takes the following structure: +.Bd -literal +typedef struct _agp_bind { + int key; /* tag of allocation */ + off_t pg_start; /* starting page to populate */ +} agp_bind; +.Ed +.Pp +The +.Sq tag of allocation , +is the handle returned by +.Dv AGPIOC_ALLOCATE. +.Ss Dv AGPIOC_UNBIND +Unbind memory from the AGP aperture. +Returns +.Er EINVAL +if the memory is not bound. +This +.Xr ioctl +takes the following structure: +.Bd -literal +typedef struct _agp_unbind { + int key; /* tag of allocation */ + u_int32_t priority; /* priority for paging out */ +} agp_unbind; +.Ed .Sh FILES .Bl -tag -width ".Pa /dev/agpgart" -compact .It Pa /dev/agpgart ==== //depot/projects/hammer/share/man/man4/dc.4#3 (text+ko) ==== @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/dc.4,v 1.19 2003/02/15 17:12:53 trhodes Exp $ +.\" $FreeBSD: src/share/man/man4/dc.4,v 1.20 2003/05/12 19:50:21 mbr Exp $ .\" .Dd November 20, 1999 .Dt DC 4 @@ -143,6 +143,8 @@ CNet Pro110B (ASIX AX88140A) .It LinkSys LNE100TX v4.0/4.1 (ADMtek AN985 Centaur-P) +.It +3Com OfficeConnect 10/100B (ADMtek AN985 Centaur-P) .El .Pp The ==== //depot/projects/hammer/share/man/man4/man4.i386/gsc.4#2 (text+ko) ==== @@ -28,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/man4.i386/gsc.4,v 1.22 2002/01/21 12:36:12 mpp Exp $ +.\" $FreeBSD: src/share/man/man4/man4.i386/gsc.4,v 1.23 2003/05/12 21:47:39 hmp Exp $ .\" .Dd January 9, 1995 .Os @@ -110,7 +110,7 @@ shall be reached. With this feature you are able to directly copy the scanner output into a pbm file with -.Xr cat . +.Xr cat 1 . Of course you can obtain a similar effect by using .Xr dd 1 with the driver in ==== //depot/projects/hammer/share/man/man8/Makefile#4 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 -# $FreeBSD: src/share/man/man8/Makefile,v 1.32 2003/03/25 15:07:01 keramida Exp $ +# $FreeBSD: src/share/man/man8/Makefile,v 1.33 2003/05/12 21:52:46 hmp Exp $ MAN= MAKEDEV.8 \ adding_user.8 \ @@ -15,6 +15,7 @@ MLINKS= rc.8 rc.early.8 rc.8 rc.serial.8 rc.8 rc.pccard.8 rc.8 rc.network.8 MLINKS+=rc.8 rc.firewall.8 rc.8 rc.atm.8 rc.8 rc.local.8 rc.8 rc.shutdown.8 +MLINKS+=rc.8 rc.d.8 MLINKS+=yp.8 YP.8 yp.8 NIS.8 yp.8 nis.8 .include ==== //depot/projects/hammer/sys/alpha/alpha/machdep.c#11 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.201 2003/04/25 01:50:28 deischen Exp $ + * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.202 2003/05/13 20:35:56 jhb Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1133,11 +1133,13 @@ td = curthread; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); + psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); + frame = td->td_frame; - oonstack = sigonstack(alpha_pal_rdusp()); fsize = sizeof ksi; rndfsize = ((fsize + 15) / 16) * 16; - psp = p->p_sigacts; + oonstack = sigonstack(alpha_pal_rdusp()); /* * Allocate and validate space for the signal handler @@ -1155,6 +1157,7 @@ #endif } else sip = (osiginfo_t *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -1210,7 +1213,8 @@ frame->tf_regs[FRAME_A0] = sig; frame->tf_regs[FRAME_FLAGS] = 0; /* full restore */ PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) frame->tf_regs[FRAME_A1] = (u_int64_t)sip; else frame->tf_regs[FRAME_A1] = code; @@ -1235,6 +1239,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(alpha_pal_rdusp()); @@ -1276,6 +1281,7 @@ #endif } else sfp = (struct sigframe4 *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* save the floating-point state, if necessary, then copy it. */ @@ -1311,7 +1317,8 @@ frame->tf_regs[FRAME_PC] = PS_STRINGS - szfreebsd4_sigcode; frame->tf_regs[FRAME_A0] = sig; PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { frame->tf_regs[FRAME_A1] = (u_int64_t)&(sfp->sf_si); /* Fill in POSIX parts */ @@ -1343,6 +1350,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); #ifdef COMPAT_FREEBSD4 if (SIGISMEMBER(psp->ps_freebsd4, sig)) { freebsd4_sendsig(catcher, sig, mask, code); @@ -1397,6 +1405,7 @@ #endif } else sfp = (struct sigframe *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* save the floating-point state, if necessary, then copy it. */ @@ -1432,7 +1441,8 @@ frame->tf_regs[FRAME_PC] = PS_STRINGS - szsigcode; frame->tf_regs[FRAME_A0] = sig; PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { frame->tf_regs[FRAME_A1] = (u_int64_t)&(sfp->sf_si); /* Fill in POSIX parts */ ==== //depot/projects/hammer/sys/alpha/osf1/osf1_signal.c#9 (text+ko) ==== @@ -30,7 +30,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.32 2003/04/29 06:33:03 alc Exp $ + * $FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.33 2003/05/13 20:35:56 jhb Exp $ */ #include "opt_compat.h" @@ -471,6 +471,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(alpha_pal_rdusp()); @@ -490,6 +491,7 @@ p->p_sigstk.ss_flags |= SS_ONSTACK; } else sip = (osiginfo_t *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -551,6 +553,7 @@ frame->tf_regs[FRAME_FLAGS] = 0; /* full restore */ alpha_pal_wrusp((unsigned long)sip); PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#33 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.575 2003/05/12 18:37:56 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.576 2003/05/13 20:35:57 jhb Exp $ */ #include "opt_atalk.h" @@ -234,6 +234,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); regs = td->td_frame; oonstack = sigonstack(regs->tf_rsp); @@ -261,7 +262,6 @@ sp = (char *)regs->tf_rsp - sizeof(struct sigframe) - 128; /* Align to 16 bytes. */ sfp = (struct sigframe *)((unsigned long)sp & ~0xF); - PROC_UNLOCK(p); /* Translate the signal if appropriate. */ if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) @@ -270,8 +270,7 @@ /* Build the argument list for the signal handler. */ regs->tf_rdi = sig; /* arg 1 in %rdi */ regs->tf_rdx = (register_t)&sfp->sf_uc; /* arg 3 in %rdx */ - PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ regs->tf_rsi = (register_t)&sfp->sf_si; /* arg 2 in %rsi */ sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; @@ -286,6 +285,7 @@ regs->tf_rcx = regs->tf_addr; /* arg 4 in %rcx */ sf.sf_ahu.sf_handler = catcher; } + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -304,6 +304,7 @@ regs->tf_rflags &= ~PSL_T; regs->tf_cs = _ucodesel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } /* ==== //depot/projects/hammer/sys/amd64/ia32/Makefile#2 (text+ko) ==== @@ -1,6 +1,6 @@ # Makefile for syscall tables # -# $FreeBSD$ +# $FreeBSD: src/sys/amd64/ia32/Makefile,v 1.1 2002/04/10 19:34:51 dfr Exp $ all: @echo "make sysent only" ==== //depot/projects/hammer/sys/amd64/ia32/ia32.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia32/ia32.h,v 1.1 2002/07/20 02:56:10 peter Exp $ + * $FreeBSD: src/sys/amd64/ia32/ia32.h,v 1.1 2002/07/20 02:56:10 peter Exp $ */ #ifndef _IA64_IA32_IA32_H_ ==== //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#4 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia32/ia32_misc.c,v 1.9 2003/04/22 18:23:49 jhb Exp $ + * $FreeBSD: src/sys/amd64/ia32/ia32_misc.c,v 1.9 2003/04/22 18:23:49 jhb Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#4 (text+ko) ==== @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/ia64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp + * created from FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp */ #ifndef _IA32_SYSPROTO_H_ ==== //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#4 (text+ko) ==== @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/ia64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp + * created from FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp */ #define IA32_SYS_syscall 0 ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#4 (text+ko) ==== @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/ia64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp + * created from FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#4 (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/ia64/ia32/ia32_sysvec.c,v 1.2 2002/09/01 21:41:23 jake Exp $ + * $FreeBSD: src/sys/amd64/ia32/ia32_sysvec.c,v 1.2 2002/09/01 21:41:23 jake Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/ia32/ia32_util.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia32/ia32_util.h,v 1.4 2002/12/14 01:56:25 alfred Exp $ + * $FreeBSD: src/sys/amd64/ia32/ia32_util.h,v 1.4 2002/12/14 01:56:25 alfred Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/ia32/syscalls.conf#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/ia64/ia32/syscalls.conf,v 1.1 2002/04/10 19:34:51 dfr Exp $ +# $FreeBSD: src/sys/amd64/ia32/syscalls.conf,v 1.1 2002/04/10 19:34:51 dfr Exp $ sysnames="/dev/null" sysproto="ia32_proto.h" sysproto_h=_IA32_SYSPROTO_H_ ==== //depot/projects/hammer/sys/amd64/ia32/syscalls.master#4 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/ia64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp $ + $FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; ==== //depot/projects/hammer/sys/compat/linprocfs/linprocfs.c#9 (text+ko) ==== @@ -38,7 +38,7 @@ * * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94 * - * $FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.64 2003/04/17 21:58:45 jhb Exp $ + * $FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.65 2003/05/13 20:35:57 jhb Exp $ */ #include @@ -547,6 +547,7 @@ char *state; segsz_t lsize; struct thread *td2; + struct sigacts *ps; int i; PROC_LOCK(p); @@ -653,8 +654,11 @@ * relation to struct proc, so SigBlk is left unimplemented. */ sbuf_printf(sb, "SigBlk:\t%08x\n", 0); /* XXX */ - sbuf_printf(sb, "SigIgn:\t%08x\n", p->p_sigignore.__bits[0]); - sbuf_printf(sb, "SigCgt:\t%08x\n", p->p_sigcatch.__bits[0]); + ps = p->p_sigacts; + mtx_lock(&ps->ps_mtx); + sbuf_printf(sb, "SigIgn:\t%08x\n", ps->ps_sigignore.__bits[0]); + sbuf_printf(sb, "SigCgt:\t%08x\n", ps->ps_sigcatch.__bits[0]); + mtx_unlock(&ps->ps_mtx); PROC_UNLOCK(p); /* ==== //depot/projects/hammer/sys/compat/svr4/svr4_filio.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/svr4/svr4_filio.c,v 1.27 2003/03/31 22:49:14 jeff Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_filio.c,v 1.28 2003/05/13 20:35:57 jhb Exp $ */ #include @@ -132,10 +132,21 @@ DPRINTF(("svr4_read(%d, 0x%0x, %d) = %d\n", uap->fd, uap->buf, uap->nbyte, rv)); if (rv == EAGAIN) { +#ifdef DEBUG_SVR4 + struct sigacts *ps; + + PROC_LOCK(td->td_proc); + ps = td->td_proc->p_sigacts; + mtx_lock(&ps->ps_mtx); +#endif DPRINTF(("sigmask = 0x%x\n", td->td_sigmask)); - DPRINTF(("sigignore = 0x%x\n", td->td_proc->p_sigignore)); - DPRINTF(("sigcaught = 0x%x\n", td->td_proc->p_sigcatch)); + DPRINTF(("sigignore = 0x%x\n", ps->ps_sigignore)); + DPRINTF(("sigcaught = 0x%x\n", ps->ps_sigcatch)); DPRINTF(("siglist = 0x%x\n", td->td_siglist)); +#ifdef DEBUG_SVR4 + mtx_unlock(&ps->ps_mtx); + PROC_UNLOCK(td->td_proc); +#endif } #if defined(GROTTY_READ_HACK) ==== //depot/projects/hammer/sys/compat/svr4/svr4_misc.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.62 2003/04/17 22:09:08 jhb Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.63 2003/05/13 20:35:57 jhb Exp $ */ /* @@ -1363,12 +1363,8 @@ sx_xunlock(&proctree_lock); PROC_LOCK(q); - if (--q->p_procsig->ps_refcnt == 0) { - if (q->p_sigacts != &q->p_uarea->u_sigacts) - FREE(q->p_sigacts, M_SUBPROC); - FREE(q->p_procsig, M_SUBPROC); - q->p_procsig = NULL; - } + sigacts_free(q->p_sigacts); + q->p_sigacts = NULL; PROC_UNLOCK(q); /* ==== //depot/projects/hammer/sys/dev/acpica/Osd/OsdHardware.c#4 (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/acpica/Osd/OsdHardware.c,v 1.7 2003/05/12 16:54:55 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.8 2003/05/13 16:59:46 jhb Exp $ */ /* @@ -36,7 +36,11 @@ #include #include #include +#if __FreeBSD_version >= 500000 #include +#else +#include +#endif /* * ACPICA's rather gung-ho approach to hardware resource ownership is a little ==== //depot/projects/hammer/sys/dev/acpica/acpivar.h#8 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.40 2003/04/29 18:50:33 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.41 2003/05/13 16:59:46 jhb Exp $ */ #include "bus_if.h" @@ -39,6 +39,10 @@ #include #include +#if __FreeBSD_version < 500000 +typedef vm_offset_t vm_paddr_t; +#endif + struct acpi_softc { device_t acpi_dev; dev_t acpi_dev_t; @@ -389,12 +393,14 @@ extern int acpi_acad_get_acline(int *); +#if __FreeBSD_version >= 500000 #ifndef ACPI_MAX_THREADS #define ACPI_MAX_THREADS 3 #endif #if ACPI_MAX_THREADS > 0 #define ACPI_USE_THREADS #endif +#endif #ifdef ACPI_USE_THREADS /* ==== //depot/projects/hammer/sys/geom/geom_disk.c#11 (text+ko) ==== @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/geom/geom_disk.c,v 1.69 2003/05/02 06:20:57 phk Exp $ + * $FreeBSD: src/sys/geom/geom_disk.c,v 1.70 2003/05/12 20:15:28 phk Exp $ */ #include "opt_geom.h" @@ -345,6 +345,15 @@ * XXX: disk_create() and disk_destroy() is currently undefined (but generally * XXX: undesirable) so any solution seems to involve an intrusive decision. */ + +static void +disk_destroy_event(void *ptr, int flag) +{ + + g_topology_assert(); + g_wither_geom(ptr, ENXIO); +} + void disk_destroy(struct disk *dp) { @@ -356,7 +365,7 @@ return; gp->softc = NULL; devstat_remove_entry(dp->d_devstat); - g_wither_geom(gp, ENXIO); + g_post_event(disk_destroy_event, gp, M_WAITOK, NULL, NULL); } static void ==== //depot/projects/hammer/sys/i386/acpica/acpi_machdep.c#7 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.8 2003/03/24 19:14:45 mdodd Exp $ + * $FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.9 2003/05/13 16:59:46 jhb Exp $ */ #include @@ -52,7 +52,11 @@ #include #include +#if __FreeBSD_version < 500000 +#include +#else #include +#endif static struct apm_softc apm_softc; ==== //depot/projects/hammer/sys/i386/acpica/acpi_wakeup.c#7 (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/i386/acpica/acpi_wakeup.c,v 1.18 2003/03/25 00:07:01 jake Exp $ + * $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.19 2003/05/13 16:59:46 jhb Exp $ */ #include @@ -58,6 +58,11 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue May 13 21:20:08 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD24F37B404; Tue, 13 May 2003 21:20:07 -0700 (PDT) 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 8E57337B401 for ; Tue, 13 May 2003 21:20:07 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B784143F3F for ; Tue, 13 May 2003 21:20:06 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E4K60U082208 for ; Tue, 13 May 2003 21:20:06 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E4K675082204 for perforce@freebsd.org; Tue, 13 May 2003 21:20:06 -0700 (PDT) Date: Tue, 13 May 2003 21:20:06 -0700 (PDT) Message-Id: <200305140420.h4E4K675082204@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31125 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 04:20:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=31125 Change 31125 by peter@peter_daintree on 2003/05/13 21:19:15 IFC @31124 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#5 integrate .. //depot/projects/hammer/sys/amd64/amd64/exception.S#13 integrate .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#13 integrate .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#34 integrate .. //depot/projects/hammer/sys/amd64/amd64/support.S#7 integrate .. //depot/projects/hammer/sys/amd64/amd64/trap.c#16 integrate .. //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#7 integrate .. //depot/projects/hammer/sys/amd64/conf/GENERIC#10 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_exception.S#2 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_genassym.c#3 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#5 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#5 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_signal.c#3 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_signal.h#3 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_sigtramp.S#3 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.c#2 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#5 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#5 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#5 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_util.h#3 integrate .. //depot/projects/hammer/sys/amd64/ia32/syscalls.master#5 integrate .. //depot/projects/hammer/sys/amd64/include/cpufunc.h#7 integrate .. //depot/projects/hammer/sys/amd64/include/elf.h#8 integrate .. //depot/projects/hammer/sys/amd64/include/md_var.h#11 integrate .. //depot/projects/hammer/sys/amd64/include/pcb.h#9 integrate .. //depot/projects/hammer/sys/amd64/include/segments.h#8 integrate .. //depot/projects/hammer/sys/conf/files.amd64#13 integrate .. //depot/projects/hammer/sys/conf/options.amd64#9 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#5 (text+ko) ==== @@ -33,7 +33,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.139 2003/05/12 02:37:28 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.140 2003/05/14 04:10:47 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#13 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.109 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.110 2003/05/14 04:10:47 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#13 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.144 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.145 2003/05/14 04:10:48 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#34 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.576 2003/05/13 20:35:57 jhb Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.577 2003/05/14 04:10:48 peter Exp $ */ #include "opt_atalk.h" ==== //depot/projects/hammer/sys/amd64/amd64/support.S#7 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.99 2003/05/11 22:38:54 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.100 2003/05/14 03:38:13 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#16 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.256 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.257 2003/05/14 04:10:48 peter Exp $ */ /* ==== //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#7 (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/amd64/amd64/vm_machdep.c,v 1.207 2003/05/01 01:05:22 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.208 2003/05/14 04:10:48 peter Exp $ */ #include "opt_isa.h" ==== //depot/projects/hammer/sys/amd64/conf/GENERIC#10 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.384 2003/05/09 18:26:06 peter Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.385 2003/05/14 04:10:48 peter Exp $ machine amd64 cpu HAMMER ==== //depot/projects/hammer/sys/amd64/ia32/ia32_exception.S#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: src/sys/amd64/ia32/ia32_exception.S,v 1.1 2003/05/14 04:10:48 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/ia32/ia32_genassym.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD$ */ +/* $FreeBSD: src/sys/amd64/ia32/ia32_genassym.c,v 1.1 2003/05/14 04:10:48 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/ia32/ia32_misc.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/ia32/ia32_misc.c,v 1.9 2003/04/22 18:23:49 jhb Exp $ + * $FreeBSD: src/sys/amd64/ia32/ia32_misc.c,v 1.10 2003/05/14 04:10:48 peter Exp $ */ #include "opt_compat.h" @@ -439,6 +439,55 @@ return execve(td, &ap); } +#ifdef __ia64__ +static int +ia32_mmap_partial(struct thread *td, vm_offset_t start, vm_offset_t end, + int prot, int fd, off_t pos) +{ + vm_map_t map; + vm_map_entry_t entry; + int rv; + + map = &td->td_proc->p_vmspace->vm_map; + if (fd != -1) + prot |= VM_PROT_WRITE; + + if (vm_map_lookup_entry(map, start, &entry)) { + if ((entry->protection & prot) != prot) { + rv = vm_map_protect(map, + trunc_page(start), + round_page(end), + entry->protection | prot, + FALSE); + if (rv != KERN_SUCCESS) + return (EINVAL); + } + } else { + vm_offset_t addr = trunc_page(start); + rv = vm_map_find(map, 0, 0, + &addr, PAGE_SIZE, FALSE, prot, + VM_PROT_ALL, 0); + if (rv != KERN_SUCCESS) + return (EINVAL); + } + + if (fd != -1) { + struct pread_args r; + r.fd = fd; + r.buf = (void *) start; + r.nbyte = end - start; + r.offset = pos; + return (pread(td, &r)); + } else { + while (start < end) { + subyte((void *) start, 0); + start++; + } + return (0); + } +} +#endif + int ia32_mmap(struct thread *td, struct ia32_mmap_args *uap) { @@ -450,7 +499,79 @@ int fd = uap->fd; off_t pos = (uap->poslo | ((off_t)uap->poshi << 32)); +#ifdef __ia64__ + vm_size_t pageoff; + int error; + + /* + * Attempt to handle page size hassles. + */ + pageoff = (pos & PAGE_MASK); + if (flags & MAP_FIXED) { + vm_offset_t start, end; + start = addr; + end = addr + len; + if (start != trunc_page(start)) { + error = ia32_mmap_partial(td, start, round_page(start), + prot, fd, pos); + if (fd != -1) + pos += round_page(start) - start; + start = round_page(start); + } + if (end != round_page(end)) { + vm_offset_t t = trunc_page(end); + error = ia32_mmap_partial(td, t, end, + prot, fd, + pos + t - start); + end = trunc_page(end); + } + if (end > start && fd != -1 && (pos & PAGE_MASK)) { + /* + * We can't map this region at all. The specified + * address doesn't have the same alignment as the file + * position. Fake the mapping by simply reading the + * entire region into memory. First we need to make + * sure the region exists. + */ + vm_map_t map; + struct pread_args r; + int rv; + + prot |= VM_PROT_WRITE; + map = &td->td_proc->p_vmspace->vm_map; + rv = vm_map_remove(map, start, end); + if (rv != KERN_SUCCESS) + return (EINVAL); + rv = vm_map_find(map, 0, 0, + &start, end - start, FALSE, + prot, VM_PROT_ALL, 0); + if (rv != KERN_SUCCESS) + return (EINVAL); + r.fd = fd; + r.buf = (void *) start; + r.nbyte = end - start; + r.offset = pos; + error = pread(td, &r); + if (error) + return (error); + + td->td_retval[0] = addr; + return (0); + } + if (end == start) { + /* + * After dealing with the ragged ends, there + * might be none left. + */ + td->td_retval[0] = addr; + return (0); + } + addr = start; + len = end - start; + } +#endif + ap.addr = (void *) addr; ap.len = len; ap.prot = prot; @@ -1275,3 +1396,41 @@ return (error); } #endif + +#if 0 + +int +ia32_xxx(struct thread *td, struct ia32_xxx_args *uap) +{ + int error; + caddr_t sg; + struct yyy32 *p32, s32; + struct yyy *p = NULL, s; + + p32 = uap->zzz; + if (p32) { + sg = stackgap_init(); + p = stackgap_alloc(&sg, sizeof(struct yyy)); + uap->zzz = (struct yyy32 *)p; + error = copyin(p32, &s32, sizeof(s32)); + if (error) + return (error); + /* translate in */ + error = copyout(&s, p, sizeof(s)); + if (error) + return (error); + } + error = xxx(td, (struct xxx_args *) uap); + if (error) + return (error); + if (p32) { + error = copyin(p, &s, sizeof(s)); + if (error) + return (error); + /* translate out */ + error = copyout(&s32, p32, sizeof(s32)); + } + return (error); +} + +#endif ==== //depot/projects/hammer/sys/amd64/ia32/ia32_proto.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD$ - * created from FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp + * $FreeBSD: src/sys/amd64/ia32/ia32_proto.h,v 1.10 2003/05/14 04:11:25 peter Exp $ + * created from FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.22 2003/05/14 04:10:49 peter Exp */ #ifndef _IA32_SYSPROTO_H_ ==== //depot/projects/hammer/sys/amd64/ia32/ia32_signal.c#3 (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/ia64/ia32/ia32_sysvec.c,v 1.2 2002/09/01 21:41:23 jake Exp $ + * $FreeBSD: src/sys/amd64/ia32/ia32_signal.c,v 1.1 2003/05/14 04:10:48 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/ia32/ia32_signal.h#3 (text+ko) ==== @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: src/sys/amd64/ia32/ia32_signal.h,v 1.1 2003/05/14 04:10:48 peter Exp $ */ struct ia32_sigaltstack { ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sigtramp.S#3 (text+ko) ==== @@ -1,10 +1,7 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. + * Copyright (c) 2003 Peter Wemm * All rights reserved. * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,18 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -33,14 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/i386/i386/locore.s,v 1.171 2003/04/03 23:44:34 jake Exp $ - * - * originally from: locore.s, by William F. Jolitz - * - * Substantially rewritten by David Greenman, Rod Grimes, - * Bruce Evans, Wolfgang Solfrank, Poul-Henning Kamp - * and many others. + * $FreeBSD: src/sys/amd64/ia32/ia32_sigtramp.S,v 1.1 2003/05/14 04:10:48 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.c#2 (text+ko) ==== @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.1 2003/05/14 04:10:48 peter Exp $ */ /* ==== //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD$ - * created from FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp + * $FreeBSD: src/sys/amd64/ia32/ia32_syscall.h,v 1.10 2003/05/14 04:11:25 peter Exp $ + * created from FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.22 2003/05/14 04:10:49 peter Exp */ #define IA32_SYS_syscall 0 ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysent.c#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD$ - * created from FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp + * $FreeBSD: src/sys/amd64/ia32/ia32_sysent.c,v 1.11 2003/05/14 04:11:25 peter Exp $ + * created from FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.22 2003/05/14 04:10:49 peter Exp */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#5 (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/amd64/ia32/ia32_sysvec.c,v 1.2 2002/09/01 21:41:23 jake Exp $ + * $FreeBSD: src/sys/amd64/ia32/ia32_sysvec.c,v 1.3 2003/05/14 04:10:48 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/ia32/ia32_util.h#3 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/ia32/ia32_util.h,v 1.4 2002/12/14 01:56:25 alfred Exp $ + * $FreeBSD: src/sys/amd64/ia32/ia32_util.h,v 1.5 2003/05/14 04:10:49 peter Exp $ */ #include @@ -44,6 +44,9 @@ int ps_nenvstr; /* the number of environment strings */ }; +#define IA32_USRSTACK USRSTACK +#define IA32_PS_STRINGS (IA32_USRSTACK - sizeof(struct ia32_ps_strings)) + static __inline caddr_t stackgap_init(void); static __inline void *stackgap_alloc(caddr_t *, size_t); @@ -51,7 +54,7 @@ stackgap_init() { #define szsigcode (*(curproc->p_sysent->sv_szsigcode)) - return (caddr_t)(((caddr_t)PS_STRINGS) - szsigcode - SPARE_USRSPACE); + return (caddr_t)(((caddr_t)IA32_PS_STRINGS) - szsigcode - SPARE_USRSPACE); #undef szsigcode } ==== //depot/projects/hammer/sys/amd64/ia32/syscalls.master#5 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.21 2003/04/25 15:59:18 jhb Exp $ + $FreeBSD: src/sys/amd64/ia32/syscalls.master,v 1.22 2003/05/14 04:10:49 peter Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; ==== //depot/projects/hammer/sys/amd64/include/cpufunc.h#7 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.134 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.135 2003/05/14 04:10:49 peter Exp $ */ /* ==== //depot/projects/hammer/sys/amd64/include/elf.h#8 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/elf.h,v 1.14 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/elf.h,v 1.15 2003/05/14 04:10:49 peter Exp $ */ #ifndef _MACHINE_ELF_H_ ==== //depot/projects/hammer/sys/amd64/include/md_var.h#11 (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/amd64/include/md_var.h,v 1.65 2003/05/11 22:53:43 peter Exp $ + * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.66 2003/05/14 04:10:49 peter Exp $ */ #ifndef _MACHINE_MD_VAR_H_ ==== //depot/projects/hammer/sys/amd64/include/pcb.h#9 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)pcb.h 5.10 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.51 2003/05/12 02:37:29 peter Exp $ + * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.52 2003/05/14 04:10:49 peter Exp $ */ #ifndef _I386_PCB_H_ ==== //depot/projects/hammer/sys/amd64/include/segments.h#8 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/segments.h,v 1.34 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/segments.h,v 1.35 2003/05/14 04:10:49 peter Exp $ */ #ifndef _MACHINE_SEGMENTS_H_ ==== //depot/projects/hammer/sys/conf/files.amd64#13 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.13 2003/05/03 03:30:29 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.14 2003/05/14 04:10:49 peter Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and ==== //depot/projects/hammer/sys/conf/options.amd64#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.amd64,v 1.6 2003/05/01 02:59:24 peter Exp $ +# $FreeBSD: src/sys/conf/options.amd64,v 1.7 2003/05/14 04:10:49 peter Exp $ # Options specific to the AMD x86-64 platform kernels MAXMEM From owner-p4-projects@FreeBSD.ORG Tue May 13 23:59:35 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 463CF37B404; Tue, 13 May 2003 23:59:35 -0700 (PDT) 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 D32B137B401 for ; Tue, 13 May 2003 23:59:34 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3288F43F75 for ; Tue, 13 May 2003 23:59:34 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E6xY0U090611 for ; Tue, 13 May 2003 23:59:34 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E6xXsR090608 for perforce@freebsd.org; Tue, 13 May 2003 23:59:33 -0700 (PDT) Date: Tue, 13 May 2003 23:59:33 -0700 (PDT) Message-Id: <200305140659.h4E6xXsR090608@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31143 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 06:59:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=31143 Change 31143 by peter@peter_hammer on 2003/05/13 23:59:13 reimplement the lazy critical section masking stuff. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/critical.c#7 edit .. //depot/projects/hammer/sys/amd64/amd64/exception.S#14 edit .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#14 edit .. //depot/projects/hammer/sys/amd64/include/critical.h#6 edit .. //depot/projects/hammer/sys/amd64/include/pcpu.h#6 edit .. //depot/projects/hammer/sys/amd64/include/proc.h#6 edit .. //depot/projects/hammer/sys/amd64/isa/icu_vector.S#4 edit .. //depot/projects/hammer/sys/amd64/isa/intr_machdep.c#6 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/critical.c#7 (text+ko) ==== @@ -19,24 +19,148 @@ #include /* - * cpu_critical_fork_exit() - cleanup after fork + * XXX this mess to get sched_ithd() and call_fast_unpend() + */ +#include +#include +#include +#include +#include + +void amd64_unpend(void); /* NOTE: not static, called from assembly */ + +/* + * cpu_unpend() - called from critical_exit() inline after quick + * interrupt-pending check. */ void -cpu_critical_fork_exit(void) +cpu_unpend(void) { + register_t rflags; struct thread *td; td = curthread; - td->td_critnest = 1; - td->td_md.md_savecrit = read_rflags() | PSL_I; + rflags = intr_disable(); + if (PCPU_GET(int_pending)) { + ++td->td_intr_nesting_level; + amd64_unpend(); + --td->td_intr_nesting_level; + } + intr_restore(rflags); +} + +/* + * cpu_critical_fork_exit() - cleanup after fork + * + * For amd64 we do not have to do anything, td_critnest is + * handled by the fork trampoline code. + */ +void +cpu_critical_fork_exit(void) +{ } /* * cpu_thread_link() - thread linkup, initialize machine-dependant fields + * + * There are currently no machine-dependant fields that require + * initialization. */ void cpu_thread_link(struct thread *td) { +} + +/* + * Called from cpu_unpend or called from the assembly vector code + * to process any interrupts which may have occured while we were in + * a critical section. + * + * - interrupts must be disabled + * - td_critnest must be 0 + * - td_intr_nesting_level must be incremented by the caller + * + * NOT STATIC (called from assembly) + */ +static __inline u_int +bsfq(u_long mask) +{ + u_long result; + + __asm __volatile("bsfq %1,%0" : "=r" (result) : "rm" (mask)); + return (result); +} + +void +amd64_unpend(void) +{ + struct clockframe frame; + + frame.cf_cs = SEL_KPL; + frame.cf_rip = (register_t)amd64_unpend; + frame.cf_rflags = PSL_KERNEL; + KASSERT(curthread->td_critnest == 0, ("unpend critnest != 0")); + KASSERT((read_rflags() & PSL_I) == 0, ("unpend interrupts enabled1")); + curthread->td_critnest = 1; + for (;;) { + u_int64_t mask; + int irq; + + /* + * Fast interrupts have priority + */ + if ((mask = PCPU_GET(fpending)) != 0) { + irq = bsfq(mask); + PCPU_SET(fpending, mask & ~(1ul << irq)); + call_fast_unpend(irq); + KASSERT((read_rflags() & PSL_I) == 0, + ("unpend interrupts enabled2 %d", irq)); + continue; + } - td->td_md.md_savecrit = 0; + /* + * Threaded interrupts come next + */ + if ((mask = PCPU_GET(ipending)) != 0) { + irq = bsfq(mask); + PCPU_SET(ipending, mask & ~(1ul << irq)); + sched_ithd((void *)(uintptr_t)irq); + KASSERT((read_rflags() & PSL_I) == 0, + ("unpend interrupts enabled3 %d", irq)); + continue; + } + + /* + * Software interrupts and delayed IPIs are last + * + * XXX give the bits #defined names. see also + * isa/xxx_vector.s + */ + if ((mask = PCPU_GET(spending)) != 0) { + irq = bsfq(mask); + PCPU_SET(spending, mask & ~(1ul << irq)); + switch(irq) { + case 0: /* bit 0 - hardclock */ + hardclock_process(&frame); + break; + case 1: /* bit 1 - statclock */ + if (profprocs != 0) + profclock(&frame); + if (pscnt == psdiv) + statclock(&frame); + break; + } + KASSERT((read_rflags() & PSL_I) == 0, + ("unpend interrupts enabled4 %d", irq)); + continue; + } + break; + } + /* + * Interrupts are still disabled, we can safely clear int_pending + * and td_critnest. + */ + KASSERT((read_rflags() & PSL_I) == 0, ("unpend interrupts enabled5")); + PCPU_SET(int_pending, 0); + curthread->td_critnest = 0; } ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#14 (text+ko) ==== @@ -297,6 +297,9 @@ movq %r12, %rdi /* function */ movq %rbx, %rsi /* arg1 */ movq %rsp, %rdx /* trapframe pointer */ + movq PCPU(CURTHREAD),%rbx /* setup critnest */ + movl $1,TD_CRITNEST(%rbx) + sti call fork_exit MEXITCOUNT jmp doreti /* Handle any ASTs */ ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#14 (text+ko) ==== @@ -181,6 +181,10 @@ ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); ASSYM(PC_SCRATCH_RSP, offsetof(struct pcpu, pc_scratch_rsp)); +ASSYM(PC_INT_PENDING, offsetof(struct pcpu, pc_int_pending)); +ASSYM(PC_IPENDING, offsetof(struct pcpu, pc_ipending)); +ASSYM(PC_FPENDING, offsetof(struct pcpu, pc_fpending)); +ASSYM(PC_SPENDING, offsetof(struct pcpu, pc_spending)); ASSYM(KCSEL, GSEL(GCODE_SEL, SEL_KPL)); ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL)); ==== //depot/projects/hammer/sys/amd64/include/critical.h#6 (text+ko) ==== @@ -23,6 +23,7 @@ /* * Prototypes - see //critical.c */ +void cpu_unpend(void); void cpu_critical_fork_exit(void); void cpu_thread_link(struct thread *td); @@ -33,15 +34,12 @@ * * This routine is called from critical_enter() on the 0->1 transition * of td_critnest, prior to it being incremented to 1. + * + * If new-style critical section handling we do not have to do anything. + * However, as a side effect any interrupts occuring while td_critnest + * is non-zero will be deferred. */ -static __inline void -cpu_critical_enter(void) -{ - struct thread *td; - - td = curthread; - td->td_md.md_savecrit = intr_disable(); -} +#define cpu_critical_enter() /* * cpu_critical_exit: @@ -49,14 +47,27 @@ * This routine is called from critical_exit() on a 1->0 transition * of td_critnest, after it has been decremented to 0. We are * exiting the last critical section. + * + * Note that the td->critnest (1->0) transition interrupt race against + * our int_pending/unpend() check below is handled by the interrupt + * code for us, so we do not have to do anything fancy. */ static __inline void cpu_critical_exit(void) { - struct thread *td; - - td = curthread; - intr_restore(td->td_md.md_savecrit); + /* + * We may have to schedule pending interrupts. Create + * conditions similar to an interrupt context and call + * unpend(). + * + * note: we do this even if we are in an interrupt + * nesting level. Deep nesting is protected by + * critical_*() and if we conditionalized it then we + * would have to check int_pending again whenever + * we decrement td_intr_nesting_level to 0. + */ + if (PCPU_GET(int_pending)) + cpu_unpend(); } #else /* !__GNUC__ */ ==== //depot/projects/hammer/sys/amd64/include/pcpu.h#6 (text+ko) ==== @@ -40,7 +40,12 @@ */ #define PCPU_MD_FIELDS \ struct pcpu *pc_prvspace; /* Self-reference */ \ - register_t pc_scratch_rsp; /* User %rsp in syscall */ + register_t pc_scratch_rsp; /* User %rsp in syscall */ \ + u_int64_t pc_int_pending; /* master int pending flag */ \ + u_int64_t pc_ipending; /* pending slow interrupts */ \ + u_int64_t pc_fpending; /* pending fast interrupts */ \ + u_int64_t pc_spending /* pending soft interrupts */ + #if defined(lint) ==== //depot/projects/hammer/sys/amd64/include/proc.h#6 (text+ko) ==== @@ -41,7 +41,7 @@ * Machine-dependent part of the proc structure for AMD64. */ struct mdthread { - register_t md_savecrit; + int __dummy__; }; struct mdproc { ==== //depot/projects/hammer/sys/amd64/isa/icu_vector.S#4 (text+ko) ==== @@ -4,6 +4,7 @@ */ #define IRQ_BIT(irq_num) (1 << ((irq_num) % 8)) +#define IRQ_LBIT(irq_num) (1 << (irq_num)) #define IRQ_BYTE(irq_num) ((irq_num) >> 3) #define ENABLE_ICU1 \ @@ -15,12 +16,11 @@ outb %al,$IO_ICU2 ; /* but do second icu first ... */ \ outb %al,$IO_ICU1 /* ... then first icu */ - /* * Macros for interrupt interrupt entry, call to handler, and exit. */ -#define FAST_INTR(irq_num, vec_name, enable_icus) \ +#define FAST_INTR(irq_num, vec_name, icu, enable_icus) \ .text ; \ SUPERALIGN_TEXT ; \ IDTVEC(vec_name) ; \ @@ -44,8 +44,19 @@ movq %r14,TF_R14(%rsp) ; \ movq %r15,TF_R15(%rsp) ; \ FAKE_MCOUNT((12)*4(%rsp)) ; \ - call critical_enter ; \ movq PCPU(CURTHREAD),%rbx ; \ + cmpl $0,TD_CRITNEST(%rbx) ; \ + je 1f ; \ + movq $1,PCPU(INT_PENDING) ; \ + orq $IRQ_LBIT(irq_num),PCPU(FPENDING) ; \ + movb imen + IRQ_BYTE(irq_num),%al ; \ + orb $IRQ_BIT(irq_num),%al ; \ + movb %al,imen + IRQ_BYTE(irq_num) ; \ + outb %al,$icu+ICU_IMR_OFFSET ; \ + enable_icus ; \ + jmp 10f ; \ +1: ; \ + incl TD_CRITNEST(%rbx) ; \ incl TD_INTR_NESTING_LEVEL(%rbx) ; \ movq intr_unit + (irq_num) * 8, %rdi ; \ call *intr_handler + (irq_num) * 8 ; /* do the work ASAP */ \ @@ -53,11 +64,47 @@ incl cnt+V_INTR ; /* book-keeping can wait */ \ movq intr_countp + (irq_num) * 8,%rax ; \ incq (%rax) ; \ + decl TD_CRITNEST(%rbx) ; \ + cmpq $0,PCPU(INT_PENDING) ; \ + je 2f ; \ + call amd64_unpend ; \ +2: ; \ decl TD_INTR_NESTING_LEVEL(%rbx) ; \ - call critical_exit ; \ +10: ; \ MEXITCOUNT ; \ jmp doreti +/* + * Restart a fast interrupt that was held up by a critical section. + * This routine is called from unpend(). unpend() ensures we are + * in a critical section and deals with the interrupt nesting level + * for us. If we previously masked the irq, we have to unmask it. + * + * We have a choice. We can regenerate the irq using the 'int' + * instruction or we can create a dummy frame and call the interrupt + * handler directly. I've chosen to use the dummy-frame method. + */ +#define FAST_UNPEND(irq_num, vec_name, icu) \ + .text ; \ + SUPERALIGN_TEXT ; \ +IDTVEC(vec_name) ; \ + pushfq ; /* rflags */ \ + mov %cs,%ax ; \ + pushq %rax ; /* cs */ \ + pushq 24(%rsp) ; /* original caller rip */ \ + subq $TF_RIP,%rsp ; /* skip rest including tf_err etc */ \ + movq intr_unit + (irq_num) * 8, %rdi ; \ + call *intr_handler + (irq_num) * 8 ; /* do the work ASAP */ \ + incl cnt+V_INTR ; /* book-keeping can wait */ \ + movq intr_countp + (irq_num) * 8,%rax ; \ + incq (%rax) ; \ + movb imen + IRQ_BYTE(irq_num),%al ; \ + andb $~IRQ_BIT(irq_num),%al ; \ + movb %al,imen + IRQ_BYTE(irq_num) ; \ + outb %al,$icu+ICU_IMR_OFFSET ; \ + addq $TF_RSP,%rsp ; /* dump frame */ \ + ret + /* * Slow, threaded interrupts. * @@ -75,7 +122,8 @@ testb $SEL_RPL_MASK,TF_CS(%rsp) ; /* come from kernel? */ \ jz 1f ; /* Yes, dont swapgs again */ \ swapgs ; \ -1: movq %rdi,TF_RDI(%rsp) ; \ +1: ; \ + movq %rdi,TF_RDI(%rsp) ; \ movq %rsi,TF_RSI(%rsp) ; \ movq %rdx,TF_RDX(%rsp) ; \ movq %rcx,TF_RCX(%rsp) ; \ @@ -97,33 +145,44 @@ outb %al,$icu+ICU_IMR_OFFSET ; \ enable_icus ; \ movq PCPU(CURTHREAD),%rbx ; \ + cmpl $0,TD_CRITNEST(%rbx) ; \ + je 1f ; \ + movq $1,PCPU(INT_PENDING) ; \ + orq $IRQ_LBIT(irq_num),PCPU(IPENDING) ; \ + jmp 10f ; \ +1: ; \ incl TD_INTR_NESTING_LEVEL(%rbx) ; \ FAKE_MCOUNT(13*4(%rsp)) ; /* XXX late to avoid double count */ \ + cmpq $0,PCPU(INT_PENDING) ; \ + je 9f ; \ + call amd64_unpend ; \ +9: ; \ movq $irq_num, %rdi; /* pass the IRQ */ \ call sched_ithd ; \ decl TD_INTR_NESTING_LEVEL(%rbx) ; \ +10: ; \ MEXITCOUNT ; \ /* We could usually avoid the following jmp by inlining some of */ \ /* doreti, but it's probably better to use less cache. */ \ jmp doreti MCOUNT_LABEL(bintr) - FAST_INTR(0,fastintr0, ENABLE_ICU1) - FAST_INTR(1,fastintr1, ENABLE_ICU1) - FAST_INTR(2,fastintr2, ENABLE_ICU1) - FAST_INTR(3,fastintr3, ENABLE_ICU1) - FAST_INTR(4,fastintr4, ENABLE_ICU1) - FAST_INTR(5,fastintr5, ENABLE_ICU1) - FAST_INTR(6,fastintr6, ENABLE_ICU1) - FAST_INTR(7,fastintr7, ENABLE_ICU1) - FAST_INTR(8,fastintr8, ENABLE_ICU1_AND_2) - FAST_INTR(9,fastintr9, ENABLE_ICU1_AND_2) - FAST_INTR(10,fastintr10, ENABLE_ICU1_AND_2) - FAST_INTR(11,fastintr11, ENABLE_ICU1_AND_2) - FAST_INTR(12,fastintr12, ENABLE_ICU1_AND_2) - FAST_INTR(13,fastintr13, ENABLE_ICU1_AND_2) - FAST_INTR(14,fastintr14, ENABLE_ICU1_AND_2) - FAST_INTR(15,fastintr15, ENABLE_ICU1_AND_2) + FAST_INTR(0,fastintr0, IO_ICU1, ENABLE_ICU1) + FAST_INTR(1,fastintr1, IO_ICU1, ENABLE_ICU1) + FAST_INTR(2,fastintr2, IO_ICU1, ENABLE_ICU1) + FAST_INTR(3,fastintr3, IO_ICU1, ENABLE_ICU1) + FAST_INTR(4,fastintr4, IO_ICU1, ENABLE_ICU1) + FAST_INTR(5,fastintr5, IO_ICU1, ENABLE_ICU1) + FAST_INTR(6,fastintr6, IO_ICU1, ENABLE_ICU1) + FAST_INTR(7,fastintr7, IO_ICU1, ENABLE_ICU1) + FAST_INTR(8,fastintr8, IO_ICU2, ENABLE_ICU1_AND_2) + FAST_INTR(9,fastintr9, IO_ICU2, ENABLE_ICU1_AND_2) + FAST_INTR(10,fastintr10, IO_ICU2, ENABLE_ICU1_AND_2) + FAST_INTR(11,fastintr11, IO_ICU2, ENABLE_ICU1_AND_2) + FAST_INTR(12,fastintr12, IO_ICU2, ENABLE_ICU1_AND_2) + FAST_INTR(13,fastintr13, IO_ICU2, ENABLE_ICU1_AND_2) + FAST_INTR(14,fastintr14, IO_ICU2, ENABLE_ICU1_AND_2) + FAST_INTR(15,fastintr15, IO_ICU2, ENABLE_ICU1_AND_2) #define CLKINTR_PENDING movl $1,CNAME(clkintr_pending) /* Threaded interrupts */ @@ -144,5 +203,21 @@ INTR(14,intr14, IO_ICU2, ENABLE_ICU1_AND_2,) INTR(15,intr15, IO_ICU2, ENABLE_ICU1_AND_2,) + FAST_UNPEND(0,fastunpend0, IO_ICU1) + FAST_UNPEND(1,fastunpend1, IO_ICU1) + FAST_UNPEND(2,fastunpend2, IO_ICU1) + FAST_UNPEND(3,fastunpend3, IO_ICU1) + FAST_UNPEND(4,fastunpend4, IO_ICU1) + FAST_UNPEND(5,fastunpend5, IO_ICU1) + FAST_UNPEND(6,fastunpend6, IO_ICU1) + FAST_UNPEND(7,fastunpend7, IO_ICU1) + FAST_UNPEND(8,fastunpend8, IO_ICU2) + FAST_UNPEND(9,fastunpend9, IO_ICU2) + FAST_UNPEND(10,fastunpend10, IO_ICU2) + FAST_UNPEND(11,fastunpend11, IO_ICU2) + FAST_UNPEND(12,fastunpend12, IO_ICU2) + FAST_UNPEND(13,fastunpend13, IO_ICU2) + FAST_UNPEND(14,fastunpend14, IO_ICU2) + FAST_UNPEND(15,fastunpend15, IO_ICU2) + MCOUNT_LABEL(eintr) - ==== //depot/projects/hammer/sys/amd64/isa/intr_machdep.c#6 (text+ko) ==== @@ -87,6 +87,17 @@ IDTVEC(fastintr14), IDTVEC(fastintr15), }; +static unpendhand_t *fastunpend[ICU_LEN] = { + IDTVEC(fastunpend0), IDTVEC(fastunpend1), + IDTVEC(fastunpend2), IDTVEC(fastunpend3), + IDTVEC(fastunpend4), IDTVEC(fastunpend5), + IDTVEC(fastunpend6), IDTVEC(fastunpend7), + IDTVEC(fastunpend8), IDTVEC(fastunpend9), + IDTVEC(fastunpend10), IDTVEC(fastunpend11), + IDTVEC(fastunpend12), IDTVEC(fastunpend13), + IDTVEC(fastunpend14), IDTVEC(fastunpend15), +}; + static inthand_t *slowintr[ICU_LEN] = { IDTVEC(intr0), IDTVEC(intr1), IDTVEC(intr2), IDTVEC(intr3), IDTVEC(intr4), IDTVEC(intr5), IDTVEC(intr6), IDTVEC(intr7), @@ -521,3 +532,10 @@ return (ithread_remove_handler(cookie)); } + +void +call_fast_unpend(int irq) +{ + + fastunpend[irq](); +} From owner-p4-projects@FreeBSD.ORG Wed May 14 00:02:39 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6316C37B404; Wed, 14 May 2003 00:02:39 -0700 (PDT) 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 E9D7837B401 for ; Wed, 14 May 2003 00:02:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9272743F85 for ; Wed, 14 May 2003 00:02:38 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E72c0U090931 for ; Wed, 14 May 2003 00:02:38 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E72cP4090928 for perforce@freebsd.org; Wed, 14 May 2003 00:02:38 -0700 (PDT) Date: Wed, 14 May 2003 00:02:38 -0700 (PDT) Message-Id: <200305140702.h4E72cP4090928@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31144 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 07:02:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=31144 Change 31144 by peter@peter_hammer on 2003/05/14 00:02:09 *NO COMMENT* Affected files ... .. //depot/projects/hammer/lib/libkvm/kvm_proc.c#10 edit Differences ... ==== //depot/projects/hammer/lib/libkvm/kvm_proc.c#10 (text+ko) ==== @@ -100,7 +100,9 @@ struct session sess; struct tty tty; struct vmspace vmspace; +#ifdef JHB_ME_HARDER struct procsig procsig; +#endif struct pstats pstats; struct ucred ucred; struct thread mtd; @@ -192,6 +194,7 @@ kp->ki_textvp = proc.p_textvp; kp->ki_fd = proc.p_fd; kp->ki_vmspace = proc.p_vmspace; +#if JHB_ME_HARDER if (proc.p_procsig != NULL) { if (KREAD(kd, (u_long)proc.p_procsig, &procsig)) { _kvm_err(kd, kd->program, @@ -201,6 +204,7 @@ kp->ki_sigignore = procsig.ps_sigignore; kp->ki_sigcatch = procsig.ps_sigcatch; } +#endif if ((proc.p_sflag & PS_INMEM) && proc.p_stats != NULL) { if (KREAD(kd, (u_long)proc.p_stats, &pstats)) { _kvm_err(kd, kd->program, From owner-p4-projects@FreeBSD.ORG Wed May 14 00:08:49 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EAB4F37B404; Wed, 14 May 2003 00:08:48 -0700 (PDT) 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 9D2CC37B401 for ; Wed, 14 May 2003 00:08:48 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB94143FA3 for ; Wed, 14 May 2003 00:08:47 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4E78l0U092142 for ; Wed, 14 May 2003 00:08:47 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4E78lcW092139 for perforce@freebsd.org; Wed, 14 May 2003 00:08:47 -0700 (PDT) Date: Wed, 14 May 2003 00:08:47 -0700 (PDT) Message-Id: <200305140708.h4E78lcW092139@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31147 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 07:08:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=31147 Change 31147 by peter@peter_daintree on 2003/05/14 00:08:08 A triple fault 30 seconds into 'make world' tells this wasn't a good idea. back out the lazy critical stuff. Obviously something isn't right yet. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/critical.c#8 edit .. //depot/projects/hammer/sys/amd64/amd64/exception.S#15 edit .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#15 edit .. //depot/projects/hammer/sys/amd64/include/critical.h#7 edit .. //depot/projects/hammer/sys/amd64/include/pcpu.h#7 edit .. //depot/projects/hammer/sys/amd64/include/proc.h#7 edit .. //depot/projects/hammer/sys/amd64/isa/icu_vector.S#5 edit .. //depot/projects/hammer/sys/amd64/isa/intr_machdep.c#7 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/critical.c#8 (text+ko) ==== @@ -19,148 +19,24 @@ #include /* - * XXX this mess to get sched_ithd() and call_fast_unpend() + * cpu_critical_fork_exit() - cleanup after fork */ -#include -#include -#include -#include -#include - -void amd64_unpend(void); /* NOTE: not static, called from assembly */ - -/* - * cpu_unpend() - called from critical_exit() inline after quick - * interrupt-pending check. - */ void -cpu_unpend(void) +cpu_critical_fork_exit(void) { - register_t rflags; struct thread *td; td = curthread; - rflags = intr_disable(); - if (PCPU_GET(int_pending)) { - ++td->td_intr_nesting_level; - amd64_unpend(); - --td->td_intr_nesting_level; - } - intr_restore(rflags); + td->td_critnest = 1; + td->td_md.md_savecrit = read_rflags() | PSL_I; } /* - * cpu_critical_fork_exit() - cleanup after fork - * - * For amd64 we do not have to do anything, td_critnest is - * handled by the fork trampoline code. - */ -void -cpu_critical_fork_exit(void) -{ -} - -/* * cpu_thread_link() - thread linkup, initialize machine-dependant fields - * - * There are currently no machine-dependant fields that require - * initialization. */ void cpu_thread_link(struct thread *td) { -} -/* - * Called from cpu_unpend or called from the assembly vector code - * to process any interrupts which may have occured while we were in - * a critical section. - * - * - interrupts must be disabled - * - td_critnest must be 0 - * - td_intr_nesting_level must be incremented by the caller - * - * NOT STATIC (called from assembly) - */ -static __inline u_int -bsfq(u_long mask) -{ - u_long result; - - __asm __volatile("bsfq %1,%0" : "=r" (result) : "rm" (mask)); - return (result); -} - -void -amd64_unpend(void) -{ - struct clockframe frame; - - frame.cf_cs = SEL_KPL; - frame.cf_rip = (register_t)amd64_unpend; - frame.cf_rflags = PSL_KERNEL; - KASSERT(curthread->td_critnest == 0, ("unpend critnest != 0")); - KASSERT((read_rflags() & PSL_I) == 0, ("unpend interrupts enabled1")); - curthread->td_critnest = 1; - for (;;) { - u_int64_t mask; - int irq; - - /* - * Fast interrupts have priority - */ - if ((mask = PCPU_GET(fpending)) != 0) { - irq = bsfq(mask); - PCPU_SET(fpending, mask & ~(1ul << irq)); - call_fast_unpend(irq); - KASSERT((read_rflags() & PSL_I) == 0, - ("unpend interrupts enabled2 %d", irq)); - continue; - } - - /* - * Threaded interrupts come next - */ - if ((mask = PCPU_GET(ipending)) != 0) { - irq = bsfq(mask); - PCPU_SET(ipending, mask & ~(1ul << irq)); - sched_ithd((void *)(uintptr_t)irq); - KASSERT((read_rflags() & PSL_I) == 0, - ("unpend interrupts enabled3 %d", irq)); - continue; - } - - /* - * Software interrupts and delayed IPIs are last - * - * XXX give the bits #defined names. see also - * isa/xxx_vector.s - */ - if ((mask = PCPU_GET(spending)) != 0) { - irq = bsfq(mask); - PCPU_SET(spending, mask & ~(1ul << irq)); - switch(irq) { - case 0: /* bit 0 - hardclock */ - hardclock_process(&frame); - break; - case 1: /* bit 1 - statclock */ - if (profprocs != 0) - profclock(&frame); - if (pscnt == psdiv) - statclock(&frame); - break; - } - KASSERT((read_rflags() & PSL_I) == 0, - ("unpend interrupts enabled4 %d", irq)); - continue; - } - break; - } - /* - * Interrupts are still disabled, we can safely clear int_pending - * and td_critnest. - */ - KASSERT((read_rflags() & PSL_I) == 0, ("unpend interrupts enabled5")); - PCPU_SET(int_pending, 0); - curthread->td_critnest = 0; + td->td_md.md_savecrit = 0; } ==== //depot/projects/hammer/sys/amd64/amd64/exception.S#15 (text+ko) ==== @@ -297,9 +297,6 @@ movq %r12, %rdi /* function */ movq %rbx, %rsi /* arg1 */ movq %rsp, %rdx /* trapframe pointer */ - movq PCPU(CURTHREAD),%rbx /* setup critnest */ - movl $1,TD_CRITNEST(%rbx) - sti call fork_exit MEXITCOUNT jmp doreti /* Handle any ASTs */ ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#15 (text+ko) ==== @@ -181,10 +181,6 @@ ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); ASSYM(PC_SCRATCH_RSP, offsetof(struct pcpu, pc_scratch_rsp)); -ASSYM(PC_INT_PENDING, offsetof(struct pcpu, pc_int_pending)); -ASSYM(PC_IPENDING, offsetof(struct pcpu, pc_ipending)); -ASSYM(PC_FPENDING, offsetof(struct pcpu, pc_fpending)); -ASSYM(PC_SPENDING, offsetof(struct pcpu, pc_spending)); ASSYM(KCSEL, GSEL(GCODE_SEL, SEL_KPL)); ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL)); ==== //depot/projects/hammer/sys/amd64/include/critical.h#7 (text+ko) ==== @@ -23,7 +23,6 @@ /* * Prototypes - see //critical.c */ -void cpu_unpend(void); void cpu_critical_fork_exit(void); void cpu_thread_link(struct thread *td); @@ -34,12 +33,15 @@ * * This routine is called from critical_enter() on the 0->1 transition * of td_critnest, prior to it being incremented to 1. - * - * If new-style critical section handling we do not have to do anything. - * However, as a side effect any interrupts occuring while td_critnest - * is non-zero will be deferred. */ -#define cpu_critical_enter() +static __inline void +cpu_critical_enter(void) +{ + struct thread *td; + + td = curthread; + td->td_md.md_savecrit = intr_disable(); +} /* * cpu_critical_exit: @@ -47,27 +49,14 @@ * This routine is called from critical_exit() on a 1->0 transition * of td_critnest, after it has been decremented to 0. We are * exiting the last critical section. - * - * Note that the td->critnest (1->0) transition interrupt race against - * our int_pending/unpend() check below is handled by the interrupt - * code for us, so we do not have to do anything fancy. */ static __inline void cpu_critical_exit(void) { - /* - * We may have to schedule pending interrupts. Create - * conditions similar to an interrupt context and call - * unpend(). - * - * note: we do this even if we are in an interrupt - * nesting level. Deep nesting is protected by - * critical_*() and if we conditionalized it then we - * would have to check int_pending again whenever - * we decrement td_intr_nesting_level to 0. - */ - if (PCPU_GET(int_pending)) - cpu_unpend(); + struct thread *td; + + td = curthread; + intr_restore(td->td_md.md_savecrit); } #else /* !__GNUC__ */ ==== //depot/projects/hammer/sys/amd64/include/pcpu.h#7 (text+ko) ==== @@ -40,12 +40,7 @@ */ #define PCPU_MD_FIELDS \ struct pcpu *pc_prvspace; /* Self-reference */ \ - register_t pc_scratch_rsp; /* User %rsp in syscall */ \ - u_int64_t pc_int_pending; /* master int pending flag */ \ - u_int64_t pc_ipending; /* pending slow interrupts */ \ - u_int64_t pc_fpending; /* pending fast interrupts */ \ - u_int64_t pc_spending /* pending soft interrupts */ - + register_t pc_scratch_rsp; /* User %rsp in syscall */ #if defined(lint) ==== //depot/projects/hammer/sys/amd64/include/proc.h#7 (text+ko) ==== @@ -41,7 +41,7 @@ * Machine-dependent part of the proc structure for AMD64. */ struct mdthread { - int __dummy__; + register_t md_savecrit; }; struct mdproc { ==== //depot/projects/hammer/sys/amd64/isa/icu_vector.S#5 (text+ko) ==== @@ -4,7 +4,6 @@ */ #define IRQ_BIT(irq_num) (1 << ((irq_num) % 8)) -#define IRQ_LBIT(irq_num) (1 << (irq_num)) #define IRQ_BYTE(irq_num) ((irq_num) >> 3) #define ENABLE_ICU1 \ @@ -16,11 +15,12 @@ outb %al,$IO_ICU2 ; /* but do second icu first ... */ \ outb %al,$IO_ICU1 /* ... then first icu */ + /* * Macros for interrupt interrupt entry, call to handler, and exit. */ -#define FAST_INTR(irq_num, vec_name, icu, enable_icus) \ +#define FAST_INTR(irq_num, vec_name, enable_icus) \ .text ; \ SUPERALIGN_TEXT ; \ IDTVEC(vec_name) ; \ @@ -44,19 +44,8 @@ movq %r14,TF_R14(%rsp) ; \ movq %r15,TF_R15(%rsp) ; \ FAKE_MCOUNT((12)*4(%rsp)) ; \ + call critical_enter ; \ movq PCPU(CURTHREAD),%rbx ; \ - cmpl $0,TD_CRITNEST(%rbx) ; \ - je 1f ; \ - movq $1,PCPU(INT_PENDING) ; \ - orq $IRQ_LBIT(irq_num),PCPU(FPENDING) ; \ - movb imen + IRQ_BYTE(irq_num),%al ; \ - orb $IRQ_BIT(irq_num),%al ; \ - movb %al,imen + IRQ_BYTE(irq_num) ; \ - outb %al,$icu+ICU_IMR_OFFSET ; \ - enable_icus ; \ - jmp 10f ; \ -1: ; \ - incl TD_CRITNEST(%rbx) ; \ incl TD_INTR_NESTING_LEVEL(%rbx) ; \ movq intr_unit + (irq_num) * 8, %rdi ; \ call *intr_handler + (irq_num) * 8 ; /* do the work ASAP */ \ @@ -64,47 +53,11 @@ incl cnt+V_INTR ; /* book-keeping can wait */ \ movq intr_countp + (irq_num) * 8,%rax ; \ incq (%rax) ; \ - decl TD_CRITNEST(%rbx) ; \ - cmpq $0,PCPU(INT_PENDING) ; \ - je 2f ; \ - call amd64_unpend ; \ -2: ; \ decl TD_INTR_NESTING_LEVEL(%rbx) ; \ -10: ; \ + call critical_exit ; \ MEXITCOUNT ; \ jmp doreti -/* - * Restart a fast interrupt that was held up by a critical section. - * This routine is called from unpend(). unpend() ensures we are - * in a critical section and deals with the interrupt nesting level - * for us. If we previously masked the irq, we have to unmask it. - * - * We have a choice. We can regenerate the irq using the 'int' - * instruction or we can create a dummy frame and call the interrupt - * handler directly. I've chosen to use the dummy-frame method. - */ -#define FAST_UNPEND(irq_num, vec_name, icu) \ - .text ; \ - SUPERALIGN_TEXT ; \ -IDTVEC(vec_name) ; \ - pushfq ; /* rflags */ \ - mov %cs,%ax ; \ - pushq %rax ; /* cs */ \ - pushq 24(%rsp) ; /* original caller rip */ \ - subq $TF_RIP,%rsp ; /* skip rest including tf_err etc */ \ - movq intr_unit + (irq_num) * 8, %rdi ; \ - call *intr_handler + (irq_num) * 8 ; /* do the work ASAP */ \ - incl cnt+V_INTR ; /* book-keeping can wait */ \ - movq intr_countp + (irq_num) * 8,%rax ; \ - incq (%rax) ; \ - movb imen + IRQ_BYTE(irq_num),%al ; \ - andb $~IRQ_BIT(irq_num),%al ; \ - movb %al,imen + IRQ_BYTE(irq_num) ; \ - outb %al,$icu+ICU_IMR_OFFSET ; \ - addq $TF_RSP,%rsp ; /* dump frame */ \ - ret - /* * Slow, threaded interrupts. * @@ -122,8 +75,7 @@ testb $SEL_RPL_MASK,TF_CS(%rsp) ; /* come from kernel? */ \ jz 1f ; /* Yes, dont swapgs again */ \ swapgs ; \ -1: ; \ - movq %rdi,TF_RDI(%rsp) ; \ +1: movq %rdi,TF_RDI(%rsp) ; \ movq %rsi,TF_RSI(%rsp) ; \ movq %rdx,TF_RDX(%rsp) ; \ movq %rcx,TF_RCX(%rsp) ; \ @@ -145,44 +97,33 @@ outb %al,$icu+ICU_IMR_OFFSET ; \ enable_icus ; \ movq PCPU(CURTHREAD),%rbx ; \ - cmpl $0,TD_CRITNEST(%rbx) ; \ - je 1f ; \ - movq $1,PCPU(INT_PENDING) ; \ - orq $IRQ_LBIT(irq_num),PCPU(IPENDING) ; \ - jmp 10f ; \ -1: ; \ incl TD_INTR_NESTING_LEVEL(%rbx) ; \ FAKE_MCOUNT(13*4(%rsp)) ; /* XXX late to avoid double count */ \ - cmpq $0,PCPU(INT_PENDING) ; \ - je 9f ; \ - call amd64_unpend ; \ -9: ; \ movq $irq_num, %rdi; /* pass the IRQ */ \ call sched_ithd ; \ decl TD_INTR_NESTING_LEVEL(%rbx) ; \ -10: ; \ MEXITCOUNT ; \ /* We could usually avoid the following jmp by inlining some of */ \ /* doreti, but it's probably better to use less cache. */ \ jmp doreti MCOUNT_LABEL(bintr) - FAST_INTR(0,fastintr0, IO_ICU1, ENABLE_ICU1) - FAST_INTR(1,fastintr1, IO_ICU1, ENABLE_ICU1) - FAST_INTR(2,fastintr2, IO_ICU1, ENABLE_ICU1) - FAST_INTR(3,fastintr3, IO_ICU1, ENABLE_ICU1) - FAST_INTR(4,fastintr4, IO_ICU1, ENABLE_ICU1) - FAST_INTR(5,fastintr5, IO_ICU1, ENABLE_ICU1) - FAST_INTR(6,fastintr6, IO_ICU1, ENABLE_ICU1) - FAST_INTR(7,fastintr7, IO_ICU1, ENABLE_ICU1) - FAST_INTR(8,fastintr8, IO_ICU2, ENABLE_ICU1_AND_2) - FAST_INTR(9,fastintr9, IO_ICU2, ENABLE_ICU1_AND_2) - FAST_INTR(10,fastintr10, IO_ICU2, ENABLE_ICU1_AND_2) - FAST_INTR(11,fastintr11, IO_ICU2, ENABLE_ICU1_AND_2) - FAST_INTR(12,fastintr12, IO_ICU2, ENABLE_ICU1_AND_2) - FAST_INTR(13,fastintr13, IO_ICU2, ENABLE_ICU1_AND_2) - FAST_INTR(14,fastintr14, IO_ICU2, ENABLE_ICU1_AND_2) - FAST_INTR(15,fastintr15, IO_ICU2, ENABLE_ICU1_AND_2) + FAST_INTR(0,fastintr0, ENABLE_ICU1) + FAST_INTR(1,fastintr1, ENABLE_ICU1) + FAST_INTR(2,fastintr2, ENABLE_ICU1) + FAST_INTR(3,fastintr3, ENABLE_ICU1) + FAST_INTR(4,fastintr4, ENABLE_ICU1) + FAST_INTR(5,fastintr5, ENABLE_ICU1) + FAST_INTR(6,fastintr6, ENABLE_ICU1) + FAST_INTR(7,fastintr7, ENABLE_ICU1) + FAST_INTR(8,fastintr8, ENABLE_ICU1_AND_2) + FAST_INTR(9,fastintr9, ENABLE_ICU1_AND_2) + FAST_INTR(10,fastintr10, ENABLE_ICU1_AND_2) + FAST_INTR(11,fastintr11, ENABLE_ICU1_AND_2) + FAST_INTR(12,fastintr12, ENABLE_ICU1_AND_2) + FAST_INTR(13,fastintr13, ENABLE_ICU1_AND_2) + FAST_INTR(14,fastintr14, ENABLE_ICU1_AND_2) + FAST_INTR(15,fastintr15, ENABLE_ICU1_AND_2) #define CLKINTR_PENDING movl $1,CNAME(clkintr_pending) /* Threaded interrupts */ @@ -203,21 +144,5 @@ INTR(14,intr14, IO_ICU2, ENABLE_ICU1_AND_2,) INTR(15,intr15, IO_ICU2, ENABLE_ICU1_AND_2,) - FAST_UNPEND(0,fastunpend0, IO_ICU1) - FAST_UNPEND(1,fastunpend1, IO_ICU1) - FAST_UNPEND(2,fastunpend2, IO_ICU1) - FAST_UNPEND(3,fastunpend3, IO_ICU1) - FAST_UNPEND(4,fastunpend4, IO_ICU1) - FAST_UNPEND(5,fastunpend5, IO_ICU1) - FAST_UNPEND(6,fastunpend6, IO_ICU1) - FAST_UNPEND(7,fastunpend7, IO_ICU1) - FAST_UNPEND(8,fastunpend8, IO_ICU2) - FAST_UNPEND(9,fastunpend9, IO_ICU2) - FAST_UNPEND(10,fastunpend10, IO_ICU2) - FAST_UNPEND(11,fastunpend11, IO_ICU2) - FAST_UNPEND(12,fastunpend12, IO_ICU2) - FAST_UNPEND(13,fastunpend13, IO_ICU2) - FAST_UNPEND(14,fastunpend14, IO_ICU2) - FAST_UNPEND(15,fastunpend15, IO_ICU2) +MCOUNT_LABEL(eintr) -MCOUNT_LABEL(eintr) ==== //depot/projects/hammer/sys/amd64/isa/intr_machdep.c#7 (text+ko) ==== @@ -87,17 +87,6 @@ IDTVEC(fastintr14), IDTVEC(fastintr15), }; -static unpendhand_t *fastunpend[ICU_LEN] = { - IDTVEC(fastunpend0), IDTVEC(fastunpend1), - IDTVEC(fastunpend2), IDTVEC(fastunpend3), - IDTVEC(fastunpend4), IDTVEC(fastunpend5), - IDTVEC(fastunpend6), IDTVEC(fastunpend7), - IDTVEC(fastunpend8), IDTVEC(fastunpend9), - IDTVEC(fastunpend10), IDTVEC(fastunpend11), - IDTVEC(fastunpend12), IDTVEC(fastunpend13), - IDTVEC(fastunpend14), IDTVEC(fastunpend15), -}; - static inthand_t *slowintr[ICU_LEN] = { IDTVEC(intr0), IDTVEC(intr1), IDTVEC(intr2), IDTVEC(intr3), IDTVEC(intr4), IDTVEC(intr5), IDTVEC(intr6), IDTVEC(intr7), @@ -532,10 +521,3 @@ return (ithread_remove_handler(cookie)); } - -void -call_fast_unpend(int irq) -{ - - fastunpend[irq](); -} From owner-p4-projects@FreeBSD.ORG Wed May 14 09:50:49 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 58A0E37B404; Wed, 14 May 2003 09:50:49 -0700 (PDT) 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 DFE2A37B401 for ; Wed, 14 May 2003 09:50:48 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA28D43FBD for ; Wed, 14 May 2003 09:50:46 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EGok0U037990 for ; Wed, 14 May 2003 09:50:46 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EGokGv037987 for perforce@freebsd.org; Wed, 14 May 2003 09:50:46 -0700 (PDT) Date: Wed, 14 May 2003 09:50:46 -0700 (PDT) Message-Id: <200305141650.h4EGokGv037987@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 31168 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 16:50:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=31168 Change 31168 by jhb@jhb_laptop on 2003/05/14 09:50:05 IFC @31165. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/cpu_switch.S#3 integrate .. //depot/projects/smpng/sys/amd64/amd64/exception.S#4 integrate .. //depot/projects/smpng/sys/amd64/amd64/genassym.c#3 integrate .. //depot/projects/smpng/sys/amd64/amd64/machdep.c#5 integrate .. //depot/projects/smpng/sys/amd64/amd64/support.S#3 integrate .. //depot/projects/smpng/sys/amd64/amd64/trap.c#4 integrate .. //depot/projects/smpng/sys/amd64/amd64/vm_machdep.c#2 integrate .. //depot/projects/smpng/sys/amd64/conf/GENERIC#3 integrate .. //depot/projects/smpng/sys/amd64/ia32/Makefile#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32.h#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_exception.S#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_genassym.c#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_misc.c#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_proto.h#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_signal.c#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_signal.h#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_sigtramp.S#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_syscall.c#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_syscall.h#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_sysent.c#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_sysvec.c#1 branch .. //depot/projects/smpng/sys/amd64/ia32/ia32_util.h#1 branch .. //depot/projects/smpng/sys/amd64/ia32/syscalls.conf#1 branch .. //depot/projects/smpng/sys/amd64/ia32/syscalls.master#1 branch .. //depot/projects/smpng/sys/amd64/include/cpufunc.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/elf.h#2 integrate .. //depot/projects/smpng/sys/amd64/include/md_var.h#3 integrate .. //depot/projects/smpng/sys/amd64/include/pcb.h#3 integrate .. //depot/projects/smpng/sys/amd64/include/segments.h#2 integrate .. //depot/projects/smpng/sys/conf/files.amd64#2 integrate .. //depot/projects/smpng/sys/conf/options.amd64#2 integrate .. //depot/projects/smpng/sys/dev/ata/atapi-cam.c#8 integrate .. //depot/projects/smpng/sys/dev/puc/pucdata.c#14 integrate .. //depot/projects/smpng/sys/kern/tty.c#35 integrate .. //depot/projects/smpng/sys/sys/signalvar.h#17 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/cpu_switch.S#3 (text+ko) ==== @@ -33,7 +33,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.139 2003/05/12 02:37:28 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.140 2003/05/14 04:10:47 peter Exp $ */ #include @@ -106,6 +106,12 @@ pushfq /* PSL */ popq PCB_RFLAGS(%r8) + /* Save kernel %gs.base */ + movl $MSR_GSBASE,%ecx + rdmsr + movl %eax,PCB_KGSBASE(%r8) + movl %edx,PCB_KGSBASE+4(%r8) + /* Save userland %fs */ movl $MSR_FSBASE,%ecx rdmsr @@ -118,6 +124,12 @@ movl %eax,PCB_GSBASE(%r8) movl %edx,PCB_GSBASE+4(%r8) + /* Save segment selector numbers */ + movl %ds,PCB_DS(%r8) + movl %es,PCB_ES(%r8) + movl %fs,PCB_FS(%r8) + movl %gs,PCB_GS(%r8) + /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) jne 1f @@ -160,6 +172,18 @@ */ movq TD_PCB(%rsi),%r8 + /* Restore segment selector numbers */ + movl PCB_DS(%r8),%ds + movl PCB_ES(%r8),%es + movl PCB_FS(%r8),%fs + movl PCB_GS(%r8),%gs + + /* Restore kernel %gs.base */ + movl $MSR_GSBASE,%ecx + movl PCB_KGSBASE(%r8),%eax + movl PCB_KGSBASE+4(%r8),%edx + wrmsr + /* Restore userland %fs */ movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax ==== //depot/projects/smpng/sys/amd64/amd64/exception.S#4 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.109 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.110 2003/05/14 04:10:47 peter Exp $ */ #include @@ -218,40 +218,6 @@ jmp alltraps_pushregs_no_rdi /* - * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) - * - * This is a SDT_SYSIDT entry point (unlike the i386 port) so that we - * can do a swapgs before enabling interrupts. This is critical because - * if we took an interrupt before swapgs, the interrupt code would see - * that it originated in supervisor mode and skip the swapgs. - */ - SUPERALIGN_TEXT -IDTVEC(int0x80_syscall) - swapgs - sti - pushq $2 /* sizeof "int 0x80" */ - subq $TF_ERR,%rsp /* skip over tf_trapno */ - movq %rdi,TF_RDI(%rsp) - movq %rsi,TF_RSI(%rsp) - movq %rdx,TF_RDX(%rsp) - movq %rcx,TF_RCX(%rsp) - movq %r8,TF_R8(%rsp) - movq %r9,TF_R9(%rsp) - movq %rax,TF_RAX(%rsp) - movq %rbx,TF_RBX(%rsp) - movq %rbp,TF_RBP(%rsp) - movq %r10,TF_R10(%rsp) - movq %r11,TF_R11(%rsp) - movq %r12,TF_R12(%rsp) - movq %r13,TF_R13(%rsp) - movq %r14,TF_R14(%rsp) - movq %r15,TF_R15(%rsp) - FAKE_MCOUNT(13*4(%rsp)) - call syscall - MEXITCOUNT - jmp doreti - -/* * Fast syscall entry point. We enter here with just our new %cs/%ss set, * and the new privilige level. We are still running on the old user stack * pointer. We have to juggle a few things around to find our stack etc. @@ -353,6 +319,7 @@ */ .text SUPERALIGN_TEXT + .globl doreti .type doreti,@function doreti: FAKE_MCOUNT(bintr) /* init "from" bintr -> doreti */ ==== //depot/projects/smpng/sys/amd64/amd64/genassym.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.144 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.145 2003/05/14 04:10:48 peter Exp $ */ #include "opt_compat.h" @@ -125,6 +125,11 @@ ASSYM(PCB_RFLAGS, offsetof(struct pcb, pcb_rflags)); ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); +ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase)); +ASSYM(PCB_DS, offsetof(struct pcb, pcb_ds)); +ASSYM(PCB_ES, offsetof(struct pcb, pcb_es)); +ASSYM(PCB_FS, offsetof(struct pcb, pcb_fs)); +ASSYM(PCB_GS, offsetof(struct pcb, pcb_gs)); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_FULLCTX, PCB_FULLCTX); @@ -181,8 +186,10 @@ ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL)); ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL)); ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL)); +ASSYM(KUC32SEL, GSEL(GUCODE32_SEL, SEL_UPL)); ASSYM(MSR_FSBASE, MSR_FSBASE); +ASSYM(MSR_GSBASE, MSR_GSBASE); ASSYM(MSR_KGSBASE, MSR_KGSBASE); ASSYM(GPROC0_SEL, GPROC0_SEL); ==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#5 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.576 2003/05/13 20:35:57 jhb Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.577 2003/05/14 04:10:48 peter Exp $ */ #include "opt_atalk.h" @@ -124,12 +124,11 @@ #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) static void cpu_startup(void *); -static void fpstate_drop(struct thread *td); static void get_fpcontext(struct thread *td, mcontext_t *mcp); static int set_fpcontext(struct thread *td, const mcontext_t *mcp); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) -int _udatasel, _ucodesel; +int _udatasel, _ucodesel, _ucode32sel; u_long atdevbase; u_int64_t modulep; /* phys addr of metadata table */ @@ -390,6 +389,16 @@ return (EJUSTRETURN); } +#ifdef COMPAT_FREEBSD4 +int +freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) +{ + + return sigreturn(td, (struct sigreturn_args *)uap); +} +#endif + + /* * Machine dependent boot() routine * @@ -467,11 +476,25 @@ { struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; + u_int64_t pc; + wrmsr(MSR_FSBASE, 0); + wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ pcb->pcb_fsbase = 0; pcb->pcb_gsbase = 0; - wrmsr(MSR_FSBASE, 0); - wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ + pcb->pcb_kgsbase = rdmsr(MSR_GSBASE); + load_ds(_udatasel); + load_es(_udatasel); + load_fs(_udatasel); + critical_enter(); + pc = rdmsr(MSR_GSBASE); + load_gs(_udatasel); /* Clobbers kernel %GS.base */ + wrmsr(MSR_GSBASE, pc); + critical_exit(); + pcb->pcb_ds = _udatasel; + pcb->pcb_es = _udatasel; + pcb->pcb_fs = _udatasel; + pcb->pcb_gs = _udatasel; bzero((char *)regs, sizeof(struct trapframe)); regs->tf_rip = entry; @@ -590,7 +613,7 @@ 0xfffff, /* length - all address space */ SDT_MEMERA, /* segment type */ SEL_UPL, /* segment descriptor priority level */ - 0, /* segment descriptor present */ + 1, /* segment descriptor present */ 0, /* long */ 1, /* default 32 vs 16 bit size */ 1 /* limit granularity (byte/page units)*/ }, @@ -661,7 +684,7 @@ IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm), IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot), IDTVEC(page), IDTVEC(mchk), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), - IDTVEC(xmm), IDTVEC(dblfault), IDTVEC(int0x80_syscall), + IDTVEC(xmm), IDTVEC(dblfault), IDTVEC(fast_syscall), IDTVEC(fast_syscall32); void @@ -1232,7 +1255,6 @@ setidt(17, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0); setidt(18, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0); setidt(19, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0); - setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0); r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (long) idt; @@ -1290,10 +1312,12 @@ _ucodesel = GSEL(GUCODE_SEL, SEL_UPL); _udatasel = GSEL(GUDATA_SEL, SEL_UPL); + _ucode32sel = GSEL(GUCODE32_SEL, SEL_UPL); /* setup proc 0's pcb */ thread0.td_pcb->pcb_flags = 0; /* XXXKSE */ thread0.td_pcb->pcb_cr3 = IdlePML4; + thread0.td_pcb->pcb_kgsbase = (u_int64_t)pc; thread0.td_frame = &proc0_tf; } @@ -1613,7 +1637,7 @@ return (0); } -static void +void fpstate_drop(struct thread *td) { register_t s; ==== //depot/projects/smpng/sys/amd64/amd64/support.S#3 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.99 2003/05/11 22:38:54 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.100 2003/05/14 03:38:13 peter Exp $ */ #include @@ -358,6 +358,9 @@ movq $0,PCB_ONFAULT(%rcx) ret +ENTRY(fuword) + jmp fuword64 + ENTRY(fuword32) movq PCPU(CURPCB),%rcx movq $fusufault,PCB_ONFAULT(%rcx) @@ -366,15 +369,10 @@ cmpq %rax,%rdi /* verify address is valid */ ja fusufault -/* XXX use the 64 extend */ - xorq %rax, %rax movl (%rdi),%eax movq $0,PCB_ONFAULT(%rcx) ret -ENTRY(fuword) - jmp fuword32 - /* * These two routines are called from the profiling code, potentially * at interrupt time. If they fail, that's okay, good things will @@ -397,8 +395,6 @@ cmpq %rax,%rdi ja fusufault -/* XXX use the 64 extend */ - xorq %rax, %rax movzwl (%rdi),%eax movq $0,PCB_ONFAULT(%rcx) ret @@ -414,8 +410,6 @@ cmpq %rax,%rdi ja fusufault -/* XXX use the 64 extend */ - xorq %rax, %rax movzbl (%rdi),%eax movq $0,PCB_ONFAULT(%rcx) ret @@ -448,6 +442,9 @@ movq %rax,PCB_ONFAULT(%rcx) ret +ENTRY(suword) + jmp suword64 + ENTRY(suword32) movq PCPU(CURPCB),%rcx movq $fusufault,PCB_ONFAULT(%rcx) @@ -462,9 +459,6 @@ movq %rax,PCB_ONFAULT(%rcx) ret -ENTRY(suword) - jmp suword32 - /* * suword16 - MP SAFE */ ==== //depot/projects/smpng/sys/amd64/amd64/trap.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.256 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.257 2003/05/14 04:10:48 peter Exp $ */ /* @@ -91,7 +91,7 @@ extern void trap(struct trapframe frame); extern void syscall(struct trapframe frame); -static int trap_pfault(struct trapframe *, int, vm_offset_t); +static int trap_pfault(struct trapframe *, int); static void trap_fatal(struct trapframe *, vm_offset_t); void dblfault_handler(void); @@ -161,13 +161,13 @@ struct proc *p = td->td_proc; u_int sticks = 0; int i = 0, ucode = 0, type, code; - vm_offset_t eva; atomic_add_int(&cnt.v_trap, 1); type = frame.tf_trapno; #ifdef DDB if (db_active) { + vm_offset_t eva; eva = (type == T_PAGEFLT ? frame.tf_addr : 0); trap_fatal(&frame, eva); goto out; @@ -202,7 +202,6 @@ } } - eva = 0; code = frame.tf_err; if (type == T_PAGEFLT) { /* @@ -213,9 +212,8 @@ * kernel can print out a useful trap message and even get * to the debugger. */ - eva = frame.tf_addr; if (PCPU_GET(spinlocks) != NULL) - trap_fatal(&frame, eva); + trap_fatal(&frame, frame.tf_addr); } #ifdef DEVICE_POLLING @@ -261,7 +259,7 @@ break; case T_PAGEFLT: /* page fault */ - i = trap_pfault(&frame, TRUE, eva); + i = trap_pfault(&frame, TRUE); if (i == -1) goto userout; if (i == 0) @@ -331,7 +329,7 @@ ("kernel trap doesn't have ucred")); switch (type) { case T_PAGEFLT: /* page fault */ - (void) trap_pfault(&frame, FALSE, eva); + (void) trap_pfault(&frame, FALSE); goto out; case T_DNA: @@ -430,7 +428,7 @@ #endif /* DEV_ISA */ } - trap_fatal(&frame, eva); + trap_fatal(&frame, 0); goto out; } @@ -445,7 +443,7 @@ uprintf("fatal process exception: %s", trap_msg[type]); if ((type == T_PAGEFLT) || (type == T_PROTFLT)) - uprintf(", fault VA = 0x%lx", eva); + uprintf(", fault VA = 0x%lx", frame.tf_addr); uprintf("\n"); } #endif @@ -462,10 +460,9 @@ } static int -trap_pfault(frame, usermode, eva) +trap_pfault(frame, usermode) struct trapframe *frame; int usermode; - vm_offset_t eva; { vm_offset_t va; struct vmspace *vm = NULL; @@ -474,6 +471,7 @@ vm_prot_t ftype; struct thread *td = curthread; struct proc *p = td->td_proc; + vm_offset_t eva = frame->tf_addr; va = trunc_page(eva); if (va >= KERNBASE) { @@ -813,4 +811,3 @@ mtx_assert(&sched_lock, MA_NOTOWNED); mtx_assert(&Giant, MA_NOTOWNED); } - ==== //depot/projects/smpng/sys/amd64/amd64/vm_machdep.c#2 (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/amd64/amd64/vm_machdep.c,v 1.207 2003/05/01 01:05:22 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.208 2003/05/14 04:10:48 peter Exp $ */ #include "opt_isa.h" @@ -76,7 +76,6 @@ #include static void cpu_reset_real(void); -extern int _ucodesel, _udatasel; /* * Finish a fork operation, with process p2 nearly set up. @@ -143,6 +142,7 @@ * pcb2->pcb_savefpu: cloned above. * pcb2->pcb_flags: cloned above. * pcb2->pcb_onfault: cloned above (always NULL here?). + * pcb2->pcb_[fg]sbase: cloned above */ /* ==== //depot/projects/smpng/sys/amd64/conf/GENERIC#3 (text+ko) ==== @@ -16,12 +16,14 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.384 2003/05/09 18:26:06 peter Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.385 2003/05/14 04:10:48 peter Exp $ machine amd64 cpu HAMMER ident GENERIC maxusers 0 +options IA32 +options COMPAT_FREEBSD4 makeoptions NO_MODULES=not_yet @@ -41,6 +43,10 @@ options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options SYSVMSG +options SYSVSEM +options SYSVSHM + device isa device pci ==== //depot/projects/smpng/sys/amd64/include/cpufunc.h#2 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.134 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.135 2003/05/14 04:10:49 peter Exp $ */ /* @@ -447,7 +447,6 @@ __asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory"); } -/* XXX these are replaced with rdmsr/wrmsr */ static __inline u_int rfs(void) { @@ -465,6 +464,18 @@ } static __inline void +load_ds(u_int sel) +{ + __asm __volatile("movl %0,%%ds" : : "rm" (sel)); +} + +static __inline void +load_es(u_int sel) +{ + __asm __volatile("movl %0,%%es" : : "rm" (sel)); +} + +static __inline void load_fs(u_int sel) { __asm __volatile("movl %0,%%fs" : : "rm" (sel)); ==== //depot/projects/smpng/sys/amd64/include/elf.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/elf.h,v 1.14 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/elf.h,v 1.15 2003/05/14 04:10:49 peter Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -33,9 +33,12 @@ * ELF definitions for the AMD64 architecture. */ -#include /* Definitions common to all 64 bit architectures. */ +#ifndef __ELF_WORD_SIZE #define __ELF_WORD_SIZE 64 /* Used by */ +#endif +#include /* Definitions common to all 32 bit architectures. */ +#include /* Definitions common to all 64 bit architectures. */ #include #define ELF_ARCH EM_X86_64 @@ -48,7 +51,14 @@ * The i386 supplement to the SVR4 ABI specification names this "auxv_t", * but POSIX lays claim to all symbols ending with "_t". */ +typedef struct { /* Auxiliary vector entry on initial stack */ + int a_type; /* Entry type. */ + union { + int a_val; /* Integer value. */ + } a_un; +} Elf32_Auxinfo; + typedef struct { /* Auxiliary vector entry on initial stack */ long a_type; /* Entry type. */ union { @@ -118,7 +128,11 @@ #define R_X86_64_COUNT 16 /* Count of defined relocation types. */ /* Define "machine" characteristics */ -#define ELF_TARG_CLASS ELFCLASS64 +#if __ELF_WORD_SIZE == 32 +#define ELF_TARG_CLASS ELFCLASS32 +#else +#define ELF_TARG_CLASS ELFCLASS64 +#endif #define ELF_TARG_DATA ELFDATA2LSB #define ELF_TARG_MACH EM_X86_64 #define ELF_TARG_VER 1 ==== //depot/projects/smpng/sys/amd64/include/md_var.h#3 (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/amd64/include/md_var.h,v 1.65 2003/05/11 22:53:43 peter Exp $ + * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.66 2003/05/14 04:10:49 peter Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -69,5 +69,6 @@ int is_physical_memory(vm_offset_t addr); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); void swi_vm(void *); +void fpstate_drop(struct thread *td); #endif /* !_MACHINE_MD_VAR_H_ */ ==== //depot/projects/smpng/sys/amd64/include/pcb.h#3 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)pcb.h 5.10 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.51 2003/05/12 02:37:29 peter Exp $ + * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.52 2003/05/14 04:10:49 peter Exp $ */ #ifndef _I386_PCB_H_ @@ -59,6 +59,11 @@ register_t pcb_rflags; register_t pcb_fsbase; register_t pcb_gsbase; + register_t pcb_kgsbase; + u_int32_t pcb_ds; + u_int32_t pcb_es; + u_int32_t pcb_fs; + u_int32_t pcb_gs; struct savefpu pcb_save; u_long pcb_flags; ==== //depot/projects/smpng/sys/amd64/include/segments.h#2 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/segments.h,v 1.34 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/segments.h,v 1.35 2003/05/14 04:10:49 peter Exp $ */ #ifndef _MACHINE_SEGMENTS_H_ @@ -166,7 +166,7 @@ /* * Size of IDT table */ -#define NIDT 129 /* 32 reserved, 16 h/w, 0 s/w, linux's 0x80 */ +#define NIDT 256 /* 32 reserved, 16 h/w, 0 s/w, linux's 0x80 */ #define NRSVIDT 32 /* reserved entries for cpu exceptions */ /* ==== //depot/projects/smpng/sys/conf/files.amd64#2 (text+ko) ==== @@ -1,13 +1,26 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.13 2003/05/03 03:30:29 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.14 2003/05/14 04:10:49 peter Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and # dependency lines other than the first are silently ignored. # +ia32_genassym.o optional ia32 \ + dependency "$S/amd64/ia32/ia32_genassym.c" \ + compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + no-obj no-implicit-rule \ + clean "ia32_genassym.o" +# +ia32_assym.h optional ia32 \ + dependency "$S/kern/genassym.sh ia32_genassym.o" \ + compile-with "sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "ia32_assym.h" +# + dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd @@ -64,7 +77,14 @@ amd64/pci/pci_cfgreg.c optional pci amd64/pci/pci_bus.c optional pci - +amd64/ia32/ia32_misc.c optional ia32 +amd64/ia32/ia32_sysent.c optional ia32 +amd64/ia32/ia32_sysvec.c optional ia32 +amd64/ia32/ia32_signal.c optional ia32 +amd64/ia32/ia32_sigtramp.S optional ia32 +amd64/ia32/ia32_exception.S optional ia32 +amd64/ia32/ia32_syscall.c optional ia32 +kern/imgact_elf32.c optional ia32 # This file tells config what files go into building a kernel, # files marked standard are always included. ==== //depot/projects/smpng/sys/conf/options.amd64#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.amd64,v 1.6 2003/05/01 02:59:24 peter Exp $ +# $FreeBSD: src/sys/conf/options.amd64,v 1.7 2003/05/14 04:10:49 peter Exp $ # Options specific to the AMD x86-64 platform kernels MAXMEM @@ -59,3 +59,4 @@ PSM_HOOKRESUME opt_psm.h PSM_RESETAFTERSUSPEND opt_psm.h PSM_DEBUG opt_psm.h +IA32 ==== //depot/projects/smpng/sys/dev/ata/atapi-cam.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.15 2003/03/08 08:01:28 phk Exp $ + * $FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.16 2003/05/14 14:20:22 thomas Exp $ */ #include @@ -167,7 +167,14 @@ void atapi_cam_reinit_bus(struct ata_channel *ata_ch) { struct atapi_xpt_softc *scp = get_softc(ata_ch); - reinit_bus(scp, RESET); + + /* + * scp might be null if the bus is being reinitialised during + * the boot-up sequence, before the ATAPI bus is registered. + */ + + if (scp != NULL) + reinit_bus(scp, RESET); } static void ==== //depot/projects/smpng/sys/dev/puc/pucdata.c#14 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.20 2003/04/30 22:15:47 sobomax Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.21 2003/05/14 09:37:46 wilko Exp $"); /* * PCI "universal" communications card driver configuration data (used to @@ -891,6 +891,19 @@ }, }, + /* NetMos 4S0P PCI: 4S, 0P */ + { "NetMos NM9845 Quad UART", + NULL, + { 0x9710, 0x9845, 0, 0 }, + { 0xffff, 0xffff, 0, 0 }, + { + { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, + { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ }, + { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ }, + { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ }, + }, + }, + /* * This is the Middle Digital, Inc. PCI-Weasel, which * uses a PCI interface implemented in FPGA. ==== //depot/projects/smpng/sys/kern/tty.c#35 (text+ko) ==== @@ -44,7 +44,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $FreeBSD: src/sys/kern/tty.c,v 1.200 2003/05/13 20:35:59 jhb Exp $ + * $FreeBSD: src/sys/kern/tty.c,v 1.201 2003/05/14 00:03:55 ps Exp $ */ /*- @@ -1601,7 +1601,7 @@ splx(s); sx_slock(&proctree_lock); PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigignore, SIGTTIN) || + if (SIGISMEMBER(p->p_sigacts->ps_sigignore, SIGTTIN) || SIGISMEMBER(td->td_sigmask, SIGTTIN) || (p->p_flag & P_PPWAIT) || p->p_pgrp->pg_jobc == 0) { PROC_UNLOCK(p); ==== //depot/projects/smpng/sys/sys/signalvar.h#17 (text+ko) ==== @@ -31,12 +31,13 @@ * SUCH DAMAGE. * * @(#)signalvar.h 8.6 (Berkeley) 2/19/95 - * $FreeBSD: src/sys/sys/signalvar.h,v 1.61 2003/05/13 20:36:02 jhb Exp $ + * $FreeBSD: src/sys/sys/signalvar.h,v 1.62 2003/05/14 15:00:24 jhb Exp $ */ #ifndef _SYS_SIGNALVAR_H_ #define _SYS_SIGNALVAR_H_ +#include #include #include #include From owner-p4-projects@FreeBSD.ORG Wed May 14 10:17:25 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8287937B404; Wed, 14 May 2003 10:17:24 -0700 (PDT) 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 378AA37B401 for ; Wed, 14 May 2003 10:17:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C16D443FA3 for ; Wed, 14 May 2003 10:17:23 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EHHN0U040215 for ; Wed, 14 May 2003 10:17:23 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EHHNXm040212 for perforce@freebsd.org; Wed, 14 May 2003 10:17:23 -0700 (PDT) Date: Wed, 14 May 2003 10:17:23 -0700 (PDT) Message-Id: <200305141717.h4EHHNXm040212@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@tislabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 31175 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 17:17:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=31175 Change 31175 by cvance@cvance_korben on 2003/05/14 10:16:29 Remove outdated status file Update project mailing address Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/README#2 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/STATUS#2 delete Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/README#2 (text+ko) ==== @@ -19,7 +19,7 @@ http://www.nsa.gov/selinux/ Or send email to: - cboss@tislabs.com + cboss@nailabs.com For more information on the current status of SEBSD, please refer to the STATUS file in this directory. From owner-p4-projects@FreeBSD.ORG Wed May 14 12:59:47 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2E37F37B404; Wed, 14 May 2003 12:59:47 -0700 (PDT) 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 BEEBB37B401 for ; Wed, 14 May 2003 12:59:46 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6841543F75 for ; Wed, 14 May 2003 12:59:46 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EJxk0U053687 for ; Wed, 14 May 2003 12:59:46 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EJxjoj053684 for perforce@freebsd.org; Wed, 14 May 2003 12:59:45 -0700 (PDT) Date: Wed, 14 May 2003 12:59:45 -0700 (PDT) Message-Id: <200305141959.h4EJxjoj053684@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31183 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 19:59:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=31183 Change 31183 by jmallett@jmallett_dalek on 2003/05/14 12:59:33 Use vm_offset_t, not 'unsigned' for the MIPS_foo_TO_bar macros. Add XKSEG definition. Might be good to redo this header with Modern Times in mind, at least the addr bits. Affected files ... .. //depot/projects/mips/sys/mips/include/cpuregs.h#8 edit Differences ... ==== //depot/projects/mips/sys/mips/include/cpuregs.h#8 (text+ko) ==== @@ -76,6 +76,7 @@ */ #define MIPS_KUSEG_START 0x0 +#define MIPS_XKSEG_START 0xc000000000000000 #define MIPS_KSEG0_START 0xffffffff80000000 #define MIPS_KSEG1_START 0xffffffffa0000000 #define MIPS_KSEG2_START 0xffffffffc0000000 @@ -84,16 +85,14 @@ #define MIPS_PHYS_MASK 0x000000001fffffff -#define MIPS_KSEG0_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) -#define MIPS_PHYS_TO_KSEG0(x) ((unsigned)(x) | MIPS_KSEG0_START) -#define MIPS_KSEG1_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) -#define MIPS_PHYS_TO_KSEG1(x) ((unsigned)(x) | MIPS_KSEG1_START) -#define MIPS_KSEG2_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) -#define MIPS_PHYS_TO_KSEG2(x) ((unsigned)(x) | MIPS_KSEG2_START) +#define MIPS_KSEG0_TO_PHYS(x) ((vm_offset_t)(x) & MIPS_PHYS_MASK) +#define MIPS_PHYS_TO_KSEG0(x) ((vm_offset_t)(x) | MIPS_KSEG0_START) +#define MIPS_KSEG1_TO_PHYS(x) ((vm_offset_t)(x) & MIPS_PHYS_MASK) +#define MIPS_PHYS_TO_KSEG1(x) ((vm_offset_t)(x) | MIPS_KSEG1_START) /* Map virtual address to index in mips3 r4k virtually-indexed cache */ #define MIPS3_VA_TO_CINDEX(x) \ - ((unsigned)(x) & 0xffffff | MIPS_KSEG0_START) + ((vm_offset_t)(x) & 0xffffff | MIPS_KSEG0_START) #define MIPS_PHYS_TO_XKPHYS(cca,x) \ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x)) From owner-p4-projects@FreeBSD.ORG Wed May 14 13:07:58 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9615A37B404; Wed, 14 May 2003 13:07:57 -0700 (PDT) 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 35F4437B401 for ; Wed, 14 May 2003 13:07:57 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D60E443F75 for ; Wed, 14 May 2003 13:07:56 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EK7u0U054947 for ; Wed, 14 May 2003 13:07:56 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EK7ufM054944 for perforce@freebsd.org; Wed, 14 May 2003 13:07:56 -0700 (PDT) Date: Wed, 14 May 2003 13:07:56 -0700 (PDT) Message-Id: <200305142007.h4EK7ufM054944@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31184 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 20:07:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=31184 Change 31184 by jmallett@jmallett_dalek on 2003/05/14 13:07:50 Use moderny user segment maximum, and remove TX39 cruft. Affected files ... .. //depot/projects/mips/sys/mips/include/vmparam.h#7 edit Differences ... ==== //depot/projects/mips/sys/mips/include/vmparam.h#7 (text+ko) ==== @@ -122,14 +122,10 @@ #define VM_INITIAL_PAGEIN 16 #endif #define VM_MIN_ADDRESS ((vm_offset_t)0x0000000000000000) -#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xFFFFFFFF80000000) -#define VM_MAX_ADDRESS ((vm_offset_t)0xFFFFFFFF80000000) +#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x0000010000000000) +#define VM_MAX_ADDRESS ((vm_offset_t)0x0000010000000000) #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xFFFFFFFF80000000) -#ifdef ENABLE_MIPS_TX3900 -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFF000000) -#else #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFFFFFFFFA0000000) -#endif #define KERNBASE (VM_MIN_KERNEL_ADDRESS) /* virtual sizes (bytes) for various kernel submaps */ From owner-p4-projects@FreeBSD.ORG Wed May 14 13:09:00 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9E47337B404; Wed, 14 May 2003 13:08:59 -0700 (PDT) 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 3EF0E37B401 for ; Wed, 14 May 2003 13:08:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCD3243F3F for ; Wed, 14 May 2003 13:08:58 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EK8w0U054977 for ; Wed, 14 May 2003 13:08:58 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EK8wH0054974 for perforce@freebsd.org; Wed, 14 May 2003 13:08:58 -0700 (PDT) Date: Wed, 14 May 2003 13:08:58 -0700 (PDT) Message-Id: <200305142008.h4EK8wH0054974@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31185 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 20:09:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=31185 Change 31185 by jmallett@jmallett_dalek on 2003/05/14 13:08:56 Move some stuff around, remove cruft. Affected files ... .. //depot/projects/mips/sys/mips/include/locore.h#4 edit .. //depot/projects/mips/sys/mips/include/md_var.h#8 edit Differences ... ==== //depot/projects/mips/sys/mips/include/locore.h#4 (text+ko) ==== @@ -79,71 +79,6 @@ uint32_t mips3_cp0_wired_read(void); void mips3_cp0_wired_write(uint32_t); -uint64_t mips3_ld(uint64_t *); -void mips3_sd(uint64_t *, uint64_t); - -static __inline uint32_t mips3_lw_a64(uint64_t addr) - __attribute__((__unused__)); -static __inline void mips3_sw_a64(uint64_t addr, uint32_t val) - __attribute__ ((__unused__)); - -static __inline uint32_t -mips3_lw_a64(uint64_t addr) -{ - uint32_t addrlo, addrhi; - uint32_t rv; - uint32_t sr; - - sr = mips_cp0_status_read(); - mips_cp0_status_write(sr | MIPS3_SR_KX); - - addrlo = addr & 0xffffffff; - addrhi = addr >> 32; - __asm__ __volatile__ (" \n\ - .set push \n\ - .set mips3 \n\ - .set noreorder \n\ - .set noat \n\ - dsll32 $3, %1, 0 \n\ - dsll32 $1, %2, 0 \n\ - dsrl32 $3, $3, 0 \n\ - or $1, $1, $3 \n\ - lw %0, 0($1) \n\ - .set pop \n\ - " : "=r"(rv) : "r"(addrlo), "r"(addrhi) : "$1", "$3" ); - - mips_cp0_status_write(sr); - - return (rv); -} - -static __inline void -mips3_sw_a64(uint64_t addr, uint32_t val) -{ - uint32_t addrlo, addrhi; - uint32_t sr; - - sr = mips_cp0_status_read(); - mips_cp0_status_write(sr | MIPS3_SR_KX); - - addrlo = addr & 0xffffffff; - addrhi = addr >> 32; - __asm__ __volatile__ (" \n\ - .set push \n\ - .set mips3 \n\ - .set noreorder \n\ - .set noat \n\ - dsll32 $3, %1, 0 \n\ - dsll32 $1, %2, 0 \n\ - dsrl32 $3, $3, 0 \n\ - or $1, $1, $3 \n\ - sw %0, 0($1) \n\ - .set pop \n\ - " : : "r"(val), "r"(addrlo), "r"(addrhi) : "$1", "$3" ); - - mips_cp0_status_write(sr); -} - /* * A vector with an entry for each mips-ISA-level dependent * locore function, and macros which jump through it. @@ -159,12 +94,8 @@ void (*wbflush)(void); } mips_locore_jumpvec_t; -void mips_set_wbflush(void (*)(void)); void mips_wait_idle(void); -void stacktrace(void); -void logstacktrace(void); - /* * The "active" locore-fuction vector, and */ @@ -210,10 +141,6 @@ * such as cache size, from locore to higher-level code (e.g., pmap). */ -extern int mips_num_tlb_entries; - -void mips_pagecopy(caddr_t dst, caddr_t src); -void mips_pagezero(caddr_t dst); #ifdef __HAVE_MIPS_MACHDEP_CACHE_CONFIG void mips_machdep_cache_config(void); ==== //depot/projects/mips/sys/mips/include/md_var.h#8 (text+ko) ==== @@ -31,6 +31,8 @@ extern vm_offset_t kstack0; extern vm_paddr_t kstack0_phys; +extern int mips_num_tlb_entries; + extern int cpu_id; extern int fpu_id; From owner-p4-projects@FreeBSD.ORG Wed May 14 13:10:04 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CCE0637B407; Wed, 14 May 2003 13:10:03 -0700 (PDT) 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 4AF9237B405 for ; Wed, 14 May 2003 13:10:03 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E315443FA3 for ; Wed, 14 May 2003 13:10:00 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EKA00U055011 for ; Wed, 14 May 2003 13:10:00 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EKA0Ub055008 for perforce@freebsd.org; Wed, 14 May 2003 13:10:00 -0700 (PDT) Date: Wed, 14 May 2003 13:10:00 -0700 (PDT) Message-Id: <200305142010.h4EKA0Ub055008@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31186 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 20:10:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=31186 Change 31186 by jmallett@jmallett_dalek on 2003/05/14 13:09:55 Nuke mips_set_wbflush. Affected files ... .. //depot/projects/mips/sys/mips/mips/machdep.c#24 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/machdep.c#24 (text+ko) ==== @@ -777,15 +777,6 @@ CPU_IDLE = (long *)mips_wait_idle; } -void -mips_set_wbflush(flush_fn) - void (*flush_fn)(void); -{ -#undef wbflush - mips_locore_jumpvec.wbflush = flush_fn; - (*flush_fn)(); -} - /* * Identify product revision IDs of cpu and fpu. */ From owner-p4-projects@FreeBSD.ORG Wed May 14 13:12:05 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C5EDE37B401; Wed, 14 May 2003 13:12:04 -0700 (PDT) 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 6478937B404 for ; Wed, 14 May 2003 13:12:04 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E392543FAF for ; Wed, 14 May 2003 13:12:03 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EKC30U055162 for ; Wed, 14 May 2003 13:12:03 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EKC3n3055159 for perforce@freebsd.org; Wed, 14 May 2003 13:12:03 -0700 (PDT) Date: Wed, 14 May 2003 13:12:03 -0700 (PDT) Message-Id: <200305142012.h4EKC3n3055159@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31187 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 20:12:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=31187 Change 31187 by jmallett@jmallett_dalek on 2003/05/14 13:11:06 real memory in megs not in k. Affected files ... .. //depot/projects/mips/sys/mips/mips/machdep.c#25 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/machdep.c#25 (text+ko) ==== @@ -216,7 +216,8 @@ { cpu_identify(); - printf("real memory = %lu (%lu MB)\n", physsz, physsz / 1024); + printf("real memory = %lu (%lu MB)\n", physsz, + physsz / (1024 * 1024)); vm_ksubmap_init(&kmi); bufinit(); From owner-p4-projects@FreeBSD.ORG Wed May 14 13:25:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 97A2F37B404; Wed, 14 May 2003 13:25:21 -0700 (PDT) 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 376AF37B401 for ; Wed, 14 May 2003 13:25:21 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 985E543F75 for ; Wed, 14 May 2003 13:25:20 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EKPK0U055618 for ; Wed, 14 May 2003 13:25:20 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EKPKaA055615 for perforce@freebsd.org; Wed, 14 May 2003 13:25:20 -0700 (PDT) Date: Wed, 14 May 2003 13:25:20 -0700 (PDT) Message-Id: <200305142025.h4EKPKaA055615@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31188 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 20:25:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=31188 Change 31188 by peter@peter_hammer on 2003/05/14 13:24:53 IFC @31179 Affected files ... .. //depot/projects/hammer/etc/mtree/BSD.x11-4.dist#4 integrate .. //depot/projects/hammer/lib/libkvm/kvm_proc.c#11 integrate .. //depot/projects/hammer/release/alpha/dokern.sh#6 integrate .. //depot/projects/hammer/release/alpha/drivers.conf#8 integrate .. //depot/projects/hammer/sbin/ifconfig/ifconfig.8#9 integrate .. //depot/projects/hammer/share/man/man4/iir.4#3 integrate .. //depot/projects/hammer/sys/dev/ata/atapi-cam.c#7 integrate .. //depot/projects/hammer/sys/dev/puc/pucdata.c#7 integrate .. //depot/projects/hammer/sys/sys/signalvar.h#7 integrate .. //depot/projects/hammer/usr.sbin/rpc.lockd/lock_proc.c#2 integrate Differences ... ==== //depot/projects/hammer/etc/mtree/BSD.x11-4.dist#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.x11-4.dist,v 1.22 2003/01/16 02:17:28 anholt Exp $ +# $FreeBSD: src/etc/mtree/BSD.x11-4.dist,v 1.23 2003/05/14 07:23:54 anholt Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -27,6 +27,8 @@ .. Xaw .. + Xcursor + .. Xft .. Xmu @@ -115,6 +117,8 @@ .. fs .. + icons + .. lbxproxy .. locale @@ -124,6 +128,8 @@ .. common .. + el_GR.UTF-8 + .. en_US.UTF-8 .. en_US.utf @@ -142,6 +148,8 @@ .. iso8859-10 .. + iso8859-11 + .. iso8859-13 .. iso8859-14 @@ -172,14 +180,22 @@ .. ja.SJIS .. + ja_JP.UTF-8 + .. ko .. + ko_KR.UTF-8 + .. koi8-c .. koi8-r .. koi8-u .. + lib + common + .. + .. microsoft-cp1251 .. microsoft-cp1255 @@ -200,6 +216,8 @@ .. th_TH.TACTIS .. + th_TH.UTF-8 + .. tscii-0 .. vi_VN.tcvn @@ -220,6 +238,10 @@ .. zh_TW.Big5 .. + zh_TW.UTF-8 + .. + zh_TW.big5 + .. .. proxymngr .. @@ -241,6 +263,8 @@ .. xedit lisp + progmodes + .. .. .. xinit @@ -285,6 +309,8 @@ .. nec .. + pc + .. sgi .. sony @@ -322,6 +348,8 @@ .. .. libdata + pkgconfig + .. .. libexec .. ==== //depot/projects/hammer/lib/libkvm/kvm_proc.c#11 (text+ko) ==== @@ -42,7 +42,7 @@ #endif #include -__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.66 2003/04/10 17:41:40 julian Exp $"); +__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.68 2003/05/14 15:01:20 jhb Exp $"); /* * Proc traversal interface for kvm. ps and w are (probably) the exclusive @@ -100,9 +100,7 @@ struct session sess; struct tty tty; struct vmspace vmspace; -#ifdef JHB_ME_HARDER - struct procsig procsig; -#endif + struct sigacts sigacts; struct pstats pstats; struct ucred ucred; struct thread mtd; @@ -194,17 +192,15 @@ kp->ki_textvp = proc.p_textvp; kp->ki_fd = proc.p_fd; kp->ki_vmspace = proc.p_vmspace; -#if JHB_ME_HARDER - if (proc.p_procsig != NULL) { - if (KREAD(kd, (u_long)proc.p_procsig, &procsig)) { + if (proc.p_sigacts != NULL) { + if (KREAD(kd, (u_long)proc.p_sigacts, &sigacts)) { _kvm_err(kd, kd->program, - "can't read procsig at %x", proc.p_procsig); + "can't read sigacts at %x", proc.p_sigacts); return (-1); } - kp->ki_sigignore = procsig.ps_sigignore; - kp->ki_sigcatch = procsig.ps_sigcatch; + kp->ki_sigignore = sigacts.ps_sigignore; + kp->ki_sigcatch = sigacts.ps_sigcatch; } -#endif if ((proc.p_sflag & PS_INMEM) && proc.p_stats != NULL) { if (KREAD(kd, (u_long)proc.p_stats, &pstats)) { _kvm_err(kd, kd->program, ==== //depot/projects/hammer/release/alpha/dokern.sh#6 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/release/alpha/dokern.sh,v 1.68 2003/05/07 18:14:00 obrien Exp $ +# $FreeBSD: src/release/alpha/dokern.sh,v 1.69 2003/05/14 16:01:02 obrien Exp $ # # XXX sort by order in GENERIC, not alphabetical @@ -59,6 +59,9 @@ -e '/ axe /d' \ -e '/ cue /d' \ -e '/ kue /d' \ + -e '/ firewire /d' \ + -e '/ sbp /d' \ + -e '/ fwe /d' \ echo "options SCSI_NO_OP_STRINGS" echo "options SCSI_NO_SENSE_STRINGS" ==== //depot/projects/hammer/release/alpha/drivers.conf#8 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/alpha/drivers.conf,v 1.16 2003/05/12 13:12:08 wilko Exp $ +# $FreeBSD: src/release/alpha/drivers.conf,v 1.17 2003/05/14 15:38:44 obrien Exp $ # # drv: driver name in kernel config file @@ -43,7 +43,7 @@ miibus miibus 2 network "MII bus support" pcn if_pcn 2 network "AMD Am79C97x PCI 10/100" rl if_rl 2 network "RealTek 8129/8139" -tl if_tl 2 network "Texas Instruments ThunderLAN" +tl if_tl 3 network "Texas Instruments ThunderLAN" txp if_txp 2 network "3Com 3XP Typhoon/Sidewinder (3CR990)" vr if_vr 2 network "VIA Rhine, Rhine II" vx if_vx 2 network "3Com 3c590 and 3c595 EtherLink III" ==== //depot/projects/hammer/sbin/ifconfig/ifconfig.8#9 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 -.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.70 2003/05/13 08:29:49 sheldonh Exp $ +.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.71 2003/05/14 16:22:16 ru Exp $ .\" .Dd April 28, 2003 .Dt IFCONFIG 8 @@ -307,12 +307,12 @@ operating mode on the interface to .Ar mode . For IEEE 802.11 wireless interfaces that support multiple operating modes -this directive is used to select between 802.11a (\c -.Dq 11a ), -802.11b (\c -.Dq 11b ), -and 802.11g (\c -.Dq 11g ) +this directive is used to select between 802.11a +.Pq Dq 11a , +802.11b +.Pq Dq 11b , +and 802.11g +.Pq Dq 11g operating modes. .It Cm rxcsum , txcsum If the driver supports user-configurable checksum offloading, ==== //depot/projects/hammer/share/man/man4/iir.4#3 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/share/man/man4/iir.4,v 1.3 2003/03/25 18:13:20 trhodes Exp $ +.\" $FreeBSD: src/share/man/man4/iir.4,v 1.4 2003/05/14 17:53:40 trhodes Exp $ .\" Written by Tom Rhodes .\" This file is in the public domain. .\" @@ -63,11 +63,3 @@ .An Tom Rhodes Aq trhodes@FreeBSD.org and is based on information supplied by the driver authors and the website of .An Mike Smith Aq msmith@FreeBSD.org . -.Sh BUGS -During a -.Fx -install, the -.Nm -controller appears to correctly probe, but finds no disk devices. -The card in question is an Intel SRCU32 RAID controller with 32Mb RAM, -Firmware revision 2.33.01. ==== //depot/projects/hammer/sys/dev/ata/atapi-cam.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.15 2003/03/08 08:01:28 phk Exp $ + * $FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.16 2003/05/14 14:20:22 thomas Exp $ */ #include @@ -167,7 +167,14 @@ void atapi_cam_reinit_bus(struct ata_channel *ata_ch) { struct atapi_xpt_softc *scp = get_softc(ata_ch); - reinit_bus(scp, RESET); + + /* + * scp might be null if the bus is being reinitialised during + * the boot-up sequence, before the ATAPI bus is registered. + */ + + if (scp != NULL) + reinit_bus(scp, RESET); } static void ==== //depot/projects/hammer/sys/dev/puc/pucdata.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.20 2003/04/30 22:15:47 sobomax Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.21 2003/05/14 09:37:46 wilko Exp $"); /* * PCI "universal" communications card driver configuration data (used to @@ -891,6 +891,19 @@ }, }, + /* NetMos 4S0P PCI: 4S, 0P */ + { "NetMos NM9845 Quad UART", + NULL, + { 0x9710, 0x9845, 0, 0 }, + { 0xffff, 0xffff, 0, 0 }, + { + { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, + { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ }, + { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ }, + { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ }, + }, + }, + /* * This is the Middle Digital, Inc. PCI-Weasel, which * uses a PCI interface implemented in FPGA. ==== //depot/projects/hammer/sys/sys/signalvar.h#7 (text+ko) ==== @@ -31,12 +31,13 @@ * SUCH DAMAGE. * * @(#)signalvar.h 8.6 (Berkeley) 2/19/95 - * $FreeBSD: src/sys/sys/signalvar.h,v 1.61 2003/05/13 20:36:02 jhb Exp $ + * $FreeBSD: src/sys/sys/signalvar.h,v 1.62 2003/05/14 15:00:24 jhb Exp $ */ #ifndef _SYS_SIGNALVAR_H_ #define _SYS_SIGNALVAR_H_ +#include #include #include #include ==== //depot/projects/hammer/usr.sbin/rpc.lockd/lock_proc.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: lock_proc.c,v 1.7 2000/10/11 20:23:56 is Exp $ */ -/* $FreeBSD: src/usr.sbin/rpc.lockd/lock_proc.c,v 1.10 2002/03/22 20:00:10 alfred Exp $ */ +/* $FreeBSD: src/usr.sbin/rpc.lockd/lock_proc.c,v 1.11 2003/05/14 13:50:40 rwatson Exp $ */ /* * Copyright (c) 1995 * A.R. Gordon (andrew.gordon@net-tel.co.uk). All rights reserved. @@ -695,7 +695,10 @@ log_from_addr("nlm_granted_msg", rqstp); res.cookie = arg->cookie; - res.stat.stat = nlm_granted; + res.stat.stat = lock_answer(arg->alock.svid, &arg->cookie, + nlm_granted, NULL, NLM_VERS) == 0 ? + nlm_granted : nlm_denied; + transmit_result(NLM_GRANTED_RES, &res, (struct sockaddr *)svc_getcaller(rqstp->rq_xprt)); return (NULL); @@ -1184,7 +1187,9 @@ log_from_addr("nlm4_granted_msg", rqstp); res.cookie = arg->cookie; - res.stat.stat = nlm4_granted; + res.stat.stat = lock_answer(arg->alock.svid, &arg->cookie, + nlm4_granted, NULL, NLM_VERS4) == 0 ? + nlm4_granted : nlm4_denied; transmit4_result(NLM4_GRANTED_RES, &res, (struct sockaddr *)svc_getrpccaller(rqstp->rq_xprt)->buf); return (NULL); From owner-p4-projects@FreeBSD.ORG Wed May 14 14:13:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 429C837B404; Wed, 14 May 2003 14:13:22 -0700 (PDT) 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 D477337B401 for ; Wed, 14 May 2003 14:13:21 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BADC43F3F for ; Wed, 14 May 2003 14:13:21 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4ELDL0U058454 for ; Wed, 14 May 2003 14:13:21 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4ELDLSf058448 for perforce@freebsd.org; Wed, 14 May 2003 14:13:21 -0700 (PDT) Date: Wed, 14 May 2003 14:13:21 -0700 (PDT) Message-Id: <200305142113.h4ELDLSf058448@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31192 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 21:13:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=31192 Change 31192 by peter@peter_hammer on 2003/05/14 14:12:50 As per jake's suggestion, change PTmap etc to be compile time constants with casts. libkvm won't be happy about this, but its no big deal. I can still export the symbol values ala kernbase so that libkvm can find them in the symbol table. Anyway, this gets around the problem of requiring the symbols be within +/- 2GB of address zero. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/locore.S#2 edit .. //depot/projects/hammer/sys/amd64/include/pmap.h#6 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/locore.S#2 (text+ko) ==== @@ -34,15 +34,6 @@ #include "assym.s" /* - * PTmap is recursive pagemap at top of virtual address space. - * Within PTmap, the page directory can be found (third indirection). - */ - .globl PTmap,PTD,PTDpde - .set PTmap,(PTDPTDI << PDRSHIFT) - .set PTD,PTmap + (PTDPTDI * PAGE_SIZE) - .set PTDpde,PTD + (PTDPTDI * PDESIZE) - -/* * Compiled KERNBASE location */ .globl kernbase ==== //depot/projects/hammer/sys/amd64/include/pmap.h#6 (text+ko) ==== @@ -145,13 +145,9 @@ * in the page tables and the evil overlapping. */ #ifdef _KERNEL -extern pt_entry_t PTmap[]; -extern pd_entry_t PDmap[]; -extern pdp_entry_t PDPmap[]; -extern pml4_entry_t PML4[]; -extern pdp_entry_t PDP[]; -extern pd_entry_t PTD[]; -extern pd_entry_t PTDpde[]; +#define PTmap ((pt_entry_t *)(VADDR(0, 0, PTDPTDI, 0))) +#define PTD ((pd_entry_t *)(VADDR(0, 0, PTDPTDI, PTDPTDI))) +#define PTDpde ((pd_entry_t *)(VADDR(0, 0, PTDPTDI, PTDPTDI) + (PTDPTDI * sizeof(pd_entry_t)))) extern u_int64_t IdlePML4; /* physical address of "Idle" state directory */ extern u_int64_t IdlePDP; /* physical address of "Idle" state directory */ From owner-p4-projects@FreeBSD.ORG Wed May 14 15:02:27 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9950737B404; Wed, 14 May 2003 15:02:26 -0700 (PDT) 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 3A00537B401 for ; Wed, 14 May 2003 15:02:26 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B638A43F75 for ; Wed, 14 May 2003 15:02:25 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EM2P0U061163 for ; Wed, 14 May 2003 15:02:25 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EM2P9G061160 for perforce@freebsd.org; Wed, 14 May 2003 15:02:25 -0700 (PDT) Date: Wed, 14 May 2003 15:02:25 -0700 (PDT) Message-Id: <200305142202.h4EM2P9G061160@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31199 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 22:02:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=31199 Change 31199 by peter@peter_hammer on 2003/05/14 15:02:11 Collect the nastiness about load_gs vs gsbase into a single file. Do load_fs/fsbase while here, except it doesn't need to disable the interrupts. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#35 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#6 edit .. //depot/projects/hammer/sys/amd64/include/cpufunc.h#8 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#35 (text+ko) ==== @@ -476,7 +476,6 @@ { struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; - u_int64_t pc; wrmsr(MSR_FSBASE, 0); wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ @@ -486,11 +485,7 @@ load_ds(_udatasel); load_es(_udatasel); load_fs(_udatasel); - critical_enter(); - pc = rdmsr(MSR_GSBASE); - load_gs(_udatasel); /* Clobbers kernel %GS.base */ - wrmsr(MSR_GSBASE, pc); - critical_exit(); + load_gs(_udatasel); pcb->pcb_ds = _udatasel; pcb->pcb_es = _udatasel; pcb->pcb_fs = _udatasel; ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#6 (text+ko) ==== @@ -241,8 +241,6 @@ { struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; - u_int64_t pc; - register_t s; wrmsr(MSR_FSBASE, 0); wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ @@ -252,11 +250,7 @@ load_ds(_udatasel); load_es(_udatasel); load_fs(_udatasel); - s = intr_disable(); - pc = rdmsr(MSR_GSBASE); - load_gs(_udatasel); /* Clobbers kernel %GS.base */ - wrmsr(MSR_GSBASE, pc); - intr_restore(s); + load_gs(_udatasel); pcb->pcb_ds = _udatasel; pcb->pcb_es = _udatasel; pcb->pcb_fs = _udatasel; ==== //depot/projects/hammer/sys/amd64/include/cpufunc.h#8 (text+ko) ==== @@ -475,6 +475,41 @@ __asm __volatile("movl %0,%%es" : : "rm" (sel)); } +#ifdef _KERNEL +/* This is defined in but is too painful to get to */ +#ifndef MSR_FSBASE +#define MSR_FSBASE 0xc0000100 +#endif +static __inline void +load_fs(u_int sel) +{ + register u_int32_t fsbase __asm("ecx"); + + /* Preserve the fsbase value across the selector load */ + fsbase = MSR_FSBASE; + __asm __volatile("rdmsr; movl %0,%%fs; wrmsr" + : : "rm" (sel), "c" (fsbase) : "eax", "edx"); +} + +#ifndef MSR_GSBASE +#define MSR_GSBASE 0xc0000101 +#endif +static __inline void +load_gs(u_int sel) +{ + register u_int32_t gsbase __asm("ecx"); + + /* + * Preserve the gsbase value across the selector load. + * Note that we have to disable interrupts because the gsbase + * being trashed happens to be the kernel gsbase at the time. + */ + gsbase = MSR_GSBASE; + __asm __volatile("pushfq; cli; rdmsr; movl %0,%%gs; wrmsr; popfq" + : : "rm" (sel), "c" (gsbase) : "eax", "edx"); +} +#else +/* Usable by userland */ static __inline void load_fs(u_int sel) { @@ -486,6 +521,7 @@ { __asm __volatile("movl %0,%%gs" : : "rm" (sel)); } +#endif /* void lidt(struct region_descriptor *addr); */ static __inline void From owner-p4-projects@FreeBSD.ORG Wed May 14 15:13:41 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF1C937B404; Wed, 14 May 2003 15:13:40 -0700 (PDT) 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 5F67037B401 for ; Wed, 14 May 2003 15:13:40 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCA2D43FA3 for ; Wed, 14 May 2003 15:13:39 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EMDd0U062543 for ; Wed, 14 May 2003 15:13:39 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EMDd37062540 for perforce@freebsd.org; Wed, 14 May 2003 15:13:39 -0700 (PDT) Date: Wed, 14 May 2003 15:13:39 -0700 (PDT) Message-Id: <200305142213.h4EMDd37062540@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31200 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 22:13:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=31200 Change 31200 by peter@peter_hammer on 2003/05/14 15:13:01 Dig out of a hole. Dont context switch the kernel gsbase. Just preserve it across %gs loads, thats all we need. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#6 edit .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#16 edit .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#36 edit .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#7 edit .. //depot/projects/hammer/sys/amd64/include/pcb.h#10 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#6 (text+ko) ==== @@ -106,12 +106,6 @@ pushfq /* PSL */ popq PCB_RFLAGS(%r8) - /* Save kernel %gs.base */ - movl $MSR_GSBASE,%ecx - rdmsr - movl %eax,PCB_KGSBASE(%r8) - movl %edx,PCB_KGSBASE+4(%r8) - /* Save userland %fs */ movl $MSR_FSBASE,%ecx rdmsr @@ -176,12 +170,11 @@ movl PCB_DS(%r8),%ds movl PCB_ES(%r8),%es movl PCB_FS(%r8),%fs - movl PCB_GS(%r8),%gs - /* Restore kernel %gs.base */ + /* Restore userland %gs while preserving kernel gsbase */ movl $MSR_GSBASE,%ecx - movl PCB_KGSBASE(%r8),%eax - movl PCB_KGSBASE+4(%r8),%edx + rdmsr + movl PCB_GS(%r8),%gs wrmsr /* Restore userland %fs */ ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#16 (text+ko) ==== @@ -125,7 +125,6 @@ ASSYM(PCB_RFLAGS, offsetof(struct pcb, pcb_rflags)); ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); -ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase)); ASSYM(PCB_DS, offsetof(struct pcb, pcb_ds)); ASSYM(PCB_ES, offsetof(struct pcb, pcb_es)); ASSYM(PCB_FS, offsetof(struct pcb, pcb_fs)); ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#36 (text+ko) ==== @@ -481,7 +481,6 @@ wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ pcb->pcb_fsbase = 0; pcb->pcb_gsbase = 0; - pcb->pcb_kgsbase = rdmsr(MSR_GSBASE); load_ds(_udatasel); load_es(_udatasel); load_fs(_udatasel); @@ -1312,7 +1311,6 @@ /* setup proc 0's pcb */ thread0.td_pcb->pcb_flags = 0; /* XXXKSE */ thread0.td_pcb->pcb_cr3 = IdlePML4; - thread0.td_pcb->pcb_kgsbase = (u_int64_t)pc; thread0.td_frame = &proc0_tf; } ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#7 (text+ko) ==== @@ -246,7 +246,6 @@ wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ pcb->pcb_fsbase = 0; pcb->pcb_gsbase = 0; - pcb->pcb_kgsbase = rdmsr(MSR_GSBASE); load_ds(_udatasel); load_es(_udatasel); load_fs(_udatasel); ==== //depot/projects/hammer/sys/amd64/include/pcb.h#10 (text+ko) ==== @@ -59,7 +59,6 @@ register_t pcb_rflags; register_t pcb_fsbase; register_t pcb_gsbase; - register_t pcb_kgsbase; u_int32_t pcb_ds; u_int32_t pcb_es; u_int32_t pcb_fs; From owner-p4-projects@FreeBSD.ORG Wed May 14 15:15:44 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 02A2937B404; Wed, 14 May 2003 15:15:44 -0700 (PDT) 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 9635037B401 for ; Wed, 14 May 2003 15:15:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2952F43FAF for ; Wed, 14 May 2003 15:15:43 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EMFg0U062657 for ; Wed, 14 May 2003 15:15:42 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EMFg3e062654 for perforce@freebsd.org; Wed, 14 May 2003 15:15:42 -0700 (PDT) Date: Wed, 14 May 2003 15:15:42 -0700 (PDT) Message-Id: <200305142215.h4EMFg3e062654@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31201 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 22:15:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=31201 Change 31201 by peter@peter_hammer on 2003/05/14 15:15:03 IFC @31195 Affected files ... .. //depot/projects/hammer/sys/dev/fxp/if_fxpreg.h#8 integrate .. //depot/projects/hammer/sys/pc98/i386/machdep.c#14 integrate .. //depot/projects/hammer/usr.sbin/extattrctl/extattrctl.8#2 integrate .. //depot/projects/hammer/usr.sbin/rpc.lockd/lockd_lock.c#2 integrate Differences ... ==== //depot/projects/hammer/sys/dev/fxp/if_fxpreg.h#8 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/fxp/if_fxpreg.h,v 1.34 2003/05/12 18:15:33 mux Exp $ + * $FreeBSD: src/sys/dev/fxp/if_fxpreg.h,v 1.35 2003/05/14 20:33:41 mux Exp $ */ #define FXP_VENDORID_INTEL 0x8086 @@ -291,18 +291,18 @@ * fetched along with the TxCB. */ union { - struct fxp_ipcb xx; + struct fxp_ipcb ipcb; struct fxp_tbd tbd[FXP_NTXSEG]; } tx_cb_u; }; #define tbd tx_cb_u.tbd -#define ipcb_schedule_low tx_cb_u.xx.ipcb_schedule_low -#define ipcb_ip_schedule tx_cb_u.xx.ipcb_ip_schedule -#define ipcb_ip_activation_high tx_cb_u.xx.ipcb_ip_activation_high -#define ipcb_vlan_id tx_cb_u.xx.ipcb_vlan_id -#define ipcb_ip_header_offset tx_cb_u.xx.ipcb_ip_header_offset -#define ipcb_tcp_header_offset tx_cb_u.xx.ipcb_tcp_header_offset +#define ipcb_schedule_low tx_cb_u.ipcb.ipcb_schedule_low +#define ipcb_ip_schedule tx_cb_u.ipcb.ipcb_ip_schedule +#define ipcb_ip_activation_high tx_cb_u.ipcb.ipcb_ip_activation_high +#define ipcb_vlan_id tx_cb_u.ipcb.ipcb_vlan_id +#define ipcb_ip_header_offset tx_cb_u.ipcb.ipcb_ip_header_offset +#define ipcb_tcp_header_offset tx_cb_u.ipcb.ipcb_tcp_header_offset /* * IPCB field definitions ==== //depot/projects/hammer/sys/pc98/i386/machdep.c#14 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/pc98/i386/machdep.c,v 1.317 2003/05/13 20:36:01 jhb Exp $ + * $FreeBSD: src/sys/pc98/i386/machdep.c,v 1.318 2003/05/14 20:21:42 jhb Exp $ */ #include "opt_atalk.h" @@ -567,7 +567,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; - mtx_assert(&psp->ps_mtx,.MA_OWNED); + mtx_assert(&psp->ps_mtx, MA_OWNED); #ifdef COMPAT_FREEBSD4 if (SIGISMEMBER(psp->ps_freebsd4, sig)) { freebsd4_sendsig(catcher, sig, mask, code); ==== //depot/projects/hammer/usr.sbin/extattrctl/extattrctl.8#2 (text+ko) ==== @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/usr.sbin/extattrctl/extattrctl.8,v 1.22 2002/07/14 14:43:04 charnier Exp $ +.\" $FreeBSD: src/usr.sbin/extattrctl/extattrctl.8,v 1.23 2003/05/14 20:31:06 rwatson Exp $ .\" .\" Developed by the TrustedBSD Project. .\" Support for file system extended attribute. @@ -148,16 +148,16 @@ .Pp Start extended attributes on the root file system. .Pp -.Dl extattrctl initattr 17 /.attribute/md5 +.Dl extattrctl initattr 17 /.attribute/system/md5 .Pp -Create an attribute backing file in /.attribute/md5, and set the maximum +Create an attribute backing file in /.attribute/system/md5, and set the maximum size of each attribute to 17 bytes, with a sparse file used for storing the attributes. .Pp -.Dl extattrctl enable / system md5 /.attribute/md5 +.Dl extattrctl enable / system md5 /.attribute/system/md5 .Pp Enable an attribute named md5 on the root file system, backed from the file -/.attribute/md5. +/.attribute/system/md5. .Pp .Dl extattrctl disable / md5 .Pp ==== //depot/projects/hammer/usr.sbin/rpc.lockd/lockd_lock.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: lockd_lock.c,v 1.5 2000/11/21 03:47:41 enami Exp $ */ -/* $FreeBSD: src/usr.sbin/rpc.lockd/lockd_lock.c,v 1.10 2002/03/22 19:57:09 alfred Exp $ */ +/* $FreeBSD: src/usr.sbin/rpc.lockd/lockd_lock.c,v 1.11 2003/05/14 21:16:33 rwatson Exp $ */ /* * Copyright (c) 2001 Andrew P. Lentvorski, Jr. @@ -1401,12 +1401,17 @@ if (retval == PFL_NFSDENIED || retval == PFL_HWDENIED) { /* Once last chance to check the lock */ if (fl->blocking == 1) { - /* Queue the lock */ - debuglog("BLOCKING LOCK RECEIVED\n"); - retval = (retval == PFL_NFSDENIED ? - PFL_NFSBLOCKED : PFL_HWBLOCKED); - add_blockingfilelock(fl); - dump_filelock(fl); + if (retval == PFL_NFSDENIED) { + /* Queue the lock */ + debuglog("BLOCKING LOCK RECEIVED\n"); + retval = PFL_NFSBLOCKED; + add_blockingfilelock(fl); + dump_filelock(fl); + } else { + /* retval is okay as PFL_HWDENIED */ + debuglog("BLOCKING LOCK DENIED IN HARDWARE\n"); + dump_filelock(fl); + } } else { /* Leave retval alone, it's already correct */ debuglog("Lock denied. Non-blocking failure\n"); From owner-p4-projects@FreeBSD.ORG Wed May 14 16:09:53 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4937437B404; Wed, 14 May 2003 16:09:52 -0700 (PDT) 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 AD60537B401 for ; Wed, 14 May 2003 16:09:51 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 281B043F3F for ; Wed, 14 May 2003 16:09:49 -0700 (PDT) (envelope-from hmp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4EN9m0U066861 for ; Wed, 14 May 2003 16:09:48 -0700 (PDT) (envelope-from hmp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4EN9lvM066858 for perforce@freebsd.org; Wed, 14 May 2003 16:09:47 -0700 (PDT) Date: Wed, 14 May 2003 16:09:47 -0700 (PDT) Message-Id: <200305142309.h4EN9lvM066858@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hmp@freebsd.org using -f From: Hiten Pandya To: Perforce Change Reviews Subject: PERFORCE change 31202 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 23:09:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=31202 Change 31202 by hmp@hmp_nxad on 2003/05/14 16:08:06 IFC. Affected files ... .. //depot/projects/jfs/src/COPYRIGHT#1 branch .. //depot/projects/jfs/src/MAINTAINERS#1 branch .. //depot/projects/jfs/src/Makefile#1 branch .. //depot/projects/jfs/src/Makefile.inc1#1 branch .. //depot/projects/jfs/src/README#1 branch .. //depot/projects/jfs/src/UPDATING#1 branch .. //depot/projects/jfs/src/bin/Makefile#1 branch .. //depot/projects/jfs/src/bin/Makefile.inc#1 branch .. //depot/projects/jfs/src/bin/cat/Makefile#1 branch .. //depot/projects/jfs/src/bin/cat/cat.1#1 branch .. //depot/projects/jfs/src/bin/cat/cat.c#1 branch .. //depot/projects/jfs/src/bin/chflags/Makefile#1 branch .. //depot/projects/jfs/src/bin/chflags/chflags.1#1 branch .. //depot/projects/jfs/src/bin/chflags/chflags.c#1 branch .. //depot/projects/jfs/src/bin/chio/Makefile#1 branch .. //depot/projects/jfs/src/bin/chio/chio.1#1 branch .. //depot/projects/jfs/src/bin/chio/chio.c#1 branch .. //depot/projects/jfs/src/bin/chio/defs.h#1 branch .. //depot/projects/jfs/src/bin/chio/pathnames.h#1 branch .. //depot/projects/jfs/src/bin/chmod/Makefile#1 branch .. //depot/projects/jfs/src/bin/chmod/chmod.1#1 branch .. //depot/projects/jfs/src/bin/chmod/chmod.c#1 branch .. //depot/projects/jfs/src/bin/cp/Makefile#1 branch .. //depot/projects/jfs/src/bin/cp/cp.1#1 branch .. //depot/projects/jfs/src/bin/cp/cp.c#1 branch .. //depot/projects/jfs/src/bin/cp/extern.h#1 branch .. //depot/projects/jfs/src/bin/cp/utils.c#1 branch .. //depot/projects/jfs/src/bin/csh/Makefile#1 branch .. //depot/projects/jfs/src/bin/csh/USD.doc/csh.1#1 branch .. //depot/projects/jfs/src/bin/csh/USD.doc/csh.2#1 branch .. //depot/projects/jfs/src/bin/csh/USD.doc/csh.3#1 branch .. //depot/projects/jfs/src/bin/csh/USD.doc/csh.4#1 branch .. //depot/projects/jfs/src/bin/csh/USD.doc/csh.a#1 branch .. //depot/projects/jfs/src/bin/csh/USD.doc/csh.g#1 branch .. //depot/projects/jfs/src/bin/csh/USD.doc/tabs#1 branch .. //depot/projects/jfs/src/bin/csh/config.h#1 branch .. //depot/projects/jfs/src/bin/csh/host.defs#1 branch .. //depot/projects/jfs/src/bin/date/Makefile#1 branch .. //depot/projects/jfs/src/bin/date/date.1#1 branch .. //depot/projects/jfs/src/bin/date/date.c#1 branch .. //depot/projects/jfs/src/bin/date/extern.h#1 branch .. //depot/projects/jfs/src/bin/date/netdate.c#1 branch .. //depot/projects/jfs/src/bin/date/vary.c#1 branch .. //depot/projects/jfs/src/bin/date/vary.h#1 branch .. //depot/projects/jfs/src/bin/dd/Makefile#1 branch .. //depot/projects/jfs/src/bin/dd/args.c#1 branch .. //depot/projects/jfs/src/bin/dd/conv.c#1 branch .. //depot/projects/jfs/src/bin/dd/conv_tab.c#1 branch .. //depot/projects/jfs/src/bin/dd/dd.1#1 branch .. //depot/projects/jfs/src/bin/dd/dd.c#1 branch .. //depot/projects/jfs/src/bin/dd/dd.h#1 branch .. //depot/projects/jfs/src/bin/dd/extern.h#1 branch .. //depot/projects/jfs/src/bin/dd/misc.c#1 branch .. //depot/projects/jfs/src/bin/dd/position.c#1 branch .. //depot/projects/jfs/src/bin/df/Makefile#1 branch .. //depot/projects/jfs/src/bin/df/df.1#1 branch .. //depot/projects/jfs/src/bin/df/df.c#1 branch .. //depot/projects/jfs/src/bin/domainname/Makefile#1 branch .. //depot/projects/jfs/src/bin/domainname/domainname.1#1 branch .. //depot/projects/jfs/src/bin/domainname/domainname.c#1 branch .. //depot/projects/jfs/src/bin/echo/Makefile#1 branch .. //depot/projects/jfs/src/bin/echo/echo.1#1 branch .. //depot/projects/jfs/src/bin/echo/echo.c#1 branch .. //depot/projects/jfs/src/bin/ed/Makefile#1 branch .. //depot/projects/jfs/src/bin/ed/POSIX#1 branch .. //depot/projects/jfs/src/bin/ed/README#1 branch .. //depot/projects/jfs/src/bin/ed/buf.c#1 branch .. //depot/projects/jfs/src/bin/ed/cbc.c#1 branch .. //depot/projects/jfs/src/bin/ed/ed.1#1 branch .. //depot/projects/jfs/src/bin/ed/ed.h#1 branch .. //depot/projects/jfs/src/bin/ed/glbl.c#1 branch .. //depot/projects/jfs/src/bin/ed/io.c#1 branch .. //depot/projects/jfs/src/bin/ed/main.c#1 branch .. //depot/projects/jfs/src/bin/ed/re.c#1 branch .. //depot/projects/jfs/src/bin/ed/sub.c#1 branch .. //depot/projects/jfs/src/bin/ed/test/=.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/Makefile#1 branch .. //depot/projects/jfs/src/bin/ed/test/README#1 branch .. //depot/projects/jfs/src/bin/ed/test/TODO#1 branch .. //depot/projects/jfs/src/bin/ed/test/a.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/a.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/a.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/a1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/a2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/addr.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/addr.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/addr.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/addr1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/addr2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/ascii.d.uu#1 branch .. //depot/projects/jfs/src/bin/ed/test/ascii.r.uu#1 branch .. //depot/projects/jfs/src/bin/ed/test/ascii.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/bang1.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/bang1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/bang1.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/bang1.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/bang2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/c.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/c.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/c.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/c1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/c2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/ckscripts.sh#1 branch .. //depot/projects/jfs/src/bin/ed/test/d.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/d.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/d.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/d.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/e1.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/e1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/e1.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/e1.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/e2.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/e2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/e2.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/e2.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/e3.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/e3.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/e3.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/e3.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/e4.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/e4.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/e4.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/f1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/f2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/g1.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/g1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/g1.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/g1.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/g2.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/g2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/g2.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/g2.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/g3.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/g3.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/g3.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/g3.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/g4.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/g4.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/g4.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/g5.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/g5.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/g5.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/h.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/i.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/i.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/i.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/i1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/i2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/i3.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/j.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/j.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/j.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/k.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/k.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/k.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/k1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/k2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/k3.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/k4.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/l.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/l.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/l.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/m.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/m.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/m.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/m.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/mkscripts.sh#1 branch .. //depot/projects/jfs/src/bin/ed/test/n.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/n.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/n.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/nl.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/nl1.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/nl1.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/nl1.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/nl2.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/nl2.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/nl2.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/p.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/p.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/p.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/q.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/q.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/q.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/q1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/r1.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/r1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/r1.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/r1.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/r2.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/r2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/r2.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/r2.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/r3.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/r3.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/r3.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/s1.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/s1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/s1.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/s1.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/s10.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/s2.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/s2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/s2.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/s2.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/s3.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/s3.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/s3.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/s3.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/s4.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/s5.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/s6.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/s7.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/s8.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/s9.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/t.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/t.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/t1.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/t1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/t1.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/t1.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/t2.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/t2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/t2.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/t2.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/u.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/u.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/u.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/u.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/v.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/v.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/v.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/w.d#1 branch .. //depot/projects/jfs/src/bin/ed/test/w.r#1 branch .. //depot/projects/jfs/src/bin/ed/test/w.t#1 branch .. //depot/projects/jfs/src/bin/ed/test/w1.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/w2.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/w3.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/x.err#1 branch .. //depot/projects/jfs/src/bin/ed/test/z.err#1 branch .. //depot/projects/jfs/src/bin/ed/undo.c#1 branch .. //depot/projects/jfs/src/bin/expr/Makefile#1 branch .. //depot/projects/jfs/src/bin/expr/expr.1#1 branch .. //depot/projects/jfs/src/bin/expr/expr.y#1 branch .. //depot/projects/jfs/src/bin/getfacl/Makefile#1 branch .. //depot/projects/jfs/src/bin/getfacl/getfacl.1#1 branch .. //depot/projects/jfs/src/bin/getfacl/getfacl.c#1 branch .. //depot/projects/jfs/src/bin/hostname/Makefile#1 branch .. //depot/projects/jfs/src/bin/hostname/hostname.1#1 branch .. //depot/projects/jfs/src/bin/hostname/hostname.c#1 branch .. //depot/projects/jfs/src/bin/kenv/Makefile#1 branch .. //depot/projects/jfs/src/bin/kenv/kenv.1#1 branch .. //depot/projects/jfs/src/bin/kenv/kenv.c#1 branch .. //depot/projects/jfs/src/bin/kill/Makefile#1 branch .. //depot/projects/jfs/src/bin/kill/kill.1#1 branch .. //depot/projects/jfs/src/bin/kill/kill.c#1 branch .. //depot/projects/jfs/src/bin/ln/Makefile#1 branch .. //depot/projects/jfs/src/bin/ln/ln.1#1 branch .. //depot/projects/jfs/src/bin/ln/ln.c#1 branch .. //depot/projects/jfs/src/bin/ln/symlink.7#1 branch .. //depot/projects/jfs/src/bin/ls/Makefile#1 branch .. //depot/projects/jfs/src/bin/ls/cmp.c#1 branch .. //depot/projects/jfs/src/bin/ls/extern.h#1 branch .. //depot/projects/jfs/src/bin/ls/ls.1#1 branch .. //depot/projects/jfs/src/bin/ls/ls.c#1 branch .. //depot/projects/jfs/src/bin/ls/ls.h#1 branch .. //depot/projects/jfs/src/bin/ls/print.c#1 branch .. //depot/projects/jfs/src/bin/ls/util.c#1 branch .. //depot/projects/jfs/src/bin/mkdir/Makefile#1 branch .. //depot/projects/jfs/src/bin/mkdir/mkdir.1#1 branch .. //depot/projects/jfs/src/bin/mkdir/mkdir.c#1 branch .. //depot/projects/jfs/src/bin/mv/Makefile#1 branch .. //depot/projects/jfs/src/bin/mv/mv.1#1 branch .. //depot/projects/jfs/src/bin/mv/mv.c#1 branch .. //depot/projects/jfs/src/bin/pax/Makefile#1 branch .. //depot/projects/jfs/src/bin/pax/ar_io.c#1 branch .. //depot/projects/jfs/src/bin/pax/ar_subs.c#1 branch .. //depot/projects/jfs/src/bin/pax/buf_subs.c#1 branch .. //depot/projects/jfs/src/bin/pax/cache.c#1 branch .. //depot/projects/jfs/src/bin/pax/cache.h#1 branch .. //depot/projects/jfs/src/bin/pax/cpio.1#1 branch .. //depot/projects/jfs/src/bin/pax/cpio.c#1 branch .. //depot/projects/jfs/src/bin/pax/cpio.h#1 branch .. //depot/projects/jfs/src/bin/pax/extern.h#1 branch .. //depot/projects/jfs/src/bin/pax/file_subs.c#1 branch .. //depot/projects/jfs/src/bin/pax/ftree.c#1 branch .. //depot/projects/jfs/src/bin/pax/ftree.h#1 branch .. //depot/projects/jfs/src/bin/pax/gen_subs.c#1 branch .. //depot/projects/jfs/src/bin/pax/getoldopt.c#1 branch .. //depot/projects/jfs/src/bin/pax/options.c#1 branch .. //depot/projects/jfs/src/bin/pax/options.h#1 branch .. //depot/projects/jfs/src/bin/pax/pat_rep.c#1 branch .. //depot/projects/jfs/src/bin/pax/pat_rep.h#1 branch .. //depot/projects/jfs/src/bin/pax/pax.1#1 branch .. //depot/projects/jfs/src/bin/pax/pax.c#1 branch .. //depot/projects/jfs/src/bin/pax/pax.h#1 branch .. //depot/projects/jfs/src/bin/pax/sel_subs.c#1 branch .. //depot/projects/jfs/src/bin/pax/sel_subs.h#1 branch .. //depot/projects/jfs/src/bin/pax/tables.c#1 branch .. //depot/projects/jfs/src/bin/pax/tables.h#1 branch .. //depot/projects/jfs/src/bin/pax/tar.1#1 branch .. //depot/projects/jfs/src/bin/pax/tar.c#1 branch .. //depot/projects/jfs/src/bin/pax/tar.h#1 branch .. //depot/projects/jfs/src/bin/pax/tty_subs.c#1 branch .. //depot/projects/jfs/src/bin/ps/Makefile#1 branch .. //depot/projects/jfs/src/bin/ps/extern.h#1 branch .. //depot/projects/jfs/src/bin/ps/fmt.c#1 branch .. //depot/projects/jfs/src/bin/ps/keyword.c#1 branch .. //depot/projects/jfs/src/bin/ps/nlist.c#1 branch .. //depot/projects/jfs/src/bin/ps/print.c#1 branch .. //depot/projects/jfs/src/bin/ps/ps.1#1 branch .. //depot/projects/jfs/src/bin/ps/ps.c#1 branch .. //depot/projects/jfs/src/bin/ps/ps.h#1 branch .. //depot/projects/jfs/src/bin/pwd/Makefile#1 branch .. //depot/projects/jfs/src/bin/pwd/pwd.1#1 branch .. //depot/projects/jfs/src/bin/pwd/pwd.c#1 branch .. //depot/projects/jfs/src/bin/rcp/Makefile#1 branch .. //depot/projects/jfs/src/bin/rcp/extern.h#1 branch .. //depot/projects/jfs/src/bin/rcp/rcp.1#1 branch .. //depot/projects/jfs/src/bin/rcp/rcp.c#1 branch .. //depot/projects/jfs/src/bin/rcp/util.c#1 branch .. //depot/projects/jfs/src/bin/realpath/Makefile#1 branch .. //depot/projects/jfs/src/bin/realpath/realpath.1#1 branch .. //depot/projects/jfs/src/bin/realpath/realpath.c#1 branch .. //depot/projects/jfs/src/bin/rm/Makefile#1 branch .. //depot/projects/jfs/src/bin/rm/rm.1#1 branch .. //depot/projects/jfs/src/bin/rm/rm.c#1 branch .. //depot/projects/jfs/src/bin/rmail/Makefile#1 branch .. //depot/projects/jfs/src/bin/rmdir/Makefile#1 branch .. //depot/projects/jfs/src/bin/rmdir/rmdir.1#1 branch .. //depot/projects/jfs/src/bin/rmdir/rmdir.c#1 branch .. //depot/projects/jfs/src/bin/setfacl/Makefile#1 branch .. //depot/projects/jfs/src/bin/setfacl/file.c#1 branch .. //depot/projects/jfs/src/bin/setfacl/mask.c#1 branch .. //depot/projects/jfs/src/bin/setfacl/merge.c#1 branch .. //depot/projects/jfs/src/bin/setfacl/remove.c#1 branch .. //depot/projects/jfs/src/bin/setfacl/setfacl.1#1 branch .. //depot/projects/jfs/src/bin/setfacl/setfacl.c#1 branch .. //depot/projects/jfs/src/bin/setfacl/setfacl.h#1 branch .. //depot/projects/jfs/src/bin/setfacl/util.c#1 branch .. //depot/projects/jfs/src/bin/sh/Makefile#1 branch .. //depot/projects/jfs/src/bin/sh/TOUR#1 branch .. //depot/projects/jfs/src/bin/sh/alias.c#1 branch .. //depot/projects/jfs/src/bin/sh/alias.h#1 branch .. //depot/projects/jfs/src/bin/sh/arith.h#1 branch .. //depot/projects/jfs/src/bin/sh/arith.y#1 branch .. //depot/projects/jfs/src/bin/sh/arith_lex.l#1 branch .. //depot/projects/jfs/src/bin/sh/bltin/bltin.h#1 branch .. //depot/projects/jfs/src/bin/sh/bltin/echo.1#1 branch .. //depot/projects/jfs/src/bin/sh/bltin/echo.c#1 branch .. //depot/projects/jfs/src/bin/sh/builtins.def#1 branch .. //depot/projects/jfs/src/bin/sh/cd.c#1 branch .. //depot/projects/jfs/src/bin/sh/cd.h#1 branch .. //depot/projects/jfs/src/bin/sh/error.c#1 branch .. //depot/projects/jfs/src/bin/sh/error.h#1 branch .. //depot/projects/jfs/src/bin/sh/eval.c#1 branch .. //depot/projects/jfs/src/bin/sh/eval.h#1 branch .. //depot/projects/jfs/src/bin/sh/exec.c#1 branch .. //depot/projects/jfs/src/bin/sh/exec.h#1 branch .. //depot/projects/jfs/src/bin/sh/expand.c#1 branch .. //depot/projects/jfs/src/bin/sh/expand.h#1 branch .. //depot/projects/jfs/src/bin/sh/funcs/cmv#1 branch .. //depot/projects/jfs/src/bin/sh/funcs/dirs#1 branch .. //depot/projects/jfs/src/bin/sh/funcs/kill#1 branch .. //depot/projects/jfs/src/bin/sh/funcs/login#1 branch .. //depot/projects/jfs/src/bin/sh/funcs/newgrp#1 branch .. //depot/projects/jfs/src/bin/sh/funcs/popd#1 branch .. //depot/projects/jfs/src/bin/sh/funcs/pushd#1 branch .. //depot/projects/jfs/src/bin/sh/funcs/suspend#1 branch .. //depot/projects/jfs/src/bin/sh/histedit.c#1 branch .. //depot/projects/jfs/src/bin/sh/init.h#1 branch .. //depot/projects/jfs/src/bin/sh/input.c#1 branch .. //depot/projects/jfs/src/bin/sh/input.h#1 branch .. //depot/projects/jfs/src/bin/sh/jobs.c#1 branch .. //depot/projects/jfs/src/bin/sh/jobs.h#1 branch .. //depot/projects/jfs/src/bin/sh/mail.c#1 branch .. //depot/projects/jfs/src/bin/sh/mail.h#1 branch .. //depot/projects/jfs/src/bin/sh/main.c#1 branch .. //depot/projects/jfs/src/bin/sh/main.h#1 branch .. //depot/projects/jfs/src/bin/sh/memalloc.c#1 branch .. //depot/projects/jfs/src/bin/sh/memalloc.h#1 branch .. //depot/projects/jfs/src/bin/sh/miscbltin.c#1 branch .. //depot/projects/jfs/src/bin/sh/mkbuiltins#1 branch .. //depot/projects/jfs/src/bin/sh/mkinit.c#1 branch .. //depot/projects/jfs/src/bin/sh/mknodes.c#1 branch .. //depot/projects/jfs/src/bin/sh/mksyntax.c#1 branch .. //depot/projects/jfs/src/bin/sh/mktokens#1 branch .. //depot/projects/jfs/src/bin/sh/myhistedit.h#1 branch .. //depot/projects/jfs/src/bin/sh/mystring.c#1 branch .. //depot/projects/jfs/src/bin/sh/mystring.h#1 branch .. //depot/projects/jfs/src/bin/sh/nodes.c.pat#1 branch .. //depot/projects/jfs/src/bin/sh/nodetypes#1 branch .. //depot/projects/jfs/src/bin/sh/options.c#1 branch .. //depot/projects/jfs/src/bin/sh/options.h#1 branch .. //depot/projects/jfs/src/bin/sh/output.c#1 branch .. //depot/projects/jfs/src/bin/sh/output.h#1 branch .. //depot/projects/jfs/src/bin/sh/parser.c#1 branch .. //depot/projects/jfs/src/bin/sh/parser.h#1 branch .. //depot/projects/jfs/src/bin/sh/redir.c#1 branch .. //depot/projects/jfs/src/bin/sh/redir.h#1 branch .. //depot/projects/jfs/src/bin/sh/sh.1#1 branch .. //depot/projects/jfs/src/bin/sh/shell.h#1 branch .. //depot/projects/jfs/src/bin/sh/show.c#1 branch .. //depot/projects/jfs/src/bin/sh/show.h#1 branch .. //depot/projects/jfs/src/bin/sh/trap.c#1 branch .. //depot/projects/jfs/src/bin/sh/trap.h#1 branch .. //depot/projects/jfs/src/bin/sh/var.c#1 branch .. //depot/projects/jfs/src/bin/sh/var.h#1 branch .. //depot/projects/jfs/src/bin/sleep/Makefile#1 branch .. //depot/projects/jfs/src/bin/sleep/sleep.1#1 branch .. //depot/projects/jfs/src/bin/sleep/sleep.c#1 branch .. //depot/projects/jfs/src/bin/stty/Makefile#1 branch .. //depot/projects/jfs/src/bin/stty/cchar.c#1 branch .. //depot/projects/jfs/src/bin/stty/extern.h#1 branch .. //depot/projects/jfs/src/bin/stty/gfmt.c#1 branch .. //depot/projects/jfs/src/bin/stty/key.c#1 branch .. //depot/projects/jfs/src/bin/stty/modes.c#1 branch .. //depot/projects/jfs/src/bin/stty/print.c#1 branch .. //depot/projects/jfs/src/bin/stty/stty.1#1 branch .. //depot/projects/jfs/src/bin/stty/stty.c#1 branch .. //depot/projects/jfs/src/bin/stty/stty.h#1 branch .. //depot/projects/jfs/src/bin/stty/util.c#1 branch .. //depot/projects/jfs/src/bin/sync/Makefile#1 branch .. //depot/projects/jfs/src/bin/sync/sync.8#1 branch .. //depot/projects/jfs/src/bin/sync/sync.c#1 branch .. //depot/projects/jfs/src/bin/test/Makefile#1 branch .. //depot/projects/jfs/src/bin/test/TEST.README#1 branch .. //depot/projects/jfs/src/bin/test/TEST.csh#1 branch .. //depot/projects/jfs/src/bin/test/TEST.sh#1 branch .. //depot/projects/jfs/src/bin/test/test.1#1 branch .. //depot/projects/jfs/src/bin/test/test.c#1 branch .. //depot/projects/jfs/src/contrib/amd/AUTHORS#1 branch .. //depot/projects/jfs/src/contrib/amd/BUGS#1 branch .. //depot/projects/jfs/src/contrib/amd/COPYING#1 branch .. //depot/projects/jfs/src/contrib/amd/ChangeLog#1 branch .. //depot/projects/jfs/src/contrib/amd/FREEBSD-Xlist#1 branch .. //depot/projects/jfs/src/contrib/amd/FREEBSD-upgrade#1 branch .. //depot/projects/jfs/src/contrib/amd/INSTALL#1 branch .. //depot/projects/jfs/src/contrib/amd/MIRRORS#1 branch .. //depot/projects/jfs/src/contrib/amd/NEWS#1 branch .. //depot/projects/jfs/src/contrib/amd/README#1 branch .. //depot/projects/jfs/src/contrib/amd/README.ldap#1 branch .. //depot/projects/jfs/src/contrib/amd/README.y2k#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/am_ops.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amd.8#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amd.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amd.h#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_auto.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_direct.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_error.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_host.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_inherit.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_link.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_linkx.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_nfsl.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_nfsx.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_program.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_root.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_toplvl.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amfs_union.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amq_subr.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/amq_svc.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/autil.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/clock.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/conf.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/conf_parse.y#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/conf_tok.l#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/get_args.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/info_file.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/info_hesiod.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/info_ldap.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/info_ndbm.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/info_nis.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/info_nisplus.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/info_passwd.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/info_union.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/map.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/mapc.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/mntfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/nfs_prot_svc.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/nfs_start.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/nfs_subr.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_TEMPLATE.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_autofs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_cachefs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_cdfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_efs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_lofs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_mfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_nfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_nfs3.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_nullfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_pcfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_tfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_tmpfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_ufs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_umapfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_unionfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/ops_xfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/opts.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/restart.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/rpc_fwd.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/sched.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/srvr_amfs_auto.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amd/srvr_nfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amq/amq.8#1 branch .. //depot/projects/jfs/src/contrib/amd/amq/amq.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amq/amq.h#1 branch .. //depot/projects/jfs/src/contrib/amd/amq/amq_clnt.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amq/amq_xdr.c#1 branch .. //depot/projects/jfs/src/contrib/amd/amq/pawd.1#1 branch .. //depot/projects/jfs/src/contrib/amd/amq/pawd.c#1 branch .. //depot/projects/jfs/src/contrib/amd/aux_conf.h.in#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/checkmount/checkmount_bsd44.c#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/fh_dref/fh_dref_freebsd22.h#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/hn_dref/hn_dref_default.h#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/mtab/mtab_bsd.c#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/nfs_prot/nfs_prot_freebsd2.h#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/sa_dref/sa_dref_bsd44.h#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/transp/transp_sockets.c#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/trap/trap_default.h#1 branch .. //depot/projects/jfs/src/contrib/amd/conf/umount/umount_bsd44.c#1 branch .. //depot/projects/jfs/src/contrib/amd/doc/am-utils.texi#1 branch .. //depot/projects/jfs/src/contrib/amd/doc/stamp-vti#1 branch .. //depot/projects/jfs/src/contrib/amd/doc/texinfo.tex#1 branch .. //depot/projects/jfs/src/contrib/amd/doc/version.texi#1 branch .. //depot/projects/jfs/src/contrib/amd/fixmount/fixmount.8#1 branch .. //depot/projects/jfs/src/contrib/amd/fixmount/fixmount.c#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/fsi_analyze.c#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/fsi_data.h#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/fsi_dict.c#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/fsi_gram.y#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/fsi_lex.l#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/fsi_util.c#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/fsinfo.8#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/fsinfo.c#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/fsinfo.h#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/wr_atab.c#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/wr_bparam.c#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/wr_dumpset.c#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/wr_exportfs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/fsinfo/wr_fstab.c#1 branch .. //depot/projects/jfs/src/contrib/amd/hlfsd/hlfsd.8#1 branch .. //depot/projects/jfs/src/contrib/amd/hlfsd/hlfsd.c#1 branch .. //depot/projects/jfs/src/contrib/amd/hlfsd/hlfsd.h#1 branch .. //depot/projects/jfs/src/contrib/amd/hlfsd/homedir.c#1 branch .. //depot/projects/jfs/src/contrib/amd/hlfsd/nfs_prot_svc.c#1 branch .. //depot/projects/jfs/src/contrib/amd/hlfsd/stubs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/include/am_compat.h#1 branch .. //depot/projects/jfs/src/contrib/amd/include/am_defs.h#1 branch .. //depot/projects/jfs/src/contrib/amd/include/am_utils.h#1 branch .. //depot/projects/jfs/src/contrib/amd/include/am_xdr_func.h#1 branch .. //depot/projects/jfs/src/contrib/amd/include/amq_defs.h#1 branch .. //depot/projects/jfs/src/contrib/amd/include/mount_headers1.h#1 branch .. //depot/projects/jfs/src/contrib/amd/include/mount_headers2.h#1 branch .. //depot/projects/jfs/src/contrib/amd/ldap-id.ms#1 branch .. //depot/projects/jfs/src/contrib/amd/ldap-id.txt#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/alloca.c#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/amu.h#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/hasmntopt.c#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/misc_rpc.c#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/mount_fs.c#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/mtab.c#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/nfs_prot_xdr.c#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/util.c#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/wire.c#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/xdr_func.c#1 branch .. //depot/projects/jfs/src/contrib/amd/libamu/xutil.c#1 branch .. //depot/projects/jfs/src/contrib/amd/mk-amd-map/mk-amd-map.8#1 branch .. //depot/projects/jfs/src/contrib/amd/mk-amd-map/mk-amd-map.c#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/Makefile.am#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/Makefile.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/am-eject.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/amd.conf-sample#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/amd.conf.5#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/amd2ldif.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/amd2sun.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/automount2amd.8#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/automount2amd.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/ctl-amd.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/ctl-hlfsd.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/expn.1#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/expn.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/fix-amd-map.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/fixrmtab.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/lostaltmail.conf-sample#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/lostaltmail.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/wait4amd.in#1 branch .. //depot/projects/jfs/src/contrib/amd/scripts/wait4amd2die.in#1 branch .. //depot/projects/jfs/src/contrib/amd/tasks#1 branch .. //depot/projects/jfs/src/contrib/amd/wire-test/wire-test.8#1 branch .. //depot/projects/jfs/src/contrib/amd/wire-test/wire-test.c#1 branch .. //depot/projects/jfs/src/contrib/bc/AUTHORS#1 branch .. //depot/projects/jfs/src/contrib/bc/ChangeLog#1 branch .. //depot/projects/jfs/src/contrib/bc/Examples/ckbook.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Examples/pi.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Examples/primes.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Examples/twins.b#1 branch .. //depot/projects/jfs/src/contrib/bc/FAQ#1 branch .. //depot/projects/jfs/src/contrib/bc/FREEBSD-upgrade#1 branch .. //depot/projects/jfs/src/contrib/bc/INSTALL#1 branch .. //depot/projects/jfs/src/contrib/bc/Makefile.am#1 branch .. //depot/projects/jfs/src/contrib/bc/Makefile.in#1 branch .. //depot/projects/jfs/src/contrib/bc/NEWS#1 branch .. //depot/projects/jfs/src/contrib/bc/README#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/BUG.bc#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/array.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/arrayp.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/aryprm.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/atan.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/checklib.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/div.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/exp.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/fact.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/jn.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/ln.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/mul.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/raise.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/signum#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/sine.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/sqrt.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/sqrt1.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/sqrt2.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/testfn.b#1 branch .. //depot/projects/jfs/src/contrib/bc/Test/timetest#1 branch .. //depot/projects/jfs/src/contrib/bc/acconfig.h#1 branch .. //depot/projects/jfs/src/contrib/bc/aclocal.m4#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/Makefile.am#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/Makefile.in#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/bc.y#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/bcdefs.h#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/const.h#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/execute.c#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/fix-libmath_h#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/global.c#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/global.h#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/libmath.b#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/libmath.h#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/load.c#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/main.c#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/proto.h#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/sbc.y#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/scan.l#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/storage.c#1 branch .. //depot/projects/jfs/src/contrib/bc/bc/util.c#1 branch .. //depot/projects/jfs/src/contrib/bc/config.h.in#1 branch .. //depot/projects/jfs/src/contrib/bc/configure#1 branch .. //depot/projects/jfs/src/contrib/bc/configure.in#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/Makefile.am#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/Makefile.in#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/array.c#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/dc-proto.h#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/dc-regdef.h#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/dc.c#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/dc.h#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/eval.c#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/misc.c#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/numeric.c#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/stack.c#1 branch .. //depot/projects/jfs/src/contrib/bc/dc/string.c#1 branch .. //depot/projects/jfs/src/contrib/bc/doc/Makefile.am#1 branch .. //depot/projects/jfs/src/contrib/bc/doc/Makefile.in#1 branch .. //depot/projects/jfs/src/contrib/bc/doc/bc.1#1 branch .. //depot/projects/jfs/src/contrib/bc/doc/bc.texi#1 branch .. //depot/projects/jfs/src/contrib/bc/doc/dc.1#1 branch .. //depot/projects/jfs/src/contrib/bc/doc/dc.texi#1 branch .. //depot/projects/jfs/src/contrib/bc/h/getopt.h#1 branch .. //depot/projects/jfs/src/contrib/bc/h/number.h#1 branch .. //depot/projects/jfs/src/contrib/bc/install-sh#1 branch .. //depot/projects/jfs/src/contrib/bc/lib/Makefile.am#1 branch .. //depot/projects/jfs/src/contrib/bc/lib/Makefile.in#1 branch .. //depot/projects/jfs/src/contrib/bc/lib/getopt.c#1 branch .. //depot/projects/jfs/src/contrib/bc/lib/getopt1.c#1 branch .. //depot/projects/jfs/src/contrib/bc/lib/number.c#1 branch .. //depot/projects/jfs/src/contrib/bc/lib/testmul.c#1 branch .. //depot/projects/jfs/src/contrib/bc/lib/vfprintf.c#1 branch .. //depot/projects/jfs/src/contrib/bc/missing#1 branch .. //depot/projects/jfs/src/contrib/bc/mkinstalldirs#1 branch .. //depot/projects/jfs/src/contrib/bc/stamp-h.in#1 branch .. //depot/projects/jfs/src/contrib/bind/CHANGES#1 branch .. //depot/projects/jfs/src/contrib/bind/DNSSEC#1 branch .. //depot/projects/jfs/src/contrib/bind/FREEBSD-Upgrade#1 branch .. //depot/projects/jfs/src/contrib/bind/FREEBSD-Xlist#1 branch .. //depot/projects/jfs/src/contrib/bind/INSTALL#1 branch .. //depot/projects/jfs/src/contrib/bind/LICENSE#1 branch .. //depot/projects/jfs/src/contrib/bind/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/README#1 branch .. //depot/projects/jfs/src/contrib/bind/SUPPORT#1 branch .. //depot/projects/jfs/src/contrib/bind/TODO#1 branch .. //depot/projects/jfs/src/contrib/bind/Version#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/addr/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/addr/addr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/dig/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/dig/dig.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/dnskeygen/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/dnskeygen/dnskeygen.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/dnsquery/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/dnsquery/dnsquery.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/host/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/host/host.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/irpd/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/irpd/irpd.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/irpd/irs-irpd.conf#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/irpd/version.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/mkservdb/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/mkservdb/mkservdb.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named-bootconf/Grot/named-bootconf.pl#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named-bootconf/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named-bootconf/named-bootconf.sh#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named-bootconf/test.boot#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named-xfer/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named-xfer/named-xfer.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_defs.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_dump.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_func.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_glob.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_glue.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_ixfr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_load.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_lookup.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_save.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_sec.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_tsig.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/db_update.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/named.conf#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/named.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_config.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_ctl.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_defs.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_forw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_func.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_glob.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_glue.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_init.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_ixfr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_lexer.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_lexer.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_main.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_maint.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_ncache.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_notify.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_parser.y#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_parseutil.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_parseutil.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_req.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_resp.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_signal.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_sort.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_stats.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_udp.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_update.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/ns_xfr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/pathtemplate.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/test/127.0.0.zone#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/test/localhost.zone#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/test/named.conf#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/test/root.hint#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/named/version.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/ndc/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/ndc/ndc.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/commands.l#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/debug.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/getinfo.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/list.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/main.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/nslookup.help#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/pathnames.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/res.h#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/send.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/skip.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nslookup/subr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nsupdate/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/bin/nsupdate/nsupdate.c#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/acl.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/address_list.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/comments.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/config.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/controls.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/docdef.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/example.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/include.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/index.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/key.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/logging.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/master.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/options.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/server.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/trusted-keys.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/html/zone.html#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/dig.1#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/dnskeygen.1#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/dnsquery.1#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/getaddrinfo.3#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/gethostbyname.3#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/getipnodebyname.3#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/getnameinfo.3#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/getnetent.3#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/hesiod.3#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/host.1#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/hostname.7#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/inet_cidr.3#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/irs.conf.5#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/mailaddr.7#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/mkdep.1#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/named-bootconf.8#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/named-xfer.8#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/named.8#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/named.conf.5#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/ndc.8#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/nslookup.8#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/nsupdate.8#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/resolver.3#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/resolver.5#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/man/tsig.3#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/misc/DynamicUpdate#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/misc/FAQ.1of2#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/misc/FAQ.2of2#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/misc/rfc2317-notes.txt#1 branch .. //depot/projects/jfs/src/contrib/bind/doc/misc/style.txt#1 branch .. //depot/projects/jfs/src/contrib/bind/include/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/include/arpa/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/include/arpa/inet.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/arpa/nameser.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/arpa/nameser_compat.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/fd_setsize.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/hesiod.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/irp.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/irs.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/assertions.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/ctl.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/dst.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/eventlib.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/heap.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/irpmarshall.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/list.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/logging.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/memcluster.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/misc.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/isc/tree.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/netdb.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/netgroup.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/res_update.h#1 branch .. //depot/projects/jfs/src/contrib/bind/include/resolv.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/README#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/bsafe_link.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/cylink_link.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/dst_api.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/dst_internal.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/eay_dss_link.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/hmac_link.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/md5.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/md5_dgst.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/md5_locl.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/prandom.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/rsaref_link.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/dst/support.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_addr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_cidr_ntop.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_cidr_pton.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_data.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_lnaof.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_makeaddr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_net_ntop.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_net_pton.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_neta.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_netof.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_network.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_ntoa.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_ntop.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/inet_pton.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/inet/nsap_addr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/Makefile.BSD#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/README#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/dns.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/dns_gr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/dns_ho.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/dns_nw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/dns_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/dns_pr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/dns_pw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/dns_sv.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gai_strerror.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gen.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gen_gr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gen_ho.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gen_ng.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gen_nw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gen_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gen_pr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gen_pw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gen_sv.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getaddrinfo.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getgrent.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getgrent_r.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gethostent.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/gethostent_r.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getnameinfo.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getnetent.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getnetent_r.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getnetgrent.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getnetgrent_r.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getprotoent.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getprotoent_r.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getpwent.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getpwent_r.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getservent.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/getservent_r.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/hesiod.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/hesiod_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irp.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irp_gr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irp_ho.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irp_ng.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irp_nw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irp_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irp_pr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irp_pw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irp_sv.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irpmarshall.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irs_data.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irs_data.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/irs_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/lcl.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/lcl_gr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/lcl_ho.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/lcl_ng.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/lcl_nw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/lcl_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/lcl_pr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/lcl_pw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/lcl_sv.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nis.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nis_gr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nis_ho.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nis_ng.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nis_nw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nis_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nis_pr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nis_pw.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nis_sv.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/nul_ng.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/pathnames.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/irs/util.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/assertions.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/assertions.mdoc#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/base64.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/bitncmp.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/bitncmp.mdoc#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/ctl_clnt.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/ctl_p.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/ctl_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/ctl_srvr.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/ev_connects.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/ev_files.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/ev_streams.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/ev_timers.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/ev_waits.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/eventlib.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/eventlib.mdoc#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/eventlib_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/heap.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/heap.mdoc#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/hex.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/logging.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/logging.mdoc#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/logging_p.h#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/memcluster.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/memcluster.mdoc#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/movefile.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/tree.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/isc/tree.mdoc#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/ns_date.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/ns_name.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/ns_netint.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/ns_parse.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/ns_print.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/ns_samedomain.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/ns_sign.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/ns_ttl.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/nameser/ns_verify.c#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/resolv/Makefile#1 branch .. //depot/projects/jfs/src/contrib/bind/lib/resolv/herror.c#1 branch >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed May 14 18:13:27 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B86A037B407; Wed, 14 May 2003 18:13:26 -0700 (PDT) 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 427D337B401 for ; Wed, 14 May 2003 18:13:26 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8C1C43FAF for ; Wed, 14 May 2003 18:13:20 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4F1DK0U078923 for ; Wed, 14 May 2003 18:13:20 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4F1DK3h078920 for perforce@freebsd.org; Wed, 14 May 2003 18:13:20 -0700 (PDT) Date: Wed, 14 May 2003 18:13:20 -0700 (PDT) Message-Id: <200305150113.h4F1DK3h078920@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31206 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 01:13:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=31206 Change 31206 by peter@peter_daintree on 2003/05/14 18:13:13 IFC @31205 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#7 integrate .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#17 integrate .. //depot/projects/hammer/sys/amd64/amd64/locore.S#3 integrate .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#37 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#8 integrate .. //depot/projects/hammer/sys/amd64/include/cpufunc.h#9 integrate .. //depot/projects/hammer/sys/amd64/include/pcb.h#11 integrate .. //depot/projects/hammer/sys/amd64/include/pmap.h#7 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#7 (text+ko) ==== @@ -33,7 +33,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.140 2003/05/14 04:10:47 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.141 2003/05/15 00:23:39 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#17 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.145 2003/05/14 04:10:48 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.146 2003/05/15 00:23:39 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/amd64/locore.S#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/locore.S,v 1.172 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/locore.S,v 1.173 2003/05/15 00:20:17 peter Exp $ */ #include ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#37 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.577 2003/05/14 04:10:48 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.578 2003/05/15 00:23:39 peter Exp $ */ #include "opt_atalk.h" ==== //depot/projects/hammer/sys/amd64/ia32/ia32_sysvec.c#8 (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/amd64/ia32/ia32_sysvec.c,v 1.3 2003/05/14 04:10:48 peter Exp $ + * $FreeBSD: src/sys/amd64/ia32/ia32_sysvec.c,v 1.4 2003/05/15 00:23:39 peter Exp $ */ #include "opt_compat.h" ==== //depot/projects/hammer/sys/amd64/include/cpufunc.h#9 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.135 2003/05/14 04:10:49 peter Exp $ + * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.136 2003/05/15 00:23:40 peter Exp $ */ /* ==== //depot/projects/hammer/sys/amd64/include/pcb.h#11 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)pcb.h 5.10 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.52 2003/05/14 04:10:49 peter Exp $ + * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.53 2003/05/15 00:23:40 peter Exp $ */ #ifndef _I386_PCB_H_ ==== //depot/projects/hammer/sys/amd64/include/pmap.h#7 (text+ko) ==== @@ -42,7 +42,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.100 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.101 2003/05/15 00:20:17 peter Exp $ */ #ifndef _MACHINE_PMAP_H_ From owner-p4-projects@FreeBSD.ORG Wed May 14 22:48:59 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1617237B404; Wed, 14 May 2003 22:48:59 -0700 (PDT) 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 B0EB837B401 for ; Wed, 14 May 2003 22:48:58 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F49D43F3F for ; Wed, 14 May 2003 22:48:57 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4F5mv0U098230 for ; Wed, 14 May 2003 22:48:57 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4F5muhc098226 for perforce@freebsd.org; Wed, 14 May 2003 22:48:56 -0700 (PDT) Date: Wed, 14 May 2003 22:48:56 -0700 (PDT) Message-Id: <200305150548.h4F5muhc098226@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31213 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 05:49:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=31213 Change 31213 by marcel@marcel_nfs on 2003/05/14 22:48:19 IFC @31212 Affected files ... .. //depot/projects/ia64/crypto/openssh/log.h#6 integrate .. //depot/projects/ia64/etc/mtree/BSD.x11-4.dist#5 integrate .. //depot/projects/ia64/lib/libc/sys/stat.2#6 integrate .. //depot/projects/ia64/lib/libkvm/kvm_proc.c#17 integrate .. //depot/projects/ia64/release/alpha/dokern.sh#8 integrate .. //depot/projects/ia64/release/alpha/drivers.conf#12 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#49 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#91 integrate .. //depot/projects/ia64/sbin/bsdlabel/bsdlabel.c#6 integrate .. //depot/projects/ia64/sbin/devd/parse.y#3 integrate .. //depot/projects/ia64/sbin/ifconfig/ifconfig.8#20 integrate .. //depot/projects/ia64/share/man/man4/iir.4#4 integrate .. //depot/projects/ia64/sys/alpha/alpha/machdep.c#28 integrate .. //depot/projects/ia64/sys/alpha/osf1/osf1_signal.c#15 integrate .. //depot/projects/ia64/sys/amd64/amd64/cpu_switch.S#3 integrate .. //depot/projects/ia64/sys/amd64/amd64/exception.S#4 integrate .. //depot/projects/ia64/sys/amd64/amd64/genassym.c#3 integrate .. //depot/projects/ia64/sys/amd64/amd64/locore.S#2 integrate .. //depot/projects/ia64/sys/amd64/amd64/machdep.c#4 integrate .. //depot/projects/ia64/sys/amd64/amd64/support.S#3 integrate .. //depot/projects/ia64/sys/amd64/amd64/trap.c#3 integrate .. //depot/projects/ia64/sys/amd64/amd64/vm_machdep.c#2 integrate .. //depot/projects/ia64/sys/amd64/conf/GENERIC#3 integrate .. //depot/projects/ia64/sys/amd64/ia32/Makefile#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32.h#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_exception.S#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_genassym.c#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_misc.c#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_proto.h#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_signal.c#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_signal.h#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_sigtramp.S#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_syscall.c#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_syscall.h#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_sysent.c#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_sysvec.c#1 branch .. //depot/projects/ia64/sys/amd64/ia32/ia32_util.h#1 branch .. //depot/projects/ia64/sys/amd64/ia32/syscalls.conf#1 branch .. //depot/projects/ia64/sys/amd64/ia32/syscalls.master#1 branch .. //depot/projects/ia64/sys/amd64/include/cpufunc.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/elf.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/md_var.h#3 integrate .. //depot/projects/ia64/sys/amd64/include/pcb.h#3 integrate .. //depot/projects/ia64/sys/amd64/include/pmap.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/segments.h#2 integrate .. //depot/projects/ia64/sys/compat/linprocfs/linprocfs.c#17 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_filio.c#12 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_misc.c#18 integrate .. //depot/projects/ia64/sys/conf/NOTES#50 integrate .. //depot/projects/ia64/sys/conf/files.amd64#4 integrate .. //depot/projects/ia64/sys/conf/options.amd64#3 integrate .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/Makefile#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_bstream.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_bstream.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_context.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_context.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_env.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_env.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_scoreboard.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_scoreboard.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_self.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_self.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_self_context.s#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_step.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_str.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_str.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_swap.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_swap.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_trace.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_trace.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_ttrace.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_ttrace.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_uinfo.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_uinfo.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_utable.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/src/uwx_utable.h#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/test/Makefile#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/test/dump_context.c#1 branch .. //depot/projects/ia64/sys/contrib/ia64/libuwx/test/dumpmyself.c#1 branch .. //depot/projects/ia64/sys/dev/acpica/Osd/OsdHardware.c#7 integrate .. //depot/projects/ia64/sys/dev/acpica/acpivar.h#16 integrate .. //depot/projects/ia64/sys/dev/ata/atapi-cam.c#11 integrate .. //depot/projects/ia64/sys/dev/fxp/if_fxpreg.h#6 integrate .. //depot/projects/ia64/sys/dev/puc/pucdata.c#15 integrate .. //depot/projects/ia64/sys/i386/acpica/acpi_machdep.c#9 integrate .. //depot/projects/ia64/sys/i386/acpica/acpi_wakeup.c#14 integrate .. //depot/projects/ia64/sys/i386/conf/NOTES#41 integrate .. //depot/projects/ia64/sys/i386/i386/machdep.c#39 integrate .. //depot/projects/ia64/sys/i386/i386/mp_machdep.c#21 integrate .. //depot/projects/ia64/sys/i386/linux/linux_sysvec.c#24 integrate .. //depot/projects/ia64/sys/i386/svr4/svr4_machdep.c#8 integrate .. //depot/projects/ia64/sys/ia64/ia64/machdep.c#67 integrate .. //depot/projects/ia64/sys/kern/init_main.c#32 integrate .. //depot/projects/ia64/sys/kern/kern_condvar.c#23 integrate .. //depot/projects/ia64/sys/kern/kern_exec.c#48 integrate .. //depot/projects/ia64/sys/kern/kern_exit.c#44 integrate .. //depot/projects/ia64/sys/kern/kern_fork.c#38 integrate .. //depot/projects/ia64/sys/kern/kern_kthread.c#9 integrate .. //depot/projects/ia64/sys/kern/kern_proc.c#39 integrate .. //depot/projects/ia64/sys/kern/kern_sig.c#50 integrate .. //depot/projects/ia64/sys/kern/kern_synch.c#35 integrate .. //depot/projects/ia64/sys/kern/kern_time.c#19 integrate .. //depot/projects/ia64/sys/kern/subr_trap.c#29 integrate .. //depot/projects/ia64/sys/kern/tty.c#26 integrate .. //depot/projects/ia64/sys/kern/tty_pty.c#12 integrate .. //depot/projects/ia64/sys/kern/vfs_subr.c#47 integrate .. //depot/projects/ia64/sys/modules/Makefile#49 integrate .. //depot/projects/ia64/sys/netncp/ncp_ncp.c#8 integrate .. //depot/projects/ia64/sys/netsmb/smb_subr.c#12 integrate .. //depot/projects/ia64/sys/nfsclient/nfs_socket.c#16 integrate .. //depot/projects/ia64/sys/pc98/conf/NOTES#6 integrate .. //depot/projects/ia64/sys/pc98/i386/machdep.c#36 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/machdep.c#27 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/machdep.c#39 integrate .. //depot/projects/ia64/sys/sys/proc.h#64 integrate .. //depot/projects/ia64/sys/sys/signalvar.h#13 integrate .. //depot/projects/ia64/sys/sys/user.h#10 integrate .. //depot/projects/ia64/sys/vm/vm_glue.c#27 integrate .. //depot/projects/ia64/usr.sbin/extattrctl/extattrctl.8#6 integrate .. //depot/projects/ia64/usr.sbin/rpc.lockd/kern.c#7 integrate .. //depot/projects/ia64/usr.sbin/rpc.lockd/lock_proc.c#4 integrate .. //depot/projects/ia64/usr.sbin/rpc.lockd/lockd_lock.c#7 integrate .. //depot/projects/ia64/usr.sbin/sysinstall/install.c#18 integrate Differences ... ==== //depot/projects/ia64/crypto/openssh/log.h#6 (text+ko) ==== @@ -1,5 +1,5 @@ /* $OpenBSD: log.h,v 1.8 2002/07/19 15:43:33 markus Exp $ */ -/* $FreeBSD: src/crypto/openssh/log.h,v 1.2 2003/05/12 19:22:47 des Exp $ */ +/* $FreeBSD: src/crypto/openssh/log.h,v 1.3 2003/05/13 10:18:49 des Exp $ */ /* * Author: Tatu Ylonen @@ -62,13 +62,13 @@ #define debug2 ssh_debug2 #define debug3 ssh_debug3 -void ssh_fatal(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_error(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_log(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_verbose(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_debug(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_debug2(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_debug3(const char *, ...) __attribute__((format(printf, 1, 2))); +void fatal(const char *, ...) __attribute__((format(printf, 1, 2))); +void error(const char *, ...) __attribute__((format(printf, 1, 2))); +void log(const char *, ...) __attribute__((format(printf, 1, 2))); +void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); void fatal_cleanup(void); void fatal_add_cleanup(void (*) (void *), void *); ==== //depot/projects/ia64/etc/mtree/BSD.x11-4.dist#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.x11-4.dist,v 1.22 2003/01/16 02:17:28 anholt Exp $ +# $FreeBSD: src/etc/mtree/BSD.x11-4.dist,v 1.23 2003/05/14 07:23:54 anholt Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -27,6 +27,8 @@ .. Xaw .. + Xcursor + .. Xft .. Xmu @@ -115,6 +117,8 @@ .. fs .. + icons + .. lbxproxy .. locale @@ -124,6 +128,8 @@ .. common .. + el_GR.UTF-8 + .. en_US.UTF-8 .. en_US.utf @@ -142,6 +148,8 @@ .. iso8859-10 .. + iso8859-11 + .. iso8859-13 .. iso8859-14 @@ -172,14 +180,22 @@ .. ja.SJIS .. + ja_JP.UTF-8 + .. ko .. + ko_KR.UTF-8 + .. koi8-c .. koi8-r .. koi8-u .. + lib + common + .. + .. microsoft-cp1251 .. microsoft-cp1255 @@ -200,6 +216,8 @@ .. th_TH.TACTIS .. + th_TH.UTF-8 + .. tscii-0 .. vi_VN.tcvn @@ -220,6 +238,10 @@ .. zh_TW.Big5 .. + zh_TW.UTF-8 + .. + zh_TW.big5 + .. .. proxymngr .. @@ -241,6 +263,8 @@ .. xedit lisp + progmodes + .. .. .. xinit @@ -285,6 +309,8 @@ .. nec .. + pc + .. sgi .. sony @@ -322,6 +348,8 @@ .. .. libdata + pkgconfig + .. .. libexec .. ==== //depot/projects/ia64/lib/libc/sys/stat.2#6 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 -.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.31 2002/12/19 09:40:25 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.32 2003/05/13 08:10:05 dougb Exp $ .\" .Dd February 15, 2002 .Dt STAT 2 @@ -85,36 +85,7 @@ structure as defined by .Aq Pa sys/stat.h -(shown below) and into which information is placed concerning the file. -.Bd -literal -struct stat { - dev_t st_dev; /* inode's device */ - ino_t st_ino; /* inode's number */ - mode_t st_mode; /* inode protection mode */ - nlink_t st_nlink; /* number of hard links */ - uid_t st_uid; /* user ID of the file's owner */ - gid_t st_gid; /* group ID of the file's group */ - dev_t st_rdev; /* device type */ -#ifndef _POSIX_SOURCE - struct timespec st_atimespec; /* time of last access */ - struct timespec st_mtimespec; /* time of last data modification */ - struct timespec st_ctimespec; /* time of last file status change */ -#else - time_t st_atime; /* time of last access */ - long st_atimensec; /* nsec of last access */ - time_t st_mtime; /* time of last data modification */ - long st_mtimensec; /* nsec of last data modification */ - time_t st_ctime; /* time of last file status change */ - long st_ctimensec; /* nsec of last file status change */ -#endif - off_t st_size; /* file size, in bytes */ - int64_t st_blocks; /* blocks allocated for file */ - u_int32_t st_blksize; /* optimal blocksize for I/O */ - fflags_t st_flags; /* user defined flags for file */ - u_int32_t st_gen; /* file generation number */ -}; -.Ed .Pp The time-related fields of .Fa struct stat @@ -149,6 +120,8 @@ and .Xr write 2 system calls. +.It st_birthtime +Time when the inode was created. .El .Pp If ==== //depot/projects/ia64/lib/libkvm/kvm_proc.c#17 (text+ko) ==== @@ -42,7 +42,7 @@ #endif #include -__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.66 2003/04/10 17:41:40 julian Exp $"); +__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.68 2003/05/14 15:01:20 jhb Exp $"); /* * Proc traversal interface for kvm. ps and w are (probably) the exclusive @@ -100,7 +100,7 @@ struct session sess; struct tty tty; struct vmspace vmspace; - struct procsig procsig; + struct sigacts sigacts; struct pstats pstats; struct ucred ucred; struct thread mtd; @@ -192,14 +192,14 @@ kp->ki_textvp = proc.p_textvp; kp->ki_fd = proc.p_fd; kp->ki_vmspace = proc.p_vmspace; - if (proc.p_procsig != NULL) { - if (KREAD(kd, (u_long)proc.p_procsig, &procsig)) { + if (proc.p_sigacts != NULL) { + if (KREAD(kd, (u_long)proc.p_sigacts, &sigacts)) { _kvm_err(kd, kd->program, - "can't read procsig at %x", proc.p_procsig); + "can't read sigacts at %x", proc.p_sigacts); return (-1); } - kp->ki_sigignore = procsig.ps_sigignore; - kp->ki_sigcatch = procsig.ps_sigcatch; + kp->ki_sigignore = sigacts.ps_sigignore; + kp->ki_sigcatch = sigacts.ps_sigcatch; } if ((proc.p_sflag & PS_INMEM) && proc.p_stats != NULL) { if (KREAD(kd, (u_long)proc.p_stats, &pstats)) { ==== //depot/projects/ia64/release/alpha/dokern.sh#8 (text+ko) ==== @@ -1,12 +1,12 @@ #!/bin/sh # -# $FreeBSD: src/release/alpha/dokern.sh,v 1.68 2003/05/07 18:14:00 obrien Exp $ +# $FreeBSD: src/release/alpha/dokern.sh,v 1.70 2003/05/15 01:28:39 obrien Exp $ # # XXX sort by order in GENERIC, not alphabetical sed \ - -e 's/ident.*GENERIC/ident BOOTMFS/g' + -e 's/ident.*GENERIC/ident BOOTMFS/g' \ -e '/DEBUG/d' \ -e '/DEC_KN8AE/d' \ -e '/SOFTUPDATES/d' \ @@ -59,6 +59,12 @@ -e '/ axe /d' \ -e '/ cue /d' \ -e '/ kue /d' \ + -e '/ firewire /d' \ + -e '/ sbp /d' \ + -e '/ fwe /d' \ + +# XXX: blank line above intentional so lines may be added below the last +# entry with ease. echo "options SCSI_NO_OP_STRINGS" echo "options SCSI_NO_SENSE_STRINGS" ==== //depot/projects/ia64/release/alpha/drivers.conf#12 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/alpha/drivers.conf,v 1.16 2003/05/12 13:12:08 wilko Exp $ +# $FreeBSD: src/release/alpha/drivers.conf,v 1.17 2003/05/14 15:38:44 obrien Exp $ # # drv: driver name in kernel config file @@ -43,7 +43,7 @@ miibus miibus 2 network "MII bus support" pcn if_pcn 2 network "AMD Am79C97x PCI 10/100" rl if_rl 2 network "RealTek 8129/8139" -tl if_tl 2 network "Texas Instruments ThunderLAN" +tl if_tl 3 network "Texas Instruments ThunderLAN" txp if_txp 2 network "3Com 3XP Typhoon/Sidewinder (3CR990)" vr if_vr 2 network "VIA Rhine, Rhine II" vx if_vx 2 network "3Com 3c590 and 3c595 EtherLink III" ==== //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#49 (text+ko) ==== @@ -31,7 +31,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.148 2003/05/10 16:30:56 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.149 2003/05/13 18:15:28 bmah Exp $ Supported Devices @@ -834,6 +834,8 @@ + IBM / Adaptec ServeRAID series (ips driver) + LSI Logic Fusion/MP architecture Fiber Channel controllers (mpt driver) ==== //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#91 (text+ko) ==== @@ -3,7 +3,7 @@ The FreeBSD Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.566 2003/05/08 22:31:00 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.567 2003/05/13 18:15:28 bmah Exp $ 2000 @@ -439,6 +439,9 @@ believed to fix problems detecting attached disks during installation. + The ips driver, which supports the IBM (now + Adaptec) ServeRAID series, has been added. + A bug in the &man.mly.4; driver that caused hangs has been corrected. ==== //depot/projects/ia64/sbin/bsdlabel/bsdlabel.c#6 (text+ko) ==== @@ -54,7 +54,7 @@ #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/sbin/bsdlabel/bsdlabel.c,v 1.92 2003/05/09 20:26:17 phk Exp $"); +__FBSDID("$FreeBSD: src/sbin/bsdlabel/bsdlabel.c,v 1.93 2003/05/13 19:42:52 phk Exp $"); #include #include @@ -165,6 +165,10 @@ labeloffset = 512; bbsize = 8192; alphacksum = 0; + } else if (!strcmp(optarg, "pc98")) { + labeloffset = 512; + bbsize = 8192; + alphacksum = 0; } else if (!strcmp(optarg, "alpha")) { labeloffset = 64; bbsize = 8192; ==== //depot/projects/ia64/sbin/devd/parse.y#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/devd/parse.y,v 1.2 2002/12/07 08:04:36 imp Exp $ + * $FreeBSD: src/sbin/devd/parse.y,v 1.3 2003/05/15 02:23:32 imp Exp $ */ #include "devd.h" @@ -100,16 +100,19 @@ attach_block : ATTACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON { add_attach($2, $4); } + | ATTACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON ; detach_block : DETACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON { add_detach($2, $4); } + | DETACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON ; nomatch_block : NOMATCH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON { add_nomatch($2, $4); } + | NOMATCH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON ; match_or_action_list ==== //depot/projects/ia64/sbin/ifconfig/ifconfig.8#20 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 -.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.69 2003/04/28 16:47:40 sam Exp $ +.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.71 2003/05/14 16:22:16 ru Exp $ .\" .Dd April 28, 2003 .Dt IFCONFIG 8 @@ -307,12 +307,12 @@ operating mode on the interface to .Ar mode . For IEEE 802.11 wireless interfaces that support multiple operating modes -this directive is used to select between 802.11a (\c -.Dq 11a ), -802.11b (\c -.Dq 11b ), -and 802.11g (\c -.Dq 11g ) +this directive is used to select between 802.11a +.Pq Dq 11a , +802.11b +.Pq Dq 11b , +and 802.11g +.Pq Dq 11g operating modes. .It Cm rxcsum , txcsum If the driver supports user-configurable checksum offloading, @@ -466,7 +466,7 @@ See the .Ar address option above for more information. -3\" see +.\" see .\" Xr eon 5 . .\" .It Cm nsellength Ar n .\" .Pf ( Tn ISO ==== //depot/projects/ia64/share/man/man4/iir.4#4 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/share/man/man4/iir.4,v 1.3 2003/03/25 18:13:20 trhodes Exp $ +.\" $FreeBSD: src/share/man/man4/iir.4,v 1.4 2003/05/14 17:53:40 trhodes Exp $ .\" Written by Tom Rhodes .\" This file is in the public domain. .\" @@ -63,11 +63,3 @@ .An Tom Rhodes Aq trhodes@FreeBSD.org and is based on information supplied by the driver authors and the website of .An Mike Smith Aq msmith@FreeBSD.org . -.Sh BUGS -During a -.Fx -install, the -.Nm -controller appears to correctly probe, but finds no disk devices. -The card in question is an Intel SRCU32 RAID controller with 32Mb RAM, -Firmware revision 2.33.01. ==== //depot/projects/ia64/sys/alpha/alpha/machdep.c#28 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.201 2003/04/25 01:50:28 deischen Exp $ + * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.202 2003/05/13 20:35:56 jhb Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1135,11 +1135,13 @@ td = curthread; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); + psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); + frame = td->td_frame; - oonstack = sigonstack(alpha_pal_rdusp()); fsize = sizeof ksi; rndfsize = ((fsize + 15) / 16) * 16; - psp = p->p_sigacts; + oonstack = sigonstack(alpha_pal_rdusp()); /* * Allocate and validate space for the signal handler @@ -1157,6 +1159,7 @@ #endif } else sip = (osiginfo_t *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -1212,7 +1215,8 @@ frame->tf_regs[FRAME_A0] = sig; frame->tf_regs[FRAME_FLAGS] = 0; /* full restore */ PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) frame->tf_regs[FRAME_A1] = (u_int64_t)sip; else frame->tf_regs[FRAME_A1] = code; @@ -1237,6 +1241,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(alpha_pal_rdusp()); @@ -1278,6 +1283,7 @@ #endif } else sfp = (struct sigframe4 *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* save the floating-point state, if necessary, then copy it. */ @@ -1313,7 +1319,8 @@ frame->tf_regs[FRAME_PC] = PS_STRINGS - szfreebsd4_sigcode; frame->tf_regs[FRAME_A0] = sig; PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { frame->tf_regs[FRAME_A1] = (u_int64_t)&(sfp->sf_si); /* Fill in POSIX parts */ @@ -1345,6 +1352,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); #ifdef COMPAT_FREEBSD4 if (SIGISMEMBER(psp->ps_freebsd4, sig)) { freebsd4_sendsig(catcher, sig, mask, code); @@ -1399,6 +1407,7 @@ #endif } else sfp = (struct sigframe *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* save the floating-point state, if necessary, then copy it. */ @@ -1434,7 +1443,8 @@ frame->tf_regs[FRAME_PC] = PS_STRINGS - szsigcode; frame->tf_regs[FRAME_A0] = sig; PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { frame->tf_regs[FRAME_A1] = (u_int64_t)&(sfp->sf_si); /* Fill in POSIX parts */ ==== //depot/projects/ia64/sys/alpha/osf1/osf1_signal.c#15 (text+ko) ==== @@ -30,7 +30,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.32 2003/04/29 06:33:03 alc Exp $ + * $FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.33 2003/05/13 20:35:56 jhb Exp $ */ #include "opt_compat.h" @@ -471,6 +471,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(alpha_pal_rdusp()); @@ -490,6 +491,7 @@ p->p_sigstk.ss_flags |= SS_ONSTACK; } else sip = (osiginfo_t *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -551,6 +553,7 @@ frame->tf_regs[FRAME_FLAGS] = 0; /* full restore */ alpha_pal_wrusp((unsigned long)sip); PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } ==== //depot/projects/ia64/sys/amd64/amd64/cpu_switch.S#3 (text+ko) ==== @@ -33,7 +33,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.139 2003/05/12 02:37:28 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.141 2003/05/15 00:23:39 peter Exp $ */ #include @@ -118,6 +118,12 @@ movl %eax,PCB_GSBASE(%r8) movl %edx,PCB_GSBASE+4(%r8) + /* Save segment selector numbers */ + movl %ds,PCB_DS(%r8) + movl %es,PCB_ES(%r8) + movl %fs,PCB_FS(%r8) + movl %gs,PCB_GS(%r8) + /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) jne 1f @@ -160,6 +166,17 @@ */ movq TD_PCB(%rsi),%r8 + /* Restore segment selector numbers */ + movl PCB_DS(%r8),%ds + movl PCB_ES(%r8),%es + movl PCB_FS(%r8),%fs + + /* Restore userland %gs while preserving kernel gsbase */ + movl $MSR_GSBASE,%ecx + rdmsr + movl PCB_GS(%r8),%gs + wrmsr + /* Restore userland %fs */ movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax ==== //depot/projects/ia64/sys/amd64/amd64/exception.S#4 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.109 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.110 2003/05/14 04:10:47 peter Exp $ */ #include @@ -218,40 +218,6 @@ jmp alltraps_pushregs_no_rdi /* - * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) - * - * This is a SDT_SYSIDT entry point (unlike the i386 port) so that we - * can do a swapgs before enabling interrupts. This is critical because - * if we took an interrupt before swapgs, the interrupt code would see - * that it originated in supervisor mode and skip the swapgs. - */ - SUPERALIGN_TEXT -IDTVEC(int0x80_syscall) - swapgs - sti - pushq $2 /* sizeof "int 0x80" */ - subq $TF_ERR,%rsp /* skip over tf_trapno */ - movq %rdi,TF_RDI(%rsp) - movq %rsi,TF_RSI(%rsp) - movq %rdx,TF_RDX(%rsp) - movq %rcx,TF_RCX(%rsp) - movq %r8,TF_R8(%rsp) - movq %r9,TF_R9(%rsp) - movq %rax,TF_RAX(%rsp) - movq %rbx,TF_RBX(%rsp) - movq %rbp,TF_RBP(%rsp) - movq %r10,TF_R10(%rsp) - movq %r11,TF_R11(%rsp) - movq %r12,TF_R12(%rsp) - movq %r13,TF_R13(%rsp) - movq %r14,TF_R14(%rsp) - movq %r15,TF_R15(%rsp) - FAKE_MCOUNT(13*4(%rsp)) - call syscall - MEXITCOUNT - jmp doreti - -/* * Fast syscall entry point. We enter here with just our new %cs/%ss set, * and the new privilige level. We are still running on the old user stack * pointer. We have to juggle a few things around to find our stack etc. @@ -353,6 +319,7 @@ */ .text SUPERALIGN_TEXT + .globl doreti .type doreti,@function doreti: FAKE_MCOUNT(bintr) /* init "from" bintr -> doreti */ ==== //depot/projects/ia64/sys/amd64/amd64/genassym.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.144 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.146 2003/05/15 00:23:39 peter Exp $ */ #include "opt_compat.h" @@ -125,6 +125,10 @@ ASSYM(PCB_RFLAGS, offsetof(struct pcb, pcb_rflags)); ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); +ASSYM(PCB_DS, offsetof(struct pcb, pcb_ds)); +ASSYM(PCB_ES, offsetof(struct pcb, pcb_es)); +ASSYM(PCB_FS, offsetof(struct pcb, pcb_fs)); +ASSYM(PCB_GS, offsetof(struct pcb, pcb_gs)); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_FULLCTX, PCB_FULLCTX); @@ -181,8 +185,10 @@ ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL)); ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL)); ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL)); +ASSYM(KUC32SEL, GSEL(GUCODE32_SEL, SEL_UPL)); ASSYM(MSR_FSBASE, MSR_FSBASE); +ASSYM(MSR_GSBASE, MSR_GSBASE); ASSYM(MSR_KGSBASE, MSR_KGSBASE); ASSYM(GPROC0_SEL, GPROC0_SEL); ==== //depot/projects/ia64/sys/amd64/amd64/locore.S#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/locore.S,v 1.172 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/locore.S,v 1.173 2003/05/15 00:20:17 peter Exp $ */ #include @@ -34,15 +34,6 @@ #include "assym.s" /* - * PTmap is recursive pagemap at top of virtual address space. - * Within PTmap, the page directory can be found (third indirection). - */ - .globl PTmap,PTD,PTDpde - .set PTmap,(PTDPTDI << PDRSHIFT) - .set PTD,PTmap + (PTDPTDI * PAGE_SIZE) - .set PTDpde,PTD + (PTDPTDI * PDESIZE) - -/* * Compiled KERNBASE location */ .globl kernbase ==== //depot/projects/ia64/sys/amd64/amd64/machdep.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.575 2003/05/12 18:37:56 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.578 2003/05/15 00:23:39 peter Exp $ */ #include "opt_atalk.h" @@ -124,12 +124,11 @@ #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) static void cpu_startup(void *); -static void fpstate_drop(struct thread *td); static void get_fpcontext(struct thread *td, mcontext_t *mcp); static int set_fpcontext(struct thread *td, const mcontext_t *mcp); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) -int _udatasel, _ucodesel; +int _udatasel, _ucodesel, _ucode32sel; u_long atdevbase; u_int64_t modulep; /* phys addr of metadata table */ @@ -235,6 +234,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); regs = td->td_frame; oonstack = sigonstack(regs->tf_rsp); @@ -262,7 +262,6 @@ sp = (char *)regs->tf_rsp - sizeof(struct sigframe) - 128; /* Align to 16 bytes. */ sfp = (struct sigframe *)((unsigned long)sp & ~0xF); - PROC_UNLOCK(p); /* Translate the signal if appropriate. */ if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) @@ -271,8 +270,7 @@ /* Build the argument list for the signal handler. */ regs->tf_rdi = sig; /* arg 1 in %rdi */ regs->tf_rdx = (register_t)&sfp->sf_uc; /* arg 3 in %rdx */ - PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ regs->tf_rsi = (register_t)&sfp->sf_si; /* arg 2 in %rsi */ sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; @@ -287,6 +285,7 @@ regs->tf_rcx = regs->tf_addr; /* arg 4 in %rcx */ sf.sf_ahu.sf_handler = catcher; } + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -305,6 +304,7 @@ regs->tf_rflags &= ~PSL_T; regs->tf_cs = _ucodesel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } /* @@ -389,6 +389,16 @@ return (EJUSTRETURN); } +#ifdef COMPAT_FREEBSD4 +int +freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) +{ + + return sigreturn(td, (struct sigreturn_args *)uap); +} +#endif + + /* * Machine dependent boot() routine * @@ -467,10 +477,18 @@ struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; + wrmsr(MSR_FSBASE, 0); + wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ pcb->pcb_fsbase = 0; pcb->pcb_gsbase = 0; - wrmsr(MSR_FSBASE, 0); - wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ + load_ds(_udatasel); + load_es(_udatasel); + load_fs(_udatasel); + load_gs(_udatasel); + pcb->pcb_ds = _udatasel; + pcb->pcb_es = _udatasel; + pcb->pcb_fs = _udatasel; + pcb->pcb_gs = _udatasel; bzero((char *)regs, sizeof(struct trapframe)); regs->tf_rip = entry; @@ -589,7 +607,7 @@ 0xfffff, /* length - all address space */ SDT_MEMERA, /* segment type */ SEL_UPL, /* segment descriptor priority level */ - 0, /* segment descriptor present */ + 1, /* segment descriptor present */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed May 14 23:15:32 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 05F0937B404; Wed, 14 May 2003 23:15:32 -0700 (PDT) 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 92E5B37B401 for ; Wed, 14 May 2003 23:15:31 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FED543FB1 for ; Wed, 14 May 2003 23:15:30 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4F6FU0U001647 for ; Wed, 14 May 2003 23:15:30 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4F6FTL8001643 for perforce@freebsd.org; Wed, 14 May 2003 23:15:29 -0700 (PDT) Date: Wed, 14 May 2003 23:15:29 -0700 (PDT) Message-Id: <200305150615.h4F6FTL8001643@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31214 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 06:15:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=31214 Change 31214 by marcel@marcel_pluto1 on 2003/05/14 23:15:00 IFia64 Affected files ... .. //depot/projects/ia64_epc/crypto/openssh/log.h#3 integrate .. //depot/projects/ia64_epc/etc/mtree/BSD.x11-4.dist#2 integrate .. //depot/projects/ia64_epc/lib/libc/sys/stat.2#2 integrate .. //depot/projects/ia64_epc/lib/libkvm/kvm_proc.c#6 integrate .. //depot/projects/ia64_epc/release/alpha/dokern.sh#4 integrate .. //depot/projects/ia64_epc/release/alpha/drivers.conf#5 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#13 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#22 integrate .. //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.c#6 integrate .. //depot/projects/ia64_epc/sbin/devd/parse.y#2 integrate .. //depot/projects/ia64_epc/sbin/ifconfig/ifconfig.8#5 integrate .. //depot/projects/ia64_epc/share/man/man4/iir.4#4 integrate .. //depot/projects/ia64_epc/sys/alpha/alpha/machdep.c#6 integrate .. //depot/projects/ia64_epc/sys/alpha/osf1/osf1_signal.c#7 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/cpu_switch.S#3 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/exception.S#4 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/genassym.c#3 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/locore.S#2 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/machdep.c#4 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/support.S#3 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/trap.c#3 integrate .. //depot/projects/ia64_epc/sys/amd64/amd64/vm_machdep.c#2 integrate .. //depot/projects/ia64_epc/sys/amd64/conf/GENERIC#3 integrate .. //depot/projects/ia64_epc/sys/amd64/ia32/Makefile#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32.h#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_exception.S#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_genassym.c#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_misc.c#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_proto.h#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_signal.c#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_signal.h#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_sigtramp.S#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_syscall.c#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_syscall.h#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_sysent.c#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_sysvec.c#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/ia32_util.h#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/syscalls.conf#1 branch .. //depot/projects/ia64_epc/sys/amd64/ia32/syscalls.master#1 branch .. //depot/projects/ia64_epc/sys/amd64/include/cpufunc.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/elf.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/md_var.h#3 integrate .. //depot/projects/ia64_epc/sys/amd64/include/pcb.h#3 integrate .. //depot/projects/ia64_epc/sys/amd64/include/pmap.h#2 integrate .. //depot/projects/ia64_epc/sys/amd64/include/segments.h#2 integrate .. //depot/projects/ia64_epc/sys/compat/linprocfs/linprocfs.c#5 integrate .. //depot/projects/ia64_epc/sys/compat/svr4/svr4_filio.c#4 integrate .. //depot/projects/ia64_epc/sys/compat/svr4/svr4_misc.c#5 integrate .. //depot/projects/ia64_epc/sys/conf/NOTES#12 integrate .. //depot/projects/ia64_epc/sys/conf/files.amd64#4 integrate .. //depot/projects/ia64_epc/sys/conf/options.amd64#3 integrate .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/Makefile#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_bstream.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_bstream.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_context.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_context.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_env.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_env.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_scoreboard.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_scoreboard.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_self.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_self.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_self_context.s#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_step.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_str.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_str.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_swap.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_swap.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_trace.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_trace.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_ttrace.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_ttrace.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_uinfo.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_uinfo.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_utable.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/src/uwx_utable.h#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/test/Makefile#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/test/dump_context.c#1 branch .. //depot/projects/ia64_epc/sys/contrib/ia64/libuwx/test/dumpmyself.c#1 branch .. //depot/projects/ia64_epc/sys/dev/acpica/Osd/OsdHardware.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/acpica/acpivar.h#4 integrate .. //depot/projects/ia64_epc/sys/dev/ata/atapi-cam.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/fxp/if_fxpreg.h#6 integrate .. //depot/projects/ia64_epc/sys/dev/puc/pucdata.c#6 integrate .. //depot/projects/ia64_epc/sys/i386/acpica/acpi_machdep.c#4 integrate .. //depot/projects/ia64_epc/sys/i386/acpica/acpi_wakeup.c#3 integrate .. //depot/projects/ia64_epc/sys/i386/conf/NOTES#12 integrate .. //depot/projects/ia64_epc/sys/i386/i386/machdep.c#6 integrate .. //depot/projects/ia64_epc/sys/i386/i386/mp_machdep.c#5 integrate .. //depot/projects/ia64_epc/sys/i386/linux/linux_sysvec.c#8 integrate .. //depot/projects/ia64_epc/sys/i386/svr4/svr4_machdep.c#4 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#24 integrate .. //depot/projects/ia64_epc/sys/kern/init_main.c#7 integrate .. //depot/projects/ia64_epc/sys/kern/kern_condvar.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/kern_exec.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/kern_exit.c#10 integrate .. //depot/projects/ia64_epc/sys/kern/kern_fork.c#10 integrate .. //depot/projects/ia64_epc/sys/kern/kern_kthread.c#4 integrate .. //depot/projects/ia64_epc/sys/kern/kern_proc.c#9 integrate .. //depot/projects/ia64_epc/sys/kern/kern_sig.c#15 integrate .. //depot/projects/ia64_epc/sys/kern/kern_synch.c#13 integrate .. //depot/projects/ia64_epc/sys/kern/kern_time.c#3 integrate .. //depot/projects/ia64_epc/sys/kern/subr_trap.c#8 integrate .. //depot/projects/ia64_epc/sys/kern/tty.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/tty_pty.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/vfs_subr.c#14 integrate .. //depot/projects/ia64_epc/sys/modules/Makefile#13 integrate .. //depot/projects/ia64_epc/sys/netncp/ncp_ncp.c#5 integrate .. //depot/projects/ia64_epc/sys/netsmb/smb_subr.c#5 integrate .. //depot/projects/ia64_epc/sys/nfsclient/nfs_socket.c#5 integrate .. //depot/projects/ia64_epc/sys/pc98/conf/NOTES#6 integrate .. //depot/projects/ia64_epc/sys/pc98/i386/machdep.c#6 integrate .. //depot/projects/ia64_epc/sys/powerpc/powerpc/machdep.c#7 integrate .. //depot/projects/ia64_epc/sys/sparc64/sparc64/machdep.c#11 integrate .. //depot/projects/ia64_epc/sys/sys/proc.h#16 integrate .. //depot/projects/ia64_epc/sys/sys/signalvar.h#5 integrate .. //depot/projects/ia64_epc/sys/sys/user.h#3 integrate .. //depot/projects/ia64_epc/sys/vm/vm_glue.c#7 integrate .. //depot/projects/ia64_epc/usr.sbin/extattrctl/extattrctl.8#2 integrate .. //depot/projects/ia64_epc/usr.sbin/rpc.lockd/kern.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/rpc.lockd/lock_proc.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/rpc.lockd/lockd_lock.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/sysinstall/install.c#4 integrate Differences ... ==== //depot/projects/ia64_epc/crypto/openssh/log.h#3 (text+ko) ==== @@ -1,5 +1,5 @@ /* $OpenBSD: log.h,v 1.8 2002/07/19 15:43:33 markus Exp $ */ -/* $FreeBSD: src/crypto/openssh/log.h,v 1.2 2003/05/12 19:22:47 des Exp $ */ +/* $FreeBSD: src/crypto/openssh/log.h,v 1.3 2003/05/13 10:18:49 des Exp $ */ /* * Author: Tatu Ylonen @@ -62,13 +62,13 @@ #define debug2 ssh_debug2 #define debug3 ssh_debug3 -void ssh_fatal(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_error(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_log(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_verbose(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_debug(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_debug2(const char *, ...) __attribute__((format(printf, 1, 2))); -void ssh_debug3(const char *, ...) __attribute__((format(printf, 1, 2))); +void fatal(const char *, ...) __attribute__((format(printf, 1, 2))); +void error(const char *, ...) __attribute__((format(printf, 1, 2))); +void log(const char *, ...) __attribute__((format(printf, 1, 2))); +void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); void fatal_cleanup(void); void fatal_add_cleanup(void (*) (void *), void *); ==== //depot/projects/ia64_epc/etc/mtree/BSD.x11-4.dist#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.x11-4.dist,v 1.22 2003/01/16 02:17:28 anholt Exp $ +# $FreeBSD: src/etc/mtree/BSD.x11-4.dist,v 1.23 2003/05/14 07:23:54 anholt Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -27,6 +27,8 @@ .. Xaw .. + Xcursor + .. Xft .. Xmu @@ -115,6 +117,8 @@ .. fs .. + icons + .. lbxproxy .. locale @@ -124,6 +128,8 @@ .. common .. + el_GR.UTF-8 + .. en_US.UTF-8 .. en_US.utf @@ -142,6 +148,8 @@ .. iso8859-10 .. + iso8859-11 + .. iso8859-13 .. iso8859-14 @@ -172,14 +180,22 @@ .. ja.SJIS .. + ja_JP.UTF-8 + .. ko .. + ko_KR.UTF-8 + .. koi8-c .. koi8-r .. koi8-u .. + lib + common + .. + .. microsoft-cp1251 .. microsoft-cp1255 @@ -200,6 +216,8 @@ .. th_TH.TACTIS .. + th_TH.UTF-8 + .. tscii-0 .. vi_VN.tcvn @@ -220,6 +238,10 @@ .. zh_TW.Big5 .. + zh_TW.UTF-8 + .. + zh_TW.big5 + .. .. proxymngr .. @@ -241,6 +263,8 @@ .. xedit lisp + progmodes + .. .. .. xinit @@ -285,6 +309,8 @@ .. nec .. + pc + .. sgi .. sony @@ -322,6 +348,8 @@ .. .. libdata + pkgconfig + .. .. libexec .. ==== //depot/projects/ia64_epc/lib/libc/sys/stat.2#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 -.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.31 2002/12/19 09:40:25 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.32 2003/05/13 08:10:05 dougb Exp $ .\" .Dd February 15, 2002 .Dt STAT 2 @@ -85,36 +85,7 @@ structure as defined by .Aq Pa sys/stat.h -(shown below) and into which information is placed concerning the file. -.Bd -literal -struct stat { - dev_t st_dev; /* inode's device */ - ino_t st_ino; /* inode's number */ - mode_t st_mode; /* inode protection mode */ - nlink_t st_nlink; /* number of hard links */ - uid_t st_uid; /* user ID of the file's owner */ - gid_t st_gid; /* group ID of the file's group */ - dev_t st_rdev; /* device type */ -#ifndef _POSIX_SOURCE - struct timespec st_atimespec; /* time of last access */ - struct timespec st_mtimespec; /* time of last data modification */ - struct timespec st_ctimespec; /* time of last file status change */ -#else - time_t st_atime; /* time of last access */ - long st_atimensec; /* nsec of last access */ - time_t st_mtime; /* time of last data modification */ - long st_mtimensec; /* nsec of last data modification */ - time_t st_ctime; /* time of last file status change */ - long st_ctimensec; /* nsec of last file status change */ -#endif - off_t st_size; /* file size, in bytes */ - int64_t st_blocks; /* blocks allocated for file */ - u_int32_t st_blksize; /* optimal blocksize for I/O */ - fflags_t st_flags; /* user defined flags for file */ - u_int32_t st_gen; /* file generation number */ -}; -.Ed .Pp The time-related fields of .Fa struct stat @@ -149,6 +120,8 @@ and .Xr write 2 system calls. +.It st_birthtime +Time when the inode was created. .El .Pp If ==== //depot/projects/ia64_epc/lib/libkvm/kvm_proc.c#6 (text+ko) ==== @@ -42,7 +42,7 @@ #endif #include -__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.66 2003/04/10 17:41:40 julian Exp $"); +__FBSDID("$FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.68 2003/05/14 15:01:20 jhb Exp $"); /* * Proc traversal interface for kvm. ps and w are (probably) the exclusive @@ -100,7 +100,7 @@ struct session sess; struct tty tty; struct vmspace vmspace; - struct procsig procsig; + struct sigacts sigacts; struct pstats pstats; struct ucred ucred; struct thread mtd; @@ -192,14 +192,14 @@ kp->ki_textvp = proc.p_textvp; kp->ki_fd = proc.p_fd; kp->ki_vmspace = proc.p_vmspace; - if (proc.p_procsig != NULL) { - if (KREAD(kd, (u_long)proc.p_procsig, &procsig)) { + if (proc.p_sigacts != NULL) { + if (KREAD(kd, (u_long)proc.p_sigacts, &sigacts)) { _kvm_err(kd, kd->program, - "can't read procsig at %x", proc.p_procsig); + "can't read sigacts at %x", proc.p_sigacts); return (-1); } - kp->ki_sigignore = procsig.ps_sigignore; - kp->ki_sigcatch = procsig.ps_sigcatch; + kp->ki_sigignore = sigacts.ps_sigignore; + kp->ki_sigcatch = sigacts.ps_sigcatch; } if ((proc.p_sflag & PS_INMEM) && proc.p_stats != NULL) { if (KREAD(kd, (u_long)proc.p_stats, &pstats)) { ==== //depot/projects/ia64_epc/release/alpha/dokern.sh#4 (text+ko) ==== @@ -1,12 +1,12 @@ #!/bin/sh # -# $FreeBSD: src/release/alpha/dokern.sh,v 1.68 2003/05/07 18:14:00 obrien Exp $ +# $FreeBSD: src/release/alpha/dokern.sh,v 1.70 2003/05/15 01:28:39 obrien Exp $ # # XXX sort by order in GENERIC, not alphabetical sed \ - -e 's/ident.*GENERIC/ident BOOTMFS/g' + -e 's/ident.*GENERIC/ident BOOTMFS/g' \ -e '/DEBUG/d' \ -e '/DEC_KN8AE/d' \ -e '/SOFTUPDATES/d' \ @@ -59,6 +59,12 @@ -e '/ axe /d' \ -e '/ cue /d' \ -e '/ kue /d' \ + -e '/ firewire /d' \ + -e '/ sbp /d' \ + -e '/ fwe /d' \ + +# XXX: blank line above intentional so lines may be added below the last +# entry with ease. echo "options SCSI_NO_OP_STRINGS" echo "options SCSI_NO_SENSE_STRINGS" ==== //depot/projects/ia64_epc/release/alpha/drivers.conf#5 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/alpha/drivers.conf,v 1.16 2003/05/12 13:12:08 wilko Exp $ +# $FreeBSD: src/release/alpha/drivers.conf,v 1.17 2003/05/14 15:38:44 obrien Exp $ # # drv: driver name in kernel config file @@ -43,7 +43,7 @@ miibus miibus 2 network "MII bus support" pcn if_pcn 2 network "AMD Am79C97x PCI 10/100" rl if_rl 2 network "RealTek 8129/8139" -tl if_tl 2 network "Texas Instruments ThunderLAN" +tl if_tl 3 network "Texas Instruments ThunderLAN" txp if_txp 2 network "3Com 3XP Typhoon/Sidewinder (3CR990)" vr if_vr 2 network "VIA Rhine, Rhine II" vx if_vx 2 network "3Com 3c590 and 3c595 EtherLink III" ==== //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#13 (text+ko) ==== @@ -31,7 +31,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.148 2003/05/10 16:30:56 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.149 2003/05/13 18:15:28 bmah Exp $ Supported Devices @@ -834,6 +834,8 @@ + IBM / Adaptec ServeRAID series (ips driver) + LSI Logic Fusion/MP architecture Fiber Channel controllers (mpt driver) ==== //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#22 (text+ko) ==== @@ -3,7 +3,7 @@ The FreeBSD Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.566 2003/05/08 22:31:00 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.567 2003/05/13 18:15:28 bmah Exp $ 2000 @@ -439,6 +439,9 @@ believed to fix problems detecting attached disks during installation. + The ips driver, which supports the IBM (now + Adaptec) ServeRAID series, has been added. + A bug in the &man.mly.4; driver that caused hangs has been corrected. ==== //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.c#6 (text+ko) ==== @@ -54,7 +54,7 @@ #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/sbin/bsdlabel/bsdlabel.c,v 1.92 2003/05/09 20:26:17 phk Exp $"); +__FBSDID("$FreeBSD: src/sbin/bsdlabel/bsdlabel.c,v 1.93 2003/05/13 19:42:52 phk Exp $"); #include #include @@ -165,6 +165,10 @@ labeloffset = 512; bbsize = 8192; alphacksum = 0; + } else if (!strcmp(optarg, "pc98")) { + labeloffset = 512; + bbsize = 8192; + alphacksum = 0; } else if (!strcmp(optarg, "alpha")) { labeloffset = 64; bbsize = 8192; ==== //depot/projects/ia64_epc/sbin/devd/parse.y#2 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/devd/parse.y,v 1.2 2002/12/07 08:04:36 imp Exp $ + * $FreeBSD: src/sbin/devd/parse.y,v 1.3 2003/05/15 02:23:32 imp Exp $ */ #include "devd.h" @@ -100,16 +100,19 @@ attach_block : ATTACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON { add_attach($2, $4); } + | ATTACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON ; detach_block : DETACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON { add_detach($2, $4); } + | DETACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON ; nomatch_block : NOMATCH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON { add_nomatch($2, $4); } + | NOMATCH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON ; match_or_action_list ==== //depot/projects/ia64_epc/sbin/ifconfig/ifconfig.8#5 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 -.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.69 2003/04/28 16:47:40 sam Exp $ +.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.71 2003/05/14 16:22:16 ru Exp $ .\" .Dd April 28, 2003 .Dt IFCONFIG 8 @@ -307,12 +307,12 @@ operating mode on the interface to .Ar mode . For IEEE 802.11 wireless interfaces that support multiple operating modes -this directive is used to select between 802.11a (\c -.Dq 11a ), -802.11b (\c -.Dq 11b ), -and 802.11g (\c -.Dq 11g ) +this directive is used to select between 802.11a +.Pq Dq 11a , +802.11b +.Pq Dq 11b , +and 802.11g +.Pq Dq 11g operating modes. .It Cm rxcsum , txcsum If the driver supports user-configurable checksum offloading, @@ -466,7 +466,7 @@ See the .Ar address option above for more information. -3\" see +.\" see .\" Xr eon 5 . .\" .It Cm nsellength Ar n .\" .Pf ( Tn ISO ==== //depot/projects/ia64_epc/share/man/man4/iir.4#4 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/share/man/man4/iir.4,v 1.3 2003/03/25 18:13:20 trhodes Exp $ +.\" $FreeBSD: src/share/man/man4/iir.4,v 1.4 2003/05/14 17:53:40 trhodes Exp $ .\" Written by Tom Rhodes .\" This file is in the public domain. .\" @@ -63,11 +63,3 @@ .An Tom Rhodes Aq trhodes@FreeBSD.org and is based on information supplied by the driver authors and the website of .An Mike Smith Aq msmith@FreeBSD.org . -.Sh BUGS -During a -.Fx -install, the -.Nm -controller appears to correctly probe, but finds no disk devices. -The card in question is an Intel SRCU32 RAID controller with 32Mb RAM, -Firmware revision 2.33.01. ==== //depot/projects/ia64_epc/sys/alpha/alpha/machdep.c#6 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.201 2003/04/25 01:50:28 deischen Exp $ + * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.202 2003/05/13 20:35:56 jhb Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1135,11 +1135,13 @@ td = curthread; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); + psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); + frame = td->td_frame; - oonstack = sigonstack(alpha_pal_rdusp()); fsize = sizeof ksi; rndfsize = ((fsize + 15) / 16) * 16; - psp = p->p_sigacts; + oonstack = sigonstack(alpha_pal_rdusp()); /* * Allocate and validate space for the signal handler @@ -1157,6 +1159,7 @@ #endif } else sip = (osiginfo_t *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -1212,7 +1215,8 @@ frame->tf_regs[FRAME_A0] = sig; frame->tf_regs[FRAME_FLAGS] = 0; /* full restore */ PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) frame->tf_regs[FRAME_A1] = (u_int64_t)sip; else frame->tf_regs[FRAME_A1] = code; @@ -1237,6 +1241,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(alpha_pal_rdusp()); @@ -1278,6 +1283,7 @@ #endif } else sfp = (struct sigframe4 *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* save the floating-point state, if necessary, then copy it. */ @@ -1313,7 +1319,8 @@ frame->tf_regs[FRAME_PC] = PS_STRINGS - szfreebsd4_sigcode; frame->tf_regs[FRAME_A0] = sig; PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { frame->tf_regs[FRAME_A1] = (u_int64_t)&(sfp->sf_si); /* Fill in POSIX parts */ @@ -1345,6 +1352,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); #ifdef COMPAT_FREEBSD4 if (SIGISMEMBER(psp->ps_freebsd4, sig)) { freebsd4_sendsig(catcher, sig, mask, code); @@ -1399,6 +1407,7 @@ #endif } else sfp = (struct sigframe *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* save the floating-point state, if necessary, then copy it. */ @@ -1434,7 +1443,8 @@ frame->tf_regs[FRAME_PC] = PS_STRINGS - szsigcode; frame->tf_regs[FRAME_A0] = sig; PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + mtx_lock(&psp->ps_mtx); + if (SIGISMEMBER(psp->ps_siginfo, sig)) { frame->tf_regs[FRAME_A1] = (u_int64_t)&(sfp->sf_si); /* Fill in POSIX parts */ ==== //depot/projects/ia64_epc/sys/alpha/osf1/osf1_signal.c#7 (text+ko) ==== @@ -30,7 +30,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.32 2003/04/29 06:33:03 alc Exp $ + * $FreeBSD: src/sys/alpha/osf1/osf1_signal.c,v 1.33 2003/05/13 20:35:56 jhb Exp $ */ #include "opt_compat.h" @@ -471,6 +471,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(alpha_pal_rdusp()); @@ -490,6 +491,7 @@ p->p_sigstk.ss_flags |= SS_ONSTACK; } else sip = (osiginfo_t *)(alpha_pal_rdusp() - rndfsize); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -551,6 +553,7 @@ frame->tf_regs[FRAME_FLAGS] = 0; /* full restore */ alpha_pal_wrusp((unsigned long)sip); PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } ==== //depot/projects/ia64_epc/sys/amd64/amd64/cpu_switch.S#3 (text+ko) ==== @@ -33,7 +33,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.139 2003/05/12 02:37:28 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.141 2003/05/15 00:23:39 peter Exp $ */ #include @@ -118,6 +118,12 @@ movl %eax,PCB_GSBASE(%r8) movl %edx,PCB_GSBASE+4(%r8) + /* Save segment selector numbers */ + movl %ds,PCB_DS(%r8) + movl %es,PCB_ES(%r8) + movl %fs,PCB_FS(%r8) + movl %gs,PCB_GS(%r8) + /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) jne 1f @@ -160,6 +166,17 @@ */ movq TD_PCB(%rsi),%r8 + /* Restore segment selector numbers */ + movl PCB_DS(%r8),%ds + movl PCB_ES(%r8),%es + movl PCB_FS(%r8),%fs + + /* Restore userland %gs while preserving kernel gsbase */ + movl $MSR_GSBASE,%ecx + rdmsr + movl PCB_GS(%r8),%gs + wrmsr + /* Restore userland %fs */ movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax ==== //depot/projects/ia64_epc/sys/amd64/amd64/exception.S#4 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.109 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.110 2003/05/14 04:10:47 peter Exp $ */ #include @@ -218,40 +218,6 @@ jmp alltraps_pushregs_no_rdi /* - * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) - * - * This is a SDT_SYSIDT entry point (unlike the i386 port) so that we - * can do a swapgs before enabling interrupts. This is critical because - * if we took an interrupt before swapgs, the interrupt code would see - * that it originated in supervisor mode and skip the swapgs. - */ - SUPERALIGN_TEXT -IDTVEC(int0x80_syscall) - swapgs - sti - pushq $2 /* sizeof "int 0x80" */ - subq $TF_ERR,%rsp /* skip over tf_trapno */ - movq %rdi,TF_RDI(%rsp) - movq %rsi,TF_RSI(%rsp) - movq %rdx,TF_RDX(%rsp) - movq %rcx,TF_RCX(%rsp) - movq %r8,TF_R8(%rsp) - movq %r9,TF_R9(%rsp) - movq %rax,TF_RAX(%rsp) - movq %rbx,TF_RBX(%rsp) - movq %rbp,TF_RBP(%rsp) - movq %r10,TF_R10(%rsp) - movq %r11,TF_R11(%rsp) - movq %r12,TF_R12(%rsp) - movq %r13,TF_R13(%rsp) - movq %r14,TF_R14(%rsp) - movq %r15,TF_R15(%rsp) - FAKE_MCOUNT(13*4(%rsp)) - call syscall - MEXITCOUNT - jmp doreti - -/* * Fast syscall entry point. We enter here with just our new %cs/%ss set, * and the new privilige level. We are still running on the old user stack * pointer. We have to juggle a few things around to find our stack etc. @@ -353,6 +319,7 @@ */ .text SUPERALIGN_TEXT + .globl doreti .type doreti,@function doreti: FAKE_MCOUNT(bintr) /* init "from" bintr -> doreti */ ==== //depot/projects/ia64_epc/sys/amd64/amd64/genassym.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.144 2003/05/12 18:33:19 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.146 2003/05/15 00:23:39 peter Exp $ */ #include "opt_compat.h" @@ -125,6 +125,10 @@ ASSYM(PCB_RFLAGS, offsetof(struct pcb, pcb_rflags)); ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); +ASSYM(PCB_DS, offsetof(struct pcb, pcb_ds)); +ASSYM(PCB_ES, offsetof(struct pcb, pcb_es)); +ASSYM(PCB_FS, offsetof(struct pcb, pcb_fs)); +ASSYM(PCB_GS, offsetof(struct pcb, pcb_gs)); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_FULLCTX, PCB_FULLCTX); @@ -181,8 +185,10 @@ ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL)); ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL)); ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL)); +ASSYM(KUC32SEL, GSEL(GUCODE32_SEL, SEL_UPL)); ASSYM(MSR_FSBASE, MSR_FSBASE); +ASSYM(MSR_GSBASE, MSR_GSBASE); ASSYM(MSR_KGSBASE, MSR_KGSBASE); ASSYM(GPROC0_SEL, GPROC0_SEL); ==== //depot/projects/ia64_epc/sys/amd64/amd64/locore.S#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/locore.S,v 1.172 2003/05/01 01:05:21 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/locore.S,v 1.173 2003/05/15 00:20:17 peter Exp $ */ #include @@ -34,15 +34,6 @@ #include "assym.s" /* - * PTmap is recursive pagemap at top of virtual address space. - * Within PTmap, the page directory can be found (third indirection). - */ - .globl PTmap,PTD,PTDpde - .set PTmap,(PTDPTDI << PDRSHIFT) - .set PTD,PTmap + (PTDPTDI * PAGE_SIZE) - .set PTDpde,PTD + (PTDPTDI * PDESIZE) - -/* * Compiled KERNBASE location */ .globl kernbase ==== //depot/projects/ia64_epc/sys/amd64/amd64/machdep.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.575 2003/05/12 18:37:56 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.578 2003/05/15 00:23:39 peter Exp $ */ #include "opt_atalk.h" @@ -124,12 +124,11 @@ #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) static void cpu_startup(void *); -static void fpstate_drop(struct thread *td); static void get_fpcontext(struct thread *td, mcontext_t *mcp); static int set_fpcontext(struct thread *td, const mcontext_t *mcp); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) -int _udatasel, _ucodesel; +int _udatasel, _ucodesel, _ucode32sel; u_long atdevbase; u_int64_t modulep; /* phys addr of metadata table */ @@ -235,6 +234,7 @@ p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); regs = td->td_frame; oonstack = sigonstack(regs->tf_rsp); @@ -262,7 +262,6 @@ sp = (char *)regs->tf_rsp - sizeof(struct sigframe) - 128; /* Align to 16 bytes. */ sfp = (struct sigframe *)((unsigned long)sp & ~0xF); - PROC_UNLOCK(p); /* Translate the signal if appropriate. */ if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) @@ -271,8 +270,7 @@ /* Build the argument list for the signal handler. */ regs->tf_rdi = sig; /* arg 1 in %rdi */ regs->tf_rdx = (register_t)&sfp->sf_uc; /* arg 3 in %rdx */ - PROC_LOCK(p); - if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) { + if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ regs->tf_rsi = (register_t)&sfp->sf_si; /* arg 2 in %rsi */ sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; @@ -287,6 +285,7 @@ regs->tf_rcx = regs->tf_addr; /* arg 4 in %rcx */ sf.sf_ahu.sf_handler = catcher; } + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* @@ -305,6 +304,7 @@ regs->tf_rflags &= ~PSL_T; regs->tf_cs = _ucodesel; PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); } /* @@ -389,6 +389,16 @@ return (EJUSTRETURN); } +#ifdef COMPAT_FREEBSD4 +int +freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) +{ + + return sigreturn(td, (struct sigreturn_args *)uap); +} +#endif + + /* * Machine dependent boot() routine * @@ -467,10 +477,18 @@ struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; + wrmsr(MSR_FSBASE, 0); + wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ pcb->pcb_fsbase = 0; pcb->pcb_gsbase = 0; - wrmsr(MSR_FSBASE, 0); - wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */ + load_ds(_udatasel); + load_es(_udatasel); + load_fs(_udatasel); + load_gs(_udatasel); + pcb->pcb_ds = _udatasel; + pcb->pcb_es = _udatasel; + pcb->pcb_fs = _udatasel; + pcb->pcb_gs = _udatasel; bzero((char *)regs, sizeof(struct trapframe)); regs->tf_rip = entry; @@ -589,7 +607,7 @@ 0xfffff, /* length - all address space */ SDT_MEMERA, /* segment type */ SEL_UPL, /* segment descriptor priority level */ - 0, /* segment descriptor present */ + 1, /* segment descriptor present */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu May 15 00:22:58 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 570F437B404; Thu, 15 May 2003 00:22:58 -0700 (PDT) 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 EBC7237B401 for ; Thu, 15 May 2003 00:22:57 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B33E43FA3 for ; Thu, 15 May 2003 00:22:57 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4F7Mv0U005079 for ; Thu, 15 May 2003 00:22:57 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4F7MuOq005076 for perforce@freebsd.org; Thu, 15 May 2003 00:22:56 -0700 (PDT) Date: Thu, 15 May 2003 00:22:56 -0700 (PDT) Message-Id: <200305150722.h4F7MuOq005076@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31223 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 07:22:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=31223 Change 31223 by marcel@marcel_nfs on 2003/05/15 00:22:34 Improve the "header" comment. While here, stop using a seperate section for the syscall code proper. There's not need for it. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#19 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#19 (text+ko) ==== @@ -32,13 +32,15 @@ /* * A process performs a syscall by performing an indirect call to the - * address stored in ar.k5. The contents ar.pfs and rp should be saved - * prior to the syscall in r9 and r10 respectively. The kernel will - * restore these values on return. The value of gp is preserved across - * the call. - * The address in ar.k5 is the start of the EPC gateway page. The code - * in the gateway page is primarily responsible for increasing the - * privilege level, but will also make sure we have a reliable psr. + * address stored in ar.k5. The contents of ar.pfs and rp should be + * saved prior to the syscall in r9 and r10 respectively. The kernel + * will restore these values on return. The value of gp is preserved + * across the call. This allows for small enough syscall stubs without + * getting too weird. + * The address in ar.k5 is the start of the EPC gateway page and also + * the syscall entry point. The syscall code in the gateway page is + * primarily responsible for increasing the privilege level, but will + * also make sure we have a reliable psr. * * A process defines: * r8 - syscall number @@ -53,10 +55,16 @@ * rp - restored from r10 * gp - preserved * - * The EPC defines: + * The EPC syscall code defines: * r11 - copy of psr.l * r14 - Kernel memory stack * r15 - Kernel register stack + * + * Also in the gateway page are the signal trampolines. As such, stacks + * don't have to be made executable per se. Since debuggers have a need + * to know about trampolines, we probably need to define a table of + * vectors or something along those lines so that debuggers can get the + * information they need and we have the freedom to move code around. */ .section .text.gateway, "ax" @@ -228,7 +236,7 @@ .align PAGE_SIZE - .section .text.syscall, "ax" + .text ENTRY(epc_syscall, 8) .prologue From owner-p4-projects@FreeBSD.ORG Thu May 15 00:55:39 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A93B237B401; Thu, 15 May 2003 00:55:38 -0700 (PDT) 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 5E84437B404 for ; Thu, 15 May 2003 00:55:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F38B43F75 for ; Thu, 15 May 2003 00:55:37 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4F7tb0U011421 for ; Thu, 15 May 2003 00:55:37 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4F7tamV011418 for perforce@freebsd.org; Thu, 15 May 2003 00:55:36 -0700 (PDT) Date: Thu, 15 May 2003 00:55:36 -0700 (PDT) Message-Id: <200305150755.h4F7tamV011418@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31224 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 07:55:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=31224 Change 31224 by marcel@marcel_nfs on 2003/05/15 00:55:00 Glue the contributed unwinder into the build and fix the kernel debugger. Enable the debugger by default for SKI. Affected files ... .. //depot/projects/ia64_epc/sys/conf/Makefile.ia64#4 edit .. //depot/projects/ia64_epc/sys/conf/files.ia64#13 edit .. //depot/projects/ia64_epc/sys/ia64/conf/SKI#7 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/db_trace.c#4 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/unwind.c#4 edit .. //depot/projects/ia64_epc/sys/ia64/include/unwind.h#4 edit Differences ... ==== //depot/projects/ia64_epc/sys/conf/Makefile.ia64#4 (text+ko) ==== @@ -32,6 +32,8 @@ .endif .include "$S/conf/kern.pre.mk" +INCLUDES+= -I$S/contrib/ia64/libuwx/src + CFLAGS+= -mconstant-gp ASM_CFLAGS= -x assembler-with-cpp -Wa,-x -DLOCORE ${CFLAGS} ==== //depot/projects/ia64_epc/sys/conf/files.ia64#13 (text+ko) ==== @@ -18,6 +18,19 @@ no-obj no-implicit-rule before-depend \ clean "atkbdmap.h" # +contrib/ia64/libuwx/src/uwx_bstream.c standard +contrib/ia64/libuwx/src/uwx_context.c standard +contrib/ia64/libuwx/src/uwx_env.c standard +contrib/ia64/libuwx/src/uwx_scoreboard.c standard +#contrib/ia64/libuwx/src/uwx_self.c standard +#contrib/ia64/libuwx/src/uwx_self_context.s standard +contrib/ia64/libuwx/src/uwx_step.c standard +contrib/ia64/libuwx/src/uwx_str.c standard +contrib/ia64/libuwx/src/uwx_swap.c standard +contrib/ia64/libuwx/src/uwx_trace.c standard +#contrib/ia64/libuwx/src/uwx_ttrace.c standard +contrib/ia64/libuwx/src/uwx_uinfo.c standard +contrib/ia64/libuwx/src/uwx_utable.c standard crypto/blowfish/bf_enc.c optional crypto crypto/blowfish/bf_enc.c optional ipsec ipsec_esp crypto/des/des_enc.c optional crypto ==== //depot/projects/ia64_epc/sys/ia64/conf/SKI#7 (text+ko) ==== @@ -30,6 +30,7 @@ makeoptions NO_MODULES=yes #Ignore any x86 CPUTYPE options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] +options DDB options FFS #Berkeley Fast Filesystem options INET #InterNETworking options INET6 #IPv6 communications protocols ==== //depot/projects/ia64_epc/sys/ia64/ia64/db_trace.c#4 (text+ko) ==== @@ -44,76 +44,61 @@ int db_md_clr_watchpoint(db_expr_t addr, db_expr_t size); void db_md_list_watchpoints(void); -extern char ia64_vector_table[], do_syscall[], do_syscall_end[]; - void -db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) +db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, + char *modif) { -#if 0 - struct ia64_unwind_state *us; + struct unw_regstate rs; + const char *name; + db_expr_t offset; + uint64_t bsp, cfm, ip, pfs, reg; + c_db_sym_t sym; + int args, error, i; - if (count == -1) - count = 65535; + error = unw_create(&rs, &ddb_regs); + while (!error && count--) { + error = unw_get_cfm(&rs, &cfm); + if (!error) + error = unw_get_bsp(&rs, &bsp); + if (!error) + error = unw_get_ip(&rs, &ip); + if (error) + break; - if (!have_addr) { - us = ia64_create_unwind_state(&ddb_regs); - } else { - return; /* XXX */ - } + args = (cfm >> 7) & 0x7f; + if (args > 8) + args = 8; - if (!us) { - db_printf("db_stack_trace_cmd: can't create unwind state\n"); - return; - } + error = unw_step(&rs); + if (!error) { + error = unw_get_cfm(&rs, &pfs); + if (!error) { + i = (pfs & 0x7f) - ((pfs >> 7) & 0x7f); + if (args > i) + args = i; + } + } - while (count--) { - const char * name; - db_expr_t ip; - db_expr_t offset; - c_db_sym_t sym; - int cfm, sof, sol, nargs, i; - u_int64_t *bsp; - u_int64_t *p, reg; - - ip = ia64_unwind_state_get_ip(us); - cfm = ia64_unwind_state_get_cfm(us); - bsp = ia64_unwind_state_get_bsp(us); - sof = cfm & 0x7f; - sol = (cfm >> 7) & 0x7f; - sym = db_search_symbol(ip, DB_STGY_ANY, &offset); db_symbol_values(sym, &name, NULL); - db_printf("%s(", name); - - nargs = sof - sol; - if (nargs > 8) - nargs = 8; - if (bsp >= (u_int64_t *)IA64_RR_BASE(5)) { - for (i = 0; i < nargs; i++) { - p = ia64_rse_register_address(bsp, 32 + i); - db_read_bytes((vm_offset_t) p, sizeof(reg), - (caddr_t) ®); + if (bsp >= IA64_RR_BASE(5)) { + for (i = 0; i < args; i++) { + if ((bsp & 0x1ff) == 0x1f8) + bsp += 8; + db_read_bytes(bsp, sizeof(reg), (void*)®); if (i > 0) db_printf(", "); db_printf("0x%lx", reg); + bsp += 8; } - } + } else + db_printf("..."); db_printf(") at "); db_printsym(ip, DB_STGY_PROC); db_printf("\n"); - - if (ia64_unwind_state_previous_frame(us)) - break; - - ip = ia64_unwind_state_get_ip(us); - if (!ip) - break; } - - ia64_free_unwind_state(us); -#endif } void @@ -144,4 +129,3 @@ { return; } - ==== //depot/projects/ia64_epc/sys/ia64/ia64/unwind.c#4 (text+ko) ==== @@ -32,16 +32,12 @@ #include #include -#include +#include #include -#ifdef UNWIND_DEBUG -#define DPF(x) printf x -#else -#define DPF(x) -#endif +#include -MALLOC_DEFINE(M_UNWIND, "Unwind table", "Unwind table information"); +MALLOC_DEFINE(M_UNWIND, "Unwind", "Unwind information"); struct unw_entry { uint64_t ue_start; /* procedure start */ @@ -61,15 +57,21 @@ static struct unw_table_list unw_tables; +static void * +unw_alloc(size_t sz) +{ + + return (malloc(sz, M_UNWIND, M_WAITOK)); +} + static void -unw_initialize(void *dummy __unused) +unw_free(void *p) { - LIST_INIT(&unw_tables); + free(p, M_UNWIND); } -SYSINIT(unwind, SI_SUB_KMEM, SI_ORDER_ANY, unw_initialize, 0); -#if NOTYET +#if 0 static struct unw_entry * unw_entry_lookup(struct unw_table *ut, uint64_t ip) { @@ -103,1284 +105,203 @@ return (NULL); } -static __inline void -unw_set_loc(void *rs, void *pcb, int sz) +static int +unw_cb_copyin(int req, char *to, uint64_t from, int len, intptr_t tok) { - while (sz > 0) { - *((uint64_t*)rs) = (uint64_t)pcb; - ((uint64_t*)pcb)++, ((uint64_t*)rs)++; - sz -= sizeof(uint64_t); - } -} + struct unw_regstate *rs = (void*)tok; + int reg; -int -unw_state_create(struct unw_regstate *rs, struct pcb *pcb) -{ - uint64_t *fp; + switch (req) { + case UWX_COPYIN_UINFO: + break; + case UWX_COPYIN_MSTACK: + *((uint64_t*)to) = *((uint64_t*)from); + return (8); + case UWX_COPYIN_RSTACK: + *((uint64_t*)to) = *((uint64_t*)from); + return (8); + case UWX_COPYIN_REG: + if (from == UWX_REG_PFS) + from = rs->frame->tf_special.pfs; + else if (from == UWX_REG_PREDS) + from = rs->frame->tf_special.pr; + else if (from == UWX_REG_RNAT) + from = rs->frame->tf_special.rnat; + else if (from == UWX_REG_UNAT) + from = rs->frame->tf_special.unat; + else if (from >= UWX_REG_GR(0) && from <= UWX_REG_GR(127)) { + reg = from - UWX_REG_GR(0); + if (reg == 1) + from = rs->frame->tf_special.gp; + else if (reg == 12) + from = rs->frame->tf_special.sp; + else if (reg == 13) + from = rs->frame->tf_special.tp; + else if (reg >= 2 && reg <= 3) + from = (&rs->frame->tf_scratch.gr2)[reg - 2]; + else if (reg >= 8 && reg <= 11) + from = (&rs->frame->tf_scratch.gr8)[reg - 8]; + else if (reg >= 14 && reg <= 31) + from = (&rs->frame->tf_scratch.gr14)[reg - 14]; + else + goto oops; + } else if (from >= UWX_REG_BR(0) && from <= UWX_REG_BR(7)) { + reg = from - UWX_REG_BR(0); + if (reg == 0) + from = rs->frame->tf_special.rp; + else if (reg >= 6 && reg <= 7) + from = (&rs->frame->tf_scratch.br6)[reg - 6]; + else + goto oops; + } else + goto oops; - /* Set the current IP to the code address of savectx. */ - fp = (void*)savectx; - rs->rs_val.special.iip = *fp; - /* Cache the values. */ - rs->rs_val.special = pcb->pcb_special; - rs->rs_val.preserved = pcb->pcb_preserved; - rs->rs_val.preserved_fp = pcb->pcb_preserved_fp; - /* Set the location to the memory address in the PCB. */ - unw_set_loc(&rs->rs_loc.special, &pcb->pcb_special, - sizeof(rs->rs_loc.special)); - unw_set_loc(&rs->rs_loc.preserved, &pcb->pcb_preserved, - sizeof(rs->rs_loc.preserved)); - unw_set_loc(&rs->rs_loc.preserved_fp, &pcb->pcb_preserved_fp, - sizeof(rs->rs_loc.preserved_fp)); - return (0); -} + *((uint64_t*)to) = from; + return (len); + } -int -unw_table_add(uint64_t base, uint64_t start, uint64_t end) -{ - struct unw_table *ut; + oops: + printf("UNW: %s(%d, %p, %lx, %d, %lx)\n", __func__, req, to, from, + len, tok); - ut = malloc(sizeof(struct unw_table), M_UNWIND, M_NOWAIT); - if (ut == NULL) - return (ENOMEM); - - ut->ut_base = base; - ut->ut_start = (struct unw_entry*)start; - ut->ut_end = (struct unw_entry*)end; - ut->ut_limit = base + ut->ut_end[-1].ue_end; - LIST_INSERT_HEAD(&unw_tables, ut, ut_link); - - if (bootverbose) - printf("UNWIND: table added: base=%lx, start=%lx, end=%lx\n", - base, start, end); - return (0); } -void -unw_table_remove(uint64_t base) +static int +unw_cb_lookup(int req, uint64_t ip, intptr_t tok, uint64_t **vec) { + struct unw_regstate *rs = (void*)tok; struct unw_table *ut; - ut = unw_table_lookup(base); - if (ut != NULL) { - LIST_REMOVE(ut, ut_link); - free(ut, M_UNWIND); - if (bootverbose) - printf("UNWIND: table removed: base=%lx\n", base); + switch (req) { + case UWX_LKUP_LOOKUP: + ut = unw_table_lookup(ip); + if (ut == NULL) + return (UWX_LKUP_NOTFOUND); + rs->keyval[0] = UWX_KEY_TBASE; + rs->keyval[1] = ut->ut_base; + rs->keyval[2] = UWX_KEY_USTART; + rs->keyval[3] = (intptr_t)ut->ut_start; + rs->keyval[4] = UWX_KEY_UEND; + rs->keyval[5] = (intptr_t)ut->ut_end; + rs->keyval[6] = 0; + rs->keyval[7] = 0; + *vec = rs->keyval; + return (UWX_LKUP_UTABLE); + case UWX_LKUP_FREE: + return (0); } -} -#if 0 -static u_int64_t -read_uleb128(u_int8_t **pp) -{ - u_int8_t *p = *pp; - u_int8_t b; - u_int64_t res; - - res = 0; - do { - b = *p++; - res = (res << 7) | (b & 0x7f); - } while (b & (1 << 7)); - - *pp = p; - return res; + return (UWX_LKUP_ERR); } -#define PROCESS_WHEN(us, reg, t) \ -do { \ - DPF(("register %s was saved at offset %d\n", \ - #reg, t)); \ - us->us_regs.rs_##reg.ur_when = t; \ -} while (0) - -#define PROCESS_GR(us, reg, gr) \ -do { \ - DPF(("save location for %s at r%d\n", #reg, gr)); \ - us->us_regs.rs_##reg.ur_save = find_gr(us, gr); \ -} while (0) \ - -#define PROCESS_BR(us, reg, br) \ -do { \ - DPF(("save location for %s at b%d\n", #reg, br)); \ - us->us_regs.rs_##reg.ur_save = \ - &us->us_regs.rs_br[br].ur_value; \ -} while (0) - -#define PROCESS_GRMEM(us, reg) \ -do { \ - DPF(("save location for %s at spill+%d\n", \ - #reg, us->us_spilloff)); \ - us->us_regs.rs_##reg.ur_save = \ - &us->us_spill[us->us_spilloff]; \ - us->us_spilloff += 8; \ -} while (0) - -#define PROCESS_FRMEM(us, reg) \ -do { \ - DPF(("save location for %s at spill+%d\n", \ - #reg, us->us_spilloff)); \ - us->us_regs.rs_##reg.ur_save = \ - (struct ia64_fpreg *) \ - &us->us_spill[us->us_spilloff]; \ - us->us_spilloff += 16; \ -} while (0) - -#define PROCESS_SPREL(us, reg, spoff) \ -do { \ - DPF(("save location for %s at sp+%d\n", \ - #reg, 4*spoff)); \ - us->us_regs.rs_##reg.ur_save = (u_int64_t *) \ - (us->us_regs.rs_gr[12].ur_value + 4*spoff); \ -} while (0) - -#define PROCESS_SPREL_WHEN(us, reg, spoff, t) \ -do { \ - PROCESS_SPREL(us, reg, spoff); \ - PROCESS_WHEN(us, reg, t); \ -} while (0) - -#define PROCESS_PSPREL(us, reg, pspoff) \ -do { \ - DPF(("save location for %s at psp+%d\n", \ - #reg, 16-4*pspoff)); \ - us->us_regs.rs_##reg.ur_save = (u_int64_t *) \ - (us->us_regs.rs_psp.ur_value + 16-4*pspoff); \ -} while (0) - -#define PROCESS_PSPREL_WHEN(us, reg, pspoff, t) \ -do { \ - PROCESS_PSPREL(us, reg, pspoff); \ - PROCESS_WHEN(us, reg, t); \ -} while (0) - -static u_int64_t * -find_gr(struct ia64_unwind_state *us, int gr) +int +unw_create(struct unw_regstate *rs, struct trapframe *tf) { - if (gr < 32) - return &us->us_regs.rs_gr[gr].ur_value; - else - return ia64_rse_register_address(us->us_bsp, gr); -} + struct unw_table *ut; + uint64_t bsp; + int nats, sof, uwxerr; -static void -parse_prologue(struct ia64_unwind_state *us, int rlen) -{ -} + ut = unw_table_lookup(tf->tf_special.iip); + if (ut == NULL) + return (ENOENT); -static void -parse_prologue_gr(struct ia64_unwind_state *us, int rlen, - int mask, int grsave) -{ - if (mask & 8) { - PROCESS_GR(us, br[0], grsave); - grsave++; - } - if (mask & 4) { - PROCESS_GR(us, pfs, grsave); - grsave++; - } - if (mask & 2) { - PROCESS_GR(us, psp, grsave); - grsave++; - } - if (mask & 1) { - PROCESS_GR(us, preds, grsave); - grsave++; - } -} + rs->frame = tf; + rs->env = uwx_init(); + if (rs->env == NULL) + return (ENOMEM); -static void -parse_mem_stack_f(struct ia64_unwind_state *us, int t, int size) -{ - DPF(("restore value for psp is sp+%d at offset %d\n", - 16*size, t)); - us->us_regs.rs_psp.ur_when = t; - us->us_regs.rs_stack_size = 16*size; -} + uwxerr = uwx_register_callbacks(rs->env, (intptr_t)rs, + unw_cb_copyin, unw_cb_lookup); + if (uwxerr) + return (EINVAL); /* XXX */ -static void -parse_mem_stack_v(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, psp, t); -} + bsp = tf->tf_special.bspstore + tf->tf_special.ndirty; + sof = (int)(tf->tf_special.cfm & 0x7f); + nats = (sof + 63 - ((int)(bsp >> 3) & 0x3f)) / 63; + uwxerr = uwx_init_context(rs->env, tf->tf_special.iip, + tf->tf_special.sp, bsp - ((sof + nats) << 3), tf->tf_special.cfm); -static void -parse_psp_gr(struct ia64_unwind_state *us, int gr) -{ - PROCESS_GR(us, psp, gr); + return ((uwxerr) ? EINVAL : 0); /* XXX */ } -static void -parse_psp_sprel(struct ia64_unwind_state *us, int spoff) +int +unw_step(struct unw_regstate *rs) { - PROCESS_SPREL(us, psp, spoff); -} + int uwxerr; -static void -parse_rp_when(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, br[0], t); + uwxerr = uwx_step(rs->env); + return ((uwxerr) ? EINVAL : 0); /* XXX */ } -static void -parse_rp_gr(struct ia64_unwind_state *us, int gr) +int +unw_get_bsp(struct unw_regstate *s, uint64_t *r) { - PROCESS_GR(us, br[0], gr); -} + int uwxerr; -static void -parse_rp_br(struct ia64_unwind_state *us, int br) -{ - PROCESS_BR(us, br[0], br); + uwxerr = uwx_get_reg(s->env, UWX_REG_BSP, r); + return ((uwxerr) ? EINVAL : 0); /* XXX */ } -static void -parse_rp_psprel(struct ia64_unwind_state *us, int pspoff) +int +unw_get_cfm(struct unw_regstate *s, uint64_t *r) { - PROCESS_PSPREL(us, br[0], pspoff); -} + int uwxerr; -static void -parse_rp_sprel(struct ia64_unwind_state *us, int spoff) -{ - PROCESS_SPREL(us, br[0], spoff); + uwxerr = uwx_get_reg(s->env, UWX_REG_CFM, r); + return ((uwxerr) ? EINVAL : 0); /* XXX */ } -static void -parse_pfs_when(struct ia64_unwind_state *us, int t) +int +unw_get_ip(struct unw_regstate *s, uint64_t *r) { - PROCESS_WHEN(us, pfs, t); -} + int uwxerr; -static void -parse_pfs_gr(struct ia64_unwind_state *us, int gr) -{ - PROCESS_GR(us, pfs, gr); + uwxerr = uwx_get_reg(s->env, UWX_REG_IP, r); + return ((uwxerr) ? EINVAL : 0); /* XXX */ } -static void -parse_pfs_psprel(struct ia64_unwind_state *us, int pspoff) +int +unw_table_add(uint64_t base, uint64_t start, uint64_t end) { - PROCESS_PSPREL(us, pfs, pspoff); -} + struct unw_table *ut; -static void -parse_pfs_sprel(struct ia64_unwind_state *us, int spoff) -{ - PROCESS_SPREL(us, pfs, spoff); -} + ut = malloc(sizeof(struct unw_table), M_UNWIND, M_NOWAIT); + if (ut == NULL) + return (ENOMEM); -static void -parse_preds_when(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, preds, t); -} + ut->ut_base = base; + ut->ut_start = (struct unw_entry*)start; + ut->ut_end = (struct unw_entry*)end; + ut->ut_limit = base + ut->ut_end[-1].ue_end; + LIST_INSERT_HEAD(&unw_tables, ut, ut_link); -static void -parse_preds_gr(struct ia64_unwind_state *us, int gr) -{ - PROCESS_GR(us, preds, gr); -} + if (bootverbose) + printf("UNWIND: table added: base=%lx, start=%lx, end=%lx\n", + base, start, end); -static void -parse_preds_psprel(struct ia64_unwind_state *us, int pspoff) -{ - PROCESS_PSPREL(us, preds, pspoff); + return (0); } -static void -parse_preds_sprel(struct ia64_unwind_state *us, int spoff) +void +unw_table_remove(uint64_t base) { - PROCESS_SPREL(us, preds, spoff); -} + struct unw_table *ut; -static void -parse_fr_mem(struct ia64_unwind_state *us, int frmask) -{ - us->us_frmask = frmask; -} - -static void -parse_frgr_mem(struct ia64_unwind_state *us, int grmask, int frmask) -{ - us->us_grmask = grmask; - if (grmask & 1) - PROCESS_GRMEM(us, gr[4]); - if (grmask & 2) - PROCESS_GRMEM(us, gr[5]); - if (grmask & 4) - PROCESS_GRMEM(us, gr[6]); - if (grmask & 8) - PROCESS_GRMEM(us, gr[7]); - - us->us_frmask = frmask; - if (frmask & 1) - PROCESS_FRMEM(us, fr[2]); - if (frmask & 2) - PROCESS_FRMEM(us, fr[3]); - if (frmask & 4) - PROCESS_FRMEM(us, fr[4]); - if (frmask & 8) - PROCESS_FRMEM(us, fr[5]); - if (frmask & 16) - PROCESS_FRMEM(us, fr[16]); - if (frmask & 32) - PROCESS_FRMEM(us, fr[17]); - if (frmask & 64) - PROCESS_FRMEM(us, fr[18]); - if (frmask & 128) - PROCESS_FRMEM(us, fr[19]); - if (frmask & 256) - PROCESS_FRMEM(us, fr[20]); - if (frmask & 512) - PROCESS_FRMEM(us, fr[21]); - if (frmask & 1024) - PROCESS_FRMEM(us, fr[22]); - if (frmask & 2048) - PROCESS_FRMEM(us, fr[24]); - if (frmask & 4096) - PROCESS_FRMEM(us, fr[25]); - if (frmask & 8192) - PROCESS_FRMEM(us, fr[26]); - if (frmask & 16384) - PROCESS_FRMEM(us, fr[27]); - if (frmask & 32768) - PROCESS_FRMEM(us, fr[28]); - if (frmask & 65536) - PROCESS_FRMEM(us, fr[29]); - if (frmask & 131072) - PROCESS_FRMEM(us, fr[30]); - if (frmask & 262144) - PROCESS_FRMEM(us, fr[31]); -} - -static void -parse_gr_gr(struct ia64_unwind_state *us, int grmask, int gr) -{ - us->us_grmask = grmask; - if (grmask & 1) { - PROCESS_GR(us, gr[4], gr); - gr++; + ut = unw_table_lookup(base); + if (ut != NULL) { + LIST_REMOVE(ut, ut_link); + free(ut, M_UNWIND); + if (bootverbose) + printf("UNWIND: table removed: base=%lx\n", base); } - if (grmask & 2) { - PROCESS_GR(us, gr[5], gr); - gr++; - } - if (grmask & 4) { - PROCESS_GR(us, gr[6], gr); - gr++; - } - if (grmask & 8) { - PROCESS_GR(us, gr[7], gr); - gr++; - } } static void -parse_gr_mem(struct ia64_unwind_state *us, int grmask) +unw_initialize(void *dummy __unused) { - us->us_grmask = grmask; - if (grmask & 1) - PROCESS_GRMEM(us, gr[4]); - if (grmask & 2) - PROCESS_GRMEM(us, gr[5]); - if (grmask & 4) - PROCESS_GRMEM(us, gr[6]); - if (grmask & 8) - PROCESS_GRMEM(us, gr[7]); -} -static void -parse_br_mem(struct ia64_unwind_state *us, int brmask) -{ - us->us_brmask = brmask; - if (brmask & 1) - PROCESS_GRMEM(us, br[1]); - if (brmask & 2) - PROCESS_GRMEM(us, br[2]); - if (brmask & 4) - PROCESS_GRMEM(us, br[3]); - if (brmask & 8) - PROCESS_GRMEM(us, br[4]); - if (brmask & 16) - PROCESS_GRMEM(us, br[5]); + LIST_INIT(&unw_tables); + uwx_register_alloc_cb(unw_alloc, unw_free); } - -static void -parse_br_gr(struct ia64_unwind_state *us, int brmask, int gr) -{ - us->us_brmask = brmask; - if (brmask & 1) { - PROCESS_GR(us, br[1], gr); - gr++; - } - if (brmask & 2) { - PROCESS_GR(us, br[2], gr); - gr++; - } - if (brmask & 4) { - PROCESS_GR(us, br[3], gr); - gr++; - } - if (brmask & 8) { - PROCESS_GR(us, br[4], gr); - gr++; - } - if (brmask & 16) { - PROCESS_GR(us, br[5], gr); - gr++; - } -} - -static void -parse_spill_base(struct ia64_unwind_state *us, int pspoff) -{ - DPF(("base of spill area at psp+%d\n", 16 - 4*pspoff)); - us->us_spill = (u_int64_t *) - (us->us_regs.rs_psp.ur_value + 16 - 4*pspoff); -} - -static void -parse_spill_mask(struct ia64_unwind_state *us, int rlen, u_int8_t *imask) -{ - int i, reg; - u_int8_t b; - static int frno[] = { - 2, 3, 4, 5, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31 - }; - - for (i = 0; i < rlen; i++) { - b = imask[i / 4]; - b = (b >> (2 * (3-(i & 3)))) & 3; - switch (b) { - case 0: - break; - case 1: - reg = frno[ffs(us->us_frmask) - 1]; - DPF(("restoring fr[%d] at offset %d\n", reg, i)); - us->us_regs.rs_fr[reg].ur_when = i; - break; - case 2: - reg = ffs(us->us_grmask) - 1 + 4; - DPF(("restoring gr[%d] at offset %d\n", reg, i)); - us->us_regs.rs_gr[reg].ur_when = i; - break; - case 3: - reg = ffs(us->us_brmask) - 1 + 1; - DPF(("restoring br[%d] at offset %d\n", reg, i)); - us->us_regs.rs_gr[reg].ur_when = i; - break; - } - } -} - -static void -parse_unat_when(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, unat, t); -} - -static void -parse_unat_gr(struct ia64_unwind_state *us, int gr) -{ - PROCESS_GR(us, unat, gr); -} - -static void -parse_unat_psprel(struct ia64_unwind_state *us, int pspoff) -{ - PROCESS_PSPREL(us, unat, pspoff); -} - -static void -parse_unat_sprel(struct ia64_unwind_state *us, int spoff) -{ - PROCESS_SPREL(us, unat, spoff); -} - -static void -parse_lc_when(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, lc, t); -} - -static void -parse_lc_gr(struct ia64_unwind_state *us, int gr) -{ - PROCESS_GR(us, lc, gr); -} - -static void -parse_lc_psprel(struct ia64_unwind_state *us, int pspoff) -{ - PROCESS_PSPREL(us, lc, pspoff); -} - -static void -parse_lc_sprel(struct ia64_unwind_state *us, int spoff) -{ - PROCESS_SPREL(us, lc, spoff); -} - -static void -parse_fpsr_when(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, fpsr, t); -} - -static void -parse_fpsr_gr(struct ia64_unwind_state *us, int gr) -{ - PROCESS_GR(us, fpsr, gr); -} - -static void -parse_fpsr_psprel(struct ia64_unwind_state *us, int pspoff) -{ - PROCESS_PSPREL(us, fpsr, pspoff); -} - -static void -parse_fpsr_sprel(struct ia64_unwind_state *us, int spoff) -{ - PROCESS_SPREL(us, fpsr, spoff); -} - -static void -parse_priunat_when_gr(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, priunat, t); -} - -static void -parse_priunat_when_mem(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, priunat, t); -} - -static void -parse_priunat_gr(struct ia64_unwind_state *us, int gr) -{ - PROCESS_GR(us, priunat, gr); -} - -static void -parse_priunat_psprel(struct ia64_unwind_state *us, int pspoff) -{ - PROCESS_PSPREL(us, priunat, pspoff); -} - -static void -parse_priunat_sprel(struct ia64_unwind_state *us, int spoff) -{ - PROCESS_SPREL(us, priunat, spoff); -} - -static void -parse_bsp_when(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, bsp, t); -} - -static void -parse_bsp_gr(struct ia64_unwind_state *us, int gr) -{ - PROCESS_GR(us, bsp, gr); -} - -static void -parse_bsp_psprel(struct ia64_unwind_state *us, int pspoff) -{ - PROCESS_PSPREL(us, bsp, pspoff); -} - -static void -parse_bsp_sprel(struct ia64_unwind_state *us, int spoff) -{ - PROCESS_SPREL(us, bsp, spoff); -} - -static void -parse_bspstore_when(struct ia64_unwind_state *us, int t) -{ - PROCESS_WHEN(us, bspstore, t); -} - -static void -parse_bspstore_gr(struct ia64_unwind_state *us, int gr) -{ - PROCESS_GR(us, bspstore, gr); -} - -static void -parse_bspstore_psprel(struct ia64_unwind_state *us, int pspoff) -{ - PROCESS_PSPREL(us, bspstore, pspoff); -} - -static void >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu May 15 00:59:44 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EB1F937B404; Thu, 15 May 2003 00:59:43 -0700 (PDT) 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 A225837B401 for ; Thu, 15 May 2003 00:59:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3975C43FB1 for ; Thu, 15 May 2003 00:59:43 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4F7xh0U011568 for ; Thu, 15 May 2003 00:59:43 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4F7xgKF011565 for perforce@freebsd.org; Thu, 15 May 2003 00:59:42 -0700 (PDT) Date: Thu, 15 May 2003 00:59:42 -0700 (PDT) Message-Id: <200305150759.h4F7xgKF011565@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31226 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 07:59:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=31226 Change 31226 by marcel@marcel_nfs on 2003/05/15 00:58:42 Don't create a seperate section for the code in this file. If there was a reason, it must be a bad one :-) Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/context.s#18 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/context.s#18 (text+ko) ==== @@ -29,7 +29,7 @@ #include #include - .section .text.context, "ax" + .text /* * void restorectx(struct pcb *) From owner-p4-projects@FreeBSD.ORG Thu May 15 01:12:00 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D40C37B404; Thu, 15 May 2003 01:12:00 -0700 (PDT) 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 C544D37B401 for ; Thu, 15 May 2003 01:11:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 589B743F3F for ; Thu, 15 May 2003 01:11:59 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4F8Bx0U013071 for ; Thu, 15 May 2003 01:11:59 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4F8BwVr013068 for perforce@freebsd.org; Thu, 15 May 2003 01:11:58 -0700 (PDT) Date: Thu, 15 May 2003 01:11:58 -0700 (PDT) Message-Id: <200305150811.h4F8BwVr013068@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31228 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 08:12:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=31228 Change 31228 by marcel@marcel_nfs on 2003/05/15 01:11:29 Update the copyright and tweak the "header" comment. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/include/_regset.h#11 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/include/_regset.h#11 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 Marcel Moolenaar + * Copyright (c) 2002, 2003 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,7 @@ * us to better reuse code and to copy sets around more efficiently. * Contexts are defined in terms of these sets. These include trapframe, * sigframe, pcb, mcontext, reg and fpreg. Other candidates are unwind - * coredump related contexts. Maybe jmp_buf too... + * and coredump related contexts. * * Notes: * o Constant registers (r0, f0 and f1) are not accounted for, From owner-p4-projects@FreeBSD.ORG Thu May 15 01:49:47 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E312A37B404; Thu, 15 May 2003 01:49:46 -0700 (PDT) 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 7EFAA37B401 for ; Thu, 15 May 2003 01:49:46 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1335E43F85 for ; Thu, 15 May 2003 01:49:46 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4F8nj0U014710 for ; Thu, 15 May 2003 01:49:45 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4F8nj18014707 for perforce@freebsd.org; Thu, 15 May 2003 01:49:45 -0700 (PDT) Date: Thu, 15 May 2003 01:49:45 -0700 (PDT) Message-Id: <200305150849.h4F8nj18014707@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31230 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 08:49:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=31230 Change 31230 by marcel@marcel_nfs on 2003/05/15 01:49:15 IFC @31229 (loopback added files) Affected files ... .. //depot/projects/ia64/sys/ia64/ia64/context.s#1 branch .. //depot/projects/ia64/sys/ia64/ia64/syscall.s#7 branch .. //depot/projects/ia64/sys/ia64/include/_regset.h#4 branch .. //depot/projects/ia64/tools/tools/tinderbox/www/index.cgi#1 branch .. //depot/projects/ia64/tools/tools/tinderbox/www/tb.css#1 branch .. //depot/projects/ia64/tools/tools/tinderbox/www/valid-css.gif#1 branch .. //depot/projects/ia64/tools/tools/tinderbox/www/valid-xhtml10.png#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Thu May 15 01:51:50 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1F9B337B404; Thu, 15 May 2003 01:51:50 -0700 (PDT) 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 CA66537B401 for ; Thu, 15 May 2003 01:51:49 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74EBF43FA3 for ; Thu, 15 May 2003 01:51:49 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4F8pn0U014873 for ; Thu, 15 May 2003 01:51:49 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4F8pmL9014870 for perforce@freebsd.org; Thu, 15 May 2003 01:51:48 -0700 (PDT) Date: Thu, 15 May 2003 01:51:48 -0700 (PDT) Message-Id: <200305150851.h4F8pmL9014870@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31231 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 08:51:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=31231 Change 31231 by marcel@marcel_nfs on 2003/05/15 01:51:06 IFia64 (loopback added files) Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/context.s#19 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#20 integrate .. //depot/projects/ia64_epc/sys/ia64/include/_regset.h#12 integrate .. //depot/projects/ia64_epc/tools/tools/tinderbox/www/index.cgi#1 branch .. //depot/projects/ia64_epc/tools/tools/tinderbox/www/tb.css#1 branch .. //depot/projects/ia64_epc/tools/tools/tinderbox/www/valid-css.gif#1 branch .. //depot/projects/ia64_epc/tools/tools/tinderbox/www/valid-xhtml10.png#1 branch Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/context.s#19 (text+ko) ==== ==== //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#20 (text+ko) ==== ==== //depot/projects/ia64_epc/sys/ia64/include/_regset.h#12 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Thu May 15 15:38:53 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7798F37B404; Thu, 15 May 2003 15:38:52 -0700 (PDT) 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 1A1D137B401 for ; Thu, 15 May 2003 15:38:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4A1A43FB1 for ; Thu, 15 May 2003 15:38:51 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4FMcp0U076777 for ; Thu, 15 May 2003 15:38:51 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4FMcpxi076774 for perforce@freebsd.org; Thu, 15 May 2003 15:38:51 -0700 (PDT) Date: Thu, 15 May 2003 15:38:51 -0700 (PDT) Message-Id: <200305152238.h4FMcpxi076774@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31266 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 22:38:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=31266 Change 31266 by marcel@marcel_nfs on 2003/05/15 15:38:33 Diff reduction (integ fodder). Affected files ... .. //depot/projects/ia64/etc/rc.sendmail#3 edit Differences ... ==== //depot/projects/ia64/etc/rc.sendmail#3 (text+ko) ==== @@ -26,7 +26,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.sendmail,v 1.3 2002/04/22 13:44:17 des Exp $ +# $FreeBSD: src/etc/rc.sendmail,v 1.5 2003/05/02 11:05:57 dougb Exp $ # # This script is used by /etc/rc at boot time to start sendmail. It From owner-p4-projects@FreeBSD.ORG Thu May 15 15:42:58 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 03EA237B404; Thu, 15 May 2003 15:42:58 -0700 (PDT) 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 AA94037B401 for ; Thu, 15 May 2003 15:42:57 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EAAD43F3F for ; Thu, 15 May 2003 15:42:57 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4FMgv0U076980 for ; Thu, 15 May 2003 15:42:57 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4FMguRc076977 for perforce@freebsd.org; Thu, 15 May 2003 15:42:56 -0700 (PDT) Date: Thu, 15 May 2003 15:42:56 -0700 (PDT) Message-Id: <200305152242.h4FMguRc076977@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31267 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2003 22:42:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=31267 Change 31267 by marcel@marcel_nfs on 2003/05/15 15:42:11 IFia64 Affected files ... .. //depot/projects/ia64_epc/etc/rc.sendmail#3 integrate Differences ... ==== //depot/projects/ia64_epc/etc/rc.sendmail#3 (text+ko) ==== @@ -26,7 +26,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.sendmail,v 1.3 2002/04/22 13:44:17 des Exp $ +# $FreeBSD: src/etc/rc.sendmail,v 1.5 2003/05/02 11:05:57 dougb Exp $ # # This script is used by /etc/rc at boot time to start sendmail. It From owner-p4-projects@FreeBSD.ORG Thu May 15 19:20:32 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CCD7A37B404; Thu, 15 May 2003 19:20:31 -0700 (PDT) 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 6A4AF37B401 for ; Thu, 15 May 2003 19:20:31 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E14F843F3F for ; Thu, 15 May 2003 19:20:30 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4G2KU0U094218 for ; Thu, 15 May 2003 19:20:30 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4G2KUhu094215 for perforce@freebsd.org; Thu, 15 May 2003 19:20:30 -0700 (PDT) Date: Thu, 15 May 2003 19:20:30 -0700 (PDT) Message-Id: <200305160220.h4G2KUhu094215@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31282 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 02:20:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=31282 Change 31282 by marcel@marcel_nfs on 2003/05/15 19:20:28 Diff reduction with userland. Affected files ... .. //depot/projects/ia64_epc/sys/conf/ldscript.ia64#3 edit Differences ... ==== //depot/projects/ia64_epc/sys/conf/ldscript.ia64#3 (text+ko) ==== @@ -8,109 +8,115 @@ { /* Read-only sections, merged into text segment: */ . = kernel_text + SIZEOF_HEADERS; - - .text : + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rela.init : { *(.rela.init) } + .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } + .rela.fini : { *(.rela.fini) } + .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } + .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } + .rela.ctors : { *(.rela.ctors) } + .rela.dtors : { *(.rela.dtors) } + .rela.got : { *(.rela.got) } + .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) } + .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) } + .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) } + .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) } + .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } + .rela.plt : { *(.rela.plt) } + .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) } + .init : + { + *(.init) + } =0x00300000010070000002000001000400 + .plt : { *(.plt) } + .text : { - *(.text) - *(.text.syscall) - *(.text.gateway) - *(.text.ivt) - . += 8192; - *(.stub) + *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) - *(.gnu.linkonce.t*) - } =0x47ff041f - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.text : - { *(.rel.text) *(.rel.gnu.linkonce.t*) } - .rela.text : - { *(.rela.text) *(.rela.gnu.linkonce.t*) } - .rel.data : - { *(.rel.data) *(.rel.gnu.linkonce.d*) } - .rela.data : - { *(.rela.data) *(.rela.gnu.linkonce.d*) } - .rel.rodata : - { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } - .rela.rodata : - { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.init : { *(.rel.init) } - .rela.init : { *(.rela.init) } - .rel.fini : { *(.rel.fini) } - .rela.fini : { *(.rela.fini) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : { *(.init) } =0x47ff041f + } =0x00300000010070000002000001000400 + .fini : + { + *(.fini) + } =0x00300000010070000002000001000400 _etext = .; PROVIDE (etext = .); - .fini : { *(.fini) } =0x47ff041f - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } - .rodata1 : { *(.rodata1) } - .reginfo : { *(.reginfo) } - .IA_64.unwind_info : { *(.IA_64.unwind_info*) } - .IA_64.unwind : { *(.IA_64.unwind*) } + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } + .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } + .opd : { *(.opd) } + .IA_64.unwind_info : { *(.IA_64.unwind_info* .gnu.linkonce.ia64unwi.*) } + .IA_64.unwind : { *(.IA_64.unwind* .gnu.linkonce.ia64unw.*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ - . = .; - .data : + . = . + 8192; + .data : { - *(.data) - *(.gnu.linkonce.d*) - CONSTRUCTORS + *(.data.proc0 .data .data.* .gnu.linkonce.d.*) + SORT(CONSTRUCTORS) } - .data1 : { *(.data1) } - .ctors : + .data1 : { *(.data1) } + .dynamic : { *(.dynamic) } + .ctors : { *(.ctors) + *(SORT(.ctors.*)) } - .dtors : + .dtors : { *(.dtors) + *(SORT(.dtors.*)) } - .plt : { *(.plt) } - /* gp points at .got+(1<<21) */ - __gp = ALIGN(8) + 0x200000; - .got : { *(.got.plt) *(.got) } - .dynamic : { *(.dynamic) } + .got : { *(.got.plt) *(.got) } + .IA_64.pltoff : { *(.IA_64.pltoff) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } - _edata = .; + .sdata : + { + *(.sdata .sdata.* .gnu.linkonce.s.*) + } + _edata = .; PROVIDE (edata = .); __bss_start = .; - .sbss : { *(.sbss) *(.scommon) } - .bss : + .sbss : + { + PROVIDE (__sbss_start = .); + PROVIDE (___sbss_start = .); + *(.dynsbss) + *(.sbss .sbss.* .gnu.linkonce.sb.*) + *(.scommon) + PROVIDE (__sbss_end = .); + PROVIDE (___sbss_end = .); + } + .bss : { *(.dynbss) - *(.bss) + *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. */ + . = ALIGN(64 / 8); } . = ALIGN(64 / 8); - _end = . ; + _end = .; PROVIDE (end = .); /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } + .comment 0 : { *(.comment) } /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ @@ -124,7 +130,7 @@ .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } @@ -136,6 +142,4 @@ .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ } - From owner-p4-projects@FreeBSD.ORG Thu May 15 20:09:33 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9F9D737B404; Thu, 15 May 2003 20:09:32 -0700 (PDT) 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 426A137B401 for ; Thu, 15 May 2003 20:09:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA1C843F85 for ; Thu, 15 May 2003 20:09:31 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4G39V0U097151 for ; Thu, 15 May 2003 20:09:31 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4G39VfL097148 for perforce@freebsd.org; Thu, 15 May 2003 20:09:31 -0700 (PDT) Date: Thu, 15 May 2003 20:09:31 -0700 (PDT) Message-Id: <200305160309.h4G39VfL097148@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 31285 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 03:09:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=31285 Change 31285 by rwatson@rwatson_tislabs on 2003/05/15 20:09:16 Warning fixes to improve quality of LINT build. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#59 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#59 (text+ko) ==== @@ -438,6 +438,7 @@ mac_lomac->ml_flags |= MAC_LOMAC_FLAG_SINGLE; } +#if 0 static void mac_lomac_set_auxsingle(struct mac_lomac *mac_lomac, u_short type, u_short grade) @@ -447,6 +448,7 @@ mac_lomac->ml_auxsingle.mle_grade = grade; mac_lomac->ml_flags |= MAC_LOMAC_FLAG_AUX; } +#endif static void mac_lomac_copy_range(struct mac_lomac *labelfrom, struct mac_lomac *labelto) @@ -598,7 +600,7 @@ * at least a single), as for a relabel operation which may or may * not involve a relevant label. */ -void +static void try_relabel(struct mac_lomac *from, struct mac_lomac *to) { From owner-p4-projects@FreeBSD.ORG Thu May 15 20:14:40 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D4DE437B404; Thu, 15 May 2003 20:14:39 -0700 (PDT) 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 650A337B401 for ; Thu, 15 May 2003 20:14:39 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4D5243F93 for ; Thu, 15 May 2003 20:14:38 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4G3Ec0U097611 for ; Thu, 15 May 2003 20:14:38 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4G3Ecdp097608 for perforce@freebsd.org; Thu, 15 May 2003 20:14:38 -0700 (PDT) Date: Thu, 15 May 2003 20:14:38 -0700 (PDT) Message-Id: <200305160314.h4G3Ecdp097608@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 31286 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 03:14:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=31286 Change 31286 by rwatson@rwatson_tislabs on 2003/05/15 20:13:54 Remove code to implement UFS1 extended attribute configuration listing; we'll have it in the Perforce history should we need it later, but we're no longer supporting UFS1 configurations for MAC, making it less useful. This greatly reduces diffs between the FreeBSD head and MAC tree. Affected files ... .. //depot/projects/trustedbsd/mac/sys/fs/nullfs/null_vfsops.c#10 edit .. //depot/projects/trustedbsd/mac/sys/fs/umapfs/umap_vfsops.c#11 edit .. //depot/projects/trustedbsd/mac/sys/kern/syscalls.master#49 edit .. //depot/projects/trustedbsd/mac/sys/kern/vfs_default.c#21 edit .. //depot/projects/trustedbsd/mac/sys/kern/vfs_syscalls.c#103 edit .. //depot/projects/trustedbsd/mac/sys/sys/extattr.h#8 edit .. //depot/projects/trustedbsd/mac/sys/sys/mount.h#26 edit .. //depot/projects/trustedbsd/mac/sys/ufs/ffs/ffs_vfsops.c#35 edit .. //depot/projects/trustedbsd/mac/sys/ufs/ufs/extattr.h#5 edit .. //depot/projects/trustedbsd/mac/sys/ufs/ufs/ufs_extattr.c#27 edit .. //depot/projects/trustedbsd/mac/usr.sbin/extattrctl/extattrctl.8#7 edit .. //depot/projects/trustedbsd/mac/usr.sbin/extattrctl/extattrctl.c#12 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/fs/nullfs/null_vfsops.c#10 (text+ko) ==== @@ -79,7 +79,7 @@ static int nullfs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, int namespace, const char *attrname, - void *extended, struct thread *td); + struct thread *td); /* * Mount null layer @@ -395,17 +395,16 @@ } static int -nullfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, extended, td) +nullfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, td) struct mount *mp; int cmd; struct vnode *filename_vp; int namespace; const char *attrname; - void *extended; struct thread *td; { return VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, filename_vp, - namespace, attrname, extended, td); + namespace, attrname, td); } ==== //depot/projects/trustedbsd/mac/sys/fs/umapfs/umap_vfsops.c#11 (text+ko) ==== @@ -77,7 +77,7 @@ static int umapfs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, int namespace, const char *attrname, - void *extended, struct thread *td); + struct thread *td); /* * Mount umap layer @@ -423,18 +423,17 @@ } static int -umapfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, extended, td) +umapfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, td) struct mount *mp; int cmd; struct vnode *filename_vp; int namespace; const char *attrname; - void *extended; struct thread *td; { return (VFS_EXTATTRCTL(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, cmd, - filename_vp, namespace, attrname, extended, td)); + filename_vp, namespace, attrname, td)); } static struct vfsops umap_vfsops = { ==== //depot/projects/trustedbsd/mac/sys/kern/syscalls.master#49 (text+ko) ==== @@ -515,7 +515,7 @@ struct acl *aclp); } 355 STD BSD { int extattrctl(const char *path, int cmd, \ const char *filename, int attrnamespace, \ - const char *attrname, void *extended); } + const char *attrname); } 356 STD BSD { int extattr_set_file(const char *path, \ int attrnamespace, const char *attrname, \ void *data, size_t nbytes); } ==== //depot/projects/trustedbsd/mac/sys/kern/vfs_default.c#21 (text+ko) ==== @@ -983,13 +983,12 @@ } int -vfs_stdextattrctl(mp, cmd, filename_vp, attrnamespace, attrname, extended, td) +vfs_stdextattrctl(mp, cmd, filename_vp, attrnamespace, attrname, td) struct mount *mp; int cmd; struct vnode *filename_vp; int attrnamespace; const char *attrname; - void *extended; struct thread *td; { if (filename_vp != NULL) ==== //depot/projects/trustedbsd/mac/sys/kern/vfs_syscalls.c#103 (text+ko) ==== @@ -3821,7 +3821,6 @@ const char *filename; int attrnamespace; const char *attrname; - void *extended; } */ *uap; { struct vnode *filename_vp; @@ -3874,7 +3873,7 @@ } error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, uap->attrnamespace, - uap->attrname != NULL ? attrname : NULL, uap->extended, td); + uap->attrname != NULL ? attrname : NULL, td); vn_finished_write(mp_writable); /* ==== //depot/projects/trustedbsd/mac/sys/sys/extattr.h#8 (text+ko) ==== @@ -56,7 +56,7 @@ __BEGIN_DECLS int extattrctl(const char *_path, int _cmd, const char *_filename, - int _attrnamespace, const char *_attrname, void *_extended); + int _attrnamespace, const char *_attrname); int extattr_delete_fd(int _fd, int _attrnamespace, const char *_attrname); int extattr_delete_file(const char *_path, int _attrnamespace, const char *_attrname); ==== //depot/projects/trustedbsd/mac/sys/sys/mount.h#26 (text+ko) ==== @@ -393,7 +393,7 @@ typedef int vfs_uninit_t(struct vfsconf *); typedef int vfs_extattrctl_t(struct mount *mp, int cmd, struct vnode *filename_vp, int attrnamespace, - const char *attrname, void *extended, struct thread *td); + const char *attrname, struct thread *td); typedef int vfs_nmount_t(struct mount *mp, struct nameidata *ndp, struct thread *td); @@ -432,8 +432,8 @@ #define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->mnt_op->vfs_vptofh)(VP, FIDP) #define VFS_CHECKEXP(MP, NAM, EXFLG, CRED) \ (*(MP)->mnt_op->vfs_checkexp)(MP, NAM, EXFLG, CRED) -#define VFS_EXTATTRCTL(MP, C, FN, NS, N, P, E) \ - (*(MP)->mnt_op->vfs_extattrctl)(MP, C, FN, NS, N, P, E) +#define VFS_EXTATTRCTL(MP, C, FN, NS, N, P) \ + (*(MP)->mnt_op->vfs_extattrctl)(MP, C, FN, NS, N, P) #include ==== //depot/projects/trustedbsd/mac/sys/ufs/ffs/ffs_vfsops.c#35 (text+ko) ==== @@ -1524,16 +1524,15 @@ static int ffs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, - int attrnamespace, const char *attrname, void *extended, - struct thread *td) + int attrnamespace, const char *attrname, struct thread *td) { #ifdef UFS_EXTATTR return (ufs_extattrctl(mp, cmd, filename_vp, attrnamespace, - attrname, extended, td)); + attrname, td)); #else return (vfs_stdextattrctl(mp, cmd, filename_vp, attrnamespace, - attrname, extended, td)); + attrname, td)); #endif } ==== //depot/projects/trustedbsd/mac/sys/ufs/ufs/extattr.h#5 (text+ko) ==== @@ -55,17 +55,7 @@ #define UFS_EXTATTR_CMD_STOP 0x00000002 #define UFS_EXTATTR_CMD_ENABLE 0x00000003 #define UFS_EXTATTR_CMD_DISABLE 0x00000004 -#define UFS_EXTATTR_CMD_ENUM 0x00000005 -struct ufs_extattr_enum_cmd { - struct ufs_extattr_desc { - u_int ued_size; - int ued_attrnamespace; - char ued_attrname[UFS_EXTATTR_MAXEXTATTRNAME]; - } *ueec_buf; /* pointer to user buffer of descs */ - size_t ueec_len; /* size of ueec_buf */ -}; - struct ufs_extattr_fileheader { u_int uef_magic; /* magic number for sanity checking */ u_int uef_version; /* version of attribute file */ @@ -110,8 +100,7 @@ int ufs_extattr_autostart(struct mount *mp, struct thread *td); int ufs_extattr_stop(struct mount *mp, struct thread *td); int ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename, - int attrnamespace, const char *attrname, void *extended, - struct thread *td); + int attrnamespace, const char *attrname, struct thread *td); int ufs_getextattr(struct vop_getextattr_args *ap); int ufs_setextattr(struct vop_setextattr_args *ap); void ufs_extattr_vnode_inactive(struct vnode *vp, struct thread *td); ==== //depot/projects/trustedbsd/mac/sys/ufs/ufs/ufs_extattr.c#27 (text+ko) ==== @@ -699,91 +699,27 @@ */ int ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, - int attrnamespace, const char *attrname, void *extended, struct thread *td) + int attrnamespace, const char *attrname, struct thread *td) { struct ufsmount *ump = VFSTOUFS(mp); - struct ufs_extattr_enum_cmd enumcmd; - struct ufs_extattr_list_entry *uele; int error; /* * Processes with privilege, but in jail, are not allowed to * configure extended attributes. */ - switch(cmd) { - case UFS_EXTATTR_CMD_ENUM: + if ((error = suser(td))) { if (filename_vp != NULL) VOP_UNLOCK(filename_vp, 0, td); - error = copyin(extended, &enumcmd, sizeof(enumcmd)); - if (error) - return (error); - if (attrnamespace == 0 || - attrnamespace == EXTATTR_NAMESPACE_SYSTEM) { - error = suser_cred(td->td_ucred, 0); - if (error) - return (error); - } - ufs_extattr_uepm_lock(ump, td); - if (enumcmd.ueec_len == 0) { - LIST_FOREACH(uele, &ump->um_extattr.uepm_list, - uele_entries) { - if ((attrnamespace != 0 && - attrnamespace != uele->uele_attrnamespace) - || (attrname != NULL && - strcmp(attrname, uele->uele_attrname) != 0)) - continue; - enumcmd.ueec_len += - sizeof(struct ufs_extattr_desc); - } - error = copyout(&enumcmd, extended, sizeof(enumcmd)); - } else { - struct ufs_extattr_desc *descp; - size_t totsize = 0; - - descp = enumcmd.ueec_buf; - LIST_FOREACH(uele, &ump->um_extattr.uepm_list, - uele_entries) { - if ((attrnamespace != 0 && - attrnamespace != uele->uele_attrnamespace) - || (attrname != NULL && - strcmp(attrname, uele->uele_attrname) != 0)) - continue; - if (totsize + sizeof(struct ufs_extattr_desc) > - enumcmd.ueec_len) { - error = ENOMEM; - break; - } - if (copyout(&uele->uele_fileheader.uef_size, - &descp->ued_size, - sizeof(descp->ued_size)) != 0 || - copyout(&uele->uele_attrnamespace, - &descp->ued_attrnamespace, - sizeof(descp->ued_attrnamespace)) != 0 || - copyout(&uele->uele_attrname, - &descp->ued_attrname, - sizeof(descp->ued_attrname)) != 0) { - error = EFAULT; - break; - } - descp++; - totsize += sizeof(struct ufs_extattr_desc); - } - if (error == 0) { - enumcmd.ueec_len = totsize; - error = copyout(&enumcmd, extended, - sizeof(enumcmd)); - } - } - ufs_extattr_uepm_unlock(ump, td); return (error); + } + switch(cmd) { case UFS_EXTATTR_CMD_START: if (filename_vp != NULL) { VOP_UNLOCK(filename_vp, 0, td); return (EINVAL); } - if ((error = suser_cred(td->td_ucred, 0))) - return (error); if (attrname != NULL) return (EINVAL); @@ -796,8 +732,6 @@ VOP_UNLOCK(filename_vp, 0, td); return (EINVAL); } - if ((error = suser_cred(td->td_ucred, 0))) - return (error); if (attrname != NULL) return (EINVAL); @@ -813,8 +747,6 @@ VOP_UNLOCK(filename_vp, 0, td); return (EINVAL); } - if ((error = suser_cred(td->td_ucred, 0))) - return (error); /* * ufs_extattr_enable_with_open() will always unlock the @@ -824,7 +756,6 @@ error = ufs_extattr_enable_with_open(ump, filename_vp, attrnamespace, attrname, td); ufs_extattr_uepm_unlock(ump, td); - VOP_UNLOCK(filename_vp, 0, td); return (error); @@ -834,8 +765,6 @@ VOP_UNLOCK(filename_vp, 0, td); return (EINVAL); } - if ((error = suser_cred(td->td_ucred, 0))) - return (error); if (attrname == NULL) return (EINVAL); ==== //depot/projects/trustedbsd/mac/usr.sbin/extattrctl/extattrctl.8#7 (text+ko) ==== @@ -44,9 +44,6 @@ .Cm stop .Ar path .Nm -.Cm lsattr -.Ar path -.Nm .Cm initattr .Op Fl f .Op Fl p Ar path @@ -72,8 +69,8 @@ utility is the management utility for extended attributes over the UFS1 file system. It allows the starting and stopping of extended attributes on a file system, -as well as initialization of attribute backing files, and enabling, -querying, and disabling of specific extended attributes on a file system. +as well as initialization of attribute backing files, and enabling and +disabling of specific extended attributes on a file system. .Pp The first argument on the command line indicates the operation to be performed. @@ -88,10 +85,6 @@ Stop extended attribute support on the file system named using .Ar path . Extended attribute support must previously have been started. -.It Cm lsattr Ar path -List extended attributes currently supported and enabled on the file system -named by -.Ar path . .It Xo .Cm initattr .Op Fl f ==== //depot/projects/trustedbsd/mac/usr.sbin/extattrctl/extattrctl.c#12 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2001 Robert N. M. Watson + * Copyright (c) 1999-2002 Robert N. M. Watson * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.sbin/extattrctl/extattrctl.c,v 1.17 2001/12/31 18:21:24 rwatson Exp $ + * $FreeBSD: src/usr.sbin/extattrctl/extattrctl.c,v 1.19 2002/04/19 01:42:55 rwatson Exp $ */ /* * Developed by the TrustedBSD Project. @@ -61,7 +61,6 @@ "usage:\n" " extattrctl start path\n" " extattrctl stop path\n" - " extattrctl lsattr [-n name] [-s namespace] path\n" " extattrctl initattr [-f] [-p path] attrsize attrfile\n" " extattrctl showattr attrfile\n" " extattrctl enable path attrnamespace attrname attrfile\n" @@ -223,7 +222,7 @@ if (argc != 3) usage(); error = extattrctl(argv[2], UFS_EXTATTR_CMD_START, NULL, 0, - NULL, NULL); + NULL); if (error) { perror("extattrctl start"); return (-1); @@ -232,69 +231,11 @@ if (argc != 3) usage(); error = extattrctl(argv[2], UFS_EXTATTR_CMD_STOP, NULL, 0, - NULL, NULL); + NULL); if (error) { perror("extattrctl stop"); return (-1); } - } else if (!strcmp(argv[1], "lsattr")) { - struct ufs_extattr_enum_cmd enumcmd; - struct ufs_extattr_desc *ued; - char *name = NULL, *ns; - int namespace = 0; - int c; - - optind = 2; - while ((c = getopt(argc, argv, "n:s:")) != -1) { - switch (c) { - case 'n': - name = optarg; - break; - case 's': - if (extattr_string_to_namespace(optarg, - &namespace)) - usage(); - break; - default: - usage(); - } - } - argc -= optind; - argv += optind; - if (argc != 1) - usage(); - enumcmd.ueec_buf = NULL; - enumcmd.ueec_len = 0; - error = extattrctl(argv[0], UFS_EXTATTR_CMD_ENUM, NULL, - namespace, name, &enumcmd); - if (error) { - perror("extattrctl lsattr"); - return (-1); - } - ued = malloc(enumcmd.ueec_len); - if (ued == NULL) { - perror("extattrctl lsattr"); - return (-1); - } - enumcmd.ueec_buf = ued; - error = extattrctl(argv[0], UFS_EXTATTR_CMD_ENUM, NULL, - namespace, name, &enumcmd); - if (error) { - perror("extattrctl lsattr"); - return (-1); - } - while ((char *)ued < - (char *)enumcmd.ueec_buf + enumcmd.ueec_len) { - if (extattr_namespace_to_string(ued->ued_attrnamespace, - &ns) == -1) { - perror("extattrctl lsattr"); - return (-1); - } - (void)printf("attrname: %s, namespace: %s, size: %u\n", - ued->ued_attrname, ns, ued->ued_size); - free(ns); - ued++; - } } else if (!strcmp(argv[1], "enable")) { if (argc != 6) usage(); @@ -304,7 +245,7 @@ return (-1); } error = extattrctl(argv[2], UFS_EXTATTR_CMD_ENABLE, argv[5], - attrnamespace, argv[4], NULL); + attrnamespace, argv[4]); if (error) { perror("extattrctl enable"); return (-1); @@ -318,7 +259,7 @@ return (-1); } error = extattrctl(argv[2], UFS_EXTATTR_CMD_DISABLE, NULL, - attrnamespace, argv[4], NULL); + attrnamespace, argv[4]); if (error) { perror("extattrctl disable"); return (-1); From owner-p4-projects@FreeBSD.ORG Thu May 15 21:46:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B05EF37B404; Thu, 15 May 2003 21:46:35 -0700 (PDT) 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 482D937B401 for ; Thu, 15 May 2003 21:46:35 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8CBD43FA3 for ; Thu, 15 May 2003 21:46:34 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4G4kY0U007827 for ; Thu, 15 May 2003 21:46:34 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4G4kYxV007824 for perforce@freebsd.org; Thu, 15 May 2003 21:46:34 -0700 (PDT) Date: Thu, 15 May 2003 21:46:34 -0700 (PDT) Message-Id: <200305160446.h4G4kYxV007824@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31295 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 04:46:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=31295 Change 31295 by marcel@marcel_nfs on 2003/05/15 21:45:44 Protect the definition of VM_MAXUSER_ADDRESS by parenthesising it. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/include/vmparam.h#3 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/include/vmparam.h#3 (text+ko) ==== @@ -141,7 +141,7 @@ #define VM_MIN_ADDRESS 0 #define VM_MAX_ADDRESS IA64_RR_BASE(5) #define VM_GATEWAY_SIZE PAGE_SIZE -#define VM_MAXUSER_ADDRESS VM_MAX_ADDRESS + VM_GATEWAY_SIZE +#define VM_MAXUSER_ADDRESS (VM_MAX_ADDRESS + VM_GATEWAY_SIZE) #define VM_MIN_KERNEL_ADDRESS VM_MAXUSER_ADDRESS #define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(6) - 1) From owner-p4-projects@FreeBSD.ORG Fri May 16 00:13:13 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4164B37B404; Fri, 16 May 2003 00:13:13 -0700 (PDT) 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 E138537B401 for ; Fri, 16 May 2003 00:13:12 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD85443F75 for ; Fri, 16 May 2003 00:13:11 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4G7DB0U016908 for ; Fri, 16 May 2003 00:13:11 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4G7DBqK016905 for perforce@freebsd.org; Fri, 16 May 2003 00:13:11 -0700 (PDT) Date: Fri, 16 May 2003 00:13:11 -0700 (PDT) Message-Id: <200305160713.h4G7DBqK016905@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31303 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 07:13:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=31303 Change 31303 by marcel@marcel_nfs on 2003/05/16 00:12:48 IFC @31302 Affected files ... .. //depot/projects/ia64/Makefile.inc1#60 integrate .. //depot/projects/ia64/lib/libc/gen/opendir.c#4 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_cancel.c#2 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_cond.c#2 integrate .. //depot/projects/ia64/share/man/man4/kame.4#3 integrate .. //depot/projects/ia64/share/syscons/keymaps/INDEX.keymaps#5 integrate .. //depot/projects/ia64/share/syscons/keymaps/Makefile#8 integrate .. //depot/projects/ia64/share/syscons/keymaps/be.iso.kbd#2 integrate .. //depot/projects/ia64/share/syscons/keymaps/fr.dvorak.kbd#1 branch .. //depot/projects/ia64/share/syscons/keymaps/norwegian.dvorak.kbd#2 integrate .. //depot/projects/ia64/sys/boot/forth/loader.conf#16 integrate .. //depot/projects/ia64/sys/cam/scsi/scsi_da.c#44 integrate .. //depot/projects/ia64/sys/conf/files.amd64#5 integrate .. //depot/projects/ia64/sys/conf/ldscript.ia64#8 integrate .. //depot/projects/ia64/sys/dev/fxp/if_fxp.c#31 integrate .. //depot/projects/ia64/sys/dev/gem/if_gem.c#14 integrate .. //depot/projects/ia64/sys/dev/gem/if_gemvar.h#8 integrate .. //depot/projects/ia64/sys/dev/sio/sio_isa.c#15 integrate .. //depot/projects/ia64/sys/dev/usb/umass.c#26 integrate .. //depot/projects/ia64/sys/i386/i386/vm_machdep.c#24 integrate .. //depot/projects/ia64/sys/ia64/ia64/pmap.c#60 integrate .. //depot/projects/ia64/sys/kern/kern_descrip.c#53 integrate .. //depot/projects/ia64/sys/kern/kern_sig.c#51 integrate .. //depot/projects/ia64/sys/kern/subr_mbuf.c#26 integrate .. //depot/projects/ia64/sys/netgraph/ng_bridge.c#9 integrate .. //depot/projects/ia64/sys/nfsclient/nfs_bio.c#13 integrate .. //depot/projects/ia64/sys/nfsclient/nfs_vnops.c#21 integrate .. //depot/projects/ia64/sys/pci/if_dc.c#35 integrate .. //depot/projects/ia64/sys/ufs/ufs/ufs_extattr.c#16 integrate .. //depot/projects/ia64/tools/tools/tinderbox/Makefile#3 integrate .. //depot/projects/ia64/tools/tools/tinderbox/tbmaster.pl#8 integrate .. //depot/projects/ia64/tools/tools/tinderbox/tinderbox.pl#7 integrate .. //depot/projects/ia64/tools/tools/tinderbox/www/Makefile#1 branch .. //depot/projects/ia64/tools/tools/tinderbox/www/index.cgi#2 integrate .. //depot/projects/ia64/tools/tools/tinderbox/www/tb.css#2 integrate .. //depot/projects/ia64/usr.bin/netstat/mbuf.c#4 integrate Differences ... ==== //depot/projects/ia64/Makefile.inc1#60 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.356 2003/05/05 12:54:26 bde Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.357 2003/05/15 17:59:32 ru Exp $ # # Make command line options: # -DNO_KERBEROS Do not build Heimdal (Kerberos 5) @@ -120,7 +120,8 @@ MAKEOBJDIRPREFIX?= /usr/obj .if !defined(OSRELDATE) -OSRELDATE!= sysctl -n kern.osreldate +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ + /usr/include/osreldate.h .endif TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} ==== //depot/projects/ia64/lib/libc/gen/opendir.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)opendir.c 8.8 (Berkeley) 5/1/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/opendir.c,v 1.19 2003/01/04 00:18:50 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/opendir.c,v 1.20 2003/05/16 02:15:07 tjr Exp $"); #include "namespace.h" #include @@ -118,7 +118,7 @@ if (_fstatfs(fd, &sfb) < 0) goto fail; - unionstack = !strcmp(sfb.f_fstypename, "union") + unionstack = !strcmp(sfb.f_fstypename, "unionfs") || (sfb.f_flags & MNT_UNION); } else { unionstack = 0; ==== //depot/projects/ia64/lib/libthr/thread/thr_cancel.c#2 (text+ko) ==== @@ -1,11 +1,16 @@ /* * David Leonard , 1999. Public domain. - * $FreeBSD: src/lib/libthr/thread/thr_cancel.c,v 1.2 2003/04/02 03:05:39 jeff Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_cancel.c,v 1.3 2003/05/15 17:56:18 mtm Exp $ */ #include #include #include "thr_private.h" +/* + * Static prototypes + */ +static void testcancel(void); + __weak_reference(_pthread_cancel, pthread_cancel); __weak_reference(_pthread_setcancelstate, pthread_setcancelstate); __weak_reference(_pthread_setcanceltype, pthread_setcanceltype); @@ -16,85 +21,102 @@ { int ret; - if ((ret = _find_thread(pthread)) != 0) { - /* NOTHING */ - } else if (pthread->state == PS_DEAD || pthread->state == PS_DEADLOCK + if ((ret = _find_thread(pthread)) != 0) + /* The thread is not on the list of active threads */ + goto out; + + _thread_critical_enter(pthread); + + if (pthread->state == PS_DEAD || pthread->state == PS_DEADLOCK || (pthread->flags & PTHREAD_EXITING) != 0) { + /* + * The thread is in the process of (or has already) exited + * or is deadlocked. + */ + _thread_critical_exit(pthread); ret = 0; - } else { - GIANT_LOCK(curthread); + goto out; + } + + /* + * The thread is on the active thread list and is not in the process + * of exiting. + */ + + if (((pthread->cancelflags & PTHREAD_CANCEL_DISABLE) != 0) || + (((pthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) && + ((pthread->cancelflags & PTHREAD_AT_CANCEL_POINT) == 0))) + /* Just mark it for cancellation: */ + pthread->cancelflags |= PTHREAD_CANCELLING; + else { + /* + * Check if we need to kick it back into the + * run queue: + */ + switch (pthread->state) { + case PS_RUNNING: + /* No need to resume: */ + pthread->cancelflags |= PTHREAD_CANCELLING; + break; - if (((pthread->cancelflags & PTHREAD_CANCEL_DISABLE) != 0) || - (((pthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) && - ((pthread->cancelflags & PTHREAD_AT_CANCEL_POINT) == 0))) - /* Just mark it for cancellation: */ + case PS_SLEEP_WAIT: + case PS_WAIT_WAIT: pthread->cancelflags |= PTHREAD_CANCELLING; - else { + PTHREAD_NEW_STATE(pthread, PS_RUNNING); + break; + + case PS_JOIN: /* - * Check if we need to kick it back into the - * run queue: + * Disconnect the thread from the joinee: */ - switch (pthread->state) { - case PS_RUNNING: - /* No need to resume: */ - pthread->cancelflags |= PTHREAD_CANCELLING; - break; + if (pthread->join_status.thread != NULL) { + pthread->join_status.thread->joiner + = NULL; + pthread->join_status.thread = NULL; + } + pthread->cancelflags |= PTHREAD_CANCELLING; + PTHREAD_NEW_STATE(pthread, PS_RUNNING); + break; - case PS_SLEEP_WAIT: - case PS_WAIT_WAIT: - pthread->cancelflags |= PTHREAD_CANCELLING; - PTHREAD_NEW_STATE(pthread, PS_RUNNING); - break; + case PS_MUTEX_WAIT: + case PS_COND_WAIT: + /* + * Threads in these states may be in queues. + * In order to preserve queue integrity, the + * cancelled thread must remove itself from the + * queue. When the thread resumes, it will + * remove itself from the queue and call the + * cancellation routine. + */ + pthread->cancelflags |= PTHREAD_CANCELLING; + PTHREAD_NEW_STATE(pthread, PS_RUNNING); + break; - case PS_JOIN: - /* - * Disconnect the thread from the joinee: - */ - if (pthread->join_status.thread != NULL) { - pthread->join_status.thread->joiner - = NULL; - pthread->join_status.thread = NULL; - } - pthread->cancelflags |= PTHREAD_CANCELLING; - PTHREAD_NEW_STATE(pthread, PS_RUNNING); - break; - - case PS_MUTEX_WAIT: - case PS_COND_WAIT: - /* - * Threads in these states may be in queues. - * In order to preserve queue integrity, the - * cancelled thread must remove itself from the - * queue. When the thread resumes, it will - * remove itself from the queue and call the - * cancellation routine. - */ - pthread->cancelflags |= PTHREAD_CANCELLING; - PTHREAD_NEW_STATE(pthread, PS_RUNNING); - break; - - case PS_DEAD: - case PS_DEADLOCK: - case PS_STATE_MAX: - /* Ignore - only here to silence -Wall: */ - break; - } + case PS_DEAD: + case PS_DEADLOCK: + case PS_STATE_MAX: + /* Ignore - only here to silence -Wall: */ + break; } + } - /* Unprotect the scheduling queues: */ - GIANT_UNLOCK(curthread); + /* Unprotect the scheduling queues: */ + _thread_critical_exit(pthread); - ret = 0; - } + ret = 0; +out: return (ret); } int _pthread_setcancelstate(int state, int *oldstate) { - int ostate; + int ostate, ret; + + ret = 0; + + _thread_critical_enter(curthread); - GIANT_LOCK(curthread); ostate = curthread->cancelflags & PTHREAD_CANCEL_DISABLE; switch (state) { @@ -102,23 +124,21 @@ if (oldstate != NULL) *oldstate = ostate; curthread->cancelflags &= ~PTHREAD_CANCEL_DISABLE; - if ((curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) + if ((curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) break; - GIANT_UNLOCK(curthread); - pthread_testcancel(); + testcancel(); break; case PTHREAD_CANCEL_DISABLE: if (oldstate != NULL) *oldstate = ostate; curthread->cancelflags |= PTHREAD_CANCEL_DISABLE; - GIANT_UNLOCK(curthread); break; default: - GIANT_UNLOCK(curthread); - return (EINVAL); + ret = EINVAL; } - return (0); + _thread_critical_exit(curthread); + return (ret); } int @@ -126,37 +146,43 @@ { int otype; - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); otype = curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS; switch (type) { case PTHREAD_CANCEL_ASYNCHRONOUS: if (oldtype != NULL) *oldtype = otype; curthread->cancelflags |= PTHREAD_CANCEL_ASYNCHRONOUS; - GIANT_UNLOCK(curthread); - pthread_testcancel(); + testcancel(); break; case PTHREAD_CANCEL_DEFERRED: if (oldtype != NULL) *oldtype = otype; curthread->cancelflags &= ~PTHREAD_CANCEL_ASYNCHRONOUS; - GIANT_UNLOCK(curthread); break; default: - GIANT_UNLOCK(curthread); return (EINVAL); } + _thread_critical_exit(curthread); return (0); } -/* - * XXXTHR Make an internal locked version. - */ void _pthread_testcancel(void) { - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); + testcancel(); + _thread_critical_exit(curthread); +} + +static void +testcancel() +{ + /* + * This pthread should already be locked by the caller. + */ + if (((curthread->cancelflags & PTHREAD_CANCEL_DISABLE) == 0) && ((curthread->cancelflags & PTHREAD_CANCELLING) != 0) && ((curthread->flags & PTHREAD_EXITING) == 0)) { @@ -166,30 +192,28 @@ * to be cancelled again. */ curthread->cancelflags &= ~PTHREAD_CANCELLING; - GIANT_UNLOCK(curthread); + _thread_critical_exit(curthread); _thread_exit_cleanup(); pthread_exit(PTHREAD_CANCELED); PANIC("cancel"); } - GIANT_UNLOCK(curthread); } void _thread_enter_cancellation_point(void) { - pthread_testcancel(); - - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); + testcancel(); curthread->cancelflags |= PTHREAD_AT_CANCEL_POINT; - GIANT_UNLOCK(curthread); + _thread_critical_exit(curthread); } void _thread_leave_cancellation_point(void) { - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); curthread->cancelflags &= ~PTHREAD_AT_CANCEL_POINT; - GIANT_UNLOCK(curthread); + testcancel(); + _thread_critical_exit(curthread); - pthread_testcancel(); } ==== //depot/projects/ia64/lib/libthr/thread/thr_cond.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_cond.c,v 1.3 2003/04/02 03:05:39 jeff Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_cond.c,v 1.4 2003/05/15 18:17:13 mtm Exp $ */ #include #include @@ -43,6 +43,8 @@ static pthread_t cond_queue_deq(pthread_cond_t); static void cond_queue_remove(pthread_cond_t, pthread_t); static void cond_queue_enq(pthread_cond_t, pthread_t); +static int cond_wait_common(pthread_cond_t *, + pthread_mutex_t *, const struct timespec *); __weak_reference(_pthread_cond_init, pthread_cond_init); __weak_reference(_pthread_cond_destroy, pthread_cond_destroy); @@ -161,13 +163,8 @@ _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { int rval; - struct timespec abstime = { 0, 0 }; - /* - * XXXTHR This is a hack. Make a pthread_cond_common function that - * accepts NULL so we don't change posix semantics for timedwait. - */ - rval = pthread_cond_timedwait(cond, mutex, &abstime); + rval = cond_wait_common(cond, mutex, NULL); /* This should never happen. */ if (rval == ETIMEDOUT) @@ -180,7 +177,16 @@ _pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec * abstime) { - struct timespec *time; + if (abstime == NULL || abstime->tv_nsec >= 1000000000) + return (EINVAL); + + return (cond_wait_common(cond, mutex, abstime)); +} + +static int +cond_wait_common(pthread_cond_t * cond, pthread_mutex_t * mutex, + const struct timespec * abstime) +{ int rval = 0; int done = 0; int seqno; @@ -189,13 +195,6 @@ _thread_enter_cancellation_point(); - if (abstime == NULL || abstime->tv_nsec >= 1000000000) - return (EINVAL); - - if (abstime->tv_sec == 0 && abstime->tv_nsec == 0) - time = NULL; - else - time = abstime; /* * If the condition variable is statically initialized, perform dynamic * initialization. @@ -273,7 +272,7 @@ PTHREAD_SET_STATE(curthread, PS_COND_WAIT); GIANT_UNLOCK(curthread); - rval = _thread_suspend(curthread, time); + rval = _thread_suspend(curthread, (struct timespec *)abstime); if (rval == -1) { printf("foo"); fflush(stdout); ==== //depot/projects/ia64/share/man/man4/kame.4#3 (text+ko) ==== @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" $Id: kame.4,v 1.4 1999/10/07 04:01:15 itojun Exp $ -.\" $FreeBSD: src/share/man/man4/kame.4,v 1.11 2002/07/09 20:37:18 blackend Exp $ +.\" $FreeBSD: src/share/man/man4/kame.4,v 1.12 2003/05/16 00:31:12 hmp Exp $ .\" .Dd April 13, 1999 .Dt KAME 4 @@ -67,7 +67,6 @@ .\" .Ss Plug and Play and protocol stack/interface configuration .Xr ndp 8 , -.Xr prefix 8 , .Xr rrenumd 8 , .Xr rtadvd 8 , .Xr rtsol 8 , @@ -81,8 +80,8 @@ .Xr mchat 1 .Pq - , .Xr ifmcstat 8 , -.Xr pim6dd 8 , -.Xr pim6sd 8 , +.Xr pim6dd 8 [ /usr/ports/net/pim6dd ] , +.Xr pim6sd 8 [ /usr/ports/net/pim6sd ] , .Xr pim6stat 8 . .\" .Ss Transition Tools @@ -96,12 +95,8 @@ .Fx . .\" .Ss IPsec and tunnelling -.Xr gifconfig 8 , .Xr ipsec 4 , -.\" (dtcp and racoon doesn't exist yet.) -.\" .Xr dtcpc 8 , -.\" .Xr dtcps 8 , -.\" .Xr racoon 8 , +.Xr racoon 8 [ /usr/ports/security/racoon ] , .Xr setkey 8 . .Pp Dozen of existing tools are modified for IPsec support, like @@ -123,6 +118,7 @@ modified for IPv4/v6 support, or IPv6-only .Xr inet6d 8 +.Pq - is supplied. .Pp Dozen of existing daemons are modified for IPv6/IPsec support, like ==== //depot/projects/ia64/share/syscons/keymaps/INDEX.keymaps#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/INDEX.keymaps,v 1.46 2003/05/05 06:06:55 murray Exp $ +# $FreeBSD: src/share/syscons/keymaps/INDEX.keymaps,v 1.47 2003/05/16 03:46:53 murray Exp $ # # database for kbdmap(8) # @@ -128,6 +128,11 @@ fr.iso.acc.kbd:es:Francés ISO-8859-1 (con acentos) fr.iso.acc.kbd:uk:æÒÁÎÃÕÚØËÁ ISO-8859-1 (accent keys) +fr.dvorak.kbd:en:French Dvorak-like +fr.dvorak.kbd:de:Französisch Dvorak +fr.dvorak.kbd:es:Francés Dvorak +fr.dvorak.kbd:uk:French Dvorak-like + fr_CA.iso.acc.kbd:en:French Canadian ISO-8859-1 (accent keys) fr_CA.iso.acc.kbd:de:Französisch Kanada ISO-8859-1 (mit Akzenten) fr_CA.iso.acc.kbd:es:Francocanadiense ISO-8859-1 (con acentos) ==== //depot/projects/ia64/share/syscons/keymaps/Makefile#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/Makefile,v 1.59 2003/05/05 06:06:55 murray Exp $ +# $FreeBSD: src/share/syscons/keymaps/Makefile,v 1.60 2003/05/16 03:46:53 murray Exp $ KEYMAPS= INDEX.keymaps KEYMAPS+= be.iso.kbd be.iso.acc.kbd @@ -11,7 +11,7 @@ KEYMAPS+= el.iso07.kbd KEYMAPS+= estonian.iso.kbd estonian.iso15.kbd estonian.cp850.kbd KEYMAPS+= finnish.iso.kbd finnish.cp850.kbd -KEYMAPS+= fr.iso.kbd fr.iso.acc.kbd +KEYMAPS+= fr.iso.kbd fr.iso.acc.kbd fr.dvorak.kbd KEYMAPS+= fr_CA.iso.acc.kbd KEYMAPS+= german.iso.kbd german.cp850.kbd KEYMAPS+= gr.elot.acc.kbd gr.us101.acc.kbd ==== //depot/projects/ia64/share/syscons/keymaps/be.iso.kbd#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/be.iso.kbd,v 1.11 2001/03/11 23:41:18 ache Exp $ +# $FreeBSD: src/share/syscons/keymaps/be.iso.kbd,v 1.12 2003/05/16 03:37:52 murray Exp $ # alt # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state @@ -42,7 +42,7 @@ 036 'j' 'J' nl nl 'j' 'J' nl nl C 037 'k' 'K' vt vt 'k' 'K' vt vt C 038 'l' 'L' ff ff 'l' 'L' ff ff C - 039 'm' 'M' cr cr 'm' 'M' cr cr O + 039 'm' 'M' cr cr 'm' 'M' cr cr C 040 249 '%' nop nop ''' ''' nop nop O 041 178 179 nop nop 178 179 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O @@ -53,7 +53,7 @@ 047 'v' 'V' syn syn 'v' 'V' syn syn C 048 'b' 'B' stx stx 'b' 'B' stx stx C 049 'n' 'N' so so 'n' 'N' so so C - 050 ',' '?' nop nop ',' '?' nop nop C + 050 ',' '?' nop nop ',' '?' nop nop O 051 ';' '.' nop nop ';' '.' nop nop O 052 ':' '/' nop nop ':' '/' nop nop O 053 '=' '+' nop nop '~' '~' nop nop O ==== //depot/projects/ia64/share/syscons/keymaps/norwegian.dvorak.kbd#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/norwegian.dvorak.kbd,v 1.1 2003/05/05 06:06:55 murray Exp $ +# $FreeBSD: src/share/syscons/keymaps/norwegian.dvorak.kbd,v 1.2 2003/05/16 03:34:23 murray Exp $ # alt # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state @@ -11,10 +11,10 @@ 005 '4' 164 nop nop '$' 164 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' rs rs '6' '&' nop nop O - 008 '7' '/' nop nop '7' '/' nop nop O - 009 '8' '(' nop nop '8' '(' esc esc O - 010 '9' ')' nop nop '9' ')' gs gs O - 011 '0' '=' nop nop '0' '=' nop nop O + 008 '7' '/' nop nop '{' '/' nop nop O + 009 '8' '(' nop nop '[' '(' esc esc O + 010 '9' ')' nop nop ']' ')' gs gs O + 011 '0' '=' nop nop '}' '=' nop nop O 012 '+' '?' esc esc '[' '?' nop nop O 013 '\' '`' nop nop ''' nop nop nop O 014 bs bs del del bs bs del del O @@ -46,7 +46,7 @@ 040 '-' '_' us us '-' '_' us us O 041 '|' 167 nop nop 166 182 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 248 216 nop nop '|' '\' nop nop C + 043 '<' '>' nop nop '|' '\' nop nop C 044 230 198 nop nop '{' '[' nop nop C 045 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C 046 'j' 'J' nl nl 'j' 'J' nl nl C ==== //depot/projects/ia64/sys/boot/forth/loader.conf#16 (text+ko) ==== @@ -6,7 +6,7 @@ # # All arguments must be in double quotes. # -# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.70 2003/03/11 12:09:25 ru Exp $ +# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.71 2003/05/16 04:31:00 murray Exp $ ############################################################## ### Basic configuration options ############################ @@ -179,6 +179,7 @@ miibus_load="NO" # miibus support, needed for some drivers if_an_load="NO" # Aironet 4500/4800 802.11 wireless NICs if_ar_load="NO" # Digi SYNC/570i +if_awi_load="NO" # AMD PCnetMobile IEEE 802.11 wireless NICs if_bge_load="NO" # Broadcom BCM570x PCI gigabit ethernet if_cm_load="NO" # SMC (90c26, 90c56, 90c66) if_dc_load="NO" # DEC/Intel 21143 and various workalikes @@ -186,12 +187,16 @@ if_ed_load="NO" # National Semiconductor DS8390/WD83C690 ethernet if_el_load="NO" # 3Com Etherlink 3C501 if_em_load="NO" # Intel(R) PRO/1000 gigabit ethernet +if_en_load="NO" # Midway-based ATM interfaces if_ep_load="NO" # 3Com Etherlink III (3c5x9) +if_ex_load="NO" # Intel EtherExpress Pro/10 ethernet if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet adapters if_fxp_load="NO" # Intel EtherExpress PRO/100B (82557, 82558) if_gx_load="NO" # Intel Pro/1000 gigabit ethernet +if_ie_load="NO" # Intel 82586 if_lge_load="NO" # Level 1 LXT1001 NetCellerator PCI gigabit ethernet if_lnc_load="NO" # AMD Lance/PCnet Ethernet +if_my_load="NO" # Myson PCI fast ethernet if_nge_load="NO" # National Semiconductor PCI gigabit ethernet if_oltr_load="NO" # Olicom if_pcn_load="NO" # AMD PCnet PCI @@ -287,6 +292,7 @@ umodem_load="NO" # Modems uscanner_load="NO" # Scanners if_aue_load="NO" # ADMtek USB ethernet +if_axe_load="NO" # ASIX Electronics AX88172 USB ethernet if_cue_load="NO" # CATC USB ethernet if_kue_load="NO" # Kawasaki LSI USB ethernet ==== //depot/projects/ia64/sys/cam/scsi/scsi_da.c#44 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.142 2003/05/03 00:21:40 ken Exp $ + * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.143 2003/05/15 17:35:35 njl Exp $ */ #ifdef _KERNEL @@ -499,6 +499,14 @@ */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "MITSUMI", "USB FDD", "*"}, /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE + }, + { + /* + * OTi USB Flash Key + * PR: kern/51825 + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "OTi", "Flash Disk", "*"}, + /*quirks*/ DA_Q_NO_6_BYTE } }; ==== //depot/projects/ia64/sys/conf/files.amd64#5 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.14 2003/05/14 04:10:49 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.15 2003/05/16 02:27:17 obrien Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -16,7 +16,7 @@ # ia32_assym.h optional ia32 \ dependency "$S/kern/genassym.sh ia32_genassym.o" \ - compile-with "sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \ + compile-with "env NM=${NM} sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "ia32_assym.h" # ==== //depot/projects/ia64/sys/conf/ldscript.ia64#8 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/conf/ldscript.ia64,v 1.8 2002/12/05 18:35:44 obrien Exp $ */ +/* $FreeBSD: src/sys/conf/ldscript.ia64,v 1.9 2003/05/16 06:03:45 marcel Exp $ */ OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", "elf64-ia64-little") OUTPUT_ARCH(ia64) ENTRY(__start) @@ -8,107 +8,115 @@ { /* Read-only sections, merged into text segment: */ . = kernel_text + SIZEOF_HEADERS; - - .text : + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rela.init : { *(.rela.init) } + .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } + .rela.fini : { *(.rela.fini) } + .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } + .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } + .rela.ctors : { *(.rela.ctors) } + .rela.dtors : { *(.rela.dtors) } + .rela.got : { *(.rela.got) } + .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) } + .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) } + .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) } + .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) } + .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } + .rela.plt : { *(.rela.plt) } + .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) } + .init : + { + *(.init) + } =0x00300000010070000002000001000400 + .plt : { *(.plt) } + .text : { - *(.text.ivt) - . += 8192; - *(.text) - *(.stub) + *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) - *(.gnu.linkonce.t*) - } =0x47ff041f - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.text : - { *(.rel.text) *(.rel.gnu.linkonce.t*) } - .rela.text : - { *(.rela.text) *(.rela.gnu.linkonce.t*) } - .rel.data : - { *(.rel.data) *(.rel.gnu.linkonce.d*) } - .rela.data : - { *(.rela.data) *(.rela.gnu.linkonce.d*) } - .rel.rodata : - { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } - .rela.rodata : - { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.init : { *(.rel.init) } - .rela.init : { *(.rela.init) } - .rel.fini : { *(.rel.fini) } - .rela.fini : { *(.rela.fini) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : { *(.init) } =0x47ff041f + } =0x00300000010070000002000001000400 + .fini : + { + *(.fini) + } =0x00300000010070000002000001000400 _etext = .; PROVIDE (etext = .); - .fini : { *(.fini) } =0x47ff041f - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } - .rodata1 : { *(.rodata1) } - .reginfo : { *(.reginfo) } - .IA_64.unwind_info : { *(.IA_64.unwind_info*) } - .IA_64.unwind : { *(.IA_64.unwind*) } + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } + .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } + .opd : { *(.opd) } + .IA_64.unwind_info : { *(.IA_64.unwind_info* .gnu.linkonce.ia64unwi.*) } + .IA_64.unwind : { *(.IA_64.unwind* .gnu.linkonce.ia64unw.*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ - . = .; - .data : + . = . + 8192; + .data : { - *(.data) - *(.gnu.linkonce.d*) - CONSTRUCTORS + *(.data.proc0 .data .data.* .gnu.linkonce.d.*) + SORT(CONSTRUCTORS) } - .data1 : { *(.data1) } - .ctors : + .data1 : { *(.data1) } + .dynamic : { *(.dynamic) } + .ctors : { *(.ctors) + *(SORT(.ctors.*)) } - .dtors : + .dtors : { *(.dtors) + *(SORT(.dtors.*)) } - .plt : { *(.plt) } - /* gp points at .got+(1<<21) */ - __gp = ALIGN(8) + 0x200000; - .got : { *(.got.plt) *(.got) } - .dynamic : { *(.dynamic) } + .got : { *(.got.plt) *(.got) } + .IA_64.pltoff : { *(.IA_64.pltoff) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } - _edata = .; + .sdata : + { + *(.sdata .sdata.* .gnu.linkonce.s.*) + } + _edata = .; PROVIDE (edata = .); __bss_start = .; - .sbss : { *(.sbss) *(.scommon) } - .bss : + .sbss : + { + PROVIDE (__sbss_start = .); + PROVIDE (___sbss_start = .); + *(.dynsbss) + *(.sbss .sbss.* .gnu.linkonce.sb.*) + *(.scommon) + PROVIDE (__sbss_end = .); + PROVIDE (___sbss_end = .); + } + .bss : { *(.dynbss) - *(.bss) + *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. */ + . = ALIGN(64 / 8); } . = ALIGN(64 / 8); - _end = . ; + _end = .; PROVIDE (end = .); /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } + .comment 0 : { *(.comment) } /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ @@ -122,7 +130,7 @@ .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } @@ -134,6 +142,4 @@ .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ } - ==== //depot/projects/ia64/sys/dev/fxp/if_fxp.c#31 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.178 2003/04/30 04:14:56 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.179 2003/05/16 01:13:16 rwatson Exp $"); #include #include @@ -264,6 +264,10 @@ static int fxp_rnr; SYSCTL_INT(_hw, OID_AUTO, fxp_rnr, CTLFLAG_RW, &fxp_rnr, 0, "fxp rnr events"); +static int fxp_noflow; +SYSCTL_INT(_hw, OID_AUTO, fxp_noflow, CTLFLAG_RW, &fxp_noflow, 0, "fxp flow control disabled"); +TUNABLE_INT("hw.fxp_noflow", &fxp_noflow); + /* * Wait for the previous command to be accepted (but not necessarily * completed). @@ -2051,7 +2055,7 @@ cbp->mc_all = sc->flags & FXP_FLAG_ALL_MCAST ? 1 : 0; cbp->gamla_rx = sc->flags & FXP_FLAG_EXT_RFA ? 1 : 0; - if (sc->revision == FXP_REV_82557) { + if (fxp_noflow || sc->revision == FXP_REV_82557) { /* * The 82557 has no hardware flow control, the values * below are the defaults for the chip. ==== //depot/projects/ia64/sys/dev/gem/if_gem.c#14 (text+ko) ==== @@ -26,14 +26,16 @@ * * from: NetBSD: gem.c,v 1.21 2002/06/01 23:50:58 lukem Exp * - * $FreeBSD: src/sys/dev/gem/if_gem.c,v 1.15 2003/02/19 05:47:05 imp Exp $ + * $FreeBSD: src/sys/dev/gem/if_gem.c,v 1.16 2003/05/15 16:57:55 tmm Exp $ */ /* * Driver for Sun GEM ethernet controllers. */ +#if 0 #define GEM_DEBUG +#endif #include #include @@ -109,7 +111,7 @@ #define KTR_GEM KTR_CT2 #endif -#define GEM_NSEGS GEM_NTXSEGS +#define GEM_NSEGS GEM_NTXDESC /* * gem_attach: @@ -144,7 +146,7 @@ error = bus_dma_tag_create(sc->sc_pdmatag, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - GEM_TD_BUFSIZE, GEM_NTXSEGS, BUS_SPACE_MAXSIZE_32BIT, + GEM_TD_BUFSIZE, GEM_NTXDESC, BUS_SPACE_MAXSIZE_32BIT, BUS_DMA_ALLOCNOW, &sc->sc_tdmatag); if (error) goto fail_rtag; @@ -470,10 +472,12 @@ */ for (seg = 0; seg < nsegs; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri May 16 00:17:20 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 70FEB37B404; Fri, 16 May 2003 00:17:19 -0700 (PDT) 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 0E72437B401 for ; Fri, 16 May 2003 00:17:19 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DE1F43FA3 for ; Fri, 16 May 2003 00:17:17 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4G7HH0U017517 for ; Fri, 16 May 2003 00:17:17 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4G7HGDN017514 for perforce@freebsd.org; Fri, 16 May 2003 00:17:16 -0700 (PDT) Date: Fri, 16 May 2003 00:17:16 -0700 (PDT) Message-Id: <200305160717.h4G7HGDN017514@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31304 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 07:17:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=31304 Change 31304 by marcel@marcel_nfs on 2003/05/16 00:17:09 IFia64. Affected files ... .. //depot/projects/ia64_epc/Makefile.inc1#14 integrate .. //depot/projects/ia64_epc/lib/libc/gen/opendir.c#2 integrate .. //depot/projects/ia64_epc/lib/libthr/thread/thr_cancel.c#2 integrate .. //depot/projects/ia64_epc/lib/libthr/thread/thr_cond.c#2 integrate .. //depot/projects/ia64_epc/share/man/man4/kame.4#2 integrate .. //depot/projects/ia64_epc/share/syscons/keymaps/INDEX.keymaps#3 integrate .. //depot/projects/ia64_epc/share/syscons/keymaps/Makefile#3 integrate .. //depot/projects/ia64_epc/share/syscons/keymaps/be.iso.kbd#2 integrate .. //depot/projects/ia64_epc/share/syscons/keymaps/fr.dvorak.kbd#1 branch .. //depot/projects/ia64_epc/share/syscons/keymaps/norwegian.dvorak.kbd#2 integrate .. //depot/projects/ia64_epc/sys/boot/forth/loader.conf#4 integrate .. //depot/projects/ia64_epc/sys/cam/scsi/scsi_da.c#11 integrate .. //depot/projects/ia64_epc/sys/conf/files.amd64#5 integrate .. //depot/projects/ia64_epc/sys/conf/ldscript.ia64#4 integrate .. //depot/projects/ia64_epc/sys/dev/fxp/if_fxp.c#14 integrate .. //depot/projects/ia64_epc/sys/dev/gem/if_gem.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/gem/if_gemvar.h#2 integrate .. //depot/projects/ia64_epc/sys/dev/sio/sio_isa.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/usb/umass.c#8 integrate .. //depot/projects/ia64_epc/sys/i386/i386/vm_machdep.c#6 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#15 integrate .. //depot/projects/ia64_epc/sys/kern/kern_descrip.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/kern_sig.c#16 integrate .. //depot/projects/ia64_epc/sys/kern/subr_mbuf.c#10 integrate .. //depot/projects/ia64_epc/sys/netgraph/ng_bridge.c#3 integrate .. //depot/projects/ia64_epc/sys/nfsclient/nfs_bio.c#3 integrate .. //depot/projects/ia64_epc/sys/nfsclient/nfs_vnops.c#8 integrate .. //depot/projects/ia64_epc/sys/pci/if_dc.c#10 integrate .. //depot/projects/ia64_epc/sys/ufs/ufs/ufs_extattr.c#4 integrate .. //depot/projects/ia64_epc/tools/tools/tinderbox/Makefile#3 integrate .. //depot/projects/ia64_epc/tools/tools/tinderbox/tbmaster.pl#7 integrate .. //depot/projects/ia64_epc/tools/tools/tinderbox/tinderbox.pl#6 integrate .. //depot/projects/ia64_epc/tools/tools/tinderbox/www/Makefile#1 branch .. //depot/projects/ia64_epc/tools/tools/tinderbox/www/index.cgi#2 integrate .. //depot/projects/ia64_epc/tools/tools/tinderbox/www/tb.css#2 integrate .. //depot/projects/ia64_epc/usr.bin/netstat/mbuf.c#3 integrate Differences ... ==== //depot/projects/ia64_epc/Makefile.inc1#14 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.356 2003/05/05 12:54:26 bde Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.357 2003/05/15 17:59:32 ru Exp $ # # Make command line options: # -DNO_KERBEROS Do not build Heimdal (Kerberos 5) @@ -120,7 +120,8 @@ MAKEOBJDIRPREFIX?= /usr/obj .if !defined(OSRELDATE) -OSRELDATE!= sysctl -n kern.osreldate +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ + /usr/include/osreldate.h .endif TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} ==== //depot/projects/ia64_epc/lib/libc/gen/opendir.c#2 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)opendir.c 8.8 (Berkeley) 5/1/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/opendir.c,v 1.19 2003/01/04 00:18:50 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/opendir.c,v 1.20 2003/05/16 02:15:07 tjr Exp $"); #include "namespace.h" #include @@ -118,7 +118,7 @@ if (_fstatfs(fd, &sfb) < 0) goto fail; - unionstack = !strcmp(sfb.f_fstypename, "union") + unionstack = !strcmp(sfb.f_fstypename, "unionfs") || (sfb.f_flags & MNT_UNION); } else { unionstack = 0; ==== //depot/projects/ia64_epc/lib/libthr/thread/thr_cancel.c#2 (text+ko) ==== @@ -1,11 +1,16 @@ /* * David Leonard , 1999. Public domain. - * $FreeBSD: src/lib/libthr/thread/thr_cancel.c,v 1.2 2003/04/02 03:05:39 jeff Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_cancel.c,v 1.3 2003/05/15 17:56:18 mtm Exp $ */ #include #include #include "thr_private.h" +/* + * Static prototypes + */ +static void testcancel(void); + __weak_reference(_pthread_cancel, pthread_cancel); __weak_reference(_pthread_setcancelstate, pthread_setcancelstate); __weak_reference(_pthread_setcanceltype, pthread_setcanceltype); @@ -16,85 +21,102 @@ { int ret; - if ((ret = _find_thread(pthread)) != 0) { - /* NOTHING */ - } else if (pthread->state == PS_DEAD || pthread->state == PS_DEADLOCK + if ((ret = _find_thread(pthread)) != 0) + /* The thread is not on the list of active threads */ + goto out; + + _thread_critical_enter(pthread); + + if (pthread->state == PS_DEAD || pthread->state == PS_DEADLOCK || (pthread->flags & PTHREAD_EXITING) != 0) { + /* + * The thread is in the process of (or has already) exited + * or is deadlocked. + */ + _thread_critical_exit(pthread); ret = 0; - } else { - GIANT_LOCK(curthread); + goto out; + } + + /* + * The thread is on the active thread list and is not in the process + * of exiting. + */ + + if (((pthread->cancelflags & PTHREAD_CANCEL_DISABLE) != 0) || + (((pthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) && + ((pthread->cancelflags & PTHREAD_AT_CANCEL_POINT) == 0))) + /* Just mark it for cancellation: */ + pthread->cancelflags |= PTHREAD_CANCELLING; + else { + /* + * Check if we need to kick it back into the + * run queue: + */ + switch (pthread->state) { + case PS_RUNNING: + /* No need to resume: */ + pthread->cancelflags |= PTHREAD_CANCELLING; + break; - if (((pthread->cancelflags & PTHREAD_CANCEL_DISABLE) != 0) || - (((pthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) && - ((pthread->cancelflags & PTHREAD_AT_CANCEL_POINT) == 0))) - /* Just mark it for cancellation: */ + case PS_SLEEP_WAIT: + case PS_WAIT_WAIT: pthread->cancelflags |= PTHREAD_CANCELLING; - else { + PTHREAD_NEW_STATE(pthread, PS_RUNNING); + break; + + case PS_JOIN: /* - * Check if we need to kick it back into the - * run queue: + * Disconnect the thread from the joinee: */ - switch (pthread->state) { - case PS_RUNNING: - /* No need to resume: */ - pthread->cancelflags |= PTHREAD_CANCELLING; - break; + if (pthread->join_status.thread != NULL) { + pthread->join_status.thread->joiner + = NULL; + pthread->join_status.thread = NULL; + } + pthread->cancelflags |= PTHREAD_CANCELLING; + PTHREAD_NEW_STATE(pthread, PS_RUNNING); + break; - case PS_SLEEP_WAIT: - case PS_WAIT_WAIT: - pthread->cancelflags |= PTHREAD_CANCELLING; - PTHREAD_NEW_STATE(pthread, PS_RUNNING); - break; + case PS_MUTEX_WAIT: + case PS_COND_WAIT: + /* + * Threads in these states may be in queues. + * In order to preserve queue integrity, the + * cancelled thread must remove itself from the + * queue. When the thread resumes, it will + * remove itself from the queue and call the + * cancellation routine. + */ + pthread->cancelflags |= PTHREAD_CANCELLING; + PTHREAD_NEW_STATE(pthread, PS_RUNNING); + break; - case PS_JOIN: - /* - * Disconnect the thread from the joinee: - */ - if (pthread->join_status.thread != NULL) { - pthread->join_status.thread->joiner - = NULL; - pthread->join_status.thread = NULL; - } - pthread->cancelflags |= PTHREAD_CANCELLING; - PTHREAD_NEW_STATE(pthread, PS_RUNNING); - break; - - case PS_MUTEX_WAIT: - case PS_COND_WAIT: - /* - * Threads in these states may be in queues. - * In order to preserve queue integrity, the - * cancelled thread must remove itself from the - * queue. When the thread resumes, it will - * remove itself from the queue and call the - * cancellation routine. - */ - pthread->cancelflags |= PTHREAD_CANCELLING; - PTHREAD_NEW_STATE(pthread, PS_RUNNING); - break; - - case PS_DEAD: - case PS_DEADLOCK: - case PS_STATE_MAX: - /* Ignore - only here to silence -Wall: */ - break; - } + case PS_DEAD: + case PS_DEADLOCK: + case PS_STATE_MAX: + /* Ignore - only here to silence -Wall: */ + break; } + } - /* Unprotect the scheduling queues: */ - GIANT_UNLOCK(curthread); + /* Unprotect the scheduling queues: */ + _thread_critical_exit(pthread); - ret = 0; - } + ret = 0; +out: return (ret); } int _pthread_setcancelstate(int state, int *oldstate) { - int ostate; + int ostate, ret; + + ret = 0; + + _thread_critical_enter(curthread); - GIANT_LOCK(curthread); ostate = curthread->cancelflags & PTHREAD_CANCEL_DISABLE; switch (state) { @@ -102,23 +124,21 @@ if (oldstate != NULL) *oldstate = ostate; curthread->cancelflags &= ~PTHREAD_CANCEL_DISABLE; - if ((curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) + if ((curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) break; - GIANT_UNLOCK(curthread); - pthread_testcancel(); + testcancel(); break; case PTHREAD_CANCEL_DISABLE: if (oldstate != NULL) *oldstate = ostate; curthread->cancelflags |= PTHREAD_CANCEL_DISABLE; - GIANT_UNLOCK(curthread); break; default: - GIANT_UNLOCK(curthread); - return (EINVAL); + ret = EINVAL; } - return (0); + _thread_critical_exit(curthread); + return (ret); } int @@ -126,37 +146,43 @@ { int otype; - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); otype = curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS; switch (type) { case PTHREAD_CANCEL_ASYNCHRONOUS: if (oldtype != NULL) *oldtype = otype; curthread->cancelflags |= PTHREAD_CANCEL_ASYNCHRONOUS; - GIANT_UNLOCK(curthread); - pthread_testcancel(); + testcancel(); break; case PTHREAD_CANCEL_DEFERRED: if (oldtype != NULL) *oldtype = otype; curthread->cancelflags &= ~PTHREAD_CANCEL_ASYNCHRONOUS; - GIANT_UNLOCK(curthread); break; default: - GIANT_UNLOCK(curthread); return (EINVAL); } + _thread_critical_exit(curthread); return (0); } -/* - * XXXTHR Make an internal locked version. - */ void _pthread_testcancel(void) { - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); + testcancel(); + _thread_critical_exit(curthread); +} + +static void +testcancel() +{ + /* + * This pthread should already be locked by the caller. + */ + if (((curthread->cancelflags & PTHREAD_CANCEL_DISABLE) == 0) && ((curthread->cancelflags & PTHREAD_CANCELLING) != 0) && ((curthread->flags & PTHREAD_EXITING) == 0)) { @@ -166,30 +192,28 @@ * to be cancelled again. */ curthread->cancelflags &= ~PTHREAD_CANCELLING; - GIANT_UNLOCK(curthread); + _thread_critical_exit(curthread); _thread_exit_cleanup(); pthread_exit(PTHREAD_CANCELED); PANIC("cancel"); } - GIANT_UNLOCK(curthread); } void _thread_enter_cancellation_point(void) { - pthread_testcancel(); - - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); + testcancel(); curthread->cancelflags |= PTHREAD_AT_CANCEL_POINT; - GIANT_UNLOCK(curthread); + _thread_critical_exit(curthread); } void _thread_leave_cancellation_point(void) { - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); curthread->cancelflags &= ~PTHREAD_AT_CANCEL_POINT; - GIANT_UNLOCK(curthread); + testcancel(); + _thread_critical_exit(curthread); - pthread_testcancel(); } ==== //depot/projects/ia64_epc/lib/libthr/thread/thr_cond.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_cond.c,v 1.3 2003/04/02 03:05:39 jeff Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_cond.c,v 1.4 2003/05/15 18:17:13 mtm Exp $ */ #include #include @@ -43,6 +43,8 @@ static pthread_t cond_queue_deq(pthread_cond_t); static void cond_queue_remove(pthread_cond_t, pthread_t); static void cond_queue_enq(pthread_cond_t, pthread_t); +static int cond_wait_common(pthread_cond_t *, + pthread_mutex_t *, const struct timespec *); __weak_reference(_pthread_cond_init, pthread_cond_init); __weak_reference(_pthread_cond_destroy, pthread_cond_destroy); @@ -161,13 +163,8 @@ _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { int rval; - struct timespec abstime = { 0, 0 }; - /* - * XXXTHR This is a hack. Make a pthread_cond_common function that - * accepts NULL so we don't change posix semantics for timedwait. - */ - rval = pthread_cond_timedwait(cond, mutex, &abstime); + rval = cond_wait_common(cond, mutex, NULL); /* This should never happen. */ if (rval == ETIMEDOUT) @@ -180,7 +177,16 @@ _pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec * abstime) { - struct timespec *time; + if (abstime == NULL || abstime->tv_nsec >= 1000000000) + return (EINVAL); + + return (cond_wait_common(cond, mutex, abstime)); +} + +static int +cond_wait_common(pthread_cond_t * cond, pthread_mutex_t * mutex, + const struct timespec * abstime) +{ int rval = 0; int done = 0; int seqno; @@ -189,13 +195,6 @@ _thread_enter_cancellation_point(); - if (abstime == NULL || abstime->tv_nsec >= 1000000000) - return (EINVAL); - - if (abstime->tv_sec == 0 && abstime->tv_nsec == 0) - time = NULL; - else - time = abstime; /* * If the condition variable is statically initialized, perform dynamic * initialization. @@ -273,7 +272,7 @@ PTHREAD_SET_STATE(curthread, PS_COND_WAIT); GIANT_UNLOCK(curthread); - rval = _thread_suspend(curthread, time); + rval = _thread_suspend(curthread, (struct timespec *)abstime); if (rval == -1) { printf("foo"); fflush(stdout); ==== //depot/projects/ia64_epc/share/man/man4/kame.4#2 (text+ko) ==== @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" $Id: kame.4,v 1.4 1999/10/07 04:01:15 itojun Exp $ -.\" $FreeBSD: src/share/man/man4/kame.4,v 1.11 2002/07/09 20:37:18 blackend Exp $ +.\" $FreeBSD: src/share/man/man4/kame.4,v 1.12 2003/05/16 00:31:12 hmp Exp $ .\" .Dd April 13, 1999 .Dt KAME 4 @@ -67,7 +67,6 @@ .\" .Ss Plug and Play and protocol stack/interface configuration .Xr ndp 8 , -.Xr prefix 8 , .Xr rrenumd 8 , .Xr rtadvd 8 , .Xr rtsol 8 , @@ -81,8 +80,8 @@ .Xr mchat 1 .Pq - , .Xr ifmcstat 8 , -.Xr pim6dd 8 , -.Xr pim6sd 8 , +.Xr pim6dd 8 [ /usr/ports/net/pim6dd ] , +.Xr pim6sd 8 [ /usr/ports/net/pim6sd ] , .Xr pim6stat 8 . .\" .Ss Transition Tools @@ -96,12 +95,8 @@ .Fx . .\" .Ss IPsec and tunnelling -.Xr gifconfig 8 , .Xr ipsec 4 , -.\" (dtcp and racoon doesn't exist yet.) -.\" .Xr dtcpc 8 , -.\" .Xr dtcps 8 , -.\" .Xr racoon 8 , +.Xr racoon 8 [ /usr/ports/security/racoon ] , .Xr setkey 8 . .Pp Dozen of existing tools are modified for IPsec support, like @@ -123,6 +118,7 @@ modified for IPv4/v6 support, or IPv6-only .Xr inet6d 8 +.Pq - is supplied. .Pp Dozen of existing daemons are modified for IPv6/IPsec support, like ==== //depot/projects/ia64_epc/share/syscons/keymaps/INDEX.keymaps#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/INDEX.keymaps,v 1.46 2003/05/05 06:06:55 murray Exp $ +# $FreeBSD: src/share/syscons/keymaps/INDEX.keymaps,v 1.47 2003/05/16 03:46:53 murray Exp $ # # database for kbdmap(8) # @@ -128,6 +128,11 @@ fr.iso.acc.kbd:es:Francés ISO-8859-1 (con acentos) fr.iso.acc.kbd:uk:æÒÁÎÃÕÚØËÁ ISO-8859-1 (accent keys) +fr.dvorak.kbd:en:French Dvorak-like +fr.dvorak.kbd:de:Französisch Dvorak +fr.dvorak.kbd:es:Francés Dvorak +fr.dvorak.kbd:uk:French Dvorak-like + fr_CA.iso.acc.kbd:en:French Canadian ISO-8859-1 (accent keys) fr_CA.iso.acc.kbd:de:Französisch Kanada ISO-8859-1 (mit Akzenten) fr_CA.iso.acc.kbd:es:Francocanadiense ISO-8859-1 (con acentos) ==== //depot/projects/ia64_epc/share/syscons/keymaps/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/Makefile,v 1.59 2003/05/05 06:06:55 murray Exp $ +# $FreeBSD: src/share/syscons/keymaps/Makefile,v 1.60 2003/05/16 03:46:53 murray Exp $ KEYMAPS= INDEX.keymaps KEYMAPS+= be.iso.kbd be.iso.acc.kbd @@ -11,7 +11,7 @@ KEYMAPS+= el.iso07.kbd KEYMAPS+= estonian.iso.kbd estonian.iso15.kbd estonian.cp850.kbd KEYMAPS+= finnish.iso.kbd finnish.cp850.kbd -KEYMAPS+= fr.iso.kbd fr.iso.acc.kbd +KEYMAPS+= fr.iso.kbd fr.iso.acc.kbd fr.dvorak.kbd KEYMAPS+= fr_CA.iso.acc.kbd KEYMAPS+= german.iso.kbd german.cp850.kbd KEYMAPS+= gr.elot.acc.kbd gr.us101.acc.kbd ==== //depot/projects/ia64_epc/share/syscons/keymaps/be.iso.kbd#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/be.iso.kbd,v 1.11 2001/03/11 23:41:18 ache Exp $ +# $FreeBSD: src/share/syscons/keymaps/be.iso.kbd,v 1.12 2003/05/16 03:37:52 murray Exp $ # alt # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state @@ -42,7 +42,7 @@ 036 'j' 'J' nl nl 'j' 'J' nl nl C 037 'k' 'K' vt vt 'k' 'K' vt vt C 038 'l' 'L' ff ff 'l' 'L' ff ff C - 039 'm' 'M' cr cr 'm' 'M' cr cr O + 039 'm' 'M' cr cr 'm' 'M' cr cr C 040 249 '%' nop nop ''' ''' nop nop O 041 178 179 nop nop 178 179 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O @@ -53,7 +53,7 @@ 047 'v' 'V' syn syn 'v' 'V' syn syn C 048 'b' 'B' stx stx 'b' 'B' stx stx C 049 'n' 'N' so so 'n' 'N' so so C - 050 ',' '?' nop nop ',' '?' nop nop C + 050 ',' '?' nop nop ',' '?' nop nop O 051 ';' '.' nop nop ';' '.' nop nop O 052 ':' '/' nop nop ':' '/' nop nop O 053 '=' '+' nop nop '~' '~' nop nop O ==== //depot/projects/ia64_epc/share/syscons/keymaps/norwegian.dvorak.kbd#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/norwegian.dvorak.kbd,v 1.1 2003/05/05 06:06:55 murray Exp $ +# $FreeBSD: src/share/syscons/keymaps/norwegian.dvorak.kbd,v 1.2 2003/05/16 03:34:23 murray Exp $ # alt # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state @@ -11,10 +11,10 @@ 005 '4' 164 nop nop '$' 164 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' rs rs '6' '&' nop nop O - 008 '7' '/' nop nop '7' '/' nop nop O - 009 '8' '(' nop nop '8' '(' esc esc O - 010 '9' ')' nop nop '9' ')' gs gs O - 011 '0' '=' nop nop '0' '=' nop nop O + 008 '7' '/' nop nop '{' '/' nop nop O + 009 '8' '(' nop nop '[' '(' esc esc O + 010 '9' ')' nop nop ']' ')' gs gs O + 011 '0' '=' nop nop '}' '=' nop nop O 012 '+' '?' esc esc '[' '?' nop nop O 013 '\' '`' nop nop ''' nop nop nop O 014 bs bs del del bs bs del del O @@ -46,7 +46,7 @@ 040 '-' '_' us us '-' '_' us us O 041 '|' 167 nop nop 166 182 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 248 216 nop nop '|' '\' nop nop C + 043 '<' '>' nop nop '|' '\' nop nop C 044 230 198 nop nop '{' '[' nop nop C 045 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C 046 'j' 'J' nl nl 'j' 'J' nl nl C ==== //depot/projects/ia64_epc/sys/boot/forth/loader.conf#4 (text+ko) ==== @@ -6,7 +6,7 @@ # # All arguments must be in double quotes. # -# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.70 2003/03/11 12:09:25 ru Exp $ +# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.71 2003/05/16 04:31:00 murray Exp $ ############################################################## ### Basic configuration options ############################ @@ -179,6 +179,7 @@ miibus_load="NO" # miibus support, needed for some drivers if_an_load="NO" # Aironet 4500/4800 802.11 wireless NICs if_ar_load="NO" # Digi SYNC/570i +if_awi_load="NO" # AMD PCnetMobile IEEE 802.11 wireless NICs if_bge_load="NO" # Broadcom BCM570x PCI gigabit ethernet if_cm_load="NO" # SMC (90c26, 90c56, 90c66) if_dc_load="NO" # DEC/Intel 21143 and various workalikes @@ -186,12 +187,16 @@ if_ed_load="NO" # National Semiconductor DS8390/WD83C690 ethernet if_el_load="NO" # 3Com Etherlink 3C501 if_em_load="NO" # Intel(R) PRO/1000 gigabit ethernet +if_en_load="NO" # Midway-based ATM interfaces if_ep_load="NO" # 3Com Etherlink III (3c5x9) +if_ex_load="NO" # Intel EtherExpress Pro/10 ethernet if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet adapters if_fxp_load="NO" # Intel EtherExpress PRO/100B (82557, 82558) if_gx_load="NO" # Intel Pro/1000 gigabit ethernet +if_ie_load="NO" # Intel 82586 if_lge_load="NO" # Level 1 LXT1001 NetCellerator PCI gigabit ethernet if_lnc_load="NO" # AMD Lance/PCnet Ethernet +if_my_load="NO" # Myson PCI fast ethernet if_nge_load="NO" # National Semiconductor PCI gigabit ethernet if_oltr_load="NO" # Olicom if_pcn_load="NO" # AMD PCnet PCI @@ -287,6 +292,7 @@ umodem_load="NO" # Modems uscanner_load="NO" # Scanners if_aue_load="NO" # ADMtek USB ethernet +if_axe_load="NO" # ASIX Electronics AX88172 USB ethernet if_cue_load="NO" # CATC USB ethernet if_kue_load="NO" # Kawasaki LSI USB ethernet ==== //depot/projects/ia64_epc/sys/cam/scsi/scsi_da.c#11 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.142 2003/05/03 00:21:40 ken Exp $ + * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.143 2003/05/15 17:35:35 njl Exp $ */ #ifdef _KERNEL @@ -499,6 +499,14 @@ */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "MITSUMI", "USB FDD", "*"}, /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE + }, + { + /* + * OTi USB Flash Key + * PR: kern/51825 + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "OTi", "Flash Disk", "*"}, + /*quirks*/ DA_Q_NO_6_BYTE } }; ==== //depot/projects/ia64_epc/sys/conf/files.amd64#5 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.14 2003/05/14 04:10:49 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.15 2003/05/16 02:27:17 obrien Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -16,7 +16,7 @@ # ia32_assym.h optional ia32 \ dependency "$S/kern/genassym.sh ia32_genassym.o" \ - compile-with "sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \ + compile-with "env NM=${NM} sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "ia32_assym.h" # ==== //depot/projects/ia64_epc/sys/conf/ldscript.ia64#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/conf/ldscript.ia64,v 1.8 2002/12/05 18:35:44 obrien Exp $ */ +/* $FreeBSD: src/sys/conf/ldscript.ia64,v 1.9 2003/05/16 06:03:45 marcel Exp $ */ OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", "elf64-ia64-little") OUTPUT_ARCH(ia64) ENTRY(__start) ==== //depot/projects/ia64_epc/sys/dev/fxp/if_fxp.c#14 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.178 2003/04/30 04:14:56 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.179 2003/05/16 01:13:16 rwatson Exp $"); #include #include @@ -264,6 +264,10 @@ static int fxp_rnr; SYSCTL_INT(_hw, OID_AUTO, fxp_rnr, CTLFLAG_RW, &fxp_rnr, 0, "fxp rnr events"); +static int fxp_noflow; +SYSCTL_INT(_hw, OID_AUTO, fxp_noflow, CTLFLAG_RW, &fxp_noflow, 0, "fxp flow control disabled"); +TUNABLE_INT("hw.fxp_noflow", &fxp_noflow); + /* * Wait for the previous command to be accepted (but not necessarily * completed). @@ -2051,7 +2055,7 @@ cbp->mc_all = sc->flags & FXP_FLAG_ALL_MCAST ? 1 : 0; cbp->gamla_rx = sc->flags & FXP_FLAG_EXT_RFA ? 1 : 0; - if (sc->revision == FXP_REV_82557) { + if (fxp_noflow || sc->revision == FXP_REV_82557) { /* * The 82557 has no hardware flow control, the values * below are the defaults for the chip. ==== //depot/projects/ia64_epc/sys/dev/gem/if_gem.c#3 (text+ko) ==== @@ -26,14 +26,16 @@ * * from: NetBSD: gem.c,v 1.21 2002/06/01 23:50:58 lukem Exp * - * $FreeBSD: src/sys/dev/gem/if_gem.c,v 1.15 2003/02/19 05:47:05 imp Exp $ + * $FreeBSD: src/sys/dev/gem/if_gem.c,v 1.16 2003/05/15 16:57:55 tmm Exp $ */ /* * Driver for Sun GEM ethernet controllers. */ +#if 0 #define GEM_DEBUG +#endif #include #include @@ -109,7 +111,7 @@ #define KTR_GEM KTR_CT2 #endif -#define GEM_NSEGS GEM_NTXSEGS +#define GEM_NSEGS GEM_NTXDESC /* * gem_attach: @@ -144,7 +146,7 @@ error = bus_dma_tag_create(sc->sc_pdmatag, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - GEM_TD_BUFSIZE, GEM_NTXSEGS, BUS_SPACE_MAXSIZE_32BIT, + GEM_TD_BUFSIZE, GEM_NTXDESC, BUS_SPACE_MAXSIZE_32BIT, BUS_DMA_ALLOCNOW, &sc->sc_tdmatag); if (error) goto fail_rtag; @@ -470,10 +472,12 @@ */ for (seg = 0; seg < nsegs; seg++, nexttx = GEM_NEXTTX(nexttx)) { +#ifdef GEM_DEBUG CTR5(KTR_GEM, "txdma_cb: mapping seg %d (txd %d), len " "%lx, addr %#lx (%#lx)", seg, nexttx, segs[seg].ds_len, segs[seg].ds_addr, GEM_DMA_WRITE(sc, segs[seg].ds_addr)); +#endif if (segs[seg].ds_len == 0) continue; @@ -483,8 +487,10 @@ ("gem_txdma_callback: segment size too large!")); flags = segs[seg].ds_len & GEM_TD_BUFSIZE; if (len == 0) { +#ifdef GEM_DEBUG CTR2(KTR_GEM, "txdma_cb: start of packet at seg %d, " "tx %d", seg, nexttx); +#endif flags |= GEM_TD_START_OF_PACKET; if (++sc->sc_txwin > GEM_NTXSEGS * 2 / 3) { sc->sc_txwin = 0; @@ -492,8 +498,10 @@ } } if (len + segs[seg].ds_len == totsz) { +#ifdef GEM_DEBUG CTR2(KTR_GEM, "txdma_cb: end of packet at seg %d, " "tx %d", seg, nexttx); +#endif flags |= GEM_TD_END_OF_PACKET; } sc->sc_txdescs[nexttx].gd_flags = GEM_DMA_WRITE(sc, flags); @@ -545,7 +553,9 @@ int s; s = splnet(); +#ifdef GEM_DEBUG CTR1(KTR_GEM, "%s: gem_reset", device_get_name(sc->sc_dev)); +#endif gem_reset_rx(sc); gem_reset_tx(sc); @@ -592,7 +602,9 @@ struct gem_softc *sc = (struct gem_softc *)ifp->if_softc; struct gem_txsoft *txs; +#ifdef GEM_DEBUG CTR1(KTR_GEM, "%s: gem_stop", device_get_name(sc->sc_dev)); +#endif callout_stop(&sc->sc_tick_ch); @@ -846,7 +858,9 @@ s = splnet(); +#ifdef GEM_DEBUG CTR1(KTR_GEM, "%s: gem_init: calling stop", device_get_name(sc->sc_dev)); +#endif /* * Initialization sequence. The numbered steps below correspond * to the sequence outlined in section 6.3.5.1 in the Ethernet @@ -857,7 +871,9 @@ /* step 1 & 2. Reset the Ethernet Channel */ gem_stop(&sc->sc_arpcom.ac_if, 0); gem_reset(sc); +#ifdef GEM_DEBUG CTR1(KTR_GEM, "%s: gem_init: restarting", device_get_name(sc->sc_dev)); +#endif /* Re-initialize the MIF */ gem_mifinit(sc); @@ -881,8 +897,10 @@ bus_space_write_4(t, h, GEM_RX_RING_PTR_HI, 0); bus_space_write_4(t, h, GEM_RX_RING_PTR_LO, GEM_CDRXADDR(sc, 0)); +#ifdef GEM_DEBUG CTR3(KTR_GEM, "loading rx ring %lx, tx ring %lx, cddma %lx", GEM_CDRXADDR(sc, 0), GEM_CDTXADDR(sc, 0), sc->sc_cddma); +#endif /* step 8. Global Configuration & Interrupt Mask */ bus_space_write_4(t, h, GEM_INTMASK, @@ -978,9 +996,11 @@ bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap, BUS_DMASYNC_PREWRITE); +#ifdef GEM_DEBUG CTR3(KTR_GEM, "load_mbuf: setting firstdesc=%d, lastdesc=%d, " "ndescs=%d", txs->txs_firstdesc, txs->txs_lastdesc, txs->txs_ndescs); +#endif STAILQ_REMOVE_HEAD(&sc->sc_txfreeq, txs_q); STAILQ_INSERT_TAIL(&sc->sc_txdirtyq, txs, txs_q); @@ -989,7 +1009,9 @@ return (0); fail: +#ifdef GEM_DEBUG CTR1(KTR_GEM, "gem_load_txmbuf failed (%d)", error); +#endif bus_dmamap_unload(sc->sc_tdmatag, txs->txs_dmamap); return (error); } @@ -1091,7 +1113,7 @@ { struct gem_softc *sc = (struct gem_softc *)ifp->if_softc; struct mbuf *m0 = NULL; - int firsttx, ntx, ofree, txmfail; + int firsttx, ntx = 0, ofree, txmfail; if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING) return; @@ -1103,8 +1125,10 @@ ofree = sc->sc_txfree; firsttx = sc->sc_txnext; +#ifdef GEM_DEBUG CTR3(KTR_GEM, "%s: gem_start: txfree %d, txnext %d", device_get_name(sc->sc_dev), ofree, firsttx); +#endif /* * Loop through the send queue, setting up transmit descriptors @@ -1112,7 +1136,7 @@ * descriptors. */ txmfail = 0; - for (ntx = 0;; ntx++) { + do { /* * Grab a packet off the queue. */ @@ -1135,15 +1159,18 @@ break; } + ntx++; /* Kick the transmitter. */ +#ifdef GEM_DEBUG CTR2(KTR_GEM, "%s: gem_start: kicking tx %d", device_get_name(sc->sc_dev), sc->sc_txnext); +#endif bus_space_write_4(sc->sc_bustag, sc->sc_h, GEM_TX_KICK, sc->sc_txnext); if (ifp->if_bpf != NULL) bpf_mtap(ifp->if_bpf, m0); - } + } while (1); if (txmfail == -1 || sc->sc_txfree == 0) { /* No more slots left; notify upper layer. */ @@ -1153,13 +1180,17 @@ if (ntx > 0) { GEM_CDSYNC(sc, BUS_DMASYNC_PREWRITE); +#ifdef GEM_DEBUG CTR2(KTR_GEM, "%s: packets enqueued, OWN on %d", device_get_name(sc->sc_dev), firsttx); +#endif /* Set a watchdog timer in case the chip flakes out. */ ifp->if_timer = 5; +#ifdef GEM_DEBUG CTR2(KTR_GEM, "%s: gem_start: watchdog %d", device_get_name(sc->sc_dev), ifp->if_timer); +#endif } } @@ -1178,7 +1209,9 @@ int progress = 0; +#ifdef GEM_DEBUG CTR1(KTR_GEM, "%s: gem_tint", device_get_name(sc->sc_dev)); +#endif /* * Unload collision counters @@ -1228,9 +1261,11 @@ * processed +1. */ txlast = bus_space_read_4(t, mac, GEM_TX_COMPLETION); +#ifdef GEM_DEBUG CTR3(KTR_GEM, "gem_tint: txs->txs_firstdesc = %d, " "txs->txs_lastdesc = %d, txlast = %d", txs->txs_firstdesc, txs->txs_lastdesc, txlast); +#endif if (txs->txs_firstdesc <= txs->txs_lastdesc) { if ((txlast >= txs->txs_firstdesc) && (txlast <= txs->txs_lastdesc)) @@ -1242,7 +1277,9 @@ break; } +#ifdef GEM_DEBUG CTR0(KTR_GEM, "gem_tint: releasing a desc"); +#endif STAILQ_REMOVE_HEAD(&sc->sc_txdirtyq, txs_q); sc->sc_txfree += txs->txs_ndescs; @@ -1261,6 +1298,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri May 16 13:17:25 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CA4F837B404; Fri, 16 May 2003 13:17:24 -0700 (PDT) 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 665AB37B401 for ; Fri, 16 May 2003 13:17:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35ED043FAF for ; Fri, 16 May 2003 13:17:23 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4GKHN0U080955 for ; Fri, 16 May 2003 13:17:23 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4GKHMVd080952 for perforce@freebsd.org; Fri, 16 May 2003 13:17:22 -0700 (PDT) Date: Fri, 16 May 2003 13:17:22 -0700 (PDT) Message-Id: <200305162017.h4GKHMVd080952@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31338 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 20:17:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=31338 Change 31338 by peter@peter_daintree on 2003/05/16 13:16:30 IFC @31334 Affected files ... .. //depot/projects/hammer/Makefile.inc1#15 integrate .. //depot/projects/hammer/lib/libc/gen/opendir.c#3 integrate .. //depot/projects/hammer/lib/libthr/thread/thr_cancel.c#2 integrate .. //depot/projects/hammer/lib/libthr/thread/thr_cond.c#2 integrate .. //depot/projects/hammer/release/alpha/dokern.sh#7 integrate .. //depot/projects/hammer/release/scripts/doFS.sh#9 integrate .. //depot/projects/hammer/sbin/devd/parse.y#3 integrate .. //depot/projects/hammer/share/man/man4/kame.4#2 integrate .. //depot/projects/hammer/share/man/man9/CTASSERT.9#1 branch .. //depot/projects/hammer/share/man/man9/Makefile#10 integrate .. //depot/projects/hammer/share/man/man9/VFS_SET.9#3 integrate .. //depot/projects/hammer/share/man/man9/rman.9#1 branch .. //depot/projects/hammer/share/man/man9/sleep.9#3 integrate .. //depot/projects/hammer/share/syscons/keymaps/INDEX.keymaps#3 integrate .. //depot/projects/hammer/share/syscons/keymaps/Makefile#4 integrate .. //depot/projects/hammer/share/syscons/keymaps/be.iso.kbd#2 integrate .. //depot/projects/hammer/share/syscons/keymaps/fr.dvorak.kbd#1 branch .. //depot/projects/hammer/share/syscons/keymaps/norwegian.dvorak.kbd#2 integrate .. //depot/projects/hammer/sys/boot/forth/loader.conf#5 integrate .. //depot/projects/hammer/sys/cam/scsi/scsi_da.c#14 integrate .. //depot/projects/hammer/sys/conf/NOTES#17 integrate .. //depot/projects/hammer/sys/conf/files.amd64#14 integrate .. //depot/projects/hammer/sys/conf/ldscript.ia64#5 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/Makefile#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_bstream.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_bstream.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_context.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_context.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_env.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_env.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_scoreboard.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_scoreboard.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_self.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_self.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_self_context.s#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_step.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_str.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_str.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_swap.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_swap.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_trace.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_trace.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_ttrace.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_ttrace.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_uinfo.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_uinfo.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_utable.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_utable.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/test/Makefile#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/test/dump_context.c#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/test/dumpmyself.c#1 branch .. //depot/projects/hammer/sys/dev/fxp/if_fxp.c#15 integrate .. //depot/projects/hammer/sys/dev/gem/if_gem.c#5 integrate .. //depot/projects/hammer/sys/dev/gem/if_gemvar.h#3 integrate .. //depot/projects/hammer/sys/dev/md/md.c#12 integrate .. //depot/projects/hammer/sys/dev/sio/sio_isa.c#3 integrate .. //depot/projects/hammer/sys/dev/usb/umass.c#7 integrate .. //depot/projects/hammer/sys/i386/conf/NOTES#15 integrate .. //depot/projects/hammer/sys/i386/i386/mp_machdep.c#7 integrate .. //depot/projects/hammer/sys/i386/i386/vm_machdep.c#8 integrate .. //depot/projects/hammer/sys/ia64/ia64/context.s#1 branch .. //depot/projects/hammer/sys/ia64/ia64/pmap.c#10 integrate .. //depot/projects/hammer/sys/ia64/ia64/syscall.s#1 branch .. //depot/projects/hammer/sys/ia64/include/_regset.h#1 branch .. //depot/projects/hammer/sys/kern/kern_descrip.c#9 integrate .. //depot/projects/hammer/sys/kern/kern_sig.c#15 integrate .. //depot/projects/hammer/sys/kern/subr_mbuf.c#10 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#17 integrate .. //depot/projects/hammer/sys/netgraph/ng_bridge.c#4 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_bio.c#4 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_vnops.c#9 integrate .. //depot/projects/hammer/sys/pc98/conf/NOTES#5 integrate .. //depot/projects/hammer/sys/pci/if_dc.c#11 integrate .. //depot/projects/hammer/sys/ufs/ufs/ufs_extattr.c#7 integrate .. //depot/projects/hammer/tools/tools/tinderbox/Makefile#2 integrate .. //depot/projects/hammer/tools/tools/tinderbox/tbmaster.1#1 branch .. //depot/projects/hammer/tools/tools/tinderbox/tbmaster.pl#6 integrate .. //depot/projects/hammer/tools/tools/tinderbox/tinderbox.1#1 branch .. //depot/projects/hammer/tools/tools/tinderbox/tinderbox.pl#3 integrate .. //depot/projects/hammer/tools/tools/tinderbox/www/Makefile#1 branch .. //depot/projects/hammer/tools/tools/tinderbox/www/index.cgi#1 branch .. //depot/projects/hammer/tools/tools/tinderbox/www/tb.css#1 branch .. //depot/projects/hammer/tools/tools/tinderbox/www/valid-css.gif#1 branch .. //depot/projects/hammer/tools/tools/tinderbox/www/valid-xhtml10.png#1 branch .. //depot/projects/hammer/usr.bin/netstat/mbuf.c#4 integrate .. //depot/projects/hammer/usr.sbin/rpc.lockd/kern.c#3 integrate Differences ... ==== //depot/projects/hammer/Makefile.inc1#15 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.356 2003/05/05 12:54:26 bde Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.357 2003/05/15 17:59:32 ru Exp $ # # Make command line options: # -DNO_KERBEROS Do not build Heimdal (Kerberos 5) @@ -120,7 +120,8 @@ MAKEOBJDIRPREFIX?= /usr/obj .if !defined(OSRELDATE) -OSRELDATE!= sysctl -n kern.osreldate +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ + /usr/include/osreldate.h .endif TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} ==== //depot/projects/hammer/lib/libc/gen/opendir.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)opendir.c 8.8 (Berkeley) 5/1/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/opendir.c,v 1.19 2003/01/04 00:18:50 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/opendir.c,v 1.20 2003/05/16 02:15:07 tjr Exp $"); #include "namespace.h" #include @@ -118,7 +118,7 @@ if (_fstatfs(fd, &sfb) < 0) goto fail; - unionstack = !strcmp(sfb.f_fstypename, "union") + unionstack = !strcmp(sfb.f_fstypename, "unionfs") || (sfb.f_flags & MNT_UNION); } else { unionstack = 0; ==== //depot/projects/hammer/lib/libthr/thread/thr_cancel.c#2 (text+ko) ==== @@ -1,11 +1,16 @@ /* * David Leonard , 1999. Public domain. - * $FreeBSD: src/lib/libthr/thread/thr_cancel.c,v 1.2 2003/04/02 03:05:39 jeff Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_cancel.c,v 1.3 2003/05/15 17:56:18 mtm Exp $ */ #include #include #include "thr_private.h" +/* + * Static prototypes + */ +static void testcancel(void); + __weak_reference(_pthread_cancel, pthread_cancel); __weak_reference(_pthread_setcancelstate, pthread_setcancelstate); __weak_reference(_pthread_setcanceltype, pthread_setcanceltype); @@ -16,85 +21,102 @@ { int ret; - if ((ret = _find_thread(pthread)) != 0) { - /* NOTHING */ - } else if (pthread->state == PS_DEAD || pthread->state == PS_DEADLOCK + if ((ret = _find_thread(pthread)) != 0) + /* The thread is not on the list of active threads */ + goto out; + + _thread_critical_enter(pthread); + + if (pthread->state == PS_DEAD || pthread->state == PS_DEADLOCK || (pthread->flags & PTHREAD_EXITING) != 0) { + /* + * The thread is in the process of (or has already) exited + * or is deadlocked. + */ + _thread_critical_exit(pthread); ret = 0; - } else { - GIANT_LOCK(curthread); + goto out; + } + + /* + * The thread is on the active thread list and is not in the process + * of exiting. + */ + + if (((pthread->cancelflags & PTHREAD_CANCEL_DISABLE) != 0) || + (((pthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) && + ((pthread->cancelflags & PTHREAD_AT_CANCEL_POINT) == 0))) + /* Just mark it for cancellation: */ + pthread->cancelflags |= PTHREAD_CANCELLING; + else { + /* + * Check if we need to kick it back into the + * run queue: + */ + switch (pthread->state) { + case PS_RUNNING: + /* No need to resume: */ + pthread->cancelflags |= PTHREAD_CANCELLING; + break; - if (((pthread->cancelflags & PTHREAD_CANCEL_DISABLE) != 0) || - (((pthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) && - ((pthread->cancelflags & PTHREAD_AT_CANCEL_POINT) == 0))) - /* Just mark it for cancellation: */ + case PS_SLEEP_WAIT: + case PS_WAIT_WAIT: pthread->cancelflags |= PTHREAD_CANCELLING; - else { + PTHREAD_NEW_STATE(pthread, PS_RUNNING); + break; + + case PS_JOIN: /* - * Check if we need to kick it back into the - * run queue: + * Disconnect the thread from the joinee: */ - switch (pthread->state) { - case PS_RUNNING: - /* No need to resume: */ - pthread->cancelflags |= PTHREAD_CANCELLING; - break; + if (pthread->join_status.thread != NULL) { + pthread->join_status.thread->joiner + = NULL; + pthread->join_status.thread = NULL; + } + pthread->cancelflags |= PTHREAD_CANCELLING; + PTHREAD_NEW_STATE(pthread, PS_RUNNING); + break; - case PS_SLEEP_WAIT: - case PS_WAIT_WAIT: - pthread->cancelflags |= PTHREAD_CANCELLING; - PTHREAD_NEW_STATE(pthread, PS_RUNNING); - break; + case PS_MUTEX_WAIT: + case PS_COND_WAIT: + /* + * Threads in these states may be in queues. + * In order to preserve queue integrity, the + * cancelled thread must remove itself from the + * queue. When the thread resumes, it will + * remove itself from the queue and call the + * cancellation routine. + */ + pthread->cancelflags |= PTHREAD_CANCELLING; + PTHREAD_NEW_STATE(pthread, PS_RUNNING); + break; - case PS_JOIN: - /* - * Disconnect the thread from the joinee: - */ - if (pthread->join_status.thread != NULL) { - pthread->join_status.thread->joiner - = NULL; - pthread->join_status.thread = NULL; - } - pthread->cancelflags |= PTHREAD_CANCELLING; - PTHREAD_NEW_STATE(pthread, PS_RUNNING); - break; - - case PS_MUTEX_WAIT: - case PS_COND_WAIT: - /* - * Threads in these states may be in queues. - * In order to preserve queue integrity, the - * cancelled thread must remove itself from the - * queue. When the thread resumes, it will - * remove itself from the queue and call the - * cancellation routine. - */ - pthread->cancelflags |= PTHREAD_CANCELLING; - PTHREAD_NEW_STATE(pthread, PS_RUNNING); - break; - - case PS_DEAD: - case PS_DEADLOCK: - case PS_STATE_MAX: - /* Ignore - only here to silence -Wall: */ - break; - } + case PS_DEAD: + case PS_DEADLOCK: + case PS_STATE_MAX: + /* Ignore - only here to silence -Wall: */ + break; } + } - /* Unprotect the scheduling queues: */ - GIANT_UNLOCK(curthread); + /* Unprotect the scheduling queues: */ + _thread_critical_exit(pthread); - ret = 0; - } + ret = 0; +out: return (ret); } int _pthread_setcancelstate(int state, int *oldstate) { - int ostate; + int ostate, ret; + + ret = 0; + + _thread_critical_enter(curthread); - GIANT_LOCK(curthread); ostate = curthread->cancelflags & PTHREAD_CANCEL_DISABLE; switch (state) { @@ -102,23 +124,21 @@ if (oldstate != NULL) *oldstate = ostate; curthread->cancelflags &= ~PTHREAD_CANCEL_DISABLE; - if ((curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) + if ((curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) == 0) break; - GIANT_UNLOCK(curthread); - pthread_testcancel(); + testcancel(); break; case PTHREAD_CANCEL_DISABLE: if (oldstate != NULL) *oldstate = ostate; curthread->cancelflags |= PTHREAD_CANCEL_DISABLE; - GIANT_UNLOCK(curthread); break; default: - GIANT_UNLOCK(curthread); - return (EINVAL); + ret = EINVAL; } - return (0); + _thread_critical_exit(curthread); + return (ret); } int @@ -126,37 +146,43 @@ { int otype; - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); otype = curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS; switch (type) { case PTHREAD_CANCEL_ASYNCHRONOUS: if (oldtype != NULL) *oldtype = otype; curthread->cancelflags |= PTHREAD_CANCEL_ASYNCHRONOUS; - GIANT_UNLOCK(curthread); - pthread_testcancel(); + testcancel(); break; case PTHREAD_CANCEL_DEFERRED: if (oldtype != NULL) *oldtype = otype; curthread->cancelflags &= ~PTHREAD_CANCEL_ASYNCHRONOUS; - GIANT_UNLOCK(curthread); break; default: - GIANT_UNLOCK(curthread); return (EINVAL); } + _thread_critical_exit(curthread); return (0); } -/* - * XXXTHR Make an internal locked version. - */ void _pthread_testcancel(void) { - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); + testcancel(); + _thread_critical_exit(curthread); +} + +static void +testcancel() +{ + /* + * This pthread should already be locked by the caller. + */ + if (((curthread->cancelflags & PTHREAD_CANCEL_DISABLE) == 0) && ((curthread->cancelflags & PTHREAD_CANCELLING) != 0) && ((curthread->flags & PTHREAD_EXITING) == 0)) { @@ -166,30 +192,28 @@ * to be cancelled again. */ curthread->cancelflags &= ~PTHREAD_CANCELLING; - GIANT_UNLOCK(curthread); + _thread_critical_exit(curthread); _thread_exit_cleanup(); pthread_exit(PTHREAD_CANCELED); PANIC("cancel"); } - GIANT_UNLOCK(curthread); } void _thread_enter_cancellation_point(void) { - pthread_testcancel(); - - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); + testcancel(); curthread->cancelflags |= PTHREAD_AT_CANCEL_POINT; - GIANT_UNLOCK(curthread); + _thread_critical_exit(curthread); } void _thread_leave_cancellation_point(void) { - GIANT_LOCK(curthread); + _thread_critical_enter(curthread); curthread->cancelflags &= ~PTHREAD_AT_CANCEL_POINT; - GIANT_UNLOCK(curthread); + testcancel(); + _thread_critical_exit(curthread); - pthread_testcancel(); } ==== //depot/projects/hammer/lib/libthr/thread/thr_cond.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_cond.c,v 1.3 2003/04/02 03:05:39 jeff Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_cond.c,v 1.4 2003/05/15 18:17:13 mtm Exp $ */ #include #include @@ -43,6 +43,8 @@ static pthread_t cond_queue_deq(pthread_cond_t); static void cond_queue_remove(pthread_cond_t, pthread_t); static void cond_queue_enq(pthread_cond_t, pthread_t); +static int cond_wait_common(pthread_cond_t *, + pthread_mutex_t *, const struct timespec *); __weak_reference(_pthread_cond_init, pthread_cond_init); __weak_reference(_pthread_cond_destroy, pthread_cond_destroy); @@ -161,13 +163,8 @@ _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { int rval; - struct timespec abstime = { 0, 0 }; - /* - * XXXTHR This is a hack. Make a pthread_cond_common function that - * accepts NULL so we don't change posix semantics for timedwait. - */ - rval = pthread_cond_timedwait(cond, mutex, &abstime); + rval = cond_wait_common(cond, mutex, NULL); /* This should never happen. */ if (rval == ETIMEDOUT) @@ -180,7 +177,16 @@ _pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec * abstime) { - struct timespec *time; + if (abstime == NULL || abstime->tv_nsec >= 1000000000) + return (EINVAL); + + return (cond_wait_common(cond, mutex, abstime)); +} + +static int +cond_wait_common(pthread_cond_t * cond, pthread_mutex_t * mutex, + const struct timespec * abstime) +{ int rval = 0; int done = 0; int seqno; @@ -189,13 +195,6 @@ _thread_enter_cancellation_point(); - if (abstime == NULL || abstime->tv_nsec >= 1000000000) - return (EINVAL); - - if (abstime->tv_sec == 0 && abstime->tv_nsec == 0) - time = NULL; - else - time = abstime; /* * If the condition variable is statically initialized, perform dynamic * initialization. @@ -273,7 +272,7 @@ PTHREAD_SET_STATE(curthread, PS_COND_WAIT); GIANT_UNLOCK(curthread); - rval = _thread_suspend(curthread, time); + rval = _thread_suspend(curthread, (struct timespec *)abstime); if (rval == -1) { printf("foo"); fflush(stdout); ==== //depot/projects/hammer/release/alpha/dokern.sh#7 (text+ko) ==== @@ -1,12 +1,12 @@ #!/bin/sh # -# $FreeBSD: src/release/alpha/dokern.sh,v 1.69 2003/05/14 16:01:02 obrien Exp $ +# $FreeBSD: src/release/alpha/dokern.sh,v 1.70 2003/05/15 01:28:39 obrien Exp $ # # XXX sort by order in GENERIC, not alphabetical sed \ - -e 's/ident.*GENERIC/ident BOOTMFS/g' + -e 's/ident.*GENERIC/ident BOOTMFS/g' \ -e '/DEBUG/d' \ -e '/DEC_KN8AE/d' \ -e '/SOFTUPDATES/d' \ @@ -63,5 +63,8 @@ -e '/ sbp /d' \ -e '/ fwe /d' \ +# XXX: blank line above intentional so lines may be added below the last +# entry with ease. + echo "options SCSI_NO_OP_STRINGS" echo "options SCSI_NO_SENSE_STRINGS" ==== //depot/projects/hammer/release/scripts/doFS.sh#9 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/release/scripts/doFS.sh,v 1.50 2003/05/09 09:41:18 scottl Exp $ +# $FreeBSD: src/release/scripts/doFS.sh,v 1.51 2003/05/16 13:59:12 ru Exp $ # set -ex @@ -63,7 +63,7 @@ trap "umount ${MNT}; vnconfig -u /dev/r${VNDEVICE}; rm -f /dev/*vnn*" EXIT disklabel -w ${BOOT} ${VNDEVICE} ${FSLABEL} - newfs -O1 -i ${FSINODE} -o space -m 0 /dev/r${VNDEVICE}c + newfs -i ${FSINODE} -o space -m 0 /dev/r${VNDEVICE}c mount /dev/${VNDEVICE}c ${MNT} ==== //depot/projects/hammer/sbin/devd/parse.y#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/devd/parse.y,v 1.2 2002/12/07 08:04:36 imp Exp $ + * $FreeBSD: src/sbin/devd/parse.y,v 1.3 2003/05/15 02:23:32 imp Exp $ */ #include "devd.h" @@ -100,16 +100,19 @@ attach_block : ATTACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON { add_attach($2, $4); } + | ATTACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON ; detach_block : DETACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON { add_detach($2, $4); } + | DETACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON ; nomatch_block : NOMATCH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON { add_nomatch($2, $4); } + | NOMATCH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON ; match_or_action_list ==== //depot/projects/hammer/share/man/man4/kame.4#2 (text+ko) ==== @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" $Id: kame.4,v 1.4 1999/10/07 04:01:15 itojun Exp $ -.\" $FreeBSD: src/share/man/man4/kame.4,v 1.11 2002/07/09 20:37:18 blackend Exp $ +.\" $FreeBSD: src/share/man/man4/kame.4,v 1.12 2003/05/16 00:31:12 hmp Exp $ .\" .Dd April 13, 1999 .Dt KAME 4 @@ -67,7 +67,6 @@ .\" .Ss Plug and Play and protocol stack/interface configuration .Xr ndp 8 , -.Xr prefix 8 , .Xr rrenumd 8 , .Xr rtadvd 8 , .Xr rtsol 8 , @@ -81,8 +80,8 @@ .Xr mchat 1 .Pq - , .Xr ifmcstat 8 , -.Xr pim6dd 8 , -.Xr pim6sd 8 , +.Xr pim6dd 8 [ /usr/ports/net/pim6dd ] , +.Xr pim6sd 8 [ /usr/ports/net/pim6sd ] , .Xr pim6stat 8 . .\" .Ss Transition Tools @@ -96,12 +95,8 @@ .Fx . .\" .Ss IPsec and tunnelling -.Xr gifconfig 8 , .Xr ipsec 4 , -.\" (dtcp and racoon doesn't exist yet.) -.\" .Xr dtcpc 8 , -.\" .Xr dtcps 8 , -.\" .Xr racoon 8 , +.Xr racoon 8 [ /usr/ports/security/racoon ] , .Xr setkey 8 . .Pp Dozen of existing tools are modified for IPsec support, like @@ -123,6 +118,7 @@ modified for IPv4/v6 support, or IPv6-only .Xr inet6d 8 +.Pq - is supplied. .Pp Dozen of existing daemons are modified for IPv6/IPsec support, like ==== //depot/projects/hammer/share/man/man9/Makefile#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/man/man9/Makefile,v 1.188 2003/05/09 09:12:10 hmp Exp $ +# $FreeBSD: src/share/man/man9/Makefile,v 1.190 2003/05/16 19:22:27 hmp Exp $ MAN= BUF_LOCK.9 BUF_LOCKFREE.9 BUF_LOCKINIT.9 BUF_REFCNT.9 \ BUF_TIMELOCK.9 BUF_UNLOCK.9 BUS_PRINT_CHILD.9 BUS_READ_IVAR.9 \ @@ -6,7 +6,7 @@ DECLARE_MODULE.9 DELAY.9 DEVICE_ATTACH.9 DEVICE_DETACH.9 \ DEVICE_IDENTIFY.9 DEVICE_PROBE.9 DEVICE_SHUTDOWN.9 \ DEV_MODULE.9 DRIVER_MODULE.9 \ - KASSERT.9 \ + CTASSERT.9 KASSERT.9 \ MD5.9 MODULE_DEPEND.9 MODULE_VERSION.9 \ SYSCALL_MODULE.9 \ VFS.9 VFS_CHECKEXP.9 VFS_FHTOVP.9 VFS_INIT.9 VFS_MOUNT.9 \ @@ -60,6 +60,7 @@ physio.9 printf.9 pseudofs.9 psignal.9 \ random.9 resettodr.9 resource_int_value.9 resource_query_string.9 \ rtalloc.9 rtentry.9 runqueue.9 random_harvest.9 rijndael.9 \ + rman.9 \ sbuf.9 scheduler.9 selrecord.9 sema.9 signal.9 sleep.9 sleepqueue.9 \ spl.9 store.9 style.9 suser.9 swi.9 sx.9 \ sysctl_add_oid.9 sysctl_ctx_init.9 \ ==== //depot/projects/hammer/share/man/man9/VFS_SET.9#3 (text+ko) ==== @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD: src/share/man/man9/VFS_SET.9,v 1.4 2002/12/12 17:25:58 ru Exp $ +.\" $FreeBSD: src/share/man/man9/VFS_SET.9,v 1.5 2003/05/16 15:21:20 hmp Exp $ .\" .Dd December 2, 2001 .Dt VFS_SET 9 @@ -53,6 +53,24 @@ using .Fn vfs_modevent as the event handler. +.Pp +Possible values for the +.Fa flags +argument are documented below: +.Bl -hang -width VFCF_SYNTHETIC +.It Dv VFCF_STATIC +File system should be statically available in the kernel. +.It Dv VFCF_NETWORK +Network exportable file system. +.It Dv VFCF_READONLY +Does not support write operations. +.It Dv VFCF_SYNTHETIC +Pseudo file system, data does not represent on-disk files. +.It Dv VFCF_LOOPBACK +Loopback file system layer. +.It Dv VFCF_UNICODE +File names are stored as Unicode. +.El .Sh PSEUDO CODE .Bd -literal /* ==== //depot/projects/hammer/share/man/man9/sleep.9#3 (text+ko) ==== @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man9/sleep.9,v 1.39 2003/02/24 22:53:24 ru Exp $ +.\" $FreeBSD: src/share/man/man9/sleep.9,v 1.40 2003/05/16 15:52:32 jhb Exp $ .\" .Dd December 17, 1998 .Os @@ -117,7 +117,7 @@ function is a variation on tsleep. The parameter .Ar mtx -is a mutex, which will be exited before sleeping, and entered before +is a mutex which will be released before sleeping and reacquired before .Fn msleep returns. If @@ -126,7 +126,7 @@ .Dv PDROP flag, the .Ar mtx -parameter will not be entered before returning. +parameter will not be reacquired before returning. The mutex is used to ensure that a condition can be checked atomically, and that the current process can be suspended without missing a @@ -151,9 +151,9 @@ The .Fn sleep function used to be the traditional form. -It does not let you specify a timeout or a +It did not let you specify a timeout or a .Ar wmesg , -hence it has been discontinued. +hence it was discontinued. .Sh AUTHORS .An -nosplit This man page was written by ==== //depot/projects/hammer/share/syscons/keymaps/INDEX.keymaps#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/INDEX.keymaps,v 1.46 2003/05/05 06:06:55 murray Exp $ +# $FreeBSD: src/share/syscons/keymaps/INDEX.keymaps,v 1.47 2003/05/16 03:46:53 murray Exp $ # # database for kbdmap(8) # @@ -128,6 +128,11 @@ fr.iso.acc.kbd:es:Francés ISO-8859-1 (con acentos) fr.iso.acc.kbd:uk:æÒÁÎÃÕÚØËÁ ISO-8859-1 (accent keys) +fr.dvorak.kbd:en:French Dvorak-like +fr.dvorak.kbd:de:Französisch Dvorak +fr.dvorak.kbd:es:Francés Dvorak +fr.dvorak.kbd:uk:French Dvorak-like + fr_CA.iso.acc.kbd:en:French Canadian ISO-8859-1 (accent keys) fr_CA.iso.acc.kbd:de:Französisch Kanada ISO-8859-1 (mit Akzenten) fr_CA.iso.acc.kbd:es:Francocanadiense ISO-8859-1 (con acentos) ==== //depot/projects/hammer/share/syscons/keymaps/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/Makefile,v 1.59 2003/05/05 06:06:55 murray Exp $ +# $FreeBSD: src/share/syscons/keymaps/Makefile,v 1.60 2003/05/16 03:46:53 murray Exp $ KEYMAPS= INDEX.keymaps KEYMAPS+= be.iso.kbd be.iso.acc.kbd @@ -11,7 +11,7 @@ KEYMAPS+= el.iso07.kbd KEYMAPS+= estonian.iso.kbd estonian.iso15.kbd estonian.cp850.kbd KEYMAPS+= finnish.iso.kbd finnish.cp850.kbd -KEYMAPS+= fr.iso.kbd fr.iso.acc.kbd +KEYMAPS+= fr.iso.kbd fr.iso.acc.kbd fr.dvorak.kbd KEYMAPS+= fr_CA.iso.acc.kbd KEYMAPS+= german.iso.kbd german.cp850.kbd KEYMAPS+= gr.elot.acc.kbd gr.us101.acc.kbd ==== //depot/projects/hammer/share/syscons/keymaps/be.iso.kbd#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/be.iso.kbd,v 1.11 2001/03/11 23:41:18 ache Exp $ +# $FreeBSD: src/share/syscons/keymaps/be.iso.kbd,v 1.12 2003/05/16 03:37:52 murray Exp $ # alt # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state @@ -42,7 +42,7 @@ 036 'j' 'J' nl nl 'j' 'J' nl nl C 037 'k' 'K' vt vt 'k' 'K' vt vt C 038 'l' 'L' ff ff 'l' 'L' ff ff C - 039 'm' 'M' cr cr 'm' 'M' cr cr O + 039 'm' 'M' cr cr 'm' 'M' cr cr C 040 249 '%' nop nop ''' ''' nop nop O 041 178 179 nop nop 178 179 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O @@ -53,7 +53,7 @@ 047 'v' 'V' syn syn 'v' 'V' syn syn C 048 'b' 'B' stx stx 'b' 'B' stx stx C 049 'n' 'N' so so 'n' 'N' so so C - 050 ',' '?' nop nop ',' '?' nop nop C + 050 ',' '?' nop nop ',' '?' nop nop O 051 ';' '.' nop nop ';' '.' nop nop O 052 ':' '/' nop nop ':' '/' nop nop O 053 '=' '+' nop nop '~' '~' nop nop O ==== //depot/projects/hammer/share/syscons/keymaps/norwegian.dvorak.kbd#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/syscons/keymaps/norwegian.dvorak.kbd,v 1.1 2003/05/05 06:06:55 murray Exp $ +# $FreeBSD: src/share/syscons/keymaps/norwegian.dvorak.kbd,v 1.2 2003/05/16 03:34:23 murray Exp $ # alt # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state @@ -11,10 +11,10 @@ 005 '4' 164 nop nop '$' 164 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' rs rs '6' '&' nop nop O - 008 '7' '/' nop nop '7' '/' nop nop O - 009 '8' '(' nop nop '8' '(' esc esc O - 010 '9' ')' nop nop '9' ')' gs gs O - 011 '0' '=' nop nop '0' '=' nop nop O + 008 '7' '/' nop nop '{' '/' nop nop O + 009 '8' '(' nop nop '[' '(' esc esc O + 010 '9' ')' nop nop ']' ')' gs gs O + 011 '0' '=' nop nop '}' '=' nop nop O 012 '+' '?' esc esc '[' '?' nop nop O 013 '\' '`' nop nop ''' nop nop nop O 014 bs bs del del bs bs del del O @@ -46,7 +46,7 @@ 040 '-' '_' us us '-' '_' us us O 041 '|' 167 nop nop 166 182 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 248 216 nop nop '|' '\' nop nop C + 043 '<' '>' nop nop '|' '\' nop nop C 044 230 198 nop nop '{' '[' nop nop C 045 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C 046 'j' 'J' nl nl 'j' 'J' nl nl C ==== //depot/projects/hammer/sys/boot/forth/loader.conf#5 (text+ko) ==== @@ -6,7 +6,7 @@ # # All arguments must be in double quotes. # -# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.70 2003/03/11 12:09:25 ru Exp $ +# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.71 2003/05/16 04:31:00 murray Exp $ ############################################################## ### Basic configuration options ############################ @@ -179,6 +179,7 @@ miibus_load="NO" # miibus support, needed for some drivers if_an_load="NO" # Aironet 4500/4800 802.11 wireless NICs if_ar_load="NO" # Digi SYNC/570i +if_awi_load="NO" # AMD PCnetMobile IEEE 802.11 wireless NICs if_bge_load="NO" # Broadcom BCM570x PCI gigabit ethernet if_cm_load="NO" # SMC (90c26, 90c56, 90c66) if_dc_load="NO" # DEC/Intel 21143 and various workalikes @@ -186,12 +187,16 @@ if_ed_load="NO" # National Semiconductor DS8390/WD83C690 ethernet if_el_load="NO" # 3Com Etherlink 3C501 if_em_load="NO" # Intel(R) PRO/1000 gigabit ethernet +if_en_load="NO" # Midway-based ATM interfaces if_ep_load="NO" # 3Com Etherlink III (3c5x9) +if_ex_load="NO" # Intel EtherExpress Pro/10 ethernet if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet adapters if_fxp_load="NO" # Intel EtherExpress PRO/100B (82557, 82558) if_gx_load="NO" # Intel Pro/1000 gigabit ethernet +if_ie_load="NO" # Intel 82586 if_lge_load="NO" # Level 1 LXT1001 NetCellerator PCI gigabit ethernet if_lnc_load="NO" # AMD Lance/PCnet Ethernet +if_my_load="NO" # Myson PCI fast ethernet if_nge_load="NO" # National Semiconductor PCI gigabit ethernet if_oltr_load="NO" # Olicom if_pcn_load="NO" # AMD PCnet PCI @@ -287,6 +292,7 @@ umodem_load="NO" # Modems uscanner_load="NO" # Scanners if_aue_load="NO" # ADMtek USB ethernet +if_axe_load="NO" # ASIX Electronics AX88172 USB ethernet if_cue_load="NO" # CATC USB ethernet if_kue_load="NO" # Kawasaki LSI USB ethernet ==== //depot/projects/hammer/sys/cam/scsi/scsi_da.c#14 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.142 2003/05/03 00:21:40 ken Exp $ + * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.143 2003/05/15 17:35:35 njl Exp $ */ #ifdef _KERNEL @@ -499,6 +499,14 @@ */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "MITSUMI", "USB FDD", "*"}, /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE + }, + { + /* + * OTi USB Flash Key + * PR: kern/51825 + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "OTi", "Flash Disk", "*"}, + /*quirks*/ DA_Q_NO_6_BYTE } }; ==== //depot/projects/hammer/sys/conf/NOTES#17 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1148 2003/05/05 21:21:31 phk Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1149 2003/05/15 02:10:29 jmallett Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -208,10 +208,19 @@ # # Implement system calls compatible with 4.3BSD and older versions of # FreeBSD. You probably do NOT want to remove this as much current code -# still relies on the 4.3 emulation. +# still relies on the 4.3 emulation. Note that some architectures that +# are supported by FreeBSD do not include support for certain important +# aspects of this compatibility option, namely those related to the +# signal delivery mechanism. # options COMPAT_43 +# +# Be compatible with SunOS. The COMPAT_43 option above pulls in most +# (all?) of the changes that this option turns on. +# +options COMPAT_SUNOS + # Enable FreeBSD4 compatibility syscalls options COMPAT_FREEBSD4 ==== //depot/projects/hammer/sys/conf/files.amd64#14 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.14 2003/05/14 04:10:49 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.15 2003/05/16 02:27:17 obrien Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -16,7 +16,7 @@ # ia32_assym.h optional ia32 \ dependency "$S/kern/genassym.sh ia32_genassym.o" \ - compile-with "sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \ + compile-with "env NM=${NM} sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "ia32_assym.h" # ==== //depot/projects/hammer/sys/conf/ldscript.ia64#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/conf/ldscript.ia64,v 1.8 2002/12/05 18:35:44 obrien Exp $ */ +/* $FreeBSD: src/sys/conf/ldscript.ia64,v 1.9 2003/05/16 06:03:45 marcel Exp $ */ OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", "elf64-ia64-little") OUTPUT_ARCH(ia64) ENTRY(__start) @@ -8,107 +8,115 @@ { /* Read-only sections, merged into text segment: */ . = kernel_text + SIZEOF_HEADERS; - - .text : + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rela.init : { *(.rela.init) } >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri May 16 18:51:25 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5241737B404; Fri, 16 May 2003 18:51:24 -0700 (PDT) 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 0590537B401 for ; Fri, 16 May 2003 18:51:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7E6343F75 for ; Fri, 16 May 2003 18:51:22 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4H1pM0U004590 for ; Fri, 16 May 2003 18:51:22 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4H1pLdP004587 for perforce@freebsd.org; Fri, 16 May 2003 18:51:21 -0700 (PDT) Date: Fri, 16 May 2003 18:51:21 -0700 (PDT) Message-Id: <200305170151.h4H1pLdP004587@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31364 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2003 01:51:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=31364 Change 31364 by marcel@marcel_nfs on 2003/05/16 18:50:42 IFC @31361 Affected files ... .. //depot/projects/ia64/bin/chflags/chflags.1#3 integrate .. //depot/projects/ia64/bin/pwd/pwd.1#7 integrate .. //depot/projects/ia64/bin/sh/sh.1#22 integrate .. //depot/projects/ia64/games/caesar/caesar.6#3 integrate .. //depot/projects/ia64/games/grdc/grdc.6#4 integrate .. //depot/projects/ia64/lib/libc/ia64/sys/brk.S#5 integrate .. //depot/projects/ia64/lib/libc/ia64/sys/pipe.S#3 integrate .. //depot/projects/ia64/lib/libc/ia64/sys/sbrk.S#6 integrate .. //depot/projects/ia64/lib/libkvm/kvm_ia64.c#3 integrate .. //depot/projects/ia64/lib/libpthread/sys/lock.c#3 integrate .. //depot/projects/ia64/lib/libpthread/sys/lock.h#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_cond.c#7 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_exit.c#4 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_init.c#9 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_join.c#4 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#15 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_mutex.c#4 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_nanosleep.c#4 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_private.h#12 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sig.c#8 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sigsuspend.c#4 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sigwait.c#5 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_yield.c#4 integrate .. //depot/projects/ia64/libexec/ftpd/ftpd.8#12 integrate .. //depot/projects/ia64/libexec/rtld-elf/rtld.1#7 integrate .. //depot/projects/ia64/release/scripts/doFS.sh#16 integrate .. //depot/projects/ia64/sbin/sysctl/sysctl.8#8 integrate .. //depot/projects/ia64/share/man/man9/CTASSERT.9#1 branch .. //depot/projects/ia64/share/man/man9/KASSERT.9#3 integrate .. //depot/projects/ia64/share/man/man9/Makefile#22 integrate .. //depot/projects/ia64/share/man/man9/VFS_SET.9#4 integrate .. //depot/projects/ia64/share/man/man9/byteorder.9#4 integrate .. //depot/projects/ia64/share/man/man9/mbuf.9#9 integrate .. //depot/projects/ia64/share/man/man9/rman.9#1 branch .. //depot/projects/ia64/share/man/man9/sleep.9#7 integrate .. //depot/projects/ia64/sys/boot/i386/libi386/amd64_tramp.S#2 integrate .. //depot/projects/ia64/sys/conf/Makefile.ia64#18 integrate .. //depot/projects/ia64/sys/conf/files.ia64#40 integrate .. //depot/projects/ia64/sys/conf/options.ia64#13 integrate .. //depot/projects/ia64/sys/dev/md/md.c#28 integrate .. //depot/projects/ia64/sys/ia64/ia32/ia32_sysvec.c#6 integrate .. //depot/projects/ia64/sys/ia64/ia32/ia32_util.h#5 integrate .. //depot/projects/ia64/sys/ia64/ia64/db_interface.c#10 integrate .. //depot/projects/ia64/sys/ia64/ia64/db_trace.c#10 integrate .. //depot/projects/ia64/sys/ia64/ia64/elf_machdep.c#10 integrate .. //depot/projects/ia64/sys/ia64/ia64/exception.s#21 integrate .. //depot/projects/ia64/sys/ia64/ia64/genassym.c#12 integrate .. //depot/projects/ia64/sys/ia64/ia64/interrupt.c#28 integrate .. //depot/projects/ia64/sys/ia64/ia64/locore.s#15 integrate .. //depot/projects/ia64/sys/ia64/ia64/machdep.c#68 integrate .. //depot/projects/ia64/sys/ia64/ia64/mp_machdep.c#32 integrate .. //depot/projects/ia64/sys/ia64/ia64/pmap.c#61 integrate .. //depot/projects/ia64/sys/ia64/ia64/support.s#7 integrate .. //depot/projects/ia64/sys/ia64/ia64/trap.c#50 integrate .. //depot/projects/ia64/sys/ia64/ia64/unaligned.c#2 integrate .. //depot/projects/ia64/sys/ia64/ia64/unwind.c#6 integrate .. //depot/projects/ia64/sys/ia64/ia64/vm_machdep.c#23 integrate .. //depot/projects/ia64/sys/ia64/include/asm.h#9 integrate .. //depot/projects/ia64/sys/ia64/include/cpu.h#12 integrate .. //depot/projects/ia64/sys/ia64/include/db_machdep.h#6 integrate .. //depot/projects/ia64/sys/ia64/include/frame.h#4 integrate .. //depot/projects/ia64/sys/ia64/include/pcb.h#8 integrate .. //depot/projects/ia64/sys/ia64/include/proc.h#5 integrate .. //depot/projects/ia64/sys/ia64/include/reg.h#9 integrate .. //depot/projects/ia64/sys/ia64/include/signal.h#7 integrate .. //depot/projects/ia64/sys/ia64/include/smp.h#4 integrate .. //depot/projects/ia64/sys/ia64/include/ucontext.h#2 integrate .. //depot/projects/ia64/sys/ia64/include/unwind.h#3 integrate .. //depot/projects/ia64/sys/ia64/include/vmparam.h#8 integrate .. //depot/projects/ia64/sys/kern/kern_synch.c#36 integrate .. //depot/projects/ia64/sys/kern/kern_thr.c#6 integrate .. //depot/projects/ia64/sys/kern/kern_thread.c#45 integrate .. //depot/projects/ia64/sys/kern/vfs_subr.c#48 integrate .. //depot/projects/ia64/sys/sys/proc.h#65 integrate .. //depot/projects/ia64/tools/tools/tinderbox/Makefile#4 integrate .. //depot/projects/ia64/tools/tools/tinderbox/tbmaster.1#1 branch .. //depot/projects/ia64/tools/tools/tinderbox/tbmaster.pl#9 integrate .. //depot/projects/ia64/tools/tools/tinderbox/tinderbox.1#1 branch .. //depot/projects/ia64/tools/tools/tinderbox/tinderbox.pl#8 integrate .. //depot/projects/ia64/usr.bin/truss/ia64-fbsd.c#3 integrate Differences ... ==== //depot/projects/ia64/bin/chflags/chflags.1#3 (text+ko) ==== @@ -33,9 +33,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95 -.\" $FreeBSD: src/bin/chflags/chflags.1,v 1.16 2003/03/24 20:15:58 johan Exp $ +.\" $FreeBSD: src/bin/chflags/chflags.1,v 1.17 2003/05/16 21:18:01 ru Exp $ .\" -.Dd Mar 24, 2003 +.Dd March 24, 2003 .Dt CHFLAGS 1 .Os .Sh NAME ==== //depot/projects/ia64/bin/pwd/pwd.1#7 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)pwd.1 8.2 (Berkeley) 4/28/95 -.\" $FreeBSD: src/bin/pwd/pwd.1,v 1.21 2003/04/12 03:22:54 tjr Exp $ +.\" $FreeBSD: src/bin/pwd/pwd.1,v 1.22 2003/05/16 21:19:32 ru Exp $ .\" .Dd April 12, 2003 .Dt PWD 1 @@ -43,7 +43,7 @@ .Nd return working directory name .Sh SYNOPSIS .Nm -.Oo Fl L | Fl P Oc +.Op Fl L | P .Sh DESCRIPTION The .Nm ==== //depot/projects/ia64/bin/sh/sh.1#22 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 -.\" $FreeBSD: src/bin/sh/sh.1,v 1.86 2003/04/30 19:18:50 schweikh Exp $ +.\" $FreeBSD: src/bin/sh/sh.1,v 1.87 2003/05/16 21:19:32 ru Exp $ .\" .Dd April 12, 2003 .Dt SH 1 @@ -1295,7 +1295,7 @@ List or alter key bindings for the line editor. This command is documented in .Xr editrc 5 . -.It Ic cd Oo Fl L | Fl P Oc Op Ar directory +.It Ic cd Oo Fl L | P Oc Op Ar directory Switch to the specified .Ar directory , or to the directory specified in the @@ -1626,7 +1626,7 @@ If the .Fl s option is specified, only the PIDs of the jobs are printed, one per line. -.It Ic pwd Oo Fl L | Fl P Oc +.It Ic pwd Op Fl L | P Print the path of the current directory. The built-in command may differ from the program of the same name because the built-in command remembers what the current directory ==== //depot/projects/ia64/games/caesar/caesar.6#3 (text+ko) ==== @@ -30,13 +30,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)caesar.6 8.2 (Berkeley) 11/16/93 -.\" $FreeBSD: src/games/caesar/caesar.6,v 1.8 2003/03/24 11:18:30 tjr Exp $ +.\" $FreeBSD: src/games/caesar/caesar.6,v 1.9 2003/05/16 21:26:39 ru Exp $ .\" .Dd November 16, 1993 .Dt CAESAR 6 .Os .Sh NAME -.Nm caesar +.Nm caesar , rot13 .Nd decrypt caesar ciphers .Sh SYNOPSIS .Nm ==== //depot/projects/ia64/games/grdc/grdc.6#4 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/games/grdc/grdc.6,v 1.5 2003/03/28 16:37:45 mux Exp $ +.\" $FreeBSD: src/games/grdc/grdc.6,v 1.6 2003/05/16 21:27:23 ru Exp $ .Dd September 25, 2001 .Dt GRDC 6 .Os @@ -7,8 +7,7 @@ .Nd grand digital clock (curses) .Sh SYNOPSIS .Nm -.Op Fl s -.Op Fl t +.Op Fl st .Op Ar n .Sh DESCRIPTION .Nm ==== //depot/projects/ia64/lib/libc/ia64/sys/brk.S#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/brk.S,v 1.3 2003/03/03 01:09:46 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/brk.S,v 1.4 2003/05/16 21:26:39 marcel Exp $"); #include "SYS.h" @@ -44,12 +44,14 @@ add r14=@ltoff(minbrk),gp ;; ld8 r14=[r14] ;; ld8 r14=[r14] ;; - cmp.ltu p6,p0=in0,r14 ;; -(p6) mov in0=r14 + cmp.ltu p6,p0=r32,r14 ;; +(p6) mov r32=r14 ;; + st8 [sp]=r32 CALLSYS_ERROR(break) + ld8 r15=[sp] add r14=@ltoff(curbrk),gp ;; ld8 r14=[r14] ;; - st8 [r14]=in0 + st8 [r14]=r15 mov ret0=0 br.ret.sptk.few rp END(brk) ==== //depot/projects/ia64/lib/libc/ia64/sys/pipe.S#3 (text+ko) ==== @@ -28,14 +28,20 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/pipe.S,v 1.3 2003/03/03 01:09:46 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/pipe.S,v 1.4 2003/05/16 21:26:39 marcel Exp $"); #include "SYS.h" -SYSCALL(pipe) - .regstk 1,0,0,0 - st4 [in0]=ret0,4 ;; - st4 [in0]=ret1 - mov ret0=0 +ENTRY(__sys_pipe, 1) + WEAK_ALIAS(pipe, __sys_pipe) + WEAK_ALIAS(_pipe, __sys_pipe) + st8 [sp]=r32 + CALLSYS_ERROR(pipe) + ld8 r14=[sp] + ;; + st4 [r14]=ret0,4 + ;; + st4 [r14]=ret1 + mov ret0=0 br.ret.sptk.few rp -END(pipe) +END(__sys_pipe) ==== //depot/projects/ia64/lib/libc/ia64/sys/sbrk.S#6 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/sbrk.S,v 1.4 2003/03/03 01:09:46 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/sbrk.S,v 1.5 2003/05/16 21:26:39 marcel Exp $"); #include "SYS.h" @@ -43,18 +43,21 @@ add r14 = @ltoff(curbrk), gp ;; ld8 r14 = [r14] - cmp.eq p6, p0 = in0, r0 + cmp.eq p6, p0 = r32, r0 ;; ld8 ret0 = [r14] (p6) br.ret.sptk.few rp ;; - add in0 = ret0, in0 + add r32 = ret0, r32 + ;; + st8 [sp] = r32 CALLSYS_ERROR(break) + ld8 r15 = [sp] add r14 = @ltoff(curbrk), gp ;; ld8 r14 = [r14] ;; ld8 ret0 = [r14] - st8 [r14] = in0 + st8 [r14] = r15 br.ret.sptk.few rp END(sbrk) ==== //depot/projects/ia64/lib/libkvm/kvm_ia64.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/lib/libkvm/kvm_ia64.c,v 1.3 2002/10/21 04:21:12 marcel Exp $ */ +/* $FreeBSD: src/lib/libkvm/kvm_ia64.c,v 1.4 2003/05/16 21:26:40 marcel Exp $ */ /* $NetBSD: kvm_alpha.c,v 1.7.2.1 1997/11/02 20:34:26 mellon Exp $ */ /* @@ -148,7 +148,7 @@ * addresses/values. */ - nlist[0].n_name = "kptdir"; + nlist[0].n_name = "ia64_kptdir"; nlist[1].n_name = 0; if (kvm_nlist(kd, nlist) != 0) { ==== //depot/projects/ia64/lib/libpthread/sys/lock.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/sys/lock.c,v 1.3 2003/05/04 22:29:09 deischen Exp $ + * $FreeBSD: src/lib/libpthread/sys/lock.c,v 1.4 2003/05/16 19:58:29 deischen Exp $ */ #include @@ -65,7 +65,7 @@ lck->l_head->lr_watcher = NULL; lck->l_head->lr_owner = NULL; lck->l_head->lr_waiting = 0; - lck->l_head->lr_handshake = 0; + lck->l_head->lr_active = 1; lck->l_tail = lck->l_head; } return (0); @@ -85,7 +85,7 @@ lu->lu_myreq->lr_watcher = NULL; lu->lu_myreq->lr_owner = lu; lu->lu_myreq->lr_waiting = 0; - lu->lu_myreq->lr_handshake = 0; + lu->lu_myreq->lr_active = 0; lu->lu_watchreq = NULL; lu->lu_priority = 0; lu->lu_private = priv; @@ -166,19 +166,16 @@ for (i = 0; i < MAX_SPINS; i++) { if (lu->lu_watchreq->lr_locked == 0) return; + if (lu->lu_watchreq->lr_active == 0) + break; } atomic_store_rel_long(&lu->lu_watchreq->lr_waiting, 1); while (lu->lu_watchreq->lr_locked != 0) lck->l_wait(lck, lu); atomic_store_rel_long(&lu->lu_watchreq->lr_waiting, 0); - /* - * Wait for original owner to stop accessing the - * lockreq object. - */ - while (lu->lu_watchreq->lr_handshake) - ; } } + lu->lu_myreq->lr_active = 1; } /* @@ -240,24 +237,21 @@ } } if (lu_h != NULL) { - lu_h->lu_watchreq->lr_handshake = 1; /* Give the lock to the highest priority user. */ - atomic_store_rel_long(&lu_h->lu_watchreq->lr_locked, 0); if ((lu_h->lu_watchreq->lr_waiting != 0) && (lck->l_wakeup != NULL)) /* Notify the sleeper */ lck->l_wakeup(lck, lu_h->lu_myreq->lr_watcher); - atomic_store_rel_long(&lu_h->lu_watchreq->lr_handshake, - 0); + else + atomic_store_rel_long(&lu_h->lu_watchreq->lr_locked, 0); } else { - myreq->lr_handshake = 1; - /* Give the lock to the previous request. */ - atomic_store_rel_long(&myreq->lr_locked, 0); if ((myreq->lr_waiting != 0) && (lck->l_wakeup != NULL)) /* Notify the sleeper */ lck->l_wakeup(lck, myreq->lr_watcher); - atomic_store_rel_long(&myreq->lr_handshake, 0); + else + /* Give the lock to the previous request. */ + atomic_store_rel_long(&myreq->lr_locked, 0); } } else { /* @@ -270,19 +264,25 @@ lu->lu_watchreq = NULL; lu->lu_myreq->lr_locked = 1; lu->lu_myreq->lr_waiting = 0; - if (lck->l_wakeup) { - /* Start wakeup */ - myreq->lr_handshake = 1; + if (myreq->lr_waiting != 0 && lck->l_wakeup) + /* Notify the sleeper */ + lck->l_wakeup(lck, myreq->lr_watcher); + else /* Give the lock to the previous request. */ atomic_store_rel_long(&myreq->lr_locked, 0); - if (myreq->lr_waiting != 0) { - /* Notify the sleeper */ - lck->l_wakeup(lck, myreq->lr_watcher); - } - /* Stop wakeup */ - atomic_store_rel_long(&myreq->lr_handshake, 0); - } else { - atomic_store_rel_long(&myreq->lr_locked, 0); - } } + lu->lu_myreq->lr_active = 0; +} + +void +_lock_grant(struct lock *lck /* unused */, struct lockuser *lu) +{ + atomic_store_rel_long(&lu->lu_watchreq->lr_locked, 0); } + +void +_lockuser_setactive(struct lockuser *lu, int active) +{ + lu->lu_myreq->lr_active = active; +} + ==== //depot/projects/ia64/lib/libpthread/sys/lock.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/sys/lock.h,v 1.3 2003/05/04 22:29:09 deischen Exp $ + * $FreeBSD: src/lib/libpthread/sys/lock.h,v 1.4 2003/05/16 19:58:29 deischen Exp $ */ #ifndef _LOCK_H_ @@ -55,7 +55,7 @@ struct lockuser *lr_watcher; /* only used for priority locks */ struct lockuser *lr_owner; /* only used for priority locks */ long lr_waiting; /* non-zero when wakeup needed */ - volatile long lr_handshake; /* non-zero when wakeup in progress */ + volatile int lr_active; /* non-zero if the lock is last lock for thread */ }; struct lockuser { @@ -72,6 +72,7 @@ #define _LCK_REQUEST_INITIALIZER { 0, NULL, NULL, 0 } #define _LCK_BUSY(lu) ((lu)->lu_watchreq->lr_locked != 0) +#define _LCK_ACTIVE(lu) ((lu)->lu_watchreq->lr_active != 0) #define _LCK_GRANTED(lu) ((lu)->lu_watchreq->lr_locked == 0) #define _LCK_SET_PRIVATE(lu, p) (lu)->lu_private = (void *)(p) @@ -84,7 +85,9 @@ lock_handler_t *, lock_handler_t *); int _lockuser_init(struct lockuser *lu, void *priv); void _lockuser_destroy(struct lockuser *lu); +void _lockuser_setactive(struct lockuser *lu, int active); void _lock_acquire(struct lock *, struct lockuser *, int); void _lock_release(struct lock *, struct lockuser *); +void _lock_grant(struct lock *, struct lockuser *); #endif ==== //depot/projects/ia64/lib/libpthread/thread/thr_cond.c#7 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_cond.c,v 1.39 2003/05/02 11:39:00 davidxu Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_cond.c,v 1.40 2003/05/16 19:58:29 deischen Exp $ */ #include #include @@ -267,11 +267,12 @@ * lock); we should be able to safely * set the state. */ - THR_LOCK_SWITCH(curthread); + THR_SCHED_LOCK(curthread, curthread); THR_SET_STATE(curthread, PS_COND_WAIT); /* Remember the CV: */ curthread->data.cond = *cond; + THR_SCHED_UNLOCK(curthread, curthread); /* Unlock the CV structure: */ THR_LOCK_RELEASE(curthread, @@ -281,7 +282,6 @@ _thr_sched_switch(curthread); curthread->data.cond = NULL; - THR_UNLOCK_SWITCH(curthread); /* * XXX - This really isn't a good check @@ -479,11 +479,12 @@ * lock); we should be able to safely * set the state. */ - THR_LOCK_SWITCH(curthread); + THR_SCHED_LOCK(curthread, curthread); THR_SET_STATE(curthread, PS_COND_WAIT); /* Remember the CV: */ curthread->data.cond = *cond; + THR_SCHED_UNLOCK(curthread, curthread); /* Unlock the CV structure: */ THR_LOCK_RELEASE(curthread, @@ -493,7 +494,6 @@ _thr_sched_switch(curthread); curthread->data.cond = NULL; - THR_UNLOCK_SWITCH(curthread); /* * XXX - This really isn't a good check ==== //depot/projects/ia64/lib/libpthread/thread/thr_exit.c#4 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_exit.c,v 1.31 2003/04/28 23:56:11 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_exit.c,v 1.32 2003/05/16 19:58:29 deischen Exp $ */ #include #include @@ -125,9 +125,8 @@ /* This thread will never be re-scheduled. */ THR_LOCK_SWITCH(curthread); THR_SET_STATE(curthread, PS_DEAD); - _thr_sched_switch(curthread); + _thr_sched_switch_unlocked(curthread); /* Never reach! */ - THR_UNLOCK_SWITCH(curthread); /* This point should not be reached. */ PANIC("Dead thread has resumed"); ==== //depot/projects/ia64/lib/libpthread/thread/thr_init.c#9 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_init.c,v 1.51 2003/04/30 15:05:17 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_init.c,v 1.52 2003/05/16 19:58:29 deischen Exp $ */ /* Allocate space for global thread variables here: */ @@ -72,6 +72,7 @@ int __pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *); int __pthread_mutex_lock(pthread_mutex_t *); int __pthread_mutex_trylock(pthread_mutex_t *); +void _thread_init_hack(void); static void init_private(void); static void init_main_thread(struct pthread *thread); @@ -131,6 +132,7 @@ &_sigsuspend, &_socket, &_socketpair, + &_thread_init_hack, &_wait4, &_write, &_writev ==== //depot/projects/ia64/lib/libpthread/thread/thr_join.c#4 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_join.c,v 1.24 2003/04/28 23:56:11 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_join.c,v 1.25 2003/05/16 19:58:29 deischen Exp $ */ #include #include @@ -123,13 +123,15 @@ THR_SCHED_UNLOCK(curthread, pthread); _thr_ref_delete(curthread, pthread); - THR_LOCK_SWITCH(curthread); + THR_SCHED_LOCK(curthread, curthread); while (curthread->join_status.thread == pthread) { THR_SET_STATE(curthread, PS_JOIN); + THR_SCHED_UNLOCK(curthread, curthread); /* Schedule the next thread: */ _thr_sched_switch(curthread); + THR_SCHED_LOCK(curthread, curthread); } - THR_UNLOCK_SWITCH(curthread); + THR_SCHED_UNLOCK(curthread, curthread); /* * The thread return value and error are set by the ==== //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#15 (text+ko) ==== @@ -33,7 +33,7 @@ * */ #include -__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.64 2003/05/05 05:01:19 davidxu Exp $"); +__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.65 2003/05/16 19:58:29 deischen Exp $"); #include #include @@ -398,7 +398,6 @@ */ ts.tv_sec = 0; ts.tv_nsec = 1000000; /* 1 sec */ - KSE_SET_WAIT(curkse); while (_LCK_BUSY(lu)) { /* * Yield the kse and wait to be notified when the lock @@ -408,14 +407,7 @@ curkse->k_mbx.km_flags |= KMF_NOUPCALL | KMF_NOCOMPLETED; kse_release(&ts); curkse->k_mbx.km_flags = saved_flags; - - /* - * Make sure that the wait flag is set again in case - * we wokeup without the lock being granted. - */ - KSE_SET_WAIT(curkse); } - KSE_CLEAR_WAIT(curkse); } void @@ -423,17 +415,23 @@ { struct kse *curkse; struct kse *kse; + struct kse_mailbox *mbx; curkse = _get_curkse(); kse = (struct kse *)_LCK_GET_PRIVATE(lu); if (kse == curkse) PANIC("KSE trying to wake itself up in lock"); - else if (KSE_WAITING(kse)) { + else { + mbx = &kse->k_mbx; + _lock_grant(lock, lu); /* * Notify the owning kse that it has the lock. + * It is safe to pass invalid address to kse_wakeup + * even if the mailbox is not in kernel at all, + * and waking up a wrong kse is also harmless. */ - KSE_WAKEUP(kse); + kse_wakeup(mbx); } } @@ -446,30 +444,13 @@ _thr_lock_wait(struct lock *lock, struct lockuser *lu) { struct pthread *curthread = (struct pthread *)lu->lu_private; - int count; - /* - * Spin for a bit. - * - * XXX - We probably want to make this a bit smarter. It - * doesn't make sense to spin unless there is more - * than 1 CPU. A thread that is holding one of these - * locks is prevented from being swapped out for another - * thread within the same scheduling entity. - */ - count = 0; - while (_LCK_BUSY(lu) && count < 300) - count++; - while (_LCK_BUSY(lu)) { - THR_LOCK_SWITCH(curthread); - if (_LCK_BUSY(lu)) { - /* Wait for the lock: */ - atomic_store_rel_int(&curthread->need_wakeup, 1); - THR_SET_STATE(curthread, PS_LOCKWAIT); - _thr_sched_switch(curthread); - } - THR_UNLOCK_SWITCH(curthread); - } + do { + THR_SCHED_LOCK(curthread, curthread); + THR_SET_STATE(curthread, PS_LOCKWAIT); + THR_SCHED_UNLOCK(curthread, curthread); + _thr_sched_switch(curthread); + } while _LCK_BUSY(lu); } void @@ -477,26 +458,14 @@ { struct pthread *thread; struct pthread *curthread; - int unlock; curthread = _get_curthread(); thread = (struct pthread *)_LCK_GET_PRIVATE(lu); - unlock = 0; - if (curthread->kseg == thread->kseg) { - /* Not already locked */ - if (curthread->lock_switch == 0) { - THR_SCHED_LOCK(curthread, thread); - unlock = 1; - } - } else { - THR_SCHED_LOCK(curthread, thread); - unlock = 1; - } + THR_SCHED_LOCK(curthread, thread); + _lock_grant(lock, lu); _thr_setrunnable_unlocked(thread); - atomic_store_rel_int(&thread->need_wakeup, 0); - if (unlock) - THR_SCHED_UNLOCK(curthread, thread); + THR_SCHED_UNLOCK(curthread, thread); } kse_critical_t @@ -537,27 +506,42 @@ THR_YIELD_CHECK(thread); } +void +_thr_sched_switch(struct pthread *curthread) +{ + struct kse *curkse; + + (void)_kse_critical_enter(); + curkse = _get_curkse(); + KSE_SCHED_LOCK(curkse, curkse->k_kseg); + _thr_sched_switch_unlocked(curthread); +} + /* * XXX - We may need to take the scheduling lock before calling * this, or perhaps take the lock within here before * doing anything else. */ void -_thr_sched_switch(struct pthread *curthread) +_thr_sched_switch_unlocked(struct pthread *curthread) { + struct pthread *td; struct pthread_sigframe psf; struct kse *curkse; - volatile int once = 0; + int ret; + volatile int uts_once; + volatile int resume_once = 0; /* We're in the scheduler, 5 by 5: */ - THR_ASSERT(curthread->lock_switch, "lock_switch"); - THR_ASSERT(_kse_in_critical(), "not in critical region"); curkse = _get_curkse(); curthread->need_switchout = 1; /* The thread yielded on its own. */ curthread->critical_yield = 0; /* No need to yield anymore. */ curthread->slice_usec = -1; /* Restart the time slice. */ + /* Thread can unlock the scheduler lock. */ + curthread->lock_switch = 1; + /* * The signal frame is allocated off the stack because * a thread can be interrupted by other signals while @@ -566,19 +550,95 @@ sigemptyset(&psf.psf_sigset); curthread->curframe = &psf; - _thread_enter_uts(&curthread->tmbx, &curkse->k_mbx); + /* + * Enter the scheduler if any one of the following is true: + * + * o The current thread is dead; it's stack needs to be + * cleaned up and it can't be done while operating on + * it. + * o There are no runnable threads. + * o The next thread to run won't unlock the scheduler + * lock. A side note: the current thread may be run + * instead of the next thread in the run queue, but + * we don't bother checking for that. + */ + if ((curthread->state == PS_DEAD) || + (((td = KSE_RUNQ_FIRST(curkse)) == NULL) && + (curthread->state != PS_RUNNING)) || + ((td != NULL) && (td->lock_switch == 0))) + _thread_enter_uts(&curthread->tmbx, &curkse->k_mbx); + else { + uts_once = 0; + THR_GETCONTEXT(&curthread->tmbx.tm_context); + if (uts_once == 0) { + uts_once = 1; + + /* Switchout the current thread. */ + kse_switchout_thread(curkse, curthread); + + /* Choose another thread to run. */ + td = KSE_RUNQ_FIRST(curkse); + KSE_RUNQ_REMOVE(curkse, td); + curkse->k_curthread = td; + + /* + * Make sure the current thread's kse points to + * this kse. + */ + td->kse = curkse; + + /* + * Reset accounting. + */ + td->tmbx.tm_uticks = 0; + td->tmbx.tm_sticks = 0; + + /* + * Reset the time slice if this thread is running + * for the first time or running again after using + * its full time slice allocation. + */ + if (td->slice_usec == -1) + td->slice_usec = 0; + + /* Mark the thread active. */ + td->active = 1; + + /* Remove the frame reference. */ + td->curframe = NULL; + + /* + * Continue the thread at its current frame: + */ + ret = _thread_switch(&td->tmbx, NULL); + /* This point should not be reached. */ + if (ret != 0) + PANIC("Bad return from _thread_switch"); + PANIC("Thread has returned from _thread_switch"); + } + } + + if (curthread->lock_switch != 0) { + /* + * Unlock the scheduling queue and leave the + * critical region. + */ + /* Don't trust this after a switch! */ + curkse = _get_curkse(); + curthread->lock_switch = 0; + KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); + _kse_critical_leave(&curthread->tmbx); + } /* * This thread is being resumed; check for cancellations. */ - if ((once == 0) && (!THR_IN_CRITICAL(curthread))) { - once = 1; - curthread->critical_count++; - THR_UNLOCK_SWITCH(curthread); - curthread->critical_count--; + if ((resume_once == 0) && (!THR_IN_CRITICAL(curthread))) { + resume_once = 1; thr_resume_check(curthread, &curthread->tmbx.tm_context, &psf); - THR_LOCK_SWITCH(curthread); } + + THR_ACTIVATE_LAST_LOCK(curthread); } /* @@ -743,12 +803,10 @@ KSE_CLEAR_WAIT(curkse); } + /* Lock the scheduling lock. */ curthread = curkse->k_curthread; - if (curthread == NULL || curthread->lock_switch == 0) { - /* - * curthread was preempted by upcall, it is not a volunteer - * context switch. Lock the scheduling lock. - */ + if ((curthread == NULL) || (curthread->need_switchout == 0)) { + /* This is an upcall; take the scheduler lock. */ KSE_SCHED_LOCK(curkse, curkse->k_kseg); } @@ -798,14 +856,9 @@ DBG_MSG("Continuing thread %p in critical region\n", curthread); kse_wakeup_multi(curkse); - if (curthread->lock_switch) { - KSE_SCHED_LOCK(curkse, curkse->k_kseg); - ret = _thread_switch(&curthread->tmbx, 0); - } else { - KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); - ret = _thread_switch(&curthread->tmbx, - &curkse->k_mbx.km_curthread); - } + KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); + ret = _thread_switch(&curthread->tmbx, + &curkse->k_mbx.km_curthread); if (ret != 0) PANIC("Can't resume thread in critical region\n"); } @@ -895,9 +948,6 @@ kse_wakeup_multi(curkse); - /* Unlock the scheduling queue: */ - KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); - /* * The thread's current signal frame will only be NULL if it * is being resumed after being blocked in the kernel. In @@ -906,25 +956,30 @@ * signal frame to the thread's context. */ #ifdef NOT_YET - if ((curframe == NULL) && ((curthread->check_pending != 0) || + if ((curframe == NULL) && ((curthread->have_signals != 0) || (((curthread->cancelflags & THR_AT_CANCEL_POINT) == 0) && ((curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) != 0)))) signalcontext(&curthread->tmbx.tm_context, 0, (__sighandler_t *)thr_resume_wrapper); #else - if ((curframe == NULL) && (curthread->check_pending != 0)) + if ((curframe == NULL) && (curthread->have_signals != 0)) signalcontext(&curthread->tmbx.tm_context, 0, (__sighandler_t *)thr_resume_wrapper); #endif /* * Continue the thread at its current frame: */ - if (curthread->lock_switch) { - KSE_SCHED_LOCK(curkse, curkse->k_kseg); - ret = _thread_switch(&curthread->tmbx, 0); + if (curthread->lock_switch != 0) { + /* + * This thread came from a scheduler switch; it will + * unlock the scheduler lock and set the mailbox. + */ + ret = _thread_switch(&curthread->tmbx, NULL); } else { + /* This thread won't unlock the scheduler lock. */ + KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); ret = _thread_switch(&curthread->tmbx, - &curkse->k_mbx.km_curthread); + &curkse->k_mbx.km_curthread); } if (ret != 0) PANIC("Thread has returned from _thread_switch"); @@ -977,9 +1032,9 @@ struct pthread_sigframe *psf) { /* Check signals before cancellations. */ - while (curthread->check_pending != 0) { + while (curthread->have_signals != 0) { /* Clear the pending flag. */ - curthread->check_pending = 0; + curthread->have_signals = 0; /* * It's perfectly valid, though not portable, for @@ -1262,6 +1317,11 @@ THR_SET_STATE(thread, PS_SUSPENDED); else KSE_RUNQ_INSERT_TAIL(kse, thread); + if ((thread->kse != kse) && + (thread->kse->k_curthread == thread)) { + thread->kse->k_curthread = NULL; + thread->active = 0; + } } completed = completed->tm_next; } @@ -1360,12 +1420,15 @@ kse_switchout_thread(struct kse *kse, struct pthread *thread) { int level; + int i; /* * Place the currently running thread into the * appropriate queue(s). */ DBG_MSG("Switching out thread %p, state %d\n", thread, thread->state); + >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri May 16 19:04:53 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2E57E37B404; Fri, 16 May 2003 19:04:53 -0700 (PDT) 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 BF65637B401 for ; Fri, 16 May 2003 19:04:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A767943F3F for ; Fri, 16 May 2003 19:04:51 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4H24p0U006763 for ; Fri, 16 May 2003 19:04:51 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4H24oeV006760 for perforce@freebsd.org; Fri, 16 May 2003 19:04:50 -0700 (PDT) Date: Fri, 16 May 2003 19:04:50 -0700 (PDT) Message-Id: <200305170204.h4H24oeV006760@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31369 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2003 02:04:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=31369 Change 31369 by marcel@marcel_nfs on 2003/05/16 19:03:59 IFia64 Affected files ... .. //depot/projects/ia64_epc/bin/chflags/chflags.1#3 integrate .. //depot/projects/ia64_epc/bin/pwd/pwd.1#3 integrate .. //depot/projects/ia64_epc/bin/sh/sh.1#4 integrate .. //depot/projects/ia64_epc/games/caesar/caesar.6#3 integrate .. //depot/projects/ia64_epc/games/grdc/grdc.6#3 integrate .. //depot/projects/ia64_epc/lib/libc/ia64/sys/brk.S#5 integrate .. //depot/projects/ia64_epc/lib/libc/ia64/sys/pipe.S#4 integrate .. //depot/projects/ia64_epc/lib/libc/ia64/sys/sbrk.S#5 integrate .. //depot/projects/ia64_epc/lib/libkvm/kvm_ia64.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/sys/lock.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/sys/lock.h#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_cond.c#7 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_exit.c#4 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_init.c#7 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_join.c#4 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_kern.c#10 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_mutex.c#4 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_nanosleep.c#4 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_private.h#10 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sig.c#7 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sigsuspend.c#4 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sigwait.c#4 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_yield.c#4 integrate .. //depot/projects/ia64_epc/libexec/ftpd/ftpd.8#4 integrate .. //depot/projects/ia64_epc/libexec/rtld-elf/rtld.1#4 integrate .. //depot/projects/ia64_epc/release/scripts/doFS.sh#9 integrate .. //depot/projects/ia64_epc/sbin/sysctl/sysctl.8#2 integrate .. //depot/projects/ia64_epc/share/man/man9/CTASSERT.9#1 branch .. //depot/projects/ia64_epc/share/man/man9/KASSERT.9#2 integrate .. //depot/projects/ia64_epc/share/man/man9/Makefile#6 integrate .. //depot/projects/ia64_epc/share/man/man9/VFS_SET.9#2 integrate .. //depot/projects/ia64_epc/share/man/man9/byteorder.9#3 integrate .. //depot/projects/ia64_epc/share/man/man9/mbuf.9#4 integrate .. //depot/projects/ia64_epc/share/man/man9/rman.9#1 branch .. //depot/projects/ia64_epc/share/man/man9/sleep.9#3 integrate .. //depot/projects/ia64_epc/sys/boot/i386/libi386/amd64_tramp.S#2 integrate .. //depot/projects/ia64_epc/sys/conf/Makefile.ia64#5 integrate .. //depot/projects/ia64_epc/sys/conf/files.ia64#14 integrate .. //depot/projects/ia64_epc/sys/conf/options.ia64#4 integrate .. //depot/projects/ia64_epc/sys/dev/md/md.c#9 integrate .. //depot/projects/ia64_epc/sys/ia64/ia32/ia32_sysvec.c#7 integrate .. //depot/projects/ia64_epc/sys/ia64/ia32/ia32_util.h#3 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/db_interface.c#10 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/db_trace.c#5 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/elf_machdep.c#5 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#20 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/genassym.c#9 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/interrupt.c#3 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#18 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#25 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/mp_machdep.c#11 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#16 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/support.s#6 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/trap.c#21 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/unaligned.c#4 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/unwind.c#5 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/vm_machdep.c#10 integrate .. //depot/projects/ia64_epc/sys/ia64/include/asm.h#6 integrate .. //depot/projects/ia64_epc/sys/ia64/include/cpu.h#9 integrate .. //depot/projects/ia64_epc/sys/ia64/include/db_machdep.h#4 integrate .. //depot/projects/ia64_epc/sys/ia64/include/frame.h#3 integrate .. //depot/projects/ia64_epc/sys/ia64/include/pcb.h#10 integrate .. //depot/projects/ia64_epc/sys/ia64/include/proc.h#3 integrate .. //depot/projects/ia64_epc/sys/ia64/include/reg.h#4 integrate .. //depot/projects/ia64_epc/sys/ia64/include/signal.h#5 integrate .. //depot/projects/ia64_epc/sys/ia64/include/smp.h#4 integrate .. //depot/projects/ia64_epc/sys/ia64/include/ucontext.h#5 integrate .. //depot/projects/ia64_epc/sys/ia64/include/unwind.h#5 integrate .. //depot/projects/ia64_epc/sys/ia64/include/vmparam.h#4 integrate .. //depot/projects/ia64_epc/sys/kern/kern_synch.c#14 integrate .. //depot/projects/ia64_epc/sys/kern/kern_thr.c#7 integrate .. //depot/projects/ia64_epc/sys/kern/kern_thread.c#18 integrate .. //depot/projects/ia64_epc/sys/kern/vfs_subr.c#15 integrate .. //depot/projects/ia64_epc/sys/sys/proc.h#17 integrate .. //depot/projects/ia64_epc/tools/tools/tinderbox/Makefile#4 integrate .. //depot/projects/ia64_epc/tools/tools/tinderbox/tbmaster.1#1 branch .. //depot/projects/ia64_epc/tools/tools/tinderbox/tbmaster.pl#8 integrate .. //depot/projects/ia64_epc/tools/tools/tinderbox/tinderbox.1#1 branch .. //depot/projects/ia64_epc/tools/tools/tinderbox/tinderbox.pl#7 integrate .. //depot/projects/ia64_epc/usr.bin/truss/ia64-fbsd.c#4 integrate Differences ... ==== //depot/projects/ia64_epc/bin/chflags/chflags.1#3 (text+ko) ==== @@ -33,9 +33,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95 -.\" $FreeBSD: src/bin/chflags/chflags.1,v 1.16 2003/03/24 20:15:58 johan Exp $ +.\" $FreeBSD: src/bin/chflags/chflags.1,v 1.17 2003/05/16 21:18:01 ru Exp $ .\" -.Dd Mar 24, 2003 +.Dd March 24, 2003 .Dt CHFLAGS 1 .Os .Sh NAME ==== //depot/projects/ia64_epc/bin/pwd/pwd.1#3 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)pwd.1 8.2 (Berkeley) 4/28/95 -.\" $FreeBSD: src/bin/pwd/pwd.1,v 1.21 2003/04/12 03:22:54 tjr Exp $ +.\" $FreeBSD: src/bin/pwd/pwd.1,v 1.22 2003/05/16 21:19:32 ru Exp $ .\" .Dd April 12, 2003 .Dt PWD 1 @@ -43,7 +43,7 @@ .Nd return working directory name .Sh SYNOPSIS .Nm -.Oo Fl L | Fl P Oc +.Op Fl L | P .Sh DESCRIPTION The .Nm ==== //depot/projects/ia64_epc/bin/sh/sh.1#4 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 -.\" $FreeBSD: src/bin/sh/sh.1,v 1.86 2003/04/30 19:18:50 schweikh Exp $ +.\" $FreeBSD: src/bin/sh/sh.1,v 1.87 2003/05/16 21:19:32 ru Exp $ .\" .Dd April 12, 2003 .Dt SH 1 @@ -1295,7 +1295,7 @@ List or alter key bindings for the line editor. This command is documented in .Xr editrc 5 . -.It Ic cd Oo Fl L | Fl P Oc Op Ar directory +.It Ic cd Oo Fl L | P Oc Op Ar directory Switch to the specified .Ar directory , or to the directory specified in the @@ -1626,7 +1626,7 @@ If the .Fl s option is specified, only the PIDs of the jobs are printed, one per line. -.It Ic pwd Oo Fl L | Fl P Oc +.It Ic pwd Op Fl L | P Print the path of the current directory. The built-in command may differ from the program of the same name because the built-in command remembers what the current directory ==== //depot/projects/ia64_epc/games/caesar/caesar.6#3 (text+ko) ==== @@ -30,13 +30,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)caesar.6 8.2 (Berkeley) 11/16/93 -.\" $FreeBSD: src/games/caesar/caesar.6,v 1.8 2003/03/24 11:18:30 tjr Exp $ +.\" $FreeBSD: src/games/caesar/caesar.6,v 1.9 2003/05/16 21:26:39 ru Exp $ .\" .Dd November 16, 1993 .Dt CAESAR 6 .Os .Sh NAME -.Nm caesar +.Nm caesar , rot13 .Nd decrypt caesar ciphers .Sh SYNOPSIS .Nm ==== //depot/projects/ia64_epc/games/grdc/grdc.6#3 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/games/grdc/grdc.6,v 1.5 2003/03/28 16:37:45 mux Exp $ +.\" $FreeBSD: src/games/grdc/grdc.6,v 1.6 2003/05/16 21:27:23 ru Exp $ .Dd September 25, 2001 .Dt GRDC 6 .Os @@ -7,8 +7,7 @@ .Nd grand digital clock (curses) .Sh SYNOPSIS .Nm -.Op Fl s -.Op Fl t +.Op Fl st .Op Ar n .Sh DESCRIPTION .Nm ==== //depot/projects/ia64_epc/lib/libc/ia64/sys/brk.S#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/brk.S,v 1.3 2003/03/03 01:09:46 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/brk.S,v 1.4 2003/05/16 21:26:39 marcel Exp $"); #include "SYS.h" ==== //depot/projects/ia64_epc/lib/libc/ia64/sys/pipe.S#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/pipe.S,v 1.3 2003/03/03 01:09:46 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/pipe.S,v 1.4 2003/05/16 21:26:39 marcel Exp $"); #include "SYS.h" ==== //depot/projects/ia64_epc/lib/libc/ia64/sys/sbrk.S#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/sbrk.S,v 1.4 2003/03/03 01:09:46 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/ia64/sys/sbrk.S,v 1.5 2003/05/16 21:26:39 marcel Exp $"); #include "SYS.h" ==== //depot/projects/ia64_epc/lib/libkvm/kvm_ia64.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/lib/libkvm/kvm_ia64.c,v 1.3 2002/10/21 04:21:12 marcel Exp $ */ +/* $FreeBSD: src/lib/libkvm/kvm_ia64.c,v 1.4 2003/05/16 21:26:40 marcel Exp $ */ /* $NetBSD: kvm_alpha.c,v 1.7.2.1 1997/11/02 20:34:26 mellon Exp $ */ /* ==== //depot/projects/ia64_epc/lib/libpthread/sys/lock.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/sys/lock.c,v 1.3 2003/05/04 22:29:09 deischen Exp $ + * $FreeBSD: src/lib/libpthread/sys/lock.c,v 1.4 2003/05/16 19:58:29 deischen Exp $ */ #include @@ -65,7 +65,7 @@ lck->l_head->lr_watcher = NULL; lck->l_head->lr_owner = NULL; lck->l_head->lr_waiting = 0; - lck->l_head->lr_handshake = 0; + lck->l_head->lr_active = 1; lck->l_tail = lck->l_head; } return (0); @@ -85,7 +85,7 @@ lu->lu_myreq->lr_watcher = NULL; lu->lu_myreq->lr_owner = lu; lu->lu_myreq->lr_waiting = 0; - lu->lu_myreq->lr_handshake = 0; + lu->lu_myreq->lr_active = 0; lu->lu_watchreq = NULL; lu->lu_priority = 0; lu->lu_private = priv; @@ -166,19 +166,16 @@ for (i = 0; i < MAX_SPINS; i++) { if (lu->lu_watchreq->lr_locked == 0) return; + if (lu->lu_watchreq->lr_active == 0) + break; } atomic_store_rel_long(&lu->lu_watchreq->lr_waiting, 1); while (lu->lu_watchreq->lr_locked != 0) lck->l_wait(lck, lu); atomic_store_rel_long(&lu->lu_watchreq->lr_waiting, 0); - /* - * Wait for original owner to stop accessing the - * lockreq object. - */ - while (lu->lu_watchreq->lr_handshake) - ; } } + lu->lu_myreq->lr_active = 1; } /* @@ -240,24 +237,21 @@ } } if (lu_h != NULL) { - lu_h->lu_watchreq->lr_handshake = 1; /* Give the lock to the highest priority user. */ - atomic_store_rel_long(&lu_h->lu_watchreq->lr_locked, 0); if ((lu_h->lu_watchreq->lr_waiting != 0) && (lck->l_wakeup != NULL)) /* Notify the sleeper */ lck->l_wakeup(lck, lu_h->lu_myreq->lr_watcher); - atomic_store_rel_long(&lu_h->lu_watchreq->lr_handshake, - 0); + else + atomic_store_rel_long(&lu_h->lu_watchreq->lr_locked, 0); } else { - myreq->lr_handshake = 1; - /* Give the lock to the previous request. */ - atomic_store_rel_long(&myreq->lr_locked, 0); if ((myreq->lr_waiting != 0) && (lck->l_wakeup != NULL)) /* Notify the sleeper */ lck->l_wakeup(lck, myreq->lr_watcher); - atomic_store_rel_long(&myreq->lr_handshake, 0); + else + /* Give the lock to the previous request. */ + atomic_store_rel_long(&myreq->lr_locked, 0); } } else { /* @@ -270,19 +264,25 @@ lu->lu_watchreq = NULL; lu->lu_myreq->lr_locked = 1; lu->lu_myreq->lr_waiting = 0; - if (lck->l_wakeup) { - /* Start wakeup */ - myreq->lr_handshake = 1; + if (myreq->lr_waiting != 0 && lck->l_wakeup) + /* Notify the sleeper */ + lck->l_wakeup(lck, myreq->lr_watcher); + else /* Give the lock to the previous request. */ atomic_store_rel_long(&myreq->lr_locked, 0); - if (myreq->lr_waiting != 0) { - /* Notify the sleeper */ - lck->l_wakeup(lck, myreq->lr_watcher); - } - /* Stop wakeup */ - atomic_store_rel_long(&myreq->lr_handshake, 0); - } else { - atomic_store_rel_long(&myreq->lr_locked, 0); - } } + lu->lu_myreq->lr_active = 0; +} + +void +_lock_grant(struct lock *lck /* unused */, struct lockuser *lu) +{ + atomic_store_rel_long(&lu->lu_watchreq->lr_locked, 0); } + +void +_lockuser_setactive(struct lockuser *lu, int active) +{ + lu->lu_myreq->lr_active = active; +} + ==== //depot/projects/ia64_epc/lib/libpthread/sys/lock.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/sys/lock.h,v 1.3 2003/05/04 22:29:09 deischen Exp $ + * $FreeBSD: src/lib/libpthread/sys/lock.h,v 1.4 2003/05/16 19:58:29 deischen Exp $ */ #ifndef _LOCK_H_ @@ -55,7 +55,7 @@ struct lockuser *lr_watcher; /* only used for priority locks */ struct lockuser *lr_owner; /* only used for priority locks */ long lr_waiting; /* non-zero when wakeup needed */ - volatile long lr_handshake; /* non-zero when wakeup in progress */ + volatile int lr_active; /* non-zero if the lock is last lock for thread */ }; struct lockuser { @@ -72,6 +72,7 @@ #define _LCK_REQUEST_INITIALIZER { 0, NULL, NULL, 0 } #define _LCK_BUSY(lu) ((lu)->lu_watchreq->lr_locked != 0) +#define _LCK_ACTIVE(lu) ((lu)->lu_watchreq->lr_active != 0) #define _LCK_GRANTED(lu) ((lu)->lu_watchreq->lr_locked == 0) #define _LCK_SET_PRIVATE(lu, p) (lu)->lu_private = (void *)(p) @@ -84,7 +85,9 @@ lock_handler_t *, lock_handler_t *); int _lockuser_init(struct lockuser *lu, void *priv); void _lockuser_destroy(struct lockuser *lu); +void _lockuser_setactive(struct lockuser *lu, int active); void _lock_acquire(struct lock *, struct lockuser *, int); void _lock_release(struct lock *, struct lockuser *); +void _lock_grant(struct lock *, struct lockuser *); #endif ==== //depot/projects/ia64_epc/lib/libpthread/thread/thr_cond.c#7 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_cond.c,v 1.39 2003/05/02 11:39:00 davidxu Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_cond.c,v 1.40 2003/05/16 19:58:29 deischen Exp $ */ #include #include @@ -267,11 +267,12 @@ * lock); we should be able to safely * set the state. */ - THR_LOCK_SWITCH(curthread); + THR_SCHED_LOCK(curthread, curthread); THR_SET_STATE(curthread, PS_COND_WAIT); /* Remember the CV: */ curthread->data.cond = *cond; + THR_SCHED_UNLOCK(curthread, curthread); /* Unlock the CV structure: */ THR_LOCK_RELEASE(curthread, @@ -281,7 +282,6 @@ _thr_sched_switch(curthread); curthread->data.cond = NULL; - THR_UNLOCK_SWITCH(curthread); /* * XXX - This really isn't a good check @@ -479,11 +479,12 @@ * lock); we should be able to safely * set the state. */ - THR_LOCK_SWITCH(curthread); + THR_SCHED_LOCK(curthread, curthread); THR_SET_STATE(curthread, PS_COND_WAIT); /* Remember the CV: */ curthread->data.cond = *cond; + THR_SCHED_UNLOCK(curthread, curthread); /* Unlock the CV structure: */ THR_LOCK_RELEASE(curthread, @@ -493,7 +494,6 @@ _thr_sched_switch(curthread); curthread->data.cond = NULL; - THR_UNLOCK_SWITCH(curthread); /* * XXX - This really isn't a good check ==== //depot/projects/ia64_epc/lib/libpthread/thread/thr_exit.c#4 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_exit.c,v 1.31 2003/04/28 23:56:11 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_exit.c,v 1.32 2003/05/16 19:58:29 deischen Exp $ */ #include #include @@ -125,9 +125,8 @@ /* This thread will never be re-scheduled. */ THR_LOCK_SWITCH(curthread); THR_SET_STATE(curthread, PS_DEAD); - _thr_sched_switch(curthread); + _thr_sched_switch_unlocked(curthread); /* Never reach! */ - THR_UNLOCK_SWITCH(curthread); /* This point should not be reached. */ PANIC("Dead thread has resumed"); ==== //depot/projects/ia64_epc/lib/libpthread/thread/thr_init.c#7 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_init.c,v 1.51 2003/04/30 15:05:17 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_init.c,v 1.52 2003/05/16 19:58:29 deischen Exp $ */ /* Allocate space for global thread variables here: */ @@ -72,6 +72,7 @@ int __pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *); int __pthread_mutex_lock(pthread_mutex_t *); int __pthread_mutex_trylock(pthread_mutex_t *); +void _thread_init_hack(void); static void init_private(void); static void init_main_thread(struct pthread *thread); @@ -131,6 +132,7 @@ &_sigsuspend, &_socket, &_socketpair, + &_thread_init_hack, &_wait4, &_write, &_writev ==== //depot/projects/ia64_epc/lib/libpthread/thread/thr_join.c#4 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_join.c,v 1.24 2003/04/28 23:56:11 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_join.c,v 1.25 2003/05/16 19:58:29 deischen Exp $ */ #include #include @@ -123,13 +123,15 @@ THR_SCHED_UNLOCK(curthread, pthread); _thr_ref_delete(curthread, pthread); - THR_LOCK_SWITCH(curthread); + THR_SCHED_LOCK(curthread, curthread); while (curthread->join_status.thread == pthread) { THR_SET_STATE(curthread, PS_JOIN); + THR_SCHED_UNLOCK(curthread, curthread); /* Schedule the next thread: */ _thr_sched_switch(curthread); + THR_SCHED_LOCK(curthread, curthread); } - THR_UNLOCK_SWITCH(curthread); + THR_SCHED_UNLOCK(curthread, curthread); /* * The thread return value and error are set by the ==== //depot/projects/ia64_epc/lib/libpthread/thread/thr_kern.c#10 (text+ko) ==== @@ -33,7 +33,7 @@ * */ #include -__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.64 2003/05/05 05:01:19 davidxu Exp $"); +__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.65 2003/05/16 19:58:29 deischen Exp $"); #include #include @@ -398,7 +398,6 @@ */ ts.tv_sec = 0; ts.tv_nsec = 1000000; /* 1 sec */ - KSE_SET_WAIT(curkse); while (_LCK_BUSY(lu)) { /* * Yield the kse and wait to be notified when the lock @@ -408,14 +407,7 @@ curkse->k_mbx.km_flags |= KMF_NOUPCALL | KMF_NOCOMPLETED; kse_release(&ts); curkse->k_mbx.km_flags = saved_flags; - - /* - * Make sure that the wait flag is set again in case - * we wokeup without the lock being granted. - */ - KSE_SET_WAIT(curkse); } - KSE_CLEAR_WAIT(curkse); } void @@ -423,17 +415,23 @@ { struct kse *curkse; struct kse *kse; + struct kse_mailbox *mbx; curkse = _get_curkse(); kse = (struct kse *)_LCK_GET_PRIVATE(lu); if (kse == curkse) PANIC("KSE trying to wake itself up in lock"); - else if (KSE_WAITING(kse)) { + else { + mbx = &kse->k_mbx; + _lock_grant(lock, lu); /* * Notify the owning kse that it has the lock. + * It is safe to pass invalid address to kse_wakeup + * even if the mailbox is not in kernel at all, + * and waking up a wrong kse is also harmless. */ - KSE_WAKEUP(kse); + kse_wakeup(mbx); } } @@ -446,30 +444,13 @@ _thr_lock_wait(struct lock *lock, struct lockuser *lu) { struct pthread *curthread = (struct pthread *)lu->lu_private; - int count; - /* - * Spin for a bit. - * - * XXX - We probably want to make this a bit smarter. It - * doesn't make sense to spin unless there is more - * than 1 CPU. A thread that is holding one of these - * locks is prevented from being swapped out for another - * thread within the same scheduling entity. - */ - count = 0; - while (_LCK_BUSY(lu) && count < 300) - count++; - while (_LCK_BUSY(lu)) { - THR_LOCK_SWITCH(curthread); - if (_LCK_BUSY(lu)) { - /* Wait for the lock: */ - atomic_store_rel_int(&curthread->need_wakeup, 1); - THR_SET_STATE(curthread, PS_LOCKWAIT); - _thr_sched_switch(curthread); - } - THR_UNLOCK_SWITCH(curthread); - } + do { + THR_SCHED_LOCK(curthread, curthread); + THR_SET_STATE(curthread, PS_LOCKWAIT); + THR_SCHED_UNLOCK(curthread, curthread); + _thr_sched_switch(curthread); + } while _LCK_BUSY(lu); } void @@ -477,26 +458,14 @@ { struct pthread *thread; struct pthread *curthread; - int unlock; curthread = _get_curthread(); thread = (struct pthread *)_LCK_GET_PRIVATE(lu); - unlock = 0; - if (curthread->kseg == thread->kseg) { - /* Not already locked */ - if (curthread->lock_switch == 0) { - THR_SCHED_LOCK(curthread, thread); - unlock = 1; - } - } else { - THR_SCHED_LOCK(curthread, thread); - unlock = 1; - } + THR_SCHED_LOCK(curthread, thread); + _lock_grant(lock, lu); _thr_setrunnable_unlocked(thread); - atomic_store_rel_int(&thread->need_wakeup, 0); - if (unlock) - THR_SCHED_UNLOCK(curthread, thread); + THR_SCHED_UNLOCK(curthread, thread); } kse_critical_t @@ -537,27 +506,42 @@ THR_YIELD_CHECK(thread); } +void +_thr_sched_switch(struct pthread *curthread) +{ + struct kse *curkse; + + (void)_kse_critical_enter(); + curkse = _get_curkse(); + KSE_SCHED_LOCK(curkse, curkse->k_kseg); + _thr_sched_switch_unlocked(curthread); +} + /* * XXX - We may need to take the scheduling lock before calling * this, or perhaps take the lock within here before * doing anything else. */ void -_thr_sched_switch(struct pthread *curthread) +_thr_sched_switch_unlocked(struct pthread *curthread) { + struct pthread *td; struct pthread_sigframe psf; struct kse *curkse; - volatile int once = 0; + int ret; + volatile int uts_once; + volatile int resume_once = 0; /* We're in the scheduler, 5 by 5: */ - THR_ASSERT(curthread->lock_switch, "lock_switch"); - THR_ASSERT(_kse_in_critical(), "not in critical region"); curkse = _get_curkse(); curthread->need_switchout = 1; /* The thread yielded on its own. */ curthread->critical_yield = 0; /* No need to yield anymore. */ curthread->slice_usec = -1; /* Restart the time slice. */ + /* Thread can unlock the scheduler lock. */ + curthread->lock_switch = 1; + /* * The signal frame is allocated off the stack because * a thread can be interrupted by other signals while @@ -566,19 +550,95 @@ sigemptyset(&psf.psf_sigset); curthread->curframe = &psf; - _thread_enter_uts(&curthread->tmbx, &curkse->k_mbx); + /* + * Enter the scheduler if any one of the following is true: + * + * o The current thread is dead; it's stack needs to be + * cleaned up and it can't be done while operating on + * it. + * o There are no runnable threads. + * o The next thread to run won't unlock the scheduler + * lock. A side note: the current thread may be run + * instead of the next thread in the run queue, but + * we don't bother checking for that. + */ + if ((curthread->state == PS_DEAD) || + (((td = KSE_RUNQ_FIRST(curkse)) == NULL) && + (curthread->state != PS_RUNNING)) || + ((td != NULL) && (td->lock_switch == 0))) + _thread_enter_uts(&curthread->tmbx, &curkse->k_mbx); + else { + uts_once = 0; + THR_GETCONTEXT(&curthread->tmbx.tm_context); + if (uts_once == 0) { + uts_once = 1; + + /* Switchout the current thread. */ + kse_switchout_thread(curkse, curthread); + + /* Choose another thread to run. */ + td = KSE_RUNQ_FIRST(curkse); + KSE_RUNQ_REMOVE(curkse, td); + curkse->k_curthread = td; + + /* + * Make sure the current thread's kse points to + * this kse. + */ + td->kse = curkse; + + /* + * Reset accounting. + */ + td->tmbx.tm_uticks = 0; + td->tmbx.tm_sticks = 0; + + /* + * Reset the time slice if this thread is running + * for the first time or running again after using + * its full time slice allocation. + */ + if (td->slice_usec == -1) + td->slice_usec = 0; + + /* Mark the thread active. */ + td->active = 1; + + /* Remove the frame reference. */ + td->curframe = NULL; + + /* + * Continue the thread at its current frame: + */ + ret = _thread_switch(&td->tmbx, NULL); + /* This point should not be reached. */ + if (ret != 0) + PANIC("Bad return from _thread_switch"); + PANIC("Thread has returned from _thread_switch"); + } + } + + if (curthread->lock_switch != 0) { + /* + * Unlock the scheduling queue and leave the + * critical region. + */ + /* Don't trust this after a switch! */ + curkse = _get_curkse(); + curthread->lock_switch = 0; + KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); + _kse_critical_leave(&curthread->tmbx); + } /* * This thread is being resumed; check for cancellations. */ - if ((once == 0) && (!THR_IN_CRITICAL(curthread))) { - once = 1; - curthread->critical_count++; - THR_UNLOCK_SWITCH(curthread); - curthread->critical_count--; + if ((resume_once == 0) && (!THR_IN_CRITICAL(curthread))) { + resume_once = 1; thr_resume_check(curthread, &curthread->tmbx.tm_context, &psf); - THR_LOCK_SWITCH(curthread); } + + THR_ACTIVATE_LAST_LOCK(curthread); } /* @@ -743,12 +803,10 @@ KSE_CLEAR_WAIT(curkse); } + /* Lock the scheduling lock. */ curthread = curkse->k_curthread; - if (curthread == NULL || curthread->lock_switch == 0) { - /* - * curthread was preempted by upcall, it is not a volunteer - * context switch. Lock the scheduling lock. - */ + if ((curthread == NULL) || (curthread->need_switchout == 0)) { + /* This is an upcall; take the scheduler lock. */ KSE_SCHED_LOCK(curkse, curkse->k_kseg); } @@ -798,14 +856,9 @@ DBG_MSG("Continuing thread %p in critical region\n", curthread); kse_wakeup_multi(curkse); - if (curthread->lock_switch) { - KSE_SCHED_LOCK(curkse, curkse->k_kseg); - ret = _thread_switch(&curthread->tmbx, 0); - } else { - KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); - ret = _thread_switch(&curthread->tmbx, - &curkse->k_mbx.km_curthread); - } + KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); + ret = _thread_switch(&curthread->tmbx, + &curkse->k_mbx.km_curthread); if (ret != 0) PANIC("Can't resume thread in critical region\n"); } @@ -895,9 +948,6 @@ kse_wakeup_multi(curkse); - /* Unlock the scheduling queue: */ - KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); - /* * The thread's current signal frame will only be NULL if it * is being resumed after being blocked in the kernel. In @@ -906,25 +956,30 @@ * signal frame to the thread's context. */ #ifdef NOT_YET - if ((curframe == NULL) && ((curthread->check_pending != 0) || + if ((curframe == NULL) && ((curthread->have_signals != 0) || (((curthread->cancelflags & THR_AT_CANCEL_POINT) == 0) && ((curthread->cancelflags & PTHREAD_CANCEL_ASYNCHRONOUS) != 0)))) signalcontext(&curthread->tmbx.tm_context, 0, (__sighandler_t *)thr_resume_wrapper); #else - if ((curframe == NULL) && (curthread->check_pending != 0)) + if ((curframe == NULL) && (curthread->have_signals != 0)) signalcontext(&curthread->tmbx.tm_context, 0, (__sighandler_t *)thr_resume_wrapper); #endif /* * Continue the thread at its current frame: */ - if (curthread->lock_switch) { - KSE_SCHED_LOCK(curkse, curkse->k_kseg); - ret = _thread_switch(&curthread->tmbx, 0); + if (curthread->lock_switch != 0) { + /* + * This thread came from a scheduler switch; it will + * unlock the scheduler lock and set the mailbox. + */ + ret = _thread_switch(&curthread->tmbx, NULL); } else { + /* This thread won't unlock the scheduler lock. */ + KSE_SCHED_UNLOCK(curkse, curkse->k_kseg); ret = _thread_switch(&curthread->tmbx, - &curkse->k_mbx.km_curthread); + &curkse->k_mbx.km_curthread); } if (ret != 0) PANIC("Thread has returned from _thread_switch"); @@ -977,9 +1032,9 @@ struct pthread_sigframe *psf) { /* Check signals before cancellations. */ - while (curthread->check_pending != 0) { + while (curthread->have_signals != 0) { /* Clear the pending flag. */ - curthread->check_pending = 0; + curthread->have_signals = 0; /* * It's perfectly valid, though not portable, for @@ -1262,6 +1317,11 @@ THR_SET_STATE(thread, PS_SUSPENDED); else KSE_RUNQ_INSERT_TAIL(kse, thread); + if ((thread->kse != kse) && + (thread->kse->k_curthread == thread)) { + thread->kse->k_curthread = NULL; + thread->active = 0; + } } completed = completed->tm_next; } @@ -1360,12 +1420,15 @@ kse_switchout_thread(struct kse *kse, struct pthread *thread) { int level; + int i; /* * Place the currently running thread into the * appropriate queue(s). */ DBG_MSG("Switching out thread %p, state %d\n", thread, thread->state); + + THR_DEACTIVATE_LAST_LOCK(thread); if (thread->blocked != 0) { thread->active = 0; thread->need_switchout = 0; @@ -1473,6 +1536,15 @@ } thread->active = 0; thread->need_switchout = 0; + if (thread->check_pending != 0) { + /* Install pending signals into the frame. */ + thread->check_pending = 0; + for (i = 0; i < _SIG_MAXSIG; i++) { + if (sigismember(&thread->sigpend, i) && + !sigismember(&thread->tmbx.tm_context.uc_sigmask, i)) + _thr_sig_add(thread, i, &thread->siginfo[i]); + } + } } /* @@ -1584,37 +1656,6 @@ } void -_thr_sig_add(struct pthread *thread, int sig, siginfo_t *info, ucontext_t *ucp) -{ - struct kse *curkse; - - curkse = _get_curkse(); - - KSE_SCHED_LOCK(curkse, thread->kseg); - /* - * A threads assigned KSE can't change out from under us - * when we hold the scheduler lock. - */ - if (THR_IS_ACTIVE(thread)) { - /* Thread is active. Can't install the signal for it. */ - /* Make a note in the thread that it has a signal. */ - sigaddset(&thread->sigpend, sig); - thread->check_pending = 1; - } - else { - /* Make a note in the thread that it has a signal. */ - sigaddset(&thread->sigpend, sig); - thread->check_pending = 1; - - if (thread->blocked != 0) { - /* Tell the kernel to interrupt the thread. */ - kse_thr_interrupt(&thread->tmbx); - } - } - KSE_SCHED_UNLOCK(curkse, thread->kseg); -} - -void _thr_set_timeout(const struct timespec *timeout) { struct pthread *curthread = _get_curthread(); @@ -1675,14 +1716,14 @@ THR_SET_STATE(thread, PS_SUSPENDED); else THR_SET_STATE(thread, PS_RUNNING); - }else if (thread->state != PS_RUNNING) { + } else if (thread->state != PS_RUNNING) { if ((thread->flags & THR_FLAGS_IN_WAITQ) != 0) KSE_WAITQ_REMOVE(thread->kse, thread); if ((thread->flags & THR_FLAGS_SUSPENDED) != 0) THR_SET_STATE(thread, PS_SUSPENDED); else { THR_SET_STATE(thread, PS_RUNNING); - if ((thread->blocked == 0) && >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat May 17 13:44:28 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2A05E37B404; Sat, 17 May 2003 13:44:28 -0700 (PDT) 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 BF62437B401 for ; Sat, 17 May 2003 13:44:27 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BD7C43F75 for ; Sat, 17 May 2003 13:44:27 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4HKiR0U094552 for ; Sat, 17 May 2003 13:44:27 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4HKiQv9094549 for perforce@freebsd.org; Sat, 17 May 2003 13:44:26 -0700 (PDT) Date: Sat, 17 May 2003 13:44:26 -0700 (PDT) Message-Id: <200305172044.h4HKiQv9094549@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31397 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2003 20:44:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=31397 Change 31397 by marcel@marcel_nfs on 2003/05/17 13:44:17 Post-mortem diff reduction: Remove SSC_NSECT. The change was never intended to be submitted. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/conf/SKI#8 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/conf/SKI#8 (text+ko) ==== @@ -50,7 +50,6 @@ options SCSI_DELAY=500 #Delay (in ms) before probing SCSI options SKI options SOFTUPDATES #Enable FFS soft updates support -options SSC_NSECT=786432 options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options SYSVSHM #SYSV-style shared memory From owner-p4-projects@FreeBSD.ORG Sat May 17 13:46:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5C5F037B404; Sat, 17 May 2003 13:46:31 -0700 (PDT) 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 EDDC937B401 for ; Sat, 17 May 2003 13:46:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 838BB43FBF for ; Sat, 17 May 2003 13:46:30 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4HKkU0U094661 for ; Sat, 17 May 2003 13:46:30 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4HKkUA0094658 for perforce@freebsd.org; Sat, 17 May 2003 13:46:30 -0700 (PDT) Date: Sat, 17 May 2003 13:46:30 -0700 (PDT) Message-Id: <200305172046.h4HKkUA0094658@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31398 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2003 20:46:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=31398 Change 31398 by marcel@marcel_nfs on 2003/05/17 13:46:09 Post-mortem diff reduction: propagate $FreeBSD$ expansion. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/context.s#20 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/context.s#20 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: src/sys/ia64/ia64/context.s,v 1.1 2003/05/15 08:08:32 marcel Exp $ */ #include From owner-p4-projects@FreeBSD.ORG Sat May 17 13:48:34 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 51C9A37B404; Sat, 17 May 2003 13:48:34 -0700 (PDT) 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 06F7F37B401 for ; Sat, 17 May 2003 13:48:34 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A460C43F93 for ; Sat, 17 May 2003 13:48:33 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4HKmX0U094708 for ; Sat, 17 May 2003 13:48:33 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4HKmXBb094705 for perforce@freebsd.org; Sat, 17 May 2003 13:48:33 -0700 (PDT) Date: Sat, 17 May 2003 13:48:33 -0700 (PDT) Message-Id: <200305172048.h4HKmXBb094705@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 31399 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2003 20:48:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=31399 Change 31399 by marcel@marcel_nfs on 2003/05/17 13:48:05 Post-mortem diff reduction: more $FreeBSD$ expansion. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#21 edit .. //depot/projects/ia64_epc/sys/ia64/include/_regset.h#13 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#21 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: src/sys/ia64/ia64/syscall.s,v 1.1 2003/05/15 07:51:22 marcel Exp $ */ #include ==== //depot/projects/ia64_epc/sys/ia64/include/_regset.h#13 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: src/sys/ia64/include/_regset.h,v 1.1 2003/05/15 08:36:03 marcel Exp $ */ #ifndef _MACHINE_REGSET_H_