source: svn/newcon3bcm2_21bu/nexus/modules/security/7552/src/nexus_security_misc.c

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 4.4 KB
Line 
1/******************************************************************************
2 *    (c)2009-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_security_misc.c $
39 * $brcm_Revision: 5 $
40 * $brcm_Date: 7/12/11 12:55a $
41 *
42 * Module Description:
43 *
44 * Revision History:
45 *
46 * $brcm_Log: /nexus/modules/security/7400/src/nexus_security_misc.c $
47 *
48 * 5   7/12/11 12:55a atruong
49 * SW7231-272: Code Cleanup
50 *
51 * 4   1/21/11 6:10p katrep
52 * SW7231-7:add support for 7231
53 *
54 * 3   12/22/10 5:48p mphillip
55 * SW7422-104: Merge 40nm support to /main
56 *
57 * SW7422-104/2   12/22/10 5:36p mphillip
58 * SW7422-104: Add error trace for unsupported version
59 *
60 * SW7422-104/1   12/16/10 6:14p mphillip
61 * SW7422-104: Initial support for 7422
62 *
63 * 2   4/8/09 12:37p erickson
64 * PR53745: fix warning
65 *
66 * 1   4/2/09 12:03p yili
67 * PR53745:Add data section support
68 *
69 *****************************************************************************/
70
71#include "nexus_security_module.h"
72#include "priv/nexus_security_priv.h"
73#include "priv/nexus_core.h"
74
75#include "bhsm.h"
76#include "bsp_s_commands.h"
77#include "bsp_s_misc.h"
78#include "bsp_s_hw.h"
79#include "bsp_s_keycommon.h"
80#include "bhsm_keyladder.h"
81
82#if (BCHP_CHIP!=7422) && (BCHP_CHIP!=7231) && (BCHP_CHIP!=7425) && (BCHP_CHIP!=7344) && (BCHP_CHIP!=7346) && (BCHP_CHIP!=7230) && (BCHP_CHIP!=7358) && (BCHP_CHIP!=7552)
83#include "bhsm_misc.h"
84#include "bhsm_user_cmds.h"
85#endif
86
87BDBG_MODULE(nexus_security);
88
89
90NEXUS_Error NEXUS_Security_RouteDataSectionKey(NEXUS_KeySlotHandle keyHandle)
91{
92#ifdef NEXUS_SECURITY_DS2_ROUTING
93    BERR_Code   errCode = BERR_SUCCESS;
94    BHSM_RouteDataSectionKeyIO_t  inout_RouteDataSectionKeyIO;
95    BHSM_Handle hHsm;
96
97    NEXUS_Security_GetHsm_priv (&hHsm);
98    if ( !hHsm )
99        return NEXUS_NOT_INITIALIZED;
100
101    inout_RouteDataSectionKeyIO.unKeySlotNumber = keyHandle->keySlotNumber;
102    errCode = BHSM_RouteDataSectionKey (hHsm, &inout_RouteDataSectionKeyIO);
103
104
105    if ( errCode!= BERR_SUCCESS )
106    {
107        return NEXUS_NOT_SUPPORTED;
108    }
109
110    return NEXUS_SUCCESS;
111#else
112    BSTD_UNUSED(keyHandle);
113    return BERR_TRACE(NEXUS_NOT_SUPPORTED);
114#endif
115
116}
Note: See TracBrowser for help on using the repository browser.