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

[Xen-changelog] [xen-unstable] hvmloader: Enable SCI in QEMU has it disa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvmloader: Enable SCI in QEMU has it disabled.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 05 Aug 2011 05:55:10 +0100
Delivery-date: Thu, 04 Aug 2011 21:55:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1311864054 -3600
# Node ID 0f36c2eec2e1576b4db6538b5f22d625587c1a15
# Parent  ba78ea7784c9eaed396cfe6c04fb8e62c9dd8407
hvmloader: Enable SCI in QEMU has it disabled.

When booting a Windows guest, the OS report an issue with the ACPI (in
a BSOD). The exact issue is "SCI_EN never becomes set in PM1 Control
Register." (quoted from WinDbg help).

So this patch enables the flags SCI_EN if it is not yet enabled.

Reported-by: Tobias Geiger <tobias.geiger@xxxxxxxxx>
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r ba78ea7784c9 -r 0f36c2eec2e1 tools/firmware/hvmloader/acpi/acpi2_0.h
--- a/tools/firmware/hvmloader/acpi/acpi2_0.h   Thu Jul 28 13:45:09 2011 +0100
+++ b/tools/firmware/hvmloader/acpi/acpi2_0.h   Thu Jul 28 15:40:54 2011 +0100
@@ -20,6 +20,7 @@
 
 #include <stdint.h>
 #include <xen/xen.h>
+#include <xen/hvm/ioreq.h>
 
 #define ASCII32(a,b,c,d)         \
     (((a) <<  0) | ((b) <<  8) | ((c) << 16) | ((d) << 24))
@@ -252,6 +253,9 @@
 #define ACPI_CPU_SW_SLP     (1 << 13)
 #define ACPI_USE_PLATFORM_CLOCK (1 << 15)
 
+/* PM1 Control Register Bits */
+#define ACPI_PM1C_SCI_EN    (1 << 0)
+
 /*
  * Firmware ACPI Control Structure (FACS).
  */
diff -r ba78ea7784c9 -r 0f36c2eec2e1 
tools/firmware/hvmloader/acpi/static_tables.c
--- a/tools/firmware/hvmloader/acpi/static_tables.c     Thu Jul 28 13:45:09 
2011 +0100
+++ b/tools/firmware/hvmloader/acpi/static_tables.c     Thu Jul 28 15:40:54 
2011 +0100
@@ -18,7 +18,6 @@
 
 #include "acpi2_0.h"
 #include "../config.h"
-#include <xen/hvm/ioreq.h>
 
 /*
  * Firmware ACPI Control Structure (FACS).
diff -r ba78ea7784c9 -r 0f36c2eec2e1 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Thu Jul 28 13:45:09 2011 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Thu Jul 28 15:40:54 2011 +0100
@@ -26,6 +26,7 @@
 #include "pci_regs.h"
 #include "option_rom.h"
 #include "apic_regs.h"
+#include "acpi/acpi2_0.h"
 #include <xen/version.h>
 #include <xen/hvm/params.h>
 
@@ -379,6 +380,25 @@
     return NULL;
 }
 
+static void acpi_enable_sci(void)
+{
+    uint8_t pm1a_cnt_val;
+
+#define PIIX4_SMI_CMD_IOPORT 0xb2
+#define PIIX4_ACPI_ENABLE    0xf1
+
+    /*
+     * PIIX4 emulation in QEMU has SCI_EN=0 by default. We have no legacy
+     * SMM implementation, so give ACPI control to the OSPM immediately.
+     */
+    pm1a_cnt_val = inb(ACPI_PM1A_CNT_BLK_ADDRESS_V1);
+    if ( !(pm1a_cnt_val & ACPI_PM1C_SCI_EN) )
+        outb(PIIX4_SMI_CMD_IOPORT, PIIX4_ACPI_ENABLE);
+
+    pm1a_cnt_val = inb(ACPI_PM1A_CNT_BLK_ADDRESS_V1);
+    BUG_ON(!(pm1a_cnt_val & ACPI_PM1C_SCI_EN));
+}
+
 int main(void)
 {
     const struct bios_config *bios;
@@ -481,6 +501,8 @@
             bios->acpi_build_tables();
         }
 
+        acpi_enable_sci();
+
         hypercall_hvm_op(HVMOP_set_param, &p);
     }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hvmloader: Enable SCI in QEMU has it disabled., Xen patchbot-unstable <=