📄 flioctl.h
字号:
/******************************************************************************/
/* */
/* Copyright (C), 1995-2006, msystems Ltd. All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or without */
/* modification, are permitted provided that the following conditions are */
/* met: */
/* 1. Redistributions of source code must retain the above copyright notice, */
/* this list of conditions and the following disclaimer. */
/* 2. Redistributions in binary form must reproduce the above copyright */
/* notice, this list of conditions and the following disclaimer in the */
/* documentation and/or other materials provided with the distribution. */
/* 3. Neither the name of msystems nor the names of its contributors may be */
/* used to endorse or promote products derived from this software without */
/* specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED */
/* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR */
/* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/* */
/******************************************************************************/
/*
* $Log: V:/PVCSDB/DiskOnChip/archives/Testing/TrueFFS 6.3/Drop 2.5/3/common/flioctl.h-arc $
*
* Rev 1.12 Sep 11 2006 13:45:22 yaniv.iarovici
* Legal header added
*
* Rev 1.11 Aug 16 2006 08:47:20 Yaniv.Iarovici
* Encapsulate BDK related defines under '#ifdef BDK_ACCESS'.
*
* Rev 1.9 Aug 09 2006 16:52:50 Polina.Marimont
* initial for DOC Driver 1.0
*/
#ifndef FLIOCTL_H
#define FLIOCTL_H
#include "flsystem.h"
#include "flstruct.h"
/* In every call to flIOctl function, the irFlags field in the structure
IOreq should hold one of the following: */
typedef enum{FL_IOCTL_GET_INFO = FL_IOCTL_START,
FL_IOCTL_DEFRAGMENT,
FL_IOCTL_NO_LONGER_SUPPORTED_0, /* FL_IOCTL_WRITE_PROTECT */
FL_IOCTL_MOUNT_VOLUME,
FL_IOCTL_NO_LONGER_SUPPORTED_1, /* FL_IOCTL_FORMAT_VOLUME */
#ifdef BDK_ACCESS
FL_IOCTL_BDK_OPERATION,
#else /*BDK_ACCESS*/
FL_IOCTL_RESERVED1,
#endif /*BDK_ACCESS*/
FL_IOCTL_DELETE_SECTORS,
FL_IOCTL_READ_SECTORS,
FL_IOCTL_WRITE_SECTORS,
FL_IOCTL_NO_LONGER_SUPPORTED_2, /* FL_IOCTL_FORMAT_PHYSICAL_DRIVE */
FL_IOCTL_NO_LONGER_SUPPORTED_3, /* FL_IOCTL_FORMAT_LOGICAL_DRIVE */
FL_IOCTL_BDTL_HW_PROTECTION,
#ifdef BDK_ACCESS
FL_IOCTL_BINARY_HW_PROTECTION,
#else /*BDK_ACCESS*/
FL_IOCTL_RESERVED2,
#endif /*BDK_ACCESS*/
FL_IOCTL_OTP,
FL_IOCTL_CUSTOMER_ID,
FL_IOCTL_UNIQUE_ID,
FL_IOCTL_NUMBER_OF_PARTITIONS,
FL_IOCTL_NO_LONGER_SUPPORTED_4, /* FL_IOCTL_INQUIRE_CAPABILITIES */
FL_IOCTL_NO_LONGER_SUPPORTED_5, /* FL_IOCTL_SET_ENVIRONMENT_VARIABLES */
FL_IOCTL_NO_LONGER_SUPPORTED_6, /* FL_IOCTL_PLACE_EXB_BY_BUFFER */
FL_IOCTL_NO_LONGER_SUPPORTED_7, /* FL_IOCTL_WRITE_IPL */
FL_IOCTL_DEEP_POWER_DOWN_MODE,
FL_IOCTL_EXTENDED_ENVIRONMENT_VARIABLES,
FL_IOCTL_VERIFY_VOLUME,
FL_IOCTL_SET_ACCESS_ROUTINE,
FL_IOCTL_GET_ACCESS_ROUTINE,
FL_IOCTL_NO_LONGER_SUPPORTED_8, /* FL_IOCTL_EXTENDED_WRITE_IPL */
FL_IOCTL_NO_LONGER_SUPPORTED_9, /* FL_IOCTL_OPEN_TRANSACTION */
FL_IOCTL_NO_LONGER_SUPPORTED_10, /* FL_IOCTL_COMMIT_TRANSACTION */
FL_IOCTL_NO_LONGER_SUPPORTED_11, /* FL_IOCTL_IS_VOLUME_RUGGEDIZED */
FL_IOCTL_IS_QUICK_MOUNT_VALID,
FL_IOCTL_WRITE_QUICK_MOUNT_INFO,
FL_IOCTL_CLEAR_QUICK_MOUNT_INFO,
FL_IOCTL_NO_LONGER_SUPPORTED_12, /* FL_IOCTL_COMPLETE_OPERATION */
FL_IOCTL_FLASH_FORMAT, /* Replacing FL_IOCTL_FORMAT_PHYSICAL_DRIVE */
FL_IOCTL_ERASE_BD, /* Added in TrueFFS 6.3.0 */
FL_IOCTL_FLASH_UNFORMAT, /* Added in TrueFFS 6.3.0 */
FL_IOCTL_WRITE_IPL, /* Changed in TrueFFS 6.3.0 */
FL_IOCTL_MCOTP
#ifndef FL_DO_NOT_SUPPORT_H3
,FL_IOCTL_PASS_THROUGH
#endif /*FL_DO_NOT_SUPPORT_H3*/
,FL_IOCTL_IPL_HW_PROTECTION
} flIOctlFunctionNo;
/* In every call to flIOctl function, the irData field in the structure
IOreq should point to the structure defined below. The fields
inputRecord and outputRecord should point to structures which are
specific to each IOctl function as defined in this file. */
typedef struct {
void FAR1 *inputRecord;
void FAR1 *outputRecord;
} flIOctlRecord;
/* General output record that returns only status. */
typedef struct {
FLStatus status;
} flOutputStatusRecord;
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
TFFS_DLL_API FLStatus NAMING_CONVENTION bdIOctl(IOreq FAR2 *);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#ifndef flIOctl
#define flIOctl bdIOctl
#endif
/* Input and output records for the different IOCTL functions: */
/* =========================================================== */
/*************************************************************************/
/* Get disk information (FL_IOCTL_GET_INFO) */
/* Input record: NULL */
/* Output record: */
typedef struct
{
VolumeInfoRecord info;
FLStatus status;
} flDiskInfoOutput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Defragment volume (FL_IOCTL_DEFRAGMENT) */
/* Input record: */
typedef struct {
FLSDword requiredNoOfSectors; /* Minimum number of sectors to make */
/* available. */
} flDefragInput;
/* Outout record: */
typedef struct {
FLSDword actualNoOfSectors; /* Actual number of sectors available */
FLStatus status;
} flDefragOutput;
/*************************************************************************/
/* Mount volume (FL_IOCTL_MOUNT_VOLUME) */
/* Input record: */
typedef struct {
FLByte type; /* type of operation: FL_MOUNT\FL_DISMOUNT */
} flMountInput;
#define FL_MOUNT 0
#define FL_DISMOUNT 1
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Delete logical sectors (FL_IOCTL_DELETE_SECTORS) */
/* Input record: */
typedef struct {
FLSDword firstSector; /* First logical sector to delete */
FLSDword numberOfSectors; /* Number of sectors to delete */
} flDeleteSectorsInput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Format flash device (FL_IOCTL_FLASH_FORMAT) */
/* Input record: */
typedef struct {
FLDword dwFormatFlags; /* type of format as defined in blockdev.h */
FLSDword sdwNoOfKeeps;
FormatParams3 * fpPtr; /* Format parameters structure (defined in flformat.h) */
} flFlashFormatInput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Erase existing disk partition (FL_IOCTL_ERASE_BD) */
/* Input record: */
typedef struct {
FLDword dwFlags; /* Reserved - Must be set to 0 */
} flEraseBDInput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Format flash device (FL_IOCTL_FLASH_UNFORMAT) */
/* Input record: */
typedef struct {
FLDword dwFlags; /* Reserved - Must be set to 0 */
} flFlashUnformatInput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* BDK and BDTL protection operations: (FL_IOCTL_BINARY_HW_PROTECTION) */
/* (FL_IOCTL_BDTL_HW_PROTECTION) */
/* insert key \ remove key \ identify \ change key \ */
/* change protection type \ change lock status */
/* Input record: */
typedef struct {
FLByte protectionType; /* Protection attributes. The following */
/*attributes can be ored: PROTECTABLE, */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -