target: Provide target-specific Kconfig
Subsystems (2)
cover target: Provide target-specific Kconfig
Hi,
This series add a Kconfig file to each target, allowing to select target-specific features there, instead of from the hardware Kconfig.
This simplifies managing multi-arch features such semihosting.
Series organization:
1/ Some targets use the architecture symbol to select boards and peripherals (SH4 and LM32), we need to clean that first.
2/ Introduce empty target Kconfig, update meson.
3/ Move architectural features out of hardware:
- x86 SEV
- ARM v7m
- generic semihosting
[following only important to patchew, unrelated to this series]
Based-on: <[email protected]>
Philippe Mathieu-Daudé (10):
hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
meson: Introduce target-specific Kconfig
target/i386: Move SEV feature to target Kconfig target/arm: Move V7M feature to target Kconfig
default-configs: Remove unnecessary SEMIHOSTING selection
target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
target: Move SEMIHOSTING feature to target Kconfig
default-configs/devices/arm-softmmu.mak | 2 -- default-configs/devices/lm32-softmmu.mak | 4 +--- default-configs/devices/m68k-softmmu.mak | 2 -- .../devices/mips-softmmu-common.mak | 3 --- default-configs/devices/nios2-softmmu.mak | 2 -- default-configs/devices/riscv32-softmmu.mak | 2 -- default-configs/devices/riscv64-softmmu.mak | 2 -- default-configs/devices/unicore32-softmmu.mak | 1 - default-configs/devices/xtensa-softmmu.mak | 2 -- meson.build | 3 ++- Kconfig | 1 + hw/arm/Kconfig | 4 ---- hw/block/meson.build | 2 +- hw/char/meson.build | 6 ++--- hw/i386/Kconfig | 4 ---- hw/intc/meson.build | 4 ++-- hw/lm32/Kconfig | 10 +++++--- hw/lm32/meson.build | 2 +- hw/sh4/Kconfig | 6 ++--- hw/timer/meson.build | 4 ++-- target/Kconfig | 23 +++++++++++++++++++ target/alpha/Kconfig | 2 ++ target/arm/Kconfig | 11 +++++++++ target/avr/Kconfig | 2 ++ target/cris/Kconfig | 2 ++ target/hppa/Kconfig | 2 ++ target/i386/Kconfig | 9 ++++++++ target/lm32/Kconfig | 3 +++ target/m68k/Kconfig | 3 +++ target/microblaze/Kconfig | 2 ++ target/mips/Kconfig | 7 ++++++ target/moxie/Kconfig | 2 ++ target/nios2/Kconfig | 3 +++ target/openrisc/Kconfig | 2 ++ target/ppc/Kconfig | 5 ++++ target/riscv/Kconfig | 7 ++++++ target/rx/Kconfig | 2 ++ target/s390x/Kconfig | 2 ++ target/sh4/Kconfig | 2 ++ target/sparc/Kconfig | 5 ++++ target/tilegx/Kconfig | 2 ++ target/tricore/Kconfig | 2 ++ target/unicore32/Kconfig | 3 +++ target/xtensa/Kconfig | 3 +++ 44 files changed, 129 insertions(+), 43 deletions(-) create mode 100644 target/Kconfig create mode 100644 target/alpha/Kconfig create mode 100644 target/arm/Kconfig create mode 100644 target/avr/Kconfig create mode 100644 target/cris/Kconfig create mode 100644 target/hppa/Kconfig create mode 100644 target/i386/Kconfig create mode 100644 target/lm32/Kconfig create mode 100644 target/m68k/Kconfig create mode 100644 target/microblaze/Kconfig create mode 100644 target/mips/Kconfig create mode 100644 target/moxie/Kconfig create mode 100644 target/nios2/Kconfig create mode 100644 target/openrisc/Kconfig create mode 100644 target/ppc/Kconfig create mode 100644 target/riscv/Kconfig create mode 100644 target/rx/Kconfig create mode 100644 target/s390x/Kconfig create mode 100644 target/sh4/Kconfig create mode 100644 target/sparc/Kconfig create mode 100644 target/tilegx/Kconfig create mode 100644 target/tricore/Kconfig create mode 100644 target/unicore32/Kconfig create mode 100644 target/xtensa/Kconfig
Signature · 1 line
2.26.2
PATCH 1/10 hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS
We want to be able to use the 'SH4' config for architecture specific features. As CONFIG_SH4 is only used to select peripherals, rename it CONFIG_SH4_PERIPHERALS.
--- hw/block/meson.build | 2 +- hw/char/meson.build | 2 +- hw/intc/meson.build | 2 +- hw/sh4/Kconfig | 6 +++--- hw/timer/meson.build | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-)
hw/block/meson.build +1 -1
@@ -12,7 +12,7 @@ softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80.c')) softmmu_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c')) softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c')) -softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('tc58128.c')) +softmmu_ss.add(when: 'CONFIG_SH4_PERIPHERALS', if_true: files('tc58128.c')) softmmu_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('nvme.c', 'nvme-ns.c')) specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c'))
hw/char/meson.build +1 -1
@@ -31,7 +31,7 @@ softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c')) softmmu_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c')) softmmu_ss.add(when: 'CONFIG_SIFIVE_UART', if_true: files('sifive_uart.c')) -softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_serial.c')) +softmmu_ss.add(when: 'CONFIG_SH4_PERIPHERALS', if_true: files('sh_serial.c')) softmmu_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c')) softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c'))
hw/intc/meson.build +1 -1
@@ -47,7 +47,7 @@ specific_ss.add(when: 'CONFIG_RX_ICU', if_true: files('rx_icu.c')) specific_ss.add(when: 'CONFIG_S390_FLIC', if_true: files('s390_flic.c')) specific_ss.add(when: 'CONFIG_S390_FLIC_KVM', if_true: files('s390_flic_kvm.c')) -specific_ss.add(when: 'CONFIG_SH4', if_true: files('sh_intc.c')) +specific_ss.add(when: 'CONFIG_SH4_PERIPHERALS', if_true: files('sh_intc.c')) specific_ss.add(when: 'CONFIG_SIFIVE_CLINT', if_true: files('sifive_clint.c')) specific_ss.add(when: 'CONFIG_SIFIVE_PLIC', if_true: files('sifive_plic.c')) specific_ss.add(when: 'CONFIG_XICS', if_true: files('xics.c'))
hw/sh4/Kconfig +3 -3
@@ -9,16 +9,16 @@ config R2D select USB_OHCI_PCI select PCI select SM501 - select SH4 + select SH4_PERIPHERALS config SHIX bool select SH7750 - select SH4 + select SH4_PERIPHERALS config SH7750 bool -config SH4 +config SH4_PERIPHERALS bool select PTIMER
hw/timer/meson.build +1 -1
@@ -30,7 +30,7 @@ softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_ost.c')) softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_timer.c')) softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_systmr.c')) -softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_timer.c')) +softmmu_ss.add(when: 'CONFIG_SH4_PERIPHERALS', if_true: files('sh_timer.c')) softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_timer.c')) softmmu_ss.add(when: 'CONFIG_STM32F2XX_TIMER', if_true: files('stm32f2xx_timer.c')) softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_timer.c'))
Signature · 1 line
2.26.2
Re: [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS
Quoted 5 lines · Philippe Mathieu-Daudé
We want to be able to use the 'SH4' config for architecture specific features. As
CONFIG_SH4is only used to select peripherals, rename itCONFIG_SH4_PERIPHERALS.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
I agree with Balaton Zoltan that _DEVICES might be a bit shorter. Either way:
Signature · 1 line
Alex Bennée
PATCH 2/10 hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards
In reply to Philippe Mathieu-DaudéWe want to be able to use the 'LM32' config for architecture specific features. Introduce CONFIG_LM32_EVR to select the lm32-evr / lm32-uclinux boards.
--- default-configs/devices/lm32-softmmu.mak | 2 +- hw/lm32/Kconfig | 6 +++++- hw/lm32/meson.build | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-)
default-configs/devices/lm32-softmmu.mak +1 -1
@@ -8,5 +8,5 @@ CONFIG_SEMIHOSTING=y # Boards: # -CONFIG_LM32=y +CONFIG_LM32_EVR=y CONFIG_MILKYMIST=y
hw/lm32/Kconfig +5 -1
@@ -1,7 +1,6 @@ config LM32 bool select PTIMER - select PFLASH_CFI02 config MILKYMIST bool
@@ -12,3 +11,8 @@ config MILKYMIST select FRAMEBUFFER select SD select USB_OHCI + +config LM32_EVR + bool + select LM32 + select PFLASH_CFI02
hw/lm32/meson.build +1 -1
@@ -1,6 +1,6 @@ lm32_ss = ss.source_set() # LM32 boards -lm32_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_boards.c')) +lm32_ss.add(when: 'CONFIG_LM32_EVR', if_true: files('lm32_boards.c')) lm32_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist.c')) hw_arch += {'lm32': lm32_ss}
Signature · 1 line
2.26.2
Re: [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards
Quoted 5 lines · Philippe Mathieu-Daudé
We want to be able to use the 'LM32' config for architecture specific features. Introduce
CONFIG_LM32_EVRto select the lm32-evr / lm32-uclinux boards.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Signature · 1 line
Alex Bennée
PATCH 3/10 hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS
In reply to Philippe Mathieu-DaudéWe want to be able to use the 'LM32' config for architecture specific features. As CONFIG_LM32 is only used to select peripherals, rename it CONFIG_LM32_PERIPHERALS.
--- hw/char/meson.build | 4 ++-- hw/intc/meson.build | 2 +- hw/lm32/Kconfig | 4 ++-- hw/timer/meson.build | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
hw/char/meson.build +2 -2
@@ -8,8 +8,8 @@ softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipoctal232.c')) softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('parallel-isa.c')) softmmu_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugcon.c')) -softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_juart.c')) -softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_uart.c')) +softmmu_ss.add(when: 'CONFIG_LM32_PERIPHERALS', if_true: files('lm32_juart.c')) +softmmu_ss.add(when: 'CONFIG_LM32_PERIPHERALS', if_true: files('lm32_uart.c')) softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-uart.c')) softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_uart.c')) softmmu_ss.add(when: 'CONFIG_PARALLEL', if_true: files('parallel.c'))
hw/intc/meson.build +1 -1
@@ -14,7 +14,7 @@ softmmu_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c')) softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_avic.c', 'imx_gpcv2.c')) softmmu_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic_common.c')) -softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_pic.c')) +softmmu_ss.add(when: 'CONFIG_LM32_PERIPHERALS', if_true: files('lm32_pic.c')) softmmu_ss.add(when: 'CONFIG_OPENPIC', if_true: files('openpic.c')) softmmu_ss.add(when: 'CONFIG_PL190', if_true: files('pl190.c')) softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_intc.c'))
hw/lm32/Kconfig +2 -2
@@ -1,4 +1,4 @@ -config LM32 +config LM32_PERIPHERALS bool select PTIMER
@@ -14,5 +14,5 @@ config MILKYMIST config LM32_EVR bool - select LM32 + select LM32_PERIPHERALS select PFLASH_CFI02
hw/timer/meson.build +1 -1
@@ -19,7 +19,7 @@ softmmu_ss.add(when: 'CONFIG_I8254', if_true: files('i8254_common.c', 'i8254.c')) softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_epit.c')) softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpt.c')) -softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_timer.c')) +softmmu_ss.add(when: 'CONFIG_LM32_PERIPHERALS', if_true: files('lm32_timer.c')) softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-sysctl.c')) softmmu_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gictimer.c')) softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-timer.c'))
Signature · 1 line
2.26.2
Re: [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS
Quoted 5 lines · Philippe Mathieu-Daudé
We want to be able to use the 'LM32' config for architecture specific features. As
CONFIG_LM32is only used to select peripherals, rename itCONFIG_LM32_PERIPHERALS.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
_DEVICES if you want, either way:
Signature · 1 line
Alex Bennée
PATCH 4/10 hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
In reply to Philippe Mathieu-DaudéThe Milkymist board requires more than the PTIMER. Directly select the LM32_PERIPHERALS. This fixes:
/usr/bin/ld:
libqemu-lm32-softmmu.fa.p/target_lm32_gdbstub.c.o: in function `lm32_cpu_gdb_read_register':
target/lm32/gdbstub.c:46: undefined reference to lm32_pic_get_im' target/lm32/gdbstub.c:48: undefined reference to lm32_pic_get_ip' libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_im':
target/lm32/op_helper.c:107: undefined reference to lm32_pic_set_im' libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function helper_wcsr_ip':
target/lm32/op_helper.c:114: undefined reference to lm32_pic_set_ip' libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function helper_wcsr_jtx':
target/lm32/op_helper.c:120: undefined reference to lm32_juart_set_jtx' libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function helper_wcsr_jrx':
target/lm32/op_helper.c:125: undefined reference to lm32_juart_set_jrx' libqemu-lm32-softmmu.fa.p/target_lm32_translate.c.o: in function lm32_cpu_dump_state':
target/lm32/translate.c:1161: undefined reference to lm32_pic_get_ip' target/lm32/translate.c:1161: undefined reference to lm32_pic_get_im'
--- hw/lm32/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/lm32/Kconfig +1 -1
@@ -6,11 +6,11 @@ config MILKYMIST bool # FIXME: disabling it results in compile-time errors select MILKYMIST_TMU2 if OPENGL && X11 - select PTIMER select PFLASH_CFI01 select FRAMEBUFFER select SD select USB_OHCI + select LM32_PERIPHERALS config LM32_EVR bool
Signature · 1 line
2.26.2
Re: [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
Quoted 19 lines · Philippe Mathieu-Daudé
The Milkymist board requires more than the PTIMER. Directly select the
LM32_PERIPHERALS. This fixes:
/usr/bin/ld:
libqemu-lm32-softmmu.fa.p/target_lm32_gdbstub.c.o: in function `lm32_cpu_gdb_read_register':
target/lm32/gdbstub.c:46: undefined reference tolm32_pic_get_im' target/lm32/gdbstub.c:48: undefined reference tolm32_pic_get_ip'libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_im':
target/lm32/op_helper.c:107: undefined reference tolm32_pic_set_im' libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in functionhelper_wcsr_ip':
target/lm32/op_helper.c:114: undefined reference tolm32_pic_set_ip' libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in functionhelper_wcsr_jtx':
target/lm32/op_helper.c:120: undefined reference tolm32_juart_set_jtx' libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in functionhelper_wcsr_jrx':
target/lm32/op_helper.c:125: undefined reference tolm32_juart_set_jrx' libqemu-lm32-softmmu.fa.p/target_lm32_translate.c.o: in functionlm32_cpu_dump_state':
target/lm32/translate.c:1161: undefined reference tolm32_pic_get_ip' target/lm32/translate.c:1161: undefined reference tolm32_pic_get_im'
Quoted 1 line
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Signature · 1 line
Alex Bennée
PATCH 5/10 meson: Introduce target-specific Kconfig
In reply to Philippe Mathieu-DaudéAdd a target-specific Kconfig.
Target foo now has CONFIG_FOO defined.
Two architecture have a particularity, ARM and MIPS:
their 64-bit version include the 32-bit subset.
---
I suppose X86_64 should also select I386?
No clue about PPC/RISCV.
--- meson.build | 3 ++- Kconfig | 1 + target/Kconfig | 23 +++++++++++++++++++++++ target/alpha/Kconfig | 2 ++ target/arm/Kconfig | 6 ++++++ target/avr/Kconfig | 2 ++ target/cris/Kconfig | 2 ++ target/hppa/Kconfig | 2 ++ target/i386/Kconfig | 5 +++++ target/lm32/Kconfig | 2 ++ target/m68k/Kconfig | 2 ++ target/microblaze/Kconfig | 2 ++ target/mips/Kconfig | 6 ++++++ target/moxie/Kconfig | 2 ++ target/nios2/Kconfig | 2 ++ target/openrisc/Kconfig | 2 ++ target/ppc/Kconfig | 5 +++++ target/riscv/Kconfig | 5 +++++ target/rx/Kconfig | 2 ++ target/s390x/Kconfig | 2 ++ target/sh4/Kconfig | 2 ++ target/sparc/Kconfig | 5 +++++ target/tilegx/Kconfig | 2 ++ target/tricore/Kconfig | 2 ++ target/unicore32/Kconfig | 2 ++ target/xtensa/Kconfig | 2 ++ 26 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 target/Kconfig create mode 100644 target/alpha/Kconfig create mode 100644 target/arm/Kconfig create mode 100644 target/avr/Kconfig create mode 100644 target/cris/Kconfig create mode 100644 target/hppa/Kconfig create mode 100644 target/i386/Kconfig create mode 100644 target/lm32/Kconfig create mode 100644 target/m68k/Kconfig create mode 100644 target/microblaze/Kconfig create mode 100644 target/mips/Kconfig create mode 100644 target/moxie/Kconfig create mode 100644 target/nios2/Kconfig create mode 100644 target/openrisc/Kconfig create mode 100644 target/ppc/Kconfig create mode 100644 target/riscv/Kconfig create mode 100644 target/rx/Kconfig create mode 100644 target/s390x/Kconfig create mode 100644 target/sh4/Kconfig create mode 100644 target/sparc/Kconfig create mode 100644 target/tilegx/Kconfig create mode 100644 target/tricore/Kconfig create mode 100644 target/unicore32/Kconfig create mode 100644 target/xtensa/Kconfig
meson.build +2 -1
@@ -1322,7 +1322,8 @@ command: [minikconf, get_option('default_devices') ? '--defconfig' : '--allnoconfig', config_devices_mak, '@DEPFILE@', '@INPUT@', - host_kconfig, accel_kconfig]) + host_kconfig, accel_kconfig, + 'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y']) config_devices_data = configuration_data() config_devices = keyval.load(config_devices_mak)
Kconfig +1 -0
@@ -1,4 +1,5 @@ source Kconfig.host source backends/Kconfig source accel/Kconfig +source target/Kconfig source hw/Kconfig
target/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +source alpha/Kconfig +source arm/Kconfig +source avr/Kconfig +source cris/Kconfig +source hppa/Kconfig +source i386/Kconfig +source lm32/Kconfig +source m68k/Kconfig +source microblaze/Kconfig +source mips/Kconfig +source moxie/Kconfig +source nios2/Kconfig +source openrisc/Kconfig +source ppc/Kconfig +source riscv/Kconfig +source rx/Kconfig +source s390x/Kconfig +source sh4/Kconfig +source sparc/Kconfig +source tilegx/Kconfig +source tricore/Kconfig +source unicore32/Kconfig +source xtensa/Kconfig
target/alpha/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config ALPHA + bool
target/arm/Kconfig new file +6 -0
@@ -0,0 +1,6 @@ +config ARM + bool + +config AARCH64 + bool + select ARM
target/avr/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config AVR + bool
target/cris/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config CRIS + bool
target/hppa/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config HPPA + bool
target/i386/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config I386 + bool + +config X86_64 + bool
target/lm32/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config LM32 + bool
target/m68k/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config M68K + bool
target/microblaze/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config MICROBLAZE + bool
target/mips/Kconfig new file +6 -0
@@ -0,0 +1,6 @@ +config MIPS + bool + +config MIPS64 + bool + select MIPS
target/moxie/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config MOXIE + bool
target/nios2/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config NIOS2 + bool
target/openrisc/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config OPENRISC + bool
target/ppc/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config PPC + bool + +config PPC64 + bool
target/riscv/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config RISCV32 + bool + +config RISCV64 + bool
target/rx/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config RX + bool
target/s390x/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config S390X + bool
target/sh4/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config SH4 + bool
target/sparc/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config SPARC + bool + +config SPARC64 + bool
target/tilegx/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config TILEGX + bool
target/tricore/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config TRICORE + bool
target/unicore32/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config UNICORE32 + bool
target/xtensa/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config XTENSA + bool
Signature · 1 line
2.26.2
Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
вс, 31 янв. 2021 г., 12:13 Philippe Mathieu-Daudé <[email protected]>:
Quoted 9 lines
Add a target-specific
Kconfig.Target foo now has
CONFIG_FOOdefined.Two architecture have a particularity, ARM and MIPS:
their 64-bit version include the 32-bit subset.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
For SPARC part:
---
Quoted 318 lines
I suppose
X86_64should also select I386?
No clue about PPC/RISCV.--- meson.build | 3 ++- Kconfig | 1 + target/Kconfig | 23 +++++++++++++++++++++++ target/alpha/Kconfig | 2 ++ target/arm/Kconfig | 6 ++++++ target/avr/Kconfig | 2 ++ target/cris/Kconfig | 2 ++ target/hppa/Kconfig | 2 ++ target/i386/Kconfig | 5 +++++ target/lm32/Kconfig | 2 ++ target/m68k/Kconfig | 2 ++ target/microblaze/Kconfig | 2 ++ target/mips/Kconfig | 6 ++++++ target/moxie/Kconfig | 2 ++ target/nios2/Kconfig | 2 ++ target/openrisc/Kconfig | 2 ++ target/ppc/Kconfig | 5 +++++ target/riscv/Kconfig | 5 +++++ target/rx/Kconfig | 2 ++ target/s390x/Kconfig | 2 ++ target/sh4/Kconfig | 2 ++ target/sparc/Kconfig | 5 +++++ target/tilegx/Kconfig | 2 ++ target/tricore/Kconfig | 2 ++ target/unicore32/Kconfig | 2 ++ target/xtensa/Kconfig | 2 ++ 26 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 target/Kconfig create mode 100644 target/alpha/Kconfig create mode 100644 target/arm/Kconfig create mode 100644 target/avr/Kconfig create mode 100644 target/cris/Kconfig create mode 100644 target/hppa/Kconfig create mode 100644 target/i386/Kconfig create mode 100644 target/lm32/Kconfig create mode 100644 target/m68k/Kconfig create mode 100644 target/microblaze/Kconfig create mode 100644 target/mips/Kconfig create mode 100644 target/moxie/Kconfig create mode 100644 target/nios2/Kconfig create mode 100644 target/openrisc/Kconfig create mode 100644 target/ppc/Kconfig create mode 100644 target/riscv/Kconfig create mode 100644 target/rx/Kconfig create mode 100644 target/s390x/Kconfig create mode 100644 target/sh4/Kconfig create mode 100644 target/sparc/Kconfig create mode 100644 target/tilegx/Kconfig create mode 100644 target/tricore/Kconfig create mode 100644 target/unicore32/Kconfig create mode 100644 target/xtensa/Kconfigmeson.build +2
-1@@ -1322,7 +1322,8 @@ command: [minikconf, get_option('default_devices') ? '--defconfig' : '--allnoconfig', config_devices_mak, '@DEPFILE@', '@INPUT@', - host_kconfig, accel_kconfig]) + host_kconfig, accel_kconfig, + 'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'])
config_devices_data=configuration_data()config_devices=keyval.load(config_devices_mak)Kconfig +1
-0@@ -1,4 +1,5 @@ source Kconfig.host source backends/Kconfig source accel/Kconfig +source target/Kconfig source hw/Kconfigtarget/Kconfig new file +23
-0@@ -0,0 +1,23 @@ +source alpha/Kconfig +source arm/Kconfig +source avr/Kconfig +source cris/Kconfig +source hppa/Kconfig +source i386/Kconfig +source lm32/Kconfig +source m68k/Kconfig +source microblaze/Kconfig +source mips/Kconfig +source moxie/Kconfig +source nios2/Kconfig +source openrisc/Kconfig +source ppc/Kconfig +source riscv/Kconfig +source rx/Kconfig +source s390x/Kconfig +source sh4/Kconfig +source sparc/Kconfig +source tilegx/Kconfig +source tricore/Kconfig +source unicore32/Kconfig +source xtensa/Kconfigtarget/alpha/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config ALPHA + booltarget/arm/Kconfig new file +6
-0@@ -0,0 +1,6 @@ +config ARM + bool + +config AARCH64 + bool + select ARMtarget/avr/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config AVR + booltarget/cris/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config CRIS + booltarget/hppa/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config HPPA + booltarget/i386/Kconfig new file +5
-0@@ -0,0 +1,5 @@ +config I386 + bool + +config X86_64 + booltarget/lm32/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config LM32 + booltarget/m68k/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config M68K + booltarget/microblaze/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config MICROBLAZE + booltarget/mips/Kconfig new file +6
-0@@ -0,0 +1,6 @@ +config MIPS + bool + +config MIPS64 + bool + select MIPStarget/moxie/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config MOXIE + booltarget/nios2/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config NIOS2 + booltarget/openrisc/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config OPENRISC + booltarget/ppc/Kconfig new file +5
-0@@ -0,0 +1,5 @@ +config PPC + bool + +config PPC64 + booltarget/riscv/Kconfig new file +5
-0@@ -0,0 +1,5 @@ +config RISCV32 + bool + +config RISCV64 + booltarget/rx/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config RX + booltarget/s390x/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config S390X + booltarget/sh4/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config SH4 + booltarget/sparc/Kconfig new file +5
-0@@ -0,0 +1,5 @@ +config SPARC + bool + +config SPARC64 + booltarget/tilegx/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config TILEGX + booltarget/tricore/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config TRICORE + booltarget/unicore32/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config UNICORE32 + booltarget/xtensa/Kconfig new file +2
-1@@ -0,0 +1,2 @@ +config XTENSA + bool --2.26.2
Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
In reply to Philippe Mathieu-DaudéQuoted 9 lines · Philippe Mathieu-Daudé
Add a target-specific
Kconfig.Target foo now has
CONFIG_FOOdefined.Two architecture have a particularity, ARM and MIPS:
their 64-bit version include the 32-bit subset.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
...
Quoted 59 lines
meson.build +2
-1@@ -1322,7 +1322,8 @@ command: [minikconf, get_option('default_devices') ? '--defconfig' : '--allnoconfig', config_devices_mak, '@DEPFILE@', '@INPUT@', - host_kconfig, accel_kconfig]) + host_kconfig, accel_kconfig, + 'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y']) config_devices_data = configuration_data() config_devices = keyval.load(config_devices_mak)Kconfig +1
-0@@ -1,4 +1,5 @@ source Kconfig.host source backends/Kconfig source accel/Kconfig +source target/Kconfig source hw/Kconfigtarget/Kconfig new file +23
-0@@ -0,0 +1,23 @@ +source alpha/Kconfig +source arm/Kconfig +source avr/Kconfig +source cris/Kconfig +source hppa/Kconfig +source i386/Kconfig +source lm32/Kconfig +source m68k/Kconfig +source microblaze/Kconfig +source mips/Kconfig +source moxie/Kconfig +source nios2/Kconfig +source openrisc/Kconfig +source ppc/Kconfig +source riscv/Kconfig +source rx/Kconfig +source s390x/Kconfig +source sh4/Kconfig +source sparc/Kconfig +source tilegx/Kconfig +source tricore/Kconfig +source unicore32/Kconfig +source xtensa/Kconfigtarget/arm/Kconfig new file +0
-0
target/arm/Kconfig line 6
Quoted 6 lines
target/arm/Kconfig new file +6
-0@@ -0,0 +1,6 @@ +config ARM + bool + +config AARCH64 + bool + select ARM
This isn't correct yet, as Kconfig is primarly designed for devices, and per docs/devel/kconfig.rst:
"devices are usually ``default y`` if and only if they have at
least one ``depends on``;"
So having one machine "depends on AARCH64" selects AARCH64 on ARM :/ I'll see if explicit each arch as 'default n' helps...
Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
Quoted 81 lines · Philippe Mathieu-Daudé
Quoted 9 lines · Philippe Mathieu-Daudé
Add a target-specific
Kconfig.Target foo now has
CONFIG_FOOdefined.Two architecture have a particularity, ARM and MIPS:
their 64-bit version include the 32-bit subset.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
...
Quoted 59 lines
meson.build +2
-1@@ -1322,7 +1322,8 @@ command: [minikconf, get_option('default_devices') ? '--defconfig' : '--allnoconfig', config_devices_mak, '@DEPFILE@', '@INPUT@', - host_kconfig, accel_kconfig]) + host_kconfig, accel_kconfig, + 'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y']) config_devices_data = configuration_data() config_devices = keyval.load(config_devices_mak)Kconfig +1
-0@@ -1,4 +1,5 @@ source Kconfig.host source backends/Kconfig source accel/Kconfig +source target/Kconfig source hw/Kconfigtarget/Kconfig new file +23
-0@@ -0,0 +1,23 @@ +source alpha/Kconfig +source arm/Kconfig +source avr/Kconfig +source cris/Kconfig +source hppa/Kconfig +source i386/Kconfig +source lm32/Kconfig +source m68k/Kconfig +source microblaze/Kconfig +source mips/Kconfig +source moxie/Kconfig +source nios2/Kconfig +source openrisc/Kconfig +source ppc/Kconfig +source riscv/Kconfig +source rx/Kconfig +source s390x/Kconfig +source sh4/Kconfig +source sparc/Kconfig +source tilegx/Kconfig +source tricore/Kconfig +source unicore32/Kconfig +source xtensa/Kconfigtarget/arm/Kconfig new file +0
-0target/arm/Kconfig line 6
Quoted 6 lines
target/arm/Kconfig new file +6
-0@@ -0,0 +1,6 @@ +config ARM + bool + +config AARCH64 + bool + select ARMThis isn't correct yet, as
Kconfigis primarly designed for devices, and perdocs/devel/kconfig.rst:
Quoted 5 lines
"devices are usually ``default y`` if and only if they have at
least one ``depends on``;"So having one machine "depends on AARCH64" selects AARCH64 on ARM :/ I'll see if explicit each arch as 'default n' helps...
Taking this comment back, the approach works but is fragile, as an incorrect dependency can select the wrong arch and it is hard to detect.
Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
In reply to Philippe Mathieu-DaudéQuoted 8 lines · Philippe Mathieu-Daudé
Add a target-specific
Kconfig.Target foo now has
CONFIG_FOOdefined.Two architecture have a particularity, ARM and MIPS:
their 64-bit version include the 32-bit subset.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 8 lines
---
I supposeX86_64should also select I386?
No clue about PPC/RISCV.--- meson.build | 3 ++- Kconfig | 1 + target/Kconfig | 23 +++++++++++++++++++++++ target/alpha/Kconfig | 2 ++
Repeating myself through the magic of copy and paste:
In docs/devel/kconfig.rst we make the distinction between:
**subsystems**, of which **buses** are a special case **devices**
**device groups**
**boards**
**internal elements**
I think we need to document the target/* Kconfigs in kconfig.rst at the same time as adding all of these.
Quoted 305 lines
target/arm/Kconfig | 6 ++++++ target/avr/Kconfig | 2 ++ target/cris/Kconfig | 2 ++ target/hppa/Kconfig | 2 ++ target/i386/Kconfig | 5 +++++ target/lm32/Kconfig | 2 ++ target/m68k/Kconfig | 2 ++ target/microblaze/Kconfig | 2 ++ target/mips/Kconfig | 6 ++++++ target/moxie/Kconfig | 2 ++ target/nios2/Kconfig | 2 ++ target/openrisc/Kconfig | 2 ++ target/ppc/Kconfig | 5 +++++ target/riscv/Kconfig | 5 +++++ target/rx/Kconfig | 2 ++ target/s390x/Kconfig | 2 ++ target/sh4/Kconfig | 2 ++ target/sparc/Kconfig | 5 +++++ target/tilegx/Kconfig | 2 ++ target/tricore/Kconfig | 2 ++ target/unicore32/Kconfig | 2 ++ target/xtensa/Kconfig | 2 ++ 26 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 target/Kconfig create mode 100644 target/alpha/Kconfig create mode 100644 target/arm/Kconfig create mode 100644 target/avr/Kconfig create mode 100644 target/cris/Kconfig create mode 100644 target/hppa/Kconfig create mode 100644 target/i386/Kconfig create mode 100644 target/lm32/Kconfig create mode 100644 target/m68k/Kconfig create mode 100644 target/microblaze/Kconfig create mode 100644 target/mips/Kconfig create mode 100644 target/moxie/Kconfig create mode 100644 target/nios2/Kconfig create mode 100644 target/openrisc/Kconfig create mode 100644 target/ppc/Kconfig create mode 100644 target/riscv/Kconfig create mode 100644 target/rx/Kconfig create mode 100644 target/s390x/Kconfig create mode 100644 target/sh4/Kconfig create mode 100644 target/sparc/Kconfig create mode 100644 target/tilegx/Kconfig create mode 100644 target/tricore/Kconfig create mode 100644 target/unicore32/Kconfig create mode 100644 target/xtensa/Kconfigmeson.build +2
-1@@ -1322,7 +1322,8 @@ command: [minikconf, get_option('default_devices') ? '--defconfig' : '--allnoconfig', config_devices_mak, '@DEPFILE@', '@INPUT@', - host_kconfig, accel_kconfig]) + host_kconfig, accel_kconfig, + 'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y']) config_devices_data = configuration_data() config_devices = keyval.load(config_devices_mak)Kconfig +1
-0@@ -1,4 +1,5 @@ source Kconfig.host source backends/Kconfig source accel/Kconfig +source target/Kconfig source hw/Kconfigtarget/Kconfig new file +23
-0@@ -0,0 +1,23 @@ +source alpha/Kconfig +source arm/Kconfig +source avr/Kconfig +source cris/Kconfig +source hppa/Kconfig +source i386/Kconfig +source lm32/Kconfig +source m68k/Kconfig +source microblaze/Kconfig +source mips/Kconfig +source moxie/Kconfig +source nios2/Kconfig +source openrisc/Kconfig +source ppc/Kconfig +source riscv/Kconfig +source rx/Kconfig +source s390x/Kconfig +source sh4/Kconfig +source sparc/Kconfig +source tilegx/Kconfig +source tricore/Kconfig +source unicore32/Kconfig +source xtensa/Kconfigtarget/alpha/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config ALPHA + booltarget/arm/Kconfig new file +6
-0@@ -0,0 +1,6 @@ +config ARM + bool + +config AARCH64 + bool + select ARMtarget/avr/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config AVR + booltarget/cris/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config CRIS + booltarget/hppa/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config HPPA + booltarget/i386/Kconfig new file +5
-0@@ -0,0 +1,5 @@ +config I386 + bool + +config X86_64 + booltarget/lm32/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config LM32 + booltarget/m68k/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config M68K + booltarget/microblaze/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config MICROBLAZE + booltarget/mips/Kconfig new file +6
-0@@ -0,0 +1,6 @@ +config MIPS + bool + +config MIPS64 + bool + select MIPStarget/moxie/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config MOXIE + booltarget/nios2/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config NIOS2 + booltarget/openrisc/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config OPENRISC + booltarget/ppc/Kconfig new file +5
-0@@ -0,0 +1,5 @@ +config PPC + bool + +config PPC64 + booltarget/riscv/Kconfig new file +5
-0@@ -0,0 +1,5 @@ +config RISCV32 + bool + +config RISCV64 + booltarget/rx/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config RX + booltarget/s390x/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config S390X + booltarget/sh4/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config SH4 + booltarget/sparc/Kconfig new file +5
-0@@ -0,0 +1,5 @@ +config SPARC + bool + +config SPARC64 + booltarget/tilegx/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config TILEGX + booltarget/tricore/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config TRICORE + booltarget/unicore32/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config UNICORE32 + booltarget/xtensa/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config XTENSA + bool
Signature · 1 line
Alex Bennée
PATCH 6/10 target/i386: Move SEV feature to target Kconfig
In reply to Philippe Mathieu-DaudéSEV is an architecture feature, move its declaration to target/i386/.
--- hw/i386/Kconfig | 4 ---- target/i386/Kconfig | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-)
hw/i386/Kconfig +0 -4
@@ -1,7 +1,3 @@ -config SEV - bool - depends on KVM - config PC bool imply APPLESMC
target/i386/Kconfig +4 -0
@@ -3,3 +3,7 @@ config I386 config X86_64 bool + +config SEV + bool + depends on KVM && I386
Signature · 1 line
2.26.2
Re: [PATCH 06/10] target/i386: Move SEV feature to target Kconfig
Quoted 1 line · Philippe Mathieu-Daudé
SEV is an architecture feature, move its declaration to target/i386/.
In docs/devel/kconfig.rst we make the distinction between:
**subsystems**, of which **buses** are a special case **devices**
**device groups**
**boards**
**internal elements**
Are we treating architecture features as internal elements or should we add some additional words to the kconfig document before we starting to move stuff there. In fact I realise this is better directed at 5/10 so for this patch:
Quoted 31 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/i386/Kconfig | 4 ---- target/i386/Kconfig | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-)hw/i386/Kconfig +0
-4@@ -1,7 +1,3 @@ -config SEV - bool - depends on KVM - config PC bool imply APPLESMCtarget/i386/Kconfig +4
-0@@ -3,3 +3,7 @@ config I386 config X86_64 bool + +config SEV + bool + depends on KVM && I386
Signature · 1 line
Alex Bennée
PATCH 7/10 target/arm: Move V7M feature to target Kconfig
In reply to Philippe Mathieu-DaudéV7M is an architecture feature, move its declaration to target/arm/.
--- hw/arm/Kconfig | 4 ---- target/arm/Kconfig | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-)
hw/arm/Kconfig +0 -4
@@ -292,10 +292,6 @@ config ZYNQ select XILINX_SPIPS select ZYNQ_DEVCFG -config ARM_V7M - bool - select PTIMER - config ALLWINNER_A10 bool select AHCI
target/arm/Kconfig +4 -0
@@ -4,3 +4,7 @@ config ARM config AARCH64 bool select ARM + +config ARM_V7M + bool + select PTIMER
Signature · 1 line
2.26.2
Re: [PATCH 07/10] target/arm: Move V7M feature to target Kconfig
Quoted 3 lines · Philippe Mathieu-Daudé
V7M is an architecture feature, move its declaration to target/arm/.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
modulo previous comments:
Signature · 1 line
Alex Bennée
PATCH 8/10 default-configs: Remove unnecessary SEMIHOSTING selection
In reply to Philippe Mathieu-DaudéCommit 56b5170c87e ("semihosting: Move ARM semihosting code to shared directories") selected ARM_COMPATIBLE_SEMIHOSTING which already selects SEMIHOSTING. No need to select it again.
--- default-configs/devices/arm-softmmu.mak | 1 - default-configs/devices/riscv32-softmmu.mak | 1 - default-configs/devices/riscv64-softmmu.mak | 1 - 3 files changed, 3 deletions(-)
default-configs/devices/arm-softmmu.mak +0 -1
@@ -41,6 +41,5 @@ CONFIG_MICROBIT=y CONFIG_FSL_IMX25=y CONFIG_FSL_IMX7=y CONFIG_FSL_IMX6UL=y -CONFIG_SEMIHOSTING=y CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y CONFIG_ALLWINNER_H3=y
default-configs/devices/riscv32-softmmu.mak +0 -1
@@ -3,7 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_SEMIHOSTING=y CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards:
default-configs/devices/riscv64-softmmu.mak +0 -1
@@ -3,7 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_SEMIHOSTING=y CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards:
Signature · 1 line
2.26.2
Re: [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection
Quoted 5 lines · Philippe Mathieu-Daudé
Commit
56b5170c87e("semihosting: Move ARM semihosting code to shared directories") selectedARM_COMPATIBLE_SEMIHOSTINGwhich already selects SEMIHOSTING. No need to select it again.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Signature · 1 line
Alex Bennée
Re: [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection
In reply to Philippe Mathieu-DaudéQuoted 6 lines · Philippe Mathieu-Daudé
Commit
56b5170c87e("semihosting: Move ARM semihosting code to shared directories") selectedARM_COMPATIBLE_SEMIHOSTINGwhich already selects SEMIHOSTING. No need to select it again.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Alistair
Quoted 45 lines
--- default-configs/devices/arm-softmmu.mak | 1 - default-configs/devices/riscv32-softmmu.mak | 1 - default-configs/devices/riscv64-softmmu.mak | 1 - 3 files changed, 3 deletions(-)default-configs/devices/arm-softmmu.mak +0
-1@@ -41,6 +41,5 @@ CONFIG_MICROBIT=y CONFIG_FSL_IMX25=y CONFIG_FSL_IMX7=y CONFIG_FSL_IMX6UL=y -CONFIG_SEMIHOSTING=y CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y CONFIG_ALLWINNER_H3=ydefault-configs/devices/riscv32-softmmu.mak +0
-1@@ -3,7 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_SEMIHOSTING=y CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards:default-configs/devices/riscv64-softmmu.mak +0
-2@@ -3,7 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_SEMIHOSTING=y CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards: --2.26.2
PATCH 9/10 target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
In reply to Philippe Mathieu-DaudéARM_COMPATIBLE_SEMIHOSTING is an architecture feature, move its declaration to each target/ARCH/.
Note, we do not modify the linux-user targets, as user-mode builds don't use Kconfig.
--- default-configs/devices/arm-softmmu.mak | 1 - default-configs/devices/riscv32-softmmu.mak | 1 - default-configs/devices/riscv64-softmmu.mak | 1 - target/arm/Kconfig | 1 + target/riscv/Kconfig | 2 ++ 5 files changed, 3 insertions(+), 3 deletions(-)
default-configs/devices/arm-softmmu.mak +0 -1
@@ -41,5 +41,4 @@ CONFIG_MICROBIT=y CONFIG_FSL_IMX25=y CONFIG_FSL_IMX7=y CONFIG_FSL_IMX6UL=y -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y CONFIG_ALLWINNER_H3=y
default-configs/devices/riscv32-softmmu.mak +0 -1
@@ -3,7 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards: #
default-configs/devices/riscv64-softmmu.mak +0 -1
@@ -3,7 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards: #
target/arm/Kconfig +1 -0
@@ -1,5 +1,6 @@ config ARM bool + select ARM_COMPATIBLE_SEMIHOSTING config AARCH64 bool
target/riscv/Kconfig +2 -0
@@ -1,5 +1,7 @@ config RISCV32 bool + select ARM_COMPATIBLE_SEMIHOSTING config RISCV64 bool + select ARM_COMPATIBLE_SEMIHOSTING
Signature · 1 line
2.26.2
Re: [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
Quoted 7 lines · Philippe Mathieu-Daudé
ARM_COMPATIBLE_SEMIHOSTINGis an architecture feature, move its declaration to each target/ARCH/.Note, we do not modify the linux-user targets, as user-mode builds don't use
Kconfig.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Signature · 1 line
Alex Bennée
Re: [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
In reply to Philippe Mathieu-DaudéQuoted 8 lines · Philippe Mathieu-Daudé
ARM_COMPATIBLE_SEMIHOSTINGis an architecture feature, move its declaration to each target/ARCH/.Note, we do not modify the linux-user targets, as user-mode builds don't use
Kconfig.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Alistair
Quoted 69 lines
--- default-configs/devices/arm-softmmu.mak | 1 - default-configs/devices/riscv32-softmmu.mak | 1 - default-configs/devices/riscv64-softmmu.mak | 1 - target/arm/Kconfig | 1 + target/riscv/Kconfig | 2 ++ 5 files changed, 3 insertions(+), 3 deletions(-)default-configs/devices/arm-softmmu.mak +0
-1@@ -41,5 +41,4 @@ CONFIG_MICROBIT=y CONFIG_FSL_IMX25=y CONFIG_FSL_IMX7=y CONFIG_FSL_IMX6UL=y -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y CONFIG_ALLWINNER_H3=ydefault-configs/devices/riscv32-softmmu.mak +0
-1@@ -3,7 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards: #default-configs/devices/riscv64-softmmu.mak +0
-1@@ -3,7 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards: #target/arm/Kconfig +1
-0@@ -1,5 +1,6 @@ config ARM bool + select ARM_COMPATIBLE_SEMIHOSTING config AARCH64 booltarget/riscv/Kconfig +2
-1@@ -1,5 +1,7 @@ config RISCV32 bool + select ARM_COMPATIBLE_SEMIHOSTING config RISCV64 bool + select ARM_COMPATIBLE_SEMIHOSTING --2.26.2
PATCH 10/10 target: Move SEMIHOSTING feature to target Kconfig
In reply to Philippe Mathieu-DaudéSEMIHOSTING is an architecture feature, move its declaration to each target/ARCH/.
--- default-configs/devices/lm32-softmmu.mak | 2 -- default-configs/devices/m68k-softmmu.mak | 2 -- default-configs/devices/mips-softmmu-common.mak | 3 --- default-configs/devices/nios2-softmmu.mak | 2 -- default-configs/devices/unicore32-softmmu.mak | 1 - default-configs/devices/xtensa-softmmu.mak | 2 -- target/lm32/Kconfig | 1 + target/m68k/Kconfig | 1 + target/mips/Kconfig | 1 + target/nios2/Kconfig | 1 + target/unicore32/Kconfig | 1 + target/xtensa/Kconfig | 1 + 12 files changed, 6 insertions(+), 12 deletions(-)
default-configs/devices/lm32-softmmu.mak +0 -2
@@ -4,8 +4,6 @@ # #CONFIG_MILKYMIST_TMU2=n # disabling it actually causes compile-time failures -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_LM32_EVR=y
default-configs/devices/m68k-softmmu.mak +0 -2
@@ -1,7 +1,5 @@ # Default configuration for m68k-softmmu -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_AN5206=y
default-configs/devices/mips-softmmu-common.mak +0 -3
@@ -1,8 +1,5 @@ # Common mips*-softmmu CONFIG defines -# CONFIG_SEMIHOSTING is always required on this architecture -CONFIG_SEMIHOSTING=y - CONFIG_ISA_BUS=y CONFIG_PCI=y CONFIG_PCI_DEVICES=y
default-configs/devices/nios2-softmmu.mak +0 -2
@@ -1,7 +1,5 @@ # Default configuration for nios2-softmmu -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_NIOS2_10M50=y
default-configs/devices/unicore32-softmmu.mak +0 -1
@@ -3,4 +3,3 @@ # Boards: # CONFIG_PUV3=y -CONFIG_SEMIHOSTING=y
default-configs/devices/xtensa-softmmu.mak +0 -2
@@ -1,7 +1,5 @@ # Default configuration for Xtensa -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_XTENSA_SIM=y
target/lm32/Kconfig +1 -0
@@ -1,2 +1,3 @@ config LM32 bool + select SEMIHOSTING
target/m68k/Kconfig +1 -0
@@ -1,2 +1,3 @@ config M68K bool + select SEMIHOSTING
target/mips/Kconfig +1 -0
@@ -1,5 +1,6 @@ config MIPS bool + select SEMIHOSTING config MIPS64 bool
target/nios2/Kconfig +1 -0
@@ -1,2 +1,3 @@ config NIOS2 bool + select SEMIHOSTING
target/unicore32/Kconfig +1 -0
@@ -1,2 +1,3 @@ config UNICORE32 bool + select SEMIHOSTING
target/xtensa/Kconfig +1 -0
@@ -1,2 +1,3 @@ config XTENSA bool + select SEMIHOSTING
Signature · 1 line
2.26.2
Re: [PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig
Quoted 2 lines · Philippe Mathieu-Daudé
SEMIHOSTING is an architecture feature, move its declaration to each target/ARCH/.
I'm going to punt on this one and leave it to the arch maintainers to opine because AIUI in a lot of cases semihosting is more of a "useful hack" than something mandated by the architecture.
Quoted 139 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- default-configs/devices/lm32-softmmu.mak | 2 -- default-configs/devices/m68k-softmmu.mak | 2 -- default-configs/devices/mips-softmmu-common.mak | 3 --- default-configs/devices/nios2-softmmu.mak | 2 -- default-configs/devices/unicore32-softmmu.mak | 1 - default-configs/devices/xtensa-softmmu.mak | 2 -- target/lm32/Kconfig | 1 + target/m68k/Kconfig | 1 + target/mips/Kconfig | 1 + target/nios2/Kconfig | 1 + target/unicore32/Kconfig | 1 + target/xtensa/Kconfig | 1 + 12 files changed, 6 insertions(+), 12 deletions(-)default-configs/devices/lm32-softmmu.mak +0
-2@@ -4,8 +4,6 @@ # #CONFIG_MILKYMIST_TMU2=n # disabling it actually causes compile-time failures -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_LM32_EVR=ydefault-configs/devices/m68k-softmmu.mak +0
-2@@ -1,7 +1,5 @@ # Default configuration for m68k-softmmu -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_AN5206=ydefault-configs/devices/mips-softmmu-common.mak +0
-3@@ -1,8 +1,5 @@ # Common mips*-softmmu CONFIG defines -# CONFIG_SEMIHOSTING is always required on this architecture -CONFIG_SEMIHOSTING=y - CONFIG_ISA_BUS=y CONFIG_PCI=y CONFIG_PCI_DEVICES=ydefault-configs/devices/nios2-softmmu.mak +0
-2@@ -1,7 +1,5 @@ # Default configuration for nios2-softmmu -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_NIOS2_10M50=ydefault-configs/devices/unicore32-softmmu.mak +0
-1@@ -3,4 +3,3 @@ # Boards: # CONFIG_PUV3=y -CONFIG_SEMIHOSTING=ydefault-configs/devices/xtensa-softmmu.mak +0
-2@@ -1,7 +1,5 @@ # Default configuration for Xtensa -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_XTENSA_SIM=ytarget/lm32/Kconfig +1
-0@@ -1,2 +1,3 @@ config LM32 bool + select SEMIHOSTINGtarget/m68k/Kconfig +1
-0@@ -1,2 +1,3 @@ config M68K bool + select SEMIHOSTINGtarget/mips/Kconfig +1
-0@@ -1,5 +1,6 @@ config MIPS bool + select SEMIHOSTING config MIPS64 booltarget/nios2/Kconfig +1
-0@@ -1,2 +1,3 @@ config NIOS2 bool + select SEMIHOSTINGtarget/unicore32/Kconfig +1
-0@@ -1,2 +1,3 @@ config UNICORE32 bool + select SEMIHOSTINGtarget/xtensa/Kconfig +1
-0@@ -1,2 +1,3 @@ config XTENSA bool + select SEMIHOSTING
Signature · 1 line
Alex Bennée
Hi all, where are we with this series?
I am trying to figure out how to apply the whole thing,
in order to build only compatible ARM boards and devices for KVM-only builds.
Ie, I would like to combine this with:
"arm cleanup experiment for kvm-only build"
https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg02790.html
My series there gets us to a buildable and working KVM-only ARM target, with all make check tests passing.
However, in order to be able to remove more code, remove stubs etc,
I found the presence of incompatible ARM boards and devices as blocking additional cleanups.
Therefore, in order to proceed with additional cleanup in arm, and adding the accel-specific extensions to the cpu class, I see being able to disable incompatible boards for KVM as necessary.
IIUC there are:
* This series "target: Provide target-specific Kconfig"
* Support disabling TCG on ARM ?
* Support disabling TCG on ARM (part 2) ?
What is the current state here?
Thanks,
Claudio
Quoted 105 lines · Philippe Mathieu-Daudé
Hi,
This series add a
Kconfigfile to each target, allowing to select target-specific features there, instead of from the hardwareKconfig.This simplifies managing multi-arch features such semihosting.
Series organization:
1/ Some targets use the architecture symbol to select boards and peripherals (SH4 and LM32), we need to clean that first.
2/ Introduce empty target
Kconfig, update meson.3/ Move architectural features out of hardware:
- x86 SEV
- ARM v7m
- generic semihosting[following only important to patchew, unrelated to this series]
Based-on: <[email protected]>Philippe Mathieu-Daudé (10):
hw/sh4/Kconfig: RenameCONFIG_SH4->CONFIG_SH4_PERIPHERALShw/lm32/Kconfig: IntroduceCONFIG_LM32_EVRfor lm32-evr/uclinux boards hw/sh4/Kconfig: RenameCONFIG_LM32->CONFIG_LM32_PERIPHERALShw/lm32/Kconfig: Have MILKYMIST selectLM32_PERIPHERALS
meson: Introduce target-specificKconfig
target/i386: Move SEV feature to targetKconfigtarget/arm: Move V7M feature to targetKconfig
default-configs: Remove unnecessary SEMIHOSTING selection
target: MoveARM_COMPATIBLE_SEMIHOSTINGfeature to targetKconfig
target: Move SEMIHOSTING feature to targetKconfigdefault-configs/devices/arm-softmmu.mak | 2 -- default-configs/devices/lm32-softmmu.mak | 4 +--- default-configs/devices/m68k-softmmu.mak | 2 -- .../devices/mips-softmmu-common.mak | 3 --- default-configs/devices/nios2-softmmu.mak | 2 -- default-configs/devices/riscv32-softmmu.mak | 2 -- default-configs/devices/riscv64-softmmu.mak | 2 -- default-configs/devices/unicore32-softmmu.mak | 1 - default-configs/devices/xtensa-softmmu.mak | 2 -- meson.build | 3 ++- Kconfig | 1 + hw/arm/Kconfig | 4 ---- hw/block/meson.build | 2 +- hw/char/meson.build | 6 ++--- hw/i386/Kconfig | 4 ---- hw/intc/meson.build | 4 ++-- hw/lm32/Kconfig | 10 +++++--- hw/lm32/meson.build | 2 +- hw/sh4/Kconfig | 6 ++--- hw/timer/meson.build | 4 ++-- target/Kconfig | 23 +++++++++++++++++++ target/alpha/Kconfig | 2 ++ target/arm/Kconfig | 11 +++++++++ target/avr/Kconfig | 2 ++ target/cris/Kconfig | 2 ++ target/hppa/Kconfig | 2 ++ target/i386/Kconfig | 9 ++++++++ target/lm32/Kconfig | 3 +++ target/m68k/Kconfig | 3 +++ target/microblaze/Kconfig | 2 ++ target/mips/Kconfig | 7 ++++++ target/moxie/Kconfig | 2 ++ target/nios2/Kconfig | 3 +++ target/openrisc/Kconfig | 2 ++ target/ppc/Kconfig | 5 ++++ target/riscv/Kconfig | 7 ++++++ target/rx/Kconfig | 2 ++ target/s390x/Kconfig | 2 ++ target/sh4/Kconfig | 2 ++ target/sparc/Kconfig | 5 ++++ target/tilegx/Kconfig | 2 ++ target/tricore/Kconfig | 2 ++ target/unicore32/Kconfig | 3 +++ target/xtensa/Kconfig | 3 +++ 44 files changed, 129 insertions(+), 43 deletions(-) create mode 100644 target/Kconfig create mode 100644 target/alpha/Kconfig create mode 100644 target/arm/Kconfig create mode 100644 target/avr/Kconfig create mode 100644 target/cris/Kconfig create mode 100644 target/hppa/Kconfig create mode 100644 target/i386/Kconfig create mode 100644 target/lm32/Kconfig create mode 100644 target/m68k/Kconfig create mode 100644 target/microblaze/Kconfig create mode 100644 target/mips/Kconfig create mode 100644 target/moxie/Kconfig create mode 100644 target/nios2/Kconfig create mode 100644 target/openrisc/Kconfig create mode 100644 target/ppc/Kconfig create mode 100644 target/riscv/Kconfig create mode 100644 target/rx/Kconfig create mode 100644 target/s390x/Kconfig create mode 100644 target/sh4/Kconfig create mode 100644 target/sparc/Kconfig create mode 100644 target/tilegx/Kconfig create mode 100644 target/tricore/Kconfig create mode 100644 target/unicore32/Kconfig create mode 100644 target/xtensa/Kconfig