I have begun doing work with OpenBIOS. I was wondering if it is
possible to compile OpenBIOS for PowerPC on Mac OS X? If not, what
Linux distro should I use? Any advice would really help.
Hi all,
So given that the Fcode evaluator is sorted for Solaris 10, I thought
I'd try my original Solaris 9 disk image again and was surprised to find
that it didn't boot.
Further investigation seems to show that strangely encoded device names
are being passed into cif-open which is failing:
: get-file ( 6000 ffe35870 27 )
00000000ffe36378: fname>devname$
3 > 2dup type /platform/OpenBiosTeam,OpenBIOS/ufsboot ok
3 > resume ok
( 6000 ffe35870 27 )
00000000ffe36378: fname>devname$ ( 6000 ffe35ee8 2f )
00000000ffe36380: ufs-fopen
3 > 2dup type cdrom:a,|platform|OpenBiosTeam,OpenBIOS|ufsboot ok
3 > resume ok
( 6000 ffe35ee8 2f )
00000000ffe36380: ufs-fopen
: ufs-fopen ( 6000 ffe35ee8 2f )
00000000ffe360e8: drop ( 6000 ffe35ee8 )
00000000ffe360f0: cif-open ( 6000 0 )
00000000ffe360f8: (semis)
: get-file ( 6000 ffe35870 17 )
00000000ffe36378: fname>devname$
3 > 2dup type /platform/sun4u/ufsboot ok
3 > resume ok
( 6000 ffe35870 17 )
00000000ffe36378: fname>devname$ ( 6000 ffe35ee8 1f )
00000000ffe36380: ufs-fopen
3 > 2dup type cdrom:a,|platform|sun4u|ufsboot ok
3 > resume ok
( 6000 ffe35ee8 1f )
00000000ffe36380: ufs-fopen
: ufs-fopen ( 6000 ffe35ee8 1f )
00000000ffe360e8: drop ( 6000 ffe35ee8 )
00000000ffe360f0: cif-open OFMEM: ofmem_claim_virt virt=ffffffffffffffff
size=0000000000000200 align=0000000000000001
( 6000 0 )
00000000ffe360f8: (semis)
It looks as if a special type of device-specifier is being passed into
cif-open consisting of a device and argument, a comma, then the actual
filename required with /s replaced by |s.
Is this some kind of special syntax that needs to be taught to the dev
word and/or cif-open words?
ATB,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
Hi folks,
I've been trying to use OpenBIOS with QEMU, and I've had trouble
getting it to boot any PowerPC-based OS discs (Linux, Mac OS X, etc).
OpenBIOS just doesn't seem to find anything bootable. If I try booting
QEMU with -nographic, I get this output (I get the same with a
self-built openbios-qemu.elf from the OpenBIOS SVN as well):
---- snip ----
>> =============================================================
>> OpenBIOS 1.0 [Apr 12 2009 00:55]
>> Configuration device id QEMU version 1 machine id 1
>> CPUs: 1
>> Memory: 128M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,970FX
Welcome to OpenBIOS v1.0 built on Apr 12 2009 00:55
>> ELF - yaboot_startup: Entering boot, no path
>> ELF - try_bootinfo: Trying hd:0,ppc\bootinfo.txt
>> ELF - try_bootinfo: Can't open hd:0,ppc\bootinfo.txt
>> ELF - try_path: Trying hd:2,\ofclient
>> ELF - try_path: Can't open hd:2,\ofclient
>> ELF - try_path: Trying hd:2,\yaboot conf=hd:2,\yaboot.conf
>> ELF - try_path: Can't open hd:2,\yaboot
>> *** Boot failure! No secondary bootloader specified ***
---- snip ----
Laurent Vivier suggested in this conversation in February
(http://lists.openbios.org/pipermail/openbios/2009-February/003476.html)
that there could be a bug in partition map decoding. Has such a bug
been confirmed? I was trying to find the bug myself (I am an
experienced C/C++ programmer), but the bug seems to be subtle, and my
lack of familiarity with the code base doesn't help much.
I've been trying to figure this out for 7 hours straight now... Any
advice or other help would be much appreciated!
- Steven
>
> Message: 1
> Date: Wed, 24 Feb 2010 22:18:37 +0100
> From: Andreas F?rber <andreas.faerber(a)web.de>
> To: The OpenBIOS Mailinglist <openbios(a)openbios.org>
> Subject: Re: [OpenBIOS] Documentation problem in primitives.c
> Message-ID: <EA271F08-3A64-4446-B0F4-BCE0B1A4DD15(a)web.de>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> Am 24.02.2010 um 11:15 schrieb Mark Cave-Ayland:
>
>> Programmingkid wrote:
>>
>>> /* words[] is a function array of all native code functions in used
>>> by
>>> * the dictionary, i.e. CFAs and primitives.
>
> While you're at it, s/in used by/used by/ (or s/in used by/in use by/)
>
I'm sorry, I 'm not sure what you wrote means. What does it mean?
On Feb 26, 2010, at 6:00 AM, openbios-request(a)openbios.org wrote:
> On 2/25/10 4:45 PM, Programmingkid wrote:
>> Thank you very much for all your help. I only wish there was
>> documentation available on how to add words. Maybe I should make a
>> tutorial and send it to the person in charge of the OpenBIOS website.
> If you want a wiki account, let me know.
>
> Stefan
Sure, a wiki account would be great.
Adding local variable support to OpenBIOS is going to have to involve changing the interpret word. Making changes to the c version would be a lot easier than making changes to the forth version. How do I make OpenBIOS use the c version (found in bootstrap.c) instead of the forth version?
Thank you very much for all your help. I only wish there was documentation available on how to add words. Maybe I should make a tutorial and send it to the person in charge of the OpenBIOS website.
On Feb 24, 2010, at 6:00 AM, openbios-request(a)openbios.org wrote:
> Message: 5
> Date: Wed, 24 Feb 2010 10:13:23 +0000
> From: Mark Cave-Ayland <mark.cave-ayland(a)siriusit.co.uk>
> To: The OpenBIOS Mailinglist <openbios(a)openbios.org>
> Subject: Re: [OpenBIOS] Help with local variables
> Message-ID: <4B84FBC3.4040108(a)siriusit.co.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> G 3 wrote:
>
>> Hi, I am working on implementing local variable support in OpenBIOS. I
>> have done a lot of research on the issue, but there are a few issues I
>> still need help resolving.
>>
>>
>> -Does Openbios context switch when a word is called? This is when all
>> the registers are saved into a stack frame, so the currently executing
>> word can use them.
>
> I think you are looking too low a level here - all of this is handled
> automatically by the Forth engine.
>
>> -Could someone give me a tutorial on how to add c functions to forth and
>> make them accessible to the interpreter. I want to be able to add words
>> to the dictionary and be able to use them from the command line.
>
> The easiest way to look at this is to look at one of the existing
> primitive words such as DOCOL. But in short:
>
> - Add the new word to the end of the wordnames array in kernel/bootstrap.c
>
> - Add the C function name to the end of the words array in
> kernel/primitives.c
>
> - Add the C function to kernel/internal.c
>
>> - Would anyone know which register on the PowerPC would be good for
>> using as a stack pointer for a new local variable stack? I think r13 is
>> free and a possible candidate.
>
> Again, you're looking at too low a level here. What I believe you need
> to do is create a word that adds a new dictionary to the search list at
> the start of the function, much in the same way that a package instance
> does.
>
>
> HTH,
>
> Mark.
>
> --
> Mark Cave-Ayland - Senior Technical Architect
> PostgreSQL - PostGIS
> Sirius Corporation plc - control through freedom
> http://www.siriusit.co.uk
> t: +44 870 608 0063
>
> Sirius Labs: http://www.siriusit.co.uk/labs
In the file Kernel/primitives.c, it say that there is another list of forth words in the file unix.c, but there is no list. Here is the quote from primitives.c.
/* words[] is a function array of all native code functions in used by
* the dictionary, i.e. CFAs and primitives.
* Any change here needs a matching change in the primitive word's
* name list that is kept for bootstrapping in arch/unix/unix.c
*
* NOTE: THIS LIST SHALL NOT CHANGE (EXCEPT MANDATORY ADDITIONS AT
* THE END). ANY OTHER CHANGE WILL BREAK COMPATIBILITY TO OLDER
* BINARY DICTIONARIES.
*/
I think this should say the matching list is in bootstrap.c, and not in arch/unix/unix.c.
Hi, I am working on implementing local variable support in OpenBIOS. I have
done a lot of research on the issue, but there are a few issues I still need
help resolving.
-Does Openbios context switch when a word is called? This is when all the
registers are saved into a stack frame, so the currently executing word can
use them.
-Could someone give me a tutorial on how to add c functions to forth and
make them accessible to the interpreter. I want to be able to add words to
the dictionary and be able to use them from the command line.
- Would anyone know which register on the PowerPC would be good for using as
a stack pointer for a new local variable stack? I think r13 is free and a
possible candidate.
If anyone could give me a few pointers, it would really speed up my ability
to improve OpenBIOS.
In an effort to get PPC64 guests working properly, this patch set
implements all bits necessary to make PPC64 guests work with current
Qemu git.
If there are no strong objections to this set, I'll just commit it.
Alexander Graf (7):
PPC: Increase instruction cache size
PPC: Get timebase and clock speed from fw_cfg
PPC: Create interrupt map for PCI
PPC: Fix interrupt numbers
PPC: Add U3 based Mac machine
PPC: Set Uninorth interrupt numbers to new Qemu values
PPC: Disable host binary build
arch/ppc/qemu/init.c | 41 +++++++++++++++++++++++---------------
config/examples/ppc_config.xml | 2 +-
drivers/cuda.c | 7 +++++-
drivers/ide.c | 29 ++++++++++++++++++++++++--
drivers/macio.c | 16 ++++++++++++++-
drivers/pci.c | 42 ++++++++++++++++++++++++++++++++++++++++
drivers/pci_database.c | 10 +++++++-
include/openbios/fw_cfg.h | 6 +++++
include/openbios/pci.h | 11 ++++++++++
9 files changed, 140 insertions(+), 24 deletions(-)