1 /** 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * 15 * Description: crypto common struct header. \n 16 * 17 * History: \n 18 * 2023-03-22, Create file. \n 19 */ 20 #ifndef CRYPTO_COMMON_STRUCT_H 21 #define CRYPTO_COMMON_STRUCT_H 22 23 #include "crypto_type.h" 24 25 typedef enum { 26 CRYPTO_BUF_SECURE, 27 CRYPTO_BUF_NONSECURE, 28 } crypto_buffer_secure; 29 30 typedef struct { 31 unsigned long long uapi_mem_handle; /* Handle to buffer header address */ 32 unsigned long long addr_offset; /* buffer offset, unused. */ 33 td_void *kapi_mem_handle; 34 35 unsigned long phys_addr; 36 void *virt_addr; 37 crypto_buffer_secure buf_sec; /* NONSECURE or SECURE */ 38 } crypto_buf_attr; 39 40 typedef enum { 41 CPU_ID_AIDSP = 0x00000035, 42 CPU_ID_PCPU = 0x0000006a, 43 CPU_ID_SCPU = 0x000000a5, 44 CPU_ID_ACPU = 0x000000aa, 45 CPU_ID_INVALID = 0xffffffff 46 } ca_misc_cpu_id; 47 48 #endif