It's easy to get the sw stack wrongly configured and end up having no
MECIDs being setup different from zero. If this happens FEAT_MEC isn't
stressed because a MECID 0 won't cause mismatches. This commit is just
a printf to allow double checking that MECIDs being provided by TF-RMM
are not zero.
This commit is just for debugging purposes and will be discarded.
Please uncomment the line to make it effective.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
---
target/arm/ptw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index aacc32ba33..bf58ac656f 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -3939,6 +3939,9 @@ static bool mecid_check(CPUARMState *env, S1Translate *ptw, hwaddr va,
*/
if (access_type == MMU_DATA_STORE) {
/* Store MECID for physical address 'pa'. */
+ if (mecid != 0) {
+ // printf("MECID (in register) stored for va = %lx pa= %lx is %d | s1_mmu_idx = %d and ptw->in_mmu_idx = %d\n", va, pa, mecid, s1_mmu_idx, ptw_mmu_idx);
+ }
set_mecid(env, pa, mecid);
return true;
} else {
--
2.34.1