qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] PPC 405 board
@ 2007-06-29 15:41 Andrew May
  0 siblings, 0 replies; only message in thread
From: Andrew May @ 2007-06-29 15:41 UTC (permalink / raw)
  To: qemu-devel

I starting trying the qemu PPC system emulation for the 405 boards and
ran into an issue with where the board info pointer is located in
memory. The first Linux MMU entry only covers the first few megs of RAM
and the current code puts the bdloc at the very top of memory. And when
the kernel tries to copy the data it fails.

So this little patch just moves the location down into the first 16
Meg, like U-boot does. And I am able to boot the kernel after that.

Index: ppc405_uc.c
===================================================================
RCS file: /sources/qemu/qemu/hw/ppc405_uc.c,v
retrieving revision 1.4
diff -u -r1.4 ppc405_uc.c
--- ppc405_uc.c	8 Jun 2007 16:45:23 -0000	1.4
+++ ppc405_uc.c	29 Jun 2007 15:39:56 -0000
@@ -74,8 +74,8 @@
     ram_addr_t bdloc;
     int i, n;
 
-    /* We put the bd structure at the top of memory */
-    bdloc = bd->bi_memsize - sizeof(struct ppc4xx_bd_info_t);
+    /* We put the bd structure at the top of 16 Meg of memory */
+    bdloc = (16 << 20) - sizeof(struct ppc4xx_bd_info_t);
     stl_raw(phys_ram_base + bdloc + 0x00, bd->bi_memstart);
     stl_raw(phys_ram_base + bdloc + 0x04, bd->bi_memsize);
     stl_raw(phys_ram_base + bdloc + 0x08, bd->bi_flashstart);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-29 15:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29 15:41 [Qemu-devel] PPC 405 board Andrew May

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).