qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] PPC 405 board


From: Andrew May
Subject: [Qemu-devel] PPC 405 board
Date: Fri, 29 Jun 2007 08:41:43 -0700

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]