1 /* 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2016-2024, Broadcom Inc. All rights reserved. 5 * Support: <fbsd-storage-driver.pdl@broadcom.com> 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are 9 * met: 10 * 11 * 1. Redistributions of source code must retain the above copyright notice, 12 * this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright notice, 14 * this list of conditions and the following disclaimer in the documentation and/or other 15 * materials provided with the distribution. 16 * 3. Neither the name of the Broadcom Inc. nor the names of its contributors 17 * may be used to endorse or promote products derived from this software without 18 * specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * POSSIBILITY OF SUCH DAMAGE. 31 * 32 * The views and conclusions contained in the software and documentation are 33 * those of the authors and should not be interpreted as representing 34 * official policies,either expressed or implied, of the FreeBSD Project. 35 * 36 * Mail to: Broadcom Inc 1320 Ridder Park Dr, San Jose, CA 95131 37 * 38 * Broadcom Inc. (Broadcom) MPI3MR Adapter FreeBSD 39 * 40 */ 41 #ifndef MPI30_IMAGE_H 42 #define MPI30_IMAGE_H 1 43 44 /* Component Image Version */ 45 typedef struct _MPI3_COMP_IMAGE_VERSION 46 { 47 U16 BuildNum; /* 0x00 */ 48 U16 CustomerID; /* 0x02 */ 49 U8 PhaseMinor; /* 0x04 */ 50 U8 PhaseMajor; /* 0x05 */ 51 U8 GenMinor; /* 0x06 */ 52 U8 GenMajor; /* 0x07 */ 53 } MPI3_COMP_IMAGE_VERSION, MPI3_POINTER PTR_MPI3_COMP_IMAGE_VERSION, 54 Mpi3CompImageVersion_t, MPI3_POINTER pMpi3CompImageVersion_t; 55 56 /* Hash Exclusion Format */ 57 typedef struct _MPI3_HASH_EXCLUSION_FORMAT 58 { 59 U32 Offset; /* 0x00 */ 60 U32 Size; /* 0x04 */ 61 } MPI3_HASH_EXCLUSION_FORMAT, MPI3_POINTER PTR_MPI3_HASH_EXCLUSION_FORMAT, 62 Mpi3HashSxclusionFormat_t, MPI3_POINTER pMpi3HashExclusionFormat_t; 63 64 #define MPI3_IMAGE_HASH_EXCUSION_NUM (4) 65 66 /* FW Image Header */ 67 typedef struct _MPI3_COMPONENT_IMAGE_HEADER 68 { 69 U32 Signature0; /* 0x00 */ 70 U32 LoadAddress; /* 0x04 */ 71 U32 DataSize; /* 0x08 */ 72 U32 StartOffset; /* 0x0C */ 73 U32 Signature1; /* 0x10 */ 74 U32 FlashOffset; /* 0x14 */ 75 U32 ImageSize; /* 0x18 */ 76 U32 VersionStringOffset; /* 0x1C */ 77 U32 BuildDateStringOffset; /* 0x20 */ 78 U32 BuildTimeStringOffset; /* 0x24 */ 79 U32 EnvironmentVariableOffset; /* 0x28 */ 80 U32 ApplicationSpecific; /* 0x2C */ 81 U32 Signature2; /* 0x30 */ 82 U32 HeaderSize; /* 0x34 */ 83 U32 Crc; /* 0x38 */ 84 U32 Flags; /* 0x3C */ 85 U32 SecondaryFlashOffset; /* 0x40 */ 86 U32 ETPOffset; /* 0x44 */ 87 U32 ETPSize; /* 0x48 */ 88 MPI3_VERSION_UNION RMCInterfaceVersion; /* 0x4C */ 89 MPI3_VERSION_UNION ETPInterfaceVersion; /* 0x50 */ 90 MPI3_COMP_IMAGE_VERSION ComponentImageVersion; /* 0x54 */ 91 MPI3_HASH_EXCLUSION_FORMAT HashExclusion[MPI3_IMAGE_HASH_EXCUSION_NUM]; /* 0x5C */ 92 U32 NextImageHeaderOffset; /* 0x7C */ 93 MPI3_VERSION_UNION SecurityVersion; /* 0x80 */ 94 U32 Reserved84[31]; /* 0x84 -- 0xFC */ 95 } MPI3_COMPONENT_IMAGE_HEADER, MPI3_POINTER PTR_MPI3_COMPONENT_IMAGE_HEADER, 96 Mpi3ComponentImageHeader_t, MPI3_POINTER pMpi3ComponentImageHeader_t; 97 98 99 /**** Definitions for Signature0 field ****/ 100 #define MPI3_IMAGE_HEADER_SIGNATURE0_MPI3 (0xEB00003E) 101 102 /**** Definitions for LoadAddress field ****/ 103 #define MPI3_IMAGE_HEADER_LOAD_ADDRESS_INVALID (0x00000000) 104 105 /**** Definitions for Signature1 field ****/ 106 #define MPI3_IMAGE_HEADER_SIGNATURE1_APPLICATION (0x20505041) /* string "APP " */ 107 #define MPI3_IMAGE_HEADER_SIGNATURE1_FIRST_MUTABLE (0x20434D46) /* string "FMC " */ 108 #define MPI3_IMAGE_HEADER_SIGNATURE1_BSP (0x20505342) /* string "BSP " */ 109 #define MPI3_IMAGE_HEADER_SIGNATURE1_ROM_BIOS (0x534F4942) /* string "BIOS" */ 110 #define MPI3_IMAGE_HEADER_SIGNATURE1_HII_X64 (0x4D494948) /* string "HIIM" */ 111 #define MPI3_IMAGE_HEADER_SIGNATURE1_HII_ARM (0x41494948) /* string "HIIA" */ 112 #define MPI3_IMAGE_HEADER_SIGNATURE1_CPLD (0x444C5043) /* string "CPLD" */ 113 #define MPI3_IMAGE_HEADER_SIGNATURE1_SPD (0x20445053) /* string "SPD " */ 114 #define MPI3_IMAGE_HEADER_SIGNATURE1_GAS_GAUGE (0x20534147) /* string "GAS " */ 115 #define MPI3_IMAGE_HEADER_SIGNATURE1_PBLP (0x504C4250) /* string "PBLP" */ 116 #define MPI3_IMAGE_HEADER_SIGNATURE1_MANIFEST (0x464E414D) /* string "MANF" */ 117 #define MPI3_IMAGE_HEADER_SIGNATURE1_OEM (0x204D454F) /* string "OEM " */ 118 #define MPI3_IMAGE_HEADER_SIGNATURE1_RMC (0x20434D52) /* string "RMC " */ 119 #define MPI3_IMAGE_HEADER_SIGNATURE1_SMM (0x204D4D53) /* string "SMM " */ 120 #define MPI3_IMAGE_HEADER_SIGNATURE1_PSW (0x20575350) /* string "PSW " */ 121 #define MPI3_IMAGE_HEADER_SIGNATURE1_CSW (0x20575343) /* string "CSW " */ 122 123 /**** Definitions for Signature2 field ****/ 124 #define MPI3_IMAGE_HEADER_SIGNATURE2_VALUE (0x50584546) 125 126 /**** Definitions for Flags field ****/ 127 #define MPI3_IMAGE_HEADER_FLAGS_SIGNED_UEFI_MASK (0x00000300) 128 #define MPI3_IMAGE_HEADER_FLAGS_SIGNED_UEFI_UNSPECIFIED (0x00000000) 129 #define MPI3_IMAGE_HEADER_FLAGS_SIGNED_UEFI_NOT_SIGNED (0x00000100) 130 #define MPI3_IMAGE_HEADER_FLAGS_SIGNED_UEFI_MICROSOFT_SIGNED (0x00000200) 131 #define MPI3_IMAGE_HEADER_FLAGS_CERT_CHAIN_FORMAT_MASK (0x000000C0) 132 #define MPI3_IMAGE_HEADER_FLAGS_CERT_CHAIN_FORMAT_DEVICE_CERT (0x00000000) 133 #define MPI3_IMAGE_HEADER_FLAGS_CERT_CHAIN_FORMAT_ALIAS_CERT (0x00000040) 134 #define MPI3_IMAGE_HEADER_FLAGS_DEVICE_KEY_BASIS_MASK (0x00000030) 135 #define MPI3_IMAGE_HEADER_FLAGS_DEVICE_KEY_BASIS_CDI (0x00000000) 136 #define MPI3_IMAGE_HEADER_FLAGS_DEVICE_KEY_BASIS_DI (0x00000010) 137 #define MPI3_IMAGE_HEADER_FLAGS_SIGNED_NVDATA (0x00000008) 138 #define MPI3_IMAGE_HEADER_FLAGS_REQUIRES_ACTIVATION (0x00000004) 139 #define MPI3_IMAGE_HEADER_FLAGS_COMPRESSED (0x00000002) 140 #define MPI3_IMAGE_HEADER_FLAGS_FLASH (0x00000001) 141 142 143 /**** Offsets for Image Header Fields ****/ 144 #define MPI3_IMAGE_HEADER_SIGNATURE0_OFFSET (0x00) 145 #define MPI3_IMAGE_HEADER_LOAD_ADDRESS_OFFSET (0x04) 146 #define MPI3_IMAGE_HEADER_DATA_SIZE_OFFSET (0x08) 147 #define MPI3_IMAGE_HEADER_START_OFFSET_OFFSET (0x0C) 148 #define MPI3_IMAGE_HEADER_SIGNATURE1_OFFSET (0x10) 149 #define MPI3_IMAGE_HEADER_FLASH_OFFSET_OFFSET (0x14) 150 #define MPI3_IMAGE_HEADER_FLASH_SIZE_OFFSET (0x18) 151 #define MPI3_IMAGE_HEADER_VERSION_STRING_OFFSET_OFFSET (0x1C) 152 #define MPI3_IMAGE_HEADER_BUILD_DATE_STRING_OFFSET_OFFSET (0x20) 153 #define MPI3_IMAGE_HEADER_BUILD_TIME_OFFSET_OFFSET (0x24) 154 #define MPI3_IMAGE_HEADER_ENVIROMENT_VAR_OFFSET_OFFSET (0x28) 155 #define MPI3_IMAGE_HEADER_APPLICATION_SPECIFIC_OFFSET (0x2C) 156 #define MPI3_IMAGE_HEADER_SIGNATURE2_OFFSET (0x30) 157 #define MPI3_IMAGE_HEADER_HEADER_SIZE_OFFSET (0x34) 158 #define MPI3_IMAGE_HEADER_CRC_OFFSET (0x38) 159 #define MPI3_IMAGE_HEADER_FLAGS_OFFSET (0x3C) 160 #define MPI3_IMAGE_HEADER_SECONDARY_FLASH_OFFSET_OFFSET (0x40) 161 #define MPI3_IMAGE_HEADER_ETP_OFFSET_OFFSET (0x44) 162 #define MPI3_IMAGE_HEADER_ETP_SIZE_OFFSET (0x48) 163 #define MPI3_IMAGE_HEADER_RMC_INTERFACE_VER_OFFSET (0x4C) 164 #define MPI3_IMAGE_HEADER_ETP_INTERFACE_VER_OFFSET (0x50) 165 #define MPI3_IMAGE_HEADER_COMPONENT_IMAGE_VER_OFFSET (0x54) 166 #define MPI3_IMAGE_HEADER_HASH_EXCLUSION_OFFSET (0x5C) 167 #define MPI3_IMAGE_HEADER_NEXT_IMAGE_HEADER_OFFSET_OFFSET (0x7C) 168 169 170 #define MPI3_IMAGE_HEADER_SIZE (0x100) 171 172 173 174 /***************************************************************************** 175 * Component Image Data * 176 *****************************************************************************/ 177 178 /* Package Manifest Data */ 179 180 #ifndef MPI3_CI_MANIFEST_MPI_MAX 181 #define MPI3_CI_MANIFEST_MPI_MAX (1) 182 #endif /* MPI3_CI_MANIFEST_MPI_MAX */ 183 184 typedef struct _MPI3_CI_MANIFEST_MPI_COMP_IMAGE_REF 185 { 186 U32 Signature1; /* 0x00 */ 187 U32 Reserved04[3]; /* 0x04 */ 188 MPI3_COMP_IMAGE_VERSION ComponentImageVersion; /* 0x10 */ 189 U32 ComponentImageVersionStringOffset; /* 0x18 */ 190 U32 CRC; /* 0x1C */ 191 } MPI3_CI_MANIFEST_MPI_COMP_IMAGE_REF, MPI3_POINTER PTR_MPI3_CI_MANIFEST_MPI_COMP_IMAGE_REF, 192 Mpi3CIManifestMpiCompImageRef_t, MPI3_POINTER pMpi3CIManifestMpiCompImageRef_t; 193 194 typedef struct _MPI3_CI_MANIFEST_MPI 195 { 196 U8 ManifestType; /* 0x00 */ 197 U8 Reserved01[3]; /* 0x01 */ 198 U32 Reserved04[3]; /* 0x04 */ 199 U8 NumImageReferences; /* 0x10 */ 200 U8 ReleaseLevel; /* 0x11 */ 201 U16 Reserved12; /* 0x12 */ 202 U16 Reserved14; /* 0x14 */ 203 U16 Flags; /* 0x16 */ 204 U32 Reserved18[2]; /* 0x18 */ 205 U16 VendorID; /* 0x20 */ 206 U16 DeviceID; /* 0x22 */ 207 U16 SubsystemVendorID; /* 0x24 */ 208 U16 SubsystemID; /* 0x26 */ 209 U32 Reserved28[2]; /* 0x28 */ 210 MPI3_VERSION_UNION PackageSecurityVersion; /* 0x30 */ 211 U32 Reserved34; /* 0x34 */ 212 MPI3_COMP_IMAGE_VERSION PackageVersion; /* 0x38 */ 213 U32 PackageVersionStringOffset; /* 0x40 */ 214 U32 PackageBuildDateStringOffset; /* 0x44 */ 215 U32 PackageBuildTimeStringOffset; /* 0x48 */ 216 U32 Reserved4C; /* 0x4C */ 217 U32 DiagAuthorizationIdentifier[16]; /* 0x50 */ 218 MPI3_CI_MANIFEST_MPI_COMP_IMAGE_REF ComponentImageRef[MPI3_CI_MANIFEST_MPI_MAX]; /* 0x90 */ /* variable length */ 219 /* StringData - offset of this field must be calculated */ /* variable length */ 220 } MPI3_CI_MANIFEST_MPI, MPI3_POINTER PTR_MPI3_CI_MANIFEST_MPI, 221 Mpi3CIManifestMpi_t, MPI3_POINTER pMpi3CIManifestMpi_t; 222 223 /* defines for the ReleaseLevel field */ 224 #define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_DEV (0x00) 225 #define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_PRE_PRODUCTION (0x08) 226 #define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_PREALPHA (0x10) 227 #define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_ALPHA (0x20) 228 #define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_BETA (0x30) 229 #define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_RC (0x40) 230 #define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_GCA (0x50) 231 #define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_POINT (0x60) 232 #define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_DIAG (0xF0) 233 234 /* defines for the Flags field */ 235 #define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTHORIZATION (0x01) 236 237 /* defines for the SubsystemID field */ 238 #define MPI3_CI_MANIFEST_MPI_SUBSYSTEMID_IGNORED (0xFFFF) 239 240 /* defines for the PackageVersionStringOffset field */ 241 #define MPI3_CI_MANIFEST_MPI_PKG_VER_STR_OFF_UNSPECIFIED (0x00000000) 242 243 /* defines for the PackageBuildDateStringOffset field */ 244 #define MPI3_CI_MANIFEST_MPI_PKG_BUILD_DATE_STR_OFF_UNSPECIFIED (0x00000000) 245 246 /* defines for the PackageBuildTimeStringOffset field */ 247 #define MPI3_CI_MANIFEST_MPI_PKG_BUILD_TIME_STR_OFF_UNSPECIFIED (0x00000000) 248 249 typedef union _MPI3_CI_MANIFEST 250 { 251 MPI3_CI_MANIFEST_MPI Mpi; 252 U32 Dword[1]; 253 } MPI3_CI_MANIFEST, MPI3_POINTER PTR_MPI3_CI_MANIFEST, 254 Mpi3CIManifest_t, MPI3_POINTER pMpi3CIManifest_t; 255 256 /* defines for ManifestType field */ 257 #define MPI3_CI_MANIFEST_TYPE_MPI (0x00) 258 259 260 /***************************************************************************** 261 * Extended Image Data * 262 *****************************************************************************/ 263 264 /* Extended Image Header */ 265 typedef struct _MPI3_EXTENDED_IMAGE_HEADER 266 { 267 U8 ImageType; /* 0x00 */ 268 U8 Reserved01[3]; /* 0x01 */ 269 U32 Checksum; /* 0x04 */ 270 U32 ImageSize; /* 0x08 */ 271 U32 NextImageHeaderOffset; /* 0x0C */ 272 U32 Reserved10[4]; /* 0x10 */ 273 U32 IdentifyString[8]; /* 0x20 */ 274 } MPI3_EXTENDED_IMAGE_HEADER, MPI3_POINTER PTR_MPI3_EXTENDED_IMAGE_HEADER, 275 Mpi3ExtendedImageHeader_t, MPI3_POINTER pMpi3ExtendedImageHeader_t; 276 277 /* useful offsets */ 278 #define MPI3_EXT_IMAGE_IMAGETYPE_OFFSET (0x00) 279 #define MPI3_EXT_IMAGE_IMAGESIZE_OFFSET (0x08) 280 #define MPI3_EXT_IMAGE_NEXTIMAGE_OFFSET (0x0C) 281 282 #define MPI3_EXT_IMAGE_HEADER_SIZE (0x40) 283 284 /* defines for the ImageType field */ 285 #define MPI3_EXT_IMAGE_TYPE_UNSPECIFIED (0x00) 286 #define MPI3_EXT_IMAGE_TYPE_NVDATA (0x03) 287 #define MPI3_EXT_IMAGE_TYPE_SUPPORTED_DEVICES (0x07) 288 #define MPI3_EXT_IMAGE_TYPE_ENCRYPTED_HASH (0x09) 289 #define MPI3_EXT_IMAGE_TYPE_RDE (0x0A) 290 #define MPI3_EXT_IMAGE_TYPE_AUXILIARY_PROCESSOR (0x0B) 291 #define MPI3_EXT_IMAGE_TYPE_MIN_PRODUCT_SPECIFIC (0x80) 292 #define MPI3_EXT_IMAGE_TYPE_MAX_PRODUCT_SPECIFIC (0xFF) 293 294 295 /* Supported Device Data Format */ 296 typedef struct _MPI3_SUPPORTED_DEVICE 297 { 298 U16 DeviceID; /* 0x00 */ 299 U16 VendorID; /* 0x02 */ 300 U16 DeviceIDMask; /* 0x04 */ 301 U16 Reserved06; /* 0x06 */ 302 U8 LowPCIRev; /* 0x08 */ 303 U8 HighPCIRev; /* 0x09 */ 304 U16 Reserved0A; /* 0x0A */ 305 U32 Reserved0C; /* 0x0C */ 306 } MPI3_SUPPORTED_DEVICE, MPI3_POINTER PTR_MPI3_SUPPORTED_DEVICE, 307 Mpi3SupportedDevice_t, MPI3_POINTER pMpi3SupportedDevice_t; 308 309 #ifndef MPI3_SUPPORTED_DEVICE_MAX 310 #define MPI3_SUPPORTED_DEVICE_MAX (1) 311 #endif /* MPI3_SUPPORTED_DEVICE_MAX */ 312 313 /* Supported Devices Extended Image Data */ 314 typedef struct _MPI3_SUPPORTED_DEVICES_DATA 315 { 316 U8 ImageVersion; /* 0x00 */ 317 U8 Reserved01; /* 0x01 */ 318 U8 NumDevices; /* 0x02 */ 319 U8 Reserved03; /* 0x03 */ 320 U32 Reserved04; /* 0x04 */ 321 MPI3_SUPPORTED_DEVICE SupportedDevice[MPI3_SUPPORTED_DEVICE_MAX]; /* 0x08 */ /* variable length */ 322 } MPI3_SUPPORTED_DEVICES_DATA, MPI3_POINTER PTR_MPI3_SUPPORTED_DEVICES_DATA, 323 Mpi3SupportedDevicesData_t, MPI3_POINTER pMpi3SupportedDevicesData_t; 324 325 #ifndef MPI3_PUBLIC_KEY_MAX 326 #define MPI3_PUBLIC_KEY_MAX (1) 327 #endif /* MPI3_PUBLIC_KEY_MAX */ 328 329 /* Encrypted Hash Entry Format */ 330 typedef struct _MPI3_ENCRYPTED_HASH_ENTRY 331 { 332 U8 HashImageType; /* 0x00 */ 333 U8 HashAlgorithm; /* 0x01 */ 334 U8 EncryptionAlgorithm; /* 0x02 */ 335 U8 Reserved03; /* 0x03 */ 336 U16 PublicKeySize; /* 0x04 */ 337 U16 SignatureSize; /* 0x06 */ 338 U32 PublicKey[MPI3_PUBLIC_KEY_MAX]; /* 0x08 */ /* variable length */ 339 /* Signature - offset of this field must be calculated */ /* variable length */ 340 } MPI3_ENCRYPTED_HASH_ENTRY, MPI3_POINTER PTR_MPI3_ENCRYPTED_HASH_ENTRY, 341 Mpi3EncryptedHashEntry_t, MPI3_POINTER pMpi3EncryptedHashEntry_t; 342 343 344 /* defines for the HashImageType field */ 345 #define MPI3_HASH_IMAGE_TYPE_KEY_WITH_SIGNATURE (0x03) 346 347 /* defines for the HashAlgorithm field */ 348 #define MPI3_HASH_ALGORITHM_VERSION_MASK (0xE0) 349 #define MPI3_HASH_ALGORITHM_VERSION_NONE (0x00) 350 #define MPI3_HASH_ALGORITHM_VERSION_SHA1 (0x20) /* Obsolete */ 351 #define MPI3_HASH_ALGORITHM_VERSION_SHA2 (0x40) 352 #define MPI3_HASH_ALGORITHM_VERSION_SHA3 (0x60) 353 354 #define MPI3_HASH_ALGORITHM_SIZE_MASK (0x1F) 355 #define MPI3_HASH_ALGORITHM_SIZE_UNUSED (0x00) 356 #define MPI3_HASH_ALGORITHM_SIZE_SHA256 (0x01) 357 #define MPI3_HASH_ALGORITHM_SIZE_SHA512 (0x02) 358 #define MPI3_HASH_ALGORITHM_SIZE_SHA384 (0x03) 359 360 /* defines for the EncryptionAlgorithm field */ 361 #define MPI3_ENCRYPTION_ALGORITHM_UNUSED (0x00) 362 #define MPI3_ENCRYPTION_ALGORITHM_RSA256 (0x01) /* Obsolete */ 363 #define MPI3_ENCRYPTION_ALGORITHM_RSA512 (0x02) /* Obsolete */ 364 #define MPI3_ENCRYPTION_ALGORITHM_RSA1024 (0x03) /* Obsolete */ 365 #define MPI3_ENCRYPTION_ALGORITHM_RSA2048 (0x04) 366 #define MPI3_ENCRYPTION_ALGORITHM_RSA4096 (0x05) 367 #define MPI3_ENCRYPTION_ALGORITHM_RSA3072 (0x06) 368 #define MPI3_ENCRYPTION_ALGORITHM_ECDSA_P256 (0x07) /* NIST secp256r1 curve */ 369 #define MPI3_ENCRYPTION_ALGORITHM_ECDSA_P384 (0x08) /* NIST secp384r1 curve */ 370 #define MPI3_ENCRYPTION_ALGORITHM_ECDSA_P521 (0x09) /* NIST secp521r1 curve */ 371 #define MPI3_ENCRYPTION_ALGORITHM_LMS_HSS (0x0A) /* Leighton-Micali Signature (LMS) - 372 * Hierarchical Signature System (HSS) 373 */ 374 375 #ifndef MPI3_ENCRYPTED_HASH_ENTRY_MAX 376 #define MPI3_ENCRYPTED_HASH_ENTRY_MAX (1) 377 #endif /* MPI3_ENCRYPTED_HASH_ENTRY_MAX */ 378 379 /* Encrypted Hash Image Data */ 380 typedef struct _MPI3_ENCRYPTED_HASH_DATA 381 { 382 U8 ImageVersion; /* 0x00 */ 383 U8 NumHash; /* 0x01 */ 384 U16 Reserved02; /* 0x02 */ 385 U32 Reserved04; /* 0x04 */ 386 MPI3_ENCRYPTED_HASH_ENTRY EncryptedHashEntry[MPI3_ENCRYPTED_HASH_ENTRY_MAX]; /* 0x08 */ /* variable length */ 387 } MPI3_ENCRYPTED_HASH_DATA, MPI3_POINTER PTR_MPI3_ENCRYPTED_HASH_DATA, 388 Mpi3EncryptedHashData_t, MPI3_POINTER pMpi3EncryptedHashData_t; 389 390 391 #ifndef MPI3_AUX_PROC_DATA_MAX 392 #define MPI3_AUX_PROC_DATA_MAX (1) 393 #endif /* MPI3_ENCRYPTED_HASH_ENTRY_MAX */ 394 395 /* Auxiliary Processor Extended Image Data */ 396 typedef struct _MPI3_AUX_PROCESSOR_DATA 397 { 398 U8 BootMethod; /* 0x00 */ 399 U8 NumLoadAddr; /* 0x01 */ 400 U8 Reserved02; /* 0x02 */ 401 U8 Type; /* 0x03 */ 402 U32 Version; /* 0x04 */ 403 U32 LoadAddress[8]; /* 0x08 */ 404 U32 Reserved28[22]; /* 0x28 */ 405 U32 AuxProcessorData[MPI3_AUX_PROC_DATA_MAX]; /* 0x80 */ /* variable length */ 406 } MPI3_AUX_PROCESSOR_DATA, MPI3_POINTER PTR_MPI3_AUX_PROCESSOR_DATA, 407 Mpi3AuxProcessorData_t, MPI3_POINTER pMpi3AuxProcessorData_t; 408 409 #define MPI3_AUX_PROC_DATA_OFFSET (0x80) 410 411 /* defines for the BootMethod field */ 412 #define MPI3_AUXPROCESSOR_BOOT_METHOD_MO_MSG (0x00) 413 #define MPI3_AUXPROCESSOR_BOOT_METHOD_MO_DOORBELL (0x01) 414 #define MPI3_AUXPROCESSOR_BOOT_METHOD_COMPONENT (0x02) 415 416 /* defines for the Type field */ 417 #define MPI3_AUXPROCESSOR_TYPE_ARM_A15 (0x00) 418 #define MPI3_AUXPROCESSOR_TYPE_ARM_M0 (0x01) 419 #define MPI3_AUXPROCESSOR_TYPE_ARM_R4 (0x02) 420 421 #endif /* MPI30_IMAGE_H */ 422