feat(rmm): change success condition for RMI_RTT_FOLD
This patch changes "rtte_addr" success condition
for RMI_RTT_FOLD command handler
"fold.state != DESTROYED"
as per RMM Specification 1.0-eac2 by adding case
for assigned destroyed block.
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: Ied729b7e3a7139ff12b8ba9ef082fb958ad47db8
diff --git a/lib/realm/src/s2tt.c b/lib/realm/src/s2tt.c
index a307546..077a641 100644
--- a/lib/realm/src/s2tt.c
+++ b/lib/realm/src/s2tt.c
@@ -1026,6 +1026,15 @@
}
/*
+ * Returns true if all s2ttes are assigned_destroyed and
+ * refer to a contiguous block of granules aligned to @level - 1.
+ */
+bool table_maps_assigned_destroyed_block(unsigned long *table, long level)
+{
+ return __table_maps_block(table, level, s2tte_is_assigned_destroyed);
+}
+
+/*
* Scan the RTT @s2tt (which is @wi.level), from the entry (@wi.index) and
* skip the non-live entries (i.e., HIPAS=UNASSIGNED).
* In other words, the scanning stops when a live RTTE is encountered or we