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: 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



reply via email to

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