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

[Xen-devel] [PATCH RFC 10/20] acpi/hvmloader: Provide address of acpi_info as an argument to ACPI code



Some users of ACPI builder may be building tables in virtual address space.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
---
 tools/firmware/hvmloader/acpi/acpi2_0.h | 4 ++++
 tools/firmware/hvmloader/acpi/build.c   | 3 +--
 tools/firmware/hvmloader/config.h       | 3 +--
 tools/firmware/hvmloader/util.c         | 1 +
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tools/firmware/hvmloader/acpi/acpi2_0.h 
b/tools/firmware/hvmloader/acpi/acpi2_0.h
index cf707b8..0bfd3ed 100644
--- a/tools/firmware/hvmloader/acpi/acpi2_0.h
+++ b/tools/firmware/hvmloader/acpi/acpi2_0.h
@@ -306,6 +306,9 @@ struct acpi_20_waet {
 
 #define ACPI_TIS_HDR_ADDRESS 0xFED40F00UL
 
+/* NB. ACPI_INFO_PHYSICAL_ADDRESS *MUST* match definition in acpi/dsdt.asl! */
+#define ACPI_INFO_PHYSICAL_ADDRESS    0xFC000000UL
+
 /*
  * Multiple APIC Flags.
  */
@@ -504,6 +507,7 @@ struct acpi_config {
     int apic_mode;
     struct acpi_numa numa;
     uint16_t *tis_hdr;
+    void *acpi_info_page;
 };
 
 void acpi_build_tables(struct acpi_config *config, unsigned int physical);
diff --git a/tools/firmware/hvmloader/acpi/build.c 
b/tools/firmware/hvmloader/acpi/build.c
index 2bf89e4..991a73f 100644
--- a/tools/firmware/hvmloader/acpi/build.c
+++ b/tools/firmware/hvmloader/acpi/build.c
@@ -589,8 +589,7 @@ void acpi_build_tables(struct acpi_config *config, unsigned 
int physical)
     if ( !new_vm_gid(config) )
         goto oom;
 
-    memcpy((struct acpi_info *)ACPI_INFO_PHYSICAL_ADDRESS,
-           &config->acpi_info,
+    memcpy(config->acpi_info_page, &config->acpi_info,
            sizeof(config->acpi_info));
 
     return;
diff --git a/tools/firmware/hvmloader/config.h 
b/tools/firmware/hvmloader/config.h
index b838cf9..6253155 100644
--- a/tools/firmware/hvmloader/config.h
+++ b/tools/firmware/hvmloader/config.h
@@ -65,8 +65,7 @@ extern uint64_t pci_hi_mem_start, pci_hi_mem_end;
 #define HVMLOADER_PHYSICAL_ADDRESS    0x00100000
 /* Special BIOS mappings, etc. are allocated from here upwards... */
 #define RESERVED_MEMBASE              0xFC000000
-/* NB. ACPI_INFO_PHYSICAL_ADDRESS *MUST* match definition in acpi/dsdt.asl! */
-#define ACPI_INFO_PHYSICAL_ADDRESS    0xFC000000
+
 #define RESERVED_MEMORY_DYNAMIC_START 0xFC001000
 #define RESERVED_MEMORY_DYNAMIC_END   0xFE000000
 /*
diff --git a/tools/firmware/hvmloader/util.c b/tools/firmware/hvmloader/util.c
index c2145f6..d099adb 100644
--- a/tools/firmware/hvmloader/util.c
+++ b/tools/firmware/hvmloader/util.c
@@ -925,6 +925,7 @@ void hvmloader_acpi_build_tables(struct acpi_config *config,
     config->numa.vmemrange = vmemrange;
 
     config->tis_hdr = (uint16_t *)ACPI_TIS_HDR_ADDRESS;
+    config->acpi_info_page = (void *)ACPI_INFO_PHYSICAL_ADDRESS;
 
     acpi_build_tables(config, physical);
 
-- 
2.4.3


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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