From owner-p4-projects@FreeBSD.ORG Sun Jan 27 16:06:23 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 824B12CB; Sun, 27 Jan 2013 16:06:23 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3CD722C9 for ; Sun, 27 Jan 2013 16:06:23 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 277BB8D2 for ; Sun, 27 Jan 2013 16:06:23 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r0RG6Mrc034452 for ; Sun, 27 Jan 2013 16:06:22 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r0RG6Ma7034449 for perforce@freebsd.org; Sun, 27 Jan 2013 16:06:22 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 27 Jan 2013 16:06:22 GMT Message-Id: <201301271606.r0RG6Ma7034449@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 221534 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jan 2013 16:06:23 -0000 http://p4web.freebsd.org/@@221534?ac=10 Change 221534 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/01/27 16:05:30 FreeBSD/mips stores page-table entries in a near-identical format to MIPS TLB entries -- only it overrides certain "reserved" bits in the MIPS-defined EntryLo register to hold software-defined bits (swbits) to avoid significantly increasing the page table memory footprint. On n32 and n64, these bits were (a) colliding with MIPS64r2 physical memory extensions and (b) being improperly cleared. Attempt to fix both of these problems by pushing swbits further along 64-bit EntryLo registers into the reserved space, and improving consistency between C-based and assembly-based clearing of swbits -- in particular, to use the same definition. This should stop swbits from leaking into TLB entries -- while ignored by most current MIPS hardware, this would cause a problem with (much) larger physical memory sizes, and also leads to confusing hardware-level tracing as physical addresses contain unexpected (and inconsistent) higher bits. Discussed with: imp, jmallett Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/include/pte.h#4 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/include/pte.h#4 (text+ko) ==== @@ -56,16 +56,26 @@ #define TLBMASK_MASK ((PAGE_MASK >> TLBMASK_SHIFT) << TLBMASK_SHIFT) /* - * PFN for EntryLo register. Upper bits are 0, which is to say that - * bit 28 is the last hardware bit; Bits 29 and upwards (EntryLo is - * 64 bit though it can be referred to in 32-bits providing 3 software - * bits safely. We use it as 64 bits to get many software bits, and - * god knows what else.) are unacknowledged by hardware. They may be - * written as anything, but otherwise they have as much meaning as - * other 0 fields. + * FreeBSD/mips page-table entries take a near-identical format to MIPS TLB + * entries, each consisting of two 32-bit or 64-bit values ("EntryHi" and + * "EntryLo"). MIPS4k and MIPS64 both define certain bits in TLB entries as + * reserved, and these must be zero-filled by software. We overload these + * bits in PTE entries to hold PTE_ flags such as RO, W, and MANAGED. + * However, we must mask these out when writing to TLB entries to ensure that + * they do not become visible to hardware -- especially on MIPS64r2 which has + * an extended physical memory space. + * + * When using n64 and n32, shift software-defined bits into the MIPS64r2 + * reserved range, which runs from bit 55 ... 63. In other configurations + * (32-bit MIPS4k and compatible), shift them out to bits 29 ... 31. + * + * NOTE: This means that for 32-bit use of CP0, we aren't able to set the top + * bit of PFN to a non-zero value, as software is using it! This physical + * memory size limit may not be sufficiently enforced elsewhere. */ #if defined(__mips_n64) || defined(__mips_n32) /* PHYSADDR_64_BIT */ -#define TLBLO_SWBITS_SHIFT (34) +#define TLBLO_SWBITS_SHIFT (55) +#define TLBLO_SWBITS_CLEAR_SHIFT (9) #define TLBLO_PFN_MASK 0x3FFFFFFC0ULL #else #define TLBLO_SWBITS_SHIFT (29) @@ -133,6 +143,9 @@ * listen to requests to write to it. * W: Wired. ??? * MANAGED:Managed. This PTE maps a managed page. + * + * These bits should not be written into the TLB, so must first be masked out + * explicitly in C, or using CLEAR_PTE_SWBITS() in assembly. */ #define PTE_RO ((pt_entry_t)0x01 << TLBLO_SWBITS_SHIFT) #define PTE_W ((pt_entry_t)0x02 << TLBLO_SWBITS_SHIFT) @@ -162,7 +175,7 @@ #define PTESIZE 4 #define PTE_L lw #define PTE_MTC0 mtc0 -#define CLEAR_PTE_SWBITS(r) sll r, 3; srl r, 3 /* remove 3 high bits */ +#define CLEAR_PTE_SWBITS(r) LONG_SLL r, TLBLO_SWBITS_CLEAR_SHIFT; LONG_SRL r, TLBLO_SWBITS_CLEAR_SHIFT /* remove swbits */ #endif /* defined(__mips_n64) || defined(__mips_n32) */ #if defined(__mips_n64) From owner-p4-projects@FreeBSD.ORG Mon Jan 28 14:08:17 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1F69519A; Mon, 28 Jan 2013 14:08:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D3CA5198 for ; Mon, 28 Jan 2013 14:08:16 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id C5039D5A for ; Mon, 28 Jan 2013 14:08:16 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r0SE8G6E064021 for ; Mon, 28 Jan 2013 14:08:16 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r0SE8G0G064018 for perforce@freebsd.org; Mon, 28 Jan 2013 14:08:16 GMT (envelope-from bz@freebsd.org) Date: Mon, 28 Jan 2013 14:08:16 GMT Message-Id: <201301281408.r0SE8G0G064018@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 221567 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2013 14:08:17 -0000 http://p4web.freebsd.org/@@221567?ac=10 Change 221567 by bz@bz_zenith on 2013/01/28 14:07:29 Make sure we hold the lock for callout_stop() even in early error cases. This fixes panics previously seen if there is a MAC+PHY configured in hints but not present: panic: mutex atse not owned at /sys/kern/kern_mutex.c:153 Reported also by: brooks, rwatson (presumably on old bitfiles) Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#2 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#2 (text+ko) ==== @@ -37,6 +37,8 @@ */ /* * XXX-BZ NOTES: + * - brooks, rwatson report: + * - buffered packet data as SOP arrives * - ifOutBroadcastPkts are only counted if both ether dst and src are all-1s; * seems an IP core bug, they count ether broadcasts as multicast. Is this * still the case? @@ -47,8 +49,6 @@ * hints anymore. * - read ethernet address depending on device unit until loader will do all * magic for us. - * - there is a case when atse_attach fails, that atse_detach is triggering - * a mtx locked assertion. * - resolve all XXX, left as reminders to shake out details later */ @@ -554,18 +554,6 @@ return (0); } -static int -atse_stop(struct atse_softc *sc) -{ - int error; - - ATSE_LOCK(sc); - error = atse_stop_locked(sc); - ATSE_UNLOCK(sc); - - return (error); -} - static uint8_t atse_mchash(struct atse_softc *sc __unused, const uint8_t *addr) { @@ -1590,11 +1578,12 @@ if (ifp->if_capenable & IFCAP_POLLING) ether_poll_deregister(ifp); #endif - callout_stop(&sc->atse_tick); /* Only cleanup if attach succeeded. */ if (device_is_attached(dev)) { - atse_stop(sc); + ATSE_LOCK(sc); + atse_stop_locked(sc); + ATSE_UNLOCK(sc); callout_drain(&sc->atse_tick); ether_ifdetach(ifp); } @@ -1700,27 +1689,41 @@ sc = device_get_softc(dev); - if (sc->atse_txc_mem_res != NULL) + if (sc->atse_txc_mem_res != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_txc_mem_rid, sc->atse_txc_mem_res); - if (sc->atse_tx_mem_res != NULL) + sc->atse_txc_mem_res = NULL; + } + if (sc->atse_tx_mem_res != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_tx_mem_rid, sc->atse_tx_mem_res); - if (sc->atse_tx_irq_res != NULL) + sc->atse_tx_mem_res = NULL; + } + if (sc->atse_tx_irq_res != NULL) { bus_release_resource(dev, SYS_RES_IRQ, sc->atse_tx_irq_rid, sc->atse_tx_irq_res); - if (sc->atse_rxc_mem_res != NULL) + sc->atse_tx_irq_res = NULL; + } + if (sc->atse_rxc_mem_res != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_rxc_mem_rid, sc->atse_rxc_mem_res); - if (sc->atse_rx_mem_res != NULL) + sc->atse_rxc_mem_res = NULL; + } + if (sc->atse_rx_mem_res != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_rx_mem_rid, sc->atse_rx_mem_res); - if (sc->atse_rx_irq_res != NULL) + sc->atse_rx_mem_res = NULL; + } + if (sc->atse_rx_irq_res != NULL) { bus_release_resource(dev, SYS_RES_IRQ, sc->atse_rx_irq_rid, sc->atse_rx_irq_res); - if (sc->atse_mem_res != NULL) + sc->atse_rx_irq_res = NULL; + } + if (sc->atse_mem_res != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_mem_rid, sc->atse_mem_res); + sc->atse_mem_res = NULL; + } } static int From owner-p4-projects@FreeBSD.ORG Mon Jan 28 15:04:14 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3BB91797; Mon, 28 Jan 2013 15:04:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F3B66795 for ; Mon, 28 Jan 2013 15:04:13 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id E5CE91A4 for ; Mon, 28 Jan 2013 15:04:13 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r0SF4Df8069514 for ; Mon, 28 Jan 2013 15:04:13 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r0SF4D9m069511 for perforce@freebsd.org; Mon, 28 Jan 2013 15:04:13 GMT (envelope-from bz@freebsd.org) Date: Mon, 28 Jan 2013 15:04:13 GMT Message-Id: <201301281504.r0SF4D9m069511@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 221568 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2013 15:04:14 -0000 http://p4web.freebsd.org/@@221568?ac=10 Change 221568 by bz@bz_zenith on 2013/01/28 15:04:03 Fix typo. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#3 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#3 (text+ko) ==== @@ -396,7 +396,7 @@ val4 = ATSE_TX_META_READ(sc); #endif if (sc->atse_tx_m_offset == 0) { - /* Wirte start of packet. */ + /* Write start of packet. */ val4 = A_ONCHIP_FIFO_MEM_CORE_SOP; val4 &= ~A_ONCHIP_FIFO_MEM_CORE_EOP; ATSE_TX_META_WRITE(sc, val4); From owner-p4-projects@FreeBSD.ORG Mon Jan 28 17:27:43 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8263AD5; Mon, 28 Jan 2013 17:27:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 46AFCD3 for ; Mon, 28 Jan 2013 17:27:43 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1DAC7E04 for ; Mon, 28 Jan 2013 17:27:43 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r0SHRh37084793 for ; Mon, 28 Jan 2013 17:27:43 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r0SHRgX8084790 for perforce@freebsd.org; Mon, 28 Jan 2013 17:27:42 GMT (envelope-from brooks@freebsd.org) Date: Mon, 28 Jan 2013 17:27:42 GMT Message-Id: <201301281727.r0SHRgX8084790@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 221571 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2013 17:27:43 -0000 http://p4web.freebsd.org/@@221571?ac=10 Change 221571 by brooks@brooks_zenith on 2013/01/28 17:27:28 Now that we have a real network device we need bpf so we can tcpdump and use dhclient. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4_BASE#3 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4_BASE#3 (text+ko) ==== @@ -24,6 +24,7 @@ device terasic_de4led device terasic_mtl +device bpf device isf device sc From owner-p4-projects@FreeBSD.ORG Tue Jan 29 22:54:16 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DB3D2359; Tue, 29 Jan 2013 22:54:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6A7F9357 for ; Tue, 29 Jan 2013 22:54:15 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4D694D6A for ; Tue, 29 Jan 2013 22:54:15 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r0TMsFxq068158 for ; Tue, 29 Jan 2013 22:54:15 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r0TMsEH5068154 for perforce@freebsd.org; Tue, 29 Jan 2013 22:54:14 GMT (envelope-from brooks@freebsd.org) Date: Tue, 29 Jan 2013 22:54:14 GMT Message-Id: <201301292254.r0TMsEH5068154@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 221595 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 22:54:16 -0000 http://p4web.freebsd.org/@@221595?ac=10 Change 221595 by brooks@brooks_zenith on 2013/01/29 22:53:16 IFC @ 221594 Affected files ... .. //depot/projects/ctsrd/beribsd/src/Makefile.inc1#9 integrate .. //depot/projects/ctsrd/beribsd/src/UPDATING#6 integrate .. //depot/projects/ctsrd/beribsd/src/bin/cat/cat.1#4 integrate .. //depot/projects/ctsrd/beribsd/src/bin/cat/cat.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/bin/cp/utils.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/bin/df/df.1#4 integrate .. //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_target/snmp_target.3#4 integrate .. //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_target/target_snmp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_usm/snmp_usm.3#4 integrate .. //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_usm/usm_snmp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_vacm/snmp_vacm.3#4 integrate .. //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_vacm/vacm_snmp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/contrib/ee/ee.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/contrib/ipfilter/FreeBSD-4.0/ipv6-patch-4.0#3 integrate .. //depot/projects/ctsrd/beribsd/src/etc/Makefile#5 integrate .. //depot/projects/ctsrd/beribsd/src/etc/login.conf#4 integrate .. //depot/projects/ctsrd/beribsd/src/gnu/lib/libsupc++/Version.map#3 integrate .. //depot/projects/ctsrd/beribsd/src/gnu/usr.bin/cc/c++/Makefile#4 integrate .. //depot/projects/ctsrd/beribsd/src/gnu/usr.bin/patch/Makefile#3 integrate .. //depot/projects/ctsrd/beribsd/src/include/arpa/Makefile#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libcxxrt/Version.map#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libproc/proc_rtld.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libstand/if_ether.h#3 delete .. //depot/projects/ctsrd/beribsd/src/sbin/geom/class/part/gpart.8#5 integrate .. //depot/projects/ctsrd/beribsd/src/share/man/man5/src.conf.5#6 integrate .. //depot/projects/ctsrd/beribsd/src/share/man/man9/VFS_SET.9#3 integrate .. //depot/projects/ctsrd/beribsd/src/share/mk/bsd.own.mk#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/amd64/linux32/linux.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/amd64/linux32/linux32_sysvec.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/amd64/vmm/intel/vmx.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/allwinner/a10_clk.c#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/arm/allwinner/a10_clk.h#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/arm/allwinner/a10_ehci.c#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/arm/allwinner/aintc.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/allwinner/common.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/allwinner/files.a10#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/allwinner/timer.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/arm/cpufunc_asm_arm10.S#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/arm/cpufunc_asm_arm9.S#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/arm/intr.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/arm/vm_machdep.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/conf/CUBIEBOARD#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/conf/DOCKSTAR#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/conf/DREAMPLUG-1001#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/arm/conf/NOTES#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/conf/SHEEVAPLUG#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/mv/kirkwood/files.sheevaplug#3 delete .. //depot/projects/ctsrd/beribsd/src/sys/arm/mv/kirkwood/sheevaplug.c#3 delete .. //depot/projects/ctsrd/beribsd/src/sys/arm/mv/kirkwood/std.sheevaplug#3 delete .. //depot/projects/ctsrd/beribsd/src/sys/arm/mv/mv_machdep.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/arm/ti/am335x/am335x_scm_padconf.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beaglebone.dts#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/cubieboard.dts#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/dreamplug-1001.dts#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/dreamplug-1001N.dts#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linprocfs/linprocfs.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_emul.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_file.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_file.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_fork.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_futex.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_ioctl.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_ipc.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_mib.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_misc.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_signal.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_socket.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_sysctl.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/compat/linux/linux_time.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/contrib/dev/acpica/components/utilities/utcache.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/contrib/dev/acpica/include/acmacros.h#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/contrib/dev/acpica/include/acoutput.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/contrib/dev/acpica/include/actypes.h#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/Osd/OsdSchedule.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pcib.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/agp/agp_i810.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ath/ath_hal/ar5211/boss.ini#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ath/if_ath.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ath/if_ath_misc.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ath/if_ath_tx.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ath/if_ath_tx_edma.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/bge/if_bge.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/bktr/CHANGELOG.TXT#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cas/if_cas.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cxgbe/adapter.h#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cxgbe/common/t4_msg.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cxgbe/t4_main.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cxgbe/t4_sge.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cxgbe/tom/t4_connect.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cxgbe/tom/t4_cpl_io.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cxgbe/tom/t4_listen.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cxgbe/tom/t4_tom.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cxgbe/tom/t4_tom.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgbe/ixgbe_82598.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgbe/ixgbe_82599.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgbe/ixgbe_x540.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgbe/ixgbe_x540.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/nand/nand_id.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/uart/uart_dev_ns8250.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_axe.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_cdce.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/quirk/usb_quirk.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_audio.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_kbd.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_modem.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_busdma.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usbdevs#7 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/ext2fs/ext2_dinode.h#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/ext2fs/ext2_dir.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/ext2fs/ext2_inode.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/ext2fs/ext2fs.h#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/nfs/nfs.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/nfs/nfs_commonkrpc.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/nfs/nfsport.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/nfsclient/nfs_clrpcops.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/nfsclient/nfs_clstate.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/nfsserver/nfs_nfsdkrpc.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/fs/nfsserver/nfs_nfsdstate.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/geom/mirror/g_mirror.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/i386/linux/linux.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/i386/linux/linux_ptrace.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/i386/linux/linux_sysvec.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/kern/kern_clock.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/kern/kern_tc.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/modules/digi/Makefile#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/modules/digi/Makefile.inc#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/modules/isci/Makefile#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/modules/sound/driver/ich/Makefile#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/net/if_llatbl.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/net/if_llatbl.h#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/net80211/ieee80211_adhoc.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/net80211/ieee80211_node.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/net80211/ieee80211_scan_sta.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet/if_ether.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet/in_pcb.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet/tcp_syncache.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet/tcp_usrreq.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet/toecore.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet6/nd6.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet6/nd6_nbr.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/nfsclient/nfs_krpc.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/pci/ncr.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/sys/kernel.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/sys/mbuf.h#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/sys/mount.h#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/sys/param.h#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/sys/time.h#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/sys/vmmeter.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/vm/uma_core.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/vm/vm_fault.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/vm/vm_meter.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/vm/vm_pageout.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/tools/build/options/WITH_BSD_PATCH#1 branch .. //depot/projects/ctsrd/beribsd/src/tools/install.sh#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.bin/Makefile#6 integrate .. //depot/projects/ctsrd/beribsd/src/usr.bin/dtc/dtc.1#2 integrate .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/Makefile#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/backupfile.c#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/backupfile.h#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/common.h#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/inp.c#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/inp.h#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/mkpath.c#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/patch.1#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/patch.c#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/pathnames.h#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/pch.c#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/pch.h#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/util.c#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/patch/util.h#1 branch .. //depot/projects/ctsrd/beribsd/src/usr.bin/sort/sort.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.bin/systat/vmstat.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.bin/truss/main.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/usr.bin/vmstat/vmstat.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bhyve/pmtmr.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bhyve/rtc.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bsdinstall/scripts/script#2 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bsdinstall/scripts/wlanconfig#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bsnmpd/modules/snmp_target/Makefile#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bsnmpd/modules/snmp_usm/Makefile#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/newsyslog/newsyslog.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/watchdogd/watchdogd.c#4 integrate Differences ... ==== //depot/projects/ctsrd/beribsd/src/Makefile.inc1#9 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: head/Makefile.inc1 245890 2013-01-24 17:12:02Z brooks $ +# $FreeBSD: head/Makefile.inc1 246097 2013-01-29 22:17:58Z brooks $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -185,7 +185,7 @@ .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp # /usr/games added for fortune which depend on strfile -BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games +BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games:${WORLDTMP}/legacy/bin XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} @@ -412,7 +412,7 @@ rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ - lib usr legacy/usr + lib usr legacy/bin legacy/usr mkdir -p ${WORLDTMP}/${_dir} .endfor mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ @@ -673,8 +673,8 @@ ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep id install ${_install-info} \ - ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ - test true uname wc ${_zoneinfo} + ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \ + rm sed sh sysctl test true uname wc ${_zoneinfo} # # distributeworld @@ -964,7 +964,7 @@ @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ - ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} + ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} distributekernel distributekernel.debug: .if empty(INSTALLKERNEL) @@ -1044,7 +1044,7 @@ echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT} ; \ echo "--------------------------------------------------------------" ; \ echo "!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!" ; \ - echo "!! Update methods with ${SUP} are deprecated." ; \ + echo "!! Update methods with CVS are deprecated." ; \ echo "!! Please see http://www.freebsd.org/handbook/svn.html" ; \ echo "!! and convert your update method to SVN_UPDATE or" ; \ echo "!! freebsd-update(8)." ; \ @@ -1132,8 +1132,14 @@ .if ${BOOTSTRAPPING} < 1000026 _nmtree= lib/libnetbsd \ usr.sbin/nmtree +.else +_nmtree_itools= nmtree .endif +.if ${BOOTSTRAPPING} < 1000027 +_cat= bin/cat +.endif + .if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041 _awk= usr.bin/awk .endif @@ -1189,6 +1195,7 @@ ${_ar} \ ${_dtc} \ ${_awk} \ + ${_cat} \ usr.bin/lorder \ usr.bin/makewhatis \ ${_mklocale} \ ==== //depot/projects/ctsrd/beribsd/src/UPDATING#6 (text+ko) ==== @@ -26,6 +26,13 @@ disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130129: + A BSD-licensed patch(1) variant has been added and is installed + as bsdpatch, being the GNU version the default patch. + To inverse the logic and use the BSD-licensed one as default, + while having the GNU version installed as gnupatch, rebuild + ans install world with the WITH_BSD_PATCH knob set. + 20130118: The install(1) option -M has changed meaning and now takes an argument that is a file or path to append logs to. In the @@ -1751,4 +1758,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: head/UPDATING 245617 2013-01-18 20:57:50Z brooks $ +$FreeBSD: head/UPDATING 246074 2013-01-29 17:03:18Z gabor $ ==== //depot/projects/ctsrd/beribsd/src/bin/cat/cat.1#4 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)cat.1 8.3 (Berkeley) 5/2/95 -.\" $FreeBSD: head/bin/cat/cat.1 240192 2012-09-07 09:00:25Z kevlo $ +.\" $FreeBSD: head/bin/cat/cat.1 246090 2013-01-29 20:01:47Z joel $ .\" -.Dd March 21, 2004 +.Dd January 29, 2013 .Dt CAT 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd concatenate and print files .Sh SYNOPSIS .Nm -.Op Fl benstuv +.Op Fl belnstuv .Op Ar .Sh DESCRIPTION The @@ -79,6 +79,16 @@ option), and display a dollar sign .Pq Ql \&$ at the end of each line. +.It Fl l +Set an exclusive advisory lock on the standard output file descriptor. +This lock is set using +.Xr fcntl 2 +with the +.Dv F_SETLKW +command. +If the output file is already locked, +.Nm +will block until the lock is acquired. .It Fl n Number the output lines, starting at 1. .It Fl s @@ -160,6 +170,7 @@ .Xr tail 1 , .Xr vis 1 , .Xr zcat 1 , +.Xr fcntl 2 , .Xr setbuf 3 .Rs .%A Rob Pike @@ -175,7 +186,7 @@ specification. .Pp The flags -.Op Fl benstv +.Op Fl belnstv are extensions to the specification. .Sh HISTORY A ==== //depot/projects/ctsrd/beribsd/src/bin/cat/cat.c#4 (text+ko) ==== @@ -44,7 +44,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: head/bin/cat/cat.c 238653 2012-07-20 08:33:23Z jh $"); +__FBSDID("$FreeBSD: head/bin/cat/cat.c 246083 2013-01-29 18:19:40Z brooks $"); #include #include @@ -64,7 +64,7 @@ #include #include -static int bflag, eflag, nflag, sflag, tflag, vflag; +static int bflag, eflag, lflag, nflag, sflag, tflag, vflag; static int rval; static const char *filename; @@ -96,10 +96,11 @@ main(int argc, char *argv[]) { int ch; + struct flock stdout_lock; setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc, argv, "benstuv")) != -1) + while ((ch = getopt(argc, argv, "belnstuv")) != -1) switch (ch) { case 'b': bflag = nflag = 1; /* -b implies -n */ @@ -107,6 +108,9 @@ case 'e': eflag = vflag = 1; /* -e implies -v */ break; + case 'l': + lflag = 1; + break; case 'n': nflag = 1; break; @@ -127,6 +131,15 @@ } argv += optind; + if (lflag) { + stdout_lock.l_len = 0; + stdout_lock.l_start = 0; + stdout_lock.l_type = F_WRLCK; + stdout_lock.l_whence = SEEK_SET; + if (fcntl(STDOUT_FILENO, F_SETLKW, &stdout_lock) == -1) + err(EXIT_FAILURE, "stdout"); + } + if (bflag || eflag || nflag || sflag || tflag || vflag) scanfiles(argv, 1); else @@ -140,7 +153,7 @@ static void usage(void) { - fprintf(stderr, "usage: cat [-benstuv] [file ...]\n"); + fprintf(stderr, "usage: cat [-belnstuv] [file ...]\n"); exit(1); /* NOTREACHED */ } ==== //depot/projects/ctsrd/beribsd/src/bin/cp/utils.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: head/bin/cp/utils.c 245832 2013-01-23 02:06:20Z obrien $"); +__FBSDID("$FreeBSD: head/bin/cp/utils.c 245960 2013-01-27 05:59:28Z markj $"); #include #include @@ -266,6 +266,11 @@ int len; char llink[PATH_MAX]; + if (exists && nflag) { + if (vflag) + printf("%s not overwritten\n", to.p_path); + return (1); + } if ((len = readlink(p->fts_path, llink, sizeof(llink) - 1)) == -1) { warn("readlink: %s", p->fts_path); return (1); @@ -285,6 +290,12 @@ int copy_fifo(struct stat *from_stat, int exists) { + + if (exists && nflag) { + if (vflag) + printf("%s not overwritten\n", to.p_path); + return (1); + } if (exists && unlink(to.p_path)) { warn("unlink: %s", to.p_path); return (1); @@ -299,6 +310,12 @@ int copy_special(struct stat *from_stat, int exists) { + + if (exists && nflag) { + if (vflag) + printf("%s not overwritten\n", to.p_path); + return (1); + } if (exists && unlink(to.p_path)) { warn("unlink: %s", to.p_path); return (1); ==== //depot/projects/ctsrd/beribsd/src/bin/df/df.1#4 (text+ko) ==== @@ -27,9 +27,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)df.1 8.3 (Berkeley) 5/8/95 -.\" $FreeBSD: head/bin/df/df.1 245871 2013-01-24 05:36:37Z delphij $ +.\" $FreeBSD: head/bin/df/df.1 245912 2013-01-25 18:47:16Z delphij $ .\" -.Dd January 24, 2012 +.Dd January 24, 2013 .Dt DF 1 .Os .Sh NAME ==== //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_target/snmp_target.3#4 (text+ko) ==== @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/contrib/bsnmp/snmp_target/snmp_target.3 237193 2012-06-17 11:33:55Z joel $ +.\" $FreeBSD: head/contrib/bsnmp/snmp_target/snmp_target.3 245952 2013-01-26 22:08:21Z pfg $ .\" .Dd December 16, 2010 .Dt SNMP_TARGET 3 ==== //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_target/target_snmp.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: head/contrib/bsnmp/snmp_target/target_snmp.c 216594 2010-12-20 17:13:14Z syrinx $ + * $FreeBSD: head/contrib/bsnmp/snmp_target/target_snmp.c 245952 2013-01-26 22:08:21Z pfg $ */ #include #include ==== //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_usm/snmp_usm.3#4 (text+ko) ==== @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/contrib/bsnmp/snmp_usm/snmp_usm.3 237194 2012-06-17 11:36:28Z joel $ +.\" $FreeBSD: head/contrib/bsnmp/snmp_usm/snmp_usm.3 245952 2013-01-26 22:08:21Z pfg $ .\" .Dd September 9, 2010 .Dt SNMP_USM 3 ==== //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_usm/usm_snmp.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: head/contrib/bsnmp/snmp_usm/usm_snmp.c 216294 2010-12-08 13:51:38Z syrinx $ + * $FreeBSD: head/contrib/bsnmp/snmp_usm/usm_snmp.c 245952 2013-01-26 22:08:21Z pfg $ */ #include #include ==== //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_vacm/snmp_vacm.3#4 (text+ko) ==== @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/contrib/bsnmp/snmp_vacm/snmp_vacm.3 237193 2012-06-17 11:33:55Z joel $ +.\" $FreeBSD: head/contrib/bsnmp/snmp_vacm/snmp_vacm.3 245952 2013-01-26 22:08:21Z pfg $ .\" .Dd October 7, 2010 .Dt SNMP_VACM 3 ==== //depot/projects/ctsrd/beribsd/src/contrib/bsnmp/snmp_vacm/vacm_snmp.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: head/contrib/bsnmp/snmp_vacm/vacm_snmp.c 216294 2010-12-08 13:51:38Z syrinx $ + * $FreeBSD: head/contrib/bsnmp/snmp_vacm/vacm_snmp.c 245952 2013-01-26 22:08:21Z pfg $ */ #include #include ==== //depot/projects/ctsrd/beribsd/src/contrib/ee/ee.c#3 (text+ko) ==== @@ -55,7 +55,7 @@ */ #include -__FBSDID("$FreeBSD: head/contrib/ee/ee.c 228627 2011-12-17 14:26:16Z dim $"); +__FBSDID("$FreeBSD: head/contrib/ee/ee.c 245952 2013-01-26 22:08:21Z pfg $"); char *ee_copyright_message = "Copyright (c) 1986, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2009 Hugh Mahon "; ==== //depot/projects/ctsrd/beribsd/src/contrib/ipfilter/FreeBSD-4.0/ipv6-patch-4.0#3 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: head/contrib/ipfilter/FreeBSD-4.0/ipv6-patch-4.0 145519 2005-04-25 18:20:15Z darrenr $ +.\" $FreeBSD: head/contrib/ipfilter/FreeBSD-4.0/ipv6-patch-4.0 245952 2013-01-26 22:08:21Z pfg $ .\" *** ip6_input.c.orig Sun Feb 13 14:32:01 2000 --- ip6_input.c Wed Apr 26 22:31:34 2000 ==== //depot/projects/ctsrd/beribsd/src/etc/Makefile#5 (text+ko) ==== @@ -1,5 +1,5 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 -# $FreeBSD: head/etc/Makefile 245825 2013-01-22 21:10:03Z brooks $ +# $FreeBSD: head/etc/Makefile 246097 2013-01-29 22:17:58Z brooks $ .include @@ -180,6 +180,10 @@ PWD_MKDB_ENDIAN?= .endif +.if defined(NO_ROOT) +METALOG.add?= cat -l >> ${METALOG} +.endif + distribution: .if !defined(DESTDIR) @echo "set DESTDIR before running \"make ${.TARGET}\"" @@ -201,6 +205,14 @@ .endif pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ ${DESTDIR}/etc/master.passwd +.if defined(NO_ROOT) + ( \ + echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \ + echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ + echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ + echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ + ) | ${METALOG.add} +.endif .if ${MK_ATF} != "no" ${_+_}cd ${.CURDIR}/atf; ${MAKE} install .endif @@ -336,9 +348,9 @@ test "$$d" == "/" && d=""; \ d=${DISTBASE}$$d; \ shift; \ - ${ECHO} "${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# >>" \ - "${METALOG}" ; \ - ${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# >> ${METALOG} ; \ + ${ECHO} "${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# |" \ + "${METALOG.add}" ; \ + ${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# | ${METALOG.add} ; \ done; true .endif ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys ==== //depot/projects/ctsrd/beribsd/src/etc/login.conf#4 (text+ko) ==== @@ -7,7 +7,7 @@ # This file controls resource limits, accounting limits and # default user environment settings. # -# $FreeBSD: head/etc/login.conf 244383 2012-12-18 07:27:50Z zont $ +# $FreeBSD: head/etc/login.conf 246002 2013-01-27 21:55:01Z neel $ # # Default settings effectively disable resource limits, see the @@ -59,7 +59,7 @@ staff:\ :tc=default: daemon:\ - :memorylocked=64M:\ + :memorylocked=128M:\ :tc=default: news:\ :tc=default: ==== //depot/projects/ctsrd/beribsd/src/gnu/lib/libsupc++/Version.map#3 (text+ko) ==== @@ -19,7 +19,7 @@ ## Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ## USA. -## $FreeBSD: head/gnu/lib/libsupc++/Version.map 236890 2012-06-11 15:40:57Z theraven $ +## $FreeBSD: head/gnu/lib/libsupc++/Version.map 246028 2013-01-28 11:12:49Z theraven $ # Symbols in the support library (libsupc++) have their own tag. @@ -142,8 +142,37 @@ _ZdaPvRKSt9nothrow_t; _ZdlPv; _ZdlPvRKSt9nothrow_t; + extern "C++" { + std::set_new_handler*; + std::set_terminate*; + std::set_unexpected*; + + std::bad_alloc; + std::bad_cast; + std::exception*; + + "typeinfo for std::bad_alloc"; + "typeinfo for std::bad_cast"; + "typeinfo for std::exception"; + + "typeinfo name for std::bad_alloc"; + "typeinfo name for std::bad_cast"; + "typeinfo name for std::exception"; + + "vtable for std::bad_alloc"; + "vtable for std::bad_cast"; + "vtable for std::exception"; + }; }; +GLIBCXX_3.4.9 { + extern "C++" { + "std::bad_alloc::what() const"; + "std::bad_cast::what() const"; + "std::bad_typeid::what() const"; + }; +} GLIBCXX_3.4; + CXXABI_1.3.1 { __cxa_get_exception_ptr; ==== //depot/projects/ctsrd/beribsd/src/gnu/usr.bin/cc/c++/Makefile#4 (text+ko) ==== @@ -1,4 +1,7 @@ -# $FreeBSD: head/gnu/usr.bin/cc/c++/Makefile 245882 2013-01-24 15:18:41Z brooks $ +# $FreeBSD: head/gnu/usr.bin/cc/c++/Makefile 245898 2013-01-25 06:18:49Z andrew $ + +NO_MAN= +.include .include "../Makefile.inc" .include "../Makefile.fe" @@ -7,13 +10,10 @@ PROG= g++ SRCS+= g++spec.c -NO_MAN= DPADD= ${LIBCPP} ${LIBIBERTY} LDADD= ${LIBCPP} ${LIBIBERTY} -.include - .if ${MK_CLANG_IS_CC} == "no" LINKS= ${BINDIR}/g++ ${BINDIR}/c++ LINKS+= ${BINDIR}/g++ ${BINDIR}/CC ==== //depot/projects/ctsrd/beribsd/src/gnu/usr.bin/patch/Makefile#3 (text+ko) ==== @@ -1,6 +1,17 @@ -# $FreeBSD: head/gnu/usr.bin/patch/Makefile 125910 2004-02-17 01:34:53Z ache $ +# $FreeBSD: head/gnu/usr.bin/patch/Makefile 246074 2013-01-29 17:03:18Z gabor $ + +.include + +.if ${MK_BSD_PATCH} == "yes" +PROG= gnupatch +CLEANFILES+= gnupatch.1 + +gnupatch.1: patch.1 + cp ${.ALLSRC} ${.TARGET} +.else +PROG= patch +.endif -PROG= patch SRCS= backupfile.c inp.c patch.c pch.c util.c version.c CFLAGS+=-DHAVE_CONFIG_H ==== //depot/projects/ctsrd/beribsd/src/include/arpa/Makefile#3 (text+ko) ==== @@ -1,10 +1,10 @@ -# $FreeBSD: head/include/arpa/Makefile 245886 2013-01-24 16:28:37Z brooks $ +# $FreeBSD: head/include/arpa/Makefile 245911 2013-01-25 17:40:10Z brooks $ .include NO_OBJ= INCS= ftp.h inet.h nameser.h nameser_compat.h tftp.h -.if ${MK_TELNET} == "NO" +.if ${MK_TELNET} == "no" INCS+= telnet.h .endif INCSDIR=${INCLUDEDIR}/arpa ==== //depot/projects/ctsrd/beribsd/src/lib/libcxxrt/Version.map#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: head/lib/libcxxrt/Version.map 236890 2012-06-11 15:40:57Z theraven $ +# $FreeBSD: head/lib/libcxxrt/Version.map 246028 2013-01-28 11:12:49Z theraven $ # Define the same version as the libsupc++ from gcc 4.2.1 so that we can use # libcxxrt as a drop-in replacement. @@ -209,18 +209,7 @@ "std::type_info::type_info(std::type_info const&)"; "std::type_info::type_info(std::type_info const&)"; - "std::type_info::~type_info()"; - "std::type_info::~type_info()"; - "std::type_info::~type_info()"; "std::type_info::operator=(std::type_info const&)"; - "std::unexpected()"; - "std::get_terminate()"; - "std::set_terminate(void (*)())"; - "std::get_unexpected()"; - "std::set_unexpected(void (*)())"; - "std::set_new_handler(void (*)())"; - "std::uncaught_exception()"; - "std::terminate()"; # Extensions @@ -243,67 +232,22 @@ CXXRT_1.0 { extern "C++" { - "std::bad_cast::what() const"; - "std::bad_typeid::what() const"; - "std::bad_alloc::what() const"; - "std::exception::what() const"; "std::type_info::name() const"; "std::type_info::before(std::type_info const&) const"; "std::type_info::operator==(std::type_info const&) const"; "std::type_info::operator!=(std::type_info const&) const"; - "std::bad_typeid::bad_typeid(std::bad_typeid const&)"; - "std::bad_typeid::bad_typeid()"; - "std::bad_typeid::bad_typeid(std::bad_typeid const&)"; - "std::bad_typeid::bad_typeid()"; - "std::bad_typeid::~bad_typeid()"; - "std::bad_typeid::~bad_typeid()"; - "std::bad_typeid::~bad_typeid()"; - "std::bad_typeid::operator=(std::bad_typeid const&)"; "std::bad_cast::bad_cast(std::bad_cast const&)"; "std::bad_cast::bad_cast()"; "std::bad_cast::bad_cast(std::bad_cast const&)"; "std::bad_cast::bad_cast()"; - "std::bad_cast::~bad_cast()"; - "std::bad_cast::~bad_cast()"; - "std::bad_cast::~bad_cast()"; "std::bad_cast::operator=(std::bad_cast const&)"; - "std::bad_alloc::bad_alloc(std::bad_alloc const&)"; - "std::bad_alloc::bad_alloc()"; - "std::bad_alloc::bad_alloc(std::bad_alloc const&)"; - "std::bad_alloc::bad_alloc()"; - "std::bad_alloc::~bad_alloc()"; - "std::bad_alloc::~bad_alloc()"; - "std::bad_alloc::~bad_alloc()"; - "std::bad_alloc::operator=(std::bad_alloc const&)"; "std::exception::exception(std::exception const&)"; "std::exception::exception()"; "std::exception::exception(std::exception const&)"; "std::exception::exception()"; - "std::exception::~exception()"; - "std::exception::~exception()"; - "std::exception::~exception()"; "std::exception::operator=(std::exception const&)"; - "vtable for std::bad_typeid"; - "vtable for std::bad_cast"; - "vtable for std::bad_alloc"; - "vtable for std::exception"; - "vtable for std::type_info"; - "typeinfo for std::bad_typeid"; - "typeinfo for std::bad_cast"; - "typeinfo for std::bad_alloc"; - "typeinfo for std::exception"; - "typeinfo for std::type_info"; - "typeinfo name for std::bad_typeid"; - "typeinfo name for std::bad_cast"; - "typeinfo name for std::bad_alloc"; - "typeinfo name for std::exception"; - "typeinfo name for std::type_info"; - - "std::type_info::__is_function_p() const"; - "std::type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void**) const"; - "std::type_info::__is_pointer_p() const"; @@ -317,6 +261,7 @@ } CXXABI_1.3.1; + GLIBCXX_3.4 { extern "C++" { "operator delete[](void*)"; @@ -327,5 +272,50 @@ "operator new[](unsigned long)"; "operator new(unsigned long)"; "operator new(unsigned long, std::nothrow_t const&)"; + + "std::unexpected()"; + "std::get_terminate()"; + "std::get_unexpected()"; + "std::uncaught_exception()"; + "std::terminate()"; + + "std::type_info::~type_info()"; + "std::bad_cast::~bad_cast()"; + "std::exception::~exception()"; + + std::set_new_handler*; + std::set_terminate*; + std::set_unexpected*; + std::exception*; + std::bad_alloc; + std::bad_typeid; + std::type_info*; + + "vtable for std::bad_alloc"; + "vtable for std::bad_cast"; + "vtable for std::bad_typeid"; + "vtable for std::exception"; + "vtable for std::type_info"; + + "typeinfo for std::bad_alloc"; + "typeinfo for std::bad_typeid"; + "typeinfo for std::exception"; + "typeinfo for std::bad_cast"; + "typeinfo for std::exception"; + "typeinfo for std::type_info"; + "typeinfo name for std::bad_typeid"; + "typeinfo name for std::bad_cast"; + "typeinfo name for std::exception"; + "typeinfo name for std::type_info"; + }; }; + +GLIBCXX_3.4.9 { + extern "C++" { + "std::bad_typeid::what() const"; + "std::bad_cast::what() const"; + "std::bad_alloc::what() const"; + }; +} GLIBCXX_3.4; + ==== //depot/projects/ctsrd/beribsd/src/lib/libproc/proc_rtld.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: head/lib/libproc/proc_rtld.c 211184 2010-08-11 17:33:26Z rpaulo $"); +__FBSDID("$FreeBSD: head/lib/libproc/proc_rtld.c 246035 2013-01-28 15:48:31Z jhb $"); #include #include @@ -44,7 +44,8 @@ if (phdl->nobjs >= phdl->rdobjsz) { phdl->rdobjsz *= 2; - phdl->rdobjs = realloc(phdl->rdobjs, phdl->rdobjsz); + phdl->rdobjs = reallocf(phdl->rdobjs, sizeof(*phdl->rdobjs) * + phdl->rdobjsz); if (phdl->rdobjs == NULL) return (-1); } ==== //depot/projects/ctsrd/beribsd/src/sbin/geom/class/part/gpart.8#5 (text+ko) ==== @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/sbin/geom/class/part/gpart.8 245012 2013-01-03 21:58:28Z wblock $ +.\" $FreeBSD: head/sbin/geom/class/part/gpart.8 245910 2013-01-25 16:33:00Z wblock $ .\" -.Dd January 3, 2013 +.Dd January 25, 2013 .Dt GPART 8 .Os .Sh NAME @@ -807,34 +807,51 @@ First, a protective MBR is embedded into the first disk sector from the .Pa /boot/pmbr image. -It searches the GPT +It searches through the GPT for a .Cm freebsd-boot partition (see the .Sx "PARTITION TYPES" -section) in the GPT and runs the next bootstrap stage from it. +section) and runs the next bootstrap stage from it. The .Cm freebsd-boot partition should be smaller than 545 KB. +It can be located either before or after other +.Fx +partitions on the disk. There are two variants of bootstrap code to write to this partition: .Pa /boot/gptboot and .Pa /boot/gptzfsboot . .Pa /boot/gptboot is used to boot from UFS. -It searches +It searches through +.Cm freebsd-ufs +partitions in the GPT and boots from the first one with the +.Cm bootonce +attribute set. +If that attribute is not found, +.Pa /boot/gptboot +boots from the first +.Cm freebsd-ufs +partition with the +.Cm bootme +attribute set. +If neither attribute is found, +.Pa /boot/gptboot +boots from the first .Cm freebsd-ufs -GPT partitions and starts +partition. >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Jan 30 14:18:18 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C7694DA7; Wed, 30 Jan 2013 14:18:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 42C2EDA5 for ; Wed, 30 Jan 2013 14:18:18 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 34323CD3 for ; Wed, 30 Jan 2013 14:18:18 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r0UEIHsU065288 for ; Wed, 30 Jan 2013 14:18:17 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r0UEIHSv065285 for perforce@freebsd.org; Wed, 30 Jan 2013 14:18:17 GMT (envelope-from bz@freebsd.org) Date: Wed, 30 Jan 2013 14:18:17 GMT Message-Id: <201301301418.r0UEIHSv065285@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 221608 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2013 14:18:19 -0000 http://p4web.freebsd.org/@@221608?ac=10 Change 221608 by bz@bz_zenith on 2013/01/30 14:17:59 Make this region shareable so that atse(4) can read it to get the Ethernet address(es) for now. Having a loader will solve this properly. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf_fdt.c#5 edit .. //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf_nexus.c#8 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf_fdt.c#5 (text+ko) ==== @@ -83,7 +83,7 @@ sc->isf_unit = device_get_unit(dev); sc->isf_rid = 0; sc->isf_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &sc->isf_rid, RF_ACTIVE); + &sc->isf_rid, RF_ACTIVE | RF_SHAREABLE); if (sc->isf_res == NULL) { device_printf(dev, "couldn't map memory\n"); return (ENXIO); ==== //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf_nexus.c#8 (text+ko) ==== @@ -77,7 +77,7 @@ sc->isf_unit = device_get_unit(dev); sc->isf_rid = 0; sc->isf_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &sc->isf_rid, RF_ACTIVE); + &sc->isf_rid, RF_ACTIVE | RF_SHAREABLE); if (sc->isf_res == NULL) { device_printf(dev, "couldn't map memory\n"); return (ENXIO); From owner-p4-projects@FreeBSD.ORG Wed Jan 30 17:46:14 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0241EA85; Wed, 30 Jan 2013 17:46:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B9070A83 for ; Wed, 30 Jan 2013 17:46:13 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8CFD4B11 for ; Wed, 30 Jan 2013 17:46:13 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r0UHkD8A085922 for ; Wed, 30 Jan 2013 17:46:13 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r0UHkDpW085919 for perforce@freebsd.org; Wed, 30 Jan 2013 17:46:13 GMT (envelope-from brooks@freebsd.org) Date: Wed, 30 Jan 2013 17:46:13 GMT Message-Id: <201301301746.r0UHkDpW085919@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 221619 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2013 17:46:14 -0000 http://p4web.freebsd.org/@@221619?ac=10 Change 221619 by brooks@brooks_zenith on 2013/01/30 17:45:19 IFC @221618 Affected files ... .. //depot/projects/ctsrd/beribsd/src/UPDATING#7 integrate .. //depot/projects/ctsrd/beribsd/src/etc/Makefile#6 integrate .. //depot/projects/ctsrd/beribsd/src/include/stdio.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/amd64/sys/__vdso_gettc.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/arm/sys/Makefile.inc#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/arm/sys/__vdso_gettc.c#1 branch .. //depot/projects/ctsrd/beribsd/src/lib/libc/i386/sys/__vdso_gettc.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/ia64/sys/Makefile.inc#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/ia64/sys/__vdso_gettc.c#1 branch .. //depot/projects/ctsrd/beribsd/src/lib/libc/mips/sys/Makefile.inc#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/mips/sys/__vdso_gettc.c#1 branch .. //depot/projects/ctsrd/beribsd/src/lib/libc/powerpc/Makefile.inc#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/powerpc/sys/__vdso_gettc.c#1 branch .. //depot/projects/ctsrd/beribsd/src/lib/libc/powerpc64/Makefile.inc#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/powerpc64/sys/__vdso_gettc.c#1 branch .. //depot/projects/ctsrd/beribsd/src/lib/libc/sparc64/Makefile.inc#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/sparc64/sys/__vdso_gettc.c#1 branch .. //depot/projects/ctsrd/beribsd/src/lib/libc/stdio/Makefile.inc#4 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/stdio/Symbol.map#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/stdio/fmemopen.c#1 branch .. //depot/projects/ctsrd/beribsd/src/lib/libc/stdio/fopen.3#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/sys/__vdso_gettimeofday.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/lib/libc/sys/gettimeofday.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-io.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.8#3 integrate .. //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.cc#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/amd64/include/vmm_instruction_emul.h#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/amd64/vmm/vmm_instruction_emul.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/at91dci.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/atmegadci.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/avr32dci.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/dwc_otg.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/ehci.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/musb_otg.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/ohci.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/uhci.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/usb_controller.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/uss820dci.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/xhci.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/storage/ustorage_fs.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_audio.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_cdce.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_kbd.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_modem.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_mouse.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_msc.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/template/usb_template_mtp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/ufm_ioctl.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_busdma.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_busdma.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_compat_linux.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_core.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_core.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_debug.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_dev.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_dev.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_device.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_dynamic.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_endian.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_error.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_freebsd.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_freebsd_loader.h#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_generic.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_handle_request.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_hid.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_hub.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_ioctl.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_lookup.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_mbuf.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_msctest.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_parse.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_pci.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_pf.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_process.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_process.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_request.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_transfer.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_util.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usbdi.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usbhid.h#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/kern/kern_exit.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/sys/vdso.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/x86/x86/tsc.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/tools/regression/lib/libc/stdio/test-fmemopen.c#1 branch .. //depot/projects/ctsrd/beribsd/src/tools/regression/lib/libc/stdio/test-fmemopen.t#1 branch .. //depot/projects/ctsrd/beribsd/src/tools/test/pthread_vfork/pthread_vfork_test.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bhyve/pci_emul.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bhyve/pci_emul.h#2 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bhyve/pci_virtio_net.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/bhyve/virtio.h#2 integrate Differences ... ==== //depot/projects/ctsrd/beribsd/src/UPDATING#7 (text+ko) ==== @@ -31,7 +31,7 @@ as bsdpatch, being the GNU version the default patch. To inverse the logic and use the BSD-licensed one as default, while having the GNU version installed as gnupatch, rebuild - ans install world with the WITH_BSD_PATCH knob set. + and install world with the WITH_BSD_PATCH knob set. 20130118: The install(1) option -M has changed meaning and now takes an @@ -1758,4 +1758,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: head/UPDATING 246074 2013-01-29 17:03:18Z gabor $ +$FreeBSD: head/UPDATING 246114 2013-01-30 10:23:38Z gabor $ ==== //depot/projects/ctsrd/beribsd/src/etc/Makefile#6 (text+ko) ==== @@ -1,5 +1,5 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 -# $FreeBSD: head/etc/Makefile 246097 2013-01-29 22:17:58Z brooks $ +# $FreeBSD: head/etc/Makefile 246127 2013-01-30 17:39:43Z brooks $ .include @@ -348,9 +348,10 @@ test "$$d" == "/" && d=""; \ d=${DISTBASE}$$d; \ shift; \ - ${ECHO} "${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# |" \ - "${METALOG.add}" ; \ - ${MTREE_CMD} -C -f $$m | sed s#^\.#.$$d# | ${METALOG.add} ; \ + ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \ + "sed s#^\.#.$$d# | ${METALOG.add}" ; \ + ${MTREE_CMD:N-W} -C -f $$m -K uname,gname | sed s#^\.#.$$d# | \ + ${METALOG.add} ; \ done; true .endif ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys ==== //depot/projects/ctsrd/beribsd/src/include/stdio.h#4 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * @(#)stdio.h 8.5 (Berkeley) 4/29/95 - * $FreeBSD: head/include/stdio.h 233600 2012-03-28 12:11:54Z theraven $ + * $FreeBSD: head/include/stdio.h 246120 2013-01-30 14:59:26Z gahr $ */ #ifndef _STDIO_H_ @@ -343,6 +343,7 @@ #endif #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +FILE *fmemopen(void * __restrict, size_t, const char * __restrict); ssize_t getdelim(char ** __restrict, size_t * __restrict, int, FILE * __restrict); int renameat(int, const char *, int, const char *); ==== //depot/projects/ctsrd/beribsd/src/lib/libc/amd64/sys/__vdso_gettc.c#3 (text+ko) ==== @@ -24,12 +24,14 @@ */ #include -__FBSDID("$FreeBSD: head/lib/libc/amd64/sys/__vdso_gettc.c 237434 2012-06-22 07:13:30Z kib $"); +__FBSDID("$FreeBSD: head/lib/libc/amd64/sys/__vdso_gettc.c 246117 2013-01-30 12:48:16Z kib $"); #include +#include #include #include #include +#include "libc_private.h" static u_int __vdso_gettc_low(const struct vdso_timehands *th) @@ -41,9 +43,18 @@ return (rv); } +#pragma weak __vdso_gettc u_int __vdso_gettc(const struct vdso_timehands *th) { return (th->th_x86_shift > 0 ? __vdso_gettc_low(th) : rdtsc32()); } + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (_elf_aux_info(AT_TIMEKEEP, tk, sizeof(*tk))); +} ==== //depot/projects/ctsrd/beribsd/src/lib/libc/arm/sys/Makefile.inc#3 (text+ko) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: head/lib/libc/arm/sys/Makefile.inc 184789 2008-11-09 10:45:13Z ed $ +# $FreeBSD: head/lib/libc/arm/sys/Makefile.inc 246117 2013-01-30 12:48:16Z kib $ + +SRCS+= __vdso_gettc.c MDASM= Ovfork.S brk.S cerror.S pipe.S ptrace.S sbrk.S shmat.S sigreturn.S syscall.S ==== //depot/projects/ctsrd/beribsd/src/lib/libc/i386/sys/__vdso_gettc.c#3 (text+ko) ==== @@ -24,12 +24,14 @@ */ #include -__FBSDID("$FreeBSD: head/lib/libc/i386/sys/__vdso_gettc.c 237434 2012-06-22 07:13:30Z kib $"); +__FBSDID("$FreeBSD: head/lib/libc/i386/sys/__vdso_gettc.c 246117 2013-01-30 12:48:16Z kib $"); #include +#include #include #include #include +#include "libc_private.h" static u_int __vdso_gettc_low(const struct vdso_timehands *th) @@ -48,3 +50,11 @@ return (th->th_x86_shift > 0 ? __vdso_gettc_low(th) : rdtsc32()); } + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (_elf_aux_info(AT_TIMEKEEP, tk, sizeof(*tk))); +} ==== //depot/projects/ctsrd/beribsd/src/lib/libc/ia64/sys/Makefile.inc#3 (text+ko) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: head/lib/libc/ia64/sys/Makefile.inc 184789 2008-11-09 10:45:13Z ed $ +# $FreeBSD: head/lib/libc/ia64/sys/Makefile.inc 246117 2013-01-30 12:48:16Z kib $ + +SRCS+= __vdso_gettc.c MDASM+= Ovfork.S brk.S cerror.S exect.S fork.S getcontext.S pipe.S ptrace.S \ sbrk.S setlogin.S sigreturn.S swapcontext.S ==== //depot/projects/ctsrd/beribsd/src/lib/libc/mips/sys/Makefile.inc#3 (text+ko) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: head/lib/libc/mips/sys/Makefile.inc 209233 2010-06-16 14:13:36Z jchandra $ +# $FreeBSD: head/lib/libc/mips/sys/Makefile.inc 246117 2013-01-30 12:48:16Z kib $ + +SRCS+= __vdso_gettc.c MDASM= Ovfork.S brk.S cerror.S exect.S \ fork.S pipe.S ptrace.S sbrk.S syscall.S ==== //depot/projects/ctsrd/beribsd/src/lib/libc/powerpc/Makefile.inc#3 (text+ko) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: head/lib/libc/powerpc/Makefile.inc 156613 2006-03-13 01:15:01Z deischen $ +# $FreeBSD: head/lib/libc/powerpc/Makefile.inc 246117 2013-01-30 12:48:16Z kib $ + +SRCS+= __vdso_gettc.c # Long double is 64-bits MDSRCS+=machdep_ldisd.c ==== //depot/projects/ctsrd/beribsd/src/lib/libc/powerpc64/Makefile.inc#3 (text+ko) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: head/lib/libc/powerpc64/Makefile.inc 209878 2010-07-10 14:45:03Z nwhitehorn $ +# $FreeBSD: head/lib/libc/powerpc64/Makefile.inc 246117 2013-01-30 12:48:16Z kib $ + +SRCS+= __vdso_gettc.c # Long double is 64-bits MDSRCS+=machdep_ldisd.c ==== //depot/projects/ctsrd/beribsd/src/lib/libc/sparc64/Makefile.inc#3 (text+ko) ==== @@ -1,10 +1,12 @@ -# $FreeBSD: head/lib/libc/sparc64/Makefile.inc 174204 2007-12-03 07:17:33Z das $ +# $FreeBSD: head/lib/libc/sparc64/Makefile.inc 246117 2013-01-30 12:48:16Z kib $ # # Machine dependent definitions for the ultra sparc architecture. # .include "fpu/Makefile.inc" +SRCS+= __vdso_gettc.c + # Long double is quad precision GDTOASRCS+=strtorQ.c MDSRCS+=machdep_ldisQ.c ==== //depot/projects/ctsrd/beribsd/src/lib/libc/stdio/Makefile.inc#4 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.3 (Berkeley) 4/17/94 -# $FreeBSD: head/lib/libc/stdio/Makefile.inc 235848 2012-05-23 17:13:30Z issyl0 $ +# $FreeBSD: head/lib/libc/stdio/Makefile.inc 246120 2013-01-30 14:59:26Z gahr $ # stdio sources .PATH: ${.CURDIR}/stdio @@ -8,7 +8,8 @@ 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 \ + fileno.c findfp.c flags.c fmemopen.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 \ fwrite.c getc.c getchar.c getdelim.c getline.c \ @@ -48,7 +49,7 @@ MLINKS+=fflush.3 fpurge.3 MLINKS+=fgets.3 gets.3 MLINKS+=flockfile.3 ftrylockfile.3 flockfile.3 funlockfile.3 -MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3 +MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3 fopen.3 fmemopen.3 MLINKS+=fputs.3 puts.3 MLINKS+=fread.3 fwrite.3 MLINKS+=fseek.3 fgetpos.3 fseek.3 fseeko.3 fseek.3 fsetpos.3 fseek.3 ftell.3 \ ==== //depot/projects/ctsrd/beribsd/src/lib/libc/stdio/Symbol.map#3 (text) ==== @@ -1,5 +1,5 @@ /* - * $FreeBSD: head/lib/libc/stdio/Symbol.map 227753 2011-11-20 14:45:42Z theraven $ + * $FreeBSD: head/lib/libc/stdio/Symbol.map 246120 2013-01-30 14:59:26Z gahr $ */ FBSD_1.0 { @@ -155,6 +155,7 @@ getwchar_l; putwc_l; putwchar_l; + fmemopen; }; FBSDprivate_1.0 { ==== //depot/projects/ctsrd/beribsd/src/lib/libc/stdio/fopen.3#3 (text+ko) ==== @@ -30,15 +30,16 @@ .\" SUCH DAMAGE. .\" .\" @(#)fopen.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: head/lib/libc/stdio/fopen.3 243731 2012-11-30 23:51:33Z jilles $ +.\" $FreeBSD: head/lib/libc/stdio/fopen.3 246120 2013-01-30 14:59:26Z gahr $ .\" -.Dd November 30, 2012 +.Dd January 30, 2013 .Dt FOPEN 3 .Os .Sh NAME .Nm fopen , .Nm fdopen , -.Nm freopen +.Nm freopen , +.Nm fmemopen .Nd stream open functions .Sh LIBRARY .Lb libc @@ -50,6 +51,8 @@ .Fn fdopen "int fildes" "const char *mode" .Ft FILE * .Fn freopen "const char *path" "const char *mode" "FILE *stream" +.Ft FILE * +.Fn fmemopen "void *restrict *buf" "size_t size" "const char * restrict mode" .Sh DESCRIPTION The .Fn fopen @@ -202,6 +205,29 @@ .Dv ( stderr , stdin , or .Dv stdout ) . +.Pp +The +.Fn fmemopen +function +associates the buffer given by the +.Fa buf +and +.Fa size +arguments with a stream. +The +.Fa buf +argument shall be either a null pointer or point to a buffer that +is at least +.Fa size +bytes long. +If a null pointer is specified as the +.Fa buf +argument, +.Fn fmemopen +shall allocate +.Fa size +bytes of memory. This buffer shall be automatically freed when the +stream is closed. .Sh RETURN VALUES Upon successful completion .Fn fopen , @@ -225,16 +251,18 @@ to .Fn fopen , .Fn fdopen , +.Fn freopen , or -.Fn freopen +.Fn fmemopen was invalid. .El .Pp The .Fn fopen , -.Fn fdopen +.Fn fdopen , +.Fn freopen and -.Fn freopen +.Fn fmemopen functions may also fail and set .Va errno @@ -294,3 +322,8 @@ .Dq Li e mode option does not conform to any standard but is also supported by glibc. +The +.Fn fmemopen +function +conforms to +.St -p1003.1-2008 . ==== //depot/projects/ctsrd/beribsd/src/lib/libc/sys/__vdso_gettimeofday.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: head/lib/libc/sys/__vdso_gettimeofday.c 237434 2012-06-22 07:13:30Z kib $"); +__FBSDID("$FreeBSD: head/lib/libc/sys/__vdso_gettimeofday.c 246117 2013-01-30 12:48:16Z kib $"); #include #include @@ -79,6 +79,7 @@ static struct vdso_timekeep *tk; +#pragma weak __vdso_gettimeofday int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) { @@ -88,7 +89,7 @@ if (tz != NULL) return (ENOSYS); if (tk == NULL) { - error = _elf_aux_info(AT_TIMEKEEP, &tk, sizeof(tk)); + error = __vdso_gettimekeep(&tk); if (error != 0 || tk == NULL) return (ENOSYS); } @@ -101,6 +102,7 @@ return (0); } +#pragma weak __vdso_clock_gettime int __vdso_clock_gettime(clockid_t clock_id, struct timespec *ts) { ==== //depot/projects/ctsrd/beribsd/src/lib/libc/sys/gettimeofday.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: head/lib/libc/sys/gettimeofday.c 237434 2012-06-22 07:13:30Z kib $"); +__FBSDID("$FreeBSD: head/lib/libc/sys/gettimeofday.c 246117 2013-01-30 12:48:16Z kib $"); #include #include @@ -41,10 +41,7 @@ { int error; - if (__vdso_gettimeofday != NULL && __vdso_gettc != NULL) - error = __vdso_gettimeofday(tv, tz); - else - error = ENOSYS; + error = __vdso_gettimeofday(tv, tz); if (error == ENOSYS) error = __sys_gettimeofday(tv, tz); return (error); ==== //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-io.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-io.c 244686 2012-12-25 17:06:05Z antoine $"); +__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-io.c 246106 2013-01-30 01:36:04Z sbruno $"); #include #include @@ -142,7 +142,7 @@ char buf[MAXPKTSIZE]; if (debug&DEBUG_PACKETS) - tftp_log(LOG_DEBUG, "Sending ERROR %d: %s", error); + tftp_log(LOG_DEBUG, "Sending ERROR %d", error); DROPPACKET("send_error"); ==== //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.8#3 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/sbin/devd/devd.8 228566 2011-12-16 10:21:01Z glebius $ +.\" $FreeBSD: head/sbin/devd/devd.8 246121 2013-01-30 15:21:18Z ian $ .\" .Dd November 24, 2005 .Dt DEVD 8 @@ -35,6 +35,7 @@ .Nm .Op Fl Ddn .Op Fl f Ar file +.Op Fl l Ar num .Sh DESCRIPTION The .Nm @@ -55,6 +56,12 @@ If option .Fl f is specified more than once, the last file specified is used. +.It Fl l Ar num +Limit concurrent +.Pa /var/run/devd.pipe +connections to +.Ar num . +The default connection limit is 10. .It Fl n Do not process all pending events before becoming a daemon. Instead, call daemon right away. ==== //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.cc#5 (text+ko) ==== @@ -63,7 +63,7 @@ // - devd.conf needs more details on the supported statements. #include -__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 243932 2012-12-06 01:25:21Z eadler $"); +__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 246121 2013-01-30 15:21:18Z ian $"); #include #include @@ -80,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -814,23 +815,58 @@ return (fd); } +unsigned int max_clients = 10; /* Default, can be overriden on cmdline. */ +unsigned int num_clients; list clients; void notify_clients(const char *data, int len) { - list bad; - list::const_iterator i; + list::iterator i; - for (i = clients.begin(); i != clients.end(); ++i) { - if (write(*i, data, len) <= 0) { - bad.push_back(*i); + /* + * Deliver the data to all clients. Throw clients overboard at the + * first sign of trouble. This reaps clients who've died or closed + * their sockets, and also clients who are alive but failing to keep up + * (or who are maliciously not reading, to consume buffer space in + * kernel memory or tie up the limited number of available connections). + */ + for (i = clients.begin(); i != clients.end(); ) { + if (write(*i, data, len) != len) { + --num_clients; close(*i); - } + i = clients.erase(i); + } else + ++i; } +} - for (i = bad.begin(); i != bad.end(); ++i) - clients.erase(find(clients.begin(), clients.end(), *i)); +void +check_clients(void) +{ + int s; + struct pollfd pfd; + list::iterator i; + + /* + * Check all existing clients to see if any of them have disappeared. + * Normally we reap clients when we get an error trying to send them an + * event. This check eliminates the problem of an ever-growing list of + * zombie clients because we're never writing to them on a system + * without frequent device-change activity. + */ + pfd.events = 0; + for (i = clients.begin(); i != clients.end(); ) { + pfd.fd = *i; + s = poll(&pfd, 1, 0); + if ((s < 0 && s != EINTR ) || + (s > 0 && (pfd.revents & POLLHUP))) { + --num_clients; + close(*i); + i = clients.erase(i); + } else + ++i; + } } void @@ -838,9 +874,18 @@ { int s; + /* + * First go reap any zombie clients, then accept the connection, and + * shut down the read side to stop clients from consuming kernel memory + * by sending large buffers full of data we'll never read. + */ + check_clients(); s = accept(fd, NULL, NULL); - if (s != -1) + if (s != -1) { + shutdown(s, SHUT_RD); clients.push_back(s); + ++num_clients; + } } static void @@ -851,6 +896,7 @@ char buffer[DEVCTL_MAXBUF]; int once = 0; int server_fd, max_fd; + int accepting; timeval tv; fd_set fds; @@ -858,6 +904,7 @@ if (fd == -1) err(1, "Can't open devctl device %s", PATH_DEVCTL); server_fd = create_socket(PIPE); + accepting = 1; max_fd = max(fd, server_fd) + 1; while (1) { if (romeo_must_die) @@ -880,15 +927,38 @@ once++; } } + /* + * When we've already got the max number of clients, stop + * accepting new connections (don't put server_fd in the set), + * shrink the accept() queue to reject connections quickly, and + * poll the existing clients more often, so that we notice more + * quickly when any of them disappear to free up client slots. + */ FD_ZERO(&fds); FD_SET(fd, &fds); - FD_SET(server_fd, &fds); - rv = select(max_fd, &fds, NULL, NULL, NULL); + if (num_clients < max_clients) { + if (!accepting) { + listen(server_fd, max_clients); + accepting = 1; + } + FD_SET(server_fd, &fds); + tv.tv_sec = 60; + tv.tv_usec = 0; + } else { + if (accepting) { + listen(server_fd, 0); + accepting = 0; + } + tv.tv_sec = 2; + tv.tv_usec = 0; + } + rv = select(max_fd, &fds, NULL, NULL, &tv); if (rv == -1) { if (errno == EINTR) continue; err(1, "select"); - } + } else if (rv == 0) + check_clients(); if (FD_ISSET(fd, &fds)) { rv = read(fd, buffer, sizeof(buffer) - 1); if (rv > 0) { @@ -1007,7 +1077,8 @@ static void usage() { - fprintf(stderr, "usage: %s [-Ddn] [-f file]\n", getprogname()); + fprintf(stderr, "usage: %s [-Ddn] [-l connlimit] [-f file]\n", + getprogname()); exit(1); } @@ -1036,7 +1107,7 @@ int ch; check_devd_enabled(); - while ((ch = getopt(argc, argv, "Ddf:n")) != -1) { + while ((ch = getopt(argc, argv, "Ddf:l:n")) != -1) { switch (ch) { case 'D': Dflag++; @@ -1047,6 +1118,9 @@ case 'f': configfile = optarg; break; + case 'l': + max_clients = MAX(1, strtoul(optarg, NULL, 0)); + break; case 'n': nflag++; break; ==== //depot/projects/ctsrd/beribsd/src/sys/amd64/include/vmm_instruction_emul.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: head/sys/amd64/include/vmm_instruction_emul.h 245652 2013-01-19 04:18:52Z neel $ + * $FreeBSD: head/sys/amd64/include/vmm_instruction_emul.h 246108 2013-01-30 04:09:09Z neel $ */ #ifndef _VMM_INSTRUCTION_EMUL_H_ @@ -49,7 +49,8 @@ uint8_t rex_w:1, /* REX prefix */ rex_r:1, rex_x:1, - rex_b:1; + rex_b:1, + rex_present:1; uint8_t mod:2, /* ModRM byte */ reg:4, ==== //depot/projects/ctsrd/beribsd/src/sys/amd64/vmm/vmm_instruction_emul.c#2 (text+ko) ==== @@ -24,11 +24,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: head/sys/amd64/vmm/vmm_instruction_emul.c 243703 2012-11-30 05:40:24Z grehan $ + * $FreeBSD: head/sys/amd64/vmm/vmm_instruction_emul.c 246108 2013-01-30 04:09:09Z neel $ */ #include -__FBSDID("$FreeBSD: head/sys/amd64/vmm/vmm_instruction_emul.c 243703 2012-11-30 05:40:24Z grehan $"); +__FBSDID("$FreeBSD: head/sys/amd64/vmm/vmm_instruction_emul.c 246108 2013-01-30 04:09:09Z neel $"); #ifdef _KERNEL #include @@ -65,6 +65,10 @@ #define VIE_OP_F_IMM8 (1 << 1) /* 8-bit immediate operand */ static const struct vie_op one_byte_opcodes[256] = { + [0x88] = { + .op_byte = 0x88, + .op_type = VIE_OP_TYPE_MOV, + }, [0x89] = { .op_byte = 0x89, .op_type = VIE_OP_TYPE_MOV, @@ -161,6 +165,46 @@ } static int +vie_read_bytereg(void *vm, int vcpuid, struct vie *vie, uint8_t *rval) +{ + uint64_t val; + int error, rshift; + enum vm_reg_name reg; + + rshift = 0; + reg = gpr_map[vie->reg]; + + /* + * 64-bit mode imposes limitations on accessing legacy byte registers. + * + * The legacy high-byte registers cannot be addressed if the REX + * prefix is present. In this case the values 4, 5, 6 and 7 of the + * 'ModRM:reg' field address %spl, %bpl, %sil and %dil respectively. + * + * If the REX prefix is not present then the values 4, 5, 6 and 7 + * of the 'ModRM:reg' field address the legacy high-byte registers, + * %ah, %ch, %dh and %bh respectively. + */ + if (!vie->rex_present) { + if (vie->reg & 0x4) { + /* + * Obtain the value of %ah by reading %rax and shifting + * right by 8 bits (same for %bh, %ch and %dh). + */ + rshift = 8; + reg = gpr_map[vie->reg & 0x3]; + } + } + + if (!vie_valid_register(reg)) + return (EINVAL); + + error = vm_get_register(vm, vcpuid, reg, &val); + *rval = val >> rshift; + return (error); +} + +static int vie_update_register(void *vm, int vcpuid, enum vm_reg_name reg, uint64_t val, int size) { @@ -209,12 +253,24 @@ { int error, size; enum vm_reg_name reg; + uint8_t byte; uint64_t val; size = 4; error = EINVAL; switch (vie->op.op_byte) { + case 0x88: + /* + * MOV byte from reg (ModRM:reg) to mem (ModRM:r/m) + * 88/r: mov r/m8, r8 + * REX + 88/r: mov r/m8, r8 (%ah, %ch, %dh, %bh not available) + */ + size = 1; + error = vie_read_bytereg(vm, vcpuid, vie, &byte); + if (error == 0) + error = memwrite(vm, vcpuid, gpa, byte, size, arg); + break; case 0x89: /* * MOV from reg (ModRM:reg) to mem (ModRM:r/m) @@ -497,6 +553,8 @@ return (-1); if (x >= 0x40 && x <= 0x4F) { + vie->rex_present = 1; + vie->rex_w = x & 0x8 ? 1 : 0; vie->rex_r = x & 0x4 ? 1 : 0; vie->rex_x = x & 0x2 ? 1 : 0; ==== //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/at91dci.c#5 (text+ko) ==== @@ -1,6 +1,4 @@ -#include -__FBSDID("$FreeBSD: head/sys/dev/usb/controller/at91dci.c 241082 2012-10-01 05:42:43Z hselasky $"); - +/* $FreeBSD: head/sys/dev/usb/controller/at91dci.c 246125 2013-01-30 16:05:54Z hselasky $ */ /*- * Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved. * @@ -44,6 +42,9 @@ * endpoints, Function-address and more. */ +#ifdef USB_GLOBAL_INCLUDE_FILE +#include USB_GLOBAL_INCLUDE_FILE +#else #include #include #include @@ -79,6 +80,8 @@ #include #include +#endif /* USB_GLOBAL_INCLUDE_FILE */ + #include #define AT9100_DCI_BUS2SC(bus) \ @@ -1737,18 +1740,12 @@ .DeviceRemovable = {0}, /* port is removable */ }; -#define STRING_LANG \ - 0x09, 0x04, /* American English */ - #define STRING_VENDOR \ - 'A', 0, 'T', 0, 'M', 0, 'E', 0, 'L', 0 + "A\0T\0M\0E\0L" #define STRING_PRODUCT \ - 'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \ - 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \ - 'U', 0, 'B', 0, + "D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B" -USB_MAKE_STRING_DESC(STRING_LANG, at91dci_langtab); USB_MAKE_STRING_DESC(STRING_VENDOR, at91dci_vendor); USB_MAKE_STRING_DESC(STRING_PRODUCT, at91dci_product); @@ -1950,8 +1947,8 @@ case UDESC_STRING: switch (value & 0xff) { case 0: /* Language table */ - len = sizeof(at91dci_langtab); - ptr = (const void *)&at91dci_langtab; + len = sizeof(usb_string_lang_en); + ptr = (const void *)&usb_string_lang_en; goto tr_valid; case 1: /* Vendor */ ==== //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/atmegadci.c#4 (text+ko) ==== @@ -1,6 +1,4 @@ -#include -__FBSDID("$FreeBSD: head/sys/dev/usb/controller/atmegadci.c 241082 2012-10-01 05:42:43Z hselasky $"); - +/* $FreeBSD: head/sys/dev/usb/controller/atmegadci.c 246125 2013-01-30 16:05:54Z hselasky $ */ /*- * Copyright (c) 2009 Hans Petter Selasky. All rights reserved. * @@ -36,6 +34,9 @@ * endpoints, Function-address and more. */ +#ifdef USB_GLOBAL_INCLUDE_FILE +#include USB_GLOBAL_INCLUDE_FILE +#else #include #include #include @@ -71,6 +72,8 @@ #include #include +#endif /* USB_GLOBAL_INCLUDE_FILE */ + #include #define ATMEGA_BUS2SC(bus) \ @@ -1562,18 +1565,12 @@ .DeviceRemovable = {0}, /* port is removable */ }; -#define STRING_LANG \ - 0x09, 0x04, /* American English */ - #define STRING_VENDOR \ - 'A', 0, 'T', 0, 'M', 0, 'E', 0, 'G', 0, 'A', 0 + "A\0T\0M\0E\0G\0A" #define STRING_PRODUCT \ - 'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \ - 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \ - 'U', 0, 'B', 0, + "D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B" -USB_MAKE_STRING_DESC(STRING_LANG, atmegadci_langtab); USB_MAKE_STRING_DESC(STRING_VENDOR, atmegadci_vendor); USB_MAKE_STRING_DESC(STRING_PRODUCT, atmegadci_product); @@ -1776,8 +1773,8 @@ case UDESC_STRING: switch (value & 0xff) { case 0: /* Language table */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Jan 31 16:28:52 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2FA69247; Thu, 31 Jan 2013 16:28:52 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E6383245 for ; Thu, 31 Jan 2013 16:28:51 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id D4509192 for ; Thu, 31 Jan 2013 16:28:51 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r0VGSpAC020709 for ; Thu, 31 Jan 2013 16:28:51 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r0VGSpcw020706 for perforce@freebsd.org; Thu, 31 Jan 2013 16:28:51 GMT (envelope-from brooks@freebsd.org) Date: Thu, 31 Jan 2013 16:28:51 GMT Message-Id: <201301311628.r0VGSpcw020706@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 221638 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2013 16:28:52 -0000 http://p4web.freebsd.org/@@221638?ac=10 Change 221638 by brooks@brooks_zenith on 2013/01/31 16:28:10 IFC @ 221637 (fix missing suid bits in METALOG) Affected files ... .. //depot/projects/ctsrd/beribsd/src/contrib/ipfilter/ipsend/44arp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/libexec/bootpd/rtmsg.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-io.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-options.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-utils.h#3 integrate .. //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftpd.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.cc#6 integrate .. //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.hh#3 integrate .. //depot/projects/ctsrd/beribsd/src/sbin/route/route.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/share/mk/bsd.own.mk#7 integrate .. //depot/projects/ctsrd/beribsd/src/sys/boot/uboot/common/metadata.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/Makefile#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/Makefile.test#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_busspace.c#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_global.h#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_kernel.c#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_kernel.h#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_usbloader_test.c#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/tools/sysinit.c#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/tools/sysinit.h#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/usb_busdma_loader.c#1 branch .. //depot/projects/ctsrd/beribsd/src/sys/cam/scsi/scsi_all.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_asus_wmi.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_fujitsu.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_hp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_ibm.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_panasonic.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_sony.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_toshiba.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_acad.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_button.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_cmbat.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_dock.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_ec.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_hpet.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_lid.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pci.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pci_link.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pcib_pci.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_perf.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_resource.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_smbat.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_thermal.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_throttle.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_timer.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/adlink/adlink.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/amdsbwd/amdsbwd.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/amdtemp/amdtemp.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ath/if_ath_rx.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/auxio/auxio.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ce/if_ce.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cfi/cfi_bus_fdt.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cfi/cfi_bus_ixp4xx.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/coretemp/coretemp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cp/if_cp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cpufreq/ichss.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ctau/if_ct.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/cx/if_cx.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/digi/digi_isa.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/digi/digi_pci.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/e1000/if_em.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/e1000/if_igb.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/e1000/if_lem.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ep/if_ep_eisa.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ep/if_ep_isa.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ep/if_ep_mca.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ep/if_ep_pccard.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/fdc/fdc_acpi.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/iicbus/ad7418.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/iicbus/ds133x.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/iicbus/ds1672.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/iicbus/icee.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgb/if_ixgb.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgbe/ixgbe.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgbe/ixv.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/mfi/mfi_cam.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/mn/if_mn.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/mxge/if_mxge.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/my/if_my.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/nvram2env/nvram2env.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/nxge/if_nxge.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/oce/oce_if.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/sdhci/sdhci_pci.c#2 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/pci/emu10kx-midi.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/pci/emu10kx-pcm.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/pci/emu10kx.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/sbus/cs4231.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/usb/uaudio_pcm.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/usb_controller.c#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/input/uhid.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/input/ukbd.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/input/ums.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/misc/udbp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/misc/ufm.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_cdce.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_cue.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_ipheth.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_kue.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_smsc.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/storage/umass.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/storage/urio.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/storage/ustorage_fs.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_compat_linux.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/vx/if_vx_eisa.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/vx/if_vx_pci.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/vxge/vxge.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/sys/dev/xen/console/console.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/net/if_llatbl.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/net/if_llatbl.h#6 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet/if_ether.h#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet/in.c#5 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet/libalias/alias.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/sys/netinet/libalias/libalias.3#4 integrate .. //depot/projects/ctsrd/beribsd/src/usr.bin/xinstall/xinstall.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/arp/arp.8#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/arp/arp.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/ndp/ndp.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/ppp/arp.c#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/rarpd/rarpd.c#4 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/tcpdrop/tcpdrop.8#3 integrate .. //depot/projects/ctsrd/beribsd/src/usr.sbin/tcpdrop/tcpdrop.c#3 integrate Differences ... ==== //depot/projects/ctsrd/beribsd/src/contrib/ipfilter/ipsend/44arp.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: head/contrib/ipfilter/ipsend/44arp.c 186119 2008-12-15 06:10:57Z qingli $ */ +/* $FreeBSD: head/contrib/ipfilter/ipsend/44arp.c 246143 2013-01-31 08:55:21Z glebius $ */ /* * Based upon 4.4BSD's /usr/sbin/arp @@ -72,7 +72,7 @@ size_t needed; char *lim, *buf, *next; struct rt_msghdr *rtm; - struct sockaddr_inarp *sin; + struct sockaddr_in *sin; struct sockaddr_dl *sdl; #ifdef IPSEND @@ -113,7 +113,7 @@ for (next = buf; next < lim; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)next; - sin = (struct sockaddr_inarp *)(rtm + 1); + sin = (struct sockaddr_in *)(rtm + 1); sdl = (struct sockaddr_dl *)(sin + 1); if (!bcmp(addr, (char *)&sin->sin_addr, sizeof(struct in_addr))) ==== //depot/projects/ctsrd/beribsd/src/libexec/bootpd/rtmsg.c#3 (text+ko) ==== @@ -42,7 +42,7 @@ */ #include -__FBSDID("$FreeBSD: head/libexec/bootpd/rtmsg.c 216226 2010-12-06 09:39:36Z glebius $"); +__FBSDID("$FreeBSD: head/libexec/bootpd/rtmsg.c 246143 2013-01-31 08:55:21Z glebius $"); #include /* @@ -106,9 +106,9 @@ } static struct sockaddr_in so_mask = {8, 0, 0, { 0xffffffff}}; -static struct sockaddr_inarp blank_sin = {sizeof(blank_sin), AF_INET }, sin_m; +static struct sockaddr_in blank_sin = {sizeof(blank_sin), AF_INET }, sin_m; static struct sockaddr_dl blank_sdl = {sizeof(blank_sdl), AF_LINK }, sdl_m; -static int expire_time, flags, export_only, doing_proxy; +static int expire_time, flags, doing_proxy; static struct { struct rt_msghdr m_rtm; char m_space[512]; @@ -122,7 +122,7 @@ char *eaddr; int len; { - register struct sockaddr_inarp *sin = &sin_m; + register struct sockaddr_in *sin = &sin_m; register struct sockaddr_dl *sdl; register struct rt_msghdr *rtm = &(m_rtmsg.m_rtm); u_char *ea; @@ -137,7 +137,7 @@ ea = (u_char *)LLADDR(&sdl_m); bcopy(eaddr, ea, len); sdl_m.sdl_alen = len; - doing_proxy = flags = export_only = expire_time = 0; + doing_proxy = flags = expire_time = 0; /* make arp entry temporary */ clock_gettime(CLOCK_MONOTONIC, &tp); @@ -148,7 +148,7 @@ report(LOG_WARNING, "rtmget: %s", strerror(errno)); return (1); } - sin = (struct sockaddr_inarp *)(rtm + 1); + sin = (struct sockaddr_in *)(rtm + 1); sdl = (struct sockaddr_dl *)(sin->sin_len + (char *)sin); if (sin->sin_addr.s_addr == sin_m.sin_addr.s_addr) { if (sdl->sdl_family == AF_LINK && @@ -163,13 +163,6 @@ inet_ntoa(sin->sin_addr)); return (1); } - if (sin_m.sin_other & SIN_PROXY) { - report(LOG_WARNING, - "set: proxy entry exists for non 802 device\n"); - return(1); - } - sin_m.sin_other = SIN_PROXY; - export_only = 1; goto tryagain; } overwrite: @@ -209,14 +202,9 @@ rtm->rtm_rmx.rmx_expire = expire_time; rtm->rtm_inits = RTV_EXPIRE; rtm->rtm_flags |= (RTF_HOST | RTF_STATIC | RTF_LLDATA); - sin_m.sin_other = 0; if (doing_proxy) { - if (export_only) - sin_m.sin_other = SIN_PROXY; - else { - rtm->rtm_addrs |= RTA_NETMASK; - rtm->rtm_flags &= ~RTF_HOST; - } + rtm->rtm_addrs |= RTA_NETMASK; + rtm->rtm_flags &= ~RTF_HOST; } /* FALLTHROUGH */ case RTM_GET: ==== //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-io.c#5 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-io.c 246106 2013-01-30 01:36:04Z sbruno $"); +__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-io.c 246139 2013-01-31 00:02:36Z marius $"); #include #include @@ -106,13 +106,13 @@ for (i = 0; i < 12 ; i++) { DROPPACKETn("send_packet", 0); - if (sendto(peer, pkt, size, 0, - (struct sockaddr *)&peer_sock, peer_sock.ss_len) - == size) { + if (sendto(peer, pkt, size, 0, (struct sockaddr *)&peer_sock, + peer_sock.ss_len) == size) { if (i) tftp_log(LOG_ERR, "%s block %d, attempt %d successful", - block, i); + packettype(ntohs(((struct tftphdr *) + (pkt))->th_opcode)), block, i); return (0); } tftp_log(LOG_ERR, ==== //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-options.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-options.c 213099 2010-09-24 10:40:17Z marius $"); +__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-options.c 246139 2013-01-31 00:02:36Z marius $"); #include #include @@ -99,16 +99,17 @@ int option_timeout(int peer) { + int to; if (options[OPT_TIMEOUT].o_request == NULL) return (0); - int to = atoi(options[OPT_TIMEOUT].o_request); + to = atoi(options[OPT_TIMEOUT].o_request); if (to < TIMEOUT_MIN || to > TIMEOUT_MAX) { tftp_log(acting_as_client ? LOG_ERR : LOG_WARNING, "Received bad value for timeout. " - "Should be between %d and %d, received %s", - TIMEOUT_MIN, TIMEOUT_MAX); + "Should be between %d and %d, received %d", + TIMEOUT_MIN, TIMEOUT_MAX, to); send_error(peer, EBADOP); if (acting_as_client) return (1); @@ -195,14 +196,14 @@ tftp_log(LOG_ERR, "Invalid blocksize (%d bytes), " "net.inet.udp.maxdgram sysctl limits it to " - "%d bytes.\n", size, maxdgram); + "%ld bytes.\n", size, maxdgram); send_error(peer, EBADOP); return (1); } else { tftp_log(LOG_WARNING, "Invalid blocksize (%d bytes), " "net.inet.udp.maxdgram sysctl limits it to " - "%d bytes.\n", size, maxdgram); + "%ld bytes.\n", size, maxdgram); size = maxdgram; /* No reason to return */ } @@ -257,7 +258,7 @@ } tftp_log(LOG_INFO, "Invalid blocksize2 (%d bytes), net.inet.udp.maxdgram " - "sysctl limits it to %d bytes.\n", size, maxdgram); + "sysctl limits it to %ld bytes.\n", size, maxdgram); size = sizes[i]; /* No need to return */ } ==== //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-utils.h#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-utils.h 229780 2012-01-07 16:09:54Z uqs $"); +__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-utils.h 246139 2013-01-31 00:02:36Z marius $"); /* */ @@ -106,7 +106,7 @@ extern int tftp_logtostdout; void tftp_openlog(const char *ident, int logopt, int facility); void tftp_closelog(void); -void tftp_log(int priority, const char *message, ...); +void tftp_log(int priority, const char *message, ...) __printflike(2, 3); /* * Performance figures ==== //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftpd.c#3 (text+ko) ==== @@ -43,7 +43,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: head/libexec/tftpd/tftpd.c 241848 2012-10-22 03:07:05Z eadler $"); +__FBSDID("$FreeBSD: head/libexec/tftpd/tftpd.c 246139 2013-01-31 00:02:36Z marius $"); /* * Trivial file transfer protocol server. @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -799,8 +800,8 @@ tftp_send(peer, &block, &ts); read_close(); if (debug&DEBUG_SIMPLE) - tftp_log(LOG_INFO, "Sent %d bytes in %d seconds", - ts.amount, time(NULL) - now); + tftp_log(LOG_INFO, "Sent %jd bytes in %jd seconds", + (intmax_t)ts.amount, (intmax_t)time(NULL) - now); } static void @@ -832,8 +833,8 @@ f = now2.tv_sec - now1.tv_sec + (now2.tv_usec - now1.tv_usec) / 100000.0; tftp_log(LOG_INFO, - "Download of %d bytes in %d blocks completed after %0.1f seconds\n", - ts.amount, block, f); + "Download of %jd bytes in %d blocks completed after %0.1f seconds\n", + (intmax_t)ts.amount, block, f); } return; ==== //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.cc#6 (text+ko) ==== @@ -63,7 +63,7 @@ // - devd.conf needs more details on the supported statements. #include -__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 246121 2013-01-30 15:21:18Z ian $"); +__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 246134 2013-01-30 23:37:35Z ian $"); #include #include @@ -137,7 +137,7 @@ event_proc::event_proc() : _prio(-1) { - // nothing + _epsvec.reserve(4); } event_proc::~event_proc() @@ -241,25 +241,18 @@ bool action::do_action(config &c) { - string s = c.expand_string(_cmd); + string s = c.expand_string(_cmd.c_str()); if (Dflag) fprintf(stderr, "Executing '%s'\n", s.c_str()); my_system(s.c_str()); return (true); } -match::match(config &c, const char *var, const char *re) - : _var(var), _re("^") +match::match(config &c, const char *var, const char *re) : + _inv(re[0] == '!'), + _var(var), + _re(c.expand_string(_inv ? re + 1 : re, "^", "$")) { - if (!c.expand_string(string(re)).empty() && - c.expand_string(string(re)).at(0) == '!') { - _re.append(c.expand_string(string(re)).substr(1)); - _inv = 1; - } else { - _re.append(c.expand_string(string(re))); - _inv = 0; - } - _re.append("$"); regcomp(&_regex, _re.c_str(), REG_EXTENDED | REG_NOSUB | REG_ICASE); } @@ -624,24 +617,37 @@ do { buffer.append(src++, 1); } while (is_id_char(*src)); - buffer.append("", 1); dst.append(get_variable(buffer.c_str())); } const string -config::expand_string(const string &s) +config::expand_string(const char *src, const char *prepend, const char *append) { - const char *src; + const char *var_at; string dst; - src = s.c_str(); - while (*src) { - if (*src == '$') - expand_one(src, dst); - else - dst.append(src++, 1); + /* + * 128 bytes is enough for 2427 of 2438 expansions that happen + * while parsing config files, as tested on 2013-01-30. + */ + dst.reserve(128); + + if (prepend != NULL) + dst = prepend; + + for (;;) { + var_at = strchr(src, '$'); + if (var_at == NULL) { + dst.append(src); + break; + } + dst.append(src, var_at - src); + src = var_at; + expand_one(src, dst); } - dst.append("", 1); + + if (append != NULL) + dst.append(append); return (dst); } ==== //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.hh#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: head/sbin/devd/devd.hh 243932 2012-12-06 01:25:21Z eadler $ + * $FreeBSD: head/sbin/devd/devd.hh 246134 2013-01-30 23:37:35Z ian $ */ #ifndef DEVD_HH @@ -90,9 +90,9 @@ virtual bool do_match(config &); virtual bool do_action(config &) { return true; } private: + bool _inv; std::string _var; std::string _re; - bool _inv; regex_t _regex; }; @@ -162,7 +162,8 @@ void pop_var_table(); void set_variable(const char *var, const char *val); const std::string &get_variable(const std::string &var); - const std::string expand_string(const std::string &var); + const std::string expand_string(const char * var, + const char * prepend = NULL, const char * append = NULL); char *set_vars(char *); void find_and_execute(char); protected: ==== //depot/projects/ctsrd/beribsd/src/sbin/route/route.c#4 (text+ko) ==== @@ -40,7 +40,7 @@ #endif /* not lint */ #include -__FBSDID("$FreeBSD: head/sbin/route/route.c 245168 2013-01-08 17:24:43Z hrs $"); +__FBSDID("$FreeBSD: head/sbin/route/route.c 246143 2013-01-31 08:55:21Z glebius $"); #include #include @@ -86,7 +86,6 @@ #endif struct sockaddr_at sat; struct sockaddr_dl sdl; - struct sockaddr_inarp sinarp; struct sockaddr_storage ss; /* added to avoid memory overrun */ } so_dst, so_gate, so_mask, so_genmask, so_ifa, so_ifp; @@ -923,10 +922,8 @@ flags |= RTF_HOST; if ((nrflags & F_INTERFACE) == 0) flags |= RTF_GATEWAY; - if (nrflags & F_PROXY) { - so_dst.sinarp.sin_other = SIN_PROXY; + if (nrflags & F_PROXY) flags |= RTF_ANNOUNCE; - } if (dest == NULL) dest = ""; if (gateway == NULL) ==== //depot/projects/ctsrd/beribsd/src/share/mk/bsd.own.mk#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: head/share/mk/bsd.own.mk 246074 2013-01-29 17:03:18Z gabor $ +# $FreeBSD: head/share/mk/bsd.own.mk 246131 2013-01-30 19:51:16Z dim $ # # The include file set common variables for owner, # group, mode, and directories. Defaults are in brackets. @@ -481,10 +481,6 @@ MK_CTF:= no .endif -.if ${MK_CLANG} == "no" -MK_CLANG_EXTRAS:= no -.endif - .if ${MK_CRYPT} == "no" MK_OPENSSL:= no MK_OPENSSH:= no @@ -527,6 +523,7 @@ .endif .if ${MK_CLANG} == "no" +MK_CLANG_EXTRAS:= no MK_CLANG_IS_CC:= no .endif ==== //depot/projects/ctsrd/beribsd/src/sys/boot/uboot/common/metadata.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/boot/uboot/common/metadata.c 243693 2012-11-30 03:15:50Z gonzo $"); +__FBSDID("$FreeBSD: head/sys/boot/uboot/common/metadata.c 246135 2013-01-30 23:49:36Z ian $"); #include #include @@ -369,12 +369,15 @@ /* Convert addresses to the final VA */ *modulep -= __elfN(relocation_offset); - for (i = 0; i < sizeof mdt / sizeof mdt[0]; i++) { - md = file_findmetadata(kfp, mdt[i]); - if (md) { - bcopy(md->md_data, &vaddr, sizeof vaddr); - vaddr -= __elfN(relocation_offset); - bcopy(&vaddr, md->md_data, sizeof vaddr); + /* Do relocation fixup on metadata of each module. */ + for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { + for (i = 0; i < sizeof mdt / sizeof mdt[0]; i++) { + md = file_findmetadata(xp, mdt[i]); + if (md) { + bcopy(md->md_data, &vaddr, sizeof vaddr); + vaddr -= __elfN(relocation_offset); + bcopy(&vaddr, md->md_data, sizeof vaddr); + } } } ==== //depot/projects/ctsrd/beribsd/src/sys/cam/scsi/scsi_all.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_all.c 245647 2013-01-19 03:19:39Z kan $"); +__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_all.c 246146 2013-01-31 14:07:24Z smh $"); #include #include @@ -3139,7 +3139,7 @@ *cdb_string = '\0'; for (i = 0; i < cdb_len; i++) snprintf(cdb_string + strlen(cdb_string), - len - strlen(cdb_string), "%x ", cdb_ptr[i]); + len - strlen(cdb_string), "%02hhx ", cdb_ptr[i]); return(cdb_string); } ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_asus_wmi.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_asus_wmi.c 237981 2012-07-02 08:31:29Z mav $"); +__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_asus_wmi.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -304,7 +304,8 @@ DEVMETHOD(device_probe, acpi_asus_wmi_probe), DEVMETHOD(device_attach, acpi_asus_wmi_attach), DEVMETHOD(device_detach, acpi_asus_wmi_detach), - {0, 0} + + DEVMETHOD_END }; static driver_t acpi_asus_wmi_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_fujitsu.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_fujitsu.c 216376 2010-12-11 10:55:18Z avg $"); +__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_fujitsu.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -154,7 +154,8 @@ DEVMETHOD(device_detach, acpi_fujitsu_detach), DEVMETHOD(device_suspend, acpi_fujitsu_suspend), DEVMETHOD(device_resume, acpi_fujitsu_resume), - {0, 0} + + DEVMETHOD_END }; static driver_t acpi_fujitsu_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_hp.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_hp.c 212457 2010-09-11 08:09:14Z avg $"); +__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_hp.c 246128 2013-01-30 18:01:20Z sbz $"); /* * Driver for extra ACPI-controlled features found on HP laptops @@ -324,7 +324,8 @@ DEVMETHOD(device_probe, acpi_hp_probe), DEVMETHOD(device_attach, acpi_hp_attach), DEVMETHOD(device_detach, acpi_hp_detach), - {0, 0} + + DEVMETHOD_END }; static driver_t acpi_hp_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_ibm.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_ibm.c 242305 2012-10-29 10:22:00Z bapt $"); +__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_ibm.c 246128 2013-01-30 18:01:20Z sbz $"); /* * Driver for extra ACPI-controlled gadgets found on IBM ThinkPad laptops. @@ -303,7 +303,7 @@ DEVMETHOD(device_detach, acpi_ibm_detach), DEVMETHOD(device_resume, acpi_ibm_resume), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_ibm_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_panasonic.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_panasonic.c 202771 2010-01-21 21:14:28Z jkim $"); +__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_panasonic.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -118,7 +118,7 @@ DEVMETHOD(device_detach, acpi_panasonic_detach), DEVMETHOD(device_shutdown, acpi_panasonic_shutdown), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_panasonic_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_sony.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_sony.c 203622 2010-02-07 18:36:30Z gavin $"); +__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_sony.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -95,7 +95,7 @@ DEVMETHOD(device_attach, acpi_sony_attach), DEVMETHOD(device_detach, acpi_sony_detach), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_sony_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_toshiba.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_toshiba.c 193530 2009-06-05 18:44:36Z jkim $"); +__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_toshiba.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -172,7 +172,7 @@ DEVMETHOD(device_attach, acpi_toshiba_attach), DEVMETHOD(device_detach, acpi_toshiba_detach), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_toshiba_driver = { @@ -190,7 +190,7 @@ DEVMETHOD(device_probe, acpi_toshiba_video_probe), DEVMETHOD(device_attach, acpi_toshiba_video_attach), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_toshiba_video_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi.c#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi.c 245582 2013-01-17 23:56:43Z jkim $"); +__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -217,7 +217,7 @@ /* ISA emulation */ DEVMETHOD(isa_pnp_probe, acpi_isa_pnp_probe), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_acad.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_acad.c 197649 2009-09-30 17:07:49Z jhb $"); +__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_acad.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -74,7 +74,7 @@ DEVMETHOD(device_probe, acpi_acad_probe), DEVMETHOD(device_attach, acpi_acad_attach), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_acad_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_button.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_button.c 216471 2010-12-15 23:48:45Z jkim $"); +__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_button.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -79,8 +79,7 @@ DEVMETHOD(device_suspend, acpi_button_suspend), DEVMETHOD(device_shutdown, acpi_button_suspend), DEVMETHOD(device_resume, acpi_button_resume), - - {0, 0} + DEVMETHOD_END }; static driver_t acpi_button_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_cmbat.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_cmbat.c 227293 2011-11-07 06:44:47Z ed $"); +__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_cmbat.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -99,7 +99,7 @@ DEVMETHOD(acpi_batt_get_info, acpi_cmbat_bif), DEVMETHOD(acpi_batt_get_status, acpi_cmbat_bst), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_cmbat_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_dock.c#3 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: head/sys/dev/acpica/acpi_dock.c 209064 2010-06-11 19:53:42Z jkim $ + * $FreeBSD: head/sys/dev/acpica/acpi_dock.c 246128 2013-01-30 18:01:20Z sbz $ */ #include "opt_acpi.h" @@ -521,7 +521,7 @@ DEVMETHOD(device_probe, acpi_dock_probe), DEVMETHOD(device_attach, acpi_dock_attach), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_dock_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_ec.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_ec.c 236424 2012-06-01 21:33:33Z jkim $"); +__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_ec.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -253,7 +253,7 @@ DEVMETHOD(acpi_ec_read, acpi_ec_read_method), DEVMETHOD(acpi_ec_write, acpi_ec_write_method), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_ec_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_hpet.c#6 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_hpet.c 240286 2012-09-09 20:00:00Z mav $"); +__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_hpet.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #if defined(__amd64__) || defined(__ia64__) @@ -849,7 +849,7 @@ DEVMETHOD(bus_remap_intr, hpet_remap_intr), #endif - {0, 0} + DEVMETHOD_END }; static driver_t hpet_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_lid.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_lid.c 209746 2010-07-06 20:57:28Z jkim $"); +__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_lid.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include @@ -69,7 +69,7 @@ DEVMETHOD(device_suspend, acpi_lid_suspend), DEVMETHOD(device_resume, acpi_lid_resume), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_lid_driver = { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pci.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci.c 232403 2012-03-02 20:38:04Z jhb $"); +__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci.c 246128 2013-01-30 18:01:20Z sbz $"); #include #include @@ -94,7 +94,7 @@ /* PCI interface */ DEVMETHOD(pci_set_powerstate, acpi_pci_set_powerstate_method), - { 0, 0 } + DEVMETHOD_END }; static devclass_t pci_devclass; ==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pci_link.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci_link.c 227293 2011-11-07 06:44:47Z ed $"); +__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci_link.c 246128 2013-01-30 18:01:20Z sbz $"); #include "opt_acpi.h" #include >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Feb 1 12:26:38 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 828D6F33; Fri, 1 Feb 2013 12:26:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 465B9F2F for ; Fri, 1 Feb 2013 12:26:38 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD3218C for ; Fri, 1 Feb 2013 12:26:38 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r11CQcYB038253 for ; Fri, 1 Feb 2013 12:26:38 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r11CQcw0038250 for perforce@freebsd.org; Fri, 1 Feb 2013 12:26:38 GMT (envelope-from bz@freebsd.org) Date: Fri, 1 Feb 2013 12:26:38 GMT Message-Id: <201302011226.r11CQcw0038250@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 221669 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2013 12:26:38 -0000 http://p4web.freebsd.org/@@221669?ac=10 Change 221669 by bz@bz_zenith on 2013/02/01 12:26:04 Run the initialization for polling earlier along with INTRs so that we can put netowrk interface into polling mode by default if DEVICE_POLLING is compiled in and no interrupts are available. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/kern/kern_poll.c#3 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/kern/kern_poll.c#3 (text+ko) ==== @@ -268,7 +268,7 @@ EVENTHANDLER_REGISTER(shutdown_post_sync, poll_shutdown, NULL, SHUTDOWN_PRI_LAST); } -SYSINIT(device_poll, SI_SUB_CLOCKS, SI_ORDER_MIDDLE, init_device_poll, NULL); +SYSINIT(device_poll, SI_SUB_SOFTINTR, SI_ORDER_MIDDLE, init_device_poll, NULL); /* From owner-p4-projects@FreeBSD.ORG Fri Feb 1 12:28:40 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9858ECB; Fri, 1 Feb 2013 12:28:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5B891C9 for ; Fri, 1 Feb 2013 12:28:40 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 46C771A2 for ; Fri, 1 Feb 2013 12:28:40 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r11CSeY9038324 for ; Fri, 1 Feb 2013 12:28:40 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r11CSesL038321 for perforce@freebsd.org; Fri, 1 Feb 2013 12:28:40 GMT (envelope-from bz@freebsd.org) Date: Fri, 1 Feb 2013 12:28:40 GMT Message-Id: <201302011228.r11CSesL038321@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 221670 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2013 12:28:40 -0000 http://p4web.freebsd.org/@@221670?ac=10 Change 221670 by bz@bz_zenith on 2013/02/01 12:28:28 Fully describe atse0,1 for fdt(4). Remove most of the hints though leaving the code to attach from those as well. In fact we try both hints and fdt. Split the atse(4) code up for that. Make interrupts optional in atse(4) and force polling to on if compiled in and not intrs available. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#13 edit .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#4 edit .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse_fdt.c#1 add .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse_nexus.c#1 add .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atsereg.h#2 edit .. //depot/projects/ctsrd/beribsd/src/sys/mips/beri/files.beri#29 edit .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#20 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#13 (text+ko) ==== @@ -97,7 +97,24 @@ ethernet@7f007000 { compatible = "altera,atse"; - reg = <0x7f007000 0x540>; + /* MAC, RX+RXC, TX+TXC. */ + reg = <0x7f007000 0x400 + 0x7f007500 0x8 + 0x7f007520 0x20 + 0x7f007400 0x8 + 0x7f007420 0x20>; + /* RX, TX */ + interrupts = <1 2>; + }; + + ethernet@7f005000 { + compatible = "altera,atse"; + /* MAC, RX+RXC, TX+TXC. */ + reg = <0x7f005000 0x400 + 0x7f005500 0x8 + 0x7f005520 0x20 + 0x7f005400 0x8 + 0x7f005420 0x20>; }; touchscreen@70400000 { ==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#4 (text+ko) ==== @@ -37,13 +37,10 @@ */ /* * XXX-BZ NOTES: - * - brooks, rwatson report: - * - buffered packet data as SOP arrives * - ifOutBroadcastPkts are only counted if both ether dst and src are all-1s; * seems an IP core bug, they count ether broadcasts as multicast. Is this * still the case? * - figure out why the TX FIFO fill status and intr did not work as expected. - * - make sure we can run even without IRQs specificed in hints/fdt. * - test 100Mbit/s and 10Mbit/s * - reading the ethernet address does not work with isf using fdt and no * hints anymore. @@ -88,73 +85,12 @@ #include #include -#include "if_atsereg.h" -#include "a_api.h" +#include +#include MODULE_DEPEND(atse, ether, 1, 1, 1); MODULE_DEPEND(atse, miibus, 1, 1, 1); -/* "device miibus" required. See GENERIC if you get errors here. */ -#include "miibus_if.h" - -struct atse_softc { - struct ifnet *atse_ifp; - struct mbuf *atse_rx_m; - struct mbuf *atse_tx_m; - uint8_t *atse_tx_buf; - struct resource *atse_mem_res; - struct resource *atse_rx_irq_res; - struct resource *atse_rx_mem_res; - struct resource *atse_rxc_mem_res; - struct resource *atse_tx_irq_res; - struct resource *atse_tx_mem_res; - struct resource *atse_txc_mem_res; - device_t atse_miibus; - device_t atse_dev; - int atse_unit; - int atse_mem_rid; - int atse_rx_irq_rid; - int atse_rx_mem_rid; - int atse_rxc_mem_rid; - int atse_tx_irq_rid; - int atse_tx_mem_rid; - int atse_txc_mem_rid; - int atse_phy_addr; - int atse_if_flags; - int atse_rx_irq; - int atse_tx_irq; - u_long atse_rx_maddr; - u_long atse_rx_msize; - u_long atse_tx_maddr; - u_long atse_tx_msize; - u_long atse_rxc_maddr; - u_long atse_rxc_msize; - u_long atse_txc_maddr; - u_long atse_txc_msize; - void *atse_rx_intrhand; - void *atse_tx_intrhand; - bus_addr_t atse_bmcr0; - bus_addr_t atse_bmcr1; - uint32_t atse_flags; -#define ATSE_FLAGS_LINK 0x00000001 -#define ATSE_FLAGS_ERROR 0x00000002 -#define ATSE_FLAGS_SOP_SEEN 0x00000004 - uint8_t atse_eth_addr[ETHER_ADDR_LEN]; -#define ATSE_ETH_ADDR_DEF 0x01 -#define ATSE_ETH_ADDR_SUPP1 0x02 -#define ATSE_ETH_ADDR_SUPP2 0x04 -#define ATSE_ETH_ADDR_SUPP3 0x08 -#define ATSE_ETH_ADDR_SUPP4 0x10 -#define ATSE_ETH_ADDR_ALL 0x1f - uint16_t atse_watchdog_timer; - uint16_t atse_tx_m_offset; - uint16_t atse_tx_buf_len; - uint16_t atse_rx_buf_len; - int16_t atse_rx_cycles; /* POLLING */ -#define RX_CYCLES_IN_INTR 5 - struct callout atse_tick; - struct mtx atse_mtx; -}; #define ATSE_WATCHDOG_TIME 5 @@ -364,9 +300,8 @@ static void atse_tick(void *); static int atse_detach(device_t); -static void atse_miibus_statchg(device_t); -static int atse_miibus_readreg(device_t, int, int); -static int atse_miibus_writereg(device_t, int, int, int); + +devclass_t atse_devclass; static int atse_tx_locked(struct atse_softc *sc, int *sent) @@ -1446,7 +1381,7 @@ /* * Generic device handling routines. */ -static int +int atse_attach(device_t dev) { struct atse_softc *sc; @@ -1515,45 +1450,52 @@ ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; #ifdef DEVICE_POLLING - /* Enable polling by default if compiled in. */ - /* Cannot do that, see below, thus moved after if_capenable. */ + /* We will enable polling by default if no irqs available. See below. */ ifp->if_capabilities |= IFCAP_POLLING; #endif /* Hook up interrupts. */ - error = bus_setup_intr(dev, sc->atse_rx_irq_res, INTR_TYPE_NET | - INTR_MPSAFE, NULL, atse_intr, sc, &sc->atse_rx_intrhand); - if (error != 0) { - device_printf(dev, "could not enable resources\n"); - ether_ifdetach(ifp); - goto err; + if (sc->atse_rx_irq_res != NULL) { + error = bus_setup_intr(dev, sc->atse_rx_irq_res, INTR_TYPE_NET | + INTR_MPSAFE, NULL, atse_intr, sc, &sc->atse_rx_intrhand); + if (error != 0) { + device_printf(dev, "enabling RX IRQ failed\n"); + ether_ifdetach(ifp); + goto err; + } } - error = bus_setup_intr(dev, sc->atse_tx_irq_res, INTR_TYPE_NET | - INTR_MPSAFE, NULL, atse_intr, sc, &sc->atse_tx_intrhand); - if (error != 0) { - bus_teardown_intr(dev, sc->atse_rx_irq_res, - sc->atse_rx_intrhand); - device_printf(dev, "could not enable resources\n"); - ether_ifdetach(ifp); - goto err; + if (sc->atse_tx_irq_res != NULL) { + error = bus_setup_intr(dev, sc->atse_tx_irq_res, INTR_TYPE_NET | + INTR_MPSAFE, NULL, atse_intr, sc, &sc->atse_tx_intrhand); + if (error != 0) { + bus_teardown_intr(dev, sc->atse_rx_irq_res, + sc->atse_rx_intrhand); + device_printf(dev, "enabling TX IRQ failed\n"); + ether_ifdetach(ifp); + goto err; + } } - if ((ifp->if_capenable & IFCAP_POLLING) == 0) { - ATSE_RX_INTR_ENABLE(sc); - ATSE_TX_INTR_ENABLE(sc); + if ((ifp->if_capenable & IFCAP_POLLING) != 0 || + (sc->atse_rx_irq_res == NULL && sc->atse_tx_irq_res == NULL)) { #ifdef DEVICE_POLLING -#if 0 - /* - * If compiled into the kernel, this does not work yet, as - * the poll_mtx is not initialized yet. - */ - } else { + /* If not on and no IRQs force it on. */ + if (sc->atse_rx_irq_res == NULL && sc->atse_tx_irq_res == NULL){ + ifp->if_capenable |= IFCAP_POLLING; + device_printf(dev, "forcing to polling due to no " + "interrupts\n"); + } error = ether_poll_register(atse_poll, ifp); if (error != 0) goto err; +#else + device_printf(dev, "no DEVICE_POLLING in kernel and no IRQs\n"); + error = ENXIO; #endif -#endif + } else { + ATSE_RX_INTR_ENABLE(sc); + ATSE_TX_INTR_ENABLE(sc); } err: @@ -1608,81 +1550,8 @@ return (0); } - -/* - * Device routines for interacting with nexus (probe, attach, detach) & helpers. - * XXX We should add suspend/resume later. - */ -static int -atse_resource_int(device_t dev, const char *resname, int *v) -{ - int error; - - error = resource_int_value(device_get_name(dev), device_get_unit(dev), - resname, v); - if (error != 0) { - /* If it does not exist, we fail, so not ingoring ENOENT. */ - device_printf(dev, "could not fetch '%s' hint\n", resname); - return (error); - } - - return (0); -} - -static int -atse_resource_long(device_t dev, const char *resname, long *v) -{ - int error; - - error = resource_long_value(device_get_name(dev), device_get_unit(dev), - resname, v); - if (error != 0) { - /* If it does not exist, we fail, so not ingoring ENOENT. */ - device_printf(dev, "could not fetch '%s' hint\n", resname); - return (error); - } - - return (0); -} - -static int -atse_probe_nexus(device_t dev) -{ - struct resource *res; - long l; - int error, rid; - - /* - * It is almost impossible to properly probe this device. We must - * rely on hints being set correctly. So try to get hints and - * one memory mapping. Must cleanup and do again in attach but - * should not probe successfully if not able to attach later. - */ - error = atse_resource_int(dev, "rx_irq", &rid); - error += atse_resource_long(dev, "rx_maddr", &l); - error += atse_resource_long(dev, "rx_msize", &l); - error += atse_resource_long(dev, "rxc_maddr", &l); - error += atse_resource_long(dev, "rxc_msize", &l); - error += atse_resource_int(dev, "tx_irq", &rid); - error += atse_resource_long(dev, "tx_maddr", &l); - error += atse_resource_long(dev, "tx_msize", &l); - error += atse_resource_long(dev, "txc_maddr", &l); - error += atse_resource_long(dev, "txc_msize", &l); - if (error != 0) - return (ENXIO); - - rid = 0; - res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (res == NULL) - return (ENXIO); - bus_release_resource(dev, SYS_RES_MEMORY, rid, res); - - /* Success. */ - device_set_desc(dev, "Altera Triple-Speed Ethernet MegaCore"); - return (BUS_PROBE_DEFAULT); -} - -static void +/* Shared between nexus anf fdt implementation. */ +void atse_detach_resources(device_t dev) { struct atse_softc *sc; @@ -1726,114 +1595,8 @@ } } -static int -atse_attach_nexus(device_t dev) -{ - struct atse_softc *sc; - int error; - - sc = device_get_softc(dev); - sc->atse_dev = dev; - sc->atse_unit = device_get_unit(dev); - - /* Get RX and TX IRQ and FIFO information from hints. */ - error = atse_resource_int(dev, "rx_irq", &sc->atse_rx_irq); - error += atse_resource_long(dev, "rx_maddr", &sc->atse_rx_maddr); - error += atse_resource_long(dev, "rx_msize", &sc->atse_rx_msize); - error += atse_resource_long(dev, "rxc_maddr", &sc->atse_rxc_maddr); - error += atse_resource_long(dev, "rxc_msize", &sc->atse_rxc_msize); - error += atse_resource_int(dev, "tx_irq", &sc->atse_tx_irq); - error += atse_resource_long(dev, "tx_maddr", &sc->atse_tx_maddr); - error += atse_resource_long(dev, "tx_msize", &sc->atse_tx_msize); - error += atse_resource_long(dev, "txc_maddr", &sc->atse_txc_maddr); - error += atse_resource_long(dev, "txc_msize", &sc->atse_txc_msize); - if (error != 0) - return (error); - - /* Avalon-MM, atse management register region. */ - sc->atse_mem_rid = 0; - sc->atse_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &sc->atse_mem_rid, RF_ACTIVE); - if (sc->atse_mem_res == NULL) { - device_printf(dev, "failed to map memory for ctrl region\n"); - return (ENXIO); - } - - /* - * RX IRQ and memory mapped region. - * 0x00: 2 * 32bit FIFO data, - * 0x20: 8 * 32bit FIFO ctrl, Avalon-ST Sink to Avalon-MM R-Slave. - */ - sc->atse_rx_irq_rid = 0; - sc->atse_rx_irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, - &sc->atse_rx_irq_rid, sc->atse_rx_irq, sc->atse_rx_irq, 1, - RF_ACTIVE | RF_SHAREABLE); - if (sc->atse_rx_irq_res == NULL) { - device_printf(dev, "RX IRQ unavailable\n"); - goto err; - } - sc->atse_rx_mem_rid = 0; - sc->atse_rx_mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &sc->atse_rx_mem_rid, sc->atse_rx_maddr, sc->atse_rx_maddr + - sc->atse_rx_msize, sc->atse_rx_msize, RF_ACTIVE); - if (sc->atse_rx_mem_res == NULL) { - device_printf(dev, "failed to map memory for RX\n"); - goto err; - } - sc->atse_rxc_mem_rid = 0; - sc->atse_rxc_mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &sc->atse_rxc_mem_rid, sc->atse_rxc_maddr, sc->atse_rxc_maddr + - sc->atse_rxc_msize, sc->atse_rxc_msize, RF_ACTIVE); - if (sc->atse_rxc_mem_res == NULL) { - device_printf(dev, "failed to map memory for RX control\n"); - goto err; - } - - /* - * TX IRQ and memory mapped region. - * 0x00: 2 * 32bit FIFO data, - * 0x20: 8 * 32bit FIFO ctrl, Avalon-MM W-Slave to Avalon-ST Source. - */ - sc->atse_tx_irq_rid = 0; - sc->atse_tx_irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, - &sc->atse_tx_irq_rid, sc->atse_tx_irq, sc->atse_tx_irq, 1, - RF_ACTIVE | RF_SHAREABLE); - if (sc->atse_tx_irq_res == NULL) { - device_printf(dev, "TX IRQ unavailable\n"); - goto err; - } - sc->atse_tx_mem_rid = 0; - sc->atse_tx_mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &sc->atse_tx_mem_rid, sc->atse_tx_maddr, sc->atse_tx_maddr + - sc->atse_tx_msize, sc->atse_tx_msize, RF_ACTIVE); - if (sc->atse_tx_mem_res == NULL) { - device_printf(dev, "failed to map memory for TX\n"); - goto err; - } - sc->atse_txc_mem_rid = 0; - sc->atse_txc_mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &sc->atse_txc_mem_rid, sc->atse_txc_maddr, sc->atse_txc_maddr + - sc->atse_txc_msize, sc->atse_txc_msize, RF_ACTIVE); - if (sc->atse_txc_mem_res == NULL) { - device_printf(dev, "failed to map memory for TX control\n"); - goto err; - } - - error = atse_attach(dev); - if (error) - goto err; - - return (0); - -err: - /* Cleanup. */ - atse_detach_resources(dev); - - return (error); -} - -static int -atse_detach_nexus(device_t dev) +int +atse_detach_dev(device_t dev) { int error; @@ -1849,7 +1612,7 @@ return (0); } -static int +int atse_miibus_readreg(device_t dev, int phy, int reg) { struct atse_softc *sc; @@ -1866,7 +1629,7 @@ return (PHY_READ_2(sc, reg)); } -static int +int atse_miibus_writereg(device_t dev, int phy, int reg, int data) { struct atse_softc *sc; @@ -1884,7 +1647,7 @@ return (0); } -static void +void atse_miibus_statchg(device_t dev) { struct atse_softc *sc; @@ -1948,29 +1711,4 @@ CSR_WRITE_4(sc, BASE_CFG_COMMAND_CONFIG, val4); } -static device_method_t atse_methods_nexus[] = { - /* Device interface */ - DEVMETHOD(device_probe, atse_probe_nexus), - DEVMETHOD(device_attach, atse_attach_nexus), - DEVMETHOD(device_detach, atse_detach_nexus), - - /* MII interface */ - DEVMETHOD(miibus_readreg, atse_miibus_readreg), - DEVMETHOD(miibus_writereg, atse_miibus_writereg), - DEVMETHOD(miibus_statchg, atse_miibus_statchg), - - DEVMETHOD_END -}; - -static driver_t atse_driver_nexus = { - "atse", - atse_methods_nexus, - sizeof(struct atse_softc) -}; - -static devclass_t atse_devclass; - -DRIVER_MODULE(atse, nexus, atse_driver_nexus, atse_devclass, 0, 0); -DRIVER_MODULE(miibus, atse, miibus_driver, miibus_devclass, 0, 0); - /* end */ ==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atsereg.h#2 (text+ko) ==== @@ -399,6 +399,78 @@ #define ALTERA_ETHERNET_OPTION_BITS_OFF 0x00008000 #define ALTERA_ETHERNET_OPTION_BITS_LEN 0x00007fff +/* -------------------------------------------------------------------------- */ + +struct atse_softc { + struct ifnet *atse_ifp; + struct mbuf *atse_rx_m; + struct mbuf *atse_tx_m; + uint8_t *atse_tx_buf; + struct resource *atse_mem_res; + struct resource *atse_rx_irq_res; + struct resource *atse_rx_mem_res; + struct resource *atse_rxc_mem_res; + struct resource *atse_tx_irq_res; + struct resource *atse_tx_mem_res; + struct resource *atse_txc_mem_res; + device_t atse_miibus; + device_t atse_dev; + int atse_unit; + int atse_mem_rid; + int atse_rx_irq_rid; + int atse_rx_mem_rid; + int atse_rxc_mem_rid; + int atse_tx_irq_rid; + int atse_tx_mem_rid; + int atse_txc_mem_rid; + int atse_phy_addr; + int atse_if_flags; + int atse_rx_irq; + int atse_tx_irq; + u_long atse_rx_maddr; + u_long atse_rx_msize; + u_long atse_tx_maddr; + u_long atse_tx_msize; + u_long atse_rxc_maddr; + u_long atse_rxc_msize; + u_long atse_txc_maddr; + u_long atse_txc_msize; + void *atse_rx_intrhand; + void *atse_tx_intrhand; + bus_addr_t atse_bmcr0; + bus_addr_t atse_bmcr1; + uint32_t atse_flags; +#define ATSE_FLAGS_LINK 0x00000001 +#define ATSE_FLAGS_ERROR 0x00000002 +#define ATSE_FLAGS_SOP_SEEN 0x00000004 + uint8_t atse_eth_addr[ETHER_ADDR_LEN]; +#define ATSE_ETH_ADDR_DEF 0x01 +#define ATSE_ETH_ADDR_SUPP1 0x02 +#define ATSE_ETH_ADDR_SUPP2 0x04 +#define ATSE_ETH_ADDR_SUPP3 0x08 +#define ATSE_ETH_ADDR_SUPP4 0x10 +#define ATSE_ETH_ADDR_ALL 0x1f + uint16_t atse_watchdog_timer; + uint16_t atse_tx_m_offset; + uint16_t atse_tx_buf_len; + uint16_t atse_rx_buf_len; + int16_t atse_rx_cycles; /* POLLING */ +#define RX_CYCLES_IN_INTR 5 + struct callout atse_tick; + struct mtx atse_mtx; +}; + + +int atse_attach(device_t); +int atse_detach_dev(device_t); +void atse_detach_resources(device_t); + +int atse_miibus_readreg(device_t, int, int); +int atse_miibus_writereg(device_t, int, int, int); +void atse_miibus_statchg(device_t); + +extern devclass_t atse_devclass; + #endif /* _DEV_IF_ATSEREG_H */ /* end */ ==== //depot/projects/ctsrd/beribsd/src/sys/mips/beri/files.beri#29 (text+ko) ==== @@ -1,5 +1,7 @@ # $FreeBSD: head/sys/mips/beri/files.beri 245373 2013-01-13 16:27:56Z rwatson $ dev/altera/atse/if_atse.c optional altera_atse +dev/altera/atse/if_atse_fdt.c optional altera_atse fdt +dev/altera/atse/if_atse_nexus.c optional altera_atse dev/altera/jtag_uart/altera_jtag_uart_cons.c optional altera_jtag_uart dev/altera/jtag_uart/altera_jtag_uart_tty.c optional altera_jtag_uart dev/altera/jtag_uart/altera_jtag_uart_fdt.c optional altera_jtag_uart fdt ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#20 (text+ko) ==== @@ -25,40 +25,15 @@ hint.map.3.end=0x02000000 hint.map.3.name="kernel" -# # Altera Triple-Speed Ethernet Mac, present in tPad and DE-4 configurations -# Currently requires to find the isf(4) device. Later a loader should fix this. -# -hint.atse.0.at="nexus0" -hint.atse.0.maddr=0x7f007000 -hint.atse.0.msize=0x400 -hint.atse.0.tx_maddr=0x7f007400 -hint.atse.0.tx_msize=0x8 -hint.atse.0.txc_maddr=0x7f007420 -hint.atse.0.txc_msize=0x20 -hint.atse.0.tx_irq=2 -hint.atse.0.rx_maddr=0x7f007500 -hint.atse.0.rx_msize=0x8 -hint.atse.0.rxc_maddr=0x7f007520 -hint.atse.0.rxc_msize=0x20 -hint.atse.0.rx_irq=1 +# configured from fdt(4) but PHYs are still described in here. +# Currently configured for individual tse_mac cores. hint.e1000phy.0.at="miibus0" hint.e1000phy.0.phyno=0 - -# No IRQ on the 2nd port, just c&p to make driver happy. -hint.atse.1.at="nexus0" -hint.atse.1.maddr=0x7f005000 -hint.atse.1.msize=0x400 -hint.atse.1.tx_maddr=0x7f005400 -hint.atse.1.tx_msize=0x8 -hint.atse.1.txc_maddr=0x7f005420 -hint.atse.1.txc_msize=0x20 -hint.atse.1.tx_irq=2 -hint.atse.1.rx_maddr=0x7f005500 -hint.atse.1.rx_msize=0x8 -hint.atse.1.rxc_maddr=0x7f005520 -hint.atse.1.rxc_msize=0x20 -hint.atse.1.rx_irq=1 hint.e1000phy.1.at="miibus0" hint.e1000phy.1.phyno=0 +hint.e1000phy.2.at="miibus0" +hint.e1000phy.2.phyno=0 +hint.e1000phy.3.at="miibus0" +hint.e1000phy.3.phyno=0 From owner-p4-projects@FreeBSD.ORG Fri Feb 1 16:12:34 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 24A9CAFC; Fri, 1 Feb 2013 16:12:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DCEFFAFA for ; Fri, 1 Feb 2013 16:12:33 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id B52F0F6D for ; Fri, 1 Feb 2013 16:12:33 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r11GCXOP060075 for ; Fri, 1 Feb 2013 16:12:33 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r11GCXJw060072 for perforce@freebsd.org; Fri, 1 Feb 2013 16:12:33 GMT (envelope-from bz@freebsd.org) Date: Fri, 1 Feb 2013 16:12:33 GMT Message-Id: <201302011612.r11GCXJw060072@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 221676 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2013 16:12:34 -0000 http://p4web.freebsd.org/@@221676?ac=10 Change 221676 by bz@bz_zenith on 2013/02/01 16:12:08 Change order so that isf(4) is always probed and attached before atse(4) will be, so that we can find the device and read the Ethernet addresses. This is hackish but a good workaround for now until a loader will fix it for us. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#14 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#14 (text+ko) ==== @@ -95,6 +95,20 @@ reg = <0x7f006000 0x1>; }; + /* + * XXX-BZ keep flash before ethernet so that atse can read the + * Ethernet addresses for now. + */ + flash@0x74000000 { + compatible = "intel,strataflash"; + reg = <0x74000000 0x2000000>; + }; + + flash@0x76000000 { + compatible = "intel,strataflash"; + reg = <0x76000000 0x2000000>; + }; + ethernet@7f007000 { compatible = "altera,atse"; /* MAC, RX+RXC, TX+TXC. */ @@ -124,16 +138,6 @@ 0x70177000 0x2000>; }; - flash@0x74000000 { - compatible = "intel,strataflash"; - reg = <0x74000000 0x2000000>; - }; - - flash@0x76000000 { - compatible = "intel,strataflash"; - reg = <0x76000000 0x2000000>; - }; - avgen@0x7f009000 { compatible = "sri-cambridge,avgen"; reg = <0x7f009000 0x2>; From owner-p4-projects@FreeBSD.ORG Fri Feb 1 16:13:35 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A485BF1; Fri, 1 Feb 2013 16:13:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F3078BEF for ; Fri, 1 Feb 2013 16:13:34 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id E2AF2F79 for ; Fri, 1 Feb 2013 16:13:34 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r11GDY2F060986 for ; Fri, 1 Feb 2013 16:13:34 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r11GDYbk060983 for perforce@freebsd.org; Fri, 1 Feb 2013 16:13:34 GMT (envelope-from bz@freebsd.org) Date: Fri, 1 Feb 2013 16:13:34 GMT Message-Id: <201302011613.r11GDYbk060983@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 221677 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2013 16:13:35 -0000 http://p4web.freebsd.org/@@221677?ac=10 Change 221677 by bz@bz_zenith on 2013/02/01 16:13:23 With isf(4) attaching earlier we can read the the Ethernet addresses from flash even in the fdt(4) case now. Keep the nexus code around as well and try both. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#5 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#5 (text+ko) ==== @@ -562,7 +562,7 @@ } static int -atse_ethernet_option_bits_read(device_t dev) +atse_ethernet_option_bits_read_nexus(device_t dev) { const char *at, *name; struct resource *res; @@ -628,6 +628,53 @@ } static int +atse_ethernet_option_bits_read_fdt(device_t dev) +{ + struct resource *res; + device_t isfdev; + int i, rid; + + if (atse_ethernet_option_bits_flag & ATSE_ETHERNET_OPTION_BITS_READ) + return (0); + + isfdev = device_find_child(device_get_parent(dev), "isf", 0); + if (isfdev == NULL) + return (ENOENT); + + rid = 0; + res = bus_alloc_resource_any(isfdev, SYS_RES_MEMORY, &rid, + RF_ACTIVE | RF_SHAREABLE); + if (res == NULL) + return (ENXIO); + + for (i = 0; i < ALTERA_ETHERNET_OPTION_BITS_LEN; i++) + atse_ethernet_option_bits[i] = bus_read_1(res, + ALTERA_ETHERNET_OPTION_BITS_OFF + i); + + bus_release_resource(dev, SYS_RES_MEMORY, rid, res); + atse_ethernet_option_bits_flag |= ATSE_ETHERNET_OPTION_BITS_READ; + + return (0); +} + +static int +atse_ethernet_option_bits_read(device_t dev) +{ + int error; + + error = atse_ethernet_option_bits_read_nexus(dev); + if (error == 0) + return (0); + + error = atse_ethernet_option_bits_read_fdt(dev); + if (error == 0) + return (0); + + device_printf(dev, "Cannot read Ethernet addresses from flash.\n"); + return (error); +} + +static int atse_get_eth_address(struct atse_softc *sc) { unsigned long hostid; From owner-p4-projects@FreeBSD.ORG Fri Feb 1 16:44:08 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 488F640B; Fri, 1 Feb 2013 16:44:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B2B11409 for ; Fri, 1 Feb 2013 16:44:07 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id A47B8132 for ; Fri, 1 Feb 2013 16:44:07 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r11Gi6CO063526 for ; Fri, 1 Feb 2013 16:44:06 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r11Gi69x063523 for perforce@freebsd.org; Fri, 1 Feb 2013 16:44:06 GMT (envelope-from bz@freebsd.org) Date: Fri, 1 Feb 2013 16:44:06 GMT Message-Id: <201302011644.r11Gi69x063523@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 221678 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2013 16:44:08 -0000 http://p4web.freebsd.org/@@221678?ac=10 Change 221678 by bz@bz_zenith on 2013/02/01 16:43:54 Do not allow users to disable polling if we cannot do interrupts. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#6 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#6 (text+ko) ==== @@ -1053,11 +1053,20 @@ ATSE_TX_INTR_DISABLE(sc); ATSE_RX_EVENT_CLEAR(sc); ATSE_TX_EVENT_CLEAR(sc); - } else { + + /* + * Do not allow disabling of polling if we do + * not have interrupts. + */ + } else if (sc->atse_rx_irq_res != NULL || + sc->atse_tx_irq_res != NULL) { error = ether_poll_deregister(ifp); /* Enable interrupts. */ ATSE_RX_INTR_ENABLE(sc); ATSE_TX_INTR_ENABLE(sc); + } else { + ifp->if_capenable ^= IFCAP_POLLING; + error = EINVAL; } } #endif /* DEVICE_POLLING */ From owner-p4-projects@FreeBSD.ORG Fri Feb 1 16:58:22 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1EA948C2; Fri, 1 Feb 2013 16:58:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D633D8BF for ; Fri, 1 Feb 2013 16:58:21 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id C7F8A1BD for ; Fri, 1 Feb 2013 16:58:21 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r11GwLI6064628 for ; Fri, 1 Feb 2013 16:58:21 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r11GwLFa064625 for perforce@freebsd.org; Fri, 1 Feb 2013 16:58:21 GMT (envelope-from bz@freebsd.org) Date: Fri, 1 Feb 2013 16:58:21 GMT Message-Id: <201302011658.r11GwLFa064625@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 221680 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2013 16:58:22 -0000 http://p4web.freebsd.org/@@221680?ac=10 Change 221680 by bz@bz_zenith on 2013/02/01 16:57:44 Export the factory PPR to kenv so that user space can access it. Using kenv now so that in the case of loader we would not have to adjust user space code anymore. This is a per-board unique 64bit value which we can use to derive Ethernet address from and possibly seed into the random pool as well. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf.c#14 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf.c#14 (text+ko) ==== @@ -686,6 +686,7 @@ uint16_t id; u_long start, size; struct isf_chips *cp = chip_ids; + char name[112], value[32]; start = rman_get_start(sc->isf_res); if (start % 2 != 0) { @@ -717,6 +718,22 @@ ISF_LOCK_INIT(sc); sc->isf_disk = NULL; isf_disk_insert(sc, size); + +#if 1 + /* + * Try best effort to export the information, currently only needed + * to do Ethernet address initialization. Later loader will do this + * thus we prefer kenv here rather than a sysctl. + */ + isf_write_cmd(sc, 0, ISF_CMD_RDI); + if (snprintf(name, sizeof(name), "%s.factory_ppr", + device_get_nameunit(sc->isf_dev)) < (sizeof(name) - 1) && + snprintf(value, sizeof(value), "0x%016jx", + (uintmax_t)isf_read_reg64(sc, ISF_REG_FPP)) < (sizeof(value) - 1)) + (void) setenv(name, value); + isf_write_cmd(sc, 0, ISF_CMD_RA); +#endif + return(0); } From owner-p4-projects@FreeBSD.ORG Sat Feb 2 15:28:48 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C1F93646; Sat, 2 Feb 2013 15:28:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6F40A644 for ; Sat, 2 Feb 2013 15:28:47 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5DC78814 for ; Sat, 2 Feb 2013 15:28:47 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r12FSkvI003639 for ; Sat, 2 Feb 2013 15:28:46 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r12FSkDY003636 for perforce@freebsd.org; Sat, 2 Feb 2013 15:28:46 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 2 Feb 2013 15:28:46 GMT Message-Id: <201302021528.r12FSkDY003636@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 221707 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Feb 2013 15:28:48 -0000 http://p4web.freebsd.org/@@221707?ac=10 Change 221707 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/02/02 15:28:01 Begin prodding at a FreeBSD/mips port of boot2 for the BERI and CHERI platforms. Nothing much to see here yet; at91's boot2 nabbed as a starting point, however. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/boot/Makefile.mips#1 add .. //depot/projects/ctsrd/beribsd/src/sys/boot/mips/Makefile#1 add .. //depot/projects/ctsrd/beribsd/src/sys/boot/mips/Makefile.inc#1 add .. //depot/projects/ctsrd/beribsd/src/sys/boot/mips/beri/boot2/Makefile#1 add .. //depot/projects/ctsrd/beribsd/src/sys/boot/mips/beri/boot2/boot2.c#1 branch Differences ...