EmuIoThunk.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /** @file
  2. Emulator Thunk to abstract OS services from pure EFI code
  3. Copyright (c) 2010 - 2011, Apple Inc. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef __EMU_IO_THUNK__
  7. #define __EMU_IO_THUNK__
  8. #define EMU_IO_THUNK_PROTOCO_GUID \
  9. { 0x453368F6, 0x7C85, 0x434A, { 0xA9, 0x8A, 0x72, 0xD1, 0xB7, 0xFF, 0xA9, 0x26 } }
  10. typedef struct _EMU_IO_THUNK_PROTOCOL EMU_IO_THUNK_PROTOCOL;
  11. typedef
  12. EFI_STATUS
  13. (EFIAPI *EMU_IO_THUNK_PROTOCOL_CLOSE_OPEN)(
  14. IN EMU_IO_THUNK_PROTOCOL *This
  15. );
  16. typedef
  17. EFI_STATUS
  18. (EFIAPI *EMU_IO_THUNK_PROTOCOL_CLOSE_CLOSE)(
  19. IN EMU_IO_THUNK_PROTOCOL *This
  20. );
  21. struct _EMU_IO_THUNK_PROTOCOL {
  22. EFI_GUID *Protocol;
  23. VOID *Interface; /// Only be valid after Open() is called
  24. CHAR16 *ConfigString;
  25. UINT16 Instance;
  26. EMU_IO_THUNK_PROTOCOL_CLOSE_OPEN Open;
  27. EMU_IO_THUNK_PROTOCOL_CLOSE_CLOSE Close;
  28. VOID *Private; /// Used by implementation
  29. };
  30. extern EFI_GUID gEmuIoThunkProtocolGuid;
  31. #endif