Add smm variable power fail recovery

An error condition can occur when the smm variable index is written
to NV storage but the corresponding data is not due to a power
failure. This change adds detection and clean-up for this
condition such that the variable index is always consistent
with the data stored in the peristent storage backend.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: Iec88bf0e8a856edf105487354b98d456ef8a60f5
diff --git a/components/service/smm_variable/backend/component.cmake b/components/service/smm_variable/backend/component.cmake
index 707d983..7573a81 100644
--- a/components/service/smm_variable/backend/component.cmake
+++ b/components/service/smm_variable/backend/component.cmake
@@ -11,4 +11,5 @@
 target_sources(${TGT} PRIVATE
 	"${CMAKE_CURRENT_LIST_DIR}/uefi_variable_store.c"
 	"${CMAKE_CURRENT_LIST_DIR}/variable_index.c"
+	"${CMAKE_CURRENT_LIST_DIR}/variable_index_iterator.c"
 	)