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.
Otherwise it chokes on ducell in include/kernel/stack.h.
Signed-off-by: Andreas Färber <andreas.faerber(a)web.de>
---
It seems I only mentioned this on the list but never sent a proper patch.
http://www.openfirmware.info/pipermail/openbios/2009-November/004192.html
Not sure about Linux/ppc or Darwin/x86, so I've limited it to Darwin/ppc for now.
Regards,
Andreas
config/scripts/switch-arch | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/config/scripts/switch-arch b/config/scripts/switch-arch
index c1158fa..8b6563d 100755
--- a/config/scripts/switch-arch
+++ b/config/scripts/switch-arch
@@ -71,6 +71,8 @@ crosscflags()
if test "$host" = "x86" -a "$targetlongbits" = "64"; then
cflags="$cflags -DNEED_FAKE_INT128_T"
+ elif test "$host" = "ppc" -a "$targetlongbits" = "64" -a `uname -s` = "Darwin"; then
+ cflags="$cflags -DNEED_FAKE_INT128_T"
fi
CROSSCFLAGS=$cflags
--
1.7.0.4
Hello,
I'm investigating the idea of a new QEMU chrp machine derived from
mac99. The background is that there are ofmem issues when running
Haiku on the g3beige machine, whereas running AIX on mac99 fails with
the fix in place that makes Haiku go further. I assume this is due to
differences in memory layout so that I need to move OpenBIOS to
another location in RAM and anything else that clobbers the memory
locations AIX assumes to be able to claim for itself.
Not having (low-level) access to an IBM Power System / System p /
pSeries, the best source I could find was a JS20 device tree [1].
(Some older RS/6000 ones for comparison are available at [2].)
Interestingly the nvram is at 0x00000100ff800000 and pci at
0x08000000f8000000, i.e. above 32-bit address space. With
sizeof(void*) == 4, drivers/macio.c:nvram is unable to save and access
such an address.
ofmem cannot deal with 64-bit virtual/physical addresses either, since
it uses 32-bit ucell in translation_t and range_t. The MMU
translations on mac99 don't match Apple's OpenFirmware on my G5 size-
wise.
What's the plan for fixing this? Will we need an openbios-ppc64 after
all, or is there a way to fix these issues in openbios-ppc using
uint64_t and some assembler magic? The 970 init (arch/ppc/qemu/
init.c:ppc64_patch_handlers) apparently does something clever for the
interrupt handlers and seems able to use 64-bit ld/std instructions in
start.S. That still wouldn't help with ucell based structs and C
functions of course...
Regards,
Andreas
[1] http://www.ibm.com/developerworks/forums/thread.jspa?threadID=73270
[2] http://www.tibit.org/ppc/
Author: mcayland
Date: Wed Sep 29 18:27:42 2010
New Revision: 868
URL: http://tracker.coreboot.org/trac/openbios/changeset/868
Log:
When DEBUG_CIF is defined, a serial message of the form "method(...) = "
is emitted by dump_service(). After successful execution the return value
and a linebreak are emitted by dump_return(). If however the method fails,
nothing is emitted, so that subsequent method calls end up in place of the
return value. Observed for getproplen with AIX.
Emit an error indication and a linebreak when DEBUG_CIF is defined.
Signed-off-by: Andreas Färber <andreas.faerber(a)web.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)siriusit.co.uk>
Modified:
trunk/openbios-devel/libopenbios/client.c
Modified: trunk/openbios-devel/libopenbios/client.c
==============================================================================
--- trunk/openbios-devel/libopenbios/client.c Tue Sep 28 20:59:47 2010 (r867)
+++ trunk/openbios-devel/libopenbios/client.c Wed Sep 29 18:27:42 2010 (r868)
@@ -306,6 +306,10 @@
if( val == -1 )
printk("Unimplemented service %s ([%ld] -- [%ld])\n",
pb->service, pb->nargs, pb->nret );
+#ifdef DEBUG_CIF
+ else
+ printk("ERROR!\n");
+#endif
return -1;
}
> Date: Tue, 21 Sep 2010 10:07:19 +0100
> From: mark.cave-ayland(a)siriusit.co.uk
> To: openbios(a)openbios.org
> Subject: Re: [OpenBIOS] x86 multiboot header?
>
> Nathan Kunkee wrote:
>
> > Hi all,
> >
> > As of revision 861, I am unable to build a working multiboot image. I am working on Ubuntu 10.4, gcc 4.4. Although OpenSolaris b134, gcc4, also doesn't work.
> >
> > Grub 1.95 doesn't recognize the file as a multiboot file. QEMU crashes when passed this via -kernel (something about running code near 0xa000). Sure enough, I can find the second header for 0x2BAD but not 0x1BAD. Is the linker script that prefixes the header off?
> >
> > Thank you in advance for any assistance!
> > Nathan
>
> Interesting. Did you find r861 as the result of an SVN bisect? If so,
> posting a link to your test image so that someone could debug this would
> be very helpful.
>
>
> ATB,
>
> Mark.
Hello,
I should have said "As of the latest commit (r861)..." since I wanted to convey that I'd tried the latest sources, not that a particular revision introduced this, nor that I found it with a bisect.
I found the following change enabled the multiboot image to load with the embedded utils/iso/boot/grub:
Index: arch/x86/multiboot.c
===================================================================
--- arch/x86/multiboot.c (revision 872)
+++ arch/x86/multiboot.c (working copy)
@@ -15,8 +15,10 @@
unsigned int magic, flags, checksum;
};
-static const struct mbheader multiboot_header
- __attribute__((section (".hdr"))) =
+//static
+const struct mbheader multiboot_header
+ __attribute__ ((section (".hdr")))
+=
{
MULTIBOOT_HEADER_MAGIC,
MULTIBOOT_HEADER_FLAGS,
However, even with this, qemu doesn't successfully load the multiboot image:
nathan@fangorn:~/openbios-devel/obj-x86$ /usr/local/build/qemu/i386-softmmu/qemu -L /usr/local/src/qemu/pc-bios/ -kernel openbios.multiboot -initrd openbios-x86.dict
qemu: I believe we found a multiboot image!
multiboot: mh_header_addr = 0
multiboot: mh_load_addr = 0x8
multiboot: mh_load_end_addr = 0x9
multiboot: mh_bss_end_addr = 0x1
qemu: loading multiboot kernel (0x14d28 bytes) at 0x8
multiboot loading module: openbios-x86.dict
mod00: 00016008 - 0002dd44
mod_start: 0x9b73cd0
mod_end: 0x9b8ba0c
cmdline: 00015018
multiboot: mh_entry_addr = 0x42464c45
mb_buf_phys = 00000008
mod_start = 00016008
mb_mods_count = 1
qemu: fatal: Trying to execute code outside RAM or ROM at 0x42464c45
I've uploaded a zip (openbios-multi.zip) to http://filebin.ca/boqpcs/openbios-multi.zip [filebin.ca] if you'd like to look at my test image.
Thank you for your assistance!
Nathan