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

[Xen-changelog] [xen master] libxl/arm: Add ACPI module



commit 9ba675c2135f5de9b6a4d55ca3852f75a410befb
Author:     Shannon Zhao <shannon.zhao@xxxxxxxxxx>
AuthorDate: Wed Sep 28 18:18:59 2016 -0700
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri Sep 30 11:47:26 2016 +0100

    libxl/arm: Add ACPI module
    
    Add the ARM Multiboot module for ACPI, so UEFI or DomU can get the base
    address of ACPI tables from it.
    
    Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
    Acked-by: Julien Grall <julien.grall@xxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 docs/misc/arm/device-tree/acpi.txt | 24 ++++++++++++++++++++++++
 tools/libxl/libxl_arm.c            | 24 ++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/docs/misc/arm/device-tree/acpi.txt 
b/docs/misc/arm/device-tree/acpi.txt
new file mode 100644
index 0000000..3e70157
--- /dev/null
+++ b/docs/misc/arm/device-tree/acpi.txt
@@ -0,0 +1,24 @@
+DomU ACPI module
+================================
+
+Xen toolstack passes the domU ACPI tables via a reference in the /chosen node 
of
+the device tree.
+
+Each node contains the following properties:
+
+- compatible
+
+       "xen,guest-acpi", "multiboot,module"
+
+- reg
+
+       Specifies the physical address and the length of the module.
+       RSDP table is always located at the beginning of this region.
+
+Examples
+========
+
+       module@0x20000000 {
+               compatible = "xen,guest-acpi", "multiboot,module";
+               reg = <0x20000000 0x1234>;
+       };
diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 19d3067..376307e 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -285,6 +285,25 @@ static int make_chosen_node(libxl__gc *gc, void *fdt, bool 
ramdisk,
         if (res) return res;
     }
 
+    if (libxl_defbool_val(info->acpi)) {
+        const uint64_t acpi_base = GUEST_ACPI_BASE;
+        const char *name = GCSPRINTF("module@%"PRIx64, acpi_base);
+
+        res = fdt_begin_node(fdt, name);
+        if (res) return res;
+
+        res = fdt_property_compat(gc, fdt, 2, "xen,guest-acpi",
+                                  "multiboot,module");
+        if (res) return res;
+
+        res = fdt_property_regs(gc, fdt, ROOT_ADDRESS_CELLS, ROOT_SIZE_CELLS,
+                                1, 0, 0);
+        if (res) return res;
+
+        res = fdt_end_node(fdt);
+        if (res) return res;
+    }
+
     res = fdt_end_node(fdt);
     if (res) return res;
 
@@ -975,6 +994,11 @@ int libxl__arch_domain_finalise_hw_description(libxl__gc 
*gc,
         finalise_one_node(gc, fdt, "/memory", bankbase[i], size);
     }
 
+    if (dom->acpi_modules[0].data) {
+        finalise_one_node(gc, fdt, "/chosen/module", GUEST_ACPI_BASE,
+                          dom->acpi_modules[0].length);
+    }
+
     debug_dump_fdt(gc, fdt);
 
     return 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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