[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC XEN PATCH v4 36/41] tools/libacpi: add function to get the data of QEMU RSDP
Signed-off-by: Haozhong Zhang <haozhong.zhang@xxxxxxxxx> --- Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libacpi/qemu.h | 2 ++ tools/libacpi/qemu_loader.c | 8 ++++++++ tools/libacpi/qemu_stub.c | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/tools/libacpi/qemu.h b/tools/libacpi/qemu.h index 224fc67e02..532c579eca 100644 --- a/tools/libacpi/qemu.h +++ b/tools/libacpi/qemu.h @@ -22,6 +22,7 @@ #define __QEMU_H__ #include LIBACPI_STDUTILS +#include "acpi2_0.h" #include "libacpi.h" #define FW_CFG_FILE_PATH_MAX_LENGTH 56 @@ -40,6 +41,7 @@ void fw_cfg_read_file(const struct fw_cfg_file *file, void *buf); int loader_add_rom(struct acpi_ctxt* ctxt, const struct fw_cfg_file *file); int loader_exec(struct acpi_ctxt *ctxt); +struct acpi_20_rsdp *loader_get_rsdp(void); #endif /* !__QEMU_H__ */ diff --git a/tools/libacpi/qemu_loader.c b/tools/libacpi/qemu_loader.c index d041a37246..660d825df7 100644 --- a/tools/libacpi/qemu_loader.c +++ b/tools/libacpi/qemu_loader.c @@ -21,6 +21,7 @@ */ #include LIBACPI_STDUTILS +#include "acpi2_0.h" #include "libacpi.h" #include "qemu.h" @@ -373,6 +374,13 @@ int loader_exec(struct acpi_ctxt *ctxt) return rc; } +struct acpi_20_rsdp *loader_get_rsdp(void) +{ + struct rom *rsdp = loader_find_rom("etc/acpi/rsdp"); + + return rsdp ? rsdp->data : NULL; +} + /* * Local variables: * mode: C diff --git a/tools/libacpi/qemu_stub.c b/tools/libacpi/qemu_stub.c index 1eedf5466e..452772682a 100644 --- a/tools/libacpi/qemu_stub.c +++ b/tools/libacpi/qemu_stub.c @@ -48,6 +48,11 @@ int loader_exec(struct acpi_ctxt *ctxt) return -ENOSYS; } +struct acpi_20_rsdp *loader_get_rsdp(void) +{ + return NULL; +} + /* * Local variables: * mode: C -- 2.15.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |