From owner-p4-projects@FreeBSD.ORG Sun Apr 16 00:03:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4B38F16A404; Sun, 16 Apr 2006 00:03:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A0DC16A401 for ; Sun, 16 Apr 2006 00:03:36 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0C1A43D46 for ; Sun, 16 Apr 2006 00:03:35 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3G03Z0Z078263 for ; Sun, 16 Apr 2006 00:03:35 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3G03Zn3078260 for perforce@freebsd.org; Sun, 16 Apr 2006 00:03:35 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Apr 2006 00:03:35 GMT Message-Id: <200604160003.k3G03Zn3078260@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95372 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 00:03:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=95372 Change 95372 by jb@jb_freebsd2 on 2006/04/16 00:02:38 Compatibility cruft. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/dump/dump.c#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/dump/dump.c#2 (text) ==== @@ -27,7 +27,9 @@ #pragma ident "@(#)dump.c 1.12 05/06/08 SMI" #include +# if defined(sun) #include +#endif #include #include @@ -767,6 +769,9 @@ static int print_usage(FILE *fp, int verbose) { +#if !defined(sun) +#define getpname getprogname +#endif (void) fprintf(fp, "Usage: %s [-dfhlsSt] [-u file] file\n", getpname()); if (verbose) { From owner-p4-projects@FreeBSD.ORG Sun Apr 16 00:04:38 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 12F6216A402; Sun, 16 Apr 2006 00:04:38 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E790116A400 for ; Sun, 16 Apr 2006 00:04:37 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F27543D45 for ; Sun, 16 Apr 2006 00:04:37 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3G04bJn078320 for ; Sun, 16 Apr 2006 00:04:37 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3G04bFE078317 for perforce@freebsd.org; Sun, 16 Apr 2006 00:04:37 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Apr 2006 00:04:37 GMT Message-Id: <200604160004.k3G04bFE078317@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95373 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 00:04:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=95373 Change 95373 by jb@jb_freebsd2 on 2006/04/16 00:04:07 Build the 'C Type Format' dump utility. Affected files ... .. //depot/projects/dtrace/src/cddl/usr.bin/ctfdump/Makefile#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sun Apr 16 00:23:01 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E2E6516A404; Sun, 16 Apr 2006 00:23:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B884416A401 for ; Sun, 16 Apr 2006 00:23:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D28043D45 for ; Sun, 16 Apr 2006 00:23:00 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3G0MxNn088555 for ; Sun, 16 Apr 2006 00:23:00 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3G0Mx8k088544 for perforce@freebsd.org; Sun, 16 Apr 2006 00:22:59 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Apr 2006 00:22:59 GMT Message-Id: <200604160022.k3G0Mx8k088544@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95374 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 00:23:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=95374 Change 95374 by jb@jb_freebsd2 on 2006/04/16 00:21:58 Compatibility cruft. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/cmd/mdb/tools/common/util.h#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/cmd/mdb/tools/common/util.h#2 (text) ==== @@ -40,7 +40,9 @@ extern void die(char *, ...); extern void elfdie(char *, ...); +#if defined(sun) extern const char *progname; +#endif #ifdef __cplusplus } From owner-p4-projects@FreeBSD.ORG Sun Apr 16 03:12:25 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5739A16A405; Sun, 16 Apr 2006 03:12:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBC1C16A402 for ; Sun, 16 Apr 2006 03:12:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88CFA43D48 for ; Sun, 16 Apr 2006 03:12:24 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3G3COhY087237 for ; Sun, 16 Apr 2006 03:12:24 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3G3COuo087228 for perforce@freebsd.org; Sun, 16 Apr 2006 03:12:24 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Apr 2006 03:12:24 GMT Message-Id: <200604160312.k3G3COuo087228@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95376 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 03:12:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95376 Change 95376 by jb@jb_freebsd2 on 2006/04/16 03:12:18 During the bootstrap-tools, build-tools and cross-tools phases of 'make buildworld', don't try to add 'C Type Format' data to the built objects. Only in the 'world' phase is this done, and only if NO_CTF is not defined. Define NO_CTF if you only want normal objects to be built. Bear in mind that the size of the installed binaries grows when CTF data is present. Affected files ... .. //depot/projects/dtrace/src/Makefile.inc1#4 edit Differences ... ==== //depot/projects/dtrace/src/Makefile.inc1#4 (text+ko) ==== @@ -182,17 +182,18 @@ BOOTSTRAPPING=${OSRELDATE} \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ - -DNO_CPU_CFLAGS -DNO_WARNS + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ - BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS + BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \ + -DNO_WARNS -DNO_CTF # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ - -DWITHOUT_FORTRAN -DWITHOUT_GDB + -DWITHOUT_FORTRAN -DWITHOUT_GDB -DNO_CTF # world stage WMAKEENV= ${CROSSENV} \ From owner-p4-projects@FreeBSD.ORG Sun Apr 16 04:28:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 973E516A404; Sun, 16 Apr 2006 04:28:58 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83E3C16A400 for ; Sun, 16 Apr 2006 04:28:57 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FB5443D45 for ; Sun, 16 Apr 2006 04:28:57 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3G4Svu5031248 for ; Sun, 16 Apr 2006 04:28:57 GMT (envelope-from gnn@neville-neil.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3G4SuqJ031245 for perforce@freebsd.org; Sun, 16 Apr 2006 04:28:56 GMT (envelope-from gnn@neville-neil.com) Date: Sun, 16 Apr 2006 04:28:56 GMT Message-Id: <200604160428.k3G4SuqJ031245@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gnn@neville-neil.com using -f From: "George V. Neville-Neil" To: Perforce Change Reviews Cc: Subject: PERFORCE change 95377 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 04:28:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=95377 Change 95377 by gnn@fast_ipsec_integ on 2006/04/16 04:28:08 Integrate from HEAD Affected files ... .. //depot/projects/fast_ipsec/src/sys/alpha/alpha/pmap.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/amd64/amd64/pmap.c#8 integrate .. //depot/projects/fast_ipsec/src/sys/amd64/conf/GENERIC#5 integrate .. //depot/projects/fast_ipsec/src/sys/arm/include/asmacros.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/arm/include/atomic.h#6 integrate .. //depot/projects/fast_ipsec/src/sys/arm/xscale/i80321/i80321_pci.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/Makefile#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/README#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/arm_init.s#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.h#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/lib.c#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/lib.h#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/linker.cfg#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/main.c#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/xmodem.c#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/boot0/xmodem.h#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/arm/at91/inc/AT91RM9200.h#1 branch .. //depot/projects/fast_ipsec/src/sys/boot/i386/boot2/boot1.S#2 integrate .. //depot/projects/fast_ipsec/src/sys/boot/i386/cdboot/cdboot.s#2 integrate .. //depot/projects/fast_ipsec/src/sys/boot/i386/libi386/Makefile#5 integrate .. //depot/projects/fast_ipsec/src/sys/boot/i386/libi386/gatea20.c#2 delete .. //depot/projects/fast_ipsec/src/sys/boot/i386/libi386/libi386.h#5 integrate .. //depot/projects/fast_ipsec/src/sys/boot/i386/pxeldr/pxeldr.S#2 integrate .. //depot/projects/fast_ipsec/src/sys/boot/pc98/libpc98/Makefile#3 integrate .. //depot/projects/fast_ipsec/src/sys/boot/pc98/libpc98/gatea20.c#2 delete .. //depot/projects/fast_ipsec/src/sys/conf/files#10 integrate .. //depot/projects/fast_ipsec/src/sys/conf/options#9 integrate .. //depot/projects/fast_ipsec/src/sys/crypto/via/padlock.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/dev/acpica/acpi.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/dev/acpica/acpi_cmbat.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/dev/acpica/acpi_dock.c#1 branch .. //depot/projects/fast_ipsec/src/sys/dev/amr/amr_linux.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/dev/ata/ata-all.c#8 integrate .. //depot/projects/fast_ipsec/src/sys/dev/ata/ata-raid.c#7 integrate .. //depot/projects/fast_ipsec/src/sys/dev/bce/if_bce.c#1 branch .. //depot/projects/fast_ipsec/src/sys/dev/bce/if_bcefw.h#1 branch .. //depot/projects/fast_ipsec/src/sys/dev/bce/if_bcereg.h#1 branch .. //depot/projects/fast_ipsec/src/sys/dev/bge/if_bge.c#8 integrate .. //depot/projects/fast_ipsec/src/sys/dev/bge/if_bgereg.h#5 integrate .. //depot/projects/fast_ipsec/src/sys/dev/drm/radeon_state.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/dev/em/if_em_hw.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/dev/fxp/if_fxp.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/dev/hwpmc/hwpmc_mod.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/dev/mii/brgphy.c#7 integrate .. //depot/projects/fast_ipsec/src/sys/dev/mii/miidevs#3 integrate .. //depot/projects/fast_ipsec/src/sys/dev/mpt/mpt.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/dev/mpt/mpt.h#7 integrate .. //depot/projects/fast_ipsec/src/sys/dev/mpt/mpt_cam.c#6 integrate .. //depot/projects/fast_ipsec/src/sys/dev/mpt/mpt_pci.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/dev/mpt/mpt_raid.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/dev/ppbus/lpt.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/dev/ppbus/ppbconf.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/dev/ppc/ppc.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/dev/ppc/ppcvar.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/dev/safe/safe.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/dev/ubsec/ubsec.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/dev/usb/usbdevs#6 integrate .. //depot/projects/fast_ipsec/src/sys/dev/usb/uscanner.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/dev/xe/if_xe.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/fs/devfs/devfs.h#3 integrate .. //depot/projects/fast_ipsec/src/sys/geom/eli/g_eli.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/geom/geom_ccd.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/gnu/fs/ext2fs/ext2_bitops.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/i386/conf/GENERIC#5 integrate .. //depot/projects/fast_ipsec/src/sys/i386/conf/NOTES#7 integrate .. //depot/projects/fast_ipsec/src/sys/i386/i386/pmap.c#8 integrate .. //depot/projects/fast_ipsec/src/sys/ia64/ia64/pmap.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/kern/kern_event.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/kern/kern_intr.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/kern/kern_mutex.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/kern/subr_sleepqueue.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/modules/acpi/Makefile#2 integrate .. //depot/projects/fast_ipsec/src/sys/modules/acpi/acpi_dock/Makefile#1 branch .. //depot/projects/fast_ipsec/src/sys/modules/bce/Makefile#1 branch .. //depot/projects/fast_ipsec/src/sys/net/if_arc.h#2 integrate .. //depot/projects/fast_ipsec/src/sys/net/if_arcsubr.c#4 integrate .. //depot/projects/fast_ipsec/src/sys/netinet6/frag6.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/netinet6/in6_pcb.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/netinet6/raw_ip6.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/netinet6/udp6_output.c#2 integrate .. //depot/projects/fast_ipsec/src/sys/netinet6/udp6_usrreq.c#5 integrate .. //depot/projects/fast_ipsec/src/sys/netipx/ipx_usrreq.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/opencrypto/crypto.c#3 integrate .. //depot/projects/fast_ipsec/src/sys/opencrypto/cryptosoft.c#3 integrate Differences ... ==== //depot/projects/fast_ipsec/src/sys/alpha/alpha/pmap.c#5 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.188 2006/04/03 21:16:07 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.189 2006/04/12 04:22:50 alc Exp $"); #include #include @@ -696,22 +696,7 @@ * Low level helper routines..... ***************************************************/ - - /* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static PMAP_INLINE int -pmap_track_modified(vm_offset_t va) -{ - if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) - return 1; - else - return 0; -} - -/* * Routine: pmap_extract * Function: * Extract the physical page address associated @@ -1346,10 +1331,8 @@ ("get_pv_entry: wired pte %#lx", tpte)); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); - if ((tpte & PG_FOW) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } + if ((tpte & PG_FOW) == 0) + vm_page_dirty(m); pmap_invalidate_page(pmap, va); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -1449,10 +1432,8 @@ pmap->pm_stats.resident_count -= 1; if (oldpte & PG_MANAGED) { m = PHYS_TO_VM_PAGE(pmap_pte_pa(&oldpte)); - if ((oldpte & PG_FOW) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } + if ((oldpte & PG_FOW) == 0) + vm_page_dirty(m); if ((oldpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); return pmap_remove_entry(pmap, m, va); @@ -1581,10 +1562,8 @@ /* * Update the vm_page_t clean and reference bits. */ - if ((tpte & PG_FOW) == 0) { - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); - } + if ((tpte & PG_FOW) == 0) + vm_page_dirty(m); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); @@ -1666,8 +1645,7 @@ if ((oldpte & PG_FOW) == 0) { if (m == NULL) m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte)); - if (pmap_track_modified(sva)) - vm_page_dirty(m); + vm_page_dirty(m); oldpte |= PG_FOW; } oldpte = (oldpte & ~PG_PROT) | newprot; @@ -1763,8 +1741,7 @@ * so we go ahead and sense modify status. */ if (origpte & PG_MANAGED) { - if ((origpte & PG_FOW) != PG_FOW - && pmap_track_modified(va)) + if ((origpte & PG_FOW) != PG_FOW) vm_page_dirty(m); } @@ -1788,6 +1765,8 @@ * called at interrupt time. */ if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); pmap_insert_entry(pmap, va, mpte, m); managed |= PG_MANAGED; } @@ -1850,6 +1829,9 @@ register pt_entry_t *pte; int managed; + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0, + ("pmap_enter_quick: managed mapping within the clean submap")); mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); PMAP_LOCK(pmap); @@ -2168,8 +2150,7 @@ pmap->pm_stats.resident_count--; if ((tpte & PG_FOW) == 0) - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); + vm_page_dirty(m); npv = TAILQ_NEXT(pv, pv_plist); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); @@ -2209,14 +2190,6 @@ * setting RO do we need to clear the VAC? */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * don't write protect pager mappings - */ - if (!setem && bit == (PG_UWE|PG_KWE)) { - if (!pmap_track_modified(pv->pv_va)) - continue; - } - PMAP_LOCK(pv->pv_pmap); pte = pmap_lev3pte(pv->pv_pmap, pv->pv_va); ==== //depot/projects/fast_ipsec/src/sys/amd64/amd64/pmap.c#8 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.543 2006/04/04 20:17:35 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.545 2006/04/13 03:31:48 alc Exp $"); /* * Manages physical address maps. @@ -106,6 +106,7 @@ */ #include "opt_msgbuf.h" +#include "opt_pmap.h" #include #include @@ -619,20 +620,6 @@ * Low level helper routines..... ***************************************************/ - -/* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static PMAP_INLINE int -pmap_track_modified(vm_offset_t va) -{ - if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) - return 1; - else - return 0; -} - #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -1532,8 +1519,7 @@ KASSERT((tpte & PG_RW), ("pmap_collect: modified page not writable: va: %#lx, pte: %#lx", va, tpte)); - if (pmap_track_modified(va)) - vm_page_dirty(m); + vm_page_dirty(m); } pmap_invalidate_page(pmap, va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -1751,8 +1737,7 @@ KASSERT((oldpte & PG_RW), ("pmap_remove_pte: modified page not writable: va: %#lx, pte: %#lx", va, oldpte)); - if (pmap_track_modified(va)) - vm_page_dirty(m); + vm_page_dirty(m); } if (oldpte & PG_A) vm_page_flag_set(m, PG_REFERENCED); @@ -1940,8 +1925,7 @@ KASSERT((tpte & PG_RW), ("pmap_remove_all: modified page not writable: va: %#lx, pte: %#lx", pv->pv_va, tpte)); - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); + vm_page_dirty(m); } pmap_invalidate_page(pmap, pv->pv_va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -2030,8 +2014,7 @@ vm_page_flag_set(m, PG_REFERENCED); pbits &= ~PG_A; } - if ((pbits & PG_M) != 0 && - pmap_track_modified(sva)) { + if ((pbits & PG_M) != 0) { if (m == NULL) m = PHYS_TO_VM_PAGE(pbits & PG_FRAME); @@ -2182,6 +2165,8 @@ * Enter on the PV list if part of our managed memory. */ if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); pmap_insert_entry(pmap, va, m); pa |= PG_MANAGED; } @@ -2227,8 +2212,7 @@ KASSERT((origpte & PG_RW), ("pmap_enter: modified page not writable: va: %#lx, pte: %#lx", va, origpte)); - if ((origpte & PG_MANAGED) && - pmap_track_modified(va)) + if ((origpte & PG_MANAGED) != 0) vm_page_dirty(om); if ((newpte & PG_RW) == 0) invlva = TRUE; @@ -2258,6 +2242,9 @@ pt_entry_t *pte; vm_paddr_t pa; + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0, + ("pmap_enter_quick: managed mapping within the clean submap")); mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); PMAP_LOCK(pmap); @@ -2836,13 +2823,6 @@ mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * if the bit being tested is the modified bit, then - * mark clean_map and ptes as never - * modified. - */ - if (!pmap_track_modified(pv->pv_va)) - continue; pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); @@ -2898,14 +2878,6 @@ * setting RO do we need to clear the VAC? */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * don't write protect pager mappings - */ - if (bit == PG_RW) { - if (!pmap_track_modified(pv->pv_va)) - continue; - } - pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); @@ -2983,9 +2955,6 @@ TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - if (!pmap_track_modified(pv->pv_va)) - continue; - pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); ==== //depot/projects/fast_ipsec/src/sys/amd64/conf/GENERIC#5 (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.451 2006/03/31 23:04:48 emax Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.452 2006/04/10 20:04:22 ps Exp $ cpu HAMMER ident GENERIC @@ -192,6 +192,7 @@ # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support +device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet device dc # DEC/Intel 21143 and various workalikes ==== //depot/projects/fast_ipsec/src/sys/arm/include/asmacros.h#2 (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/arm/include/asmacros.h,v 1.4 2005/04/07 22:03:04 cognet Exp $ + * $FreeBSD: src/sys/arm/include/asmacros.h,v 1.5 2006/04/13 14:25:28 cognet Exp $ */ #ifndef _MACHINE_ASMACROS_H_ @@ -159,12 +159,12 @@ #define DO_AST \ ldr r0, [sp] /* Get the SPSR from stack */ ;\ mrs r4, cpsr /* save CPSR */ ;\ - orr r1, r4, #(I32_bit) ;\ + orr r1, r4, #(I32_bit|F32_bit) ;\ msr cpsr_c, r1 /* Disable interrupts */ ;\ and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\ teq r0, #(PSR_USR32_MODE) ;\ bne 2f /* Nope, get out now */ ;\ - bic r4, r4, #(I32_bit) ;\ + bic r4, r4, #(I32_bit|F32_bit) ;\ 1: ldr r5, .Lcurthread ;\ ldr r5, [r5] ;\ ldr r1, [r5, #(TD_FLAGS)] ;\ @@ -174,7 +174,7 @@ msr cpsr_c, r4 /* Restore interrupts */ ;\ mov r0, sp ;\ bl _C_LABEL(ast) /* ast(frame) */ ;\ - orr r0, r4, #(I32_bit) ;\ + orr r0, r4, #(I32_bit|F32_bit) ;\ msr cpsr_c, r0 ;\ b 1b ;\ 2: ==== //depot/projects/fast_ipsec/src/sys/arm/include/atomic.h#6 (text+ko) ==== @@ -33,7 +33,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/include/atomic.h,v 1.17 2006/02/06 18:29:05 cognet Exp $ + * $FreeBSD: src/sys/arm/include/atomic.h,v 1.18 2006/04/13 14:25:28 cognet Exp $ */ #ifndef _MACHINE_ATOMIC_H_ @@ -61,7 +61,7 @@ "orr %1, %0, %2;" \ "msr cpsr_all, %1;" \ : "=r" (cpsr_save), "=r" (tmp) \ - : "I" (I32_bit) \ + : "I" (I32_bit | F32_bit) \ : "cc" ); \ (expr); \ __asm __volatile( \ ==== //depot/projects/fast_ipsec/src/sys/arm/xscale/i80321/i80321_pci.c#4 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.6 2006/01/23 14:03:14 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.7 2006/04/13 15:07:59 cognet Exp $"); #include #include @@ -381,7 +381,8 @@ if (rv == NULL) return (NULL); if (type != SYS_RES_IRQ) { - bh += (rman_get_start(rv)); + if (type == SYS_RES_MEMORY) + bh += (rman_get_start(rv)); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); if (flags & RF_ACTIVE) { ==== //depot/projects/fast_ipsec/src/sys/boot/i386/boot2/boot1.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.30 2004/08/28 08:32:23 yar Exp $ + * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.31 2006/04/11 20:09:42 jhb Exp $ */ /* Memory Locations */ @@ -212,8 +212,7 @@ jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 -seta20.3: - sti # Enable interrupts +seta20.3: sti # Enable interrupts jmp start+MEM_JMP-MEM_ORG # Start BTX ==== //depot/projects/fast_ipsec/src/sys/boot/i386/cdboot/cdboot.s#2 (text+ko) ==== @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.13 2004/06/22 21:55:22 jhb Exp $ +# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.16 2006/04/11 17:36:08 jhb Exp $ # # This program is a freestanding boot program to load an a.out binary @@ -400,7 +400,7 @@ ff.checkname: lea DIR_NAME(%bx),%di # Address name in record push %si # Save repe cmpsb # Compare name - jcxz ff.match # We have a winner! + je ff.match # We have a winner! pop %si # Restore jmp ff.nextrec # Keep looking. ff.match: add $2,%sp # Discard saved %si @@ -485,10 +485,17 @@ ret # -# Enable A20 +# Enable A20. Put an upper limit on the amount of time we wait for the +# keyboard controller to get ready (65K x ISA access time). If +# we wait more than that amount, the hardware is probably +# legacy-free and simply doesn't have a keyboard controller. +# Thus, the A20 line is already enabled. # seta20: cli # Disable interrupts -seta20.1: in $0x64,%al # Get status + xor %cx,%cx # Clear +seta20.1: inc %cx # Increment, overflow? + jz seta20.3 # Yes + in $0x64,%al # Get status test $0x2,%al # Busy? jnz seta20.1 # Yes mov $0xd1,%al # Command: Write @@ -498,7 +505,7 @@ jnz seta20.2 # Yes mov $0xdf,%al # Enable out %al,$0x60 # A20 - sti # Enable interrupts +seta20.3: sti # Enable interrupts ret # To caller # ==== //depot/projects/fast_ipsec/src/sys/boot/i386/libi386/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.41 2006/03/14 19:02:00 jkim Exp $ +# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.42 2006/04/11 20:11:30 jhb Exp $ # LIB= i386 INTERNALLIB= @@ -6,7 +6,7 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \ comconsole.c devicename.c elf32_freebsd.c \ - elf64_freebsd.c gatea20.c \ + elf64_freebsd.c \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ smbios.c time.c vidconsole.c amd64_tramp.S ==== //depot/projects/fast_ipsec/src/sys/boot/i386/libi386/libi386.h#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/libi386.h,v 1.24 2006/03/09 22:49:44 jkim Exp $ + * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.25 2006/04/11 20:11:30 jhb Exp $ */ @@ -104,8 +104,6 @@ void smbios_detect(void); -void gateA20(void); - int i386_autoload(void); int bi_getboothowto(char *kargs); ==== //depot/projects/fast_ipsec/src/sys/boot/i386/pxeldr/pxeldr.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.13 2004/05/14 20:29:30 ru Exp $ + * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.14 2006/04/11 20:53:49 sobomax Exp $ */ /* @@ -227,10 +227,17 @@ jmp putstr # keep looping /* - * Enable A20 + * Enable A20. Put an upper limit on the amount of time we wait for the + * keyboard controller to get ready (65K x ISA access time). If + * we wait more than that amount, the hardware is probably + * legacy-free and simply doesn't have a keyboard controller. + * Thus, the A20 line is already enabled. */ seta20: cli # Disable interrupts -seta20.1: inb $0x64,%al # Get status + xor %cx,%cx # Clear +seta20.1: inc %cx # Increment, overflow? + jz seta20.3 # Yes + inb $0x64,%al # Get status testb $0x2,%al # Busy? jnz seta20.1 # Yes movb $0xd1,%al # Command: Write @@ -240,7 +247,7 @@ jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 - sti # Enable interrupts +seta20.3: sti # Enable interrupts retw # To caller /* ==== //depot/projects/fast_ipsec/src/sys/boot/pc98/libpc98/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.23 2005/12/20 08:54:30 sobomax Exp $ +# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.24 2006/04/11 20:11:30 jhb Exp $ # LIB= pc98 INTERNALLIB= @@ -7,7 +7,7 @@ SRCS= bioscd.c biosdisk.c biosmem.c biospnp.c biospci.c biossmap.c \ bootinfo.c bootinfo32.c comconsole.c devicename.c elf32_freebsd.c \ - gatea20.c i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ + i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ time.c vidconsole.c BOOT_COMCONSOLE_PORT?= 0x238 ==== //depot/projects/fast_ipsec/src/sys/conf/files#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1107 2006/03/30 21:39:36 marcel Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1109 2006/04/15 12:31:31 iwasaki Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -407,6 +407,7 @@ dev/acpica/acpi_throttle.c optional acpi dev/acpica/acpi_timer.c optional acpi dev/acpica/acpi_video.c optional acpi_video acpi +dev/acpica/acpi_dock.c optional acpi_dock acpi dev/adlink/adlink.c optional adlink dev/advansys/adv_eisa.c optional adv eisa dev/advansys/adv_pci.c optional adv pci @@ -475,6 +476,7 @@ dev/awi/am79c930.c optional awi dev/awi/awi.c optional awi dev/awi/if_awi_pccard.c optional awi pccard +dev/bce/if_bce.c optional bce dev/bfe/if_bfe.c optional bfe dev/bge/if_bge.c optional bge dev/bktr/bktr_audio.c optional bktr pci ==== //depot/projects/fast_ipsec/src/sys/conf/options#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.533 2006/04/03 18:14:01 sam Exp $ +# $FreeBSD: src/sys/conf/options,v 1.534 2006/04/10 20:04:21 ps Exp $ # # On the handling of kernel options # @@ -634,6 +634,9 @@ ED_3C503 opt_ed.h ED_SIC opt_ed.h +# bce driver +BCE_DEBUG opt_bce.h + # bge driver BGE_FAKE_AUTONEG opt_bge.h ==== //depot/projects/fast_ipsec/src/sys/crypto/via/padlock.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.1 2005/08/18 00:30:22 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.2 2006/04/12 12:13:34 pjd Exp $"); #include #include @@ -179,11 +179,7 @@ #endif padlock_sc = sc = malloc(sizeof(*padlock_sc), M_DEVBUF, - M_NOWAIT | M_ZERO); - if (padlock_sc == NULL) { - printf("PADLOCK: Could not allocate memory.\n"); - return (ENOMEM); - } + M_WAITOK | M_ZERO); TAILQ_INIT(&sc->sc_sessions); sc->sc_sid = 1; ==== //depot/projects/fast_ipsec/src/sys/dev/acpica/acpi.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.220 2006/03/29 06:30:47 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.221 2006/04/15 12:31:32 iwasaki Exp $"); #include "opt_acpi.h" #include @@ -1518,6 +1518,7 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status) { ACPI_OBJECT_TYPE type; + ACPI_HANDLE h; device_t bus, child; int order, probe_now; char *handle_str, **search; @@ -1577,8 +1578,17 @@ * "functional" (i.e. if disabled). Go ahead and probe them * anyway since we may enable them later. */ - if (type == ACPI_TYPE_DEVICE && !acpi_DeviceIsPresent(child) && - !acpi_MatchHid(handle, "PNP0C0F")) { + if (type == ACPI_TYPE_DEVICE && !acpi_DeviceIsPresent(child)) { + /* Never disable PCI link devices. */ + if (acpi_MatchHid(handle, "PNP0C0F")) + break; + /* + * Docking stations should remain enabled since the system + * may be undocked at boot. + */ + if (ACPI_SUCCESS(AcpiGetHandle(handle, "_DCK", &h))) + break; + device_disable(child); break; } ==== //depot/projects/fast_ipsec/src/sys/dev/acpica/acpi_cmbat.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.43 2005/11/26 07:36:53 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.45 2006/04/15 16:10:53 iwasaki Exp $"); #include "opt_acpi.h" #include @@ -157,7 +157,10 @@ static int acpi_cmbat_detach(device_t dev) { + ACPI_HANDLE handle; + handle = acpi_get_handle(dev); + AcpiRemoveNotifyHandler(handle, ACPI_ALL_NOTIFY, acpi_cmbat_notify_handler); acpi_battery_remove(dev); return (0); } @@ -435,6 +438,10 @@ * to wait a while. */ for (retry = 0; retry < ACPI_CMBAT_RETRY_MAX; retry++, AcpiOsSleep(10000)) { + /* batteries on DOCK can be ejected w/ DOCK during retrying */ + if (!device_is_attached(dev)) + return; + if (!acpi_BatteryIsPresent(dev)) continue; ==== //depot/projects/fast_ipsec/src/sys/dev/amr/amr_linux.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/amr/amr_linux.c,v 1.2 2006/02/23 18:05:38 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/amr/amr_linux.c,v 1.3 2006/04/14 16:13:28 ambrisko Exp $"); #include #include @@ -53,8 +53,8 @@ #include /* There are multiple ioctl number ranges that need to be handled */ -#define AMR_LINUX_IOCTL_MIN 0x00000 -#define AMR_LINUX_IOCTL_MAX 0x50000 +#define AMR_LINUX_IOCTL_MIN 0x6d00 +#define AMR_LINUX_IOCTL_MAX 0x6d01 static linux_ioctl_function_t amr_linux_ioctl; static struct linux_ioctl_handler amr_linux_handler = {amr_linux_ioctl, ==== //depot/projects/fast_ipsec/src/sys/dev/ata/ata-all.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.271 2006/03/31 08:09:04 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.272 2006/04/14 16:25:42 sos Exp $"); #include "opt_ata.h" #include @@ -277,8 +277,8 @@ if (!dev || !(ch = device_get_softc(dev))) return ENXIO; - /* wait for the channel to be IDLE before entering suspend mode */ - while (1) { + /* wait for the channel to be IDLE or detached before suspending */ + while (ch->r_irq) { mtx_lock(&ch->state_mtx); if (ch->state == ATA_IDLE) { ch->state = ATA_ACTIVE; ==== //depot/projects/fast_ipsec/src/sys/dev/ata/ata-raid.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.119 2006/03/09 08:34:44 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.120 2006/04/15 10:27:41 maxim Exp $"); #include "opt_ata.h" #include @@ -974,7 +974,7 @@ * metadata format from the disks (if we support it). */ printf("WARNING!! - not able to determine metadata format\n" - "WARNING!! - Using FreeBSD PsuedoRAID metadata\n" + "WARNING!! - Using FreeBSD PseudoRAID metadata\n" "If that is not what you want, use the BIOS to " "create the array\n"); ctlr = AR_F_FREEBSD_RAID; ==== //depot/projects/fast_ipsec/src/sys/dev/bge/if_bge.c#8 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.125 2006/03/17 09:17:36 glebius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.126 2006/04/15 08:13:06 scottl Exp $"); /* * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. @@ -2788,27 +2788,23 @@ } #endif + /* + * Do the mandatory PCI flush as well as get the link status. + */ + statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; + + /* Ack interrupt and stop others from occuring. */ + CSR_WRITE_4(sc, BGE_MBX_IRQ0_LO, 1); + + /* Make sure the descriptor ring indexes are coherent. */ bus_dmamap_sync(sc->bge_cdata.bge_status_tag, sc->bge_cdata.bge_status_map, BUS_DMASYNC_POSTREAD); - - statusword = - atomic_readandclear_32(&sc->bge_ldata.bge_status_block->bge_status); - bus_dmamap_sync(sc->bge_cdata.bge_status_tag, sc->bge_cdata.bge_status_map, BUS_DMASYNC_PREREAD); -#ifdef notdef - /* Avoid this for now -- checking this register is expensive. */ - /* Make sure this is really our interrupt. */ - if (!(CSR_READ_4(sc, BGE_MISC_LOCAL_CTL) & BGE_MLC_INTR_STATE)) - return; -#endif - /* Ack interrupt and stop others from occuring. */ - CSR_WRITE_4(sc, BGE_MBX_IRQ0_LO, 1); - if ((sc->bge_asicrev == BGE_ASICREV_BCM5700 && sc->bge_chipid != BGE_CHIPID_BCM5700_B1) || - statusword & BGE_STATFLAG_LINKSTATE_CHANGED || sc->bge_link_evt) + statusword || sc->bge_link_evt) bge_link_upd(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { ==== //depot/projects/fast_ipsec/src/sys/dev/bge/if_bgereg.h#5 (text+ko) ==== @@ -30,7 +30,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.46 2006/02/01 14:26:35 oleg Exp $ + * $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.47 2006/04/12 12:12:44 pjd Exp $ */ /* @@ -1160,7 +1160,7 @@ #define BGE_HCCMODE_ENABLE 0x00000002 #define BGE_HCCMODE_ATTN 0x00000004 #define BGE_HCCMODE_COAL_NOW 0x00000008 -#define BGE_HCCMODE_MSI_BITS 0x0x000070 +#define BGE_HCCMODE_MSI_BITS 0x00000070 #define BGE_HCCMODE_STATBLK_SIZE 0x00000180 #define BGE_STATBLKSZ_FULL 0x00000000 ==== //depot/projects/fast_ipsec/src/sys/dev/drm/radeon_state.c#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_state.c,v 1.20 2006/04/09 20:45:45 anholt Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_state.c,v 1.21 2006/04/13 11:16:59 ru Exp $"); #include "dev/drm/drmP.h" #include "dev/drm/drm.h" @@ -2973,7 +2973,7 @@ case RADEON_PARAM_STATUS_HANDLE: value = dev_priv->ring_rptr_offset; break; -#if BITS_PER_LONG == 32 +#ifndef __LP64__ /* * This ioctl() doesn't work on 64-bit platforms because hw_lock is a * pointer which can't fit into an int-sized variable. According to ==== //depot/projects/fast_ipsec/src/sys/dev/em/if_em_hw.c#4 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/em/if_em_hw.c,v 1.18 2006/04/06 17:09:03 glebius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/em/if_em_hw.c,v 1.19 2006/04/13 15:10:25 cognet Exp $"); #include @@ -516,7 +516,9 @@ case em_82544: case em_82540: case em_82545: +#ifndef __arm__ case em_82546: +#endif case em_82541: case em_82541_rev_2: /* These controllers can't ack the 64-bit write when issuing the ==== //depot/projects/fast_ipsec/src/sys/dev/fxp/if_fxp.c#6 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.254 2006/02/14 12:44:54 glebius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.256 2006/04/14 17:26:04 matteo Exp $"); /* * Intel EtherExpress Pro/100B PCI Fast Ethernet driver @@ -178,6 +178,7 @@ { 0x1064, -1, "Intel 82562EZ (ICH6)" }, { 0x1068, -1, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" }, { 0x1069, -1, "Intel 82562EM/EX/GX Pro/100 Ethernet" }, + { 0x1092, -1, "Intel Pro/100 VE Network Connection" }, { 0x1209, -1, "Intel 82559ER Embedded 10/100 Ethernet" }, { 0x1229, 0x01, "Intel 82557 Pro/100 Ethernet" }, { 0x1229, 0x02, "Intel 82557 Pro/100 Ethernet" }, ==== //depot/projects/fast_ipsec/src/sys/dev/hwpmc/hwpmc_mod.c#6 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Apr 16 16:30:03 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8131816A405; Sun, 16 Apr 2006 16:30:03 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2716916A401 for ; Sun, 16 Apr 2006 16:30:03 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2DCA43D46 for ; Sun, 16 Apr 2006 16:30:02 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3GGU2EJ052351 for ; Sun, 16 Apr 2006 16:30:02 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3GGU2d6052348 for perforce@freebsd.org; Sun, 16 Apr 2006 16:30:02 GMT (envelope-from marcel@freebsd.org) Date: Sun, 16 Apr 2006 16:30:02 GMT Message-Id: <200604161630.k3GGU2d6052348@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 Cc: Subject: PERFORCE change 95383 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 16:30:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=95383 Change 95383 by marcel@marcel_nfs on 2006/04/16 16:29:03 o Set the bus tag and handle on the resources we create. o Implement bus_alloc_resource(). Affected files ... .. //depot/projects/uart/dev/puc/puc.c#23 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#23 (text+ko) ==== @@ -117,7 +117,10 @@ struct puc_softc *sc; struct rman *rm; intptr_t res; - u_long start; + bus_addr_t ofs, start; + bus_size_t size; + bus_space_handle_t bsh; + bus_space_tag_t bst; int error, idx; sc = device_get_softc(dev); @@ -160,29 +163,30 @@ goto fail; } port->p_bar = bar; + start = rman_get_start(bar->b_res); error = puc_query(sc->sc_cfg, PUC_QUERY_OFS, idx, &res); if (error) goto fail; - start = rman_get_start(bar->b_res) + res; + ofs = res; error = puc_query(sc->sc_cfg, PUC_QUERY_LEN, idx, &res); if (error) goto fail; - + size = res; rm = (bar->b_type == SYS_RES_IOPORT) ? &sc->sc_ioport: &sc->sc_iomem; - port->p_res = rman_reserve_resource(rm, start, - start + res - 1, res, 0, sc->sc_dev); - if (port->p_res == NULL) - continue; + port->p_res = rman_reserve_resource(rm, start + ofs, + start + ofs + size - 1, size, 0, sc->sc_dev); + if (port->p_res != NULL) { + bsh = rman_get_bushandle(bar->b_res); + bst = rman_get_bustag(bar->b_res); + bus_space_subregion(bst, bsh, ofs, size, &bsh); + rman_set_bushandle(port->p_res, bsh); + rman_set_bustag(port->p_res, bst); + } port->p_dev = device_add_child(dev, NULL, -1); - if (port->p_dev == NULL) { - rman_release_resource(port->p_res); - port->p_res = NULL; - continue; - } - - device_set_ivars(port->p_dev, (void *)port); + if (port->p_dev != NULL) + device_set_ivars(port->p_dev, (void *)port); } sc->sc_irid = 0; @@ -213,6 +217,8 @@ /* Probe and attach our children. */ for (idx = 0; idx < sc->sc_nports; idx++) { port = &sc->sc_port[idx]; + if (port->p_dev == NULL) + continue; error = device_probe_and_attach(port->p_dev); if (error) { device_delete_child(dev, port->p_dev); @@ -269,8 +275,11 @@ puc_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { - struct puc_port *p; + struct puc_port *port; + u_int fl; + int error; + /* Get our immediate child. */ while (child != NULL && device_get_parent(child) != dev) child = device_get_parent(child); if (child == NULL) @@ -280,8 +289,22 @@ if (*rid != 0 || start != 0UL || end != ~0UL) return (NULL); - p = device_get_ivars(child); - return (NULL); + port = device_get_ivars(child); + if (port->p_res == NULL) + return (NULL); + if (rman_get_device(port->p_res) == dev) + rman_set_device(port->p_res, child); + else if (rman_get_device(port->p_res) != child) + return (NULL); + fl = rman_get_flags(port->p_res); + if ((flags & RF_ACTIVE) != 0 && (fl & RF_ACTIVE) == 0) { + error = rman_activate_resource(port->p_res); + if (error) { + rman_set_device(port->p_res, dev); + return (NULL); + } + } + return (port->p_res); } int @@ -290,6 +313,7 @@ { struct puc_port *p; + /* Get our immediate child. */ while (child != NULL && device_get_parent(child) != dev) child = device_get_parent(child); if (child == NULL) @@ -347,21 +371,22 @@ int puc_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) { - struct puc_port *p; + struct puc_port *port; + /* Get our immediate child. */ while (child != NULL && device_get_parent(child) != dev) child = device_get_parent(child); if (child == NULL) return (EINVAL); - p = device_get_ivars(child); + port = device_get_ivars(child); switch(index) { case PUC_IVAR_CLOCK: - *result = p->p_rclk; + *result = port->p_rclk; break; case PUC_IVAR_TYPE: - *result = p->p_type; + *result = port->p_type; break; default: return (ENOENT); From owner-p4-projects@FreeBSD.ORG Sun Apr 16 18:11:06 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4FBF616A4A3; Sun, 16 Apr 2006 18:11:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A66916A445 for ; Sun, 16 Apr 2006 18:11:06 +0000 (UTC) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D402B43D45 for ; Sun, 16 Apr 2006 18:11:05 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3GIB5MV016987 for ; Sun, 16 Apr 2006 18:11:05 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3GIB5x2016984 for perforce@freebsd.org; Sun, 16 Apr 2006 18:11:05 GMT (envelope-from jmg@freebsd.org) Date: Sun, 16 Apr 2006 18:11:05 GMT Message-Id: <200604161811.k3GIB5x2016984@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Cc: Subject: PERFORCE change 95387 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 18:11:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=95387 Change 95387 by jmg@jmg_arlene on 2006/04/16 18:10:27 fix type of bus, it's an 8 bit quantity... Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/dev/pci/pcivar.h#5 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/dev/pci/pcivar.h#5 (text+ko) ==== @@ -242,7 +242,7 @@ #define PCIB_ACCESSOR(var, ivar, type) \ __BUS_ACCESSOR(pcib, var, PCIB, ivar, type) -PCIB_ACCESSOR(bus, BUS, uint32_t) +PCIB_ACCESSOR(bus, BUS, uint8_t) PCIB_ACCESSOR(domain, DOMAIN, uint32_t) #undef PCIB_ACCESSOR From owner-p4-projects@FreeBSD.ORG Sun Apr 16 22:14:02 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A38E16A406; Sun, 16 Apr 2006 22:14:02 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 406F816A404 for ; Sun, 16 Apr 2006 22:14:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED12D43D46 for ; Sun, 16 Apr 2006 22:14:01 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3GME1xL061531 for ; Sun, 16 Apr 2006 22:14:01 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3GME1XN061525 for perforce@freebsd.org; Sun, 16 Apr 2006 22:14:01 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Apr 2006 22:14:01 GMT Message-Id: <200604162214.k3GME1XN061525@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95396 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 22:14:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=95396 Change 95396 by jb@jb_freebsd2 on 2006/04/16 22:13:25 When upgrading make, don't add CTF data -- doing that would just make the upgrade complicated. Let the buildwould take care of that eventually. Affected files ... .. //depot/projects/dtrace/src/Makefile#2 edit Differences ... ==== //depot/projects/dtrace/src/Makefile#2 (text+ko) ==== @@ -240,7 +240,7 @@ MMAKE= ${MMAKEENV} make \ -D_UPGRADING \ -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED \ - -DNO_CPU_CFLAGS -DNO_WERROR + -DNO_CPU_CFLAGS -DNO_WERROR -DNO_CTF make: .PHONY @echo From owner-p4-projects@FreeBSD.ORG Sun Apr 16 22:29:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 833D216A404; Sun, 16 Apr 2006 22:29:21 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F6C616A400 for ; Sun, 16 Apr 2006 22:29:21 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAF7D43D46 for ; Sun, 16 Apr 2006 22:29:20 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3GMTK7W068826 for ; Sun, 16 Apr 2006 22:29:20 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3GMTKTx068823 for perforce@freebsd.org; Sun, 16 Apr 2006 22:29:20 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Apr 2006 22:29:20 GMT Message-Id: <200604162229.k3GMTKTx068823@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95397 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 22:29:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=95397 Change 95397 by jb@jb_freebsd2 on 2006/04/16 22:29:18 Change the library link order. Affected files ... .. //depot/projects/dtrace/src/cddl/usr.bin/ctfconvert/Makefile#2 edit Differences ... ==== //depot/projects/dtrace/src/cddl/usr.bin/ctfconvert/Makefile#2 (text+ko) ==== @@ -40,7 +40,7 @@ LDFLAGS+= -pthread -LDADD+= -lctf -lelf -ldwarf -lz +LDADD+= -lctf -ldwarf -lelf -lz .PATH: ${.CURDIR} .PATH: ${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common From owner-p4-projects@FreeBSD.ORG Sun Apr 16 22:31:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AEBE316A402; Sun, 16 Apr 2006 22:31:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FEC516A404 for ; Sun, 16 Apr 2006 22:31:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C11ED43D46 for ; Sun, 16 Apr 2006 22:31:23 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3GMVNf8070001 for ; Sun, 16 Apr 2006 22:31:23 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3GMVNvQ069998 for perforce@freebsd.org; Sun, 16 Apr 2006 22:31:23 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Apr 2006 22:31:23 GMT Message-Id: <200604162231.k3GMVNvQ069998@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95398 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 22:31:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=95398 Change 95398 by jb@jb_freebsd2 on 2006/04/16 22:31:12 Recognise .S assembler files as source. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/input.c#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/input.c#2 (text) ==== @@ -71,6 +71,7 @@ /* ignore */ break; case 's': + case 'S': types |= SOURCE_S; break; default: From owner-p4-projects@FreeBSD.ORG Sun Apr 16 22:35:29 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AA75716A403; Sun, 16 Apr 2006 22:35:29 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8983916A401 for ; Sun, 16 Apr 2006 22:35:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AD7E43D46 for ; Sun, 16 Apr 2006 22:35:29 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3GMZTFt073633 for ; Sun, 16 Apr 2006 22:35:29 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3GMZSpj073627 for perforce@freebsd.org; Sun, 16 Apr 2006 22:35:28 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Apr 2006 22:35:28 GMT Message-Id: <200604162235.k3GMZSpj073627@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95399 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 22:35:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=95399 Change 95399 by jb@jb_freebsd2 on 2006/04/16 22:34:36 Change the behaviour of ctfconvert and ctfmerge to be a little more forgiving. If there isn't any type data to convert, by all means say so, but don't go and delete the file and don't return an exit status that would cause the build to fail. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/cmd/mdb/tools/common/die.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctfconvert.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/util.c#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/cmd/mdb/tools/common/die.c#3 (text) ==== @@ -54,7 +54,11 @@ if (format[strlen(format) - 1] != '\n') (void) fprintf(stderr, ": %s\n", strerror(err)); +#if defined(__FreeBSD__) + exit(0); +#else exit(1); +#endif } void @@ -75,5 +79,9 @@ if (format[strlen(format) - 1] != '\n') (void) fprintf(stderr, ": %s\n", elf_errmsg(elf_errno())); +#if defined(__FreeBSD__) + exit(0); +#else exit(1); +#endif } ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctfconvert.c#3 (text) ==== @@ -65,10 +65,12 @@ static void terminate_cleanup(void) { +#if !defined(__FreeBSD__) if (!outfile) { fprintf(stderr, "Removing %s\n", infile); unlink(infile); } +#endif } static void ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c#3 (text) ==== @@ -608,10 +608,12 @@ if (outfile == NULL) return; +#if !defined(__FreeBSD__) if (dounlink) { fprintf(stderr, "Removing %s\n", outfile); unlink(outfile); } +#endif } static void ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/util.c#2 (text) ==== @@ -129,7 +129,17 @@ if (terminate_cleanup) terminate_cleanup(); +#if defined(__FreeBSD__) +/* + * For the time being just output the termination message, but don't + * return an exit status that would cause the build to fail. We need + * to get as much stuff built as possible before going back and + * figuring out what is wrong with certain files. + */ + exit(0); +#else exit(1); +#endif } /*PRINTFLIKE1*/ From owner-p4-projects@FreeBSD.ORG Sun Apr 16 22:43:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D6CB816A404; Sun, 16 Apr 2006 22:43:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 829A716A401 for ; Sun, 16 Apr 2006 22:43:40 +0000 (UTC) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34F1143D45 for ; Sun, 16 Apr 2006 22:43:40 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3GMhedr079312 for ; Sun, 16 Apr 2006 22:43:40 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3GMhdjZ079309 for perforce@freebsd.org; Sun, 16 Apr 2006 22:43:39 GMT (envelope-from jmg@freebsd.org) Date: Sun, 16 Apr 2006 22:43:39 GMT Message-Id: <200604162243.k3GMhdjZ079309@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Cc: Subject: PERFORCE change 95401 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 22:43:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95401 Change 95401 by jmg@jmg_arlene on 2006/04/16 22:43:18 pull in latest ata code.. there's been a few revs, this'll make it easier for sos to help us... Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-all.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-all.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-chipset.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-disk.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-pci.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-queue.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-raid.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-usb.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/atapi-cam.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/atapi-cd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/atapi-fd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/atapi-fd.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/ata.h#3 integrate Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-all.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.264 2006/02/09 20:54:42 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.272 2006/04/14 16:25:42 sos Exp $"); #include "opt_ata.h" #include @@ -73,13 +73,13 @@ /* global vars */ MALLOC_DEFINE(M_ATA, "ata_generic", "ATA driver generic layer"); int (*ata_raid_ioctl_func)(u_long cmd, caddr_t data) = NULL; +struct intr_config_hook *ata_delayed_attach = NULL; devclass_t ata_devclass; uma_zone_t ata_request_zone; uma_zone_t ata_composite_zone; int ata_wc = 1; /* local vars */ -static struct intr_config_hook *ata_delayed_attach = NULL; static int ata_dma = 1; static int atapi_dma = 1; @@ -160,6 +160,11 @@ if (!ch->r_irq) return ENXIO; + /* grap the channel lock so no new requests gets launched */ + mtx_lock(&ch->state_mtx); + ch->state |= ATA_STALL_QUEUE; + mtx_unlock(&ch->state_mtx); + /* detach & delete all children */ if (!device_get_children(dev, &children, &nchildren)) { for (i = 0; i < nchildren; i++) @@ -196,9 +201,14 @@ while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) tsleep(&dev, PRIBIO, "atarini", 1); + /* catch eventual request in ch->running */ + mtx_lock(&ch->state_mtx); + if ((request = ch->running)) + callout_stop(&request->callout); + ch->running = NULL; + /* unconditionally grap the channel lock */ - mtx_lock(&ch->state_mtx); - ch->state = ATA_STALL_QUEUE; + ch->state |= ATA_STALL_QUEUE; mtx_unlock(&ch->state_mtx); /* reset the controller HW, the channel and device(s) */ @@ -208,53 +218,37 @@ if (!device_get_children(dev, &children, &nchildren)) { mtx_lock(&Giant); /* newbus suckage it needs Giant */ for (i = 0; i < nchildren; i++) { - if (children[i] && device_is_attached(children[i])) - if (ATA_REINIT(children[i])) { - /* - * if we have a running request and its device matches - * this child we need to inform the request that the - * device is gone and remove it from ch->running - */ - mtx_lock(&ch->state_mtx); - if (ch->running && ch->running->dev == children[i]) { - callout_stop(&ch->running->callout); - request = ch->running; - ch->running = NULL; - } - else - request = NULL; - mtx_unlock(&ch->state_mtx); + /* did any children go missing ? */ + if (children[i] && device_is_attached(children[i]) && + ATA_REINIT(children[i])) { + /* + * if we had a running request and its device matches + * this child we need to inform the request that the + * device is gone. + */ + if (request && request->dev == children[i]) { + request->result = ENXIO; + device_printf(request->dev, "FAILURE - device detached\n"); - if (request) { - request->result = ENXIO; - device_printf(request->dev, - "FAILURE - device detached\n"); - - /* if not timeout finish request here */ - if (!(request->flags & ATA_R_TIMEOUT)) + /* if not timeout finish request here */ + if (!(request->flags & ATA_R_TIMEOUT)) ata_finish(request); - } - device_delete_child(dev, children[i]); + request = NULL; } + device_delete_child(dev, children[i]); + } } free(children, M_TEMP); mtx_unlock(&Giant); /* newbus suckage dealt with, release Giant */ } - /* catch request in ch->running if we havn't already */ - mtx_lock(&ch->state_mtx); - if ((request = ch->running)) - callout_stop(&request->callout); - ch->running = NULL; - mtx_unlock(&ch->state_mtx); - - /* if we got one put it on the queue again */ - if (request) { + /* if we still have a good request put it on the queue again */ + if (request && !(request->flags & ATA_R_TIMEOUT)) { device_printf(request->dev, "WARNING - %s requeued due to channel reset", ata_cmd2str(request)); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%llu", (unsigned long long)request->u.ata.lba); + printf(" LBA=%ju", request->u.ata.lba); printf("\n"); request->flags |= ATA_R_REQUEUE; ata_queue_request(request); @@ -283,8 +277,8 @@ if (!dev || !(ch = device_get_softc(dev))) return ENXIO; - /* wait for the channel to be IDLE before entering suspend mode */ - while (1) { + /* wait for the channel to be IDLE or detached before suspending */ + while (ch->r_irq) { mtx_lock(&ch->state_mtx); if (ch->state == ATA_IDLE) { ch->state = ATA_ACTIVE; @@ -335,13 +329,13 @@ ATA_DEBUG_RQ(request, "interrupt"); /* safetycheck for the right state */ - if (ch->state != ATA_ACTIVE && ch->state != ATA_STALL_QUEUE) { + if (ch->state == ATA_IDLE) { device_printf(request->dev, "interrupt on idle channel ignored\n"); break; } /* - * we have the HW locks, so end the tranaction for this request + * we have the HW locks, so end the transaction for this request * if it finishes immediately otherwise wait for next interrupt */ if (ch->hw.end_transaction(request) == ATA_OP_FINISHED) { @@ -491,7 +485,11 @@ if (ioc_request->flags & ATA_CMD_WRITE) request->flags |= ATA_R_WRITE; ata_queue_request(request); - if (!(request->flags & ATA_R_ATAPI)) { + if (request->flags & ATA_R_ATAPI) { + bcopy(&request->u.atapi.sense, &ioc_request->u.atapi.sense, + sizeof(struct atapi_sense)); + } + else { ioc_request->u.ata.command = request->u.ata.command; ioc_request->u.ata.feature = request->u.ata.feature; ioc_request->u.ata.lba = request->u.ata.lba; @@ -631,7 +629,8 @@ if (bootverbose) printf("ata%d-%s: pio=%s wdma=%s udma=%s cable=%s wire\n", - ch->unit, atadev->unit == ATA_MASTER ? "master":"slave", + device_get_unit(ch->dev), + atadev->unit == ATA_MASTER ? "master" : "slave", ata_mode2str(ata_pmode(atacap)), ata_mode2str(ata_wmode(atacap)), ata_mode2str(ata_umode(atacap)), @@ -853,6 +852,9 @@ case ATA_UDMA6: return "UDMA133"; case ATA_SA150: return "SATA150"; case ATA_SA300: return "SATA300"; + case ATA_USB: return "USB"; + case ATA_USB1: return "USB1"; + case ATA_USB2: return "USB2"; default: if (mode & ATA_DMA_MASK) return "BIOSDMA"; ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-all.h#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/sys/dev/ata/ata-all.h,v 1.114 2006/02/23 20:15:22 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.117 2006/03/31 08:09:04 sos Exp $ */ /* ATA register defines */ @@ -53,24 +53,7 @@ #define ATA_E_MC 0x20 /* media changed */ #define ATA_E_UNC 0x40 /* uncorrectable data */ #define ATA_E_ICRC 0x80 /* UDMA crc error */ -#define ATA_E_MASK 0x0f /* error mask */ -#define ATA_SK_MASK 0xf0 /* sense key mask */ -#define ATA_SK_NO_SENSE 0x00 /* no specific sense key info */ -#define ATA_SK_RECOVERED_ERROR 0x10 /* command OK, data recovered */ -#define ATA_SK_NOT_READY 0x20 /* no access to drive */ -#define ATA_SK_MEDIUM_ERROR 0x30 /* non-recovered data error */ -#define ATA_SK_HARDWARE_ERROR 0x40 /* non-recoverable HW failure */ -#define ATA_SK_ILLEGAL_REQUEST 0x50 /* invalid command param(s) */ -#define ATA_SK_UNIT_ATTENTION 0x60 /* media changed */ -#define ATA_SK_DATA_PROTECT 0x70 /* write protect */ -#define ATA_SK_BLANK_CHECK 0x80 /* blank check */ -#define ATA_SK_VENDOR_SPECIFIC 0x90 /* vendor specific skey */ -#define ATA_SK_COPY_ABORTED 0xa0 /* copy aborted */ -#define ATA_SK_ABORTED_COMMAND 0xb0 /* command aborted, try again */ -#define ATA_SK_EQUAL 0xc0 /* equal */ -#define ATA_SK_VOLUME_OVERFLOW 0xd0 /* volume overflow */ -#define ATA_SK_MISCOMPARE 0xe0 /* data dont match the medium */ -#define ATA_SK_RESERVED 0xf0 +#define ATA_E_ATAPI_SENSE_MASK 0xf0 /* ATAPI sense key mask */ #define ATA_IREASON 9 /* (R) interrupt reason */ #define ATA_I_CMD 0x01 /* cmd (1) | data (0) */ @@ -284,7 +267,8 @@ #define ATA_PC98_BANKADDR_RID 9 #define ATA_IRQ_RID 0 #define ATA_DEV(device) ((device == ATA_MASTER) ? 0 : 1) -#define ATA_CFA_MAGIC 0x848A +#define ATA_CFA_MAGIC1 0x844A +#define ATA_CFA_MAGIC2 0x848A #define ATAPI_MAGIC_LSB 0x14 #define ATAPI_MAGIC_MSB 0xeb #define ATAPI_P_READ (ATA_S_DRQ | ATA_I_IN) @@ -298,28 +282,6 @@ #define ATA_OP_FINISHED 1 #define ATA_MAX_28BIT_LBA 268435455UL -/* ATAPI request sense structure */ -struct atapi_sense { - u_int8_t error_code :7; /* current or deferred errors */ - u_int8_t valid :1; /* follows ATAPI spec */ - u_int8_t segment; /* Segment number */ - u_int8_t sense_key :4; /* sense key */ - u_int8_t reserved2_4 :1; /* reserved */ - u_int8_t ili :1; /* incorrect length indicator */ - u_int8_t eom :1; /* end of medium */ - u_int8_t filemark :1; /* filemark */ - u_int32_t cmd_info __packed; /* cmd information */ - u_int8_t sense_length; /* additional sense len (n-7) */ - u_int32_t cmd_specific_info __packed; /* additional cmd spec info */ - u_int8_t asc; /* additional sense code */ - u_int8_t ascq; /* additional sense code qual */ - u_int8_t replaceable_unit_code; /* replaceable unit code */ - u_int8_t sk_specific :7; /* sense key specific */ - u_int8_t sksv :1; /* sense key specific info OK */ - u_int8_t sk_specific1; /* sense key specific */ - u_int8_t sk_specific2; /* sense key specific */ -}; - /* structure used for composite atomic operations */ #define MAX_COMPOSITES 32 /* u_int32_t bits */ struct ata_composite { @@ -348,9 +310,8 @@ } ata; struct { u_int8_t ccb[16]; /* ATAPI command block */ - struct atapi_sense sense_data; /* ATAPI request sense data */ - u_int8_t sense_key; /* ATAPI request sense key */ - u_int8_t sense_cmd; /* ATAPI saved command */ + struct atapi_sense sense; /* ATAPI request sense data */ + u_int8_t saved_cmd; /* ATAPI saved command */ } atapi; } u; u_int32_t bytecount; /* bytes to transfer */ @@ -372,6 +333,8 @@ #define ATA_R_DIRECT 0x00001000 #define ATA_R_DEBUG 0x10000000 +#define ATA_R_DANGER1 0x20000000 +#define ATA_R_DANGER2 0x40000000 u_int8_t status; /* ATA status */ u_int8_t error; /* ATA error */ @@ -525,6 +488,7 @@ /* externs */ extern int (*ata_raid_ioctl_func)(u_long cmd, caddr_t data); +extern struct intr_config_hook *ata_delayed_attach; extern devclass_t ata_devclass; extern int ata_wc; @@ -569,8 +533,10 @@ /* macros for alloc/free of struct ata_request */ extern uma_zone_t ata_request_zone; #define ata_alloc_request() uma_zalloc(ata_request_zone, M_NOWAIT | M_ZERO) -#define ata_free_request(request) uma_zfree(ata_request_zone, request) - +#define ata_free_request(request) { \ + if (!(request->flags & ATA_R_DANGER2)) \ + uma_zfree(ata_request_zone, request); \ + } /* macros for alloc/free of struct ata_composite */ extern uma_zone_t ata_composite_zone; #define ata_alloc_composite() uma_zalloc(ata_composite_zone, M_NOWAIT | M_ZERO) ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-chipset.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.160 2006/02/23 18:52:15 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.161 2006/03/13 14:01:37 sos Exp $"); #include "opt_ata.h" #include @@ -2068,8 +2068,11 @@ struct ata_pci_controller *ctlr = device_get_softc(dev); struct ata_chip_id *idx; static struct ata_chip_id ids[] = - {{ ATA_JMB360, 0, 0, 0, ATA_SA300, "JMB360" }, - { ATA_JMB363, 0, 1, 0, ATA_SA300, "JMB363" }, + {{ ATA_JMB360, 0, 1, 0, ATA_SA300, "JMB360" }, + { ATA_JMB361, 0, 1, 1, ATA_SA300, "JMB361" }, + { ATA_JMB363, 0, 2, 1, ATA_SA300, "JMB363" }, + { ATA_JMB365, 0, 1, 2, ATA_SA300, "JMB365" }, + { ATA_JMB366, 0, 2, 2, ATA_SA300, "JMB366" }, { 0, 0, 0, 0, 0, 0}}; char buffer[64]; @@ -2094,6 +2097,7 @@ /* set controller configuration to a setup we support */ pci_write_config(dev, 0x40, 0x80c0a131, 4); + pci_write_config(dev, 0x80, 0x01200000, 4); ctlr->allocate = ata_jmicron_allocate; ctlr->reset = ata_jmicron_reset; @@ -2118,10 +2122,6 @@ ATA_OUTL(ctlr->r_res2, ATA_AHCI_GHC, ATA_INL(ctlr->r_res2, ATA_AHCI_GHC) | ATA_AHCI_GHC_AE); - /* get the number of HW channels */ - ctlr->channels = - (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_NPMASK) + 1; - /* clear interrupts */ ATA_OUTL(ctlr->r_res2, ATA_AHCI_IS, ATA_INL(ctlr->r_res2, ATA_AHCI_IS)); @@ -2134,21 +2134,22 @@ pci_read_config(dev, PCIR_COMMAND, 2) & ~0x0400, 2); } - /* add in PATA channel(s) */ - ctlr->channels += ctlr->chip->cfg1; + /* set the number of HW channels */ + ctlr->channels = ctlr->chip->cfg1 + ctlr->chip->cfg2; return 0; } static int ata_jmicron_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 error; - if (ch->unit >= 2) { - ch->unit -= 2; + if (ch->unit >= ctlr->chip->cfg1) { + ch->unit -= ctlr->chip->cfg1; error = ata_pci_allocate(dev); - ch->unit += 2; + ch->unit += ctlr->chip->cfg1; } else error = ata_ahci_allocate(dev); @@ -2158,9 +2159,10 @@ static void ata_jmicron_reset(device_t dev) { + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); - if (ch->unit >= 2) + if (ch->unit >= ctlr->chip->cfg1) ata_generic_reset(dev); else ata_ahci_reset(dev); @@ -2169,9 +2171,10 @@ static void ata_jmicron_dmainit(device_t dev) { + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); - if (ch->unit >= 2) + if (ch->unit >= ctlr->chip->cfg1) ata_pci_dmainit(dev); else ata_ahci_dmainit(dev); @@ -2180,9 +2183,10 @@ static void ata_jmicron_setmode(device_t dev, int mode) { + struct ata_pci_controller *ctlr = device_get_softc(GRANDPARENT(dev)); struct ata_channel *ch = device_get_softc(device_get_parent(dev)); - if (ch->unit >= 2) { + if (ch->unit >= ctlr->chip->cfg1) { struct ata_device *atadev = device_get_softc(dev); /* check for 80pin cable present */ ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-disk.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.193 2006/01/18 09:14:55 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.197 2006/03/31 08:09:04 sos Exp $"); #include "opt_ata.h" #include @@ -71,7 +71,8 @@ struct ata_device *atadev = device_get_softc(dev); if (!(atadev->param.config & ATA_PROTO_ATAPI) || - (atadev->param.config == ATA_CFA_MAGIC)) + (atadev->param.config == ATA_CFA_MAGIC1) || + (atadev->param.config == ATA_CFA_MAGIC2)) return 0; else return ENXIO; @@ -295,8 +296,14 @@ struct bio bp; /* length zero is special and really means flush buffers to media */ - if (!length) - return ata_controlcmd(dp->d_drv1, ATA_FLUSHCACHE, 0, 0, 0); + if (!length) { + struct ata_device *atadev = device_get_softc(dp->d_drv1); + int error = 0; + + if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) + error = ata_controlcmd(dp->d_drv1, ATA_FLUSHCACHE, 0, 0, 0); + return error; + } bzero(&bp, sizeof(struct bio)); bp.bio_disk = dp; @@ -365,19 +372,17 @@ strncpy(product, atadev->param.model, 40); } - device_printf(dev, "%lluMB <%s%s %.8s> at ata%d-%s %s%s\n", - (unsigned long long)(adp->total_secs / (1048576 / DEV_BSIZE)), + device_printf(dev, "%juMB <%s%s %.8s> at ata%d-%s %s%s\n", + adp->total_secs / (1048576 / DEV_BSIZE), vendor, product, atadev->param.revision, device_get_unit(ch->dev), (atadev->unit == ATA_MASTER) ? "master" : "slave", (adp->flags & AD_F_TAG_ENABLED) ? "tagged " : "", ata_mode2str(atadev->mode)); if (bootverbose) { - device_printf(dev, "%llu sectors [%lldC/%dH/%dS] " - "%d sectors/interrupt %d depth queue\n", - (unsigned long long)adp->total_secs, - (unsigned long long)(adp->total_secs / - (adp->heads * adp->sectors)), + device_printf(dev, "%ju sectors [%juC/%dH/%dS] " + "%d sectors/interrupt %d depth queue\n", adp->total_secs, + adp->total_secs / (adp->heads * adp->sectors), adp->heads, adp->sectors, atadev->max_iosize / DEV_BSIZE, adp->num_tags + 1); } ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-pci.h#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/sys/dev/ata/ata-pci.h,v 1.63 2006/02/16 17:09:24 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.64 2006/03/13 14:01:37 sos Exp $ */ /* structure holding chipset config info */ @@ -161,7 +161,10 @@ #define ATA_JMICRON_ID 0x197b #define ATA_JMB360 0x2360197b +#define ATA_JMB361 0x2361197b #define ATA_JMB363 0x2363197b +#define ATA_JMB365 0x2365197b +#define ATA_JMB366 0x2366197b #define ATA_MARVELL_ID 0x11ab #define ATA_M88SX5040 0x504011ab ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-queue.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.56 2006/02/23 20:15:22 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.63 2006/03/31 08:09:05 sos Exp $"); #include "opt_ata.h" #include @@ -51,17 +51,24 @@ void ata_queue_request(struct ata_request *request) { - struct ata_channel *ch = device_get_softc(device_get_parent(request->dev)); + struct ata_channel *ch; - /* mark request as virgin (this might be a ATA_R_REQUEUE) */ + /* treat request as virgin (this might be an ATA_R_REQUEUE) */ request->result = request->status = request->error = 0; - request->parent = device_get_parent(request->dev); + + /* check that that the device is still valid */ + if (!(request->parent = device_get_parent(request->dev))) { + request->result = ENXIO; + if (request->callback) + (request->callback)(request); + return; + } + ch = device_get_softc(request->parent); callout_init_mtx(&request->callout, &ch->state_mtx, CALLOUT_RETURNUNLOCKED); - if (!request->callback && !(request->flags & ATA_R_REQUEUE)) sema_init(&request->done, 0, "ATA request done"); - /* in ATA_STALL_QUEUE state we call HW directly (used only during reinit) */ + /* in ATA_STALL_QUEUE state we call HW directly */ if ((ch->state & ATA_STALL_QUEUE) && (request->flags & ATA_R_CONTROL)) { mtx_lock(&ch->state_mtx); ch->running = request; @@ -95,12 +102,14 @@ /* if this is not a callback wait until request is completed */ if (!request->callback) { ATA_DEBUG_RQ(request, "wait for completition"); - while (!dumping && - sema_timedwait(&request->done, request->timeout * hz * 4)) { + if (!dumping && + sema_timedwait(&request->done, request->timeout * hz * 4)) { device_printf(request->dev, - "req=%p %s semaphore timeout !! DANGER Will Robinson !!\n", - request, ata_cmd2str(request)); - ata_start(ch->dev); + "WARNING - %s taskqueue timeout " + "- completing request directly\n", + ata_cmd2str(request)); + request->flags |= ATA_R_DANGER1; + ata_completed(request, 0); } sema_destroy(&request->done); } @@ -252,15 +261,28 @@ struct ata_device *atadev = device_get_softc(request->dev); struct ata_composite *composite; + if (request->flags & ATA_R_DANGER2) { + device_printf(request->dev, + "WARNING - %s freeing taskqueue zombie request\n", + ata_cmd2str(request)); + request->flags &= ~(ATA_R_DANGER1 | ATA_R_DANGER2); + ata_free_request(request); + return; + } + if (request->flags & ATA_R_DANGER1) + request->flags |= ATA_R_DANGER2 + ATA_DEBUG_RQ(request, "completed entered"); /* if we had a timeout, reinit channel and deal with the falldown */ if (request->flags & ATA_R_TIMEOUT) { /* - * if reinit succeeds and the device doesn't get detached and + * if the channel is still present and + * reinit succeeds and + * the device doesn't get detached and * there are retries left we reinject this request */ - if (!ata_reinit(ch->dev) && !request->result && + if (ch && !ata_reinit(ch->dev) && !request->result && (request->retries-- > 0)) { if (!(request->flags & ATA_R_QUIET)) { device_printf(request->dev, @@ -268,7 +290,7 @@ ata_cmd2str(request), request->retries, request->retries == 1 ? "y" : "ies"); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%llu", (unsigned long long)request->u.ata.lba); + printf(" LBA=%ju", request->u.ata.lba); printf("\n"); } request->flags &= ~(ATA_R_TIMEOUT | ATA_R_DEBUG); @@ -285,15 +307,14 @@ device_printf(request->dev, "FAILURE - %s timed out", ata_cmd2str(request)); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%llu", - (unsigned long long)request->u.ata.lba); + printf(" LBA=%ju", request->u.ata.lba); printf("\n"); } } request->result = EIO; } } - else { + else if (!(request->flags & ATA_R_ATAPI) ){ /* if this is a soft ECC error warn about it */ /* XXX SOS we could do WARF here */ if ((request->status & (ATA_S_CORR | ATA_S_ERROR)) == ATA_S_CORR) { @@ -301,7 +322,7 @@ "WARNING - %s soft error (ECC corrected)", ata_cmd2str(request)); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%llu", (unsigned long long)request->u.ata.lba); + printf(" LBA=%ju", request->u.ata.lba); printf("\n"); } @@ -312,7 +333,7 @@ "WARNING - %s UDMA ICRC error (retrying request)", ata_cmd2str(request)); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%llu", (unsigned long long)request->u.ata.lba); + printf(" LBA=%ju", request->u.ata.lba); printf("\n"); request->flags |= (ATA_R_AT_HEAD | ATA_R_REQUEUE); ata_queue_request(request); @@ -340,7 +361,7 @@ (request->dmastat & ATA_BMSTAT_ERROR)) printf(" dma=0x%02x", request->dmastat); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%llu", (unsigned long long)request->u.ata.lba); + printf(" LBA=%ju", request->u.ata.lba); printf("\n"); } request->result = EIO; @@ -354,16 +375,15 @@ break; /* if we have a sensekey -> request sense from device */ - if (request->error & ATA_SK_MASK && - request->u.atapi.ccb[0] != ATAPI_REQUEST_SENSE) { + if ((request->error & ATA_E_ATAPI_SENSE_MASK) && + (request->u.atapi.ccb[0] != ATAPI_REQUEST_SENSE)) { static u_int8_t ccb[16] = { ATAPI_REQUEST_SENSE, 0, 0, 0, sizeof(struct atapi_sense), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - request->u.atapi.sense_key = request->error; - request->u.atapi.sense_cmd = request->u.atapi.ccb[0]; + request->u.atapi.saved_cmd = request->u.atapi.ccb[0]; bcopy(ccb, request->u.atapi.ccb, 16); - request->data = (caddr_t)&request->u.atapi.sense_data; + request->data = (caddr_t)&request->u.atapi.sense; request->bytecount = sizeof(struct atapi_sense); request->donecount = 0; request->transfersize = sizeof(struct atapi_sense); @@ -375,21 +395,21 @@ return; } - switch (request->u.atapi.sense_key & ATA_SK_MASK) { - case ATA_SK_RECOVERED_ERROR: + switch (request->u.atapi.sense.key & ATA_SENSE_KEY_MASK) { + case ATA_SENSE_RECOVERED_ERROR: device_printf(request->dev, "WARNING - %s recovered error\n", ata_cmd2str(request)); /* FALLTHROUGH */ - case ATA_SK_NO_SENSE: + case ATA_SENSE_NO_SENSE: request->result = 0; break; - case ATA_SK_NOT_READY: + case ATA_SENSE_NOT_READY: request->result = EBUSY; break; - case ATA_SK_UNIT_ATTENTION: + case ATA_SENSE_UNIT_ATTENTION: atadev->flags |= ATA_D_MEDIA_CHANGED; request->result = EIO; break; @@ -402,22 +422,19 @@ device_printf(request->dev, "FAILURE - %s %s asc=0x%02x ascq=0x%02x ", ata_cmd2str(request), ata_skey2str( - (request->u.atapi.sense_key & ATA_SK_MASK) >> 4), - request->u.atapi.sense_data.asc, - request->u.atapi.sense_data.ascq); - if (request->u.atapi.sense_data.sksv) - printf("sks=0x%02x 0x%02x 0x%02x ", - request->u.atapi.sense_data.sk_specific, - request->u.atapi.sense_data.sk_specific1, - request->u.atapi.sense_data.sk_specific2); - printf("error=%b\n", - (request->u.atapi.sense_key & ATA_E_MASK), - "\20\4MEDIA_CHANGE_REQUEST\3ABORTED" - "\2NO_MEDIA\1ILLEGAL_LENGTH"); + (request->u.atapi.sense.key & ATA_SENSE_KEY_MASK)), + request->u.atapi.sense.asc, + request->u.atapi.sense.ascq); + if (request->u.atapi.sense.specific & ATA_SENSE_SPEC_VALID) + printf("sks=0x%02x 0x%02x 0x%02x\n", + request->u.atapi.sense.specific & ATA_SENSE_SPEC_MASK, + request->u.atapi.sense.specific1, + request->u.atapi.sense.specific2); } - if ((request->u.atapi.sense_key ? - request->u.atapi.sense_key : request->error) & ATA_E_MASK) + if ((request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ? + request->u.atapi.sense.key & ATA_SENSE_KEY_MASK : + request->error)) request->result = EIO; } @@ -461,7 +478,9 @@ else sema_post(&request->done); - ata_start(ch->dev); + /* only call ata_start if channel is present */ + if (ch) + ata_start(ch->dev); } void @@ -505,7 +524,6 @@ if ((request = ch->running) && (!dev || request->dev == dev)) { callout_stop(&request->callout); ch->running = NULL; - ch->state = ATA_IDLE; request->result = ENXIO; TAILQ_INSERT_TAIL(&fail_requests, request, chain); } @@ -527,9 +545,6 @@ TAILQ_REMOVE(&fail_requests, request, chain); ata_finish(request); } - - /* we might have work for the other device on this channel */ - ata_start(ch->dev); } static u_int64_t @@ -613,8 +628,8 @@ static char buffer[20]; if (request->flags & ATA_R_ATAPI) { - switch (request->u.atapi.sense_key ? - request->u.atapi.sense_cmd : request->u.atapi.ccb[0]) { + switch (request->u.atapi.sense.key ? + request->u.atapi.saved_cmd : request->u.atapi.ccb[0]) { case 0x00: return ("TEST_UNIT_READY"); case 0x01: return ("REZERO"); case 0x03: return ("REQUEST_SENSE"); @@ -655,6 +670,7 @@ case 0x5b: return ("CLOSE_TRACK/SESSION"); case 0x5c: return ("READ_BUFFER_CAPACITY"); case 0x5d: return ("SEND_CUE_SHEET"); + case 0x96: return ("SERVICE_ACTION_IN"); case 0xa1: return ("BLANK_CMD"); case 0xa3: return ("SEND_KEY"); case 0xa4: return ("REPORT_KEY"); ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-raid.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.118 2006/02/17 13:02:09 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.120 2006/04/15 10:27:41 maxim Exp $"); #include "opt_ata.h" #include @@ -148,14 +148,14 @@ rdp->disk->d_unit = rdp->lun; disk_create(rdp->disk, DISK_VERSION); - printf("ar%d: %lluMB <%s %s%s> status: %s\n", rdp->lun, - (unsigned long long)(rdp->total_sectors / ((1024L*1024L)/DEV_BSIZE)), + printf("ar%d: %juMB <%s %s%s> status: %s\n", rdp->lun, + rdp->total_sectors / ((1024L * 1024L) / DEV_BSIZE), ata_raid_format(rdp), ata_raid_type(rdp), buffer, ata_raid_flags(rdp)); if (testing || bootverbose) - printf("ar%d: %llu sectors [%dC/%dH/%dS] <%s> subdisks defined as:\n", - rdp->lun, (unsigned long long)rdp->total_sectors, + printf("ar%d: %ju sectors [%dC/%dH/%dS] <%s> subdisks defined as:\n", + rdp->lun, rdp->total_sectors, rdp->cylinders, rdp->heads, rdp->sectors, rdp->name); for (disk = 0; disk < rdp->total_disks; disk++) { @@ -974,7 +974,7 @@ * metadata format from the disks (if we support it). */ printf("WARNING!! - not able to determine metadata format\n" - "WARNING!! - Using FreeBSD PsuedoRAID metadata\n" + "WARNING!! - Using FreeBSD PseudoRAID metadata\n" "If that is not what you want, use the BIOS to " "create the array\n"); ctlr = AR_F_FREEBSD_RAID; @@ -4234,13 +4234,11 @@ printf("type %s\n", ata_raid_type(raid)); printf("flags 0x%02x %b\n", raid->status, raid->status, "\20\3REBUILDING\2DEGRADED\1READY\n"); - printf("magic_0 0x%016llx\n",(unsigned long long)raid->magic_0); - printf("magic_1 0x%016llx\n",(unsigned long long)raid->magic_1); + printf("magic_0 0x%016jx\n", raid->magic_0); + printf("magic_1 0x%016jx\n",raid->magic_1); printf("generation %u\n", raid->generation); - printf("total_sectors %llu\n", - (unsigned long long)raid->total_sectors); - printf("offset_sectors %llu\n", - (unsigned long long)raid->offset_sectors); + printf("total_sectors %ju\n", raid->total_sectors); + printf("offset_sectors %ju\n", raid->offset_sectors); printf("heads %u\n", raid->heads); printf("sectors %u\n", raid->sectors); printf("cylinders %u\n", raid->cylinders); @@ -4252,8 +4250,8 @@ raid->disks[i].flags, "\20\4ONLINE\3SPARE\2ASSIGNED\1PRESENT\n"); if (raid->disks[i].dev) { printf(" "); - device_printf(raid->disks[i].dev, " sectors %lld\n", - (long long)raid->disks[i].sectors); + device_printf(raid->disks[i].dev, " sectors %jd\n", + raid->disks[i].sectors); } } printf("=================================================\n"); @@ -4426,9 +4424,9 @@ printf("config_entries 0x%02x\n", meta->config_entries); for (i = 0; i < meta->config_entries; i++) { printf("config %d:\n", i); - printf(" total_sectors %llu\n", - (unsigned long long)(meta->configs[0].total_sectors + - ((u_int64_t)meta->configs_high[0].total_sectors << 32))); + printf(" total_sectors %ju\n", + meta->configs[0].total_sectors + + ((u_int64_t)meta->configs_high[0].total_sectors << 32)); printf(" type %s\n", ata_raid_hptv3_type(meta->configs[i].type)); printf(" total_disks %u\n", meta->configs[i].total_disks); @@ -4437,9 +4435,9 @@ printf(" status %b\n", meta->configs[i].status, "\20\2RAID5\1NEED_REBUILD\n"); printf(" critical_disks %u\n", meta->configs[i].critical_disks); - printf(" rebuild_lba %llu\n", - (unsigned long long)(meta->configs_high[0].rebuild_lba + - ((u_int64_t)meta->configs_high[0].rebuild_lba << 32))); + printf(" rebuild_lba %ju\n", + meta->configs_high[0].rebuild_lba + + ((u_int64_t)meta->configs_high[0].rebuild_lba << 32)); } printf("name <%.16s>\n", meta->name); printf("timestamp 0x%08x\n", meta->timestamp); @@ -4491,8 +4489,7 @@ map = (struct intel_raid_mapping *)&meta->disk[meta->total_disks]; for (j = 0; j < meta->total_volumes; j++) { printf("name %.16s\n", map->name); - printf("total_sectors %llu\n", - (unsigned long long)map->total_sectors); + printf("total_sectors %ju\n", map->total_sectors); printf("state %u\n", map->state); printf("reserved %u\n", map->reserved); printf("offset %u\n", map->offset); @@ -4537,8 +4534,7 @@ *((u_int16_t *)meta->timestamp_0), meta->timestamp_0[2], meta->timestamp_0[3], meta->timestamp_0[5], meta->timestamp_0[4], meta->timestamp_0[7], meta->timestamp_0[6]); - printf("total_sectors %lld\n", - (unsigned long long)meta->total_sectors); + printf("total_sectors %jd\n", meta->total_sectors); printf("type %s\n", ata_raid_ite_type(meta->type)); printf("stripe_1kblocks %u\n", meta->stripe_1kblocks); printf("timestamp_1 %04x/%02x/%02x %02x:%02x:%02x.%02x\n", @@ -4732,8 +4728,8 @@ printf("revision %.4s\n", meta->revision); printf("dummy_1 0x%08x\n", meta->dummy_1); printf("magic_0 0x%08x\n", meta->magic_0); - printf("magic_1 0x%016llx\n",(unsigned long long)meta->magic_1); - printf("magic_2 0x%016llx\n",(unsigned long long)meta->magic_2); + printf("magic_1 0x%016jx\n", meta->magic_1); + printf("magic_2 0x%016jx\n", meta->magic_2); printf("flags 0x%02x\n", meta->flags); printf("array_width %d\n", meta->array_width); printf("total_disks %d\n", meta->total_disks); @@ -4777,7 +4773,7 @@ printf("********* ATA Promise FastTrak Metadata *********\n"); printf("promise_id <%s>\n", meta->promise_id); printf("dummy_0 0x%08x\n", meta->dummy_0); - printf("magic_0 0x%016llx\n",(unsigned long long)meta->magic_0); + printf("magic_0 0x%016jx\n", meta->magic_0); printf("magic_1 0x%04x\n", meta->magic_1); printf("magic_2 0x%08x\n", meta->magic_2); printf("integrity 0x%08x %b\n", meta->raid.integrity, @@ -4789,8 +4785,7 @@ printf("disk_number %d\n", meta->raid.disk_number); printf("channel 0x%02x\n", meta->raid.channel); printf("device 0x%02x\n", meta->raid.device); - printf("magic_0 0x%016llx\n", - (unsigned long long)meta->raid.magic_0); + printf("magic_0 0x%016jx\n", meta->raid.magic_0); printf("disk_offset %u\n", meta->raid.disk_offset); printf("disk_sectors %u\n", meta->raid.disk_sectors); printf("rebuild_lba 0x%08x\n", meta->raid.rebuild_lba); @@ -4807,8 +4802,7 @@ printf("cylinders %u\n", meta->raid.cylinders); printf("heads %u\n", meta->raid.heads); printf("sectors %u\n", meta->raid.sectors); - printf("magic_1 0x%016llx\n", - (unsigned long long)meta->raid.magic_1); + printf("magic_1 0x%016jx\n", meta->raid.magic_1); printf("DISK# flags dummy_0 channel device magic_0\n"); for (i = 0; i < 8; i++) { printf(" %d %b 0x%02x 0x%02x 0x%02x ", @@ -4816,8 +4810,7 @@ "\20\10READY\7DOWN\6REDIR\5DUPLICATE\4SPARE" "\3ASSIGNED\2ONLINE\1VALID\n", meta->raid.disk[i].dummy_0, meta->raid.disk[i].channel, meta->raid.disk[i].device); - printf("0x%016llx\n", - (unsigned long long)meta->raid.disk[i].magic_0); + printf("0x%016jx\n", meta->raid.disk[i].magic_0); } printf("checksum 0x%08x\n", meta->checksum); printf("=================================================\n"); @@ -4842,8 +4835,7 @@ ata_raid_sii_print_meta(struct sii_raid_conf *meta) { printf("******* ATA Silicon Image Medley Metadata *******\n"); - printf("total_sectors %llu\n", - (unsigned long long)meta->total_sectors); + printf("total_sectors %ju\n", meta->total_sectors); printf("dummy_0 0x%04x\n", meta->dummy_0); printf("dummy_1 0x%04x\n", meta->dummy_1); printf("controller_pci_id 0x%08x\n", meta->controller_pci_id); @@ -4860,7 +4852,7 @@ printf("raid0_ident %u\n", meta->raid0_ident); printf("raid1_disks %u\n", meta->raid1_disks); printf("raid1_ident %u\n", meta->raid1_ident); - printf("rebuild_lba %llu\n", (unsigned long long)meta->rebuild_lba); + printf("rebuild_lba %ju\n", meta->rebuild_lba); printf("generation 0x%08x\n", meta->generation); printf("status 0x%02x %b\n", meta->status, meta->status, @@ -4943,8 +4935,7 @@ printf(" stripe_disks %d\n", meta->stripe_layout & VIA_L_DISKS); printf(" stripe_sectors %d\n", 0x08 << ((meta->stripe_layout & VIA_L_MASK) >> VIA_L_SHIFT)); - printf("disk_sectors %llu\n", - (unsigned long long)meta->disk_sectors); + printf("disk_sectors %ju\n", meta->disk_sectors); printf("disk_id 0x%08x\n", meta->disk_id); printf("DISK# disk_id\n"); for (i = 0; i < 8; i++) { ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/atapi-cam.c#3 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Apr 16 23:13:17 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1000216A405; Sun, 16 Apr 2006 23:13:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90EAF16A403 for ; Sun, 16 Apr 2006 23:13:16 +0000 (UTC) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EBD143D45 for ; Sun, 16 Apr 2006 23:13:16 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3GNDGuH093903 for ; Sun, 16 Apr 2006 23:13:16 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3GNDGKB093897 for perforce@freebsd.org; Sun, 16 Apr 2006 23:13:16 GMT (envelope-from jmg@freebsd.org) Date: Sun, 16 Apr 2006 23:13:16 GMT Message-Id: <200604162313.k3GNDGKB093897@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Cc: Subject: PERFORCE change 95402 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 23:13:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=95402 Change 95402 by jmg@jmg_arlene on 2006/04/16 23:12:17 fix compile error, and fix define to prevent it from happening again.. Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-all.h#4 edit .. //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-queue.c#4 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-all.h#4 (text+ko) ==== @@ -363,7 +363,7 @@ request, ata_cmd2str(request)); \ } #else -#define ATA_DEBUG_RQ(request, string) +#define ATA_DEBUG_RQ(request, string) do { } while(0) #endif ==== //depot/projects/kmacy_sun4v/src/sys/dev/ata/ata-queue.c#4 (text+ko) ==== @@ -270,7 +270,7 @@ return; } if (request->flags & ATA_R_DANGER1) - request->flags |= ATA_R_DANGER2 + request->flags |= ATA_R_DANGER2; ATA_DEBUG_RQ(request, "completed entered"); From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:06:05 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2511D16A404; Mon, 17 Apr 2006 04:06:05 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFA2716A401 for ; Mon, 17 Apr 2006 04:06:04 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3ED9E43D79 for ; Mon, 17 Apr 2006 04:05:57 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H45vKN063423 for ; Mon, 17 Apr 2006 04:05:57 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H45vBl063420 for perforce@freebsd.org; Mon, 17 Apr 2006 04:05:57 GMT (envelope-from jb@freebsd.org) Date: Mon, 17 Apr 2006 04:05:57 GMT Message-Id: <200604170405.k3H45vBl063420@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95406 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:06:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=95406 Change 95406 by jb@jb_freebsd2 on 2006/04/17 04:05:05 Compatibility cruft. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/processor.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:25:22 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4405816A403; Mon, 17 Apr 2006 04:25:22 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DDAC16A401 for ; Mon, 17 Apr 2006 04:25:22 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C035143D5C for ; Mon, 17 Apr 2006 04:25:21 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4PLsp073919 for ; Mon, 17 Apr 2006 04:25:21 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4PLVb073916 for perforce@freebsd.org; Mon, 17 Apr 2006 04:25:21 GMT (envelope-from jb@freebsd.org) Date: Mon, 17 Apr 2006 04:25:21 GMT Message-Id: <200604170425.k3H4PLVb073916@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95407 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:25:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=95407 Change 95407 by jb@jb_freebsd2 on 2006/04/17 04:24:48 Build the DTrace tools in the bootstrap-tools phase of 'make buildworld'. This ensures that the tools are (a) built up front on a system with none of them installed; and (b) that up-to-date versions are built and used in preference to any older version installed. The DTrace label is derived using 'uname -srp' and the OSRELDATE of the build system. The label is set in an environment variable called 'VERSION' which is the name you will see whizzing by during the build as each built object is converted to have CTF symbols. The label appears in the CTF ELF segment called '.SUNW_ctf'. e.g. A ctfdump of object secure/lib/libssh/progressmeter.So (a random one I chose) shows: - CTF Header ----------------------------------------------------------------- cth_magic = 0xcff1 cth_version = 2 cth_flags = 0x00 cth_parlabel = (anon) cth_parname = (anon) cth_lbloff = 0 cth_objtoff = 8 cth_funcoff = 30 cth_typeoff = 68 cth_stroff = 724 cth_strlen = 489 - Label Table ---------------------------------------------------------------- 48 FreeBSD 7.0-CURRENT i386 700015 - Data Objects --------------------------------------------------------------- [0] 12 unit (9) [1] 24 counter (14) [2] 18 cur_pos (15) [3] 18 end_pos (16) [4] 22 last_update (17) [5] 1 bytes_per_second (18) [6] 1 win_size (19) [7] 19 file (20) [8] 10 stalled (21) [9] 22 start (22) [10] 34 win_resized (24) - Functions ------------------------------------------------------------------ [0] FUNC (can_output) returns: 1 args: () [1] FUNC (sig_winch) returns: 7 args: (1) [2] FUNC (setscreensize) returns: 7 args: () [3] FUNC (update_progress_meter) returns: 7 args: (1) [4] FUNC (refresh_progress_meter) returns: 7 args: () [5] FUNC (stop_progress_meter) returns: 7 args: () [6] FUNC (start_progress_meter) returns: 7 args: (19, 18, 20) - Types ---------------------------------------------------------------------- <1> INTEGER int encoding=SIGNED offset=0 bits=32 <2> TYPEDEF __ct_rune_t refers to 1 <3> TYPEDEF __rune_t refers to 2 [4] INTEGER unsigned int encoding=0x0 offset=0 bits=32 <5> TYPEDEF __uint32_t refers to 4 <6> TYPEDEF __size_t refers to 5 <7> INTEGER void encoding=SIGNED offset=0 bits=0 [8] INTEGER char encoding=SIGNED CHAR offset=0 bits=8 [9] CONST (anon) refers to 8 <10> INTEGER long encoding=SIGNED offset=0 bits=32 [11] ARRAY (anon) content: 9 index: 10 nelems: 6 <12> CONST (anon) refers to 11 <13> TYPEDEF __int32_t refers to 1 <14> TYPEDEF sig_atomic_t refers to 1 [15] INTEGER long long encoding=SIGNED offset=0 bits=64 <16> TYPEDEF __int64_t refers to 15 <17> TYPEDEF __off_t refers to 16 <18> TYPEDEF off_t refers to 17 <19> POINTER (anon) refers to 8 [20] POINTER (anon) refers to 18 <21> TYPEDEF __time_t refers to 13 <22> TYPEDEF time_t refers to 21 [23] VOLATILE (anon) refers to 18 <24> POINTER (anon) refers to 23 [25] INTEGER unsigned short encoding=0x0 offset=0 bits=16 <26> STRUCT winsize (8 bytes) ws_row type=25 off=0 ws_col type=25 off=16 ws_xpixel type=25 off=32 ws_ypixel type=25 off=48 [27] INTEGER unsigned long encoding=0x0 offset=0 bits=32 [28] POINTER (anon) refers to 27 [29] STRUCT (anon) (16 bytes) __min type=3 off=0 __max type=3 off=32 __map type=3 off=64 __types type=28 off=96 <30> TYPEDEF _RuneEntry refers to 29 [31] POINTER (anon) refers to 30 [32] STRUCT (anon) (8 bytes) __nranges type=1 off=0 __ranges type=31 off=32 <33> TYPEDEF _RuneRange refers to 32 <34> VOLATILE (anon) refers to 14 [35] ARRAY (anon) content: 8 index: 10 nelems: 8 [36] ARRAY (anon) content: 8 index: 10 nelems: 32 [37] POINTER (anon) refers to 9 [38] POINTER (anon) refers to 37 [39] FUNCTION (anon) returns: 3 args: (37, 6, 38) [40] POINTER (anon) refers to 39 [41] POINTER (anon) refers to 19 [42] FUNCTION (anon) returns: 1 args: (3, 19, 6, 41) [43] POINTER (anon) refers to 42 [44] ARRAY (anon) content: 27 index: 10 nelems: 256 [45] ARRAY (anon) content: 3 index: 10 nelems: 256 [46] POINTER (anon) refers to 7 [47] STRUCT (anon) (3156 bytes) __magic type=35 off=0 __encoding type=36 off=64 __sgetrune type=40 off=320 __sputrune type=43 off=352 __invalid_rune type=3 off=384 __runetype type=44 off=416 __maplower type=45 off=8608 __mapupper type=45 off=16800 __runetype_ext type=33 off=24992 __maplower_ext type=33 off=25056 __mapupper_ext type=33 off=25120 __variable type=46 off=25184 __variable_len type=1 off=25216 <48> TYPEDEF _RuneLocale refers to 47 - String Table --------------------------------------------------------------- [0] \0 [1] FreeBSD 7.0-CURRENT i386 700015 [33] int [37] __ct_rune_t [49] __rune_t [58] unsigned int [71] __uint32_t [82] __size_t [91] void [96] char [101] long [106] __int32_t [116] sig_atomic_t [129] long long [139] __int64_t [149] __off_t [157] off_t [163] __time_t [172] time_t [179] unsigned short [194] winsize [202] ws_row [209] ws_col [216] ws_xpixel [226] ws_ypixel [236] unsigned long [250] __min [256] __max [262] __map [268] __types [276] _RuneEntry [287] __nranges [297] __ranges [306] _RuneRange [317] __magic [325] __encoding [336] __sgetrune [347] __sputrune [358] __invalid_rune [373] __runetype [384] __maplower [395] __mapupper [406] __runetype_ext [421] __maplower_ext [436] __mapupper_ext [451] __variable [462] __variable_len [477] _RuneLocale - CTF Statistics ------------------------------------------------------------- total number of data objects = 11 total number of functions = 7 total number of function arguments = 5 maximum argument list length = 3 average argument list length = 0.71 total number of types = 48 total number of integers = 8 total number of floats = 0 total number of pointers = 11 total number of arrays = 5 total number of func types = 2 total number of structs = 4 total number of unions = 0 total number of enums = 0 total number of forward tags = 0 total number of typedefs = 14 total number of volatile types = 2 total number of const types = 2 total number of restrict types = 0 total number of unknowns (holes) = 0 total number of struct members = 23 maximum number of struct members = 13 total size of all structs = 3188 maximum size of a struct = 3156 average number of struct members = 5.75 average size of a struct = 797.00 total number of union members = 0 maximum number of union members = 0 total size of all unions = 0 maximum size of a union = 0 total number of enum members = 0 maximum number of enum members = 0 total number of unique strings = 48 bytes of string data = 489 maximum string length = 32 average string length = 10.19 Affected files ... .. //depot/projects/dtrace/src/Makefile.inc1#5 edit Differences ... ==== //depot/projects/dtrace/src/Makefile.inc1#5 (text+ko) ==== @@ -37,7 +37,9 @@ # We must do etc last for install/distribute to work. # SUBDIR= share/info include lib libexec bin -.if !defined(NO_CDDL) +.if defined(NO_CDDL) +NO_CTF=1 +#else SUBDIR+=cddl .endif .if ${MK_GAMES} != "no" @@ -97,6 +99,12 @@ OSRELDATE= 0 .endif .endif + +.if !defined(VERSION) +VERSION!= uname -srp +VERSION+= ${OSRELDATE} +.endif + TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} TARGET?= ${MACHINE} @@ -175,6 +183,7 @@ BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} \ + VERSION="${VERSION}" \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ @@ -189,15 +198,16 @@ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \ - -DNO_WARNS -DNO_CTF + -DNO_WARNS # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ - -DWITHOUT_FORTRAN -DWITHOUT_GDB -DNO_CTF + -DWITHOUT_FORTRAN -DWITHOUT_GDB # world stage WMAKEENV= ${CROSSENV} \ _SHLIBDIRPREFIX=${WORLDTMP} \ + VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} @@ -827,12 +837,12 @@ .endif .if !defined(NO_CDDL) && !defined(NO_DTRACE) -_sgsmsg= cddl/usr.bin/sgsmsg +_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf gnu/lib/libdwarf cddl/lib/libelf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge .endif bootstrap-tools: .for _tool in \ - ${_sgsmsg} \ + ${_dtrace_tools} \ ${_strfile} \ ${_gperf} \ ${_groff} \ @@ -876,10 +886,6 @@ _rescue= rescue/rescue .endif -.if !defined(NO_CDDL) && !defined(NO_DTRACE) -_dtrace_tools= cddl/usr.bin -.endif - build-tools: .for _tool in \ bin/csh \ @@ -898,7 +904,6 @@ .endfor .for _tool in \ gnu/usr.bin/cc/cc_tools \ - ${_dtrace_tools} \ ${_kerberos5_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool}; \ From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:27:25 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2836416A403; Mon, 17 Apr 2006 04:27:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07E1116A401 for ; Mon, 17 Apr 2006 04:27:25 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B457543D46 for ; Mon, 17 Apr 2006 04:27:24 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4ROlO074003 for ; Mon, 17 Apr 2006 04:27:24 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4ROuM074000 for perforce@freebsd.org; Mon, 17 Apr 2006 04:27:24 GMT (envelope-from jb@freebsd.org) Date: Mon, 17 Apr 2006 04:27:24 GMT Message-Id: <200604170427.k3H4ROuM074000@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95408 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:27:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95408 Change 95408 by jb@jb_freebsd2 on 2006/04/17 04:26:54 Add a mk file to check the build architecture to determine if DTrace can be built. If not, NO_CTF is set and a traditional build is done. Affected files ... .. //depot/projects/dtrace/src/share/mk/bsd.dtrace.mk#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:28:27 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E6EF316A405; Mon, 17 Apr 2006 04:28:26 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C33E216A401 for ; Mon, 17 Apr 2006 04:28:26 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A23043D45 for ; Mon, 17 Apr 2006 04:28:26 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4SQAl074074 for ; Mon, 17 Apr 2006 04:28:26 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4SQIM074071 for perforce@freebsd.org; Mon, 17 Apr 2006 04:28:26 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Apr 2006 04:28:26 GMT Message-Id: <200604170428.k3H4SQIM074071@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 95409 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:28:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=95409 Change 95409 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/04/17 04:27:45 enable interrupts in FreeBSD's normal place in configure Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/autoconf.c#2 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/autoconf.c#2 (text+ko) ==== @@ -64,6 +64,8 @@ static void configure(void *dummy) { + + intr_restore_all(0x16); root_bus_configure(); #ifdef DEV_ISA From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:33:33 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ABF9316A405; Mon, 17 Apr 2006 04:33:33 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7286416A403 for ; Mon, 17 Apr 2006 04:33:33 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3541D43D45 for ; Mon, 17 Apr 2006 04:33:33 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4XX3M077058 for ; Mon, 17 Apr 2006 04:33:33 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4XWRV077052 for perforce@freebsd.org; Mon, 17 Apr 2006 04:33:32 GMT (envelope-from jb@freebsd.org) Date: Mon, 17 Apr 2006 04:33:32 GMT Message-Id: <200604170433.k3H4XWRV077052@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95410 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:33:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=95410 Change 95410 by jb@jb_freebsd2 on 2006/04/17 04:33:11 Add a bucket load of ctfconvert statements to the default rules so that whenever an object is built, it will have it's DWARF debug info converted to CTF. If DEBUG_FLAGS were set, then the CTF info is added rather than replacing the DWARF stuff. Note: This only applies to the default rules. There are lots and lots of places in the Makefiles where custom compilation takes place. All these need the ctfconvert statements added. That is work for much later. For now, what we've got is something that we can work with for proof of concept. It's not expected to be thorough yet. That's why I made the ctfconvert and ctfmerge tools not fail if the CTF info isn't present. We've got work to do to all the assembler code to get DWARF data generated. At the moment, every assembler file compiled to an object contains none of the required info for CTF. That's work for later too. Affected files ... .. //depot/projects/dtrace/src/share/mk/sys.mk#2 edit Differences ... ==== //depot/projects/dtrace/src/share/mk/sys.mk#2 (text+ko) ==== @@ -118,9 +118,15 @@ # SINGLE SUFFIX RULES .c: ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f: ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .sh: cp ${.IMPSRC} ${.TARGET} @@ -130,21 +136,33 @@ .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c rm -f y.tab.c mv y.tab.o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .l.o: ${LEX} ${LFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c lex.yy.c rm -f lex.yy.c mv lex.yy.o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .y.c: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -182,21 +200,39 @@ .c: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .cc.o .cpp.o .cxx.o .C.o: ${CXX} ${CXXFLAGS} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .p.o: ${PC} ${PFLAGS} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .e .r .F .f: ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \ @@ -207,23 +243,38 @@ .S.o: ${CC} ${CFLAGS} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.o: ${CC} -x assembler-with-cpp ${CFLAGS} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .s.o: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif # XXX not -j safe .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} rm -f y.tab.c +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .l.o: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET} rm -f ${.PREFIX}.tmp.c +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif # XXX not -j safe .y.c: @@ -269,3 +320,4 @@ .include .include +.include From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:37:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 457D216A404; Mon, 17 Apr 2006 04:37:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BDC416A401 for ; Mon, 17 Apr 2006 04:37:39 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC76143D55 for ; Mon, 17 Apr 2006 04:37:38 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4bcRH080405 for ; Mon, 17 Apr 2006 04:37:38 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4bcFX080399 for perforce@freebsd.org; Mon, 17 Apr 2006 04:37:38 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Apr 2006 04:37:38 GMT Message-Id: <200604170437.k3H4bcFX080399@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 95411 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:37:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=95411 Change 95411 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/04/17 04:37:20 ack IPIs Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/interrupt.S#6 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/interrupt.S#6 (text+ko) ==== @@ -36,9 +36,14 @@ #include "assym.s" + +#define PUTCHAR(x) \ + mov x, %o0 ; \ + mov CONS_WRITE, %o5 ; \ + ta FAST_TRAP + ENTRY(intr_fast) save %sp, -CCFSZ, %sp - 1: ldx [PCPU(IRHEAD)], %l0 brnz,a,pt %l0, 2f nop @@ -143,7 +148,7 @@ ! %g5 PC for fasttrap TL>0 handler ! %g1 arg 1 ! %g2 arg 2 - ! %g3 queue base VA + ! %g3 queue base RA, ackmask ! %g4 queue size mask ! %g6 head ptr mov CPU_MONDO_QUEUE_HEAD, %g1 @@ -152,7 +157,7 @@ ldxa [%g2]ASI_QUEUE, %g4 ! %g4 = tail ptr cmp %g6, %g4 be,pn %xcc, 0f ! head == tail - nop + nop /* * Get the address of the current CPU and index into @@ -179,24 +184,26 @@ ldxa [%g3 + %g6]ASI_REAL, %g1 ! read data word 1 add %g6, 0x8, %g6 ! inc head 8 bytes ldxa [%g3 + %g6]ASI_REAL, %g2 ! read data word 2 - add %g6, (INTR_REPORT_SIZE - 16) , %g6 - ! inc head to next record + add %g6, 0x8, %g6 ! inc head 8 bytes + ldxa [%g3 + %g6]ASI_REAL, %g7 ! read data word 3 + add %g6, (INTR_REPORT_SIZE - 24) , %g6 ! inc head to next record and %g6, %g4, %g6 ! and size mask for wrap around mov CPU_MONDO_QUEUE_HEAD, %g3 stxa %g6, [%g3]ASI_QUEUE ! store head pointer membar #Sync - + + mov %g7, %g3 ! ackmask /* * For now catch invalid PC being passed via cpu_mondo queue */ set KERNBASE, %g4 cmp %g5, %g4 bl,a,pn %xcc, 1f ! branch if bad %pc - nop + nop jmp %g5 ! jump to traphandler - nop + nop 1: ! invalid trap handler, discard it for now set cpu_mondo_invalid, %g4 @@ -236,6 +243,12 @@ * %g4 queue size mask * %g6 head ptr */ + mov %o0, %g1 + mov %o5, %g6 +! PUTCHAR(0x2b) + mov %g1, %o0 + mov %g6, %o5 + mov DEV_MONDO_QUEUE_HEAD, %g1 ldxa [%g1]ASI_QUEUE, %g6 ! %g6 = head ptr mov DEV_MONDO_QUEUE_TAIL, %g2 @@ -345,7 +358,7 @@ #endif /* lint */ ENTRY(tl_invlctx) - mov %o0, %g3 + mov %o0, %g2 mov %o1, %g4 mov %o2, %g5 mov %o3, %g6 @@ -361,19 +374,21 @@ ba panic_bad_hcall mov MMU_DEMAP_CTX, %o1 1: - mov %g3, %o0 + mov %g2, %o0 mov %g4, %o1 mov %g5, %o2 mov %g6, %o3 mov %g7, %o5 - retry + + ba,a,pt %xcc, set_ackmask + nop END(tl_invlctx) ENTRY(tl_invltlb) mov %o0, %g1 mov %o1, %g2 - mov %o2, %g3 - mov %o5, %g4 + mov %o2, %g4 + mov %o5, %g5 mov %g0, %o0 mov %g0, %o1 @@ -383,12 +398,15 @@ brz,pt %o0, 1f nop ba panic_bad_hcall + mov MMU_DEMAP_ALL, %o1 1: mov %g1, %o0 mov %g2, %o1 - mov %g3, %o2 - mov %g4, %o5 - retry + mov %g4, %o2 + mov %g5, %o5 + + ba,a,pt %xcc, set_ackmask + nop END(tl_invltlb) ENTRY(tl_invlpg) @@ -402,6 +420,21 @@ mov %g5, %o0 mov %g6, %o1 mov %g7, %o2 - retry + ba,a,pt %xcc, set_ackmask + nop END(tl_invlpg) - + +ENTRY(set_ackmask) + MAGIC_TRAP_ON + GET_PCPU_SCRATCH + ld [%g3], %g1 + ld [PCPU(CPUMASK)], %g4 +1: or %g1, %g4, %g2 + cas [%g3], %g1, %g2 + cmp %g1, %g2 + bne,pn %icc, 1b + mov %g2, %g1 + MAGIC_TRAP_OFF + ba,a,pt %xcc, cpu_mondo + nop +END(set_ackmask) From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:40:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5174C16A402; Mon, 17 Apr 2006 04:40:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1993716A400 for ; Mon, 17 Apr 2006 04:40:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB0C143D46 for ; Mon, 17 Apr 2006 04:40:42 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4egCY082708 for ; Mon, 17 Apr 2006 04:40:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4eg00082702 for perforce@freebsd.org; Mon, 17 Apr 2006 04:40:42 GMT (envelope-from jb@freebsd.org) Date: Mon, 17 Apr 2006 04:40:42 GMT Message-Id: <200604170440.k3H4eg00082702@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95412 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:40:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=95412 Change 95412 by jb@jb_freebsd2 on 2006/04/17 04:40:14 Change the include path order and sort the source files by name. Affected files ... .. //depot/projects/dtrace/src/cddl/lib/libctf/Makefile#3 edit Differences ... ==== //depot/projects/dtrace/src/cddl/lib/libctf/Makefile#3 (text+ko) ==== @@ -5,9 +5,17 @@ LIB= ctf SHLIB_MAJOR= 1 -SRCS= ctf_create.c ctf_decl.c ctf_error.c ctf_hash.c \ - ctf_labels.c ctf_lookup.c ctf_open.c ctf_types.c \ - ctf_util.c ctf_lib.c ctf_subr.c +SRCS= ctf_create.c \ + ctf_decl.c \ + ctf_error.c \ + ctf_hash.c \ + ctf_labels.c \ + ctf_lib.c \ + ctf_lookup.c \ + ctf_open.c \ + ctf_subr.c \ + ctf_types.c \ + ctf_util.c WARNS?= 0 @@ -17,8 +25,8 @@ CFLAGS+= -DCTF_OLD_VERSIONS -CFLAGS+= -I${.CURDIR}/../../../contrib \ - -I${.CURDIR}/../../../sys/contrib \ +CFLAGS+= -I${.CURDIR}/../../../sys/contrib \ + -I${.CURDIR}/../../../contrib \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \ -I${OPENSOLARIS_SYS_DISTDIR}/common/ctf \ From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:41:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2069A16A405; Mon, 17 Apr 2006 04:41:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F022616A402 for ; Mon, 17 Apr 2006 04:41:44 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A083643D46 for ; Mon, 17 Apr 2006 04:41:44 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4fixd083533 for ; Mon, 17 Apr 2006 04:41:44 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4fir9083525 for perforce@freebsd.org; Mon, 17 Apr 2006 04:41:44 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Apr 2006 04:41:44 GMT Message-Id: <200604170441.k3H4fir9083525@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 95413 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:41:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=95413 Change 95413 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/04/17 04:40:43 use intr_{disable,restore} functions add cpu_yield Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/machdep.c#20 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/machdep.c#20 (text+ko) ==== @@ -122,6 +122,7 @@ int cold = 1; long Maxmem; long realmem; +cpumask_t ipi_ready_mask; char pcpu0[PCPU_PAGES * PAGE_SIZE]; struct trapframe frame0; @@ -245,8 +246,7 @@ td = curthread; if (td->td_md.md_spinlock_count == 0) { - pil = rdpr(pil); - wrpr(pil, 0, PIL_TICK); + pil = intr_disable(); td->td_md.md_saved_pil = pil; } td->td_md.md_spinlock_count++; @@ -261,8 +261,9 @@ td = curthread; critical_exit(); td->td_md.md_spinlock_count--; - if (td->td_md.md_spinlock_count == 0) - wrpr(pil, td->td_md.md_saved_pil, 0); + if (td->td_md.md_spinlock_count == 0) { + intr_restore(td->td_md.md_saved_pil); + } } unsigned @@ -319,9 +320,6 @@ OF_getprop(child, "clock-frequency", &clock, sizeof(clock)); - - - /* * Initialize the console before printing anything. */ @@ -354,7 +352,6 @@ mp_tramp = mp_tramp_alloc(); #endif - env = getenv("kernelname"); if (env != NULL) { strlcpy(kernelname, env, sizeof(kernelname)); @@ -364,6 +361,7 @@ /* * Initialize proc0 stuff (p_contested needs to be done early). */ + proc_linkup(&proc0, &ksegrp0, &thread0); proc0.p_md.md_sigtramp = NULL; proc0.p_md.md_utrap = NULL; @@ -396,7 +394,8 @@ */ pmap_bootstrap(end); - thread0.td_kstack = kstack0; + thread0.td_kstack = kstack0; + thread0.td_md.md_saved_pil = 0; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; thread0.td_pcb->pcb_kstack = (uint64_t)(((char *)thread0.td_pcb) - (CCFSZ + SPOFF)); @@ -735,11 +734,14 @@ void cpu_idle(void) { - /* shouldn't be needed - but.. */ - wrpr(pil, 0, 0); -#ifdef SMP - hv_cpu_yield(); -#endif + + if (rdpr(pil) != 0) + panic("pil in cpu_idle not 0 - %ld", rdpr(pil)); + if (rdpr(pstate) != 0x16) + panic("interrupts disabled in cpu_idle %ld", rdpr(pstate)); + /* XXX heinous hack begin*/ + + cpu_yield(); } int @@ -844,6 +846,7 @@ pcb = td->td_pcb; tf = td->td_frame; + tf->tf_fprs = ~FPRS_FEF; bcopy(pcb->pcb_ufp, fpregs->fr_regs, sizeof(fpregs->fr_regs)); fpregs->fr_fsr = tf->tf_fsr; fpregs->fr_gsr = tf->tf_gsr; @@ -901,3 +904,10 @@ mtx_pool_unlock(mtxpool_sleep, ut); return (ut); } + +void +cpu_yield(void) +{ + if (rdpr(pil) < PIL_TICK) + hv_cpu_yield(); +} From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:48:54 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C91F16A406; Mon, 17 Apr 2006 04:48:54 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 133B616A400 for ; Mon, 17 Apr 2006 04:48:54 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C984D43D45 for ; Mon, 17 Apr 2006 04:48:53 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4mrmE092278 for ; Mon, 17 Apr 2006 04:48:53 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4mr1r092275 for perforce@freebsd.org; Mon, 17 Apr 2006 04:48:53 GMT (envelope-from jb@freebsd.org) Date: Mon, 17 Apr 2006 04:48:53 GMT Message-Id: <200604170448.k3H4mr1r092275@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95414 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:48:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=95414 Change 95414 by jb@jb_freebsd2 on 2006/04/17 04:48:21 Add support to run ctfconvert on objects created. This uses the DEBUG_FLAGS definition to get the object created with debug info, even if DEBUG_FLAGS was not set. In the case that it wasn't set, ctfconvert will replace the debug info with CTF data. In the case where debug info is required, ctfconvert will add the CTF data, leaving the debug info in the file. This creates a bit of a loophole in the build process. Where CTF conversion is required, the DEBUG_FLAGS are altered on the assumption that ctfconvert will be run. If, as it turns out, a custom compilation rule is used in the makefile, and that rule doesn't have the call to ctfconvert coded, then the object is left with debug info in it when it wasn't intended. I guess we can regard this as just something we need to check before a release to ensure that all the objects we are building have appropriate ELF sections. This change only applies to built objects, not executables or shared libraries. Those require ctfmerge. Adding that to the build is next. One thing I haven't spent any time thinking about yet is the issue of cross-builds. I'll leave that for later. A LOT later! 8-) Affected files ... .. //depot/projects/dtrace/src/share/mk/bsd.lib.mk#2 edit .. //depot/projects/dtrace/src/share/mk/bsd.prog.mk#2 edit Differences ... ==== //depot/projects/dtrace/src/share/mk/bsd.lib.mk#2 (text+ko) ==== @@ -4,6 +4,18 @@ .include +# C Type Format data is required for DTrace +CTFFLAGS=-L VERSION + +.if !defined(NO_CTF) +CTFCONVERT?=ctfconvert +.if defined(DEBUG_FLAGS) +CTFFLAGS+=-g +.else +DEBUG_FLAGS=-g +.endif +.endif + # Set up the variables controlling shared libraries. After this section, # SHLIB_NAME will be defined only if we are to create a shared library. # SHLIB_LINK will be defined only if we are to create a link to it. @@ -59,43 +71,82 @@ .c.po: ${CC} ${PO_FLAG} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .c.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .cc.po .C.po .cpp.po .cxx.po: ${CXX} ${PO_FLAG} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .cc.So .C.So .cpp.So .cxx.So: ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .m.po: ${OBJC} ${OBJCFLAGS} -pg -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .m.So: ${OBJC} ${PICFLAG} -DPIC ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.po: ${CC} -x assembler-with-cpp -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .S.po: ${CC} -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif all: objwarn ==== //depot/projects/dtrace/src/share/mk/bsd.prog.mk#2 (text+ko) ==== @@ -10,6 +10,18 @@ CFLAGS+=${COPTS} .endif +# C Type Format data is required for DTrace +CTFFLAGS=-L VERSION + +.if !defined(NO_CTF) +CTFCONVERT?=ctfconvert +.if defined(DEBUG_FLAGS) +CTFFLAGS+=-g +.else +DEBUG_FLAGS=-g +.endif +.endif + .if defined(DEBUG_FLAGS) CFLAGS+=${DEBUG_FLAGS} .endif From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:53:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9337616A404; Mon, 17 Apr 2006 04:53:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59DD916A401 for ; Mon, 17 Apr 2006 04:53:00 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF7CB43D55 for ; Mon, 17 Apr 2006 04:52:59 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4qxuD094852 for ; Mon, 17 Apr 2006 04:52:59 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4qx4J094844 for perforce@freebsd.org; Mon, 17 Apr 2006 04:52:59 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Apr 2006 04:52:59 GMT Message-Id: <200604170452.k3H4qx4J094844@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 95416 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:53:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=95416 Change 95416 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/04/17 04:52:52 block interrupts with pil don't enable until trap table is set Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/mp_locore.S#4 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/mp_locore.S#4 (text+ko) ==== @@ -147,7 +147,7 @@ set PCPU_PAGES * PAGE_SIZE - PC_SIZEOF, %l2 add %l1, %l2, %l1 sub %l1, SPOFF + CCFSZ, %sp - wrpr %g0, PSTATE_KERNEL, %pstate + wrpr %g0, PIL_TICK, %pil #if KTR_COMPILE & KTR_SMP CATR(KTR_SMP, "_mp_start: bootstrap cpuid=%d mid=%d pcpu=%#lx data=%#lx sp=%#lx" From owner-p4-projects@FreeBSD.ORG Mon Apr 17 04:53:01 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E392C16A468; Mon, 17 Apr 2006 04:53:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82FA316A400 for ; Mon, 17 Apr 2006 04:53:00 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6130B43D4C for ; Mon, 17 Apr 2006 04:52:59 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H4qxYJ094841 for ; Mon, 17 Apr 2006 04:52:59 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H4qxOI094828 for perforce@freebsd.org; Mon, 17 Apr 2006 04:52:59 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Apr 2006 04:52:59 GMT Message-Id: <200604170452.k3H4qxOI094828@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 95415 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 04:53:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=95415 Change 95415 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/04/17 04:51:57 add work arounds for various IPI related issues add ackmask for pmap functions to use for acknowledgement Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/mp_machdep.c#4 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/mp_machdep.c#4 (text+ko) ==== @@ -29,6 +29,7 @@ */ /*- * Copyright (c) 2002 Jake Burkholder. + * Copyright (c) 2006 Kip Macy . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -275,7 +276,6 @@ u_int clock; int cpuid, bp_skipped; u_long s; - mtx_init(&ipi_mtx, "ipi", NULL, MTX_SPIN); root = OF_peer(0); csa = &cpu_start_args; @@ -301,7 +301,6 @@ while (csa->csa_state != CPU_INIT) ; intr_restore(s); - mp_ncpus = cpuid + 1; #if 0 cpu_identify(0, clock, cpuid); @@ -317,7 +316,12 @@ pc->pc_node = child; all_cpus |= 1 << cpuid; +#if 1 if (mp_ncpus == MAXCPU) +#else + if (mp_ncpus == 16) +#endif + break; } PCPU_SET(other_cpus, all_cpus & ~(1 << PCPU_GET(cpuid))); @@ -377,26 +381,22 @@ trap_init(); cpu_intrq_init(); tick_start(); + /* + * enable interrupts now that we have our trap table set + */ + intr_restore_all(PSTATE_KERNEL); smp_cpus++; KASSERT(curthread != NULL, ("cpu_mp_bootstrap: curthread")); PCPU_SET(other_cpus, all_cpus & ~(1 << PCPU_GET(cpuid))); printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); - csa->csa_count--; membar(StoreLoad); csa->csa_state = CPU_BOOTSTRAP; + while (csa->csa_count != 0) ; -#ifdef SIMULATOR - DELAY(300*PCPU_GET(cpuid)); -#else - DELAY(300000*PCPU_GET(cpuid)); -#endif /* ok, now grab sched_lock and enter the scheduler */ -#if 0 - printf("entering scheduler\n"); -#endif mtx_lock_spin(&sched_lock); spinlock_exit(); PCPU_SET(switchtime, cpu_ticks()); @@ -450,29 +450,20 @@ } void -cpu_ipi_selected(u_int icpus, u_long d0, u_long d1, u_long d2) +cpu_ipi_selected(int cpu_count, uint16_t *cpulist, u_long d0, u_long d1, u_long d2, uint64_t *ackmask) { - int i, cpu_count, retries; - uint16_t *cpulist; - u_int cpus; + int i, retries; - cpulist = PCPU_GET(cpulist); - init_mondo(d0, d1, d2); + init_mondo(d0, d1, d2, (uint64_t)ackmask); - for (cpu_count = 0, i = 0, cpus = icpus & ~PCPU_GET(cpumask); i < 32 && cpus; - cpus = cpus >> 1, i++) { - if (!(cpus & 0x1)) - continue; + retries = 0; - cpulist[cpu_count] = (uint16_t)i; - cpu_count++; - } - retries = 0; retry: if (cpu_count) { int error, new_cpu_count; vm_paddr_t cpulist_ra; + cpulist_ra = TLB_DIRECT_TO_PHYS((vm_offset_t)cpulist); if ((error = hv_cpu_mondo_send(cpu_count, cpulist_ra)) == H_EWOULDBLOCK) { new_cpu_count = 0; @@ -486,11 +477,25 @@ printf("no more cpus to send to but mondo_send returned EWOULDBLOCK\n"); return; } - if (retries < 5000) + if ((retries & 0x1) == 0x1) + DELAY(10); + + if (retries < 50000) goto retry; + else { + printf("used up retries - cpus remaining: %d - cpus: ", + cpu_count); + for (i = 0; i < cpu_count; i++) + printf("#%d ", cpulist[i]); + printf("\n"); + } } - if (error == H_ENOCPU) - printf("cpuid==%d not considered valid - cpus=0x%x\n", cpulist[0], icpus); + if (error == H_ENOCPU) { + printf("bad cpuid: "); + for (i = 0; i < cpu_count; i++) + printf("#%d ", cpulist[i]); + printf("\n"); + } if (error) panic("can't handle error %d from cpu_mondo_send\n", error); } @@ -499,13 +504,40 @@ void -ipi_selected(u_int cpus, u_int ipi) +ipi_selected(u_int icpus, u_int ipi) { - cpu_ipi_selected(cpus, (u_long)tl_ipi_level, ipi, 0); + int i, cpu_count; + uint16_t *cpulist; + cpumask_t cpus; + uint64_t ackmask; + + /* 1) our cpu_ipi_ast doesn't do anything + * 2) a reschedule will be triggered at the next timer interrupt + * 3) forward_wakeup appears to abuse ASTs + * 4) handling 4-way threading vs 2-way threading will just serve + * to further obfuscate forward_wakeup + */ + if (ipi == IPI_AST) + return; + + + cpulist = PCPU_GET(cpulist); + cpus = ((icpus & ~PCPU_GET(cpumask)) & ipi_ready_mask); + + for (cpu_count = 0, i = 0; i < 32 && cpus; cpus = cpus >> 1, i++) { + if (!(cpus & 0x1)) + continue; + + cpulist[cpu_count] = (uint16_t)i; + cpu_count++; + } + + cpu_ipi_selected(cpu_count, cpulist, (u_long)tl_ipi_level, ipi, 0, &ackmask); + } void ipi_all_but_self(u_int ipi) { - cpu_ipi_selected(PCPU_GET(other_cpus), 0, (u_long)tl_ipi_level, ipi); + ipi_selected(PCPU_GET(other_cpus), ipi); } From owner-p4-projects@FreeBSD.ORG Mon Apr 17 05:23:48 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E869816A405; Mon, 17 Apr 2006 05:23:47 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75B4716A404 for ; Mon, 17 Apr 2006 05:23:47 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A42E043D67 for ; Mon, 17 Apr 2006 05:23:39 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H5NdP2014821 for ; Mon, 17 Apr 2006 05:23:39 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H5Naun014818 for perforce@freebsd.org; Mon, 17 Apr 2006 05:23:36 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Apr 2006 05:23:36 GMT Message-Id: <200604170523.k3H5Naun014818@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 95417 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 05:23:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=95417 Change 95417 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/04/17 05:23:18 IFC Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/alpha/clock.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/alpha/pmap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/include/cpu.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/include/kdb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/include/pcpu.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/linux/linux_dummy.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/linux/linux_proto.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/linux/linux_syscall.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/linux/linux_sysent.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/linux/linux_sysvec.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/alpha/linux/syscalls.master#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/acpica/madt.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/apic_vector.S#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/db_trace.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/gdb_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/intr_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/io_apic.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/local_apic.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/mp_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/pmap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/amd64/trap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/conf/GENERIC#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/conf/NOTES#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/include/apicvar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/include/asmacros.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/include/bus.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/include/gdb_machdep.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/include/intr_machdep.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/include/kdb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/include/mptable.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/include/pmap.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/include/trap.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/isa/atpic.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/linux32/linux.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/linux32/linux32_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/linux32/linux32_proto.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/linux32/linux32_syscall.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/linux32/linux32_sysent.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/linux32/linux32_sysvec.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/linux32/syscalls.master#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/amd64/pci/pci_bus.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/arm/busdma_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/arm/cpufunc.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/arm/in_cksum.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/arm/pmap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/arm/swtch.S#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/arm/trap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/arm/undefined.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/arm/vm_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_pio.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_pioreg.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_pmc.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_pmcreg.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_pmcvar.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_rtc.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_rtcreg.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_ssc.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_sscreg.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_st.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_twi.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91_usartreg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/at91rm92reg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/files.at91#2 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/if_ate.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/kb920x_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/ohci_atmelarm.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/arm/at91/uart_dev_at91usart.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/include/asmacros.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/include/atomic.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/include/in_cksum.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/include/pmap.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/sa11x0/uart_dev_sa1110.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/xscale/i80321/i80321_aau.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/xscale/i80321/i80321_dma.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/xscale/i80321/i80321_pci.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/arm/xscale/i80321/i80321_timer.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/alpha/common/Makefile.common#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/Makefile#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/README#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/arm_init.s#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/lib.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/lib.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/linker.cfg#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/main.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/xmodem.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/boot0/xmodem.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/arm/at91/inc/AT91RM9200.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/boot/forth/beastie.4th#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/i386/boot2/boot1.S#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/i386/cdboot/cdboot.s#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/i386/libi386/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/i386/libi386/gatea20.c#3 delete .. //depot/projects/kmacy_sun4v/src/sys/boot/i386/libi386/libi386.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/i386/libi386/smbios.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/i386/loader/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/i386/pxeldr/pxeldr.S#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/ia64/efi/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/ia64/ski/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/pc98/libpc98/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/pc98/libpc98/gatea20.c#3 delete .. //depot/projects/kmacy_sun4v/src/sys/boot/pc98/loader/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/powerpc/loader/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/boot/sparc64/loader/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/bsm/audit.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/bsm/audit_internal.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/cam/scsi/scsi_da.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/coda/coda.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/freebsd32/freebsd32_misc.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/freebsd32/freebsd32_proto.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/freebsd32/freebsd32_syscall.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/freebsd32/freebsd32_syscalls.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/freebsd32/freebsd32_sysent.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/freebsd32/syscalls.master#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_file.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_getcwd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_ioctl.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_ipc.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_mib.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_misc.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_signal.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_socket.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_stats.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_sysctl.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/linux/linux_uid16.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/compat/svr4/svr4_stream.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/Makefile.arm#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/NOTES#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/files#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/files.alpha#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/files.amd64#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/files.i386#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/files.ia64#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/files.pc98#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/files.powerpc#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/files.sparc64#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/options#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/options.arm#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/options.i386#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/conf/options.pc98#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/contrib/altq/altq/altq_subr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/contrib/pf/net/if_pflog.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/contrib/pf/net/pf_norm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/crypto/via/padlock.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ddb/db_command.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ddb/ddb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/aac/aac.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/acpi_support/acpi_asus.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/acpica/Osd/OsdHardware.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/acpica/Osd/OsdSchedule.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/acpica/acpi.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/acpica/acpi_cmbat.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/acpica/acpi_dock.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/aha/aha_isa.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/aha/aha_mca.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/aic7xxx/aic79xx_osm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/amr/amr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/amr/amr_linux.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/amr/amr_pci.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/amr/amrvar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ath/ath_rate/sample/sample.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ath/if_ath.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ath/if_athvar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/atkbdc/psm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/bce/if_bce.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/bce/if_bcefw.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/bce/if_bcereg.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/bfe/if_bfe.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/bge/if_bge.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/bge/if_bgereg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ce/tau32-ddk.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ce/tau32-ddk.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/cs/if_cs.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/dc/if_dc.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/dc/if_dcreg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/de/dc21040reg.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/de/if_de.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/de/if_devar.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/drm-preprocess.sh#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/drm.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/drm_agpsupport.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/drm_pciids.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/i915_dma.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/i915_drm.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/i915_drv.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/i915_irq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/i915_mem.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/mga_drv.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/r300_cmdbuf.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/r300_reg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/radeon_cp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/radeon_drm.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/radeon_drv.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/radeon_state.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/savage_bci.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/savage_state.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/sis_ds.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/sis_ds.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/drm/sis_mm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/em/LICENSE#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/em/README#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/em/if_em.c#4 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/em/if_em_hw.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/em/if_em_hw.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/en/midway.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/exca/exca.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/fatm/if_fatm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/fxp/if_fxp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/hme/if_hme.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/hwpmc/hwpmc_logging.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/hwpmc/hwpmc_mod.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/hwpmc/hwpmc_piv.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/hwpmc/hwpmc_x86.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ieee488/upd7210.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iicbus/if_ic.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iicbus/iic.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iicbus/iicbb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iicbus/iicsmb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iir/iir.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iir/iir.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iir/iir_pci.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ipw/if_ipw.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ipw/if_ipwreg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ipw/if_ipwvar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/isp/isp_freebsd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iwi/if_iwi.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iwi/if_iwireg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/iwi/if_iwivar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/kbd/kbd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/kbdmux/kbdmux.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/md/md.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/mfi/mfi.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/mfi/mfi_disk.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/mfi/mfi_ioctl.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/mfi/mfi_pci.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/mfi/mfireg.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/mfi/mfivar.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/mii/brgphy.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/mii/miidevs#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/patm/if_patm_attach.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/pccbb/pccbb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/pccbb/pccbbreg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ppbus/lpt.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ppbus/ppbconf.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ppc/ppc.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ppc/ppcvar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/puc/puc_ebus.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/puc/puc_sbus.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/if_ral.c#3 delete .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/if_ral_pccard.c#3 delete .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/if_ral_pci.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/if_ralreg.h#3 delete .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/if_ralvar.h#3 delete .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/rt2560.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/rt2560reg.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/rt2560var.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/rt2661.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/rt2661_ucode.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/rt2661reg.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/ral/rt2661var.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/re/if_re.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/safe/safe.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/scc/scc_bfe.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/scc/scc_bfe_ebus.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/scc/scc_bfe_macio.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/scc/scc_bfe_sbus.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/scc/scc_bus.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/scc/scc_core.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/scc/scc_dev_sab82532.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/scc/scc_dev_z8530.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/scc/scc_if.m#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/sound/isa/ad1816.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/sound/pci/atiixp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/sound/pci/ich.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/sound/pcm/channel.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/sound/pcm/dsp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/sound/pcm/mixer.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/sound/pcm/sound.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/sound/pcm/sound.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/sound/pcm/vchan.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/syscons/syscons.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/tdfx/tdfx_linux.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/tdfx/tdfx_pci.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_bus.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_bus_ebus.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_bus_scc.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_core.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_cpu.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_cpu_powerpc.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_dev_ns8250.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_dev_sab82532.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_dev_z8530.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/uart/uart_tty.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/ubsec/ubsec.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/ehci.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/hid.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/if_ural.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/ohci.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/uhci.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/ukbd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/umass.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/uplcom.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/usb_port.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/usb_quirks.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/usb_subr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/usbdevs#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/usbdivar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/usb/uscanner.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/vkbd/vkbd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/dev/xe/if_xe.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/fs/devfs/devfs.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/fs/devfs/devfs_vnops.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/fs/fdescfs/fdesc_vnops.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/fs/fifofs/fifo_vnops.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/fs/nullfs/null_vnops.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/gdb/gdb_cons.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/gdb/gdb_int.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/gdb/gdb_main.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/eli/g_eli.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/eli/g_eli.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom_bsd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom_ccd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom_ctl.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom_disk.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom_gpt.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom_io.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom_slice.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom_subr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/geom_vfs.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/label/g_label_ufs.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/mirror/g_mirror.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/mirror/g_mirror.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/mirror/g_mirror_ctl.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/raid3/g_raid3.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/raid3/g_raid3.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/raid3/g_raid3_ctl.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/vinum/geom_vinum.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/vinum/geom_vinum.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/vinum/geom_vinum_rm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/vinum/geom_vinum_state.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/geom/vinum/geom_vinum_subr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/gnu/fs/ext2fs/ext2_bitops.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/gnu/fs/xfs/FreeBSD/support/kdb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/acpica/madt.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/conf/GENERIC#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/conf/NOTES#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/conf/PAE#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/conf/XBOX#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/exception.s#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/geode.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/identcpu.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/intr_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/io_apic.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/local_apic.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/mp_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/pmap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/i386/vm_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/include/apicvar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/include/atomic.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/include/intr_machdep.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/include/kdb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/include/xbox.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/isa/atpic.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/isa/npx.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/linux/linux.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/linux/linux_dummy.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/linux/linux_proto.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/linux/linux_syscall.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/linux/linux_sysent.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/linux/linux_sysvec.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/linux/syscalls.master#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/i386/xbox/xboxfb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ia64/ia64/interrupt.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ia64/ia64/pmap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ia64/include/kdb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/isa/syscons_isa.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/isofs/cd9660/cd9660_rrip.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/imgact_aout.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/init_sysent.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_acct.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_alq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_cpu.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_descrip.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_environment.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_event.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_exec.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_exit.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_fork.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_intr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_ktrace.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_linker.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_mac.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_malloc.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_mbuf.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_mutex.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_resource.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_sig.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_tc.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_thread.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/kern_time.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/md5c.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/serdev_if.m#1 branch .. //depot/projects/kmacy_sun4v/src/sys/kern/subr_kdb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/subr_prf.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/subr_sleepqueue.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/subr_taskqueue.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/subr_turnstile.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/subr_witness.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/syscalls.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/syscalls.master#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/sysv_shm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/uipc_mbuf.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/uipc_mqueue.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/uipc_proto.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/uipc_socket.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/uipc_socket2.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/uipc_syscalls.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/uipc_usrreq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_aio.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_bio.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_cache.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_cluster.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_default.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_lookup.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_mount.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_subr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_syscalls.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/kern/vfs_vnops.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/3dfx/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/3dfx_linux/Makefile#1 branch .. //depot/projects/kmacy_sun4v/src/sys/modules/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/acpi/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/acpi/acpi_dock/Makefile#1 branch .. //depot/projects/kmacy_sun4v/src/sys/modules/acpi/acpi_video/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/ata/atausb/Makefile#1 branch .. //depot/projects/kmacy_sun4v/src/sys/modules/ath/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/bce/Makefile#1 branch .. //depot/projects/kmacy_sun4v/src/sys/modules/ce/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/coda5/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/cp/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/crypto/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/de/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/dummynet/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/if_bridge/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/if_gif/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/if_ppp/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/ipfilter/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/ipfw/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/iwi/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/kbdmux/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/linux/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/mfi/Makefile#1 branch .. //depot/projects/kmacy_sun4v/src/sys/modules/netgraph/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/pf/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/pflog/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/ral/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/scc/Makefile#1 branch .. //depot/projects/kmacy_sun4v/src/sys/modules/smbfs/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/modules/uart/Makefile#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/bridgestp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if_arc.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if_arcsubr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if_bridge.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if_bridgevar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if_ethersubr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if_media.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if_ppp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if_tap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/if_vlan.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/ppp_deflate.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/raw_cb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/raw_usrreq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/route.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net/rtsock.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net80211/ieee80211_input.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net80211/ieee80211_ioctl.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net80211/ieee80211_node.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net80211/ieee80211_node.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net80211/ieee80211_output.c#4 integrate .. //depot/projects/kmacy_sun4v/src/sys/net80211/ieee80211_proto.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/net80211/ieee80211_var.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netatalk/ddp_pcb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netatalk/ddp_usrreq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netatm/atm_aal5.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netatm/atm_proto.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netatm/atm_socket.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netatm/atm_usrreq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netatm/atm_var.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netgraph/ng_socket.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netgraph/ng_tcpmss.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/if_ether.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/in_pcb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/in_pcb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/ip_carp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/ip_carp.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/ip_divert.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/ip_fw2.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/ip_icmp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/raw_ip.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/tcp_input.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/tcp_sack.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/tcp_subr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/tcp_syncache.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/tcp_timer.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/tcp_usrreq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/tcp_var.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet/udp_usrreq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/frag6.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/in6.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/in6_pcb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/in6_pcb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/ip6_mroute.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/ipsec.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/mld6.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/nd6.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/nd6_rtr.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/raw_ip6.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/udp6_output.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netinet6/udp6_usrreq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/ipsec.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/ipsec.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/ipsec_mbuf.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/key.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/key_var.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/keydb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/keysock.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/xform.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/xform_ah.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/xform_esp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/xform_ipcomp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/xform_ipip.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipsec/xform_tcp.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipx/README#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipx/ipx_input.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipx/ipx_ip.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipx/ipx_pcb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipx/ipx_pcb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipx/ipx_usrreq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netipx/spx_usrreq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netkey/keysock.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netnatm/natm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netsmb/smb_crypt.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/netsmb/smb_smb.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/nfsclient/nfs_bio.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/nfsclient/nfs_diskless.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/nfsclient/nfs_socket.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/nfsclient/nfs_vfsops.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/nfsclient/nfs_vnops.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/nfsclient/nfsnode.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/nfsserver/nfs_serv.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/nfsserver/nfs_srvsock.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/nfsserver/nfs_srvsubs.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/opencrypto/crypto.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/opencrypto/cryptodev.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/opencrypto/cryptosoft.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/pc98/conf/NOTES#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/pc98/pc98/machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/pci/dc21040reg.h#3 delete .. //depot/projects/kmacy_sun4v/src/sys/pci/if_de.c#3 delete .. //depot/projects/kmacy_sun4v/src/sys/pci/if_devar.h#3 delete .. //depot/projects/kmacy_sun4v/src/sys/pci/if_rlreg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/posix4/ksched.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/posix4/p1003_1b.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/powerpc/conf/GENERIC#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/powerpc/include/bus.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/powerpc/powerpc/mmu_if.m#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/powerpc/powerpc/pmap_dispatch.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_arg.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_bsm.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_bsm_klib.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_bsm_token.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_ioctl.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_pipe.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_private.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_syscalls.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_trigger.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/audit/audit_worker.c#1 branch .. //depot/projects/kmacy_sun4v/src/sys/security/mac/mac_process.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/mac/mac_vfs.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/security/mac_bsdextended/mac_bsdextended.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/conf/GENERIC#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/fhc/clkbrd.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/fhc/clkbrdreg.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/include/asi.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/include/bus.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/include/kdb.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/sparc64/machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/sparc64/mp_machdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/sparc64/pmap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/sparc64/tick.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sparc64/sparc64/trap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/_types.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/aio.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/bio.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/buf.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/cdefs.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/clock.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/disk.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/event.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/filedesc.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/gmon.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/hash.h#1 branch .. //depot/projects/kmacy_sun4v/src/sys/sys/linker.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/mac.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/mac_policy.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/mbuf.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/md5.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/mount.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/param.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/pmc.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/pmckern.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/pmclog.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/proc.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/protosw.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/queue.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/serial.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/signalvar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/socketvar.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/sx.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/syscall.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/syscall.mk#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/syscallsubr.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/sysctl.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/sysproto.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/timers.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/umtx.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/sys/vnode.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ffs/ffs_alloc.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ffs/ffs_extern.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ffs/ffs_rawread.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ffs/ffs_snapshot.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ffs/ffs_softdep.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ffs/ffs_vfsops.c#5 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ffs/softdep.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ufs/ufs_inode.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ufs/ufs_lookup.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ufs/ufs_quota.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ufs/ufs_vnops.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/ufs/ufs/ufsmount.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/pmap.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/swap_pager.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/swap_pager.h#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/vm_contig.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/vm_fault.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/vm_map.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/vm_mmap.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/vm_object.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/vm_page.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/vm_pageq.c#3 integrate .. //depot/projects/kmacy_sun4v/src/sys/vm/vnode_pager.c#3 integrate Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/Makefile#3 (text+ko) ==== @@ -1,7 +1,9 @@ -# $FreeBSD: src/sys/Makefile,v 1.34 2006/01/10 20:58:27 rees Exp $ +# $FreeBSD: src/sys/Makefile,v 1.35 2006/03/17 18:54:34 ru Exp $ + +.include # The boot loader -.if !defined(NO_BOOT) +.if ${MK_BOOT} != "no" .if ${MACHINE_ARCH} != "arm" SUBDIR= boot .endif ==== //depot/projects/kmacy_sun4v/src/sys/alpha/alpha/clock.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.42 2005/12/22 22:16:04 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.45 2006/03/28 21:20:11 jhb Exp $"); #include "opt_clock.h" @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -89,8 +90,6 @@ device_t clockdev; int clockinitted; -int tickfix; -int tickfixinterval; int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ @@ -103,15 +102,8 @@ #define TIMER_FREQ 1193182 #endif u_int32_t timer_freq = TIMER_FREQ; -int timer0_max_count; -static u_int32_t i8254_lastcount; -static u_int32_t i8254_offset; -static int i8254_ticked; -static int clkintr_pending = 0; - extern int cycles_per_sec; -extern int ncpus; static timecounter_get_t i8254_get_timecount; static timecounter_get_t alpha_get_timecount; @@ -128,7 +120,7 @@ static struct timecounter i8254_timecounter = { i8254_get_timecount, /* get_timecount */ 0, /* no poll_pps */ - ~0u, /* counter_mask */ + 0xffff, /* counter_mask */ 0, /* frequency */ "i8254" /* name */ }; @@ -142,22 +134,6 @@ /* static u_char timer0_state; */ static u_char timer2_state; -/* - * Algorithm for missed clock ticks from Linux/alpha. - */ - -/* - * Shift amount by which scaled_ticks_per_cycle is scaled. Shifting - * by 48 gives us 16 bits for HZ while keeping the accuracy good even - * for large CPU clock rates. - */ -#define FIX_SHIFT 48 - -static u_int64_t scaled_ticks_per_cycle; -static u_int32_t max_cycles_per_tick; -static u_int32_t last_time; - -static void handleclock(int usermode, uintfptr_t pc); static void calibrate_clocks(u_int32_t firmware_freq, u_int32_t *pcc, u_int32_t *timer); static void set_timer_freq(u_int freq, int intr_freq); @@ -176,6 +152,7 @@ calibrate_clocks(cycles_per_sec, &pcc, &freq); cycles_per_sec = pcc; + set_cputicker(read_cycle_count, cycles_per_sec, 0); /* * XXX: TurboLaser doesn't have an i8254 counter. @@ -206,7 +183,6 @@ freq, timer_freq); } set_timer_freq(timer_freq, hz); - i8254_timecounter.tc_frequency = timer_freq; out: #ifdef EVCNT_COUNTERS @@ -235,21 +211,12 @@ void cpu_initclocks() { - u_int32_t freq; if (clockdev == NULL) panic("cpu_initclocks: no clock attached"); tick = 1000000 / hz; /* number of microseconds between interrupts */ - tickfix = 1000000 - (hz * tick); - if (tickfix) { - int ftp; - ftp = min(ffs(tickfix), ffs(hz)); - tickfix >>= (ftp - 1); - tickfixinterval = hz >> (ftp - 1); - } - /* * Establish the clock interrupt; it's a special case. * @@ -262,24 +229,18 @@ * hardclock, which would then fall over because p->p_stats * isn't set at that time. */ - freq = cycles_per_sec; - last_time = alpha_rpcc(); - scaled_ticks_per_cycle = ((u_int64_t)hz << FIX_SHIFT) / freq; - max_cycles_per_tick = 2*freq / hz; /* * XXX: TurboLaser doesn't have an i8254 counter. * XXX: A replacement is needed, and another method * XXX: of determining this would be nice. */ - if (hwrpb->rpb_type != ST_DEC_21000) { + if (hwrpb->rpb_type != ST_DEC_21000) tc_init(&i8254_timecounter); - platform.clockintr = handleclock; - } else - platform.clockintr = hardclock; + platform.clockintr = hardclock; - if (ncpus == 1) { - alpha_timecounter.tc_frequency = freq; + if (mp_ncpus == 1) { + alpha_timecounter.tc_frequency = cycles_per_sec; tc_init(&alpha_timecounter); } @@ -375,7 +336,7 @@ if (count == 0) goto fail; if (count > prev_count) - tot_count += prev_count - (count - timer0_max_count); + tot_count += prev_count - (count - 0xffff); else tot_count += prev_count - count; prev_count = count; @@ -410,40 +371,16 @@ static void set_timer_freq(u_int freq, int intr_freq) { - int new_timer0_max_count; mtx_lock_spin(&clock_lock); timer_freq = freq; - new_timer0_max_count = TIMER_DIV(intr_freq); - if (new_timer0_max_count != timer0_max_count) { - timer0_max_count = new_timer0_max_count; - outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); - outb(TIMER_CNTR0, timer0_max_count & 0xff); - outb(TIMER_CNTR0, timer0_max_count >> 8); - } + i8254_timecounter.tc_frequency = timer_freq; + outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); + outb(TIMER_CNTR0, 0); + outb(TIMER_CNTR0, 0); mtx_unlock_spin(&clock_lock); } -static void -handleclock(int usermode, uintfptr_t pc) -{ - - KASSERT(hwrpb->rpb_type != ST_DEC_21000, - ("custom clock handler called on TurboLaser")); - if (timecounter->tc_get_timecount == i8254_get_timecount) { - mtx_lock_spin(&clock_lock); - if (i8254_ticked) - i8254_ticked = 0; - else { - i8254_offset += timer0_max_count; - i8254_lastcount = 0; - } - clkintr_pending = 0; - mtx_unlock_spin(&clock_lock); - } - hardclock(usermode, pc); -} - void cpu_startprofclock(void) { @@ -609,29 +546,8 @@ static unsigned i8254_get_timecount(struct timecounter *tc) { - u_int count; - u_int high, low; - mtx_lock_spin(&clock_lock); - - /* Select timer0 and latch counter value. */ - outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH); - - low = inb(TIMER_CNTR0); - high = inb(TIMER_CNTR0); - count = timer0_max_count - ((high << 8) | low); - if (count < i8254_lastcount || - (!i8254_ticked && (clkintr_pending || - ((count < 20) && (inb(IO_ICU1) & 1))) - )) { - i8254_ticked = 1; - i8254_offset += timer0_max_count; - } - i8254_lastcount = count; - count += i8254_offset; - - mtx_unlock_spin(&clock_lock); - return (count); + return (0xffff - get_8254_ctr()); } static unsigned @@ -640,6 +556,30 @@ return alpha_rpcc(); } +/* + * The RPCC register actually consists of two halves. The lower half + * is a raw 32-bit counter that wraps. The upper half is defined in + * the Digital UNIX PAL as being a raw per-process cycle count mod 2^32 + * that is updated on each call to swpctx. In order to produce a 64-bit + * counter, we just use the lower half and simulate the upper 32-bits. + * The architecture guarantees that there will always be at least one + * clock interrupt in between overlaps in the lower half, so as long as + * we call this function every clock interrupt we should not miss any + * overlaps. + */ +uint64_t +read_cycle_count(void) +{ + unsigned pcc_cnt; + + /* Assert a critical section? */ + pcc_cnt = alpha_rpcc() & 0xffffffff; + if (pcc_cnt < PCPU_GET(last_pcc_cnt)) + PCPU_SET(pcc_base, PCPU_GET(pcc_base) + 1); + PCPU_SET(last_pcc_cnt, pcc_cnt); + return (pcc_cnt | ((uint64_t)PCPU_GET(pcc_base) << 32)); +} + int acquire_timer2(int mode) { ==== //depot/projects/kmacy_sun4v/src/sys/alpha/alpha/pmap.c#3 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.187 2005/12/02 18:02:54 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.189 2006/04/12 04:22:50 alc Exp $"); #include #include @@ -696,21 +696,6 @@ * Low level helper routines..... ***************************************************/ - - -/* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static PMAP_INLINE int -pmap_track_modified(vm_offset_t va) -{ - if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) - return 1; - else - return 0; -} - /* * Routine: pmap_extract * Function: @@ -1346,10 +1331,8 @@ ("get_pv_entry: wired pte %#lx", tpte)); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); - if ((tpte & PG_FOW) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } + if ((tpte & PG_FOW) == 0) + vm_page_dirty(m); pmap_invalidate_page(pmap, va); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -1449,10 +1432,8 @@ pmap->pm_stats.resident_count -= 1; if (oldpte & PG_MANAGED) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Apr 17 08:15:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B0E616A406; Mon, 17 Apr 2006 08:15:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05C9316A403 for ; Mon, 17 Apr 2006 08:15:07 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BE1043D46 for ; Mon, 17 Apr 2006 08:15:07 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H8F7b9007983 for ; Mon, 17 Apr 2006 08:15:07 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H8F7X7007975 for perforce@freebsd.org; Mon, 17 Apr 2006 08:15:07 GMT (envelope-from soc-andrew@freebsd.org) Date: Mon, 17 Apr 2006 08:15:07 GMT Message-Id: <200604170815.k3H8F7X7007975@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 95420 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 08:15:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=95420 Change 95420 by soc-andrew@soc-andrew_serv on 2006/04/17 08:14:54 Create a new target to install a package on the boot media Make the bsd shell shellscript a little easyer to work with Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/release/Makefile#42 edit .. //depot/projects/soc2005/bsdinstaller/src/release/bsdinstaller/bsdinstaller_shell.sh#10 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/release/Makefile#42 (text+ko) ==== @@ -826,26 +826,16 @@ @cp -Rp ${RD}/kernels/GENERIC/ ${RD}/bsdinstaller/root/boot/kernel # Install Lua into the package root - ( /usr/bin/fetch -ARr -o ${RD}/bsdinstaller/lua.tbz \ - ${PACKAGE_SITE}/${PACKAGE_DIR}/lua.tbz && \ - pkg_add -R -P ${RD}/bsdinstaller/root/usr/local \ - ${RD}/bsdinstaller/lua.tbz ) - rm ${RD}/bsdinstaller/lua.tbz - - ( /usr/bin/fetch -ARr -o ${RD}/bsdinstaller/luasocket.tbz \ - ${PACKAGE_SITE}/${PACKAGE_DIR}/luasocket.tbz && \ - pkg_add -R -P ${RD}/bsdinstaller/root/usr/local \ - ${RD}/bsdinstaller/luasocket.tbz ) - rm ${RD}/bsdinstaller/luasocket.tbz - - ( /usr/bin/fetch -ARr -o ${RD}/bsdinstaller/lua50-posix-5.0.tbz \ - ${PACKAGE_SITE}/${PACKAGE_DIR}/lua50-posix-5.0.tbz && \ - pkg_add -R -P ${RD}/bsdinstaller/root/usr/local \ - ${RD}/bsdinstaller/lua50-posix-5.0.tbz ) - rm ${RD}/bsdinstaller/lua50-posix-5.0.tbz - - # Reset the library directories - ldconfig /lib /usr/lib /usr/lib/compat /usr/local/lib + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua \ + ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-compat51 \ + ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=luasocket \ + ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-posix \ + ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-pty \ + ROOT=${RD}/bsdinstaller/root @touch ${RD}/bsdinstaller/root/etc/fstab @echo "sendmail_enable=\"NONE\"" > ${RD}/bsdinstaller/root/etc/rc.conf @@ -1303,6 +1293,24 @@ done \ fi +# Installs a package on the install media +# ROOT is where to install it to +# PACKAGE is the package name +installPackage: +.if !defined(ROOT) + @echo "ROOT undefined in installPackage" && exit 1 +.endif +.if !defined(PACKAGE) + @echo "PACKAGE undefined in installPackage" && exit 1 +.endif + rm ${RD}/${PACKAGE}.tbz + ( /usr/bin/fetch -ARr -o ${RD}/${PACKAGE}.tbz \ + ${PACKAGE_SITE}/${PACKAGE_DIR}/${PACKAGE}.tbz && \ + pkg_add -Rf -P ${ROOT}/usr/local \ + ${RD}/${PACKAGE}.tbz ) + rm ${RD}/${PACKAGE}.tbz + ldconfig /lib /usr/lib /usr/lib/compat /usr/local/lib + # # --==## Build a floppy set for a splitfs file ##==-- # ==== //depot/projects/soc2005/bsdinstaller/src/release/bsdinstaller/bsdinstaller_shell.sh#10 (text+ko) ==== @@ -13,8 +13,14 @@ /usr/sbin/bsd_installer_ncurses elif [ ${TTY} = "/dev/ttyv1" ] then - LD_PRELOAD="/usr/local/lib/liblua.so;/usr/local/lib/liblualib.so;/usr/lib/libm.so" LUA_PATH="/usr/local/share/lua/5.0/?.lua;/usr/lib/lua/?.lua;/usr/libexec/bsdinstaller/lib/?.lua" LUA_CPATH="/usr/local/lib/lua/5.0/?.so;/usr/lib/lua/?.so" LUA_SOPATH=/usr/local/lib/lua/5.0/ lua -lcompat-5.1 /usr/libexec/bsdinstaller/main.lua /usr/libexec/bsdinstaller/conf/BSDInstaller.lua /usr/libexec/bsdinstaller/conf/FreeBSD.lua dir.root=/ booted_from_install_media=true - #/usr/sbin/bsd_installer_be + export LD_PRELOAD="/usr/local/lib/liblua.so;/usr/local/lib/liblualib.so;/usr/lib/libm.so" + export LUA_PATH="/usr/local/share/lua/5.0/?.lua;/usr/lib/lua/?.lua;/usr/libexec/bsdinstaller/lib/?.lua" + export LUA_CPATH="/usr/local/lib/lua/5.0/?.so;/usr/lib/lua/?.so" + export LUA_SOPATH=/usr/local/lib/lua/5.0/ + lua -lcompat-5.1 /usr/libexec/bsdinstaller/main.lua \ + /usr/libexec/bsdinstaller/conf/BSDInstaller.lua \ + /usr/libexec/bsdinstaller/conf/FreeBSD.lua dir.root=/ \ + booted_from_install_media=true if [ $? -eq 5 ] then # The backend returned the reboot value From owner-p4-projects@FreeBSD.ORG Mon Apr 17 09:31:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8B5F316A400; Mon, 17 Apr 2006 09:31:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E062F16A403 for ; Mon, 17 Apr 2006 09:31:10 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B06243D45 for ; Mon, 17 Apr 2006 09:31:10 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3H9VAeB055251 for ; Mon, 17 Apr 2006 09:31:10 GMT (envelope-from gnn@neville-neil.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3H9V5wI055163 for perforce@freebsd.org; Mon, 17 Apr 2006 09:31:05 GMT (envelope-from gnn@neville-neil.com) Date: Mon, 17 Apr 2006 09:31:05 GMT Message-Id: <200604170931.k3H9V5wI055163@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gnn@neville-neil.com using -f From: "George V. Neville-Neil" To: Perforce Change Reviews Cc: Subject: PERFORCE change 95422 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 09:31:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=95422 Change 95422 by gnn@gnn_devbox_fast_ipsec on 2006/04/17 09:30:07 Integrate from the integration branch. Affected files ... .. //depot/projects/gnn_fast_ipsec/src/sys/alpha/alpha/pmap.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/amd64/amd64/pmap.c#6 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/amd64/conf/GENERIC#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/arm/include/asmacros.h#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/arm/include/atomic.h#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/arm/xscale/i80321/i80321_pci.c#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/Makefile#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/README#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/arm_init.s#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.h#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/lib.c#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/lib.h#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/linker.cfg#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/main.c#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/xmodem.c#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/boot0/xmodem.h#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/arm/at91/inc/AT91RM9200.h#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/boot2/boot1.S#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/cdboot/cdboot.s#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/libi386/Makefile#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/libi386/gatea20.c#2 delete .. //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/libi386/libi386.h#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/pxeldr/pxeldr.S#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/boot/pc98/libpc98/Makefile#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/boot/pc98/libpc98/gatea20.c#2 delete .. //depot/projects/gnn_fast_ipsec/src/sys/conf/files#6 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/conf/options#7 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/crypto/via/padlock.c#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/acpica/acpi.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/acpica/acpi_cmbat.c#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/acpica/acpi_dock.c#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/dev/amr/amr_linux.c#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/ata/ata-all.c#6 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/ata/ata-raid.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/bce/if_bce.c#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/dev/bce/if_bcefw.h#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/dev/bce/if_bcereg.h#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/dev/bge/if_bge.c#6 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/bge/if_bgereg.h#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/drm/radeon_state.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/em/if_em_hw.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/fxp/if_fxp.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/hwpmc/hwpmc_mod.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/mii/brgphy.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/mii/miidevs#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/mpt/mpt.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/mpt/mpt.h#6 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/mpt/mpt_cam.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/mpt/mpt_pci.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/mpt/mpt_raid.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/ppbus/lpt.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/ppbus/ppbconf.c#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/ppc/ppc.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/ppc/ppcvar.h#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/safe/safe.c#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/ubsec/ubsec.c#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/usb/usbdevs#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/usb/uscanner.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/dev/xe/if_xe.c#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/fs/devfs/devfs.h#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/geom/eli/g_eli.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/geom/geom_ccd.c#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/gnu/fs/ext2fs/ext2_bitops.h#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/i386/conf/GENERIC#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/i386/conf/NOTES#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/i386/i386/pmap.c#7 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/ia64/ia64/pmap.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/kern/kern_event.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/kern/kern_intr.c#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/kern/kern_mutex.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/kern/subr_sleepqueue.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/modules/acpi/Makefile#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/modules/acpi/acpi_dock/Makefile#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/modules/bce/Makefile#1 branch .. //depot/projects/gnn_fast_ipsec/src/sys/net/if_arc.h#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/net/if_arcsubr.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/netinet6/frag6.c#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/netinet6/in6_pcb.c#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/netinet6/raw_ip6.c#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/netinet6/udp6_output.c#2 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/netinet6/udp6_usrreq.c#5 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/netipx/ipx_usrreq.c#3 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/opencrypto/crypto.c#4 integrate .. //depot/projects/gnn_fast_ipsec/src/sys/opencrypto/cryptosoft.c#3 integrate Differences ... ==== //depot/projects/gnn_fast_ipsec/src/sys/alpha/alpha/pmap.c#4 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.188 2006/04/03 21:16:07 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.189 2006/04/12 04:22:50 alc Exp $"); #include #include @@ -696,22 +696,7 @@ * Low level helper routines..... ***************************************************/ - - /* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static PMAP_INLINE int -pmap_track_modified(vm_offset_t va) -{ - if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) - return 1; - else - return 0; -} - -/* * Routine: pmap_extract * Function: * Extract the physical page address associated @@ -1346,10 +1331,8 @@ ("get_pv_entry: wired pte %#lx", tpte)); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); - if ((tpte & PG_FOW) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } + if ((tpte & PG_FOW) == 0) + vm_page_dirty(m); pmap_invalidate_page(pmap, va); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -1449,10 +1432,8 @@ pmap->pm_stats.resident_count -= 1; if (oldpte & PG_MANAGED) { m = PHYS_TO_VM_PAGE(pmap_pte_pa(&oldpte)); - if ((oldpte & PG_FOW) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } + if ((oldpte & PG_FOW) == 0) + vm_page_dirty(m); if ((oldpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); return pmap_remove_entry(pmap, m, va); @@ -1581,10 +1562,8 @@ /* * Update the vm_page_t clean and reference bits. */ - if ((tpte & PG_FOW) == 0) { - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); - } + if ((tpte & PG_FOW) == 0) + vm_page_dirty(m); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); @@ -1666,8 +1645,7 @@ if ((oldpte & PG_FOW) == 0) { if (m == NULL) m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte)); - if (pmap_track_modified(sva)) - vm_page_dirty(m); + vm_page_dirty(m); oldpte |= PG_FOW; } oldpte = (oldpte & ~PG_PROT) | newprot; @@ -1763,8 +1741,7 @@ * so we go ahead and sense modify status. */ if (origpte & PG_MANAGED) { - if ((origpte & PG_FOW) != PG_FOW - && pmap_track_modified(va)) + if ((origpte & PG_FOW) != PG_FOW) vm_page_dirty(m); } @@ -1788,6 +1765,8 @@ * called at interrupt time. */ if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); pmap_insert_entry(pmap, va, mpte, m); managed |= PG_MANAGED; } @@ -1850,6 +1829,9 @@ register pt_entry_t *pte; int managed; + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0, + ("pmap_enter_quick: managed mapping within the clean submap")); mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); PMAP_LOCK(pmap); @@ -2168,8 +2150,7 @@ pmap->pm_stats.resident_count--; if ((tpte & PG_FOW) == 0) - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); + vm_page_dirty(m); npv = TAILQ_NEXT(pv, pv_plist); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); @@ -2209,14 +2190,6 @@ * setting RO do we need to clear the VAC? */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * don't write protect pager mappings - */ - if (!setem && bit == (PG_UWE|PG_KWE)) { - if (!pmap_track_modified(pv->pv_va)) - continue; - } - PMAP_LOCK(pv->pv_pmap); pte = pmap_lev3pte(pv->pv_pmap, pv->pv_va); ==== //depot/projects/gnn_fast_ipsec/src/sys/amd64/amd64/pmap.c#6 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.543 2006/04/04 20:17:35 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.545 2006/04/13 03:31:48 alc Exp $"); /* * Manages physical address maps. @@ -106,6 +106,7 @@ */ #include "opt_msgbuf.h" +#include "opt_pmap.h" #include #include @@ -619,20 +620,6 @@ * Low level helper routines..... ***************************************************/ - -/* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static PMAP_INLINE int -pmap_track_modified(vm_offset_t va) -{ - if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) - return 1; - else - return 0; -} - #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -1532,8 +1519,7 @@ KASSERT((tpte & PG_RW), ("pmap_collect: modified page not writable: va: %#lx, pte: %#lx", va, tpte)); - if (pmap_track_modified(va)) - vm_page_dirty(m); + vm_page_dirty(m); } pmap_invalidate_page(pmap, va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -1751,8 +1737,7 @@ KASSERT((oldpte & PG_RW), ("pmap_remove_pte: modified page not writable: va: %#lx, pte: %#lx", va, oldpte)); - if (pmap_track_modified(va)) - vm_page_dirty(m); + vm_page_dirty(m); } if (oldpte & PG_A) vm_page_flag_set(m, PG_REFERENCED); @@ -1940,8 +1925,7 @@ KASSERT((tpte & PG_RW), ("pmap_remove_all: modified page not writable: va: %#lx, pte: %#lx", pv->pv_va, tpte)); - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); + vm_page_dirty(m); } pmap_invalidate_page(pmap, pv->pv_va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -2030,8 +2014,7 @@ vm_page_flag_set(m, PG_REFERENCED); pbits &= ~PG_A; } - if ((pbits & PG_M) != 0 && - pmap_track_modified(sva)) { + if ((pbits & PG_M) != 0) { if (m == NULL) m = PHYS_TO_VM_PAGE(pbits & PG_FRAME); @@ -2182,6 +2165,8 @@ * Enter on the PV list if part of our managed memory. */ if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); pmap_insert_entry(pmap, va, m); pa |= PG_MANAGED; } @@ -2227,8 +2212,7 @@ KASSERT((origpte & PG_RW), ("pmap_enter: modified page not writable: va: %#lx, pte: %#lx", va, origpte)); - if ((origpte & PG_MANAGED) && - pmap_track_modified(va)) + if ((origpte & PG_MANAGED) != 0) vm_page_dirty(om); if ((newpte & PG_RW) == 0) invlva = TRUE; @@ -2258,6 +2242,9 @@ pt_entry_t *pte; vm_paddr_t pa; + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0, + ("pmap_enter_quick: managed mapping within the clean submap")); mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); PMAP_LOCK(pmap); @@ -2836,13 +2823,6 @@ mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * if the bit being tested is the modified bit, then - * mark clean_map and ptes as never - * modified. - */ - if (!pmap_track_modified(pv->pv_va)) - continue; pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); @@ -2898,14 +2878,6 @@ * setting RO do we need to clear the VAC? */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * don't write protect pager mappings - */ - if (bit == PG_RW) { - if (!pmap_track_modified(pv->pv_va)) - continue; - } - pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); @@ -2983,9 +2955,6 @@ TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - if (!pmap_track_modified(pv->pv_va)) - continue; - pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); ==== //depot/projects/gnn_fast_ipsec/src/sys/amd64/conf/GENERIC#5 (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.451 2006/03/31 23:04:48 emax Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.452 2006/04/10 20:04:22 ps Exp $ cpu HAMMER ident GENERIC @@ -192,6 +192,7 @@ # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support +device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet device dc # DEC/Intel 21143 and various workalikes ==== //depot/projects/gnn_fast_ipsec/src/sys/arm/include/asmacros.h#2 (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/arm/include/asmacros.h,v 1.4 2005/04/07 22:03:04 cognet Exp $ + * $FreeBSD: src/sys/arm/include/asmacros.h,v 1.5 2006/04/13 14:25:28 cognet Exp $ */ #ifndef _MACHINE_ASMACROS_H_ @@ -159,12 +159,12 @@ #define DO_AST \ ldr r0, [sp] /* Get the SPSR from stack */ ;\ mrs r4, cpsr /* save CPSR */ ;\ - orr r1, r4, #(I32_bit) ;\ + orr r1, r4, #(I32_bit|F32_bit) ;\ msr cpsr_c, r1 /* Disable interrupts */ ;\ and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\ teq r0, #(PSR_USR32_MODE) ;\ bne 2f /* Nope, get out now */ ;\ - bic r4, r4, #(I32_bit) ;\ + bic r4, r4, #(I32_bit|F32_bit) ;\ 1: ldr r5, .Lcurthread ;\ ldr r5, [r5] ;\ ldr r1, [r5, #(TD_FLAGS)] ;\ @@ -174,7 +174,7 @@ msr cpsr_c, r4 /* Restore interrupts */ ;\ mov r0, sp ;\ bl _C_LABEL(ast) /* ast(frame) */ ;\ - orr r0, r4, #(I32_bit) ;\ + orr r0, r4, #(I32_bit|F32_bit) ;\ msr cpsr_c, r0 ;\ b 1b ;\ 2: ==== //depot/projects/gnn_fast_ipsec/src/sys/arm/include/atomic.h#4 (text+ko) ==== @@ -33,7 +33,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/include/atomic.h,v 1.17 2006/02/06 18:29:05 cognet Exp $ + * $FreeBSD: src/sys/arm/include/atomic.h,v 1.18 2006/04/13 14:25:28 cognet Exp $ */ #ifndef _MACHINE_ATOMIC_H_ @@ -61,7 +61,7 @@ "orr %1, %0, %2;" \ "msr cpsr_all, %1;" \ : "=r" (cpsr_save), "=r" (tmp) \ - : "I" (I32_bit) \ + : "I" (I32_bit | F32_bit) \ : "cc" ); \ (expr); \ __asm __volatile( \ ==== //depot/projects/gnn_fast_ipsec/src/sys/arm/xscale/i80321/i80321_pci.c#3 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.6 2006/01/23 14:03:14 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.7 2006/04/13 15:07:59 cognet Exp $"); #include #include @@ -381,7 +381,8 @@ if (rv == NULL) return (NULL); if (type != SYS_RES_IRQ) { - bh += (rman_get_start(rv)); + if (type == SYS_RES_MEMORY) + bh += (rman_get_start(rv)); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); if (flags & RF_ACTIVE) { ==== //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/boot2/boot1.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.30 2004/08/28 08:32:23 yar Exp $ + * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.31 2006/04/11 20:09:42 jhb Exp $ */ /* Memory Locations */ @@ -212,8 +212,7 @@ jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 -seta20.3: - sti # Enable interrupts +seta20.3: sti # Enable interrupts jmp start+MEM_JMP-MEM_ORG # Start BTX ==== //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/cdboot/cdboot.s#2 (text+ko) ==== @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.13 2004/06/22 21:55:22 jhb Exp $ +# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.16 2006/04/11 17:36:08 jhb Exp $ # # This program is a freestanding boot program to load an a.out binary @@ -400,7 +400,7 @@ ff.checkname: lea DIR_NAME(%bx),%di # Address name in record push %si # Save repe cmpsb # Compare name - jcxz ff.match # We have a winner! + je ff.match # We have a winner! pop %si # Restore jmp ff.nextrec # Keep looking. ff.match: add $2,%sp # Discard saved %si @@ -485,10 +485,17 @@ ret # -# Enable A20 +# Enable A20. Put an upper limit on the amount of time we wait for the +# keyboard controller to get ready (65K x ISA access time). If +# we wait more than that amount, the hardware is probably +# legacy-free and simply doesn't have a keyboard controller. +# Thus, the A20 line is already enabled. # seta20: cli # Disable interrupts -seta20.1: in $0x64,%al # Get status + xor %cx,%cx # Clear +seta20.1: inc %cx # Increment, overflow? + jz seta20.3 # Yes + in $0x64,%al # Get status test $0x2,%al # Busy? jnz seta20.1 # Yes mov $0xd1,%al # Command: Write @@ -498,7 +505,7 @@ jnz seta20.2 # Yes mov $0xdf,%al # Enable out %al,$0x60 # A20 - sti # Enable interrupts +seta20.3: sti # Enable interrupts ret # To caller # ==== //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/libi386/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.41 2006/03/14 19:02:00 jkim Exp $ +# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.42 2006/04/11 20:11:30 jhb Exp $ # LIB= i386 INTERNALLIB= @@ -6,7 +6,7 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \ comconsole.c devicename.c elf32_freebsd.c \ - elf64_freebsd.c gatea20.c \ + elf64_freebsd.c \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ smbios.c time.c vidconsole.c amd64_tramp.S ==== //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/libi386/libi386.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/boot/i386/libi386/libi386.h,v 1.24 2006/03/09 22:49:44 jkim Exp $ + * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.25 2006/04/11 20:11:30 jhb Exp $ */ @@ -104,8 +104,6 @@ void smbios_detect(void); -void gateA20(void); - int i386_autoload(void); int bi_getboothowto(char *kargs); ==== //depot/projects/gnn_fast_ipsec/src/sys/boot/i386/pxeldr/pxeldr.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.13 2004/05/14 20:29:30 ru Exp $ + * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.14 2006/04/11 20:53:49 sobomax Exp $ */ /* @@ -227,10 +227,17 @@ jmp putstr # keep looping /* - * Enable A20 + * Enable A20. Put an upper limit on the amount of time we wait for the + * keyboard controller to get ready (65K x ISA access time). If + * we wait more than that amount, the hardware is probably + * legacy-free and simply doesn't have a keyboard controller. + * Thus, the A20 line is already enabled. */ seta20: cli # Disable interrupts -seta20.1: inb $0x64,%al # Get status + xor %cx,%cx # Clear +seta20.1: inc %cx # Increment, overflow? + jz seta20.3 # Yes + inb $0x64,%al # Get status testb $0x2,%al # Busy? jnz seta20.1 # Yes movb $0xd1,%al # Command: Write @@ -240,7 +247,7 @@ jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 - sti # Enable interrupts +seta20.3: sti # Enable interrupts retw # To caller /* ==== //depot/projects/gnn_fast_ipsec/src/sys/boot/pc98/libpc98/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.23 2005/12/20 08:54:30 sobomax Exp $ +# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.24 2006/04/11 20:11:30 jhb Exp $ # LIB= pc98 INTERNALLIB= @@ -7,7 +7,7 @@ SRCS= bioscd.c biosdisk.c biosmem.c biospnp.c biospci.c biossmap.c \ bootinfo.c bootinfo32.c comconsole.c devicename.c elf32_freebsd.c \ - gatea20.c i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ + i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ time.c vidconsole.c BOOT_COMCONSOLE_PORT?= 0x238 ==== //depot/projects/gnn_fast_ipsec/src/sys/conf/files#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1107 2006/03/30 21:39:36 marcel Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1109 2006/04/15 12:31:31 iwasaki Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -407,6 +407,7 @@ dev/acpica/acpi_throttle.c optional acpi dev/acpica/acpi_timer.c optional acpi dev/acpica/acpi_video.c optional acpi_video acpi +dev/acpica/acpi_dock.c optional acpi_dock acpi dev/adlink/adlink.c optional adlink dev/advansys/adv_eisa.c optional adv eisa dev/advansys/adv_pci.c optional adv pci @@ -475,6 +476,7 @@ dev/awi/am79c930.c optional awi dev/awi/awi.c optional awi dev/awi/if_awi_pccard.c optional awi pccard +dev/bce/if_bce.c optional bce dev/bfe/if_bfe.c optional bfe dev/bge/if_bge.c optional bge dev/bktr/bktr_audio.c optional bktr pci ==== //depot/projects/gnn_fast_ipsec/src/sys/conf/options#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.533 2006/04/03 18:14:01 sam Exp $ +# $FreeBSD: src/sys/conf/options,v 1.534 2006/04/10 20:04:21 ps Exp $ # # On the handling of kernel options # @@ -634,6 +634,9 @@ ED_3C503 opt_ed.h ED_SIC opt_ed.h +# bce driver +BCE_DEBUG opt_bce.h + # bge driver BGE_FAKE_AUTONEG opt_bge.h ==== //depot/projects/gnn_fast_ipsec/src/sys/crypto/via/padlock.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.1 2005/08/18 00:30:22 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.2 2006/04/12 12:13:34 pjd Exp $"); #include #include @@ -179,11 +179,7 @@ #endif padlock_sc = sc = malloc(sizeof(*padlock_sc), M_DEVBUF, - M_NOWAIT | M_ZERO); - if (padlock_sc == NULL) { - printf("PADLOCK: Could not allocate memory.\n"); - return (ENOMEM); - } + M_WAITOK | M_ZERO); TAILQ_INIT(&sc->sc_sessions); sc->sc_sid = 1; ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/acpica/acpi.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.220 2006/03/29 06:30:47 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.221 2006/04/15 12:31:32 iwasaki Exp $"); #include "opt_acpi.h" #include @@ -1518,6 +1518,7 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status) { ACPI_OBJECT_TYPE type; + ACPI_HANDLE h; device_t bus, child; int order, probe_now; char *handle_str, **search; @@ -1577,8 +1578,17 @@ * "functional" (i.e. if disabled). Go ahead and probe them * anyway since we may enable them later. */ - if (type == ACPI_TYPE_DEVICE && !acpi_DeviceIsPresent(child) && - !acpi_MatchHid(handle, "PNP0C0F")) { + if (type == ACPI_TYPE_DEVICE && !acpi_DeviceIsPresent(child)) { + /* Never disable PCI link devices. */ + if (acpi_MatchHid(handle, "PNP0C0F")) + break; + /* + * Docking stations should remain enabled since the system + * may be undocked at boot. + */ + if (ACPI_SUCCESS(AcpiGetHandle(handle, "_DCK", &h))) + break; + device_disable(child); break; } ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/acpica/acpi_cmbat.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.43 2005/11/26 07:36:53 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.45 2006/04/15 16:10:53 iwasaki Exp $"); #include "opt_acpi.h" #include @@ -157,7 +157,10 @@ static int acpi_cmbat_detach(device_t dev) { + ACPI_HANDLE handle; + handle = acpi_get_handle(dev); + AcpiRemoveNotifyHandler(handle, ACPI_ALL_NOTIFY, acpi_cmbat_notify_handler); acpi_battery_remove(dev); return (0); } @@ -435,6 +438,10 @@ * to wait a while. */ for (retry = 0; retry < ACPI_CMBAT_RETRY_MAX; retry++, AcpiOsSleep(10000)) { + /* batteries on DOCK can be ejected w/ DOCK during retrying */ + if (!device_is_attached(dev)) + return; + if (!acpi_BatteryIsPresent(dev)) continue; ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/amr/amr_linux.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/amr/amr_linux.c,v 1.2 2006/02/23 18:05:38 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/amr/amr_linux.c,v 1.3 2006/04/14 16:13:28 ambrisko Exp $"); #include #include @@ -53,8 +53,8 @@ #include /* There are multiple ioctl number ranges that need to be handled */ -#define AMR_LINUX_IOCTL_MIN 0x00000 -#define AMR_LINUX_IOCTL_MAX 0x50000 +#define AMR_LINUX_IOCTL_MIN 0x6d00 +#define AMR_LINUX_IOCTL_MAX 0x6d01 static linux_ioctl_function_t amr_linux_ioctl; static struct linux_ioctl_handler amr_linux_handler = {amr_linux_ioctl, ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/ata/ata-all.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.271 2006/03/31 08:09:04 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.272 2006/04/14 16:25:42 sos Exp $"); #include "opt_ata.h" #include @@ -277,8 +277,8 @@ if (!dev || !(ch = device_get_softc(dev))) return ENXIO; - /* wait for the channel to be IDLE before entering suspend mode */ - while (1) { + /* wait for the channel to be IDLE or detached before suspending */ + while (ch->r_irq) { mtx_lock(&ch->state_mtx); if (ch->state == ATA_IDLE) { ch->state = ATA_ACTIVE; ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/ata/ata-raid.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.119 2006/03/09 08:34:44 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.120 2006/04/15 10:27:41 maxim Exp $"); #include "opt_ata.h" #include @@ -974,7 +974,7 @@ * metadata format from the disks (if we support it). */ printf("WARNING!! - not able to determine metadata format\n" - "WARNING!! - Using FreeBSD PsuedoRAID metadata\n" + "WARNING!! - Using FreeBSD PseudoRAID metadata\n" "If that is not what you want, use the BIOS to " "create the array\n"); ctlr = AR_F_FREEBSD_RAID; ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/bge/if_bge.c#6 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.125 2006/03/17 09:17:36 glebius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.126 2006/04/15 08:13:06 scottl Exp $"); /* * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. @@ -2788,27 +2788,23 @@ } #endif + /* + * Do the mandatory PCI flush as well as get the link status. + */ + statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; + + /* Ack interrupt and stop others from occuring. */ + CSR_WRITE_4(sc, BGE_MBX_IRQ0_LO, 1); + + /* Make sure the descriptor ring indexes are coherent. */ bus_dmamap_sync(sc->bge_cdata.bge_status_tag, sc->bge_cdata.bge_status_map, BUS_DMASYNC_POSTREAD); - - statusword = - atomic_readandclear_32(&sc->bge_ldata.bge_status_block->bge_status); - bus_dmamap_sync(sc->bge_cdata.bge_status_tag, sc->bge_cdata.bge_status_map, BUS_DMASYNC_PREREAD); -#ifdef notdef - /* Avoid this for now -- checking this register is expensive. */ - /* Make sure this is really our interrupt. */ - if (!(CSR_READ_4(sc, BGE_MISC_LOCAL_CTL) & BGE_MLC_INTR_STATE)) - return; -#endif - /* Ack interrupt and stop others from occuring. */ - CSR_WRITE_4(sc, BGE_MBX_IRQ0_LO, 1); - if ((sc->bge_asicrev == BGE_ASICREV_BCM5700 && sc->bge_chipid != BGE_CHIPID_BCM5700_B1) || - statusword & BGE_STATFLAG_LINKSTATE_CHANGED || sc->bge_link_evt) + statusword || sc->bge_link_evt) bge_link_upd(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/bge/if_bgereg.h#5 (text+ko) ==== @@ -30,7 +30,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.46 2006/02/01 14:26:35 oleg Exp $ + * $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.47 2006/04/12 12:12:44 pjd Exp $ */ /* @@ -1160,7 +1160,7 @@ #define BGE_HCCMODE_ENABLE 0x00000002 #define BGE_HCCMODE_ATTN 0x00000004 #define BGE_HCCMODE_COAL_NOW 0x00000008 -#define BGE_HCCMODE_MSI_BITS 0x0x000070 +#define BGE_HCCMODE_MSI_BITS 0x00000070 #define BGE_HCCMODE_STATBLK_SIZE 0x00000180 #define BGE_STATBLKSZ_FULL 0x00000000 ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/drm/radeon_state.c#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_state.c,v 1.20 2006/04/09 20:45:45 anholt Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_state.c,v 1.21 2006/04/13 11:16:59 ru Exp $"); #include "dev/drm/drmP.h" #include "dev/drm/drm.h" @@ -2973,7 +2973,7 @@ case RADEON_PARAM_STATUS_HANDLE: value = dev_priv->ring_rptr_offset; break; -#if BITS_PER_LONG == 32 +#ifndef __LP64__ /* * This ioctl() doesn't work on 64-bit platforms because hw_lock is a * pointer which can't fit into an int-sized variable. According to ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/em/if_em_hw.c#4 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/em/if_em_hw.c,v 1.18 2006/04/06 17:09:03 glebius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/em/if_em_hw.c,v 1.19 2006/04/13 15:10:25 cognet Exp $"); #include @@ -516,7 +516,9 @@ case em_82544: case em_82540: case em_82545: +#ifndef __arm__ case em_82546: +#endif case em_82541: case em_82541_rev_2: /* These controllers can't ack the 64-bit write when issuing the ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/fxp/if_fxp.c#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.254 2006/02/14 12:44:54 glebius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.256 2006/04/14 17:26:04 matteo Exp $"); /* * Intel EtherExpress Pro/100B PCI Fast Ethernet driver @@ -178,6 +178,7 @@ { 0x1064, -1, "Intel 82562EZ (ICH6)" }, { 0x1068, -1, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" }, { 0x1069, -1, "Intel 82562EM/EX/GX Pro/100 Ethernet" }, + { 0x1092, -1, "Intel Pro/100 VE Network Connection" }, { 0x1209, -1, "Intel 82559ER Embedded 10/100 Ethernet" }, { 0x1229, 0x01, "Intel 82557 Pro/100 Ethernet" }, { 0x1229, 0x02, "Intel 82557 Pro/100 Ethernet" }, ==== //depot/projects/gnn_fast_ipsec/src/sys/dev/hwpmc/hwpmc_mod.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Apr 17 18:57:38 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 65F5916A405; Mon, 17 Apr 2006 18:57:38 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29C3D16A401 for ; Mon, 17 Apr 2006 18:57:38 +0000 (UTC) (envelope-from tkuik@freefall.freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D345043D45 for ; Mon, 17 Apr 2006 18:57:37 +0000 (GMT) (envelope-from tkuik@freefall.freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HIvbum089435 for ; Mon, 17 Apr 2006 18:57:37 GMT (envelope-from tkuik@freefall.freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HIvbvB089422 for perforce@freebsd.org; Mon, 17 Apr 2006 18:57:37 GMT (envelope-from tkuik@freefall.freebsd.org) Date: Mon, 17 Apr 2006 18:57:37 GMT Message-Id: <200604171857.k3HIvbvB089422@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to tkuik@freefall using -f From: tkuik To: Perforce Change Reviews Cc: Subject: PERFORCE change 95432 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 18:57:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=95432 Change 95432 by tkuik@tkuik_freebsd on 2006/04/17 18:57:18 Skip leading spaces on kernel cmd_line Submitted by: Tim Kuik Affected files ... .. //depot/projects/xen3/src/sys/i386-xen/i386-xen/xen_machdep.c#14 edit Differences ... ==== //depot/projects/xen3/src/sys/i386-xen/i386-xen/xen_machdep.c#14 (text+ko) ==== @@ -114,6 +114,9 @@ { char *cmd_line_next; + /* Skip leading spaces */ + for (; *cmd_line == ' '; cmd_line++); + for (cmd_line_next = cmd_line; strsep(&cmd_line_next, ",") != NULL;); return cmd_line; } From owner-p4-projects@FreeBSD.ORG Mon Apr 17 18:58:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 16B6D16A404; Mon, 17 Apr 2006 18:58:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D1FAF16A400 for ; Mon, 17 Apr 2006 18:58:39 +0000 (UTC) (envelope-from tkuik@freefall.freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DB5F43D48 for ; Mon, 17 Apr 2006 18:58:39 +0000 (GMT) (envelope-from tkuik@freefall.freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HIwdRK090100 for ; Mon, 17 Apr 2006 18:58:39 GMT (envelope-from tkuik@freefall.freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HIwdbm090093 for perforce@freebsd.org; Mon, 17 Apr 2006 18:58:39 GMT (envelope-from tkuik@freefall.freebsd.org) Date: Mon, 17 Apr 2006 18:58:39 GMT Message-Id: <200604171858.k3HIwdbm090093@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to tkuik@freefall using -f From: tkuik To: Perforce Change Reviews Cc: Subject: PERFORCE change 95433 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 18:58:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=95433 Change 95433 by tkuik@tkuik_freebsd on 2006/04/17 18:58:32 Added memory barrier definitions; fixes networking lock-up Submitted by: Tim Kuik Affected files ... .. //depot/projects/xen3/src/sys/i386-xen/include/xen-os.h#4 edit Differences ... ==== //depot/projects/xen3/src/sys/i386-xen/include/xen-os.h#4 (text+ko) ==== @@ -148,9 +148,9 @@ #define spin_unlock_irqrestore mtx_unlock_irqrestore -#define mb() -#define rmb() -#define wmb() +#define mb() __asm__ __volatile__("lock; addl $0, 0(%%esp)": : :"memory") +#define rmb() mb() +#define wmb() barrier() #ifdef SMP #define smp_mb() mb() #define smp_rmb() rmb() From owner-p4-projects@FreeBSD.ORG Mon Apr 17 20:44:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 345B216A406; Mon, 17 Apr 2006 20:44:35 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D323816A402 for ; Mon, 17 Apr 2006 20:44:34 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83F1343D45 for ; Mon, 17 Apr 2006 20:44:34 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HKiY6O050332 for ; Mon, 17 Apr 2006 20:44:34 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HKiYx3050329 for perforce@freebsd.org; Mon, 17 Apr 2006 20:44:34 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 20:44:34 GMT Message-Id: <200604172044.k3HKiYx3050329@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95442 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 20:44:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=95442 Change 95442 by imp@imp_hammer on 2006/04/17 20:43:58 Transition to using a more standard layout. Move everything that's library like into libat91. This is the first step: making it compile and eliminating inc. More to follow. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/lib.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/inc/AT91RM9200.h#4 delete .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/debug_io.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#3 (text) ==== @@ -4,7 +4,7 @@ SRCS=arm_init.s at91rm9200_lowlevel.c lib.c main.c xmodem.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg -CFLAGS=-O2 -mcpu=arm9 -ffreestanding -I${.CURDIR}/../inc +CFLAGS=-O2 -mcpu=arm9 -ffreestanding -I${.CURDIR}/../libat91 CFLAGS+=-DBOOT0_KB9202 #CFLAGS+=-DBOOT0_TSC OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c#6 (text) ==== @@ -27,7 +27,7 @@ * $FreeBSD: src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c,v 1.2 2006/04/13 17:39:34 imp Exp $ */ -#include "AT91RM9200.h" +#include "at91rm9200.h" #include "at91rm9200_lowlevel.h" #define BAUD 115200 ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/lib.c#2 (text) ==== @@ -34,7 +34,7 @@ * $FreeBSD: src/sys/boot/arm/at91/boot0/lib.c,v 1.1 2006/04/12 21:22:44 imp Exp $ */ -#include "AT91RM9200.h" +#include "at91rm9200.h" #include "at91rm9200_lowlevel.h" /* ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#4 (text) ==== @@ -24,7 +24,7 @@ * $FreeBSD: src/sys/boot/arm/at91/boot0/main.c,v 1.2 2006/04/13 17:31:02 imp Exp $ */ -#include "AT91RM9200.h" +#include "at91rm9200.h" #include "lib.h" #include "at91rm9200_lowlevel.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.c#3 (text+ko) ==== @@ -1,61 +1,61 @@ -/******************************************************************************* - * - * Filename: debug_io.c - * - * Instantiation of routines for basic debug uart support. - * - * Revision information: - * - * 20AUG2004 kb_admin initial creation - * - * BEGIN_KBDD_BLOCK - * No warranty, expressed or implied, is included with this software. It is - * provided "AS IS" and no warranty of any kind including statutory or aspects - * relating to merchantability or fitness for any purpose is provided. All - * intellectual property rights of others is maintained with the respective - * owners. This software is not copyrighted and is intended for reference - * only. - * END_BLOCK - ******************************************************************************/ - -#include "AT91RM9200.h" -#include "p_string.h" - -/* - * .KB_C_FN_DEFINITION_START - * void DebugPrint(char *) - * This global function writes a string to the debug uart port. - * .KB_C_FN_DEFINITION_END - */ -void DebugPrint(char *buffer) { - - if (!buffer) return; - - while(*buffer != '\0') - putc(*buffer++); -} - -/* - * .KB_C_FN_DEFINITION_START - * void DebugPrintHex(int, int) - * This global function displays the value with the number of digits specified. - * .KB_C_FN_DEFINITION_END - */ -void DebugPrintHex(int digits, int value) { - - char dValue[11], *cPtr; - int nextDigit; - - if ((digits < 1) || (digits > 8)) return ; - - cPtr = &dValue[10]; - *cPtr-- = 0; - while (digits--) { - nextDigit = 0xF & value; - *cPtr-- = ToASCII(nextDigit); - value >>= 4; - } - *cPtr-- = 'x'; - *cPtr = '0'; - DebugPrint(cPtr); -} +/******************************************************************************* + * + * Filename: debug_io.c + * + * Instantiation of routines for basic debug uart support. + * + * Revision information: + * + * 20AUG2004 kb_admin initial creation + * + * BEGIN_KBDD_BLOCK + * No warranty, expressed or implied, is included with this software. It is + * provided "AS IS" and no warranty of any kind including statutory or aspects + * relating to merchantability or fitness for any purpose is provided. All + * intellectual property rights of others is maintained with the respective + * owners. This software is not copyrighted and is intended for reference + * only. + * END_BLOCK + ******************************************************************************/ + +#include "at91rm9200.h" +#include "p_string.h" + +/* + * .KB_C_FN_DEFINITION_START + * void DebugPrint(char *) + * This global function writes a string to the debug uart port. + * .KB_C_FN_DEFINITION_END + */ +void DebugPrint(char *buffer) { + + if (!buffer) return; + + while(*buffer != '\0') + putc(*buffer++); +} + +/* + * .KB_C_FN_DEFINITION_START + * void DebugPrintHex(int, int) + * This global function displays the value with the number of digits specified. + * .KB_C_FN_DEFINITION_END + */ +void DebugPrintHex(int digits, int value) { + + char dValue[11], *cPtr; + int nextDigit; + + if ((digits < 1) || (digits > 8)) return ; + + cPtr = &dValue[10]; + *cPtr-- = 0; + while (digits--) { + nextDigit = 0xF & value; + *cPtr-- = ToASCII(nextDigit); + value >>= 4; + } + *cPtr-- = 'x'; + *cPtr = '0'; + DebugPrint(cPtr); +} ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#3 (text+ko) ==== @@ -1,167 +1,167 @@ -/******************************************************************************* - * - * Filename: eeprom.c - * - * Instantiation of eeprom routines - * - * Revision information: - * - * 28AUG2004 kb_admin initial creation - adapted from Atmel sources - * 12JAN2005 kb_admin fixed clock generation, write polling, init - * - * BEGIN_KBDD_BLOCK - * No warranty, expressed or implied, is included with this software. It is - * provided "AS IS" and no warranty of any kind including statutory or aspects - * relating to merchantability or fitness for any purpose is provided. All - * intellectual property rights of others is maintained with the respective - * owners. This software is not copyrighted and is intended for reference - * only. - * END_BLOCK - ******************************************************************************/ - -#include "at91rm9200_lowlevel.h" -#include "eeprom.h" -#include "AT91RM9200.h" - -/* ****************************** GLOBALS *************************************/ - - -/* ********************** PRIVATE FUNCTIONS/DATA ******************************/ - - -/* Use a macro to calculate the TWI clock generator value to save code space. */ -#define TWI_CLK_BASE_DIV ((AT91C_MASTER_CLOCK/(4*AT91C_TWSI_CLOCK)) - 2) -#define SET_TWI_CLOCK ((0x00010000) | (TWI_CLK_BASE_DIV) | (TWI_CLK_BASE_DIV << 8)) - - -/* ************************** GLOBAL FUNCTIONS ********************************/ - - -/* - * .KB_C_FN_DEFINITION_START - * void InitEEPROM(void) - * This global function initializes the EEPROM interface (TWI). Intended - * to be called a single time. - * .KB_C_FN_DEFINITION_END - */ -void -InitEEPROM(void) -{ - - AT91PS_TWI twiPtr = (AT91PS_TWI)AT91C_BASE_TWI; - - AT91PS_PIO pPio = (AT91PS_PIO)AT91C_BASE_PIOA; - AT91PS_PMC pPMC = (AT91PS_PMC)AT91C_BASE_PMC; - - pPio->PIO_ASR = AT91C_PA25_TWD | AT91C_PA26_TWCK; - pPio->PIO_PDR = AT91C_PA25_TWD | AT91C_PA26_TWCK; - - pPio->PIO_MDDR = ~AT91C_PA25_TWD; - pPio->PIO_MDER = AT91C_PA25_TWD; - - pPMC->PMC_PCER = 1u << AT91C_ID_TWI; - - twiPtr->TWI_IDR = 0xffffffffu; - twiPtr->TWI_CR = AT91C_TWI_SWRST; - twiPtr->TWI_CR = AT91C_TWI_MSEN | AT91C_TWI_SVDIS; - - twiPtr->TWI_CWGR = SET_TWI_CLOCK; -} - - -/* - * .KB_C_FN_DEFINITION_START - * void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size) - * This global function reads data from the eeprom at ee_addr storing data - * to data_addr for size bytes. Assume the TWI has been initialized. - * This function does not utilize the page read mode to simplify the code. - * .KB_C_FN_DEFINITION_END - */ -void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size) { - - const AT91PS_TWI twiPtr = AT91C_BASE_TWI; - unsigned int status; - - status = twiPtr->TWI_SR; - status = twiPtr->TWI_RHR; - - // Set the TWI Master Mode Register - twiPtr->TWI_MMR = (TWSI_EEPROM_ADDRESS << 16) | AT91C_TWI_IADRSZ_2_BYTE | AT91C_TWI_MREAD; - - // Set TWI Internal Address Register - twiPtr->TWI_IADR = ee_addr; - - // Start transfer - twiPtr->TWI_CR = AT91C_TWI_START; - - status = twiPtr->TWI_SR; - - while (size-- > 1){ - - // Wait RHR Holding register is full - while (!(twiPtr->TWI_SR & AT91C_TWI_RXRDY)); - - // Read byte - *(data_addr++) = twiPtr->TWI_RHR; - } - - twiPtr->TWI_CR = AT91C_TWI_STOP; - - status = twiPtr->TWI_SR; - - // Wait transfer is finished - while (!(twiPtr->TWI_SR & AT91C_TWI_TXCOMP)); - - // Read last byte - *data_addr = twiPtr->TWI_RHR; -} - - -/* - * .KB_C_FN_DEFINITION_START - * void WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size) - * This global function writes data to the eeprom at ee_addr using data - * from data_addr for size bytes. Assume the TWI has been initialized. - * This function does not utilize the page write mode as the write time is - * much greater than the time required to access the device for byte-write - * functionality. This allows the function to be much simpler. - * .KB_C_FN_DEFINITION_END - */ -void WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size) { - - const AT91PS_TWI twiPtr = AT91C_BASE_TWI; - unsigned status; - char test_data; - - while (size--) { - if (!(ee_addr & 0x3f)) - DebugPrint("."); - - // Set the TWI Master Mode Register - twiPtr->TWI_MMR = ((TWSI_EEPROM_ADDRESS << 16) | AT91C_TWI_IADRSZ_2_BYTE ) & ~AT91C_TWI_MREAD; - - // Set TWI Internal Address Register - twiPtr->TWI_IADR = ee_addr++; - - status = twiPtr->TWI_SR; - - twiPtr->TWI_THR = *(data_addr++); - - twiPtr->TWI_CR = AT91C_TWI_START; - - // Wait transfer is finished - while (!(twiPtr->TWI_SR & AT91C_TWI_TXRDY)); - - twiPtr->TWI_CR = AT91C_TWI_STOP; - - status = twiPtr->TWI_SR; - - // Wait transfer is finished - while (!(twiPtr->TWI_SR & AT91C_TWI_TXCOMP)); - - // wait for write operation to complete - ReadEEPROM(ee_addr, &test_data, 1); - } - - DebugPrint("\n\r"); -} +/******************************************************************************* + * + * Filename: eeprom.c + * + * Instantiation of eeprom routines + * + * Revision information: + * + * 28AUG2004 kb_admin initial creation - adapted from Atmel sources + * 12JAN2005 kb_admin fixed clock generation, write polling, init + * + * BEGIN_KBDD_BLOCK + * No warranty, expressed or implied, is included with this software. It is + * provided "AS IS" and no warranty of any kind including statutory or aspects + * relating to merchantability or fitness for any purpose is provided. All + * intellectual property rights of others is maintained with the respective + * owners. This software is not copyrighted and is intended for reference + * only. + * END_BLOCK + ******************************************************************************/ + +#include "at91rm9200_lowlevel.h" +#include "eeprom.h" +#include "at91rm9200.h" + +/* ****************************** GLOBALS *************************************/ + + +/* ********************** PRIVATE FUNCTIONS/DATA ******************************/ + + +/* Use a macro to calculate the TWI clock generator value to save code space. */ +#define TWI_CLK_BASE_DIV ((AT91C_MASTER_CLOCK/(4*AT91C_TWSI_CLOCK)) - 2) +#define SET_TWI_CLOCK ((0x00010000) | (TWI_CLK_BASE_DIV) | (TWI_CLK_BASE_DIV << 8)) + + +/* ************************** GLOBAL FUNCTIONS ********************************/ + + +/* + * .KB_C_FN_DEFINITION_START + * void InitEEPROM(void) + * This global function initializes the EEPROM interface (TWI). Intended + * to be called a single time. + * .KB_C_FN_DEFINITION_END + */ +void +InitEEPROM(void) +{ + + AT91PS_TWI twiPtr = (AT91PS_TWI)AT91C_BASE_TWI; + + AT91PS_PIO pPio = (AT91PS_PIO)AT91C_BASE_PIOA; + AT91PS_PMC pPMC = (AT91PS_PMC)AT91C_BASE_PMC; + + pPio->PIO_ASR = AT91C_PA25_TWD | AT91C_PA26_TWCK; + pPio->PIO_PDR = AT91C_PA25_TWD | AT91C_PA26_TWCK; + + pPio->PIO_MDDR = ~AT91C_PA25_TWD; + pPio->PIO_MDER = AT91C_PA25_TWD; + + pPMC->PMC_PCER = 1u << AT91C_ID_TWI; + + twiPtr->TWI_IDR = 0xffffffffu; + twiPtr->TWI_CR = AT91C_TWI_SWRST; + twiPtr->TWI_CR = AT91C_TWI_MSEN | AT91C_TWI_SVDIS; + + twiPtr->TWI_CWGR = SET_TWI_CLOCK; +} + + +/* + * .KB_C_FN_DEFINITION_START + * void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size) + * This global function reads data from the eeprom at ee_addr storing data + * to data_addr for size bytes. Assume the TWI has been initialized. + * This function does not utilize the page read mode to simplify the code. + * .KB_C_FN_DEFINITION_END + */ +void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size) { + + const AT91PS_TWI twiPtr = AT91C_BASE_TWI; + unsigned int status; + + status = twiPtr->TWI_SR; + status = twiPtr->TWI_RHR; + + // Set the TWI Master Mode Register + twiPtr->TWI_MMR = (TWSI_EEPROM_ADDRESS << 16) | AT91C_TWI_IADRSZ_2_BYTE | AT91C_TWI_MREAD; + + // Set TWI Internal Address Register + twiPtr->TWI_IADR = ee_addr; + + // Start transfer + twiPtr->TWI_CR = AT91C_TWI_START; + + status = twiPtr->TWI_SR; + + while (size-- > 1){ + + // Wait RHR Holding register is full + while (!(twiPtr->TWI_SR & AT91C_TWI_RXRDY)); + + // Read byte + *(data_addr++) = twiPtr->TWI_RHR; + } + + twiPtr->TWI_CR = AT91C_TWI_STOP; + + status = twiPtr->TWI_SR; + + // Wait transfer is finished + while (!(twiPtr->TWI_SR & AT91C_TWI_TXCOMP)); + + // Read last byte + *data_addr = twiPtr->TWI_RHR; +} + + +/* + * .KB_C_FN_DEFINITION_START + * void WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size) + * This global function writes data to the eeprom at ee_addr using data + * from data_addr for size bytes. Assume the TWI has been initialized. + * This function does not utilize the page write mode as the write time is + * much greater than the time required to access the device for byte-write + * functionality. This allows the function to be much simpler. + * .KB_C_FN_DEFINITION_END + */ +void WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size) { + + const AT91PS_TWI twiPtr = AT91C_BASE_TWI; + unsigned status; + char test_data; + + while (size--) { + if (!(ee_addr & 0x3f)) + DebugPrint("."); + + // Set the TWI Master Mode Register + twiPtr->TWI_MMR = ((TWSI_EEPROM_ADDRESS << 16) | AT91C_TWI_IADRSZ_2_BYTE ) & ~AT91C_TWI_MREAD; + + // Set TWI Internal Address Register + twiPtr->TWI_IADR = ee_addr++; + + status = twiPtr->TWI_SR; + + twiPtr->TWI_THR = *(data_addr++); + + twiPtr->TWI_CR = AT91C_TWI_START; + + // Wait transfer is finished + while (!(twiPtr->TWI_SR & AT91C_TWI_TXRDY)); + + twiPtr->TWI_CR = AT91C_TWI_STOP; + + status = twiPtr->TWI_SR; + + // Wait transfer is finished + while (!(twiPtr->TWI_SR & AT91C_TWI_TXCOMP)); + + // wait for write operation to complete + ReadEEPROM(ee_addr, &test_data, 1); + } + + DebugPrint("\n\r"); +} ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.c#3 (text+ko) ==== @@ -1,689 +1,689 @@ -/******************************************************************************* - * - * Filename: emac.c - * - * Instantiation of routines for MAC/ethernet functions supporting tftp. - * - * Revision information: - * - * 28AUG2004 kb_admin initial creation - * 08JAN2005 kb_admin added tftp download - * also adapted from external sources - * - * BEGIN_KBDD_BLOCK - * No warranty, expressed or implied, is included with this software. It is - * provided "AS IS" and no warranty of any kind including statutory or aspects - * relating to merchantability or fitness for any purpose is provided. All - * intellectual property rights of others is maintained with the respective - * owners. This software is not copyrighted and is intended for reference - * only. - * END_BLOCK - ******************************************************************************/ - -#include "AT91RM9200.h" -#include "emac.h" -#include "p_string.h" -#include "at91rm9200_lowlevel.h" - -/* ****************************** GLOBALS *************************************/ - -/* ********************** PRIVATE FUNCTIONS/DATA ******************************/ - -static unsigned localMACSet, serverMACSet, MAC_init; -static unsigned char localMACAddr[6], serverMACAddr[6]; -static unsigned localIPSet, serverIPSet; -static unsigned char localIPAddr[4], serverIPAddr[4]; -static unsigned short serverPort, localPort; -static int ackBlock; - -static unsigned lastAddress, lastSize; -static char *dlAddress; - -static unsigned transmitBuffer[1024 / sizeof(unsigned)]; -static unsigned tftpSendPacket[256 / sizeof(unsigned)]; - -receive_descriptor_t *p_rxBD; - - -/* - * .KB_C_FN_DEFINITION_START - * unsigned short IP_checksum(unsigned short *p, int len) - * This private function calculates the IP checksum for various headers. - * .KB_C_FN_DEFINITION_END - */ -static unsigned short IP_checksum(unsigned short *p, int len) -{ - unsigned i, t; - - len &= ~1; - - for (i=0,t=0; i> 16); - return (~t); -} - - -/* - * .KB_C_FN_DEFINITION_START - * void GetServerAddress(void) - * This private function sends an ARP request to determine the server MAC. - * .KB_C_FN_DEFINITION_END - */ -static void GetServerAddress(void) { - - arp_header_t *p_ARP; - - p_ARP = (arp_header_t*)transmitBuffer; - - p_memset((char*)p_ARP->dest_mac, 0xFF, 6); - - p_memcpy((char*)p_ARP->src_mac, (char*)localMACAddr, 6); - - p_ARP->frame_type = SWAP16(PROTOCOL_ARP); - p_ARP->hard_type = SWAP16(1); - p_ARP->prot_type = SWAP16(PROTOCOL_IP); - p_ARP->hard_size = 6; - p_ARP->prot_size = 4; - p_ARP->operation = SWAP16(ARP_REQUEST); - - p_memcpy((char*)p_ARP->sender_mac, (char*)localMACAddr, 6); - - p_memcpy((char*)p_ARP->sender_ip, (char*)localIPAddr, 4); - - p_memset((char*)p_ARP->target_mac, 0, 6); - - p_memcpy((char*)p_ARP->target_ip, (char*)serverIPAddr, 4); - - // wait until transmit is available - while (!(*AT91C_EMAC_TSR & AT91C_EMAC_BNQ)) ; - - *AT91C_EMAC_TSR |= AT91C_EMAC_COMP; - *AT91C_EMAC_TAR = (unsigned)transmitBuffer; - *AT91C_EMAC_TCR = 0x40; -} - - -/* - * .KB_C_FN_DEFINITION_START - * void Send_TFTP_Packet(char *tftpData, unsigned tftpLength) - * This private function initializes and send a TFTP packet. - * .KB_C_FN_DEFINITION_END - */ -static void Send_TFTP_Packet(char *tftpData, unsigned tftpLength) -{ - transmit_header_t *macHdr = (transmit_header_t*)tftpSendPacket; - ip_header_t *ipHdr; - udp_header_t *udpHdr; - unsigned t_checksum; - - p_memcpy((char*)macHdr->dest_mac, (char*)serverMACAddr, 6); - - p_memcpy((char*)macHdr->src_mac, (char*)localMACAddr, 6); - - *(unsigned short*)&(macHdr->ip_tos) = SWAP16(PROTOCOL_IP); - - ipHdr = (ip_header_t*)&macHdr->packet_length; - - ipHdr->ip_v_hl = 0x45; - ipHdr->ip_tos = 0; - ipHdr->ip_len = SWAP16(28 + tftpLength); - ipHdr->ip_id = 0; - ipHdr->ip_off = SWAP16(0x4000); - ipHdr->ip_ttl = 64; - ipHdr->ip_p = PROTOCOL_UDP; - ipHdr->ip_sum = 0; - - p_memcpy((char*)ipHdr->ip_src, (char*)localIPAddr, 4); - - p_memcpy((char*)ipHdr->ip_dst, (char*)serverIPAddr, 4); - - ipHdr->ip_sum = SWAP16(IP_checksum((unsigned short*)ipHdr, 20)); - - udpHdr = (udp_header_t*)(ipHdr + 1); - - udpHdr->src_port = SWAP16(localPort); - udpHdr->dst_port = SWAP16(serverPort); - udpHdr->udp_len = SWAP16(8 + tftpLength); - udpHdr->udp_cksum = 0; - - p_memcpy((char*)udpHdr+8, tftpData, tftpLength); - - t_checksum = IP_checksum((unsigned short*)ipHdr + 6, (16 + tftpLength)); - - t_checksum = (~t_checksum) & 0xFFFF; - t_checksum += 25 + tftpLength; - - t_checksum = (t_checksum & 0xffff) + (t_checksum >> 16); - t_checksum = (~t_checksum) & 0xFFFF; - - udpHdr->udp_cksum = SWAP16(t_checksum); - - while (!(*AT91C_EMAC_TSR & AT91C_EMAC_BNQ)) ; - - *AT91C_EMAC_TSR |= AT91C_EMAC_COMP; - *AT91C_EMAC_TAR = (unsigned)tftpSendPacket; - *AT91C_EMAC_TCR = 42 + tftpLength; -} - - -/* - * .KB_C_FN_DEFINITION_START - * void TFTP_RequestFile(char *filename) - * This private function sends a RRQ packet to the server. - * .KB_C_FN_DEFINITION_END - */ -static void TFTP_RequestFile(char *filename) { - - tftp_header_t tftpHeader; - char *cPtr, *ePtr, *mPtr; - unsigned length; - - tftpHeader.opcode = SWAP16(TFTP_RRQ_OPCODE); - - cPtr = (char*)&(tftpHeader.block_num); - - ePtr = p_strcpy(cPtr, filename); - mPtr = p_strcpy(ePtr, "octet"); - - length = mPtr - cPtr; - length += 2; - - Send_TFTP_Packet((char*)&tftpHeader, length); -} - - -/* - * .KB_C_FN_DEFINITION_START - * void TFTP_ACK_Data(char *data, unsigned short block_num, unsigned short len) - * This private function sends an ACK packet to the server. - * .KB_C_FN_DEFINITION_END - */ -static void TFTP_ACK_Data(char *data, unsigned short block_num, unsigned short len) { - - tftp_header_t tftpHeader; - - if (block_num == (ackBlock + 1)) { - ++ackBlock; - p_memcpy(dlAddress, data, len); - dlAddress += len; - lastSize += len; - } - - tftpHeader.opcode = SWAP16(TFTP_ACK_OPCODE); - tftpHeader.block_num = SWAP16(block_num); - Send_TFTP_Packet((char*)&tftpHeader, 4); - - if (len < 512) - ackBlock = -2; -} - - -/* - * .KB_C_FN_DEFINITION_START - * void CheckForNewPacket(ip_header_t *pHeader) - * This private function polls for received ethernet packets and handles - * any here. - * .KB_C_FN_DEFINITION_END - */ -static void CheckForNewPacket(ip_header_t *pHeader) { - - unsigned short *pFrameType, *pArpOp; - unsigned i; - char *pData; - ip_header_t *pIpHeader; - arp_header_t *p_ARP; - int process = 0; - - process = 0; - for (i = 0; i < MAX_RX_PACKETS; ++i) { - if(p_rxBD[i].address & 0x1) { - process = 1; - (*AT91C_EMAC_RSR) |= (*AT91C_EMAC_RSR); - break; - } - } - - if (!process) - return ; - - process = i; - - pFrameType = (unsigned short *) ((p_rxBD[i].address & 0xFFFFFFFC) + 12); - pData = (char *)(p_rxBD[i].address & 0xFFFFFFFC); - - switch (SWAP16(*pFrameType)) { - - case PROTOCOL_ARP: - - pArpOp = (unsigned short *) (pData + 20); - p_ARP = (arp_header_t*)pData; - - if (SWAP16(*pArpOp) == ARP_REPLY) { - - // check if new server info is available - if ((!serverMACSet) && - (!(p_memcmp((char*)p_ARP->sender_ip, - (char*)serverIPAddr, 4)))) { - - serverMACSet = 1; - - p_memcpy((char*)serverMACAddr, - (char*)p_ARP->sender_mac, 6); - } - } - - if (SWAP16(*pArpOp) == ARP_REQUEST) { - - // ARP REPLY operation - *pArpOp = SWAP16(ARP_REPLY); - - // Fill the dest address and src address - for (i = 0; i <6; i++) { - // swap ethernet dest address and ethernet src address - pData[i] = pData[i+6]; - pData[i+6] = localMACAddr[i]; - // swap sender ethernet address and target ethernet address - pData[i+22] = localMACAddr[i]; - pData[i+32] = pData[i+6]; - } - - // swap sender IP address and target IP address - for (i = 0; i<4; i++) { - pData[i+38] = pData[i+28]; - pData[i+28] = localIPAddr[i]; - } - - if (!(*AT91C_EMAC_TSR & AT91C_EMAC_BNQ)) break; - - *AT91C_EMAC_TSR |= AT91C_EMAC_COMP; - *AT91C_EMAC_TAR = (unsigned)pData; - *AT91C_EMAC_TCR = 0x40; - } - break; - - case PROTOCOL_IP: - pIpHeader = (ip_header_t*)(pData + 14); - p_memcpy((char*)pHeader, (char*)pIpHeader,sizeof(ip_header_t)); - - switch(pIpHeader->ip_p) { - - case PROTOCOL_UDP: - { - udp_header_t *udpHdr; - tftp_header_t *tftpHdr; - - udpHdr = (udp_header_t*)((char*)pIpHeader+20); - tftpHdr = (tftp_header_t*)((char*)udpHdr + 8); - - if (SWAP16(udpHdr->dst_port) != localPort) - break; - - if (SWAP16(tftpHdr->opcode) != TFTP_DATA_OPCODE) - break; - - if (ackBlock == -1) { - if (SWAP16(tftpHdr->block_num) != 1) - break; - serverPort = SWAP16(udpHdr->src_port); - ackBlock = 0; - } - - if (serverPort != SWAP16(udpHdr->src_port)) - break; - - TFTP_ACK_Data(tftpHdr->data, - SWAP16(tftpHdr->block_num), - SWAP16(udpHdr->udp_len) - 12); - } - break; - - default: - break; - } - break; - - default: - break; - } - p_rxBD[process].address &= ~0x01; -} - - -/* - * .KB_C_FN_DEFINITION_START - * unsigned short AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) - * This private function reads the PHY device. - * .KB_C_FN_DEFINITION_END - */ -static unsigned short AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) { - - unsigned value = 0x60020000 | (addr << 18); - - pEmac->EMAC_CTL |= AT91C_EMAC_MPE; - pEmac->EMAC_MAN = value; - while(!((pEmac->EMAC_SR) & AT91C_EMAC_IDLE)); - pEmac->EMAC_CTL &= ~AT91C_EMAC_MPE; - return (pEmac->EMAC_MAN & 0x0000ffff); -} - - -/* - * .KB_C_FN_DEFINITION_START - * void MII_GetLinkSpeed(AT91PS_EMAC pEmac) - * This private function determines the link speed set by the PHY. - * .KB_C_FN_DEFINITION_END - */ -static void MII_GetLinkSpeed(AT91PS_EMAC pEmac) { - - unsigned short stat2; - unsigned update = 0; - - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); - - if (!(stat2 & 0x400)) { - return ; - - } else if (stat2 & 0x4000) { - - update |= AT91C_EMAC_SPD; - - if (stat2 & 0x200) { - update |= AT91C_EMAC_FD; - } - - } else if (stat2 & 0x200) { - update |= AT91C_EMAC_FD; - } - - pEmac->EMAC_CFG = - (pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD)) | update; -} - - -/* - * .KB_C_FN_DEFINITION_START - * void AT91F_EmacEntry(void) - * This private function initializes the EMAC on the chip. - * .KB_C_FN_DEFINITION_END - */ -void AT91F_EmacEntry(void) { - - unsigned i; - char *pRxPacket = (char*)RX_DATA_START; - AT91PS_EMAC pEmac = AT91C_BASE_EMAC; - - for (i = 0; i < MAX_RX_PACKETS; ++i) { - - p_rxBD[i].address = (unsigned)pRxPacket; - p_rxBD[i].size = 0; - pRxPacket += RX_PACKET_SIZE; - } - - // Set the WRAP bit at the end of the list descriptor - p_rxBD[MAX_RX_PACKETS-1].address |= 0x02; - - pEmac->EMAC_CTL = 0; - - if(!(pEmac->EMAC_SR & AT91C_EMAC_LINK)) - MII_GetLinkSpeed(pEmac); - - // the sequence write EMAC_SA1L and write EMAC_SA1H must be respected - pEmac->EMAC_SA1L = ((unsigned)localMACAddr[2] << 24) | ((unsigned)localMACAddr[3] << 16) | ((int)localMACAddr[4] << 8) | localMACAddr[5]; - pEmac->EMAC_SA1H = ((unsigned)localMACAddr[0] << 8) | localMACAddr[1]; - - pEmac->EMAC_RBQP = (unsigned) p_rxBD; - pEmac->EMAC_RSR |= (AT91C_EMAC_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA); - pEmac->EMAC_CFG |= AT91C_EMAC_CAF; - pEmac->EMAC_CFG = (pEmac->EMAC_CFG & ~(AT91C_EMAC_CLK)) | - AT91C_EMAC_CLK_HCLK_32; - pEmac->EMAC_CTL |= (AT91C_EMAC_TE | AT91C_EMAC_RE); - - pEmac->EMAC_TAR = (unsigned)transmitBuffer; -} - - -/* ************************** GLOBAL FUNCTIONS ********************************/ - - -/* - * .KB_C_FN_DEFINITION_START - * void SetMACAddress(unsigned low_address, unsigned high_address) - * This global function sets the MAC address. low_address is the first - * four bytes while high_address is the last 2 bytes of the 48-bit value. - * .KB_C_FN_DEFINITION_END - */ -void SetMACAddress(unsigned low_address, unsigned high_address) { - - AT91PS_EMAC pEmac = AT91C_BASE_EMAC; - AT91PS_PMC pPMC = AT91C_BASE_PMC; - - /* enable the peripheral clock before using EMAC */ - pPMC->PMC_PCER = ((unsigned) 1 << AT91C_ID_EMAC); - >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Apr 17 20:48:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B669E16A407; Mon, 17 Apr 2006 20:48:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C98F16A405 for ; Mon, 17 Apr 2006 20:48:40 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03C6D43D55 for ; Mon, 17 Apr 2006 20:48:40 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HKmdXq058028 for ; Mon, 17 Apr 2006 20:48:39 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HKmdPi058025 for perforce@freebsd.org; Mon, 17 Apr 2006 20:48:39 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 20:48:39 GMT Message-Id: <200604172048.k3HKmdPi058025@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95443 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 20:48:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95443 Change 95443 by imp@imp_hammer on 2006/04/17 20:48:25 Kill ^M Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/README#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.s#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/linker.cfg#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.h#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/p_string.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/p_string.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/tag_list.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/tag_list.h#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#3 (text+ko) ==== @@ -7,7 +7,7 @@ env_vars.c debug_io.c loader_prompt.c p_string.c emac.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg -CFLAGS=-O2 -mcpu=arm9 -ffreestanding -I${.CURDIR}/../inc -I${.CURDIR}/../boot0 +CFLAGS=-O2 -mcpu=arm9 -ffreestanding -I${.CURDIR}/../libat91 -I${.CURDIR}/../boot0 CFLAGS+=-DBOOT0_KB9202 OBJS+= ${SRCS:N*.h:R:S/$/.o/g} CLEANFILES=${OBJS} ${PROG} ${PROG}.out ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/README#2 (text+ko) ==== @@ -1,59 +1,59 @@ -This image is intended to be programmed into boot EEPROM. The image is nearly -0x4000 so it will not fit in KB9200's 0x2000. It is intended for KB9201 or -later. Alternatively, the KB9200 can be upgraded with larger EEPROM. -It performs basic functions prior to executing an image at a -specified address. The pre-boot functions can be modified and saved back into -EEPROM. -The MAC address is set with 0.0.0.0.0.0 by default. This is an invalid address -and must be changed to a valid value in order to use the ethernet interface. - -Memory usage: - -EEPROM = 0x4000 -SDRAM = - run stack = 0x21800000 - variables = 0x21200000 - ethernet = 0x21000000 (buffers and descriptors) - - -Functions supported: - - c - copy - d - display auto command table (in RAM) - e - execute image - ? - help - ip - set local ip - m - set mac - server_ip - set server ip - s - set auto command entry - t - create linux boot tag list - tftp - download image via tftp - w - update auto command table - x - download image via xmodem - -base files in this directory: - -arm_init.s -AT91RM9200.h -at91rm9200_lowlevel.c -at91rm9200_lowlevel.h -debug_io.c -debug_io.h -eeprom.c -eeprom.h -emac.c -emac.h -env_vars.c -env_vars.h -linker.cfg -loader_prompt.c -loader_prompt.h -main.c -Makefile -p_string.c -p_string.h -tag_list.c -tag_list.h -xmodem.c -xmodem.h -README +This image is intended to be programmed into boot EEPROM. The image is nearly +0x4000 so it will not fit in KB9200's 0x2000. It is intended for KB9201 or +later. Alternatively, the KB9200 can be upgraded with larger EEPROM. +It performs basic functions prior to executing an image at a +specified address. The pre-boot functions can be modified and saved back into +EEPROM. +The MAC address is set with 0.0.0.0.0.0 by default. This is an invalid address +and must be changed to a valid value in order to use the ethernet interface. + +Memory usage: + +EEPROM = 0x4000 +SDRAM = + run stack = 0x21800000 + variables = 0x21200000 + ethernet = 0x21000000 (buffers and descriptors) + + +Functions supported: + + c - copy + d - display auto command table (in RAM) + e - execute image + ? - help + ip - set local ip + m - set mac + server_ip - set server ip + s - set auto command entry + t - create linux boot tag list + tftp - download image via tftp + w - update auto command table + x - download image via xmodem + +base files in this directory: + +arm_init.s +AT91RM9200.h +at91rm9200_lowlevel.c +at91rm9200_lowlevel.h +debug_io.c +debug_io.h +eeprom.c +eeprom.h +emac.c +emac.h +env_vars.c +env_vars.h +linker.cfg +loader_prompt.c +loader_prompt.h +main.c +Makefile +p_string.c +p_string.h +tag_list.c +tag_list.h +xmodem.c +xmodem.h +README ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.s#3 (text+ko) ==== @@ -1,120 +1,120 @@ -/******************************************************************************* - * - * Filename: arm_init.s - * - * Initialization for C-environment and basic operation. Adapted from - * ATMEL cstartup.s. - * - * Revision information: - * - * 20AUG2004 kb_admin initial creation - * 12JAN2005 kb_admin updated for 16KB eeprom - * Atmel stack prevents loading full size at once - * - * BEGIN_KBDD_BLOCK - * No warranty, expressed or implied, is included with this software. It is - * provided "AS IS" and no warranty of any kind including statutory or aspects - * relating to merchantability or fitness for any purpose is provided. All - * intellectual property rights of others is maintained with the respective - * owners. This software is not copyrighted and is intended for reference - * only. - * END_BLOCK - ******************************************************************************/ - - .equ TWI_EEPROM_SIZE, 0x2000 - .equ ARM_MODE_USER, 0x10 - .equ ARM_MODE_FIQ, 0x11 - .equ ARM_MODE_IRQ, 0x12 - .equ ARM_MODE_SVC, 0x13 - .equ ARM_MODE_ABORT, 0x17 - .equ ARM_MODE_UNDEF, 0x1B - .equ ARM_MODE_SYS, 0x1F - - .equ I_BIT, 0x80 - .equ F_BIT, 0x40 - .equ T_BIT, 0x20 - -/* - * Stack definitions - * - * Start near top of internal RAM. - */ - - .equ END_INT_SRAM, 0x4000 - .equ SVC_STACK_START, (END_INT_SRAM - 0x4) - .equ SVC_STACK_USE, 0x21800000 - -start: - -/* vectors - must reside at address 0 */ -/* the format of this table is defined in the datasheet */ - B InitReset @; reset -undefvec: - B undefvec @; Undefined Instruction -swivec: - B swivec @; Software Interrupt -pabtvec: - B pabtvec @; Prefetch Abort -dabtvec: - B dabtvec @; Data Abort -rsvdvec: - .long (TWI_EEPROM_SIZE >> 9) -irqvec: - ldr pc, [pc,#-0xF20] @; IRQ : read the AIC -fiqvec: - B fiqvec @; FIQ - - -InitReset: - -/* Set stack and init for SVC */ - ldr r1, = SVC_STACK_START - mov sp, r1 @; Init stack SYS - - msr cpsr_c, #(ARM_MODE_SVC | I_BIT | F_BIT) - mov sp, r1 @ ; Init stack SYS - -/* Perform system initialization */ - - .extern _init - - bl _init - - ldr r1, = SVC_STACK_USE - mov sp, r1 @ ; Move the stack to SDRAM - -/* Copy the rest of the load image from EEPROM */ - .extern InitEEPROM - - bl InitEEPROM - - .extern ReadEEPROM - - mov r0, #8192 - mov r1, #8192 - mov r2, #8192 - bl ReadEEPROM - -/* Start execution at main */ - - .extern main -_main: -__main: - bl main - -/* main should not return. If it does, spin forever */ - -infiniteLoop: - b infiniteLoop - -/* the following section is used to store boot commands in */ -/* non-volatile memory. */ - - .global BootCommandSection -BootCommandSection: - .string "Bootloader for KB9202 Evaluation Board." - .string "c 0x20210000 0x10100000 0x80000 " - .string "m 0 0 0 0 0 0 " - .string "t 0x20000100 console=ttyS0,115200 root=/dev/ram rw initrd=0x20210000,654933" - .string "e 0x10000000 " - .string " " +/******************************************************************************* + * + * Filename: arm_init.s + * + * Initialization for C-environment and basic operation. Adapted from + * ATMEL cstartup.s. + * + * Revision information: + * + * 20AUG2004 kb_admin initial creation + * 12JAN2005 kb_admin updated for 16KB eeprom + * Atmel stack prevents loading full size at once + * + * BEGIN_KBDD_BLOCK + * No warranty, expressed or implied, is included with this software. It is + * provided "AS IS" and no warranty of any kind including statutory or aspects + * relating to merchantability or fitness for any purpose is provided. All + * intellectual property rights of others is maintained with the respective + * owners. This software is not copyrighted and is intended for reference + * only. + * END_BLOCK + ******************************************************************************/ + + .equ TWI_EEPROM_SIZE, 0x2000 + .equ ARM_MODE_USER, 0x10 + .equ ARM_MODE_FIQ, 0x11 + .equ ARM_MODE_IRQ, 0x12 + .equ ARM_MODE_SVC, 0x13 + .equ ARM_MODE_ABORT, 0x17 + .equ ARM_MODE_UNDEF, 0x1B + .equ ARM_MODE_SYS, 0x1F + + .equ I_BIT, 0x80 + .equ F_BIT, 0x40 + .equ T_BIT, 0x20 + +/* + * Stack definitions + * + * Start near top of internal RAM. + */ + + .equ END_INT_SRAM, 0x4000 + .equ SVC_STACK_START, (END_INT_SRAM - 0x4) + .equ SVC_STACK_USE, 0x21800000 + +start: + +/* vectors - must reside at address 0 */ +/* the format of this table is defined in the datasheet */ + B InitReset @; reset +undefvec: + B undefvec @; Undefined Instruction +swivec: + B swivec @; Software Interrupt +pabtvec: + B pabtvec @; Prefetch Abort +dabtvec: + B dabtvec @; Data Abort +rsvdvec: + .long (TWI_EEPROM_SIZE >> 9) +irqvec: + ldr pc, [pc,#-0xF20] @; IRQ : read the AIC +fiqvec: + B fiqvec @; FIQ + + +InitReset: + +/* Set stack and init for SVC */ + ldr r1, = SVC_STACK_START + mov sp, r1 @; Init stack SYS + + msr cpsr_c, #(ARM_MODE_SVC | I_BIT | F_BIT) + mov sp, r1 @ ; Init stack SYS + +/* Perform system initialization */ + + .extern _init + + bl _init + + ldr r1, = SVC_STACK_USE + mov sp, r1 @ ; Move the stack to SDRAM + +/* Copy the rest of the load image from EEPROM */ + .extern InitEEPROM + + bl InitEEPROM + + .extern ReadEEPROM + + mov r0, #8192 + mov r1, #8192 + mov r2, #8192 + bl ReadEEPROM + +/* Start execution at main */ + + .extern main +_main: +__main: + bl main + +/* main should not return. If it does, spin forever */ + +infiniteLoop: + b infiniteLoop + +/* the following section is used to store boot commands in */ +/* non-volatile memory. */ + + .global BootCommandSection +BootCommandSection: + .string "Bootloader for KB9202 Evaluation Board." + .string "c 0x20210000 0x10100000 0x80000 " + .string "m 0 0 0 0 0 0 " + .string "t 0x20000100 console=ttyS0,115200 root=/dev/ram rw initrd=0x20210000,654933" + .string "e 0x10000000 " + .string " " ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.c#4 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.h#2 (text+ko) ==== @@ -1,30 +1,30 @@ -/******************************************************************************* - * - * Filename: debug_io.h - * - * Definitions for basic debug uart support. - * - * Revision information: - * - * 20AUG2004 kb_admin initial creation - * - * BEGIN_KBDD_BLOCK - * No warranty, expressed or implied, is included with this software. It is - * provided "AS IS" and no warranty of any kind including statutory or aspects - * relating to merchantability or fitness for any purpose is provided. All - * intellectual property rights of others is maintained with the respective - * owners. This software is not copyrighted and is intended for reference - * only. - * END_BLOCK - ******************************************************************************/ - -#ifndef _DEBUG_IO_H_ -#define _DEBUG_IO_H_ - -extern void DebugPutc(char cValue); -extern void DebugPrint(char *buffer); -extern int DebugGetchar(char *retChar); -extern int WaitForChar(char *cPtr, int seconds); -extern void DebugPrintHex(int digits, int value); - -#endif +/******************************************************************************* + * + * Filename: debug_io.h + * + * Definitions for basic debug uart support. + * + * Revision information: + * + * 20AUG2004 kb_admin initial creation + * + * BEGIN_KBDD_BLOCK + * No warranty, expressed or implied, is included with this software. It is + * provided "AS IS" and no warranty of any kind including statutory or aspects + * relating to merchantability or fitness for any purpose is provided. All + * intellectual property rights of others is maintained with the respective + * owners. This software is not copyrighted and is intended for reference + * only. + * END_BLOCK + ******************************************************************************/ + +#ifndef _DEBUG_IO_H_ +#define _DEBUG_IO_H_ + +extern void DebugPutc(char cValue); +extern void DebugPrint(char *buffer); +extern int DebugGetchar(char *retChar); +extern int WaitForChar(char *cPtr, int seconds); +extern void DebugPrintHex(int digits, int value); + +#endif ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#4 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.h#2 (text+ko) ==== @@ -1,34 +1,34 @@ -/******************************************************************************* - * - * Filename: eeprom.h - * - * Definition of eeprom routines - * - * Revision information: - * - * 28AUG2004 kb_admin initial creation - adapted from Atmel sources - * 12JAN2005 kb_admin add init - * - * BEGIN_KBDD_BLOCK - * No warranty, expressed or implied, is included with this software. It is - * provided "AS IS" and no warranty of any kind including statutory or aspects - * relating to merchantability or fitness for any purpose is provided. All - * intellectual property rights of others is maintained with the respective - * owners. This software is not copyrighted and is intended for reference - * only. - * END_BLOCK - ******************************************************************************/ - -#ifndef _EEPROM_H_ -#define _EEPROM_H_ - -#define AT91C_TWSI_CLOCK 100000 -#define TWSI_EEPROM_ADDRESS 0x50 - -/* The following function write eeprom at ee_addr using data */ -/* from data_add for size bytes. */ -extern void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size); -extern void WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size); -extern void InitEEPROM(void); - -#endif /* _EEPROM_H_ */ +/******************************************************************************* + * + * Filename: eeprom.h + * + * Definition of eeprom routines + * + * Revision information: + * + * 28AUG2004 kb_admin initial creation - adapted from Atmel sources + * 12JAN2005 kb_admin add init + * + * BEGIN_KBDD_BLOCK + * No warranty, expressed or implied, is included with this software. It is + * provided "AS IS" and no warranty of any kind including statutory or aspects + * relating to merchantability or fitness for any purpose is provided. All + * intellectual property rights of others is maintained with the respective + * owners. This software is not copyrighted and is intended for reference + * only. + * END_BLOCK + ******************************************************************************/ + +#ifndef _EEPROM_H_ +#define _EEPROM_H_ + +#define AT91C_TWSI_CLOCK 100000 +#define TWSI_EEPROM_ADDRESS 0x50 + +/* The following function write eeprom at ee_addr using data */ +/* from data_add for size bytes. */ +extern void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size); +extern void WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size); +extern void InitEEPROM(void); + +#endif /* _EEPROM_H_ */ ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.c#4 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.h#2 (text+ko) ==== @@ -1,128 +1,128 @@ -/******************************************************************************* - * - * Filename: emac.h - * - * Definition of routine to set the MAC address. - * - * Revision information: - * - * 28AUG2004 kb_admin initial creation - * - * BEGIN_KBDD_BLOCK - * No warranty, expressed or implied, is included with this software. It is - * provided "AS IS" and no warranty of any kind including statutory or aspects - * relating to merchantability or fitness for any purpose is provided. All - * intellectual property rights of others is maintained with the respective - * owners. This software is not copyrighted and is intended for reference - * only. - * END_BLOCK - ******************************************************************************/ - - -#ifndef _EMAC_H_ -#define _EMAC_H_ - -extern void SetMACAddress(unsigned low_address, unsigned high_address); -extern void SetServerIPAddress(unsigned address); -extern void SetLocalIPAddress(unsigned address); -extern void EMAC_Init(void); -extern void TFTP_Download(unsigned address, char *filename); - -#define MAX_RX_PACKETS 8 -#define RX_PACKET_SIZE 1536 -#define RX_BUFFER_START 0x21000000 -#define RX_DATA_START (RX_BUFFER_START + (8 * MAX_RX_PACKETS)) - -#define ARP_REQUEST 0x0001 -#define ARP_REPLY 0x0002 -#define PROTOCOL_ARP 0x0806 -#define PROTOCOL_IP 0x0800 -#define PROTOCOL_UDP 0x11 - -#define SWAP16(x) (((x & 0xff) << 8) | (x >> 8)) - -typedef struct { - unsigned address; - unsigned size; -} receive_descriptor_t; - -typedef struct { - - unsigned char dest_mac[6]; - - unsigned char src_mac[6]; - - unsigned short frame_type; - unsigned short hard_type; - unsigned short prot_type; - unsigned char hard_size; - unsigned char prot_size; - - unsigned short operation; - - unsigned char sender_mac[6]; - unsigned char sender_ip[4]; - - unsigned char target_mac[6]; - unsigned char target_ip[4]; - -} arp_header_t; - -typedef struct { - unsigned char ip_v_hl; - unsigned char ip_tos; - unsigned short ip_len; - unsigned short ip_id; - unsigned short ip_off; - unsigned char ip_ttl; - unsigned char ip_p; - unsigned short ip_sum; - unsigned char ip_src[4]; - unsigned char ip_dst[4]; -} ip_header_t; - -typedef struct { - unsigned char dest_mac[6]; - unsigned char src_mac[6]; - unsigned char ip_tos; - unsigned char ip_hl_v; - unsigned short packet_length; - unsigned short ip_id; - unsigned short ip_len; - unsigned char ip_p; - unsigned char ip_ttl; - unsigned short ip_off; - unsigned short ip_sum; - unsigned char ip_src[4]; - unsigned char ip_dst[4]; -} transmit_header_t; - -typedef struct { - unsigned short src_port; - unsigned short dst_port; - unsigned short udp_len; - unsigned short udp_cksum; -} udp_header_t; - -typedef struct { - unsigned short opcode; - unsigned short block_num; - unsigned char data[512]; -} tftp_header_t; - -#define TFTP_RRQ_OPCODE 1 -#define TFTP_WRQ_OPCODE 2 -#define TFTP_DATA_OPCODE 3 -#define TFTP_ACK_OPCODE 4 -#define TFTP_ERROR_OPCODE 5 - -#define TFTP_WAITING_SERVER_MAC 1 -#define TFTP_SEND_REQUEST 2 -#define TFTP_GET_DATA 3 -#define TFTP_COMPLETE 4 - -/* MII registers definition */ -#define MII_STS_REG 0x01 -#define MII_STS2_REG 0x11 - -#endif /* _EMAC_H_ */ +/******************************************************************************* + * + * Filename: emac.h + * + * Definition of routine to set the MAC address. + * + * Revision information: + * + * 28AUG2004 kb_admin initial creation + * + * BEGIN_KBDD_BLOCK + * No warranty, expressed or implied, is included with this software. It is + * provided "AS IS" and no warranty of any kind including statutory or aspects + * relating to merchantability or fitness for any purpose is provided. All + * intellectual property rights of others is maintained with the respective + * owners. This software is not copyrighted and is intended for reference + * only. + * END_BLOCK + ******************************************************************************/ + + +#ifndef _EMAC_H_ +#define _EMAC_H_ + +extern void SetMACAddress(unsigned low_address, unsigned high_address); +extern void SetServerIPAddress(unsigned address); +extern void SetLocalIPAddress(unsigned address); +extern void EMAC_Init(void); +extern void TFTP_Download(unsigned address, char *filename); + +#define MAX_RX_PACKETS 8 +#define RX_PACKET_SIZE 1536 +#define RX_BUFFER_START 0x21000000 +#define RX_DATA_START (RX_BUFFER_START + (8 * MAX_RX_PACKETS)) + +#define ARP_REQUEST 0x0001 +#define ARP_REPLY 0x0002 +#define PROTOCOL_ARP 0x0806 +#define PROTOCOL_IP 0x0800 +#define PROTOCOL_UDP 0x11 + +#define SWAP16(x) (((x & 0xff) << 8) | (x >> 8)) + +typedef struct { + unsigned address; + unsigned size; +} receive_descriptor_t; + +typedef struct { + + unsigned char dest_mac[6]; + + unsigned char src_mac[6]; + + unsigned short frame_type; + unsigned short hard_type; + unsigned short prot_type; + unsigned char hard_size; + unsigned char prot_size; + + unsigned short operation; + + unsigned char sender_mac[6]; + unsigned char sender_ip[4]; + + unsigned char target_mac[6]; + unsigned char target_ip[4]; + +} arp_header_t; + +typedef struct { + unsigned char ip_v_hl; + unsigned char ip_tos; + unsigned short ip_len; + unsigned short ip_id; + unsigned short ip_off; + unsigned char ip_ttl; + unsigned char ip_p; + unsigned short ip_sum; + unsigned char ip_src[4]; + unsigned char ip_dst[4]; +} ip_header_t; + +typedef struct { + unsigned char dest_mac[6]; + unsigned char src_mac[6]; + unsigned char ip_tos; + unsigned char ip_hl_v; + unsigned short packet_length; + unsigned short ip_id; + unsigned short ip_len; + unsigned char ip_p; + unsigned char ip_ttl; + unsigned short ip_off; + unsigned short ip_sum; + unsigned char ip_src[4]; + unsigned char ip_dst[4]; +} transmit_header_t; + +typedef struct { + unsigned short src_port; + unsigned short dst_port; + unsigned short udp_len; + unsigned short udp_cksum; +} udp_header_t; + +typedef struct { + unsigned short opcode; + unsigned short block_num; + unsigned char data[512]; +} tftp_header_t; + +#define TFTP_RRQ_OPCODE 1 +#define TFTP_WRQ_OPCODE 2 +#define TFTP_DATA_OPCODE 3 +#define TFTP_ACK_OPCODE 4 +#define TFTP_ERROR_OPCODE 5 + +#define TFTP_WAITING_SERVER_MAC 1 +#define TFTP_SEND_REQUEST 2 +#define TFTP_GET_DATA 3 +#define TFTP_COMPLETE 4 + +/* MII registers definition */ +#define MII_STS_REG 0x01 +#define MII_STS2_REG 0x11 + +#endif /* _EMAC_H_ */ ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#3 (text+ko) ==== @@ -1,200 +1,200 @@ -/******************************************************************************* - * - * Filename: env_vars.c - * - * Instantiation of environment variables, structures, and other globals. - * - * Revision information: - * - * 20AUG2004 kb_admin initial creation - * - * BEGIN_KBDD_BLOCK - * No warranty, expressed or implied, is included with this software. It is - * provided "AS IS" and no warranty of any kind including statutory or aspects - * relating to merchantability or fitness for any purpose is provided. All - * intellectual property rights of others is maintained with the respective - * owners. This software is not copyrighted and is intended for reference - * only. - * END_BLOCK - ******************************************************************************/ - -#include "env_vars.h" -#include "loader_prompt.h" -#include "p_string.h" -#include "debug_io.h" -#include "eeprom.h" -#include "lib.h" - -/* ****************************** GLOBALS *************************************/ -char boot_commands[MAX_BOOT_COMMANDS][MAX_INPUT_SIZE]; - -char env_table[MAX_ENV_SIZE_BYTES]; - -extern char BootCommandSection; - -/* ************************* PRIVATE FUNCTIONS ********************************/ - - -static int currentIndex; -static int currentOffset; - - -/* - * .KB_C_FN_DEFINITION_START - * int ReadCharFromEnvironment(char *) - * This private function reads characters from the enviroment variables - * to service the command prompt during auto-boot or just to setup the - * default environment. Returns positive value if valid character was - * set in the pointer. Returns negative value to signal input stream - * terminated. Returns 0 to indicate _wait_ condition. - * .KB_C_FN_DEFINITION_END - */ -static int ReadCharFromEnvironment(int timeout) -{ - int ch; - - if (currentIndex < MAX_BOOT_COMMANDS) { - ch = boot_commands[currentIndex][currentOffset++]; - if (ch == '\0' || (currentOffset >= MAX_INPUT_SIZE)) { - currentOffset = 0; - ++currentIndex; - } - return (ch); - } - - return (-1); -} - - -/* ************************** GLOBAL FUNCTIONS ********************************/ - - -/* - * .KB_C_FN_DEFINITION_START - * void WriteCommandTable(void) - * This global function write the current command table to the non-volatile - * memory. - * .KB_C_FN_DEFINITION_END - */ -void WriteCommandTable(void) { - - int i, size = MAX_ENV_SIZE_BYTES, copySize; - char *cPtr = env_table; - - p_memset(env_table, 0, sizeof(env_table)); - - for (i = 0; i < MAX_BOOT_COMMANDS; ++i) { - - copySize = p_strlen(boot_commands[i]); - size -= copySize + 1; - - if (size < 0) { - continue; - } - p_memcpy(cPtr, boot_commands[i], copySize); - cPtr += copySize; - *cPtr++ = 0; - } - - WriteEEPROM((unsigned)&BootCommandSection, env_table, - sizeof(env_table)); -} - - -/* - * .KB_C_FN_DEFINITION_START - * void SetBootCommand(int index, char *command) - * This global function replaces the specified index with the string residing - * at command. Execute this function with a NULL string to clear the - * associated command index. - * .KB_C_FN_DEFINITION_END - */ -void SetBootCommand(int index, char *command) { - - int i; - - if ((unsigned)index < MAX_BOOT_COMMANDS) { - - p_memset(boot_commands[index], 0, MAX_INPUT_SIZE); - - if (!command) - return ; - - for (i = 0; i < MAX_INPUT_SIZE; ++i) { - boot_commands[index][i] = command[i]; - if (!(boot_commands[index][i])) - return; - } - } -} - - -/* - * .KB_C_FN_DEFINITION_START - * void DumpBootCommands(void) - * This global function displays the current boot commands. - * .KB_C_FN_DEFINITION_END - */ -void DumpBootCommands(void) { - int i, j; - char *cPtr; - - for (i = 0; i < MAX_BOOT_COMMANDS; ++i) { - DebugPrintHex(2, i); - DebugPrint(" : "); - for (j = 0; j < MAX_INPUT_SIZE; ++j) { - putc(boot_commands[i][j]); - if (!(boot_commands[i][j])) - break; - } - DebugPrint("[E]\n\r"); - } -} - - -/* - * .KB_C_FN_DEFINITION_START - * void LoadBootCommands(void) - * This global function loads the existing boot commands from raw format and - * coverts it to the standard, command-index format. Notice, the processed - * boot command table has much more space allocated than the actual table - * stored in non-volatile memory. This is because the processed table - * exists in RAM which is larger than the non-volatile space. - * .KB_C_FN_DEFINITION_END - */ -void LoadBootCommands(void) { - int index, j, size; - char *cPtr; - - p_memset((char*)boot_commands, 0, sizeof(boot_commands)); - - cPtr = &BootCommandSection; - - size = MAX_ENV_SIZE_BYTES; - - for (index = 0; (index < MAX_BOOT_COMMANDS) && size; ++index) { - for (j = 0; (j < MAX_INPUT_SIZE) && size; ++j) { - size--; - boot_commands[index][j] = *cPtr++; - if (!(boot_commands[index][j])) { - break; - } - } - } -} - - >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Apr 17 21:18:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C71B16A40A; Mon, 17 Apr 2006 21:18:21 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCC8E16A404 for ; Mon, 17 Apr 2006 21:18:20 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83ECD43D69 for ; Mon, 17 Apr 2006 21:18:17 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HLIHlv076656 for ; Mon, 17 Apr 2006 21:18:17 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HLIGVD076650 for perforce@freebsd.org; Mon, 17 Apr 2006 21:18:16 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 21:18:16 GMT Message-Id: <200604172118.k3HLIGVD076650@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95446 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 21:18:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=95446 Change 95446 by imp@imp_hammer on 2006/04/17 21:18:10 More rearrangement and migration towards libat91 Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c#7 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.h#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/lib.c#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/lib.h#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/xmodem.c#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/xmodem.h#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.h#1 branch Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#4 (text) ==== @@ -1,22 +1,23 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.2 2006/04/13 17:44:05 imp Exp $ -PROG=boot0 -SRCS=arm_init.s at91rm9200_lowlevel.c lib.c main.c xmodem.c +P=boot0 +FILES=${P} +SRCS=arm_init.s main.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg -CFLAGS=-O2 -mcpu=arm9 -ffreestanding -I${.CURDIR}/../libat91 CFLAGS+=-DBOOT0_KB9202 #CFLAGS+=-DBOOT0_TSC OBJS+= ${SRCS:N*.h:R:S/$/.o/g} -CLEANFILES=${OBJS} ${PROG} ${PROG}.out + +.include + +${P}: ${P}.out + objcopy -S -O binary ${P}.out ${.TARGET} -all: ${PROG} +${P}.out: ${OBJS} + ld ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LIBAT91} -${PROG}: ${PROG}.out ${OBJS} - objcopy -S -O binary ${PROG}.out ${PROG} +CLEANFILES+= ${P} ${P}.out -${PROG}.out: ${OBJS} - ld ${LDFLAGS} -o ${PROG}.out ${OBJS} +.include -clean: - rm -f ${CLEANFILES} ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#4 (text+ko) ==== @@ -1,24 +1,20 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.1 2006/04/12 21:22:44 imp Exp $ -.PATH: ${.CURDIR}/../boot0 - -PROG=bootiic -SRCS=arm_init.s at91rm9200_lowlevel.c lib.c main.c xmodem.c eeprom.c \ +P=bootiic +SRCS=arm_init.s main.c xmodem.c eeprom.c \ env_vars.c debug_io.c loader_prompt.c p_string.c emac.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg -CFLAGS=-O2 -mcpu=arm9 -ffreestanding -I${.CURDIR}/../libat91 -I${.CURDIR}/../boot0 -CFLAGS+=-DBOOT0_KB9202 OBJS+= ${SRCS:N*.h:R:S/$/.o/g} -CLEANFILES=${OBJS} ${PROG} ${PROG}.out + -all: ${PROG} +all: ${P} -${PROG}: ${PROG}.out ${OBJS} - objcopy -S -O binary ${PROG}.out ${PROG} +${P}: ${P}.out ${OBJS} + objcopy -S -O binary ${P}.out ${P} -${PROG}.out: ${OBJS} - ld ${LDFLAGS} -o ${PROG}.out ${OBJS} +${P}.out: ${OBJS} + ld ${LDFLAGS} -o ${P}.out ${OBJS} clean: rm -f ${CLEANFILES} From owner-p4-projects@FreeBSD.ORG Mon Apr 17 21:27:33 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D94A116A405; Mon, 17 Apr 2006 21:27:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0F4116A402 for ; Mon, 17 Apr 2006 21:27:32 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37CC043D49 for ; Mon, 17 Apr 2006 21:27:29 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HLRTu5080539 for ; Mon, 17 Apr 2006 21:27:29 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HLRS2C080536 for perforce@freebsd.org; Mon, 17 Apr 2006 21:27:28 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 21:27:28 GMT Message-Id: <200604172127.k3HLRS2C080536@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95448 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 21:27:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=95448 Change 95448 by imp@imp_hammer on 2006/04/17 21:27:17 boot0 and bootiic should now build in new world order. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#1 add .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#5 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#5 (text) ==== @@ -5,19 +5,7 @@ SRCS=arm_init.s main.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg -CFLAGS+=-DBOOT0_KB9202 -#CFLAGS+=-DBOOT0_TSC OBJS+= ${SRCS:N*.h:R:S/$/.o/g} -.include - -${P}: ${P}.out - objcopy -S -O binary ${P}.out ${.TARGET} - -${P}.out: ${OBJS} - ld ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LIBAT91} - -CLEANFILES+= ${P} ${P}.out - .include ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#5 (text+ko) ==== @@ -1,20 +1,11 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.1 2006/04/12 21:22:44 imp Exp $ P=bootiic -SRCS=arm_init.s main.c xmodem.c eeprom.c \ +FILES=${P} +SRCS=arm_init.s main.c eeprom.c \ env_vars.c debug_io.c loader_prompt.c p_string.c emac.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} - -all: ${P} - -${P}: ${P}.out ${OBJS} - objcopy -S -O binary ${P}.out ${P} - -${P}.out: ${OBJS} - ld ${LDFLAGS} -o ${P}.out ${OBJS} - -clean: - rm -f ${CLEANFILES} +.include From owner-p4-projects@FreeBSD.ORG Mon Apr 17 21:28:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 369E916A42B; Mon, 17 Apr 2006 21:28:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 151FB16A427 for ; Mon, 17 Apr 2006 21:28:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CF3A43D6E for ; Mon, 17 Apr 2006 21:28:30 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HLSU9q080615 for ; Mon, 17 Apr 2006 21:28:30 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HLSUh0080612 for perforce@freebsd.org; Mon, 17 Apr 2006 21:28:30 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 21:28:30 GMT Message-Id: <200604172128.k3HLSUh0080612@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95449 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 21:28:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=95449 Change 95449 by imp@imp_hammer on 2006/04/17 21:28:04 This makes libat91 build too, needed for boot0 and bootiic. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Mon Apr 17 21:31:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9A25D16A401; Mon, 17 Apr 2006 21:31:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9C9816A404 for ; Mon, 17 Apr 2006 21:31:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7337243D46 for ; Mon, 17 Apr 2006 21:31:35 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HLVZKB081938 for ; Mon, 17 Apr 2006 21:31:35 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HLVZAu081930 for perforce@freebsd.org; Mon, 17 Apr 2006 21:31:35 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 21:31:35 GMT Message-Id: <200604172131.k3HLVZAu081930@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95451 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 21:31:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=95451 Change 95451 by imp@imp_hammer on 2006/04/17 21:31:34 Retire xmodem.h. Move it into lib.h since xmodem.h lives in libat91.a now. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.h#2 delete Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#2 (text+ko) ==== @@ -6,6 +6,7 @@ LIBAT91=${.OBJDIR}/../libat91/libat91.a +.if defined(P) ${P}: ${P}.out objcopy -S -O binary ${P}.out ${.TARGET} @@ -13,3 +14,4 @@ ld ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LIBAT91} CLEANFILES+= ${P} ${P}.out +.endif ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#4 (text+ko) ==== @@ -23,7 +23,6 @@ #include "debug_io.h" #include "at91rm9200_lowlevel.h" #include "p_string.h" -#include "xmodem.h" #include "eeprom.h" #ifdef SUPPORT_TAG_LIST #include "tag_list.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#2 (text) ==== @@ -29,5 +29,6 @@ int getc(int); void putc(int); +int xmodem_rx(char *dst); #endif From owner-p4-projects@FreeBSD.ORG Mon Apr 17 21:38:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DB4F16A404; Mon, 17 Apr 2006 21:38:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D896616A402 for ; Mon, 17 Apr 2006 21:38:44 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B37343D46 for ; Mon, 17 Apr 2006 21:38:44 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HLcipk087793 for ; Mon, 17 Apr 2006 21:38:44 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HLciWN087787 for perforce@freebsd.org; Mon, 17 Apr 2006 21:38:44 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 21:38:44 GMT Message-Id: <200604172138.k3HLciWN087787@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95452 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 21:38:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=95452 Change 95452 by imp@imp_hammer on 2006/04/17 21:37:52 Get pickier about the code, and start to fix things. boot0 now compiles. bootiic need help. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#3 (text+ko) ==== @@ -1,6 +1,12 @@ # $FreeBSD$ -CFLAGS=-O2 -mcpu=arm9 -ffreestanding -I${.CURDIR}/../libat91 +CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ + -I${.CURDIR}/../libat91 \ + -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ + -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ + -Werror + CFLAGS+=-DBOOT0_TSC #CFLAGS+=-DBOOT0_KB920X ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#5 (text) ==== @@ -34,7 +34,7 @@ main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - fn_t *fn = (fn_t *)addr; + fn_t *fn = (fn_t *)(SDRAM_BASE + (1 << 20)); /* Load to base + 1MB */ while (xmodem_rx(addr) == -1) continue; ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#2 (text) ==== @@ -46,7 +46,6 @@ AT91PS_PDC pPDC = (AT91PS_PDC)&(pUSART->US_RPR); register unsigned value; - int i; volatile sdram_size_t *p = (sdram_size_t *)SDRAM_BASE; #ifdef BOOT0_TSC ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#2 (text) ==== @@ -52,6 +52,6 @@ #define GetSeconds() (AT91C_BASE_RTC->RTC_TIMR & AT91C_RTC_SEC) -extern void DefaultSystemInit(void); +extern void _init(void); #endif /* _AT91RM9200_LOWLEVEL_H_ */ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.c#2 (text) ==== @@ -36,6 +36,7 @@ #include "at91rm9200.h" #include "at91rm9200_lowlevel.h" +#include "lib.h" /* * void putc(int ch) From owner-p4-projects@FreeBSD.ORG Mon Apr 17 21:58:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4E5CF16A40D; Mon, 17 Apr 2006 21:58:19 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F08816A40A for ; Mon, 17 Apr 2006 21:58:19 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA01743D6E for ; Mon, 17 Apr 2006 21:58:15 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HLwFFo098126 for ; Mon, 17 Apr 2006 21:58:15 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HLwFTr098123 for perforce@freebsd.org; Mon, 17 Apr 2006 21:58:15 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 21:58:15 GMT Message-Id: <200604172158.k3HLwFTr098123@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95455 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 21:58:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=95455 Change 95455 by imp@imp_hammer on 2006/04/17 21:57:14 checkpoint making bootiic compile with newer, more strict flags. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.h#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.h#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/p_string.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/p_string.h#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.c#5 (text+ko) ==== @@ -18,8 +18,9 @@ * END_BLOCK ******************************************************************************/ -#include "at91rm9200.h" #include "p_string.h" +#include "debug_io.h" +#include "lib.h" /* * .KB_C_FN_DEFINITION_START @@ -27,10 +28,12 @@ * This global function writes a string to the debug uart port. * .KB_C_FN_DEFINITION_END */ -void DebugPrint(char *buffer) { +void +DebugPrint(const char *buffer) +{ - if (!buffer) return; - + if (!buffer) + return; while(*buffer != '\0') putc(*buffer++); } @@ -41,12 +44,14 @@ * This global function displays the value with the number of digits specified. * .KB_C_FN_DEFINITION_END */ -void DebugPrintHex(int digits, int value) { - +void +DebugPrintHex(int digits, int value) +{ char dValue[11], *cPtr; int nextDigit; - if ((digits < 1) || (digits > 8)) return ; + if ((digits < 1) || (digits > 8)) + return; cPtr = &dValue[10]; *cPtr-- = 0; ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.h#3 (text+ko) ==== @@ -21,10 +21,7 @@ #ifndef _DEBUG_IO_H_ #define _DEBUG_IO_H_ -extern void DebugPutc(char cValue); -extern void DebugPrint(char *buffer); -extern int DebugGetchar(char *retChar); -extern int WaitForChar(char *cPtr, int seconds); +extern void DebugPrint(const char *buffer); extern void DebugPrintHex(int digits, int value); #endif ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#5 (text+ko) ==== @@ -22,6 +22,7 @@ #include "at91rm9200_lowlevel.h" #include "eeprom.h" #include "at91rm9200.h" +#include "debug_io.h" /* ****************************** GLOBALS *************************************/ ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#4 (text+ko) ==== @@ -49,7 +49,8 @@ * terminated. Returns 0 to indicate _wait_ condition. * .KB_C_FN_DEFINITION_END */ -static int ReadCharFromEnvironment(int timeout) +static int +ReadCharFromEnvironment(int timeout) { int ch; @@ -76,8 +77,9 @@ * memory. * .KB_C_FN_DEFINITION_END */ -void WriteCommandTable(void) { - +void +WriteCommandTable(void) +{ int i, size = MAX_ENV_SIZE_BYTES, copySize; char *cPtr = env_table; @@ -109,8 +111,9 @@ * associated command index. * .KB_C_FN_DEFINITION_END */ -void SetBootCommand(int index, char *command) { - +void +SetBootCommand(int index, char *command) +{ int i; if ((unsigned)index < MAX_BOOT_COMMANDS) { @@ -135,9 +138,10 @@ * This global function displays the current boot commands. * .KB_C_FN_DEFINITION_END */ -void DumpBootCommands(void) { +void +DumpBootCommands(void) +{ int i, j; - char *cPtr; for (i = 0; i < MAX_BOOT_COMMANDS; ++i) { DebugPrintHex(2, i); @@ -162,7 +166,9 @@ * exists in RAM which is larger than the non-volatile space. * .KB_C_FN_DEFINITION_END */ -void LoadBootCommands(void) { +void +LoadBootCommands(void) +{ int index, j, size; char *cPtr; @@ -190,8 +196,9 @@ * This global function executes applicable entries in the environment. * .KB_C_FN_DEFINITION_END */ -void ExecuteEnvironmentFunctions(void) { - +void +ExecuteEnvironmentFunctions(void) +{ currentIndex = 0; currentOffset = 0; ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#5 (text+ko) ==== @@ -29,6 +29,7 @@ #endif #include "emac.h" #include "loader_prompt.h" +#include "env_vars.h" #include "lib.h" @@ -69,7 +70,9 @@ * This private function packs the test IP info to an unsigned value. * .KB_C_FN_DEFINITION_END */ -static unsigned BuildIP(void) { +static unsigned +BuildIP(void) +{ unsigned p_ip_addr, p_tmp_val; p_ASCIIToDec(argv[1], &p_ip_addr); @@ -96,8 +99,9 @@ * This private function converts a command string to a command code. * .KB_C_FN_DEFINITION_END */ -static int StringToCommand(char *cPtr) { - +static int +StringToCommand(char *cPtr) +{ int i; for (i = 0; CommandTable[i].command != COMMAND_FINAL_FLAG; ++i) @@ -116,8 +120,9 @@ * of the first entry to begin restoring space in the inputBuffer. * .KB_C_FN_DEFINITION_END */ -static void RestoreSpace(int startArgc) { - +static void +RestoreSpace(int startArgc) +{ char *cPtr; for (startArgc++; startArgc < MAX_COMMAND_PARAMS; startArgc++) { @@ -134,7 +139,9 @@ * by argv and returns the number of parameters (< 0 on failure). * .KB_C_FN_DEFINITION_END */ -static int BreakCommand(char *buffer) { +static int +BreakCommand(char *buffer) +{ int pCount, cCount, state; state = pCount = 0; @@ -173,7 +180,9 @@ * This private function executes matching functions. * .KB_C_FN_DEFINITION_END */ -static void ParseCommand(char *buffer) { +static void +ParseCommand(char *buffer) +{ int argc; if ((argc = BreakCommand(buffer)) < 1) { @@ -188,12 +197,14 @@ // copy memory char *to, *from; - unsigned size; + unsigned toarg, fromarg, size; if (argc > 3) { - p_ASCIIToHex(argv[1], (unsigned*)&to); - p_ASCIIToHex(argv[2], (unsigned*)&from); - p_ASCIIToHex(argv[3], (unsigned*)&size); + p_ASCIIToHex(argv[1], &toarg); + p_ASCIIToHex(argv[2], &fromarg); + p_ASCIIToHex(argv[3], &size); + to = (char *)toarg; + from = (char *)fromarg; p_memcpy(to, from, size); } @@ -211,10 +222,12 @@ // execute at address void (*execAddr)(unsigned, unsigned, unsigned); + unsigned addr; if (argc > 1) { - p_ASCIIToHex(argv[1], (unsigned*)&execAddr); + p_ASCIIToHex(argv[1], &addr); /* in future, include machtypes (MACH_KB9200 = 612) */ + execAddr = (void (*)(unsigned, unsigned, unsigned))addr; (*execAddr)(0, 612, tagAddress); } @@ -347,9 +360,11 @@ // download X-modem record at address char *destAddr = 0; + unsigned addr; if (argc > 1) { - p_ASCIIToHex(argv[1], (unsigned*)&destAddr); + p_ASCIIToHex(argv[1], &addr); + destAddr = (char *)addr; xmodem_rx(destAddr); } } @@ -417,8 +432,9 @@ * the loader will parse. * .KB_C_FN_DEFINITION_END */ -void Bootloader(int(*inputFunction)(int)) { - +void +Bootloader(int(*inputFunction)(int)) +{ int ch = 0; p_memset((void*)inputBuffer, 0, sizeof(inputBuffer)); ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.h#4 (text+ko) ==== @@ -43,10 +43,11 @@ typedef struct { - int command; - char *c_string; + int command; + const char *c_string; } command_entry_t; -extern void EnterInteractiveBootloader(int(*inputFunction)(int)); +void EnterInteractiveBootloader(int(*inputFunction)(int)); +void Bootloader(int(*inputFunction)(int)); #endif /* _LOADER_PROMPT_H_ */ ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#4 (text+ko) ==== @@ -25,6 +25,7 @@ #include "at91rm9200_lowlevel.h" #include "loader_prompt.h" #include "emac.h" +#include "lib.h" /* * .KB_C_FN_DEFINITION_START @@ -36,9 +37,9 @@ * from this function. * .KB_C_FN_DEFINITION_END */ -int main(void) { - - char l_char; +int +main(void) +{ EMAC_Init(); ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/p_string.c#3 (text+ko) ==== @@ -21,6 +21,7 @@ * END_BLOCK ******************************************************************************/ +#include "p_string.h" /* * .KB_C_FN_DEFINITION_START @@ -29,7 +30,9 @@ * a non-space character. * .KB_C_FN_DEFINITION_END */ -int p_IsWhiteSpace(char cValue) { +int +p_IsWhiteSpace(char cValue) +{ return ((cValue == ' ') || (cValue == '\t') || (cValue == 0) || @@ -44,7 +47,9 @@ * This global function returns the decimal value of the validated hex char. * .KB_C_FN_DEFINITION_END */ -unsigned p_HexCharValue(char cValue) { +unsigned +p_HexCharValue(char cValue) +{ if (cValue < ('9' + 1)) return (cValue - '0'); if (cValue < ('F' + 1)) @@ -60,8 +65,9 @@ * number of bytes to value. * .KB_C_FN_DEFINITION_END */ -void p_memset(char *buffer, char value, int size) { - +void +p_memset(char *buffer, char value, int size) +{ while (size--) *buffer++ = value; } @@ -74,11 +80,13 @@ * before (not including) the string termination character ('/0'). * .KB_C_FN_DEFINITION_END */ -int p_strlen(char *buffer) { +int +p_strlen(const char *buffer) +{ int len = 0; - if (buffer) { - while (buffer[len]) len++; - } + if (buffer) + while (buffer[len]) + len++; return (len); } @@ -90,13 +98,12 @@ * after the copy operation (after the '/0'). * .KB_C_FN_DEFINITION_END */ -char *p_strcpy(char *to, char *from) { - +char * +p_strcpy(char *to, const char *from) +{ while (*from) *to++ = *from++; - - *to++ = *from++; - + *to++ = '\0'; return (to); } @@ -110,15 +117,15 @@ * NULL-terminated. * .KB_C_FN_DEFINITION_END */ -void p_ASCIIToHex(char *buf, unsigned *value) { - +void +p_ASCIIToHex(const char *buf, unsigned *value) +{ unsigned lValue = 0; if ((*buf == '0') && ((buf[1] == 'x') || (buf[1] == 'X'))) buf += 2; while (*buf) { - lValue <<= 4; lValue += p_HexCharValue(*buf++); } @@ -136,12 +143,12 @@ * NULL-terminated. * .KB_C_FN_DEFINITION_END */ -void p_ASCIIToDec(char *buf, unsigned *value) { +void +p_ASCIIToDec(const char *buf, unsigned *value) +{ *value = 0; - while (*buf) { - *value *= 10; *value += (*buf++) - '0'; } @@ -155,7 +162,9 @@ * pointer for the specified number of bytes. * .KB_C_FN_DEFINITION_END */ -void p_memcpy(char *to, char *from, unsigned size) { +void +p_memcpy(char *to, const char *from, unsigned size) +{ while (size--) *to++ = *from++; } @@ -169,9 +178,11 @@ * greater than 0. * .KB_C_FN_DEFINITION_END */ -int p_memcmp(char *to, char *from, unsigned size) { - - while ((--size) && (*to++ == *from++)) ; +int +p_memcmp(const char *to, const char *from, unsigned size) +{ + while ((--size) && (*to++ == *from++)) + continue; return (*to != *from); } @@ -184,7 +195,9 @@ * Returns 0 if the locations are equal. * .KB_C_FN_DEFINITION_END */ -int p_strcmp(char *to, char *from) { +int +p_strcmp(const char *to, const char *from) +{ while (*to && *from && (*to == *from)) { ++to; ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/p_string.h#3 (text+ko) ==== @@ -23,15 +23,15 @@ #define ToASCII(x) ((x > 9) ? (x + 'A' - 0xa) : (x + '0')) -extern int p_IsWhiteSpace(char cValue); -extern unsigned p_HexCharValue(char cValue); -extern void p_memset(char *buffer, char value, int size); -extern int p_strlen(char *buffer); -extern char *p_strcpy(char *to, char *from); -extern void p_ASCIIToHex(char *buf, unsigned *value); -extern void p_ASCIIToDec(char *buf, unsigned *value); -extern void p_memcpy(char *to, char *from, unsigned size); -extern int p_memcmp(char *to, char *from, unsigned size); -extern int p_strcmp(char *to, char *from); +int p_IsWhiteSpace(char cValue); +unsigned p_HexCharValue(char cValue); +void p_memset(char *buffer, char value, int size); +int p_strlen(const char *buffer); +char *p_strcpy(char *to, const char *from); +void p_ASCIIToHex(const char *buf, unsigned *value); +void p_ASCIIToDec(const char *buf, unsigned *value); +void p_memcpy(char *to, const char *from, unsigned size); +int p_memcmp(const char *to, const char *from, unsigned size); +int p_strcmp(const char *to, const char *from); #endif /* _P_STRING_H_ */ From owner-p4-projects@FreeBSD.ORG Mon Apr 17 22:19:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 603AA16A411; Mon, 17 Apr 2006 22:19:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D70316A40A for ; Mon, 17 Apr 2006 22:19:44 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D34743D60 for ; Mon, 17 Apr 2006 22:19:42 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HMJgBd011276 for ; Mon, 17 Apr 2006 22:19:42 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HMJfPK011267 for perforce@freebsd.org; Mon, 17 Apr 2006 22:19:41 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 22:19:41 GMT Message-Id: <200604172219.k3HMJfPK011267@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95456 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 22:19:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=95456 Change 95456 by imp@imp_hammer on 2006/04/17 22:19:35 Hopefully fix all the compile warnings w/o introducing new bugs. # This code makes some, ummmm, interesting assumptions Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.h#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.c#5 (text+ko) ==== @@ -24,6 +24,7 @@ #include "emac.h" #include "p_string.h" #include "at91rm9200_lowlevel.h" +#include "debug_io.h" /* ****************************** GLOBALS *************************************/ @@ -51,17 +52,17 @@ * This private function calculates the IP checksum for various headers. * .KB_C_FN_DEFINITION_END */ -static unsigned short IP_checksum(unsigned short *p, int len) +static unsigned short +IP_checksum(void *cp, int len) { unsigned i, t; + unsigned short *p = (unsigned short *)cp; len &= ~1; - for (i=0,t=0; i> 16); - return (~t); + return (~t); } @@ -71,14 +72,13 @@ * This private function sends an ARP request to determine the server MAC. * .KB_C_FN_DEFINITION_END */ -static void GetServerAddress(void) { - +static void +GetServerAddress(void) +{ arp_header_t *p_ARP; p_ARP = (arp_header_t*)transmitBuffer; - p_memset((char*)p_ARP->dest_mac, 0xFF, 6); - p_memcpy((char*)p_ARP->src_mac, (char*)localMACAddr, 6); p_ARP->frame_type = SWAP16(PROTOCOL_ARP); @@ -111,7 +111,8 @@ * This private function initializes and send a TFTP packet. * .KB_C_FN_DEFINITION_END */ -static void Send_TFTP_Packet(char *tftpData, unsigned tftpLength) +static void +Send_TFTP_Packet(char *tftpData, unsigned tftpLength) { transmit_header_t *macHdr = (transmit_header_t*)tftpSendPacket; ip_header_t *ipHdr; @@ -122,9 +123,9 @@ p_memcpy((char*)macHdr->src_mac, (char*)localMACAddr, 6); - *(unsigned short*)&(macHdr->ip_tos) = SWAP16(PROTOCOL_IP); + macHdr->proto_mac = SWAP16(PROTOCOL_IP); - ipHdr = (ip_header_t*)&macHdr->packet_length; + ipHdr = &macHdr->iphdr; ipHdr->ip_v_hl = 0x45; ipHdr->ip_tos = 0; @@ -139,7 +140,7 @@ p_memcpy((char*)ipHdr->ip_dst, (char*)serverIPAddr, 4); - ipHdr->ip_sum = SWAP16(IP_checksum((unsigned short*)ipHdr, 20)); + ipHdr->ip_sum = SWAP16(IP_checksum(ipHdr, 20)); udpHdr = (udp_header_t*)(ipHdr + 1); @@ -150,7 +151,7 @@ p_memcpy((char*)udpHdr+8, tftpData, tftpLength); - t_checksum = IP_checksum((unsigned short*)ipHdr + 6, (16 + tftpLength)); + t_checksum = IP_checksum((char *)ipHdr + 12, (16 + tftpLength)); t_checksum = (~t_checksum) & 0xFFFF; t_checksum += 25 + tftpLength; @@ -174,8 +175,9 @@ * This private function sends a RRQ packet to the server. * .KB_C_FN_DEFINITION_END */ -static void TFTP_RequestFile(char *filename) { - +static void +TFTP_RequestFile(char *filename) +{ tftp_header_t tftpHeader; char *cPtr, *ePtr, *mPtr; unsigned length; @@ -200,8 +202,9 @@ * This private function sends an ACK packet to the server. * .KB_C_FN_DEFINITION_END */ -static void TFTP_ACK_Data(char *data, unsigned short block_num, unsigned short len) { - +static void +TFTP_ACK_Data(char *data, unsigned short block_num, unsigned short len) +{ tftp_header_t tftpHeader; if (block_num == (ackBlock + 1)) { @@ -227,9 +230,10 @@ * any here. * .KB_C_FN_DEFINITION_END */ -static void CheckForNewPacket(ip_header_t *pHeader) { - - unsigned short *pFrameType, *pArpOp; +static void +CheckForNewPacket(ip_header_t *pHeader) +{ + unsigned short *pFrameType; unsigned i; char *pData; ip_header_t *pIpHeader; @@ -256,11 +260,9 @@ switch (SWAP16(*pFrameType)) { case PROTOCOL_ARP: - - pArpOp = (unsigned short *) (pData + 20); p_ARP = (arp_header_t*)pData; - if (SWAP16(*pArpOp) == ARP_REPLY) { + if (SWAP16(p_ARP->operation) == ARP_REPLY) { // check if new server info is available if ((!serverMACSet) && @@ -274,10 +276,10 @@ } } - if (SWAP16(*pArpOp) == ARP_REQUEST) { + if (SWAP16(p_ARP->operation) == ARP_REQUEST) { // ARP REPLY operation - *pArpOp = SWAP16(ARP_REPLY); + p_ARP->operation = SWAP16(ARP_REPLY); // Fill the dest address and src address for (i = 0; i <6; i++) { @@ -304,7 +306,7 @@ break; case PROTOCOL_IP: - pIpHeader = (ip_header_t*)(pData + 14); + pIpHeader = (ip_header_t*)(pData + 14); p_memcpy((char*)pHeader, (char*)pIpHeader,sizeof(ip_header_t)); switch(pIpHeader->ip_p) { @@ -357,8 +359,9 @@ * This private function reads the PHY device. * .KB_C_FN_DEFINITION_END */ -static unsigned short AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) { - +static unsigned short +AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) +{ unsigned value = 0x60020000 | (addr << 18); pEmac->EMAC_CTL |= AT91C_EMAC_MPE; @@ -375,11 +378,12 @@ * This private function determines the link speed set by the PHY. * .KB_C_FN_DEFINITION_END */ -static void MII_GetLinkSpeed(AT91PS_EMAC pEmac) { +static void +MII_GetLinkSpeed(AT91PS_EMAC pEmac) +{ + unsigned short stat2; + unsigned update = 0; - unsigned short stat2; - unsigned update = 0; - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); if (!(stat2 & 0x400)) { @@ -408,14 +412,14 @@ * This private function initializes the EMAC on the chip. * .KB_C_FN_DEFINITION_END */ -void AT91F_EmacEntry(void) { - +static void +AT91F_EmacEntry(void) +{ unsigned i; char *pRxPacket = (char*)RX_DATA_START; AT91PS_EMAC pEmac = AT91C_BASE_EMAC; for (i = 0; i < MAX_RX_PACKETS; ++i) { - p_rxBD[i].address = (unsigned)pRxPacket; p_rxBD[i].size = 0; pRxPacket += RX_PACKET_SIZE; @@ -430,7 +434,9 @@ MII_GetLinkSpeed(pEmac); // the sequence write EMAC_SA1L and write EMAC_SA1H must be respected - pEmac->EMAC_SA1L = ((unsigned)localMACAddr[2] << 24) | ((unsigned)localMACAddr[3] << 16) | ((int)localMACAddr[4] << 8) | localMACAddr[5]; + pEmac->EMAC_SA1L = ((unsigned)localMACAddr[2] << 24) | + ((unsigned)localMACAddr[3] << 16) | ((int)localMACAddr[4] << 8) | + localMACAddr[5]; pEmac->EMAC_SA1H = ((unsigned)localMACAddr[0] << 8) | localMACAddr[1]; pEmac->EMAC_RBQP = (unsigned) p_rxBD; @@ -454,7 +460,9 @@ * four bytes while high_address is the last 2 bytes of the 48-bit value. * .KB_C_FN_DEFINITION_END */ -void SetMACAddress(unsigned low_address, unsigned high_address) { +void +SetMACAddress(unsigned low_address, unsigned high_address) +{ AT91PS_EMAC pEmac = AT91C_BASE_EMAC; AT91PS_PMC pPMC = AT91C_BASE_PMC; @@ -489,8 +497,9 @@ * This global function sets the IP of the TFTP download server. * .KB_C_FN_DEFINITION_END */ -void SetServerIPAddress(unsigned address) { - +void +SetServerIPAddress(unsigned address) +{ // force update in case the IP has changed serverMACSet = 0; @@ -509,8 +518,9 @@ * This global function sets the IP of this module. * .KB_C_FN_DEFINITION_END */ -void SetLocalIPAddress(unsigned address) { - +void +SetLocalIPAddress(unsigned address) +{ // force update in case the IP has changed serverMACSet = 0; @@ -531,10 +541,10 @@ * executed. * .KB_C_FN_DEFINITION_END */ -void TFTP_Download(unsigned address, char *filename) +void +TFTP_Download(unsigned address, char *filename) { ip_header_t IpHeader; - AT91PS_EMAC pEmac = (AT91PS_EMAC)AT91C_BASE_EMAC; unsigned thisSeconds, running, state; int timeout, tickUpdate; @@ -553,53 +563,50 @@ return ; if (!MAC_init) { - AT91C_BASE_PMC->PMC_PCER = - ((unsigned) 1 << AT91C_ID_EMAC); + AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_EMAC; - AT91C_BASE_PIOA->PIO_ASR = - ((unsigned) AT91C_PA14_ERXER ) | - ((unsigned) AT91C_PA12_ERX0 ) | - ((unsigned) AT91C_PA13_ERX1 ) | - ((unsigned) AT91C_PA8_ETXEN ) | - ((unsigned) AT91C_PA16_EMDIO ) | - ((unsigned) AT91C_PA9_ETX0 ) | - ((unsigned) AT91C_PA10_ETX1 ) | - ((unsigned) AT91C_PA11_ECRS_ECRSDV) | - ((unsigned) AT91C_PA15_EMDC ) | - ((unsigned) AT91C_PA7_ETXCK_EREFCK); + AT91C_BASE_PIOA->PIO_ASR = + AT91C_PA14_ERXER | + AT91C_PA12_ERX0 | + AT91C_PA13_ERX1 | + AT91C_PA8_ETXEN | + AT91C_PA16_EMDIO | + AT91C_PA9_ETX0 | + AT91C_PA10_ETX1 | + AT91C_PA11_ECRS_ECRSDV | + AT91C_PA15_EMDC | + AT91C_PA7_ETXCK_EREFCK; AT91C_BASE_PIOA->PIO_BSR = 0; - AT91C_BASE_PIOA->PIO_PDR = - ((unsigned) AT91C_PA14_ERXER ) | - ((unsigned) AT91C_PA12_ERX0 ) | - ((unsigned) AT91C_PA13_ERX1 ) | - ((unsigned) AT91C_PA8_ETXEN ) | - ((unsigned) AT91C_PA16_EMDIO ) | - ((unsigned) AT91C_PA9_ETX0 ) | - ((unsigned) AT91C_PA10_ETX1 ) | - ((unsigned) AT91C_PA11_ECRS_ECRSDV) | - ((unsigned) AT91C_PA15_EMDC ) | - ((unsigned) AT91C_PA7_ETXCK_EREFCK); - + AT91C_BASE_PIOA->PIO_PDR = + AT91C_PA14_ERXER | + AT91C_PA12_ERX0 | + AT91C_PA13_ERX1 | + AT91C_PA8_ETXEN | + AT91C_PA16_EMDIO | + AT91C_PA9_ETX0 | + AT91C_PA10_ETX1 | + AT91C_PA11_ECRS_ECRSDV | + AT91C_PA15_EMDC | + AT91C_PA7_ETXCK_EREFCK; AT91C_BASE_PIOB->PIO_ASR = 0; AT91C_BASE_PIOB->PIO_BSR = - ((unsigned) AT91C_PB12_ETX2) | - ((unsigned) AT91C_PB13_ETX3) | - ((unsigned) AT91C_PB14_ETXER) | - ((unsigned) AT91C_PB15_ERX2) | - ((unsigned) AT91C_PB16_ERX3) | - ((unsigned) AT91C_PB17_ERXDV) | - ((unsigned) AT91C_PB18_ECOL) | - ((unsigned) AT91C_PB19_ERXCK); + AT91C_PB12_ETX2 | + AT91C_PB13_ETX3 | + AT91C_PB14_ETXER | + AT91C_PB15_ERX2 | + AT91C_PB16_ERX3 | + AT91C_PB17_ERXDV | + AT91C_PB18_ECOL | + AT91C_PB19_ERXCK; AT91C_BASE_PIOB->PIO_PDR = - ((unsigned) AT91C_PB12_ETX2) | - ((unsigned) AT91C_PB13_ETX3) | - ((unsigned) AT91C_PB14_ETXER) | - ((unsigned) AT91C_PB15_ERX2) | - ((unsigned) AT91C_PB16_ERX3) | - ((unsigned) AT91C_PB17_ERXDV) | - ((unsigned) AT91C_PB18_ECOL) | - ((unsigned) AT91C_PB19_ERXCK); - + AT91C_PB12_ETX2 | + AT91C_PB13_ETX3 | + AT91C_PB14_ETXER | + AT91C_PB15_ERX2 | + AT91C_PB16_ERX3 | + AT91C_PB17_ERXDV | + AT91C_PB18_ECOL | + AT91C_PB19_ERXCK; MAC_init = 1; } @@ -675,8 +682,9 @@ * This global function initializes variables used in tftp transfers. * .KB_C_FN_DEFINITION_END */ -void EMAC_Init(void) { - +void +EMAC_Init(void) +{ p_rxBD = (receive_descriptor_t*)RX_BUFFER_START; localMACSet = 0; serverMACSet = 0; ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.h#3 (text+ko) ==== @@ -39,7 +39,7 @@ #define PROTOCOL_IP 0x0800 #define PROTOCOL_UDP 0x11 -#define SWAP16(x) (((x & 0xff) << 8) | (x >> 8)) +#define SWAP16(x) ((((x) & 0xff) << 8) | ((x) >> 8)) typedef struct { unsigned address; @@ -66,7 +66,7 @@ unsigned char target_mac[6]; unsigned char target_ip[4]; -} arp_header_t; +} __attribute__((__packed__)) arp_header_t; typedef struct { unsigned char ip_v_hl; @@ -79,36 +79,28 @@ unsigned short ip_sum; unsigned char ip_src[4]; unsigned char ip_dst[4]; -} ip_header_t; +} __attribute__((__packed__)) ip_header_t; typedef struct { unsigned char dest_mac[6]; unsigned char src_mac[6]; - unsigned char ip_tos; - unsigned char ip_hl_v; + unsigned short proto_mac; unsigned short packet_length; - unsigned short ip_id; - unsigned short ip_len; - unsigned char ip_p; - unsigned char ip_ttl; - unsigned short ip_off; - unsigned short ip_sum; - unsigned char ip_src[4]; - unsigned char ip_dst[4]; -} transmit_header_t; + ip_header_t iphdr; +} __attribute__((__packed__)) transmit_header_t; typedef struct { unsigned short src_port; unsigned short dst_port; unsigned short udp_len; unsigned short udp_cksum; -} udp_header_t; +} __attribute__((__packed__)) udp_header_t; typedef struct { unsigned short opcode; unsigned short block_num; unsigned char data[512]; -} tftp_header_t; +} __attribute__((__packed__)) tftp_header_t; #define TFTP_RRQ_OPCODE 1 #define TFTP_WRQ_OPCODE 2 From owner-p4-projects@FreeBSD.ORG Mon Apr 17 22:21:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B608D16A40A; Mon, 17 Apr 2006 22:21:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9687916A405 for ; Mon, 17 Apr 2006 22:21:45 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D3DE43D46 for ; Mon, 17 Apr 2006 22:21:45 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HMLjP5012785 for ; Mon, 17 Apr 2006 22:21:45 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HMLjh9012779 for perforce@freebsd.org; Mon, 17 Apr 2006 22:21:45 GMT (envelope-from jb@freebsd.org) Date: Mon, 17 Apr 2006 22:21:45 GMT Message-Id: <200604172221.k3HMLjh9012779@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95457 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 22:21:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=95457 Change 95457 by jb@jb_freebsd2 on 2006/04/17 22:21:19 Fix an endif. Affected files ... .. //depot/projects/dtrace/src/Makefile.inc1#6 edit Differences ... ==== //depot/projects/dtrace/src/Makefile.inc1#6 (text+ko) ==== @@ -39,7 +39,7 @@ SUBDIR= share/info include lib libexec bin .if defined(NO_CDDL) NO_CTF=1 -#else +.else SUBDIR+=cddl .endif .if ${MK_GAMES} != "no" From owner-p4-projects@FreeBSD.ORG Mon Apr 17 23:03:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9643716A403; Mon, 17 Apr 2006 23:03:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44B2C16A400 for ; Mon, 17 Apr 2006 23:03:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDB3943D46 for ; Mon, 17 Apr 2006 23:03:36 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HN3aJo036488 for ; Mon, 17 Apr 2006 23:03:36 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HN3aAx036485 for perforce@freebsd.org; Mon, 17 Apr 2006 23:03:36 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 23:03:36 GMT Message-Id: <200604172303.k3HN3aAx036485@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95459 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 23:03:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=95459 Change 95459 by imp@imp_hammer on 2006/04/17 23:03:06 Add bootspi, a new boot program to boot from a spi device. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Mon Apr 17 23:14:51 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C8C716A402; Mon, 17 Apr 2006 23:14:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 443BF16A401 for ; Mon, 17 Apr 2006 23:14:51 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1224643D45 for ; Mon, 17 Apr 2006 23:14:51 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HNEoj1040670 for ; Mon, 17 Apr 2006 23:14:50 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HNEogd040662 for perforce@freebsd.org; Mon, 17 Apr 2006 23:14:50 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 23:14:50 GMT Message-Id: <200604172314.k3HNEogd040662@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95460 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 23:14:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=95460 Change 95460 by imp@imp_hammer on 2006/04/17 23:14:45 lib.c gets broken up Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.c#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/putchar.c#1 branch Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#2 (text+ko) ==== @@ -2,7 +2,7 @@ LIB= at91 INTERNALLIB= -SRCS=at91rm9200_lowlevel.c lib.c xmodem.c +SRCS=at91rm9200_lowlevel.c getc.c putchar.c printf.c xmodem.c NO_MAN= .include ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#3 (text) ==== From owner-p4-projects@FreeBSD.ORG Mon Apr 17 23:28:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC18516A404; Mon, 17 Apr 2006 23:28:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67FBB16A400 for ; Mon, 17 Apr 2006 23:28:10 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3647643D6E for ; Mon, 17 Apr 2006 23:28:08 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HNS8uE047189 for ; Mon, 17 Apr 2006 23:28:08 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HNS7kp047186 for perforce@freebsd.org; Mon, 17 Apr 2006 23:28:07 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 23:28:07 GMT Message-Id: <200604172328.k3HNS7kp047186@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95462 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 23:28:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=95462 Change 95462 by imp@imp_hammer on 2006/04/17 23:27:40 split up lib.c, change putc to putchar, implement simple printf (which may be too big, but 380 bytes doesn't seem too bad). Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.c#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/printf.c#1 add .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/putchar.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.c#6 (text+ko) ==== @@ -35,7 +35,7 @@ if (!buffer) return; while(*buffer != '\0') - putc(*buffer++); + putchar(*buffer++); } /* ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#5 (text+ko) ==== @@ -147,7 +147,7 @@ DebugPrintHex(2, i); DebugPrint(" : "); for (j = 0; j < MAX_INPUT_SIZE; ++j) { - putc(boot_commands[i][j]); + putchar(boot_commands[i][j]); if (!(boot_commands[i][j])) break; } ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#6 (text+ko) ==== @@ -398,7 +398,7 @@ inputBuffer[buffCount] = p_char; ++buffCount; - putc(p_char); + putchar(p_char); } } else if (buffCount) { ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#2 (text) ==== @@ -39,21 +39,6 @@ #include "lib.h" /* - * void putc(int ch) - * Writes a character to the DBGU port. It assumes that DBGU has - * already been initialized. - */ -void -putc(int ch) -{ - AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU; - - while (!(pUSART->US_CSR & AT91C_US_TXRDY)) - continue; - pUSART->US_THR = (ch & 0xFF); -} - -/* * int getc(int seconds) * * Reads a character from the DBGU port, if one is available within about ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#4 (text) ==== @@ -28,7 +28,8 @@ #define ARM_BOOT_LIB_H int getc(int); -void putc(int); +void putchar(int); int xmodem_rx(char *dst); +void printf(const char *fmt,...); #endif ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/putchar.c#2 (text) ==== @@ -39,12 +39,12 @@ #include "lib.h" /* - * void putc(int ch) + * void putchar(int ch) * Writes a character to the DBGU port. It assumes that DBGU has * already been initialized. */ void -putc(int ch) +putchar(int ch) { AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU; @@ -52,26 +52,3 @@ continue; pUSART->US_THR = (ch & 0xFF); } - -/* - * int getc(int seconds) - * - * Reads a character from the DBGU port, if one is available within about - * seconds seconds. It assumes that DBGU has already been initialized. - */ -int -getc(int seconds) -{ - AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU; - unsigned thisSecond; - - thisSecond = GetSeconds(); - seconds = thisSecond + seconds; - - while (thisSecond <= seconds) { - if ((pUSART->US_CSR & AT91C_US_RXRDY)) - return (pUSART->US_RHR & 0xFF); - thisSecond = GetSeconds(); - } - return (-1); -} ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#2 (text) ==== @@ -81,11 +81,11 @@ goto err; if (((ch = getc(1)) == -1) || ((ch & 0xff) != (chk & 0xFF))) goto err; - putc(ACK); + putchar(ACK); return (1); err:; - putc(CAN); + putchar(CAN); // We should allow for resend, but we don't. return (0); } @@ -107,11 +107,11 @@ while (1) { if (starting) - putc('C'); + putchar('C'); if (((ch = getc(1)) == -1) || (ch != SOH && ch != EOT)) continue; if (ch == EOT) { - putc(ACK); + putchar(ACK); return (dest - startAddress); } starting = 0; From owner-p4-projects@FreeBSD.ORG Mon Apr 17 23:43:29 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F1E0216A404; Mon, 17 Apr 2006 23:43:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B686916A400 for ; Mon, 17 Apr 2006 23:43:28 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58F7943D45 for ; Mon, 17 Apr 2006 23:43:28 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HNhRBo057586 for ; Mon, 17 Apr 2006 23:43:28 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HNhRPK057583 for perforce@freebsd.org; Mon, 17 Apr 2006 23:43:27 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 23:43:27 GMT Message-Id: <200604172343.k3HNhRPK057583@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95463 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 23:43:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=95463 Change 95463 by imp@imp_hammer on 2006/04/17 23:42:43 Switch to using printf instead of DebugPrint, et al. Alas, this change costs us about 110 bytes. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.c#7 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/debug_io.h#4 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.c#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/putchar.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#6 (text+ko) ==== @@ -3,7 +3,7 @@ P=bootiic FILES=${P} SRCS=arm_init.s main.c eeprom.c \ - env_vars.c debug_io.c loader_prompt.c p_string.c emac.c + env_vars.c loader_prompt.c p_string.c emac.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#6 (text+ko) ==== @@ -22,7 +22,7 @@ #include "at91rm9200_lowlevel.h" #include "eeprom.h" #include "at91rm9200.h" -#include "debug_io.h" +#include "lib.h" /* ****************************** GLOBALS *************************************/ @@ -136,7 +136,7 @@ while (size--) { if (!(ee_addr & 0x3f)) - DebugPrint("."); + putchar('.'); // Set the TWI Master Mode Register twiPtr->TWI_MMR = ((TWSI_EEPROM_ADDRESS << 16) | AT91C_TWI_IADRSZ_2_BYTE ) & ~AT91C_TWI_MREAD; @@ -164,5 +164,6 @@ ReadEEPROM(ee_addr, &test_data, 1); } - DebugPrint("\n\r"); + putchar('\r'); + putchar('\n'); } ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.c#6 (text+ko) ==== @@ -24,7 +24,7 @@ #include "emac.h" #include "p_string.h" #include "at91rm9200_lowlevel.h" -#include "debug_io.h" +#include "lib.h" /* ****************************** GLOBALS *************************************/ @@ -550,12 +550,9 @@ if (!address) { // report last transfer information - DebugPrint("\n\r -- Last tftp transfer info --\n\r"); - DebugPrint(" address: "); - DebugPrintHex(8, lastAddress); - DebugPrint("\n\r size: "); - DebugPrintHex(8, lastSize); - DebugPrint("\n\r"); + printf("Last tftp transfer info --\r\n" + "address: 0x%x\r\n" + " size: 0x%x\r\n", lastAddress, lastSize); return ; } ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#6 (text+ko) ==== @@ -21,7 +21,6 @@ #include "env_vars.h" #include "loader_prompt.h" #include "p_string.h" -#include "debug_io.h" #include "eeprom.h" #include "lib.h" @@ -144,14 +143,13 @@ int i, j; for (i = 0; i < MAX_BOOT_COMMANDS; ++i) { - DebugPrintHex(2, i); - DebugPrint(" : "); + printf("0x%x : ", i); for (j = 0; j < MAX_INPUT_SIZE; ++j) { putchar(boot_commands[i][j]); if (!(boot_commands[i][j])) break; } - DebugPrint("[E]\n\r"); + printf("[E]\n\r"); } } ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#7 (text+ko) ==== @@ -20,7 +20,6 @@ * END_BLOCK ******************************************************************************/ -#include "debug_io.h" #include "at91rm9200_lowlevel.h" #include "p_string.h" #include "eeprom.h" @@ -259,7 +258,7 @@ case COMMAND_HELP: // dump command info - DebugPrint("Commands:\n\r" + printf("Commands:\n\r" "\tc\n\r" "\td\n\r" "\te\n\r" @@ -374,7 +373,7 @@ break; } - DebugPrint("\n\r"); + printf("\n\r"); } @@ -406,16 +405,16 @@ /* handle backspace BS */ --buffCount; inputBuffer[buffCount] = 0; - DebugPrint(backspaceString); + printf(backspaceString); return ; } if (!p_char) { - DebugPrint("\n\r"); + printf("\n\r"); ParseCommand(inputBuffer); p_memset(inputBuffer, 0, MAX_INPUT_SIZE); buffCount = 0; - DebugPrint("\n\r>"); + printf("\n\r>"); } } @@ -444,7 +443,7 @@ inputFunction = getc; } - DebugPrint("\n\r>"); + printf("\n\r>"); while (ch >= 0) if ((ch = ((*inputFunction)(0))) > 0) ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#5 (text+ko) ==== @@ -20,7 +20,6 @@ * END_BLOCK ******************************************************************************/ -#include "debug_io.h" #include "env_vars.h" #include "at91rm9200_lowlevel.h" #include "loader_prompt.h" @@ -45,8 +44,7 @@ LoadBootCommands(); - DebugPrint("\n\rKB9202(www.kwikbyte.com)\n\r"); - DebugPrint("\n\rAuto boot..\n\r"); + printf("\n\rKB9202(www.kwikbyte.com)\n\rAuto boot..\n\r"); if (getc(1) == -1) ExecuteEnvironmentFunctions(); ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/putchar.c#3 (text) ==== From owner-p4-projects@FreeBSD.ORG Tue Apr 18 00:55:57 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 48B1C16A406; Tue, 18 Apr 2006 00:55:57 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFD1516A404 for ; Tue, 18 Apr 2006 00:55:56 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83B8343D45 for ; Tue, 18 Apr 2006 00:55:56 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I0tuxg003095 for ; Tue, 18 Apr 2006 00:55:56 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I0tukf003086 for perforce@freebsd.org; Tue, 18 Apr 2006 00:55:56 GMT (envelope-from marcel@freebsd.org) Date: Tue, 18 Apr 2006 00:55:56 GMT Message-Id: <200604180055.k3I0tukf003086@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 Cc: Subject: PERFORCE change 95465 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 00:55:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=95465 Change 95465 by marcel@marcel_nfs on 2006/04/18 00:54:57 o Remove pucvar.h. Split up its contents into puc_bfe.h and puc.c. This avoids bus frontends from having to pull in unnecessary headers. o Various renaming to improve greppability. o Manage and allocate interrupt resources. o Add an empty detach function. We want that too. o Bring puc_pccard.c in sync with the new world order. o Slight shuffling to improve consistency. Affected files ... .. //depot/projects/uart/dev/puc/puc.c#24 edit .. //depot/projects/uart/dev/puc/puc_pccard.c#4 edit .. //depot/projects/uart/dev/puc/puc_pci.c#12 edit .. //depot/projects/uart/dev/puc/pucdata.c#23 edit .. //depot/projects/uart/dev/puc/pucvar.h#20 delete Differences ... ==== //depot/projects/uart/dev/puc/puc.c#24 (text+ko) ==== @@ -41,12 +41,28 @@ #include #include +#include #include #include -#include + +#define PUC_ISRCCNT 5 + +struct puc_port { + struct puc_bar *p_bar; + struct resource *p_rres; + struct resource *p_ires; + device_t p_dev; + int p_nr; + int p_type; + int p_rclk; + + driver_intr_t *p_ih; + serdev_intr_t *p_ihsrc[PUC_ISRCCNT]; + void *p_iharg; +}; devclass_t puc_devclass; -char puc_driver_name[] = "puc"; +const char puc_driver_name[] = "puc"; MALLOC_DEFINE(M_PUC, "PUC", "PUC driver"); @@ -110,7 +126,7 @@ } int -puc_attach(device_t dev) +puc_bfe_attach(device_t dev) { struct puc_bar *bar; struct puc_port *port; @@ -140,6 +156,14 @@ rman_fini(&sc->sc_ioport); return (error); } + sc->sc_irq.rm_type = RMAN_ARRAY; + sc->sc_irq.rm_descr = "Interrupt vector space"; + error = rman_init(&sc->sc_irq); + if (error) { + rman_fini(&sc->sc_iomem); + rman_fini(&sc->sc_ioport); + return (error); + } error = puc_query(sc->sc_cfg, PUC_QUERY_NPORTS, 0, &res); KASSERT(error == 0, ("%s %d", __func__, __LINE__)); @@ -147,6 +171,10 @@ sc->sc_port = malloc(sc->sc_nports * sizeof(struct puc_port), M_PUC, M_WAITOK|M_ZERO); + error = rman_manage_region(&sc->sc_irq, 1, sc->sc_nports); + if (error) + goto fail; + for (idx = 0; idx < sc->sc_nports; idx++) { port = &sc->sc_port[idx]; port->p_nr = idx + 1; @@ -174,15 +202,19 @@ size = res; rm = (bar->b_type == SYS_RES_IOPORT) ? &sc->sc_ioport: &sc->sc_iomem; - port->p_res = rman_reserve_resource(rm, start + ofs, + port->p_rres = rman_reserve_resource(rm, start + ofs, start + ofs + size - 1, size, 0, sc->sc_dev); - if (port->p_res != NULL) { + if (port->p_rres != NULL) { bsh = rman_get_bushandle(bar->b_res); bst = rman_get_bustag(bar->b_res); bus_space_subregion(bst, bsh, ofs, size, &bsh); - rman_set_bushandle(port->p_res, bsh); - rman_set_bustag(port->p_res, bst); + rman_set_bushandle(port->p_rres, bsh); + rman_set_bustag(port->p_rres, bst); } + port->p_ires = rman_reserve_resource(&sc->sc_irq, port->p_nr, + port->p_nr, 1, 0, sc->sc_dev); + if (port->p_ires == NULL) + goto fail; port->p_dev = device_add_child(dev, NULL, -1); if (port->p_dev != NULL) @@ -233,8 +265,10 @@ port = &sc->sc_port[idx]; if (port->p_dev != NULL) device_delete_child(dev, port->p_dev); - if (port->p_res != NULL) - rman_release_resource(port->p_res); + if (port->p_rres != NULL) + rman_release_resource(port->p_rres); + if (port->p_ires != NULL) + rman_release_resource(port->p_ires); } for (idx = 0; idx < PUC_PCI_BARS; idx++) { bar = &sc->sc_bar[idx]; @@ -242,6 +276,7 @@ bus_release_resource(sc->sc_dev, bar->b_type, bar->b_rid, bar->b_res); } + rman_fini(&sc->sc_irq); rman_fini(&sc->sc_iomem); rman_fini(&sc->sc_ioport); free(sc->sc_port, M_PUC); @@ -249,7 +284,13 @@ } int -puc_probe(device_t dev, const struct puc_cfg *cfg) +puc_bfe_detach(device_t dev) +{ + return (ENXIO); +} + +int +puc_bfe_probe(device_t dev, const struct puc_cfg *cfg) { struct puc_softc *sc; intptr_t res; @@ -272,104 +313,184 @@ } struct resource * -puc_alloc_resource(device_t dev, device_t child, int type, int *rid, +puc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { struct puc_port *port; - u_int fl; + struct resource *res; + device_t assigned, originator; int error; /* Get our immediate child. */ + originator = child; while (child != NULL && device_get_parent(child) != dev) child = device_get_parent(child); if (child == NULL) return (NULL); + port = device_get_ivars(child); + KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); + + if (rid == NULL || *rid != 0) + return (NULL); + /* We only support default allocations. */ - if (*rid != 0 || start != 0UL || end != ~0UL) + if (start != 0UL || end != ~0UL) + return (NULL); + + if (type == port->p_bar->b_type) + res = port->p_rres; + else if (type == SYS_RES_IRQ) + res = port->p_ires; + else return (NULL); - port = device_get_ivars(child); - if (port->p_res == NULL) + if (res == NULL) return (NULL); - if (rman_get_device(port->p_res) == dev) - rman_set_device(port->p_res, child); - else if (rman_get_device(port->p_res) != child) + + assigned = rman_get_device(res); + if (assigned == dev) /* Not allocated */ + rman_set_device(res, originator); + else if (assigned != originator) return (NULL); - fl = rman_get_flags(port->p_res); - if ((flags & RF_ACTIVE) != 0 && (fl & RF_ACTIVE) == 0) { - error = rman_activate_resource(port->p_res); + + if (flags & RF_ACTIVE) { + error = rman_activate_resource(res); if (error) { - rman_set_device(port->p_res, dev); + if (assigned == dev) + rman_set_device(res, dev); return (NULL); } } - return (port->p_res); + + return (res); } int -puc_release_resource(device_t dev, device_t child, int type, int rid, +puc_bus_release_resource(device_t dev, device_t child, int type, int rid, struct resource *res) { - struct puc_port *p; + struct puc_port *port; + device_t originator; /* Get our immediate child. */ + originator = child; while (child != NULL && device_get_parent(child) != dev) child = device_get_parent(child); if (child == NULL) return (EINVAL); - p = device_get_ivars(child); + port = device_get_ivars(child); + KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); + + if (rid != 0 || res == NULL) + return (EINVAL); + + if (type == port->p_bar->b_type) { + if (res != port->p_rres) + return (EINVAL); + } else if (type == SYS_RES_IRQ) { + if (res != port->p_ires) + return (EINVAL); + } else + return (EINVAL); + + if (rman_get_device(res) != originator) + return (ENXIO); + if (rman_get_flags(res) & RF_ACTIVE) + rman_deactivate_resource(res); + rman_set_device(res, dev); return (0); } int -puc_get_resource(device_t dev, device_t child, int type, int rid, +puc_bus_get_resource(device_t dev, device_t child, int type, int rid, u_long *startp, u_long *countp) { - struct puc_port *p; + struct puc_port *port; + struct resource *res; + u_long start; + /* Get our immediate child. */ while (child != NULL && device_get_parent(child) != dev) child = device_get_parent(child); if (child == NULL) return (EINVAL); - p = device_get_ivars(child); - return (ENXIO); + port = device_get_ivars(child); + KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); + + if (type == port->p_bar->b_type) + res = port->p_rres; + else if (type == SYS_RES_IRQ) + res = port->p_ires; + else + return (ENXIO); + + if (rid != 0 || res == NULL) + return (ENXIO); + + start = rman_get_start(res); + if (startp != NULL) + *startp = start; + if (countp != NULL) + *countp = rman_get_end(res) - start + 1; + return (0); } int -puc_setup_intr(device_t dev, device_t child, struct resource *r, int flags, - void (*ihand)(void *), void *arg, void **cookiep) +puc_bus_setup_intr(device_t dev, device_t child, struct resource *res, + int flags, void (*ihand)(void *), void *arg, void **cookiep) { - struct puc_port *p; + struct puc_port *port; + struct puc_softc *sc; + device_t originator; + + sc = device_get_softc(dev); + /* Get our immediate child. */ + originator = child; while (child != NULL && device_get_parent(child) != dev) child = device_get_parent(child); if (child == NULL) return (EINVAL); - p = device_get_ivars(child); - return (ENXIO); + port = device_get_ivars(child); + KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); + + if (ihand == NULL || cookiep == NULL || res != port->p_ires) + return (EINVAL); + if (rman_get_device(port->p_ires) != originator) + return (ENXIO); + + return (0); } int -puc_teardown_intr(device_t dev, device_t child, struct resource *r, +puc_bus_teardown_intr(device_t dev, device_t child, struct resource *res, void *cookie) { - struct puc_port *p; + struct puc_port *port; + device_t originator; + /* Get our immediate child. */ + originator = child; while (child != NULL && device_get_parent(child) != dev) child = device_get_parent(child); if (child == NULL) return (EINVAL); - p = device_get_ivars(child); + port = device_get_ivars(child); + KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); + + if (res == NULL || cookie == NULL) + return (EINVAL); + return (ENXIO); } int -puc_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) +puc_bus_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) { struct puc_port *port; @@ -380,6 +501,10 @@ return (EINVAL); port = device_get_ivars(child); + KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); + + if (result == NULL) + return (EINVAL); switch(index) { case PUC_IVAR_CLOCK: ==== //depot/projects/uart/dev/puc/puc_pccard.c#4 (text+ko) ==== @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD: src/sys/dev/puc/puc_pccard.c,v 1.9 2004/05/30 20:08:38 phk Exp $"); -#include "opt_puc.h" - #include #include #include @@ -41,25 +39,19 @@ #include #include -#define PUC_ENTRAILS 1 -#include - -#include #include -const struct puc_device_description rscom_devices = { +#include +#include +/* http://www.argosy.com.tw/product/sp320.htm */ +const struct puc_cfg puc_pccard_rscom = { + 0, 0, 0, 0, "ARGOSY SP320 Dual port serial PCMCIA", - /* http://www.argosy.com.tw/product/sp320.htm */ - { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, - { - { PUC_PORT_TYPE_COM, 0x0, 0x00, DEFAULT_RCLK, 0x100000 }, - { PUC_PORT_TYPE_COM, 0x1, 0x00, DEFAULT_RCLK, 0 }, - } + DEFAULT_RCLK, + PUC_PORT_2S, 0, 1, 0, }; - static int puc_pccard_probe(device_t dev) { @@ -72,39 +64,31 @@ error = pccard_get_product_str(dev, &product); if (error) return(error); - if (!strcmp(vendor, "PCMCIA") && !strcmp(product, "RS-COM 2P")) { - device_set_desc(dev, rscom_devices.name); - return (0); - } + if (!strcmp(vendor, "PCMCIA") && !strcmp(product, "RS-COM 2P")) + return (puc_bfe_probe(dev, &puc_pccard_rscom)); return (ENXIO); } -static int -puc_pccard_attach(device_t dev) -{ - - return (puc_attach(dev, &rscom_devices)); -} - static device_method_t puc_pccard_methods[] = { /* Device interface */ DEVMETHOD(device_probe, puc_pccard_probe), - DEVMETHOD(device_attach, puc_pccard_attach), + DEVMETHOD(device_attach, puc_bfe_attach), + DEVMETHOD(device_detach, puc_bfe_detach), - DEVMETHOD(bus_alloc_resource, puc_alloc_resource), - DEVMETHOD(bus_release_resource, puc_release_resource), - DEVMETHOD(bus_get_resource, puc_get_resource), - DEVMETHOD(bus_read_ivar, puc_read_ivar), - DEVMETHOD(bus_setup_intr, puc_setup_intr), - DEVMETHOD(bus_teardown_intr, puc_teardown_intr), + DEVMETHOD(bus_alloc_resource, puc_bus_alloc_resource), + DEVMETHOD(bus_release_resource, puc_bus_release_resource), + DEVMETHOD(bus_get_resource, puc_bus_get_resource), + DEVMETHOD(bus_read_ivar, puc_bus_read_ivar), + DEVMETHOD(bus_setup_intr, puc_bus_setup_intr), + DEVMETHOD(bus_teardown_intr, puc_bus_teardown_intr), DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_driver_added, bus_generic_driver_added), { 0, 0 } }; static driver_t puc_pccard_driver = { - "puc", + puc_driver_name, puc_pccard_methods, sizeof(struct puc_softc), }; ==== //depot/projects/uart/dev/puc/puc_pci.c#12 (text+ko) ==== @@ -75,10 +75,8 @@ #include #include +#include #include -#include - -extern const struct puc_cfg puc_devices[]; static const struct puc_cfg * puc_pci_match(device_t dev, const struct puc_cfg *desc) @@ -111,23 +109,24 @@ if ((pci_read_config(dev, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) != 0) return (ENXIO); - desc = puc_pci_match(dev, puc_devices); + desc = puc_pci_match(dev, puc_pci_devices); if (desc == NULL) return (ENXIO); - return (puc_probe(dev, desc)); + return (puc_bfe_probe(dev, desc)); } static device_method_t puc_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, puc_pci_probe), - DEVMETHOD(device_attach, puc_attach), + DEVMETHOD(device_attach, puc_bfe_attach), + DEVMETHOD(device_detach, puc_bfe_detach), - DEVMETHOD(bus_alloc_resource, puc_alloc_resource), - DEVMETHOD(bus_release_resource, puc_release_resource), - DEVMETHOD(bus_get_resource, puc_get_resource), - DEVMETHOD(bus_read_ivar, puc_read_ivar), - DEVMETHOD(bus_setup_intr, puc_setup_intr), - DEVMETHOD(bus_teardown_intr, puc_teardown_intr), + DEVMETHOD(bus_alloc_resource, puc_bus_alloc_resource), + DEVMETHOD(bus_release_resource, puc_bus_release_resource), + DEVMETHOD(bus_get_resource, puc_bus_get_resource), + DEVMETHOD(bus_read_ivar, puc_bus_read_ivar), + DEVMETHOD(bus_setup_intr, puc_bus_setup_intr), + DEVMETHOD(bus_teardown_intr, puc_bus_teardown_intr), DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_driver_added, bus_generic_driver_added), { 0, 0 } ==== //depot/projects/uart/dev/puc/pucdata.c#23 (text+ko) ==== @@ -49,7 +49,7 @@ static puc_query_f puc_query_siig; static puc_query_f puc_query_titan; -const struct puc_cfg puc_devices[] = { +const struct puc_cfg puc_pci_devices[] = { { 0x0009, 0x7168, 0xffff, 0, "Sunix SUN1889", From owner-p4-projects@FreeBSD.ORG Tue Apr 18 01:32:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5A52E16A40B; Tue, 18 Apr 2006 01:32:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF9C716A402 for ; Tue, 18 Apr 2006 01:32:41 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A424D43D45 for ; Tue, 18 Apr 2006 01:32:41 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I1Wf7u022669 for ; Tue, 18 Apr 2006 01:32:41 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I1WfQw022660 for perforce@freebsd.org; Tue, 18 Apr 2006 01:32:41 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 01:32:41 GMT Message-Id: <200604180132.k3I1WfQw022660@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95466 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 01:32:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=95466 Change 95466 by jb@jb_freebsd2 on 2006/04/18 01:31:42 I don't quite understand how this code can work in OpenSolaris! The copy function pointer passed to strtab_write is cast as returning a value when neither function actually does. I guess that gcc must be behaving differently to Sun's compiler which must just happen to be leaving the number of bytes copied on the stack or in a register where the calling function can pick it up from the place where the value would be returned if the function was actually coded to return a value. For this change, type define a function prototype and don't cast the value passed so that the compiler can check that the prototype is correct. Because of the style of the code, the last argument passed to the function has to be cast. There is no way around that. This makes ctfmerge work in FreeBSD. Yippee. To the Sun engineers reading these messages: OK, you might not like my submit messages here, but this one really is about a bug. Please don't allow your distaste for my general code standards compliance comments to get in the way of you fixing this bug. Casting function pointers so that the compiler can't check them is a really BAD idea. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctf.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/strtab.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/strtab.h#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctf.c#3 (text) ==== @@ -458,10 +458,11 @@ parseterminate("zlib start failed: %s", zError(rc)); } -static void -compress_buffer(caddr_t buf, size_t n, resbuf_t *rb) +static ssize_t +compress_buffer(void *buf, size_t n, void *arg) { int rc; + resbuf_t *rb = (resbuf_t *) arg; rb->rb_zstr.next_out = (Bytef *)rb->rb_ptr; rb->rb_zstr.avail_out = rb->rb_size - (rb->rb_ptr - rb->rb_base); @@ -476,6 +477,7 @@ parseterminate("zlib deflate failed: %s", zError(rc)); } rb->rb_ptr = (caddr_t)rb->rb_zstr.next_out; + return n; } static void @@ -524,11 +526,13 @@ } } -static void -bcopy_data(void *buf, size_t n, caddr_t *posp) +static ssize_t +bcopy_data(void *buf, size_t n, void *arg) { + caddr_t *posp = (caddr_t *) arg; bcopy(buf, *posp, n); *posp += n; + return n; } static caddr_t @@ -544,8 +548,8 @@ bcopy_data(h, sizeof (ctf_header_t), &bufpos); bcopy_data(buf->ctb_base, buf->ctb_ptr - buf->ctb_base, &bufpos); - if (strtab_write(&buf->ctb_strtab, (ssize_t (*)())bcopy_data, - &bufpos) < 0) + if (strtab_write(&buf->ctb_strtab, bcopy_data, + (void *) &bufpos) < 0) terminate("strtab_write failed\n"); *resszp = bufpos - outbuf; return (outbuf); @@ -569,8 +573,8 @@ compress_start(&resbuf); compress_buffer(buf->ctb_base, buf->ctb_ptr - buf->ctb_base, &resbuf); compress_flush(&resbuf, Z_FULL_FLUSH); - if (strtab_write(&buf->ctb_strtab, (ssize_t (*)())compress_buffer, - &resbuf) < 0) + if (strtab_write(&buf->ctb_strtab, compress_buffer, + (void *) &resbuf) < 0) terminate("strtab_write failed\n"); compress_end(&resbuf); ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/strtab.c#3 (text) ==== @@ -210,7 +210,7 @@ ssize_t strtab_write(const strtab_t *sp, - ssize_t (*func)(const void *, size_t, void *), void *priv) + STRTAB_COPY_FUNC func, void *priv) { ssize_t res, total = 0; ulong_t i; ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/strtab.h#2 (text) ==== @@ -54,12 +54,14 @@ size_t str_size; /* total size of strings in bytes */ } strtab_t; +typedef ssize_t STRTAB_COPY_FUNC(void *, size_t, void *); + extern void strtab_create(strtab_t *); extern void strtab_destroy(strtab_t *); extern size_t strtab_insert(strtab_t *, const char *); extern size_t strtab_size(const strtab_t *); extern ssize_t strtab_write(const strtab_t *, - ssize_t (*)(const void *, size_t, void *), void *); + STRTAB_COPY_FUNC, void *); extern void strtab_print(const strtab_t *); #ifdef __cplusplus From owner-p4-projects@FreeBSD.ORG Tue Apr 18 02:58:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E38CC16A40A; Tue, 18 Apr 2006 02:58:27 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CA0316A406 for ; Tue, 18 Apr 2006 02:58:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E4B443D48 for ; Tue, 18 Apr 2006 02:58:26 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I2wPk8070233 for ; Tue, 18 Apr 2006 02:58:26 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I2wPbq070221 for perforce@freebsd.org; Tue, 18 Apr 2006 02:58:25 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 02:58:25 GMT Message-Id: <200604180258.k3I2wPbq070221@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95467 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 02:58:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=95467 Change 95467 by jb@jb_freebsd2 on 2006/04/18 02:57:37 Install bsd.dtrace.mk Affected files ... .. //depot/projects/dtrace/src/share/mk/Makefile#2 edit Differences ... ==== //depot/projects/dtrace/src/share/mk/Makefile#2 (text+ko) ==== @@ -3,7 +3,7 @@ FILES= bsd.README FILES+= bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.endian.mk -FILES+= bsd.files.mk bsd.incs.mk bsd.info.mk bsd.init.mk +FILES+= bsd.dtrace.mk bsd.files.mk bsd.incs.mk bsd.info.mk bsd.init.mk FILES+= bsd.kmod.mk FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk FILES+= bsd.obj.mk bsd.own.mk From owner-p4-projects@FreeBSD.ORG Tue Apr 18 02:59:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AFFF616A406; Tue, 18 Apr 2006 02:59:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7742D16A402 for ; Tue, 18 Apr 2006 02:59:28 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F65C43D46 for ; Tue, 18 Apr 2006 02:59:28 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I2xSS7071019 for ; Tue, 18 Apr 2006 02:59:28 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I2xRdV071013 for perforce@freebsd.org; Tue, 18 Apr 2006 02:59:27 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 02:59:27 GMT Message-Id: <200604180259.k3I2xRdV071013@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95468 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 02:59:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=95468 Change 95468 by jb@jb_freebsd2 on 2006/04/18 02:58:29 Change the link library order. Affected files ... .. //depot/projects/dtrace/src/cddl/usr.bin/ctfmerge/Makefile#2 edit Differences ... ==== //depot/projects/dtrace/src/cddl/usr.bin/ctfmerge/Makefile#2 (text+ko) ==== @@ -37,7 +37,7 @@ LDFLAGS+= -pthread -LDADD+= -lctf -lelf -ldwarf -lz +LDADD+= -lctf -ldwarf -lelf -lz .PATH: ${.CURDIR}/../ctfconvert .PATH: ${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common From owner-p4-projects@FreeBSD.ORG Tue Apr 18 03:01:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B84716A405; Tue, 18 Apr 2006 03:01:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B27E116A401 for ; Tue, 18 Apr 2006 03:01:31 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E69F43D45 for ; Tue, 18 Apr 2006 03:01:31 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I31Vs6072570 for ; Tue, 18 Apr 2006 03:01:31 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I31UCH072557 for perforce@freebsd.org; Tue, 18 Apr 2006 03:01:30 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 03:01:30 GMT Message-Id: <200604180301.k3I31UCH072557@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95469 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 03:01:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=95469 Change 95469 by jb@jb_freebsd2 on 2006/04/18 03:01:16 Move the CTF definitions into sys.mk and add the ones for CTFMERGE. This means that more cases are added by default because sys.mk is always included by BSD make by default. The side effect (I think) is that ports which use the BSD make are going to get CTF symbols whether they like it or not. Obviously the ports don't know to specify NO_CTF to make. Affected files ... .. //depot/projects/dtrace/src/share/mk/bsd.lib.mk#3 edit .. //depot/projects/dtrace/src/share/mk/bsd.prog.mk#3 edit .. //depot/projects/dtrace/src/share/mk/sys.mk#3 edit Differences ... ==== //depot/projects/dtrace/src/share/mk/bsd.lib.mk#3 (text+ko) ==== @@ -4,18 +4,6 @@ .include -# C Type Format data is required for DTrace -CTFFLAGS=-L VERSION - -.if !defined(NO_CTF) -CTFCONVERT?=ctfconvert -.if defined(DEBUG_FLAGS) -CTFFLAGS+=-g -.else -DEBUG_FLAGS=-g -.endif -.endif - # Set up the variables controlling shared libraries. After this section, # SHLIB_NAME will be defined only if we are to create a shared library. # SHLIB_LINK will be defined only if we are to create a link to it. ==== //depot/projects/dtrace/src/share/mk/bsd.prog.mk#3 (text+ko) ==== @@ -10,18 +10,6 @@ CFLAGS+=${COPTS} .endif -# C Type Format data is required for DTrace -CTFFLAGS=-L VERSION - -.if !defined(NO_CTF) -CTFCONVERT?=ctfconvert -.if defined(DEBUG_FLAGS) -CTFFLAGS+=-g -.else -DEBUG_FLAGS=-g -.endif -.endif - .if defined(DEBUG_FLAGS) CFLAGS+=${DEBUG_FLAGS} .endif @@ -59,6 +47,9 @@ .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif +.if defined(CTFMERGE) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.endif .else # !defined(SRCS) @@ -82,6 +73,9 @@ .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif +.if defined(CTFMERGE) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.endif .endif .endif ==== //depot/projects/dtrace/src/share/mk/sys.mk#3 (text+ko) ==== @@ -40,6 +40,19 @@ CFLAGS ?= -O2 -fno-strict-aliasing -pipe .endif +# C Type Format data is required for DTrace +CTFFLAGS ?= -L VERSION + +.if !defined(NO_CTF) +CTFCONVERT ?= ctfconvert +CTFMERGE ?= ctfmerge +.if defined(DEBUG_FLAGS) +CTFFLAGS += -g +.else +DEBUG_FLAGS = -g +.endif +.endif + CXX ?= c++ CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes} @@ -286,22 +299,34 @@ .s.out .c.out .o.out: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f.out .F.out .r.out .e.out: ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \ ${LDLIBS} -o ${.TARGET} rm -f ${.PREFIX}.o +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif # XXX not -j safe .y.out: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} rm -f y.tab.c +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .l.out: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET} rm -f ${.PREFIX}.tmp.c +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif # FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef. __MAKE_CONF?=/etc/make.conf From owner-p4-projects@FreeBSD.ORG Tue Apr 18 03:13:48 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C018416A404; Tue, 18 Apr 2006 03:13:48 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 681C716A400 for ; Tue, 18 Apr 2006 03:13:48 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DD9243D46 for ; Tue, 18 Apr 2006 03:13:48 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I3DlQg078277 for ; Tue, 18 Apr 2006 03:13:47 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I3Dllp078262 for perforce@freebsd.org; Tue, 18 Apr 2006 03:13:47 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 03:13:47 GMT Message-Id: <200604180313.k3I3Dllp078262@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95470 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 03:13:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=95470 Change 95470 by jb@jb_freebsd2 on 2006/04/18 03:13:20 libavl isn't required at this stage. I chose to just compile the single file into sgsmsg so that it didn't need to have it's own library. Affected files ... .. //depot/projects/dtrace/src/cddl/lib/Makefile#2 edit Differences ... ==== //depot/projects/dtrace/src/cddl/lib/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= libavl libctf libdtrace libelf +SUBDIR= libctf libdtrace libelf .include From owner-p4-projects@FreeBSD.ORG Tue Apr 18 04:41:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C0BAF16A404; Tue, 18 Apr 2006 04:41:21 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A3D416A401 for ; Tue, 18 Apr 2006 04:41:21 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C1B643D55 for ; Tue, 18 Apr 2006 04:41:20 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I4fJBL028117 for ; Tue, 18 Apr 2006 04:41:19 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I4fJ4n028102 for perforce@freebsd.org; Tue, 18 Apr 2006 04:41:19 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 04:41:19 GMT Message-Id: <200604180441.k3I4fJ4n028102@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95475 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 04:41:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=95475 Change 95475 by imp@imp_hammer on 2006/04/18 04:41:17 Move eeprom goo to the library. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#7 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.h#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/Makefile#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/arm_init.s#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/array_bytes.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/at91rm9200_lowlevel.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/at91rm9200_lowlevel.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/debug_io.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/debug_io.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/eeprom.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/eeprom.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/emac.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/emac.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/flash.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/flash.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/irda.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/lcd.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/lcd.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/led.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/led.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/linker.cfg#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/main.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/ohci.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/p_string.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/p_string.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/processor.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/processor.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/prompt.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/prompt.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/spi_flash.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/spi_flash.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/stage1.bin#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/test_uhp.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/twsi.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/xmodem.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/xmodem.h#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#3 (text+ko) ==== @@ -2,7 +2,7 @@ LIB= at91 INTERNALLIB= -SRCS=at91rm9200_lowlevel.c getc.c putchar.c printf.c xmodem.c +SRCS=at91rm9200_lowlevel.c eeprom.c getc.c putchar.c printf.c xmodem.c NO_MAN= .include ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#5 (text) ==== @@ -29,7 +29,15 @@ int getc(int); void putchar(int); +void printf(const char *fmt,...); + +/* The following function write eeprom at ee_addr using data */ +/* from data_add for size bytes. */ +void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size); +void WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size); +void InitEEPROM(void); + +/* XMODEM protocol */ int xmodem_rx(char *dst); -void printf(const char *fmt,...); #endif ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/Makefile#2 (text+ko) ==== @@ -1,97 +1,13 @@ -#/****************************************************************************** -# * -# * Filename: Makefile -# * -# * Classic makefile intended for use in gnu environment. The entries listed -# * here are intentionally simple to aid the novice user in his/her own -# * development - for easy modification. -# * -# * Revision information: -# * -# * 20SEP2004 kb_admin initial creation -# * -# * BEGIN_KBDD_BLOCK -# * No warranty, expressed or implied, is included with this software. It is -# * provided "AS IS" and no warranty of any kind including statutory or aspects -# * relating to merchantability or fitness for any purpose is provided. All -# * intellectual property rights of others is maintained with the respective -# * owners. This software is not copyrighted and is intended for reference -# * only. -# * END_BLOCK -# ****************************************************************************** -# +# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.1 2006/04/12 21:22:44 imp Exp $ -SHELL = /bin/sh +P=bootiic +FILES=${P} +SRCS=arm_init.s main.c eeprom.c \ + env_vars.c loader_prompt.c p_string.c emac.c \ + flash.c test_uhp.c twsi.c idra.c spi_flash.c processor.c lcd.c \ + led.c prompt.c +NO_MAN= +LDFLAGS=-e 0 -T linker.cfg +OBJS+= ${SRCS:N*.h:R:S/$/.o/g} -basetoolsdir = /usr/local/arm -bindir = ${basetoolsdir}/bin -libdir = ${basetoolsdir}/lib/gcc/arm-linux/3.4.2 - -CC = cc ${CFLAGS} -AS = as -LD = ld -OBJCOPY = objcopy -CFLAGS=-O2 -mcpu=arm9 -ffreestanding - -CFILES = main.o debug_io.o at91rm9200_lowlevel.o p_string.o xmodem.o eeprom.o flash.o emac.o test_uhp.o twsi.o irda.o spi_flash.o processor.o lcd.o led.o prompt.o -ASFILES = arm_init.o -LIBS=divdi3.o qdivrem.o udivdi3.o divsi3.o moddi3.o umoddi3.o - - -ramMonitor: ${CFILES} ${ASFILES} ${LIBS} - ${LD} -e 0 -o ramMonitor.out -T linker.cfg ${ASFILES} ${CFILES} ${LIBS} - ${OBJCOPY} -O binary ramMonitor.out ramMonitor.bin - -main.o: main.c - ${CC} -c $? - -debug_io.o: debug_io.c - ${CC} -c $? - -at91rm9200_lowlevel.o: at91rm9200_lowlevel.c - ${CC} -c $? - -prompt.o: prompt.c - ${CC} -c $? - -p_string.o: p_string.c - ${CC} -c $? - -xmodem.o: xmodem.c - ${CC} -c $? - -eeprom.o: eeprom.c - ${CC} -c $? - -flash.o: flash.c - ${CC} -c $? - -emac.o: emac.c - ${CC} -c $? - -test_uhp.o: test_uhp.c - ${CC} -c $? - -twsi.o: twsi.c - ${CC} -c $? - -irda.o: irda.c - ${CC} -c $? - -spi_flash.o: spi_flash.c - ${CC} -c $? - -processor.o: processor.c - ${CC} -c $? - -lcd.o: lcd.c - ${CC} -c $? - -led.o: led.c - ${CC} -c $? - -arm_init.o: arm_init.s - ${AS} -o $@ $? - -clean: - rm -f *.o +.include ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/arm_init.s#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/array_bytes.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/at91rm9200_lowlevel.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/at91rm9200_lowlevel.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/debug_io.c#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/debug_io.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/eeprom.c#2 (text+ko) ==== @@ -48,8 +48,9 @@ * This function does not utilize the page read mode to simplify the code. * .KB_C_FN_DEFINITION_END */ -void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size) { - +void +ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size) +{ const AT91PS_TWI twiPtr = AT91C_BASE_TWI; unsigned int status; ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/eeprom.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/emac.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/emac.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/flash.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/flash.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/irda.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/lcd.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/lcd.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/led.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/led.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/linker.cfg#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/main.c#2 (text+ko) ==== @@ -22,15 +22,21 @@ * END_BLOCK ******************************************************************************/ +#include "at91rm9200_lowlevel.h" #include "debug_io.h" -#include "at91rm9200_lowlevel.h" -#include "prompt.h" #include "eeprom.h" +#include "emac.h" #include "flash.h" -#include "spi_flash.h" +#include "irda.h" #include "lcd.h" #include "led.h" - +#include "lib.h" +#include "prompt.h" +#include "processor.h" +#include "spi_flash.h" +#include "twsi.h" +#include "uhp.h" +#include "xmodem_cmd.h" /* * .KB_C_FN_DEFINITION_START @@ -39,9 +45,10 @@ * services all future requests. * .KB_C_FN_DEFINITION_END */ -int main(void) { - - DebugPrint("\n\rEntry: RAM Monitor v1.3.0\n\r"); +int +main(void) +{ + printf("\r\nEntry: RAM Monitor v1.3.0\r\n"); InitPrompt(); ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/ohci.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/p_string.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/p_string.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/processor.c#2 (text+ko) ==== @@ -21,6 +21,7 @@ #include "processor.h" #include "AT91RM9200.h" #include "prompt.h" +#include "lib.h" /* ****************************** GLOBALS *************************************/ @@ -41,6 +42,76 @@ /* * .KB_C_FN_DEFINITION_START + * void ReadMem(unsigned address, unsigned length, unsigned size) + * This global function displays a block of memory in size increments. + * .KB_C_FN_DEFINITION_END + */ +static void +ReadMem(unsigned address, unsigned length, unsigned size) +{ + unsigned i, perLine, v; + + perLine = 16 / size; + + while (length) { + i = perLine; + + if (length < 16) { + i = (length/size); + length = 0; + } else { + length -= 16; + } + + printf("\r\n(R)0x%x : ", address); + + while (i--) { + switch (size) { + case 1: + v = *(unsigned char*)address; + address += 1; + break; + case 2: + v = *(unsigned short*)address; + address += 2; + break; + case 4: + v = *(unsigned*)address; + address += 4; + break; + default: + return ; + } + printf("0x%x ", v); + } + } +} + + +/* + * .KB_C_FN_DEFINITION_START + * void WriteMem(unsigned address, unsigned size, unsigned value) + * This global function writes value at address using size width. + * .KB_C_FN_DEFINITION_END + */ +static void +WriteMem(unsigned address, unsigned size, unsigned value) +{ + switch(size) { + case 1: + *(char*)address = (char)(value & 0xFF); + break; + case 2: + *(unsigned short*)address = (unsigned short)(value & 0xFFFF); + break; + case 4: + *(unsigned*)address = value; + break; + } +} + +/* + * .KB_C_FN_DEFINITION_START * int compare_parse(int argc, char *argv[]) * This global function parses text from the command line. * .KB_C_FN_DEFINITION_END ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/processor.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/prompt.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/prompt.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/spi_flash.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/spi_flash.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/stage1.bin#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/test_uhp.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/twsi.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/xmodem.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/ramMonitor/xmodem.h#2 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Tue Apr 18 04:44:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BBBC916A404; Tue, 18 Apr 2006 04:44:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97D9116A401 for ; Tue, 18 Apr 2006 04:44:24 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5934843D45 for ; Tue, 18 Apr 2006 04:44:24 +0000 (GMT) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I4iOtJ029687 for ; Tue, 18 Apr 2006 04:44:24 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I4iNNS029684 for perforce@freebsd.org; Tue, 18 Apr 2006 04:44:23 GMT (envelope-from csjp@freebsd.org) Date: Tue, 18 Apr 2006 04:44:23 GMT Message-Id: <200604180444.k3I4iNNS029684@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 95476 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 04:44:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95476 Change 95476 by csjp@csjp_xor on 2006/04/18 04:43:39 - Add to the openbsm programming API and introduce the audit_submit(3) in raw form. This is the first stab at things, so it's possible that things might change from here. - A sample implementation might be as follows: int audit_bad_su(char *from_login, char *to_login) { int error; error = audit_submit(AUE_su, getuid(), 1, EPERM, "bad su from %s to %s", from_login, to_login); return (error); } Will generate the followng audit record: header,94,1,su(1),0,Mon Apr 17 23:23:59 2006, + 271 msec subject,root,root,wheel,root,wheel,652,652,0,0.0.0.0 text,bad su from from csjp to root return,failure : Operation not permitted,1 trailer,94 This function will be very useful for the on-going userspace integration of the audit code, and hopefully this little helper function can be used to prevent a lot of code replication. Discussed with: rwatson, wsalamon Affected files ... .. //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#19 edit .. //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#1 add .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#21 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#19 (text+ko) ==== @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#18 $ + * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#19 $ */ #ifndef _LIBBSM_H_ @@ -695,6 +695,9 @@ typedef struct tokenstr tokenstr_t; +int audit_submit(short au_event, au_id_t au_ctx, + char status, int reterr, const char *fmt, ...); + /* * Functions relating to querying audit class information. */ ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#21 (text+ko) ==== @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#20 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#21 $ */ #ifdef __APPLE__ @@ -46,6 +46,7 @@ #include #include +#include #include #include @@ -53,6 +54,110 @@ int audit_set_terminal_port(dev_t *p); int audit_set_terminal_host(uint32_t *m); +/* + * General purpose audit submission mechanism for userspace. + */ +int +audit_submit(short au_event, au_id_t au_ctx, char status, + int reterr, const char *fmt, ...) +{ + char text[MAX_AUDITSTRING_LEN]; + au_tid_t termid; + token_t *token; + long acond; + va_list ap; + pid_t pid; + int error, afd; + + if (auditon(A_GETCOND, &acond, sizeof(acond)) < 0) { + /* + * If auditon(2) returns ENOSYS, then audit has not been + * compiled into the kernel, so just return. + */ + if (errno == ENOSYS) + return (0); + error = errno; + syslog(LOG_AUTH | LOG_ERR, "audit: auditon failed: %s", + strerror(errno)); + errno = error; + return (-1); + } + if (acond == AUC_NOAUDIT) + return (0); + afd = au_open(); + if (afd < 0) { + error = errno; + syslog(LOG_AUTH | LOG_ERR, "audit: au_open failed: %s", + strerror(errno)); + errno = error; + return (-1); + } + /* XXX what should we do for termid? */ + bzero(&termid, sizeof(termid)); + pid = getpid(); + token = au_to_subject32(au_ctx, geteuid(), getegid(), + getuid(), getgid(), pid, pid, &termid); + if (token == NULL) { + syslog(LOG_AUTH | LOG_ERR, + "audit: unable to build subject token"); + (void) au_close(afd, AU_TO_NO_WRITE, au_event); + errno = EPERM; + return (-1); + } + if (au_write(afd, token) < 0) { + error = errno; + syslog(LOG_AUTH | LOG_ERR, + "audit: au_write failed: %s", strerror(errno)); + (void) au_close(afd, AU_TO_NO_WRITE, au_event); + errno = error; + return (-1); + } + if (fmt != NULL) { + va_start(ap, fmt); + (void) vsnprintf(text, MAX_AUDITSTRING_LEN, fmt, ap); + va_end(ap); + token = au_to_text(text); + if (token == NULL) { + syslog(LOG_AUTH | LOG_ERR, + "audit: failed to generate text token"); + (void) au_close(afd, AU_TO_NO_WRITE, au_event); + errno = EPERM; + return (-1); + } + if (au_write(afd, token) < 0) { + error = errno; + syslog(LOG_AUTH | LOG_ERR, + "audit: au_write failed: %s", strerror(errno)); + (void) au_close(afd, AU_TO_NO_WRITE, au_event); + errno = error; + return (-1); + } + } + token = au_to_return32(status, reterr); + if (token == NULL) { + syslog(LOG_AUTH | LOG_ERR, + "audit: enable to build return token"); + (void) au_close(afd, AU_TO_NO_WRITE, au_event); + errno = EPERM; + return (-1); + } + if (au_write(afd, token) < 0) { + error = errno; + syslog(LOG_AUTH | LOG_ERR, + "audit: au_write failed: %s", strerror(errno)); + (void) au_close(afd, AU_TO_NO_WRITE, au_event); + errno = error; + return (-1); + } + if (au_close(afd, AU_TO_WRITE, au_event) < 0) { + error = errno; + syslog(LOG_AUTH | LOG_ERR, "audit: record not committed"); + errno = error; + return (-1); + } + return (0); +} + int audit_set_terminal_port(dev_t *p) { From owner-p4-projects@FreeBSD.ORG Tue Apr 18 04:45:26 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B7E1016A404; Tue, 18 Apr 2006 04:45:26 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D97A16A400 for ; Tue, 18 Apr 2006 04:45:26 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F47843D46 for ; Tue, 18 Apr 2006 04:45:26 +0000 (GMT) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I4jPcw029842 for ; Tue, 18 Apr 2006 04:45:25 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I4jPjH029839 for perforce@freebsd.org; Tue, 18 Apr 2006 04:45:25 GMT (envelope-from csjp@freebsd.org) Date: Tue, 18 Apr 2006 04:45:25 GMT Message-Id: <200604180445.k3I4jPjH029839@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 95477 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 04:45:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=95477 Change 95477 by csjp@csjp_xor on 2006/04/18 04:45:14 Include the right header files so the example code actually compiles Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#2 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#2 (text+ko) ==== @@ -39,9 +39,11 @@ .Bd -literal -offset indent #include #include +#include #include #include +#include int audit_bad_su(char *from_login, char *to_login) From owner-p4-projects@FreeBSD.ORG Tue Apr 18 05:56:54 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 75BD616A401; Tue, 18 Apr 2006 05:56:54 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A02016A402 for ; Tue, 18 Apr 2006 05:56:54 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0C9743D48 for ; Tue, 18 Apr 2006 05:56:53 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I5urZN076589 for ; Tue, 18 Apr 2006 05:56:53 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I5urRL076583 for perforce@freebsd.org; Tue, 18 Apr 2006 05:56:53 GMT (envelope-from marcel@freebsd.org) Date: Tue, 18 Apr 2006 05:56:53 GMT Message-Id: <200604180556.k3I5urRL076583@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 Cc: Subject: PERFORCE change 95480 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 05:56:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=95480 Change 95480 by marcel@marcel_nfs on 2006/04/18 05:55:54 o Implement puc_bus_setup_intr() o Implement puc_bus_teardown_intr() Affected files ... .. //depot/projects/uart/dev/puc/puc.c#25 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#25 (text+ko) ==== @@ -56,6 +56,10 @@ int p_type; int p_rclk; + int p_hasintr:1; + int p_fastintr:1; + int p_giantintr:1; + driver_intr_t *p_ih; serdev_intr_t *p_ihsrc[PUC_ISRCCNT]; void *p_iharg; @@ -392,6 +396,8 @@ } else if (type == SYS_RES_IRQ) { if (res != port->p_ires) return (EINVAL); + if (port->p_hasintr) + return (EBUSY); } else return (EINVAL); @@ -445,6 +451,7 @@ struct puc_port *port; struct puc_softc *sc; device_t originator; + int i, isrc; sc = device_get_softc(dev); @@ -463,6 +470,36 @@ if (rman_get_device(port->p_ires) != originator) return (ENXIO); + /* + * If one of our children doesn't have a fast interrupt handler, + * downgrade our interrupt handler from a fast handler to a + * MP safe handler. We acquire giant on a need to have basis. + */ + if (sc->sc_fastintr && !(flags & INTR_FAST)) { + sc->sc_fastintr = 0; + bus_teardown_intr(dev, sc->sc_ires, sc->sc_icookie); + bus_setup_intr(dev, sc->sc_ires, INTR_TYPE_TTY | INTR_MPSAFE, + puc_intr, sc, &sc->sc_icookie); + } + + port->p_hasintr = 1; + port->p_fastintr = (flags & INTR_FAST) ? 1 : 0; + port->p_giantintr = (flags & INTR_MPSAFE) ? 0 : 1; + port->p_ih = ihand; + port->p_iharg = arg; + + *cookiep = originator; + + if (port->p_type == PUC_TYPE_SERIAL) { + i = 0, isrc = SER_INT_OVERRUN; + while (i < PUC_ISRCCNT) { + port->p_ihsrc[i] = SERDEV_IHAND(originator, isrc); + if (port->p_ihsrc[i] != NULL) + port->p_ih = NULL; + i++, isrc <<= 1; + } + } + return (0); } @@ -472,6 +509,7 @@ { struct puc_port *port; device_t originator; + int i; /* Get our immediate child. */ originator = child; @@ -483,8 +521,23 @@ port = device_get_ivars(child); KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); - if (res == NULL || cookie == NULL) + if (res != port->p_ires || cookie != originator) return (EINVAL); + if (rman_get_device(port->p_ires) != originator) + return (ENXIO); + if (!port->p_hasintr) + return (ENXIO); + + port->p_hasintr = 0; + port->p_fastintr = 0; + port->p_giantintr = 0; + port->p_ih = NULL; + port->p_iharg = NULL; + + if (port->p_type == PUC_TYPE_SERIAL) { + for (i = 0; i < PUC_ISRCCNT; i++) + port->p_ihsrc[i] = NULL; + } return (ENXIO); } From owner-p4-projects@FreeBSD.ORG Tue Apr 18 06:04:03 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4F43E16A404; Tue, 18 Apr 2006 06:04:03 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E35416A402 for ; Tue, 18 Apr 2006 06:04:03 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF8A643D46 for ; Tue, 18 Apr 2006 06:04:02 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I642Dj082648 for ; Tue, 18 Apr 2006 06:04:02 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I642oS082645 for perforce@freebsd.org; Tue, 18 Apr 2006 06:04:02 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 06:04:02 GMT Message-Id: <200604180604.k3I642oS082645@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95481 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 06:04:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=95481 Change 95481 by jb@jb_freebsd2 on 2006/04/18 06:03:07 Add the ctfmerge statements to merge CTF data into shared libraries. This is a significant emotional event! There are enough programs and shared libraries built automatically in 'make buildworld' to do a trace, if only there was something to actually /do/ the trace. That means it's time to get dtrace(1) working. And beyond that, the dtrace kernel device. Affected files ... .. //depot/projects/dtrace/src/share/mk/bsd.lib.mk#4 edit Differences ... ==== //depot/projects/dtrace/src/share/mk/bsd.lib.mk#4 (text+ko) ==== @@ -222,6 +222,9 @@ @${CC} ${LDFLAGS} -shared -Wl,-x \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `lorder ${SOBJS} | tsort -q` ${LDADD} +.if defined(CTFMERGE) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} +.endif .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" From owner-p4-projects@FreeBSD.ORG Tue Apr 18 06:45:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C6AAF16A408; Tue, 18 Apr 2006 06:45:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FA9316A404 for ; Tue, 18 Apr 2006 06:45:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D970743D7B for ; Tue, 18 Apr 2006 06:44:53 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I6irfQ004178 for ; Tue, 18 Apr 2006 06:44:53 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I6irKh004175 for perforce@freebsd.org; Tue, 18 Apr 2006 06:44:53 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 06:44:53 GMT Message-Id: <200604180644.k3I6irKh004175@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95484 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 06:45:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95484 Change 95484 by jb@jb_freebsd2 on 2006/04/18 06:44:15 Add the 'dtrace' device. That's what the dtrace(1) program talks to. Surprised? Affected files ... .. //depot/projects/dtrace/src/sys/conf/NOTES#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/NOTES#2 (text+ko) ==== @@ -249,6 +249,9 @@ options SLEEPQUEUE_PROFILING options TURNSTILE_PROFILING +# Dynamic Tracting (DTrace) options: +device dtrace + ##################################################################### # COMPATIBILITY OPTIONS From owner-p4-projects@FreeBSD.ORG Tue Apr 18 06:49:03 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6461216A40D; Tue, 18 Apr 2006 06:49:03 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3C7A16A404 for ; Tue, 18 Apr 2006 06:49:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E711543D73 for ; Tue, 18 Apr 2006 06:48:58 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I6mwsh004316 for ; Tue, 18 Apr 2006 06:48:58 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I6mwAJ004313 for perforce@freebsd.org; Tue, 18 Apr 2006 06:48:58 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 06:48:58 GMT Message-Id: <200604180648.k3I6mwAJ004313@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95485 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 06:49:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=95485 Change 95485 by jb@jb_freebsd2 on 2006/04/18 06:48:31 Add the basic dtrace device. I'm noting going to hack up Sun's dtrace device code because I expect that will contain too much Solaris-specific code. If we end up finding common ground, I can always trash this device and go with the sys/contrib/opensolaris one. Affected files ... .. //depot/projects/dtrace/src/sys/conf/files#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/files#3 (text+ko) ==== @@ -92,6 +92,7 @@ cam/scsi/scsi_ses.c optional ses cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ +cddl/dev/dtrace/dtrace.c optional dtrace coda/coda_fbsd.c optional vcoda coda/coda_namecache.c optional vcoda coda/coda_psdev.c optional vcoda From owner-p4-projects@FreeBSD.ORG Tue Apr 18 06:58:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DB0A616A409; Tue, 18 Apr 2006 06:58:12 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B490A16A402 for ; Tue, 18 Apr 2006 06:58:11 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6987343D46 for ; Tue, 18 Apr 2006 06:58:11 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I6wABj010781 for ; Tue, 18 Apr 2006 06:58:11 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I6wA14010775 for perforce@freebsd.org; Tue, 18 Apr 2006 06:58:10 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 06:58:10 GMT Message-Id: <200604180658.k3I6wA14010775@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95486 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 06:58:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=95486 Change 95486 by jb@jb_freebsd2 on 2006/04/18 06:57:51 Add the shell of the dtrace device. It's just something for dtrace(1) to open. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.h#1 add .. //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Tue Apr 18 09:35:05 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 048FD16A40A; Tue, 18 Apr 2006 09:35:05 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8249016A404 for ; Tue, 18 Apr 2006 09:35:04 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D6E643D6E for ; Tue, 18 Apr 2006 09:35:02 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I9Z2Fr004863 for ; Tue, 18 Apr 2006 09:35:02 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3I9Z2qa004853 for perforce@freebsd.org; Tue, 18 Apr 2006 09:35:02 GMT (envelope-from soc-andrew@freebsd.org) Date: Tue, 18 Apr 2006 09:35:02 GMT Message-Id: <200604180935.k3I9Z2qa004853@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 95489 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 09:35:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=95489 Change 95489 by soc-andrew@soc-andrew_serv on 2006/04/18 09:34:03 Add more packages to install. Not all are in the ports tree yet. They have all been submitted though Fix the installPackage target when the package file dosn't exist Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/release/Makefile#43 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/release/Makefile#43 (text+ko) ==== @@ -836,6 +836,16 @@ ROOT=${RD}/bsdinstaller/root @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-pty \ ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-filename \ + ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-app \ + ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=libaura \ + ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=libdfui \ + ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-dfui \ + ROOT=${RD}/bsdinstaller/root @touch ${RD}/bsdinstaller/root/etc/fstab @echo "sendmail_enable=\"NONE\"" > ${RD}/bsdinstaller/root/etc/rc.conf @@ -1303,7 +1313,7 @@ .if !defined(PACKAGE) @echo "PACKAGE undefined in installPackage" && exit 1 .endif - rm ${RD}/${PACKAGE}.tbz + rm -f ${RD}/${PACKAGE}.tbz ( /usr/bin/fetch -ARr -o ${RD}/${PACKAGE}.tbz \ ${PACKAGE_SITE}/${PACKAGE_DIR}/${PACKAGE}.tbz && \ pkg_add -Rf -P ${ROOT}/usr/local \ From owner-p4-projects@FreeBSD.ORG Tue Apr 18 14:51:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C1ED16A405; Tue, 18 Apr 2006 14:51:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0828A16A403 for ; Tue, 18 Apr 2006 14:51:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACC3843D46 for ; Tue, 18 Apr 2006 14:51:38 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IEpctE056816 for ; Tue, 18 Apr 2006 14:51:38 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IEpb1T056804 for perforce@freebsd.org; Tue, 18 Apr 2006 14:51:37 GMT (envelope-from jhb@freebsd.org) Date: Tue, 18 Apr 2006 14:51:37 GMT Message-Id: <200604181451.k3IEpb1T056804@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 Cc: Subject: PERFORCE change 95492 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 14:51:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=95492 Change 95492 by jhb@jhb_slimer on 2006/04/18 14:51:01 IFC @95491. Affected files ... .. //depot/projects/smpng/sys/boot/arm/at91/inc/AT91RM9200.h#2 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_cd.c#28 integrate .. //depot/projects/smpng/sys/conf/files#172 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/fil.c#21 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi.c#91 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_cmbat.c#29 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_dock.c#1 branch .. //depot/projects/smpng/sys/dev/ata/ata-queue.c#35 integrate .. //depot/projects/smpng/sys/dev/ata/ata-raid.c#47 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath.c#38 integrate .. //depot/projects/smpng/sys/dev/bge/if_bge.c#73 integrate .. //depot/projects/smpng/sys/dev/drm/drmP.h#14 integrate .. //depot/projects/smpng/sys/dev/hwpmc/hwpmc_mod.c#17 integrate .. //depot/projects/smpng/sys/dev/iicbus/iicbus.c#7 integrate .. //depot/projects/smpng/sys/dev/pccbb/pccbb.c#58 integrate .. //depot/projects/smpng/sys/dev/ppbus/lpt.c#16 integrate .. //depot/projects/smpng/sys/dev/ppbus/ppbconf.c#3 integrate .. //depot/projects/smpng/sys/dev/ppc/ppc.c#11 integrate .. //depot/projects/smpng/sys/dev/ppc/ppcvar.h#3 integrate .. //depot/projects/smpng/sys/dev/random/randomdev_soft.c#12 integrate .. //depot/projects/smpng/sys/dev/xe/if_xe.c#26 integrate .. //depot/projects/smpng/sys/geom/eli/g_eli.c#10 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#27 integrate .. //depot/projects/smpng/sys/i386/conf/NOTES#117 integrate .. //depot/projects/smpng/sys/kern/kern_clock.c#49 integrate .. //depot/projects/smpng/sys/kern/kern_intr.c#76 integrate .. //depot/projects/smpng/sys/kern/kern_module.c#18 integrate .. //depot/projects/smpng/sys/kern/kern_mutex.c#123 integrate .. //depot/projects/smpng/sys/kern/kern_poll.c#21 integrate .. //depot/projects/smpng/sys/kern/kern_rwlock.c#4 integrate .. //depot/projects/smpng/sys/kern/kern_synch.c#102 integrate .. //depot/projects/smpng/sys/kern/kern_thr.c#33 integrate .. //depot/projects/smpng/sys/kern/kern_umtx.c#24 integrate .. //depot/projects/smpng/sys/kern/sched_4bsd.c#54 integrate .. //depot/projects/smpng/sys/kern/subr_sleepqueue.c#26 integrate .. //depot/projects/smpng/sys/kern/subr_taskqueue.c#31 integrate .. //depot/projects/smpng/sys/kern/uipc_mqueue.c#7 integrate .. //depot/projects/smpng/sys/kern/vfs_cache.c#31 integrate .. //depot/projects/smpng/sys/kern/vfs_hash.c#5 integrate .. //depot/projects/smpng/sys/modules/acpi/Makefile#28 integrate .. //depot/projects/smpng/sys/modules/acpi/acpi_dock/Makefile#1 branch .. //depot/projects/smpng/sys/netinet/ip_fastfwd.c#25 integrate .. //depot/projects/smpng/sys/netinet6/in6_pcb.c#41 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/exception.S#17 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/interrupt.S#6 integrate .. //depot/projects/smpng/sys/sys/lock.h#39 integrate .. //depot/projects/smpng/sys/sys/module.h#7 integrate .. //depot/projects/smpng/sys/sys/vnode.h#73 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_softdep.c#55 integrate .. //depot/projects/smpng/sys/vm/vm_zeroidle.c#29 integrate Differences ... ==== //depot/projects/smpng/sys/boot/arm/at91/inc/AT91RM9200.h#2 (text) ==== @@ -7,7 +7,7 @@ // fitness for any particular purpose, or against the infringements of // intellectual property rights of others. // ---------------------------------------------------------------------------- -// $FreeBSD: src/sys/boot/arm/at91/inc/AT91RM9200.h,v 1.2 2006/04/13 17:34:23 imp Exp $ +// $FreeBSD: src/sys/boot/arm/at91/inc/AT91RM9200.h,v 1.3 2006/04/15 02:51:53 imp Exp $ // // File Name : AT91RM9200.h // Object : AT91RM9200 definitions @@ -39,7 +39,7 @@ // ---------------------------------------------------------------------------- #ifndef AT91RM9200_H -#define AT91RM9200_H +#define AT91RM9200_H typedef volatile unsigned int AT91_REG;// Hardware register definition @@ -321,50 +321,50 @@ } AT91S_MC, *AT91PS_MC; // -------- MC_RCR : (MC Offset: 0x0) MC Remap Control Register -------- -#define AT91C_MC_RCB (0x1u << 0) // (MC) Remap Command Bit +#define AT91C_MC_RCB (0x1u << 0) // (MC) Remap Command Bit // -------- MC_ASR : (MC Offset: 0x4) MC Abort Status Register -------- -#define AT91C_MC_UNDADD (0x1u << 0) // (MC) Undefined Addess Abort Status -#define AT91C_MC_MISADD (0x1u << 1) // (MC) Misaligned Addess Abort Status -#define AT91C_MC_MPU (0x1u << 2) // (MC) Memory protection Unit Abort Status -#define AT91C_MC_ABTSZ (0x3u << 8) // (MC) Abort Size Status -#define AT91C_MC_ABTSZ_BYTE (0x0u << 8) // (MC) Byte -#define AT91C_MC_ABTSZ_HWORD (0x1u << 8) // (MC) Half-word -#define AT91C_MC_ABTSZ_WORD (0x2u << 8) // (MC) Word -#define AT91C_MC_ABTTYP (0x3u << 10) // (MC) Abort Type Status -#define AT91C_MC_ABTTYP_DATAR (0x0u << 10) // (MC) Data Read -#define AT91C_MC_ABTTYP_DATAW (0x1u << 10) // (MC) Data Write -#define AT91C_MC_ABTTYP_FETCH (0x2u << 10) // (MC) Code Fetch -#define AT91C_MC_MST0 (0x1u << 16) // (MC) Master 0 Abort Source -#define AT91C_MC_MST1 (0x1u << 17) // (MC) Master 1 Abort Source -#define AT91C_MC_SVMST0 (0x1u << 24) // (MC) Saved Master 0 Abort Source -#define AT91C_MC_SVMST1 (0x1u << 25) // (MC) Saved Master 1 Abort Source +#define AT91C_MC_UNDADD (0x1u << 0) // (MC) Undefined Addess Abort Status +#define AT91C_MC_MISADD (0x1u << 1) // (MC) Misaligned Addess Abort Status +#define AT91C_MC_MPU (0x1u << 2) // (MC) Memory protection Unit Abort Status +#define AT91C_MC_ABTSZ (0x3u << 8) // (MC) Abort Size Status +#define AT91C_MC_ABTSZ_BYTE (0x0u << 8) // (MC) Byte +#define AT91C_MC_ABTSZ_HWORD (0x1u << 8) // (MC) Half-word +#define AT91C_MC_ABTSZ_WORD (0x2u << 8) // (MC) Word +#define AT91C_MC_ABTTYP (0x3u << 10) // (MC) Abort Type Status +#define AT91C_MC_ABTTYP_DATAR (0x0u << 10) // (MC) Data Read +#define AT91C_MC_ABTTYP_DATAW (0x1u << 10) // (MC) Data Write +#define AT91C_MC_ABTTYP_FETCH (0x2u << 10) // (MC) Code Fetch +#define AT91C_MC_MST0 (0x1u << 16) // (MC) Master 0 Abort Source +#define AT91C_MC_MST1 (0x1u << 17) // (MC) Master 1 Abort Source +#define AT91C_MC_SVMST0 (0x1u << 24) // (MC) Saved Master 0 Abort Source +#define AT91C_MC_SVMST1 (0x1u << 25) // (MC) Saved Master 1 Abort Source // -------- MC_PUIA : (MC Offset: 0x10) MC Protection Unit Area -------- -#define AT91C_MC_PROT (0x3u << 0) // (MC) Protection -#define AT91C_MC_PROT_PNAUNA 0x0u // (MC) Privilege: No Access, User: No Access -#define AT91C_MC_PROT_PRWUNA 0x1u // (MC) Privilege: Read/Write, User: No Access -#define AT91C_MC_PROT_PRWURO 0x2u // (MC) Privilege: Read/Write, User: Read Only -#define AT91C_MC_PROT_PRWURW 0x3u // (MC) Privilege: Read/Write, User: Read/Write -#define AT91C_MC_SIZE (0xFu << 4) // (MC) Internal Area Size -#define AT91C_MC_SIZE_1KB (0x0u << 4) // (MC) Area size 1KByte -#define AT91C_MC_SIZE_2KB (0x1u << 4) // (MC) Area size 2KByte -#define AT91C_MC_SIZE_4KB (0x2u << 4) // (MC) Area size 4KByte -#define AT91C_MC_SIZE_8KB (0x3u << 4) // (MC) Area size 8KByte -#define AT91C_MC_SIZE_16KB (0x4u << 4) // (MC) Area size 16KByte -#define AT91C_MC_SIZE_32KB (0x5u << 4) // (MC) Area size 32KByte -#define AT91C_MC_SIZE_64KB (0x6u << 4) // (MC) Area size 64KByte -#define AT91C_MC_SIZE_128KB (0x7u << 4) // (MC) Area size 128KByte -#define AT91C_MC_SIZE_256KB (0x8u << 4) // (MC) Area size 256KByte -#define AT91C_MC_SIZE_512KB (0x9u << 4) // (MC) Area size 512KByte -#define AT91C_MC_SIZE_1MB (0xAu << 4) // (MC) Area size 1MByte -#define AT91C_MC_SIZE_2MB (0xBu << 4) // (MC) Area size 2MByte -#define AT91C_MC_SIZE_4MB (0xCu << 4) // (MC) Area size 4MByte -#define AT91C_MC_SIZE_8MB (0xDu << 4) // (MC) Area size 8MByte -#define AT91C_MC_SIZE_16MB (0xEu << 4) // (MC) Area size 16MByte -#define AT91C_MC_SIZE_64MB (0xFu << 4) // (MC) Area size 64MByte -#define AT91C_MC_BA (0x3FFFFu << 10) // (MC) Internal Area Base Address +#define AT91C_MC_PROT (0x3u << 0) // (MC) Protection +#define AT91C_MC_PROT_PNAUNA 0x0u // (MC) Privilege: No Access, User: No Access +#define AT91C_MC_PROT_PRWUNA 0x1u // (MC) Privilege: Read/Write, User: No Access +#define AT91C_MC_PROT_PRWURO 0x2u // (MC) Privilege: Read/Write, User: Read Only +#define AT91C_MC_PROT_PRWURW 0x3u // (MC) Privilege: Read/Write, User: Read/Write +#define AT91C_MC_SIZE (0xFu << 4) // (MC) Internal Area Size +#define AT91C_MC_SIZE_1KB (0x0u << 4) // (MC) Area size 1KByte +#define AT91C_MC_SIZE_2KB (0x1u << 4) // (MC) Area size 2KByte +#define AT91C_MC_SIZE_4KB (0x2u << 4) // (MC) Area size 4KByte +#define AT91C_MC_SIZE_8KB (0x3u << 4) // (MC) Area size 8KByte +#define AT91C_MC_SIZE_16KB (0x4u << 4) // (MC) Area size 16KByte +#define AT91C_MC_SIZE_32KB (0x5u << 4) // (MC) Area size 32KByte +#define AT91C_MC_SIZE_64KB (0x6u << 4) // (MC) Area size 64KByte +#define AT91C_MC_SIZE_128KB (0x7u << 4) // (MC) Area size 128KByte +#define AT91C_MC_SIZE_256KB (0x8u << 4) // (MC) Area size 256KByte +#define AT91C_MC_SIZE_512KB (0x9u << 4) // (MC) Area size 512KByte +#define AT91C_MC_SIZE_1MB (0xAu << 4) // (MC) Area size 1MByte +#define AT91C_MC_SIZE_2MB (0xBu << 4) // (MC) Area size 2MByte +#define AT91C_MC_SIZE_4MB (0xCu << 4) // (MC) Area size 4MByte +#define AT91C_MC_SIZE_8MB (0xDu << 4) // (MC) Area size 8MByte +#define AT91C_MC_SIZE_16MB (0xEu << 4) // (MC) Area size 16MByte +#define AT91C_MC_SIZE_64MB (0xFu << 4) // (MC) Area size 64MByte +#define AT91C_MC_BA (0x3FFFFu << 10) // (MC) Internal Area Base Address // -------- MC_PUP : (MC Offset: 0x50) MC Protection Unit Peripheral -------- // -------- MC_PUER : (MC Offset: 0x54) MC Protection Unit Area -------- -#define AT91C_MC_PUEB (0x1u << 0) // (MC) Protection Unit enable Bit +#define AT91C_MC_PUEB (0x1u << 0) // (MC) Protection Unit enable Bit // ***************************************************************************** // SOFTWARE API DEFINITION FOR Real-time Clock Alarm and Parallel Load Interface @@ -385,52 +385,52 @@ } AT91S_RTC, *AT91PS_RTC; // -------- RTC_CR : (RTC Offset: 0x0) RTC Control Register -------- -#define AT91C_RTC_UPDTIM (0x1u << 0) // (RTC) Update Request Time Register -#define AT91C_RTC_UPDCAL (0x1u << 1) // (RTC) Update Request Calendar Register -#define AT91C_RTC_TIMEVSEL (0x3u << 8) // (RTC) Time Event Selection -#define AT91C_RTC_TIMEVSEL_MINUTE (0x0u << 8) // (RTC) Minute change. -#define AT91C_RTC_TIMEVSEL_HOUR (0x1u << 8) // (RTC) Hour change. -#define AT91C_RTC_TIMEVSEL_DAY24 (0x2u << 8) // (RTC) Every day at midnight. -#define AT91C_RTC_TIMEVSEL_DAY12 (0x3u << 8) // (RTC) Every day at noon. -#define AT91C_RTC_CALEVSEL (0x3u << 16) // (RTC) Calendar Event Selection -#define AT91C_RTC_CALEVSEL_WEEK (0x0u << 16) // (RTC) Week change (every Monday at time 00:00:00). -#define AT91C_RTC_CALEVSEL_MONTH (0x1u << 16) // (RTC) Month change (every 01 of each month at time 00:00:00). -#define AT91C_RTC_CALEVSEL_YEAR (0x2u << 16) // (RTC) Year change (every January 1 at time 00:00:00). +#define AT91C_RTC_UPDTIM (0x1u << 0) // (RTC) Update Request Time Register +#define AT91C_RTC_UPDCAL (0x1u << 1) // (RTC) Update Request Calendar Register +#define AT91C_RTC_TIMEVSEL (0x3u << 8) // (RTC) Time Event Selection +#define AT91C_RTC_TIMEVSEL_MINUTE (0x0u << 8) // (RTC) Minute change. +#define AT91C_RTC_TIMEVSEL_HOUR (0x1u << 8) // (RTC) Hour change. +#define AT91C_RTC_TIMEVSEL_DAY24 (0x2u << 8) // (RTC) Every day at midnight. +#define AT91C_RTC_TIMEVSEL_DAY12 (0x3u << 8) // (RTC) Every day at noon. +#define AT91C_RTC_CALEVSEL (0x3u << 16) // (RTC) Calendar Event Selection +#define AT91C_RTC_CALEVSEL_WEEK (0x0u << 16) // (RTC) Week change (every Monday at time 00:00:00). +#define AT91C_RTC_CALEVSEL_MONTH (0x1u << 16) // (RTC) Month change (every 01 of each month at time 00:00:00). +#define AT91C_RTC_CALEVSEL_YEAR (0x2u << 16) // (RTC) Year change (every January 1 at time 00:00:00). // -------- RTC_MR : (RTC Offset: 0x4) RTC Mode Register -------- -#define AT91C_RTC_HRMOD (0x1u << 0) // (RTC) 12-24 hour Mode +#define AT91C_RTC_HRMOD (0x1u << 0) // (RTC) 12-24 hour Mode // -------- RTC_TIMR : (RTC Offset: 0x8) RTC Time Register -------- -#define AT91C_RTC_SEC (0x7Fu << 0) // (RTC) Current Second -#define AT91C_RTC_MIN (0x7Fu << 8) // (RTC) Current Minute -#define AT91C_RTC_HOUR (0x1Fu << 16) // (RTC) Current Hour -#define AT91C_RTC_AMPM (0x1u << 22) // (RTC) Ante Meridiem, Post Meridiem Indicator +#define AT91C_RTC_SEC (0x7Fu << 0) // (RTC) Current Second +#define AT91C_RTC_MIN (0x7Fu << 8) // (RTC) Current Minute +#define AT91C_RTC_HOUR (0x1Fu << 16) // (RTC) Current Hour +#define AT91C_RTC_AMPM (0x1u << 22) // (RTC) Ante Meridiem, Post Meridiem Indicator // -------- RTC_CALR : (RTC Offset: 0xc) RTC Calendar Register -------- -#define AT91C_RTC_CENT (0x3Fu << 0) // (RTC) Current Century -#define AT91C_RTC_YEAR (0xFFu << 8) // (RTC) Current Year -#define AT91C_RTC_MONTH (0x1Fu << 16) // (RTC) Current Month -#define AT91C_RTC_DAY (0x7u << 21) // (RTC) Current Day -#define AT91C_RTC_DATE (0x3Fu << 24) // (RTC) Current Date +#define AT91C_RTC_CENT (0x3Fu << 0) // (RTC) Current Century +#define AT91C_RTC_YEAR (0xFFu << 8) // (RTC) Current Year +#define AT91C_RTC_MONTH (0x1Fu << 16) // (RTC) Current Month +#define AT91C_RTC_DAY (0x7u << 21) // (RTC) Current Day +#define AT91C_RTC_DATE (0x3Fu << 24) // (RTC) Current Date // -------- RTC_TIMALR : (RTC Offset: 0x10) RTC Time Alarm Register -------- -#define AT91C_RTC_SECEN (0x1u << 7) // (RTC) Second Alarm Enable -#define AT91C_RTC_MINEN (0x1u << 15) // (RTC) Minute Alarm -#define AT91C_RTC_HOUREN (0x1u << 23) // (RTC) Current Hour +#define AT91C_RTC_SECEN (0x1u << 7) // (RTC) Second Alarm Enable +#define AT91C_RTC_MINEN (0x1u << 15) // (RTC) Minute Alarm +#define AT91C_RTC_HOUREN (0x1u << 23) // (RTC) Current Hour // -------- RTC_CALALR : (RTC Offset: 0x14) RTC Calendar Alarm Register -------- -#define AT91C_RTC_MONTHEN (0x1u << 23) // (RTC) Month Alarm Enable -#define AT91C_RTC_DATEEN (0x1u << 31) // (RTC) Date Alarm Enable +#define AT91C_RTC_MONTHEN (0x1u << 23) // (RTC) Month Alarm Enable +#define AT91C_RTC_DATEEN (0x1u << 31) // (RTC) Date Alarm Enable // -------- RTC_SR : (RTC Offset: 0x18) RTC Status Register -------- -#define AT91C_RTC_ACKUPD (0x1u << 0) // (RTC) Acknowledge for Update -#define AT91C_RTC_ALARM (0x1u << 1) // (RTC) Alarm Flag -#define AT91C_RTC_SECEV (0x1u << 2) // (RTC) Second Event -#define AT91C_RTC_TIMEV (0x1u << 3) // (RTC) Time Event -#define AT91C_RTC_CALEV (0x1u << 4) // (RTC) Calendar event +#define AT91C_RTC_ACKUPD (0x1u << 0) // (RTC) Acknowledge for Update +#define AT91C_RTC_ALARM (0x1u << 1) // (RTC) Alarm Flag +#define AT91C_RTC_SECEV (0x1u << 2) // (RTC) Second Event +#define AT91C_RTC_TIMEV (0x1u << 3) // (RTC) Time Event +#define AT91C_RTC_CALEV (0x1u << 4) // (RTC) Calendar event // -------- RTC_SCCR : (RTC Offset: 0x1c) RTC Status Clear Command Register -------- // -------- RTC_IER : (RTC Offset: 0x20) RTC Interrupt Enable Register -------- // -------- RTC_IDR : (RTC Offset: 0x24) RTC Interrupt Disable Register -------- // -------- RTC_IMR : (RTC Offset: 0x28) RTC Interrupt Mask Register -------- // -------- RTC_VER : (RTC Offset: 0x2c) RTC Valid Entry Register -------- -#define AT91C_RTC_NVTIM (0x1u << 0) // (RTC) Non valid Time -#define AT91C_RTC_NVCAL (0x1u << 1) // (RTC) Non valid Calendar -#define AT91C_RTC_NVTIMALR (0x1u << 2) // (RTC) Non valid time Alarm -#define AT91C_RTC_NVCALALR (0x1u << 3) // (RTC) Nonvalid Calendar Alarm +#define AT91C_RTC_NVTIM (0x1u << 0) // (RTC) Non valid Time +#define AT91C_RTC_NVCAL (0x1u << 1) // (RTC) Non valid Calendar +#define AT91C_RTC_NVTIMALR (0x1u << 2) // (RTC) Non valid time Alarm +#define AT91C_RTC_NVCALALR (0x1u << 3) // (RTC) Nonvalid Calendar Alarm // ***************************************************************************** // SOFTWARE API DEFINITION FOR System Timer Interface @@ -449,27 +449,27 @@ } AT91S_ST, *AT91PS_ST; // -------- ST_CR : (ST Offset: 0x0) System Timer Control Register -------- -#define AT91C_ST_WDRST (0x1u << 0) // (ST) Watchdog Timer Restart +#define AT91C_ST_WDRST (0x1u << 0) // (ST) Watchdog Timer Restart // -------- ST_PIMR : (ST Offset: 0x4) System Timer Period Interval Mode Register -------- -#define AT91C_ST_PIV (0xFFFFu << 0) // (ST) Watchdog Timer Restart +#define AT91C_ST_PIV (0xFFFFu << 0) // (ST) Watchdog Timer Restart // -------- ST_WDMR : (ST Offset: 0x8) System Timer Watchdog Mode Register -------- -#define AT91C_ST_WDV (0xFFFFu << 0) // (ST) Watchdog Timer Restart -#define AT91C_ST_RSTEN (0x1u << 16) // (ST) Reset Enable -#define AT91C_ST_EXTEN (0x1u << 17) // (ST) External Signal Assertion Enable +#define AT91C_ST_WDV (0xFFFFu << 0) // (ST) Watchdog Timer Restart +#define AT91C_ST_RSTEN (0x1u << 16) // (ST) Reset Enable +#define AT91C_ST_EXTEN (0x1u << 17) // (ST) External Signal Assertion Enable // -------- ST_RTMR : (ST Offset: 0xc) System Timer Real-time Mode Register -------- -#define AT91C_ST_RTPRES (0xFFFFu << 0) // (ST) Real-time Timer Prescaler Value +#define AT91C_ST_RTPRES (0xFFFFu << 0) // (ST) Real-time Timer Prescaler Value // -------- ST_SR : (ST Offset: 0x10) System Timer Status Register -------- -#define AT91C_ST_PITS (0x1u << 0) // (ST) Period Interval Timer Interrupt -#define AT91C_ST_WDOVF (0x1u << 1) // (ST) Watchdog Overflow -#define AT91C_ST_RTTINC (0x1u << 2) // (ST) Real-time Timer Increment -#define AT91C_ST_ALMS (0x1u << 3) // (ST) Alarm Status +#define AT91C_ST_PITS (0x1u << 0) // (ST) Period Interval Timer Interrupt +#define AT91C_ST_WDOVF (0x1u << 1) // (ST) Watchdog Overflow +#define AT91C_ST_RTTINC (0x1u << 2) // (ST) Real-time Timer Increment +#define AT91C_ST_ALMS (0x1u << 3) // (ST) Alarm Status // -------- ST_IER : (ST Offset: 0x14) System Timer Interrupt Enable Register -------- // -------- ST_IDR : (ST Offset: 0x18) System Timer Interrupt Disable Register -------- // -------- ST_IMR : (ST Offset: 0x1c) System Timer Interrupt Mask Register -------- // -------- ST_RTAR : (ST Offset: 0x20) System Timer Real-time Alarm Register -------- -#define AT91C_ST_ALMV (0xFFFFFu << 0) // (ST) Alarm Value Value +#define AT91C_ST_ALMV (0xFFFFFu << 0) // (ST) Alarm Value Value // -------- ST_CRTR : (ST Offset: 0x24) System Timer Current Real-time Register -------- -#define AT91C_ST_CRTV (0xFFFFFu << 0) // (ST) Current Real-time Value +#define AT91C_ST_CRTV (0xFFFFFu << 0) // (ST) Current Real-time Value // ***************************************************************************** // SOFTWARE API DEFINITION FOR Power Management Controler @@ -493,53 +493,53 @@ } AT91S_PMC, *AT91PS_PMC; // -------- PMC_SCER : (PMC Offset: 0x0) System Clock Enable Register -------- -#define AT91C_PMC_PCK (0x1u << 0) // (PMC) Processor Clock -#define AT91C_PMC_UDP (0x1u << 1) // (PMC) USB Device Port Clock -#define AT91C_PMC_MCKUDP (0x1u << 2) // (PMC) USB Device Port Master Clock Automatic Disable on Suspend -#define AT91C_PMC_UHP (0x1u << 4) // (PMC) USB Host Port Clock -#define AT91C_PMC_PCK0 (0x1u << 8) // (PMC) Programmable Clock Output -#define AT91C_PMC_PCK1 (0x1u << 9) // (PMC) Programmable Clock Output -#define AT91C_PMC_PCK2 (0x1u << 10) // (PMC) Programmable Clock Output -#define AT91C_PMC_PCK3 (0x1u << 11) // (PMC) Programmable Clock Output -#define AT91C_PMC_PCK4 (0x1u << 12) // (PMC) Programmable Clock Output -#define AT91C_PMC_PCK5 (0x1u << 13) // (PMC) Programmable Clock Output -#define AT91C_PMC_PCK6 (0x1u << 14) // (PMC) Programmable Clock Output -#define AT91C_PMC_PCK7 (0x1u << 15) // (PMC) Programmable Clock Output +#define AT91C_PMC_PCK (0x1u << 0) // (PMC) Processor Clock +#define AT91C_PMC_UDP (0x1u << 1) // (PMC) USB Device Port Clock +#define AT91C_PMC_MCKUDP (0x1u << 2) // (PMC) USB Device Port Master Clock Automatic Disable on Suspend +#define AT91C_PMC_UHP (0x1u << 4) // (PMC) USB Host Port Clock +#define AT91C_PMC_PCK0 (0x1u << 8) // (PMC) Programmable Clock Output +#define AT91C_PMC_PCK1 (0x1u << 9) // (PMC) Programmable Clock Output +#define AT91C_PMC_PCK2 (0x1u << 10) // (PMC) Programmable Clock Output +#define AT91C_PMC_PCK3 (0x1u << 11) // (PMC) Programmable Clock Output +#define AT91C_PMC_PCK4 (0x1u << 12) // (PMC) Programmable Clock Output +#define AT91C_PMC_PCK5 (0x1u << 13) // (PMC) Programmable Clock Output +#define AT91C_PMC_PCK6 (0x1u << 14) // (PMC) Programmable Clock Output +#define AT91C_PMC_PCK7 (0x1u << 15) // (PMC) Programmable Clock Output // -------- PMC_SCDR : (PMC Offset: 0x4) System Clock Disable Register -------- // -------- PMC_SCSR : (PMC Offset: 0x8) System Clock Status Register -------- // -------- PMC_MCKR : (PMC Offset: 0x30) Master Clock Register -------- -#define AT91C_PMC_CSS (0x3u << 0) // (PMC) Programmable Clock Selection -#define AT91C_PMC_CSS_SLOW_CLK 0x0u // (PMC) Slow Clock is selected -#define AT91C_PMC_CSS_MAIN_CLK 0x1u // (PMC) Main Clock is selected -#define AT91C_PMC_CSS_PLLA_CLK 0x2u // (PMC) Clock from PLL A is selected -#define AT91C_PMC_CSS_PLLB_CLK 0x3u // (PMC) Clock from PLL B is selected -#define AT91C_PMC_PRES (0x7u << 2) // (PMC) Programmable Clock Prescaler -#define AT91C_PMC_PRES_CLK (0x0u << 2) // (PMC) Selected clock -#define AT91C_PMC_PRES_CLK_2 (0x1u << 2) // (PMC) Selected clock divided by 2 -#define AT91C_PMC_PRES_CLK_4 (0x2u << 2) // (PMC) Selected clock divided by 4 -#define AT91C_PMC_PRES_CLK_8 (0x3u << 2) // (PMC) Selected clock divided by 8 -#define AT91C_PMC_PRES_CLK_16 (0x4u << 2) // (PMC) Selected clock divided by 16 -#define AT91C_PMC_PRES_CLK_32 (0x5u << 2) // (PMC) Selected clock divided by 32 -#define AT91C_PMC_PRES_CLK_64 (0x6u << 2) // (PMC) Selected clock divided by 64 -#define AT91C_PMC_MDIV (0x3u << 8) // (PMC) Master Clock Division -#define AT91C_PMC_MDIV_1 (0x0u << 8) // (PMC) The master clock and the processor clock are the same -#define AT91C_PMC_MDIV_2 (0x1u << 8) // (PMC) The processor clock is twice as fast as the master clock -#define AT91C_PMC_MDIV_3 (0x2u << 8) // (PMC) The processor clock is three times faster than the master clock -#define AT91C_PMC_MDIV_4 (0x3u << 8) // (PMC) The processor clock is four times faster than the master clock +#define AT91C_PMC_CSS (0x3u << 0) // (PMC) Programmable Clock Selection +#define AT91C_PMC_CSS_SLOW_CLK 0x0u // (PMC) Slow Clock is selected +#define AT91C_PMC_CSS_MAIN_CLK 0x1u // (PMC) Main Clock is selected +#define AT91C_PMC_CSS_PLLA_CLK 0x2u // (PMC) Clock from PLL A is selected +#define AT91C_PMC_CSS_PLLB_CLK 0x3u // (PMC) Clock from PLL B is selected +#define AT91C_PMC_PRES (0x7u << 2) // (PMC) Programmable Clock Prescaler +#define AT91C_PMC_PRES_CLK (0x0u << 2) // (PMC) Selected clock +#define AT91C_PMC_PRES_CLK_2 (0x1u << 2) // (PMC) Selected clock divided by 2 +#define AT91C_PMC_PRES_CLK_4 (0x2u << 2) // (PMC) Selected clock divided by 4 +#define AT91C_PMC_PRES_CLK_8 (0x3u << 2) // (PMC) Selected clock divided by 8 +#define AT91C_PMC_PRES_CLK_16 (0x4u << 2) // (PMC) Selected clock divided by 16 +#define AT91C_PMC_PRES_CLK_32 (0x5u << 2) // (PMC) Selected clock divided by 32 +#define AT91C_PMC_PRES_CLK_64 (0x6u << 2) // (PMC) Selected clock divided by 64 +#define AT91C_PMC_MDIV (0x3u << 8) // (PMC) Master Clock Division +#define AT91C_PMC_MDIV_1 (0x0u << 8) // (PMC) The master clock and the processor clock are the same +#define AT91C_PMC_MDIV_2 (0x1u << 8) // (PMC) The processor clock is twice as fast as the master clock +#define AT91C_PMC_MDIV_3 (0x2u << 8) // (PMC) The processor clock is three times faster than the master clock +#define AT91C_PMC_MDIV_4 (0x3u << 8) // (PMC) The processor clock is four times faster than the master clock // -------- PMC_PCKR : (PMC Offset: 0x40) Programmable Clock Register -------- // -------- PMC_IER : (PMC Offset: 0x60) PMC Interrupt Enable Register -------- -#define AT91C_PMC_MOSCS (0x1u << 0) // (PMC) MOSC Status/Enable/Disable/Mask -#define AT91C_PMC_LOCKA (0x1u << 1) // (PMC) PLL A Status/Enable/Disable/Mask -#define AT91C_PMC_LOCKB (0x1u << 2) // (PMC) PLL B Status/Enable/Disable/Mask -#define AT91C_PMC_MCKRDY (0x1u << 3) // (PMC) MCK_RDY Status/Enable/Disable/Mask -#define AT91C_PMC_PCK0RDY (0x1u << 8) // (PMC) PCK0_RDY Status/Enable/Disable/Mask -#define AT91C_PMC_PCK1RDY (0x1u << 9) // (PMC) PCK1_RDY Status/Enable/Disable/Mask -#define AT91C_PMC_PCK2RDY (0x1u << 10) // (PMC) PCK2_RDY Status/Enable/Disable/Mask -#define AT91C_PMC_PCK3RDY (0x1u << 11) // (PMC) PCK3_RDY Status/Enable/Disable/Mask -#define AT91C_PMC_PCK4RDY (0x1u << 12) // (PMC) PCK4_RDY Status/Enable/Disable/Mask -#define AT91C_PMC_PCK5RDY (0x1u << 13) // (PMC) PCK5_RDY Status/Enable/Disable/Mask -#define AT91C_PMC_PCK6RDY (0x1u << 14) // (PMC) PCK6_RDY Status/Enable/Disable/Mask -#define AT91C_PMC_PCK7RDY (0x1u << 15) // (PMC) PCK7_RDY Status/Enable/Disable/Mask +#define AT91C_PMC_MOSCS (0x1u << 0) // (PMC) MOSC Status/Enable/Disable/Mask +#define AT91C_PMC_LOCKA (0x1u << 1) // (PMC) PLL A Status/Enable/Disable/Mask +#define AT91C_PMC_LOCKB (0x1u << 2) // (PMC) PLL B Status/Enable/Disable/Mask +#define AT91C_PMC_MCKRDY (0x1u << 3) // (PMC) MCK_RDY Status/Enable/Disable/Mask +#define AT91C_PMC_PCK0RDY (0x1u << 8) // (PMC) PCK0_RDY Status/Enable/Disable/Mask +#define AT91C_PMC_PCK1RDY (0x1u << 9) // (PMC) PCK1_RDY Status/Enable/Disable/Mask +#define AT91C_PMC_PCK2RDY (0x1u << 10) // (PMC) PCK2_RDY Status/Enable/Disable/Mask +#define AT91C_PMC_PCK3RDY (0x1u << 11) // (PMC) PCK3_RDY Status/Enable/Disable/Mask +#define AT91C_PMC_PCK4RDY (0x1u << 12) // (PMC) PCK4_RDY Status/Enable/Disable/Mask +#define AT91C_PMC_PCK5RDY (0x1u << 13) // (PMC) PCK5_RDY Status/Enable/Disable/Mask +#define AT91C_PMC_PCK6RDY (0x1u << 14) // (PMC) PCK6_RDY Status/Enable/Disable/Mask +#define AT91C_PMC_PCK7RDY (0x1u << 15) // (PMC) PCK7_RDY Status/Enable/Disable/Mask // -------- PMC_IDR : (PMC Offset: 0x64) PMC Interrupt Disable Register -------- // -------- PMC_SR : (PMC Offset: 0x68) PMC Status Register -------- // -------- PMC_IMR : (PMC Offset: 0x6c) PMC Interrupt Mask Register -------- @@ -555,37 +555,37 @@ } AT91S_CKGR, *AT91PS_CKGR; // -------- CKGR_MOR : (CKGR Offset: 0x0) Main Oscillator Register -------- -#define AT91C_CKGR_MOSCEN (0x1u << 0) // (CKGR) Main Oscillator Enable -#define AT91C_CKGR_OSCTEST (0x1u << 1) // (CKGR) Oscillator Test -#define AT91C_CKGR_OSCOUNT (0xFFu << 8) // (CKGR) Main Oscillator Start-up Time +#define AT91C_CKGR_MOSCEN (0x1u << 0) // (CKGR) Main Oscillator Enable +#define AT91C_CKGR_OSCTEST (0x1u << 1) // (CKGR) Oscillator Test +#define AT91C_CKGR_OSCOUNT (0xFFu << 8) // (CKGR) Main Oscillator Start-up Time // -------- CKGR_MCFR : (CKGR Offset: 0x4) Main Clock Frequency Register -------- -#define AT91C_CKGR_MAINF (0xFFFFu << 0) // (CKGR) Main Clock Frequency -#define AT91C_CKGR_MAINRDY (0x1u << 16) // (CKGR) Main Clock Ready +#define AT91C_CKGR_MAINF (0xFFFFu << 0) // (CKGR) Main Clock Frequency +#define AT91C_CKGR_MAINRDY (0x1u << 16) // (CKGR) Main Clock Ready // -------- CKGR_PLLAR : (CKGR Offset: 0x8) PLL A Register -------- -#define AT91C_CKGR_DIVA (0xFFu << 0) // (CKGR) Divider Selected -#define AT91C_CKGR_DIVA_0 0x0u // (CKGR) Divider output is 0 -#define AT91C_CKGR_DIVA_BYPASS 0x1u // (CKGR) Divider is bypassed -#define AT91C_CKGR_PLLACOUNT (0x3Fu << 8) // (CKGR) PLL A Counter -#define AT91C_CKGR_OUTA (0x3u << 14) // (CKGR) PLL A Output Frequency Range -#define AT91C_CKGR_OUTA_0 (0x0u << 14) // (CKGR) Please refer to the PLLA datasheet -#define AT91C_CKGR_OUTA_1 (0x1u << 14) // (CKGR) Please refer to the PLLA datasheet -#define AT91C_CKGR_OUTA_2 (0x2u << 14) // (CKGR) Please refer to the PLLA datasheet -#define AT91C_CKGR_OUTA_3 (0x3u << 14) // (CKGR) Please refer to the PLLA datasheet -#define AT91C_CKGR_MULA (0x7FFu << 16) // (CKGR) PLL A Multiplier -#define AT91C_CKGR_SRCA (0x1u << 29) // (CKGR) PLL A Source +#define AT91C_CKGR_DIVA (0xFFu << 0) // (CKGR) Divider Selected +#define AT91C_CKGR_DIVA_0 0x0u // (CKGR) Divider output is 0 +#define AT91C_CKGR_DIVA_BYPASS 0x1u // (CKGR) Divider is bypassed +#define AT91C_CKGR_PLLACOUNT (0x3Fu << 8) // (CKGR) PLL A Counter +#define AT91C_CKGR_OUTA (0x3u << 14) // (CKGR) PLL A Output Frequency Range +#define AT91C_CKGR_OUTA_0 (0x0u << 14) // (CKGR) Please refer to the PLLA datasheet +#define AT91C_CKGR_OUTA_1 (0x1u << 14) // (CKGR) Please refer to the PLLA datasheet +#define AT91C_CKGR_OUTA_2 (0x2u << 14) // (CKGR) Please refer to the PLLA datasheet +#define AT91C_CKGR_OUTA_3 (0x3u << 14) // (CKGR) Please refer to the PLLA datasheet +#define AT91C_CKGR_MULA (0x7FFu << 16) // (CKGR) PLL A Multiplier +#define AT91C_CKGR_SRCA (0x1u << 29) // (CKGR) PLL A Source // -------- CKGR_PLLBR : (CKGR Offset: 0xc) PLL B Register -------- -#define AT91C_CKGR_DIVB (0xFFu << 0) // (CKGR) Divider Selected -#define AT91C_CKGR_DIVB_0 0x0u // (CKGR) Divider output is 0 -#define AT91C_CKGR_DIVB_BYPASS 0x1u // (CKGR) Divider is bypassed -#define AT91C_CKGR_PLLBCOUNT (0x3Fu << 8) // (CKGR) PLL B Counter -#define AT91C_CKGR_OUTB (0x3u << 14) // (CKGR) PLL B Output Frequency Range -#define AT91C_CKGR_OUTB_0 (0x0u << 14) // (CKGR) Please refer to the PLLB datasheet -#define AT91C_CKGR_OUTB_1 (0x1u << 14) // (CKGR) Please refer to the PLLB datasheet -#define AT91C_CKGR_OUTB_2 (0x2u << 14) // (CKGR) Please refer to the PLLB datasheet -#define AT91C_CKGR_OUTB_3 (0x3u << 14) // (CKGR) Please refer to the PLLB datasheet -#define AT91C_CKGR_MULB (0x7FFu << 16) // (CKGR) PLL B Multiplier -#define AT91C_CKGR_USB_96M (0x1u << 28) // (CKGR) Divider for USB Ports -#define AT91C_CKGR_USB_PLL (0x1u << 29) // (CKGR) PLL Use +#define AT91C_CKGR_DIVB (0xFFu << 0) // (CKGR) Divider Selected +#define AT91C_CKGR_DIVB_0 0x0u // (CKGR) Divider output is 0 +#define AT91C_CKGR_DIVB_BYPASS 0x1u // (CKGR) Divider is bypassed +#define AT91C_CKGR_PLLBCOUNT (0x3Fu << 8) // (CKGR) PLL B Counter +#define AT91C_CKGR_OUTB (0x3u << 14) // (CKGR) PLL B Output Frequency Range +#define AT91C_CKGR_OUTB_0 (0x0u << 14) // (CKGR) Please refer to the PLLB datasheet +#define AT91C_CKGR_OUTB_1 (0x1u << 14) // (CKGR) Please refer to the PLLB datasheet +#define AT91C_CKGR_OUTB_2 (0x2u << 14) // (CKGR) Please refer to the PLLB datasheet +#define AT91C_CKGR_OUTB_3 (0x3u << 14) // (CKGR) Please refer to the PLLB datasheet +#define AT91C_CKGR_MULB (0x7FFu << 16) // (CKGR) PLL B Multiplier +#define AT91C_CKGR_USB_96M (0x1u << 28) // (CKGR) Divider for USB Ports +#define AT91C_CKGR_USB_PLL (0x1u << 29) // (CKGR) PLL Use // ***************************************************************************** // SOFTWARE API DEFINITION FOR Parallel Input Output Controler @@ -660,43 +660,43 @@ } AT91S_DBGU, *AT91PS_DBGU; // -------- DBGU_CR : (DBGU Offset: 0x0) Debug Unit Control Register -------- -#define AT91C_US_RSTRX (0x1u << 2) // (DBGU) Reset Receiver -#define AT91C_US_RSTTX (0x1u << 3) // (DBGU) Reset Transmitter -#define AT91C_US_RXEN (0x1u << 4) // (DBGU) Receiver Enable -#define AT91C_US_RXDIS (0x1u << 5) // (DBGU) Receiver Disable -#define AT91C_US_TXEN (0x1u << 6) // (DBGU) Transmitter Enable -#define AT91C_US_TXDIS (0x1u << 7) // (DBGU) Transmitter Disable +#define AT91C_US_RSTRX (0x1u << 2) // (DBGU) Reset Receiver +#define AT91C_US_RSTTX (0x1u << 3) // (DBGU) Reset Transmitter +#define AT91C_US_RXEN (0x1u << 4) // (DBGU) Receiver Enable +#define AT91C_US_RXDIS (0x1u << 5) // (DBGU) Receiver Disable +#define AT91C_US_TXEN (0x1u << 6) // (DBGU) Transmitter Enable +#define AT91C_US_TXDIS (0x1u << 7) // (DBGU) Transmitter Disable // -------- DBGU_MR : (DBGU Offset: 0x4) Debug Unit Mode Register -------- -#define AT91C_US_PAR (0x7u << 9) // (DBGU) Parity type -#define AT91C_US_PAR_EVEN (0x0u << 9) // (DBGU) Even Parity -#define AT91C_US_PAR_ODD (0x1u << 9) // (DBGU) Odd Parity -#define AT91C_US_PAR_SPACE (0x2u << 9) // (DBGU) Parity forced to 0 (Space) -#define AT91C_US_PAR_MARK (0x3u << 9) // (DBGU) Parity forced to 1 (Mark) -#define AT91C_US_PAR_NONE (0x4u << 9) // (DBGU) No Parity -#define AT91C_US_PAR_MULTI_DROP (0x6u << 9) // (DBGU) Multi-drop mode -#define AT91C_US_CHMODE (0x3u << 14) // (DBGU) Channel Mode -#define AT91C_US_CHMODE_NORMAL (0x0u << 14) // (DBGU) Normal Mode: The USART channel operates as an RX/TX USART. -#define AT91C_US_CHMODE_AUTO (0x1u << 14) // (DBGU) Automatic Echo: Receiver Data Input is connected to the TXD pin. -#define AT91C_US_CHMODE_LOCAL (0x2u << 14) // (DBGU) Local Loopback: Transmitter Output Signal is connected to Receiver Input Signal. -#define AT91C_US_CHMODE_REMOTE (0x3u << 14) // (DBGU) Remote Loopback: RXD pin is internally connected to TXD pin. +#define AT91C_US_PAR (0x7u << 9) // (DBGU) Parity type +#define AT91C_US_PAR_EVEN (0x0u << 9) // (DBGU) Even Parity +#define AT91C_US_PAR_ODD (0x1u << 9) // (DBGU) Odd Parity +#define AT91C_US_PAR_SPACE (0x2u << 9) // (DBGU) Parity forced to 0 (Space) +#define AT91C_US_PAR_MARK (0x3u << 9) // (DBGU) Parity forced to 1 (Mark) +#define AT91C_US_PAR_NONE (0x4u << 9) // (DBGU) No Parity +#define AT91C_US_PAR_MULTI_DROP (0x6u << 9) // (DBGU) Multi-drop mode +#define AT91C_US_CHMODE (0x3u << 14) // (DBGU) Channel Mode +#define AT91C_US_CHMODE_NORMAL (0x0u << 14) // (DBGU) Normal Mode: The USART channel operates as an RX/TX USART. +#define AT91C_US_CHMODE_AUTO (0x1u << 14) // (DBGU) Automatic Echo: Receiver Data Input is connected to the TXD pin. +#define AT91C_US_CHMODE_LOCAL (0x2u << 14) // (DBGU) Local Loopback: Transmitter Output Signal is connected to Receiver Input Signal. +#define AT91C_US_CHMODE_REMOTE (0x3u << 14) // (DBGU) Remote Loopback: RXD pin is internally connected to TXD pin. // -------- DBGU_IER : (DBGU Offset: 0x8) Debug Unit Interrupt Enable Register -------- -#define AT91C_US_RXRDY (0x1u << 0) // (DBGU) RXRDY Interrupt -#define AT91C_US_TXRDY (0x1u << 1) // (DBGU) TXRDY Interrupt -#define AT91C_US_ENDRX (0x1u << 3) // (DBGU) End of Receive Transfer Interrupt -#define AT91C_US_ENDTX (0x1u << 4) // (DBGU) End of Transmit Interrupt -#define AT91C_US_OVRE (0x1u << 5) // (DBGU) Overrun Interrupt -#define AT91C_US_FRAME (0x1u << 6) // (DBGU) Framing Error Interrupt -#define AT91C_US_PARE (0x1u << 7) // (DBGU) Parity Error Interrupt -#define AT91C_US_TXEMPTY (0x1u << 9) // (DBGU) TXEMPTY Interrupt -#define AT91C_US_TXBUFE (0x1u << 11) // (DBGU) TXBUFE Interrupt -#define AT91C_US_RXBUFF (0x1u << 12) // (DBGU) RXBUFF Interrupt -#define AT91C_US_COMM_TX (0x1u << 30) // (DBGU) COMM_TX Interrupt -#define AT91C_US_COMM_RX (0x1u << 31) // (DBGU) COMM_RX Interrupt +#define AT91C_US_RXRDY (0x1u << 0) // (DBGU) RXRDY Interrupt +#define AT91C_US_TXRDY (0x1u << 1) // (DBGU) TXRDY Interrupt +#define AT91C_US_ENDRX (0x1u << 3) // (DBGU) End of Receive Transfer Interrupt +#define AT91C_US_ENDTX (0x1u << 4) // (DBGU) End of Transmit Interrupt +#define AT91C_US_OVRE (0x1u << 5) // (DBGU) Overrun Interrupt +#define AT91C_US_FRAME (0x1u << 6) // (DBGU) Framing Error Interrupt +#define AT91C_US_PARE (0x1u << 7) // (DBGU) Parity Error Interrupt +#define AT91C_US_TXEMPTY (0x1u << 9) // (DBGU) TXEMPTY Interrupt +#define AT91C_US_TXBUFE (0x1u << 11) // (DBGU) TXBUFE Interrupt +#define AT91C_US_RXBUFF (0x1u << 12) // (DBGU) RXBUFF Interrupt +#define AT91C_US_COMM_TX (0x1u << 30) // (DBGU) COMM_TX Interrupt +#define AT91C_US_COMM_RX (0x1u << 31) // (DBGU) COMM_RX Interrupt // -------- DBGU_IDR : (DBGU Offset: 0xc) Debug Unit Interrupt Disable Register -------- // -------- DBGU_IMR : (DBGU Offset: 0x10) Debug Unit Interrupt Mask Register -------- // -------- DBGU_CSR : (DBGU Offset: 0x14) Debug Unit Channel Status Register -------- // -------- DBGU_FNTR : (DBGU Offset: 0x48) Debug Unit FORCE_NTRST Register -------- -#define AT91C_US_FORCE_NTRST (0x1u << 0) // (DBGU) Force NTRST in JTAG +#define AT91C_US_FORCE_NTRST (0x1u << 0) // (DBGU) Force NTRST in JTAG // ***************************************************************************** // SOFTWARE API DEFINITION FOR Peripheral Data Controller @@ -715,10 +715,10 @@ } AT91S_PDC, *AT91PS_PDC; // -------- PDC_PTCR : (PDC Offset: 0x20) PDC Transfer Control Register -------- -#define AT91C_PDC_RXTEN (0x1u << 0) // (PDC) Receiver Transfer Enable -#define AT91C_PDC_RXTDIS (0x1u << 1) // (PDC) Receiver Transfer Disable -#define AT91C_PDC_TXTEN (0x1u << 8) // (PDC) Transmitter Transfer Enable -#define AT91C_PDC_TXTDIS (0x1u << 9) // (PDC) Transmitter Transfer Disable +#define AT91C_PDC_RXTEN (0x1u << 0) // (PDC) Receiver Transfer Enable +#define AT91C_PDC_RXTDIS (0x1u << 1) // (PDC) Receiver Transfer Disable +#define AT91C_PDC_TXTEN (0x1u << 8) // (PDC) Transmitter Transfer Enable +#define AT91C_PDC_TXTDIS (0x1u << 9) // (PDC) Transmitter Transfer Disable // -------- PDC_PTSR : (PDC Offset: 0x24) PDC Transfer Status Register -------- // ***************************************************************************** @@ -748,20 +748,20 @@ } AT91S_AIC, *AT91PS_AIC; // -------- AIC_SMR : (AIC Offset: 0x0) Control Register -------- -#define AT91C_AIC_PRIOR (0x7u << 0) // (AIC) Priority Level -#define AT91C_AIC_PRIOR_LOWEST 0x0u // (AIC) Lowest priority level -#define AT91C_AIC_PRIOR_HIGHEST 0x7u // (AIC) Highest priority level -#define AT91C_AIC_SRCTYPE (0x3u << 5) // (AIC) Interrupt Source Type -#define AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE (0x0u << 5) // (AIC) Internal Sources Code Label Level Sensitive -#define AT91C_AIC_SRCTYPE_INT_EDGE_TRIGGERED (0x1u << 5) // (AIC) Internal Sources Code Label Edge triggered -#define AT91C_AIC_SRCTYPE_EXT_HIGH_LEVEL (0x2u << 5) // (AIC) External Sources Code Label High-level Sensitive -#define AT91C_AIC_SRCTYPE_EXT_POSITIVE_EDGE (0x3u << 5) // (AIC) External Sources Code Label Positive Edge triggered +#define AT91C_AIC_PRIOR (0x7u << 0) // (AIC) Priority Level +#define AT91C_AIC_PRIOR_LOWEST 0x0u // (AIC) Lowest priority level +#define AT91C_AIC_PRIOR_HIGHEST 0x7u // (AIC) Highest priority level +#define AT91C_AIC_SRCTYPE (0x3u << 5) // (AIC) Interrupt Source Type +#define AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE (0x0u << 5) // (AIC) Internal Sources Code Label Level Sensitive +#define AT91C_AIC_SRCTYPE_INT_EDGE_TRIGGERED (0x1u << 5) // (AIC) Internal Sources Code Label Edge triggered +#define AT91C_AIC_SRCTYPE_EXT_HIGH_LEVEL (0x2u << 5) // (AIC) External Sources Code Label High-level Sensitive +#define AT91C_AIC_SRCTYPE_EXT_POSITIVE_EDGE (0x3u << 5) // (AIC) External Sources Code Label Positive Edge triggered // -------- AIC_CISR : (AIC Offset: 0x114) AIC Core Interrupt Status Register -------- -#define AT91C_AIC_NFIQ (0x1u << 0) // (AIC) NFIQ Status -#define AT91C_AIC_NIRQ (0x1u << 1) // (AIC) NIRQ Status +#define AT91C_AIC_NFIQ (0x1u << 0) // (AIC) NFIQ Status +#define AT91C_AIC_NIRQ (0x1u << 1) // (AIC) NIRQ Status // -------- AIC_DCR : (AIC Offset: 0x138) AIC Debug Control Register (Protect) -------- -#define AT91C_AIC_DCR_PROT (0x1u << 0) // (AIC) Protection Mode -#define AT91C_AIC_DCR_GMSK (0x1u << 1) // (AIC) General Mask +#define AT91C_AIC_DCR_PROT (0x1u << 0) // (AIC) Protection Mode +#define AT91C_AIC_DCR_GMSK (0x1u << 1) // (AIC) General Mask // ***************************************************************************** // SOFTWARE API DEFINITION FOR Serial Parallel Interface @@ -791,55 +791,55 @@ } AT91S_SPI, *AT91PS_SPI; // -------- SPI_CR : (SPI Offset: 0x0) SPI Control Register -------- -#define AT91C_SPI_SPIEN (0x1u << 0) // (SPI) SPI Enable -#define AT91C_SPI_SPIDIS (0x1u << 1) // (SPI) SPI Disable -#define AT91C_SPI_SWRST (0x1u << 7) // (SPI) SPI Software reset +#define AT91C_SPI_SPIEN (0x1u << 0) // (SPI) SPI Enable +#define AT91C_SPI_SPIDIS (0x1u << 1) // (SPI) SPI Disable +#define AT91C_SPI_SWRST (0x1u << 7) // (SPI) SPI Software reset // -------- SPI_MR : (SPI Offset: 0x4) SPI Mode Register -------- -#define AT91C_SPI_MSTR (0x1u << 0) // (SPI) Master/Slave Mode -#define AT91C_SPI_PS (0x1u << 1) // (SPI) Peripheral Select -#define AT91C_SPI_PS_FIXED (0x0u << 1) // (SPI) Fixed Peripheral Select -#define AT91C_SPI_PS_VARIABLE (0x1u << 1) // (SPI) Variable Peripheral Select -#define AT91C_SPI_PCSDEC (0x1u << 2) // (SPI) Chip Select Decode -#define AT91C_SPI_DIV32 (0x1u << 3) // (SPI) Clock Selection -#define AT91C_SPI_MODFDIS (0x1u << 4) // (SPI) Mode Fault Detection -#define AT91C_SPI_LLB (0x1u << 7) // (SPI) Clock Selection -#define AT91C_SPI_PCS (0xFu << 16) // (SPI) Peripheral Chip Select -#define AT91C_SPI_DLYBCS (0xFFu << 24) // (SPI) Delay Between Chip Selects +#define AT91C_SPI_MSTR (0x1u << 0) // (SPI) Master/Slave Mode +#define AT91C_SPI_PS (0x1u << 1) // (SPI) Peripheral Select +#define AT91C_SPI_PS_FIXED (0x0u << 1) // (SPI) Fixed Peripheral Select +#define AT91C_SPI_PS_VARIABLE (0x1u << 1) // (SPI) Variable Peripheral Select +#define AT91C_SPI_PCSDEC (0x1u << 2) // (SPI) Chip Select Decode +#define AT91C_SPI_DIV32 (0x1u << 3) // (SPI) Clock Selection +#define AT91C_SPI_MODFDIS (0x1u << 4) // (SPI) Mode Fault Detection +#define AT91C_SPI_LLB (0x1u << 7) // (SPI) Clock Selection +#define AT91C_SPI_PCS (0xFu << 16) // (SPI) Peripheral Chip Select +#define AT91C_SPI_DLYBCS (0xFFu << 24) // (SPI) Delay Between Chip Selects // -------- SPI_RDR : (SPI Offset: 0x8) Receive Data Register -------- -#define AT91C_SPI_RD (0xFFFFu << 0) // (SPI) Receive Data -#define AT91C_SPI_RPCS (0xFu << 16) // (SPI) Peripheral Chip Select Status +#define AT91C_SPI_RD (0xFFFFu << 0) // (SPI) Receive Data +#define AT91C_SPI_RPCS (0xFu << 16) // (SPI) Peripheral Chip Select Status // -------- SPI_TDR : (SPI Offset: 0xc) Transmit Data Register -------- -#define AT91C_SPI_TD (0xFFFFu << 0) // (SPI) Transmit Data -#define AT91C_SPI_TPCS (0xFu << 16) // (SPI) Peripheral Chip Select Status +#define AT91C_SPI_TD (0xFFFFu << 0) // (SPI) Transmit Data +#define AT91C_SPI_TPCS (0xFu << 16) // (SPI) Peripheral Chip Select Status // -------- SPI_SR : (SPI Offset: 0x10) Status Register -------- -#define AT91C_SPI_RDRF (0x1u << 0) // (SPI) Receive Data Register Full -#define AT91C_SPI_TDRE (0x1u << 1) // (SPI) Transmit Data Register Empty -#define AT91C_SPI_MODF (0x1u << 2) // (SPI) Mode Fault Error -#define AT91C_SPI_OVRES (0x1u << 3) // (SPI) Overrun Error Status -#define AT91C_SPI_SPENDRX (0x1u << 4) // (SPI) End of Receiver Transfer -#define AT91C_SPI_SPENDTX (0x1u << 5) // (SPI) End of Receiver Transfer -#define AT91C_SPI_RXBUFF (0x1u << 6) // (SPI) RXBUFF Interrupt -#define AT91C_SPI_TXBUFE (0x1u << 7) // (SPI) TXBUFE Interrupt -#define AT91C_SPI_SPIENS (0x1u << 16) // (SPI) Enable Status +#define AT91C_SPI_RDRF (0x1u << 0) // (SPI) Receive Data Register Full +#define AT91C_SPI_TDRE (0x1u << 1) // (SPI) Transmit Data Register Empty +#define AT91C_SPI_MODF (0x1u << 2) // (SPI) Mode Fault Error +#define AT91C_SPI_OVRES (0x1u << 3) // (SPI) Overrun Error Status +#define AT91C_SPI_SPENDRX (0x1u << 4) // (SPI) End of Receiver Transfer +#define AT91C_SPI_SPENDTX (0x1u << 5) // (SPI) End of Receiver Transfer +#define AT91C_SPI_RXBUFF (0x1u << 6) // (SPI) RXBUFF Interrupt +#define AT91C_SPI_TXBUFE (0x1u << 7) // (SPI) TXBUFE Interrupt +#define AT91C_SPI_SPIENS (0x1u << 16) // (SPI) Enable Status // -------- SPI_IER : (SPI Offset: 0x14) Interrupt Enable Register -------- // -------- SPI_IDR : (SPI Offset: 0x18) Interrupt Disable Register -------- // -------- SPI_IMR : (SPI Offset: 0x1c) Interrupt Mask Register -------- // -------- SPI_CSR : (SPI Offset: 0x30) Chip Select Register -------- -#define AT91C_SPI_CPOL (0x1u << 0) // (SPI) Clock Polarity -#define AT91C_SPI_NCPHA (0x1u << 1) // (SPI) Clock Phase -#define AT91C_SPI_BITS (0xFu << 4) // (SPI) Bits Per Transfer -#define AT91C_SPI_BITS_8 (0x0u << 4) // (SPI) 8 Bits Per transfer -#define AT91C_SPI_BITS_9 (0x1u << 4) // (SPI) 9 Bits Per transfer -#define AT91C_SPI_BITS_10 (0x2u << 4) // (SPI) 10 Bits Per transfer -#define AT91C_SPI_BITS_11 (0x3u << 4) // (SPI) 11 Bits Per transfer -#define AT91C_SPI_BITS_12 (0x4u << 4) // (SPI) 12 Bits Per transfer -#define AT91C_SPI_BITS_13 (0x5u << 4) // (SPI) 13 Bits Per transfer -#define AT91C_SPI_BITS_14 (0x6u << 4) // (SPI) 14 Bits Per transfer -#define AT91C_SPI_BITS_15 (0x7u << 4) // (SPI) 15 Bits Per transfer -#define AT91C_SPI_BITS_16 (0x8u << 4) // (SPI) 16 Bits Per transfer -#define AT91C_SPI_SCBR (0xFFu << 8) // (SPI) Serial Clock Baud Rate -#define AT91C_SPI_DLYBS (0xFFu << 16) // (SPI) Serial Clock Baud Rate -#define AT91C_SPI_DLYBCT (0xFFu << 24) // (SPI) Delay Between Consecutive Transfers +#define AT91C_SPI_CPOL (0x1u << 0) // (SPI) Clock Polarity +#define AT91C_SPI_NCPHA (0x1u << 1) // (SPI) Clock Phase +#define AT91C_SPI_BITS (0xFu << 4) // (SPI) Bits Per Transfer +#define AT91C_SPI_BITS_8 (0x0u << 4) // (SPI) 8 Bits Per transfer +#define AT91C_SPI_BITS_9 (0x1u << 4) // (SPI) 9 Bits Per transfer +#define AT91C_SPI_BITS_10 (0x2u << 4) // (SPI) 10 Bits Per transfer +#define AT91C_SPI_BITS_11 (0x3u << 4) // (SPI) 11 Bits Per transfer +#define AT91C_SPI_BITS_12 (0x4u << 4) // (SPI) 12 Bits Per transfer +#define AT91C_SPI_BITS_13 (0x5u << 4) // (SPI) 13 Bits Per transfer +#define AT91C_SPI_BITS_14 (0x6u << 4) // (SPI) 14 Bits Per transfer +#define AT91C_SPI_BITS_15 (0x7u << 4) // (SPI) 15 Bits Per transfer +#define AT91C_SPI_BITS_16 (0x8u << 4) // (SPI) 16 Bits Per transfer +#define AT91C_SPI_SCBR (0xFFu << 8) // (SPI) Serial Clock Baud Rate +#define AT91C_SPI_DLYBS (0xFFu << 16) // (SPI) Serial Clock Baud Rate +#define AT91C_SPI_DLYBCT (0xFFu << 24) // (SPI) Delay Between Consecutive Transfers // ***************************************************************************** // SOFTWARE API DEFINITION FOR Synchronous Serial Controller Interface @@ -877,72 +877,72 @@ } AT91S_SSC, *AT91PS_SSC; // -------- SSC_CR : (SSC Offset: 0x0) SSC Control Register -------- -#define AT91C_SSC_RXEN (0x1u << 0) // (SSC) Receive Enable -#define AT91C_SSC_RXDIS (0x1u << 1) // (SSC) Receive Disable -#define AT91C_SSC_TXEN (0x1u << 8) // (SSC) Transmit Enable -#define AT91C_SSC_TXDIS (0x1u << 9) // (SSC) Transmit Disable -#define AT91C_SSC_SWRST (0x1u << 15) // (SSC) Software Reset +#define AT91C_SSC_RXEN (0x1u << 0) // (SSC) Receive Enable +#define AT91C_SSC_RXDIS (0x1u << 1) // (SSC) Receive Disable +#define AT91C_SSC_TXEN (0x1u << 8) // (SSC) Transmit Enable +#define AT91C_SSC_TXDIS (0x1u << 9) // (SSC) Transmit Disable +#define AT91C_SSC_SWRST (0x1u << 15) // (SSC) Software Reset // -------- SSC_RCMR : (SSC Offset: 0x10) SSC Receive Clock Mode Register -------- -#define AT91C_SSC_CKS (0x3u << 0) // (SSC) Receive/Transmit Clock Selection -#define AT91C_SSC_CKS_DIV 0x0u // (SSC) Divided Clock -#define AT91C_SSC_CKS_TK 0x1u // (SSC) TK Clock signal -#define AT91C_SSC_CKS_RK 0x2u // (SSC) RK pin -#define AT91C_SSC_CKO (0x7u << 2) // (SSC) Receive/Transmit Clock Output Mode Selection -#define AT91C_SSC_CKO_NONE (0x0u << 2) // (SSC) Receive/Transmit Clock Output Mode: None RK pin: Input-only -#define AT91C_SSC_CKO_CONTINOUS (0x1u << 2) // (SSC) Continuous Receive/Transmit Clock RK pin: Output -#define AT91C_SSC_CKO_DATA_TX (0x2u << 2) // (SSC) Receive/Transmit Clock only during data transfers RK pin: Output -#define AT91C_SSC_CKI (0x1u << 5) // (SSC) Receive/Transmit Clock Inversion -#define AT91C_SSC_CKG (0x3u << 6) // (SSC) Receive/Transmit Clock Gating Selection -#define AT91C_SSC_CKG_NONE (0x0u << 6) // (SSC) Receive/Transmit Clock Gating: None, continuous clock -#define AT91C_SSC_CKG_LOW (0x1u << 6) // (SSC) Receive/Transmit Clock enabled only if RF Low -#define AT91C_SSC_CKG_HIGH (0x2u << 6) // (SSC) Receive/Transmit Clock enabled only if RF High -#define AT91C_SSC_START (0xFu << 8) // (SSC) Receive/Transmit Start Selection -#define AT91C_SSC_START_CONTINOUS (0x0u << 8) // (SSC) Continuous, as soon as the receiver is enabled, and immediately after the end of transfer of the previous data. -#define AT91C_SSC_START_TX (0x1u << 8) // (SSC) Transmit/Receive start -#define AT91C_SSC_START_LOW_RF (0x2u << 8) // (SSC) Detection of a low level on RF input -#define AT91C_SSC_START_HIGH_RF (0x3u << 8) // (SSC) Detection of a high level on RF input -#define AT91C_SSC_START_FALL_RF (0x4u << 8) // (SSC) Detection of a falling edge on RF input -#define AT91C_SSC_START_RISE_RF (0x5u << 8) // (SSC) Detection of a rising edge on RF input -#define AT91C_SSC_START_LEVEL_RF (0x6u << 8) // (SSC) Detection of any level change on RF input -#define AT91C_SSC_START_EDGE_RF (0x7u << 8) // (SSC) Detection of any edge on RF input -#define AT91C_SSC_START_0 (0x8u << 8) // (SSC) Compare 0 -#define AT91C_SSC_STOP (0x1u << 12) // (SSC) Receive Stop Selection -#define AT91C_SSC_STTOUT (0x1u << 15) // (SSC) Receive/Transmit Start Output Selection -#define AT91C_SSC_STTDLY (0xFFu << 16) // (SSC) Receive/Transmit Start Delay -#define AT91C_SSC_PERIOD (0xFFu << 24) // (SSC) Receive/Transmit Period Divider Selection +#define AT91C_SSC_CKS (0x3u << 0) // (SSC) Receive/Transmit Clock Selection +#define AT91C_SSC_CKS_DIV 0x0u // (SSC) Divided Clock +#define AT91C_SSC_CKS_TK 0x1u // (SSC) TK Clock signal +#define AT91C_SSC_CKS_RK 0x2u // (SSC) RK pin +#define AT91C_SSC_CKO (0x7u << 2) // (SSC) Receive/Transmit Clock Output Mode Selection +#define AT91C_SSC_CKO_NONE (0x0u << 2) // (SSC) Receive/Transmit Clock Output Mode: None RK pin: Input-only +#define AT91C_SSC_CKO_CONTINOUS (0x1u << 2) // (SSC) Continuous Receive/Transmit Clock RK pin: Output +#define AT91C_SSC_CKO_DATA_TX (0x2u << 2) // (SSC) Receive/Transmit Clock only during data transfers RK pin: Output +#define AT91C_SSC_CKI (0x1u << 5) // (SSC) Receive/Transmit Clock Inversion +#define AT91C_SSC_CKG (0x3u << 6) // (SSC) Receive/Transmit Clock Gating Selection +#define AT91C_SSC_CKG_NONE (0x0u << 6) // (SSC) Receive/Transmit Clock Gating: None, continuous clock +#define AT91C_SSC_CKG_LOW (0x1u << 6) // (SSC) Receive/Transmit Clock enabled only if RF Low +#define AT91C_SSC_CKG_HIGH (0x2u << 6) // (SSC) Receive/Transmit Clock enabled only if RF High +#define AT91C_SSC_START (0xFu << 8) // (SSC) Receive/Transmit Start Selection +#define AT91C_SSC_START_CONTINOUS (0x0u << 8) // (SSC) Continuous, as soon as the receiver is enabled, and immediately after the end of transfer of the previous data. +#define AT91C_SSC_START_TX (0x1u << 8) // (SSC) Transmit/Receive start +#define AT91C_SSC_START_LOW_RF (0x2u << 8) // (SSC) Detection of a low level on RF input +#define AT91C_SSC_START_HIGH_RF (0x3u << 8) // (SSC) Detection of a high level on RF input +#define AT91C_SSC_START_FALL_RF (0x4u << 8) // (SSC) Detection of a falling edge on RF input +#define AT91C_SSC_START_RISE_RF (0x5u << 8) // (SSC) Detection of a rising edge on RF input +#define AT91C_SSC_START_LEVEL_RF (0x6u << 8) // (SSC) Detection of any level change on RF input +#define AT91C_SSC_START_EDGE_RF (0x7u << 8) // (SSC) Detection of any edge on RF input +#define AT91C_SSC_START_0 (0x8u << 8) // (SSC) Compare 0 +#define AT91C_SSC_STOP (0x1u << 12) // (SSC) Receive Stop Selection +#define AT91C_SSC_STTOUT (0x1u << 15) // (SSC) Receive/Transmit Start Output Selection +#define AT91C_SSC_STTDLY (0xFFu << 16) // (SSC) Receive/Transmit Start Delay +#define AT91C_SSC_PERIOD (0xFFu << 24) // (SSC) Receive/Transmit Period Divider Selection // -------- SSC_RFMR : (SSC Offset: 0x14) SSC Receive Frame Mode Register -------- -#define AT91C_SSC_DATLEN (0x1Fu << 0) // (SSC) Data Length -#define AT91C_SSC_LOOP (0x1u << 5) // (SSC) Loop Mode -#define AT91C_SSC_MSBF (0x1u << 7) // (SSC) Most Significant Bit First -#define AT91C_SSC_DATNB (0xFu << 8) // (SSC) Data Number per Frame -#define AT91C_SSC_FSLEN (0xFu << 16) // (SSC) Receive/Transmit Frame Sync length -#define AT91C_SSC_FSOS (0x7u << 20) // (SSC) Receive/Transmit Frame Sync Output Selection -#define AT91C_SSC_FSOS_NONE (0x0u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: None RK pin Input-only -#define AT91C_SSC_FSOS_NEGATIVE (0x1u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Negative Pulse -#define AT91C_SSC_FSOS_POSITIVE (0x2u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Positive Pulse -#define AT91C_SSC_FSOS_LOW (0x3u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Driver Low during data transfer -#define AT91C_SSC_FSOS_HIGH (0x4u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Driver High during data transfer -#define AT91C_SSC_FSOS_TOGGLE (0x5u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Toggling at each start of data transfer -#define AT91C_SSC_FSEDGE (0x1u << 24) // (SSC) Frame Sync Edge Detection +#define AT91C_SSC_DATLEN (0x1Fu << 0) // (SSC) Data Length +#define AT91C_SSC_LOOP (0x1u << 5) // (SSC) Loop Mode +#define AT91C_SSC_MSBF (0x1u << 7) // (SSC) Most Significant Bit First +#define AT91C_SSC_DATNB (0xFu << 8) // (SSC) Data Number per Frame +#define AT91C_SSC_FSLEN (0xFu << 16) // (SSC) Receive/Transmit Frame Sync length +#define AT91C_SSC_FSOS (0x7u << 20) // (SSC) Receive/Transmit Frame Sync Output Selection +#define AT91C_SSC_FSOS_NONE (0x0u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: None RK pin Input-only +#define AT91C_SSC_FSOS_NEGATIVE (0x1u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Negative Pulse +#define AT91C_SSC_FSOS_POSITIVE (0x2u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Positive Pulse +#define AT91C_SSC_FSOS_LOW (0x3u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Driver Low during data transfer +#define AT91C_SSC_FSOS_HIGH (0x4u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Driver High during data transfer +#define AT91C_SSC_FSOS_TOGGLE (0x5u << 20) // (SSC) Selected Receive/Transmit Frame Sync Signal: Toggling at each start of data transfer +#define AT91C_SSC_FSEDGE (0x1u << 24) // (SSC) Frame Sync Edge Detection // -------- SSC_TCMR : (SSC Offset: 0x18) SSC Transmit Clock Mode Register -------- // -------- SSC_TFMR : (SSC Offset: 0x1c) SSC Transmit Frame Mode Register -------- -#define AT91C_SSC_DATDEF (0x1u << 5) // (SSC) Data Default Value -#define AT91C_SSC_FSDEN (0x1u << 23) // (SSC) Frame Sync Data Enable +#define AT91C_SSC_DATDEF (0x1u << 5) // (SSC) Data Default Value +#define AT91C_SSC_FSDEN (0x1u << 23) // (SSC) Frame Sync Data Enable // -------- SSC_SR : (SSC Offset: 0x40) SSC Status Register -------- -#define AT91C_SSC_TXRDY (0x1u << 0) // (SSC) Transmit Ready -#define AT91C_SSC_TXEMPTY (0x1u << 1) // (SSC) Transmit Empty -#define AT91C_SSC_ENDTX (0x1u << 2) // (SSC) End Of Transmission -#define AT91C_SSC_TXBUFE (0x1u << 3) // (SSC) Transmit Buffer Empty -#define AT91C_SSC_RXRDY (0x1u << 4) // (SSC) Receive Ready -#define AT91C_SSC_OVRUN (0x1u << 5) // (SSC) Receive Overrun -#define AT91C_SSC_ENDRX (0x1u << 6) // (SSC) End of Reception -#define AT91C_SSC_RXBUFF (0x1u << 7) // (SSC) Receive Buffer Full -#define AT91C_SSC_CP0 (0x1u << 8) // (SSC) Compare 0 -#define AT91C_SSC_CP1 (0x1u << 9) // (SSC) Compare 1 -#define AT91C_SSC_TXSYN (0x1u << 10) // (SSC) Transmit Sync -#define AT91C_SSC_RXSYN (0x1u << 11) // (SSC) Receive Sync -#define AT91C_SSC_TXENA (0x1u << 16) // (SSC) Transmit Enable -#define AT91C_SSC_RXENA (0x1u << 17) // (SSC) Receive Enable +#define AT91C_SSC_TXRDY (0x1u << 0) // (SSC) Transmit Ready +#define AT91C_SSC_TXEMPTY (0x1u << 1) // (SSC) Transmit Empty +#define AT91C_SSC_ENDTX (0x1u << 2) // (SSC) End Of Transmission +#define AT91C_SSC_TXBUFE (0x1u << 3) // (SSC) Transmit Buffer Empty +#define AT91C_SSC_RXRDY (0x1u << 4) // (SSC) Receive Ready +#define AT91C_SSC_OVRUN (0x1u << 5) // (SSC) Receive Overrun +#define AT91C_SSC_ENDRX (0x1u << 6) // (SSC) End of Reception +#define AT91C_SSC_RXBUFF (0x1u << 7) // (SSC) Receive Buffer Full +#define AT91C_SSC_CP0 (0x1u << 8) // (SSC) Compare 0 +#define AT91C_SSC_CP1 (0x1u << 9) // (SSC) Compare 1 +#define AT91C_SSC_TXSYN (0x1u << 10) // (SSC) Transmit Sync +#define AT91C_SSC_RXSYN (0x1u << 11) // (SSC) Receive Sync +#define AT91C_SSC_TXENA (0x1u << 16) // (SSC) Transmit Enable +#define AT91C_SSC_RXENA (0x1u << 17) // (SSC) Receive Enable // -------- SSC_IER : (SSC Offset: 0x44) SSC Interrupt Enable Register -------- // -------- SSC_IDR : (SSC Offset: 0x48) SSC Interrupt Disable Register -------- // -------- SSC_IMR : (SSC Offset: 0x4c) SSC Interrupt Mask Register -------- @@ -981,67 +981,67 @@ } AT91S_USART, *AT91PS_USART; // -------- US_CR : (USART Offset: 0x0) Debug Unit Control Register -------- -#define AT91C_US_RSTSTA (0x1u << 8) // (USART) Reset Status Bits -#define AT91C_US_STTBRK (0x1u << 9) // (USART) Start Break -#define AT91C_US_STPBRK (0x1u << 10) // (USART) Stop Break -#define AT91C_US_STTTO (0x1u << 11) // (USART) Start Time-out -#define AT91C_US_SENDA (0x1u << 12) // (USART) Send Address -#define AT91C_US_RSTIT (0x1u << 13) // (USART) Reset Iterations -#define AT91C_US_RSTNACK (0x1u << 14) // (USART) Reset Non Acknowledge -#define AT91C_US_RETTO (0x1u << 15) // (USART) Rearm Time-out -#define AT91C_US_DTREN (0x1u << 16) // (USART) Data Terminal ready Enable -#define AT91C_US_DTRDIS (0x1u << 17) // (USART) Data Terminal ready Disable -#define AT91C_US_RTSEN (0x1u << 18) // (USART) Request to Send enable -#define AT91C_US_RTSDIS (0x1u << 19) // (USART) Request to Send Disable +#define AT91C_US_RSTSTA (0x1u << 8) // (USART) Reset Status Bits +#define AT91C_US_STTBRK (0x1u << 9) // (USART) Start Break +#define AT91C_US_STPBRK (0x1u << 10) // (USART) Stop Break +#define AT91C_US_STTTO (0x1u << 11) // (USART) Start Time-out +#define AT91C_US_SENDA (0x1u << 12) // (USART) Send Address +#define AT91C_US_RSTIT (0x1u << 13) // (USART) Reset Iterations +#define AT91C_US_RSTNACK (0x1u << 14) // (USART) Reset Non Acknowledge +#define AT91C_US_RETTO (0x1u << 15) // (USART) Rearm Time-out +#define AT91C_US_DTREN (0x1u << 16) // (USART) Data Terminal ready Enable +#define AT91C_US_DTRDIS (0x1u << 17) // (USART) Data Terminal ready Disable +#define AT91C_US_RTSEN (0x1u << 18) // (USART) Request to Send enable +#define AT91C_US_RTSDIS (0x1u << 19) // (USART) Request to Send Disable // -------- US_MR : (USART Offset: 0x4) Debug Unit Mode Register -------- -#define AT91C_US_USMODE (0xFu << 0) // (USART) Usart mode -#define AT91C_US_USMODE_NORMAL 0x0u // (USART) Normal -#define AT91C_US_USMODE_RS485 0x1u // (USART) RS485 -#define AT91C_US_USMODE_HWHSH 0x2u // (USART) Hardware Handshaking -#define AT91C_US_USMODE_MODEM 0x3u // (USART) Modem -#define AT91C_US_USMODE_ISO7816_0 0x4u // (USART) ISO7816 protocol: T = 0 -#define AT91C_US_USMODE_ISO7816_1 0x6u // (USART) ISO7816 protocol: T = 1 -#define AT91C_US_USMODE_IRDA 0x8u // (USART) IrDA -#define AT91C_US_USMODE_SWHSH 0xCu // (USART) Software Handshaking -#define AT91C_US_CLKS (0x3u << 4) // (USART) Clock Selection (Baud Rate generator Input Clock -#define AT91C_US_CLKS_CLOCK (0x0u << 4) // (USART) Clock -#define AT91C_US_CLKS_FDIV1 (0x1u << 4) // (USART) fdiv1 -#define AT91C_US_CLKS_SLOW (0x2u << 4) // (USART) slow_clock (ARM) -#define AT91C_US_CLKS_EXT (0x3u << 4) // (USART) External (SCK) -#define AT91C_US_CHRL (0x3u << 6) // (USART) Clock Selection (Baud Rate generator Input Clock -#define AT91C_US_CHRL_5_BITS (0x0u << 6) // (USART) Character Length: 5 bits -#define AT91C_US_CHRL_6_BITS (0x1u << 6) // (USART) Character Length: 6 bits -#define AT91C_US_CHRL_7_BITS (0x2u << 6) // (USART) Character Length: 7 bits -#define AT91C_US_CHRL_8_BITS (0x3u << 6) // (USART) Character Length: 8 bits -#define AT91C_US_SYNC (0x1u << 8) // (USART) Synchronous Mode Select -#define AT91C_US_NBSTOP (0x3u << 12) // (USART) Number of Stop bits -#define AT91C_US_NBSTOP_1_BIT (0x0u << 12) // (USART) 1 stop bit -#define AT91C_US_NBSTOP_15_BIT (0x1u << 12) // (USART) Asynchronous (SYNC=0) 2 stop bits Synchronous (SYNC=1) 2 stop bits -#define AT91C_US_NBSTOP_2_BIT (0x2u << 12) // (USART) 2 stop bits -#define AT91C_US_MSBF (0x1u << 16) // (USART) Bit Order -#define AT91C_US_MODE9 (0x1u << 17) // (USART) 9-bit Character length -#define AT91C_US_CKLO (0x1u << 18) // (USART) Clock Output Select -#define AT91C_US_OVER (0x1u << 19) // (USART) Over Sampling Mode -#define AT91C_US_INACK (0x1u << 20) // (USART) Inhibit Non Acknowledge -#define AT91C_US_DSNACK (0x1u << 21) // (USART) Disable Successive NACK -#define AT91C_US_MAX_ITER (0x1u << 24) // (USART) Number of Repetitions -#define AT91C_US_FILTER (0x1u << 28) // (USART) Receive Line Filter +#define AT91C_US_USMODE (0xFu << 0) // (USART) Usart mode +#define AT91C_US_USMODE_NORMAL 0x0u // (USART) Normal +#define AT91C_US_USMODE_RS485 0x1u // (USART) RS485 +#define AT91C_US_USMODE_HWHSH 0x2u // (USART) Hardware Handshaking +#define AT91C_US_USMODE_MODEM 0x3u // (USART) Modem +#define AT91C_US_USMODE_ISO7816_0 0x4u // (USART) ISO7816 protocol: T = 0 +#define AT91C_US_USMODE_ISO7816_1 0x6u // (USART) ISO7816 protocol: T = 1 +#define AT91C_US_USMODE_IRDA 0x8u // (USART) IrDA +#define AT91C_US_USMODE_SWHSH 0xCu // (USART) Software Handshaking +#define AT91C_US_CLKS (0x3u << 4) // (USART) Clock Selection (Baud Rate generator Input Clock +#define AT91C_US_CLKS_CLOCK (0x0u << 4) // (USART) Clock +#define AT91C_US_CLKS_FDIV1 (0x1u << 4) // (USART) fdiv1 +#define AT91C_US_CLKS_SLOW (0x2u << 4) // (USART) slow_clock (ARM) +#define AT91C_US_CLKS_EXT (0x3u << 4) // (USART) External (SCK) +#define AT91C_US_CHRL (0x3u << 6) // (USART) Clock Selection (Baud Rate generator Input Clock +#define AT91C_US_CHRL_5_BITS (0x0u << 6) // (USART) Character Length: 5 bits +#define AT91C_US_CHRL_6_BITS (0x1u << 6) // (USART) Character Length: 6 bits +#define AT91C_US_CHRL_7_BITS (0x2u << 6) // (USART) Character Length: 7 bits +#define AT91C_US_CHRL_8_BITS (0x3u << 6) // (USART) Character Length: 8 bits +#define AT91C_US_SYNC (0x1u << 8) // (USART) Synchronous Mode Select +#define AT91C_US_NBSTOP (0x3u << 12) // (USART) Number of Stop bits +#define AT91C_US_NBSTOP_1_BIT (0x0u << 12) // (USART) 1 stop bit +#define AT91C_US_NBSTOP_15_BIT (0x1u << 12) // (USART) Asynchronous (SYNC=0) 2 stop bits Synchronous (SYNC=1) 2 stop bits +#define AT91C_US_NBSTOP_2_BIT (0x2u << 12) // (USART) 2 stop bits +#define AT91C_US_MSBF (0x1u << 16) // (USART) Bit Order +#define AT91C_US_MODE9 (0x1u << 17) // (USART) 9-bit Character length +#define AT91C_US_CKLO (0x1u << 18) // (USART) Clock Output Select +#define AT91C_US_OVER (0x1u << 19) // (USART) Over Sampling Mode +#define AT91C_US_INACK (0x1u << 20) // (USART) Inhibit Non Acknowledge +#define AT91C_US_DSNACK (0x1u << 21) // (USART) Disable Successive NACK +#define AT91C_US_MAX_ITER (0x1u << 24) // (USART) Number of Repetitions +#define AT91C_US_FILTER (0x1u << 28) // (USART) Receive Line Filter // -------- US_IER : (USART Offset: 0x8) Debug Unit Interrupt Enable Register -------- -#define AT91C_US_RXBRK (0x1u << 2) // (USART) Break Received/End of Break -#define AT91C_US_TIMEOUT (0x1u << 8) // (USART) Receiver Time-out -#define AT91C_US_ITERATION (0x1u << 10) // (USART) Max number of Repetitions Reached -#define AT91C_US_NACK (0x1u << 13) // (USART) Non Acknowledge -#define AT91C_US_RIIC (0x1u << 16) // (USART) Ring INdicator Input Change Flag -#define AT91C_US_DSRIC (0x1u << 17) // (USART) Data Set Ready Input Change Flag -#define AT91C_US_DCDIC (0x1u << 18) // (USART) Data Carrier Flag -#define AT91C_US_CTSIC (0x1u << 19) // (USART) Clear To Send Input Change Flag +#define AT91C_US_RXBRK (0x1u << 2) // (USART) Break Received/End of Break +#define AT91C_US_TIMEOUT (0x1u << 8) // (USART) Receiver Time-out +#define AT91C_US_ITERATION (0x1u << 10) // (USART) Max number of Repetitions Reached +#define AT91C_US_NACK (0x1u << 13) // (USART) Non Acknowledge +#define AT91C_US_RIIC (0x1u << 16) // (USART) Ring INdicator Input Change Flag +#define AT91C_US_DSRIC (0x1u << 17) // (USART) Data Set Ready Input Change Flag +#define AT91C_US_DCDIC (0x1u << 18) // (USART) Data Carrier Flag +#define AT91C_US_CTSIC (0x1u << 19) // (USART) Clear To Send Input Change Flag // -------- US_IDR : (USART Offset: 0xc) Debug Unit Interrupt Disable Register -------- // -------- US_IMR : (USART Offset: 0x10) Debug Unit Interrupt Mask Register -------- // -------- US_CSR : (USART Offset: 0x14) Debug Unit Channel Status Register -------- -#define AT91C_US_RI (0x1u << 20) // (USART) Image of RI Input -#define AT91C_US_DSR (0x1u << 21) // (USART) Image of DSR Input -#define AT91C_US_DCD (0x1u << 22) // (USART) Image of DCD Input -#define AT91C_US_CTS (0x1u << 23) // (USART) Image of CTS Input +#define AT91C_US_RI (0x1u << 20) // (USART) Image of RI Input +#define AT91C_US_DSR (0x1u << 21) // (USART) Image of DSR Input +#define AT91C_US_DCD (0x1u << 22) // (USART) Image of DCD Input +#define AT91C_US_CTS (0x1u << 23) // (USART) Image of CTS Input // ***************************************************************************** // SOFTWARE API DEFINITION FOR Two-wire Interface @@ -1062,38 +1062,38 @@ } AT91S_TWI, *AT91PS_TWI; // -------- TWI_CR : (TWI Offset: 0x0) TWI Control Register -------- -#define AT91C_TWI_START (0x1u << 0) // (TWI) Send a START Condition -#define AT91C_TWI_STOP (0x1u << 1) // (TWI) Send a STOP Condition -#define AT91C_TWI_MSEN (0x1u << 2) // (TWI) TWI Master Transfer Enabled -#define AT91C_TWI_MSDIS (0x1u << 3) // (TWI) TWI Master Transfer Disabled -#define AT91C_TWI_SVEN (0x1u << 4) // (TWI) TWI Slave Transfer Enabled -#define AT91C_TWI_SVDIS (0x1u << 5) // (TWI) TWI Slave Transfer Disabled -#define AT91C_TWI_SWRST (0x1u << 7) // (TWI) Software Reset +#define AT91C_TWI_START (0x1u << 0) // (TWI) Send a START Condition +#define AT91C_TWI_STOP (0x1u << 1) // (TWI) Send a STOP Condition +#define AT91C_TWI_MSEN (0x1u << 2) // (TWI) TWI Master Transfer Enabled +#define AT91C_TWI_MSDIS (0x1u << 3) // (TWI) TWI Master Transfer Disabled +#define AT91C_TWI_SVEN (0x1u << 4) // (TWI) TWI Slave Transfer Enabled +#define AT91C_TWI_SVDIS (0x1u << 5) // (TWI) TWI Slave Transfer Disabled +#define AT91C_TWI_SWRST (0x1u << 7) // (TWI) Software Reset // -------- TWI_MMR : (TWI Offset: 0x4) TWI Master Mode Register -------- -#define AT91C_TWI_IADRSZ (0x3u << 8) // (TWI) Internal Device Address Size -#define AT91C_TWI_IADRSZ_NO (0x0u << 8) // (TWI) No internal device address -#define AT91C_TWI_IADRSZ_1_BYTE (0x1u << 8) // (TWI) One-byte internal device address -#define AT91C_TWI_IADRSZ_2_BYTE (0x2u << 8) // (TWI) Two-byte internal device address -#define AT91C_TWI_IADRSZ_3_BYTE (0x3u << 8) // (TWI) Three-byte internal device address -#define AT91C_TWI_MREAD (0x1u << 12) // (TWI) Master Read Direction -#define AT91C_TWI_DADR (0x7Fu << 16) // (TWI) Device Address +#define AT91C_TWI_IADRSZ (0x3u << 8) // (TWI) Internal Device Address Size +#define AT91C_TWI_IADRSZ_NO (0x0u << 8) // (TWI) No internal device address +#define AT91C_TWI_IADRSZ_1_BYTE (0x1u << 8) // (TWI) One-byte internal device address +#define AT91C_TWI_IADRSZ_2_BYTE (0x2u << 8) // (TWI) Two-byte internal device address +#define AT91C_TWI_IADRSZ_3_BYTE (0x3u << 8) // (TWI) Three-byte internal device address +#define AT91C_TWI_MREAD (0x1u << 12) // (TWI) Master Read Direction +#define AT91C_TWI_DADR (0x7Fu << 16) // (TWI) Device Address // -------- TWI_SMR : (TWI Offset: 0x8) TWI Slave Mode Register -------- -#define AT91C_TWI_SADR (0x7Fu << 16) // (TWI) Slave Device Address +#define AT91C_TWI_SADR (0x7Fu << 16) // (TWI) Slave Device Address // -------- TWI_CWGR : (TWI Offset: 0x10) TWI Clock Waveform Generator Register -------- -#define AT91C_TWI_CLDIV (0xFFu << 0) // (TWI) Clock Low Divider -#define AT91C_TWI_CHDIV (0xFFu << 8) // (TWI) Clock High Divider -#define AT91C_TWI_CKDIV (0x7u << 16) // (TWI) Clock Divider +#define AT91C_TWI_CLDIV (0xFFu << 0) // (TWI) Clock Low Divider +#define AT91C_TWI_CHDIV (0xFFu << 8) // (TWI) Clock High Divider +#define AT91C_TWI_CKDIV (0x7u << 16) // (TWI) Clock Divider // -------- TWI_SR : (TWI Offset: 0x20) TWI Status Register -------- -#define AT91C_TWI_TXCOMP (0x1u << 0) // (TWI) Transmission Completed -#define AT91C_TWI_RXRDY (0x1u << 1) // (TWI) Receive holding register ReaDY -#define AT91C_TWI_TXRDY (0x1u << 2) // (TWI) Transmit holding register ReaDY -#define AT91C_TWI_SVREAD (0x1u << 3) // (TWI) Slave Read -#define AT91C_TWI_SVACC (0x1u << 4) // (TWI) Slave Access -#define AT91C_TWI_GCACC (0x1u << 5) // (TWI) General Call Access -#define AT91C_TWI_OVRE (0x1u << 6) // (TWI) Overrun Error -#define AT91C_TWI_UNRE (0x1u << 7) // (TWI) Underrun Error -#define AT91C_TWI_NACK (0x1u << 8) // (TWI) Not Acknowledged -#define AT91C_TWI_ARBLST (0x1u << 9) // (TWI) Arbitration Lost +#define AT91C_TWI_TXCOMP (0x1u << 0) // (TWI) Transmission Completed +#define AT91C_TWI_RXRDY (0x1u << 1) // (TWI) Receive holding register ReaDY +#define AT91C_TWI_TXRDY (0x1u << 2) // (TWI) Transmit holding register ReaDY +#define AT91C_TWI_SVREAD (0x1u << 3) // (TWI) Slave Read +#define AT91C_TWI_SVACC (0x1u << 4) // (TWI) Slave Access +#define AT91C_TWI_GCACC (0x1u << 5) // (TWI) General Call Access +#define AT91C_TWI_OVRE (0x1u << 6) // (TWI) Overrun Error +#define AT91C_TWI_UNRE (0x1u << 7) // (TWI) Underrun Error >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Apr 18 15:42:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1170216A43E; Tue, 18 Apr 2006 15:42:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1E6916A43B for ; Tue, 18 Apr 2006 15:42:44 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94AA943D76 for ; Tue, 18 Apr 2006 15:42:44 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IFgiZ7083610 for ; Tue, 18 Apr 2006 15:42:44 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IFgiZm083604 for perforce@freebsd.org; Tue, 18 Apr 2006 15:42:44 GMT (envelope-from marcel@freebsd.org) Date: Tue, 18 Apr 2006 15:42:44 GMT Message-Id: <200604181542.k3IFgiZm083604@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 Cc: Subject: PERFORCE change 95495 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 15:42:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=95495 Change 95495 by marcel@marcel_nfs on 2006/04/18 15:42:18 Return 0 when all is well. Affected files ... .. //depot/projects/uart/dev/puc/puc.c#26 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#26 (text+ko) ==== @@ -539,7 +539,7 @@ port->p_ihsrc[i] = NULL; } - return (ENXIO); + return (0); } int From owner-p4-projects@FreeBSD.ORG Tue Apr 18 16:32:53 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D470D16A406; Tue, 18 Apr 2006 16:32:52 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE2D116A403 for ; Tue, 18 Apr 2006 16:32:52 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6074543D76 for ; Tue, 18 Apr 2006 16:32:46 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IGWkHb014198 for ; Tue, 18 Apr 2006 16:32:46 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IGWjb1014192 for perforce@freebsd.org; Tue, 18 Apr 2006 16:32:45 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 16:32:45 GMT Message-Id: <200604181632.k3IGWjb1014192@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95498 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 16:32:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=95498 Change 95498 by imp@imp_hammer on 2006/04/18 16:32:20 Move Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.h#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#7 (text+ko) ==== @@ -2,7 +2,7 @@ P=bootiic FILES=${P} -SRCS=arm_init.s main.c eeprom.c \ +SRCS=arm_init.s main.c \ env_vars.c loader_prompt.c p_string.c emac.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: eeprom.c * @@ -17,25 +17,27 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + *****************************************************************************/ #include "at91rm9200_lowlevel.h" -#include "eeprom.h" #include "at91rm9200.h" #include "lib.h" -/* ****************************** GLOBALS *************************************/ +/******************************* GLOBALS *************************************/ -/* ********************** PRIVATE FUNCTIONS/DATA ******************************/ +/*********************** PRIVATE FUNCTIONS/DATA ******************************/ /* Use a macro to calculate the TWI clock generator value to save code space. */ +#define AT91C_TWSI_CLOCK 100000 +#define TWSI_EEPROM_ADDRESS 0x50 + #define TWI_CLK_BASE_DIV ((AT91C_MASTER_CLOCK/(4*AT91C_TWSI_CLOCK)) - 2) #define SET_TWI_CLOCK ((0x00010000) | (TWI_CLK_BASE_DIV) | (TWI_CLK_BASE_DIV << 8)) -/* ************************** GLOBAL FUNCTIONS ********************************/ +/*************************** GLOBAL FUNCTIONS ********************************/ /* @@ -78,8 +80,9 @@ * This function does not utilize the page read mode to simplify the code. * .KB_C_FN_DEFINITION_END */ -void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size) { - +void +ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size) +{ const AT91PS_TWI twiPtr = AT91C_BASE_TWI; unsigned int status; @@ -87,7 +90,8 @@ status = twiPtr->TWI_RHR; // Set the TWI Master Mode Register - twiPtr->TWI_MMR = (TWSI_EEPROM_ADDRESS << 16) | AT91C_TWI_IADRSZ_2_BYTE | AT91C_TWI_MREAD; + twiPtr->TWI_MMR = (TWSI_EEPROM_ADDRESS << 16) | + AT91C_TWI_IADRSZ_2_BYTE | AT91C_TWI_MREAD; // Set TWI Internal Address Register twiPtr->TWI_IADR = ee_addr; @@ -100,7 +104,8 @@ while (size-- > 1){ // Wait RHR Holding register is full - while (!(twiPtr->TWI_SR & AT91C_TWI_RXRDY)); + while (!(twiPtr->TWI_SR & AT91C_TWI_RXRDY)) + continue; // Read byte *(data_addr++) = twiPtr->TWI_RHR; @@ -111,7 +116,8 @@ status = twiPtr->TWI_SR; // Wait transfer is finished - while (!(twiPtr->TWI_SR & AT91C_TWI_TXCOMP)); + while (!(twiPtr->TWI_SR & AT91C_TWI_TXCOMP)) + continue; // Read last byte *data_addr = twiPtr->TWI_RHR; @@ -128,8 +134,9 @@ * functionality. This allows the function to be much simpler. * .KB_C_FN_DEFINITION_END */ -void WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size) { - +void +WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size) +{ const AT91PS_TWI twiPtr = AT91C_BASE_TWI; unsigned status; char test_data; @@ -139,7 +146,8 @@ putchar('.'); // Set the TWI Master Mode Register - twiPtr->TWI_MMR = ((TWSI_EEPROM_ADDRESS << 16) | AT91C_TWI_IADRSZ_2_BYTE ) & ~AT91C_TWI_MREAD; + twiPtr->TWI_MMR = ((TWSI_EEPROM_ADDRESS << 16) | + AT91C_TWI_IADRSZ_2_BYTE) & ~AT91C_TWI_MREAD; // Set TWI Internal Address Register twiPtr->TWI_IADR = ee_addr++; @@ -151,14 +159,16 @@ twiPtr->TWI_CR = AT91C_TWI_START; // Wait transfer is finished - while (!(twiPtr->TWI_SR & AT91C_TWI_TXRDY)); + while (!(twiPtr->TWI_SR & AT91C_TWI_TXRDY)) + continue; twiPtr->TWI_CR = AT91C_TWI_STOP; status = twiPtr->TWI_SR; // Wait transfer is finished - while (!(twiPtr->TWI_SR & AT91C_TWI_TXCOMP)); + while (!(twiPtr->TWI_SR & AT91C_TWI_TXCOMP)) + continue; // wait for write operation to complete ReadEEPROM(ee_addr, &test_data, 1); ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.h#2 (text+ko) ==== @@ -22,13 +22,4 @@ #ifndef _EEPROM_H_ #define _EEPROM_H_ -#define AT91C_TWSI_CLOCK 100000 -#define TWSI_EEPROM_ADDRESS 0x50 - -/* The following function write eeprom at ee_addr using data */ -/* from data_add for size bytes. */ -extern void ReadEEPROM(unsigned ee_addr, char *data_addr, unsigned size); -extern void WriteEEPROM(unsigned ee_addr, char *data_addr, unsigned size); -extern void InitEEPROM(void); - #endif /* _EEPROM_H_ */ From owner-p4-projects@FreeBSD.ORG Tue Apr 18 17:40:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A42B616A409; Tue, 18 Apr 2006 17:40:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C68616A401 for ; Tue, 18 Apr 2006 17:40:13 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E0AD43D77 for ; Tue, 18 Apr 2006 17:40:08 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IHe8Jh055530 for ; Tue, 18 Apr 2006 17:40:08 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IHe7KM055527 for perforce@freebsd.org; Tue, 18 Apr 2006 17:40:07 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 17:40:07 GMT Message-Id: <200604181740.k3IHe7KM055527@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95500 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 17:40:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=95500 Change 95500 by imp@imp_hammer on 2006/04/18 17:39:41 Move more and more of bootiic into libat91. We'll be needing most of bootiic in bootspi. Unsure how to handle the 'stripting' that's in bootiic since it relies on data from the iic eeprom and writing to the spi eeprom is somewhat different. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#8 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.c#7 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/emac.h#4 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/p_string.c#4 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/p_string.h#4 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/tag_list.c#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/tag_list.h#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.h#1 branch Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#8 (text+ko) ==== @@ -2,8 +2,7 @@ P=bootiic FILES=${P} -SRCS=arm_init.s main.c \ - env_vars.c loader_prompt.c p_string.c emac.c +SRCS=arm_init.s main.c env_vars.c loader_prompt.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#4 (text+ko) ==== @@ -2,7 +2,8 @@ LIB= at91 INTERNALLIB= -SRCS=at91rm9200_lowlevel.c eeprom.c getc.c putchar.c printf.c xmodem.c +SRCS=at91rm9200_lowlevel.c eeprom.c getc.c putchar.c printf.c xmodem.c \ + emac.c p_string.c NO_MAN= .include From owner-p4-projects@FreeBSD.ORG Tue Apr 18 17:46:17 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 40EB416A40E; Tue, 18 Apr 2006 17:46:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CBBA16A40B for ; Tue, 18 Apr 2006 17:46:17 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48B3043D58 for ; Tue, 18 Apr 2006 17:46:16 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IHkGN6062907 for ; Tue, 18 Apr 2006 17:46:16 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IHkFdL062904 for perforce@freebsd.org; Tue, 18 Apr 2006 17:46:15 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 17:46:15 GMT Message-Id: <200604181746.k3IHkFdL062904@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95501 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 17:46:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=95501 Change 95501 by imp@imp_hammer on 2006/04/18 17:46:15 Move most of the boot loader into libat91 Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#9 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#7 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.h#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/linker.cfg#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#8 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.h#5 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/README#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/arm_init.s#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/linker.cfg#1 branch Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#9 (text+ko) ==== @@ -2,9 +2,9 @@ P=bootiic FILES=${P} -SRCS=arm_init.s main.c env_vars.c loader_prompt.c +SRCS=arm_init.s main.c NO_MAN= -LDFLAGS=-e 0 -T linker.cfg +LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#5 (text+ko) ==== @@ -2,8 +2,8 @@ LIB= at91 INTERNALLIB= -SRCS=at91rm9200_lowlevel.c eeprom.c getc.c putchar.c printf.c xmodem.c \ - emac.c p_string.c +SRCS=at91rm9200_lowlevel.c eeprom.c emac.c env_vars.c getc.c loader_prompt.c \ + p_string.c putchar.c printf.c xmodem.c NO_MAN= .include From owner-p4-projects@FreeBSD.ORG Tue Apr 18 17:48:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF53416A410; Tue, 18 Apr 2006 17:48:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EE7716A40E for ; Tue, 18 Apr 2006 17:48:24 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E98543D80 for ; Tue, 18 Apr 2006 17:48:19 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IHmJ5U064310 for ; Tue, 18 Apr 2006 17:48:19 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IHmIsa064304 for perforce@freebsd.org; Tue, 18 Apr 2006 17:48:18 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 17:48:18 GMT Message-Id: <200604181748.k3IHmIsa064304@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95502 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 17:48:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95502 Change 95502 by imp@imp_hammer on 2006/04/18 17:47:36 Make bootspi build. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#2 (text+ko) ==== @@ -1,10 +1,10 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.1 2006/04/12 21:22:44 imp Exp $ -P=bootiic +P=bootspi FILES=${P} -SRCS=arm_init.s main.c env_vars.c loader_prompt.c +SRCS=arm_init.s main.c NO_MAN= -LDFLAGS=-e 0 -T linker.cfg +LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include From owner-p4-projects@FreeBSD.ORG Tue Apr 18 17:55:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D30BE16A40E; Tue, 18 Apr 2006 17:55:29 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2DF816A407 for ; Tue, 18 Apr 2006 17:55:29 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E04A43D66 for ; Tue, 18 Apr 2006 17:55:29 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IHtTeH068620 for ; Tue, 18 Apr 2006 17:55:29 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IHtTOM068617 for perforce@freebsd.org; Tue, 18 Apr 2006 17:55:29 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 17:55:29 GMT Message-Id: <200604181755.k3IHtTOM068617@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95504 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 17:55:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=95504 Change 95504 by imp@imp_Speedy on 2006/04/18 17:55:27 bootspi doesn't need to read the additional data from the eeprom Tweak output. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/arm_init.s#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/arm_init.s#2 (text+ko) ==== @@ -83,18 +83,6 @@ ldr r1, = SVC_STACK_USE mov sp, r1 @ ; Move the stack to SDRAM -/* Copy the rest of the load image from EEPROM */ - .extern InitEEPROM - - bl InitEEPROM - - .extern ReadEEPROM - - mov r0, #8192 - mov r1, #8192 - mov r2, #8192 - bl ReadEEPROM - /* Start execution at main */ .extern main ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#2 (text+ko) ==== @@ -44,7 +44,7 @@ LoadBootCommands(); - printf("\n\rKB9202(www.kwikbyte.com)\n\rAuto boot..\n\r"); + printf("\r\nSPI Boot loader.\r\nAutoboot...\r\n"); if (getc(1) == -1) ExecuteEnvironmentFunctions(); From owner-p4-projects@FreeBSD.ORG Tue Apr 18 18:02:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 23B8516A412; Tue, 18 Apr 2006 18:02:47 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0176E16A405 for ; Tue, 18 Apr 2006 18:02:46 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60F7443D7B for ; Tue, 18 Apr 2006 18:02:38 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3II2c49074546 for ; Tue, 18 Apr 2006 18:02:38 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3II2cxV074540 for perforce@freebsd.org; Tue, 18 Apr 2006 18:02:38 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 18:02:38 GMT Message-Id: <200604181802.k3II2cxV074540@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95506 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 18:02:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=95506 Change 95506 by imp@imp_Speedy on 2006/04/18 18:02:12 It is , not to terminate lines. Make it so. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#2 (text+ko) ==== @@ -258,18 +258,18 @@ case COMMAND_HELP: // dump command info - printf("Commands:\n\r" - "\tc\n\r" - "\td\n\r" - "\te\n\r" - "\tip\n\r" - "\tserver_ip\n\r" - "\tm\n\r" - "\ttftp\n\r" - "\ts\n\r" - "\tt\n\r" - "\tw\n\r" - "\tx\n\r"); + printf("Commands:\r\n" + "\tc\r\n" + "\td\r\n" + "\te\r\n" + "\tip\r\n" + "\tserver_ip\r\n" + "\tm\r\n" + "\ttftp\r\n" + "\ts\r\n" + "\tt\r\n" + "\tw\r\n" + "\tx\r\n"); break; case COMMAND_LOCAL_IP: @@ -373,7 +373,7 @@ break; } - printf("\n\r"); + printf("\r\n"); } @@ -410,11 +410,11 @@ } if (!p_char) { - printf("\n\r"); + printf("\r\n"); ParseCommand(inputBuffer); p_memset(inputBuffer, 0, MAX_INPUT_SIZE); buffCount = 0; - printf("\n\r>"); + printf("\r\n>"); } } @@ -443,7 +443,7 @@ inputFunction = getc; } - printf("\n\r>"); + printf("\r\n>"); while (ch >= 0) if ((ch = ((*inputFunction)(0))) > 0) From owner-p4-projects@FreeBSD.ORG Tue Apr 18 18:06:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9C1316A5D1; Tue, 18 Apr 2006 18:06:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FB9216A5C9 for ; Tue, 18 Apr 2006 18:06:44 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BA4F43D46 for ; Tue, 18 Apr 2006 18:06:44 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3II6ixs080289 for ; Tue, 18 Apr 2006 18:06:44 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3II6hJh080283 for perforce@freebsd.org; Tue, 18 Apr 2006 18:06:43 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 18:06:43 GMT Message-Id: <200604181806.k3II6hJh080283@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95507 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 18:06:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=95507 Change 95507 by imp@imp_Speedy on 2006/04/18 18:06:37 Save 118 bytes by using a more sensible interface. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#3 (text+ko) ==== @@ -72,21 +72,18 @@ static unsigned BuildIP(void) { - unsigned p_ip_addr, p_tmp_val; + unsigned p_ip_addr; - p_ASCIIToDec(argv[1], &p_ip_addr); + p_ip_addr = p_ASCIIToDec(argv[1]); p_ip_addr <<= 8; - p_ASCIIToDec(argv[2], &p_tmp_val); - p_ip_addr |= p_tmp_val; + p_ip_addr |= p_ASCIIToDec(argv[2]); p_ip_addr <<= 8; - p_ASCIIToDec(argv[3], &p_tmp_val); - p_ip_addr |= p_tmp_val; + p_ip_addr |= p_ASCIIToDec(argv[3]); p_ip_addr <<= 8; - p_ASCIIToDec(argv[4], &p_tmp_val); - p_ip_addr |= p_tmp_val; + p_ip_addr |= p_ASCIIToDec(argv[4]); return (p_ip_addr); } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#2 (text+ko) ==== @@ -143,15 +143,16 @@ * NULL-terminated. * .KB_C_FN_DEFINITION_END */ -void -p_ASCIIToDec(const char *buf, unsigned *value) +unsigned +p_ASCIIToDec(const char *buf) { + unsigned v = 0; - *value = 0; while (*buf) { - *value *= 10; - *value += (*buf++) - '0'; + v *= 10; + v += (*buf++) - '0'; } + return (v); } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#2 (text+ko) ==== @@ -29,7 +29,7 @@ int p_strlen(const char *buffer); char *p_strcpy(char *to, const char *from); void p_ASCIIToHex(const char *buf, unsigned *value); -void p_ASCIIToDec(const char *buf, unsigned *value); +unsigned p_ASCIIToDec(const char *buf); void p_memcpy(char *to, const char *from, unsigned size); int p_memcmp(const char *to, const char *from, unsigned size); int p_strcmp(const char *to, const char *from); From owner-p4-projects@FreeBSD.ORG Tue Apr 18 18:46:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8DBA116A405; Tue, 18 Apr 2006 18:46:35 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 526C016A401 for ; Tue, 18 Apr 2006 18:46:35 +0000 (UTC) (envelope-from brueffer@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00B6A43D49 for ; Tue, 18 Apr 2006 18:46:34 +0000 (GMT) (envelope-from brueffer@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IIkYTq002846 for ; Tue, 18 Apr 2006 18:46:34 GMT (envelope-from brueffer@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IIkYp9002843 for perforce@freebsd.org; Tue, 18 Apr 2006 18:46:34 GMT (envelope-from brueffer@freebsd.org) Date: Tue, 18 Apr 2006 18:46:34 GMT Message-Id: <200604181846.k3IIkYp9002843@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to brueffer@freebsd.org using -f From: Christian Brueffer To: Perforce Change Reviews Cc: Subject: PERFORCE change 95512 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 18:46:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=95512 Change 95512 by brueffer@brueffer_serenity on 2006/04/18 18:46:31 Cleanup (formatting, sentence breaks, mdoc...) Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#3 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#3 (text+ko) ==== @@ -24,18 +24,19 @@ .Fa status and .Fa reterr -arguments. Optionally, a text token will be created as a part of this record. +arguments. +Optionally, a text token will be created as a part of this record. .Pp Text token output is under the control of a .Fa format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of -.Xr stdarg 3 -are converted for output. If +.Xr stdarg 3 ) +are converted for output. +If .Fa format is NULL, then no text token is created in the audit record. .Sh EXAMPLES -.Pp .Bd -literal -offset indent #include #include @@ -56,7 +57,7 @@ } .Ed .Pp -Will generate the followng audit record: +Will generate the following audit record: .Bd -literal -offset indent header,94,1,su(1),0,Mon Apr 17 23:23:59 2006, + 271 msec subject,root,root,wheel,root,wheel,652,652,0,0.0.0.0 @@ -71,6 +72,10 @@ .Sh HISTORY The .Nm -function was written by Christian S.J. Peron and -first appeared in OpenBSM version 1.0. OpenBSM 1.0 was introduced in -FreeBSD 7.0. +first appeared in OpenBSM version 1.0. +OpenBSM 1.0 was introduced in FreeBSD 7.0. +.Sh AUTHORS +The +.Nm +function was written by +.An Christian S.J. Peron Aq csjp@FreeBSD.org . From owner-p4-projects@FreeBSD.ORG Tue Apr 18 18:51:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 416B916A404; Tue, 18 Apr 2006 18:51:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06CCD16A402 for ; Tue, 18 Apr 2006 18:51:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE9F143D46 for ; Tue, 18 Apr 2006 18:51:41 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IIpfjb006424 for ; Tue, 18 Apr 2006 18:51:41 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IIpf8F006421 for perforce@freebsd.org; Tue, 18 Apr 2006 18:51:41 GMT (envelope-from jhb@freebsd.org) Date: Tue, 18 Apr 2006 18:51:41 GMT Message-Id: <200604181851.k3IIpf8F006421@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 Cc: Subject: PERFORCE change 95513 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 18:51:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=95513 Change 95513 by jhb@jhb_slimer on 2006/04/18 18:50:52 IFC @95511. Affected files ... .. //depot/projects/smpng/sys/kern/kern_rwlock.c#5 integrate .. //depot/projects/smpng/sys/kern/subr_turnstile.c#26 integrate .. //depot/projects/smpng/sys/sys/turnstile.h#9 integrate Differences ... ==== //depot/projects/smpng/sys/kern/kern_rwlock.c#5 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_rwlock.c,v 1.6 2006/04/17 21:11:01 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_rwlock.c,v 1.7 2006/04/18 18:27:54 jhb Exp $"); #include "opt_ddb.h" @@ -135,6 +135,7 @@ void _rw_rlock(struct rwlock *rw, const char *file, int line) { + volatile struct thread *owner; uintptr_t x; KASSERT(rw_wowner(rw) != curthread, @@ -182,6 +183,7 @@ (void *)(x + RW_ONE_READER)); break; } + cpu_spinwait(); continue; } @@ -200,6 +202,7 @@ x = rw->rw_lock; if (x & RW_LOCK_READ) { turnstile_release(&rw->rw_object); + cpu_spinwait(); continue; } @@ -221,7 +224,26 @@ __func__, rw); } +#ifdef SMP /* + * If the owner is running on another CPU, spin until + * the owner stops running or the state of the lock + * changes. + */ + owner = (struct thread *)RW_OWNER(x); + if (TD_IS_RUNNING(owner)) { + turnstile_release(&rw->rw_object); + if (LOCK_LOG_TEST(&rw->rw_object, 0)) + CTR3(KTR_LOCK, "%s: spinning on %p held by %p", + __func__, rw, owner); + while ((struct thread*)RW_OWNER(rw->rw_lock)== owner && + TD_IS_RUNNING(owner)) + cpu_spinwait(); + continue; + } +#endif + + /* * We were unable to acquire the lock and the read waiters * flag is set, so we must block on the turnstile. */ @@ -351,6 +373,7 @@ * release the lock. */ ts = turnstile_lookup(&rw->rw_object); + MPASS(ts != NULL); turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); turnstile_unpend(ts, TS_SHARED_LOCK); break; @@ -365,6 +388,7 @@ void _rw_wlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line) { + volatile struct thread *owner; uintptr_t v; if (LOCK_LOG_TEST(&rw->rw_object, 0)) @@ -426,7 +450,24 @@ __func__, rw); } - /* XXX: Adaptively spin if current wlock owner on another CPU? */ +#ifdef SMP + /* + * If the lock is write locked and the owner is + * running on another CPU, spin until the owner stops + * running or the state of the lock changes. + */ + owner = (struct thread *)RW_OWNER(v); + if (!(v & RW_LOCK_READ) && TD_IS_RUNNING(owner)) { + turnstile_release(&rw->rw_object); + if (LOCK_LOG_TEST(&rw->rw_object, 0)) + CTR3(KTR_LOCK, "%s: spinning on %p held by %p", + __func__, rw, owner); + while ((struct thread*)RW_OWNER(rw->rw_lock)== owner && + TD_IS_RUNNING(owner)) + cpu_spinwait(); + continue; + } +#endif /* * We were unable to acquire the lock and the write waiters @@ -464,8 +505,22 @@ turnstile_lock(&rw->rw_object); ts = turnstile_lookup(&rw->rw_object); - /* XXX: Adaptive fixup would be required here. */ +#ifdef SMP + /* + * There might not be a turnstile for this lock if all of + * the waiters are adaptively spinning. In that case, just + * reset the lock to the unlocked state and return. + */ + if (ts == NULL) { + atomic_store_rel_ptr(&rw->rw_lock, RW_UNLOCKED); + if (LOCK_LOG_TEST(&rw->rw_object, 0)) + CTR2(KTR_LOCK, "%s: %p no sleepers", __func__, rw); + turnstile_release(&rw->rw_object); + return; + } +#else MPASS(ts != NULL); +#endif /* * Use the same algo as sx locks for now. Prefer waking up shared @@ -482,19 +537,45 @@ * above. There is probably a potential priority inversion in * there that could be worked around either by waking both queues * of waiters or doing some complicated lock handoff gymnastics. + * + * Note that in the SMP case, if both flags are set, there might + * not be any actual writers on the turnstile as they might all + * be spinning. In that case, we don't want to preserve the + * RW_LOCK_WRITE_WAITERS flag as the turnstile is going to go + * away once we wakeup all the readers. */ + v = RW_UNLOCKED; if (rw->rw_lock & RW_LOCK_READ_WAITERS) { queue = TS_SHARED_QUEUE; - v = RW_UNLOCKED | (rw->rw_lock & RW_LOCK_WRITE_WAITERS); - } else { +#ifdef SMP + if (rw->rw_lock & RW_LOCK_WRITE_WAITERS && + !turnstile_empty(ts, TS_EXCLUSIVE_QUEUE)) + v |= RW_LOCK_WRITE_WAITERS; +#else + v |= (rw->rw_lock & RW_LOCK_WRITE_WAITERS); +#endif + } else queue = TS_EXCLUSIVE_QUEUE; - v = RW_UNLOCKED; + +#ifdef SMP + /* + * We have to make sure that we actually have waiters to + * wakeup. If they are all spinning, then we just need to + * disown the turnstile and return. + */ + if (turnstile_empty(ts, queue)) { + if (LOCK_LOG_TEST(&rw->rw_object, 0)) + CTR2(KTR_LOCK, "%s: %p no sleepers 2", __func__, rw); + atomic_store_rel_ptr(&rw->rw_lock, v); + turnstile_disown(ts); + return; } +#endif + + /* Wake up all waiters for the specific queue. */ if (LOCK_LOG_TEST(&rw->rw_object, 0)) CTR3(KTR_LOCK, "%s: %p waking up %s waiters", __func__, rw, queue == TS_SHARED_QUEUE ? "read" : "write"); - - /* Wake up all waiters for the specific queue. */ turnstile_broadcast(ts, queue); atomic_store_rel_ptr(&rw->rw_lock, v); turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); ==== //depot/projects/smpng/sys/kern/subr_turnstile.c#26 (text+ko) ==== @@ -57,7 +57,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_turnstile.c,v 1.157 2006/03/29 23:24:55 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_turnstile.c,v 1.158 2006/04/18 18:16:53 jhb Exp $"); #include "opt_ddb.h" #include "opt_turnstile_profiling.h" @@ -879,6 +879,56 @@ } /* + * Give up ownership of a turnstile. This must be called with the + * turnstile chain locked. + */ +void +turnstile_disown(struct turnstile *ts) +{ + struct turnstile_chain *tc; + struct thread *td; + u_char cp, pri; + + MPASS(ts != NULL); + MPASS(ts->ts_owner == curthread); + tc = TC_LOOKUP(ts->ts_lockobj); + mtx_assert(&tc->tc_lock, MA_OWNED); + MPASS(TAILQ_EMPTY(&ts->ts_pending)); + MPASS(!TAILQ_EMPTY(&ts->ts_blocked[TS_EXCLUSIVE_QUEUE]) || + !TAILQ_EMPTY(&ts->ts_blocked[TS_SHARED_QUEUE])); + + /* + * Remove the turnstile from this thread's list of contested locks + * since this thread doesn't own it anymore. New threads will + * not be blocking on the turnstile until it is claimed by a new + * owner. + */ + mtx_lock_spin(&td_contested_lock); + ts->ts_owner = NULL; + LIST_REMOVE(ts, ts_link); + mtx_unlock_spin(&td_contested_lock); + mtx_unlock_spin(&tc->tc_lock); + + /* + * Adjust the priority of curthread based on other contested + * locks it owns. Don't lower the priority below the base + * priority however. + */ + td = curthread; + pri = PRI_MAX; + mtx_lock_spin(&sched_lock); + mtx_lock_spin(&td_contested_lock); + LIST_FOREACH(ts, &td->td_contested, ts_link) { + cp = turnstile_first_waiter(ts)->td_priority; + if (cp < pri) + pri = cp; + } + mtx_unlock_spin(&td_contested_lock); + sched_unlend_prio(td, pri); + mtx_unlock_spin(&sched_lock); +} + +/* * Return the first thread in a turnstile. */ struct thread * @@ -895,6 +945,23 @@ return (TAILQ_FIRST(&ts->ts_blocked[queue])); } +/* + * Returns true if a sub-queue of a turnstile is empty. + */ +int +turnstile_empty(struct turnstile *ts, int queue) +{ +#ifdef INVARIANTS + struct turnstile_chain *tc; + + MPASS(ts != NULL); + MPASS(queue == TS_SHARED_QUEUE || queue == TS_EXCLUSIVE_QUEUE); + tc = TC_LOOKUP(ts->ts_lockobj); + mtx_assert(&tc->tc_lock, MA_OWNED); +#endif + return (TAILQ_EMPTY(&ts->ts_blocked[queue])); +} + #ifdef DDB static void print_thread(struct thread *td, const char *prefix) ==== //depot/projects/smpng/sys/sys/turnstile.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/sys/turnstile.h,v 1.9 2006/01/27 22:42:12 jhb Exp $ + * $FreeBSD: src/sys/sys/turnstile.h,v 1.11 2006/04/18 18:21:38 jhb Exp $ */ #ifndef _SYS_TURNSTILE_H_ @@ -34,7 +34,10 @@ /* * Turnstile interface. Non-sleepable locks use a turnstile for the - * queue of threads blocked on them when they are contested. + * queue of threads blocked on them when they are contested. Each + * turnstile contains two sub-queues: one for threads waiting for a + * shared, or eread, lock, and one for threads waiting for an + * exclusive, or write, lock. * * A thread calls turnstile_lock() to lock the turnstile chain associated * with a given lock. A thread calls turnstile_wait() when the lock is @@ -50,7 +53,10 @@ * blocked threads. The turnstile_signal() function returns true if the * turnstile became empty as a result. After the higher level code finishes * releasing the lock, turnstile_unpend() must be called to wake up the - * pending thread(s). + * pending thread(s) and give up ownership of the turnstile. + * + * Alternatively, if a thread wishes to relinquish ownership of a thread + * without waking up any waiters, it may call turnstile_disown(). * * When a lock is acquired that already has at least one thread contested * on it, the new owner of the lock must claim ownership of the turnstile @@ -62,8 +68,9 @@ * released at thread destruction may not be the same turnstile that the * thread allocated when it was created. * - * The highest priority thread blocked on a turnstile can be obtained via - * turnstile_head(). + * The highest priority thread blocked on a specified queue of a + * turnstile can be obtained via turnstile_head(). A given queue can + * also be queried to see if it is empty via turnstile_empty(). */ struct lock_object; @@ -85,6 +92,8 @@ struct turnstile *turnstile_alloc(void); void turnstile_broadcast(struct turnstile *, int); void turnstile_claim(struct lock_object *); +void turnstile_disown(struct turnstile *); +int turnstile_empty(struct turnstile *ts, int queue); void turnstile_free(struct turnstile *); struct thread *turnstile_head(struct turnstile *, int); void turnstile_lock(struct lock_object *); From owner-p4-projects@FreeBSD.ORG Tue Apr 18 19:26:25 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DA26516A409; Tue, 18 Apr 2006 19:26:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9AB3616A400 for ; Tue, 18 Apr 2006 19:26:24 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6756A43D5E for ; Tue, 18 Apr 2006 19:26:24 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IJQOPJ025373 for ; Tue, 18 Apr 2006 19:26:24 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IJQOCf025367 for perforce@freebsd.org; Tue, 18 Apr 2006 19:26:24 GMT (envelope-from marcel@freebsd.org) Date: Tue, 18 Apr 2006 19:26:24 GMT Message-Id: <200604181926.k3IJQOCf025367@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 Cc: Subject: PERFORCE change 95515 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 19:26:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95515 Change 95515 by marcel@marcel_nfs on 2006/04/18 19:25:40 Keep a bitmask of ports that use the serdev I/F. We use that in the interrupt handler to quickly assess pending interrupt status for those ports and service them in priority order. The bitmask is u_long on purpose. It allows for 32 ports on ILP32 machines and 64 ports on LP64 machines. The reason is to avoid 64-bit operations on ILP32 machines and given that puc(4) used to hardcode a limit of 16 ports before and PCI bus width is still mostly 32-bit in most cases so that interrupt latch registers (ILRs) are typically 32-bit wide it is not expected to be a problem on ILP32 machines, let alone LP64 machines. This may need to be revisited when cards with more than 32 ports become common (unlikely) and may need a revamp if boards with more than 64 ports need to be handled by puc(4). Affected files ... .. //depot/projects/uart/dev/puc/puc.c#27 edit .. //depot/projects/uart/dev/puc/puc_bfe.h#1 add Differences ... ==== //depot/projects/uart/dev/puc/puc.c#27 (text+ko) ==== @@ -494,8 +494,10 @@ i = 0, isrc = SER_INT_OVERRUN; while (i < PUC_ISRCCNT) { port->p_ihsrc[i] = SERDEV_IHAND(originator, isrc); - if (port->p_ihsrc[i] != NULL) + if (port->p_ihsrc[i] != NULL) { + sc->sc_serdevs |= 1UL << (port->p_nr - 1); port->p_ih = NULL; + } i++, isrc <<= 1; } } From owner-p4-projects@FreeBSD.ORG Tue Apr 18 19:30:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1F67916A409; Tue, 18 Apr 2006 19:30:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D14716A404 for ; Tue, 18 Apr 2006 19:30:30 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3654043D53 for ; Tue, 18 Apr 2006 19:30:30 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IJUUFf028309 for ; Tue, 18 Apr 2006 19:30:30 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IJUTcd028297 for perforce@freebsd.org; Tue, 18 Apr 2006 19:30:29 GMT (envelope-from marcel@freebsd.org) Date: Tue, 18 Apr 2006 19:30:29 GMT Message-Id: <200604181930.k3IJUTcd028297@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 Cc: Subject: PERFORCE change 95516 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 19:30:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=95516 Change 95516 by marcel@marcel_nfs on 2006/04/18 19:29:31 IFC @95511 Affected files ... .. //depot/projects/uart/alpha/alpha/pmap.c#19 integrate .. //depot/projects/uart/amd64/amd64/pmap.c#31 integrate .. //depot/projects/uart/amd64/conf/GENERIC#16 integrate .. //depot/projects/uart/arm/include/asmacros.h#4 integrate .. //depot/projects/uart/arm/include/atomic.h#8 integrate .. //depot/projects/uart/arm/xscale/i80321/i80321_pci.c#6 integrate .. //depot/projects/uart/boot/arm/at91/boot0/Makefile#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/README#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/arm_init.s#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/at91rm9200_lowlevel.c#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/at91rm9200_lowlevel.h#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/lib.c#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/lib.h#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/linker.cfg#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/main.c#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/xmodem.c#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/xmodem.h#1 branch .. //depot/projects/uart/boot/arm/at91/inc/AT91RM9200.h#1 branch .. //depot/projects/uart/boot/i386/boot2/boot1.S#2 integrate .. //depot/projects/uart/boot/i386/cdboot/cdboot.s#3 integrate .. //depot/projects/uart/boot/i386/libi386/Makefile#8 integrate .. //depot/projects/uart/boot/i386/libi386/gatea20.c#3 delete .. //depot/projects/uart/boot/i386/libi386/libi386.h#8 integrate .. //depot/projects/uart/boot/i386/pxeldr/pxeldr.S#2 integrate .. //depot/projects/uart/boot/pc98/libpc98/Makefile#6 integrate .. //depot/projects/uart/boot/pc98/libpc98/gatea20.c#4 delete .. //depot/projects/uart/cam/scsi/scsi_cd.c#12 integrate .. //depot/projects/uart/conf/files#59 integrate .. //depot/projects/uart/conf/options#28 integrate .. //depot/projects/uart/contrib/ipfilter/netinet/fil.c#8 integrate .. //depot/projects/uart/crypto/via/padlock.c#2 integrate .. //depot/projects/uart/dev/acpica/acpi.c#20 integrate .. //depot/projects/uart/dev/acpica/acpi_cmbat.c#11 integrate .. //depot/projects/uart/dev/acpica/acpi_dock.c#1 branch .. //depot/projects/uart/dev/amr/amr_linux.c#3 integrate .. //depot/projects/uart/dev/ata/ata-all.c#21 integrate .. //depot/projects/uart/dev/ata/ata-queue.c#18 integrate .. //depot/projects/uart/dev/ata/ata-raid.c#12 integrate .. //depot/projects/uart/dev/ath/if_ath.c#26 integrate .. //depot/projects/uart/dev/bce/if_bce.c#1 branch .. //depot/projects/uart/dev/bce/if_bcefw.h#1 branch .. //depot/projects/uart/dev/bce/if_bcereg.h#1 branch .. //depot/projects/uart/dev/bge/if_bge.c#24 integrate .. //depot/projects/uart/dev/bge/if_bgereg.h#16 integrate .. //depot/projects/uart/dev/drm/drmP.h#9 integrate .. //depot/projects/uart/dev/drm/radeon_state.c#11 integrate .. //depot/projects/uart/dev/em/if_em_hw.c#8 integrate .. //depot/projects/uart/dev/fxp/if_fxp.c#22 integrate .. //depot/projects/uart/dev/hwpmc/hwpmc_mod.c#7 integrate .. //depot/projects/uart/dev/iicbus/iicbus.c#4 integrate .. //depot/projects/uart/dev/mii/brgphy.c#13 integrate .. //depot/projects/uart/dev/mii/miidevs#8 integrate .. //depot/projects/uart/dev/mpt/mpt.c#14 integrate .. //depot/projects/uart/dev/mpt/mpt.h#10 integrate .. //depot/projects/uart/dev/mpt/mpt_cam.c#10 integrate .. //depot/projects/uart/dev/mpt/mpt_pci.c#16 integrate .. //depot/projects/uart/dev/mpt/mpt_raid.c#4 integrate .. //depot/projects/uart/dev/pccbb/pccbb.c#17 integrate .. //depot/projects/uart/dev/ppbus/lpt.c#8 integrate .. //depot/projects/uart/dev/ppbus/ppbconf.c#3 integrate .. //depot/projects/uart/dev/ppc/ppc.c#8 integrate .. //depot/projects/uart/dev/ppc/ppcvar.h#3 integrate .. //depot/projects/uart/dev/random/randomdev_soft.c#8 integrate .. //depot/projects/uart/dev/safe/safe.c#7 integrate .. //depot/projects/uart/dev/ubsec/ubsec.c#9 integrate .. //depot/projects/uart/dev/usb/usbdevs#21 integrate .. //depot/projects/uart/dev/usb/uscanner.c#13 integrate .. //depot/projects/uart/dev/xe/if_xe.c#8 integrate .. //depot/projects/uart/fs/devfs/devfs.h#6 integrate .. //depot/projects/uart/geom/eli/g_eli.c#6 integrate .. //depot/projects/uart/geom/geom_ccd.c#7 integrate .. //depot/projects/uart/geom/raid3/g_raid3.c#16 integrate .. //depot/projects/uart/gnu/fs/ext2fs/ext2_bitops.h#2 integrate .. //depot/projects/uart/i386/conf/GENERIC#15 integrate .. //depot/projects/uart/i386/conf/NOTES#17 integrate .. //depot/projects/uart/i386/i386/pmap.c#33 integrate .. //depot/projects/uart/ia64/ia64/pmap.c#21 integrate .. //depot/projects/uart/kern/kern_clock.c#10 integrate .. //depot/projects/uart/kern/kern_event.c#12 integrate .. //depot/projects/uart/kern/kern_intr.c#11 integrate .. //depot/projects/uart/kern/kern_module.c#5 integrate .. //depot/projects/uart/kern/kern_mutex.c#11 integrate .. //depot/projects/uart/kern/kern_poll.c#7 integrate .. //depot/projects/uart/kern/kern_rwlock.c#3 integrate .. //depot/projects/uart/kern/kern_synch.c#15 integrate .. //depot/projects/uart/kern/kern_thr.c#12 integrate .. //depot/projects/uart/kern/kern_umtx.c#12 integrate .. //depot/projects/uart/kern/sched_4bsd.c#9 integrate .. //depot/projects/uart/kern/subr_sleepqueue.c#10 integrate .. //depot/projects/uart/kern/subr_taskqueue.c#9 integrate .. //depot/projects/uart/kern/subr_turnstile.c#7 integrate .. //depot/projects/uart/kern/uipc_mqueue.c#5 integrate .. //depot/projects/uart/kern/vfs_cache.c#10 integrate .. //depot/projects/uart/kern/vfs_hash.c#4 integrate .. //depot/projects/uart/modules/acpi/Makefile#12 integrate .. //depot/projects/uart/modules/acpi/acpi_dock/Makefile#1 branch .. //depot/projects/uart/modules/bce/Makefile#1 branch .. //depot/projects/uart/net/if_arc.h#5 integrate .. //depot/projects/uart/net/if_arcsubr.c#7 integrate .. //depot/projects/uart/netinet/ip_fastfwd.c#10 integrate .. //depot/projects/uart/netinet6/frag6.c#6 integrate .. //depot/projects/uart/netinet6/in6_pcb.c#11 integrate .. //depot/projects/uart/netinet6/raw_ip6.c#11 integrate .. //depot/projects/uart/netinet6/udp6_output.c#6 integrate .. //depot/projects/uart/netinet6/udp6_usrreq.c#11 integrate .. //depot/projects/uart/netipx/ipx_usrreq.c#8 integrate .. //depot/projects/uart/opencrypto/crypto.c#6 integrate .. //depot/projects/uart/opencrypto/cryptosoft.c#6 integrate .. //depot/projects/uart/sparc64/sparc64/exception.S#7 integrate .. //depot/projects/uart/sparc64/sparc64/interrupt.S#4 integrate .. //depot/projects/uart/sys/lock.h#8 integrate .. //depot/projects/uart/sys/module.h#3 integrate .. //depot/projects/uart/sys/turnstile.h#4 integrate .. //depot/projects/uart/sys/vnode.h#18 integrate .. //depot/projects/uart/ufs/ffs/ffs_softdep.c#18 integrate .. //depot/projects/uart/vm/vm_zeroidle.c#9 integrate Differences ... ==== //depot/projects/uart/alpha/alpha/pmap.c#19 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.188 2006/04/03 21:16:07 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.189 2006/04/12 04:22:50 alc Exp $"); #include #include @@ -696,22 +696,7 @@ * Low level helper routines..... ***************************************************/ - - /* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static PMAP_INLINE int -pmap_track_modified(vm_offset_t va) -{ - if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) - return 1; - else - return 0; -} - -/* * Routine: pmap_extract * Function: * Extract the physical page address associated @@ -1346,10 +1331,8 @@ ("get_pv_entry: wired pte %#lx", tpte)); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); - if ((tpte & PG_FOW) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } + if ((tpte & PG_FOW) == 0) + vm_page_dirty(m); pmap_invalidate_page(pmap, va); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -1449,10 +1432,8 @@ pmap->pm_stats.resident_count -= 1; if (oldpte & PG_MANAGED) { m = PHYS_TO_VM_PAGE(pmap_pte_pa(&oldpte)); - if ((oldpte & PG_FOW) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } + if ((oldpte & PG_FOW) == 0) + vm_page_dirty(m); if ((oldpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); return pmap_remove_entry(pmap, m, va); @@ -1581,10 +1562,8 @@ /* * Update the vm_page_t clean and reference bits. */ - if ((tpte & PG_FOW) == 0) { - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); - } + if ((tpte & PG_FOW) == 0) + vm_page_dirty(m); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); @@ -1666,8 +1645,7 @@ if ((oldpte & PG_FOW) == 0) { if (m == NULL) m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte)); - if (pmap_track_modified(sva)) - vm_page_dirty(m); + vm_page_dirty(m); oldpte |= PG_FOW; } oldpte = (oldpte & ~PG_PROT) | newprot; @@ -1763,8 +1741,7 @@ * so we go ahead and sense modify status. */ if (origpte & PG_MANAGED) { - if ((origpte & PG_FOW) != PG_FOW - && pmap_track_modified(va)) + if ((origpte & PG_FOW) != PG_FOW) vm_page_dirty(m); } @@ -1788,6 +1765,8 @@ * called at interrupt time. */ if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); pmap_insert_entry(pmap, va, mpte, m); managed |= PG_MANAGED; } @@ -1850,6 +1829,9 @@ register pt_entry_t *pte; int managed; + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0, + ("pmap_enter_quick: managed mapping within the clean submap")); mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); PMAP_LOCK(pmap); @@ -2168,8 +2150,7 @@ pmap->pm_stats.resident_count--; if ((tpte & PG_FOW) == 0) - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); + vm_page_dirty(m); npv = TAILQ_NEXT(pv, pv_plist); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); @@ -2209,14 +2190,6 @@ * setting RO do we need to clear the VAC? */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * don't write protect pager mappings - */ - if (!setem && bit == (PG_UWE|PG_KWE)) { - if (!pmap_track_modified(pv->pv_va)) - continue; - } - PMAP_LOCK(pv->pv_pmap); pte = pmap_lev3pte(pv->pv_pmap, pv->pv_va); ==== //depot/projects/uart/amd64/amd64/pmap.c#31 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.543 2006/04/04 20:17:35 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.545 2006/04/13 03:31:48 alc Exp $"); /* * Manages physical address maps. @@ -106,6 +106,7 @@ */ #include "opt_msgbuf.h" +#include "opt_pmap.h" #include #include @@ -619,20 +620,6 @@ * Low level helper routines..... ***************************************************/ - -/* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static PMAP_INLINE int -pmap_track_modified(vm_offset_t va) -{ - if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) - return 1; - else - return 0; -} - #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -1532,8 +1519,7 @@ KASSERT((tpte & PG_RW), ("pmap_collect: modified page not writable: va: %#lx, pte: %#lx", va, tpte)); - if (pmap_track_modified(va)) - vm_page_dirty(m); + vm_page_dirty(m); } pmap_invalidate_page(pmap, va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -1751,8 +1737,7 @@ KASSERT((oldpte & PG_RW), ("pmap_remove_pte: modified page not writable: va: %#lx, pte: %#lx", va, oldpte)); - if (pmap_track_modified(va)) - vm_page_dirty(m); + vm_page_dirty(m); } if (oldpte & PG_A) vm_page_flag_set(m, PG_REFERENCED); @@ -1940,8 +1925,7 @@ KASSERT((tpte & PG_RW), ("pmap_remove_all: modified page not writable: va: %#lx, pte: %#lx", pv->pv_va, tpte)); - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); + vm_page_dirty(m); } pmap_invalidate_page(pmap, pv->pv_va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -2030,8 +2014,7 @@ vm_page_flag_set(m, PG_REFERENCED); pbits &= ~PG_A; } - if ((pbits & PG_M) != 0 && - pmap_track_modified(sva)) { + if ((pbits & PG_M) != 0) { if (m == NULL) m = PHYS_TO_VM_PAGE(pbits & PG_FRAME); @@ -2182,6 +2165,8 @@ * Enter on the PV list if part of our managed memory. */ if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); pmap_insert_entry(pmap, va, m); pa |= PG_MANAGED; } @@ -2227,8 +2212,7 @@ KASSERT((origpte & PG_RW), ("pmap_enter: modified page not writable: va: %#lx, pte: %#lx", va, origpte)); - if ((origpte & PG_MANAGED) && - pmap_track_modified(va)) + if ((origpte & PG_MANAGED) != 0) vm_page_dirty(om); if ((newpte & PG_RW) == 0) invlva = TRUE; @@ -2258,6 +2242,9 @@ pt_entry_t *pte; vm_paddr_t pa; + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0, + ("pmap_enter_quick: managed mapping within the clean submap")); mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); PMAP_LOCK(pmap); @@ -2836,13 +2823,6 @@ mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * if the bit being tested is the modified bit, then - * mark clean_map and ptes as never - * modified. - */ - if (!pmap_track_modified(pv->pv_va)) - continue; pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); @@ -2898,14 +2878,6 @@ * setting RO do we need to clear the VAC? */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * don't write protect pager mappings - */ - if (bit == PG_RW) { - if (!pmap_track_modified(pv->pv_va)) - continue; - } - pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); @@ -2983,9 +2955,6 @@ TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - if (!pmap_track_modified(pv->pv_va)) - continue; - pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); ==== //depot/projects/uart/amd64/conf/GENERIC#16 (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.451 2006/03/31 23:04:48 emax Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.452 2006/04/10 20:04:22 ps Exp $ cpu HAMMER ident GENERIC @@ -192,6 +192,7 @@ # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support +device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet device dc # DEC/Intel 21143 and various workalikes ==== //depot/projects/uart/arm/include/asmacros.h#4 (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/arm/include/asmacros.h,v 1.4 2005/04/07 22:03:04 cognet Exp $ + * $FreeBSD: src/sys/arm/include/asmacros.h,v 1.5 2006/04/13 14:25:28 cognet Exp $ */ #ifndef _MACHINE_ASMACROS_H_ @@ -159,12 +159,12 @@ #define DO_AST \ ldr r0, [sp] /* Get the SPSR from stack */ ;\ mrs r4, cpsr /* save CPSR */ ;\ - orr r1, r4, #(I32_bit) ;\ + orr r1, r4, #(I32_bit|F32_bit) ;\ msr cpsr_c, r1 /* Disable interrupts */ ;\ and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\ teq r0, #(PSR_USR32_MODE) ;\ bne 2f /* Nope, get out now */ ;\ - bic r4, r4, #(I32_bit) ;\ + bic r4, r4, #(I32_bit|F32_bit) ;\ 1: ldr r5, .Lcurthread ;\ ldr r5, [r5] ;\ ldr r1, [r5, #(TD_FLAGS)] ;\ @@ -174,7 +174,7 @@ msr cpsr_c, r4 /* Restore interrupts */ ;\ mov r0, sp ;\ bl _C_LABEL(ast) /* ast(frame) */ ;\ - orr r0, r4, #(I32_bit) ;\ + orr r0, r4, #(I32_bit|F32_bit) ;\ msr cpsr_c, r0 ;\ b 1b ;\ 2: ==== //depot/projects/uart/arm/include/atomic.h#8 (text+ko) ==== @@ -33,7 +33,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/include/atomic.h,v 1.17 2006/02/06 18:29:05 cognet Exp $ + * $FreeBSD: src/sys/arm/include/atomic.h,v 1.18 2006/04/13 14:25:28 cognet Exp $ */ #ifndef _MACHINE_ATOMIC_H_ @@ -61,7 +61,7 @@ "orr %1, %0, %2;" \ "msr cpsr_all, %1;" \ : "=r" (cpsr_save), "=r" (tmp) \ - : "I" (I32_bit) \ + : "I" (I32_bit | F32_bit) \ : "cc" ); \ (expr); \ __asm __volatile( \ ==== //depot/projects/uart/arm/xscale/i80321/i80321_pci.c#6 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.6 2006/01/23 14:03:14 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.7 2006/04/13 15:07:59 cognet Exp $"); #include #include @@ -381,7 +381,8 @@ if (rv == NULL) return (NULL); if (type != SYS_RES_IRQ) { - bh += (rman_get_start(rv)); + if (type == SYS_RES_MEMORY) + bh += (rman_get_start(rv)); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); if (flags & RF_ACTIVE) { ==== //depot/projects/uart/boot/i386/boot2/boot1.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.30 2004/08/28 08:32:23 yar Exp $ + * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.31 2006/04/11 20:09:42 jhb Exp $ */ /* Memory Locations */ @@ -212,8 +212,7 @@ jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 -seta20.3: - sti # Enable interrupts +seta20.3: sti # Enable interrupts jmp start+MEM_JMP-MEM_ORG # Start BTX ==== //depot/projects/uart/boot/i386/cdboot/cdboot.s#3 (text+ko) ==== @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.13 2004/06/22 21:55:22 jhb Exp $ +# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.16 2006/04/11 17:36:08 jhb Exp $ # # This program is a freestanding boot program to load an a.out binary @@ -400,7 +400,7 @@ ff.checkname: lea DIR_NAME(%bx),%di # Address name in record push %si # Save repe cmpsb # Compare name - jcxz ff.match # We have a winner! + je ff.match # We have a winner! pop %si # Restore jmp ff.nextrec # Keep looking. ff.match: add $2,%sp # Discard saved %si @@ -485,10 +485,17 @@ ret # -# Enable A20 +# Enable A20. Put an upper limit on the amount of time we wait for the +# keyboard controller to get ready (65K x ISA access time). If +# we wait more than that amount, the hardware is probably +# legacy-free and simply doesn't have a keyboard controller. +# Thus, the A20 line is already enabled. # seta20: cli # Disable interrupts -seta20.1: in $0x64,%al # Get status + xor %cx,%cx # Clear +seta20.1: inc %cx # Increment, overflow? + jz seta20.3 # Yes + in $0x64,%al # Get status test $0x2,%al # Busy? jnz seta20.1 # Yes mov $0xd1,%al # Command: Write @@ -498,7 +505,7 @@ jnz seta20.2 # Yes mov $0xdf,%al # Enable out %al,$0x60 # A20 - sti # Enable interrupts +seta20.3: sti # Enable interrupts ret # To caller # ==== //depot/projects/uart/boot/i386/libi386/Makefile#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.41 2006/03/14 19:02:00 jkim Exp $ +# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.42 2006/04/11 20:11:30 jhb Exp $ # LIB= i386 INTERNALLIB= @@ -6,7 +6,7 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \ comconsole.c devicename.c elf32_freebsd.c \ - elf64_freebsd.c gatea20.c \ + elf64_freebsd.c \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ smbios.c time.c vidconsole.c amd64_tramp.S ==== //depot/projects/uart/boot/i386/libi386/libi386.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/boot/i386/libi386/libi386.h,v 1.24 2006/03/09 22:49:44 jkim Exp $ + * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.25 2006/04/11 20:11:30 jhb Exp $ */ @@ -104,8 +104,6 @@ void smbios_detect(void); -void gateA20(void); - int i386_autoload(void); int bi_getboothowto(char *kargs); ==== //depot/projects/uart/boot/i386/pxeldr/pxeldr.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.13 2004/05/14 20:29:30 ru Exp $ + * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.14 2006/04/11 20:53:49 sobomax Exp $ */ /* @@ -227,10 +227,17 @@ jmp putstr # keep looping /* - * Enable A20 + * Enable A20. Put an upper limit on the amount of time we wait for the + * keyboard controller to get ready (65K x ISA access time). If + * we wait more than that amount, the hardware is probably + * legacy-free and simply doesn't have a keyboard controller. + * Thus, the A20 line is already enabled. */ seta20: cli # Disable interrupts -seta20.1: inb $0x64,%al # Get status + xor %cx,%cx # Clear +seta20.1: inc %cx # Increment, overflow? + jz seta20.3 # Yes + inb $0x64,%al # Get status testb $0x2,%al # Busy? jnz seta20.1 # Yes movb $0xd1,%al # Command: Write @@ -240,7 +247,7 @@ jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 - sti # Enable interrupts +seta20.3: sti # Enable interrupts retw # To caller /* ==== //depot/projects/uart/boot/pc98/libpc98/Makefile#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.23 2005/12/20 08:54:30 sobomax Exp $ +# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.24 2006/04/11 20:11:30 jhb Exp $ # LIB= pc98 INTERNALLIB= @@ -7,7 +7,7 @@ SRCS= bioscd.c biosdisk.c biosmem.c biospnp.c biospci.c biossmap.c \ bootinfo.c bootinfo32.c comconsole.c devicename.c elf32_freebsd.c \ - gatea20.c i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ + i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ time.c vidconsole.c BOOT_COMCONSOLE_PORT?= 0x238 ==== //depot/projects/uart/cam/scsi/scsi_cd.c#12 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.94 2005/11/18 02:43:49 jdp Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.95 2006/04/17 09:12:53 maxim Exp $"); #include "opt_cd.h" @@ -1669,7 +1669,7 @@ if (softc->flags & CD_FLAG_CHANGER) cdchangerschedule(softc); - biofinish(bp, softc->disk->d_devstat, 0); + biofinish(bp, NULL, 0); break; } case CD_CCB_PROBE: ==== //depot/projects/uart/conf/files#59 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1107 2006/03/30 21:39:36 marcel Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1109 2006/04/15 12:31:31 iwasaki Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -407,6 +407,7 @@ dev/acpica/acpi_throttle.c optional acpi dev/acpica/acpi_timer.c optional acpi dev/acpica/acpi_video.c optional acpi_video acpi +dev/acpica/acpi_dock.c optional acpi_dock acpi dev/adlink/adlink.c optional adlink dev/advansys/adv_eisa.c optional adv eisa dev/advansys/adv_pci.c optional adv pci @@ -475,6 +476,7 @@ dev/awi/am79c930.c optional awi dev/awi/awi.c optional awi dev/awi/if_awi_pccard.c optional awi pccard +dev/bce/if_bce.c optional bce dev/bfe/if_bfe.c optional bfe dev/bge/if_bge.c optional bge dev/bktr/bktr_audio.c optional bktr pci ==== //depot/projects/uart/conf/options#28 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.533 2006/04/03 18:14:01 sam Exp $ +# $FreeBSD: src/sys/conf/options,v 1.534 2006/04/10 20:04:21 ps Exp $ # # On the handling of kernel options # @@ -633,6 +633,9 @@ ED_3C503 opt_ed.h ED_SIC opt_ed.h +# bce driver +BCE_DEBUG opt_bce.h + # bge driver BGE_FAKE_AUTONEG opt_bge.h ==== //depot/projects/uart/contrib/ipfilter/netinet/fil.c#8 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.48 2005/12/30 11:32:22 guido Exp $ */ +/* $FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.49 2006/04/18 13:24:14 darrenr Exp $ */ /* * Copyright (C) 1993-2003 by Darren Reed. @@ -141,7 +141,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed"; -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.48 2005/12/30 11:32:22 guido Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.49 2006/04/18 13:24:14 darrenr Exp $"; /* static const char rcsid[] = "@(#)Id: fil.c,v 2.243.2.57 2005/03/28 10:47:50 darrenr Exp"; */ #endif @@ -6286,7 +6286,7 @@ int error; fr_getstat(&fio); - error = copyoutptr(&fio, data, sizeof(fio)); + error = fr_outobj(data, &fio, IPFOBJ_IPFSTAT); if (error) return EFAULT; ==== //depot/projects/uart/crypto/via/padlock.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.1 2005/08/18 00:30:22 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.2 2006/04/12 12:13:34 pjd Exp $"); #include #include @@ -179,11 +179,7 @@ #endif padlock_sc = sc = malloc(sizeof(*padlock_sc), M_DEVBUF, - M_NOWAIT | M_ZERO); - if (padlock_sc == NULL) { - printf("PADLOCK: Could not allocate memory.\n"); - return (ENOMEM); - } + M_WAITOK | M_ZERO); TAILQ_INIT(&sc->sc_sessions); sc->sc_sid = 1; ==== //depot/projects/uart/dev/acpica/acpi.c#20 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.220 2006/03/29 06:30:47 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.221 2006/04/15 12:31:32 iwasaki Exp $"); #include "opt_acpi.h" #include @@ -1518,6 +1518,7 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status) { ACPI_OBJECT_TYPE type; + ACPI_HANDLE h; device_t bus, child; int order, probe_now; char *handle_str, **search; @@ -1577,8 +1578,17 @@ * "functional" (i.e. if disabled). Go ahead and probe them * anyway since we may enable them later. */ - if (type == ACPI_TYPE_DEVICE && !acpi_DeviceIsPresent(child) && - !acpi_MatchHid(handle, "PNP0C0F")) { + if (type == ACPI_TYPE_DEVICE && !acpi_DeviceIsPresent(child)) { + /* Never disable PCI link devices. */ + if (acpi_MatchHid(handle, "PNP0C0F")) + break; + /* + * Docking stations should remain enabled since the system + * may be undocked at boot. + */ + if (ACPI_SUCCESS(AcpiGetHandle(handle, "_DCK", &h))) + break; + device_disable(child); break; } ==== //depot/projects/uart/dev/acpica/acpi_cmbat.c#11 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.43 2005/11/26 07:36:53 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.45 2006/04/15 16:10:53 iwasaki Exp $"); #include "opt_acpi.h" #include @@ -157,7 +157,10 @@ static int acpi_cmbat_detach(device_t dev) { + ACPI_HANDLE handle; + handle = acpi_get_handle(dev); + AcpiRemoveNotifyHandler(handle, ACPI_ALL_NOTIFY, acpi_cmbat_notify_handler); acpi_battery_remove(dev); return (0); } @@ -435,6 +438,10 @@ * to wait a while. */ for (retry = 0; retry < ACPI_CMBAT_RETRY_MAX; retry++, AcpiOsSleep(10000)) { + /* batteries on DOCK can be ejected w/ DOCK during retrying */ + if (!device_is_attached(dev)) + return; + if (!acpi_BatteryIsPresent(dev)) continue; ==== //depot/projects/uart/dev/amr/amr_linux.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/amr/amr_linux.c,v 1.2 2006/02/23 18:05:38 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/amr/amr_linux.c,v 1.3 2006/04/14 16:13:28 ambrisko Exp $"); #include #include @@ -53,8 +53,8 @@ #include /* There are multiple ioctl number ranges that need to be handled */ -#define AMR_LINUX_IOCTL_MIN 0x00000 -#define AMR_LINUX_IOCTL_MAX 0x50000 +#define AMR_LINUX_IOCTL_MIN 0x6d00 +#define AMR_LINUX_IOCTL_MAX 0x6d01 static linux_ioctl_function_t amr_linux_ioctl; static struct linux_ioctl_handler amr_linux_handler = {amr_linux_ioctl, ==== //depot/projects/uart/dev/ata/ata-all.c#21 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.271 2006/03/31 08:09:04 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.272 2006/04/14 16:25:42 sos Exp $"); #include "opt_ata.h" #include @@ -277,8 +277,8 @@ if (!dev || !(ch = device_get_softc(dev))) return ENXIO; - /* wait for the channel to be IDLE before entering suspend mode */ - while (1) { + /* wait for the channel to be IDLE or detached before suspending */ + while (ch->r_irq) { mtx_lock(&ch->state_mtx); if (ch->state == ATA_IDLE) { ch->state = ATA_ACTIVE; ==== //depot/projects/uart/dev/ata/ata-queue.c#18 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.63 2006/03/31 08:09:05 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.64 2006/04/17 10:47:01 sos Exp $"); #include "opt_ata.h" #include @@ -270,7 +270,7 @@ return; } if (request->flags & ATA_R_DANGER1) - request->flags |= ATA_R_DANGER2 + request->flags |= ATA_R_DANGER2; ATA_DEBUG_RQ(request, "completed entered"); ==== //depot/projects/uart/dev/ata/ata-raid.c#12 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.119 2006/03/09 08:34:44 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.120 2006/04/15 10:27:41 maxim Exp $"); #include "opt_ata.h" #include @@ -974,7 +974,7 @@ * metadata format from the disks (if we support it). */ printf("WARNING!! - not able to determine metadata format\n" - "WARNING!! - Using FreeBSD PsuedoRAID metadata\n" + "WARNING!! - Using FreeBSD PseudoRAID metadata\n" "If that is not what you want, use the BIOS to " "create the array\n"); ctlr = AR_F_FREEBSD_RAID; ==== //depot/projects/uart/dev/ath/if_ath.c#26 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.138 2006/04/03 18:14:02 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.140 2006/04/16 18:24:27 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -1929,7 +1929,7 @@ const HAL_RATE_TABLE *rt; u_int8_t rix, rate; - DPRINTF(sc, ATH_DEBUG_BEACON, "%s: m %p len %u\n", + DPRINTF(sc, ATH_DEBUG_BEACON_PROC, "%s: m %p len %u\n", __func__, m, m->m_len); /* setup descriptors */ @@ -2021,7 +2021,7 @@ */ if (ath_hal_numtxpending(ah, sc->sc_bhalq) != 0) { sc->sc_bmisscount++; - DPRINTF(sc, ATH_DEBUG_BEACON_PROC, + DPRINTF(sc, ATH_DEBUG_BEACON, "%s: missed %u consecutive beacons\n", __func__, sc->sc_bmisscount); if (sc->sc_bmisscount > 3) /* NB: 3 is a guess */ @@ -2042,7 +2042,7 @@ * of the TIM bitmap). */ m = bf->bf_m; - ncabq = ath_hal_numtxpending(ah, sc->sc_cabq->axq_qnum); + ncabq = sc->sc_cabq->axq_depth; if (ieee80211_beacon_update(ic, bf->bf_node, &sc->sc_boff, m, ncabq)) { /* XXX too conservative? */ bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); @@ -2102,7 +2102,7 @@ * Enable the CAB queue before the beacon queue to >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Apr 18 20:27:56 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8D17116A411; Tue, 18 Apr 2006 20:27:56 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 503F316A401 for ; Tue, 18 Apr 2006 20:27:56 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD7D043D6A for ; Tue, 18 Apr 2006 20:27:42 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IKRg8t060074 for ; Tue, 18 Apr 2006 20:27:42 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IKRg0Z060071 for perforce@freebsd.org; Tue, 18 Apr 2006 20:27:42 GMT (envelope-from marcel@freebsd.org) Date: Tue, 18 Apr 2006 20:27:42 GMT Message-Id: <200604182027.k3IKRg0Z060071@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 Cc: Subject: PERFORCE change 95523 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 20:27:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=95523 Change 95523 by marcel@marcel_nfs on 2006/04/18 20:26:48 o Implement puc_bfe_detach(). Affected files ... .. //depot/projects/uart/dev/puc/puc.c#28 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#28 (text+ko) ==== @@ -290,7 +290,46 @@ int puc_bfe_detach(device_t dev) { - return (ENXIO); + struct puc_bar *bar; + struct puc_port *port; + struct puc_softc *sc; + int error, idx; + + sc = device_get_softc(dev); + + /* Detach our children. */ + error = 0; + for (idx = 0; idx < sc->sc_nports; idx++) { + port = &sc->sc_port[idx]; + if (port->p_dev == NULL) + continue; + if (device_detach(port->p_dev) == 0) { + device_delete_child(dev, port->p_dev); + if (port->p_rres != NULL) + rman_release_resource(port->p_rres); + if (port->p_ires != NULL) + rman_release_resource(port->p_ires); + } else + error = ENXIO; + } + if (error) + return (error); + + bus_teardown_intr(dev, sc->sc_ires, sc->sc_icookie); + bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irid, sc->sc_ires); + + for (idx = 0; idx < PUC_PCI_BARS; idx++) { + bar = &sc->sc_bar[idx]; + if (bar->b_res != NULL) + bus_release_resource(sc->sc_dev, bar->b_type, + bar->b_rid, bar->b_res); + } + + rman_fini(&sc->sc_irq); + rman_fini(&sc->sc_iomem); + rman_fini(&sc->sc_ioport); + free(sc->sc_port, M_PUC); + return (0); } int From owner-p4-projects@FreeBSD.ORG Tue Apr 18 20:30:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8212716A406; Tue, 18 Apr 2006 20:30:47 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4850716A404 for ; Tue, 18 Apr 2006 20:30:47 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F35D643D45 for ; Tue, 18 Apr 2006 20:30:46 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IKUkTf062170 for ; Tue, 18 Apr 2006 20:30:46 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IKUk5m062164 for perforce@freebsd.org; Tue, 18 Apr 2006 20:30:46 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 20:30:46 GMT Message-Id: <200604182030.k3IKUk5m062164@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95524 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 20:30:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=95524 Change 95524 by jb@jb_freebsd2 on 2006/04/18 20:30:17 Hide a few definitions when including this file in kernel code. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/types.h#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/types.h#3 (text+ko) ==== @@ -51,10 +51,12 @@ typedef id_t zoneid_t; typedef id_t ctid_t; +#ifndef _KERNEL #if defined(__XOPEN_OR_POSIX) typedef enum { _B_FALSE, _B_TRUE } boolean_t; #else typedef enum { B_FALSE, B_TRUE } boolean_t; #endif /* defined(__XOPEN_OR_POSIX) */ +#endif #endif From owner-p4-projects@FreeBSD.ORG Tue Apr 18 20:31:49 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1899E16A409; Tue, 18 Apr 2006 20:31:49 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC05C16A407 for ; Tue, 18 Apr 2006 20:31:48 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A525D43D49 for ; Tue, 18 Apr 2006 20:31:48 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IKVmOl062872 for ; Tue, 18 Apr 2006 20:31:48 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IKVmlQ062866 for perforce@freebsd.org; Tue, 18 Apr 2006 20:31:48 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 20:31:48 GMT Message-Id: <200604182031.k3IKVmlQ062866@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95525 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 20:31:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=95525 Change 95525 by jb@jb_freebsd2 on 2006/04/18 20:31:06 Remove a definition which FreeBSD does have. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/elf.h#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/elf.h#4 (text+ko) ==== @@ -104,7 +104,6 @@ #define EM_X86_64 EM_AMD64 /* (compatibility) */ #endif -typedef unsigned long long Elf64_Xword; typedef unsigned long long Elf64_Lword; typedef unsigned long long Elf32_Lword; From owner-p4-projects@FreeBSD.ORG Tue Apr 18 20:33:52 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 840F016A402; Tue, 18 Apr 2006 20:33:52 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6390716A400 for ; Tue, 18 Apr 2006 20:33:52 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98EE643D5C for ; Tue, 18 Apr 2006 20:33:51 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IKXpVQ064269 for ; Tue, 18 Apr 2006 20:33:51 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IKXpv5064266 for perforce@freebsd.org; Tue, 18 Apr 2006 20:33:51 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 20:33:51 GMT Message-Id: <200604182033.k3IKXpv5064266@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95526 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 20:33:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=95526 Change 95526 by jb@jb_freebsd2 on 2006/04/18 20:33:31 Hide the #pragma Need this file to compile cleanly. Reducing the warning level in kernel code is unwise IMO. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/ctf.h#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/ctf.h#3 (text) ==== @@ -27,7 +27,9 @@ #ifndef _CTF_H #define _CTF_H +#if defined(sun) #pragma ident "@(#)ctf.h 1.5 05/06/08 SMI" +#endif #include #if !defined(sun) From owner-p4-projects@FreeBSD.ORG Tue Apr 18 20:35:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1466716A40E; Tue, 18 Apr 2006 20:35:58 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4F7E16A404 for ; Tue, 18 Apr 2006 20:35:57 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A663B43D69 for ; Tue, 18 Apr 2006 20:35:54 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IKZsoU064410 for ; Tue, 18 Apr 2006 20:35:54 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IKZsKb064407 for perforce@freebsd.org; Tue, 18 Apr 2006 20:35:54 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 20:35:54 GMT Message-Id: <200604182035.k3IKZsKb064407@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95527 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 20:35:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=95527 Change 95527 by jb@jb_freebsd2 on 2006/04/18 20:34:55 Since this file is included in kernel code, it needs to include just kernel headers. Also, hide the #pragma so we get a clean compile. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/ctf_api.h#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/ctf_api.h#4 (text) ==== @@ -40,14 +40,18 @@ #ifndef _CTF_API_H #define _CTF_API_H +#if defined(sun) #pragma ident "@(#)ctf_api.h 1.4 05/06/08 SMI" +#endif #include #include #if defined(sun) #include #else -#include +#include +#include +#include #include #include #endif From owner-p4-projects@FreeBSD.ORG Tue Apr 18 20:36:57 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C9BF16A40B; Tue, 18 Apr 2006 20:36:57 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDB0416A401 for ; Tue, 18 Apr 2006 20:36:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A52D643D48 for ; Tue, 18 Apr 2006 20:36:56 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IKauhe064438 for ; Tue, 18 Apr 2006 20:36:56 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IKau6g064435 for perforce@freebsd.org; Tue, 18 Apr 2006 20:36:56 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 20:36:56 GMT Message-Id: <200604182036.k3IKau6g064435@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95529 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 20:36:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=95529 Change 95529 by jb@jb_freebsd2 on 2006/04/18 20:35:56 Add a couple of extra include paths. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#2 (text+ko) ==== @@ -6,6 +6,6 @@ SRCS= dtrace.c SRCS+= bus_if.h device_if.h vnode_if.h -CFLAGS+= -I${.CURDIR}/../.. +CFLAGS+= -I${.CURDIR}/../.. -I${.CURDIR}/../../contrib -I${.CURDIR}/../../contrib/opensolaris/uts/common .include From owner-p4-projects@FreeBSD.ORG Tue Apr 18 20:43:05 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 223C216A407; Tue, 18 Apr 2006 20:43:05 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD78F16A404 for ; Tue, 18 Apr 2006 20:43:04 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9680743D48 for ; Tue, 18 Apr 2006 20:43:04 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IKh4gj067061 for ; Tue, 18 Apr 2006 20:43:04 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IKh4KN067055 for perforce@freebsd.org; Tue, 18 Apr 2006 20:43:04 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 20:43:04 GMT Message-Id: <200604182043.k3IKh4KN067055@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95530 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 20:43:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=95530 Change 95530 by jb@jb_freebsd2 on 2006/04/18 20:42:22 I can spell. I just can't type. Affected files ... .. //depot/projects/dtrace/src/sys/conf/NOTES#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/NOTES#3 (text+ko) ==== @@ -249,7 +249,7 @@ options SLEEPQUEUE_PROFILING options TURNSTILE_PROFILING -# Dynamic Tracting (DTrace) options: +# Dynamic Tracing (DTrace) options: device dtrace From owner-p4-projects@FreeBSD.ORG Tue Apr 18 20:52:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2445A16A405; Tue, 18 Apr 2006 20:52:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02AC216A402 for ; Tue, 18 Apr 2006 20:52:18 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C2B843D5F for ; Tue, 18 Apr 2006 20:52:16 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IKqGDW081715 for ; Tue, 18 Apr 2006 20:52:16 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IKqFBX081700 for perforce@freebsd.org; Tue, 18 Apr 2006 20:52:15 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 20:52:15 GMT Message-Id: <200604182052.k3IKqFBX081700@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95531 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 20:52:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=95531 Change 95531 by jb@jb_freebsd2 on 2006/04/18 20:51:31 Add the shell of the fasttrap device which is the second device that dtrace(1) needs to talk to. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap.h#1 add .. //depot/projects/dtrace/src/sys/conf/NOTES#4 edit .. //depot/projects/dtrace/src/sys/conf/files#4 edit .. //depot/projects/dtrace/src/sys/modules/Makefile#2 edit .. //depot/projects/dtrace/src/sys/modules/fasttrap/Makefile#1 add Differences ... ==== //depot/projects/dtrace/src/sys/conf/NOTES#4 (text+ko) ==== @@ -251,6 +251,7 @@ # Dynamic Tracing (DTrace) options: device dtrace +device fasttrap ##################################################################### ==== //depot/projects/dtrace/src/sys/conf/files#4 (text+ko) ==== @@ -93,6 +93,7 @@ cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ cddl/dev/dtrace/dtrace.c optional dtrace +cddl/dev/fasttrap/fasttrap.c optional fasttrap coda/coda_fbsd.c optional vcoda coda/coda_namecache.c optional vcoda coda/coda_psdev.c optional vcoda ==== //depot/projects/dtrace/src/sys/modules/Makefile#2 (text+ko) ==== @@ -67,6 +67,7 @@ ${_digi} \ ${_dpt} \ ${_drm} \ + dtrace \ dummynet \ ${_ed} \ ${_elink} \ @@ -77,6 +78,7 @@ ${_exca} \ ${_ext2fs} \ fatm \ + fasttrap \ fdc \ fdescfs \ ${_fe} \ From owner-p4-projects@FreeBSD.ORG Tue Apr 18 20:56:22 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8AD8016A404; Tue, 18 Apr 2006 20:56:22 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5199F16A402 for ; Tue, 18 Apr 2006 20:56:22 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11F7743D46 for ; Tue, 18 Apr 2006 20:56:22 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IKuLbF082722 for ; Tue, 18 Apr 2006 20:56:21 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IKuL59082719 for perforce@freebsd.org; Tue, 18 Apr 2006 20:56:21 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 20:56:21 GMT Message-Id: <200604182056.k3IKuL59082719@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95532 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 20:56:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=95532 Change 95532 by imp@imp_Speedy on 2006/04/18 20:55:29 another sensible interface choice saves 200ish bytes Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#4 (text+ko) ==== @@ -2,7 +2,7 @@ CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ - -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ + -Wall -Waggregate-return -Wcast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Werror ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#4 (text+ko) ==== @@ -72,20 +72,10 @@ static unsigned BuildIP(void) { - unsigned p_ip_addr; - - p_ip_addr = p_ASCIIToDec(argv[1]); - p_ip_addr <<= 8; - - p_ip_addr |= p_ASCIIToDec(argv[2]); - p_ip_addr <<= 8; - - p_ip_addr |= p_ASCIIToDec(argv[3]); - p_ip_addr <<= 8; - - p_ip_addr |= p_ASCIIToDec(argv[4]); - - return (p_ip_addr); + return ((p_ASCIIToDec(argv[1]) << 24) | + (p_ASCIIToDec(argv[2]) << 16) | + (p_ASCIIToDec(argv[3]) << 8) | + p_ASCIIToDec(argv[4])); } @@ -193,14 +183,12 @@ // copy memory char *to, *from; - unsigned toarg, fromarg, size; + unsigned size; if (argc > 3) { - p_ASCIIToHex(argv[1], &toarg); - p_ASCIIToHex(argv[2], &fromarg); - p_ASCIIToHex(argv[3], &size); - to = (char *)toarg; - from = (char *)fromarg; + to = (char *)p_ASCIIToHex(argv[1]); + from = (char *)p_ASCIIToHex(argv[2]); + size = p_ASCIIToHex(argv[3]); p_memcpy(to, from, size); } @@ -218,12 +206,11 @@ // execute at address void (*execAddr)(unsigned, unsigned, unsigned); - unsigned addr; if (argc > 1) { - p_ASCIIToHex(argv[1], &addr); /* in future, include machtypes (MACH_KB9200 = 612) */ - execAddr = (void (*)(unsigned, unsigned, unsigned))addr; + execAddr = (void (*)(unsigned, unsigned, unsigned)) + p_ASCIIToHex(argv[1]); (*execAddr)(0, 612, tagAddress); } @@ -238,7 +225,7 @@ unsigned address = 0; if (argc > 2) - p_ASCIIToHex(argv[1], &address); + address = p_ASCIIToHex(argv[1]); TFTP_Download(address, argv[2]); @@ -282,30 +269,17 @@ // "m // set mac address using 6 byte values - unsigned u_value, low_addr, high_addr; + unsigned low_addr, high_addr; if (argc > 6) { - p_ASCIIToHex(argv[4], &low_addr); - low_addr <<= 8; - - p_ASCIIToHex(argv[3], &u_value); - low_addr |= u_value; - low_addr <<= 8; - - p_ASCIIToHex(argv[2], &u_value); - low_addr |= u_value; - low_addr <<= 8; - - p_ASCIIToHex(argv[1], &u_value); - low_addr |= u_value; - - p_ASCIIToHex(argv[6], &high_addr); - high_addr <<= 8; - - p_ASCIIToHex(argv[5], &u_value); - high_addr |= u_value; - + low_addr = (p_ASCIIToHex(argv[4]) << 24) | + (p_ASCIIToHex(argv[3]) << 16) | + (p_ASCIIToHex(argv[2]) << 8) | + p_ASCIIToHex(argv[1]); + high_addr = + (p_ASCIIToHex(argv[6]) << 8) | + p_ASCIIToHex(argv[5]); SetMACAddress(low_addr, high_addr); } @@ -321,7 +295,7 @@ if (argc > 1) { RestoreSpace(2); - p_ASCIIToHex(argv[1], &index); + index = p_ASCIIToHex(argv[1]); SetBootCommand(index, argv[2]); } @@ -336,7 +310,7 @@ if (argc > 2) { RestoreSpace(2); - p_ASCIIToHex(argv[1], &tagAddress); + tagAddress = p_ASCIIToHex(argv[1]); InitTagList(argv[2], (void*)tagAddress); } @@ -356,11 +330,9 @@ // download X-modem record at address char *destAddr = 0; - unsigned addr; if (argc > 1) { - p_ASCIIToHex(argv[1], &addr); - destAddr = (char *)addr; + destAddr = (char *)p_ASCIIToHex(argv[1]); xmodem_rx(destAddr); } } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#3 (text+ko) ==== @@ -110,15 +110,15 @@ /* * .KB_C_FN_DEFINITION_START - * void p_ASCIIToHex(char *, unsigned *) + * unsigned p_ASCIIToHex(char *) * This global function set the unsigned value equal to the converted * hex number passed as a string. No error checking is performed; the * string must be valid hex value, point at the start of string, and be * NULL-terminated. * .KB_C_FN_DEFINITION_END */ -void -p_ASCIIToHex(const char *buf, unsigned *value) +unsigned +p_ASCIIToHex(const char *buf) { unsigned lValue = 0; @@ -129,14 +129,13 @@ lValue <<= 4; lValue += p_HexCharValue(*buf++); } - - *value = lValue; + return (lValue); } /* * .KB_C_FN_DEFINITION_START - * void p_ASCIIToDec(char *, unsigned *) + * unsigned p_ASCIIToDec(char *) * This global function set the unsigned value equal to the converted * decimal number passed as a string. No error checking is performed; the * string must be valid decimal value, point at the start of string, and be ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#3 (text+ko) ==== @@ -28,7 +28,7 @@ void p_memset(char *buffer, char value, int size); int p_strlen(const char *buffer); char *p_strcpy(char *to, const char *from); -void p_ASCIIToHex(const char *buf, unsigned *value); +unsigned p_ASCIIToHex(const char *buf); unsigned p_ASCIIToDec(const char *buf); void p_memcpy(char *to, const char *from, unsigned size); int p_memcmp(const char *to, const char *from, unsigned size); From owner-p4-projects@FreeBSD.ORG Tue Apr 18 21:00:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8471316A40F; Tue, 18 Apr 2006 21:00:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49FBA16A40D for ; Tue, 18 Apr 2006 21:00:28 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 761DB43D5D for ; Tue, 18 Apr 2006 21:00:27 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IL0ROK082969 for ; Tue, 18 Apr 2006 21:00:27 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IL0RUt082963 for perforce@freebsd.org; Tue, 18 Apr 2006 21:00:27 GMT (envelope-from marcel@freebsd.org) Date: Tue, 18 Apr 2006 21:00:27 GMT Message-Id: <200604182100.k3IL0RUt082963@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 Cc: Subject: PERFORCE change 95533 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 21:00:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=95533 Change 95533 by marcel@marcel_nfs on 2006/04/18 21:00:21 IFC @95528 Affected files ... .. //depot/projects/uart/amd64/amd64/pmap.c#32 integrate .. //depot/projects/uart/kern/kern_rwlock.c#4 integrate Differences ... ==== //depot/projects/uart/amd64/amd64/pmap.c#32 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.545 2006/04/13 03:31:48 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.547 2006/04/18 20:17:32 peter Exp $"); /* * Manages physical address maps. @@ -1547,7 +1547,7 @@ PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); - PV_STAT(pv_entry_count--); + pv_entry_count--; pc = pv_to_chunk(pv); idx = pv - &pc->pc_pventry[0]; field = idx / 64; @@ -1588,7 +1588,7 @@ PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); - PV_STAT(pv_entry_count++); + pv_entry_count++; if (pv_entry_count > pv_entry_high_water) pagedaemon_wakeup(); pc = TAILQ_FIRST(&pmap->pm_pvchunk); @@ -1616,6 +1616,7 @@ m = vm_page_alloc(NULL, colour, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ); if (m == NULL) { if (try) { + pv_entry_count--; PV_STAT(pc_chunk_tryfail++); return (NULL); } @@ -2777,7 +2778,7 @@ /* Mark free */ PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); - PV_STAT(pv_entry_count--); + pv_entry_count--; pc->pc_map[field] |= bitmask; m->md.pv_list_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); ==== //depot/projects/uart/kern/kern_rwlock.c#4 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_rwlock.c,v 1.7 2006/04/18 18:27:54 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_rwlock.c,v 1.8 2006/04/18 20:32:42 wkoszek Exp $"); #include "opt_ddb.h" @@ -135,7 +135,9 @@ void _rw_rlock(struct rwlock *rw, const char *file, int line) { +#ifdef SMP volatile struct thread *owner; +#endif uintptr_t x; KASSERT(rw_wowner(rw) != curthread, @@ -388,7 +390,9 @@ void _rw_wlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line) { +#ifdef SMP volatile struct thread *owner; +#endif uintptr_t v; if (LOCK_LOG_TEST(&rw->rw_object, 0)) From owner-p4-projects@FreeBSD.ORG Tue Apr 18 21:04:33 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 37A2D16A403; Tue, 18 Apr 2006 21:04:33 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 141FC16A401 for ; Tue, 18 Apr 2006 21:04:33 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF42C43D46 for ; Tue, 18 Apr 2006 21:04:32 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IL4WIC087638 for ; Tue, 18 Apr 2006 21:04:32 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IL4WgL087630 for perforce@freebsd.org; Tue, 18 Apr 2006 21:04:32 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 21:04:32 GMT Message-Id: <200604182104.k3IL4WgL087630@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95534 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 21:04:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=95534 Change 95534 by imp@imp_Speedy on 2006/04/18 21:03:34 Don't force BSS to be in SDRAM. This means we may be able to make these loaders also be 'bootstrap' loaders. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/linker.cfg#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/linker.cfg#2 (text+ko) ==== @@ -179,7 +179,6 @@ SORT(CONSTRUCTORS) } .data1 : { *(.data1) } - . = 0x21200000; .eh_frame : { KEEP (*(.eh_frame)) } .gcc_except_table : { *(.gcc_except_table) } .ctors : From owner-p4-projects@FreeBSD.ORG Tue Apr 18 21:06:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 99D6A16A40A; Tue, 18 Apr 2006 21:06:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EEA416A400 for ; Tue, 18 Apr 2006 21:06:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B305943D6A for ; Tue, 18 Apr 2006 21:06:35 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IL6ZdR089370 for ; Tue, 18 Apr 2006 21:06:35 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IL6Zl8089364 for perforce@freebsd.org; Tue, 18 Apr 2006 21:06:35 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 21:06:35 GMT Message-Id: <200604182106.k3IL6Zl8089364@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95535 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 21:06:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=95535 Change 95535 by imp@imp_Speedy on 2006/04/18 21:05:47 More cruft not needed when tagList support isn't enabled. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#5 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#5 (text+ko) ==== @@ -54,7 +54,9 @@ {COMMAND_MAC, "m"}, {COMMAND_SERVER_IP, "server_ip"}, {COMMAND_SET, "s"}, +#ifdef SUPPORT_TAG_LIST {COMMAND_TAG, "t"}, +#endif {COMMAND_TFTP, "tftp"}, {COMMAND_WRITE, "w"}, {COMMAND_XMODEM, "x"}, @@ -251,7 +253,9 @@ "\tm\r\n" "\ttftp\r\n" "\ts\r\n" +#ifdef SUPPORT_TAG_LIST "\tt\r\n" +#endif "\tw\r\n" "\tx\r\n"); break; From owner-p4-projects@FreeBSD.ORG Tue Apr 18 21:07:38 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1FA1316A409; Tue, 18 Apr 2006 21:07:38 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9D2516A404 for ; Tue, 18 Apr 2006 21:07:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7382743D64 for ; Tue, 18 Apr 2006 21:07:37 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IL7bYV090169 for ; Tue, 18 Apr 2006 21:07:37 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IL7bGi090166 for perforce@freebsd.org; Tue, 18 Apr 2006 21:07:37 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 21:07:37 GMT Message-Id: <200604182107.k3IL7bGi090166@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95536 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 21:07:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=95536 Change 95536 by imp@imp_Speedy on 2006/04/18 21:07:28 We don't need a string associated with the last command. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#6 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#6 (text+ko) ==== @@ -60,7 +60,7 @@ {COMMAND_TFTP, "tftp"}, {COMMAND_WRITE, "w"}, {COMMAND_XMODEM, "x"}, - {COMMAND_FINAL_FLAG, "none"} + {COMMAND_FINAL_FLAG, 0} }; static unsigned tagAddress; From owner-p4-projects@FreeBSD.ORG Tue Apr 18 22:08:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1282A16A409; Tue, 18 Apr 2006 22:08:58 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E438F16A405 for ; Tue, 18 Apr 2006 22:08:57 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A077C43D49 for ; Tue, 18 Apr 2006 22:08:57 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IM8vxJ024409 for ; Tue, 18 Apr 2006 22:08:57 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IM8vG0024403 for perforce@freebsd.org; Tue, 18 Apr 2006 22:08:57 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 22:08:57 GMT Message-Id: <200604182208.k3IM8vG0024403@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95547 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 22:08:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=95547 Change 95547 by imp@imp_Speedy on 2006/04/18 22:08:27 Some common sense optimizations of the tftp code. Saves about 300 bytes, about a 10% savings. bootspi is now < 12k, but bootiic is still just over. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#5 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#2 (text+ko) ==== @@ -32,8 +32,7 @@ static unsigned localMACSet, serverMACSet, MAC_init; static unsigned char localMACAddr[6], serverMACAddr[6]; -static unsigned localIPSet, serverIPSet; -static unsigned char localIPAddr[4], serverIPAddr[4]; +static unsigned localIPAddr, serverIPAddr; static unsigned short serverPort, localPort; static int ackBlock; @@ -89,11 +88,8 @@ p_ARP->operation = SWAP16(ARP_REQUEST); p_memcpy((char*)p_ARP->sender_mac, (char*)localMACAddr, 6); - p_memcpy((char*)p_ARP->sender_ip, (char*)localIPAddr, 4); - p_memset((char*)p_ARP->target_mac, 0, 6); - p_memcpy((char*)p_ARP->target_ip, (char*)serverIPAddr, 4); // wait until transmit is available @@ -120,7 +116,6 @@ unsigned t_checksum; p_memcpy((char*)macHdr->dest_mac, (char*)serverMACAddr, 6); - p_memcpy((char*)macHdr->src_mac, (char*)localMACAddr, 6); macHdr->proto_mac = SWAP16(PROTOCOL_IP); @@ -137,15 +132,14 @@ ipHdr->ip_sum = 0; p_memcpy((char*)ipHdr->ip_src, (char*)localIPAddr, 4); - p_memcpy((char*)ipHdr->ip_dst, (char*)serverIPAddr, 4); ipHdr->ip_sum = SWAP16(IP_checksum(ipHdr, 20)); udpHdr = (udp_header_t*)(ipHdr + 1); - udpHdr->src_port = SWAP16(localPort); - udpHdr->dst_port = SWAP16(serverPort); + udpHdr->src_port = localPort; + udpHdr->dst_port = serverPort; udpHdr->udp_len = SWAP16(8 + tftpLength); udpHdr->udp_cksum = 0; @@ -207,7 +201,7 @@ { tftp_header_t tftpHeader; - if (block_num == (ackBlock + 1)) { + if (block_num == SWAP16(ackBlock + 1)) { ++ackBlock; p_memcpy(dlAddress, data, len); dlAddress += len; @@ -215,7 +209,7 @@ } tftpHeader.opcode = SWAP16(TFTP_ACK_OPCODE); - tftpHeader.block_num = SWAP16(block_num); + tftpHeader.block_num = block_num; Send_TFTP_Packet((char*)&tftpHeader, 4); if (len < 512) @@ -231,7 +225,7 @@ * .KB_C_FN_DEFINITION_END */ static void -CheckForNewPacket(ip_header_t *pHeader) +CheckForNewPacket(void) { unsigned short *pFrameType; unsigned i; @@ -262,7 +256,8 @@ case PROTOCOL_ARP: p_ARP = (arp_header_t*)pData; - if (SWAP16(p_ARP->operation) == ARP_REPLY) { + i = SWAP16(p_ARP->operation); + if (i == ARP_REPLY) { // check if new server info is available if ((!serverMACSet) && @@ -274,30 +269,22 @@ p_memcpy((char*)serverMACAddr, (char*)p_ARP->sender_mac, 6); } - } - - if (SWAP16(p_ARP->operation) == ARP_REQUEST) { + } else if (i == ARP_REQUEST) { // ARP REPLY operation p_ARP->operation = SWAP16(ARP_REPLY); - // Fill the dest address and src address - for (i = 0; i <6; i++) { - // swap ethernet dest address and ethernet src address - pData[i] = pData[i+6]; - pData[i+6] = localMACAddr[i]; - // swap sender ethernet address and target ethernet address - pData[i+22] = localMACAddr[i]; - pData[i+32] = pData[i+6]; - } + // Swap the src/dst MAC addr + p_memcpy(p_ARP->dest_mac, p_ARP->src_mac, 6); + p_memcpy(p_ARP->src_mac, localMACAddr, 6); + + // Do IP and MAC addr at same time. + p_memcpy(p_ARP->target_mac, p_ARP->sender_mac, 10); + p_memcpy(p_ARP->sender_mac, localMACAddr, 6); + p_memcpy(p_ARP->sender_ip, (char *)&localIPAddr, 4); - // swap sender IP address and target IP address - for (i = 0; i<4; i++) { - pData[i+38] = pData[i+28]; - pData[i+28] = localIPAddr[i]; - } - - if (!(*AT91C_EMAC_TSR & AT91C_EMAC_BNQ)) break; + if (!(*AT91C_EMAC_TSR & AT91C_EMAC_BNQ)) + break; *AT91C_EMAC_TSR |= AT91C_EMAC_COMP; *AT91C_EMAC_TAR = (unsigned)pData; @@ -307,10 +294,7 @@ case PROTOCOL_IP: pIpHeader = (ip_header_t*)(pData + 14); - p_memcpy((char*)pHeader, (char*)pIpHeader,sizeof(ip_header_t)); - switch(pIpHeader->ip_p) { - case PROTOCOL_UDP: { udp_header_t *udpHdr; @@ -319,24 +303,24 @@ udpHdr = (udp_header_t*)((char*)pIpHeader+20); tftpHdr = (tftp_header_t*)((char*)udpHdr + 8); - if (SWAP16(udpHdr->dst_port) != localPort) + if (udpHdr->dst_port != localPort) break; - if (SWAP16(tftpHdr->opcode) != TFTP_DATA_OPCODE) + if (tftpHdr->opcode != SWAP16(TFTP_DATA_OPCODE)) break; if (ackBlock == -1) { - if (SWAP16(tftpHdr->block_num) != 1) + if (tftpHdr->block_num != SWAP16(1)) break; - serverPort = SWAP16(udpHdr->src_port); + serverPort = udpHdr->src_port; ackBlock = 0; } - if (serverPort != SWAP16(udpHdr->src_port)) + if (serverPort != udpHdr->src_port) break; TFTP_ACK_Data(tftpHdr->data, - SWAP16(tftpHdr->block_num), + tftpHdr->block_num, SWAP16(udpHdr->udp_len) - 12); } break; @@ -502,13 +486,7 @@ { // force update in case the IP has changed serverMACSet = 0; - - serverIPAddr[0] = (address >> 24) & 0xFF; - serverIPAddr[1] = (address >> 16) & 0xFF; - serverIPAddr[2] = (address >> 8) & 0xFF; - serverIPAddr[3] = (address >> 0) & 0xFF; - - serverIPSet = 1; + serverIPAddr = address; } @@ -523,13 +501,7 @@ { // force update in case the IP has changed serverMACSet = 0; - - localIPAddr[0] = (address >> 24) & 0xFF; - localIPAddr[1] = (address >> 16) & 0xFF; - localIPAddr[2] = (address >> 8) & 0xFF; - localIPAddr[3] = (address >> 0) & 0xFF; - - localIPSet = 1; + localIPAddr = address; } @@ -544,7 +516,6 @@ void TFTP_Download(unsigned address, char *filename) { - ip_header_t IpHeader; unsigned thisSeconds, running, state; int timeout, tickUpdate; @@ -556,7 +527,7 @@ return ; } - if ((!localMACSet) || (!localIPSet) || (!serverIPSet)) + if ((!localMACSet) || (!localIPAddr) || (!serverIPAddr)) return ; if (!MAC_init) { @@ -617,13 +588,13 @@ state = TFTP_WAITING_SERVER_MAC; timeout = 10; thisSeconds = GetSeconds(); - serverPort = 69; - ++localPort; + serverPort = SWAP16(69); + localPort++; /* In network byte order, but who cares */ ackBlock = -1; while (running && timeout) { - CheckForNewPacket(&IpHeader); + CheckForNewPacket(); tickUpdate = 0; @@ -685,9 +656,7 @@ p_rxBD = (receive_descriptor_t*)RX_BUFFER_START; localMACSet = 0; serverMACSet = 0; - localIPSet = 0; - serverIPSet = 0; - localPort = 0x8002; + localPort = SWAP16(0x8002); lastAddress = 0; lastSize = 0; MAC_init = 0; From owner-p4-projects@FreeBSD.ORG Tue Apr 18 22:23:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3B5AA16A437; Tue, 18 Apr 2006 22:23:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19D7116A434 for ; Tue, 18 Apr 2006 22:23:16 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C495F43D46 for ; Tue, 18 Apr 2006 22:23:15 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IMNF1Q030911 for ; Tue, 18 Apr 2006 22:23:15 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IMNFNK030905 for perforce@freebsd.org; Tue, 18 Apr 2006 22:23:15 GMT (envelope-from imp@freebsd.org) Date: Tue, 18 Apr 2006 22:23:15 GMT Message-Id: <200604182223.k3IMNFNK030905@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95549 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 22:23:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=95549 Change 95549 by imp@imp_Speedy on 2006/04/18 22:23:09 On second thought, move bss back into SDRAM. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/linker.cfg#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/linker.cfg#3 (text+ko) ==== @@ -179,6 +179,7 @@ SORT(CONSTRUCTORS) } .data1 : { *(.data1) } + . = 0x21200000; .eh_frame : { KEEP (*(.eh_frame)) } .gcc_except_table : { *(.gcc_except_table) } .ctors : From owner-p4-projects@FreeBSD.ORG Tue Apr 18 22:33:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4560E16A403; Tue, 18 Apr 2006 22:33:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2540616A415 for ; Tue, 18 Apr 2006 22:33:30 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2567F43D6D for ; Tue, 18 Apr 2006 22:33:29 +0000 (GMT) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IMXTg4038742 for ; Tue, 18 Apr 2006 22:33:29 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IMXSTU038739 for perforce@freebsd.org; Tue, 18 Apr 2006 22:33:28 GMT (envelope-from csjp@freebsd.org) Date: Tue, 18 Apr 2006 22:33:28 GMT Message-Id: <200604182233.k3IMXSTU038739@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 95551 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 22:33:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=95551 Change 95551 by csjp@csjp_xor on 2006/04/18 22:33:26 Add license, not sure how I forgot about this :) Pointed out by: brueffer Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#4 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#4 (text+ko) ==== @@ -1,3 +1,35 @@ +.\" +.\" Copyright (c) 2006 Christian S.J. Peron +.\" All rights reserved. +.\" +.\" This code was developed in part by Robert N. M. Watson, Senior Principal +.\" Scientist, SPARTA, Inc. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 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. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT 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. +.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#4 $ .Dd April 11, 2006 .Dt audit_submit 3 .Os From owner-p4-projects@FreeBSD.ORG Tue Apr 18 22:33:49 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B163316A406; Tue, 18 Apr 2006 22:33:49 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 528DE16A403 for ; Tue, 18 Apr 2006 22:33:49 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from ems01.seccuris.com (ems01.seccuris.com [204.112.0.35]) by mx1.FreeBSD.org (Postfix) with SMTP id C332543D72 for ; Tue, 18 Apr 2006 22:33:41 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: (qmail 26791 invoked by uid 86); 18 Apr 2006 22:50:56 -0000 Received: from unknown (HELO ?192.168.11.101?) (192.168.11.101) by ems01.seccuris.com with SMTP; 18 Apr 2006 22:50:56 -0000 Message-ID: <44456949.7020806@FreeBSD.org> Date: Tue, 18 Apr 2006 17:33:45 -0500 From: "Christian S.J. Peron" User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: Christian Brueffer References: <200604181846.k3IIkYp9002843@repoman.freebsd.org> In-Reply-To: <200604181846.k3IIkYp9002843@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Perforce Change Reviews Subject: Re: PERFORCE change 95512 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 22:33:50 -0000 Christian Brueffer wrote: > http://perforce.freebsd.org/chv.cgi?CH=95512 > > Change 95512 by brueffer@brueffer_serenity on 2006/04/18 18:46:31 > > Cleanup (formatting, sentence breaks, mdoc...) > > Affected files ... > > .. //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#3 edit > > Differences ... > > ==== //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#3 (text+ko) ==== > > @@ -24,18 +24,19 @@ > .Fa status > and > .Fa reterr > -arguments. Optionally, a text token will be created as a part of this record. > +arguments. > +Optionally, a text token will be created as a part of this record. > .Pp > Text token output is under the control of a > .Fa format > string that specifies how subsequent arguments (or arguments accessed via the > variable-length argument facilities of > -.Xr stdarg 3 > -are converted for output. If > +.Xr stdarg 3 ) > +are converted for output. > +If > .Fa format > is NULL, then no text token is created in the audit record. > .Sh EXAMPLES > -.Pp > .Bd -literal -offset indent > #include > #include > @@ -56,7 +57,7 @@ > } > .Ed > .Pp > -Will generate the followng audit record: > +Will generate the following audit record: > .Bd -literal -offset indent > header,94,1,su(1),0,Mon Apr 17 23:23:59 2006, + 271 msec > subject,root,root,wheel,root,wheel,652,652,0,0.0.0.0 > @@ -71,6 +72,10 @@ > .Sh HISTORY > The > .Nm > -function was written by Christian S.J. Peron and > -first appeared in OpenBSM version 1.0. OpenBSM 1.0 was introduced in > -FreeBSD 7.0. > +first appeared in OpenBSM version 1.0. > +OpenBSM 1.0 was introduced in FreeBSD 7.0. > +.Sh AUTHORS > +The > +.Nm > +function was written by > +.An Christian S.J. Peron Aq csjp@FreeBSD.org . > > > Thanks for all this! -- Christian S.J. Peron csjp@FreeBSD.ORG FreeBSD Committer FreeBSD Security Team From owner-p4-projects@FreeBSD.ORG Tue Apr 18 22:35:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C94D916A408; Tue, 18 Apr 2006 22:35:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FE9C16A402 for ; Tue, 18 Apr 2006 22:35:32 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F65E43D53 for ; Tue, 18 Apr 2006 22:35:32 +0000 (GMT) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IMZVxJ038879 for ; Tue, 18 Apr 2006 22:35:32 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IMZVIZ038876 for perforce@freebsd.org; Tue, 18 Apr 2006 22:35:31 GMT (envelope-from csjp@freebsd.org) Date: Tue, 18 Apr 2006 22:35:31 GMT Message-Id: <200604182235.k3IMZVIZ038876@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 95552 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 22:35:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=95552 Change 95552 by csjp@csjp_xor on 2006/04/18 22:35:28 Remove cut-n-pasto from old license Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#5 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#5 (text+ko) ==== @@ -2,9 +2,6 @@ .\" Copyright (c) 2006 Christian S.J. Peron .\" All rights reserved. .\" -.\" This code was developed in part by Robert N. M. Watson, Senior Principal -.\" Scientist, SPARTA, Inc. -.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -29,7 +26,7 @@ .\" STRICT 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. -.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#4 $ +.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#5 $ .Dd April 11, 2006 .Dt audit_submit 3 .Os From owner-p4-projects@FreeBSD.ORG Tue Apr 18 22:40:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9E33816A40E; Tue, 18 Apr 2006 22:40:55 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6289F16A405 for ; Tue, 18 Apr 2006 22:40:55 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3676843D79 for ; Tue, 18 Apr 2006 22:40:41 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IMed9V039434 for ; Tue, 18 Apr 2006 22:40:39 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3IMed3c039426 for perforce@freebsd.org; Tue, 18 Apr 2006 22:40:39 GMT (envelope-from soc-andrew@freebsd.org) Date: Tue, 18 Apr 2006 22:40:39 GMT Message-Id: <200604182240.k3IMed3c039426@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 95555 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 22:40:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=95555 Change 95555 by soc-andrew@soc-andrew_serv on 2006/04/18 22:40:31 Remove unused code fom p4. Most lua modules are now installed from packages Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/.cvsignore#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/conf/cmdnames.conf#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/flow.c#7 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/flow.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn_configure.c#4 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn_diagnostic.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn_disk.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn_install.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn_subpart.c#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn_zonetab.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn_zonetab.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/main.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/pathnames.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/po/dfuibe_installer.pot#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/po/ru.po#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/test/.cvsignore#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/test/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/test/be_test.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/test/po/dfuibe_test.pot#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/test/po/ru.po#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/.cvsignore#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/applet.conf#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/capture.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/cgic.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/cgic.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/cgic.html#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/cgic_readme.txt#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/cgictest.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/dfly-pg.gif#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/dfuife.css#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/dfuife.js#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/dfuife_cgi.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/example.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/fred-bg.gif#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/fred.png#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/green_dot.jpg#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/index.html#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/cgi/license.txt#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/.cvsignore#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/dfuife_qt.pro#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/images/icon.png#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/include/.cvsignore#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/include/form.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/include/mainwindow.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/src/form.cpp#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/src/main.cpp#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/qt/src/mainwindow.cpp#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/test/.cvsignore#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/test/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/frontends/test/fe_test.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/.cvsignore#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/commands.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/commands.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/confed.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/confed.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/diskutil.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/diskutil.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/functions.c#4 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/functions.h#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/mount.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/package.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/package.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/survey.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/sysids.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/uiutil.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/installer/uiutil.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/app/Makefile#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/app/app.lua#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/filename/Makefile#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/filename/filename.lua#4 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/gettext/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/gettext/gettext.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/gettext/lua_gettext.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/pty/Makefile#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/pty/pty.c#4 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/pty/pty.lua#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/INSTALL#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/LICENSE#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/NEW#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/auxiliar.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/auxiliar.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/buffer.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/buffer.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/except.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/except.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/inet.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/inet.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/io.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/io.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/lua/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/lua/ftp.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/lua/http.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/lua/ltn12.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/lua/mime.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/lua/smtp.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/lua/socket.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/lua/tp.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/lua/url.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/luasocket.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/luasocket.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/mime.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/mime.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/options.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/options.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/select.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/select.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/socket.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/tcp.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/tcp.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/timeout.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/timeout.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/udp.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/udp.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/usocket.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/usocket.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/wsocket.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/luasocket/wsocket.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/posix/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/posix/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/posix/lposix.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/posix/modemuncher.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/posix/posix.lua#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/posix/test.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/posix/tree.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/lua/Makefile#2 edit .. //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/lua/app/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/lua/filename/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/lua/pty/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/compat51/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/mime/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/posix/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/socket/Makefile#2 delete Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/lua/Makefile#2 (text+ko) ==== @@ -1,3 +1,3 @@ -SUBDIR=app dfui filename pty +SUBDIR=dfui .include From owner-p4-projects@FreeBSD.ORG Tue Apr 18 23:11:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB0E716A404; Tue, 18 Apr 2006 23:11:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7ED1616A400 for ; Tue, 18 Apr 2006 23:11:18 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31A6443D48 for ; Tue, 18 Apr 2006 23:11:18 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3INBIL9059778 for ; Tue, 18 Apr 2006 23:11:18 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3INBHAW059769 for perforce@freebsd.org; Tue, 18 Apr 2006 23:11:17 GMT (envelope-from jb@freebsd.org) Date: Tue, 18 Apr 2006 23:11:17 GMT Message-Id: <200604182311.k3INBHAW059769@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95558 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 23:11:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=95558 Change 95558 by jb@jb_freebsd2 on 2006/04/18 23:11:03 Uncomment-out all but the body of one function (which requires access to process info and I need to start creating a FreeBSD-specific process library for). There are a few diagnostic printfs in here to remind me of things that are incomplete. This is still work-in-progress. It won't be long before a I can stop messing with this file. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/dtrace.c#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/dtrace.c#2 (text) ==== @@ -213,7 +213,6 @@ va_end(ap); -#ifdef DOODAD if (fmt != NULL && fmt[strlen(fmt) - 1] != '\n') { (void) fprintf(stderr, ": %s\n", dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); @@ -221,7 +220,6 @@ (void) fprintf(stderr, "%s\n", dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); } -#endif exit(E_ERROR); } @@ -457,7 +455,6 @@ static void etcsystem_add(void) { -#ifdef DOODAD const char *mods[20]; int nmods, line; @@ -486,13 +483,11 @@ fatal("failed to close output file '%s'", g_ofile); error("added forceload directives to %s\n", g_ofile); -#endif } static void print_probe_info(const dtrace_probeinfo_t *p) { -#ifdef DOODAD char buf[BUFSIZ]; int i; @@ -527,7 +522,6 @@ oprintf("\t\tNone\n"); oprintf("\n"); -#endif } /*ARGSUSED*/ @@ -545,10 +539,8 @@ oprintf("\n%s:%s:%s:%s\n", pdp->dtpd_provider, pdp->dtpd_mod, pdp->dtpd_func, pdp->dtpd_name); -#ifdef DOODAD if (dtrace_probe_info(dtp, pdp, &p) == 0) print_probe_info(&p); -#endif *last = edp; return (0); @@ -562,7 +554,6 @@ static void exec_prog(const dtrace_cmd_t *dcp) { -#ifdef DOODAD dtrace_ecbdesc_t *last = NULL; dtrace_proginfo_t dpi; @@ -605,7 +596,6 @@ } g_total += dpi.dpi_matches; -#endif } /* @@ -615,7 +605,6 @@ static void anon_prog(const dtrace_cmd_t *dcp, dof_hdr_t *dof, int n) { -#ifdef DOODAD const uchar_t *p, *q; if (dof == NULL) @@ -631,7 +620,6 @@ oprintf(";\n"); dtrace_dof_destroy(g_dtp, dof); -#endif } /* @@ -644,7 +632,6 @@ static void link_prog(dtrace_cmd_t *dcp) { -#ifdef DOODAD char *p; if (g_cmdc == 1 && g_ofile != NULL) { @@ -662,14 +649,12 @@ if (dtrace_program_link(g_dtp, dcp->dc_prog, DTRACE_D_PROBES, dcp->dc_ofile, g_objc - 1, g_objv + 1) != 0) dfatal("failed to link %s %s", dcp->dc_desc, dcp->dc_name); -#endif } /*ARGSUSED*/ static int list_probe(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp, void *arg) { -#ifdef DOODAD dtrace_probeinfo_t p; oprintf("%5d %10s %17s %33s %s\n", pdp->dtpd_id, @@ -677,7 +662,6 @@ if (g_verbose && dtrace_probe_info(dtp, pdp, &p) == 0) print_probe_info(&p); -#endif return (0); } @@ -710,18 +694,15 @@ static void list_prog(const dtrace_cmd_t *dcp) { -#ifdef DOODAD dtrace_ecbdesc_t *last = NULL; (void) dtrace_stmt_iter(g_dtp, dcp->dc_prog, (dtrace_stmt_f *)list_stmt, &last); -#endif } static void compile_file(dtrace_cmd_t *dcp) { -#ifdef DOODAD char *arg0; FILE *fp; @@ -740,13 +721,11 @@ dcp->dc_desc = "script"; dcp->dc_name = dcp->dc_arg; -#endif } static void compile_str(dtrace_cmd_t *dcp) { -#ifdef DOODAD char *p; if ((dcp->dc_prog = dtrace_program_strcompile(g_dtp, dcp->dc_arg, @@ -758,13 +737,13 @@ dcp->dc_desc = "description"; dcp->dc_name = dcp->dc_arg; -#endif } /*ARGSUSED*/ static void prochandler(struct ps_prochandle *P, const char *msg, void *arg) { +fatal("DOODAD in function %s, file %s, line %d\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD const psinfo_t *prp = Ppsinfo(P); int pid = Pstatus(P)->pr_pid; @@ -1072,7 +1051,6 @@ static void go(void) { -#ifdef DOODAD int i; struct { @@ -1164,7 +1142,6 @@ error("%s %s to once every %lld nanoseconds\n", rates[i].name, dir, (long long)nval); } -#endif } /*ARGSUSED*/ @@ -1306,7 +1283,6 @@ * Open libdtrace. If we are not actually going to be enabling any * instrumentation attempt to reopen libdtrace using DTRACE_O_NODEV. */ -#ifdef DOODAD while ((g_dtp = dtrace_open(DTRACE_VERSION, g_oflags, &err)) == NULL) { if (!(g_oflags & DTRACE_O_NODEV) && !g_exec && !g_grabanon) { g_oflags |= DTRACE_O_NODEV; @@ -1316,12 +1292,9 @@ fatal("failed to initialize dtrace: %s\n", dtrace_errmsg(NULL, err)); } -#endif -#ifdef DOODAD (void) dtrace_setopt(g_dtp, "bufsize", "4m"); (void) dtrace_setopt(g_dtp, "aggsize", "4m"); -#endif /* * If -G is specified, enable -xlink=dynamic and -xunodefs to permit @@ -1329,7 +1302,6 @@ * If -A is specified, enable -xlink=primary to permit static linking * only to kernel symbols that are defined in a primary kernel module. */ -#ifdef DOODAD if (g_mode == DMODE_LINK) { (void) dtrace_setopt(g_dtp, "linkmode", "dynamic"); (void) dtrace_setopt(g_dtp, "unodefs", NULL); @@ -1343,7 +1315,6 @@ g_argc = 1; } else if (g_mode == DMODE_ANON) (void) dtrace_setopt(g_dtp, "linkmode", "primary"); -#endif /* * Now that we have libdtrace open, make a second pass through argv[] @@ -1355,18 +1326,14 @@ while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != EOF) { switch (c) { case 'a': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "grabanon", 0) != 0) dfatal("failed to set -a"); -#endif break; case 'b': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "bufsize", optarg) != 0) dfatal("failed to set -b %s", optarg); -#endif break; case 'B': @@ -1378,10 +1345,8 @@ break; case 'D': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "define", optarg) != 0) dfatal("failed to set -D %s", optarg); -#endif break; case 'f': @@ -1392,17 +1357,13 @@ break; case 'F': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "flowindent", 0) != 0) dfatal("failed to set -F"); -#endif break; case 'H': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "cpphdrs", 0) != 0) dfatal("failed to set -H"); -#endif break; case 'i': @@ -1413,17 +1374,13 @@ break; case 'I': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "incdir", optarg) != 0) dfatal("failed to set -I %s", optarg); -#endif break; case 'L': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "libdir", optarg) != 0) dfatal("failed to set -L %s", optarg); -#endif break; case 'm': @@ -1438,6 +1395,7 @@ dcp->dc_func = compile_str; dcp->dc_spec = DTRACE_PROBESPEC_NAME; dcp->dc_arg = optarg; +printf("Compile '%s'\n",dcp->dc_arg); break; case 'P': @@ -1448,10 +1406,8 @@ break; case 'q': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "quiet", 0) != 0) dfatal("failed to set -q"); -#endif break; case 'o': @@ -1470,10 +1426,8 @@ break; case 'U': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "undef", optarg) != 0) dfatal("failed to set -U %s", optarg); -#endif break; case 'v': @@ -1481,27 +1435,21 @@ break; case 'w': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "destructive", 0) != 0) dfatal("failed to set -w"); -#endif break; case 'x': if ((p = strchr(optarg, '=')) != NULL) *p++ = '\0'; -#ifdef DOODAD if (dtrace_setopt(g_dtp, optarg, p) != 0) dfatal("failed to set -x %s", optarg); -#endif break; case 'X': -#ifdef DOODAD if (dtrace_setopt(g_dtp, "stdc", optarg) != 0) dfatal("failed to set -X %s", optarg); -#endif break; case 'Z': @@ -1539,14 +1487,12 @@ if ((v = make_argv(optarg)) == NULL) fatal("failed to allocate memory"); -#ifdef DOODAD P = dtrace_proc_create(g_dtp, v[0], v); if (P == NULL) dfatal(NULL); /* dtrace_errmsg() only */ g_psv[g_psc++] = P; free(v); -#endif break; case 'p': @@ -1556,13 +1502,11 @@ if (errno != 0 || p == optarg || p[0] != '\0') fatal("invalid pid: %s\n", optarg); -#ifdef DOODAD P = dtrace_proc_grab(g_dtp, pid, 0); if (P == NULL) dfatal(NULL); /* dtrace_errmsg() only */ g_psv[g_psc++] = P; -#endif break; } } @@ -1575,7 +1519,6 @@ for (i = 0; i < g_cmdc; i++) g_cmdv[i].dc_func(&g_cmdv[i]); -#ifdef DOODAD if (g_mode != DMODE_LIST) { if (dtrace_handle_err(g_dtp, &errhandler, NULL) == -1) dfatal("failed to establish error handler"); @@ -1602,7 +1545,6 @@ (void) dtrace_getopt(g_dtp, "quiet", &opt); g_quiet = opt != DTRACEOPT_UNSET; -#endif /* * Now make a fifth and final pass over the options that have been @@ -1613,7 +1555,6 @@ */ switch (g_mode) { case DMODE_EXEC: -#ifdef DOODAD if (g_ofile != NULL && (g_ofp = fopen(g_ofile, "a")) == NULL) fatal("failed to open output file '%s'", g_ofile); @@ -1624,11 +1565,9 @@ dtrace_close(g_dtp); return (g_status); } -#endif break; case DMODE_ANON: -#ifdef DOODAD if (g_ofile == NULL) g_ofile = "/kernel/drv/dtrace.conf"; @@ -1668,11 +1607,9 @@ error("run update_drv(1M) or reboot to enable changes\n"); dtrace_close(g_dtp); -#endif return (g_status); case DMODE_LINK: -#ifdef DOODAD if (g_cmdc == 0) { (void) fprintf(stderr, "%s: -G requires one or more " "scripts or enabling options\n", g_pname); @@ -1695,11 +1632,9 @@ } dtrace_close(g_dtp); -#endif return (g_status); case DMODE_LIST: -#ifdef DOODAD if (g_ofile != NULL && (g_ofp = fopen(g_ofile, "a")) == NULL) fatal("failed to open output file '%s'", g_ofile); @@ -1713,11 +1648,9 @@ (void) dtrace_probe_iter(g_dtp, NULL, list_probe, NULL); dtrace_close(g_dtp); -#endif return (g_status); case DMODE_HEADER: -#ifdef DOODAD if (g_cmdc == 0) { (void) fprintf(stderr, "%s: -h requires one or more " "scripts or enabling options\n", g_pname); @@ -1761,7 +1694,6 @@ dfatal("failed to create header file %s", g_ofile); dtrace_close(g_dtp); -#endif return (g_status); } @@ -1778,7 +1710,6 @@ */ go(); -#ifdef DOODAD (void) dtrace_getopt(g_dtp, "flowindent", &opt); g_flowindent = opt != DTRACEOPT_UNSET; @@ -1791,7 +1722,6 @@ (void) dtrace_getopt(g_dtp, "destructive", &opt); if (opt != DTRACEOPT_UNSET) notice("allowing destructive actions\n"); -#endif (void) sigemptyset(&act.sa_mask); act.sa_flags = 0; @@ -1808,14 +1738,11 @@ * continue any grabbed or created processes, setting them running * using the /proc control mechanism inside of libdtrace. */ -#ifdef DOODAD for (i = 0; i < g_psc; i++) dtrace_proc_continue(g_dtp, g_psv[i]); -#endif g_pslive = g_psc; /* count for prochandler() */ -#ifdef DOODAD do { if (!g_intr && !done) dtrace_sleep(g_dtp); @@ -1850,11 +1777,9 @@ if (g_ofp != NULL && fflush(g_ofp) == EOF) clearerr(g_ofp); } while (!done); -#endif oprintf("\n"); -#ifdef DOODAD if (!g_impatient) { if (dtrace_aggregate_print(g_dtp, g_ofp, NULL) == -1 && dtrace_errno(g_dtp) != EINTR) @@ -1862,6 +1787,5 @@ } dtrace_close(g_dtp); -#endif return (g_status); } From owner-p4-projects@FreeBSD.ORG Wed Apr 19 00:04:56 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4DE3516A423; Wed, 19 Apr 2006 00:04:56 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26BC716A406 for ; Wed, 19 Apr 2006 00:04:56 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4E6E43D46 for ; Wed, 19 Apr 2006 00:04:55 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J04t32086521 for ; Wed, 19 Apr 2006 00:04:55 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J04taP086515 for perforce@freebsd.org; Wed, 19 Apr 2006 00:04:55 GMT (envelope-from marcel@freebsd.org) Date: Wed, 19 Apr 2006 00:04:55 GMT Message-Id: <200604190004.k3J04taP086515@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 Cc: Subject: PERFORCE change 95562 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 00:04:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=95562 Change 95562 by marcel@marcel_nfs on 2006/04/19 00:03:56 Implement puc_intr(). Affected files ... .. //depot/projects/uart/dev/puc/puc.c#29 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#29 (text+ko) ==== @@ -63,6 +63,8 @@ driver_intr_t *p_ih; serdev_intr_t *p_ihsrc[PUC_ISRCCNT]; void *p_iharg; + + int p_ipend; }; devclass_t puc_devclass; @@ -127,6 +129,63 @@ static void puc_intr(void *arg) { + struct puc_port *port; + struct puc_softc *sc = arg; + u_long dev, devs; + int i, idx, ipend, isrc; + + /* handle serdev I/F compliant devices first. */ + ipend = 0; + idx = 0, dev = 1UL; + devs = sc->sc_serdevs; + while (devs != 0UL) { + while ((devs & dev) == 0UL) + idx++, dev <<= 1; + devs &= ~dev; + port = &sc->sc_port[idx]; + port->p_ipend = SERDEV_IPEND(port->p_dev); + ipend |= port->p_ipend; + } + + if (ipend == 0) { + idx = 0, dev = 1UL; + devs = ~sc->sc_serdevs & ((1UL << sc->sc_nports) - 1); + while (devs != 0UL) { + while ((devs & dev) == 0UL) + idx++, dev <<= 1; + devs &= ~dev; + port = &sc->sc_port[idx]; + if (port->p_ih != NULL) { + if (port->p_giantintr) { + mtx_lock(&Giant); + (*port->p_ih)(port->p_iharg); + mtx_unlock(&Giant); + } else + (*port->p_ih)(port->p_iharg); + } + } + return; + } + + i = 0, isrc = SER_INT_OVERRUN; + while (ipend) { + while (i < PUC_ISRCCNT && !(ipend & isrc)) + i++, isrc <<= 1; + KASSERT(i < PUC_ISRCCNT, ("%s", __func__)); + ipend &= ~isrc; + idx = 0, dev = 1UL; + devs = sc->sc_serdevs; + while (devs != 0UL) { + while ((devs & dev) == 0UL) + idx++, dev <<= 1; + devs &= ~dev; + port = &sc->sc_port[idx]; + if (!(port->p_ipend & isrc)) + continue; + if (port->p_ihsrc[i] != NULL) + (*port->p_ihsrc[i])(port->p_iharg); + } + } } int From owner-p4-projects@FreeBSD.ORG Wed Apr 19 00:04:56 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A738616A4D2; Wed, 19 Apr 2006 00:04:56 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8430F16A4D0 for ; Wed, 19 Apr 2006 00:04:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45E9643D46 for ; Wed, 19 Apr 2006 00:04:56 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J04uNs086531 for ; Wed, 19 Apr 2006 00:04:56 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J04tLB086524 for perforce@freebsd.org; Wed, 19 Apr 2006 00:04:55 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 00:04:55 GMT Message-Id: <200604190004.k3J04tLB086524@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95563 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 00:04:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=95563 Change 95563 by jb@jb_freebsd2 on 2006/04/19 00:03:58 Add the basic ioctl cases and code for the first one accessed by dtrace(1). Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#2 (text+ko) ==== @@ -44,6 +44,7 @@ #include #include +#include #include #define DTRACE_MINOR 0 @@ -76,6 +77,8 @@ dtrace_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr __unused, int flags __unused, struct thread *td __unused) { + dtrace_conf_t conf; + int error = 0; switch (cmd) { @@ -83,6 +86,47 @@ case FIOASYNC: case FIONBIO: break; + case DTRACEIOC_PROVIDER: + break; + case DTRACEIOC_PROBES: + break; + case DTRACEIOC_BUFSNAP: + break; + case DTRACEIOC_PROBEMATCH: + break; + case DTRACEIOC_ENABLE: + break; + case DTRACEIOC_AGGSNAP: + break; + case DTRACEIOC_EPROBE: + break; + case DTRACEIOC_PROBEARG: + break; + case DTRACEIOC_CONF: + bzero(&conf, sizeof (conf)); + conf.dtc_difversion = DIF_VERSION; + conf.dtc_difintregs = DIF_DIR_NREGS; + conf.dtc_diftupregs = DIF_DTR_NREGS; + conf.dtc_ctfmodel = CTF_MODEL_NATIVE; + + *((dtrace_conf_t *) addr) = conf; + + return (0); + break; + case DTRACEIOC_STATUS: + break; + case DTRACEIOC_GO: + break; + case DTRACEIOC_STOP: + break; + case DTRACEIOC_AGGDESC: + break; + case DTRACEIOC_FORMAT: + break; + case DTRACEIOC_DOFGET: + break; + case DTRACEIOC_REPLICATE: + break; default: error = ENOTTY; } From owner-p4-projects@FreeBSD.ORG Wed Apr 19 00:05:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8782D16A409; Wed, 19 Apr 2006 00:05:58 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D42F16A403 for ; Wed, 19 Apr 2006 00:05:58 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 062D043D4C for ; Wed, 19 Apr 2006 00:05:58 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J05vf3087520 for ; Wed, 19 Apr 2006 00:05:57 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J05vxY087514 for perforce@freebsd.org; Wed, 19 Apr 2006 00:05:57 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 00:05:57 GMT Message-Id: <200604190005.k3J05vxY087514@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95564 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 00:05:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=95564 Change 95564 by jb@jb_freebsd2 on 2006/04/19 00:05:19 Change the include path order. This doesn't really matter. I just made the makefile a bit neater. I have days like this. 8-) Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#3 (text+ko) ==== @@ -6,6 +6,8 @@ SRCS= dtrace.c SRCS+= bus_if.h device_if.h vnode_if.h -CFLAGS+= -I${.CURDIR}/../.. -I${.CURDIR}/../../contrib -I${.CURDIR}/../../contrib/opensolaris/uts/common +CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../contrib \ + -I${.CURDIR}/../.. .include From owner-p4-projects@FreeBSD.ORG Wed Apr 19 00:20:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E6D7516A406; Wed, 19 Apr 2006 00:20:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9C7516A400 for ; Wed, 19 Apr 2006 00:20:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45F4143D48 for ; Wed, 19 Apr 2006 00:20:43 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J0Khgn096611 for ; Wed, 19 Apr 2006 00:20:43 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J0KgIf096603 for perforce@freebsd.org; Wed, 19 Apr 2006 00:20:42 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 00:20:42 GMT Message-Id: <200604190020.k3J0KgIf096603@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95565 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 00:20:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=95565 Change 95565 by jb@jb_freebsd2 on 2006/04/19 00:19:44 Start converting the ioctl definitions to FreeBSD's format. I've started with just declaring them all without data (except _CONF which is the first one called). As a get up to the point in the dtrace(1) execution where the ioctls are actually called, I'll add the direction and type to suit how the ioctl is actually used. This seems to be an area where BSD is much neater than SysV. The last time I wrote kernel code for SysV was on Motorola's Unix back on an MVME68030 with a whopping 16 MB of memory and a 300 MB disk. I think that might have been 15 years ago. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#3 (text) ==== @@ -27,7 +27,9 @@ #ifndef _SYS_DTRACE_H #define _SYS_DTRACE_H +#if defined(sun) #pragma ident "@(#)dtrace.h 1.30 06/03/30 SMI" +#endif #ifdef __cplusplus extern "C" { @@ -53,13 +55,14 @@ #include #else #include +#include #endif #include #if defined(sun) #include #include #else -#include +#include #endif /* @@ -1165,6 +1168,7 @@ * pseudodevice driver. These ioctls comprise the user-kernel interface to * DTrace. */ +#if defined(sun) #define DTRACEIOC (('d' << 24) | ('t' << 16) | ('r' << 8)) #define DTRACEIOC_PROVIDER (DTRACEIOC | 1) /* provider query */ #define DTRACEIOC_PROBES (DTRACEIOC | 2) /* probe query */ @@ -1182,6 +1186,25 @@ #define DTRACEIOC_FORMAT (DTRACEIOC | 16) /* get format str */ #define DTRACEIOC_DOFGET (DTRACEIOC | 17) /* get DOF */ #define DTRACEIOC_REPLICATE (DTRACEIOC | 18) /* replicate enab */ +#else +#define DTRACEIOC_PROVIDER _IO('x',1) /* provider query */ +#define DTRACEIOC_PROBES _IO('x',2) /* probe query */ +#define DTRACEIOC_BUFSNAP _IO('x',4) /* snapshot buffer */ +#define DTRACEIOC_PROBEMATCH _IO('x',5) /* match probes */ +#define DTRACEIOC_ENABLE _IO('x',6) /* enable probes */ +#define DTRACEIOC_AGGSNAP _IO('x',7) /* snapshot agg. */ +#define DTRACEIOC_EPROBE _IO('x',8) /* get eprobe desc. */ +#define DTRACEIOC_PROBEARG _IO('x',9) /* get probe arg */ +#define DTRACEIOC_CONF _IOR('x',10,dtrace_conf_t) + /* get config. */ +#define DTRACEIOC_STATUS _IO('x',11) /* get status */ +#define DTRACEIOC_GO _IO('x',12) /* start tracing */ +#define DTRACEIOC_STOP _IO('x',13) /* stop tracing */ +#define DTRACEIOC_AGGDESC _IO('x',15) /* get agg. desc. */ +#define DTRACEIOC_FORMAT _IO('x',16) /* get format str */ +#define DTRACEIOC_DOFGET _IO('x',17) /* get DOF */ +#define DTRACEIOC_REPLICATE _IO('x',18) /* replicate enab */ +#endif /* * DTrace Helpers @@ -1946,7 +1969,9 @@ */ typedef struct dtrace_pops { void (*dtps_provide)(void *arg, const dtrace_probedesc_t *spec); +#ifdef DOODAD void (*dtps_provide_module)(void *arg, struct modctl *mp); +#endif void (*dtps_enable)(void *arg, dtrace_id_t id, void *parg); void (*dtps_disable)(void *arg, dtrace_id_t id, void *parg); void (*dtps_suspend)(void *arg, dtrace_id_t id, void *parg); @@ -1961,8 +1986,10 @@ typedef uintptr_t dtrace_provider_id_t; +#ifdef DOODAD extern int dtrace_register(const char *, const dtrace_pattr_t *, uint32_t, cred_t *, const dtrace_pops_t *, void *, dtrace_provider_id_t *); +#endif extern int dtrace_unregister(dtrace_provider_id_t); extern int dtrace_condense(dtrace_provider_id_t); extern void dtrace_invalidate(dtrace_provider_id_t); @@ -2140,6 +2167,7 @@ DTRACE_VTIME_ACTIVE_TNF /* DTrace virtual time _and_ TNF */ } dtrace_vtime_state_t; +#ifdef DOODAD extern dtrace_vtime_state_t dtrace_vtime_active; extern void dtrace_vtime_switch(kthread_t *next); extern void dtrace_vtime_enable_tnf(void); @@ -2190,10 +2218,13 @@ extern int dtrace_safe_defer_signal(void); extern void dtrace_safe_synchronous_signal(void); +#endif #if defined(__i386) || defined(__amd64) extern int dtrace_instr_size(uchar_t *instr); +#ifdef DOODAD extern int dtrace_instr_size_isa(uchar_t *, model_t, int *); +#endif extern void dtrace_invop_add(int (*)(uintptr_t, uintptr_t *, uintptr_t)); extern void dtrace_invop_remove(int (*)(uintptr_t, uintptr_t *, uintptr_t)); extern void dtrace_invop_callsite(void); From owner-p4-projects@FreeBSD.ORG Wed Apr 19 00:34:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 59EA716A402; Wed, 19 Apr 2006 00:34:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2158716A400 for ; Wed, 19 Apr 2006 00:34:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C903B43D45 for ; Wed, 19 Apr 2006 00:33:59 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J0XxCF006624 for ; Wed, 19 Apr 2006 00:33:59 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J0XxFD006621 for perforce@freebsd.org; Wed, 19 Apr 2006 00:33:59 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 00:33:59 GMT Message-Id: <200604190033.k3J0XxFD006621@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95566 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 00:34:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=95566 Change 95566 by jb@jb_freebsd2 on 2006/04/19 00:33:43 Let's compile in yacc debug code until we finish porting this library. Affected files ... .. //depot/projects/dtrace/src/cddl/lib/libdtrace/Makefile#3 edit Differences ... ==== //depot/projects/dtrace/src/cddl/lib/libdtrace/Makefile#3 (text+ko) ==== @@ -59,6 +59,8 @@ -I${OPENSOLARIS_USR_DISTDIR}/lib/libproc/common \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common +CFLAGS+= -DYYDEBUG + .if ${MACHINE_ARCH} == "i386" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel .endif From owner-p4-projects@FreeBSD.ORG Wed Apr 19 00:41:09 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C345316A40A; Wed, 19 Apr 2006 00:41:09 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89A6E16A405 for ; Wed, 19 Apr 2006 00:41:09 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D760843D45 for ; Wed, 19 Apr 2006 00:41:08 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J0f8jT007717 for ; Wed, 19 Apr 2006 00:41:08 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J0f890007714 for perforce@freebsd.org; Wed, 19 Apr 2006 00:41:08 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 00:41:08 GMT Message-Id: <200604190041.k3J0f890007714@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95567 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 00:41:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=95567 Change 95567 by jb@jb_freebsd2 on 2006/04/19 00:40:30 Use FreeBSD /dev/ names created by the device file system when the devices are initialised. Leave a few printfs in here to remember things that need to be looked at. We actually don't get put of dt_vopen yet due to yacc/lex issues. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#3 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#3 (text) ==== @@ -824,10 +824,18 @@ */ dt_provmod_open(&provmod, &df); +#if defined(sun) dtfd = open("/dev/dtrace/dtrace", O_RDWR); +#else + dtfd = open("/dev/dtrace", O_RDWR); +#endif err = errno; /* save errno from opening dtfd */ +#if defined(sun) ftfd = open("/dev/dtrace/provider/fasttrap", O_RDWR); +#else + ftfd = open("/dev/fasttrap", O_RDWR); +#endif fterr = ftfd == -1 ? errno : 0; /* save errno from open ftfd */ while (df.df_ents-- != 0) @@ -907,11 +915,10 @@ (void) snprintf(isadef, sizeof (isadef), "-D__SUNW_D_%u", (uint_t)(sizeof (void *) * NBBY)); -#ifdef DOODAD +#if defined(sun) (void) snprintf(utsdef, sizeof (utsdef), "-D__%s_%s", dt_get_sysinfo(SI_SYSNAME, s1, sizeof (s1)), dt_get_sysinfo(SI_RELEASE, s2, sizeof (s2))); -#endif if (dt_cpp_add_arg(dtp, "-D__sun") == NULL || dt_cpp_add_arg(dtp, "-D__unix") == NULL || @@ -920,6 +927,9 @@ dt_cpp_add_arg(dtp, isadef) == NULL || dt_cpp_add_arg(dtp, utsdef) == NULL) return (set_open_errno(dtp, errp, EDT_NOMEM)); +#else +printf("%s:%s(%d): need to set FreeBSD specific CPP defines\n",__FUNCTION__,__FILE__,__LINE__); +#endif if (flags & DTRACE_O_NODEV) bcopy(&_dtrace_conf, &dtp->dt_conf, sizeof (_dtrace_conf)); @@ -1213,6 +1223,7 @@ if (flags & DTRACE_O_NODEV) dtp->dt_cflags |= DTRACE_C_ZDEFS; +printf("%s:%s(%d): call dtrace_program_strcompile\n",__FUNCTION__,__FILE__,__LINE__); /* * Load hard-wired inlines into the definition cache by calling the * compiler on the raw definition string defined above. @@ -1221,9 +1232,11 @@ DTRACE_PROBESPEC_NONE, DTRACE_C_EMPTY, 0, NULL)) == NULL) { dt_dprintf("failed to load hard-wired definitions: %s\n", dtrace_errmsg(dtp, dtrace_errno(dtp))); +printf("%s:%s(%d): dtrace_program_strcompile error\n",__FUNCTION__,__FILE__,__LINE__); return (set_open_errno(dtp, errp, EDT_HARDWIRE)); } +printf("%s:%s(%d): call dt_program_destroy\n",__FUNCTION__,__FILE__,__LINE__); dt_program_destroy(dtp, pgp); /* @@ -1233,9 +1246,11 @@ * compile, and to provide better error reporting (because the full * reporting of compiler errors requires dtrace_open() to succeed). */ +printf("%s:%s(%d): dtrace_setopt libdir\n",__FUNCTION__,__FILE__,__LINE__); if (dtrace_setopt(dtp, "libdir", _dtrace_libdir) != 0) return (set_open_errno(dtp, errp, dtp->dt_errno)); +printf("%s:%s(%d): return\n",__FUNCTION__,__FILE__,__LINE__); return (dtp); } From owner-p4-projects@FreeBSD.ORG Wed Apr 19 00:43:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 32C3F16A409; Wed, 19 Apr 2006 00:43:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC39A16A407 for ; Wed, 19 Apr 2006 00:43:17 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60A0143D6B for ; Wed, 19 Apr 2006 00:43:11 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J0hBvT009468 for ; Wed, 19 Apr 2006 00:43:11 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J0hBAb009462 for perforce@freebsd.org; Wed, 19 Apr 2006 00:43:11 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 00:43:11 GMT Message-Id: <200604190043.k3J0hBAb009462@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95568 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 00:43:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=95568 Change 95568 by jb@jb_freebsd2 on 2006/04/19 00:42:37 FreeBSD doesn't have an object file system, so use the kernel loader interface to get the names of the loaded modules. There are still a few parts of this file that need to be looked at, but mostly the code should work. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#4 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#4 (text) ==== @@ -37,6 +37,9 @@ #include #include #include +#else +#include +#include #endif #include @@ -74,6 +77,7 @@ static uint_t dt_module_syminit32(dt_module_t *dmp) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD const Elf32_Sym *sym = dmp->dm_symtab.cts_data; const char *base = dmp->dm_strtab.cts_data; @@ -107,6 +111,7 @@ static uint_t dt_module_syminit64(dt_module_t *dmp) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD const Elf64_Sym *sym = dmp->dm_symtab.cts_data; const char *base = dmp->dm_strtab.cts_data; @@ -678,7 +683,6 @@ void dt_module_unload(dtrace_hdl_t *dtp, dt_module_t *dmp) { -#ifdef DOODAD ctf_close(dmp->dm_ctfp); dmp->dm_ctfp = NULL; @@ -707,11 +711,11 @@ dmp->dm_asrsv = 0; dmp->dm_aslen = 0; - dmp->dm_text_va = NULL; + dmp->dm_text_va = 0; dmp->dm_text_size = 0; - dmp->dm_data_va = NULL; + dmp->dm_data_va = 0; dmp->dm_data_size = 0; - dmp->dm_bss_va = NULL; + dmp->dm_bss_va = 0; dmp->dm_bss_size = 0; if (dmp->dm_extern != NULL) { @@ -723,7 +727,6 @@ dmp->dm_elf = NULL; dmp->dm_flags &= ~DT_DM_LOADED; -#endif } void @@ -803,6 +806,7 @@ static void dt_module_update(dtrace_hdl_t *dtp, const char *name) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD char fname[MAXPATHLEN]; struct stat64 st; @@ -905,14 +909,17 @@ void dtrace_update(dtrace_hdl_t *dtp) { -#ifdef DOODAD dt_module_t *dmp; DIR *dirp; +#if defined(__FreeBSD__) + int fileid; +#endif for (dmp = dt_list_next(&dtp->dt_modlist); dmp != NULL; dmp = dt_list_next(dmp)) dt_module_unload(dtp, dmp); +#if defined(sun) /* * Open /system/object and attempt to create a libdtrace module for * each kernel module that is loaded on the current system. @@ -928,6 +935,20 @@ (void) closedir(dirp); } +#elif defined(__FreeBSD__) + /* + * Use FreeBSD's kernel loader interface to discover what kernel + * modules are loaded and create a libdtrace module for each one. + */ + for (fileid = kldnext(0); fileid > 0; fileid = kldnext(fileid)) { + struct kld_file_stat k_stat; + if (kldstat(fileid, &k_stat) == 0) +{ +printf("%s:%s(%d): Kernel module '%s'\n",__FUNCTION__,__FILE__,__LINE__,k_stat.name); + dt_module_update(dtp, k_stat.name); +} + } +#endif /* * Look up all the macro identifiers and set di_id to the latest value. @@ -940,9 +961,13 @@ dt_idhash_lookup(dtp->dt_macros, "pid")->di_id = getpid(); dt_idhash_lookup(dtp->dt_macros, "pgid")->di_id = getpgid(0); dt_idhash_lookup(dtp->dt_macros, "ppid")->di_id = getppid(); +#if defined(sun) dt_idhash_lookup(dtp->dt_macros, "projid")->di_id = getprojid(); +#endif dt_idhash_lookup(dtp->dt_macros, "sid")->di_id = getsid(0); +#if defined(sun) dt_idhash_lookup(dtp->dt_macros, "taskid")->di_id = gettaskid(); +#endif dt_idhash_lookup(dtp->dt_macros, "uid")->di_id = getuid(); /* @@ -965,7 +990,6 @@ dt_list_delete(&dtp->dt_modlist, dtp->dt_exec); dt_list_prepend(&dtp->dt_modlist, dtp->dt_exec); } -#endif } static dt_module_t * From owner-p4-projects@FreeBSD.ORG Wed Apr 19 00:45:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 83FB616A404; Wed, 19 Apr 2006 00:45:15 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 593D316A400 for ; Wed, 19 Apr 2006 00:45:15 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06F0043D45 for ; Wed, 19 Apr 2006 00:45:15 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J0jEDE011183 for ; Wed, 19 Apr 2006 00:45:14 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J0jEHO011177 for perforce@freebsd.org; Wed, 19 Apr 2006 00:45:14 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 00:45:14 GMT Message-Id: <200604190045.k3J0jEHO011177@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95569 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 00:45:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=95569 Change 95569 by jb@jb_freebsd2 on 2006/04/19 00:44:37 Add some diagnostic printfs to identify pieces of code that are commented out. I'll work on these when dtrace(1) gets up to the point of trying to use the code. For now we just need the code to compile and link. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/drti.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#4 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#4 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_error.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_handle.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_link.c#4 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_proc.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#4 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/drti.c#3 (text) ==== @@ -89,6 +89,7 @@ static void dtrace_dof_init(void) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dof_hdr_t *dof = &__SUNW_dof; #ifdef _LP64 @@ -175,6 +176,7 @@ static void dtrace_dof_fini(void) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD int fd; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#4 (text) ==== @@ -233,6 +233,7 @@ static void dt_aggregate_usym(dtrace_hdl_t *dtp, uint64_t *data) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD uint64_t pid = data[0]; uint64_t *pc = &data[1]; @@ -258,6 +259,7 @@ static void dt_aggregate_umod(dtrace_hdl_t *dtp, uint64_t *data) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD uint64_t pid = data[0]; uint64_t *pc = &data[1]; @@ -973,6 +975,7 @@ assert(agp->dtat_ncpu == 0); assert(agp->dtat_cpus == NULL); +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD agp->dtat_maxcpu = dt_sysconf(dtp, _SC_CPUID_MAX) + 1; agp->dtat_ncpu = dt_sysconf(dtp, _SC_NPROCESSORS_MAX); ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#4 (text) ==== @@ -568,6 +568,7 @@ dt_print_ustack(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr, uint64_t arg) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD /* LINTED - alignment */ uint64_t *pc = (uint64_t *)addr; @@ -613,6 +614,7 @@ dt_proc_lock(dtp, P); /* lock handle while we perform lookups */ for (i = 0; i < depth && pc[i] != 0; i++) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD const prmap_t *map; #endif @@ -632,6 +634,7 @@ (void) snprintf(c, sizeof (c), "%s`%s", dt_basename(objname), name); } +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD } else if (str != NULL && str[0] != '\0' && str[0] != '@' && (P != NULL && ((map = Paddr_to_map(P, pc[i])) == NULL || @@ -708,6 +711,7 @@ static int dt_print_usym(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, dtrace_actkind_t act) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD /* LINTED - alignment */ uint64_t pid = ((uint64_t *)addr)[0]; @@ -748,6 +752,7 @@ int dt_print_umod(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD /* LINTED - alignment */ uint64_t pid = ((uint64_t *)addr)[0]; @@ -1801,6 +1806,7 @@ if ((nbuf.dtbd_data = malloc(size)) == NULL) return (dt_set_errno(dtp, EDT_NOMEM)); +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD if (max_ncpus == 0) max_ncpus = dt_sysconf(dtp, _SC_CPUID_MAX) + 1; @@ -1881,6 +1887,7 @@ if (!dtp->dt_active) return (dt_set_errno(dtp, EINVAL)); +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD if (max_ncpus == 0) max_ncpus = dt_sysconf(dtp, _SC_CPUID_MAX) + 1; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_error.c#2 (text) ==== @@ -25,6 +25,7 @@ #pragma ident "@(#)dt_error.c 1.13 06/03/24 SMI" +#include #include #include ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_handle.c#3 (text) ==== @@ -249,7 +249,7 @@ err.dteda_action = -1; err.dteda_offset = -1; err.dteda_fault = DTRACEFLT_LIBRARY; - err.dteda_addr = NULL; + err.dteda_addr = 0; len = strlen(faultstr) + strlen(errpd->dtpd_provider) + strlen(errpd->dtpd_mod) + ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_link.c#4 (text) ==== @@ -400,6 +400,7 @@ s = &dofs[dofrh->dofr_tgtsec]; for (j = 0; j < nrel; j++) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD #if defined(__i386) || defined(__amd64) rel->r_offset = s->dofs_offset + @@ -1380,6 +1381,7 @@ * already been processed by an earlier link * invocation. */ +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD if (rsym.st_shndx != SHN_SUNW_IGNORE) { rsym.st_shndx = SHN_SUNW_IGNORE; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.c#3 (text) ==== @@ -453,6 +453,7 @@ dt_pid_create_pid_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *pcb, dt_proc_t *dpr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_pid_probe_t pp; int ret = 0; @@ -607,6 +608,7 @@ dt_pid_create_usdt_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *pcb, dt_proc_t *dpr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD struct ps_prochandle *P = dpr->dpr_proc; int ret = 0; @@ -665,6 +667,7 @@ int dt_pid_create_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *pcb) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD char provname[DTRACE_PROVNAMELEN]; struct ps_prochandle *P; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_proc.c#3 (text) ==== @@ -169,6 +169,7 @@ void dt_proc_bpenable(dt_proc_t *dpr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_bkpt_t *dbp; @@ -188,6 +189,7 @@ void dt_proc_bpdisable(dt_proc_t *dpr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_bkpt_t *dbp; @@ -673,6 +675,7 @@ dt_proc_t * dt_proc_lookup(dtrace_hdl_t *dtp, struct ps_prochandle *P, int remove) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_hash_t *dph = dtp->dt_procs; pid_t pid = Pstatus(P)->pr_pid; @@ -700,6 +703,7 @@ static void dt_proc_destroy(dtrace_hdl_t *dtp, struct ps_prochandle *P) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_t *dpr = dt_proc_lookup(dtp, P, B_FALSE); dt_proc_hash_t *dph = dtp->dt_procs; @@ -872,6 +876,7 @@ struct ps_prochandle * dt_proc_create(dtrace_hdl_t *dtp, const char *file, char *const *argv) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_hash_t *dph = dtp->dt_procs; dt_proc_t *dpr; @@ -913,6 +918,7 @@ struct ps_prochandle * dt_proc_grab(dtrace_hdl_t *dtp, pid_t pid, int flags, int nomonitor) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_hash_t *dph = dtp->dt_procs; uint_t h = pid & (dph->dph_hashlen - 1); @@ -1011,6 +1017,7 @@ void dt_proc_release(dtrace_hdl_t *dtp, struct ps_prochandle *P) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_t *dpr = dt_proc_lookup(dtp, P, B_FALSE); dt_proc_hash_t *dph = dtp->dt_procs; @@ -1085,6 +1092,7 @@ struct ps_prochandle * dtrace_proc_create(dtrace_hdl_t *dtp, const char *file, char *const *argv) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_ident_t *idp = dt_idhash_lookup(dtp->dt_macros, "target"); struct ps_prochandle *P = dt_proc_create(dtp, file, argv); ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#4 (text) ==== @@ -490,6 +490,7 @@ { const dtrace_vector_t *v = dtp->dt_vector; +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD if (v == NULL) return (p_online(cpu, P_STATUS)); @@ -914,6 +915,7 @@ dtrace_uaddr2str(dtrace_hdl_t *dtp, pid_t pid, uint64_t addr, char *str, int nbytes) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD char name[PATH_MAX], objname[PATH_MAX], c[PATH_MAX * 2]; struct ps_prochandle *P = NULL; From owner-p4-projects@FreeBSD.ORG Wed Apr 19 00:55:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4D3016A402; Wed, 19 Apr 2006 00:55:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58B0E16A400 for ; Wed, 19 Apr 2006 00:55:28 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2766C43D49 for ; Wed, 19 Apr 2006 00:55:28 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J0tSnx024876 for ; Wed, 19 Apr 2006 00:55:28 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J0tR24024873 for perforce@freebsd.org; Wed, 19 Apr 2006 00:55:27 GMT (envelope-from marcel@freebsd.org) Date: Wed, 19 Apr 2006 00:55:27 GMT Message-Id: <200604190055.k3J0tR24024873@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 Cc: Subject: PERFORCE change 95570 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 00:55:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=95570 Change 95570 by marcel@marcel_nfs on 2006/04/19 00:54:59 Update puc(4) module build. Affected files ... .. //depot/projects/uart/modules/puc/Makefile#2 edit Differences ... ==== //depot/projects/uart/modules/puc/Makefile#2 (text+ko) ==== @@ -2,9 +2,13 @@ # $FreeBSD: src/sys/modules/puc/Makefile,v 1.1 2005/04/22 07:43:27 imp Exp $ .PATH: ${.CURDIR}/../../dev/puc + KMOD= puc -SRCS= bus_if.h device_if.h pci_if.h card_if.h \ - puc.c puc_pci.c puc_pccard.c pucdata.c \ - opt_puc.h +SRCS= puc.c puc_cfg.c puc_pci.c puc_pccard.c pucdata.c +SRCS+= bus_if.h device_if.h serdev_if.c serdev_if.h \ + card_if.h pci_if.h + +MFILES= kern/bus_if.m kern/device_if.m kern/serdev_if.m \ + dev/pccard/card_if.m dev/pci/pci_if.m .include From owner-p4-projects@FreeBSD.ORG Wed Apr 19 02:17:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3417316A406; Wed, 19 Apr 2006 02:17:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 098F616A402 for ; Wed, 19 Apr 2006 02:17:07 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BC2143D46 for ; Wed, 19 Apr 2006 02:17:06 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J2H6JF069296 for ; Wed, 19 Apr 2006 02:17:06 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J2H6DX069293 for perforce@freebsd.org; Wed, 19 Apr 2006 02:17:06 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 02:17:06 GMT Message-Id: <200604190217.k3J2H6DX069293@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95571 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 02:17:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=95571 Change 95571 by jb@jb_freebsd2 on 2006/04/19 02:17:03 This code is nature's way of reminding me that I'm no lex whiz. The OpenSolaris code expects AT&T (SCO? Ugh) semantics. That means non-POSIX. Sigh. FreeBSD uses 'flex' as 'lex', so we turn on compatibility mode for as much as possible, but that still doesn't let us redefine input(). We have to define YY_INPUT, but this works ahead of time, buffering as many characters as possible for performance reasons. As a result, we can't check the states that the Solaris version does on a character by character basis. This at least lets us initialise dtrace(1) now. It now wants to know about providers, so we're heading in the right direction. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_lex.l#3 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_lex.l#3 (text) ==== @@ -46,13 +46,34 @@ #undef input #undef unput #else -#undef yyinput -#define yyinput input +/* + * Define YY_INPUT for flex since input() can't be re-defined. + */ +#define YY_INPUT(buf,result,max_size) \ + if (yypcb->pcb_fileptr != NULL) { \ + int n; \ + for (n = 0; n < max_size && \ + ferror(yypcb->pcb_fileptr) == 0; n++) { \ + int c = fgetc(yypcb->pcb_fileptr); \ + if (c == EOF) \ + break; \ + buf[n] = c; \ + } \ + if (yypcb->pcb_fileptr != NULL && ferror(yypcb->pcb_fileptr)) \ + longjmp(yypcb->pcb_jmpbuf, EDT_FIO); \ + return n; \ + } else { \ + int n; \ + for (n = 0; n < max_size && \ + yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen; n++) \ + buf[n] = *yypcb->pcb_strptr++; \ + result = n; \ + } #endif static int id_or_type(const char *); +#if defined(sun) static int input(void); -#if defined(sun) static void unput(int); #endif @@ -794,17 +815,15 @@ return (ttok); } +#if defined(sun) static int -dtinput(void) +input(void) { int c; -#if defined(sun) if (yysptr > yysbuf) c = *--yysptr; - else -#endif - if (yypcb->pcb_fileptr != NULL) + else if (yypcb->pcb_fileptr != NULL) c = fgetc(yypcb->pcb_fileptr); else if (yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen) c = *yypcb->pcb_strptr++; @@ -829,7 +848,6 @@ return (0); /* EOF */ } -#if defined(sun) static void unput(int c) { From owner-p4-projects@FreeBSD.ORG Wed Apr 19 02:20:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D84716A403; Wed, 19 Apr 2006 02:20:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2402A16A401 for ; Wed, 19 Apr 2006 02:20:11 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0AFD43D45 for ; Wed, 19 Apr 2006 02:20:10 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J2KAKO069444 for ; Wed, 19 Apr 2006 02:20:10 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J2KA4O069441 for perforce@freebsd.org; Wed, 19 Apr 2006 02:20:10 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 02:20:10 GMT Message-Id: <200604190220.k3J2KA4O069441@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95572 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 02:20:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=95572 Change 95572 by jb@jb_freebsd2 on 2006/04/19 02:19:30 The Single Unix Specification defines strerror() in string.h, not strings.h. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cc.c#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cc.c#2 (text) ==== @@ -88,6 +88,7 @@ #include #include +#include #include #include #include From owner-p4-projects@FreeBSD.ORG Wed Apr 19 02:22:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3444816A402; Wed, 19 Apr 2006 02:22:14 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 122BD16A400 for ; Wed, 19 Apr 2006 02:22:14 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFC1543D45 for ; Wed, 19 Apr 2006 02:22:13 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J2MDOs070958 for ; Wed, 19 Apr 2006 02:22:13 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J2MDNn070950 for perforce@freebsd.org; Wed, 19 Apr 2006 02:22:13 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 02:22:13 GMT Message-Id: <200604190222.k3J2MDNn070950@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95573 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 02:22:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=95573 Change 95573 by jb@jb_freebsd2 on 2006/04/19 02:21:51 Remove a printf. We're processing that argument now. Barfing on, but at least we get up to the point where we know what we are barfing on. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/dtrace.c#3 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/dtrace.c#3 (text) ==== @@ -1395,7 +1395,6 @@ dcp->dc_func = compile_str; dcp->dc_spec = DTRACE_PROBESPEC_NAME; dcp->dc_arg = optarg; -printf("Compile '%s'\n",dcp->dc_arg); break; case 'P': From owner-p4-projects@FreeBSD.ORG Wed Apr 19 02:32:27 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 49B7416A403; Wed, 19 Apr 2006 02:32:27 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28CAF16A401 for ; Wed, 19 Apr 2006 02:32:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBB1643D45 for ; Wed, 19 Apr 2006 02:32:26 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J2WQ7g077925 for ; Wed, 19 Apr 2006 02:32:26 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J2WQNn077916 for perforce@freebsd.org; Wed, 19 Apr 2006 02:32:26 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 02:32:26 GMT Message-Id: <200604190232.k3J2WQNn077916@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95574 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 02:32:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=95574 Change 95574 by jb@jb_freebsd2 on 2006/04/19 02:31:50 Remove some printfs now we actually get libdtrace opened sucessfully. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#4 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#4 (text) ==== @@ -1223,7 +1223,6 @@ if (flags & DTRACE_O_NODEV) dtp->dt_cflags |= DTRACE_C_ZDEFS; -printf("%s:%s(%d): call dtrace_program_strcompile\n",__FUNCTION__,__FILE__,__LINE__); /* * Load hard-wired inlines into the definition cache by calling the * compiler on the raw definition string defined above. @@ -1232,11 +1231,9 @@ DTRACE_PROBESPEC_NONE, DTRACE_C_EMPTY, 0, NULL)) == NULL) { dt_dprintf("failed to load hard-wired definitions: %s\n", dtrace_errmsg(dtp, dtrace_errno(dtp))); -printf("%s:%s(%d): dtrace_program_strcompile error\n",__FUNCTION__,__FILE__,__LINE__); return (set_open_errno(dtp, errp, EDT_HARDWIRE)); } -printf("%s:%s(%d): call dt_program_destroy\n",__FUNCTION__,__FILE__,__LINE__); dt_program_destroy(dtp, pgp); /* @@ -1246,11 +1243,9 @@ * compile, and to provide better error reporting (because the full * reporting of compiler errors requires dtrace_open() to succeed). */ -printf("%s:%s(%d): dtrace_setopt libdir\n",__FUNCTION__,__FILE__,__LINE__); if (dtrace_setopt(dtp, "libdir", _dtrace_libdir) != 0) return (set_open_errno(dtp, errp, dtp->dt_errno)); -printf("%s:%s(%d): return\n",__FUNCTION__,__FILE__,__LINE__); return (dtp); } From owner-p4-projects@FreeBSD.ORG Wed Apr 19 04:00:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D371016A408; Wed, 19 Apr 2006 04:00:14 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 66B9116A404 for ; Wed, 19 Apr 2006 04:00:14 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB38A43D48 for ; Wed, 19 Apr 2006 04:00:13 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J40DU3024179 for ; Wed, 19 Apr 2006 04:00:13 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J40Dgv024173 for perforce@freebsd.org; Wed, 19 Apr 2006 04:00:13 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 04:00:13 GMT Message-Id: <200604190400.k3J40Dgv024173@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95575 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 04:00:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=95575 Change 95575 by jb@jb_freebsd2 on 2006/04/19 03:59:53 Sun's dtrace driver has over 13000 lines of code in it. That's in one file! I can't quite handle that much code in one file, so I'm going to build the FreeBSD version out of a bunch of separate .c files, all of which are just included in dtrace.c so that the code compiles as though it is one file with static functions and all. I'll name the files by the function name. There are a lot. 8-) While I'm here, I'll create a sysctl node: debug.dtrace and under that a read-only: debug.dtrace.providers string so that dtrace(1) can find out what providers had registered. On Solaris this is done via the device file system (I think -- remember I don't actually have a Solaris machine to look at -- it doesn't recognise the hardware on any of my machines) which lists the names under /dev/dtrace/providers. We have to do this differently. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#3 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_close.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_open.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_sysctl.c#1 add Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#3 (text+ko) ==== @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -64,109 +65,11 @@ /* For use with make_dev(9)/destroy_dev(9). */ static struct cdev *dtrace_dev; -/* ARGSUSED */ -static int -dtrace_close(struct cdev *dev __unused, int flags, int fmt __unused, - struct thread *td) -{ - return (0); -} - -/* ARGSUSED */ -static int -dtrace_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr __unused, - int flags __unused, struct thread *td __unused) -{ - dtrace_conf_t conf; - - int error = 0; - - switch (cmd) { - /* Really handled in upper layer */ - case FIOASYNC: - case FIONBIO: - break; - case DTRACEIOC_PROVIDER: - break; - case DTRACEIOC_PROBES: - break; - case DTRACEIOC_BUFSNAP: - break; - case DTRACEIOC_PROBEMATCH: - break; - case DTRACEIOC_ENABLE: - break; - case DTRACEIOC_AGGSNAP: - break; - case DTRACEIOC_EPROBE: - break; - case DTRACEIOC_PROBEARG: - break; - case DTRACEIOC_CONF: - bzero(&conf, sizeof (conf)); - conf.dtc_difversion = DIF_VERSION; - conf.dtc_difintregs = DIF_DIR_NREGS; - conf.dtc_diftupregs = DIF_DTR_NREGS; - conf.dtc_ctfmodel = CTF_MODEL_NATIVE; - - *((dtrace_conf_t *) addr) = conf; - - return (0); - break; - case DTRACEIOC_STATUS: - break; - case DTRACEIOC_GO: - break; - case DTRACEIOC_STOP: - break; - case DTRACEIOC_AGGDESC: - break; - case DTRACEIOC_FORMAT: - break; - case DTRACEIOC_DOFGET: - break; - case DTRACEIOC_REPLICATE: - break; - default: - error = ENOTTY; - } - return (error); -} - -/* ARGSUSED */ -static int -dtrace_open(struct cdev *dev, int oflags, int devtype, struct thread *td) -{ - int error = 0; - return (error); -} - -/* ARGSUSED */ -static int -dtrace_modevent(module_t mod __unused, int type, void *data __unused) -{ - int error = 0; - - switch (type) { - case MOD_LOAD: - dtrace_dev = make_dev(&dtrace_cdevsw, DTRACE_MINOR, - UID_ROOT, GID_WHEEL, 0660, "dtrace"); - break; - - case MOD_UNLOAD: - destroy_dev(dtrace_dev); - break; - - case MOD_SHUTDOWN: - break; - - default: - error = EOPNOTSUPP; - break; - - } - return (error); -} +#include +#include +#include +#include +#include DEV_MODULE(dtrace, dtrace_modevent, NULL); MODULE_VERSION(dtrace, 1); From owner-p4-projects@FreeBSD.ORG Wed Apr 19 06:45:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1153016A409; Wed, 19 Apr 2006 06:45:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE9F716A402 for ; Wed, 19 Apr 2006 06:45:35 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 778C543D4C for ; Wed, 19 Apr 2006 06:45:35 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J6jZLP024603 for ; Wed, 19 Apr 2006 06:45:35 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J6jZgu024594 for perforce@freebsd.org; Wed, 19 Apr 2006 06:45:35 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 06:45:35 GMT Message-Id: <200604190645.k3J6jZgu024594@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95581 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 06:45:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=95581 Change 95581 by jb@jb_freebsd2 on 2006/04/19 06:44:40 Read the sysctl debug.dtrace.providers to get a string with space-separated provider device names, then parse it and act on each name in the same way as Solaris. The debug.dtrace.providers sysctl variable is managed by the dtrace device and the string is formatted from the list of providers registered at the time of the sysctl call. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#5 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#5 (text) ==== @@ -56,6 +56,10 @@ #include #include #include +#if !defined(sun) +#include +#include +#endif /* * Stability and versioning definitions. These #defines are used in the tables @@ -624,7 +628,7 @@ int _dtrace_debug = 0; /* debug messages enabled (off) */ const char *const _dtrace_version = DT_VERS_STRING; /* API version string */ -#ifdef DOODAD +#if defined(sun) int _dtrace_rdvers = RD_VERSION; /* rtld_db feature version */ #endif @@ -634,7 +638,7 @@ uint_t df_size; /* size of df_fds[] */ } dt_fdlist_t; -#ifdef DOODAD +#if defined(sun) #pragma init(_dtrace_init) void _dtrace_init(void) @@ -663,9 +667,10 @@ { dt_provmod_t *prov; char path[PATH_MAX]; + int fd; +#if defined(sun) struct dirent *dp, *ep; DIR *dirp; - int fd; if ((dirp = opendir(_dtrace_provdir)) == NULL) return; /* failed to open directory; just skip it */ @@ -710,6 +715,92 @@ } (void) closedir(dirp); +#else + char *p; + char *p1; + char *p_providers = NULL; + int error; + size_t len = 0; + + /* + * Loop to allocate/reallocate memory for the string of provider + * names and retry: + */ + while(1) { + /* + * The first time around, get the string length. The next time, + * hopefully we've allocated enough memory. + */ + error = sysctlbyname("debug.dtrace.providers",p_providers,&len,NULL,0); + if (len == 0) + /* No providers? That's strange. Where's dtrace? */ + break; + else if (error == 0 && p_providers == NULL) { + /* + * Allocate the initial memory which should be enough + * unless another provider loads before we have + * time to go back and get the string. + */ + if ((p_providers = malloc(len)) == NULL) + /* How do we report errors here? */ + return; + } else if (error == -1 && errno == ENOMEM) { + /* + * The current buffer isn't large enough, so + * reallocate it. We normally won't need to do this + * because providers aren't being loaded all the time. + */ + if ((p = realloc(p_providers,len)) == NULL) + /* How do we report errors here? */ + return; + p_providers = p; + } else + break; + } + + /* Check if we got a string of provider names: */ + if (error == 0 && len > 0 && p_providers != NULL) { + p = p_providers; + + /* + * Parse the string containing the space separated + * provider names. + */ + while ((p1 = strsep(&p," ")) != NULL) { + if (dfp->df_ents == dfp->df_size) { + uint_t size = dfp->df_size ? dfp->df_size * 2 : 16; + int *fds = realloc(dfp->df_fds, size * sizeof (int)); + + if (fds == NULL) + break; + + dfp->df_fds = fds; + dfp->df_size = size; + } + + (void) snprintf(path, sizeof (path), "/dev/%s", p1); + + if ((fd = open(path, O_RDONLY)) == -1) + continue; /* failed to open driver; just skip it */ + + if (((prov = malloc(sizeof (dt_provmod_t))) == NULL) || + (prov->dp_name = malloc(strlen(p1) + 1)) == NULL) { + free(prov); + (void) close(fd); + break; + } + + (void) strcpy(prov->dp_name, p1); + prov->dp_next = *provmod; + *provmod = prov; + + dt_dprintf("opened provider %s\n", p1); + dfp->df_fds[dfp->df_ents++] = fd; + } + } + if (p_providers != NULL) + free(p_providers); +#endif } static void From owner-p4-projects@FreeBSD.ORG Wed Apr 19 07:57:05 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E032316A404; Wed, 19 Apr 2006 07:57:04 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87D8816A401 for ; Wed, 19 Apr 2006 07:57:04 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E585143D5D for ; Wed, 19 Apr 2006 07:57:03 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J7v3GQ064379 for ; Wed, 19 Apr 2006 07:57:03 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J7v3h9064376 for perforce@freebsd.org; Wed, 19 Apr 2006 07:57:03 GMT (envelope-from soc-andrew@freebsd.org) Date: Wed, 19 Apr 2006 07:57:03 GMT Message-Id: <200604190757.k3J7v3h9064376@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 95585 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 07:57:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=95585 Change 95585 by soc-andrew@soc-andrew_serv on 2006/04/19 07:56:20 Remove the compat-5.1 and dfui Lua modules. These have been replaced by packages Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/dfui/Makefile#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/dfui/common.c#4 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/dfui/dfui.c#4 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/dfui/dfui.lua#3 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/dfui/lua_dfui.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/lib/lua/dfui/progress.c#4 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/compat-5.1/compat-5.1.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/compat-5.1/compat-5.1.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/compat-5.1/compat-5.1.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/Makefile#4 edit .. //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/lua/Makefile#3 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/lua/Makefile.inc1#3 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/lua/dfui/Makefile#3 delete Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/lib/bsdinstaller/Makefile#4 (text+ko) ==== @@ -1,3 +1,3 @@ -SUBDIR=aura dfui lua +SUBDIR=aura dfui .include From owner-p4-projects@FreeBSD.ORG Wed Apr 19 09:08:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 503A816A420; Wed, 19 Apr 2006 09:08:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 586F616A417 for ; Wed, 19 Apr 2006 09:08:06 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D402C43D73 for ; Wed, 19 Apr 2006 09:08:01 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3J9804l011704 for ; Wed, 19 Apr 2006 09:08:00 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3J980XF011681 for perforce@freebsd.org; Wed, 19 Apr 2006 09:08:00 GMT (envelope-from soc-andrew@freebsd.org) Date: Wed, 19 Apr 2006 09:08:00 GMT Message-Id: <200604190908.k3J980XF011681@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 95588 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 09:08:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=95588 Change 95588 by soc-andrew@soc-andrew_serv on 2006/04/19 09:07:00 Unhock lua from the build Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/lib/Makefile#12 edit .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/Makefile#7 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/Makefile.inc1#2 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/lua/Makefile#4 delete .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/lualib/Makefile#4 delete .. //depot/projects/soc2005/bsdinstaller/src/usr.bin/Makefile#10 delete .. //depot/projects/soc2005/bsdinstaller/src/usr.bin/lua/Makefile#4 delete Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/lib/Makefile#12 (text+ko) ==== @@ -37,7 +37,7 @@ ${_libsmdb} \ ${_libsmutil} libstand libtelnet ${_libthr} ${_libthread_db} libufs \ libugidfw ${_libusbhid} ${_libvgl} libwrap liby libz ${_bind} \ - bsdinstaller lua + bsdinstaller .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) _csu=csu/${MACHINE_ARCH}-elf From owner-p4-projects@FreeBSD.ORG Wed Apr 19 12:35:12 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0FFC616A40A; Wed, 19 Apr 2006 12:35:12 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A96E316A408 for ; Wed, 19 Apr 2006 12:35:11 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B24F43D46 for ; Wed, 19 Apr 2006 12:35:11 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JCZBlU027322 for ; Wed, 19 Apr 2006 12:35:11 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JCZBj5027319 for perforce@freebsd.org; Wed, 19 Apr 2006 12:35:11 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 12:35:11 GMT Message-Id: <200604191235.k3JCZBj5027319@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95590 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 12:35:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=95590 Change 95590 by jb@jb_freebsd2 on 2006/04/19 12:35:07 When creating a linker file object, remember the full path name to the file so that it can be listed via kldstat. This change makes a new version (identified by the kld_file_stat structure size) which is backward compatible with the first version of the structure. Our policy is that kernels are backward compatible and that an old 'world' should work on a new kernel. The reverse is not true. This change is needed because dtrace(1) needs to know *exactly* which file was used to load each module. I also think it's poor form to just list the base module file name in kldstat(1) when we could, and some of us do, load modules from all over the place, not just from the /boot/kernel directory. Affected files ... .. //depot/projects/dtrace/src/sys/kern/kern_linker.c#2 edit .. //depot/projects/dtrace/src/sys/sys/linker.h#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/kern_linker.c#2 (text+ko) ==== @@ -459,7 +459,7 @@ lf = NULL; filename = linker_basename(pathname); - KLD_DPF(FILE, ("linker_make_file: new file, filename=%s\n", filename)); + KLD_DPF(FILE, ("linker_make_file: new file, filename='%s' for pathname='%s'\n", filename, pathname)); lf = (linker_file_t)kobj_create((kobj_class_t)lc, M_LINKER, M_WAITOK); if (lf == NULL) goto out; @@ -467,6 +467,7 @@ lf->userrefs = 0; lf->flags = 0; lf->filename = linker_strdup(filename); + lf->pathname = linker_strdup(pathname); LINKER_GET_NEXT_FILE_ID(lf->id); lf->ndeps = 0; lf->deps = NULL; @@ -565,6 +566,10 @@ free(file->filename, M_LINKER); file->filename = NULL; } + if (file->pathname) { + free(file->pathname, M_LINKER); + file->pathname = NULL; + } kobj_delete((kobj_t) file, M_LINKER); out: return (error); @@ -969,6 +974,7 @@ linker_file_t lf; int error = 0; int namelen, version; + int version_num = 1; struct kld_file_stat *stat; #ifdef MAC @@ -991,10 +997,16 @@ */ if ((error = copyin(&stat->version, &version, sizeof(version))) != 0) goto out; - if (version != sizeof(struct kld_file_stat)) { + if (version == sizeof(struct kld_file_stat_1)) + version_num = 1; + else if (version == sizeof(struct kld_file_stat)) + version_num = 2; + else { error = EINVAL; goto out; } + + /* Version 1 fields: */ namelen = strlen(lf->filename) + 1; if (namelen > MAXPATHLEN) namelen = MAXPATHLEN; @@ -1009,7 +1021,17 @@ goto out; if ((error = copyout(&lf->size, &stat->size, sizeof(size_t))) != 0) goto out; + if (version_num < 2) + goto done; + /* Version 2 fields: */ + namelen = strlen(lf->pathname) + 1; + if (namelen > MAXPATHLEN) + namelen = MAXPATHLEN; + if ((error = copyout(lf->pathname, &stat->pathname[0], namelen)) != 0) + goto out; + +done: td->td_retval[0] = 0; out: mtx_unlock(&Giant); ==== //depot/projects/dtrace/src/sys/sys/linker.h#2 (text+ko) ==== @@ -73,6 +73,7 @@ #define LINKER_FILE_LINKED 0x1 /* file has been fully linked */ TAILQ_ENTRY(linker_file) link; /* list of all loaded files */ char* filename; /* file which was loaded */ + char* pathname; /* file name with full path */ int id; /* unique id */ caddr_t address; /* load address */ size_t size; /* size of file */ @@ -260,6 +261,18 @@ #define ELF_RELOC_REL 1 #define ELF_RELOC_RELA 2 +/* + * This is version 1 of the KLD file status structure. It is identified + * by it's _size_ in the version field. + */ +struct kld_file_stat_1 { + int version; /* set to sizeof(linker_file_stat) */ + char name[MAXPATHLEN]; + int refs; + int id; + caddr_t address; /* load address */ + size_t size; /* size in bytes */ +}; #endif /* _KERNEL */ struct kld_file_stat { @@ -269,6 +282,7 @@ int id; caddr_t address; /* load address */ size_t size; /* size in bytes */ + char pathname[MAXPATHLEN]; }; struct kld_sym_lookup { From owner-p4-projects@FreeBSD.ORG Wed Apr 19 16:19:12 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9556416A40B; Wed, 19 Apr 2006 16:19:12 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E6AD16A409 for ; Wed, 19 Apr 2006 16:19:12 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 275E943D5C for ; Wed, 19 Apr 2006 16:19:12 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JGJC36054969 for ; Wed, 19 Apr 2006 16:19:12 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JGJBUt054963 for perforce@freebsd.org; Wed, 19 Apr 2006 16:19:11 GMT (envelope-from imp@freebsd.org) Date: Wed, 19 Apr 2006 16:19:11 GMT Message-Id: <200604191619.k3JGJBUt054963@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95596 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 16:19:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=95596 Change 95596 by imp@imp_hammer on 2006/04/19 16:18:33 BOOT0 -> BOOT Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#6 (text+ko) ==== @@ -7,8 +7,8 @@ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Werror -CFLAGS+=-DBOOT0_TSC -#CFLAGS+=-DBOOT0_KB920X +CFLAGS+=-DBOOT_TSC +#CFLAGS+=-DBOOT_KB920X LIBAT91=${.OBJDIR}/../libat91/libat91.a ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 (text) ==== @@ -48,7 +48,7 @@ register unsigned value; volatile sdram_size_t *p = (sdram_size_t *)SDRAM_BASE; -#ifdef BOOT0_TSC +#ifdef BOOT_TSC // For the TSC board, we turn ON the one LED we have while // early in boot. AT91C_BASE_PIOC->PIO_PER = AT91C_PIO_PC10; ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#3 (text) ==== @@ -31,7 +31,7 @@ #define SDRAM_BASE 0x20000000 -#ifdef BOOT0_KB9202 +#ifdef BOOT_KB9202 /* The following divisor sets PLLA frequency: e.g. 10/5 * 90 = 180MHz */ #define OSC_MAIN_FREQ_DIV 5 /* for 10MHz osc */ #define SDRAM_WIDTH AT91C_SDRC_DBW_16_BITS @@ -39,7 +39,7 @@ #define OSC_MAIN_MULT 90 #endif -#ifdef BOOT0_TSC +#ifdef BOOT_TSC /* The following divisor sets PLLA frequency: e.g. 16/4 * 45 = 180MHz */ #define OSC_MAIN_FREQ_DIV 4 /* for 16MHz osc */ #define SDRAM_WIDTH AT91C_SDRC_DBW_16_BITS From owner-p4-projects@FreeBSD.ORG Wed Apr 19 17:33:09 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4417816A506; Wed, 19 Apr 2006 17:33:09 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3D3A16A408 for ; Wed, 19 Apr 2006 17:33:08 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9043243D45 for ; Wed, 19 Apr 2006 17:33:08 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JHX8Wf002578 for ; Wed, 19 Apr 2006 17:33:08 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JHX87w002572 for perforce@freebsd.org; Wed, 19 Apr 2006 17:33:08 GMT (envelope-from marcel@freebsd.org) Date: Wed, 19 Apr 2006 17:33:08 GMT Message-Id: <200604191733.k3JHX87w002572@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 Cc: Subject: PERFORCE change 95599 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 17:33:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=95599 Change 95599 by marcel@marcel_nfs on 2006/04/19 17:32:51 Revamp ppc(4): o Move the ppc files out of files. and into the generic file. There's too much duplication. o Move the ppc options from options. to options. Too much duplication. o Add a PCI bus attachment and probe single port parallel cards. This requires the support for non-xero I/O port RIDs. o Add seperate ISA and ACPI attachments. When ISA is configured in the kernel, the ACPI attachment will use ISA dma. o Remove any and all ISA specifics from ppc.c and move it to the ISA bus attachment. o Change ppc_write() to a dummy function that always returns EINVAL. This is used by non-ISA attachments. o White-space fixups. This breaks PC98. Affected files ... .. //depot/projects/uart/conf/files#60 edit .. //depot/projects/uart/conf/files.alpha#15 edit .. //depot/projects/uart/conf/files.amd64#18 edit .. //depot/projects/uart/conf/files.i386#23 edit .. //depot/projects/uart/conf/files.ia64#16 edit .. //depot/projects/uart/conf/files.pc98#20 edit .. //depot/projects/uart/conf/options#29 edit .. //depot/projects/uart/conf/options.alpha#5 edit .. //depot/projects/uart/conf/options.amd64#7 edit .. //depot/projects/uart/conf/options.i386#12 edit .. //depot/projects/uart/conf/options.ia64#6 edit .. //depot/projects/uart/conf/options.pc98#11 edit .. //depot/projects/uart/dev/ppc/ppc.c#9 edit .. //depot/projects/uart/dev/ppc/ppc_acpi.c#1 add .. //depot/projects/uart/dev/ppc/ppc_isa.c#1 add .. //depot/projects/uart/dev/ppc/ppc_pci.c#1 add .. //depot/projects/uart/dev/ppc/ppc_puc.c#4 edit .. //depot/projects/uart/dev/ppc/ppcreg.h#2 edit .. //depot/projects/uart/dev/ppc/ppcvar.h#4 edit Differences ... ==== //depot/projects/uart/conf/files#60 (text+ko) ==== @@ -804,6 +804,11 @@ dev/ppbus/pps.c optional pps dev/ppbus/vpo.c optional vpo dev/ppbus/vpoio.c optional vpo +dev/ppc/ppc.c optional ppc +dev/ppc/ppc_acpi.c optional ppc acpi +dev/ppc/ppc_isa.c optional ppc isa +dev/ppc/ppc_pci.c optional ppc pci +dev/ppc/ppc_puc.c optional ppc puc dev/pst/pst-iop.c optional pst dev/pst/pst-pci.c optional pst pci dev/pst/pst-raid.c optional pst ==== //depot/projects/uart/conf/files.alpha#15 (text+ko) ==== @@ -179,8 +179,6 @@ dev/fdc/fdc_isa.c optional fdc isa dev/hwpmc/hwpmc_alpha.c optional hwpmc dev/kbd/kbd.c optional atkbd | sc | ukbd -dev/ppc/ppc.c optional ppc -dev/ppc/ppc_puc.c optional ppc puc dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/syscons/schistory.c optional sc ==== //depot/projects/uart/conf/files.amd64#18 (text+ko) ==== @@ -173,8 +173,6 @@ dev/kbd/kbd.c optional atkbd | sc | ukbd dev/mem/memutil.c optional mem dev/nve/if_nve.c optional nve pci -dev/ppc/ppc.c optional ppc -dev/ppc/ppc_puc.c optional ppc puc dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/speaker/spkr.c optional speaker ==== //depot/projects/uart/conf/files.i386#23 (text+ko) ==== @@ -193,8 +193,6 @@ dev/mse/mse_isa.c optional mse isa dev/nve/if_nve.c optional nve pci dev/pcf/pcf_isa.c optional pcf -dev/ppc/ppc.c optional ppc -dev/ppc/ppc_puc.c optional ppc puc pci dev/random/nehemiah.c optional random dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_isa.c optional sbni isa ==== //depot/projects/uart/conf/files.ia64#16 (text+ko) ==== @@ -58,8 +58,6 @@ dev/fb/vga.c optional vga dev/hwpmc/hwpmc_ia64.c optional hwpmc dev/kbd/kbd.c optional atkbd | sc | ukbd -dev/ppc/ppc.c optional ppc isa -dev/ppc/ppc_puc.c optional ppc puc dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc dev/syscons/scterm-dumb.c optional sc ==== //depot/projects/uart/conf/files.pc98#20 (text+ko) ==== @@ -110,7 +110,6 @@ dev/mem/memutil.c optional mem dev/mse/mse.c optional mse dev/mse/mse_cbus.c optional mse isa -dev/ppc/ppc_puc.c optional ppc puc pci dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_pci.c optional sbni pci dev/snc/dp83932.c optional snc ==== //depot/projects/uart/conf/options#29 (text+ko) ==== @@ -121,6 +121,8 @@ MUTEX_WAKE_ALL NSWBUF_MIN opt_swap.h PANIC_REBOOT_WAIT_TIME opt_panic.h +PPC_DEBUG opt_ppc.h +PPC_PROBE_CHIPSET opt_ppc.h PPS_SYNC opt_ntp.h PREEMPTION opt_sched.h QUOTA ==== //depot/projects/uart/conf/options.alpha#5 (text+ko) ==== @@ -18,9 +18,6 @@ MAXMEM -PPC_PROBE_CHIPSET opt_ppc.h -PPC_DEBUG opt_ppc.h - VGA_ALT_SEQACCESS opt_vga.h VGA_DEBUG opt_vga.h VGA_NO_FONT_LOADING opt_vga.h ==== //depot/projects/uart/conf/options.amd64#7 (text+ko) ==== @@ -49,8 +49,6 @@ # EOF # ------------------------------- HAMMER opt_cpu.h -PPC_PROBE_CHIPSET opt_ppc.h -PPC_DEBUG opt_ppc.h PSM_HOOKRESUME opt_psm.h PSM_RESETAFTERSUSPEND opt_psm.h PSM_DEBUG opt_psm.h ==== //depot/projects/uart/conf/options.i386#12 (text+ko) ==== @@ -15,8 +15,6 @@ PERFMON PMAP_SHPGPERPROC opt_pmap.h POWERFAIL_NMI opt_trap.h -PPC_DEBUG opt_ppc.h -PPC_PROBE_CHIPSET opt_ppc.h # Options for emulators. These should only be used at config time, so # they are handled like options for static filesystems ==== //depot/projects/uart/conf/options.ia64#6 (text+ko) ==== @@ -11,9 +11,6 @@ COMPAT_IA32 opt_compat.h -PPC_PROBE_CHIPSET opt_ppc.h -PPC_DEBUG opt_ppc.h - VGA_ALT_SEQACCESS opt_vga.h VGA_DEBUG opt_vga.h VGA_NO_FONT_LOADING opt_vga.h ==== //depot/projects/uart/conf/options.pc98#11 (text+ko) ==== @@ -14,8 +14,6 @@ PERFMON PMAP_SHPGPERPROC opt_pmap.h POWERFAIL_NMI opt_trap.h -PPC_DEBUG opt_ppc.h -PPC_PROBE_CHIPSET opt_ppc.h # Options for emulators. These should only be used at config time, so # they are handled like options for static filesystems ==== //depot/projects/uart/dev/ppc/ppc.c#9 (text+ko) ==== @@ -36,18 +36,17 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include -#include -#include +#ifdef __i386__ +#include +#include +#include +#endif #include #include @@ -57,9 +56,10 @@ #include "ppbus_if.h" -static int ppc_isa_probe(device_t dev); +static void ppcintr(void *arg); -static void ppcintr(void *arg); +#define IO_LPTSIZE_EXTENDED 8 /* "Extended" LPT controllers */ +#define IO_LPTSIZE_NORMAL 4 /* "Normal" LPT controllers */ #define LOG_PPC(function, ppc, string) \ if (bootverbose) printf("%s: %s\n", function, string) @@ -68,37 +68,8 @@ #define DEVTOSOFTC(dev) ((struct ppc_data *)device_get_softc(dev)) devclass_t ppc_devclass; - -static device_method_t ppc_methods[] = { - /* device interface */ - DEVMETHOD(device_probe, ppc_isa_probe), - DEVMETHOD(device_attach, ppc_attach), - DEVMETHOD(device_detach, ppc_detach), - - /* bus interface */ - DEVMETHOD(bus_read_ivar, ppc_read_ivar), - DEVMETHOD(bus_setup_intr, ppc_setup_intr), - DEVMETHOD(bus_teardown_intr, ppc_teardown_intr), - DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), +const char ppc_driver_name[] = "ppc"; - /* ppbus interface */ - DEVMETHOD(ppbus_io, ppc_io), - DEVMETHOD(ppbus_exec_microseq, ppc_exec_microseq), - DEVMETHOD(ppbus_reset_epp, ppc_reset_epp), - DEVMETHOD(ppbus_setmode, ppc_setmode), - DEVMETHOD(ppbus_ecp_sync, ppc_ecp_sync), - DEVMETHOD(ppbus_read, ppc_read), - DEVMETHOD(ppbus_write, ppc_write), - - { 0, 0 } - }; - -static driver_t ppc_driver = { - "ppc", - ppc_methods, - sizeof(struct ppc_data), -}; - static char *ppc_models[] = { "SMC-like", "SMC FDC37C665GT", "SMC FDC37C666GT", "PC87332", "PC87306", "82091AA", "Generic", "W83877F", "W83877AF", "Winbond", "PC87334", @@ -1593,12 +1564,7 @@ #ifdef PPC_DEBUG printf("d"); #endif - isa_dmadone( - ppc->ppc_dmaflags, - ppc->ppc_dmaddr, - ppc->ppc_dmacnt, - ppc->ppc_dmachan); - + ppc->ppc_dmadone(ppc); ppc->ppc_dmastat = PPC_DMA_COMPLETE; /* wakeup the waiting process */ @@ -1620,163 +1586,10 @@ return (EINVAL); } -/* - * Call this function if you want to send data in any advanced mode - * of your parallel port: FIFO, DMA - * - * If what you want is not possible (no ECP, no DMA...), - * EINVAL is returned - */ int ppc_write(device_t dev, char *buf, int len, int how) { - struct ppc_data *ppc = DEVTOSOFTC(dev); - char ecr, ecr_sav, ctr, ctr_sav; - int s, error = 0; - int spin; - -#ifdef PPC_DEBUG - printf("w"); -#endif - - ecr_sav = r_ecr(ppc); - ctr_sav = r_ctr(ppc); - - /* - * Send buffer with DMA, FIFO and interrupts - */ - if ((ppc->ppc_avm & PPB_ECP) && (ppc->ppc_registered)) { - - if (ppc->ppc_dmachan > 0) { - - /* byte mode, no intr, no DMA, dir=0, flush fifo - */ - ecr = PPC_ECR_STD | PPC_DISABLE_INTR; - w_ecr(ppc, ecr); - - /* disable nAck interrupts */ - ctr = r_ctr(ppc); - ctr &= ~IRQENABLE; - w_ctr(ppc, ctr); - - ppc->ppc_dmaflags = 0; - ppc->ppc_dmaddr = (caddr_t)buf; - ppc->ppc_dmacnt = (u_int)len; - - switch (ppc->ppc_mode) { - case PPB_COMPATIBLE: - /* compatible mode with FIFO, no intr, DMA, dir=0 */ - ecr = PPC_ECR_FIFO | PPC_DISABLE_INTR | PPC_ENABLE_DMA; - break; - case PPB_ECP: - ecr = PPC_ECR_ECP | PPC_DISABLE_INTR | PPC_ENABLE_DMA; - break; - default: - error = EINVAL; - goto error; - } - - w_ecr(ppc, ecr); - ecr = r_ecr(ppc); - - /* enter splhigh() not to be preempted - * by the dma interrupt, we may miss - * the wakeup otherwise - */ - s = splhigh(); - - ppc->ppc_dmastat = PPC_DMA_INIT; - - /* enable interrupts */ - ecr &= ~PPC_SERVICE_INTR; - ppc->ppc_irqstat = PPC_IRQ_DMA; - w_ecr(ppc, ecr); - - isa_dmastart( - ppc->ppc_dmaflags, - ppc->ppc_dmaddr, - ppc->ppc_dmacnt, - ppc->ppc_dmachan); -#ifdef PPC_DEBUG - printf("s%d", ppc->ppc_dmacnt); -#endif - ppc->ppc_dmastat = PPC_DMA_STARTED; - - /* Wait for the DMA completed interrupt. We hope we won't - * miss it, otherwise a signal will be necessary to unlock the - * process. - */ - do { - /* release CPU */ - error = tsleep(ppc, - PPBPRI | PCATCH, "ppcdma", 0); - - } while (error == EWOULDBLOCK); - - splx(s); - - if (error) { -#ifdef PPC_DEBUG - printf("i"); -#endif - /* stop DMA */ - isa_dmadone( - ppc->ppc_dmaflags, ppc->ppc_dmaddr, - ppc->ppc_dmacnt, ppc->ppc_dmachan); - - /* no dma, no interrupt, flush the fifo */ - w_ecr(ppc, PPC_ECR_RESET); - - ppc->ppc_dmastat = PPC_DMA_INTERRUPTED; - goto error; - } - - /* wait for an empty fifo */ - while (!(r_ecr(ppc) & PPC_FIFO_EMPTY)) { - - for (spin=100; spin; spin--) - if (r_ecr(ppc) & PPC_FIFO_EMPTY) - goto fifo_empty; -#ifdef PPC_DEBUG - printf("Z"); -#endif - error = tsleep(ppc, PPBPRI | PCATCH, "ppcfifo", hz/100); - if (error != EWOULDBLOCK) { -#ifdef PPC_DEBUG - printf("I"); -#endif - /* no dma, no interrupt, flush the fifo */ - w_ecr(ppc, PPC_ECR_RESET); - - ppc->ppc_dmastat = PPC_DMA_INTERRUPTED; - error = EINTR; - goto error; - } - } - -fifo_empty: - /* no dma, no interrupt, flush the fifo */ - w_ecr(ppc, PPC_ECR_RESET); - - } else - error = EINVAL; /* XXX we should FIFO and - * interrupts */ - } else - error = EINVAL; - -error: - - /* PDRQ must be kept unasserted until nPDACK is - * deasserted for a minimum of 350ns (SMC datasheet) - * - * Consequence may be a FIFO that never empty - */ - DELAY(1); - - w_ecr(ppc, ecr_sav); - w_ctr(ppc, ctr_sav); - - return (error); + return (EINVAL); } void @@ -1809,31 +1622,8 @@ return (ENXIO); } -static struct isa_pnp_id lpc_ids[] = { - { 0x0004d041, "Standard parallel printer port" }, /* PNP0400 */ - { 0x0104d041, "ECP parallel printer port" }, /* PNP0401 */ - { 0 } -}; - -static int -ppc_isa_probe(device_t dev) -{ - device_t parent; - int error; - - parent = device_get_parent(dev); - - error = ISA_PNP_PROBE(parent, dev, lpc_ids); - if (error == ENXIO) - return (ENXIO); - else if (error != 0) /* XXX shall be set after detection */ - device_set_desc(dev, "Parallel port"); - - return(ppc_probe(dev)); -} - int -ppc_probe(device_t dev) +ppc_probe(device_t dev, int rid) { #ifdef __i386__ static short next_bios_ppc = 0; @@ -1848,11 +1638,10 @@ ppc = DEVTOSOFTC(dev); bzero(ppc, sizeof(struct ppc_data)); - ppc->rid_irq = ppc->rid_drq = ppc->rid_ioport = 0; - ppc->res_irq = ppc->res_drq = ppc->res_ioport = 0; + ppc->rid_ioport = rid; /* retrieve ISA parameters */ - error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &port, NULL); + error = bus_get_resource(dev, SYS_RES_IOPORT, rid, &port, NULL); #ifdef __i386__ /* @@ -1869,7 +1658,7 @@ device_printf(dev, "parallel port not found.\n"); return ENXIO; } - bus_set_resource(dev, SYS_RES_IOPORT, 0, port, + bus_set_resource(dev, SYS_RES_IOPORT, rid, port, IO_LPTSIZE_EXTENDED); } #endif @@ -1878,7 +1667,7 @@ * There isn't a bios list on alpha. Put it in the usual place. */ if (error) { - bus_set_resource(dev, SYS_RES_IOPORT, 0, 0x3bc, + bus_set_resource(dev, SYS_RES_IOPORT, rid, 0x3bc, IO_LPTSIZE_NORMAL); } #endif @@ -1981,12 +1770,6 @@ device_printf(dev, "FIFO with %d/%d/%d bytes threshold\n", ppc->ppc_fifo, ppc->ppc_wthr, ppc->ppc_rthr); - if ((ppc->ppc_avm & PPB_ECP) && (ppc->ppc_dmachan > 0)) { - /* acquire the DMA channel forever */ /* XXX */ - isa_dma_acquire(ppc->ppc_dmachan); - isa_dmainit(ppc->ppc_dmachan, 1024); /* nlpt.BUFSIZE */ - } - /* add ppbus as a child of this isa to parallel bridge */ ppbus = device_add_child(dev, "ppbus", -1); @@ -2192,6 +1975,4 @@ return (error); } -DRIVER_MODULE(ppc, isa, ppc_driver, ppc_devclass, 0, 0); -DRIVER_MODULE(ppc, acpi, ppc_driver, ppc_devclass, 0, 0); MODULE_DEPEND(ppc, ppbus, 1, 1, 1); ==== //depot/projects/uart/dev/ppc/ppc_puc.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ #include #include #include - + #include #include @@ -49,14 +49,15 @@ static device_method_t ppc_puc_methods[] = { /* device interface */ - DEVMETHOD(device_probe, ppc_puc_probe), - DEVMETHOD(device_attach, ppc_attach), + DEVMETHOD(device_probe, ppc_puc_probe), + DEVMETHOD(device_attach, ppc_attach), + DEVMETHOD(device_detach, ppc_detach), /* bus interface */ DEVMETHOD(bus_read_ivar, ppc_read_ivar), DEVMETHOD(bus_setup_intr, ppc_setup_intr), DEVMETHOD(bus_teardown_intr, ppc_teardown_intr), - DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), /* ppbus interface */ DEVMETHOD(ppbus_io, ppc_io), @@ -67,11 +68,11 @@ DEVMETHOD(ppbus_read, ppc_read), DEVMETHOD(ppbus_write, ppc_write), - { 0, 0 } - }; - + { 0, 0 } +}; + static driver_t ppc_puc_driver = { - "ppc", + ppc_driver_name, ppc_puc_methods, sizeof(struct ppc_data), }; @@ -89,7 +90,7 @@ return (ENXIO); device_set_desc(dev, "Parallel port"); - return (ppc_probe(dev)); + return (ppc_probe(dev, 0)); } DRIVER_MODULE(ppc, puc, ppc_puc_driver, ppc_devclass, 0, 0); ==== //depot/projects/uart/dev/ppc/ppcreg.h#2 (text+ko) ==== @@ -82,6 +82,7 @@ int ppc_dmaflags; /* dma transfer flags */ caddr_t ppc_dmaddr; /* buffer address */ u_int ppc_dmacnt; /* count of bytes sent with dma */ + void (*ppc_dmadone)(struct ppc_data*); #define PPC_PWORD_MASK 0x30 #define PPC_PWORD_16 0x00 ==== //depot/projects/uart/dev/ppc/ppcvar.h#4 (text+ko) ==== @@ -28,7 +28,7 @@ * */ -int ppc_probe(device_t dev); +int ppc_probe(device_t dev, int rid); int ppc_attach(device_t dev); int ppc_detach(device_t dev); int ppc_read_ivar(device_t bus, device_t dev, int index, uintptr_t *val); @@ -46,4 +46,5 @@ void ppc_ecp_sync(device_t); int ppc_setmode(device_t, int); -extern devclass_t ppc_devclass; +extern devclass_t ppc_devclass; +extern const char ppc_driver_name[]; From owner-p4-projects@FreeBSD.ORG Wed Apr 19 17:36:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5118F16A40B; Wed, 19 Apr 2006 17:36:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18E5516A40A for ; Wed, 19 Apr 2006 17:36:13 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB16843D45 for ; Wed, 19 Apr 2006 17:36:12 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JHaCL0005175 for ; Wed, 19 Apr 2006 17:36:12 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JHaCr4005169 for perforce@freebsd.org; Wed, 19 Apr 2006 17:36:12 GMT (envelope-from marcel@freebsd.org) Date: Wed, 19 Apr 2006 17:36:12 GMT Message-Id: <200604191736.k3JHaCr4005169@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 Cc: Subject: PERFORCE change 95600 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 17:36:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=95600 Change 95600 by marcel@marcel_nfs on 2006/04/19 17:35:26 Remove single-port parallel cards. They are attached to by ppc(4) itself. Affected files ... .. //depot/projects/uart/dev/puc/puc.c#30 edit .. //depot/projects/uart/dev/puc/pucdata.c#24 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#30 (text+ko) ==== @@ -403,7 +403,7 @@ sc->sc_cfg = cfg; /* We don't attach to single-port serial cards. */ - if (cfg->ports == PUC_PORT_1S) + if (cfg->ports == PUC_PORT_1S || cfg->ports = PUC_PORT_1P) return (EDOOFUS); error = puc_query(cfg, PUC_QUERY_NPORTS, 0, &res); if (error) ==== //depot/projects/uart/dev/puc/pucdata.c#24 (text+ko) ==== @@ -205,12 +205,6 @@ PUC_PORT_1S1P, 0x18, 4, 0, }, - { 0x131f, 0x1020, 0xffff, 0, - "SIIG Cyber Parallel PCI (10x family)", - 0, - PUC_PORT_1P, 0x18, 0, 0, - }, - { 0x131f, 0x1021, 0xffff, 0, "SIIG Cyber Parallel Dual PCI (10x family)", 0, @@ -289,12 +283,6 @@ PUC_PORT_1S1P, 0x10, 4, 0, }, - { 0x131f, 0x2020, 0xffff, 0, - "SIIG Cyber Parallel PCI (20x family)", - 0, - PUC_PORT_1P, 0x10, 0, 0, - }, - { 0x131f, 0x2021, 0xffff, 0, "SIIG Cyber Parallel Dual PCI (20x family)", 0, @@ -431,12 +419,6 @@ PUC_PORT_4S, 0x10, 4, 0, }, - { 0x1407, 0x8000, 0xffff, 0, - "Lava Computers 2SP-PCI parallel port", - 0, - PUC_PORT_1P, 0x10, 0, 0, - }, - /* * Dolphin Peripherals 4036 (dual serial port) card. * (Dolpin 4025 has the same ID but only one port) @@ -457,12 +439,6 @@ * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports. */ - { 0x1415, 0x8403, 0xffff, 0, - "Oxford Semiconductor OX12PCI840 Parallel port", - 0, - PUC_PORT_1P, 0x10, 0, 0, - }, - { 0x1415, 0x9501, 0xffff, 0, "Oxford Semiconductor OX16PCI954 UARTs", DEFAULT_RCLK, @@ -481,12 +457,6 @@ PUC_PORT_4S, 0x10, 0, 8, }, - { 0x1415, 0x9513, 0xffff, 0, - "Oxford Semiconductor OX16PCI954 Parallel port", - 0, - PUC_PORT_1P, 0x10, 0, 0, - }, - { 0x14d2, 0x8020, 0xffff, 0, "VScom PCI-200L", DEFAULT_RCLK * 8, @@ -574,12 +544,6 @@ PUC_PORT_2S, 0x1c, 0, 8, }, - { 0x9710, 0x9805, 0xffff, 0, - "NetMos NM9805 1284 Printer port", - 0, - PUC_PORT_1P, 0x10, 0, 0, - }, - { 0x9710, 0x9835, 0xffff, 0, "NetMos NM9835 Dual UART and 1284 Printer port", DEFAULT_RCLK, From owner-p4-projects@FreeBSD.ORG Wed Apr 19 17:37:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 563A516A40B; Wed, 19 Apr 2006 17:37:15 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3394116A401 for ; Wed, 19 Apr 2006 17:37:15 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90A8A43D55 for ; Wed, 19 Apr 2006 17:37:14 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JHbEUN005949 for ; Wed, 19 Apr 2006 17:37:14 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JHbEuu005941 for perforce@freebsd.org; Wed, 19 Apr 2006 17:37:14 GMT (envelope-from marcel@freebsd.org) Date: Wed, 19 Apr 2006 17:37:14 GMT Message-Id: <200604191737.k3JHbEuu005941@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 Cc: Subject: PERFORCE change 95601 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 17:37:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=95601 Change 95601 by marcel@marcel_nfs on 2006/04/19 17:36:24 s/=/==/ in previous commit. Affected files ... .. //depot/projects/uart/dev/puc/puc.c#31 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#31 (text+ko) ==== @@ -403,7 +403,7 @@ sc->sc_cfg = cfg; /* We don't attach to single-port serial cards. */ - if (cfg->ports == PUC_PORT_1S || cfg->ports = PUC_PORT_1P) + if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P) return (EDOOFUS); error = puc_query(cfg, PUC_QUERY_NPORTS, 0, &res); if (error) From owner-p4-projects@FreeBSD.ORG Wed Apr 19 18:45:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7686516A404; Wed, 19 Apr 2006 18:45:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A54C16A400 for ; Wed, 19 Apr 2006 18:45:39 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C432543D60 for ; Wed, 19 Apr 2006 18:45:38 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JIjcgV043317 for ; Wed, 19 Apr 2006 18:45:38 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JIjcbO043314 for perforce@freebsd.org; Wed, 19 Apr 2006 18:45:38 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 18:45:38 GMT Message-Id: <200604191845.k3JIjcbO043314@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95605 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 18:45:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=95605 Change 95605 by jb@jb_freebsd2 on 2006/04/19 18:44:50 Add STT_NUM for compatibility with OpenSolaris. Affected files ... .. //depot/projects/dtrace/src/sys/sys/elf_common.h#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/sys/elf_common.h#2 (text+ko) ==== @@ -347,6 +347,7 @@ #define STT_FILE 4 /* Source file. */ #define STT_COMMON 5 /* Uninitialized common block. */ #define STT_TLS 6 /* TLS object. */ +#define STT_NUM 7 #define STT_LOOS 10 /* Reserved range for operating system */ #define STT_HIOS 12 /* specific semantics. */ #define STT_LOPROC 13 /* reserved range for processor */ From owner-p4-projects@FreeBSD.ORG Wed Apr 19 19:31:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4CEC816A407; Wed, 19 Apr 2006 19:31:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFB3016A404 for ; Wed, 19 Apr 2006 19:31:39 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A91D443D45 for ; Wed, 19 Apr 2006 19:31:39 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JJVdEr067155 for ; Wed, 19 Apr 2006 19:31:39 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JJVdSK067147 for perforce@freebsd.org; Wed, 19 Apr 2006 19:31:39 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 19:31:39 GMT Message-Id: <200604191931.k3JJVdSK067147@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95608 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 19:31:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95608 Change 95608 by jb@jb_freebsd2 on 2006/04/19 19:31:23 More compatibility cruft. We don't have an object file system, but having the typedef for the info structure saves us pain elsewhere. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/objfs.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Wed Apr 19 19:43:17 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 722A516A40E; Wed, 19 Apr 2006 19:43:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3810816A404 for ; Wed, 19 Apr 2006 19:43:17 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 786E243D73 for ; Wed, 19 Apr 2006 19:42:59 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JJgvQr076174 for ; Wed, 19 Apr 2006 19:42:57 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JJgukm076165 for perforce@freebsd.org; Wed, 19 Apr 2006 19:42:56 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 19:42:56 GMT Message-Id: <200604191942.k3JJgukm076165@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95612 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 19:43:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=95612 Change 95612 by jb@jb_freebsd2 on 2006/04/19 19:42:41 Now that kldstat(2) reports the full module path name this code can be used. There are a few subtle differences between the Solaris implementation and the FreeBSD one. Solaris uses the object file system to find out what modules are loaded whereas FreeBSD uses the kernel linker status (kldstat(2)) call. On FreeBSD, the kernel returns the full path to the loaded module. This means that on FreeBSD the module name ends up being the full path whereas on Solaris the module name is just the name of the object in /system/object/[name]. On FreeBSD, there is no .filename section in the linked file, so the dm_file field remains empty. Here is a section of the debug output from dtrace(1) -- this should make sense to some people reading these submit messages. 8-) libdtrace DEBUG: opened provider dtrace libdtrace DEBUG: opened provider fasttrap libdtrace DEBUG: opened 32-bit module /boot/kernel/kernel () [0] libdtrace DEBUG: opened 32-bit module /boot/kernel/acpi.ko () [0] libdtrace DEBUG: opened 32-bit module /boot/kernel/linprocfs.ko () [0] libdtrace DEBUG: opened 32-bit module /boot/kernel/linux.ko () [0] libdtrace DEBUG: opened 32-bit module /boot/kernel/dtrace.ko () [0] libdtrace DEBUG: opened 32-bit module /boot/kernel/fasttrap.ko () [0] libdtrace DEBUG: created CTF container for C (0x82e0160) libdtrace DEBUG: created CTF container for D (0x82e02b0) libdtrace DEBUG: loaded /boot/kernel/kernel [.symtab] (435696 bytes) libdtrace DEBUG: loaded /boot/kernel/kernel [.strtab] (532503 bytes) libdtrace DEBUG: hashed /boot/kernel/kernel [.symtab] (27203 symbols) libdtrace DEBUG: sorted /boot/kernel/kernel [.symtab] (27115 symbols) libdtrace DEBUG: loaded /boot/kernel/acpi.ko [.SUNW_ctf] (1204974 bytes) libdtrace DEBUG: loaded /boot/kernel/acpi.ko [.symtab] (31776 bytes) libdtrace DEBUG: loaded /boot/kernel/acpi.ko [.strtab] (43195 bytes) libdtrace DEBUG: hashed /boot/kernel/acpi.ko [.symtab] (1968 symbols) libdtrace DEBUG: sorted /boot/kernel/acpi.ko [.symtab] (1671 symbols) libdtrace DEBUG: loaded CTF container for /boot/kernel/acpi.ko (0x82e0400) libdtrace DEBUG: loaded /boot/kernel/linprocfs.ko [.SUNW_ctf] (44796 bytes) libdtrace DEBUG: loaded /boot/kernel/linprocfs.ko [.symtab] (2320 bytes) libdtrace DEBUG: loaded /boot/kernel/linprocfs.ko [.strtab] (2221 bytes) libdtrace DEBUG: hashed /boot/kernel/linprocfs.ko [.symtab] (129 symbols) libdtrace DEBUG: sorted /boot/kernel/linprocfs.ko [.symtab] (52 symbols) libdtrace DEBUG: loaded CTF container for /boot/kernel/linprocfs.ko (0x82e0550) libdtrace DEBUG: populating global idhash from 0x280da7e0 libdtrace DEBUG: loaded /boot/kernel/linux.ko [.SUNW_ctf] (67158 bytes) libdtrace DEBUG: loaded /boot/kernel/linux.ko [.symtab] (11200 bytes) libdtrace DEBUG: loaded /boot/kernel/linux.ko [.strtab] (10258 bytes) libdtrace DEBUG: hashed /boot/kernel/linux.ko [.symtab] (681 symbols) libdtrace DEBUG: sorted /boot/kernel/linux.ko [.symtab] (394 symbols) libdtrace DEBUG: loaded CTF container for /boot/kernel/linux.ko (0x82e06a0) libdtrace DEBUG: loaded /boot/kernel/dtrace.ko [.SUNW_ctf] (16472 bytes) libdtrace DEBUG: loaded /boot/kernel/dtrace.ko [.symtab] (1008 bytes) libdtrace DEBUG: loaded /boot/kernel/dtrace.ko [.strtab] (1055 bytes) libdtrace DEBUG: hashed /boot/kernel/dtrace.ko [.symtab] (46 symbols) libdtrace DEBUG: sorted /boot/kernel/dtrace.ko [.symtab] (37 symbols) libdtrace DEBUG: loaded CTF container for /boot/kernel/dtrace.ko (0x82e07f0) libdtrace DEBUG: loaded /boot/kernel/fasttrap.ko [.SUNW_ctf] (15655 bytes) libdtrace DEBUG: loaded /boot/kernel/fasttrap.ko [.symtab] (672 bytes) libdtrace DEBUG: loaded /boot/kernel/fasttrap.ko [.strtab] (558 bytes) libdtrace DEBUG: hashed /boot/kernel/fasttrap.ko [.symtab] (26 symbols) libdtrace DEBUG: sorted /boot/kernel/fasttrap.ko [.symtab] (23 symbols) libdtrace DEBUG: loaded CTF container for /boot/kernel/fasttrap.ko (0x82e0940) I'm a bit surprised to see the .SUNW_ctf section being reported on the kernel modules. I would have sworn that I haven't built that in. Notice that it is missing from the kernel module. That is definitely correct. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#5 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#5 (text) ==== @@ -40,6 +40,8 @@ #else #include #include +#include +#include #endif #include @@ -77,8 +79,6 @@ static uint_t dt_module_syminit32(dt_module_t *dmp) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD const Elf32_Sym *sym = dmp->dm_symtab.cts_data; const char *base = dmp->dm_strtab.cts_data; size_t ss_size = dmp->dm_strtab.cts_size; @@ -103,16 +103,11 @@ } return (asrsv); -#else -return 0; -#endif } static uint_t dt_module_syminit64(dt_module_t *dmp) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD const Elf64_Sym *sym = dmp->dm_symtab.cts_data; const char *base = dmp->dm_strtab.cts_data; size_t ss_size = dmp->dm_strtab.cts_size; @@ -137,9 +132,6 @@ } return (asrsv); -#else -return 0; -#endif } /* @@ -802,12 +794,13 @@ /* * Update our module cache by adding an entry for the specified module 'name'. * We create the dt_module_t and populate it using /system/object//. + * + * On FreeBSD, the module name is passed as the full module file name, + * including the path. */ static void dt_module_update(dtrace_hdl_t *dtp, const char *name) { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD char fname[MAXPATHLEN]; struct stat64 st; int fd, err, bits; @@ -819,8 +812,12 @@ Elf_Data *dp; Elf_Scn *sp; +#if defined(sun) (void) snprintf(fname, sizeof (fname), "%s/%s/object", OBJFS_ROOT, name); +#else + (void) strlcpy(fname, name, sizeof(fname)); +#endif if ((fd = open(fname, O_RDONLY)) == -1 || fstat64(fd, &st) == -1 || (dmp = dt_module_create(dtp, name)) == NULL) { @@ -892,14 +889,22 @@ } dmp->dm_flags |= DT_DM_KERNEL; +#if defined(sun) dmp->dm_modid = (int)OBJFS_MODID(st.st_ino); +#else + /* + * On FreeBSD we probably should map this to the 'fileid' that + * kldstat(2) reports. Unfortunately we discarded that info before + * this function was called. + */ + dmp->dm_modid = 0; +#endif if (dmp->dm_info.objfs_info_primary) dmp->dm_flags |= DT_DM_PRIMARY; dt_dprintf("opened %d-bit module %s (%s) [%d]\n", bits, dmp->dm_name, dmp->dm_file, dmp->dm_modid); -#endif } /* @@ -942,11 +947,9 @@ */ for (fileid = kldnext(0); fileid > 0; fileid = kldnext(fileid)) { struct kld_file_stat k_stat; + k_stat.version = sizeof(k_stat); if (kldstat(fileid, &k_stat) == 0) -{ -printf("%s:%s(%d): Kernel module '%s'\n",__FUNCTION__,__FILE__,__LINE__,k_stat.name); - dt_module_update(dtp, k_stat.name); -} + dt_module_update(dtp, k_stat.pathname); } #endif From owner-p4-projects@FreeBSD.ORG Wed Apr 19 19:48:06 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B54C316A40D; Wed, 19 Apr 2006 19:48:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9084416A407 for ; Wed, 19 Apr 2006 19:48:06 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB2C543D6A for ; Wed, 19 Apr 2006 19:48:03 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JJm3UU076537 for ; Wed, 19 Apr 2006 19:48:03 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JJm3ot076534 for perforce@freebsd.org; Wed, 19 Apr 2006 19:48:03 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 19:48:03 GMT Message-Id: <200604191948.k3JJm3ot076534@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95613 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 19:48:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=95613 Change 95613 by jb@jb_freebsd2 on 2006/04/19 19:47:13 Disable yacc debug. It's annoying when debugging other stuff. Affected files ... .. //depot/projects/dtrace/src/cddl/lib/libdtrace/Makefile#4 edit Differences ... ==== //depot/projects/dtrace/src/cddl/lib/libdtrace/Makefile#4 (text+ko) ==== @@ -59,7 +59,7 @@ -I${OPENSOLARIS_USR_DISTDIR}/lib/libproc/common \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common -CFLAGS+= -DYYDEBUG +#CFLAGS+= -DYYDEBUG .if ${MACHINE_ARCH} == "i386" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel From owner-p4-projects@FreeBSD.ORG Wed Apr 19 19:49:06 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AE98116A408; Wed, 19 Apr 2006 19:49:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CCE516A404 for ; Wed, 19 Apr 2006 19:49:06 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8E1343D48 for ; Wed, 19 Apr 2006 19:49:05 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JJn5VO076561 for ; Wed, 19 Apr 2006 19:49:05 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JJn5Ln076558 for perforce@freebsd.org; Wed, 19 Apr 2006 19:49:05 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 19:49:05 GMT Message-Id: <200604191949.k3JJn5Ln076558@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95614 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 19:49:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=95614 Change 95614 by jb@jb_freebsd2 on 2006/04/19 19:48:47 Include another compatibility header to allow us to share the dm_info field. We don't do much with it, but it makes the code cleaner in places. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_impl.h#4 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_impl.h#4 (text) ==== @@ -38,6 +38,7 @@ #include #include #include +#include #include #endif #include @@ -115,9 +116,7 @@ struct dt_module *dm_next; /* pointer to next module in hash chain */ const dt_modops_t *dm_ops; /* pointer to data model's ops vector */ Elf *dm_elf; /* libelf handle for module object */ -#if defined(sun) objfs_info_t dm_info; /* object filesystem private info */ -#endif ctf_sect_t dm_symtab; /* symbol table for module */ ctf_sect_t dm_strtab; /* string table for module */ ctf_sect_t dm_ctdata; /* CTF data for module */ From owner-p4-projects@FreeBSD.ORG Wed Apr 19 19:52:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 58F1016A407; Wed, 19 Apr 2006 19:52:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3840116A402 for ; Wed, 19 Apr 2006 19:52:10 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D286843D45 for ; Wed, 19 Apr 2006 19:52:09 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JJq9Eh078323 for ; Wed, 19 Apr 2006 19:52:09 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JJq9w7078317 for perforce@freebsd.org; Wed, 19 Apr 2006 19:52:09 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 19:52:09 GMT Message-Id: <200604191952.k3JJq9w7078317@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95615 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 19:52:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=95615 Change 95615 by jb@jb_freebsd2 on 2006/04/19 19:51:56 Always build in the dtrace device is fasttrap is configured. Note there is an issue with the way I've done the mapping of the Solaris headers. It all worked fine until I found that I couldn't add extra CFLAGS with the path to the Solaris headers in the monolithic kernel build. I'll sort that out later. For now the dtrace and fasttrap devices build nicely as kernel modules which are easier to debug anyway. Affected files ... .. //depot/projects/dtrace/src/sys/conf/files#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/files#5 (text+ko) ==== @@ -92,7 +92,7 @@ cam/scsi/scsi_ses.c optional ses cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ -cddl/dev/dtrace/dtrace.c optional dtrace +cddl/dev/dtrace/dtrace.c optional dtrace | fasttrap cddl/dev/fasttrap/fasttrap.c optional fasttrap coda/coda_fbsd.c optional vcoda coda/coda_namecache.c optional vcoda From owner-p4-projects@FreeBSD.ORG Wed Apr 19 19:58:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 14D3816A407; Wed, 19 Apr 2006 19:58:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E77EB16A405 for ; Wed, 19 Apr 2006 19:58:17 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2A8243D49 for ; Wed, 19 Apr 2006 19:58:17 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JJwHBB083227 for ; Wed, 19 Apr 2006 19:58:17 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JJwHMM083220 for perforce@freebsd.org; Wed, 19 Apr 2006 19:58:17 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 19:58:17 GMT Message-Id: <200604191958.k3JJwHMM083220@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95616 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 19:58:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=95616 Change 95616 by jb@jb_freebsd2 on 2006/04/19 19:58:07 Implement the load initialisation and unload cleanup in separate functions because there are quite a few things to do. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#4 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#1 add Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#4 (text+ko) ==== @@ -50,9 +50,11 @@ #define DTRACE_MINOR 0 -static d_close_t dtrace_close; -static d_ioctl_t dtrace_ioctl; -static d_open_t dtrace_open; +static d_close_t dtrace_close; +static d_ioctl_t dtrace_ioctl; +static d_open_t dtrace_open; +static int dtrace_load(void); +static int dtrace_unload(void); static struct cdevsw dtrace_cdevsw = { .d_version = D_VERSION, @@ -65,11 +67,13 @@ /* For use with make_dev(9)/destroy_dev(9). */ static struct cdev *dtrace_dev; -#include #include +#include +#include #include #include -#include +#include +#include DEV_MODULE(dtrace, dtrace_modevent, NULL); MODULE_VERSION(dtrace, 1); ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#2 (text+ko) ==== @@ -30,12 +30,11 @@ switch (type) { case MOD_LOAD: - dtrace_dev = make_dev(&dtrace_cdevsw, DTRACE_MINOR, - UID_ROOT, GID_WHEEL, 0660, "dtrace"); + error = dtrace_load(); break; case MOD_UNLOAD: - destroy_dev(dtrace_dev); + error = dtrace_unload(); break; case MOD_SHUTDOWN: From owner-p4-projects@FreeBSD.ORG Wed Apr 19 20:09:48 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F10B216A410; Wed, 19 Apr 2006 20:09:47 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B556116A407 for ; Wed, 19 Apr 2006 20:09:47 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E822343D78 for ; Wed, 19 Apr 2006 20:09:35 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JK9ZOe089534 for ; Wed, 19 Apr 2006 20:09:35 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JK9XaU089497 for perforce@freebsd.org; Wed, 19 Apr 2006 20:09:33 GMT (envelope-from imp@freebsd.org) Date: Wed, 19 Apr 2006 20:09:33 GMT Message-Id: <200604192009.k3JK9XaU089497@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95621 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 20:09:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=95621 Change 95621 by imp@imp_harmony on 2006/04/19 20:09:15 IFC @95617 Affected files ... .. //depot/projects/arm/src/sys/amd64/amd64/fpu.c#4 integrate .. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#10 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#6 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#6 integrate .. //depot/projects/arm/src/sys/cam/cam.c#2 integrate .. //depot/projects/arm/src/sys/cam/scsi/scsi_cd.c#4 integrate .. //depot/projects/arm/src/sys/cam/scsi/scsi_da.c#9 integrate .. //depot/projects/arm/src/sys/conf/NOTES#19 integrate .. //depot/projects/arm/src/sys/conf/files#26 integrate .. //depot/projects/arm/src/sys/conf/options#18 integrate .. //depot/projects/arm/src/sys/contrib/ipfilter/netinet/fil.c#5 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_dock.c#2 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-queue.c#12 integrate .. //depot/projects/arm/src/sys/dev/ath/if_ath.c#10 integrate .. //depot/projects/arm/src/sys/dev/drm/drmP.h#4 integrate .. //depot/projects/arm/src/sys/dev/hwpmc/hwpmc_mod.c#9 integrate .. //depot/projects/arm/src/sys/dev/iicbus/iicbus.c#3 integrate .. //depot/projects/arm/src/sys/dev/ispfw/asm_2300.h#2 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#11 integrate .. //depot/projects/arm/src/sys/dev/pccbb/pccbb.c#8 integrate .. //depot/projects/arm/src/sys/dev/random/randomdev_soft.c#4 integrate .. //depot/projects/arm/src/sys/geom/eli/g_eli.c#8 integrate .. //depot/projects/arm/src/sys/geom/raid3/g_raid3.c#15 integrate .. //depot/projects/arm/src/sys/i386/isa/npx.c#6 integrate .. //depot/projects/arm/src/sys/kern/kern_clock.c#6 integrate .. //depot/projects/arm/src/sys/kern/kern_intr.c#4 integrate .. //depot/projects/arm/src/sys/kern/kern_module.c#3 integrate .. //depot/projects/arm/src/sys/kern/kern_poll.c#4 integrate .. //depot/projects/arm/src/sys/kern/kern_rwlock.c#3 integrate .. //depot/projects/arm/src/sys/kern/kern_synch.c#9 integrate .. //depot/projects/arm/src/sys/kern/kern_thr.c#6 integrate .. //depot/projects/arm/src/sys/kern/kern_umtx.c#5 integrate .. //depot/projects/arm/src/sys/kern/sched_4bsd.c#3 integrate .. //depot/projects/arm/src/sys/kern/subr_sleepqueue.c#9 integrate .. //depot/projects/arm/src/sys/kern/subr_taskqueue.c#6 integrate .. //depot/projects/arm/src/sys/kern/subr_turnstile.c#5 integrate .. //depot/projects/arm/src/sys/kern/uipc_mqueue.c#6 integrate .. //depot/projects/arm/src/sys/kern/vfs_cache.c#4 integrate .. //depot/projects/arm/src/sys/kern/vfs_hash.c#4 integrate .. //depot/projects/arm/src/sys/netinet/ip_fastfwd.c#6 integrate .. //depot/projects/arm/src/sys/sparc64/conf/NOTES#6 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/exception.S#6 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/interrupt.S#3 integrate .. //depot/projects/arm/src/sys/sys/lock.h#7 integrate .. //depot/projects/arm/src/sys/sys/module.h#2 integrate .. //depot/projects/arm/src/sys/sys/turnstile.h#3 integrate .. //depot/projects/arm/src/sys/sys/vnode.h#11 integrate .. //depot/projects/arm/src/sys/ufs/ffs/ffs_softdep.c#10 integrate .. //depot/projects/arm/src/sys/vm/vm_zeroidle.c#4 integrate Differences ... ==== //depot/projects/arm/src/sys/amd64/amd64/fpu.c#4 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.157 2005/03/11 22:16:09 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.158 2006/04/19 07:00:19 cperciva Exp $"); #include #include @@ -96,6 +96,8 @@ typedef u_char bool_t; +static void fpu_clean_state(void); + int hw_float = 1; SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, &hw_float, 0, @@ -407,6 +409,8 @@ PCPU_SET(fpcurthread, curthread); pcb = PCPU_GET(curpcb); + fpu_clean_state(); + if ((pcb->pcb_flags & PCB_FPUINITDONE) == 0) { /* * This is the first time this thread has used the FPU, @@ -474,6 +478,7 @@ s = intr_disable(); if (td == PCPU_GET(fpcurthread)) { + fpu_clean_state(); fxrstor(addr); intr_restore(s); } else { @@ -484,6 +489,37 @@ } /* + * On AuthenticAMD processors, the fxrstor instruction does not restore + * the x87's stored last instruction pointer, last data pointer, and last + * opcode values, except in the rare case in which the exception summary + * (ES) bit in the x87 status word is set to 1. + * + * In order to avoid leaking this information across processes, we clean + * these values by performing a dummy load before executing fxrstor(). + */ +static double dummy_variable = 0.0; +static void +fpu_clean_state(void) +{ + u_short status; + + /* + * Clear the ES bit in the x87 status word if it is currently + * set, in order to avoid causing a fault in the upcoming load. + */ + fnstsw(&status); + if (status & 0x80) + fnclex(); + + /* + * Load the dummy variable into the x87 stack. This mangles + * the x87 stack, but we don't care since we're about to call + * fxrstor() anyway. + */ + __asm __volatile("ffree %%st(7); fld %0" : : "m" (dummy_variable)); +} + +/* * This really sucks. We want the acpi version only, but it requires * the isa_if.h file in order to get the definitions. */ ==== //depot/projects/arm/src/sys/amd64/amd64/pmap.c#10 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.545 2006/04/13 03:31:48 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.547 2006/04/18 20:17:32 peter Exp $"); /* * Manages physical address maps. @@ -1547,7 +1547,7 @@ PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); - PV_STAT(pv_entry_count--); + pv_entry_count--; pc = pv_to_chunk(pv); idx = pv - &pc->pc_pventry[0]; field = idx / 64; @@ -1588,7 +1588,7 @@ PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); - PV_STAT(pv_entry_count++); + pv_entry_count++; if (pv_entry_count > pv_entry_high_water) pagedaemon_wakeup(); pc = TAILQ_FIRST(&pmap->pm_pvchunk); @@ -1616,6 +1616,7 @@ m = vm_page_alloc(NULL, colour, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ); if (m == NULL) { if (try) { + pv_entry_count--; PV_STAT(pc_chunk_tryfail++); return (NULL); } @@ -2777,7 +2778,7 @@ /* Mark free */ PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); - PV_STAT(pv_entry_count--); + pv_entry_count--; pc->pc_map[field] |= bitmask; m->md.pv_list_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#6 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.2 2006/04/13 17:44:05 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.3 2006/04/19 17:16:48 imp Exp $ P=boot0 FILES=${P} ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#6 (text) ==== @@ -21,7 +21,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/boot/arm/at91/boot0/main.c,v 1.2 2006/04/13 17:31:02 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $ */ #include "at91rm9200.h" ==== //depot/projects/arm/src/sys/cam/cam.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam.c,v 1.9 2005/01/05 22:34:34 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam.c,v 1.10 2006/04/18 21:53:39 mjacob Exp $"); #include #ifdef _KERNEL @@ -373,7 +373,16 @@ { uint32_t size_mb, secs_per_cylinder; - size_mb = ccg->volume_size / ((1024L * 1024L) / ccg->block_size); + if (ccg->block_size == 0) { + ccg->ccb_h.status = CAM_REQ_CMP_ERR; + return; + } + size_mb = (1024L * 1024L) / ccg->block_size; + if (size_mb == 0) { + ccg->ccb_h.status = CAM_REQ_CMP_ERR; + return; + } + size_mb = ccg->volume_size / size_mb; if (size_mb > 1024 && extended) { ccg->heads = 255; ccg->secs_per_track = 63; @@ -382,6 +391,10 @@ ccg->secs_per_track = 32; } secs_per_cylinder = ccg->heads * ccg->secs_per_track; + if (secs_per_cylinder == 0) { + ccg->ccb_h.status = CAM_REQ_CMP_ERR; + return; + } ccg->cylinders = ccg->volume_size / secs_per_cylinder; ccg->ccb_h.status = CAM_REQ_CMP; } ==== //depot/projects/arm/src/sys/cam/scsi/scsi_cd.c#4 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.94 2005/11/18 02:43:49 jdp Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.95 2006/04/17 09:12:53 maxim Exp $"); #include "opt_cd.h" @@ -1669,7 +1669,7 @@ if (softc->flags & CD_FLAG_CHANGER) cdchangerschedule(softc); - biofinish(bp, softc->disk->d_devstat, 0); + biofinish(bp, NULL, 0); break; } case CD_CCB_PROBE: ==== //depot/projects/arm/src/sys/cam/scsi/scsi_da.c#9 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.189 2006/03/18 21:13:14 joerg Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.190 2006/04/18 22:01:59 mjacob Exp $"); #include @@ -1865,9 +1865,23 @@ ccg.secs_per_track = 0; ccg.cylinders = 0; xpt_action((union ccb*)&ccg); - dp->heads = ccg.heads; - dp->secs_per_track = ccg.secs_per_track; - dp->cylinders = ccg.cylinders; + if ((ccg.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + /* + * We don't know what went wrong here- but just pick + * a geometry so we don't have nasty things like divide + * by zero. + */ + dp->heads = 255; + dp->secs_per_track = 255; + dp->cylinders = dp->sectors / (255 * 255); + if (dp->cylinders == 0) { + dp->cylinders = 1; + } + } else { + dp->heads = ccg.heads; + dp->secs_per_track = ccg.secs_per_track; + dp->cylinders = ccg.cylinders; + } } static void ==== //depot/projects/arm/src/sys/conf/NOTES#19 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1356 2006/03/30 18:39:24 marcel Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1358 2006/04/18 22:43:46 mjacob Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -1363,6 +1363,7 @@ # ISP 12160 Ultra3 SCSI, # Qlogic ISP 2100 and ISP 2200 1Gb Fibre Channel host adapters. # Qlogic ISP 2300 and ISP 2312 2Gb Fibre Channel host adapters. +# Qlogic ISP 2322 and ISP 6322 2Gb Fibre Channel host adapters. # ispfw: Firmware module for Qlogic host adapters # mpt: LSI-Logic MPT/Fusion 53c1020 or 53c1030 Ultra4 # or FC9x9 Fibre Channel host adapters. @@ -1463,6 +1464,10 @@ # ISP_TARGET_MODE - enable target mode operation # options ISP_TARGET_MODE=1 +# +# ISP_DEFAULT_ROLES - default role (none, target, init, both) +# +options ISP_DEFAULT_ROLES=3 # Options used in dev/sym/ (Symbios SCSI driver). #options SYM_SETUP_LP_PROBE_MAP #-Low Priority Probe Map (bits) ==== //depot/projects/arm/src/sys/conf/files#26 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1109 2006/04/15 12:31:31 iwasaki Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1110 2006/04/19 19:38:35 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -822,7 +822,6 @@ dev/rp/rp.c optional rp dev/rp/rp_isa.c optional rp isa dev/rp/rp_pci.c optional rp pci -dev/sab/sab.c optional sab ebus dev/safe/safe.c optional safe dev/sbsh/if_sbsh.c optional sbsh dev/scc/scc_if.m optional scc ==== //depot/projects/arm/src/sys/conf/options#18 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.534 2006/04/10 20:04:21 ps Exp $ +# $FreeBSD: src/sys/conf/options,v 1.535 2006/04/18 22:24:55 mjacob Exp $ # # On the handling of kernel options # @@ -315,6 +315,7 @@ # Options used only in dev/isp/* ISP_TARGET_MODE opt_isp.h ISP_FW_CRASH_DUMP opt_isp.h +ISP_DEFAULT_ROLES opt_isp.h # Options used in the 'ata' ATA/ATAPI driver ATA_STATIC_ID opt_ata.h ==== //depot/projects/arm/src/sys/contrib/ipfilter/netinet/fil.c#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.48 2005/12/30 11:32:22 guido Exp $ */ +/* $FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.49 2006/04/18 13:24:14 darrenr Exp $ */ /* * Copyright (C) 1993-2003 by Darren Reed. @@ -141,7 +141,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed"; -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.48 2005/12/30 11:32:22 guido Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.49 2006/04/18 13:24:14 darrenr Exp $"; /* static const char rcsid[] = "@(#)Id: fil.c,v 2.243.2.57 2005/03/28 10:47:50 darrenr Exp"; */ #endif @@ -6286,7 +6286,7 @@ int error; fr_getstat(&fio); - error = copyoutptr(&fio, data, sizeof(fio)); + error = fr_outobj(data, &fio, IPFOBJ_IPFSTAT); if (error) return EFAULT; ==== //depot/projects/arm/src/sys/dev/acpica/acpi_dock.c#2 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_dock.c,v 1.1 2006/04/15 12:31:32 iwasaki Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_dock.c,v 1.2 2006/04/16 15:35:12 maxim Exp $ */ #include "opt_acpi.h" @@ -36,7 +36,7 @@ #include #include -#include "acpi.h" +#include #include #include ==== //depot/projects/arm/src/sys/dev/ata/ata-queue.c#12 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.63 2006/03/31 08:09:05 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.64 2006/04/17 10:47:01 sos Exp $"); #include "opt_ata.h" #include @@ -270,7 +270,7 @@ return; } if (request->flags & ATA_R_DANGER1) - request->flags |= ATA_R_DANGER2 + request->flags |= ATA_R_DANGER2; ATA_DEBUG_RQ(request, "completed entered"); ==== //depot/projects/arm/src/sys/dev/ath/if_ath.c#10 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.138 2006/04/03 18:14:02 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.140 2006/04/16 18:24:27 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -1929,7 +1929,7 @@ const HAL_RATE_TABLE *rt; u_int8_t rix, rate; - DPRINTF(sc, ATH_DEBUG_BEACON, "%s: m %p len %u\n", + DPRINTF(sc, ATH_DEBUG_BEACON_PROC, "%s: m %p len %u\n", __func__, m, m->m_len); /* setup descriptors */ @@ -2021,7 +2021,7 @@ */ if (ath_hal_numtxpending(ah, sc->sc_bhalq) != 0) { sc->sc_bmisscount++; - DPRINTF(sc, ATH_DEBUG_BEACON_PROC, + DPRINTF(sc, ATH_DEBUG_BEACON, "%s: missed %u consecutive beacons\n", __func__, sc->sc_bmisscount); if (sc->sc_bmisscount > 3) /* NB: 3 is a guess */ @@ -2042,7 +2042,7 @@ * of the TIM bitmap). */ m = bf->bf_m; - ncabq = ath_hal_numtxpending(ah, sc->sc_cabq->axq_qnum); + ncabq = sc->sc_cabq->axq_depth; if (ieee80211_beacon_update(ic, bf->bf_node, &sc->sc_boff, m, ncabq)) { /* XXX too conservative? */ bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); @@ -2102,7 +2102,7 @@ * Enable the CAB queue before the beacon queue to * insure cab frames are triggered by this beacon. */ - if (ncabq != 0 && (sc->sc_boff.bo_tim[4] & 1)) /* NB: only at DTIM */ + if (sc->sc_boff.bo_tim[4] & 1) /* NB: only at DTIM */ ath_hal_txstart(ah, sc->sc_cabq->axq_qnum); ath_hal_puttxbuf(ah, sc->sc_bhalq, bf->bf_daddr); ath_hal_txstart(ah, sc->sc_bhalq); @@ -3981,9 +3981,12 @@ ATH_TXQ_REMOVE_HEAD(txq, bf_list); ATH_TXQ_UNLOCK(txq); #ifdef ATH_DEBUG - if (sc->sc_debug & ATH_DEBUG_RESET) + if (sc->sc_debug & ATH_DEBUG_RESET) { ath_printtxbuf(bf, txq->axq_qnum, ix, ath_hal_txprocdesc(ah, bf->bf_desc) == HAL_OK); + ieee80211_dump_pkt(mtod(bf->bf_m, caddr_t), + bf->bf_m->m_len, 0, -1); + } #endif /* ATH_DEBUG */ bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); m_freem(bf->bf_m); @@ -4007,11 +4010,11 @@ { struct ath_hal *ah = sc->sc_ah; - (void) ath_hal_stoptxdma(ah, txq->axq_qnum); DPRINTF(sc, ATH_DEBUG_RESET, "%s: tx queue [%u] %p, link %p\n", __func__, txq->axq_qnum, (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, txq->axq_qnum), txq->axq_link); + (void) ath_hal_stoptxdma(ah, txq->axq_qnum); } /* @@ -4027,10 +4030,11 @@ /* XXX return value */ if (!sc->sc_invalid) { /* don't touch the hardware if marked invalid */ + DPRINTF(sc, ATH_DEBUG_RESET, "%s: tx queue [%u] %p, link %p\n", + __func__, sc->sc_bhalq, + (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, sc->sc_bhalq), + NULL); (void) ath_hal_stoptxdma(ah, sc->sc_bhalq); - DPRINTF(sc, ATH_DEBUG_RESET, - "%s: beacon queue %p\n", __func__, - (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, sc->sc_bhalq)); for (i = 0; i < HAL_NUM_TX_QUEUES; i++) if (ATH_TXQ_SETUP(sc, i)) ath_tx_stopdma(sc, &sc->sc_txq[i]); @@ -4038,6 +4042,17 @@ for (i = 0; i < HAL_NUM_TX_QUEUES; i++) if (ATH_TXQ_SETUP(sc, i)) ath_tx_draintxq(sc, &sc->sc_txq[i]); +#ifdef ATH_DEBUG + if (sc->sc_debug & ATH_DEBUG_RESET) { + struct ath_buf *bf = STAILQ_FIRST(&sc->sc_bbuf); + if (bf != NULL && bf->bf_m != NULL) { + ath_printtxbuf(bf, sc->sc_bhalq, 0, + ath_hal_txprocdesc(ah, bf->bf_desc) == HAL_OK); + ieee80211_dump_pkt(mtod(bf->bf_m, caddr_t), + bf->bf_m->m_len, 0, -1); + } + } +#endif /* ATH_DEBUG */ ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->sc_tx_timer = 0; } ==== //depot/projects/arm/src/sys/dev/drm/drmP.h#4 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/drm/drmP.h,v 1.15 2005/11/28 23:13:52 anholt Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/drm/drmP.h,v 1.16 2006/04/18 06:14:43 anholt Exp $"); #ifndef _DRM_P_H_ #define _DRM_P_H_ @@ -220,8 +220,8 @@ enum { DRM_IS_NOT_AGP, - DRM_MIGHT_BE_AGP, - DRM_IS_AGP + DRM_IS_AGP, + DRM_MIGHT_BE_AGP }; #define DRM_AGP_MEM struct agp_memory_info ==== //depot/projects/arm/src/sys/dev/hwpmc/hwpmc_mod.c#9 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_mod.c,v 1.23 2006/04/11 01:15:26 jkoshy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_mod.c,v 1.24 2006/04/17 18:20:37 jhb Exp $"); #include #include @@ -646,15 +646,8 @@ static void pmc_force_context_switch(void) { - u_char curpri; - mtx_lock_spin(&sched_lock); - curpri = curthread->td_priority; - mtx_unlock_spin(&sched_lock); - - (void) tsleep((void *) pmc_force_context_switch, curpri, - "pmcctx", 1); - + (void) tsleep((void *) pmc_force_context_switch, 0, "pmcctx", 1); } /* ==== //depot/projects/arm/src/sys/dev/iicbus/iicbus.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/iicbus/iicbus.c,v 1.20 2004/05/27 13:29:09 joerg Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/iicbus/iicbus.c,v 1.21 2006/04/17 22:33:42 jmg Exp $"); /* * Autoconfiguration and support routines for the Philips serial I2C bus @@ -189,8 +189,6 @@ } DRIVER_MODULE(iicbus, at91_twi, iicbus_driver, iicbus_devclass, 0, 0); -DRIVER_MODULE(iicbus, pcf, iicbus_driver, iicbus_devclass, 0, 0); DRIVER_MODULE(iicbus, envctrl, iicbus_driver, iicbus_devclass, 0, 0); DRIVER_MODULE(iicbus, iicbb, iicbus_driver, iicbus_devclass, 0, 0); -DRIVER_MODULE(iicbus, bti2c, iicbus_driver, iicbus_devclass, 0, 0); MODULE_VERSION(iicbus, IICBUS_MODVER); ==== //depot/projects/arm/src/sys/dev/ispfw/asm_2300.h#2 (text+ko) ==== @@ -1,6 +1,6 @@ -/* $FreeBSD: src/sys/dev/ispfw/asm_2300.h,v 1.8 2005/01/29 01:12:37 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/ispfw/asm_2300.h,v 1.9 2006/04/18 21:55:30 mjacob Exp $ */ /*- - * Copyright (C) 2001, 2002, 2003 by Qlogic, Inc. + * Copyright (C) 2001, 2002, 2003, 2004, 2005 by Qlogic, Inc. * All rights reserved. * * Redistribution and use in source and binary forms are permitted provided @@ -27,21 +27,22 @@ /************************************************************************ * * - * --- ISP2300 Initiator/Target Firmware --- * + * --- ISP2300 Initiator/Target Firmware --- * * with Fabric support (Public Loop) and * - * with expanded LUN addressing. * + * with expanded LUN addressing. * + * * * * ************************************************************************/ /* - * Firmware Version 3.03.06 (18:09 Oct 04, 2004) + * Firmware Version 3.03.19 (09:40 Nov 30, 2005) */ static const u_int16_t isp_2300_risc_code[] = { - 0x0470, 0x0000, 0x0000, 0xc058, 0x0000, 0x0003, 0x0003, 0x0006, + 0x0470, 0x0000, 0x0000, 0xc646, 0x0000, 0x0003, 0x0003, 0x0013, 0x0007, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972, 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, - 0x332e, 0x3033, 0x2e30, 0x3620, 0x2020, 0x2020, 0x2400, 0x20a9, + 0x332e, 0x3033, 0x2e31, 0x3920, 0x2020, 0x2020, 0x2400, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000, @@ -50,837 +51,842 @@ 0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001, 0x0000, 0x20c1, 0x0004, 0x20c9, 0x14ff, 0x2059, 0x0000, 0x2b78, - 0x7883, 0x0004, 0x2089, 0x26a6, 0x2051, 0x1100, 0x2a70, 0x20e1, - 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e45, 0x2029, + 0x7883, 0x0004, 0x2089, 0x2702, 0x2051, 0x1100, 0x2a70, 0x20e1, + 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e57, 0x2029, 0x2e00, 0x2031, 0xffff, 0x2039, 0x2dc8, 0x2021, 0x0200, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x05c0, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8, 0x4104, 0x8001, 0x1de0, 0x756a, 0x766e, 0x7766, 0x7472, 0x7476, - 0x00e6, 0x2071, 0x13ff, 0x2472, 0x00ee, 0x20a1, 0x15c8, 0x716c, + 0x00e6, 0x2071, 0x13f9, 0x2472, 0x00ee, 0x20a1, 0x15c8, 0x716c, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001, 0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x716c, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009, 0x1100, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e, - 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x567d, 0x080c, - 0x928c, 0x080c, 0x0fe4, 0x080c, 0x11c7, 0x080c, 0x1840, 0x080c, - 0x0d5d, 0x080c, 0x0f55, 0x080c, 0x2d19, 0x080c, 0x6ba7, 0x080c, - 0x5e69, 0x080c, 0x7739, 0x080c, 0x1ea4, 0x080c, 0x79eb, 0x080c, - 0x7196, 0x080c, 0x1ce1, 0x080c, 0x1e15, 0x080c, 0x1e99, 0x2091, + 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x57ad, 0x080c, + 0x9610, 0x080c, 0x0ff6, 0x080c, 0x11d9, 0x080c, 0x186d, 0x080c, + 0x0d5d, 0x080c, 0x0f67, 0x080c, 0x2d98, 0x080c, 0x6e26, 0x080c, + 0x6051, 0x080c, 0x7a42, 0x080c, 0x1edd, 0x080c, 0x7d1c, 0x080c, + 0x7471, 0x080c, 0x1d12, 0x080c, 0x1e46, 0x080c, 0x1ed2, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091b, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833, 0x0010, 0x0e04, 0x090f, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, - 0xd084, 0x190c, 0x10b2, 0x2a70, 0x7003, 0x0000, 0x2a70, 0x7000, - 0x908e, 0x0003, 0x1168, 0x080c, 0x4399, 0x080c, 0x2d30, 0x080c, - 0x6c08, 0x080c, 0x6355, 0x080c, 0x775e, 0x080c, 0x2610, 0x0c70, + 0xd084, 0x190c, 0x10c4, 0x2a70, 0x7003, 0x0000, 0x2a70, 0x7000, + 0x908e, 0x0003, 0x1168, 0x080c, 0x449a, 0x080c, 0x2daf, 0x080c, + 0x6e87, 0x080c, 0x6591, 0x080c, 0x7a6a, 0x080c, 0x264c, 0x0c70, 0x000b, 0x0c88, 0x093c, 0x093d, 0x0add, 0x093a, 0x0ba2, 0x0d5c, 0x0d5c, 0x0d5c, 0x080c, 0x0dc9, 0x0005, 0x0126, 0x00f6, 0x2091, - 0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab2, 0x080c, 0x4d3e, - 0x1130, 0x0026, 0x2011, 0x0080, 0x080c, 0x0ed3, 0x002e, 0x080c, - 0x68b8, 0x0150, 0x080c, 0x68db, 0x15a0, 0x2079, 0x0100, 0x7828, - 0x9085, 0x1800, 0x782a, 0x0468, 0x080c, 0x67ea, 0x7000, 0x9086, - 0x0001, 0x1904, 0x0ab2, 0x7094, 0x9086, 0x0028, 0x1904, 0x0ab2, - 0x080c, 0x7722, 0x080c, 0x7714, 0x2001, 0x0161, 0x2003, 0x0001, + 0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab2, 0x080c, 0x4e65, + 0x1130, 0x0026, 0x2011, 0x0080, 0x080c, 0x0ee5, 0x002e, 0x080c, + 0x6b1f, 0x0150, 0x080c, 0x6b42, 0x15a0, 0x2079, 0x0100, 0x7828, + 0x9085, 0x1800, 0x782a, 0x0468, 0x080c, 0x6a4b, 0x7000, 0x9086, + 0x0001, 0x1904, 0x0ab2, 0x7094, 0x9086, 0x0029, 0x1904, 0x0ab2, + 0x080c, 0x7a2b, 0x080c, 0x7a1d, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827, 0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, - 0x2011, 0x674e, 0x080c, 0x77f8, 0x2011, 0x6741, 0x080c, 0x78bc, - 0x2011, 0x54d8, 0x080c, 0x77f8, 0x2011, 0x8030, 0x901e, 0x7392, - 0x04d0, 0x080c, 0x4d85, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904, - 0x0ab2, 0x2011, 0x54d8, 0x080c, 0x77f8, 0x2011, 0x674e, 0x080c, - 0x77f8, 0x2011, 0x6741, 0x080c, 0x78bc, 0x2001, 0x0265, 0x2001, + 0x2011, 0x69af, 0x080c, 0x7b29, 0x2011, 0x69a2, 0x080c, 0x7bed, + 0x2011, 0x5608, 0x080c, 0x7b29, 0x2011, 0x8030, 0x901e, 0x7392, + 0x04d0, 0x080c, 0x4eb5, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904, + 0x0ab2, 0x2011, 0x5608, 0x080c, 0x7b29, 0x2011, 0x69af, 0x080c, + 0x7b29, 0x2011, 0x69a2, 0x080c, 0x7bed, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, 0x2001, - 0x12ea, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, - 0x5625, 0x00ce, 0x0804, 0x0ab2, 0x780f, 0x006b, 0x7a28, 0x080c, - 0x68c0, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a, - 0x2011, 0x8010, 0x73d4, 0x2001, 0x12eb, 0x2003, 0x0001, 0x080c, - 0x24d5, 0x080c, 0x431a, 0x7244, 0xc284, 0x7246, 0x2001, 0x110c, - 0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0x8d5d, 0x2011, 0x0004, - 0x080c, 0xaada, 0x080c, 0x5d52, 0x080c, 0x68b8, 0x1120, 0x080c, - 0x2519, 0x02e0, 0x0400, 0x080c, 0x562c, 0x0140, 0x7093, 0x0001, - 0x70cf, 0x0000, 0x080c, 0x4f52, 0x0804, 0x0ab2, 0x080c, 0x4d2f, + 0x12dd, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, + 0x5755, 0x00ce, 0x0804, 0x0ab2, 0x780f, 0x006b, 0x7a28, 0x080c, + 0x6b27, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a, + 0x2011, 0x8010, 0x73d4, 0x2001, 0x12de, 0x2003, 0x0001, 0x080c, + 0x24f1, 0x080c, 0x441b, 0x7244, 0xc284, 0x7246, 0x2001, 0x110c, + 0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0x90ee, 0x2011, 0x0004, + 0x080c, 0xafb5, 0x080c, 0x5e85, 0x080c, 0x6b1f, 0x1120, 0x080c, + 0x2535, 0x02e0, 0x0400, 0x080c, 0x575c, 0x0140, 0x7093, 0x0001, + 0x70cf, 0x0000, 0x080c, 0x5082, 0x0804, 0x0ab2, 0x080c, 0x4e56, 0xd094, 0x0188, 0x2011, 0x110c, 0x2204, 0xc0cd, 0x2012, 0x080c, - 0x4d33, 0xd0d4, 0x1118, 0x080c, 0x2519, 0x1270, 0x2011, 0x110c, - 0x2204, 0xc0bc, 0x00a8, 0x080c, 0x4d33, 0xd0d4, 0x1db8, 0x2011, + 0x4e5a, 0xd0d4, 0x1118, 0x080c, 0x2535, 0x1270, 0x2011, 0x110c, + 0x2204, 0xc0bc, 0x00a8, 0x080c, 0x4e5a, 0xd0d4, 0x1db8, 0x2011, 0x110c, 0x2204, 0xc0bd, 0x0060, 0x2011, 0x110c, 0x2204, 0xc0bd, - 0x2012, 0x080c, 0x5e3d, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd, - 0x2012, 0x080c, 0x5e05, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, - 0x707b, 0x0000, 0x080c, 0x68b8, 0x1130, 0x70ac, 0x9005, 0x1168, - 0x080c, 0xae0a, 0x0050, 0x080c, 0xae0a, 0x70d8, 0xd09c, 0x1128, - 0x70ac, 0x9005, 0x0110, 0x080c, 0x5602, 0x70e3, 0x0000, 0x70df, - 0x0000, 0x70a3, 0x0000, 0x080c, 0x2521, 0x0228, 0x2011, 0x0101, - 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x68b8, 0x1178, 0x9016, - 0x0016, 0x080c, 0x22d2, 0x2019, 0x12a1, 0x211a, 0x001e, 0x705b, - 0xffff, 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019, 0x12a1, + 0x2012, 0x080c, 0x5f70, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd, + 0x2012, 0x080c, 0x5f38, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, + 0x707b, 0x0000, 0x080c, 0x6b1f, 0x1130, 0x70ac, 0x9005, 0x1168, + 0x080c, 0xb2e7, 0x0050, 0x080c, 0xb2e7, 0x70d8, 0xd09c, 0x1128, + 0x70ac, 0x9005, 0x0110, 0x080c, 0x5732, 0x70e3, 0x0000, 0x70df, + 0x0000, 0x70a3, 0x0000, 0x080c, 0x253d, 0x0228, 0x2011, 0x0101, + 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x6b1f, 0x1178, 0x9016, + 0x0016, 0x080c, 0x22fa, 0x2019, 0x1293, 0x211a, 0x001e, 0x705b, + 0xffff, 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019, 0x1293, 0x201b, 0x0000, 0x2079, 0x115b, 0x7804, 0xd0ac, 0x0108, 0xc295, - 0x72da, 0x080c, 0x68b8, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011, - 0x0001, 0x080c, 0xaada, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, + 0x72da, 0x080c, 0x6b1f, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011, + 0x0001, 0x080c, 0xafb5, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, - 0x782a, 0x00fe, 0x080c, 0x2913, 0x2011, 0x0005, 0x080c, 0x8e68, - 0x080c, 0x807c, 0x080c, 0x68b8, 0x0148, 0x00c6, 0x2061, 0x0100, - 0x0016, 0x080c, 0x22d2, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, + 0x782a, 0x00fe, 0x080c, 0x296f, 0x2011, 0x0005, 0x080c, 0x91f9, + 0x080c, 0x83b3, 0x080c, 0x6b1f, 0x0148, 0x00c6, 0x2061, 0x0100, + 0x0016, 0x080c, 0x22fa, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe, - 0x2011, 0x0005, 0x080c, 0x8e68, 0x080c, 0x807c, 0x080c, 0x68b8, - 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x22d2, 0x61e2, - 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x080c, 0x68b8, - 0x1118, 0x20a9, 0x0100, 0x0010, 0x20a9, 0x0082, 0x080c, 0x68b8, + 0x2011, 0x0005, 0x080c, 0x91f9, 0x080c, 0x83b3, 0x080c, 0x6b1f, + 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x22fa, 0x61e2, + 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x080c, 0x6b1f, + 0x1118, 0x20a9, 0x0100, 0x0010, 0x20a9, 0x0082, 0x080c, 0x6b1f, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138, 0x9180, - 0x1000, 0x2004, 0x9065, 0x0110, 0x6000, 0xd0bc, 0x090c, 0x2bdb, + 0x1000, 0x2004, 0x9065, 0x0110, 0x6000, 0xd0bc, 0x090c, 0x2c5a, 0x8108, 0x1f04, 0x0ac5, 0x707b, 0x0000, 0x707c, 0x9084, 0x00ff, 0x707e, 0x70af, 0x0000, 0x00ce, 0x0005, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904, 0x0ba0, 0x70a8, 0x9086, 0xffff, - 0x0130, 0x080c, 0x2913, 0x080c, 0x807c, 0x0804, 0x0ba0, 0x70d8, + 0x0130, 0x080c, 0x296f, 0x080c, 0x83b3, 0x0804, 0x0ba0, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0558, 0xd084, 0x0548, 0x0006, 0x2001, - 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c, 0x0508, 0x080c, 0x2c12, - 0x11d0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, 0x2a65, 0x080c, - 0x807c, 0x70d8, 0xd094, 0x1904, 0x0ba0, 0x2011, 0x0001, 0x080c, - 0xb076, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2a9a, 0x080c, - 0x807c, 0x0804, 0x0ba0, 0x70e0, 0x9005, 0x1904, 0x0ba0, 0x70a4, + 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c, 0x0508, 0x080c, 0x2c91, + 0x11d0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, 0x2ae4, 0x080c, + 0x83b3, 0x70d8, 0xd094, 0x1904, 0x0ba0, 0x2011, 0x0001, 0x080c, + 0xb55c, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2b19, 0x080c, + 0x83b3, 0x0804, 0x0ba0, 0x70e0, 0x9005, 0x1904, 0x0ba0, 0x70a4, 0x9005, 0x1904, 0x0ba0, 0x70d8, 0xd0a4, 0x0118, 0xd0b4, 0x0904, - 0x0ba0, 0x080c, 0x5e05, 0x1904, 0x0ba0, 0x080c, 0x5e56, 0x1904, - 0x0ba0, 0x080c, 0x5e3d, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, - 0x900e, 0x0016, 0x080c, 0x5b9a, 0x1118, 0x6000, 0xd0ec, 0x1138, + 0x0ba0, 0x080c, 0x5f38, 0x1904, 0x0ba0, 0x080c, 0x5f89, 0x1904, + 0x0ba0, 0x080c, 0x5f70, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, + 0x900e, 0x0016, 0x080c, 0x5ccd, 0x1118, 0x6000, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b39, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0ba0, 0x0006, 0x2001, 0x0103, 0x2003, - 0x006b, 0x000e, 0x2011, 0x12f7, 0x080c, 0x0f2b, 0x2011, 0x1311, - 0x080c, 0x0f2b, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x70ab, - 0xffff, 0x080c, 0x4d3e, 0x1130, 0x0026, 0x2011, 0x0040, 0x080c, - 0x0ed3, 0x002e, 0x9006, 0x080c, 0x2186, 0x080c, 0x2c12, 0x0118, - 0x080c, 0x441f, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021, - 0x0006, 0x080c, 0x4439, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100, - 0x080c, 0x68db, 0x0150, 0x080c, 0x68b8, 0x7828, 0x0118, 0x9084, - 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x2001, 0x132c, - 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000, 0x080c, 0x8e68, - 0x2011, 0x0000, 0x080c, 0x8e72, 0x080c, 0x807c, 0x080c, 0x8152, + 0x006b, 0x000e, 0x2011, 0x12ea, 0x080c, 0x0f3d, 0x2011, 0x1304, + 0x080c, 0x0f3d, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x70ab, + 0xffff, 0x080c, 0x4e65, 0x1130, 0x0026, 0x2011, 0x0040, 0x080c, + 0x0ee5, 0x002e, 0x9006, 0x080c, 0x21ae, 0x080c, 0x2c91, 0x0118, + 0x080c, 0x4520, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021, + 0x0006, 0x080c, 0x453a, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100, + 0x080c, 0x6b42, 0x0150, 0x080c, 0x6b1f, 0x7828, 0x0118, 0x9084, + 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x2001, 0x131f, + 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000, 0x080c, 0x91f9, + 0x2011, 0x0000, 0x080c, 0x9203, 0x080c, 0x83b3, 0x080c, 0x8489, 0x012e, 0x0005, 0x0016, 0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, - 0x080c, 0x55eb, 0x7940, 0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, + 0x080c, 0x571b, 0x7940, 0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, - 0x0036, 0x0156, 0x7954, 0xd1ac, 0x1904, 0x0c2f, 0x2001, 0x12eb, - 0x2004, 0x9005, 0x1518, 0x080c, 0x259c, 0x1148, 0x2001, 0x0001, - 0x080c, 0x2504, 0x2001, 0x0001, 0x080c, 0x24e7, 0x00b8, 0x080c, - 0x25a4, 0x1138, 0x9006, 0x080c, 0x2504, 0x9006, 0x080c, 0x24e7, - 0x0068, 0x080c, 0x25ac, 0x1d50, 0x2001, 0x12dc, 0x2004, 0xd0fc, - 0x0108, 0x0020, 0x080c, 0x22fe, 0x0804, 0x0d0e, 0x080c, 0x68c9, - 0x0148, 0x080c, 0x68db, 0x1118, 0x080c, 0x6ba2, 0x0050, 0x080c, - 0x68c0, 0x0dd0, 0x080c, 0x6b9d, 0x080c, 0x6b93, 0x080c, 0x67ea, - 0x0058, 0x080c, 0x68b8, 0x0140, 0x2009, 0x00f8, 0x080c, 0x55eb, + 0x0036, 0x0156, 0x7954, 0xd1ac, 0x1904, 0x0c2f, 0x2001, 0x12de, + 0x2004, 0x9005, 0x1518, 0x080c, 0x25b8, 0x1148, 0x2001, 0x0001, + 0x080c, 0x2520, 0x2001, 0x0001, 0x080c, 0x2503, 0x00b8, 0x080c, + 0x25c0, 0x1138, 0x9006, 0x080c, 0x2520, 0x9006, 0x080c, 0x2503, + 0x0068, 0x080c, 0x25c8, 0x1d50, 0x2001, 0x12ce, 0x2004, 0xd0fc, + 0x0108, 0x0020, 0x080c, 0x232e, 0x0804, 0x0d0e, 0x080c, 0x6b30, + 0x0148, 0x080c, 0x6b42, 0x1118, 0x080c, 0x6e21, 0x0050, 0x080c, + 0x6b27, 0x0dd0, 0x080c, 0x6e1c, 0x080c, 0x6e12, 0x080c, 0x6a4b, + 0x0058, 0x080c, 0x6b1f, 0x0140, 0x2009, 0x00f8, 0x080c, 0x571b, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x09c4, 0x7820, 0xd09c, - 0x1138, 0x080c, 0x68b8, 0x0138, 0x7824, 0xd0ac, 0x1904, 0x0d13, - 0x1f04, 0x0c0e, 0x0070, 0x7824, 0x080c, 0x68d2, 0x0118, 0xd0ac, + 0x1138, 0x080c, 0x6b1f, 0x0138, 0x7824, 0xd0ac, 0x1904, 0x0d13, + 0x1f04, 0x0c0e, 0x0070, 0x7824, 0x080c, 0x6b39, 0x0118, 0xd0ac, 0x1904, 0x0d13, 0x9084, 0x1800, 0x0d98, 0x7003, 0x0001, 0x0804, - 0x0d13, 0x2001, 0x0001, 0x080c, 0x2186, 0x0804, 0x0d26, 0x2001, - 0x12eb, 0x2004, 0x9005, 0x1518, 0x080c, 0x259c, 0x1148, 0x2001, - 0x0001, 0x080c, 0x2504, 0x2001, 0x0001, 0x080c, 0x24e7, 0x00b8, - 0x080c, 0x25a4, 0x1138, 0x9006, 0x080c, 0x2504, 0x9006, 0x080c, - 0x24e7, 0x0068, 0x080c, 0x25ac, 0x1d50, 0x2001, 0x12dc, 0x2004, - 0xd0fc, 0x0108, 0x0020, 0x080c, 0x22fe, 0x0804, 0x0d0e, 0x7850, + 0x0d13, 0x2001, 0x0001, 0x080c, 0x21ae, 0x0804, 0x0d26, 0x2001, + 0x12de, 0x2004, 0x9005, 0x1518, 0x080c, 0x25b8, 0x1148, 0x2001, + 0x0001, 0x080c, 0x2520, 0x2001, 0x0001, 0x080c, 0x2503, 0x00b8, + 0x080c, 0x25c0, 0x1138, 0x9006, 0x080c, 0x2520, 0x9006, 0x080c, + 0x2503, 0x0068, 0x080c, 0x25c8, 0x1d50, 0x2001, 0x12ce, 0x2004, + 0xd0fc, 0x0108, 0x0020, 0x080c, 0x232e, 0x0804, 0x0d0e, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938, 0x7850, 0x9084, 0xfbcf, 0x7852, - 0x080c, 0x25b4, 0x9085, 0x2000, 0x7852, 0x793a, 0x20a9, 0x0046, - 0x1d04, 0x0c68, 0x080c, 0x78a2, 0x1f04, 0x0c68, 0x7850, 0x9085, - 0x0400, 0x9084, 0xdfbf, 0x7852, 0x793a, 0x080c, 0x68c9, 0x0148, - 0x080c, 0x68db, 0x1118, 0x080c, 0x6ba2, 0x0050, 0x080c, 0x68c0, - 0x0dd0, 0x080c, 0x6b9d, 0x080c, 0x6b93, 0x080c, 0x67ea, 0x0020, - 0x2009, 0x00f8, 0x080c, 0x55eb, 0x20a9, 0x0028, 0xa001, 0x1f04, - 0x0c8e, 0x7850, 0x9085, 0x1400, 0x7852, 0x080c, 0x68b8, 0x0120, + 0x080c, 0x25d0, 0x9085, 0x2000, 0x7852, 0x793a, 0x20a9, 0x0046, + 0x1d04, 0x0c68, 0x080c, 0x7bd3, 0x1f04, 0x0c68, 0x7850, 0x9085, + 0x0400, 0x9084, 0xdfbf, 0x7852, 0x793a, 0x080c, 0x6b30, 0x0148, + 0x080c, 0x6b42, 0x1118, 0x080c, 0x6e21, 0x0050, 0x080c, 0x6b27, + 0x0dd0, 0x080c, 0x6e1c, 0x080c, 0x6e12, 0x080c, 0x6a4b, 0x0020, + 0x2009, 0x00f8, 0x080c, 0x571b, 0x20a9, 0x0028, 0xa001, 0x1f04, + 0x0c8e, 0x7850, 0x9085, 0x1400, 0x7852, 0x080c, 0x6b1f, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678, 0x2019, 0xea60, - 0x0d0c, 0x78a2, 0x7820, 0xd09c, 0x1580, 0x080c, 0x68b8, 0x0904, - 0x0cf3, 0x7824, 0xd0ac, 0x1904, 0x0d13, 0x080c, 0x68db, 0x1528, + 0x0d0c, 0x7bd3, 0x7820, 0xd09c, 0x1580, 0x080c, 0x6b1f, 0x0904, + 0x0cf3, 0x7824, 0xd0ac, 0x1904, 0x0d13, 0x080c, 0x6b42, 0x1528, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e, 0x7827, 0x1800, - 0x080c, 0x25b4, 0x7824, 0x9084, 0x1800, 0x1160, 0x9484, 0x0fff, + 0x080c, 0x25d0, 0x7824, 0x9084, 0x1800, 0x1160, 0x9484, 0x0fff, 0x1138, 0x2001, 0x1110, 0x2004, 0xd0fc, 0x0110, 0x080c, 0x0d39, - 0x8421, 0x1158, 0x1d04, 0x0cce, 0x080c, 0x78a2, 0x080c, 0x6b9d, - 0x080c, 0x6b93, 0x7003, 0x0001, 0x04f0, 0x8319, 0x1948, 0x1d04, - 0x0cdb, 0x080c, 0x78a2, 0x2009, 0x12df, 0x2104, 0x9005, 0x0118, + 0x8421, 0x1158, 0x1d04, 0x0cce, 0x080c, 0x7bd3, 0x080c, 0x6e1c, + 0x080c, 0x6e12, 0x7003, 0x0001, 0x04f0, 0x8319, 0x1948, 0x1d04, + 0x0cdb, 0x080c, 0x7bd3, 0x2009, 0x12d1, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, 0x200b, 0x000a, 0x7827, 0x0048, 0x20a9, - 0x0002, 0x080c, 0x2595, 0x7924, 0x080c, 0x25b4, 0xd19c, 0x0110, - 0x080c, 0x24d5, 0x00d8, 0x080c, 0x68c9, 0x1140, 0x94a2, 0x03e8, - 0x1128, 0x080c, 0x6890, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, - 0x080c, 0x25b4, 0x7824, 0x080c, 0x68d2, 0x0110, 0xd0ac, 0x1158, + 0x0002, 0x080c, 0x25b1, 0x7924, 0x080c, 0x25d0, 0xd19c, 0x0110, + 0x080c, 0x24f1, 0x00d8, 0x080c, 0x6b30, 0x1140, 0x94a2, 0x03e8, + 0x1128, 0x080c, 0x6af7, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, + 0x080c, 0x25d0, 0x7824, 0x080c, 0x6b39, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, - 0x080c, 0x2186, 0x0078, 0x2009, 0x110c, 0x210c, 0xd19c, 0x1120, + 0x080c, 0x21ae, 0x0078, 0x2009, 0x110c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, 0x0002, 0x7906, 0x7827, 0x0048, 0x7828, 0x9085, - 0x0028, 0x782a, 0x7850, 0x9085, 0x0400, 0x7852, 0x2001, 0x12eb, + 0x0028, 0x782a, 0x7850, 0x9085, 0x0400, 0x7852, 0x2001, 0x12de, 0x2003, 0x0000, 0x9006, 0x78f2, 0x015e, 0x003e, 0x000e, 0x080c, - 0x4d3e, 0x1110, 0x080c, 0x0e56, 0x012e, 0x00fe, 0x004e, 0x001e, + 0x4e65, 0x1110, 0x080c, 0x0e68, 0x012e, 0x00fe, 0x004e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x00b6, 0x00c6, 0x00d6, - 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x78a2, 0x015e, 0x00fe, + 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x7bd3, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x119c, 0x7004, 0x9086, 0x0001, 0x1110, - 0x080c, 0x2d30, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061, 0x12ef, - 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x0006, 0x600f, 0x0007, - 0x2001, 0x12b0, 0x900e, 0x2102, 0x7192, 0x2001, 0x0100, 0x2004, + 0x080c, 0x2daf, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061, 0x12e2, + 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x0013, 0x600f, 0x0007, + 0x2001, 0x12a2, 0x900e, 0x2102, 0x7192, 0x2001, 0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, 0x0008, 0x715a, 0x7063, - 0xffff, 0x717a, 0x717e, 0x080c, 0xae0a, 0x2061, 0x12a0, 0x6003, + 0xffff, 0x717a, 0x717e, 0x080c, 0xb2e7, 0x2061, 0x1292, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f, 0x0200, 0x6013, 0x00ff, - 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0, 0x2061, 0x12a8, 0x6003, + 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0, 0x2061, 0x129a, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200, 0x6013, 0x00ff, 0x6116, - 0x601b, 0x0001, 0x611e, 0x2061, 0x12cd, 0x6003, 0x514c, 0x6007, + 0x601b, 0x0001, 0x611e, 0x2061, 0x12bf, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, 0x112b, 0x2102, - 0x0005, 0x9016, 0x080c, 0x5b9a, 0x1178, 0x6004, 0x90c4, 0x00ff, + 0x0005, 0x9016, 0x080c, 0x5ccd, 0x1178, 0x6004, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00, 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, 0x8108, 0x9186, 0x0100, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x2079, 0x0000, 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, 0x0dcb, 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e, 0x7882, 0x7836, 0x001e, - 0x798e, 0x000e, 0x788a, 0x000e, 0x7886, 0x3900, 0x789a, 0x7833, - 0x0012, 0x2091, 0x5000, 0x0156, 0x00d6, 0x0036, 0x0026, 0x2079, - 0x0300, 0x2069, 0x13e5, 0x7a08, 0x226a, 0x2069, 0x13e6, 0x7a18, - 0x226a, 0x8d68, 0x7a1c, 0x226a, 0x782c, 0x2019, 0x13f3, 0x201a, - 0x2019, 0x13f6, 0x9016, 0x7808, 0xd09c, 0x0168, 0x7820, 0x201a, - 0x8210, 0x8318, 0x9386, 0x13ff, 0x0108, 0x0ca8, 0x7808, 0xd09c, - 0x0110, 0x2011, 0xdead, 0x2019, 0x13f4, 0x782c, 0x201a, 0x8318, - 0x221a, 0x7803, 0x0000, 0x2069, 0x13c5, 0x901e, 0x20a9, 0x0020, - 0x7b26, 0x7a28, 0x226a, 0x8d68, 0x8318, 0x1f04, 0x0e18, 0x002e, - 0x003e, 0x00de, 0x015e, 0x2079, 0x1100, 0x7803, 0x0005, 0x2091, - 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x0180, 0x2001, 0x135c, - 0x2004, 0x9005, 0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, - 0x2001, 0x008a, 0x2003, 0x0002, 0x2003, 0x1001, 0x080c, 0x4d3e, - 0x1110, 0x080c, 0x0e8d, 0x0cd0, 0x0005, 0x918c, 0x03ff, 0x2001, - 0x0003, 0x2004, 0x9084, 0x0600, 0x1118, 0x918d, 0x2800, 0x0010, - 0x918d, 0x2000, 0x2001, 0x017f, 0x2102, 0x0005, 0x00f6, 0x0006, - 0x2079, 0x1126, 0x2f04, 0x8000, 0x207a, 0x080c, 0x25ac, 0x1150, - 0x0006, 0x2001, 0x12dc, 0x2004, 0xd0fc, 0x000e, 0x1118, 0x9082, - 0x7530, 0x0010, 0x9082, 0x000f, 0x0258, 0x9006, 0x207a, 0x2079, - 0x1129, 0x2f04, 0x9084, 0x0001, 0x9086, 0x0001, 0x207a, 0x0090, - 0x2079, 0x1129, 0x2f7c, 0x8fff, 0x1138, 0x0026, 0x2011, 0x0080, - 0x080c, 0x0ed3, 0x002e, 0x0030, 0x0026, 0x2011, 0x0000, 0x080c, - 0x0ed3, 0x002e, 0x000e, 0x00fe, 0x0005, 0x0026, 0x0126, 0x2011, - 0x0080, 0x080c, 0x0ed3, 0x20a9, 0x0fff, 0x080c, 0x0ef4, 0x2011, - 0x0040, 0x04c9, 0x20a9, 0x0fff, 0x080c, 0x0ef4, 0x0c80, 0x7038, - 0xd0b4, 0x1128, 0x0026, 0x2011, 0x0040, 0x0469, 0x002e, 0x0005, - 0x7038, 0xd0b4, 0x1128, 0x0026, 0x2011, 0x0080, 0x0421, 0x002e, - 0x0005, 0x0026, 0x70eb, 0x0000, 0x0459, 0x1148, 0x080c, 0x25ac, - 0x1118, 0x2011, 0x8484, 0x0058, 0x2011, 0x8282, 0x0040, 0x080c, - 0x25ac, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2, 0x00e9, - 0x002e, 0x0005, 0xd0b4, 0x0130, 0x0006, 0x3b00, 0x9084, 0xff3f, - 0x20d8, 0x000e, 0x0005, 0x0016, 0x3b08, 0x3a00, 0x9104, 0x918d, - 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, 0x001e, 0x0005, - 0x2001, 0x1139, 0x2004, 0xd0dc, 0x0005, 0x9e86, 0x1100, 0x190c, - 0x0dc9, 0x70e4, 0xd0e4, 0x0108, 0xc2e5, 0x72e6, 0xd0e4, 0x1118, - 0x9294, 0x00c0, 0x0c01, 0x0005, 0x1d04, 0x0ef4, 0x2091, 0x6000, - 0x1f04, 0x0ef4, 0x0005, 0x890b, 0x810b, 0x810b, 0x810b, 0x810b, - 0x810b, 0x9994, 0xfc00, 0x8217, 0x8214, 0x8214, 0x0005, 0x0006, - 0x814c, 0x894c, 0x894c, 0x894c, 0x894c, 0x894c, 0x9284, 0x003f, - 0x8007, 0x8003, 0x8003, 0x994d, 0x000e, 0x0005, 0x0016, 0x0026, - 0x0096, 0x3348, 0x0c01, 0x2100, 0x9300, 0x2098, 0x22e0, 0x009e, - 0x002e, 0x001e, 0x3518, 0x20a9, 0x0001, 0x4002, 0x8007, 0x4004, - 0x8319, 0x1dd8, 0x0005, 0x20e9, 0x0001, 0x71b4, 0x81ff, 0x11c0, - 0x9006, 0x2009, 0x0200, 0x20a9, 0x0002, 0x9298, 0x0018, 0x23a0, - 0x4001, 0x2009, 0x0700, 0x20a9, 0x0002, 0x9298, 0x0008, 0x23a0, - 0x4001, 0x7078, 0x8007, 0x717c, 0x810f, 0x20a9, 0x0002, 0x4001, - 0x9298, 0x000c, 0x23a0, 0x900e, 0x080c, 0x0da9, 0x2001, 0x0000, - 0x810f, 0x20a9, 0x0002, 0x4001, 0x0005, 0x2071, 0x1100, 0x7168, - 0x712e, 0x2021, 0x0001, 0x9190, 0x0040, 0x9298, 0x0040, 0x0240, - 0x706c, 0x9302, 0x1228, 0x220a, 0x2208, 0x2310, 0x8420, 0x0ca8, - 0x200b, 0x0000, 0x74ba, 0x74be, 0x0005, 0x00e6, 0x0126, 0x2091, - 0x8000, 0x2071, 0x1100, 0x70bc, 0x90ea, 0x0040, 0x0268, 0x8001, >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Apr 19 20:14:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5513A16A409; Wed, 19 Apr 2006 20:14:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F015A16A405 for ; Wed, 19 Apr 2006 20:14:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFE8E43D62 for ; Wed, 19 Apr 2006 20:14:42 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JKEgpD006196 for ; Wed, 19 Apr 2006 20:14:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JKEgQO006184 for perforce@freebsd.org; Wed, 19 Apr 2006 20:14:42 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 20:14:42 GMT Message-Id: <200604192014.k3JKEgQO006184@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95622 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 20:14:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=95622 Change 95622 by jb@jb_freebsd2 on 2006/04/19 20:14:39 Enable _dtrace_init() as a constructor. This is the most convenient way to turn on debug in dtrace(1). Another way is via the '-x debug' command like argument, but quite a lot of initialisation takes place before options like that are processed. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#6 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#6 (text) ==== @@ -640,17 +640,21 @@ #if defined(sun) #pragma init(_dtrace_init) +#else +void _dtrace_init(void) __attribute__ ((constructor)); +#endif void _dtrace_init(void) { _dtrace_debug = getenv("DTRACE_DEBUG") != NULL; +#if defined(sun) for (; _dtrace_rdvers > 0; _dtrace_rdvers--) { if (rd_init(_dtrace_rdvers) == RD_OK) break; } +#endif } -#endif static dtrace_hdl_t * set_open_errno(dtrace_hdl_t *dtp, int *errp, int err) From owner-p4-projects@FreeBSD.ORG Wed Apr 19 20:40:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B0CD16A469; Wed, 19 Apr 2006 20:40:14 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43BA016A466 for ; Wed, 19 Apr 2006 20:40:14 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAABC43D48 for ; Wed, 19 Apr 2006 20:40:13 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JKeDX9021884 for ; Wed, 19 Apr 2006 20:40:13 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JKeDvo021880 for perforce@freebsd.org; Wed, 19 Apr 2006 20:40:13 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 20:40:13 GMT Message-Id: <200604192040.k3JKeDvo021880@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95623 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 20:40:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=95623 Change 95623 by jb@jb_freebsd2 on 2006/04/19 20:40:03 Create /usr/lib/dtrace for the dtrace 'library' script files. Affected files ... .. //depot/projects/dtrace/src/etc/mtree/BSD.usr.dist#2 edit Differences ... ==== //depot/projects/dtrace/src/etc/mtree/BSD.usr.dist#2 (text+ko) ==== @@ -18,6 +18,8 @@ aout .. .. + dtrace + .. .. libdata gcc From owner-p4-projects@FreeBSD.ORG Wed Apr 19 21:07:49 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE92216A40A; Wed, 19 Apr 2006 21:07:48 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3DFE16A408 for ; Wed, 19 Apr 2006 21:07:48 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 807E243D4C for ; Wed, 19 Apr 2006 21:07:48 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JL7maS044013 for ; Wed, 19 Apr 2006 21:07:48 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JL7mWk044010 for perforce@freebsd.org; Wed, 19 Apr 2006 21:07:48 GMT (envelope-from millert@freebsd.org) Date: Wed, 19 Apr 2006 21:07:48 GMT Message-Id: <200604192107.k3JL7mWk044010@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95625 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 21:07:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=95625 Change 95625 by millert@millert_g5tower on 2006/04/19 21:06:54 Fix some cut & pastos Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/mach/security.defs#8 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/mach/security.defs#8 (text+ko) ==== @@ -17,8 +17,7 @@ @param task Target's task port @param label Returned label handle - This call retrieves a label handle label for the - specified task, with respect to the specified policies. + This call retrieves the label handle of the specified task. @return Standard MiG return values (0 for success) */ @@ -48,12 +47,9 @@ @param port Port to query label from @param label Returned label handle - This call retrieves a label handle label for the - specified task, with respect to the specified policies. - - This call retrieves a label handle for the specified port, with - respect to the specified policies. If the port represents a label - handle, KERN_INVALID_ARGUMENT is returned. + This call retrieves a new label handle for the specified port. + If the port represents a label handle, KERN_INVALID_ARGUMENT is + returned. @return Standard MiG return values (0 for success) */ From owner-p4-projects@FreeBSD.ORG Wed Apr 19 21:32:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1E65D16A405; Wed, 19 Apr 2006 21:32:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F14F316A404 for ; Wed, 19 Apr 2006 21:32:23 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CF1C43D48 for ; Wed, 19 Apr 2006 21:32:23 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JLWNVb056925 for ; Wed, 19 Apr 2006 21:32:23 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JLWNP3056919 for perforce@freebsd.org; Wed, 19 Apr 2006 21:32:23 GMT (envelope-from millert@freebsd.org) Date: Wed, 19 Apr 2006 21:32:23 GMT Message-Id: <200604192132.k3JLWNP3056919@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95630 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 21:32:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=95630 Change 95630 by millert@millert_g5tower on 2006/04/19 21:32:10 Remove gratuitous diffs against SEBSD Some style fixes Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.c#37 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.h#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#8 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscalls.h#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_sysctl.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/context.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/ebitmap.c#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/init.c#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mls.c#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mls.h#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/policydb.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/security.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/sidtab.h#4 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#9 (text+ko) ==== @@ -35,6 +35,7 @@ #include #endif +int selinux_auditing = 1; int selinux_enforcing = 0; #define AVC_CACHE_SLOTS 512 @@ -98,7 +99,7 @@ } static inline void avc_cache_stats_add(int type, unsigned val) - +{ avc_cache_stats[type] += val; } #else @@ -110,6 +111,7 @@ #endif #if 0 +/* XXXMAC - moved to services.c */ /** * avc_dump_av - Display an access vector in human-readable form. * @tclass: target security class @@ -189,7 +191,7 @@ printk(" tcontext=%s", scontext); kfree(scontext); } - printk(" tclass=%s", security_class_to_string (tclass)); + printk(" tclass=%s", security_class_to_string(tclass)); } /** @@ -200,6 +202,8 @@ void avc_init(void) { struct avc_node *new; + size_t evsize; + char *ev; int i; for (i = 0; i < AVC_NSTATS; i++) @@ -237,11 +241,9 @@ mtx_init(&avc_log_lock, "SEBSD message lock", NULL, MTX_DEF); #endif - size_t evsize; - char *ev; if (preload_find_data ("sebsd_enforce", &evsize, &ev)) { - if (evsize > 0 && ev[0] == '1') - selinux_enforcing = 1; + if (evsize > 0 && ev[0] == '1') + selinux_enforcing = 1; } } @@ -535,6 +537,17 @@ static inline int check_avc_ratelimit(void) { + + /* + * If auditing is not enabled, suppress all messages. + */ + if (!selinux_auditing) + return 0; + + /* + * Otherwise, rate limit messages in enforcing mode, or display all + * messages in permissive mode. + */ if (selinux_enforcing) return avc_ratelimit(); else { ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.h#4 (text+ko) ==== @@ -20,11 +20,15 @@ #include #endif +#include + #include #include #include #include +extern int selinux_auditing; + #define CONFIG_SECURITY_SELINUX_DEVELOP #ifdef CONFIG_SECURITY_SELINUX_DEVELOP @@ -66,8 +70,20 @@ } fs; struct { char *netif; + struct sock *sk; + u16 family; u16 port; - u32 daddr; + u16 sport; + union { + struct { + u32 daddr; + u32 saddr; + } v4; + struct { + struct in6_addr daddr; + struct in6_addr saddr; + } v6; + } fam; } net; #ifdef CAPABILITIES cap_value_t cap; @@ -111,7 +127,6 @@ * AVC operations */ -/* Initialize the AVC */ void avc_init(void); int avc_lookup( @@ -163,5 +178,5 @@ u32 events, security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms); -#endif /* _LINUX_AVC_H_ */ +#endif /* _SELINUX_AVC_H_ */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.c#37 (text+ko) ==== @@ -8,6 +8,9 @@ * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA * CHATS research program. * + * This software was enhanced by SPARTA ISSO under SPAWAR contract + * N66001-04-C-6019 ("SEFOS"). + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -126,7 +129,7 @@ extern int ss_initialized; static __inline int ss_precondition(void) { - return ss_initialized; + return (ss_initialized); } static void @@ -135,7 +138,6 @@ printf("sebsd:: init\n"); avc_init(); - //sebsd_register_sysctls(); if (security_init()) { panic("SEBSD: couldn't read policy file"); } @@ -153,7 +155,7 @@ sebsd_destroy(struct mac_policy_conf *mpc) { - printf("sebsd:: destroy\n"); + panic("sebsd_destroy"); } #ifdef CAPABILITIES @@ -171,8 +173,8 @@ AVC_AUDIT_DATA_INIT(&ad, CAP); ad.u.cap = cap; - return avc_has_perm_audit(task->sid, task->sid, - SECCLASS_CAPABILITY, cap, &ad); + return (avc_has_perm_audit(task->sid, task->sid, + SECCLASS_CAPABILITY, cap, &ad)); } #endif @@ -257,48 +259,50 @@ static __inline security_class_t vnode_type_to_security_class(enum vtype vt) { + switch (vt) { case VREG: - return SECCLASS_FILE; + return (SECCLASS_FILE); case VDIR: - return SECCLASS_DIR; + return (SECCLASS_DIR); case VBLK: - return SECCLASS_BLK_FILE; + return (SECCLASS_BLK_FILE); case VCHR: - return SECCLASS_CHR_FILE; + return (SECCLASS_CHR_FILE); case VLNK: - return SECCLASS_LNK_FILE; + return (SECCLASS_LNK_FILE); case VSOCK: - return SECCLASS_SOCK_FILE; + return (SECCLASS_SOCK_FILE); case VFIFO: - return SECCLASS_FIFO_FILE; + return (SECCLASS_FIFO_FILE); case VNON: case VBAD: #ifdef __APPLE__ case VSTR: case VCPLX: #endif - return SECCLASS_FILE; + return (SECCLASS_FILE); } - return SECCLASS_FILE; + return (SECCLASS_FILE); } static __inline security_class_t devfs_type_to_security_class(int type) { + switch (type) { case DEV_DIR: - return SECCLASS_DIR; + return (SECCLASS_DIR); case DEV_BDEV: - return SECCLASS_BLK_FILE; + return (SECCLASS_BLK_FILE); case DEV_CDEV: - return SECCLASS_CHR_FILE; + return (SECCLASS_CHR_FILE); case DEV_SLNK: - return SECCLASS_LNK_FILE; + return (SECCLASS_LNK_FILE); } - return SECCLASS_FILE; + return (SECCLASS_FILE); } static __inline access_vector_t @@ -329,7 +333,7 @@ av |= DIR__READ; } - return av; + return (av); } static int @@ -346,24 +350,30 @@ AVC_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.vp = vp; +#if 0 if (file->sclass == 0) { struct vattr va; struct proc *p = current_proc(); - VOP_GETATTR (vp, &va, p->p_ucred, p); + VOP_GETATTR(vp, &va, p->p_ucred, p); printf("vnode_has_perm:: ERROR, sid=%d, sclass=0, v_type=%d," " inode=%ld, fsid=%d, fstype=%s, mnt=%s\n", - file->sid, vp->v_type, va.va_fileid, va.va_fsid, vp->v_mount->mnt_vfc->vfc_name, vp->v_mount->mnt_stat.f_mntonname); + file->sid, vp->v_type, va.va_fileid, va.va_fsid, + vp->v_mount->mnt_vfc->vfc_name, + vp->v_mount->mnt_stat.f_mntonname); file->sclass = vnode_type_to_security_class(vp->v_type); if (file->sclass == 0) { printf("vnode_has_perm:: Giving up\n"); - return 1; /* TBD: debugging */ + return (1); /* TBD: debugging */ } } - file->sclass = vnode_type_to_security_class (vp->v_type); +#else + /* XXX - why must we reset sclass this every time? */ + file->sclass = vnode_type_to_security_class(vp->v_type); +#endif - return avc_has_perm_ref_audit(task->sid, file->sid, file->sclass, - perm, aeref ? aeref : &file->avcr, &ad); + return (avc_has_perm_ref_audit(task->sid, file->sid, file->sclass, + perm, aeref ? aeref : &file->avcr, &ad)); } #ifdef HAS_PIPES @@ -380,7 +390,7 @@ * TBD: No audit information yet */ - return(avc_has_perm_ref(task->sid, file->sid, file->sclass, + return (avc_has_perm_ref(task->sid, file->sid, file->sclass, perm, &file->avcr)); } #endif @@ -396,21 +406,11 @@ } static void -sebsd_init_port_label(struct label *label) -{ - struct task_security_struct *new_tsec; - - new_tsec = sebsd_malloc(sizeof(*new_tsec), M_ZERO | M_WAITOK); - new_tsec->osid = new_tsec->sid = SECINITSID_UNLABELED; - SLOT(label) = new_tsec; -} - -static void sebsd_init_file_label(struct label *label) { struct file_security_struct *new_fsec; - new_fsec = sebsd_malloc (sizeof(*new_fsec), M_ZERO | M_WAITOK); + new_fsec = sebsd_malloc(sizeof(*new_fsec), M_ZERO | M_WAITOK); new_fsec->sid = new_fsec->sid = SECINITSID_UNLABELED; SLOT(label) = new_fsec; } @@ -495,37 +495,8 @@ } static void -sebsd_destroy_cred_label(struct label *label) -{ - sebsd_free (SLOT(label)); - SLOT(label) = NULL; -} - -static void -sebsd_destroy_vnode_label(struct label *label) -{ - sebsd_free (SLOT(label)); - SLOT(label) = NULL; -} - -static void -sebsd_destroy_mount_label(struct label *label) -{ - sebsd_free (SLOT(label)); - SLOT(label) = NULL; -} - -static void -sebsd_destroy_mount_fs_label(struct label *label) -{ - sebsd_free (SLOT(label)); - SLOT(label) = NULL; -} - -static void -sebsd_destroy_sysv_label(struct label *label) +sebsd_destroy_label(struct label *label) { - sebsd_free(SLOT(label)); SLOT(label) = NULL; } @@ -533,13 +504,13 @@ static void sebsd_relabel_cred(struct ucred *cred, struct label *newlabel) { - /* - * XXX/TBD: normally, SEBSD doesn't permit process labels to change - * other than at exec time... - */ - struct task_security_struct *task = SLOT(cred->cr_label); - struct task_security_struct *nsec = SLOT(newlabel); - task->sid = nsec->sid; + /* + * XXX/TBD: normally, SEBSD doesn't permit process labels to change + * other than at exec time... + */ + struct task_security_struct *task = SLOT(cred->cr_label); + struct task_security_struct *nsec = SLOT(newlabel); + task->sid = nsec->sid; } static void @@ -589,20 +560,18 @@ vsec = SLOT(vlabel); context_len = sizeof(context); /* TBD: bad fixed length */ - error = vn_extattr_get(vp, IO_NODELOCKED, - SEBSD_MAC_EXTATTR_NAMESPACE, - SEBSD_MAC_EXTATTR_NAME, - &context_len, context, p); + error = vn_extattr_get(vp, IO_NODELOCKED, SEBSD_MAC_EXTATTR_NAMESPACE, + SEBSD_MAC_EXTATTR_NAME, &context_len, context, p); if (error == ENOATTR || error == EOPNOTSUPP) { vsec->sid = SECINITSID_UNLABELED; /* Use the default label */ - /* +#if 0 struct vattr va; (void)VOP_GETATTR(vp, &va, p->p_ucred, p); printf("sebsd_update_vnode_from_extattr: no label for " "inode=%ld, fsid=%d\n", va.va_fileid, va.va_fsid); - */ +#endif goto dosclass; } if (error) { @@ -630,11 +599,11 @@ if (error) goto dosclass; - error = security_context_to_sid(context, strlen(context), &vsec->sid); + error = security_context_to_sid(context, context_len, &vsec->sid); if (error) { printf("sebsd_update_vnode_from_extattr: ERROR mapping " "context to sid: %.*s\n", context_len, context); - return (0); /* TBD bad, bad, bad */ + return (0); /* TBD bad, bad, bad */ } dosclass: @@ -751,7 +720,7 @@ } static void -sebsd_create_port (struct label *it, struct label *st, struct label *port) +sebsd_create_port(struct label *it, struct label *st, struct label *port) { struct task_security_struct *its, *sts, *psec; int error; @@ -839,11 +808,13 @@ if (cr != NULL) { struct task_security_struct *task = SLOT(cr->cr_label); - /* XXX: uses the type specified by genfs instead of the parent - directory like it should! */ - rc = security_transition_sid(task->sid, dirent->sid, + /* + * XXX: uses the type specified by genfs instead of the + * parent directory like it should! + */ + int error = security_transition_sid(task->sid, dirent->sid, dirent->sclass, &newsid); - if (rc == 0) + if (error == 0) dirent->sid = newsid; } @@ -901,7 +872,6 @@ struct devfs_dirent *dd, struct label *ddlabel, struct devfs_dirent *de, struct label *delabel, const char *fullpath) { - char *path; int rc; security_id_t newsid; @@ -967,7 +937,7 @@ task = SLOT(cred->cr_label); task->osid = task->sid = SECINITSID_KERNEL; printf("sebsd_create_proc0:: using SECINITSID_KERNEL = %d\n", - SECINITSID_KERNEL); + SECINITSID_KERNEL); } static void @@ -998,21 +968,24 @@ * which the filesystem will use if not a "multilabel" type. */ rc = security_fs_use(mp->mnt_vfc->vfc_name, &behavior, &sbsec->sid); - if (rc != 0) { + if (rc) { printf("sebsd_create_mount: security_fs_use(%s) returned %d\n", mp->mnt_vfc->vfc_name, rc); behavior = SECURITY_FS_USE_NONE; } else { sbfssec->sid = sbsec->sid; /* TBD: debugging only */ - printf("sebsd_create_mount: security_fs_use(%s) behavior %d, sid %d\n", - mp->mnt_vfc->vfc_name, behavior, sbsec->sid); + printf("sebsd_create_mount: security_fs_use(%s) behavior " + "%d, sid %d\n", mp->mnt_vfc->vfc_name, behavior, + sbsec->sid); } switch (behavior) { case SECURITY_FS_USE_XATTR: - /* PSIDs only work for persistent file systems with - unique and persistent inode numbers. */ + /* + * PSIDs only work for persistent file systems with unique + * and persistent inode numbers. + */ sbsec->uses_psids = 1; /* @@ -1022,27 +995,35 @@ break; case SECURITY_FS_USE_TRANS: - /* Transition SIDs are used for pseudo filesystems like - devpts and tmpfs where you want the SID to be derived - from the SID of the creating process and the SID of - the filesystem. */ + /* + * Transition SIDs are used for pseudo filesystems like + * devpts and tmpfs where you want the SID to be derived + * from the SID of the creating process and the SID of the + * filesystem. + */ sbsec->uses_trans = 1; break; case SECURITY_FS_USE_TASK: - /* Task SIDs are used for pseudo filesystems like pipefs - and sockfs where you want the objects to be labeled - with the SID of the creating process. */ + /* + * Task SIDs are used for pseudo filesystems like pipefs and + * sockfs where you want the objects to be labeled with the + * SID of the creating process. + */ sbsec->uses_task = 1; break; case SECURITY_FS_USE_GENFS: - /* genfs_contexts handles everything else, like devfs, - usbdevfs, driverfs, and portions of proc. */ + /* + * genfs_contexts handles everything else, like devfs, + * usbdevfs, driverfs, and portions of proc. + */ sbsec->uses_genfs = 1; break; case SECURITY_FS_USE_NONE: - /* No labeling support configured for this filesystem type. - Don't appear to require labeling for binfmt_misc, bdev, - or rootfs. */ + /* + * No labeling support configured for this filesystem type. + * Don't appear to require labeling for binfmt_misc, bdev, + * or rootfs. + */ break; default: printf("%s: security_fs_use(%s) returned unrecognized " @@ -1079,10 +1060,9 @@ task = SLOT(cred->cr_label); dir = SLOT(parentlabel); vsec = SLOT(childlabel); - tclass = vnode_type_to_security_class (child->v_type); + tclass = vnode_type_to_security_class(child->v_type); - error = security_transition_sid(task->sid, dir->sid, tclass, - &newsid); + error = security_transition_sid(task->sid, dir->sid, tclass, &newsid); if (error) return (error); @@ -1109,14 +1089,10 @@ sebsd_check_cap(struct ucred *cred, cap_value_t capv) { - return cred_has_capability(cred, capv); + return (cred_has_capability(cred, capv)); } #endif -/* - * SEBSD does not support the relabeling of processes without - * transitioning. - */ static int sebsd_check_cred_relabel(struct ucred *cred, struct label *newlabel) { @@ -1127,23 +1103,19 @@ tsec = SLOT(cred->cr_label); if (nsec == NULL) - return 0; + return (0); rc = avc_has_perm_ref_audit(tsec->sid, tsec->sid, SECCLASS_PROCESS, - FILE__RELABELFROM, NULL, NULL); + FILE__RELABELFROM, NULL, NULL); if (rc) return (rc); rc = avc_has_perm_audit(tsec->sid, nsec->sid, SECCLASS_PROCESS, - FILE__RELABELTO, NULL); + FILE__RELABELTO, NULL); if (rc) return (rc); - /* - if (nsec != NULL && nsec->sid != tsec->sid) - return EPERM; - */ - return 0; + return (0); } static int @@ -1167,7 +1139,7 @@ if (rc) return (rc); - return 0; + return (0); } #define CHECK_SIMPLE_PERM(func,class,perm) \ @@ -1176,8 +1148,8 @@ struct task_security_struct *tsec, *psec; \ psec = SLOT(port); \ tsec = SLOT(task); \ - return avc_has_perm_ref_audit (tsec->sid, psec->sid, \ - SECCLASS_ ## class, class ## __ ## perm, NULL, NULL); \ + return (avc_has_perm_ref_audit (tsec->sid, psec->sid, \ + SECCLASS_ ## class, class ## __ ## perm, NULL, NULL)); \ } CHECK_SIMPLE_PERM(msg_send, MACH_PORT, SEND); @@ -1199,33 +1171,33 @@ const char *s, const char * pn) { struct task_security_struct *tsec, *psec; - struct class_datum *cld; - struct perm_datum *p; + struct class_datum *cld; + struct perm_datum *p; psec = SLOT(obj); tsec = SLOT(subj); cld = hashtab_search(policydb.p_classes.table, (void *)s); if (cld == NULL) - return EINVAL; + return (EINVAL); p = hashtab_search(cld->permissions.table, (void *)pn); if (p == NULL && cld->comdatum) p = hashtab_search(cld->comdatum->permissions.table, (void *)pn); if (p == NULL) - return EINVAL; + return (EINVAL); - return avc_has_perm_ref_audit(tsec->sid, psec->sid, cld->value, - 1 << (p->value-1), NULL, NULL); + return (avc_has_perm_ref_audit(tsec->sid, psec->sid, cld->value, + 1 << (p->value-1), NULL, NULL)); } static int -sebsd_request_label (struct label *subj, struct label *obj, const char *s, +sebsd_request_label(struct label *subj, struct label *obj, const char *s, struct label *out) { struct task_security_struct *tsec, *psec, *osec; - struct class_datum *cld; - struct perm_datum *p; + struct class_datum *cld; + struct perm_datum *p; psec = SLOT(obj); tsec = SLOT(subj); @@ -1233,10 +1205,10 @@ cld = hashtab_search(policydb.p_classes.table, (void *)s); if (cld == NULL) - return EINVAL; + return (EINVAL); - return security_change_sid(tsec->sid, psec->sid, cld->value, - &osec->sid); + return (security_change_sid(tsec->sid, psec->sid, cld->value, + &osec->sid)); } static int @@ -1248,11 +1220,11 @@ psec = SLOT(obj); tsec = SLOT(subj); - return sebsd_check_ipc_method1(tsec->sid,psec->sid, msgid); + return (sebsd_check_ipc_method1(tsec->sid,psec->sid, msgid)); } static int -sebsd_check_mount (struct ucred *cred, struct vnode *vp, struct label *vl, +sebsd_check_mount(struct ucred *cred, struct vnode *vp, struct label *vl, const char *vfc_name, struct label *mntlabel) { int rc; @@ -1265,29 +1237,28 @@ vsec = SLOT(vl); task = SLOT(cred->cr_label); - rc = vnode_has_perm (cred, vp, FILE__MOUNTON, NULL); + rc = vnode_has_perm(cred, vp, FILE__MOUNTON, NULL); if (rc) - return rc; + return (rc); if (mntlabel) { sbsec = SLOT(mntlabel); sid = sbsec->sid; - rc = avc_has_perm_ref_audit (task->sid, sid, SECCLASS_FILE, + rc = avc_has_perm_ref_audit(task->sid, sid, SECCLASS_FILE, COMMON_FILE__RELABELTO, NULL, NULL); if (rc) - return rc; - } - else { - rc = security_fs_use (vfc_name, &behavior, &sid); + return (rc); + } else { + rc = security_fs_use(vfc_name, &behavior, &sid); if (rc) - return rc; + return (rc); } - rc = avc_has_perm_ref_audit (task->sid, sid, SECCLASS_FILESYSTEM, + rc = avc_has_perm_ref_audit(task->sid, sid, SECCLASS_FILESYSTEM, FILESYSTEM__MOUNT, NULL, NULL); - return rc; + return (rc); } static int @@ -1303,12 +1274,12 @@ struct label *mntlabel, struct label *mount_arg_label) { - /* cannot change labels on filesystems */ + /* Cannot change labels on filesystems. */ if (mount_arg_label) { struct mount_security_struct *mla = SLOT(mntlabel); struct mount_security_struct *mlb = SLOT(mount_arg_label); if (mla->sid != mlb->sid) - return EINVAL; + return (EINVAL); } return (mount_has_perm(cred, mp, FILESYSTEM__REMOUNT, NULL)); } @@ -1360,22 +1331,21 @@ rc = avc_has_perm_ref(task->sid, file->sid, file->sclass, FIFO_FILE__RELABELFROM, &file->avcr); - if (rc) return (rc); rc = avc_has_perm(task->sid, newfile->sid, file->sclass, FIFO_FILE__RELABELTO, NULL, NULL); - /* - * TBD: SELinux also checks filesystem associate permission: - return avc_has_perm_audit(newsid, +#if 0 + /* TBD: SELinux also checks filesystem associate permission: */ + return (avc_has_perm_audit(newsid, sbsec->sid, SECCLASS_FILESYSTEM, FILESYSTEM__ASSOCIATE, - &ad); - */ - return(rc); + &ad)); +#endif + return (rc); } static int @@ -1512,13 +1482,12 @@ * So just make the transition. */ ntask->osid = otask->sid; - if (execlabel == NULL) { + if (execlabel == NULL) (void)security_transition_sid(otask->sid, file->sid, - SECCLASS_PROCESS, &ntask->sid); - } else { + SECCLASS_PROCESS, &ntask->sid); + else ntask->sid = ((struct task_security_struct *) SLOT(execlabel))->sid; - } if (otask->sid != ntask->sid) { /* @@ -1527,8 +1496,6 @@ * permission check if the parent was waiting. */ } - - return; } static int @@ -1550,24 +1517,12 @@ * Should have already checked all the permissions, so just see if * the SIDS are going to match. */ - if (execlabel == NULL) { + if (execlabel == NULL) (void)security_transition_sid(task->sid, file->sid, - SECCLASS_PROCESS, &newsid); -#if 0 - int len; - char *ts, *ns, *fs; - security_sid_to_context (task->sid, &ts, &len); - security_sid_to_context (file->sid, &fs, &len); - security_sid_to_context (newsid, &ns, &len); - printf ("transition: %s %s -> %s\n", ts, fs, ns); - security_free_context (ts); - security_free_context (fs); - security_free_context (ns); -#endif - } else { + SECCLASS_PROCESS, &newsid); + else newsid = ((struct task_security_struct *) SLOT(execlabel))->sid; - } return (newsid != task->sid); } @@ -1639,6 +1594,7 @@ source = SLOT(newlabel); dest = SLOT(pipelabel); + /* XXXRW: Should be KASSERT's? */ if (!source) { printf("sebsd_relabel_pipe:: source is NULL!\n"); return; @@ -1661,6 +1617,7 @@ source = SLOT(label); dest = SLOT(vnodelabel); + /* XXXRW: Should be KASSERT's? */ if (!source) { printf("sebsd_relabel_vnode:: source is NULL!\n"); return; @@ -1684,15 +1641,12 @@ newlabel = SLOT(intlabel); - error = security_sid_to_context(newlabel->sid, &context, - &context_len); + error = security_sid_to_context(newlabel->sid, &context, &context_len); if (error) return (error); - error = vn_extattr_set(vp, IO_NODELOCKED, - SEBSD_MAC_EXTATTR_NAMESPACE, - SEBSD_MAC_EXTATTR_NAME, - context_len, context, current_proc()); + error = vn_extattr_set(vp, IO_NODELOCKED, SEBSD_MAC_EXTATTR_NAMESPACE, + SEBSD_MAC_EXTATTR_NAME, context_len, context, current_proc()); security_free_context(context); return (error); } @@ -1704,10 +1658,10 @@ /* existence check (F_OK) */ if (acc_mode == 0) - return 0; + return (0); - return (vnode_has_perm(cred, vp, file_mask_to_av(vp->v_type, acc_mode), - NULL)); + return (vnode_has_perm(cred, vp, + file_mask_to_av(vp->v_type, acc_mode), NULL)); } static int @@ -1716,7 +1670,7 @@ { /* MAY_EXEC ~= DIR__SEARCH */ - return vnode_has_perm(cred, dvp, DIR__SEARCH, NULL); + return (vnode_has_perm(cred, dvp, DIR__SEARCH, NULL)); } static int @@ -1726,7 +1680,7 @@ /* TBD: Incomplete, SELinux also check capability(CAP_SYS_CHROOT)) */ /* MAY_EXEC ~= DIR__SEARCH */ - return vnode_has_perm(cred, dvp, DIR__SEARCH, NULL); + return (vnode_has_perm(cred, dvp, DIR__SEARCH, NULL)); } static int @@ -1750,34 +1704,36 @@ ad.u.fs.vp = dvp; rc = avc_has_perm_ref_audit(task->sid, dir->sid, SECCLASS_DIR, - DIR__ADD_NAME | DIR__SEARCH, - &dir->avcr, &ad); + DIR__ADD_NAME | DIR__SEARCH, &dir->avcr, &ad); if (rc) - return rc; + return (rc); rc = security_transition_sid(task->sid, dir->sid, tclass, &newsid); if (rc) - return rc; + return (rc); rc = avc_has_perm_audit(task->sid, newsid, tclass, FILE__CREATE, &ad); if (rc) - return rc; + return (rc); if (dvp->v_mount) { - /* XXX: mpo_check_vnode_create should probably pass the mntlabel */ + /* + * XXX: mpo_check_vnode_create should probably pass the + * mntlabel + */ sbsec = SLOT(dvp->v_mount->mnt_mntlabel); if (sbsec == NULL) { printf ("create_vnode: no mount label for mnt=%s\n", dvp->v_mount->mnt_stat.f_mntonname); - return 0; + return (0); } - rc = avc_has_perm_audit(newsid, sbsec->sid, SECCLASS_FILESYSTEM, - FILESYSTEM__ASSOCIATE, &ad); + rc = avc_has_perm_audit(newsid, sbsec->sid, + SECCLASS_FILESYSTEM, FILESYSTEM__ASSOCIATE, &ad); if (rc) - return rc; + return (rc); } - return 0; + return (0); } static int @@ -1800,7 +1756,6 @@ rc = avc_has_perm_ref_audit(task->sid, dir->sid, SECCLASS_DIR, DIR__SEARCH | DIR__REMOVE_NAME, &dir->avcr, &ad); - if (rc) return (rc); @@ -1853,11 +1808,10 @@ rc = security_transition_sid(task->sid, file->sid, SECCLASS_PROCESS, &newsid); if (rc) - return EACCES; - } else { + return (EACCES); + } else newsid = ((struct task_security_struct *) SLOT(execlabel))->sid; - } AVC_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.vp = vp; @@ -1865,23 +1819,20 @@ if (newsid == task->sid) { rc = avc_has_perm_audit(task->sid, file->sid, SECCLASS_FILE, FILE__EXECUTE_NO_TRANS, &ad); - >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Apr 19 22:04:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EC37416A43A; Wed, 19 Apr 2006 22:04:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99E4A16A435 for ; Wed, 19 Apr 2006 22:04:30 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F8A043D82 for ; Wed, 19 Apr 2006 22:04:02 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JM42Za077251 for ; Wed, 19 Apr 2006 22:04:02 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JM42PS077248 for perforce@freebsd.org; Wed, 19 Apr 2006 22:04:02 GMT (envelope-from millert@freebsd.org) Date: Wed, 19 Apr 2006 22:04:02 GMT Message-Id: <200604192204.k3JM42PS077248@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95632 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 22:04:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=95632 Change 95632 by millert@millert_g5tower on 2006/04/19 22:03:34 Make sedarwin vs. selinux diffs smaller. Get rid of flask_types.h and make sure the userland sebsd.h gets used where appropriate. Remove KERNEL/_KERNEL #ifdefs now that userland and kernel code is separate. Remove most APPLE and FreeBSD #ifdefs--they are not really useful. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_inherit.h#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_perm_to_string.h#8 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc-selinux.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#10 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc_ss.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask.h#7 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask/mkaccess_vector.sh#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask/mkflask.sh#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.c#38 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.h#7 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_labels.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscalls.h#7 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_sysctl.c#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.c#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/conditional.c#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/constraint.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/ebitmap.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/ebitmap.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/global.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/hashtab.c#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/init.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mach_av.c#10 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mls.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mls_types.h#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/policydb.c#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/policydb.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/queue.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/security.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/sidtab.c#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/sidtab.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/symtab.c#4 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_inherit.h#3 (text+ko) ==== @@ -3,9 +3,9 @@ typedef struct { - security_class_t tclass; + u16 tclass; char **common_pts; - access_vector_t common_base; + u32 common_base; } av_inherit_t; static av_inherit_t av_inherit[] = { ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_perm_to_string.h#8 (text+ko) ==== @@ -3,8 +3,8 @@ typedef struct { - security_class_t tclass; - access_vector_t value; + u16 tclass; + u32 value; char *name; } av_perm_to_string_t; ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc-selinux.c#2 (text+ko) ==== @@ -1,56 +1,219 @@ - -/* -*- linux-c -*- */ - /* - * Author: Stephen Smalley, NAI Labs, + * Implementation of the kernel access vector cache (AVC). + * + * Authors: Stephen Smalley, + * James Morris + * + * Copyright (C) 2003 Red Hat, Inc., James Morris * - * The access vector cache was originally written while I was employed by NSA, - * and has undergone some revisions since I joined NAI Labs, but is largely - * unchanged. - */ - -/* - * Implementation of the kernel access vector cache (AVC). + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. */ - #include -#include -#include -#include -#include -#include -#include #include #include #include #include #include +#include #include #include #include #include #include -#include -#include -#include "selinux_plug.h" +#include +#include +#include +#include "avc.h" +#include "avc_ss.h" +#ifdef CONFIG_AUDIT +#include "class_to_string.h" +#endif +#include "common_perm_to_string.h" +#include "av_inherit.h" +#include "av_perm_to_string.h" +#include "objsec.h" + +#define AVC_CACHE_SLOTS 512 +#define AVC_CACHE_MAXNODES 410 + +struct avc_entry { + u32 ssid; + u32 tsid; + u16 tclass; + struct av_decision avd; + int used; /* used recently */ +}; + +struct avc_node { + struct avc_entry ae; + struct avc_node *next; +}; + +struct avc_cache { + struct avc_node *slots[AVC_CACHE_SLOTS]; + u32 lru_hint; /* LRU hint for reclaim scan */ + u32 active_nodes; + u32 latest_notif; /* latest revocation notification */ +}; + +struct avc_callback_node { + int (*callback) (u32 event, u32 ssid, u32 tsid, + u16 tclass, u32 perms, + u32 *out_retained); + u32 events; + u32 ssid; + u32 tsid; + u16 tclass; + u32 perms; + struct avc_callback_node *next; +}; + +static spinlock_t avc_lock = SPIN_LOCK_UNLOCKED; +static struct avc_node *avc_node_freelist; +static struct avc_cache avc_cache; +static unsigned avc_cache_stats[AVC_NSTATS]; +static struct avc_callback_node *avc_callbacks; + +static inline int avc_hash(u32 ssid, u32 tsid, u16 tclass) +{ + return (ssid ^ (tsid<<2) ^ (tclass<<4)) & (AVC_CACHE_SLOTS - 1); +} + +#ifdef AVC_CACHE_STATS +static inline void avc_cache_stats_incr(int type) +{ + avc_cache_stats[type]++; +} + +static inline void avc_cache_stats_add(int type, unsigned val) +{ + avc_cache_stats[type] += val; +} +#else +static inline void avc_cache_stats_incr(int type) +{ } -#ifdef CONFIG_SECURITY_SELINUX_DEVELOP -int avc_debug_always_allow = 1; +static inline void avc_cache_stats_add(int type, unsigned val) +{ } #endif -spinlock_t avc_lock = SPIN_LOCK_UNLOCKED; +/** + * avc_dump_av - Display an access vector in human-readable form. + * @tclass: target security class + * @av: access vector + */ +void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av) +{ + char **common_pts = NULL; + u32 common_base = 0; + int i, i2, perm; + + if (av == 0) { + audit_log_format(ab, " null"); + return; + } + + for (i = 0; i < ARRAY_SIZE(av_inherit); i++) { + if (av_inherit[i].tclass == tclass) { + common_pts = av_inherit[i].common_pts; + common_base = av_inherit[i].common_base; + break; + } + } + + audit_log_format(ab, " {"); + i = 0; + perm = 1; + while (perm < common_base) { + if (perm & av) + audit_log_format(ab, " %s", common_pts[i]); + i++; + perm <<= 1; + } + + while (i < sizeof(av) * 8) { + if (perm & av) { + for (i2 = 0; i2 < ARRAY_SIZE(av_perm_to_string); i2++) { + if ((av_perm_to_string[i2].tclass == tclass) && + (av_perm_to_string[i2].value == perm)) + break; + } + if (i2 < ARRAY_SIZE(av_perm_to_string)) + audit_log_format(ab, " %s", + av_perm_to_string[i2].name); + } + i++; + perm <<= 1; + } + + audit_log_format(ab, " }"); +} + +/** + * avc_dump_query - Display a SID pair and a class in human-readable form. + * @ssid: source security identifier + * @tsid: target security identifier + * @tclass: target security class + */ +void avc_dump_query(struct audit_buffer *ab, u32 ssid, u32 tsid, u16 tclass) +{ + int rc; + char *scontext; + u32 scontext_len; + + rc = security_sid_to_context(ssid, &scontext, &scontext_len); + if (rc) + audit_log_format(ab, "ssid=%d", ssid); + else { + audit_log_format(ab, "scontext=%s", scontext); + kfree(scontext); + } + + rc = security_sid_to_context(tsid, &scontext, &scontext_len); + if (rc) + audit_log_format(ab, " tsid=%d", tsid); + else { + audit_log_format(ab, " tcontext=%s", scontext); + kfree(scontext); + } + audit_log_format(ab, " tclass=%s", class_to_string[tclass]); +} -unsigned avc_cache_stats[AVC_NSTATS]; +/** + * avc_init - Initialize the AVC. + * + * Initialize the access vector cache. + */ +void __init avc_init(void) +{ + struct avc_node *new; + int i; + for (i = 0; i < AVC_CACHE_MAXNODES; i++) { + new = kmalloc(sizeof(*new), GFP_ATOMIC); + if (!new) { + printk(KERN_WARNING "avc: only able to allocate " + "%d entries\n", i); + break; + } + memset(new, 0, sizeof(*new)); + new->next = avc_node_freelist; + avc_node_freelist = new; + } + audit_log(current->audit_context, "AVC INITIALIZED\n"); +} #if 0 static void avc_hash_eval(char *tag) { - int i, chain_len, max_chain_len, slots_used; - avc_node_t *node; + int i, chain_len, max_chain_len, slots_used; + struct avc_node *node; + unsigned long flags; - spin_lock(&avc_lock); + spin_lock_irqsave(&avc_lock,flags); slots_used = 0; max_chain_len = 0; @@ -68,346 +231,838 @@ } } - spin_unlock(&avc_lock); + spin_unlock_irqrestore(&avc_lock,flags); - printk("\n%s avc: %d entries and %d/%d buckets used, longest chain length %d\n", - tag, avc_cache.activeNodes, slots_used, AVC_CACHE_SLOTS, max_chain_len); + printk(KERN_INFO "\n"); + printk(KERN_INFO "%s avc: %d entries and %d/%d buckets used, longest " + "chain length %d\n", tag, avc_cache.active_nodes, slots_used, + AVC_CACHE_SLOTS, max_chain_len); } #else -#define avc_hash_eval(t) +static inline void avc_hash_eval(char *tag) +{ } #endif +static inline struct avc_node *avc_reclaim_node(void) +{ + struct avc_node *prev, *cur; + int hvalue, try; + hvalue = avc_cache.lru_hint; + for (try = 0; try < 2; try++) { + do { + prev = NULL; + cur = avc_cache.slots[hvalue]; + while (cur) { + if (!cur->ae.used) + goto found; + cur->ae.used = 0; -#define print_ipv4_addr(_addr,_port,_name1,_name2) { \ - if ((_addr)) \ - printk(" %s=%d.%d.%d.%d", (_name1), \ - NIPQUAD((_addr))); \ - if ((_port)) \ - printk(" %s=%d", (_name2), ntohs((_port))); \ + prev = cur; + cur = cur->next; + } + hvalue = (hvalue + 1) & (AVC_CACHE_SLOTS - 1); + } while (hvalue != avc_cache.lru_hint); } + panic("avc_reclaim_node"); + +found: + avc_cache.lru_hint = hvalue; + + if (prev == NULL) + avc_cache.slots[hvalue] = cur->next; + else + prev->next = cur->next; + + return cur; +} -/* - * Copied from fs/dcache.c:d_path and hacked up to - * avoid need for vfsmnt, root, and rootmnt parameters. - */ -char * avc_d_path(struct dentry *dentry, - char *buffer, int buflen) +static inline struct avc_node *avc_claim_node(u32 ssid, + u32 tsid, u16 tclass) { - char * end = buffer+buflen; - char * retval; - int namelen; + struct avc_node *new; + int hvalue; - *--end = '\0'; - buflen--; - if (!IS_ROOT(dentry) && list_empty(&dentry->d_hash)) { - buflen -= 10; - end -= 10; - memcpy(end, " (deleted)", 10); + hvalue = avc_hash(ssid, tsid, tclass); + if (avc_node_freelist) { + new = avc_node_freelist; + avc_node_freelist = avc_node_freelist->next; + avc_cache.active_nodes++; + } else { + new = avc_reclaim_node(); + if (!new) + goto out; } - /* Get '/' right */ - retval = end-1; - *retval = '/'; + new->ae.used = 1; + new->ae.ssid = ssid; + new->ae.tsid = tsid; + new->ae.tclass = tclass; + new->next = avc_cache.slots[hvalue]; + avc_cache.slots[hvalue] = new; + +out: + return new; +} - for (;;) { - struct dentry * parent; +static inline struct avc_node *avc_search_node(u32 ssid, u32 tsid, + u16 tclass, int *probes) +{ + struct avc_node *cur; + int hvalue; + int tprobes = 1; - if (IS_ROOT(dentry)) { - goto global_root; - } - parent = dentry->d_parent; - namelen = dentry->d_name.len; - if (!namelen) - goto skip; - buflen -= namelen + 1; - if (buflen < 0) - break; - end -= namelen; - memcpy(end, dentry->d_name.name, namelen); - *--end = '/'; - retval = end; -skip: - dentry = parent; - if (!dentry) - break; + hvalue = avc_hash(ssid, tsid, tclass); + cur = avc_cache.slots[hvalue]; + while (cur != NULL && + (ssid != cur->ae.ssid || + tclass != cur->ae.tclass || + tsid != cur->ae.tsid)) { + tprobes++; + cur = cur->next; } - return retval; -global_root: - namelen = dentry->d_name.len; - buflen -= namelen; - if (buflen >= 0) { - retval -= namelen-1; /* hit the slash */ - memcpy(retval, dentry->d_name.name, namelen); + + if (cur == NULL) { + /* cache miss */ + goto out; } - return retval; + + /* cache hit */ + if (probes) + *probes = tprobes; + + cur->ae.used = 1; + +out: + return cur; } -/* - * Copied from net/core/utils.c:net_ratelimit and modified for - * use by the AVC audit facility. +/** + * avc_lookup - Look up an AVC entry. + * @ssid: source security identifier + * @tsid: target security identifier + * @tclass: target security class + * @requested: requested permissions, interpreted based on @tclass + * @aeref: AVC entry reference + * + * Look up an AVC entry that is valid for the + * @requested permissions between the SID pair + * (@ssid, @tsid), interpreting the permissions + * based on @tclass. If a valid AVC entry exists, + * then this function updates @aeref to refer to the + * entry and returns %0. Otherwise, this function + * returns -%ENOENT. */ +int avc_lookup(u32 ssid, u32 tsid, u16 tclass, + u32 requested, struct avc_entry_ref *aeref) +{ + struct avc_node *node; + int probes, rc = 0; -int avc_msg_cost = 5*HZ; -int avc_msg_burst = 10*5*HZ; + avc_cache_stats_incr(AVC_CAV_LOOKUPS); + node = avc_search_node(ssid, tsid, tclass,&probes); + + if (node && ((node->ae.avd.decided & requested) == requested)) { + avc_cache_stats_incr(AVC_CAV_HITS); + avc_cache_stats_add(AVC_CAV_PROBES,probes); + aeref->ae = &node->ae; + goto out; + } + + avc_cache_stats_incr(AVC_CAV_MISSES); + rc = -ENOENT; +out: + return rc; +} -/* - * This enforces a rate limit: not more than one kernel message - * every 5secs to make a denial-of-service attack impossible. - */ -int avc_ratelimit(void) +/** + * avc_insert - Insert an AVC entry. + * @ssid: source security identifier + * @tsid: target security identifier + * @tclass: target security class + * @ae: AVC entry + * @aeref: AVC entry reference + * + * Insert an AVC entry for the SID pair + * (@ssid, @tsid) and class @tclass. + * The access vectors and the sequence number are + * normally provided by the security server in + * response to a security_compute_av() call. If the + * sequence number @ae->avd.seqno is not less than the latest + * revocation notification, then the function copies + * the access vectors into a cache entry, updates + * @aeref to refer to the entry, and returns %0. + * Otherwise, this function returns -%EAGAIN. + */ +int avc_insert(u32 ssid, u32 tsid, u16 tclass, + struct avc_entry *ae, struct avc_entry_ref *aeref) { - static spinlock_t ratelimit_lock = SPIN_LOCK_UNLOCKED; - static unsigned long toks = 10*5*HZ; - static unsigned long last_msg; - static int missed; - unsigned long flags; - unsigned long now = jiffies; + struct avc_node *node; + int rc = 0; - spin_lock_irqsave(&ratelimit_lock, flags); - toks += now - last_msg; - last_msg = now; - if (toks > avc_msg_burst) - toks = avc_msg_burst; - if (toks >= avc_msg_cost) { - int lost = missed; - missed = 0; - toks -= avc_msg_cost; - spin_unlock_irqrestore(&ratelimit_lock, flags); - if (lost) - printk(KERN_WARNING "AVC: %d messages suppressed.\n", lost); - return 1; + if (ae->avd.seqno < avc_cache.latest_notif) { + printk(KERN_WARNING "avc: seqno %d < latest_notif %d\n", + ae->avd.seqno, avc_cache.latest_notif); + rc = -EAGAIN; + goto out; } - missed++; - spin_unlock_irqrestore(&ratelimit_lock, flags); - return 0; -} + node = avc_claim_node(ssid, tsid, tclass); + if (!node) { + rc = -ENOMEM; + goto out; + } -#ifdef CONFIG_SECURITY_SELINUX_DEVELOP + node->ae.avd.allowed = ae->avd.allowed; + node->ae.avd.decided = ae->avd.decided; + node->ae.avd.auditallow = ae->avd.auditallow; + node->ae.avd.auditdeny = ae->avd.auditdeny; + node->ae.avd.seqno = ae->avd.seqno; + aeref->ae = &node->ae; +out: + return rc; +} -static inline int check_avc_ratelimit(void) +static inline void avc_print_ipv6_addr(struct audit_buffer *ab, + struct in6_addr *addr, u16 port, + char *name1, char *name2) { - if (avc_debug_always_allow) - /* If permissive, then never suppress messages. */ - return 1; - else - return avc_ratelimit(); + if (!ipv6_addr_any(addr)) + audit_log_format(ab, " %s=%04x:%04x:%04x:%04x:%04x:" + "%04x:%04x:%04x", name1, NIP6(*addr)); + if (port) + audit_log_format(ab, " %s=%d", name2, ntohs(port)); } -#else - -static inline int check_avc_ratelimit(void) +static inline void avc_print_ipv4_addr(struct audit_buffer *ab, u32 addr, + u16 port, char *name1, char *name2) { - return avc_ratelimit(); + if (addr) + audit_log_format(ab, " %s=%d.%d.%d.%d", name1, NIPQUAD(addr)); + if (port) + audit_log_format(ab, " %s=%d", name2, ntohs(port)); } -#endif - - - -/* - * Audit the granting or denial of permissions. +/** + * avc_audit - Audit the granting or denial of permissions. + * @ssid: source security identifier + * @tsid: target security identifier + * @tclass: target security class + * @requested: requested permissions + * @avd: access vector decisions + * @result: result from avc_has_perm_noaudit + * @a: auxiliary audit data + * + * Audit the granting or denial of permissions in accordance + * with the policy. This function is typically called by + * avc_has_perm() after a permission check, but can also be + * called directly by callers who use avc_has_perm_noaudit() + * in order to separate the permission check from the auditing. + * For example, this separation is useful when the permission check must + * be performed under a lock, to allow the lock to be released + * before calling the auditing code. */ -void avc_audit( - security_id_t ssid, /* IN */ - security_id_t tsid, /* IN */ - security_class_t tclass, /* IN */ - access_vector_t audited, /* IN */ - struct avc_entry *ae, /* IN */ - __u32 denied, /* IN */ - avc_audit_data_t *a) /* IN */ +void avc_audit(u32 ssid, u32 tsid, + u16 tclass, u32 requested, + struct av_decision *avd, int result, struct avc_audit_data *a) { - char *p; + struct task_struct *tsk = current; + struct inode *inode = NULL; + u32 denied, audited; + struct audit_buffer *ab; - if (!check_avc_ratelimit()) - return; + denied = requested & ~avd->allowed; + if (denied) { + audited = denied; + if (!(audited & avd->auditdeny)) + return; + } else if (result) { + audited = denied = requested; + } else { + audited = requested; + if (!(audited & avd->auditallow)) + return; + } - printk("\navc: %s ", denied ? "denied" : "granted"); - avc_dump_av(tclass,audited); - printk(" for "); - if (current && current->pid) { - printk(" pid=%d", current->pid); - if (current->mm) { - struct vm_area_struct *vma = current->mm->mmap; - - while (vma) { - if ((vma->vm_flags & VM_EXECUTABLE) && - vma->vm_file) { - p = d_path(vma->vm_file->f_dentry, - vma->vm_file->f_vfsmnt, - avc_audit_buffer, - PAGE_SIZE); - printk(" exe=%s", p); - break; + ab = audit_log_start(current->audit_context); + if (!ab) + return; /* audit_panic has been called */ + audit_log_format(ab, "avc: %s ", denied ? "denied" : "granted"); + avc_dump_av(ab, tclass,audited); + audit_log_format(ab, " for "); + if (a && a->tsk) + tsk = a->tsk; + if (tsk && tsk->pid) { + struct mm_struct *mm; + struct vm_area_struct *vma; + audit_log_format(ab, " pid=%d", tsk->pid); + if (tsk == current) + mm = current->mm; + else + mm = get_task_mm(tsk); + if (mm) { + if (down_read_trylock(&mm->mmap_sem)) { + vma = mm->mmap; + while (vma) { + if ((vma->vm_flags & VM_EXECUTABLE) && + vma->vm_file) { + audit_log_d_path(ab, "exe=", + vma->vm_file->f_dentry, + vma->vm_file->f_vfsmnt); + break; + } + vma = vma->vm_next; } - vma = vma->vm_next; + up_read(&mm->mmap_sem); } + if (tsk != current) + mmput(mm); + } else { + audit_log_format(ab, " comm=%s", tsk->comm); } } if (a) { switch (a->type) { case AVC_AUDIT_DATA_IPC: - printk(" IPCID=%d", a->u.ipc_id); + audit_log_format(ab, " key=%d", a->u.ipc_id); break; case AVC_AUDIT_DATA_CAP: - printk(" capability=%d", a->u.cap); + audit_log_format(ab, " capability=%d", a->u.cap); break; case AVC_AUDIT_DATA_FS: if (a->u.fs.dentry) { - struct inode *inode = a->u.fs.dentry->d_inode; - - p = avc_d_path(a->u.fs.dentry, - avc_audit_buffer, - PAGE_SIZE); - if (p) - printk(" path=%s", p); - - if (inode) { - printk(" dev=%s ino=%ld", - kdevname(inode->i_dev), - inode->i_ino); + struct dentry *dentry = a->u.fs.dentry; + if (a->u.fs.mnt) { + audit_log_d_path(ab, "path=", dentry, + a->u.fs.mnt); + } else { + audit_log_format(ab, " name=%s", + dentry->d_name.name); } - } - - if (a->u.fs.inode) { - struct inode *inode = a->u.fs.inode; - struct dentry *dentry = d_find_alias(inode); - + inode = dentry->d_inode; + } else if (a->u.fs.inode) { + struct dentry *dentry; + inode = a->u.fs.inode; + dentry = d_find_alias(inode); if (dentry) { - p = avc_d_path(dentry, - avc_audit_buffer, - PAGE_SIZE); - if (p) - printk(" path=%s", p); + audit_log_format(ab, " name=%s", + dentry->d_name.name); dput(dentry); } - - printk(" dev=%s ino=%ld", - kdevname(inode->i_dev),inode->i_ino); } + if (inode) + audit_log_format(ab, " dev=%s ino=%ld", + inode->i_sb->s_id, + inode->i_ino); break; case AVC_AUDIT_DATA_NET: if (a->u.net.sk) { struct sock *sk = a->u.net.sk; + struct unix_sock *u; + int len = 0; + char *p = NULL; + + switch (sk->sk_family) { + case AF_INET: { + struct inet_opt *inet = inet_sk(sk); + + avc_print_ipv4_addr(ab, inet->rcv_saddr, + inet->sport, + "laddr", "lport"); + avc_print_ipv4_addr(ab, inet->daddr, + inet->dport, + "faddr", "fport"); + break; + } + case AF_INET6: { + struct inet_opt *inet = inet_sk(sk); + struct ipv6_pinfo *inet6 = inet6_sk(sk); - switch (sk->family) { - case AF_INET: - print_ipv4_addr(sk->rcv_saddr, - sk->sport, - "laddr", "lport"); - print_ipv4_addr(sk->daddr, - sk->dport, - "faddr", "fport"); + avc_print_ipv6_addr(ab, &inet6->rcv_saddr, + inet->sport, + "laddr", "lport"); + avc_print_ipv6_addr(ab, &inet6->daddr, + inet->dport, + "faddr", "fport"); break; - case AF_UNIX: - if (sk->protinfo.af_unix.dentry) { - p = d_path(sk->protinfo.af_unix.dentry, - sk->protinfo.af_unix.mnt, - avc_audit_buffer, - PAGE_SIZE); - printk(" path=%s", p); - } else if (sk->protinfo.af_unix.addr) { - p = avc_audit_buffer; - memcpy(p, - sk->protinfo.af_unix.addr->name->sun_path, - sk->protinfo.af_unix.addr->len-sizeof(short)); - if (*p == 0) { - *p = '@'; - p += sk->protinfo.af_unix.addr->len-sizeof(short); - *p = 0; - } - printk(" path=%s", - avc_audit_buffer); + } + case AF_UNIX: + u = unix_sk(sk); + if (u->dentry) { + audit_log_d_path(ab, "path=", + u->dentry, u->mnt); + break; } + if (!u->addr) + break; + len = u->addr->len-sizeof(short); + p = &u->addr->name->sun_path[0]; + if (*p) + audit_log_format(ab, + "path=%*.*s", len, + len, p); + else + audit_log_format(ab, + "path=@%*.*s", len-1, + len-1, p+1); break; } } - if (a->u.net.daddr) { - printk(" daddr=%d.%d.%d.%d", - NIPQUAD(a->u.net.daddr)); - if (a->u.net.port) - printk(" dest=%d", ntohs(a->u.net.port)); - } else if (a->u.net.port) - printk(" port=%d", ntohs(a->u.net.port)); - if (a->u.net.skb) { - struct sk_buff *skb = a->u.net.skb; + + switch (a->u.net.family) { + case AF_INET: + avc_print_ipv4_addr(ab, a->u.net.v4info.saddr, + a->u.net.sport, + "saddr", "src"); + avc_print_ipv4_addr(ab, a->u.net.v4info.daddr, + a->u.net.dport, + "daddr", "dest"); + break; + case AF_INET6: + avc_print_ipv6_addr(ab, &a->u.net.v6info.saddr, + a->u.net.sport, + "saddr", "src"); + avc_print_ipv6_addr(ab, &a->u.net.v6info.daddr, + a->u.net.dport, + "daddr", "dest"); + break; + } + if (a->u.net.netif) + audit_log_format(ab, " netif=%s", + a->u.net.netif); + break; + } + } + audit_log_format(ab, " "); + avc_dump_query(ab, ssid, tsid, tclass); + audit_log_end(ab); +} + +/** + * avc_add_callback - Register a callback for security events. + * @callback: callback function + * @events: security events + * @ssid: source security identifier or %SECSID_WILD + * @tsid: target security identifier or %SECSID_WILD + * @tclass: target security class + * @perms: permissions + * + * Register a callback function for events in the set @events + * related to the SID pair (@ssid, @tsid) and + * and the permissions @perms, interpreting + * @perms based on @tclass. Returns %0 on success or + * -%ENOMEM if insufficient memory exists to add the callback. + */ +int avc_add_callback(int (*callback)(u32 event, u32 ssid, u32 tsid, + u16 tclass, u32 perms, + u32 *out_retained), + u32 events, u32 ssid, u32 tsid, + u16 tclass, u32 perms) +{ + struct avc_callback_node *c; + int rc = 0; + + c = kmalloc(sizeof(*c), GFP_ATOMIC); + if (!c) { + rc = -ENOMEM; + goto out; + } + + c->callback = callback; + c->events = events; + c->ssid = ssid; + c->tsid = tsid; + c->perms = perms; + c->next = avc_callbacks; + avc_callbacks = c; +out: + return rc; +} - if (skb->nh.iph) { - __u16 source = 0, dest = 0; - __u8 protocol = skb->nh.iph->protocol; +static inline int avc_sidcmp(u32 x, u32 y) +{ + return (x == y || x == SECSID_WILD || y == SECSID_WILD); +} +static inline void avc_update_node(u32 event, struct avc_node *node, u32 perms) +{ + switch (event) { + case AVC_CALLBACK_GRANT: + node->ae.avd.allowed |= perms; + break; + case AVC_CALLBACK_TRY_REVOKE: + case AVC_CALLBACK_REVOKE: + node->ae.avd.allowed &= ~perms; + break; + case AVC_CALLBACK_AUDITALLOW_ENABLE: + node->ae.avd.auditallow |= perms; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Apr 19 22:07:09 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 22F2716A435; Wed, 19 Apr 2006 22:07:09 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCB7316A430 for ; Wed, 19 Apr 2006 22:07:08 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D516943D67 for ; Wed, 19 Apr 2006 22:07:06 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JM76FD077581 for ; Wed, 19 Apr 2006 22:07:06 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JM76X5077578 for perforce@freebsd.org; Wed, 19 Apr 2006 22:07:06 GMT (envelope-from millert@freebsd.org) Date: Wed, 19 Apr 2006 22:07:06 GMT Message-Id: <200604192207.k3JM76X5077578@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95633 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 22:07:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=95633 Change 95633 by millert@millert_g5tower on 2006/04/19 22:06:11 Fix editor goof in previous checkin. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#11 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#11 (text+ko) ==== @@ -185,7 +185,7 @@ printk(" tcontext=%s", scontext); kfree(scontext); } - printk(" tclass=%s", class_to_string(tclass)); + printk(" tclass=%s", security_class_to_string(tclass)); } /** From owner-p4-projects@FreeBSD.ORG Wed Apr 19 22:08:09 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D03816A427; Wed, 19 Apr 2006 22:08:09 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18F5616A425 for ; Wed, 19 Apr 2006 22:08:09 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A41C843D60 for ; Wed, 19 Apr 2006 22:08:08 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JM88B7077607 for ; Wed, 19 Apr 2006 22:08:08 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JM880R077604 for perforce@freebsd.org; Wed, 19 Apr 2006 22:08:08 GMT (envelope-from millert@freebsd.org) Date: Wed, 19 Apr 2006 22:08:08 GMT Message-Id: <200604192208.k3JM880R077604@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95634 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 22:08:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=95634 Change 95634 by millert@millert_g5tower on 2006/04/19 22:07:58 Fix botched proc_has_security() conversion Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#10 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#10 (text+ko) ==== @@ -63,7 +63,7 @@ void *kdata; int rc; - rc = proc_has_security(td->p_ucred, SECURITY__LOAD_POLICY); + rc = proc_has_security(td, SECURITY__LOAD_POLICY); if (rc) return (rc); From owner-p4-projects@FreeBSD.ORG Wed Apr 19 22:56:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E55D816A406; Wed, 19 Apr 2006 22:56:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1CD116A400 for ; Wed, 19 Apr 2006 22:56:07 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C21943D48 for ; Wed, 19 Apr 2006 22:56:07 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JMu7gf004004 for ; Wed, 19 Apr 2006 22:56:07 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JMu7SV004001 for perforce@freebsd.org; Wed, 19 Apr 2006 22:56:07 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 22:56:07 GMT Message-Id: <200604192256.k3JMu7SV004001@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95636 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 22:56:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=95636 Change 95636 by jb@jb_freebsd2 on 2006/04/19 22:55:07 Suck another header file. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace_impl.h#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Wed Apr 19 23:20:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 42EA016A406; Wed, 19 Apr 2006 23:20:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCBA116A405 for ; Wed, 19 Apr 2006 23:20:38 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FCEE43D53 for ; Wed, 19 Apr 2006 23:20:38 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JNKbGc018662 for ; Wed, 19 Apr 2006 23:20:37 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JNKbqf018650 for perforce@freebsd.org; Wed, 19 Apr 2006 23:20:37 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 23:20:37 GMT Message-Id: <200604192320.k3JNKbqf018650@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95637 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 23:20:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=95637 Change 95637 by jb@jb_freebsd2 on 2006/04/19 23:19:58 Hack up this code a bit as a temporary measure to avoid addressing some low level stuff which is at least operating system dependent. I need to learn a bit more about how DTrace works internally before porting that stuff. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace_impl.h#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace_impl.h#2 (text) ==== @@ -26,7 +26,9 @@ #ifndef _SYS_DTRACE_IMPL_H #define _SYS_DTRACE_IMPL_H +#if defined(sun) #pragma ident "@(#)dtrace_impl.h 1.20 06/04/03 SMI" +#endif #ifdef __cplusplus extern "C" { @@ -43,7 +45,12 @@ * Please refer to the "Solaris Dynamic Tracing Guide" for more information. */ +#if defined(sun) #include +#else +#include +#include +#endif /* * DTrace Implementation Constants and Typedefs @@ -1102,7 +1109,9 @@ int dts_nspeculations; /* number of speculations */ int dts_naggregations; /* number of aggregations */ dtrace_aggregation_t **dts_aggregations; /* aggregation array */ +#ifdef DOODAD vmem_t *dts_aggid_arena; /* arena for aggregation IDs */ +#endif uint64_t dts_errors; /* total number of errors */ uint32_t dts_speculations_busy; /* number of spec. busy */ uint32_t dts_speculations_unavail; /* number of spec unavail */ @@ -1110,8 +1119,10 @@ uint32_t dts_dblerrors; /* errors in ERROR probes */ uint32_t dts_reserve; /* space reserved for END */ hrtime_t dts_laststatus; /* time of last status */ +#ifdef DOODAD cyclic_id_t dts_cleaner; /* cleaning cyclic */ cyclic_id_t dts_deadman; /* deadman cyclic */ +#endif hrtime_t dts_alive; /* time last alive */ char dts_speculates; /* boolean: has speculations */ char dts_destructive; /* boolean: has dest. actions */ @@ -1223,7 +1234,9 @@ } dtrace_toxrange_t; extern uint64_t dtrace_getarg(int, int); +#ifdef DOODAD extern greg_t dtrace_getfp(void); +#endif extern int dtrace_getipl(void); extern uintptr_t dtrace_caller(int); extern uint32_t dtrace_cas32(uint32_t *, uint32_t, uint32_t); @@ -1232,8 +1245,10 @@ extern void dtrace_copyinstr(uintptr_t, uintptr_t, size_t); extern void dtrace_copyout(uintptr_t, uintptr_t, size_t); extern void dtrace_copyoutstr(uintptr_t, uintptr_t, size_t); +#ifdef DOODAD extern void dtrace_getpcstack(pc_t *, int, int, uint32_t *); extern ulong_t dtrace_getreg(struct regs *, uint_t); +#endif extern int dtrace_getstackdepth(int); extern void dtrace_getupcstack(uint64_t *, int); extern void dtrace_getufpstack(uint64_t *, uint64_t *, int); @@ -1247,7 +1262,7 @@ int, uintptr_t); extern int dtrace_assfail(const char *, const char *, int); extern int dtrace_attached(void); -extern hrtime_t dtrace_gethrestime(); +extern hrtime_t dtrace_gethrestime(void); #ifdef __sparc extern void dtrace_flush_windows(void); From owner-p4-projects@FreeBSD.ORG Wed Apr 19 23:24:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E2DBE16A406; Wed, 19 Apr 2006 23:24:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A944516A401 for ; Wed, 19 Apr 2006 23:24:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76B4043D49 for ; Wed, 19 Apr 2006 23:24:43 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JNOh4B020908 for ; Wed, 19 Apr 2006 23:24:43 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JNOhN1020905 for perforce@freebsd.org; Wed, 19 Apr 2006 23:24:43 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 23:24:43 GMT Message-Id: <200604192324.k3JNOhN1020905@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95638 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 23:24:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=95638 Change 95638 by jb@jb_freebsd2 on 2006/04/19 23:24:14 Protect definitions when included in kernel code. Also start moving the compatibility include paths to refer to the contrib directory. The reason for this is that FreeBSD's kernel monolithic build only has a usable include path to the sys directory. I need to support building the dtrace device and any of the providers into the kernel. At the moment the devices build fine as kernel modules because I can add to CFLAGS when building the modules. I don't want to make the kernel build any more complicated than it already is. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/time.h#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/time.h#2 (text+ko) ==== @@ -4,7 +4,7 @@ #define _OPENSOLARIS_COMPAT_SYS_TIME_H_ #include -#include +#include /* * Definitions for commonly used resolutions. @@ -16,10 +16,12 @@ typedef longlong_t hrtime_t; +#ifndef _KERNEL static __inline hrtime_t gethrtime() { struct timespec ts; clock_gettime(CLOCK_UPTIME,&ts); return (ts.tv_sec * NANOSEC + ts.tv_nsec); } +#endif #endif From owner-p4-projects@FreeBSD.ORG Thu Apr 20 00:54:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EB38816A408; Thu, 20 Apr 2006 00:54:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C596216A406 for ; Thu, 20 Apr 2006 00:54:31 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8901243D45 for ; Thu, 20 Apr 2006 00:54:31 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K0sVgV075321 for ; Thu, 20 Apr 2006 00:54:31 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K0sVbl075315 for perforce@freebsd.org; Thu, 20 Apr 2006 00:54:31 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 00:54:31 GMT Message-Id: <200604200054.k3K0sVbl075315@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95639 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 00:54:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=95639 Change 95639 by jb@jb_freebsd2 on 2006/04/20 00:53:58 Start referencing system header files relative to the sys directory so that they can be used when building devices into the kernel. I suspect I'll have many more iterations of how to handle these non-FreeBSD headers. For now I'm trying to avoid install *any* so that I can change my mind later. Affected files ... .. //depot/projects/dtrace/src/cddl/lib/libdtrace/Makefile#5 edit .. //depot/projects/dtrace/src/cddl/usr.sbin/dtrace/Makefile#2 edit Differences ... ==== //depot/projects/dtrace/src/cddl/lib/libdtrace/Makefile#5 (text+ko) ==== @@ -53,6 +53,7 @@ CFLAGS+= -I${.OBJDIR} \ -I${.CURDIR}/../../../contrib \ -I${.CURDIR}/../../../sys/contrib \ + -I${.CURDIR}/../../../sys \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \ ==== //depot/projects/dtrace/src/cddl/usr.sbin/dtrace/Makefile#2 (text+ko) ==== @@ -12,6 +12,7 @@ CFLAGS+= -I${.CURDIR}/../../../contrib \ -I${.CURDIR}/../../../sys/contrib \ + -I${.CURDIR}/../../../sys \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libproc/common \ From owner-p4-projects@FreeBSD.ORG Thu Apr 20 00:57:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 22EFB16A403; Thu, 20 Apr 2006 00:57:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD35716A401 for ; Thu, 20 Apr 2006 00:57:35 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A913A43D46 for ; Thu, 20 Apr 2006 00:57:35 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K0vZXn077769 for ; Thu, 20 Apr 2006 00:57:35 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K0vZsJ077763 for perforce@freebsd.org; Thu, 20 Apr 2006 00:57:35 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 00:57:35 GMT Message-Id: <200604200057.k3K0vZsJ077763@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95640 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 00:57:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=95640 Change 95640 by jb@jb_freebsd2 on 2006/04/20 00:56:56 Now that the provider list is being populated, use it to feed the debug.dtrace.providers sysctl value. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_sysctl.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_sysctl.c#2 (text+ko) ==== @@ -32,11 +32,49 @@ static int sysctl_dtrace_providers(SYSCTL_HANDLER_ARGS) { - char newname[32]; - strlcpy(newname, "someone", sizeof(newname)); - int error; + char *p_name = NULL; + dtrace_provider_t + *prov = dtrace_provider; + int error = 0; + size_t len = 0; + + mutex_enter(&dtrace_provider_lock); + mutex_enter(&dtrace_lock); + + /* Compute the length of the space-separated provider name string. */ + while (prov != NULL) { + len += strlen(prov->dtpv_name) + 1; + prov = prov->dtpv_next; + } + + if ((p_name = malloc(len, M_DTRACE, M_NOWAIT)) == NULL) + error = ENOMEM; + else { + /* Start with an empty string. */ + *p_name = '\0'; + + /* Point to the first provider again. */ + prov = dtrace_provider; + + /* Loop through the providers, appending the names. */ + while (prov != NULL) { + if (prov != dtrace_provider) + (void) strlcat(p_name, " ", len); + + (void) strlcat(p_name, prov->dtpv_name, len); + + prov = prov->dtpv_next; + } + } + + mutex_exit(&dtrace_lock); + mutex_exit(&dtrace_provider_lock); + + if (p_name != NULL) { + error = sysctl_handle_string(oidp, p_name, len, req); - error = sysctl_handle_string(oidp, &newname[0], sizeof(newname), req); + free(p_name, M_DTRACE); + } return (error); } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 00:58:38 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EDC7C16A404; Thu, 20 Apr 2006 00:58:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B435B16A401 for ; Thu, 20 Apr 2006 00:58:37 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6757C43D49 for ; Thu, 20 Apr 2006 00:58:37 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K0wb5b078473 for ; Thu, 20 Apr 2006 00:58:37 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K0wbxS078467 for perforce@freebsd.org; Thu, 20 Apr 2006 00:58:37 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 00:58:37 GMT Message-Id: <200604200058.k3K0wbxS078467@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95641 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 00:58:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=95641 Change 95641 by jb@jb_freebsd2 on 2006/04/20 00:58:31 Add convenience targets to load and unload the module. I do that an /awful/ lot! Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#4 (text+ko) ==== @@ -10,4 +10,10 @@ -I${.CURDIR}/../../contrib \ -I${.CURDIR}/../.. +load : + kldload dtrace + +unload : + kldunload dtrace + .include From owner-p4-projects@FreeBSD.ORG Thu Apr 20 01:00:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D7C2916A404; Thu, 20 Apr 2006 01:00:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8DF516A400 for ; Thu, 20 Apr 2006 01:00:40 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62E8843D46 for ; Thu, 20 Apr 2006 01:00:40 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K10eXd079873 for ; Thu, 20 Apr 2006 01:00:40 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K10eRb079867 for perforce@freebsd.org; Thu, 20 Apr 2006 01:00:40 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 01:00:40 GMT Message-Id: <200604200100.k3K10eRb079867@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95642 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 01:00:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95642 Change 95642 by jb@jb_freebsd2 on 2006/04/20 01:00:08 Include a FreeBSD header to get the _IO definitions. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_impl.h#5 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_impl.h#5 (text) ==== @@ -40,6 +40,7 @@ #include #include #include +#include #endif #include #include From owner-p4-projects@FreeBSD.ORG Thu Apr 20 01:03:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 233F416A403; Thu, 20 Apr 2006 01:03:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEFC616A401 for ; Thu, 20 Apr 2006 01:03:44 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90D8043D45 for ; Thu, 20 Apr 2006 01:03:44 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K13i15083446 for ; Thu, 20 Apr 2006 01:03:44 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K13i0f083443 for perforce@freebsd.org; Thu, 20 Apr 2006 01:03:44 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 01:03:44 GMT Message-Id: <200604200103.k3K13i0f083443@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95643 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 01:03:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=95643 Change 95643 by jb@jb_freebsd2 on 2006/04/20 01:02:57 Update two more of the ioctl definitions for the probe structure copyin/out. Add a few hacks to work around Solaris-isms. This is mostly a work-in-progress update to ensure that what's in the P4 project tree will build OK for others. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#4 (text) ==== @@ -55,7 +55,13 @@ #include #else #include +#include #include +#include +typedef struct ucred cred_t; +struct modctl { + int something; /* XXX */ +}; #endif #include #if defined(sun) @@ -1188,9 +1194,11 @@ #define DTRACEIOC_REPLICATE (DTRACEIOC | 18) /* replicate enab */ #else #define DTRACEIOC_PROVIDER _IO('x',1) /* provider query */ -#define DTRACEIOC_PROBES _IO('x',2) /* probe query */ +#define DTRACEIOC_PROBES _IOWR('x',2,dtrace_probedesc_t) + /* probe query */ #define DTRACEIOC_BUFSNAP _IO('x',4) /* snapshot buffer */ -#define DTRACEIOC_PROBEMATCH _IO('x',5) /* match probes */ +#define DTRACEIOC_PROBEMATCH _IOWR('x',5,dtrace_probedesc_t) + /* match probes */ #define DTRACEIOC_ENABLE _IO('x',6) /* enable probes */ #define DTRACEIOC_AGGSNAP _IO('x',7) /* snapshot agg. */ #define DTRACEIOC_EPROBE _IO('x',8) /* get eprobe desc. */ @@ -1969,9 +1977,7 @@ */ typedef struct dtrace_pops { void (*dtps_provide)(void *arg, const dtrace_probedesc_t *spec); -#ifdef DOODAD void (*dtps_provide_module)(void *arg, struct modctl *mp); -#endif void (*dtps_enable)(void *arg, dtrace_id_t id, void *parg); void (*dtps_disable)(void *arg, dtrace_id_t id, void *parg); void (*dtps_suspend)(void *arg, dtrace_id_t id, void *parg); @@ -1986,10 +1992,8 @@ typedef uintptr_t dtrace_provider_id_t; -#ifdef DOODAD extern int dtrace_register(const char *, const dtrace_pattr_t *, uint32_t, cred_t *, const dtrace_pops_t *, void *, dtrace_provider_id_t *); -#endif extern int dtrace_unregister(dtrace_provider_id_t); extern int dtrace_condense(dtrace_provider_id_t); extern void dtrace_invalidate(dtrace_provider_id_t); @@ -2244,6 +2248,15 @@ #define DTRACE_CPUFLAG_CLEAR(flag) \ (cpu_core[CPU->cpu_id].cpuc_dtrace_flags &= ~(flag)) +#if !defined(sun) +void cmn_err(int, const char *, ...); +#define CE_CONT 0 +#define CE_NOTE 1 +#define CE_WARN 2 +#define CE_PANIC 3 +#define CE_IGNORE 4 +#endif + #endif /* _KERNEL */ #endif /* _ASM */ From owner-p4-projects@FreeBSD.ORG Thu Apr 20 01:17:02 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B078816A403; Thu, 20 Apr 2006 01:17:02 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E69916A400 for ; Thu, 20 Apr 2006 01:17:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 364DE43D46 for ; Thu, 20 Apr 2006 01:17:02 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K1H2jg089388 for ; Thu, 20 Apr 2006 01:17:02 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K1H2ll089382 for perforce@freebsd.org; Thu, 20 Apr 2006 01:17:02 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 01:17:02 GMT Message-Id: <200604200117.k3K1H2ll089382@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95646 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 01:17:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=95646 Change 95646 by jb@jb_freebsd2 on 2006/04/20 01:16:26 Split a couple of functions out of the big wad. These don't need to be customised. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_badattr.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_badname.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 01:18:04 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8C25116A402; Thu, 20 Apr 2006 01:18:04 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A7B116A400 for ; Thu, 20 Apr 2006 01:18:04 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F04F343D45 for ; Thu, 20 Apr 2006 01:18:03 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K1I31C090208 for ; Thu, 20 Apr 2006 01:18:03 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K1I3A5090205 for perforce@freebsd.org; Thu, 20 Apr 2006 01:18:03 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 01:18:03 GMT Message-Id: <200604200118.k3K1I3A5090205@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95647 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 01:18:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=95647 Change 95647 by jb@jb_freebsd2 on 2006/04/20 01:17:33 A simple implementation of what looks like a standard Solaris kernel reporting mechanism. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/cmn_err.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 01:19:06 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2553616A404; Thu, 20 Apr 2006 01:19:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 035AD16A402 for ; Thu, 20 Apr 2006 01:19:06 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B019443D48 for ; Thu, 20 Apr 2006 01:19:05 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K1J5lK090936 for ; Thu, 20 Apr 2006 01:19:05 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K1J5x2090930 for perforce@freebsd.org; Thu, 20 Apr 2006 01:19:05 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 01:19:05 GMT Message-Id: <200604200119.k3K1J5x2090930@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95648 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 01:19:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=95648 Change 95648 by jb@jb_freebsd2 on 2006/04/20 01:18:34 Work-in-progress update. These are the functions which register and unregister providers. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_register.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unregister.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 01:22:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A1F4816A409; Thu, 20 Apr 2006 01:22:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C53516A402 for ; Thu, 20 Apr 2006 01:22:10 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6C2A43D46 for ; Thu, 20 Apr 2006 01:22:09 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K1M9jC093396 for ; Thu, 20 Apr 2006 01:22:09 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K1M9TL093388 for perforce@freebsd.org; Thu, 20 Apr 2006 01:22:09 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 01:22:09 GMT Message-Id: <200604200122.k3K1M9TL093388@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95649 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 01:22:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=95649 Change 95649 by jb@jb_freebsd2 on 2006/04/20 01:21:25 Work-in-progress update. Suck in the bulk of the Solaris dtrace device definitions, leaving things commented out that would cause compiler errors/warnings. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#5 (text+ko) ==== @@ -22,6 +22,50 @@ * */ +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * DTrace - Dynamic Tracing for Solaris + * + * This is the implementation of the Solaris Dynamic Tracing framework + * (DTrace). The user-visible interface to DTrace is described at length in + * the "Solaris Dynamic Tracing Guide". The interfaces between the libdtrace + * library, the in-kernel DTrace framework, and the DTrace providers are + * described in the block comments in the header file. The + * internal architecture of DTrace is described in the block comments in the + * header file. The comments contained within the DTrace + * implementation very much assume mastery of all of these sources; if one has + * an unanswered question about the implementation, one should consult them + * first. + * + * The functions here are ordered roughly as follows: + * + * - Probe context functions + * - Probe hashing functions + * - Non-probe context utility functions + * - Matching functions + * - Provider-to-Framework API functions + * - Probe management functions + * - DIF object functions + * - Format functions + * - Predicate functions + * - ECB functions + * - Buffer functions + * - Enabling functions + * - DOF functions + * - Anonymous enabling functions + * - Consumer state functions + * - Helper functions + * - Hook functions + * - Driver cookbook functions + * + * Each group of functions begins with a block comment labelled the "DTrace + * [Group] Functions", allowing one to find each block by searching forward + * on capital-f functions. + */ #include #include #include @@ -41,15 +85,20 @@ #include #include #include +#include -#include -#include +#include -#include -#include +/* For compatibility with Solaris code. */ +typedef struct mtx kmutex_t; +#define mutex_enter(_a) mtx_lock(_a) +#define mutex_exit(_a) mtx_unlock(_a) #define DTRACE_MINOR 0 +MALLOC_DECLARE(M_DTRACE); +MALLOC_DEFINE(M_DTRACE, "dtrace", "Dynamic Trace"); + static d_close_t dtrace_close; static d_ioctl_t dtrace_ioctl; static d_open_t dtrace_open; @@ -57,23 +106,380 @@ static int dtrace_unload(void); static struct cdevsw dtrace_cdevsw = { - .d_version = D_VERSION, - .d_close = dtrace_close, - .d_ioctl = dtrace_ioctl, - .d_open = dtrace_open, - .d_name = "dtrace", + .d_version = D_VERSION, + .d_close = dtrace_close, + .d_ioctl = dtrace_ioctl, + .d_open = dtrace_open, + .d_name = "dtrace", }; /* For use with make_dev(9)/destroy_dev(9). */ -static struct cdev *dtrace_dev; +static struct cdev *dtrace_dev; + +/* + * DTrace Tunable Variables + * + * The following variables may be tuned by adding a line to /etc/system that + * includes both the name of the DTrace module ("dtrace") and the name of the + * variable. For example: + * + * set dtrace:dtrace_destructive_disallow = 1 + * + * In general, the only variables that one should be tuning this way are those + * that affect system-wide DTrace behavior, and for which the default behavior + * is undesirable. Most of these variables are tunable on a per-consumer + * basis using DTrace options, and need not be tuned on a system-wide basis. + * When tuning these variables, avoid pathological values; while some attempt + * is made to verify the integrity of these variables, they are not considered + * part of the supported interface to DTrace, and they are therefore not + * checked comprehensively. Further, these variables should not be tuned + * dynamically via "mdb -kw" or other means; they should only be tuned via + * /etc/system. + */ +#ifdef DOODAD +int dtrace_destructive_disallow = 0; +dtrace_optval_t dtrace_nonroot_maxsize = (16 * 1024 * 1024); +size_t dtrace_difo_maxsize = (256 * 1024); +dtrace_optval_t dtrace_dof_maxsize = (256 * 1024); +size_t dtrace_global_maxsize = (16 * 1024); +size_t dtrace_actions_max = (16 * 1024); +size_t dtrace_retain_max = 1024; +dtrace_optval_t dtrace_helper_actions_max = 32; +dtrace_optval_t dtrace_helper_providers_max = 32; +dtrace_optval_t dtrace_dstate_defsize = (1 * 1024 * 1024); +size_t dtrace_strsize_default = 256; +dtrace_optval_t dtrace_cleanrate_default = 9900990; /* 101 hz */ +dtrace_optval_t dtrace_cleanrate_min = 200000; /* 5000 hz */ +dtrace_optval_t dtrace_cleanrate_max = (uint64_t)60 * NANOSEC; /* 1/minute */ +dtrace_optval_t dtrace_aggrate_default = NANOSEC; /* 1 hz */ +dtrace_optval_t dtrace_statusrate_default = NANOSEC; /* 1 hz */ +dtrace_optval_t dtrace_statusrate_max = (hrtime_t)10 * NANOSEC; /* 6/minute */ +dtrace_optval_t dtrace_switchrate_default = NANOSEC; /* 1 hz */ +dtrace_optval_t dtrace_nspec_default = 1; +dtrace_optval_t dtrace_specsize_default = 32 * 1024; +dtrace_optval_t dtrace_stackframes_default = 20; +dtrace_optval_t dtrace_ustackframes_default = 20; +dtrace_optval_t dtrace_jstackframes_default = 50; +dtrace_optval_t dtrace_jstackstrsize_default = 512; +int dtrace_msgdsize_max = 128; +hrtime_t dtrace_chill_max = 500 * (NANOSEC / MILLISEC); /* 500 ms */ +hrtime_t dtrace_chill_interval = NANOSEC; /* 1000 ms */ +int dtrace_devdepth_max = 32; +int dtrace_err_verbose; +hrtime_t dtrace_deadman_interval = NANOSEC; +hrtime_t dtrace_deadman_timeout = (hrtime_t)10 * NANOSEC; +hrtime_t dtrace_deadman_user = (hrtime_t)30 * NANOSEC; +#endif + +/* + * DTrace External Variables + * + * As dtrace(7D) is a kernel module, any DTrace variables are obviously + * available to DTrace consumers via the backtick (`) syntax. One of these, + * dtrace_zero, is made deliberately so: it is provided as a source of + * well-known, zero-filled memory. While this variable is not documented, + * it is used by some translators as an implementation detail. + */ +#ifdef DOODAD +const char dtrace_zero[256] = { 0 }; /* zero-filled memory */ +#endif + +/* + * DTrace Internal Variables + */ +#ifdef DOODAD +static dev_info_t *dtrace_devi; /* device info */ +static vmem_t *dtrace_arena; /* probe ID arena */ +static vmem_t *dtrace_minor; /* minor number arena */ +static taskq_t *dtrace_taskq; /* task queue */ +#endif +static dtrace_probe_t **dtrace_probes; /* array of all probes */ +static int dtrace_nprobes; /* number of probes */ +static dtrace_provider_t *dtrace_provider; /* provider list */ +#ifdef DOODAD +static dtrace_meta_t *dtrace_meta_pid; /* user-land meta provider */ +#endif +static int dtrace_opens; /* number of opens */ +static int dtrace_helpers; /* number of helpers */ +#ifdef DOODAD +static void *dtrace_softstate; /* softstate pointer */ +static dtrace_hash_t *dtrace_bymod; /* probes hashed by module */ +static dtrace_hash_t *dtrace_byfunc; /* probes hashed by function */ +static dtrace_hash_t *dtrace_byname; /* probes hashed by name */ +static dtrace_toxrange_t *dtrace_toxrange; /* toxic range array */ +static int dtrace_toxranges; /* number of toxic ranges */ +static int dtrace_toxranges_max; /* size of toxic range array */ +#endif +static dtrace_anon_t dtrace_anon; /* anonymous enabling */ +#ifdef DOODAD +static kmem_cache_t *dtrace_state_cache; /* cache for dynamic state */ +static uint64_t dtrace_vtime_references; /* number of vtimestamp refs */ +static kthread_t *dtrace_panicked; /* panicking thread */ +static dtrace_ecb_t *dtrace_ecb_create_cache; /* cached created ECB */ +static dtrace_genid_t dtrace_probegen; /* current probe generation */ +static dtrace_helpers_t *dtrace_deferred_pid; /* deferred helper list */ +static dtrace_enabling_t *dtrace_retained; /* list of retained enablings */ +static dtrace_dynvar_t dtrace_dynhash_sink; /* end of dynamic hash chains */ +#endif + +/* + * DTrace Locking + * DTrace is protected by three (relatively coarse-grained) locks: + * + * (1) dtrace_lock is required to manipulate essentially any DTrace state, + * including enabling state, probes, ECBs, consumer state, helper state, + * etc. Importantly, dtrace_lock is _not_ required when in probe context; + * probe context is lock-free -- synchronization is handled via the + * dtrace_sync() cross call mechanism. + * + * (2) dtrace_provider_lock is required when manipulating provider state, or + * when provider state must be held constant. + * + * (3) dtrace_meta_lock is required when manipulating meta provider state, or + * when meta provider state must be held constant. + * + * The lock ordering between these three locks is dtrace_meta_lock before + * dtrace_provider_lock before dtrace_lock. (In particular, there are + * several places where dtrace_provider_lock is held by the framework as it + * calls into the providers -- which then call back into the framework, + * grabbing dtrace_lock.) + * + * There are two other locks in the mix: mod_lock and cpu_lock. With respect + * to dtrace_provider_lock and dtrace_lock, cpu_lock continues its historical + * role as a coarse-grained lock; it is acquired before both of these locks. + * With respect to dtrace_meta_lock, its behavior is stranger: cpu_lock must + * be acquired _between_ dtrace_meta_lock and any other DTrace locks. + * mod_lock is similar with respect to dtrace_provider_lock in that it must be + * acquired _between_ dtrace_provider_lock and dtrace_lock. + */ + +static kmutex_t dtrace_lock; /* probe state lock */ +static kmutex_t dtrace_provider_lock; /* provider state lock */ +static kmutex_t dtrace_meta_lock; /* meta-provider state lock */ + +/* + * DTrace Provider Variables + * + * These are the variables relating to DTrace as a provider (that is, the + * provider of the BEGIN, END, and ERROR probes). + */ +static dtrace_pattr_t dtrace_provider_attr = { +{ DTRACE_STABILITY_STABLE, DTRACE_STABILITY_STABLE, DTRACE_CLASS_COMMON }, +{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, +{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, +{ DTRACE_STABILITY_STABLE, DTRACE_STABILITY_STABLE, DTRACE_CLASS_COMMON }, +{ DTRACE_STABILITY_STABLE, DTRACE_STABILITY_STABLE, DTRACE_CLASS_COMMON }, +}; + +static void +dtrace_nullop(void) +{} + +static dtrace_pops_t dtrace_provider_ops = { + (void (*)(void *, const dtrace_probedesc_t *))dtrace_nullop, + (void (*)(void *, struct modctl *))dtrace_nullop, + (void (*)(void *, dtrace_id_t, void *))dtrace_nullop, + (void (*)(void *, dtrace_id_t, void *))dtrace_nullop, + (void (*)(void *, dtrace_id_t, void *))dtrace_nullop, + (void (*)(void *, dtrace_id_t, void *))dtrace_nullop, + NULL, + NULL, + NULL, + (void (*)(void *, dtrace_id_t, void *))dtrace_nullop +}; + +#ifdef DOODAD +static dtrace_id_t dtrace_probeid_begin; /* special BEGIN probe */ +static dtrace_id_t dtrace_probeid_end; /* special END probe */ +dtrace_id_t dtrace_probeid_error; /* special ERROR probe */ + +/* + * DTrace Helper Tracing Variables + */ +uint32_t dtrace_helptrace_next = 0; +uint32_t dtrace_helptrace_nlocals; +char *dtrace_helptrace_buffer; +int dtrace_helptrace_bufsize = 512 * 1024; + +#ifdef DEBUG +int dtrace_helptrace_enabled = 1; +#else +int dtrace_helptrace_enabled = 0; +#endif + +/* + * DTrace Error Hashing + * + * On DEBUG kernels, DTrace will track the errors that has seen in a hash + * table. This is very useful for checking coverage of tests that are + * expected to induce DIF or DOF processing errors, and may be useful for + * debugging problems in the DIF code generator or in DOF generation . The + * error hash may be examined with the ::dtrace_errhash MDB dcmd. + */ +#ifdef DEBUG +static dtrace_errhash_t dtrace_errhash[DTRACE_ERRHASHSZ]; +static const char *dtrace_errlast; +static kthread_t *dtrace_errthread; +static kmutex_t dtrace_errlock; +#endif + +/* + * DTrace Macros and Constants + * + * These are various macros that are useful in various spots in the + * implementation, along with a few random constants that have no meaning + * outside of the implementation. There is no real structure to this cpp + * mishmash -- but is there ever? + */ +#define DTRACE_HASHSTR(hash, probe) \ + dtrace_hash_str(*((char **)((uintptr_t)(probe) + (hash)->dth_stroffs))) + +#define DTRACE_HASHNEXT(hash, probe) \ + (dtrace_probe_t **)((uintptr_t)(probe) + (hash)->dth_nextoffs) + +#define DTRACE_HASHPREV(hash, probe) \ + (dtrace_probe_t **)((uintptr_t)(probe) + (hash)->dth_prevoffs) + +#define DTRACE_HASHEQ(hash, lhs, rhs) \ + (strcmp(*((char **)((uintptr_t)(lhs) + (hash)->dth_stroffs)), \ + *((char **)((uintptr_t)(rhs) + (hash)->dth_stroffs))) == 0) + +#define DTRACE_AGGHASHSIZE_SLEW 17 + +/* + * The key for a thread-local variable consists of the lower 61 bits of the + * t_did, plus the 3 bits of the highest active interrupt above LOCK_LEVEL. + * We add DIF_VARIABLE_MAX to t_did to assure that the thread key is never + * equal to a variable identifier. This is necessary (but not sufficient) to + * assure that global associative arrays never collide with thread-local + * variables. To guarantee that they cannot collide, we must also define the + * order for keying dynamic variables. That order is: + * + * [ key0 ] ... [ keyn ] [ variable-key ] [ tls-key ] + * + * Because the variable-key and the tls-key are in orthogonal spaces, there is + * no way for a global variable key signature to match a thread-local key + * signature. + */ +#define DTRACE_TLS_THRKEY(where) { \ + uint_t intr = 0; \ + uint_t actv = CPU->cpu_intr_actv >> (LOCK_LEVEL + 1); \ + for (; actv; actv >>= 1) \ + intr++; \ + ASSERT(intr < (1 << 3)); \ + (where) = ((curthread->t_did + DIF_VARIABLE_MAX) & \ + (((uint64_t)1 << 61) - 1)) | ((uint64_t)intr << 61); \ +} + +#define DTRACE_STORE(type, tomax, offset, what) \ + *((type *)((uintptr_t)(tomax) + (uintptr_t)offset)) = (type)(what); + +#ifndef __i386 +#define DTRACE_ALIGNCHECK(addr, size, flags) \ + if (addr & (size - 1)) { \ + *flags |= CPU_DTRACE_BADALIGN; \ + cpu_core[CPU->cpu_id].cpuc_dtrace_illval = addr; \ + return (0); \ + } +#else +#define DTRACE_ALIGNCHECK(addr, size, flags) +#endif + +#define DTRACE_LOADFUNC(bits) \ +/*CSTYLED*/ \ +uint##bits##_t \ +dtrace_load##bits(uintptr_t addr) \ +{ \ + size_t size = bits / NBBY; \ + /*CSTYLED*/ \ + uint##bits##_t rval; \ + int i; \ + volatile uint16_t *flags = (volatile uint16_t *) \ + &cpu_core[CPU->cpu_id].cpuc_dtrace_flags; \ + \ + DTRACE_ALIGNCHECK(addr, size, flags); \ + \ + for (i = 0; i < dtrace_toxranges; i++) { \ + if (addr >= dtrace_toxrange[i].dtt_limit) \ + continue; \ + \ + if (addr + size <= dtrace_toxrange[i].dtt_base) \ + continue; \ + \ + /* \ + * This address falls within a toxic region; return 0. \ + */ \ + *flags |= CPU_DTRACE_BADADDR; \ + cpu_core[CPU->cpu_id].cpuc_dtrace_illval = addr; \ + return (0); \ + } \ + \ + *flags |= CPU_DTRACE_NOFAULT; \ + /*CSTYLED*/ \ + rval = *((volatile uint##bits##_t *)addr); \ + *flags &= ~CPU_DTRACE_NOFAULT; \ + \ + return (rval); \ +} + +#ifdef _LP64 +#define dtrace_loadptr dtrace_load64 +#else +#define dtrace_loadptr dtrace_load32 +#endif + +#define DTRACE_DYNHASH_FREE 0 +#define DTRACE_DYNHASH_SINK 1 +#define DTRACE_DYNHASH_VALID 2 + +#define DTRACE_MATCH_NEXT 0 +#define DTRACE_MATCH_DONE 1 +#define DTRACE_ANCHORED(probe) ((probe)->dtpr_func[0] != '\0') +#define DTRACE_STATE_ALIGN 64 + +#define DTRACE_FLAGS2FLT(flags) \ + (((flags) & CPU_DTRACE_BADADDR) ? DTRACEFLT_BADADDR : \ + ((flags) & CPU_DTRACE_ILLOP) ? DTRACEFLT_ILLOP : \ + ((flags) & CPU_DTRACE_DIVZERO) ? DTRACEFLT_DIVZERO : \ + ((flags) & CPU_DTRACE_KPRIV) ? DTRACEFLT_KPRIV : \ + ((flags) & CPU_DTRACE_UPRIV) ? DTRACEFLT_UPRIV : \ + ((flags) & CPU_DTRACE_TUPOFLOW) ? DTRACEFLT_TUPOFLOW : \ + ((flags) & CPU_DTRACE_BADALIGN) ? DTRACEFLT_BADALIGN : \ + ((flags) & CPU_DTRACE_NOSCRATCH) ? DTRACEFLT_NOSCRATCH : \ + DTRACEFLT_UNKNOWN) + +#define DTRACEACT_ISSTRING(act) \ + ((act)->dta_kind == DTRACEACT_DIFEXPR && \ + (act)->dta_difo->dtdo_rtype.dtdt_kind == DIF_TYPE_STRING) + +static dtrace_probe_t *dtrace_probe_lookup_id(dtrace_id_t id); +static void dtrace_enabling_provide(dtrace_provider_t *); +static int dtrace_enabling_match(dtrace_enabling_t *, int *); +static void dtrace_enabling_matchall(void); +static dtrace_state_t *dtrace_anon_grab(void); +static uint64_t dtrace_helper(int, dtrace_mstate_t *, + dtrace_state_t *, uint64_t, uint64_t); +static dtrace_helpers_t *dtrace_helpers_create(proc_t *); +static void dtrace_buffer_drop(dtrace_buffer_t *); +static intptr_t dtrace_buffer_reserve(dtrace_buffer_t *, size_t, size_t, + dtrace_state_t *, dtrace_mstate_t *); +static int dtrace_state_option(dtrace_state_t *, dtrace_optid_t, + dtrace_optval_t); +static int dtrace_ecb_create_enable(dtrace_probe_t *, void *); +#endif +#include +#include +#include #include #include #include #include #include +#include #include #include +#include DEV_MODULE(dtrace, dtrace_modevent, NULL); MODULE_VERSION(dtrace, 1); From owner-p4-projects@FreeBSD.ORG Thu Apr 20 01:29:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7AB4916A405; Thu, 20 Apr 2006 01:29:19 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4193516A403 for ; Thu, 20 Apr 2006 01:29:19 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE52C43D45 for ; Thu, 20 Apr 2006 01:29:18 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K1TIKF094266 for ; Thu, 20 Apr 2006 01:29:18 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K1TIRZ094263 for perforce@freebsd.org; Thu, 20 Apr 2006 01:29:18 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 01:29:18 GMT Message-Id: <200604200129.k3K1TIRZ094263@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95650 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 01:29:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=95650 Change 95650 by jb@jb_freebsd2 on 2006/04/20 01:28:33 Work-in-progress update. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#2 (text+ko) ==== @@ -27,32 +27,23 @@ dtrace_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr __unused, int flags __unused, struct thread *td __unused) { - dtrace_conf_t conf; - int error = 0; switch (cmd) { - /* Really handled in upper layer */ - case FIOASYNC: - case FIONBIO: + case DTRACEIOC_AGGDESC: +printf("DTRACEIOC_AGGDESC:\n"); +error = EINVAL; break; - case DTRACEIOC_PROVIDER: + case DTRACEIOC_AGGSNAP: +printf("DTRACEIOC_AGGSNAP:\n"); +error = EINVAL; break; - case DTRACEIOC_PROBES: - break; case DTRACEIOC_BUFSNAP: +printf("DTRACEIOC_BUFSNAP:\n"); +error = EINVAL; break; - case DTRACEIOC_PROBEMATCH: - break; - case DTRACEIOC_ENABLE: - break; - case DTRACEIOC_AGGSNAP: - break; - case DTRACEIOC_EPROBE: - break; - case DTRACEIOC_PROBEARG: - break; - case DTRACEIOC_CONF: + case DTRACEIOC_CONF: { + dtrace_conf_t conf; bzero(&conf, sizeof (conf)); conf.dtc_difversion = DIF_VERSION; conf.dtc_difintregs = DIF_DIR_NREGS; @@ -62,20 +53,125 @@ *((dtrace_conf_t *) addr) = conf; return (0); + } + case DTRACEIOC_DOFGET: +printf("DTRACEIOC_DOFGET:\n"); +error = EINVAL; + break; + case DTRACEIOC_ENABLE: +printf("DTRACEIOC_ENABLE:\n"); +error = EINVAL; break; - case DTRACEIOC_STATUS: + case DTRACEIOC_EPROBE: +printf("DTRACEIOC_EPROBE:\n"); +error = EINVAL; + break; + case DTRACEIOC_FORMAT: +printf("DTRACEIOC_FORMAT:\n"); +error = EINVAL; break; case DTRACEIOC_GO: +printf("DTRACEIOC_GO:\n"); +error = EINVAL; + break; + case DTRACEIOC_PROBEARG: +printf("DTRACEIOC_PROBEARG:\n"); +error = EINVAL; break; - case DTRACEIOC_STOP: + case DTRACEIOC_PROBEMATCH: + case DTRACEIOC_PROBES: { +#ifdef DOODAD + dtrace_probe_t *probe = NULL; + dtrace_probedesc_t desc; + dtrace_probekey_t pkey; + dtrace_id_t i; + int m = 0; + uint32_t priv; + uid_t uid; + zoneid_t zoneid; + + if (copyin((void *)arg, &desc, sizeof (desc)) != 0) + return (EFAULT); + + desc.dtpd_provider[DTRACE_PROVNAMELEN - 1] = '\0'; + desc.dtpd_mod[DTRACE_MODNAMELEN - 1] = '\0'; + desc.dtpd_func[DTRACE_FUNCNAMELEN - 1] = '\0'; + desc.dtpd_name[DTRACE_NAMELEN - 1] = '\0'; + + /* + * Before we attempt to match this probe, we want to give + * all providers the opportunity to provide it. + */ + if (desc.dtpd_id == DTRACE_IDNONE) { + mutex_enter(&dtrace_provider_lock); + dtrace_probe_provide(&desc, NULL); + mutex_exit(&dtrace_provider_lock); + desc.dtpd_id++; + } + + if (cmd == DTRACEIOC_PROBEMATCH) { + dtrace_probekey(&desc, &pkey); + pkey.dtpk_id = DTRACE_IDNONE; + } + + dtrace_cred2priv(cr, &priv, &uid, &zoneid); + + mutex_enter(&dtrace_lock); + + if (cmd == DTRACEIOC_PROBEMATCH) { + for (i = desc.dtpd_id; i <= dtrace_nprobes; i++) { + if ((probe = dtrace_probes[i - 1]) != NULL && + (m = dtrace_match_probe(probe, &pkey, + priv, uid, zoneid)) != 0) + break; + } + + if (m < 0) { + mutex_exit(&dtrace_lock); + return (EINVAL); + } + + } else { + for (i = desc.dtpd_id; i <= dtrace_nprobes; i++) { + if ((probe = dtrace_probes[i - 1]) != NULL && + dtrace_match_priv(probe, priv, uid, zoneid)) + break; + } + } + + if (probe == NULL) { + mutex_exit(&dtrace_lock); + return (ESRCH); + } + + dtrace_probe_description(probe, &desc); + mutex_exit(&dtrace_lock); + + if (copyout(&desc, (void *)arg, sizeof (desc)) != 0) + return (EFAULT); +#endif + + return (0); + } + case DTRACEIOC_PROVIDER: +printf("DTRACEIOC_PROVIDER:\n"); +error = EINVAL; break; - case DTRACEIOC_AGGDESC: + case DTRACEIOC_REPLICATE: +printf("DTRACEIOC_REPLICATE:\n"); +error = EINVAL; break; - case DTRACEIOC_FORMAT: + case DTRACEIOC_STATUS: +printf("DTRACEIOC_STATUS:\n"); +error = EINVAL; break; - case DTRACEIOC_DOFGET: + case DTRACEIOC_STOP: +printf("DTRACEIOC_STOP:\n"); +error = EINVAL; break; - case DTRACEIOC_REPLICATE: + /* Really handled in upper layer */ + case FIOASYNC: + case FIONBIO: break; default: error = ENOTTY; ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#2 (text+ko) ==== @@ -22,14 +22,194 @@ * */ +/* + * This function implements similar code to the Solaris dtrace_attach() + * function. + */ + static int dtrace_load() { + dtrace_provider_id_t id; +#ifdef DOODAD + dtrace_state_t *state = NULL; + dtrace_enabling_t *enab; +#endif int error = 0; + mtx_init(&dtrace_lock,"dtrace probe state",NULL,MTX_RECURSE); + mtx_init(&dtrace_provider_lock,"dtrace provider state",NULL,MTX_RECURSE); + mtx_init(&dtrace_meta_lock,"dtrace meta-provider state",NULL,MTX_RECURSE); + /* Create the /dev/dtrace entry. */ dtrace_dev = make_dev(&dtrace_cdevsw, DTRACE_MINOR, UID_ROOT, GID_WHEEL, 0660, "dtrace"); +#ifdef DOODAD + mtx_lock(&cpu_lock); +#endif + mtx_lock(&dtrace_provider_lock); + mtx_lock(&dtrace_lock); + +#ifdef DOODAD + if (ddi_soft_state_init(&dtrace_softstate, + sizeof (dtrace_state_t), 0) != 0) { + cmn_err(CE_NOTE, "/dev/dtrace failed to initialize soft state"); + mutex_exit(&cpu_lock); + mutex_exit(&dtrace_provider_lock); + mutex_exit(&dtrace_lock); + return (DDI_FAILURE); + } + + if (ddi_create_minor_node(devi, DTRACEMNR_DTRACE, S_IFCHR, + DTRACEMNRN_DTRACE, DDI_PSEUDO, NULL) == DDI_FAILURE || + ddi_create_minor_node(devi, DTRACEMNR_HELPER, S_IFCHR, + DTRACEMNRN_HELPER, DDI_PSEUDO, NULL) == DDI_FAILURE) { + cmn_err(CE_NOTE, "/dev/dtrace couldn't create minor nodes"); + ddi_remove_minor_node(devi, NULL); + ddi_soft_state_fini(&dtrace_softstate); + mutex_exit(&cpu_lock); + mutex_exit(&dtrace_provider_lock); + mutex_exit(&dtrace_lock); + return (DDI_FAILURE); + } + + ddi_report_dev(devi); + dtrace_devi = devi; + + dtrace_modload = dtrace_module_loaded; + dtrace_modunload = dtrace_module_unloaded; + dtrace_cpu_init = dtrace_cpu_setup_initial; + dtrace_helpers_cleanup = dtrace_helpers_destroy; + dtrace_helpers_fork = dtrace_helpers_duplicate; + dtrace_cpustart_init = dtrace_suspend; + dtrace_cpustart_fini = dtrace_resume; + dtrace_debugger_init = dtrace_suspend; + dtrace_debugger_fini = dtrace_resume; + dtrace_kreloc_init = dtrace_suspend; + dtrace_kreloc_fini = dtrace_resume; + + register_cpu_setup_func((cpu_setup_func_t *)dtrace_cpu_setup, NULL); + + ASSERT(MUTEX_HELD(&cpu_lock)); + + dtrace_arena = vmem_create("dtrace", (void *)1, UINT32_MAX, 1, + NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER); + dtrace_minor = vmem_create("dtrace_minor", (void *)DTRACEMNRN_CLONE, + UINT32_MAX - DTRACEMNRN_CLONE, 1, NULL, NULL, NULL, 0, + VM_SLEEP | VMC_IDENTIFIER); + dtrace_taskq = taskq_create("dtrace_taskq", 1, maxclsyspri, + 1, INT_MAX, 0); + + dtrace_state_cache = kmem_cache_create("dtrace_state_cache", + sizeof (dtrace_dstate_percpu_t) * NCPU, DTRACE_STATE_ALIGN, + NULL, NULL, NULL, NULL, NULL, 0); + + ASSERT(MUTEX_HELD(&cpu_lock)); + dtrace_bymod = dtrace_hash_create(offsetof(dtrace_probe_t, dtpr_mod), + offsetof(dtrace_probe_t, dtpr_nextmod), + offsetof(dtrace_probe_t, dtpr_prevmod)); + + dtrace_byfunc = dtrace_hash_create(offsetof(dtrace_probe_t, dtpr_func), + offsetof(dtrace_probe_t, dtpr_nextfunc), + offsetof(dtrace_probe_t, dtpr_prevfunc)); + + dtrace_byname = dtrace_hash_create(offsetof(dtrace_probe_t, dtpr_name), + offsetof(dtrace_probe_t, dtpr_nextname), + offsetof(dtrace_probe_t, dtpr_prevname)); + + if (dtrace_retain_max < 1) { + cmn_err(CE_WARN, "illegal value (%lu) for dtrace_retain_max; " + "setting to 1", dtrace_retain_max); + dtrace_retain_max = 1; + } + + /* + * Now discover our toxic ranges. + */ + dtrace_toxic_ranges(dtrace_toxrange_add); +#endif + + /* + * Before we register ourselves as a provider to our own framework, + * we would like to assert that dtrace_provider is NULL -- but that's + * not true if we were loaded as a dependency of a DTrace provider. + * Once we've registered, we can assert that dtrace_provider is our + * pseudo provider. + */ + (void) dtrace_register("dtrace", &dtrace_provider_attr, + DTRACE_PRIV_NONE, 0, &dtrace_provider_ops, NULL, &id); + +#ifdef DOODAD + ASSERT(dtrace_provider != NULL); + ASSERT((dtrace_provider_id_t)dtrace_provider == id); + + dtrace_probeid_begin = dtrace_probe_create((dtrace_provider_id_t) + dtrace_provider, NULL, NULL, "BEGIN", 0, NULL); + dtrace_probeid_end = dtrace_probe_create((dtrace_provider_id_t) + dtrace_provider, NULL, NULL, "END", 0, NULL); + dtrace_probeid_error = dtrace_probe_create((dtrace_provider_id_t) + dtrace_provider, NULL, NULL, "ERROR", 1, NULL); + + dtrace_anon_property(); + mutex_exit(&cpu_lock); + + /* + * If DTrace helper tracing is enabled, we need to allocate the + * trace buffer and initialize the values. + */ + if (dtrace_helptrace_enabled) { + ASSERT(dtrace_helptrace_buffer == NULL); + dtrace_helptrace_buffer = + kmem_zalloc(dtrace_helptrace_bufsize, KM_SLEEP); + dtrace_helptrace_next = 0; + } + + /* + * If there are already providers, we must ask them to provide their + * probes, and then match any anonymous enabling against them. Note + * that there should be no other retained enablings at this time: + * the only retained enablings at this time should be the anonymous + * enabling. + */ + if (dtrace_anon.dta_enabling != NULL) { + ASSERT(dtrace_retained == dtrace_anon.dta_enabling); + + dtrace_enabling_provide(NULL); + state = dtrace_anon.dta_state; + + /* + * We couldn't hold cpu_lock across the above call to + * dtrace_enabling_provide(), but we must hold it to actually + * enable the probes. We have to drop all of our locks, pick + * up cpu_lock, and regain our locks before matching the + * retained anonymous enabling. + */ + mutex_exit(&dtrace_lock); + mutex_exit(&dtrace_provider_lock); + + mutex_enter(&cpu_lock); + mutex_enter(&dtrace_provider_lock); + mutex_enter(&dtrace_lock); + + if ((enab = dtrace_anon.dta_enabling) != NULL) + (void) dtrace_enabling_match(enab, NULL); + + mutex_exit(&cpu_lock); + } +#endif + + mtx_unlock(&dtrace_lock); + mtx_unlock(&dtrace_provider_lock); + +#ifdef DOODAD + if (state != NULL) { + /* + * If we created any anonymous state, set it going now. + */ + (void) dtrace_state_go(state, &dtrace_anon.dta_beganon); + } +#endif + return (error); } ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#2 (text+ko) ==== @@ -22,13 +22,136 @@ * */ +#define DDI_FAILURE EBUSY + static int dtrace_unload() { int error = 0; +#ifdef DOODAD + mutex_enter(&cpu_lock); +#endif + mutex_enter(&dtrace_provider_lock); + mutex_enter(&dtrace_lock); + +#ifdef DOODAD + ASSERT(dtrace_opens == 0); +#endif + + if (dtrace_helpers > 0) { + mutex_exit(&dtrace_provider_lock); + mutex_exit(&dtrace_lock); +#ifdef DOODAD + mutex_exit(&cpu_lock); +#endif + return (DDI_FAILURE); + } + + if (dtrace_unregister((dtrace_provider_id_t)dtrace_provider) != 0) { + mutex_exit(&dtrace_provider_lock); + mutex_exit(&dtrace_lock); +#ifdef DOODAD + mutex_exit(&cpu_lock); +#endif + return (DDI_FAILURE); + } + + dtrace_provider = NULL; + +#ifdef DOODAD + if ((state = dtrace_anon_grab()) != NULL) { + /* + * If there were ECBs on this state, the provider should + * have not been allowed to detach; assert that there is + * none. + */ + ASSERT(state->dts_necbs == 0); + dtrace_state_destroy(state); + + /* + * If we're being detached with anonymous state, we need to + * indicate to the kernel debugger that DTrace is now inactive. + */ + (void) kdi_dtrace_set(KDI_DTSET_DTRACE_DEACTIVATE); + } + + bzero(&dtrace_anon, sizeof (dtrace_anon_t)); + unregister_cpu_setup_func((cpu_setup_func_t *)dtrace_cpu_setup, NULL); + dtrace_cpu_init = NULL; + dtrace_helpers_cleanup = NULL; + dtrace_helpers_fork = NULL; + dtrace_cpustart_init = NULL; + dtrace_cpustart_fini = NULL; + dtrace_debugger_init = NULL; + dtrace_debugger_fini = NULL; + dtrace_kreloc_init = NULL; + dtrace_kreloc_fini = NULL; + dtrace_modload = NULL; + dtrace_modunload = NULL; + + mutex_exit(&cpu_lock); + + if (dtrace_helptrace_enabled) { + kmem_free(dtrace_helptrace_buffer, dtrace_helptrace_bufsize); + dtrace_helptrace_buffer = NULL; + } + + kmem_free(dtrace_probes, dtrace_nprobes * sizeof (dtrace_probe_t *)); + dtrace_probes = NULL; + dtrace_nprobes = 0; + + dtrace_hash_destroy(dtrace_bymod); + dtrace_hash_destroy(dtrace_byfunc); + dtrace_hash_destroy(dtrace_byname); + dtrace_bymod = NULL; + dtrace_byfunc = NULL; + dtrace_byname = NULL; + + kmem_cache_destroy(dtrace_state_cache); + vmem_destroy(dtrace_minor); + vmem_destroy(dtrace_arena); + + if (dtrace_toxrange != NULL) { + kmem_free(dtrace_toxrange, + dtrace_toxranges_max * sizeof (dtrace_toxrange_t)); + dtrace_toxrange = NULL; + dtrace_toxranges = 0; + dtrace_toxranges_max = 0; + } + + ddi_remove_minor_node(dtrace_devi, NULL); + dtrace_devi = NULL; + + ddi_soft_state_fini(&dtrace_softstate); + + ASSERT(dtrace_vtime_references == 0); + ASSERT(dtrace_opens == 0); + ASSERT(dtrace_retained == NULL); +#endif + + mtx_unlock(&dtrace_lock); + mtx_unlock(&dtrace_provider_lock); + + /* + * We don't destroy the task queue until after we have dropped our + * locks (taskq_destroy() may block on running tasks). To prevent + * attempting to do work after we have effectively detached but before + * the task queue has been destroyed, all tasks dispatched via the + * task queue must check that DTrace is still attached before + * performing any operation. + */ +#ifdef DOODAD + taskq_destroy(dtrace_taskq); + dtrace_taskq = NULL; +#endif + /* Destroy the /dev/dtrace entry. */ destroy_dev(dtrace_dev); + mtx_destroy(&dtrace_meta_lock); + mtx_destroy(&dtrace_provider_lock); + mtx_destroy(&dtrace_lock); + return (error); } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 01:34:26 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DC4816A401; Thu, 20 Apr 2006 01:34:26 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7C8E16A403 for ; Thu, 20 Apr 2006 01:34:25 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 906B143D45 for ; Thu, 20 Apr 2006 01:34:25 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K1YP0R098082 for ; Thu, 20 Apr 2006 01:34:25 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K1YP57098076 for perforce@freebsd.org; Thu, 20 Apr 2006 01:34:25 GMT (envelope-from soc-andrew@freebsd.org) Date: Thu, 20 Apr 2006 01:34:25 GMT Message-Id: <200604200134.k3K1YP57098076@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 95651 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 01:34:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=95651 Change 95651 by soc-andrew@soc-andrew_serv on 2006/04/20 01:34:22 500_install_os.lua needs POSIX to be defined Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/500_install_os.lua#8 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/500_install_os.lua#8 (text+ko) ==== @@ -10,6 +10,8 @@ -- 5) clean up -- +local POSIX = require("posix") + return { id = "install_os", name = _("Install OS"), From owner-p4-projects@FreeBSD.ORG Thu Apr 20 01:37:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 313AA16A403; Thu, 20 Apr 2006 01:37:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECD6C16A402 for ; Thu, 20 Apr 2006 01:37:29 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B98DA43D45 for ; Thu, 20 Apr 2006 01:37:29 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K1bT8F000697 for ; Thu, 20 Apr 2006 01:37:29 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K1bTeU000691 for perforce@freebsd.org; Thu, 20 Apr 2006 01:37:29 GMT (envelope-from soc-andrew@freebsd.org) Date: Thu, 20 Apr 2006 01:37:29 GMT Message-Id: <200604200137.k3K1bTeU000691@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 95652 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 01:37:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=95652 Change 95652 by soc-andrew@soc-andrew_serv on 2006/04/20 01:36:31 The lib/lua bits arn't built with the base system any more Affected files ... .. //depot/projects/soc2005/bsdinstaller/scripts/build_patch.sh#12 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/scripts/build_patch.sh#12 (text+ko) ==== @@ -6,7 +6,7 @@ FILES="Makefile.inc1 lib/Makefile libexec/Makefile usr.sbin/Makefile release/Makefile share/Makefile etc/mtree/BSD.usr.dist" # Dir's to create a tarball of:name for tarball -DIRS="contrib/bsdinstaller:base_bsdinstaller contrib/lua:base_lua lib/bsdinstaller:lib_bsdinstaller lib/lua:lib_lua libexec/bsdinstaller:libexec usr.sbin/bsdinstaller:usr_sbin release/bsdinstaller:release share/bsdinstaller:share sys/i386/conf/NOPREEMPTION:sys" +DIRS="contrib/bsdinstaller:base_bsdinstaller contrib/lua:base_lua lib/bsdinstaller:lib_bsdinstaller libexec/bsdinstaller:libexec usr.sbin/bsdinstaller:usr_sbin release/bsdinstaller:release share/bsdinstaller:share sys/i386/conf/NOPREEMPTION:sys" VENDOR="//depot/vendor/freebsd/src" BSDINS="//depot/projects/soc2005/bsdinstaller/src" From owner-p4-projects@FreeBSD.ORG Thu Apr 20 02:00:59 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AD60216A417; Thu, 20 Apr 2006 02:00:59 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 308DB16A400 for ; Thu, 20 Apr 2006 02:00:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBB7A43D45 for ; Thu, 20 Apr 2006 02:00:58 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K20w0l013603 for ; Thu, 20 Apr 2006 02:00:58 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K20w75013597 for perforce@freebsd.org; Thu, 20 Apr 2006 02:00:58 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 02:00:58 GMT Message-Id: <200604200200.k3K20w75013597@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95654 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 02:00:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=95654 Change 95654 by jb@jb_freebsd2 on 2006/04/20 01:59:58 It looks like FreeBSD-specific device header files won't be required. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.h#2 delete .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap.h#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 02:17:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B424316A405; Thu, 20 Apr 2006 02:17:19 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7635816A400 for ; Thu, 20 Apr 2006 02:17:19 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CB6E43D55 for ; Thu, 20 Apr 2006 02:17:19 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K2HJFm022761 for ; Thu, 20 Apr 2006 02:17:19 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K2HI3u022755 for perforce@freebsd.org; Thu, 20 Apr 2006 02:17:18 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 02:17:18 GMT Message-Id: <200604200217.k3K2HI3u022755@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95655 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 02:17:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=95655 Change 95655 by jb@jb_freebsd2 on 2006/04/20 02:16:41 Work-in-progress update. I much prefer working on this stuff with the functions in separate files. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap_close.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap_ioctl.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap_load.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap_modevent.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap_open.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap_sysctl.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap_unload.c#1 add Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap.c#2 (text+ko) ==== @@ -38,92 +38,38 @@ #include #include #include +#include #include #include -#include -#include +#include -#include -#include +#define FASTTRAP_MINOR 0 -#define DTRACE_MINOR 0 - -static d_close_t fasttrap_close; -static d_ioctl_t fasttrap_ioctl; -static d_open_t fasttrap_open; +static d_close_t fasttrap_close; +static d_ioctl_t fasttrap_ioctl; +static d_open_t fasttrap_open; +static int fasttrap_load(void); +static int fasttrap_unload(void); static struct cdevsw fasttrap_cdevsw = { - .d_version = D_VERSION, - .d_close = fasttrap_close, - .d_ioctl = fasttrap_ioctl, - .d_open = fasttrap_open, - .d_name = "fasttrap", + .d_version = D_VERSION, + .d_close = fasttrap_close, + .d_ioctl = fasttrap_ioctl, + .d_open = fasttrap_open, + .d_name = "fasttrap", }; /* For use with make_dev(9)/destroy_dev(9). */ static struct cdev *fasttrap_dev; -/* ARGSUSED */ -static int -fasttrap_close(struct cdev *dev __unused, int flags, int fmt __unused, - struct thread *td) -{ - return (0); -} - -/* ARGSUSED */ -static int -fasttrap_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr __unused, - int flags __unused, struct thread *td __unused) -{ - int error = 0; - - switch (cmd) { - /* Really handled in upper layer */ - case FIOASYNC: - case FIONBIO: - break; - default: - error = ENOTTY; - } - return (error); -} - -/* ARGSUSED */ -static int -fasttrap_open(struct cdev *dev, int oflags, int devtype, struct thread *td) -{ - int error = 0; - return (error); -} - -/* ARGSUSED */ -static int -fasttrap_modevent(module_t mod __unused, int type, void *data __unused) -{ - int error = 0; - - switch (type) { - case MOD_LOAD: - fasttrap_dev = make_dev(&fasttrap_cdevsw, DTRACE_MINOR, - UID_ROOT, GID_WHEEL, 0660, "fasttrap"); - break; - - case MOD_UNLOAD: - destroy_dev(fasttrap_dev); - break; - - case MOD_SHUTDOWN: - break; - - default: - error = EOPNOTSUPP; - break; - - } - return (error); -} +#include +#include +#include +#include +#include +#include +#include DEV_MODULE(fasttrap, fasttrap_modevent, NULL); MODULE_VERSION(fasttrap, 1); From owner-p4-projects@FreeBSD.ORG Thu Apr 20 02:18:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 55F0116A404; Thu, 20 Apr 2006 02:18:21 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 352D216A401 for ; Thu, 20 Apr 2006 02:18:21 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 052BC43D45 for ; Thu, 20 Apr 2006 02:18:21 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3K2IKZL023554 for ; Thu, 20 Apr 2006 02:18:20 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3K2IKqB023548 for perforce@freebsd.org; Thu, 20 Apr 2006 02:18:20 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 02:18:20 GMT Message-Id: <200604200218.k3K2IKqB023548@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95656 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 02:18:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=95656 Change 95656 by jb@jb_freebsd2 on 2006/04/20 02:17:26 Same design as the dtrace module makefile. Affected files ... .. //depot/projects/dtrace/src/sys/modules/fasttrap/Makefile#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/fasttrap/Makefile#2 (text+ko) ==== @@ -6,6 +6,16 @@ SRCS= fasttrap.c SRCS+= bus_if.h device_if.h vnode_if.h -CFLAGS+= -I${.CURDIR}/../.. -I${.CURDIR}/../../contrib -I${.CURDIR}/../../contrib/opensolaris/uts/common +CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../contrib \ + -I${.CURDIR}/../.. + +load : + kldload dtrace + kldload fasttrap + +unload : + kldunload fasttrap + kldunload dtrace .include From owner-p4-projects@FreeBSD.ORG Thu Apr 20 12:10:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7C33F16A40D; Thu, 20 Apr 2006 12:10:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A8A016A403 for ; Thu, 20 Apr 2006 12:10:30 +0000 (UTC) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C028D43D4C for ; Thu, 20 Apr 2006 12:10:29 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KCATKN067503 for ; Thu, 20 Apr 2006 12:10:29 GMT (envelope-from soc-bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KCAQIg067457 for perforce@freebsd.org; Thu, 20 Apr 2006 12:10:26 GMT (envelope-from soc-bushman@freebsd.org) Date: Thu, 20 Apr 2006 12:10:26 GMT Message-Id: <200604201210.k3KCAQIg067457@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-bushman@freebsd.org using -f From: soc-bushman To: Perforce Change Reviews Cc: Subject: PERFORCE change 95671 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 12:10:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=95671 Change 95671 by soc-bushman@soc-bushman_stinger on 2006/04/20 12:09:41 changes were made to take RES_USE_INET6 into account and also to remove nscache.h and nscachedcli.h from src/include Affected files ... .. //depot/projects/soc2005/nsswitch_cached/src/etc/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/defaults/rc.conf#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/gettytab#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/hosts.allow#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/mtree/BSD.include.dist#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/mtree/Makefile#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/network.subr#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/amd#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/ike#2 delete .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/jail#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/kernel#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/nsswitch#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/serial#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/sshd#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.subr#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/sendmail/freebsd.mc#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/sendmail/freebsd.submit.mc#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/Makefile#7 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/arpa/inet.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/arpa/nameser.h#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/arpa/nameser_compat.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/malloc_np.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/include/netdb.h#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/nscache.h#8 delete .. //depot/projects/soc2005/nsswitch_cached/src/include/nscachedcli.h#6 delete .. //depot/projects/soc2005/nsswitch_cached/src/include/res_update.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/include/resolv.h#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/stdlib.h#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/time.h#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/Makefile#6 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/alpha/Makefile.inc#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/amd64/Makefile.inc#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/db/man/dbm.3#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/gdtoa/Symbol.map#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/gen/getgrent.c#8 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/gen/getpwent.c#11 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/gen/tls.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/gen/vis.3#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/ia64/Makefile.inc#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/include/isc/eventlib.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/include/namespace.h#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/include/nscache.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/include/nscachedcli.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/include/port_after.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/include/port_before.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/include/resolv_mt.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/include/un-namespace.h#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/Makefile.inc#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/Symbol.map#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_addr.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_cidr_ntop.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_cidr_pton.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_lnaof.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_makeaddr.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_net_ntop.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_net_pton.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_neta.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_netof.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_network.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_ntoa.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_ntop.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/inet_pton.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/inet/nsap_addr.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/isc/Makefile.inc#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/isc/ev_streams.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/isc/ev_timers.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/isc/eventlib_p.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/locale/Symbol.map#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/locale/utf8.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/nameser/Makefile.inc#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/nameser/Symbol.map#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/nameser/ns_name.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/nameser/ns_netint.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/nameser/ns_parse.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/nameser/ns_print.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/nameser/ns_samedomain.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/nameser/ns_ttl.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/Makefile.inc#7 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/Symbol.map#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getaddrinfo.c#10 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostbydns.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostbyht.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostbynis.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostnamadr.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getnameinfo.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getnetbydns.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getnetbyht.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getnetbynis.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getnetnamadr.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getproto.c#4 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getprotoent.c#9 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getprotoname.c#4 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getservbyname.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getservbyport.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getservent.c#20 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/herror.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_addr.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_lnaof.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_makeaddr.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_net_ntop.c#4 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_net_pton.c#4 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_neta.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_netof.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_network.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_ntoa.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_ntop.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/inet_pton.c#4 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/name6.c#9 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/netdb_private.h#9 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/ns_name.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/ns_netint.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/ns_parse.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/ns_print.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/ns_ttl.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/nsap_addr.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/nscache.c#9 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/nscachedcli.c#9 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_comp.c#4 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_config.h#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_data.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_debug.c#4 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_init.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_mkquery.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_mkupdate.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_query.c#4 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_send.c#4 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_send_private.h#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/res_update.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/Makefile.inc#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/Symbol.map#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/h_errno.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/herror.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/mtctxres.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_comp.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_data.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_debug.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_debug.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_init.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_mkquery.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_private.h#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_query.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_send.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/resolv/res_state.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/rpc/getrpcent.c#10 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/sparc64/Makefile.inc#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/sparc64/Symbol.map#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/sparc64/fpu/fpu_qp.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/Symbol.map#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/vfprintf.c#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/vfscanf.c#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/vfwprintf.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/vfwscanf.c#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/xprintf.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdlib/Makefile.inc#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdlib/Symbol.map#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdlib/malloc.3#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdlib/malloc.c#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdlib/strtonum.3#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdlib/strtonum.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/sys/getsockopt.2#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/sys/mmap.2#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/sys/write.2#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/Makefile#8 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/amd/Makefile.inc#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/amd/amd/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/amd/include/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/bluetooth/bthidd/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/bluetooth/bthidd/bthidd.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/bluetooth/bthidd/client.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/bluetooth/bthidd/hid.c#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/bluetooth/bthidd/server.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/bluetooth/sdpd/server.c#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/bootparamd/bootparamd/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/bsnmpd/bsnmpd/Makefile#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/bsnmpd/modules/Makefile#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/inetd/Makefile#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/inetd/builtins.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/iostat/iostat.8#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/iostat/iostat.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/jail/jail.8#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/jail/jail.c#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/mailwrapper/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/ntp/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/ntp/Makefile.inc#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/ntp/doc/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/ntp/ntp-keygen/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/ntp/ntpd/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/ntp/ntpdc/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/ntp/ntpq/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pkg_install/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pkg_install/Makefile.inc#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pkg_install/create/main.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pkg_install/lib/lib.h#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pkg_install/sign/sign.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pkg_install/sign/x509.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pmcstat/pmcstat.8#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pmcstat/pmcstat.c#6 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pmcstat/pmcstat.h#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pmcstat/pmcstat_log.c#6 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/portsnap/portsnap/portsnap.sh#6 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/ppp/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/pppd/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/rpcbind/Makefile#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/rtadvd/config.c#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/rtsold/if.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/sendmail/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/snapinfo/snapinfo.8#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/sysinstall/devices.c#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/sysinstall/dist.c#6 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/sysinstall/keymap.c#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/sysinstall/label.c#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/sysinstall/menus.c#6 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/syslogd/syslog.conf.5#4 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/syslogd/syslogd.c#7 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/tcpdchk/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/tcpdmatch/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/tcpdump/tcpdump/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/vnconfig/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/wpa/wpa_supplicant/Makefile#6 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/wpa/wpa_supplicant/Packet32.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c#6 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/ypserv/Makefile.yp#3 integrate Differences ... ==== //depot/projects/soc2005/nsswitch_cached/src/etc/Makefile#3 (text+ko) ==== @@ -1,7 +1,9 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 -# $FreeBSD: src/etc/Makefile,v 1.353 2006/03/11 08:51:16 ru Exp $ +# $FreeBSD: src/etc/Makefile,v 1.354 2006/03/17 18:54:20 ru Exp $ + +.include -.if !defined(NO_SENDMAIL) +.if ${MK_SENDMAIL} != "no" SUBDIR= sendmail .endif @@ -29,7 +31,7 @@ BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn BSM_ETC_DIR= ${DESTDIR}/etc/security -.if !defined(NO_LPR) +.if ${MK_LPR} != "no" BIN1+= printcap .endif @@ -37,12 +39,12 @@ BIN1+= cached.conf .endif -.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) -.if !defined(NO_OPENSSH) +.if ${MK_OPENSSH} != "no" SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ ${.CURDIR}/../crypto/openssh/sshd_config \ ${.CURDIR}/../crypto/openssh/moduli .endif +.if ${MK_OPENSSL} != "no" SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf .endif @@ -51,24 +53,24 @@ MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \ BSD.var.dist BSD.x11.dist BSD.x11-4.dist -.if !defined(NO_SENDMAIL) +.if ${MK_SENDMAIL} != "no" MTREE+= BSD.sendmail.dist .endif -.if !defined(NO_BIND) +.if ${MK_BIND} != "no" MTREE+= BIND.chroot.dist -.if defined(WITH_BIND_LIBS) +.if ${MK_BIND_LIBS} != "no" MTREE+= BIND.include.dist .endif .endif -.if !defined(NO_BIND_ETC) && !defined(NO_BIND) +.if ${MK_BIND_ETC} != "no" NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \ make-localhost .endif PPPCNF= ppp.conf -.if defined(NO_SENDMAIL) +.if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ @@ -79,7 +81,7 @@ FREEBSD=COPYRIGHT afterinstall: -.if !defined(NO_MAN) +.if ${MK_MAN} != "no" cd ${.CURDIR}/../share/man; ${MAKE} makedb .endif @@ -129,21 +131,21 @@ ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} -.if !defined(NO_I4B) +.if ${MK_I4B} != "no" cd ${.CURDIR}/isdn; ${MAKE} install .endif -.if !defined(NO_SENDMAIL) +.if ${MK_SENDMAIL} != "no" cd ${.CURDIR}/sendmail; ${MAKE} distribution .endif -.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) -.if !defined(NO_OPENSSH) +.if ${MK_OPENSSH} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSH} ${DESTDIR}/etc/ssh .endif +.if ${MK_OPENSSL} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSL} ${DESTDIR}/etc/ssl .endif -.if !defined(NO_KERBEROS) +.if ${MK_KERBEROS} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.k5login ${DESTDIR}/root/.k5login; @@ -160,18 +162,16 @@ ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${MTREE} ${DESTDIR}/etc/mtree -.if !defined(NO_BIND) -.if !defined(NO_BIND_ETC) +.if ${MK_BIND_ETC} != "no" cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${NAMEDB} ${DESTDIR}/var/named/etc/namedb .endif -.if !defined(NO_BIND_MTREE) +.if ${MK_BIND_MTREE} != "no" @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ set -x; \ ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ fi .endif -.endif cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ ${PPPCNF} ${DESTDIR}/etc/ppp cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ @@ -199,17 +199,15 @@ mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ -p ${DESTDIR}/usr/include -.if !defined(NO_BIND) -.if defined(WITH_BIND_LIBS) +.if ${MK_BIND_LIBS} != "no" mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ -p ${DESTDIR}/usr/include .endif -.if !defined(NO_BIND_MTREE) +.if ${MK_BIND_MTREE} != "no" mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ -p ${DESTDIR}/var/named .endif -.endif -.if !defined(NO_SENDMAIL) +.if ${MK_SENDMAIL} != "no" mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ .endif cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys ==== //depot/projects/soc2005/nsswitch_cached/src/etc/defaults/rc.conf#2 (text+ko) ==== @@ -15,7 +15,7 @@ # For a more detailed explanation of all the rc.conf variables, please # refer to the rc.conf(5) manual page. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.277 2006/02/14 04:16:56 imp Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.280 2006/04/13 18:34:13 brooks Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -95,6 +95,8 @@ dhclient_program="/sbin/dhclient" # Path to dhcp client program. dhclient_flags="" # Additional flags to pass to dhcp client. background_dhclient="NO" # Start dhcp client in the background. +synchronous_dhclient="YES" # Start dhclient directly on configured + # interfaces during startup. firewall_enable="NO" # Set to YES to enable firewall functionality firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall firewall_type="UNKNOWN" # Firewall type (see /etc/rc.firewall) @@ -229,6 +231,7 @@ ### Network daemon (NFS): All need rpcbind_enable="YES" ### amd_enable="NO" # Run amd service with $amd_flags (or NO). +amd_program="/usr/sbin/amd" # path to amd, if you want a different one. amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map" amd_map_program="NO" # Can be set to "ypcat -k amd.master" nfs_client_enable="NO" # This host is an NFS client (or NO). ==== //depot/projects/soc2005/nsswitch_cached/src/etc/gettytab#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/gettytab,v 1.23 2006/01/22 15:33:16 matteo Exp $ +# $FreeBSD: src/etc/gettytab,v 1.24 2006/04/11 09:54:23 des Exp $ # from: @(#)gettytab 5.14 (Berkeley) 3/27/91 # # Most of the table entries here are just copies of the old getty table, @@ -204,6 +204,16 @@ autologin|al.9600:\ :al=root:tc=std.9600: +al.19200:\ + :al=root:tc=std.19200: +al.38400:\ + :al=root:tc=std.38400: +al.57600:\ + :al=root:tc=std.57600: +al.115200:\ + :al=root:tc=std.115200: +al.230400:\ + :al=root:tc=std.230400: # # Entries for 3-wire serial terminals. These don't supply carrier, so ==== //depot/projects/soc2005/nsswitch_cached/src/etc/hosts.allow#2 (text+ko) ==== @@ -1,6 +1,6 @@ # # hosts.allow access control file for "tcp wrapped" applications. -# $FreeBSD: src/etc/hosts.allow,v 1.20 2006/02/16 14:46:03 ume Exp $ +# $FreeBSD: src/etc/hosts.allow,v 1.21 2006/03/17 18:54:21 ru Exp $ # # NOTE: The hosts.deny file is deprecated. # Place both 'allow' and 'deny' rules in the hosts.allow file. @@ -37,7 +37,7 @@ # Allow anything from localhost. Note that an IP address (not a host # name) *MUST* be specified for rpcbind(8). ALL : localhost 127.0.0.1 : allow -# Comment out next line if you build libwrap with NO_INET6=yes. +# Comment out next line if you build libwrap without IPv6 support. ALL : [::1] : allow ALL : my.machine.example.com 192.0.2.35 : allow ==== //depot/projects/soc2005/nsswitch_cached/src/etc/mtree/BSD.include.dist#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.105 2005/12/29 14:40:19 dfr Exp $ +# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.106 2006/03/19 15:44:53 rwatson Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -210,6 +210,8 @@ rpcsvc .. security + audit + .. mac_biba .. mac_bsdextended ==== //depot/projects/soc2005/nsswitch_cached/src/etc/mtree/Makefile#2 (text+ko) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: src/etc/mtree/Makefile,v 1.5 2004/12/21 08:46:50 ru Exp $ +# $FreeBSD: src/etc/mtree/Makefile,v 1.6 2006/03/17 18:54:21 ru Exp $ + +.include FILES= ${_BIND.chroot.dist} \ ${_BIND.include.dist} \ @@ -10,9 +12,9 @@ BSD.x11-4.dist \ BSD.x11.dist -.if !defined(NO_BIND) +.if ${MK_BIND} != "no" _BIND.chroot.dist= BIND.chroot.dist -.if defined(WITH_BIND_LIBS) +.if ${MK_BIND_LIBS} != "no" _BIND.include.dist= BIND.include.dist .endif .endif ==== //depot/projects/soc2005/nsswitch_cached/src/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.168 2005/11/14 23:34:50 brooks Exp $ +# $FreeBSD: src/etc/network.subr,v 1.171 2006/04/13 18:34:13 brooks Exp $ # # @@ -44,7 +44,7 @@ ifconfig_args=`ifconfig_getargs $1` if [ -n "${ifconfig_args}" ]; then ifconfig $1 up - eval "ifconfig $1 ${ifconfig_args}" + ifconfig $1 ${ifconfig_args} _cfg=0 fi @@ -60,7 +60,9 @@ if [ $_cfg -ne 0 ] ; then ifconfig $1 up fi - /etc/rc.d/dhclient start $1 + if syncdhcpif $1; then + /etc/rc.d/dhclient start $1 + fi _cfg=0 fi @@ -72,6 +74,8 @@ # 0 if inet entries were found and removed. It returns 1 if # no entries were found or they could not be removed. # +# XXX: should not be only inet +# ifconfig_down() { [ -z "$1" ] && return 1 @@ -105,9 +109,36 @@ _cfg=0 fi + ifconfig $1 down + return $_cfg } +# get_if_var if var [default] +# Return the value of the pseudo-hash corresponding to $if where +# $var is a string containg the sub-string "IF" which will be +# replaced with $if after the characters defined in _punct are +# replaced with '_'. If the variable is unset, replace it with +# $default if given. +get_if_var() +{ + if [ $# -ne 2 -a $# -ne 3 ]; then + err 3 'USAGE: get_if_var name var [default]' + fi + + _if=$1 + _punct=". - / +" + for _punct_c in $_punct; do + _if=`ltr ${_if} ${_punct_c} '_'` + done + _var=$2 + _default=$3 + + prefix=${_var%%IF*} + suffix=${_var##*IF} + eval echo \${${prefix}${_if}${suffix}-${_default}} +} + # _ifconfig_getargs if # Echos the arguments for the supplied interface to stdout. # returns 1 if empty. In general, ifconfig_getargs should be used @@ -119,9 +150,7 @@ return 1 fi - eval _args=\${ifconfig_$1-$ifconfig_DEFAULT} - - echo "$_args" + get_if_var $_ifn ifconfig_IF "$ifconfig_DEFAULT" } # ifconfig_getargs if @@ -137,12 +166,11 @@ for _arg in $_tmpargs; do case $_arg in - [Dd][Hh][Cc][Pp]) - ;; - [Nn][Oo][Aa][Uu][Tt][Oo]) - ;; - [Ww][Pp][Aa]) - ;; + [Dd][Hh][Cc][Pp]) ;; + [Nn][Oo][Aa][Uu][Tt][Oo]) ;; + [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;; + [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;; + [Ww][Pp][Aa]) ;; *) _args="$_args $_arg" ;; @@ -178,11 +206,40 @@ [Dd][Hh][Cc][Pp]) return 0 ;; + [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) + return 0 + ;; + [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) + return 0 + ;; esac done return 1 } +# syncdhcpif +# Returns 0 if the interface should be configured synchronously and +# 1 otherwise. +syncdhcpif() +{ + _tmpargs=`_ifconfig_getargs $1` + for _arg in $_tmpargs; do + case $_arg in + [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) + return 1 + ;; + [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) + return 0 + ;; + esac + done + if checkyesno synchronous_dhclient; then + return 0 + else + return 1 + fi +} + # wpaif if # Returns 0 if the interface is a WPA interface and 1 otherwise. wpaif() @@ -226,7 +283,7 @@ _action=$2 # get ipv4-addresses - eval cidr_addr=\${ipv4_addrs_${_if}} + cidr_addr=`get_if_var $_if ipv4_addrs_IF` for _cidr in ${cidr_addr}; do _ipaddr=${_cidr%%/*} @@ -266,7 +323,7 @@ _ret=1 alias=0 while : ; do - eval ifconfig_args=\$ifconfig_$1_alias${alias} + ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` if [ -n "${ifconfig_args}" ]; then ifconfig $1 ${ifconfig_args} alias alias=$((${alias} + 1)) @@ -288,7 +345,7 @@ _ret=1 alias=0 while : ; do - eval ifconfig_args=\$ifconfig_$1_alias${alias} + ifconfig_args=`get_if_var $1 ifconfig_IF_alias${alias}` if [ -n "${ifconfig_args}" ]; then ifconfig $1 ${ifconfig_args} -alias alias=$((${alias} + 1)) @@ -367,7 +424,7 @@ ;; *) for i in ${gif_interfaces}; do - eval peers=\$gifconfig_$i + peers=`get_if_var $i gifconfig_IF` case ${peers} in '') continue @@ -391,7 +448,7 @@ ipx_up() { ifn="$1" - eval ifconfig_args=\$ifconfig_${ifn}_ipx + ifconfig_args=`get_if_var $ifn ifconfig_IF_ipx` if [ -n "${ifconfig_args}" ]; then ifconfig ${ifn} ${ifconfig_args} return 0 @@ -438,7 +495,7 @@ _ifn_list="`ifconfig -l`" [ -z "$_ifn_list" ] && return 0 for _if in ${_ifn_list} ; do - eval _ifname=\$ifconfig_${_if}_name + _ifname=`get_if_var $_if ifconfig_IF_name` if [ ! -z "$_ifname" ]; then ifconfig $_if name $_ifname fi @@ -499,7 +556,7 @@ if dhcpif $_if; then _dhcplist="${_dhcplist}${_aprefix}${_if}" [ -z "$_aprefix" ] && _aprefix=' ' - elif [ -n "`_ifconfig_getargs $if`" ]; then + elif [ -n "`_ifconfig_getargs $_if`" ]; then _nodhcplist="${_nodhcplist}${_bprefix}${_if}" [ -z "$_bprefix" ] && _bprefix=' ' fi @@ -564,7 +621,7 @@ esac for i in $interfaces; do rtsol_interface=yes - eval prefix=\$ipv6_prefix_$i + prefix=`get_if_var $i ipv6_prefix_IF` if [ -n "${prefix}" ]; then rtsol_available=no rtsol_interface=no @@ -584,7 +641,7 @@ esac done fi - eval ipv6_ifconfig=\$ipv6_ifconfig_$i + ipv6_ifconfig=`get_if_var $i ipv6_ifconfig_IF` if [ -n "${ipv6_ifconfig}" ]; then rtsol_available=no rtsol_interface=no @@ -619,7 +676,7 @@ for i in $interfaces; do alias=0 while : ; do - eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} + ipv6_ifconfig=`get_if_var $i ipv6_ifconfig_IF_alias${alias}` if [ -z "${ipv6_ifconfig}" ]; then break; fi @@ -695,7 +752,7 @@ ;; *) for i in ${ipv6_static_routes}; do - eval ipv6_route_args=\$ipv6_route_${i} + ipv6_route_args=`get_if_var $i ipv6_route_IF` route add -inet6 ${ipv6_route_args} done ;; ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/Makefile#3 (text+ko) ==== @@ -1,5 +1,7 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.66 2006/02/13 20:08:31 imp Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.69 2006/03/28 18:28:33 simon Exp $ + +.include FILES= DAEMON LOGIN NETWORKING SERVERS \ abi accounting addswap adjkerntz amd \ @@ -13,12 +15,11 @@ gbde geli geli2 \ hcsecd \ hostapd hostname \ - ike \ inetd initrandom \ ip6addrctl ip6fw ipfilter ipfs ipfw ipmon \ ipnat ipsec ipxrouted isdnd \ jail \ - kadmind kerberos keyserv kldxref kpasswdd \ + kadmind kerberos kernel keyserv kldxref kpasswdd \ ldconfig local localpkg lpd \ mixer motd mountcritlocal mountcritremote \ mountd moused mroute6d mrouted msgs \ @@ -41,7 +42,7 @@ ypbind yppasswdd ypserv \ ypset ypupdated ypxfrd -.if !defined(NO_OPENSSH) +.if ${MK_OPENSSH} != "no" FILES+= sshd .endif ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/amd#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # # $NetBSD: amd,v 1.10 2002/04/29 12:08:17 lukem Exp $ -# $FreeBSD: src/etc/rc.d/amd,v 1.16 2005/12/30 08:57:33 rse Exp $ +# $FreeBSD: src/etc/rc.d/amd,v 1.17 2006/04/11 09:02:06 flz Exp $ # # PROVIDE: amd -# REQUIRE: rpcbind ypbind nfsclient cleanvar +# REQUIRE: rpcbind ypbind nfsclient cleanvar ldconfig # BEFORE: DAEMON # KEYWORD: nojail ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/jail#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/jail,v 1.26 2006/03/08 20:40:37 fjoe Exp $ +# $FreeBSD: src/etc/rc.d/jail,v 1.27 2006/04/08 12:15:35 flz Exp $ # # PROVIDE: jail @@ -33,9 +33,10 @@ jail_procdir="${jail_rootdir}/proc" eval jail_hostname=\"\$jail_${_j}_hostname\" eval jail_ip=\"\$jail_${_j}_ip\" + eval jail_interface=\"\${jail_${_j}_interface:-${jail_interface}}\" eval jail_exec=\"\$jail_${_j}_exec\" - eval jail_exec_start=\"\$jail_${_j}_exec_start\" - eval jail_exec_stop=\"\$jail_${_j}_exec_stop\" + eval jail_exec_start=\"\${jail_${_j}_exec_start:-${jail_exec_start}}\" + eval jail_exec_stop=\"\${jail_${_j}_exec_stop:-${jail_exec_stop}}\" if [ -n "${jail_exec}" ]; then # simple/backward-compatible execution jail_exec_start="${jail_exec}" @@ -51,20 +52,20 @@ fi # The default jail ruleset will be used by rc.subr if none is specified. - eval jail_ruleset=\"\$jail_${_j}_devfs_ruleset\" - eval jail_devfs=\"\$jail_${_j}_devfs_enable\" + eval jail_ruleset=\"\${jail_${_j}_devfs_ruleset:-${jail_devfs_ruleset}}\" + eval jail_devfs=\"\${jail_${_j}_devfs_enable:-${jail_devfs_enable}}\" [ -z "${jail_devfs}" ] && jail_devfs="NO" - eval jail_fdescfs=\"\$jail_${_j}_fdescfs_enable\" + eval jail_fdescfs=\"\${jail_${_j}_fdescfs_enable:-${jail_fdescfs_enable}}\" [ -z "${jail_fdescfs}" ] && jail_fdescfs="NO" - eval jail_procfs=\"\$jail_${_j}_procfs_enable\" + eval jail_procfs=\"\${jail_${_j}_procfs_enable:-${jail_procfs_enable}}\" [ -z "${jail_procfs}" ] && jail_procfs="NO" - eval jail_mount=\"\$jail_${_j}_mount_enable\" + eval jail_mount=\"\${jail_${_j}_mount_enable:-${jail_mount_enable}}\" [ -z "${jail_mount}" ] && jail_mount="NO" # "/etc/fstab.${_j}" will be used for {,u}mount(8) if none is specified. - eval jail_fstab=\"\$jail_${_j}_fstab\" + eval jail_fstab=\"\${jail_${_j}_fstab:-${jail_fstab}}\" [ -z "${jail_fstab}" ] && jail_fstab="/etc/fstab.${_j}" - eval jail_flags=\"\$jail_${_j}_flags\" + eval jail_flags=\"\${jail_${_j}_flags:-${jail_flags}}\" [ -z "${jail_flags}" ] && jail_flags="-l -U root" # Debugging aid @@ -75,6 +76,7 @@ debug "$_j mount enable: $jail_mount" debug "$_j hostname: $jail_hostname" debug "$_j ip: $jail_ip" + debug "$_j interface: $jail_interface" debug "$_j root: $jail_rootdir" debug "$_j devdir: $jail_devdir" debug "$_j fdescdir: $jail_fdescdir" @@ -162,6 +164,9 @@ echo -n " [${jail_hostname} already running (/var/run/jail_${_jail}.id exists)]" continue; fi + if [ -n ${jail_interface} ]; then + ifconfig ${jail_interface} alias ${jail_ip} netmask 255.255.255.255 + fi if checkyesno jail_mount; then info "Mounting fstab for jail ${_jail} (${jail_fstab})" if [ ! -f "${jail_fstab}" ]; then @@ -234,6 +239,9 @@ jail_umount_fs echo -n " $jail_hostname" fi + if [ -n ${jail_interface} ]; then + ifconfig ${jail_interface} -alias ${jail_ip} + fi rm /var/run/jail_${_jail}.id else echo "cannot stop jail ${_jail}. No jail id in /var/run" ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/nsswitch#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/etc/rc.d/nsswitch,v 1.5 2004/10/07 13:55:26 mtm Exp $ +# $FreeBSD: src/etc/rc.d/nsswitch,v 1.7 2006/04/12 12:01:53 ume Exp $ # # PROVIDE: nsswitch @@ -40,17 +40,29 @@ { host_conf=$1; shift; nsswitch_conf=$1; shift; - awk ' \ - /^[:blank:]*#/ { next } \ - /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ - /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ - /nis/ { nsswitch[c] = "nis"; c++; next } \ - { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ - END { \ - printf "hosts: "; \ - for (i in nsswitch) printf "%s ", nsswitch[i]; \ - printf "\n"; \ - }' < $host_conf > $nsswitch_conf + + while read line; do + line=${line##[ ]} + case $line in + hosts|local|file) + _nsswitch="${_nsswitch}${_nsswitch+ }files" + ;; + dns|bind) + _nsswitch="${_nsswitch}${_nsswitch+ }dns" + ;; + nis) + _nsswitch="${_nsswitch}${_nsswitch+ }nis" + ;; + '#'*) + ;; + *) + printf "Warning: unrecognized line [%s]", $line > "/dev/stderr" + ;; + + esac + done < $host_conf + + echo "hosts: $_nsswitch" > $nsswitch_conf } generate_nsswitch_conf() @@ -73,30 +85,47 @@ nsswitch_conf=$1; shift; host_conf=$1; shift; - awk ' -BEGIN { - xlat["files"] = "hosts"; - xlat["dns"] = "bind"; - xlat["nis"] = "nis"; - cont = 0; -} -sub(/^[\t ]*hosts:/, "") || cont { - if (!cont) - srcs = "" - sub(/#.*/, "") - gsub(/[][]/, " & ") - cont = sub(/\\$/, "") - srcs = srcs " " $0 -} -END { - print "# Auto-generated from nsswitch.conf, do not edit" - ns = split(srcs, s) - for (n = 1; n <= ns; ++n) { - if (s[n] in xlat) - print xlat[s[n]] - } -} -' <$nsswitch_conf >$host_conf + _cont=0 + _sources="" + while read line; do + line=${line##[ ]} + case $line in + hosts:*) + ;; + *) + if [ $_cont -ne 1 ]; then + continue + fi + ;; + esac + if [ "${line%\\}" = "${line}\\" ]; then + _cont=1 + fi + line=${line#hosts:} + line=${line%\\} + line=${line%%#*} + _sources="${_sources}${_sources:+ }$line" + done < $nsswitch_conf + + echo "# Auto-generated from nsswitch.conf" > $host_conf + for _s in ${_sources}; do + case $_s in + files) + echo "hosts" >> $host_conf + ;; + dns) + echo "dns" >> $host_conf + ;; + nis) + echo "nis" >> $host_conf + ;; + *=*) + ;; + *) + printf "Warning: unrecognized source [%s]", $_s > "/dev/stderr" + ;; + esac + done } nsswitch_start() ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/serial#2 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Apr 20 13:37:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 49D7816A404; Thu, 20 Apr 2006 13:37:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1CE616A402 for ; Thu, 20 Apr 2006 13:37:15 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6761843D45 for ; Thu, 20 Apr 2006 13:37:15 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KDbFOH023973 for ; Thu, 20 Apr 2006 13:37:15 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KDbFoT023964 for perforce@freebsd.org; Thu, 20 Apr 2006 13:37:15 GMT (envelope-from soc-andrew@freebsd.org) Date: Thu, 20 Apr 2006 13:37:15 GMT Message-Id: <200604201337.k3KDbFoT023964@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 95672 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 13:37:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=95672 Change 95672 by soc-andrew@soc-andrew_serv on 2006/04/20 13:37:00 Use the (yet to be submitted) dfuife_curses frontend port Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/release/Makefile#44 edit .. //depot/projects/soc2005/bsdinstaller/src/release/bsdinstaller/bsdinstaller_shell.sh#11 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/release/Makefile#44 (text+ko) ==== @@ -846,6 +846,8 @@ ROOT=${RD}/bsdinstaller/root @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=lua50-dfui \ ROOT=${RD}/bsdinstaller/root + @cd ${.CURDIR} && $(MAKE) installPackage PACKAGE=dfuife-curses \ + ROOT=${RD}/bsdinstaller/root @touch ${RD}/bsdinstaller/root/etc/fstab @echo "sendmail_enable=\"NONE\"" > ${RD}/bsdinstaller/root/etc/rc.conf ==== //depot/projects/soc2005/bsdinstaller/src/release/bsdinstaller/bsdinstaller_shell.sh#11 (text+ko) ==== @@ -10,7 +10,8 @@ if [ ${TTY} = "/dev/ttyv0" ] then - /usr/sbin/bsd_installer_ncurses +# /usr/sbin/bsd_installer_ncurses + /usr/local/bin/dfuife_curses elif [ ${TTY} = "/dev/ttyv1" ] then export LD_PRELOAD="/usr/local/lib/liblua.so;/usr/local/lib/liblualib.so;/usr/lib/libm.so" From owner-p4-projects@FreeBSD.ORG Thu Apr 20 14:20:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 565F716A406; Thu, 20 Apr 2006 14:20:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EC7416A401 for ; Thu, 20 Apr 2006 14:20:13 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BB2543D4C for ; Thu, 20 Apr 2006 14:20:08 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KEK8Hk048506 for ; Thu, 20 Apr 2006 14:20:08 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KEK7fB048490 for perforce@freebsd.org; Thu, 20 Apr 2006 14:20:07 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 14:20:07 GMT Message-Id: <200604201420.k3KEK7fB048490@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95673 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 14:20:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=95673 Change 95673 by millert@millert_g5tower on 2006/04/20 14:19:32 Remove now-unused flask_types.h Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask_types.h#4 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 14:25:53 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1E68116A403; Thu, 20 Apr 2006 14:25:53 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD15F16A401 for ; Thu, 20 Apr 2006 14:25:52 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CE9543D46 for ; Thu, 20 Apr 2006 14:25:52 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KEPqrh051626 for ; Thu, 20 Apr 2006 14:25:52 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KEPqvF051623 for perforce@freebsd.org; Thu, 20 Apr 2006 14:25:52 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 14:25:52 GMT Message-Id: <200604201425.k3KEPqvF051623@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95674 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 14:25:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=95674 Change 95674 by millert@millert_g5tower on 2006/04/20 14:24:53 Move sebsd_{malloc,free} into sebsd_alloc.c and convert all calls from malloc/free to sebsd_{malloc,free}. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/Makefile#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#12 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.c#39 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.h#8 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_alloc.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#11 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mach_av.c#11 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/queue.c#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/security.h#6 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/Makefile#6 (text+ko) ==== @@ -4,7 +4,7 @@ POLICY_DESC= "SEDarwin (SELinux compatible TE)" POLICY_NOMAN= yes -POLICY_SRCS= sebsd.c sebsd_syscall.c sebsd_sysctl.c +POLICY_SRCS= sebsd.c sebsd_alloc.c sebsd_syscall.c sebsd_sysctl.c POLICY_SRCS+= ss/avtab.c ss/ebitmap.c ss/hashtab.c ss/init.c ss/policydb.c \ ss/queue.c ss/services.c ss/sidtab.c ss/symtab.c ss/mach_av.c \ ss/conditional.c ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#12 (text+ko) ==== @@ -90,19 +90,19 @@ #define __init -extern void *sebsd_malloc(size_t size, int flags); -extern void sebsd_free(void *); +extern void *sebsd_malloc(size_t size, int type, int flags); +extern void sebsd_free(void *, int); /* BSD-style malloc/free emulation */ +#ifndef M_SEBSD #include -#define malloc(size, type, flags) sebsd_malloc(size, flags) -#define free(addr, type) sebsd_free(addr) #define M_SEBSD M_MACTEMP +#endif /* Linux-style kmalloc/kfree (note kfree namespace collision) */ -#define kmalloc(size, flags) sebsd_malloc(size, flags) -#define kfree(addr) sebsd_free(addr) -#define __get_free_page(flags) sebsd_malloc(PAGE_SIZE, flags) +#define kmalloc(size, flags) sebsd_malloc(size, M_SEBSD, flags) +#define kfree(addr) sebsd_free(addr, M_SEBSD) +#define __get_free_page(flags) sebsd_malloc(PAGE_SIZE, M_SEBSD, flags) #define GFP_ATOMIC M_WAITOK /* XXX - want M_NOWAIT but too early */ #define GFP_KERNEL M_WAITOK ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.c#39 (text+ko) ==== @@ -59,8 +59,16 @@ #include #include #include +#include +#include + +#include -#ifdef __APPLE__ +#include +#include +#include +#include + /* * The code is conditional upon the following list of defines. * At the moment, Darwin does not provide support for all of them: @@ -73,51 +81,8 @@ * HAS_STRINGS * HAS_ACLS */ - #define HAS_STRINGS -#include -#include -#include - -/* XXX - move sebsd_malloc/free */ -void * -sebsd_malloc(size_t size, int flags) -{ - size_t *vs, nsize; - - nsize = size + sizeof(size_t); - vs = (flags & M_NOWAIT) ? - (size_t *)kalloc_noblock(nsize) : (size_t *)kalloc(nsize); - if (vs != NULL) { - *vs++ = nsize; - if (flags & M_ZERO) - bzero(vs, size); - } - return (vs); -} - -void -sebsd_free(void *v) -{ - size_t *vs = v; - - if (vs != NULL) { - vs--; - kfree((vm_offset_t)vs, *vs); - } -} - -#include -#endif - -#include - -#include -#include -#include -#include - int sebsd_verbose = 0; static int slot = 1; /* TBD, dynamic */ @@ -395,7 +360,7 @@ { struct task_security_struct *new_tsec; - new_tsec = sebsd_malloc(sizeof(*new_tsec), M_ZERO | M_WAITOK); + new_tsec = sebsd_malloc(sizeof(*new_tsec), M_SEBSD, M_ZERO | M_WAITOK); new_tsec->osid = new_tsec->sid = SECINITSID_UNLABELED; SLOT(label) = new_tsec; } @@ -405,7 +370,7 @@ { struct file_security_struct *new_fsec; - new_fsec = sebsd_malloc(sizeof(*new_fsec), M_ZERO | M_WAITOK); + new_fsec = sebsd_malloc(sizeof(*new_fsec), M_SEBSD, M_ZERO | M_WAITOK); new_fsec->sid = new_fsec->sid = SECINITSID_UNLABELED; SLOT(label) = new_fsec; } @@ -415,7 +380,7 @@ { struct mount_security_struct *sbsec; - sbsec = sebsd_malloc(sizeof(*sbsec), M_ZERO | M_WAITOK); + sbsec = sebsd_malloc(sizeof(*sbsec), M_SEBSD, M_ZERO | M_WAITOK); sbsec->sid = SECINITSID_UNLABELED; SLOT(label) = sbsec; } @@ -425,7 +390,7 @@ { struct mount_fs_security_struct *sbsec; - sbsec = sebsd_malloc(sizeof(*sbsec), M_ZERO | M_WAITOK); + sbsec = sebsd_malloc(sizeof(*sbsec), M_SEBSD, M_ZERO | M_WAITOK); sbsec->sid = SECINITSID_UNLABELED; SLOT(label) = sbsec; } @@ -435,7 +400,7 @@ { struct network_security_struct *new; - new = sebsd_malloc(sizeof(*new), M_ZERO | M_WAITOK); + new = sebsd_malloc(sizeof(*new), M_SEBSD, M_ZERO | M_WAITOK); new->sid = new->task_sid = SECINITSID_UNLABELED; SLOT(label) = new; } @@ -445,7 +410,7 @@ { struct network_security_struct *new; - new = sebsd_malloc(sizeof(*new), M_ZERO | flag); + new = sebsd_malloc(sizeof(*new), M_SEBSD, M_ZERO | flag); if (new == NULL) { SLOT(label) = NULL; return (ENOMEM); @@ -462,7 +427,7 @@ { struct vnode_security_struct *vsec; - vsec = sebsd_malloc(sizeof(*vsec), M_ZERO | M_WAITOK); + vsec = sebsd_malloc(sizeof(*vsec), M_SEBSD, M_ZERO | M_WAITOK); vsec->sid = SECINITSID_UNLABELED; vsec->task_sid = SECINITSID_UNLABELED; SLOT(label) = vsec; @@ -473,7 +438,7 @@ { struct ipc_security_struct *new; - new = sebsd_malloc(sizeof(*new), M_ZERO | M_WAITOK); + new = sebsd_malloc(sizeof(*new), M_SEBSD, M_ZERO | M_WAITOK); new->sid = SECINITSID_UNLABELED; SLOT(label) = new; } @@ -483,7 +448,7 @@ { struct vnode_security_struct *vsec; - vsec = sebsd_malloc(sizeof(*vsec), M_ZERO | M_WAITOK); + vsec = sebsd_malloc(sizeof(*vsec), M_SEBSD, M_ZERO | M_WAITOK); vsec->sid = SECINITSID_UNLABELED; vsec->task_sid = SECINITSID_UNLABELED; SLOT(label) = vsec; @@ -493,7 +458,7 @@ sebsd_destroy_label(struct label *label) { - sebsd_free(SLOT(label)); + sebsd_free(SLOT(label), M_SEBSD); SLOT(label) = NULL; } @@ -793,7 +758,7 @@ dirent->sclass = devfs_type_to_security_class(devfs_dirent->dn_type); /* Obtain a SID based on the fstype, path, and class. */ - path = sebsd_malloc(strlen(fullpath) + 2, M_ZERO | M_WAITOK); + path = sebsd_malloc(strlen(fullpath) + 2, M_SEBSD, M_ZERO | M_WAITOK); path[0] = '/'; strcpy(&path[1], fullpath); rc = security_genfs_sid("devfs", path, dirent->sclass, &newsid); @@ -822,7 +787,7 @@ "dirent=%d\n", path, rc, dirent->sclass, newsid, dirent->sid); } - sebsd_free(path); + sebsd_free(path, M_SEBSD); } #if 0 @@ -846,7 +811,7 @@ dirent->sclass = SECCLASS_DIR; /* Obtain a SID based on the fstype, path, and class. */ - path = sebsd_malloc(strlen(fullpath) + 2, M_ZERO | M_WAITOK); + path = sebsd_malloc(strlen(fullpath) + 2, M_SEBSD, M_ZERO | M_WAITOK); path[0] = '/'; strcpy(&path[1], fullpath); rc = security_genfs_sid(mp->mnt_vfc->vfc_name, path, dirent->sclass, @@ -861,7 +826,7 @@ __func__, path, sbsec->sid, mp->mnt_stat.f_mntonname, rc, dirent->sclass, newsid, dirent->sid); } - sebsd_free(path); + sebsd_free(path, M_SEBSD); } static void @@ -888,7 +853,7 @@ lnksec->sclass = SECCLASS_LNK_FILE; /* Obtain a SID based on the fstype, path, and class. */ - path = sebsd_malloc(strlen(fullpath) + 2, M_ZERO | M_WAITOK); + path = sebsd_malloc(strlen(fullpath) + 2, M_SEBSD, M_ZERO | M_WAITOK); path[0] = '/'; strcpy(&path[1], fullpath); rc = security_genfs_sid(mp->mnt_vfc->vfc_name, path, lnksec->sclass, @@ -902,7 +867,7 @@ sbsec->sid, mp->mnt_stat.f_mntonname, rc, lnksec->sclass, newsid, lnksec->sid); } - sebsd_free(path); + sebsd_free(path, M_SEBSD); } #endif /* HAS_DEVFS_DIRENT */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.h#8 (text+ko) ==== @@ -54,5 +54,11 @@ extern int sebsd_syscall(struct proc *p, int call, void *args, int *retv); extern int proc_has_system(struct proc *p, u32 perm); extern int proc_has_security(struct proc *p, u32 perm); +extern void *sebsd_malloc(size_t size, int type, int flags); +extern void sebsd_free(void *, int); + +#ifndef M_SEBSD +#define M_SEBSD M_MACTEMP +#endif #endif /* _SYS_SECURITY_SEBSD_H */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#11 (text+ko) ==== @@ -67,13 +67,13 @@ if (rc) return (rc); - kdata = malloc(len, M_SEBSD, M_WAITOK); + kdata = sebsd_malloc(len, M_SEBSD, M_WAITOK); rc = copyin(data, kdata, len); if (rc) return (rc); rc = security_load_policy(kdata, len); - free(kdata, M_SEBSD); + sebsd_free(kdata, M_SEBSD); return (rc); } @@ -88,13 +88,13 @@ if (rc) return (rc); - kdata = malloc(len, M_SEBSD, M_WAITOK); + kdata = sebsd_malloc(len, M_SEBSD, M_WAITOK); rc = copyin(data, kdata, len); if (rc) return (rc); rc = sebsd_load_migscs(kdata, len); - free(kdata, M_SEBSD); + sebsd_free(kdata, M_SEBSD); return (rc); } @@ -159,7 +159,7 @@ } error = copyout(&olen, outlen, sizeof(int)); out2: - sebsd_free(sids); + sebsd_free(sids, M_SEBSD); out: return (error); } @@ -236,12 +236,12 @@ int error; if (gb->out) - out = malloc(gb->len, M_SEBSD, M_WAITOK); + out = sebsd_malloc(gb->len, M_SEBSD, M_WAITOK); error = security_get_bool_string(&gb->len, out); if (out && error == 0) error = copyout(out, gb->out, gb->len); if (out) - free(out, M_SEBSD); + sebsd_free(out, M_SEBSD); return (error); } @@ -274,24 +274,24 @@ error = copyin(args, &uap, sizeof(struct getsid_args)); if (error) return (error); - ctx = sebsd_malloc(MAX_UC, M_WAITOK); + ctx = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); error = copyinstr(uap.ctx, ctx, MAX_UC, &dummy); if (error) { - sebsd_free(ctx); + sebsd_free(ctx, M_SEBSD); return (error); } - usr = sebsd_malloc(MAX_UC, M_WAITOK); + usr = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); error = copyinstr(uap.usr, usr, MAX_UC, &dummy); if (error) { - sebsd_free(ctx); - sebsd_free(usr); + sebsd_free(ctx, M_SEBSD); + sebsd_free(usr, M_SEBSD); return (error); } ctx[MAX_UC-1] = 0; usr[MAX_UC-1] = 0; error = sys_get_sids(call, ctx, usr, uap.out, uap.outlen); - sebsd_free(ctx); - sebsd_free(usr); + sebsd_free(ctx, M_SEBSD); + sebsd_free(usr, M_SEBSD); break; } @@ -304,31 +304,31 @@ error = copyin(args, &uap, sizeof(struct changesid_args)); if (error) return (error); - doms = sebsd_malloc(MAX_UC, M_WAITOK); + doms = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); error = copyinstr(uap.domain, doms, MAX_UC, &dummy); if (error) { - sebsd_free(doms); + sebsd_free(doms, M_SEBSD); return (error); } - srcs = sebsd_malloc(MAX_UC, M_WAITOK); + srcs = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); error = copyinstr(uap.source, srcs, MAX_UC, &dummy); if (error) { - sebsd_free(doms); - sebsd_free(srcs); + sebsd_free(doms, M_SEBSD); + sebsd_free(srcs, M_SEBSD); return (error); } - scs = sebsd_malloc(MAX_UC, M_WAITOK); + scs = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); error = copyinstr(uap.sclass, scs, MAX_UC, &dummy); if (error) { - sebsd_free(doms); - sebsd_free(srcs); - sebsd_free(scs); + sebsd_free(doms, M_SEBSD); + sebsd_free(srcs, M_SEBSD); + sebsd_free(scs, M_SEBSD); return (error); } error = sys_change_sid(doms, srcs, scs, uap.out, uap.outlen); - sebsd_free(doms); - sebsd_free(srcs); - sebsd_free(scs); + sebsd_free(doms, M_SEBSD); + sebsd_free(srcs, M_SEBSD); + sebsd_free(scs, M_SEBSD); return (error); } @@ -368,17 +368,17 @@ if (copyin(args, &p, sizeof(struct lp_args))) return (EFAULT); - str = malloc(p.len, M_SEBSD, M_WAITOK); + str = sebsd_malloc(p.len, M_SEBSD, M_WAITOK); if (!str) return (ENOMEM); if (copyin(p.data, str, p.len)) { - free(str, M_SEBSD); + sebsd_free(str, M_SEBSD); return (EFAULT); } str[p.len-1] = 0; error = security_set_bool(str+1, str[0]-'0'); - free(str, M_SEBSD); + sebsd_free(str, M_SEBSD); break; } ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mach_av.c#11 (text+ko) ==== @@ -82,13 +82,14 @@ int i; struct msgid_classinfo *c; - c = sebsd_malloc(sizeof(int) * nclasses + sizeof(*c), M_WAITOK); + c = sebsd_malloc(sizeof(int) * nclasses + sizeof(*c), M_SEBSD, + M_WAITOK); c->baseid = msgid; c->nclasses = nclasses; for (i = 0; i < nclasses; i++) c->classes[i] = *p++; for (i = msgid; i < msgid + size; i++) { - int *ip = sebsd_malloc(sizeof(int), M_WAITOK); + int *ip = sebsd_malloc(sizeof(int), M_SEBSD, M_WAITOK); *ip = i; error = hashtab_insert(ht, ip, c); if (error) { ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/queue.c#6 (text+ko) ==== @@ -20,7 +20,8 @@ { queue_t q; - q = (queue_t) sebsd_malloc(sizeof(struct queue_info), M_WAITOK); + q = (queue_t) sebsd_malloc(sizeof(struct queue_info), M_SEBSD, + M_WAITOK); if (q == NULL) return NULL; @@ -38,7 +39,7 @@ return -1; newnode = (queue_node_ptr_t) sebsd_malloc(sizeof(struct queue_node), - M_WAITOK); + M_SEBSD, M_WAITOK); if (newnode == NULL) return -1; @@ -64,7 +65,7 @@ return -1; newnode = (queue_node_ptr_t) sebsd_malloc(sizeof(struct queue_node), - M_WAITOK); + M_SEBSD, M_WAITOK); if (newnode == NULL) return -1; @@ -100,7 +101,7 @@ q->tail = NULL; e = node->element; - sebsd_free(node); + sebsd_free(node, M_SEBSD); return e; } @@ -129,10 +130,10 @@ while (p != NULL) { temp = p; p = p->next; - sebsd_free(temp); + sebsd_free(temp, M_SEBSD); } - sebsd_free(q); + sebsd_free(q, M_SEBSD); } int queue_map(queue_t q, int (*f) (queue_element_t, void *), void *vp) @@ -185,7 +186,7 @@ temp = p; p = p->next; g(temp->element, vp); - sebsd_free(temp); + sebsd_free(temp, M_SEBSD); } else { last = p; p = p->next; ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/security.h#6 (text+ko) ==== @@ -90,7 +90,7 @@ int security_genfs_sid(const char *fstype, char *name, u16 sclass, u32 *sid); -#define security_free_context(ctx) ({ if (ctx) free(ctx, M_SEBSD); }) +#define security_free_context(ctx) ({ if (ctx) sebsd_free(ctx, M_SEBSD); }) int security_get_bool_string(int *len, char *out); int security_commit_pending_bools(void); From owner-p4-projects@FreeBSD.ORG Thu Apr 20 14:29:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A01ED16A404; Thu, 20 Apr 2006 14:29:58 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7445716A400 for ; Thu, 20 Apr 2006 14:29:58 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40FD243D46 for ; Thu, 20 Apr 2006 14:29:58 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KETwZY051736 for ; Thu, 20 Apr 2006 14:29:58 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KETwOg051733 for perforce@freebsd.org; Thu, 20 Apr 2006 14:29:58 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 14:29:58 GMT Message-Id: <200604201429.k3KETwOg051733@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95675 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 14:29:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=95675 Change 95675 by millert@millert_g5tower on 2006/04/20 14:29:05 Add security.mac.sebsd.policyvers sysctl Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_sysctl.c#7 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_sysctl.c#7 (text+ko) ==== @@ -54,6 +54,8 @@ #include #include +extern unsigned int policydb_loaded_version; + #if 0 /* * Sysctl handler for security.mac.sebsd.sids @@ -358,6 +360,8 @@ SYSCTL_PROC(_security_mac_sebsd, OID_AUTO, enforcing, CTLTYPE_INT | CTLFLAG_RW, NULL, 0, sysctl_sebsd_enforcing, "I", "SEBSD avc enforcement"); +SYSCTL_UINT(_security_mac_sebsd, OID_AUTO, policyvers, CTLFLAG_RD, + &policydb_loaded_version, 0, " SEBSD loaded policy version"); void sebsd_register_sysctls() @@ -366,4 +370,5 @@ sysctl_register_oid(&sysctl__security_mac_sebsd_verbose); sysctl_register_oid(&sysctl__security_mac_sebsd_auditing); sysctl_register_oid(&sysctl__security_mac_sebsd_enforcing); + sysctl_register_oid(&sysctl__security_mac_sebsd_policyvers); } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 14:34:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2750616A409; Thu, 20 Apr 2006 14:34:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8EAF16A407 for ; Thu, 20 Apr 2006 14:34:36 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE80943D98 for ; Thu, 20 Apr 2006 14:34:19 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KEYJvi055076 for ; Thu, 20 Apr 2006 14:34:19 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KEYJTF055070 for perforce@freebsd.org; Thu, 20 Apr 2006 14:34:19 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 14:34:19 GMT Message-Id: <200604201434.k3KEYJTF055070@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95676 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 14:34:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=95676 Change 95676 by millert@millert_g5tower on 2006/04/20 14:33:20 Emulate Linux audit api instead of using printk. We now hold the mutex for a much short period. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/Makefile#7 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#12 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.h#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc_audit.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask/access_vectors#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#13 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#7 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/Makefile#7 (text+ko) ==== @@ -8,7 +8,7 @@ POLICY_SRCS+= ss/avtab.c ss/ebitmap.c ss/hashtab.c ss/init.c ss/policydb.c \ ss/queue.c ss/services.c ss/sidtab.c ss/symtab.c ss/mach_av.c \ ss/conditional.c -POLICY_SRCS+= avc/avc.c +POLICY_SRCS+= avc/avc.c avc/avc_audit.c CFLAGS+= -DSEFOS_DEBUG -I.. ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#12 (text+ko) ==== @@ -73,7 +73,7 @@ }; static mutex_t *avc_lock; -static mutex_t *avc_log_lock; +extern mutex_t *avc_log_lock; uint64_t avc_msg_cost, avc_msg_burst; static struct avc_node *avc_node_freelist; static struct avc_cache avc_cache; @@ -111,14 +111,14 @@ * @tclass: target security class * @av: access vector */ -void avc_dump_av(u16 tclass, u32 av) +void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av) { char **common_pts = NULLL; u32 common_base = NULL; int i, i2, perm; if (av == 0) { - printk(" null"); + audit_log_end(ab); return; } @@ -130,12 +130,12 @@ } } - printk(" {"); + audit_log_format(ab, " {"); i = 0; perm = 1; while (perm < common_base) { if (perm & av) - printk(" %s", common_pts[i]); + audit_log_format(ab, " %s", common_pts[i]); i++; perm <<= 1; } @@ -148,13 +148,13 @@ break; } if (i2 < ARRAY_SIZE(av_perm_to_string)) - printk(" %s", av_perm_to_string[i2].name); + audit_log_format(ab, " %s", av_perm_to_string[i2].name); } i++; perm <<= 1; } - printk(" }"); + audit_log_format(ab, " }"); } #endif @@ -164,7 +164,7 @@ * @tsid: target security identifier * @tclass: target security class */ -void avc_dump_query(u32 ssid, u32 tsid, u16 tclass) +void avc_dump_query(struct audit_buffer *ab, u32 ssid, u32 tsid, u16 tclass) { int rc; char *scontext; @@ -172,20 +172,20 @@ rc = security_sid_to_context(ssid, &scontext, &scontext_len); if (rc) - printk("ssid=%d", ssid); + audit_log_format(ab, "ssid=%d", ssid); else { - printk("scontext=%s", scontext); + audit_log_format(ab, "scontext=%s", scontext); kfree(scontext); } rc = security_sid_to_context(tsid, &scontext, &scontext_len); if (rc) - printk(" tsid=%d", tsid); + audit_log_format(ab, " tsid=%d", tsid); else { - printk(" tcontext=%s", scontext); + audit_log_format(ab, " tcontext=%s", scontext); kfree(scontext); } - printk(" tclass=%s", security_class_to_string(tclass)); + audit_log_format(ab, " tclass=%s", security_class_to_string(tclass)); } /** @@ -457,23 +457,24 @@ } #if 0 -static inline void avc_print_ipv6_addr(struct in6_addr *addr, u16 port, +static inline void avc_print_ipv6_addr(struct audit_buffer *ab, + struct in6_addr *addr, u16 port, char *name1, char *name2) { if (!ipv6_addr_any(addr)) - printk(" %s=%04x:%04x:%04x:%04x:%04x:" + audit_log_format(ab, " %s=%04x:%04x:%04x:%04x:%04x:" "%04x:%04x:%04x", name1, NIP6(*addr)); if (port) - printk(" %s=%d", name2, ntohs(port)); + audit_log_format(ab, " %s=%d", name2, ntohs(port)); } -static inline void avc_print_ipv4_addr(u32 addr, u16 port, - char *name1, char *name2) +static inline void avc_print_ipv4_addr(struct audit_buffer *ab, u32 addr, + u16 port, char *name1, char *name2) { if (addr) - printk(" %s=%d.%d.%d.%d", name1, NIPQUAD(addr)); + audit_log_format(ab, " %s=%d.%d.%d.%d", name1, NIPQUAD(addr)); if (port) - printk(" %s=%d", name2, ntohs(port)); + audit_log_format(ab, " %s=%d", name2, ntohs(port)); } #endif @@ -566,6 +567,7 @@ { struct proc *tsk = current_proc(); u32 denied, audited; + struct audit_buffer *ab; denied = requested & ~avd->allowed; if (denied) { @@ -583,30 +585,32 @@ if (!check_avc_ratelimit()) return; - /* prevent overlapping printks */ - spin_lock_irqsave(&avc_log_lock,flags); - - printk("\navc: %s ", denied ? "denied" : "granted"); - avc_dump_av(tclass,audited); - printk(" for "); + ab = audit_log_start(); + if (!ab) + return; /* audit_panic has been called */ + audit_log_format(ab, "avc: %s ", denied ? "denied" : "granted"); + avc_dump_av(ab, tclass,audited); + audit_log_format(ab, " for "); /* if (a && a->tsk) tsk = a->tsk;*/ if (tsk && tsk->p_pid) { - printk(" pid=%d comm=%s", tsk->p_pid, tsk->p_comm); + audit_log_format(ab, " pid=%d comm=%s", tsk->p_pid, tsk->p_comm); } if (a) { switch (a->type) { case AVC_AUDIT_DATA_IPC: - printk(" key=%d", a->u.ipc_id); + audit_log_format(ab, " key=%d", a->u.ipc_id); break; #ifdef CAPABILITIES case AVC_AUDIT_DATA_CAP: { const char *capt = capv_to_text (a->u.cap); if (capt[7] == '!') - printk (" capability=<%lld>", a->u.cap); + audit_log_format(ab, + " capability=<%lld>", a->u.cap); else - printk(" capability=%s", capv_to_text (a->u.cap)); + audit_log_format(ab, " capability=%s", + capv_to_text(a->u.cap)); } break; #endif @@ -618,11 +622,13 @@ !VOP_GETATTR(vp, &va, tsk->p_ucred, tsk)) { - printk(" inode=%ld, mountpoint=%s, ", + audit_log_format(ab, + " inode=%ld, mountpoint=%s, ", va.va_fileid, vp->v_mount->mnt_stat.f_mntonname); } else { - printk(" fs/inode info not available"); + audit_log_format(ab, + " fs/inode info not available"); } } break; @@ -631,11 +637,9 @@ break; } } - printk(" "); - avc_dump_query(ssid, tsid, tclass); - printk("\n"); - - spin_unlock_irqrestore(&avc_log_lock,flags); + audit_log_format(ab, " "); + avc_dump_query(ab, ssid, tsid, tclass); + audit_log_end(ab); } /** ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.h#6 (text+ko) ==== @@ -106,10 +106,12 @@ * AVC display support */ void avc_dump_av( + struct audit_buffer *ab, u16 tclass, /* IN */ u32 av); /* IN */ void avc_dump_query( + struct audit_buffer *ab, u32 ssid, /* IN */ u32 tsid, /* IN */ u16 tclass); /* IN */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask/access_vectors#9 (text+ko) ==== @@ -248,6 +248,7 @@ siginh setrlimit rlimitinh + dyntransition } ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#13 (text+ko) ==== @@ -114,6 +114,14 @@ #define spin_lock_irqsave(m,flags) mutex_lock(*(m)) #define spin_unlock_irqrestore(m,flags) mutex_unlock(*(m)) +/* emulate linux audit support */ +struct audit_buffer; +struct audit_buffer *audit_log_start(void); +void audit_log(const char *, ...); +void audit_log_end(struct audit_buffer *); +void audit_log_format(struct audit_buffer *, const char *, ...); +void audit_log_untrustedstring(struct audit_buffer *, const char *); + #endif /* _KERNEL */ #define BUG() printf("BUG: %s:%d", __FILE__, __LINE__) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#7 (text+ko) ==== @@ -1847,7 +1847,7 @@ * @tclass: target security class * @av: access vector */ -void avc_dump_av(u16 tclass, u32 av) +void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av) { char **common_pts = 0; struct class_datum *cls; @@ -1856,14 +1856,14 @@ int i, i2; if (av == 0) { - printk(" null "); + audit_log_format(ab, " null "); return; } cls = policydb.class_val_to_struct[tclass-1]; clb = cls->comdatum; - printk(" {"); + audit_log_format(ab, " {"); for (i = 0, perm = 1; i < sizeof(av) * 8; i++, perm <<= 1) { if (perm & av) { const char *pstr; @@ -1872,14 +1872,14 @@ if (!pstr && clb) pstr = findperm(clb->permissions.table, i); if (!pstr) - printk(" %s:%d", + audit_log_format(ab, " %s:%d", policydb.p_class_val_to_name[tclass-1], i); else - printk(" %s", pstr); + audit_log_format(ab, " %s", pstr); } } - printk(" }"); + audit_log_format(ab, " }"); } const char *security_class_to_string(int tclass) From owner-p4-projects@FreeBSD.ORG Thu Apr 20 14:35:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9DD9C16A40E; Thu, 20 Apr 2006 14:35:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AA7F16A404 for ; Thu, 20 Apr 2006 14:35:24 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C023A43D7E for ; Thu, 20 Apr 2006 14:35:21 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KEZLa5056135 for ; Thu, 20 Apr 2006 14:35:21 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KEZL9G056130 for perforce@freebsd.org; Thu, 20 Apr 2006 14:35:21 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 14:35:21 GMT Message-Id: <200604201435.k3KEZL9G056130@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95677 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 14:35:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95677 Change 95677 by millert@millert_g5tower on 2006/04/20 14:34:51 Enable policy and policy load locks Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/init.c#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#8 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.h#4 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/init.c#6 (text+ko) ==== @@ -15,6 +15,8 @@ #include #include +#include + #include #include #include @@ -34,6 +36,12 @@ if (!preload_find_data("sebsd_policy", &policy_len, &policy_data)) goto loaderr; +#ifdef __APPLE__ + /* Initialize security server locks. */ + policy_rwlock = lock_alloc(TRUE, ETAP_NO_TRACE, ETAP_NO_TRACE); + load_sem = mutex_alloc(ETAP_NO_TRACE); +#endif + printf("security: reading policy configuration\n"); rc = security_load_policy(policy_data, policy_len); @@ -41,7 +49,7 @@ printf("security: error while reading policy, cannot initialize.\n"); return EINVAL; } - + return 0; loaderr: ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#8 (text+ko) ==== @@ -35,35 +35,17 @@ #include #include #include +#include -#ifdef __FreeBSD__ +lock_t *policy_rwlock; +#define POLICY_RDLOCK lock_read(policy_rwlock) +#define POLICY_WRLOCK lock_write(policy_rwlock) +#define POLICY_RDUNLOCK lock_read_done(policy_rwlock) +#define POLICY_WRUNLOCK lock_write_done(policy_rwlock) -#include -#include - -static struct rwlock policy_rwlock; -#define POLICY_RDLOCK rw_rlock(&policy_rwlock) -#define POLICY_WRLOCK rw_wlock(&policy_rwlock) -#define POLICY_RDUNLOCK rw_runlock(&policy_rwlock) -#define POLICY_WRUNLOCK rw_wunlock(&policy_rwlock) - -RW_SYSINIT(policy_rwlock, &policy_rwlock, "SEBSD policy lock"); - -static struct mtx load_sem; -#define LOAD_LOCK mtx_lock(&load_sem) -#define LOAD_UNLOCK mtx_unlock(&load_sem) - -MTX_SYSINIT(load_sem, &load_sem, "SEBSD policy load lock", MTX_DEF); - -#else -/* XXX - define locking for Darwin */ -#define POLICY_RDLOCK -#define POLICY_WRLOCK -#define POLICY_RDUNLOCK -#define POLICY_WRUNLOCK -#define LOAD_LOCK -#define LOAD_UNLOCK -#endif +mutex_t *load_sem; +#define LOAD_LOCK mutex_lock(load_sem) +#define LOAD_UNLOCK mutex_unlock(load_sem) struct sidtab sidtab; struct policydb policydb; ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.h#4 (text+ko) ==== @@ -17,5 +17,11 @@ extern struct sidtab sidtab; extern struct policydb policydb; +/* + * Security server locks, as allocated by security_init(). + */ +extern lock_t *policy_rwlock; +extern mutex_t *load_sem; + #endif /* _SS_SERVICES_H_ */ From owner-p4-projects@FreeBSD.ORG Thu Apr 20 14:37:25 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 42A1516A404; Thu, 20 Apr 2006 14:37:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18D5F16A400 for ; Thu, 20 Apr 2006 14:37:25 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBD9B43D45 for ; Thu, 20 Apr 2006 14:37:24 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KEbO2R057660 for ; Thu, 20 Apr 2006 14:37:24 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KEbOTA057654 for perforce@freebsd.org; Thu, 20 Apr 2006 14:37:24 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 14:37:24 GMT Message-Id: <200604201437.k3KEbOTA057654@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95678 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 14:37:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95678 Change 95678 by millert@millert_g5tower on 2006/04/20 14:37:16 Update flask components based on the version of selinux in the linux 2.6.16 kernel. This does not include the av cache changes which will be merged separately. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/Makefile#8 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_perm_to_string.h#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_permissions.h#8 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask/access_vectors#10 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#14 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/conditional.c#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/constraint.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/context.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/ebitmap.c#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/ebitmap.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/hashtab.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/hashtab.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mls.c#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mls.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mls_types.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/policydb.c#7 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/policydb.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/security.h#7 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/sidtab.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/sidtab.h#6 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/Makefile#8 (text+ko) ==== @@ -5,9 +5,9 @@ POLICY_NOMAN= yes POLICY_SRCS= sebsd.c sebsd_alloc.c sebsd_syscall.c sebsd_sysctl.c -POLICY_SRCS+= ss/avtab.c ss/ebitmap.c ss/hashtab.c ss/init.c ss/policydb.c \ - ss/queue.c ss/services.c ss/sidtab.c ss/symtab.c ss/mach_av.c \ - ss/conditional.c +POLICY_SRCS+= ss/avtab.c ss/conditional.c ss/ebitmap.c ss/hashtab.c \ + ss/init.c ss/mach_av.c ss/mls.c ss/policydb.c ss/queue.c \ + ss/services.c ss/sidtab.c ss/symtab.c POLICY_SRCS+= avc/avc.c avc/avc_audit.c CFLAGS+= -DSEFOS_DEBUG -I.. ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_perm_to_string.h#9 (text+ko) ==== @@ -75,6 +75,7 @@ { SECCLASS_PROCESS, PROCESS__SIGINH, "siginh" }, { SECCLASS_PROCESS, PROCESS__SETRLIMIT, "setrlimit" }, { SECCLASS_PROCESS, PROCESS__RLIMITINH, "rlimitinh" }, + { SECCLASS_PROCESS, PROCESS__DYNTRANSITION, "dyntransition" }, { SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue" }, { SECCLASS_MSG, MSG__SEND, "send" }, { SECCLASS_MSG, MSG__RECEIVE, "receive" }, ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_permissions.h#8 (text+ko) ==== @@ -505,6 +505,7 @@ #define PROCESS__SIGINH 0x0000000000100000UL #define PROCESS__SETRLIMIT 0x0000000000200000UL #define PROCESS__RLIMITINH 0x0000000000400000UL +#define PROCESS__DYNTRANSITION 0x0000000000800000UL #define IPC__WRITE 0x0000000000000020UL #define IPC__UNIX_WRITE 0x0000000000000100UL ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask/access_vectors#10 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#14 (text+ko) ==== @@ -56,13 +56,17 @@ #if !defined(BYTE_ORDER) #error BYTE_ORDER not defined #elif BYTE_ORDER == LITTLE_ENDIAN +#define cpu_to_le16(x) ((__uint16_t)(x)) #define cpu_to_le32(x) ((__uint32_t)(x)) #define cpu_to_le64(x) ((__uint64_t)(x)) +#define le16_to_cpu(x) ((__uint16_t)(x)) #define le32_to_cpu(x) ((__uint32_t)(x)) #define le64_to_cpu(x) ((__uint64_t)(x)) #elif BYTE_ORDER == BIG_ENDIAN +#define cpu_to_le16(x) NXSwapHostShortToLittle(x) #define cpu_to_le32(x) NXSwapHostLongToLittle(x) #define cpu_to_le64(x) NXSwapHostLongLongToLittle(x) +#define le16_to_cpu(x) NXSwapLittleShortToHost(x) #define le32_to_cpu(x) NXSwapLittleLongToHost(x) #define le64_to_cpu(x) NXSwapLittleLongLongToHost(x) #else ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.c#5 (text+ko) ==== @@ -27,7 +27,8 @@ AVTAB_HASH_MASK) static struct avtab_node* -avtab_insert_node(struct avtab *h, int hvalue, struct avtab_node * prev, struct avtab_node * cur, +avtab_insert_node(struct avtab *h, int hvalue, + struct avtab_node * prev, struct avtab_node * cur, struct avtab_key *key, struct avtab_datum *datum) { struct avtab_node * newnode; @@ -49,10 +50,11 @@ return newnode; } -int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum) +static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum) { int hvalue; struct avtab_node *prev, *cur, *newnode; + u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); if (!h) return EINVAL; @@ -64,7 +66,7 @@ if (key->source_type == cur->key.source_type && key->target_type == cur->key.target_type && key->target_class == cur->key.target_class && - (datum->specified & cur->datum.specified)) + (specified & cur->key.specified)) return EEXIST; if (key->source_type < cur->key.source_type) break; @@ -93,6 +95,7 @@ { int hvalue; struct avtab_node *prev, *cur, *newnode; + u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); if (!h) return NULL; @@ -103,7 +106,7 @@ if (key->source_type == cur->key.source_type && key->target_type == cur->key.target_type && key->target_class == cur->key.target_class && - (datum->specified & cur->datum.specified)) + (specified & cur->key.specified)) break; if (key->source_type < cur->key.source_type) break; @@ -120,10 +123,11 @@ return newnode; } -struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *key, int specified) +struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *key) { int hvalue; struct avtab_node *cur; + u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); if (!h) return NULL; @@ -133,7 +137,7 @@ if (key->source_type == cur->key.source_type && key->target_type == cur->key.target_type && key->target_class == cur->key.target_class && - (specified & cur->datum.specified)) + (specified & cur->key.specified)) return &cur->datum; if (key->source_type < cur->key.source_type) @@ -154,10 +158,11 @@ * conjunction with avtab_search_next_node() */ struct avtab_node* -avtab_search_node(struct avtab *h, struct avtab_key *key, int specified) +avtab_search_node(struct avtab *h, struct avtab_key *key) { int hvalue; struct avtab_node *cur; + u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); if (!h) return NULL; @@ -167,7 +172,7 @@ if (key->source_type == cur->key.source_type && key->target_type == cur->key.target_type && key->target_class == cur->key.target_class && - (specified & cur->datum.specified)) + (specified & cur->key.specified)) return cur; if (key->source_type < cur->key.source_type) @@ -191,11 +196,12 @@ if (!node) return NULL; + specified &= ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); for (cur = node->next; cur; cur = cur->next) { if (node->key.source_type == cur->key.source_type && node->key.target_type == cur->key.target_type && node->key.target_class == cur->key.target_class && - (specified & cur->datum.specified)) + (specified & cur->key.specified)) return cur; if (node->key.source_type < cur->key.source_type) @@ -232,31 +238,6 @@ h->htable = NULL; } - -int avtab_map(struct avtab *h, - int (*apply) (struct avtab_key *k, - struct avtab_datum *d, - void *args), - void *args) -{ - int i, ret; - struct avtab_node *cur; - - if (!h) - return 0; - - for (i = 0; i < AVTAB_SIZE; i++) { - cur = h->htable[i]; - while (cur != NULL) { - ret = apply(&cur->key, &cur->datum, args); - if (ret) - return ret; - cur = cur->next; - } - } - return 0; -} - int avtab_init(struct avtab *h) { int i; @@ -297,93 +278,152 @@ max_chain_len); } -int avtab_read_item(void *fp, struct avtab_datum *avdatum, struct avtab_key *avkey) +static uint16_t spec_order[] = { + AVTAB_ALLOWED, + AVTAB_AUDITDENY, + AVTAB_AUDITALLOW, + AVTAB_TRANSITION, + AVTAB_CHANGE, + AVTAB_MEMBER +}; + +int avtab_read_item(void *fp, u32 vers, struct avtab *a, + int (*insertf)(struct avtab *a, struct avtab_key *k, + struct avtab_datum *d, void *p), + void *p) { - u32 *buf; - u32 items, items2; + __le16 buf16[4]; + u16 enabled; + __le32 buf32[7]; + u32 items, items2, val; + struct avtab_key key; + struct avtab_datum datum; + int i, rc; + + memset(&key, 0, sizeof(struct avtab_key)); + memset(&datum, 0, sizeof(struct avtab_datum)); + + if (vers < POLICYDB_VERSION_AVTAB) { + rc = next_entry(buf32, fp, sizeof(u32)); + if (rc < 0) { + printk(KERN_ERR "security: avtab: truncated entry\n"); + return -1; + } + items2 = le32_to_cpu(buf32[0]); + if (items2 > ARRAY_SIZE(buf32)) { + printk(KERN_ERR "security: avtab: entry overflow\n"); + return -1; + + } + rc = next_entry(buf32, fp, sizeof(u32)*items2); + if (rc < 0) { + printk(KERN_ERR "security: avtab: truncated entry\n"); + return -1; + } + items = 0; + + val = le32_to_cpu(buf32[items++]); + key.source_type = (u16)val; + if (key.source_type != val) { + printk("security: avtab: truncated source type\n"); + return -1; + } + val = le32_to_cpu(buf32[items++]); + key.target_type = (u16)val; + if (key.target_type != val) { + printk("security: avtab: truncated target type\n"); + return -1; + } + val = le32_to_cpu(buf32[items++]); + key.target_class = (u16)val; + if (key.target_class != val) { + printk("security: avtab: truncated target class\n"); + return -1; + } + + val = le32_to_cpu(buf32[items++]); + enabled = (val & AVTAB_ENABLED_OLD) ? AVTAB_ENABLED : 0; + + if (!(val & (AVTAB_AV | AVTAB_TYPE))) { + printk("security: avtab: null entry\n"); + return -1; + } + if ((val & AVTAB_AV) && + (val & AVTAB_TYPE)) { + printk("security: avtab: entry has both access vectors and types\n"); + return -1; + } - memset(avkey, 0, sizeof(struct avtab_key)); - memset(avdatum, 0, sizeof(struct avtab_datum)); + for (i = 0; i < ARRAY_SIZE(spec_order); i++) { + if (val & spec_order[i]) { + key.specified = spec_order[i] | enabled; + datum.data = le32_to_cpu(buf32[items++]); + rc = insertf(a, &key, &datum, p); + if (rc) return rc; + } + } - buf = next_entry(fp, sizeof(u32)); - if (!buf) { - printk(KERN_ERR "security: avtab: truncated entry\n"); - goto bad; + if (items != items2) { + printk("security: avtab: entry only had %d items, expected %d\n", items2, items); + return -1; + } + return 0; } - items2 = le32_to_cpu(buf[0]); - buf = next_entry(fp, sizeof(u32)*items2); - if (!buf) { - printk(KERN_ERR "security: avtab: truncated entry\n"); - goto bad; + + rc = next_entry(buf16, fp, sizeof(u16)*4); + if (rc < 0) { + printk("security: avtab: truncated entry\n"); + return -1; } + items = 0; - avkey->source_type = le32_to_cpu(buf[items++]); - avkey->target_type = le32_to_cpu(buf[items++]); - avkey->target_class = le32_to_cpu(buf[items++]); - avdatum->specified = le32_to_cpu(buf[items++]); - if (!(avdatum->specified & (AVTAB_AV | AVTAB_TYPE))) { - printk(KERN_ERR "security: avtab: null entry\n"); - goto bad; + key.source_type = le16_to_cpu(buf16[items++]); + key.target_type = le16_to_cpu(buf16[items++]); + key.target_class = le16_to_cpu(buf16[items++]); + key.specified = le16_to_cpu(buf16[items++]); + + rc = next_entry(buf32, fp, sizeof(u32)); + if (rc < 0) { + printk("security: avtab: truncated entry\n"); + return -1; } - if ((avdatum->specified & AVTAB_AV) && - (avdatum->specified & AVTAB_TYPE)) { - printk(KERN_ERR "security: avtab: entry has both access vectors and types\n"); - goto bad; - } - if (avdatum->specified & AVTAB_AV) { - if (avdatum->specified & AVTAB_ALLOWED) - avtab_allowed(avdatum) = le32_to_cpu(buf[items++]); - if (avdatum->specified & AVTAB_AUDITDENY) - avtab_auditdeny(avdatum) = le32_to_cpu(buf[items++]); - if (avdatum->specified & AVTAB_AUDITALLOW) - avtab_auditallow(avdatum) = le32_to_cpu(buf[items++]); - } else { - if (avdatum->specified & AVTAB_TRANSITION) - avtab_transition(avdatum) = le32_to_cpu(buf[items++]); - if (avdatum->specified & AVTAB_CHANGE) - avtab_change(avdatum) = le32_to_cpu(buf[items++]); - if (avdatum->specified & AVTAB_MEMBER) - avtab_member(avdatum) = le32_to_cpu(buf[items++]); - } - if (items != items2) { - printk(KERN_ERR "security: avtab: entry only had %d items, expected %d\n", - items2, items); - goto bad; - } + datum.data = le32_to_cpu(*buf32); + return insertf(a, &key, &datum, p); +} - return 0; -bad: - return -1; +static int avtab_insertf(struct avtab *a, struct avtab_key *k, + struct avtab_datum *d, void *p) +{ + return avtab_insert(a, k, d); } -int avtab_read(struct avtab *a, void *fp, u32 config) +int avtab_read(struct avtab *a, void *fp, u32 vers) { - int i, rc = EINVAL; - struct avtab_key avkey; - struct avtab_datum avdatum; - u32 *buf; - u32 nel; + int rc; + __le32 buf[1]; + u32 nel, i; - buf = next_entry(fp, sizeof(u32)); - if (!buf) { + rc = next_entry(buf, fp, sizeof(u32)); + if (rc < 0) { printk(KERN_ERR "security: avtab: truncated table\n"); goto bad; } nel = le32_to_cpu(buf[0]); if (!nel) { printk(KERN_ERR "security: avtab: table is empty\n"); + rc = EINVAL; goto bad; } for (i = 0; i < nel; i++) { - if (avtab_read_item(fp, &avdatum, &avkey)) - goto bad; - rc = avtab_insert(a, &avkey, &avdatum); + rc = avtab_read_item(fp,vers, a, avtab_insertf, NULL); if (rc) { if (rc == ENOMEM) printk(KERN_ERR "security: avtab: out of memory\n"); - if (rc == EEXIST) + else if (rc == EEXIST) printk(KERN_ERR "security: avtab: duplicate entry\n"); + else + rc = EINVAL; goto bad; } } @@ -396,3 +436,20 @@ avtab_destroy(a); goto out; } + +void avtab_cache_init(void) +{ +/* XXX - use zone allocator */ +#ifdef SEBSDnotyet + avtab_node_cachep = kmem_cache_create("avtab_node", + sizeof(struct avtab_node), + 0, SLAB_PANIC, NULL, NULL); +#endif +} + +void avtab_cache_destroy(void) +{ +#ifdef SEBSDnotyet + kmem_cache_destroy (avtab_node_cachep); +#endif +} ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.h#5 (text+ko) ==== @@ -21,12 +21,9 @@ #define _SS_AVTAB_H_ struct avtab_key { - u32 source_type; /* source type */ - u32 target_type; /* target type */ - u32 target_class; /* target object class */ -}; - -struct avtab_datum { + u16 source_type; /* source type */ + u16 target_type; /* target type */ + u16 target_class; /* target object class */ #define AVTAB_ALLOWED 1 #define AVTAB_AUDITALLOW 2 #define AVTAB_AUDITDENY 4 @@ -35,15 +32,13 @@ #define AVTAB_MEMBER 32 #define AVTAB_CHANGE 64 #define AVTAB_TYPE (AVTAB_TRANSITION | AVTAB_MEMBER | AVTAB_CHANGE) -#define AVTAB_ENABLED 0x80000000 /* reserved for used in cond_avtab */ - u32 specified; /* what fields are specified */ - u32 data[3]; /* access vectors or types */ -#define avtab_allowed(x) (x)->data[0] -#define avtab_auditdeny(x) (x)->data[1] -#define avtab_auditallow(x) (x)->data[2] -#define avtab_transition(x) (x)->data[0] -#define avtab_change(x) (x)->data[1] -#define avtab_member(x) (x)->data[2] +#define AVTAB_ENABLED_OLD 0x80000000 /* reserved for used in cond_avtab */ +#define AVTAB_ENABLED 0x8000 /* reserved for used in cond_avtab */ + u16 specified; /* what fields are specified */ +}; + +struct avtab_datum { + u32 data; /* access vector or type value */ }; struct avtab_node { @@ -58,27 +53,26 @@ }; int avtab_init(struct avtab *); -int avtab_insert(struct avtab *h, struct avtab_key *k, struct avtab_datum *d); -struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *k, int specified); +struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *k); void avtab_destroy(struct avtab *h); -int avtab_map(struct avtab *h, - int (*apply) (struct avtab_key *k, - struct avtab_datum *d, - void *args), - void *args); void avtab_hash_eval(struct avtab *h, char *tag); -int avtab_read_item(void *fp, struct avtab_datum *avdatum, struct avtab_key *avkey); -int avtab_read(struct avtab *a, void *fp, u32 config); +int avtab_read_item(void *fp, u32 vers, struct avtab *a, + int (*insert)(struct avtab *a, struct avtab_key *k, + struct avtab_datum *d, void *p), + void *p); + +int avtab_read(struct avtab *a, void *fp, u32 vers); struct avtab_node *avtab_insert_nonunique(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum); -struct avtab_node *avtab_search_node(struct avtab *h, struct avtab_key *key, int specified); +struct avtab_node *avtab_search_node(struct avtab *h, struct avtab_key *key); struct avtab_node *avtab_search_node_next(struct avtab_node *node, int specified); void avtab_cache_init(void); +void avtab_cache_destroy(void); #define AVTAB_HASH_BITS 15 #define AVTAB_HASH_BUCKETS (1 << AVTAB_HASH_BITS) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/conditional.c#4 (text+ko) ==== @@ -94,18 +94,18 @@ /* turn the rules on or off */ for (cur = node->true_list; cur != NULL; cur = cur->next) { if (new_state <= 0) { - cur->node->datum.specified &= ~AVTAB_ENABLED; + cur->node->key.specified &= ~AVTAB_ENABLED; } else { - cur->node->datum.specified |= AVTAB_ENABLED; + cur->node->key.specified |= AVTAB_ENABLED; } } for (cur = node->false_list; cur != NULL; cur = cur->next) { /* -1 or 1 */ if (new_state) { - cur->node->datum.specified &= ~AVTAB_ENABLED; + cur->node->key.specified &= ~AVTAB_ENABLED; } else { - cur->node->datum.specified |= AVTAB_ENABLED; + cur->node->key.specified |= AVTAB_ENABLED; } } } @@ -160,16 +160,14 @@ void cond_policydb_destroy(struct policydb *p) { - if (p->bool_val_to_struct != NULL) - kfree(p->bool_val_to_struct); + kfree(p->bool_val_to_struct); avtab_destroy(&p->te_cond_avtab); cond_list_destroy(p->cond_list); } int cond_init_bool_indexes(struct policydb *p) { - if (p->bool_val_to_struct) - kfree(p->bool_val_to_struct); + kfree(p->bool_val_to_struct); p->bool_val_to_struct = (struct cond_bool_datum**) kmalloc(p->p_bools.nprim * sizeof(struct cond_bool_datum*), GFP_KERNEL); if (!p->bool_val_to_struct) @@ -179,8 +177,7 @@ int cond_destroy_bool(void *key, void *datum, void *p) { - if (key) - kfree(key); + kfree(key); kfree(datum); return 0; } @@ -194,7 +191,7 @@ p = datap; if (!booldatum->value || booldatum->value > p->p_bools.nprim) - return -EINVAL; + return EINVAL; p->p_bool_val_to_name[booldatum->value - 1] = key; p->bool_val_to_struct[booldatum->value -1] = booldatum; @@ -213,15 +210,16 @@ { char *key = NULL; struct cond_bool_datum *booldatum; - u32 *buf, len; + __le32 buf[3]; + u32 len; + int rc; - booldatum = kmalloc(sizeof(struct cond_bool_datum), GFP_KERNEL); + booldatum = kzalloc(sizeof(struct cond_bool_datum), GFP_KERNEL); if (!booldatum) return -1; - memset(booldatum, 0, sizeof(struct cond_bool_datum)); - buf = next_entry(fp, sizeof(u32) * 3); - if (!buf) + rc = next_entry(buf, fp, sizeof buf); + if (rc < 0) goto err; booldatum->value = le32_to_cpu(buf[0]); @@ -233,13 +231,12 @@ len = le32_to_cpu(buf[2]); - buf = next_entry(fp, len); - if (!buf) - goto err; key = kmalloc(len + 1, GFP_KERNEL); if (!key) goto err; - memcpy(key, buf, len); + rc = next_entry(key, fp, len); + if (rc < 0) + goto err; key[len] = 0; if (hashtab_insert(h, key, booldatum)) goto err; @@ -250,102 +247,124 @@ return -1; } -static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list **ret_list, - struct cond_av_list *other) +struct cond_insertf_data +{ + struct policydb *p; + struct cond_av_list *other; + struct cond_av_list *head; + struct cond_av_list *tail; +}; + +static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum *d, void *ptr) { - struct cond_av_list *list, *last = NULL, *cur; - struct avtab_key key; - struct avtab_datum datum; + struct cond_insertf_data *data = ptr; + struct policydb *p = data->p; + struct cond_av_list *other = data->other, *list, *cur; struct avtab_node *node_ptr; - int len, i; - u32 *buf; u8 found; - *ret_list = NULL; - len = 0; - buf = next_entry(fp, sizeof(u32)); - if (!buf) - return -1; - - len = le32_to_cpu(buf[0]); - if (len == 0) { - return 0; - } - - for (i = 0; i < len; i++) { - if (avtab_read_item(fp, &datum, &key)) + /* + * For type rules we have to make certain there aren't any + * conflicting rules by searching the te_avtab and the + * cond_te_avtab. + */ + if (k->specified & AVTAB_TYPE) { + if (avtab_search(&p->te_avtab, k)) { + printk("security: type rule already exists outside of a conditional."); goto err; - + } /* - * For type rules we have to make certain there aren't any - * conflicting rules by searching the te_avtab and the - * cond_te_avtab. + * If we are reading the false list other will be a pointer to + * the true list. We can have duplicate entries if there is only + * 1 other entry and it is in our true list. + * + * If we are reading the true list (other == NULL) there shouldn't + * be any other entries. */ - if (datum.specified & AVTAB_TYPE) { - if (avtab_search(&p->te_avtab, &key, AVTAB_TYPE)) { - printk("security: type rule already exists outside of a conditional."); - goto err; - } - /* - * If we are reading the false list other will be a pointer to - * the true list. We can have duplicate entries if there is only - * 1 other entry and it is in our true list. - * - * If we are reading the true list (other == NULL) there shouldn't - * be any other entries. - */ - if (other) { - node_ptr = avtab_search_node(&p->te_cond_avtab, &key, AVTAB_TYPE); - if (node_ptr) { - if (avtab_search_node_next(node_ptr, AVTAB_TYPE)) { - printk("security: too many conflicting type rules."); - goto err; + if (other) { + node_ptr = avtab_search_node(&p->te_cond_avtab, k); + if (node_ptr) { + if (avtab_search_node_next(node_ptr, k->specified)) { + printk("security: too many conflicting type rules."); + goto err; + } + found = 0; + for (cur = other; cur != NULL; cur = cur->next) { + if (cur->node == node_ptr) { + found = 1; + break; } - found = 0; - for (cur = other; cur != NULL; cur = cur->next) { - if (cur->node == node_ptr) { - found = 1; - break; - } - } - if (!found) { - printk("security: conflicting type rules."); - goto err; - } } - } else { - if (avtab_search(&p->te_cond_avtab, &key, AVTAB_TYPE)) { - printk("security: conflicting type rules when adding type rule for true."); + if (!found) { + printk("security: conflicting type rules.\n"); goto err; } } + } else { + if (avtab_search(&p->te_cond_avtab, k)) { + printk("security: conflicting type rules when adding type rule for true.\n"); + goto err; + } } - node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, &key, &datum); - if (!node_ptr) { - printk("security: could not insert rule."); - goto err; - } + } + + node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, k, d); + if (!node_ptr) { + printk("security: could not insert rule."); + goto err; + } + + list = kzalloc(sizeof(struct cond_av_list), GFP_KERNEL); + if (!list) + goto err; + + list->node = node_ptr; + if (!data->head) + data->head = list; + else + data->tail->next = list; + data->tail = list; + return 0; + +err: + cond_av_list_destroy(data->head); + data->head = NULL; + return -1; +} + +static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list **ret_list, struct cond_av_list *other) +{ + int i, rc; + __le32 buf[1]; + u32 len; + struct cond_insertf_data data; + + *ret_list = NULL; + + len = 0; + rc = next_entry(buf, fp, sizeof(u32)); + if (rc < 0) + return -1; - list = kmalloc(sizeof(struct cond_av_list), GFP_KERNEL); - if (!list) - goto err; - memset(list, 0, sizeof(struct cond_av_list)); + len = le32_to_cpu(buf[0]); + if (len == 0) { + return 0; + } - list->node = node_ptr; - if (i == 0) - *ret_list = list; - else - last->next = list; - last = list; + data.p = p; + data.other = other; + data.head = NULL; + data.tail = NULL; + for (i = 0; i < len; i++) { + rc = avtab_read_item(fp, p->policyvers, &p->te_cond_avtab, cond_insertf, &data); + if (rc) + return rc; } + *ret_list = data.head; return 0; -err: - cond_av_list_destroy(*ret_list); - *ret_list = NULL; - return -1; } static int expr_isvalid(struct policydb *p, struct cond_expr *expr) @@ -364,40 +383,42 @@ static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp) { - u32 *buf; - int len, i; + __le32 buf[2]; + u32 len, i; + int rc; struct cond_expr *expr = NULL, *last = NULL; - buf = next_entry(fp, sizeof(u32)); - if (!buf) + rc = next_entry(buf, fp, sizeof(u32)); + if (rc < 0) return -1; node->cur_state = le32_to_cpu(buf[0]); len = 0; - buf = next_entry(fp, sizeof(u32)); - if (!buf) + rc = next_entry(buf, fp, sizeof(u32)); + if (rc < 0) return -1; /* expr */ len = le32_to_cpu(buf[0]); for (i = 0; i < len; i++ ) { - buf = next_entry(fp, sizeof(u32) * 2); - if (!buf) + rc = next_entry(buf, fp, sizeof(u32) * 2); + if (rc < 0) goto err; - expr = kmalloc(sizeof(struct cond_expr), GFP_KERNEL); + expr = kzalloc(sizeof(struct cond_expr), GFP_KERNEL); if (!expr) { goto err; } - memset(expr, 0, sizeof(struct cond_expr)); expr->expr_type = le32_to_cpu(buf[0]); expr->bool = le32_to_cpu(buf[1]); - if (!expr_isvalid(p, expr)) + if (!expr_isvalid(p, expr)) { + kfree(expr); goto err; + } if (i == 0) { node->expr = expr; @@ -420,20 +441,20 @@ int cond_read_list(struct policydb *p, void *fp) { struct cond_node *node, *last = NULL; - u32 *buf; - int i, len; + __le32 buf[1]; + u32 i, len; + int rc; - buf = next_entry(fp, sizeof(u32)); - if (!buf) + rc = next_entry(buf, fp, sizeof buf); + if (rc < 0) return -1; len = le32_to_cpu(buf[0]); for (i = 0; i < len; i++) { - node = kmalloc(sizeof(struct cond_node), GFP_KERNEL); + node = kzalloc(sizeof(struct cond_node), GFP_KERNEL); if (!node) goto err; - memset(node, 0, sizeof(struct cond_node)); if (cond_read_node(p, node, fp) != 0) goto err; @@ -448,6 +469,7 @@ return 0; err: cond_list_destroy(p->cond_list); + p->cond_list = NULL; return -1; } @@ -461,22 +483,22 @@ if(!ctab || !key || !avd) return; - for(node = avtab_search_node(ctab, key, AVTAB_AV); node != NULL; - node = avtab_search_node_next(node, AVTAB_AV)) { - if ( (u32) (AVTAB_ALLOWED|AVTAB_ENABLED) == - (node->datum.specified & (AVTAB_ALLOWED|AVTAB_ENABLED))) - avd->allowed |= avtab_allowed(&node->datum); - if ( (u32) (AVTAB_AUDITDENY|AVTAB_ENABLED) == - (node->datum.specified & (AVTAB_AUDITDENY|AVTAB_ENABLED))) + for(node = avtab_search_node(ctab, key); node != NULL; + node = avtab_search_node_next(node, key->specified)) { + if ( (u16) (AVTAB_ALLOWED|AVTAB_ENABLED) == + (node->key.specified & (AVTAB_ALLOWED|AVTAB_ENABLED))) + avd->allowed |= node->datum.data; + if ( (u16) (AVTAB_AUDITDENY|AVTAB_ENABLED) == + (node->key.specified & (AVTAB_AUDITDENY|AVTAB_ENABLED))) /* Since a '0' in an auditdeny mask represents a * permission we do NOT want to audit (dontaudit), we use * the '&' operand to ensure that all '0's in the mask * are retained (much unlike the allow and auditallow cases). */ - avd->auditdeny &= avtab_auditdeny(&node->datum); - if ( (u32) (AVTAB_AUDITALLOW|AVTAB_ENABLED) == - (node->datum.specified & (AVTAB_AUDITALLOW|AVTAB_ENABLED))) - avd->auditallow |= avtab_auditallow(&node->datum); + avd->auditdeny &= node->datum.data; + if ( (u16) (AVTAB_AUDITALLOW|AVTAB_ENABLED) == + (node->key.specified & (AVTAB_AUDITALLOW|AVTAB_ENABLED))) + avd->auditallow |= node->datum.data; } return; } ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/constraint.h#5 (text+ko) ==== @@ -31,6 +31,13 @@ #define CEXPR_ROLE 2 /* role */ #define CEXPR_TYPE 4 /* type */ #define CEXPR_TARGET 8 /* target if set, source otherwise */ +#define CEXPR_XTARGET 16 /* special 3rd target for validatetrans rule */ +#define CEXPR_L1L2 32 /* low level 1 vs. low level 2 */ +#define CEXPR_L1H2 64 /* low level 1 vs. high level 2 */ +#define CEXPR_H1L2 128 /* high level 1 vs. low level 2 */ +#define CEXPR_H1H2 256 /* high level 1 vs. high level 2 */ +#define CEXPR_L1H1 512 /* low level 1 vs. high level 1 */ +#define CEXPR_L2H2 1024 /* low level 2 vs. high level 2 */ u32 attr; /* attribute */ #define CEXPR_EQ 1 /* == or eq */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/context.h#5 (text+ko) ==== @@ -17,6 +17,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Apr 20 14:39:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4376A16A407; Thu, 20 Apr 2006 14:39:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 159A216A400 for ; Thu, 20 Apr 2006 14:39:28 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D483443D45 for ; Thu, 20 Apr 2006 14:39:27 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KEdRqK059040 for ; Thu, 20 Apr 2006 14:39:27 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KEdR9M059027 for perforce@freebsd.org; Thu, 20 Apr 2006 14:39:27 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 14:39:27 GMT Message-Id: <200604201439.k3KEdR9M059027@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95679 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 14:39:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=95679 Change 95679 by millert@millert_g5tower on 2006/04/20 14:38:54 Add back avtab_map() since security_get_file_sids() needs it. Expand an instance of avtab_allowed() I missed. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.c#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.h#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#10 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.c#6 (text+ko) ==== @@ -238,6 +238,31 @@ h->htable = NULL; } + +int avtab_map(struct avtab *h, + int (*apply) (struct avtab_key *k, + struct avtab_datum *d, + void *args), + void *args) +{ + int i, ret; + struct avtab_node *cur; + + if (!h) + return 0; + + for (i = 0; i < AVTAB_SIZE; i++) { + cur = h->htable[i]; + while (cur != NULL) { + ret = apply(&cur->key, &cur->datum, args); + if (ret) + return ret; + cur = cur->next; + } + } + return 0; +} + int avtab_init(struct avtab *h) { int i; ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.h#6 (text+ko) ==== @@ -55,6 +55,11 @@ int avtab_init(struct avtab *); struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *k); void avtab_destroy(struct avtab *h); +int avtab_map(struct avtab *h, + int (*apply) (struct avtab_key *k, + struct avtab_datum *d, + void *args), + void *args); void avtab_hash_eval(struct avtab *h, char *tag); int avtab_read_item(void *fp, u32 vers, struct avtab *a, ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#10 (text+ko) ==== @@ -1624,7 +1624,7 @@ if (avk->source_type != p->scon->type || avk->target_class != p->sclass || (specified & AVTAB_AV) == 0 || - (avtab_allowed(avd) & COMMON_FILE__RELABELTO) == 0) + (avd->data & COMMON_FILE__RELABELTO) == 0) return 0; fc.type = avk->target_type; From owner-p4-projects@FreeBSD.ORG Thu Apr 20 14:40:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EB17116A402; Thu, 20 Apr 2006 14:40:29 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA9C316A400 for ; Thu, 20 Apr 2006 14:40:29 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9422E43D45 for ; Thu, 20 Apr 2006 14:40:29 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KEeTsJ059827 for ; Thu, 20 Apr 2006 14:40:29 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KEeTa6059821 for perforce@freebsd.org; Thu, 20 Apr 2006 14:40:29 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 14:40:29 GMT Message-Id: <200604201440.k3KEeTa6059821@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95680 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 14:40:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=95680 Change 95680 by millert@millert_g5tower on 2006/04/20 14:40:00 Use a zone allocator for the avtab cache. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.c#7 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/avtab.c#7 (text+ko) ==== @@ -20,19 +20,24 @@ #include #include +#include + #define AVTAB_HASH(keyp) \ ((keyp->target_class + \ (keyp->target_type << 2) + \ (keyp->source_type << 9)) & \ AVTAB_HASH_MASK) +zone_t avtab_node_cachep; + static struct avtab_node* avtab_insert_node(struct avtab *h, int hvalue, struct avtab_node * prev, struct avtab_node * cur, struct avtab_key *key, struct avtab_datum *datum) { struct avtab_node * newnode; - newnode = kmalloc(sizeof(*newnode), GFP_KERNEL); + /* XXX - should use non-blocking zalloc */ + newnode = (struct avtab_node *)zalloc(avtab_node_cachep); if (newnode == NULL) return NULL; memset(newnode, 0, sizeof(struct avtab_node)); @@ -464,17 +469,13 @@ void avtab_cache_init(void) { -/* XXX - use zone allocator */ -#ifdef SEBSDnotyet - avtab_node_cachep = kmem_cache_create("avtab_node", - sizeof(struct avtab_node), - 0, SLAB_PANIC, NULL, NULL); -#endif + // XXX - we can probably do a better job of packing items into the zone + avtab_node_cachep = zinit(sizeof(struct avtab_node), + 4096 * sizeof(struct avtab_node), 16 * sizeof(struct avtab_node), + "avtab node"); } void avtab_cache_destroy(void) { -#ifdef SEBSDnotyet - kmem_cache_destroy (avtab_node_cachep); -#endif + /* Darwin does not provide a way to destroy a zone. */ } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 14:43:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 49D3D16A408; Thu, 20 Apr 2006 14:43:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 184E216A401 for ; Thu, 20 Apr 2006 14:43:42 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4EF943D5D for ; Thu, 20 Apr 2006 14:43:40 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KEheUR062329 for ; Thu, 20 Apr 2006 14:43:40 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KEheIA062313 for perforce@freebsd.org; Thu, 20 Apr 2006 14:43:40 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 14:43:40 GMT Message-Id: <200604201443.k3KEheIA062313@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95681 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 14:43:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=95681 Change 95681 by millert@millert_g5tower on 2006/04/20 14:42:40 Use proc_has_security() not cred_has_security(). Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#12 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#12 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2002 Networks Associates Technology, Inc. - * Copyright (c) 2005, 2006 SPARTA, Inc. + * Copyright (c) 2005-2006 SPARTA, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by NAI Labs, the @@ -84,7 +84,7 @@ void *kdata; int rc; - rc = cred_has_security(td->p_ucred, SECURITY__LOAD_POLICY); + rc = proc_has_security(td, SECURITY__LOAD_POLICY); if (rc) return (rc); @@ -362,7 +362,7 @@ { char *str; - error = cred_has_security(td->p_ucred, SECURITY__SETBOOL); + error = proc_has_security(td, SECURITY__SETBOOL); if (error) return (error); @@ -383,7 +383,7 @@ } case SEBSDCALL_COMMIT_BOOLS: - error = cred_has_security(td->p_ucred, SECURITY__SETBOOL); + error = proc_has_security(td, SECURITY__SETBOOL); if (error) return (error); return (security_commit_pending_bools()); From owner-p4-projects@FreeBSD.ORG Thu Apr 20 15:11:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DF63A16A409; Thu, 20 Apr 2006 15:11:14 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B552016A405 for ; Thu, 20 Apr 2006 15:11:14 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F2D343D45 for ; Thu, 20 Apr 2006 15:11:14 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KFBE8U076145 for ; Thu, 20 Apr 2006 15:11:14 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KFBE0U076136 for perforce@freebsd.org; Thu, 20 Apr 2006 15:11:14 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 15:11:14 GMT Message-Id: <200604201511.k3KFBE0U076136@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95682 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 15:11:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=95682 Change 95682 by millert@millert_g5tower on 2006/04/20 15:10:53 Include string.h to get strchr() proto Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mls.c#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mls.c#5 (text+ko) ==== @@ -11,6 +11,8 @@ * Copyright (C) 2004-2005 Trusted Computer Solutions, Inc. */ +#include + #include #include #include From owner-p4-projects@FreeBSD.ORG Thu Apr 20 15:32:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 55A8E16A404; Thu, 20 Apr 2006 15:32:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12B8F16A402 for ; Thu, 20 Apr 2006 15:32:43 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2B4C43D48 for ; Thu, 20 Apr 2006 15:32:42 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KFWgSr088135 for ; Thu, 20 Apr 2006 15:32:42 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KFWgMn088129 for perforce@freebsd.org; Thu, 20 Apr 2006 15:32:42 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 15:32:42 GMT Message-Id: <200604201532.k3KFWgMn088129@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95684 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 15:32:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=95684 Change 95684 by millert@millert_g5tower on 2006/04/20 15:32:03 Merge in the new av cache code. Since Darwin doesn't have rcu style locking, use rwlocks instead. In the future, it may be possible to reduce the amount of time we hold a write lock by doing atomic list operations (which is what Linux does). The new avc code expects different versions of the generated flask .h files so mkaccess_vector.sh and mkflask.sh have been updated based on policy-1.28. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_inherit.h#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_perm_to_string.h#10 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_permissions.h#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#13 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.h#7 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc_ss.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/class_to_string.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/common_perm_to_string.h#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask.h#8 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask/Makefile#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask/mkaccess_vector.sh#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/flask/mkflask.sh#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#15 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.c#40 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd.h#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_labels.h#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#13 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscalls.h#8 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_sysctl.c#8 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/mach_av.c#12 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_inherit.h#4 (text+ko) ==== @@ -1,37 +1,21 @@ /* This file is automatically generated. Do not edit. */ -/* FLASK */ - -typedef struct -{ - u16 tclass; - char **common_pts; - u32 common_base; -} av_inherit_t; - -static av_inherit_t av_inherit[] = { - { SECCLASS_DIR, common_file_perm_to_string, 0x0000000000100000UL }, - { SECCLASS_FILE, common_file_perm_to_string, 0x0000000000100000UL }, - { SECCLASS_LNK_FILE, common_file_perm_to_string, 0x0000000000100000UL }, - { SECCLASS_CHR_FILE, common_file_perm_to_string, 0x0000000000100000UL }, - { SECCLASS_BLK_FILE, common_file_perm_to_string, 0x0000000000100000UL }, - { SECCLASS_SOCK_FILE, common_file_perm_to_string, 0x0000000000100000UL }, - { SECCLASS_FIFO_FILE, common_file_perm_to_string, 0x0000000000100000UL }, - { SECCLASS_SOCKET, common_socket_perm_to_string, 0x0000000001000000UL }, - { SECCLASS_TCP_SOCKET, common_socket_perm_to_string, 0x0000000001000000UL }, - { SECCLASS_UDP_SOCKET, common_socket_perm_to_string, 0x0000000001000000UL }, - { SECCLASS_RAWIP_SOCKET, common_socket_perm_to_string, 0x0000000001000000UL }, - { SECCLASS_NETLINK_SOCKET, common_socket_perm_to_string, 0x0000000001000000UL }, - { SECCLASS_PACKET_SOCKET, common_socket_perm_to_string, 0x0000000001000000UL }, - { SECCLASS_KEY_SOCKET, common_socket_perm_to_string, 0x0000000001000000UL }, - { SECCLASS_UNIX_STREAM_SOCKET, common_socket_perm_to_string, 0x0000000001000000UL }, - { SECCLASS_UNIX_DGRAM_SOCKET, common_socket_perm_to_string, 0x0000000001000000UL }, - { SECCLASS_IPC, common_ipc_perm_to_string, 0x0000000000000200UL }, - { SECCLASS_SEM, common_ipc_perm_to_string, 0x0000000000000200UL }, - { SECCLASS_MSGQ, common_ipc_perm_to_string, 0x0000000000000200UL }, - { SECCLASS_SHM, common_ipc_perm_to_string, 0x0000000000000200UL }, -}; - -#define AV_INHERIT_SIZE (sizeof(av_inherit)/sizeof(av_inherit_t)) - - -/* FLASK */ + S_(SECCLASS_DIR, file, 0x00100000UL) + S_(SECCLASS_FILE, file, 0x00100000UL) + S_(SECCLASS_LNK_FILE, file, 0x00100000UL) + S_(SECCLASS_CHR_FILE, file, 0x00100000UL) + S_(SECCLASS_BLK_FILE, file, 0x00100000UL) + S_(SECCLASS_SOCK_FILE, file, 0x00100000UL) + S_(SECCLASS_FIFO_FILE, file, 0x00100000UL) + S_(SECCLASS_SOCKET, socket, 0x01000000UL) + S_(SECCLASS_TCP_SOCKET, socket, 0x01000000UL) + S_(SECCLASS_UDP_SOCKET, socket, 0x01000000UL) + S_(SECCLASS_RAWIP_SOCKET, socket, 0x01000000UL) + S_(SECCLASS_NETLINK_SOCKET, socket, 0x01000000UL) + S_(SECCLASS_PACKET_SOCKET, socket, 0x01000000UL) + S_(SECCLASS_KEY_SOCKET, socket, 0x01000000UL) + S_(SECCLASS_UNIX_STREAM_SOCKET, socket, 0x01000000UL) + S_(SECCLASS_UNIX_DGRAM_SOCKET, socket, 0x01000000UL) + S_(SECCLASS_IPC, ipc, 0x00000200UL) + S_(SECCLASS_SEM, ipc, 0x00000200UL) + S_(SECCLASS_MSGQ, ipc, 0x00000200UL) + S_(SECCLASS_SHM, ipc, 0x00000200UL) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_perm_to_string.h#10 (text+ko) ==== @@ -1,148 +1,132 @@ /* This file is automatically generated. Do not edit. */ -/* FLASK */ - -typedef struct -{ - u16 tclass; - u32 value; - char *name; -} av_perm_to_string_t; - -static av_perm_to_string_t av_perm_to_string[] = { - { SECCLASS_FILESYSTEM, FILESYSTEM__MOUNT, "mount" }, - { SECCLASS_FILESYSTEM, FILESYSTEM__REMOUNT, "remount" }, - { SECCLASS_FILESYSTEM, FILESYSTEM__UNMOUNT, "unmount" }, - { SECCLASS_FILESYSTEM, FILESYSTEM__GETATTR, "getattr" }, - { SECCLASS_FILESYSTEM, FILESYSTEM__RELABELFROM, "relabelfrom" }, - { SECCLASS_FILESYSTEM, FILESYSTEM__RELABELTO, "relabelto" }, - { SECCLASS_FILESYSTEM, FILESYSTEM__TRANSITION, "transition" }, - { SECCLASS_FILESYSTEM, FILESYSTEM__ASSOCIATE, "associate" }, - { SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAMOD, "quotamod" }, - { SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAGET, "quotaget" }, - { SECCLASS_DIR, DIR__ADD_NAME, "add_name" }, - { SECCLASS_DIR, DIR__REMOVE_NAME, "remove_name" }, - { SECCLASS_DIR, DIR__REPARENT, "reparent" }, - { SECCLASS_DIR, DIR__SEARCH, "search" }, - { SECCLASS_DIR, DIR__RMDIR, "rmdir" }, - { SECCLASS_FILE, FILE__EXECUTE_NO_TRANS, "execute_no_trans" }, - { SECCLASS_FILE, FILE__ENTRYPOINT, "entrypoint" }, - { SECCLASS_FD, FD__CREATE, "create" }, - { SECCLASS_FD, FD__USE, "use" }, - { SECCLASS_TCP_SOCKET, TCP_SOCKET__CONNECTTO, "connectto" }, - { SECCLASS_TCP_SOCKET, TCP_SOCKET__NEWCONN, "newconn" }, - { SECCLASS_TCP_SOCKET, TCP_SOCKET__ACCEPTFROM, "acceptfrom" }, - { SECCLASS_TCP_SOCKET, TCP_SOCKET__NODE_BIND, "node_bind" }, - { SECCLASS_UDP_SOCKET, UDP_SOCKET__NODE_BIND, "node_bind" }, - { SECCLASS_RAWIP_SOCKET, RAWIP_SOCKET__NODE_BIND, "node_bind" }, - { SECCLASS_NODE, NODE__TCP_RECV, "tcp_recv" }, - { SECCLASS_NODE, NODE__TCP_SEND, "tcp_send" }, - { SECCLASS_NODE, NODE__UDP_RECV, "udp_recv" }, - { SECCLASS_NODE, NODE__UDP_SEND, "udp_send" }, - { SECCLASS_NODE, NODE__RAWIP_RECV, "rawip_recv" }, - { SECCLASS_NODE, NODE__RAWIP_SEND, "rawip_send" }, - { SECCLASS_NODE, NODE__ENFORCE_DEST, "enforce_dest" }, - { SECCLASS_NETIF, NETIF__GETATTR, "getattr" }, - { SECCLASS_NETIF, NETIF__SETATTR, "setattr" }, - { SECCLASS_NETIF, NETIF__TCP_RECV, "tcp_recv" }, - { SECCLASS_NETIF, NETIF__TCP_SEND, "tcp_send" }, - { SECCLASS_NETIF, NETIF__UDP_RECV, "udp_recv" }, - { SECCLASS_NETIF, NETIF__UDP_SEND, "udp_send" }, - { SECCLASS_NETIF, NETIF__RAWIP_RECV, "rawip_recv" }, - { SECCLASS_NETIF, NETIF__RAWIP_SEND, "rawip_send" }, - { SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__CONNECTTO, "connectto" }, - { SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__NEWCONN, "newconn" }, - { SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__ACCEPTFROM, "acceptfrom" }, - { SECCLASS_PROCESS, PROCESS__FORK, "fork" }, - { SECCLASS_PROCESS, PROCESS__TRANSITION, "transition" }, - { SECCLASS_PROCESS, PROCESS__SIGCHLD, "sigchld" }, - { SECCLASS_PROCESS, PROCESS__SIGKILL, "sigkill" }, - { SECCLASS_PROCESS, PROCESS__SIGSTOP, "sigstop" }, - { SECCLASS_PROCESS, PROCESS__SIGNULL, "signull" }, - { SECCLASS_PROCESS, PROCESS__SIGNAL, "signal" }, - { SECCLASS_PROCESS, PROCESS__PTRACE, "ptrace" }, - { SECCLASS_PROCESS, PROCESS__GETSCHED, "getsched" }, - { SECCLASS_PROCESS, PROCESS__SETSCHED, "setsched" }, - { SECCLASS_PROCESS, PROCESS__GETSESSION, "getsession" }, - { SECCLASS_PROCESS, PROCESS__GETPGID, "getpgid" }, - { SECCLASS_PROCESS, PROCESS__SETPGID, "setpgid" }, - { SECCLASS_PROCESS, PROCESS__GETCAP, "getcap" }, - { SECCLASS_PROCESS, PROCESS__SETCAP, "setcap" }, - { SECCLASS_PROCESS, PROCESS__SHARE, "share" }, - { SECCLASS_PROCESS, PROCESS__GETATTR, "getattr" }, - { SECCLASS_PROCESS, PROCESS__SETEXEC, "setexec" }, - { SECCLASS_PROCESS, PROCESS__SETFSCREATE, "setfscreate" }, - { SECCLASS_PROCESS, PROCESS__NOATSECURE, "noatsecure" }, - { SECCLASS_PROCESS, PROCESS__SIGINH, "siginh" }, - { SECCLASS_PROCESS, PROCESS__SETRLIMIT, "setrlimit" }, - { SECCLASS_PROCESS, PROCESS__RLIMITINH, "rlimitinh" }, - { SECCLASS_PROCESS, PROCESS__DYNTRANSITION, "dyntransition" }, - { SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue" }, - { SECCLASS_MSG, MSG__SEND, "send" }, - { SECCLASS_MSG, MSG__RECEIVE, "receive" }, - { SECCLASS_MSG, MSG__DESTROY, "destroy" }, - { SECCLASS_SHM, SHM__LOCK, "lock" }, - { SECCLASS_SECURITY, SECURITY__COMPUTE_AV, "compute_av" }, - { SECCLASS_SECURITY, SECURITY__COMPUTE_CREATE, "compute_create" }, - { SECCLASS_SECURITY, SECURITY__COMPUTE_MEMBER, "compute_member" }, - { SECCLASS_SECURITY, SECURITY__CHECK_CONTEXT, "check_context" }, - { SECCLASS_SECURITY, SECURITY__LOAD_POLICY, "load_policy" }, - { SECCLASS_SECURITY, SECURITY__COMPUTE_RELABEL, "compute_relabel" }, - { SECCLASS_SECURITY, SECURITY__COMPUTE_USER, "compute_user" }, - { SECCLASS_SECURITY, SECURITY__SETENFORCE, "setenforce" }, - { SECCLASS_SECURITY, SECURITY__SETBOOL, "setbool" }, - { SECCLASS_SYSTEM, SYSTEM__IPC_INFO, "ipc_info" }, - { SECCLASS_SYSTEM, SYSTEM__SYSLOG_READ, "syslog_read" }, - { SECCLASS_SYSTEM, SYSTEM__SYSLOG_MOD, "syslog_mod" }, - { SECCLASS_SYSTEM, SYSTEM__SYSLOG_CONSOLE, "syslog_console" }, - { SECCLASS_CAPABILITY, CAPABILITY__CHOWN, "chown" }, - { SECCLASS_CAPABILITY, CAPABILITY__DAC_EXECUTE, "dac_execute" }, - { SECCLASS_CAPABILITY, CAPABILITY__DAC_WRITE, "dac_write" }, - { SECCLASS_CAPABILITY, CAPABILITY__DAC_READ_SEARCH, "dac_read_search" }, - { SECCLASS_CAPABILITY, CAPABILITY__FOWNER, "fowner" }, - { SECCLASS_CAPABILITY, CAPABILITY__FSETID, "fsetid" }, - { SECCLASS_CAPABILITY, CAPABILITY__KILL, "kill" }, - { SECCLASS_CAPABILITY, CAPABILITY__SETFCAP, "setfcap" }, - { SECCLASS_CAPABILITY, CAPABILITY__SETGID, "setgid" }, - { SECCLASS_CAPABILITY, CAPABILITY__SETUID, "setuid" }, - { SECCLASS_CAPABILITY, CAPABILITY__AUDIT_CONTROL, "audit_control" }, - { SECCLASS_CAPABILITY, CAPABILITY__AUDIT_WRITE, "audit_write" }, - { SECCLASS_CAPABILITY, CAPABILITY__LINUX_IMMUTABLE, "linux_immutable" }, - { SECCLASS_CAPABILITY, CAPABILITY__NET_BIND_SERVICE, "net_bind_service" }, - { SECCLASS_CAPABILITY, CAPABILITY__NET_BROADCAST, "net_broadcast" }, - { SECCLASS_CAPABILITY, CAPABILITY__NET_ADMIN, "net_admin" }, - { SECCLASS_CAPABILITY, CAPABILITY__NET_RAW, "net_raw" }, - { SECCLASS_CAPABILITY, CAPABILITY__IPC_LOCK, "ipc_lock" }, - { SECCLASS_CAPABILITY, CAPABILITY__IPC_OWNER, "ipc_owner" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_MODULE, "sys_module" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_RAWIO, "sys_rawio" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_CHROOT, "sys_chroot" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_PTRACE, "sys_ptrace" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_PACCT, "sys_pacct" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_ADMIN, "sys_admin" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_BOOT, "sys_boot" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_NICE, "sys_nice" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_RESOURCE, "sys_resource" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_TIME, "sys_time" }, - { SECCLASS_CAPABILITY, CAPABILITY__SYS_TTY_CONFIG, "sys_tty_config" }, - { SECCLASS_CAPABILITY, CAPABILITY__MKNOD, "mknod" }, - { SECCLASS_MACH_PORT, MACH_PORT__RELABELFROM, "relabelfrom" }, - { SECCLASS_MACH_PORT, MACH_PORT__RELABELTO, "relabelto" }, - { SECCLASS_MACH_PORT, MACH_PORT__SEND, "send" }, - { SECCLASS_MACH_PORT, MACH_PORT__RECV, "recv" }, - { SECCLASS_MACH_PORT, MACH_PORT__MAKE_SEND, "make_send" }, - { SECCLASS_MACH_PORT, MACH_PORT__MAKE_SEND_ONCE, "make_send_once" }, - { SECCLASS_MACH_PORT, MACH_PORT__COPY_SEND, "copy_send" }, - { SECCLASS_MACH_PORT, MACH_PORT__MOVE_SEND, "move_send" }, - { SECCLASS_MACH_PORT, MACH_PORT__MOVE_SEND_ONCE, "move_send_once" }, - { SECCLASS_MACH_PORT, MACH_PORT__MOVE_RECV, "move_recv" }, - { SECCLASS_MACH_PORT, MACH_PORT__HOLD_SEND, "hold_send" }, - { SECCLASS_MACH_PORT, MACH_PORT__HOLD_SEND_ONCE, "hold_send_once" }, - { SECCLASS_MACH_PORT, MACH_PORT__HOLD_RECV, "hold_recv" }, - { SECCLASS_MACH_TASK, MACH_TASK__TERMINATE, "terminate" }, - { SECCLASS_MACH_TASK, MACH_TASK__SET_SPECIAL_PORT, "set_special_port" }, -}; - -#define AV_PERM_TO_STRING_SIZE (sizeof(av_perm_to_string)/sizeof(av_perm_to_string_t)) - - -/* FLASK */ + S_(SECCLASS_FILESYSTEM, FILESYSTEM__MOUNT, "mount") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__REMOUNT, "remount") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__UNMOUNT, "unmount") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__GETATTR, "getattr") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__RELABELFROM, "relabelfrom") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__RELABELTO, "relabelto") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__TRANSITION, "transition") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__ASSOCIATE, "associate") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAMOD, "quotamod") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAGET, "quotaget") + S_(SECCLASS_DIR, DIR__ADD_NAME, "add_name") + S_(SECCLASS_DIR, DIR__REMOVE_NAME, "remove_name") + S_(SECCLASS_DIR, DIR__REPARENT, "reparent") + S_(SECCLASS_DIR, DIR__SEARCH, "search") + S_(SECCLASS_DIR, DIR__RMDIR, "rmdir") + S_(SECCLASS_FILE, FILE__EXECUTE_NO_TRANS, "execute_no_trans") + S_(SECCLASS_FILE, FILE__ENTRYPOINT, "entrypoint") + S_(SECCLASS_FD, FD__CREATE, "create") + S_(SECCLASS_FD, FD__USE, "use") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__CONNECTTO, "connectto") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NEWCONN, "newconn") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__ACCEPTFROM, "acceptfrom") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NODE_BIND, "node_bind") + S_(SECCLASS_UDP_SOCKET, UDP_SOCKET__NODE_BIND, "node_bind") + S_(SECCLASS_RAWIP_SOCKET, RAWIP_SOCKET__NODE_BIND, "node_bind") + S_(SECCLASS_NODE, NODE__TCP_RECV, "tcp_recv") + S_(SECCLASS_NODE, NODE__TCP_SEND, "tcp_send") + S_(SECCLASS_NODE, NODE__UDP_RECV, "udp_recv") + S_(SECCLASS_NODE, NODE__UDP_SEND, "udp_send") + S_(SECCLASS_NODE, NODE__RAWIP_RECV, "rawip_recv") + S_(SECCLASS_NODE, NODE__RAWIP_SEND, "rawip_send") + S_(SECCLASS_NODE, NODE__ENFORCE_DEST, "enforce_dest") + S_(SECCLASS_NETIF, NETIF__GETATTR, "getattr") + S_(SECCLASS_NETIF, NETIF__SETATTR, "setattr") + S_(SECCLASS_NETIF, NETIF__TCP_RECV, "tcp_recv") + S_(SECCLASS_NETIF, NETIF__TCP_SEND, "tcp_send") + S_(SECCLASS_NETIF, NETIF__UDP_RECV, "udp_recv") + S_(SECCLASS_NETIF, NETIF__UDP_SEND, "udp_send") + S_(SECCLASS_NETIF, NETIF__RAWIP_RECV, "rawip_recv") + S_(SECCLASS_NETIF, NETIF__RAWIP_SEND, "rawip_send") + S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__CONNECTTO, "connectto") + S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__NEWCONN, "newconn") + S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__ACCEPTFROM, "acceptfrom") + S_(SECCLASS_PROCESS, PROCESS__FORK, "fork") + S_(SECCLASS_PROCESS, PROCESS__TRANSITION, "transition") + S_(SECCLASS_PROCESS, PROCESS__SIGCHLD, "sigchld") + S_(SECCLASS_PROCESS, PROCESS__SIGKILL, "sigkill") + S_(SECCLASS_PROCESS, PROCESS__SIGSTOP, "sigstop") + S_(SECCLASS_PROCESS, PROCESS__SIGNULL, "signull") + S_(SECCLASS_PROCESS, PROCESS__SIGNAL, "signal") + S_(SECCLASS_PROCESS, PROCESS__PTRACE, "ptrace") + S_(SECCLASS_PROCESS, PROCESS__GETSCHED, "getsched") + S_(SECCLASS_PROCESS, PROCESS__SETSCHED, "setsched") + S_(SECCLASS_PROCESS, PROCESS__GETSESSION, "getsession") + S_(SECCLASS_PROCESS, PROCESS__GETPGID, "getpgid") + S_(SECCLASS_PROCESS, PROCESS__SETPGID, "setpgid") + S_(SECCLASS_PROCESS, PROCESS__GETCAP, "getcap") + S_(SECCLASS_PROCESS, PROCESS__SETCAP, "setcap") + S_(SECCLASS_PROCESS, PROCESS__SHARE, "share") + S_(SECCLASS_PROCESS, PROCESS__GETATTR, "getattr") + S_(SECCLASS_PROCESS, PROCESS__SETEXEC, "setexec") + S_(SECCLASS_PROCESS, PROCESS__SETFSCREATE, "setfscreate") + S_(SECCLASS_PROCESS, PROCESS__NOATSECURE, "noatsecure") + S_(SECCLASS_PROCESS, PROCESS__SIGINH, "siginh") + S_(SECCLASS_PROCESS, PROCESS__SETRLIMIT, "setrlimit") + S_(SECCLASS_PROCESS, PROCESS__RLIMITINH, "rlimitinh") + S_(SECCLASS_PROCESS, PROCESS__DYNTRANSITION, "dyntransition") + S_(SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue") + S_(SECCLASS_MSG, MSG__SEND, "send") + S_(SECCLASS_MSG, MSG__RECEIVE, "receive") + S_(SECCLASS_MSG, MSG__DESTROY, "destroy") + S_(SECCLASS_SHM, SHM__LOCK, "lock") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_AV, "compute_av") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_CREATE, "compute_create") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_MEMBER, "compute_member") + S_(SECCLASS_SECURITY, SECURITY__CHECK_CONTEXT, "check_context") + S_(SECCLASS_SECURITY, SECURITY__LOAD_POLICY, "load_policy") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_RELABEL, "compute_relabel") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_USER, "compute_user") + S_(SECCLASS_SECURITY, SECURITY__SETENFORCE, "setenforce") + S_(SECCLASS_SECURITY, SECURITY__SETBOOL, "setbool") + S_(SECCLASS_SYSTEM, SYSTEM__IPC_INFO, "ipc_info") + S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_READ, "syslog_read") + S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_MOD, "syslog_mod") + S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_CONSOLE, "syslog_console") + S_(SECCLASS_CAPABILITY, CAPABILITY__CHOWN, "chown") + S_(SECCLASS_CAPABILITY, CAPABILITY__DAC_EXECUTE, "dac_execute") + S_(SECCLASS_CAPABILITY, CAPABILITY__DAC_WRITE, "dac_write") + S_(SECCLASS_CAPABILITY, CAPABILITY__DAC_READ_SEARCH, "dac_read_search") + S_(SECCLASS_CAPABILITY, CAPABILITY__FOWNER, "fowner") + S_(SECCLASS_CAPABILITY, CAPABILITY__FSETID, "fsetid") + S_(SECCLASS_CAPABILITY, CAPABILITY__KILL, "kill") + S_(SECCLASS_CAPABILITY, CAPABILITY__SETFCAP, "setfcap") + S_(SECCLASS_CAPABILITY, CAPABILITY__SETGID, "setgid") + S_(SECCLASS_CAPABILITY, CAPABILITY__SETUID, "setuid") + S_(SECCLASS_CAPABILITY, CAPABILITY__AUDIT_CONTROL, "audit_control") + S_(SECCLASS_CAPABILITY, CAPABILITY__AUDIT_WRITE, "audit_write") + S_(SECCLASS_CAPABILITY, CAPABILITY__LINUX_IMMUTABLE, "linux_immutable") + S_(SECCLASS_CAPABILITY, CAPABILITY__NET_BIND_SERVICE, "net_bind_service") + S_(SECCLASS_CAPABILITY, CAPABILITY__NET_BROADCAST, "net_broadcast") + S_(SECCLASS_CAPABILITY, CAPABILITY__NET_ADMIN, "net_admin") + S_(SECCLASS_CAPABILITY, CAPABILITY__NET_RAW, "net_raw") + S_(SECCLASS_CAPABILITY, CAPABILITY__IPC_LOCK, "ipc_lock") + S_(SECCLASS_CAPABILITY, CAPABILITY__IPC_OWNER, "ipc_owner") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_MODULE, "sys_module") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_RAWIO, "sys_rawio") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_CHROOT, "sys_chroot") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_PTRACE, "sys_ptrace") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_PACCT, "sys_pacct") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_ADMIN, "sys_admin") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_BOOT, "sys_boot") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_NICE, "sys_nice") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_RESOURCE, "sys_resource") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_TIME, "sys_time") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_TTY_CONFIG, "sys_tty_config") + S_(SECCLASS_CAPABILITY, CAPABILITY__MKNOD, "mknod") + S_(SECCLASS_MACH_PORT, MACH_PORT__RELABELFROM, "relabelfrom") + S_(SECCLASS_MACH_PORT, MACH_PORT__RELABELTO, "relabelto") + S_(SECCLASS_MACH_PORT, MACH_PORT__SEND, "send") + S_(SECCLASS_MACH_PORT, MACH_PORT__RECV, "recv") + S_(SECCLASS_MACH_PORT, MACH_PORT__MAKE_SEND, "make_send") + S_(SECCLASS_MACH_PORT, MACH_PORT__MAKE_SEND_ONCE, "make_send_once") + S_(SECCLASS_MACH_PORT, MACH_PORT__COPY_SEND, "copy_send") + S_(SECCLASS_MACH_PORT, MACH_PORT__MOVE_SEND, "move_send") + S_(SECCLASS_MACH_PORT, MACH_PORT__MOVE_SEND_ONCE, "move_send_once") + S_(SECCLASS_MACH_PORT, MACH_PORT__MOVE_RECV, "move_recv") + S_(SECCLASS_MACH_PORT, MACH_PORT__HOLD_SEND, "hold_send") + S_(SECCLASS_MACH_PORT, MACH_PORT__HOLD_SEND_ONCE, "hold_send_once") + S_(SECCLASS_MACH_PORT, MACH_PORT__HOLD_RECV, "hold_recv") + S_(SECCLASS_MACH_TASK, MACH_TASK__TERMINATE, "terminate") + S_(SECCLASS_MACH_TASK, MACH_TASK__SET_SPECIAL_PORT, "set_special_port") ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/av_permissions.h#9 (text+ko) ==== @@ -1,623 +1,619 @@ /* This file is automatically generated. Do not edit. */ -/* FLASK */ +#define COMMON_FILE__POLL 0x00000001UL +#define COMMON_FILE__IOCTL 0x00000002UL +#define COMMON_FILE__READ 0x00000004UL +#define COMMON_FILE__WRITE 0x00000008UL +#define COMMON_FILE__CREATE 0x00000010UL +#define COMMON_FILE__GETATTR 0x00000020UL +#define COMMON_FILE__SETATTR 0x00000040UL +#define COMMON_FILE__LOCK 0x00000080UL +#define COMMON_FILE__RELABELFROM 0x00000100UL +#define COMMON_FILE__RELABELTO 0x00000200UL +#define COMMON_FILE__TRANSITION 0x00000400UL +#define COMMON_FILE__APPEND 0x00000800UL +#define COMMON_FILE__ACCESS 0x00001000UL +#define COMMON_FILE__UNLINK 0x00002000UL +#define COMMON_FILE__LINK 0x00004000UL +#define COMMON_FILE__RENAME 0x00008000UL +#define COMMON_FILE__EXECUTE 0x00010000UL +#define COMMON_FILE__SWAPON 0x00020000UL +#define COMMON_FILE__QUOTAON 0x00040000UL +#define COMMON_FILE__MOUNTON 0x00080000UL -#define COMMON_FILE__POLL 0x0000000000000001UL -#define COMMON_FILE__IOCTL 0x0000000000000002UL -#define COMMON_FILE__READ 0x0000000000000004UL -#define COMMON_FILE__WRITE 0x0000000000000008UL -#define COMMON_FILE__CREATE 0x0000000000000010UL -#define COMMON_FILE__GETATTR 0x0000000000000020UL -#define COMMON_FILE__SETATTR 0x0000000000000040UL -#define COMMON_FILE__LOCK 0x0000000000000080UL -#define COMMON_FILE__RELABELFROM 0x0000000000000100UL -#define COMMON_FILE__RELABELTO 0x0000000000000200UL -#define COMMON_FILE__TRANSITION 0x0000000000000400UL -#define COMMON_FILE__APPEND 0x0000000000000800UL -#define COMMON_FILE__ACCESS 0x0000000000001000UL -#define COMMON_FILE__UNLINK 0x0000000000002000UL -#define COMMON_FILE__LINK 0x0000000000004000UL -#define COMMON_FILE__RENAME 0x0000000000008000UL -#define COMMON_FILE__EXECUTE 0x0000000000010000UL -#define COMMON_FILE__SWAPON 0x0000000000020000UL -#define COMMON_FILE__QUOTAON 0x0000000000040000UL -#define COMMON_FILE__MOUNTON 0x0000000000080000UL +#define COMMON_SOCKET__POLL 0x00000001UL +#define COMMON_SOCKET__IOCTL 0x00000002UL +#define COMMON_SOCKET__READ 0x00000004UL +#define COMMON_SOCKET__WRITE 0x00000008UL +#define COMMON_SOCKET__CREATE 0x00000010UL +#define COMMON_SOCKET__GETATTR 0x00000020UL +#define COMMON_SOCKET__SETATTR 0x00000040UL +#define COMMON_SOCKET__LOCK 0x00000080UL +#define COMMON_SOCKET__RELABELFROM 0x00000100UL +#define COMMON_SOCKET__RELABELTO 0x00000200UL +#define COMMON_SOCKET__TRANSITION 0x00000400UL +#define COMMON_SOCKET__APPEND 0x00000800UL +#define COMMON_SOCKET__BIND 0x00001000UL +#define COMMON_SOCKET__CONNECT 0x00002000UL +#define COMMON_SOCKET__LISTEN 0x00004000UL +#define COMMON_SOCKET__ACCEPT 0x00008000UL +#define COMMON_SOCKET__GETOPT 0x00010000UL +#define COMMON_SOCKET__SETOPT 0x00020000UL +#define COMMON_SOCKET__SHUTDOWN 0x00040000UL +#define COMMON_SOCKET__RECVFROM 0x00080000UL +#define COMMON_SOCKET__SENDTO 0x00100000UL +#define COMMON_SOCKET__RECV_MSG 0x00200000UL +#define COMMON_SOCKET__SEND_MSG 0x00400000UL +#define COMMON_SOCKET__NAME_BIND 0x00800000UL -#define COMMON_SOCKET__POLL 0x0000000000000001UL -#define COMMON_SOCKET__IOCTL 0x0000000000000002UL -#define COMMON_SOCKET__READ 0x0000000000000004UL -#define COMMON_SOCKET__WRITE 0x0000000000000008UL -#define COMMON_SOCKET__CREATE 0x0000000000000010UL -#define COMMON_SOCKET__GETATTR 0x0000000000000020UL -#define COMMON_SOCKET__SETATTR 0x0000000000000040UL -#define COMMON_SOCKET__LOCK 0x0000000000000080UL -#define COMMON_SOCKET__RELABELFROM 0x0000000000000100UL -#define COMMON_SOCKET__RELABELTO 0x0000000000000200UL -#define COMMON_SOCKET__TRANSITION 0x0000000000000400UL -#define COMMON_SOCKET__APPEND 0x0000000000000800UL -#define COMMON_SOCKET__BIND 0x0000000000001000UL -#define COMMON_SOCKET__CONNECT 0x0000000000002000UL -#define COMMON_SOCKET__LISTEN 0x0000000000004000UL -#define COMMON_SOCKET__ACCEPT 0x0000000000008000UL -#define COMMON_SOCKET__GETOPT 0x0000000000010000UL -#define COMMON_SOCKET__SETOPT 0x0000000000020000UL -#define COMMON_SOCKET__SHUTDOWN 0x0000000000040000UL -#define COMMON_SOCKET__RECVFROM 0x0000000000080000UL -#define COMMON_SOCKET__SENDTO 0x0000000000100000UL -#define COMMON_SOCKET__RECV_MSG 0x0000000000200000UL -#define COMMON_SOCKET__SEND_MSG 0x0000000000400000UL -#define COMMON_SOCKET__NAME_BIND 0x0000000000800000UL +#define COMMON_IPC__CREATE 0x00000001UL +#define COMMON_IPC__DESTROY 0x00000002UL +#define COMMON_IPC__GETATTR 0x00000004UL +#define COMMON_IPC__SETATTR 0x00000008UL +#define COMMON_IPC__READ 0x00000010UL +#define COMMON_IPC__WRITE 0x00000020UL +#define COMMON_IPC__ASSOCIATE 0x00000040UL +#define COMMON_IPC__UNIX_READ 0x00000080UL +#define COMMON_IPC__UNIX_WRITE 0x00000100UL -#define COMMON_IPC__CREATE 0x0000000000000001UL -#define COMMON_IPC__DESTROY 0x0000000000000002UL -#define COMMON_IPC__GETATTR 0x0000000000000004UL -#define COMMON_IPC__SETATTR 0x0000000000000008UL -#define COMMON_IPC__READ 0x0000000000000010UL -#define COMMON_IPC__WRITE 0x0000000000000020UL -#define COMMON_IPC__ASSOCIATE 0x0000000000000040UL -#define COMMON_IPC__UNIX_READ 0x0000000000000080UL -#define COMMON_IPC__UNIX_WRITE 0x0000000000000100UL +#define FILESYSTEM__MOUNT 0x00000001UL +#define FILESYSTEM__REMOUNT 0x00000002UL +#define FILESYSTEM__UNMOUNT 0x00000004UL +#define FILESYSTEM__GETATTR 0x00000008UL +#define FILESYSTEM__RELABELFROM 0x00000010UL +#define FILESYSTEM__RELABELTO 0x00000020UL +#define FILESYSTEM__TRANSITION 0x00000040UL +#define FILESYSTEM__ASSOCIATE 0x00000080UL +#define FILESYSTEM__QUOTAMOD 0x00000100UL +#define FILESYSTEM__QUOTAGET 0x00000200UL -#define FILESYSTEM__MOUNT 0x0000000000000001UL -#define FILESYSTEM__REMOUNT 0x0000000000000002UL -#define FILESYSTEM__UNMOUNT 0x0000000000000004UL -#define FILESYSTEM__GETATTR 0x0000000000000008UL -#define FILESYSTEM__RELABELFROM 0x0000000000000010UL -#define FILESYSTEM__RELABELTO 0x0000000000000020UL -#define FILESYSTEM__TRANSITION 0x0000000000000040UL -#define FILESYSTEM__ASSOCIATE 0x0000000000000080UL -#define FILESYSTEM__QUOTAMOD 0x0000000000000100UL -#define FILESYSTEM__QUOTAGET 0x0000000000000200UL +#define DIR__POLL 0x00000001UL +#define DIR__IOCTL 0x00000002UL +#define DIR__READ 0x00000004UL +#define DIR__WRITE 0x00000008UL +#define DIR__CREATE 0x00000010UL +#define DIR__GETATTR 0x00000020UL +#define DIR__SETATTR 0x00000040UL +#define DIR__LOCK 0x00000080UL +#define DIR__RELABELFROM 0x00000100UL +#define DIR__RELABELTO 0x00000200UL +#define DIR__TRANSITION 0x00000400UL +#define DIR__APPEND 0x00000800UL +#define DIR__ACCESS 0x00001000UL +#define DIR__UNLINK 0x00002000UL +#define DIR__LINK 0x00004000UL +#define DIR__RENAME 0x00008000UL +#define DIR__EXECUTE 0x00010000UL +#define DIR__SWAPON 0x00020000UL +#define DIR__QUOTAON 0x00040000UL +#define DIR__MOUNTON 0x00080000UL -#define DIR__WRITE 0x0000000000000008UL -#define DIR__EXECUTE 0x0000000000010000UL -#define DIR__RENAME 0x0000000000008000UL -#define DIR__READ 0x0000000000000004UL -#define DIR__CREATE 0x0000000000000010UL -#define DIR__SETATTR 0x0000000000000040UL -#define DIR__LINK 0x0000000000004000UL -#define DIR__IOCTL 0x0000000000000002UL -#define DIR__QUOTAON 0x0000000000040000UL -#define DIR__APPEND 0x0000000000000800UL -#define DIR__RELABELTO 0x0000000000000200UL -#define DIR__MOUNTON 0x0000000000080000UL -#define DIR__RELABELFROM 0x0000000000000100UL -#define DIR__TRANSITION 0x0000000000000400UL -#define DIR__GETATTR 0x0000000000000020UL -#define DIR__POLL 0x0000000000000001UL -#define DIR__SWAPON 0x0000000000020000UL -#define DIR__ACCESS 0x0000000000001000UL -#define DIR__UNLINK 0x0000000000002000UL -#define DIR__LOCK 0x0000000000000080UL +#define DIR__ADD_NAME 0x00100000UL +#define DIR__REMOVE_NAME 0x00200000UL +#define DIR__REPARENT 0x00400000UL +#define DIR__SEARCH 0x00800000UL +#define DIR__RMDIR 0x01000000UL -#define DIR__ADD_NAME 0x0000000000100000UL -#define DIR__REMOVE_NAME 0x0000000000200000UL -#define DIR__REPARENT 0x0000000000400000UL -#define DIR__SEARCH 0x0000000000800000UL -#define DIR__RMDIR 0x0000000001000000UL +#define FILE__POLL 0x00000001UL +#define FILE__IOCTL 0x00000002UL +#define FILE__READ 0x00000004UL +#define FILE__WRITE 0x00000008UL +#define FILE__CREATE 0x00000010UL +#define FILE__GETATTR 0x00000020UL +#define FILE__SETATTR 0x00000040UL +#define FILE__LOCK 0x00000080UL +#define FILE__RELABELFROM 0x00000100UL +#define FILE__RELABELTO 0x00000200UL +#define FILE__TRANSITION 0x00000400UL +#define FILE__APPEND 0x00000800UL +#define FILE__ACCESS 0x00001000UL +#define FILE__UNLINK 0x00002000UL +#define FILE__LINK 0x00004000UL +#define FILE__RENAME 0x00008000UL +#define FILE__EXECUTE 0x00010000UL +#define FILE__SWAPON 0x00020000UL +#define FILE__QUOTAON 0x00040000UL +#define FILE__MOUNTON 0x00080000UL -#define FILE__WRITE 0x0000000000000008UL -#define FILE__EXECUTE 0x0000000000010000UL -#define FILE__RENAME 0x0000000000008000UL -#define FILE__READ 0x0000000000000004UL -#define FILE__CREATE 0x0000000000000010UL -#define FILE__SETATTR 0x0000000000000040UL -#define FILE__LINK 0x0000000000004000UL -#define FILE__IOCTL 0x0000000000000002UL -#define FILE__QUOTAON 0x0000000000040000UL -#define FILE__APPEND 0x0000000000000800UL -#define FILE__RELABELTO 0x0000000000000200UL -#define FILE__MOUNTON 0x0000000000080000UL -#define FILE__RELABELFROM 0x0000000000000100UL -#define FILE__TRANSITION 0x0000000000000400UL -#define FILE__GETATTR 0x0000000000000020UL -#define FILE__POLL 0x0000000000000001UL -#define FILE__SWAPON 0x0000000000020000UL -#define FILE__ACCESS 0x0000000000001000UL -#define FILE__UNLINK 0x0000000000002000UL -#define FILE__LOCK 0x0000000000000080UL +#define FILE__EXECUTE_NO_TRANS 0x00100000UL +#define FILE__ENTRYPOINT 0x00200000UL -#define FILE__EXECUTE_NO_TRANS 0x0000000000100000UL -#define FILE__ENTRYPOINT 0x0000000000200000UL +#define LNK_FILE__POLL 0x00000001UL +#define LNK_FILE__IOCTL 0x00000002UL +#define LNK_FILE__READ 0x00000004UL +#define LNK_FILE__WRITE 0x00000008UL +#define LNK_FILE__CREATE 0x00000010UL +#define LNK_FILE__GETATTR 0x00000020UL +#define LNK_FILE__SETATTR 0x00000040UL +#define LNK_FILE__LOCK 0x00000080UL +#define LNK_FILE__RELABELFROM 0x00000100UL +#define LNK_FILE__RELABELTO 0x00000200UL +#define LNK_FILE__TRANSITION 0x00000400UL +#define LNK_FILE__APPEND 0x00000800UL +#define LNK_FILE__ACCESS 0x00001000UL +#define LNK_FILE__UNLINK 0x00002000UL +#define LNK_FILE__LINK 0x00004000UL +#define LNK_FILE__RENAME 0x00008000UL +#define LNK_FILE__EXECUTE 0x00010000UL +#define LNK_FILE__SWAPON 0x00020000UL +#define LNK_FILE__QUOTAON 0x00040000UL +#define LNK_FILE__MOUNTON 0x00080000UL -#define LNK_FILE__WRITE 0x0000000000000008UL -#define LNK_FILE__EXECUTE 0x0000000000010000UL -#define LNK_FILE__RENAME 0x0000000000008000UL -#define LNK_FILE__READ 0x0000000000000004UL -#define LNK_FILE__CREATE 0x0000000000000010UL -#define LNK_FILE__SETATTR 0x0000000000000040UL -#define LNK_FILE__LINK 0x0000000000004000UL -#define LNK_FILE__IOCTL 0x0000000000000002UL -#define LNK_FILE__QUOTAON 0x0000000000040000UL -#define LNK_FILE__APPEND 0x0000000000000800UL -#define LNK_FILE__RELABELTO 0x0000000000000200UL -#define LNK_FILE__MOUNTON 0x0000000000080000UL -#define LNK_FILE__RELABELFROM 0x0000000000000100UL -#define LNK_FILE__TRANSITION 0x0000000000000400UL -#define LNK_FILE__GETATTR 0x0000000000000020UL -#define LNK_FILE__POLL 0x0000000000000001UL -#define LNK_FILE__SWAPON 0x0000000000020000UL -#define LNK_FILE__ACCESS 0x0000000000001000UL -#define LNK_FILE__UNLINK 0x0000000000002000UL -#define LNK_FILE__LOCK 0x0000000000000080UL +#define CHR_FILE__POLL 0x00000001UL +#define CHR_FILE__IOCTL 0x00000002UL +#define CHR_FILE__READ 0x00000004UL +#define CHR_FILE__WRITE 0x00000008UL +#define CHR_FILE__CREATE 0x00000010UL +#define CHR_FILE__GETATTR 0x00000020UL +#define CHR_FILE__SETATTR 0x00000040UL +#define CHR_FILE__LOCK 0x00000080UL +#define CHR_FILE__RELABELFROM 0x00000100UL +#define CHR_FILE__RELABELTO 0x00000200UL +#define CHR_FILE__TRANSITION 0x00000400UL +#define CHR_FILE__APPEND 0x00000800UL +#define CHR_FILE__ACCESS 0x00001000UL +#define CHR_FILE__UNLINK 0x00002000UL +#define CHR_FILE__LINK 0x00004000UL +#define CHR_FILE__RENAME 0x00008000UL +#define CHR_FILE__EXECUTE 0x00010000UL +#define CHR_FILE__SWAPON 0x00020000UL +#define CHR_FILE__QUOTAON 0x00040000UL +#define CHR_FILE__MOUNTON 0x00080000UL -#define CHR_FILE__WRITE 0x0000000000000008UL -#define CHR_FILE__EXECUTE 0x0000000000010000UL -#define CHR_FILE__RENAME 0x0000000000008000UL -#define CHR_FILE__READ 0x0000000000000004UL -#define CHR_FILE__CREATE 0x0000000000000010UL -#define CHR_FILE__SETATTR 0x0000000000000040UL -#define CHR_FILE__LINK 0x0000000000004000UL -#define CHR_FILE__IOCTL 0x0000000000000002UL -#define CHR_FILE__QUOTAON 0x0000000000040000UL -#define CHR_FILE__APPEND 0x0000000000000800UL -#define CHR_FILE__RELABELTO 0x0000000000000200UL -#define CHR_FILE__MOUNTON 0x0000000000080000UL -#define CHR_FILE__RELABELFROM 0x0000000000000100UL -#define CHR_FILE__TRANSITION 0x0000000000000400UL -#define CHR_FILE__GETATTR 0x0000000000000020UL -#define CHR_FILE__POLL 0x0000000000000001UL -#define CHR_FILE__SWAPON 0x0000000000020000UL -#define CHR_FILE__ACCESS 0x0000000000001000UL -#define CHR_FILE__UNLINK 0x0000000000002000UL -#define CHR_FILE__LOCK 0x0000000000000080UL +#define BLK_FILE__POLL 0x00000001UL +#define BLK_FILE__IOCTL 0x00000002UL +#define BLK_FILE__READ 0x00000004UL +#define BLK_FILE__WRITE 0x00000008UL +#define BLK_FILE__CREATE 0x00000010UL +#define BLK_FILE__GETATTR 0x00000020UL +#define BLK_FILE__SETATTR 0x00000040UL +#define BLK_FILE__LOCK 0x00000080UL +#define BLK_FILE__RELABELFROM 0x00000100UL +#define BLK_FILE__RELABELTO 0x00000200UL +#define BLK_FILE__TRANSITION 0x00000400UL +#define BLK_FILE__APPEND 0x00000800UL +#define BLK_FILE__ACCESS 0x00001000UL +#define BLK_FILE__UNLINK 0x00002000UL +#define BLK_FILE__LINK 0x00004000UL +#define BLK_FILE__RENAME 0x00008000UL +#define BLK_FILE__EXECUTE 0x00010000UL +#define BLK_FILE__SWAPON 0x00020000UL +#define BLK_FILE__QUOTAON 0x00040000UL +#define BLK_FILE__MOUNTON 0x00080000UL -#define BLK_FILE__WRITE 0x0000000000000008UL -#define BLK_FILE__EXECUTE 0x0000000000010000UL -#define BLK_FILE__RENAME 0x0000000000008000UL -#define BLK_FILE__READ 0x0000000000000004UL -#define BLK_FILE__CREATE 0x0000000000000010UL -#define BLK_FILE__SETATTR 0x0000000000000040UL -#define BLK_FILE__LINK 0x0000000000004000UL -#define BLK_FILE__IOCTL 0x0000000000000002UL -#define BLK_FILE__QUOTAON 0x0000000000040000UL -#define BLK_FILE__APPEND 0x0000000000000800UL -#define BLK_FILE__RELABELTO 0x0000000000000200UL -#define BLK_FILE__MOUNTON 0x0000000000080000UL -#define BLK_FILE__RELABELFROM 0x0000000000000100UL -#define BLK_FILE__TRANSITION 0x0000000000000400UL -#define BLK_FILE__GETATTR 0x0000000000000020UL -#define BLK_FILE__POLL 0x0000000000000001UL -#define BLK_FILE__SWAPON 0x0000000000020000UL -#define BLK_FILE__ACCESS 0x0000000000001000UL -#define BLK_FILE__UNLINK 0x0000000000002000UL -#define BLK_FILE__LOCK 0x0000000000000080UL +#define SOCK_FILE__POLL 0x00000001UL +#define SOCK_FILE__IOCTL 0x00000002UL +#define SOCK_FILE__READ 0x00000004UL +#define SOCK_FILE__WRITE 0x00000008UL +#define SOCK_FILE__CREATE 0x00000010UL +#define SOCK_FILE__GETATTR 0x00000020UL +#define SOCK_FILE__SETATTR 0x00000040UL +#define SOCK_FILE__LOCK 0x00000080UL +#define SOCK_FILE__RELABELFROM 0x00000100UL +#define SOCK_FILE__RELABELTO 0x00000200UL +#define SOCK_FILE__TRANSITION 0x00000400UL +#define SOCK_FILE__APPEND 0x00000800UL +#define SOCK_FILE__ACCESS 0x00001000UL +#define SOCK_FILE__UNLINK 0x00002000UL +#define SOCK_FILE__LINK 0x00004000UL +#define SOCK_FILE__RENAME 0x00008000UL +#define SOCK_FILE__EXECUTE 0x00010000UL +#define SOCK_FILE__SWAPON 0x00020000UL +#define SOCK_FILE__QUOTAON 0x00040000UL +#define SOCK_FILE__MOUNTON 0x00080000UL -#define SOCK_FILE__WRITE 0x0000000000000008UL -#define SOCK_FILE__EXECUTE 0x0000000000010000UL -#define SOCK_FILE__RENAME 0x0000000000008000UL -#define SOCK_FILE__READ 0x0000000000000004UL -#define SOCK_FILE__CREATE 0x0000000000000010UL -#define SOCK_FILE__SETATTR 0x0000000000000040UL -#define SOCK_FILE__LINK 0x0000000000004000UL -#define SOCK_FILE__IOCTL 0x0000000000000002UL -#define SOCK_FILE__QUOTAON 0x0000000000040000UL -#define SOCK_FILE__APPEND 0x0000000000000800UL -#define SOCK_FILE__RELABELTO 0x0000000000000200UL -#define SOCK_FILE__MOUNTON 0x0000000000080000UL -#define SOCK_FILE__RELABELFROM 0x0000000000000100UL -#define SOCK_FILE__TRANSITION 0x0000000000000400UL -#define SOCK_FILE__GETATTR 0x0000000000000020UL -#define SOCK_FILE__POLL 0x0000000000000001UL -#define SOCK_FILE__SWAPON 0x0000000000020000UL -#define SOCK_FILE__ACCESS 0x0000000000001000UL -#define SOCK_FILE__UNLINK 0x0000000000002000UL -#define SOCK_FILE__LOCK 0x0000000000000080UL +#define FIFO_FILE__POLL 0x00000001UL +#define FIFO_FILE__IOCTL 0x00000002UL +#define FIFO_FILE__READ 0x00000004UL +#define FIFO_FILE__WRITE 0x00000008UL +#define FIFO_FILE__CREATE 0x00000010UL +#define FIFO_FILE__GETATTR 0x00000020UL +#define FIFO_FILE__SETATTR 0x00000040UL +#define FIFO_FILE__LOCK 0x00000080UL +#define FIFO_FILE__RELABELFROM 0x00000100UL +#define FIFO_FILE__RELABELTO 0x00000200UL +#define FIFO_FILE__TRANSITION 0x00000400UL +#define FIFO_FILE__APPEND 0x00000800UL +#define FIFO_FILE__ACCESS 0x00001000UL +#define FIFO_FILE__UNLINK 0x00002000UL +#define FIFO_FILE__LINK 0x00004000UL +#define FIFO_FILE__RENAME 0x00008000UL +#define FIFO_FILE__EXECUTE 0x00010000UL +#define FIFO_FILE__SWAPON 0x00020000UL +#define FIFO_FILE__QUOTAON 0x00040000UL +#define FIFO_FILE__MOUNTON 0x00080000UL -#define FIFO_FILE__WRITE 0x0000000000000008UL -#define FIFO_FILE__EXECUTE 0x0000000000010000UL -#define FIFO_FILE__RENAME 0x0000000000008000UL -#define FIFO_FILE__READ 0x0000000000000004UL -#define FIFO_FILE__CREATE 0x0000000000000010UL -#define FIFO_FILE__SETATTR 0x0000000000000040UL -#define FIFO_FILE__LINK 0x0000000000004000UL -#define FIFO_FILE__IOCTL 0x0000000000000002UL -#define FIFO_FILE__QUOTAON 0x0000000000040000UL -#define FIFO_FILE__APPEND 0x0000000000000800UL -#define FIFO_FILE__RELABELTO 0x0000000000000200UL -#define FIFO_FILE__MOUNTON 0x0000000000080000UL -#define FIFO_FILE__RELABELFROM 0x0000000000000100UL -#define FIFO_FILE__TRANSITION 0x0000000000000400UL -#define FIFO_FILE__GETATTR 0x0000000000000020UL -#define FIFO_FILE__POLL 0x0000000000000001UL -#define FIFO_FILE__SWAPON 0x0000000000020000UL -#define FIFO_FILE__ACCESS 0x0000000000001000UL -#define FIFO_FILE__UNLINK 0x0000000000002000UL -#define FIFO_FILE__LOCK 0x0000000000000080UL +#define FD__CREATE 0x00000001UL +#define FD__USE 0x00000002UL -#define FD__CREATE 0x0000000000000001UL -#define FD__USE 0x0000000000000002UL +#define SOCKET__POLL 0x00000001UL +#define SOCKET__IOCTL 0x00000002UL +#define SOCKET__READ 0x00000004UL +#define SOCKET__WRITE 0x00000008UL +#define SOCKET__CREATE 0x00000010UL +#define SOCKET__GETATTR 0x00000020UL +#define SOCKET__SETATTR 0x00000040UL +#define SOCKET__LOCK 0x00000080UL +#define SOCKET__RELABELFROM 0x00000100UL +#define SOCKET__RELABELTO 0x00000200UL +#define SOCKET__TRANSITION 0x00000400UL +#define SOCKET__APPEND 0x00000800UL +#define SOCKET__BIND 0x00001000UL +#define SOCKET__CONNECT 0x00002000UL +#define SOCKET__LISTEN 0x00004000UL +#define SOCKET__ACCEPT 0x00008000UL +#define SOCKET__GETOPT 0x00010000UL +#define SOCKET__SETOPT 0x00020000UL +#define SOCKET__SHUTDOWN 0x00040000UL +#define SOCKET__RECVFROM 0x00080000UL +#define SOCKET__SENDTO 0x00100000UL +#define SOCKET__RECV_MSG 0x00200000UL +#define SOCKET__SEND_MSG 0x00400000UL +#define SOCKET__NAME_BIND 0x00800000UL -#define SOCKET__TRANSITION 0x0000000000000400UL -#define SOCKET__SHUTDOWN 0x0000000000040000UL -#define SOCKET__POLL 0x0000000000000001UL -#define SOCKET__SEND_MSG 0x0000000000400000UL -#define SOCKET__LOCK 0x0000000000000080UL -#define SOCKET__RECVFROM 0x0000000000080000UL -#define SOCKET__BIND 0x0000000000001000UL -#define SOCKET__ACCEPT 0x0000000000008000UL -#define SOCKET__RELABELFROM 0x0000000000000100UL -#define SOCKET__GETOPT 0x0000000000010000UL -#define SOCKET__WRITE 0x0000000000000008UL -#define SOCKET__SETATTR 0x0000000000000040UL -#define SOCKET__READ 0x0000000000000004UL -#define SOCKET__NAME_BIND 0x0000000000800000UL -#define SOCKET__LISTEN 0x0000000000004000UL -#define SOCKET__CREATE 0x0000000000000010UL -#define SOCKET__SETOPT 0x0000000000020000UL -#define SOCKET__RECV_MSG 0x0000000000200000UL -#define SOCKET__SENDTO 0x0000000000100000UL -#define SOCKET__GETATTR 0x0000000000000020UL -#define SOCKET__CONNECT 0x0000000000002000UL -#define SOCKET__APPEND 0x0000000000000800UL -#define SOCKET__IOCTL 0x0000000000000002UL -#define SOCKET__RELABELTO 0x0000000000000200UL +#define TCP_SOCKET__POLL 0x00000001UL +#define TCP_SOCKET__IOCTL 0x00000002UL +#define TCP_SOCKET__READ 0x00000004UL +#define TCP_SOCKET__WRITE 0x00000008UL +#define TCP_SOCKET__CREATE 0x00000010UL +#define TCP_SOCKET__GETATTR 0x00000020UL +#define TCP_SOCKET__SETATTR 0x00000040UL +#define TCP_SOCKET__LOCK 0x00000080UL +#define TCP_SOCKET__RELABELFROM 0x00000100UL +#define TCP_SOCKET__RELABELTO 0x00000200UL +#define TCP_SOCKET__TRANSITION 0x00000400UL +#define TCP_SOCKET__APPEND 0x00000800UL +#define TCP_SOCKET__BIND 0x00001000UL +#define TCP_SOCKET__CONNECT 0x00002000UL +#define TCP_SOCKET__LISTEN 0x00004000UL +#define TCP_SOCKET__ACCEPT 0x00008000UL +#define TCP_SOCKET__GETOPT 0x00010000UL +#define TCP_SOCKET__SETOPT 0x00020000UL +#define TCP_SOCKET__SHUTDOWN 0x00040000UL +#define TCP_SOCKET__RECVFROM 0x00080000UL +#define TCP_SOCKET__SENDTO 0x00100000UL +#define TCP_SOCKET__RECV_MSG 0x00200000UL +#define TCP_SOCKET__SEND_MSG 0x00400000UL +#define TCP_SOCKET__NAME_BIND 0x00800000UL -#define TCP_SOCKET__TRANSITION 0x0000000000000400UL -#define TCP_SOCKET__SHUTDOWN 0x0000000000040000UL -#define TCP_SOCKET__POLL 0x0000000000000001UL -#define TCP_SOCKET__SEND_MSG 0x0000000000400000UL -#define TCP_SOCKET__LOCK 0x0000000000000080UL -#define TCP_SOCKET__RECVFROM 0x0000000000080000UL -#define TCP_SOCKET__BIND 0x0000000000001000UL -#define TCP_SOCKET__ACCEPT 0x0000000000008000UL -#define TCP_SOCKET__RELABELFROM 0x0000000000000100UL -#define TCP_SOCKET__GETOPT 0x0000000000010000UL -#define TCP_SOCKET__WRITE 0x0000000000000008UL -#define TCP_SOCKET__SETATTR 0x0000000000000040UL -#define TCP_SOCKET__READ 0x0000000000000004UL -#define TCP_SOCKET__NAME_BIND 0x0000000000800000UL -#define TCP_SOCKET__LISTEN 0x0000000000004000UL -#define TCP_SOCKET__CREATE 0x0000000000000010UL -#define TCP_SOCKET__SETOPT 0x0000000000020000UL -#define TCP_SOCKET__RECV_MSG 0x0000000000200000UL -#define TCP_SOCKET__SENDTO 0x0000000000100000UL -#define TCP_SOCKET__GETATTR 0x0000000000000020UL -#define TCP_SOCKET__CONNECT 0x0000000000002000UL -#define TCP_SOCKET__APPEND 0x0000000000000800UL -#define TCP_SOCKET__IOCTL 0x0000000000000002UL -#define TCP_SOCKET__RELABELTO 0x0000000000000200UL +#define TCP_SOCKET__CONNECTTO 0x01000000UL +#define TCP_SOCKET__NEWCONN 0x02000000UL +#define TCP_SOCKET__ACCEPTFROM 0x04000000UL +#define TCP_SOCKET__NODE_BIND 0x08000000UL -#define TCP_SOCKET__CONNECTTO 0x0000000001000000UL -#define TCP_SOCKET__NEWCONN 0x0000000002000000UL -#define TCP_SOCKET__ACCEPTFROM 0x0000000004000000UL -#define TCP_SOCKET__NODE_BIND 0x0000000008000000UL +#define UDP_SOCKET__POLL 0x00000001UL +#define UDP_SOCKET__IOCTL 0x00000002UL +#define UDP_SOCKET__READ 0x00000004UL +#define UDP_SOCKET__WRITE 0x00000008UL +#define UDP_SOCKET__CREATE 0x00000010UL +#define UDP_SOCKET__GETATTR 0x00000020UL +#define UDP_SOCKET__SETATTR 0x00000040UL +#define UDP_SOCKET__LOCK 0x00000080UL +#define UDP_SOCKET__RELABELFROM 0x00000100UL +#define UDP_SOCKET__RELABELTO 0x00000200UL +#define UDP_SOCKET__TRANSITION 0x00000400UL +#define UDP_SOCKET__APPEND 0x00000800UL +#define UDP_SOCKET__BIND 0x00001000UL +#define UDP_SOCKET__CONNECT 0x00002000UL +#define UDP_SOCKET__LISTEN 0x00004000UL +#define UDP_SOCKET__ACCEPT 0x00008000UL +#define UDP_SOCKET__GETOPT 0x00010000UL +#define UDP_SOCKET__SETOPT 0x00020000UL +#define UDP_SOCKET__SHUTDOWN 0x00040000UL +#define UDP_SOCKET__RECVFROM 0x00080000UL +#define UDP_SOCKET__SENDTO 0x00100000UL +#define UDP_SOCKET__RECV_MSG 0x00200000UL +#define UDP_SOCKET__SEND_MSG 0x00400000UL +#define UDP_SOCKET__NAME_BIND 0x00800000UL -#define UDP_SOCKET__TRANSITION 0x0000000000000400UL -#define UDP_SOCKET__SHUTDOWN 0x0000000000040000UL -#define UDP_SOCKET__POLL 0x0000000000000001UL -#define UDP_SOCKET__SEND_MSG 0x0000000000400000UL -#define UDP_SOCKET__LOCK 0x0000000000000080UL -#define UDP_SOCKET__RECVFROM 0x0000000000080000UL -#define UDP_SOCKET__BIND 0x0000000000001000UL -#define UDP_SOCKET__ACCEPT 0x0000000000008000UL -#define UDP_SOCKET__RELABELFROM 0x0000000000000100UL -#define UDP_SOCKET__GETOPT 0x0000000000010000UL -#define UDP_SOCKET__WRITE 0x0000000000000008UL -#define UDP_SOCKET__SETATTR 0x0000000000000040UL -#define UDP_SOCKET__READ 0x0000000000000004UL -#define UDP_SOCKET__NAME_BIND 0x0000000000800000UL -#define UDP_SOCKET__LISTEN 0x0000000000004000UL -#define UDP_SOCKET__CREATE 0x0000000000000010UL -#define UDP_SOCKET__SETOPT 0x0000000000020000UL -#define UDP_SOCKET__RECV_MSG 0x0000000000200000UL -#define UDP_SOCKET__SENDTO 0x0000000000100000UL -#define UDP_SOCKET__GETATTR 0x0000000000000020UL -#define UDP_SOCKET__CONNECT 0x0000000000002000UL -#define UDP_SOCKET__APPEND 0x0000000000000800UL -#define UDP_SOCKET__IOCTL 0x0000000000000002UL -#define UDP_SOCKET__RELABELTO 0x0000000000000200UL +#define UDP_SOCKET__NODE_BIND 0x01000000UL -#define UDP_SOCKET__NODE_BIND 0x0000000001000000UL +#define RAWIP_SOCKET__POLL 0x00000001UL +#define RAWIP_SOCKET__IOCTL 0x00000002UL +#define RAWIP_SOCKET__READ 0x00000004UL +#define RAWIP_SOCKET__WRITE 0x00000008UL +#define RAWIP_SOCKET__CREATE 0x00000010UL +#define RAWIP_SOCKET__GETATTR 0x00000020UL +#define RAWIP_SOCKET__SETATTR 0x00000040UL +#define RAWIP_SOCKET__LOCK 0x00000080UL +#define RAWIP_SOCKET__RELABELFROM 0x00000100UL +#define RAWIP_SOCKET__RELABELTO 0x00000200UL +#define RAWIP_SOCKET__TRANSITION 0x00000400UL +#define RAWIP_SOCKET__APPEND 0x00000800UL +#define RAWIP_SOCKET__BIND 0x00001000UL +#define RAWIP_SOCKET__CONNECT 0x00002000UL +#define RAWIP_SOCKET__LISTEN 0x00004000UL +#define RAWIP_SOCKET__ACCEPT 0x00008000UL +#define RAWIP_SOCKET__GETOPT 0x00010000UL >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Apr 20 15:39:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D508816A436; Thu, 20 Apr 2006 15:38:59 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8205416A433 for ; Thu, 20 Apr 2006 15:38:59 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01A2A43D55 for ; Thu, 20 Apr 2006 15:38:50 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KFco47093093 for ; Thu, 20 Apr 2006 15:38:50 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KFcoC1093087 for perforce@freebsd.org; Thu, 20 Apr 2006 15:38:50 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 15:38:50 GMT Message-Id: <200604201538.k3KFcoC1093087@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95685 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 15:39:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=95685 Change 95685 by millert@millert_g5tower on 2006/04/20 15:38:13 Remove files that are no longer used. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/fileutils.c#4 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/fileutils.h#4 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 15:42:02 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C6DC16A437; Thu, 20 Apr 2006 15:42:02 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06D0C16A432 for ; Thu, 20 Apr 2006 15:42:02 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5437143D69 for ; Thu, 20 Apr 2006 15:41:55 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KFftBB095361 for ; Thu, 20 Apr 2006 15:41:55 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KFftq3095348 for perforce@freebsd.org; Thu, 20 Apr 2006 15:41:55 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 15:41:55 GMT Message-Id: <200604201541.k3KFftq3095348@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95687 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 15:42:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=95687 Change 95687 by millert@millert_g5tower on 2006/04/20 15:41:36 Use OSSwapInt* functions for byte swapping. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/Makeconfig.in#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#16 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/Makeconfig.in#4 (text+ko) ==== @@ -33,7 +33,7 @@ MANGRP= $(EXPORT_OWNER) BINDIR= /usr/bin -DARWIN_HDRS = -I$(EXPORT_HDRS)/bsd -I$(EXPORT_HDRS)/osfmk -I$(EXPORT_HDRS) +DARWIN_HDRS = -I$(EXPORT_HDRS)/bsd -I$(EXPORT_HDRS)/osfmk -I$(EXPORT_HDRS)/libkern -I$(EXPORT_HDRS) LIBMAC = -L$(DARWIN_ROOT)/libmac -lmac LIBEXTATTR = -L$(DARWIN_ROOT)/libextattr -lextattr LIBBSM = -L$(DARWIN_ROOT)/bsm/bsm/lib -lbsm ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#16 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Thu Apr 20 15:42:57 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5805916A40B; Thu, 20 Apr 2006 15:42:57 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 341D416A402 for ; Thu, 20 Apr 2006 15:42:57 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F24B043D6D for ; Thu, 20 Apr 2006 15:42:56 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KFguWU096308 for ; Thu, 20 Apr 2006 15:42:56 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KFgull096302 for perforce@freebsd.org; Thu, 20 Apr 2006 15:42:56 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 15:42:56 GMT Message-Id: <200604201542.k3KFgull096302@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95688 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 15:42:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=95688 Change 95688 by millert@millert_g5tower on 2006/04/20 15:42:20 Style fix Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#11 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/ss/services.c#11 (text+ko) ==== @@ -1679,12 +1679,13 @@ u32 **sids, int *numsids) { - struct context *scontext = sidtab_search(&sidtab, user); + struct getfilesids p; + struct context *scontext; + scontext = sidtab_search(&sidtab, user); if (scontext == NULL) goto out_err; - struct getfilesids p; p.scon = scontext; p.sclass = sclass; if (!sclass || sclass > policydb.p_classes.nprim) From owner-p4-projects@FreeBSD.ORG Thu Apr 20 15:47:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7031E16A409; Thu, 20 Apr 2006 15:47:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2939416A406 for ; Thu, 20 Apr 2006 15:47:07 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2FD043D66 for ; Thu, 20 Apr 2006 15:47:02 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KFl2ZS096676 for ; Thu, 20 Apr 2006 15:47:02 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KFl2vx096673 for perforce@freebsd.org; Thu, 20 Apr 2006 15:47:02 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 15:47:02 GMT Message-Id: <200604201547.k3KFl2vx096673@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95689 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 15:47:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=95689 Change 95689 by millert@millert_g5tower on 2006/04/20 15:46:01 Convert SEBSDCALL_GETUSERSIDS, SEBSDCALL_GETFILESIDS and SEBSDCALL_CHANGE_SID to sysctls. Move struct lp_args definition to sebsd_syscalls.h Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#14 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscalls.h#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_sysctl.c#9 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscall.c#14 (text+ko) ==== @@ -51,11 +51,6 @@ #define MAX_UC 510 -struct lp_args { - void *data; - size_t len; -}; - static int sys_load_policy(struct proc *td, void *data, size_t len) { @@ -98,137 +93,7 @@ return (rc); } -/* - * Lists the SIDs currently available for transition to by a given - * "context\0username\0" - * - * or, lists the SIDs that a given context can relabel files to. (username is ignored) - */ -static int -sys_get_sids(int function, char *context, char *username, char *out, int *outlen) -{ - u_int32_t n, nsids, scontext_len; - u_int32_t *sids, sid; - char * scontext; - int error; - int olen = 1; - int ubufsz; - - if (copyin(outlen, &ubufsz, sizeof(int))) { - error = EFAULT; - goto out; - } - - /* - * XXX We need POLICY_RDLOCK here, but it's not exported! - */ - error = security_context_to_sid(context, strlen (context), &sid); - if (error) - goto out; - switch (function) { - case SEBSDCALL_GETUSERSIDS: - error = security_get_user_sids(sid, username, &sids, &nsids); - break; - - case SEBSDCALL_GETFILESIDS: - error = security_get_file_sids(sid, SECCLASS_FILE, &sids, - &nsids); - break; - - default: - error = ENOSYS; - break; - } - if (error) - goto out; - for (n = 0; n < nsids; n++) { - error = security_sid_to_context(sids[n], &scontext, - &scontext_len); - if (error) - goto out2; - if (out && olen + scontext_len <= ubufsz) { - error = copyout(scontext, out, scontext_len); - out += scontext_len; - } else if (out) - error = ENOMEM; - olen += scontext_len; - security_free_context(scontext); - if (error) - goto out2; - } - error = copyout(&olen, outlen, sizeof(int)); -out2: - sebsd_free(sids, M_SEBSD); -out: - return (error); -} - static int -sys_change_sid(char *domains, char *sources, char *sclasss, char *out, - int *outlen) -{ - u_int32_t domain, source; - struct class_datum *cld; - char *outc; - int error; - int ubufsz, outclen; - - if (copyin(outlen, &ubufsz, sizeof(int))) - return (EFAULT); - - /* - * XXX We need POLICY_RDLOCK here, but it's not exported! - */ - error = security_context_to_sid(sources, strlen (sources), &source); - if (error) - return (error); - - error = security_context_to_sid(domains, strlen (domains), &domain); - if (error) - return (error); - - cld = hashtab_search(policydb.p_classes.table, sclasss); - if (cld == NULL) - return (EINVAL); - - error = security_change_sid(domain, source, cld->value, &source); - if (error) - return (error); - error = security_sid_to_context(source, &outc, &outclen); - if (error) - return (error); - if (out) { - if (outclen > ubufsz) { - error = ENOMEM; - goto out; - } - error = copyout(outc, out, outclen); - if (error) - goto out; - } - error = copyout(&outclen, outlen, sizeof(int)); - -out: - security_free_context (outc); - return (error); -} - -struct getsid_args { - char *ctx; - char *usr; - char *out; - int *outlen; -}; - -struct changesid_args { - char *domain; - char *source; - char *sclass; - char *out; - int *outlen; -}; - -static int sebsd_get_bools(struct proc *td, struct sebsd_get_bools *gb) { char *out = NULL; @@ -263,74 +128,6 @@ error = sys_load_migscs(td, p.data, p.len); break; - case SEBSDCALL_GETUSERSIDS: - case SEBSDCALL_GETFILESIDS: - { - struct getsid_args uap; - size_t dummy; - char *ctx, *usr; - - error = copyin(args, &uap, sizeof(struct getsid_args)); - if (error) - return (error); - ctx = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); - error = copyinstr(uap.ctx, ctx, MAX_UC, &dummy); - if (error) { - sebsd_free(ctx, M_SEBSD); - return (error); - } - usr = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); - error = copyinstr(uap.usr, usr, MAX_UC, &dummy); - if (error) { - sebsd_free(ctx, M_SEBSD); - sebsd_free(usr, M_SEBSD); - return (error); - } - ctx[MAX_UC-1] = 0; - usr[MAX_UC-1] = 0; - error = sys_get_sids(call, ctx, usr, uap.out, uap.outlen); - sebsd_free(ctx, M_SEBSD); - sebsd_free(usr, M_SEBSD); - break; - } - - case SEBSDCALL_CHANGE_SID: - { - struct changesid_args uap; - size_t dummy; - char *doms, *srcs, *scs; - - error = copyin(args, &uap, sizeof(struct changesid_args)); - if (error) - return (error); - doms = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); - error = copyinstr(uap.domain, doms, MAX_UC, &dummy); - if (error) { - sebsd_free(doms, M_SEBSD); - return (error); - } - srcs = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); - error = copyinstr(uap.source, srcs, MAX_UC, &dummy); - if (error) { - sebsd_free(doms, M_SEBSD); - sebsd_free(srcs, M_SEBSD); - return (error); - } - scs = sebsd_malloc(MAX_UC, M_SEBSD, M_WAITOK); - error = copyinstr(uap.sclass, scs, MAX_UC, &dummy); - if (error) { - sebsd_free(doms, M_SEBSD); - sebsd_free(srcs, M_SEBSD); - sebsd_free(scs, M_SEBSD); - return (error); - } - error = sys_change_sid(doms, srcs, scs, uap.out, uap.outlen); - sebsd_free(doms, M_SEBSD); - sebsd_free(srcs, M_SEBSD); - sebsd_free(scs, M_SEBSD); - return (error); - } - case SEBSDCALL_GET_BOOLS: { struct sebsd_get_bools gb; ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_syscalls.h#9 (text+ko) ==== @@ -12,9 +12,6 @@ #define SEBSDCALL_GET_BOOL 9 #define SEBSDCALL_SET_BOOL 10 #define SEBSDCALL_COMMIT_BOOLS 11 -#define SEBSDCALL_GETUSERSIDS 6 -#define SEBSDCALL_GETFILESIDS 5 -#define SEBSDCALL_CHANGE_SID 4 #define SEBSDCALL_NUM 7 @@ -40,4 +37,9 @@ char *out; }; +struct lp_args { + void *data; + size_t len; +}; + #endif /* _SEBSD_SYSCALLS_H_ */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/sebsd_sysctl.c#9 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2002 Networks Associates Technology, Inc. - * Copyright (c) 2005, 2006 SPARTA, Inc. + * Copyright (c) 2005-2006 SPARTA, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by NAI Labs, the @@ -55,13 +55,12 @@ extern unsigned int policydb_loaded_version; -#if 0 /* * Sysctl handler for security.mac.sebsd.sids * Lists the SIDs currently active in the security server */ static int -sysctl_list_sids(SYSCTL_HANDLER_ARGS) +sysctl_list_sids SYSCTL_HANDLER_ARGS { const int linesize = 128; /* conservative */ int i, count, error, len; @@ -71,7 +70,7 @@ char *scontext; count = sidtab.nel; - MALLOC(buffer, char *, linesize, M_TEMP, M_WAITOK); + buffer = sebsd_malloc(linesize, M_TEMP, M_WAITOK); len = snprintf(buffer, linesize, "\n SID Context\n"); error = SYSCTL_OUT(req, buffer, len); if (error) @@ -98,10 +97,9 @@ } error = SYSCTL_OUT(req, "", 1); out: - FREE(buffer, M_TEMP); + sebsd_free(buffer, M_TEMP); return (error); } -#endif /* * Sysctl handler for security.mac.sebsd.auditing. Get or set whether the @@ -167,13 +165,11 @@ return (0); } -#if 0 -/* - * Sysctl handler for security.mac.sebsd.user_sids. Lists the SIDs currently - * available for transition to by a given "context\0username\0". - */ +#define SEBSD_GETUSERSIDS 1 +#define SEBSD_GETFILESIDS 2 + static int -sysctl_user_sids(SYSCTL_HANDLER_ARGS) +sebsd_get_sids(int function, struct sysctl_req *req) { u_int32_t n, nsids, scontext_len; u_int32_t *sids, sid; @@ -193,19 +189,29 @@ error = EINVAL; goto out; } - len = strlen(context); - if (len + 1 >= req->newlen) { - error = EINVAL; - goto out; - } - username = context + len + 1; /* * XXX We need POLICY_RDLOCK here, but it's not exported! */ + len = strlen(context); error = security_context_to_sid(context, len + 1, &sid); if (error) goto out; - error = security_get_user_sids(sid, username, &sids, &nsids); + switch (function) { + case SEBSD_GETUSERSIDS: + if (len + 1 >= req->newlen) { + error = EINVAL; + goto out2; + } + username = context + len + 1; + error = security_get_user_sids(sid, username, &sids, &nsids); + break; + case SEBSD_GETFILESIDS: + error = security_get_file_sids(sid, SECCLASS_FILE, &sids, + &nsids); + break; + default: + error = EINVAL; + } if (error) goto out; for (n = 0; n < nsids; n++) { @@ -227,11 +233,33 @@ } /* + * Sysctl handler for security.mac.sebsd.user_sids. Lists the SIDs currently + * available for transition to by a given "context\0username\0". + */ +static int +sysctl_user_sids SYSCTL_HANDLER_ARGS +{ + + return (sebsd_get_sids(SEBSD_GETUSERSIDS, req)); +} + +/* + * Sysctl handler for security.mac.sebsd.file_sids. Lists the file + * SIDs available for a given "context\0". + */ +static int +sysctl_file_sids SYSCTL_HANDLER_ARGS +{ + + return (sebsd_get_sids(SEBSD_GETFILESIDS, req)); +} + +/* * Sysctl handler for security.mac.sebsd.change_sid * Report the SID to relabel to given input "scontext\0tcontext\0",tclass */ static int -sysctl_change_sid(SYSCTL_HANDLER_ARGS) +sysctl_change_sid SYSCTL_HANDLER_ARGS { u_int32_t newcontext_len; u_int32_t sid, tsid, newsid; @@ -284,7 +312,7 @@ * given input "scontext\0tcontext\0", tclass, av. */ static int -sysctl_compute_av(SYSCTL_HANDLER_ARGS) +sysctl_compute_av SYSCTL_HANDLER_ARGS { u_int32_t sid, tsid; u_int16_t tclass; @@ -333,7 +361,6 @@ sebsd_free(scontext, M_SEBSD); return (error); } -#endif SYSCTL_DECL(_security_mac); SYSCTL_NODE(_security_mac, OID_AUTO, sebsd, CTLFLAG_RW, 0, @@ -341,19 +368,20 @@ SYSCTL_INT(_security_mac_sebsd, OID_AUTO, verbose, CTLFLAG_RW, &sebsd_verbose, 0, " SEBSD Verbose Debug Stuff"); -#if 0 SYSCTL_PROC(_security_mac_sebsd, OID_AUTO, sids, CTLTYPE_STRING|CTLFLAG_RD, NULL, 0, sysctl_list_sids, "A", "SEBSD SIDs"); SYSCTL_PROC(_security_mac_sebsd, OID_AUTO, user_sids, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_ANYBODY, NULL, 0, sysctl_user_sids, "A", "SEBSD transitionable user SIDs"); +SYSCTL_PROC(_security_mac_sebsd, OID_AUTO, file_sids, CTLTYPE_STRING | + CTLFLAG_RW | CTLFLAG_ANYBODY, NULL, 0, sysctl_file_sids, "A", + "SEBSD transitionable file SIDs"); SYSCTL_PROC(_security_mac_sebsd, OID_AUTO, change_sid, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_ANYBODY, NULL, 0, sysctl_change_sid, "A", "SEBSD (tty) SID relabel to perform along with transition"); SYSCTL_PROC(_security_mac_sebsd, OID_AUTO, compute_av, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_ANYBODY, NULL, 0, sysctl_compute_av, "A", "SEBSD access vector decision query"); -#endif SYSCTL_PROC(_security_mac_sebsd, OID_AUTO, auditing, CTLTYPE_INT | CTLFLAG_RW, NULL, 0, sysctl_sebsd_auditing, "I", "SEBSD avc auditing"); SYSCTL_PROC(_security_mac_sebsd, OID_AUTO, enforcing, CTLTYPE_INT | @@ -367,6 +395,11 @@ { sysctl_register_oid(&sysctl__security_mac_sebsd); sysctl_register_oid(&sysctl__security_mac_sebsd_verbose); + sysctl_register_oid(&sysctl__security_mac_sebsd_sids); + sysctl_register_oid(&sysctl__security_mac_sebsd_user_sids); + sysctl_register_oid(&sysctl__security_mac_sebsd_file_sids); + sysctl_register_oid(&sysctl__security_mac_sebsd_change_sid); + sysctl_register_oid(&sysctl__security_mac_sebsd_compute_av); sysctl_register_oid(&sysctl__security_mac_sebsd_auditing); sysctl_register_oid(&sysctl__security_mac_sebsd_enforcing); sysctl_register_oid(&sysctl__security_mac_sebsd_policyvers); From owner-p4-projects@FreeBSD.ORG Thu Apr 20 15:49:06 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 04EA716A409; Thu, 20 Apr 2006 15:49:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF69116A405 for ; Thu, 20 Apr 2006 15:49:05 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 896AC43D48 for ; Thu, 20 Apr 2006 15:49:05 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KFn5Vg096762 for ; Thu, 20 Apr 2006 15:49:05 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KFn5DU096759 for perforce@freebsd.org; Thu, 20 Apr 2006 15:49:05 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 15:49:05 GMT Message-Id: <200604201549.k3KFn5DU096759@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95690 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 15:49:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=95690 Change 95690 by millert@millert_g5tower on 2006/04/20 15:48:36 Use OSSwapInt* functions for byte swapping. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#17 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/linux-compat.h#17 (text+ko) ==== @@ -48,8 +48,11 @@ #include /* NOTE: mach sys/types, not BSD one. */ #include /* For atomic operation protos */ -#include /* We need to explicitly include */ -#include /* byte order includes for mach. */ +#ifdef KERNEL +#include +#else +#include +#endif typedef u_int64_t u64; typedef u_int64_t __le64; @@ -71,12 +74,12 @@ #define le32_to_cpu(x) ((__uint32_t)(x)) #define le64_to_cpu(x) ((__uint64_t)(x)) #elif BYTE_ORDER == BIG_ENDIAN -#define cpu_to_le16(x) NXSwapHostShortToLittle(x) -#define cpu_to_le32(x) NXSwapHostLongToLittle(x) -#define cpu_to_le64(x) NXSwapHostLongLongToLittle(x) -#define le16_to_cpu(x) NXSwapLittleShortToHost(x) -#define le32_to_cpu(x) NXSwapLittleLongToHost(x) -#define le64_to_cpu(x) NXSwapLittleLongLongToHost(x) +#define cpu_to_le16(x) OSSwapInt16(x) +#define cpu_to_le32(x) OSSwapInt32(x) +#define cpu_to_le64(x) OSSwapInt64(x) +#define le16_to_cpu(x) OSSwapInt16(x) +#define le32_to_cpu(x) OSSwapInt32(x) +#define le64_to_cpu(x) OSSwapInt64(x) #else #error unsupported BYTE_ORDER #endif /* BYTE_ORDER */ From owner-p4-projects@FreeBSD.ORG Thu Apr 20 15:52:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B1E5916A40E; Thu, 20 Apr 2006 15:52:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 77FAA16A400 for ; Thu, 20 Apr 2006 15:52:10 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4242E43D45 for ; Thu, 20 Apr 2006 15:52:10 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KFqAAu098469 for ; Thu, 20 Apr 2006 15:52:10 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KFqAx3098461 for perforce@freebsd.org; Thu, 20 Apr 2006 15:52:10 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 15:52:10 GMT Message-Id: <200604201552.k3KFqAx3098461@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95692 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 15:52:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=95692 Change 95692 by millert@millert_g5tower on 2006/04/20 15:52:01 wslogin is obsoleted by the the SEDarwin login plugin module. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/English.lproj/MainMenu.nib/classes.nib#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/English.lproj/MainMenu.nib/info.nib#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/English.lproj/MainMenu.nib/objects.nib#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/LabelChooser.h#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/LabelChooser.m#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/Makefile#5 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/WindowServer.sedarwin#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/install-windowserver.sh#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/main.m#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/wslogin.c#5 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/wslogin/wsloginui.pbproj/project.pbxproj#3 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 16:14:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5842916A405; Thu, 20 Apr 2006 16:14:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11BA416A401 for ; Thu, 20 Apr 2006 16:14:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1863943D68 for ; Thu, 20 Apr 2006 16:14:38 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KGEbX5012506 for ; Thu, 20 Apr 2006 16:14:37 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KGEbum012503 for perforce@freebsd.org; Thu, 20 Apr 2006 16:14:37 GMT (envelope-from jhb@freebsd.org) Date: Thu, 20 Apr 2006 16:14:37 GMT Message-Id: <200604201614.k3KGEbum012503@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 Cc: Subject: PERFORCE change 95694 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 16:14:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=95694 Change 95694 by jhb@jhb_slimer on 2006/04/20 16:14:36 Disable interrupts during the CPU shutdown to avoid problems with lapic timer interrupt blocking on sched_lock owned by a CPU that has been stopped. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/vm_machdep.c#32 edit .. //depot/projects/smpng/sys/i386/i386/vm_machdep.c#77 edit Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/vm_machdep.c#32 (text+ko) ==== @@ -361,6 +361,7 @@ cpu_reset_proxy() { + disable_intr(); cpu_reset_proxy_active = 1; while (cpu_reset_proxy_active == 1) ; /* Wait for other cpu to see that we've started */ @@ -377,6 +378,7 @@ #ifdef SMP u_int cnt, map; + disable_intr(); if (smp_active) { map = PCPU_GET(other_cpus) & ~stopped_cpus; if (map != 0) { ==== //depot/projects/smpng/sys/i386/i386/vm_machdep.c#77 (text+ko) ==== @@ -526,6 +526,7 @@ cpu_reset_proxy() { + disable_intr(); cpu_reset_proxy_active = 1; while (cpu_reset_proxy_active == 1) ; /* Wait for other cpu to see that we've started */ @@ -550,6 +551,7 @@ #ifdef SMP u_int cnt, map; + disable_intr(); if (smp_active) { map = PCPU_GET(other_cpus) & ~stopped_cpus; if (map != 0) { From owner-p4-projects@FreeBSD.ORG Thu Apr 20 17:33:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A7CF16A405; Thu, 20 Apr 2006 17:33:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5887616A403 for ; Thu, 20 Apr 2006 17:33:28 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F77643D46 for ; Thu, 20 Apr 2006 17:33:28 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KHXRMA064295 for ; Thu, 20 Apr 2006 17:33:27 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KHXRVY064289 for perforce@freebsd.org; Thu, 20 Apr 2006 17:33:27 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 17:33:27 GMT Message-Id: <200604201733.k3KHXRVY064289@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95698 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 17:33:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=95698 Change 95698 by imp@imp_hammer on 2006/04/20 17:32:44 Automatic burning code. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 17:44:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 29B2816A405; Thu, 20 Apr 2006 17:44:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B87B16A400 for ; Thu, 20 Apr 2006 17:44:43 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFC1F43D46 for ; Thu, 20 Apr 2006 17:44:42 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KHigba074065 for ; Thu, 20 Apr 2006 17:44:42 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KHigCA074062 for perforce@freebsd.org; Thu, 20 Apr 2006 17:44:42 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 17:44:42 GMT Message-Id: <200604201744.k3KHigCA074062@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95700 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 17:44:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=95700 Change 95700 by imp@imp_hammer on 2006/04/20 17:44:12 No need to read in the rest of the eeprom into memory. We're now < 8k again: 7821 bytes. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.s#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#6 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= libat91 boot0 bootiic bootspi +SUBDIR= libat91 boot0 boot0iic boot0spi bootiic bootspi .include ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#7 (text) ==== @@ -2,7 +2,7 @@ P=boot0 FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.s main.c doit.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#7 (text) ==== @@ -28,16 +28,15 @@ #include "lib.h" #include "at91rm9200_lowlevel.h" -typedef void fn_t(void); +extern void doit(void *); int main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - fn_t *fn = (fn_t *)(SDRAM_BASE + (1 << 20)); /* Load to base + 1MB */ while (xmodem_rx(addr) == -1) continue; - fn(); + doit(addr); return (1); } ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#2 (text) ==== @@ -1,10 +1,12 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.3 2006/04/19 17:16:48 imp Exp $ -P=boot0 +.PATH: ${.CURDIR}/../boot0 + +P=boot0iic FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.s main.c doit.c NO_MAN= -LDFLAGS=-e 0 -T linker.cfg +LDFLAGS=-e 0 -T ${.CURDIR}/../boot0/linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#2 (text) ==== @@ -1,10 +1,12 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.3 2006/04/19 17:16:48 imp Exp $ -P=boot0 +.PATH: ${.CURDIR}/../boot0 + +P=boot0spi FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.s main.c doit.c NO_MAN= -LDFLAGS=-e 0 -T linker.cfg +LDFLAGS=-e 0 -T ${.CURDIR}/../boot0/linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.s#4 (text+ko) ==== @@ -83,18 +83,6 @@ ldr r1, = SVC_STACK_USE mov sp, r1 @ ; Move the stack to SDRAM -/* Copy the rest of the load image from EEPROM */ - .extern InitEEPROM - - bl InitEEPROM - - .extern ReadEEPROM - - mov r0, #8192 - mov r1, #8192 - mov r2, #8192 - bl ReadEEPROM - /* Start execution at main */ .extern main ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#6 (text+ko) ==== @@ -25,6 +25,7 @@ #include "loader_prompt.h" #include "emac.h" #include "lib.h" +#include "eeprom.h" /* * .KB_C_FN_DEFINITION_START @@ -39,16 +40,12 @@ int main(void) { - + InitEEPROM(); EMAC_Init(); - LoadBootCommands(); - printf("\n\rKB9202(www.kwikbyte.com)\n\rAuto boot..\n\r"); - if (getc(1) == -1) ExecuteEnvironmentFunctions(); - Bootloader(0); return (1); From owner-p4-projects@FreeBSD.ORG Thu Apr 20 17:46:46 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5068B16A404; Thu, 20 Apr 2006 17:46:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17AF416A401 for ; Thu, 20 Apr 2006 17:46:46 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3A9943D49 for ; Thu, 20 Apr 2006 17:46:45 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KHkjPJ074183 for ; Thu, 20 Apr 2006 17:46:45 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KHkjUE074180 for perforce@freebsd.org; Thu, 20 Apr 2006 17:46:45 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 17:46:45 GMT Message-Id: <200604201746.k3KHkjUE074180@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95701 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 17:46:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=95701 Change 95701 by imp@imp_hammer on 2006/04/20 17:46:39 Have different doit files for different boot loaders. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/doit.c#1 add .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/doit.c#1 add .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/doit.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 19:31:57 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C6B316A402; Thu, 20 Apr 2006 19:31:56 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C738E16A400 for ; Thu, 20 Apr 2006 19:31:56 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70E6843D46 for ; Thu, 20 Apr 2006 19:31:56 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KJVuN9031707 for ; Thu, 20 Apr 2006 19:31:56 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KJVsQa031659 for perforce@freebsd.org; Thu, 20 Apr 2006 19:31:54 GMT (envelope-from marcel@freebsd.org) Date: Thu, 20 Apr 2006 19:31:54 GMT Message-Id: <200604201931.k3KJVsQa031659@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 Cc: Subject: PERFORCE change 95707 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 19:31:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=95707 Change 95707 by marcel@marcel_nfs on 2006/04/20 19:31:11 IFC @95706 Affected files ... .. //depot/projects/uart/alpha/isa/isa.c#5 integrate .. //depot/projects/uart/alpha/pci/apecs_pci.c#3 integrate .. //depot/projects/uart/alpha/pci/lca_pci.c#3 integrate .. //depot/projects/uart/alpha/pci/pcibus.c#6 integrate .. //depot/projects/uart/amd64/amd64/fpu.c#4 integrate .. //depot/projects/uart/amd64/amd64/nexus.c#7 integrate .. //depot/projects/uart/arm/arm/nexus.c#5 integrate .. //depot/projects/uart/arm/at91/at91.c#4 integrate .. //depot/projects/uart/arm/sa11x0/sa11x0.c#3 integrate .. //depot/projects/uart/arm/xscale/i80321/i80321_pci.c#7 integrate .. //depot/projects/uart/arm/xscale/i80321/iq80321.c#8 integrate .. //depot/projects/uart/arm/xscale/i80321/obio.c#4 integrate .. //depot/projects/uart/boot/arm/at91/Makefile#1 branch .. //depot/projects/uart/boot/arm/at91/Makefile.inc#1 branch .. //depot/projects/uart/boot/arm/at91/boot0/Makefile#2 integrate .. //depot/projects/uart/boot/arm/at91/boot0/at91rm9200_lowlevel.c#2 delete .. //depot/projects/uart/boot/arm/at91/boot0/at91rm9200_lowlevel.h#2 delete .. //depot/projects/uart/boot/arm/at91/boot0/lib.c#2 delete .. //depot/projects/uart/boot/arm/at91/boot0/lib.h#2 delete .. //depot/projects/uart/boot/arm/at91/boot0/main.c#2 integrate .. //depot/projects/uart/boot/arm/at91/boot0/xmodem.c#2 delete .. //depot/projects/uart/boot/arm/at91/boot0/xmodem.h#2 delete .. //depot/projects/uart/boot/arm/at91/bootiic/Makefile#1 branch .. //depot/projects/uart/boot/arm/at91/bootiic/README#1 branch .. //depot/projects/uart/boot/arm/at91/bootiic/arm_init.s#1 branch .. //depot/projects/uart/boot/arm/at91/bootiic/main.c#1 branch .. //depot/projects/uart/boot/arm/at91/bootspi/Makefile#1 branch .. //depot/projects/uart/boot/arm/at91/bootspi/README#1 branch .. //depot/projects/uart/boot/arm/at91/bootspi/arm_init.s#1 branch .. //depot/projects/uart/boot/arm/at91/bootspi/main.c#1 branch .. //depot/projects/uart/boot/arm/at91/inc/AT91RM9200.h#2 delete .. //depot/projects/uart/boot/arm/at91/libat91/Makefile#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/at91rm9200.h#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/at91rm9200_lowlevel.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/at91rm9200_lowlevel.h#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/eeprom.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/eeprom.h#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/emac.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/emac.h#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/env_vars.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/env_vars.h#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/getc.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/lib.h#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/loader_prompt.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/loader_prompt.h#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/p_string.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/p_string.h#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/printf.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/putchar.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/tag_list.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/tag_list.h#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/xmodem.c#1 branch .. //depot/projects/uart/boot/arm/at91/linker.cfg#1 branch .. //depot/projects/uart/cam/cam.c#3 integrate .. //depot/projects/uart/cam/scsi/scsi_da.c#18 integrate .. //depot/projects/uart/conf/NOTES#34 integrate .. //depot/projects/uart/conf/files#61 integrate .. //depot/projects/uart/conf/options#30 integrate .. //depot/projects/uart/crypto/via/padlock.c#3 integrate .. //depot/projects/uart/dev/acpica/acpi.c#21 integrate .. //depot/projects/uart/dev/ciss/ciss.c#15 integrate .. //depot/projects/uart/dev/ispfw/asm_2300.h#5 integrate .. //depot/projects/uart/dev/mpt/mpt.c#15 integrate .. //depot/projects/uart/dev/mpt/mpt_cam.c#11 integrate .. //depot/projects/uart/geom/eli/g_eli.c#7 integrate .. //depot/projects/uart/geom/eli/g_eli_crypto.c#3 integrate .. //depot/projects/uart/i386/i386/nexus.c#6 integrate .. //depot/projects/uart/i386/isa/npx.c#11 integrate .. //depot/projects/uart/ia64/ia64/nexus.c#7 integrate .. //depot/projects/uart/kern/kern_rwlock.c#5 integrate .. //depot/projects/uart/kern/subr_bus.c#14 integrate .. //depot/projects/uart/kern/subr_rman.c#8 integrate .. //depot/projects/uart/powerpc/powermac/grackle.c#4 integrate .. //depot/projects/uart/powerpc/powermac/hrowpic.c#4 integrate .. //depot/projects/uart/powerpc/powermac/macio.c#5 integrate .. //depot/projects/uart/powerpc/powermac/uninorth.c#6 integrate .. //depot/projects/uart/powerpc/powerpc/openpic.c#4 integrate .. //depot/projects/uart/powerpc/psim/iobus.c#4 integrate .. //depot/projects/uart/sparc64/conf/NOTES#11 integrate .. //depot/projects/uart/sparc64/ebus/ebus.c#10 integrate .. //depot/projects/uart/sparc64/pci/psycho.c#10 integrate .. //depot/projects/uart/sparc64/sbus/sbus.c#10 integrate .. //depot/projects/uart/sparc64/sparc64/nexus.c#6 integrate .. //depot/projects/uart/sys/bus.h#11 integrate .. //depot/projects/uart/sys/rwlock.h#3 integrate Differences ... ==== //depot/projects/uart/alpha/isa/isa.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/isa/isa.c,v 1.38 2005/10/25 19:48:45 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/isa/isa.c,v 1.39 2006/04/20 04:16:02 imp Exp $"); #include #include @@ -231,6 +231,7 @@ res = rman_reserve_resource(&isa_drq_rman, start, start, 1, 0, child); + rman_set_rid(res, *rid); if (res && !passthrough) { rle = resource_list_find(rl, type, *rid); rle->start = rman_get_start(res); ==== //depot/projects/uart/alpha/pci/apecs_pci.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/apecs_pci.c,v 1.15 2003/08/22 07:20:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/pci/apecs_pci.c,v 1.16 2006/04/20 04:16:02 imp Exp $"); #include #include @@ -79,12 +79,17 @@ apecs_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { + struct resource *rv = NULL; + if ((hwrpb->rpb_type == ST_DEC_2100_A50) && (type == SYS_RES_IRQ)) - return isa_alloc_intr(bus, child, start); + rv = isa_alloc_intr(bus, child, start); else - return alpha_pci_alloc_resource(bus, child, type, rid, - start, end, count, flags); + rv = alpha_pci_alloc_resource(bus, child, type, rid, + start, end, count, flags); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } static int ==== //depot/projects/uart/alpha/pci/lca_pci.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/lca_pci.c,v 1.17 2003/08/22 07:20:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/pci/lca_pci.c,v 1.18 2006/04/20 04:16:02 imp Exp $"); #include #include @@ -78,11 +78,16 @@ lca_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { + struct resource *rv = NULL; + if (type == SYS_RES_IRQ) - return isa_alloc_intr(bus, child, start); + rv = isa_alloc_intr(bus, child, start); else - return alpha_pci_alloc_resource(bus, child, type, rid, - start, end, count, flags); + rv = alpha_pci_alloc_resource(bus, child, type, rid, + start, end, count, flags); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } static int ==== //depot/projects/uart/alpha/pci/pcibus.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.37 2005/09/25 20:12:29 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.38 2006/04/20 04:16:02 imp Exp $"); #include "opt_isa.h" @@ -96,7 +96,12 @@ alpha_platform_alloc_ide_intr(int chan) { int irqs[2] = { 14, 15 }; - return isa_alloc_intr(0, 0, irqs[chan]); + struct resource *rv; + + rv = isa_alloc_intr(0, 0, irqs[chan]); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } int @@ -230,9 +235,11 @@ #ifdef DEV_ISA if((start >= ISA_IRQ_OFFSET) && (end < ISA_IRQ_OFFSET + ISA_IRQ_LEN)) { - return isa_alloc_intrs(bus, child, - start - ISA_IRQ_OFFSET, - end - ISA_IRQ_OFFSET); + rv = isa_alloc_intrs(bus, child, + start - ISA_IRQ_OFFSET, end - ISA_IRQ_OFFSET); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } else #endif @@ -252,6 +259,7 @@ if (rv == 0) return 0; + rman_set_rid(rv, *rid); rstart = rman_get_start(rv); rman_set_bustag(rv, ALPHAPCI_GET_BUSTAG(bus, type)); rman_set_bushandle(rv, rstart); ==== //depot/projects/uart/amd64/amd64/fpu.c#4 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.157 2005/03/11 22:16:09 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.158 2006/04/19 07:00:19 cperciva Exp $"); #include #include @@ -96,6 +96,8 @@ typedef u_char bool_t; +static void fpu_clean_state(void); + int hw_float = 1; SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, &hw_float, 0, @@ -407,6 +409,8 @@ PCPU_SET(fpcurthread, curthread); pcb = PCPU_GET(curpcb); + fpu_clean_state(); + if ((pcb->pcb_flags & PCB_FPUINITDONE) == 0) { /* * This is the first time this thread has used the FPU, @@ -474,6 +478,7 @@ s = intr_disable(); if (td == PCPU_GET(fpcurthread)) { + fpu_clean_state(); fxrstor(addr); intr_restore(s); } else { @@ -484,6 +489,37 @@ } /* + * On AuthenticAMD processors, the fxrstor instruction does not restore + * the x87's stored last instruction pointer, last data pointer, and last + * opcode values, except in the rare case in which the exception summary + * (ES) bit in the x87 status word is set to 1. + * + * In order to avoid leaking this information across processes, we clean + * these values by performing a dummy load before executing fxrstor(). + */ +static double dummy_variable = 0.0; +static void +fpu_clean_state(void) +{ + u_short status; + + /* + * Clear the ES bit in the x87 status word if it is currently + * set, in order to avoid causing a fault in the upcoming load. + */ + fnstsw(&status); + if (status & 0x80) + fnclex(); + + /* + * Load the dummy variable into the x87 stack. This mangles + * the x87 stack, but we don't care since we're about to call + * fxrstor() anyway. + */ + __asm __volatile("ffree %%st(7); fld %0" : : "m" (dummy_variable)); +} + +/* * This really sucks. We want the acpi version only, but it requires * the isa_if.h file in order to get the definitions. */ ==== //depot/projects/uart/amd64/amd64/nexus.c#7 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.67 2005/09/25 20:03:41 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.68 2006/04/20 04:16:34 imp Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -340,7 +340,7 @@ rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == 0) return 0; - + rman_set_rid(rv, *rid); if (type == SYS_RES_MEMORY) { rman_set_bustag(rv, AMD64_BUS_SPACE_MEM); } else if (type == SYS_RES_IOPORT) { ==== //depot/projects/uart/arm/arm/nexus.c#5 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.6 2005/09/25 21:06:49 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.7 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -214,6 +214,7 @@ if (rv == 0) return 0; + rman_set_rid(rv, *rid); rman_set_bustag(rv, (void*)ARM_BUS_SPACE_MEM); rman_set_bushandle(rv, rman_get_start(rv)); ==== //depot/projects/uart/arm/at91/at91.c#4 (text) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.4 2006/04/06 04:32:29 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.5 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -497,6 +497,7 @@ rle->start = rman_get_start(rle->res); rle->end = rman_get_end(rle->res); rle->count = count; + rman_set_rid(rle->res, *rid); } return (rle->res); } ==== //depot/projects/uart/arm/sa11x0/sa11x0.c#3 (text+ko) ==== @@ -57,7 +57,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0.c,v 1.5 2005/09/25 21:06:50 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0.c,v 1.6 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -127,6 +127,8 @@ res = rman_reserve_resource(&sa11x0_softc->sa11x0_rman, *rid, *rid, count, flags, child); + if (res != NULL) + rman_set_rid(res, *rid); return (res); } ==== //depot/projects/uart/arm/xscale/i80321/i80321_pci.c#7 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.7 2006/04/13 15:07:59 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.8 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -380,6 +380,7 @@ rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == NULL) return (NULL); + rman_set_rid(rv, *rid); if (type != SYS_RES_IRQ) { if (type == SYS_RES_MEMORY) bh += (rman_get_start(rv)); ==== //depot/projects/uart/arm/xscale/i80321/iq80321.c#8 (text+ko) ==== @@ -42,7 +42,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq80321.c,v 1.10 2005/10/03 14:19:55 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq80321.c,v 1.11 2006/04/20 04:12:02 imp Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -300,10 +300,14 @@ u_long start, u_long end, u_long count, u_int flags) { struct i80321_softc *sc = device_get_softc(dev); - - if (type == SYS_RES_IRQ) - return (rman_reserve_resource(&sc->sc_irq_rman, - start, end, count, flags, child)); + struct resource *rv; + + if (type == SYS_RES_IRQ) { + rv = rman_reserve_resource(&sc->sc_irq_rman, + start, end, count, flags, child); + if (rv != NULL) + rman_set_rid(rv, *rid); + } return (NULL); } ==== //depot/projects/uart/arm/xscale/i80321/obio.c#4 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/obio.c,v 1.3 2005/09/25 21:06:50 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/obio.c,v 1.4 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -124,6 +124,7 @@ return (NULL); if (type == SYS_RES_IRQ) return (rv); + rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); ==== //depot/projects/uart/boot/arm/at91/boot0/Makefile#2 (text) ==== @@ -1,22 +1,11 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.2 2006/04/13 17:44:05 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.3 2006/04/19 17:16:48 imp Exp $ -PROG=boot0 -SRCS=arm_init.s at91rm9200_lowlevel.c lib.c main.c xmodem.c +P=boot0 +FILES=${P} +SRCS=arm_init.s main.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg -CFLAGS=-O2 -mcpu=arm9 -ffreestanding -I${.CURDIR}/../inc -CFLAGS+=-DBOOT0_KB9202 -#CFLAGS+=-DBOOT0_TSC OBJS+= ${SRCS:N*.h:R:S/$/.o/g} -CLEANFILES=${OBJS} ${PROG} ${PROG}.out -all: ${PROG} - -${PROG}: ${PROG}.out ${OBJS} - objcopy -S -O binary ${PROG}.out ${PROG} +.include -${PROG}.out: ${OBJS} - ld ${LDFLAGS} -o ${PROG}.out ${OBJS} - -clean: - rm -f ${CLEANFILES} ==== //depot/projects/uart/boot/arm/at91/boot0/main.c#2 (text) ==== @@ -21,10 +21,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/boot/arm/at91/boot0/main.c,v 1.2 2006/04/13 17:31:02 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $ */ -#include "AT91RM9200.h" +#include "at91rm9200.h" #include "lib.h" #include "at91rm9200_lowlevel.h" @@ -34,7 +34,7 @@ main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - fn_t *fn = (fn_t *)addr; + fn_t *fn = (fn_t *)(SDRAM_BASE + (1 << 20)); /* Load to base + 1MB */ while (xmodem_rx(addr) == -1) continue; ==== //depot/projects/uart/cam/cam.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam.c,v 1.9 2005/01/05 22:34:34 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam.c,v 1.10 2006/04/18 21:53:39 mjacob Exp $"); #include #ifdef _KERNEL @@ -373,7 +373,16 @@ { uint32_t size_mb, secs_per_cylinder; - size_mb = ccg->volume_size / ((1024L * 1024L) / ccg->block_size); + if (ccg->block_size == 0) { + ccg->ccb_h.status = CAM_REQ_CMP_ERR; + return; + } + size_mb = (1024L * 1024L) / ccg->block_size; + if (size_mb == 0) { + ccg->ccb_h.status = CAM_REQ_CMP_ERR; + return; + } + size_mb = ccg->volume_size / size_mb; if (size_mb > 1024 && extended) { ccg->heads = 255; ccg->secs_per_track = 63; @@ -382,6 +391,10 @@ ccg->secs_per_track = 32; } secs_per_cylinder = ccg->heads * ccg->secs_per_track; + if (secs_per_cylinder == 0) { + ccg->ccb_h.status = CAM_REQ_CMP_ERR; + return; + } ccg->cylinders = ccg->volume_size / secs_per_cylinder; ccg->ccb_h.status = CAM_REQ_CMP; } ==== //depot/projects/uart/cam/scsi/scsi_da.c#18 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.189 2006/03/18 21:13:14 joerg Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.190 2006/04/18 22:01:59 mjacob Exp $"); #include @@ -1865,9 +1865,23 @@ ccg.secs_per_track = 0; ccg.cylinders = 0; xpt_action((union ccb*)&ccg); - dp->heads = ccg.heads; - dp->secs_per_track = ccg.secs_per_track; - dp->cylinders = ccg.cylinders; + if ((ccg.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + /* + * We don't know what went wrong here- but just pick + * a geometry so we don't have nasty things like divide + * by zero. + */ + dp->heads = 255; + dp->secs_per_track = 255; + dp->cylinders = dp->sectors / (255 * 255); + if (dp->cylinders == 0) { + dp->cylinders = 1; + } + } else { + dp->heads = ccg.heads; + dp->secs_per_track = ccg.secs_per_track; + dp->cylinders = ccg.cylinders; + } } static void ==== //depot/projects/uart/conf/NOTES#34 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1356 2006/03/30 18:39:24 marcel Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1358 2006/04/18 22:43:46 mjacob Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -1363,6 +1363,7 @@ # ISP 12160 Ultra3 SCSI, # Qlogic ISP 2100 and ISP 2200 1Gb Fibre Channel host adapters. # Qlogic ISP 2300 and ISP 2312 2Gb Fibre Channel host adapters. +# Qlogic ISP 2322 and ISP 6322 2Gb Fibre Channel host adapters. # ispfw: Firmware module for Qlogic host adapters # mpt: LSI-Logic MPT/Fusion 53c1020 or 53c1030 Ultra4 # or FC9x9 Fibre Channel host adapters. @@ -1463,6 +1464,10 @@ # ISP_TARGET_MODE - enable target mode operation # options ISP_TARGET_MODE=1 +# +# ISP_DEFAULT_ROLES - default role (none, target, init, both) +# +options ISP_DEFAULT_ROLES=3 # Options used in dev/sym/ (Symbios SCSI driver). #options SYM_SETUP_LP_PROBE_MAP #-Low Priority Probe Map (bits) ==== //depot/projects/uart/conf/files#61 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1109 2006/04/15 12:31:31 iwasaki Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1110 2006/04/19 19:38:35 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -834,7 +834,6 @@ dev/rp/rp.c optional rp dev/rp/rp_isa.c optional rp isa dev/rp/rp_pci.c optional rp pci -dev/sab/sab.c optional sab ebus dev/safe/safe.c optional safe dev/sbsh/if_sbsh.c optional sbsh dev/scc/scc_if.m optional scc ==== //depot/projects/uart/conf/options#30 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.534 2006/04/10 20:04:21 ps Exp $ +# $FreeBSD: src/sys/conf/options,v 1.535 2006/04/18 22:24:55 mjacob Exp $ # # On the handling of kernel options # @@ -314,6 +314,7 @@ # Options used only in dev/isp/* ISP_TARGET_MODE opt_isp.h ISP_FW_CRASH_DUMP opt_isp.h +ISP_DEFAULT_ROLES opt_isp.h # Options used in the 'ata' ATA/ATAPI driver ATA_STATIC_ID opt_ata.h ==== //depot/projects/uart/crypto/via/padlock.c#3 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.2 2006/04/12 12:13:34 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.3 2006/04/20 06:31:44 pjd Exp $"); #include #include @@ -366,6 +366,10 @@ err = EINVAL; goto out; } + if ((crd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { + err = EINVAL; + goto out; + } mtx_lock(&sc->sc_sessions_mtx); TAILQ_FOREACH(ses, &sc->sc_sessions, ses_next) { ==== //depot/projects/uart/dev/acpica/acpi.c#21 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.221 2006/04/15 12:31:32 iwasaki Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.222 2006/04/20 04:21:27 imp Exp $"); #include "opt_acpi.h" #include @@ -1015,6 +1015,7 @@ goto out; /* Copy the bus tag and handle from the pre-allocated resource. */ + rman_set_rid(res, *rid); rman_set_bustag(res, rman_get_bustag(rle->res)); rman_set_bushandle(res, rman_get_start(res)); ==== //depot/projects/uart/dev/ciss/ciss.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/dev/ciss/ciss.c,v 1.67 2005/12/16 06:50:55 ps Exp $ + * $FreeBSD: src/sys/dev/ciss/ciss.c,v 1.69 2006/04/20 03:05:02 ps Exp $ */ /* @@ -1651,7 +1651,7 @@ ciss_free(struct ciss_softc *sc) { struct ciss_request *cr; - int i; + int i, j; debug_called(1); @@ -1725,8 +1725,15 @@ cam_simq_free(sc->ciss_cam_devq); if (sc->ciss_logical) { - for (i = 0; i < sc->ciss_max_logical_bus; i++) + for (i = 0; i <= sc->ciss_max_logical_bus; i++) { + for (j = 0; j < CISS_MAX_LOGICAL; j++) { + if (sc->ciss_logical[i][j].cl_ldrive) + free(sc->ciss_logical[i][j].cl_ldrive, CISS_MALLOC_CLASS); + if (sc->ciss_logical[i][j].cl_lstatus) + free(sc->ciss_logical[i][j].cl_lstatus, CISS_MALLOC_CLASS); + } free(sc->ciss_logical[i], CISS_MALLOC_CLASS); + } free(sc->ciss_logical, CISS_MALLOC_CLASS); } @@ -3588,7 +3595,7 @@ static void ciss_notify_hotplug(struct ciss_softc *sc, struct ciss_notify *cn) { - struct ciss_lun_report *cll; + struct ciss_lun_report *cll = NULL; int bus, target; int s; @@ -3626,6 +3633,9 @@ ciss_printf(sc, "Unknown hotplug event %d\n", cn->subclass); return; } + + if (cll != NULL) + free(cll, CISS_MALLOC_CLASS); } /************************************************************************ ==== //depot/projects/uart/dev/ispfw/asm_2300.h#5 (text+ko) ==== @@ -1,6 +1,6 @@ -/* $FreeBSD: src/sys/dev/ispfw/asm_2300.h,v 1.8 2005/01/29 01:12:37 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/ispfw/asm_2300.h,v 1.9 2006/04/18 21:55:30 mjacob Exp $ */ /*- - * Copyright (C) 2001, 2002, 2003 by Qlogic, Inc. + * Copyright (C) 2001, 2002, 2003, 2004, 2005 by Qlogic, Inc. * All rights reserved. * * Redistribution and use in source and binary forms are permitted provided @@ -27,21 +27,22 @@ /************************************************************************ * * - * --- ISP2300 Initiator/Target Firmware --- * + * --- ISP2300 Initiator/Target Firmware --- * * with Fabric support (Public Loop) and * - * with expanded LUN addressing. * + * with expanded LUN addressing. * + * * * * ************************************************************************/ /* - * Firmware Version 3.03.06 (18:09 Oct 04, 2004) + * Firmware Version 3.03.19 (09:40 Nov 30, 2005) */ static const u_int16_t isp_2300_risc_code[] = { - 0x0470, 0x0000, 0x0000, 0xc058, 0x0000, 0x0003, 0x0003, 0x0006, + 0x0470, 0x0000, 0x0000, 0xc646, 0x0000, 0x0003, 0x0003, 0x0013, 0x0007, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972, 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, - 0x332e, 0x3033, 0x2e30, 0x3620, 0x2020, 0x2020, 0x2400, 0x20a9, + 0x332e, 0x3033, 0x2e31, 0x3920, 0x2020, 0x2020, 0x2400, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000, @@ -50,837 +51,842 @@ 0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001, 0x0000, 0x20c1, 0x0004, 0x20c9, 0x14ff, 0x2059, 0x0000, 0x2b78, - 0x7883, 0x0004, 0x2089, 0x26a6, 0x2051, 0x1100, 0x2a70, 0x20e1, - 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e45, 0x2029, + 0x7883, 0x0004, 0x2089, 0x2702, 0x2051, 0x1100, 0x2a70, 0x20e1, + 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e57, 0x2029, 0x2e00, 0x2031, 0xffff, 0x2039, 0x2dc8, 0x2021, 0x0200, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x05c0, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8, 0x4104, 0x8001, 0x1de0, 0x756a, 0x766e, 0x7766, 0x7472, 0x7476, - 0x00e6, 0x2071, 0x13ff, 0x2472, 0x00ee, 0x20a1, 0x15c8, 0x716c, + 0x00e6, 0x2071, 0x13f9, 0x2472, 0x00ee, 0x20a1, 0x15c8, 0x716c, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001, 0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x716c, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009, 0x1100, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e, - 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x567d, 0x080c, - 0x928c, 0x080c, 0x0fe4, 0x080c, 0x11c7, 0x080c, 0x1840, 0x080c, - 0x0d5d, 0x080c, 0x0f55, 0x080c, 0x2d19, 0x080c, 0x6ba7, 0x080c, - 0x5e69, 0x080c, 0x7739, 0x080c, 0x1ea4, 0x080c, 0x79eb, 0x080c, - 0x7196, 0x080c, 0x1ce1, 0x080c, 0x1e15, 0x080c, 0x1e99, 0x2091, + 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x57ad, 0x080c, + 0x9610, 0x080c, 0x0ff6, 0x080c, 0x11d9, 0x080c, 0x186d, 0x080c, + 0x0d5d, 0x080c, 0x0f67, 0x080c, 0x2d98, 0x080c, 0x6e26, 0x080c, + 0x6051, 0x080c, 0x7a42, 0x080c, 0x1edd, 0x080c, 0x7d1c, 0x080c, + 0x7471, 0x080c, 0x1d12, 0x080c, 0x1e46, 0x080c, 0x1ed2, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091b, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833, 0x0010, 0x0e04, 0x090f, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, - 0xd084, 0x190c, 0x10b2, 0x2a70, 0x7003, 0x0000, 0x2a70, 0x7000, - 0x908e, 0x0003, 0x1168, 0x080c, 0x4399, 0x080c, 0x2d30, 0x080c, - 0x6c08, 0x080c, 0x6355, 0x080c, 0x775e, 0x080c, 0x2610, 0x0c70, + 0xd084, 0x190c, 0x10c4, 0x2a70, 0x7003, 0x0000, 0x2a70, 0x7000, + 0x908e, 0x0003, 0x1168, 0x080c, 0x449a, 0x080c, 0x2daf, 0x080c, + 0x6e87, 0x080c, 0x6591, 0x080c, 0x7a6a, 0x080c, 0x264c, 0x0c70, 0x000b, 0x0c88, 0x093c, 0x093d, 0x0add, 0x093a, 0x0ba2, 0x0d5c, 0x0d5c, 0x0d5c, 0x080c, 0x0dc9, 0x0005, 0x0126, 0x00f6, 0x2091, - 0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab2, 0x080c, 0x4d3e, - 0x1130, 0x0026, 0x2011, 0x0080, 0x080c, 0x0ed3, 0x002e, 0x080c, - 0x68b8, 0x0150, 0x080c, 0x68db, 0x15a0, 0x2079, 0x0100, 0x7828, - 0x9085, 0x1800, 0x782a, 0x0468, 0x080c, 0x67ea, 0x7000, 0x9086, - 0x0001, 0x1904, 0x0ab2, 0x7094, 0x9086, 0x0028, 0x1904, 0x0ab2, - 0x080c, 0x7722, 0x080c, 0x7714, 0x2001, 0x0161, 0x2003, 0x0001, + 0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab2, 0x080c, 0x4e65, + 0x1130, 0x0026, 0x2011, 0x0080, 0x080c, 0x0ee5, 0x002e, 0x080c, + 0x6b1f, 0x0150, 0x080c, 0x6b42, 0x15a0, 0x2079, 0x0100, 0x7828, + 0x9085, 0x1800, 0x782a, 0x0468, 0x080c, 0x6a4b, 0x7000, 0x9086, + 0x0001, 0x1904, 0x0ab2, 0x7094, 0x9086, 0x0029, 0x1904, 0x0ab2, + 0x080c, 0x7a2b, 0x080c, 0x7a1d, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827, 0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, - 0x2011, 0x674e, 0x080c, 0x77f8, 0x2011, 0x6741, 0x080c, 0x78bc, - 0x2011, 0x54d8, 0x080c, 0x77f8, 0x2011, 0x8030, 0x901e, 0x7392, - 0x04d0, 0x080c, 0x4d85, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904, - 0x0ab2, 0x2011, 0x54d8, 0x080c, 0x77f8, 0x2011, 0x674e, 0x080c, - 0x77f8, 0x2011, 0x6741, 0x080c, 0x78bc, 0x2001, 0x0265, 0x2001, + 0x2011, 0x69af, 0x080c, 0x7b29, 0x2011, 0x69a2, 0x080c, 0x7bed, + 0x2011, 0x5608, 0x080c, 0x7b29, 0x2011, 0x8030, 0x901e, 0x7392, + 0x04d0, 0x080c, 0x4eb5, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904, + 0x0ab2, 0x2011, 0x5608, 0x080c, 0x7b29, 0x2011, 0x69af, 0x080c, + 0x7b29, 0x2011, 0x69a2, 0x080c, 0x7bed, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, 0x2001, - 0x12ea, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, - 0x5625, 0x00ce, 0x0804, 0x0ab2, 0x780f, 0x006b, 0x7a28, 0x080c, - 0x68c0, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a, - 0x2011, 0x8010, 0x73d4, 0x2001, 0x12eb, 0x2003, 0x0001, 0x080c, - 0x24d5, 0x080c, 0x431a, 0x7244, 0xc284, 0x7246, 0x2001, 0x110c, - 0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0x8d5d, 0x2011, 0x0004, - 0x080c, 0xaada, 0x080c, 0x5d52, 0x080c, 0x68b8, 0x1120, 0x080c, - 0x2519, 0x02e0, 0x0400, 0x080c, 0x562c, 0x0140, 0x7093, 0x0001, - 0x70cf, 0x0000, 0x080c, 0x4f52, 0x0804, 0x0ab2, 0x080c, 0x4d2f, + 0x12dd, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, + 0x5755, 0x00ce, 0x0804, 0x0ab2, 0x780f, 0x006b, 0x7a28, 0x080c, + 0x6b27, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a, + 0x2011, 0x8010, 0x73d4, 0x2001, 0x12de, 0x2003, 0x0001, 0x080c, + 0x24f1, 0x080c, 0x441b, 0x7244, 0xc284, 0x7246, 0x2001, 0x110c, + 0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0x90ee, 0x2011, 0x0004, + 0x080c, 0xafb5, 0x080c, 0x5e85, 0x080c, 0x6b1f, 0x1120, 0x080c, + 0x2535, 0x02e0, 0x0400, 0x080c, 0x575c, 0x0140, 0x7093, 0x0001, + 0x70cf, 0x0000, 0x080c, 0x5082, 0x0804, 0x0ab2, 0x080c, 0x4e56, 0xd094, 0x0188, 0x2011, 0x110c, 0x2204, 0xc0cd, 0x2012, 0x080c, - 0x4d33, 0xd0d4, 0x1118, 0x080c, 0x2519, 0x1270, 0x2011, 0x110c, - 0x2204, 0xc0bc, 0x00a8, 0x080c, 0x4d33, 0xd0d4, 0x1db8, 0x2011, + 0x4e5a, 0xd0d4, 0x1118, 0x080c, 0x2535, 0x1270, 0x2011, 0x110c, + 0x2204, 0xc0bc, 0x00a8, 0x080c, 0x4e5a, 0xd0d4, 0x1db8, 0x2011, 0x110c, 0x2204, 0xc0bd, 0x0060, 0x2011, 0x110c, 0x2204, 0xc0bd, - 0x2012, 0x080c, 0x5e3d, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd, - 0x2012, 0x080c, 0x5e05, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, - 0x707b, 0x0000, 0x080c, 0x68b8, 0x1130, 0x70ac, 0x9005, 0x1168, - 0x080c, 0xae0a, 0x0050, 0x080c, 0xae0a, 0x70d8, 0xd09c, 0x1128, - 0x70ac, 0x9005, 0x0110, 0x080c, 0x5602, 0x70e3, 0x0000, 0x70df, - 0x0000, 0x70a3, 0x0000, 0x080c, 0x2521, 0x0228, 0x2011, 0x0101, - 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x68b8, 0x1178, 0x9016, - 0x0016, 0x080c, 0x22d2, 0x2019, 0x12a1, 0x211a, 0x001e, 0x705b, - 0xffff, 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019, 0x12a1, + 0x2012, 0x080c, 0x5f70, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd, + 0x2012, 0x080c, 0x5f38, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, + 0x707b, 0x0000, 0x080c, 0x6b1f, 0x1130, 0x70ac, 0x9005, 0x1168, + 0x080c, 0xb2e7, 0x0050, 0x080c, 0xb2e7, 0x70d8, 0xd09c, 0x1128, + 0x70ac, 0x9005, 0x0110, 0x080c, 0x5732, 0x70e3, 0x0000, 0x70df, + 0x0000, 0x70a3, 0x0000, 0x080c, 0x253d, 0x0228, 0x2011, 0x0101, + 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x6b1f, 0x1178, 0x9016, + 0x0016, 0x080c, 0x22fa, 0x2019, 0x1293, 0x211a, 0x001e, 0x705b, + 0xffff, 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019, 0x1293, 0x201b, 0x0000, 0x2079, 0x115b, 0x7804, 0xd0ac, 0x0108, 0xc295, - 0x72da, 0x080c, 0x68b8, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011, - 0x0001, 0x080c, 0xaada, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, + 0x72da, 0x080c, 0x6b1f, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011, + 0x0001, 0x080c, 0xafb5, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, - 0x782a, 0x00fe, 0x080c, 0x2913, 0x2011, 0x0005, 0x080c, 0x8e68, - 0x080c, 0x807c, 0x080c, 0x68b8, 0x0148, 0x00c6, 0x2061, 0x0100, - 0x0016, 0x080c, 0x22d2, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, + 0x782a, 0x00fe, 0x080c, 0x296f, 0x2011, 0x0005, 0x080c, 0x91f9, + 0x080c, 0x83b3, 0x080c, 0x6b1f, 0x0148, 0x00c6, 0x2061, 0x0100, + 0x0016, 0x080c, 0x22fa, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe, - 0x2011, 0x0005, 0x080c, 0x8e68, 0x080c, 0x807c, 0x080c, 0x68b8, - 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x22d2, 0x61e2, - 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x080c, 0x68b8, - 0x1118, 0x20a9, 0x0100, 0x0010, 0x20a9, 0x0082, 0x080c, 0x68b8, + 0x2011, 0x0005, 0x080c, 0x91f9, 0x080c, 0x83b3, 0x080c, 0x6b1f, + 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x22fa, 0x61e2, + 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x080c, 0x6b1f, + 0x1118, 0x20a9, 0x0100, 0x0010, 0x20a9, 0x0082, 0x080c, 0x6b1f, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138, 0x9180, - 0x1000, 0x2004, 0x9065, 0x0110, 0x6000, 0xd0bc, 0x090c, 0x2bdb, + 0x1000, 0x2004, 0x9065, 0x0110, 0x6000, 0xd0bc, 0x090c, 0x2c5a, 0x8108, 0x1f04, 0x0ac5, 0x707b, 0x0000, 0x707c, 0x9084, 0x00ff, 0x707e, 0x70af, 0x0000, 0x00ce, 0x0005, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904, 0x0ba0, 0x70a8, 0x9086, 0xffff, - 0x0130, 0x080c, 0x2913, 0x080c, 0x807c, 0x0804, 0x0ba0, 0x70d8, + 0x0130, 0x080c, 0x296f, 0x080c, 0x83b3, 0x0804, 0x0ba0, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0558, 0xd084, 0x0548, 0x0006, 0x2001, - 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c, 0x0508, 0x080c, 0x2c12, - 0x11d0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, 0x2a65, 0x080c, - 0x807c, 0x70d8, 0xd094, 0x1904, 0x0ba0, 0x2011, 0x0001, 0x080c, - 0xb076, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2a9a, 0x080c, - 0x807c, 0x0804, 0x0ba0, 0x70e0, 0x9005, 0x1904, 0x0ba0, 0x70a4, + 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c, 0x0508, 0x080c, 0x2c91, + 0x11d0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, 0x2ae4, 0x080c, + 0x83b3, 0x70d8, 0xd094, 0x1904, 0x0ba0, 0x2011, 0x0001, 0x080c, + 0xb55c, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2b19, 0x080c, + 0x83b3, 0x0804, 0x0ba0, 0x70e0, 0x9005, 0x1904, 0x0ba0, 0x70a4, 0x9005, 0x1904, 0x0ba0, 0x70d8, 0xd0a4, 0x0118, 0xd0b4, 0x0904, - 0x0ba0, 0x080c, 0x5e05, 0x1904, 0x0ba0, 0x080c, 0x5e56, 0x1904, - 0x0ba0, 0x080c, 0x5e3d, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, - 0x900e, 0x0016, 0x080c, 0x5b9a, 0x1118, 0x6000, 0xd0ec, 0x1138, + 0x0ba0, 0x080c, 0x5f38, 0x1904, 0x0ba0, 0x080c, 0x5f89, 0x1904, + 0x0ba0, 0x080c, 0x5f70, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, + 0x900e, 0x0016, 0x080c, 0x5ccd, 0x1118, 0x6000, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b39, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0ba0, 0x0006, 0x2001, 0x0103, 0x2003, - 0x006b, 0x000e, 0x2011, 0x12f7, 0x080c, 0x0f2b, 0x2011, 0x1311, - 0x080c, 0x0f2b, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x70ab, - 0xffff, 0x080c, 0x4d3e, 0x1130, 0x0026, 0x2011, 0x0040, 0x080c, - 0x0ed3, 0x002e, 0x9006, 0x080c, 0x2186, 0x080c, 0x2c12, 0x0118, - 0x080c, 0x441f, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021, - 0x0006, 0x080c, 0x4439, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100, - 0x080c, 0x68db, 0x0150, 0x080c, 0x68b8, 0x7828, 0x0118, 0x9084, - 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x2001, 0x132c, - 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000, 0x080c, 0x8e68, - 0x2011, 0x0000, 0x080c, 0x8e72, 0x080c, 0x807c, 0x080c, 0x8152, + 0x006b, 0x000e, 0x2011, 0x12ea, 0x080c, 0x0f3d, 0x2011, 0x1304, + 0x080c, 0x0f3d, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x70ab, + 0xffff, 0x080c, 0x4e65, 0x1130, 0x0026, 0x2011, 0x0040, 0x080c, + 0x0ee5, 0x002e, 0x9006, 0x080c, 0x21ae, 0x080c, 0x2c91, 0x0118, + 0x080c, 0x4520, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021, + 0x0006, 0x080c, 0x453a, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100, + 0x080c, 0x6b42, 0x0150, 0x080c, 0x6b1f, 0x7828, 0x0118, 0x9084, + 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x2001, 0x131f, + 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000, 0x080c, 0x91f9, + 0x2011, 0x0000, 0x080c, 0x9203, 0x080c, 0x83b3, 0x080c, 0x8489, 0x012e, 0x0005, 0x0016, 0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, - 0x080c, 0x55eb, 0x7940, 0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, + 0x080c, 0x571b, 0x7940, 0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, - 0x0036, 0x0156, 0x7954, 0xd1ac, 0x1904, 0x0c2f, 0x2001, 0x12eb, - 0x2004, 0x9005, 0x1518, 0x080c, 0x259c, 0x1148, 0x2001, 0x0001, - 0x080c, 0x2504, 0x2001, 0x0001, 0x080c, 0x24e7, 0x00b8, 0x080c, - 0x25a4, 0x1138, 0x9006, 0x080c, 0x2504, 0x9006, 0x080c, 0x24e7, - 0x0068, 0x080c, 0x25ac, 0x1d50, 0x2001, 0x12dc, 0x2004, 0xd0fc, - 0x0108, 0x0020, 0x080c, 0x22fe, 0x0804, 0x0d0e, 0x080c, 0x68c9, - 0x0148, 0x080c, 0x68db, 0x1118, 0x080c, 0x6ba2, 0x0050, 0x080c, - 0x68c0, 0x0dd0, 0x080c, 0x6b9d, 0x080c, 0x6b93, 0x080c, 0x67ea, - 0x0058, 0x080c, 0x68b8, 0x0140, 0x2009, 0x00f8, 0x080c, 0x55eb, + 0x0036, 0x0156, 0x7954, 0xd1ac, 0x1904, 0x0c2f, 0x2001, 0x12de, + 0x2004, 0x9005, 0x1518, 0x080c, 0x25b8, 0x1148, 0x2001, 0x0001, + 0x080c, 0x2520, 0x2001, 0x0001, 0x080c, 0x2503, 0x00b8, 0x080c, + 0x25c0, 0x1138, 0x9006, 0x080c, 0x2520, 0x9006, 0x080c, 0x2503, + 0x0068, 0x080c, 0x25c8, 0x1d50, 0x2001, 0x12ce, 0x2004, 0xd0fc, + 0x0108, 0x0020, 0x080c, 0x232e, 0x0804, 0x0d0e, 0x080c, 0x6b30, + 0x0148, 0x080c, 0x6b42, 0x1118, 0x080c, 0x6e21, 0x0050, 0x080c, + 0x6b27, 0x0dd0, 0x080c, 0x6e1c, 0x080c, 0x6e12, 0x080c, 0x6a4b, + 0x0058, 0x080c, 0x6b1f, 0x0140, 0x2009, 0x00f8, 0x080c, 0x571b, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x09c4, 0x7820, 0xd09c, - 0x1138, 0x080c, 0x68b8, 0x0138, 0x7824, 0xd0ac, 0x1904, 0x0d13, - 0x1f04, 0x0c0e, 0x0070, 0x7824, 0x080c, 0x68d2, 0x0118, 0xd0ac, + 0x1138, 0x080c, 0x6b1f, 0x0138, 0x7824, 0xd0ac, 0x1904, 0x0d13, + 0x1f04, 0x0c0e, 0x0070, 0x7824, 0x080c, 0x6b39, 0x0118, 0xd0ac, 0x1904, 0x0d13, 0x9084, 0x1800, 0x0d98, 0x7003, 0x0001, 0x0804, >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Apr 20 20:02:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D7D816A40A; Thu, 20 Apr 2006 20:02:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C47C16A408 for ; Thu, 20 Apr 2006 20:02:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8CB243D79 for ; Thu, 20 Apr 2006 20:02:34 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KK2Yln050691 for ; Thu, 20 Apr 2006 20:02:34 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KK2YgR050676 for perforce@freebsd.org; Thu, 20 Apr 2006 20:02:34 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 20:02:34 GMT Message-Id: <200604202002.k3KK2YgR050676@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95708 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 20:02:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=95708 Change 95708 by imp@imp_hammer on 2006/04/20 20:01:49 Create recovery iic for real. Also, use the default linker.cfg rather than the optimized one (maybe we don't need the optimized one). Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/doit.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#3 (text) ==== @@ -6,7 +6,7 @@ FILES=${P} SRCS=arm_init.s main.c doit.c NO_MAN= -LDFLAGS=-e 0 -T ${.CURDIR}/../boot0/linker.cfg +LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/doit.c#2 (text+ko) ==== @@ -24,14 +24,24 @@ * $FreeBSD: src/sys/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $ */ +#include "lib.h" +#include "at91rm9200.h" +#include "at91rm9200_lowlevel.h" + typedef void fn_t(void); - void doit(void *); void doit(void *addr) { - fn_t *fn = (fn_t *)addr; - fn(); + int sec; + + printf("Writing EEPROM\r\n"); + WriteEEPROM(0, addr, 8192); + sec = GetSeconds(); + while (1) { + printf("Write complete. Press reset\r\n"); + while (sec == GetSeconds()) + continue; + } } - ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#3 (text) ==== @@ -6,7 +6,7 @@ FILES=${P} SRCS=arm_init.s main.c doit.c NO_MAN= -LDFLAGS=-e 0 -T ${.CURDIR}/../boot0/linker.cfg +LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include From owner-p4-projects@FreeBSD.ORG Thu Apr 20 20:04:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D943E16A40D; Thu, 20 Apr 2006 20:04:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B628516A40A for ; Thu, 20 Apr 2006 20:04:44 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4371B43D60 for ; Thu, 20 Apr 2006 20:04:37 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KK4b5l052442 for ; Thu, 20 Apr 2006 20:04:37 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KK4b1j052439 for perforce@freebsd.org; Thu, 20 Apr 2006 20:04:37 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 20:04:37 GMT Message-Id: <200604202004.k3KK4b1j052439@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95709 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 20:04:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=95709 Change 95709 by imp@imp_hammer on 2006/04/20 20:04:32 There's very little code sharing, so go ahead and copy main.c. Using the indirection makes boot0 > 1k. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/doit.c#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#8 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#1 branch Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#8 (text) ==== From owner-p4-projects@FreeBSD.ORG Thu Apr 20 20:09:48 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE2AD16A408; Thu, 20 Apr 2006 20:09:47 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB29916A406 for ; Thu, 20 Apr 2006 20:09:47 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAA2443D6D for ; Thu, 20 Apr 2006 20:09:44 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KK9iPb052685 for ; Thu, 20 Apr 2006 20:09:44 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KK9iSh052682 for perforce@freebsd.org; Thu, 20 Apr 2006 20:09:44 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 20:09:44 GMT Message-Id: <200604202009.k3KK9iSh052682@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95711 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 20:09:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=95711 Change 95711 by imp@imp_hammer on 2006/04/20 20:08:56 revert back to directly calling the loaded program. This gets us back down below 1k (992 bytes). Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#8 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#9 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#8 (text) ==== @@ -2,7 +2,7 @@ P=boot0 FILES=${P} -SRCS=arm_init.s main.c doit.c +SRCS=arm_init.s main.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#9 (text) ==== @@ -28,15 +28,16 @@ #include "lib.h" #include "at91rm9200_lowlevel.h" -extern void doit(void *); +typedef void fn_t(void); int main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ + fn_t *fn = (fn_t *)(SDRAM_BASE + (1 << 20)); /* Load to base + 1MB */ while (xmodem_rx(addr) == -1) continue; - doit(addr); - return (1); + fn(); + return (0); } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 20:47:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B6D9116A405; Thu, 20 Apr 2006 20:47:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79D8616A403 for ; Thu, 20 Apr 2006 20:47:31 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30C9543D48 for ; Thu, 20 Apr 2006 20:47:31 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KKlVNU081557 for ; Thu, 20 Apr 2006 20:47:31 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KKlUma081554 for perforce@freebsd.org; Thu, 20 Apr 2006 20:47:30 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 20:47:30 GMT Message-Id: <200604202047.k3KKlUma081554@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95713 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 20:47:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=95713 Change 95713 by imp@imp_hammer on 2006/04/20 20:46:43 Import one file from Linux. If you enable 'tag' support in this boot loader, then the resulting boot loader may be covered by the GPL. Or not. I'm not a lawyer, so don't enable it! Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/linux/asm/setup.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:02:51 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 06B8316A404; Thu, 20 Apr 2006 21:02:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9767016A401 for ; Thu, 20 Apr 2006 21:02:50 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47F8843D45 for ; Thu, 20 Apr 2006 21:02:50 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KL2oSM091663 for ; Thu, 20 Apr 2006 21:02:50 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KL2ncP091657 for perforce@freebsd.org; Thu, 20 Apr 2006 21:02:49 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 21:02:49 GMT Message-Id: <200604202102.k3KL2ncP091657@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95714 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:02:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=95714 Change 95714 by imp@imp_hammer on 2006/04/20 21:02:10 Make it possible to enable tag support. bootiic is still just under the limit at 8163 bytes (when we cross the 8192 border, we have to add back the reading of the rest of the eeprom into SRAM) Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#10 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#7 (text+ko) ==== @@ -1,5 +1,8 @@ # $FreeBSD$ +.if !target(__at91_boot_Makefile.inc__) +__at91_boot_Makefile.inc__: + CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ -Wall -Waggregate-return -Wcast-align \ @@ -7,8 +10,8 @@ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Werror -CFLAGS+=-DBOOT_TSC -#CFLAGS+=-DBOOT_KB920X +#CFLAGS+=-DBOOT_TSC +CFLAGS+=-DBOOT_KB9202 LIBAT91=${.OBJDIR}/../libat91/libat91.a @@ -21,3 +24,11 @@ CLEANFILES+= ${P} ${P}.out .endif + +.if defined(WITH_TAG_LIST) +MK_TAG_LIST:=yes +.else +MK_TAG_LIST:=no +.endif + +.endif ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#4 (text) ==== @@ -10,4 +10,3 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include - ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#10 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#7 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#6 (text+ko) ==== @@ -1,9 +1,16 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.2 2006/04/13 17:44:05 imp Exp $ +.include "${.CURDIR}/../Makefile.inc" + LIB= at91 INTERNALLIB= SRCS=at91rm9200_lowlevel.c eeprom.c emac.c env_vars.c getc.c loader_prompt.c \ p_string.c putchar.c printf.c xmodem.c NO_MAN= +.if ${MK_TAG_LIST} != "no" +CFLAGS += -I${.CURDIR}/.. -DSUPPORT_TAG_LIST +SRCS+=tag_list.c +.endif + .include ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.c#2 (text+ko) ==== @@ -26,7 +26,9 @@ #define u16 unsigned short #define u8 unsigned char -#include "/usr/src/arm/linux/include/asm/setup.h" +// #include "/usr/src/arm/linux/include/asm/setup.h" +#include +#include "tag_list.h" #define PAGE_SIZE 0x1000 #define MEM_SIZE 0x2000000 From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:03:52 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9EF1916A405; Thu, 20 Apr 2006 21:03:52 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D50116A403 for ; Thu, 20 Apr 2006 21:03:52 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03B5143D48 for ; Thu, 20 Apr 2006 21:03:52 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KL3phY093093 for ; Thu, 20 Apr 2006 21:03:51 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KL3p5R093090 for perforce@freebsd.org; Thu, 20 Apr 2006 21:03:51 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 21:03:51 GMT Message-Id: <200604202103.k3KL3p5R093090@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95715 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:03:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=95715 Change 95715 by imp@imp_hammer on 2006/04/20 21:03:37 Make getc(0) effect a poll. This also happens to save 4 bytes. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#3 (text) ==== @@ -53,10 +53,10 @@ thisSecond = GetSeconds(); seconds = thisSecond + seconds; - while (thisSecond <= seconds) { + do { if ((pUSART->US_CSR & AT91C_US_RXRDY)) return (pUSART->US_RHR & 0xFF); thisSecond = GetSeconds(); - } + } while (thisSecond < seconds); return (-1); } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:10:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BAFB516A404; Thu, 20 Apr 2006 21:10:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55F8616A401 for ; Thu, 20 Apr 2006 21:10:00 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDC4943D45 for ; Thu, 20 Apr 2006 21:09:59 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KL9xav094391 for ; Thu, 20 Apr 2006 21:09:59 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KL9xGd094388 for perforce@freebsd.org; Thu, 20 Apr 2006 21:09:59 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 21:09:59 GMT Message-Id: <200604202109.k3KL9xGd094388@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95716 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:10:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=95716 Change 95716 by millert@millert_g5tower on 2006/04/20 21:09:05 Update to libselinux 1.30 Obtained from: pleblanc Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/ChangeLog#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/LICENSE#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/VERSION#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/Makefile#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/av_inherit.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/av_perm_to_string.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/av_permissions.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/avc.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/class_to_string.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/common_perm_to_string.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/context.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/flask.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/get_context_list.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/get_default_type.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/selinux.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/libselinux.spec#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/Makefile#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_add_callback.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_audit.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_av_stats.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_cache_stats.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_cleanup.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_context_to_sid.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_destroy.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_entry_ref_init.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_has_perm.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_has_perm_noaudit.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_init.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_reset.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_sid_stats.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/avc_sid_to_context.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/checkPasswdAccess.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_free.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_new.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_range_get.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_range_set.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_role_get.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_role_set.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_type_get.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_type_set.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_user_get.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/context_user_set.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/freecon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/freeconary.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/fsetfilecon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/get_default_context.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/get_default_context_with_level.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/get_default_context_with_role.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/get_default_context_with_rolelevel.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/get_ordered_context_list.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/get_ordered_context_list_with_level.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/getcon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/getexeccon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/getfilecon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/getfscreatecon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/getpeercon.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/getpidcon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/getprevcon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/getseuserbyname.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/is_context_customizable.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/is_selinux_enabled.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/lsetfilecon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/manual_user_enter_context.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/matchmediacon.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/matchpathcon.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/query_user_context.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/rpm_execcon.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_check_context.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_commit_booleans.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_compute_av.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_compute_create.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_compute_relabel.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_compute_user.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_get_boolean_active.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_get_boolean_names.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_get_boolean_pending.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_getenforce.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_load_booleans.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_load_policy.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_policyvers.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_set_boolean.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/security_setenforce.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_binary_policy_path.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_booleans_path.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_contexts_path.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_default_context_path.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_failsafe_context_path.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_file_context_path.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_getenforcemode.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_media_context_path.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_policy_root.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_policyroot.3#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_removable_context_path.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/selinux_user_contexts_path.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/set_matchpathcon_printf.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/setcon.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/setexeccon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/setfilecon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/setfscreatecon.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/sidget.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man3/sidput.3#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/avcstat.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/booleans.8#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/getenforce.8#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/getsebool.8#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/matchpathcon.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/selinux.8#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/selinuxenabled.8#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/setenforce.8#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/setsebool.8#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/man/man8/togglesebool.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/Makefile#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/Makefile.old#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/Makefile.orig#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/av_inherit.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/av_perm_to_string.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/avc.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/avc_internal.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/avc_internal.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/avc_sidtab.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/avc_sidtab.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/booleans.c#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/booleans.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/canonicalize_context.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/canonicalize_context.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/checkAccess.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/check_context.c#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/check_context.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/class_to_string.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/common_perm_to_string.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compat_file_path.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_av.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_av.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_create.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_member.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_relabel.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_relabel.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_user.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_user.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/context.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/context.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/context_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/disable.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/disable.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/dso.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/enabled.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/enabled.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/fgetfilecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/fgetfilecon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/file_path_suffixes.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/filecon.c#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/filecon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/freecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/freecon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/freeconary.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/freeconary.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/fsetfilecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/fsetfilecon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_context_list.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_context_list.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_context_list_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_default_type.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_default_type.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_default_type_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_file_contexts.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_file_contexts.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getcon.c#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getcon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getenforce.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getenforce.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getexeccon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getexeccon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getfilecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getfilecon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getfscreatecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getpeercon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getpeercon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getpidcon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getpidcon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getprevcon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getseccontext.c#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getseccontext.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/helpers.c#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/init.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/init.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/is_customizable_type.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/is_customizable_type.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/lgetfilecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/lgetfilecon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/libselinux.a#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/load_migscs.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/load_migscs.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/load_policy.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/load_policy.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/lsetfilecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/lsetfilecon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/matchmediacon.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/matchmediacon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/matchpathcon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/matchpathcon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/policy.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/policyvers.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/policyvers.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/query_user_context.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/query_user_context.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/rpm.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/sebsd.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/security_get_user_contexts.c#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/security_get_user_contexts.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/sedarwin_config.c#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/sedarwin_config.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/selinux.py#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/selinux_config.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/selinux_config.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/selinux_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/selinux_netlink.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/selinuxswig.i#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/selinuxswig_wrap.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setcon.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setcon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setenforce.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setenforce.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setexeccon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setfilecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setfilecon.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setfscreatecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/seusers.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/seusers.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/system.c#5 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/system.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/trans.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/trans.o#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/Makefile#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/avcstat.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/compute_av.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/compute_create.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/compute_member.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/compute_relabel.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/compute_user.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/deftype.c#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/execcon.c#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getcon#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getcon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getconlist.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getenforce.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getenforcemode.c#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getfilecon#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getfilecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getpidcon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getsebool#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getsebool.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getseuser.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/matchpathcon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/mkdircon.c#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/policyvers.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/selinuxconfig.c#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/selinuxdisable.c#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/selinuxenabled.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/setenforce.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/setfilecon#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/setfilecon.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/setsebool#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/setsebool.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/togglesebool#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/togglesebool.c#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/ChangeLog#2 (text+ko) ==== @@ -1,3 +1,359 @@ +1.30 2006-03-14 + * Updated version for release. + +1.29.8 2006-02-27 + * Altered rpm_execcon fallback logic for permissive mode to also + handle case where /selinux/enforce is not available. + +1.29.7 2006-01-20 + * Merged install-pywrap Makefile patch from Joshua Brindle. + +1.29.6 2006-01-18 + * Merged pywrap Makefile patch from Dan Walsh. + +1.29.5 2006-01-11 + * Added getseuser test program. + +1.29.4 2006-01-06 + * Added format attribute to myprintf in matchpathcon.c and + removed obsoleted rootlen variable in init_selinux_config(). + +1.29.3 2006-01-04 + * Merged several fixes and improvements from Ulrich Drepper + (Red Hat), including: + - corrected use of getline + - further calls to __fsetlocking for local files + - use of strdupa and asprintf + - proper handling of dirent in booleans code + - use of -z relro + - several other optimizations + * Merged getpidcon python wrapper from Dan Walsh (Red Hat). + +1.29.2 2005-12-14 + * Merged call to finish_context_translations from Dan Walsh. + This eliminates a memory leak from failing to release memory + allocated by libsetrans. + +1.29.1 2005-12-08 + * Merged patch for swig interfaces from Dan Walsh. + +1.28 2005-12-07 + * Updated version for release. + +1.27.28 2005-12-01 + * Added MATCHPATHCON_VALIDATE flag for set_matchpathcon_flags() and + modified matchpathcon implementation to make context validation/ + canonicalization optional at matchpathcon_init time, deferring it + to a successful matchpathcon by default unless the new flag is set + by the caller. + +1.27.27 2005-12-01 + * Added matchpathcon_init_prefix() interface, and + reworked matchpathcon implementation to support selective + loading of file contexts entries based on prefix matching + between the pathname regex stems and the specified path + prefix (stem must be a prefix of the specified path prefix). + +1.27.26 2005-11-29 + * Merged getsebool patch from Dan Walsh. + +1.27.25 2005-11-29 + * Added -f file_contexts option to matchpathcon util. + Fixed warning message in matchpathcon_init(). + +1.27.24 2005-11-29 + * Merged Makefile python definitions patch from Dan Walsh. + +1.27.23 2005-11-28 + * Merged swigify patch from Dan Walsh. + +1.27.22 2005-11-15 + * Merged make failure in rpm_execcon non-fatal in permissive mode + patch from Ivan Gyurdiev. + +1.27.21 2005-11-08 + * Added MATCHPATHCON_NOTRANS flag for set_matchpathcon_flags() + and modified matchpathcon_init() to skip context translation + if it is set by the caller. + +1.27.20 2005-11-07 + * Added security_canonicalize_context() interface and + set_matchpathcon_canoncon() interface for obtaining + canonical contexts. Changed matchpathcon internals + to obtain canonical contexts by default. Provided + fallback for kernels that lack extended selinuxfs context + interface. + +1.27.19 2005-11-04 + * Merged seusers parser changes from Ivan Gyurdiev. + * Merged setsebool to libsemanage patch from Ivan Gyurdiev. + * Changed seusers parser to reject empty fields. + +1.27.18 2005-11-03 + * Merged seusers empty level handling patch from Jonathan Kim (TCS). + +1.27.17 2005-10-27 + * Changed default entry for seusers to use __default__ to avoid + ambiguity with users named "default". + +1.27.16 2005-10-27 + * Fixed init_selinux_config() handling of missing /etc/selinux/config + or missing SELINUXTYPE= definition. + * Merged selinux_translations_path() patch from Dan Walsh. + +1.27.15 2005-10-25 + * Added hidden_proto/def for get_default_context_with_role. + +1.27.14 2005-10-25 + * Merged selinux_path() and selinux_homedir_context_path() + functions from Joshua Brindle. + +1.27.13 2005-10-19 + * Merged fixes for make DESTDIR= builds from Joshua Brindle. + +1.27.12 2005-10-18 + * Merged get_default_context_with_rolelevel and man pages from + Dan Walsh (Red Hat). + +1.27.11 2005-10-18 + * Updated call to sepol_policydb_to_image for sepol changes. + +1.27.10 2005-10-17 + * Changed getseuserbyname to ignore empty lines and to handle + no matching entry in the same manner as no seusers file. + +1.27.9 2005-10-13 + * Changed selinux_mkload_policy to try downgrading the + latest policy version available to the kernel-supported version. + +1.27.8 2005-10-11 + * Changed selinux_mkload_policy to fall back to the maximum + policy version supported by libsepol if the kernel policy version + falls outside of the supported range. + +1.27.7 2005-10-06 + * Changed getseuserbyname to fall back to the Linux username and + NULL level if seusers config file doesn't exist unless + REQUIRESEUSERS=1 is set in /etc/selinux/config. + * Moved seusers.conf under $SELINUXTYPE and renamed to seusers. + +1.27.6 2005-10-06 + * Added selinux_init_load_policy() function as an even higher level + interface for the initial policy load by /sbin/init. This obsoletes + the load_policy() function in the sysvinit-selinux.patch. + +1.27.5 2005-10-06 + * Added selinux_mkload_policy() function as a higher level interface + for loading policy than the security_load_policy() interface. + +1.27.4 2005-10-05 + * Merged fix for matchpathcon (regcomp error checking) from Johan + Fischer. Also added use of regerror to obtain the error string + for inclusion in the error message. + +1.27.3 2005-10-03 + * Changed getseuserbyname to not require (and ignore if present) + the MLS level in seusers.conf if MLS is disabled, setting *level + to NULL in this case. + +1.27.2 2005-09-30 + * Merged getseuserbyname patch from Dan Walsh. + +1.27.1 2005-09-19 + * Merged STRIP_LEVEL patch for matchpathcon from Dan Walsh. + This allows file_contexts with MLS fields to be processed on + non-MLS-enabled systems with policies that are otherwise + identical (e.g. same type definitions). + * Merged get_ordered_context_list_with_level() function from + Dan Walsh, and added get_default_context_with_level(). + This allows MLS level selection for users other than the + default level. + +1.26 2005-09-06 + * Updated version for release. + +1.25.7 2005-09-01 + * Merged modified form of patch to avoid dlopen/dlclose by + the static libselinux from Dan Walsh. Users of the static libselinux + will not have any context translation by default. + +1.25.6 2005-08-31 + * Added public functions to export context translation to + users of libselinux (selinux_trans_to_raw_context, + selinux_raw_to_trans_context). + +1.25.5 2005-08-26 + * Remove special definition for context_range_set; use + common code. + +1.25.4 2005-08-25 + * Hid translation-related symbols entirely and ensured that + raw functions have hidden definitions for internal use. + * Allowed setting NULL via context_set* functions. + * Allowed whitespace in MLS component of context. + * Changed rpm_execcon to use translated functions to workaround + lack of MLS level on upgraded systems. + +1.25.3 2005-08-23 + * Merged context translation patch, originally by TCS, + with modifications by Dan Walsh (Red Hat). + +1.25.2 2005-08-11 + * Merged several fixes for error handling paths in the + AVC sidtab, matchpathcon, booleans, context, and get_context_list + code from Serge Hallyn (IBM). Bugs found by Coverity. + +1.25.1 2005-08-10 + * Removed setupns; migrated to pam. + * Merged patches to rename checkPasswdAccess() from Joshua Brindle. + Original symbol is temporarily retained for compatibility until + all callers are updated. + +1.24 2005-06-20 + * Updated version for release. + +1.23.12 2005-06-13 + * Merged security_setupns() from Chad Sellers. + +1.23.11 2005-05-19 + * Merged avcstat and selinux man page from Dan Walsh. + * Changed security_load_booleans to process booleans.local + even if booleans file doesn't exist. + +1.23.10 2005-04-29 + * Merged set_selinuxmnt patch from Bill Nottingham (Red Hat). + +1.23.9 2005-04-26 + * Rewrote get_ordered_context_list and helpers, including + changing logic to allow variable MLS fields. + +1.23.8 2005-04-25 + * Merged matchpathcon and man page patch from Dan Walsh. + +1.23.7 2005-04-12 + * Changed boolean functions to return -1 with errno ENOENT + rather than assert on a NULL selinux_mnt (i.e. selinuxfs not + mounted). + +1.23.6 2005-04-08 + * Fixed bug in matchpathcon_filespec_destroy. + +1.23.5 2005-04-05 + * Fixed bug in rpm_execcon error handling path. + +1.23.4 2005-04-04 + * Merged fix for set_matchpathcon* functions from Andreas Steinmetz. + * Merged fix for getconlist utility from Andreas Steinmetz. + +1.23.3 2005-03-29 + * Merged security_set_boolean_list patch from Dan Walsh. + This introduces booleans.local support for setsebool. + +1.23.2 2005-03-17 + * Merged destructors patch from Tomas Mraz. + +1.23.1 2005-03-16 + * Added set_matchpathcon_flags() function for setting flags + controlling operation of matchpathcon. MATCHPATHCON_BASEONLY + means only process the base file_contexts file, not + file_contexts.homedirs or file_contexts.local, and is for use by + setfiles -c. + * Updated matchpathcon.3 man page. + +1.22 2005-03-09 + * Updated version for release. + +1.21.13 2005-03-08 + * Fixed bug in matchpathcon_filespec_add() - failure to clear fl_head. + +1.21.12 2005-03-01 + * Changed matchpathcon_common to ignore any non-format bits in the mode. + +1.21.11 2005-02-22 + * Merged several fixes from Ulrich Drepper. + +1.21.10 2005-02-17 + * Merged matchpathcon patch for file_contexts.homedir from Dan Walsh. + * Added selinux_users_path() for path to directory containing + system.users and local.users. + +1.21.9 2005-02-09 + * Changed relabel Makefile target to use restorecon. + +1.21.8 2005-02-07 + * Regenerated av_permissions.h. + +1.21.7 2005-02-01 + * Modified avc_dump_av to explicitly check for any permissions that + cannot be mapped to string names and display them as a hex value. + +1.21.6 2005-01-31 + * Regenerated av_permissions.h. + +1.21.5 2005-01-28 + * Generalized matchpathcon internals, exported more interfaces, + and moved additional code from setfiles into libselinux so that + setfiles can directly use matchpathcon. + +1.21.4 2005-01-27 + * Prevent overflow of spec array in matchpathcon. + +1.21.3 2005-01-26 + * Fixed several uses of internal functions to avoid relocations. + * Changed rpm_execcon to check is_selinux_enabled() and fallback to + a regular execve if not enabled (or unable to determine due to a lack + of /proc, e.g. chroot'd environment). + + +1.21.2 2005-01-24 + * Merged minor fix for avcstat from Dan Walsh. + +1.21.1 2005-01-19 + * Merged patch from Dan Walsh, including: + - new is_context_customizable function + - changed matchpathcon to also use file_contexts.local if present + - man page cleanups + +1.20 2005-01-04 + * Changed matchpathcon to return -1 with errno ENOENT for + <> entries, and also for an empty file_contexts configuration. + * Removed some trivial utils that were not useful or redundant. + * Changed BINDIR default to /usr/sbin to match change in Fedora. + * Added security_compute_member. + * Added man page for setcon. + * Merged more man pages from Dan Walsh. + * Merged avcstat from James Morris. + * Merged build fix for mips from Manoj Srivastava. + * Merged C++ support from John Ramsdell of MITRE. + * Merged setcon() function from Darrel Goeddel of TCS. + * Merged setsebool/togglesebool enhancement from Steve Grubb. + * Merged cleanup patches from Steve Grubb. + +1.18 2004-11-01 + * Merged cleanup patches from Steve Grubb. + * Added rpm_execcon. + * Merged setenforce and removable context patch from Dan Walsh. + * Merged build fix for alpha from Ulrich Drepper. + * Removed copyright/license from selinux_netlink.h - definitions only. + * Merged matchmediacon from Dan Walsh. + * Regenerated headers for new nscd permissions. + * Added get_default_context_with_role. + * Added set_matchpathcon_printf. + * Reworked av_inherit.h to allow easier re-use by kernel. + * Changed avc_has_perm_noaudit to not fail on netlink errors. + * Changed avc netlink code to check pid based on patch by Steve Grubb. + * Merged second optimization patch from Ulrich Drepper. + * Changed matchpathcon to skip invalid file_contexts entries. + * Made string tables private to libselinux. + * Merged strcat->stpcpy patch from Ulrich Drepper. + * Merged matchpathcon man page from Dan Walsh. + * Merged patch to eliminate PLTs for local syms from Ulrich Drepper. + * Autobind netlink socket. + * Dropped compatibility code from security_compute_user. + * Merged fix for context_range_set from Chad Hanson. + * Merged allocation failure checking patch from Chad Hanson. + * Merged avc netlink error message patch from Colin Walters. + 1.16 2004-08-19 * Regenerated headers for nscd class. * Merged man pages from Dan Walsh. ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/LICENSE#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/Makefile#2 (text+ko) ==== @@ -2,13 +2,20 @@ $(MAKE) -C src $(MAKE) -C utils +pywrap: + $(MAKE) -C src pywrap + install: $(MAKE) -C include install $(MAKE) -C src install $(MAKE) -C utils install $(MAKE) -C man install -relabel: +install-pywrap: + $(MAKE) -C src install-pywrap + +relabel: + $(MAKE) -C src relabel clean: $(MAKE) -C src clean ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/VERSION#2 (text+ko) ==== @@ -1,1 +1,1 @@ -1.16 +1.30 ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/Makefile#3 (text+ko) ==== @@ -1,8 +1,8 @@ include ../../../Makeconfig # Installation directories. -PREFIX = $(DESTDIR)/usr -INCDIR = $(PREFIX)/include/selinux +PREFIX ?= $(DESTDIR)/usr +INCDIR ?= $(PREFIX)/include/selinux install: test -d $(INCDIR) || install -m 755 -d $(INCDIR) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/av_permissions.h#2 (text+ko) ==== @@ -1,6 +1,4 @@ /* This file is automatically generated. Do not edit. */ -/* FLASK */ - #define COMMON_FILE__IOCTL 0x00000001UL #define COMMON_FILE__READ 0x00000002UL #define COMMON_FILE__WRITE 0x00000004UL @@ -107,6 +105,7 @@ #define FILE__EXECUTE_NO_TRANS 0x00020000UL #define FILE__ENTRYPOINT 0x00040000UL +#define FILE__EXECMOD 0x00080000UL #define LNK_FILE__IOCTL 0x00000001UL #define LNK_FILE__READ 0x00000002UL @@ -144,6 +143,10 @@ #define CHR_FILE__QUOTAON 0x00008000UL #define CHR_FILE__MOUNTON 0x00010000UL +#define CHR_FILE__EXECUTE_NO_TRANS 0x00020000UL +#define CHR_FILE__ENTRYPOINT 0x00040000UL +#define CHR_FILE__EXECMOD 0x00080000UL + #define BLK_FILE__IOCTL 0x00000001UL #define BLK_FILE__READ 0x00000002UL #define BLK_FILE__WRITE 0x00000004UL @@ -458,6 +461,9 @@ #define PROCESS__SIGINH 0x00100000UL #define PROCESS__SETRLIMIT 0x00200000UL #define PROCESS__RLIMITINH 0x00400000UL +#define PROCESS__DYNTRANSITION 0x00800000UL +#define PROCESS__SETCURRENT 0x01000000UL +#define PROCESS__EXECMEM 0x02000000UL #define IPC__CREATE 0x00000001UL #define IPC__DESTROY 0x00000002UL @@ -515,6 +521,7 @@ #define SECURITY__COMPUTE_USER 0x00000040UL #define SECURITY__SETENFORCE 0x00000080UL #define SECURITY__SETBOOL 0x00000100UL +#define SECURITY__SETSECPARAM 0x00000200UL #define SYSTEM__IPC_INFO 0x00000001UL #define SYSTEM__SYSLOG_READ 0x00000002UL @@ -550,6 +557,8 @@ #define CAPABILITY__SYS_TTY_CONFIG 0x04000000UL #define CAPABILITY__MKNOD 0x08000000UL #define CAPABILITY__LEASE 0x10000000UL +#define CAPABILITY__AUDIT_WRITE 0x20000000UL +#define CAPABILITY__AUDIT_CONTROL 0x40000000UL #define PASSWD__PASSWD 0x00000001UL #define PASSWD__CHFN 0x00000002UL @@ -887,6 +896,10 @@ #define NSCD__GETHOST 0x00000004UL #define NSCD__GETSTAT 0x00000008UL #define NSCD__ADMIN 0x00000010UL +#define NSCD__SHMEMPWD 0x00000020UL +#define NSCD__SHMEMGRP 0x00000040UL +#define NSCD__SHMEMHOST 0x00000080UL +#define ASSOCIATION__SENDTO 0x00000001UL +#define ASSOCIATION__RECVFROM 0x00000002UL -/* FLASK */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/avc.h#2 (text+ko) ==== @@ -11,6 +11,10 @@ #include #include +#ifdef __cplusplus +extern "C" +{ +#endif /* * SID format and operations @@ -362,4 +366,8 @@ */ void avc_sid_stats(void); +#ifdef __cplusplus +} +#endif + #endif /* _SELINUX_AVC_H_ */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/context.h#2 (text+ko) ==== @@ -1,6 +1,11 @@ #ifndef _SELINUX_CONTEXT_H_ #define _SELINUX_CONTEXT_H_ +#ifdef __cplusplus +extern "C" +{ +#endif + /* * Functions to deal with security contexts in user space. */ @@ -40,4 +45,8 @@ extern int context_role_set(context_t,const char*); extern int context_user_set(context_t,const char*); +#ifdef __cplusplus +} +#endif + #endif ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/flask.h#2 (text+ko) ==== @@ -58,6 +58,7 @@ #define SECCLASS_NETLINK_DNRT_SOCKET 51 #define SECCLASS_DBUS 52 #define SECCLASS_NSCD 53 +#define SECCLASS_ASSOCIATION 54 /* * Security identifier indices for initial entities ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/get_context_list.h#2 (text+ko) ==== @@ -3,6 +3,11 @@ #include +#ifdef __cplusplus +extern "C" +{ +#endif + #define SELINUX_DEFAULTUSER "user_u" /* Get an ordered list of authorized security contexts for a user session @@ -16,6 +21,13 @@ security_context_t fromcon, security_context_t **list); +/* As above, but use the provided MLS level rather than the + default level for the user. */ +int get_ordered_context_list_with_level (const char *user, + const char *level, + security_context_t fromcon, + security_context_t **list); + /* Get the default security context for a user session for 'user' spawned by 'fromcon' and set *newcon to refer to it. The context will be one of those authorized by the policy, but the selection @@ -27,6 +39,30 @@ security_context_t fromcon, security_context_t *newcon); +/* As above, but use the provided MLS level rather than the + default level for the user. */ +int get_default_context_with_level(const char *user, + const char *level, + security_context_t fromcon, + security_context_t *newcon); + +/* Same as get_default_context, but only return a context + that has the specified role. If no reachable context exists + for the user with that role, then return -1. */ +int get_default_context_with_role(const char* user, + const char *role, + security_context_t fromcon, + security_context_t *newcon); + +/* Same as get_default_context, but only return a context + that has the specified role and level. If no reachable context exists + for the user with that role, then return -1. */ +int get_default_context_with_rolelevel(const char* user, + const char *level, + const char *role, + security_context_t fromcon, + security_context_t *newcon); + /* Given a list of authorized security contexts for the user, query the user to select one and set *newcon to refer to it. Caller must free via freecon. @@ -41,4 +77,8 @@ extern int manual_user_enter_context(const char *user, security_context_t *newcon); +#ifdef __cplusplus +} +#endif + #endif ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/get_default_type.h#2 (text+ko) ==== @@ -5,12 +5,21 @@ #ifndef _SELINUX_GET_DEFAULT_TYPE_H_ #define _SELINUX_GET_DEFAULT_TYPE_H_ +#ifdef __cplusplus +extern "C" +{ +#endif + /* Return path to default type file. */ -char *selinux_default_type_path(void); +const char *selinux_default_type_path(void); /* Get the default type (domain) for 'role' and set 'type' to refer to it. Caller must free via free(). Return 0 on success or -1 otherwise. */ int get_default_type (const char* role, char** type); +#ifdef __cplusplus +} +#endif + #endif /* ifndef _GET_DEFAULT_TYPE_H_ */ ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/include/selinux/selinux.h#2 (text+ko) ==== @@ -2,17 +2,20 @@ #define _SELINUX_H_ #include +#include -#define _LINUX_FLASK_TYPES_H_ -typedef unsigned short security_class_t; -typedef unsigned int access_vector_t; -typedef char *security_context_t; +#ifdef __cplusplus +extern "C" +{ +#endif /* Return 1 if we are running on a SELinux kernel, or 0 if not or -1 if we get an error. */ extern int is_selinux_enabled(void); /* Return 1 if we are running on a SELinux MLS kernel, or 0 otherwise. */ extern int is_selinux_mls_enabled(void); +typedef char* security_context_t; + /* Free the memory allocated for a context by any of the below get* calls. */ extern void freecon(security_context_t con); @@ -24,32 +27,55 @@ /* Get current context, and set *con to refer to it. Caller must free via freecon. */ extern int getcon(security_context_t *con); +extern int getcon_raw(security_context_t *con); +/* Set the current security context to con. + Note that use of this function requires that the entire application + be trusted to maintain any desired separation between the old and new + security contexts, unlike exec-based transitions performed via setexeccon. + When possible, decompose your application and use setexeccon()+execve() + instead. Note that the application may lose access to its open descriptors + as a result of a setcon() unless policy allows it to use descriptors opened + by the old context. */ +extern int setcon(security_context_t con); +extern int setcon_raw(security_context_t con); + /* Get context of process identified by pid, and - set *con to refer to it. Caller must free via freecon. */ -extern int getpidcon(pid_t pid, security_context_t *con); + set *con to refer to it. Caller must free via freecon. + This has not been ported to SEBSD yet. */ +//extern int getpidcon(pid_t pid, security_context_t *con); +//extern int getpidcon_raw(pid_t pid, security_context_t *con); /* Get previous context (prior to last exec), and set *con to refer to it. - Caller must free via freecon. */ -extern int getprevcon(security_context_t *con); + Caller must free via freecon. + This has not been ported to SEBSD yet.*/ +//extern int getprevcon(security_context_t *con); +//extern int getprevcon_raw(security_context_t *con); /* Get exec context, and set *con to refer to it. Sets *con to NULL if no exec context has been set, i.e. using default. If non-NULL, caller must free via freecon. */ extern int getexeccon(security_context_t *con); +extern int getexeccon_raw(security_context_t *con); /* Set exec security context for the next execve. - Call with NULL if you want to reset to the default. */ -extern int setexeccon(security_context_t con); + Call with NULL if you want to reset to the default. + This is not yet supported by SEBSD. */ +//extern int setexeccon(security_context_t con); +//extern int setexeccon_raw(security_context_t con); /* Get fscreate context, and set *con to refer to it. Sets *con to NULL if no fs create context has been set, i.e. using default. - If non-NULL, caller must free via freecon. */ -extern int getfscreatecon(security_context_t *con); + If non-NULL, caller must free via freecon. + This has not been ported to SEBSD yet. */ +//extern int getfscreatecon(security_context_t *con); +//extern int getfscreatecon_raw(security_context_t *con); /* Set the fscreate security context for subsequent file creations. - Call with NULL if you want to reset to the default. */ -extern int setfscreatecon(security_context_t context); + Call with NULL if you want to reset to the default. + This has not been ported to SEBSD yet. */ +//extern int setfscreatecon(security_context_t context); +//extern int setfscreatecon_raw(security_context_t context); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:17:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E17C016A405; Thu, 20 Apr 2006 21:17:09 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A1FE16A401 for ; Thu, 20 Apr 2006 21:17:09 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 426E743D45 for ; Thu, 20 Apr 2006 21:17:09 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLH9na000283 for ; Thu, 20 Apr 2006 21:17:09 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLH8Me000277 for perforce@freebsd.org; Thu, 20 Apr 2006 21:17:08 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 21:17:08 GMT Message-Id: <200604202117.k3KLH8Me000277@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95717 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:17:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=95717 Change 95717 by jb@jb_freebsd2 on 2006/04/20 21:16:11 Remove these in preparation for a different way of laying out the files. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_badattr.c#2 delete .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_badname.c#2 delete .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unregister.c#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:23:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5C76116A404; Thu, 20 Apr 2006 21:23:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0855416A402 for ; Thu, 20 Apr 2006 21:23:18 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABD0143D46 for ; Thu, 20 Apr 2006 21:23:17 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLNHhK004919 for ; Thu, 20 Apr 2006 21:23:17 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLNHjh004916 for perforce@freebsd.org; Thu, 20 Apr 2006 21:23:17 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 21:23:17 GMT Message-Id: <200604202123.k3KLNHjh004916@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95719 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:23:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=95719 Change 95719 by jb@jb_freebsd2 on 2006/04/20 21:23:14 Split Sun's dtrace.c file containing 14589 lines into separate files by function group. Sun had these arranged neatly and documented in their dtrace.c, but it's just too big for me to handle. Porting this stuff is like going to war. Right now I need to divide and conquer. I've deliberately split the operating system-specific driver functions out so that I can just leave out the Solaris design an include FreeBSD-suitable ones instead. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_actdesc.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_action.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_aggregate.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_anon.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_buffer.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_context.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dif.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_difo.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dof.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dynvar.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ecb.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_enabling.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_format.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hash.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_helper.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_helpprov.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hook.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_match.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_meta.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_predicate.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_priv.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probe.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probekey.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probemgmt.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_speculation.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_state.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_util.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:24:20 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0AB4616A401; Thu, 20 Apr 2006 21:24:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C445416A403 for ; Thu, 20 Apr 2006 21:24:19 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 823A943D49 for ; Thu, 20 Apr 2006 21:24:19 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLOJLl005093 for ; Thu, 20 Apr 2006 21:24:19 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLOJ05005090 for perforce@freebsd.org; Thu, 20 Apr 2006 21:24:19 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 21:24:19 GMT Message-Id: <200604202124.k3KLOJ05005090@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95720 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:24:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=95720 Change 95720 by millert@millert_g5tower on 2006/04/20 21:23:48 Remove object files mistakenly submitted Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/booleans.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/canonicalize_context.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/check_context.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_av.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_relabel.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/compute_user.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/context.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/disable.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/enabled.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/fgetfilecon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/filecon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/freecon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/freeconary.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/fsetfilecon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_context_list.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_default_type.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/get_file_contexts.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getcon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getenforce.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getexeccon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getfilecon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getpeercon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getpidcon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/getseccontext.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/init.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/is_customizable_type.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/lgetfilecon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/libselinux.a#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/load_migscs.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/load_policy.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/lsetfilecon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/matchmediacon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/matchpathcon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/policyvers.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/query_user_context.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/security_get_user_contexts.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/sedarwin_config.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/selinux_config.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setcon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setenforce.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/setfilecon.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/seusers.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/system.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/src/trans.o#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getcon#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getfilecon#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/getsebool#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/setfilecon#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/setsebool#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libselinux/utils/togglesebool#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:26:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6784016A40B; Thu, 20 Apr 2006 21:26:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 136ED16A402 for ; Thu, 20 Apr 2006 21:26:23 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A267043D46 for ; Thu, 20 Apr 2006 21:26:22 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLQMsG005621 for ; Thu, 20 Apr 2006 21:26:22 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLQMQI005610 for perforce@freebsd.org; Thu, 20 Apr 2006 21:26:22 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 21:26:22 GMT Message-Id: <200604202126.k3KLQMQI005610@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95721 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:26:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=95721 Change 95721 by millert@millert_g5tower on 2006/04/20 21:25:44 Update to libsepol 1.12 Obtained from: pleblance Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/COPYING#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/ChangeLog#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/VERSION#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/avtab.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/boolean_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/booleans.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/conditional.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/constraint.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/context.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/context_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/debug.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/ebitmap.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/flask.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/flask_types.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/handle.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/hashtab.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/iface_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/interfaces.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/mls.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/mls_types.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/module.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/node_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/nodes.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/avrule_block.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/avtab.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/conditional.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/constraint.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/context.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/ebitmap.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/expand.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/flask.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/flask_types.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/hashtab.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/hierarchy.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/link.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/mls_types.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/module.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/policydb.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/services.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/sidtab.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb/symtab.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/port_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/ports.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/roles.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/sepol.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/services.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/sidtab.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/symtab.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/user_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/users.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sys/endian.h#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/man/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/man/man3/sepol_check_context.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/man/man3/sepol_genbools.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/man/man3/sepol_genusers.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/man/man8/chkcon.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/man/man8/genpolbools.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/man/man8/genpolusers.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/Makefile#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/assertion.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/av_permissions.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/avrule_block.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/avtab.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/boolean_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/boolean_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/booleans.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/conditional.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/constraint.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/context.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/context.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/context_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/context_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/debug.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/debug.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/dso.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/ebitmap.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/expand.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/genbools.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/genusers.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/handle.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/handle.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/hashtab.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/hierarchy.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/iface_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/iface_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/interfaces.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/libsepol.map#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/link.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/mls.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/mls.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/module.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/module_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/node_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/node_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/nodes.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/policydb.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/policydb_convert.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/policydb_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/policydb_public.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/port_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/port_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/ports.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/private.h#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/roles.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/services.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/sidtab.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/symtab.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/user_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/user_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/users.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/util.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/write.c#2 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/utils/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/utils/chkcon.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/utils/genpolbools.c#2 delete Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/context.h#2 (text+ko) ==== @@ -1,131 +1,31 @@ +#ifndef _SEPOL_CONTEXT_H_ +#define _SEPOL_CONTEXT_H_ -/* Author : Stephen Smalley, */ +#include +#include +#include -/* FLASK */ +/* -- Deprecated -- */ -/* - * A security context is a set of security attributes - * associated with each subject and object controlled - * by the security policy. Security contexts are - * externally represented as variable-length strings - * that can be interpreted by a user or application - * with an understanding of the security policy. - * Internally, the security server uses a simple - * structure. This structure is private to the - * security server and can be changed without affecting - * clients of the security server. - */ +extern int sepol_check_context( + const char *context); -#ifndef _CONTEXT_H_ -#define _CONTEXT_H_ +/* -- End deprecated -- */ -#include +extern int sepol_context_check( + sepol_handle_t* handle, + const sepol_policydb_t* policydb, + const sepol_context_t* context); -#include +extern int sepol_mls_contains( + sepol_handle_t* handle, + const sepol_policydb_t* policydb, + const char* mls1, + const char* mls2, + int* response); -/* - * A security context consists of an authenticated user - * identity, a role, a type and a MLS range. - */ -typedef struct context_struct { - uint32_t user; - uint32_t role; - uint32_t type; -#ifdef CONFIG_SECURITY_SELINUX_MLS - mls_range_t range; -#endif -} context_struct_t; - - -#ifdef CONFIG_SECURITY_SELINUX_MLS - -static inline void mls_context_init(context_struct_t * c) -{ - memset(&c->range, 0, sizeof(c->range)); -} - -static inline int mls_context_cpy(context_struct_t * dst, - context_struct_t * src) -{ - int rc; - - dst->range.level[0].sens = src->range.level[0].sens; - rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[0].cat); - if (rc) - goto out; - - dst->range.level[1].sens = src->range.level[1].sens; - rc = ebitmap_cpy(&dst->range.level[1].cat, &src->range.level[1].cat); - if (rc) - ebitmap_destroy(&dst->range.level[0].cat); -out: - return rc; -} - -static inline int mls_context_cmp(context_struct_t * c1, - context_struct_t * c2) -{ - return ((c1->range.level[0].sens == c2->range.level[0].sens) && - ebitmap_cmp(&c1->range.level[0].cat,&c2->range.level[0].cat) && - (c1->range.level[1].sens == c2->range.level[1].sens) && - ebitmap_cmp(&c1->range.level[1].cat,&c2->range.level[1].cat)); -} - -static inline void mls_context_destroy(context_struct_t * c) -{ - ebitmap_destroy(&c->range.level[0].cat); - ebitmap_destroy(&c->range.level[1].cat); - mls_context_init(c); -} - -#else - -static inline void mls_context_init(context_struct_t *c __attribute__ ((unused))) -{ } - -static inline int mls_context_cpy(context_struct_t * dst __attribute__ ((unused)), - context_struct_t * src __attribute__ ((unused))) -{ return 0; } - -static inline int mls_context_cmp(context_struct_t * c1 __attribute__ ((unused)), - context_struct_t * c2 __attribute__ ((unused))) -{ return 1; } - -static inline void mls_context_destroy(context_struct_t * c __attribute__ ((unused))) -{ } - +extern int sepol_mls_check( + sepol_handle_t* handle, + const sepol_policydb_t* policydb, + const char* mls); #endif - -static inline void context_init(context_struct_t * c) -{ - memset(c, 0, sizeof(*c)); -} - -static inline int context_cpy(context_struct_t * dst, - context_struct_t * src) -{ - dst->user = src->user; - dst->role = src->role; - dst->type = src->type; - return mls_context_cpy(dst, src); -} - -static inline void context_destroy(context_struct_t * c) -{ - c->user = c->role = c->type = 0; - mls_context_destroy(c); -} - -static inline int context_cmp(context_struct_t * c1, - context_struct_t * c2) -{ - return ((c1->user == c2->user) && - (c1->role == c2->role) && - (c1->type == c2->type) && - mls_context_cmp(c1, c2)); -} - -#endif /* _CONTEXT_H_ */ - -/* FLASK */ - ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/policydb.h#2 (text+ko) ==== @@ -1,327 +1,130 @@ +#ifndef _SEPOL_POLICYDB_H_ +#define _SEPOL_POLICYDB_H_ -/* Author : Stephen Smalley, */ +#include +#include -/* Updated: Frank Mayer and Karl MacMillan - * - * Added conditional policy language extensions - * - * Copyright (C) 2003 - 2004 Tresys Technology, LLC - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2. - */ +#include -/* FLASK */ +struct sepol_policy_file; +typedef struct sepol_policy_file sepol_policy_file_t; -/* - * A policy database (policydb) specifies the - * configuration data for the security policy. - */ +struct sepol_policydb; +typedef struct sepol_policydb sepol_policydb_t; -#ifndef _POLICYDB_H_ -#define _POLICYDB_H_ +/* Policy file public interfaces. */ -#include +/* Create and free memory associated with a policy file. */ +extern int sepol_policy_file_create(sepol_policy_file_t **pf); +extern void sepol_policy_file_free(sepol_policy_file_t *pf); -#include -#include -#include -#include -#include -#include +/* + * Set the policy file to represent a binary policy memory image. + * Subsequent operations using the policy file will read and write + * the image located at the specified address with the specified length. + * If 'len' is 0, then merely compute the necessary length upon + * subsequent policydb write operations in order to determine the + * necessary buffer size to allocate. + */ +extern void sepol_policy_file_set_mem(sepol_policy_file_t *pf, + char *data, + size_t len); /* - * A datum type is defined for each kind of symbol - * in the configuration data: individual permissions, - * common prefixes for access vectors, classes, - * users, roles, types, sensitivities, categories, etc. + * Get the size of the buffer needed to store a policydb write + * previously done on this policy file. */ +extern int sepol_policy_file_get_len(sepol_policy_file_t *pf, + size_t *len); -/* Permission attributes */ -typedef struct perm_datum { - uint32_t value; /* permission bit + 1 */ -#ifdef CONFIG_SECURITY_SELINUX_MLS -#define MLS_BASE_READ 1 /* MLS base permission `read' */ -#define MLS_BASE_WRITE 2 /* MLS base permission `write' */ -#define MLS_BASE_READBY 4 /* MLS base permission `readby' */ -#define MLS_BASE_WRITEBY 8 /* MLS base permission `writeby' */ - uint32_t base_perms; /* MLS base permission mask */ -#endif -} perm_datum_t; +/* + * Set the policy file to represent a FILE. + * Subsequent operations using the policy file will read and write + * to the FILE. + */ +extern void sepol_policy_file_set_fp(sepol_policy_file_t *pf, + FILE *fp); -/* Attributes of a common prefix for access vectors */ -typedef struct common_datum { - uint32_t value; /* internal common value */ - symtab_t permissions; /* common permissions */ -} common_datum_t; +/* + * Associate a handle with a policy file, for use in + * error reporting from subsequent calls that take the + * policy file as an argument. + */ +extern void sepol_policy_file_set_handle(sepol_policy_file_t *pf, + sepol_handle_t *handle); -/* Class attributes */ -typedef struct class_datum { - uint32_t value; /* class value */ - char *comkey; /* common name */ - common_datum_t *comdatum; /* common datum */ - symtab_t permissions; /* class-specific permission symbol table */ - constraint_node_t *constraints; /* constraints on class permissions */ -#ifdef CONFIG_SECURITY_SELINUX_MLS - mls_perms_t mlsperms; /* MLS base permission masks */ -#endif -} class_datum_t; +/* Policydb public interfaces. */ -/* Role attributes */ -typedef struct role_datum { - uint32_t value; /* internal role value */ - ebitmap_t dominates; /* set of roles dominated by this role */ - ebitmap_t types; /* set of authorized types for role */ -} role_datum_t; +/* Create and free memory associated with a policydb. */ +extern int sepol_policydb_create(sepol_policydb_t **p); +extern void sepol_policydb_free(sepol_policydb_t *p); -typedef struct role_trans { - uint32_t role; /* current role */ - uint32_t type; /* program executable type */ - uint32_t new_role; /* new role */ - struct role_trans *next; -} role_trans_t; +/* Legal types of policies that the policydb can represent. */ +#define SEPOL_POLICY_KERN 0 +#define SEPOL_POLICY_BASE 1 +#define SEPOL_POLICY_MOD 2 -typedef struct role_allow { - uint32_t role; /* current role */ - uint32_t new_role; /* new role */ - struct role_allow *next; -} role_allow_t; +/* + * Range of policy versions for the kernel policy type supported + * by this library. + */ +extern int sepol_policy_kern_vers_min(void); +extern int sepol_policy_kern_vers_max(void); -/* Type attributes */ -typedef struct type_datum { - uint32_t value; /* internal type value */ - unsigned char primary; /* primary name? */ -#ifndef __KERNEL__ - unsigned char isattr; /* is this a type attribute? */ - ebitmap_t types; /* types with this attribute */ -#endif -} type_datum_t; +/* + * Set the policy type as specified, and automatically initialize the + * policy version accordingly to the maximum version supported for the + * policy type. + * Returns -1 if the policy type is not legal. + */ +extern int sepol_policydb_set_typevers(sepol_policydb_t *p, unsigned int type); -/* User attributes */ -typedef struct user_datum { - uint32_t value; /* internal user value */ - ebitmap_t roles; /* set of authorized roles for user */ -#ifdef CONFIG_SECURITY_SELINUX_MLS - mls_range_list_t *ranges; /* list of authorized MLS ranges for user */ -#endif - unsigned defined; -} user_datum_t; +/* + * Set the policy version to a different value. + * Returns -1 if the policy version is not in the supported range for + * the (previously set) policy type. + */ +extern int sepol_policydb_set_vers(sepol_policydb_t *p, unsigned int vers); +/* + * Read a policydb from a policy file. + * This automatically sets the type and version based on the + * image contents. + */ +extern int sepol_policydb_read(sepol_policydb_t *p, + sepol_policy_file_t *pf); -#ifdef CONFIG_SECURITY_SELINUX_MLS -/* Sensitivity attributes */ -typedef struct level_datum { - mls_level_t *level; /* sensitivity and associated categories */ - unsigned char isalias; /* is this sensitivity an alias for another? */ -} level_datum_t; +/* + * Write a policydb to a policy file. + * The generated image will be in the binary format corresponding + * to the policy version associated with the policydb. + */ +extern int sepol_policydb_write(sepol_policydb_t *p, + sepol_policy_file_t *pf); -/* Category attributes */ -typedef struct cat_datum { - uint32_t value; /* internal category bit + 1 */ - unsigned char isalias; /* is this category an alias for another? */ -} cat_datum_t; -#endif - -/* Boolean data type */ -typedef struct cond_bool_datum { - uint32_t value; /* internal type value */ - int state; -} cond_bool_datum_t; - -struct cond_node; - -typedef struct cond_node cond_list_t; - /* - * The configuration data includes security contexts for - * initial SIDs, unlabeled file systems, TCP and UDP port numbers, - * network interfaces, and nodes. This structure stores the - * relevant data for one such entry. Entries of the same kind - * (e.g. all initial SIDs) are linked together into a list. + * Extract a policydb from a binary policy memory image. + * This is equivalent to sepol_policydb_read with a policy file + * set to refer to memory. */ -typedef struct ocontext { - union { - char *name; /* name of initial SID, fs, netif, fstype, path */ - struct { - uint8_t protocol; - uint16_t low_port; - uint16_t high_port; - } port; /* TCP or UDP port information */ - struct { - uint32_t addr; - uint32_t mask; - } node; /* node information */ - struct { - uint32_t addr[4]; - uint32_t mask[4]; - } node6; /* IPv6 node information */ - } u; - union { - uint32_t sclass; /* security class for genfs */ - uint32_t behavior; /* labeling behavior for fs_use */ - } v; - context_struct_t context[2]; /* security context(s) */ - security_id_t sid[2]; /* SID(s) */ - struct ocontext *next; -} ocontext_t; - -typedef struct genfs { - char *fstype; - struct ocontext *head; - struct genfs *next; -} genfs_t; - -/* symbol table array indices */ -#define SYM_COMMONS 0 -#define SYM_CLASSES 1 -#define SYM_ROLES 2 -#define SYM_TYPES 3 -#define SYM_USERS 4 -#ifdef CONFIG_SECURITY_SELINUX_MLS -#define SYM_LEVELS 5 -#define SYM_CATS 6 -#define SYM_BOOLS 7 -#define SYM_NUM 8 -#else -#define SYM_BOOLS 5 -#define SYM_NUM 6 -#endif - -/* object context array indices */ -#define OCON_ISID 0 /* initial SIDs */ -#define OCON_FS 1 /* unlabeled file systems */ -#define OCON_PORT 2 /* TCP and UDP port numbers */ -#define OCON_NETIF 3 /* network interfaces */ -#define OCON_NODE 4 /* nodes */ -#define OCON_FSUSE 5 /* fs_use */ -#define OCON_NODE6 6 /* IPv6 nodes */ -#define OCON_NUM 7 - -/* The policy database */ -typedef struct policydb { - /* symbol tables */ - symtab_t symtab[SYM_NUM]; -#define p_commons symtab[SYM_COMMONS] -#define p_classes symtab[SYM_CLASSES] -#define p_roles symtab[SYM_ROLES] -#define p_types symtab[SYM_TYPES] -#define p_users symtab[SYM_USERS] -#define p_levels symtab[SYM_LEVELS] -#define p_cats symtab[SYM_CATS] -#define p_bools symtab[SYM_BOOLS] +extern int sepol_policydb_from_image(sepol_handle_t *handle, + void* data, size_t len, + sepol_policydb_t *p); - /* symbol names indexed by (value - 1) */ - char **sym_val_to_name[SYM_NUM]; -#define p_common_val_to_name sym_val_to_name[SYM_COMMONS] -#define p_class_val_to_name sym_val_to_name[SYM_CLASSES] -#define p_role_val_to_name sym_val_to_name[SYM_ROLES] -#define p_type_val_to_name sym_val_to_name[SYM_TYPES] -#define p_user_val_to_name sym_val_to_name[SYM_USERS] -#define p_sens_val_to_name sym_val_to_name[SYM_LEVELS] -#define p_cat_val_to_name sym_val_to_name[SYM_CATS] -#define p_bool_val_to_name sym_val_to_name[SYM_BOOLS] - /* class, role, and user attributes indexed by (value - 1) */ - class_datum_t **class_val_to_struct; - role_datum_t **role_val_to_struct; - user_datum_t **user_val_to_struct; - - /* type enforcement access vectors and transitions */ - avtab_t te_avtab; - - /* bools indexed by (value - 1) */ - cond_bool_datum_t **bool_val_to_struct; - /* type enforcement conditional access vectors and transitions */ - avtab_t te_cond_avtab; - /* linked list indexing te_cond_avtab by conditional */ - cond_list_t* cond_list; - - /* role transitions */ - role_trans_t *role_tr; - - /* role allows */ - role_allow_t *role_allow; - - /* security contexts of initial SIDs, unlabeled file systems, - TCP or UDP port numbers, network interfaces and nodes */ - ocontext_t *ocontexts[OCON_NUM]; - - /* security contexts for files in filesystems that cannot support - a persistent label mapping or use another - fixed labeling behavior. */ - genfs_t *genfs; - -#ifdef CONFIG_SECURITY_SELINUX_MLS - /* number of legitimate MLS levels */ - uint32_t nlevels; - - ebitmap_t trustedreaders; - ebitmap_t trustedwriters; - ebitmap_t trustedobjects; -#endif - - unsigned policyvers; -} policydb_t; - -extern int policydb_init(policydb_t * p); - -extern int policydb_index_classes(policydb_t * p); - -extern int policydb_index_bools(policydb_t * p); - -extern int policydb_index_others(policydb_t * p, unsigned int verbose); - -extern int constraint_expr_destroy(constraint_expr_t * expr); - -extern void policydb_destroy(policydb_t * p); - -extern int policydb_load_isids(policydb_t *p, sidtab_t *s); - -extern int policydb_context_isvalid(policydb_t *p, context_struct_t *c); - -/* A policy "file" may be a memory region referenced by a (data, len) pair - or a file referenced by a FILE pointer. */ -struct policy_file { -#define PF_USE_MEMORY 0 -#define PF_USE_STDIO 1 - unsigned type; - char *data; - size_t len; - FILE *fp; -}; - -extern int policydb_read(policydb_t * p, struct policy_file * fp, unsigned int verbose); - -extern int policydb_write(struct policydb *p, struct policy_file *pf); - -#define PERM_SYMTAB_SIZE 32 - -/* Identify specific policy version changes */ -#define POLICYDB_VERSION_BASE 15 -#define POLICYDB_VERSION_BOOL 16 -#define POLICYDB_VERSION_IPV6 17 -#define POLICYDB_VERSION_NLCLASS 18 - -/* Range of policy versions we understand*/ -#define POLICYDB_VERSION_MIN POLICYDB_VERSION_BASE -#define POLICYDB_VERSION_MAX POLICYDB_VERSION_NLCLASS - /* - * Set policy version for writing policies. - * May be any value from POLICYDB_VERSION_MIN to POLICYDB_VERSION_MAX. - * If not set, then policydb_write defaults to the max. + * Generate a binary policy memory image from a policydb. + * This is equivalent to sepol_policydb_write with a policy file + * set to refer to memory, but internally handles computing the + * necessary length and allocating an appropriately sized memory + * buffer for the caller. */ -extern int sepol_set_policyvers(unsigned int policyvers); +extern int sepol_policydb_to_image(sepol_handle_t *handle, + sepol_policydb_t *p, + void **newdata, + size_t *newlen); -#define POLICYDB_CONFIG_MLS 1 +extern int sepol_policydb_mls_enabled( + const sepol_policydb_t* p); -#define OBJECT_R "object_r" -#define OBJECT_R_VAL 1 - -#define POLICYDB_MAGIC SELINUX_MAGIC -#define POLICYDB_STRING "SE Linux" - -#endif /* _POLICYDB_H_ */ - -/* FLASK */ - +#endif ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/include/sepol/sepol.h#2 (text+ko) ==== @@ -1,21 +1,28 @@ #ifndef _SEPOL_H_ #define _SEPOL_H_ -#include +#include +#include -/* Given an existing binary policy (starting at 'data', with length 'len') - and a boolean configuration file named by 'boolpath', rewrite the binary - policy for the boolean settings in the boolean configuration file. - The binary policy is rewritten in place in memory. - Returns 0 upon success, or -1 otherwise. */ -extern int sepol_genbools(void *data, size_t len, char *boolpath); +#include +#include +#include +#include +#include +#include -/* Given an existing binary policy (starting at 'data', with length 'len') - and boolean settings specified by the parallel arrays ('names', 'values') - with 'nel' elements, rewrite the binary policy for the boolean settings. - The binary policy is rewritten in place in memory. - Returns 0 upon success or -1 otherwise. */ -extern int sepol_genbools_array(void *data, size_t len, char **names, int *values, int nel); +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +/* Set internal policydb from a file for subsequent service calls. */ +extern int sepol_set_policydb_from_file(FILE *fp); #endif ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/Makefile#3 (text+ko) ==== @@ -7,32 +7,29 @@ LIBVERSION = 1 -# Set to y for MLS -MLS=n - LIBA=libsepol.a #TARGET=libsepol.so #LIBSO=$(TARGET).$(LIBVERSION) OBJS= $(patsubst %.c,%.o,$(wildcard *.c)) #LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c)) -CFLAGS = -Wall $(OPTIONS) -override CFLAGS += -I. -I../include +CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute +override CFLAGS += -I. -I../include -I../../libsecompat -D_GNU_SOURCE -all: $(LIBA) +all: $(LIBA) $(LIBSO) $(LIBA): $(OBJS) $(AR) rcs $@ $^ ranlib $@ $(LIBSO): $(LOBJS) - $(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname,$(LIBSO),--version-script=libsepol.map + $(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname,$(LIBSO),--version-script=libsepol.map,-z,defs ln -sf $@ $(TARGET) %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< %.lo: %.c - $(CC) $(CFLAGS) -fPIC -c -o $@ $< + $(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $< install: all test -d $(LIBDIR) || install -m 755 -d $(LIBDIR) @@ -41,6 +38,9 @@ # install -m 755 $(LIBSO) $(SHLIBDIR) # cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET) +relabel: +# /sbin/restorecon $(SHLIBDIR)/$(LIBSO) + clean: - rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(TARGET) + -rm -f $(OBJS) $(LOBJS) $(LIBA) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/av_permissions.h#2 (text+ko) ==== @@ -1,2 +1,3 @@ /* Used by security_compute_av. */ #define PROCESS__TRANSITION 0x00000002UL +#define PROCESS__DYNTRANSITION 0x00800000UL ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsepol/src/avtab.c#2 (text+ko) ==== @@ -5,10 +5,26 @@ * * Added conditional policy language extensions * + * Updated: Red Hat, Inc. James Morris + * + * Code cleanup + * * Copyright (C) 2003 Tresys Technology, LLC - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2. + * Copyright (C) 2003 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* FLASK */ @@ -18,9 +34,10 @@ */ #include -#include -#include +#include +#include +#include "debug.h" #include "private.h" #define AVTAB_HASH(keyp) \ @@ -30,7 +47,7 @@ AVTAB_HASH_MASK) static avtab_ptr_t - avtab_insert_node(avtab_t *h, int hvalue, avtab_ptr_t prev, avtab_ptr_t cur, avtab_key_t *key, avtab_datum_t *datum) + avtab_insert_node(avtab_t *h, int hvalue, avtab_ptr_t prev, avtab_key_t *key, avtab_datum_t *datum) { avtab_ptr_t newnode; newnode = (avtab_ptr_t) malloc(sizeof(struct avtab_node)); @@ -57,6 +74,7 @@ { int hvalue; avtab_ptr_t prev, cur, newnode; + uint16_t specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); if (!h) return -ENOMEM; @@ -68,7 +86,7 @@ if (key->source_type == cur->key.source_type && key->target_type == cur->key.target_type && key->target_class == cur->key.target_class && - (datum->specified & cur->datum.specified)) + (specified & cur->key.specified)) return -EEXIST; if (key->source_type < cur->key.source_type) break; @@ -81,7 +99,7 @@ break; } - newnode = avtab_insert_node(h, hvalue, prev, cur, key, datum); + newnode = avtab_insert_node(h, hvalue, prev, key, datum); if(!newnode) return -ENOMEM; @@ -97,6 +115,7 @@ { int hvalue; avtab_ptr_t prev, cur, newnode; + uint16_t specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); if (!h) return NULL; @@ -107,7 +126,7 @@ if (key->source_type == cur->key.source_type && key->target_type == cur->key.target_type && key->target_class == cur->key.target_class && - (datum->specified & cur->datum.specified)) + (specified & cur->key.specified)) break; if (key->source_type < cur->key.source_type) break; @@ -119,37 +138,17 @@ key->target_class < cur->key.target_class) break; } - newnode = avtab_insert_node(h, hvalue, prev, cur, key, datum); + newnode = avtab_insert_node(h, hvalue, prev, key, datum); return newnode; } -/* Unlike avtab_insert(), this function stores a caller-provided parse_context pointer, AND - * allow multiple insertions of the same key/specified mask into the table, AND returns - * a pointer to the new node added, all as needed by the conditional avtab. - */ -avtab_ptr_t - avtab_insert_with_parse_context(avtab_t *h, avtab_key_t *key, avtab_datum_t *datum, void *parse_context) -{ - avtab_ptr_t newnode; - - if (!h) - return NULL; - - newnode = avtab_insert_nonunique(h, key, datum); - if(!newnode) - return NULL; - - newnode->parse_context = parse_context; - - return newnode; -} - avtab_datum_t * - avtab_search(avtab_t * h, avtab_key_t * key, int specified) + avtab_search(avtab_t * h, avtab_key_t * key) { int hvalue; avtab_ptr_t cur; + uint16_t specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); if (!h) @@ -160,7 +159,7 @@ if (key->source_type == cur->key.source_type && key->target_type == cur->key.target_type && key->target_class == cur->key.target_class && - (specified & cur->datum.specified)) + (specified & cur->key.specified)) return &cur->datum; if (key->source_type < cur->key.source_type) @@ -181,10 +180,11 @@ * conjunction with avtab_search_next_node() */ avtab_ptr_t - avtab_search_node(avtab_t * h, avtab_key_t * key, int specified) + avtab_search_node(avtab_t * h, avtab_key_t * key) { int hvalue; avtab_ptr_t cur; + uint16_t specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); if (!h) return NULL; @@ -194,7 +194,7 @@ if (key->source_type == cur->key.source_type && key->target_type == cur->key.target_type && key->target_class == cur->key.target_class && - (specified & cur->datum.specified)) + (specified & cur->key.specified)) return cur; if (key->source_type < cur->key.source_type) @@ -218,11 +218,12 @@ if (!node) return NULL; + specified &= ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); for (cur = node->next; cur; cur = cur->next) { if (node->key.source_type == cur->key.source_type && node->key.target_type == cur->key.target_type && node->key.target_class == cur->key.target_class && >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:28:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 00D9416A407; Thu, 20 Apr 2006 21:28:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2B6A16A405 for ; Thu, 20 Apr 2006 21:28:31 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1060643D6D for ; Thu, 20 Apr 2006 21:28:25 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLSP4e005965 for ; Thu, 20 Apr 2006 21:28:25 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLSPqJ005962 for perforce@freebsd.org; Thu, 20 Apr 2006 21:28:25 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 21:28:25 GMT Message-Id: <200604202128.k3KLSPqJ005962@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95722 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:28:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=95722 Change 95722 by jb@jb_freebsd2 on 2006/04/20 21:27:30 Work-in-progress update. This won't compile and the moment. Include each group of functions from files grouped logically. The files are included in the same order they appear in Sun's dtrace.c and in each file the functions are in the same order. I've checked that it is possible to concatenate all the files together and diff them against Sun's dtrace.c. The diff makes sense. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#6 (text+ko) ==== @@ -40,31 +40,6 @@ * implementation very much assume mastery of all of these sources; if one has * an unanswered question about the implementation, one should consult them * first. - * - * The functions here are ordered roughly as follows: - * - * - Probe context functions - * - Probe hashing functions - * - Non-probe context utility functions - * - Matching functions - * - Provider-to-Framework API functions - * - Probe management functions - * - DIF object functions - * - Format functions - * - Predicate functions - * - ECB functions - * - Buffer functions - * - Enabling functions - * - DOF functions - * - Anonymous enabling functions - * - Consumer state functions - * - Helper functions - * - Hook functions - * - Driver cookbook functions - * - * Each group of functions begins with a block comment labelled the "DTrace - * [Group] Functions", allowing one to find each block by searching forward - * on capital-f functions. */ #include #include @@ -75,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -90,9 +66,14 @@ #include /* For compatibility with Solaris code. */ -typedef struct mtx kmutex_t; -#define mutex_enter(_a) mtx_lock(_a) -#define mutex_exit(_a) mtx_unlock(_a) +typedef struct mtx kmutex_t; +#define mutex_enter(_a) mtx_lock(_a) +#define mutex_exit(_a) mtx_unlock(_a) +#define KM_SLEEP M_WAITOK +#define KM_NOSLEEP M_NOWAIT +#define kmem_zalloc(_a,_b) malloc(_a, M_DTRACE, _b | M_ZERO) +#define kmem_alloc(_a,_b) malloc(_a, M_DTRACE, _b) +#define kmem_free(_a,_b) free(_a, M_DTRACE) #define DTRACE_MINOR 0 @@ -136,7 +117,6 @@ * dynamically via "mdb -kw" or other means; they should only be tuned via * /etc/system. */ -#ifdef DOODAD int dtrace_destructive_disallow = 0; dtrace_optval_t dtrace_nonroot_maxsize = (16 * 1024 * 1024); size_t dtrace_difo_maxsize = (256 * 1024); @@ -169,7 +149,6 @@ hrtime_t dtrace_deadman_interval = NANOSEC; hrtime_t dtrace_deadman_timeout = (hrtime_t)10 * NANOSEC; hrtime_t dtrace_deadman_user = (hrtime_t)30 * NANOSEC; -#endif /* * DTrace External Variables @@ -196,12 +175,9 @@ static dtrace_probe_t **dtrace_probes; /* array of all probes */ static int dtrace_nprobes; /* number of probes */ static dtrace_provider_t *dtrace_provider; /* provider list */ -#ifdef DOODAD static dtrace_meta_t *dtrace_meta_pid; /* user-land meta provider */ -#endif static int dtrace_opens; /* number of opens */ static int dtrace_helpers; /* number of helpers */ -#ifdef DOODAD static void *dtrace_softstate; /* softstate pointer */ static dtrace_hash_t *dtrace_bymod; /* probes hashed by module */ static dtrace_hash_t *dtrace_byfunc; /* probes hashed by function */ @@ -209,18 +185,19 @@ static dtrace_toxrange_t *dtrace_toxrange; /* toxic range array */ static int dtrace_toxranges; /* number of toxic ranges */ static int dtrace_toxranges_max; /* size of toxic range array */ -#endif static dtrace_anon_t dtrace_anon; /* anonymous enabling */ #ifdef DOODAD static kmem_cache_t *dtrace_state_cache; /* cache for dynamic state */ +#endif static uint64_t dtrace_vtime_references; /* number of vtimestamp refs */ +#ifdef DOODAD static kthread_t *dtrace_panicked; /* panicking thread */ +#endif static dtrace_ecb_t *dtrace_ecb_create_cache; /* cached created ECB */ static dtrace_genid_t dtrace_probegen; /* current probe generation */ static dtrace_helpers_t *dtrace_deferred_pid; /* deferred helper list */ static dtrace_enabling_t *dtrace_retained; /* list of retained enablings */ static dtrace_dynvar_t dtrace_dynhash_sink; /* end of dynamic hash chains */ -#endif /* * DTrace Locking @@ -257,6 +234,10 @@ static kmutex_t dtrace_provider_lock; /* provider state lock */ static kmutex_t dtrace_meta_lock; /* meta-provider state lock */ +/* XXX Hack. */ +static kmutex_t cpu_lock; +static kmutex_t mod_lock; + /* * DTrace Provider Variables * @@ -288,7 +269,6 @@ (void (*)(void *, dtrace_id_t, void *))dtrace_nullop }; -#ifdef DOODAD static dtrace_id_t dtrace_probeid_begin; /* special BEGIN probe */ static dtrace_id_t dtrace_probeid_end; /* special END probe */ dtrace_id_t dtrace_probeid_error; /* special ERROR probe */ @@ -374,6 +354,7 @@ #define DTRACE_STORE(type, tomax, offset, what) \ *((type *)((uintptr_t)(tomax) + (uintptr_t)offset)) = (type)(what); +#ifdef DOODAD #ifndef __i386 #define DTRACE_ALIGNCHECK(addr, size, flags) \ if (addr & (size - 1)) { \ @@ -427,6 +408,7 @@ #else #define dtrace_loadptr dtrace_load32 #endif +#endif #define DTRACE_DYNHASH_FREE 0 #define DTRACE_DYNHASH_SINK 1 @@ -452,34 +434,200 @@ ((act)->dta_kind == DTRACEACT_DIFEXPR && \ (act)->dta_difo->dtdo_rtype.dtdt_kind == DIF_TYPE_STRING) -static dtrace_probe_t *dtrace_probe_lookup_id(dtrace_id_t id); -static void dtrace_enabling_provide(dtrace_provider_t *); +#ifdef DOODAD +static dtrace_helpers_t *dtrace_helpers_create(proc_t *); +#endif + +dtrace_state_t * dtrace_state_create(dev_t *, cred_t *); +int dtrace_dstate_init(dtrace_dstate_t *, size_t); +static char *dtrace_strdup(const char *); +static dof_hdr_t * dtrace_dof_copyin(uintptr_t, int *); +static dof_hdr_t *dtrace_dof_property(const char *); +static dof_sec_t *dtrace_dof_sect(dof_hdr_t *, uint32_t, dof_secidx_t); +static dtrace_action_t *dtrace_ecb_aggregation_create(dtrace_ecb_t *, dtrace_actdesc_t *); +static dtrace_buffer_t *dtrace_speculation_buffer(dtrace_state_t *, processorid_t, dtrace_specid_t); +static dtrace_ecb_t *dtrace_ecb_add(dtrace_state_t *, dtrace_probe_t *); +static dtrace_ecb_t *dtrace_ecb_create(dtrace_state_t *, dtrace_probe_t *, dtrace_enabling_t *); +static dtrace_ecbdesc_t *dtrace_dof_ecbdesc(dof_hdr_t *, dof_sec_t *, dtrace_vstate_t *, cred_t *); +static dtrace_enabling_t *dtrace_enabling_create(dtrace_vstate_t *); +static dtrace_hash_t *dtrace_hash_create(uintptr_t, uintptr_t, uintptr_t); +static dtrace_predicate_t *dtrace_predicate_create(dtrace_difo_t *); +static dtrace_probe_t *dtrace_hash_lookup(dtrace_hash_t *, dtrace_probe_t *); +static dtrace_probe_t *dtrace_probe_lookup_id(dtrace_id_t); +static dtrace_state_t *dtrace_anon_grab(void); +static int dtrace_badattr(const dtrace_attribute_t *); +static int dtrace_badname(const char *); +static int dtrace_dof_options(dof_hdr_t *, dtrace_state_t *); +static int dtrace_dof_relocate(dof_hdr_t *, dof_sec_t *, uint64_t); +static int dtrace_dof_slurp(dof_hdr_t *, dtrace_vstate_t *, cred_t *, dtrace_enabling_t **, uint64_t, int); +static int dtrace_ecb_action_add(dtrace_ecb_t *, dtrace_actdesc_t *); +static int dtrace_ecb_create_enable(dtrace_probe_t *, void *); static int dtrace_enabling_match(dtrace_enabling_t *, int *); +static int dtrace_enabling_retain(dtrace_enabling_t *); +static int dtrace_hash_collisions(dtrace_hash_t *, dtrace_probe_t *); +static int dtrace_helper_destroygen(int); +static int dtrace_helper_slurp(dof_hdr_t *, dof_helper_t *); +static int dtrace_helper_validate(dtrace_helper_action_t *); +static int dtrace_match(const dtrace_probekey_t *, uint32_t, uid_t, zoneid_t, int (*)(dtrace_probe_t *, void *), void *); +static int dtrace_match_priv(const dtrace_probe_t *, uint32_t, uid_t, zoneid_t); +static int dtrace_match_probe(const dtrace_probe_t *, const dtrace_probekey_t *, uint32_t, uid_t, zoneid_t); +static int dtrace_match_string(const char *, const char *, int); +static int dtrace_probe_enable(const dtrace_probedesc_t *, dtrace_enabling_t *); +static int dtrace_speculation(dtrace_state_t *); +static int dtrace_state_buffer(dtrace_state_t *, dtrace_buffer_t *, int); +static int dtrace_state_buffers(dtrace_state_t *); +static int dtrace_state_go(dtrace_state_t *, processorid_t *); +static int dtrace_state_option(dtrace_state_t *, dtrace_optid_t, dtrace_optval_t); +static int dtrace_state_stop(dtrace_state_t *, processorid_t *); +static intptr_t dtrace_buffer_reserve(dtrace_buffer_t *, size_t, size_t, dtrace_state_t *, dtrace_mstate_t *); +static uint16_t dtrace_format_add(dtrace_state_t *, char *); +static uint64_t dtrace_helper(int, dtrace_mstate_t *, dtrace_state_t *, uint64_t, uint64_t); +static uint_t dtrace_hash_str(char *); +static void dtrace_actdesc_release(dtrace_actdesc_t *, dtrace_vstate_t *); +static void dtrace_anon_property(void); +static void dtrace_buffer_drop(dtrace_buffer_t *); +static void dtrace_cred2priv(cred_t *, uint32_t *, uid_t *, zoneid_t *); +static void dtrace_difo_destroy(dtrace_difo_t *, dtrace_vstate_t *); +static void dtrace_difo_hold(dtrace_difo_t *); +static void dtrace_difo_release(dtrace_difo_t *, dtrace_vstate_t *); +static void dtrace_dof_destroy(dof_hdr_t *); +static void dtrace_dof_error(dof_hdr_t *, const char *); +static void dtrace_dofattr2attr(dtrace_attribute_t *, const dof_attr_t); +static void dtrace_dofprov2hprov(dtrace_helper_provdesc_t *, const dof_provider_t *, char *); +static void dtrace_ecb_action_remove(dtrace_ecb_t *); +static void dtrace_ecb_aggregation_destroy(dtrace_ecb_t *, dtrace_action_t *); +static void dtrace_ecb_destroy(dtrace_ecb_t *); +static void dtrace_ecb_enable(dtrace_ecb_t *); +static void dtrace_ecb_resize(dtrace_ecb_t *); +static void dtrace_enabling_add(dtrace_enabling_t *, dtrace_ecbdesc_t *); +static void dtrace_enabling_destroy(dtrace_enabling_t *); static void dtrace_enabling_matchall(void); -static dtrace_state_t *dtrace_anon_grab(void); -static uint64_t dtrace_helper(int, dtrace_mstate_t *, - dtrace_state_t *, uint64_t, uint64_t); -static dtrace_helpers_t *dtrace_helpers_create(proc_t *); -static void dtrace_buffer_drop(dtrace_buffer_t *); -static intptr_t dtrace_buffer_reserve(dtrace_buffer_t *, size_t, size_t, - dtrace_state_t *, dtrace_mstate_t *); -static int dtrace_state_option(dtrace_state_t *, dtrace_optid_t, - dtrace_optval_t); -static int dtrace_ecb_create_enable(dtrace_probe_t *, void *); +static void dtrace_enabling_provide(dtrace_provider_t *); +static void dtrace_format_remove(dtrace_state_t *, uint16_t); +static void dtrace_hash_add(dtrace_hash_t *, dtrace_probe_t *); +static void dtrace_hash_destroy(dtrace_hash_t *); +static void dtrace_hash_remove(dtrace_hash_t *, dtrace_probe_t *); +static void dtrace_hash_resize(dtrace_hash_t *); +static void dtrace_helper_destroy(dtrace_helper_action_t *, dtrace_vstate_t *); +static void dtrace_helper_provide(dof_helper_t *, pid_t); +static void dtrace_helper_provide_one(dof_helper_t *, dof_sec_t *, pid_t); +static void dtrace_helper_remove(dof_helper_t *, pid_t); +static void dtrace_helper_remove_one(dof_helper_t *, dof_sec_t *, pid_t); +static void dtrace_helper_trace(dtrace_helper_action_t *r, dtrace_mstate_t *, dtrace_vstate_t *, int); +static void dtrace_helpers_destroy(void); +static void dtrace_helpers_duplicate(proc_t *, proc_t *); +static void dtrace_predicate_hold(dtrace_predicate_t *); +static void dtrace_predicate_release(dtrace_predicate_t *, dtrace_vstate_t *); +static void dtrace_probe_description(const dtrace_probe_t *, dtrace_probedesc_t *); +static void dtrace_probe_provide(dtrace_probedesc_t *, dtrace_provider_t *); +static void dtrace_probekey(const dtrace_probedesc_t *, dtrace_probekey_t *); +static void dtrace_speculation_clean(dtrace_state_t *); +static void dtrace_speculation_clean_here(dtrace_state_t *); +static void dtrace_speculation_commit(dtrace_state_t *, processorid_t, dtrace_specid_t); +static void dtrace_speculation_discard(dtrace_state_t *, processorid_t, dtrace_specid_t); +static void dtrace_state_clean(dtrace_state_t *); +static void dtrace_state_deadman(dtrace_state_t *); +static void dtrace_state_destroy(dtrace_state_t *); +static void dtrace_state_prereserve(dtrace_state_t *); +static void dtrace_vstate_fini(dtrace_vstate_t *); +void dtrace_dstate_fini(dtrace_dstate_t *d); +void dtrace_vtime_disable(void); +void dtrace_vtime_enable(void); + +/* XXX Hacks.... */ +void +dtrace_sync(void) +{ +#ifdef DOODAD + dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); #endif +} +void +dtrace_membar_producer(void) +{ +} +void +dtrace_vtime_enable(void) +{ +} +void +dtrace_vtime_disable(void) +{ +} +/* Common error handler. */ #include -#include -#include + +/* - Probe context functions */ +#include +#include +#include +#include +#include +#include +#include + +/* - Probe hashing functions */ +#include +#include + +/* - Non-probe context utility functions */ +#include + +/* - Matching functions */ +#include + +/* - Provider-to-Framework API functions */ +#include +#include + +/* - Probe management functions */ +#include +#include +#include + +/* - DIF object functions */ +#include + +/* - Format functions */ +#include + +/* - Predicate functions */ +#include +#include + +/* - ECB functions */ +#include + +/* - Buffer functions */ +#include + +/* - Enabling functions */ +#include + +/* - DOF functions */ +#include + +/* - Consumer state functions */ +#include + +/* - Anonymous enabling functions */ +#include + +/* - Helper functions */ +#include + +/* - Hook functions */ +#include + +/* - Driver cookbook functions */ #include #include #include #include #include -#include #include #include -#include DEV_MODULE(dtrace, dtrace_modevent, NULL); MODULE_VERSION(dtrace, 1); From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:30:29 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BC62F16A407; Thu, 20 Apr 2006 21:30:29 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80F5D16A400 for ; Thu, 20 Apr 2006 21:30:29 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABA4243D49 for ; Thu, 20 Apr 2006 21:30:28 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLUSCD006377 for ; Thu, 20 Apr 2006 21:30:28 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLUSSo006371 for perforce@freebsd.org; Thu, 20 Apr 2006 21:30:28 GMT (envelope-from soc-andrew@freebsd.org) Date: Thu, 20 Apr 2006 21:30:28 GMT Message-Id: <200604202130.k3KLUSSo006371@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 95723 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:30:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=95723 Change 95723 by soc-andrew@soc-andrew_serv on 2006/04/20 21:29:48 Rebove all traces of Lua from the tree Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/COPYRIGHT#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/DIFFS#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/HISTORY#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/INSTALL#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/MANIFEST#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/UPDATE#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/build#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/config#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/configure#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/doc/contents.html#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/doc/logo.gif#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/doc/lua.1#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/doc/lua.html#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/doc/luac.1#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/doc/luac.html#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/doc/manual.html#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/doc/readme.html#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/bin2c.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/compat.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/doall.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/lua.ico#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/lua.magic#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/lua.xpm#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/luser_number.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/luser_tests.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/min.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/noparser.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/saconfig.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/etc/trace.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/include/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/include/lauxlib.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/include/lua.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/include/lualib.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lapi.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lapi.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lcode.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lcode.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ldebug.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ldebug.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ldo.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ldo.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ldump.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lfunc.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lfunc.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lgc.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lgc.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/lauxlib.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/lbaselib.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/ldblib.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/liolib.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/lmathlib.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/loadlib.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/lstrlib.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lib/ltablib.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/llex.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/llex.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/llimits.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lmem.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lmem.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lobject.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lobject.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lopcodes.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lopcodes.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lparser.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lparser.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lstate.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lstate.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lstring.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lstring.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ltable.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ltable.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ltests.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ltm.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/ltm.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lua/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lua/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lua/lua.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/luac/Makefile#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/luac/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/luac/luac.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/luac/print.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lundump.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lundump.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lvm.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lvm.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lzio.c#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/src/lzio.h#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/README#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/bisect.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/cf.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/echo.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/env.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/factorial.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/fib.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/fibfor.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/globals.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/hello.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/life.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/luac.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/printf.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/readonly.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/sieve.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/sort.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/table.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/trace-calls.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/trace-globals.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/undefined.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/contrib/lua/lua/test/xd.lua#2 delete .. //depot/projects/soc2005/bsdinstaller/src/etc/mtree/BSD.usr.dist#7 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/etc/mtree/BSD.usr.dist#7 (text+ko) ==== @@ -18,8 +18,6 @@ aout .. .. - lua - .. .. libdata gcc From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:31:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7F54C16A406; Thu, 20 Apr 2006 21:31:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 469EC16A400 for ; Thu, 20 Apr 2006 21:31:30 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F51643D48 for ; Thu, 20 Apr 2006 21:31:30 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLVUKM007322 for ; Thu, 20 Apr 2006 21:31:30 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLVU42007314 for perforce@freebsd.org; Thu, 20 Apr 2006 21:31:30 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 21:31:30 GMT Message-Id: <200604202131.k3KLVU42007314@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95724 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:31:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=95724 Change 95724 by millert@millert_g5tower on 2006/04/20 21:31:04 Add a compat lib for libc functions not present on Darwin. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsecompat/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsecompat/ftw.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsecompat/getline.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsecompat/nftw.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsecompat/secompat.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsecompat/strndup.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:35:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 734B716A408; Thu, 20 Apr 2006 21:35:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38FD016A402 for ; Thu, 20 Apr 2006 21:35:36 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3F5843D46 for ; Thu, 20 Apr 2006 21:35:35 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLZZux011080 for ; Thu, 20 Apr 2006 21:35:35 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLZZnQ011074 for perforce@freebsd.org; Thu, 20 Apr 2006 21:35:35 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 21:35:35 GMT Message-Id: <200604202135.k3KLZZnQ011074@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95725 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:35:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=95725 Change 95725 by millert@millert_g5tower on 2006/04/20 21:35:22 libsemanage 1.6 Obtained from: SELinux Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/COPYING#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/ChangeLog#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/VERSION#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/boolean_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/booleans_active.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/booleans_local.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/booleans_policy.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/context_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/debug.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/fcontext_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/fcontexts_local.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/fcontexts_policy.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/handle.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/iface_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/interfaces_local.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/interfaces_policy.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/modules.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/node_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/nodes_local.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/nodes_policy.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/port_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/ports_local.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/ports_policy.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/semanage.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/seuser_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/seusers_local.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/seusers_policy.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/user_record.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/users_local.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/include/semanage/users_policy.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_count.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_count_active.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_count_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_del_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_exists.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_exists_active.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_exists_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_iterate.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_iterate_active.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_iterate_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_list.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_list_active.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_list_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_modify_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_query.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_query_active.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_query_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_bool_set_active.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_count.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_count_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_del_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_exists.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_exists_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_iterate.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_iterate_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_list.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_list_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_modify_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_query.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_fcontext_query_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_count.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_count_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_del_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_exists.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_exists_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_iterate.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_iterate_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_list.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_list_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_modify_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_query.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_iface_query_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_count.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_count_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_del_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_exists.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_exists_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_iterate.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_iterate_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_list.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_list_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_modify_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_query.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_node_query_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_count.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_count_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_del_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_exists.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_exists_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_iterate.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_iterate_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_list.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_list_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_modify_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_query.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_port_query_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_count.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_count_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_del_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_exists.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_exists_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_iterate.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_iterate_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_list.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_list_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_modify_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_query.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_seuser_query_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_count.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_count_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_del_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_exists.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_exists_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_iterate.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_iterate_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_list.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_list_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_modify_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_query.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/man/man3/semanage_user_query_local.3#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/boolean_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/boolean_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/booleans_active.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/booleans_activedb.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/booleans_file.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/booleans_local.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/booleans_policy.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/booleans_policydb.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/conf-parse.y#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/conf-scan.l#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/context_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/context_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_activedb.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_activedb.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_file.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_file.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_join.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_join.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_llist.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_llist.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_policydb.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/database_policydb.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/debug.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/debug.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/direct_api.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/direct_api.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/dso.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/fcontext_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/fcontext_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/fcontexts_file.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/fcontexts_local.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/fcontexts_policy.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/handle.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/handle.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/handle_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/iface_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/iface_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/interfaces_file.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/interfaces_local.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/interfaces_policy.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/interfaces_policydb.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/libsemanage.map#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/module_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/modules.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/modules.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/node_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/node_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/nodes_file.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/nodes_local.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/nodes_policy.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/nodes_policydb.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/parse_utils.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/parse_utils.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/policy.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/policy_components.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/port_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/port_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/ports_file.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/ports_local.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/ports_policy.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/ports_policydb.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/private.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/pywrap-test.py#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/semanage.conf#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/semanage.py#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/semanage_conf.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/semanage_store.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/semanage_store.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/semanageswig.i#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/semanageswig_python.i#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/semanageswig_wrap.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/seuser_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/seuser_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/seusers_file.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/seusers_local.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/seusers_policy.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/strverscmp.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/user_base_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/user_extra_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/user_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/user_record.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/users_base_file.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/users_base_policydb.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/users_extra_file.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/users_join.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/users_local.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/users_policy.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:37:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 391AB16A407; Thu, 20 Apr 2006 21:37:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F215016A402 for ; Thu, 20 Apr 2006 21:37:39 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5D9743D5A for ; Thu, 20 Apr 2006 21:37:38 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLbckN013770 for ; Thu, 20 Apr 2006 21:37:38 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLbc42013764 for perforce@freebsd.org; Thu, 20 Apr 2006 21:37:38 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 21:37:38 GMT Message-Id: <200604202137.k3KLbc42013764@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95726 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:37:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=95726 Change 95726 by millert@millert_g5tower on 2006/04/20 21:37:09 policycoreutils 1.30 Obtained from: SELinux Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/COPYING#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/ChangeLog#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/VERSION#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/audit2allow/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/audit2allow/audit2allow#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/audit2allow/audit2allow.1#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/audit2allow/audit2allow.perl#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/audit2why/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/audit2why/audit2why.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/audit2why/audit2why.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/load_policy/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/load_policy/load_policy.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/load_policy/load_policy.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/newrole/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/newrole/newrole.1#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/newrole/newrole.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/newrole/newrole.pamd#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/Makefile.in#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/Makefile.in.in#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/POTFILES#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/POTFILES.in#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/da.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/de.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/es.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/et.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/fr.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/gl.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/id.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/it.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/ko.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/nl.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/pl.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/policycoreutils.pot#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/pt_BR.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/ru.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/po/sv.po#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/restorecon/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/restorecon/restorecon.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/restorecon/restorecon.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/run_init/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/run_init/open_init_pty.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/run_init/open_init_pty.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/run_init/run_init.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/run_init/run_init.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/run_init/run_init.pamd#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/scripts/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/scripts/chcat#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/scripts/chcat.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/scripts/fixfiles#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/scripts/fixfiles.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/scripts/genhomedircon#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/scripts/genhomedircon.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semanage/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semanage/semanage#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semanage/semanage.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semanage/seobject.py#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule/semodule.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule/semodule.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule_expand/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule_expand/semodule_expand.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule_expand/semodule_expand.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule_link/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule_link/semodule_link.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule_link/semodule_link.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule_package/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule_package/semodule_package.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/semodule_package/semodule_package.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/sestatus/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/sestatus/sestatus.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/sestatus/sestatus.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/sestatus/sestatus.conf#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/setfiles/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/setfiles/setfiles.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/setfiles/setfiles.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/setsebool/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/setsebool/setsebool.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policycoreutils/setsebool/setsebool.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:49:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DB10116A407; Thu, 20 Apr 2006 21:49:54 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E94916A405 for ; Thu, 20 Apr 2006 21:49:54 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F56543D49 for ; Thu, 20 Apr 2006 21:49:54 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLnsU0018829 for ; Thu, 20 Apr 2006 21:49:54 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLnrvM018826 for perforce@freebsd.org; Thu, 20 Apr 2006 21:49:53 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 21:49:53 GMT Message-Id: <200604202149.k3KLnrvM018826@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95727 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:49:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=95727 Change 95727 by millert@millert_g5tower on 2006/04/20 21:49:11 checkpolicy 1.30 Obtained from: SELinux Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/Makefile#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/Makefile#5 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/checkpolicy/checkmodule.8#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/checkpolicy/checkmodule.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/checkpolicy/genpolusers.c#2 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/checkpolicy/module_compiler.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/checkpolicy/module_compiler.h#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/checkpolicy/test/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/checkpolicy/test/dismod.c#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/checkpolicy/test/dispol.c#1 add Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/Makefile#5 (text+ko) ==== @@ -1,20 +1,19 @@ -all: - cd sedarwin && gnumake - cd libsepol/src && gnumake - cd libselinux && gnumake - cd programs && gnumake - cd policy && gnumake +SUBDIR= sedarwin \ + libsecompat \ + libsepol \ + libselinux \ + libsemanage \ + programs \ + policy + +.PHONY: $(SUBDIR) all install clean + +all: $(SUBDIR) -clean: - cd sedarwin && gnumake clean - cd libsepol/src && gnumake clean - cd libselinux && gnumake clean - cd programs && gnumake clean - cd policy && gnumake clean +$(SUBDIR): + $(MAKE) -w -C $@ -install: - cd sedarwin && gnumake install - cd libsepol/src && gnumake install - cd libselinux && gnumake install - cd programs && gnumake install - cd policy && gnumake install +install clean: + for dir in $(SUBDIR); do \ + $(MAKE) -w -C $$dir $@; \ + done ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/Makefile#5 (text+ko) ==== @@ -1,24 +1,24 @@ -include ../../Makeconfig - SUBDIR= checkpolicy \ - loadpolicy \ + genhomedircon \ + load_policy \ newrole \ - relabel_gui + setfiles \ + setsebool \ + semodule \ + semodule_expand \ + semodule_link \ + semodule_package \ + relabel_gui \ + restorecon + +.PHONY: $(SUBDIR) all install clean -all: - cd checkpolicy ; gnumake - cd loadpolicy ; gnumake - cd newrole ; gnumake - cd relabel_gui ; gnumake +all: $(SUBDIR) -clean: - cd checkpolicy ; gnumake clean - cd loadpolicy ; gnumake clean - cd newrole ; gnumake clean - cd relabel_gui ; gnumake clean +$(SUBDIR): + $(MAKE) -w -C $@ -install: - cd checkpolicy ; gnumake install - cd loadpolicy ; gnumake install - cd newrole ; gnumake install - cd relabel_gui ; gnumake install +install clean: + for dir in $(SUBDIR); do \ + $(MAKE) -w -C $$dir $@; \ + done From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:51:57 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C2F4716A406; Thu, 20 Apr 2006 21:51:57 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B30A16A401 for ; Thu, 20 Apr 2006 21:51:57 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 426AD43D48 for ; Thu, 20 Apr 2006 21:51:57 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLpvEH020511 for ; Thu, 20 Apr 2006 21:51:57 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLpvbf020503 for perforce@freebsd.org; Thu, 20 Apr 2006 21:51:57 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 21:51:57 GMT Message-Id: <200604202151.k3KLpvbf020503@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95728 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:51:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=95728 Change 95728 by millert@millert_g5tower on 2006/04/20 21:51:43 Remove old loadpolicy Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/loadpolicy/Makefile#6 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/loadpolicy/loadpolicy.8#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/loadpolicy/loadpolicy.c#3 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:54:01 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 28F5616A401; Thu, 20 Apr 2006 21:54:01 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC15816A402 for ; Thu, 20 Apr 2006 21:54:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DD5D43D45 for ; Thu, 20 Apr 2006 21:54:00 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLs09X022213 for ; Thu, 20 Apr 2006 21:54:00 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLs0BB022204 for perforce@freebsd.org; Thu, 20 Apr 2006 21:54:00 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 21:54:00 GMT Message-Id: <200604202154.k3KLs0BB022204@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95729 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:54:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=95729 Change 95729 by jb@jb_freebsd2 on 2006/04/20 21:53:46 Use macros to translate Solaris kmem_zalloc(), kmem_alloc() and kmem_free() calls into their FreeBSD equivalents. This turns out to be a neat way to port their code. Most memory allocations in this driver occur with one or more mutex/es locked. Since dtrace is part of a released product, I'm porting this on the assumption that the locking strategy works. With witness enabled, I can't have it downgrade a M_WAITOK call to a M_NOWAIT call just because it thinks it's a not a good idea to sleep with locks held. For this code, we need to do that and we can't afford to fail because the thing that we might be trying to trace is the low memory situation. We might not be too successful, but we need to try. Anyway... that's why the mutexes are initialised with M_NOWITNESS. As a hack, I've created two mutexes (cpu_lock and mod_lock) just so that I don't have to comment them out in all the places where they are referenced. I havn't started looking for the FreeBSD equivalent of those. Use macros for the mutex_enter() and mutex_exit() calls to translate them to mtx_lock() and mtx_unlock(). Again, this avoids having to change the code in lots of places. Unfortunately dtrace_load() doesn't exist as a function in Sun's dtrace.c. They have this code in dtrace_attach(). I don't want to use that name in FreeBSD beacuse it implies that the device is attaching to a bus. I would prefer it if Sun would abstract their Solaris-specific device model from the meaty bits of code. They could do this by making their dtrace_attach() call this function. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#3 (text+ko) ==== @@ -37,19 +37,32 @@ #endif int error = 0; - mtx_init(&dtrace_lock,"dtrace probe state",NULL,MTX_RECURSE); - mtx_init(&dtrace_provider_lock,"dtrace provider state",NULL,MTX_RECURSE); - mtx_init(&dtrace_meta_lock,"dtrace meta-provider state",NULL,MTX_RECURSE); + /* + * XXX This is a short term hack to avoid having to comment + * out lots and lots of lock/unlock calls. + */ + mtx_init(&cpu_lock,"XXX hack",NULL,MTX_RECURSE | MTX_NOWITNESS); + mtx_init(&mod_lock,"XXX hack",NULL,MTX_RECURSE | MTX_NOWITNESS); + + /* + * Initialise the mutexes without 'witness' because the dtrace + * code is mostly written to wait for memory. To have the + * witness code change a malloc() from M_WAITOK to M_NOWAIT + * because a lock is held would surely create a panic in a + * low memory situation. And that low memory situation might be + * the very problem we are trying to trace. + */ + mtx_init(&dtrace_lock,"dtrace probe state",NULL,MTX_RECURSE | MTX_NOWITNESS); + mtx_init(&dtrace_provider_lock,"dtrace provider state",NULL,MTX_RECURSE | MTX_NOWITNESS); + mtx_init(&dtrace_meta_lock,"dtrace meta-provider state",NULL,MTX_RECURSE | MTX_NOWITNESS); /* Create the /dev/dtrace entry. */ dtrace_dev = make_dev(&dtrace_cdevsw, DTRACE_MINOR, UID_ROOT, GID_WHEEL, 0660, "dtrace"); -#ifdef DOODAD - mtx_lock(&cpu_lock); -#endif - mtx_lock(&dtrace_provider_lock); - mtx_lock(&dtrace_lock); + mutex_enter(&cpu_lock); + mutex_enter(&dtrace_provider_lock); + mutex_enter(&dtrace_lock); #ifdef DOODAD if (ddi_soft_state_init(&dtrace_softstate, @@ -104,6 +117,7 @@ dtrace_state_cache = kmem_cache_create("dtrace_state_cache", sizeof (dtrace_dstate_percpu_t) * NCPU, DTRACE_STATE_ALIGN, NULL, NULL, NULL, NULL, NULL, 0); +#endif ASSERT(MUTEX_HELD(&cpu_lock)); dtrace_bymod = dtrace_hash_create(offsetof(dtrace_probe_t, dtpr_mod), @@ -124,6 +138,7 @@ dtrace_retain_max = 1; } +#ifdef DOODAD /* * Now discover our toxic ranges. */ @@ -140,7 +155,6 @@ (void) dtrace_register("dtrace", &dtrace_provider_attr, DTRACE_PRIV_NONE, 0, &dtrace_provider_ops, NULL, &id); -#ifdef DOODAD ASSERT(dtrace_provider != NULL); ASSERT((dtrace_provider_id_t)dtrace_provider == id); @@ -161,10 +175,11 @@ if (dtrace_helptrace_enabled) { ASSERT(dtrace_helptrace_buffer == NULL); dtrace_helptrace_buffer = - kmem_zalloc(dtrace_helptrace_bufsize, KM_SLEEP); + malloc(dtrace_helptrace_bufsize, M_DTRACE, M_NOWAIT | M_ZERO); dtrace_helptrace_next = 0; } +#ifdef DOODAD /* * If there are already providers, we must ask them to provide their * probes, and then match any anonymous enabling against them. Note @@ -199,8 +214,8 @@ } #endif - mtx_unlock(&dtrace_lock); - mtx_unlock(&dtrace_provider_lock); + mutex_exit(&dtrace_lock); + mutex_exit(&dtrace_provider_lock); #ifdef DOODAD if (state != NULL) { From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:57:05 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CA81716A405; Thu, 20 Apr 2006 21:57:05 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 789E816A403 for ; Thu, 20 Apr 2006 21:57:05 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C876643D55 for ; Thu, 20 Apr 2006 21:57:04 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLv4Zj024831 for ; Thu, 20 Apr 2006 21:57:04 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLv4MX024825 for perforce@freebsd.org; Thu, 20 Apr 2006 21:57:04 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 21:57:04 GMT Message-Id: <200604202157.k3KLv4MX024825@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95730 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:57:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=95730 Change 95730 by jb@jb_freebsd2 on 2006/04/20 21:56:40 Use macros for memory and mutex calls where possible. Destroy the extra 2 mutexes which are part of the hack. See dtrace_load.c This function doesn't exist in Sun's dtrace.c. The code here comes from their dtrace_detach(). This device doesn't attach to a bus, so I prefer not to use the term 'detach'. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#3 (text+ko) ==== @@ -29,31 +29,23 @@ { int error = 0; -#ifdef DOODAD mutex_enter(&cpu_lock); -#endif mutex_enter(&dtrace_provider_lock); mutex_enter(&dtrace_lock); -#ifdef DOODAD ASSERT(dtrace_opens == 0); -#endif if (dtrace_helpers > 0) { mutex_exit(&dtrace_provider_lock); mutex_exit(&dtrace_lock); -#ifdef DOODAD mutex_exit(&cpu_lock); -#endif return (DDI_FAILURE); } if (dtrace_unregister((dtrace_provider_id_t)dtrace_provider) != 0) { mutex_exit(&dtrace_provider_lock); mutex_exit(&dtrace_lock); -#ifdef DOODAD mutex_exit(&cpu_lock); -#endif return (DDI_FAILURE); } @@ -78,6 +70,9 @@ bzero(&dtrace_anon, sizeof (dtrace_anon_t)); unregister_cpu_setup_func((cpu_setup_func_t *)dtrace_cpu_setup, NULL); +#endif + +#ifdef DOODAD dtrace_cpu_init = NULL; dtrace_helpers_cleanup = NULL; dtrace_helpers_fork = NULL; @@ -89,17 +84,20 @@ dtrace_kreloc_fini = NULL; dtrace_modload = NULL; dtrace_modunload = NULL; +#endif mutex_exit(&cpu_lock); if (dtrace_helptrace_enabled) { - kmem_free(dtrace_helptrace_buffer, dtrace_helptrace_bufsize); + free(dtrace_helptrace_buffer, M_DTRACE); dtrace_helptrace_buffer = NULL; } - kmem_free(dtrace_probes, dtrace_nprobes * sizeof (dtrace_probe_t *)); - dtrace_probes = NULL; - dtrace_nprobes = 0; + if (dtrace_probes != NULL) { + free(dtrace_probes, M_DTRACE); + dtrace_probes = NULL; + dtrace_nprobes = 0; + } dtrace_hash_destroy(dtrace_bymod); dtrace_hash_destroy(dtrace_byfunc); @@ -108,27 +106,29 @@ dtrace_byfunc = NULL; dtrace_byname = NULL; +#ifdef DOODAD kmem_cache_destroy(dtrace_state_cache); vmem_destroy(dtrace_minor); vmem_destroy(dtrace_arena); +#endif if (dtrace_toxrange != NULL) { - kmem_free(dtrace_toxrange, - dtrace_toxranges_max * sizeof (dtrace_toxrange_t)); + free(dtrace_toxrange, M_DTRACE); dtrace_toxrange = NULL; dtrace_toxranges = 0; dtrace_toxranges_max = 0; } +#ifdef DOODAD ddi_remove_minor_node(dtrace_devi, NULL); dtrace_devi = NULL; ddi_soft_state_fini(&dtrace_softstate); +#endif ASSERT(dtrace_vtime_references == 0); ASSERT(dtrace_opens == 0); ASSERT(dtrace_retained == NULL); -#endif mtx_unlock(&dtrace_lock); mtx_unlock(&dtrace_provider_lock); @@ -153,5 +153,9 @@ mtx_destroy(&dtrace_provider_lock); mtx_destroy(&dtrace_lock); + /* XXX Hack */ + mtx_destroy(&cpu_lock); + mtx_destroy(&mod_lock); + return (error); } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 21:58:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 380B616A404; Thu, 20 Apr 2006 21:58:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 147E516A402 for ; Thu, 20 Apr 2006 21:58:07 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCA4E43D49 for ; Thu, 20 Apr 2006 21:58:06 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KLw6ks025600 for ; Thu, 20 Apr 2006 21:58:06 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KLw6GI025597 for perforce@freebsd.org; Thu, 20 Apr 2006 21:58:06 GMT (envelope-from millert@freebsd.org) Date: Thu, 20 Apr 2006 21:58:06 GMT Message-Id: <200604202158.k3KLw6GI025597@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95731 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 21:58:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=95731 Change 95731 by millert@millert_g5tower on 2006/04/20 21:58:02 Build components of policycoreutils Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/genhomedircon/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/newrole/newrole.1#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/newrole/newrole.c#3 delete .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/restorecon/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/semodule/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/semodule_expand/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/semodule_link/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/semodule_package/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/setfiles/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/setsebool/Makefile#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 22:01:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 65C6B16A407; Thu, 20 Apr 2006 22:01:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1360616A405 for ; Thu, 20 Apr 2006 22:01:13 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 013E843D6A for ; Thu, 20 Apr 2006 22:01:11 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KM1A8F027934 for ; Thu, 20 Apr 2006 22:01:10 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KM1AxJ027925 for perforce@freebsd.org; Thu, 20 Apr 2006 22:01:10 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 22:01:10 GMT Message-Id: <200604202201.k3KM1AxJ027925@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95732 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 22:01:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=95732 Change 95732 by jb@jb_freebsd2 on 2006/04/20 22:00:17 In the spirit of keeping Sun's functions grouped the way that they did, add the other registration functions to this file. I'm leaving CDDL copyright off these files for the time being so that I can cat the files together to diff them against Sun's dtrace.c Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_register.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_register.c#2 (text+ko) ==== @@ -1,25 +1,11 @@ + /* - * CDDL HEADER START + * DTrace Provider-to-Framework API Functions * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * $FreeBSD$ - * + * These functions implement much of the Provider-to-Framework API, as + * described in . The parts of the API not in this section are + * the functions in the API for probe management (found below), and + * dtrace_probe() itself (found above). */ /* @@ -77,14 +63,12 @@ return (EINVAL); } - /* The caller has probably obtained locks, so use M_NOWAIT here. */ - provider = malloc(sizeof (dtrace_provider_t), M_DTRACE, M_NOWAIT | M_ZERO); - provider->dtpv_name = malloc(strlen(name) + 1, M_DTRACE, M_NOWAIT | M_ZERO); + provider = kmem_zalloc(sizeof (dtrace_provider_t), KM_SLEEP); + provider->dtpv_name = kmem_alloc(strlen(name) + 1, KM_SLEEP); (void) strcpy(provider->dtpv_name, name); provider->dtpv_attr = *pap; provider->dtpv_priv.dtpp_flags = priv; -#ifdef DOODAD if (cr != NULL) { provider->dtpv_priv.dtpp_uid = crgetuid(cr); provider->dtpv_priv.dtpp_zoneid = crgetzoneid(cr); @@ -127,10 +111,9 @@ dtrace_provider = provider; return (0); } -#endif - mtx_lock(&dtrace_provider_lock); - mtx_lock(&dtrace_lock); + mutex_enter(&dtrace_provider_lock); + mutex_enter(&dtrace_lock); /* * If there is at least one provider registered, we'll add this @@ -143,7 +126,6 @@ dtrace_provider = provider; } -#ifdef DOODAD if (dtrace_retained != NULL) { dtrace_enabling_provide(provider); @@ -158,11 +140,248 @@ return (0); } -#endif + + mutex_exit(&dtrace_lock); + mutex_exit(&dtrace_provider_lock); + + return (0); +} + +/* + * Unregister the specified provider from the DTrace framework. This should + * generally be called by DTrace providers in their detach(9E) entry point. + */ +int +dtrace_unregister(dtrace_provider_id_t id) +{ + dtrace_provider_t *old = (dtrace_provider_t *)id; + dtrace_provider_t *prev = NULL; + int i, self = 0; + dtrace_probe_t *probe, *first = NULL; + + if (old->dtpv_pops.dtps_enable == + (void (*)(void *, dtrace_id_t, void *))dtrace_nullop) { + /* + * If DTrace itself is the provider, we're called with locks + * already held. + */ + ASSERT(old == dtrace_provider); + ASSERT(dtrace_devi != NULL); + ASSERT(MUTEX_HELD(&dtrace_provider_lock)); + ASSERT(MUTEX_HELD(&dtrace_lock)); + self = 1; + + if (dtrace_provider->dtpv_next != NULL) { + /* + * There's another provider here; return failure. + */ + return (EBUSY); + } + } else { + mutex_enter(&dtrace_provider_lock); + mutex_enter(&mod_lock); + mutex_enter(&dtrace_lock); + } + + /* + * If anyone has /dev/dtrace open, or if there are anonymous enabled + * probes, we refuse to let providers slither away, unless this + * provider has already been explicitly invalidated. + */ + if (!old->dtpv_defunct && + (dtrace_opens || (dtrace_anon.dta_state != NULL && + dtrace_anon.dta_state->dts_necbs > 0))) { + if (!self) { + mutex_exit(&dtrace_lock); + mutex_exit(&mod_lock); + mutex_exit(&dtrace_provider_lock); + } + return (EBUSY); + } + + /* + * Attempt to destroy the probes associated with this provider. + */ + for (i = 0; i < dtrace_nprobes; i++) { + if ((probe = dtrace_probes[i]) == NULL) + continue; + + if (probe->dtpr_provider != old) + continue; + + if (probe->dtpr_ecb == NULL) + continue; + + /* + * We have at least one ECB; we can't remove this provider. + */ + if (!self) { + mutex_exit(&dtrace_lock); + mutex_exit(&mod_lock); + mutex_exit(&dtrace_provider_lock); + } + return (EBUSY); + } + + /* + * All of the probes for this provider are disabled; we can safely + * remove all of them from their hash chains and from the probe array. + */ + for (i = 0; i < dtrace_nprobes; i++) { + if ((probe = dtrace_probes[i]) == NULL) + continue; + + if (probe->dtpr_provider != old) + continue; + + dtrace_probes[i] = NULL; + + dtrace_hash_remove(dtrace_bymod, probe); + dtrace_hash_remove(dtrace_byfunc, probe); + dtrace_hash_remove(dtrace_byname, probe); + + if (first == NULL) { + first = probe; + probe->dtpr_nextmod = NULL; + } else { + probe->dtpr_nextmod = first; + first = probe; + } + } + + /* + * The provider's probes have been removed from the hash chains and + * from the probe array. Now issue a dtrace_sync() to be sure that + * everyone has cleared out from any probe array processing. + */ + dtrace_sync(); + + for (probe = first; probe != NULL; probe = first) { + first = probe->dtpr_nextmod; + + old->dtpv_pops.dtps_destroy(old->dtpv_arg, probe->dtpr_id, + probe->dtpr_arg); + kmem_free(probe->dtpr_mod, strlen(probe->dtpr_mod) + 1); + kmem_free(probe->dtpr_func, strlen(probe->dtpr_func) + 1); + kmem_free(probe->dtpr_name, strlen(probe->dtpr_name) + 1); + vmem_free(dtrace_arena, (void *)(uintptr_t)(probe->dtpr_id), 1); + kmem_free(probe, sizeof (dtrace_probe_t)); + } + + if ((prev = dtrace_provider) == old) { + ASSERT(self || dtrace_devi == NULL); + ASSERT(old->dtpv_next == NULL || dtrace_devi == NULL); + dtrace_provider = old->dtpv_next; + } else { + while (prev != NULL && prev->dtpv_next != old) + prev = prev->dtpv_next; + + if (prev == NULL) { + panic("attempt to unregister non-existent " + "dtrace provider %p\n", (void *)id); + } + + prev->dtpv_next = old->dtpv_next; + } + + if (!self) { + mutex_exit(&dtrace_lock); + mutex_exit(&mod_lock); + mutex_exit(&dtrace_provider_lock); + } + + kmem_free(old->dtpv_name, strlen(old->dtpv_name) + 1); + kmem_free(old, sizeof (dtrace_provider_t)); + + return (0); +} + +/* + * Invalidate the specified provider. All subsequent probe lookups for the + * specified provider will fail, but its probes will not be removed. + */ +void +dtrace_invalidate(dtrace_provider_id_t id) +{ + dtrace_provider_t *pvp = (dtrace_provider_t *)id; + + ASSERT(pvp->dtpv_pops.dtps_enable != + (void (*)(void *, dtrace_id_t, void *))dtrace_nullop); + + mutex_enter(&dtrace_provider_lock); + mutex_enter(&dtrace_lock); + + pvp->dtpv_defunct = 1; + + mutex_exit(&dtrace_lock); + mutex_exit(&dtrace_provider_lock); +} + +/* + * Indicate whether or not DTrace has attached. + */ +int +dtrace_attached(void) +{ + /* + * dtrace_provider will be non-NULL iff the DTrace driver has + * attached. (It's non-NULL because DTrace is always itself a + * provider.) + */ + return (dtrace_provider != NULL); +} + +/* + * Remove all the unenabled probes for the given provider. This function is + * not unlike dtrace_unregister(), except that it doesn't remove the provider + * -- just as many of its associated probes as it can. + */ +int +dtrace_condense(dtrace_provider_id_t id) +{ + dtrace_provider_t *prov = (dtrace_provider_t *)id; + int i; + dtrace_probe_t *probe; + + /* + * Make sure this isn't the dtrace provider itself. + */ + ASSERT(prov->dtpv_pops.dtps_enable != + (void (*)(void *, dtrace_id_t, void *))dtrace_nullop); + + mutex_enter(&dtrace_provider_lock); + mutex_enter(&dtrace_lock); + + /* + * Attempt to destroy the probes associated with this provider. + */ + for (i = 0; i < dtrace_nprobes; i++) { + if ((probe = dtrace_probes[i]) == NULL) + continue; + + if (probe->dtpr_provider != prov) + continue; + + if (probe->dtpr_ecb != NULL) + continue; + + dtrace_probes[i] = NULL; + + dtrace_hash_remove(dtrace_bymod, probe); + dtrace_hash_remove(dtrace_byfunc, probe); + dtrace_hash_remove(dtrace_byname, probe); + + prov->dtpv_pops.dtps_destroy(prov->dtpv_arg, i + 1, + probe->dtpr_arg); + kmem_free(probe->dtpr_mod, strlen(probe->dtpr_mod) + 1); + kmem_free(probe->dtpr_func, strlen(probe->dtpr_func) + 1); + kmem_free(probe->dtpr_name, strlen(probe->dtpr_name) + 1); + kmem_free(probe, sizeof (dtrace_probe_t)); + vmem_free(dtrace_arena, (void *)((uintptr_t)i + 1), 1); + } - mtx_unlock(&dtrace_lock); - mtx_unlock(&dtrace_provider_lock); -printf("dtrace_register: name '%s'\n",name); + mutex_exit(&dtrace_lock); + mutex_exit(&dtrace_provider_lock); return (0); } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 22:05:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D13D916A403; Thu, 20 Apr 2006 22:05:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFAFC16A401 for ; Thu, 20 Apr 2006 22:05:16 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6991C43D45 for ; Thu, 20 Apr 2006 22:05:16 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KM5GB3031114 for ; Thu, 20 Apr 2006 22:05:16 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KM5GsE031111 for perforce@freebsd.org; Thu, 20 Apr 2006 22:05:16 GMT (envelope-from jb@freebsd.org) Date: Thu, 20 Apr 2006 22:05:16 GMT Message-Id: <200604202205.k3KM5GsE031111@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95733 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 22:05:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=95733 Change 95733 by jb@jb_freebsd2 on 2006/04/20 22:05:00 Suck another header. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/vmem.h#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Thu Apr 20 22:52:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 993D316A404; Thu, 20 Apr 2006 22:52:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 726FB16A401 for ; Thu, 20 Apr 2006 22:52:30 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04FAC43D9F for ; Thu, 20 Apr 2006 22:52:14 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KMqDr2053926 for ; Thu, 20 Apr 2006 22:52:13 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KMqD05053920 for perforce@freebsd.org; Thu, 20 Apr 2006 22:52:13 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 22:52:13 GMT Message-Id: <200604202252.k3KMqD05053920@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95735 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 22:52:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=95735 Change 95735 by imp@imp_hammer on 2006/04/20 22:51:46 Go ahead and configure the flash for the KB9202. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#4 (text) ==== @@ -93,6 +93,18 @@ while (!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MCKRDY)) continue; +#ifdef BOOT_KB9202 + // setup flash access (allow ample margin) + // 9 wait states, 1 setup, 1 hold, 1 float for 8-bit device + ((AT91PS_SMC2)AT91C_BASE_SMC2)->SMC2_CSR[0] = + AT91C_SMC2_WSEN | + (9 & AT91C_SMC2_NWS) | + ((1 << 8) & AT91C_SMC2_TDF) | + AT91C_SMC2_DBW_8 | + ((1 << 24) & AT91C_SMC2_RWSETUP) | + ((1 << 29) & AT91C_SMC2_RWHOLD); +#endif + // setup SDRAM access // EBI chip-select register (CS1 = SDRAM controller) // 9 col, 13row, 4 bank, CAS2 @@ -160,7 +172,7 @@ AT91C_BASE_PIOA->PIO_PDR = AT91C_PA31_DTXD | AT91C_PA30_DRXD; pUSART->US_IDR = (unsigned int) -1; pUSART->US_CR = - AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RXDIS | AT91C_US_TXDIS; + AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RXDIS | AT91C_US_TXDIS; pUSART->US_BRGR = ((((AT91C_MASTER_CLOCK*10)/(BAUD*16))+5)/10); pUSART->US_TTGR = 0; pPDC->PDC_PTCR = AT91C_PDC_RXTDIS; From owner-p4-projects@FreeBSD.ORG Thu Apr 20 22:56:20 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3E27E16A433; Thu, 20 Apr 2006 22:56:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E001D16A428 for ; Thu, 20 Apr 2006 22:56:19 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5400A43D76 for ; Thu, 20 Apr 2006 22:56:19 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KMuJpD057382 for ; Thu, 20 Apr 2006 22:56:19 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KMuJql057376 for perforce@freebsd.org; Thu, 20 Apr 2006 22:56:19 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 22:56:19 GMT Message-Id: <200604202256.k3KMuJql057376@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95736 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 22:56:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=95736 Change 95736 by imp@imp_hammer on 2006/04/20 22:56:05 Make boot loader work. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#7 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.c#2 (text+ko) ==== @@ -58,6 +58,7 @@ if (ch == '\0' || (currentOffset >= MAX_INPUT_SIZE)) { currentOffset = 0; ++currentIndex; + ch = '\r'; } return (ch); } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#7 (text+ko) ==== @@ -418,7 +418,7 @@ printf("\r\n>"); - while (ch >= 0) + while (1) if ((ch = ((*inputFunction)(0))) > 0) ServicePrompt(ch); } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 23:06:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B7D5116A434; Thu, 20 Apr 2006 23:06:35 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9690016A432 for ; Thu, 20 Apr 2006 23:06:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB7FD43D7C for ; Thu, 20 Apr 2006 23:06:32 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KN6Wg8063889 for ; Thu, 20 Apr 2006 23:06:32 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KN6WKQ063886 for perforce@freebsd.org; Thu, 20 Apr 2006 23:06:32 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 23:06:32 GMT Message-Id: <200604202306.k3KN6WKQ063886@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95738 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 23:06:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=95738 Change 95738 by imp@imp_hammer on 2006/04/20 23:05:36 Change the default by BOOT_TSC. Make sure that the boot loader programs are < 8k Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#8 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#8 (text+ko) ==== @@ -10,14 +10,16 @@ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Werror -#CFLAGS+=-DBOOT_TSC -CFLAGS+=-DBOOT_KB9202 +CFLAGS+=-DBOOT_TSC +#CFLAGS+=-DBOOT_KB9202 LIBAT91=${.OBJDIR}/../libat91/libat91.a .if defined(P) ${P}: ${P}.out objcopy -S -O binary ${P}.out ${.TARGET} + @set -- `ls -l ${.TARGET}`; x=$$((8192-$$5)); \ + echo "$$x bytes available"; test $$x -ge 0 ${P}.out: ${OBJS} ld ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LIBAT91} From owner-p4-projects@FreeBSD.ORG Thu Apr 20 23:43:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E106816A405; Thu, 20 Apr 2006 23:43:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F6BF16A403 for ; Thu, 20 Apr 2006 23:43:20 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2198943D53 for ; Thu, 20 Apr 2006 23:43:20 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KNhJEi084741 for ; Thu, 20 Apr 2006 23:43:19 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KNhIZL084735 for perforce@freebsd.org; Thu, 20 Apr 2006 23:43:18 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 23:43:18 GMT Message-Id: <200604202343.k3KNhIZL084735@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95739 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 23:43:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=95739 Change 95739 by imp@imp_hammer on 2006/04/20 23:43:13 arm_init.s -> .S Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#11 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.S#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.s#5 delete Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#11 (text+ko) ==== @@ -2,7 +2,7 @@ P=bootiic FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} From owner-p4-projects@FreeBSD.ORG Thu Apr 20 23:55:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A0A9016A405; Thu, 20 Apr 2006 23:55:35 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78A7E16A401 for ; Thu, 20 Apr 2006 23:55:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44FAA43D45 for ; Thu, 20 Apr 2006 23:55:35 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KNtZBZ089619 for ; Thu, 20 Apr 2006 23:55:35 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KNtYNJ089613 for perforce@freebsd.org; Thu, 20 Apr 2006 23:55:34 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 23:55:34 GMT Message-Id: <200604202355.k3KNtYNJ089613@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95740 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 23:55:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=95740 Change 95740 by imp@imp_hammer on 2006/04/20 23:54:53 Make life easier for booting FreeBSD over the net. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.S#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.S#2 (text+ko) ==== @@ -100,9 +100,18 @@ .global BootCommandSection BootCommandSection: +#ifdef SUPPORT_LINUX .string "Bootloader for KB9202 Evaluation Board." .string "c 0x20210000 0x10100000 0x80000 " .string "m 0 0 0 0 0 0 " .string "t 0x20000100 console=ttyS0,115200 root=/dev/ram rw initrd=0x20210000,654933" .string "e 0x10000000 " .string " " +#else + .string "Bootloader for KB9202 Evaluation Board." + .string "m 42 53 44 0 0 1 " + .string "ip 206 168 13 194 " + .string "server_ip 206 168 13 207 " + .string "tftp 0x20000000 kernel.bin " + .string "e 0x20000000 " +#endif From owner-p4-projects@FreeBSD.ORG Thu Apr 20 23:56:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6FC8C16A403; Thu, 20 Apr 2006 23:56:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 373AF16A401 for ; Thu, 20 Apr 2006 23:56:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0555343D48 for ; Thu, 20 Apr 2006 23:56:37 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KNuabX090367 for ; Thu, 20 Apr 2006 23:56:36 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KNuaGo090364 for perforce@freebsd.org; Thu, 20 Apr 2006 23:56:36 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 23:56:36 GMT Message-Id: <200604202356.k3KNuaGo090364@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95741 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 23:56:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=95741 Change 95741 by imp@imp_hammer on 2006/04/20 23:56:20 Initialize the EEPROM. This makes the boot0iic accept a binary and burn it into the iic. A heck of a lot easier than trying to use ramMonitor and 10 extra steps. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/doit.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/doit.c#3 (text+ko) ==== @@ -36,12 +36,9 @@ { int sec; - printf("Writing EEPROM\r\n"); + InitEEPROM(); + printf("Writing EEPROM from 0x%x to addr 0\r\n", addr); WriteEEPROM(0, addr, 8192); sec = GetSeconds(); - while (1) { - printf("Write complete. Press reset\r\n"); - while (sec == GetSeconds()) - continue; - } + printf("Write complete. Press reset\r\n"); } From owner-p4-projects@FreeBSD.ORG Thu Apr 20 23:57:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 63AC716A409; Thu, 20 Apr 2006 23:57:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A95116A402 for ; Thu, 20 Apr 2006 23:57:41 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7EF943D5A for ; Thu, 20 Apr 2006 23:57:38 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3KNvcBC091162 for ; Thu, 20 Apr 2006 23:57:38 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3KNvckl091156 for perforce@freebsd.org; Thu, 20 Apr 2006 23:57:38 GMT (envelope-from imp@freebsd.org) Date: Thu, 20 Apr 2006 23:57:38 GMT Message-Id: <200604202357.k3KNvckl091156@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95742 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 23:57:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95742 Change 95742 by imp@imp_hammer on 2006/04/20 23:56:48 Churn: KB9202 default until I get network working again. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#9 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#9 (text+ko) ==== @@ -10,8 +10,8 @@ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Werror -CFLAGS+=-DBOOT_TSC -#CFLAGS+=-DBOOT_KB9202 +#CFLAGS+=-DBOOT_TSC +CFLAGS+=-DBOOT_KB9202 LIBAT91=${.OBJDIR}/../libat91/libat91.a From owner-p4-projects@FreeBSD.ORG Fri Apr 21 02:01:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 44A4E16A409; Fri, 21 Apr 2006 02:01:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06CDE16A402 for ; Fri, 21 Apr 2006 02:01:08 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BFED43D45 for ; Fri, 21 Apr 2006 02:01:07 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L217qw066686 for ; Fri, 21 Apr 2006 02:01:07 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L217el066680 for perforce@freebsd.org; Fri, 21 Apr 2006 02:01:07 GMT (envelope-from marcel@freebsd.org) Date: Fri, 21 Apr 2006 02:01:07 GMT Message-Id: <200604210201.k3L217el066680@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 Cc: Subject: PERFORCE change 95744 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 02:01:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=95744 Change 95744 by marcel@marcel_nfs on 2006/04/21 02:00:10 o Include o Set port->p_giantintr when both INTR_FAST and INTR_MPSAFE are unset. Affected files ... .. //depot/projects/uart/dev/puc/puc.c#32 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#32 (text+ko) ==== @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -582,7 +583,7 @@ port->p_hasintr = 1; port->p_fastintr = (flags & INTR_FAST) ? 1 : 0; - port->p_giantintr = (flags & INTR_MPSAFE) ? 0 : 1; + port->p_giantintr = (flags & (INTR_FAST | INTR_MPSAFE)) ? 0 : 1; port->p_ih = ihand; port->p_iharg = arg; From owner-p4-projects@FreeBSD.ORG Fri Apr 21 02:30:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 21E7716A403; Fri, 21 Apr 2006 02:30:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B40EA16A402; Fri, 21 Apr 2006 02:30:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E7A143D49; Fri, 21 Apr 2006 02:30:07 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k3L2U6ww019253; Thu, 20 Apr 2006 22:30:06 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: John Birrell Date: Thu, 20 Apr 2006 22:27:46 -0400 User-Agent: KMail/1.8.3 References: <200604202154.k3KLs0BB022204@repoman.freebsd.org> In-Reply-To: <200604202154.k3KLs0BB022204@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200604202227.47757.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1411/Thu Apr 20 18:23:28 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 95729 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 02:30:08 -0000 On Thursday 20 April 2006 05:54 pm, John Birrell wrote: > http://perforce.freebsd.org/chv.cgi?CH=3D95729 > > Change 95729 by jb@jb_freebsd2 on 2006/04/20 21:53:46 > > Use macros to translate Solaris kmem_zalloc(), kmem_alloc() and > kmem_free() calls into their FreeBSD equivalents. This turns out to > be a neat way to port their code. > > Most memory allocations in this driver occur with one or more > mutex/es locked. Since dtrace is part of a released product, I'm > porting this on the assumption that the locking strategy works. > With witness enabled, I can't have it downgrade a M_WAITOK call > to a M_NOWAIT call just because it thinks it's a not a good idea > to sleep with locks held. For this code, we need to do that and > we can't afford to fail because the thing that we might be trying > to trace is the low memory situation. We might not be too > successful, but we need to try. Anyway... that's why the mutexes > are initialised with M_NOWITNESS. This is because FreeBSD mutexes !=3D Solaris mutexes. You may or may not e= nd up=20 with arbitrary panics and deadlocks if the malloc() actually blocks. You could use an sx(9) instead and just use sx_xlock() and sx_xunlock() which w= ill=20 be safe to hold across a blocking malloc(). =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org From owner-p4-projects@FreeBSD.ORG Fri Apr 21 06:37:49 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 56FC416A458; Fri, 21 Apr 2006 06:37:49 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30FF516A456 for ; Fri, 21 Apr 2006 06:37:49 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D02C243D48 for ; Fri, 21 Apr 2006 06:37:48 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L6bm7A026968 for ; Fri, 21 Apr 2006 06:37:48 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L6bmxk026959 for perforce@freebsd.org; Fri, 21 Apr 2006 06:37:48 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 06:37:48 GMT Message-Id: <200604210637.k3L6bmxk026959@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95757 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 06:37:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=95757 Change 95757 by imp@imp_harmony on 2006/04/21 06:36:51 IFC @95756 Affected files ... .. //depot/projects/arm/src/sys/alpha/isa/isa.c#3 integrate .. //depot/projects/arm/src/sys/alpha/pci/apecs_pci.c#2 integrate .. //depot/projects/arm/src/sys/alpha/pci/lca_pci.c#2 integrate .. //depot/projects/arm/src/sys/alpha/pci/pcibus.c#3 integrate .. //depot/projects/arm/src/sys/amd64/amd64/dump_machdep.c#3 integrate .. //depot/projects/arm/src/sys/amd64/amd64/minidump_machdep.c#1 branch .. //depot/projects/arm/src/sys/amd64/amd64/nexus.c#3 integrate .. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#11 integrate .. //depot/projects/arm/src/sys/amd64/amd64/uma_machdep.c#2 integrate .. //depot/projects/arm/src/sys/amd64/include/md_var.h#3 integrate .. //depot/projects/arm/src/sys/amd64/include/minidump.h#1 branch .. //depot/projects/arm/src/sys/arm/arm/nexus.c#3 integrate .. //depot/projects/arm/src/sys/arm/at91/at91.c#16 integrate .. //depot/projects/arm/src/sys/arm/sa11x0/sa11x0.c#3 integrate .. //depot/projects/arm/src/sys/arm/xscale/i80321/i80321_pci.c#5 integrate .. //depot/projects/arm/src/sys/arm/xscale/i80321/iq80321.c#5 integrate .. //depot/projects/arm/src/sys/arm/xscale/i80321/obio.c#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.s#6 branch .. //depot/projects/arm/src/sys/conf/files.amd64#10 integrate .. //depot/projects/arm/src/sys/conf/files.i386#12 integrate .. //depot/projects/arm/src/sys/crypto/via/padlock.c#3 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi.c#7 integrate .. //depot/projects/arm/src/sys/dev/ciss/ciss.c#6 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.c#10 integrate .. //depot/projects/arm/src/sys/geom/eli/g_eli.c#9 integrate .. //depot/projects/arm/src/sys/geom/eli/g_eli_crypto.c#3 integrate .. //depot/projects/arm/src/sys/i386/i386/dump_machdep.c#3 integrate .. //depot/projects/arm/src/sys/i386/i386/minidump_machdep.c#1 branch .. //depot/projects/arm/src/sys/i386/i386/nexus.c#3 integrate .. //depot/projects/arm/src/sys/i386/include/md_var.h#3 integrate .. //depot/projects/arm/src/sys/i386/include/minidump.h#1 branch .. //depot/projects/arm/src/sys/ia64/ia64/nexus.c#3 integrate .. //depot/projects/arm/src/sys/kern/kern_rwlock.c#4 integrate .. //depot/projects/arm/src/sys/kern/subr_bus.c#6 integrate .. //depot/projects/arm/src/sys/kern/subr_rman.c#6 integrate .. //depot/projects/arm/src/sys/powerpc/powermac/grackle.c#2 integrate .. //depot/projects/arm/src/sys/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/arm/src/sys/powerpc/powermac/macio.c#3 integrate .. //depot/projects/arm/src/sys/powerpc/powermac/uninorth.c#3 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/arm/src/sys/powerpc/psim/iobus.c#2 integrate .. //depot/projects/arm/src/sys/sparc64/ebus/ebus.c#5 integrate .. //depot/projects/arm/src/sys/sparc64/pci/psycho.c#5 integrate .. //depot/projects/arm/src/sys/sparc64/sbus/sbus.c#5 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/nexus.c#3 integrate .. //depot/projects/arm/src/sys/sys/bus.h#4 integrate .. //depot/projects/arm/src/sys/sys/rwlock.h#2 integrate .. //depot/projects/arm/src/sys/vm/vm_page.c#10 integrate Differences ... ==== //depot/projects/arm/src/sys/alpha/isa/isa.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/isa/isa.c,v 1.38 2005/10/25 19:48:45 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/isa/isa.c,v 1.39 2006/04/20 04:16:02 imp Exp $"); #include #include @@ -231,6 +231,7 @@ res = rman_reserve_resource(&isa_drq_rman, start, start, 1, 0, child); + rman_set_rid(res, *rid); if (res && !passthrough) { rle = resource_list_find(rl, type, *rid); rle->start = rman_get_start(res); ==== //depot/projects/arm/src/sys/alpha/pci/apecs_pci.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/apecs_pci.c,v 1.15 2003/08/22 07:20:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/pci/apecs_pci.c,v 1.16 2006/04/20 04:16:02 imp Exp $"); #include #include @@ -79,12 +79,17 @@ apecs_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { + struct resource *rv = NULL; + if ((hwrpb->rpb_type == ST_DEC_2100_A50) && (type == SYS_RES_IRQ)) - return isa_alloc_intr(bus, child, start); + rv = isa_alloc_intr(bus, child, start); else - return alpha_pci_alloc_resource(bus, child, type, rid, - start, end, count, flags); + rv = alpha_pci_alloc_resource(bus, child, type, rid, + start, end, count, flags); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } static int ==== //depot/projects/arm/src/sys/alpha/pci/lca_pci.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/lca_pci.c,v 1.17 2003/08/22 07:20:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/pci/lca_pci.c,v 1.18 2006/04/20 04:16:02 imp Exp $"); #include #include @@ -78,11 +78,16 @@ lca_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { + struct resource *rv = NULL; + if (type == SYS_RES_IRQ) - return isa_alloc_intr(bus, child, start); + rv = isa_alloc_intr(bus, child, start); else - return alpha_pci_alloc_resource(bus, child, type, rid, - start, end, count, flags); + rv = alpha_pci_alloc_resource(bus, child, type, rid, + start, end, count, flags); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } static int ==== //depot/projects/arm/src/sys/alpha/pci/pcibus.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.37 2005/09/25 20:12:29 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.38 2006/04/20 04:16:02 imp Exp $"); #include "opt_isa.h" @@ -96,7 +96,12 @@ alpha_platform_alloc_ide_intr(int chan) { int irqs[2] = { 14, 15 }; - return isa_alloc_intr(0, 0, irqs[chan]); + struct resource *rv; + + rv = isa_alloc_intr(0, 0, irqs[chan]); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } int @@ -230,9 +235,11 @@ #ifdef DEV_ISA if((start >= ISA_IRQ_OFFSET) && (end < ISA_IRQ_OFFSET + ISA_IRQ_LEN)) { - return isa_alloc_intrs(bus, child, - start - ISA_IRQ_OFFSET, - end - ISA_IRQ_OFFSET); + rv = isa_alloc_intrs(bus, child, + start - ISA_IRQ_OFFSET, end - ISA_IRQ_OFFSET); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } else #endif @@ -252,6 +259,7 @@ if (rv == 0) return 0; + rman_set_rid(rv, *rid); rstart = rman_get_start(rv); rman_set_bustag(rv, ALPHAPCI_GET_BUSTAG(bus, type)); rman_set_bushandle(rv, rstart); ==== //depot/projects/arm/src/sys/amd64/amd64/dump_machdep.c#3 (text+ko) ==== @@ -25,12 +25,13 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/dump_machdep.c,v 1.11 2005/07/02 19:57:30 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/dump_machdep.c,v 1.12 2006/04/21 04:24:50 peter Exp $"); #include #include #include #include +#include #include #include #include @@ -40,6 +41,11 @@ CTASSERT(sizeof(struct kerneldumpheader) == 512); +int do_minidump = 1; +TUNABLE_INT("debug.minidump", &do_minidump); +SYSCTL_INT(_debug, OID_AUTO, minidump, CTLFLAG_RW, &do_minidump, 0, + "Enable mini crash dumps"); + /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This * is to protect us from metadata and to protect metadata from us. @@ -272,6 +278,10 @@ size_t hdrsz; int error; + if (do_minidump) { + minidumpsys(di); + return; + } bzero(&ehdr, sizeof(ehdr)); ehdr.e_ident[EI_MAG0] = ELFMAG0; ehdr.e_ident[EI_MAG1] = ELFMAG1; ==== //depot/projects/arm/src/sys/amd64/amd64/nexus.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.67 2005/09/25 20:03:41 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.68 2006/04/20 04:16:34 imp Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -340,7 +340,7 @@ rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == 0) return 0; - + rman_set_rid(rv, *rid); if (type == SYS_RES_MEMORY) { rman_set_bustag(rv, AMD64_BUS_SPACE_MEM); } else if (type == SYS_RES_IOPORT) { ==== //depot/projects/arm/src/sys/amd64/amd64/pmap.c#11 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.547 2006/04/18 20:17:32 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.549 2006/04/21 04:50:18 peter Exp $"); /* * Manages physical address maps. @@ -181,7 +181,7 @@ static u_int64_t KPTphys; /* phys addr of kernel level 1 */ static u_int64_t KPDphys; /* phys addr of kernel level 2 */ -static u_int64_t KPDPphys; /* phys addr of kernel level 3 */ +u_int64_t KPDPphys; /* phys addr of kernel level 3 */ u_int64_t KPML4phys; /* phys addr of kernel level 4 */ static u_int64_t DMPDphys; /* phys addr of direct mapped level 2 */ @@ -1565,6 +1565,7 @@ /* entire chunk is free, return it */ TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m->phys_addr); vm_page_lock_queues(); vm_page_free(m); vm_page_unlock_queues(); @@ -1645,6 +1646,7 @@ PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); colour++; + dump_add_page(m->phys_addr); pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ @@ -2794,6 +2796,7 @@ PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m->phys_addr); vm_page_lock_queues(); vm_page_free(m); vm_page_unlock_queues(); ==== //depot/projects/arm/src/sys/amd64/amd64/uma_machdep.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/uma_machdep.c,v 1.1 2003/10/14 05:51:31 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/uma_machdep.c,v 1.2 2006/04/21 04:24:50 peter Exp $"); #include #include @@ -44,6 +44,7 @@ { static vm_pindex_t colour; vm_page_t m; + vm_paddr_t pa; void *va; int pflags; @@ -64,7 +65,9 @@ } else break; } - va = (void *)PHYS_TO_DMAP(m->phys_addr); + pa = m->phys_addr; + dump_add_page(pa); + va = (void *)PHYS_TO_DMAP(pa); if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) pagezero(va); return (va); @@ -74,8 +77,11 @@ uma_small_free(void *mem, int size, u_int8_t flags) { vm_page_t m; + vm_paddr_t pa; - m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)mem)); + pa = DMAP_TO_PHYS((vm_offset_t)mem); + dump_drop_page(pa); + m = PHYS_TO_VM_PAGE(pa); vm_page_lock_queues(); vm_page_free(m); vm_page_unlock_queues(); ==== //depot/projects/arm/src/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.76 2005/10/14 22:52:00 jkim Exp $ + * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.77 2006/04/21 04:24:50 peter Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -53,6 +53,8 @@ extern char kstack[]; extern char sigcode[]; extern int szsigcode; +extern uint64_t *vm_page_dump; +extern int vm_page_dump_size; extern struct pcpu __pcpu[]; @@ -61,11 +63,14 @@ struct reg; struct fpreg; struct dbreg; +struct dumperinfo; void busdma_swi(void); void cpu_setregs(void); void doreti_iret(void) __asm(__STRING(doreti_iret)); void doreti_iret_fault(void) __asm(__STRING(doreti_iret_fault)); +void dump_add_page(vm_paddr_t); +void dump_drop_page(vm_paddr_t); void initializecpu(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void fpstate_drop(struct thread *td); @@ -75,5 +80,6 @@ void pagezero(void *addr); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); int user_dbreg_trap(void); +void minidumpsys(struct dumperinfo *); #endif /* !_MACHINE_MD_VAR_H_ */ ==== //depot/projects/arm/src/sys/arm/arm/nexus.c#3 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.6 2005/09/25 21:06:49 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.7 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -214,6 +214,7 @@ if (rv == 0) return 0; + rman_set_rid(rv, *rid); rman_set_bustag(rv, (void*)ARM_BUS_SPACE_MEM); rman_set_bushandle(rv, rman_get_start(rv)); ==== //depot/projects/arm/src/sys/arm/at91/at91.c#16 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.4 2006/04/06 04:32:29 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.5 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -497,6 +497,7 @@ rle->start = rman_get_start(rle->res); rle->end = rman_get_end(rle->res); rle->count = count; + rman_set_rid(rle->res, *rid); } return (rle->res); } ==== //depot/projects/arm/src/sys/arm/sa11x0/sa11x0.c#3 (text+ko) ==== @@ -57,7 +57,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0.c,v 1.5 2005/09/25 21:06:50 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0.c,v 1.6 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -127,6 +127,8 @@ res = rman_reserve_resource(&sa11x0_softc->sa11x0_rman, *rid, *rid, count, flags, child); + if (res != NULL) + rman_set_rid(res, *rid); return (res); } ==== //depot/projects/arm/src/sys/arm/xscale/i80321/i80321_pci.c#5 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.7 2006/04/13 15:07:59 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_pci.c,v 1.8 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -380,6 +380,7 @@ rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == NULL) return (NULL); + rman_set_rid(rv, *rid); if (type != SYS_RES_IRQ) { if (type == SYS_RES_MEMORY) bh += (rman_get_start(rv)); ==== //depot/projects/arm/src/sys/arm/xscale/i80321/iq80321.c#5 (text+ko) ==== @@ -42,7 +42,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq80321.c,v 1.10 2005/10/03 14:19:55 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq80321.c,v 1.11 2006/04/20 04:12:02 imp Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -300,10 +300,14 @@ u_long start, u_long end, u_long count, u_int flags) { struct i80321_softc *sc = device_get_softc(dev); - - if (type == SYS_RES_IRQ) - return (rman_reserve_resource(&sc->sc_irq_rman, - start, end, count, flags, child)); + struct resource *rv; + + if (type == SYS_RES_IRQ) { + rv = rman_reserve_resource(&sc->sc_irq_rman, + start, end, count, flags, child); + if (rv != NULL) + rman_set_rid(rv, *rid); + } return (NULL); } ==== //depot/projects/arm/src/sys/arm/xscale/i80321/obio.c#3 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/obio.c,v 1.3 2005/09/25 21:06:50 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/obio.c,v 1.4 2006/04/20 04:12:02 imp Exp $"); #include #include @@ -124,6 +124,7 @@ return (NULL); if (type == SYS_RES_IRQ) return (rv); + rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); ==== //depot/projects/arm/src/sys/conf/files.amd64#10 (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.83 2006/03/05 22:52:16 yar Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.84 2006/04/21 04:24: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 @@ -104,6 +104,7 @@ amd64/amd64/locore.S standard no-obj amd64/amd64/machdep.c standard amd64/amd64/mem.c optional mem +amd64/amd64/minidump_machdep.c standard amd64/amd64/mp_machdep.c optional smp amd64/amd64/mp_watchdog.c optional mp_watchdog smp amd64/amd64/mpboot.S optional smp ==== //depot/projects/arm/src/sys/conf/files.i386#12 (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.i386,v 1.553 2006/03/05 22:52:16 yar Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.554 2006/04/21 04:28:43 peter Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -272,6 +272,7 @@ i386/i386/longrun.c optional cpu_enable_longrun i386/i386/machdep.c standard i386/i386/mem.c optional mem +i386/i386/minidump_machdep.c standard i386/i386/mp_clock.c optional smp i386/i386/mp_machdep.c optional smp i386/i386/mp_watchdog.c optional mp_watchdog smp ==== //depot/projects/arm/src/sys/crypto/via/padlock.c#3 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.2 2006/04/12 12:13:34 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.3 2006/04/20 06:31:44 pjd Exp $"); #include #include @@ -366,6 +366,10 @@ err = EINVAL; goto out; } + if ((crd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { + err = EINVAL; + goto out; + } mtx_lock(&sc->sc_sessions_mtx); TAILQ_FOREACH(ses, &sc->sc_sessions, ses_next) { ==== //depot/projects/arm/src/sys/dev/acpica/acpi.c#7 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.221 2006/04/15 12:31:32 iwasaki Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.222 2006/04/20 04:21:27 imp Exp $"); #include "opt_acpi.h" #include @@ -1015,6 +1015,7 @@ goto out; /* Copy the bus tag and handle from the pre-allocated resource. */ + rman_set_rid(res, *rid); rman_set_bustag(res, rman_get_bustag(rle->res)); rman_set_bushandle(res, rman_get_start(res)); ==== //depot/projects/arm/src/sys/dev/ciss/ciss.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/ciss/ciss.c,v 1.67 2005/12/16 06:50:55 ps Exp $ + * $FreeBSD: src/sys/dev/ciss/ciss.c,v 1.69 2006/04/20 03:05:02 ps Exp $ */ /* @@ -1651,7 +1651,7 @@ ciss_free(struct ciss_softc *sc) { struct ciss_request *cr; - int i; + int i, j; debug_called(1); @@ -1725,8 +1725,15 @@ cam_simq_free(sc->ciss_cam_devq); if (sc->ciss_logical) { - for (i = 0; i < sc->ciss_max_logical_bus; i++) + for (i = 0; i <= sc->ciss_max_logical_bus; i++) { + for (j = 0; j < CISS_MAX_LOGICAL; j++) { + if (sc->ciss_logical[i][j].cl_ldrive) + free(sc->ciss_logical[i][j].cl_ldrive, CISS_MALLOC_CLASS); + if (sc->ciss_logical[i][j].cl_lstatus) + free(sc->ciss_logical[i][j].cl_lstatus, CISS_MALLOC_CLASS); + } free(sc->ciss_logical[i], CISS_MALLOC_CLASS); + } free(sc->ciss_logical, CISS_MALLOC_CLASS); } @@ -3588,7 +3595,7 @@ static void ciss_notify_hotplug(struct ciss_softc *sc, struct ciss_notify *cn) { - struct ciss_lun_report *cll; + struct ciss_lun_report *cll = NULL; int bus, target; int s; @@ -3626,6 +3633,9 @@ ciss_printf(sc, "Unknown hotplug event %d\n", cn->subclass); return; } + + if (cll != NULL) + free(cll, CISS_MALLOC_CLASS); } /************************************************************************ ==== //depot/projects/arm/src/sys/dev/mpt/mpt.c#10 (text+ko) ==== @@ -92,7 +92,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt.c,v 1.26 2006/04/11 16:47:30 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt.c,v 1.27 2006/04/19 21:17:33 mjacob Exp $"); #include #include /* XXX For static handler registration */ @@ -661,7 +661,6 @@ { struct mpt_softc *mpt; uint32_t reply_desc; - uint32_t last_reply_desc = MPT_REPLY_EMPTY; int ntrips = 0; mpt = (struct mpt_softc *)arg; @@ -675,15 +674,6 @@ u_int req_index; int free_rf; - if (reply_desc == last_reply_desc) { - mpt_prt(mpt, "debounce reply_desc 0x%x\n", reply_desc); - if (ntrips++ == 1000) { - break; - } - continue; - } - last_reply_desc = reply_desc; - req = NULL; reply_frame = NULL; reply_baddr = 0; ==== //depot/projects/arm/src/sys/geom/eli/g_eli.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/eli/g_eli.c,v 1.23 2006/04/15 18:30:42 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/eli/g_eli.c,v 1.24 2006/04/20 06:33:46 pjd Exp $"); #include #include @@ -532,8 +532,7 @@ crd->crd_skip = 0; crd->crd_len = secsize; - crd->crd_flags = - CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT | CRD_F_KEY_EXPLICIT; + crd->crd_flags = CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT; if (bp->bio_cmd == BIO_WRITE) crd->crd_flags |= CRD_F_ENCRYPT; crd->crd_alg = sc->sc_algo; ==== //depot/projects/arm/src/sys/geom/eli/g_eli_crypto.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/eli/g_eli_crypto.c,v 1.2 2006/02/01 12:05:59 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/eli/g_eli_crypto.c,v 1.3 2006/04/20 06:33:46 pjd Exp $"); #include #ifdef _KERNEL @@ -97,7 +97,7 @@ crd->crd_skip = 0; crd->crd_len = datasize; - crd->crd_flags = CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT | CRD_F_KEY_EXPLICIT; + crd->crd_flags = CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT; if (enc) crd->crd_flags |= CRD_F_ENCRYPT; crd->crd_alg = algo; ==== //depot/projects/arm/src/sys/i386/i386/dump_machdep.c#3 (text+ko) ==== @@ -25,12 +25,13 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/dump_machdep.c,v 1.11 2005/07/02 19:57:31 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/dump_machdep.c,v 1.12 2006/04/21 04:28:43 peter Exp $"); #include #include #include #include +#include #include #include #include @@ -40,6 +41,11 @@ CTASSERT(sizeof(struct kerneldumpheader) == 512); +int do_minidump = 1; +TUNABLE_INT("debug.minidump", &do_minidump); +SYSCTL_INT(_debug, OID_AUTO, minidump, CTLFLAG_RW, &do_minidump, 0, + "Enable mini crash dumps"); + /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This * is to protect us from metadata and to protect metadata from us. @@ -272,6 +278,10 @@ size_t hdrsz; int error; + if (do_minidump) { + minidumpsys(di); + return; + } bzero(&ehdr, sizeof(ehdr)); ehdr.e_ident[EI_MAG0] = ELFMAG0; ehdr.e_ident[EI_MAG1] = ELFMAG1; ==== //depot/projects/arm/src/sys/i386/i386/nexus.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/nexus.c,v 1.62 2005/05/10 12:02:15 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/nexus.c,v 1.63 2006/04/20 04:10:27 imp Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -352,7 +352,7 @@ rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == 0) return 0; - + rman_set_rid(rv, *rid); if (type == SYS_RES_MEMORY) { rman_set_bustag(rv, I386_BUS_SPACE_MEM); } else if (type == SYS_RES_IOPORT) { ==== //depot/projects/arm/src/sys/i386/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/i386/include/md_var.h,v 1.73 2005/10/14 22:52:01 jkim Exp $ + * $FreeBSD: src/sys/i386/include/md_var.h,v 1.74 2006/04/21 04:28:43 peter Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -65,12 +65,15 @@ #ifdef COMPAT_43 extern int szosigcode; #endif +extern uint32_t *vm_page_dump; +extern int vm_page_dump_size; typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss); struct thread; struct reg; struct fpreg; struct dbreg; +struct dumperinfo; void bcopyb(const void *from, void *to, size_t len); void busdma_swi(void); @@ -84,6 +87,8 @@ void doreti_popl_es_fault(void) __asm(__STRING(doreti_popl_es_fault)); void doreti_popl_fs(void) __asm(__STRING(doreti_popl_fs)); void doreti_popl_fs_fault(void) __asm(__STRING(doreti_popl_fs_fault)); +void dump_add_page(vm_paddr_t); +void dump_drop_page(vm_paddr_t); void enable_sse(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void i486_bzero(void *buf, size_t len); @@ -99,5 +104,6 @@ vm_paddr_t kvtop(void *addr); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); int user_dbreg_trap(void); +void minidumpsys(struct dumperinfo *); #endif /* !_MACHINE_MD_VAR_H_ */ ==== //depot/projects/arm/src/sys/ia64/ia64/nexus.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia64/nexus.c,v 1.12 2005/10/06 17:39:18 phk Exp $ + * $FreeBSD: src/sys/ia64/ia64/nexus.c,v 1.13 2006/04/20 04:18:30 imp Exp $ */ /* @@ -401,6 +401,7 @@ if (rv == 0) return 0; + rman_set_rid(rv, *rid); if (type == SYS_RES_MEMORY) { rman_set_bustag(rv, IA64_BUS_SPACE_MEM); } else if (type == SYS_RES_IOPORT) { ==== //depot/projects/arm/src/sys/kern/kern_rwlock.c#4 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_rwlock.c,v 1.8 2006/04/18 20:32:42 wkoszek Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_rwlock.c,v 1.9 2006/04/19 21:06:52 jhb Exp $"); #include "opt_ddb.h" @@ -55,7 +55,7 @@ struct lock_class lock_class_rw = { "rw", - LC_SLEEPLOCK | LC_RECURSABLE /* | LC_UPGRADABLE */, + LC_SLEEPLOCK | LC_RECURSABLE | LC_UPGRADABLE, #ifdef DDB db_show_rwlock #endif @@ -87,7 +87,7 @@ rw->rw_lock = RW_UNLOCKED; lock_init(&rw->rw_object, &lock_class_rw, name, NULL, LO_WITNESS | - LO_RECURSABLE /* | LO_UPGRADABLE */); + LO_RECURSABLE | LO_UPGRADABLE); } void @@ -585,6 +585,137 @@ turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); } +/* + * Attempt to do a non-blocking upgrade from a read lock to a write + * lock. This will only succeed if this thread holds a single read + * lock. Returns true if the upgrade succeeded and false otherwise. + */ +int +_rw_try_upgrade(struct rwlock *rw, const char *file, int line) +{ + uintptr_t v, tid; + int success; + + _rw_assert(rw, RA_RLOCKED, file, line); + + /* + * Attempt to switch from one reader to a writer. If there + * are any write waiters, then we will have to lock the + * turnstile first to prevent races with another writer + * calling turnstile_wait() before we have claimed this + * turnstile. So, do the simple case of no waiters first. + */ + tid = (uintptr_t)curthread; + if (!(rw->rw_lock & RW_LOCK_WRITE_WAITERS)) { + success = atomic_cmpset_acq_ptr(&rw->rw_lock, + RW_READERS_LOCK(1), tid); + goto out; + } + + /* + * Ok, we think we have write waiters, so lock the + * turnstile. + */ + turnstile_lock(&rw->rw_object); + + /* + * Try to switch from one reader to a writer again. This time + * we honor the current state of the RW_LOCK_WRITE_WAITERS + * flag. If we obtain the lock with the flag set, then claim + * ownership of the turnstile. In the SMP case it is possible + * for there to not be an associated turnstile even though there + * are waiters if all of the waiters are spinning. + */ + v = rw->rw_lock & RW_LOCK_WRITE_WAITERS; + success = atomic_cmpset_acq_ptr(&rw->rw_lock, RW_READERS_LOCK(1) | v, + tid | v); +#ifdef SMP + if (success && v && turnstile_lookup(&rw->rw_object) != NULL) +#else + if (success && v) +#endif + turnstile_claim(&rw->rw_object); + else + turnstile_release(&rw->rw_object); +out: + LOCK_LOG_TRY("WUPGRADE", &rw->rw_object, 0, success, file, line); + if (success) + WITNESS_UPGRADE(&rw->rw_object, LOP_EXCLUSIVE | LOP_TRYLOCK, + file, line); + return (success); +} + +/* + * Downgrade a write lock into a single read lock. + */ +void +_rw_downgrade(struct rwlock *rw, const char *file, int line) +{ + struct turnstile *ts; + uintptr_t tid, v; + + _rw_assert(rw, RA_WLOCKED, file, line); + + WITNESS_DOWNGRADE(&rw->rw_object, 0, file, line); + + /* + * Convert from a writer to a single reader. First we handle + * the easy case with no waiters. If there are any waiters, we + * lock the turnstile, "disown" the lock, and awaken any read + * waiters. + */ + tid = (uintptr_t)curthread; + if (atomic_cmpset_rel_ptr(&rw->rw_lock, tid, RW_READERS_LOCK(1))) + goto out; + + /* + * Ok, we think we have waiters, so lock the turnstile so we can + * read the waiter flags without any races. + */ + turnstile_lock(&rw->rw_object); + v = rw->rw_lock; + MPASS(v & (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS)); + + /* + * Downgrade from a write lock while preserving + * RW_LOCK_WRITE_WAITERS and give up ownership of the + * turnstile. If there are any read waiters, wake them up. + * + * For SMP, we have to allow for the fact that all of the + * read waiters might be spinning. In that case, act as if + * RW_LOCK_READ_WAITERS is not set. Also, only preserve + * the RW_LOCK_WRITE_WAITERS flag if at least one writer is + * blocked on the turnstile. + */ + ts = turnstile_lookup(&rw->rw_object); +#ifdef SMP + if (ts == NULL) >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Apr 21 06:56:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5EFD216A407; Fri, 21 Apr 2006 06:56:15 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 335AB16A402 for ; Fri, 21 Apr 2006 06:56:15 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5569743D6A for ; Fri, 21 Apr 2006 06:56:12 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L6uCrO036197 for ; Fri, 21 Apr 2006 06:56:12 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L6uCSC036191 for perforce@freebsd.org; Fri, 21 Apr 2006 06:56:12 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 06:56:12 GMT Message-Id: <200604210656.k3L6uCSC036191@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95760 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 06:56:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=95760 Change 95760 by imp@imp_harmony on 2006/04/21 06:55:20 manually merge back from freebsd Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/linker.cfg#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/linker.cfg#4 (text+ko) ==== @@ -17,6 +17,8 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK + * + * $FreeBSD: src/sys/boot/arm/at91/linker.cfg,v 1.1 2006/04/19 17:16:48 imp Exp $ ******************************************************************************/ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") From owner-p4-projects@FreeBSD.ORG Fri Apr 21 06:58:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 67B5116A406; Fri, 21 Apr 2006 06:58:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4581716A404 for ; Fri, 21 Apr 2006 06:58:16 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D68CA43D4C for ; Fri, 21 Apr 2006 06:58:15 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L6wFMc037488 for ; Fri, 21 Apr 2006 06:58:15 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L6wFTW037483 for perforce@freebsd.org; Fri, 21 Apr 2006 06:58:15 GMT (envelope-from jb@freebsd.org) Date: Fri, 21 Apr 2006 06:58:15 GMT Message-Id: <200604210658.k3L6wFTW037483@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95762 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 06:58:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=95762 Change 95762 by jb@jb_freebsd2 on 2006/04/21 06:57:52 Change the DTRACE option to KDTRACE because DTRACE conflicted with the DTRACE device. The KDTRACE option means: "build DTrace support into the kernel". Specifying this option builds in code covered by CDDL and if the binary is distributed, changes to the CDDL files must be distributed too. It is this restriction/limitation which means that the DTrace support *must* be an option. The dtrace device can be built into the kernel or loaded as a module. It can only be loaded if the kernel was built with the KDTRACE option. Affected files ... .. //depot/projects/dtrace/src/sys/conf/options#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/options#4 (text+ko) ==== @@ -599,7 +599,7 @@ PCFCLOCK_VERBOSE opt_pcfclock.h PCFCLOCK_MAX_RETRIES opt_pcfclock.h -DTRACE opt_dtrace.h +KDTRACE opt_kdtrace.h KTR opt_global.h KTR_ALQ opt_ktr.h KTR_MASK opt_ktr.h From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:05:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4691E16A40F; Fri, 21 Apr 2006 07:05:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 073B316A401 for ; Fri, 21 Apr 2006 07:05:41 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CE5B43D7D for ; Fri, 21 Apr 2006 07:05:26 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L75PXB043312 for ; Fri, 21 Apr 2006 07:05:25 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L75Pbo043308 for perforce@freebsd.org; Fri, 21 Apr 2006 07:05:25 GMT (envelope-from jb@freebsd.org) Date: Fri, 21 Apr 2006 07:05:25 GMT Message-Id: <200604210705.k3L75Pbo043308@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95764 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:05:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95764 Change 95764 by jb@jb_freebsd2 on 2006/04/21 07:04:52 Add a new system header for CPU variables. This file is named the same way as Sun's file and it has their license. It has to exist as a separate file so that it can retain their license. I don't think it's possible to add CDDL restricted code to BSD licensed files. The array of cpu_core structures is explicitly for DTrace. The entire array must be mapped across all processors so that DTrace running on one processor can trace a process running on a different processor. The array exists as a global variable because that's how Sun's code accesses it. Affected files ... .. //depot/projects/dtrace/src/sys/kern/subr_pcpu.c#2 edit .. //depot/projects/dtrace/src/sys/sys/cpuvar.h#1 add Differences ... ==== //depot/projects/dtrace/src/sys/kern/subr_pcpu.c#2 (text+ko) ==== @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD: src/sys/kern/subr_pcpu.c,v 1.8 2005/11/03 21:06:29 jhb Exp $"); #include "opt_ddb.h" +#include "opt_kdtrace.h" #include #include @@ -59,6 +60,12 @@ static struct pcpu *cpuid_to_pcpu[MAXCPU]; struct cpuhead cpuhead = SLIST_HEAD_INITIALIZER(cpuhead); +#ifdef KDTRACE +#include + +cpu_core_t cpu_core[MAXCPU]; +#endif + /* * Initialize the MI portions of a struct pcpu. */ From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:05:46 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9352616A408; Fri, 21 Apr 2006 07:05:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 599E816A405 for ; Fri, 21 Apr 2006 07:05:46 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0236543D7B for ; Fri, 21 Apr 2006 07:05:26 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L75PU1043305 for ; Fri, 21 Apr 2006 07:05:25 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L75Pts043290 for perforce@freebsd.org; Fri, 21 Apr 2006 07:05:25 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 07:05:25 GMT Message-Id: <200604210705.k3L75Pts043290@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95763 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:05:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=95763 Change 95763 by imp@imp_harmony on 2006/04/21 07:04:38 integrate -i Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91_pio.c#9 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_pioreg.h#3 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_pmc.c#15 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_pmcreg.h#4 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_pmcvar.h#2 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_rtc.c#3 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_rtcreg.h#3 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_ssc.c#3 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_sscreg.h#2 integrate .. //depot/projects/arm/src/sys/arm/at91/ohci_atmelarm.c#11 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile#4 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#10 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#12 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/README#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#8 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/README#2 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/arm_init.s#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#7 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200.h#2 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#5 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#4 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.c#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.h#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#2 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.c#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.h#2 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#4 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#6 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#8 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.h#2 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#4 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#4 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/printf.c#2 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/putchar.c#4 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.c#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.h#2 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#3 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/linker.cfg#5 integrate Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91_pio.c#9 (text+ko) ==== ==== //depot/projects/arm/src/sys/arm/at91/at91_pioreg.h#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/arm/at91/at91_pmc.c#15 (text+ko) ==== ==== //depot/projects/arm/src/sys/arm/at91/at91_pmcreg.h#4 (text+ko) ==== ==== //depot/projects/arm/src/sys/arm/at91/at91_pmcvar.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/arm/at91/at91_rtc.c#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/arm/at91/at91_rtcreg.h#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/arm/at91/at91_ssc.c#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/arm/at91/at91_sscreg.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/arm/at91/ohci_atmelarm.c#11 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile#4 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#10 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#12 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/README#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#8 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/README#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/arm_init.s#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#7 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200.h#2 (text) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#5 (text) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#4 (text) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.c#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.h#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.c#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#4 (text) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#6 (text) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#8 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#4 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#4 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/printf.c#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/putchar.c#4 (text) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.c#3 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.h#2 (text+ko) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#3 (text) ==== ==== //depot/projects/arm/src/sys/boot/arm/at91/linker.cfg#5 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:09:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C16C16A404; Fri, 21 Apr 2006 07:09:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A61016A400 for ; Fri, 21 Apr 2006 07:09:32 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9B1343D49 for ; Fri, 21 Apr 2006 07:09:31 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L79VJR043474 for ; Fri, 21 Apr 2006 07:09:31 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L79VgI043471 for perforce@freebsd.org; Fri, 21 Apr 2006 07:09:31 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 07:09:31 GMT Message-Id: <200604210709.k3L79VgI043471@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95766 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:09:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=95766 Change 95766 by imp@imp_harmony on 2006/04/21 07:08:46 Diff reduction to FreeBSD. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.h#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/***************************************************************************** * * Filename: tag_list.h * @@ -16,7 +16,9 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/tag_list.h,v 1.1 2006/04/19 17:16:49 imp Exp $ + ****************************************************************************/ #ifndef _TAG_LIST_H_ #define _TAG_LIST_H_ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#4 (text) ==== @@ -25,7 +25,7 @@ * disclaimed copyright on the code. This version of xmodem has been nearly * completely rewritten, but the CRC is from the original. * - * $FreeBSD: src/sys/boot/arm/at91/boot0/xmodem.c,v 1.1 2006/04/12 21:22:44 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/xmodem.c,v 1.1 2006/04/19 17:16:49 imp Exp $ */ #include "lib.h" From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:09:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B527E16A46A; Fri, 21 Apr 2006 07:09:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B7C116A467 for ; Fri, 21 Apr 2006 07:09:32 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 462CF43D49 for ; Fri, 21 Apr 2006 07:09:32 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L79WlE043480 for ; Fri, 21 Apr 2006 07:09:32 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L79V8K043477 for perforce@freebsd.org; Fri, 21 Apr 2006 07:09:31 GMT (envelope-from jb@freebsd.org) Date: Fri, 21 Apr 2006 07:09:31 GMT Message-Id: <200604210709.k3L79V8K043477@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95767 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:09:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=95767 Change 95767 by jb@jb_freebsd2 on 2006/04/21 07:09:28 Add (some? of) the extra variables that DTrace needs in struct proc. It likes to get up close and personal with it's buddies. Adding fields like this raises the issue of how Sun's CDDL applies in this case. Should I expect to get permission to do this and retain the BSD license. Without that permission, I can't see how doing this is legal. And looking at the OpenSolaris distribution and seeing AT&T copyright references, I can't help but wonder what a certain company in the US south would think about this. Perhaps I should just hope they go belly up first. 8-) Affected files ... .. //depot/projects/dtrace/src/sys/sys/proc.h#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/sys/proc.h#2 (text+ko) ==== @@ -620,6 +620,9 @@ STAILQ_HEAD(, ktr_request) p_ktr; /* (o) KTR event queue. */ LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/ struct auditinfo *p_au; /* (c) Process audit properties. */ + int p_dtrace_probes; /* (c) Are there probes for this proc? */ + u_int64_t p_dtrace_count; /* (c) Number of DTrace tracepoints */ + void *p_dtrace_helpers; /* (c) DTrace helpers, if any */ }; #define p_session p_pgrp->pg_session From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:25:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A3D6F16A40B; Fri, 21 Apr 2006 07:25:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8269316A409 for ; Fri, 21 Apr 2006 07:25:41 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43BE543D45 for ; Fri, 21 Apr 2006 07:25:41 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L7PfpD054112 for ; Fri, 21 Apr 2006 07:25:41 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L7Pekn054108 for perforce@freebsd.org; Fri, 21 Apr 2006 07:25:40 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 07:25:40 GMT Message-Id: <200604210725.k3L7Pekn054108@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95772 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:25:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95772 Change 95772 by imp@imp_harmony on 2006/04/21 07:24:40 Diff reduction against FreeBSD. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.h#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/printf.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/putchar.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.h#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: loader_prompt.h * @@ -16,7 +16,9 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/loader_prompt.h,v 1.1 2006/04/19 17:16:49 imp Exp $ + *****************************************************************************/ #ifndef _LOADER_PROMPT_H_ #define _LOADER_PROMPT_H_ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: p_string.c * @@ -19,7 +19,9 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/p_string.c,v 1.1 2006/04/19 17:16:49 imp Exp $ + *****************************************************************************/ #include "p_string.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: p_string.h * @@ -16,7 +16,9 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/p_string.h,v 1.1 2006/04/19 17:16:49 imp Exp $ + *****************************************************************************/ #ifndef _P_STRING_H_ #define _P_STRING_H_ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/printf.c#3 (text+ko) ==== @@ -1,6 +1,8 @@ /*- * Copyright (c) 1998 Robert Nordier * All rights reserved. + * Copyright (c) 2006 M. Warner Losh + * All rights reserved. * * Redistribution and use in source and binary forms are freely * permitted provided that the above copyright notice and this @@ -11,6 +13,8 @@ * implied warranties, including, without limitation, the implied * warranties of merchantability and fitness for a particular * purpose. + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/printf.c,v 1.1 2006/04/19 17:16:49 imp Exp $ */ #include ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/putchar.c#5 (text) ==== @@ -31,7 +31,7 @@ * owners. This software is not copyrighted and is intended for reference * only. * - * $FreeBSD: src/sys/boot/arm/at91/boot0/lib.c,v 1.1 2006/04/12 21:22:44 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/putchar.c,v 1.1 2006/04/19 17:16:49 imp Exp $ */ #include "at91rm9200.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: tag_list.c * @@ -16,11 +16,13 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/tag_list.c,v 1.2 2006/04/21 07:19:22 imp Exp $ + *****************************************************************************/ -/* ****************************** GLOBALS *************************************/ +/******************************* GLOBALS *************************************/ -/* ********************* PRIVATE FUNCTIONS/DATA/DEFINES ***********************/ +/********************** PRIVATE FUNCTIONS/DATA/DEFINES ***********************/ #define u32 unsigned #define u16 unsigned short @@ -34,7 +36,7 @@ #define MEM_SIZE 0x2000000 #define PHYS_OFFSET 0x20000000 -/* ************************** GLOBAL FUNCTIONS ********************************/ +/*************************** GLOBAL FUNCTIONS ********************************/ /* * .KB_C_FN_DEFINITION_START ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/tag_list.h#4 (text+ko) ==== @@ -17,7 +17,7 @@ * only. * END_BLOCK * - * $FreeBSD: src/sys/boot/arm/at91/libat91/tag_list.h,v 1.1 2006/04/19 17:16:49 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/tag_list.h,v 1.2 2006/04/21 07:12:12 imp Exp $ ****************************************************************************/ #ifndef _TAG_LIST_H_ From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:35:46 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8ADF016A404; Fri, 21 Apr 2006 07:35:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43D6016A400 for ; Fri, 21 Apr 2006 07:35:46 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E904143D45 for ; Fri, 21 Apr 2006 07:35:45 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L7ZjiP058469 for ; Fri, 21 Apr 2006 07:35:45 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L7ZjFm058461 for perforce@freebsd.org; Fri, 21 Apr 2006 07:35:45 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 07:35:45 GMT Message-Id: <200604210735.k3L7ZjFm058461@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95775 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:35:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=95775 Change 95775 by imp@imp_harmony on 2006/04/21 07:35:37 More merging from FreeBSD to reduce diffs. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200.h#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.h#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200.h#3 (text) ==== @@ -7,7 +7,7 @@ // fitness for any particular purpose, or against the infringements of // intellectual property rights of others. // ---------------------------------------------------------------------------- -// $FreeBSD: src/sys/boot/arm/at91/inc/AT91RM9200.h,v 1.3 2006/04/15 02:51:53 imp Exp $ +// $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200.h,v 1.1 2006/04/19 17:16:49 imp Exp $ // // File Name : AT91RM9200.h // Object : AT91RM9200 definitions ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#6 (text) ==== @@ -24,7 +24,7 @@ * This software is derived from software provide by Kwikbyte who specifically * disclaimed copyright on the code. * - * $FreeBSD: src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c,v 1.2 2006/04/13 17:39:34 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c,v 1.2 2006/04/21 07:29:14 imp Exp $ */ #include "at91rm9200.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.c#4 (text+ko) ==== @@ -17,6 +17,8 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/eeprom.c,v 1.1 2006/04/19 17:16:49 imp Exp $ *****************************************************************************/ #include "at91rm9200_lowlevel.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/eeprom.h#4 (text+ko) ==== @@ -17,6 +17,8 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/eeprom.h,v 1.1 2006/04/19 17:16:49 imp Exp $ ******************************************************************************/ #ifndef _EEPROM_H_ From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:44:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4050B16A405; Fri, 21 Apr 2006 07:44:58 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1015C16A403 for ; Fri, 21 Apr 2006 07:44:58 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B58BA43D48 for ; Fri, 21 Apr 2006 07:44:57 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L7ivbR064850 for ; Fri, 21 Apr 2006 07:44:57 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L7ivp0064841 for perforce@freebsd.org; Fri, 21 Apr 2006 07:44:57 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 07:44:57 GMT Message-Id: <200604210744.k3L7ivp0064841@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95776 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:44:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=95776 Change 95776 by imp@imp_harmony on 2006/04/21 07:44:27 Diff reduction. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#11 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/doit.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/README#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD$ +# $FreeBSD: src/sys/boot/arm/at91/Makefile,v 1.2 2006/04/21 06:43:32 imp Exp $ SUBDIR= libat91 boot0 boot0iic boot0spi bootiic bootspi ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#11 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD$ +# $FreeBSD: src/sys/boot/arm/at91/Makefile.inc,v 1.2 2006/04/21 07:41:36 imp Exp $ .if !target(__at91_boot_Makefile.inc__) __at91_boot_Makefile.inc__: ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#5 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.3 2006/04/19 17:16:48 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0iic/Makefile,v 1.1 2006/04/21 06:48:52 imp Exp $ .PATH: ${.CURDIR}/../boot0 ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/doit.c#4 (text+ko) ==== @@ -21,7 +21,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/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0iic/doit.c,v 1.1 2006/04/21 06:48:52 imp Exp $ */ #include "lib.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/README#4 (text+ko) ==== @@ -1,3 +1,5 @@ +$FreeBSD: src/sys/boot/arm/at91/bootiic/README,v 1.1 2006/04/19 17:16:48 imp Exp $ + This image is intended to be programmed into boot EEPROM. The image is nearly 0x4000 so it will not fit in KB9200's 0x2000. It is intended for KB9201 or later. Alternatively, the KB9200 can be upgraded with larger EEPROM. @@ -31,29 +33,3 @@ w - update auto command table x - download image via xmodem -base files in this directory: - -arm_init.s -AT91RM9200.h -at91rm9200_lowlevel.c -at91rm9200_lowlevel.h -debug_io.c -debug_io.h -eeprom.c -eeprom.h -emac.c -emac.h -env_vars.c -env_vars.h -linker.cfg -loader_prompt.c -loader_prompt.h -main.c -Makefile -p_string.c -p_string.h -tag_list.c -tag_list.h -xmodem.c -xmodem.h -README From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:56:03 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3FE3C16A405; Fri, 21 Apr 2006 07:56:03 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B10A16A400 for ; Fri, 21 Apr 2006 07:56:03 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2D8643D49 for ; Fri, 21 Apr 2006 07:56:02 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L7u2K0069699 for ; Fri, 21 Apr 2006 07:56:02 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L7u24u069693 for perforce@freebsd.org; Fri, 21 Apr 2006 07:56:02 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 07:56:02 GMT Message-Id: <200604210756.k3L7u24u069693@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95779 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:56:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=95779 Change 95779 by imp@imp_harmony on 2006/04/21 07:55:27 More manual merging. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#10 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/doit.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/README#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#5 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#10 (text) ==== @@ -21,7 +21,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/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0/main.c,v 1.4 2006/04/21 07:45:57 imp Exp $ */ #include "at91rm9200.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#2 (text) ==== @@ -21,7 +21,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/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0iic/main.c,v 1.1 2006/04/21 06:48:52 imp Exp $ */ #include "at91rm9200.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#4 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.3 2006/04/19 17:16:48 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0spi/Makefile,v 1.1 2006/04/21 06:51:08 imp Exp $ .PATH: ${.CURDIR}/../boot0 ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/doit.c#2 (text+ko) ==== @@ -21,7 +21,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/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0spi/doit.c,v 1.1 2006/04/21 06:51:08 imp Exp $ */ typedef void fn_t(void); ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#2 (text) ==== @@ -21,7 +21,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/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0spi/main.c,v 1.1 2006/04/21 06:51:08 imp Exp $ */ #include "at91rm9200.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/README#3 (text+ko) ==== @@ -1,3 +1,5 @@ +$FreeBSD: src/sys/boot/arm/at91/bootspi/README,v 1.1 2006/04/19 17:16:48 imp Exp $ + This image is intended to be programmed into boot EEPROM. The image is nearly 0x4000 so it will not fit in KB9200's 0x2000. It is intended for KB9201 or later. Alternatively, the KB9200 can be upgraded with larger EEPROM. @@ -30,30 +32,3 @@ tftp - download image via tftp w - update auto command table x - download image via xmodem - -base files in this directory: - -arm_init.s -AT91RM9200.h -at91rm9200_lowlevel.c -at91rm9200_lowlevel.h -debug_io.c -debug_io.h -eeprom.c -eeprom.h -emac.c -emac.h -env_vars.c -env_vars.h -linker.cfg -loader_prompt.c -loader_prompt.h -main.c -Makefile -p_string.c -p_string.h -tag_list.c -tag_list.h -xmodem.c -xmodem.h -README ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#4 (text+ko) ==== @@ -18,6 +18,8 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK + * + * $FreeBSD: src/sys/boot/arm/at91/bootspi/main.c,v 1.1 2006/04/19 17:16:48 imp Exp $ ******************************************************************************/ #include "env_vars.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#5 (text) ==== @@ -21,7 +21,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/boot/arm/at91/boot0/at91rm9200_lowlevel.h,v 1.1 2006/04/12 21:22:44 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h,v 1.1 2006/04/19 17:16:49 imp Exp $ */ #ifndef _AT91RM9200_LOWLEVEL_H_ From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:59:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 536D416A405; Fri, 21 Apr 2006 07:59:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CD2C16A400 for ; Fri, 21 Apr 2006 07:59:08 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA2EF43D45 for ; Fri, 21 Apr 2006 07:59:07 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L7x7sV071855 for ; Fri, 21 Apr 2006 07:59:07 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L7x7Bc071846 for perforce@freebsd.org; Fri, 21 Apr 2006 07:59:07 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 07:59:07 GMT Message-Id: <200604210759.k3L7x7Bc071846@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95780 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:59:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=95780 Change 95780 by imp@imp_harmony on 2006/04/21 07:58:37 These aren't it. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/xmodem.c#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/xmodem.h#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Apr 21 08:25:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7B14416A403; Fri, 21 Apr 2006 08:25:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3779A16A400 for ; Fri, 21 Apr 2006 08:25:41 +0000 (UTC) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E625543D49 for ; Fri, 21 Apr 2006 08:25:40 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L8PeeP087281 for ; Fri, 21 Apr 2006 08:25:40 GMT (envelope-from soc-bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L8PeoF087278 for perforce@freebsd.org; Fri, 21 Apr 2006 08:25:40 GMT (envelope-from soc-bushman@freebsd.org) Date: Fri, 21 Apr 2006 08:25:40 GMT Message-Id: <200604210825.k3L8PeoF087278@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-bushman@freebsd.org using -f From: soc-bushman To: Perforce Change Reviews Cc: Subject: PERFORCE change 95781 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 08:25:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95781 Change 95781 by soc-bushman@soc-bushman_stinger on 2006/04/21 08:24:42 all hosts-related functions now take resolver options into account Affected files ... .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getaddrinfo.c#11 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostnamadr.c#8 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/name6.c#10 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/nscachedcli.c#10 edit Differences ... ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getaddrinfo.c#11 (text+ko) ==== @@ -1537,6 +1537,9 @@ addrinfo_id_func(char *buffer, size_t *buffer_size, va_list ap, void *cache_mdata) { + res_state statp; + u_long res_options; + const int op_id = 0; /* identifies the getaddrinfo for the cache */ char *hostname; struct addrinfo *hints; @@ -1545,10 +1548,14 @@ int ai_flags, ai_family, ai_socktype, ai_protocol; size_t desired_size, size; + statp = __res_state(); + res_options = statp->options & (RES_RECURSE | RES_DEFNAMES | + RES_DNSRCH | RES_NOALIASES | RES_USE_INET6); + hostname = va_arg(ap, char *); hints = va_arg(ap, struct addrinfo *); - desired_size = sizeof(int) + sizeof(int) * 4; + desired_size = sizeof(res_options) + sizeof(int) + sizeof(int) * 4; if (hostname != NULL) { size = strlen(hostname); desired_size += size + 1; @@ -1570,6 +1577,9 @@ } p = buffer; + memcpy(p, &res_options, sizeof(res_options)); + p += sizeof(res_options); + memcpy(p, &op_id, sizeof(int)); p += sizeof(int); ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostnamadr.c#8 (text+ko) ==== @@ -162,6 +162,9 @@ static int host_id_func(char *buffer, size_t *buffer_size, va_list ap, void *cache_mdata) { + res_state statp; + u_long res_options; + const int op_id = 1; char *str; int len, type; @@ -170,10 +173,11 @@ enum nss_lookup_type lookup_type; char *p; int res = NS_UNAVAIL; - - res_state statp; + + statp = __res_state(); + res_options = statp->options & (RES_RECURSE | RES_DEFNAMES | + RES_DNSRCH | RES_NOALIASES | RES_USE_INET6); - stat_p = __res_state(); lookup_type = (enum nss_lookup_type)cache_mdata; switch (lookup_type) { case nss_lt_name: @@ -181,7 +185,7 @@ type = va_arg(ap, int); size = strlen(str); - desired_size = sizeof(stat_p->options) + sizeof(int) + + desired_size = sizeof(res_options) + sizeof(int) + sizeof(enum nss_lookup_type) + sizeof(int) + size + 1; if (desired_size > *buffer_size) { @@ -191,8 +195,8 @@ p = buffer; - memcpy(p, &stat_p->options, sizeof(stat_p->options)); - p += sizeof(stat_p->options); + memcpy(p, &res_options, sizeof(res_options)); + p += sizeof(res_options); memcpy(p, &op_id, sizeof(int)); p += sizeof(int); @@ -212,8 +216,8 @@ len = va_arg(ap, int); type = va_arg(ap, int); - desired_size = sizeof(int) + sizeof(enum nss_lookup_type) + - + sizeof(int) * 2 + len; + desired_size = sizeof(res_options) + sizeof(int) + + sizeof(enum nss_lookup_type) + sizeof(int) * 2 + len; if (desired_size > *buffer_size) { res = NS_RETURN; @@ -221,6 +225,9 @@ } p = buffer; + memcpy(p, &res_options, sizeof(res_options)); + p += sizeof(res_options); + memcpy(p, &op_id, sizeof(int)); p += sizeof(int); ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/name6.c#10 (text+ko) ==== @@ -291,6 +291,9 @@ static int ipnode_id_func(char *buffer, size_t *buffer_size, va_list ap, void *cache_mdata) { + res_state statp; + u_long res_options; + const int op_id = 2; char *name; int af; @@ -302,6 +305,10 @@ enum nss_lookup_type lookup_type; int res = NS_UNAVAIL; + statp = __res_state(); + res_options = statp->options & (RES_RECURSE | RES_DEFNAMES | + RES_DNSRCH | RES_NOALIASES | RES_USE_INET6); + lookup_type = (enum nss_lookup_type)cache_mdata; switch (lookup_type) { case nss_lt_name: @@ -309,8 +316,8 @@ af = va_arg(ap, int); size = strlen(name); - desired_size = sizeof(int) + sizeof(enum nss_lookup_type) + - sizeof(int) + size + 1; + desired_size = sizeof(res_options) + sizeof(int) + + sizeof(enum nss_lookup_type) + sizeof(int) + size + 1; if (desired_size > *buffer_size) { res = NS_RETURN; @@ -318,6 +325,9 @@ } p = buffer; + memcpy(p, &res_options, sizeof(res_options)); + p += sizeof(res_options); + memcpy(p, &op_id, sizeof(int)); p += sizeof(int); @@ -336,8 +346,9 @@ len = va_arg(ap, size_t); af = va_arg(ap, int); - desired_size = sizeof(int) + sizeof(enum nss_lookup_type) + - sizeof(int) + sizeof(size_t) + len; + desired_size = sizeof(res_options) + sizeof(int) + + sizeof(enum nss_lookup_type) + sizeof(int) + + sizeof(size_t) + len; if (desired_size > *buffer_size) { res = NS_RETURN; @@ -345,6 +356,9 @@ } p = buffer; + memcpy(p, &res_options, sizeof(res_options)); + p += sizeof(res_options); + memcpy(p, &op_id, sizeof(int)); p += sizeof(int); ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/nscachedcli.c#10 (text+ko) ==== @@ -72,7 +72,7 @@ nevents = kevent(connection->write_queue, NULL, 0, &eventlist, 1, &timeout); if ((nevents == 1) && (eventlist.filter == EVFILT_WRITE)) { - s_result = write(connection->sockfd, data + result, + s_result = _write(connection->sockfd, data + result, eventlist.data < data_size - result ? eventlist.data : data_size - result); if (s_result == -1) @@ -114,7 +114,7 @@ nevents = kevent(connection->read_queue, NULL, 0, &eventlist, 1, &timeout); if ((nevents == 1) && (eventlist.filter == EVFILT_READ)) { - s_result = read(connection->sockfd, data + result, + s_result = _read(connection->sockfd, data + result, eventlist.data <= data_size - result ? eventlist.data : data_size - result); if (s_result == -1) @@ -171,7 +171,7 @@ nevents = kevent(connection->write_queue, NULL, 0, &eventlist, 1, NULL); if ((nevents == 1) && (eventlist.filter == EVFILT_WRITE)) { - result = (sendmsg(connection->sockfd, &cred_hdr, 0) == -1) ? -1 + result = (_sendmsg(connection->sockfd, &cred_hdr, 0) == -1) ? -1 : 0; EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD, 0, 0, NULL); @@ -195,20 +195,20 @@ assert(params != NULL); - client_socket = socket(PF_LOCAL, SOCK_STREAM, 0); + client_socket = _socket(PF_LOCAL, SOCK_STREAM, 0); client_address.sun_family = PF_LOCAL; strncpy(client_address.sun_path, params->socket_path, sizeof(client_address.sun_path)); client_address_len = sizeof(client_address.sun_family) + strlen(client_address.sun_path) + 1; - res = connect(client_socket, (struct sockaddr *)&client_address, + res = _connect(client_socket, (struct sockaddr *)&client_address, client_address_len); if (res == -1) { - close(client_socket); + _close(client_socket); return (NULL); } - fcntl(client_socket, F_SETFL, O_NONBLOCK); + _fcntl(client_socket, F_SETFL, O_NONBLOCK); retval = malloc(sizeof(struct cached_connection_)); assert(retval != NULL); @@ -238,9 +238,9 @@ { assert(connection != NULL); - close(connection->sockfd); - close(connection->read_queue); - close(connection->write_queue); + _close(connection->sockfd); + _close(connection->read_queue); + _close(connection->write_queue); free(connection); } From owner-p4-projects@FreeBSD.ORG Fri Apr 21 11:33:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 36A5616A406; Fri, 21 Apr 2006 11:33:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7FD216A404 for ; Fri, 21 Apr 2006 11:33:44 +0000 (UTC) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2E1F43D46 for ; Fri, 21 Apr 2006 11:33:44 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LBXiHp046561 for ; Fri, 21 Apr 2006 11:33:44 GMT (envelope-from soc-bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LBXidc046551 for perforce@freebsd.org; Fri, 21 Apr 2006 11:33:44 GMT (envelope-from soc-bushman@freebsd.org) Date: Fri, 21 Apr 2006 11:33:44 GMT Message-Id: <200604211133.k3LBXidc046551@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-bushman@freebsd.org using -f From: soc-bushman To: Perforce Change Reviews Cc: Subject: PERFORCE change 95786 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 11:33:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=95786 Change 95786 by soc-bushman@soc-bushman_stinger on 2006/04/21 11:32:45 cached.conf added to /etc + parameters order fixed in host_id, host_marhsal and host_unmarshal functions Affected files ... .. //depot/projects/soc2005/nsswitch_cached/src/etc/cached.conf#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostnamadr.c#9 edit Differences ... ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostnamadr.c#9 (text+ko) ==== @@ -365,7 +365,6 @@ char *str; int len, type; struct hostent *ht; - struct hostent_data *ht_data; char *p; char **iter; @@ -388,10 +387,8 @@ } ht = va_arg(ap, struct hostent *); - ht_data = va_arg(ap, struct hostent_data *); - - orig_buf = ht_data->hostbuf; - orig_buf_size = sizeof(ht_data->hostbuf); + orig_buf = va_arg(ap, char *); + orig_buf_size = va_arg(ap, size_t); if (orig_buf_size < buffer_size - sizeof(struct hostent) - sizeof(char *)) { From owner-p4-projects@FreeBSD.ORG Fri Apr 21 12:27:12 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B7D216A426; Fri, 21 Apr 2006 12:27:12 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF17C16A452 for ; Fri, 21 Apr 2006 12:27:11 +0000 (UTC) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 506AF43D7D for ; Fri, 21 Apr 2006 12:27:03 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LCR3GX076751 for ; Fri, 21 Apr 2006 12:27:03 GMT (envelope-from soc-bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LCR3DO076748 for perforce@freebsd.org; Fri, 21 Apr 2006 12:27:03 GMT (envelope-from soc-bushman@freebsd.org) Date: Fri, 21 Apr 2006 12:27:03 GMT Message-Id: <200604211227.k3LCR3DO076748@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-bushman@freebsd.org using -f From: soc-bushman To: Perforce Change Reviews Cc: Subject: PERFORCE change 95795 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 12:27:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=95795 Change 95795 by soc-bushman@soc-bushman_stinger on 2006/04/21 12:26:05 return value bug fixed in gethostnamadr.c + getaddrinfo.c style fix Affected files ... .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getaddrinfo.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostnamadr.c#10 edit Differences ... ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getaddrinfo.c#12 (text+ko) ==== @@ -1604,7 +1604,7 @@ static int addrinfo_marshal_func(char *buffer, size_t *buffer_size, void *retval, - va_list ap, void *cache_mdata) + va_list ap, void *cache_mdata) { struct addrinfo *ai, *cai; char *p; ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostnamadr.c#10 (text+ko) ==== @@ -420,6 +420,8 @@ for (iter = ht->h_addr_list; *iter; ++iter) NS_APPLY_OFFSET(*iter, orig_buf, p, char *); } + + *((struct hostent **)retval) = ht; return (NS_SUCCESS); } #endif /* NS_CACHING */ From owner-p4-projects@FreeBSD.ORG Fri Apr 21 13:46:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 72F6C16A404; Fri, 21 Apr 2006 13:46:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4004416A401 for ; Fri, 21 Apr 2006 13:46:39 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BD1543D46 for ; Fri, 21 Apr 2006 13:46:39 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LDkc4J028048 for ; Fri, 21 Apr 2006 13:46:38 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LDkcAV028045 for perforce@freebsd.org; Fri, 21 Apr 2006 13:46:38 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 13:46:38 GMT Message-Id: <200604211346.k3LDkcAV028045@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95796 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 13:46:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=95796 Change 95796 by imp@imp_harmony on 2006/04/21 13:46:05 Reduce diffs to -current Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#13 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.S#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.s#7 delete Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.1 2006/04/12 21:22:44 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.2 2006/04/21 13:40:26 imp Exp $ P=bootiic FILES=${P} ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.S#3 (text+ko) ==== @@ -19,6 +19,8 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK + * + * $FreeBSD: src/sys/boot/arm/at91/bootiic/arm_init.S,v 1.1 2006/04/21 13:40:26 imp Exp $ ******************************************************************************/ .equ TWI_EEPROM_SIZE, 0x2000 From owner-p4-projects@FreeBSD.ORG Fri Apr 21 13:49:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D1CDB16A40B; Fri, 21 Apr 2006 13:49:58 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE4AB16A404 for ; Fri, 21 Apr 2006 13:49:58 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6505343D55 for ; Fri, 21 Apr 2006 13:49:58 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LDnwL1028202 for ; Fri, 21 Apr 2006 13:49:58 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LDnw6N028199 for perforce@freebsd.org; Fri, 21 Apr 2006 13:49:58 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 13:49:58 GMT Message-Id: <200604211349.k3LDnw6N028199@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95798 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 13:49:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=95798 Change 95798 by imp@imp_harmony on 2006/04/21 13:49:56 Reduce diffs to -current Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#9 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/arm_init.s#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#9 (text+ko) ==== @@ -18,6 +18,8 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK + * + * $FreeBSD: src/sys/boot/arm/at91/bootiic/main.c,v 1.2 2006/04/21 13:44:58 imp Exp $ ******************************************************************************/ #include "env_vars.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.1 2006/04/12 21:22:44 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.1 2006/04/19 17:16:48 imp Exp $ P=bootspi FILES=${P} ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/arm_init.s#4 (text+ko) ==== @@ -19,6 +19,8 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK + * + * $FreeBSD: src/sys/boot/arm/at91/bootspi/arm_init.s,v 1.1 2006/04/19 17:16:48 imp Exp $ ******************************************************************************/ .equ TWI_EEPROM_SIZE, 0x2000 From owner-p4-projects@FreeBSD.ORG Fri Apr 21 14:07:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5BC3516A409; Fri, 21 Apr 2006 14:07:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F30116A407 for ; Fri, 21 Apr 2006 14:07:24 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFE0C43D46 for ; Fri, 21 Apr 2006 14:07:23 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LE7N2x040122 for ; Fri, 21 Apr 2006 14:07:23 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LE7NWP040119 for perforce@freebsd.org; Fri, 21 Apr 2006 14:07:23 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 14:07:23 GMT Message-Id: <200604211407.k3LE7NWP040119@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95802 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 14:07:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=95802 Change 95802 by imp@imp_harmony on 2006/04/21 14:06:25 diff reduction to -current # Why I didn't get all of these with the last integration is # a mystery to me. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#8 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.h#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#9 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.2 2006/04/13 17:44:05 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.2 2006/04/21 13:51:47 imp Exp $ .include "${.CURDIR}/../Makefile.inc" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: emac.c * @@ -18,7 +18,9 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/emac.c,v 1.1 2006/04/19 17:16:49 imp Exp $ + *****************************************************************************/ #include "at91rm9200.h" #include "emac.h" @@ -26,9 +28,9 @@ #include "at91rm9200_lowlevel.h" #include "lib.h" -/* ****************************** GLOBALS *************************************/ +/******************************* GLOBALS *************************************/ -/* ********************** PRIVATE FUNCTIONS/DATA ******************************/ +/*********************** PRIVATE FUNCTIONS/DATA ******************************/ static unsigned localMACSet, serverMACSet, MAC_init; static unsigned char localMACAddr[6], serverMACAddr[6]; ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: emac.h * @@ -16,7 +16,9 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/emac.h,v 1.1 2006/04/19 17:16:49 imp Exp $ + *****************************************************************************/ #ifndef _EMAC_H_ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: env_vars.c * @@ -16,7 +16,9 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/env_vars.c,v 1.1 2006/04/19 17:16:49 imp Exp $ + *****************************************************************************/ #include "env_vars.h" #include "loader_prompt.h" @@ -24,14 +26,14 @@ #include "eeprom.h" #include "lib.h" -/* ****************************** GLOBALS *************************************/ +/******************************* GLOBALS *************************************/ char boot_commands[MAX_BOOT_COMMANDS][MAX_INPUT_SIZE]; char env_table[MAX_ENV_SIZE_BYTES]; extern char BootCommandSection; -/* ************************* PRIVATE FUNCTIONS ********************************/ +/************************** PRIVATE FUNCTIONS ********************************/ static int currentIndex; @@ -58,7 +60,6 @@ if (ch == '\0' || (currentOffset >= MAX_INPUT_SIZE)) { currentOffset = 0; ++currentIndex; - ch = '\r'; } return (ch); } @@ -67,7 +68,7 @@ } -/* ************************** GLOBAL FUNCTIONS ********************************/ +/*************************** GLOBAL FUNCTIONS ********************************/ /* ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: env_vars.h * @@ -16,7 +16,9 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/env_vars.h,v 1.1 2006/04/19 17:16:49 imp Exp $ + *****************************************************************************/ #ifndef _ENV_VARS_H_ #define _ENV_VARS_H_ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/getc.c#5 (text) ==== @@ -31,7 +31,7 @@ * owners. This software is not copyrighted and is intended for reference * only. * - * $FreeBSD: src/sys/boot/arm/at91/boot0/lib.c,v 1.1 2006/04/12 21:22:44 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/getc.c,v 1.2 2006/04/21 13:58:51 imp Exp $ */ #include "at91rm9200.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#7 (text) ==== @@ -21,7 +21,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/boot/arm/at91/boot0/lib.h,v 1.1 2006/04/12 21:22:44 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/lib.h,v 1.1 2006/04/19 17:16:49 imp Exp $ */ #ifndef ARM_BOOT_LIB_H ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#9 (text+ko) ==== @@ -1,4 +1,4 @@ -/******************************************************************************* +/****************************************************************************** * * Filename: loader_prompt.c * @@ -18,7 +18,9 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - ******************************************************************************/ + * + * $FreeBSD: src/sys/boot/arm/at91/libat91/loader_prompt.c,v 1.2 2006/04/21 13:56:26 imp Exp $ + *****************************************************************************/ #include "at91rm9200_lowlevel.h" #include "p_string.h" @@ -32,10 +34,10 @@ #include "lib.h" -/* ****************************** GLOBALS *************************************/ +/******************************* GLOBALS *************************************/ -/* ********************** PRIVATE FUNCTIONS/DATA ******************************/ +/*********************** PRIVATE FUNCTIONS/DATA ******************************/ static char inputBuffer[MAX_INPUT_SIZE]; static int buffCount; From owner-p4-projects@FreeBSD.ORG Fri Apr 21 16:22:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 581CE16A417; Fri, 21 Apr 2006 16:22:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4FC016A400 for ; Fri, 21 Apr 2006 16:22:07 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60C4643D48 for ; Fri, 21 Apr 2006 16:22:07 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LGM7U8014459 for ; Fri, 21 Apr 2006 16:22:07 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LGM790014452 for perforce@freebsd.org; Fri, 21 Apr 2006 16:22:07 GMT (envelope-from marcel@freebsd.org) Date: Fri, 21 Apr 2006 16:22:07 GMT Message-Id: <200604211622.k3LGM790014452@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 Cc: Subject: PERFORCE change 95804 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 16:22:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=95804 Change 95804 by marcel@marcel_nfs on 2006/04/21 16:22:04 IFC @95803 Affected files ... .. //depot/projects/uart/amd64/amd64/dump_machdep.c#4 integrate .. //depot/projects/uart/amd64/amd64/minidump_machdep.c#1 branch .. //depot/projects/uart/amd64/amd64/pmap.c#33 integrate .. //depot/projects/uart/amd64/amd64/uma_machdep.c#2 integrate .. //depot/projects/uart/amd64/include/md_var.h#6 integrate .. //depot/projects/uart/amd64/include/minidump.h#1 branch .. //depot/projects/uart/boot/arm/at91/Makefile#2 integrate .. //depot/projects/uart/boot/arm/at91/Makefile.inc#2 integrate .. //depot/projects/uart/boot/arm/at91/boot0/main.c#3 integrate .. //depot/projects/uart/boot/arm/at91/boot0iic/Makefile#1 branch .. //depot/projects/uart/boot/arm/at91/boot0iic/doit.c#1 branch .. //depot/projects/uart/boot/arm/at91/boot0iic/main.c#1 branch .. //depot/projects/uart/boot/arm/at91/boot0spi/Makefile#1 branch .. //depot/projects/uart/boot/arm/at91/boot0spi/doit.c#1 branch .. //depot/projects/uart/boot/arm/at91/boot0spi/main.c#1 branch .. //depot/projects/uart/boot/arm/at91/bootiic/Makefile#2 integrate .. //depot/projects/uart/boot/arm/at91/bootiic/arm_init.S#1 branch .. //depot/projects/uart/boot/arm/at91/bootiic/arm_init.s#2 delete .. //depot/projects/uart/boot/arm/at91/bootiic/main.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/Makefile#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/at91rm9200_lowlevel.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/getc.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/loader_prompt.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/tag_list.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/tag_list.h#2 integrate .. //depot/projects/uart/conf/files.amd64#19 integrate .. //depot/projects/uart/conf/files.i386#24 integrate .. //depot/projects/uart/conf/files.pc98#21 integrate .. //depot/projects/uart/i386/i386/dump_machdep.c#4 integrate .. //depot/projects/uart/i386/i386/minidump_machdep.c#1 branch .. //depot/projects/uart/i386/include/md_var.h#8 integrate .. //depot/projects/uart/i386/include/minidump.h#1 branch .. //depot/projects/uart/ia64/ia64/nexus.c#8 integrate .. //depot/projects/uart/kern/kern_mbuf.c#10 integrate .. //depot/projects/uart/kern/uipc_domain.c#9 integrate .. //depot/projects/uart/kern/uipc_socket2.c#12 integrate .. //depot/projects/uart/kern/uipc_usrreq.c#12 integrate .. //depot/projects/uart/netinet/ip_divert.c#12 integrate .. //depot/projects/uart/netinet/ip_input.c#15 integrate .. //depot/projects/uart/netinet/raw_ip.c#15 integrate .. //depot/projects/uart/netinet/tcp_input.c#23 integrate .. //depot/projects/uart/netinet/tcp_subr.c#19 integrate .. //depot/projects/uart/netinet/udp_usrreq.c#15 integrate .. //depot/projects/uart/netinet6/frag6.c#7 integrate .. //depot/projects/uart/pc98/include/minidump.h#1 branch .. //depot/projects/uart/pc98/pc98/machdep.c#7 integrate .. //depot/projects/uart/sys/eventhandler.h#4 integrate .. //depot/projects/uart/ufs/ffs/ffs_vfsops.c#20 integrate .. //depot/projects/uart/vm/vm_mmap.c#14 integrate .. //depot/projects/uart/vm/vm_page.c#20 integrate Differences ... ==== //depot/projects/uart/amd64/amd64/dump_machdep.c#4 (text+ko) ==== @@ -25,12 +25,13 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/dump_machdep.c,v 1.11 2005/07/02 19:57:30 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/dump_machdep.c,v 1.12 2006/04/21 04:24:50 peter Exp $"); #include #include #include #include +#include #include #include #include @@ -40,6 +41,11 @@ CTASSERT(sizeof(struct kerneldumpheader) == 512); +int do_minidump = 1; +TUNABLE_INT("debug.minidump", &do_minidump); +SYSCTL_INT(_debug, OID_AUTO, minidump, CTLFLAG_RW, &do_minidump, 0, + "Enable mini crash dumps"); + /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This * is to protect us from metadata and to protect metadata from us. @@ -272,6 +278,10 @@ size_t hdrsz; int error; + if (do_minidump) { + minidumpsys(di); + return; + } bzero(&ehdr, sizeof(ehdr)); ehdr.e_ident[EI_MAG0] = ELFMAG0; ehdr.e_ident[EI_MAG1] = ELFMAG1; ==== //depot/projects/uart/amd64/amd64/pmap.c#33 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.547 2006/04/18 20:17:32 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.549 2006/04/21 04:50:18 peter Exp $"); /* * Manages physical address maps. @@ -181,7 +181,7 @@ static u_int64_t KPTphys; /* phys addr of kernel level 1 */ static u_int64_t KPDphys; /* phys addr of kernel level 2 */ -static u_int64_t KPDPphys; /* phys addr of kernel level 3 */ +u_int64_t KPDPphys; /* phys addr of kernel level 3 */ u_int64_t KPML4phys; /* phys addr of kernel level 4 */ static u_int64_t DMPDphys; /* phys addr of direct mapped level 2 */ @@ -1565,6 +1565,7 @@ /* entire chunk is free, return it */ TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m->phys_addr); vm_page_lock_queues(); vm_page_free(m); vm_page_unlock_queues(); @@ -1645,6 +1646,7 @@ PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); colour++; + dump_add_page(m->phys_addr); pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ @@ -2794,6 +2796,7 @@ PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m->phys_addr); vm_page_lock_queues(); vm_page_free(m); vm_page_unlock_queues(); ==== //depot/projects/uart/amd64/amd64/uma_machdep.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/uma_machdep.c,v 1.1 2003/10/14 05:51:31 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/uma_machdep.c,v 1.2 2006/04/21 04:24:50 peter Exp $"); #include #include @@ -44,6 +44,7 @@ { static vm_pindex_t colour; vm_page_t m; + vm_paddr_t pa; void *va; int pflags; @@ -64,7 +65,9 @@ } else break; } - va = (void *)PHYS_TO_DMAP(m->phys_addr); + pa = m->phys_addr; + dump_add_page(pa); + va = (void *)PHYS_TO_DMAP(pa); if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) pagezero(va); return (va); @@ -74,8 +77,11 @@ uma_small_free(void *mem, int size, u_int8_t flags) { vm_page_t m; + vm_paddr_t pa; - m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)mem)); + pa = DMAP_TO_PHYS((vm_offset_t)mem); + dump_drop_page(pa); + m = PHYS_TO_VM_PAGE(pa); vm_page_lock_queues(); vm_page_free(m); vm_page_unlock_queues(); ==== //depot/projects/uart/amd64/include/md_var.h#6 (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.76 2005/10/14 22:52:00 jkim Exp $ + * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.77 2006/04/21 04:24:50 peter Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -53,6 +53,8 @@ extern char kstack[]; extern char sigcode[]; extern int szsigcode; +extern uint64_t *vm_page_dump; +extern int vm_page_dump_size; extern struct pcpu __pcpu[]; @@ -61,11 +63,14 @@ struct reg; struct fpreg; struct dbreg; +struct dumperinfo; void busdma_swi(void); void cpu_setregs(void); void doreti_iret(void) __asm(__STRING(doreti_iret)); void doreti_iret_fault(void) __asm(__STRING(doreti_iret_fault)); +void dump_add_page(vm_paddr_t); +void dump_drop_page(vm_paddr_t); void initializecpu(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void fpstate_drop(struct thread *td); @@ -75,5 +80,6 @@ void pagezero(void *addr); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); int user_dbreg_trap(void); +void minidumpsys(struct dumperinfo *); #endif /* !_MACHINE_MD_VAR_H_ */ ==== //depot/projects/uart/boot/arm/at91/Makefile#2 (text) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/sys/boot/arm/at91/Makefile,v 1.1 2006/04/19 17:16:48 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/Makefile,v 1.2 2006/04/21 06:43:32 imp Exp $ -SUBDIR= libat91 boot0 bootiic bootspi +SUBDIR= libat91 boot0 boot0iic boot0spi bootiic bootspi .include ==== //depot/projects/uart/boot/arm/at91/Makefile.inc#2 (text) ==== @@ -1,4 +1,7 @@ -# $FreeBSD: src/sys/boot/arm/at91/Makefile.inc,v 1.1 2006/04/19 17:16:48 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/Makefile.inc,v 1.2 2006/04/21 07:41:36 imp Exp $ + +.if !target(__at91_boot_Makefile.inc__) +__at91_boot_Makefile.inc__: CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ @@ -7,17 +10,27 @@ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Werror -CFLAGS+=-DBOOT_TSC -#CFLAGS+=-DBOOT_KB920X +#CFLAGS+=-DBOOT_TSC +CFLAGS+=-DBOOT_KB9202 LIBAT91=${.OBJDIR}/../libat91/libat91.a .if defined(P) ${P}: ${P}.out objcopy -S -O binary ${P}.out ${.TARGET} + @set -- `ls -l ${.TARGET}`; x=$$((8192-$$5)); \ + echo "$$x bytes available"; test $$x -ge 0 ${P}.out: ${OBJS} ld ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LIBAT91} CLEANFILES+= ${P} ${P}.out .endif + +.if defined(WITH_TAG_LIST) +MK_TAG_LIST:=yes +.else +MK_TAG_LIST:=no +.endif + +.endif ==== //depot/projects/uart/boot/arm/at91/boot0/main.c#3 (text) ==== @@ -21,14 +21,14 @@ * (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/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0/main.c,v 1.4 2006/04/21 07:45:57 imp Exp $ */ #include "at91rm9200.h" #include "lib.h" #include "at91rm9200_lowlevel.h" -typedef void fn_t(void); +typedef void fn_t(void); int main(void) @@ -39,5 +39,5 @@ while (xmodem_rx(addr) == -1) continue; fn(); - return (1); + return (0); } ==== //depot/projects/uart/boot/arm/at91/bootiic/Makefile#2 (text) ==== @@ -1,8 +1,8 @@ -# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.1 2006/04/19 17:16:48 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.2 2006/04/21 13:40:26 imp Exp $ P=bootiic FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/uart/boot/arm/at91/bootiic/main.c#2 (text) ==== @@ -19,7 +19,7 @@ * only. * END_BLOCK * - * $FreeBSD: src/sys/boot/arm/at91/bootiic/main.c,v 1.1 2006/04/19 17:16:48 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/bootiic/main.c,v 1.2 2006/04/21 13:44:58 imp Exp $ ******************************************************************************/ #include "env_vars.h" @@ -27,6 +27,7 @@ #include "loader_prompt.h" #include "emac.h" #include "lib.h" +#include "eeprom.h" /* * .KB_C_FN_DEFINITION_START @@ -41,16 +42,12 @@ int main(void) { - + InitEEPROM(); EMAC_Init(); - LoadBootCommands(); - printf("\n\rKB9202(www.kwikbyte.com)\n\rAuto boot..\n\r"); - if (getc(1) == -1) ExecuteEnvironmentFunctions(); - Bootloader(0); return (1); ==== //depot/projects/uart/boot/arm/at91/libat91/Makefile#2 (text) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.1 2006/04/19 17:16:49 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.2 2006/04/21 13:51:47 imp Exp $ + +.include "${.CURDIR}/../Makefile.inc" LIB= at91 INTERNALLIB= @@ -6,4 +8,9 @@ p_string.c putchar.c printf.c xmodem.c NO_MAN= +.if ${MK_TAG_LIST} != "no" +CFLAGS += -I${.CURDIR}/.. -DSUPPORT_TAG_LIST +SRCS+=tag_list.c +.endif + .include ==== //depot/projects/uart/boot/arm/at91/libat91/at91rm9200_lowlevel.c#2 (text) ==== @@ -24,7 +24,7 @@ * This software is derived from software provide by Kwikbyte who specifically * disclaimed copyright on the code. * - * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c,v 1.1 2006/04/19 17:16:49 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c,v 1.2 2006/04/21 07:29:14 imp Exp $ */ #include "at91rm9200.h" @@ -93,6 +93,18 @@ while (!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MCKRDY)) continue; +#ifdef BOOT_KB9202 + // setup flash access (allow ample margin) + // 9 wait states, 1 setup, 1 hold, 1 float for 8-bit device + ((AT91PS_SMC2)AT91C_BASE_SMC2)->SMC2_CSR[0] = + AT91C_SMC2_WSEN | + (9 & AT91C_SMC2_NWS) | + ((1 << 8) & AT91C_SMC2_TDF) | + AT91C_SMC2_DBW_8 | + ((1 << 24) & AT91C_SMC2_RWSETUP) | + ((1 << 29) & AT91C_SMC2_RWHOLD); +#endif + // setup SDRAM access // EBI chip-select register (CS1 = SDRAM controller) // 9 col, 13row, 4 bank, CAS2 @@ -160,7 +172,7 @@ AT91C_BASE_PIOA->PIO_PDR = AT91C_PA31_DTXD | AT91C_PA30_DRXD; pUSART->US_IDR = (unsigned int) -1; pUSART->US_CR = - AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RXDIS | AT91C_US_TXDIS; + AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RXDIS | AT91C_US_TXDIS; pUSART->US_BRGR = ((((AT91C_MASTER_CLOCK*10)/(BAUD*16))+5)/10); pUSART->US_TTGR = 0; pPDC->PDC_PTCR = AT91C_PDC_RXTDIS; ==== //depot/projects/uart/boot/arm/at91/libat91/getc.c#2 (text) ==== @@ -31,7 +31,7 @@ * owners. This software is not copyrighted and is intended for reference * only. * - * $FreeBSD: src/sys/boot/arm/at91/libat91/getc.c,v 1.1 2006/04/19 17:16:49 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/getc.c,v 1.2 2006/04/21 13:58:51 imp Exp $ */ #include "at91rm9200.h" @@ -53,10 +53,10 @@ thisSecond = GetSeconds(); seconds = thisSecond + seconds; - while (thisSecond <= seconds) { + do { if ((pUSART->US_CSR & AT91C_US_RXRDY)) return (pUSART->US_RHR & 0xFF); thisSecond = GetSeconds(); - } + } while (thisSecond < seconds); return (-1); } ==== //depot/projects/uart/boot/arm/at91/libat91/loader_prompt.c#2 (text) ==== @@ -19,7 +19,7 @@ * only. * END_BLOCK * - * $FreeBSD: src/sys/boot/arm/at91/libat91/loader_prompt.c,v 1.1 2006/04/19 17:16:49 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/loader_prompt.c,v 1.2 2006/04/21 13:56:26 imp Exp $ *****************************************************************************/ #include "at91rm9200_lowlevel.h" @@ -420,7 +420,7 @@ printf("\r\n>"); - while (ch >= 0) + while (1) if ((ch = ((*inputFunction)(0))) > 0) ServicePrompt(ch); } ==== //depot/projects/uart/boot/arm/at91/libat91/tag_list.c#2 (text) ==== @@ -17,7 +17,7 @@ * only. * END_BLOCK * - * $FreeBSD: src/sys/boot/arm/at91/libat91/tag_list.c,v 1.1 2006/04/19 17:16:49 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/tag_list.c,v 1.2 2006/04/21 07:19:22 imp Exp $ *****************************************************************************/ /******************************* GLOBALS *************************************/ @@ -28,7 +28,9 @@ #define u16 unsigned short #define u8 unsigned char -#include "/usr/src/arm/linux/include/asm/setup.h" +// #include "/usr/src/arm/linux/include/asm/setup.h" +#include +#include "tag_list.h" #define PAGE_SIZE 0x1000 #define MEM_SIZE 0x2000000 ==== //depot/projects/uart/boot/arm/at91/libat91/tag_list.h#2 (text) ==== @@ -1,4 +1,4 @@ -/****************************************************************************** +/***************************************************************************** * * Filename: tag_list.h * @@ -17,8 +17,8 @@ * only. * END_BLOCK * - * $FreeBSD: src/sys/boot/arm/at91/libat91/tag_list.h,v 1.1 2006/04/19 17:16:49 imp Exp $ - *****************************************************************************/ + * $FreeBSD: src/sys/boot/arm/at91/libat91/tag_list.h,v 1.2 2006/04/21 07:12:12 imp Exp $ + ****************************************************************************/ #ifndef _TAG_LIST_H_ #define _TAG_LIST_H_ ==== //depot/projects/uart/conf/files.amd64#19 (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.83 2006/03/05 22:52:16 yar Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.84 2006/04/21 04:24: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 @@ -104,6 +104,7 @@ amd64/amd64/locore.S standard no-obj amd64/amd64/machdep.c standard amd64/amd64/mem.c optional mem +amd64/amd64/minidump_machdep.c standard amd64/amd64/mp_machdep.c optional smp amd64/amd64/mp_watchdog.c optional mp_watchdog smp amd64/amd64/mpboot.S optional smp ==== //depot/projects/uart/conf/files.i386#24 (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.i386,v 1.553 2006/03/05 22:52:16 yar Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.554 2006/04/21 04:28:43 peter Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -270,6 +270,7 @@ i386/i386/longrun.c optional cpu_enable_longrun i386/i386/machdep.c standard i386/i386/mem.c optional mem +i386/i386/minidump_machdep.c standard i386/i386/mp_clock.c optional smp i386/i386/mp_machdep.c optional smp i386/i386/mp_watchdog.c optional mp_watchdog smp ==== //depot/projects/uart/conf/files.pc98#21 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801/PC-9821 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.336 2006/03/05 22:52:16 yar Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.337 2006/04/21 12:13:11 nyan Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -159,6 +159,7 @@ i386/i386/local_apic.c optional apic i386/i386/locore.s standard no-obj i386/i386/mem.c optional mem +i386/i386/minidump_machdep.c standard i386/i386/mp_clock.c optional smp i386/i386/mp_machdep.c optional smp i386/i386/mp_watchdog.c optional mp_watchdog smp ==== //depot/projects/uart/i386/i386/dump_machdep.c#4 (text+ko) ==== @@ -25,12 +25,13 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/dump_machdep.c,v 1.11 2005/07/02 19:57:31 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/dump_machdep.c,v 1.12 2006/04/21 04:28:43 peter Exp $"); #include #include #include #include +#include #include #include #include @@ -40,6 +41,11 @@ CTASSERT(sizeof(struct kerneldumpheader) == 512); +int do_minidump = 1; +TUNABLE_INT("debug.minidump", &do_minidump); +SYSCTL_INT(_debug, OID_AUTO, minidump, CTLFLAG_RW, &do_minidump, 0, + "Enable mini crash dumps"); + /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This * is to protect us from metadata and to protect metadata from us. @@ -272,6 +278,10 @@ size_t hdrsz; int error; + if (do_minidump) { + minidumpsys(di); + return; + } bzero(&ehdr, sizeof(ehdr)); ehdr.e_ident[EI_MAG0] = ELFMAG0; ehdr.e_ident[EI_MAG1] = ELFMAG1; ==== //depot/projects/uart/i386/include/md_var.h#8 (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/i386/include/md_var.h,v 1.73 2005/10/14 22:52:01 jkim Exp $ + * $FreeBSD: src/sys/i386/include/md_var.h,v 1.74 2006/04/21 04:28:43 peter Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -65,12 +65,15 @@ #ifdef COMPAT_43 extern int szosigcode; #endif +extern uint32_t *vm_page_dump; +extern int vm_page_dump_size; typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss); struct thread; struct reg; struct fpreg; struct dbreg; +struct dumperinfo; void bcopyb(const void *from, void *to, size_t len); void busdma_swi(void); @@ -84,6 +87,8 @@ void doreti_popl_es_fault(void) __asm(__STRING(doreti_popl_es_fault)); void doreti_popl_fs(void) __asm(__STRING(doreti_popl_fs)); void doreti_popl_fs_fault(void) __asm(__STRING(doreti_popl_fs_fault)); +void dump_add_page(vm_paddr_t); +void dump_drop_page(vm_paddr_t); void enable_sse(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void i486_bzero(void *buf, size_t len); @@ -99,5 +104,6 @@ vm_paddr_t kvtop(void *addr); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); int user_dbreg_trap(void); +void minidumpsys(struct dumperinfo *); #endif /* !_MACHINE_MD_VAR_H_ */ ==== //depot/projects/uart/ia64/ia64/nexus.c#8 (text+ko) ==== @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia64/nexus.c,v 1.13 2006/04/20 04:18:30 imp Exp $ + * $FreeBSD: src/sys/ia64/ia64/nexus.c,v 1.14 2006/04/21 16:12:28 marcel Exp $ */ /* @@ -496,13 +496,11 @@ } static int -nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) +nexus_teardown_intr(device_t dev, device_t child, struct resource *ires, + void *cookie) { -#if 0 - return (inthand_remove(ih)); -#else - return 0; -#endif + + return (ia64_teardown_intr(cookie)); } static struct resource_list * ==== //depot/projects/uart/kern/kern_mbuf.c#10 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_mbuf.c,v 1.23 2006/03/08 14:05:38 andre Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_mbuf.c,v 1.24 2006/04/21 09:25:39 ps Exp $"); #include "opt_mac.h" #include "opt_param.h" @@ -112,7 +112,25 @@ SYSCTL_DECL(_kern_ipc); /* XXX: These should be tuneables. Can't change UMA limits on the fly. */ -SYSCTL_INT(_kern_ipc, OID_AUTO, nmbclusters, CTLFLAG_RW, &nmbclusters, 0, +static int +sysctl_nmbclusters(SYSCTL_HANDLER_ARGS) +{ + int error, newnmbclusters; + + newnmbclusters = nmbclusters; + error = sysctl_handle_int(oidp, &newnmbclusters, sizeof(int), req); + if (error == 0 && req->newptr) { + if (newnmbclusters > nmbclusters) { + nmbclusters = newnmbclusters; + uma_zone_set_max(zone_clust, nmbclusters); + EVENTHANDLER_INVOKE(nmbclusters_change); + } else + error = EINVAL; + } + return (error); +} +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbclusters, CTLTYPE_INT|CTLFLAG_RW, +&nmbclusters, 0, sysctl_nmbclusters, "IU", "Maximum number of mbuf clusters allowed"); SYSCTL_INT(_kern_ipc, OID_AUTO, nmbjumbop, CTLFLAG_RW, &nmbjumbop, 0, "Maximum number of mbuf page size jumbo clusters allowed"); ==== //depot/projects/uart/kern/uipc_domain.c#9 (text+ko) ==== @@ -30,12 +30,13 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_domain.c,v 1.45 2006/02/18 17:16:18 andre Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_domain.c,v 1.46 2006/04/21 09:25:39 ps Exp $"); #include #include #include #include +#include #include #include #include @@ -189,6 +190,13 @@ net_init_domain(dp); } +static void +socket_zone_change(void *tag) +{ + + uma_zone_set_max(socket_zone, maxsockets); +} + /* ARGSUSED*/ static void domaininit(void *dummy) @@ -201,6 +209,8 @@ socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_zone_set_max(socket_zone, maxsockets); + EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL, + EVENTHANDLER_PRI_FIRST); if (max_linkhdr < 16) /* XXX */ max_linkhdr = 16; ==== //depot/projects/uart/kern/uipc_socket2.c#12 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_socket2.c,v 1.155 2006/04/01 15:41:58 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_socket2.c,v 1.156 2006/04/21 09:25:39 ps Exp $"); #include "opt_mac.h" #include "opt_param.h" @@ -39,6 +39,7 @@ #include /* for aio_swake proto */ #include #include +#include #include /* for maxfiles */ #include #include @@ -1508,8 +1509,29 @@ SYSCTL_INT(_kern, KERN_DUMMY, dummy, CTLFLAG_RW, &dummy, 0, ""); SYSCTL_OID(_kern_ipc, KIPC_MAXSOCKBUF, maxsockbuf, CTLTYPE_ULONG|CTLFLAG_RW, &sb_max, 0, sysctl_handle_sb_max, "LU", "Maximum socket buffer size"); -SYSCTL_INT(_kern_ipc, OID_AUTO, maxsockets, CTLFLAG_RDTUN, - &maxsockets, 0, "Maximum number of sockets avaliable"); +static int +sysctl_maxsockets(SYSCTL_HANDLER_ARGS) +{ + int error, newmaxsockets; + + newmaxsockets = maxsockets; + error = sysctl_handle_int(oidp, &newmaxsockets, sizeof(int), req); + if (error == 0 && req->newptr) { + if (newmaxsockets > maxsockets) { + maxsockets = newmaxsockets; + if (maxsockets > ((maxfiles / 4) * 3)) { + maxfiles = (maxsockets * 5) / 4; + maxfilesperproc = (maxfiles * 9) / 10; + } + EVENTHANDLER_INVOKE(maxsockets_change); + } else + error = EINVAL; + } + return (error); +} +SYSCTL_PROC(_kern_ipc, OID_AUTO, maxsockets, CTLTYPE_INT|CTLFLAG_RW, + &maxsockets, 0, sysctl_maxsockets, "IU", + "Maximum number of sockets avaliable"); SYSCTL_ULONG(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW, &sb_efficiency, 0, ""); ==== //depot/projects/uart/kern/uipc_usrreq.c#12 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.165 2006/04/01 15:41:58 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.166 2006/04/21 09:25:39 ps Exp $"); #include "opt_mac.h" @@ -40,6 +40,7 @@ #include #include #include /* XXX must be before */ +#include #include #include #include @@ -1325,6 +1326,13 @@ return (error); } +static void +unp_zone_change(void *tag) +{ + + uma_zone_set_max(unp_zone, maxsockets); +} + void unp_init(void) { @@ -1332,7 +1340,9 @@ NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); if (unp_zone == NULL) panic("unp_init"); - uma_zone_set_max(unp_zone, nmbclusters); + uma_zone_set_max(unp_zone, maxsockets); + EVENTHANDLER_REGISTER(maxsockets_change, unp_zone_change, + NULL, EVENTHANDLER_PRI_ANY); LIST_INIT(&unp_dhead); LIST_INIT(&unp_shead); TASK_INIT(&unp_gc_task, 0, unp_gc, NULL); ==== //depot/projects/uart/netinet/ip_divert.c#12 (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/netinet/ip_divert.c,v 1.117 2006/04/03 09:01:17 rwatson Exp $ + * $FreeBSD: src/sys/netinet/ip_divert.c,v 1.118 2006/04/21 09:25:39 ps Exp $ */ #if !defined(KLD_MODULE) @@ -116,6 +116,13 @@ /* * Initialize divert connection block queue. */ +static void +div_zone_change(void *tag) +{ + + uma_zone_set_max(divcbinfo.ipi_zone, maxsockets); +} + void div_init(void) { @@ -132,6 +139,8 @@ divcbinfo.ipi_zone = uma_zcreate("divcb", sizeof(struct inpcb), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_zone_set_max(divcbinfo.ipi_zone, maxsockets); + EVENTHANDLER_REGISTER(maxsockets_change, div_zone_change, + NULL, EVENTHANDLER_PRI_ANY); } /* ==== //depot/projects/uart/netinet/ip_input.c#15 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/netinet/ip_input.c,v 1.315 2006/02/07 11:48:10 oleg Exp $ + * $FreeBSD: src/sys/netinet/ip_input.c,v 1.316 2006/04/21 09:25:39 ps Exp $ */ #include "opt_bootp.h" @@ -167,6 +167,7 @@ #define IPQ_LOCK_ASSERT() mtx_assert(&ipqlock, MA_OWNED) static void maxnipq_update(void); +static void ipq_zone_change(void *); static int maxnipq; /* Administrative limit on # reass queues. */ static int nipq = 0; /* Total # of reass queues */ @@ -256,6 +257,8 @@ ipport_tick(NULL); EVENTHANDLER_REGISTER(shutdown_pre_sync, ip_fini, NULL, SHUTDOWN_PRI_DEFAULT); + EVENTHANDLER_REGISTER(nmbclusters_change, ipq_zone_change, + NULL, EVENTHANDLER_PRI_ANY); /* Initialize various other remaining things. */ ip_id = time_second & 0xffff; @@ -687,6 +690,16 @@ uma_zone_set_max(ipq_zone, 1); } +static void +ipq_zone_change(void *tag) +{ + + if (maxnipq > 0 && maxnipq < (nmbclusters / 32)) { + maxnipq = nmbclusters / 32; + maxnipq_update(); + } +} + static int sysctl_maxnipq(SYSCTL_HANDLER_ARGS) { ==== //depot/projects/uart/netinet/raw_ip.c#15 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 - * $FreeBSD: src/sys/netinet/raw_ip.c,v 1.159 2006/04/01 16:20:53 rwatson Exp $ + * $FreeBSD: src/sys/netinet/raw_ip.c,v 1.160 2006/04/21 09:25:39 ps Exp $ */ #include "opt_inet6.h" @@ -116,6 +116,13 @@ /* * Initialize raw connection block q. */ +static void +rip_zone_change(void *tag) +{ + + uma_zone_set_max(ripcbinfo.ipi_zone, maxsockets); +} + void rip_init() { @@ -132,6 +139,8 @@ ripcbinfo.ipi_zone = uma_zcreate("ripcb", sizeof(struct inpcb), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_zone_set_max(ripcbinfo.ipi_zone, maxsockets); + EVENTHANDLER_REGISTER(maxsockets_change, rip_zone_change, + NULL, EVENTHANDLER_PRI_ANY); } static struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET }; ==== //depot/projects/uart/netinet/tcp_input.c#23 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 - * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.297 2006/04/09 16:59:19 rwatson Exp $ + * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.298 2006/04/21 09:25:39 ps Exp $ */ #include "opt_ipfw.h" /* for ipfw_fwd */ @@ -202,6 +202,14 @@ (tcp_delack_enabled || (tp->t_flags & TF_NEEDSYN))) /* Initialize TCP reassembly queue */ +static void +tcp_reass_zone_change(void *tag) +{ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Apr 21 17:44:49 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1120E16A404; Fri, 21 Apr 2006 17:44:49 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C321B16A403 for ; Fri, 21 Apr 2006 17:44:48 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A28AB43D5C for ; Fri, 21 Apr 2006 17:44:47 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LHilNS067379 for ; Fri, 21 Apr 2006 17:44:47 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LHilrF067376 for perforce@freebsd.org; Fri, 21 Apr 2006 17:44:47 GMT (envelope-from millert@freebsd.org) Date: Fri, 21 Apr 2006 17:44:47 GMT Message-Id: <200604211744.k3LHilrF067376@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95805 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 17:44:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=95805 Change 95805 by millert@millert_g5tower on 2006/04/21 17:43:50 Adapt to selinux userland update Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/darwin/osx_cmds/MAC.loginPlugin/MAC.loginPlugin.xcode/project.pbxproj#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/darwin/osx_cmds/MAC.loginPlugin/plugins/SEDarwin/SEDarwin.h#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/darwin/osx_cmds/MAC.loginPlugin/plugins/SEDarwin/SEDarwin.m#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/darwin/pam_modules/pam_sedarwin/GNUmakefile#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/darwin/pam_modules/pam_sedarwin/pam_sedarwin.c#3 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/relabel_gui/LabelDialog.m#4 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/relabel_gui/relabel_gui.pbproj/project.pbxproj#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/darwin/osx_cmds/MAC.loginPlugin/MAC.loginPlugin.xcode/project.pbxproj#3 (text+ko) ==== @@ -81,8 +81,8 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; INFOPLIST_FILE = plugins/SEDarwin/Info.plist; - OTHER_CFLAGS = "-I../../xnu/BUILD/obj/EXPORT_HDRS/bsd -idirafter ../../xnu/BUILD/obj/EXPORT_HDRS/osfmk -I../../../sedarwin/libselinux/include -I../../../sedarwin"; - OTHER_LDFLAGS = "-framework Foundation -framework AppKit -L../../libmac -lmac -L../../../sedarwin/libselinux/src -lselinux"; + OTHER_CFLAGS = "-I../../xnu/BUILD/obj/EXPORT_HDRS/bsd -idirafter ../../xnu/BUILD/obj/EXPORT_HDRS/osfmk -I../../../sedarwin/libselinux/include"; + OTHER_LDFLAGS = "-framework Foundation -framework AppKit -L../../../sedarwin/libselinux/src -lselinux -L../../../sedarwin/libsepol/src -lsepol -L../../../sedarwin/libsecompat -lsecompat -L../../libmac -lmac"; OTHER_REZFLAGS = ""; PRODUCT_NAME = SEDarwin; SECTORDER_FLAGS = ""; ==== //depot/projects/trustedbsd/sedarwin7/src/darwin/osx_cmds/MAC.loginPlugin/plugins/SEDarwin/SEDarwin.h#3 (text+ko) ==== @@ -6,8 +6,8 @@ #include #include #include +#include #include -#include @interface SEDarwin : NSObject { ==== //depot/projects/trustedbsd/sedarwin7/src/darwin/osx_cmds/MAC.loginPlugin/plugins/SEDarwin/SEDarwin.m#4 (text+ko) ==== @@ -41,7 +41,7 @@ return; } - if (!sebsd_enabled()) + if (!is_selinux_enabled()) return; /* @@ -88,7 +88,7 @@ } /* XXX - use SELINUX_DEFAULTUSER and fill in selector if not enabled? */ - if (!sebsd_enabled()) + if (!is_selinux_enabled()) return (MAC_LOGIN_OK); /* ==== //depot/projects/trustedbsd/sedarwin7/src/darwin/pam_modules/pam_sedarwin/GNUmakefile#3 (text+ko) ==== @@ -7,9 +7,11 @@ Extra_CC_Flags =-I../../pam/pam/libpam/include/pam/ \ -I../../xnu/BUILD/obj/EXPORT_HDRS/bsd/ \ -idirafter ../../xnu/BUILD/obj/EXPORT_HDRS/osfmk \ - -I../../../sedarwin -I../../../sedarwin/libselinux/include + -I../../../sedarwin/libselinux/include Extra_LD_Flags =-L../../../sedarwin/libselinux/src/ -lselinux \ + -L../../../sedarwin/libsepol/src/ -lsepol \ + -L../../../sedarwin/libsecompat/ -lsecompat \ -L../../libmac/ -lmac include ../PAMModule.defs ==== //depot/projects/trustedbsd/sedarwin7/src/darwin/pam_modules/pam_sedarwin/pam_sedarwin.c#3 (text+ko) ==== @@ -32,8 +32,8 @@ #define _BSD_SOURCE #include #include +#include #include -#include #include #include @@ -115,7 +115,7 @@ int ncontexts, retval, which; /* XXX - use SELINUX_DEFAULTUSER if not enabled? */ - if (!sebsd_enabled()) { + if (!is_selinux_enabled()) { syslog(LOG_ERR, "%s(): SEDarwin not enabled", __func__); return (PAM_SUCCESS); } @@ -171,7 +171,7 @@ mac_t label; int retval; - if (!sebsd_enabled()) { + if (!is_selinux_enabled()) { syslog(LOG_ERR, "%s(): SEDarwin not enabled", __func__); return (PAM_SUCCESS); } ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/relabel_gui/LabelDialog.m#4 (text+ko) ==== @@ -2,7 +2,8 @@ #import "LabelDialog.h" #import #import -#import +//#import +#import const char *filename; char *initial; @@ -10,9 +11,6 @@ char **users, **roles, **types; size_t nusers, nroles, ntypes; -extern int security_get_file_contexts(const char *fromcontext, char ***retcontexts, size_t *ncontexts); -extern char *getseccontext(void); - static void addstring (char **ar, size_t *n, char *in) { int i; @@ -55,8 +53,16 @@ char **filelabels; size_t nfilelabels; - if (security_get_file_contexts (getseccontext(), &filelabels, &nfilelabels)) + char *seccon; + + if (getcon(&seccon)) { + fprintf(stderr, "Failed to get the current security context\n"); + exit(1); + } + if (security_get_file_contexts (seccon, &filelabels, &nfilelabels)) +// if (security_get_file_contexts (getseccontext(), &filelabels, &nfilelabels)) exit (1); + free(seccon); users = (char **) malloc (sizeof (char *) * (1+nfilelabels)); roles = (char **) malloc (sizeof (char *) * (1+nfilelabels)); types = (char **) malloc (sizeof (char *) * (1+nfilelabels)); ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/programs/relabel_gui/relabel_gui.pbproj/project.pbxproj#5 (text+ko) ==== @@ -173,7 +173,7 @@ HEADER_SEARCH_PATHS = ""; INSTALL_PATH = "/Applications"; LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = "-I../.. -I../../../darwin/xnu/BUILD/obj/EXPORT_HDRS/bsd -idirafter ../../../darwin/xnu/BUILD/obj/EXPORT_HDRS/osfmk"; + OTHER_CFLAGS = "-I../../libselinux/include -I../../../darwin/xnu/BUILD/obj/EXPORT_HDRS/bsd -idirafter ../../../darwin/xnu/BUILD/obj/EXPORT_HDRS/osfmk"; OTHER_LDFLAGS = "../../libselinux/src/libselinux.a ../../../darwin/libmac/libmac.a"; PRODUCT_NAME = relabel; SECTORDER_FLAGS = ""; From owner-p4-projects@FreeBSD.ORG Fri Apr 21 18:01:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9B4AB16A403; Fri, 21 Apr 2006 18:01:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53EF216A400 for ; Fri, 21 Apr 2006 18:01:08 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1609243D48 for ; Fri, 21 Apr 2006 18:01:08 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LI17dt075899 for ; Fri, 21 Apr 2006 18:01:07 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LI17b1075886 for perforce@freebsd.org; Fri, 21 Apr 2006 18:01:07 GMT (envelope-from marcel@freebsd.org) Date: Fri, 21 Apr 2006 18:01:07 GMT Message-Id: <200604211801.k3LI17b1075886@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 Cc: Subject: PERFORCE change 95806 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 18:01:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=95806 Change 95806 by marcel@marcel_nfs on 2006/04/21 18:00:26 Brainwave: have puc_intr() only handle serdev devices. Non-serdev devices (including non-serdev serial drivers) will have their interrupt handler setup by the bus implementation. This makes live so much easier as it assures that serdev devices with fast interrupt handlers don't get pessimized by Giant-locked parallel ports (by virtue of having puc(4) re-setup its interrupt handler as MPSAFE). If there are no serdev children, puc(4) tears down its handler. Affected files ... .. //depot/projects/uart/dev/puc/puc.c#33 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#33 (text+ko) ==== @@ -58,8 +58,6 @@ int p_rclk; int p_hasintr:1; - int p_fastintr:1; - int p_giantintr:1; driver_intr_t *p_ih; serdev_intr_t *p_ihsrc[PUC_ISRCCNT]; @@ -135,7 +133,6 @@ u_long dev, devs; int i, idx, ipend, isrc; - /* handle serdev I/F compliant devices first. */ ipend = 0; idx = 0, dev = 1UL; devs = sc->sc_serdevs; @@ -148,26 +145,6 @@ ipend |= port->p_ipend; } - if (ipend == 0) { - idx = 0, dev = 1UL; - devs = ~sc->sc_serdevs & ((1UL << sc->sc_nports) - 1); - while (devs != 0UL) { - while ((devs & dev) == 0UL) - idx++, dev <<= 1; - devs &= ~dev; - port = &sc->sc_port[idx]; - if (port->p_ih != NULL) { - if (port->p_giantintr) { - mtx_lock(&Giant); - (*port->p_ih)(port->p_iharg); - mtx_unlock(&Giant); - } else - (*port->p_ih)(port->p_iharg); - } - } - return; - } - i = 0, isrc = SER_INT_OVERRUN; while (ipend) { while (i < PUC_ISRCCNT && !(ipend & isrc)) @@ -322,6 +299,13 @@ } } + /* + * If there are no serdev devices, then our interrupt handler + * will do nothing. Tear it down. + */ + if (sc->sc_serdevs == 0UL) + bus_teardown_intr(dev, sc->sc_ires, sc->sc_icookie); + return (0); fail: @@ -375,7 +359,8 @@ if (error) return (error); - bus_teardown_intr(dev, sc->sc_ires, sc->sc_icookie); + if (sc->sc_serdevs != 0UL) + bus_teardown_intr(dev, sc->sc_ires, sc->sc_icookie); bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irid, sc->sc_ires); for (idx = 0; idx < PUC_PCI_BARS; idx++) { @@ -550,7 +535,7 @@ struct puc_port *port; struct puc_softc *sc; device_t originator; - int i, isrc; + int i, isrc, serdev; sc = device_get_softc(dev); @@ -570,37 +555,35 @@ return (ENXIO); /* - * If one of our children doesn't have a fast interrupt handler, - * downgrade our interrupt handler from a fast handler to a - * MP safe handler. We acquire giant on a need to have basis. + * Have non-serdev ports handled by the bus implementation. It + * supports multiple handlers for a single interrupt as it is, + * so we wouldn't add value if we did it ourselves. */ - if (sc->sc_fastintr && !(flags & INTR_FAST)) { - sc->sc_fastintr = 0; - bus_teardown_intr(dev, sc->sc_ires, sc->sc_icookie); - bus_setup_intr(dev, sc->sc_ires, INTR_TYPE_TTY | INTR_MPSAFE, - puc_intr, sc, &sc->sc_icookie); - } - - port->p_hasintr = 1; - port->p_fastintr = (flags & INTR_FAST) ? 1 : 0; - port->p_giantintr = (flags & (INTR_FAST | INTR_MPSAFE)) ? 0 : 1; - port->p_ih = ihand; - port->p_iharg = arg; - - *cookiep = originator; - + serdev = 0; if (port->p_type == PUC_TYPE_SERIAL) { i = 0, isrc = SER_INT_OVERRUN; while (i < PUC_ISRCCNT) { port->p_ihsrc[i] = SERDEV_IHAND(originator, isrc); - if (port->p_ihsrc[i] != NULL) { - sc->sc_serdevs |= 1UL << (port->p_nr - 1); - port->p_ih = NULL; - } + if (port->p_ihsrc[i] != NULL) + serdev = 1; i++, isrc <<= 1; } } + if (!serdev) + return (BUS_SETUP_INTR(device_get_parent(dev), originator, + sc->sc_ires, flags, ihand, arg, cookiep)); + + /* We demand that serdev devices use fast interrupts. */ + if (!(flags & INTR_FAST)) + return (ENXIO); + + sc->sc_serdevs |= 1UL << (port->p_nr - 1); + + port->p_hasintr = 1; + port->p_ih = ihand; + port->p_iharg = arg; + *cookiep = port; return (0); } @@ -609,9 +592,12 @@ void *cookie) { struct puc_port *port; + struct puc_softc *sc; device_t originator; int i; + sc = device_get_softc(dev); + /* Get our immediate child. */ originator = child; while (child != NULL && device_get_parent(child) != dev) @@ -622,23 +608,24 @@ port = device_get_ivars(child); KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); - if (res != port->p_ires || cookie != originator) + if (res != port->p_ires) return (EINVAL); if (rman_get_device(port->p_ires) != originator) return (ENXIO); + if (!port->p_hasintr) - return (ENXIO); + return (BUS_TEARDOWN_INTR(device_get_parent(dev), originator, + sc->sc_ires, cookie)); + + if (cookie != port) + return (EINVAL); port->p_hasintr = 0; - port->p_fastintr = 0; - port->p_giantintr = 0; port->p_ih = NULL; port->p_iharg = NULL; - if (port->p_type == PUC_TYPE_SERIAL) { - for (i = 0; i < PUC_ISRCCNT; i++) - port->p_ihsrc[i] = NULL; - } + for (i = 0; i < PUC_ISRCCNT; i++) + port->p_ihsrc[i] = NULL; return (0); } From owner-p4-projects@FreeBSD.ORG Fri Apr 21 18:03:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8374516A403; Fri, 21 Apr 2006 18:03:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C04316A401 for ; Fri, 21 Apr 2006 18:03:11 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11CAD43D46 for ; Fri, 21 Apr 2006 18:03:11 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LI3BhG078694 for ; Fri, 21 Apr 2006 18:03:11 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LI3Alc078686 for perforce@freebsd.org; Fri, 21 Apr 2006 18:03:10 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 18:03:10 GMT Message-Id: <200604211803.k3LI3Alc078686@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95807 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 18:03:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=95807 Change 95807 by imp@imp_hammer on 2006/04/21 18:03:02 Revert optimizations until they can be debugged. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#5 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/****************************************************************************** +/******************************************************************************* * * Filename: emac.c * @@ -18,23 +18,22 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - * - * $FreeBSD: src/sys/boot/arm/at91/libat91/emac.c,v 1.1 2006/04/19 17:16:49 imp Exp $ - *****************************************************************************/ + ******************************************************************************/ #include "at91rm9200.h" +#include "at91rm9200_lowlevel.h" #include "emac.h" #include "p_string.h" -#include "at91rm9200_lowlevel.h" #include "lib.h" -/******************************* GLOBALS *************************************/ +/* ****************************** GLOBALS *************************************/ -/*********************** PRIVATE FUNCTIONS/DATA ******************************/ +/* ********************** PRIVATE FUNCTIONS/DATA ******************************/ static unsigned localMACSet, serverMACSet, MAC_init; static unsigned char localMACAddr[6], serverMACAddr[6]; -static unsigned localIPAddr, serverIPAddr; +static unsigned localIPSet, serverIPSet; +static unsigned char localIPAddr[4], serverIPAddr[4]; static unsigned short serverPort, localPort; static int ackBlock; @@ -53,17 +52,17 @@ * This private function calculates the IP checksum for various headers. * .KB_C_FN_DEFINITION_END */ -static unsigned short -IP_checksum(void *cp, int len) +static unsigned short IP_checksum(unsigned short *p, int len) { unsigned i, t; - unsigned short *p = (unsigned short *)cp; len &= ~1; + for (i=0,t=0; i> 16); - return (~t); + return (~t); } @@ -73,13 +72,14 @@ * This private function sends an ARP request to determine the server MAC. * .KB_C_FN_DEFINITION_END */ -static void -GetServerAddress(void) -{ +static void GetServerAddress(void) { + arp_header_t *p_ARP; p_ARP = (arp_header_t*)transmitBuffer; + p_memset((char*)p_ARP->dest_mac, 0xFF, 6); + p_memcpy((char*)p_ARP->src_mac, (char*)localMACAddr, 6); p_ARP->frame_type = SWAP16(PROTOCOL_ARP); @@ -90,8 +90,11 @@ p_ARP->operation = SWAP16(ARP_REQUEST); p_memcpy((char*)p_ARP->sender_mac, (char*)localMACAddr, 6); + p_memcpy((char*)p_ARP->sender_ip, (char*)localIPAddr, 4); + p_memset((char*)p_ARP->target_mac, 0, 6); + p_memcpy((char*)p_ARP->target_ip, (char*)serverIPAddr, 4); // wait until transmit is available @@ -109,8 +112,7 @@ * This private function initializes and send a TFTP packet. * .KB_C_FN_DEFINITION_END */ -static void -Send_TFTP_Packet(char *tftpData, unsigned tftpLength) +static void Send_TFTP_Packet(char *tftpData, unsigned tftpLength) { transmit_header_t *macHdr = (transmit_header_t*)tftpSendPacket; ip_header_t *ipHdr; @@ -118,11 +120,12 @@ unsigned t_checksum; p_memcpy((char*)macHdr->dest_mac, (char*)serverMACAddr, 6); + p_memcpy((char*)macHdr->src_mac, (char*)localMACAddr, 6); macHdr->proto_mac = SWAP16(PROTOCOL_IP); - ipHdr = &macHdr->iphdr; + ipHdr = (ip_header_t*)&macHdr->packet_length; ipHdr->ip_v_hl = 0x45; ipHdr->ip_tos = 0; @@ -134,20 +137,21 @@ ipHdr->ip_sum = 0; p_memcpy((char*)ipHdr->ip_src, (char*)localIPAddr, 4); + p_memcpy((char*)ipHdr->ip_dst, (char*)serverIPAddr, 4); - ipHdr->ip_sum = SWAP16(IP_checksum(ipHdr, 20)); + ipHdr->ip_sum = SWAP16(IP_checksum((unsigned short*)ipHdr, 20)); udpHdr = (udp_header_t*)(ipHdr + 1); - udpHdr->src_port = localPort; - udpHdr->dst_port = serverPort; + udpHdr->src_port = SWAP16(localPort); + udpHdr->dst_port = SWAP16(serverPort); udpHdr->udp_len = SWAP16(8 + tftpLength); udpHdr->udp_cksum = 0; p_memcpy((char*)udpHdr+8, tftpData, tftpLength); - t_checksum = IP_checksum((char *)ipHdr + 12, (16 + tftpLength)); + t_checksum = IP_checksum((unsigned short*)ipHdr + 6, (16 + tftpLength)); t_checksum = (~t_checksum) & 0xFFFF; t_checksum += 25 + tftpLength; @@ -171,9 +175,8 @@ * This private function sends a RRQ packet to the server. * .KB_C_FN_DEFINITION_END */ -static void -TFTP_RequestFile(char *filename) -{ +static void TFTP_RequestFile(char *filename) { + tftp_header_t tftpHeader; char *cPtr, *ePtr, *mPtr; unsigned length; @@ -198,12 +201,11 @@ * This private function sends an ACK packet to the server. * .KB_C_FN_DEFINITION_END */ -static void -TFTP_ACK_Data(char *data, unsigned short block_num, unsigned short len) -{ +static void TFTP_ACK_Data(char *data, unsigned short block_num, unsigned short len) { + tftp_header_t tftpHeader; - if (block_num == SWAP16(ackBlock + 1)) { + if (block_num == (ackBlock + 1)) { ++ackBlock; p_memcpy(dlAddress, data, len); dlAddress += len; @@ -211,7 +213,7 @@ } tftpHeader.opcode = SWAP16(TFTP_ACK_OPCODE); - tftpHeader.block_num = block_num; + tftpHeader.block_num = SWAP16(block_num); Send_TFTP_Packet((char*)&tftpHeader, 4); if (len < 512) @@ -226,10 +228,9 @@ * any here. * .KB_C_FN_DEFINITION_END */ -static void -CheckForNewPacket(void) -{ - unsigned short *pFrameType; +static void CheckForNewPacket(ip_header_t *pHeader) { + + unsigned short *pFrameType, *pArpOp; unsigned i; char *pData; ip_header_t *pIpHeader; @@ -256,10 +257,11 @@ switch (SWAP16(*pFrameType)) { case PROTOCOL_ARP: + + pArpOp = (unsigned short *) (pData + 20); p_ARP = (arp_header_t*)pData; - i = SWAP16(p_ARP->operation); - if (i == ARP_REPLY) { + if (SWAP16(*pArpOp) == ARP_REPLY) { // check if new server info is available if ((!serverMACSet) && @@ -271,22 +273,30 @@ p_memcpy((char*)serverMACAddr, (char*)p_ARP->sender_mac, 6); } - } else if (i == ARP_REQUEST) { + } + + if (SWAP16(*pArpOp) == ARP_REQUEST) { // ARP REPLY operation - p_ARP->operation = SWAP16(ARP_REPLY); + *pArpOp = SWAP16(ARP_REPLY); + + // Fill the dest address and src address + for (i = 0; i <6; i++) { + // swap ethernet dest address and ethernet src address + pData[i] = pData[i+6]; + pData[i+6] = localMACAddr[i]; + // swap sender ethernet address and target ethernet address + pData[i+22] = localMACAddr[i]; + pData[i+32] = pData[i+6]; + } - // Swap the src/dst MAC addr - p_memcpy(p_ARP->dest_mac, p_ARP->src_mac, 6); - p_memcpy(p_ARP->src_mac, localMACAddr, 6); - - // Do IP and MAC addr at same time. - p_memcpy(p_ARP->target_mac, p_ARP->sender_mac, 10); - p_memcpy(p_ARP->sender_mac, localMACAddr, 6); - p_memcpy(p_ARP->sender_ip, (char *)&localIPAddr, 4); + // swap sender IP address and target IP address + for (i = 0; i<4; i++) { + pData[i+38] = pData[i+28]; + pData[i+28] = localIPAddr[i]; + } - if (!(*AT91C_EMAC_TSR & AT91C_EMAC_BNQ)) - break; + if (!(*AT91C_EMAC_TSR & AT91C_EMAC_BNQ)) break; *AT91C_EMAC_TSR |= AT91C_EMAC_COMP; *AT91C_EMAC_TAR = (unsigned)pData; @@ -295,8 +305,11 @@ break; case PROTOCOL_IP: - pIpHeader = (ip_header_t*)(pData + 14); + pIpHeader = (ip_header_t*)(pData + 14); + p_memcpy((char*)pHeader, (char*)pIpHeader,sizeof(ip_header_t)); + switch(pIpHeader->ip_p) { + case PROTOCOL_UDP: { udp_header_t *udpHdr; @@ -305,24 +318,24 @@ udpHdr = (udp_header_t*)((char*)pIpHeader+20); tftpHdr = (tftp_header_t*)((char*)udpHdr + 8); - if (udpHdr->dst_port != localPort) + if (SWAP16(udpHdr->dst_port) != localPort) break; - if (tftpHdr->opcode != SWAP16(TFTP_DATA_OPCODE)) + if (SWAP16(tftpHdr->opcode) != TFTP_DATA_OPCODE) break; if (ackBlock == -1) { - if (tftpHdr->block_num != SWAP16(1)) + if (SWAP16(tftpHdr->block_num) != 1) break; - serverPort = udpHdr->src_port; + serverPort = SWAP16(udpHdr->src_port); ackBlock = 0; } - if (serverPort != udpHdr->src_port) + if (serverPort != SWAP16(udpHdr->src_port)) break; TFTP_ACK_Data(tftpHdr->data, - tftpHdr->block_num, + SWAP16(tftpHdr->block_num), SWAP16(udpHdr->udp_len) - 12); } break; @@ -345,9 +358,8 @@ * This private function reads the PHY device. * .KB_C_FN_DEFINITION_END */ -static unsigned short -AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) -{ +static unsigned short AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) { + unsigned value = 0x60020000 | (addr << 18); pEmac->EMAC_CTL |= AT91C_EMAC_MPE; @@ -364,12 +376,11 @@ * This private function determines the link speed set by the PHY. * .KB_C_FN_DEFINITION_END */ -static void -MII_GetLinkSpeed(AT91PS_EMAC pEmac) -{ - unsigned short stat2; +static void MII_GetLinkSpeed(AT91PS_EMAC pEmac) { + + unsigned short stat2; unsigned update = 0; - + stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); if (!(stat2 & 0x400)) { @@ -398,14 +409,14 @@ * This private function initializes the EMAC on the chip. * .KB_C_FN_DEFINITION_END */ -static void -AT91F_EmacEntry(void) -{ +static void AT91F_EmacEntry(void) { + unsigned i; char *pRxPacket = (char*)RX_DATA_START; AT91PS_EMAC pEmac = AT91C_BASE_EMAC; for (i = 0; i < MAX_RX_PACKETS; ++i) { + p_rxBD[i].address = (unsigned)pRxPacket; p_rxBD[i].size = 0; pRxPacket += RX_PACKET_SIZE; @@ -420,9 +431,7 @@ MII_GetLinkSpeed(pEmac); // the sequence write EMAC_SA1L and write EMAC_SA1H must be respected - pEmac->EMAC_SA1L = ((unsigned)localMACAddr[2] << 24) | - ((unsigned)localMACAddr[3] << 16) | ((int)localMACAddr[4] << 8) | - localMACAddr[5]; + pEmac->EMAC_SA1L = ((unsigned)localMACAddr[2] << 24) | ((unsigned)localMACAddr[3] << 16) | ((int)localMACAddr[4] << 8) | localMACAddr[5]; pEmac->EMAC_SA1H = ((unsigned)localMACAddr[0] << 8) | localMACAddr[1]; pEmac->EMAC_RBQP = (unsigned) p_rxBD; @@ -446,9 +455,7 @@ * four bytes while high_address is the last 2 bytes of the 48-bit value. * .KB_C_FN_DEFINITION_END */ -void -SetMACAddress(unsigned low_address, unsigned high_address) -{ +void SetMACAddress(unsigned low_address, unsigned high_address) { AT91PS_EMAC pEmac = AT91C_BASE_EMAC; AT91PS_PMC pPMC = AT91C_BASE_PMC; @@ -483,12 +490,17 @@ * This global function sets the IP of the TFTP download server. * .KB_C_FN_DEFINITION_END */ -void -SetServerIPAddress(unsigned address) -{ +void SetServerIPAddress(unsigned address) { + // force update in case the IP has changed serverMACSet = 0; - serverIPAddr = address; + + serverIPAddr[0] = (address >> 24) & 0xFF; + serverIPAddr[1] = (address >> 16) & 0xFF; + serverIPAddr[2] = (address >> 8) & 0xFF; + serverIPAddr[3] = (address >> 0) & 0xFF; + + serverIPSet = 1; } @@ -498,12 +510,17 @@ * This global function sets the IP of this module. * .KB_C_FN_DEFINITION_END */ -void -SetLocalIPAddress(unsigned address) -{ +void SetLocalIPAddress(unsigned address) { + // force update in case the IP has changed serverMACSet = 0; - localIPAddr = address; + + localIPAddr[0] = (address >> 24) & 0xFF; + localIPAddr[1] = (address >> 16) & 0xFF; + localIPAddr[2] = (address >> 8) & 0xFF; + localIPAddr[3] = (address >> 0) & 0xFF; + + localIPSet = 1; } @@ -515,68 +532,71 @@ * executed. * .KB_C_FN_DEFINITION_END */ -void -TFTP_Download(unsigned address, char *filename) +void TFTP_Download(unsigned address, char *filename) { + ip_header_t IpHeader; unsigned thisSeconds, running, state; int timeout, tickUpdate; if (!address) { // report last transfer information - printf("Last tftp transfer info --\r\n" - "address: 0x%x\r\n" - " size: 0x%x\r\n", lastAddress, lastSize); + printf("\r\n -- Last tftp transfer info --\r\n" + " address: 0x%x\r\n" + " size: 0x%x\r\n", lastAddress, lastSize); return ; } - if ((!localMACSet) || (!localIPAddr) || (!serverIPAddr)) + if ((!localMACSet) || (!localIPSet) || (!serverIPSet)) return ; if (!MAC_init) { - AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_EMAC; + AT91C_BASE_PMC->PMC_PCER = + ((unsigned) 1 << AT91C_ID_EMAC); - AT91C_BASE_PIOA->PIO_ASR = - AT91C_PA14_ERXER | - AT91C_PA12_ERX0 | - AT91C_PA13_ERX1 | - AT91C_PA8_ETXEN | - AT91C_PA16_EMDIO | - AT91C_PA9_ETX0 | - AT91C_PA10_ETX1 | - AT91C_PA11_ECRS_ECRSDV | - AT91C_PA15_EMDC | - AT91C_PA7_ETXCK_EREFCK; + AT91C_BASE_PIOA->PIO_ASR = + ((unsigned) AT91C_PA14_ERXER ) | + ((unsigned) AT91C_PA12_ERX0 ) | + ((unsigned) AT91C_PA13_ERX1 ) | + ((unsigned) AT91C_PA8_ETXEN ) | + ((unsigned) AT91C_PA16_EMDIO ) | + ((unsigned) AT91C_PA9_ETX0 ) | + ((unsigned) AT91C_PA10_ETX1 ) | + ((unsigned) AT91C_PA11_ECRS_ECRSDV) | + ((unsigned) AT91C_PA15_EMDC ) | + ((unsigned) AT91C_PA7_ETXCK_EREFCK); AT91C_BASE_PIOA->PIO_BSR = 0; - AT91C_BASE_PIOA->PIO_PDR = - AT91C_PA14_ERXER | - AT91C_PA12_ERX0 | - AT91C_PA13_ERX1 | - AT91C_PA8_ETXEN | - AT91C_PA16_EMDIO | - AT91C_PA9_ETX0 | - AT91C_PA10_ETX1 | - AT91C_PA11_ECRS_ECRSDV | - AT91C_PA15_EMDC | - AT91C_PA7_ETXCK_EREFCK; + AT91C_BASE_PIOA->PIO_PDR = + ((unsigned) AT91C_PA14_ERXER ) | + ((unsigned) AT91C_PA12_ERX0 ) | + ((unsigned) AT91C_PA13_ERX1 ) | + ((unsigned) AT91C_PA8_ETXEN ) | + ((unsigned) AT91C_PA16_EMDIO ) | + ((unsigned) AT91C_PA9_ETX0 ) | + ((unsigned) AT91C_PA10_ETX1 ) | + ((unsigned) AT91C_PA11_ECRS_ECRSDV) | + ((unsigned) AT91C_PA15_EMDC ) | + ((unsigned) AT91C_PA7_ETXCK_EREFCK); + AT91C_BASE_PIOB->PIO_ASR = 0; AT91C_BASE_PIOB->PIO_BSR = - AT91C_PB12_ETX2 | - AT91C_PB13_ETX3 | - AT91C_PB14_ETXER | - AT91C_PB15_ERX2 | - AT91C_PB16_ERX3 | - AT91C_PB17_ERXDV | - AT91C_PB18_ECOL | - AT91C_PB19_ERXCK; + ((unsigned) AT91C_PB12_ETX2) | + ((unsigned) AT91C_PB13_ETX3) | + ((unsigned) AT91C_PB14_ETXER) | + ((unsigned) AT91C_PB15_ERX2) | + ((unsigned) AT91C_PB16_ERX3) | + ((unsigned) AT91C_PB17_ERXDV) | + ((unsigned) AT91C_PB18_ECOL) | + ((unsigned) AT91C_PB19_ERXCK); AT91C_BASE_PIOB->PIO_PDR = - AT91C_PB12_ETX2 | - AT91C_PB13_ETX3 | - AT91C_PB14_ETXER | - AT91C_PB15_ERX2 | - AT91C_PB16_ERX3 | - AT91C_PB17_ERXDV | - AT91C_PB18_ECOL | - AT91C_PB19_ERXCK; + ((unsigned) AT91C_PB12_ETX2) | + ((unsigned) AT91C_PB13_ETX3) | + ((unsigned) AT91C_PB14_ETXER) | + ((unsigned) AT91C_PB15_ERX2) | + ((unsigned) AT91C_PB16_ERX3) | + ((unsigned) AT91C_PB17_ERXDV) | + ((unsigned) AT91C_PB18_ECOL) | + ((unsigned) AT91C_PB19_ERXCK); + MAC_init = 1; } @@ -590,13 +610,13 @@ state = TFTP_WAITING_SERVER_MAC; timeout = 10; thisSeconds = GetSeconds(); - serverPort = SWAP16(69); - localPort++; /* In network byte order, but who cares */ + serverPort = 69; + ++localPort; ackBlock = -1; while (running && timeout) { - CheckForNewPacket(); + CheckForNewPacket(&IpHeader); tickUpdate = 0; @@ -652,13 +672,14 @@ * This global function initializes variables used in tftp transfers. * .KB_C_FN_DEFINITION_END */ -void -EMAC_Init(void) -{ +void EMAC_Init(void) { + p_rxBD = (receive_descriptor_t*)RX_BUFFER_START; localMACSet = 0; serverMACSet = 0; - localPort = SWAP16(0x8002); + localIPSet = 0; + serverIPSet = 0; + localPort = 0x8002; lastAddress = 0; lastSize = 0; MAC_init = 0; From owner-p4-projects@FreeBSD.ORG Fri Apr 21 18:23:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 48EC016A406; Fri, 21 Apr 2006 18:23:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1569516A401 for ; Fri, 21 Apr 2006 18:23:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB52443D48 for ; Fri, 21 Apr 2006 18:23:36 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LINaGY093672 for ; Fri, 21 Apr 2006 18:23:36 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LINajI093666 for perforce@freebsd.org; Fri, 21 Apr 2006 18:23:36 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 18:23:36 GMT Message-Id: <200604211823.k3LINajI093666@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95808 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 18:23:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=95808 Change 95808 by imp@imp_hammer on 2006/04/21 18:22:46 fix minor bugs processing automatic characters. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#10 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/env_vars.c#5 (text+ko) ==== @@ -60,6 +60,7 @@ if (ch == '\0' || (currentOffset >= MAX_INPUT_SIZE)) { currentOffset = 0; ++currentIndex; + ch = '\r'; } return (ch); } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#10 (text+ko) ==== @@ -360,23 +360,20 @@ * Each command is terminated with NULL (0) or '\r'. * .KB_C_FN_DEFINITION_END */ -static void ServicePrompt(char p_char) { - - if (p_char == '\r') { +static void +ServicePrompt(char p_char) +{ + if (p_char == '\r') p_char = 0; - } - if (p_char != 0x8) { if (buffCount < MAX_INPUT_SIZE-1) { - inputBuffer[buffCount] = p_char; ++buffCount; putchar(p_char); } } else if (buffCount) { - /* handle backspace BS */ --buffCount; inputBuffer[buffCount] = 0; From owner-p4-projects@FreeBSD.ORG Fri Apr 21 18:23:38 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E04116A46E; Fri, 21 Apr 2006 18:23:38 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BC4E16A468 for ; Fri, 21 Apr 2006 18:23:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F9E043D48 for ; Fri, 21 Apr 2006 18:23:37 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LINb1n093684 for ; Fri, 21 Apr 2006 18:23:37 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LINaiW093678 for perforce@freebsd.org; Fri, 21 Apr 2006 18:23:36 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 18:23:36 GMT Message-Id: <200604211823.k3LINaiW093678@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95809 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 18:23:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=95809 Change 95809 by imp@imp_hammer on 2006/04/21 18:23:00 formatting nits Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#6 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#6 (text+ko) ==== @@ -52,7 +52,8 @@ * This private function calculates the IP checksum for various headers. * .KB_C_FN_DEFINITION_END */ -static unsigned short IP_checksum(unsigned short *p, int len) +static unsigned short +IP_checksum(unsigned short *p, int len) { unsigned i, t; @@ -72,8 +73,9 @@ * This private function sends an ARP request to determine the server MAC. * .KB_C_FN_DEFINITION_END */ -static void GetServerAddress(void) { - +static void +GetServerAddress(void) +{ arp_header_t *p_ARP; p_ARP = (arp_header_t*)transmitBuffer; @@ -112,7 +114,8 @@ * This private function initializes and send a TFTP packet. * .KB_C_FN_DEFINITION_END */ -static void Send_TFTP_Packet(char *tftpData, unsigned tftpLength) +static void +Send_TFTP_Packet(char *tftpData, unsigned tftpLength) { transmit_header_t *macHdr = (transmit_header_t*)tftpSendPacket; ip_header_t *ipHdr; @@ -175,8 +178,9 @@ * This private function sends a RRQ packet to the server. * .KB_C_FN_DEFINITION_END */ -static void TFTP_RequestFile(char *filename) { - +static void +TFTP_RequestFile(char *filename) +{ tftp_header_t tftpHeader; char *cPtr, *ePtr, *mPtr; unsigned length; @@ -201,8 +205,9 @@ * This private function sends an ACK packet to the server. * .KB_C_FN_DEFINITION_END */ -static void TFTP_ACK_Data(char *data, unsigned short block_num, unsigned short len) { - +static void +TFTP_ACK_Data(char *data, unsigned short block_num, unsigned short len) +{ tftp_header_t tftpHeader; if (block_num == (ackBlock + 1)) { @@ -228,8 +233,9 @@ * any here. * .KB_C_FN_DEFINITION_END */ -static void CheckForNewPacket(ip_header_t *pHeader) { - +static void +CheckForNewPacket(ip_header_t *pHeader) +{ unsigned short *pFrameType, *pArpOp; unsigned i; char *pData; @@ -358,8 +364,9 @@ * This private function reads the PHY device. * .KB_C_FN_DEFINITION_END */ -static unsigned short AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) { - +static unsigned short +AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) +{ unsigned value = 0x60020000 | (addr << 18); pEmac->EMAC_CTL |= AT91C_EMAC_MPE; @@ -376,8 +383,9 @@ * This private function determines the link speed set by the PHY. * .KB_C_FN_DEFINITION_END */ -static void MII_GetLinkSpeed(AT91PS_EMAC pEmac) { - +static void +MII_GetLinkSpeed(AT91PS_EMAC pEmac) +{ unsigned short stat2; unsigned update = 0; @@ -409,8 +417,9 @@ * This private function initializes the EMAC on the chip. * .KB_C_FN_DEFINITION_END */ -static void AT91F_EmacEntry(void) { - +static void +AT91F_EmacEntry(void) +{ unsigned i; char *pRxPacket = (char*)RX_DATA_START; AT91PS_EMAC pEmac = AT91C_BASE_EMAC; @@ -455,8 +464,9 @@ * four bytes while high_address is the last 2 bytes of the 48-bit value. * .KB_C_FN_DEFINITION_END */ -void SetMACAddress(unsigned low_address, unsigned high_address) { - +void +SetMACAddress(unsigned low_address, unsigned high_address) +{ AT91PS_EMAC pEmac = AT91C_BASE_EMAC; AT91PS_PMC pPMC = AT91C_BASE_PMC; @@ -490,8 +500,9 @@ * This global function sets the IP of the TFTP download server. * .KB_C_FN_DEFINITION_END */ -void SetServerIPAddress(unsigned address) { - +void +SetServerIPAddress(unsigned address) +{ // force update in case the IP has changed serverMACSet = 0; @@ -510,8 +521,9 @@ * This global function sets the IP of this module. * .KB_C_FN_DEFINITION_END */ -void SetLocalIPAddress(unsigned address) { - +void +SetLocalIPAddress(unsigned address) +{ // force update in case the IP has changed serverMACSet = 0; @@ -532,7 +544,8 @@ * executed. * .KB_C_FN_DEFINITION_END */ -void TFTP_Download(unsigned address, char *filename) +void +TFTP_Download(unsigned address, char *filename) { ip_header_t IpHeader; unsigned thisSeconds, running, state; @@ -550,53 +563,25 @@ return ; if (!MAC_init) { - AT91C_BASE_PMC->PMC_PCER = - ((unsigned) 1 << AT91C_ID_EMAC); - + AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_EMAC; AT91C_BASE_PIOA->PIO_ASR = - ((unsigned) AT91C_PA14_ERXER ) | - ((unsigned) AT91C_PA12_ERX0 ) | - ((unsigned) AT91C_PA13_ERX1 ) | - ((unsigned) AT91C_PA8_ETXEN ) | - ((unsigned) AT91C_PA16_EMDIO ) | - ((unsigned) AT91C_PA9_ETX0 ) | - ((unsigned) AT91C_PA10_ETX1 ) | - ((unsigned) AT91C_PA11_ECRS_ECRSDV) | - ((unsigned) AT91C_PA15_EMDC ) | - ((unsigned) AT91C_PA7_ETXCK_EREFCK); - AT91C_BASE_PIOA->PIO_BSR = 0; + AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | + AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | + AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | + AT91C_PA7_ETXCK_EREFCK; AT91C_BASE_PIOA->PIO_PDR = - ((unsigned) AT91C_PA14_ERXER ) | - ((unsigned) AT91C_PA12_ERX0 ) | - ((unsigned) AT91C_PA13_ERX1 ) | - ((unsigned) AT91C_PA8_ETXEN ) | - ((unsigned) AT91C_PA16_EMDIO ) | - ((unsigned) AT91C_PA9_ETX0 ) | - ((unsigned) AT91C_PA10_ETX1 ) | - ((unsigned) AT91C_PA11_ECRS_ECRSDV) | - ((unsigned) AT91C_PA15_EMDC ) | - ((unsigned) AT91C_PA7_ETXCK_EREFCK); - - AT91C_BASE_PIOB->PIO_ASR = 0; + AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | + AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | + AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | + AT91C_PA7_ETXCK_EREFCK; AT91C_BASE_PIOB->PIO_BSR = - ((unsigned) AT91C_PB12_ETX2) | - ((unsigned) AT91C_PB13_ETX3) | - ((unsigned) AT91C_PB14_ETXER) | - ((unsigned) AT91C_PB15_ERX2) | - ((unsigned) AT91C_PB16_ERX3) | - ((unsigned) AT91C_PB17_ERXDV) | - ((unsigned) AT91C_PB18_ECOL) | - ((unsigned) AT91C_PB19_ERXCK); + AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | + AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | + AT91C_PB18_ECOL | AT91C_PB19_ERXCK; AT91C_BASE_PIOB->PIO_PDR = - ((unsigned) AT91C_PB12_ETX2) | - ((unsigned) AT91C_PB13_ETX3) | - ((unsigned) AT91C_PB14_ETXER) | - ((unsigned) AT91C_PB15_ERX2) | - ((unsigned) AT91C_PB16_ERX3) | - ((unsigned) AT91C_PB17_ERXDV) | - ((unsigned) AT91C_PB18_ECOL) | - ((unsigned) AT91C_PB19_ERXCK); - + AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | + AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | + AT91C_PB18_ECOL | AT91C_PB19_ERXCK; MAC_init = 1; } @@ -663,6 +648,8 @@ break; } } + if (timeout == 0) + printf("TFTP TIMEOUT!\r\n"); } @@ -672,8 +659,9 @@ * This global function initializes variables used in tftp transfers. * .KB_C_FN_DEFINITION_END */ -void EMAC_Init(void) { - +void +EMAC_Init(void) +{ p_rxBD = (receive_descriptor_t*)RX_BUFFER_START; localMACSet = 0; serverMACSet = 0; From owner-p4-projects@FreeBSD.ORG Fri Apr 21 18:30:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DC94E16A435; Fri, 21 Apr 2006 18:30:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98F7316A43C for ; Fri, 21 Apr 2006 18:30:46 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55B8343D53 for ; Fri, 21 Apr 2006 18:30:46 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LIUkIP094798 for ; Fri, 21 Apr 2006 18:30:46 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LIUjbt094790 for perforce@freebsd.org; Fri, 21 Apr 2006 18:30:45 GMT (envelope-from millert@freebsd.org) Date: Fri, 21 Apr 2006 18:30:45 GMT Message-Id: <200604211830.k3LIUjbt094790@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95810 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 18:30:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=95810 Change 95810 by millert@millert_g5tower on 2006/04/21 18:30:32 Remove a horrible policy hack and have mach_init use mac_execve() instead. Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/darwin/system_cmds/mach_init.tproj/bootstrap.c#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policy/Makefile#9 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policy/macros/global_macros.te#6 edit .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policy/rules#9 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/darwin/system_cmds/mach_init.tproj/bootstrap.c#9 (text+ko) ==== @@ -49,6 +49,7 @@ #import #import #import +#import #import #import #import @@ -825,8 +826,9 @@ static void exec_server(server_t *serverp) { - char **argv; + char **argv, *cp, textlabel[512]; sigset_t mask; + mac_t label; /* * Setup environment for server, someday this should be Mach stuff @@ -881,12 +883,19 @@ sigemptyset(&mask); (void) sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL); + if (mach_get_task_label_text(mach_task_self(), "sebsd", textlabel) == 0 + && (cp = rindex(textlabel, ':')) != NULL) { + *(cp + 1) = '\0'; + strlcat(textlabel, "mach_servers_d"); + if (mac_from_text(&label, textlabel) == 0) + mac_set_proc(label); + } execv(argv[0], argv); unix_fatal("Disabled server %x bootstrap %x: \"%s\": exec()", serverp->port, serverp->bootstrap->bootstrap_port, serverp->cmd); -} +} static char ** argvize(const char *string) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policy/Makefile#9 (text+ko) ==== @@ -37,7 +37,7 @@ install: $(INSTALL) -o ${BINOWN} -g ${BINGRP} -m 644 ${POLICY} ${DESTDIR} $(INSTALL) -o ${BINOWN} -g ${BINGRP} -m 644 sebsd_migscs ${DESTDIR} - $(INSTALL) -o ${BINOWN} -g ${BINGRP} -m 644 failsafe_context ${DESTDIR}/private/etc/sedarwin + $(INSTALL) -o ${BINOWN} -g ${BINGRP} -m 644 failsafe_context ${DESTDIR}/private/etc/sedarwin/contexts $(INSTALL) -o ${BINOWN} -g ${BINGRP} -m 700 ${SCRIPTS} ${DESTDIR}/private/etc/sedarwin (cd $(CURDIR)/.. && tar -X policy/excludes -cf - policy) | (cd $(DESTDIR)/private/etc/sedarwin/ && tar -xf -) (cd $(FLASK)/.. && tar -cf - flask) | (cd $(DESTDIR)/private/etc/sedarwin/policy && tar -xf -) ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policy/macros/global_macros.te#6 (text+ko) ==== @@ -310,63 +310,6 @@ ################################# # -# domain_exec_trans(parent_domain, child_domain) -# -# Permissions for transitioning to a new domain. -# - -define(`domain_exec_trans',` - -# -# Allow the process to transition to the new domain. -# -allow $1 $2:process transition; - -# -# Do not audit when glibc secure mode is enabled upon the transition. -# -dontaudit $1 $2:process noatsecure; - -# -# Allow the process to execute the program. -# -allow $1 *:file { read x_file_perms }; - -# -# Allow the process to reap the new domain. -# -allow $2 $1:process sigchld; - -# -# Allow the new domain to inherit and use file -# descriptions from the creating process and vice versa. -# -allow $2 $1:fd use; -allow $1 $2:fd use; - -# -# Allow the new domain to write back to the old domain via a pipe. -# -allow $2 $1:fifo_file rw_file_perms; - -# -# Allow the new domain to read and execute the program. -# -allow $2 *:file rx_file_perms; - -# -# Allow the new domain to be entered via the program. -# -allow $2 *:file entrypoint; - -# -# Make the transition -# -type_transition $1 *:process $2; -') - -################################# -# # domain_auto_trans(parent_domain, program_type, child_domain) # # Define a default domain transition and allow it. ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/policy/rules#9 (text+ko) ==== @@ -131,15 +131,14 @@ #allow init_d { bin_t shell_exec_t file_t }:dir_file_class_set rw_file_perms; #allow init_d bin_t:file execute_no_trans; -# Things executed by mach_init transition to mach_servers_d -# XXX - awful hack -domain_exec_trans(mach_init_d,mach_servers_d); - # Transition from init_d -> mach_init_d when mach_init starts # and then back to init_d when BSD init is exec'd domain_auto_trans(init_d,mach_init_exec_t,mach_init_d); domain_auto_trans(mach_init_d,init_exec_t,init_d); +# mach_init_d does its own transition to mach_servers_d +allow mach_init_d mach_servers_d:process transition; + # User transitions for login and sshd domain_auto_trans(init_d,login_exec_t,login_d); domain_auto_trans(user_d,login_exec_t,login_d); @@ -194,11 +193,17 @@ allow user_d security_t:security *; # Transitions for mach servers started by mach_init -domain_auto_trans(mach_init_d,windowserver_exec_t,windowserver_d); -domain_auto_trans(mach_init_d,lookupd_exec_t,lookupd_d); -domain_auto_trans(mach_init_d,notifyd_exec_t,notifyd_d); -domain_auto_trans(mach_init_d,diskarbitrationd_exec_t,diskarbitrationd_d); -domain_auto_trans(mach_init_d,configd_exec_t,configd_d); +allow mach_servers_d file_t:file entrypoint; +domain_auto_trans(mach_servers_d,windowserver_exec_t,windowserver_d); +allow mach_servers_d windowserver_exec_t:file entrypoint; +domain_auto_trans(mach_servers_d,lookupd_exec_t,lookupd_d); +allow mach_servers_d lookupd_exec_t:file entrypoint; +domain_auto_trans(mach_servers_d,notifyd_exec_t,notifyd_d); +allow mach_servers_d notifyd_exec_t:file entrypoint; +domain_auto_trans(mach_servers_d,diskarbitrationd_exec_t,diskarbitrationd_d); +allow mach_servers_d diskarbitrationd_exec_t:file entrypoint; +domain_auto_trans(mach_servers_d,configd_exec_t,configd_d); +allow mach_servers_d configd_exec_t:file entrypoint; # Transitions for things started by BSD init domain_auto_trans(init_d,systemstarter_exec_t,systemstarter_d); From owner-p4-projects@FreeBSD.ORG Fri Apr 21 18:33:51 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 53F2B16A405; Fri, 21 Apr 2006 18:33:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19B5316A401 for ; Fri, 21 Apr 2006 18:33:51 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBB8D43D49 for ; Fri, 21 Apr 2006 18:33:50 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LIXoq5097579 for ; Fri, 21 Apr 2006 18:33:50 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LIXoD7097576 for perforce@freebsd.org; Fri, 21 Apr 2006 18:33:50 GMT (envelope-from millert@freebsd.org) Date: Fri, 21 Apr 2006 18:33:50 GMT Message-Id: <200604211833.k3LIXoD7097576@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95812 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 18:33:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=95812 Change 95812 by millert@millert_g5tower on 2006/04/21 18:33:00 Fix libselinux include path Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/Makefile#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsemanage/src/Makefile#2 (text+ko) ==== @@ -1,6 +1,6 @@ include ../../../Makeconfig -CFLAGS+= -I$(EXPORT_HDRS)/bsd -idirafter $(EXPORT_HDRS)/osfmk -I../.. -I../include -I../include/selinux -I../../libsepol/include +CFLAGS+= -I$(EXPORT_HDRS)/bsd -idirafter $(EXPORT_HDRS)/osfmk -I../.. -I../include -I../../libselinux/include -I../../libsepol/include # Installation directories. PREFIX ?= $(DESTDIR)/usr From owner-p4-projects@FreeBSD.ORG Fri Apr 21 18:45:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DC72916A404; Fri, 21 Apr 2006 18:45:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADCC716A400 for ; Fri, 21 Apr 2006 18:45:06 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 517E043D48 for ; Fri, 21 Apr 2006 18:45:06 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LIj6Cm005298 for ; Fri, 21 Apr 2006 18:45:06 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LIj6ns005295 for perforce@freebsd.org; Fri, 21 Apr 2006 18:45:06 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 18:45:06 GMT Message-Id: <200604211845.k3LIj6ns005295@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95815 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 18:45:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=95815 Change 95815 by imp@imp_hammer on 2006/04/21 18:44:38 Save 64 bytes by storing the serverPort in network byte order, rather than in host order and constantly swapping them... Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#7 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#7 (text+ko) ==== @@ -148,7 +148,7 @@ udpHdr = (udp_header_t*)(ipHdr + 1); udpHdr->src_port = SWAP16(localPort); - udpHdr->dst_port = SWAP16(serverPort); + udpHdr->dst_port = serverPort; udpHdr->udp_len = SWAP16(8 + tftpLength); udpHdr->udp_cksum = 0; @@ -332,12 +332,12 @@ if (ackBlock == -1) { if (SWAP16(tftpHdr->block_num) != 1) - break; - serverPort = SWAP16(udpHdr->src_port); - ackBlock = 0; - } + break; + serverPort = udpHdr->src_port; + ackBlock = 0; + } - if (serverPort != SWAP16(udpHdr->src_port)) + if (serverPort != udpHdr->src_port) break; TFTP_ACK_Data(tftpHdr->data, @@ -595,7 +595,7 @@ state = TFTP_WAITING_SERVER_MAC; timeout = 10; thisSeconds = GetSeconds(); - serverPort = 69; + serverPort = SWAP16(69); ++localPort; ackBlock = -1; From owner-p4-projects@FreeBSD.ORG Fri Apr 21 19:20:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 02DD616A403; Fri, 21 Apr 2006 19:20:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDAD316A401 for ; Fri, 21 Apr 2006 19:20:30 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8969143D4C for ; Fri, 21 Apr 2006 19:20:30 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LJKTxw025542 for ; Fri, 21 Apr 2006 19:20:30 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LJKTXH025530 for perforce@freebsd.org; Fri, 21 Apr 2006 19:20:29 GMT (envelope-from millert@freebsd.org) Date: Fri, 21 Apr 2006 19:20:29 GMT Message-Id: <200604211920.k3LJKTXH025530@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 95818 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 19:20:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=95818 Change 95818 by millert@millert_g5tower on 2006/04/21 19:19:35 Improve readability Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsecompat/getline.c#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/libsecompat/getline.c#2 (text+ko) ==== @@ -37,24 +37,25 @@ * Note that outsize is not changed unless memory is allocated. */ ssize_t -getline(char **outbuf, size_t *outsize, FILE *fp) +getline(char **bufp, size_t *bufsizep, FILE *fp) { - char *buf; - size_t len; + char *line, *buf = *bufp; + size_t linelen, bufsize = *bufsizep; - buf = fgetln(fp, &len); - if (buf == NULL) + line = fgetln(fp, &linelen); + if (line == NULL) return (-1); /* Assumes realloc() accepts NULL for ptr (C99) */ - if (*outbuf == NULL || *outsize < len + 1) { - void *tmp = realloc(*outbuf, len + 1); - if (tmp == NULL) + if (buf == NULL || bufsize < linelen + 1) { + bufsize = linelen + 1; + buf = realloc(buf, bufsize); + if (buf == NULL) return (-1); - *outbuf = tmp; - *outsize = len + 1; + *bufp = buf; + *bufsizep = bufsize; } - memcpy(*outbuf, buf, len); - (*outbuf)[len] = '\0'; - return (len); + memcpy(buf, line, linelen); + buf[linelen] = '\0'; + return (linelen); } From owner-p4-projects@FreeBSD.ORG Fri Apr 21 21:13:54 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DF6E416A401; Fri, 21 Apr 2006 21:13:53 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B10216A403 for ; Fri, 21 Apr 2006 21:13:53 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D323543D45 for ; Fri, 21 Apr 2006 21:13:52 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LLDqP2094303 for ; Fri, 21 Apr 2006 21:13:52 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LLDq6n094290 for perforce@freebsd.org; Fri, 21 Apr 2006 21:13:52 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 21:13:52 GMT Message-Id: <200604212113.k3LLDq6n094290@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95827 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 21:13:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=95827 Change 95827 by imp@imp_hammer on 2006/04/21 21:13:17 Apply SWAP16 to constants rather than non-constants. This saves another 70ish bytes Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#8 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#8 (text+ko) ==== @@ -147,7 +147,7 @@ udpHdr = (udp_header_t*)(ipHdr + 1); - udpHdr->src_port = SWAP16(localPort); + udpHdr->src_port = localPort; udpHdr->dst_port = serverPort; udpHdr->udp_len = SWAP16(8 + tftpLength); udpHdr->udp_cksum = 0; @@ -324,14 +324,14 @@ udpHdr = (udp_header_t*)((char*)pIpHeader+20); tftpHdr = (tftp_header_t*)((char*)udpHdr + 8); - if (SWAP16(udpHdr->dst_port) != localPort) + if (udpHdr->dst_port != localPort) break; - if (SWAP16(tftpHdr->opcode) != TFTP_DATA_OPCODE) + if (tftpHdr->opcode != SWAP16(TFTP_DATA_OPCODE)) break; if (ackBlock == -1) { - if (SWAP16(tftpHdr->block_num) != 1) + if (tftpHdr->block_num != SWAP16(1)) break; serverPort = udpHdr->src_port; ackBlock = 0; @@ -667,7 +667,7 @@ serverMACSet = 0; localIPSet = 0; serverIPSet = 0; - localPort = 0x8002; + localPort = SWAP16(0x8002); lastAddress = 0; lastSize = 0; MAC_init = 0; From owner-p4-projects@FreeBSD.ORG Fri Apr 21 21:28:12 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D62DE16A404; Fri, 21 Apr 2006 21:28:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A73EB16A403 for ; Fri, 21 Apr 2006 21:28:11 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7394F43D48 for ; Fri, 21 Apr 2006 21:28:11 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LLSBJW001922 for ; Fri, 21 Apr 2006 21:28:11 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LLSBmS001919 for perforce@freebsd.org; Fri, 21 Apr 2006 21:28:11 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 21:28:11 GMT Message-Id: <200604212128.k3LLSBmS001919@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95829 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 21:28:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=95829 Change 95829 by imp@imp_hammer on 2006/04/21 21:27:19 SWAP16(constant) instead of (var) in a few more places. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#9 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#9 (text+ko) ==== @@ -236,7 +236,7 @@ static void CheckForNewPacket(ip_header_t *pHeader) { - unsigned short *pFrameType, *pArpOp; + unsigned short *pFrameType; unsigned i; char *pData; ip_header_t *pIpHeader; @@ -264,11 +264,9 @@ case PROTOCOL_ARP: - pArpOp = (unsigned short *) (pData + 20); p_ARP = (arp_header_t*)pData; - if (SWAP16(*pArpOp) == ARP_REPLY) { - + if (p_ARP->operation == SWAP16(ARP_REPLY)) { // check if new server info is available if ((!serverMACSet) && (!(p_memcmp((char*)p_ARP->sender_ip, @@ -279,12 +277,9 @@ p_memcpy((char*)serverMACAddr, (char*)p_ARP->sender_mac, 6); } - } - - if (SWAP16(*pArpOp) == ARP_REQUEST) { - + } else if (p_ARP->operation == SWAP16(ARP_REQUEST)) { // ARP REPLY operation - *pArpOp = SWAP16(ARP_REPLY); + p_ARP->operation = SWAP16(ARP_REPLY); // Fill the dest address and src address for (i = 0; i <6; i++) { From owner-p4-projects@FreeBSD.ORG Fri Apr 21 21:35:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0709F16A402; Fri, 21 Apr 2006 21:35:21 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C037416A400 for ; Fri, 21 Apr 2006 21:35:20 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B80543D45 for ; Fri, 21 Apr 2006 21:35:20 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LLZK8Q006395 for ; Fri, 21 Apr 2006 21:35:20 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LLZKc2006389 for perforce@freebsd.org; Fri, 21 Apr 2006 21:35:20 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 21:35:20 GMT Message-Id: <200604212135.k3LLZKc2006389@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95830 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 21:35:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=95830 Change 95830 by imp@imp_hammer on 2006/04/21 21:34:20 A few more SWAP16(const) in preference to SWAP16(var) Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#10 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#10 (text+ko) ==== @@ -260,12 +260,10 @@ pFrameType = (unsigned short *) ((p_rxBD[i].address & 0xFFFFFFFC) + 12); pData = (char *)(p_rxBD[i].address & 0xFFFFFFFC); - switch (SWAP16(*pFrameType)) { + switch (*pFrameType) { - case PROTOCOL_ARP: - + case SWAP16(PROTOCOL_ARP): p_ARP = (arp_header_t*)pData; - if (p_ARP->operation == SWAP16(ARP_REPLY)) { // check if new server info is available if ((!serverMACSet) && @@ -303,16 +301,12 @@ *AT91C_EMAC_TAR = (unsigned)pData; *AT91C_EMAC_TCR = 0x40; } - break; - - case PROTOCOL_IP: + break; + case SWAP16(PROTOCOL_IP): pIpHeader = (ip_header_t*)(pData + 14); p_memcpy((char*)pHeader, (char*)pIpHeader,sizeof(ip_header_t)); - switch(pIpHeader->ip_p) { - - case PROTOCOL_UDP: - { + if (pIpHeader->ip_p == PROTOCOL_UDP) { udp_header_t *udpHdr; tftp_header_t *tftpHdr; @@ -337,17 +331,8 @@ TFTP_ACK_Data(tftpHdr->data, SWAP16(tftpHdr->block_num), - SWAP16(udpHdr->udp_len) - 12); + SWAP16(udpHdr->udp_len) - 12); } - break; - - default: - break; - } - break; - - default: - break; } p_rxBD[process].address &= ~0x01; } From owner-p4-projects@FreeBSD.ORG Fri Apr 21 21:50:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6083A16A40B; Fri, 21 Apr 2006 21:50:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2194616A403 for ; Fri, 21 Apr 2006 21:50:40 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA46C43D45 for ; Fri, 21 Apr 2006 21:50:39 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LLodSb012808 for ; Fri, 21 Apr 2006 21:50:39 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LLod7A012796 for perforce@freebsd.org; Fri, 21 Apr 2006 21:50:39 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 21:50:39 GMT Message-Id: <200604212150.k3LLod7A012796@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95831 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 21:50:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=95831 Change 95831 by imp@imp_hammer on 2006/04/21 21:50:05 Make things more constant to move them into text. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#11 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/loader_prompt.c#11 (text+ko) ==== @@ -45,9 +45,9 @@ // argv pointer are either NULL or point to locations in inputBuffer static char *argv[MAX_COMMAND_PARAMS]; -static char backspaceString[] = {0x8, ' ', 0x8, 0}; +static const char *backspaceString = "\010 \010"; -static command_entry_t CommandTable[] = { +static const command_entry_t CommandTable[] = { {COMMAND_COPY, "c"}, {COMMAND_DUMP, "d"}, {COMMAND_EXEC, "e"}, From owner-p4-projects@FreeBSD.ORG Fri Apr 21 21:56:48 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 34AC016A404; Fri, 21 Apr 2006 21:56:48 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1B6516A402 for ; Fri, 21 Apr 2006 21:56:47 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9A6B43D46 for ; Fri, 21 Apr 2006 21:56:47 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LLulsP018166 for ; Fri, 21 Apr 2006 21:56:47 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LLul3S018159 for perforce@freebsd.org; Fri, 21 Apr 2006 21:56:47 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 21:56:47 GMT Message-Id: <200604212156.k3LLul3S018159@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95832 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 21:56:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=95832 Change 95832 by imp@imp_hammer on 2006/04/21 21:56:09 First cut at spi reading/writing code. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#9 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#1 add .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.h#1 add Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#9 (text+ko) ==== @@ -5,7 +5,7 @@ LIB= at91 INTERNALLIB= SRCS=at91rm9200_lowlevel.c eeprom.c emac.c env_vars.c getc.c loader_prompt.c \ - p_string.c putchar.c printf.c xmodem.c + p_string.c putchar.c printf.c spi_flash.c xmodem.c NO_MAN= .if ${MK_TAG_LIST} != "no" From owner-p4-projects@FreeBSD.ORG Fri Apr 21 21:59:52 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 74F3B16A406; Fri, 21 Apr 2006 21:59:52 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BA4816A401 for ; Fri, 21 Apr 2006 21:59:52 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E555743D45 for ; Fri, 21 Apr 2006 21:59:51 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LLxpAt020567 for ; Fri, 21 Apr 2006 21:59:51 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LLxpm1020564 for perforce@freebsd.org; Fri, 21 Apr 2006 21:59:51 GMT (envelope-from jb@freebsd.org) Date: Fri, 21 Apr 2006 21:59:51 GMT Message-Id: <200604212159.k3LLxpm1020564@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95833 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 21:59:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=95833 Change 95833 by jb@jb_freebsd2 on 2006/04/21 21:59:23 Move all my porting hacks into separate files to stop them from polluting the rest of the code. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Apr 21 22:03:57 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C7F5616A404; Fri, 21 Apr 2006 22:03:57 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5C5116A400 for ; Fri, 21 Apr 2006 22:03:57 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68CE043D45 for ; Fri, 21 Apr 2006 22:03:57 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LM3vmB024550 for ; Fri, 21 Apr 2006 22:03:57 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LM3vZM024547 for perforce@freebsd.org; Fri, 21 Apr 2006 22:03:57 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 22:03:57 GMT Message-Id: <200604212203.k3LM3vZM024547@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95834 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 22:03:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=95834 Change 95834 by imp@imp_hammer on 2006/04/21 22:03:52 Adjust for differently sized part. I think that this hard coding is unwise, but it works for me for the moment. nits also Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.h#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#2 (text+ko) ==== @@ -39,8 +39,9 @@ * value in response. * .KB_C_FN_DEFINITION_END */ -static void SendCommand(spiCommand_t *pCommand) { - +static void +SendCommand(spiCommand_t *pCommand) +{ unsigned value; AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTDIS + AT91C_PDC_RXTDIS; @@ -72,7 +73,9 @@ * Private function to return device status. * .KB_C_FN_DEFINITION_END */ -static char GetFlashStatus(void) { +static char +GetFlashStatus(void) +{ p_memset(tx_commandBuffer, 0, 8); tx_commandBuffer[0] = STATUS_REGISTER_READ; @@ -95,7 +98,9 @@ * Private function to poll until the device is ready for next operation. * .KB_C_FN_DEFINITION_END */ -static void WaitForDeviceReady(void) { +static void +WaitForDeviceReady(void) +{ while (!(GetFlashStatus() & 0x80)) ; } @@ -110,14 +115,16 @@ * data in FLASH_PAGE_SIZE intervals. This also corrupts the data in RAM. * .KB_C_FN_DEFINITION_END */ -static void ProgramBuffer(unsigned pageAddress, unsigned byteAddress, - unsigned src_addr, unsigned size) { +static void +ProgramBuffer(unsigned pageAddress, unsigned byteAddress, + unsigned src_addr, unsigned size) +{ p_memset(tx_commandBuffer, 0, 8); tx_commandBuffer[0] = PROGRAM_THROUGH_BUFFER; - tx_commandBuffer[1] = ((pageAddress >> 6) & 0x3F); - tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | - ((byteAddress >> 8) & 0x3); + tx_commandBuffer[1] = ((pageAddress >> 5) & 0xFF); + tx_commandBuffer[2] = ((pageAddress << 3) & 0xF8) | + ((byteAddress >> 8) & 0x7); tx_commandBuffer[3] = (byteAddress & 0xFF); p_memset(rx_commandBuffer, 0, 8); @@ -138,7 +145,7 @@ } -/* ************************** GLOBAL FUNCTIONS ********************************/ +/*************************** GLOBAL FUNCTIONS ********************************/ /* @@ -148,8 +155,9 @@ * array command. * .KB_C_FN_DEFINITION_END */ -void SPI_ReadFlash(unsigned flash_addr, unsigned dest_addr, unsigned size) { - +void +SPI_ReadFlash(unsigned flash_addr, unsigned dest_addr, unsigned size) +{ unsigned pageAddress, byteAddress; // determine page address @@ -159,10 +167,9 @@ byteAddress = flash_addr % FLASH_PAGE_SIZE; p_memset(tx_commandBuffer, 0, 8); - tx_commandBuffer[0] = CONTINUOUS_ARRAY_READ; - tx_commandBuffer[1] = (pageAddress >> 6) & 0x3F; - tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | - ((byteAddress >> 8) & 0x3); + tx_commandBuffer[1] = ((pageAddress >> 5) & 0xFF); + tx_commandBuffer[2] = ((pageAddress << 3) & 0xF8) | + ((byteAddress >> 8) & 0x7); tx_commandBuffer[3] = (byteAddress & 0xFF); p_memset(rx_commandBuffer, 0, 8); @@ -189,8 +196,9 @@ * page aligned write operations. * .KB_C_FN_DEFINITION_END */ -void SPI_WriteFlash(unsigned flash_addr, unsigned src_addr, unsigned size) { - +void +SPI_WriteFlash(unsigned flash_addr, unsigned src_addr, unsigned size) +{ unsigned pageAddress, byteAddress, this_size; // determine page address @@ -221,8 +229,9 @@ * Global function to initialize the SPI flash device/accessor functions. * .KB_C_FN_DEFINITION_END */ -void SPI_InitFlash(void) { - +void +SPI_InitFlash(void) +{ AT91PS_PIO pPio; AT91PS_SPI pSPI = AT91C_BASE_SPI; unsigned value; @@ -230,18 +239,13 @@ // enable CS0, CLK, MOSI, MISO pPio = (AT91PS_PIO)AT91C_BASE_PIOA; - pPio->PIO_ASR = (((unsigned)AT91C_PA3_NPCS0) | - ((unsigned)AT91C_PA1_MOSI) | - ((unsigned)AT91C_PA0_MISO) | - ((unsigned)AT91C_PA2_SPCK)); - pPio->PIO_BSR = 0; - pPio->PIO_PDR = (((unsigned)AT91C_PA3_NPCS0) | - ((unsigned)AT91C_PA1_MOSI) | - ((unsigned)AT91C_PA0_MISO) | - ((unsigned)AT91C_PA2_SPCK)); + pPio->PIO_ASR = AT91C_PA3_NPCS0 | AT91C_PA1_MOSI | AT91C_PA0_MISO | + AT91C_PA2_SPCK; + pPio->PIO_PDR = AT91C_PA3_NPCS0 | AT91C_PA1_MOSI | AT91C_PA0_MISO | + AT91C_PA2_SPCK; // enable clocks to SPI - AT91C_BASE_PMC->PMC_PCER = ((unsigned) 1 << AT91C_ID_SPI); + AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_SPI; // reset the SPI pSPI->SPI_CR = AT91C_SPI_SWRST; ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.h#2 (text+ko) ==== @@ -36,7 +36,7 @@ void SPI_WriteFlash(unsigned flash_addr, unsigned dest_addr, unsigned size); void SPI_InitFlash(void); -#define FLASH_PAGE_SIZE 528 +#define FLASH_PAGE_SIZE 1056 // Flash commands From owner-p4-projects@FreeBSD.ORG Fri Apr 21 22:05:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F0A8A16A406; Fri, 21 Apr 2006 22:04:59 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D80316A401 for ; Fri, 21 Apr 2006 22:04:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EFAE43D45 for ; Fri, 21 Apr 2006 22:04:59 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LM4xtp024604 for ; Fri, 21 Apr 2006 22:04:59 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LM4wKn024601 for perforce@freebsd.org; Fri, 21 Apr 2006 22:04:58 GMT (envelope-from jb@freebsd.org) Date: Fri, 21 Apr 2006 22:04:58 GMT Message-Id: <200604212204.k3LM4wKn024601@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95835 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 22:05:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=95835 Change 95835 by jb@jb_freebsd2 on 2006/04/21 22:04:33 Move all my hacks out of here so that this file resembles what it will look like long-term. Sun tests their code with gcc, but they musn't use strict warning levels like we do. I had to add a lot of function prototypes to satisfy gcc. There are also a few functions where I had to remove the 'const' on some arguments passed because the values got passed from one function to another and eventually ended up with a cast that tried to ignore the const-ness of the value. In out compile, gcc warns about this. What is the point of declaring something const if you are going to cast it to remove the const-ness later?! Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#7 (text+ko) ==== @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -58,22 +59,15 @@ #include #include #include +#include #include #include #include #include +#include #include - -/* For compatibility with Solaris code. */ -typedef struct mtx kmutex_t; -#define mutex_enter(_a) mtx_lock(_a) -#define mutex_exit(_a) mtx_unlock(_a) -#define KM_SLEEP M_WAITOK -#define KM_NOSLEEP M_NOWAIT -#define kmem_zalloc(_a,_b) malloc(_a, M_DTRACE, _b | M_ZERO) -#define kmem_alloc(_a,_b) malloc(_a, M_DTRACE, _b) -#define kmem_free(_a,_b) free(_a, M_DTRACE) +#include #define DTRACE_MINOR 0 @@ -159,26 +153,26 @@ * well-known, zero-filled memory. While this variable is not documented, * it is used by some translators as an implementation detail. */ -#ifdef DOODAD const char dtrace_zero[256] = { 0 }; /* zero-filled memory */ -#endif /* * DTrace Internal Variables */ #ifdef DOODAD static dev_info_t *dtrace_devi; /* device info */ +#endif static vmem_t *dtrace_arena; /* probe ID arena */ static vmem_t *dtrace_minor; /* minor number arena */ static taskq_t *dtrace_taskq; /* task queue */ -#endif static dtrace_probe_t **dtrace_probes; /* array of all probes */ static int dtrace_nprobes; /* number of probes */ static dtrace_provider_t *dtrace_provider; /* provider list */ static dtrace_meta_t *dtrace_meta_pid; /* user-land meta provider */ static int dtrace_opens; /* number of opens */ static int dtrace_helpers; /* number of helpers */ +#ifdef DOODAD static void *dtrace_softstate; /* softstate pointer */ +#endif static dtrace_hash_t *dtrace_bymod; /* probes hashed by module */ static dtrace_hash_t *dtrace_byfunc; /* probes hashed by function */ static dtrace_hash_t *dtrace_byname; /* probes hashed by name */ @@ -186,13 +180,9 @@ static int dtrace_toxranges; /* number of toxic ranges */ static int dtrace_toxranges_max; /* size of toxic range array */ static dtrace_anon_t dtrace_anon; /* anonymous enabling */ -#ifdef DOODAD static kmem_cache_t *dtrace_state_cache; /* cache for dynamic state */ -#endif static uint64_t dtrace_vtime_references; /* number of vtimestamp refs */ -#ifdef DOODAD static kthread_t *dtrace_panicked; /* panicking thread */ -#endif static dtrace_ecb_t *dtrace_ecb_create_cache; /* cached created ECB */ static dtrace_genid_t dtrace_probegen; /* current probe generation */ static dtrace_helpers_t *dtrace_deferred_pid; /* deferred helper list */ @@ -354,7 +344,6 @@ #define DTRACE_STORE(type, tomax, offset, what) \ *((type *)((uintptr_t)(tomax) + (uintptr_t)offset)) = (type)(what); -#ifdef DOODAD #ifndef __i386 #define DTRACE_ALIGNCHECK(addr, size, flags) \ if (addr & (size - 1)) { \ @@ -408,7 +397,6 @@ #else #define dtrace_loadptr dtrace_load32 #endif -#endif #define DTRACE_DYNHASH_FREE 0 #define DTRACE_DYNHASH_SINK 1 @@ -434,59 +422,87 @@ ((act)->dta_kind == DTRACEACT_DIFEXPR && \ (act)->dta_difo->dtdo_rtype.dtdt_kind == DIF_TYPE_STRING) -#ifdef DOODAD -static dtrace_helpers_t *dtrace_helpers_create(proc_t *); -#endif - -dtrace_state_t * dtrace_state_create(dev_t *, cred_t *); +dtrace_dynvar_t *dtrace_dynvar(dtrace_dstate_t *, uint_t, dtrace_key_t *, size_t, dtrace_dynvar_op_t); +dtrace_state_t *dtrace_state_create(dev_t *, cred_t *); int dtrace_dstate_init(dtrace_dstate_t *, size_t); static char *dtrace_strdup(const char *); -static dof_hdr_t * dtrace_dof_copyin(uintptr_t, int *); +static dof_hdr_t *dtrace_dof_copyin(uintptr_t, int *); +static dof_hdr_t *dtrace_dof_create(dtrace_state_t *); static dof_hdr_t *dtrace_dof_property(const char *); static dof_sec_t *dtrace_dof_sect(dof_hdr_t *, uint32_t, dof_secidx_t); static dtrace_action_t *dtrace_ecb_aggregation_create(dtrace_ecb_t *, dtrace_actdesc_t *); +static dtrace_aggregation_t *dtrace_aggid2agg(dtrace_state_t *, dtrace_aggid_t); static dtrace_buffer_t *dtrace_speculation_buffer(dtrace_state_t *, processorid_t, dtrace_specid_t); static dtrace_ecb_t *dtrace_ecb_add(dtrace_state_t *, dtrace_probe_t *); static dtrace_ecb_t *dtrace_ecb_create(dtrace_state_t *, dtrace_probe_t *, dtrace_enabling_t *); +static dtrace_ecb_t *dtrace_epid2ecb(dtrace_state_t *, dtrace_epid_t); static dtrace_ecbdesc_t *dtrace_dof_ecbdesc(dof_hdr_t *, dof_sec_t *, dtrace_vstate_t *, cred_t *); static dtrace_enabling_t *dtrace_enabling_create(dtrace_vstate_t *); static dtrace_hash_t *dtrace_hash_create(uintptr_t, uintptr_t, uintptr_t); +static dtrace_helpers_t *dtrace_helpers_create(proc_t *); static dtrace_predicate_t *dtrace_predicate_create(dtrace_difo_t *); static dtrace_probe_t *dtrace_hash_lookup(dtrace_hash_t *, dtrace_probe_t *); static dtrace_probe_t *dtrace_probe_lookup_id(dtrace_id_t); static dtrace_state_t *dtrace_anon_grab(void); static int dtrace_badattr(const dtrace_attribute_t *); static int dtrace_badname(const char *); +static int dtrace_bcmp(const void *, const void *, size_t); +static int dtrace_canstore(uint64_t, size_t, dtrace_mstate_t *, dtrace_vstate_t *); +static int dtrace_canstore_statvar(uint64_t, size_t, dtrace_statvar_t **, int); static int dtrace_dof_options(dof_hdr_t *, dtrace_state_t *); static int dtrace_dof_relocate(dof_hdr_t *, dof_sec_t *, uint64_t); static int dtrace_dof_slurp(dof_hdr_t *, dtrace_vstate_t *, cred_t *, dtrace_enabling_t **, uint64_t, int); static int dtrace_ecb_action_add(dtrace_ecb_t *, dtrace_actdesc_t *); static int dtrace_ecb_create_enable(dtrace_probe_t *, void *); static int dtrace_enabling_match(dtrace_enabling_t *, int *); +static int dtrace_enabling_matchstate(dtrace_state_t *, int *); +static int dtrace_enabling_replicate(dtrace_state_t *, dtrace_probedesc_t *, dtrace_probedesc_t *); static int dtrace_enabling_retain(dtrace_enabling_t *); static int dtrace_hash_collisions(dtrace_hash_t *, dtrace_probe_t *); static int dtrace_helper_destroygen(int); static int dtrace_helper_slurp(dof_hdr_t *, dof_helper_t *); static int dtrace_helper_validate(dtrace_helper_action_t *); +static int dtrace_inscratch(uintptr_t, size_t, dtrace_mstate_t *); +static int dtrace_istoxic(uintptr_t, size_t); static int dtrace_match(const dtrace_probekey_t *, uint32_t, uid_t, zoneid_t, int (*)(dtrace_probe_t *, void *), void *); static int dtrace_match_priv(const dtrace_probe_t *, uint32_t, uid_t, zoneid_t); static int dtrace_match_probe(const dtrace_probe_t *, const dtrace_probekey_t *, uint32_t, uid_t, zoneid_t); static int dtrace_match_string(const char *, const char *, int); -static int dtrace_probe_enable(const dtrace_probedesc_t *, dtrace_enabling_t *); +static int dtrace_priv_kernel_destructive(dtrace_state_t *); +static int dtrace_priv_proc_common_nocd(void); +static int dtrace_priv_proc_control(dtrace_state_t *); +static int dtrace_priv_proc_destructive(dtrace_state_t *); +static int dtrace_probe_enable(dtrace_probedesc_t *, dtrace_enabling_t *); static int dtrace_speculation(dtrace_state_t *); static int dtrace_state_buffer(dtrace_state_t *, dtrace_buffer_t *, int); static int dtrace_state_buffers(dtrace_state_t *); static int dtrace_state_go(dtrace_state_t *, processorid_t *); static int dtrace_state_option(dtrace_state_t *, dtrace_optid_t, dtrace_optval_t); static int dtrace_state_stop(dtrace_state_t *, processorid_t *); +static int dtrace_strncmp(char *, char *, size_t); static intptr_t dtrace_buffer_reserve(dtrace_buffer_t *, size_t, size_t, dtrace_state_t *, dtrace_mstate_t *); +static size_t dtrace_strlen(const char *, size_t); static uint16_t dtrace_format_add(dtrace_state_t *, char *); +static uint64_t dtrace_dif_variable(dtrace_mstate_t *, dtrace_state_t *, uint64_t, uint64_t); static uint64_t dtrace_helper(int, dtrace_mstate_t *, dtrace_state_t *, uint64_t, uint64_t); static uint_t dtrace_hash_str(char *); static void dtrace_actdesc_release(dtrace_actdesc_t *, dtrace_vstate_t *); +static void dtrace_action_breakpoint(dtrace_ecb_t *); +static void dtrace_action_chill(dtrace_mstate_t *, hrtime_t); +static void dtrace_action_panic(dtrace_ecb_t *); +static void dtrace_action_raise(uint64_t); +static void dtrace_action_stop(void); +static void dtrace_action_ustack(dtrace_mstate_t *, dtrace_state_t *, uint64_t *, uint64_t); +static void dtrace_aggregate(dtrace_aggregation_t *, dtrace_buffer_t *, intptr_t, dtrace_buffer_t *, uint64_t, uint64_t); static void dtrace_anon_property(void); +static void dtrace_bcopy(const void *, void *, size_t); static void dtrace_buffer_drop(dtrace_buffer_t *); +static void dtrace_buffer_polish(dtrace_buffer_t *); +static void dtrace_buffer_switch(dtrace_buffer_t *); +static void dtrace_bzero(void *, size_t); +static void dtrace_cpu_setup_initial(processorid_t); static void dtrace_cred2priv(cred_t *, uint32_t *, uid_t *, zoneid_t *); +static void dtrace_dif_subr(uint_t, uint_t, uint64_t *, dtrace_key_t *, int, dtrace_mstate_t *, dtrace_state_t *); static void dtrace_difo_destroy(dtrace_difo_t *, dtrace_vstate_t *); static void dtrace_difo_hold(dtrace_difo_t *); static void dtrace_difo_release(dtrace_difo_t *, dtrace_vstate_t *); @@ -503,6 +519,7 @@ static void dtrace_enabling_destroy(dtrace_enabling_t *); static void dtrace_enabling_matchall(void); static void dtrace_enabling_provide(dtrace_provider_t *); +static void dtrace_error(uint32_t *); static void dtrace_format_remove(dtrace_state_t *, uint16_t); static void dtrace_hash_add(dtrace_hash_t *, dtrace_probe_t *); static void dtrace_hash_destroy(dtrace_hash_t *); @@ -516,11 +533,13 @@ static void dtrace_helper_trace(dtrace_helper_action_t *r, dtrace_mstate_t *, dtrace_vstate_t *, int); static void dtrace_helpers_destroy(void); static void dtrace_helpers_duplicate(proc_t *, proc_t *); +static void dtrace_module_loaded(struct modctl *); +static void dtrace_module_unloaded(struct modctl *); static void dtrace_predicate_hold(dtrace_predicate_t *); static void dtrace_predicate_release(dtrace_predicate_t *, dtrace_vstate_t *); static void dtrace_probe_description(const dtrace_probe_t *, dtrace_probedesc_t *); static void dtrace_probe_provide(dtrace_probedesc_t *, dtrace_provider_t *); -static void dtrace_probekey(const dtrace_probedesc_t *, dtrace_probekey_t *); +static void dtrace_probekey(dtrace_probedesc_t *, dtrace_probekey_t *); static void dtrace_speculation_clean(dtrace_state_t *); static void dtrace_speculation_clean_here(dtrace_state_t *); static void dtrace_speculation_commit(dtrace_state_t *, processorid_t, dtrace_specid_t); @@ -529,31 +548,21 @@ static void dtrace_state_deadman(dtrace_state_t *); static void dtrace_state_destroy(dtrace_state_t *); static void dtrace_state_prereserve(dtrace_state_t *); +static void dtrace_strcpy(const void *, void *, size_t); +static void dtrace_toxrange_add(uintptr_t, uintptr_t); +static void dtrace_vcopy(void *, void *, dtrace_diftype_t *); static void dtrace_vstate_fini(dtrace_vstate_t *); +uint16_t dtrace_load16(uintptr_t); +uint32_t dtrace_load32(uintptr_t); +uint64_t dtrace_load64(uintptr_t); +uint8_t dtrace_load8(uintptr_t); void dtrace_dstate_fini(dtrace_dstate_t *d); -void dtrace_vtime_disable(void); -void dtrace_vtime_enable(void); +void dtrace_dynvar_clean(dtrace_dstate_t *); +void dtrace_resume(void); +void dtrace_suspend(void); -/* XXX Hacks.... */ -void -dtrace_sync(void) -{ -#ifdef DOODAD - dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); -#endif -} -void -dtrace_membar_producer(void) -{ -} -void -dtrace_vtime_enable(void) -{ -} -void -dtrace_vtime_disable(void) -{ -} +/* Temporary hacks during porting this code. */ +#include /* Common error handler. */ #include From owner-p4-projects@FreeBSD.ORG Fri Apr 21 22:09:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 72D6F16A40B; Fri, 21 Apr 2006 22:09:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5152C16A400 for ; Fri, 21 Apr 2006 22:09:10 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E9CE43D69 for ; Fri, 21 Apr 2006 22:09:04 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LM94Ke024767 for ; Fri, 21 Apr 2006 22:09:04 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LM949u024764 for perforce@freebsd.org; Fri, 21 Apr 2006 22:09:04 GMT (envelope-from jb@freebsd.org) Date: Fri, 21 Apr 2006 22:09:04 GMT Message-Id: <200604212209.k3LM949u024764@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95836 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 22:09:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=95836 Change 95836 by jb@jb_freebsd2 on 2006/04/21 22:08:09 Fix a prototype definition to suit gcc's desire to know that it really has no argument. Only define the #pragma on Solaris. Our gcc warns that it ignores #pragma. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/vmem.h#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/vmem.h#2 (text) ==== @@ -27,7 +27,9 @@ #ifndef _SYS_VMEM_H #define _SYS_VMEM_H +#if defined(sun) #pragma ident "@(#)vmem.h 1.13 05/06/08 SMI" +#endif #include @@ -116,7 +118,7 @@ extern vmem_t *vmem_init(const char *, void *, size_t, size_t, vmem_alloc_t *, vmem_free_t *); extern void vmem_update(void *); -extern int vmem_is_populator(); +extern int vmem_is_populator(void); extern size_t vmem_seg_size; #endif From owner-p4-projects@FreeBSD.ORG Fri Apr 21 22:13:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B549116A407; Fri, 21 Apr 2006 22:13:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CF7516A405 for ; Fri, 21 Apr 2006 22:13:10 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E39343D45 for ; Fri, 21 Apr 2006 22:13:10 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LMDAqk027363 for ; Fri, 21 Apr 2006 22:13:10 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LMDAgc027355 for perforce@freebsd.org; Fri, 21 Apr 2006 22:13:10 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 22:13:10 GMT Message-Id: <200604212213.k3LMDAgc027355@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95837 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 22:13:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=95837 Change 95837 by imp@imp_hammer on 2006/04/21 22:12:16 Fix interface. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.h#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#3 (text+ko) ==== @@ -117,7 +117,7 @@ */ static void ProgramBuffer(unsigned pageAddress, unsigned byteAddress, - unsigned src_addr, unsigned size) + char *src_addr, unsigned size) { p_memset(tx_commandBuffer, 0, 8); @@ -135,9 +135,9 @@ spi_command.tx_cmd_size = 4; spi_command.tx_data_size = size; - spi_command.tx_data = (char*)src_addr; + spi_command.tx_data = src_addr; spi_command.rx_data_size = size; - spi_command.rx_data = (char*)src_addr; + spi_command.rx_data = src_addr; SendCommand(&spi_command); @@ -156,7 +156,7 @@ * .KB_C_FN_DEFINITION_END */ void -SPI_ReadFlash(unsigned flash_addr, unsigned dest_addr, unsigned size) +SPI_ReadFlash(unsigned flash_addr, char *dest_addr, unsigned size) { unsigned pageAddress, byteAddress; @@ -180,9 +180,9 @@ spi_command.tx_cmd_size = 8; spi_command.tx_data_size = size; - spi_command.tx_data = (char*)dest_addr; + spi_command.tx_data = dest_addr; spi_command.rx_data_size = size; - spi_command.rx_data = (char*)dest_addr; + spi_command.rx_data = dest_addr; SendCommand(&spi_command); } @@ -197,7 +197,7 @@ * .KB_C_FN_DEFINITION_END */ void -SPI_WriteFlash(unsigned flash_addr, unsigned src_addr, unsigned size) +SPI_WriteFlash(unsigned flash_addr, char *src_addr, unsigned size) { unsigned pageAddress, byteAddress, this_size; ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.h#3 (text+ko) ==== @@ -32,8 +32,8 @@ unsigned rx_data_size; } spiCommand_t; -void SPI_ReadFlash(unsigned flash_addr, unsigned dest_addr, unsigned size); -void SPI_WriteFlash(unsigned flash_addr, unsigned dest_addr, unsigned size); +void SPI_ReadFlash(unsigned flash_addr, char *dest_addr, unsigned size); +void SPI_WriteFlash(unsigned flash_addr, char *dest_addr, unsigned size); void SPI_InitFlash(void); #define FLASH_PAGE_SIZE 1056 From owner-p4-projects@FreeBSD.ORG Fri Apr 21 22:13:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0E37016A46B; Fri, 21 Apr 2006 22:13:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7C1616A433 for ; Fri, 21 Apr 2006 22:13:10 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 902D143D45 for ; Fri, 21 Apr 2006 22:13:10 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LMDAJi027377 for ; Fri, 21 Apr 2006 22:13:10 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LMDA0g027371 for perforce@freebsd.org; Fri, 21 Apr 2006 22:13:10 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 22:13:10 GMT Message-Id: <200604212213.k3LMDA0g027371@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95838 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 22:13:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=95838 Change 95838 by imp@imp_hammer on 2006/04/21 22:12:37 Initial version of spi burning bootstrap. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/doit.c#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#5 (text) ==== @@ -4,7 +4,7 @@ P=boot0spi FILES=${P} -SRCS=arm_init.s main.c doit.c +SRCS=arm_init.s main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#3 (text) ==== @@ -27,16 +27,18 @@ #include "at91rm9200.h" #include "lib.h" #include "at91rm9200_lowlevel.h" - -extern void doit(void *); +#include "spi_flash.h" int main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ + int len; - while (xmodem_rx(addr) == -1) + while ((len = xmodem_rx(addr)) == -1) continue; - doit(addr); + SPI_InitFlash(); + SPI_WriteFlash(FLASH_PAGE_SIZE, addr, len); + return (1); } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 00:35:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C628316A403; Sat, 22 Apr 2006 00:35:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8058416A400 for ; Sat, 22 Apr 2006 00:35:30 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38D6643D48 for ; Sat, 22 Apr 2006 00:35:30 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M0ZTnj005425 for ; Sat, 22 Apr 2006 00:35:30 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M0ZTDC005419 for perforce@freebsd.org; Sat, 22 Apr 2006 00:35:29 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 00:35:29 GMT Message-Id: <200604220035.k3M0ZTDC005419@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95846 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 00:35:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=95846 Change 95846 by jb@jb_freebsd2 on 2006/04/22 00:34:55 DTrace only uses the Solaris vmem subsystem to allocate and track what are effectively resource IDs. We can implement a very simple bitmap-backed solution which achieves the same result. And before even doing that, we can get the code running simply by returning an ever-increasing integer value as the resource ID. We'll run out after doing that 4 billion times, but by then we should have the bitmap solution which can reclaim the IDs. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/vmem.h#3 delete Differences ... From owner-p4-projects@FreeBSD.ORG Sat Apr 22 02:29:29 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5AB3416A405; Sat, 22 Apr 2006 02:29:29 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21C2616A403 for ; Sat, 22 Apr 2006 02:29:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEAD443D45 for ; Sat, 22 Apr 2006 02:29:28 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M2TSUQ074929 for ; Sat, 22 Apr 2006 02:29:28 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M2TSGE074926 for perforce@freebsd.org; Sat, 22 Apr 2006 02:29:28 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 02:29:28 GMT Message-Id: <200604220229.k3M2TSGE074926@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95849 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 02:29:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=95849 Change 95849 by jb@jb_freebsd2 on 2006/04/22 02:29:18 Add a custom 'mutex' implementation so that DTrace can sleep when allocating memory without panicing because it is holding a lock on struct mtx. Can't use sx locks because they aren't recursive. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_mutex.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_mutex.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sat Apr 22 02:39:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 05EBF16A403; Sat, 22 Apr 2006 02:39:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBE3516A402 for ; Sat, 22 Apr 2006 02:39:41 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A22F43D45 for ; Sat, 22 Apr 2006 02:39:41 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M2df3d082540 for ; Sat, 22 Apr 2006 02:39:41 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M2dfq5082534 for perforce@freebsd.org; Sat, 22 Apr 2006 02:39:41 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 02:39:41 GMT Message-Id: <200604220239.k3M2dfq5082534@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95850 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 02:39:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=95850 Change 95850 by jb@jb_freebsd2 on 2006/04/22 02:39:16 Add the custom mutex implementation. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#5 (text+ko) ==== @@ -3,17 +3,20 @@ .PATH: ${.CURDIR}/../../cddl/dev/dtrace KMOD= dtrace -SRCS= dtrace.c +SRCS= dtrace.c dtrace_mutex.c SRCS+= bus_if.h device_if.h vnode_if.h -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../cddl/dev/dtrace \ + -I${.CURDIR}/../../contrib/opensolaris/uts/common \ -I${.CURDIR}/../../contrib \ -I${.CURDIR}/../.. load : kldload dtrace + kldstat unload : kldunload dtrace + kldstat .include From owner-p4-projects@FreeBSD.ORG Sat Apr 22 02:43:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5B9F116A405; Sat, 22 Apr 2006 02:43:47 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2ED7B16A400 for ; Sat, 22 Apr 2006 02:43:47 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0AA543D46 for ; Sat, 22 Apr 2006 02:43:46 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M2hkgR085432 for ; Sat, 22 Apr 2006 02:43:46 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M2hkZq085429 for perforce@freebsd.org; Sat, 22 Apr 2006 02:43:46 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 02:43:46 GMT Message-Id: <200604220243.k3M2hkZq085429@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95851 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 02:43:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=95851 Change 95851 by jb@jb_freebsd2 on 2006/04/22 02:43:07 Don't include Sun's vmem implementation any more. All the DTrace was using it for was to allocate resource IDs. We can do that a MUCH simpler way than implementing vmem. Start using the custom mutex implementation. Include a source file which will contain the functions customised to suit the FreeBSD kernel. Currently they are just hacks, but this is where they will go when they become features rather than just hacks. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#8 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#8 (text+ko) ==== @@ -65,7 +65,7 @@ #include #include -#include +#include #include #include @@ -564,6 +564,9 @@ /* Temporary hacks during porting this code. */ #include +/* FreeBSD kernel specific functions. */ +#include + /* Common error handler. */ #include From owner-p4-projects@FreeBSD.ORG Sat Apr 22 02:46:52 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EA86216A403; Sat, 22 Apr 2006 02:46:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADA6F16A401 for ; Sat, 22 Apr 2006 02:46:51 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7662743D45 for ; Sat, 22 Apr 2006 02:46:51 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M2kpM4085584 for ; Sat, 22 Apr 2006 02:46:51 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M2kp6s085581 for perforce@freebsd.org; Sat, 22 Apr 2006 02:46:51 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 02:46:51 GMT Message-Id: <200604220246.k3M2kp6s085581@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95852 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 02:46:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=95852 Change 95852 by jb@jb_freebsd2 on 2006/04/22 02:46:20 Update my hacks to use the custom mutex and a dumber-than-dumb vmem implementation that is expected to do nothing more than allocate unique resource IDs. After 4 billion or so, bad things will happen, so by that time we'd better have a different hack. 8-) Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.c#2 (text+ko) ==== @@ -1,5 +1,37 @@ /* XXX Hacks.... */ +vmem_t * +vmem_create(const char *name, void *base, size_t size, size_t quantum, + vmem_alloc_t *afunc, vmem_free_t *ffunc, vmem_t *source, + size_t qcache_max, int vmflag) +{ + return (malloc(sizeof(vmem_t), M_DTRACE, M_WAITOK | M_ZERO)); +} + +void * +vmem_alloc(vmem_t *vmp, size_t size, int vmflag) +{ + /* + * Hope like hell that the caller only uses the value + * returned as an integer, not a pointer! + */ + return ((void *) ++(*vmp)); +} + +void +vmem_free(vmem_t *vmp, void *vaddr, size_t size) +{ + /* + * Nothing to do here. We didn't really allocate memory + * in the first place. 8-) + */ +} +void +vmem_destroy(vmem_t *vmp) +{ + free(vmp, M_DTRACE); +} + dtrace_cacheid_t dtrace_predcache_id; void *hack_refs[] = @@ -61,9 +93,6 @@ void dtrace_membar_producer(void) { - int i; - for (i = 0; i < sizeof(hack_refs) / sizeof(hack_refs[0]); i++) - printf("%p\n",hack_refs[i]); } void dtrace_membar_consumer(void) @@ -100,16 +129,6 @@ dtrace_interrupt_enable(dtrace_icookie_t a) { } -hrtime_t -dtrace_gethrestime(void) -{ - return 0; -} -hrtime_t -dtrace_gethrtime(void) -{ - return 0; -} void dtrace_getpcstack(pc_t *a, int b, int c, uint32_t *d) { @@ -138,20 +157,6 @@ { return 0; } -void -vmem_free(vmem_t *a, void *b, size_t c) -{ -} -void * -vmem_alloc(vmem_t *a, size_t b, int c) -{ - return NULL; -} -vmem_t * -vmem_create(const char *a, void *b, size_t c, size_t d, vmem_alloc_t *e, vmem_free_t *f, vmem_t *g, size_t h, int i) -{ - return NULL; -} boolean_t priv_policy_only(const cred_t *a, int b, boolean_t c) { ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#2 (text+ko) ==== @@ -7,11 +7,23 @@ #define CPU curthread #define cpu_id td_oncpu -typedef struct mtx kmutex_t; +#define VM_SLEEP 0x00000000 /* same as KM_SLEEP */ +#define VM_BESTFIT 0x00000100 +#define VMC_IDENTIFIER 0x00040000 /* not backed by memory */ +typedef void *(vmem_alloc_t)(vmem_t *, size_t, int); +typedef void (vmem_free_t)(vmem_t *, void *, size_t); +vmem_t *vmem_create(const char *, void *, size_t, size_t, + vmem_alloc_t *, vmem_free_t *, vmem_t *, size_t, int); +void *vmem_alloc(vmem_t *, size_t, int); +void vmem_free(vmem_t *, void *, size_t); +void vmem_destroy(vmem_t *); + +typedef dtrace_mutex_t kmutex_t; +#define mutex_enter(_a) dtrace_mutex_lock(_a) +#define mutex_exit(_a) dtrace_mutex_unlock(_a) + #define crgetuid(_a) _a->cr_uid #define crgetzoneid(_a) 0 -#define mutex_enter(_a) mtx_lock(_a) -#define mutex_exit(_a) mtx_unlock(_a) #define KM_SLEEP M_WAITOK #define KM_NOSLEEP M_NOWAIT #define kmem_zalloc(_a,_b) malloc(_a, M_DTRACE, _b | M_ZERO) From owner-p4-projects@FreeBSD.ORG Sat Apr 22 02:48:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5A7EF16A405; Sat, 22 Apr 2006 02:48:55 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 217B416A402 for ; Sat, 22 Apr 2006 02:48:55 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF71F43D45 for ; Sat, 22 Apr 2006 02:48:54 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M2msdf085646 for ; Sat, 22 Apr 2006 02:48:54 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M2msiZ085643 for perforce@freebsd.org; Sat, 22 Apr 2006 02:48:54 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 02:48:54 GMT Message-Id: <200604220248.k3M2msiZ085643@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95853 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 02:48:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=95853 Change 95853 by jb@jb_freebsd2 on 2006/04/22 02:48:24 Use the custom mutex implementation. Use our you-beaut-vmem-smoke-and-mirrors hack. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#4 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#4 (text+ko) ==== @@ -41,8 +41,8 @@ * XXX This is a short term hack to avoid having to comment * out lots and lots of lock/unlock calls. */ - mtx_init(&cpu_lock,"XXX hack",NULL,MTX_RECURSE | MTX_NOWITNESS); - mtx_init(&mod_lock,"XXX hack",NULL,MTX_RECURSE | MTX_NOWITNESS); + dtrace_mutex_init(&cpu_lock,"XXX cpu_lock hack"); + dtrace_mutex_init(&mod_lock,"XXX mod_lock hack"); /* * Initialise the mutexes without 'witness' because the dtrace @@ -52,9 +52,9 @@ * low memory situation. And that low memory situation might be * the very problem we are trying to trace. */ - mtx_init(&dtrace_lock,"dtrace probe state",NULL,MTX_RECURSE | MTX_NOWITNESS); - mtx_init(&dtrace_provider_lock,"dtrace provider state",NULL,MTX_RECURSE | MTX_NOWITNESS); - mtx_init(&dtrace_meta_lock,"dtrace meta-provider state",NULL,MTX_RECURSE | MTX_NOWITNESS); + dtrace_mutex_init(&dtrace_lock,"dtrace probe state"); + dtrace_mutex_init(&dtrace_provider_lock,"dtrace provider state"); + dtrace_mutex_init(&dtrace_meta_lock,"dtrace meta-provider state"); /* Create the /dev/dtrace entry. */ dtrace_dev = make_dev(&dtrace_cdevsw, DTRACE_MINOR, UID_ROOT, @@ -105,12 +105,14 @@ register_cpu_setup_func((cpu_setup_func_t *)dtrace_cpu_setup, NULL); ASSERT(MUTEX_HELD(&cpu_lock)); +#endif dtrace_arena = vmem_create("dtrace", (void *)1, UINT32_MAX, 1, NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER); dtrace_minor = vmem_create("dtrace_minor", (void *)DTRACEMNRN_CLONE, UINT32_MAX - DTRACEMNRN_CLONE, 1, NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER); +#ifdef DOODAD dtrace_taskq = taskq_create("dtrace_taskq", 1, maxclsyspri, 1, INT_MAX, 0); ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#4 (text+ko) ==== @@ -108,9 +108,9 @@ #ifdef DOODAD kmem_cache_destroy(dtrace_state_cache); +#endif vmem_destroy(dtrace_minor); vmem_destroy(dtrace_arena); -#endif if (dtrace_toxrange != NULL) { free(dtrace_toxrange, M_DTRACE); @@ -130,8 +130,8 @@ ASSERT(dtrace_opens == 0); ASSERT(dtrace_retained == NULL); - mtx_unlock(&dtrace_lock); - mtx_unlock(&dtrace_provider_lock); + mutex_exit(&dtrace_lock); + mutex_exit(&dtrace_provider_lock); /* * We don't destroy the task queue until after we have dropped our @@ -149,13 +149,13 @@ /* Destroy the /dev/dtrace entry. */ destroy_dev(dtrace_dev); - mtx_destroy(&dtrace_meta_lock); - mtx_destroy(&dtrace_provider_lock); - mtx_destroy(&dtrace_lock); + dtrace_mutex_destroy(&dtrace_meta_lock); + dtrace_mutex_destroy(&dtrace_provider_lock); + dtrace_mutex_destroy(&dtrace_lock); /* XXX Hack */ - mtx_destroy(&cpu_lock); - mtx_destroy(&mod_lock); + dtrace_mutex_destroy(&cpu_lock); + dtrace_mutex_destroy(&mod_lock); return (error); } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 02:51:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 94DF616A406; Sat, 22 Apr 2006 02:51:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C2B716A404 for ; Sat, 22 Apr 2006 02:51:13 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 157E743D45 for ; Sat, 22 Apr 2006 02:51:13 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M2pCX1086526 for ; Sat, 22 Apr 2006 02:51:12 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M2pCa1086520 for perforce@freebsd.org; Sat, 22 Apr 2006 02:51:12 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 02:51:12 GMT Message-Id: <200604220251.k3M2pCa1086520@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95854 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 02:51:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=95854 Change 95854 by jb@jb_freebsd2 on 2006/04/22 02:51:12 Use the custom DTrace mutex implementation. Affected files ... .. //depot/projects/dtrace/src/sys/conf/files#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/files#6 (text+ko) ==== @@ -93,6 +93,7 @@ cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ cddl/dev/dtrace/dtrace.c optional dtrace | fasttrap +cddl/dev/dtrace/dtrace_mutex.c optional dtrace | fasttrap cddl/dev/fasttrap/fasttrap.c optional fasttrap coda/coda_fbsd.c optional vcoda coda/coda_namecache.c optional vcoda From owner-p4-projects@FreeBSD.ORG Sat Apr 22 02:59:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0E12716A405; Sat, 22 Apr 2006 02:59:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA0E116A401 for ; Sat, 22 Apr 2006 02:59:23 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DB0C43D48 for ; Sat, 22 Apr 2006 02:59:23 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M2xNhu093006 for ; Sat, 22 Apr 2006 02:59:23 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M2xNB8092992 for perforce@freebsd.org; Sat, 22 Apr 2006 02:59:23 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 02:59:23 GMT Message-Id: <200604220259.k3M2xNB8092992@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95855 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 02:59:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=95855 Change 95855 by jb@jb_freebsd2 on 2006/04/22 02:59:14 Remove 'const' from a few places to satisfy gcc's strict checking options that FreeBSD uses. Sun was passing things around as consts and then finally getting to a point where they wanted to drop the const. There is no point using consts unless you are prepared to obey them in your code. Fix some prototypes that gcc wanted to know that they really, really didn't have any arguments passed to them. Update a few more ioctl definitions to reflect the data transfer. Solaris is oblivious to what passes through ioctl. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#5 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace_impl.h#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#5 (text) ==== @@ -55,12 +55,17 @@ #include #else #include +#include #include #include #include typedef struct ucred cred_t; +typedef struct proc proc_t; +typedef struct proc kthread_t; +typedef int model_t; struct modctl { - int something; /* XXX */ + char *mod_filename; + char *mod_modname; }; #endif #include @@ -1193,16 +1198,18 @@ #define DTRACEIOC_DOFGET (DTRACEIOC | 17) /* get DOF */ #define DTRACEIOC_REPLICATE (DTRACEIOC | 18) /* replicate enab */ #else -#define DTRACEIOC_PROVIDER _IO('x',1) /* provider query */ +#define DTRACEIOC_PROVIDER _IOWR('x',1,dtrace_providerdesc_t) + /* provider query */ #define DTRACEIOC_PROBES _IOWR('x',2,dtrace_probedesc_t) /* probe query */ #define DTRACEIOC_BUFSNAP _IO('x',4) /* snapshot buffer */ #define DTRACEIOC_PROBEMATCH _IOWR('x',5,dtrace_probedesc_t) /* match probes */ -#define DTRACEIOC_ENABLE _IO('x',6) /* enable probes */ +#define DTRACEIOC_ENABLE _IOWR('x',6,void *) /* enable probes */ #define DTRACEIOC_AGGSNAP _IO('x',7) /* snapshot agg. */ #define DTRACEIOC_EPROBE _IO('x',8) /* get eprobe desc. */ -#define DTRACEIOC_PROBEARG _IO('x',9) /* get probe arg */ +#define DTRACEIOC_PROBEARG _IOWR('x',9,dtrace_argdesc_t) + /* get probe arg */ #define DTRACEIOC_CONF _IOR('x',10,dtrace_conf_t) /* get config. */ #define DTRACEIOC_STATUS _IO('x',11) /* get status */ @@ -1997,8 +2004,8 @@ extern int dtrace_unregister(dtrace_provider_id_t); extern int dtrace_condense(dtrace_provider_id_t); extern void dtrace_invalidate(dtrace_provider_id_t); -extern dtrace_id_t dtrace_probe_lookup(dtrace_provider_id_t, const char *, - const char *, const char *); +extern dtrace_id_t dtrace_probe_lookup(dtrace_provider_id_t, char *, + char *, char *); extern dtrace_id_t dtrace_probe_create(dtrace_provider_id_t, const char *, const char *, const char *, int, void *); extern void *dtrace_probe_arg(dtrace_provider_id_t, dtrace_id_t); @@ -2171,7 +2178,6 @@ DTRACE_VTIME_ACTIVE_TNF /* DTrace virtual time _and_ TNF */ } dtrace_vtime_state_t; -#ifdef DOODAD extern dtrace_vtime_state_t dtrace_vtime_active; extern void dtrace_vtime_switch(kthread_t *next); extern void dtrace_vtime_enable_tnf(void); @@ -2201,16 +2207,16 @@ extern void (*dtrace_cpu_init)(processorid_t); extern void (*dtrace_modload)(struct modctl *); extern void (*dtrace_modunload)(struct modctl *); -extern void (*dtrace_helpers_cleanup)(); +extern void (*dtrace_helpers_cleanup)(void); extern void (*dtrace_helpers_fork)(proc_t *parent, proc_t *child); -extern void (*dtrace_cpustart_init)(); -extern void (*dtrace_cpustart_fini)(); +extern void (*dtrace_cpustart_init)(void); +extern void (*dtrace_cpustart_fini)(void); -extern void (*dtrace_kreloc_init)(); -extern void (*dtrace_kreloc_fini)(); +extern void (*dtrace_kreloc_init)(void); +extern void (*dtrace_kreloc_fini)(void); -extern void (*dtrace_debugger_init)(); -extern void (*dtrace_debugger_fini)(); +extern void (*dtrace_debugger_init)(void); +extern void (*dtrace_debugger_fini)(void); extern dtrace_cacheid_t dtrace_predcache_id; extern hrtime_t dtrace_gethrtime(void); @@ -2222,13 +2228,10 @@ extern int dtrace_safe_defer_signal(void); extern void dtrace_safe_synchronous_signal(void); -#endif #if defined(__i386) || defined(__amd64) extern int dtrace_instr_size(uchar_t *instr); -#ifdef DOODAD extern int dtrace_instr_size_isa(uchar_t *, model_t, int *); -#endif extern void dtrace_invop_add(int (*)(uintptr_t, uintptr_t *, uintptr_t)); extern void dtrace_invop_remove(int (*)(uintptr_t, uintptr_t *, uintptr_t)); extern void dtrace_invop_callsite(void); ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace_impl.h#3 (text) ==== @@ -50,7 +50,13 @@ #else #include #include +#ifdef __sparcv9 +typedef uint32_t pc_t; +#else +typedef uintptr_t pc_t; #endif +typedef u_int32_t vmem_t; +#endif /* * DTrace Implementation Constants and Typedefs @@ -120,13 +126,13 @@ typedef int dtrace_probekey_f(const char *, const char *, int); typedef struct dtrace_probekey { - const char *dtpk_prov; /* provider name to match */ + char *dtpk_prov; /* provider name to match */ dtrace_probekey_f *dtpk_pmatch; /* provider matching function */ - const char *dtpk_mod; /* module name to match */ + char *dtpk_mod; /* module name to match */ dtrace_probekey_f *dtpk_mmatch; /* module matching function */ - const char *dtpk_func; /* func name to match */ + char *dtpk_func; /* func name to match */ dtrace_probekey_f *dtpk_fmatch; /* func matching function */ - const char *dtpk_name; /* name to match */ + char *dtpk_name; /* name to match */ dtrace_probekey_f *dtpk_nmatch; /* name matching function */ dtrace_id_t dtpk_id; /* identifier to match */ } dtrace_probekey_t; @@ -1109,9 +1115,7 @@ int dts_nspeculations; /* number of speculations */ int dts_naggregations; /* number of aggregations */ dtrace_aggregation_t **dts_aggregations; /* aggregation array */ -#ifdef DOODAD vmem_t *dts_aggid_arena; /* arena for aggregation IDs */ -#endif uint64_t dts_errors; /* total number of errors */ uint32_t dts_speculations_busy; /* number of spec. busy */ uint32_t dts_speculations_unavail; /* number of spec unavail */ @@ -1245,8 +1249,8 @@ extern void dtrace_copyinstr(uintptr_t, uintptr_t, size_t); extern void dtrace_copyout(uintptr_t, uintptr_t, size_t); extern void dtrace_copyoutstr(uintptr_t, uintptr_t, size_t); +extern void dtrace_getpcstack(pc_t *, int, int, uint32_t *); #ifdef DOODAD -extern void dtrace_getpcstack(pc_t *, int, int, uint32_t *); extern ulong_t dtrace_getreg(struct regs *, uint_t); #endif extern int dtrace_getstackdepth(int); From owner-p4-projects@FreeBSD.ORG Sat Apr 22 03:01:27 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 52C2716A405; Sat, 22 Apr 2006 03:01:27 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 198BD16A401 for ; Sat, 22 Apr 2006 03:01:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5B8C43D46 for ; Sat, 22 Apr 2006 03:01:26 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M31QuU094541 for ; Sat, 22 Apr 2006 03:01:26 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M31Qpd094535 for perforce@freebsd.org; Sat, 22 Apr 2006 03:01:26 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 03:01:26 GMT Message-Id: <200604220301.k3M31Qpd094535@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95856 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 03:01:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=95856 Change 95856 by jb@jb_freebsd2 on 2006/04/22 03:01:12 Fix a return value to match the data type. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hash.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hash.c#2 (text+ko) ==== @@ -155,7 +155,7 @@ return (bucket->dthb_len); } - return (NULL); + return (0); } static void From owner-p4-projects@FreeBSD.ORG Sat Apr 22 03:44:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 00ECC16A409; Sat, 22 Apr 2006 03:44:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C73B116A400 for ; Sat, 22 Apr 2006 03:44:22 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB22743D58 for ; Sat, 22 Apr 2006 03:44:19 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M3iJvB019210 for ; Sat, 22 Apr 2006 03:44:19 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M3iJxg019207 for perforce@freebsd.org; Sat, 22 Apr 2006 03:44:19 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 03:44:19 GMT Message-Id: <200604220344.k3M3iJxg019207@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95859 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 03:44:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=95859 Change 95859 by jb@jb_freebsd2 on 2006/04/22 03:44:16 Remove unnecessary includes. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_mutex.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_mutex.c#2 (text+ko) ==== @@ -31,10 +31,6 @@ #include #include -#ifdef DOODAD -#include -#include -#endif #include #include #include From owner-p4-projects@FreeBSD.ORG Sat Apr 22 03:46:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4332816A404; Sat, 22 Apr 2006 03:46:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21A9816A402 for ; Sat, 22 Apr 2006 03:46:23 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA3A943D46 for ; Sat, 22 Apr 2006 03:46:22 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M3kMna019326 for ; Sat, 22 Apr 2006 03:46:22 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M3kMGX019323 for perforce@freebsd.org; Sat, 22 Apr 2006 03:46:22 GMT (envelope-from imp@freebsd.org) Date: Sat, 22 Apr 2006 03:46:22 GMT Message-Id: <200604220346.k3M3kMGX019323@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95860 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 03:46:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=95860 Change 95860 by imp@imp_hammer on 2006/04/22 03:45:42 Tweaks to try to get Get Id working. kinda. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.h#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#4 (text+ko) ==== @@ -42,9 +42,9 @@ static void SendCommand(spiCommand_t *pCommand) { - unsigned value; + unsigned value, i; - AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTDIS + AT91C_PDC_RXTDIS; + AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTDIS | AT91C_PDC_RXTDIS; AT91C_BASE_SPI->SPI_RPR = (unsigned)pCommand->rx_cmd; AT91C_BASE_SPI->SPI_TPR = (unsigned)pCommand->tx_cmd; @@ -58,12 +58,21 @@ AT91C_BASE_SPI->SPI_TNCR = pCommand->tx_data_size; AT91C_BASE_SPI->SPI_RNPR = (unsigned)pCommand->rx_data; AT91C_BASE_SPI->SPI_RNCR = pCommand->rx_data_size; + } else { + AT91C_BASE_SPI->SPI_TNPR = 0; + AT91C_BASE_SPI->SPI_TNCR = 0; + AT91C_BASE_SPI->SPI_RNPR = 0; + AT91C_BASE_SPI->SPI_RNCR = 0; } AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTEN + AT91C_PDC_RXTEN; + printf("Wait complete\r\n"); // wait for completion - while (!((value = AT91C_BASE_SPI->SPI_SR) & AT91C_SPI_SPENDRX)) ; + i = 1000000; + while (!((value = AT91C_BASE_SPI->SPI_SR) & AT91C_SPI_SPENDRX) && + i > 0) i--; + printf("Done %x\r\n", value); } @@ -88,9 +97,28 @@ spi_command.tx_cmd_size = 2; SendCommand(&spi_command); + printf("FlashStatus is %x\r\n", rx_commandBuffer[1]); return (rx_commandBuffer[1]); } +void +SPI_GetId(unsigned *id) +{ + + p_memset(tx_commandBuffer, 0, 8); + tx_commandBuffer[0] = 0x9f; + p_memset(rx_commandBuffer, 0, 8); + spi_command.tx_data_size = 0; + spi_command.rx_data_size = 0; + spi_command.tx_cmd = tx_commandBuffer; + spi_command.rx_cmd = rx_commandBuffer; + spi_command.rx_cmd_size = 5; + spi_command.tx_cmd_size = 2; + SendCommand(&spi_command); + + printf("Id bytes are %x %x %x %x\r\n", rx_commandBuffer[1], + rx_commandBuffer[2], rx_commandBuffer[3], rx_commandBuffer[4]); +} /* * .KB_C_FN_DEFINITION_START @@ -271,6 +299,6 @@ value = pSPI->SPI_RDR; value = pSPI->SPI_SR; - if (((initStatus = GetFlashStatus()) & 0xFC) != 0xAC) + if (((initStatus = GetFlashStatus()) & 0xFC) != 0xBC) printf(" Unexpected SPI flash status: 0x%x\r\n", initStatus); } ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.h#4 (text+ko) ==== @@ -36,6 +36,8 @@ void SPI_WriteFlash(unsigned flash_addr, char *dest_addr, unsigned size); void SPI_InitFlash(void); +void SPI_GetId(unsigned *id); + #define FLASH_PAGE_SIZE 1056 // Flash commands @@ -43,6 +45,6 @@ #define CONTINUOUS_ARRAY_READ 0xE8 #define STATUS_REGISTER_READ 0xD7 #define PROGRAM_THROUGH_BUFFER 0x82 - +#define MANUFACTURER_ID 0x9F #endif From owner-p4-projects@FreeBSD.ORG Sat Apr 22 03:46:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 74C3E16A46A; Sat, 22 Apr 2006 03:46:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D0BF16A40E for ; Sat, 22 Apr 2006 03:46:23 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13D9E43D48 for ; Sat, 22 Apr 2006 03:46:23 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M3kMku019334 for ; Sat, 22 Apr 2006 03:46:22 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M3kMQo019331 for perforce@freebsd.org; Sat, 22 Apr 2006 03:46:22 GMT (envelope-from imp@freebsd.org) Date: Sat, 22 Apr 2006 03:46:22 GMT Message-Id: <200604220346.k3M3kMQo019331@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95861 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 03:46:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=95861 Change 95861 by imp@imp_hammer on 2006/04/22 03:46:20 Turn this into a more diagnostic for spi flash testing. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#4 (text) ==== @@ -26,6 +26,7 @@ #include "at91rm9200.h" #include "lib.h" +#include "p_string.h" #include "at91rm9200_lowlevel.h" #include "spi_flash.h" @@ -33,12 +34,48 @@ main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - int len; + int len, i; +#if 0 + char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* Load to base + 2MB */ + unsigned this_sec; +#endif + printf("b4\r\n"); + SPI_InitFlash(); + printf("after\r\n"); +#if 0 while ((len = xmodem_rx(addr)) == -1) continue; - SPI_InitFlash(); - SPI_WriteFlash(FLASH_PAGE_SIZE, addr, len); - +#else + len = FLASH_PAGE_SIZE; + for (i = 0; i < FLASH_PAGE_SIZE; i++) + addr[i] = i; + SPI_GetId(0); + printf("Memory after init:\r\n"); + for (i = 0; i < 4; i++) + printf("0x%x ", addr[i]); + printf("\r\n"); +#endif +#if 0 + while (1) { + printf("Writing %u bytes to flash\r\n", len); + SPI_WriteFlash(FLASH_PAGE_SIZE, addr, len); + printf("Reading back %u bytes from flash\r\n", len); + SPI_ReadFlash(FLASH_PAGE_SIZE, addr2, len); + if (p_memcmp(addr, addr2, len) != 0) { + printf("Readback failed:\r\n"); + for (i = 0; i < 4; i++) + printf("0x%x ", addr[i]); + printf("\r\n"); + for (i = 0; i < 4; i++) + printf("0x%x ", addr2[i]); + printf("\r\n"); + } else + printf("Readback OK\r\n"); + this_sec = GetSeconds() + 1; + while (GetSeconds() < this_sec) + continue; + } +#endif return (1); } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 03:47:25 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 25E5816A404; Sat, 22 Apr 2006 03:47:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 032B716A401 for ; Sat, 22 Apr 2006 03:47:25 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C60F643D46 for ; Sat, 22 Apr 2006 03:47:24 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M3lOA0019358 for ; Sat, 22 Apr 2006 03:47:24 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M3lOQn019355 for perforce@freebsd.org; Sat, 22 Apr 2006 03:47:24 GMT (envelope-from imp@freebsd.org) Date: Sat, 22 Apr 2006 03:47:24 GMT Message-Id: <200604220347.k3M3lOQn019355@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95862 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 03:47:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95862 Change 95862 by imp@imp_hammer on 2006/04/22 03:46:39 Churn: back to TSC being the default. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#12 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#12 (text+ko) ==== @@ -5,13 +5,13 @@ CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ - -Wall -Waggregate-return -Wcast-align \ + -Wall -Waggregate-return \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Werror -#CFLAGS+=-DBOOT_TSC -CFLAGS+=-DBOOT_KB9202 +CFLAGS+=-DBOOT_TSC +#CFLAGS+=-DBOOT_KB9202 LIBAT91=${.OBJDIR}/../libat91/libat91.a From owner-p4-projects@FreeBSD.ORG Sat Apr 22 09:25:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9931B16A405; Sat, 22 Apr 2006 09:25:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 541A716A401 for ; Sat, 22 Apr 2006 09:25:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1631843D48 for ; Sat, 22 Apr 2006 09:25:24 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M9PNE3026031 for ; Sat, 22 Apr 2006 09:25:23 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M9PNqY026028 for perforce@freebsd.org; Sat, 22 Apr 2006 09:25:23 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 09:25:23 GMT Message-Id: <200604220925.k3M9PNqY026028@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95869 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 09:25:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=95869 Change 95869 by jb@jb_freebsd2 on 2006/04/22 09:24:24 Implement device cloning. This works quite differently on FreeBSD than it does on Solaris. On Solaris, the base device /dev/dtrace/dtrace is opened and it creates a new dev_t (uint32_t) based on the current major number and a new minor number which is allocates using the vmem-this-is-not-really- virtual-memory-but-we-can-allocate-resource-numbers-this-way interface and then it writes back and resets the dev_t passed to the open() call so that the minor number changes for future calls. I don't know what happens if you try to change the major number at the same time. On FreeBSD, device cloning works BEFORE the open call which is passed a struct cdev pointer which it can't change. The FreeBSD device cloning is implemented via an event handler callback to the dtrace_clone() function added here. That function uses the vmem-this-is-not-...etc interface to get a manor number and a new device is created. When the dtrace_open() function is called, the new device struct cdev pointer is passed. Finally the dtrace_close() call has to destroy the device (and free the vmem-this-is-not-...etc number allocated to it). I'm not quite sure what is going on at the moment, but I see the open() call being called twice -- first with the new minor number and then with the base minor number (zero). This happens even if device cloning isn't used. I think it might be a bug outside my DTrace port. Ugh. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#9 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_clone.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_close.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#3 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_open.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#9 (text+ko) ==== @@ -79,6 +79,7 @@ static d_open_t dtrace_open; static int dtrace_load(void); static int dtrace_unload(void); +static void dtrace_clone(void *, struct ucred *, char *, int , struct cdev **); static struct cdevsw dtrace_cdevsw = { .d_version = D_VERSION, @@ -158,9 +159,8 @@ /* * DTrace Internal Variables */ -#ifdef DOODAD -static dev_info_t *dtrace_devi; /* device info */ -#endif +static struct clonedevs *dtrace_clones; /* Ptr to the array of cloned devices. */ +static eventhandler_tag eh_tag; /* Event handler tag. */ static vmem_t *dtrace_arena; /* probe ID arena */ static vmem_t *dtrace_minor; /* minor number arena */ static taskq_t *dtrace_taskq; /* task queue */ @@ -170,9 +170,6 @@ static dtrace_meta_t *dtrace_meta_pid; /* user-land meta provider */ static int dtrace_opens; /* number of opens */ static int dtrace_helpers; /* number of helpers */ -#ifdef DOODAD -static void *dtrace_softstate; /* softstate pointer */ -#endif static dtrace_hash_t *dtrace_bymod; /* probes hashed by module */ static dtrace_hash_t *dtrace_byfunc; /* probes hashed by function */ static dtrace_hash_t *dtrace_byname; /* probes hashed by name */ @@ -633,6 +630,7 @@ #include /* - Driver cookbook functions */ +#include #include #include #include ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_close.c#2 (text+ko) ==== @@ -27,5 +27,13 @@ dtrace_close(struct cdev *dev __unused, int flags, int fmt __unused, struct thread *td) { + /* Check if this is a cloned device. */ + if (minor(dev) > 0) { + /* XXX Do the state destruction cleanup here. */ + + /* Destroy the cloned device. */ + destroy_dev(dev); + } + return (0); } ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#3 (text+ko) ==== @@ -30,10 +30,22 @@ switch (type) { case MOD_LOAD: - error = dtrace_load(); + if ((error = dtrace_load()) == 0) { + /* Enable device cloning. */ + clone_setup(&dtrace_clones); + + /* Setup device cloning events. */ + eh_tag = EVENTHANDLER_REGISTER(dev_clone, dtrace_clone, 0, 1000); + } break; case MOD_UNLOAD: + /* De-register the device cloning event handler. */ + EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); + + /* Stop device cloning. */ + clone_cleanup(&dtrace_clones); + error = dtrace_unload(); break; ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_open.c#2 (text+ko) ==== @@ -27,5 +27,14 @@ dtrace_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { int error = 0; + + /* + * The first minor device is the one that is cloned so there is + * nothing more to do here. + */ + if (minor(dev) == 0) + return 0; + +printf("%s: struct cdev %p curthread %p si_drv0 %u\n",__FUNCTION__,dev,curthread,dev->si_drv0); return (error); } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 09:36:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 52F0516A406; Sat, 22 Apr 2006 09:36:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20A0B16A400 for ; Sat, 22 Apr 2006 09:36:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA71343D48 for ; Sat, 22 Apr 2006 09:36:42 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M9agwe031100 for ; Sat, 22 Apr 2006 09:36:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M9agZb031081 for perforce@freebsd.org; Sat, 22 Apr 2006 09:36:42 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 09:36:42 GMT Message-Id: <200604220936.k3M9agZb031081@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95871 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 09:36:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=95871 Change 95871 by jb@jb_freebsd2 on 2006/04/22 09:35:50 Change the base device name so that device cloning works. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#5 (text+ko) ==== @@ -58,7 +58,7 @@ /* Create the /dev/dtrace entry. */ dtrace_dev = make_dev(&dtrace_cdevsw, DTRACE_MINOR, UID_ROOT, - GID_WHEEL, 0660, "dtrace"); + GID_WHEEL, 0660, "dtrace0"); mutex_enter(&cpu_lock); mutex_enter(&dtrace_provider_lock); From owner-p4-projects@FreeBSD.ORG Sat Apr 22 09:50:02 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2D55916A405; Sat, 22 Apr 2006 09:50:02 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED5A816A400 for ; Sat, 22 Apr 2006 09:50:01 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AECE043D45 for ; Sat, 22 Apr 2006 09:50:01 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3M9o1tp036956 for ; Sat, 22 Apr 2006 09:50:01 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3M9o1QW036953 for perforce@freebsd.org; Sat, 22 Apr 2006 09:50:01 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 09:50:01 GMT Message-Id: <200604220950.k3M9o1QW036953@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95873 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 09:50:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=95873 Change 95873 by jb@jb_freebsd2 on 2006/04/22 09:49:37 Change the name of the base device to /dev/dtrace0 so that device cloning works. Without the trailing zero the cloning even doesn't occur. Not sure why. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#7 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#7 (text) ==== @@ -922,7 +922,7 @@ #if defined(sun) dtfd = open("/dev/dtrace/dtrace", O_RDWR); #else - dtfd = open("/dev/dtrace", O_RDWR); + dtfd = open("/dev/dtrace0", O_RDWR); #endif err = errno; /* save errno from opening dtfd */ From owner-p4-projects@FreeBSD.ORG Sat Apr 22 15:57:06 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C45E16A403; Sat, 22 Apr 2006 15:57:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E838316A400 for ; Sat, 22 Apr 2006 15:57:05 +0000 (UTC) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 952EF43D45 for ; Sat, 22 Apr 2006 15:57:05 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MFv5UY048613 for ; Sat, 22 Apr 2006 15:57:05 GMT (envelope-from soc-bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MFv5PU048604 for perforce@freebsd.org; Sat, 22 Apr 2006 15:57:05 GMT (envelope-from soc-bushman@freebsd.org) Date: Sat, 22 Apr 2006 15:57:05 GMT Message-Id: <200604221557.k3MFv5PU048604@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-bushman@freebsd.org using -f From: soc-bushman To: Perforce Change Reviews Cc: Subject: PERFORCE change 95879 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 15:57:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=95879 Change 95879 by soc-bushman@soc-bushman_stinger on 2006/04/22 15:56:22 cached script added to etc/rc.d Affected files ... .. //depot/projects/soc2005/nsswitch_cached/src/etc/defaults/rc.conf#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/SERVERS#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/cached#1 add .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/named#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/ntpd#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.subr#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/rpc/rpcent.h#3 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/gen/wordexp.3#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/jexec/Makefile#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/jexec/jexec.8#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/jexec/jexec.c#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c#7 integrate Differences ... ==== //depot/projects/soc2005/nsswitch_cached/src/etc/defaults/rc.conf#3 (text+ko) ==== @@ -15,7 +15,7 @@ # For a more detailed explanation of all the rc.conf variables, please # refer to the rc.conf(5) manual page. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.280 2006/04/13 18:34:13 brooks Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.281 2006/04/18 15:02:24 flz Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -260,6 +260,7 @@ ntpdate_flags="-b" # Flags to ntpdate (if enabled). ntpd_enable="NO" # Run ntpd Network Time Protocol (or NO). ntpd_program="/usr/sbin/ntpd" # path to ntpd, if you want a different one. +ntpd_config="/etc/ntp.conf" # ntpd(8) configuration file ntpd_sync_on_start="NO" # Sync time on ntpd startup, even if offset is high ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift" # Flags to ntpd (if enabled). ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/SERVERS#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # # $NetBSD: SERVERS,v 1.9 2002/03/22 04:33:57 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/SERVERS,v 1.6 2006/02/19 08:18:48 dougb Exp $ +# $FreeBSD: src/etc/rc.d/SERVERS,v 1.7 2006/04/19 05:10:34 delphij Exp $ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi +# REQUIRE: mountcritremote abi ldconfig # This is a dummy dependency, for early-start servers relying on # some basic configuration. ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/named#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/named,v 1.24 2006/02/13 08:45:50 dougb Exp $ +# $FreeBSD: src/etc/rc.d/named,v 1.26 2006/04/20 12:30:12 delphij Exp $ # # PROVIDE: named ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.d/ntpd#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ntpd,v 1.12 2005/12/21 09:48:41 dougb Exp $ +# $FreeBSD: src/etc/rc.d/ntpd,v 1.13 2006/04/18 15:02:24 flz Exp $ # # PROVIDE: ntpd @@ -15,12 +15,17 @@ command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" start_precmd="ntpd_precmd" -required_files="/etc/ntp.conf" + +load_rc_config $name + +required_files="${ntpd_config}" ntpd_precmd() { + rc_flags="-c ${ntpd_config} ${ntpd_flags}" + if checkyesno ntpd_sync_on_start; then - rc_flags="-g ${ntpd_flags}" + rc_flags="-g $rc_flags" fi if [ -z "$ntpd_chrootdir" ]; then @@ -47,5 +52,4 @@ rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags" } -load_rc_config $name run_rc_command "$1" ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.subr#3 (text+ko) ==== @@ -1,5 +1,5 @@ -# $NetBSD: rc.subr,v 1.65 2004/10/12 14:45:29 lukem Exp $ -# $FreeBSD: src/etc/rc.subr,v 1.55 2006/04/13 08:30:43 flz Exp $ +# $NetBSD: rc.subr,v 1.66 2006/04/01 10:05:50 he Exp $ +# $FreeBSD: src/etc/rc.subr,v 1.56 2006/04/18 15:16:55 flz Exp $ # # Copyright (c) 1997-2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -245,7 +245,9 @@ # If interpreter != ".", read the first line of procname, remove the # leading #!, normalise whitespace, append procname, and attempt to # match that against each command, either as is, or with extra words -# at the end. +# at the end. As an alternative, to deal with interpreted daemons +# using perl, the basename of the interpreter plus a colon is also +# tried as the prefix to procname. # _find_processes() { @@ -265,9 +267,10 @@ warn "\$command_interpreter $_interpreter != $1" fi _interp="$* $_procname" # cleanup spaces, add _procname + _interpbn=${1##*/} _fp_args='_argv' _fp_match='case "$_argv" in - ${_interp}|"${_interp} "*)' + ${_interp}|"${_interp} "*|"${_interpbn}: ${_procname}"*)' else # a normal daemon _procnamebn=${_procname##*/} _fp_args='_arg0 _argv' @@ -1119,8 +1122,6 @@ fi } -_rc_subr_loaded=: - # make_symlink src link # Make a symbolic link 'link' to src from basedir. If the # directory in which link is to be created does not exist @@ -1460,3 +1461,5 @@ } fi + +_rc_subr_loaded=: ==== //depot/projects/soc2005/nsswitch_cached/src/include/rpc/rpcent.h#3 (text+ko) ==== @@ -53,11 +53,10 @@ }; __BEGIN_DECLS -extern int getrpcbyname_r(const char *, struct rpcent *, char *, size_t, - struct rpcent **); -extern int getrpcbynumber_r(int, struct rpcent *, char *, size_t, - struct rpcent **); -extern int getrpcent_r(struct rpcent *, char *, size_t, struct rpcent **); +extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *, char *, + int); +extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int); +extern struct rpcent *getrpcent_r(struct rpcent *, char *, int); /* These interfaces are currently implemented through nsswitch and MT-safe */ extern struct rpcent *getrpcbyname(char *); ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/gen/wordexp.3#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/libc/gen/wordexp.3,v 1.8 2004/07/28 15:43:33 tjr Exp $ +.\" $FreeBSD: src/lib/libc/gen/wordexp.3,v 1.9 2006/04/18 21:37:24 ceri Exp $ .\" .Dd July 29, 2004 .Dt WORDEXP 3 @@ -167,7 +167,7 @@ wordexp_t we; wordexp("${EDITOR:-vi} *.c /etc/motd", &we, 0); -execvp(we->we_wordv[0], we->we_wordv); +execvp(we.we_wordv[0], we.we_wordv); .Ed .Sh DIAGNOSTICS Diagnostic messages from the shell are written to the standard error output ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/jexec/Makefile#3 (text+ko) ==== @@ -1,7 +1,9 @@ -# $FreeBSD: src/usr.sbin/jexec/Makefile,v 1.1 2003/04/09 03:04:12 mike Exp $ +# $FreeBSD: src/usr.sbin/jexec/Makefile,v 1.2 2006/04/19 10:12:10 delphij Exp $ PROG= jexec MAN= jexec.8 +DPADD= ${LIBUTIL} +LDADD= -lutil WARNS?= 6 .include ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/jexec/jexec.8#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/usr.sbin/jexec/jexec.8,v 1.2 2003/05/31 18:24:40 ru Exp $ +.\" $FreeBSD: src/usr.sbin/jexec/jexec.8,v 1.3 2006/04/19 10:12:10 delphij Exp $ .\" -.Dd April 8, 2003 +.Dd April 19, 2006 .Dt JEXEC 8 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nd "execute a command inside an existing jail" .Sh SYNOPSIS .Nm +.Op Fl u Ar username | Fl U Ar username .Ar jid command ... .Sh DESCRIPTION The @@ -41,6 +42,17 @@ .Ar command inside the jail identified by .Ar jid . +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl u Ar username +The user name from host environment as whom the +.Ar command +should run. +.It Fl U Ar username +The user name from jailed environment as whom the +.Ar command +should run. .Sh SEE ALSO .Xr jail_attach 2 , .Xr jail 8 , ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/jexec/jexec.c#3 (text+ko) ==== @@ -23,33 +23,91 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.sbin/jexec/jexec.c,v 1.2 2003/07/04 19:14:27 bmilekic Exp $ + * $FreeBSD: src/usr.sbin/jexec/jexec.c,v 1.3 2006/04/19 10:12:10 delphij Exp $ */ #include #include #include +#include +#include #include #include +#include #include static void usage(void); +#define GET_USER_INFO do { \ + pwd = getpwnam(username); \ + if (pwd == NULL) { \ + if (errno) \ + err(1, "getpwnam: %s", username); \ + else \ + errx(1, "%s: no such user", username); \ + } \ + lcap = login_getpwclass(pwd); \ + if (lcap == NULL) \ + err(1, "getpwclass: %s", username); \ + ngroups = NGROUPS; \ + if (getgrouplist(username, pwd->pw_gid, groups, &ngroups) != 0) \ + err(1, "getgrouplist: %s", username); \ +} while (0) + int main(int argc, char *argv[]) { int jid; + login_cap_t *lcap = NULL; + struct passwd *pwd = NULL; + gid_t groups[NGROUPS]; + int ch, ngroups, uflag, Uflag; + char *username; + ch = uflag = Uflag = 0; + username = NULL; - if (argc < 3) + while ((ch = getopt(argc, argv, "u:U:")) != -1) { + switch (ch) { + case 'u': + username = optarg; + uflag = 1; + break; + case 'U': + username = optarg; + Uflag = 1; + break; + default: + usage(); + } + } + argc -= optind; + argv += optind; + if (argc < 2) + usage(); + if (uflag && Uflag) usage(); - jid = (int)strtol(argv[1], NULL, 10); + if (uflag) + GET_USER_INFO; + jid = (int)strtol(argv[0], NULL, 10); if (jail_attach(jid) == -1) err(1, "jail_attach(): %d", jid); if (chdir("/") == -1) err(1, "chdir(): /"); - if (execvp(argv[2], argv + 2) == -1) - err(1, "execvp(): %s", argv[2]); + if (username != NULL) { + if (Uflag) + GET_USER_INFO; + if (setgroups(ngroups, groups) != 0) + err(1, "setgroups"); + if (setgid(pwd->pw_gid) != 0) + err(1, "setgid"); + if (setusercontext(lcap, pwd, pwd->pw_uid, + LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN) != 0) + err(1, "setusercontext"); + login_close(lcap); + } + if (execvp(argv[1], argv + 1) == -1) + err(1, "execvp(): %s", argv[1]); exit(0); } @@ -57,6 +115,8 @@ usage(void) { - fprintf(stderr, "usage: jexec jid command [...]\n"); + fprintf(stderr, "%s%s\n", + "usage: jexec [-u username | -U username]", + " jid command [...]"); exit(1); } ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c#7 (text+ko) ==== @@ -11,7 +11,7 @@ * * See README and COPYING for more details. * - * $FreeBSD: src/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c,v 1.11 2006/04/17 00:17:29 sam Exp $ + * $FreeBSD: src/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c,v 1.12 2006/04/20 05:03:21 sam Exp $ */ #include @@ -430,6 +430,9 @@ else authmode = IEEE80211_AUTH_OPEN; + wpa_printf(MSG_DEBUG, "%s alg 0x%x authmode %u", + __func__, auth_alg, authmode); + return set80211param(drv, IEEE80211_IOC_AUTHMODE, authmode); } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 16:00:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 508DE16A406; Sat, 22 Apr 2006 16:00:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1658916A401 for ; Sat, 22 Apr 2006 16:00:10 +0000 (UTC) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1C3B43D45 for ; Sat, 22 Apr 2006 16:00:09 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MG09Vj050864 for ; Sat, 22 Apr 2006 16:00:09 GMT (envelope-from soc-bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MG09EI050858 for perforce@freebsd.org; Sat, 22 Apr 2006 16:00:09 GMT (envelope-from soc-bushman@freebsd.org) Date: Sat, 22 Apr 2006 16:00:09 GMT Message-Id: <200604221600.k3MG09EI050858@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-bushman@freebsd.org using -f From: soc-bushman To: Perforce Change Reviews Cc: Subject: PERFORCE change 95880 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 16:00:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=95880 Change 95880 by soc-bushman@soc-bushman_stinger on 2006/04/22 15:59:15 cached line added to the default rc.conf - with "NO" as default value Affected files ... .. //depot/projects/soc2005/nsswitch_cached/src/etc/defaults/rc.conf#4 edit Differences ... ==== //depot/projects/soc2005/nsswitch_cached/src/etc/defaults/rc.conf#4 (text+ko) ==== @@ -472,6 +472,7 @@ auditd_enable="NO" # Run the audit daemon. auditd_flags="" # Which options to pass to the audit daemon. +cached_enable="NO" # Run the nsswitch caching daemon cron_enable="YES" # Run the periodic job daemon. cron_program="/usr/sbin/cron" # Which cron executable to run (if enabled). cron_dst="YES" # Handle DST transitions intelligently (YES/NO) From owner-p4-projects@FreeBSD.ORG Sat Apr 22 16:06:20 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 06DBB16A425; Sat, 22 Apr 2006 16:06:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C003316A423 for ; Sat, 22 Apr 2006 16:06:19 +0000 (UTC) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E31CF43D4C for ; Sat, 22 Apr 2006 16:06:17 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MG6HFc054882 for ; Sat, 22 Apr 2006 16:06:17 GMT (envelope-from soc-bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MG6Hpm054879 for perforce@freebsd.org; Sat, 22 Apr 2006 16:06:17 GMT (envelope-from soc-bushman@freebsd.org) Date: Sat, 22 Apr 2006 16:06:17 GMT Message-Id: <200604221606.k3MG6Hpm054879@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-bushman@freebsd.org using -f From: soc-bushman To: Perforce Change Reviews Cc: Subject: PERFORCE change 95881 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 16:06:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=95881 Change 95881 by soc-bushman@soc-bushman_stinger on 2006/04/22 16:05:34 branches integrated Affected files ... .. //depot/projects/soc2005/nsswitch_cached/src/etc/defaults/devfs.rules#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/etc/rc.bsdextended#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/include/stdio.h#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/Makefile.inc#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/Symbol.map#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/fclose.3#3 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/fcloseall.c#1 branch .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/local.h#5 integrate .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/sys/mmap.2#6 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/sysinstall/help/register.hlp#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/sysinstall/usb.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/usbd/Makefile#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/usbd/usbd.8#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/usbd/usbd.c#3 delete .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/usbd/usbd.conf.5#3 delete Differences ... ==== //depot/projects/soc2005/nsswitch_cached/src/etc/defaults/devfs.rules#2 (text+ko) ==== @@ -1,6 +1,6 @@ # # The following are some default rules for devfs(5) mounts. -# The format is very simple. Empty lines and lines begining +# The format is very simple. Empty lines and lines beginning # with a hash '#' are ignored. If the hash mark occurs anywhere # other than the beginning of a line, it and any subsequent # characters will be ignored. A line in between brackets '[]' @@ -10,10 +10,10 @@ # passed to the devfs(8) command. These will be passed # "as-is" to the devfs(8) command with the exception that # any references to other rulesets will be expanded first. These -# references must include a dollar sign '$' in-front of the +# references must include a dollar sign '$' in front of the # name to be expanded properly. # -# $FreeBSD: src/etc/defaults/devfs.rules,v 1.3 2004/01/22 20:53:15 cperciva Exp $ +# $FreeBSD: src/etc/defaults/devfs.rules,v 1.4 2006/04/22 13:42:49 brueffer Exp $ # # Very basic and secure ruleset: Hide everything. ==== //depot/projects/soc2005/nsswitch_cached/src/etc/rc.bsdextended#2 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.bsdextended,v 1.1 2004/09/29 00:12:28 trhodes Exp $ +# $FreeBSD: src/etc/rc.bsdextended,v 1.2 2006/04/22 11:02:44 trhodes Exp $ # #### @@ -48,34 +48,25 @@ #### # WARNING: recommended reading is the handbook's MAC -# chapter and the ugidfw(8) -# manual page. You can lock yourself out of the system -# very quickly by setting incorrect values here. +# chapter and the ugidfw(8) manual page. You can +# lock yourself out of the system very quickly by setting +# incorrect values here. These are only examples. #### #### -# Set the value of 'x' to system users. This would be nice but it -# does not get the \n proper. Work around is used below. -#x=`awk -F: '($3 >= 1001) && ($3 != 65534) { print $1 }' /etc/passwd`; -#l=`awk -F: '($3 >= 1001) && ($3 != 65534) { print $3 }' /etc/passwd`; -#### - -#### # Build a generic list of rules here, these should be # modified before using this script. -# ugidfw add 1 subject uid USER1 object uid USER2 mode n -# ugidfw add 2 subject gid USER1 object gid USER2 mode n # # For apache to read user files, the ruleadd must give # it permissions by default. #### -${CMD} add subject uid 80 object not uid 80 mode rxws; -${CMD} add subject gid 80 object not gid 80 mode rxws; +#${CMD} add subject uid 80 object not uid 80 mode rxws; +#${CMD} add subject gid 80 object not gid 80 mode rxws; #### # majordomo compat: #${CMD} add subject uid 54 object not uid 54 mode rxws; -${CMD} add subject gid 26 object gid 54 mode rxws; +#${CMD} add subject gid 26 object gid 54 mode rxws; #### # This is for root: @@ -83,14 +74,9 @@ ${CMD} add subject gid 0 object not gid 0 mode arxws; #### -# And for mailnull: -${CMD} add subject uid 26 object not uid 26 mode rxws; -${CMD} add subject gid 26 object not gid 26 mode rxws; - -#### # And for majordomo: -${CMD} add subject uid 54 object not uid 54 mode rxws; -${CMD} add subject gid 54 object not gid 54 mode rxws; +#${CMD} add subject uid 54 object not uid 54 mode rxws; +#${CMD} add subject gid 54 object not gid 54 mode rxws; #### # And for bin: @@ -99,8 +85,8 @@ #### # And for mail/pop: -${CMD} add subject uid 68 object not uid 68 mode rxws; -${CMD} add subject gid 6 object not gid 6 mode arxws; +#${CMD} add subject uid 68 object not uid 68 mode rxws; +#${CMD} add subject gid 6 object not gid 6 mode arxws; #### # And for smmsp: @@ -114,13 +100,13 @@ #### # For cyrus: -${CMD} add subject uid 60 object not uid 60 mode rxws; -${CMD} add subject gid 60 object not gid 60 mode rxws; +#${CMD} add subject uid 60 object not uid 60 mode rxws; +#${CMD} add subject gid 60 object not gid 60 mode rxws; #### # For stunnel: -${CMD} add subject uid 1018 object not uid 1018 mode rxws; -${CMD} add subject gid 1018 object not gid 1018 mode rxws; +#${CMD} add subject uid 1018 object not uid 1018 mode rxws; +#${CMD} add subject gid 1018 object not gid 1018 mode rxws; #### # For the nobody account: @@ -136,12 +122,6 @@ done; #### -# Work around majordomo problem where gid is `4'. -for x in `awk -F: '($3 >= 1001) && ($3 != 65534) { print $1 }' /etc/passwd`; - do ${CMD} add subject uid $x object gid 4 mode arwxs; -done; - -#### # Use some script to get a list of users and # add all users to mode n for all other users. This # will isolate all users from other user home directories while ==== //depot/projects/soc2005/nsswitch_cached/src/include/stdio.h#3 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)stdio.h 8.5 (Berkeley) 4/29/95 - * $FreeBSD: src/include/stdio.h,v 1.57 2006/01/26 20:53:40 stefanf Exp $ + * $FreeBSD: src/include/stdio.h,v 1.58 2006/04/22 15:10:11 deischen Exp $ */ #ifndef _STDIO_H_ @@ -327,6 +327,7 @@ #if __BSD_VISIBLE int asprintf(char **, const char *, ...) __printflike(2, 3); char *ctermid_r(char *); +void fcloseall(void); char *fgetln(FILE *, size_t *); __const char *fmtcheck(const char *, const char *) __format_arg(2); int fpurge(FILE *); ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/Makefile.inc#5 (text+ko) ==== @@ -1,12 +1,12 @@ # @(#)Makefile.inc 8.3 (Berkeley) 4/17/94 -# $FreeBSD: src/lib/libc/stdio/Makefile.inc,v 1.36 2006/03/13 01:14:59 deischen Exp $ +# $FreeBSD: src/lib/libc/stdio/Makefile.inc,v 1.37 2006/04/22 15:09:15 deischen Exp $ # stdio sources .PATH: ${.CURDIR}/stdio -SRCS+= _flock_stub.c asprintf.c clrerr.c fclose.c fdopen.c feof.c ferror.c \ - fflush.c fgetc.c fgetln.c fgetpos.c fgets.c fgetwc.c fgetwln.c \ - fgetws.c \ +SRCS+= _flock_stub.c asprintf.c clrerr.c fclose.c fcloseall.c fdopen.c \ + feof.c ferror.c fflush.c fgetc.c fgetln.c fgetpos.c fgets.c fgetwc.c \ + fgetwln.c fgetws.c \ fileno.c findfp.c flags.c fopen.c fprintf.c fpurge.c fputc.c fputs.c \ fputwc.c fputws.c fread.c freopen.c fscanf.c fseek.c fsetpos.c \ ftell.c funopen.c fvwrite.c fwalk.c fwide.c fwprintf.c fwscanf.c \ @@ -36,6 +36,7 @@ printf.3 putc.3 putwc.3 remove.3 scanf.3 setbuf.3 stdio.3 tmpnam.3 \ ungetc.3 ungetwc.3 wprintf.3 wscanf.3 +MLINKS+=fclose.3 fcloseall.3 MLINKS+=ferror.3 ferror_unlocked.3 \ ferror.3 clearerr.3 ferror.3 clearerr_unlocked.3 \ ferror.3 feof.3 ferror.3 feof_unlocked.3 \ ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/Symbol.map#3 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libc/stdio/Symbol.map,v 1.2 2006/03/30 04:37:08 deischen Exp $ +# $FreeBSD: src/lib/libc/stdio/Symbol.map,v 1.4 2006/04/22 15:11:33 deischen Exp $ FBSD_1.0 { flockfile; @@ -7,6 +7,7 @@ asprintf; clearerr; fclose; + fcloseall; fdopen; feof; ferror; @@ -135,7 +136,6 @@ }; FBSDprivate { - _cleanup; # To be replaced with fcloseall(). _flockfile; _flockfile_debug_stub; _flockfile_debug; ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/fclose.3#3 (text+ko) ==== @@ -34,13 +34,14 @@ .\" SUCH DAMAGE. .\" .\" @(#)fclose.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdio/fclose.3,v 1.12 2002/12/18 12:45:10 ru Exp $ +.\" $FreeBSD: src/lib/libc/stdio/fclose.3,v 1.13 2006/04/22 15:09:15 deischen Exp $ .\" .Dd June 4, 1993 .Dt FCLOSE 3 .Os .Sh NAME -.Nm fclose +.Nm fclose , +.Nm fcloseall .Nd close a stream .Sh LIBRARY .Lb libc @@ -48,6 +49,8 @@ .In stdio.h .Ft int .Fn fclose "FILE *stream" +.Ft void +.Fn fcloseall void .Sh DESCRIPTION The .Fn fclose @@ -58,6 +61,12 @@ If the stream was being used for output, any buffered data is written first, using .Xr fflush 3 . +.Pp +The +.Fn fcloseall +function calls +.Fn fclose +on all open streams. .Sh RETURN VALUES Upon successful completion 0 is returned. Otherwise, @@ -99,3 +108,8 @@ function conforms to .St -isoC . +.Pp +The +.Fn fcloseall +function first appeared in +.Fx 7.0 . ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/stdio/local.h#5 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)local.h 8.3 (Berkeley) 7/3/94 - * $FreeBSD: src/lib/libc/stdio/local.h,v 1.28 2005/12/16 02:50:53 davidxu Exp $ + * $FreeBSD: src/lib/libc/stdio/local.h,v 1.29 2006/04/22 15:09:15 deischen Exp $ */ #include /* for off_t */ @@ -53,6 +53,7 @@ extern int _ftello(FILE *, fpos_t *); extern int _fseeko(FILE *, off_t, int, int); extern int __fflush(FILE *fp); +extern void __fcloseall(void); extern wint_t __fgetwc(FILE *); extern wint_t __fputwc(wchar_t, FILE *); extern int __sflush(FILE *); ==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/sys/mmap.2#6 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 -.\" $FreeBSD: src/lib/libc/sys/mmap.2,v 1.53 2006/03/23 23:37:06 peter Exp $ +.\" $FreeBSD: src/lib/libc/sys/mmap.2,v 1.54 2006/04/21 07:22:55 trhodes Exp $ .\" -.Dd November 17, 2001 +.Dd April 21, 2006 .Dt MMAP 2 .Os .Sh NAME @@ -311,12 +311,6 @@ was specified and the .Fa fd argument was not -1. -.It Bq Er EINVAL -.Dv MAP_ANON -has not been specified and -.Fa fd -did not reference a regular or character special file. -.It Bq Er EINVAL The .Fa offset argument @@ -324,6 +318,11 @@ (See .Sx BUGS below.) +.It Bq Er ENODEV +.Dv MAP_ANON +has not been specified and +.Fa fd +did not reference a regular or character special file. .It Bq Er ENOMEM .Dv MAP_FIXED was specified and the From owner-p4-projects@FreeBSD.ORG Sat Apr 22 19:27:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 41DF316A405; Sat, 22 Apr 2006 19:27:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BDD216A403 for ; Sat, 22 Apr 2006 19:27:24 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB58A43D4C for ; Sat, 22 Apr 2006 19:27:23 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MJRNte073565 for ; Sat, 22 Apr 2006 19:27:23 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MJRNFO073562 for perforce@freebsd.org; Sat, 22 Apr 2006 19:27:23 GMT (envelope-from marcel@freebsd.org) Date: Sat, 22 Apr 2006 19:27:23 GMT Message-Id: <200604221927.k3MJRNFO073562@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 Cc: Subject: PERFORCE change 95891 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 19:27:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=95891 Change 95891 by marcel@marcel_nfs on 2006/04/22 19:26:24 o Wait for the DSR to be asserted before doing anything else. o Bump the default speed to 115200. I'm not testing the Z8530 as much nowadays. Affected files ... .. //depot/projects/uart/dev/uart/uarttest.c#5 edit Differences ... ==== //depot/projects/uart/dev/uart/uarttest.c#5 (text+ko) ==== @@ -85,6 +85,10 @@ ssize_t count, wc; int sig; + ioctl(fd, TIOCMGET, &sig); + while (!(sig & TIOCM_DSR)) + ioctl(fd, TIOCMGET, &sig); + for (count = 0; count < sizeof(buffer); count++) buffer[count] = count; @@ -102,10 +106,9 @@ printf("dte: %u bytes transmitted\n", count); ioctl(fd, TIOCDRAIN); - do { - sleep(1); + ioctl(fd, TIOCMGET, &sig); + while (sig & TIOCM_DSR) ioctl(fd, TIOCMGET, &sig); - } while (sig & TIOCM_DSR); } static void @@ -114,6 +117,10 @@ ssize_t count, rc; int delta, diff, sig; + ioctl(fd, TIOCMGET, &sig); + while (sig & TIOCM_DSR) + ioctl(fd, TIOCMGET, &sig); + count = 0; delta = 0; errno = 0; @@ -191,7 +198,7 @@ tcgetattr(fd, &t0); t1 = t0; cfmakeraw(&t1); - cfsetspeed(&t1, B19200); + cfsetspeed(&t1, B115200); switch (how) { case AS_DCE: t1.c_cflag |= CRTS_IFLOW; From owner-p4-projects@FreeBSD.ORG Sat Apr 22 22:16:52 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E0DD816A404; Sat, 22 Apr 2006 22:16:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A087616A416 for ; Sat, 22 Apr 2006 22:16:51 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F300143D64 for ; Sat, 22 Apr 2006 22:16:48 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MMGm3a076051 for ; Sat, 22 Apr 2006 22:16:48 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MMGmrU076045 for perforce@freebsd.org; Sat, 22 Apr 2006 22:16:48 GMT (envelope-from marcel@freebsd.org) Date: Sat, 22 Apr 2006 22:16:48 GMT Message-Id: <200604222216.k3MMGmrU076045@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 Cc: Subject: PERFORCE change 95896 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 22:16:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=95896 Change 95896 by marcel@marcel_nfs on 2006/04/22 22:15:54 Calculate the divisor before we set the DLAB bit. We can bail out, and would otherwise leave DLAB set. Affected files ... .. //depot/projects/uart/dev/uart/uart_dev_ns8250.c#41 edit Differences ... ==== //depot/projects/uart/dev/uart/uart_dev_ns8250.c#41 (text+ko) ==== @@ -194,11 +194,11 @@ /* Set baudrate. */ if (baudrate > 0) { - uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); - uart_barrier(bas); divisor = ns8250_divisor(bas->rclk, baudrate); if (divisor == 0) return (EINVAL); + uart_setreg(bas, REG_LCR, lcr | LCR_DLAB); + uart_barrier(bas); uart_setdreg(bas, REG_DL, divisor); uart_barrier(bas); } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:26:17 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 650DE16A407; Sat, 22 Apr 2006 23:26:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CBB916A400 for ; Sat, 22 Apr 2006 23:26:17 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09A8743D48 for ; Sat, 22 Apr 2006 23:26:17 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNQGip014771 for ; Sat, 22 Apr 2006 23:26:16 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNQGs9014768 for perforce@freebsd.org; Sat, 22 Apr 2006 23:26:16 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:26:16 GMT Message-Id: <200604222326.k3MNQGs9014768@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95900 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:26:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=95900 Change 95900 by jb@jb_freebsd2 on 2006/04/22 23:25:30 When cloning the device, clone the credentials too. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_clone.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_clone.c#2 (text+ko) ==== @@ -43,7 +43,7 @@ /* Clone the device to the new minor number. */ if (clone_create(&dtrace_clones, &dtrace_cdevsw, &u, dev, 0) != 0) /* Create the /dev/dtraceNN entry. */ - *dev = make_dev(&dtrace_cdevsw, unit2minor(u), + *dev = make_dev_cred(&dtrace_cdevsw, unit2minor(u), cred, UID_ROOT, GID_WHEEL, 0600, "dtrace%d", u); if (*dev != NULL) { dev_ref(*dev); From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:28:20 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 574A116A403; Sat, 22 Apr 2006 23:28:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34D7616A400 for ; Sat, 22 Apr 2006 23:28:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F41A443D48 for ; Sat, 22 Apr 2006 23:28:19 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNSJpl014841 for ; Sat, 22 Apr 2006 23:28:19 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNSJh5014838 for perforce@freebsd.org; Sat, 22 Apr 2006 23:28:19 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:28:19 GMT Message-Id: <200604222328.k3MNSJh5014838@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95901 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:28:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=95901 Change 95901 by jb@jb_freebsd2 on 2006/04/22 23:27:57 If the module failed to unload because it is still busy, don't try to deregister the event handler the next time around. Doing that causes a panic. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#4 (text+ko) ==== @@ -40,11 +40,18 @@ break; case MOD_UNLOAD: - /* De-register the device cloning event handler. */ - EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); + /* + * Check if there is still an event handler callback + * registered. + */ + if (eh_tag != 0) { + /* De-register the device cloning event handler. */ + EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); + eh_tag = 0; - /* Stop device cloning. */ - clone_cleanup(&dtrace_clones); + /* Stop device cloning. */ + clone_cleanup(&dtrace_clones); + } error = dtrace_unload(); break; From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:30:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8303816A428; Sat, 22 Apr 2006 23:30:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48CF016A426 for ; Sat, 22 Apr 2006 23:30:23 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E7FA43D48 for ; Sat, 22 Apr 2006 23:30:23 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNUMhq015124 for ; Sat, 22 Apr 2006 23:30:22 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNUMjP015114 for perforce@freebsd.org; Sat, 22 Apr 2006 23:30:22 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:30:22 GMT Message-Id: <200604222330.k3MNUMjP015114@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95902 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:30:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=95902 Change 95902 by jb@jb_freebsd2 on 2006/04/22 23:29:54 Create/destroy the dtrace state when opening/closing the cloned device. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_close.c#3 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_open.c#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_close.c#3 (text+ko) ==== @@ -27,13 +27,40 @@ dtrace_close(struct cdev *dev __unused, int flags, int fmt __unused, struct thread *td) { - /* Check if this is a cloned device. */ - if (minor(dev) > 0) { - /* XXX Do the state destruction cleanup here. */ + dtrace_state_t *state = dev->si_drv1; + + /* Check if this is not a cloned device. */ + if (minor(dev) == 0) + return (0); +printf("%s: struct cdev %p curthread %p si_drv0 %u\n",__FUNCTION__,dev,curthread,dev->si_drv0); + + mutex_enter(&cpu_lock); + mutex_enter(&dtrace_lock); + + if (state != NULL) { + if (state->dts_anon) { + /* + * There is anonymous state. + * Destroy that first. + */ + ASSERT(dtrace_anon.dta_state == NULL); + dtrace_state_destroy(state->dts_anon); + } + + dtrace_state_destroy(state); - /* Destroy the cloned device. */ - destroy_dev(dev); + free(state, M_DTRACE); + dev->si_drv1 = NULL; } + mutex_exit(&dtrace_lock); + mutex_exit(&cpu_lock); + ASSERT(dtrace_opens > 0); + if (--dtrace_opens == 0) + (void) kdi_dtrace_set(KDI_DTSET_DTRACE_DEACTIVATE); + + /* Destroy the cloned device. */ + destroy_dev(dev); + return (0); } ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_open.c#3 (text+ko) ==== @@ -26,7 +26,11 @@ static int dtrace_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { + dtrace_state_t *state = NULL; int error = 0; + uint32_t priv; + uid_t uid; + zoneid_t zoneid; /* * The first minor device is the one that is cloned so there is @@ -34,7 +38,58 @@ */ if (minor(dev) == 0) return 0; +printf("%s: struct cdev %p curthread %p si_drv0 %u si_cred %p\n",__FUNCTION__,dev,curthread,dev->si_drv0,dev->si_cred); -printf("%s: struct cdev %p curthread %p si_drv0 %u\n",__FUNCTION__,dev,curthread,dev->si_drv0); + /* + * If no DTRACE_PRIV_* bits are set in the credential, then the + * caller lacks sufficient permission to do anything with DTrace. + */ + dtrace_cred2priv(dev->si_cred, &priv, &uid, &zoneid); + if (priv == DTRACE_PRIV_NONE) { + /* Destroy the cloned device. */ + destroy_dev(dev); + return (EACCES); + } + + /* + * Ask all providers to provide all their probes. + */ + mutex_enter(&dtrace_provider_lock); + dtrace_probe_provide(NULL, NULL); + mutex_exit(&dtrace_provider_lock); + + mutex_enter(&cpu_lock); + mutex_enter(&dtrace_lock); + dtrace_opens++; + dtrace_membar_producer(); + + /* + * If the kernel debugger is active (that is, if the kernel debugger + * modified text in some way), we won't allow the open. + */ + if (kdi_dtrace_set(KDI_DTSET_DTRACE_ACTIVATE) != 0) { + dtrace_opens--; + mutex_exit(&cpu_lock); + mutex_exit(&dtrace_lock); + + /* Destroy the cloned device. */ + destroy_dev(dev); + return (EBUSY); + } + + state = dtrace_state_create(dev); + mutex_exit(&cpu_lock); + + if (state == NULL) { + if (--dtrace_opens == 0) + (void) kdi_dtrace_set(KDI_DTSET_DTRACE_DEACTIVATE); + mutex_exit(&dtrace_lock); + + /* Destroy the cloned device. */ + destroy_dev(dev); + return (EAGAIN); + } + + mutex_exit(&dtrace_lock); return (error); } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:31:25 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 71E6916A406; Sat, 22 Apr 2006 23:31:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 393F216A401 for ; Sat, 22 Apr 2006 23:31:25 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C10C443D46 for ; Sat, 22 Apr 2006 23:31:24 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNVOWB016043 for ; Sat, 22 Apr 2006 23:31:24 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNVOP4016037 for perforce@freebsd.org; Sat, 22 Apr 2006 23:31:24 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:31:24 GMT Message-Id: <200604222331.k3MNVOP4016037@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95903 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:31:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=95903 Change 95903 by jb@jb_freebsd2 on 2006/04/22 23:30:37 Another day. Another hack. Or two. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.c#3 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.c#3 (text+ko) ==== @@ -180,3 +180,8 @@ { return 0; } +int +kdi_dtrace_set(kdi_dtrace_set_t a) +{ + return 0; +} ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#3 (text+ko) ==== @@ -128,3 +128,17 @@ void kmem_cache_free(kmem_cache_t *, void *); uint64_t kmem_cache_stat(kmem_cache_t *, char *); void kmem_cache_reap_now(kmem_cache_t *); + +typedef enum kdi_dtrace_set { + KDI_DTSET_DTRACE_ACTIVATE, + KDI_DTSET_DTRACE_DEACTIVATE, + KDI_DTSET_KMDB_BPT_ACTIVATE, + KDI_DTSET_KMDB_BPT_DEACTIVATE +} kdi_dtrace_set_t; + +typedef enum { + KDI_DTSTATE_DTRACE_ACTIVE, + KDI_DTSTATE_IDLE, + KDI_DTSTATE_KMDB_BPT_ACTIVE +} kdi_dtrace_state_t; +int kdi_dtrace_set(kdi_dtrace_set_t); From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:33:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2FF0B16A405; Sat, 22 Apr 2006 23:33:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB23A16A403 for ; Sat, 22 Apr 2006 23:33:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6D4A43D45 for ; Sat, 22 Apr 2006 23:33:27 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNXRu3017854 for ; Sat, 22 Apr 2006 23:33:27 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNXRk3017848 for perforce@freebsd.org; Sat, 22 Apr 2006 23:33:27 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:33:27 GMT Message-Id: <200604222333.k3MNXRk3017848@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95904 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:33:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=95904 Change 95904 by jb@jb_freebsd2 on 2006/04/22 23:33:11 On FreeBSD we need different arguments to dtrace_state_create() because we deal with struct cdev's and not dev_t's. Our credentials are obtained from struct cdev. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#10 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#10 (text+ko) ==== @@ -420,7 +420,7 @@ (act)->dta_difo->dtdo_rtype.dtdt_kind == DIF_TYPE_STRING) dtrace_dynvar_t *dtrace_dynvar(dtrace_dstate_t *, uint_t, dtrace_key_t *, size_t, dtrace_dynvar_op_t); -dtrace_state_t *dtrace_state_create(dev_t *, cred_t *); +dtrace_state_t *dtrace_state_create(struct cdev *); int dtrace_dstate_init(dtrace_dstate_t *, size_t); static char *dtrace_strdup(const char *); static dof_hdr_t *dtrace_dof_copyin(uintptr_t, int *); From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:35:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 128E716A403; Sat, 22 Apr 2006 23:35:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E295A16A400 for ; Sat, 22 Apr 2006 23:35:30 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD40143D45 for ; Sat, 22 Apr 2006 23:35:30 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNZUX4019682 for ; Sat, 22 Apr 2006 23:35:30 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNZUWN019676 for perforce@freebsd.org; Sat, 22 Apr 2006 23:35:30 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:35:30 GMT Message-Id: <200604222335.k3MNZUWN019676@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95905 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:35:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=95905 Change 95905 by jb@jb_freebsd2 on 2006/04/22 23:35:09 Comment out a few things for now. Anonymous states will need special handling. At the moment dtrace_state_create() will panic if you don't feed it a struct cdev pointer. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_anon.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_anon.c#2 (text+ko) ==== @@ -51,18 +51,24 @@ * this fails (e.g. because the debugger has modified text in * some way), we won't continue with the processing. */ +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD if (kdi_dtrace_set(KDI_DTSET_DTRACE_ACTIVATE) != 0) { cmn_err(CE_NOTE, "kernel debugger active; anonymous " "enabling ignored."); dtrace_dof_destroy(dof); break; } +#endif /* * If we haven't allocated an anonymous state, we'll do so now. */ if ((state = dtrace_anon.dta_state) == NULL) { +printf("%s:%s(%d): need to create a state without a struct cdev!\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD state = dtrace_state_create(NULL, NULL); +#endif dtrace_anon.dta_state = state; if (state == NULL) { From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:37:34 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2B87C16A407; Sat, 22 Apr 2006 23:37:34 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 090C316A405 for ; Sat, 22 Apr 2006 23:37:34 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBBD843D45 for ; Sat, 22 Apr 2006 23:37:33 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNbXZm021202 for ; Sat, 22 Apr 2006 23:37:33 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNbXTh021196 for perforce@freebsd.org; Sat, 22 Apr 2006 23:37:33 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:37:33 GMT Message-Id: <200604222337.k3MNbXTh021196@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95906 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:37:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=95906 Change 95906 by jb@jb_freebsd2 on 2006/04/22 23:37:01 Get dtrace_state_create() and dtrace_state_destroy() working, except in the anonymous case. More work is required for that. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_state.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_state.c#2 (text+ko) ==== @@ -176,10 +176,19 @@ } dtrace_state_t * +#if defined(sun) dtrace_state_create(dev_t *devp, cred_t *cr) +#else +dtrace_state_create(struct cdev *dev) +#endif { - minor_t minor; +#if defined(sun) + minor_t m; major_t major; +#else + cred_t *cr = dev->si_cred; + int m = minor(dev); +#endif char c[30]; dtrace_state_t *state; dtrace_optval_t *opt; @@ -188,31 +197,43 @@ ASSERT(MUTEX_HELD(&dtrace_lock)); ASSERT(MUTEX_HELD(&cpu_lock)); - minor = (minor_t)(uintptr_t)vmem_alloc(dtrace_minor, 1, +#if defined(sun) + m = (minor_t)(uintptr_t)vmem_alloc(dtrace_minor, 1, VM_BESTFIT | VM_SLEEP); - if (ddi_soft_state_zalloc(dtrace_softstate, minor) != DDI_SUCCESS) { - vmem_free(dtrace_minor, (void *)(uintptr_t)minor, 1); + if (ddi_soft_state_zalloc(dtrace_softstate, m) != DDI_SUCCESS) { + vmem_free(dtrace_minor, (void *)(uintptr_t)m, 1); return (NULL); } - state = ddi_get_soft_state(dtrace_softstate, minor); + state = ddi_get_soft_state(dtrace_softstate, m); state->dts_epid = DTRACE_EPIDNONE + 1; +#else + /* Allocate memory for the state. */ + state = malloc(sizeof(dtrace_state_t), M_DTRACE, M_WAITOK | M_ZERO); - (void) snprintf(c, sizeof (c), "dtrace_aggid_%d", minor); + /* Save the pointer to the state. */ + dev->si_drv1 = state; +#endif + + (void) snprintf(c, sizeof (c), "dtrace_aggid_%d", m); state->dts_aggid_arena = vmem_create(c, (void *)1, UINT32_MAX, 1, NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER); +#if defined(sun) if (devp != NULL) { major = getemajor(*devp); } else { major = ddi_driver_major(dtrace_devi); } - state->dts_dev = makedevice(major, minor); + state->dts_dev = makedevice(major, m); if (devp != NULL) *devp = state->dts_dev; +#else + state->dts_dev = dev; +#endif /* * We allocate NCPU buffers. On the one hand, this can be quite @@ -222,8 +243,10 @@ */ state->dts_buffer = kmem_zalloc(bufsize, KM_SLEEP); state->dts_aggbuffer = kmem_zalloc(bufsize, KM_SLEEP); +#ifdef DOODAD state->dts_cleaner = CYCLIC_NONE; state->dts_deadman = CYCLIC_NONE; +#endif state->dts_vstate.dtvs_state = state; for (i = 0; i < DTRACEOPT_MAX; i++) @@ -307,11 +330,13 @@ * we can do destructive things to processes which * have altered credentials. */ +#ifdef DOODAD if (priv_isequalset(priv_getset(cr, PRIV_EFFECTIVE), cr->cr_zone->zone_privset)) { state->dts_cred.dcr_action |= DTRACE_CRA_PROC_DESTRUCTIVE_CREDCHG; } +#endif } /* @@ -352,11 +377,13 @@ * we can do destructive things to processes which * have altered credentials. */ +#ifdef DOODAD if (priv_isequalset(priv_getset(cr, PRIV_EFFECTIVE), cr->cr_zone->zone_privset)) { state->dts_cred.dcr_action |= DTRACE_CRA_PROC_DESTRUCTIVE_CREDCHG; } +#endif } /* @@ -499,8 +526,10 @@ dtrace_optval_t *opt = state->dts_options, sz, nspec; dtrace_speculation_t *spec; dtrace_buffer_t *buf; +#ifdef DOODAD cyc_handler_t hdlr; cyc_time_t when; +#endif int rval = 0, i, bufsize = NCPU * sizeof (dtrace_buffer_t); dtrace_icookie_t cookie; @@ -678,24 +707,36 @@ if (opt[DTRACEOPT_CLEANRATE] > dtrace_cleanrate_max) opt[DTRACEOPT_CLEANRATE] = dtrace_cleanrate_max; +#ifdef DOODAD hdlr.cyh_func = (cyc_func_t)dtrace_state_clean; hdlr.cyh_arg = state; hdlr.cyh_level = CY_LOW_LEVEL; +#endif +#ifdef DOODAD when.cyt_when = 0; when.cyt_interval = opt[DTRACEOPT_CLEANRATE]; +#endif +#ifdef DOODAD state->dts_cleaner = cyclic_add(&hdlr, &when); +#endif +#ifdef DOODAD hdlr.cyh_func = (cyc_func_t)dtrace_state_deadman; hdlr.cyh_arg = state; hdlr.cyh_level = CY_LOW_LEVEL; +#endif +#ifdef DOODAD when.cyt_when = 0; when.cyt_interval = dtrace_deadman_interval; +#endif state->dts_alive = state->dts_laststatus = dtrace_gethrtime(); +#ifdef DOODAD state->dts_deadman = cyclic_add(&hdlr, &when); +#endif state->dts_activity = DTRACE_ACTIVITY_WARMUP; @@ -706,7 +747,9 @@ * level) and to manually activate the buffer for this CPU. */ cookie = dtrace_interrupt_disable(); +#ifdef DOODAD *cpu = CPU->cpu_id; +#endif ASSERT(state->dts_buffer[*cpu].dtb_flags & DTRACEBUF_INACTIVE); state->dts_buffer[*cpu].dtb_flags &= ~DTRACEBUF_INACTIVE; @@ -878,8 +921,12 @@ { dtrace_ecb_t *ecb; dtrace_vstate_t *vstate = &state->dts_vstate; +#if defined(sun) minor_t minor = getminor(state->dts_dev); int i, bufsize = NCPU * sizeof (dtrace_buffer_t); +#else + int i; +#endif dtrace_speculation_t *spec = state->dts_speculations; int nspec = state->dts_nspeculations; uint32_t match; @@ -954,21 +1001,21 @@ for (i = 0; i < nspec; i++) dtrace_buffer_free(spec[i].dtsp_buffer); +#ifdef DOODAD if (state->dts_cleaner != CYCLIC_NONE) cyclic_remove(state->dts_cleaner); if (state->dts_deadman != CYCLIC_NONE) cyclic_remove(state->dts_deadman); +#endif dtrace_dstate_fini(&vstate->dtvs_dynvars); dtrace_vstate_fini(vstate); kmem_free(state->dts_ecbs, state->dts_necbs * sizeof (dtrace_ecb_t *)); if (state->dts_aggregations != NULL) { -#ifdef DEBUG for (i = 0; i < state->dts_naggregations; i++) ASSERT(state->dts_aggregations[i] == NULL); -#endif ASSERT(state->dts_naggregations > 0); kmem_free(state->dts_aggregations, state->dts_naggregations * sizeof (dtrace_aggregation_t *)); @@ -985,6 +1032,8 @@ dtrace_format_destroy(state); vmem_destroy(state->dts_aggid_arena); +#if defined(sun) ddi_soft_state_free(dtrace_softstate, minor); vmem_free(dtrace_minor, (void *)(uintptr_t)minor, 1); +#endif } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:39:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4F1116A411; Sat, 22 Apr 2006 23:39:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5087516A408 for ; Sat, 22 Apr 2006 23:39:37 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 10E2443D45 for ; Sat, 22 Apr 2006 23:39:37 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNdaDF022666 for ; Sat, 22 Apr 2006 23:39:36 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNdaib022660 for perforce@freebsd.org; Sat, 22 Apr 2006 23:39:36 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:39:36 GMT Message-Id: <200604222339.k3MNdaib022660@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95908 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:39:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=95908 Change 95908 by jb@jb_freebsd2 on 2006/04/22 23:39:23 For the time being, just hack the privileges to 'all'. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_util.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_util.c#2 (text+ko) ==== @@ -57,6 +57,7 @@ *uidp = crgetuid(cr); *zoneidp = crgetzoneid(cr); +#ifdef DOODAD if (PRIV_POLICY_ONLY(cr, PRIV_ALL, B_FALSE)) { priv = DTRACE_PRIV_ALL; } else { @@ -72,6 +73,9 @@ if (PRIV_POLICY_ONLY(cr, PRIV_PROC_ZONE, B_FALSE)) priv |= DTRACE_PRIV_ZONEOWNER; } +#else +priv = DTRACE_PRIV_ALL; +#endif *privp = priv; } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:48:49 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3BD4116A405; Sat, 22 Apr 2006 23:48:49 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F213716A400 for ; Sat, 22 Apr 2006 23:48:48 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD1C143D45 for ; Sat, 22 Apr 2006 23:48:48 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNmmCl025534 for ; Sat, 22 Apr 2006 23:48:48 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNmm4j025527 for perforce@freebsd.org; Sat, 22 Apr 2006 23:48:48 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:48:48 GMT Message-Id: <200604222348.k3MNmm4j025527@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95909 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:48:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=95909 Change 95909 by jb@jb_freebsd2 on 2006/04/22 23:48:04 Subtle difference in credential field names for saved uid and gid. FreeBSD doesn't have zones. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#4 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_priv.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#4 (text+ko) ==== @@ -33,6 +33,8 @@ #define delay(_a) DELAY(_a) #define vuprintf vprintf #define CRED() curthread->td_ucred +#define cr_suid cr_svuid +#define cr_sgid cr_svgid #define P2ROUNDUP(x, align) (-(-(x) & -(align))) #define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) #define TQ_SLEEP 0x00 /* Can block for memory */ ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_priv.c#2 (text+ko) ==== @@ -35,6 +35,7 @@ static int dtrace_priv_proc_common_zone(dtrace_state_t *state) { +#if defined(sun) cred_t *cr, *s_cr = state->dts_cred.dcr_cred; /* @@ -48,6 +49,9 @@ return (1); return (0); +#else + return (1); +#endif } /* @@ -57,11 +61,13 @@ static int dtrace_priv_proc_common_nocd() { +#if defined(sun) proc_t *proc; if ((proc = ttoproc(curthread)) != NULL && !(proc->p_flag & SNOCD)) return (1); +#endif return (0); } From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:49:51 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 464CC16A406; Sat, 22 Apr 2006 23:49:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DA0E16A400 for ; Sat, 22 Apr 2006 23:49:51 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A0C843D4C for ; Sat, 22 Apr 2006 23:49:50 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNnohf025584 for ; Sat, 22 Apr 2006 23:49:50 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNnoWQ025581 for perforce@freebsd.org; Sat, 22 Apr 2006 23:49:50 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:49:50 GMT Message-Id: <200604222349.k3MNnoWQ025581@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95910 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:49:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=95910 Change 95910 by jb@jb_freebsd2 on 2006/04/22 23:49:10 Work-in-progress update. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#6 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#6 (text+ko) ==== ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#5 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:54:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5615216A40D; Sat, 22 Apr 2006 23:54:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 182AB16A40A for ; Sat, 22 Apr 2006 23:54:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E19643D6E for ; Sat, 22 Apr 2006 23:53:56 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNrtO2028705 for ; Sat, 22 Apr 2006 23:53:56 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNrtW3028696 for perforce@freebsd.org; Sat, 22 Apr 2006 23:53:55 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:53:55 GMT Message-Id: <200604222353.k3MNrtW3028696@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95911 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:54:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=95911 Change 95911 by jb@jb_freebsd2 on 2006/04/22 23:53:18 Silence a few gcc unitialised variable warnings. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_speculation.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_speculation.c#2 (text+ko) ==== @@ -56,7 +56,7 @@ dtrace_speculation_t *spec; dtrace_buffer_t *src, *dest; uintptr_t daddr, saddr, dlimit; - dtrace_speculation_state_t current, new; + dtrace_speculation_state_t current, new = 0; intptr_t offs; if (which == 0) @@ -170,8 +170,10 @@ */ if (current == DTRACESPEC_ACTIVE || (current == DTRACESPEC_ACTIVEONE && new == DTRACESPEC_COMMITTING)) { +#ifdef DEBUG uint32_t rval = dtrace_cas32((uint32_t *)&spec->dtsp_state, DTRACESPEC_COMMITTING, DTRACESPEC_INACTIVE); +#endif ASSERT(rval == DTRACESPEC_COMMITTING); } @@ -192,7 +194,7 @@ dtrace_specid_t which) { dtrace_speculation_t *spec; - dtrace_speculation_state_t current, new; + dtrace_speculation_state_t current, new = 0; dtrace_buffer_t *buf; if (which == 0) @@ -354,7 +356,7 @@ dtrace_specid_t which) { dtrace_speculation_t *spec; - dtrace_speculation_state_t current, new; + dtrace_speculation_state_t current, new = 0; dtrace_buffer_t *buf; if (which == 0) From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:56:01 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B738A16A402; Sat, 22 Apr 2006 23:56:01 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7121616A400 for ; Sat, 22 Apr 2006 23:56:01 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 886B643D53 for ; Sat, 22 Apr 2006 23:55:59 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNtxRU030501 for ; Sat, 22 Apr 2006 23:55:59 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNtwsB030490 for perforce@freebsd.org; Sat, 22 Apr 2006 23:55:58 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:55:58 GMT Message-Id: <200604222355.k3MNtwsB030490@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95912 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 23:56:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=95912 Change 95912 by jb@jb_freebsd2 on 2006/04/22 23:55:10 Fix a return value to match the data type. Silence an gcc uninitialised variable warning. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_link.c#5 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_parser.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.c#4 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_program.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_provider.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_work.c#4 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_action.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_buffer.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dif.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_difo.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dof.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dynvar.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ecb.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_enabling.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_helper.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#3 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_predicate.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probe.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probekey.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probemgmt.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap.c#3 edit .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap_load.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/fasttrap/fasttrap_unload.c#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_link.c#5 (text) ==== @@ -1348,6 +1348,7 @@ s++; } +printf("%s:%s(%d) call dt_provider_lookup\n",__FUNCTION__,__FILE__,__LINE__); if ((pvp = dt_provider_lookup(dtp, pname)) == NULL) { return (dt_link_error(dtp, elf, fd, bufs, "no such provider %s", pname)); ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_parser.c#3 (text) ==== @@ -2526,6 +2526,7 @@ * If not, create a new provider and set its interface-only flag. This * flag may be cleared later by calls made to dt_probe_declare(). */ +printf("%s:%s(%d) call dt_provider_lookup\n",__FUNCTION__,__FILE__,__LINE__); if ((dnp->dn_provider = dt_provider_lookup(dtp, name)) != NULL) dnp->dn_provred = B_TRUE; else if ((dnp->dn_provider = dt_provider_create(dtp, name)) == NULL) ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.c#4 (text) ==== @@ -779,6 +779,7 @@ * Give DTrace a shot to the ribs to get it to check * out the newly created probes. */ +printf("%s:%s(%d) ioctl args can't be optional on FreeBSD!\n",__FUNCTION__,__FILE__,__LINE__); (void) dt_ioctl(dtp, DTRACEIOC_ENABLE, NULL); } ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c#3 (text) ==== @@ -102,6 +102,7 @@ dnp = dnp->dn_list; part = dnp->dn_string; +printf("%s:%s(%d) call dt_provider_lookup\n",__FUNCTION__,__FILE__,__LINE__); if ((pvp = dt_provider_lookup(dtp, name)) != NULL) { if (strcmp(part, "provider") == 0) { a = &pvp->pv_desc.dtvd_attr.dtpa_provider; @@ -218,7 +219,10 @@ } if (strcmp(cnp->dn_string, "provider") == 0) +{ +printf("%s:%s(%d) call dt_provider_lookup\n",__FUNCTION__,__FILE__,__LINE__); found = dt_provider_lookup(dtp, nnp->dn_string) != NULL; +} else if (strcmp(cnp->dn_string, "module") == 0) { dt_module_t *mp = dt_module_lookup_by_name(dtp, nnp->dn_string); found = mp != NULL && dt_module_getctf(dtp, mp) != NULL; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_program.c#3 (text) ==== @@ -156,12 +156,16 @@ void *dof; int n, err; +printf("%s: call dtrace_program_info\n",__FUNCTION__); dtrace_program_info(dtp, pgp, pip); +printf("%s: call dtrace_dof_create\n",__FUNCTION__); if ((dof = dtrace_dof_create(dtp, pgp, DTRACE_D_STRIP)) == NULL) return (-1); - n = dt_ioctl(dtp, DTRACEIOC_ENABLE, dof); +printf("%s: ioctl DTRACEIOC_ENABLE dof %p &dof %p\n",__FUNCTION__,dof,&dof); + n = dt_ioctl(dtp, DTRACEIOC_ENABLE, &dof); +printf("%s: call dtrace_dof_destroy\n",__FUNCTION__); dtrace_dof_destroy(dtp, dof); if (n == -1) { @@ -179,12 +183,14 @@ err = errno; } +printf("%s: dtrace_dof_destroy returned an error\n",__FUNCTION__); return (dt_set_errno(dtp, err)); } if (pip != NULL) pip->dpi_matches += n; +printf("%s: returns\n",__FUNCTION__); return (0); } ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_provider.c#3 (text) ==== @@ -65,6 +65,7 @@ dtrace_providerdesc_t desc; dt_provider_t *pvp; +printf("dt_provider_lookup '%s'\n",name); for (pvp = dtp->dt_provs[h]; pvp != NULL; pvp = pvp->pv_next) { if (strcmp(pvp->pv_desc.dtvd_name, name) == 0) return (pvp); @@ -78,16 +79,19 @@ bzero(&desc, sizeof (desc)); (void) strlcpy(desc.dtvd_name, name, DTRACE_PROVNAMELEN); +printf("Get the provider info...\n"); if (dt_ioctl(dtp, DTRACEIOC_PROVIDER, &desc) == -1) { (void) dt_set_errno(dtp, errno == ESRCH ? EDT_NOPROV : errno); return (NULL); } +printf("Create the provider object...\n"); if ((pvp = dt_provider_create(dtp, name)) == NULL) return (NULL); /* dt_errno is set for us */ bcopy(&desc, &pvp->pv_desc, sizeof (desc)); pvp->pv_flags |= DT_PROVIDER_IMPL; +printf("Return the provider object...\n"); return (pvp); } @@ -674,6 +678,7 @@ * If none is found and an explicit probe ID was specified, discover * that specific probe and cache its description and arguments. */ +printf("%s:%s(%d) call dt_provider_lookup in existing cache\n",__FUNCTION__,__FILE__,__LINE__); if ((pvp = dt_provider_lookup(dtp, pdp->dtpd_provider)) != NULL) { size_t keylen = dt_probe_keylen(pdp); char *key = dt_probe_key(pdp, alloca(keylen)); @@ -708,8 +713,10 @@ if ((m = dtrace_probe_iter(dtp, pdp, dt_probe_desc, &pd)) < 0) return (NULL); /* dt_errno is set for us */ +printf("%s:%s(%d) call dt_provider_lookup\n",__FUNCTION__,__FILE__,__LINE__); if ((pvp = dt_provider_lookup(dtp, pd.dtpd_provider)) == NULL) return (NULL); /* dt_errno is set for us */ +printf("%s:%s(%d) got a provider\n",__FUNCTION__,__FILE__,__LINE__); /* * If more than one probe was matched, then do not report probe @@ -758,9 +765,15 @@ * the real attributes. Otherwise grab the static declaration. */ if (pd.dtpd_id != DTRACE_IDNONE) +{ +printf("%s:%s(%d) call dt_probe_discover\n",__FUNCTION__,__FILE__,__LINE__); prp = dt_probe_discover(pvp, &pd); +} else +{ +printf("%s:%s(%d) call dt_probe_lookup\n",__FUNCTION__,__FILE__,__LINE__); prp = dt_probe_lookup(pvp, pd.dtpd_name); +} if (prp == NULL) return (NULL); /* dt_errno is set for us */ @@ -790,6 +803,7 @@ pip->dtp_arga = pap->dtpa_args; pip->dtp_argv = prp->pr_argv; pip->dtp_argc = prp->pr_argc; +printf("%s:%s(%d) return the probe pointer\n",__FUNCTION__,__FILE__,__LINE__); return (prp); } ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_work.c#4 (text) ==== @@ -187,6 +187,7 @@ if ((dof = dtrace_getopt_dof(dtp)) == NULL) return (-1); /* dt_errno has been set for us */ +printf("%s:%s(%d) ioctl DTRACEIOC_ENABLE\n",__FUNCTION__,__FILE__,__LINE__); err = dt_ioctl(dtp, DTRACEIOC_ENABLE, dof); dtrace_dof_destroy(dtp, dof); ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_action.c#2 (text+ko) ==== @@ -58,7 +58,10 @@ c[i++] = ')'; c[i] = '\0'; +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD debug_enter(c); +#endif } static void @@ -101,6 +104,8 @@ return; } +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD /* * raise() has a queue depth of 1 -- we ignore all subsequent * invocations of the raise() action. @@ -110,6 +115,7 @@ curthread->t_sig_check = 1; aston(curthread); +#endif } static void @@ -118,16 +124,21 @@ if (dtrace_destructive_disallow) return; +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD if (!curthread->t_dtrace_stop) { curthread->t_dtrace_stop = 1; curthread->t_sig_check = 1; aston(curthread); } +#endif } static void dtrace_action_chill(dtrace_mstate_t *mstate, hrtime_t val) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD hrtime_t now; volatile uint16_t *flags; cpu_t *cpu = CPU; @@ -168,12 +179,15 @@ */ mstate->dtms_present &= ~DTRACE_MSTATE_TIMESTAMP; cpu->cpu_dtrace_chilled += val; +#endif } static void dtrace_action_ustack(dtrace_mstate_t *mstate, dtrace_state_t *state, uint64_t *buf, uint64_t arg) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD int nframes = DTRACE_USTACK_NFRAMES(arg); int strsize = DTRACE_USTACK_STRSIZE(arg); uint64_t *pcs = &buf[1], *fps; @@ -282,4 +296,5 @@ out: mstate->dtms_scratch_ptr = old; +#endif } ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_buffer.c#2 (text+ko) ==== @@ -69,6 +69,8 @@ dtrace_buffer_alloc(dtrace_buffer_t *bufs, size_t size, int flags, processorid_t cpu) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD cpu_t *cp; dtrace_buffer_t *buf; @@ -140,6 +142,7 @@ buf->dtb_xamot = NULL; buf->dtb_size = 0; } while ((cp = cp->cpu_next) != cpu_list); +#endif return (ENOMEM); } ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dif.c#2 (text+ko) ==== @@ -51,6 +51,8 @@ return (mstate->dtms_arg[ndx]); case DIF_VAR_UREGS: { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD klwp_t *lwp; if (!dtrace_priv_proc(state)) @@ -63,6 +65,9 @@ } return (dtrace_getreg(lwp->lwp_regs, ndx)); +#else +return 0; +#endif } case DIF_VAR_CURTHREAD: @@ -78,8 +83,13 @@ return (mstate->dtms_timestamp); case DIF_VAR_VTIMESTAMP: +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD ASSERT(dtrace_vtime_references != 0); return (curthread->t_dtrace_vtime); +#else +return 0; +#endif case DIF_VAR_WALLTIMESTAMP: if (!(mstate->dtms_present & DTRACE_MSTATE_WALLTIMESTAMP)) { @@ -117,6 +127,8 @@ return (mstate->dtms_stackdepth); case DIF_VAR_USTACKDEPTH: +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD if (!dtrace_priv_proc(state)) return (0); if (!(mstate->dtms_present & DTRACE_MSTATE_USTACKDEPTH)) { @@ -135,6 +147,9 @@ mstate->dtms_present |= DTRACE_MSTATE_USTACKDEPTH; } return (mstate->dtms_ustackdepth); +#else +return 0; +#endif case DIF_VAR_CALLER: if (!dtrace_priv_kernel(state)) @@ -185,7 +200,7 @@ * uint64_t will contain the caller, which is what * we're after. */ - ustack[2] = NULL; + ustack[2] = 0; dtrace_getupcstack(ustack, 3); mstate->dtms_ucaller = ustack[2]; mstate->dtms_present |= DTRACE_MSTATE_UCALLER; @@ -222,8 +237,11 @@ * always due to a high-level interrupt. (And we're assuming * that there is only a single high level interrupt.) */ +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD if (DTRACE_ANCHORED(mstate->dtms_probe) && CPU_ON_INTR(CPU)) return (pid0.pid_id); +#endif /* * It is always safe to dereference one's own t_procp pointer: @@ -233,9 +251,16 @@ * threads and processes don't clean up their own state -- * they leave that task to whomever reaps them.) */ +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD return ((uint64_t)curthread->t_procp->p_pidp->pid_id); +#else +return 0; +#endif case DIF_VAR_TID: +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD /* * See comment in DIF_VAR_PID. */ @@ -243,8 +268,13 @@ return (0); return ((uint64_t)curthread->t_tid); +#else +return 0; +#endif case DIF_VAR_EXECNAME: +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD if (!dtrace_priv_proc(state)) return (0); @@ -262,8 +292,13 @@ */ return ((uint64_t)(uintptr_t) curthread->t_procp->p_user.u_comm); +#else +return 0; +#endif case DIF_VAR_ZONENAME: +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD if (!dtrace_priv_proc(state)) return (0); @@ -281,6 +316,9 @@ */ return ((uint64_t)(uintptr_t) curthread->t_procp->p_zone->zone_name); +#else +return 0; +#endif default: DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP); @@ -300,6 +338,8 @@ dtrace_key_t *tupregs, int nargs, dtrace_mstate_t *mstate, dtrace_state_t *state) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD volatile uint16_t *flags = &cpu_core[CPU->cpu_id].cpuc_dtrace_flags; volatile uintptr_t *illval = &cpu_core[CPU->cpu_id].cpuc_dtrace_illval; @@ -1378,6 +1418,7 @@ break; } } +#endif } /* @@ -1389,6 +1430,8 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate, dtrace_vstate_t *vstate, dtrace_state_t *state) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD const dif_instr_t *text = difo->dtdo_buf; const uint_t textlen = difo->dtdo_len; const char *strtab = difo->dtdo_strtab; @@ -2123,6 +2166,7 @@ mstate->dtms_fltoffs = opc * sizeof (dif_instr_t); mstate->dtms_present |= DTRACE_MSTATE_FLTOFFS; +#endif return (0); } ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_difo.c#2 (text+ko) ==== @@ -649,7 +649,7 @@ static void dtrace_difo_chunksize(dtrace_difo_t *dp, dtrace_vstate_t *vstate) { - uint64_t sval; + uint64_t sval = 0; dtrace_key_t tupregs[DIF_DTR_NREGS + 2]; /* +2 for thread and id */ const dif_instr_t *text = dp->dtdo_buf; uint_t pc, srd = 0; @@ -663,7 +663,7 @@ uint_t rd = DIF_INSTR_RD(instr); uint_t r1 = DIF_INSTR_R1(instr); uint_t nkeys = 0; - uchar_t scope; + uchar_t scope = 0; dtrace_key_t *key = tupregs; @@ -792,10 +792,10 @@ for (i = 0; i < dp->dtdo_varlen; i++) { dtrace_difv_t *v = &dp->dtdo_vartab[i]; - dtrace_statvar_t *svar, ***svarp; + dtrace_statvar_t *svar, ***svarp = NULL; size_t dsize = 0; uint8_t scope = v->dtdv_scope; - int *np; + int *np = NULL; if ((id = v->dtdv_id) < DIF_VAR_OTHER_UBASE) continue; @@ -947,7 +947,7 @@ for (i = 0; i < dp->dtdo_varlen; i++) { dtrace_difv_t *v = &dp->dtdo_vartab[i]; - dtrace_statvar_t *svar, **svarp; + dtrace_statvar_t *svar, **svarp = NULL; uint_t id; uint8_t scope = v->dtdv_scope; int *np; ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dof.c#2 (text+ko) ==== @@ -123,6 +123,8 @@ static dof_hdr_t * dtrace_dof_property(const char *name) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD uchar_t *buf; uint64_t loadsz; unsigned int len, i; @@ -163,6 +165,9 @@ ddi_prop_free(buf); return (dof); +#else +return NULL; +#endif } static void @@ -305,7 +310,7 @@ offsetof(dtrace_difo_t, dtdo_varlen), sizeof (dtrace_difv_t), sizeof (uint_t), "multiple variable tables" }, - { DOF_SECT_NONE, 0, 0, 0, NULL } + { DOF_SECT_NONE, 0, 0, 0, 0, NULL } }; if (sec->dofs_type != DOF_SECT_DIFOHDR) { ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dynvar.c#2 (text+ko) ==== @@ -182,6 +182,8 @@ */ bucket = hashval % dstate->dtds_hashsize; +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); +#ifdef DOODAD if (op == DTRACE_DYNVAR_DEALLOC) { volatile uintptr_t *lockp = &hash[bucket].dtdh_lock; @@ -196,6 +198,7 @@ dtrace_membar_producer(); } +#endif top: prev = NULL; ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ecb.c#2 (text+ko) ==== @@ -144,7 +144,7 @@ */ diff = offs + sizeof (dtrace_aggid_t); - if (diff = (diff & (sizeof (uint64_t) - 1))) + if ((diff = (diff & (sizeof (uint64_t) - 1)))) offs += sizeof (uint64_t) - diff; aggbase = offs - sizeof (dtrace_aggid_t); @@ -411,7 +411,8 @@ uint16_t format = 0; dtrace_recdesc_t *rec; dtrace_state_t *state = ecb->dte_state; - dtrace_optval_t *opt = state->dts_options, nframes, strsize; + dtrace_optval_t *opt = state->dts_options, strsize; + dtrace_optval_t nframes = 0; uint64_t arg = desc->dtad_arg; ASSERT(MUTEX_HELD(&dtrace_lock)); @@ -452,11 +453,11 @@ * We know that our arg is a string -- turn it into a * format. */ - if (arg == NULL) { + if (arg == 0) { ASSERT(desc->dtad_kind == DTRACEACT_PRINTA); format = 0; } else { - ASSERT(arg != NULL); + ASSERT(arg != 0); ASSERT(arg > KERNELBASE); format = dtrace_format_add(state, (char *)(uintptr_t)arg); @@ -894,7 +895,9 @@ static dtrace_ecb_t * dtrace_epid2ecb(dtrace_state_t *state, dtrace_epid_t id) { +#ifdef DEBUG dtrace_ecb_t *ecb; +#endif ASSERT(MUTEX_HELD(&dtrace_lock)); @@ -910,7 +913,9 @@ static dtrace_aggregation_t * dtrace_aggid2agg(dtrace_state_t *state, dtrace_aggid_t id) { +#ifdef DEBUG dtrace_aggregation_t *agg; +#endif ASSERT(MUTEX_HELD(&dtrace_lock)); ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_enabling.c#2 (text+ko) ==== @@ -288,17 +288,24 @@ int i = 0; int matched = 0; +printf("%s:%s(%d): \n",__FUNCTION__,__FILE__,__LINE__); ASSERT(MUTEX_HELD(&cpu_lock)); ASSERT(MUTEX_HELD(&dtrace_lock)); +printf("%s:%s(%d): enab %p\n",__FUNCTION__,__FILE__,__LINE__,enab); for (i = 0; i < enab->dten_ndesc; i++) { +printf("%s:%s(%d): \n",__FUNCTION__,__FILE__,__LINE__); dtrace_ecbdesc_t *ep = enab->dten_desc[i]; +printf("%s:%s(%d): \n",__FUNCTION__,__FILE__,__LINE__); enab->dten_current = ep; +printf("%s:%s(%d): \n",__FUNCTION__,__FILE__,__LINE__); enab->dten_error = 0; +printf("%s:%s(%d): \n",__FUNCTION__,__FILE__,__LINE__); matched += dtrace_probe_enable(&ep->dted_probe, enab); +printf("%s:%s(%d): \n",__FUNCTION__,__FILE__,__LINE__); if (enab->dten_error != 0) { /* * If we get an error half-way through enabling the @@ -313,20 +320,25 @@ * it would be a result of corrupted DOF in the driver * properties. */ +printf("%s:%s(%d): \n",__FUNCTION__,__FILE__,__LINE__); if (nmatched == NULL) { cmn_err(CE_WARN, "dtrace_enabling_match() " "error on %p: %d", (void *)ep, enab->dten_error); } +printf("%s:%s(%d): returns\n",__FUNCTION__,__FILE__,__LINE__); return (enab->dten_error); } } +printf("%s:%s(%d): \n",__FUNCTION__,__FILE__,__LINE__); enab->dten_probegen = dtrace_probegen; +printf("%s:%s(%d): \n",__FUNCTION__,__FILE__,__LINE__); if (nmatched != NULL) *nmatched = matched; +printf("%s:%s(%d): returns\n",__FUNCTION__,__FILE__,__LINE__); return (0); } ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_helper.c#2 (text+ko) ==== @@ -70,7 +70,7 @@ uint16_t *flags = &cpu_core[CPU->cpu_id].cpuc_dtrace_flags; uint64_t sarg0 = mstate->dtms_arg[0]; uint64_t sarg1 = mstate->dtms_arg[1]; - uint64_t rval; + uint64_t rval = 0; dtrace_helpers_t *helpers = curproc->p_dtrace_helpers; dtrace_helper_action_t *helper; dtrace_vstate_t *vstate; @@ -151,7 +151,7 @@ mstate->dtms_arg[0] = sarg0; mstate->dtms_arg[1] = sarg1; - return (NULL); + return (0); } static void ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#3 (text+ko) ==== @@ -44,6 +44,7 @@ break; case DTRACEIOC_CONF: { dtrace_conf_t conf; +printf("DTRACEIOC_CONF:\n"); bzero(&conf, sizeof (conf)); conf.dtc_difversion = DIF_VERSION; conf.dtc_difintregs = DIF_DIR_NREGS; @@ -58,10 +59,76 @@ printf("DTRACEIOC_DOFGET:\n"); error = EINVAL; break; - case DTRACEIOC_ENABLE: -printf("DTRACEIOC_ENABLE:\n"); -error = EINVAL; - break; + case DTRACEIOC_ENABLE: { + dof_hdr_t *dof = NULL; +#ifdef DOODAD + dtrace_enabling_t *enab = NULL; + dtrace_vstate_t *vstate; +#endif + int err = 0; + int rval; + void **p = (void **) addr; +printf("DTRACEIOC_ENABLE: p %p *p %p\n",p,*p); + + /* + * If a NULL argument has been passed, we take this as our + * cue to reevaluate our enablings. + */ + if (*p == NULL) { + mutex_enter(&cpu_lock); + mutex_enter(&dtrace_lock); +#ifdef DOODAD + err = dtrace_enabling_matchstate(state, *p); +#endif + mutex_exit(&dtrace_lock); + mutex_exit(&cpu_lock); + + return (err); + } + + if ((dof = dtrace_dof_copyin((uintptr_t) *p, &rval)) == NULL) + return (rval); + + mutex_enter(&cpu_lock); + mutex_enter(&dtrace_lock); +#ifdef DOODAD + vstate = &state->dts_vstate; + + if (state->dts_activity != DTRACE_ACTIVITY_INACTIVE) { + mutex_exit(&dtrace_lock); + mutex_exit(&cpu_lock); + dtrace_dof_destroy(dof); + return (EBUSY); + } + + if (dtrace_dof_slurp(dof, vstate, td->td_ucred, &enab, 0, B_TRUE) != 0) { + mutex_exit(&dtrace_lock); + mutex_exit(&cpu_lock); + dtrace_dof_destroy(dof); + return (EINVAL); + } + + if ((rval = dtrace_dof_options(dof, state)) != 0) { + dtrace_enabling_destroy(enab); + mutex_exit(&dtrace_lock); + mutex_exit(&cpu_lock); + dtrace_dof_destroy(dof); + return (rval); + } + + if ((err = dtrace_enabling_match(enab, *p)) == 0) { + err = dtrace_enabling_retain(enab); + } else { + dtrace_enabling_destroy(enab); + } +#endif + + mutex_exit(&cpu_lock); + mutex_exit(&dtrace_lock); + dtrace_dof_destroy(dof); + + return (err); + } case DTRACEIOC_EPROBE: printf("DTRACEIOC_EPROBE:\n"); error = EINVAL; @@ -74,52 +141,99 @@ printf("DTRACEIOC_GO:\n"); error = EINVAL; break; - case DTRACEIOC_PROBEARG: + case DTRACEIOC_PROBEARG: { + dtrace_argdesc_t *desc = (dtrace_argdesc_t *) addr; + dtrace_probe_t *probe; + dtrace_provider_t *prov; printf("DTRACEIOC_PROBEARG:\n"); -error = EINVAL; - break; + + if (desc->dtargd_id == DTRACE_IDNONE) + return (EINVAL); + + if (desc->dtargd_ndx == DTRACE_ARGNONE) + return (EINVAL); + + mutex_enter(&dtrace_provider_lock); + mutex_enter(&mod_lock); + mutex_enter(&dtrace_lock); + + if (desc->dtargd_id > dtrace_nprobes) { + mutex_exit(&dtrace_lock); + mutex_exit(&mod_lock); + mutex_exit(&dtrace_provider_lock); + return (EINVAL); + } + + if ((probe = dtrace_probes[desc->dtargd_id - 1]) == NULL) { + mutex_exit(&dtrace_lock); + mutex_exit(&mod_lock); + mutex_exit(&dtrace_provider_lock); + return (EINVAL); + } + + mutex_exit(&dtrace_lock); + + prov = probe->dtpr_provider; + + if (prov->dtpv_pops.dtps_getargdesc == NULL) { + /* + * There isn't any typed information for this probe. + * Set the argument number to DTRACE_ARGNONE. + */ + desc->dtargd_ndx = DTRACE_ARGNONE; + } else { + desc->dtargd_native[0] = '\0'; + desc->dtargd_xlate[0] = '\0'; + desc->dtargd_mapping = desc->dtargd_ndx; + + prov->dtpv_pops.dtps_getargdesc(prov->dtpv_arg, + probe->dtpr_id, probe->dtpr_arg, desc); + } + + mutex_exit(&mod_lock); + mutex_exit(&dtrace_provider_lock); + + return (0); + } case DTRACEIOC_PROBEMATCH: case DTRACEIOC_PROBES: { -#ifdef DOODAD + dtrace_probedesc_t *p_desc = (dtrace_probedesc_t *) addr; dtrace_probe_t *probe = NULL; - dtrace_probedesc_t desc; dtrace_probekey_t pkey; dtrace_id_t i; int m = 0; - uint32_t priv; - uid_t uid; - zoneid_t zoneid; + uint32_t priv = 0; + uid_t uid = 0; + zoneid_t zoneid = 0; +printf("%s:\n",(cmd == DTRACEIOC_PROBEMATCH) ? "DTRACEIOC_PROBEMATCH":"DTRACEIOC_PROBES"); - if (copyin((void *)arg, &desc, sizeof (desc)) != 0) - return (EFAULT); - - desc.dtpd_provider[DTRACE_PROVNAMELEN - 1] = '\0'; - desc.dtpd_mod[DTRACE_MODNAMELEN - 1] = '\0'; - desc.dtpd_func[DTRACE_FUNCNAMELEN - 1] = '\0'; - desc.dtpd_name[DTRACE_NAMELEN - 1] = '\0'; + p_desc->dtpd_provider[DTRACE_PROVNAMELEN - 1] = '\0'; + p_desc->dtpd_mod[DTRACE_MODNAMELEN - 1] = '\0'; + p_desc->dtpd_func[DTRACE_FUNCNAMELEN - 1] = '\0'; + p_desc->dtpd_name[DTRACE_NAMELEN - 1] = '\0'; /* * Before we attempt to match this probe, we want to give * all providers the opportunity to provide it. */ - if (desc.dtpd_id == DTRACE_IDNONE) { + if (p_desc->dtpd_id == DTRACE_IDNONE) { mutex_enter(&dtrace_provider_lock); - dtrace_probe_provide(&desc, NULL); + dtrace_probe_provide(p_desc, NULL); mutex_exit(&dtrace_provider_lock); - desc.dtpd_id++; + p_desc->dtpd_id++; } if (cmd == DTRACEIOC_PROBEMATCH) { - dtrace_probekey(&desc, &pkey); + dtrace_probekey(p_desc, &pkey); pkey.dtpk_id = DTRACE_IDNONE; } - dtrace_cred2priv(cr, &priv, &uid, &zoneid); + dtrace_cred2priv(td->td_ucred, &priv, &uid, &zoneid); mutex_enter(&dtrace_lock); if (cmd == DTRACEIOC_PROBEMATCH) { - for (i = desc.dtpd_id; i <= dtrace_nprobes; i++) { + for (i = p_desc->dtpd_id; i <= dtrace_nprobes; i++) { if ((probe = dtrace_probes[i - 1]) != NULL && (m = dtrace_match_probe(probe, &pkey, priv, uid, zoneid)) != 0) @@ -132,7 +246,7 @@ } } else { - for (i = desc.dtpd_id; i <= dtrace_nprobes; i++) { + for (i = p_desc->dtpd_id; i <= dtrace_nprobes; i++) { if ((probe = dtrace_probes[i - 1]) != NULL && dtrace_match_priv(probe, priv, uid, zoneid)) break; @@ -144,19 +258,34 @@ return (ESRCH); } - dtrace_probe_description(probe, &desc); + dtrace_probe_description(probe, p_desc); mutex_exit(&dtrace_lock); - if (copyout(&desc, (void *)arg, sizeof (desc)) != 0) - return (EFAULT); -#endif + return (0); + } + case DTRACEIOC_PROVIDER: { + dtrace_providerdesc_t *pvd = (dtrace_providerdesc_t *) addr; + dtrace_provider_t *pvp; +printf("DTRACEIOC_PROVIDER:\n"); + + pvd->dtvd_name[DTRACE_PROVNAMELEN - 1] = '\0'; + mutex_enter(&dtrace_provider_lock); + + for (pvp = dtrace_provider; pvp != NULL; pvp = pvp->dtpv_next) { + if (strcmp(pvp->dtpv_name, pvd->dtvd_name) == 0) + break; + } + + mutex_exit(&dtrace_provider_lock); + + if (pvp == NULL) + return (ESRCH); + + bcopy(&pvp->dtpv_priv, &pvd->dtvd_priv, sizeof (dtrace_ppriv_t)); + bcopy(&pvp->dtpv_attr, &pvd->dtvd_attr, sizeof (dtrace_pattr_t)); return (0); } - case DTRACEIOC_PROVIDER: -printf("DTRACEIOC_PROVIDER:\n"); -error = EINVAL; - break; case DTRACEIOC_REPLICATE: printf("DTRACEIOC_REPLICATE:\n"); error = EINVAL; ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_predicate.c#2 (text+ko) ==== @@ -47,7 +47,9 @@ static void dtrace_predicate_release(dtrace_predicate_t *pred, dtrace_vstate_t *vstate) { +#ifdef DEBUG dtrace_difo_t *dp = pred->dtp_difo; +#endif ASSERT(MUTEX_HELD(&dtrace_lock)); ASSERT(dp != NULL && dp->dtdo_refcnt != 0); ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probe.c#2 (text+ko) ==== @@ -8,6 +8,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4) { +#ifdef DOODAD processorid_t cpuid; dtrace_icookie_t cookie; dtrace_probe_t *probe; @@ -606,4 +607,5 @@ curthread->t_dtrace_start = dtrace_gethrtime(); dtrace_interrupt_enable(cookie); +#endif } ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probekey.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ * dtrace_match_nonzero(). */ static void -dtrace_probekey(const dtrace_probedesc_t *pdp, dtrace_probekey_t *pkp) +dtrace_probekey(dtrace_probedesc_t *pdp, dtrace_probekey_t *pkp) { >>> TRUNCATED FOR MAIL (1000 lines) <<<