From 995f226f3f335864d2fca6254af32fa7ab0162e6 Mon Sep 17 00:00:00 2001 From: Chao-ying Fu Date: Tue, 25 Feb 2025 17:47:27 -0800 Subject: 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 Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250226014727.19710-1-cfu@mips.com Signed-off-by: Anup Patel --- docs/platform_requirements.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/platform_requirements.md b/docs/platform_requirements.md index a843febf..dfda4f48 100644 --- a/docs/platform_requirements.md +++ b/docs/platform_requirements.md @@ -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) -- cgit v1.3.1