riscv: clear the instruction cache and all registers when booting
When we get booted we want a clear slate without any leaks from previous supervisors or the firmware. Flush the instruction cache and then clear all registers to known good values. This is really important for the upcoming nommu support that runs on M-mode, but can't really harm when running in S-mode either. Vaguely based on the concepts from opensbi. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NAnup Patel <anup@brainfault.org> Signed-off-by: NPaul Walmsley <paul.walmsley@sifive.com>
Showing
想要评论请 注册 或 登录