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/variable_index.h b/components/service/smm_variable/backend/variable_index.h
index 85064a7..80c5e5f 100644
--- a/components/service/smm_variable/backend/variable_index.h
+++ b/components/service/smm_variable/backend/variable_index.h
@@ -150,15 +150,11 @@
  * Removes a variable from the index if it exists.
  *
  * @param[in]  context variable_index
- * @param[in]  guid The variable's guid
- * @param[in]  name_size The name parameter's size
- * @param[in]  name The variable's name
+ * @param[in]  info The variable info corresponding to the entry to remove
  */
 void variable_index_remove(
 	struct variable_index *context,
-	const EFI_GUID *guid,
-	size_t name_size,
-	const int16_t *name);
+	const struct variable_info *info);
 
 /**
  * @brief      Update variable attributes