blob: f494f5ccc088bb8acfc662e36937b98dd8d11d5f [file] [log] [blame]
Etienne Carriere75141172020-05-16 11:58:23 +02001/* SPDX-License-Identifier: BSD-2-Clause */
Pascal Brandc639ac82015-07-02 08:53:34 +02002/*
3 * Copyright (c) 2014, STMicroelectronics International N.V.
4 * All rights reserved.
Pascal Brandc639ac82015-07-02 08:53:34 +02005 */
6
Jerome Forissierbe344932023-05-29 17:49:23 +02007#include <stdint.h>
8
Jens Wiklanderff1be9e2018-02-01 14:16:57 +01009#ifndef __TA_STORAGE_H
10#define __TA_STORAGE_H
Pascal Brandc639ac82015-07-02 08:53:34 +020011
12#define TA_STORAGE_UUID { 0xb689f2a7, 0x8adf, 0x477a, \
13 { 0x9f, 0x99, 0x32, 0xe9, 0x0c, 0x0a, 0xd0, 0xa2 } }
Jerome Forissiere3854162016-08-12 12:40:12 +020014#define TA_STORAGE2_UUID { 0x731e279e, 0xaafb, 0x4575, \
15 { 0xa7, 0x71, 0x38, 0xca, 0xa6, 0xf0, 0xcc, 0xa6 } }
Pascal Brandc639ac82015-07-02 08:53:34 +020016
Jens Wiklanderfec6bea2023-03-29 14:14:18 +020017struct ta_storage_obj_info {
18 uint32_t object_type;
19 uint32_t object_size;
20 uint32_t max_object_size;
21 uint32_t object_usage;
22 uint32_t data_size;
23 uint32_t data_position;
24 uint32_t handle_flags;
25};
26
Pascal Brand29ee18f2016-05-23 14:13:56 +020027#define TA_STORAGE_CMD_OPEN 0
28#define TA_STORAGE_CMD_CLOSE 1
29#define TA_STORAGE_CMD_READ 2
30#define TA_STORAGE_CMD_WRITE 3
31#define TA_STORAGE_CMD_CREATE 4
32#define TA_STORAGE_CMD_SEEK 5
33#define TA_STORAGE_CMD_UNLINK 6
34#define TA_STORAGE_CMD_RENAME 7
35#define TA_STORAGE_CMD_TRUNC 8
36#define TA_STORAGE_CMD_ALLOC_ENUM 9
37#define TA_STORAGE_CMD_FREE_ENUM 10
38#define TA_STORAGE_CMD_RESET_ENUM 11
39#define TA_STORAGE_CMD_START_ENUM 12
40#define TA_STORAGE_CMD_NEXT_ENUM 13
41#define TA_STORAGE_CMD_CREATE_OVERWRITE 14
42#define TA_STORAGE_CMD_KEY_IN_PERSISTENT 15
43#define TA_STORAGE_CMD_LOOP 16
Jens Wiklandere6d4ddd2016-09-14 15:50:48 +020044#define TA_STORAGE_CMD_RESTRICT_USAGE 17
45#define TA_STORAGE_CMD_ALLOC_OBJ 18
46#define TA_STORAGE_CMD_FREE_OBJ 19
47#define TA_STORAGE_CMD_RESET_OBJ 20
Guanchao Liang31a9cbf2016-12-20 00:35:26 +080048#define TA_STORAGE_CMD_GET_OBJ_INFO 21
Etienne Carriere294ffbd2018-04-26 14:20:35 +020049#define TA_STORAGE_CMD_OPEN_ID_IN_SHM 22
50#define TA_STORAGE_CMD_CREATE_ID_IN_SHM 23
51#define TA_STORAGE_CMD_CREATEOVER_ID_IN_SHM 24
52#define TA_STORAGE_CMD_RENAME_ID_IN_SHM 25
Jerome Forissieraa43c902023-05-29 17:21:00 +020053#define TA_STORAGE_CMD_CLEAR_STORAGE 26
Pascal Brandc639ac82015-07-02 08:53:34 +020054
Jens Wiklanderff1be9e2018-02-01 14:16:57 +010055#endif /*__TA_STORAGE_H*/