Date: Wed, 5 Jul 2006 11:02:07 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100615 for review Message-ID: <200607051102.k65B2798014050@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100615 Change 100615 by rwatson@rwatson_zoo on 2006/07/05 11:01:35 Integrate TrustedBSD base branch from FreeBSD CVS: - Loop back merge of OpenBSM 1.0 alpha 7 changes from contrib to src/sys. Affected files ... .. //depot/projects/trustedbsd/base/MAINTAINERS#40 integrate .. //depot/projects/trustedbsd/base/bin/cp/cp.c#17 integrate .. //depot/projects/trustedbsd/base/lib/msun/src/e_scalbf.c#6 integrate .. //depot/projects/trustedbsd/base/sbin/dhclient/dhclient.c#6 integrate .. //depot/projects/trustedbsd/base/sys/Makefile#12 integrate .. //depot/projects/trustedbsd/base/sys/amd64/amd64/pmap.c#31 integrate .. //depot/projects/trustedbsd/base/sys/amd64/conf/GENERIC#24 integrate .. //depot/projects/trustedbsd/base/sys/bsm/audit_kevents.h#4 integrate .. //depot/projects/trustedbsd/base/sys/bsm/audit_record.h#3 integrate .. //depot/projects/trustedbsd/base/sys/dev/ata/ata-chipset.c#38 integrate .. //depot/projects/trustedbsd/base/sys/dev/ata/ata-lowlevel.c#18 integrate .. //depot/projects/trustedbsd/base/sys/dev/ata/ata-pci.h#28 integrate .. //depot/projects/trustedbsd/base/sys/dev/atkbdc/atkbdc_isa.c#4 integrate .. //depot/projects/trustedbsd/base/sys/dev/isp/isp.c#33 integrate .. //depot/projects/trustedbsd/base/sys/dev/sk/if_sk.c#3 integrate .. //depot/projects/trustedbsd/base/sys/dev/usb/if_aue.c#33 integrate .. //depot/projects/trustedbsd/base/sys/i386/conf/GENERIC#56 integrate .. //depot/projects/trustedbsd/base/sys/ia64/include/ieeefp.h#4 integrate .. //depot/projects/trustedbsd/base/sys/net/bpf.c#42 integrate .. //depot/projects/trustedbsd/base/sys/net/if_enc.c#3 integrate .. //depot/projects/trustedbsd/base/sys/netinet/libalias/libalias.3#3 integrate .. //depot/projects/trustedbsd/base/sys/security/audit/audit.h#3 integrate .. //depot/projects/trustedbsd/base/sys/security/audit/audit_arg.c#4 integrate .. //depot/projects/trustedbsd/base/tools/kerneldoc/Doxyfile#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/Makefile#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Dependencies#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-cam#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-crypto#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-dev_pci#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-dev_sound#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-dev_usb#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-geom#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-i4b#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-kern#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-libkern#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-linux#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-net80211#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-netgraph#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-netinet#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-netinet6#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-netipsec#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-opencrypto#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Doxyfile-vm#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/Makefile#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/README#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/common-Doxyfile#1 branch .. //depot/projects/trustedbsd/base/tools/kerneldoc/subsys/notreviewed.dox#1 branch .. //depot/projects/trustedbsd/base/usr.bin/calendar/calendars/calendar.freebsd#50 integrate .. //depot/projects/trustedbsd/base/usr.sbin/mtree/misc.c#7 integrate .. //depot/projects/trustedbsd/base/usr.sbin/mtree/mtree.8#14 integrate .. //depot/projects/trustedbsd/base/usr.sbin/mtree/mtree.h#4 integrate .. //depot/projects/trustedbsd/base/usr.sbin/mtree/spec.c#8 integrate .. //depot/projects/trustedbsd/base/usr.sbin/mtree/test/test05.sh#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/mtree/verify.c#9 integrate .. //depot/projects/trustedbsd/base/usr.sbin/sade/Makefile#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/command.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/config.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/devices.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/disks.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/dispatch.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/dmenu.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/globals.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/help/partition.hlp#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/help/slice.hlp#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/install.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/keymap.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/label.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/list.h#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/main.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/menus.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/misc.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/msg.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/rtermcap.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/sade.8#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/sade.h#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/system.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/termcap.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/usb.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/variable.c#1 branch .. //depot/projects/trustedbsd/base/usr.sbin/sade/wizard.c#1 branch Differences ... ==== //depot/projects/trustedbsd/base/MAINTAINERS#40 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/MAINTAINERS,v 1.136 2006/07/01 10:51:54 markm Exp $ +$FreeBSD: src/MAINTAINERS,v 1.137 2006/07/04 02:01:48 brooks Exp $ Please note that the content of this file is strictly advisory. No locks listed here are valid. The only strict review requirements @@ -59,8 +59,6 @@ Keep in sync with -STABLE. etc/sendmail gshapiro Pre-commit review requested. Keep in sync with -STABLE. -dhcp mbr Needs to pre-approve commits to contrib/isc-dhcp, so - changes can be made to the isc.org CVS repository. libfetch des Advance notification requested. fetch des Advance notification requested. libpam des Pre-commit review requested. @@ -140,7 +138,6 @@ bin/dd/Makefile:MAINTAINER= green@FreeBSD.org games/fortune/datfiles/Makefile:MAINTAINER= jkh gnu/usr.bin/man/apropos/Makefile:MAINTAINER= wosch -sbin/dhclient/Makefile.inc:MAINTAINER= mbr sys/modules/3dfx/Makefile:MAINTAINER= cokane@FreeBSD.org sys/modules/urio/Makefile:MAINTAINER= Iwasa Kazmi <kzmi@ca2.so-net.ne.jp> tools/tools/sysdoc/Makefile:MAINTAINER= trhodes@FreeBSD.org ==== //depot/projects/trustedbsd/base/bin/cp/cp.c#17 (text+ko) ==== @@ -42,7 +42,7 @@ #endif /* not lint */ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/bin/cp/cp.c,v 1.52 2005/09/05 04:36:08 csjp Exp $"); +__FBSDID("$FreeBSD: src/bin/cp/cp.c,v 1.53 2006/07/04 20:52:36 maxim Exp $"); /* * Cp copies source files to target files. @@ -476,6 +476,7 @@ } if (errno) err(1, "fts_read"); + fts_close(ftsp); return (rval); } ==== //depot/projects/trustedbsd/base/lib/msun/src/e_scalbf.c#6 (text+ko) ==== @@ -14,7 +14,7 @@ */ #ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_scalbf.c,v 1.10 2005/12/06 20:12:38 obrien Exp $"; +static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_scalbf.c,v 1.11 2006/07/05 02:16:29 bde Exp $"; #endif #include "math.h" @@ -42,5 +42,3 @@ return scalbnf(x,(int)fn); #endif } - -__weak_reference(scalbf, ldexpf); ==== //depot/projects/trustedbsd/base/sbin/dhclient/dhclient.c#6 (text+ko) ==== @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sbin/dhclient/dhclient.c,v 1.15 2006/05/23 16:57:47 imp Exp $"); +__FBSDID("$FreeBSD: src/sbin/dhclient/dhclient.c,v 1.16 2006/07/03 22:05:38 jkim Exp $"); #include "dhcpd.h" #include "privsep.h" @@ -1480,7 +1480,6 @@ } } -#ifdef SEND_CLIENT_IDENTIFIER /* set unique client identifier */ char client_ident[sizeof(struct hardware)]; if (!options[DHO_DHCP_CLIENT_IDENTIFIER]) { @@ -1494,7 +1493,6 @@ options[DHO_DHCP_CLIENT_IDENTIFIER]->buf_size = hwlen+1; options[DHO_DHCP_CLIENT_IDENTIFIER]->timeout = 0xFFFFFFFF; } -#endif /* Set up the option buffer... */ ip->client->packet_length = cons_options(NULL, &ip->client->packet, 0, @@ -1606,7 +1604,6 @@ } } -#ifdef SEND_CLIENT_IDENTIFIER /* set unique client identifier */ char client_ident[sizeof(struct hardware)]; if (!options[DHO_DHCP_CLIENT_IDENTIFIER]) { @@ -1620,7 +1617,6 @@ options[DHO_DHCP_CLIENT_IDENTIFIER]->buf_size = hwlen+1; options[DHO_DHCP_CLIENT_IDENTIFIER]->timeout = 0xFFFFFFFF; } -#endif /* Set up the option buffer... */ ip->client->packet_length = cons_options(NULL, &ip->client->packet, 0, ==== //depot/projects/trustedbsd/base/sys/Makefile#12 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/Makefile,v 1.36 2006/05/29 19:29:41 maxim Exp $ +# $FreeBSD: src/sys/Makefile,v 1.37 2006/07/04 14:14:16 maxim Exp $ .include <bsd.own.mk> @@ -10,7 +10,7 @@ .endif # Directories to include in cscope name file and TAGS. -CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs gnu i4b isa \ +CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \ isofs kern libkern modules net net80211 netatalk netatm \ netgraph netinet netinet6 netipx netkey netnatm netncp \ netsmb nfs nfsclient nfs4client rpc pccard pci posix4 sys \ ==== //depot/projects/trustedbsd/base/sys/amd64/amd64/pmap.c#31 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.563 2006/07/02 18:22:46 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.564 2006/07/05 07:04:31 alc Exp $"); /* * Manages physical address maps. @@ -207,7 +207,7 @@ static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); -static void pmap_clear_ptes(vm_page_t m, long bit); +static void pmap_clear_write(vm_page_t m); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); @@ -2969,47 +2969,36 @@ } /* - * Clear the given bit in each of the given page's ptes. + * Clear the write and modified bits in each of the given page's mappings. */ static __inline void -pmap_clear_ptes(vm_page_t m, long bit) +pmap_clear_write(vm_page_t m) { pv_entry_t pv; pmap_t pmap; - pt_entry_t pbits, *pte; + pt_entry_t oldpte, *pte; - if ((m->flags & PG_FICTITIOUS) || - (bit == PG_RW && (m->flags & PG_WRITEABLE) == 0)) + if ((m->flags & PG_FICTITIOUS) != 0 || + (m->flags & PG_WRITEABLE) == 0) return; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - /* - * Loop over all current mappings setting/clearing as appropos If - * setting RO do we need to clear the VAC? - */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); retry: - pbits = *pte; - if (pbits & bit) { - if (bit == PG_RW) { - if (!atomic_cmpset_long(pte, pbits, - pbits & ~(PG_RW | PG_M))) - goto retry; - if (pbits & PG_M) { - vm_page_dirty(m); - } - } else { - atomic_clear_long(pte, bit); - } + oldpte = *pte; + if (oldpte & PG_RW) { + if (!atomic_cmpset_long(pte, oldpte, oldpte & + ~(PG_RW | PG_M))) + goto retry; + if ((oldpte & PG_M) != 0) + vm_page_dirty(m); pmap_invalidate_page(pmap, pv->pv_va); } PMAP_UNLOCK(pmap); } - if (bit == PG_RW) - vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_flag_clear(m, PG_WRITEABLE); } /* @@ -3022,7 +3011,7 @@ { if ((prot & VM_PROT_WRITE) == 0) { if (prot & (VM_PROT_READ | VM_PROT_EXECUTE)) { - pmap_clear_ptes(m, PG_RW); + pmap_clear_write(m); } else { pmap_remove_all(m); } @@ -3082,7 +3071,23 @@ void pmap_clear_modify(vm_page_t m) { - pmap_clear_ptes(m, PG_M); + pv_entry_t pv; + pmap_t pmap; + pt_entry_t *pte; + + if ((m->flags & PG_FICTITIOUS) != 0) + return; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pte = pmap_pte(pmap, pv->pv_va); + if (*pte & PG_M) { + atomic_clear_long(pte, PG_M); + pmap_invalidate_page(pmap, pv->pv_va); + } + PMAP_UNLOCK(pmap); + } } /* @@ -3093,7 +3098,23 @@ void pmap_clear_reference(vm_page_t m) { - pmap_clear_ptes(m, PG_A); + pv_entry_t pv; + pmap_t pmap; + pt_entry_t *pte; + + if ((m->flags & PG_FICTITIOUS) != 0) + return; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pte = pmap_pte(pmap, pv->pv_va); + if (*pte & PG_A) { + atomic_clear_long(pte, PG_A); + pmap_invalidate_page(pmap, pv->pv_va); + } + PMAP_UNLOCK(pmap); + } } /* ==== //depot/projects/trustedbsd/base/sys/amd64/conf/GENERIC#24 (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.462 2006/06/26 22:03:20 babkin Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.463 2006/07/05 02:32:55 davidxu Exp $ cpu HAMMER ident GENERIC @@ -28,7 +28,6 @@ #options SCHED_ULE # ULE scheduler options SCHED_4BSD # 4BSD scheduler -#options SCHED_CORE # CORE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols ==== //depot/projects/trustedbsd/base/sys/bsm/audit_kevents.h#4 (text+ko) ==== @@ -30,8 +30,8 @@ * * @APPLE_BSD_LICENSE_HEADER_END@ * - * $P4: //depot/projects/trustedbsd/base/sys/bsm/audit_kevents.h#3 $ - * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.5 2006/02/06 01:12:46 rwatson Exp $ + * $P4: //depot/projects/trustedbsd/base/sys/bsm/audit_kevents.h#4 $ + * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.6 2006/07/03 14:45:43 rwatson Exp $ */ #ifndef _BSM_AUDIT_KEVENTS_H_ @@ -384,7 +384,24 @@ #define AUE_ACL_DELETE_FD 403 /* FreeBSD. */ #define AUE_ACL_CHECK_FILE 404 /* FreeBSD. */ #define AUE_ACL_CHECK_FD 405 /* FreeBSD. */ -#define AUE_SYSARCH 406 /* FreeBSD. */ +#define AUE_ACL_GET_LINK 406 /* FreeBSD. */ +#define AUE_ACL_SET_LINK 407 /* FreeBSD. */ +#define AUE_ACL_DELETE_LINK 408 /* FreeBSD. */ +#define AUE_ACL_CHECK_LINK 409 /* FreeBSD. */ +#define AUE_SYSARCH 410 /* FreeBSD. */ +#define AUE_EXTATTRCTL 411 /* FreeBSD. */ +#define AUE_EXTATTR_GET_FILE 412 /* FreeBSD. */ +#define AUE_EXTATTR_SET_FILE 413 /* FreeBSD. */ +#define AUE_EXTATTR_LIST_FILE 414 /* FreeBSD. */ +#define AUE_EXTATTR_DELETE_FILE 415 /* FreeBSD. */ +#define AUE_EXTATTR_GET_FD 416 /* FreeBSD. */ +#define AUE_EXTATTR_SET_FD 417 /* FreeBSD. */ +#define AUE_EXTATTR_LIST_FD 418 /* FreeBSD. */ +#define AUE_EXTATTR_DELETE_FD 419 /* FreeBSD. */ +#define AUE_EXTATTR_GET_LINK 420 /* FreeBSD. */ +#define AUE_EXTATTR_SET_LINK 421 /* FreeBSD. */ +#define AUE_EXTATTR_LIST_LINK 422 /* FreeBSD. */ +#define AUE_EXTATTR_DELETE_LINK 423 /* FreeBSD. */ /* * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the ==== //depot/projects/trustedbsd/base/sys/bsm/audit_record.h#3 (text) ==== @@ -31,12 +31,14 @@ * @APPLE_BSD_LICENSE_HEADER_END@ * * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#13 $ - * $FreeBSD: src/sys/bsm/audit_record.h,v 1.2 2006/06/05 13:00:52 rwatson Exp $ + * $FreeBSD: src/sys/bsm/audit_record.h,v 1.3 2006/07/03 14:44:13 rwatson Exp $ */ #ifndef _BSM_AUDIT_RECORD_H_ #define _BSM_AUDIT_RECORD_H_ +#include <sys/time.h> /* struct timeval */ + /* * Token type identifiers. */ ==== //depot/projects/trustedbsd/base/sys/dev/ata/ata-chipset.c#38 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.164 2006/06/28 09:59:09 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.165 2006/07/04 20:36:03 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -142,6 +142,7 @@ static void ata_promise_queue_hpkt(struct ata_pci_controller *ctlr, u_int32_t hpkt); static void ata_promise_next_hpkt(struct ata_pci_controller *ctlr); static int ata_serverworks_chipinit(device_t dev); +static int ata_serverworks_allocate(device_t dev); static void ata_serverworks_setmode(device_t dev, int mode); static int ata_sii_chipinit(device_t dev); static int ata_cmd_allocate(device_t dev); @@ -1894,6 +1895,8 @@ for (i = ATA_DATA; i < ATA_MAX_RES; i++) ch->r_io[i].res = ctlr->r_res2; + + /* setup ATA registers */ ch->r_io[ATA_DATA].offset = ch_offset + 0x00; ch->r_io[ATA_FEATURE].offset = ch_offset + 0x06; ch->r_io[ATA_COUNT].offset = ch_offset + 0x08; @@ -1906,9 +1909,13 @@ ch->r_io[ATA_STATUS].offset = ch_offset + 0x1c; ch->r_io[ATA_ALTSTAT].offset = ch_offset + 0x28; ch->r_io[ATA_CONTROL].offset = ch_offset + 0x29; + + /* setup DMA registers */ ch->r_io[ATA_SSTATUS].offset = ch_offset + 0x100; ch->r_io[ATA_SERROR].offset = ch_offset + 0x104; ch->r_io[ATA_SCONTROL].offset = ch_offset + 0x108; + + /* setup SATA registers */ ch->r_io[ATA_BMCMD_PORT].offset = ch_offset + 0x70; ch->r_io[ATA_BMSTAT_PORT].offset = ch_offset + 0x72; ch->r_io[ATA_BMDTP_PORT].offset = ch_offset + 0x74; @@ -3890,11 +3897,14 @@ struct ata_pci_controller *ctlr = device_get_softc(dev); struct ata_chip_id *idx; static struct ata_chip_id ids[] = - {{ ATA_ROSB4, 0x00, SWKS33, 0x00, ATA_UDMA2, "ROSB4" }, - { ATA_CSB5, 0x92, SWKS100, 0x00, ATA_UDMA5, "CSB5" }, - { ATA_CSB5, 0x00, SWKS66, 0x00, ATA_UDMA4, "CSB5" }, - { ATA_CSB6, 0x00, SWKS100, 0x00, ATA_UDMA5, "CSB6" }, - { ATA_CSB6_1, 0x00, SWKS66, 0x00, ATA_UDMA4, "CSB6" }, + {{ ATA_ROSB4, 0x00, SWKS33, 0x00, ATA_UDMA2, "ROSB4" }, + { ATA_CSB5, 0x92, SWKS100, 0x00, ATA_UDMA5, "CSB5" }, + { ATA_CSB5, 0x00, SWKS66, 0x00, ATA_UDMA4, "CSB5" }, + { ATA_CSB6, 0x00, SWKS100, 0x00, ATA_UDMA5, "CSB6" }, + { ATA_CSB6_1, 0x00, SWKS66, 0x00, ATA_UDMA4, "CSB6" }, + { ATA_HT1000, 0x00, SWKS100, 0x00, ATA_UDMA5, "HT1000" }, + { ATA_HT1000_S1, 0x00, SWKS100, 0x00, ATA_SA150, "HT1000 SATA" }, + { ATA_HT1000_S2, 0x00, SWKSMIO, 0x00, ATA_SA150, "HT1000 SATA mmio" }, { 0, 0, 0, 0, 0, 0}}; char buffer[64]; @@ -3917,7 +3927,19 @@ if (ata_setup_interrupt(dev)) return ENXIO; - if (ctlr->chip->cfg1 == SWKS33) { + if (ctlr->chip->cfg1 == SWKSMIO) { + ctlr->r_type2 = SYS_RES_MEMORY; + ctlr->r_rid2 = PCIR_BAR(5); + if (!(ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2, + &ctlr->r_rid2, RF_ACTIVE))) + return ENXIO; + + ctlr->channels = 4; + ctlr->allocate = ata_serverworks_allocate; + ctlr->setmode = ata_sata_setmode; + return 0; + } + else if (ctlr->chip->cfg1 == SWKS33) { device_t *children; int nchildren, i; @@ -3943,6 +3965,46 @@ return 0; } +static int +ata_serverworks_allocate(device_t dev) +{ + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); + struct ata_channel *ch = device_get_softc(dev); + int ch_offset; + int i; + + ch_offset = ch->unit * 0x100; + + for (i = ATA_DATA; i < ATA_MAX_RES; i++) + ch->r_io[i].res = ctlr->r_res2; + + /* setup ATA registers */ + ch->r_io[ATA_DATA].offset = ch_offset + 0x00; + ch->r_io[ATA_FEATURE].offset = ch_offset + 0x04; + ch->r_io[ATA_COUNT].offset = ch_offset + 0x08; + ch->r_io[ATA_SECTOR].offset = ch_offset + 0x0c; + ch->r_io[ATA_CYL_LSB].offset = ch_offset + 0x10; + ch->r_io[ATA_CYL_MSB].offset = ch_offset + 0x14; + ch->r_io[ATA_DRIVE].offset = ch_offset + 0x18; + ch->r_io[ATA_COMMAND].offset = ch_offset + 0x1c; + ch->r_io[ATA_CONTROL].offset = ch_offset + 0x20; + ata_default_registers(dev); + + /* setup DMA registers */ + ch->r_io[ATA_BMCMD_PORT].offset = ch_offset + 0x30; + ch->r_io[ATA_BMSTAT_PORT].offset = ch_offset + 0x32; + ch->r_io[ATA_BMDTP_PORT].offset = ch_offset + 0x34; + + /* setup SATA registers */ + ch->r_io[ATA_SSTATUS].offset = ch_offset + 0x40; + ch->r_io[ATA_SERROR].offset = ch_offset + 0x44; + ch->r_io[ATA_SCONTROL].offset = ch_offset + 0x48; + + ch->flags |= ATA_NO_SLAVE; + ata_pci_hw(dev); + return 0; +} + static void ata_serverworks_setmode(device_t dev, int mode) { @@ -4200,6 +4262,7 @@ ch->r_io[ATA_CONTROL].offset = 0x8a + (unit01 << 6) + (unit10 << 8); ch->r_io[ATA_IDX_ADDR].res = ctlr->r_res2; ata_default_registers(dev); + ch->r_io[ATA_BMCMD_PORT].res = ctlr->r_res2; ch->r_io[ATA_BMCMD_PORT].offset = 0x00 + (unit01 << 3) + (unit10 << 8); ch->r_io[ATA_BMSTAT_PORT].res = ctlr->r_res2; ==== //depot/projects/trustedbsd/base/sys/dev/ata/ata-lowlevel.c#18 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.76 2006/01/18 09:14:55 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.77 2006/07/04 20:36:03 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -719,7 +719,7 @@ DELAY(20); } if (timeout <= 0) { - device_printf(request->dev,"timeout waiting for ATAPI ready\n"); + device_printf(request->dev, "timeout waiting for ATAPI ready\n"); request->result = EIO; return -1; } ==== //depot/projects/trustedbsd/base/sys/dev/ata/ata-pci.h#28 (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/sys/dev/ata/ata-pci.h,v 1.64 2006/03/13 14:01:37 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.65 2006/07/04 20:36:03 sos Exp $ */ /* structure holding chipset config info */ @@ -249,6 +249,9 @@ #define ATA_CSB5 0x02121166 #define ATA_CSB6 0x02131166 #define ATA_CSB6_1 0x02171166 +#define ATA_HT1000 0x02141166 +#define ATA_HT1000_S1 0x024b1166 +#define ATA_HT1000_S2 0x024a1166 #define ATA_SILICON_IMAGE_ID 0x1095 #define ATA_SII3114 0x31141095 @@ -362,6 +365,7 @@ #define SWKS33 0 #define SWKS66 1 #define SWKS100 2 +#define SWKSMIO 3 #define SIIMEMIO 1 #define SIIINTR 0x01 ==== //depot/projects/trustedbsd/base/sys/dev/atkbdc/atkbdc_isa.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbdc_isa.c,v 1.35 2006/06/12 14:46:44 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbdc_isa.c,v 1.36 2006/07/03 23:40:58 jkim Exp $"); #include "opt_kbd.h" @@ -112,15 +112,21 @@ * The AT keyboard controller uses two ports (a command/data port * 0x60 and a status port 0x64), which may be given to us in * one resource (0x60 through 0x64) or as two separate resources - * (0x60 and 0x64). Furthermore, /boot/device.hints may contain - * just one port, 0x60. We shall adjust resource settings - * so that these two ports are available as two separate resources. + * (0x60 and 0x64). Some brain-damaged ACPI BIOS has reversed + * command/data port and status port. Furthermore, /boot/device.hints + * may contain just one port, 0x60. We shall adjust resource settings + * so that these two ports are available as two separate resources + * in correct order. */ device_quiet(dev); rid = 0; if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count) != 0) return ENXIO; - if (count > 1) /* adjust the count */ + if (start == IO_KBD + KBD_STATUS_PORT) { + start = IO_KBD; + count++; + } + if (count > 1) /* adjust the count and/or start port */ bus_set_resource(dev, SYS_RES_IOPORT, rid, start, 1); port0 = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (port0 == NULL) ==== //depot/projects/trustedbsd/base/sys/dev/isp/isp.c#33 (text+ko) ==== @@ -34,7 +34,7 @@ */ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.120 2006/07/03 08:24:09 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.121 2006/07/03 20:56:48 mjacob Exp $"); #endif /* @@ -1329,7 +1329,11 @@ icbp->icb_hardaddr = 0; } - if (IS_2322(isp) || IS_24XX(isp)) { + /* + * Our life seems so much better with 2200s and later with + * the latest f/w if we set Hard Address. + */ + if (ISP_FW_NEWER_THAN(isp, 2, 2, 5)) { icbp->icb_fwoptions |= ICBOPT_HARD_ADDRESS; } @@ -2238,7 +2242,7 @@ hival = FC_PORT_ID; break; default: - isp_prt(isp, ISP_LOGDEBUG0, "no loop scasn\n"); + isp_prt(isp, ISP_LOGDEBUG0, "no loop topology to scan"); fcp->isp_loopstate = LOOP_LSCAN_DONE; return (0); } ==== //depot/projects/trustedbsd/base/sys/dev/sk/if_sk.c#3 (text) ==== @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/sk/if_sk.c,v 1.125 2006/06/07 09:05:20 yongari Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/sk/if_sk.c,v 1.126 2006/07/05 04:56:50 yongari Exp $"); /* * SysKonnect SK-NET gigabit ethernet driver for FreeBSD. Supports @@ -140,7 +140,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/sys/dev/sk/if_sk.c,v 1.125 2006/06/07 09:05:20 yongari Exp $"; + "$FreeBSD: src/sys/dev/sk/if_sk.c,v 1.126 2006/07/05 04:56:50 yongari Exp $"; #endif static struct sk_type sk_devs[] = { @@ -2871,8 +2871,8 @@ SK_IF_LOCK(sc_if); /* - * Reclaim first as there is a possibility of loosing Tx completion - * interrupt. + * Reclaim first as there is a possibility of losing Tx completion + * interrupts. */ sk_txeof(sc_if); if (sc_if->sk_cdata.sk_tx_cnt != 0) { ==== //depot/projects/trustedbsd/base/sys/dev/usb/if_aue.c#33 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.96 2006/02/14 12:44:55 glebius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.97 2006/07/05 00:49:26 thompsa Exp $"); /* * ADMtek AN986 Pegasus and AN8511 Pegasus II USB to ethernet driver. @@ -524,6 +524,7 @@ struct ifnet *ifp; struct ifmultiaddr *ifma; u_int32_t h = 0, i; + u_int8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; ifp = sc->aue_ifp; @@ -534,10 +535,6 @@ AUE_CLRBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI); - /* first, zot all the existing hash bits */ - for (i = 0; i < 8; i++) - aue_csr_write_1(sc, AUE_MAR0 + i, 0); - /* now program new ones */ IF_ADDR_LOCK(ifp); #if __FreeBSD_version >= 500000 @@ -550,10 +547,14 @@ continue; h = ether_crc32_le(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), ETHER_ADDR_LEN) & ((1 << AUE_BITS) - 1); - AUE_SETBIT(sc, AUE_MAR + (h >> 3), 1 << (h & 0x7)); + hashtbl[(h >> 3)] |= 1 << (h & 0x7); } IF_ADDR_UNLOCK(ifp); + /* write the hashtable */ + for (i = 0; i < 8; i++) + aue_csr_write_1(sc, AUE_MAR0 + i, hashtbl[i]); + return; } ==== //depot/projects/trustedbsd/base/sys/i386/conf/GENERIC#56 (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/i386/conf/GENERIC,v 1.452 2006/06/26 22:03:21 babkin Exp $ +# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.453 2006/07/05 02:32:54 davidxu Exp $ cpu I486_CPU cpu I586_CPU @@ -30,7 +30,6 @@ #options SCHED_ULE # ULE scheduler options SCHED_4BSD # 4BSD scheduler -#options SCHED_CORE # CORE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols ==== //depot/projects/trustedbsd/base/sys/ia64/include/ieeefp.h#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/include/ieeefp.h,v 1.4 2003/08/11 21:25:19 marcel Exp $ + * $FreeBSD: src/sys/ia64/include/ieeefp.h,v 1.5 2006/07/05 06:10:21 bde Exp $ */ #ifndef _MACHINE_IEEEFP_H_ @@ -39,10 +39,10 @@ #define FP_X_IMP IA64_FPSR_TRAP_ID /* imprecise(inexact) exception */ typedef enum { - FP_RZ=0, /* round to zero (truncate) */ - FP_RM=1, /* round toward negative infinity */ - FP_RN=2, /* round to nearest representable number */ - FP_RP=3 /* round toward positive infinity */ + FP_RN = 0, /* round to nearest */ + FP_RM, /* round toward minus infinity */ + FP_RP, /* round toward plus infinity */ + FP_RZ /* round toward zero */ } fp_rnd_t; -#endif /* _MACHINE_IEEEFP_H_ */ +#endif /* !_MACHINE_IEEEFP_H_ */ ==== //depot/projects/trustedbsd/base/sys/net/bpf.c#42 (text+ko) ==== @@ -33,7 +33,7 @@ * * @(#)bpf.c 8.4 (Berkeley) 1/9/95 * - * $FreeBSD: src/sys/net/bpf.c,v 1.168 2006/06/15 15:39:12 csjp Exp $ + * $FreeBSD: src/sys/net/bpf.c,v 1.169 2006/07/03 20:02:06 csjp Exp $ */ #include "opt_bpf.h" @@ -1152,7 +1152,7 @@ d->bd_pid = curthread->td_proc->p_pid; kn->kn_fop = &bpfread_filtops; kn->kn_hook = d; - knlist_add(&d->bd_sel.si_note, kn, 0); + knlist_add(&d->bd_sel.si_note, kn, 1); BPFD_UNLOCK(d); return (0); @@ -1163,9 +1163,7 @@ { struct bpf_d *d = (struct bpf_d *)kn->kn_hook; - BPFD_LOCK(d); knlist_remove(&d->bd_sel.si_note, kn, 0); - BPFD_UNLOCK(d); } static int ==== //depot/projects/trustedbsd/base/sys/net/if_enc.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/net/if_enc.c,v 1.3 2006/06/28 21:57:35 thompsa Exp $ + * $FreeBSD: src/sys/net/if_enc.c,v 1.4 2006/07/04 23:09:11 thompsa Exp $ */ #include <sys/param.h> @@ -86,27 +86,18 @@ static int enc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt); static int enc_clone_create(struct if_clone *, int); -static int enc_clone_destroy(struct ifnet *); +static void enc_clone_destroy(struct ifnet *); IFC_SIMPLE_DECLARE(enc, 1); -static int +static void enc_clone_destroy(struct ifnet *ifp) { + KASSERT(ifp != encif, ("%s: destroying encif", __func__)); - mtx_lock(&enc_mtx); - /* do not allow enc0 to be destroyed */ - if (encif == ifp) { - mtx_unlock(&enc_mtx); - return (EBUSY); - } - mtx_unlock(&enc_mtx); - bpfdetach(ifp); if_detach(ifp); if_free(ifp); - - return (0); } static int ==== //depot/projects/trustedbsd/base/sys/netinet/libalias/libalias.3#3 (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/netinet/libalias/libalias.3,v 1.54 2005/11/24 14:17:35 ru Exp $ +.\" $FreeBSD: src/sys/netinet/libalias/libalias.3,v 1.55 2006/07/04 20:39:38 maxim Exp $ .\" -.Dd January 17, 2004 +.Dd July 04, 2006 .Dt LIBALIAS 3 .Os .Sh NAME @@ -1011,8 +1011,3 @@ a unique aliasing link can be established. In an alternate operating mode, the first choice of an aliasing port is also random and unrelated to the local port number. -.Sh BUGS -PPTP aliasing does not work when more than one internal client -connects to the same external server at the same time, because -PPTP requires a single TCP control connection to be established -between any two IP addresses. ==== //depot/projects/trustedbsd/base/sys/security/audit/audit.h#3 (text) ==== @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/security/audit/audit.h,v 1.6 2006/03/19 17:34:00 rwatson Exp $ + * $FreeBSD: src/sys/security/audit/audit.h,v 1.7 2006/07/03 14:55:55 rwatson Exp $ */ /* @@ -151,7 +151,7 @@ void audit_arg_process(struct proc *p); void audit_arg_signum(u_int signum); void audit_arg_socket(int sodomain, int sotype, int soprotocol); -void audit_arg_sockaddr(struct thread *td, struct sockaddr *so); +void audit_arg_sockaddr(struct thread *td, struct sockaddr *sa); void audit_arg_auid(uid_t auid); void audit_arg_auditinfo(struct auditinfo *au_info); void audit_arg_upath(struct thread *td, char *upath, u_int64_t flags); ==== //depot/projects/trustedbsd/base/sys/security/audit/audit_arg.c#4 (text) ==== @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/security/audit/audit_arg.c,v 1.4 2006/06/05 16:12:00 rwatson Exp $ + * $FreeBSD: src/sys/security/audit/audit_arg.c,v 1.5 2006/07/03 14:55:55 rwatson Exp $ */ #include <sys/param.h> @@ -357,13 +357,14 @@ { struct kaudit_record *ar; + KASSERT(p != NULL, ("audit_arg_process: p == NULL")); + + PROC_LOCK_ASSERT(p, MA_OWNED); + ar = currecord(); - if ((ar == NULL) || (p == NULL)) + if (ar == NULL) return; - /* - * XXXAUDIT: PROC_LOCK_ASSERT(p); - */ ar->k_ar.ar_arg_auid = p->p_au->ai_auid; ar->k_ar.ar_arg_euid = p->p_ucred->cr_uid; ar->k_ar.ar_arg_egid = p->p_ucred->cr_groups[0]; @@ -404,21 +405,21 @@ ARG_SET_VALID(ar, ARG_SOCKINFO); } -/* - * XXXAUDIT: Argument here should be 'sa' not 'so'. Caller is responsible - * for synchronizing access to the source of the address. - */ void -audit_arg_sockaddr(struct thread *td, struct sockaddr *so) +audit_arg_sockaddr(struct thread *td, struct sockaddr *sa) { struct kaudit_record *ar; + KASSERT(td != NULL, ("audit_arg_sockaddr: td == NULL")); + KASSERT(sa != NULL, ("audit_arg_sockaddr: sa == NULL")); + ar = currecord(); - if (ar == NULL || td == NULL || so == NULL) + if (ar == NULL) return; - bcopy(so, &ar->k_ar.ar_arg_sockaddr, sizeof(ar->k_ar.ar_arg_sockaddr)); - switch (so->sa_family) { >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607051102.k65B2798014050>