All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH-for-6.0] hw/ppc/mac_newworld: Restrict RAM to 2 GiB
@ 2021-04-06  8:48 Philippe Mathieu-Daudé
  2021-04-06 10:38 ` BALATON Zoltan
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-06  8:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Mark Cave-Ayland, Philippe Mathieu-Daudé,
	Greg Kurz, qemu-ppc, Igor Mammedov, Håvard Eidnes,
	David Gibson

On Mac99 and newer machines, the Uninorth PCI host bridge maps
the PCI hole region at 2GiB, so the RAM area beside 2GiB is not
accessible by the CPU. Restrict the memory to 2GiB to avoid
problems such the one reported in the buglink.

Buglink: https://bugs.launchpad.net/qemu/+bug/1922391
Reported-by: Håvard Eidnes <he@NetBSD.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/ppc/mac_newworld.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 21759628466..d88b38e9258 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -157,6 +157,10 @@ static void ppc_core99_init(MachineState *machine)
     }
 
     /* allocate RAM */
+    if (machine->ram_size > 2 * GiB) {
+        error_report("RAM size more than 2 GiB is not supported");
+        exit(1);
+    }
     memory_region_add_subregion(get_system_memory(), 0, machine->ram);
 
     /* allocate and load firmware ROM */
-- 
2.26.3



^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [Bug 1922391] [NEW] qemu-system-ppc assertion "!mr->container" failed
@ 2021-04-02 20:48 Håvard Eidnes
  2021-04-02 21:00 ` [Bug 1922391] " Håvard Eidnes
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Håvard Eidnes @ 2021-04-02 20:48 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Hi,

I'm trying to run the NetBSD/macppc 8.2 installer (which is 32-bit ppc) in qemu-system-ppc
version 5.2.0, and I'm hitting this assertion failure quite a bit into the "unpacking sets" 
part of the installation procedure, unpacking from the install iso image.

Qemu is run on a NetBSD/amd64 9.1 host system.  The stack backtrace from
the core file is

Program terminated with signal SIGABRT, Aborted.
#0  0x000078859a36791a in _lwp_kill () from /usr/lib/libc.so.12
[Current thread is 1 (process 1)]
(gdb) where
#0  0x000078859a36791a in _lwp_kill () from /usr/lib/libc.so.12
#1  0x000078859a3671ca in abort () from /usr/lib/libc.so.12
#2  0x000078859a2a8507 in __assert13 () from /usr/lib/libc.so.12
#3  0x000000015a3c19c0 in memory_region_finalize ()
#4  0x000000015a3fef1c in object_unref ()
#5  0x000000015a3feee6 in object_unref ()
#6  0x000000015a374154 in address_space_unmap ()
#7  0x000000015a276551 in pmac_ide_atapi_transfer_cb ()
#8  0x000000015a150a59 in dma_blk_cb ()
#9  0x000000015a46a1c7 in blk_aio_complete ()
#10 0x000000015a5a617d in coroutine_trampoline ()
#11 0x000078859a264150 in ?? () from /usr/lib/libc.so.12
Backtrace stopped: Cannot access memory at address 0x7884894ff000
(gdb) 

I start qemu with this small script:

---
#!/bin/sh

MEM=3g
qemu-system-ppc \
        -M mac99,via=pmu \
        -m $MEM  \
        -nographic \
        -drive id=hda,format=raw,file=disk.img \
        -L pc-bios \
        -netdev user,id=net0,hostfwd=tcp::2223-:22,ipv6=off \
        -net nic,model=rtl8139,netdev=net0 \
        -boot d \
        -cdrom NetBSD-8.2-macppc.iso
---

and boot the install kernel with "boot cd:ofwboot.xcf".  If someone wants
to replicate this I can provide more detailed instructions to repeat the
procedure I used to start the install.

Any hints about what more to look for?

Regards,

- Håvard

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1922391

Title:
  qemu-system-ppc assertion "!mr->container" failed

Status in QEMU:
  New

Bug description:
  Hi,

  I'm trying to run the NetBSD/macppc 8.2 installer (which is 32-bit ppc) in qemu-system-ppc
  version 5.2.0, and I'm hitting this assertion failure quite a bit into the "unpacking sets" 
  part of the installation procedure, unpacking from the install iso image.

  Qemu is run on a NetBSD/amd64 9.1 host system.  The stack backtrace
  from the core file is

  Program terminated with signal SIGABRT, Aborted.
  #0  0x000078859a36791a in _lwp_kill () from /usr/lib/libc.so.12
  [Current thread is 1 (process 1)]
  (gdb) where
  #0  0x000078859a36791a in _lwp_kill () from /usr/lib/libc.so.12
  #1  0x000078859a3671ca in abort () from /usr/lib/libc.so.12
  #2  0x000078859a2a8507 in __assert13 () from /usr/lib/libc.so.12
  #3  0x000000015a3c19c0 in memory_region_finalize ()
  #4  0x000000015a3fef1c in object_unref ()
  #5  0x000000015a3feee6 in object_unref ()
  #6  0x000000015a374154 in address_space_unmap ()
  #7  0x000000015a276551 in pmac_ide_atapi_transfer_cb ()
  #8  0x000000015a150a59 in dma_blk_cb ()
  #9  0x000000015a46a1c7 in blk_aio_complete ()
  #10 0x000000015a5a617d in coroutine_trampoline ()
  #11 0x000078859a264150 in ?? () from /usr/lib/libc.so.12
  Backtrace stopped: Cannot access memory at address 0x7884894ff000
  (gdb) 

  I start qemu with this small script:

  ---
  #!/bin/sh

  MEM=3g
  qemu-system-ppc \
          -M mac99,via=pmu \
          -m $MEM  \
          -nographic \
          -drive id=hda,format=raw,file=disk.img \
          -L pc-bios \
          -netdev user,id=net0,hostfwd=tcp::2223-:22,ipv6=off \
          -net nic,model=rtl8139,netdev=net0 \
          -boot d \
          -cdrom NetBSD-8.2-macppc.iso
  ---

  and boot the install kernel with "boot cd:ofwboot.xcf".  If someone wants
  to replicate this I can provide more detailed instructions to repeat the
  procedure I used to start the install.

  Any hints about what more to look for?

  Regards,

  - Håvard

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1922391/+subscriptions


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-05-15 10:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06  8:48 [PATCH-for-6.0] hw/ppc/mac_newworld: Restrict RAM to 2 GiB Philippe Mathieu-Daudé
2021-04-06 10:38 ` BALATON Zoltan
2021-04-07 13:11 ` Mark Cave-Ayland
2021-04-07 13:44   ` Philippe Mathieu-Daudé
2021-04-07 13:44     ` [Bug 1922391] " Philippe Mathieu-Daudé
2021-04-08  2:34     ` David Gibson
2021-04-08  2:33 ` David Gibson
  -- strict thread matches above, loose matches on Subject: below --
2021-04-02 20:48 [Bug 1922391] [NEW] qemu-system-ppc assertion "!mr->container" failed Håvard Eidnes
2021-04-02 21:00 ` [Bug 1922391] " Håvard Eidnes
2021-04-02 21:59 ` Håvard Eidnes
2021-04-05 19:40 ` Håvard Eidnes
2021-04-06  7:39 ` Philippe Mathieu-Daudé
2021-04-06 10:14 ` Philippe Mathieu-Daudé
2021-05-15 10:25 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.