📄 ssfif.h
字号:
/** * \file * SSF (Security Support Functions) external definitions. * * \version $Revision$ $State$ * * \date $Date$ * * \author $Author$ * * \par Last changed by: * $Author$ * *****************************************************************************//* * Copyright 2002 ADVANCED MICRO DEVICES, INC. All Rights Reserved. * * This software and any related documentation (the "Materials") are the * confidential proprietary information of AMD. Unless otherwise provided * in an agreement specifically licensing the Materials, the Materials are * provided in confidence and may not to be used, distributed, modified, or * reproduced in whole or in part by any means. * * LIMITATION OF LIABILITY: THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY * EXPRESS OR IMPLIED WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO * WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, TITLE, FITNESS FOR ANY * PARTICULAR PURPOSE, OR WARRANTIES ARISING FORM CONDUCT, COURSE OF * DEALING, OR USAGE OF TRADE. IN NO EVENT SHALL AMD OR ITS LICENSORS BE * LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, * DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF * INFORMATION) ARISING OUT OF THE USE OF OR INABILITY TO USE THE * MATERIALS, EVEN IF AMD HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH * DAMAGES. BECAUSE SOME JURISDICTIONS PROHIBIT THE EXCLUSION OR * LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE * ABOVE LIMITATION MAY NOT APPLY TO YOU. * * AMD does not assume any responsibility for any errors which may appear * in the Materials nor any responsibility to support or update the * Materials. AMD retains the right to modify the Materials at any time, * without notice, and is not obligated to provide such modified Materials * to you. * * NO SUPPORT OBLIGATION: AMD is not obligated to furnish, support, or make * any further information, software, technical information, know-how, or * show-how available to you. * *****************************************************************************/#ifndef SSFIF_H#define SSFIF_H#include <string.h>#include "sec.h"/****************************************************************************** Constants*****************************************************************************//* ---- start internal memory managment function ---- *//****************************************************************************** Types*****************************************************************************/typedef enum SsfSuccessTag { SSF_SUCCESSFUL = 0x0000, SSF_UNSUCCESSFUL = SSF_ERROR_BASE,} SsfSuccess_t;/****************************************************************************** Macros*****************************************************************************//* wrapper for std functions */#define ssf_memset(s,c,n) memset((s),(c),(n))#define ssf_memcpy(d,s,n) memcpy((d),(s),(n))#define hss_memcpy ssf_memcpy#define hss_memset ssf_memset#define SECURITY_ENABLE_DVEINIT (0x00000001) /* normal flags, must 1 to enable */#define SECURITY_ENABLE_DVEPROCESS (0x00000002)#define SECURITY_ENABLE_DVESIGCHK (0x00000004)#define SECURITY_ENABLE_DVERESET (0x00000008)#define SECURITY_ENABLE_HCINIT (0x00000010)#define SECURITY_ENABLE_HCPROCESS (0x00000020)#define SECURITY_ENABLE_HCCHK (0x00000040)#define SECURITY_ENABLE_HCRESET (0x00000080)#define SECURITY_ENABLE_PRNMEMSTAT (0x80000000) /* inverse flags, must be 0 to enable */#define SECURITY_ENABLE_ALL (0xffffffff)/****************************************************************************** Classes*****************************************************************************//****************************************************************************** Data*****************************************************************************/#ifdef __cplusplusextern "C" {#endif#ifdef __cplusplus} /* extern "C" */#endif/****************************************************************************** Functions*****************************************************************************/#ifdef __cplusplusextern "C" {#endif/* from ssf.c - see there for docs */ SsfSuccess_t SsfInitCtx(Int8 * pBuffer, Int32 Size); SsfSuccess_t SsfGetSpsBuffer(Int8 ** ppBuffer, Int32 * pSize);#ifdef HSS_ENA_NVRAM SsfSuccess_t SsfGetSnvBuffer(Int8 ** ppBuffer, Int32 * pSize);#endif /*HSS_ENA_NVRAM */ void *SsfMalloc(Int32 size); void SsfFree(void *ptr); void *SsfRealloc(void *ptr, size_t size); Boolean SsfIsSecurityDisabled(void); SsfSecurityEnableMask_t SsfGetSecurityEnableMask(void); void SsfFatalError(int code); /*replacement for Our_exit function */ void SsfUtilMemoryPrintPoolInfo();#ifdef __cplusplus} /* extern "C" */#endif/****************************************************************************** Inline Functions*****************************************************************************/#endif /* #ifndef SSFIF_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -