mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: Emit lr and sc instructions based on -march flags
When -march=rv64im_zalrsc_zicsr is used, provide atomic operations and locks using lr and sc instructions only. Signed-off-by: Chao-ying Fu <cfu@mips.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250226014727.19710-1-cfu@mips.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -19,6 +19,10 @@ Base Platform Requirements
|
||||
The base RISC-V platform requirements for OpenSBI are as follows:
|
||||
|
||||
1. At least rv32ima_zicsr or rv64ima_zicsr required on all HARTs
|
||||
|
||||
* Users may restrict the usage of atomic instructions to lr/sc
|
||||
via rv32im_zalrsc_zicsr or rv64im_zalrsc_zicsr if preferred
|
||||
|
||||
2. At least one HART should have S-mode support because:
|
||||
|
||||
* SBI calls are meant for RISC-V S-mode (Supervisor mode)
|
||||
|
Reference in New Issue
Block a user