On Fri, Feb 07, 2014 at 01:51:34PM +0100, Igor Mammedov wrote:
> Signed-off-by: Igor Mammedov <imamm...@redhat.com>
> ---
>  hw/i386/acpi-build.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index ce5f715..5cd0c80 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -70,6 +70,8 @@ typedef struct AcpiPmInfo {
>      uint32_t gpe0_blk;
>      uint32_t gpe0_blk_len;
>      uint32_t io_base;
> +    uint16_t cpuhp_io_base;
> +    uint16_t cpuhp_io_len;
>  } AcpiPmInfo;
>  
>  typedef struct AcpiMiscInfo {
> @@ -141,11 +143,14 @@ static void acpi_get_pm_info(AcpiPmInfo *pm)
>      Object *obj = NULL;
>      QObject *o;
>  
> +    pm->cpuhp_io_len = ACPI_GPE_PROC_LEN;
>      if (piix) {
>          obj = piix;
> +        pm->cpuhp_io_base = PIIX4_CPU_HOTPLUG_IO_BASE;
>      }
>      if (lpc) {
>          obj = lpc;
> +        pm->cpuhp_io_base = ICH9_CPU_HOTPLUG_IO_BASE;
>      }
>      assert(obj);
>  

Not a must but would be nicer to get these as
device properties.

If we change this, cpuhp_io_len can be used directly ...


> @@ -1145,6 +1150,11 @@ build_ssdt(GArray *table_data, GArray *linker,
>                              pm->gpe0_blk,      /* _MAX */
>                              0x0,               /* _ALN */
>                              pm->gpe0_blk_len); /* _LEN */
> +                    ACPI_IO(RESBUF, Decode16,
> +                            pm->cpuhp_io_base, /* _MIN */
> +                            pm->cpuhp_io_base, /* _MAX */
> +                            0x0,               /* _ALN */
> +                            pm->cpuhp_io_len); /* _LEN */
>                  );
>              );
>          );
> -- 
> 1.7.1

Reply via email to