Commit 86d37bbd authored by Damien Le Moal's avatar Damien Le Moal Committed by Anup Patel
Browse files

lib: sbi: Fix misaligned trap handling



Compile time checks of __riscv_compressed can only check if OpenSBI is
being compiled using compressed instructions or not. Checking this macro
does not indicate if an instruction that generated a misaligned trap is
a compressed instruction or not.

Since the misaligned trap handling code inspects instructions _C_ bits
to detect compressed instructions, we can remove all static checks on
__riscv_compressed and dissociate hanlding of misaligned traps and
OpenSBI compilation.

Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
parent 757bb44e
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