hvmloader: don't clear acpi_info after filling in some fields
authorIan Campbell <ian.campbell@citrix.com>
Tue, 13 Sep 2011 09:22:03 +0000 (10:22 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 13 Sep 2011 09:22:03 +0000 (10:22 +0100)
In particular the madt_lapic0_addr and madt_csum_addr fields are
filled in while building the tables.

This fixes a bluescreen on shutdown with certain versions of Windows.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reported-by: Christoph Egger <Christoph.Egger@amd.com>
Tested-and-acked-by: Christoph Egger <Christoph.Egger@amd.com>
tools/firmware/hvmloader/acpi/build.c

index 5e3198420bf7ed92525977ee4d626c01658570f3..e6c2556633d9810b5e795da124313a835e43f2ae 100644 (file)
@@ -277,6 +277,8 @@ void acpi_build_tables(unsigned int physical)
     unsigned long        secondary_tables[16];
     int                  nr_secondaries, i;
 
+    memset(acpi_info, 0, sizeof(*acpi_info));
+
     /*
      * Fill in high-memory data structures, starting at @buf.
      */
@@ -375,7 +377,6 @@ void acpi_build_tables(unsigned int physical)
                  offsetof(struct acpi_20_rsdp, extended_checksum),
                  sizeof(struct acpi_20_rsdp));
 
-    memset(acpi_info, 0, sizeof(*acpi_info));
     acpi_info->com1_present = uart_exists(0x3f8);
     acpi_info->com2_present = uart_exists(0x2f8);
     acpi_info->lpt1_present = lpt_exists(0x378);