target/riscv: SOCCP support — platform-defined local interrupts and vendor CSR#144
Open
gzancane wants to merge 2 commits into
Open
target/riscv: SOCCP support — platform-defined local interrupts and vendor CSR#144gzancane wants to merge 2 commits into
gzancane wants to merge 2 commits into
Conversation
d00952c to
154be80
Compare
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>
154be80 to
bdbf0ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the RISC-V core support required by the Glymur SC8480XP SOCCP subsystem, rebased onto v11
Main Changes:
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.
Registers vendor CSR
0x7c1as a read/write no-op so SOCCP firmware thattouches it does not trap with an illegal-instruction exception.