From owner-p4-projects@FreeBSD.ORG Sun Mar 3 21:11:57 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE8D76DD; Sun, 3 Mar 2013 21:11:56 +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 197506DB for ; Sun, 3 Mar 2013 21:11:56 +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 CD91F9D8 for ; Sun, 3 Mar 2013 21:11:55 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r23LBsUk026278 for ; Sun, 3 Mar 2013 21:11:54 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r23LBsDH026275 for perforce@freebsd.org; Sun, 3 Mar 2013 21:11:54 GMT (envelope-from brooks@freebsd.org) Date: Sun, 3 Mar 2013 21:11:54 GMT Message-Id: <201303032111.r23LBsDH026275@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222573 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, 03 Mar 2013 21:11:57 -0000 http://p4web.freebsd.org/@@222573?ac=10 Change 222573 by brooks@brooks_zenith on 2013/03/03 21:11:53 Add missing device cfid and enable strataflash support. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4_BASE#5 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4_BASE#5 (text+ko) ==== @@ -30,6 +30,8 @@ device bpf device cfi +device cfid +options CFI_SUPPORT_STRATAFLASH device sc device miibus From owner-p4-projects@FreeBSD.ORG Sun Mar 3 21:12:56 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ADDA47D6; Sun, 3 Mar 2013 21:12:56 +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 7110E7D4 for ; Sun, 3 Mar 2013 21:12:56 +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 38A8E9E5 for ; Sun, 3 Mar 2013 21:12:56 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r23LCuYI026324 for ; Sun, 3 Mar 2013 21:12:56 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r23LCuMD026321 for perforce@freebsd.org; Sun, 3 Mar 2013 21:12:56 GMT (envelope-from brooks@freebsd.org) Date: Sun, 3 Mar 2013 21:12:56 GMT Message-Id: <201303032112.r23LCuMD026321@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222574 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, 03 Mar 2013 21:12:57 -0000 http://p4web.freebsd.org/@@222574?ac=10 Change 222574 by brooks@brooks_zenith on 2013/03/03 21:12:55 Pull in device cfid and full strataflash support from BeriBSD. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4_BASE#4 integrate Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4_BASE#4 (text+ko) ==== @@ -30,6 +30,8 @@ device bpf device cfi +device cfid +options CFI_SUPPORT_STRATAFLASH device sc device miibus From owner-p4-projects@FreeBSD.ORG Sun Mar 3 22:48:38 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 28CB44F7; Sun, 3 Mar 2013 22:48:38 +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 6DC924F5 for ; Sun, 3 Mar 2013 22:48:37 +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 44D31D4E for ; Sun, 3 Mar 2013 22:48:37 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r23Mma04035431 for ; Sun, 3 Mar 2013 22:48:36 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 r23MmaVs035428 for perforce@freebsd.org; Sun, 3 Mar 2013 22:48:36 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 3 Mar 2013 22:48:36 GMT Message-Id: <201303032248.r23MmaVs035428@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 222575 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, 03 Mar 2013 22:48:38 -0000 http://p4web.freebsd.org/@@222575?ac=10 Change 222575 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/03/03 22:48:27 Update BERI DE4 device.hints to include geom map entries for boot loader space reservations in flash; this appears as /dev/map/boot. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#22 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#22 (text+ko) ==== @@ -22,45 +22,57 @@ # Currently unused space on the first chip hint.map.3.at="cfid0" hint.map.3.start=0x01840000 -hint.map.3.end=0x02000000 +hint.map.3.end=0x01f00000 hint.map.3.name="reserved" +# Area for use by the boot loader +hint.map.4.at="cfid0" +hint.map.4.start=0x01f00000 +hint.map.4.end=0x02000000 +hint.map.4.name="boot" + # Kernel on the second chip -hint.map.4.at="cfid0" -hint.map.4.start=0x02000000 -hint.map.4.end=0x04000000 -hint.map.4.name="kernel" +hint.map.5.at="cfid0" +hint.map.5.start=0x02000000 +hint.map.5.end=0x04000000 +hint.map.5.name="kernel" # Reserved configuration blocks. Don't touch. -hint.map.5.at="isf0" -hint.map.5.start=0x00000000 -hint.map.5.end=0x00020000 -hint.map.5.name="config" -hint.map.5.readonly=1 +hint.map.6.at="isf0" +hint.map.6.start=0x00000000 +hint.map.6.end=0x00020000 +hint.map.6.name="config" +hint.map.6.readonly=1 # Hardwired location of bitfile -hint.map.6.at="isf0" -hint.map.6.start=0x00020000 -hint.map.6.end=0x01820000 -hint.map.6.name="fpga" +hint.map.7.at="isf0" +hint.map.7.start=0x00020000 +hint.map.7.end=0x01820000 +hint.map.7.name="fpga" # Saved OS configuration -hint.map.7.at="isf0" -hint.map.7.start=0x01820000 -hint.map.7.end=0x01840000 -hint.map.7.name="osconfig" +hint.map.8.at="isf0" +hint.map.8.start=0x01820000 +hint.map.8.end=0x01840000 +hint.map.8.name="osconfig" # Currently unused space on the first chip -hint.map.8.at="isf0" -hint.map.8.start=0x01840000 -hint.map.8.end=0x02000000 -hint.map.8.name="reserved" +hint.map.9.at="isf0" +hint.map.9.start=0x01840000 +hint.map.9.end=0x01f00000 +hint.map.9.name="reserved" + +# Area for use by the boot loader +hint.map.10.at="isf0" +hint.map.10.start=0x01f00000 +hint.map.10.end=0x02000000 +hint.map.10.name="boot" # Kernel on the second chip -hint.map.9.at="isf1" -hint.map.9.start=0x00000000 -hint.map.9.end=0x02000000 -hint.map.9.name="kernel" +hint.map.11.at="isf1" +hint.map.11.start=0x00000000 +hint.map.11.end=0x02000000 +hint.map.11.name="kernel" # Altera Triple-Speed Ethernet Mac, present in tPad and DE-4 configurations # configured from fdt(4) but PHYs are still described in here. From owner-p4-projects@FreeBSD.ORG Sun Mar 3 23:37:29 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4FE933E8; Sun, 3 Mar 2013 23:37:29 +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 145E53E6 for ; Sun, 3 Mar 2013 23:37:29 +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 D262CED5 for ; Sun, 3 Mar 2013 23:37:28 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r23NbSCm040540 for ; Sun, 3 Mar 2013 23:37:28 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 r23NbS57040537 for perforce@freebsd.org; Sun, 3 Mar 2013 23:37:28 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 3 Mar 2013 23:37:28 GMT Message-Id: <201303032337.r23NbS57040537@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 222580 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, 03 Mar 2013 23:37:29 -0000 http://p4web.freebsd.org/@@222580?ac=10 Change 222580 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/03/03 23:36:37 Merge addition of geom map entry for boot region of the DE4 Intel StrataFlash from FreeBSD/beri to CheriBSD. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4.hints#11 integrate Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4.hints#11 (text+ko) ==== @@ -22,45 +22,57 @@ # Currently unused space on the first chip hint.map.3.at="cfid0" hint.map.3.start=0x01840000 -hint.map.3.end=0x02000000 +hint.map.3.end=0x01f00000 hint.map.3.name="reserved" +# Area for use by the boot loader +hint.map.4.at="cfid0" +hint.map.4.start=0x01f00000 +hint.map.4.end=0x02000000 +hint.map.4.name="boot" + # Kernel on the second chip -hint.map.4.at="cfid0" -hint.map.4.start=0x02000000 -hint.map.4.end=0x04000000 -hint.map.4.name="kernel" +hint.map.5.at="cfid0" +hint.map.5.start=0x02000000 +hint.map.5.end=0x04000000 +hint.map.5.name="kernel" # Reserved configuration blocks. Don't touch. -hint.map.5.at="isf0" -hint.map.5.start=0x00000000 -hint.map.5.end=0x00020000 -hint.map.5.name="config" -hint.map.5.readonly=1 +hint.map.6.at="isf0" +hint.map.6.start=0x00000000 +hint.map.6.end=0x00020000 +hint.map.6.name="config" +hint.map.6.readonly=1 # Hardwired location of bitfile -hint.map.6.at="isf0" -hint.map.6.start=0x00020000 -hint.map.6.end=0x01820000 -hint.map.6.name="fpga" +hint.map.7.at="isf0" +hint.map.7.start=0x00020000 +hint.map.7.end=0x01820000 +hint.map.7.name="fpga" # Saved OS configuration -hint.map.7.at="isf0" -hint.map.7.start=0x01820000 -hint.map.7.end=0x01840000 -hint.map.7.name="osconfig" +hint.map.8.at="isf0" +hint.map.8.start=0x01820000 +hint.map.8.end=0x01840000 +hint.map.8.name="osconfig" # Currently unused space on the first chip -hint.map.8.at="isf0" -hint.map.8.start=0x01840000 -hint.map.8.end=0x02000000 -hint.map.8.name="reserved" +hint.map.9.at="isf0" +hint.map.9.start=0x01840000 +hint.map.9.end=0x01f00000 +hint.map.9.name="reserved" + +# Area for use by the boot loader +hint.map.10.at="isf0" +hint.map.10.start=0x01f00000 +hint.map.10.end=0x02000000 +hint.map.10.name="boot" # Kernel on the second chip -hint.map.9.at="isf1" -hint.map.9.start=0x00000000 -hint.map.9.end=0x02000000 -hint.map.9.name="kernel" +hint.map.11.at="isf1" +hint.map.11.start=0x00000000 +hint.map.11.end=0x02000000 +hint.map.11.name="kernel" # Altera Triple-Speed Ethernet Mac, present in tPad and DE-4 configurations # configured from fdt(4) but PHYs are still described in here. From owner-p4-projects@FreeBSD.ORG Mon Mar 4 21:27:48 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8CD82307; Mon, 4 Mar 2013 21:27:48 +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 51362305 for ; Mon, 4 Mar 2013 21:27:48 +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 2932F164A for ; Mon, 4 Mar 2013 21:27:48 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r24LRmKu005756 for ; Mon, 4 Mar 2013 21:27:48 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r24LRlxL005753 for perforce@freebsd.org; Mon, 4 Mar 2013 21:27:47 GMT (envelope-from brooks@freebsd.org) Date: Mon, 4 Mar 2013 21:27:47 GMT Message-Id: <201303042127.r24LRlxL005753@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222626 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, 04 Mar 2013 21:27:48 -0000 http://p4web.freebsd.org/@@222626?ac=10 Change 222626 by brooks@brooks_zenith on 2013/03/04 21:27:38 Reduce MDROOT size to 25.5MB to give us a bit of room for growth and to let boot2 live at the end of the flash. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4_MDROOT#13 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4_MDROOT#13 (text+ko) ==== @@ -15,6 +15,5 @@ # Adjust the following path based on local requirements. # options MD_ROOT # MD is a potential root device -options MD_ROOT_SIZE=26624 +options MD_ROOT_SIZE=26112 # 25.5MB options ROOTDEVNAME=\"ufs:md0\" -#makeoptions MFS_IMAGE=/home/bed22/demoroot.img From owner-p4-projects@FreeBSD.ORG Mon Mar 4 21:28:49 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 98704412; Mon, 4 Mar 2013 21:28:49 +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 5DE4F410 for ; Mon, 4 Mar 2013 21:28:49 +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 4D4111661 for ; Mon, 4 Mar 2013 21:28:49 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r24LSnj1005799 for ; Mon, 4 Mar 2013 21:28:49 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r24LSnnR005796 for perforce@freebsd.org; Mon, 4 Mar 2013 21:28:49 GMT (envelope-from brooks@freebsd.org) Date: Mon, 4 Mar 2013 21:28:49 GMT Message-Id: <201303042128.r24LSnnR005796@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222627 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, 04 Mar 2013 21:28:49 -0000 http://p4web.freebsd.org/@@222627?ac=10 Change 222627 by brooks@brooks_zenith on 2013/03/04 21:28:38 Integrate from BeriBSD: Reduce MDROOT size to 25.5MB to give us a bit of room for growth and to let boot2 live at the end of the flash. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4_MDROOT#10 integrate Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4_MDROOT#10 (text+ko) ==== @@ -15,6 +15,5 @@ # Adjust the following path based on local requirements. # options MD_ROOT # MD is a potential root device -options MD_ROOT_SIZE=26624 +options MD_ROOT_SIZE=26112 # 25.5MB options ROOTDEVNAME=\"ufs:md0\" -#makeoptions MFS_IMAGE=/home/bed22/demoroot.img From owner-p4-projects@FreeBSD.ORG Mon Mar 4 23:24:47 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7E1419DB; Mon, 4 Mar 2013 23:24:47 +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 429459D9 for ; Mon, 4 Mar 2013 23:24:47 +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 1997024D for ; Mon, 4 Mar 2013 23:24: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 r24NOkAq015964 for ; Mon, 4 Mar 2013 23:24:46 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r24NOkOj015961 for perforce@freebsd.org; Mon, 4 Mar 2013 23:24:46 GMT (envelope-from brooks@freebsd.org) Date: Mon, 4 Mar 2013 23:24:46 GMT Message-Id: <201303042324.r24NOkOj015961@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222633 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, 04 Mar 2013 23:24:47 -0000 http://p4web.freebsd.org/@@222633?ac=10 Change 222633 by brooks@brooks_zenith on 2013/03/04 23:24:39 Relocate the boot map entry to the end of the media to facilitate future changes. Remove the currently unused osconfig map entry as we're rapidly moving towards a boot file system where we can easily store that sort of data. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#23 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#23 (text+ko) ==== @@ -13,66 +13,55 @@ hint.map.1.end=0x01820000 hint.map.1.name="fpga" -# Saved OS configuration +# Currently unused space on the first chip +# XXX: To be merged with the kernel map when we begin using the boot loader hint.map.2.at="cfid0" hint.map.2.start=0x01820000 -hint.map.2.end=0x01840000 -hint.map.2.name="osconfig" +hint.map.2.end=0x02000000 +hint.map.2.name="reserved" -# Currently unused space on the first chip -hint.map.3.at="cfid0" -hint.map.3.start=0x01840000 -hint.map.3.end=0x01f00000 -hint.map.3.name="reserved" +# Kernel on the second chip +hint.map.5.at="cfid0" +hint.map.5.start=0x02000000 +hint.map.5.end=0x03fe0000 +hint.map.5.name="kernel" # Area for use by the boot loader hint.map.4.at="cfid0" -hint.map.4.start=0x01f00000 -hint.map.4.end=0x02000000 +hint.map.4.start=0x03fe0000 +hint.map.4.end=0x04000000 hint.map.4.name="boot" -# Kernel on the second chip -hint.map.5.at="cfid0" -hint.map.5.start=0x02000000 -hint.map.5.end=0x04000000 -hint.map.5.name="kernel" +# Reserved configuration blocks. Don't touch. +hint.map.5.at="isf0" +hint.map.5.start=0x00000000 +hint.map.5.end=0x00020000 +hint.map.5.name="config" +hint.map.5.readonly=1 -# Reserved configuration blocks. Don't touch. +# Hardwired location of bitfile hint.map.6.at="isf0" -hint.map.6.start=0x00000000 -hint.map.6.end=0x00020000 -hint.map.6.name="config" -hint.map.6.readonly=1 +hint.map.6.start=0x00020000 +hint.map.6.end=0x01820000 +hint.map.6.name="fpga" -# Hardwired location of bitfile +# Currently unused space on the first chip hint.map.7.at="isf0" -hint.map.7.start=0x00020000 -hint.map.7.end=0x01820000 -hint.map.7.name="fpga" +hint.map.7.start=0x01820000 +hint.map.7.end=0x02000000 +hint.map.7.name="reserved" -# Saved OS configuration -hint.map.8.at="isf0" -hint.map.8.start=0x01820000 -hint.map.8.end=0x01840000 -hint.map.8.name="osconfig" - -# Currently unused space on the first chip -hint.map.9.at="isf0" -hint.map.9.start=0x01840000 -hint.map.9.end=0x01f00000 -hint.map.9.name="reserved" +# Kernel on the second chip +hint.map.8.at="isf1" +hint.map.8.start=0x00000000 +hint.map.8.end=0x01fe0000 +hint.map.8.name="kernel" # Area for use by the boot loader -hint.map.10.at="isf0" -hint.map.10.start=0x01f00000 +hint.map.10.at="isf1" +hint.map.10.start=0x01fe0000 hint.map.10.end=0x02000000 -hint.map.10.name="boot" - -# Kernel on the second chip -hint.map.11.at="isf1" -hint.map.11.start=0x00000000 -hint.map.11.end=0x02000000 -hint.map.11.name="kernel" +hint.map.10.name="kernel" # Altera Triple-Speed Ethernet Mac, present in tPad and DE-4 configurations # configured from fdt(4) but PHYs are still described in here. From owner-p4-projects@FreeBSD.ORG Mon Mar 4 23:26:49 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9F681AE2; Mon, 4 Mar 2013 23:26:49 +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 62DE1AE0 for ; Mon, 4 Mar 2013 23:26:49 +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 46222264 for ; Mon, 4 Mar 2013 23:26:49 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r24NQn79016046 for ; Mon, 4 Mar 2013 23:26:49 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r24NQnES016043 for perforce@freebsd.org; Mon, 4 Mar 2013 23:26:49 GMT (envelope-from brooks@freebsd.org) Date: Mon, 4 Mar 2013 23:26:49 GMT Message-Id: <201303042326.r24NQnES016043@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222634 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, 04 Mar 2013 23:26:49 -0000 http://p4web.freebsd.org/@@222634?ac=10 Change 222634 by brooks@brooks_zenith on 2013/03/04 23:25:55 Relocate the boot map entry to the end of the media to facilitate future changes. Remove the currently unused osconfig map entry as we're rapidly moving towards a boot file system where we can easily store that sort of data. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4.hints#12 integrate Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4.hints#12 (text+ko) ==== @@ -13,66 +13,55 @@ hint.map.1.end=0x01820000 hint.map.1.name="fpga" -# Saved OS configuration +# Currently unused space on the first chip +# XXX: To be merged with the kernel map when we begin using the boot loader hint.map.2.at="cfid0" hint.map.2.start=0x01820000 -hint.map.2.end=0x01840000 -hint.map.2.name="osconfig" +hint.map.2.end=0x02000000 +hint.map.2.name="reserved" -# Currently unused space on the first chip -hint.map.3.at="cfid0" -hint.map.3.start=0x01840000 -hint.map.3.end=0x01f00000 -hint.map.3.name="reserved" +# Kernel on the second chip +hint.map.5.at="cfid0" +hint.map.5.start=0x02000000 +hint.map.5.end=0x03fe0000 +hint.map.5.name="kernel" # Area for use by the boot loader hint.map.4.at="cfid0" -hint.map.4.start=0x01f00000 -hint.map.4.end=0x02000000 +hint.map.4.start=0x03fe0000 +hint.map.4.end=0x04000000 hint.map.4.name="boot" -# Kernel on the second chip -hint.map.5.at="cfid0" -hint.map.5.start=0x02000000 -hint.map.5.end=0x04000000 -hint.map.5.name="kernel" +# Reserved configuration blocks. Don't touch. +hint.map.5.at="isf0" +hint.map.5.start=0x00000000 +hint.map.5.end=0x00020000 +hint.map.5.name="config" +hint.map.5.readonly=1 -# Reserved configuration blocks. Don't touch. +# Hardwired location of bitfile hint.map.6.at="isf0" -hint.map.6.start=0x00000000 -hint.map.6.end=0x00020000 -hint.map.6.name="config" -hint.map.6.readonly=1 +hint.map.6.start=0x00020000 +hint.map.6.end=0x01820000 +hint.map.6.name="fpga" -# Hardwired location of bitfile +# Currently unused space on the first chip hint.map.7.at="isf0" -hint.map.7.start=0x00020000 -hint.map.7.end=0x01820000 -hint.map.7.name="fpga" +hint.map.7.start=0x01820000 +hint.map.7.end=0x02000000 +hint.map.7.name="reserved" -# Saved OS configuration -hint.map.8.at="isf0" -hint.map.8.start=0x01820000 -hint.map.8.end=0x01840000 -hint.map.8.name="osconfig" - -# Currently unused space on the first chip -hint.map.9.at="isf0" -hint.map.9.start=0x01840000 -hint.map.9.end=0x01f00000 -hint.map.9.name="reserved" +# Kernel on the second chip +hint.map.8.at="isf1" +hint.map.8.start=0x00000000 +hint.map.8.end=0x01fe0000 +hint.map.8.name="kernel" # Area for use by the boot loader -hint.map.10.at="isf0" -hint.map.10.start=0x01f00000 +hint.map.10.at="isf1" +hint.map.10.start=0x01fe0000 hint.map.10.end=0x02000000 -hint.map.10.name="boot" - -# Kernel on the second chip -hint.map.11.at="isf1" -hint.map.11.start=0x00000000 -hint.map.11.end=0x02000000 -hint.map.11.name="kernel" +hint.map.10.name="kernel" # Altera Triple-Speed Ethernet Mac, present in tPad and DE-4 configurations # configured from fdt(4) but PHYs are still described in here. From owner-p4-projects@FreeBSD.ORG Wed Mar 6 13:45:34 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B5A5921C; Wed, 6 Mar 2013 13:45:34 +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 76CB421A for ; Wed, 6 Mar 2013 13:45:34 +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 67FC5B27 for ; Wed, 6 Mar 2013 13:45: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 r26DjYFi019738 for ; Wed, 6 Mar 2013 13:45:34 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 r26DjYer019735 for perforce@freebsd.org; Wed, 6 Mar 2013 13:45:34 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 6 Mar 2013 13:45:34 GMT Message-Id: <201303061345.r26DjYer019735@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 222666 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, 06 Mar 2013 13:45:35 -0000 http://p4web.freebsd.org/@@222666?ac=10 Change 222666 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/03/06 13:44:46 Hook up an avgen(4) node to expose the Terasic DE-4 temperature and fan control peripheral. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#16 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#16 (text+ko) ==== @@ -148,5 +148,13 @@ sri-cambridge,fileio = "rw"; sri-cambridge,devname = "berirom"; }; + + avgen@0x7f00c000 { + compatible = "sri-cambridge,avgen"; + reg = <0x7f00c000 0x8>; + sri-cambridge,width = <4>; + sri-cambridge,fileio = "rw"; + sri-cambridge,devname = "tempfanctl"; + }; }; }; From owner-p4-projects@FreeBSD.ORG Wed Mar 6 15:08:03 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6E60B8A0; Wed, 6 Mar 2013 15:08:03 +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 1B55189E for ; Wed, 6 Mar 2013 15:08:03 +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 00878FA4 for ; Wed, 6 Mar 2013 15:08:03 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r26F82Cq027168 for ; Wed, 6 Mar 2013 15:08:02 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 r26F82wP027165 for perforce@freebsd.org; Wed, 6 Mar 2013 15:08:02 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 6 Mar 2013 15:08:02 GMT Message-Id: <201303061508.r26F82wP027165@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 222668 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, 06 Mar 2013 15:08:03 -0000 http://p4web.freebsd.org/@@222668?ac=10 Change 222668 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/03/06 15:07:50 Add a very simple de4ctl tool, which among other things will allow printing of fan and temperature information for CHERI CPUs running on the Terasic DE4. Affected files ... .. //depot/projects/ctsrd/beribsd/src/ctsrd/Makefile#15 edit .. //depot/projects/ctsrd/beribsd/src/ctsrd/de4ctl/Makefile#1 add .. //depot/projects/ctsrd/beribsd/src/ctsrd/de4ctl/de4ctl.c#1 add Differences ... ==== //depot/projects/ctsrd/beribsd/src/ctsrd/Makefile#15 (text+ko) ==== @@ -4,6 +4,7 @@ browser \ cheripoint \ cycle_led \ + de4ctl \ flashit \ libexec \ minifile \ From owner-p4-projects@FreeBSD.ORG Wed Mar 6 15:30:27 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC6EE1AA; Wed, 6 Mar 2013 15:30:27 +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 6E86F1A8 for ; Wed, 6 Mar 2013 15:30:27 +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 5DB0B162 for ; Wed, 6 Mar 2013 15:30:27 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r26FURwQ030255 for ; Wed, 6 Mar 2013 15:30:27 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 r26FURoT030252 for perforce@freebsd.org; Wed, 6 Mar 2013 15:30:27 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 6 Mar 2013 15:30:27 GMT Message-Id: <201303061530.r26FURoT030252@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 222669 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, 06 Mar 2013 15:30:27 -0000 http://p4web.freebsd.org/@@222669?ac=10 Change 222669 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/03/06 15:30:23 Fan/temperature-control device is little-endian, so byte swap as needed. Implement "-q" so that you can request just the numeric value without a label. Affected files ... .. //depot/projects/ctsrd/beribsd/src/ctsrd/de4ctl/de4ctl.c#2 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/ctsrd/de4ctl/de4ctl.c#2 (text+ko) ==== @@ -31,6 +31,7 @@ */ #include +#include #include #include @@ -50,8 +51,7 @@ usage(void) { - fprintf(stderr, "usage: de4ctl temp\n"); - fprintf(stderr, "usage: de4ctl fan\n"); + fprintf(stderr, "usage: de4ctl [-q] fan | temp\n"); exit(0); } @@ -71,7 +71,7 @@ err(1, "%s", PATH_TEMPFANCTL); if (len != sizeof(temp)) errx(1, "%s: short read", PATH_TEMPFANCTL); - printf("temp: %u\n", temp); + printf("%s%u\n", qflag ? "" : "temp:\t", le32toh(temp)); close(fd); } @@ -91,7 +91,7 @@ err(1, "%s", PATH_TEMPFANCTL); if (len != sizeof(fan)) errx(1, "%s: short read", PATH_TEMPFANCTL); - printf("fan: %u\n", fan); + printf("%s%u\n", qflag ? "" : "fan:\t", le32toh(fan)); close(fd); } From owner-p4-projects@FreeBSD.ORG Wed Mar 6 16:09:10 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BBA06B38; Wed, 6 Mar 2013 16:09:10 +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 796B4B36 for ; Wed, 6 Mar 2013 16:09:10 +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 5E825384 for ; Wed, 6 Mar 2013 16:09:10 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r26G9APp033116 for ; Wed, 6 Mar 2013 16:09:10 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 r26G99GF033112 for perforce@freebsd.org; Wed, 6 Mar 2013 16:09:09 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 6 Mar 2013 16:09:09 GMT Message-Id: <201303061609.r26G99GF033112@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 222670 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, 06 Mar 2013 16:09:10 -0000 http://p4web.freebsd.org/@@222670?ac=10 Change 222670 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/03/06 16:08:52 On reflection, rename the fan/temperature control device to make it more clear that it's DE4-related, and can only be used by de4ctl. Fix a bug in de4ctl involving silly misuse of string functions (doh). Affected files ... .. //depot/projects/ctsrd/beribsd/src/ctsrd/de4ctl/de4ctl.c#3 edit .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#17 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/ctsrd/de4ctl/de4ctl.c#3 (text+ko) ==== @@ -40,7 +40,7 @@ #include #include -#define PATH_TEMPFANCTL "/dev/tempfanctl" +#define PATH_TEMPFANCTL "/dev/de4tempfan" #define OFF_TEMP 0 #define OFF_FAN 4 @@ -120,9 +120,9 @@ if (argc < 1) usage(); - if (strcmp(argv[0], "fan")) + if (strcmp(argv[0], "fan") == 0) do_fan(); - else if (strcmp(argv[0], "temp")) + else if (strcmp(argv[0], "temp") == 0) do_temp(); else usage(); ==== //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#17 (text+ko) ==== @@ -154,7 +154,7 @@ reg = <0x7f00c000 0x8>; sri-cambridge,width = <4>; sri-cambridge,fileio = "rw"; - sri-cambridge,devname = "tempfanctl"; + sri-cambridge,devname = "de4tempfan"; }; }; }; From owner-p4-projects@FreeBSD.ORG Wed Mar 6 21:40:07 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 36F294EF; Wed, 6 Mar 2013 21:40:07 +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 E8D4E4ED for ; Wed, 6 Mar 2013 21:40:06 +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 DA3D8A13 for ; Wed, 6 Mar 2013 21:40:06 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r26Le6HL064554 for ; Wed, 6 Mar 2013 21:40:06 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r26Le6fj064551 for perforce@freebsd.org; Wed, 6 Mar 2013 21:40:06 GMT (envelope-from brooks@freebsd.org) Date: Wed, 6 Mar 2013 21:40:06 GMT Message-Id: <201303062140.r26Le6fj064551@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222673 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, 06 Mar 2013 21:40:07 -0000 http://p4web.freebsd.org/@@222673?ac=10 Change 222673 by brooks@brooks_zenith on 2013/03/06 21:39:17 Fix a truly embarrassing bug that resulted in only the first buffer of the block being written. Performance is still quite good, but not as good as when I was only writing 1/128 of the data. Be more consistant about which address we write commands to. This doesn't appear to have been a functional issue with ISF parts, but consistancy is a good thing. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/cfi/cfi_core.c#11 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/cfi/cfi_core.c#11 (text+ko) ==== @@ -545,13 +545,13 @@ break; } - cfi_write(sc, sc->sc_wrofs, CFI_BCS_CONFIRM); + cfi_write(sc, sc->sc_wrofs + i, + CFI_BCS_CONFIRM); - error = cfi_wait_ready(sc, sc->sc_wrofs + 1, + error = cfi_wait_ready(sc, sc->sc_wrofs + i, &start, CFI_TIMEOUT_BUFWRITE); - - goto out; } + goto out; default: /* Fall through to single word case */ break; From owner-p4-projects@FreeBSD.ORG Wed Mar 6 21:49:16 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 91F00745; Wed, 6 Mar 2013 21:49:16 +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 55578743 for ; Wed, 6 Mar 2013 21:49:16 +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 468BBA73 for ; Wed, 6 Mar 2013 21:49: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 r26LnGnW065315 for ; Wed, 6 Mar 2013 21:49:16 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r26LnG0G065312 for perforce@freebsd.org; Wed, 6 Mar 2013 21:49:16 GMT (envelope-from brooks@freebsd.org) Date: Wed, 6 Mar 2013 21:49:16 GMT Message-Id: <201303062149.r26LnG0G065312@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222674 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, 06 Mar 2013 21:49:16 -0000 http://p4web.freebsd.org/@@222674?ac=10 Change 222674 by brooks@brooks_zenith on 2013/03/06 21:48:47 Integrate from BeriBSD at 222673. cfi(4) writes work correctly and add de4ctl. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd/Makefile#11 integrate .. //depot/projects/ctsrd/cheribsd/src/ctsrd/de4ctl/Makefile#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/de4ctl/de4ctl.c#1 branch .. //depot/projects/ctsrd/cheribsd/src/sys/boot/fdt/dts/beripad-de4.dts#5 integrate .. //depot/projects/ctsrd/cheribsd/src/sys/dev/cfi/cfi_core.c#6 integrate Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/Makefile#11 (text+ko) ==== @@ -4,6 +4,7 @@ browser \ cheripoint \ cycle_led \ + de4ctl \ flashit \ libexec \ minifile \ ==== //depot/projects/ctsrd/cheribsd/src/sys/boot/fdt/dts/beripad-de4.dts#5 (text+ko) ==== @@ -148,5 +148,13 @@ sri-cambridge,fileio = "rw"; sri-cambridge,devname = "berirom"; }; + + avgen@0x7f00c000 { + compatible = "sri-cambridge,avgen"; + reg = <0x7f00c000 0x8>; + sri-cambridge,width = <4>; + sri-cambridge,fileio = "rw"; + sri-cambridge,devname = "de4tempfan"; + }; }; }; ==== //depot/projects/ctsrd/cheribsd/src/sys/dev/cfi/cfi_core.c#6 (text+ko) ==== @@ -545,13 +545,13 @@ break; } - cfi_write(sc, sc->sc_wrofs, CFI_BCS_CONFIRM); + cfi_write(sc, sc->sc_wrofs + i, + CFI_BCS_CONFIRM); - error = cfi_wait_ready(sc, sc->sc_wrofs + 1, + error = cfi_wait_ready(sc, sc->sc_wrofs + i, &start, CFI_TIMEOUT_BUFWRITE); - - goto out; } + goto out; default: /* Fall through to single word case */ break; From owner-p4-projects@FreeBSD.ORG Wed Mar 6 22:57:31 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 89381504; Wed, 6 Mar 2013 22:57:31 +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 232064E7 for ; Wed, 6 Mar 2013 22:57:31 +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 0DA87E73 for ; Wed, 6 Mar 2013 22:57:31 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r26MvUeD071767 for ; Wed, 6 Mar 2013 22:57:30 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r26MvUG4071764 for perforce@freebsd.org; Wed, 6 Mar 2013 22:57:30 GMT (envelope-from brooks@freebsd.org) Date: Wed, 6 Mar 2013 22:57:30 GMT Message-Id: <201303062257.r26MvUG4071764@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222677 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, 06 Mar 2013 22:57:31 -0000 http://p4web.freebsd.org/@@222677?ac=10 Change 222677 by brooks@brooks_zenith on 2013/03/06 22:57:04 Remove bogus libmagic dependency. Affected files ... .. //depot/projects/ctsrd/beribsd/src/ctsrd/mtlctl/Makefile#2 edit .. //depot/projects/ctsrd/beribsd/src/ctsrd/mtlctl/mtlctl.c#6 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/ctsrd/mtlctl/Makefile#2 (text+ko) ==== @@ -9,6 +9,6 @@ WARNS= 6 -LDADD+= -lde4tc -lvuln_png -lz -lm -lvuln_magic +LDADD+= -lde4tc -lvuln_png -lz -lm .include ==== //depot/projects/ctsrd/beribsd/src/ctsrd/mtlctl/mtlctl.c#6 (text+ko) ==== @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include From owner-p4-projects@FreeBSD.ORG Wed Mar 6 23:49:29 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C69F77A; Wed, 6 Mar 2013 23:49:29 +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 F0E00778 for ; Wed, 6 Mar 2013 23:49:28 +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 E0C80240 for ; Wed, 6 Mar 2013 23:49:28 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r26NnSL9076842 for ; Wed, 6 Mar 2013 23:49:28 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r26NnSUJ076839 for perforce@freebsd.org; Wed, 6 Mar 2013 23:49:28 GMT (envelope-from brooks@freebsd.org) Date: Wed, 6 Mar 2013 23:49:28 GMT Message-Id: <201303062349.r26NnSUJ076839@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222681 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, 06 Mar 2013 23:49:29 -0000 http://p4web.freebsd.org/@@222681?ac=10 Change 222681 by brooks@brooks_zenith on 2013/03/06 23:48:36 Remove bogus libmagic dependency. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd/mtlctl/Makefile#3 integrate .. //depot/projects/ctsrd/cheribsd/src/ctsrd/mtlctl/mtlctl.c#3 integrate Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/mtlctl/Makefile#3 (text+ko) ==== ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/mtlctl/mtlctl.c#3 (text+ko) ==== @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include From owner-p4-projects@FreeBSD.ORG Wed Mar 6 23:58:40 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 16A5B9AA; Wed, 6 Mar 2013 23:58: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 CCA5C9A8 for ; Wed, 6 Mar 2013 23:58:39 +0000 (UTC) (envelope-from jonathan@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 B8BC9291 for ; Wed, 6 Mar 2013 23:58:39 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r26Nwdc0077619 for ; Wed, 6 Mar 2013 23:58:39 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r26NwdUd077616 for perforce@freebsd.org; Wed, 6 Mar 2013 23:58:39 GMT (envelope-from jonathan@freebsd.org) Date: Wed, 6 Mar 2013 23:58:39 GMT Message-Id: <201303062358.r26NwdUd077616@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 222682 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, 06 Mar 2013 23:58:40 -0000 http://p4web.freebsd.org/@@222682?ac=10 Change 222682 by jonathan@jonathan-on-kent on 2013/03/06 23:58:34 Suffix rules for building TESLA-related parts. Affected files ... .. //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#3 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#3 (text+ko) ==== @@ -32,7 +32,7 @@ .if defined(%POSIX) .SUFFIXES: .o .c .y .l .a .sh .f .else -.SUFFIXES: .out .a .obc .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh +.SUFFIXES: .out .a .instrll .instro .oll .obc .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .tesla .y .l .S .asm .s .cl .p .h .sh .endif AR ?= ar @@ -150,6 +150,8 @@ SHELL ?= sh +TESLA ?= tesla + YACC ?= yacc .if defined(%POSIX) YFLAGS ?= @@ -228,6 +230,9 @@ cp -fp ${.IMPSRC} ${.TARGET} chmod a+x ${.TARGET} +.c.oll: + ${CC} ${CFLAGS} -emit-llvm -S ${.IMPSRC} -o ${.TARGET} + .c.obc: ${CC} ${CFLAGS} -cc1 -emit-llvm -c ${.IMPSRC} -o ${.TARGET} @@ -247,6 +252,9 @@ ${CC} ${CFLAGS} -c ${.IMPSRC} ${CTFCONVERT_CMD} +.c.tesla: + ${TESLA} analyse ${.IMPSRC} -o ${.TARGET} -- ${CFLAGS} -D TESLA + .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @@ -271,6 +279,13 @@ .e.o .r.o .F.o .f.o: ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} +.instrll.instro: tesla.manifest + ${LLC} -filetype=obj ${.IMPSRC} -o ${.TARGET} + +.oll.instrll: + ${TESLA} instrument -S -verify-each -tesla-manifest tesla.manifest \ + ${.IMPSRC} -o ${.TARGET} + .S.o: ${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} ${CTFCONVERT_CMD} From owner-p4-projects@FreeBSD.ORG Thu Mar 7 00:00:42 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8E55DAC7; Thu, 7 Mar 2013 00:00:42 +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 12D0FAC5 for ; Thu, 7 Mar 2013 00:00:42 +0000 (UTC) (envelope-from jonathan@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 049C62AC for ; Thu, 7 Mar 2013 00:00:42 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r2700fjU077916 for ; Thu, 7 Mar 2013 00:00:41 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r2700fnM077913 for perforce@freebsd.org; Thu, 7 Mar 2013 00:00:41 GMT (envelope-from jonathan@freebsd.org) Date: Thu, 7 Mar 2013 00:00:41 GMT Message-Id: <201303070000.r2700fnM077913@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 222683 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, 07 Mar 2013 00:00:42 -0000 http://p4web.freebsd.org/@@222683?ac=10 Change 222683 by jonathan@jonathan-on-kent on 2013/03/06 23:59:58 A 'make tesla' target for things that include bsd.prog.mk. Affected files ... .. //depot/projects/ctsrd/tesla/src/share/mk/bsd.prog.mk#3 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.prog.mk#3 (text+ko) ==== @@ -92,6 +92,20 @@ .endif # !defined(SRCS) +TESLA_FILES= ${SRCS:.c=.tesla} +OLLS= ${SRCS:.c=.oll} +INSTRLLS= ${SRCS:.c=.instrll} +INSTROBJS= ${SRCS:.c=.instro} +CLEANFILES+= ${TESLA_FILES} tesla.manifest ${OLLS} ${INSTRLLS} ${INSTROBJS} + +tesla.manifest: ${TESLA_FILES} + cat ${TESLA_FILES} > ${.TARGET} + +tesla: ${PROG}.instrumented + +${PROG}.instrumented: ${INSTROBJS} + ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${INSTROBJS} ${LDADD} -ltesla + .if defined(LLVM_IR) && !defined(NO_LLVM_IR) LOBJS:= ${SRCS:M*.[Cc]:R:S/$/.obc/:N.obc} \ ${SRCS:M*.cc:R:S/$/.obc/:N.obc} \ From owner-p4-projects@FreeBSD.ORG Thu Mar 7 00:01:44 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B4543BDE; Thu, 7 Mar 2013 00:01: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 77F13BDC for ; Thu, 7 Mar 2013 00:01:43 +0000 (UTC) (envelope-from jonathan@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 5DB512B5 for ; Thu, 7 Mar 2013 00:01: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 r2701hFw078261 for ; Thu, 7 Mar 2013 00:01:43 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r2701hUp078258 for perforce@freebsd.org; Thu, 7 Mar 2013 00:01:43 GMT (envelope-from jonathan@freebsd.org) Date: Thu, 7 Mar 2013 00:01:43 GMT Message-Id: <201303070001.r2701hUp078258@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 222684 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, 07 Mar 2013 00:01:44 -0000 http://p4web.freebsd.org/@@222684?ac=10 Change 222684 by jonathan@jonathan-on-kent on 2013/03/07 00:01:37 Add libtesla to Perforce branch. Affected files ... .. //depot/projects/ctsrd/tesla/src/Makefile.inc1#10 edit .. //depot/projects/ctsrd/tesla/src/lib/Makefile#2 edit .. //depot/projects/ctsrd/tesla/src/lib/libtesla/Makefile#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/debug.c#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/key.c#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/libtesla.h#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/state-global.c#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/state-perthread.c#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/state.c#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/store.c#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/tesla.h#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/tesla_internal.h#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/update.c#1 add .. //depot/projects/ctsrd/tesla/src/lib/libtesla/util.c#1 add Differences ... ==== //depot/projects/ctsrd/tesla/src/Makefile.inc1#10 (text+ko) ==== @@ -1441,7 +1441,7 @@ ${_lib_libgssapi} ${_lib_libipx} \ lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ - lib/libopie lib/libpam ${_lib_libthr} \ + lib/libopie lib/libpam lib/libtesla ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ==== //depot/projects/ctsrd/tesla/src/lib/Makefile#2 (text+ko) ==== @@ -108,6 +108,7 @@ libstdbuf \ libstdthreads \ ${_libtelnet} \ + libtesla \ ${_libthr} \ libthread_db \ libufs \ From owner-p4-projects@FreeBSD.ORG Thu Mar 7 00:04:47 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 06052D8D; Thu, 7 Mar 2013 00:04: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 BC050D8B for ; Thu, 7 Mar 2013 00:04:46 +0000 (UTC) (envelope-from jonathan@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 ADC2C2DE for ; Thu, 7 Mar 2013 00:04:46 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r2704kt1078380 for ; Thu, 7 Mar 2013 00:04:46 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r2704k2B078377 for perforce@freebsd.org; Thu, 7 Mar 2013 00:04:46 GMT (envelope-from jonathan@freebsd.org) Date: Thu, 7 Mar 2013 00:04:46 GMT Message-Id: <201303070004.r2704k2B078377@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 222685 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, 07 Mar 2013 00:04:47 -0000 http://p4web.freebsd.org/@@222685?ac=10 Change 222685 by jonathan@jonathan-on-kent on 2013/03/07 00:04:08 Try out a (very, very simple) TESLA assertion in bin/ls. Affected files ... .. //depot/projects/ctsrd/tesla/src/bin/ls/ls.c#2 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/bin/ls/ls.c#2 (text+ko) ==== @@ -67,6 +67,10 @@ #include #endif +#ifdef TESLA +#include "tesla-macros.h" +#endif + #include "ls.h" #include "extern.h" @@ -567,6 +571,10 @@ static void display(const FTSENT *p, FTSENT *list, int options) { +#ifdef TESLA + TESLA_GLOBAL(since(called(main), called(traverse))); +#endif + struct stat *sp; DISPLAY d; FTSENT *cur; From owner-p4-projects@FreeBSD.ORG Thu Mar 7 13:57:56 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7969CBB2; Thu, 7 Mar 2013 13:57:56 +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 3A183BB0 for ; Thu, 7 Mar 2013 13:57:56 +0000 (UTC) (envelope-from jonathan@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 2AFF4B5F for ; Thu, 7 Mar 2013 13:57:56 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r27Dvu8F059045 for ; Thu, 7 Mar 2013 13:57:56 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r27DvuYn059042 for perforce@freebsd.org; Thu, 7 Mar 2013 13:57:56 GMT (envelope-from jonathan@freebsd.org) Date: Thu, 7 Mar 2013 13:57:56 GMT Message-Id: <201303071357.r27DvuYn059042@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 222695 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, 07 Mar 2013 13:57:56 -0000 http://p4web.freebsd.org/@@222695?ac=10 Change 222695 by jonathan@jonathan-on-kent on 2013/03/07 13:57:35 Update to latest libtesla parts from GitHub. Affected files ... .. //depot/projects/ctsrd/tesla/src/lib/libtesla/tesla.h#2 edit .. //depot/projects/ctsrd/tesla/src/lib/libtesla/update.c#2 edit .. //depot/projects/ctsrd/tesla/src/lib/libtesla/util.c#2 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/lib/libtesla/tesla.h#2 (text+ko) ==== @@ -99,7 +99,7 @@ /** Declare an automaton that describes behaviour of this struct. */ #define __tesla_struct_automaton(fn_name) \ - void *__tesla_struct_annotation_##fn_name; + void *__tesla_automaton_struct_uses_##fn_name; /** * Define an automaton to describe a struct's behaviour. ==== //depot/projects/ctsrd/tesla/src/lib/libtesla/update.c#2 (text+ko) ==== @@ -121,7 +121,7 @@ // instructed to fork), just update the state. if (!t->fork && SUBSET(key->tk_mask, k->tk_mask)) { - VERBOSE_PRINT("update %ld: %tx->%tx\n", + VERBOSE_PRINT("update %td: %tx->%tx\n", inst - start, t->from, t->to); inst->ti_state = t->to; @@ -133,7 +133,7 @@ // a new (more specific) automaton instance. struct tesla_instance *copy; CHECK(tesla_clone, class, inst, ©); - VERBOSE_PRINT("clone %ld:%tx -> %ld:%tx\n", + VERBOSE_PRINT("clone %td:%tx -> %td:%tx\n", inst - start, inst->ti_state, copy - start, t->to); @@ -157,7 +157,7 @@ CHECK(tesla_instance_new, class, key, t->to, &inst); assert(tesla_instance_active(inst)); - VERBOSE_PRINT("new %ld: %tx\n", + VERBOSE_PRINT("new %td: %tx\n", inst - start, inst->ti_state); } ==== //depot/projects/ctsrd/tesla/src/lib/libtesla/util.c#2 (text+ko) ==== @@ -32,8 +32,6 @@ #include "tesla_internal.h" -#include - void tesla_die(char *message) From owner-p4-projects@FreeBSD.ORG Thu Mar 7 14:42:45 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C84E5C5C; Thu, 7 Mar 2013 14:42:45 +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 8A6BFC5A for ; Thu, 7 Mar 2013 14:42:45 +0000 (UTC) (envelope-from jonathan@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 791FBEAB for ; Thu, 7 Mar 2013 14:42:45 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r27Egj2R063996 for ; Thu, 7 Mar 2013 14:42:45 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r27Egjb1063993 for perforce@freebsd.org; Thu, 7 Mar 2013 14:42:45 GMT (envelope-from jonathan@freebsd.org) Date: Thu, 7 Mar 2013 14:42:45 GMT Message-Id: <201303071442.r27Egjb1063993@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 222699 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, 07 Mar 2013 14:42:46 -0000 http://p4web.freebsd.org/@@222699?ac=10 Change 222699 by jonathan@jonathan-on-kent on 2013/03/07 14:42:19 Pass cross-building flags XFLAGS to buildenv environment, allowing us to find tesla.h and libtesla.so.1. Affected files ... .. //depot/projects/ctsrd/tesla/src/Makefile.inc1#11 edit .. //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#4 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/Makefile.inc1#11 (text+ko) ==== @@ -304,7 +304,8 @@ WMAKEENV+= CC="${XCC} ${XFLAGS}" CXX="${XCXX} ${XFLAGS}" \ CPP="${XCPP} ${XFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ - OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ + XFLAGS="${XFLAGS}" .if ${XCC:T:Mgcc} == "gcc" WMAKE_COMPILER_TYPE= gcc ==== //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#4 (text+ko) ==== @@ -253,7 +253,7 @@ ${CTFCONVERT_CMD} .c.tesla: - ${TESLA} analyse ${.IMPSRC} -o ${.TARGET} -- ${CFLAGS} -D TESLA + ${TESLA} analyse ${.IMPSRC} -o ${.TARGET} -- ${CFLAGS} ${XFLAGS} -D TESLA .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} From owner-p4-projects@FreeBSD.ORG Thu Mar 7 14:49:53 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC7E7F6A; Thu, 7 Mar 2013 14:49:53 +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 6E2B5F68 for ; Thu, 7 Mar 2013 14:49:53 +0000 (UTC) (envelope-from jonathan@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 5E298F14 for ; Thu, 7 Mar 2013 14:49:53 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r27EnrbG064264 for ; Thu, 7 Mar 2013 14:49:53 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r27Enrpf064261 for perforce@freebsd.org; Thu, 7 Mar 2013 14:49:53 GMT (envelope-from jonathan@freebsd.org) Date: Thu, 7 Mar 2013 14:49:53 GMT Message-Id: <201303071449.r27Enrpf064261@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 222700 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, 07 Mar 2013 14:49:53 -0000 http://p4web.freebsd.org/@@222700?ac=10 Change 222700 by jonathan@jonathan-on-kent on 2013/03/07 14:49:24 Clean up ${PROG}.instrumented as part of "make clean". Affected files ... .. //depot/projects/ctsrd/tesla/src/share/mk/bsd.prog.mk#4 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.prog.mk#4 (text+ko) ==== @@ -96,7 +96,8 @@ OLLS= ${SRCS:.c=.oll} INSTRLLS= ${SRCS:.c=.instrll} INSTROBJS= ${SRCS:.c=.instro} -CLEANFILES+= ${TESLA_FILES} tesla.manifest ${OLLS} ${INSTRLLS} ${INSTROBJS} +CLEANFILES+= ${TESLA_FILES} tesla.manifest ${OLLS} ${INSTRLLS} ${INSTROBJS} \ + ${PROG}.instrumented tesla.manifest: ${TESLA_FILES} cat ${TESLA_FILES} > ${.TARGET} From owner-p4-projects@FreeBSD.ORG Thu Mar 7 14:51:56 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 33F451B5; Thu, 7 Mar 2013 14:51:56 +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 D39DF1B3 for ; Thu, 7 Mar 2013 14:51:55 +0000 (UTC) (envelope-from jonathan@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 C407FF31 for ; Thu, 7 Mar 2013 14:51:55 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r27Ept3P064788 for ; Thu, 7 Mar 2013 14:51:55 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r27Eptg5064785 for perforce@freebsd.org; Thu, 7 Mar 2013 14:51:55 GMT (envelope-from jonathan@freebsd.org) Date: Thu, 7 Mar 2013 14:51:55 GMT Message-Id: <201303071451.r27Eptg5064785@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 222701 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, 07 Mar 2013 14:51:56 -0000 http://p4web.freebsd.org/@@222701?ac=10 Change 222701 by jonathan@jonathan-on-kent on 2013/03/07 14:51:29 Add support for 'make tesla.dot', which produces a GraphViz representation of the automata described in the current program. Affected files ... .. //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#5 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#5 (text+ko) ==== @@ -32,7 +32,7 @@ .if defined(%POSIX) .SUFFIXES: .o .c .y .l .a .sh .f .else -.SUFFIXES: .out .a .instrll .instro .oll .obc .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .tesla .y .l .S .asm .s .cl .p .h .sh +.SUFFIXES: .out .a .dot .instrll .instro .oll .obc .ln .manifest .o .c .cc .cpp .cxx .C .m .F .f .e .r .tesla .y .l .S .asm .s .cl .p .h .sh .endif AR ?= ar @@ -282,6 +282,9 @@ .instrll.instro: tesla.manifest ${LLC} -filetype=obj ${.IMPSRC} -o ${.TARGET} +.manifest.dot: + ${TESLA} graph ${.IMPSRC} -o ${.TARGET} + .oll.instrll: ${TESLA} instrument -S -verify-each -tesla-manifest tesla.manifest \ ${.IMPSRC} -o ${.TARGET} From owner-p4-projects@FreeBSD.ORG Thu Mar 7 14:52:57 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 770752B4; Thu, 7 Mar 2013 14:52:57 +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 397262B2 for ; Thu, 7 Mar 2013 14:52:57 +0000 (UTC) (envelope-from jonathan@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 0800BF3F for ; Thu, 7 Mar 2013 14:52:57 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r27Equ5f064829 for ; Thu, 7 Mar 2013 14:52:56 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r27EquEx064826 for perforce@freebsd.org; Thu, 7 Mar 2013 14:52:56 GMT (envelope-from jonathan@freebsd.org) Date: Thu, 7 Mar 2013 14:52:56 GMT Message-Id: <201303071452.r27EquEx064826@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 222702 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, 07 Mar 2013 14:52:57 -0000 http://p4web.freebsd.org/@@222702?ac=10 Change 222702 by jonathan@jonathan-on-kent on 2013/03/07 14:51:56 Another (rather trivial) assertion for bin/ls. Affected files ... .. //depot/projects/ctsrd/tesla/src/bin/ls/ls.c#3 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/bin/ls/ls.c#3 (text+ko) ==== @@ -573,6 +573,7 @@ { #ifdef TESLA TESLA_GLOBAL(since(called(main), called(traverse))); + TESLA_GLOBAL(before(returned(main), returned(display))); #endif struct stat *sp; From owner-p4-projects@FreeBSD.ORG Fri Mar 8 05:38:01 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 45F915FA; Fri, 8 Mar 2013 05:38:01 +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 D1BF35F8 for ; Fri, 8 Mar 2013 05:38:00 +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 C2D9592C for ; Fri, 8 Mar 2013 05:38:00 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r285c0c5051405 for ; Fri, 8 Mar 2013 05:38:00 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r285c0Be051400 for perforce@freebsd.org; Fri, 8 Mar 2013 05:38:00 GMT (envelope-from brooks@freebsd.org) Date: Fri, 8 Mar 2013 05:38:00 GMT Message-Id: <201303080538.r285c0Be051400@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222715 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, 08 Mar 2013 05:38:01 -0000 http://p4web.freebsd.org/@@222715?ac=10 Change 222715 by brooks@brooks_zenith on 2013/03/08 05:37:36 Add llc to the list of cross compilers. Affected files ... .. //depot/projects/ctsrd/tesla/src/Makefile.inc1#12 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/Makefile.inc1#12 (text+ko) ==== @@ -285,7 +285,7 @@ CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} .endif -XCOMPILERS= CC CXX CPP +XCOMPILERS= CC CXX CPP LLC .for COMPILER in ${XCOMPILERS} .if defined(CROSS_COMPILER_PREFIX) X${COMPILER}?= ${CROSS_COMPILER_PREFIX}${${COMPILER}} @@ -302,7 +302,7 @@ .endif .endfor WMAKEENV+= CC="${XCC} ${XFLAGS}" CXX="${XCXX} ${XFLAGS}" \ - CPP="${XCPP} ${XFLAGS}" \ + CPP="${XCPP} ${XFLAGS}" LLC="${XLLC}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ XFLAGS="${XFLAGS}" From owner-p4-projects@FreeBSD.ORG Fri Mar 8 05:40:03 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ECA177CD; Fri, 8 Mar 2013 05:40:02 +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 AE2ED7CB for ; Fri, 8 Mar 2013 05:40:02 +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 9FC3C93F for ; Fri, 8 Mar 2013 05:40:02 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r285e2X9051519 for ; Fri, 8 Mar 2013 05:40:02 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r285e2jF051516 for perforce@freebsd.org; Fri, 8 Mar 2013 05:40:02 GMT (envelope-from brooks@freebsd.org) Date: Fri, 8 Mar 2013 05:40:02 GMT Message-Id: <201303080540.r285e2jF051516@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222716 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, 08 Mar 2013 05:40:03 -0000 http://p4web.freebsd.org/@@222716?ac=10 Change 222716 by brooks@brooks_zenith on 2013/03/08 05:39:24 Make the oll.instrll depend on tesla.manifest since it is used by the command line. Affected files ... .. //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#6 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#6 (text+ko) ==== @@ -285,9 +285,9 @@ .manifest.dot: ${TESLA} graph ${.IMPSRC} -o ${.TARGET} -.oll.instrll: +.oll.instrll: tesla.manifest ${TESLA} instrument -S -verify-each -tesla-manifest tesla.manifest \ - ${.IMPSRC} -o ${.TARGET} + ${.IMPSRC} -o ${.TARGET} .S.o: ${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} From owner-p4-projects@FreeBSD.ORG Fri Mar 8 05:42:05 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7FCE88C3; Fri, 8 Mar 2013 05:42:05 +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 43B368C1 for ; Fri, 8 Mar 2013 05:42:05 +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 2420C94B for ; Fri, 8 Mar 2013 05:42:05 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r285g514052021 for ; Fri, 8 Mar 2013 05:42:05 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r285g5sD052018 for perforce@freebsd.org; Fri, 8 Mar 2013 05:42:05 GMT (envelope-from brooks@freebsd.org) Date: Fri, 8 Mar 2013 05:42:05 GMT Message-Id: <201303080542.r285g5sD052018@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222717 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, 08 Mar 2013 05:42:05 -0000 http://p4web.freebsd.org/@@222717?ac=10 Change 222717 by brooks@brooks_zenith on 2013/03/08 05:41:38 Generate the right files when build .bc files. Affected files ... .. //depot/projects/ctsrd/tesla/src/share/mk/bsd.lib.mk#4 edit .. //depot/projects/ctsrd/tesla/src/share/mk/bsd.prog.mk#5 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.lib.mk#4 (text+ko) ==== @@ -168,7 +168,7 @@ .if empty(OPT_PASSES) cp lib${LIB}.bc ${.TARGET} .else - ${OPT} -o ${.TARGET} ${OPT_PASSES} ${.ALLSRC} + ${OPT} -o ${.TARGET} ${OPT_PASSES} lib${LIB}.bc .endif .endif ==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.prog.mk#5 (text+ko) ==== @@ -124,7 +124,7 @@ .if empty(OPT_PASSES) cp ${PROG}.bc ${.TARGET} .else - ${OPT} -o ${.TARGET} ${OPT_PASSES} ${.IMPSRC} + ${OPT} -o ${.TARGET} ${OPT_PASSES} ${PROG}.bc .endif .endif .endif From owner-p4-projects@FreeBSD.ORG Fri Mar 8 06:48:18 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C47620A; Fri, 8 Mar 2013 06:48:18 +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 CFE84208 for ; Fri, 8 Mar 2013 06:48:17 +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 C13D2B81 for ; Fri, 8 Mar 2013 06:48:17 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r286mHnq057577 for ; Fri, 8 Mar 2013 06:48:17 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r286mHBc057574 for perforce@freebsd.org; Fri, 8 Mar 2013 06:48:17 GMT (envelope-from brooks@freebsd.org) Date: Fri, 8 Mar 2013 06:48:17 GMT Message-Id: <201303080648.r286mHBc057574@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222718 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, 08 Mar 2013 06:48:18 -0000 http://p4web.freebsd.org/@@222718?ac=10 Change 222718 by brooks@brooks_zenith on 2013/03/08 06:47:49 Disable all the highpoint raid controllers. A temporary change to config(8) will break binary only drivers linked statically. Affected files ... .. //depot/projects/ctsrd/tesla/src/sys/amd64/conf/GENERIC#2 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/sys/amd64/conf/GENERIC#2 (text+ko) ==== @@ -115,7 +115,7 @@ options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. device esp # AMD Am53C974 (Tekram DC-390(T)) -device hptiop # Highpoint RocketRaid 3xxx series +#device hptiop # Highpoint RocketRaid 3xxx series device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion @@ -147,9 +147,9 @@ #device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID device ciss # Compaq Smart RAID 5* device dpt # DPT Smartcache III, IV - See NOTES for options -device hptmv # Highpoint RocketRAID 182x -device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx -device hpt27xx # Highpoint RocketRAID 27xx +#device hptmv # Highpoint RocketRAID 182x +#device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx +#device hpt27xx # Highpoint RocketRAID 27xx device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID From owner-p4-projects@FreeBSD.ORG Fri Mar 8 06:49:19 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 50F3C32C; Fri, 8 Mar 2013 06:49:19 +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 1281232A for ; Fri, 8 Mar 2013 06:49:19 +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 F308DBDD for ; Fri, 8 Mar 2013 06:49: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 r286nIQP057616 for ; Fri, 8 Mar 2013 06:49:18 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r286nIMP057613 for perforce@freebsd.org; Fri, 8 Mar 2013 06:49:18 GMT (envelope-from brooks@freebsd.org) Date: Fri, 8 Mar 2013 06:49:18 GMT Message-Id: <201303080649.r286nIMP057613@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222719 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, 08 Mar 2013 06:49:19 -0000 http://p4web.freebsd.org/@@222719?ac=10 Change 222719 by brooks@brooks_zenith on 2013/03/08 06:49:16 Checkpoint a work in progress change to config to allow a kernel to be build with tesla annotations when the -t argument is passed. Affected files ... .. //depot/projects/ctsrd/tesla/src/sys/conf/Makefile.amd64#2 edit .. //depot/projects/ctsrd/tesla/src/sys/conf/kern.post.mk#2 edit .. //depot/projects/ctsrd/tesla/src/usr.sbin/config/config.h#2 edit .. //depot/projects/ctsrd/tesla/src/usr.sbin/config/main.c#2 edit .. //depot/projects/ctsrd/tesla/src/usr.sbin/config/mkmakefile.c#2 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/sys/conf/Makefile.amd64#2 (text+ko) ==== @@ -48,9 +48,11 @@ %OBJS +%TESLA + %FILES.c -%FILES.s +%FILES.S %FILES.m ==== //depot/projects/ctsrd/tesla/src/sys/conf/kern.post.mk#2 (text+ko) ==== @@ -83,6 +83,10 @@ kernel-all: ${KERNEL_KO} ${KERNEL_EXTRA} +.if defined(DO_TESLA) +kernel-all: ${KERNEL_KO}.instrumented +.endif + kernel-cleandir: kernel-clean kernel-cleandepend kernel-clobber: @@ -157,12 +161,30 @@ linterrs tags vers.c \ vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ + ${TESLA_FILES} ${OLLS} ${INSTRLLS} ${INSTROBJS} \ + tesla.manifest ${KERNEL_KO}.instrumented \ ${CLEAN} lint: ${LNFILES} ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | \ tee -a linterrs +TESLA_CFILES= ${CFILES} ${SYSTEM_CFILES} +TESLA_FILES= ${TESLA_CFILES:T:.c=.tesla} +OLLS= ${TESLA_CFILES:T:.c=.oll} +INSTRLLS= ${TESLA_CFILES:T:.c=.instrll} +INSTROBJS= ${TESLA_CFILES:T:.c=.instro} + +tesla.manifest: ${TESLA_FILES} + cat ${TESLA_FILES} > ${.TARGET} + +tesla: ${KERNEL_KO}.instrumented + +${KERNEL_KO}.instrumented: ${INSTROBJS} + ${LD} -Bdynamic -T ${LDSCRIPT} ${LDFLAGS} --no-warn-mismatch \ + -warn-common -export-dynamic -dynamic-linker /red/herring \ + -o ${.TARGET} -X ${INSTROBJS} ${NOT_C_OBJS} vers.o hack.So + # This is a hack. BFD "optimizes" away dynamic mode if there are no # dynamic references. We could probably do a '-Bforcedynamic' mode like # in the a.out ld. For now, this works. ==== //depot/projects/ctsrd/tesla/src/usr.sbin/config/config.h#2 (text+ko) ==== @@ -164,6 +164,7 @@ extern int envmode; extern int hintmode; extern int incignore; +extern int tesla; char *get_word(FILE *); char *get_quoted_word(FILE *); ==== //depot/projects/ctsrd/tesla/src/usr.sbin/config/main.c#2 (text+ko) ==== @@ -78,6 +78,7 @@ int profiling; int found_defaults; int incignore; +int tesla; /* * Preserve old behaviour in INCLUDE_CONFIG_FILE handling (files are included @@ -114,7 +115,7 @@ printmachine = 0; kernfile = NULL; - while ((ch = getopt(argc, argv, "Cd:gmpVx:")) != -1) + while ((ch = getopt(argc, argv, "Cd:gmptVx:")) != -1) switch (ch) { case 'C': filebased = 1; @@ -134,6 +135,9 @@ case 'p': profiling++; break; + case 't': + tesla++; + break; case 'V': printf("%d\n", CONFIGVERS); exit(0); ==== //depot/projects/ctsrd/tesla/src/usr.sbin/config/mkmakefile.c#2 (text+ko) ==== @@ -69,7 +69,7 @@ static void do_clean(FILE *); static void do_rules(FILE *); static void do_xxfiles(char *, FILE *); -static void do_objs(FILE *); +static void do_tesla(FILE *); static void do_before_depend(FILE *); static int opteq(const char *, const char *); static void read_files(void); @@ -162,7 +162,9 @@ if (eq(line, "%BEFORE_DEPEND\n")) do_before_depend(ofp); else if (eq(line, "%OBJS\n")) - do_objs(ofp); + ;/* Do nothing */ + else if (eq(line, "%TESLA\n")) + do_tesla(ofp); else if (strncmp(line, "%FILES.", 7) == 0) do_xxfiles(line, ofp); else if (eq(line, "%RULES\n")) @@ -618,32 +620,13 @@ } static void -do_objs(FILE *fp) +do_tesla(FILE *fp) { - struct file_list *tp; - int lpos, len; - char *cp, och, *sp; + + if (!tesla) + return; - fprintf(fp, "OBJS="); - lpos = 6; - STAILQ_FOREACH(tp, &ftab, f_next) { - if (tp->f_flags & NO_OBJ) - continue; - sp = tail(tp->f_fn); - cp = sp + (len = strlen(sp)) - 1; - och = *cp; - *cp = 'o'; - len += strlen(tp->f_objprefix); - if (len + lpos > 72) { - lpos = 8; - fprintf(fp, "\\\n\t"); - } - fprintf(fp, "%s%s ", tp->f_objprefix, sp); - lpos += len + 1; - *cp = och; - } - if (lpos != 8) - putc('\n', fp); + fprintf(fp, "DO_TESLA=yes\n"); } static void @@ -682,6 +665,17 @@ } if (lpos != 8) putc('\n', fp); + /* locore.o is manually included in kern.pre.mk */ + fprintf(fp, "OBJS+=\t${%sFILES:T:Nlocore.%s:.%s=.o}\n", SUFF, suff, + suff); + if (tesla) { + if (strcmp(suff, "c") == 0) + fprintf(fp, "C_OBJS+=${%sFILES:T:.%s=.o}\n", + SUFF, suff); + else + fprintf(fp, "NOT_C_OBJS+=${%sFILES:T:.%s=.o}\n", + SUFF, suff); + } } static char * @@ -767,7 +761,6 @@ ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; } - *cp = och; if (strlen(ftp->f_objprefix)) fprintf(f, "\t%s $S/%s\n", compilewith, np); else @@ -777,6 +770,37 @@ fprintf(f, "\t${NORMAL_CTFCONVERT}\n\n"); else fprintf(f, "\n"); + + if (tesla && och == 'c') { + if (ftp->f_depends) + fprintf(f, "%s%soll: $S/%s%c %s\n", + ftp->f_objprefix, tail(np), np, och, + ftp->f_depends); + else + fprintf(f, "%s%soll: $S/%s%c\n", + ftp->f_objprefix, tail(np), np, och); + if (strlen(ftp->f_objprefix)) + fprintf(f, + "\t%s $S/%s -S -emit-llvm -o ${.TARGET}\n", + compilewith, np); + else + fprintf(f, "\t%s -S -emit-llvm -o ${.TARGET}\n", + compilewith); + fprintf(f, "\n"); + + if (ftp->f_depends) + fprintf(f, "%s%stesla: $S/%s%c %s\n", + ftp->f_objprefix, tail(np), np, och, + ftp->f_depends); + else + fprintf(f, "%s%stesla: $S/%s%c\n", + ftp->f_objprefix, tail(np), np, och); + fprintf(f, + "\t${TESLA} analyse $S/%s%c -o ${.TARGET} -- ${CFLAGS} ${XFLAGS} -DTESLA\n", + np, och); + fprintf(f, "\n"); + } + *cp = och; } } From owner-p4-projects@FreeBSD.ORG Fri Mar 8 22:46:42 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D4FE139A; Fri, 8 Mar 2013 22:46:41 +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 6AED4398 for ; Fri, 8 Mar 2013 22:46:41 +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 3E758DFE for ; Fri, 8 Mar 2013 22:46:41 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r28MkeWY051147 for ; Fri, 8 Mar 2013 22:46:40 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r28MkeTC051144 for perforce@freebsd.org; Fri, 8 Mar 2013 22:46:40 GMT (envelope-from brooks@freebsd.org) Date: Fri, 8 Mar 2013 22:46:40 GMT Message-Id: <201303082246.r28MkeTC051144@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222731 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, 08 Mar 2013 22:46:42 -0000 http://p4web.freebsd.org/@@222731?ac=10 Change 222731 by brooks@brooks_zenith on 2013/03/08 22:46:08 Checkpoint a utility to verify and extract a source file (both optional) and then write it (possiably padded) to a file or device. Post write verification is also available as an option. Affected files ... .. //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/Makefile#1 add .. //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/writefile.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Mar 8 23:46:48 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 18895FE; Fri, 8 Mar 2013 23:46:48 +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 C7FBEFC for ; Fri, 8 Mar 2013 23:46:47 +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 9D3D7FCF for ; Fri, 8 Mar 2013 23:46: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 r28NklBS057004 for ; Fri, 8 Mar 2013 23:46:47 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r28NklFm057001 for perforce@freebsd.org; Fri, 8 Mar 2013 23:46:47 GMT (envelope-from brooks@freebsd.org) Date: Fri, 8 Mar 2013 23:46:47 GMT Message-Id: <201303082346.r28NklFm057001@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222732 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, 08 Mar 2013 23:46:48 -0000 http://p4web.freebsd.org/@@222732?ac=10 Change 222732 by brooks@brooks_zenith on 2013/03/08 23:46:06 Refactor to remove globals from the extract and verify code. Add some default output on success. Affected files ... .. //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/writefile.c#2 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/writefile.c#2 (text+ko) ==== @@ -46,23 +46,35 @@ enum eav_error { EAV_SUCCESS = 0, - EAV_MEM, - EAV_MD5, - EAV_COMP_UNKNOWN, - EAV_COMP_UNSUPPORTED, - EAV_COMP_BZ + EAV_ERR_MEM, + EAV_ERR_DIGEST, + EAV_ERR_DIGEST_UNKNOWN, + EAV_ERR_COMP, + EAV_ERR_COMP_UNKNOWN, + EAV_ERR_COMP_UNSUPPORTED +}; + +enum eav_digest { + EAV_DIGEST_NONE = 0, + EAV_DIGEST_MD5 +}; + +enum eav_compression { + EAV_COMP_NONE = 0, + EAV_COMP_BZIP2, + EAV_COMP_GZIP, + EAV_COMP_XZ, + + EAV_COMP_UNKNOWN }; static void usage(int) __dead2; -int verify; -char *md5sum; - static void usage(int error) { fprintf(stderr, -"writefile [-hTvz] [-b ] [-i ] [-l length] [-m md5]\n" +"writefile [-hqTvz] [-b ] [-i ] [-l length] [-m md5]\n" " [-o ] \n"); exit(error); } @@ -87,6 +99,41 @@ return(len); } +static enum eav_compression +eav_taste(const unsigned char *buf, off_t len) +{ + + /* + * BZIP header from wikipedia: + * .magic:16 = 'BZ' signature/magic number + * .version:8 = 'h' for Bzip2 + * ('H'uffman coding), + * '0' for Bzip1 (deprecated) + * .hundred_k_blocksize:8 = '1'..'9' + * block-size 100 kB-900 kB + * .compressed_magic:48 = + * 0x314159265359 (BCD (pi)) + */ + if( len > 10 && buf[0] == 'B' && buf[1] == 'Z' && + buf[4] == 0x31 && buf[5] == 0x41 && buf[6] == 0x59 && + buf[7] == 0x26 && buf[8] == 0x53 && buf[9] == 0x59) { + if (buf[2] == 'h') + return (EAV_COMP_BZIP2); + else + /* Could be bzip 1, but that is unsupported */ + return (EAV_COMP_UNKNOWN); + } else if (len > 2 && buf[0] == 0x1f && buf[1] == 0x8b) { + /* gzip per RFC1952 */ + return (EAV_COMP_GZIP); + } else if (len > 6 && buf[0] == 0xfd && buf[1] == '7' && + buf[2] == 'z' && buf[3] == 'X' && + buf[4] == 'Z' && buf[5] == 0x00) { + /* XZ per Wikipedia */ + return (EAV_COMP_XZ); + } else + return (EAV_COMP_UNKNOWN); +} + static const char * eav_strerror(enum eav_error error) { @@ -94,16 +141,18 @@ switch (error) { case EAV_SUCCESS: return "Success"; - case EAV_MEM: + case EAV_ERR_MEM: return "malloc error"; - case EAV_MD5: - return "MD5 checksum mismatch"; - case EAV_COMP_UNKNOWN: + case EAV_ERR_DIGEST: + return "checksum mismatch"; + case EAV_ERR_DIGEST_UNKNOWN: + return "unknown digest"; + case EAV_ERR_COMP: + return "decompression error"; + case EAV_ERR_COMP_UNKNOWN: return "Unknown compression type"; - case EAV_COMP_UNSUPPORTED: + case EAV_ERR_COMP_UNSUPPORTED: return "Unsupported compression type"; - case EAV_COMP_BZ: - return "bzip2 error"; default: return "Unknown error"; } @@ -111,7 +160,9 @@ static enum eav_error extract_and_verify(unsigned char *ibuf, size_t ilen, - unsigned char **obufp, size_t *olenp, size_t blocksize, int decompress) + unsigned char **obufp, size_t *olenp, size_t blocksize, + enum eav_compression ctype, + enum eav_digest dtype, const unsigned char *digest) { int ret; char *obuf = NULL; @@ -120,44 +171,37 @@ MD5_CTX md5ctx; char i_md5sum[33]; - if (decompress || md5sum != NULL) { - if (md5sum != NULL) + switch (ctype) { + case EAV_COMP_NONE: + case EAV_COMP_BZIP2: + break; + case EAV_COMP_GZIP: + case EAV_COMP_XZ: + return (EAV_ERR_COMP_UNSUPPORTED); + default: + return (EAV_ERR_COMP_UNKNOWN); + } + + switch (dtype) { + case EAV_DIGEST_NONE: + case EAV_DIGEST_MD5: + break; + default: + return (EAV_ERR_DIGEST_UNKNOWN); + } + + if (dtype || ctype) { + if (dtype == EAV_DIGEST_MD5) MD5Init(&md5ctx); - if (decompress) { - /* - * BZIP header from wikipedia: - * .magic:16 = 'BZ' signature/magic number - * .version:8 = 'h' for Bzip2 - * ('H'uffman coding), - * '0' for Bzip1 (deprecated) - * .hundred_k_blocksize:8 = '1'..'9' - * block-size 100 kB-900 kB - * .compressed_magic:48 = - * 0x314159265359 (BCD (pi)) - */ - if(ibuf[0] == 'B' && ibuf[1] == 'Z' && - ibuf[4] == 0x31 && ibuf[5] == 0x41 && - ibuf[6] == 0x59 && ibuf[7] == 0x26 && - ibuf[8] == 0x53 && ibuf[9] == 0x59) { - if (ibuf[2] != 'h') - return (EAV_COMP_UNSUPPORTED); - } else if (ibuf[0] == 0x1f && ibuf[1] == 0x8b) { - /* gzip per RFC1952 */ - return (EAV_COMP_UNSUPPORTED); - } else if (ibuf[0] == 0xfd && ibuf[1] == '7' && - ibuf[2] == 'z' && ibuf[3] == 'X' && - ibuf[4] == 'Z' && ibuf[5] == 0x00) { - /* XZ per Wikipedia */ - return (EAV_COMP_UNSUPPORTED); - } else - return (EAV_COMP_UNKNOWN); - + if (ctype) { + /* XXX: assume bzip2 for now */ olen = 1024 * 1024; if ((obuf = malloc(olen)) == NULL) - return (EAV_MEM); + return (EAV_ERR_MEM); - /* XXX: assume bzip2 for now */ + total_in = 0; + prev_total_in = 0; bzs.bzalloc = NULL; bzs.bzfree = NULL; @@ -166,17 +210,15 @@ bzs.avail_in = MIN(ilen, 1024 * 1024); bzs.next_out = obuf; bzs.avail_out = olen; - total_in = 0; - prev_total_in = 0; if (BZ2_bzDecompressInit(&bzs, 0, 0) != BZ_OK) - return (EAV_COMP_BZ); + return (EAV_ERR_COMP); while ((ret = BZ2_bzDecompress(&bzs)) != BZ_STREAM_END) { if (ret != BZ_OK) { free(obuf); BZ2_bzDecompressEnd(&bzs); - return (EAV_COMP_BZ); + return (EAV_ERR_COMP); } total_in = ((size_t)bzs.total_in_hi32 << 32) + @@ -184,8 +226,9 @@ total_out = ((size_t)bzs.total_out_hi32 << 32) + bzs.total_out_lo32; - MD5Update(&md5ctx, ibuf + prev_total_in, - total_in - prev_total_in); + if (dtype == EAV_DIGEST_MD5) + MD5Update(&md5ctx, ibuf + prev_total_in, + total_in - prev_total_in); prev_total_in = total_in; if (bzs.avail_in == 0) @@ -197,12 +240,10 @@ if ((obuf = reallocf(obuf, olen)) == NULL) { BZ2_bzDecompressEnd(&bzs); - return (EAV_COMP_BZ); + return (EAV_ERR_COMP); } - bzs.next_out = - obuf + total_out; - bzs.avail_out = - olen - total_out; + bzs.next_out = obuf + total_out; + bzs.avail_out = olen - total_out; } } BZ2_bzDecompressEnd(&bzs); @@ -212,9 +253,9 @@ bzs.total_out_lo32; /* Push the last read block in the MD5 machine */ - MD5Update(&md5ctx, ibuf + prev_total_in, - total_in - prev_total_in); - prev_total_in = total_in; + if (dtype == EAV_DIGEST_MD5) + MD5Update(&md5ctx, ibuf + prev_total_in, + total_in - prev_total_in); /* Round up to blocksize and zero pad */ olen = roundup2(total_out, blocksize); @@ -222,17 +263,21 @@ memset(obuf + total_out, '\0', olen - total_out); /* XXX: realloc to shorten allocation? */ - } else if (md5sum != NULL) - MD5Update(&md5ctx, ibuf, ilen); + } else if (dtype) { + if (dtype == EAV_DIGEST_MD5) + MD5Update(&md5ctx, ibuf, ilen); + } - if (md5sum != NULL) { - MD5End(&md5ctx, i_md5sum); - if (strcmp(md5sum, i_md5sum) != 0) - return (EAV_MD5); + if (dtype) { + if (dtype == EAV_DIGEST_MD5) { + MD5End(&md5ctx, i_md5sum); + if (strcmp(digest, i_md5sum) != 0) + return (EAV_ERR_DIGEST); + } } } - if (!decompress) { + if (ctype == EAV_COMP_NONE) { *obufp = ibuf; *olenp = ilen; } else { @@ -263,14 +308,17 @@ int main(int argc, char *argv[]) { - char ch, *cp; + char ch, *cp, *digest = NULL; unsigned char *ibuf, *obuf = NULL, *vbuf; size_t blocksize = 0; off_t iseek = 0, oseek = 0, olen = -1, wlen = -1; - int decompress = 0, ifd, notruncate = 0, ofd, ret; + int decompress = 0, ifd, notruncate = 0, ofd, quiet = 0, ret, + verify_write = 0; + enum eav_compression ctype; + enum eav_digest dtype = EAV_DIGEST_NONE; struct stat isb, osb; - while ((ch = getopt(argc, argv, "b:hi:l:m:o:Tvz")) != -1) { + while ((ch = getopt(argc, argv, "b:hi:l:m:o:qTvz")) != -1) { switch (ch) { case 'b': if ((blocksize = parse_offset(optarg)) < 1) @@ -287,10 +335,15 @@ warnx("Invalid length %s", optarg); break; case 'm': - md5sum = optarg; - if (strlen(optarg) != 32) + if (dtype != EAV_DIGEST_NONE) { + warnx("Too many digest options"); + usage(1j); + } + dtype = EAV_DIGEST_MD5; + digest = optarg; + if (strlen(digest) != 32) warnx("invalid md5 checksum"); - for (cp = md5sum; *cp != '\0'; cp++) { + for (cp = digest; *cp != '\0'; cp++) { if (!isxdigit(*cp)) warnx("invalid md5 checksum"); *cp = tolower(*cp); @@ -300,11 +353,14 @@ if ((oseek = parse_offset(optarg)) < 1) warnx("Invalid output seek %s", optarg); break; + case 'q': + quiet = 1; + break; case 'T': notruncate = 1; break; case 'v': - verify = 1; + verify_write = 1; break; case 'z': decompress = 1; @@ -335,11 +391,23 @@ blocksize = 1; } + if (decompress) + ctype = eav_taste(ibuf, isb.st_size); + else + ctype = EAV_COMP_NONE; + if ((ret = extract_and_verify(ibuf, isb.st_size, &obuf, &olen, - blocksize, decompress)) != EAV_SUCCESS) + blocksize, ctype, dtype, digest)) != EAV_SUCCESS) errx(1, "failed to extract and verify %s: %s", argv[0], eav_strerror(ret)); + if (!quiet) { + if (dtype) + printf("verified %jd input bytes\n", isb.st_size); + if (ctype && ctype != EAV_COMP_UNKNOWN) + printf("extracted %jd bytes\n", olen); + } + if (wlen == -1) wlen = olen - iseek; else if (wlen > olen - iseek) { @@ -366,8 +434,11 @@ /* Explict close to force final writes to flash etc. */ close(ofd); + if (!quiet) + printf("wrote %jd bytes\n", wlen); + /* XXX: won't work if you can't map olen + oseek even with small olen */ - if (verify) { + if (verify_write) { if ((ofd = open(argv[1], O_RDONLY)) == -1) err(1, "open(%s)", argv[1]); if ((vbuf = mmap(NULL, wlen + oseek, PROT_READ, MAP_PRIVATE, @@ -375,6 +446,8 @@ err(1, "mmap(%s)", argv[1]); if (memcmp(obuf + iseek, vbuf + oseek, wlen) != 0) err(1, "output file does not match input!"); + if (!quiet) + printf("verified %jd written bytes\n", wlen); } if (obuf != ibuf) From owner-p4-projects@FreeBSD.ORG Fri Mar 8 23:58:00 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 23347562; Fri, 8 Mar 2013 23:58:00 +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 D7BDF560 for ; Fri, 8 Mar 2013 23:57:59 +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 C7EBEF8 for ; Fri, 8 Mar 2013 23:57:59 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r28Nvxmt057838 for ; Fri, 8 Mar 2013 23:57:59 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r28Nvx5R057835 for perforce@freebsd.org; Fri, 8 Mar 2013 23:57:59 GMT (envelope-from brooks@freebsd.org) Date: Fri, 8 Mar 2013 23:57:59 GMT Message-Id: <201303082357.r28Nvx5R057835@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 222733 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, 08 Mar 2013 23:58:00 -0000 http://p4web.freebsd.org/@@222733?ac=10 Change 222733 by brooks@brooks_zenith on 2013/03/08 23:57:40 Split the extract and verify code out into a seperate file. Affected files ... .. //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/Makefile#2 edit .. //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/eav.c#1 add .. //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/eav.h#1 add .. //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/writefile.c#3 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/Makefile#2 (text+ko) ==== @@ -3,6 +3,8 @@ PROG= writefile +SRCS= writefile.c eav.c + MAN= BINDIR= /usr/sbin ==== //depot/projects/ctsrd/beribsd/src/ctsrd/writefile/writefile.c#3 (text+ko) ==== @@ -29,45 +29,26 @@ */ #include -#include #include #include #include -#include #include #include #include #include -#include #include +#include #include #include -enum eav_error { - EAV_SUCCESS = 0, - EAV_ERR_MEM, - EAV_ERR_DIGEST, - EAV_ERR_DIGEST_UNKNOWN, - EAV_ERR_COMP, - EAV_ERR_COMP_UNKNOWN, - EAV_ERR_COMP_UNSUPPORTED -}; +#if 0 +#include -enum eav_digest { - EAV_DIGEST_NONE = 0, - EAV_DIGEST_MD5 -}; +#endif -enum eav_compression { - EAV_COMP_NONE = 0, - EAV_COMP_BZIP2, - EAV_COMP_GZIP, - EAV_COMP_XZ, +#include "eav.h" - EAV_COMP_UNKNOWN -}; - static void usage(int) __dead2; static void @@ -99,194 +80,6 @@ return(len); } -static enum eav_compression -eav_taste(const unsigned char *buf, off_t len) -{ - - /* - * BZIP header from wikipedia: - * .magic:16 = 'BZ' signature/magic number - * .version:8 = 'h' for Bzip2 - * ('H'uffman coding), - * '0' for Bzip1 (deprecated) - * .hundred_k_blocksize:8 = '1'..'9' - * block-size 100 kB-900 kB - * .compressed_magic:48 = - * 0x314159265359 (BCD (pi)) - */ - if( len > 10 && buf[0] == 'B' && buf[1] == 'Z' && - buf[4] == 0x31 && buf[5] == 0x41 && buf[6] == 0x59 && - buf[7] == 0x26 && buf[8] == 0x53 && buf[9] == 0x59) { - if (buf[2] == 'h') - return (EAV_COMP_BZIP2); - else - /* Could be bzip 1, but that is unsupported */ - return (EAV_COMP_UNKNOWN); - } else if (len > 2 && buf[0] == 0x1f && buf[1] == 0x8b) { - /* gzip per RFC1952 */ - return (EAV_COMP_GZIP); - } else if (len > 6 && buf[0] == 0xfd && buf[1] == '7' && - buf[2] == 'z' && buf[3] == 'X' && - buf[4] == 'Z' && buf[5] == 0x00) { - /* XZ per Wikipedia */ - return (EAV_COMP_XZ); - } else - return (EAV_COMP_UNKNOWN); -} - -static const char * -eav_strerror(enum eav_error error) -{ - - switch (error) { - case EAV_SUCCESS: - return "Success"; - case EAV_ERR_MEM: - return "malloc error"; - case EAV_ERR_DIGEST: - return "checksum mismatch"; - case EAV_ERR_DIGEST_UNKNOWN: - return "unknown digest"; - case EAV_ERR_COMP: - return "decompression error"; - case EAV_ERR_COMP_UNKNOWN: - return "Unknown compression type"; - case EAV_ERR_COMP_UNSUPPORTED: - return "Unsupported compression type"; - default: - return "Unknown error"; - } -} - -static enum eav_error -extract_and_verify(unsigned char *ibuf, size_t ilen, - unsigned char **obufp, size_t *olenp, size_t blocksize, - enum eav_compression ctype, - enum eav_digest dtype, const unsigned char *digest) -{ - int ret; - char *obuf = NULL; - size_t olen = 0, prev_total_in, total_in, total_out; - bz_stream bzs; - MD5_CTX md5ctx; - char i_md5sum[33]; - - switch (ctype) { - case EAV_COMP_NONE: - case EAV_COMP_BZIP2: - break; - case EAV_COMP_GZIP: - case EAV_COMP_XZ: - return (EAV_ERR_COMP_UNSUPPORTED); - default: - return (EAV_ERR_COMP_UNKNOWN); - } - - switch (dtype) { - case EAV_DIGEST_NONE: - case EAV_DIGEST_MD5: - break; - default: - return (EAV_ERR_DIGEST_UNKNOWN); - } - - if (dtype || ctype) { - if (dtype == EAV_DIGEST_MD5) - MD5Init(&md5ctx); - - if (ctype) { - /* XXX: assume bzip2 for now */ - olen = 1024 * 1024; - if ((obuf = malloc(olen)) == NULL) - return (EAV_ERR_MEM); - - total_in = 0; - prev_total_in = 0; - - bzs.bzalloc = NULL; - bzs.bzfree = NULL; - bzs.opaque = NULL; - bzs.next_in = ibuf; - bzs.avail_in = MIN(ilen, 1024 * 1024); - bzs.next_out = obuf; - bzs.avail_out = olen; - if (BZ2_bzDecompressInit(&bzs, 0, 0) != BZ_OK) - return (EAV_ERR_COMP); - - while ((ret = BZ2_bzDecompress(&bzs)) != - BZ_STREAM_END) { - if (ret != BZ_OK) { - free(obuf); - BZ2_bzDecompressEnd(&bzs); - return (EAV_ERR_COMP); - } - - total_in = ((size_t)bzs.total_in_hi32 << 32) + - bzs.total_in_lo32; - total_out = ((size_t)bzs.total_out_hi32 << 32) + - bzs.total_out_lo32; - - if (dtype == EAV_DIGEST_MD5) - MD5Update(&md5ctx, ibuf + prev_total_in, - total_in - prev_total_in); - prev_total_in = total_in; - - if (bzs.avail_in == 0) - bzs.avail_in = - MIN(ilen - total_in, 1024 * 1024); - - if (bzs.avail_out == 0) { - olen *= 2; - if ((obuf = reallocf(obuf, olen)) - == NULL) { - BZ2_bzDecompressEnd(&bzs); - return (EAV_ERR_COMP); - } - bzs.next_out = obuf + total_out; - bzs.avail_out = olen - total_out; - } - } - BZ2_bzDecompressEnd(&bzs); - total_in = ((size_t)bzs.total_in_hi32 << 32) + - bzs.total_in_lo32; - total_out = ((size_t)bzs.total_out_hi32 << 32) + - bzs.total_out_lo32; - - /* Push the last read block in the MD5 machine */ - if (dtype == EAV_DIGEST_MD5) - MD5Update(&md5ctx, ibuf + prev_total_in, - total_in - prev_total_in); - - /* Round up to blocksize and zero pad */ - olen = roundup2(total_out, blocksize); - if (olen != total_out) - memset(obuf + total_out, '\0', - olen - total_out); - /* XXX: realloc to shorten allocation? */ - } else if (dtype) { - if (dtype == EAV_DIGEST_MD5) - MD5Update(&md5ctx, ibuf, ilen); - } - - if (dtype) { - if (dtype == EAV_DIGEST_MD5) { - MD5End(&md5ctx, i_md5sum); - if (strcmp(digest, i_md5sum) != 0) - return (EAV_ERR_DIGEST); - } - } - } - - if (ctype == EAV_COMP_NONE) { - *obufp = ibuf; - *olenp = ilen; - } else { - *obufp = obuf; - *olenp = olen; - } - return (EAV_SUCCESS); -} - static off_t parse_offset(const char *offstr) {