141 lines
4.4 KiB
C
141 lines
4.4 KiB
C
/*
|
|
******************************************************************************
|
|
* SOURCE FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: sec4_ioctl.c,v $ $Revision: 1.5 $
|
|
* $Source: /home/interpeak/CVSRoot/ipfreescale/sec4/sec4_ioctl.c,v $
|
|
* $Author: dhessing $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
******************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/****************************************************************************
|
|
* sec4_ioctl.c - Driver service hooks for the SEC4.x security core
|
|
* Based on sec2_ioctl.c for SEC2.x security core
|
|
****************************************************************************
|
|
* Copyright (c) Certicom Corp. 1996-2002. 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 sec2_ioctl.c v1.2
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
#include <stdio.h>
|
|
#include <taskLib.h>
|
|
#include "Sec4Driver.h"
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 EXTERN PROTOTYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 7 LOCAL PROTOTYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 8 DATA
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 9 LOCAL FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 10 PUBLIC FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
int SEC4Open(DEV_HDR *pDevHdr, int mode, int flags)
|
|
{
|
|
return((int)pDevHdr);
|
|
}
|
|
|
|
|
|
int SEC4Close(int devDesc)
|
|
{
|
|
SEC4Dump(DBGTXT_INITDEV, ("SEC4Close() called\n"));
|
|
return SEC4_SUCCESS;
|
|
}
|
|
|
|
int SEC4_ioctl(int devDesc, register int ioctlCode, register void *param)
|
|
{
|
|
int status;
|
|
|
|
switch (ioctlCode)
|
|
{
|
|
case IOCTL_PROC_REQ:
|
|
if (param == (int)NULL)
|
|
{
|
|
status = SEC4_INVALID_ADDRESS;
|
|
break;
|
|
}
|
|
status = ProcessRequest((GENERIC_REQ *)param, (int)taskIdSelf());
|
|
break;
|
|
|
|
case IOCTL_GET_STATUS:
|
|
status = GetStatus((STATUS_REQ *)param, (int)taskIdSelf());
|
|
break;
|
|
|
|
default:
|
|
/* invalide IOCTL code, return an error */
|
|
/* need OS-specific error value here */
|
|
return (S_ioLib_UNKNOWN_REQUEST);
|
|
} /* end switch (ioctlCode) */
|
|
|
|
return (status);
|
|
}
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|