qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 11/20] nubus-device: add romfile property for loading declara


From: Mark Cave-Ayland
Subject: Re: [PATCH 11/20] nubus-device: add romfile property for loading declaration ROMs
Date: Wed, 15 Sep 2021 09:16:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

On 14/09/2021 21:23, Mark Cave-Ayland wrote:

On 12/09/2021 18:39, Philippe Mathieu-Daudé wrote:

On 9/12/21 9:49 AM, Mark Cave-Ayland wrote:
The declaration ROM is located at the top-most address of the standard slot
space.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
  hw/nubus/nubus-device.c  | 43 +++++++++++++++++++++++++++++++++++++++-
  include/hw/nubus/nubus.h |  5 +++++
  2 files changed, 47 insertions(+), 1 deletion(-)

+    /* Declaration ROM */

+        } else if (size > NUBUS_DECL_ROM_MAX_SIZE) {

I'd check for >= and define as (64 * KiB).

That's a good idea - I'll update this for the v2.

And in fact it looks like it is possible to embed multi-function MacOS drivers in the declaration ROM so I'll keep the > and increase the maximum size to 128K which should give plenty of breathing space for binary drivers.

+            error_setg(errp, "romfile \"%s\" too large (maximum size 64K)",
+                       nd->romfile);
+            g_free(path);
+            return;
+        }

diff --git a/include/hw/nubus/nubus.h b/include/hw/nubus/nubus.h
index 87a97516c7..42f4c9dbb8 100644
--- a/include/hw/nubus/nubus.h
+++ b/include/hw/nubus/nubus.h
@@ -39,12 +39,17 @@ struct NubusBus {
      uint32_t slot_available_mask;
  };
+#define NUBUS_DECL_ROM_MAX_SIZE    0xffff


ATB,

Mark.



reply via email to

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