SPCI: SPCI_FEATURES implementation.
Change-Id: I1bb3e32808d503ee75303a5e70b41645b2d7e86b
diff --git a/inc/vmapi/hf/call.h b/inc/vmapi/hf/call.h
index 9091875..52396aa 100644
--- a/inc/vmapi/hf/call.h
+++ b/inc/vmapi/hf/call.h
@@ -297,3 +297,19 @@
{
return spci_call((struct spci_value){.func = SPCI_VERSION_32});
}
+
+/**
+ * Discovery function returning information about the implementation of optional
+ * SPCI interfaces.
+ *
+ * Returns:
+ * - SPCI_SUCCESS in .func if the the optional interface with function_id is
+ * implemented.
+ * - SPCI_ERROR in .func if the optional interface with function_id is not
+ * implemented.
+ */
+static inline struct spci_value spci_features(uint32_t function_id)
+{
+ return spci_call((struct spci_value){.func = SPCI_FEATURES_32,
+ .arg1 = function_id});
+}