[SeaBIOS] [PATCH 2/3] Allow bios to detect if qemu has cpus status map for acpi hotplug.

Kevin O'Connor kevin at koconnor.net
Tue Mar 13 00:54:13 CET 2012


On Sat, Mar 10, 2012 at 12:47:27PM +0100, Igor Mammedov wrote:
> 
> Signed-off-by: Igor Mammedov <imammedo at redhat.com>
> ---
>  src/paravirt.c |   12 ++++++++++++
>  src/paravirt.h |    2 ++
>  2 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/src/paravirt.c b/src/paravirt.c
> index 9cf77de..c2bd0a8 100644
> --- a/src/paravirt.c
> +++ b/src/paravirt.c
> @@ -305,6 +305,18 @@ u16 qemu_cfg_get_max_cpus(void)
>      return cnt;
>  }
>  
> +u16 qemu_cfg_have_acpi_cpus_map(void)
> +{
> +    u16 cnt;
> +
> +    if (!qemu_cfg_present)
> +        return 0;
> +
> +    qemu_cfg_read_entry(&cnt, QEMU_CFG_HAVE_ACPI_CPUS_MAP, sizeof(cnt));
> +
> +    return cnt;
> +}

Please use the "file" interface for passing new variables into
seabios.  This enables the seabios code to look something like:

romfile_loadint("etc/have_acpi_map", 0);

with no need to write per-file handlers.

-Kevin



More information about the SeaBIOS mailing list