Skip to content

target/riscv: SOCCP support — platform-defined local interrupts and vendor CSR#144

Open
gzancane wants to merge 2 commits into
libqemu/v11.0from
gzancane/soccp-riscv-patches-v11
Open

target/riscv: SOCCP support — platform-defined local interrupts and vendor CSR#144
gzancane wants to merge 2 commits into
libqemu/v11.0from
gzancane/soccp-riscv-patches-v11

Conversation

@gzancane
Copy link
Copy Markdown

@gzancane gzancane commented Jun 2, 2026

Adds the RISC-V core support required by the Glymur SC8480XP SOCCP subsystem, rebased onto v11

Main Changes:

  • target/riscv: handle platform-defined local interrupts (IRQ >= 12)
    Allows local interrupt sources at IRQ index ≥ 12 (platform-defined range) to
    be delivered to the RISC-V core, as required by the SOCCP PLIC wiring.
  • target/riscv: add vendor CSR 0x7c1 as no-op
    Registers vendor CSR 0x7c1 as a read/write no-op so SOCCP firmware that
    touches it does not trap with an illegal-instruction exception.

@gzancane gzancane self-assigned this Jun 2, 2026
@gzancane gzancane force-pushed the gzancane/soccp-riscv-patches-v11 branch from d00952c to 154be80 Compare June 2, 2026 21:29
gzancane added 2 commits June 2, 2026 14:47
The default case in riscv_cpu_set_irq hits g_assert_not_reached() for
any IRQ number outside the hardcoded set (0-11). The RISC-V privilege
spec allows platform-defined local interrupts starting at IRQ 12.
SC8480XP SOCCP uses IRQ 21 (RSC) and IRQ 27 (qtimer).

Route IRQ >= 12 through riscv_cpu_update_mip() so platforms can use
custom local interrupt numbers without hitting the assertion.

Signed-off-by: Gary Zancanelli <gzancane@qti.qualcomm.com>
Add vendor_core_disable CSR at 0x7c1 with read_zero/write_ignore
semantics. Zephyr firmware on SC8480XP SOCCP accesses this register
during init; without it QEMU raises an illegal instruction exception.

Signed-off-by: Gary Zancanelli <gzancane@qti.qualcomm.com>
@gzancane gzancane force-pushed the gzancane/soccp-riscv-patches-v11 branch from 154be80 to bdbf0ba Compare June 2, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant