Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

626 lines
24 KiB

  1. /*
  2. * $Log: V:/Flite/archives/TrueFFS5/Src/FLIOCTL.H_V $
  3. *
  4. * Rev 1.7 May 09 2001 00:45:48 oris
  5. * Changed protection ioctl interface to prevent the use of input buffer as an output buffer.
  6. *
  7. * Rev 1.6 Apr 16 2001 13:45:10 oris
  8. * Removed warrnings by changing some of the fields types to standart flite types.
  9. *
  10. * Rev 1.5 Apr 09 2001 15:02:22 oris
  11. * Added comment to ifdef statment.
  12. * End with an empty line.
  13. *
  14. * Rev 1.4 Apr 01 2001 15:16:38 oris
  15. * Updated inquire capability ioctl - diffrent input and output records.
  16. *
  17. * Rev 1.3 Apr 01 2001 07:58:44 oris
  18. * Moved the following defines to blockdev.h:
  19. * FL_PROTECT 0
  20. * FL_UNPROTECT 1
  21. * FL_UNLOCK 2
  22. *
  23. * Rev 1.2 Feb 14 2001 02:16:16 oris
  24. * Updated inquire capabilities ioctl.
  25. *
  26. * Rev 1.1 Feb 13 2001 01:49:06 oris
  27. * Added the following new IO Controls:
  28. * FL_IOCTL_FORMAT_VOLUME2,
  29. * FL_IOCTL_FORMAT_PARTITION,
  30. * FL_IOCTL_BDTL_HW_PROTECTION,
  31. * FL_IOCTL_BINARY_HW_PROTECTION,
  32. * FL_IOCTL_OTP,
  33. * FL_IOCTL_CUSTOMER_ID,
  34. * FL_IOCTL_UNIQUE_ID,
  35. * FL_IOCTL_NUMBER_OF_PARTITIONS,
  36. * FL_IOCTL_SUPPORTED_FEATURES,
  37. * FL_IOCTL_SET_ENVIRONMENT_VARIABLES,
  38. * FL_IOCTL_PLACE_EXB_BY_BUFFER,
  39. * FL_IOCTL_WRITE_IPL,
  40. * FL_IOCTL_DEEP_POWER_DOWN_MODE,
  41. * and BDK_GET_INFO type in FL_IOCTL_BDK_OPERATION
  42. *
  43. * Rev 1.0 Feb 04 2001 11:38:18 oris
  44. * Initial revision.
  45. *
  46. */
  47. /***********************************************************************************/
  48. /* M-Systems Confidential */
  49. /* Copyright (C) M-Systems Flash Disk Pioneers Ltd. 1995-2001 */
  50. /* All Rights Reserved */
  51. /***********************************************************************************/
  52. /* NOTICE OF M-SYSTEMS OEM */
  53. /* SOFTWARE LICENSE AGREEMENT */
  54. /* */
  55. /* THE USE OF THIS SOFTWARE IS GOVERNED BY A SEPARATE LICENSE */
  56. /* AGREEMENT BETWEEN THE OEM AND M-SYSTEMS. REFER TO THAT AGREEMENT */
  57. /* FOR THE SPECIFIC TERMS AND CONDITIONS OF USE, */
  58. /* OR CONTACT M-SYSTEMS FOR LICENSE ASSISTANCE: */
  59. /* E-MAIL = [email protected] */
  60. /***********************************************************************************/
  61. #include "flbase.h"
  62. #include "dosformt.h"
  63. #include "blockdev.h"
  64. #ifdef BDK_ACCESS
  65. #include "docbdk.h"
  66. #endif
  67. #ifndef FLIOCTL_H
  68. #define FLIOCTL_H
  69. #define NT5PORT
  70. #ifdef IOCTL_INTERFACE
  71. #ifdef NT5PORT
  72. #ifdef WRITE_EXB_IMAGE
  73. #define EXB_BUFFER_SIZE 0x200
  74. #endif /*WRITE_EXB_IMAGE*/
  75. #endif /*NT5PORT*/
  76. /* In every call to flIOctl function, the irFlags field in the structure
  77. IOreq should hold one of the following: */
  78. typedef enum{FL_IOCTL_GET_INFO = FL_IOCTL_START,
  79. FL_IOCTL_DEFRAGMENT,
  80. FL_IOCTL_WRITE_PROTECT,
  81. FL_IOCTL_MOUNT_VOLUME,
  82. FL_IOCTL_FORMAT_VOLUME,
  83. FL_IOCTL_BDK_OPERATION,
  84. FL_IOCTL_DELETE_SECTORS,
  85. FL_IOCTL_READ_SECTORS,
  86. FL_IOCTL_WRITE_SECTORS,
  87. FL_IOCTL_FORMAT_PHYSICAL_DRIVE,
  88. FL_IOCTL_FORMAT_LOGICAL_DRIVE,
  89. FL_IOCTL_BDTL_HW_PROTECTION,
  90. FL_IOCTL_BINARY_HW_PROTECTION,
  91. FL_IOCTL_OTP,
  92. FL_IOCTL_CUSTOMER_ID,
  93. FL_IOCTL_UNIQUE_ID,
  94. FL_IOCTL_NUMBER_OF_PARTITIONS,
  95. FL_IOCTL_INQUIRE_CAPABILITIES,
  96. FL_IOCTL_SET_ENVIRONMENT_VARIABLES,
  97. FL_IOCTL_PLACE_EXB_BY_BUFFER,
  98. FL_IOCTL_EXTENDED_WRITE_IPL,
  99. FL_IOCTL_EXTENDED_ENVIRONMENT_VARIABLES,
  100. FL_IOCTL_VERIFY_VOLUME,
  101. FL_IOCTL_DEEP_POWER_DOWN_MODE
  102. } flIOctlFunctionNo;
  103. FLStatus flIOctl(IOreq FAR2 *);
  104. /* In every call to flIOctl function, the irData field in the structure
  105. IOreq should point to the structure defined below. The fields
  106. inputRecord and outputRecord should point to structures which are
  107. specific to each IOctl function as defined in this file. */
  108. typedef struct {
  109. void FAR1 *inputRecord;
  110. void FAR1 *outputRecord;
  111. } flIOctlRecord;
  112. /* General output record that returns only status. */
  113. typedef struct {
  114. FLStatus status;
  115. } flOutputStatusRecord;
  116. /* Input and output records for the different IOCTL functions: */
  117. /* =========================================================== */
  118. /* Get disk information (FL_IOCTL_GET_INFO) */
  119. /* Input record: NULL */
  120. /* Output record: */
  121. typedef struct {
  122. VolumeInfoRecord info; /* VolumeInfoRecord is defined in blockdev.h */
  123. FLStatus status;
  124. } flDiskInfoOutput;
  125. /* Output record: flOutputStatusRecord */
  126. /******************************************************************************/
  127. /* Check partition for power failures symptoms (FL_IOCTL_VERIFY_VOLUME) */
  128. #ifdef VERIFY_VOLUME
  129. /* Input record: NULL */
  130. typedef struct {
  131. dword flags; /* Must be set to 0 */
  132. } flVerifyVolumeInput;
  133. /* Output record: */
  134. typedef struct {
  135. void FAR1* callBack; /* Must be set to null */
  136. FLStatus status;
  137. } flVerifyVolumeOutput;
  138. #endif /* VERIFY_VOLUME */
  139. /******************************************************************************/
  140. /*************************************************************************/
  141. #ifdef DEFRAGMENT_VOLUME
  142. /* Defragment volume (FL_IOCTL_DEFRAGMENT) */
  143. /* Input record: */
  144. typedef struct {
  145. long requiredNoOfSectors; /* Minimum number of sectors to make available.
  146. if -1 then a quick garbage collection operation
  147. is invoked. */
  148. } flDefragInput;
  149. /* Outout record: */
  150. typedef struct {
  151. long actualNoOfSectors; /* Actual number of sectors available */
  152. FLStatus status;
  153. } flDefragOutput;
  154. #endif
  155. /*************************************************************************/
  156. #ifdef WRITE_PROTECTION
  157. /* Write protection (FL_IOCTL_WRITE_PROTECT) */
  158. //type
  159. //---------
  160. #define FL_PROTECT 0
  161. #define FL_UNPROTECT 1
  162. #define FL_UNLOCK 2
  163. /* Input record: */
  164. typedef struct {
  165. byte type; /* type of operation: FL_PROTECT\FL_UNPROTECT */
  166. long password[2]; /* password */
  167. } flWriteProtectInput;
  168. /* Output record: flOutputStatusRecord */
  169. #endif /* WRITE_PROTECTION */
  170. /*************************************************************************/
  171. /* Mount volume (FL_IOCTL_MOUNT_VOLUME) */
  172. /* Input record: */
  173. typedef struct {
  174. byte type; /* type of operation: FL_MOUNT\FL_DISMOUNT */
  175. } flMountInput;
  176. #define FL_MOUNT 0
  177. #define FL_DISMOUNT 1
  178. /* Output record: flOutputStatusRecord */
  179. /*************************************************************************/
  180. #ifdef FORMAT_VOLUME
  181. /* Format volume (FL_IOCTL_FORMAT_VOLUME) */
  182. /* Input record: */
  183. typedef struct {
  184. byte formatType; /* type of format as defined in blockdev.h */
  185. FormatParams fp; /* Format parameters structure (defined in flformat.h) */
  186. } flFormatInput;
  187. /* Output record: flOutputStatusRecord */
  188. /*************************************************************************/
  189. /* Format volume (FL_IOCTL_FORMAT_LOGICAL_DRIVE) */
  190. /* Input record: */
  191. typedef struct {
  192. BDTLPartitionFormatParams fp; /* Format parameters structure (defined in flformat.h) */
  193. } flFormatLogicalInput;
  194. /* Output record: flOutputStatusRecord */
  195. /*************************************************************************/
  196. #ifdef LOW_LEVEL
  197. /* Format volume (FL_IOCTL_FORMAT_PHYSICAL_DRIVE) */
  198. /* Input record: */
  199. typedef struct {
  200. byte formatType; /* type of format as defined in blockdev.h */
  201. FormatParams2 fp; /* Format parameters structure (defined in flformat.h) */
  202. } flFormatPhysicalInput;
  203. #ifdef NT5PORT
  204. typedef struct {
  205. /*****************************/
  206. /* Device formatting section */
  207. /*****************************/
  208. byte percentUse;
  209. /* BDTL performance depends on how full the flash media is,
  210. becoming slower as the media becomes closer to 100% full.
  211. It is possible to avoid the worst-case performance
  212. (at 100% full) by formatting the media to less than 100%
  213. capacity, thus guaranteeing free space at all times. This
  214. of course sacrifices some capacity. The standard value
  215. used is 98 */
  216. byte noOfBDTLPartitions;
  217. /* Indicates the number of BDTL partitions (1 to 4). 0 will
  218. cause a single STD_BDTL_PARAMS BDTL partition */
  219. byte noOfBinaryPartitions;
  220. /* Indicates the number of binary partitions (up to 3). 0 will
  221. cause formatting with no binary partition. This value is ignored
  222. unless the TL_BINARY_FORMAT flag is set in the irFlags f the ioreq */
  223. BDTLPartitionFormatParams BDTLPartitionInfo[4];
  224. /* BDTL partition information array */
  225. BinaryPartitionFormatParams binaryPartitionInfo[3];
  226. /* Binary partition information array*/
  227. /***********************************/
  228. /* Special format features section */
  229. /***********************************/
  230. #ifdef WRITE_EXB_IMAGE
  231. byte exbBuffer[EXB_BUFFER_SIZE];
  232. /* A buffer containing the EXB file. Optionaly this file can
  233. contain only the first 512 bytes of the file while the rest
  234. will be sent using consequitive calls to flPlaceExbByBuffer */
  235. dword exbBufferLen; /* Size of the given EXB buffer */
  236. dword exbLen; /* The specific size to leave for the EXB */
  237. word exbWindow; /* Set explicit DiskOnChip window base */
  238. byte exbFlags; /* For the flags list see doc2exb.h */
  239. #endif /* WRITE_EXB_IMAGE */
  240. byte cascadedDeviceNo;
  241. /* Reserved for individual cascaded device formatting 0..n. For
  242. this value to have any affect the TL_SINGLE_CHIP_FORMATTING flag
  243. should be set in the flags field.*/
  244. byte noOfCascadedDevices;
  245. /* This field must be supplied in order to perform a format of
  246. a single chip that will be eventualy assembeled as a cascaded
  247. device. The field should specify the number of DiskOnChips
  248. that will be eventualy cascaded on the targe plaform */
  249. FLStatus (*progressCallback)(int totalUnitsToFormat,
  250. int totalUnitsFormattedSoFar);
  251. /* Progress callback routine, will be called if not NULL.
  252. The callback routine is called after erasing each unit,
  253. and its parameters are the total number of erase units
  254. to format and the number erased so far.
  255. The callback routine returns a Status value. A value of
  256. OK (0) allows formatting to continue. Any other value
  257. will abort the formatting with the returned status code. */
  258. /* Note the following section is not used by for DiskOnChips */
  259. /*************************************************************/
  260. dword vmAddressingLimit;
  261. /* A part of the FTL Virtual Map always resides in RAM. The
  262. RAM part is the one that is used to address the part of
  263. the media below the VM addressing limit. Reading and
  264. writing to this part is usually faster to some degree.
  265. The downside is that the bigger the limit, the more RAM
  266. size is required.
  267. To get the extra RAM requirement in bytes, divide the
  268. limit by 128 or by 256, depending on whether you
  269. specified in #2.9 more than 32 or not, respectively.
  270. The minimum VM limit is 0.
  271. The standard value to use is 0x10000 (first 64 KBytes) */
  272. word embeddedCISlength;
  273. /* Length in bytes of CIS to embed after the unit header */
  274. byte embeddedCIS[0x100];
  275. /* The unit header is structured as a beginning of a PCMCIA
  276. 'tuple' chain (a CIS). The unit header contains a
  277. data-organization tuple, which points past the end of the
  278. unit header to a location which usually just contains
  279. hex FF's which mark an 'end-of-tuple-chain'. Optionally,
  280. it is possible to embed an entire CIS chain at this
  281. location. If so, 'embeddedCISlength' marks the length in
  282. bytes */
  283. } UserFormatParams2;
  284. typedef struct {
  285. byte formatType; /* type of format as defined in blockdev.h */
  286. UserFormatParams2 fp; /* Format parameters structure (defined in flformat.h) */
  287. } flUserFormatPhysicalInput;
  288. #endif //NT5PORT
  289. /* Output record: flOutputStatusRecord */
  290. #endif /* LOW_LEVEL */
  291. #endif /* FORMAT_VOLUME */
  292. /*************************************************************************/
  293. #ifdef BDK_ACCESS
  294. /* BDK operations read\write\erase\create (FL_IOCTL_BDK_OPERATION) */
  295. /* Input record: */
  296. typedef struct {
  297. byte type; /* type of operation: BDK_INIT_READ\BDK_READ\BDK_INIT_WRITE\ */
  298. /* BDK_WRITE\BDK_ERASE\BDK_CREATE\BDK_GET_INFO */
  299. BDKStruct bdkStruct; /* parameters for BDK operations (defined in docbdk.h) */
  300. } flBDKOperationInput;
  301. #define BDK_INIT_READ 0
  302. #define BDK_READ 1
  303. #define BDK_INIT_WRITE 2
  304. #define BDK_WRITE 3
  305. #define BDK_ERASE 4
  306. #define BDK_CREATE 5
  307. #define BDK_GET_INFO 6
  308. #ifdef NT5PORT
  309. #define BDK_MAX_BUFFER 0x400
  310. typedef struct {
  311. byte oldSign[BDK_SIGNATURE_NAME];
  312. byte newSign[BDK_SIGNATURE_NAME];
  313. byte signOffset;
  314. dword startingBlock;
  315. dword length;
  316. byte flags;
  317. byte bdkBuffer[BDK_MAX_BUFFER];
  318. } UserBDKStruct;
  319. typedef struct {
  320. byte partitionNumber;
  321. byte type; /* type of operation: BDK_INIT_READ\BDK_READ\BDK_INIT_WRITE\ */
  322. /* BDK_WRITE\BDK_ERASE\BDK_CREATE\BDK_GET_INFO */
  323. UserBDKStruct bdkStruct; /* parameters for BDK operations (defined in docbdk.h) */
  324. } flUserBDKOperationInput;
  325. typedef struct {
  326. flOutputStatusRecord statusRec; /* The status of the operation*/
  327. UserBDKStruct bdkStruct; /* parameters for BDK operations (defined in docbdk.h) */
  328. } flUserBDKOperationOutput;
  329. #endif /*NT5PORT*/
  330. /* Output record: flOutputStatusRecord */
  331. #endif /* BDK_ACCESS */
  332. /*************************************************************************/
  333. #ifdef HW_PROTECTION
  334. /* BDK and BDTL protection operations: (FL_IOCTL_BINARY_HW_PROTECTION) */
  335. /* (FL_IOCTL_BDTL_HW_PROTECTION) */
  336. /* insert key \ remove key \ identify \ change key \ */
  337. /* change protection type \ change lock status */
  338. /* Input record: */
  339. typedef struct {
  340. byte protectionType; /* see flflash.h for the protection attributes */
  341. byte key[8]; /* The new key to the change Key call */
  342. byte type; /* Operation type see list bellow */
  343. } flProtectionInput;
  344. #ifdef NT5PORT
  345. typedef struct {
  346. byte partitionNumber;
  347. byte protectionType; /* see flflash.h for the protection attributes */
  348. byte key[8]; /* The new key to the change Key call */
  349. byte type; /* Operation type see list bellow */
  350. } flBDKProtectionInput;
  351. #endif /*NT5PORT*/
  352. /*Type*/
  353. /*--------------*/
  354. #define PROTECTION_INSERT_KEY 0
  355. #define PROTECTION_REMOVE_KEY 1
  356. #define PROTECTION_GET_TYPE 2
  357. #define PROTECTION_DISABLE_LOCK 3
  358. #define PROTECTION_ENABLE_LOCK 4
  359. #define PROTECTION_CHANGE_KEY 5
  360. #define PROTECTION_CHANGE_TYPE 6
  361. #ifdef NT5PORT
  362. /*protectionType*/
  363. /*--------------*/
  364. #define PROTECTABLE 1 /* partition can recieve protection */
  365. #define READ_PROTECTED 2 /* partition is read protected */
  366. #define WRITE_PROTECTED 4 /* partition is write protected */
  367. #define LOCK_ENABLED 8 /* HW lock signal is enabled */
  368. #define LOCK_ASSERTED 16 /* HW lock signal is asserted */
  369. #define KEY_INSERTED 32 /* key is inserted (not currently */
  370. #define CHANGEABLE_PROTECTION 64 /* changeable protection area type */
  371. #endif /*NT5PORT*/
  372. /* Output record: */
  373. typedef struct {
  374. byte protectionType; /* see flflash.h for the protection attributes */
  375. FLStatus status;
  376. } flProtectionOutput;
  377. #endif /* HW_PROTECTION */
  378. /*************************************************************************/
  379. #ifdef HW_OTP
  380. /* One Time Programing operations: (FL_IOCTL_OTP */
  381. /* OTP size \ OTP read \ OTP write and lock */
  382. /* Input record: */
  383. typedef struct {
  384. dword length; /* Length to read\write\size */
  385. dword usedSize; /* The written size of the area \ Area offset */
  386. byte lockedFlag; /* The area condition LOCKED_OTP (flflash.h) */
  387. byte FAR1* buffer; /* pointer to user buffer */
  388. word type; /* defined bellow */
  389. } flOtpInput;
  390. #define OTP_SIZE 1
  391. #define OTP_READ 2
  392. #define OTP_WRITE_LOCK 3
  393. #ifdef NT5PORT
  394. typedef struct {
  395. unsigned long length; /* Length to read\write\size */
  396. unsigned long usedSize; /* The written size of the area \ Area offset */
  397. byte lockedFlag; /* The area condition LOCKED_OTP (flflash.h) */
  398. byte buffer[0x1800]; /* pointer to user buffer */
  399. word type; /* defined bellow */
  400. } UserOtpInput;
  401. typedef struct {
  402. long length; /* Length to read\write\size */
  403. long usedSize; /* The written size of the area \ Area offset */
  404. byte lockedFlag; /* The area condition LOCKED_OTP (flflash.h) */
  405. byte buffer[0x1800]; /* pointer to user buffer */
  406. flOutputStatusRecord statusRec; /* defined bellow */
  407. } UserOtpOutput;
  408. #endif /*NT5PORT*/
  409. /* Output record: flOutputStatusRecord */
  410. /*************************************************************************/
  411. /* Read customer ID (FL_IOCTL_CUSTOMER_ID) */
  412. /* Input record: NULL */
  413. /* Output record: */
  414. typedef struct {
  415. byte id[4];
  416. FLStatus status;
  417. } flCustomerIdOutput;
  418. /*************************************************************************/
  419. /* Read unique ID (FL_IOCTL_UNIQUE_ID) */
  420. /* Input record: NULL */
  421. /* Output record: */
  422. typedef struct {
  423. byte id[16];
  424. FLStatus status;
  425. } flUniqueIdOutput;
  426. #endif /* HW_OTP */
  427. /*************************************************************************/
  428. /* Read unique ID (FL_IOCTL_NUMBER_OF_PARTITIONS) */
  429. /* Input record: NULL */
  430. /* Output record: */
  431. typedef struct {
  432. byte noOfPartitions;
  433. FLStatus status;
  434. } flCountPartitionsOutput;
  435. /*************************************************************************/
  436. /* Quary the device h/w and s/w capabilities (FL_IOCTL_INQUIRE_CAPABILITIES) */
  437. #ifdef LOW_LEVEL
  438. /* Input record: */
  439. typedef struct {
  440. FLCapability capability; /* defined in blockdev.h */
  441. } flCapabilityInput;
  442. /* Output record: */
  443. typedef struct {
  444. FLCapability capability; /* defined in blockdev.h */
  445. FLStatus status;
  446. } flCapabilityOutput;
  447. #endif /*LOW_LEVEL */
  448. /******************************************************************************/
  449. /* Set environment variables values (FL_IOCTL_EXTENDED_ENVIRONMENT_VARIABLES) */
  450. #ifdef ENVIRONMENT_VARS
  451. /* Input record: */
  452. typedef struct {
  453. FLEnvVars varName; /* Enum describing the variable */
  454. dword varValue; /* New variable value */
  455. dword flags; /* FL_APPLY_TO_ALL - All socket and partitions */
  456. /* FL_APPLY_TO_SOCKET - All socket and partitions */
  457. /* FL_APPLY_TO_VOLUME - All socket and partitions */
  458. } flExtendedEnvVarsInput;
  459. #define FL_APPLY_TO_ALL 1
  460. #define FL_APPLY_TO_SOCKET 2
  461. #define FL_APPLY_TO_VOLUME 3
  462. /* Output record: */
  463. typedef struct {
  464. dword prevValue; /* The previous value of the variable */
  465. FLStatus status;
  466. } flExtendedEnvVarsOutput;
  467. #endif /* ENVIRONMENT_VARS */
  468. /******************************************************************************/
  469. /* Set environment variables values (FL_IOCTL_SET_ENVIRONMENT_VARIABLES) */
  470. //#ifdef ENVIRONMENT_VARS
  471. /* Input record: */
  472. //typedef struct {
  473. // FLEnvVars varName; /* Enum describing the variable */
  474. // int varValue; /* New variable value */
  475. //} flEnvVarsInput;
  476. /* Output record: */
  477. //typedef struct {
  478. // int prevValue; /* The previous value of the variable */
  479. // FLStatus status;
  480. //} flEnvVarsOutput;
  481. //#endif /* ENVIRONMENT_VARS */
  482. /*************************************************************************/
  483. /* Place EXB file by buffers (FL_IOCTL_PLACE_EXB_BY_BUFFER) */
  484. #ifdef LOW_LEVEL
  485. #ifdef WRITE_EXB_IMAGE
  486. /* Input record: */
  487. typedef struct {
  488. byte FAR1* buf; /* buffer of EXB file */
  489. dword bufLen; /* buffer length */
  490. byte exbFlags; /* a combination of EXB flags see flPlaceExbByBuffer routine */
  491. /* The list of flags is defined in doc2exb.h */
  492. word exbWindow; /* explicitly set device window. 0 will automatcly set window */
  493. } flPlaceExbInput;
  494. #ifdef NT5PORT
  495. typedef struct {
  496. byte buf[EXB_BUFFER_SIZE]; /* buffer of EXB file */
  497. dword bufLen; /* buffer length */
  498. byte exbFlags; /* a combination of EXB flags see flPlaceExbByBuffer routine */
  499. /* The list of flags is defined in doc2exb.h */
  500. word exbWindow; /* explicitly set device window. 0 will automatcly set window */
  501. } flUserPlaceExbInput;
  502. #endif /* NT5PORT */
  503. #endif /* WRITE_EXB_IMAGE */
  504. /* Output record: flOutputStatusRecord */
  505. /*************************************************************************/
  506. /* Write IPL area for docPlus family (FL_IOCTL_WRITE_IPL) */
  507. /* Input record: */
  508. #ifdef NT5PORT
  509. #define IPL_MAX_SIZE 0x1000L
  510. typedef struct {
  511. byte buf[IPL_MAX_SIZE]; /* IPL data buffer */
  512. word flags; /* IPL flags (see flflash.h) */
  513. word bufLen; /* IPL data buffer length */
  514. } flUserIplInput;
  515. #endif /*NT5PORT*/
  516. typedef struct {
  517. byte FAR1* buf; /* IPL data buffer */
  518. word flags; /* IPL flags (see flflash.h) */
  519. word bufLen; /* IPL data buffer length */
  520. } flIplInput;
  521. /* Output record: flOutputStatusRecord */
  522. /*************************************************************************/
  523. /* Place the device into and out of the power down mode (FL_IOCTL_DEEP_POWER_DOWN_MODE) */
  524. typedef struct {
  525. byte state; /* DEEP_POWER_DOWN - low power consumption */
  526. /* otherwise - regular power consumption */
  527. } flPowerDownInput;
  528. /* DEEP_POWER_DOWN is defined in flflash.h */
  529. #endif /* LOW_LEVEL */
  530. /* Output record: flOutputStatusRecord */
  531. /*************************************************************************/
  532. #ifdef ABS_READ_WRITE
  533. /* Delete logical sectors (FL_IOCTL_DELETE_SECTORS) */
  534. /* Input record: */
  535. typedef struct {
  536. long firstSector; /* First logical sector to delete */
  537. long numberOfSectors; /* Number of sectors to delete */
  538. } flDeleteSectorsInput;
  539. /* Output record: flOutputStatusRecord */
  540. /*************************************************************************/
  541. /* read & write logical sectors (FL_IOCTL_READ_SECTORS & FL_IOCTL_WRITE_SECTORS) */
  542. /* Input record: */
  543. typedef struct {
  544. long firstSector; /* first logical sector */
  545. long numberOfSectors; /* Number of sectors to read\write */
  546. byte FAR1 *buf; /* Data to read\write */
  547. } flReadWriteInput;
  548. /* Output record: */
  549. typedef struct {
  550. long numberOfSectors; /* Actual Number of sectors read\written */
  551. FLStatus status;
  552. } flReadWriteOutput;
  553. #endif /* ABS_READ_WRITE */
  554. #endif
  555. #endif