[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] hvmloader: Add the WAET since Microsoft are demanding it for Windows 8



# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1318612285 -3600
# Node ID 6880bfc48504db31e2680de01bfadf4db3b0b7a0
# Parent  99c7bd17846bb46fb1b3e1292d62bf4ff5e055d8
hvmloader: Add the WAET since Microsoft are demanding it for Windows 8

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 99c7bd17846b -r 6880bfc48504 tools/firmware/hvmloader/acpi/acpi2_0.h
--- a/tools/firmware/hvmloader/acpi/acpi2_0.h   Fri Oct 14 18:10:46 2011 +0100
+++ b/tools/firmware/hvmloader/acpi/acpi2_0.h   Fri Oct 14 18:11:25 2011 +0100
@@ -297,6 +297,14 @@
 #define ACPI_HPET_ADDRESS 0xFED00000UL
 
 /*
+ * WAET Description Table
+ */
+struct acpi_20_waet {
+    struct acpi_header header;
+    uint32_t           flags;
+};
+
+/*
  * Multiple APIC Flags.
  */
 #define ACPI_PCAT_COMPAT (1 << 0)
@@ -366,6 +374,7 @@
 #define ACPI_2_0_XSDT_SIGNATURE ASCII32('X','S','D','T')
 #define ACPI_2_0_TCPA_SIGNATURE ASCII32('T','C','P','A')
 #define ACPI_2_0_HPET_SIGNATURE ASCII32('H','P','E','T')
+#define ACPI_2_0_WAET_SIGNATURE ASCII32('W','A','E','T')
 
 /*
  * Table revision numbers.
@@ -377,6 +386,7 @@
 #define ACPI_2_0_XSDT_REVISION 0x01
 #define ACPI_2_0_TCPA_REVISION 0x02
 #define ACPI_2_0_HPET_REVISION 0x01
+#define ACPI_2_0_WAET_REVISION 0x01
 #define ACPI_1_0_FADT_REVISION 0x01
 
 #pragma pack ()
diff -r 99c7bd17846b -r 6880bfc48504 tools/firmware/hvmloader/acpi/build.c
--- a/tools/firmware/hvmloader/acpi/build.c     Fri Oct 14 18:10:46 2011 +0100
+++ b/tools/firmware/hvmloader/acpi/build.c     Fri Oct 14 18:11:25 2011 +0100
@@ -30,6 +30,7 @@
 extern struct acpi_20_xsdt Xsdt;
 extern struct acpi_20_fadt Fadt;
 extern struct acpi_20_facs Facs;
+extern struct acpi_20_waet Waet;
 
 /*
  * Located at ACPI_INFO_PHYSICAL_ADDRESS.
@@ -190,12 +191,28 @@
     return hpet;
 }
 
+static struct acpi_20_waet *construct_waet(void)
+{
+    struct acpi_20_waet *waet;
+
+    waet = mem_alloc(sizeof(*waet), 16);
+    if (!waet) return NULL;
+
+    memcpy(waet, &Waet, sizeof(*waet));
+
+    waet->header.length = sizeof(*waet);
+    set_checksum(waet, offsetof(struct acpi_header, checksum), sizeof(*waet));
+
+    return waet;
+}
+
 static int construct_secondary_tables(unsigned long *table_ptrs,
                                       struct acpi_info *info)
 {
     int nr_tables = 0;
     struct acpi_20_madt *madt;
     struct acpi_20_hpet *hpet;
+    struct acpi_20_waet *waet;
     struct acpi_20_tcpa *tcpa;
     unsigned char *ssdt;
     static const uint16_t tis_signature[] = {0x0001, 0x0001, 0x0001};
@@ -216,6 +233,11 @@
     if (!hpet) return -1;
     table_ptrs[nr_tables++] = (unsigned long)hpet;
 
+    /* WAET. */
+    waet = construct_waet();
+    if (!waet) return -1;
+    table_ptrs[nr_tables++] = (unsigned long)waet;
+
     if ( battery_port_exists() )
     {
         ssdt = mem_alloc(sizeof(ssdt_pm), 16);
diff -r 99c7bd17846b -r 6880bfc48504 
tools/firmware/hvmloader/acpi/static_tables.c
--- a/tools/firmware/hvmloader/acpi/static_tables.c     Fri Oct 14 18:10:46 
2011 +0100
+++ b/tools/firmware/hvmloader/acpi/static_tables.c     Fri Oct 14 18:11:25 
2011 +0100
@@ -136,6 +136,26 @@
     .length    = sizeof(struct acpi_20_rsdp)
 };
 
+#define ACPI_WAET_RTC_GOOD      0x00000001
+#define ACPI_WAET_PM_TIMER_GOOD 0x00000002
+
+#define ACPI_WAET_FLAGS (ACPI_WAET_RTC_GOOD | \
+                         ACPI_WAET_PM_TIMER_GOOD)
+
+struct acpi_20_waet Waet = {
+    .header = {
+        .signature    = ACPI_2_0_WAET_SIGNATURE,
+        .length       = sizeof(struct acpi_20_waet),
+        .revision     = ACPI_2_0_WAET_REVISION,
+        .oem_id       = ACPI_OEM_ID, 
+        .oem_table_id = ACPI_OEM_TABLE_ID,
+        .oem_revision = ACPI_OEM_REVISION,
+        .creator_id   = ACPI_CREATOR_ID,
+        .creator_revision = ACPI_CREATOR_REVISION
+    },
+    .flags = ACPI_WAET_FLAGS
+};
+
 /*
  * Local variables:
  * mode: C

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.