Commit 9cd95e13 authored by Dmitry Dunaev's avatar Dmitry Dunaev Committed by Anup Patel
Browse files

lib: sbi/hart: preserve csr validation value



The OpenSBI hart init function hart_detect_features() try to read
important CSRs but reasign the last read value to the variable that
initially contains write probe value. So for series of CSRs (like
PMPADDRx) the second CSR probe value will became the initial value of
first probing CSR. To avoid of this issue the CSR read value should be
saved in different variable. In this configuration the count of PMP
will detect rightly if any PMPADDR is hardwired to zero.

Signed-off-by: default avatarDmitry Dunaev <dunaich@mail.ru>
Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
parent c1e47d0c
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