Source code of Windows XP (NT5)
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.

121 lines
3.9 KiB

  1. #ifndef _PIFLASH64_H
  2. #define _PIFLASH64_H
  3. /*++
  4. Copyright (c) 1999 Intel Corporation
  5. Module Name:
  6. PIflash64.h
  7. Abstract:
  8. Iflash64.efi protocol to abstract iflash from
  9. the system.
  10. Revision History
  11. --*/
  12. /*
  13. * Guid that identifies the IFLASH protocol
  14. */
  15. #define IFLASH64_PROTOCOL_PROTOCOL \
  16. { 0x65cba110, 0x74ab, 0x11d3, 0xbb, 0x89, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 };
  17. /*
  18. * Unlock FLASH from StartAddress to EndAddress and return a LockKey
  19. */
  20. typedef
  21. EFI_STATUS
  22. (EFIAPI *UNLOCK_FLASH_API)(
  23. IN struct _IFLASH64_PROTOCOL_INTERFACE *This
  24. );
  25. /*
  26. * Lock the flash represented by the LockKey
  27. */
  28. typedef
  29. EFI_STATUS
  30. (EFIAPI *LOCK_FLASH_API)(
  31. IN struct _IFLASH64_PROTOCOL_INTERFACE *This
  32. );
  33. /*
  34. * Status callback for a utility like IFLASH64
  35. *
  36. * Token would map to a list like Ted proposed. The utility has no idea what
  37. * happens on the other side.
  38. * ErrorStatus - Level of Error or success. Independent of Token. If you
  39. * don't know the token you will at least know pass or fail.
  40. * String - Optional extra information about the error. Could be used for
  41. * debug or future expansion
  42. *
  43. * Attributes - Options screen attributes for String. Could allow the string to be different colors.
  44. */
  45. typedef
  46. EFI_STATUS
  47. (EFIAPI *UTILITY_PROGRESS_API)(
  48. IN struct _IFLASH64_PROTOCOL_INTERFACE *This,
  49. IN UINTN Token,
  50. IN EFI_STATUS ErrorStatus,
  51. IN CHAR16 *String, OPTIONAL
  52. IN UINTN *Attributes OPTIONAL
  53. );
  54. /*
  55. * Token Values
  56. *
  57. * IFlash64 Token Codes */
  58. #define IFLASH_TOKEN_IFLASHSTART 0xB0 /* IFlash64 has started */
  59. #define IFLASH_TOKEN_READINGFILE 0xB1 /* Reading File */
  60. #define IFLASH_TOKEN_INITVPP 0xB2 /* Initializing Vpp */
  61. #define IFLASH_TOKEN_DISABLEVPP 0x10 /* Disable Vpp */
  62. #define IFLASH_TOKEN_FLASHUNLOCK 0xB3 /* Unlocking FLASH Devices */
  63. #define IFLASH_TOKEN_FLASHERASE 0xB4 /* Erasing FLASH Devices */
  64. #define IFLASH_TOKEN_FLASHPROGRAM 0xB5 /* Programming FLASH */
  65. #define IFLASH_TOKEN_FLASHVERIFY 0xB6 /* Verifying FLASH */
  66. #define IFLASH_TOKEN_UPDATESUCCES 0xB7 /* FLASH Updage Success! */
  67. #define IFLASH_TOKEN_PROGRESS_READINGFILE 0x11 /* % Reading File */
  68. #define IFLASH_TOKEN_PROGRESS_FLASHUNLOCK 0x13 /* % Unlocking FLASH Devices */
  69. #define IFLASH_TOKEN_PROGRESS_FLASHERASE 0x14 /* % Erasing FLASH Devices */
  70. #define IFLASH_TOKEN_PROGRESS_FLASHPROGRAM 0x15 /* % Programming FLASH */
  71. #define IFLASH_TOKEN_PROGRESS_FLASHVERIFY 0x16 /* % Verifying FLASH */
  72. #define IFLASH_TOKEN_READINGFILE_ER 0xB8 /* File Read Error */
  73. #define IFLASH_TOKEN_INITVPP_ER 0xB9 /* Initialization of IFB Error */
  74. #define IFLASH_TOKEN_FLASHUNLOCK_ER 0xBA /* FLASH Unlock Error */
  75. #define IFLASH_TOKEN_FLASHERASE_ER 0xBB /* FLASH Erase Error */
  76. #define IFLASH_TOKEN_FLASHVERIFY_ER 0xBC /* FLASH Verify Error */
  77. #define IFLASH_TOKEN_FLASHPROG_ER 0xBD /* FLASH Program Error */
  78. #define IFLASH_TABLE_END 0x00
  79. /*
  80. * If this number changes one of the existing API's has changes
  81. */
  82. #define IFLASH_PI_MAJOR_VERSION 0x01
  83. /*
  84. * This number changes when new APIs or data variables get added to the end
  85. * of the data structure
  86. */
  87. #define IFLASH_PI_MINOR_VERSION 0x01
  88. typedef struct _IFLASH64_PROTOCOL_INTERFACE {
  89. UINT32 MajorVersion;
  90. UINT32 MinorVersion;
  91. UNLOCK_FLASH_API UnlockFlash;
  92. LOCK_FLASH_API LockFlash;
  93. UTILITY_PROGRESS_API Progress;
  94. /*
  95. * Future expansion goes here
  96. */
  97. } IFLASH64_PROTOCOL_INTERFACE;
  98. #endif