qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 0/4] target/ppc: Catch invalid real address accesses


From: Cédric Le Goater
Subject: Re: [PATCH 0/4] target/ppc: Catch invalid real address accesses
Date: Tue, 27 Jun 2023 14:03:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

Mac OS 9.2 fails to boot with a popup saying :
         Sorry, a system error occured.
         "Sound Manager"
           address error
         To temporarily turn off extensions, restart and
         hold down the shift key


Darwin and Mac OSX look OK.

My guess would be that MacOS 9.2 is trying to access the sound chip registers 
which isn't implemented in QEMU for the moment (I have a separate screamer 
branch available, but it's not ready for primetime yet). In theory they 
shouldn't be accessed at all because the sound device isn't present in the 
OpenBIOS device tree, but this is all fairly old stuff.

Does implementing the sound registers using a dummy device help at all?

Nope. OS 9 loops earlier (little black/white disk spinning).

Thanks,

C.





diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 265c0bbd8d..e55f938da7 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -26,6 +26,7 @@
  #include "qemu/osdep.h"
  #include "qapi/error.h"
  #include "qemu/module.h"
+#include "hw/misc/unimp.h"
  #include "hw/misc/macio/cuda.h"
  #include "hw/pci/pci.h"
  #include "hw/ppc/mac_dbdma.h"
@@ -94,6 +95,7 @@ static bool macio_common_realize(PCIDevice *d, Error **errp)
  {
      MacIOState *s = MACIO(d);
      SysBusDevice *sbd;
+    DeviceState *dev;

      if (!qdev_realize(DEVICE(&s->dbdma), BUS(&s->macio_bus), errp)) {
          return false;
@@ -102,6 +104,14 @@ static bool macio_common_realize(PCIDevice *d, Error 
**errp)
      memory_region_add_subregion(&s->bar, 0x08000,
                                  sysbus_mmio_get_region(sbd, 0));

+    dev = qdev_new(TYPE_UNIMPLEMENTED_DEVICE);
+    qdev_prop_set_string(dev, "name", "screamer");
+    qdev_prop_set_uint64(dev, "size", 0x1000);
+    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
+    sbd = SYS_BUS_DEVICE(dev);
+    memory_region_add_subregion(&s->bar, 0x14000,
+                                sysbus_mmio_get_region(sbd, 0));
+
      qdev_prop_set_uint32(DEVICE(&s->escc), "disabled", 0);
      qdev_prop_set_uint32(DEVICE(&s->escc), "frequency", ESCC_CLOCK);
      qdev_prop_set_uint32(DEVICE(&s->escc), "it_shift", 4);
diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h
index 86df2c2b60..1894178a68 100644
--- a/include/hw/misc/macio/macio.h
+++ b/include/hw/misc/macio/macio.h
@@ -109,6 +109,7 @@ struct MacIOState {
      PMUState pmu;
      DBDMAState dbdma;
      ESCCState escc;
+    MemoryRegion screamer;
      uint64_t frequency;
  };



ATB,

Mark.




reply via email to

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