From 743bbfcd7e982c4e48ec263fcfae2886e0ee4cfb Mon Sep 17 00:00:00 2001 From: p-szafonimateusz Date: Mon, 19 Feb 2024 17:18:11 +0100 Subject: [PATCH] arch/intel64/Kconfig: add chip choice option this will be useful for auto selecting CPU features --- arch/x86_64/src/intel64/Kconfig | 12 ++++++++++++ boards/Kconfig | 2 +- .../intel64/qemu-intel64/configs/earlyfb/defconfig | 1 + .../intel64/qemu-intel64/configs/nsh/defconfig | 1 + .../intel64/qemu-intel64/configs/ostest/defconfig | 1 + .../intel64/qemu-intel64/configs/pcitest/defconfig | 1 + 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/x86_64/src/intel64/Kconfig b/arch/x86_64/src/intel64/Kconfig index 902e887341..6500104700 100644 --- a/arch/x86_64/src/intel64/Kconfig +++ b/arch/x86_64/src/intel64/Kconfig @@ -6,6 +6,18 @@ if ARCH_INTEL64 comment "intel64 Configuration Options" +choice + prompt "Intel64 Chip Selection" + default ARCH_CHIP_INTEL64_QEMU + +config ARCH_CHIP_INTEL64_QEMU + bool "Intel64 QEMU" + +config ARCH_CHIP_INTEL64_CUSTOM + bool "Custom Intel64 chip" + +endchoice # "Intel64 Chip Selection" + config ARCH_INTEL64_HAVE_TSC_DEADLINE bool "TSC DEADLINE timer support" default y diff --git a/boards/Kconfig b/boards/Kconfig index 48cb30b06b..13ee2855e5 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -1819,7 +1819,7 @@ config ARCH_BOARD_QEMU_I486 config ARCH_BOARD_INTEL64_QEMU bool "Intel64 for Qemu simulator" - depends on ARCH_X86_64 || ARCH_INTEL64 + depends on ARCH_CHIP_INTEL64_QEMU ---help--- Port of NuttX to QEMU in intel64 mode. This port will also run on real generic Intel64 hardware. diff --git a/boards/x86_64/intel64/qemu-intel64/configs/earlyfb/defconfig b/boards/x86_64/intel64/qemu-intel64/configs/earlyfb/defconfig index c8e3896867..eb58159f67 100644 --- a/boards/x86_64/intel64/qemu-intel64/configs/earlyfb/defconfig +++ b/boards/x86_64/intel64/qemu-intel64/configs/earlyfb/defconfig @@ -10,6 +10,7 @@ CONFIG_ARCH="x86_64" CONFIG_ARCH_BOARD="qemu-intel64" CONFIG_ARCH_BOARD_INTEL64_QEMU=y CONFIG_ARCH_CHIP="intel64" +CONFIG_ARCH_CHIP_INTEL64_QEMU=y CONFIG_ARCH_INTEL64_CORE_FREQ_KHZ=2600000 CONFIG_ARCH_SIZET_LONG=y CONFIG_ARCH_X86_64=y diff --git a/boards/x86_64/intel64/qemu-intel64/configs/nsh/defconfig b/boards/x86_64/intel64/qemu-intel64/configs/nsh/defconfig index cc5f5d72ff..e487c9031d 100644 --- a/boards/x86_64/intel64/qemu-intel64/configs/nsh/defconfig +++ b/boards/x86_64/intel64/qemu-intel64/configs/nsh/defconfig @@ -18,6 +18,7 @@ CONFIG_ARCH="x86_64" CONFIG_ARCH_BOARD="qemu-intel64" CONFIG_ARCH_BOARD_INTEL64_QEMU=y CONFIG_ARCH_CHIP="intel64" +CONFIG_ARCH_CHIP_INTEL64_QEMU=y CONFIG_ARCH_INTEL64_CORE_FREQ_KHZ=2600000 CONFIG_ARCH_SIZET_LONG=y CONFIG_ARCH_X86_64=y diff --git a/boards/x86_64/intel64/qemu-intel64/configs/ostest/defconfig b/boards/x86_64/intel64/qemu-intel64/configs/ostest/defconfig index 8e89eacf86..c6ca8f3d85 100644 --- a/boards/x86_64/intel64/qemu-intel64/configs/ostest/defconfig +++ b/boards/x86_64/intel64/qemu-intel64/configs/ostest/defconfig @@ -18,6 +18,7 @@ CONFIG_ARCH="x86_64" CONFIG_ARCH_BOARD="qemu-intel64" CONFIG_ARCH_BOARD_INTEL64_QEMU=y CONFIG_ARCH_CHIP="intel64" +CONFIG_ARCH_CHIP_INTEL64_QEMU=y CONFIG_ARCH_INTEL64_CORE_FREQ_KHZ=2600000 CONFIG_ARCH_SIZET_LONG=y CONFIG_ARCH_X86_64=y diff --git a/boards/x86_64/intel64/qemu-intel64/configs/pcitest/defconfig b/boards/x86_64/intel64/qemu-intel64/configs/pcitest/defconfig index 000ed38c84..d09bab6f82 100644 --- a/boards/x86_64/intel64/qemu-intel64/configs/pcitest/defconfig +++ b/boards/x86_64/intel64/qemu-intel64/configs/pcitest/defconfig @@ -18,6 +18,7 @@ CONFIG_ARCH="x86_64" CONFIG_ARCH_BOARD="qemu-intel64" CONFIG_ARCH_BOARD_INTEL64_QEMU=y CONFIG_ARCH_CHIP="intel64" +CONFIG_ARCH_CHIP_INTEL64_QEMU=y CONFIG_ARCH_INTEL64_CORE_FREQ_KHZ=2600000 CONFIG_ARCH_SIZET_LONG=y CONFIG_ARCH_X86_64=y