Commit Graph

6 Commits

Author SHA1 Message Date
Rahul Pathak
d98da90a19 lib: sbi_illegal_insn: Fix FENCE.TSO emulation infinite trap loop
In case of missing "FENCE.TSO" instruction implementation,
opensbi can emulate the "FENCE.TSO" with "FENCE RW,RW", but
mepc was not incremented to continue from the next instruction
causing infinite trap.

Fixes: cb8271c8 ("lib: sbi_illegal_insn: Add emulation for fence.tso")
Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
2023-04-12 09:21:26 +00:00
Samuel Holland
39d1e698c9 lib: sbi_illegal_insn: Add emulation for fence.tso
While OpenC906 appears to properly decode `fence.tso` as a fence
instruction[1], the version of the C906 taped out in the Allwinner D1
does not, and raises illegal instruction.

Handle this errata by emulating `fence.tso` as `fence rw, rw`.

[1]: https://github.com/T-head-Semi/openc906/blob/30827e7f/C906_RTL_FACTORY/gen_rtl/idu/rtl/aq_idu_id_decd.v#L2097

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
2023-04-12 09:21:16 +00:00
thead_admin
513f62819b Linux_SDK_V1.1.2 Linux_SDK_V1.1.2 2023-03-05 22:36:27 +08:00
thead_admin
bfbb0a7b5d Linux_SDK_V1.0.3 Linux_SDK_V1.0.3 2023-01-04 13:12:26 +08:00
thead_admin
aad6533a3b Linux_SDK_V1.0.2 Linux_SDK_V1.0.2 2022-11-22 15:53:45 +08:00
thead_admin
c0919a898e Linux_SDK_V0.9.5 Linux_SDK_V0.9.5 2022-09-13 11:10:36 +08:00