This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit f5b2fc371e87a0c41b1429e2c0370b44e347d1ba Author: Yanfeng Liu <[email protected]> AuthorDate: Mon Jul 29 15:13:56 2024 +0800 riscv/qemu-rv: use cluster PLIC/CLINT configs This uses cluster speficic PLIC, CLINT and ACLINT devices in NuttX. Signed-off-by: Yanfeng Liu <[email protected]> --- .../src/qemu-rv/hardware/qemu_rv_memorymap.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/arch/risc-v/src/qemu-rv/hardware/qemu_rv_memorymap.h b/arch/risc-v/src/qemu-rv/hardware/qemu_rv_memorymap.h index 420cefefe9..a2c372f08f 100644 --- a/arch/risc-v/src/qemu-rv/hardware/qemu_rv_memorymap.h +++ b/arch/risc-v/src/qemu-rv/hardware/qemu_rv_memorymap.h @@ -27,11 +27,25 @@ /* Register Base Address ****************************************************/ -#define QEMU_RV_CLINT_BASE 0x02000000 -#define QEMU_RV_ACLINT_BASE 0x02f00000 -#define QEMU_RV_PLIC_BASE 0x0c000000 +#ifdef CONFIG_ARCH_CHIP_QEMU_RV_PLIC +# define QEMU_RV_PLIC_BASE CONFIG_ARCH_CHIP_QEMU_RV_PLIC +#else +# define QEMU_RV_PLIC_BASE 0xc000000 +#endif + +#ifdef CONFIG_ARCH_CHIP_QEMU_RV_CLINT +# define QEMU_RV_CLINT_BASE CONFIG_ARCH_CHIP_QEMU_RV_CLINT +#else +# define QEMU_RV_CLINT_BASE 0x2000000 +#endif + +#ifdef CONFIG_ARCH_CHIP_QEMU_RV_ACLINT +# define QEMU_RV_ACLINT_BASE CONFIG_ARCH_CHIP_QEMU_RV_ACLINT +#else +# define QEMU_RV_ACLINT_BASE 0x2f00000 +#endif -#define QEMU_RV_RESET_BASE 0x100000 +#define QEMU_RV_RESET_BASE 0x100000 #ifdef CONFIG_ARCH_USE_S_MODE # define QEMU_RV_APLIC_BASE 0x0d000000
