blob: ae918da84186db1b71c1d2daf2a5137561ba0e57 [file] [log] [blame]
Antonio de Angelisf1c08512018-02-05 14:55:09 +00001/*
2 * Copyright (c) 2018, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include "tfm_log_defs.h"
9#include "tfm_ns_lock.h"
10
11enum tfm_log_err tfm_log_retrieve(uint32_t size,
Antonio de Angelis9a5bfea2018-03-27 13:13:55 +010012 int32_t start,
Antonio de Angelisf1c08512018-02-05 14:55:09 +000013 uint8_t *buffer,
Antonio de Angelis9a5bfea2018-03-27 13:13:55 +010014 struct tfm_log_info *info)
Antonio de Angelisf1c08512018-02-05 14:55:09 +000015{
16 return tfm_ns_lock_svc_dispatch(SVC_TFM_LOG_RETRIEVE,
Antonio de Angelis9a5bfea2018-03-27 13:13:55 +010017 size,
18 (uint32_t)start,
Antonio de Angelisf1c08512018-02-05 14:55:09 +000019 (uint32_t)buffer,
Antonio de Angelis9a5bfea2018-03-27 13:13:55 +010020 (uint32_t)info);
21}
22
23enum tfm_log_err tfm_log_get_info(struct tfm_log_info *info)
24{
25 return tfm_ns_lock_svc_dispatch(SVC_TFM_LOG_GET_INFO,
26 (uint32_t)info,
27 0,
28 0,
29 0);
30}
31
32enum tfm_log_err tfm_log_delete_items(uint32_t num_items,
33 uint32_t *rem_items)
34{
35 return tfm_ns_lock_svc_dispatch(SVC_TFM_LOG_DELETE_ITEMS,
36 num_items,
37 (uint32_t)rem_items,
38 0,
Antonio de Angelisf1c08512018-02-05 14:55:09 +000039 0);
40}