lib: sbi: Refine the settings for switching to Virtual Supervisor Mode.
authorPope B.Lei <popeblei@gmail.com>
Wed, 10 Apr 2024 02:05:20 +0000 (10:05 +0800)
committerAnup Patel <anup@brainfault.org>
Tue, 7 May 2024 12:42:24 +0000 (18:12 +0530)
commit1d89a9da64e4b4f51c59c44eba2f65b037bc4d95
treecb52d46b2ef9d34fa0172e6adf51feb36c7aafc4
parent033104da08baf52c8b65b56a03363ea238c9ca31
lib: sbi: Refine the settings for switching to Virtual Supervisor Mode.

Although Mstatus.MPV is set, before executing mret, access to VS mode
registers should use the actual register addresses, not the pseudonyms
of S registers.

Signed-off-by: Pope B.Lei <popeblei@gmail.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_hart.c