From 860c2cab3e8b55757a5ca1277a32ae41fe0a6987 Mon Sep 17 00:00:00 2001 From: Yin Fengwei Date: Wed, 21 Mar 2018 15:18:16 +0800 Subject: [PATCH] DM: export acpi table base address and length. Will update e820 table to mark the address ACPI specific type. Also need pass ACPI table start address and size to vsbl. Signed-off-by: Yin Fengwei Acked-by: Kevin Tian --- devicemodel/hw/acpi/acpi.c | 13 +++++++++++++ devicemodel/include/acpi.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/devicemodel/hw/acpi/acpi.c b/devicemodel/hw/acpi/acpi.c index 132657617..816d4d1d9 100644 --- a/devicemodel/hw/acpi/acpi.c +++ b/devicemodel/hw/acpi/acpi.c @@ -74,6 +74,7 @@ * the individual tables */ #define ACPI_BASE 0xf2400 +#define ACPI_LENGTH (0x100000 - ACPI_BASE) #define RSDT_OFFSET 0x040 #define XSDT_OFFSET 0x080 #define MADT_OFFSET 0x100 @@ -973,6 +974,18 @@ acpi_table_enable(int num) basl_ftables[num].valid = true; } +uint32_t +get_acpi_base(void) +{ + return basl_acpi_base; +} + +uint32_t +get_acpi_table_length(void) +{ + return ACPI_LENGTH; +} + int acpi_build(struct vmctx *ctx, int ncpu) { diff --git a/devicemodel/include/acpi.h b/devicemodel/include/acpi.h index 34ecd3599..2f3cd5bd2 100644 --- a/devicemodel/include/acpi.h +++ b/devicemodel/include/acpi.h @@ -44,6 +44,8 @@ #define NHLT_ENTRY_NO 8 void acpi_table_enable(int num); +uint32_t get_acpi_base(void); +uint32_t get_acpi_table_length(void); struct vmctx;