Commit 30ea8069 authored by Nylon Chen's avatar Nylon Chen Committed by Anup Patel
Browse files

lib: sbi_hart: Enable hcontext and scontext

According to the description in "riscv-state-enable[0]", to access
h/scontext in S-Mode, we need to enable the 57th bit.

If it is not enabled, an "illegal instruction" error will occur.

Link: https://github.com/riscv/riscv-state-enable/blob/a28bfae443f350d5b4c42874f428367d5b322ffe/content.adoc

 [0]

Signed-off-by: default avatarNylon Chen <nylon.chen@sifive.com>
Reviewed-by: default avatarZong Li <zong.li@sifive.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent 4f2be401
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment