optee_utee_sys/utee_types.rs
1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements. See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership. The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License. You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied. See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18use super::*;
19
20#[repr(C)]
21pub enum utee_time_category {
22 UTEE_TIME_CAT_SYSTEM,
23 UTEE_TIME_CAT_TA_PERSISTENT,
24 UTEE_TIME_CAT_REE,
25}
26
27#[repr(C)]
28pub enum utee_entry_func {
29 UTEE_ENTRY_FUNC_OPEN_SESSION,
30 UTEE_ENTRY_FUNC_CLOSE_SESSION,
31 UTEE_ENTRY_FUNC_INVOKE_COMMAND,
32}
33
34#[allow(non_camel_case_types)]
35#[repr(C)]
36pub enum utee_cache_operation {
37 TEE_CACHECLEAN,
38 TEE_CACHEFLUSH,
39 TEE_CACHEINVALIDATE,
40}
41
42#[repr(C)]
43pub struct utee_params {
44 types: u64,
45 vals: [u64; TEE_NUM_PARAMS as usize * 2],
46}
47
48#[repr(C)]
49pub struct utee_attribute {
50 a: u64,
51 b: u64,
52 attribute_id: u32,
53}
54
55#[repr(C)]
56pub struct utee_object_info {
57 obj_type: u32,
58 obj_size: u32,
59 max_obj_size: u32,
60 obj_usage: u32,
61 data_size: u32,
62 data_pos: u32,
63 handle_flags: u32,
64}