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 1/2] firmware, Change ACPI IO values to match QEM

To: <anthony.perard@xxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1/2] firmware, Change ACPI IO values to match QEMU BIOS.
From: Keir Fraser <keir@xxxxxxx>
Date: Tue, 09 Nov 2010 15:52:20 +0000
Cc:
Delivery-date: Tue, 09 Nov 2010 07:53:24 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=OSA8B45EkJv/qnqsgs4/yLWsxsPWav5ejPo8erjfSFU=; b=ir+1MAJSFWCrqtjMK4U32vIAeBeW0I4rcwa9ycMad+GltE6qwDxv8SozCWz986rsP7 gLdZSde0E388tfs3xzabOUXelIvhPz1W0V5zmIW/xk+pO8yeyzPRtFfbJwxDVXjbz41I uAngCVMz0XUsDnRPFzfh7Bu6NEWJKvphU74Y8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=o2JmUbv84Qz0E6YCkiyCbPQPIDurvnCHdR9tbR+TqydbCWHewdQnFeUleRPNx1LC9u exmzCDXxCtB+Nd0ZZm7bda31Ct//QhPqpCck3+8p14nA8TzK/ULj8mZJTalEihiArtzW ezThSeAMDPp5rI5JIvW3JEe6MQeWBF7bsMnQE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1289316850-20747-1-git-send-email-anthony.perard@xxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuAJhdoxmMLsamWuUKbqo2mhs6PAw==
Thread-topic: [Xen-devel] [PATCH 1/2] firmware, Change ACPI IO values to match QEMU BIOS.
User-agent: Microsoft-Entourage/12.27.0.100910
Looks okay. This can be checked in at the same time as the qemu patch, plus
QEMU_TAG update.

Acked-by: Keir Fraser <keir@xxxxxxx>

 -- Keir

On 09/11/2010 15:34, "anthony.perard@xxxxxxxxxx" <anthony.perard@xxxxxxxxxx>
wrote:

> From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> 
> As part of the QEMU/Xen merge, this patch comes to change the value of
> sleep states and add some information in the PCI registers to match the
> implementation of the BIOS of QEMU.
> 
> It also does a hypercall (HVM_PARAM_ACPI_IOPORTS_LOCATION) that tell the
> Xen to use the new Port I/O instead of the old one.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
>  tools/firmware/hvmloader/acpi/dsdt.asl |   12 ++++++------
>  tools/firmware/hvmloader/hvmloader.c   |   11 +++++++++++
>  2 files changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/firmware/hvmloader/acpi/dsdt.asl
> b/tools/firmware/hvmloader/acpi/dsdt.asl
> index 03799d3..ea8e324 100644
> --- a/tools/firmware/hvmloader/acpi/dsdt.asl
> +++ b/tools/firmware/hvmloader/acpi/dsdt.asl
> @@ -33,22 +33,22 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "Xen", "HVM", 0)
>       */
>      Name (\_S3, Package (0x04)
>      {
> -        0x05,  /* PM1a_CNT.SLP_TYP */
> -        0x05,  /* PM1b_CNT.SLP_TYP */
> +        0x01,  /* PM1a_CNT.SLP_TYP */
> +        0x01,  /* PM1b_CNT.SLP_TYP */
>          0x0,   /* reserved */
>          0x0    /* reserved */
>      })
>      Name (\_S4, Package (0x04)
>      {
> -        0x06,  /* PM1a_CNT.SLP_TYP */
> -        0x06,  /* PM1b_CNT.SLP_TYP */
> +        0x00,  /* PM1a_CNT.SLP_TYP */
> +        0x00,  /* PM1b_CNT.SLP_TYP */
>          0x00,  /* reserved */
>          0x00   /* reserved */
>      })
>      Name (\_S5, Package (0x04)
>      {
> -        0x07,  /* PM1a_CNT.SLP_TYP */
> -        0x07,  /* PM1b_CNT.SLP_TYP */
> +        0x00,  /* PM1a_CNT.SLP_TYP */
> +        0x00,  /* PM1b_CNT.SLP_TYP */
>          0x00,  /* reserved */
>          0x00   /* reserved */
>      })
> diff --git a/tools/firmware/hvmloader/hvmloader.c
> b/tools/firmware/hvmloader/hvmloader.c
> index c4c5ddc..bf23f80 100644
> --- a/tools/firmware/hvmloader/hvmloader.c
> +++ b/tools/firmware/hvmloader/hvmloader.c
> @@ -31,6 +31,7 @@
>  #include "option_rom.h"
>  #include <xen/version.h>
>  #include <xen/hvm/params.h>
> +#include <xen/hvm/ioreq.h>
>  #include <xen/memory.h>
>  
>  asm (
> @@ -222,9 +223,12 @@ static void pci_setup(void)
>              /* PIIX4 ACPI PM. Special device with special PCI config space.
> */
>              ASSERT((vendor_id == 0x8086) && (device_id == 0x7113));
>              pci_writew(devfn, 0x20, 0x0000); /* No smb bus IO enable */
> +            pci_writew(devfn, 0xd2, 0x0000); /* No smb bus IO enable */
>              pci_writew(devfn, 0x22, 0x0000);
>              pci_writew(devfn, 0x3c, 0x0009); /* Hardcoded IRQ9 */
>              pci_writew(devfn, 0x3d, 0x0001);
> +            pci_writel(devfn, 0x40, ACPI_PM1A_EVT_BLK_ADDRESS | 1);
> +            pci_writeb(devfn, 0x80, 0x01); /* enable PM io space */
>              break;
>          case 0x0101:
>              if ( vendor_id == 0x8086 )
> @@ -759,8 +763,15 @@ int main(void)
>  
>      if ( hvm_info->acpi_enabled )
>      {
> +        struct xen_hvm_param p = {
> +            .domid = DOMID_SELF,
> +            .index = HVM_PARAM_ACPI_IOPORTS_LOCATION,
> +            .value = 1,
> +        };
> +
>          printf("Loading ACPI ...\n");
>          acpi_build_tables();
> +        hypercall_hvm_op(HVMOP_set_param, &p);
>      }
>  
>      init_vm86_tss();



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