* [Qemu-devel] [6128] Use OpenBIOS for g3bw machine
@ 2008-12-24 20:23 Blue Swirl
2008-12-28 3:24 ` Miklos Vajna
0 siblings, 1 reply; 6+ messages in thread
From: Blue Swirl @ 2008-12-24 20:23 UTC (permalink / raw)
To: qemu-devel
Revision: 6128
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6128
Author: blueswir1
Date: 2008-12-24 20:23:51 +0000 (Wed, 24 Dec 2008)
Log Message:
-----------
Use OpenBIOS for g3bw machine
Modified Paths:
--------------
trunk/hw/ppc_mac.h
trunk/hw/ppc_oldworld.c
trunk/qemu-doc.texi
Modified: trunk/hw/ppc_mac.h
===================================================================
--- trunk/hw/ppc_mac.h 2008-12-24 20:21:18 UTC (rev 6127)
+++ trunk/hw/ppc_mac.h 2008-12-24 20:23:51 UTC (rev 6128)
@@ -31,6 +31,8 @@
#define BIOS_FILENAME "ppc_rom.bin"
#define VGABIOS_FILENAME "video.x"
#define NVRAM_SIZE 0x2000
+#define PROM_FILENAME "openbios-ppc32"
+#define PROM_ADDR 0xfff00000
#define KERNEL_LOAD_ADDR 0x01000000
#define INITRD_LOAD_ADDR 0x01800000
Modified: trunk/hw/ppc_oldworld.c
===================================================================
--- trunk/hw/ppc_oldworld.c 2008-12-24 20:21:18 UTC (rev 6127)
+++ trunk/hw/ppc_oldworld.c 2008-12-24 20:23:51 UTC (rev 6128)
@@ -164,19 +164,16 @@
/* allocate and load BIOS */
bios_offset = qemu_ram_alloc(BIOS_SIZE);
if (bios_name == NULL)
- bios_name = BIOS_FILENAME;
+ bios_name = PROM_FILENAME;
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name);
- bios_size = load_image(buf, phys_ram_base + bios_offset);
+ cpu_register_physical_memory(PROM_ADDR, BIOS_SIZE, bios_offset | IO_MEM_ROM);
+
+ /* Load OpenBIOS (ELF) */
+ bios_size = load_elf(buf, 0, NULL, NULL, NULL);
if (bios_size < 0 || bios_size > BIOS_SIZE) {
cpu_abort(env, "qemu: could not load PowerPC bios '%s'\n", buf);
exit(1);
}
- if (bios_size > 0x00080000) {
- /* As the NVRAM is located at 0xFFF04000, we cannot use 1 MB BIOSes */
- cpu_abort(env, "G3BW Mac hardware can not handle 1 MB BIOS\n");
- }
- cpu_register_physical_memory((uint32_t)(-bios_size),
- bios_size, bios_offset | IO_MEM_ROM);
/* allocate and load VGA BIOS */
vga_bios_offset = qemu_ram_alloc(VGA_BIOS_SIZE);
Modified: trunk/qemu-doc.texi
===================================================================
--- trunk/qemu-doc.texi 2008-12-24 20:21:18 UTC (rev 6127)
+++ trunk/qemu-doc.texi 2008-12-24 20:23:51 UTC (rev 6128)
@@ -2328,6 +2328,11 @@
QEMU uses the Open Hack'Ware Open Firmware Compatible BIOS available at
@url{http://perso.magic.fr/l_indien/OpenHackWare/index.htm}.
+Since version 0.9.1, QEMU uses OpenBIOS @url{http://www.openbios.org/}
+for the g3bw PowerMac machine. OpenBIOS is a free (GPL v2) portable
+firmware implementation. The goal is to implement a 100% IEEE
+1275-1994 (referred to as Open Firmware) compliant firmware.
+
@c man begin OPTIONS
The following options are specific to the PowerPC emulation:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6128] Use OpenBIOS for g3bw machine
2008-12-24 20:23 [Qemu-devel] [6128] Use OpenBIOS for g3bw machine Blue Swirl
@ 2008-12-28 3:24 ` Miklos Vajna
2008-12-28 13:08 ` Blue Swirl
0 siblings, 1 reply; 6+ messages in thread
From: Miklos Vajna @ 2008-12-28 3:24 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
Hi,
On Wed, Dec 24, 2008 at 08:23:52PM +0000, Blue Swirl <blauwirbel@gmail.com> wrote:
> Revision: 6128
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6128
> Author: blueswir1
> Date: 2008-12-24 20:23:51 +0000 (Wed, 24 Dec 2008)
>
> Log Message:
> -----------
> Use OpenBIOS for g3bw machine
>
> Modified Paths:
> --------------
> trunk/hw/ppc_mac.h
> trunk/hw/ppc_oldworld.c
> trunk/qemu-doc.texi
>
> Modified: trunk/hw/ppc_mac.h
> ===================================================================
> --- trunk/hw/ppc_mac.h 2008-12-24 20:21:18 UTC (rev 6127)
> +++ trunk/hw/ppc_mac.h 2008-12-24 20:23:51 UTC (rev 6128)
> @@ -31,6 +31,8 @@
> #define BIOS_FILENAME "ppc_rom.bin"
> #define VGABIOS_FILENAME "video.x"
> #define NVRAM_SIZE 0x2000
> +#define PROM_FILENAME "openbios-ppc32"
> +#define PROM_ADDR 0xfff00000
Is it by accident that the file 'openbios-ppc32' was not added to the
repo?
Currently qemu-system-ppc dies for me with:
/usr/local/share/qemu/openbios-ppc32: No such file or directory
qemu: fatal: qemu: could not load PowerPC bios
'/usr/local/share/qemu/openbios-ppc32'
Thanks.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6128] Use OpenBIOS for g3bw machine
2008-12-28 3:24 ` Miklos Vajna
@ 2008-12-28 13:08 ` Blue Swirl
2008-12-28 13:23 ` Miklos Vajna
2008-12-28 17:31 ` Aurelien Jarno
0 siblings, 2 replies; 6+ messages in thread
From: Blue Swirl @ 2008-12-28 13:08 UTC (permalink / raw)
To: qemu-devel
On 12/28/08, Miklos Vajna <vmiklos@frugalware.org> wrote:
> Hi,
>
>
> On Wed, Dec 24, 2008 at 08:23:52PM +0000, Blue Swirl <blauwirbel@gmail.com> wrote:
> > Revision: 6128
> > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6128
> > Author: blueswir1
> > Date: 2008-12-24 20:23:51 +0000 (Wed, 24 Dec 2008)
> >
> > Log Message:
> > -----------
> > Use OpenBIOS for g3bw machine
> >
> > Modified Paths:
> > --------------
> > trunk/hw/ppc_mac.h
> > trunk/hw/ppc_oldworld.c
> > trunk/qemu-doc.texi
> >
> > Modified: trunk/hw/ppc_mac.h
> > ===================================================================
> > --- trunk/hw/ppc_mac.h 2008-12-24 20:21:18 UTC (rev 6127)
> > +++ trunk/hw/ppc_mac.h 2008-12-24 20:23:51 UTC (rev 6128)
> > @@ -31,6 +31,8 @@
> > #define BIOS_FILENAME "ppc_rom.bin"
> > #define VGABIOS_FILENAME "video.x"
> > #define NVRAM_SIZE 0x2000
> > +#define PROM_FILENAME "openbios-ppc32"
> > +#define PROM_ADDR 0xfff00000
>
>
> Is it by accident that the file 'openbios-ppc32' was not added to the
> repo?
The development of OpenBIOS/PPC has been rapid, the added version
would soon become obsolete. Currently OpenBIOS can boot yaboot from
some install CD images but Linux hangs very early.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6128] Use OpenBIOS for g3bw machine
2008-12-28 13:08 ` Blue Swirl
@ 2008-12-28 13:23 ` Miklos Vajna
2008-12-28 17:31 ` Aurelien Jarno
1 sibling, 0 replies; 6+ messages in thread
From: Miklos Vajna @ 2008-12-28 13:23 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
On Sun, Dec 28, 2008 at 03:08:47PM +0200, Blue Swirl <blauwirbel@gmail.com> wrote:
> The development of OpenBIOS/PPC has been rapid, the added version
> would soon become obsolete. Currently OpenBIOS can boot yaboot from
> some install CD images but Linux hangs very early.
Ah, OK.
Thanks.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6128] Use OpenBIOS for g3bw machine
2008-12-28 13:08 ` Blue Swirl
2008-12-28 13:23 ` Miklos Vajna
@ 2008-12-28 17:31 ` Aurelien Jarno
2008-12-28 18:09 ` Blue Swirl
1 sibling, 1 reply; 6+ messages in thread
From: Aurelien Jarno @ 2008-12-28 17:31 UTC (permalink / raw)
To: qemu-devel
On Sun, Dec 28, 2008 at 03:08:47PM +0200, Blue Swirl wrote:
> On 12/28/08, Miklos Vajna <vmiklos@frugalware.org> wrote:
> > Hi,
> >
> >
> > On Wed, Dec 24, 2008 at 08:23:52PM +0000, Blue Swirl <blauwirbel@gmail.com> wrote:
> > > Revision: 6128
> > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6128
> > > Author: blueswir1
> > > Date: 2008-12-24 20:23:51 +0000 (Wed, 24 Dec 2008)
> > >
> > > Log Message:
> > > -----------
> > > Use OpenBIOS for g3bw machine
> > >
> > > Modified Paths:
> > > --------------
> > > trunk/hw/ppc_mac.h
> > > trunk/hw/ppc_oldworld.c
> > > trunk/qemu-doc.texi
> > >
> > > Modified: trunk/hw/ppc_mac.h
> > > ===================================================================
> > > --- trunk/hw/ppc_mac.h 2008-12-24 20:21:18 UTC (rev 6127)
> > > +++ trunk/hw/ppc_mac.h 2008-12-24 20:23:51 UTC (rev 6128)
> > > @@ -31,6 +31,8 @@
> > > #define BIOS_FILENAME "ppc_rom.bin"
> > > #define VGABIOS_FILENAME "video.x"
> > > #define NVRAM_SIZE 0x2000
> > > +#define PROM_FILENAME "openbios-ppc32"
> > > +#define PROM_ADDR 0xfff00000
> >
> >
> > Is it by accident that the file 'openbios-ppc32' was not added to the
> > repo?
>
> The development of OpenBIOS/PPC has been rapid, the added version
> would soon become obsolete. Currently OpenBIOS can boot yaboot from
> some install CD images but Linux hangs very early.
>
By the way, I wonder if we will need a different BIOS for 32- and
64-bit, as a the first thing that a 64-bit kernel does is switching the
CPU to 64-bit mode. Also contrary to Sparc, a 32-bit code works
unchanged on a 64-bit CPU.
If it is confirmed, we can probably rename openbios-ppc32 into
openbios-ppc.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6128] Use OpenBIOS for g3bw machine
2008-12-28 17:31 ` Aurelien Jarno
@ 2008-12-28 18:09 ` Blue Swirl
0 siblings, 0 replies; 6+ messages in thread
From: Blue Swirl @ 2008-12-28 18:09 UTC (permalink / raw)
To: qemu-devel
On 12/28/08, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Sun, Dec 28, 2008 at 03:08:47PM +0200, Blue Swirl wrote:
> > On 12/28/08, Miklos Vajna <vmiklos@frugalware.org> wrote:
> > > Hi,
> > >
> > >
> > > On Wed, Dec 24, 2008 at 08:23:52PM +0000, Blue Swirl <blauwirbel@gmail.com> wrote:
> > > > Revision: 6128
> > > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6128
> > > > Author: blueswir1
> > > > Date: 2008-12-24 20:23:51 +0000 (Wed, 24 Dec 2008)
> > > >
> > > > Log Message:
> > > > -----------
> > > > Use OpenBIOS for g3bw machine
> > > >
> > > > Modified Paths:
> > > > --------------
> > > > trunk/hw/ppc_mac.h
> > > > trunk/hw/ppc_oldworld.c
> > > > trunk/qemu-doc.texi
> > > >
> > > > Modified: trunk/hw/ppc_mac.h
> > > > ===================================================================
> > > > --- trunk/hw/ppc_mac.h 2008-12-24 20:21:18 UTC (rev 6127)
> > > > +++ trunk/hw/ppc_mac.h 2008-12-24 20:23:51 UTC (rev 6128)
> > > > @@ -31,6 +31,8 @@
> > > > #define BIOS_FILENAME "ppc_rom.bin"
> > > > #define VGABIOS_FILENAME "video.x"
> > > > #define NVRAM_SIZE 0x2000
> > > > +#define PROM_FILENAME "openbios-ppc32"
> > > > +#define PROM_ADDR 0xfff00000
> > >
> > >
> > > Is it by accident that the file 'openbios-ppc32' was not added to the
> > > repo?
> >
> > The development of OpenBIOS/PPC has been rapid, the added version
> > would soon become obsolete. Currently OpenBIOS can boot yaboot from
> > some install CD images but Linux hangs very early.
> >
>
>
> By the way, I wonder if we will need a different BIOS for 32- and
> 64-bit, as a the first thing that a 64-bit kernel does is switching the
> CPU to 64-bit mode. Also contrary to Sparc, a 32-bit code works
> unchanged on a 64-bit CPU.
To be more precise: on Sparc64, 32-bit user code still works, the
problem is that the supervisor instructions are incompatible.
Moreover, Sun4[cdm] machine architectures are very different from
Sun4[uv].
> If it is confirmed, we can probably rename openbios-ppc32 into
> openbios-ppc.
Actually I tried something similar earlier today, one problem is that
g3bw machine claims it is incompatible with the bus model of PPC64.
The reset vectors are different but that can be handled with two entry
points.
As a side note, I also tried to make a cross compiler for
powerpc64-elf to try to compile OpenBIOS in 64 bit mode, but that is
not a supported configuration. Strange.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-28 18:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-24 20:23 [Qemu-devel] [6128] Use OpenBIOS for g3bw machine Blue Swirl
2008-12-28 3:24 ` Miklos Vajna
2008-12-28 13:08 ` Blue Swirl
2008-12-28 13:23 ` Miklos Vajna
2008-12-28 17:31 ` Aurelien Jarno
2008-12-28 18:09 ` Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).