Index: sys/dev/mpi3mr/mpi/mpi30_cnfg.h =================================================================== --- sys/dev/mpi3mr/mpi/mpi30_cnfg.h +++ sys/dev/mpi3mr/mpi/mpi30_cnfg.h @@ -149,10 +149,14 @@ #define MPI3_SECURITY_PGAD_FORM_SHIFT (28) #define MPI3_SECURITY_PGAD_FORM_GET_NEXT_SLOT (0x00000000) #define MPI3_SECURITY_PGAD_FORM_SLOT_NUM (0x10000000) +#define MPI3_SECURITY_PGAD_FORM_GET_NEXT_KEY (0x20000000) +#define MPI3_SECURITY_PGAD_FORM_KEY_NUM (0x30000000) #define MPI3_SECURITY_PGAD_SLOT_GROUP_MASK (0x0000FF00) #define MPI3_SECURITY_PGAD_SLOT_GROUP_SHIFT (8) #define MPI3_SECURITY_PGAD_SLOT_MASK (0x000000FF) #define MPI3_SECURITY_PGAD_SLOT_SHIFT (0) +#define MPI3_SECURITY_PGAD_KEY_MASK (0x000000FF) +#define MPI3_SECURITY_PGAD_KEY_SHIFT (0) /**** Instance PageAddress Format ****/ #define MPI3_INSTANCE_PGAD_INSTANCE_MASK (0x0000FFFF) @@ -1287,7 +1291,9 @@ U8 Reserved01[3]; /* 0x01 */ U32 BaseAsymAlgo; /* 0x04 */ U32 BaseHashAlgo; /* 0x08 */ - U32 Reserved0C[3]; /* 0x0C */ + U16 AsymAlgo2; /* 0x0C */ + U16 Reserved0E; /* 0x0E */ + U32 Reserved0C[2]; /* 0x10 */ } MPI3_MAN16_CERTIFICATE_ALGORITHM, MPI3_POINTER PTR_MPI3_MAN16_CERTIFICATE_ALGORITHM, Mpi3Man16CertificateAlgorithm_t, MPI3_POINTER pMpi3Man16CertificateAlgorithm_t; @@ -1304,6 +1310,11 @@ /**** Defines for the PageVersion field ****/ #define MPI3_MAN16_PAGEVERSION (0x00) +/**** Defines for the AsymAlgo2 field ****/ +#define MPI3_MAN16_ASYMALGO2_MLDSA_44 (0x0001) +#define MPI3_MAN16_ASYMALGO2_MLDSA_65 (0x0002) +#define MPI3_MAN16_ASYMALGO2_MLDSA_87 (0x0004) + /***************************************************************************** * Manufacturing Page 17 * ****************************************************************************/ @@ -1774,6 +1785,8 @@ #define MPI3_IOUNIT8_SBSTATE_SECURE_BOOT_ENABLED (0x01) /**** Defines for the Flags field ****/ +#define MPI3_IOUNIT8_FLAGS_QR_CAPABLE (0x20) +#define MPI3_IOUNIT8_FLAGS_QR_SECURED (0x10) #define MPI3_IOUNIT8_FLAGS_CURRENT_KEY_IOUNIT17 (0x08) #define MPI3_IOUNIT8_FLAGS_DIGESTFORM_MASK (0x07) #define MPI3_IOUNIT8_FLAGS_DIGESTFORM_SHIFT (0) @@ -2673,6 +2686,44 @@ /**** Defines for the PageVersion field ****/ #define MPI3_SECURITY2_PAGEVERSION (0x00) +/***************************************************************************** + * Security Page 3 * + ****************************************************************************/ +#ifndef MPI3_SECURITY3_KEY_DATA_MAX +#define MPI3_SECURITY3_KEY_DATA_MAX 1 +#endif /* MPI3_SECURITY3_KEY_DATA_MAX */ + + typedef struct _MPI3_SECURITY_PAGE3 +{ + MPI3_CONFIG_PAGE_HEADER Header; /* 0x00 */ + U16 KeyDataLength; /* 0x08 */ + U16 Reserved0A; /* 0x0A */ + U8 KeyNumber; /* 0x0C */ + U8 Reserved0D[3]; /* 0x0D */ + MPI3_SECURITY_MAC Mac; /* 0x10 */ + MPI3_SECURITY_NONCE Nonce; /* 0x50 */ + U32 Reserved90[12]; /* 0x90 */ + U8 Flags; /* 0xC0 */ + U8 Consumer; /* 0xC1 */ + U16 KeyDataSize; /* 0xC2 */ + U32 AdditionalKeyData; /* 0xC4 */ + U32 ReservedC8[2]; /* 0xC8 */ + U8 KeyData[MPI3_SECURITY3_KEY_DATA_MAX]; /* 0xD0 */ /* variable length */ +} MPI3_SECURITY_PAGE3, MPI3_POINTER PTR_MPI3_SECURITY_PAGE3, + Mpi3SecurityPage3_t, MPI3_POINTER pMpi3SecurityPage3_t; + +/**** Defines for the PageVersion field ****/ +#define MPI3_SECURITY3_PAGEVERSION (0x00) + +/**** Defines for the Flags field ****/ +#define MPI3_SECURITY3_FLAGS_TYPE_MASK (0x0F) +#define MPI3_SECURITY3_FLAGS_TYPE_SHIFT (0) +#define MPI3_SECURITY3_FLAGS_TYPE_NOT_VALID (0) +#define MPI3_SECURITY3_FLAGS_TYPE_MLDSA_PRIVATE (1) +#define MPI3_SECURITY3_FLAGS_TYPE_MLDSA_PUBLIC (2) + +/**** Defines for the Consumer field - Use definitions from MPI3_SECURITY1_KEY_RECORD_CONSUMER_ ****/ + /***************************************************************************** * SAS IO Unit Configuration Pages * @@ -3877,7 +3928,9 @@ U16 IOThrottleGroup; /* 0x06 */ U16 IOThrottleGroupLow; /* 0x08 */ U16 IOThrottleGroupHigh; /* 0x0A */ - U32 Reserved0C; /* 0x0C */ + U8 VdAbortTO; /* 0x0C */ + U8 VdResetTO; /* 0x0D */ + U16 Reserved0E; /* 0x0E */ } MPI3_DEVICE0_VD_FORMAT, MPI3_POINTER PTR_MPI3_DEVICE0_VD_FORMAT, Mpi3Device0VdFormat_t, MPI3_POINTER pMpi3Device0VdFormat_t; Index: sys/dev/mpi3mr/mpi/mpi30_image.h =================================================================== --- sys/dev/mpi3mr/mpi/mpi30_image.h +++ sys/dev/mpi3mr/mpi/mpi30_image.h @@ -250,15 +250,153 @@ /* defines for the PackageBuildTimeStringOffset field */ #define MPI3_CI_MANIFEST_MPI_PKG_BUILD_TIME_STR_OFF_UNSPECIFIED (0x00000000) +typedef struct _MPI3_SB_MANIFEST_CI_DIGEST +{ + U32 Signature1; /* 0x00 */ + U32 Reserved04[2]; /* 0x04 */ + U8 HashAlgorithm; /* 0x08 */ + U8 Reserved09[3]; /* 0x09 */ + MPI3_COMP_IMAGE_VERSION ComponentImageVersion; /* 0x10 */ + U32 ComponentImageVersionStringOffset; /* 0x18 */ + U32 Digest[16]; /* 0x1C */ +} MPI3_SB_MANIFEST_CI_DIGEST, MPI3_POINTER PTR_MPI3_SB_MANIFEST_CI_DIGEST, + Mpi3SBManifestCIDigest_t, MPI3_POINTER pMpi3SBManifestCIDigest_t; + +/* defines for the HashAlgorithm field - use MPI3_HASH_ALGORITHM_ defines */ + +#ifndef MPI3_SB_MANIFEST_CI_DIGEST_NUM + #define MPI3_SB_MANIFEST_CI_DIGEST_NUM (1) +#endif /* MPI3_SB_MANIFEST_COMP_IMAGE_DIGEST_NUM */ + +typedef struct _MPI3_SB_MANIFEST_CI_REF_ELEMENT +{ + U8 NumCIDigests; /* 0x00 */ + U8 Reserved01[3]; /* 0x01 */ + MPI3_SB_MANIFEST_CI_DIGEST CIDigest[MPI3_SB_MANIFEST_CI_DIGEST_NUM]; /* 0x04 */ /* variable length */ +} MPI3_SB_MANIFEST_CI_REF_ELEMENT, MPI3_POINTER PTR_MPI3_SB_MANIFEST_CI_REF_ELEMENT, + Mpi3SBManifestCIRefElement_t, MPI3_POINTER pMpi3SBManifestCIRefElement_t; + +#ifndef MPI3_SB_MANIFEST_EMBED_KEY_SIZE + #define MPI3_SB_MANIFEST_EMBED_KEY_SIZE (1) +#endif /* MPI3_SB_MANIFEST_EMBED_KEY_SIZE */ + +typedef struct _MPI3_SB_MANIFEST_EMBEDDED_KEY_ELEMENT +{ + U32 Reserved00[3]; /* 0x00 */ + U8 KeyAlgorithm; /* 0x0C */ + U8 Flags; /* 0x0D */ + U16 PublicKeySize; /* 0x0E */ + U32 StartTag; /* 0x10 */ + U32 PublicKey[MPI3_SB_MANIFEST_EMBED_KEY_SIZE]; /* 0x14 */ /* variable length */ + /* EndTag - offset of this field must be calculated */ +} MPI3_SB_MANIFEST_EMBEDDED_KEY_ELEMENT, MPI3_POINTER PTR_MPI3_SB_MANIFEST_EMBEDDED_KEY_ELEMENT, + Mpi3SBManifestEmbededKeyElement_t, MPI3_POINTER pMpi3SBManifestEmbededKeyElement_t; + +/* defines for the KeyAlgorithm field - use MPI3_ENCRYPTION_ALGORITHM_ defines */ + +/* defines for the Flags field */ +#define MPI3_SB_MANIFEST_EMBEDDED_KEY_FLAGS_KEYINDEX_MASK (0x03) +#define MPI3_SB_MANIFEST_EMBEDDED_KEY_FLAGS_KEYINDEX_STRT (0x00) +#define MPI3_SB_MANIFEST_EMBEDDED_KEY_FLAGS_KEYINDEX_K2GO (0x01) + +/* defines for the StartTag field */ +#define MPI3_SB_MANIFEST_EMBEDDED_KEY_STARTTAG_STRT (0x54525453) /* string "STRT" */ +#define MPI3_SB_MANIFEST_EMBEDDED_KEY_STARTTAG_K2GO (0x4F47324B) /* string "K2GO" */ + +/* defines for the EndTag field */ +#define MPI3_SB_MANIFEST_EMBEDDED_KEY_ENDTAG_STOP (0x504F5453) /* string "STOP" */ +#define MPI3_SB_MANIFEST_EMBEDDED_KEY_ENDTAG_K2ST (0x5453324B) /* string "K2ST" */ + +#ifndef MPI3_SB_MANIFEST_DIAG_KEY_SIZE + #define MPI3_SB_MANIFEST_DIAG_KEY_SIZE (1) +#endif /* MPI3_SB_MANIFEST_DIAG_KEY_SIZE */ + + +typedef struct _MPI3_SB_MANIFEST_DIAG_KEY_ELEMENT +{ + U32 Reserved00[3]; /* 0x00 */ + U8 KeyAlgorithm; /* 0x0C */ + U8 Flags; /* 0x0D */ + U16 PublicKeySize; /* 0x0E */ + U32 PublicKey[MPI3_SB_MANIFEST_DIAG_KEY_SIZE]; /* 0x10 */ /* variable length */ +} MPI3_SB_MANIFEST_DIAG_KEY_ELEMENT, MPI3_POINTER PTR_MPI3_SB_MANIFEST_DIAG_KEY_ELEMENT, + Mpi3SBManifestDiagKeyElement_t, MPI3_POINTER pMpi3SBManifestDiagKeyElement_t; + +/* defines for the KeyAlgorithm field - use MPI3_ENCRYPTION_ALGORITHM_ defines */ + +/* defines for the Flags field */ +#define MPI3_SB_MANIFEST_DIAG_KEY_FLAGS_KEYINDEX_MASK (0x03) +#define MPI3_SB_MANIFEST_DIAG_KEY_FLAGS_KEYSELECT_FW_KEY (0x04) + +typedef union _MPI3_SB_MANIFEST_ELEMENT_DATA +{ + MPI3_SB_MANIFEST_CI_REF_ELEMENT CIRef; + MPI3_SB_MANIFEST_EMBEDDED_KEY_ELEMENT EmbedKey; + MPI3_SB_MANIFEST_DIAG_KEY_ELEMENT DiagKey; + U32 Dword[1]; +} MPI3_SB_MANIFEST_ELEMENT_DATA, MPI3_POINTER PTR_MPI3_SB_MANIFEST_ELEMENT_DATA, + Mpi3SBManifestElementData_t, MPI3_POINTER pMpi3SBManifestElementData_t; + +typedef struct _MPI3_SB_MANIFEST_ELEMENT +{ + U8 ManifestElementForm; /* 0x00 */ + U8 Reserved01[3]; /* 0x01 */ + MPI3_SB_MANIFEST_ELEMENT_DATA FormSpecific[1]; /* 0x04 */ /* variable length */ +} MPI3_SB_MANIFEST_ELEMENT, MPI3_POINTER PTR_MPI3_SB_MANIFEST_ELEMENT, + Mpi3SBManifestElement_t, MPI3_POINTER pMpi3SBManifestElement_t; + +/* defines for the ManifestElementForm field */ +#define MPI3_SB_MANIFEST_ELEMENT_FORM_CI_REFS (0x01) +#define MPI3_SB_MANIFEST_ELEMENT_FORM_EMBED_KEY (0x02) +#define MPI3_SB_MANIFEST_ELEMENT_FORM_DIAG_KEY (0x03) + +typedef struct _MPI3_SB_MANIFEST_MPI +{ + U8 ManifestType; /* 0x00 */ + U8 Reserved01[3]; /* 0x01 */ + U32 Reserved04[3]; /* 0x04 */ + U8 Reserved10; /* 0x10 */ + U8 ReleaseLevel; /* 0x11 */ + U16 Reserved12; /* 0x12 */ + U16 Reserved14; /* 0x14 */ + U16 Flags; /* 0x16 */ + U32 Reserved18[2]; /* 0x18 */ + U16 VendorID; /* 0x20 */ + U16 DeviceID; /* 0x22 */ + U16 SubsystemVendorID; /* 0x24 */ + U16 SubsystemID; /* 0x26 */ + U32 Reserved28[2]; /* 0x28 */ + MPI3_VERSION_UNION PackageSecurityVersion; /* 0x30 */ + U32 Reserved34; /* 0x34 */ + MPI3_COMP_IMAGE_VERSION PackageVersion; /* 0x38 */ + U32 PackageVersionStringOffset; /* 0x40 */ + U32 PackageBuildDateStringOffset; /* 0x44 */ + U32 PackageBuildTimeStringOffset; /* 0x48 */ + U32 ComponentImageReferencesOffset; /* 0x4C */ + U32 EmbeddedKey0Offset; /* 0x50 */ + U32 EmbeddedKey1Offset; /* 0x54 */ + U32 DiagAuthorizationKeyOffset; /* 0x58 */ + U32 Reserved5C[9]; /* 0x5C */ + MPI3_SB_MANIFEST_ELEMENT ManifestElements[1]; /* 0x80 */ /* variable length */ +} MPI3_SB_MANIFEST_MPI, MPI3_POINTER PTR_MPI3_SB_MANIFEST_MPI, + Mpi3SBManifestMpi_t, MPI3_POINTER pMpi3SBManifestMpi_t; + +/* defines for the ReleaseLevel field - use MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_ defines */ + +/* defines for the Flags field */ +#define MPI3_SB_MANIFEST_APU_IMMEDIATE_DEFER_APU_ENABLE (0x01) + typedef union _MPI3_CI_MANIFEST { MPI3_CI_MANIFEST_MPI Mpi; + MPI3_SB_MANIFEST_MPI SBMpi; U32 Dword[1]; } MPI3_CI_MANIFEST, MPI3_POINTER PTR_MPI3_CI_MANIFEST, Mpi3CIManifest_t, MPI3_POINTER pMpi3CIManifest_t; /* defines for ManifestType field */ #define MPI3_CI_MANIFEST_TYPE_MPI (0x00) +#define MPI3_CI_MANIFEST_TYPE_SB (0x01) /***************************************************************************** Index: sys/dev/mpi3mr/mpi/mpi30_transport.h =================================================================== --- sys/dev/mpi3mr/mpi/mpi30_transport.h +++ sys/dev/mpi3mr/mpi/mpi30_transport.h @@ -38,7 +38,6 @@ * Broadcom Inc. (Broadcom) MPI3MR Adapter FreeBSD * * - * * Version History * --------------- * @@ -83,8 +82,10 @@ * 07-26-24 03.00.34.00 Corresponds to Fusion-MPT MPI 3.0 Specification Rev 34 * 11-08-24 03.00.35.00 Corresponds to Fusion-MPT MPI 3.0 Specification Rev 35 * 02-14-25 03.00.36.00 Corresponds to Fusion-MPT MPI 3.0 Specification Rev 36 + * 05-16-25 03.00.37.00 Corresponds to Fusion-MPT MPI 3.0 Specification Rev 37 + * 06-17-25 03.00.38.00 Corresponds to Fusion-MPT MPI 3.0 Specification Rev 37 - Interim Release 1 + * 08-08-25 03.00.38.00 Corresponds to Fusion-MPT MPI 3.0 Specification Rev 38 */ - #ifndef MPI30_TRANSPORT_H #define MPI30_TRANSPORT_H 1 @@ -112,7 +113,7 @@ /****** Version constants for this revision ****/ #define MPI3_VERSION_MAJOR (3) #define MPI3_VERSION_MINOR (0) -#define MPI3_VERSION_UNIT (36) +#define MPI3_VERSION_UNIT (38) #define MPI3_VERSION_DEV (0) /****** DevHandle definitions *****/