1 /* 2 * Arm SCP/MCP Software 3 * Copyright (c) 2017-2021, Arm Limited and Contributors. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #ifndef RDN1E1_SDS_H 9 #define RDN1E1_SDS_H 10 11 #include <mod_sds.h> 12 13 #include <stdint.h> 14 15 /* 16 * Structure identifiers. 17 */ 18 enum rdn1e1_sds_struct_id { 19 RDN1E1_SDS_CPU_INFO = 1 | (1 << MOD_SDS_ID_VERSION_MAJOR_POS), 20 RDN1E1_SDS_FIRMWARE_VERSION = 2 | (1 << MOD_SDS_ID_VERSION_MAJOR_POS), 21 RDN1E1_SDS_PLATFORM_ID = 3 | (1 << MOD_SDS_ID_VERSION_MAJOR_POS), 22 RDN1E1_SDS_RESET_SYNDROME = 4 | (1 << MOD_SDS_ID_VERSION_MAJOR_POS), 23 RDN1E1_SDS_FEATURE_AVAILABILITY = 24 5 | (1 << MOD_SDS_ID_VERSION_MAJOR_POS), 25 RDN1E1_SDS_CPU_BOOTCTR = 6 | (1 << MOD_SDS_ID_VERSION_MAJOR_POS), 26 RDN1E1_SDS_CPU_FLAGS = 7 | (1 << MOD_SDS_ID_VERSION_MAJOR_POS), 27 }; 28 29 enum rdn1e1_sds_region_idx { 30 RDN1E1_SDS_REGION_SECURE, 31 #ifdef BUILD_MODE_DEBUG 32 RDN1E1_SDS_REGION_NONSECURE, 33 #endif 34 RDN1E1_SDS_REGION_COUNT, 35 }; 36 37 /* 38 * Structure sizes. 39 */ 40 #define RDN1E1_SDS_CPU_INFO_SIZE 4 41 #define RDN1E1_SDS_FIRMWARE_VERSION_SIZE 4 42 #define RDN1E1_SDS_PLATFORM_ID_SIZE 8 43 #define RDN1E1_SDS_RESET_SYNDROME_SIZE 4 44 #define RDN1E1_SDS_FEATURE_AVAILABILITY_SIZE 4 45 #define RDN1E1_SDS_CPU_BOOTCTR_SIZE 256 46 #define RDN1E1_SDS_CPU_FLAGS_SIZE 256 47 48 /* 49 * Field masks and offsets for the RDN1E1_SDS_AP_CPU_INFO structure. 50 */ 51 #define RDN1E1_SDS_CPU_INFO_PRIMARY_MASK 0xFFFFFFFF 52 #define RDN1E1_SDS_CPU_INFO_PRIMARY_POS 0 53 54 /* 55 * Platform information 56 */ 57 struct rdn1e1_sds_platid { 58 /* Subsystem part number */ 59 uint32_t platform_identifier; 60 /* Platform type information */ 61 uint32_t platform_type_identifier; 62 }; 63 64 /* 65 * Field masks and offsets for the RDN1E1_SDS_FEATURE_AVAILABILITY structure. 66 */ 67 #define RDN1E1_SDS_FEATURE_FIRMWARE_MASK 0x1 68 #define RDN1E1_SDS_FEATURE_DMC_MASK 0x2 69 #define RDN1E1_SDS_FEATURE_MESSAGING_MASK 0x4 70 71 #define RDN1E1_SDS_FEATURE_FIRMWARE_POS 0 72 #define RDN1E1_SDS_FEATURE_DMC_POS 1 73 #define RDN1E1_SDS_FEATURE_MESSAGING_POS 2 74 75 #endif /* RDN1E1_SDS_H */ 76