AuditLog: Additional API primitives

-- Add two additional API's to compute the log size
   and remove log items.
-- Amend the log retrieval API to allow specifying
   the index from where to start reading items from
   the log.

Change-Id: Ifdc267806f8b73d4548418f6f632df4a4a376038
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/interface/src/tfm_log_api.c b/interface/src/tfm_log_api.c
index de7a31b..ae918da 100644
--- a/interface/src/tfm_log_api.c
+++ b/interface/src/tfm_log_api.c
@@ -9,12 +9,32 @@
 #include "tfm_ns_lock.h"
 
 enum tfm_log_err tfm_log_retrieve(uint32_t size,
+                                  int32_t start,
                                   uint8_t *buffer,
-                                  uint32_t *log_size)
+                                  struct tfm_log_info *info)
 {
     return tfm_ns_lock_svc_dispatch(SVC_TFM_LOG_RETRIEVE,
-                                    (uint32_t)size,
+                                    size,
+                                    (uint32_t)start,
                                     (uint32_t)buffer,
-                                    (uint32_t)log_size,
+                                    (uint32_t)info);
+}
+
+enum tfm_log_err tfm_log_get_info(struct tfm_log_info *info)
+{
+    return tfm_ns_lock_svc_dispatch(SVC_TFM_LOG_GET_INFO,
+                                    (uint32_t)info,
+                                    0,
+                                    0,
+                                    0);
+}
+
+enum tfm_log_err tfm_log_delete_items(uint32_t num_items,
+                                      uint32_t *rem_items)
+{
+    return tfm_ns_lock_svc_dispatch(SVC_TFM_LOG_DELETE_ITEMS,
+                                    num_items,
+                                    (uint32_t)rem_items,
+                                    0,
                                     0);
 }
diff --git a/interface/src/tfm_log_svc_handler.c b/interface/src/tfm_log_svc_handler.c
index 0a67a78..325d6de 100644
--- a/interface/src/tfm_log_svc_handler.c
+++ b/interface/src/tfm_log_svc_handler.c
@@ -10,8 +10,20 @@
 
 /* SVC function implementations */
 enum tfm_log_err tfm_log_svc_retrieve(uint32_t size,
+                                      int32_t start,
                                       uint8_t* buffer,
-                                      uint32_t *log_size)
+                                      struct tfm_log_info *info)
 {
-    return tfm_log_veneer_retrieve(size, buffer, log_size);
+    return tfm_log_veneer_retrieve(size, start, buffer, info);
+}
+
+enum tfm_log_err tfm_log_svc_get_info(struct tfm_log_info *info)
+{
+    return tfm_log_veneer_get_info(info);
+}
+
+enum tfm_log_err tfm_log_svc_delete_items(uint32_t num_items,
+                                          uint32_t *rem_items)
+{
+    return tfm_log_veneer_delete_items(num_items, rem_items);
 }