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-ayl...@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). > + 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