[PATCH 0/6] risc-v: add ACPI support on QEMU

QEMU 8.1.2 can create ACPI tables for the RISC-V architecture. Allow passing them through to the operating system. Provide a new defconfig that enables this.
Heinrich Schuchardt (6): acpi: do not write ACPI tables on TARGET_QEMU_VIRT risc-v: add ACPI fields to global data risc-v: add support for QEMU provided ACPI tables riscv: qemu: copy ACPI tables from QEMU riscv: allow usage of ACPI configs: defconfig for QEMU RISC-V with ACPI
arch/Kconfig | 1 + arch/riscv/include/asm/global_data.h | 4 ++++ board/emulation/qemu-riscv/Kconfig | 2 ++ board/emulation/qemu-riscv/MAINTAINERS | 1 + board/emulation/qemu-riscv/qemu-riscv.c | 17 ++++++++++++++ configs/qemu-riscv64_acpi_smode_defconfig | 27 +++++++++++++++++++++++ lib/Kconfig | 2 +- lib/acpi/Makefile | 2 +- lib/acpi/acpi_writer.c | 2 +- 9 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 configs/qemu-riscv64_acpi_smode_defconfig

RISC-V QEMU provides the ACPI tables. We do not need to generate them ourselves.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- lib/acpi/Makefile | 2 +- lib/acpi/acpi_writer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/acpi/Makefile b/lib/acpi/Makefile index c1c9675b5d..19fa6ac869 100644 --- a/lib/acpi/Makefile +++ b/lib/acpi/Makefile @@ -12,7 +12,7 @@ obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi_table.o obj-y += acpi_writer.o
# With QEMU the ACPI tables come from there, not from U-Boot -ifndef CONFIG_QEMU +ifeq ($(CONFIG_QEMU)$(CONFIG_TARGET_QEMU_VIRT),) obj-y += base.o obj-y += csrt.o obj-y += mcfg.o diff --git a/lib/acpi/acpi_writer.c b/lib/acpi/acpi_writer.c index 946f90e8e7..df547c945b 100644 --- a/lib/acpi/acpi_writer.c +++ b/lib/acpi/acpi_writer.c @@ -48,7 +48,7 @@ int acpi_write_one(struct acpi_ctx *ctx, const struct acpi_writer *entry) return 0; }
-#ifndef CONFIG_QEMU +#if !defined(CONFIG_QEMU) && !defined(CONFIG_TARGET_QEMU_VIRT) static int acpi_write_all(struct acpi_ctx *ctx) { const struct acpi_writer *writer =

On Wed, Nov 15, 2023 at 03:23:50PM +0100, Heinrich Schuchardt wrote:
RISC-V QEMU provides the ACPI tables. We do not need to generate them ourselves.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
lib/acpi/Makefile | 2 +- lib/acpi/acpi_writer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/acpi/Makefile b/lib/acpi/Makefile index c1c9675b5d..19fa6ac869 100644 --- a/lib/acpi/Makefile +++ b/lib/acpi/Makefile @@ -12,7 +12,7 @@ obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi_table.o obj-y += acpi_writer.o
# With QEMU the ACPI tables come from there, not from U-Boot -ifndef CONFIG_QEMU +ifeq ($(CONFIG_QEMU)$(CONFIG_TARGET_QEMU_VIRT),)
The goal here is to say that we have been passed ACPI tables, and not to generate them, yes? Lets just introduce a symbol which says that and enable it as needed in both QEMU targets and others as needed please.

On 11/16/23 19:33, Tom Rini wrote:
On Wed, Nov 15, 2023 at 03:23:50PM +0100, Heinrich Schuchardt wrote:
RISC-V QEMU provides the ACPI tables. We do not need to generate them ourselves.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
lib/acpi/Makefile | 2 +- lib/acpi/acpi_writer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/acpi/Makefile b/lib/acpi/Makefile index c1c9675b5d..19fa6ac869 100644 --- a/lib/acpi/Makefile +++ b/lib/acpi/Makefile @@ -12,7 +12,7 @@ obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi_table.o obj-y += acpi_writer.o
# With QEMU the ACPI tables come from there, not from U-Boot -ifndef CONFIG_QEMU +ifeq ($(CONFIG_QEMU)$(CONFIG_TARGET_QEMU_VIRT),)
The goal here is to say that we have been passed ACPI tables, and not to generate them, yes? Lets just introduce a symbol which says that and enable it as needed in both QEMU targets and others as needed please.
These are the conflicting function implementations:
drivers/misc/qfw.c:158:ulong write_acpi_tables(ulong addr) lib/acpi/acpi_writer.c:72:ulong write_acpi_tables(ulong start_addr)
drivers/misc/Makefile has:
ifdef CONFIG_QFW obj-y += qfw.o
but inside the driver we find another constraint:
#if defined(CONFIG_GENERATE_ACPI_TABLE) && !defined(CONFIG_SANDBOX)
So probably we should probably have a symbol which is set for
CONFIG_QFW && CONFIG_GENERATE_ACPI_TABLE && !CONFIG_SANDBOX
Maybe call it CONFIG_QFW_ACPI, "Read ACPI tables from QEMU".
Best regards
Heinrich

Hi Heinrich,
On Thu, 16 Nov 2023 at 12:43, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
On 11/16/23 19:33, Tom Rini wrote:
On Wed, Nov 15, 2023 at 03:23:50PM +0100, Heinrich Schuchardt wrote:
RISC-V QEMU provides the ACPI tables. We do not need to generate them ourselves.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
lib/acpi/Makefile | 2 +- lib/acpi/acpi_writer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/acpi/Makefile b/lib/acpi/Makefile index c1c9675b5d..19fa6ac869 100644 --- a/lib/acpi/Makefile +++ b/lib/acpi/Makefile @@ -12,7 +12,7 @@ obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi_table.o obj-y += acpi_writer.o
# With QEMU the ACPI tables come from there, not from U-Boot -ifndef CONFIG_QEMU +ifeq ($(CONFIG_QEMU)$(CONFIG_TARGET_QEMU_VIRT),)
The goal here is to say that we have been passed ACPI tables, and not to generate them, yes? Lets just introduce a symbol which says that and enable it as needed in both QEMU targets and others as needed please.
These are the conflicting function implementations:
drivers/misc/qfw.c:158:ulong write_acpi_tables(ulong addr) lib/acpi/acpi_writer.c:72:ulong write_acpi_tables(ulong start_addr)
drivers/misc/Makefile has:
ifdef CONFIG_QFW obj-y += qfw.o
but inside the driver we find another constraint:
#if defined(CONFIG_GENERATE_ACPI_TABLE) && !defined(CONFIG_SANDBOX)
So probably we should probably have a symbol which is set for
CONFIG_QFW && CONFIG_GENERATE_ACPI_TABLE && !CONFIG_SANDBOX
Maybe call it CONFIG_QFW_ACPI, "Read ACPI tables from QEMU".
Yes that sounds good.
Regards, Simon

Add fields for the location of ACPI tables to the global data.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- arch/riscv/include/asm/global_data.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h index 937fa4d154..a8f6a217f1 100644 --- a/arch/riscv/include/asm/global_data.h +++ b/arch/riscv/include/asm/global_data.h @@ -32,6 +32,10 @@ struct arch_global_data { ulong available_harts; #endif #endif + ulong table_start; /* Start address of ACPI tables */ + ulong table_end; /* End address of ACPI tables */ + ulong table_start_high; /* Start address of high ACPI tables */ + ulong table_end_high; /* End address of high ACPI tables */ #ifdef CONFIG_SMBIOS ulong smbios_start; /* Start address of SMBIOS table */ #endif

If U-Boot provides ACPI tables on RISC-V QEMU, we need to copy what QEMU provides.
Provide the qfw command to retrieve information from the QEMU firmware.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- board/emulation/qemu-riscv/Kconfig | 2 ++ lib/Kconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig index d56b4b5bc1..933b035991 100644 --- a/board/emulation/qemu-riscv/Kconfig +++ b/board/emulation/qemu-riscv/Kconfig @@ -33,6 +33,8 @@ config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select GENERIC_RISCV select SUPPORT_SPL + select CMD_QFW if GENERATE_ACPI_TABLE + select QFW_MMIO if GENERATE_ACPI_TABLE imply AHCI imply SMP imply BOARD_LATE_INIT diff --git a/lib/Kconfig b/lib/Kconfig index 19649517a3..a94adc388f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -300,7 +300,7 @@ config SPL_ACPI config GENERATE_ACPI_TABLE bool "Generate an ACPI (Advanced Configuration and Power Interface) table" depends on ACPI - select QFW if QEMU + select QFW if QEMU || TARGET_QEMU_VIRT help The Advanced Configuration and Power Interface (ACPI) specification provides an open standard for device configuration and management

On Wed, Nov 15, 2023 at 03:23:52PM +0100, Heinrich Schuchardt wrote:
If U-Boot provides ACPI tables on RISC-V QEMU, we need to copy what QEMU provides.
Provide the qfw command to retrieve information from the QEMU firmware.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
board/emulation/qemu-riscv/Kconfig | 2 ++ lib/Kconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig index d56b4b5bc1..933b035991 100644 --- a/board/emulation/qemu-riscv/Kconfig +++ b/board/emulation/qemu-riscv/Kconfig @@ -33,6 +33,8 @@ config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select GENERIC_RISCV select SUPPORT_SPL
- select CMD_QFW if GENERATE_ACPI_TABLE
- select QFW_MMIO if GENERATE_ACPI_TABLE imply AHCI imply SMP imply BOARD_LATE_INIT
diff --git a/lib/Kconfig b/lib/Kconfig index 19649517a3..a94adc388f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -300,7 +300,7 @@ config SPL_ACPI config GENERATE_ACPI_TABLE bool "Generate an ACPI (Advanced Configuration and Power Interface) table" depends on ACPI
- select QFW if QEMU
- select QFW if QEMU || TARGET_QEMU_VIRT help The Advanced Configuration and Power Interface (ACPI) specification provides an open standard for device configuration and management
In this case we aren't "generating" the table, we're using the table we've been passed, yes? I think that further shows the need to add a symbol which means that, and use it where appropriate. Or am I misunderstanding the GENERATE_ACPI_TABLE symbol?

On 11/16/23 19:35, Tom Rini wrote:
On Wed, Nov 15, 2023 at 03:23:52PM +0100, Heinrich Schuchardt wrote:
If U-Boot provides ACPI tables on RISC-V QEMU, we need to copy what QEMU provides.
Provide the qfw command to retrieve information from the QEMU firmware.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
board/emulation/qemu-riscv/Kconfig | 2 ++ lib/Kconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig index d56b4b5bc1..933b035991 100644 --- a/board/emulation/qemu-riscv/Kconfig +++ b/board/emulation/qemu-riscv/Kconfig @@ -33,6 +33,8 @@ config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select GENERIC_RISCV select SUPPORT_SPL
- select CMD_QFW if GENERATE_ACPI_TABLE
- select QFW_MMIO if GENERATE_ACPI_TABLE imply AHCI imply SMP imply BOARD_LATE_INIT
diff --git a/lib/Kconfig b/lib/Kconfig index 19649517a3..a94adc388f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -300,7 +300,7 @@ config SPL_ACPI config GENERATE_ACPI_TABLE bool "Generate an ACPI (Advanced Configuration and Power Interface) table" depends on ACPI
- select QFW if QEMU
- select QFW if QEMU || TARGET_QEMU_VIRT help The Advanced Configuration and Power Interface (ACPI) specification provides an open standard for device configuration and management
In this case we aren't "generating" the table, we're using the table we've been passed, yes? I think that further shows the need to add a symbol which means that, and use it where appropriate. Or am I misunderstanding the GENERATE_ACPI_TABLE symbol?
If you look at drivers/misc/qfw.c you will find, that we only read ACPI tables created in QEMU if CONFIG_GNERATE_ACPI_TABLE=y. This contradicts the long text of the configuration symbol.
CONFIG_GNERATE_ACPI_TABLE is used to decide if we publish a device-tree in the EFI sub-system.
Simon tried to clean up EFI a bit in 53e8e6f98679 ("efi: x86: Correct the condition for installing ACPI tables") but did not change cmd/bootefi.c.
I would agree to calling the current usage of the symbol incoherent.
Best regards
Heinrich

On Thu, Nov 16, 2023 at 08:54:44PM +0100, Heinrich Schuchardt wrote:
On 11/16/23 19:35, Tom Rini wrote:
On Wed, Nov 15, 2023 at 03:23:52PM +0100, Heinrich Schuchardt wrote:
If U-Boot provides ACPI tables on RISC-V QEMU, we need to copy what QEMU provides.
Provide the qfw command to retrieve information from the QEMU firmware.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
board/emulation/qemu-riscv/Kconfig | 2 ++ lib/Kconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig index d56b4b5bc1..933b035991 100644 --- a/board/emulation/qemu-riscv/Kconfig +++ b/board/emulation/qemu-riscv/Kconfig @@ -33,6 +33,8 @@ config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select GENERIC_RISCV select SUPPORT_SPL
- select CMD_QFW if GENERATE_ACPI_TABLE
- select QFW_MMIO if GENERATE_ACPI_TABLE imply AHCI imply SMP imply BOARD_LATE_INIT
diff --git a/lib/Kconfig b/lib/Kconfig index 19649517a3..a94adc388f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -300,7 +300,7 @@ config SPL_ACPI config GENERATE_ACPI_TABLE bool "Generate an ACPI (Advanced Configuration and Power Interface) table" depends on ACPI
- select QFW if QEMU
- select QFW if QEMU || TARGET_QEMU_VIRT help The Advanced Configuration and Power Interface (ACPI) specification provides an open standard for device configuration and management
In this case we aren't "generating" the table, we're using the table we've been passed, yes? I think that further shows the need to add a symbol which means that, and use it where appropriate. Or am I misunderstanding the GENERATE_ACPI_TABLE symbol?
If you look at drivers/misc/qfw.c you will find, that we only read ACPI tables created in QEMU if CONFIG_GNERATE_ACPI_TABLE=y. This contradicts the long text of the configuration symbol.
CONFIG_GNERATE_ACPI_TABLE is used to decide if we publish a device-tree in the EFI sub-system.
Simon tried to clean up EFI a bit in 53e8e6f98679 ("efi: x86: Correct the condition for installing ACPI tables") but did not change cmd/bootefi.c.
I would agree to calling the current usage of the symbol incoherent.
Yes, we need to start by making our ACPI-related symbols coherent. We need a symbol for "create ACPI tables" such as we seem to be doing in for example arch/x86/cpu/baytrail/acpi.c. And then a different symbol for utilizing pass-through tables. And then probably another symbol or two to handle what U-Boot does with these tables once U-Boot has access to a populated table.

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(+)
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c index 181abbbf97..2cebce2128 100644 --- a/board/emulation/qemu-riscv/qemu-riscv.c +++ b/board/emulation/qemu-riscv/qemu-riscv.c @@ -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; }

Select CONFIG_SUPPORT_ACPI to allow usage of ACPI tables with RISC-V.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- arch/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/Kconfig b/arch/Kconfig index 4f5b75129f..d79b744bd6 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -108,6 +108,7 @@ config PPC config RISCV bool "RISC-V architecture" select CREATE_ARCH_SYMLINK + select SUPPORT_ACPI select SUPPORT_OF_CONTROL select OF_CONTROL select DM

Provide a defconfig for testing ACPI on RISC-V.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- board/emulation/qemu-riscv/MAINTAINERS | 1 + configs/qemu-riscv64_acpi_smode_defconfig | 27 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 configs/qemu-riscv64_acpi_smode_defconfig
diff --git a/board/emulation/qemu-riscv/MAINTAINERS b/board/emulation/qemu-riscv/MAINTAINERS index 3d7453f1b4..80c75a18f8 100644 --- a/board/emulation/qemu-riscv/MAINTAINERS +++ b/board/emulation/qemu-riscv/MAINTAINERS @@ -7,6 +7,7 @@ F: include/configs/qemu-riscv.h F: configs/qemu-riscv32_defconfig F: configs/qemu-riscv32_smode_defconfig F: configs/qemu-riscv32_spl_defconfig +F: configs/qemu-riscv64_acpi_smode_defconfig F: configs/qemu-riscv64_defconfig F: configs/qemu-riscv64_smode_defconfig F: configs/qemu-riscv64_spl_defconfig diff --git a/configs/qemu-riscv64_acpi_smode_defconfig b/configs/qemu-riscv64_acpi_smode_defconfig new file mode 100644 index 0000000000..0227d1dfe0 --- /dev/null +++ b/configs/qemu-riscv64_acpi_smode_defconfig @@ -0,0 +1,27 @@ +CONFIG_RISCV=y +CONFIG_SYS_MALLOC_LEN=0x800000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 +CONFIG_ENV_SIZE=0x20000 +CONFIG_DEFAULT_DEVICE_TREE="qemu-virt64" +CONFIG_SYS_LOAD_ADDR=0x80200000 +CONFIG_TARGET_QEMU_VIRT=y +CONFIG_ARCH_RV64I=y +CONFIG_RISCV_SMODE=y +CONFIG_FIT=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" +CONFIG_DISPLAY_CPUINFO=y +CONFIG_DISPLAY_BOARDINFO=y +CONFIG_SYS_BOOTM_LEN=0x4000000 +CONFIG_CMD_BOOTEFI_SELFTEST=y +CONFIG_CMD_NVEDIT_EFI=y +# CONFIG_CMD_MII is not set +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_DM_MTD=y +CONFIG_FLASH_SHOW_PROGRESS=0 +CONFIG_SYS_MAX_FLASH_BANKS=2 +CONFIG_ACPI=y +CONFIG_GENERATE_ACPI_TABLE=y

On Wed, Nov 15, 2023 at 03:23:55PM +0100, Heinrich Schuchardt wrote:
Provide a defconfig for testing ACPI on RISC-V.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
board/emulation/qemu-riscv/MAINTAINERS | 1 + configs/qemu-riscv64_acpi_smode_defconfig | 27 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 configs/qemu-riscv64_acpi_smode_defconfig
This feels like a case where we should start using fragments rather than a cp'd defconfig.

On 11/16/23 19:37, Tom Rini wrote:
On Wed, Nov 15, 2023 at 03:23:55PM +0100, Heinrich Schuchardt wrote:
Provide a defconfig for testing ACPI on RISC-V.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
board/emulation/qemu-riscv/MAINTAINERS | 1 + configs/qemu-riscv64_acpi_smode_defconfig | 27 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 configs/qemu-riscv64_acpi_smode_defconfig
This feels like a case where we should start using fragments rather than a cp'd defconfig.
Do our CI scripts support Kconfig fragments?
Best regards
Heinrich

On Thu, Nov 16, 2023 at 09:04:27PM +0100, Heinrich Schuchardt wrote:
On 11/16/23 19:37, Tom Rini wrote:
On Wed, Nov 15, 2023 at 03:23:55PM +0100, Heinrich Schuchardt wrote:
Provide a defconfig for testing ACPI on RISC-V.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
board/emulation/qemu-riscv/MAINTAINERS | 1 + configs/qemu-riscv64_acpi_smode_defconfig | 27 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 configs/qemu-riscv64_acpi_smode_defconfig
This feels like a case where we should start using fragments rather than a cp'd defconfig.
Do our CI scripts support Kconfig fragments?
With some other patches, yes we could have build coverage. Or if this moves to the point where we'll be running pytest on the configuration as well it would be handled that way instead.

On 15.11.23 15:23, Heinrich Schuchardt wrote:
QEMU 8.1.2 can create ACPI tables for the RISC-V architecture. Allow passing them through to the operating system. Provide a new defconfig that enables this.
This patch is prerequisite:
[PATCH] move acpi_get_rsdp_addr() to acpi/acpi_table.h https://patchwork.ozlabs.org/project/uboot/patch/20231109172302.54324-1-hein...
Best regards
Heinrich
Heinrich Schuchardt (6): acpi: do not write ACPI tables on TARGET_QEMU_VIRT risc-v: add ACPI fields to global data risc-v: add support for QEMU provided ACPI tables riscv: qemu: copy ACPI tables from QEMU riscv: allow usage of ACPI configs: defconfig for QEMU RISC-V with ACPI
arch/Kconfig | 1 + arch/riscv/include/asm/global_data.h | 4 ++++ board/emulation/qemu-riscv/Kconfig | 2 ++ board/emulation/qemu-riscv/MAINTAINERS | 1 + board/emulation/qemu-riscv/qemu-riscv.c | 17 ++++++++++++++ configs/qemu-riscv64_acpi_smode_defconfig | 27 +++++++++++++++++++++++ lib/Kconfig | 2 +- lib/acpi/Makefile | 2 +- lib/acpi/acpi_writer.c | 2 +- 9 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 configs/qemu-riscv64_acpi_smode_defconfig
participants (3)
-
Heinrich Schuchardt
-
Simon Glass
-
Tom Rini