WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 2 of 2] Add configuration options to selectively

To: Paul Durrant <paul.durrant@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2 of 2] Add configuration options to selectively disable S3 and S4 ACPI power states
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Fri, 18 Nov 2011 10:41:18 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 18 Nov 2011 02:42:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <66bdcb90560f1b996fa3.1321612141@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <patchbomb.1321612139@xxxxxxxxxxxxxxxxxxxxxxxxx> <66bdcb90560f1b996fa3.1321612141@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2011-11-18 at 10:29 +0000, Paul Durrant wrote:
> diff -r d22ef0f60497 -r 66bdcb90560f tools/firmware/hvmloader/hvmloader.c
> --- a/tools/firmware/hvmloader/hvmloader.c      Fri Nov 18 10:28:52 2011 +0000
> +++ b/tools/firmware/hvmloader/hvmloader.c      Fri Nov 18 10:28:53 2011 +0000
> @@ -516,11 +516,17 @@ int main(void)
>              .index = HVM_PARAM_ACPI_IOPORTS_LOCATION,
>              .value = 1,
>          };
> +        int s3_enabled, s4_enabled;
> +
> +        s3_enabled = !strncmp(xenstore_read("platform/acpi_s3", "1"), "1", 
> 1);
> +        s4_enabled = !strncmp(xenstore_read("platform/acpi_s4", "1"), "1", 
> 1);

Is it not possible to do these in the underlying acpi_build_tables and
avoid the need to plumb them right the way through?

>          if ( bios->acpi_build_tables )
>          {
> -            printf("Loading ACPI ...\n");
> -            bios->acpi_build_tables();
> +            printf("Loading ACPI (S3=%s S4=%s) ...\n",
> +                   (s3_enabled) ? "ON" : "OFF",
> +                   (s4_enabled) ? "ON" : "OFF");

If possible this printf could also be pushed down so you can continue to
print the config info.

> +            bios->acpi_build_tables(s3_enabled, s4_enabled);
>          }
> 
>          acpi_enable_sci();

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel