Commit 3669153e authored by Inochi Amaoto's avatar Inochi Amaoto Committed by Anup Patel
Browse files

platform: generic: thead: fix stale TLB entries for th1520/sg2042



The TLB entries remain functional all the time once added in T-HEAD th1520
and Sophgo sg2042 (even if the MMU is then disabled afterwards). If there
are some stale TLB entries that contains the address of SBI, it will cause
unexpected memory access and issue a illegal instruction error. To avoid
this, a TLB flush is needed to drop these TLB entries before any memory
access in the trap handler.

To handle this workaroud, add a custom trap handler with executing TLB flush
first in the T-HEAD platform to fix affected socs.

Signed-off-by: default avatarInochi Amaoto <inochiama@outlook.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent b7e9d34e
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