📄 flstruct.h
字号:
/****************************************************************************** * * * Project: DOC Driver for Linux 2.4 Block device driver for mDOC H3 family * * of devices under Linux kernel 2.4. * * * * Version: 1.0 * * Email questions to: oemsupport@sandisk.com * * Copyright (C) SanDisk IL Ltd. 1995 - 2007 * * SanDisk IL Ltd., 7 Atir Yeda Street, Kfar Saba 44425, Israel * * * ****************************************************************************** * * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the Free * * Software Foundation; either version 2 of the License, or any later version.* * This program is distributed in the hope that it will be useful, but WITHOUT* * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * * more details, which is set forth in the readme.txt file. * * You should have received a copy of the GNU General Public License along * * with this program; if not, write to the Free Software Foundation, Inc., 51 * * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * * * This License does not grant you any right to use the trademarks, service * * marks or logos of SanDisk IL Ltd. or SanDisk Corporation. * * Subject to the foregoing, SanDisk IL Ltd., for itself and on behalf of its * * licensors, hereby reserves all intellectual property rights in the program,* * except for the rights expressly granted in this License. * * * ******************************************************************************//*
* $Log: V:/PVCSDB/DiskOnChip/archives/Testing/TrueFFS 6.3/Drop 2.5/common/flstruct.h-arc $
*
* Rev 1.7.1.3 Sep 11 2006 13:45:24 yaniv.iarovici
* Legal header added
*
* Rev 1.7.1.2 Sep 03 2006 14:45:12 Yaniv.Iarovici
* 1. Added '#define FL_EXT_INFO_NO_SPEC_PART 0xFF'.
* (Indicates SDK not to retrieve specific partition info in certain APIs)
* 2. Encapsulate '#define TL_LEAVE_BINARY_AREA' and '#define TL_LEAVE_SOME_BINARY_AREA'
* under '#ifdef BDK_ACCESS'.
* 3. Define 'TL_LEAVE_SOME_PARTITIONS' with value of 0x9.
*
* Rev 1.7.1.1 Aug 16 2006 08:47:42 Yaniv.Iarovici
* 1) Add '#define TL_LEAVE_SOME_PARTITIONS TL_LEAVE_SOME_BINARY_AREA'
* 2) Encapsulate BDK related defines under '#ifdef BDK_ACCESS'.
*
* Rev 1.7.1.0 Aug 08 2006 15:55:30 Polina.Marimont
* DOC Driver 1.0 initial
*/
#ifndef FLSTRUCT_H
#define FLSTRUCT_H
#include "flcommon.h"
/**************************************************************************/
/* Function opcode definitions: */
/* All TrueFFS functions has a uniques opcodes. The following enum */
/* defines all the function calls used by the TrueFFS SDK API. */
/* Note: */
/* The order of the enum bellow should be strictly kept since the bdcall */
/* function utilizes the index values to simplify the function search */
/**************************************************************************/
typedef enum {
/* The following routines are files related routines */
/*********/
/* FILES */
/*********/
FL_READ_FILE = 0,
FL_WRITE_FILE,
FL_SPLIT_FILE,
FL_JOIN_FILE,
FL_SEEK_FILE,
FL_FIND_NEXT_FILE,
FL_FIND_FILE,
FL_TRUNCATE_FILE,
INDEX_WRITE_FILE_START = 100,
FL_CLOSE_FILE,
FL_FLUSH_FILE,
INDEX_OPENFILES_END = 200,
FL_OPEN_FILE,
FL_DELETE_FILE,
FL_FIND_FIRST_FILE,
FL_GET_DISK_INFO,
FL_RENAME_FILE,
FL_MAKE_DIR,
FL_REMOVE_DIR,
FL_FLUSH_BUFFER,
FL_CLOSE_ALL_FILES,
FL_FLUSH_ALL_FILES,
FL_OPEN_DIRECTORY,
FL_OPEN_MM_FILE,
FL_LAST_FAT_FUNCTION = 300,
/* The following routines will not perform valid partition check */
/**********/
/* BINARY */
/**********/
INDEX_BINARY_START = 400,
FL_BINARY_WRITE_INIT,
FL_BINARY_WRITE_BLOCK,
FL_BINARY_CREATE,
FL_BINARY_ERASE,
FL_BINARY_PROTECTION_CHANGE_KEY,
FL_BINARY_PROTECTION_CHANGE_LOCK,
FL_BINARY_PROTECTION_SET_TYPE,
INDEX_BINARY_WRITE_END = 500,
FL_BINARY_READ_INIT,
FL_BINARY_READ_BLOCK,
FL_BINARY_PARTITION_INFO,
FL_BINARY_PROTECTION_GET_TYPE,
FL_BINARY_PROTECTION_INSERT_KEY,
FL_BINARY_PROTECTION_REMOVE_KEY,
INDEX_BINARY_END = 600,
/* The following routines must be called with partition number 0 */
INDEX_NEED_PARTITION_0_START = 700,
/* OTP */
FL_OTP_SIZE,
FL_OTP_READ,
FL_OTP_WRITE,
FL_WRITE_IPL,
FL_READ_IPL,
/* PHYSICAL */
FL_DEEP_POWER_DOWN_MODE,
FL_GET_PHYSICAL_INFO,
FL_PHYSICAL_READ,
FL_PHYSICAL_WRITE,
FL_PHYSICAL_ERASE,
FL_UPDATE_SOCKET_PARAMS,
FL_UNIQUE_ID,
FL_CUSTOMER_ID,
BD_FORMAT_VOLUME,
BD_FORMAT_PHYSICAL_DRIVE,
FL_PLACE_EXB,
FL_READ_BBT,
FL_WRITE_BBT,
FL_GET_EXTENDED_DISK_INFO,
FL_PROTECTION_STICKY_LOCK,
BD_FLASH_FORMAT,
BD_UNFORMAT,
FL_HW_CONFIG,
FL_RECOVER_FROM_POWER_LOSS,
FL_IPL_PROTECTION_GET_TYPE,
FL_IPL_PROTECTION_REMOVE_KEY,
FL_IPL_PROTECTION_INSERT_KEY,
FL_IPL_PROTECTION_CHANGE_KEY,
FL_IPL_PROTECTION_CHANGE_TYPE,
INDEX_NEED_PARTITION_0_END = 800,
/* The following routines will go through the volume validity check */
/* PROTECTION */
FL_PROTECTION_GET_TYPE,
FL_PROTECTION_REMOVE_KEY,
FL_PROTECTION_INSERT_KEY,
FL_PROTECTION_SET_LOCK,
FL_PROTECTION_CHANGE_KEY,
FL_PROTECTION_CHANGE_TYPE,
FL_COUNT_VOLUMES,
FL_INQUIRE_CAPABILITIES,
/* BDTL */
FL_MOUNT_VOLUME,
FL_ABS_MOUNT,
BD_FORMAT_LOGICAL_DRIVE,
FL_WRITE_PROTECTION,
FL_DISMOUNT_VOLUME,
FL_CHECK_VOLUME,
FL_DEFRAGMENT_VOLUME,
FL_ABS_WRITE,
FL_ABS_DELETE,
FL_ABS_READ,
FL_ABS_ADDRESS,
FL_GET_BPB,
FL_SECTORS_IN_VOLUME,
FL_VOLUME_INFO,
FL_VERIFY_VOLUME,
FL_CLEAR_QUICK_MOUNT_INFO,
FL_RUGGEDIZE_OPERATION, /* not used */
FL_ABS_WRITE_UNCOMMITED, /* not used */
FL_ABS_DELETE_UNCOMMITED, /* not used */
FL_ABS_READ_RUGGEDIZED, /* not used */
FL_GET_QUICK_MOUNT_STATUS,
FL_WRITE_QUICK_MOUNT_INFO,
FL_LOAD_VOLUMES_CACHE,
FL_COMPLETE_OPERATION,
FL_FIND_LOGICAL_PARTITION,
FL_CREATE_LOGICAL_PARTITIONS,
FL_FORMAT_FS,
FL_GET_BD_VERSION,
FL_GET_FS_VERSION,
BD_ERASE_BD,
FL_ABS_SECURE_DELETE,
FL_MCOTP_SIZE,/* not used - must gone */
FL_MCOTP_READ,/* not used - must gone */
FL_MCOTP_WRITE,/* not used - must gone */
FL_DOCH_PASS_THROUGH /* DOCH only */
} FLFunctionNo;
/**************************************************************************/
/* Structures and defines for GetInfo routines: */
/* GetInfo routines are used by several TrueFFS packages. */
/* The output structures and values are defined below */
/**************************************************************************/
/*---------------------------------------------------------*/
/* V o l u m e I n f o R e c o r d */
/* */
/* A structure that holds general information about the */
/* media. The information includes Physical Info (see */
/* flGetPhysicalInfo), Logical partition (number of sectors*/
/* and CHS), boot area size, S/W versions Media life-time */
/* etc. */
/* A pointer to this structure is passed to the function */
/* flVolumeInfo where it receives the relevant data. */
/*---------------------------------------------------------*/
typedef struct {
FLDword logicalSectors; /* number of logical sectors */
FLDword bootAreaSize; /* boot area size */
FLDword baseAddress; /* physical base address */
FLWord flashType; /* JEDEC id of the flash */
FLDword dwPhysicalSize; /* physical size of the media */
FLDword dwPhysicalUnitSize;/* Erasable block size */
FLByte DOCType; /* DiskOnChip type (MDoc/Doc2000) */
FLSByte lifeTime; /* Life time indicator for the media (1-10) */
/* 1 - the media is fresh, */
/* 10 - the media is close to its end of life */
FLSByte driverVer[10]; /* driver version (NULL terminated string) */
FLSByte OSAKVer[10]; /* TrueFFS version that driver is based on */
/* (NULL terminated string) */
FLDword cylinders; /* Media..... */
FLDword heads; /* geometry...... */
FLDword sectors; /* parameters. */
} VolumeInfoRecord;
/*---------------------------------------------------------*/
/* P h y s i c a l I n f o */
/* */
/* A structure that holds physical information about the */
/* media. The information includes JEDEC ID, unit size and */
/* media size. Pointer to this structure is passed to the */
/* function flGetPhysicalInfo where it receives the */
/* relevant data. */
/*---------------------------------------------------------*/
typedef struct {
FLWord type; /* Flash device type (JEDEC id) */
FLByte mediaType; /* type of media see below */
FLDword dwUnitSize; /* Smallest physically erasable size in sectors */
FLDword dwMediaSize; /* media size in sectors */
FLDword dwChipSize; /* individual chip size in sectors */
FLDword interleaving; /* device interleaving */
} PhysicalInfo;
/*---------------------------------------------------------*/
/* f l E x t e n d e d D i s k I n f o */
/* */
/* This structure supplies very low-level information on */
/* the device */
/* */
/* Note: This structure is used for M-Systems low level */
/* utilities. It is subject to chages from one TrueFFS*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -