[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH 4/5] hvmloader: Load ACPI table from here libxc left it.
--- tools/firmware/hvmloader/config.h | 2 +- tools/firmware/hvmloader/hvmloader.c | 9 ++++++++- tools/firmware/hvmloader/seabios.c | 9 +++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/firmware/hvmloader/config.h b/tools/firmware/hvmloader/config.h index 0ddd897..1df5fd9 100644 --- a/tools/firmware/hvmloader/config.h +++ b/tools/firmware/hvmloader/config.h @@ -22,7 +22,7 @@ struct bios_config { void (*e820_setup)(void); - void (*acpi_build_tables)(void); + void (*acpi_build_tables)(void* addr, uint32_t size); void (*create_mp_tables)(void); void (*create_smbios_tables)(void); void (*create_pir_tables)(void); diff --git a/tools/firmware/hvmloader/hvmloader.c b/tools/firmware/hvmloader/hvmloader.c index 04b5076..5b7ae7f 100644 --- a/tools/firmware/hvmloader/hvmloader.c +++ b/tools/firmware/hvmloader/hvmloader.c @@ -317,8 +317,15 @@ int main(void) if ( bios->acpi_build_tables ) { + uint8_t *acpi_table_addr; + uint32_t acpi_table_lenght; printf("Loading ACPI ...\n"); - bios->acpi_build_tables(); + // XXX check that the values exist and are correct + s = xenstore_read("hvmloader/acpi_table/address", NULL); + acpi_table_addr = (uint8_t*)(uint32_t)strtoll(s, NULL, 0); + s = xenstore_read("hvmloader/acpi_table/length", NULL); + acpi_table_lenght = (uint32_t)strtoll(s, NULL, 0); + bios->acpi_build_tables(acpi_table_addr, acpi_table_lenght); } acpi_enable_sci(); diff --git a/tools/firmware/hvmloader/seabios.c b/tools/firmware/hvmloader/seabios.c index 28793ca..8ac7a73 100644 --- a/tools/firmware/hvmloader/seabios.c +++ b/tools/firmware/hvmloader/seabios.c @@ -27,9 +27,6 @@ #include "smbios_types.h" #include "acpi/acpi2_0.h" -extern unsigned char dsdt_anycpu_qemu_xen[]; -extern int dsdt_anycpu_qemu_xen_len; - struct seabios_info { char signature[14]; /* XenHVMSeaBIOS\0 */ uint8_t length; /* Length of this struct */ @@ -87,12 +84,12 @@ static void add_table(uint32_t t) info->tables_nr++; } -static void seabios_acpi_build_tables(void) +static void seabios_acpi_build_tables(void* addr, uint32_t size) { uint32_t rsdp = (uint32_t)scratch_alloc(sizeof(struct acpi_20_rsdp), 0); struct acpi_config config = { - .dsdt_anycpu = dsdt_anycpu_qemu_xen, - .dsdt_anycpu_len = dsdt_anycpu_qemu_xen_len, + .dsdt_anycpu = addr, + .dsdt_anycpu_len = size, .dsdt_15cpu = NULL, .dsdt_15cpu_len = 0, }; -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |