117 lines
4.8 KiB
C
117 lines
4.8 KiB
C
/*
|
|
******************************************************************************
|
|
* SOURCE FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: Sec4Notify.h,v $ $Revision: 1.5 $
|
|
* $Source: /home/interpeak/CVSRoot/ipfreescale/sec4/Sec4Notify.h,v $
|
|
* $Author: dhessing $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
******************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/****************************************************************************
|
|
* Sec4Notify.h - ISR register transfer definitions for the SEC4.x
|
|
* security core family
|
|
* Based on Sec2Notify.h for SEC2.x family
|
|
****************************************************************************
|
|
* Copyright (c) Certicom Corp. 1996-2000. All rights reserved
|
|
* Copyright (c) 2003-2005 Freescale Semiconductor
|
|
* All Rights Reserved. Proprietary and Confidential.
|
|
*
|
|
* NOTICE: The information contained in this file is proprietary
|
|
* to Freescale Semiconductor, and is being made available to
|
|
* Freescale's customers under strict license agreements.
|
|
* Use or disclosure of this information is permissible only
|
|
* under the terms of the existing license agreement.
|
|
***************************************************************************/
|
|
|
|
/*
|
|
* Revision History:
|
|
* 1.0 Mar 11,2011 - Based on Sec2Notify.h v1.2
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SEC4NOTIFY_H
|
|
#define SEC4NOTIFY_H
|
|
|
|
/*! \struct device_regs
|
|
\brief A grouping of status and error indication registers
|
|
*/
|
|
typedef struct device_regs
|
|
{
|
|
/* Copy of status regs defined in t_SecStatRegs in sec_regs.h */
|
|
uint64_t req_deq ; /* Number of Requests Dequeued */
|
|
uint64_t ob_enc_req ; /* Number of Outbound Encrypt Requests */
|
|
uint64_t ib_dec_req ; /* Number of Inbound Decrypt Requests */
|
|
uint64_t ob_encrypt ; /* Number of Outbound Bytes Encrypted */
|
|
uint64_t ob_protect ; /* Number of Outbound Bytes Protected */
|
|
uint64_t ib_decrypt ; /* Number of Inbound Bytes Decrypted */
|
|
uint64_t ib_validated ; /* Number of Inbound Bytes Validated */
|
|
/* uint8_t reserved0[104]; */ /* Offset+0x0038: Reserved */
|
|
uint64_t crnr ; /* CHA Revision Number Register */
|
|
uint64_t ctpr ; /* Compile Time Parameters Register */
|
|
/* uint8_t reserved1[16] ; */ /* Offset+0x00B0: Reserved */
|
|
uint64_t far ; /* Fault Address Register */
|
|
uint32_t falr ; /* Fault Address LIODN Register */
|
|
uint32_t fadr ; /* Fault Address Detail Register */
|
|
/* uint8_t reserved2[4] ; */ /* Offset+0x00D0: Reserved */
|
|
uint32_t sstar ; /* SEC 4.0 Status Register */
|
|
/* uint8_t reserved3[8] ; */ /* Offset+0x00D8: Reserved */
|
|
uint32_t rvidr ; /* RTIC Version ID Register */
|
|
uint32_t ccbvidr ; /* CCB Version ID Register */
|
|
uint64_t chavidr ; /* CHA Version ID Register */
|
|
uint64_t chanumr ; /* CHA Number Register */
|
|
uint64_t secvidr ; /* SEC 4.0 Version ID Register */
|
|
|
|
/* TODO: Include any info from t_SecJqRegs? */
|
|
} DEVICE_REGS;
|
|
|
|
|
|
/*! \struct STATUS_REQ
|
|
\brief structure used to indicate the state of the SEC4 as well as the
|
|
driver. Returned as a pointer by GetStatus()
|
|
*/
|
|
typedef struct
|
|
{
|
|
DEVICE_REGS deviceregs;
|
|
} STATUS_REQ;
|
|
|
|
typedef STATUS_REQ SEC4_STATUS;
|
|
|
|
typedef void* PSEC4_NOTIFY_CTX;
|
|
|
|
/*! \struct SEC4_NOTIFY_ON_ERROR_CTX
|
|
\brief structure used in all requests to indicate the nature
|
|
of errors.
|
|
*/
|
|
typedef struct
|
|
{
|
|
unsigned long errorcode; /*!< Error that
|
|
the request generated
|
|
*/
|
|
void *request; /*!< Pointer to
|
|
original request
|
|
*/
|
|
/* STATUS_REQ driverstatus; TODO: Should we provide info to the user here, as in SEC2? */ /*!< Detailed information
|
|
as to the state of the
|
|
hardware and the driver
|
|
at the time of an error
|
|
*/
|
|
} SEC4_NOTIFY_ON_ERROR_CTX, *PSEC4_NOTIFY_ON_ERROR_CTX;
|
|
|
|
|
|
typedef void (*PSEC4_NOTIFY_ROUTINE) (PSEC4_NOTIFY_CTX pCtx);
|
|
|
|
typedef void (*PSEC4_NOTIFY_ON_ERROR_ROUTINE) (PSEC4_NOTIFY_ON_ERROR_CTX pErrCtx);
|
|
|
|
#endif
|