varback.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*++
  2. Copyright (c) 2014 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. varback.h
  5. Abstract:
  6. This header contains definitions for the UEFI variable backend protocol.
  7. Author:
  8. Evan Green 27-Mar-2014
  9. --*/
  10. //
  11. // ------------------------------------------------------------------- Includes
  12. //
  13. //
  14. // ---------------------------------------------------------------- Definitions
  15. //
  16. #define EFI_VARIABLE_BACKEND_PROTOCOL_GUID \
  17. { \
  18. 0xAB5CCA39, 0xD7C8, 0x4437, \
  19. {0xB5, 0x29, 0x86, 0xC7, 0x58, 0x66, 0x2F, 0xAA} \
  20. }
  21. //
  22. // ------------------------------------------------------ Data Type Definitions
  23. //
  24. typedef struct _EFI_VARIABLE_BACKEND_PROTOCOL EFI_VARIABLE_BACKEND_PROTOCOL;
  25. typedef
  26. EFI_STATUS
  27. (EFIAPI *EFI_VARIABLE_BACKEND_SET_DATA) (
  28. EFI_VARIABLE_BACKEND_PROTOCOL *This,
  29. VOID *Data,
  30. UINTN DataSize,
  31. BOOLEAN Replace
  32. );
  33. /*++
  34. Routine Description:
  35. This routine adds or replaces the current EFI variables with the given
  36. serialized variable buffer.
  37. Arguments:
  38. This - Supplies a pointer to the protocol instance.
  39. Data - Supplies a pointer to the serialized EFI variable data.
  40. DataSize - Supplies the size of the data buffer in bytes.
  41. Replace - Supplies a boolean indicating if the contents of this buffer
  42. should be merged with the current variables (FALSE) or if all current
  43. variables should be destroyed before adding these (TRUE).
  44. Return Value:
  45. EFI status code.
  46. --*/
  47. typedef
  48. EFI_STATUS
  49. (EFIAPI *EFI_VARIABLE_BACKEND_GET_DATA) (
  50. EFI_VARIABLE_BACKEND_PROTOCOL *This,
  51. VOID **Data,
  52. UINTN *DataSize
  53. );
  54. /*++
  55. Routine Description:
  56. This routine returns a serialized form of the given variables. The caller
  57. must ensure no variable changes are made while using this buffer.
  58. Arguments:
  59. This - Supplies a pointer to the protocol instance.
  60. Data - Supplies a pointer where a pointer will be returned to the
  61. serialized variable data. This data may be live, so the caller may not
  62. modify it.
  63. DataSize - Supplies a pointer where the size of the data will be returned
  64. on success.
  65. Return Value:
  66. EFI status code.
  67. --*/
  68. /*++
  69. Structure Description:
  70. This structure describes the variable backend protocol. This protocol
  71. allows the caller to get and set a serialized form of all the EFI variables.
  72. Members:
  73. SetData - Stores a pointer to a function used to set the EFI variables
  74. from a serialized buffer.
  75. GetData - Stores a pointer to a functio used to get a serialized
  76. representation of the current EFI variables.
  77. --*/
  78. struct _EFI_VARIABLE_BACKEND_PROTOCOL {
  79. EFI_VARIABLE_BACKEND_SET_DATA SetData;
  80. EFI_VARIABLE_BACKEND_GET_DATA GetData;
  81. };
  82. //
  83. // -------------------------------------------------------------------- Globals
  84. //
  85. //
  86. // -------------------------------------------------------- Function Prototypes
  87. //