blob: a4b1bc89ae4dcb08a9991571b74004b4ce73e50e [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
Jens Wiklanderff1be9e2018-02-01 14:16:57 +01007#ifndef __TA_STORAGE_H
8#define __TA_STORAGE_H
Pascal Brandc639ac82015-07-02 08:53:34 +02009
10#define TA_STORAGE_UUID { 0xb689f2a7, 0x8adf, 0x477a, \
11 { 0x9f, 0x99, 0x32, 0xe9, 0x0c, 0x0a, 0xd0, 0xa2 } }
Jerome Forissiere3854162016-08-12 12:40:12 +020012#define TA_STORAGE2_UUID { 0x731e279e, 0xaafb, 0x4575, \
13 { 0xa7, 0x71, 0x38, 0xca, 0xa6, 0xf0, 0xcc, 0xa6 } }
Pascal Brandc639ac82015-07-02 08:53:34 +020014
Jens Wiklanderfec6bea2023-03-29 14:14:18 +020015struct ta_storage_obj_info {
16 uint32_t object_type;
17 uint32_t object_size;
18 uint32_t max_object_size;
19 uint32_t object_usage;
20 uint32_t data_size;
21 uint32_t data_position;
22 uint32_t handle_flags;
23};
24
Pascal Brand29ee18f2016-05-23 14:13:56 +020025#define TA_STORAGE_CMD_OPEN 0
26#define TA_STORAGE_CMD_CLOSE 1
27#define TA_STORAGE_CMD_READ 2
28#define TA_STORAGE_CMD_WRITE 3
29#define TA_STORAGE_CMD_CREATE 4
30#define TA_STORAGE_CMD_SEEK 5
31#define TA_STORAGE_CMD_UNLINK 6
32#define TA_STORAGE_CMD_RENAME 7
33#define TA_STORAGE_CMD_TRUNC 8
34#define TA_STORAGE_CMD_ALLOC_ENUM 9
35#define TA_STORAGE_CMD_FREE_ENUM 10
36#define TA_STORAGE_CMD_RESET_ENUM 11
37#define TA_STORAGE_CMD_START_ENUM 12
38#define TA_STORAGE_CMD_NEXT_ENUM 13
39#define TA_STORAGE_CMD_CREATE_OVERWRITE 14
40#define TA_STORAGE_CMD_KEY_IN_PERSISTENT 15
41#define TA_STORAGE_CMD_LOOP 16
Jens Wiklandere6d4ddd2016-09-14 15:50:48 +020042#define TA_STORAGE_CMD_RESTRICT_USAGE 17
43#define TA_STORAGE_CMD_ALLOC_OBJ 18
44#define TA_STORAGE_CMD_FREE_OBJ 19
45#define TA_STORAGE_CMD_RESET_OBJ 20
Guanchao Liang31a9cbf2016-12-20 00:35:26 +080046#define TA_STORAGE_CMD_GET_OBJ_INFO 21
Etienne Carriere294ffbd2018-04-26 14:20:35 +020047#define TA_STORAGE_CMD_OPEN_ID_IN_SHM 22
48#define TA_STORAGE_CMD_CREATE_ID_IN_SHM 23
49#define TA_STORAGE_CMD_CREATEOVER_ID_IN_SHM 24
50#define TA_STORAGE_CMD_RENAME_ID_IN_SHM 25
Pascal Brandc639ac82015-07-02 08:53:34 +020051
Jens Wiklanderff1be9e2018-02-01 14:16:57 +010052#endif /*__TA_STORAGE_H*/