Commit 81e3ba77 authored by Bo Gan's avatar Bo Gan Committed by Anup Patel
Browse files

lib: sbi: call platform load/store emulators



sbi_load/store_access_handler now tries to call platform emulators
if defined. Otherwise, redirects the fault. If the platform code
returns failure, this means the H/S/U has accessed the emulated
devices in an unexpected manner, which is very likely caused by
buggy code in H/S/U. We redirect the fault, so lower privileged
level can get notified, and act accordingly. (E.g., oops in Linux)

We let the handler truly fail if the trap was originated from M mode.
In this case, something must be very wrong and we should just fail.

Signed-off-by: default avatarBo Gan <ganboing@gmail.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent ddf3b649
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