This patchset follows on from my previous series and gets NetBSD/OpenBSD to the same point as FreeBSD, i.e. the kernel starts to execute and we begin enumerating hardware.
OpenBSD:
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 May 19 2014 21:06 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Not a bootable a.out image
Loading FCode image... Loaded 4829 bytes entry point is 0x4000 OpenBSD IEEE 1275 Bootblock 1.3 .. Jumping to entry point 0000000000100000 for type 0000000000000001... switching to new context: entry point 0x100000 stack 0x00000000ffe8aa09
OpenBSD BOOT 1.6
Trying bsd... open /pci@1fe,0/pci-ata@5/ide1@600/cdrom@0:f/etc/random.seed: No such file or directory Booting /pci@1fe,0/pci-ata@5/ide1@600/cdrom@0:f/bsd 3901336@0x1000000+6248@0x13b8798+3261984@0x1800000+932320@0x1b1c620 symbols @ 0xffc5a300 119 start=0x1000000
Unexpected client interface exception: -1 console is /pci@1fe,0/ebus@3/su Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2014 OpenBSD. All rights reserved. http://www.OpenBSD.org
OpenBSD 5.5 (RAMDISK) #153: Tue Mar 4 15:12:10 MST 2014 deraadt@sparc64.openbsd.org:/usr/src/sys/arch/sparc64/compile/RAMDISK real mem = 134217728 (128MB) avail mem = 122011648 (116MB) mainbus0 at root: OpenBiosTeam,OpenBIOS cpu0 at mainbus0: SUNW,UltraSPARC-IIi (rev 9.1) @ 100 MHz cpu0: physical 256K instruction (64 b/l), 16K data (32 b/l), 256K external (64 b/l) psycho0 at mainbus0: SUNW,sabre, impl 0, version 0, ign 7c0 psycho0: bus range 0-2, PCI bus 0 panic: intr_establish: bad intr number 0 halted
EXIT 0 >
NetBSD:
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 May 19 2014 21:06 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Not a bootable a.out image
Loading FCode image... Loaded 7478 bytes entry point is 0x4000 NetBSD IEEE 1275 Multi-FS Bootblock Version $NetBSD: bootblk.fth,v 1.13 2010/06/24 00:54:12 eeh Exp $ .. Jumping to entry point 0000000000100000 for type 0000000000000001... switching to new context: entry point 0x100000 stack 0x00000000ffe8aa09
NetBSD/sparc64 OpenFirmware Boot, Revision 1.16
=0x8870a0 Loading netbsd: 8071888+553056+339856 [601032+393301]=0x9cd528 Unimplemented service set-symbol-lookup ([2] -- [0])
Unexpected client interface exception: -1 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved.
NetBSD 6.1.2 (GENERIC) total memory = 128 MB avail memory = 111 MB mainbus0 (root): OpenBiosTeam,OpenBIOS: hostid 80123456 cpu0 at mainbus0: SUNW,UltraSPARC-IIi @ 100 MHz, UPA id 0 cpu0: 256K instruction (64 b/l), 16K data (32 b/l), 256K external (64 b/l) psycho0 at mainbus0 psycho0: SUNW,sabre: impl 0, version 0: ign 7c0 bus range 0 to 2; PCI bus 0 psycho_alloc_extent: no "available" property psycho_alloc_extent: no "available" property pci0 at psycho0 ppb0 at pci0 dev 1 function 0: Sun Microsystems Simba PCI Bridge (rev. 0x11) pci1 at ppb0 bus 1 ppb1 at pci0 dev 1 function 1: Sun Microsystems Simba PCI Bridge (rev. 0x11) pci2 at ppb1 bus 2 genfb0 at pci0 dev 2 function 0: unmatched vendor 0x1234 product 0x1111 (rev. 0x00) ebus0 at pci0 dev 3 function 0 ebus0: Sun Microsystems PCIO Ebus2, revision 0x01 panic: ebus ranges: error 2 Stopped in pid 0.1 (system) at netbsd:cpu_Debugger+0x4: nop db{0}>
Getting these kernels to a point where they start to execute and enumerate hardware is a big milestone. Next step will be to fix up the extra properties required by the *BSDs in the device tree.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (4): SPARC64: mark PROM memory allocations TTEs as privileged SPARC64: reduce client interface stack usage SPARC64: defer set_trap_table effect until CIF exit SPARC64: preserve window state when invoking CIF functions
openbios-devel/arch/sparc64/call-client.S | 242 ++++++++++++++++++++++++--- openbios-devel/arch/sparc64/ofmem_sparc64.c | 8 +- openbios-devel/arch/sparc64/openbios.c | 8 +- 3 files changed, 227 insertions(+), 31 deletions(-)