|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/2] xen/x86/pvh: use preset XSDT header for XSDT generation
From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
Xen always generates a XSDT table even if the firmware provided a RSDT
table. Instead of copying the XSDT header from the firmware table (that
might be missing), generate the XSDT header from a preset.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
---
xen/arch/x86/hvm/dom0_build.c | 32 +++++++++-----------------------
1 file changed, 9 insertions(+), 23 deletions(-)
diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index 307edc6a8c..5fde769863 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -963,13 +963,18 @@ static int __init pvh_setup_acpi_xsdt(struct domain *d,
paddr_t madt_addr,
paddr_t *addr)
{
struct acpi_table_xsdt *xsdt;
- struct acpi_table_header *table;
- struct acpi_table_rsdp *rsdp;
const struct acpi_table_desc *tables = acpi_gbl_root_table_list.tables;
unsigned long size = sizeof(*xsdt);
unsigned int i, j, num_tables = 0;
- paddr_t xsdt_paddr;
int rc;
+ struct acpi_table_header header = {
+ .signature = "XSDT",
+ .length = sizeof(struct acpi_table_header),
+ .revision = 0x1,
+ .oem_id = "Xen",
+ .oem_table_id = "HVM",
+ .oem_revision = 0,
+ };
/*
* Restore original DMAR table signature, we are going to filter it from
@@ -1001,26 +1006,7 @@ static int __init pvh_setup_acpi_xsdt(struct domain *d,
paddr_t madt_addr,
goto out;
}
- /* Copy the native XSDT table header. */
- rsdp = acpi_os_map_memory(acpi_os_get_root_pointer(), sizeof(*rsdp));
- if ( !rsdp )
- {
- printk("Unable to map RSDP\n");
- rc = -EINVAL;
- goto out;
- }
- xsdt_paddr = rsdp->xsdt_physical_address;
- acpi_os_unmap_memory(rsdp, sizeof(*rsdp));
- table = acpi_os_map_memory(xsdt_paddr, sizeof(*table));
- if ( !table )
- {
- printk("Unable to map XSDT\n");
- rc = -EINVAL;
- goto out;
- }
- xsdt->header = *table;
- acpi_os_unmap_memory(table, sizeof(*table));
-
+ xsdt->header = header;
/* Add the custom MADT. */
xsdt->table_offset_entry[0] = madt_addr;
--
2.25.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |