varback.h 3.2 KB

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