Skip to content

shartid CSR #20

Closed Answered by matthewgui
aousherovitch-tt asked this question in Q&A
Jan 19, 2024 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

hello, @aousherovitch-tt

Hello, could you please elaborate on why this CSR was needed and how it is used by your OPTEE platform implementation in https://github.com/Nuclei-Software/optee_os/blob/34e68e2b1b27e5222aaee4d9956aa2e53bd98808/core/arch/riscv/plat-nuclei/main.c#L32 (itr_core_handler) ?

Because we use plic as interrupt controller,its claim register is percpu context(https://github.com/riscv/riscv-plic-spec/blob/master/riscv-plic.adoc#2-memory-map), so core hartid is needed.

There are also other uses other than itr_core_handler(), the optee core code is relying on another wrapper for itr_core_handler() - get_core_pos() in https://github.com/Nuclei-Software/optee_os/blob/34e68e2b…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by aousherovitch-tt
Comment options

You must be logged in to vote
2 replies
@fanghuaqi
Comment options

@aousherovitch-tt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants