shortcut.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*++
  2. Copyright (c) 2014 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. shortcut.h
  5. Abstract:
  6. This header contains aliases for the EFI boot services and runtime service
  7. functions. It assumes that global variables for the boot and runtime
  8. services exist somewhere.
  9. Author:
  10. Evan Green
  11. --*/
  12. //
  13. // ------------------------------------------------------------------- Includes
  14. //
  15. //
  16. // ---------------------------------------------------------------- Definitions
  17. //
  18. //
  19. // Define boot service aliases.
  20. //
  21. #define EfiRaiseTPL EfiBootServices->RaiseTPL
  22. #define EfiRestoreTPL EfiBootServices->RestoreTPL
  23. #define EfiAllocatePages EfiBootServices->AllocatePages
  24. #define EfiFreePages EfiBootServices->FreePages
  25. #define EfiGetMemoryMap EfiBootServices->GetMemoryMap
  26. #define EfiAllocatePool EfiBootServices->AllocatePool
  27. #define EfiFreePool EfiBootServices->FreePool
  28. #define EfiCreateEvent EfiBootServices->CreateEvent
  29. #define EfiSetTimer EfiBootServices->SetTimer
  30. #define EfiWaitForEvent EfiBootServices->WaitForEvent
  31. #define EfiSignalEvent EfiBootServices->SignalEvent
  32. #define EfiCloseEvent EfiBootServices->CloseEvent
  33. #define EfiCheckEvent EfiBootServices->CheckEvent
  34. #define EfiInstallProtocolInterface EfiBootServices->InstallProtocolInterface
  35. #define EfiReinstallProtocolInterface \
  36. EfiBootServices->ReinstallProtocolInterface
  37. #define EfiUninstallProtocolInterface \
  38. EfiBootServices->UninstallProtocolInterface
  39. #define EfiHandleProtocol EfiBootServices->HandleProtocol
  40. #define EfiRegisterProtocolNotify EfiBootServices->RegisterProtocolNotify
  41. #define EfiLocateHandle EfiBootServices->LocateHandle
  42. #define EfiLocateDevicePath EfiBootServices->LocateDevicePath
  43. #define EfiInstallConfigurationTable \
  44. EfiBootServices->InstallConfigurationTable
  45. #define EfiLoadImage EfiBootServices->LoadImage
  46. #define EfiStartImage EfiBootServices->StartImage
  47. #define EfiExit EfiBootServices->Exit
  48. #define EfiUnloadImage EfiBootServices->UnloadImage
  49. #define EfiExitBootServices EfiBootServices->ExitBootServices
  50. #define EfiGetNextMonotonicCount EfiBootServices->GetNextMonotonicCount
  51. #define EfiStall EfiBootServices->Stall
  52. #define EfiSetWatchdogTimer EfiBootServices->SetWatchdogTimer
  53. #define EfiConnectController EfiBootServices->ConnectController
  54. #define EfiDisconnectController EfiBootServices->DisconnectController
  55. #define EfiOpenProtocol EfiBootServices->OpenProtocol
  56. #define EfiCloseProtocol EfiBootServices->CloseProtocol
  57. #define EfiOpenProtocolInformation EfiBootServices->OpenProtocolInformation
  58. #define EfiProtocolsPerHandle EfiBootServices->ProtocolsPerHandle
  59. #define EfiLocateHandleBuffer EfiBootServices->LocateHandleBuffer
  60. #define EfiLocateProtocol EfiBootServices->LocateProtocol
  61. #define EfiInstallMultipleProtocolInterfaces \
  62. EfiBootServices->InstallMultipleProtocolInterfaces
  63. #define EfiUninstallMultipleProtocolInterfaces \
  64. EfiBootServices->UninstallMultipleProtocolInterfaces
  65. #define EfiCalculateCrc32 EfiBootServices->CalculateCrc32
  66. #define EfiCopyMem EfiBootServices->CopyMem
  67. #define EfiSetMem EfiBootServices->SetMem
  68. #define EfiCreateEventEx EfiBootServices->CreateEventEx
  69. //
  70. // Define runtime service aliases.
  71. //
  72. #define EfiGetTime EfiRuntimeServices->GetTime
  73. #define EfiSetTime EfiRuntimeServices->SetTime
  74. #define EfiGetWakeupTime EfiRuntimeServices->GetWakeupTime
  75. #define EfiSetWakeupTime EfiRuntimeServices->SetWakeupTime
  76. #define EfiSetVirtualAddressMap EfiRuntimeServices->SetVirtualAddressMap
  77. #define EfiConvertPointer EfiRuntimeServices->ConvertPointer
  78. #define EfiGetVariable EfiRuntimeServices->GetVariable
  79. #define EfiGetNextVariableName EfiRuntimeServices->GetNextVariableName
  80. #define EfiSetVariable EfiRuntimeServices->SetVariable
  81. #define EfiGetNextHighMonotonicCount \
  82. EfiRuntimeServices->GetNextHighMonotonicCount
  83. #define EfiResetSystem EfiRuntimeServices->ResetSystem
  84. #define EfiUpdateCapsule EfiRuntimeServices->UpdateCapsule
  85. #define EfiQueryCapsuleCapabilities \
  86. EfiRuntimeServices->QueryCapsuleCapabilities
  87. #define EfiQueryVariableInfo EfiRuntimeServices->QueryVariableInfo
  88. //
  89. // ------------------------------------------------------ Data Type Definitions
  90. //
  91. //
  92. // -------------------------------------------------------------------- Globals
  93. //
  94. //
  95. // Define the globals used by the shortcuts.
  96. //
  97. extern EFI_BOOT_SERVICES *EfiBootServices;
  98. extern EFI_RUNTIME_SERVICES *EfiRuntimeServices;
  99. extern EFI_SYSTEM_TABLE *EfiSystemTable;
  100. //
  101. // -------------------------------------------------------- Function Prototypes
  102. //