>>Interesting. Loading the kernel at once. The ELF kernel loads fine, but
>>the CD comes with an a.out kernel that has a wrong "text" size and no
>>data size. Since it loads directly from the CD device as opposed to from
>>a filesystem I have no idea how much data to load and how to parse it.
>>:-(
Oh yeah - SF also has an AOUT loader, and a COFF loader, along with some
dumpaout and dumpcoff (and dumpelf) utils. They're handy to root around
inside the various files to figure out where stuff needs to be loaded.
(They're under the "exe" dir.)
--
__
/__)_ _ _ _ While it may be true that a watched pot never boils, the
/ (// (/(/ one you don't keep an eye on can make an awful mess of
_/ your stove. -- Edward Stevenson
>This part seems very different on Sparc32. I did not know some weeks
>ago, but OpenBoot until very late versions does not use the client
>interface but a data structure called "romvec" (arch/sparc32/romvec.c)
>that contains several data pointers and callbacks to different OF
>functions
I haven't looked at NetBSD/Sparc, unfortunately. Just NetBSD/PowerPC
with Open Firmware support for Macs, old Moto stuf, etc, which makes
proper call-backs, plus has specs in nauseating detail.
Have you looked at the other BSDs (Free/Open) to see if their Sparc32
boot is any different, perhaps simpler?
>Interesting. Loading the kernel at once. The ELF kernel loads fine, but
>the CD comes with an a.out kernel that has a wrong "text" size and no
>data size. Since it loads directly from the CD device as opposed to from
>a filesystem I have no idea how much data to load and how to parse it.
>:-(
Yeah, the first trick is building that ELF netbsd kernel and not the
bootstrap a.out thingie. A standard ELF kernel may lurk lower down on
the CD somewhere. Otherwise it's cross-compile time.
The SF trick short-circuits the loaders (at least initially) by
directly loading the ELF image, then passing it the magic args that it
expects. The args are hard-wired inside a C array, just to get things
rolling. Works surprisingly well for system bring-up.
>Does a version of Smart Firmware boot Solaris on Sparc? Any chance
>there's some hint?
Unfortunately the version of SF that boots Solaris contains a LOT of
proprietary Sun code, some in C, some in Forth/Fcode. Even we never had
a copy of it - it all stayed on Sun's machines.
The Solaris versions Sun's SF was booting involved loading and running a
variety of their Fcode loaders, which loaded other Fcode, which
sometimes loaded even more Fcode, which eventually loaded a kernel,
which would then run, making a bunch of callbacks all the while.
A variety of subtle bugs and bug-compatibility modes in the SF code are
#ifdef-ed SUN_COMPATIBILITY, but other than that, there's not much else.
--
__
/__)_ _ _ _ "What do you give a man who has everything?" the
/ (// (/(/ pretty teenager asked her mother. "Encouragement, dear,"
_/ she replied.
Stefan Reinauer wrote:
>Welcome to OpenBIOS v1.0RC1 built on Jun 5 2006 15:07
> Type 'help' for detailed information
>
>[sparc] Kernel already loaded
>OBP version 3, revision 2.25 (plugin rev 2)
>Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
> 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 3.0 (GENERIC) #0: Mon Dec 19 04:01:27 UTC 2005
> builds@b3.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/sparc/200512182024Z-ob
>j/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/sparc/compile/GENERIC
>total memory = 127 MB
>avail memory = 120 MB
>bootpath:
>data fault: pc=0xf02a4f3c addr=0x7ff000
>sfsr=126<PERR=0,LVL=1,AT=1,FT=1,FAV,OW>
>panic: kernel fault
>halted
It's been quite a while since I last played with NetBSD and OF. The
last was with a PowerPC board. As I recall, NetBSD makes heavy use of
the client-interface callbacks to get some important info.
One of my tricks with SmartFirmware was to load the entire NetBSD
kernel (builtin ELF loader), turn on tracing, then try to boot. Any
callbacks etc would nicely print out as they were executed, so it was a
lot easier to see at which point it was failing.
I also added dprintfs in the NBSD routines that performed the various
calls to OF. The usual debugging stuff. 'Course this requires having a
cross-compile environment handy to build custom NBSD kernels to test.
Booting Solaris was a whole new level of pain. A lot of Sun's
intermediate boot-loaders made heinous use of Forth and required all
sorts of Sun-specific hacks to get them to run.
>Booting from the NetBSD 3.0 CD (sparccd-3.0.iso) I got an exception,
>since the a.out header shows some weird values:
>
>Welcome to OpenBIOS v1.0RC1 built on Jun 5 2006 15:07
> Type 'help' for detailed information
>
>[sparc] Booting file 'cdrom' with parameters '<NULL>'
>Loading a.out image...
> N_TXTADDR: 0x00002000 (0x30800007 bytes)
> N_TXTOFF : 0x00000020 (0x00000200)
> N_DATADDR: 0x30802007 (0 bytes)
>Loaded 8388615(0x30800007) bytes
>entry point is 0x4000
>Jumping to entry point...
>Unhandled Exception 0x00000002
>PC = 0x00000000 NPC = 0x00000004
>Stopping execution
This sure looks like it's trying to jump through a NULL pointer.
--
__
/__)_ _ _ _ There are three things I always forget. Names, faces --
/ (// (/(/ the third I can't remember. -- Italo Svevo
_/
--
__
/__)_ _ _ _ Iron Law of Distribution: Them that has, gets.
/ (// (/(/
_/
I fixed the TCX mapping problem and added SMP support from Proll.
SMP is not working fully (neither was Proll), probably some problem with
Qemu. I think earlier it worked. The idea is to send a soft interrupt to a
halted CPU, which then awakes and begins execution. Now the CPU gets the
interrupt (Qemu monitor commands info pic, info cpus confirm this) but it
does not awaken.
Now the only missing functionality that Proll had is TFTP booting support.
It could be possible to reuse Proll's slirp stack, but I'm not sure if it is
worth the trouble. In Qemu environment booting from network is not that
useful, because you can preload the kernel.
Otherwise OpenBIOS matches or exceeds Proll's capabilities. I'll propose
switching to OpenBIOS to Qemu developers.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
I should specifically add that I would like to get QEMU running under a
Windows environment.
I've managed to build QEMU using MinGW / MSYS etc as detailed in the QEMU
HOWTOs.
Now I just need to get that friendly Openboot-style prompt happening and
I'll be on my way.
Jason
-----Original Message-----
From: openbios-bounces(a)openbios.org
[mailto:openbios-bounces@openbios.org]On Behalf Of Armistead, Jason
Sent: Tuesday, 6 June 2006 12:42 PM
To: 'openbios(a)lists.openbios.org'
Subject: [OpenBIOS] Starting QEMU with OpenBIOS for Sparc32
Sorry for such a newbie question
Can someone just give me a quick overview of the "right way" to start up
QEMU so that it will load the OpenBIOS firmware instead of PROLL, and how to
point QEMU to my Solaris installation CD image file.
Do I need any hacks / patches to QEMU to use OpenBIOS instead of PROLL ?
What debugging switches should I enable with QEMU to help me figure out why
things aren't working when trying to boot the SunOS 4.1.4 (Solaris 1.1.2)
installation CD ?
Is there a "best way" to build OpenBIOS to ensure maximum useful debugging
information is produced ?
If I'm repeating a whole lot of old questions, is there a FAQ for the QEMU +
OpenBIOS (Sparc32) combination that someone can point me to ?
Thanks
Jason
--
OpenBIOS http://openbios.org/
Mailinglist: http://lists.openbios.org/mailman/listinfo
Free your System - May the Forth be with you
Sorry for such a newbie question
Can someone just give me a quick overview of the "right way" to start up
QEMU so that it will load the OpenBIOS firmware instead of PROLL, and how to
point QEMU to my Solaris installation CD image file.
Do I need any hacks / patches to QEMU to use OpenBIOS instead of PROLL ?
What debugging switches should I enable with QEMU to help me figure out why
things aren't working when trying to boot the SunOS 4.1.4 (Solaris 1.1.2)
installation CD ?
Is there a "best way" to build OpenBIOS to ensure maximum useful debugging
information is produced ?
If I'm repeating a whole lot of old questions, is there a FAQ for the QEMU +
OpenBIOS (Sparc32) combination that someone can point me to ?
Thanks
Jason