diff options
author | johpow01 <john.powell@arm.com> | 2022-03-11 17:50:58 -0600 |
---|---|---|
committer | Manish V Badarkhe <Manish.Badarkhe@arm.com> | 2022-10-05 15:25:28 +0100 |
commit | 2a1cdee4f5e6fe0b90399e442075880acad1869e (patch) | |
tree | fcad28db94567a95dd811092c4df89e812b4cff3 /include/plat | |
parent | e6381f9cf8c0c62c32d5a4765aaf166f50786914 (diff) | |
download | arm-trusted-firmware-2a1cdee4f5e6fe0b90399e442075880acad1869e.tar.gz |
feat(drtm): add platform functions for DRTM
Added platform hooks to retrieve DRTM features and
address map.
Additionally, implemented these hooks for the FVP platform.
Signed-off-by: John Powell <john.powell@arm.com>
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I5621cc9807ffff8139ae8876250147f7b2c76759
Diffstat (limited to 'include/plat')
-rw-r--r-- | include/plat/common/plat_drtm.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/plat/common/plat_drtm.h b/include/plat/common/plat_drtm.h index 3c4e3d536..e9b8d6a70 100644 --- a/include/plat/common/plat_drtm.h +++ b/include/plat/common/plat_drtm.h @@ -7,11 +7,57 @@ #ifndef PLAT_DRTM_H #define PLAT_DRTM_H +#include <stdint.h> +#include <lib/xlat_tables/xlat_tables_compat.h> + +typedef struct { + uint8_t max_num_mem_prot_regions; + uint8_t dma_protection_support; +} plat_drtm_dma_prot_features_t; + +typedef struct { + bool tpm_based_hash_support; + uint32_t firmware_hash_algorithm; +} plat_drtm_tpm_features_t; + +typedef struct { + uint64_t region_address; + uint64_t region_size_type; +} __attribute__((packed)) drtm_mem_region_t; + +/* + * Memory region descriptor table structure as per DRTM beta0 section 3.13 + * Table 11 MEMORY_REGION_DESCRIPTOR_TABLE + */ +typedef struct { + uint16_t revision; + uint16_t reserved; + uint32_t num_regions; + drtm_mem_region_t region[]; +} __attribute__((packed)) drtm_memory_region_descriptor_table_t; + +/* platform specific address map functions */ +const mmap_region_t *plat_get_addr_mmap(void); + /* platform-specific DMA protection functions */ bool plat_has_non_host_platforms(void); bool plat_has_unmanaged_dma_peripherals(void); unsigned int plat_get_total_smmus(void); void plat_enumerate_smmus(const uintptr_t **smmus_out, size_t *smmu_count_out); +const plat_drtm_dma_prot_features_t *plat_drtm_get_dma_prot_features(void); +uint64_t plat_drtm_dma_prot_get_max_table_bytes(void); + +/* platform-specific TPM functions */ +const plat_drtm_tpm_features_t *plat_drtm_get_tpm_features(void); + +/* + * TODO: Implement these functions as per the platform use case, + * as of now none of the platform uses these functions + */ +uint64_t plat_drtm_get_min_size_normal_world_dce(void); +uint64_t plat_drtm_get_tcb_hash_table_size(void); +uint64_t plat_drtm_get_imp_def_dlme_region_size(void); +uint64_t plat_drtm_get_tcb_hash_features(void); #endif /* PLAT_DRTM_H */ |