| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2007-2011 Broadcom Corporation |
|---|
| 3 | * |
|---|
| 4 | * This program is the proprietary software of Broadcom Corporation and/or its licensors, |
|---|
| 5 | * and may only be used, duplicated, modified or distributed pursuant to the terms and |
|---|
| 6 | * conditions of a separate, written license agreement executed between you and Broadcom |
|---|
| 7 | * (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants |
|---|
| 8 | * no license (express or implied), right to use, or waiver of any kind with respect to the |
|---|
| 9 | * Software, and Broadcom expressly reserves all rights in and to the Software and all |
|---|
| 10 | * intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU |
|---|
| 11 | * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY |
|---|
| 12 | * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. |
|---|
| 13 | * |
|---|
| 14 | * Except as expressly set forth in the Authorized License, |
|---|
| 15 | * |
|---|
| 16 | * 1. This program, including its structure, sequence and organization, constitutes the valuable trade |
|---|
| 17 | * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, |
|---|
| 18 | * and to use this information only in connection with your use of Broadcom integrated circuit products. |
|---|
| 19 | * |
|---|
| 20 | * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
|---|
| 21 | * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR |
|---|
| 22 | * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
|---|
| 23 | * THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES |
|---|
| 24 | * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, |
|---|
| 25 | * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION |
|---|
| 26 | * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF |
|---|
| 27 | * USE OR PERFORMANCE OF THE SOFTWARE. |
|---|
| 28 | * |
|---|
| 29 | * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS |
|---|
| 30 | * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR |
|---|
| 31 | * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR |
|---|
| 32 | * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF |
|---|
| 33 | * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT |
|---|
| 34 | * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE |
|---|
| 35 | * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF |
|---|
| 36 | * ANY LIMITED REMEDY. |
|---|
| 37 | * |
|---|
| 38 | * $brcm_Workfile: nexus_otpmsp.h $ |
|---|
| 39 | * $brcm_Revision: 2 $ |
|---|
| 40 | * $brcm_Date: 10/13/11 9:17a $ |
|---|
| 41 | * |
|---|
| 42 | * Module Description: |
|---|
| 43 | * |
|---|
| 44 | * Revision History: |
|---|
| 45 | * |
|---|
| 46 | * $brcm_Log: /nexus/extensions/security/otpmsp/7422/include/nexus_otpmsp.h $ |
|---|
| 47 | * |
|---|
| 48 | * 2 10/13/11 9:17a atruong |
|---|
| 49 | * SWSECURITY-69: BSP Zeus 2.0 FW Support |
|---|
| 50 | * |
|---|
| 51 | * 1 1/28/11 7:11p atruong |
|---|
| 52 | * SW7422-235: Enable Nexus Security extension modules for 97422 |
|---|
| 53 | * |
|---|
| 54 | ******************************************************************************/ |
|---|
| 55 | #ifndef NEXUS_OTPMSP_H__ |
|---|
| 56 | #define NEXUS_OTPMSP_H__ |
|---|
| 57 | |
|---|
| 58 | #include "nexus_security_datatypes.h" |
|---|
| 59 | #include "nexus_security.h" |
|---|
| 60 | |
|---|
| 61 | #ifdef __cplusplus |
|---|
| 62 | extern "C" { |
|---|
| 63 | #endif |
|---|
| 64 | |
|---|
| 65 | /***************************************************************************** |
|---|
| 66 | Summary: |
|---|
| 67 | This enum defines types as passed by the MIPS to the 8051 that say whether the programming |
|---|
| 68 | command is in bit mode or array mode |
|---|
| 69 | |
|---|
| 70 | Description: |
|---|
| 71 | This enumeration defines all the supported programming modes. |
|---|
| 72 | *****************************************************************************/ |
|---|
| 73 | typedef enum NEXUS_OtpMspCmdProgMode |
|---|
| 74 | { |
|---|
| 75 | NEXUS_OtpMspCmdProgMode_eEnum = 0x12, |
|---|
| 76 | NEXUS_OtpMspCmdProgMode_eEnumHal = 0x34, |
|---|
| 77 | NEXUS_OtpMspCmdProgMode_eBit = 0x78 |
|---|
| 78 | } NEXUS_OtpMspCmdProgMode; |
|---|
| 79 | |
|---|
| 80 | |
|---|
| 81 | /***************************************************************************** |
|---|
| 82 | Summary: |
|---|
| 83 | *****************************************************************************/ |
|---|
| 84 | typedef enum NEXUS_OtpCmdMsp |
|---|
| 85 | { |
|---|
| 86 | NEXUS_OtpCmdMsp_eReserved0 = 0, /* previously eFlashType*/ |
|---|
| 87 | NEXUS_OtpCmdMsp_eReserved1 = 1, |
|---|
| 88 | NEXUS_OtpCmdMsp_eReserved2 = 2, |
|---|
| 89 | NEXUS_OtpCmdMsp_eReserved3 = 3, |
|---|
| 90 | NEXUS_OtpCmdMsp_eResetDelayTimerDisable = 4, |
|---|
| 91 | NEXUS_OtpCmdMsp_eCrLockEnable = 5, |
|---|
| 92 | NEXUS_OtpCmdMsp_eCrDisable = 6, |
|---|
| 93 | NEXUS_OtpCmdMsp_eReserved7 = 7, |
|---|
| 94 | NEXUS_OtpCmdMsp_ePciClientProtect = 8, |
|---|
| 95 | NEXUS_OtpCmdMsp_ePcieHostProtect = 9, |
|---|
| 96 | NEXUS_OtpCmdMsp_ePcieClientProtect = 10, |
|---|
| 97 | NEXUS_OtpCmdMsp_eSecurityPinBoundaryScanProtect = 11, |
|---|
| 98 | NEXUS_OtpCmdMsp_eGenericPinBoundaryScanProtect = 12, |
|---|
| 99 | NEXUS_OtpCmdMsp_eReserved13 = 13, |
|---|
| 100 | NEXUS_OtpCmdMsp_eReserved14 = 14, |
|---|
| 101 | NEXUS_OtpCmdMsp_eReserved15 = 15, |
|---|
| 102 | NEXUS_OtpCmdMsp_eReserved16 = 16, |
|---|
| 103 | NEXUS_OtpCmdMsp_eEnforceDramScramblerPause = 17, |
|---|
| 104 | NEXUS_OtpCmdMsp_eForceDramScrambler = 18, |
|---|
| 105 | NEXUS_OtpCmdMsp_eReserved19 = 19, |
|---|
| 106 | NEXUS_OtpCmdMsp_eReserved20 = 20, |
|---|
| 107 | NEXUS_OtpCmdMsp_eReserved21 = 21, |
|---|
| 108 | NEXUS_OtpCmdMsp_eReserved22 = 22, |
|---|
| 109 | NEXUS_OtpCmdMsp_eReserved23 = 23, |
|---|
| 110 | NEXUS_OtpCmdMsp_eReserved24 = 24, |
|---|
| 111 | NEXUS_OtpCmdMsp_eReserved25 = 25, |
|---|
| 112 | NEXUS_OtpCmdMsp_eReserved26 = 26, |
|---|
| 113 | NEXUS_OtpCmdMsp_eReserved27 = 27, |
|---|
| 114 | NEXUS_OtpCmdMsp_eReserved28 = 28, |
|---|
| 115 | NEXUS_OtpCmdMsp_eReserved29 = 29, |
|---|
| 116 | NEXUS_OtpCmdMsp_eReserved30 = 30, |
|---|
| 117 | NEXUS_OtpCmdMsp_eReserved31 = 31, |
|---|
| 118 | NEXUS_OtpCmdMsp_eReserved32 = 32, |
|---|
| 119 | NEXUS_OtpCmdMsp_eReserved33 = 33, |
|---|
| 120 | NEXUS_OtpCmdMsp_eReserved34 = 34, |
|---|
| 121 | NEXUS_OtpCmdMsp_eDataSectionLockByte = 35, |
|---|
| 122 | NEXUS_OtpCmdMsp_eDataSectionReadProtectBits = 36, |
|---|
| 123 | NEXUS_OtpCmdMsp_eReserved37 = 37, |
|---|
| 124 | NEXUS_OtpCmdMsp_eReserved38 = 38, |
|---|
| 125 | NEXUS_OtpCmdMsp_eReserved39 = 39, |
|---|
| 126 | NEXUS_OtpCmdMsp_eReserved40 = 40, |
|---|
| 127 | NEXUS_OtpCmdMsp_eReserved41 = 41, |
|---|
| 128 | NEXUS_OtpCmdMsp_eReserved42 = 42, |
|---|
| 129 | NEXUS_OtpCmdMsp_eAskmStbOwnerId = 43, |
|---|
| 130 | NEXUS_OtpCmdMsp_eReserved44 = 44, |
|---|
| 131 | NEXUS_OtpCmdMsp_eCaControlBits = 45, |
|---|
| 132 | NEXUS_OtpCmdMsp_eCpM2MControlBits = 46, |
|---|
| 133 | NEXUS_OtpCmdMsp_eCaKeyLadderDisable = 47, |
|---|
| 134 | NEXUS_OtpCmdMsp_eCpKeyLadderDisable = 48, |
|---|
| 135 | NEXUS_OtpCmdMsp_eCustKeytoCaKeyLadderDisable = 49, |
|---|
| 136 | NEXUS_OtpCmdMsp_eCustKeytoCpKeyLadderDisable = 50, |
|---|
| 137 | NEXUS_OtpCmdMsp_eReserved51 = 51, |
|---|
| 138 | NEXUS_OtpCmdMsp_eReserved52 = 52, |
|---|
| 139 | NEXUS_OtpCmdMsp_eReserved53 = 53, |
|---|
| 140 | NEXUS_OtpCmdMsp_eReserved54 = 54, |
|---|
| 141 | NEXUS_OtpCmdMsp_eReserved55 = 55, |
|---|
| 142 | NEXUS_OtpCmdMsp_eReserved56 = 56, |
|---|
| 143 | NEXUS_OtpCmdMsp_e1DesKeyLadderDisable = 57, |
|---|
| 144 | NEXUS_OtpCmdMsp_eRouted3DesKeyK1K2CheckEnable = 58, |
|---|
| 145 | NEXUS_OtpCmdMsp_eCaSoftwareKeyDisable = 59, |
|---|
| 146 | NEXUS_OtpCmdMsp_eCpAesEcbMscSoftwareKeyDisable = 60, |
|---|
| 147 | NEXUS_OtpCmdMsp_eCpM2mDesSoftwareKeyDisable = 61, |
|---|
| 148 | NEXUS_OtpCmdMsp_eCpM2m3DesSoftwareKeyDisable = 62, |
|---|
| 149 | NEXUS_OtpCmdMsp_eCpM2mAesSoftwareKeyDisable = 63, |
|---|
| 150 | NEXUS_OtpCmdMsp_eCpM2mAesCounterSoftwareKeyDisable = 64, |
|---|
| 151 | NEXUS_OtpCmdMsp_eM2mC2CssSoftwareKeyDisable = 65, |
|---|
| 152 | NEXUS_OtpCmdMsp_eM2mM6SoftwareKeyDisable = 66, |
|---|
| 153 | NEXUS_OtpCmdMsp_eReserved67 = 67, |
|---|
| 154 | NEXUS_OtpCmdMsp_eReserved68 = 68, |
|---|
| 155 | NEXUS_OtpCmdMsp_eReserved69 = 69, |
|---|
| 156 | NEXUS_OtpCmdMsp_eReserved70 = 70, |
|---|
| 157 | NEXUS_OtpCmdMsp_eReserved71 = 71, |
|---|
| 158 | NEXUS_OtpCmdMsp_eReserved72 = 72, |
|---|
| 159 | NEXUS_OtpCmdMsp_ePublicKey0Index = 73, |
|---|
| 160 | NEXUS_OtpCmdMsp_eSecureBootEnable = 74, |
|---|
| 161 | NEXUS_OtpCmdMsp_eReserved75 = 75, |
|---|
| 162 | NEXUS_OtpCmdMsp_eReserved76 = 76, |
|---|
| 163 | NEXUS_OtpCmdMsp_eReserved77 = 77, |
|---|
| 164 | NEXUS_OtpCmdMsp_eReserved78 = 78, |
|---|
| 165 | NEXUS_OtpCmdMsp_eReserved79 = 79, |
|---|
| 166 | NEXUS_OtpCmdMsp_eReserved80 = 80, |
|---|
| 167 | NEXUS_OtpCmdMsp_eHostOutOfResetOnErrorDisable = 81, |
|---|
| 168 | NEXUS_OtpCmdMsp_eReserved82 = 82, |
|---|
| 169 | NEXUS_OtpCmdMsp_eBootSequenceSelect = 83, |
|---|
| 170 | NEXUS_OtpCmdMsp_eReserved84 = 84, |
|---|
| 171 | NEXUS_OtpCmdMsp_eKey0PrimeSigningRights = 85, |
|---|
| 172 | NEXUS_OtpCmdMsp_eKey0SigningRights = 86, |
|---|
| 173 | NEXUS_OtpCmdMsp_eSystemEpoch = 87, |
|---|
| 174 | NEXUS_OtpCmdMsp_eReserved88 = 88, |
|---|
| 175 | NEXUS_OtpCmdMsp_eBseckEnable = 89, |
|---|
| 176 | NEXUS_OtpCmdMsp_eReserved90 = 90, |
|---|
| 177 | NEXUS_OtpCmdMsp_eReserved91 = 91, |
|---|
| 178 | NEXUS_OtpCmdMsp_eReserved92 = 92, |
|---|
| 179 | NEXUS_OtpCmdMsp_eReserved93 = 93, |
|---|
| 180 | NEXUS_OtpCmdMsp_eMarketId = 94, |
|---|
| 181 | NEXUS_OtpCmdMsp_eMpodDisable = 95, |
|---|
| 182 | NEXUS_OtpCmdMsp_eReserved96 = 96, |
|---|
| 183 | NEXUS_OtpCmdMsp_eReserved97 = 97, |
|---|
| 184 | NEXUS_OtpCmdMsp_eReserved98 = 98, |
|---|
| 185 | NEXUS_OtpCmdMsp_eReserved99 = 99, |
|---|
| 186 | NEXUS_OtpCmdMsp_eReserved100 = 100, |
|---|
| 187 | NEXUS_OtpCmdMsp_eReserved101 = 101, |
|---|
| 188 | NEXUS_OtpCmdMsp_eReserved102 = 102, |
|---|
| 189 | NEXUS_OtpCmdMsp_eReserved103 = 103, |
|---|
| 190 | NEXUS_OtpCmdMsp_eReserved104 = 104, |
|---|
| 191 | NEXUS_OtpCmdMsp_eReserved105 = 105, |
|---|
| 192 | NEXUS_OtpCmdMsp_eReserved106 = 106, |
|---|
| 193 | NEXUS_OtpCmdMsp_eReserved107 = 107, |
|---|
| 194 | NEXUS_OtpCmdMsp_eReserved108 = 108, |
|---|
| 195 | NEXUS_OtpCmdMsp_eReserved109 = 109, |
|---|
| 196 | NEXUS_OtpCmdMsp_eReserved110 = 110, |
|---|
| 197 | NEXUS_OtpCmdMsp_eReserved111 = 111, |
|---|
| 198 | NEXUS_OtpCmdMsp_eReserved112 = 112, |
|---|
| 199 | NEXUS_OtpCmdMsp_eReserved113 = 113, |
|---|
| 200 | NEXUS_OtpCmdMsp_eReserved114 = 114, |
|---|
| 201 | NEXUS_OtpCmdMsp_eReserved115 = 115, |
|---|
| 202 | NEXUS_OtpCmdMsp_eReserved116 = 116, |
|---|
| 203 | NEXUS_OtpCmdMsp_eReserved117 = 117, |
|---|
| 204 | NEXUS_OtpCmdMsp_eReserved118 = 118, |
|---|
| 205 | NEXUS_OtpCmdMsp_eReserved119 = 119, |
|---|
| 206 | NEXUS_OtpCmdMsp_eReserved120 = 120, |
|---|
| 207 | |
|---|
| 208 | NEXUS_OtpCmdMsp_eReserved121 = 121, |
|---|
| 209 | NEXUS_OtpCmdMsp_eReserved122 = 122, |
|---|
| 210 | NEXUS_OtpCmdMsp_eReserved123 = 123, |
|---|
| 211 | NEXUS_OtpCmdMsp_eReserved124 = 124, |
|---|
| 212 | NEXUS_OtpCmdMsp_eReserved125 = 125, |
|---|
| 213 | NEXUS_OtpCmdMsp_eReserved126 = 126, |
|---|
| 214 | |
|---|
| 215 | NEXUS_OtpCmdMsp_eReserved127 = 127, |
|---|
| 216 | NEXUS_OtpCmdMsp_eReserved128 = 128, |
|---|
| 217 | NEXUS_OtpCmdMsp_eReserved129 = 129, |
|---|
| 218 | NEXUS_OtpCmdMsp_eReserved130 = 130, |
|---|
| 219 | NEXUS_OtpCmdMsp_eReserved131 = 131, |
|---|
| 220 | NEXUS_OtpCmdMsp_ePciGwinDisable = 132, |
|---|
| 221 | NEXUS_OtpCmdMsp_ePcieGwinDisable = 133, |
|---|
| 222 | NEXUS_OtpCmdMsp_ePciMwinDisable = 134, |
|---|
| 223 | NEXUS_OtpCmdMsp_ePciMwinRestrictEnable = 135, |
|---|
| 224 | NEXUS_OtpCmdMsp_ePcieMwinDisable = 136, |
|---|
| 225 | NEXUS_OtpCmdMsp_ePcieMwinRestrictEnable = 137, |
|---|
| 226 | NEXUS_OtpCmdMsp_eCaAesEcbMscSoftwareKeyDisable = 138, |
|---|
| 227 | NEXUS_OtpCmdMsp_eReserved139 = 139, |
|---|
| 228 | NEXUS_OtpCmdMsp_eReserved140 = 140, |
|---|
| 229 | NEXUS_OtpCmdMsp_eReserved141 = 141, /* previously eOtpOptionSpare*/ |
|---|
| 230 | NEXUS_OtpCmdMsp_eReserved142 = 142, |
|---|
| 231 | NEXUS_OtpCmdMsp_eReserved143 = 143, |
|---|
| 232 | NEXUS_OtpCmdMsp_eReserved144 = 144, |
|---|
| 233 | NEXUS_OtpCmdMsp_eReserved145 = 145, |
|---|
| 234 | NEXUS_OtpCmdMsp_eReserved146 = 146, |
|---|
| 235 | NEXUS_OtpCmdMsp_eReserved147 = 147, |
|---|
| 236 | NEXUS_OtpCmdMsp_eReserved148 = 148, |
|---|
| 237 | NEXUS_OtpCmdMsp_eReserved149 = 149, |
|---|
| 238 | NEXUS_OtpCmdMsp_eReserved150 = 150, |
|---|
| 239 | NEXUS_OtpCmdMsp_eReserved151 = 151, |
|---|
| 240 | /*-Zeus 2.0 additions-*/ |
|---|
| 241 | NEXUS_OtpCmdMsp_eDramScramblerKeyReuseDisable = 152, |
|---|
| 242 | NEXUS_OtpCmdMsp_eMMCBootDisable = 153, |
|---|
| 243 | NEXUS_OtpCmdMsp_eFekDecryptionRootKey = 154, |
|---|
| 244 | NEXUS_OtpCmdMsp_eFlashDecryptionActivation = 155, |
|---|
| 245 | NEXUS_OtpCmdMsp_eReserved156 = 156, |
|---|
| 246 | NEXUS_OtpCmdMsp_eAesDpaStallPercentage = 157, |
|---|
| 247 | NEXUS_OtpCmdMsp_eAesDpaStallCountHigh = 158, |
|---|
| 248 | NEXUS_OtpCmdMsp_eAesDpaRoundStallingEnable = 159, |
|---|
| 249 | NEXUS_OtpCmdMsp_eReserved160 = 160, |
|---|
| 250 | NEXUS_OtpCmdMsp_eReserved161 = 161, |
|---|
| 251 | NEXUS_OtpCmdMsp_eReserved162 = 162, |
|---|
| 252 | NEXUS_OtpCmdMsp_eReserved163 = 163, |
|---|
| 253 | NEXUS_OtpCmdMsp_eReserved164 = 164, |
|---|
| 254 | NEXUS_OtpCmdMsp_eReserved165 = 165, |
|---|
| 255 | NEXUS_OtpCmdMsp_eReserved166 = 166, |
|---|
| 256 | NEXUS_OtpCmdMsp_eReserved167 = 167, |
|---|
| 257 | NEXUS_OtpCmdMsp_eReserved168 = 168, |
|---|
| 258 | NEXUS_OtpCmdMsp_eReserved169 = 169, |
|---|
| 259 | NEXUS_OtpCmdMsp_eReserved170 = 170, |
|---|
| 260 | NEXUS_OtpCmdMsp_eReserved171 = 171, |
|---|
| 261 | NEXUS_OtpCmdMsp_eReserved172 = 172, |
|---|
| 262 | NEXUS_OtpCmdMsp_eReserved173 = 173, |
|---|
| 263 | NEXUS_OtpCmdMsp_eReserved174 = 174, |
|---|
| 264 | NEXUS_OtpCmdMsp_eReserved175 = 175, |
|---|
| 265 | NEXUS_OtpCmdMsp_eReserved176 = 176, |
|---|
| 266 | NEXUS_OtpCmdMsp_eReserved177 = 177, |
|---|
| 267 | NEXUS_OtpCmdMsp_eReserved178 = 178, |
|---|
| 268 | NEXUS_OtpCmdMsp_eReserved179 = 179, |
|---|
| 269 | NEXUS_OtpCmdMsp_eReserved180 = 180, |
|---|
| 270 | NEXUS_OtpCmdMsp_eReserved181 = 181, |
|---|
| 271 | NEXUS_OtpCmdMsp_eReserved182 = 182, |
|---|
| 272 | NEXUS_OtpCmdMsp_eReserved183 = 183, |
|---|
| 273 | NEXUS_OtpCmdMsp_eReserved184 = 184, |
|---|
| 274 | NEXUS_OtpCmdMsp_eStrictEntropyMappingEnable = 185, |
|---|
| 275 | NEXUS_OtpCmdMsp_eReserved186 = 186, |
|---|
| 276 | NEXUS_OtpCmdMsp_eReserved187 = 187, |
|---|
| 277 | NEXUS_OtpCmdMsp_eReserved188 = 188, |
|---|
| 278 | NEXUS_OtpCmdMsp_eReserved189 = 189, |
|---|
| 279 | NEXUS_OtpCmdMsp_eDualCoreAcpuMode = 190, |
|---|
| 280 | NEXUS_OtpCmdMsp_eSecureSandboxEnable = 191, |
|---|
| 281 | NEXUS_OtpCmdMsp_eWebCpuVerifyEnable = 192, |
|---|
| 282 | NEXUS_OtpCmdMsp_eRaagaAVerifyEnable = 193, |
|---|
| 283 | NEXUS_OtpCmdMsp_eRaagaBVerifyEnable = 194, |
|---|
| 284 | NEXUS_OtpCmdMsp_eHwKeyLadderDisable = 195, |
|---|
| 285 | NEXUS_OtpCmdMsp_eExternalKeyTableDisable = 196, |
|---|
| 286 | NEXUS_OtpCmdMsp_eOneWayProgramEnable = 197, |
|---|
| 287 | NEXUS_OtpCmdMsp_eReserved198 = 198, |
|---|
| 288 | NEXUS_OtpCmdMsp_eMax = 199 |
|---|
| 289 | } NEXUS_OtpCmdMsp; |
|---|
| 290 | |
|---|
| 291 | |
|---|
| 292 | |
|---|
| 293 | /***************************************************************************** |
|---|
| 294 | Summary: |
|---|
| 295 | Select bits to be read |
|---|
| 296 | *****************************************************************************/ |
|---|
| 297 | typedef enum NEXUS_OtpCmdReadRegister |
|---|
| 298 | { |
|---|
| 299 | NEXUS_OtpCmdReadRegister_eMc0S_Reserved0 = 0, |
|---|
| 300 | NEXUS_OtpCmdReadRegister_eMc0S_Reserved1 = 1, |
|---|
| 301 | |
|---|
| 302 | NEXUS_OtpCmdReadRegister_eMc0S_Reserved2 = 2, |
|---|
| 303 | NEXUS_OtpCmdReadRegister_eMc0S_Reserved3 = 3, |
|---|
| 304 | |
|---|
| 305 | NEXUS_OtpCmdReadRegister_eMc0S_Reserved4 = 4, |
|---|
| 306 | NEXUS_OtpCmdReadRegister_eMc0S_Reserved5 = 5, |
|---|
| 307 | |
|---|
| 308 | NEXUS_OtpCmdReadRegister_eKeyMc0_CustomerMode = 6, |
|---|
| 309 | NEXUS_OtpCmdReadRegister_eKeyMc0_Reserved7 = 7, |
|---|
| 310 | NEXUS_OtpCmdReadRegister_eKeyMc0_DeobfuscationEnable = 8, |
|---|
| 311 | NEXUS_OtpCmdReadRegister_eKeyMc0_BlackBoxId = 9, |
|---|
| 312 | NEXUS_OtpCmdReadRegister_eKeyMc0_CaKeyLadderDisallow = 10, |
|---|
| 313 | NEXUS_OtpCmdReadRegister_eKeyMc0_CpKeyLadderDisallow = 11, |
|---|
| 314 | NEXUS_OtpCmdReadRegister_eKeyMc0_Gp1KeyLadderDisallow = 12, |
|---|
| 315 | NEXUS_OtpCmdReadRegister_eKeyMc0_Gp2KeyLadderDisallow = 13, |
|---|
| 316 | NEXUS_OtpCmdReadRegister_eKeyMc0_Reserved14 = 14, |
|---|
| 317 | NEXUS_OtpCmdReadRegister_eKeyID = 15, |
|---|
| 318 | NEXUS_OtpCmdReadRegister_eKeyHash = 16, |
|---|
| 319 | NEXUS_OtpCmdReadRegister_eBseckHashCrc = 17, |
|---|
| 320 | NEXUS_OtpCmdReadRegister_eMc0S_Reserved18 = 18, |
|---|
| 321 | NEXUS_OtpCmdReadRegister_eMc0S_FixedDeobfuscationVariantEnable = 19, |
|---|
| 322 | NEXUS_OtpCmdReadRegister_eKeyMc0_RootKeySwapDisallow = 20, |
|---|
| 323 | NEXUS_OtpCmdReadRegister_eKeyMc0_Reserved21 = 21, |
|---|
| 324 | NEXUS_OtpCmdReadRegister_eMax |
|---|
| 325 | } NEXUS_OtpCmdReadRegister; |
|---|
| 326 | |
|---|
| 327 | |
|---|
| 328 | /* select otp key type for the field to be read */ |
|---|
| 329 | typedef enum NEXUS_OtpKeyType |
|---|
| 330 | { |
|---|
| 331 | NEXUS_OtpKeyType_eA, |
|---|
| 332 | NEXUS_OtpKeyType_eB, |
|---|
| 333 | NEXUS_OtpKeyType_eC, |
|---|
| 334 | NEXUS_OtpKeyType_eD, |
|---|
| 335 | NEXUS_OtpKeyType_eE, |
|---|
| 336 | NEXUS_OtpKeyType_eF, |
|---|
| 337 | |
|---|
| 338 | NEXUS_OtpKeyType_eSize |
|---|
| 339 | |
|---|
| 340 | } NEXUS_OtpKeyType ; |
|---|
| 341 | |
|---|
| 342 | |
|---|
| 343 | #define NEXUS_OTP_KEY_ID_LEN 8 |
|---|
| 344 | #define NEXUS_MSP_DATA_LEN 4 |
|---|
| 345 | #define NEXUS_MSP_SIGNATURE_DATA_LEN 20 /* 16 for legacy, 20 for ASKM */ |
|---|
| 346 | #define NEXUS_MSP_OUTPUT_DATA_LEN 4 |
|---|
| 347 | #define NEXUS_OTP_DATASECTION_LEN (32) /* in byte now, may change to word32*/ |
|---|
| 348 | |
|---|
| 349 | |
|---|
| 350 | |
|---|
| 351 | /***************************************************************************** |
|---|
| 352 | Summary: |
|---|
| 353 | *****************************************************************************/ |
|---|
| 354 | typedef struct NEXUS_ReadOtpIO { |
|---|
| 355 | unsigned char otpKeyIdBuf[NEXUS_OTP_KEY_ID_LEN]; /* Buffer to hold OTP Key ID for the current OTP Key ID read request */ |
|---|
| 356 | unsigned int otpKeyIdSize; /* Actual size of Otp read buffer */ |
|---|
| 357 | } NEXUS_ReadOtpIO; |
|---|
| 358 | |
|---|
| 359 | /***************************************************************************** |
|---|
| 360 | Summary: |
|---|
| 361 | This function returns one OTP key identifiers or one MC0 OTP value. |
|---|
| 362 | |
|---|
| 363 | Description: |
|---|
| 364 | This function shall be used to read either OTP key identifier or other OTP field value. |
|---|
| 365 | Depends on the access control matrix, only certain OTP fields can be read in a specific |
|---|
| 366 | customer mode. Note that this function can only read back one OTP value at a time. |
|---|
| 367 | |
|---|
| 368 | Performance and Timing: |
|---|
| 369 | This is a synchronous/blocking function that would not return until it is done or failed. |
|---|
| 370 | |
|---|
| 371 | See Also: |
|---|
| 372 | NEXUS_Security_ReadMSP |
|---|
| 373 | *****************************************************************************/ |
|---|
| 374 | NEXUS_Error NEXUS_Security_ReadOTP( |
|---|
| 375 | NEXUS_OtpCmdReadRegister readOtpEnum, |
|---|
| 376 | NEXUS_OtpKeyType keyType, |
|---|
| 377 | NEXUS_ReadOtpIO *pReadOtpIO /* [out] structure holding read OTP buffer and size */ |
|---|
| 378 | ); |
|---|
| 379 | |
|---|
| 380 | |
|---|
| 381 | /************************************************************************************************** |
|---|
| 382 | Summary: |
|---|
| 383 | |
|---|
| 384 | Description: |
|---|
| 385 | Structure that defines which MSP field to program, with what data, using what mask and proper mode, and holds the returned status |
|---|
| 386 | of a programming request |
|---|
| 387 | |
|---|
| 388 | See Also: |
|---|
| 389 | NEXUS_OtpMsp_ProgramMSP |
|---|
| 390 | **************************************************************************************************/ |
|---|
| 391 | typedef struct NEXUS_ProgramMspIO { |
|---|
| 392 | NEXUS_OtpMspCmdProgMode progMode; /* This field should contain the value of NEXUS_OtpMspCmdProgMode |
|---|
| 393 | for the bits to be programmed. This is a sanity check on the command. |
|---|
| 394 | The value NEXUS_OtpMspCmdProgMode_Enum specifies that command enum mode |
|---|
| 395 | programming is used. |
|---|
| 396 | */ |
|---|
| 397 | |
|---|
| 398 | NEXUS_OtpCmdMsp progMspEnum; /* specifies which MSP bits to program. The values this field can take are specified by the |
|---|
| 399 | typedef enum NEXUS_OtpCmdMsp in the share C header file. Each chip will have different enums |
|---|
| 400 | and customers will only have access to the files for the chips that they use. |
|---|
| 401 | */ |
|---|
| 402 | |
|---|
| 403 | unsigned char dataBitLen; /* number of bits of the MSP enum to program, from 1 to 32 */ |
|---|
| 404 | |
|---|
| 405 | unsigned char dataBitMask [NEXUS_MSP_DATA_LEN]; /* 0x0000_0001 to 0xFFFF_FFFF |
|---|
| 406 | A value 1 in a bit position specifies that the data value at that bit position is to be programmed. |
|---|
| 407 | BSP will not program bits that have a zero bit in the mask. |
|---|
| 408 | For example 0x0F means to program the 4 LSBits of an enum. |
|---|
| 409 | For example 0x8F means to program the bit 7 and 4 LSBits of an enum. |
|---|
| 410 | */ |
|---|
| 411 | unsigned char mspData[NEXUS_MSP_DATA_LEN]; /* the value that needs to be programmed */ |
|---|
| 412 | |
|---|
| 413 | } NEXUS_ProgramMspIO; |
|---|
| 414 | |
|---|
| 415 | |
|---|
| 416 | |
|---|
| 417 | /***************************************************************************** |
|---|
| 418 | Summary: |
|---|
| 419 | This function allows the programming of each of the field programmable |
|---|
| 420 | OTP (MSP) bits. |
|---|
| 421 | |
|---|
| 422 | Description: |
|---|
| 423 | This function allows the programming of each of the field programmable |
|---|
| 424 | OTP (MSP) bits. Based on the Access Control Matrix (ACL), programming of the |
|---|
| 425 | bit is allowed or disallowed. |
|---|
| 426 | |
|---|
| 427 | Performance and Timing: |
|---|
| 428 | This is a synchronous/blocking function that would not return until it is done or failed. |
|---|
| 429 | |
|---|
| 430 | See Also: |
|---|
| 431 | NEXUS_Security_ProgramOTP |
|---|
| 432 | *****************************************************************************/ |
|---|
| 433 | NEXUS_Error NEXUS_Security_ProgramMSP( |
|---|
| 434 | const NEXUS_ProgramMspIO *pProgMspIO |
|---|
| 435 | ); |
|---|
| 436 | |
|---|
| 437 | |
|---|
| 438 | #define NEXUS_MSP_KEY3_DATA_LEN 16 |
|---|
| 439 | #define NEXUS_MSP_KEY4_DATA_LEN 16 |
|---|
| 440 | |
|---|
| 441 | |
|---|
| 442 | /************************************************************************************************** |
|---|
| 443 | Summary: |
|---|
| 444 | |
|---|
| 445 | Description: |
|---|
| 446 | Structure that defines which MSP field to read and its required key/data if command authentication is needed by BSP, |
|---|
| 447 | and holds the returned value of the MSP field |
|---|
| 448 | |
|---|
| 449 | See Also: |
|---|
| 450 | NEXUS_OtpMsp_ReadMSP |
|---|
| 451 | **************************************************************************************************/ |
|---|
| 452 | typedef struct NEXUS_ReadMspParms |
|---|
| 453 | { |
|---|
| 454 | NEXUS_OtpCmdMsp readMspEnum; /* which MSP to read */ |
|---|
| 455 | |
|---|
| 456 | } NEXUS_ReadMspParms; |
|---|
| 457 | |
|---|
| 458 | |
|---|
| 459 | /***************************************************************************** |
|---|
| 460 | Summary: |
|---|
| 461 | *****************************************************************************/ |
|---|
| 462 | typedef struct NEXUS_ReadMspIO { |
|---|
| 463 | unsigned char mspDataBuf[NEXUS_MSP_OUTPUT_DATA_LEN]; /* Buffer to hold MSP data for the current MSP read request */ |
|---|
| 464 | unsigned char lockMspDataBuf[NEXUS_MSP_OUTPUT_DATA_LEN]; /* Buffer to hold lock MSP data for the current read request */ |
|---|
| 465 | /* This is used to tell if value '0' is programmed or unprogrammed */ |
|---|
| 466 | unsigned int mspDataSize; /* Actual size of MSP output buffer */ |
|---|
| 467 | } NEXUS_ReadMspIO; |
|---|
| 468 | |
|---|
| 469 | /***************************************************************************** |
|---|
| 470 | Summary: |
|---|
| 471 | This function returns one MSP value. |
|---|
| 472 | |
|---|
| 473 | Description: |
|---|
| 474 | |
|---|
| 475 | This function shall be used to read MSP field value. Depends on the access control matrix, only |
|---|
| 476 | certain MSP fields can be read in a specific customer mode. Note that this function can only |
|---|
| 477 | read back one MSP value at a time. |
|---|
| 478 | |
|---|
| 479 | Performance and Timing: |
|---|
| 480 | This is a synchronous/blocking function that would not return until it is done or failed. |
|---|
| 481 | |
|---|
| 482 | See Also: |
|---|
| 483 | NEXUS_Security_ReadOTP |
|---|
| 484 | *****************************************************************************/ |
|---|
| 485 | NEXUS_Error NEXUS_Security_ReadMSP( |
|---|
| 486 | const NEXUS_ReadMspParms *pReadMspParms, /* structure holding input parameters */ |
|---|
| 487 | NEXUS_ReadMspIO *pReadMspIO /* [out] structure holding read MSP buufer and size */ |
|---|
| 488 | ); |
|---|
| 489 | |
|---|
| 490 | /***************************************************************************** |
|---|
| 491 | Summary: |
|---|
| 492 | *****************************************************************************/ |
|---|
| 493 | typedef enum NEXUS_OtpDataSection |
|---|
| 494 | { |
|---|
| 495 | NEXUS_OtpDataSection_e0 = 0x0, |
|---|
| 496 | NEXUS_OtpDataSection_e1 = 0x1, |
|---|
| 497 | NEXUS_OtpDataSection_e2 = 0x2, |
|---|
| 498 | NEXUS_OtpDataSection_e3 = 0x3, |
|---|
| 499 | NEXUS_OtpDataSection_e4 = 0x4, |
|---|
| 500 | NEXUS_OtpDataSection_e5 = 0x5, |
|---|
| 501 | NEXUS_OtpDataSection_e6 = 0x6, |
|---|
| 502 | NEXUS_OtpDataSection_e7 = 0x7, |
|---|
| 503 | NEXUS_OtpDataSection_eMax = 0x8 |
|---|
| 504 | |
|---|
| 505 | } NEXUS_OtpDataSection; |
|---|
| 506 | |
|---|
| 507 | /***************************************************************************** |
|---|
| 508 | Summary: |
|---|
| 509 | *****************************************************************************/ |
|---|
| 510 | typedef struct NEXUS_ReadDataSectIO { |
|---|
| 511 | unsigned char dataSectBuf[NEXUS_OTP_DATASECTION_LEN]; /* Buffer to hold DataSection data for the current DataSect read request */ |
|---|
| 512 | unsigned int dataSectSize; /* Actual size of data section read */ |
|---|
| 513 | } NEXUS_ReadDataSectIO; |
|---|
| 514 | |
|---|
| 515 | |
|---|
| 516 | /***************************************************************************** |
|---|
| 517 | Summary: |
|---|
| 518 | This function returns one 32-byte data section value. |
|---|
| 519 | |
|---|
| 520 | Description: |
|---|
| 521 | There are total of 8 32-byte data sections. This function shall be used to read each 32-byte data section. |
|---|
| 522 | |
|---|
| 523 | Performance and Timing: |
|---|
| 524 | This is a synchronous/blocking function that would not return until it is done or failed. |
|---|
| 525 | |
|---|
| 526 | See Also: |
|---|
| 527 | NEXUS_Security_ProgramDataSect |
|---|
| 528 | *****************************************************************************/ |
|---|
| 529 | NEXUS_Error NEXUS_Security_ReadDataSect( |
|---|
| 530 | NEXUS_OtpDataSection readDsEnum, /* NEXUS_OtpDataSection enum of which data section to be read */ |
|---|
| 531 | NEXUS_ReadDataSectIO *pReadDataSectIO /* [out] structure holding read datasect buffer and size */ |
|---|
| 532 | ); |
|---|
| 533 | |
|---|
| 534 | |
|---|
| 535 | |
|---|
| 536 | #define NEXUS_OTP_DATASECTION_CRC_LEN 4 |
|---|
| 537 | #define NEXUS_OTP_DATASECTIONPROG_MODE 0x00010112 |
|---|
| 538 | |
|---|
| 539 | |
|---|
| 540 | /************************************************************************************************** |
|---|
| 541 | Summary: |
|---|
| 542 | |
|---|
| 543 | Description: |
|---|
| 544 | Structure that defines which OTP data section to program with what data using a proper mode, and holds |
|---|
| 545 | the returned status |
|---|
| 546 | |
|---|
| 547 | See Also: |
|---|
| 548 | NEXUS_Security_ProgramDataSect |
|---|
| 549 | **************************************************************************************************/ |
|---|
| 550 | typedef struct NEXUS_ProgramDataSectIO { |
|---|
| 551 | NEXUS_OtpDataSection progDsEnum; /* select which OTP data section to program, between NEXUS_OtpDataSection_e0 ~ |
|---|
| 552 | NEXUS_OtpDataSection_e7 */ |
|---|
| 553 | |
|---|
| 554 | unsigned char dataSectData[NEXUS_OTP_DATASECTION_LEN]; /* provide the actual 32-byte data to be programmed into the specified OTP data section*/ |
|---|
| 555 | |
|---|
| 556 | unsigned char crc[NEXUS_OTP_DATASECTION_CRC_LEN]; /* provide the crc of data section */ |
|---|
| 557 | |
|---|
| 558 | uint32_t mode; /* a kind of program magic number, must be NEXUS_OTP_DATASECTIONPROG_MODE (0x00010112). |
|---|
| 559 | if it is not this value the command will be rejected by a sanity check at BSP */ |
|---|
| 560 | |
|---|
| 561 | uint32_t padding; /* padding field, to use the entire structure with HSM PI */ |
|---|
| 562 | } NEXUS_ProgramDataSectIO; |
|---|
| 563 | |
|---|
| 564 | |
|---|
| 565 | /***************************************************************************** |
|---|
| 566 | Summary: |
|---|
| 567 | This function is used to program one 32-byte data section value. |
|---|
| 568 | |
|---|
| 569 | Description: |
|---|
| 570 | There are total of 8 32-byte data sections. This function shall be used to write one 32-byte data |
|---|
| 571 | section. |
|---|
| 572 | |
|---|
| 573 | Performance and Timing: |
|---|
| 574 | This is a synchronous/blocking function that would not return until it is done or failed. |
|---|
| 575 | |
|---|
| 576 | See Also: |
|---|
| 577 | NEXUS_Security_ReadDataSect |
|---|
| 578 | *****************************************************************************/ |
|---|
| 579 | NEXUS_Error NEXUS_Security_ProgramDataSect( |
|---|
| 580 | const NEXUS_ProgramDataSectIO *pProgDataSectIO |
|---|
| 581 | ); |
|---|
| 582 | |
|---|
| 583 | #ifdef __cplusplus |
|---|
| 584 | } |
|---|
| 585 | #endif |
|---|
| 586 | |
|---|
| 587 | #endif |
|---|