1 /*
2  * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 
8 #ifndef _SECDEBUG_API_H
9 #define _SECDEBUG_API_H
10 
11 #ifdef __cplusplus
12 extern "C"
13 {
14 #endif
15 
16 /*! @file
17 @brief This file contains the secure debug API definition.
18 */
19 
20 #include "cc_pal_types_plat.h"
21 
22 /*! SOC-id size. */
23 #define CC_BSV_SEC_DEBUG_SOC_ID_SIZE            0x20
24 
25 /*----------------------------
26       PUBLIC FUNCTIONS
27 -----------------------------------*/
28 
29 /*!
30 @brief This API enables/disables debug (through the DCU registers), according to the
31 permissions given in the debug certificate, or predefined values.
32 For more information, see ARM TrustZone CryptoCell-312 Software Integrator's Manual.
33 
34 
35 @return CC_OK on success.
36 @return A non-zero value from bsv_error.h on failure.
37 */
38 CCError_t CC_BsvSecureDebugSet(
39     unsigned long   hwBaseAddress,  /*!< [in] CryptoCell HW registers' base address. */
40     uint32_t   *pDebugCertPkg,  /*!< [in] Pointer to the Secure Debug certificate package. NULL is a valid value. */
41     uint32_t   certPkgSize,     /*!< [in] Byte size of the certificate package. */
42     uint32_t   *pEnableRmaMode, /*!< [out] RMA entry flag. Non-zero indicates RMA LCS entry is required. */
43     uint32_t   *pWorkspace,     /*!< [in] Pointer buffer used internally */
44     uint32_t   workspaceSize    /*!< [in] Size of the buffer used internally, minimal size is CC_SB_MIN_DBG_WORKSPACE_SIZE_IN_BYTES. */
45     );
46 
47 
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif
54 
55 
56 
57