Following are the list of changes this series adds,
- Fix the MPU (was a no-op stub).
- Add models for ASCLIN UART, STM timer (system timer) and SCU
for the clock handling.
- Retain TC27x support and use the newly added models.
- Add support for TC39x SoC and triboard KIT_AURIX_TC397_TRB machine
- Interrupt router (IR) is dropped in v2. See changelog for more details.
The peripheral device models originate from the EFS-OpenSource
QEMU fork [1], targeting QEMU 9.x. This series ports them to
the current QEMU master baseline with API fixes and adds TC3x
register support needed for Zephyr RTOS boot.
Changes from the EFS baseline:
- Ported to QEMU 11 APIs (resettable phases, const class_init,
CharFrontend, hw/core/sysbus.h, DEVICE_LITTLE_ENDIAN, etc.)
- SCU: added PLL locked status for Zephyr clock driver
- STM: switched to monotonic counter for deterministic timing
- ASCLIN and SCU accept 8/16/32-bit accesses (iLLD uses byte access).
Interrupt delivery and TC1.8 ISA will follow in separate series.
Single-core emulation only (CPU0). Tested with Aurix Development
Studio (ADS) blinky, Zephyr hello_world and small bare-metal tests.
Existing TCG tests pass.
The downstream release with TC4x and interrupt support is
maintained at [2].
[1] https://github.com/EFS-OpenSource/qemu-tricore-patches
[2] https://gitlab.com/linumiz/infineon/release/qemu-aurix
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
---
Changes in v2:
- rebased to current master.
- dropped interrupt router, which will be sent as separate series.
- addressed review comments related to empty function in UART, moved
register macros from public to specific model implementation for UART,
STM and SCU.
- SCU: set .impl explicitly to 1..4, so byte and half-word accesses reach
the model.
- ASCLIN, SCU: allow 8/16/32-bit accesses as per the TRM.
- ASCLIN: write TXFIFOCON.INW bytes per TXDATA write, instead of always 1 byte.
- tc27x: STM0 at 0xF0000000 as per the TC27x user manual.
- Reviewed-by not included for UART ASCLIN and SCU as the changes in
register access, which needs revisiting.
- Also fixed the review comments related file grouping in commits, moved
MAINTAINER entries in respective commits.
- Link to v1: https://lore.kernel.org/qemu-devel/20260531-dev-ifx-tricore-upstream-rebase-minimal-v1-0-1c39053e5e95@linumiz.com
To: qemu-devel@nongnu.org
Cc: Parthiban Nallathambi <parthiban@linumiz.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
---
Parthiban Nallathambi (9):
target/tricore: replace legacy DPM/CPM CSFRs with CPXE/DPRE/DPWE
target/tricore: implement memory protection in get_physical_address
target/tricore: add tc39x CPU model
hw/char: add TriCore ASCLIN UART controller
hw/timer: add TriCore System Timer Module (STM)
hw/tricore: add System Control Unit (SCU) device
hw/tricore: wire peripherals into tc27x SoC
MAINTAINERS: Add myself as maintainer for TriCore
hw/tricore: add tc39xb SoC and KIT_AURIX_TC397_TRB machine
MAINTAINERS | 7 +-
hw/char/Kconfig | 3 +
hw/char/meson.build | 1 +
hw/char/tricore_asclin.c | 537 +++++++++++++++++++++++++++++++++++++++
hw/timer/Kconfig | 3 +
hw/timer/meson.build | 1 +
hw/timer/tricore_stm.c | 365 ++++++++++++++++++++++++++
hw/tricore/Kconfig | 13 +
hw/tricore/meson.build | 2 +
hw/tricore/tc27x_soc.c | 32 +++
hw/tricore/tc39xb_soc.c | 338 ++++++++++++++++++++++++
hw/tricore/triboard.c | 32 ++-
hw/tricore/tricore_scu.c | 295 +++++++++++++++++++++
include/hw/char/tricore_asclin.h | 41 +++
include/hw/timer/tricore_stm.h | 34 +++
include/hw/tricore/tc27x_soc.h | 9 +
include/hw/tricore/tc39xb_soc.h | 110 ++++++++
include/hw/tricore/triboard.h | 2 +
include/hw/tricore/tricore_scu.h | 45 ++++
target/tricore/cpu.c | 8 +
target/tricore/csfr.h.inc | 20 +-
target/tricore/helper.c | 242 +++++++++++++++++-
22 files changed, 2125 insertions(+), 15 deletions(-)
---
base-commit: b6c4b7e86dec12d07f5cac65265b986d38ee9002
change-id: 20260531-dev-ifx-tricore-upstream-rebase-minimal-e18f56d421a6
Thanks,
--
Parthiban Nallathambi <parthiban@linumiz.com>