Hi all, This series enabled qemu-xtensa board.
For dc232b CPU it needs to be built with toolchain[1]. This is a side product of me investigating architectures physical address != virtual address in U-Boot. Now we can get it covered under CI and regular tests. VirtIO devices are not working as expected, due to U-Boot's assumption on VA == PA everywhere, I'm going to get this fixed later. My Xtensa knowledge is pretty limited, Xtensa people please feel free to point out if I got anything wrong. Thanks [1]: https://github.com/foss-xtensa/toolchain/releases/download/2020.07/x86_64-2020.07-xtensa-dc232b-elf.tar.gz Signed-off-by: Jiaxun Yang <jiaxun.y...@flygoat.com> --- Changes in v3: - Wire up CI - Switch to dc233c CPU, which does not have PA != VA issue, to get CI pass first. - Link to v2: https://lore.kernel.org/r/20240522-qemu-xtensa-v2-0-04bf7e42b...@flygoat.com Changes in v2: - Fix noMMU memory mappings - Addressing Max's comments in other patches - Link to v1: https://lore.kernel.org/r/20240519-qemu-xtensa-v1-0-8fff0cb11...@flygoat.com --- Jiaxun Yang (12): xtensa: Move dram_init to xtfpga board file xtensa: Correct define of _end symbol xtensa: Implement phys virt conversion for PTP_MMU xtensa: Define PLATFORM_ELFFLAGS xtensa: Bring in semihosting headers and config options drivers: serial: Add xtensa semihosting driver drivers: cpu: Add xtensa CPU driver dts/upsteam: Add Makefile for xtensa board: emulation: New board qemu-xtensa doc: New documentation for qemu-xtensa ci: Wire up qemu_xtensa_dc233c [NFC]: CI Changes .azure-pipelines.yml | 5 +- .gitlab-ci.yml | 6 ++ arch/xtensa/Kconfig | 32 +++++++ arch/xtensa/config.mk | 6 ++ arch/xtensa/cpu/cpu.c | 5 - arch/xtensa/cpu/u-boot.lds | 2 + arch/xtensa/dts/virt-u-boot.dtsi | 17 ++++ arch/xtensa/include/asm/addrspace.h | 2 + arch/xtensa/include/asm/io.h | 32 +++++++ arch/xtensa/include/asm/ldscript.h | 1 - arch/xtensa/include/asm/platform/simcall-gdbio.h | 34 +++++++ arch/xtensa/include/asm/platform/simcall-iss.h | 73 ++++++++++++++ arch/xtensa/include/asm/platform/simcall.h | 110 +++++++++++++++++++++ board/cadence/xtfpga/xtfpga.c | 5 + board/emulation/qemu-xtensa/Kconfig | 43 +++++++++ board/emulation/qemu-xtensa/MAINTAINERS | 8 ++ board/emulation/qemu-xtensa/Makefile | 5 + board/emulation/qemu-xtensa/qemu-xtensa.c | 60 ++++++++++++ configs/qemu-xtensa-dc233c_defconfig | 32 +++++++ doc/board/emulation/index.rst | 1 + doc/board/emulation/qemu-xtensa.rst | 33 +++++++ drivers/cpu/Kconfig | 6 ++ drivers/cpu/Makefile | 1 + drivers/cpu/xtensa_cpu.c | 117 +++++++++++++++++++++++ drivers/serial/Kconfig | 18 +++- drivers/serial/Makefile | 1 + drivers/serial/serial_xtensa_semihosting.c | 92 ++++++++++++++++++ dts/upstream/src/xtensa/Makefile | 14 +++ include/configs/qemu-xtensa.h | 36 +++++++ 29 files changed, 789 insertions(+), 8 deletions(-) --- base-commit: 3be9f399e911cfc437a37ac826441f1d96da1c9b change-id: 20240519-qemu-xtensa-5fb95bb474e9 Best regards, -- Jiaxun Yang <jiaxun.y...@flygoat.com>