From: Anthony PERARD <anthony.perard@citrix.com>
To: xen-devel@lists.xen.org
Cc: Anthony PERARD <anthony.perard@citrix.com>
Subject: [RFC PATCH 4/5] hvmloader: Load ACPI table from here libxc left it.
Date: Wed, 16 Sep 2015 18:19:46 +0100 [thread overview]
Message-ID: <1442423987-14956-5-git-send-email-anthony.perard@citrix.com> (raw)
In-Reply-To: <1442423987-14956-1-git-send-email-anthony.perard@citrix.com>
---
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
next prev parent reply other threads:[~2015-09-16 17:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 17:19 [RFC PATCH 0/5] Load BIOS via toolstack instead of been embedded in hvmloader Anthony PERARD
2015-09-16 17:19 ` [RFC PATCH 1/5] libxc: Load BIOS and ACPI table into guest memory Anthony PERARD
2015-09-16 17:19 ` [RFC PATCH 2/5] libxl: Load guest BIOS and ACPI table from file Anthony PERARD
2015-09-16 17:19 ` [RFC PATCH 3/5] hvmloader: Load BIOS from where libxc left it Anthony PERARD
2015-09-16 17:19 ` Anthony PERARD [this message]
2015-09-16 17:19 ` [RFC PATCH 5/5] hvmloader: Keep BIOS and ACPI blob in separated files Anthony PERARD
2015-09-16 18:56 ` [RFC PATCH 0/5] Load BIOS via toolstack instead of been embedded in hvmloader Andrew Cooper
2015-09-17 9:49 ` Anthony PERARD
2015-09-25 15:37 ` Ian Campbell
2015-09-25 15:45 ` Anthony PERARD
2015-09-25 16:28 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442423987-14956-5-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).