data.c 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. /*++
  2. Copyright (c) 1998 Intel Corporation
  3. Module Name:
  4. data.c
  5. Abstract:
  6. EFI library global data
  7. Revision History
  8. --*/
  9. #include "lib.h"
  10. //
  11. // LibInitialized - TRUE once InitializeLib() is called for the first time
  12. //
  13. BOOLEAN LibInitialized = FALSE;
  14. //
  15. // ImageHandle - Current ImageHandle, as passed to InitializeLib
  16. //
  17. EFI_HANDLE LibImageHandle;
  18. //
  19. // ST - pointer to the EFI system table
  20. //
  21. EFI_SYSTEM_TABLE *ST;
  22. //
  23. // BS - pointer to the boot services table
  24. //
  25. EFI_BOOT_SERVICES *BS;
  26. //
  27. // Default pool allocation type
  28. //
  29. EFI_MEMORY_TYPE PoolAllocationType = EfiBootServicesData;
  30. //
  31. // Unicode collation functions that are in use
  32. //
  33. EFI_UNICODE_COLLATION_INTERFACE LibStubUnicodeInterface = {
  34. LibStubStriCmp,
  35. LibStubMetaiMatch,
  36. LibStubStrLwrUpr,
  37. LibStubStrLwrUpr,
  38. NULL, // FatToStr
  39. NULL, // StrToFat
  40. NULL // SupportedLanguages
  41. };
  42. EFI_UNICODE_COLLATION_INTERFACE *UnicodeInterface = &LibStubUnicodeInterface;
  43. //
  44. // Root device path
  45. //
  46. EFI_DEVICE_PATH RootDevicePath[] = {
  47. {END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH,0}}
  48. };
  49. EFI_DEVICE_PATH EndDevicePath[] = {
  50. {END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH, 0}}
  51. };
  52. EFI_DEVICE_PATH EndInstanceDevicePath[] = {
  53. {END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH, 0}}
  54. };
  55. //
  56. // EFI IDs
  57. //
  58. EFI_GUID gEfiGlobalVariableGuid = EFI_GLOBAL_VARIABLE;
  59. EFI_GUID NullGuid = { 0,0,0,{0,0,0,0,0,0,0,0} };
  60. //
  61. // Protocol IDs
  62. //
  63. EFI_GUID gEfiDevicePathProtocolGuid = EFI_DEVICE_PATH_PROTOCOL_GUID;
  64. EFI_GUID gEfiDevicePathToTextProtocolGuid = EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID;
  65. EFI_GUID gEfiDevicePathFromTextProtocolGuid = EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID;
  66. EFI_GUID gEfiDevicePathUtilitiesProtocolGuid = EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID;
  67. EFI_GUID gEfiLoadedImageProtocolGuid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
  68. EFI_GUID gEfiSimpleTextInProtocolGuid = EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID;
  69. EFI_GUID gEfiSimpleTextOutProtocolGuid = EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID;
  70. EFI_GUID gEfiBlockIoProtocolGuid = EFI_BLOCK_IO_PROTOCOL_GUID;
  71. EFI_GUID gEfiBlockIo2ProtocolGuid = EFI_BLOCK_IO2_PROTOCOL_GUID;
  72. EFI_GUID gEfiDiskIoProtocolGuid = EFI_DISK_IO_PROTOCOL_GUID;
  73. EFI_GUID gEfiDiskIo2ProtocolGuid = EFI_DISK_IO2_PROTOCOL_GUID;
  74. EFI_GUID gEfiSimpleFileSystemProtocolGuid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
  75. EFI_GUID gEfiLoadFileProtocolGuid = EFI_LOAD_FILE_PROTOCOL_GUID;
  76. EFI_GUID gEfiDeviceIoProtocolGuid = EFI_DEVICE_IO_PROTOCOL_GUID;
  77. EFI_GUID gEfiUnicodeCollationProtocolGuid = EFI_UNICODE_COLLATION_PROTOCOL_GUID;
  78. EFI_GUID gEfiSerialIoProtocolGuid = EFI_SERIAL_IO_PROTOCOL_GUID;
  79. EFI_GUID gEfiSimpleNetworkProtocolGuid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID;
  80. EFI_GUID gEfiPxeBaseCodeProtocolGuid = EFI_PXE_BASE_CODE_PROTOCOL_GUID;
  81. EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid = EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID;
  82. EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID;
  83. EFI_GUID gEFiUiInterfaceProtocolGuid = EFI_UI_INTERFACE_PROTOCOL_GUID;
  84. EFI_GUID gEfiPciIoProtocolGuid = EFI_PCI_IO_PROTOCOL_GUID;
  85. EFI_GUID gEfiPciRootBridgeIoProtocolGuid = EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID;
  86. EFI_GUID gEfiDriverBindingProtocolGuid = EFI_DRIVER_BINDING_PROTOCOL_GUID;
  87. EFI_GUID gEfiComponentNameProtocolGuid = EFI_COMPONENT_NAME_PROTOCOL_GUID;
  88. EFI_GUID gEfiComponentName2ProtocolGuid = EFI_COMPONENT_NAME2_PROTOCOL_GUID;
  89. EFI_GUID gEfiHashProtocolGuid = EFI_HASH_PROTOCOL_GUID;
  90. EFI_GUID gEfiPlatformDriverOverrideProtocolGuid = EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID;
  91. EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid = EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID;
  92. EFI_GUID gEfiDriverFamilyOverrideProtocolGuid = EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL_GUID;
  93. EFI_GUID gEfiEbcProtocolGuid = EFI_EBC_PROTOCOL_GUID;
  94. //
  95. // File system information IDs
  96. //
  97. EFI_GUID gEfiFileInfoGuid = EFI_FILE_INFO_ID;
  98. EFI_GUID gEfiFileSystemInfoGuid = EFI_FILE_SYSTEM_INFO_ID;
  99. EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_ID;
  100. //
  101. // Reference implementation public protocol IDs
  102. //
  103. EFI_GUID InternalShellProtocol = INTERNAL_SHELL_GUID;
  104. EFI_GUID VariableStoreProtocol = VARIABLE_STORE_PROTOCOL;
  105. EFI_GUID LegacyBootProtocol = LEGACY_BOOT_PROTOCOL;
  106. EFI_GUID VgaClassProtocol = VGA_CLASS_DRIVER_PROTOCOL;
  107. EFI_GUID TextOutSpliterProtocol = TEXT_OUT_SPLITER_PROTOCOL;
  108. EFI_GUID ErrorOutSpliterProtocol = ERROR_OUT_SPLITER_PROTOCOL;
  109. EFI_GUID TextInSpliterProtocol = TEXT_IN_SPLITER_PROTOCOL;
  110. /* Added for GOP support */
  111. EFI_GUID gEfiGraphicsOutputProtocolGuid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
  112. EFI_GUID gEfiEdidDiscoveredProtocolGuid = EFI_EDID_DISCOVERED_PROTOCOL_GUID;
  113. EFI_GUID gEfiEdidActiveProtocolGuid = EFI_EDID_ACTIVE_PROTOCOL_GUID;
  114. EFI_GUID gEfiEdidOverrideProtocolGuid = EFI_EDID_OVERRIDE_PROTOCOL_GUID;
  115. EFI_GUID AdapterDebugProtocol = ADAPTER_DEBUG_PROTOCOL;
  116. //
  117. // Device path media protocol IDs
  118. //
  119. EFI_GUID gEfiPcAnsiGuid = EFI_PC_ANSI_GUID;
  120. EFI_GUID gEfiVT100Guid = EFI_VT_100_GUID;
  121. EFI_GUID gEfiVT100PlusGuid = EFI_VT_100_PLUS_GUID;
  122. EFI_GUID gEfiVTUTF8Guid = EFI_VT_UTF8_GUID;
  123. //
  124. // EFI GPT Partition Type GUIDs
  125. //
  126. EFI_GUID EfiPartTypeSystemPartitionGuid = EFI_PART_TYPE_EFI_SYSTEM_PART_GUID;
  127. EFI_GUID EfiPartTypeLegacyMbrGuid = EFI_PART_TYPE_LEGACY_MBR_GUID;
  128. //
  129. // Reference implementation Vendor Device Path Guids
  130. //
  131. EFI_GUID UnknownDevice = UNKNOWN_DEVICE_GUID;
  132. //
  133. // Configuration Table GUIDs
  134. //
  135. EFI_GUID MpsTableGuid = MPS_TABLE_GUID;
  136. EFI_GUID AcpiTableGuid = ACPI_TABLE_GUID;
  137. EFI_GUID SMBIOSTableGuid = SMBIOS_TABLE_GUID;
  138. EFI_GUID SMBIOS3TableGuid = SMBIOS3_TABLE_GUID;
  139. EFI_GUID SalSystemTableGuid = SAL_SYSTEM_TABLE_GUID;
  140. EFI_GUID EfiDtbTableGuid = EFI_DTB_TABLE_GUID;
  141. //
  142. // Network protocol GUIDs
  143. //
  144. EFI_GUID Ip4ServiceBindingProtocol = EFI_IP4_SERVICE_BINDING_PROTOCOL;
  145. EFI_GUID Ip4Protocol = EFI_IP4_PROTOCOL;
  146. EFI_GUID Udp4ServiceBindingProtocol = EFI_UDP4_SERVICE_BINDING_PROTOCOL;
  147. EFI_GUID Udp4Protocol = EFI_UDP4_PROTOCOL;
  148. EFI_GUID Tcp4ServiceBindingProtocol = EFI_TCP4_SERVICE_BINDING_PROTOCOL;
  149. EFI_GUID Tcp4Protocol = EFI_TCP4_PROTOCOL;
  150. //
  151. // Pointer protocol GUIDs
  152. //
  153. EFI_GUID SimplePointerProtocol = EFI_SIMPLE_POINTER_PROTOCOL_GUID;
  154. EFI_GUID AbsolutePointerProtocol = EFI_ABSOLUTE_POINTER_PROTOCOL_GUID;
  155. //
  156. // Debugger protocol GUIDs
  157. //
  158. EFI_GUID gEfiDebugImageInfoTableGuid = EFI_DEBUG_IMAGE_INFO_TABLE_GUID;
  159. EFI_GUID gEfiDebugSupportProtocolGuid = EFI_DEBUG_SUPPORT_PROTOCOL_GUID;
  160. //
  161. // Console extension protocol GUIDs
  162. //
  163. EFI_GUID SimpleTextInputExProtocol = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID;
  164. //
  165. // Shell protocol GUIDs
  166. //
  167. EFI_GUID ShellProtocolGuid = EFI_SHELL_PROTOCOL_GUID;
  168. EFI_GUID ShellParametersProtocolGuid = EFI_SHELL_PARAMETERS_PROTOCOL_GUID;
  169. EFI_GUID ShellDynamicCommandProtocolGuid = EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_GUID;