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

[Xen-changelog] [xen-unstable] tools: hvmloader: pass ACPI_PHYSICAL_ADDRESS as a runtime parameter.



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302611823 -3600
# Node ID 060f5397097bb83c35678190e569ca0d3689b82e
# Parent  846f435915a2c71fee6e652f831eebf53a422ffe
tools: hvmloader: pass ACPI_PHYSICAL_ADDRESS as a runtime parameter.

Instead of hardcoding in a header.

Reduces the cross talk between ROMBIOS and hvmloader.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 846f435915a2 -r 060f5397097b tools/firmware/hvmloader/acpi/acpi2_0.h
--- a/tools/firmware/hvmloader/acpi/acpi2_0.h   Tue Apr 12 13:36:17 2011 +0100
+++ b/tools/firmware/hvmloader/acpi/acpi2_0.h   Tue Apr 12 13:37:03 2011 +0100
@@ -382,7 +382,7 @@
 
 #pragma pack ()
 
-void acpi_build_tables(void);
+void acpi_build_tables(unsigned int physical);
 extern uint32_t madt_csum_addr, madt_lapic0_addr;
 
 #endif /* _ACPI_2_0_H_ */
diff -r 846f435915a2 -r 060f5397097b tools/firmware/hvmloader/acpi/build.c
--- a/tools/firmware/hvmloader/acpi/build.c     Tue Apr 12 13:36:17 2011 +0100
+++ b/tools/firmware/hvmloader/acpi/build.c     Tue Apr 12 13:37:03 2011 +0100
@@ -242,7 +242,9 @@
     return align16(offset);
 }
 
-static void __acpi_build_tables(uint8_t *buf, int *low_sz, int *high_sz)
+static void __acpi_build_tables(unsigned int physical,
+                                uint8_t *buf,
+                                int *low_sz, int *high_sz)
 {
     struct acpi_20_rsdp *rsdp;
     struct acpi_20_rsdt *rsdt;
@@ -335,11 +337,11 @@
     /*
      * Fill in low-memory data structures: bios_info_table and RSDP.
      */
-
-    buf = (uint8_t *)ACPI_PHYSICAL_ADDRESS;
+    buf = (uint8_t *)physical;
     offset = 0;
 
     rsdp = (struct acpi_20_rsdp *)&buf[offset];
+
     memcpy(rsdp, &Rsdp, sizeof(struct acpi_20_rsdp));
     offset += align16(sizeof(struct acpi_20_rsdp));
     rsdp->rsdt_address = (unsigned long)rsdt;
@@ -354,24 +356,23 @@
     *low_sz = offset;
 }
 
-void acpi_build_tables(void)
+void acpi_build_tables(unsigned int physical)
 {
     int high_sz, low_sz;
     uint8_t *buf;
 
     /* Find out size of high-memory ACPI data area. */
     buf = (uint8_t *)&_end;
-    __acpi_build_tables(buf, &low_sz, &high_sz);
+    __acpi_build_tables(physical, buf, &low_sz, &high_sz);
     memset(buf, 0, high_sz);
 
     /* Allocate data area and set up ACPI tables there. */
     buf = mem_alloc(high_sz, 0);
-    __acpi_build_tables(buf, &low_sz, &high_sz);
+    __acpi_build_tables(physical, buf, &low_sz, &high_sz);
 
-    printf(" - Lo data: %08lx-%08lx\n"
+    printf(" - Lo data: %08x-%08x\n"
            " - Hi data: %08lx-%08lx\n",
-           (unsigned long)ACPI_PHYSICAL_ADDRESS,
-           (unsigned long)ACPI_PHYSICAL_ADDRESS + low_sz - 1,
+           physical, physical + low_sz - 1,
            (unsigned long)buf, (unsigned long)buf + high_sz - 1);
 }
 
diff -r 846f435915a2 -r 060f5397097b tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Tue Apr 12 13:36:17 2011 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Tue Apr 12 13:37:03 2011 +0100
@@ -652,7 +652,7 @@
         };
 
         printf("Loading ACPI ...\n");
-        acpi_build_tables();
+        acpi_build_tables(ACPI_PHYSICAL_ADDRESS);
         hypercall_hvm_op(HVMOP_set_param, &p);
     }
 

_______________________________________________
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®.