| 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: security.inc $ |
|---|
| 39 | # $brcm_Revision: 33 $ |
|---|
| 40 | # $brcm_Date: 12/19/11 2:42p $ |
|---|
| 41 | # |
|---|
| 42 | # Module Description: |
|---|
| 43 | # |
|---|
| 44 | # Revision History: |
|---|
| 45 | # |
|---|
| 46 | # $brcm_Log: /nexus/modules/security/7400/security.inc $ |
|---|
| 47 | # |
|---|
| 48 | # 33 12/19/11 2:42p mphillip |
|---|
| 49 | # SW7425-1932: Add feature defines for Nexus Security platform features |
|---|
| 50 | # |
|---|
| 51 | # 32 11/3/11 5:38p mward |
|---|
| 52 | # SW7435-7: Add 7435. |
|---|
| 53 | # |
|---|
| 54 | # 31 10/17/11 5:42p atruong |
|---|
| 55 | # SWSECURITY-69: Support for 40-nm B0 Zeus 2.0 platforms |
|---|
| 56 | # |
|---|
| 57 | # 30 10/13/11 10:01a atruong |
|---|
| 58 | # SWSECURITY-69: Support BSP Zeus 2.0 FW |
|---|
| 59 | # |
|---|
| 60 | # 29 9/21/11 3:49p atruong |
|---|
| 61 | # SW7346-495: Add NSK2AVK support |
|---|
| 62 | # |
|---|
| 63 | # 28 8/5/11 12:06p yili |
|---|
| 64 | # SW7422-404:Changed to match source code change |
|---|
| 65 | # |
|---|
| 66 | # 27 6/30/11 2:44a atruong |
|---|
| 67 | # SW7552-41: Nexus Security Support For BCM7552 A0 |
|---|
| 68 | # |
|---|
| 69 | # 26 6/21/11 4:07p bselva |
|---|
| 70 | # SW7358-50:Enable Nexus security support for 7358 platform |
|---|
| 71 | # |
|---|
| 72 | # 25 3/30/11 10:24a jrubio |
|---|
| 73 | # SW7346-111: set CUST?=G |
|---|
| 74 | # |
|---|
| 75 | # 24 3/11/11 4:51p katrep |
|---|
| 76 | # SW7231-47:fix support for 97230 |
|---|
| 77 | # |
|---|
| 78 | # 23 3/7/11 11:48a randyjew |
|---|
| 79 | # SW7344-9:Add 97418 support |
|---|
| 80 | # |
|---|
| 81 | # 22 2/23/11 11:14a mphillip |
|---|
| 82 | # SW7422-253: Merge API changes to main |
|---|
| 83 | # |
|---|
| 84 | # SW7422-253/1 2/15/11 7:53p mphillip |
|---|
| 85 | # SW7422-253: Add support for new extension conventions |
|---|
| 86 | # |
|---|
| 87 | # 21 2/16/11 11:06p hongtaoz |
|---|
| 88 | # SW7425-103: add security support for 7425; |
|---|
| 89 | # |
|---|
| 90 | # SW7422-253/1 2/15/11 7:53p mphillip |
|---|
| 91 | # SW7422-253: Add support for new extension conventions |
|---|
| 92 | # |
|---|
| 93 | # 20 12/22/10 5:48p mphillip |
|---|
| 94 | # SW7422-104: Merge 40nm support to /main |
|---|
| 95 | # |
|---|
| 96 | # SW7422-104/1 12/16/10 6:14p mphillip |
|---|
| 97 | # SW7422-104: Initial support for 7422 |
|---|
| 98 | # |
|---|
| 99 | # 19 8/2/10 5:47p atruong |
|---|
| 100 | # SW7405-4696: Adding Security IP Licensing module for all platforms |
|---|
| 101 | # |
|---|
| 102 | # 18 3/15/10 9:57a atruong |
|---|
| 103 | # SW7400-2678: Nexus AV Keyladder to support DirecTV |
|---|
| 104 | # |
|---|
| 105 | # 17 3/14/10 11:32p atruong |
|---|
| 106 | # SW7400-2678: Nexus AV Keyladder to support DirecTV |
|---|
| 107 | # |
|---|
| 108 | # 16 11/24/09 1:06p erickson |
|---|
| 109 | # SW7420-457: add REGION_VERIFICATION_SUPPORT compile time options |
|---|
| 110 | # |
|---|
| 111 | # 15 10/1/09 1:46p yili |
|---|
| 112 | # SW7340-42:Folder rename for raw command EXT |
|---|
| 113 | # |
|---|
| 114 | # 14 9/30/09 3:21p yili |
|---|
| 115 | # SW7340-42:Add raw command interface |
|---|
| 116 | # |
|---|
| 117 | # 13 9/9/09 4:58p erickson |
|---|
| 118 | # SW7405-2964: move HSM build from transport.inc to security.inc |
|---|
| 119 | # |
|---|
| 120 | # 12 8/25/09 11:06a haoboy |
|---|
| 121 | # SW7405-2870: added support for secure RSA |
|---|
| 122 | # |
|---|
| 123 | # 11 8/25/09 1:09a atruong |
|---|
| 124 | # SW7420-223: 7420B0 ASKM Support |
|---|
| 125 | # |
|---|
| 126 | # 10 7/20/09 8:54a erickson |
|---|
| 127 | # PR56912: added secure access extension |
|---|
| 128 | # |
|---|
| 129 | # 9 5/6/09 3:53p yili |
|---|
| 130 | # PR53745:Add more nexus security sample code |
|---|
| 131 | # |
|---|
| 132 | # 8 4/2/09 1:59p yili |
|---|
| 133 | # PR53745:Add DS key routing |
|---|
| 134 | # |
|---|
| 135 | # 7 4/1/09 3:18p katrep |
|---|
| 136 | # PR53733: Fixed compilation issue when MSDRM_PD_SUPPORT is not enabled |
|---|
| 137 | # |
|---|
| 138 | # 6 3/9/09 4:31p yili |
|---|
| 139 | # PR52990:Adding region verification |
|---|
| 140 | # |
|---|
| 141 | # 5 12/24/08 11:56a mphillip |
|---|
| 142 | # PR49607: Add keyladder definition when building with keyladder support |
|---|
| 143 | # |
|---|
| 144 | # 4 8/11/08 9:41p atruong |
|---|
| 145 | # PR45612: Nexus Security extension for OTP/MSP |
|---|
| 146 | # |
|---|
| 147 | # 3 7/17/08 12:58p mphillip |
|---|
| 148 | # PR44912: Add the optional keyladder extension build hooks |
|---|
| 149 | # |
|---|
| 150 | # 2 5/28/08 2:32p mphillip |
|---|
| 151 | # PR38369: Refactor keyslot configuration to Security module from Crypto |
|---|
| 152 | # module |
|---|
| 153 | # |
|---|
| 154 | # 1 1/18/08 2:16p jgarrett |
|---|
| 155 | # PR 38808: Merging to main branch |
|---|
| 156 | # |
|---|
| 157 | # Nexus_Devel/1 11/15/07 3:54p erickson |
|---|
| 158 | # PR37137: added Security module |
|---|
| 159 | # |
|---|
| 160 | ############################################################ |
|---|
| 161 | |
|---|
| 162 | # |
|---|
| 163 | # Conditional Options for this Makefile |
|---|
| 164 | # |
|---|
| 165 | |
|---|
| 166 | ###################### |
|---|
| 167 | # Define this module # |
|---|
| 168 | ###################### |
|---|
| 169 | NEXUS_MODULES += SECURITY |
|---|
| 170 | |
|---|
| 171 | ################## |
|---|
| 172 | # Module Options # |
|---|
| 173 | ################## |
|---|
| 174 | |
|---|
| 175 | ################### |
|---|
| 176 | # Module Features # |
|---|
| 177 | ################### |
|---|
| 178 | # Compile-time variables to cover specific features |
|---|
| 179 | ifeq ($(filter $(NEXUS_PLATFORM), 97400 97401 97405 97420), $(NEXUS_PLATFORM)) |
|---|
| 180 | NEXUS_CFLAGS += -DNEXUS_SECURITY_CHIP_SIZE=65 |
|---|
| 181 | endif |
|---|
| 182 | ifeq ($(filter $(NEXUS_PLATFORM), 97422 97425), $(NEXUS_PLATFORM)) |
|---|
| 183 | NEXUS_CFLAGS += -DNEXUS_SECURITY_CHIP_SIZE=40 |
|---|
| 184 | endif |
|---|
| 185 | ifeq ($(filter $(NEXUS_PLATFORM), 97420 97422 97425), $(NEXUS_PLATFORM)) |
|---|
| 186 | NEXUS_CFLAGS += -DNEXUS_SECURITY_HAS_ASKM=1 |
|---|
| 187 | endif |
|---|
| 188 | |
|---|
| 189 | |
|---|
| 190 | ################### |
|---|
| 191 | # Module Includes # |
|---|
| 192 | ################### |
|---|
| 193 | NEXUS_SECURITY_PUBLIC_INCLUDES = $(NEXUS_TOP)/modules/security/${BCHP_CHIP}/include |
|---|
| 194 | |
|---|
| 195 | ################## |
|---|
| 196 | # Module Sources # |
|---|
| 197 | ################## |
|---|
| 198 | NEXUS_SECURITY_SOURCES := \ |
|---|
| 199 | $(NEXUS_TOP)/modules/security/${BCHP_CHIP}/src/nexus_security.c \ |
|---|
| 200 | $(NEXUS_TOP)/modules/security/${BCHP_CHIP}/src/nexus_security_misc.c |
|---|
| 201 | |
|---|
| 202 | # thunk layer |
|---|
| 203 | NEXUS_SECURITY_PRIVATE_INCLUDES += $(NEXUS_TOP)/modules/security/${BCHP_CHIP}/src $(NEXUS_SYNCTHUNK_DIR) |
|---|
| 204 | NEXUS_SECURITY_SOURCES += $(NEXUS_SYNCTHUNK_DIR)/nexus_security_thunks.c |
|---|
| 205 | |
|---|
| 206 | ####################### |
|---|
| 207 | # Module Dependencies # |
|---|
| 208 | ####################### |
|---|
| 209 | NEXUS_SECURITY_DEPENDENCIES := BASE CORE |
|---|
| 210 | |
|---|
| 211 | ################## |
|---|
| 212 | # Magnum Modules # |
|---|
| 213 | ################## |
|---|
| 214 | BHSM_CUST ?= G |
|---|
| 215 | BHSM_BSECK ?=OFF |
|---|
| 216 | ifeq ($(filter $(NEXUS_PLATFORM), 97422 97425 97435 97344 97346 97418 97231 97230 97358 97552), $(NEXUS_PLATFORM)) |
|---|
| 217 | NEXUS_SECURITY_MAGNUM_MODULES = \ |
|---|
| 218 | $(MAGNUM)/portinginterface/hsm/$(BCHP_CHIP)/bhsm.inc |
|---|
| 219 | # Make this a default for 40-nm chips |
|---|
| 220 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_SC_VALUE |
|---|
| 221 | else |
|---|
| 222 | NEXUS_SECURITY_MAGNUM_MODULES = \ |
|---|
| 223 | $(MAGNUM)/portinginterface/hsm/bhsm.inc |
|---|
| 224 | endif |
|---|
| 225 | |
|---|
| 226 | ##################### |
|---|
| 227 | # Module Extensions # |
|---|
| 228 | ##################### |
|---|
| 229 | # Note: The user is responsible for setting any other environment variables, such as BHSM_KEYLADDER=ON |
|---|
| 230 | ifeq ($(KEYLADDER_SUPPORT),y) |
|---|
| 231 | include ${NEXUS_TOP}/modules/security/${BCHP_CHIP}/keyladder_ext/keyladder_ext.inc |
|---|
| 232 | NEXUS_SECURITY_DEFINES += NEXUS_HAS_KEYLADDER_SUPPORT=1 |
|---|
| 233 | endif |
|---|
| 234 | |
|---|
| 235 | ifeq ($(MSDRM_PD_SUPPORT),y) |
|---|
| 236 | NEXUS_SECURITY_DEFINES += MSDRM_PD_SUPPORT=1 |
|---|
| 237 | endif |
|---|
| 238 | |
|---|
| 239 | ifeq ($(OTPMSP_SUPPORT),y) |
|---|
| 240 | include ${NEXUS_TOP}/modules/security/${BCHP_CHIP}/otpmsp_ext/otpmsp_ext.inc |
|---|
| 241 | endif |
|---|
| 242 | |
|---|
| 243 | ifeq ($(REGION_VERIFICATION_SUPPORT),y) |
|---|
| 244 | include ${NEXUS_TOP}/modules/security/${BCHP_CHIP}/regver_ext/regver_ext.inc |
|---|
| 245 | NEXUS_CFLAGS += -DNEXUS_SECURITY_REGVERIFY |
|---|
| 246 | NEXUS_CFLAGS += -DBSP_REGION_VERIFICATION |
|---|
| 247 | endif |
|---|
| 248 | |
|---|
| 249 | ifeq ($(BSP_DS2_KEY_ROUTING),ON) |
|---|
| 250 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_DS2_ROUTING |
|---|
| 251 | endif |
|---|
| 252 | |
|---|
| 253 | ifeq ($(BSP_SC_VALUE_SUPPORT),ON) |
|---|
| 254 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_SC_VALUE |
|---|
| 255 | endif |
|---|
| 256 | |
|---|
| 257 | ifeq ($(BSP_M2M_EXT_KEY_IV_SUPPORT),ON) |
|---|
| 258 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_EXT_KEY_IV |
|---|
| 259 | endif |
|---|
| 260 | |
|---|
| 261 | ifeq ($(SECUREACCESS_SUPPORT),y) |
|---|
| 262 | include ${NEXUS_TOP}/modules/security/${BCHP_CHIP}/secureaccess_ext/secureaccess_ext.inc |
|---|
| 263 | endif |
|---|
| 264 | |
|---|
| 265 | ifeq ($(USERCMD_SUPPORT),y) |
|---|
| 266 | include ${NEXUS_TOP}/modules/security/${BCHP_CHIP}/usercmd_ext/usercmd_ext.inc |
|---|
| 267 | endif |
|---|
| 268 | |
|---|
| 269 | ifeq ($(SECURERSA_SUPPORT),y) |
|---|
| 270 | include ${NEXUS_TOP}/modules/security/${BCHP_CHIP}/securersa_ext/securersa_ext.inc |
|---|
| 271 | endif |
|---|
| 272 | |
|---|
| 273 | ifeq ($(NEXUS_SECURITY_RAWCMD),ON) |
|---|
| 274 | include ${NEXUS_TOP}/modules/security/${BCHP_CHIP}/rawcommand_ext/nexus_security_rawcommand.inc |
|---|
| 275 | endif |
|---|
| 276 | |
|---|
| 277 | ifeq ($(IPLICENSING_SUPPORT),y) |
|---|
| 278 | include ${NEXUS_TOP}/modules/security/${BCHP_CHIP}/iplicensing_ext/iplicensing_ext.inc |
|---|
| 279 | endif |
|---|
| 280 | ifneq ($(NEXUS_SECURITY_SECUREACCESS_EXTENSION_INC),) |
|---|
| 281 | include $(NEXUS_SECURITY_SECUREACCESS_EXTENSION_INC) |
|---|
| 282 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_SECUREACCESS=1 |
|---|
| 283 | endif |
|---|
| 284 | |
|---|
| 285 | ifneq ($(NEXUS_SECURITY_SECURERSA_EXTENSION_INC),) |
|---|
| 286 | include $(NEXUS_SECURITY_SECURERSA_EXTENSION_INC) |
|---|
| 287 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_SECURERSA=1 |
|---|
| 288 | endif |
|---|
| 289 | |
|---|
| 290 | ifneq ($(NEXUS_SECURITY_IPLICENSING_EXTENSION_INC),) |
|---|
| 291 | include $(NEXUS_SECURITY_IPLICENSING_EXTENSION_INC) |
|---|
| 292 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_IPLICENSING=1 |
|---|
| 293 | endif |
|---|
| 294 | |
|---|
| 295 | ifneq ($(NEXUS_SECURITY_AVKEYLADDER_EXTENSION_INC),) |
|---|
| 296 | include $(NEXUS_SECURITY_AVKEYLADDER_EXTENSION_INC) |
|---|
| 297 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_AVKEYLADDER=1 |
|---|
| 298 | endif |
|---|
| 299 | |
|---|
| 300 | ifneq ($(NEXUS_SECURITY_KEYLADDER_EXTENSION_INC),) |
|---|
| 301 | include $(NEXUS_SECURITY_KEYLADDER_EXTENSION_INC) |
|---|
| 302 | NEXUS_SECURITY_DEFINES += NEXUS_KEYLADDER=1 |
|---|
| 303 | NEXUS_SECURITY_DEFINES += NEXUS_HAS_KEYLADDER_SUPPORT=1 |
|---|
| 304 | endif |
|---|
| 305 | |
|---|
| 306 | ifneq ($(NEXUS_SECURITY_OTPMSP_EXTENSION_INC),) |
|---|
| 307 | include $(NEXUS_SECURITY_OTPMSP_EXTENSION_INC) |
|---|
| 308 | NEXUS_SECURITY_DEFINES += NEXUS_OTPMSP=1 |
|---|
| 309 | endif |
|---|
| 310 | |
|---|
| 311 | ifneq ($(NEXUS_SECURITY_USERCMD_EXTENSION_INC),) |
|---|
| 312 | include $(NEXUS_SECURITY_USERCMD_EXTENSION_INC) |
|---|
| 313 | NEXUS_SECURITY_DEFINES += NEXUS_USERCMD=1 |
|---|
| 314 | endif |
|---|
| 315 | |
|---|
| 316 | ifneq ($(NEXUS_SECURITY_HSMRAWCMD_EXTENSION_INC),) |
|---|
| 317 | include $(NEXUS_SECURITY_HSMRAWCMD_EXTENSION_INC) |
|---|
| 318 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_RAWCMD=1 |
|---|
| 319 | NEXUS_CFLAGS += -DBHSM_AUTO_TEST |
|---|
| 320 | endif |
|---|
| 321 | |
|---|
| 322 | ifneq ($(NEXUS_SECURITY_REGVERIFY_EXTENSION_INC),) |
|---|
| 323 | include $(NEXUS_SECURITY_REGVERIFY_EXTENSION_INC) |
|---|
| 324 | #NEXUS_CFLAGS += -DNEXUS_SECURITY_REGVER |
|---|
| 325 | NEXUS_CFLAGS += -DBSP_REGION_VERIFICATION |
|---|
| 326 | NEXUS_SECURITY_DEFINES += NEXUS_SECURITY_REGVER=1 |
|---|
| 327 | endif |
|---|
| 328 | |
|---|