⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flformat.h

📁 DOC文件系统驱动源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
	   OK (0) allows formatting to continue. Any other value
	   will abort the formatting with the returned status code. */
   /* In case the FL_REPORT_MOUNT_PROGRESS compilation flag is set the
      routine will also report the mount progress of the mount routine
	  for each of the Disk partitions. A 0,0 return values will report 
	  the end of a format status and of a mount operation */

/* Note the following section is not used by for DiskOnChips */
/*************************************************************/

dword        	vmAddressingLimit;
	    /* A part of the FTL Virtual Map always resides in RAM. The
	       RAM part is the one that is used to address the part of
	       the media below the VM addressing limit. Reading and
		   writing to this part is usually faster to some degree.
		   The downside is that the bigger the limit, the more RAM
		   size is required.
		   To get the extra RAM requirement in bytes, divide the
		   limit by 128 or by 256, depending on whether you
		   specified in #2.9 more than 32 or not, respectively.
		   The minimum VM limit is 0.
		   The standard value to use is 0x10000 (first 64 KBytes) */

word	    embeddedCISlength;
		/* Length in bytes of CIS to embed after the unit header */

byte FAR1 *	    embeddedCIS;
		/* The unit header is structured as a beginning of a PCMCIA
		   'tuple' chain (a CIS). The unit header contains a
		   data-organization tuple, which points past the end of the
		   unit header to a location which usually just contains
		   hex FF's which mark an 'end-of-tuple-chain'. Optionally,
		   it is possible to embed an entire CIS chain at this
		   location. If so, 'embeddedCISlength' marks the length in
		   bytes */
} FormatParams2;

/*----------------------------------------------------------*/
/* User Format Parameters record for flFormatVolume routine */
/*----------------------------------------------------------*/

typedef struct {
  /* FTL formatting section */
  long int	bootImageLen;
		/* Space to reserve for a boot-image at the start of the
		   medium. The FLite volume will begin at the next higher
		   erase unit boundary */

  unsigned	percentUse;
		/* FTL performance depends on how full the Flash media is,
		   getting slower when the media is close to 100%. It is
		   possible to avoid the worst consequences of this effect by
		   formatting the media to less than 100% capacity, so
		   guaranteeing some free space at all times. This of course
		   sacrifices some capcity.
		   The standard value to use is 98 */

  unsigned	noOfSpareUnits;
		/* BDTL partitions needs at least one spare erase unit to function as
           a read/write media. That unit is normally taken from the transfer
           units specified by the percentUsed field, but it is possible to 
           specify additional units (which takes more media space). This 
           ensures that if all the transfer units become bad and inerasable,
           the spare unit enables TrueFFS to continue its read/write
           functionality. Conversely, if no spare units are available the
           media may switch into read-only mode. The standard value used is 1 */


  dword	    vmAddressingLimit;
		/* A part of the FTL Virtual Map always resides in RAM. The
		   RAM part is the one that is used to address the part of
		   the media below the VM addressing limit. Reading and
		   writing to this part is usually faster to some degree.
		   The downside is that the bigger the limit, the more RAM
		   size is required.
		   To get the extra RAM requirement in bytes, divide the
		   limit by 128 or by 256, depending on whether you
		   specified in #2.9 more than 32 or not, respectively.
		   The minimum VM limit is 0.
		   The standard value to use is 0x10000 (first 64 KBytes) */


FLProgressCallback progressCallback;
		/* Progress callback routine, will be called if not NULL.
		   The callback routine is called after erasing each unit,
		   and its parameters are the total number of erase units
		   to format and the number erased so far.
		   The callback routine returns a Status value. A value of
		   OK (0) allows formatting to continue. Any other value
		   will abort the formatting with the returned status code. */

  /* DOS formatting section */
  char		volumeId[4];
		/* Volume identification number */

  char FAR1 *	volumeLabel;
		/* Volume label string. If NULL, no label */

  unsigned 	noOfFATcopies;
		/* It is customary to format DOS media with 2 FAT copies.
		   The first copy is always used, but more copies make it
		   possible to recover if the FAT becomes corrupted (a
		   rare occurrence). On the other hand, this slows down
		   performance and uses media space.
		   The standard value to use is 2 */

  unsigned	embeddedCISlength;
		/* Length in bytes of CIS to embed after the unit header */

  char FAR1 *	embeddedCIS;
		/* The unit header is structured as a beginning of a PCMCIA
		   'tuple' chain (a CIS). The unit header contains a
		   data-organization tuple, which points past the end of the
		   unit header to a location which usually just contains
		   hex FF's which mark an 'end-of-tuple-chain'. Optionally,
		   it is possible to embed an entire CIS chain at this
		   location. If so, 'embeddedCISlength' marks the length in
		   bytes */

} FormatParams;

/*----------------------------------------------------------*/
/* Format Parameters record passed to the translation layer */
/*----------------------------------------------------------*/

typedef struct {

  /* Global device info */

  Sdword	  bootImageLen;

  byte            percentUse;

  byte            noOfBDTLPartitions;

  byte            noOfBinaryPartitions;

  BDTLPartitionFormatParams   FAR2* BDTLPartitionInfo;

  BinaryPartitionFormatParams FAR2* binaryPartitionInfo;

  byte            flags;

  /* First volume info */

#ifdef HW_PROTECTION
  byte            protectionKey[8];

  byte            protectionType;
#endif /* HW_PROTECTION */
#ifdef COMPRESSION
  word            ratioDenominator;
  word            ratioNominator;
#endif /* COMPRESSION */

  byte            noOfSpareUnits;

  byte        	  volumeId[4];

  byte FAR1 *	  volumeLabel;

  byte            noOfFATcopies;

  /* Special features */

#ifdef WRITE_EXB_IMAGE

  Sdword          exbLen;

#endif /* WRITE_EXB_IMAGE */

  byte            cascadedDeviceNo;

  byte            noOfCascadedDevices;

  FLProgressCallback progressCallback;

  dword           osakVersion;

  /* None DiskOnChip parameters */

  dword           vmAddressingLimit;

  word            embeddedCISlength;

  byte FAR1 *	  embeddedCIS;

} TLFormatParams;

#define BINARY_SIGNATURE_NAME 4
#define BINARY_SIGNATURE_LEN  8
#define SIGN_SPL       "劏瑺"

/* Standard initializer for BDTLPartitionFormatParams structure */

#ifdef HW_PROTECTION
#ifdef COMPRESSION
#define STD_BDTL_PARAMS {0,2,TL_FORMAT_FAT,{0,0,0,0},NULL,2,{0,0,0,0,0,0,0,0},0,0,2}
#else
#define STD_BDTL_PARAMS {0,2,TL_FORMAT_FAT,{0,0,0,0},NULL,2,{0,0,0,0,0,0,0,0},0}
#endif /* COMPRESSION */
#else
#ifdef COMPRESSION
#define STD_BDTL_PARAMS {0,2,TL_FORMAT_FAT,{0,0,0,0},NULL,2,0,2}
#else
#define STD_BDTL_PARAMS {0,2,TL_FORMAT_FAT,{0,0,0,0},NULL,2}
#endif /* COMPRESSION */
#endif /* HW_PROTECTION */

/* Standard initializer for BinaryPartitionFormatParams structure */

#ifdef HW_PROTECTION
#define STD_BINARY_PARAMS {0,{'B','I','P','O'},8,{0,0,0,0,0,0,0,0},0}
#else
#define STD_BINARY_PARAMS {0,{'B','I','P','O'},8}
#endif /* HW_PROTECTION */

/* Standard initializer for FormatParams2 structure */

#ifdef WRITE_EXB_IMAGE
#define STD_FORMAT_PARAMS2 {98,1,0,NULL,NULL,NULL,0,0,0,0,0,0,NULL,0x10000l,0,NULL}
#else
#define STD_FORMAT_PARAMS2 {98,1,0,NULL,NULL,0,0,NULL,0x10000l,0,NULL}
#endif /* WRITE_EXB_IMAGE */

/* Standard initializer for FormatParams structure */

#define STD_FORMAT_PARAMS	{-1, 98, 2, 0x10000l, NULL, {0,0,0,0}, NULL, 2, 0, NULL}

#endif /* FORMAT_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -