From owner-freebsd-sparc64@freebsd.org Thu Apr 14 14:07:55 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0077DB10272 for ; Thu, 14 Apr 2016 14:07:55 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (chuckie.co.uk [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 9C96F197F for ; Thu, 14 Apr 2016 14:07:54 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from host81-154-31-210.range81-154.btcentralplus.com ([81.154.31.210] helo=[192.168.1.65]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1aqhvu-0000qd-Ka for freebsd-sparc64@freebsd.org; Thu, 14 Apr 2016 15:07:52 +0100 To: "freebsd-sparc64@freebsd.org" From: Mark Cave-Ayland Message-ID: <570FA410.5020408@ilande.co.uk> Date: Thu, 14 Apr 2016 15:07:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 81.154.31.210 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: qemu-system-sparc64 can boot FreeBSD 10.3! 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.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 14:07:55 -0000 Hi all, So while I've been working on this, it seems that Artyom has beaten me to it: http://tyom.blogspot.co.uk/2016/04/freebsd-103sparc64-under-qemu.html. A copy of QEMU git master along with https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02284.html and https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02285.html can boot the FreeBSD 10.3 release: $ ./qemu-system-sparc64 -cdrom FreeBSD-10.3-RELEASE-sparc64-bootonly.iso -boot d -m 512 -nographic OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 26 2016 10:39 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Loading a.out image... Loaded 7680 bytes entry point is 0x4000 Jumping to entry point 0000000000004000 for type 0000000000000005... switching to new context: entry point 0x4000 stack 0x00000000ffe84a09 >> FreeBSD/sparc64 boot block Boot path: /pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:f Boot loader: /boot/loader Consoles: Open Firmware console FreeBSD/sparc64 bootstrap loader, Revision 1.0 (root@releng1.nyi.freebsd.org, Fri Mar 25 06:23:20 UTC 2016) bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a" Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0xbc4540+0xe62a0 syms=[0x8+0xcc060+0x8+0xbe0ae] Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... jumping to kernel entry at 0xc00a8000. Copyright (c) 1992-2016 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 06:26:08 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/sparc64.sparc64/usr/src/sys/GENERIC sparc64 gcc version 4.2.1 20070831 patched [FreeBSD] real memory = 536870912 (512 MB) avail memory = 501080064 (477 MB) cpu0: Sun Microsystems UltraSparc-IIi Processor (100.00 MHz CPU) random: initialized kbd0 at kbdmux0 nexus0: nexus0: : incomplete pcib0: mem 0x1fe00000000-0x1fe01ffffff irq 2032,2030,2031,2021 on nexus0 pcib0: Sabre, impl 0, version 0, IGN 0x1f, bus A, 33MHz pcib0: DVMA map: 0xc0000000 to 0xc3ffffff 8192 entries pcib0: [GIANT-LOCKED] pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pcib2: at device 1.1 on pci0 pci2: on pcib2 ebus0: port 0x4000-0x7fff mem 0x3000000-0x3ffffff at device 3.0 on pci0 vgapci0: mem 0x1000000-0x1ffffff,0x2000000-0x2000fff at device 2.0 on pci0 vgapci0: Boot video device eeprom0: addr 0x1400002000-0x1400003fff on ebus0 eeprom0: model mk48t59 ebus0: addr 0 (no driver attached) uart0: <16550 or compatible> addr 0x14000003f8-0x14000003ff irq 43 on ebus0 uart0: console (9600,n,8,1) ebus0: addr 0x1400000060-0x1400000067 (no driver attached) pci0: at device 4.0 (no driver attached) atapci0: port 0x8100-0x8107,0x8180-0x8183,0x8200-0x8207,0x8280-0x8283,0x8300-0x830f at device 5.0 on pci0 ata2: at channel 0 on atapci0 ata3: at channel 1 on atapci0 nexus0: type unknown (no driver attached) Timecounter "tick" frequency 100000000 Hz quality 1000 Event timer "tick" frequency 100000000 Hz quality 1000 Timecounters tick every 1.000 msec cd0 at ata3 bus 0 scbus1 target 0 lun 0 cd0: Removable CD-ROM SCSI device cd0: Serial Number QM00003 cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes) cd0: 193MB (99200 2048 byte sectors) random: unblocking device. Trying to mount root from cd9660:/dev/iso9660/10_3_RELEASE_SPARC64_BO [ro]... Entropy harvesting: interrupts ethernet point_to_point swi. Starting file system checks: Mounting local file systems:. Writing entropy file:. /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). Starting Network: lo0. lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 nd6 options=21 Starting devd. add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Generating host.conf. eval: cannot create /etc/host.conf: Read-only file system eval: cannot create /etc/host.conf: Read-only file system eval: cannot create /etc/host.conf: Read-only file system Creating and/or trimming log files. Starting syslogd. ELF ldconfig path: /lib /usr/lib /usr/lib/compat Clearing /tmp (X related). Starting local daemons: Welcome to FreeBSD! Please choose the appropriate terminal type for your system. Common console types are: ansi Standard ANSI terminal vt100 VT100 or compatible terminal xterm xterm terminal emulator (or compatible) cons25w cons25w terminal Console type [vt100]: Sadly though it seems the latest 11.0-CURRENT-sparc64-20160408-r297692 doesn't boot because https://reviews.freebsd.org/D2791 hasn't yet been applied to the 11.0 tree: $ ./qemu-system-sparc64 -cdrom FreeBSD-11.0-CURRENT-sparc64-20160408-r297692-disc1.iso -boot d -m 512 -nographic OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 26 2016 10:39 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Loading a.out image... Loaded 7680 bytes entry point is 0x4000 Jumping to entry point 0000000000004000 for type 0000000000000005... switching to new context: entry point 0x4000 stack 0x00000000ffe84a09 >> FreeBSD/sparc64 boot block Boot path: /pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:f Boot loader: /boot/loader Consoles: Open Firmware console FreeBSD/sparc64 bootstrap loader, Revision 1.0 (root@releng2.nyi.freebsd.org, Fri Apr 8 06:07:07 UTC 2016) bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a" Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0xd1cc40+0x2137d8 syms=[0x8+0xdf260+0x8+0xcddb9] \ Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... jumping to kernel entry at 0xc00b0000. GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2016 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #0 r297692: Fri Apr 8 06:10:15 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/sparc64.sparc64/usr/src/sys/GENERIC sparc64 gcc version 4.2.1 20070831 patched [FreeBSD] WARNING: WITNESS option enabled, expect reduced performance. VT: init without driver. real memory = 536870912 (512 MB) avail memory = 493920256 (471 MB) cpu0: Sun Microsystems UltraSparc-IIi Processor (100.00 MHz CPU) random: entropy device external interface kbd0 at kbdmux0 nexus0: nexus0: : incomplete pcib0: mem 0x1fe00000000-0x1fe01ffffff irq 2032,2030,2031,2021 on nexus0 panic: psycho_attach: could not allocate registers cpuid = 0 KDB: stack backtrace: vpanic() at vpanic+0x1b4 panic() at panic+0x20 psycho_attach() at psycho_attach+0x1a0 device_attach() at device_attach+0x5a8 device_probe_and_attach() at device_probe_and_attach+0x64 bus_generic_attach() at bus_generic_attach+0x10 nexus_attach() at nexus_attach+0x590 device_attach() at device_attach+0x5a8 device_probe_and_attach() at device_probe_and_attach+0x64 bus_generic_new_pass() at bus_generic_new_pass+0x11c bus_set_pass() at bus_set_pass+0xf8 root_bus_configure() at root_bus_configure+0x8 configure() at configure+0x4 mi_startup() at mi_startup+0x1d0 btext() at btext+0x28 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at kdb_enter+0x80: ta %xcc, 1 db> ATB, Mark.