diff mbox

[Xen-devel,RESEND,12/14] libxl/arm: Add ACPI module

Message ID 1464670986-10256-13-git-send-email-zhaoshenglong@huawei.com
State New
Headers show

Commit Message

Shannon Zhao May 31, 2016, 5:03 a.m. UTC
From: Shannon Zhao <shannon.zhao@linaro.org>

Add the ARM Multiboot module for ACPI, so UEFI can get the base address
of ACPI tables from it.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
 tools/libxl/libxl_arm.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Julien Grall June 7, 2016, 1:47 p.m. UTC | #1
Hello Shannon,

On 31/05/16 06:03, Shannon Zhao wrote:
> From: Shannon Zhao <shannon.zhao@linaro.org>
>
> Add the ARM Multiboot module for ACPI, so UEFI can get the base address
> of ACPI tables from it.

This new binding/compatible needs to be formalized in 
docs/misc/arm/device-tree.

>
> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
>   tools/libxl/libxl_arm.c | 20 ++++++++++++++++++++
>   1 file changed, 20 insertions(+)
>
> diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
> index 13259f8..e7cb578 100644
> --- a/tools/libxl/libxl_arm.c
> +++ b/tools/libxl/libxl_arm.c
> @@ -285,6 +285,26 @@ static int make_chosen_node(libxl__gc *gc, void *fdt, bool ramdisk,
>           if (res) return res;
>       }
>
> +    res = fdt_begin_node(fdt, "modules");
> +    if (res) return res;
> +
> +    res = fdt_begin_node(fdt, "module@0");
> +    if (res) return res;
> +
> +    res = fdt_property_compat(gc, fdt, 2, "xen,linux-acpi",

The ACPI blob is not Linux specific. What about "xen,guest-acpi"?

> +                              "xen,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;
> +
>       res = fdt_end_node(fdt);
>       if (res) return res;
>
>

Regards,
diff mbox

Patch

diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 13259f8..e7cb578 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -285,6 +285,26 @@  static int make_chosen_node(libxl__gc *gc, void *fdt, bool ramdisk,
         if (res) return res;
     }
 
+    res = fdt_begin_node(fdt, "modules");
+    if (res) return res;
+
+    res = fdt_begin_node(fdt, "module@0");
+    if (res) return res;
+
+    res = fdt_property_compat(gc, fdt, 2, "xen,linux-acpi",
+                              "xen,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;
+
     res = fdt_end_node(fdt);
     if (res) return res;