From owner-freebsd-sparc64@FreeBSD.ORG Sun Jun 14 13:35:11 2015 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C62C342; Sun, 14 Jun 2015 13:35:11 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (s16892447.onlinehome-server.info [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28584800; Sun, 14 Jun 2015 13:35:10 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from 5ec26862.skybroadband.com ([94.194.104.98] helo=[192.168.1.87]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1Z483u-0008SY-NU; Sun, 14 Jun 2015 14:35:00 +0100 Message-ID: <557D82F8.50908@ilande.co.uk> Date: Sun, 14 Jun 2015 14:34:48 +0100 From: Mark Cave-Ayland User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: John Baldwin , freebsd-sparc64@freebsd.org References: <53F73E6F.9080805@ilande.co.uk> <2084808.1lxSgnvf69@ralph.baldwin.cx> <557ADCAB.9020409@FreeBSD.org> <557B6116.70900@ilande.co.uk> <557C1162.3000106@FreeBSD.org> In-Reply-To: <557C1162.3000106@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 94.194.104.98 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: Re: PCI range checking under qemu-system-sparc64 X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 13:35:11 -0000 On 13/06/15 12:17, John Baldwin wrote: > FYI, the steps I took to build a new ISO in an amd64 host were the following: > > - download an existing HEAD snap ISO > - untar that to a directory named foo/tree > - use 'make TARGET=sparc64 buildkernel' to build a test kernel > - 'make TARGET=sparc64 installkernel DESTDIR=foo/tree' > - 'sh /usr/src/release/sparc64/mkisoimages.sh -b "test" sparc64.iso foo/tree' > > I was then able to boot sparc64.iso. Thanks for the detail. I've just tried the build again using the FreeBSD-10.1-RELEASE ISO for amd64 and the make buildkernel fails like this: -------------------------------------------------------------- >>> stage 3.1: making dependencies -------------------------------------------------------------- cd /usr/obj/sparc64.sparc64/usr/src/sys/GENERIC; MAKEOBJDIRPREFIX=/usr/obj/sparc64.sparc64 MACHINE_ARCH=sparc64 MACHINE=sparc64 CPUTYPE= GROFF_BIN_PATH=/usr/obj/sparc64.sparc64/usr/src/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/sparc64.sparc64/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/sparc64.sparc64/usr/src/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/usr/obj/sparc64.sparc64/usr/src/tmp _LDSCRIPTROOT= VERSION="FreeBSD 10.1-RELEASE sparc64 1001000" INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/sparc64.sparc64/usr/src/tmp/legacy/usr/sbin:/usr/obj/sparc64.sparc64/usr/src/tmp/legacy/usr/bin:/usr/obj/sparc64.sparc64/usr/src/tmp/legacy/usr/games:/usr/obj/sparc64.sparc64/usr/src/tmp/legacy/bin:/usr/obj/sparc64.sparc64/usr/src/tmp/usr/sbin:/usr/obj/sparc64.sparc64/usr/src/tmp/usr/bin:/usr/obj/sparc64.sparc64/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm OBJDUMP= RANLIB=ranlib STRINGS= COMPILER_TYPE=gcc make -m /usr/src/share/mk KERNEL=kernel depend -DNO_MODULES_OBJ machine -> /usr/src/sys/sparc64/include cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/dev/ath -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/contrib/dev/ath/ath_hal -I/usr/src/sys/contrib/ngatm -I/usr/src/sys/dev/twa -I/usr/src/sys/dev/cxgb -I/usr/src/sys/dev/cxgbe -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -mcmodel=medany -msoft-float -ffreestanding -fstack-protector /usr/src/sys/sparc64/sparc64/genassym.c cc: error: unknown argument: '-finline-limit=15000' *** Error code 1 Stop. make[2]: stopped in /usr/obj/sparc64.sparc64/usr/src/sys/GENERIC *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src Does the latest HEAD contain a fix for this error or have I misconfigured something? ATB, Mark. From owner-freebsd-sparc64@FreeBSD.ORG Sun Jun 14 16:07:52 2015 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDA6542A for ; Sun, 14 Jun 2015 16:07:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C707FE5C for ; Sun, 14 Jun 2015 16:07:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (CPE001b2128d5c4-CM185933427c47.cpe.net.cable.rogers.com [99.239.214.222]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DB035B94E; Sun, 14 Jun 2015 12:07:50 -0400 (EDT) Message-ID: <557DA6D5.4070800@FreeBSD.org> Date: Sun, 14 Jun 2015 12:07:49 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Mark Cave-Ayland , freebsd-sparc64@freebsd.org Subject: Re: PCI range checking under qemu-system-sparc64 References: <53F73E6F.9080805@ilande.co.uk> <2084808.1lxSgnvf69@ralph.baldwin.cx> <557ADCAB.9020409@FreeBSD.org> <557B6116.70900@ilande.co.uk> <557C1162.3000106@FreeBSD.org> <557D82F8.50908@ilande.co.uk> In-Reply-To: <557D82F8.50908@ilande.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sun, 14 Jun 2015 12:07:51 -0400 (EDT) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 16:07:53 -0000 On 6/14/15 9:34 AM, Mark Cave-Ayland wrote: > On 13/06/15 12:17, John Baldwin wrote: > >> FYI, the steps I took to build a new ISO in an amd64 host were the following: >> >> - download an existing HEAD snap ISO >> - untar that to a directory named foo/tree >> - use 'make TARGET=sparc64 buildkernel' to build a test kernel >> - 'make TARGET=sparc64 installkernel DESTDIR=foo/tree' >> - 'sh /usr/src/release/sparc64/mkisoimages.sh -b "test" sparc64.iso foo/tree' >> >> I was then able to boot sparc64.iso. > > Thanks for the detail. I've just tried the build again using the > FreeBSD-10.1-RELEASE ISO for amd64 and the make buildkernel fails like this: > > ... > > Does the latest HEAD contain a fix for this error or have I > misconfigured something? Did you do 'make TARGET=sparc64 kernel-toolchain' first? -- John Baldwin From owner-freebsd-sparc64@FreeBSD.ORG Sun Jun 14 19:01:16 2015 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FCCFE73; Sun, 14 Jun 2015 19:01:16 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (s16892447.onlinehome-server.info [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B4C4C47; Sun, 14 Jun 2015 19:01:14 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from 5ec26862.skybroadband.com ([94.194.104.98] helo=[192.168.1.87]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1Z4D9a-0000ul-Lj; Sun, 14 Jun 2015 20:01:11 +0100 Message-ID: <557DCF54.7020606@ilande.co.uk> Date: Sun, 14 Jun 2015 20:00:36 +0100 From: Mark Cave-Ayland User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: John Baldwin , freebsd-sparc64@freebsd.org References: <53F73E6F.9080805@ilande.co.uk> <2084808.1lxSgnvf69@ralph.baldwin.cx> <557ADCAB.9020409@FreeBSD.org> <557B6116.70900@ilande.co.uk> <557C1162.3000106@FreeBSD.org> <557D82F8.50908@ilande.co.uk> <557DA6D5.4070800@FreeBSD.org> In-Reply-To: <557DA6D5.4070800@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 94.194.104.98 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: Re: PCI range checking under qemu-system-sparc64 X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 19:01:16 -0000 On 14/06/15 17:07, John Baldwin wrote: >> Does the latest HEAD contain a fix for this error or have I >> misconfigured something? > > Did you do 'make TARGET=sparc64 kernel-toolchain' first? Ah no - I just tried your instructions as printed as I'm not overly familiar with FreeBSD. With the above statement run first, I'm now able to complete the kernel build but still can't seem to create the resulting ISO: # sh -c '/usr/src/release/sparc64/mkisoimages.sh -b "test" sparc64.iso /home/iso/sparc64' Calculated size of `/tmp/bootfs.hw5OWSVF/bootfs.img': 524288 bytes, 4 inodes Extent size set to 8192 /tmp/bootfs.hw5OWSVF/bootfs.img: 0.5MB (1024 sectors) block size 8192, fragment size 1024 using 1 cylinder groups of 0.50MB, 64 blks, 64 inodes. super-block backups (for fsck -b #) at: 32, Populating `/tmp/bootfs.hw5OWSVF/bootfs.img' Image `/tmp/bootfs.hw5OWSVF/bootfs.img' complete 16+0 records in 16+0 records out 8192 bytes transferred in 0.000296 secs (27664846 bytes/sec) 1081+1 records in 1082+0 records out 354549760 bytes transferred in 16.762809 secs (21150975 bytes/sec) 1+1 records in 2+0 records out 655360 bytes transferred in 0.001468 secs (446447794 bytes/sec) 2+0 records in 2+0 records out 655360 bytes transferred in 0.001868 secs (350833321 bytes/sec) gpart: scheme 'VTOC8': Invalid argument gpart: No such geom: md1. gpart: No such geom: md1. ATB, Mark. From owner-freebsd-sparc64@FreeBSD.ORG Sun Jun 14 20:56:17 2015 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E33444D1 for ; Sun, 14 Jun 2015 20:56:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCF3897D for ; Sun, 14 Jun 2015 20:56:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from [10.197.190.142] (mobile-107-107-63-17.mycingular.net [107.107.63.17]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C0B58B924; Sun, 14 Jun 2015 16:56:15 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: PCI range checking under qemu-system-sparc64 From: John Baldwin X-Mailer: iPhone Mail (12F70) In-Reply-To: <557DCF54.7020606@ilande.co.uk> Date: Sun, 14 Jun 2015 16:56:12 -0400 Cc: "freebsd-sparc64@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <53F73E6F.9080805@ilande.co.uk> <2084808.1lxSgnvf69@ralph.baldwin.cx> <557ADCAB.9020409@FreeBSD.org> <557B6116.70900@ilande.co.uk> <557C1162.3000106@FreeBSD.org> <557D82F8.50908@ilande.co.uk> <557DA6D5.4070800@FreeBSD.org> <557DCF54.7020606@ilande.co.uk> To: Mark Cave-Ayland X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sun, 14 Jun 2015 16:56:15 -0400 (EDT) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 20:56:18 -0000 > On Jun 14, 2015, at 15:00, Mark Cave-Ayland wrote: >=20 > On 14/06/15 17:07, John Baldwin wrote: >=20 >>> Does the latest HEAD contain a fix for this error or have I >>> misconfigured something? >>=20 >> Did you do 'make TARGET=3Dsparc64 kernel-toolchain' first? >=20 > Ah no - I just tried your instructions as printed as I'm not overly > familiar with FreeBSD. With the above statement run first, I'm now able > to complete the kernel build but still can't seem to create the > resulting ISO: kldload geom_vtoc8 (Or whatever GEOM module has vtoc8 in its name) --=20 John Baldwin= From owner-freebsd-sparc64@FreeBSD.ORG Sun Jun 14 21:56:39 2015 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E3F8DD1; Sun, 14 Jun 2015 21:56:39 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (s16892447.onlinehome-server.info [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 187419DD; Sun, 14 Jun 2015 21:56:38 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from 5ec26862.skybroadband.com ([94.194.104.98] helo=[192.168.1.87]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1Z4FtK-0001N7-HN; Sun, 14 Jun 2015 22:56:35 +0100 Message-ID: <557DF887.20508@ilande.co.uk> Date: Sun, 14 Jun 2015 22:56:23 +0100 From: Mark Cave-Ayland User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: John Baldwin CC: "freebsd-sparc64@freebsd.org" References: <53F73E6F.9080805@ilande.co.uk> <2084808.1lxSgnvf69@ralph.baldwin.cx> <557ADCAB.9020409@FreeBSD.org> <557B6116.70900@ilande.co.uk> <557C1162.3000106@FreeBSD.org> <557D82F8.50908@ilande.co.uk> <557DA6D5.4070800@FreeBSD.org> <557DCF54.7020606@ilande.co.uk> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 94.194.104.98 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: Re: PCI range checking under qemu-system-sparc64 X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 21:56:39 -0000 On 14/06/15 21:56, John Baldwin wrote: >> On Jun 14, 2015, at 15:00, Mark Cave-Ayland wrote: >> >> On 14/06/15 17:07, John Baldwin wrote: >> >>>> Does the latest HEAD contain a fix for this error or have I >>>> misconfigured something? >>> >>> Did you do 'make TARGET=sparc64 kernel-toolchain' first? >> >> Ah no - I just tried your instructions as printed as I'm not overly >> familiar with FreeBSD. With the above statement run first, I'm now able >> to complete the kernel build but still can't seem to create the >> resulting ISO: > > kldload geom_vtoc8 > > (Or whatever GEOM module has vtoc8 in its name) Got it. The module name was geom_part_vtoc8 and that was enough to enable me to generate a valid ISO, apply your patch and verify that the build works. Thank you for your help so far! A quick test with QEMU debugging enabled shows the following on the console just before the freeze: IN: 0x00000000c0590188: st %g1, [ %l3 + 0x8c ] 0x00000000c059018c: membar #MemIssue 0x00000000c0590190: sll %l0, 2, %g2 0x00000000c0590194: ld [ %i3 + 0x88 ], %g1 0x00000000c0590198: cmp %g2, %g1 0x00000000c059019c: clr %o0 0x00000000c05901a0: movg %icc, 1, %o0 0x00000000c05901a4: call 0xc08aaee0 (hangs) Examining the kernel symbols show that 0xc08aaee0 is the address of the cpu_idle() function which is being called from sched_idletd(). My next job will be to step through cpu_idle() and see if we're getting stuck in a loop or disappearing somewhere else. ATB, Mark.