/* * $Log: V:/Flite/archives/TrueFFS5/Src/inftl.h_V $ * * Rev 1.17 Apr 15 2002 07:37:28 oris * Added pointer to verify write in Bnand record. * Added support for VERIFY_ERASED_SECTOR compilation flag. * * Rev 1.16 Feb 19 2002 21:00:30 oris * Added FL_NORMAL_FOLDING / FL_FORCE_FOLDING / FL_NOT_IN_PLACE / CLEAR_DISCARD and UNIT_TAILER_OFFSET_2 * * Rev 1.15 Jan 28 2002 21:25:56 oris * Removed the use of back-slashes in macro definitions. * Changed constants to Unsigned Long. * * Rev 1.14 Jan 23 2002 23:33:26 oris * Added definition of QUICK_MOUNT_VALID_SING_OFFSET. * * Rev 1.13 Jan 20 2002 10:50:44 oris * Added new defintions : * - MAX_CREATE_UNIT_COUNT * - SECTORS_VERIFIED_PER_FOLDING * - ANAND_BAD_CHAIN_ADDRESS * - ANAND_BAD_CHAIN_UNIT * Changed FL_BAD_ERASE_MARK to 0 * Reorganized Bnand structure. * - Changed fields order * - Changed memory tables pointers to FAR1 pointers - for BIOS driver FAR heap. * - Added fields to Bnand structure : verifiedSectorNo / curSectorWrite / firstMediaWrite * - Removed badFormat field * Added verifiedSectorNo to quick mount record. * * Rev 1.12 Nov 16 2001 00:22:54 oris * Remove warnings. * removed QUICK_MOUNT_FEATURE ifdef. * * Rev 1.11 Nov 08 2001 10:49:58 oris * Reorganized Bnand structure and added debug state field. * Added INFTL_FAILED_MOUNT, ALL_PARITY_BITS_OK , DISCARD_UNIT_OFFSET definitions. * * Rev 1.10 Sep 24 2001 18:23:56 oris * Changed UNIT_UNAVAIL from 0x6a to 0x60 in order not to loose sector count. * * Rev 1.9 Sep 16 2001 21:48:02 oris * changed the MAX_UNIT_NUM to 32K * * Rev 1.8 Sep 15 2001 23:47:04 oris * Added MAX_FOLDING_LOOP definition. * Changed MAX_UNIT_NUM to cause 576MB to group 2 physical units to a single virtual unit. * * Rev 1.7 Jul 13 2001 01:06:24 oris * Changed second header offset to page 4 to prevent 6 PPP. * * Rev 1.6 Jun 17 2001 08:18:16 oris * Changed recusive include define to INFTL_H. * Added FL_BAD_ERASE_MARK definition for units without the erase mark on mount operation. * * Rev 1.5 May 16 2001 21:20:20 oris * Added the FL_ prefix to the following defines: MALLOC and FREE. * Changed wear level counter from 0xFF to 0xFFF0 * Change "data" named variables to flData to avoid name clashes. * * Rev 1.4 Apr 16 2001 13:51:10 oris * Changed stack allocation of multi-sector buffers to dynamic allocation. * * Rev 1.3 Apr 09 2001 15:14:18 oris * End with an empty line. * * Rev 1.2 Apr 01 2001 07:56:52 oris * copywrite notice. * Removed nested comments. * Moved macroes to the c file. * Changed variable types to standard flite types. * Compilation problem for big endien fixed. * Aliggned unit header structure (SecondANANDUnitHeader) to 8 bytes. * Changed BAD_UNIT define. * Added FL_VALID, FL_FIRST_VALID, FL_PRELIMINARY, FL_FIRST_PRELIMINARY defines. * * Rev 1.1 Feb 14 2001 02:06:24 oris * Changed MAX_CHAIN_LENGTH to an environment variable. * * Rev 1.0 Feb 13 2001 02:16:00 oris * Initial revision. * */ /***********************************************************************************/ /* M-Systems Confidential */ /* Copyright (C) M-Systems Flash Disk Pioneers Ltd. 1995-2001 */ /* All Rights Reserved */ /***********************************************************************************/ /* NOTICE OF M-SYSTEMS OEM */ /* SOFTWARE LICENSE AGREEMENT */ /* */ /* THE USE OF THIS SOFTWARE IS GOVERNED BY A SEPARATE LICENSE */ /* AGREEMENT BETWEEN THE OEM AND M-SYSTEMS. REFER TO THAT AGREEMENT */ /* FOR THE SPECIFIC TERMS AND CONDITIONS OF USE, */ /* OR CONTACT M-SYSTEMS FOR LICENSE ASSISTANCE: */ /* E-MAIL = info@m-sys.com */ /***********************************************************************************/ /*************************************************/ /* T r u e F F S 5.0 S o u r c e F i l e s */ /* --------------------------------------------- */ /*************************************************/ /***************************************************************************** * File Header * * ----------- * * Name : inftl.h * * * * Description : Data strucute and genreal defintions for INFTL flash * * translation layer. * * * *****************************************************************************/ #ifndef INFTL_H #define INFTL_H #include "flbuffer.h" #include "flflash.h" #include "fltl.h" typedef Sdword ANANDVirtualAddress; typedef byte ANANDPhysUnit; typedef word ANANDUnitNo; /* Partition flags */ #define INFTL_BINARY 0x20000000L #define INFTL_BDTL 0x40000000L #define INFTL_LAST 0x80000000L /* PROTECTABLE defined in flbase.h as 1 */ /* READ_PROTECTED defined in flbase.h as 2 */ /* WRITE_PROTECTED defined in flbase.h as 4 */ /* LOCK_ENABLED defined in flbase.h as 8 */ /* LOCK_ASSERTED defined in flbase.h as 16 */ /* KEY_INSERTED defined in flbase.h as 32 */ /* CHANGEABLE_PROTECTION defined in flbase.h as 64 */ /* Media flags */ #define QUICK_MOUNT 1 /* TL limits */ #define MAX_NO_OF_FLOORS 4 #define MAX_VOLUMES_PER_DOC 4 #define MAX_FOLDING_LOOP 10 #define MAX_CREATE_UNIT_COUNT 1024 #define MAX_QUICK_MOUNT_UNITS 10 #ifdef ENVIRONMENT_VARS #if (defined(VERIFY_WRITE) || defined (VERIFY_VOLUME) || defined(VERIFY_ERASED_SECTOR)) #define SECTORS_VERIFIED_PER_FOLDING flSectorsVerifiedPerFolding #endif /* VERIFY_WRITE || VERIFY_VOLUME || VERIFY_ERASED_SECTOR */ #define MAX_UNIT_CHAIN flMaxUnitChain #else #define SECTORS_VERIFIED_PER_FOLDING 64UL #define MAX_UNIT_CHAIN 20 #endif /* ENVIRONMENT_VARS */ #define DOUBLE_MAX_UNIT_CHAIN 64 /* Double max unit chain */ /* Folding flags */ #define FL_NORMAL_FOLDING 0 #define FL_FORCE_FOLDING 1 #define FL_NOT_IN_PLACE 2 /* General defines */ #define NO_OF_MEDIA_HEADERS 2 #define HEADERS_SPACING (8UL<flData #endif /* INFTL_H */