1 /* 2 * Copyright (c) 2022 Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 #ifndef DRTM_MAIN_H 8 #define DRTM_MAIN_H 9 10 #include <stdint.h> 11 12 #include <lib/smccc.h> 13 14 #include "drtm_dma_prot.h" 15 16 enum drtm_retc { 17 SUCCESS = SMC_OK, 18 NOT_SUPPORTED = SMC_UNK, 19 INVALID_PARAMETERS = -2, 20 DENIED = -3, 21 NOT_FOUND = -4, 22 INTERNAL_ERROR = -5, 23 MEM_PROTECT_INVALID = -6, 24 }; 25 26 typedef struct { 27 uint64_t tpm_features; 28 uint64_t minimum_memory_requirement; 29 uint64_t dma_prot_features; 30 uint64_t boot_pe_id; 31 uint64_t tcb_hash_features; 32 } drtm_features_t; 33 34 drtm_memory_region_descriptor_table_t *drtm_build_address_map(void); 35 uint64_t drtm_get_address_map_size(void); 36 37 #endif /* DRTM_MAIN_H */ 38