1530d68baSNigel Croxon /*++ 2530d68baSNigel Croxon 3530d68baSNigel Croxon Copyright (c) 1998 Intel Corporation 4530d68baSNigel Croxon 5530d68baSNigel Croxon Module Name: 6530d68baSNigel Croxon 7530d68baSNigel Croxon data.c 8530d68baSNigel Croxon 9530d68baSNigel Croxon Abstract: 10530d68baSNigel Croxon 11530d68baSNigel Croxon EFI library global data 12530d68baSNigel Croxon 13530d68baSNigel Croxon 14530d68baSNigel Croxon 15530d68baSNigel Croxon Revision History 16530d68baSNigel Croxon 17530d68baSNigel Croxon --*/ 18530d68baSNigel Croxon 19530d68baSNigel Croxon #include "lib.h" 20530d68baSNigel Croxon 21530d68baSNigel Croxon // 22530d68baSNigel Croxon // LibInitialized - TRUE once InitializeLib() is called for the first time 23530d68baSNigel Croxon // 24530d68baSNigel Croxon 25530d68baSNigel Croxon BOOLEAN LibInitialized = FALSE; 26530d68baSNigel Croxon 27530d68baSNigel Croxon // 28530d68baSNigel Croxon // ST - pointer to the EFI system table 29530d68baSNigel Croxon // 30530d68baSNigel Croxon 31530d68baSNigel Croxon EFI_SYSTEM_TABLE *ST; 32530d68baSNigel Croxon 33530d68baSNigel Croxon // 34530d68baSNigel Croxon // BS - pointer to the boot services table 35530d68baSNigel Croxon // 36530d68baSNigel Croxon 37530d68baSNigel Croxon EFI_BOOT_SERVICES *BS; 38530d68baSNigel Croxon 39530d68baSNigel Croxon 40530d68baSNigel Croxon // 41530d68baSNigel Croxon // Default pool allocation type 42530d68baSNigel Croxon // 43530d68baSNigel Croxon 44530d68baSNigel Croxon EFI_MEMORY_TYPE PoolAllocationType = EfiBootServicesData; 45530d68baSNigel Croxon 46530d68baSNigel Croxon // 47530d68baSNigel Croxon // Unicode collation functions that are in use 48530d68baSNigel Croxon // 49530d68baSNigel Croxon 50530d68baSNigel Croxon EFI_UNICODE_COLLATION_INTERFACE LibStubUnicodeInterface = { 51530d68baSNigel Croxon LibStubStriCmp, 52530d68baSNigel Croxon LibStubMetaiMatch, 53530d68baSNigel Croxon LibStubStrLwrUpr, 54530d68baSNigel Croxon LibStubStrLwrUpr, 55530d68baSNigel Croxon NULL, // FatToStr 56530d68baSNigel Croxon NULL, // StrToFat 57530d68baSNigel Croxon NULL // SupportedLanguages 58530d68baSNigel Croxon }; 59530d68baSNigel Croxon 60530d68baSNigel Croxon EFI_UNICODE_COLLATION_INTERFACE *UnicodeInterface = &LibStubUnicodeInterface; 61530d68baSNigel Croxon 62530d68baSNigel Croxon // 63530d68baSNigel Croxon // Root device path 64530d68baSNigel Croxon // 65530d68baSNigel Croxon 66530d68baSNigel Croxon EFI_DEVICE_PATH RootDevicePath[] = { 67530d68baSNigel Croxon {END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH,0}} 68530d68baSNigel Croxon }; 69530d68baSNigel Croxon 70530d68baSNigel Croxon EFI_DEVICE_PATH EndDevicePath[] = { 71530d68baSNigel Croxon {END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH, 0}} 72530d68baSNigel Croxon }; 73530d68baSNigel Croxon 74530d68baSNigel Croxon EFI_DEVICE_PATH EndInstanceDevicePath[] = { 75530d68baSNigel Croxon {END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH, 0}} 76530d68baSNigel Croxon }; 77530d68baSNigel Croxon 78530d68baSNigel Croxon 79530d68baSNigel Croxon // 80530d68baSNigel Croxon // EFI IDs 81530d68baSNigel Croxon // 82530d68baSNigel Croxon 83530d68baSNigel Croxon EFI_GUID EfiGlobalVariable = EFI_GLOBAL_VARIABLE; 84530d68baSNigel Croxon EFI_GUID NullGuid = { 0,0,0,{0,0,0,0,0,0,0,0} }; 85530d68baSNigel Croxon 86530d68baSNigel Croxon // 87530d68baSNigel Croxon // Protocol IDs 88530d68baSNigel Croxon // 89530d68baSNigel Croxon 90530d68baSNigel Croxon EFI_GUID DevicePathProtocol = DEVICE_PATH_PROTOCOL; 91530d68baSNigel Croxon EFI_GUID LoadedImageProtocol = LOADED_IMAGE_PROTOCOL; 92530d68baSNigel Croxon EFI_GUID TextInProtocol = SIMPLE_TEXT_INPUT_PROTOCOL; 93530d68baSNigel Croxon EFI_GUID TextOutProtocol = SIMPLE_TEXT_OUTPUT_PROTOCOL; 94530d68baSNigel Croxon EFI_GUID BlockIoProtocol = BLOCK_IO_PROTOCOL; 95530d68baSNigel Croxon EFI_GUID DiskIoProtocol = DISK_IO_PROTOCOL; 96530d68baSNigel Croxon EFI_GUID FileSystemProtocol = SIMPLE_FILE_SYSTEM_PROTOCOL; 97530d68baSNigel Croxon EFI_GUID LoadFileProtocol = LOAD_FILE_PROTOCOL; 98530d68baSNigel Croxon EFI_GUID DeviceIoProtocol = DEVICE_IO_PROTOCOL; 99530d68baSNigel Croxon EFI_GUID UnicodeCollationProtocol = UNICODE_COLLATION_PROTOCOL; 100530d68baSNigel Croxon EFI_GUID SerialIoProtocol = SERIAL_IO_PROTOCOL; 101530d68baSNigel Croxon EFI_GUID SimpleNetworkProtocol = EFI_SIMPLE_NETWORK_PROTOCOL; 102530d68baSNigel Croxon EFI_GUID PxeBaseCodeProtocol = EFI_PXE_BASE_CODE_PROTOCOL; 103530d68baSNigel Croxon EFI_GUID PxeCallbackProtocol = EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL; 104530d68baSNigel Croxon EFI_GUID NetworkInterfaceIdentifierProtocol = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL; 105530d68baSNigel Croxon EFI_GUID UiProtocol = EFI_UI_PROTOCOL; 106530d68baSNigel Croxon EFI_GUID PciIoProtocol = EFI_PCI_IO_PROTOCOL; 107*0f78eb65SNigel Croxon EFI_GUID DriverBindingProtocol = DRIVER_BINDING_PROTOCOL; 108530d68baSNigel Croxon // 109530d68baSNigel Croxon // File system information IDs 110530d68baSNigel Croxon // 111530d68baSNigel Croxon 112530d68baSNigel Croxon EFI_GUID GenericFileInfo = EFI_FILE_INFO_ID; 113530d68baSNigel Croxon EFI_GUID FileSystemInfo = EFI_FILE_SYSTEM_INFO_ID; 114530d68baSNigel Croxon EFI_GUID FileSystemVolumeLabelInfo = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID; 115530d68baSNigel Croxon 116530d68baSNigel Croxon // 117530d68baSNigel Croxon // Reference implementation public protocol IDs 118530d68baSNigel Croxon // 119530d68baSNigel Croxon 120530d68baSNigel Croxon EFI_GUID InternalShellProtocol = INTERNAL_SHELL_GUID; 121530d68baSNigel Croxon EFI_GUID VariableStoreProtocol = VARIABLE_STORE_PROTOCOL; 122530d68baSNigel Croxon EFI_GUID LegacyBootProtocol = LEGACY_BOOT_PROTOCOL; 123530d68baSNigel Croxon EFI_GUID VgaClassProtocol = VGA_CLASS_DRIVER_PROTOCOL; 124530d68baSNigel Croxon 125530d68baSNigel Croxon EFI_GUID TextOutSpliterProtocol = TEXT_OUT_SPLITER_PROTOCOL; 126530d68baSNigel Croxon EFI_GUID ErrorOutSpliterProtocol = ERROR_OUT_SPLITER_PROTOCOL; 127530d68baSNigel Croxon EFI_GUID TextInSpliterProtocol = TEXT_IN_SPLITER_PROTOCOL; 128530d68baSNigel Croxon /* Added for GOP support */ 129530d68baSNigel Croxon EFI_GUID GraphicsOutputProtocol = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; 130530d68baSNigel Croxon 131530d68baSNigel Croxon EFI_GUID AdapterDebugProtocol = ADAPTER_DEBUG_PROTOCOL; 132530d68baSNigel Croxon 133530d68baSNigel Croxon // 134530d68baSNigel Croxon // Device path media protocol IDs 135530d68baSNigel Croxon // 136530d68baSNigel Croxon EFI_GUID PcAnsiProtocol = DEVICE_PATH_MESSAGING_PC_ANSI; 137530d68baSNigel Croxon EFI_GUID Vt100Protocol = DEVICE_PATH_MESSAGING_VT_100; 138530d68baSNigel Croxon 139530d68baSNigel Croxon // 140530d68baSNigel Croxon // EFI GPT Partition Type GUIDs 141530d68baSNigel Croxon // 142530d68baSNigel Croxon EFI_GUID EfiPartTypeSystemPartitionGuid = EFI_PART_TYPE_EFI_SYSTEM_PART_GUID; 143530d68baSNigel Croxon EFI_GUID EfiPartTypeLegacyMbrGuid = EFI_PART_TYPE_LEGACY_MBR_GUID; 144530d68baSNigel Croxon 145530d68baSNigel Croxon 146530d68baSNigel Croxon // 147530d68baSNigel Croxon // Reference implementation Vendor Device Path Guids 148530d68baSNigel Croxon // 149530d68baSNigel Croxon EFI_GUID UnknownDevice = UNKNOWN_DEVICE_GUID; 150530d68baSNigel Croxon 151530d68baSNigel Croxon // 152530d68baSNigel Croxon // Configuration Table GUIDs 153530d68baSNigel Croxon // 154530d68baSNigel Croxon 155530d68baSNigel Croxon EFI_GUID MpsTableGuid = MPS_TABLE_GUID; 156530d68baSNigel Croxon EFI_GUID AcpiTableGuid = ACPI_TABLE_GUID; 157530d68baSNigel Croxon EFI_GUID SMBIOSTableGuid = SMBIOS_TABLE_GUID; 158530d68baSNigel Croxon EFI_GUID SalSystemTableGuid = SAL_SYSTEM_TABLE_GUID; 159530d68baSNigel Croxon 160530d68baSNigel Croxon // 161530d68baSNigel Croxon // Network protocol GUIDs 162530d68baSNigel Croxon // 163530d68baSNigel Croxon EFI_GUID Ip4ServiceBindingProtocol = EFI_IP4_SERVICE_BINDING_PROTOCOL; 164530d68baSNigel Croxon EFI_GUID Ip4Protocol = EFI_IP4_PROTOCOL; 165530d68baSNigel Croxon EFI_GUID Udp4ServiceBindingProtocol = EFI_UDP4_SERVICE_BINDING_PROTOCOL; 166530d68baSNigel Croxon EFI_GUID Udp4Protocol = EFI_UDP4_PROTOCOL; 167530d68baSNigel Croxon EFI_GUID Tcp4ServiceBindingProtocol = EFI_TCP4_SERVICE_BINDING_PROTOCOL; 168530d68baSNigel Croxon EFI_GUID Tcp4Protocol = EFI_TCP4_PROTOCOL; 169530d68baSNigel Croxon 170530d68baSNigel Croxon // 171530d68baSNigel Croxon // Pointer protocol GUIDs 172530d68baSNigel Croxon // 173530d68baSNigel Croxon EFI_GUID SimplePointerProtocol = EFI_SIMPLE_POINTER_PROTOCOL_GUID; 174530d68baSNigel Croxon EFI_GUID AbsolutePointerProtocol = EFI_ABSOLUTE_POINTER_PROTOCOL_GUID; 175530d68baSNigel Croxon 176