@@ -4,17 +4,20 @@
*/
#include <common.h>
+#include <acpi/acpi_table.h>
#include <dm.h>
#include <dm/ofnode.h>
#include <env.h>
#include <fdtdec.h>
#include <image.h>
#include <log.h>
+#include <malloc.h>
#include <spl.h>
#include <init.h>
#include <usb.h>
#include <virtio_types.h>
#include <virtio.h>
+#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -46,6 +49,20 @@ int board_late_init(void)
if (CONFIG_IS_ENABLED(USB_KEYBOARD))
usb_init();
+ if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) {
+ uintptr_t addr;
+ void *ptr;
+
+ /* Reserve 64K for ACPI tables, aligned to a 4K boundary */
+ ptr = memalign(SZ_4K, SZ_64K);
+ addr = (uintptr_t)ptr;
+
+ /* Generate ACPI tables */
+ write_acpi_tables(addr);
+ gd->arch.table_start = addr;
+ gd->arch.table_end = addr;
+ }
+
return 0;
}
If CONFIG_GENERATE_ACPI_TABLES=y, read the ACPI tables provided by QEMU and make them available to U-Boot. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> --- board/emulation/qemu-riscv/qemu-riscv.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)