|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v8 10/21] arm/acpi: Map all other tables for Dom0
From: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
Map all other ACPI tables into Dom0 using 1:1 mappings.
Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
Reviewed-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Julien Grall <julien.grall@xxxxxxx>
---
xen/arch/arm/domain_build.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index e025be8..71fbcf6 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1357,6 +1357,30 @@ static int prepare_dtb(struct domain *d, struct
kernel_info *kinfo)
}
#ifdef CONFIG_ACPI
+static void acpi_map_other_tables(struct domain *d)
+{
+ int i;
+ unsigned long res;
+ u64 addr, size;
+
+ /* Map all ACPI tables to Dom0 using 1:1 mappings. */
+ for( i = 0; i < acpi_gbl_root_table_list.count; i++ )
+ {
+ addr = acpi_gbl_root_table_list.tables[i].address;
+ size = acpi_gbl_root_table_list.tables[i].length;
+ res = map_regions_rw_cache(d,
+ paddr_to_pfn(addr & PAGE_MASK),
+ DIV_ROUND_UP(size, PAGE_SIZE),
+ paddr_to_pfn(addr & PAGE_MASK));
+ if ( res )
+ {
+ panic(XENLOG_ERR "Unable to map ACPI region 0x%"PRIx64
+ " - 0x%"PRIx64" in domain \n",
+ addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1);
+ }
+ }
+}
+
static int acpi_create_rsdp(struct domain *d, struct membank tbl_add[])
{
@@ -1695,6 +1719,8 @@ static int prepare_acpi(struct domain *d, struct
kernel_info *kinfo)
if ( rc != 0 )
return rc;
+ acpi_map_other_tables(d);
+
return 0;
}
#else
--
2.0.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |