[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: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 11/20] nubus-device: add romfile property for loading declaration ROMs |
Date: |
Sun, 12 Sep 2021 19:39:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
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).
> + 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
- Re: [PATCH 03/20] nubus-device: add device slot parameter, (continued)
- [PATCH 07/20] nubus: add trace-events for unassigned slot accesses, Mark Cave-Ayland, 2021/09/12
- [PATCH 08/20] nubus: generate bus error when attempting to access empty slots, Mark Cave-Ayland, 2021/09/12
- [PATCH 09/20] macfb: don't register declaration ROM, Mark Cave-Ayland, 2021/09/12
- [PATCH 10/20] nubus-device: remove nubus_register_rom() and nubus_register_format_block(), Mark Cave-Ayland, 2021/09/12
- [PATCH 11/20] nubus-device: add romfile property for loading declaration ROMs, Mark Cave-Ayland, 2021/09/12
- Re: [PATCH 11/20] nubus-device: add romfile property for loading declaration ROMs,
Philippe Mathieu-Daudé <=
- [PATCH 13/20] nubus-bridge: introduce separate NubusBridge structure, Mark Cave-Ayland, 2021/09/12
- [PATCH 12/20] nubus: move nubus to its own 32-bit address space, Mark Cave-Ayland, 2021/09/12
- [PATCH 15/20] nubus: move NubusBus from mac-nubus-bridge to nubus-bridge, Mark Cave-Ayland, 2021/09/12
- [PATCH 16/20] nubus-bridge: embed the NubusBus object directly within nubus-bridge, Mark Cave-Ayland, 2021/09/12