summaryrefslogtreecommitdiff
path: root/EDK/Foundation/Efi
diff options
context:
space:
mode:
authorraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
committerraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
commitb7c51c9cf4864df6aabb99a1ae843becd577237c (patch)
treeeebe9b0d0ca03062955223097e57da84dd618b9a /EDK/Foundation/Efi
downloadzprj-master.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'EDK/Foundation/Efi')
-rw-r--r--EDK/Foundation/Efi/Guid/Acpi/Acpi.c35
-rw-r--r--EDK/Foundation/Efi/Guid/Acpi/Acpi.h44
-rw-r--r--EDK/Foundation/Efi/Guid/DebugImageInfoTable/DebugImageInfoTable.c28
-rw-r--r--EDK/Foundation/Efi/Guid/DebugImageInfoTable/DebugImageInfoTable.h63
-rw-r--r--EDK/Foundation/Efi/Guid/EfiGuidLib.cif30
-rw-r--r--EDK/Foundation/Efi/Guid/EfiGuidLib.inf59
-rw-r--r--EDK/Foundation/Efi/Guid/EfiGuidLib.mak72
-rw-r--r--EDK/Foundation/Efi/Guid/EfiGuidLib.sdl26
-rw-r--r--EDK/Foundation/Efi/Guid/EventGroup/EventGroup.c30
-rw-r--r--EDK/Foundation/Efi/Guid/EventGroup/EventGroup.h45
-rw-r--r--EDK/Foundation/Efi/Guid/GlobalVariable/GlobalVariable.c27
-rw-r--r--EDK/Foundation/Efi/Guid/GlobalVariable/GlobalVariable.h32
-rw-r--r--EDK/Foundation/Efi/Guid/Gpt/Gpt.c38
-rw-r--r--EDK/Foundation/Efi/Guid/Gpt/Gpt.h47
-rw-r--r--EDK/Foundation/Efi/Guid/HardwareErrorVariable/HardwareErrorVariable.c27
-rw-r--r--EDK/Foundation/Efi/Guid/HardwareErrorVariable/HardwareErrorVariable.h32
-rw-r--r--EDK/Foundation/Efi/Guid/Mps/Mps.c33
-rw-r--r--EDK/Foundation/Efi/Guid/Mps/Mps.h38
-rw-r--r--EDK/Foundation/Efi/Guid/PcAnsi/PcAnsi.c34
-rw-r--r--EDK/Foundation/Efi/Guid/PcAnsi/PcAnsi.h50
-rw-r--r--EDK/Foundation/Efi/Guid/SalSystemTable/SalSystemTable.c30
-rw-r--r--EDK/Foundation/Efi/Guid/SalSystemTable/SalSystemTable.h34
-rw-r--r--EDK/Foundation/Efi/Guid/SmBios/SmBios.c31
-rw-r--r--EDK/Foundation/Efi/Guid/SmBios/SmBios.h70
-rw-r--r--EDK/Foundation/Efi/Include/EfiApi.h1114
-rw-r--r--EDK/Foundation/Efi/Include/EfiDevicePath.h568
-rw-r--r--EDK/Foundation/Efi/Include/EfiError.h70
-rw-r--r--EDK/Foundation/Efi/Include/EfiHii.h1473
-rw-r--r--EDK/Foundation/Efi/Include/EfiImage.h703
-rw-r--r--EDK/Foundation/Efi/Include/EfiTypes.h292
-rw-r--r--EDK/Foundation/Efi/Include/Pxe.h58
-rw-r--r--EDK/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.h117
-rw-r--r--EDK/Foundation/Efi/Protocol/AcpiTable/AcpiTable.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/AcpiTable/AcpiTable.h112
-rw-r--r--EDK/Foundation/Efi/Protocol/Arp/Arp.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/Arp/Arp.h136
-rw-r--r--EDK/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.h106
-rw-r--r--EDK/Foundation/Efi/Protocol/Bis/Bis.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/Bis/Bis.h233
-rw-r--r--EDK/Foundation/Efi/Protocol/BlockIO/BlockIO.c31
-rw-r--r--EDK/Foundation/Efi/Protocol/BlockIO/BlockIO.h213
-rw-r--r--EDK/Foundation/Efi/Protocol/BusSpecificDriverOverride/BusSpecificDriverOverride.c31
-rw-r--r--EDK/Foundation/Efi/Protocol/BusSpecificDriverOverride/BusSpecificDriverOverride.h54
-rw-r--r--EDK/Foundation/Efi/Protocol/ComponentName/ComponentName.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/ComponentName/ComponentName.h137
-rw-r--r--EDK/Foundation/Efi/Protocol/ComponentName2/ComponentName2.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/ComponentName2/ComponentName2.h136
-rw-r--r--EDK/Foundation/Efi/Protocol/DebugPort/DebugPort.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/DebugPort/DebugPort.h98
-rw-r--r--EDK/Foundation/Efi/Protocol/DebugSupport/DebugSupport.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/DebugSupport/DebugSupport.h594
-rw-r--r--EDK/Foundation/Efi/Protocol/Decompress/Decompress.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/Decompress/Decompress.h140
-rw-r--r--EDK/Foundation/Efi/Protocol/DeviceIO/DeviceIO.c31
-rw-r--r--EDK/Foundation/Efi/Protocol/DeviceIO/DeviceIO.h132
-rw-r--r--EDK/Foundation/Efi/Protocol/DevicePath/DevicePath.c32
-rw-r--r--EDK/Foundation/Efi/Protocol/DevicePath/DevicePath.h67
-rw-r--r--EDK/Foundation/Efi/Protocol/DevicePathFromText/DevicePathFromText.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/DevicePathFromText/DevicePathFromText.h82
-rw-r--r--EDK/Foundation/Efi/Protocol/DevicePathToText/DevicePathToText.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/DevicePathToText/DevicePathToText.h95
-rw-r--r--EDK/Foundation/Efi/Protocol/DevicePathUtilities/DevicePathUtilities.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/DevicePathUtilities/DevicePathUtilities.h225
-rw-r--r--EDK/Foundation/Efi/Protocol/Dhcp4/Dhcp4.c41
-rw-r--r--EDK/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h235
-rw-r--r--EDK/Foundation/Efi/Protocol/DiskIO/DiskIo.c31
-rw-r--r--EDK/Foundation/Efi/Protocol/DiskIO/DiskIo.h111
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverBinding/DriverBinding.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverBinding/DriverBinding.h130
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverConfiguration/DriverConfiguration.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverConfiguration/DriverConfiguration.h211
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.h201
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.h138
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.h135
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.h47
-rw-r--r--EDK/Foundation/Efi/Protocol/Ebc/Ebc.c28
-rw-r--r--EDK/Foundation/Efi/Protocol/Ebc/Ebc.h183
-rw-r--r--EDK/Foundation/Efi/Protocol/EdidActive/EdidActive.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/EdidActive/EdidActive.h39
-rw-r--r--EDK/Foundation/Efi/Protocol/EdidDiscovered/EdidDiscovered.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/EdidDiscovered/EdidDiscovered.h40
-rw-r--r--EDK/Foundation/Efi/Protocol/EdidOverride/EdidOverride.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/EdidOverride/EdidOverride.h78
-rw-r--r--EDK/Foundation/Efi/Protocol/EfiNetworkInterfaceIdentifier/EfiNetworkInterfaceIdentifier.c40
-rw-r--r--EDK/Foundation/Efi/Protocol/EfiNetworkInterfaceIdentifier/EfiNetworkInterfaceIdentifier.h102
-rw-r--r--EDK/Foundation/Efi/Protocol/EfiProtocolLib.cif165
-rw-r--r--EDK/Foundation/Efi/Protocol/EfiProtocolLib.inf194
-rw-r--r--EDK/Foundation/Efi/Protocol/EfiProtocolLib.mak69
-rw-r--r--EDK/Foundation/Efi/Protocol/EfiProtocolLib.sdl26
-rw-r--r--EDK/Foundation/Efi/Protocol/FileInfo/FileInfo.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/FileInfo/FileInfo.h58
-rw-r--r--EDK/Foundation/Efi/Protocol/FileSystemInfo/FileSystemInfo.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/FileSystemInfo/FileSystemInfo.h51
-rw-r--r--EDK/Foundation/Efi/Protocol/FileSystemVolumeLabelInfo/FileSystemVolumeLabelInfo.c34
-rw-r--r--EDK/Foundation/Efi/Protocol/FileSystemVolumeLabelInfo/FileSystemVolumeLabelInfo.h38
-rw-r--r--EDK/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h136
-rw-r--r--EDK/Foundation/Efi/Protocol/GraphicsOutput/GraphicsOutput.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/GraphicsOutput/GraphicsOutput.h206
-rw-r--r--EDK/Foundation/Efi/Protocol/Hash/Hash.c40
-rw-r--r--EDK/Foundation/Efi/Protocol/Hash/Hash.h161
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.h147
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.h314
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.h454
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiFont/HiiFont.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiFont/HiiFont.h289
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiImage/HiiImage.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiImage/HiiImage.h256
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiPackageList/HiiPackageList.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiPackageList/HiiPackageList.h36
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiString/HiiString.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/HiiString/HiiString.h253
-rw-r--r--EDK/Foundation/Efi/Protocol/IScsiInitiatorName/IScsiInitiatorName.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/IScsiInitiatorName/IScsiInitiatorName.h98
-rw-r--r--EDK/Foundation/Efi/Protocol/Ip4/Ip4.c41
-rw-r--r--EDK/Foundation/Efi/Protocol/Ip4/Ip4.h241
-rw-r--r--EDK/Foundation/Efi/Protocol/Ip4Config/Ip4Config.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h72
-rw-r--r--EDK/Foundation/Efi/Protocol/LoadFile/LoadFile.c33
-rw-r--r--EDK/Foundation/Efi/Protocol/LoadFile/LoadFile.h87
-rw-r--r--EDK/Foundation/Efi/Protocol/LoadFile2/LoadFile2.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/LoadFile2/LoadFile2.h84
-rw-r--r--EDK/Foundation/Efi/Protocol/LoadedImage/LoadedImage.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/LoadedImage/LoadedImage.h73
-rw-r--r--EDK/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.c32
-rw-r--r--EDK/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.h44
-rw-r--r--EDK/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h164
-rw-r--r--EDK/Foundation/Efi/Protocol/Mtftp4/Mtftp4.c39
-rw-r--r--EDK/Foundation/Efi/Protocol/Mtftp4/Mtftp4.h308
-rw-r--r--EDK/Foundation/Efi/Protocol/PciIo/PciIo.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/PciIo/PciIo.h275
-rw-r--r--EDK/Foundation/Efi/Protocol/PciRootBridgeIo/PciRootBridgeIo.c32
-rw-r--r--EDK/Foundation/Efi/Protocol/PciRootBridgeIo/PciRootBridgeIo.h220
-rw-r--r--EDK/Foundation/Efi/Protocol/PlatformDriverOverride/PlatformDriverOverride.c31
-rw-r--r--EDK/Foundation/Efi/Protocol/PlatformDriverOverride/PlatformDriverOverride.h74
-rw-r--r--EDK/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.c31
-rw-r--r--EDK/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.h173
-rw-r--r--EDK/Foundation/Efi/Protocol/PxeBaseCode/PxeBaseCode.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/PxeBaseCode/PxeBaseCode.h386
-rw-r--r--EDK/Foundation/Efi/Protocol/PxeBaseCodeCallBack/PxeBaseCodeCallBack.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/PxeBaseCodeCallBack/PxeBaseCodeCallBack.h82
-rw-r--r--EDK/Foundation/Efi/Protocol/ScsiIo/ScsiIo.c26
-rw-r--r--EDK/Foundation/Efi/Protocol/ScsiIo/ScsiIo.h256
-rw-r--r--EDK/Foundation/Efi/Protocol/ScsiPassThru/ScsiPassThru.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/ScsiPassThru/ScsiPassThru.h332
-rw-r--r--EDK/Foundation/Efi/Protocol/ScsiPassThruExt/ScsiPassThruExt.c28
-rw-r--r--EDK/Foundation/Efi/Protocol/ScsiPassThruExt/ScsiPassThruExt.h365
-rw-r--r--EDK/Foundation/Efi/Protocol/SerialIO/SerialIo.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/SerialIO/SerialIo.h296
-rw-r--r--EDK/Foundation/Efi/Protocol/ServiceBinding/ServiceBinding.h88
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.c33
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.h375
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleNetwork/SimpleNetwork.c34
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleNetwork/SimpleNetwork.h639
-rw-r--r--EDK/Foundation/Efi/Protocol/SimplePointer/SimplePointer.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/SimplePointer/SimplePointer.h76
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleTextIn/SimpleTextIn.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleTextIn/SimpleTextIn.h136
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.c31
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.h255
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleTextOut/SimpleTextOut.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/SimpleTextOut/SimpleTextOut.h423
-rw-r--r--EDK/Foundation/Efi/Protocol/TapeIo/TapeIo.c28
-rw-r--r--EDK/Foundation/Efi/Protocol/TapeIo/TapeIo.h263
-rw-r--r--EDK/Foundation/Efi/Protocol/Tcp4/Tcp4.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/Tcp4/Tcp4.h247
-rw-r--r--EDK/Foundation/Efi/Protocol/Udp4/Udp4.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/Udp4/Udp4.h214
-rw-r--r--EDK/Foundation/Efi/Protocol/UgaDraw/UgaDraw.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/UgaDraw/UgaDraw.h181
-rw-r--r--EDK/Foundation/Efi/Protocol/UgaIo/UgaIo.c29
-rw-r--r--EDK/Foundation/Efi/Protocol/UgaIo/UgaIo.h236
-rw-r--r--EDK/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h211
-rw-r--r--EDK/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.c27
-rw-r--r--EDK/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.h211
-rw-r--r--EDK/Foundation/Efi/Protocol/UsbHostController/UsbHostController.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/UsbHostController/UsbHostController.h411
-rw-r--r--EDK/Foundation/Efi/Protocol/UsbIo/UsbIo.c30
-rw-r--r--EDK/Foundation/Efi/Protocol/UsbIo/UsbIo.h205
190 files changed, 22519 insertions, 0 deletions
diff --git a/EDK/Foundation/Efi/Guid/Acpi/Acpi.c b/EDK/Foundation/Efi/Guid/Acpi/Acpi.c
new file mode 100644
index 0000000..2d7e68a
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/Acpi/Acpi.c
@@ -0,0 +1,35 @@
+/*++
+
+Copyright (c) 2004 - 2005, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Acpi.c
+
+Abstract:
+
+ GUIDs used for ACPI entries in the EFI 1.0 system table
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_GUID_DEFINITION (Acpi)
+
+EFI_GUID gEfiAcpiTableGuid = EFI_ACPI_TABLE_GUID;
+
+EFI_GUID_STRING(&gEfiAcpiTableGuid, "ACPI Table", "ACPI 1.0 Table GUID in EFI System Table");
+
+EFI_GUID gEfiAcpi20TableGuid = EFI_ACPI_20_TABLE_GUID;
+
+EFI_GUID_STRING(&gEfiAcpi20TableGuid, "ACPI 2.0 Table", "ACPI 2.0 Table GUID in EFI System Table");
+
+EFI_GUID gEfiAcpi30TableGuid = EFI_ACPI_30_TABLE_GUID;
+
+EFI_GUID_STRING(&gEfiAcpi30TableGuid, "ACPI 3.0 Table", "ACPI 3.0 Table GUID in EFI System Table");
diff --git a/EDK/Foundation/Efi/Guid/Acpi/Acpi.h b/EDK/Foundation/Efi/Guid/Acpi/Acpi.h
new file mode 100644
index 0000000..48565a4
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/Acpi/Acpi.h
@@ -0,0 +1,44 @@
+/*++
+
+Copyright (c) 2004 - 2005, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Acpi.h
+
+Abstract:
+
+ GUIDs used for ACPI entries in the in the EFI 1.0 system table
+
+ These GUIDs point the ACPI tables as defined in the ACPI specifications.
+ ACPI 2.0 specification defines the ACPI 2.0 GUID. EFI 1.0 defines the
+ ACPI 1.0 GUID.
+
+--*/
+
+#ifndef _ACPI_GUID_H_
+#define _ACPI_GUID_H_
+
+#define EFI_ACPI_TABLE_GUID \
+ { \
+ 0xeb9d2d30, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+#define EFI_ACPI_20_TABLE_GUID \
+ { \
+ 0x8868e871, 0xe4f1, 0x11d3, 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 \
+ }
+
+#define EFI_ACPI_30_TABLE_GUID EFI_ACPI_20_TABLE_GUID
+
+extern EFI_GUID gEfiAcpiTableGuid;
+extern EFI_GUID gEfiAcpi20TableGuid;
+extern EFI_GUID gEfiAcpi30TableGuid;
+#endif
diff --git a/EDK/Foundation/Efi/Guid/DebugImageInfoTable/DebugImageInfoTable.c b/EDK/Foundation/Efi/Guid/DebugImageInfoTable/DebugImageInfoTable.c
new file mode 100644
index 0000000..98d8ce5
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/DebugImageInfoTable/DebugImageInfoTable.c
@@ -0,0 +1,28 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DebugImageInfoTable.c
+
+Abstract:
+
+ GUID used to locate the Debug Image Info table in the EFI 1.0 system table.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_GUID_DEFINITION (DebugImageInfoTable)
+
+EFI_GUID gEfiDebugImageInfoTableGuid = EFI_DEBUG_IMAGE_INFO_TABLE_GUID;
+
+EFI_GUID_STRING
+ (&gEfiDebugImageInfoTableGuid, "Debug Image Info Table", "Debug Image Info Table GUID in EFI System Table");
diff --git a/EDK/Foundation/Efi/Guid/DebugImageInfoTable/DebugImageInfoTable.h b/EDK/Foundation/Efi/Guid/DebugImageInfoTable/DebugImageInfoTable.h
new file mode 100644
index 0000000..7ae8f18
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/DebugImageInfoTable/DebugImageInfoTable.h
@@ -0,0 +1,63 @@
+/*++
+
+Copyright (c) 2004 - 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DebugImageInfoTable.h
+
+Abstract:
+
+ GUID and related data structures used with the Debug Image Info Table.
+
+--*/
+
+#ifndef _DEBUG_IMAGE_INFO_GUID_H_
+#define _DEBUG_IMAGE_INFO_GUID_H_
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (LoadedImage)
+
+#define EFI_DEBUG_IMAGE_INFO_TABLE_GUID \
+ { \
+ 0x49152e77, 0x1ada, 0x4764, 0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b \
+ }
+
+extern EFI_GUID gEfiDebugImageInfoTableGuid;
+
+#define EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS 0x01
+#define EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED 0x02
+#define EFI_DEBUG_IMAGE_INFO_INITIAL_SIZE (EFI_PAGE_SIZE / sizeof (UINTN))
+#define EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL 0x01
+
+typedef struct {
+ UINT64 Signature;
+ EFI_PHYSICAL_ADDRESS EfiSystemTableBase;
+ UINT32 Crc32;
+} EFI_SYSTEM_TABLE_POINTER;
+
+typedef struct {
+ UINT32 ImageInfoType;
+ EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProtocolInstance;
+ EFI_HANDLE *ImageHandle;
+} EFI_DEBUG_IMAGE_INFO_NORMAL;
+
+typedef union {
+ UINT32 *ImageInfoType;
+ EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage;
+} EFI_DEBUG_IMAGE_INFO;
+
+typedef struct {
+ volatile UINT32 UpdateStatus;
+ UINT32 TableSize;
+ EFI_DEBUG_IMAGE_INFO *EfiDebugImageInfoTable;
+} EFI_DEBUG_IMAGE_INFO_TABLE_HEADER;
+
+#endif
diff --git a/EDK/Foundation/Efi/Guid/EfiGuidLib.cif b/EDK/Foundation/Efi/Guid/EfiGuidLib.cif
new file mode 100644
index 0000000..097dd83
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/EfiGuidLib.cif
@@ -0,0 +1,30 @@
+<component>
+ name = "EfiGuidLib"
+ category = ModulePart
+ LocalRoot = "EDK\Foundation\Efi\Guid\"
+ RefName = "EfiGuidLib"
+[files]
+"EfiGuidLib.sdl"
+"EfiGuidLib.mak"
+"Acpi\Acpi.h"
+"Acpi\Acpi.c"
+"DebugImageInfoTable\DebugImageInfoTable.h"
+"DebugImageInfoTable\DebugImageInfoTable.c"
+"EventGroup\EventGroup.h"
+"EventGroup\EventGroup.c"
+"GlobalVariable\GlobalVariable.h"
+"GlobalVariable\GlobalVariable.c"
+"Gpt\Gpt.h"
+"Gpt\Gpt.c"
+"Mps\Mps.h"
+"Mps\Mps.c"
+"PcAnsi\PcAnsi.h"
+"PcAnsi\PcAnsi.c"
+"SalSystemTable\SalSystemTable.h"
+"SalSystemTable\SalSystemTable.c"
+"SmBios\SmBios.h"
+"SmBios\SmBios.c"
+"HardwareErrorVariable\HardwareErrorVariable.c"
+"HardwareErrorVariable\HardwareErrorVariable.h"
+"EfiGuidLib.inf"
+<endComponent>
diff --git a/EDK/Foundation/Efi/Guid/EfiGuidLib.inf b/EDK/Foundation/Efi/Guid/EfiGuidLib.inf
new file mode 100644
index 0000000..1d98480
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/EfiGuidLib.inf
@@ -0,0 +1,59 @@
+#/*++
+#
+# Copyright (c) 2004 - 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+# EfiGuidLib.inf
+#
+# Abstract:
+#
+# Component description file.
+#
+#--*/
+
+[defines]
+BASE_NAME= EfiGuidLib
+COMPONENT_TYPE= LIBRARY
+
+[includes.common]
+ $(EDK_SOURCE)\Foundation\Efi
+ $(EDK_SOURCE)\Foundation\Include
+ $(EDK_SOURCE)\Foundation\Efi\Include
+ $(EDK_SOURCE)\Foundation\Framework\Include
+ $(EDK_SOURCE)\Foundation\Include\IndustryStandard
+ $(EDK_SOURCE)\Foundation\Core\Dxe
+ $(EDK_SOURCE)\Foundation\Include\Pei
+ $(EDK_SOURCE)\Foundation\Library\Pei\Include
+
+[nmake.common]
+
+[sources.common]
+ Acpi\Acpi.h
+ Acpi\Acpi.c
+ DebugImageInfoTable\DebugImageInfoTable.h
+ DebugImageInfoTable\DebugImageInfoTable.c
+ EventGroup\EventGroup.h
+ EventGroup\EventGroup.c
+ GlobalVariable\GlobalVariable.h
+ GlobalVariable\GlobalVariable.c
+ Gpt\Gpt.h
+ Gpt\Gpt.c
+ HardwareErrorVariable\HardwareErrorVariable.h
+ HardwareErrorVariable\HardwareErrorVariable.c
+ Mps\Mps.h
+ Mps\Mps.c
+ PcAnsi\PcAnsi.h
+ PcAnsi\PcAnsi.c
+ SmBios\SmBios.h
+ SmBios\SmBios.c
+[sources.ipf]
+ SalSystemTable\SalSystemTable.h
+ SalSystemTable\SalSystemTable.c \ No newline at end of file
diff --git a/EDK/Foundation/Efi/Guid/EfiGuidLib.mak b/EDK/Foundation/Efi/Guid/EfiGuidLib.mak
new file mode 100644
index 0000000..dc28a86
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/EfiGuidLib.mak
@@ -0,0 +1,72 @@
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2009, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#**********************************************************************
+
+#**********************************************************************
+# $Header: /Alaska/SOURCE/Modules/SharkBayRefCodes/IntelEDK/EfiGuidLib/EfiGuidLib.mak 1 1/20/12 4:00a Jeffch $
+#
+# $Revision: 1 $
+#
+# $Date: 1/20/12 4:00a $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/IntelEDK/EfiGuidLib/EfiGuidLib.mak $
+#
+# 1 1/20/12 4:00a Jeffch
+# Create Intel EDK 1117 Patch 7.
+#
+# 1 9/27/11 6:23a Wesleychen
+# Intel EDK initially releases.
+#
+# 2 9/02/09 3:12a Iminglin
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: EfiGuidLib.mak
+#
+# Description:
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+
+$(EFIGUIDLIB) : EfiGuidLib
+
+EfiGuidLib : $(BUILD_DIR)\EfiGuidLib.mak EfiGuidLibBin
+
+$(BUILD_DIR)\EfiGuidLib.mak : $(EfiGuidLib_DIR)\$(@B).cif $(EfiGuidLib_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(EfiGuidLib_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+EfiGuidLibBin :
+ $(MAKE) /$(MAKEFLAGS) $(EDK_DEFAULTS)\
+ /f $(BUILD_DIR)\EfiGuidLib.mak all\
+ TYPE=LIBRARY
+!IF "$(x64_BUILD)"=="1"
+ $(MAKE) /$(MAKEFLAGS) $(EDK_DEFAULTS) BUILD_DIR=$(BUILD_DIR)\IA32\
+ /f $(BUILD_DIR)\EfiGuidLib.mak all\
+ TYPE=PEI_LIBRARY
+!ENDIF
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2009, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#********************************************************************** \ No newline at end of file
diff --git a/EDK/Foundation/Efi/Guid/EfiGuidLib.sdl b/EDK/Foundation/Efi/Guid/EfiGuidLib.sdl
new file mode 100644
index 0000000..e419092
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/EfiGuidLib.sdl
@@ -0,0 +1,26 @@
+TOKEN
+ Name = "EfiGuidLib_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable EfiGuidLib support in Project"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+End
+
+TOKEN
+ Name = "EFIGUIDLIB"
+ Value = "$$(LIB_BUILD_DIR)\EfiGuidLib.lib"
+ TokenType = Expression
+ TargetMAK = Yes
+End
+
+PATH
+ Name = "EfiGuidLib_DIR"
+End
+
+MODULE
+ Help = "Includes EfiGuidLib.mak to Project"
+ File = "EfiGuidLib.mak"
+End
+
diff --git a/EDK/Foundation/Efi/Guid/EventGroup/EventGroup.c b/EDK/Foundation/Efi/Guid/EventGroup/EventGroup.c
new file mode 100644
index 0000000..592c7ec
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/EventGroup/EventGroup.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EfiGroup.c
+
+--*/
+#include "Tiano.h"
+
+#include EFI_GUID_DEFINITION (EventGroup)
+
+EFI_GUID gEfiEventExitBootServicesGuid = EFI_EVENT_GROUP_EXIT_BOOT_SERVICES;
+EFI_GUID gEfiEventVirtualAddressChangeGuid = EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE;
+EFI_GUID gEfiEventMemoryMapChangeGuid = EFI_EVENT_GROUP_MEMORY_MAP_CHANGE;
+EFI_GUID gEfiEventReadyToBootGuid = EFI_EVENT_GROUP_READY_TO_BOOT;
+
+EFI_GUID_STRING (&gEfiEventExitBootServicesGuid, "EventExitBS", "Event Exit Boot Service GUID");
+EFI_GUID_STRING (&gEfiEventVirtualAddressChangeGuid, "EventVirtualAddrChange", "Event Virtual Addr Change GUID");
+EFI_GUID_STRING (&gEfiEventMemoryMapChangeGuid, "EventMemMapChange", "Event Memory Map Change GUID");
+EFI_GUID_STRING (&gEfiEventReadyToBootGuid, "EventReadyToBoot", "Efi Ready To Boot GUID");
+
diff --git a/EDK/Foundation/Efi/Guid/EventGroup/EventGroup.h b/EDK/Foundation/Efi/Guid/EventGroup/EventGroup.h
new file mode 100644
index 0000000..dc78ac4
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/EventGroup/EventGroup.h
@@ -0,0 +1,45 @@
+/** @file
+ GUIDs for gBS->CreateEventEx Event Groups. Defined in UEFI 2.0.
+
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ Module Name: EventGroup.h
+
+**/
+
+#ifndef __EVENT_GROUP_GUID__
+#define __EVENT_GROUP_GUID__
+
+
+#define EFI_EVENT_GROUP_EXIT_BOOT_SERVICES \
+ { 0x27abf055, 0xb1b8, 0x4c26, { 0x80, 0x48, 0x74, 0x8f, 0x37, 0xba, 0xa2, 0xdf } }
+
+extern EFI_GUID gEfiEventExitBootServicesGuid;
+
+
+#define EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE \
+ { 0x13fa7698, 0xc831, 0x49c7, { 0x87, 0xea, 0x8f, 0x43, 0xfc, 0xc2, 0x51, 0x96 } }
+
+extern EFI_GUID gEfiEventVirtualAddressChangeGuid;
+
+
+#define EFI_EVENT_GROUP_MEMORY_MAP_CHANGE \
+ { 0x78bee926, 0x692f, 0x48fd, { 0x9e, 0xdb, 0x1, 0x42, 0x2e, 0xf0, 0xd7, 0xab } }
+
+extern EFI_GUID gEfiEventMemoryMapChangeGuid;
+
+
+#define EFI_EVENT_GROUP_READY_TO_BOOT \
+ { 0x7ce88fb3, 0x4bd7, 0x4679, { 0x87, 0xa8, 0xa8, 0xd8, 0xde, 0xe5, 0x0d, 0x2b } }
+
+extern EFI_GUID gEfiEventReadyToBootGuid;
+
+
+#endif
diff --git a/EDK/Foundation/Efi/Guid/GlobalVariable/GlobalVariable.c b/EDK/Foundation/Efi/Guid/GlobalVariable/GlobalVariable.c
new file mode 100644
index 0000000..dae776d
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/GlobalVariable/GlobalVariable.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ GlobalVariable.c
+
+Abstract:
+
+ GUID for EFI (NVRAM) Variables. Defined in EFI 1.0.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_GUID_DEFINITION (GlobalVariable)
+
+EFI_GUID gEfiGlobalVariableGuid = EFI_GLOBAL_VARIABLE_GUID;
+
+EFI_GUID_STRING(&gEfiGlobalVariableGuid, "Efi", "Efi Variable GUID")
diff --git a/EDK/Foundation/Efi/Guid/GlobalVariable/GlobalVariable.h b/EDK/Foundation/Efi/Guid/GlobalVariable/GlobalVariable.h
new file mode 100644
index 0000000..232b893
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/GlobalVariable/GlobalVariable.h
@@ -0,0 +1,32 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ GlobalVariable.h
+
+Abstract:
+
+ GUID for EFI (NVRAM) Variables. Defined in EFI 1.0.
+
+--*/
+
+#ifndef _GLOBAL_VARIABLE_GUID_H_
+#define _GLOBAL_VARIABLE_GUID_H_
+
+#define EFI_GLOBAL_VARIABLE_GUID \
+ { \
+ 0x8BE4DF61, 0x93CA, 0x11d2, 0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C \
+ }
+
+extern EFI_GUID gEfiGlobalVariableGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Guid/Gpt/Gpt.c b/EDK/Foundation/Efi/Guid/Gpt/Gpt.c
new file mode 100644
index 0000000..d080ba4
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/Gpt/Gpt.c
@@ -0,0 +1,38 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Gpt.c
+
+Abstract:
+
+ Guids used for the GPT as defined in EFI 1.0
+
+ GPT defines a new disk partitioning scheme and also describes
+ usage of the legacy Master Boot Record (MBR) partitioning scheme.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_GUID_DEFINITION (Gpt)
+
+EFI_GUID gEfiPartTypeUnusedGuid = EFI_PART_TYPE_UNUSED_GUID;
+
+EFI_GUID_STRING(&gEfiPartTypeUnusedGuid, "G0", "Null Partition Type GUID");
+
+EFI_GUID gEfiPartTypeSystemPartGuid = EFI_PART_TYPE_EFI_SYSTEM_PART_GUID;
+
+EFI_GUID_STRING(&gEfiPartTypeSystemPartGuid, "ESP", "EFI System Partition GUID");
+
+EFI_GUID gEfiPartTypeLegacyMbrGuid = EFI_PART_TYPE_LEGACY_MBR_GUID;
+
+EFI_GUID_STRING(&gEfiPartTypeLegacyMbrGuid, "Legacy MBR", "Legacy Master Boot Record Partition GUID");
diff --git a/EDK/Foundation/Efi/Guid/Gpt/Gpt.h b/EDK/Foundation/Efi/Guid/Gpt/Gpt.h
new file mode 100644
index 0000000..8cbad57
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/Gpt/Gpt.h
@@ -0,0 +1,47 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Gpt.h
+
+Abstract:
+
+ Guids used for the GPT as defined in EFI 1.0
+
+ GPT defines a new disk partitioning scheme and also describes
+ usage of the legacy Master Boot Record (MBR) partitioning scheme.
+
+--*/
+
+#ifndef _GPT_GUID_H_
+#define _GPT_GUID_H_
+
+#define EFI_PART_TYPE_UNUSED_GUID \
+ { \
+ 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 \
+ }
+
+#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID \
+ { \
+ 0xc12a7328, 0xf81f, 0x11d2, 0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b \
+ }
+
+#define EFI_PART_TYPE_LEGACY_MBR_GUID \
+ { \
+ 0x024dee41, 0x33e7, 0x11d3, 0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f \
+ }
+
+extern EFI_GUID gEfiPartTypeUnusedGuid;
+extern EFI_GUID gEfiPartTypeSystemPartGuid;
+extern EFI_GUID gEfiPartTypeLegacyMbrGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Guid/HardwareErrorVariable/HardwareErrorVariable.c b/EDK/Foundation/Efi/Guid/HardwareErrorVariable/HardwareErrorVariable.c
new file mode 100644
index 0000000..48086ba
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/HardwareErrorVariable/HardwareErrorVariable.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HardwareErrorVariable.c
+
+Abstract:
+
+ GUID for hardware error record variables. Defined in UEFI 2.1.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_GUID_DEFINITION (HardwareErrorVariable)
+
+EFI_GUID gEfiHardwareErrorVariableGuid = EFI_HARDWARE_ERROR_VARIABLE_GUID;
+
+EFI_GUID_STRING(&gEfiHardwareErrorVariableGuid, "HwErr", "Hardware Error Variable GUID") \ No newline at end of file
diff --git a/EDK/Foundation/Efi/Guid/HardwareErrorVariable/HardwareErrorVariable.h b/EDK/Foundation/Efi/Guid/HardwareErrorVariable/HardwareErrorVariable.h
new file mode 100644
index 0000000..920fc8b
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/HardwareErrorVariable/HardwareErrorVariable.h
@@ -0,0 +1,32 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HardwareErrorVariable.h
+
+Abstract:
+
+ GUID for hardware error record variables. Defined in UEFI 2.1.
+
+--*/
+
+#ifndef _HARDWARE_ERROR_VARIABLE_GUID_H_
+#define _HARDWARE_ERROR_VARIABLE_GUID_H_
+
+#define EFI_HARDWARE_ERROR_VARIABLE_GUID \
+ { \
+ 0x414E6BDD, 0xE47B, 0x47cc, {0xB2, 0x44, 0xBB, 0x61, 0x02, 0x0C, 0xF5, 0x16} \
+ }
+
+extern EFI_GUID gEfiHardwareErrorVariableGuid;
+
+#endif \ No newline at end of file
diff --git a/EDK/Foundation/Efi/Guid/Mps/Mps.c b/EDK/Foundation/Efi/Guid/Mps/Mps.c
new file mode 100644
index 0000000..c5aa379
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/Mps/Mps.c
@@ -0,0 +1,33 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Mps.c
+
+Abstract:
+
+ GUIDs used for MPS entries in the in the EFI 1.0 system table
+
+ These GUIDs point the MPS tables as defined in the MPS 1.4 specifications.
+
+ ACPI is the primary means of exporting MP information to the OS. MPS obly was
+ included to support Itanium-based platform power on. So don't use it if you don't have too.
+
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_GUID_DEFINITION (Mps)
+
+EFI_GUID gEfiMpsTableGuid = EFI_MPS_TABLE_GUID;
+
+EFI_GUID_STRING(&gEfiMpsTableGuid, "MPS Table", "MPS Table GUID in EFI System Table");
diff --git a/EDK/Foundation/Efi/Guid/Mps/Mps.h b/EDK/Foundation/Efi/Guid/Mps/Mps.h
new file mode 100644
index 0000000..654c67b
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/Mps/Mps.h
@@ -0,0 +1,38 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Mps.h
+
+Abstract:
+
+ GUIDs used for MPS entries in the in the EFI 1.0 system table
+
+ These GUIDs point the MPS tables as defined in the MPS 1.4 specifications.
+
+ ACPI is the primary means of exporting MP information to the OS. MPS obly was
+ included to support Itanium-based platform power on. So don't use it if you don't have too.
+
+
+--*/
+
+#ifndef _MPS_GUID_H_
+#define _MPS_GUID_H_
+
+#define EFI_MPS_TABLE_GUID \
+ { \
+ 0xeb9d2d2f, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+extern EFI_GUID gEfiMpsTableGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Guid/PcAnsi/PcAnsi.c b/EDK/Foundation/Efi/Guid/PcAnsi/PcAnsi.c
new file mode 100644
index 0000000..96d1e00
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/PcAnsi/PcAnsi.c
@@ -0,0 +1,34 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PcAnsi.c
+
+Abstract:
+
+ Terminal Device Path Vendor Guid. Defined in EFI 1.0.
+
+--*/
+
+#include "EfiSpec.h"
+
+#include EFI_GUID_DEFINITION (PcAnsi)
+
+EFI_GUID gEfiPcAnsiGuid = EFI_PC_ANSI_GUID;
+EFI_GUID gEfiVT100Guid = EFI_VT_100_GUID;
+EFI_GUID gEfiVT100PlusGuid = EFI_VT_100_PLUS_GUID;
+EFI_GUID gEfiVTUTF8Guid = EFI_VT_UTF8_GUID;
+
+EFI_GUID_STRING(&gEfiPcAnsiGuid, "Efi", "Efi PC ANSI Device Path Vendor GUID")
+EFI_GUID_STRING(&gEfiVT100Guid, "Efi", "Efi VT100 Device Path Vendor GUID")
+EFI_GUID_STRING(&gEfiVT100PlusGuid, "Efi", "Efi VT100Plus Device Path Vendor GUID")
+EFI_GUID_STRING(&gEfiVTUTF8Guid, "Efi", "Efi VTUTF8 Device Path Vendor GUID")
diff --git a/EDK/Foundation/Efi/Guid/PcAnsi/PcAnsi.h b/EDK/Foundation/Efi/Guid/PcAnsi/PcAnsi.h
new file mode 100644
index 0000000..d9c1e57
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/PcAnsi/PcAnsi.h
@@ -0,0 +1,50 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PcAnsi.h
+
+Abstract:
+
+ Terminal Device Path Vendor Guid. Defined in EFI 1.0.
+
+--*/
+
+#ifndef _PC_ANSI_H_
+#define _PC_ANSI_H_
+
+#define EFI_PC_ANSI_GUID \
+ { \
+ 0xe0c14753, 0xf9be, 0x11d2, 0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+#define EFI_VT_100_GUID \
+ { \
+ 0xdfa66065, 0xb419, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+#define EFI_VT_100_PLUS_GUID \
+ { \
+ 0x7baec70b, 0x57e0, 0x4c76, 0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43 \
+ }
+
+#define EFI_VT_UTF8_GUID \
+ { \
+ 0xad15a0d6, 0x8bec, 0x4acf, 0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88 \
+ }
+
+extern EFI_GUID gEfiPcAnsiGuid;
+extern EFI_GUID gEfiVT100Guid;
+extern EFI_GUID gEfiVT100PlusGuid;
+extern EFI_GUID gEfiVTUTF8Guid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Guid/SalSystemTable/SalSystemTable.c b/EDK/Foundation/Efi/Guid/SalSystemTable/SalSystemTable.c
new file mode 100644
index 0000000..97bfb66
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/SalSystemTable/SalSystemTable.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SalSystemTable.c
+
+Abstract:
+
+ GUIDs used for SAL system table entries in the in the EFI 1.0 system table.
+
+ SAL System Table contains Itanium-based processor centric information about
+ the system.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_GUID_DEFINITION (SalSystemTable)
+
+EFI_GUID gEfiSalSystemTableGuid = EFI_SAL_SYSTEM_TABLE_GUID;
+
+EFI_GUID_STRING(&gEfiSalSystemTableGuid, "SAL System Table", "SAL System Table GUID in EFI System Table");
diff --git a/EDK/Foundation/Efi/Guid/SalSystemTable/SalSystemTable.h b/EDK/Foundation/Efi/Guid/SalSystemTable/SalSystemTable.h
new file mode 100644
index 0000000..1da4dc0
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/SalSystemTable/SalSystemTable.h
@@ -0,0 +1,34 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SalSystemTable.h
+
+Abstract:
+
+ GUIDs used for SAL system table entries in the in the EFI 1.0 system table.
+
+ SAL System Table contains Itanium-based processor centric information about
+ the system.
+
+--*/
+
+#ifndef _SAL_SYSTEM_TABLE_GUID_H_
+
+#define EFI_SAL_SYSTEM_TABLE_GUID \
+ { \
+ 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+extern EFI_GUID gEfiSalSystemTableGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Guid/SmBios/SmBios.c b/EDK/Foundation/Efi/Guid/SmBios/SmBios.c
new file mode 100644
index 0000000..470e36b
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/SmBios/SmBios.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SmBios.c
+
+Abstract:
+
+ GUIDs used to locate the SMBIOS tables in the EFI 1.0 system table.
+
+ This GUID in the system table is the only legal way to search for and
+ locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
+ tables.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_GUID_DEFINITION (Smbios)
+
+EFI_GUID gEfiSmbiosTableGuid = EFI_SMBIOS_TABLE_GUID;
+
+EFI_GUID_STRING(&gEfiSmbiosTableGuid, "SMBIOS Table", "SMBIOS Table GUID in EFI System Table");
diff --git a/EDK/Foundation/Efi/Guid/SmBios/SmBios.h b/EDK/Foundation/Efi/Guid/SmBios/SmBios.h
new file mode 100644
index 0000000..f7297fc
--- /dev/null
+++ b/EDK/Foundation/Efi/Guid/SmBios/SmBios.h
@@ -0,0 +1,70 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SmBios.h
+
+Abstract:
+
+ GUIDs used to locate the SMBIOS tables in the EFI 1.0 system table.
+
+ This GUID in the system table is the only legal way to search for and
+ locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
+ tables.
+
+--*/
+
+#ifndef _SMBIOS_GUID_H_
+#define _SMBIOS_GUID_H_
+
+#define EFI_SMBIOS_TABLE_GUID \
+ { \
+ 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+extern EFI_GUID gEfiSmbiosTableGuid;
+
+//
+// Smbios Table Entry Point Structure
+//
+#pragma pack(1)
+typedef struct {
+ UINT8 AnchorString[4];
+ UINT8 EntryPointStructureChecksum;
+ UINT8 EntryPointLength;
+ UINT8 MajorVersion;
+ UINT8 MinorVersion;
+ UINT16 MaxStructureSize;
+ UINT8 EntryPointRevision;
+ UINT8 FormattedArea[5];
+ UINT8 IntermediateAnchorString[5];
+ UINT8 IntermediateChecksum;
+ UINT16 TableLength;
+ UINT32 TableAddress;
+ UINT16 NumberOfSmbiosStructures;
+ UINT8 SmbiosBcdRevision;
+} SMBIOS_TABLE_ENTRY_POINT;
+#pragma pack()
+//
+// The Smbios structure header
+//
+#pragma pack(1)
+typedef struct {
+
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Handle;
+
+} SMBIOS_STRUCTURE;
+#pragma pack()
+
+#endif
diff --git a/EDK/Foundation/Efi/Include/EfiApi.h b/EDK/Foundation/Efi/Include/EfiApi.h
new file mode 100644
index 0000000..828950c
--- /dev/null
+++ b/EDK/Foundation/Efi/Include/EfiApi.h
@@ -0,0 +1,1114 @@
+/*++
+
+Copyright (c) 2004 - 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EfiApi.h
+
+Abstract:
+
+ EFI intrinsic definitions. This includes all EFI 1.0 boot and runtime
+ services APIs.
+
+ Drivers and applications are passed in a pointer to the EFI system table.
+ The EFI system table contains pointers to the boot and runtime services
+ tables.
+
+--*/
+
+#ifndef _EFI_API_H_
+#define _EFI_API_H_
+
+#include EFI_PROTOCOL_DEFINITION (DevicePath)
+#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
+#include EFI_PROTOCOL_DEFINITION (SimpleTextOut)
+
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+#include "EfiCapsule.h"
+#else
+#include "EfiStatusCode.h"
+#endif
+
+//
+// Declare forward referenced data structures
+//
+EFI_FORWARD_DECLARATION (EFI_SYSTEM_TABLE);
+
+//
+// EFI Memory
+//
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_ALLOCATE_PAGES) (
+ IN EFI_ALLOCATE_TYPE Type,
+ IN EFI_MEMORY_TYPE MemoryType,
+ IN UINTN NoPages,
+ OUT EFI_PHYSICAL_ADDRESS * Memory
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_FREE_PAGES) (
+ IN EFI_PHYSICAL_ADDRESS Memory,
+ IN UINTN NoPages
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_GET_MEMORY_MAP) (
+ IN OUT UINTN *MemoryMapSize,
+ IN OUT EFI_MEMORY_DESCRIPTOR * MemoryMap,
+ OUT UINTN *MapKey,
+ OUT UINTN *DescriptorSize,
+ OUT UINT32 *DescriptorVersion
+ );
+
+#define NextMemoryDescriptor(_Ptr, _Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) (_Ptr)) + (_Size)))
+#define NEXT_MEMORY_DESCRIPTOR(_Ptr, _Size) NextMemoryDescriptor (_Ptr, _Size)
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_ALLOCATE_POOL) (
+ IN EFI_MEMORY_TYPE PoolType,
+ IN UINTN Size,
+ OUT VOID **Buffer
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_FREE_POOL) (
+ IN VOID *Buffer
+ );
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) (
+ IN UINTN MemoryMapSize,
+ IN UINTN DescriptorSize,
+ IN UINT32 DescriptorVersion,
+ IN EFI_MEMORY_DESCRIPTOR * VirtualMap
+ );
+
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_CONNECT_CONTROLLER) (
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE * DriverImageHandle OPTIONAL,
+ IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL,
+ IN BOOLEAN Recursive
+ );
+
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_DISCONNECT_CONTROLLER) (
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE DriverImageHandle, OPTIONAL
+ IN EFI_HANDLE ChildHandle OPTIONAL
+ );
+
+//
+// ConvertPointer DebugDisposition type.
+//
+#define EFI_OPTIONAL_POINTER 0x00000001
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_CONVERT_POINTER) (
+ IN UINTN DebugDisposition,
+ IN OUT VOID **Address
+ );
+
+//
+// EFI Event Types
+//
+#define EFI_EVENT_TIMER 0x80000000
+#define EFI_EVENT_RUNTIME 0x40000000
+#define EFI_EVENT_RUNTIME_CONTEXT 0x20000000
+
+#define EFI_EVENT_NOTIFY_WAIT 0x00000100
+#define EFI_EVENT_NOTIFY_SIGNAL 0x00000200
+
+#define EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
+#define EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
+
+#define EFI_EVENT_EFI_SIGNAL_MASK 0x000000FF
+#define EFI_EVENT_EFI_SIGNAL_MAX 4
+
+typedef
+VOID
+(EFIAPI *EFI_EVENT_NOTIFY) (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_CREATE_EVENT) (
+ IN UINT32 Type,
+ IN EFI_TPL NotifyTpl,
+ IN EFI_EVENT_NOTIFY NotifyFunction,
+ IN VOID *NotifyContext,
+ OUT EFI_EVENT * Event
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_CREATE_EVENT_EX) (
+ IN UINT32 Type,
+ IN EFI_TPL NotifyTpl OPTIONAL,
+ IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
+ IN CONST VOID *NotifyContext OPTIONAL,
+ IN CONST EFI_GUID *EventGroup OPTIONAL,
+ OUT EFI_EVENT *Event
+ );
+
+typedef enum {
+ TimerCancel,
+ TimerPeriodic,
+ TimerRelative,
+ TimerTypeMax
+} EFI_TIMER_DELAY;
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_SET_TIMER) (
+ IN EFI_EVENT Event,
+ IN EFI_TIMER_DELAY Type,
+ IN UINT64 TriggerTime
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_SIGNAL_EVENT) (
+ IN EFI_EVENT Event
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_WAIT_FOR_EVENT) (
+ IN UINTN NumberOfEvents,
+ IN EFI_EVENT * Event,
+ OUT UINTN *Index
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_CLOSE_EVENT) (
+ IN EFI_EVENT Event
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_CHECK_EVENT) (
+ IN EFI_EVENT Event
+ );
+
+//
+// Task priority level
+//
+#define EFI_TPL_APPLICATION 4
+#define EFI_TPL_CALLBACK 8
+#define EFI_TPL_NOTIFY 16
+#define EFI_TPL_HIGH_LEVEL 31
+
+typedef
+EFI_BOOTSERVICE
+EFI_TPL
+(EFIAPI *EFI_RAISE_TPL) (
+ IN EFI_TPL NewTpl
+ );
+
+typedef
+EFI_BOOTSERVICE
+VOID
+(EFIAPI *EFI_RESTORE_TPL) (
+ IN EFI_TPL OldTpl
+ );
+
+//
+// Variable attributes
+//
+#define EFI_VARIABLE_NON_VOLATILE 0x00000001
+#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
+#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
+
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
+#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
+#endif
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_GET_VARIABLE) (
+ IN CHAR16 *VariableName,
+ IN EFI_GUID * VendorGuid,
+ OUT UINT32 *Attributes OPTIONAL,
+ IN OUT UINTN *DataSize,
+ OUT VOID *Data
+ );
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) (
+ IN OUT UINTN *VariableNameSize,
+ IN OUT CHAR16 *VariableName,
+ IN OUT EFI_GUID * VendorGuid
+ );
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_SET_VARIABLE) (
+ IN CHAR16 *VariableName,
+ IN EFI_GUID * VendorGuid,
+ IN UINT32 Attributes,
+ IN UINTN DataSize,
+ IN VOID *Data
+ );
+
+//
+// EFI Time
+//
+typedef struct {
+ UINT32 Resolution;
+ UINT32 Accuracy;
+ BOOLEAN SetsToZero;
+} EFI_TIME_CAPABILITIES;
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_GET_TIME) (
+ OUT EFI_TIME * Time,
+ OUT EFI_TIME_CAPABILITIES * Capabilities OPTIONAL
+ );
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_SET_TIME) (
+ IN EFI_TIME * Time
+ );
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_GET_WAKEUP_TIME) (
+ OUT BOOLEAN *Enabled,
+ OUT BOOLEAN *Pending,
+ OUT EFI_TIME * Time
+ );
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_SET_WAKEUP_TIME) (
+ IN BOOLEAN Enable,
+ IN EFI_TIME * Time OPTIONAL
+ );
+
+//
+// Image Entry prototype
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IMAGE_ENTRY_POINT) (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE * SystemTable
+ );
+
+//
+// Image functions
+//
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_IMAGE_LOAD) (
+ IN BOOLEAN BootPolicy,
+ IN EFI_HANDLE ParentImageHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL * FilePath,
+ IN VOID *SourceBuffer OPTIONAL,
+ IN UINTN SourceSize,
+ OUT EFI_HANDLE * ImageHandle
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_IMAGE_START) (
+ IN EFI_HANDLE ImageHandle,
+ OUT UINTN *ExitDataSize,
+ OUT CHAR16 **ExitData OPTIONAL
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_EXIT) (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_STATUS ExitStatus,
+ IN UINTN ExitDataSize,
+ IN CHAR16 *ExitData OPTIONAL
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_IMAGE_UNLOAD) (
+ IN EFI_HANDLE ImageHandle
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_EXIT_BOOT_SERVICES) (
+ IN EFI_HANDLE ImageHandle,
+ IN UINTN MapKey
+ );
+
+//
+// Misc
+//
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_STALL) (
+ IN UINTN Microseconds
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_SET_WATCHDOG_TIMER) (
+ IN UINTN Timeout,
+ IN UINT64 WatchdogCode,
+ IN UINTN DataSize,
+ IN CHAR16 *WatchdogData OPTIONAL
+ );
+
+typedef enum {
+ EfiResetCold,
+ EfiResetWarm,
+ EfiResetShutdown,
+
+#if ((TIANO_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
+ EfiResetUpdate
+#endif
+
+} EFI_RESET_TYPE;
+
+typedef
+EFI_RUNTIMESERVICE
+VOID
+(EFIAPI *EFI_RESET_SYSTEM) (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN CHAR16 *ResetData OPTIONAL
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) (
+ OUT UINT64 *Count
+ );
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) (
+ OUT UINT32 *HighCount
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_CALCULATE_CRC32) (
+ IN VOID *Data,
+ IN UINTN DataSize,
+ OUT UINT32 *Crc32
+ );
+
+typedef
+EFI_BOOTSERVICE
+VOID
+(EFIAPI *EFI_COPY_MEM) (
+ IN VOID *Destination,
+ IN VOID *Source,
+ IN UINTN Length
+ );
+
+typedef
+EFI_BOOTSERVICE
+VOID
+(EFIAPI *EFI_SET_MEM) (
+ IN VOID *Buffer,
+ IN UINTN Size,
+ IN UINT8 Value
+ );
+
+//
+// Protocol handler functions
+//
+typedef enum {
+ EFI_NATIVE_INTERFACE
+} EFI_INTERFACE_TYPE;
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) (
+ IN OUT EFI_HANDLE * Handle,
+ IN EFI_GUID * Protocol,
+ IN EFI_INTERFACE_TYPE InterfaceType,
+ IN VOID *Interface
+ );
+
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
+ IN OUT EFI_HANDLE * Handle,
+ ...
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) (
+ IN EFI_HANDLE Handle,
+ IN EFI_GUID * Protocol,
+ IN VOID *OldInterface,
+ IN VOID *NewInterface
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) (
+ IN EFI_HANDLE Handle,
+ IN EFI_GUID * Protocol,
+ IN VOID *Interface
+ );
+
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
+ IN EFI_HANDLE Handle,
+ ...
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_HANDLE_PROTOCOL) (
+ IN EFI_HANDLE Handle,
+ IN EFI_GUID * Protocol,
+ OUT VOID **Interface
+ );
+
+#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
+#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
+#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
+#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
+#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
+#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020
+
+//
+// ///////////////////////////////////////////////////////////////////////////////////////////////
+// OpenProtocol() Attribute Values
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// BY_HANDLE_PROTOCOL - Used by EFI 1.0 Drivers and Applications
+// May not actually add an elemnt to the open list in a production build
+//
+// GET_PROTOCOL - Used by EFI 1.1 Drivers to get a protocol interface
+// May not actually add an elemnt to the open list in a production build
+//
+// TEST_PROTOCOL - Used by EFI 1.1 Drivers to test for the existence of a protocol interface
+// The interface is not returned, and it is an optional parameter tham may be NULL.
+// May not actually add an elemnt to the open list in a production build
+//
+// BY_DRIVER - Used by EFI 1.1 Drivers that are able to share a protocol with other
+// agents other than its children. A driver is always able to share
+// a protocol with its children, since the driver is in control of the
+// parent controller's and the child controller's use of the protocol.
+//
+// BY_DRIVER | EXCLUSIVE - Used by EFI 1.1 Drivers that will not share a protocol with any other
+// agents except its children. A driver is always able to share
+// a protocol with its children, since the driver is in control of the
+// parent controller's and the child controller's use of the protocol.
+// This attribute will force all other drivers to disconnect from the protocol
+// before this driver attaches. When this driver closes the handle, the other
+// drivers will reconnect to the protocol.
+//
+//
+// BY_CHILD_CONTROLLER - Used by EFI 1.1 Driver to show that a protocol is consumed by a child
+// of the driver. This is information used by DisconnectController() to
+// determine the list of children that a protocol has. It has
+// no affect on the OpenProtocol()/ClosePrototocol() behavior.
+//
+// EXCLUSIVE - Used by EFI 1.1 Applications to gain exclusive access to a protocol.
+// All drivers are disconnected from the handle while the application has
+// the handle open. These drivers are reconnected when the application
+// closes the handle.
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// OpenProtocol() behavior based on Attribute values
+/////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// OpenProtocol (Handle, Protocol, Interface, ImageHandle, DeviceHandle, Attributes)
+// * EFI_UNSUPPORTED if Protocol does not exist on Handle
+// * EFI_INVALID_PARAMETER if Handle is not a valid handle.
+// * EFI_INVALID_PARAMETER if Protocol is NULL or not a valid GUID
+// * EFI_INVALID_PARAMETER if Interface is NULL
+// * EFI_INVALID_PARAMETER if Attributes is not one of the following values:
+// BY_HANDLE_PROTOCOL
+// GET_PROTOCOL
+// TEST_PROTOCOL
+// BY_CHILD_CONTROLLER
+// BY_DRIVER
+// BY_DRIVER | EXCLUSIVE
+// EXCLUSIVE
+// * EFI_INVALID_PARAMETER if Attributes BY_CHILD_CONTROLLER and ImageHandle is not a valid handle
+// * EFI_INVALID_PARAMETER if Attributes BY_CHILD_CONTROLLER and DeviceHandle is not a valid handle
+// * EFI_INVALID_PARAMETER if Attributes BY_CHILD_CONTROLLER and Handle == DeviceHandle
+// * EFI_INVALID_PARAMETER if Attributes BY_DRIVER and ImageHandle is not a valid handle
+// * EFI_INVALID_PARAMETER if Attributes BY_DRIVER and DeviceHandle is not a valid handle
+// * EFI_INVALID_PARAMETER if Attributes BY_DRIVER | EXCLUSIVE and ImageHandle is not a valid handle
+// * EFI_INVALID_PARAMETER if Attributes BY_DRIVER | EXCLUSIVE and DeviceHandle is not a valid handle
+// * EFI_INVALID_PARAMETER if Attributes EXCLUSIVE and ImageHandle is not a valid handle
+//
+// OpenProtocol() Attributes = BY_HANDLE_PROTOCOL, GET_PROTOCOL, TEST_PROTOCOL, BY_CHILD_CONTROLLER
+// * EFI_SUCCESS if Protocol exists on the Handle
+//
+// OpenProtocol() Attributes = BY_DRIVER
+// * EFI_SUCCESS if there are no items in the Open List for (Handle, Protocol)
+// * EFI_SUCCESS if there are only items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_HANDLE_PROTOCOL
+// GET_PROTOCOL
+// TEST_PROTOCOL
+// BY_CHILD_CONTROLLER
+// * EFI_ACCESS_DENIED if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER
+// AND ImageHandle != OpenListItem.IH
+// * EFI_ALREADY_STARTED if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER
+// AND ImageHandle == OpenListItem.IH
+// * EFI_ACCESS_DENIED if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER | EXCLUSIVE
+// EXCLUSIVE
+//
+// OpenProtocol() Attributes = BY_DRIVER | EXCLUSIVE
+// * EFI_SUCCESS if there are no items in the Open List for (Handle, Protocol)
+// * EFI_SUCCESS if there are only items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_HANDLE_PROTOCOL
+// GET_PROTOCOL
+// TEST_PROTOCOL
+// BY_CHILD_CONTROLLER
+// * EFI_SUCCESS if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER
+// AND the driver is removed by DisconnectController(IH,DH)
+// * EFI_ALREADY_STARTED if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER | EXCLUSIVE
+// AND ImageHandle == OpenListItem.IH
+// * EFI_ACCESS_DENIED if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER
+// AND the driver can not be removed by DisconnectController(IH,DH)
+// * EFI_ACCESS_DENIED if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER | EXCLUSIVE
+// EXCLUSIVE
+//
+// OpenProtocol() Attributes = EXCLUSIVE
+// * EFI_SUCCESS if there are no items in the Open List for (Handle, Protocol)
+// * EFI_SUCCESS if there are only items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_HANDLE_PROTOCOL
+// GET_PROTOCOL
+// TEST_PROTOCOL
+// BY_CHILD_CONTROLLER
+// * EFI_SUCCESS if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER
+// AND the driver is removed by DisconnectController(IH,DH)
+// * EFI_ACCESS_DENIED if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER
+// AND the driver can not be removed by DisconnectController(IH,DH)
+// * EFI_ACCESS_DENIED if there are any items in the Open List for (Handle, Protocol)
+// that have the one of the following Attributes
+// BY_DRIVER | EXCLUSIVE
+// EXCLUSIVE
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// CloseProtocol() Behavior based on the Attributes of the item being closed and the items
+// remaining on the Open List
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// CloseProtocol(Handle, Protocol, ImageHandle, DeviceHandle)
+// CloseProtocol() Attributes of item = BY_HANDLE_PROTOCOL,
+// GET_PROTOCOL
+// TEST_PROTOCOL
+// BY_CHILD_CONTROLLER,
+// BY_DRIVER
+// BY_DRIVER | EXCLUSIVE
+// EXCLUSIVE
+// EFI_NOT_FOUND if Protocol does not exist on Handle
+// EFI_INVALID_PARAMETER if Handle is not a valid handle.
+// EFI_INVALID_PARAMETER if Protocol is NULL or not a valid GUID
+// EFI_INVALID_PARAMETER if ImageHandle is not a valid handle
+// EFI_INVALID_PARAMETER if DeviceHandle is not a valid handle
+// EFI_NOT_FOUND if (ImageHandle, DeviceHandle) is not present in the Open List
+// for (Handle, Protocol)
+// EFI_ACCESS_DENIED if (ImageHandle, DeviceHandle) is present in the Open List
+// for (Handle, Protocol), but the item can not be removed.
+// EFI_SUCCESS if (ImageHandle, DeviceHandle) is present in the Open List
+// for (Handle, Protocol), and the item can be removed.
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// UninstallProtocolInterface() behavior
+/////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// UninstallProtocolInterface (Handle, Protocol, Interface)
+//
+// EFI_INVALID_PARAMETER if Handle is not a valid handle.
+// EFI_INVALID_PARAMETER if Protocol is not a vlaid GUID
+// EFI_NOT_FOUND if Handle doe not support Protocol
+// EFI_NOT_FOUND if the interface for (Handle, Protocol) does not match Interface
+// EFI_ACCESS_DENIED if the list of Open Items for (Handle, Protocol) can not be removed
+// EFI_SUCCESS if the list of Open Items is empty, and Protocol is removed from Handle
+//
+// Algorithm to remove Open Item List:
+//
+// Loop through all Open Item List entries
+// if (OpenItem.Attributes & BY_DRIVER) then
+// DisconnectController (OpenItem.IH, OpenItem.DH)
+// end if
+// end loop
+// Loop through all Open Item List entries
+// if (OpenItem.Attributes & BY_HANDLE_PROTOCOL or GET_PROTOCOL or TEST_PROTOCOL) then
+// CloseProtocol (Handle, Protocol, OpenItem.IH, OpenItem.DH)
+// end if
+// end loop
+// if Open Item List is empty then remove Protocol from Handle and return EFI_SUCCESS
+// if Open Item List is not empty then return EFI_ACCESS_DENIED
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_OPEN_PROTOCOL) (
+ IN EFI_HANDLE Handle,
+ IN EFI_GUID * Protocol,
+ OUT VOID **Interface,
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_HANDLE ControllerHandle, OPTIONAL
+ IN UINT32 Attributes
+ );
+
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_CLOSE_PROTOCOL) (
+ IN EFI_HANDLE Handle,
+ IN EFI_GUID * Protocol,
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_HANDLE DeviceHandle
+ );
+
+typedef struct {
+ EFI_HANDLE AgentHandle;
+ EFI_HANDLE ControllerHandle;
+ UINT32 Attributes;
+ UINT32 OpenCount;
+} EFI_OPEN_PROTOCOL_INFORMATION_ENTRY;
+
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION) (
+ IN EFI_HANDLE UserHandle,
+ IN EFI_GUID * Protocol,
+ IN EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
+ OUT UINTN *EntryCount
+ );
+
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_PROTOCOLS_PER_HANDLE) (
+ IN EFI_HANDLE UserHandle,
+ OUT EFI_GUID ***ProtocolBuffer,
+ OUT UINTN *ProtocolBufferCount
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) (
+ IN EFI_GUID * Protocol,
+ IN EFI_EVENT Event,
+ OUT VOID **Registration
+ );
+
+typedef enum {
+ AllHandles,
+ ByRegisterNotify,
+ ByProtocol
+} EFI_LOCATE_SEARCH_TYPE;
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_LOCATE_HANDLE) (
+ IN EFI_LOCATE_SEARCH_TYPE SearchType,
+ IN EFI_GUID * Protocol OPTIONAL,
+ IN VOID *SearchKey OPTIONAL,
+ IN OUT UINTN *BufferSize,
+ OUT EFI_HANDLE * Buffer
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_LOCATE_DEVICE_PATH) (
+ IN EFI_GUID * Protocol,
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
+ OUT EFI_HANDLE * Device
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) (
+ IN EFI_GUID * Guid,
+ IN VOID *Table
+ );
+
+typedef
+EFI_BOOTSERVICE
+EFI_STATUS
+(EFIAPI *EFI_RESERVED_SERVICE) (
+ VOID
+ );
+
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_LOCATE_HANDLE_BUFFER) (
+ IN EFI_LOCATE_SEARCH_TYPE SearchType,
+ IN EFI_GUID * Protocol OPTIONAL,
+ IN VOID *SearchKey OPTIONAL,
+ IN OUT UINTN *NumberHandles,
+ OUT EFI_HANDLE **Buffer
+ );
+
+typedef
+EFI_BOOTSERVICE11
+EFI_STATUS
+(EFIAPI *EFI_LOCATE_PROTOCOL) (
+ EFI_GUID * Protocol,
+ VOID *Registration, OPTIONAL
+ VOID **Interface
+ );
+
+//
+// Definition of Status Code extended data header
+//
+// HeaderSize The size of the architecture. This is specified to enable
+// the future expansion
+//
+// Size The size of the data in bytes. This does not include the size
+// of the header structure.
+//
+// Type A GUID defining the type of the data
+//
+//
+#if ((TIANO_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_REPORT_STATUS_CODE) (
+ IN EFI_STATUS_CODE_TYPE Type,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID * CallerId OPTIONAL,
+ IN EFI_STATUS_CODE_DATA * Data OPTIONAL
+ );
+
+#endif
+
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_UPDATE_CAPSULE) (
+ IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
+ IN UINTN CapsuleCount,
+ IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
+ );
+
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES) (
+ IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
+ IN UINTN CapsuleCount,
+ OUT UINT64 *MaxiumCapsuleSize,
+ OUT EFI_RESET_TYPE *ResetType
+);
+
+typedef
+EFI_RUNTIMESERVICE
+EFI_STATUS
+(EFIAPI *EFI_QUERY_VARIABLE_INFO) (
+ IN UINT32 Attributes,
+ OUT UINT64 *MaximumVariableStorageSize,
+ OUT UINT64 *RemainingVariableStorageSize,
+ OUT UINT64 *MaximumVariableSize
+ );
+
+#endif
+
+//
+// EFI Runtime Services Table
+//
+#define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552
+#define EFI_RUNTIME_SERVICES_REVISION EFI_SPECIFICATION_VERSION
+
+typedef struct {
+ EFI_TABLE_HEADER Hdr;
+
+ //
+ // Time services
+ //
+ EFI_GET_TIME GetTime;
+ EFI_SET_TIME SetTime;
+ EFI_GET_WAKEUP_TIME GetWakeupTime;
+ EFI_SET_WAKEUP_TIME SetWakeupTime;
+
+ //
+ // Virtual memory services
+ //
+ EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
+ EFI_CONVERT_POINTER ConvertPointer;
+
+ //
+ // Variable services
+ //
+ EFI_GET_VARIABLE GetVariable;
+ EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
+ EFI_SET_VARIABLE SetVariable;
+
+ //
+ // Misc
+ //
+ EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
+ EFI_RESET_SYSTEM ResetSystem;
+
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ //
+ // New Boot Service added by UEFI 2.0
+ //
+ EFI_UPDATE_CAPSULE UpdateCapsule;
+ EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities;
+ EFI_QUERY_VARIABLE_INFO QueryVariableInfo;
+#elif (TIANO_RELEASE_VERSION != 0)
+ //
+ // Tiano extension to EFI 1.10 runtime table
+ // It was moved to a protocol to not conflict with UEFI 2.0
+ // If Tiano is disabled, this item is not enabled for EFI1.10
+ //
+ EFI_REPORT_STATUS_CODE ReportStatusCode;
+#endif
+
+} EFI_RUNTIME_SERVICES;
+
+//
+// EFI Boot Services Table
+//
+#define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
+#define EFI_BOOT_SERVICES_REVISION EFI_SPECIFICATION_VERSION
+
+typedef struct {
+ EFI_TABLE_HEADER Hdr;
+
+ //
+ // Task priority functions
+ //
+ EFI_RAISE_TPL RaiseTPL;
+ EFI_RESTORE_TPL RestoreTPL;
+
+ //
+ // Memory functions
+ //
+ EFI_ALLOCATE_PAGES AllocatePages;
+ EFI_FREE_PAGES FreePages;
+ EFI_GET_MEMORY_MAP GetMemoryMap;
+ EFI_ALLOCATE_POOL AllocatePool;
+ EFI_FREE_POOL FreePool;
+
+ //
+ // Event & timer functions
+ //
+ EFI_CREATE_EVENT CreateEvent;
+ EFI_SET_TIMER SetTimer;
+ EFI_WAIT_FOR_EVENT WaitForEvent;
+ EFI_SIGNAL_EVENT SignalEvent;
+ EFI_CLOSE_EVENT CloseEvent;
+ EFI_CHECK_EVENT CheckEvent;
+
+ //
+ // Protocol handler functions
+ //
+ EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
+ EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
+ EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
+ EFI_HANDLE_PROTOCOL HandleProtocol;
+ VOID *Reserved;
+ EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify;
+ EFI_LOCATE_HANDLE LocateHandle;
+ EFI_LOCATE_DEVICE_PATH LocateDevicePath;
+ EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
+
+ //
+ // Image functions
+ //
+ EFI_IMAGE_LOAD LoadImage;
+ EFI_IMAGE_START StartImage;
+ EFI_EXIT Exit;
+ EFI_IMAGE_UNLOAD UnloadImage;
+ EFI_EXIT_BOOT_SERVICES ExitBootServices;
+
+ //
+ // Misc functions
+ //
+ EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
+ EFI_STALL Stall;
+ EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
+
+ //
+ // ////////////////////////////////////////////////////
+ // EFI 1.1 Services
+ //////////////////////////////////////////////////////
+ //
+ // DriverSupport Services
+ //
+ EFI_CONNECT_CONTROLLER ConnectController;
+ EFI_DISCONNECT_CONTROLLER DisconnectController;
+
+ //
+ // Added Open and Close protocol for the new driver model
+ //
+ EFI_OPEN_PROTOCOL OpenProtocol;
+ EFI_CLOSE_PROTOCOL CloseProtocol;
+ EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
+
+ //
+ // Added new services to EFI 1.1 as Lib to reduce code size.
+ //
+ EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle;
+ EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer;
+ EFI_LOCATE_PROTOCOL LocateProtocol;
+
+ EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
+ EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
+
+ //
+ // CRC32 services
+ //
+ EFI_CALCULATE_CRC32 CalculateCrc32;
+
+ //
+ // Memory Utility Services
+ //
+ EFI_COPY_MEM CopyMem;
+ EFI_SET_MEM SetMem;
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ //
+ // UEFI 2.0 Extension to the table
+ //
+ EFI_CREATE_EVENT_EX CreateEventEx;
+#endif
+
+} EFI_BOOT_SERVICES;
+
+//
+// EFI Configuration Table
+//
+typedef struct {
+ EFI_GUID VendorGuid;
+ VOID *VendorTable;
+} EFI_CONFIGURATION_TABLE;
+
+//
+// EFI System Table
+//
+#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
+#define EFI_SYSTEM_TABLE_REVISION EFI_SPECIFICATION_VERSION
+#define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | 02)
+#define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | 10)
+#define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | 00)
+#define EFI_2_10_SYSTEM_TABLE_REVISION ((2 << 16) | 10)
+
+typedef struct _EFI_SYSTEM_TABLE {
+ EFI_TABLE_HEADER Hdr;
+
+ CHAR16 *FirmwareVendor;
+ UINT32 FirmwareRevision;
+
+ EFI_HANDLE ConsoleInHandle;
+ EFI_SIMPLE_TEXT_IN_PROTOCOL *ConIn;
+
+ EFI_HANDLE ConsoleOutHandle;
+ EFI_SIMPLE_TEXT_OUT_PROTOCOL *ConOut;
+
+ EFI_HANDLE StandardErrorHandle;
+ EFI_SIMPLE_TEXT_OUT_PROTOCOL *StdErr;
+
+ EFI_RUNTIME_SERVICES *RuntimeServices;
+ EFI_BOOT_SERVICES *BootServices;
+
+ UINTN NumberOfTableEntries;
+ EFI_CONFIGURATION_TABLE *ConfigurationTable;
+
+} EFI_SYSTEM_TABLE;
+
+#endif
diff --git a/EDK/Foundation/Efi/Include/EfiDevicePath.h b/EDK/Foundation/Efi/Include/EfiDevicePath.h
new file mode 100644
index 0000000..494616c
--- /dev/null
+++ b/EDK/Foundation/Efi/Include/EfiDevicePath.h
@@ -0,0 +1,568 @@
+/*++
+
+Copyright (c) 2004 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EfiDevicePath.h
+
+Abstract:
+
+ EFI Device Path definitions
+
+--*/
+
+#ifndef _EFI_DEVICE_PATH_H
+#define _EFI_DEVICE_PATH_H
+
+
+
+#pragma pack(1)
+
+
+//
+// Device Path defines and macros
+//
+#define EFI_DP_TYPE_MASK 0x7F
+#define EFI_DP_TYPE_UNPACKED 0x80
+#define END_DEVICE_PATH_TYPE 0x7f
+#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
+#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
+#define END_DEVICE_PATH_LENGTH (sizeof(EFI_DEVICE_PATH_PROTOCOL))
+
+#define DP_IS_END_TYPE(a)
+#define DP_IS_END_SUBTYPE(a) ( ((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
+
+#define DevicePathType(a) ( ((a)->Type) & EFI_DP_TYPE_MASK )
+#define DevicePathSubType(a) ( (a)->SubType )
+#define DevicePathNodeLength(a) ( ((a)->Length[0]) | ((a)->Length[1] << 8) )
+#define NextDevicePathNode(a) ( (EFI_DEVICE_PATH_PROTOCOL *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
+#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE )
+#define IsDevicePathEndSubType(a) ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
+#define IsDevicePathEnd(a) ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
+#define IsDevicePathUnpacked(a) ( (a)->Type & EFI_DP_TYPE_UNPACKED )
+
+
+#define SetDevicePathNodeLength(a,l) { \
+ (a)->Length[0] = (UINT8) (l); \
+ (a)->Length[1] = (UINT8) ((l) >> 8); \
+ }
+
+#define SetDevicePathEndNode(a) { \
+ (a)->Type = END_DEVICE_PATH_TYPE; \
+ (a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; \
+ (a)->Length[0] = sizeof(EFI_DEVICE_PATH_PROTOCOL); \
+ (a)->Length[1] = 0; \
+ }
+
+//
+// Hardware Device Paths
+//
+#define HARDWARE_DEVICE_PATH 0x01
+
+#define HW_PCI_DP 0x01
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT8 Function;
+ UINT8 Device;
+} PCI_DEVICE_PATH;
+
+#define HW_PCCARD_DP 0x02
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT8 FunctionNumber;
+} PCCARD_DEVICE_PATH;
+
+#define HW_MEMMAP_DP 0x03
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 MemoryType;
+ EFI_PHYSICAL_ADDRESS StartingAddress;
+ EFI_PHYSICAL_ADDRESS EndingAddress;
+} MEMMAP_DEVICE_PATH;
+
+#define HW_VENDOR_DP 0x04
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID Guid;
+} VENDOR_DEVICE_PATH;
+
+#define HW_CONTROLLER_DP 0x05
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 Controller;
+} CONTROLLER_DEVICE_PATH;
+
+//
+// ACPI Device Paths
+//
+#define ACPI_DEVICE_PATH 0x02
+
+#define ACPI_DP 0x01
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 HID;
+ UINT32 UID;
+} ACPI_HID_DEVICE_PATH;
+
+#define ACPI_EXTENDED_DP 0x02
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 HID;
+ UINT32 UID;
+ UINT32 CID;
+ //
+ // Optional variable length _HIDSTR
+ // Optional variable length _UIDSTR
+ //
+} ACPI_EXTENDED_HID_DEVICE_PATH;
+
+#define ACPI_ADR_DP 0x03
+
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 ADR;
+} ACPI_ADR_DEVICE_PATH;
+
+#define ACPI_ADR_DISPLAY_TYPE_OTHER 0
+#define ACPI_ADR_DISPLAY_TYPE_VGA 1
+#define ACPI_ADR_DISPLAY_TYPE_TV 2
+#define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL 3
+#define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL 4
+
+#define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
+ ((UINT32) ( (((_DeviceIdScheme) & 0x1) << 31) | \
+ (((_HeadId) & 0x7) << 18) | \
+ (((_NonVgaOutput) & 0x1) << 17) | \
+ (((_BiosCanDetect) & 0x1) << 16) | \
+ (((_VendorInfo) & 0xf) << 12) | \
+ (((_Type) & 0xf) << 8) | \
+ (((_Port) & 0xf) << 4) | \
+ ((_Index) & 0xf) ))
+
+//
+// EISA ID Macro
+// EISA ID Definition 32-bits
+// bits[15:0] - three character compressed ASCII EISA ID.
+// bits[31:16] - binary number
+// Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
+//
+#define PNP_EISA_ID_CONST 0x41d0
+#define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
+#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
+#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
+
+#define PNP_EISA_ID_MASK 0xffff
+#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
+
+//
+// Messaging Device Paths
+//
+#define MESSAGING_DEVICE_PATH 0x03
+
+#define MSG_ATAPI_DP 0x01
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT8 PrimarySecondary;
+ UINT8 SlaveMaster;
+ UINT16 Lun;
+} ATAPI_DEVICE_PATH;
+
+#define MSG_SCSI_DP 0x02
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT16 Pun;
+ UINT16 Lun;
+} SCSI_DEVICE_PATH;
+
+#define MSG_FIBRECHANNEL_DP 0x03
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 Reserved;
+ UINT64 WWN;
+ UINT64 Lun;
+} FIBRECHANNEL_DEVICE_PATH;
+
+#define MSG_1394_DP 0x04
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 Reserved;
+ UINT64 Guid;
+} F1394_DEVICE_PATH;
+
+#define MSG_USB_DP 0x05
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT8 ParentPortNumber;
+ UINT8 InterfaceNumber;
+} USB_DEVICE_PATH;
+
+#define MSG_USB_CLASS_DP 0x0f
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT16 VendorId;
+ UINT16 ProductId;
+ UINT8 DeviceClass;
+ UINT8 DeviceSubClass;
+ UINT8 DeviceProtocol;
+} USB_CLASS_DEVICE_PATH;
+
+#define MSG_USB_WWID_DP 0x10
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT16 InterfaceNumber;
+ UINT16 VendorId;
+ UINT16 ProductId;
+ //
+ // CHAR16 SerialNumber[];
+ //
+} USB_WWID_DEVICE_PATH;
+
+#define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT8 Lun;
+} DEVICE_LOGICAL_UNIT_DEVICE_PATH;
+
+#define MSG_SATA_DP 0x12
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT16 HBAPortNumber;
+ UINT16 PortMultiplierPortNumber;
+ UINT16 Lun;
+} SATA_DEVICE_PATH;
+
+#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
+
+#define MSG_I2O_DP 0x06
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 Tid;
+} I2O_DEVICE_PATH;
+
+#define MSG_MAC_ADDR_DP 0x0b
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_MAC_ADDRESS MacAddress;
+ UINT8 IfType;
+} MAC_ADDR_DEVICE_PATH;
+
+#define MSG_IPv4_DP 0x0c
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_IPv4_ADDRESS LocalIpAddress;
+ EFI_IPv4_ADDRESS RemoteIpAddress;
+ UINT16 LocalPort;
+ UINT16 RemotePort;
+ UINT16 Protocol;
+ BOOLEAN StaticIpAddress;
+} IPv4_DEVICE_PATH;
+
+#define MSG_IPv6_DP 0x0d
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_IPv6_ADDRESS LocalIpAddress;
+ EFI_IPv6_ADDRESS RemoteIpAddress;
+ UINT16 LocalPort;
+ UINT16 RemotePort;
+ UINT16 Protocol;
+ BOOLEAN StaticIpAddress;
+} IPv6_DEVICE_PATH;
+
+#define MSG_INFINIBAND_DP 0x09
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 ResourceFlags;
+ UINT8 PortGid[16];
+ UINT64 ServiceId;
+ UINT64 TargetPortId;
+ UINT64 DeviceId;
+} INFINIBAND_DEVICE_PATH;
+
+#define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
+#define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02
+#define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04
+#define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
+#define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
+
+#define MSG_UART_DP 0x0e
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 Reserved;
+ UINT64 BaudRate;
+ UINT8 DataBits;
+ UINT8 Parity;
+ UINT8 StopBits;
+} UART_DEVICE_PATH;
+
+//
+// Use VENDOR_DEVICE_PATH struct
+//
+#define MSG_VENDOR_DP 0x0a
+
+#define DEVICE_PATH_MESSAGING_PC_ANSI \
+ { 0xe0c14753, 0xf9be, 0x11d2, 0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
+
+#define DEVICE_PATH_MESSAGING_VT_100 \
+ { 0xdfa66065, 0xb419, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
+
+#define DEVICE_PATH_MESSAGING_VT_100_PLUS \
+ { 0x7baec70b, 0x57e0, 0x4c76, 0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43 }
+
+#define DEVICE_PATH_MESSAGING_VT_UTF8 \
+ { 0xad15a0d6, 0x8bec, 0x4acf, 0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88 }
+
+#define DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL \
+ { 0x37499a9d, 0x542f, 0x4c89, 0xa0, 0x26, 0x35, 0xda, 0x14, 0x20, 0x94, 0xe4 }
+
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID Guid;
+ UINT32 FlowControlMap;
+} UART_FLOW_CONTROL_DEVICE_PATH;
+
+#define DEVICE_PATH_MESSAGING_SAS \
+ { 0xd487ddb4, 0x008b, 0x11d9, 0xaf, 0xdc, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d }
+
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID Guid;
+ UINT32 Reserved;
+ UINT64 SasAddress;
+ UINT64 Lun;
+ UINT16 DeviceTopology;
+ UINT16 RelativeTargetPort;
+} SAS_DEVICE_PATH;
+
+#define MSG_ISCSI_DP 0x13
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT16 NetworkProtocol;
+ UINT16 LoginOption;
+ UINT64 Lun;
+ UINT16 TargetPortalGroupTag;
+ // CHAR8 iSCSI Target Name
+} ISCSI_DEVICE_PATH;
+
+#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
+#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
+#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
+#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
+#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
+#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
+#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
+#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
+
+//
+// Media Device Path
+//
+#define MEDIA_DEVICE_PATH 0x04
+
+#define MEDIA_HARDDRIVE_DP 0x01
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 PartitionNumber;
+ UINT64 PartitionStart;
+ UINT64 PartitionSize;
+ UINT8 Signature[16];
+ UINT8 MBRType;
+ UINT8 SignatureType;
+} HARDDRIVE_DEVICE_PATH;
+
+#define MBR_TYPE_PCAT 0x01
+#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
+
+#define SIGNATURE_TYPE_MBR 0x01
+#define SIGNATURE_TYPE_GUID 0x02
+
+#define MEDIA_CDROM_DP 0x02
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 BootEntry;
+ UINT64 PartitionStart;
+ UINT64 PartitionSize;
+} CDROM_DEVICE_PATH;
+
+//
+// Use VENDOR_DEVICE_PATH struct
+//
+#define MEDIA_VENDOR_DP 0x03
+
+#define MEDIA_FILEPATH_DP 0x04
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ CHAR16 PathName[1];
+} FILEPATH_DEVICE_PATH;
+
+#define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
+
+#define MEDIA_PROTOCOL_DP 0x05
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID Protocol;
+} MEDIA_PROTOCOL_DEVICE_PATH;
+
+#define MEDIA_FV_DP 0x07
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID NameGuid;
+} MEDIA_FW_VOL_DEVICE_PATH;
+
+#define MEDIA_FV_FILEPATH_DP 0x06
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID NameGuid;
+} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
+
+#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT64 StartingOffset;
+ UINT64 EndingOffset;
+} MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;
+
+//
+// BBS Device Path
+//
+#define BBS_DEVICE_PATH 0x05
+#define BBS_BBS_DP 0x01
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT16 DeviceType;
+ UINT16 StatusFlag;
+ CHAR8 String[1];
+} BBS_BBS_DEVICE_PATH;
+
+//
+// DeviceType definitions - from BBS specification
+//
+#define BBS_TYPE_FLOPPY 0x01
+#define BBS_TYPE_HARDDRIVE 0x02
+#define BBS_TYPE_CDROM 0x03
+#define BBS_TYPE_PCMCIA 0x04
+#define BBS_TYPE_USB 0x05
+#define BBS_TYPE_EMBEDDED_NETWORK 0x06
+#define BBS_TYPE_BEV 0x80
+#define BBS_TYPE_UNKNOWN 0xFF
+
+#define UNKNOWN_DEVICE_GUID \
+ { 0xcf31fac5, 0xc24e, 0x11d2, 0x85, 0xf3, 0x0, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b }
+
+typedef struct {
+ VENDOR_DEVICE_PATH DevicePath;
+ UINT8 LegacyDriveLetter;
+} UNKNOWN_DEVICE_VENDOR_DEVICE_PATH;
+
+
+//
+// Union of all possible Device Paths and pointers to Device Paths
+//
+
+typedef union {
+ EFI_DEVICE_PATH_PROTOCOL DevPath;
+ PCI_DEVICE_PATH Pci;
+ PCCARD_DEVICE_PATH PcCard;
+ MEMMAP_DEVICE_PATH MemMap;
+ VENDOR_DEVICE_PATH Vendor;
+
+ UNKNOWN_DEVICE_VENDOR_DEVICE_PATH UnknownVendor;
+
+ CONTROLLER_DEVICE_PATH Controller;
+ ACPI_HID_DEVICE_PATH Acpi;
+ ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi;
+
+ ATAPI_DEVICE_PATH Atapi;
+ SCSI_DEVICE_PATH Scsi;
+ FIBRECHANNEL_DEVICE_PATH FibreChannel;
+ SATA_DEVICE_PATH Sata;
+
+ F1394_DEVICE_PATH F1394;
+ USB_DEVICE_PATH Usb;
+ USB_CLASS_DEVICE_PATH UsbClass;
+ USB_WWID_DEVICE_PATH UsbWwid;
+ DEVICE_LOGICAL_UNIT_DEVICE_PATH LogicUnit;
+ I2O_DEVICE_PATH I2O;
+ MAC_ADDR_DEVICE_PATH MacAddr;
+ IPv4_DEVICE_PATH Ipv4;
+ IPv6_DEVICE_PATH Ipv6;
+ INFINIBAND_DEVICE_PATH InfiniBand;
+ UART_DEVICE_PATH Uart;
+ UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl;
+ SAS_DEVICE_PATH Sas;
+ ISCSI_DEVICE_PATH Iscsi;
+ HARDDRIVE_DEVICE_PATH HardDrive;
+ CDROM_DEVICE_PATH CD;
+
+ FILEPATH_DEVICE_PATH FilePath;
+ MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;
+
+ MEDIA_FW_VOL_DEVICE_PATH PiwgFirmwareVolume;
+ MEDIA_FW_VOL_FILEPATH_DEVICE_PATH PiwgFirmwareFile;
+ MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
+ Offset;
+
+ BBS_BBS_DEVICE_PATH Bbs;
+} EFI_DEV_PATH;
+
+
+
+typedef union {
+ EFI_DEVICE_PATH_PROTOCOL *DevPath;
+ PCI_DEVICE_PATH *Pci;
+ PCCARD_DEVICE_PATH *PcCard;
+ MEMMAP_DEVICE_PATH *MemMap;
+ VENDOR_DEVICE_PATH *Vendor;
+
+ UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *UnknownVendor;
+
+ CONTROLLER_DEVICE_PATH *Controller;
+ ACPI_HID_DEVICE_PATH *Acpi;
+ ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
+
+ ATAPI_DEVICE_PATH *Atapi;
+ SCSI_DEVICE_PATH *Scsi;
+ FIBRECHANNEL_DEVICE_PATH *FibreChannel;
+ SATA_DEVICE_PATH *Sata;
+
+ F1394_DEVICE_PATH *F1394;
+ USB_DEVICE_PATH *Usb;
+ USB_CLASS_DEVICE_PATH *UsbClass;
+ USB_WWID_DEVICE_PATH *UsbWwid;
+ DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicUnit;
+ I2O_DEVICE_PATH *I2O;
+ MAC_ADDR_DEVICE_PATH *MacAddr;
+ IPv4_DEVICE_PATH *Ipv4;
+ IPv6_DEVICE_PATH *Ipv6;
+ INFINIBAND_DEVICE_PATH *InfiniBand;
+ UART_DEVICE_PATH *Uart;
+ UART_FLOW_CONTROL_DEVICE_PATH *UartFlowControl;
+
+ SAS_DEVICE_PATH *Sas;
+ ISCSI_DEVICE_PATH *Iscsi;
+
+ HARDDRIVE_DEVICE_PATH *HardDrive;
+ CDROM_DEVICE_PATH *CD;
+
+ FILEPATH_DEVICE_PATH *FilePath;
+ MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;
+
+ MEDIA_FW_VOL_DEVICE_PATH *PiwgFirmwareVolume;
+ MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *PiwgFirmwareFile;
+ MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
+ *Offset;
+
+ BBS_BBS_DEVICE_PATH *Bbs;
+ UINT8 *Raw;
+} EFI_DEV_PATH_PTR;
+
+#pragma pack()
+
+
+#endif
diff --git a/EDK/Foundation/Efi/Include/EfiError.h b/EDK/Foundation/Efi/Include/EfiError.h
new file mode 100644
index 0000000..0efab6b
--- /dev/null
+++ b/EDK/Foundation/Efi/Include/EfiError.h
@@ -0,0 +1,70 @@
+/*++
+
+Copyright (c) 2004 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EfiError.h
+
+Abstract:
+
+ EFI error levels and thier associated defines
+
+--*/
+
+#ifndef _EFI_ERROR_H_
+#define _EFI_ERROR_H_
+
+//
+// Set the upper bit to indicate EFI Error.
+//
+#define EFIERR(a) (EFI_MAX_BIT | (a))
+
+#define EFIWARN(a) (a)
+#define EFI_ERROR(a) (((INTN) (a)) < 0)
+
+#define EFI_SUCCESS 0
+#define EFI_LOAD_ERROR EFIERR (1)
+#define EFI_INVALID_PARAMETER EFIERR (2)
+#define EFI_UNSUPPORTED EFIERR (3)
+#define EFI_BAD_BUFFER_SIZE EFIERR (4)
+#define EFI_BUFFER_TOO_SMALL EFIERR (5)
+#define EFI_NOT_READY EFIERR (6)
+#define EFI_DEVICE_ERROR EFIERR (7)
+#define EFI_WRITE_PROTECTED EFIERR (8)
+#define EFI_OUT_OF_RESOURCES EFIERR (9)
+#define EFI_VOLUME_CORRUPTED EFIERR (10)
+#define EFI_VOLUME_FULL EFIERR (11)
+#define EFI_NO_MEDIA EFIERR (12)
+#define EFI_MEDIA_CHANGED EFIERR (13)
+#define EFI_NOT_FOUND EFIERR (14)
+#define EFI_ACCESS_DENIED EFIERR (15)
+#define EFI_NO_RESPONSE EFIERR (16)
+#define EFI_NO_MAPPING EFIERR (17)
+#define EFI_TIMEOUT EFIERR (18)
+#define EFI_NOT_STARTED EFIERR (19)
+#define EFI_ALREADY_STARTED EFIERR (20)
+#define EFI_ABORTED EFIERR (21)
+#define EFI_ICMP_ERROR EFIERR (22)
+#define EFI_TFTP_ERROR EFIERR (23)
+#define EFI_PROTOCOL_ERROR EFIERR (24)
+#define EFI_INCOMPATIBLE_VERSION EFIERR (25)
+#define EFI_SECURITY_VIOLATION EFIERR (26)
+#define EFI_CRC_ERROR EFIERR (27)
+#define EFI_END_OF_MEDIA EFIERR (28)
+#define EFI_END_OF_FILE EFIERR (31)
+#define EFI_INVALID_LANGUAGE EFIERR (32)
+
+#define EFI_WARN_UNKNOWN_GLYPH EFIWARN (1)
+#define EFI_WARN_DELETE_FAILURE EFIWARN (2)
+#define EFI_WARN_WRITE_FAILURE EFIWARN (3)
+#define EFI_WARN_BUFFER_TOO_SMALL EFIWARN (4)
+
+#endif
diff --git a/EDK/Foundation/Efi/Include/EfiHii.h b/EDK/Foundation/Efi/Include/EfiHii.h
new file mode 100644
index 0000000..c05358b
--- /dev/null
+++ b/EDK/Foundation/Efi/Include/EfiHii.h
@@ -0,0 +1,1473 @@
+/*++
+
+Copyright (c) 2007 - 2009, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EfiHii.h
+
+Abstract:
+
+ Hii relative definitions, such as Hii package, IFR OpCode etc
+
+Revision History
+
+--*/
+
+#ifndef _EFI_HII_H_
+#define _EFI_HII_H_
+
+#include "EfiCommon.h"
+#include EFI_PROTOCOL_DEFINITION (DevicePath)
+
+typedef VOID *EFI_HII_HANDLE;
+typedef CHAR16 *EFI_STRING;
+typedef UINT16 EFI_QUESTION_ID;
+typedef UINT16 EFI_IMAGE_ID;
+typedef UINT16 EFI_STRING_ID;
+typedef UINT16 EFI_FORM_ID;
+typedef UINT16 EFI_VARSTORE_ID;
+typedef UINT16 EFI_DEFAULT_ID;
+typedef UINT32 EFI_HII_FONT_STYLE;
+
+//
+// Type defined for backward compatible with Framework HII
+//
+typedef EFI_STRING_ID STRING_REF;
+
+#pragma pack(1)
+
+//
+// HII package list
+//
+typedef struct {
+ EFI_GUID PackageListGuid;
+ UINT32 PackageLength;
+} EFI_HII_PACKAGE_LIST_HEADER;
+
+typedef struct {
+ UINT32 Length:24;
+ UINT32 Type:8;
+} EFI_HII_PACKAGE_HEADER;
+
+#define EFI_HII_PACKAGE_TYPE_ALL 0x00
+#define EFI_HII_PACKAGE_TYPE_GUID 0x01
+#define EFI_HII_PACKAGE_FORMS 0x02
+#define EFI_HII_PACKAGE_STRINGS 0x04
+#define EFI_HII_PACKAGE_FONTS 0x05
+#define EFI_HII_PACKAGE_IMAGES 0x06
+#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
+#define EFI_HII_PACKAGE_DEVICE_PATH 0x08
+#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
+#define EFI_HII_PACKAGE_END 0xDF
+#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
+#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
+
+//
+// Simplified Font Package
+//
+
+#define EFI_GLYPH_HEIGHT 19
+#define EFI_GLYPH_WIDTH 8
+//
+// Contents of EFI_NARROW_GLYPH.Attributes
+//
+#define EFI_GLYPH_NON_SPACING 0x01
+#define EFI_GLYPH_WIDE 0x02
+
+typedef struct {
+ CHAR16 UnicodeWeight;
+ UINT8 Attributes;
+ UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
+} EFI_NARROW_GLYPH;
+
+typedef struct {
+ CHAR16 UnicodeWeight;
+ UINT8 Attributes;
+ UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
+ UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];
+ UINT8 Pad[3];
+} EFI_WIDE_GLYPH;
+
+typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT16 NumberOfNarrowGlyphs;
+ UINT16 NumberOfWideGlyphs;
+ // EFI_NARROW_GLYPH NarrowGlyphs[];
+ // EFI_WIDE_GLYPH WideGlyphs[];
+} EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
+
+//
+// Font Package
+//
+
+#define EFI_HII_FONT_STYLE_NORMAL 0x00000000
+#define EFI_HII_FONT_STYLE_BOLD 0x00000001
+#define EFI_HII_FONT_STYLE_ITALIC 0x00000002
+#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
+#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
+#define EFI_HII_FONT_STYLE_SHADOW 0x00040000
+#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
+#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
+
+typedef struct _EFI_HII_GLYPH_INFO {
+ UINT16 Width;
+ UINT16 Height;
+ INT16 OffsetX;
+ INT16 OffsetY;
+ INT16 AdvanceX;
+} EFI_HII_GLYPH_INFO;
+
+typedef struct _EFI_HII_FONT_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT32 HdrSize;
+ UINT32 GlyphBlockOffset;
+ EFI_HII_GLYPH_INFO Cell;
+ EFI_HII_FONT_STYLE FontStyle;
+ CHAR16 FontFamily[1];
+} EFI_HII_FONT_PACKAGE_HDR;
+
+#define EFI_HII_GIBT_END 0x00
+#define EFI_HII_GIBT_GLYPH 0x10
+#define EFI_HII_GIBT_GLYPHS 0x11
+#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
+#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
+#define EFI_HII_GIBT_DUPLICATE 0x20
+#define EFI_HII_GIBT_SKIP2 0x21
+#define EFI_HII_GIBT_SKIP1 0x22
+#define EFI_HII_GIBT_DEFAULTS 0x23
+#define EFI_HII_GIBT_EXT1 0x30
+#define EFI_HII_GIBT_EXT2 0x31
+#define EFI_HII_GIBT_EXT4 0x32
+
+typedef struct _EFI_HII_GLYPH_BLOCK {
+ UINT8 BlockType;
+} EFI_HII_GLYPH_BLOCK;
+
+typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ EFI_HII_GLYPH_INFO Cell;
+} EFI_HII_GIBT_DEFAULTS_BLOCK;
+
+typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ CHAR16 CharValue;
+} EFI_HII_GIBT_DUPLICATE_BLOCK;
+
+typedef struct _EFI_GLYPH_GIBT_END_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+} EFI_GLYPH_GIBT_END_BLOCK;
+
+typedef struct _EFI_HII_GIBT_EXT1_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 BlockType2;
+ UINT8 Length;
+} EFI_HII_GIBT_EXT1_BLOCK;
+
+typedef struct _EFI_HII_GIBT_EXT2_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 BlockType2;
+ UINT16 Length;
+} EFI_HII_GIBT_EXT2_BLOCK;
+
+typedef struct _EFI_HII_GIBT_EXT4_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 BlockType2;
+ UINT32 Length;
+} EFI_HII_GIBT_EXT4_BLOCK;
+
+typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ EFI_HII_GLYPH_INFO Cell;
+ UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
+} EFI_HII_GIBT_GLYPH_BLOCK;
+
+typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ EFI_HII_GLYPH_INFO Cell;
+ UINT16 Count;
+ UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
+} EFI_HII_GIBT_GLYPHS_BLOCK;
+
+typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
+} EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;
+
+typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT16 Count;
+ UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
+} EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
+
+typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 SkipCount;
+} EFI_HII_GIBT_SKIP1_BLOCK;
+
+typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT16 SkipCount;
+} EFI_HII_GIBT_SKIP2_BLOCK;
+
+//
+// Device Path Package
+//
+typedef struct _EFI_HII_DEVICE_PATH_PACKAGE {
+ EFI_HII_PACKAGE_HEADER Header;
+ // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
+} EFI_HII_DEVICE_PATH_PACKAGE;
+
+//
+// GUID Package
+//
+typedef struct _EFI_HII_GUID_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ EFI_GUID Guid;
+ // Data per GUID definition may follow
+} EFI_HII_GUID_PACKAGE_HDR;
+
+//
+// String Package
+//
+
+#define UEFI_CONFIG_LANG "x-UEFI"
+#define UEFI_CONFIG_LANG_2 "x-i-UEFI"
+
+typedef struct _EFI_HII_STRING_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT32 HdrSize;
+ UINT32 StringInfoOffset;
+ CHAR16 LanguageWindow[16];
+ EFI_STRING_ID LanguageName;
+ CHAR8 Language[1];
+} EFI_HII_STRING_PACKAGE_HDR;
+
+typedef struct {
+ UINT8 BlockType;
+} EFI_HII_STRING_BLOCK;
+
+#define EFI_HII_SIBT_END 0x00
+#define EFI_HII_SIBT_STRING_SCSU 0x10
+#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
+#define EFI_HII_SIBT_STRINGS_SCSU 0x12
+#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
+#define EFI_HII_SIBT_STRING_UCS2 0x14
+#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
+#define EFI_HII_SIBT_STRINGS_UCS2 0x16
+#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
+#define EFI_HII_SIBT_DUPLICATE 0x20
+#define EFI_HII_SIBT_SKIP2 0x21
+#define EFI_HII_SIBT_SKIP1 0x22
+#define EFI_HII_SIBT_EXT1 0x30
+#define EFI_HII_SIBT_EXT2 0x31
+#define EFI_HII_SIBT_EXT4 0x32
+#define EFI_HII_SIBT_FONT 0x40
+
+typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ EFI_STRING_ID StringId;
+} EFI_HII_SIBT_DUPLICATE_BLOCK;
+
+typedef struct _EFI_HII_SIBT_END_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+} EFI_HII_SIBT_END_BLOCK;
+
+typedef struct _EFI_HII_SIBT_EXT1_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 BlockType2;
+ UINT8 Length;
+} EFI_HII_SIBT_EXT1_BLOCK;
+
+typedef struct _EFI_HII_SIBT_EXT2_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 BlockType2;
+ UINT16 Length;
+} EFI_HII_SIBT_EXT2_BLOCK;
+
+typedef struct _EFI_HII_SIBT_EXT4_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 BlockType2;
+ UINT32 Length;
+} EFI_HII_SIBT_EXT4_BLOCK;
+
+typedef struct _EFI_HII_SIBT_FONT_BLOCK {
+ EFI_HII_SIBT_EXT2_BLOCK Header;
+ UINT8 FontId;
+ UINT16 FontSize;
+ EFI_HII_FONT_STYLE FontStyle;
+ CHAR16 FontName[1];
+} EFI_HII_SIBT_FONT_BLOCK;
+
+typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 SkipCount;
+} EFI_HII_SIBT_SKIP1_BLOCK;
+
+typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT16 SkipCount;
+} EFI_HII_SIBT_SKIP2_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 StringText[1];
+} EFI_HII_SIBT_STRING_SCSU_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 FontIdentifier;
+ UINT8 StringText[1];
+} EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT16 StringCount;
+ UINT8 StringText[1];
+} EFI_HII_SIBT_STRINGS_SCSU_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 FontIdentifier;
+ UINT16 StringCount;
+ UINT8 StringText[1];
+} EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ CHAR16 StringText[1];
+} EFI_HII_SIBT_STRING_UCS2_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 FontIdentifier;
+ CHAR16 StringText[1];
+} EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT16 StringCount;
+ CHAR16 StringText[1];
+} EFI_HII_SIBT_STRINGS_UCS2_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 FontIdentifier;
+ UINT16 StringCount;
+ CHAR16 StringText[1];
+} EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;
+
+//
+// Image Packages
+//
+
+typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT32 ImageInfoOffset;
+ UINT32 PaletteInfoOffset;
+} EFI_HII_IMAGE_PACKAGE_HDR;
+
+typedef struct _EFI_HII_IMAGE_BLOCK {
+ UINT8 BlockType;
+} EFI_HII_IMAGE_BLOCK;
+
+#define EFI_HII_IIBT_END 0x00
+#define EFI_HII_IIBT_IMAGE_1BIT 0x10
+#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
+#define EFI_HII_IIBT_IMAGE_4BIT 0x12
+#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
+#define EFI_HII_IIBT_IMAGE_8BIT 0x14
+#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
+#define EFI_HII_IIBT_IMAGE_24BIT 0x16
+#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
+#define EFI_HII_IIBT_IMAGE_JPEG 0x18
+#define EFI_HII_IIBT_DUPLICATE 0x20
+#define EFI_HII_IIBT_SKIP2 0x21
+#define EFI_HII_IIBT_SKIP1 0x22
+#define EFI_HII_IIBT_EXT1 0x30
+#define EFI_HII_IIBT_EXT2 0x31
+#define EFI_HII_IIBT_EXT4 0x32
+
+typedef struct _EFI_HII_IIBT_END_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+} EFI_HII_IIBT_END_BLOCK;
+
+typedef struct _EFI_HII_IIBT_EXT1_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 BlockType2;
+ UINT8 Length;
+} EFI_HII_IIBT_EXT1_BLOCK;
+
+typedef struct _EFI_HII_IIBT_EXT2_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 BlockType2;
+ UINT16 Length;
+} EFI_HII_IIBT_EXT2_BLOCK;
+
+typedef struct _EFI_HII_IIBT_EXT4_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 BlockType2;
+ UINT32 Length;
+} EFI_HII_IIBT_EXT4_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {
+ UINT16 Width;
+ UINT16 Height;
+ UINT8 Data[1];
+} EFI_HII_IIBT_IMAGE_1BIT_BASE;
+
+typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_1BIT_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;
+
+typedef struct _EFI_HII_RGB_PIXEL {
+ UINT8 b;
+ UINT8 g;
+ UINT8 r;
+} EFI_HII_RGB_PIXEL;
+
+typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {
+ UINT16 Width;
+ UINT16 Height;
+ EFI_HII_RGB_PIXEL Bitmap[1];
+} EFI_HII_IIBT_IMAGE_24BIT_BASE;
+
+typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_24BIT_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {
+ UINT16 Width;
+ UINT16 Height;
+ UINT8 Data[1];
+} EFI_HII_IIBT_IMAGE_4BIT_BASE;
+
+typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_4BIT_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {
+ UINT16 Width;
+ UINT16 Height;
+ UINT8 Data[1];
+} EFI_HII_IIBT_IMAGE_8BIT_BASE;
+
+typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_8BIT_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK;
+
+typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ EFI_IMAGE_ID ImageId;
+} EFI_HII_IIBT_DUPLICATE_BLOCK;
+
+typedef struct _EFI_HII_IIBT_JPEG_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT32 Size;
+ UINT8 Data[1];
+} EFI_HII_IIBT_JPEG_BLOCK;
+
+typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 SkipCount;
+} EFI_HII_IIBT_SKIP1_BLOCK;
+
+typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT16 SkipCount;
+} EFI_HII_IIBT_SKIP2_BLOCK;
+
+typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
+ UINT16 PaletteCount;
+} EFI_HII_IMAGE_PALETTE_INFO_HEADER;
+
+typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
+ UINT16 PaletteSize;
+ EFI_HII_RGB_PIXEL PaletteValue[1];
+} EFI_HII_IMAGE_PALETTE_INFO;
+
+//
+// Forms Package
+//
+
+typedef struct _EFI_HII_FORM_PACKAGE {
+ EFI_HII_PACKAGE_HEADER Header;
+ // EFI_IFR_OP_HEADER OpCodeHeader;
+ // More op-codes follow
+} EFI_HII_FORM_PACKAGE;
+
+typedef struct {
+ UINT8 Hour;
+ UINT8 Minute;
+ UINT8 Second;
+} EFI_HII_TIME;
+
+typedef struct {
+ UINT16 Year;
+ UINT8 Month;
+ UINT8 Day;
+} EFI_HII_DATE;
+
+typedef union {
+ UINT8 u8;
+ UINT16 u16;
+ UINT32 u32;
+ UINT64 u64;
+ BOOLEAN b;
+ EFI_HII_TIME time;
+ EFI_HII_DATE date;
+ EFI_STRING_ID string;
+} EFI_IFR_TYPE_VALUE;
+
+#define EFI_IFR_FORM_OP 0x01
+#define EFI_IFR_SUBTITLE_OP 0x02
+#define EFI_IFR_TEXT_OP 0x03
+#define EFI_IFR_IMAGE_OP 0x04
+#define EFI_IFR_ONE_OF_OP 0x05
+#define EFI_IFR_CHECKBOX_OP 0x06
+#define EFI_IFR_NUMERIC_OP 0x07
+#define EFI_IFR_PASSWORD_OP 0x08
+#define EFI_IFR_ONE_OF_OPTION_OP 0x09
+#define EFI_IFR_SUPPRESS_IF_OP 0x0A
+#define EFI_IFR_LOCKED_OP 0x0B
+#define EFI_IFR_ACTION_OP 0x0C
+#define EFI_IFR_RESET_BUTTON_OP 0x0D
+#define EFI_IFR_FORM_SET_OP 0x0E
+#define EFI_IFR_REF_OP 0x0F
+#define EFI_IFR_NO_SUBMIT_IF_OP 0x10
+#define EFI_IFR_INCONSISTENT_IF_OP 0x11
+#define EFI_IFR_EQ_ID_VAL_OP 0x12
+#define EFI_IFR_EQ_ID_ID_OP 0x13
+#define EFI_IFR_EQ_ID_LIST_OP 0x14
+#define EFI_IFR_AND_OP 0x15
+#define EFI_IFR_OR_OP 0x16
+#define EFI_IFR_NOT_OP 0x17
+#define EFI_IFR_RULE_OP 0x18
+#define EFI_IFR_GRAY_OUT_IF_OP 0x19
+#define EFI_IFR_DATE_OP 0x1A
+#define EFI_IFR_TIME_OP 0x1B
+#define EFI_IFR_STRING_OP 0x1C
+#define EFI_IFR_REFRESH_OP 0x1D
+#define EFI_IFR_DISABLE_IF_OP 0x1E
+#define EFI_IFR_TO_LOWER_OP 0x20
+#define EFI_IFR_TO_UPPER_OP 0x21
+#define EFI_IFR_ORDERED_LIST_OP 0x23
+#define EFI_IFR_VARSTORE_OP 0x24
+#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
+#define EFI_IFR_VARSTORE_EFI_OP 0x26
+#define EFI_IFR_VARSTORE_DEVICE_OP 0x27
+#define EFI_IFR_VERSION_OP 0x28
+#define EFI_IFR_END_OP 0x29
+#define EFI_IFR_MATCH_OP 0x2A
+#define EFI_IFR_EQUAL_OP 0x2F
+#define EFI_IFR_NOT_EQUAL_OP 0x30
+#define EFI_IFR_GREATER_THAN_OP 0x31
+#define EFI_IFR_GREATER_EQUAL_OP 0x32
+#define EFI_IFR_LESS_THAN_OP 0x33
+#define EFI_IFR_LESS_EQUAL_OP 0x34
+#define EFI_IFR_BITWISE_AND_OP 0x35
+#define EFI_IFR_BITWISE_OR_OP 0x36
+#define EFI_IFR_BITWISE_NOT_OP 0x37
+#define EFI_IFR_SHIFT_LEFT_OP 0x38
+#define EFI_IFR_SHIFT_RIGHT_OP 0x39
+#define EFI_IFR_ADD_OP 0x3A
+#define EFI_IFR_SUBTRACT_OP 0x3B
+#define EFI_IFR_MULTIPLY_OP 0x3C
+#define EFI_IFR_DIVIDE_OP 0x3D
+#define EFI_IFR_MODULO_OP 0x3E
+#define EFI_IFR_RULE_REF_OP 0x3F
+#define EFI_IFR_QUESTION_REF1_OP 0x40
+#define EFI_IFR_QUESTION_REF2_OP 0x41
+#define EFI_IFR_UINT8_OP 0x42
+#define EFI_IFR_UINT16_OP 0x43
+#define EFI_IFR_UINT32_OP 0x44
+#define EFI_IFR_UINT64_OP 0x45
+#define EFI_IFR_TRUE_OP 0x46
+#define EFI_IFR_FALSE_OP 0x47
+#define EFI_IFR_TO_UINT_OP 0x48
+#define EFI_IFR_TO_STRING_OP 0x49
+#define EFI_IFR_TO_BOOLEAN_OP 0x4A
+#define EFI_IFR_MID_OP 0x4B
+#define EFI_IFR_FIND_OP 0x4C
+#define EFI_IFR_TOKEN_OP 0x4D
+#define EFI_IFR_STRING_REF1_OP 0x4E
+#define EFI_IFR_STRING_REF2_OP 0x4F
+#define EFI_IFR_CONDITIONAL_OP 0x50
+#define EFI_IFR_QUESTION_REF3_OP 0x51
+#define EFI_IFR_ZERO_OP 0x52
+#define EFI_IFR_ONE_OP 0x53
+#define EFI_IFR_ONES_OP 0x54
+#define EFI_IFR_UNDEFINED_OP 0x55
+#define EFI_IFR_LENGTH_OP 0x56
+#define EFI_IFR_DUP_OP 0x57
+#define EFI_IFR_THIS_OP 0x58
+#define EFI_IFR_SPAN_OP 0x59
+#define EFI_IFR_VALUE_OP 0x5A
+#define EFI_IFR_DEFAULT_OP 0x5B
+#define EFI_IFR_DEFAULTSTORE_OP 0x5C
+#define EFI_IFR_CATENATE_OP 0x5E
+#define EFI_IFR_GUID_OP 0x5F
+
+typedef struct _EFI_IFR_OP_HEADER {
+ UINT8 OpCode;
+ UINT8 Length:7;
+ UINT8 Scope:1;
+} EFI_IFR_OP_HEADER;
+
+typedef struct _EFI_IFR_STATEMENT_HEADER {
+ EFI_STRING_ID Prompt;
+ EFI_STRING_ID Help;
+} EFI_IFR_STATEMENT_HEADER;
+
+typedef struct _EFI_IFR_QUESTION_HEADER {
+ EFI_IFR_STATEMENT_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+ EFI_VARSTORE_ID VarStoreId;
+ union {
+ EFI_STRING_ID VarName;
+ UINT16 VarOffset;
+ } VarStoreInfo;
+ UINT8 Flags;
+} EFI_IFR_QUESTION_HEADER;
+
+#define EFI_IFR_FLAG_READ_ONLY 0x01
+#define EFI_IFR_FLAG_CALLBACK 0x04
+#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
+#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
+
+typedef struct _EFI_IFR_DEFAULTSTORE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DefaultName;
+ UINT16 DefaultId;
+} EFI_IFR_DEFAULTSTORE;
+
+#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
+#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
+#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
+#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
+#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
+#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
+#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
+#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
+#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
+
+typedef struct _EFI_IFR_VARSTORE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ EFI_VARSTORE_ID VarStoreId;
+ UINT16 Size;
+ UINT8 Name[1];
+} EFI_IFR_VARSTORE;
+
+typedef struct _EFI_IFR_VARSTORE_EFI {
+ EFI_IFR_OP_HEADER Header;
+ EFI_VARSTORE_ID VarStoreId;
+ EFI_GUID Guid;
+ UINT32 Attributes;
+} EFI_IFR_VARSTORE_EFI;
+
+typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_VARSTORE_ID VarStoreId;
+ EFI_GUID Guid;
+} EFI_IFR_VARSTORE_NAME_VALUE;
+
+typedef struct _EFI_IFR_FORM_SET {
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ EFI_STRING_ID FormSetTitle;
+ EFI_STRING_ID Help;
+ UINT8 Flags;
+ EFI_GUID ClassGuid[1];
+} EFI_IFR_FORM_SET;
+
+#define EFI_HII_PLATFORM_SETUP_FORMSET_GUID \
+ { 0x93039971, 0x8545, 0x4b04, { 0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x4, 0xe } }
+
+typedef struct _EFI_IFR_END {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_END;
+
+typedef struct _EFI_IFR_FORM {
+ EFI_IFR_OP_HEADER Header;
+ UINT16 FormId;
+ EFI_STRING_ID FormTitle;
+} EFI_IFR_FORM;
+
+typedef struct _EFI_IFR_IMAGE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IMAGE_ID Id;
+} EFI_IFR_IMAGE;
+
+typedef struct _EFI_IFR_LOCKED {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_LOCKED;
+
+typedef struct _EFI_IFR_RULE {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 RuleId;
+} EFI_IFR_RULE;
+
+typedef struct _EFI_IFR_DEFAULT {
+ EFI_IFR_OP_HEADER Header;
+ UINT16 DefaultId;
+ UINT8 Type;
+ EFI_IFR_TYPE_VALUE Value;
+} EFI_IFR_DEFAULT;
+
+typedef struct _EFI_IFR_VALUE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_VALUE;
+
+typedef struct _EFI_IFR_SUBTITLE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_STATEMENT_HEADER Statement;
+ UINT8 Flags;
+} EFI_IFR_SUBTITLE;
+
+#define EFI_IFR_FLAGS_HORIZONTAL 0x01
+
+typedef struct _EFI_IFR_CHECKBOX {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+} EFI_IFR_CHECKBOX;
+
+#define EFI_IFR_CHECKBOX_DEFAULT 0x01
+#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
+
+typedef struct _EFI_IFR_TEXT {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_STATEMENT_HEADER Statement;
+ EFI_STRING_ID TextTwo;
+} EFI_IFR_TEXT;
+
+typedef struct _EFI_IFR_REF {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+} EFI_IFR_REF;
+
+typedef struct _EFI_IFR_REF2 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+ EFI_QUESTION_ID QuestionId;
+} EFI_IFR_REF2;
+
+typedef struct _EFI_IFR_REF3 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+ EFI_QUESTION_ID QuestionId;
+ EFI_GUID FormSetId;
+} EFI_IFR_REF3;
+
+typedef struct _EFI_IFR_REF4 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+ EFI_QUESTION_ID QuestionId;
+ EFI_GUID FormSetId;
+ EFI_STRING_ID DevicePath;
+} EFI_IFR_REF4;
+
+typedef struct _EFI_IFR_RESET_BUTTON {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_STATEMENT_HEADER Statement;
+ EFI_DEFAULT_ID DefaultId;
+} EFI_IFR_RESET_BUTTON;
+
+typedef struct _EFI_IFR_ACTION {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_STRING_ID QuestionConfig;
+} EFI_IFR_ACTION;
+
+typedef struct _EFI_IFR_ACTION_1 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+} EFI_IFR_ACTION_1;
+
+typedef struct _EFI_IFR_DATE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+} EFI_IFR_DATE;
+
+#define EFI_QF_DATE_YEAR_SUPPRESS 0x01
+#define EFI_QF_DATE_MONTH_SUPPRESS 0x02
+#define EFI_QF_DATE_DAY_SUPPRESS 0x04
+
+#define EFI_QF_DATE_STORAGE 0x30
+#define QF_DATE_STORAGE_NORMAL 0x00
+#define QF_DATE_STORAGE_TIME 0x10
+#define QF_DATE_STORAGE_WAKEUP 0x20
+
+typedef union {
+ struct {
+ UINT8 MinValue;
+ UINT8 MaxValue;
+ UINT8 Step;
+ } u8;
+ struct {
+ UINT16 MinValue;
+ UINT16 MaxValue;
+ UINT16 Step;
+ } u16;
+ struct {
+ UINT32 MinValue;
+ UINT32 MaxValue;
+ UINT32 Step;
+ } u32;
+ struct {
+ UINT64 MinValue;
+ UINT64 MaxValue;
+ UINT64 Step;
+ } u64;
+} MINMAXSTEP_DATA;
+
+typedef struct _EFI_IFR_NUMERIC {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+ MINMAXSTEP_DATA data;
+} EFI_IFR_NUMERIC;
+
+#define EFI_IFR_NUMERIC_SIZE 0x03
+#define EFI_IFR_NUMERIC_SIZE_1 0x00
+#define EFI_IFR_NUMERIC_SIZE_2 0x01
+#define EFI_IFR_NUMERIC_SIZE_4 0x02
+#define EFI_IFR_NUMERIC_SIZE_8 0x03
+
+#define EFI_IFR_DISPLAY 0x30
+#define EFI_IFR_DISPLAY_INT_DEC 0x00
+#define EFI_IFR_DISPLAY_UINT_DEC 0x10
+#define EFI_IFR_DISPLAY_UINT_HEX 0x20
+
+typedef struct _EFI_IFR_ONE_OF {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+ MINMAXSTEP_DATA data;
+} EFI_IFR_ONE_OF;
+
+typedef struct _EFI_IFR_STRING {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 MinSize;
+ UINT8 MaxSize;
+ UINT8 Flags;
+} EFI_IFR_STRING;
+
+#define EFI_IFR_STRING_MULTI_LINE 0x01
+
+typedef struct _EFI_IFR_PASSWORD {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT16 MinSize;
+ UINT16 MaxSize;
+} EFI_IFR_PASSWORD;
+
+typedef struct _EFI_IFR_ORDERED_LIST {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 MaxContainers;
+ UINT8 Flags;
+} EFI_IFR_ORDERED_LIST;
+
+#define EFI_IFR_UNIQUE_SET 0x01
+#define EFI_IFR_NO_EMPTY_SET 0x02
+
+typedef struct _EFI_IFR_TIME {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+} EFI_IFR_TIME;
+
+#define QF_TIME_HOUR_SUPPRESS 0x01
+#define QF_TIME_MINUTE_SUPPRESS 0x02
+#define QF_TIME_SECOND_SUPPRESS 0x04
+
+#define QF_TIME_STORAGE 0x30
+#define QF_TIME_STORAGE_NORMAL 0x00
+#define QF_TIME_STORAGE_TIME 0x10
+#define QF_TIME_STORAGE_WAKEUP 0x20
+
+typedef struct _EFI_IFR_DISABLE_IF {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_DISABLE_IF;
+
+typedef struct _EFI_IFR_SUPPRESS_IF {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_SUPPRESS_IF;
+
+typedef struct _EFI_IFR_GRAY_OUT_IF {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_GRAY_OUT_IF;
+
+typedef struct _EFI_IFR_INCONSISTENT_IF {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Error;
+} EFI_IFR_INCONSISTENT_IF;
+
+typedef struct _EFI_IFR_NO_SUBMIT_IF {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Error;
+} EFI_IFR_NO_SUBMIT_IF;
+
+typedef struct _EFI_IFR_REFRESH {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 RefreshInterval;
+} EFI_IFR_REFRESH;
+
+typedef struct _EFI_IFR_VARSTORE_DEVICE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DevicePath;
+} EFI_IFR_VARSTORE_DEVICE;
+
+typedef struct _EFI_IFR_ONE_OF_OPTION {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Option;
+ UINT8 Flags;
+ UINT8 Type;
+ EFI_IFR_TYPE_VALUE Value;
+} EFI_IFR_ONE_OF_OPTION;
+
+#define EFI_IFR_TYPE_NUM_SIZE_8 0x00
+#define EFI_IFR_TYPE_NUM_SIZE_16 0x01
+#define EFI_IFR_TYPE_NUM_SIZE_32 0x02
+#define EFI_IFR_TYPE_NUM_SIZE_64 0x03
+#define EFI_IFR_TYPE_BOOLEAN 0x04
+#define EFI_IFR_TYPE_TIME 0x05
+#define EFI_IFR_TYPE_DATE 0x06
+#define EFI_IFR_TYPE_STRING 0x07
+#define EFI_IFR_TYPE_OTHER 0x08
+
+#define EFI_IFR_OPTION_DEFAULT 0x10
+#define EFI_IFR_OPTION_DEFAULT_MFG 0x20
+
+typedef struct _EFI_IFR_GUID {
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ //Optional Data Follows
+} EFI_IFR_GUID;
+
+typedef struct _EFI_IFR_DUP {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_DUP;
+
+typedef struct _EFI_IFR_EQ_ID_ID {
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId1;
+ EFI_QUESTION_ID QuestionId2;
+} EFI_IFR_EQ_ID_ID;
+
+typedef struct _EFI_IFR_EQ_ID_VAL {
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+ UINT16 Value;
+} EFI_IFR_EQ_ID_VAL;
+
+typedef struct _EFI_IFR_EQ_ID_LIST {
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+ UINT16 ListLength;
+ UINT16 ValueList[1];
+} EFI_IFR_EQ_ID_LIST;
+
+typedef struct _EFI_IFR_QUESTION_REF1 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+} EFI_IFR_QUESTION_REF1;
+
+typedef struct _EFI_IFR_UINT8 {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Value;
+} EFI_IFR_UINT8;
+
+typedef struct _EFI_IFR_UINT16 {
+ EFI_IFR_OP_HEADER Header;
+ UINT16 Value;
+} EFI_IFR_UINT16;
+
+typedef struct _EFI_IFR_QUESTION_REF2 {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_QUESTION_REF2;
+
+typedef struct _EFI_IFR_UINT32 {
+ EFI_IFR_OP_HEADER Header;
+ UINT32 Value;
+} EFI_IFR_UINT32;
+
+typedef struct _EFI_IFR_UINT64 {
+ EFI_IFR_OP_HEADER Header;
+ UINT64 Value;
+} EFI_IFR_UINT64;
+
+typedef struct _EFI_IFR_QUESTION_REF3 {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_QUESTION_REF3;
+
+typedef struct _EFI_IFR_QUESTION_REF3_2 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DevicePath;
+} EFI_IFR_QUESTION_REF3_2;
+
+typedef struct _EFI_IFR_QUESTION_REF3_3 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DevicePath;
+ EFI_GUID Guid;
+} EFI_IFR_QUESTION_REF3_3;
+
+typedef struct _EFI_IFR_RULE_REF {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 RuleId;
+} EFI_IFR_RULE_REF;
+
+typedef struct _EFI_IFR_STRING_REF1 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID StringId;
+} EFI_IFR_STRING_REF1;
+
+typedef struct _EFI_IFR_STRING_REF2 {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_STRING_REF2;
+
+typedef struct _EFI_IFR_THIS {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_THIS;
+
+typedef struct _EFI_IFR_TRUE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TRUE;
+
+typedef struct _EFI_IFR_FALSE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_FALSE;
+
+typedef struct _EFI_IFR_ONE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_ONE;
+
+typedef struct _EFI_IFR_ONES {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_ONES;
+
+typedef struct _EFI_IFR_ZERO {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_ZERO;
+
+typedef struct _EFI_IFR_UNDEFINED {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_UNDEFINED;
+
+typedef struct _EFI_IFR_VERSION {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_VERSION;
+
+typedef struct _EFI_IFR_LENGTH {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_LENGTH;
+
+typedef struct _EFI_IFR_NOT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_NOT;
+
+typedef struct _EFI_IFR_BITWISE_NOT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_BITWISE_NOT;
+
+typedef struct _EFI_IFR_TO_BOOLEAN {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TO_BOOLEAN;
+
+#define EFI_IFR_STRING_UNSIGNED_DEC 0
+#define EFI_IFR_STRING_SIGNED_DEC 1
+#define EFI_IFR_STRING_LOWERCASE_HEX 2
+#define EFI_IFR_STRING_UPPERCASE_HEX 3
+
+#define EFI_IFR_STRING_ASCII 0
+#define EFI_IFR_STRING_UNICODE 8
+
+typedef struct _EFI_IFR_TO_STRING {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Format;
+} EFI_IFR_TO_STRING;
+
+typedef struct _EFI_IFR_TO_UINT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TO_UINT;
+
+typedef struct _EFI_IFR_TO_UPPER {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TO_UPPER;
+
+typedef struct _EFI_IFR_TO_LOWER {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TO_LOWER;
+
+typedef struct _EFI_IFR_ADD {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_ADD;
+
+typedef struct _EFI_IFR_AND {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_AND;
+
+typedef struct _EFI_IFR_BITWISE_AND {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_BITWISE_AND;
+
+typedef struct _EFI_IFR_BITWISE_OR {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_BITWISE_OR;
+
+typedef struct _EFI_IFR_CATENATE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_CATENATE;
+
+typedef struct _EFI_IFR_DIVIDE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_DIVIDE;
+
+typedef struct _EFI_IFR_EQUAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_EQUAL;
+
+typedef struct _EFI_IFR_GREATER_EQUAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_GREATER_EQUAL;
+
+typedef struct _EFI_IFR_GREATER_THAN {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_GREATER_THAN;
+
+typedef struct _EFI_IFR_LESS_EQUAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_LESS_EQUAL;
+
+typedef struct _EFI_IFR_LESS_THAN {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_LESS_THAN;
+
+typedef struct _EFI_IFR_MATCH {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MATCH;
+
+typedef struct _EFI_IFR_MULTIPLY {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MULTIPLY;
+
+typedef struct _EFI_IFR_MODULO {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MODULO;
+
+typedef struct _EFI_IFR_NOT_EQUAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_NOT_EQUAL;
+
+typedef struct _EFI_IFR_OR {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_OR;
+
+typedef struct _EFI_IFR_SHIFT_LEFT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_SHIFT_LEFT;
+
+typedef struct _EFI_IFR_SHIFT_RIGHT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_SHIFT_RIGHT;
+
+typedef struct _EFI_IFR_SUBTRACT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_SUBTRACT;
+
+typedef struct _EFI_IFR_CONDITIONAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_CONDITIONAL;
+
+#define EFI_IFR_FF_CASE_SENSITIVE 0x00
+#define EFI_IFR_FF_CASE_INSENSITIVE 0x01
+
+typedef struct _EFI_IFR_FIND {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Format;
+} EFI_IFR_FIND;
+
+typedef struct _EFI_IFR_MID {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MID;
+
+typedef struct _EFI_IFR_TOKEN {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TOKEN;
+
+#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
+#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
+
+typedef struct _EFI_IFR_SPAN {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Flags;
+} EFI_IFR_SPAN;
+
+//
+// Keyboard Package
+//
+
+typedef enum {
+ EfiKeyLCtrl,
+ EfiKeyA0,
+ EfiKeyLAlt,
+ EfiKeySpaceBar,
+ EfiKeyA2,
+ EfiKeyA3,
+ EfiKeyA4,
+ EfiKeyRCtrl,
+ EfiKeyLeftArrow,
+ EfiKeyDownArrow,
+ EfiKeyRightArrow,
+ EfiKeyZero,
+ EfiKeyPeriod,
+ EfiKeyEnter,
+ EfiKeyLShift,
+ EfiKeyB0,
+ EfiKeyB1,
+ EfiKeyB2,
+ EfiKeyB3,
+ EfiKeyB4,
+ EfiKeyB5,
+ EfiKeyB6,
+ EfiKeyB7,
+ EfiKeyB8,
+ EfiKeyB9,
+ EfiKeyB10,
+ EfiKeyRShift,
+ EfiKeyUpArrow,
+ EfiKeyOne,
+ EfiKeyTwo,
+ EfiKeyThree,
+ EfiKeyCapsLock,
+ EfiKeyC1,
+ EfiKeyC2,
+ EfiKeyC3,
+ EfiKeyC4,
+ EfiKeyC5,
+ EfiKeyC6,
+ EfiKeyC7,
+ EfiKeyC8,
+ EfiKeyC9,
+ EfiKeyC10,
+ EfiKeyC11,
+ EfiKeyC12,
+ EfiKeyFour,
+ EfiKeyFive,
+ EfiKeySix,
+ EfiKeyPlus,
+ EfiKeyTab,
+ EfiKeyD1,
+ EfiKeyD2,
+ EfiKeyD3,
+ EfiKeyD4,
+ EfiKeyD5,
+ EfiKeyD6,
+ EfiKeyD7,
+ EfiKeyD8,
+ EfiKeyD9,
+ EfiKeyD10,
+ EfiKeyD11,
+ EfiKeyD12,
+ EfiKeyD13,
+ EfiKeyDel,
+ EfiKeyEnd,
+ EfiKeyPgDn,
+ EfiKeySeven,
+ EfiKeyEight,
+ EfiKeyNine,
+ EfiKeyE0,
+ EfiKeyE1,
+ EfiKeyE2,
+ EfiKeyE3,
+ EfiKeyE4,
+ EfiKeyE5,
+ EfiKeyE6,
+ EfiKeyE7,
+ EfiKeyE8,
+ EfiKeyE9,
+ EfiKeyE10,
+ EfiKeyE11,
+ EfiKeyE12,
+ EfiKeyBackSpace,
+ EfiKeyIns,
+ EfiKeyHome,
+ EfiKeyPgUp,
+ EfiKeyNLck,
+ EfiKeySlash,
+ EfiKeyAsterisk,
+ EfiKeyMinus,
+ EfiKeyEsc,
+ EfiKeyF1,
+ EfiKeyF2,
+ EfiKeyF3,
+ EfiKeyF4,
+ EfiKeyF5,
+ EfiKeyF6,
+ EfiKeyF7,
+ EfiKeyF8,
+ EfiKeyF9,
+ EfiKeyF10,
+ EfiKeyF11,
+ EfiKeyF12,
+ EfiKeyPrint,
+ EfiKeySLck,
+ EfiKeyPause
+} EFI_KEY;
+
+typedef struct {
+ EFI_KEY Key;
+ CHAR16 Unicode;
+ CHAR16 ShiftedUnicode;
+ CHAR16 AltGrUnicode;
+ CHAR16 ShiftedAltGrUnicode;
+ UINT16 Modifier;
+ UINT16 AffectedAttribute;
+} EFI_KEY_DESCRIPTOR;
+
+//
+// A key which is affected by all the standard shift modifiers.
+// Most keys would be expected to have this bit active.
+//
+#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
+//
+// This key is affected by the caps lock so that if a keyboard driver
+// would need to disambiguate between a key which had a "1" defined
+// versus a "a" character. Having this bit turned on would tell
+// the keyboard driver to use the appropriate shifted state or not.
+//
+#define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
+//
+// Similar to the case of CAPS lock, if this bit is active, the key
+// is affected by the num lock being turned on.
+//
+#define EFI_AFFECTED_BY_NUM_LOCK 0x0004
+
+typedef struct {
+ UINT16 LayoutLength;
+ EFI_GUID Guid;
+ UINT32 LayoutDescriptorStringOffset;
+ UINT8 DescriptorCount;
+ // EFI_KEY_DESCRIPTOR Descriptors[];
+} EFI_HII_KEYBOARD_LAYOUT;
+
+typedef struct {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT16 LayoutCount;
+ // EFI_HII_KEYBOARD_LAYOUT Layout[];
+} EFI_HII_KEYBOARD_PACKAGE_HDR;
+
+//typedef struct {
+// CHAR16 Language[]; // RFC4646 Language Code
+// CHAR16 Space;
+// CHAR16 DescriptionString[];
+//} EFI_DESCRIPTION_STRING;
+
+//typedef struct {
+// UINT16 DescriptionCount;
+// EFI_DESCRIPTION_STRING DescriptionString[];
+//} EFI_DESCRIPTION_STRING_BUNDLE;
+
+//
+// Modifier values
+//
+#define EFI_NULL_MODIFIER 0x0000
+#define EFI_LEFT_CONTROL_MODIFIER 0x0001
+#define EFI_RIGHT_CONTROL_MODIFIER 0x0002
+#define EFI_LEFT_ALT_MODIFIER 0x0003
+#define EFI_RIGHT_ALT_MODIFIER 0x0004
+#define EFI_ALT_GR_MODIFIER 0x0005
+#define EFI_INSERT_MODIFIER 0x0006
+#define EFI_DELETE_MODIFIER 0x0007
+#define EFI_PAGE_DOWN_MODIFIER 0x0008
+#define EFI_PAGE_UP_MODIFIER 0x0009
+#define EFI_HOME_MODIFIER 0x000A
+#define EFI_END_MODIFIER 0x000B
+#define EFI_LEFT_SHIFT_MODIFIER 0x000C
+#define EFI_RIGHT_SHIFT_MODIFIER 0x000D
+#define EFI_CAPS_LOCK_MODIFIER 0x000E
+#define EFI_NUM_LOCK_MODIFIER 0x000F
+#define EFI_LEFT_ARROW_MODIFIER 0x0010
+#define EFI_RIGHT_ARROW_MODIFIER 0x0011
+#define EFI_DOWN_ARROW_MODIFIER 0x0012
+#define EFI_UP_ARROW_MODIFIER 0x0013
+#define EFI_NS_KEY_MODIFIER 0x0014
+#define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
+#define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
+#define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
+#define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
+#define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
+#define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
+#define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
+#define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
+#define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
+#define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
+#define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
+#define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
+#define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
+
+//
+// Keys that have multiple control functions based on modifier
+// settings are handled in the keyboard driver implementation.
+// For instance PRINT_KEY might have a modifier held down and
+// is still a nonprinting character, but might have an alternate
+// control function like SYSREQUEST
+//
+#define EFI_PRINT_MODIFIER 0x0022
+#define EFI_SYS_REQUEST_MODIFIER 0x0023
+#define EFI_SCROLL_LOCK_MODIFIER 0x0024
+#define EFI_PAUSE_MODIFIER 0x0025
+#define EFI_BREAK_MODIFIER 0x0026
+
+#define EFI_LEFT_LOGO_MODIFIER 0x0027
+#define EFI_RIGHT_LOGO_MODIFIER 0x0028
+#define EFI_MENU_MODIFIER 0x0029
+
+#pragma pack()
+
+#endif
diff --git a/EDK/Foundation/Efi/Include/EfiImage.h b/EDK/Foundation/Efi/Include/EfiImage.h
new file mode 100644
index 0000000..0d1f579
--- /dev/null
+++ b/EDK/Foundation/Efi/Include/EfiImage.h
@@ -0,0 +1,703 @@
+/*++
+
+Copyright (c) 2004 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EfiImage.h
+
+Abstract:
+
+ EFI image format for PE32+. Please note some data structures are different
+ for IA-32 and Itanium-based images, look for UINTN and the #ifdef EFI_IA64
+
+ BugBug: Fix text - doc as defined in MSFT EFI specification
+
+--*/
+
+#ifndef _EFI_IMAGE_H_
+#define _EFI_IMAGE_H_
+
+//
+// PE32+ Subsystem type for EFI images
+//
+#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION 10
+#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
+#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
+
+//
+// BugBug: Need to get a real answer for this problem. This is not in the
+// PE specification.
+//
+// A SAL runtime driver does not get fixed up when a transition to
+// virtual mode is made. In all other cases it should be treated
+// like a EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER image
+//
+#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13
+
+//
+// PE32+ Machine type for EFI images
+//
+#define EFI_IMAGE_MACHINE_IA32 0x014c
+#define EFI_IMAGE_MACHINE_IA64 0x0200
+#define EFI_IMAGE_MACHINE_X64 0x8664
+//
+// #define EFI_IMAGE_MACHINE_FCODE 0xfc0d
+//
+#define EFI_IMAGE_MACHINE_EBC 0x0EBC
+
+#define EFI_IMAGE_DOS_SIGNATURE 0x5A4D // MZ
+#define EFI_IMAGE_OS2_SIGNATURE 0x454E // NE
+#define EFI_IMAGE_OS2_SIGNATURE_LE 0x454C // LE
+#define EFI_IMAGE_NT_SIGNATURE 0x00004550 // PE00
+#define EFI_IMAGE_EDOS_SIGNATURE 0x44454550 // PEED
+//
+// PE images can start with an optional DOS header, so if an image is run
+// under DOS it can print an error message.
+//
+typedef struct {
+ UINT16 e_magic; // Magic number
+ UINT16 e_cblp; // Bytes on last page of file
+ UINT16 e_cp; // Pages in file
+ UINT16 e_crlc; // Relocations
+ UINT16 e_cparhdr; // Size of header in paragraphs
+ UINT16 e_minalloc; // Minimum extra paragraphs needed
+ UINT16 e_maxalloc; // Maximum extra paragraphs needed
+ UINT16 e_ss; // Initial (relative) SS value
+ UINT16 e_sp; // Initial SP value
+ UINT16 e_csum; // Checksum
+ UINT16 e_ip; // Initial IP value
+ UINT16 e_cs; // Initial (relative) CS value
+ UINT16 e_lfarlc; // File address of relocation table
+ UINT16 e_ovno; // Overlay number
+ UINT16 e_res[4]; // Reserved words
+ UINT16 e_oemid; // OEM identifier (for e_oeminfo)
+ UINT16 e_oeminfo; // OEM information; e_oemid specific
+ UINT16 e_res2[10]; // Reserved words
+ UINT32 e_lfanew; // File address of new exe header
+} EFI_IMAGE_DOS_HEADER;
+
+//
+// File header format.
+//
+typedef struct {
+ UINT16 Machine;
+ UINT16 NumberOfSections;
+ UINT32 TimeDateStamp;
+ UINT32 PointerToSymbolTable;
+ UINT32 NumberOfSymbols;
+ UINT16 SizeOfOptionalHeader;
+ UINT16 Characteristics;
+} EFI_IMAGE_FILE_HEADER;
+
+#define EFI_IMAGE_SIZEOF_FILE_HEADER 20
+
+#define EFI_IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file.
+#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references).
+#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file.
+#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file.
+#define EFI_IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed.
+#define EFI_IMAGE_FILE_32BIT_MACHINE 0x0100 // 32 bit word machine.
+#define EFI_IMAGE_FILE_DEBUG_STRIPPED 0x0200 // Debugging info stripped from file in .DBG file
+#define EFI_IMAGE_FILE_SYSTEM 0x1000 // System File.
+#define EFI_IMAGE_FILE_DLL 0x2000 // File is a DLL.
+#define EFI_IMAGE_FILE_BYTES_REVERSED_HI 0x8000 // Bytes of machine word are reversed.
+#define EFI_IMAGE_FILE_MACHINE_UNKNOWN 0
+#define EFI_IMAGE_FILE_MACHINE_I386 0x14c // Intel 386.
+#define EFI_IMAGE_FILE_MACHINE_R3000 0x162 // MIPS* little-endian, 0540 big-endian
+#define EFI_IMAGE_FILE_MACHINE_R4000 0x166 // MIPS* little-endian
+#define EFI_IMAGE_FILE_MACHINE_ALPHA 0x184 // Alpha_AXP*
+#define EFI_IMAGE_FILE_MACHINE_POWERPC 0x1F0 // IBM* PowerPC Little-Endian
+#define EFI_IMAGE_FILE_MACHINE_TAHOE 0x7cc // Intel EM machine
+//
+// * Other names and brands may be claimed as the property of others.
+//
+//
+// Directory format.
+//
+typedef struct {
+ UINT32 VirtualAddress;
+ UINT32 Size;
+} EFI_IMAGE_DATA_DIRECTORY;
+
+#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES 16
+
+typedef struct {
+ UINT16 Magic;
+ UINT8 MajorLinkerVersion;
+ UINT8 MinorLinkerVersion;
+ UINT32 SizeOfCode;
+ UINT32 SizeOfInitializedData;
+ UINT32 SizeOfUninitializedData;
+ UINT32 AddressOfEntryPoint;
+ UINT32 BaseOfCode;
+ UINT32 BaseOfData;
+ UINT32 BaseOfBss;
+ UINT32 GprMask;
+ UINT32 CprMask[4];
+ UINT32 GpValue;
+} EFI_IMAGE_ROM_OPTIONAL_HEADER;
+
+#define EFI_IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
+#define EFI_IMAGE_SIZEOF_ROM_OPTIONAL_HEADER sizeof (EFI_IMAGE_ROM_OPTIONAL_HEADER)
+
+typedef struct {
+ EFI_IMAGE_FILE_HEADER FileHeader;
+ EFI_IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
+} EFI_IMAGE_ROM_HEADERS;
+
+//
+// ATTENTION!!! EFI_IMAGE_OPTIONAL_HEADER32 and EFI_IMAGE_OPTIONAL_HEADER64
+// are for use ONLY by tools. All proper EFI code MUST use
+// EFI_IMAGE_OPTIONAL_HEADER ONLY!!!
+//
+#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
+
+typedef struct {
+ //
+ // Standard fields.
+ //
+ UINT16 Magic;
+ UINT8 MajorLinkerVersion;
+ UINT8 MinorLinkerVersion;
+ UINT32 SizeOfCode;
+ UINT32 SizeOfInitializedData;
+ UINT32 SizeOfUninitializedData;
+ UINT32 AddressOfEntryPoint;
+ UINT32 BaseOfCode;
+ UINT32 BaseOfData;
+ //
+ // NT additional fields.
+ //
+ UINT32 ImageBase;
+ UINT32 SectionAlignment;
+ UINT32 FileAlignment;
+ UINT16 MajorOperatingSystemVersion;
+ UINT16 MinorOperatingSystemVersion;
+ UINT16 MajorImageVersion;
+ UINT16 MinorImageVersion;
+ UINT16 MajorSubsystemVersion;
+ UINT16 MinorSubsystemVersion;
+ UINT32 Win32VersionValue;
+ UINT32 SizeOfImage;
+ UINT32 SizeOfHeaders;
+ UINT32 CheckSum;
+ UINT16 Subsystem;
+ UINT16 DllCharacteristics;
+ UINT32 SizeOfStackReserve;
+ UINT32 SizeOfStackCommit;
+ UINT32 SizeOfHeapReserve;
+ UINT32 SizeOfHeapCommit;
+ UINT32 LoaderFlags;
+ UINT32 NumberOfRvaAndSizes;
+ EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
+} EFI_IMAGE_OPTIONAL_HEADER32;
+
+//
+// ATTENTION!!! EFI_IMAGE_OPTIONAL_HEADER32 and EFI_IMAGE_OPTIONAL_HEADER64
+// are for use ONLY by tools. All proper EFI code MUST use
+// EFI_IMAGE_OPTIONAL_HEADER ONLY!!!
+//
+#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
+
+typedef struct {
+ //
+ // Standard fields.
+ //
+ UINT16 Magic;
+ UINT8 MajorLinkerVersion;
+ UINT8 MinorLinkerVersion;
+ UINT32 SizeOfCode;
+ UINT32 SizeOfInitializedData;
+ UINT32 SizeOfUninitializedData;
+ UINT32 AddressOfEntryPoint;
+ UINT32 BaseOfCode;
+ //
+ // NT additional fields.
+ //
+ UINT64 ImageBase;
+ UINT32 SectionAlignment;
+ UINT32 FileAlignment;
+ UINT16 MajorOperatingSystemVersion;
+ UINT16 MinorOperatingSystemVersion;
+ UINT16 MajorImageVersion;
+ UINT16 MinorImageVersion;
+ UINT16 MajorSubsystemVersion;
+ UINT16 MinorSubsystemVersion;
+ UINT32 Win32VersionValue;
+ UINT32 SizeOfImage;
+ UINT32 SizeOfHeaders;
+ UINT32 CheckSum;
+ UINT16 Subsystem;
+ UINT16 DllCharacteristics;
+ UINT64 SizeOfStackReserve;
+ UINT64 SizeOfStackCommit;
+ UINT64 SizeOfHeapReserve;
+ UINT64 SizeOfHeapCommit;
+ UINT32 LoaderFlags;
+ UINT32 NumberOfRvaAndSizes;
+ EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
+} EFI_IMAGE_OPTIONAL_HEADER64;
+
+//
+// ATTENTION!!! EFI_IMAGE_NT_HEADERS32 and EFI_IMAGE_HEADERS64 are for use ONLY
+// by tools. All proper EFI code MUST use EFI_IMAGE_NT_HEADERS ONLY!!!
+//
+typedef struct {
+ UINT32 Signature;
+ EFI_IMAGE_FILE_HEADER FileHeader;
+ EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader;
+} EFI_IMAGE_NT_HEADERS32;
+
+#define EFI_IMAGE_SIZEOF_NT_OPTIONAL32_HEADER sizeof (EFI_IMAGE_NT_HEADERS32)
+
+typedef struct {
+ UINT32 Signature;
+ EFI_IMAGE_FILE_HEADER FileHeader;
+ EFI_IMAGE_OPTIONAL_HEADER64 OptionalHeader;
+} EFI_IMAGE_NT_HEADERS64;
+
+#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER sizeof (EFI_IMAGE_NT_HEADERS64)
+
+//
+// Include processor specific definition of EFI_IMAGE_OPTIONAL_HEADER so the
+// type name EFI_IMAGE_OPTIONAL_HEADER is appropriate to the build. Same for
+// EFI_IMAGE_NT_HEADERS. These definitions MUST be used by ALL EFI code.
+//
+#include "EfiPeOptionalHeader.h"
+
+#define EFI_IMAGE_FIRST_SECTION(ntheader) \
+ ( \
+ (EFI_IMAGE_SECTION_HEADER *) \
+ ( \
+ (UINT32) ntheader + \
+ FIELD_OFFSET (EFI_IMAGE_NT_HEADERS, OptionalHeader) + \
+ ((EFI_IMAGE_NT_HEADERS *) (ntheader))->FileHeader.SizeOfOptionalHeader \
+ ) \
+ )
+
+//
+// Subsystem Values
+//
+#define EFI_IMAGE_SUBSYSTEM_UNKNOWN 0
+#define EFI_IMAGE_SUBSYSTEM_NATIVE 1
+#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI 2
+#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI 3.
+#define EFI_IMAGE_SUBSYSTEM_OS2_CUI 5
+#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI 7
+
+//
+// Directory Entries
+//
+#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT 0
+#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT 1
+#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE 2
+#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
+#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY 4
+#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC 5
+#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG 6
+#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
+#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
+#define EFI_IMAGE_DIRECTORY_ENTRY_TLS 9
+#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
+
+//
+// Section header format.
+//
+#define EFI_IMAGE_SIZEOF_SHORT_NAME 8
+
+typedef struct {
+ UINT8 Name[EFI_IMAGE_SIZEOF_SHORT_NAME];
+ union {
+ UINT32 PhysicalAddress;
+ UINT32 VirtualSize;
+ } Misc;
+ UINT32 VirtualAddress;
+ UINT32 SizeOfRawData;
+ UINT32 PointerToRawData;
+ UINT32 PointerToRelocations;
+ UINT32 PointerToLinenumbers;
+ UINT16 NumberOfRelocations;
+ UINT16 NumberOfLinenumbers;
+ UINT32 Characteristics;
+} EFI_IMAGE_SECTION_HEADER;
+
+#define EFI_IMAGE_SIZEOF_SECTION_HEADER 40
+
+#define EFI_IMAGE_SCN_TYPE_NO_PAD 0x00000008 // Reserved.
+#define EFI_IMAGE_SCN_CNT_CODE 0x00000020
+#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040
+#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080
+
+#define EFI_IMAGE_SCN_LNK_OTHER 0x00000100 // Reserved.
+#define EFI_IMAGE_SCN_LNK_INFO 0x00000200 // Section contains comments or some other type of information.
+#define EFI_IMAGE_SCN_LNK_REMOVE 0x00000800 // Section contents will not become part of image.
+#define EFI_IMAGE_SCN_LNK_COMDAT 0x00001000
+
+#define EFI_IMAGE_SCN_ALIGN_1BYTES 0x00100000
+#define EFI_IMAGE_SCN_ALIGN_2BYTES 0x00200000
+#define EFI_IMAGE_SCN_ALIGN_4BYTES 0x00300000
+#define EFI_IMAGE_SCN_ALIGN_8BYTES 0x00400000
+#define EFI_IMAGE_SCN_ALIGN_16BYTES 0x00500000
+#define EFI_IMAGE_SCN_ALIGN_32BYTES 0x00600000
+#define EFI_IMAGE_SCN_ALIGN_64BYTES 0x00700000
+
+#define EFI_IMAGE_SCN_MEM_DISCARDABLE 0x02000000
+#define EFI_IMAGE_SCN_MEM_NOT_CACHED 0x04000000
+#define EFI_IMAGE_SCN_MEM_NOT_PAGED 0x08000000
+#define EFI_IMAGE_SCN_MEM_SHARED 0x10000000
+#define EFI_IMAGE_SCN_MEM_EXECUTE 0x20000000
+#define EFI_IMAGE_SCN_MEM_READ 0x40000000
+#define EFI_IMAGE_SCN_MEM_WRITE 0x80000000
+
+//
+// Symbol format.
+//
+#define EFI_IMAGE_SIZEOF_SYMBOL 18
+
+//
+// Section values.
+//
+// Symbols have a section number of the section in which they are
+// defined. Otherwise, section numbers have the following meanings:
+//
+#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0 // Symbol is undefined or is common.
+#define EFI_IMAGE_SYM_ABSOLUTE (UINT16) -1 // Symbol is an absolute value.
+#define EFI_IMAGE_SYM_DEBUG (UINT16) -2 // Symbol is a special debug item.
+//
+// Type (fundamental) values.
+//
+#define EFI_IMAGE_SYM_TYPE_NULL 0 // no type.
+#define EFI_IMAGE_SYM_TYPE_VOID 1 //
+#define EFI_IMAGE_SYM_TYPE_CHAR 2 // type character.
+#define EFI_IMAGE_SYM_TYPE_SHORT 3 // type short integer.
+#define EFI_IMAGE_SYM_TYPE_INT 4
+#define EFI_IMAGE_SYM_TYPE_LONG 5
+#define EFI_IMAGE_SYM_TYPE_FLOAT 6
+#define EFI_IMAGE_SYM_TYPE_DOUBLE 7
+#define EFI_IMAGE_SYM_TYPE_STRUCT 8
+#define EFI_IMAGE_SYM_TYPE_UNION 9
+#define EFI_IMAGE_SYM_TYPE_ENUM 10 // enumeration.
+#define EFI_IMAGE_SYM_TYPE_MOE 11 // member of enumeration.
+#define EFI_IMAGE_SYM_TYPE_BYTE 12
+#define EFI_IMAGE_SYM_TYPE_WORD 13
+#define EFI_IMAGE_SYM_TYPE_UINT 14
+#define EFI_IMAGE_SYM_TYPE_DWORD 15
+
+//
+// Type (derived) values.
+//
+#define EFI_IMAGE_SYM_DTYPE_NULL 0 // no derived type.
+#define EFI_IMAGE_SYM_DTYPE_POINTER 1
+#define EFI_IMAGE_SYM_DTYPE_FUNCTION 2
+#define EFI_IMAGE_SYM_DTYPE_ARRAY 3
+
+//
+// Storage classes.
+//
+#define EFI_IMAGE_SYM_CLASS_END_OF_FUNCTION (UINT8) -1
+#define EFI_IMAGE_SYM_CLASS_NULL 0
+#define EFI_IMAGE_SYM_CLASS_AUTOMATIC 1
+#define EFI_IMAGE_SYM_CLASS_EXTERNAL 2
+#define EFI_IMAGE_SYM_CLASS_STATIC 3
+#define EFI_IMAGE_SYM_CLASS_REGISTER 4
+#define EFI_IMAGE_SYM_CLASS_EXTERNAL_DEF 5
+#define EFI_IMAGE_SYM_CLASS_LABEL 6
+#define EFI_IMAGE_SYM_CLASS_UNDEFINED_LABEL 7
+#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 8
+#define EFI_IMAGE_SYM_CLASS_ARGUMENT 9
+#define EFI_IMAGE_SYM_CLASS_STRUCT_TAG 10
+#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_UNION 11
+#define EFI_IMAGE_SYM_CLASS_UNION_TAG 12
+#define EFI_IMAGE_SYM_CLASS_TYPE_DEFINITION 13
+#define EFI_IMAGE_SYM_CLASS_UNDEFINED_STATIC 14
+#define EFI_IMAGE_SYM_CLASS_ENUM_TAG 15
+#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_ENUM 16
+#define EFI_IMAGE_SYM_CLASS_REGISTER_PARAM 17
+#define EFI_IMAGE_SYM_CLASS_BIT_FIELD 18
+#define EFI_IMAGE_SYM_CLASS_BLOCK 100
+#define EFI_IMAGE_SYM_CLASS_FUNCTION 101
+#define EFI_IMAGE_SYM_CLASS_END_OF_STRUCT 102
+#define EFI_IMAGE_SYM_CLASS_FILE 103
+#define EFI_IMAGE_SYM_CLASS_SECTION 104
+#define EFI_IMAGE_SYM_CLASS_WEAK_EXTERNAL 105
+
+//
+// type packing constants
+//
+#define EFI_IMAGE_N_BTMASK 017
+#define EFI_IMAGE_N_TMASK 060
+#define EFI_IMAGE_N_TMASK1 0300
+#define EFI_IMAGE_N_TMASK2 0360
+#define EFI_IMAGE_N_BTSHFT 4
+#define EFI_IMAGE_N_TSHIFT 2
+
+//
+// Communal selection types.
+//
+#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES 1
+#define EFI_IMAGE_COMDAT_SELECT_ANY 2
+#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE 3
+#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH 4
+#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
+
+#define EFI_IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
+#define EFI_IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
+#define EFI_IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
+
+//
+// Relocation format.
+//
+typedef struct {
+ UINT32 VirtualAddress;
+ UINT32 SymbolTableIndex;
+ UINT16 Type;
+} EFI_IMAGE_RELOCATION;
+
+#define EFI_IMAGE_SIZEOF_RELOCATION 10
+
+//
+// I386 relocation types.
+//
+#define EFI_IMAGE_REL_I386_ABSOLUTE 0 // Reference is absolute, no relocation is necessary
+#define EFI_IMAGE_REL_I386_DIR16 01 // Direct 16-bit reference to the symbols virtual address
+#define EFI_IMAGE_REL_I386_REL16 02 // PC-relative 16-bit reference to the symbols virtual address
+#define EFI_IMAGE_REL_I386_DIR32 06 // Direct 32-bit reference to the symbols virtual address
+#define EFI_IMAGE_REL_I386_DIR32NB 07 // Direct 32-bit reference to the symbols virtual address, base not included
+#define EFI_IMAGE_REL_I386_SEG12 011 // Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address
+#define EFI_IMAGE_REL_I386_SECTION 012
+#define EFI_IMAGE_REL_I386_SECREL 013
+#define EFI_IMAGE_REL_I386_REL32 024 // PC-relative 32-bit reference to the symbols virtual address
+//
+// Based relocation format.
+//
+typedef struct {
+ UINT32 VirtualAddress;
+ UINT32 SizeOfBlock;
+} EFI_IMAGE_BASE_RELOCATION;
+
+#define EFI_IMAGE_SIZEOF_BASE_RELOCATION 8
+
+//
+// Based relocation types.
+//
+#define EFI_IMAGE_REL_BASED_ABSOLUTE 0
+#define EFI_IMAGE_REL_BASED_HIGH 1
+#define EFI_IMAGE_REL_BASED_LOW 2
+#define EFI_IMAGE_REL_BASED_HIGHLOW 3
+#define EFI_IMAGE_REL_BASED_HIGHADJ 4
+#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR 5
+#define EFI_IMAGE_REL_BASED_IA64_IMM64 9
+#define EFI_IMAGE_REL_BASED_DIR64 10
+
+//
+// Line number format.
+//
+typedef struct {
+ union {
+ UINT32 SymbolTableIndex; // Symbol table index of function name if Linenumber is 0.
+ UINT32 VirtualAddress; // Virtual address of line number.
+ } Type;
+ UINT16 Linenumber; // Line number.
+} EFI_IMAGE_LINENUMBER;
+
+#define EFI_IMAGE_SIZEOF_LINENUMBER 6
+
+//
+// Archive format.
+//
+#define EFI_IMAGE_ARCHIVE_START_SIZE 8
+#define EFI_IMAGE_ARCHIVE_START "!<arch>\n"
+#define EFI_IMAGE_ARCHIVE_END "`\n"
+#define EFI_IMAGE_ARCHIVE_PAD "\n"
+#define EFI_IMAGE_ARCHIVE_LINKER_MEMBER "/ "
+#define EFI_IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
+
+typedef struct {
+ UINT8 Name[16]; // File member name - `/' terminated.
+ UINT8 Date[12]; // File member date - decimal.
+ UINT8 UserID[6]; // File member user id - decimal.
+ UINT8 GroupID[6]; // File member group id - decimal.
+ UINT8 Mode[8]; // File member mode - octal.
+ UINT8 Size[10]; // File member size - decimal.
+ UINT8 EndHeader[2]; // String to end header.
+} EFI_IMAGE_ARCHIVE_MEMBER_HEADER;
+
+#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
+
+//
+// DLL support.
+//
+//
+// Export Format
+//
+typedef struct {
+ UINT32 Characteristics;
+ UINT32 TimeDateStamp;
+ UINT16 MajorVersion;
+ UINT16 MinorVersion;
+ UINT32 Name;
+ UINT32 Base;
+ UINT32 NumberOfFunctions;
+ UINT32 NumberOfNames;
+ UINT32 AddressOfFunctions;
+ UINT32 AddressOfNames;
+ UINT32 AddressOfNameOrdinals;
+} EFI_IMAGE_EXPORT_DIRECTORY;
+
+//
+// Import Format
+//
+typedef struct {
+ UINT16 Hint;
+ UINT8 Name[1];
+} EFI_IMAGE_IMPORT_BY_NAME;
+
+typedef struct {
+ union {
+ UINT32 Function;
+ UINT32 Ordinal;
+ EFI_IMAGE_IMPORT_BY_NAME *AddressOfData;
+ } u1;
+} EFI_IMAGE_THUNK_DATA;
+
+#define EFI_IMAGE_ORDINAL_FLAG 0x80000000
+#define EFI_IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & EFI_IMAGE_ORDINAL_FLAG) != 0)
+#define EFI_IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
+
+typedef struct {
+ UINT32 Characteristics;
+ UINT32 TimeDateStamp;
+ UINT32 ForwarderChain;
+ UINT32 Name;
+ EFI_IMAGE_THUNK_DATA *FirstThunk;
+} EFI_IMAGE_IMPORT_DESCRIPTOR;
+
+//
+// Debug Format
+//
+#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2
+
+typedef struct {
+ UINT32 Characteristics;
+ UINT32 TimeDateStamp;
+ UINT16 MajorVersion;
+ UINT16 MinorVersion;
+ UINT32 Type;
+ UINT32 SizeOfData;
+ UINT32 RVA;
+ UINT32 FileOffset;
+} EFI_IMAGE_DEBUG_DIRECTORY_ENTRY;
+
+#define CODEVIEW_SIGNATURE_NB10 0x3031424E // "NB10"
+typedef struct {
+ UINT32 Signature; // "NB10"
+ UINT32 Unknown;
+ UINT32 Unknown2;
+ UINT32 Unknown3;
+ //
+ // Filename of .PDB goes here
+ //
+} EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY;
+
+#define CODEVIEW_SIGNATURE_RSDS 0x53445352 // "RSDS"
+typedef struct {
+ UINT32 Signature; // "RSDS"
+ UINT32 Unknown;
+ UINT32 Unknown2;
+ UINT32 Unknown3;
+ UINT32 Unknown4;
+ UINT32 Unknown5;
+ //
+ // Filename of .PDB goes here
+ //
+} EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY;
+
+//
+// Resource Format
+//
+typedef struct {
+ UINT32 Characteristics;
+ UINT32 TimeDateStamp;
+ UINT16 MajorVersion;
+ UINT16 MinorVersion;
+ UINT16 NumberOfNamedEntries;
+ UINT16 NumberOfIdEntries;
+// EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY DirectoryEntries[];
+} EFI_IMAGE_RESOURCE_DIRECTORY;
+
+typedef struct {
+ union {
+ struct {
+ UINT32 NameOffset:31;
+ UINT32 NameIsString:1;
+ } s;
+ UINT32 Id;
+ } u1;
+ union {
+ UINT32 OffsetToData;
+ struct {
+ UINT32 OffsetToDirectory:31;
+ UINT32 DataIsDirectory:1;
+ } s;
+ } u2;
+} EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY;
+
+typedef struct {
+ UINT16 Length;
+ CHAR16 String[1];
+} EFI_IMAGE_RESOURCE_DIRECTORY_STRING;
+
+typedef struct {
+ UINT32 OffsetToData;
+ UINT32 Size;
+ UINT32 CodePage;
+ UINT32 Reserved;
+} EFI_IMAGE_RESOURCE_DATA_ENTRY;
+
+//
+// Header format for TE images
+//
+typedef struct {
+ UINT16 Signature; // signature for TE format = "VZ"
+ UINT16 Machine; // from the original file header
+ UINT8 NumberOfSections; // from the original file header
+ UINT8 Subsystem; // from original optional header
+ UINT16 StrippedSize; // how many bytes we removed from the header
+ UINT32 AddressOfEntryPoint; // offset to entry point -- from original optional header
+ UINT32 BaseOfCode; // from original image -- required for ITP debug
+ UINT64 ImageBase; // from original file header
+ EFI_IMAGE_DATA_DIRECTORY DataDirectory[2]; // only base relocation and debug directory
+} EFI_TE_IMAGE_HEADER;
+
+#define EFI_TE_IMAGE_HEADER_SIGNATURE 0x5A56 // "VZ"
+//
+// Data directory indexes in our TE image header
+//
+#define EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC 0
+#define EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG 1
+
+//
+// Union of PE32, PE32+, and TE headers
+//
+typedef union {
+ EFI_IMAGE_NT_HEADERS32 Pe32;
+ EFI_IMAGE_NT_HEADERS64 Pe32Plus;
+ EFI_TE_IMAGE_HEADER Te;
+} EFI_IMAGE_OPTIONAL_HEADER_UNION;
+
+typedef union {
+ EFI_IMAGE_NT_HEADERS32 *Pe32;
+ EFI_IMAGE_NT_HEADERS64 *Pe32Plus;
+ EFI_TE_IMAGE_HEADER *Te;
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *Union;
+} EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION;
+
+#endif
diff --git a/EDK/Foundation/Efi/Include/EfiTypes.h b/EDK/Foundation/Efi/Include/EfiTypes.h
new file mode 100644
index 0000000..240127e
--- /dev/null
+++ b/EDK/Foundation/Efi/Include/EfiTypes.h
@@ -0,0 +1,292 @@
+/*++
+
+Copyright (c) 2004 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EfiTypes.h
+
+Abstract:
+
+ EFI defined types. Use these types when ever possible!
+
+--*/
+
+#ifndef _EFI_TYPES_H_
+#define _EFI_TYPES_H_
+
+//
+// EFI Data Types based on ANSI C integer types in EfiBind.h
+//
+typedef uint8_t BOOLEAN;
+typedef intn_t INTN;
+typedef uintn_t UINTN;
+typedef int8_t INT8;
+typedef uint8_t UINT8;
+typedef int16_t INT16;
+typedef uint16_t UINT16;
+typedef int32_t INT32;
+typedef uint32_t UINT32;
+typedef int64_t INT64;
+typedef uint64_t UINT64;
+typedef uint8_t CHAR8;
+typedef uint16_t CHAR16;
+typedef UINT64 EFI_LBA;
+
+//
+// Modifiers for EFI Data Types used to self document code.
+// Please see EFI coding convention for proper usage.
+//
+#ifndef IN
+//
+// Some other envirnments use this construct, so #ifndef to prevent
+// mulitple definition.
+//
+#define IN
+#define OUT
+#define OPTIONAL
+#endif
+#define UNALIGNED
+
+//
+// Modifiers for EFI Runtime and Boot Services
+//
+#define EFI_RUNTIMESERVICE
+#define EFI_BOOTSERVICE
+
+//
+// Boot Service add in EFI 1.1
+//
+#define EFI_BOOTSERVICE11
+
+//
+// Modifiers to absract standard types to aid in debug of problems
+//
+#define CONST const
+#define STATIC static
+#define VOID void
+#define VOLATILE volatile
+
+//
+// Modifier to ensure that all protocol member functions and EFI intrinsics
+// use the correct C calling convention. All protocol member functions and
+// EFI intrinsics are required to modify thier member functions with EFIAPI.
+//
+#define EFIAPI _EFIAPI
+
+//
+// EFI Constants. They may exist in other build structures, so #ifndef them.
+//
+#ifndef TRUE
+#define TRUE ((BOOLEAN) (1 == 1))
+#endif
+
+#ifndef FALSE
+#define FALSE ((BOOLEAN) (0 == 1))
+#endif
+
+#ifndef NULL
+#define NULL ((VOID *) 0)
+#endif
+//
+// EFI Data Types derived from other EFI data types.
+//
+typedef UINTN EFI_STATUS;
+
+typedef VOID *EFI_HANDLE;
+#define NULL_HANDLE ((VOID *) 0)
+
+typedef VOID *EFI_EVENT;
+typedef UINTN EFI_TPL;
+
+typedef struct {
+ UINT32 Data1;
+ UINT16 Data2;
+ UINT16 Data3;
+ UINT8 Data4[8];
+} EFI_GUID;
+
+typedef union {
+ EFI_GUID Guid;
+ UINT8 Raw[16];
+} EFI_GUID_UNION;
+
+//
+// EFI Time Abstraction:
+// Year: 2000 - 20XX
+// Month: 1 - 12
+// Day: 1 - 31
+// Hour: 0 - 23
+// Minute: 0 - 59
+// Second: 0 - 59
+// Nanosecond: 0 - 999,999,999
+// TimeZone: -1440 to 1440 or 2047
+//
+typedef struct {
+ UINT16 Year;
+ UINT8 Month;
+ UINT8 Day;
+ UINT8 Hour;
+ UINT8 Minute;
+ UINT8 Second;
+ UINT8 Pad1;
+ UINT32 Nanosecond;
+ INT16 TimeZone;
+ UINT8 Daylight;
+ UINT8 Pad2;
+} EFI_TIME;
+
+//
+// Bit definitions for EFI_TIME.Daylight
+//
+#define EFI_TIME_ADJUST_DAYLIGHT 0x01
+#define EFI_TIME_IN_DAYLIGHT 0x02
+
+//
+// Value definition for EFI_TIME.TimeZone
+//
+#define EFI_UNSPECIFIED_TIMEZONE 0x07FF
+
+//
+// Networking
+//
+typedef struct {
+ UINT8 Addr[4];
+} EFI_IPv4_ADDRESS;
+
+typedef struct {
+ UINT8 Addr[16];
+} EFI_IPv6_ADDRESS;
+
+typedef struct {
+ UINT8 Addr[32];
+} EFI_MAC_ADDRESS;
+
+typedef union {
+ UINT32 Addr[4];
+ EFI_IPv4_ADDRESS v4;
+ EFI_IPv6_ADDRESS v6;
+} EFI_IP_ADDRESS;
+
+typedef enum {
+ EfiReservedMemoryType,
+ EfiLoaderCode,
+ EfiLoaderData,
+ EfiBootServicesCode,
+ EfiBootServicesData,
+ EfiRuntimeServicesCode,
+ EfiRuntimeServicesData,
+ EfiConventionalMemory,
+ EfiUnusableMemory,
+ EfiACPIReclaimMemory,
+ EfiACPIMemoryNVS,
+ EfiMemoryMappedIO,
+ EfiMemoryMappedIOPortSpace,
+ EfiPalCode,
+ EfiMaxMemoryType
+} EFI_MEMORY_TYPE;
+
+typedef enum {
+ AllocateAnyPages,
+ AllocateMaxAddress,
+ AllocateAddress,
+ MaxAllocateType
+} EFI_ALLOCATE_TYPE;
+
+typedef struct {
+ UINT64 Signature;
+ UINT32 Revision;
+ UINT32 HeaderSize;
+ UINT32 CRC32;
+ UINT32 Reserved;
+} EFI_TABLE_HEADER;
+
+//
+// possible caching types for the memory range
+//
+#define EFI_MEMORY_UC 0x0000000000000001
+#define EFI_MEMORY_WC 0x0000000000000002
+#define EFI_MEMORY_WT 0x0000000000000004
+#define EFI_MEMORY_WB 0x0000000000000008
+#define EFI_MEMORY_UCE 0x0000000000000010
+
+//
+// physical memory protection on range
+//
+#define EFI_MEMORY_WP 0x0000000000001000
+#define EFI_MEMORY_RP 0x0000000000002000
+#define EFI_MEMORY_XP 0x0000000000004000
+
+//
+// range requires a runtime mapping
+//
+#define EFI_MEMORY_RUNTIME 0x8000000000000000
+
+typedef UINT64 EFI_PHYSICAL_ADDRESS;
+typedef UINT64 EFI_VIRTUAL_ADDRESS;
+
+#define EFI_MEMORY_DESCRIPTOR_VERSION 1
+typedef struct {
+ UINT32 Type;
+ UINT32 Pad;
+ EFI_PHYSICAL_ADDRESS PhysicalStart;
+ EFI_VIRTUAL_ADDRESS VirtualStart;
+ UINT64 NumberOfPages;
+ UINT64 Attribute;
+} EFI_MEMORY_DESCRIPTOR;
+
+//
+// The EFI memory allocation functions work in units of EFI_PAGEs that are
+// 4K. This should in no way be confused with the page size of the processor.
+// An EFI_PAGE is just the quanta of memory in EFI.
+//
+#define EFI_PAGE_SIZE 4096
+#define EFI_PAGE_MASK 0xFFF
+#define EFI_PAGE_SHIFT 12
+
+#define EFI_SIZE_TO_PAGES(a) (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))
+
+#define EFI_PAGES_TO_SIZE(a) ( (a) << EFI_PAGE_SHIFT)
+
+//
+// ALIGN_POINTER - aligns a pointer to the lowest boundry
+//
+#define ALIGN_POINTER(p, s) ((VOID *) (p + ((s - ((UINTN) p)) & (s - 1))))
+
+//
+// ALIGN_VARIABLE - aligns a variable up to the next natural boundry for int size of a processor
+//
+#define ALIGN_VARIABLE(Value, Adjustment) \
+ (UINTN) Adjustment = 0; \
+ if ((UINTN) Value % sizeof (UINTN)) { \
+ (UINTN) Adjustment = sizeof (UINTN) - ((UINTN) Value % sizeof (UINTN)); \
+ } \
+ Value = (UINTN) Value + (UINTN) Adjustment
+
+//
+// EFI_FIELD_OFFSET - returns the byte offset to a field within a structure
+//
+#define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(&(((TYPE *) 0)->Field)))
+
+//
+// CONTAINING_RECORD - returns a pointer to the structure
+// from one of it's elements.
+//
+#define _CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))
+
+//
+// Define macros to build data structure signatures from characters.
+//
+#define EFI_SIGNATURE_16(A, B) ((A) | (B << 8))
+#define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))
+#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) \
+ (EFI_SIGNATURE_32 (A, B, C, D) | ((UINT64) (EFI_SIGNATURE_32 (E, F, G, H)) << 32))
+
+#endif
diff --git a/EDK/Foundation/Efi/Include/Pxe.h b/EDK/Foundation/Efi/Include/Pxe.h
new file mode 100644
index 0000000..210377f
--- /dev/null
+++ b/EDK/Foundation/Efi/Include/Pxe.h
@@ -0,0 +1,58 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ pxe.h
+
+Abstract:
+
+ PXE 2.1 Common Structures
+
+Revision History
+
+--*/
+
+#ifndef _PXE_H
+#define _PXE_H
+
+//
+// Packet definitions
+//
+typedef struct {
+ UINT8 BootpOpcode;
+ UINT8 BootpHwType;
+ UINT8 BootpHwAddrLen;
+ UINT8 BootpGateHops;
+ UINT32 BootpIdent;
+ UINT16 BootpSeconds;
+ UINT16 BootpFlags;
+ UINT8 BootpCiAddr[4];
+ UINT8 BootpYiAddr[4];
+ UINT8 BootpSiAddr[4];
+ UINT8 BootpGiAddr[4];
+ UINT8 BootpHwAddr[16];
+ UINT8 BootpSrvName[64];
+ UINT8 BootpBootFile[128];
+ UINT32 DhcpMagik;
+ UINT8 DhcpOptions[56];
+} EFI_PXE_BASE_CODE_DHCPV4_PACKET;
+
+typedef union {
+ UINT8 Raw[1472];
+ EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4;
+
+ //
+ // EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;
+ //
+} EFI_PXE_BASE_CODE_PACKET;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.c b/EDK/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.c
new file mode 100644
index 0000000..f023d6a
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ AbsolutePointer.c
+
+Abstract:
+
+ EFI_ABSOLUTE_POINTER_PROTOCOL from the UEFI 2.1 specification.
+
+ This protocol specifies a simple method for accessing absolute pointer devices.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (AbsolutePointer)
+
+EFI_GUID gEfiAbsolutePointerProtocolGuid = EFI_ABSOLUTE_POINTER_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiAbsolutePointerProtocolGuid, "Absolute Pointer Protocol", "UEFI 2.1 Absolute Pointer Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.h b/EDK/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.h
new file mode 100644
index 0000000..ac0d132
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.h
@@ -0,0 +1,117 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ AbsolutePointer.h
+
+Abstract:
+
+ EFI_ABSOLUTE_POINTER_PROTOCOL from the UEFI 2.1 specification.
+
+ This protocol specifies a simple method for accessing absolute pointer devices.
+
+--*/
+
+#ifndef __ABSOLUTE_POINTER_H__
+#define __ABSOLUTE_POINTER_H__
+
+#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
+ { \
+ 0x8D59D32B, 0xC655, 0x4AE9, 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_ABSOLUTE_POINTER_PROTOCOL);
+
+//
+// Data structures
+//
+
+typedef struct {
+ UINT64 AbsoluteMinX;
+ UINT64 AbsoluteMinY;
+ UINT64 AbsoluteMinZ;
+ UINT64 AbsoluteMaxX;
+ UINT64 AbsoluteMaxY;
+ UINT64 AbsoluteMaxZ;
+ UINT32 Attributes;
+} EFI_ABSOLUTE_POINTER_MODE;
+
+typedef struct {
+ UINT64 CurrentX;
+ UINT64 CurrentY;
+ UINT64 CurrentZ;
+ UINT32 ActiveButtons;
+} EFI_ABSOLUTE_POINTER_STATE;
+
+#define EFI_ABSP_SupportsAltActive 0x00000001
+#define EFI_ABSP_SupportsPressureAsZ 0x00000002
+
+#define EFI_ABSP_TouchActive 0x00000001
+#define EFI_ABS_AltActive 0x00000002
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ABSOLUTE_POINTER_RESET) (
+ IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
+ IN BOOLEAN ExtendedVerification
+ )
+/*++
+
+ Routine Description:
+ Resets the pointer device hardware.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ExtendedVerification - Driver may perform diagnostics on reset.
+
+ Returns:
+ EFI_SUCCESS - The device was reset.
+ EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ not be reset.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE) (
+ IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
+ IN OUT EFI_ABSOLUTE_POINTER_STATE *State
+ )
+/*++
+
+ Routine Description:
+ Retrieves the current state of a pointer device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ State - A pointer to the state information on the pointer device.
+
+ Returns:
+ EFI_SUCCESS - The state of the pointer device was returned in State..
+ EFI_NOT_READY - The state of the pointer device has not changed since the last call to
+ GetState().
+ EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer
+ device's current state.
+--*/
+;
+
+typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL {
+ EFI_ABSOLUTE_POINTER_RESET Reset;
+ EFI_ABSOLUTE_POINTER_GET_STATE GetState;
+ EFI_EVENT WaitForInput;
+ EFI_ABSOLUTE_POINTER_MODE *Mode;
+} EFI_ABSOLUTE_POINTER_PROTOCOL;
+
+extern EFI_GUID gEfiAbsolutePointerProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/AcpiTable/AcpiTable.c b/EDK/Foundation/Efi/Protocol/AcpiTable/AcpiTable.c
new file mode 100644
index 0000000..b2efc7b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/AcpiTable/AcpiTable.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ AcpiTable.c
+
+Abstract:
+
+ ACPI Table Protocol from the UEFI 2.1 specification.
+
+ This protocol may be used to install or remove an ACPI table from a platform.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (AcpiTable)
+
+EFI_GUID gEfiAcpiTableProtocolGuid = EFI_ACPI_TABLE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiAcpiTableProtocolGuid, "UEFI ACPI Table Protocol", "UEFI ACPI Table Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/AcpiTable/AcpiTable.h b/EDK/Foundation/Efi/Protocol/AcpiTable/AcpiTable.h
new file mode 100644
index 0000000..4cfdf97
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/AcpiTable/AcpiTable.h
@@ -0,0 +1,112 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ AcpiTable.h
+
+Abstract:
+
+ ACPI Table Protocol from the UEFI 2.1 specification.
+
+ This protocol may be used to install or remove an ACPI table from a platform.
+
+--*/
+
+#ifndef __ACPI_TABLE_H__
+#define __ACPI_TABLE_H__
+
+#include "Acpi.h"
+
+//
+// Global ID for the Acpi Table Protocol
+//
+#define EFI_ACPI_TABLE_PROTOCOL_GUID \
+ { \
+ 0xffe06bdd, 0x6107, 0x46a6, 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_ACPI_TABLE_PROTOCOL);
+
+#define UEFI_ACPI_TABLE_SIGNATURE EFI_SIGNATURE_32 ('U', 'E', 'F', 'I')
+
+#pragma pack(1)
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_GUID Identifier;
+ UINT16 DataOffset;
+} EFI_ACPI_TABLE;
+
+#pragma pack()
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE) (
+ IN EFI_ACPI_TABLE_PROTOCOL *This,
+ IN VOID *AcpiTableBuffer,
+ IN UINTN AcpiTableBufferSize,
+ OUT UINTN *TableKey
+ )
+/*++
+
+ Routine Description:
+ Installs an ACPI table into the RSDT/XSDT.
+
+ Arguments:
+ This - Protocol instance pointer.
+ AcpiTableBuffer - A pointer to a buffer containing the ACPI table to be installed.
+ AcpiTableBufferSize - Specifies the size, in bytes, of the AcpiTableBuffer buffer.
+ TableKey - Reurns a key to refer to the ACPI table.
+
+ Returns:
+ EFI_SUCCESS - The table was successfully inserted.
+ EFI_INVALID_PARAMETER - Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize
+ and the size field embedded in the ACPI table pointed to by AcpiTableBuffer
+ are not in sync.
+ EFI_OUT_OF_RESOURCES - Insufficient resources exist to complete the request.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE) (
+ IN EFI_ACPI_TABLE_PROTOCOL *This,
+ IN UINTN TableKey
+ )
+/*++
+
+ Routine Description:
+ Removes an ACPI table from the RSDT/XSDT.
+
+ Arguments:
+ This - Protocol instance pointer.
+ TableKey - Specifies the table to uninstall. The key was returned from InstallAcpiTable().
+
+ Returns:
+ EFI_SUCCESS - The table was successfully uninstalled.
+ EFI_NOT_FOUND - TableKey does not refer to a valid key for a table entry.
+
+--*/
+;
+
+//
+// Interface structure for the ACPI Table Protocol
+//
+typedef struct _EFI_ACPI_TABLE_PROTOCOL {
+ EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable;
+ EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;
+} EFI_ACPI_TABLE_PROTOCOL;
+
+extern EFI_GUID gEfiAcpiTableProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Arp/Arp.c b/EDK/Foundation/Efi/Protocol/Arp/Arp.c
new file mode 100644
index 0000000..377e99f
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Arp/Arp.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Arp.c
+
+Abstract:
+
+ UEFI Arp protocol.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Arp)
+
+EFI_GUID gEfiArpServiceBindingProtocolGuid = EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID;
+EFI_GUID gEfiArpProtocolGuid = EFI_ARP_PROTOCOL_GUID;
+
+EFI_GUID_STRING (&gEfiArpServiceBindingProtocolGuid, "ARP Service Binding Protocol", "ARP Service Binding Protocol");
+EFI_GUID_STRING (&gEfiArpProtocolGuid, "ARP Protocol", "ARP Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/Arp/Arp.h b/EDK/Foundation/Efi/Protocol/Arp/Arp.h
new file mode 100644
index 0000000..eded0a7
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Arp/Arp.h
@@ -0,0 +1,136 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Arp.h
+
+Abstract:
+
+ UEFI Arp protocol definition.
+
+--*/
+
+#ifndef _ARP_H_
+#define _ARP_H_
+
+#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
+
+#define EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID \
+ { 0xf44c00ee, 0x1f2c, 0x4a00, 0xaa, 0x9, 0x1c, 0x9f, 0x3e, 0x8, 0x0, 0xa3 }
+
+#define EFI_ARP_PROTOCOL_GUID \
+ { 0xf4b427bb, 0xba21, 0x4f16, 0xbc, 0x4e, 0x43, 0xe4, 0x16, 0xab, 0x61, 0x9c }
+
+EFI_FORWARD_DECLARATION (EFI_ARP_PROTOCOL);
+
+typedef struct _EFI_ARP_FIND_DATA {
+UINT32 Size;
+BOOLEAN DenyFlag;
+BOOLEAN StaticFlag;
+UINT16 HwAddressType;
+UINT16 SwAddressType;
+UINT8 HwAddressLength;
+UINT8 SwAddressLength;
+} EFI_ARP_FIND_DATA;
+
+
+//****************************************************
+// EFI_ARP_CONFIG_DATA
+//****************************************************
+typedef struct EFI_ARP_CONFIG_DATA {
+ UINT16 SwAddressType; // Host byte order
+ UINT8 SwAddressLength;
+ VOID *StationAddress; // Network byte order
+ UINT32 EntryTimeOut;
+ UINT32 RetryCount;
+ UINT32 RetryTimeOut;
+} EFI_ARP_CONFIG_DATA;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ARP_CONFIGURE) (
+ IN EFI_ARP_PROTOCOL *This,
+ IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL
+ );
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ARP_ADD) (
+ IN EFI_ARP_PROTOCOL *This,
+ IN BOOLEAN DenyFlag,
+ IN VOID *TargetSwAddress OPTIONAL,
+ IN VOID *TargetHwAddress OPTIONAL,
+ IN UINT32 TimeoutValue,
+ IN BOOLEAN Overwrite
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ARP_FIND) (
+ IN EFI_ARP_PROTOCOL *This,
+ IN BOOLEAN BySwAddress,
+ IN VOID *AddressBuffer OPTIONAL,
+ OUT UINT32 *EntryLength OPTIONAL,
+ OUT UINT32 *EntryCount OPTIONAL,
+ OUT EFI_ARP_FIND_DATA **Entries OPTIONAL,
+ IN BOOLEAN Refresh
+);
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ARP_DELETE) (
+ IN EFI_ARP_PROTOCOL *This,
+ IN BOOLEAN BySwAddress,
+ IN VOID *AddressBuffer OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ARP_FLUSH) (
+ IN EFI_ARP_PROTOCOL *This
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ARP_REQUEST) (
+ IN EFI_ARP_PROTOCOL *This,
+ IN VOID *TargetSwAddress OPTIONAL,
+ IN EFI_EVENT ResolvedEvent OPTIONAL,
+ OUT VOID *TargetHwAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ARP_CANCEL) (
+IN EFI_ARP_PROTOCOL *This,
+IN VOID *TargetSwAddress OPTIONAL,
+IN EFI_EVENT ResolvedEvent OPTIONAL
+);
+
+typedef struct _EFI_ARP_PROTOCOL {
+ EFI_ARP_CONFIGURE Configure;
+ EFI_ARP_ADD Add;
+ EFI_ARP_FIND Find;
+ EFI_ARP_DELETE Delete;
+ EFI_ARP_FLUSH Flush;
+ EFI_ARP_REQUEST Request;
+ EFI_ARP_CANCEL Cancel;
+} EFI_ARP_PROTOCOL;
+
+
+extern EFI_GUID gEfiArpServiceBindingProtocolGuid;
+extern EFI_GUID gEfiArpProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.c b/EDK/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.c
new file mode 100644
index 0000000..da1e861
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ AuthenticationInfo.c
+
+Abstract:
+
+ UEFI Authentication Info Protocol.
+
+Revision History:
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (AuthenticationInfo)
+
+EFI_GUID gEfiAuthenticationInfoProtocolGuid = EFI_AUTHENTICATION_INFO_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (&gEfiAuthenticationInfoProtocolGuid, "Authentication Info Protocol", "UEFI 2.1 Authentication Info Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.h b/EDK/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.h
new file mode 100644
index 0000000..94a6fce
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.h
@@ -0,0 +1,106 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PlatformToDriverConfiguration.h
+
+Abstract:
+
+ UEFI Authentication Info Protocol.
+
+Revision History:
+
+--*/
+
+#ifndef _EFI_AUTHENTICATION_INFO_H_
+#define _EFI_AUTHENTICATION_INFO_H_
+
+//
+// Global ID for the Authentication Info Protocol
+//
+#define EFI_AUTHENTICATION_INFO_PROTOCOL_GUID \
+ { \
+ 0x7671d9d0, 0x53db, 0x4173, 0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_AUTHENTICATION_INFO_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_GET) (
+ IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
+ IN EFI_HANDLE *ControllerHandle,
+ OUT VOID *Buffer
+ );
+/*++
+
+ Routine Description:
+ Retrieves the Authentication information associated with a particular
+ controller handle.
+
+ Arguments:
+ This - Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL instance.
+ ControllerHandle - Handle to the Controller.
+ Buffer - Pointer to the authentication information. This function
+ is responsible for allocating the buffer and it is the
+ caller's responsibility to free buffer when the caller
+ is finished with buffer.
+
+ Returns:
+ EFI_SUCCESS - Successfully retrieved Authentication information
+ for the given ControllerHandle.
+ EFI_NOT_FOUND - No matching Authentication information found for the
+ given ControllerHandle.
+ EFI_DEVICE_ERROR - The Authentication information could not be retrieved
+ due to a hardware error.
+
+--*/
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_SET) (
+ IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
+ IN EFI_HANDLE *ControllerHandle,
+ IN VOID *Buffer
+ );
+/*++
+
+ Routine Description:
+ Set the Authentication information for a given controller handle.
+
+ Arguments:
+ This - Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL instance.
+ ControllerHandle - Handle to the Controller.
+ Buffer - Pointer to the authentication information.
+
+ Returns:
+ EFI_SUCCESS - Successfully set the Authentication node information
+ for the given ControllerHandle.
+ EFI_UNSUPPORTED - If the platform policies do not allow setting of the
+ Authentication information.
+ EFI_DEVICE_ERROR - The authentication node information could not be configured
+ due to a hardware error.
+ EFI_OUT_OF_RESOURCES - Not enough storage is available to hold the data.
+
+--*/
+
+//
+// Interface structure for the Authentication Info Protocol
+//
+typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL {
+ EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get;
+ EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set;
+} EFI_AUTHENTICATION_INFO_PROTOCOL;
+
+extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Bis/Bis.c b/EDK/Foundation/Efi/Protocol/Bis/Bis.c
new file mode 100644
index 0000000..4ec1b97
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Bis/Bis.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Bis.c
+
+Abstract:
+
+ This file defines the Bis protocol
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Bis)
+
+EFI_GUID gEfiBisProtocolGuid = EFI_BIS_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiBisProtocolGuid, "BIS Base Protocol", "BIS Base protocol");
diff --git a/EDK/Foundation/Efi/Protocol/Bis/Bis.h b/EDK/Foundation/Efi/Protocol/Bis/Bis.h
new file mode 100644
index 0000000..b7035db
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Bis/Bis.h
@@ -0,0 +1,233 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Bis.h
+
+Abstract:
+
+ This file defines the BIS protocol.
+
+--*/
+
+#ifndef _BIS_H_
+#define _BIS_H_
+
+#include <EfiSpec.h>
+
+//
+// Basic types
+//
+typedef VOID *BIS_APPLICATION_HANDLE;
+typedef UINT16 BIS_ALG_ID;
+typedef UINT32 BIS_CERT_ID;
+
+//
+// EFI_BIS_DATA type.
+//
+// EFI_BIS_DATA instances obtained from BIS must be freed by calling Free( ).
+//
+typedef struct _EFI_BIS_DATA {
+ UINT32 Length; // Length of Data in 8 bit bytes.
+ UINT8 *Data; // 32 Bit Flat Address of data.
+} EFI_BIS_DATA;
+
+//
+// EFI_BIS_VERSION type.
+//
+typedef struct _EFI_BIS_VERSION {
+ UINT32 Major; // BIS Interface version number.
+ UINT32 Minor; // Build number.
+} EFI_BIS_VERSION;
+
+//
+// ----------------------------------------------------//
+// Use these values to initialize EFI_BIS_VERSION.Major
+// and to interpret results of Initialize.
+// ----------------------------------------------------//
+//
+#define BIS_CURRENT_VERSION_MAJOR BIS_VERSION_1
+#define BIS_VERSION_1 1
+
+//
+// EFI_BIS_SIGNATURE_INFO type.
+//
+typedef struct _EFI_BIS_SIGNATURE_INFO {
+ BIS_CERT_ID CertificateID; // Truncated hash of platform Boot Object
+ // authorization certificate.
+ //
+ BIS_ALG_ID AlgorithmID; // A signature algorithm number.
+ UINT16 KeyLength; // Length of alg. keys in bits.
+} EFI_BIS_SIGNATURE_INFO;
+
+//
+// Currently defined values for EFI_BIS_SIGNATURE_INFO.AlgorithmID.
+// The exact numeric values come from
+// "Common Data Security Architecture (CDSA) Specification".
+//
+#define BIS_ALG_DSA (41) // CSSM_ALGID_DSA
+#define BIS_ALG_RSA_MD5 (42) // CSSM_ALGID_MD5_WITH_RSA
+// Currently defined values for EFI_BIS_SIGNATURE_INFO.CertificateId.
+//
+#define BIS_CERT_ID_DSA BIS_ALG_DSA // CSSM_ALGID_DSA
+#define BIS_CERT_ID_RSA_MD5 BIS_ALG_RSA_MD5 // CSSM_ALGID_MD5_WITH_RSA
+// The following is a mask value that gets applied to the truncated hash of a
+// platform Boot Object Authorization Certificate to create the certificateID.
+// A certificateID must not have any bits set to the value 1 other than bits in
+// this mask.
+//
+#define BIS_CERT_ID_MASK (0xFF7F7FFF)
+
+//
+// Macros for dealing with the EFI_BIS_DATA object obtained
+// from BIS_GetSignatureInfo()
+// BIS_GET_SIGINFO_COUNT - tells how many EFI_BIS_SIGNATURE_INFO
+// elements are contained in a EFI_BIS_DATA struct pointed to
+// by the provided EFI_BIS_DATA*.
+//
+#define BIS_GET_SIGINFO_COUNT(BisDataPtr) ((BisDataPtr)->Length / sizeof (EFI_BIS_SIGNATURE_INFO))
+
+//
+// BIS_GET_SIGINFO_ARRAY - produces a EFI_BIS_SIGNATURE_INFO*
+// from a given EFI_BIS_DATA*.
+//
+#define BIS_GET_SIGINFO_ARRAY(BisDataPtr) ((EFI_BIS_SIGNATURE_INFO *) (BisDataPtr)->Data)
+
+//
+// Binary Value of "X-Intel-BIS-ParameterSet" Attribute.
+// (Value is Base64 encoded in actual signed manifest).
+// {EDD35E31-07B9-11d2-83A3-00A0C91FADCF}
+//
+#define BOOT_OBJECT_AUTHORIZATION_PARMSET_GUIDVALUE \
+ { \
+ 0xedd35e31, 0x7b9, 0x11d2, \
+ { \
+ 0x83, 0xa3, 0x0, 0xa0, 0xc9, 0x1f, 0xad, 0xcf \
+ } \
+ }
+
+//
+// -----------------------------------//
+// EFI_BIS_PROTOCOL
+// -----------------------------------//
+//
+#define EFI_BIS_PROTOCOL_GUID \
+ { \
+ 0x0b64aab0, 0x5429, 0x11d4, 0x98, 0x16, 0x00, 0xa0, 0xc9, 0x1f, 0xad, 0xcf \
+ }
+
+typedef struct _EFI_BIS_PROTOCOL EFI_BIS_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_INITIALIZE) (
+ IN EFI_BIS_PROTOCOL * This, // this
+ OUT BIS_APPLICATION_HANDLE * AppHandle, // Application handle.
+ IN OUT EFI_BIS_VERSION * InterfaceVersion, // ver needed/available.
+ IN EFI_BIS_DATA * TargetAddress // Address of BIS platform.
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_FREE) (
+ IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
+ IN EFI_BIS_DATA * ToFree // EFI_BIS_DATA being freed.
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_SHUTDOWN) (
+ IN BIS_APPLICATION_HANDLE AppHandle // From Initialize( ).
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE) (
+ IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
+ OUT EFI_BIS_DATA **Certificate // Pointer to certificate.
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_VERIFY_BOOT_OBJECT) (
+ IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
+ IN EFI_BIS_DATA * Credentials, // Verification signed manifest.
+ IN EFI_BIS_DATA * DataObject, // Boot object to verify.
+ OUT BOOLEAN *IsVerified // Result of verifcation.
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG) (
+ IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
+ OUT BOOLEAN *CheckIsRequired // Value of check flag.
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN) (
+ IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
+ OUT EFI_BIS_DATA **UpdateToken // Value of update token.
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION) (
+ IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
+ IN EFI_BIS_DATA * RequestCredential, // Update Request Manifest.
+ OUT EFI_BIS_DATA **NewUpdateToken // Next update token.
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL) (
+ IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
+ IN EFI_BIS_DATA * Credentials, // Verification signed manifest.
+ IN EFI_BIS_DATA * DataObject, // Boot object to verify.
+ IN EFI_BIS_DATA * SectionName, // Name of credential section to use.
+ IN EFI_BIS_DATA * AuthorityCertificate, // Certificate for credentials.
+ OUT BOOLEAN *IsVerified // Result of verifcation.
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BIS_GET_SIGNATURE_INFO) (
+ IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
+ OUT EFI_BIS_DATA **SignatureInfo // Signature info struct.
+ );
+
+#define EFI_BIS_PROTOCOL_REVISION 0x00010000
+
+typedef struct _EFI_BIS_PROTOCOL {
+ //
+ // member vars
+ //
+ UINT64 Revision;
+
+ //
+ // methods
+ //
+ EFI_BIS_INITIALIZE Initialize;
+ EFI_BIS_SHUTDOWN Shutdown;
+ EFI_BIS_FREE Free;
+ EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE GetBootObjectAuthorizationCertificate;
+ EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG GetBootObjectAuthorizationCheckFlag;
+ EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN GetBootObjectAuthorizationUpdateToken;
+ EFI_BIS_GET_SIGNATURE_INFO GetSignatureInfo;
+ EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION UpdateBootObjectAuthorization;
+ EFI_BIS_VERIFY_BOOT_OBJECT VerifyBootObject;
+ EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL VerifyObjectWithCredential;
+} EFI_BIS_PROTOCOL;
+
+extern EFI_GUID gEfiBisProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/BlockIO/BlockIO.c b/EDK/Foundation/Efi/Protocol/BlockIO/BlockIO.c
new file mode 100644
index 0000000..46c9158
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/BlockIO/BlockIO.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ BlockIo.c
+
+Abstract:
+
+ Block IO protocol as defined in the EFI 1.0 specification.
+
+ The Block IO protocol is used to abstract block devices like hard drives,
+ DVD-ROMs and floppy drives.
+
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (BlockIo)
+
+EFI_GUID gEfiBlockIoProtocolGuid = EFI_BLOCK_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiBlockIoProtocolGuid, "BlockIo Protocol", "EFI 1.0 Block IO protocol");
diff --git a/EDK/Foundation/Efi/Protocol/BlockIO/BlockIO.h b/EDK/Foundation/Efi/Protocol/BlockIO/BlockIO.h
new file mode 100644
index 0000000..49748bc
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/BlockIO/BlockIO.h
@@ -0,0 +1,213 @@
+/*++
+
+Copyright (c) 2004 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ BlockIo.h
+
+Abstract:
+
+ Block IO protocol as defined in the EFI 1.0 specification.
+
+ The Block IO protocol is used to abstract block devices like hard drives,
+ DVD-ROMs and floppy drives.
+
+
+--*/
+
+#ifndef __BLOCK_IO_H__
+#define __BLOCK_IO_H__
+
+#define EFI_BLOCK_IO_PROTOCOL_GUID \
+ { \
+ 0x964e5b21, 0x6459, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_BLOCK_IO_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BLOCK_RESET) (
+ IN EFI_BLOCK_IO_PROTOCOL * This,
+ IN BOOLEAN ExtendedVerification
+ )
+/*++
+
+ Routine Description:
+ Reset the Block Device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ExtendedVerification - Driver may perform diagnostics on reset.
+
+ Returns:
+ EFI_SUCCESS - The device was reset.
+ EFI_DEVICE_ERROR - The device is not functioning properly and could
+ not be reset.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BLOCK_READ) (
+ IN EFI_BLOCK_IO_PROTOCOL * This,
+ IN UINT32 MediaId,
+ IN EFI_LBA Lba,
+ IN UINTN BufferSize,
+ OUT VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Read BufferSize bytes from Lba into Buffer.
+
+ Arguments:
+ This - Protocol instance pointer.
+ MediaId - Id of the media, changes every time the media is replaced.
+ Lba - The starting Logical Block Address to read from
+ BufferSize - Size of Buffer, must be a multiple of device block size.
+ Buffer - Buffer containing read data
+
+ Returns:
+ EFI_SUCCESS - The data was read correctly from the device.
+ EFI_DEVICE_ERROR - The device reported an error while performing the read.
+ EFI_NO_MEDIA - There is no media in the device.
+ EFI_MEDIA_CHANGED - The MediaId does not matched the current device.
+ EFI_BAD_BUFFER_SIZE - The Buffer was not a multiple of the block size of the
+ device.
+ EFI_INVALID_PARAMETER - The read request contains device addresses that are not
+ valid for the device.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BLOCK_WRITE) (
+ IN EFI_BLOCK_IO_PROTOCOL * This,
+ IN UINT32 MediaId,
+ IN EFI_LBA Lba,
+ IN UINTN BufferSize,
+ IN VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Write BufferSize bytes from Lba into Buffer.
+
+ Arguments:
+ This - Protocol instance pointer.
+ MediaId - Id of the media, changes every time the media is replaced.
+ Lba - The starting Logical Block Address to read from
+ BufferSize - Size of Buffer, must be a multiple of device block size.
+ Buffer - Buffer containing read data
+
+ Returns:
+ EFI_SUCCESS - The data was written correctly to the device.
+ EFI_WRITE_PROTECTED - The device can not be written to.
+ EFI_DEVICE_ERROR - The device reported an error while performing the write.
+ EFI_NO_MEDIA - There is no media in the device.
+ EFI_MEDIA_CHNAGED - The MediaId does not matched the current device.
+ EFI_BAD_BUFFER_SIZE - The Buffer was not a multiple of the block size of the
+ device.
+ EFI_INVALID_PARAMETER - The write request contains a LBA that is not
+ valid for the device.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BLOCK_FLUSH) (
+ IN EFI_BLOCK_IO_PROTOCOL * This
+ )
+/*++
+
+ Routine Description:
+ Flush the Block Device.
+
+ Arguments:
+ This - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - All outstanding data was written to the device
+ EFI_DEVICE_ERROR - The device reported an error while writting back the data
+ EFI_NO_MEDIA - There is no media in the device.
+
+--*/
+;
+
+/*++
+
+ Block IO read only mode data and updated only via members of BlockIO
+
+ MediaId - The curent media Id. If the media changes, this value is changed.
+ RemovableMedia - TRUE if the media is removable; otherwise, FALSE.
+ MediaPresent - TRUE if there is a media currently present in the device;
+ othersise, FALSE. THis field shows the media present status
+ as of the most recent ReadBlocks() or WriteBlocks() call.
+ LogicalPartition - TRUE if LBA 0 is the first block of a partition; otherwise
+ FALSE. For media with only one partition this would be TRUE.
+ ReadOnly - TRUE if the media is marked read-only otherwise, FALSE. This
+ field shows the read-only status as of the most recent
+ WriteBlocks () call.
+ WriteCaching - TRUE if the WriteBlock () function caches write data.
+ BlockSize - The intrinsic block size of the device. If the media changes, then
+ this field is updated.
+ IoAlign - Supplies the alignment requirement for any buffer to read or write
+ block(s).
+ LastBlock - The last logical block address on the device. If the media changes,
+ then this field is updated.
+
+--*/
+typedef struct {
+ UINT32 MediaId;
+ BOOLEAN RemovableMedia;
+ BOOLEAN MediaPresent;
+
+ BOOLEAN LogicalPartition;
+ BOOLEAN ReadOnly;
+ BOOLEAN WriteCaching;
+
+ UINT32 BlockSize;
+ UINT32 IoAlign;
+
+ EFI_LBA LastBlock;
+
+ EFI_LBA LowestAlignedLba;
+ UINT32 LogicalBlocksPerPhysicalBlock;
+} EFI_BLOCK_IO_MEDIA;
+
+#define EFI_BLOCK_IO_PROTOCOL_REVISION 0x00010000
+#define EFI_BLOCK_IO_PROTOCOL_REVISION2 0x00020001
+
+#define SIZE_OF_EFI_BLOCK_IO_MEDIA_REV1 ((UINTN)&((EFI_BLOCK_IO_MEDIA *)0)->LastBlock + sizeof(EFI_LBA))
+#define SIZE_OF_EFI_BLOCK_IO_MEDIA_REV2 sizeof(EFI_BLOCK_IO_MEDIA)
+
+typedef struct _EFI_BLOCK_IO_PROTOCOL {
+ UINT64 Revision;
+
+ EFI_BLOCK_IO_MEDIA *Media;
+
+ EFI_BLOCK_RESET Reset;
+ EFI_BLOCK_READ ReadBlocks;
+ EFI_BLOCK_WRITE WriteBlocks;
+ EFI_BLOCK_FLUSH FlushBlocks;
+
+} EFI_BLOCK_IO_PROTOCOL;
+
+extern EFI_GUID gEfiBlockIoProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/BusSpecificDriverOverride/BusSpecificDriverOverride.c b/EDK/Foundation/Efi/Protocol/BusSpecificDriverOverride/BusSpecificDriverOverride.c
new file mode 100644
index 0000000..15a5721
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/BusSpecificDriverOverride/BusSpecificDriverOverride.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ BusSpecificDriverOverride.c
+
+Abstract:
+
+ Bus Specific Driver Override protocol as defined in the EFI 1.1 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (BusSpecificDriverOverride)
+
+EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid = EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (
+ &gEfiBusSpecificDriverOverrideProtocolGuid, "Bus Specific Driver Override Protocol",
+ "EFI 1.1 Bus Specific Driver Override Protocol"
+ );
diff --git a/EDK/Foundation/Efi/Protocol/BusSpecificDriverOverride/BusSpecificDriverOverride.h b/EDK/Foundation/Efi/Protocol/BusSpecificDriverOverride/BusSpecificDriverOverride.h
new file mode 100644
index 0000000..36a95ba
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/BusSpecificDriverOverride/BusSpecificDriverOverride.h
@@ -0,0 +1,54 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ BusSpecificDriverOverride.h
+
+Abstract:
+
+ Bus Specific Driver Override protocol as defined in the EFI 1.1 specification.
+
+--*/
+
+#ifndef _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
+#define _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
+
+//
+// Global ID for the Bus Specific Driver Override Protocol
+//
+#define EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID \
+ { \
+ 0x3bc1b285, 0x8a15, 0x4a82, 0xaa, 0xbf, 0x4d, 0x7d, 0x13, 0xfb, 0x32, 0x65 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL);
+
+//
+// Prototypes for the Bus Specific Driver Override Protocol
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER) (
+ IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL * This,
+ IN OUT EFI_HANDLE * DriverImageHandle
+ );
+
+//
+// Interface structure for the Bus Specific Driver Override Protocol
+//
+typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL {
+ EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
+} EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL;
+
+extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/ComponentName/ComponentName.c b/EDK/Foundation/Efi/Protocol/ComponentName/ComponentName.c
new file mode 100644
index 0000000..14471e1
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ComponentName/ComponentName.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ComponentName.c
+
+Abstract:
+
+ EFI Component Name Protocol
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (ComponentName)
+
+EFI_GUID gEfiComponentNameProtocolGuid = EFI_COMPONENT_NAME_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiComponentNameProtocolGuid, "Component Name Protocol", "EFI 1.1 Component Name Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/ComponentName/ComponentName.h b/EDK/Foundation/Efi/Protocol/ComponentName/ComponentName.h
new file mode 100644
index 0000000..2b94ce5
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ComponentName/ComponentName.h
@@ -0,0 +1,137 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ComponentName.h
+
+Abstract:
+
+ EFI Component Name Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_COMPONENT_NAME_H_
+#define _EFI_COMPONENT_NAME_H_
+
+//
+// Global ID for the Component Name Protocol
+//
+#define EFI_COMPONENT_NAME_PROTOCOL_GUID \
+ { \
+ 0x107a772c, 0xd5e1, 0x11d4, 0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_COMPONENT_NAME_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
+ IN EFI_COMPONENT_NAME_PROTOCOL * This,
+ IN CHAR8 *Language,
+ OUT CHAR16 **DriverName
+ );
+
+/*++
+
+ Routine Description:
+ Retrieves a Unicode string that is the user readable name of the EFI Driver.
+
+ Arguments:
+ This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
+ Language - A pointer to a three character ISO 639-2 language identifier.
+ This is the language of the driver name that that the caller
+ is requesting, and it must match one of the languages specified
+ in SupportedLanguages. The number of languages supported by a
+ driver is up to the driver writer.
+ DriverName - A pointer to the Unicode string to return. This Unicode string
+ is the name of the driver specified by This in the language
+ specified by Language.
+
+ Returns:
+ EFI_SUCCESS - The Unicode string for the Driver specified by This
+ and the language specified by Language was returned
+ in DriverName.
+ EFI_INVALID_PARAMETER - Language is NULL.
+ EFI_INVALID_PARAMETER - DriverName is NULL.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ language specified by Language.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
+ IN EFI_COMPONENT_NAME_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
+ );
+
+/*++
+
+ Routine Description:
+ Retrieves a Unicode string that is the user readable name of the controller
+ that is being managed by an EFI Driver.
+
+ Arguments:
+ This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
+ ControllerHandle - The handle of a controller that the driver specified by
+ This is managing. This handle specifies the controller
+ whose name is to be returned.
+ ChildHandle - The handle of the child controller to retrieve the name
+ of. This is an optional parameter that may be NULL. It
+ will be NULL for device drivers. It will also be NULL
+ for a bus drivers that wish to retrieve the name of the
+ bus controller. It will not be NULL for a bus driver
+ that wishes to retrieve the name of a child controller.
+ Language - A pointer to a three character ISO 639-2 language
+ identifier. This is the language of the controller name
+ that that the caller is requesting, and it must match one
+ of the languages specified in SupportedLanguages. The
+ number of languages supported by a driver is up to the
+ driver writer.
+ ControllerName - A pointer to the Unicode string to return. This Unicode
+ string is the name of the controller specified by
+ ControllerHandle and ChildHandle in the language specified
+ by Language from the point of view of the driver specified
+ by This.
+
+ Returns:
+ EFI_SUCCESS - The Unicode string for the user readable name in the
+ language specified by Language for the driver
+ specified by This was returned in DriverName.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - Language is NULL.
+ EFI_INVALID_PARAMETER - ControllerName is NULL.
+ EFI_UNSUPPORTED - The driver specified by This is not currently managing
+ the controller specified by ControllerHandle and
+ ChildHandle.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ language specified by Language.
+
+--*/
+
+//
+// Interface structure for the Component Name Protocol
+//
+typedef struct _EFI_COMPONENT_NAME_PROTOCOL {
+ EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;
+ EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
+ CHAR8 *SupportedLanguages;
+} EFI_COMPONENT_NAME_PROTOCOL;
+
+extern EFI_GUID gEfiComponentNameProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/ComponentName2/ComponentName2.c b/EDK/Foundation/Efi/Protocol/ComponentName2/ComponentName2.c
new file mode 100644
index 0000000..f47ab5b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ComponentName2/ComponentName2.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ComponentName2.c
+
+Abstract:
+
+ EFI Component Name2 Protocol
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (ComponentName2)
+
+EFI_GUID gEfiComponentName2ProtocolGuid = EFI_COMPONENT_NAME2_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiComponentName2ProtocolGuid, "Component Name2 Protocol", "UEFI 2.0 Component Name2 Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/ComponentName2/ComponentName2.h b/EDK/Foundation/Efi/Protocol/ComponentName2/ComponentName2.h
new file mode 100644
index 0000000..b42607b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ComponentName2/ComponentName2.h
@@ -0,0 +1,136 @@
+/*++
+
+Copyright (c) 2004 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ComponentName2.h
+
+Abstract:
+
+ UEFI Component Name2 Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_COMPONENT_NAME2_H_
+#define _EFI_COMPONENT_NAME2_H_
+
+//
+// Global ID for the Component Name Protocol
+//
+
+#define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
+ { \
+ 0x6a7a5cff, 0xe8d9, 0x4f70, 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_COMPONENT_NAME2_PROTOCOL);
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) (
+ IN EFI_COMPONENT_NAME2_PROTOCOL * This,
+ IN CHAR8 *Language,
+ OUT CHAR16 **DriverName
+ );
+
+/*++
+
+ Routine Description:
+ Retrieves a Unicode string that is the user readable name of the EFI Driver.
+
+ Arguments:
+ This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
+ Language - A pointer to a three character RFC 3066 language identifier.
+ This is the language of the driver name that that the caller
+ is requesting, and it must match one of the languages specified
+ in SupportedLanguages. The number of languages supported by a
+ driver is up to the driver writer.
+ DriverName - A pointer to the Unicode string to return. This Unicode string
+ is the name of the driver specified by This in the language
+ specified by Language.
+
+ Returns:
+ EFI_SUCCESS - The Unicode string for the Driver specified by This
+ and the language specified by Language was returned
+ in DriverName.
+ EFI_INVALID_PARAMETER - Language is NULL or DriverName is NULL.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ language specified by Language.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) (
+ IN EFI_COMPONENT_NAME2_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
+ );
+
+/*++
+
+ Routine Description:
+ Retrieves a Unicode string that is the user readable name of the controller
+ that is being managed by an EFI Driver.
+
+ Arguments:
+ This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
+ ControllerHandle - The handle of a controller that the driver specified by
+ This is managing. This handle specifies the controller
+ whose name is to be returned.
+ ChildHandle - The handle of the child controller to retrieve the name
+ of. This is an optional parameter that may be NULL. It
+ will be NULL for device drivers. It will also be NULL
+ for a bus drivers that wish to retrieve the name of the
+ bus controller. It will not be NULL for a bus driver
+ that wishes to retrieve the name of a child controller.
+ Language - A pointer to a three character RFC 3066 language
+ identifier. This is the language of the controller name
+ that that the caller is requesting, and it must match one
+ of the languages specified in SupportedLanguages. The
+ number of languages supported by a driver is up to the
+ driver writer.
+ ControllerName - A pointer to the Unicode string to return. This Unicode
+ string is the name of the controller specified by
+ ControllerHandle and ChildHandle in the language specified
+ by Language from the point of view of the driver specified
+ by This.
+
+ Returns:
+ EFI_SUCCESS - The Unicode string for the user readable name in the
+ language specified by Language for the driver
+ specified by This was returned in DriverName.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE; ChildHandle
+ is not NULL and it is not a valid EFI_HANDLE;Language
+ is NULL;ControllerName is NULL.
+ EFI_UNSUPPORTED - The driver specified by This is not currently managing
+ the controller specified by ControllerHandle and
+ ChildHandle;The driver specified by This does not support the
+ language specified by Language.
+
+--*/
+
+//
+// Interface structure for the Component Name Protocol
+//
+typedef struct _EFI_COMPONENT_NAME2_PROTOCOL {
+ EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;
+ EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;
+ CHAR8 *SupportedLanguages;
+} EFI_COMPONENT_NAME2_PROTOCOL;
+
+extern EFI_GUID gEfiComponentName2ProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DebugPort/DebugPort.c b/EDK/Foundation/Efi/Protocol/DebugPort/DebugPort.c
new file mode 100644
index 0000000..6efef15
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DebugPort/DebugPort.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DebugPort.c
+
+Abstract:
+
+ DebugPort protocol as defined in the EFI 1.1 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DebugPort)
+
+EFI_GUID gEfiDebugPortProtocolGuid = EFI_DEBUGPORT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDebugPortProtocolGuid, "DebugPort Protocol", "EFI 1.1 DebugPort Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DebugPort/DebugPort.h b/EDK/Foundation/Efi/Protocol/DebugPort/DebugPort.h
new file mode 100644
index 0000000..6d2e1c9
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DebugPort/DebugPort.h
@@ -0,0 +1,98 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DebugPort.h
+
+Abstract:
+
+--*/
+
+#ifndef _DEBUG_PORT_H_
+#define _DEBUG_PORT_H_
+
+#include "EfiApi.h"
+
+//
+// DebugPortIo protocol {EBA4E8D2-3858-41EC-A281-2647BA9660D0}
+//
+#define EFI_DEBUGPORT_PROTOCOL_GUID \
+ { \
+ 0xEBA4E8D2, 0x3858, 0x41EC, 0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 \
+ }
+
+extern EFI_GUID gEfiDebugPortProtocolGuid;
+
+EFI_FORWARD_DECLARATION (EFI_DEBUGPORT_PROTOCOL);
+
+//
+// DebugPort member functions
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DEBUGPORT_RESET) (
+ IN EFI_DEBUGPORT_PROTOCOL * This
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DEBUGPORT_WRITE) (
+ IN EFI_DEBUGPORT_PROTOCOL * This,
+ IN UINT32 Timeout,
+ IN OUT UINTN *BufferSize,
+ IN VOID *Buffer
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DEBUGPORT_READ) (
+ IN EFI_DEBUGPORT_PROTOCOL * This,
+ IN UINT32 Timeout,
+ IN OUT UINTN *BufferSize,
+ OUT VOID *Buffer
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DEBUGPORT_POLL) (
+ IN EFI_DEBUGPORT_PROTOCOL * This
+ );
+
+//
+// DebugPort protocol definition
+//
+typedef struct _EFI_DEBUGPORT_PROTOCOL {
+ EFI_DEBUGPORT_RESET Reset;
+ EFI_DEBUGPORT_WRITE Write;
+ EFI_DEBUGPORT_READ Read;
+ EFI_DEBUGPORT_POLL Poll;
+} EFI_DEBUGPORT_PROTOCOL;
+
+//
+// DEBUGPORT variable definitions...
+//
+#define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
+#define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
+#define gEfiDebugPortVariableGuid gEfiDebugPortProtocolGuid
+
+//
+// DebugPort device path definitions...
+//
+#define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
+#define gEfiDebugPortDevicePathGuid gEfiDebugPortProtocolGuid
+
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID Guid;
+} DEBUGPORT_DEVICE_PATH;
+
+#endif /* _DEBUG_PORT_H_ */
diff --git a/EDK/Foundation/Efi/Protocol/DebugSupport/DebugSupport.c b/EDK/Foundation/Efi/Protocol/DebugSupport/DebugSupport.c
new file mode 100644
index 0000000..c073f68
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DebugSupport/DebugSupport.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DebugSupport.c
+
+Abstract:
+
+ DebugSupport protocol as defined in the EFI 1.1 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DebugSupport)
+
+EFI_GUID gEfiDebugSupportProtocolGuid = EFI_DEBUG_SUPPORT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDebugSupportProtocolGuid, "DebugSupport Protocol", "EFI 1.1 DebugSupport Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DebugSupport/DebugSupport.h b/EDK/Foundation/Efi/Protocol/DebugSupport/DebugSupport.h
new file mode 100644
index 0000000..345d232
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DebugSupport/DebugSupport.h
@@ -0,0 +1,594 @@
+/*++
+
+Copyright (c) 2004 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DebugSupport.h
+
+Abstract:
+
+ DebugSupport protocol and supporting definitions as defined in the EFI 1.1
+ specification.
+
+ The DebugSupport protocol is used by source level debuggers to abstract the
+ processor and handle context save and restore operations.
+
+--*/
+
+#ifndef _DEBUG_SUPPORT_H_
+#define _DEBUG_SUPPORT_H_
+
+#include "EfiApi.h"
+#include "EfiImage.h"
+//
+// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}
+//
+#define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
+ { \
+ 0x2755590C, 0x6F3C, 0x42FA, 0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 \
+ }
+
+//
+// Debug Support definitions
+//
+typedef INTN EFI_EXCEPTION_TYPE;
+
+//
+// IA-32 processor exception types
+//
+#define EXCEPT_IA32_DIVIDE_ERROR 0
+#define EXCEPT_IA32_DEBUG 1
+#define EXCEPT_IA32_NMI 2
+#define EXCEPT_IA32_BREAKPOINT 3
+#define EXCEPT_IA32_OVERFLOW 4
+#define EXCEPT_IA32_BOUND 5
+#define EXCEPT_IA32_INVALID_OPCODE 6
+#define EXCEPT_IA32_DOUBLE_FAULT 8
+#define EXCEPT_IA32_INVALID_TSS 10
+#define EXCEPT_IA32_SEG_NOT_PRESENT 11
+#define EXCEPT_IA32_STACK_FAULT 12
+#define EXCEPT_IA32_GP_FAULT 13
+#define EXCEPT_IA32_PAGE_FAULT 14
+#define EXCEPT_IA32_FP_ERROR 16
+#define EXCEPT_IA32_ALIGNMENT_CHECK 17
+#define EXCEPT_IA32_MACHINE_CHECK 18
+#define EXCEPT_IA32_SIMD 19
+
+//
+// IA-32 processor context definition
+//
+//
+// FXSAVE_STATE
+// FP / MMX / XMM registers (see fxrstor instruction definition)
+//
+typedef struct {
+ UINT16 Fcw;
+ UINT16 Fsw;
+ UINT16 Ftw;
+ UINT16 Opcode;
+ UINT32 Eip;
+ UINT16 Cs;
+ UINT16 Reserved1;
+ UINT32 DataOffset;
+ UINT16 Ds;
+ UINT8 Reserved2[10];
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ UINT8 St0Mm0[10], Reserved3[6];
+ UINT8 St1Mm1[10], Reserved4[6];
+ UINT8 St2Mm2[10], Reserved5[6];
+ UINT8 St3Mm3[10], Reserved6[6];
+ UINT8 St4Mm4[10], Reserved7[6];
+ UINT8 St5Mm5[10], Reserved8[6];
+ UINT8 St6Mm6[10], Reserved9[6];
+ UINT8 St7Mm7[10], Reserved10[6];
+ UINT8 Xmm0[16];
+ UINT8 Xmm1[16];
+ UINT8 Xmm2[16];
+ UINT8 Xmm3[16];
+ UINT8 Xmm4[16];
+ UINT8 Xmm5[16];
+ UINT8 Xmm6[16];
+ UINT8 Xmm7[16];
+ UINT8 Reserved11[14 * 16];
+} EFI_FX_SAVE_STATE_IA32;
+#else
+ UINT8 St0Mm0[10], Reserved3[6];
+ UINT8 St0Mm1[10], Reserved4[6];
+ UINT8 St0Mm2[10], Reserved5[6];
+ UINT8 St0Mm3[10], Reserved6[6];
+ UINT8 St0Mm4[10], Reserved7[6];
+ UINT8 St0Mm5[10], Reserved8[6];
+ UINT8 St0Mm6[10], Reserved9[6];
+ UINT8 St0Mm7[10], Reserved10[6];
+ UINT8 Reserved11[22 * 16];
+} EFI_FX_SAVE_STATE;
+#endif
+
+typedef struct {
+ UINT32 ExceptionData;
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ EFI_FX_SAVE_STATE_IA32 FxSaveState;
+#else
+ EFI_FX_SAVE_STATE FxSaveState;
+#endif
+ UINT32 Dr0;
+ UINT32 Dr1;
+ UINT32 Dr2;
+ UINT32 Dr3;
+ UINT32 Dr6;
+ UINT32 Dr7;
+ UINT32 Cr0;
+ UINT32 Cr1; /* Reserved */
+ UINT32 Cr2;
+ UINT32 Cr3;
+ UINT32 Cr4;
+ UINT32 Eflags;
+ UINT32 Ldtr;
+ UINT32 Tr;
+ UINT32 Gdtr[2];
+ UINT32 Idtr[2];
+ UINT32 Eip;
+ UINT32 Gs;
+ UINT32 Fs;
+ UINT32 Es;
+ UINT32 Ds;
+ UINT32 Cs;
+ UINT32 Ss;
+ UINT32 Edi;
+ UINT32 Esi;
+ UINT32 Ebp;
+ UINT32 Esp;
+ UINT32 Ebx;
+ UINT32 Edx;
+ UINT32 Ecx;
+ UINT32 Eax;
+} EFI_SYSTEM_CONTEXT_IA32;
+
+//
+// X64 processor exception types
+//
+#define EXCEPT_X64_DIVIDE_ERROR 0
+#define EXCEPT_X64_DEBUG 1
+#define EXCEPT_X64_NMI 2
+#define EXCEPT_X64_BREAKPOINT 3
+#define EXCEPT_X64_OVERFLOW 4
+#define EXCEPT_X64_BOUND 5
+#define EXCEPT_X64_INVALID_OPCODE 6
+#define EXCEPT_X64_DOUBLE_FAULT 8
+#define EXCEPT_X64_INVALID_TSS 10
+#define EXCEPT_X64_SEG_NOT_PRESENT 11
+#define EXCEPT_X64_STACK_FAULT 12
+#define EXCEPT_X64_GP_FAULT 13
+#define EXCEPT_X64_PAGE_FAULT 14
+#define EXCEPT_X64_FP_ERROR 16
+#define EXCEPT_X64_ALIGNMENT_CHECK 17
+#define EXCEPT_X64_MACHINE_CHECK 18
+#define EXCEPT_X64_SIMD 19
+
+//
+// X64 processor context definition
+//
+// FXSAVE_STATE
+// FP / MMX / XMM registers (see fxrstor instruction definition)
+//
+typedef struct {
+ UINT16 Fcw;
+ UINT16 Fsw;
+ UINT16 Ftw;
+ UINT16 Opcode;
+ UINT64 Rip;
+ UINT64 DataOffset;
+ UINT8 Reserved1[8];
+ UINT8 St0Mm0[10], Reserved2[6];
+ UINT8 St1Mm1[10], Reserved3[6];
+ UINT8 St2Mm2[10], Reserved4[6];
+ UINT8 St3Mm3[10], Reserved5[6];
+ UINT8 St4Mm4[10], Reserved6[6];
+ UINT8 St5Mm5[10], Reserved7[6];
+ UINT8 St6Mm6[10], Reserved8[6];
+ UINT8 St7Mm7[10], Reserved9[6];
+ UINT8 Xmm0[16];
+ UINT8 Xmm1[16];
+ UINT8 Xmm2[16];
+ UINT8 Xmm3[16];
+ UINT8 Xmm4[16];
+ UINT8 Xmm5[16];
+ UINT8 Xmm6[16];
+ UINT8 Xmm7[16];
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ //
+ // NOTE: UEFI 2.0 spec definition as follows. It should be updated
+ // after spec update.
+ //
+ UINT8 Reserved11[14 * 16];
+#else
+ UINT8 Xmm8[16];
+ UINT8 Xmm9[16];
+ UINT8 Xmm10[16];
+ UINT8 Xmm11[16];
+ UINT8 Xmm12[16];
+ UINT8 Xmm13[16];
+ UINT8 Xmm14[16];
+ UINT8 Xmm15[16];
+ UINT8 Reserved10[6 * 16];
+#endif
+} EFI_FX_SAVE_STATE_X64;
+
+typedef struct {
+ UINT64 ExceptionData;
+ EFI_FX_SAVE_STATE_X64 FxSaveState;
+ UINT64 Dr0;
+ UINT64 Dr1;
+ UINT64 Dr2;
+ UINT64 Dr3;
+ UINT64 Dr6;
+ UINT64 Dr7;
+ UINT64 Cr0;
+ UINT64 Cr1; /* Reserved */
+ UINT64 Cr2;
+ UINT64 Cr3;
+ UINT64 Cr4;
+ UINT64 Cr8;
+ UINT64 Rflags;
+ UINT64 Ldtr;
+ UINT64 Tr;
+ UINT64 Gdtr[2];
+ UINT64 Idtr[2];
+ UINT64 Rip;
+ UINT64 Gs;
+ UINT64 Fs;
+ UINT64 Es;
+ UINT64 Ds;
+ UINT64 Cs;
+ UINT64 Ss;
+ UINT64 Rdi;
+ UINT64 Rsi;
+ UINT64 Rbp;
+ UINT64 Rsp;
+ UINT64 Rbx;
+ UINT64 Rdx;
+ UINT64 Rcx;
+ UINT64 Rax;
+ UINT64 R8;
+ UINT64 R9;
+ UINT64 R10;
+ UINT64 R11;
+ UINT64 R12;
+ UINT64 R13;
+ UINT64 R14;
+ UINT64 R15;
+} EFI_SYSTEM_CONTEXT_X64;
+
+//
+// IPF processor exception types
+//
+#define EXCEPT_IPF_VHTP_TRANSLATION 0
+#define EXCEPT_IPF_INSTRUCTION_TLB 1
+#define EXCEPT_IPF_DATA_TLB 2
+#define EXCEPT_IPF_ALT_INSTRUCTION_TLB 3
+#define EXCEPT_IPF_ALT_DATA_TLB 4
+#define EXCEPT_IPF_DATA_NESTED_TLB 5
+#define EXCEPT_IPF_INSTRUCTION_KEY_MISSED 6
+#define EXCEPT_IPF_DATA_KEY_MISSED 7
+#define EXCEPT_IPF_DIRTY_BIT 8
+#define EXCEPT_IPF_INSTRUCTION_ACCESS_BIT 9
+#define EXCEPT_IPF_DATA_ACCESS_BIT 10
+#define EXCEPT_IPF_BREAKPOINT 11
+#define EXCEPT_IPF_EXTERNAL_INTERRUPT 12
+//
+// 13 - 19 reserved
+//
+#define EXCEPT_IPF_PAGE_NOT_PRESENT 20
+#define EXCEPT_IPF_KEY_PERMISSION 21
+#define EXCEPT_IPF_INSTRUCTION_ACCESS_RIGHTS 22
+#define EXCEPT_IPF_DATA_ACCESS_RIGHTS 23
+#define EXCEPT_IPF_GENERAL_EXCEPTION 24
+#define EXCEPT_IPF_DISABLED_FP_REGISTER 25
+#define EXCEPT_IPF_NAT_CONSUMPTION 26
+#define EXCEPT_IPF_SPECULATION 27
+//
+// 28 reserved
+//
+#define EXCEPT_IPF_DEBUG 29
+#define EXCEPT_IPF_UNALIGNED_REFERENCE 30
+#define EXCEPT_IPF_UNSUPPORTED_DATA_REFERENCE 31
+#define EXCEPT_IPF_FP_FAULT 32
+#define EXCEPT_IPF_FP_TRAP 33
+#define EXCEPT_IPF_LOWER_PRIVILEGE_TRANSFER_TRAP 34
+#define EXCEPT_IPF_TAKEN_BRANCH 35
+#define EXCEPT_IPF_SINGLE_STEP 36
+//
+// 37 - 44 reserved
+//
+#define EXCEPT_IPF_IA32_EXCEPTION 45
+#define EXCEPT_IPF_IA32_INTERCEPT 46
+#define EXCEPT_IPF_IA32_INTERRUPT 47
+
+//
+// IPF processor context definition
+//
+typedef struct {
+ //
+ // The first reserved field is necessary to preserve alignment for the correct
+ // bits in UNAT and to insure F2 is 16 byte aligned..
+ //
+ UINT64 Reserved;
+ UINT64 R1;
+ UINT64 R2;
+ UINT64 R3;
+ UINT64 R4;
+ UINT64 R5;
+ UINT64 R6;
+ UINT64 R7;
+ UINT64 R8;
+ UINT64 R9;
+ UINT64 R10;
+ UINT64 R11;
+ UINT64 R12;
+ UINT64 R13;
+ UINT64 R14;
+ UINT64 R15;
+ UINT64 R16;
+ UINT64 R17;
+ UINT64 R18;
+ UINT64 R19;
+ UINT64 R20;
+ UINT64 R21;
+ UINT64 R22;
+ UINT64 R23;
+ UINT64 R24;
+ UINT64 R25;
+ UINT64 R26;
+ UINT64 R27;
+ UINT64 R28;
+ UINT64 R29;
+ UINT64 R30;
+ UINT64 R31;
+
+ UINT64 F2[2];
+ UINT64 F3[2];
+ UINT64 F4[2];
+ UINT64 F5[2];
+ UINT64 F6[2];
+ UINT64 F7[2];
+ UINT64 F8[2];
+ UINT64 F9[2];
+ UINT64 F10[2];
+ UINT64 F11[2];
+ UINT64 F12[2];
+ UINT64 F13[2];
+ UINT64 F14[2];
+ UINT64 F15[2];
+ UINT64 F16[2];
+ UINT64 F17[2];
+ UINT64 F18[2];
+ UINT64 F19[2];
+ UINT64 F20[2];
+ UINT64 F21[2];
+ UINT64 F22[2];
+ UINT64 F23[2];
+ UINT64 F24[2];
+ UINT64 F25[2];
+ UINT64 F26[2];
+ UINT64 F27[2];
+ UINT64 F28[2];
+ UINT64 F29[2];
+ UINT64 F30[2];
+ UINT64 F31[2];
+
+ UINT64 Pr;
+
+ UINT64 B0;
+ UINT64 B1;
+ UINT64 B2;
+ UINT64 B3;
+ UINT64 B4;
+ UINT64 B5;
+ UINT64 B6;
+ UINT64 B7;
+
+ //
+ // application registers
+ //
+ UINT64 ArRsc;
+ UINT64 ArBsp;
+ UINT64 ArBspstore;
+ UINT64 ArRnat;
+
+ UINT64 ArFcr;
+
+ UINT64 ArEflag;
+ UINT64 ArCsd;
+ UINT64 ArSsd;
+ UINT64 ArCflg;
+ UINT64 ArFsr;
+ UINT64 ArFir;
+ UINT64 ArFdr;
+
+ UINT64 ArCcv;
+
+ UINT64 ArUnat;
+
+ UINT64 ArFpsr;
+
+ UINT64 ArPfs;
+ UINT64 ArLc;
+ UINT64 ArEc;
+
+ //
+ // control registers
+ //
+ UINT64 CrDcr;
+ UINT64 CrItm;
+ UINT64 CrIva;
+ UINT64 CrPta;
+ UINT64 CrIpsr;
+ UINT64 CrIsr;
+ UINT64 CrIip;
+ UINT64 CrIfa;
+ UINT64 CrItir;
+ UINT64 CrIipa;
+ UINT64 CrIfs;
+ UINT64 CrIim;
+ UINT64 CrIha;
+
+ //
+ // debug registers
+ //
+ UINT64 Dbr0;
+ UINT64 Dbr1;
+ UINT64 Dbr2;
+ UINT64 Dbr3;
+ UINT64 Dbr4;
+ UINT64 Dbr5;
+ UINT64 Dbr6;
+ UINT64 Dbr7;
+
+ UINT64 Ibr0;
+ UINT64 Ibr1;
+ UINT64 Ibr2;
+ UINT64 Ibr3;
+ UINT64 Ibr4;
+ UINT64 Ibr5;
+ UINT64 Ibr6;
+ UINT64 Ibr7;
+
+ //
+ // virtual registers - nat bits for R1-R31
+ //
+ UINT64 IntNat;
+
+} EFI_SYSTEM_CONTEXT_IPF;
+
+//
+// EBC processor exception types
+//
+#define EXCEPT_EBC_UNDEFINED 0
+#define EXCEPT_EBC_DIVIDE_ERROR 1
+#define EXCEPT_EBC_DEBUG 2
+#define EXCEPT_EBC_BREAKPOINT 3
+#define EXCEPT_EBC_OVERFLOW 4
+#define EXCEPT_EBC_INVALID_OPCODE 5 // opcode out of range
+#define EXCEPT_EBC_STACK_FAULT 6
+#define EXCEPT_EBC_ALIGNMENT_CHECK 7
+#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 // malformed instruction
+#define EXCEPT_EBC_BAD_BREAK 9 // BREAK 0 or undefined BREAK
+#define EXCEPT_EBC_STEP 10 // to support debug stepping
+//
+// For coding convenience, define the maximum valid EBC exception.
+//
+#define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP
+
+//
+// EBC processor context definition
+//
+typedef struct {
+ UINT64 R0;
+ UINT64 R1;
+ UINT64 R2;
+ UINT64 R3;
+ UINT64 R4;
+ UINT64 R5;
+ UINT64 R6;
+ UINT64 R7;
+ UINT64 Flags;
+ UINT64 ControlFlags;
+ UINT64 Ip;
+} EFI_SYSTEM_CONTEXT_EBC;
+
+//
+// Universal EFI_SYSTEM_CONTEXT definition
+//
+typedef union {
+ EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc;
+ EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32;
+ EFI_SYSTEM_CONTEXT_X64 *SystemContextX64;
+ EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf;
+} EFI_SYSTEM_CONTEXT;
+
+//
+// DebugSupport callback function prototypes
+//
+typedef
+VOID
+(*EFI_EXCEPTION_CALLBACK) (
+ IN EFI_EXCEPTION_TYPE ExceptionType,
+ IN OUT EFI_SYSTEM_CONTEXT SystemContext
+ );
+
+typedef
+VOID
+(*EFI_PERIODIC_CALLBACK) (
+ IN OUT EFI_SYSTEM_CONTEXT SystemContext
+ );
+
+//
+// Machine type definition
+//
+typedef enum {
+ IsaIa32 = EFI_IMAGE_MACHINE_IA32,
+ IsaX64 = EFI_IMAGE_MACHINE_X64,
+ IsaIpf = EFI_IMAGE_MACHINE_IA64,
+ IsaEbc = EFI_IMAGE_MACHINE_EBC
+} EFI_INSTRUCTION_SET_ARCHITECTURE;
+
+EFI_FORWARD_DECLARATION (EFI_DEBUG_SUPPORT_PROTOCOL);
+
+//
+// DebugSupport member function definitions
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_MAXIMUM_PROCESSOR_INDEX) (
+ IN EFI_DEBUG_SUPPORT_PROTOCOL * This,
+ OUT UINTN *MaxProcessorIndex
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REGISTER_PERIODIC_CALLBACK) (
+ IN EFI_DEBUG_SUPPORT_PROTOCOL * This,
+ IN UINTN ProcessorIndex,
+ IN EFI_PERIODIC_CALLBACK PeriodicCallback
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REGISTER_EXCEPTION_CALLBACK) (
+ IN EFI_DEBUG_SUPPORT_PROTOCOL * This,
+ IN UINTN ProcessorIndex,
+ IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
+ IN EFI_EXCEPTION_TYPE ExceptionType
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_INVALIDATE_INSTRUCTION_CACHE) (
+ IN EFI_DEBUG_SUPPORT_PROTOCOL * This,
+ IN UINTN ProcessorIndex,
+ IN VOID *Start,
+ IN UINT64 Length
+ );
+
+//
+// DebugSupport protocol definition
+//
+typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL {
+ EFI_INSTRUCTION_SET_ARCHITECTURE Isa;
+ EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex;
+ EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback;
+ EFI_REGISTER_EXCEPTION_CALLBACK RegisterExceptionCallback;
+ EFI_INVALIDATE_INSTRUCTION_CACHE InvalidateInstructionCache;
+} EFI_DEBUG_SUPPORT_PROTOCOL;
+
+extern EFI_GUID gEfiDebugSupportProtocolGuid;
+
+#endif /* _DEBUG_SUPPORT_H_ */
diff --git a/EDK/Foundation/Efi/Protocol/Decompress/Decompress.c b/EDK/Foundation/Efi/Protocol/Decompress/Decompress.c
new file mode 100644
index 0000000..c91d1f7
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Decompress/Decompress.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Decompress.c
+
+Abstract:
+
+ The GUID for the EFI Decompress Protocol
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Decompress)
+
+EFI_GUID gEfiDecompressProtocolGuid = EFI_DECOMPRESS_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDecompressProtocolGuid, "Decompress", "Decompression Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/Decompress/Decompress.h b/EDK/Foundation/Efi/Protocol/Decompress/Decompress.h
new file mode 100644
index 0000000..73165ad
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Decompress/Decompress.h
@@ -0,0 +1,140 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Decompress.h
+
+Abstract:
+
+ The Decompress Protocol Interface
+
+--*/
+
+#ifndef _DECOMPRESS_H_
+#define _DECOMPRESS_H_
+
+#define EFI_DECOMPRESS_PROTOCOL_GUID \
+ { \
+ 0xd8117cfe, 0x94a6, 0x11d4, 0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_DECOMPRESS_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DECOMPRESS_GET_INFO) (
+ IN EFI_DECOMPRESS_PROTOCOL * This,
+ IN VOID *Source,
+ IN UINT32 SourceSize,
+ OUT UINT32 *DestinationSize,
+ OUT UINT32 *ScratchSize
+ );
+
+/*++
+
+Routine Description:
+
+ The GetInfo() function retrieves the size of the uncompressed buffer
+ and the temporary scratch buffer required to decompress the buffer
+ specified by Source and SourceSize. If the size of the uncompressed
+ buffer or the size of the scratch buffer cannot be determined from
+ the compressed data specified by Source and SourceData, then
+ EFI_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed
+ buffer is returned in DestinationSize, the size of the scratch buffer is
+ returned in ScratchSize, and EFI_SUCCESS is returned.
+
+ The GetInfo() function does not have scratch buffer available to perform
+ a thorough checking of the validity of the source data. It just retrieves
+ the 'Original Size' field from the beginning bytes of the source data and
+ output it as DestinationSize. And ScratchSize is specific to the decompression
+ implementation.
+
+Arguments:
+
+ This - The protocol instance pointer
+ Source - The source buffer containing the compressed data.
+ SourceSize - The size, in bytes, of source buffer.
+ DestinationSize - A pointer to the size, in bytes, of the uncompressed buffer
+ that will be generated when the compressed buffer specified
+ by Source and SourceSize is decompressed.
+ ScratchSize - A pointer to the size, in bytes, of the scratch buffer that
+ is required to decompress the compressed buffer specified by
+ Source and SourceSize.
+
+Returns:
+ EFI_SUCCESS - The size of the uncompressed data was returned in DestinationSize
+ and the size of the scratch buffer was returned in ScratchSize.
+ EFI_INVALID_PARAMETER - The size of the uncompressed data or the size of the scratch
+ buffer cannot be determined from the compressed data specified by
+ Source and SourceData.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DECOMPRESS_DECOMPRESS) (
+ IN EFI_DECOMPRESS_PROTOCOL * This,
+ IN VOID *Source,
+ IN UINT32 SourceSize,
+ IN OUT VOID *Destination,
+ IN UINT32 DestinationSize,
+ IN OUT VOID *Scratch,
+ IN UINT32 ScratchSize
+ );
+
+/*++
+
+Routine Description:
+
+ The Decompress() function extracts decompressed data to its original form.
+
+ This protocol is designed so that the decompression algorithm can be
+ implemented without using any memory services. As a result, the
+ Decompress() function is not allowed to call AllocatePool() or
+ AllocatePages() in its implementation. It is the caller's responsibility
+ to allocate and free the Destination and Scratch buffers.
+
+ If the compressed source data specified by Source and SourceSize is
+ sucessfully decompressed into Destination, then EFI_SUCCESS is returned.
+ If the compressed source data specified by Source and SourceSize is not in
+ a valid compressed data format, then EFI_INVALID_PARAMETER is returned.
+
+Arguments:
+
+ This - The protocol instance pointer
+ Source - The source buffer containing the compressed data.
+ SourceSize - The size of source data.
+ Destination - On output, the destination buffer that contains
+ the uncompressed data.
+ DestinationSize - The size of destination buffer. The size of destination
+ buffer needed is obtained from GetInfo().
+ Scratch - A temporary scratch buffer that is used to perform the
+ decompression.
+ ScratchSize - The size of scratch buffer. The size of scratch buffer needed
+ is obtained from GetInfo().
+
+Returns:
+
+ EFI_SUCCESS - Decompression completed successfully, and the uncompressed
+ buffer is returned in Destination.
+ EFI_INVALID_PARAMETER
+ - The source buffer specified by Source and SourceSize is
+ corrupted (not in a valid compressed format).
+
+--*/
+typedef struct _EFI_DECOMPRESS_PROTOCOL {
+ EFI_DECOMPRESS_GET_INFO GetInfo;
+ EFI_DECOMPRESS_DECOMPRESS Decompress;
+} EFI_DECOMPRESS_PROTOCOL;
+
+extern EFI_GUID gEfiDecompressProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DeviceIO/DeviceIO.c b/EDK/Foundation/Efi/Protocol/DeviceIO/DeviceIO.c
new file mode 100644
index 0000000..27476a7
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DeviceIO/DeviceIO.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DeviceIo.c
+
+Abstract:
+
+ Device IO protocol as defined in the EFI 1.0 specification.
+
+ Device IO is used to abstract hardware access to devices. It includes
+ memory mapped IO, IO, PCI Config space, and DMA.
+
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DeviceIo)
+
+EFI_GUID gEfiDeviceIoProtocolGuid = EFI_DEVICE_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDeviceIoProtocolGuid, "DeviceIo Protocol", "EFI 1.0 Device IO Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DeviceIO/DeviceIO.h b/EDK/Foundation/Efi/Protocol/DeviceIO/DeviceIO.h
new file mode 100644
index 0000000..c0a30e3
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DeviceIO/DeviceIO.h
@@ -0,0 +1,132 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DeviceIo.h
+
+Abstract:
+
+ Device IO protocol as defined in the EFI 1.0 specification.
+
+ Device IO is used to abstract hardware access to devices. It includes
+ memory mapped IO, IO, PCI Config space, and DMA.
+
+
+--*/
+
+#ifndef _DEVICE_IO_H_
+#define _DEVICE_IO_H_
+
+#define EFI_DEVICE_IO_PROTOCOL_GUID \
+ { \
+ 0xaf6ac311, 0x84c3, 0x11d2, 0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_DEVICE_IO_PROTOCOL);
+
+typedef enum {
+ IO_UINT8,
+ IO_UINT16,
+ IO_UINT32,
+ IO_UINT64,
+ MMIO_COPY_UINT8,
+ MMIO_COPY_UINT16,
+ MMIO_COPY_UINT32,
+ MMIO_COPY_UINT64
+} EFI_IO_WIDTH;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DEVICE_IO) (
+ IN EFI_DEVICE_IO_PROTOCOL * This,
+ IN EFI_IO_WIDTH Width,
+ IN UINT64 Address,
+ IN UINTN Count,
+ IN OUT VOID *Buffer
+ );
+
+typedef struct {
+ EFI_DEVICE_IO Read;
+ EFI_DEVICE_IO Write;
+} EFI_IO_ACCESS;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_DEVICE_PATH) (
+ IN EFI_DEVICE_IO_PROTOCOL * This,
+ IN UINT64 Address,
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **PciDevicePath
+ );
+
+typedef enum {
+ EfiBusMasterRead,
+ EfiBusMasterWrite,
+ EfiBusMasterCommonBuffer
+} EFI_IO_OPERATION_TYPE;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IO_MAP) (
+ IN EFI_DEVICE_IO_PROTOCOL * This,
+ IN EFI_IO_OPERATION_TYPE Operation,
+ IN EFI_PHYSICAL_ADDRESS * HostAddress,
+ IN OUT UINTN *NumberOfBytes,
+ OUT EFI_PHYSICAL_ADDRESS * DeviceAddress,
+ OUT VOID **Mapping
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IO_UNMAP) (
+ IN EFI_DEVICE_IO_PROTOCOL * This,
+ IN VOID *Mapping
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IO_ALLOCATE_BUFFER) (
+ IN EFI_DEVICE_IO_PROTOCOL * This,
+ IN EFI_ALLOCATE_TYPE Type,
+ IN EFI_MEMORY_TYPE MemoryType,
+ IN UINTN Pages,
+ IN OUT EFI_PHYSICAL_ADDRESS * HostAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IO_FLUSH) (
+ IN EFI_DEVICE_IO_PROTOCOL * This
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IO_FREE_BUFFER) (
+ IN EFI_DEVICE_IO_PROTOCOL * This,
+ IN UINTN Pages,
+ IN EFI_PHYSICAL_ADDRESS HostAddress
+ );
+
+typedef struct _EFI_DEVICE_IO_PROTOCOL {
+ EFI_IO_ACCESS Mem;
+ EFI_IO_ACCESS Io;
+ EFI_IO_ACCESS Pci;
+ EFI_IO_MAP Map;
+ EFI_PCI_DEVICE_PATH PciDevicePath;
+ EFI_IO_UNMAP Unmap;
+ EFI_IO_ALLOCATE_BUFFER AllocateBuffer;
+ EFI_IO_FLUSH Flush;
+ EFI_IO_FREE_BUFFER FreeBuffer;
+} EFI_DEVICE_IO_PROTOCOL;
+
+extern EFI_GUID gEfiDeviceIoProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DevicePath/DevicePath.c b/EDK/Foundation/Efi/Protocol/DevicePath/DevicePath.c
new file mode 100644
index 0000000..71b58a1
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DevicePath/DevicePath.c
@@ -0,0 +1,32 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DevicePath.c
+
+Abstract:
+
+ The device path protocol as defined in EFI 1.0.
+
+ The device path represents a programatic path to a device. It's the view
+ from a software point of view. It also must persist from boot to boot, so
+ it can not contain things like PCI bus numbers that change from boot to boot.
+
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DevicePath)
+
+EFI_GUID gEfiDevicePathProtocolGuid = EFI_DEVICE_PATH_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDevicePathProtocolGuid, "Device Path Protocol", "EFI 1.0 Device Path protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DevicePath/DevicePath.h b/EDK/Foundation/Efi/Protocol/DevicePath/DevicePath.h
new file mode 100644
index 0000000..ddca0dc
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DevicePath/DevicePath.h
@@ -0,0 +1,67 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DevicePath.h
+
+Abstract:
+
+ The device path protocol as defined in EFI 1.0.
+
+ The device path represents a programatic path to a device. It's the view
+ from a software point of view. It also must persist from boot to boot, so
+ it can not contain things like PCI bus numbers that change from boot to boot.
+
+
+--*/
+
+#ifndef _DEVICE_PATH_H_
+#define _DEVICE_PATH_H_
+
+//
+// Device Path protocol
+//
+#define EFI_DEVICE_PATH_PROTOCOL_GUID \
+ { \
+ 0x9576e91, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+#pragma pack(push, 1)
+
+typedef struct {
+ UINT8 Type;
+ UINT8 SubType;
+ UINT8 Length[2];
+} EFI_DEVICE_PATH_PROTOCOL;
+
+#pragma pack(pop)
+
+#define EFI_END_ENTIRE_DEVICE_PATH 0xff
+#define EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
+#define EFI_END_INSTANCE_DEVICE_PATH 0x01
+#define EFI_END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))
+
+#define EfiDevicePathNodeLength(a) (((a)->Length[0]) | ((a)->Length[1] << 8))
+#define EfiNextDevicePathNode(a) ((EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *) (a)) + EfiDevicePathNodeLength (a)))
+
+#define EfiDevicePathType(a) (((a)->Type) & 0x7f)
+#define EfiIsDevicePathEndType(a) (EfiDevicePathType (a) == 0x7f)
+
+#define EfiIsDevicePathEndSubType(a) ((a)->SubType == EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE)
+#define EfiIsDevicePathEndInstanceSubType(a) ((a)->SubType == EFI_END_INSTANCE_DEVICE_PATH)
+
+#define EfiIsDevicePathEnd(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndSubType (a))
+#define EfiIsDevicePathEndInstance(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndInstanceSubType (a))
+
+extern EFI_GUID gEfiDevicePathProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DevicePathFromText/DevicePathFromText.c b/EDK/Foundation/Efi/Protocol/DevicePathFromText/DevicePathFromText.c
new file mode 100644
index 0000000..296fc56
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DevicePathFromText/DevicePathFromText.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DevicePathFromText.c
+
+Abstract:
+
+ DevicePathFromText protocol as defined in the UEFI 2.0 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DevicePathFromText)
+
+EFI_GUID gEfiDevicePathFromTextProtocolGuid = EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDevicePathFromTextProtocolGuid, "Device Path From Text Protocol", "UEFI 2.0 Device Path From Text Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DevicePathFromText/DevicePathFromText.h b/EDK/Foundation/Efi/Protocol/DevicePathFromText/DevicePathFromText.h
new file mode 100644
index 0000000..26df267
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DevicePathFromText/DevicePathFromText.h
@@ -0,0 +1,82 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DevicePathFromText.h
+
+Abstract:
+
+--*/
+
+#ifndef _DEVICE_PATH_FROM_TEXT_PROTOCOL_H_
+#define _DEVICE_PATH_FROM_TEXT_PROTOCOL_H_
+
+//
+// Device Path From Text protocol
+//
+#define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \
+ { \
+ 0x5c99a21, 0xc70f, 0x4ad2, 0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e \
+ }
+
+typedef
+EFI_DEVICE_PATH_PROTOCOL*
+(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE) (
+ IN CONST CHAR16 *TextDeviceNode
+ )
+/*++
+
+ Routine Description:
+ Convert text to the binary representation of a device node.
+
+ Arguments:
+ TextDeviceNode - TextDeviceNode points to the text representation of a device
+ node. Conversion starts with the first character and continues
+ until the first non-device node character.
+
+ Returns:
+ A pointer - Pointer to the EFI device node.
+ NULL - if TextDeviceNode is NULL or there was insufficient memory.
+
+--*/
+;
+
+typedef
+EFI_DEVICE_PATH_PROTOCOL*
+(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH) (
+ IN CONST CHAR16 *TextDevicePath
+ )
+/*++
+
+ Routine Description:
+ Convert text to the binary representation of a device path.
+
+ Arguments:
+ TextDevicePath - TextDevicePath points to the text representation of a device
+ path. Conversion starts with the first character and continues
+ until the first non-device node character.
+
+ Returns:
+ A pointer - Pointer to the allocated device path.
+ NULL - if TextDeviceNode is NULL or there was insufficient memory.
+
+--*/
+;
+
+typedef struct {
+ EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode;
+ EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath;
+} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;
+
+extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DevicePathToText/DevicePathToText.c b/EDK/Foundation/Efi/Protocol/DevicePathToText/DevicePathToText.c
new file mode 100644
index 0000000..72a33a1
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DevicePathToText/DevicePathToText.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DevicePathToText.c
+
+Abstract:
+
+ DevicePathToText protocol as defined in the UEFI 2.0 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DevicePathToText)
+
+EFI_GUID gEfiDevicePathToTextProtocolGuid = EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDevicePathToTextProtocolGuid, "Device Path To Text Protocol", "UEFI 2.0 Device Path To Text protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DevicePathToText/DevicePathToText.h b/EDK/Foundation/Efi/Protocol/DevicePathToText/DevicePathToText.h
new file mode 100644
index 0000000..c647af8
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DevicePathToText/DevicePathToText.h
@@ -0,0 +1,95 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DevicePathToText.h
+
+Abstract:
+
+--*/
+
+
+#ifndef _DEVICE_PATH_TO_TEXT_PROTOCOL_H_
+#define _DEVICE_PATH_TO_TEXT_PROTOCOL_H_
+
+//
+// Device Path To Text protocol
+//
+#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
+ { \
+ 0x8b843e20, 0x8132, 0x4852, 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c \
+ }
+
+typedef
+CHAR16*
+(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
+ IN BOOLEAN DisplayOnly,
+ IN BOOLEAN AllowShortcuts
+ )
+/*++
+
+ Routine Description:
+ Convert a device node to its text representation.
+
+ Arguments:
+ DeviceNode - Points to the device node to be converted.
+ DisplayOnly - If DisplayOnly is TRUE, then the shorter text representation
+ of the display node is used, where applicable. If DisplayOnly
+ is FALSE, then the longer text representation of the display node
+ is used.
+ AllowShortcuts - If AllowShortcuts is TRUE, then the shortcut forms of text
+ representation for a device node can be used, where applicable.
+
+ Returns:
+ A pointer - a pointer to the allocated text representation of the device node.
+ NULL - if DeviceNode is NULL or there was insufficient memory.
+
+--*/
+;
+
+typedef
+CHAR16*
+(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN BOOLEAN DisplayOnly,
+ IN BOOLEAN AllowShortcuts
+ )
+/*++
+
+ Routine Description:
+ Convert a device path to its text representation.
+
+ Arguments:
+ DeviceNode - Points to the device path to be converted.
+ DisplayOnly - If DisplayOnly is TRUE, then the shorter text representation
+ of the display node is used, where applicable. If DisplayOnly
+ is FALSE, then the longer text representation of the display node
+ is used.
+ AllowShortcuts - If AllowShortcuts is TRUE, then the shortcut forms of text
+ representation for a device node can be used, where applicable.
+
+ Returns:
+ A pointer - a pointer to the allocated text representation of the device path.
+ NULL - if DeviceNode is NULL or there was insufficient memory.
+
+--*/
+;
+
+typedef struct {
+ EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
+ EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
+} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
+
+extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DevicePathUtilities/DevicePathUtilities.c b/EDK/Foundation/Efi/Protocol/DevicePathUtilities/DevicePathUtilities.c
new file mode 100644
index 0000000..4ecdac1
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DevicePathUtilities/DevicePathUtilities.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DevicePathUtilities.c
+
+Abstract:
+
+ DevicePathUtilities protocol as defined in the UEFI 2.0 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DevicePathUtilities)
+
+EFI_GUID gEfiDevicePathUtilitiesProtocolGuid = EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDevicePathUtilitiesProtocolGuid, "Device Path Utilities Protocol", "UEFI 2.0 Device Path Utilities protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DevicePathUtilities/DevicePathUtilities.h b/EDK/Foundation/Efi/Protocol/DevicePathUtilities/DevicePathUtilities.h
new file mode 100644
index 0000000..2cf8d89
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DevicePathUtilities/DevicePathUtilities.h
@@ -0,0 +1,225 @@
+/*++
+
+Copyright (c) 2006 - 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DevicePathUtilities.h
+
+Abstract:
+
+--*/
+
+#ifndef _DEVICE_PATH_UTILITIES_PROTOCOL_H_
+#define _DEVICE_PATH_UTILITIES_PROTOCOL_H_
+
+//
+// Device Path Utilities protocol
+//
+#define EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID \
+ { \
+ 0x379be4e, 0xd706, 0x437d, 0xb0, 0x37, 0xed, 0xb8, 0x2f, 0xb7, 0x72, 0xa4 \
+ }
+
+typedef
+UINTN
+(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
+ )
+/*++
+
+ Routine Description:
+ Returns the size of the device path, in bytes.
+
+ Arguments:
+ DevicePath - Points to the start of the EFI device path.
+
+ Returns:
+ Size - Size of the specified device path, in bytes, including the end-of-path tag.
+
+--*/
+;
+
+typedef
+EFI_DEVICE_PATH_PROTOCOL*
+(EFIAPI *EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
+ )
+/*++
+
+ Routine Description:
+ Create a duplicate of the specified path.
+
+ Arguments:
+ DevicePath - Points to the source EFI device path.
+
+ Returns:
+ Pointer - A pointer to the duplicate device path.
+ NULL - Insufficient memory.
+
+--*/
+;
+
+typedef
+EFI_DEVICE_PATH_PROTOCOL*
+(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_PATH) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2
+ )
+/*++
+
+ Routine Description:
+ Create a new path by appending the second device path to the first.
+
+ Arguments:
+ Src1 - Points to the first device path. If NULL, then it is ignored.
+ Src2 - Points to the second device path. If NULL, then it is ignored.
+
+ Returns:
+ Pointer - A pointer to the newly created device path.
+ NULL - Memory could not be allocated
+ or either DevicePath or DeviceNode is NULL.
+
+--*/
+;
+
+typedef
+EFI_DEVICE_PATH_PROTOCOL*
+(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_NODE) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode
+ )
+/*++
+
+ Routine Description:
+ Creates a new path by appending the device node to the device path.
+
+ Arguments:
+ DevicePath - Points to the device path.
+ DeviceNode - Points to the device node.
+
+ Returns:
+ Pointer - A pointer to the allocated device node.
+ NULL - Memory could not be allocated
+ or either DevicePath or DeviceNode is NULL.
+
+--*/
+;
+
+typedef
+EFI_DEVICE_PATH_PROTOCOL*
+(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
+ )
+/*++
+
+ Routine Description:
+ Creates a new path by appending the specified device path instance to the specified device path.
+
+ Arguments:
+ DevicePath - Points to the device path. If NULL, then ignored.
+ DevicePathInstance - Points to the device path instance.
+
+ Returns:
+ Pointer - A pointer to the newly created device path
+ NULL - Memory could not be allocated or DevicePathInstance is NULL.
+
+--*/
+;
+
+typedef
+EFI_DEVICE_PATH_PROTOCOL*
+(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE) (
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance,
+ OUT UINTN *DevicePathInstanceSize
+ )
+/*++
+
+ Routine Description:
+ Creates a copy of the current device path instance and returns a pointer to the next device path instance.
+
+ Arguments:
+ DevicePathInstance - On input, this holds the pointer to the current device path
+ instance. On output, this holds the pointer to the next
+ device path instance or NULL if there are no more device
+ path instances in the device path.
+ DevicePathInstanceSize - On output, this holds the size of the device path instance,
+ in bytes or zero, if DevicePathInstance is zero.
+
+ Returns:
+ Pointer - A pointer to the copy of the current device path instance.
+ NULL - DevicePathInstace was NULL on entry or there was insufficient memory.
+
+--*/
+;
+
+typedef
+BOOLEAN
+(EFIAPI *EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
+ )
+/*++
+
+ Routine Description:
+ Returns whether a device path is multi-instance.
+
+ Arguments:
+ DevicePath - Points to the device path. If NULL, then ignored.
+
+ Returns:
+ TRUE - The device path has more than one instance
+ FALSE - The device path is empty or contains only a single instance.
+
+--*/
+;
+
+typedef
+EFI_DEVICE_PATH_PROTOCOL*
+(EFIAPI *EFI_DEVICE_PATH_UTILS_CREATE_NODE) (
+ IN UINT8 NodeType,
+ IN UINT8 NodeSubType,
+ IN UINT16 NodeLength
+ )
+/*++
+
+ Routine Description:
+ Creates a device node
+
+ Arguments:
+ NodeType - NodeType is the device node type (EFI_DEVICE_PATH.Type) for
+ the new device node.
+ NodeSubType - NodeSubType is the device node sub-type
+ EFI_DEVICE_PATH.SubType) for the new device node.
+ NodeLength - NodeLength is the length of the device node
+ (EFI_DEVICE_PATH.Length) for the new device node.
+
+ Returns:
+ Pointer - A pointer to the newly created device node.
+ NULL - NodeLength is less than
+ the size of the header or there was insufficient memory.
+
+--*/
+;
+
+typedef struct {
+ EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize;
+ EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath;
+ EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath;
+ EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode;
+ EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance;
+ EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance;
+ EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance;
+ EFI_DEVICE_PATH_UTILS_CREATE_NODE CreateDeviceNode;
+} EFI_DEVICE_PATH_UTILITIES_PROTOCOL;
+
+extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Dhcp4/Dhcp4.c b/EDK/Foundation/Efi/Protocol/Dhcp4/Dhcp4.c
new file mode 100644
index 0000000..2778ecb
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Dhcp4/Dhcp4.c
@@ -0,0 +1,41 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Dhcp4.c
+
+Abstract:
+
+ UEFI Dynamic Host Configuration Protocol 4.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Dhcp4)
+
+EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid
+ = EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID;
+
+EFI_GUID gEfiDhcp4ProtocolGuid
+ = EFI_DHCP4_PROTOCOL_GUID;
+
+EFI_GUID_STRING (
+ &gEfiDhcp4ServiceBindingProtocolGuid,
+ "DHCP4 Service Binding Protocol",
+ "DHCP4 Service Binding Protocol"
+ );
+
+EFI_GUID_STRING (
+ &gEfiDhcp4ProtocolGuid,
+ "DHCP4 Protocol",
+ "DHCP4 Protocol"
+ );
diff --git a/EDK/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h b/EDK/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h
new file mode 100644
index 0000000..799b785
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h
@@ -0,0 +1,235 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Dhcp4.h
+
+Abstract:
+
+ UEFI Dynamic Host Configuration Protocol 4 Definition
+
+--*/
+
+#ifndef _DHCP4_H_
+#define _DHCP4_H_
+
+#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
+#include EFI_PROTOCOL_DEFINITION (Udp4)
+
+//GUID definitions
+#define EFI_DHCP4_PROTOCOL_GUID \
+ {0x8a219718, 0x4ef5, 0x4761, 0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56}
+
+#define EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID \
+ {0x9d9a39d8, 0xbd42, 0x4a73, 0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80}
+
+extern EFI_GUID gEfiDhcp4ProtocolGuid;
+extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid;
+
+EFI_FORWARD_DECLARATION (EFI_DHCP4_PROTOCOL);
+
+#pragma pack(1)
+typedef struct {
+ UINT8 OpCode;
+ UINT8 Length;
+ UINT8 Data[1];
+} EFI_DHCP4_PACKET_OPTION;
+
+typedef struct{
+ UINT8 OpCode;
+ UINT8 HwType;
+ UINT8 HwAddrLen;
+ UINT8 Hops;
+ UINT32 Xid;
+ UINT16 Seconds;
+ UINT16 Reserved;
+ EFI_IPv4_ADDRESS ClientAddr;
+ EFI_IPv4_ADDRESS YourAddr;
+ EFI_IPv4_ADDRESS ServerAddr;
+ EFI_IPv4_ADDRESS GwAddr;
+ UINT8 ClientHwAddr[16];
+ CHAR8 ServerName[64];
+ CHAR8 BootFileName[128];
+}EFI_DHCP4_HEADER;
+
+typedef struct {
+ UINT32 Size;
+ UINT32 Length;
+ struct {
+ EFI_DHCP4_HEADER Header;
+ UINT32 Magik;
+ UINT8 Option[1];
+ } Dhcp4;
+} EFI_DHCP4_PACKET;
+#pragma pack()
+
+typedef enum {
+ Dhcp4Stopped = 0x0,
+ Dhcp4Init = 0x1,
+ Dhcp4Selecting = 0x2,
+ Dhcp4Requesting = 0x3,
+ Dhcp4Bound = 0x4,
+ Dhcp4Renewing = 0x5,
+ Dhcp4Rebinding = 0x6,
+ Dhcp4InitReboot = 0x7,
+ Dhcp4Rebooting = 0x8
+} EFI_DHCP4_STATE;
+
+typedef enum{
+ Dhcp4SendDiscover = 0x01,
+ Dhcp4RcvdOffer = 0x02,
+ Dhcp4SelectOffer = 0x03,
+ Dhcp4SendRequest = 0x04,
+ Dhcp4RcvdAck = 0x05,
+ Dhcp4RcvdNak = 0x06,
+ Dhcp4SendDecline = 0x07,
+ Dhcp4BoundCompleted = 0x08,
+ Dhcp4EnterRenewing = 0x09,
+ Dhcp4EnterRebinding = 0x0a,
+ Dhcp4AddressLost = 0x0b,
+ Dhcp4Fail = 0x0c
+} EFI_DHCP4_EVENT;
+
+typedef EFI_STATUS (*EFI_DHCP4_CALLBACK) (
+ IN EFI_DHCP4_PROTOCOL *This,
+ IN VOID *Context,
+ IN EFI_DHCP4_STATE CurrentState,
+ IN EFI_DHCP4_EVENT Dhcp4Event,
+ IN EFI_DHCP4_PACKET *Packet OPTIONAL,
+ OUT EFI_DHCP4_PACKET **NewPacket OPTIONAL
+);
+
+typedef struct {
+ UINT32 DiscoverTryCount;
+ UINT32 *DiscoverTimeout;
+ UINT32 RequestTryCount;
+ UINT32 *RequestTimeout;
+ EFI_IPv4_ADDRESS ClientAddress;
+ EFI_DHCP4_CALLBACK Dhcp4Callback;
+ VOID *CallbackContext;
+ UINT32 OptionCount;
+ EFI_DHCP4_PACKET_OPTION **OptionList;
+}EFI_DHCP4_CONFIG_DATA;
+
+typedef struct {
+ EFI_DHCP4_STATE State;
+ EFI_DHCP4_CONFIG_DATA ConfigData;
+ EFI_IPv4_ADDRESS ClientAddress;
+ EFI_MAC_ADDRESS ClientMacAddress;
+ EFI_IPv4_ADDRESS ServerAddress;
+ EFI_IPv4_ADDRESS RouterAddress;
+ EFI_IPv4_ADDRESS SubnetMask;
+ UINT32 LeaseTime;
+ EFI_DHCP4_PACKET *ReplyPacket;
+ } EFI_DHCP4_MODE_DATA;
+
+typedef struct {
+ EFI_IPv4_ADDRESS ListenAddress;
+ EFI_IPv4_ADDRESS SubnetMask;
+ UINT16 ListenPort;
+} EFI_DHCP4_LISTEN_POINT;
+
+typedef struct {
+ EFI_STATUS Status;
+ EFI_EVENT CompletionEvent;
+ EFI_IPv4_ADDRESS RemoteAddress;
+ UINT16 RemotePort;
+ EFI_IPv4_ADDRESS GatewayAddress;
+ UINT32 ListenPointCount;
+ EFI_DHCP4_LISTEN_POINT *ListenPoints;
+ UINT32 TimeoutValue;
+ EFI_DHCP4_PACKET *Packet;
+ UINT32 ResponseCount;
+ EFI_DHCP4_PACKET *ResponseList;
+} EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DHCP4_GET_MODE_DATA) (
+ IN EFI_DHCP4_PROTOCOL *This,
+ OUT EFI_DHCP4_MODE_DATA *Dhcp4ModeData
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DHCP4_CONFIGURE) (
+ IN EFI_DHCP4_PROTOCOL *This,
+ IN EFI_DHCP4_CONFIG_DATA *Dhcp4CfgData OPTIONAL
+);
+
+
+typedef EFI_STATUS
+(EFIAPI *EFI_DHCP4_START) (
+ IN EFI_DHCP4_PROTOCOL *This,
+ IN EFI_EVENT CompletionEvent OPTIONAL
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DHCP4_RENEW_REBIND) (
+ IN EFI_DHCP4_PROTOCOL *This,
+ IN BOOLEAN RebindRequest,
+ IN EFI_EVENT CompletionEvent OPTIONAL
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DHCP4_RELEASE) (
+ IN EFI_DHCP4_PROTOCOL *This
+);
+
+typedef EFI_STATUS
+(EFIAPI *EFI_DHCP4_STOP) (
+ IN EFI_DHCP4_PROTOCOL *This
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DHCP4_BUILD) (
+ IN EFI_DHCP4_PROTOCOL *This,
+ IN EFI_DHCP4_PACKET *SeedPacket,
+ IN UINT32 DeleteCount,
+ IN UINT8 *DeleteList OPTIONAL,
+ IN UINT32 AppendCount,
+ IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,
+ OUT EFI_DHCP4_PACKET **NewPacket
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DHCP4_TRANSMIT_RECEIVE) (
+ IN EFI_DHCP4_PROTOCOL *This,
+ IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DHCP4_PARSE) (
+ IN EFI_DHCP4_PROTOCOL *This,
+ IN EFI_DHCP4_PACKET *Packet,
+ IN OUT UINT32 *OptionCount,
+ OUT EFI_DHCP4_PACKET_OPTION *PacketOptionList[] OPTIONAL
+);
+
+typedef struct _EFI_DHCP4_PROTOCOL {
+ EFI_DHCP4_GET_MODE_DATA GetModeData;
+ EFI_DHCP4_CONFIGURE Configure;
+ EFI_DHCP4_START Start;
+ EFI_DHCP4_RENEW_REBIND RenewRebind;
+ EFI_DHCP4_RELEASE Release;
+ EFI_DHCP4_STOP Stop;
+ EFI_DHCP4_BUILD Build;
+ EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive;
+ EFI_DHCP4_PARSE Parse;
+} EFI_DHCP4_PROTOCOL;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DiskIO/DiskIo.c b/EDK/Foundation/Efi/Protocol/DiskIO/DiskIo.c
new file mode 100644
index 0000000..76ece26
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DiskIO/DiskIo.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DiskIo.c
+
+Abstract:
+
+ Disk IO protocol as defined in the EFI 1.0 specification.
+
+ The Disk IO protocol is used to convert block oriented devices into byte
+ oriented devices. The Disk IO protocol is intended to layer on top of the
+ Block IO protocol.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DiskIo)
+
+EFI_GUID gEfiDiskIoProtocolGuid = EFI_DISK_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDiskIoProtocolGuid, "DiskIo Protocol", "EFI 1.0 Disk IO Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DiskIO/DiskIo.h b/EDK/Foundation/Efi/Protocol/DiskIO/DiskIo.h
new file mode 100644
index 0000000..0fc9760
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DiskIO/DiskIo.h
@@ -0,0 +1,111 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DiskIo.h
+
+Abstract:
+
+ Disk IO protocol as defined in the EFI 1.0 specification.
+
+ The Disk IO protocol is used to convert block oriented devices into byte
+ oriented devices. The Disk IO protocol is intended to layer on top of the
+ Block IO protocol.
+
+--*/
+
+#ifndef __DISK_IO_H__
+#define __DISK_IO_H__
+
+#define EFI_DISK_IO_PROTOCOL_GUID \
+ { \
+ 0xce345171, 0xba0b, 0x11d2, 0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_DISK_IO_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DISK_READ) (
+ IN EFI_DISK_IO_PROTOCOL * This,
+ IN UINT32 MediaId,
+ IN UINT64 Offset,
+ IN UINTN BufferSize,
+ OUT VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Read BufferSize bytes from Offset into Buffer.
+
+ Arguments:
+ This - Protocol instance pointer.
+ MediaId - Id of the media, changes every time the media is replaced.
+ Offset - The starting byte offset to read from
+ BufferSize - Size of Buffer
+ Buffer - Buffer containing read data
+
+ Returns:
+ EFI_SUCCESS - The data was read correctly from the device.
+ EFI_DEVICE_ERROR - The device reported an error while performing the read.
+ EFI_NO_MEDIA - There is no media in the device.
+ EFI_MEDIA_CHNAGED - The MediaId does not matched the current device.
+ EFI_INVALID_PARAMETER - The read request contains device addresses that are not
+ valid for the device.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DISK_WRITE) (
+ IN EFI_DISK_IO_PROTOCOL * This,
+ IN UINT32 MediaId,
+ IN UINT64 Offset,
+ IN UINTN BufferSize,
+ IN VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Read BufferSize bytes from Offset into Buffer.
+
+ Arguments:
+ This - Protocol instance pointer.
+ MediaId - Id of the media, changes every time the media is replaced.
+ Offset - The starting byte offset to read from
+ BufferSize - Size of Buffer
+ Buffer - Buffer containing read data
+
+ Returns:
+ EFI_SUCCESS - The data was written correctly to the device.
+ EFI_WRITE_PROTECTED - The device can not be written to.
+ EFI_DEVICE_ERROR - The device reported an error while performing the write.
+ EFI_NO_MEDIA - There is no media in the device.
+ EFI_MEDIA_CHNAGED - The MediaId does not matched the current device.
+ EFI_INVALID_PARAMETER - The write request contains device addresses that are not
+ valid for the device.
+
+--*/
+;
+
+#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000
+
+typedef struct _EFI_DISK_IO_PROTOCOL {
+ UINT64 Revision;
+ EFI_DISK_READ ReadDisk;
+ EFI_DISK_WRITE WriteDisk;
+} EFI_DISK_IO_PROTOCOL;
+
+extern EFI_GUID gEfiDiskIoProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DriverBinding/DriverBinding.c b/EDK/Foundation/Efi/Protocol/DriverBinding/DriverBinding.c
new file mode 100644
index 0000000..f994e57
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverBinding/DriverBinding.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverBinding.c
+
+Abstract:
+
+ EFI Controller Driver Protocol
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DriverBinding)
+
+EFI_GUID gEfiDriverBindingProtocolGuid = EFI_DRIVER_BINDING_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDriverBindingProtocolGuid, "Controller Driver Protocol", "EFI 1.1 Controller Driver Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DriverBinding/DriverBinding.h b/EDK/Foundation/Efi/Protocol/DriverBinding/DriverBinding.h
new file mode 100644
index 0000000..bff7ecd
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverBinding/DriverBinding.h
@@ -0,0 +1,130 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverBinding.h
+
+Abstract:
+
+ EFI ControllerHandle Driver Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_DRIVER_BINDING_H_
+#define _EFI_DRIVER_BINDING_H_
+
+//
+// Global ID for the ControllerHandle Driver Protocol
+//
+#define EFI_DRIVER_BINDING_PROTOCOL_GUID \
+ { \
+ 0x18a031ab, 0xb443, 0x4d1a, 0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_DRIVER_BINDING_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_BINDING_SUPPORTED) (
+ IN EFI_DRIVER_BINDING_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Test to see if this driver supports ControllerHandle.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ControllerHandle - Handle of device to test
+ RemainingDevicePath - Optional parameter use to pick a specific child
+ device to start.
+
+ Returns:
+ EFI_SUCCESS - This driver supports this device
+ EFI_ALREADY_STARTED - This driver is already running on this device
+ other - This driver does not support this device
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_BINDING_START) (
+ IN EFI_DRIVER_BINDING_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Start this driver on ControllerHandle.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ControllerHandle - Handle of device to bind driver to
+ RemainingDevicePath - Optional parameter use to pick a specific child
+ device to start.
+
+ Returns:
+ EFI_SUCCESS - This driver is added to ControllerHandle
+ EFI_ALREADY_STARTED - This driver is already running on ControllerHandle
+ other - This driver does not support this device
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_BINDING_STOP) (
+ IN EFI_DRIVER_BINDING_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN UINTN NumberOfChildren,
+ IN EFI_HANDLE * ChildHandleBuffer
+ )
+/*++
+
+ Routine Description:
+ Stop this driver on ControllerHandle.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ControllerHandle - Handle of device to stop driver on
+ NumberOfChildren - Number of Handles in ChildHandleBuffer. If number of
+ children is zero stop the entire bus driver.
+ ChildHandleBuffer - List of Child Handles to Stop.
+
+ Returns:
+ EFI_SUCCESS - This driver is removed ControllerHandle
+ other - This driver was not removed from this device
+
+--*/
+;
+
+//
+// Interface structure for the ControllerHandle Driver Protocol
+//
+typedef struct _EFI_DRIVER_BINDING_PROTOCOL {
+ EFI_DRIVER_BINDING_SUPPORTED Supported;
+ EFI_DRIVER_BINDING_START Start;
+ EFI_DRIVER_BINDING_STOP Stop;
+ UINT32 Version;
+ EFI_HANDLE ImageHandle;
+ EFI_HANDLE DriverBindingHandle;
+} EFI_DRIVER_BINDING_PROTOCOL;
+
+extern EFI_GUID gEfiDriverBindingProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DriverConfiguration/DriverConfiguration.c b/EDK/Foundation/Efi/Protocol/DriverConfiguration/DriverConfiguration.c
new file mode 100644
index 0000000..c029672
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverConfiguration/DriverConfiguration.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverConfiguration.c
+
+Abstract:
+
+ EFI Driver Configuration Protocol
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DriverConfiguration)
+
+EFI_GUID gEfiDriverConfigurationProtocolGuid = EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (&gEfiDriverConfigurationProtocolGuid, "Driver Configuration Protocol", "EFI 1.1 Driver Configuration Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DriverConfiguration/DriverConfiguration.h b/EDK/Foundation/Efi/Protocol/DriverConfiguration/DriverConfiguration.h
new file mode 100644
index 0000000..8620d07
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverConfiguration/DriverConfiguration.h
@@ -0,0 +1,211 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverConfiguration.h
+
+Abstract:
+
+ EFI Driver Configuration Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_DRIVER_CONFIGURATION_H_
+#define _EFI_DRIVER_CONFIGURATION_H_
+
+//
+// Global ID for the Driver Configuration Protocol
+//
+#define EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \
+ { \
+ 0x107a772b, 0xd5e1, 0x11d4, 0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_DRIVER_CONFIGURATION_PROTOCOL);
+
+typedef enum {
+ EfiDriverConfigurationActionNone = 0,
+ EfiDriverConfigurationActionStopController = 1,
+ EfiDriverConfigurationActionRestartController = 2,
+ EfiDriverConfigurationActionRestartPlatform = 3,
+ EfiDriverConfigurationActionMaximum
+} EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED;
+
+#define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000
+#define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001
+#define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002
+#define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_CONFIGURATION_SET_OPTIONS) (
+ IN EFI_DRIVER_CONFIGURATION_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED * ActionRequired
+ );
+
+/*++
+
+ Routine Description:
+ Allows the user to set controller specific options for a controller that a
+ driver is currently managing.
+
+ Arguments:
+ This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
+ ControllerHandle - The handle of the controller to set options on.
+ ChildHandle - The handle of the child controller to set options on. This
+ is an optional parameter that may be NULL. It will be NULL
+ for device drivers, and for a bus drivers that wish to set
+ options for the bus controller. It will not be NULL for a
+ bus driver that wishes to set options for one of its child
+ controllers.
+ Language - A pointer to a three character ISO 639-2 language identifier.
+ This is the language of the user interface that should be
+ presented to the user, and it must match one of the languages
+ specified in SupportedLanguages. The number of languages
+ supported by a driver is up to the driver writer.
+ ActionRequired - A pointer to the action that the calling agent is required
+ to perform when this function returns. See "Related
+ Definitions" for a list of the actions that the calling
+ agent is required to perform prior to accessing
+ ControllerHandle again.
+
+ Returns:
+ EFI_SUCCESS - The driver specified by This successfully set the
+ configuration options for the controller specified
+ by ControllerHandle..
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ActionRequired is NULL.
+ EFI_UNSUPPORTED - The driver specified by This does not support setting
+ configuration options for the controller specified by
+ ControllerHandle and ChildHandle.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ language specified by Language.
+ EFI_DEVICE_ERROR - A device error occurred while attempt to set the
+ configuration options for the controller specified
+ by ControllerHandle and ChildHandle.
+ EFI_OUT_RESOURCES - There are not enough resources available to set the
+ configuration options for the controller specified
+ by ControllerHandle and ChildHandle.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_CONFIGURATION_OPTIONS_VALID) (
+ IN EFI_DRIVER_CONFIGURATION_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL
+ );
+
+/*++
+
+ Routine Description:
+ Tests to see if a controller's current configuration options are valid.
+
+ Arguments:
+ This - A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
+ ControllerHandle - The handle of the controller to test if it's current
+ configuration options are valid.
+ ChildHandle - The handle of the child controller to test if it's current
+ configuration options are valid. This is an optional
+ parameter that may be NULL. It will be NULL for device
+ drivers. It will also be NULL for a bus drivers that wish
+ to test the configuration options for the bus controller.
+ It will not be NULL for a bus driver that wishes to test
+ configuration options for one of its child controllers.
+
+ Returns:
+ EFI_SUCCESS - The controller specified by ControllerHandle and
+ ChildHandle that is being managed by the driver
+ specified by This has a valid set of configuration
+ options.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
+ EFI_UNSUPPORTED - The driver specified by This is not currently
+ managing the controller specified by ControllerHandle
+ and ChildHandle.
+ EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
+ ChildHandle that is being managed by the driver
+ specified by This has an invalid set of configuration
+ options.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS) (
+ IN EFI_DRIVER_CONFIGURATION_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN UINT32 DefaultType,
+ OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED * ActionRequired
+ );
+
+/*++
+
+ Routine Description:
+ Forces a driver to set the default configuration options for a controller.
+
+ Arguments:
+ This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
+ ControllerHandle - The handle of the controller to force default configuration options on.
+ ChildHandle - The handle of the child controller to force default configuration options on This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to force default configuration options for the bus controller. It will not be NULL for a bus driver that wishes to force default configuration options for one of its child controllers.
+ DefaultType - The type of default configuration options to force on the controller specified by ControllerHandle and ChildHandle. See Table 9-1 for legal values. A DefaultType of 0x00000000 must be supported by this protocol.
+ ActionRequired - A pointer to the action that the calling agent is required to perform when this function returns. See "Related Definitions" in Section 9.1for a list of the actions that the calling agent is required to perform prior to accessing ControllerHandle again.
+
+ Returns:
+ EFI_SUCCESS - The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ActionRequired is NULL.
+ EFI_UNSUPPORTED - The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.
+ EFI_UNSUPPORTED - The driver specified by This does not support the configuration type specified by DefaultType.
+ EFI_DEVICE_ERROR - A device error occurred while attempt to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
+ EFI_OUT_RESOURCES - There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
+
+--*/
+
+//
+// Interface structure for the Driver Configuration Protocol
+//
+typedef struct _EFI_DRIVER_CONFIGURATION_PROTOCOL {
+ EFI_DRIVER_CONFIGURATION_SET_OPTIONS SetOptions;
+ EFI_DRIVER_CONFIGURATION_OPTIONS_VALID OptionsValid;
+ EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS ForceDefaults;
+ CHAR8 *SupportedLanguages;
+} EFI_DRIVER_CONFIGURATION_PROTOCOL;
+
+/*++
+
+ Protocol Description:
+ Used to set configuration options for a controller that an EFI Driver is managing.
+
+ Parameters:
+ SetOptions - Allows the use to set drivers specific configuration
+ options for a controller that the driver is currently
+ managing.
+ OptionsValid - Tests to see if a controller's current configuration
+ options are valid.
+ ForceDefaults - Forces a driver to set the default configuration options
+ for a controller.
+ SupportedLanguages - A Null-terminated ASCII string that contains one or more
+ ISO 639-2 language codes. This is the list of language
+ codes that this protocol supports.
+
+--*/
+extern EFI_GUID gEfiDriverConfigurationProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.c b/EDK/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.c
new file mode 100644
index 0000000..0e08bf9
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverConfiguration.c
+
+Abstract:
+
+ EFI Driver Configuration Protocol
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DriverConfiguration2)
+
+EFI_GUID gEfiDriverConfiguration2ProtocolGuid = EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (&gEfiDriverConfiguration2ProtocolGuid, "Driver Configuration2 Protocol", "UEFI 2.0 Driver Configuration2 Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.h b/EDK/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.h
new file mode 100644
index 0000000..170ba23
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.h
@@ -0,0 +1,201 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverConfiguration2.h
+
+Abstract:
+
+ EFI Driver Configuration2 Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_DRIVER_CONFIGURATION2_H_
+#define _EFI_DRIVER_CONFIGURATION2_H_
+
+#include EFI_PROTOCOL_DEFINITION (DriverConfiguration)
+
+//
+// Global ID for the Driver Configuration Protocol
+//
+#define EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID \
+ { \
+ 0xbfd7dc1d, 0x24f1, 0x40d9, 0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_DRIVER_CONFIGURATION2_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_CONFIGURATION2_SET_OPTIONS) (
+ IN EFI_DRIVER_CONFIGURATION2_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED * ActionRequired
+ );
+
+/*++
+
+ Routine Description:
+ Allows the user to set controller specific options for a controller that a
+ driver is currently managing.
+
+ Arguments:
+ This - A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.
+ ControllerHandle - The handle of the controller to set options on.
+ ChildHandle - The handle of the child controller to set options on. This
+ is an optional parameter that may be NULL. It will be NULL
+ for device drivers, and for a bus drivers that wish to set
+ options for the bus controller. It will not be NULL for a
+ bus driver that wishes to set options for one of its child
+ controllers.
+ Language - A pointer to a three character RFC 3066 language identifier.
+ This is the language of the user interface that should be
+ presented to the user, and it must match one of the languages
+ specified in SupportedLanguages. The number of languages
+ supported by a driver is up to the driver writer.
+ ActionRequired - A pointer to the action that the calling agent is required
+ to perform when this function returns. See "Related
+ Definitions" for a list of the actions that the calling
+ agent is required to perform prior to accessing
+ ControllerHandle again.
+
+ Returns:
+ EFI_SUCCESS - The driver specified by This successfully set the
+ configuration options for the controller specified
+ by ControllerHandle..
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ActionRequired is NULL.
+ EFI_UNSUPPORTED - The driver specified by This does not support setting
+ configuration options for the controller specified by
+ ControllerHandle and ChildHandle.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ language specified by Language.
+ EFI_DEVICE_ERROR - A device error occurred while attempt to set the
+ configuration options for the controller specified
+ by ControllerHandle and ChildHandle.
+ EFI_OUT_RESOURCES - There are not enough resources available to set the
+ configuration options for the controller specified
+ by ControllerHandle and ChildHandle.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID) (
+ IN EFI_DRIVER_CONFIGURATION2_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL
+ );
+
+/*++
+
+ Routine Description:
+ Tests to see if a controller's current configuration options are valid.
+
+ Arguments:
+ This - A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.
+ ControllerHandle - The handle of the controller to test if it's current
+ configuration options are valid.
+ ChildHandle - The handle of the child controller to test if it's current
+ configuration options are valid. This is an optional
+ parameter that may be NULL. It will be NULL for device
+ drivers. It will also be NULL for a bus drivers that wish
+ to test the configuration options for the bus controller.
+ It will not be NULL for a bus driver that wishes to test
+ configuration options for one of its child controllers.
+
+ Returns:
+ EFI_SUCCESS - The controller specified by ControllerHandle and
+ ChildHandle that is being managed by the driver
+ specified by This has a valid set of configuration
+ options.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
+ EFI_UNSUPPORTED - The driver specified by This is not currently
+ managing the controller specified by ControllerHandle
+ and ChildHandle.
+ EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
+ ChildHandle that is being managed by the driver
+ specified by This has an invalid set of configuration
+ options.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS) (
+ IN EFI_DRIVER_CONFIGURATION2_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN UINT32 DefaultType,
+ OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED * ActionRequired
+ );
+
+/*++
+
+ Routine Description:
+ Forces a driver to set the default configuration options for a controller.
+
+ Arguments:
+ This - A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.
+ ControllerHandle - The handle of the controller to force default configuration options on.
+ ChildHandle - The handle of the child controller to force default configuration options on This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to force default configuration options for the bus controller. It will not be NULL for a bus driver that wishes to force default configuration options for one of its child controllers.
+ DefaultType - The type of default configuration options to force on the controller specified by ControllerHandle and ChildHandle. See Table 9-1 for legal values. A DefaultType of 0x00000000 must be supported by this protocol.
+ ActionRequired - A pointer to the action that the calling agent is required to perform when this function returns. See "Related Definitions" in Section 9.1for a list of the actions that the calling agent is required to perform prior to accessing ControllerHandle again.
+
+ Returns:
+ EFI_SUCCESS - The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ActionRequired is NULL.
+ EFI_UNSUPPORTED - The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.
+ EFI_UNSUPPORTED - The driver specified by This does not support the configuration type specified by DefaultType.
+ EFI_DEVICE_ERROR - A device error occurred while attempt to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
+ EFI_OUT_RESOURCES - There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
+
+--*/
+
+//
+// Interface structure for the Driver Configuration Protocol
+//
+typedef struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL {
+ EFI_DRIVER_CONFIGURATION2_SET_OPTIONS SetOptions;
+ EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID OptionsValid;
+ EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults;
+ CHAR8 *SupportedLanguages;
+} EFI_DRIVER_CONFIGURATION2_PROTOCOL;
+
+/*++
+
+ Protocol Description:
+ Used to set configuration options for a controller that an EFI Driver is managing.
+
+ Parameters:
+ SetOptions - Allows the use to set drivers specific configuration
+ options for a controller that the driver is currently
+ managing.
+ OptionsValid - Tests to see if a controller's current configuration
+ options are valid.
+ ForceDefaults - Forces a driver to set the default configuration options
+ for a controller.
+ SupportedLanguages - A Null-terminated ASCII string that contains one or more
+ RFC 3066 language codes. This is the list of language
+ codes that this protocol supports.
+
+--*/
+
+extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.c b/EDK/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.c
new file mode 100644
index 0000000..4d7b8a0
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverDiagnostics.c
+
+Abstract:
+
+ EFI Driver Diagnostics Protocol
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DriverDiagnostics)
+
+EFI_GUID gEfiDriverDiagnosticsProtocolGuid = EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (&gEfiDriverDiagnosticsProtocolGuid, "Driver Diagnostics Protocol", "EFI 1.1 Driver Diagnostics Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.h b/EDK/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.h
new file mode 100644
index 0000000..dfcd299
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.h
@@ -0,0 +1,138 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverDiagnostics.h
+
+Abstract:
+
+ EFI Driver Diagnostics Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_DRIVER_DIAGNOSTICS_H_
+#define _EFI_DRIVER_DIAGNOSTICS_H_
+
+//
+// Global ID for the Driver Diagnostics Protocol
+//
+#define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \
+ { \
+ 0x0784924f, 0xe296, 0x11d4, 0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_DRIVER_DIAGNOSTICS_PROTOCOL);
+
+typedef enum {
+ EfiDriverDiagnosticTypeStandard = 0,
+ EfiDriverDiagnosticTypeExtended = 1,
+ EfiDriverDiagnosticTypeManufacturing= 2,
+ EfiDriverDiagnosticTypeMaximum
+} EFI_DRIVER_DIAGNOSTIC_TYPE;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS) (
+ IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,
+ IN CHAR8 *Language,
+ OUT EFI_GUID **ErrorType,
+ OUT UINTN *BufferSize,
+ OUT CHAR16 **Buffer
+ );
+
+/*++
+
+ Routine Description:
+ Runs diagnostics on a controller.
+
+ Arguments:
+ This - A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.
+ ControllerHandle - The handle of the controller to run diagnostics on.
+ ChildHandle - The handle of the child controller to run diagnostics on
+ This is an optional parameter that may be NULL. It will
+ be NULL for device drivers. It will also be NULL for a
+ bus drivers that wish to run diagnostics on the bus
+ controller. It will not be NULL for a bus driver that
+ wishes to run diagnostics on one of its child controllers.
+ DiagnosticType - Indicates type of diagnostics to perform on the controller
+ specified by ControllerHandle and ChildHandle. See
+ "Related Definitions" for the list of supported types.
+ Language - A pointer to a three character ISO 639-2 language
+ identifier. This is the language in which the optional
+ error message should be returned in Buffer, and it must
+ match one of the languages specified in SupportedLanguages.
+ The number of languages supported by a driver is up to
+ the driver writer.
+ ErrorType - A GUID that defines the format of the data returned in
+ Buffer.
+ BufferSize - The size, in bytes, of the data returned in Buffer.
+ Buffer - A buffer that contains a Null-terminated Unicode string
+ plus some additional data whose format is defined by
+ ErrorType. Buffer is allocated by this function with
+ AllocatePool(), and it is the caller's responsibility
+ to free it with a call to FreePool().
+
+ Returns:
+ EFI_SUCCESS - The controller specified by ControllerHandle and
+ ChildHandle passed the diagnostic.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
+ EFI_HANDLE.
+ EFI_INVALID_PARAMETER - Language is NULL.
+ EFI_INVALID_PARAMETER - ErrorType is NULL.
+ EFI_INVALID_PARAMETER - BufferType is NULL.
+ EFI_INVALID_PARAMETER - Buffer is NULL.
+ EFI_UNSUPPORTED - The driver specified by This does not support
+ running diagnostics for the controller specified
+ by ControllerHandle and ChildHandle.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ type of diagnostic specified by DiagnosticType.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ language specified by Language.
+ EFI_OUT_OF_RESOURCES - There are not enough resources available to complete
+ the diagnostics.
+ EFI_OUT_OF_RESOURCES - There are not enough resources available to return
+ the status information in ErrorType, BufferSize,
+ and Buffer.
+ EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
+ ChildHandle did not pass the diagnostic.
+
+--*/
+
+//
+// Interface structure for the Driver Diagnostics Protocol
+//
+typedef struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL {
+ EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics;
+ CHAR8 *SupportedLanguages;
+} EFI_DRIVER_DIAGNOSTICS_PROTOCOL;
+
+/*++
+
+ Protocol Description:
+ Used to perform diagnostics on a controller that an EFI Driver is managing.
+
+ Parameters:
+ RunDiagnostics - Runs diagnostics on a controller.
+ SupportedLanguages - A Null-terminated ASCII string that contains one or more
+ ISO 639-2 language codes. This is the list of language
+ codes that this protocol supports.
+
+--*/
+extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.c b/EDK/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.c
new file mode 100644
index 0000000..5290af2
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverDiagnostics2.c
+
+Abstract:
+
+ EFI Driver Diagnostics2 Protocol
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DriverDiagnostics2)
+
+EFI_GUID gEfiDriverDiagnostics2ProtocolGuid = EFI_DRIVER_DIAGNOSTICS2_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (&gEfiDriverDiagnostics2ProtocolGuid, "Driver Diagnostics Protocol", "UEFI 2.0 Driver Diagnostics2 Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.h b/EDK/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.h
new file mode 100644
index 0000000..3ae7ba2
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.h
@@ -0,0 +1,135 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverDiagnostics2.h
+
+Abstract:
+
+ EFI Driver Diagnostics2 Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_DRIVER_DIAGNOSTICS2_H_
+#define _EFI_DRIVER_DIAGNOSTICS2_H_
+
+#include EFI_PROTOCOL_DEFINITION (DriverDiagnostics)
+
+//
+// Global ID for the Driver Diagnostics Protocol
+//
+#define EFI_DRIVER_DIAGNOSTICS2_PROTOCOL_GUID \
+ { \
+ 0x4d330321, 0x025f, 0x4aac, 0x90, 0xd8, 0x5e, 0xd9, 0x0, 0x17, 0x3b, 0x63 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_DRIVER_DIAGNOSTICS2_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS) (
+ IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,
+ IN CHAR8 *Language,
+ OUT EFI_GUID **ErrorType,
+ OUT UINTN *BufferSize,
+ OUT CHAR16 **Buffer
+ );
+
+/*++
+
+ Routine Description:
+ Runs diagnostics on a controller.
+
+ Arguments:
+ This - A pointer to the EFI_DRIVER_DIAGNOSTICS2_PROTOCOL instance.
+ ControllerHandle - The handle of the controller to run diagnostics on.
+ ChildHandle - The handle of the child controller to run diagnostics on
+ This is an optional parameter that may be NULL. It will
+ be NULL for device drivers. It will also be NULL for a
+ bus drivers that wish to run diagnostics on the bus
+ controller. It will not be NULL for a bus driver that
+ wishes to run diagnostics on one of its child controllers.
+ DiagnosticType - Indicates type of diagnostics to perform on the controller
+ specified by ControllerHandle and ChildHandle. See
+ "Related Definitions" for the list of supported types.
+ Language - A pointer to a NULL-terminated ASCII string array indicating
+ the language. This is the language in which the optional
+ error message should be returned in Buffer, and it must
+ match one of the languages specified in SupportedLanguages.
+ The number of languages supported by a driver is up to
+ the driver writer. Language is specified in RFC 3066
+ language code format.
+ ErrorType - A GUID that defines the format of the data returned in
+ Buffer.
+ BufferSize - The size, in bytes, of the data returned in Buffer.
+ Buffer - A buffer that contains a Null-terminated Unicode string
+ plus some additional data whose format is defined by
+ ErrorType. Buffer is allocated by this function with
+ AllocatePool(), and it is the caller's responsibility
+ to free it with a call to FreePool().
+
+ Returns:
+ EFI_SUCCESS - The controller specified by ControllerHandle and
+ ChildHandle passed the diagnostic.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
+ EFI_HANDLE.
+ EFI_INVALID_PARAMETER - Language is NULL.
+ EFI_INVALID_PARAMETER - ErrorType is NULL.
+ EFI_INVALID_PARAMETER - BufferType is NULL.
+ EFI_INVALID_PARAMETER - Buffer is NULL.
+ EFI_UNSUPPORTED - The driver specified by This does not support
+ running diagnostics for the controller specified
+ by ControllerHandle and ChildHandle.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ type of diagnostic specified by DiagnosticType.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ language specified by Language.
+ EFI_OUT_OF_RESOURCES - There are not enough resources available to complete
+ the diagnostics.
+ EFI_OUT_OF_RESOURCES - There are not enough resources available to return
+ the status information in ErrorType, BufferSize,
+ and Buffer.
+ EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
+ ChildHandle did not pass the diagnostic.
+
+--*/
+
+//
+// Interface structure for the Driver Diagnostics Protocol
+//
+typedef struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL {
+ EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS RunDiagnostics;
+ CHAR8 *SupportedLanguages;
+} EFI_DRIVER_DIAGNOSTICS2_PROTOCOL;
+
+/*++
+
+ Protocol Description:
+ Used to perform diagnostics on a controller that an EFI Driver is managing.
+
+ Parameters:
+ RunDiagnostics - Runs diagnostics on a controller.
+ SupportedLanguages - A Null-terminated ASCII string that contains one or more
+ RFC 3066 language codes. This is the list of language
+ codes that this protocol supports.
+
+--*/
+
+extern EFI_GUID gEfiDriverDiagnostics2ProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.c b/EDK/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.c
new file mode 100644
index 0000000..4266a69
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverSupportedEfiVersion.c
+
+Abstract:
+
+ Driver Supported EFI Version Protocol
+
+Revision History:
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (DriverSupportedEfiVersion)
+
+EFI_GUID gEfiDriverSupportedEfiVersionProtocolGuid = EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (&gEfiDriverSupportedEfiVersionProtocolGuid, "Driver Supported EFI Version Protocol", "UEFI 2.1 Driver Supported EFI Version Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.h b/EDK/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.h
new file mode 100644
index 0000000..6300050
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.h
@@ -0,0 +1,47 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ DriverSupportedEfiVersion.h
+
+Abstract:
+
+ Driver Supported EFI Version Protocol
+
+Revision History:
+
+--*/
+
+#ifndef _EFI_DRIVER_SUPPORTED_EFI_VERSION_H_
+#define _EFI_DRIVER_SUPPORTED_EFI_VERSION_H_
+
+//
+// Global ID for the Driver Supported EFI Version Protocol
+//
+#define EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL_GUID \
+ { \
+ 0x5c198761, 0x16a8, 0x4e69, 0x97, 0x2c, 0x89, 0xd6, 0x79, 0x54, 0xf8, 0x1d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL);
+
+//
+// Interface structure for the Driver Supported EFI Version Protocol
+//
+typedef struct _EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL {
+ UINT32 Length;
+ UINT32 FirmwareVersion;
+} EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL;
+
+extern EFI_GUID gEfiDriverSupportedEfiVersionProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Ebc/Ebc.c b/EDK/Foundation/Efi/Protocol/Ebc/Ebc.c
new file mode 100644
index 0000000..fa2796a
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Ebc/Ebc.c
@@ -0,0 +1,28 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Ebc.c
+
+Abstract:
+
+ EBC protocol as defined in the EFI 1.1 specification.
+
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Ebc)
+
+EFI_GUID gEfiEbcProtocolGuid = EFI_EBC_INTERPRETER_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiEbcProtocolGuid, "EBC Protocol", "EFI 1.1 EBC protocol");
diff --git a/EDK/Foundation/Efi/Protocol/Ebc/Ebc.h b/EDK/Foundation/Efi/Protocol/Ebc/Ebc.h
new file mode 100644
index 0000000..55217ae
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Ebc/Ebc.h
@@ -0,0 +1,183 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Ebc.h
+
+Abstract:
+
+ Describes the protocol interface to the EBC interpreter.
+
+--*/
+
+#ifndef _EBC_H_
+#define _EBC_H_
+
+#define EFI_EBC_INTERPRETER_PROTOCOL_GUID \
+ { \
+ 0x13AC6DD1, 0x73D0, 0x11D4, 0xB0, 0x6B, 0x00, 0xAA, 0x00, 0xBD, 0x6D, 0xE7 \
+ }
+
+//
+// Define for forward reference.
+//
+EFI_FORWARD_DECLARATION (EFI_EBC_PROTOCOL);
+
+/*++
+
+Routine Description:
+
+ Create a thunk for an image entry point. In short, given the physical address
+ of the entry point for a loaded image, create a thunk that does some
+ fixup of arguments (and perform any other necessary overhead) and then
+ calls the original entry point. The caller can then use the returned pointer
+ to the created thunk as the new entry point to image.
+
+Arguments:
+
+ This - protocol instance pointer
+ ImageHandle - handle to the image. The EBC interpreter may use this to keep
+ track of any resource allocations performed in loading and
+ executing the image.
+ EbcEntryPoint - the entry point for the image (as defined in the file header)
+ Thunk - pointer to thunk pointer where the address of the created
+ thunk is returned.
+
+Returns:
+
+ Standard EFI_STATUS
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EBC_CREATE_THUNK) (
+ IN EFI_EBC_PROTOCOL * This,
+ IN EFI_HANDLE ImageHandle,
+ IN VOID *EbcEntryPoint,
+ OUT VOID **Thunk
+ );
+
+/*++
+
+Routine Description:
+
+ Perform any cleanup necessary when an image is unloaded. Basically it gives
+ the EBC interpreter the chance to free up any resources allocated during
+ load and execution of an EBC image.
+
+Arguments:
+
+ This - protocol instance pointer
+ ImageHandle - the handle of the image being unloaded.
+
+Returns:
+
+ Standard EFI_STATUS.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EBC_UNLOAD_IMAGE) (
+ IN EFI_EBC_PROTOCOL * This,
+ IN EFI_HANDLE ImageHandle
+ );
+
+/*++
+
+Routine Description:
+
+ The I-Cache-flush registration service takes a pointer to a function to
+ call to flush the I-Cache. Here's the prototype for that function pointer.
+
+Arguments:
+
+ Start - physical start address of CPU instruction cache to flush.
+ Length - how many bytes to flush of the instruction cache.
+
+Returns:
+
+ Standard EFI_STATUS.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EBC_ICACHE_FLUSH) (
+ IN EFI_PHYSICAL_ADDRESS Start,
+ IN UINT64 Length
+ );
+
+/*++
+
+Routine Description:
+
+ This routine is called by the core firmware to provide the EBC driver with
+ a function to call to flush the CPU's instruction cache following creation
+ of a thunk. It is not required.
+
+Arguments:
+
+ This - protocol instance pointer
+ Flush - pointer to the function to call to flush the CPU instruction
+ cache.
+
+Returns:
+
+ Standard EFI_STATUS.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EBC_REGISTER_ICACHE_FLUSH) (
+ IN EFI_EBC_PROTOCOL * This,
+ IN EBC_ICACHE_FLUSH Flush
+ );
+
+/*++
+
+Routine Description:
+
+ This routine can be called to get the VM revision. It returns the same
+ value as the EBC BREAK 1 instruction returns.
+
+Arguments:
+
+ This - protocol instance pointer
+ Version - pointer to where to return the VM version
+
+Returns:
+
+ Standard EFI_STATUS.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EBC_GET_VERSION) (
+ IN EFI_EBC_PROTOCOL * This,
+ IN OUT UINT64 *Version
+ );
+
+//
+// Prototype for the actual EBC protocol interface
+//
+typedef struct _EFI_EBC_PROTOCOL {
+ EFI_EBC_CREATE_THUNK CreateThunk;
+ EFI_EBC_UNLOAD_IMAGE UnloadImage;
+ EFI_EBC_REGISTER_ICACHE_FLUSH RegisterICacheFlush;
+ EFI_EBC_GET_VERSION GetVersion;
+} EFI_EBC_PROTOCOL;
+
+//
+// Extern the global EBC protocol GUID
+//
+extern EFI_GUID gEfiEbcProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/EdidActive/EdidActive.c b/EDK/Foundation/Efi/Protocol/EdidActive/EdidActive.c
new file mode 100644
index 0000000..c045ce7
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EdidActive/EdidActive.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EdidActive.c
+
+Abstract:
+
+ EDID Active Protocol from the UEFI 2.0 specification.
+
+ Placed on the video output device child handle that are actively displaying output.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (EdidActive)
+
+EFI_GUID gEfiEdidActiveProtocolGuid = EFI_EDID_ACTIVE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiEdidActiveProtocolGuid, "EFI EDID Active Protocol", "UEFI EDID Active Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/EdidActive/EdidActive.h b/EDK/Foundation/Efi/Protocol/EdidActive/EdidActive.h
new file mode 100644
index 0000000..912747c
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EdidActive/EdidActive.h
@@ -0,0 +1,39 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EdidActive.h
+
+Abstract:
+
+ EDID Active Protocol from the UEFI 2.0 specification.
+
+ Placed on the video output device child handle that are actively displaying output.
+
+--*/
+
+#ifndef __EDID_ACTIVE_H__
+#define __EDID_ACTIVE_H__
+
+#define EFI_EDID_ACTIVE_PROTOCOL_GUID \
+ { \
+ 0xbd8c1056, 0x9f36, 0x44ec, 0x92, 0xa8, 0xa6, 0x33, 0x7f, 0x81, 0x79, 0x86 \
+ }
+
+typedef struct {
+ UINT32 SizeOfEdid;
+ UINT8 *Edid;
+} EFI_EDID_ACTIVE_PROTOCOL;
+
+extern EFI_GUID gEfiEdidActiveProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/EdidDiscovered/EdidDiscovered.c b/EDK/Foundation/Efi/Protocol/EdidDiscovered/EdidDiscovered.c
new file mode 100644
index 0000000..19e558a
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EdidDiscovered/EdidDiscovered.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EdidDiscovered.c
+
+Abstract:
+
+ EDID Discovered Protocol from the UEFI 2.0 specification.
+
+ This protocol is placed on the video output device child handle and it represents
+ the EDID information being used for output device represented by the child handle.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (EdidDiscovered)
+
+EFI_GUID gEfiEdidDiscoveredProtocolGuid = EFI_EDID_DISCOVERED_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiEdidDiscoveredProtocolGuid, "EFI EDID Discovered Protocol", "UEFI EDID Discovered Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/EdidDiscovered/EdidDiscovered.h b/EDK/Foundation/Efi/Protocol/EdidDiscovered/EdidDiscovered.h
new file mode 100644
index 0000000..32804ac
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EdidDiscovered/EdidDiscovered.h
@@ -0,0 +1,40 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EdidDiscovered.h
+
+Abstract:
+
+ EDID Discovered Protocol from the UEFI 2.0 specification.
+
+ This protocol is placed on the video output device child handle and it represents
+ the EDID information being used for output device represented by the child handle.
+
+--*/
+
+#ifndef __EDID_DISCOVERED_H__
+#define __EDID_DISCOVERED_H__
+
+#define EFI_EDID_DISCOVERED_PROTOCOL_GUID \
+ { \
+ 0x1c0c34f6, 0xd380, 0x41fa, 0xa0, 0x49, 0x8a, 0xd0, 0x6c,0x1a, 0x66, 0xaa \
+ }
+
+typedef struct {
+ UINT32 SizeOfEdid;
+ UINT8 *Edid;
+} EFI_EDID_DISCOVERED_PROTOCOL;
+
+extern EFI_GUID gEfiEdidDiscoveredProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/EdidOverride/EdidOverride.c b/EDK/Foundation/Efi/Protocol/EdidOverride/EdidOverride.c
new file mode 100644
index 0000000..a828f01
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EdidOverride/EdidOverride.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EdidOverride.c
+
+Abstract:
+
+ EDID Override Protocol from the UEFI 2.0 specification.
+
+ Allow platform to provide EDID information to producer of the Graphics Output
+ protocol.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (EdidOverride)
+
+EFI_GUID gEfiEdidOverrideProtocolGuid = EFI_EDID_OVERRIDE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiEdidOverrideProtocolGuid, "EFI EDID Override Protocol", "UEFI EDID Override Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/EdidOverride/EdidOverride.h b/EDK/Foundation/Efi/Protocol/EdidOverride/EdidOverride.h
new file mode 100644
index 0000000..4382eb2
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EdidOverride/EdidOverride.h
@@ -0,0 +1,78 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EdidOverride.h
+
+Abstract:
+
+ EDID Override Protocol from the UEFI 2.0 specification.
+
+ Allow platform to provide EDID information to producer of the Graphics Output
+ protocol.
+
+--*/
+
+#ifndef __EDID_OVERRIDE_H__
+#define __EDID_OVERRIDE_H__
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (EdidDiscovered)
+
+#define EFI_EDID_OVERRIDE_PROTOCOL_GUID \
+ { \
+ 0x48ecb431, 0xfb72, 0x45c0, 0xa9, 0x22, 0xf4, 0x58, 0xfe, 0x4, 0xb, 0xd5 \
+ }
+
+typedef struct _EFI_EDID_OVERRIDE_PROTOCOL EFI_EDID_OVERRIDE_PROTOCOL;
+
+#define EFI_EDID_OVERRIDE_DONT_OVERRIDE 0x01
+#define EFI_EDID_OVERRIDE_ENABLE_HOT_PLUG 0x02
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID) (
+ IN EFI_EDID_OVERRIDE_PROTOCOL *This,
+ IN EFI_HANDLE *ChildHandle,
+ OUT UINT32 *Attributes,
+ IN OUT UINTN *EdidSize,
+ IN OUT UINT8 **Edid
+ )
+/*++
+
+ Routine Description:
+ Return the current video mode information.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ChildHandle - A child handle produced by the Graphics Output EFI
+ driver that represents a video output device.
+ Attributes - The attributes associated with ChildHandle video output device.
+ EdidSize - A pointer to the size, in bytes, of the Edid buffer.
+ Edid - A pointer to callee allocated buffer that contains the EDID that
+ should be used for ChildHandle. A value of NULL
+ represents no EDID override for ChildHandle.
+
+ Returns:
+ EFI_SUCCESS - Valid overrides returned for ChildHandle.
+ EFI_UNSUPPORTED - ChildHandle has no overrides.
+
+--*/
+;
+
+typedef struct _EFI_EDID_OVERRIDE_PROTOCOL {
+ EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid;
+} EFI_EDID_OVERRIDE_PROTOCOL;
+
+extern EFI_GUID gEfiEdidOverrideProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/EfiNetworkInterfaceIdentifier/EfiNetworkInterfaceIdentifier.c b/EDK/Foundation/Efi/Protocol/EfiNetworkInterfaceIdentifier/EfiNetworkInterfaceIdentifier.c
new file mode 100644
index 0000000..6b0280c
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EfiNetworkInterfaceIdentifier/EfiNetworkInterfaceIdentifier.c
@@ -0,0 +1,40 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ EfiNetworkInterfaceIdentifier.c
+
+Abstract:
+
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (EfiNetworkInterfaceIdentifier)
+
+EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (
+ &gEfiNetworkInterfaceIdentifierProtocolGuid, "Network Interface Identifier Protocol",
+ "EFI Network Interface Identifier Protocol"
+ );
+
+EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31 = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID_31;
+
+EFI_GUID_STRING
+ (
+ &gEfiNetworkInterfaceIdentifierProtocolGuid_31, "Network Interface Identifier Protocol_31",
+ "EFI1.1 Network Interface Identifier Protocol"
+ );
diff --git a/EDK/Foundation/Efi/Protocol/EfiNetworkInterfaceIdentifier/EfiNetworkInterfaceIdentifier.h b/EDK/Foundation/Efi/Protocol/EfiNetworkInterfaceIdentifier/EfiNetworkInterfaceIdentifier.h
new file mode 100644
index 0000000..b2f1c85
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EfiNetworkInterfaceIdentifier/EfiNetworkInterfaceIdentifier.h
@@ -0,0 +1,102 @@
+/*++
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module name:
+
+ EfiNetworkInterfaceIdentifier.h
+
+Abstract:
+
+Revision history:
+ 2000-Feb-18 M(f)J GUID updated.
+ Structure order changed for machine word alignment.
+ Added StringId[4] to structure.
+
+ 2000-Feb-14 M(f)J Genesis.
+--*/
+#ifndef _EFI_NETWORKINTERFACEIDENTIFER_H
+#define _EFI_NETWORKINTERFACEIDENTIFER_H
+
+
+#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID \
+ { \
+ 0xE18541CD, 0xF755, 0x4f73, 0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29 \
+ }
+#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID_31 \
+ { \
+ 0x1ACED566, 0x76ED, 0x4218, 0xBC, 0x81, 0x76, 0x7F, 0x1F, 0x97, 0x7A, 0x89 \
+ }
+
+#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION 0x00010000
+#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION_31 0x00010001
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL);
+
+typedef enum {
+ EfiNetworkInterfaceUndi = 1
+} EFI_NETWORK_PROTOCOL_TYPE;
+
+typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL {
+
+ UINT64 Revision;
+ //
+ // Revision of the network interface identifier protocol interface.
+ //
+ UINT64 ID;
+ //
+ // Address of the first byte of the identifying structure for this
+ // network interface. This is set to zero if there is no structure.
+ //
+ // For PXE/UNDI this is the first byte of the !PXE structure.
+ //
+ UINT64 ImageAddr;
+ //
+ // Address of the UNrelocated driver/ROM image. This is set
+ // to zero if there is no driver/ROM image.
+ //
+ // For 16-bit UNDI, this is the first byte of the option ROM in
+ // upper memory.
+ //
+ // For 32/64-bit S/W UNDI, this is the first byte of the EFI ROM
+ // image.
+ //
+ // For H/W UNDI, this is set to zero.
+ //
+ UINT32 ImageSize;
+ //
+ // Size of the UNrelocated driver/ROM image of this network interface.
+ // This is set to zero if there is no driver/ROM image.
+ //
+ CHAR8 StringId[4];
+ //
+ // 4 char ASCII string to go in class identifier (option 60) in DHCP
+ // and Boot Server discover packets.
+ // For EfiNetworkInterfaceUndi this field is "UNDI".
+ // For EfiNetworkInterfaceSnp this field is "SNPN".
+ //
+ UINT8 Type;
+ UINT8 MajorVer;
+ UINT8 MinorVer;
+ //
+ // Information to be placed into the PXE DHCP and Discover packets.
+ // This is the network interface type and version number that will
+ // be placed into DHCP option 94 (client network interface identifier).
+ //
+ BOOLEAN Ipv6Supported;
+ UINT8 IfNum; // interface number to be used with pxeid structure
+} EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL;
+
+extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid;
+extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31;
+
+#endif // _EFI_NII_H
diff --git a/EDK/Foundation/Efi/Protocol/EfiProtocolLib.cif b/EDK/Foundation/Efi/Protocol/EfiProtocolLib.cif
new file mode 100644
index 0000000..eb14560
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EfiProtocolLib.cif
@@ -0,0 +1,165 @@
+<component>
+ name = "EfiProtocolLib"
+ category = ModulePart
+ LocalRoot = "Edk\Foundation\Efi\Protocol\"
+ RefName = "EfiProtocolLib"
+[files]
+"EfiProtocolLib.sdl"
+"EfiProtocolLib.mak"
+"AbsolutePointer\AbsolutePointer.h"
+"AbsolutePointer\AbsolutePointer.c"
+"AcpiTable\AcpiTable.h"
+"AcpiTable\AcpiTable.c"
+"Arp\Arp.h"
+"Arp\Arp.c"
+"AuthenticationInfo\AuthenticationInfo.h"
+"AuthenticationInfo\AuthenticationInfo.c"
+"Bis\Bis.h"
+"Bis\Bis.c"
+"BlockIO\BlockIO.h"
+"BlockIO\BlockIO.c"
+"BusSpecificDriverOverride\BusSpecificDriverOverride.h"
+"BusSpecificDriverOverride\BusSpecificDriverOverride.c"
+"ComponentName\ComponentName.h"
+"ComponentName\ComponentName.c"
+"ComponentName2\ComponentName2.h"
+"ComponentName2\ComponentName2.c"
+"DebugPort\DebugPort.h"
+"DebugPort\DebugPort.c"
+"DebugSupport\DebugSupport.h"
+"DebugSupport\DebugSupport.c"
+"Decompress\Decompress.h"
+"Decompress\Decompress.c"
+"DeviceIO\DeviceIO.h"
+"DeviceIO\DeviceIO.c"
+"DevicePath\DevicePath.h"
+"DevicePath\DevicePath.c"
+"DevicePathFromText\DevicePathFromText.h"
+"DevicePathFromText\DevicePathFromText.c"
+"DevicePathToText\DevicePathToText.h"
+"DevicePathToText\DevicePathToText.c"
+"DevicePathUtilities\DevicePathUtilities.h"
+"DevicePathUtilities\DevicePathUtilities.c"
+"Dhcp4\Dhcp4.h"
+"Dhcp4\Dhcp4.c"
+"DiskIO\DiskIo.h"
+"DiskIO\DiskIo.c"
+"DriverBinding\DriverBinding.h"
+"DriverBinding\DriverBinding.c"
+"DriverConfiguration\DriverConfiguration.h"
+"DriverConfiguration\DriverConfiguration.c"
+"DriverConfiguration2\DriverConfiguration2.h"
+"DriverConfiguration2\DriverConfiguration2.c"
+"DriverDiagnostics\DriverDiagnostics.h"
+"DriverDiagnostics\DriverDiagnostics.c"
+"DriverDiagnostics2\DriverDiagnostics2.h"
+"DriverDiagnostics2\DriverDiagnostics2.c"
+"DriverSupportedEfiVersion\DriverSupportedEfiVersion.h"
+"DriverSupportedEfiVersion\DriverSupportedEfiVersion.c"
+"Ebc\Ebc.h"
+"Ebc\Ebc.c"
+"EdidActive\EdidActive.h"
+"EdidActive\EdidActive.c"
+"EdidDiscovered\EdidDiscovered.h"
+"EdidDiscovered\EdidDiscovered.c"
+"EdidOverride\EdidOverride.h"
+"EdidOverride\EdidOverride.c"
+"EfiNetworkInterfaceIdentifier\EfiNetworkInterfaceIdentifier.h"
+"EfiNetworkInterfaceIdentifier\EfiNetworkInterfaceIdentifier.c"
+"FileInfo\FileInfo.h"
+"FileInfo\FileInfo.c"
+"FileSystemInfo\FileSystemInfo.h"
+"FileSystemInfo\FileSystemInfo.c"
+"FileSystemVolumeLabelInfo\FileSystemVolumeLabelInfo.h"
+"FileSystemVolumeLabelInfo\FileSystemVolumeLabelInfo.c"
+"FormBrowser2\FormBrowser2.h"
+"FormBrowser2\FormBrowser2.c"
+"GraphicsOutput\GraphicsOutput.h"
+"GraphicsOutput\GraphicsOutput.c"
+"HiiConfigAccess\HiiConfigAccess.h"
+"HiiConfigAccess\HiiConfigAccess.c"
+"HiiConfigRouting\HiiConfigRouting.h"
+"HiiConfigRouting\HiiConfigRouting.c"
+"HiiDatabase\HiiDatabase.h"
+"HiiDatabase\HiiDatabase.c"
+"HiiFont\HiiFont.h"
+"HiiFont\HiiFont.c"
+"HiiImage\HiiImage.h"
+"HiiImage\HiiImage.c"
+"HiiPackageList\HiiPackageList.h"
+"HiiPackageList\HiiPackageList.c"
+"HiiString\HiiString.h"
+"HiiString\HiiString.c"
+"Ip4\Ip4.h"
+"Ip4\Ip4.c"
+"Ip4Config\Ip4Config.h"
+"Ip4Config\Ip4Config.c"
+"LoadedImage\LoadedImage.h"
+"LoadedImage\LoadedImage.c"
+"LoadedImageDevicePath\LoadedImageDevicePath.h"
+"LoadedImageDevicePath\LoadedImageDevicePath.c"
+"LoadFile\LoadFile.h"
+"LoadFile\LoadFile.c"
+"LoadFile2\LoadFile2.h"
+"LoadFile2\LoadFile2.c"
+"ManagedNetwork\ManagedNetwork.h"
+"ManagedNetwork\ManagedNetwork.c"
+"Mtftp4\Mtftp4.h"
+"Mtftp4\Mtftp4.c"
+"PciIo\PciIo.h"
+"PciIo\PciIo.c"
+"PciRootBridgeIo\PciRootBridgeIo.h"
+"PciRootBridgeIo\PciRootBridgeIo.c"
+"PlatformDriverOverride\PlatformDriverOverride.h"
+"PlatformDriverOverride\PlatformDriverOverride.c"
+"PlatformToDriverConfiguration\PlatformToDriverConfiguration.h"
+"PlatformToDriverConfiguration\PlatformToDriverConfiguration.c"
+"PxeBaseCode\PxeBaseCode.h"
+"PxeBaseCode\PxeBaseCode.c"
+"PxeBaseCodeCallBack\PxeBaseCodeCallBack.h"
+"PxeBaseCodeCallBack\PxeBaseCodeCallBack.c"
+"ScsiPassThru\ScsiPassThru.h"
+"ScsiPassThru\ScsiPassThru.c"
+"SerialIO\SerialIo.h"
+"SerialIO\SerialIo.c"
+"SimpleFileSystem\SimpleFileSystem.h"
+"SimpleFileSystem\SimpleFileSystem.c"
+"SimpleNetwork\SimpleNetwork.h"
+"SimpleNetwork\SimpleNetwork.c"
+"SimplePointer\SimplePointer.h"
+"SimplePointer\SimplePointer.c"
+"SimpleTextIn\SimpleTextIn.h"
+"SimpleTextIn\SimpleTextIn.c"
+"SimpleTextInputEx\SimpleTextInputEx.h"
+"SimpleTextInputEx\SimpleTextInputEx.c"
+"SimpleTextOut\SimpleTextOut.h"
+"SimpleTextOut\SimpleTextOut.c"
+"Udp4\Udp4.h"
+"Udp4\Udp4.c"
+"UgaDraw\UgaDraw.h"
+"UgaDraw\UgaDraw.c"
+"UgaIo\UgaIo.h"
+"UgaIo\UgaIo.c"
+"UnicodeCollation\UnicodeCollation.h"
+"UnicodeCollation\UnicodeCollation.c"
+"UnicodeCollation2\UnicodeCollation2.h"
+"UnicodeCollation2\UnicodeCollation2.c"
+"UsbHostController\UsbHostController.h"
+"UsbHostController\UsbHostController.c"
+"UsbIo\UsbIo.h"
+"UsbIo\UsbIo.c"
+"Hash\Hash.h"
+"Hash\Hash.c"
+"ServiceBinding\ServiceBinding.h"
+"ScsiPassThruExt\ScsiPassThruExt.h"
+"ScsiPassThruExt\ScsiPassThruExt.c"
+"ScsiIo\ScsiIo.h"
+"ScsiIo\ScsiIo.c"
+"TapeIo\TapeIo.h"
+"TapeIo\TapeIo.c"
+"Tcp4\Tcp4.h"
+"Tcp4\Tcp4.c"
+"IScsiInitiatorName\IScsiInitiatorName.h"
+"IScsiInitiatorName\IScsiInitiatorName.c"
+"EfiProtocolLib.inf"
+<endComponent>
diff --git a/EDK/Foundation/Efi/Protocol/EfiProtocolLib.inf b/EDK/Foundation/Efi/Protocol/EfiProtocolLib.inf
new file mode 100644
index 0000000..37e06c6
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EfiProtocolLib.inf
@@ -0,0 +1,194 @@
+#/*++
+#
+# Copyright (c) 2004 - 2008, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+# EfiProtocolLib.inf
+#
+# Abstract:
+#
+# Component description file.
+#
+#--*/
+
+[defines]
+BASE_NAME= EfiProtocolLib
+COMPONENT_TYPE= LIBRARY
+
+[includes.common]
+ $(EDK_SOURCE)\Foundation\Efi
+ $(EDK_SOURCE)\Foundation\Include
+ $(EDK_SOURCE)\Foundation\Efi\Include
+ $(EDK_SOURCE)\Foundation\Framework\Include
+ $(EDK_SOURCE)\Foundation\Include\IndustryStandard
+ $(EDK_SOURCE)\Foundation\Include\Pei
+ $(EDK_SOURCE)\Foundation\Library\Pei\Include
+ $(EDK_SOURCE)\Foundation\Core\Dxe
+ $(EDK_SOURCE)\Foundation\Library\Dxe\Include
+
+[nmake.common]
+
+[sources.common]
+ AbsolutePointer\AbsolutePointer.h
+ AbsolutePointer\AbsolutePointer.c
+ AcpiTable\AcpiTable.h
+ AcpiTable\AcpiTable.c
+ Arp\Arp.h
+ Arp\Arp.c
+ AuthenticationInfo\AuthenticationInfo.h
+ AuthenticationInfo\AuthenticationInfo.c
+ Bis\Bis.h
+ Bis\Bis.c
+ BlockIo\BlockIo.h
+ BlockIo\BlockIo.c
+ BusSpecificDriverOverride\BusSpecificDriverOverride.h
+ BusSpecificDriverOverride\BusSpecificDriverOverride.c
+ ComponentName\ComponentName.h
+ ComponentName\ComponentName.c
+ ComponentName2\ComponentName2.h
+ ComponentName2\ComponentName2.c
+ DebugPort\DebugPort.h
+ DebugPort\DebugPort.c
+ DebugSupport\DebugSupport.h
+ DebugSupport\DebugSupport.c
+ Decompress\Decompress.h
+ Decompress\Decompress.c
+ DeviceIo\DeviceIo.h
+ DeviceIo\DeviceIo.c
+ DevicePath\DevicePath.h
+ DevicePath\DevicePath.c
+ DevicePathFromText\DevicePathFromText.h
+ DevicePathFromText\DevicePathFromText.c
+ DevicePathToText\DevicePathToText.h
+ DevicePathToText\DevicePathToText.c
+ DevicePathUtilities\DevicePathUtilities.h
+ DevicePathUtilities\DevicePathUtilities.c
+ Dhcp4\Dhcp4.h
+ Dhcp4\Dhcp4.c
+ DiskIo\DiskIo.h
+ DiskIo\DiskIo.c
+ DriverBinding\DriverBinding.h
+ DriverBinding\DriverBinding.c
+ DriverConfiguration\DriverConfiguration.h
+ DriverConfiguration\DriverConfiguration.c
+ DriverConfiguration2\DriverConfiguration2.h
+ DriverConfiguration2\DriverConfiguration2.c
+ DriverDiagnostics\DriverDiagnostics.h
+ DriverDiagnostics\DriverDiagnostics.c
+ DriverDiagnostics2\DriverDiagnostics2.h
+ DriverDiagnostics2\DriverDiagnostics2.c
+ DriverSupportedEfiVersion\DriverSupportedEfiVersion.h
+ DriverSupportedEfiVersion\DriverSupportedEfiVersion.c
+ Ebc\Ebc.h
+ Ebc\Ebc.c
+ EdidActive\EdidActive.h
+ EdidActive\EdidActive.c
+ EdidDiscovered\EdidDiscovered.h
+ EdidDiscovered\EdidDiscovered.c
+ EdidOverride\EdidOverride.h
+ EdidOverride\EdidOverride.c
+ EfiNetworkInterfaceIdentifier\EfiNetworkInterfaceIdentifier.h
+ EfiNetworkInterfaceIdentifier\EfiNetworkInterfaceIdentifier.c
+ FileInfo\FileInfo.h
+ FileInfo\FileInfo.c
+ FileSystemInfo\FileSystemInfo.h
+ FileSystemInfo\FileSystemInfo.c
+ FileSystemVolumeLabelInfo\FileSystemVolumeLabelInfo.h
+ FileSystemVolumeLabelInfo\FileSystemVolumeLabelInfo.c
+ FormBrowser2\FormBrowser2.h
+ FormBrowser2\FormBrowser2.c
+ GraphicsOutput\GraphicsOutput.h
+ GraphicsOutput\GraphicsOutput.c
+ HiiConfigAccess\HiiConfigAccess.h
+ HiiConfigAccess\HiiConfigAccess.c
+ HiiConfigRouting\HiiConfigRouting.h
+ HiiConfigRouting\HiiConfigRouting.c
+ HiiDatabase\HiiDatabase.h
+ HiiDatabase\HiiDatabase.c
+ HiiFont\HiiFont.h
+ HiiFont\HiiFont.c
+ HiiImage\HiiImage.h
+ HiiImage\HiiImage.c
+ HiiPackageList\HiiPackageList.h
+ HiiPackageList\HiiPackageList.c
+ HiiString\HiiString.h
+ HiiString\HiiString.c
+ Ip4\Ip4.h
+ Ip4\Ip4.c
+ Ip4Config\Ip4Config.h
+ Ip4Config\Ip4Config.c
+ LoadedImage\LoadedImage.h
+ LoadedImage\LoadedImage.c
+ LoadedImageDevicePath\LoadedImageDevicePath.h
+ LoadedImageDevicePath\LoadedImageDevicePath.c
+ LoadFile\LoadFile.h
+ LoadFile\LoadFile.c
+ LoadFile2\LoadFile2.h
+ LoadFile2\LoadFile2.c
+ ManagedNetwork\ManagedNetwork.h
+ ManagedNetwork\ManagedNetwork.c
+ Mtftp4\Mtftp4.h
+ Mtftp4\Mtftp4.c
+ PciIo\PciIo.h
+ PciIo\PciIo.c
+ PciRootBridgeIo\PciRootBridgeIo.h
+ PciRootBridgeIo\PciRootBridgeIo.c
+ PlatformDriverOverride\PlatformDriverOverride.h
+ PlatformDriverOverride\PlatformDriverOverride.c
+ PlatformToDriverConfiguration\PlatformToDriverConfiguration.h
+ PlatformToDriverConfiguration\PlatformToDriverConfiguration.c
+ PxeBaseCode\PxeBaseCode.h
+ PxeBaseCode\PxeBaseCode.c
+ PxeBaseCodeCallBack\PxeBaseCodeCallBack.h
+ PxeBaseCodeCallBack\PxeBaseCodeCallBack.c
+ ScsiPassThru\ScsiPassThru.h
+ ScsiPassThru\ScsiPassThru.c
+ SerialIo\SerialIo.h
+ SerialIo\SerialIo.c
+ SimpleFileSystem\SimpleFileSystem.h
+ SimpleFileSystem\SimpleFileSystem.c
+ SimpleNetwork\SimpleNetwork.h
+ SimpleNetwork\SimpleNetwork.c
+ SimplePointer\SimplePointer.h
+ SimplePointer\SimplePointer.c
+ SimpleTextIn\SimpleTextIn.h
+ SimpleTextIn\SimpleTextIn.c
+ SimpleTextInputEx\SimpleTextInputEx.h
+ SimpleTextInputEx\SimpleTextInputEx.c
+ SimpleTextOut\SimpleTextOut.h
+ SimpleTextOut\SimpleTextOut.c
+ Udp4\Udp4.h
+ Udp4\Udp4.c
+ UgaDraw\UgaDraw.h
+ UgaDraw\UgaDraw.c
+ UgaIo\UgaIo.h
+ UgaIo\UgaIo.c
+ UnicodeCollation\UnicodeCollation.h
+ UnicodeCollation\UnicodeCollation.c
+ UnicodeCollation2\UnicodeCollation2.h
+ UnicodeCollation2\UnicodeCollation2.c
+ UsbHostController\UsbHostController.h
+ UsbHostController\UsbHostController.c
+ UsbIo\UsbIo.h
+ UsbIo\UsbIo.c
+ Hash\Hash.h
+ Hash\Hash.c
+ ServiceBinding\ServiceBinding.h
+ ScsiPassThruExt\ScsiPassThruExt.h
+ ScsiPassThruExt\ScsiPassThruExt.c
+ ScsiIo\ScsiIo.h
+ ScsiIo\ScsiIo.c
+ TapeIo\TapeIo.h
+ TapeIo\TapeIo.c
+ Tcp4\Tcp4.h
+ Tcp4\Tcp4.c
+ IScsiInitiatorName\IScsiInitiatorName.h
+ IScsiInitiatorName\IScsiInitiatorName.c \ No newline at end of file
diff --git a/EDK/Foundation/Efi/Protocol/EfiProtocolLib.mak b/EDK/Foundation/Efi/Protocol/EfiProtocolLib.mak
new file mode 100644
index 0000000..b62731d
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EfiProtocolLib.mak
@@ -0,0 +1,69 @@
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2009, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#**********************************************************************
+
+#**********************************************************************
+# $Header: /Alaska/SOURCE/Modules/SharkBayRefCodes/IntelEDK/EfiProtocolLib/EfiProtocolLib.mak 1 1/20/12 4:00a Jeffch $
+#
+# $Revision: 1 $
+#
+# $Date: 1/20/12 4:00a $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/IntelEDK/EfiProtocolLib/EfiProtocolLib.mak $
+#
+# 1 1/20/12 4:00a Jeffch
+# Create Intel EDK 1117 Patch 7.
+#
+# 1 9/27/11 6:23a Wesleychen
+# Intel EDK initially releases.
+#
+# 2 9/02/09 3:15a Iminglin
+# EIP24919
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: EfiProtocolLib.mak
+#
+# Description:
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+$(EFIPROTOCOLLIB) : EfiProtocolLib
+
+$(BUILD_DIR)\EfiProtocolLib.lib : EfiProtocolLib
+
+EfiProtocolLib : $(BUILD_DIR)\EfiProtocolLib.mak EfiProtocolLibBin
+
+$(BUILD_DIR)\EfiProtocolLib.mak : $(EfiProtocolLib_DIR)\$(@B).cif $(EfiProtocolLib_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(EfiProtocolLib_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+EfiProtocolLibBin :
+ $(MAKE) /$(MAKEFLAGS) $(EDK_DEFAULTS)\
+ /f $(BUILD_DIR)\EfiProtocolLib.mak all\
+ TYPE=LIBRARY \
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2009, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#********************************************************************** \ No newline at end of file
diff --git a/EDK/Foundation/Efi/Protocol/EfiProtocolLib.sdl b/EDK/Foundation/Efi/Protocol/EfiProtocolLib.sdl
new file mode 100644
index 0000000..862ec65
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/EfiProtocolLib.sdl
@@ -0,0 +1,26 @@
+TOKEN
+ Name = "EfiProtocolLib_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable EfiProtocolLib support in Project"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+End
+
+TOKEN
+ Name = "EFIPROTOCOLLIB"
+ Value = "$(BUILD_DIR)\EfiProtocolLib.lib"
+ TokenType = Expression
+ TargetMAK = Yes
+End
+
+PATH
+ Name = "EfiProtocolLib_DIR"
+End
+
+MODULE
+ Help = "Includes EfiProtocolLib.mak to Project"
+ File = "EfiProtocolLib.mak"
+End
+
diff --git a/EDK/Foundation/Efi/Protocol/FileInfo/FileInfo.c b/EDK/Foundation/Efi/Protocol/FileInfo/FileInfo.c
new file mode 100644
index 0000000..80f4fb0
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/FileInfo/FileInfo.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ FileInfo.c
+
+Abstract:
+
+ FileInfo protocol as defined in the EFI 1.0 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (FileInfo)
+
+EFI_GUID gEfiFileInfoGuid = EFI_FILE_INFO_ID;
+
+EFI_GUID_STRING(&gEfiFileInfoGuid, "File System Info", "EFI File System Info GUID");
diff --git a/EDK/Foundation/Efi/Protocol/FileInfo/FileInfo.h b/EDK/Foundation/Efi/Protocol/FileInfo/FileInfo.h
new file mode 100644
index 0000000..6ab15bd
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/FileInfo/FileInfo.h
@@ -0,0 +1,58 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ FileInfo.c
+
+Abstract:
+
+ SimpleFileSystem protocol as defined in the EFI 1.0 specification.
+
+ The SimpleFileSystem protocol is the programatic access to the FAT (12,16,32)
+ file system specified in EFI 1.0. It can also be used to abstract any
+ file system other than FAT.
+
+ EFI 1.0 can boot from any valid EFI image contained in a SimpleFileSystem
+
+--*/
+
+#ifndef _FILE_INFO_H_
+#define _FILE_INFO_H_
+
+#define EFI_FILE_INFO_ID \
+ { \
+ 0x9576e92, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+typedef struct {
+ UINT64 Size;
+ UINT64 FileSize;
+ UINT64 PhysicalSize;
+ EFI_TIME CreateTime;
+ EFI_TIME LastAccessTime;
+ EFI_TIME ModificationTime;
+ UINT64 Attribute;
+ CHAR16 FileName[1];
+} EFI_FILE_INFO;
+
+//
+// The FileName field of the EFI_FILE_INFO data structure is variable length.
+// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
+// be the size of the data structure without the FileName field. The following macro
+// computes this size correctly no matter how big the FileName array is declared.
+// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
+//
+#define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET (EFI_FILE_INFO, FileName)
+
+extern EFI_GUID gEfiFileInfoGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/FileSystemInfo/FileSystemInfo.c b/EDK/Foundation/Efi/Protocol/FileSystemInfo/FileSystemInfo.c
new file mode 100644
index 0000000..b3489aa
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/FileSystemInfo/FileSystemInfo.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ FileSystemInfo.c
+
+Abstract:
+
+ FileSystemInfo protocol as defined in the EFI 1.0 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (FileSystemInfo)
+
+EFI_GUID gEfiFileSystemInfoGuid = EFI_FILE_SYSTEM_INFO_ID_GUID;
+
+EFI_GUID_STRING(&gEfiFileSystemInfoGuid, "File System Info ID", "EFI File System Info ID GUID");
diff --git a/EDK/Foundation/Efi/Protocol/FileSystemInfo/FileSystemInfo.h b/EDK/Foundation/Efi/Protocol/FileSystemInfo/FileSystemInfo.h
new file mode 100644
index 0000000..b84f956
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/FileSystemInfo/FileSystemInfo.h
@@ -0,0 +1,51 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ FileSystemInfo.h
+
+Abstract:
+
+ FileSystemInfo protocol as defined in the EFI 1.0 specification.
+
+
+--*/
+
+#ifndef _FILE_SYSTEM_INFO_H_
+#define _FILE_SYSTEM_INFO_H_
+
+#define EFI_FILE_SYSTEM_INFO_ID_GUID \
+ { \
+ 0x9576e93, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+typedef struct {
+ UINT64 Size;
+ BOOLEAN ReadOnly;
+ UINT64 VolumeSize;
+ UINT64 FreeSpace;
+ UINT32 BlockSize;
+ CHAR16 VolumeLabel[1];
+} EFI_FILE_SYSTEM_INFO;
+
+//
+// The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
+// Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
+// to be the size of the data structure without the VolumeLable field. The following macro
+// computes this size correctly no matter how big the VolumeLable array is declared.
+// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
+//
+#define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET (EFI_FILE_SYSTEM_INFO, VolumeLabel)
+
+extern EFI_GUID gEfiFileSystemInfoGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/FileSystemVolumeLabelInfo/FileSystemVolumeLabelInfo.c b/EDK/Foundation/Efi/Protocol/FileSystemVolumeLabelInfo/FileSystemVolumeLabelInfo.c
new file mode 100644
index 0000000..2f58025
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/FileSystemVolumeLabelInfo/FileSystemVolumeLabelInfo.c
@@ -0,0 +1,34 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ FileSystemVolumeLabelInfo.c
+
+Abstract:
+
+ SimpleFileSystem protocol as defined in the EFI 1.0 specification.
+
+ The SimpleFileSystem protocol is the programatic access to the FAT (12,16,32)
+ file system specified in EFI 1.0. It can also be used to abstract any
+ file system other than FAT.
+
+ EFI 1.0 can boot from any valid EFI image contained in a SimpleFileSystem
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (FileSystemVolumeLabelInfo)
+
+EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID_GUID;
+
+EFI_GUID_STRING
+ (&gEfiFileSystemVolumeLabelInfoIdGuid, "File System Vol Label ID", "EFI File System Volume Label Info ID GUID");
diff --git a/EDK/Foundation/Efi/Protocol/FileSystemVolumeLabelInfo/FileSystemVolumeLabelInfo.h b/EDK/Foundation/Efi/Protocol/FileSystemVolumeLabelInfo/FileSystemVolumeLabelInfo.h
new file mode 100644
index 0000000..85238bf
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/FileSystemVolumeLabelInfo/FileSystemVolumeLabelInfo.h
@@ -0,0 +1,38 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ FileSystemVolumeLabelInfo.h
+
+Abstract:
+
+ FileSystemVolumeLabelInfo protocol as defined in the EFI 1.0 specification.
+
+--*/
+
+#ifndef _FILE_SYSTEM_VOLUME_LABEL_INFO_H_
+#define _FILE_SYSTEM_VOLUME_LABEL_INFO_H_
+
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID_GUID \
+ { \
+ 0xDB47D7D3, 0xFE81, 0x11d3, 0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D \
+ }
+
+typedef struct {
+ CHAR16 VolumeLabel[1];
+} EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
+
+#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET (EFI_FILE_SYSTEM_VOLUME_LABEL_INFO, VolumeLabel)
+
+extern EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.c b/EDK/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.c
new file mode 100644
index 0000000..43e9333
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ FormBrowser2.c
+
+Abstract:
+
+ The EFI_FORM_BROWSER2_PROTOCOL is the interface to the UEFI configuration driver.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (FormBrowser2)
+
+EFI_GUID gEfiFormBrowser2ProtocolGuid = EFI_FORM_BROWSER2_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiFormBrowser2ProtocolGuid, "Form Browser2 Protocol", "Form Browser 2.1 protocol");
diff --git a/EDK/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h b/EDK/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h
new file mode 100644
index 0000000..2acbfd3
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h
@@ -0,0 +1,136 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ FormBrowser2.h
+
+Abstract:
+
+ The EFI_FORM_BROWSER2_PROTOCOL is the interface to the UEFI configuration driver.
+
+--*/
+
+#ifndef _FORM_BROWSER2_H_
+#define _FORM_BROWSER2_H_
+
+#include "EfiHii.h"
+
+#define EFI_FORM_BROWSER2_PROTOCOL_GUID \
+ { \
+ 0xb9d4c360, 0xbcfb, 0x4f9b, 0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_FORM_BROWSER2_PROTOCOL);
+
+typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL;
+
+typedef struct {
+ UINTN LeftColumn;
+ UINTN RightColumn;
+ UINTN TopRow;
+ UINTN BottomRow;
+} EFI_SCREEN_DESCRIPTOR;
+
+typedef UINTN EFI_BROWSER_ACTION_REQUEST;
+
+#define EFI_BROWSER_ACTION_REQUEST_NONE 0
+#define EFI_BROWSER_ACTION_REQUEST_RESET 1
+#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2
+#define EFI_BROWSER_ACTION_REQUEST_EXIT 3
+
+//
+// The following types are currently defined:
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SEND_FORM2) (
+ IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
+ IN EFI_HII_HANDLE *Handles,
+ IN UINTN HandleCount,
+ IN EFI_GUID *FormSetGuid, OPTIONAL
+ IN UINT16 FormId, OPTIONAL
+ IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
+ OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
+ )
+/*++
+
+Routine Description:
+ This is the routine which an external caller uses to direct the browser
+ where to obtain it's information.
+
+Arguments:
+ This - A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
+ Handles - A pointer to an array of HII handles to display.
+ HandleCount - The number of handles in the array specified by Handle.
+ FormSetGuid - This field points to the EFI_GUID which must match the Guid field in the EFI_IFR_FORM_SET op-code for the specified
+ forms-based package. If FormSetGuid is NULL, then this function will display the first found forms package.
+ FormId - This field specifies which EFI_IFR_FORM to render as the first displayable page.
+ If this field has a value of 0x0000, then the forms browser will render the specified forms in their encoded order.
+ ScreenDimenions - This allows the browser to be called so that it occupies a portion of the physical screen instead of
+ dynamically determining the screen dimensions.
+ ActionRequest - Points to the action recommended by the form.
+
+Returns:
+ EFI_SUCCESS - The function completed successfully.
+ EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
+ EFI_NOT_FOUND - No valid forms could be found to display.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BROWSER_CALLBACK2) (
+ IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
+ IN OUT UINTN *ResultsDataSize,
+ IN OUT EFI_STRING ResultsData,
+ IN BOOLEAN RetrieveData,
+ IN CONST EFI_GUID *VariableGuid, OPTIONAL
+ IN CONST CHAR16 *VariableName OPTIONAL
+ )
+/*++
+
+Routine Description:
+ This function is called by a callback handler to retrieve uncommitted state
+ data from the browser.
+
+Arguments:
+ This - A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
+ ResultsDataSize - A pointer to the size of the buffer associated with ResultsData.
+ On input, the size in bytes of ResultsData.
+ On output, the size of data returned in ResultsData.
+ ResultsData - A string returned from an IFR browser or equivalent.
+ The results string will have no routing information in them.
+ RetrieveData - A BOOLEAN field which allows an agent to retrieve (if RetrieveData = TRUE)
+ data from the uncommitted browser state information or set
+ (if RetrieveData = FALSE) data in the uncommitted browser state information.
+ VariableGuid - An optional field to indicate the target variable GUID name to use.
+ VariableName - An optional field to indicate the target human-readable variable name.
+
+Returns:
+ EFI_SUCCESS - The results have been distributed or are awaiting distribution.
+ EFI_BUFFER_TOO_SMALL - The ResultsDataSize specified was too small to contain the results data.
+
+--*/
+;
+
+typedef struct _EFI_FORM_BROWSER2_PROTOCOL {
+ EFI_SEND_FORM2 SendForm;
+ EFI_BROWSER_CALLBACK2 BrowserCallback;
+} EFI_FORM_BROWSER2_PROTOCOL;
+
+extern EFI_GUID gEfiFormBrowser2ProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/GraphicsOutput/GraphicsOutput.c b/EDK/Foundation/Efi/Protocol/GraphicsOutput/GraphicsOutput.c
new file mode 100644
index 0000000..a8417a3
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/GraphicsOutput/GraphicsOutput.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ GraphicsOutput.c
+
+Abstract:
+
+ Graphics Output Protocol from the UEFI 2.0 specification.
+
+ Abstraction of a very simple graphics device.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (GraphicsOutput)
+
+EFI_GUID gEfiGraphicsOutputProtocolGuid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiGraphicsOutputProtocolGuid, "EFI Graphics Output Protocol", "UEFI Graphics Output Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/GraphicsOutput/GraphicsOutput.h b/EDK/Foundation/Efi/Protocol/GraphicsOutput/GraphicsOutput.h
new file mode 100644
index 0000000..1444e52
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/GraphicsOutput/GraphicsOutput.h
@@ -0,0 +1,206 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ GraphicsOutput.h
+
+Abstract:
+
+ Graphics Output Protocol from the UEFI 2.0 specification.
+
+ Abstraction of a very simple graphics device.
+
+--*/
+
+#ifndef __GRAPHICS_OUTPUT_H__
+#define __GRAPHICS_OUTPUT_H__
+
+#include EFI_PROTOCOL_DEFINITION (UgaDraw)
+
+#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
+ { \
+ 0x9042a9de, 0x23dc, 0x4a38, 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a \
+ }
+
+typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;
+
+typedef struct {
+ UINT32 RedMask;
+ UINT32 GreenMask;
+ UINT32 BlueMask;
+ UINT32 ReservedMask;
+} EFI_PIXEL_BITMASK;
+
+typedef enum {
+ PixelRedGreenBlueReserved8BitPerColor,
+ PixelBlueGreenRedReserved8BitPerColor,
+ PixelBitMask,
+ PixelBltOnly,
+ PixelFormatMax
+} EFI_GRAPHICS_PIXEL_FORMAT;
+
+typedef struct {
+ UINT32 Version;
+ UINT32 HorizontalResolution;
+ UINT32 VerticalResolution;
+ EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
+ EFI_PIXEL_BITMASK PixelInformation;
+ UINT32 PixelsPerScanLine;
+} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (
+ IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
+ IN UINT32 ModeNumber,
+ OUT UINTN *SizeOfInfo,
+ OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
+ )
+/*++
+
+ Routine Description:
+ Return the current video mode information.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ModeNumber - The mode number to return information on.
+ SizeOfInfo - A pointer to the size, in bytes, of the Info buffer.
+ Info - A pointer to callee allocated buffer that returns information about ModeNumber.
+
+ Returns:
+ EFI_SUCCESS - Mode information returned.
+ EFI_DEVICE_ERROR - A hardware error occurred trying to retrieve the video mode.
+ EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
+ EFI_INVALID_PARAMETER - One of the input args was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (
+ IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
+ IN UINT32 ModeNumber
+ )
+/*++
+
+ Routine Description:
+ Return the current video mode information.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ModeNumber - The mode number to be set.
+
+ Returns:
+ EFI_SUCCESS - Graphics mode was changed.
+ EFI_DEVICE_ERROR - The device had an error and could not complete the request.
+ EFI_UNSUPPORTED - ModeNumber is not supported by this device.
+
+--*/
+;
+
+typedef EFI_UGA_PIXEL EFI_GRAPHICS_OUTPUT_BLT_PIXEL;
+
+typedef union {
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel;
+ UINT32 Raw;
+} EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION;
+
+typedef enum {
+ EfiBltVideoFill,
+ EfiBltVideoToBltBuffer,
+ EfiBltBufferToVideo,
+ EfiBltVideoToVideo,
+ EfiGraphicsOutputBltOperationMax
+} EFI_GRAPHICS_OUTPUT_BLT_OPERATION;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (
+ IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL * BltBuffer, OPTIONAL
+ IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
+ IN UINTN SourceX,
+ IN UINTN SourceY,
+ IN UINTN DestinationX,
+ IN UINTN DestinationY,
+ IN UINTN Width,
+ IN UINTN Height,
+ IN UINTN Delta OPTIONAL
+ );
+
+/*++
+
+ Routine Description:
+ The following table defines actions for BltOperations:
+ EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
+ directly to every pixel of the video display rectangle
+ (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.
+ EfiBltVideoToBltBuffer - Read data from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
+ the BltBuffer rectangle (DestinationX, DestinationY )
+ (DestinationX + Width, DestinationY + Height). If DestinationX or
+ DestinationY is not zero then Delta must be set to the length in bytes
+ of a row in the BltBuffer.
+ EfiBltBufferToVideo - Write data from the BltBuffer rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
+ video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
+ not zero then Delta must be set to the length in bytes of a row in the
+ BltBuffer.
+ EfiBltVideoToVideo - Copy from the video display rectangle (SourceX, SourceY)
+ (SourceX + Width, SourceY + Height) .to the video display rectangle
+ (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
+ The BltBuffer and Delta are not used in this mode.
+
+ Arguments:
+ This - Protocol instance pointer.
+ BltBuffer - Buffer containing data to blit into video buffer. This
+ buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
+ BltOperation - Operation to perform on BlitBuffer and video memory
+ SourceX - X coordinate of source for the BltBuffer.
+ SourceY - Y coordinate of source for the BltBuffer.
+ DestinationX - X coordinate of destination for the BltBuffer.
+ DestinationY - Y coordinate of destination for the BltBuffer.
+ Width - Width of rectangle in BltBuffer in pixels.
+ Height - Hight of rectangle in BltBuffer in pixels.
+ Delta -
+
+ Returns:
+ EFI_SUCCESS - The Blt operation completed.
+ EFI_INVALID_PARAMETER - BltOperation is not valid.
+ EFI_DEVICE_ERROR - A hardware error occured writting to the video
+ buffer.
+
+--*/
+;
+
+typedef struct {
+ UINT32 MaxMode;
+ UINT32 Mode;
+ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
+ UINTN SizeOfInfo;
+ EFI_PHYSICAL_ADDRESS FrameBufferBase;
+ UINTN FrameBufferSize;
+} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
+
+typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL {
+ EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode;
+} EFI_GRAPHICS_OUTPUT_PROTOCOL;
+
+extern EFI_GUID gEfiGraphicsOutputProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Hash/Hash.c b/EDK/Foundation/Efi/Protocol/Hash/Hash.c
new file mode 100644
index 0000000..c8871e1
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Hash/Hash.c
@@ -0,0 +1,40 @@
+/*++
+
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Hash.c
+
+Abstract:
+ EFI_HASH_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
+ EFI_HASH_PROTOCOL as defined in UEFI 2.0.
+ The EFI Hash Service Binding Protocol is used to locate hashing services support
+ provided by a driver and create and destroy instances of the EFI Hash Protocol
+ so that a multiple drivers can use the underlying hashing services.
+ The EFI Service Binding Protocol defines the generic Service Binding Protocol functions.
+
+Revision History
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Hash)
+
+EFI_GUID gEfiHashServiceBindingProtocolGuid = EFI_HASH_SERVICE_BINDING_PROTOCOL;
+EFI_GUID gEfiHashProtocolGuid = EFI_HASH_PROTOCOL_GUID;
+EFI_GUID gEfiHashAlgorithmSha1Guid = EFI_HASH_ALGORITHM_SHA1_GUID;
+EFI_GUID gEfiHashAlgorithmSha224Guid = EFI_HASH_ALGORITHM_SHA224_GUID;
+EFI_GUID gEfiHashAlgorithmSha256Guid = EFI_HASH_ALGORITHM_SHA256_GUID;
+EFI_GUID gEfiHashAlgorithmSha384Guid = EFI_HASH_ALGORITHM_SHA384_GUID;
+EFI_GUID gEfiHashAlgorithmSha512Guid = EFI_HASH_ALGORITHM_SHA512_GUID;
+EFI_GUID gEfiHashAlgorithmMD5Guid = EFI_HASH_ALGORTIHM_MD5_GUID;
+
+EFI_GUID_STRING(&gEfiHashProtocolGuid, "Hash protoco", "UEFI 2.0 Hash protocol");
+EFI_GUID_STRING(&gEfiHashServiceBindingProtocolGuid, "Hash service binding protoco", "UEFI 2.0 Hash service binding protocol");
diff --git a/EDK/Foundation/Efi/Protocol/Hash/Hash.h b/EDK/Foundation/Efi/Protocol/Hash/Hash.h
new file mode 100644
index 0000000..2f2ec1b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Hash/Hash.h
@@ -0,0 +1,161 @@
+/*++
+
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Hash.h
+
+Abstract:
+ EFI_HASH_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
+ EFI_HASH_PROTOCOL as defined in UEFI 2.0.
+ The EFI Hash Service Binding Protocol is used to locate hashing services support
+ provided by a driver and create and destroy instances of the EFI Hash Protocol
+ so that a multiple drivers can use the underlying hashing services.
+ The EFI Service Binding Protocol defines the generic Service Binding Protocol functions.
+
+Revision History
+--*/
+
+#ifndef __EFI_HASH_PROTOCOL_H__
+#define __EFI_HASH_PROTOCOL_H__
+
+#define EFI_HASH_SERVICE_BINDING_PROTOCOL \
+ { \
+ 0x42881c98, 0xa4f3, 0x44b0, {0xa3, 0x9d, 0xdf, 0xa1, 0x86, 0x67, 0xd8, 0xcd } \
+ }
+
+#define EFI_HASH_PROTOCOL_GUID \
+ { \
+ 0xc5184932, 0xdba5, 0x46db, {0xa5, 0xba, 0xcc, 0x0b, 0xda, 0x9c, 0x14, 0x35 } \
+ }
+
+#define EFI_HASH_ALGORITHM_SHA1_GUID \
+ { \
+ 0x2ae9d80f, 0x3fb2, 0x4095, {0xb7, 0xb1, 0xe9, 0x31, 0x57, 0xb9, 0x46, 0xb6 } \
+ }
+
+#define EFI_HASH_ALGORITHM_SHA224_GUID \
+ { \
+ 0x8df01a06, 0x9bd5, 0x4bf7, {0xb0, 0x21, 0xdb, 0x4f, 0xd9, 0xcc, 0xf4, 0x5b } \
+ }
+
+#define EFI_HASH_ALGORITHM_SHA256_GUID \
+ { \
+ 0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \
+ }
+
+#define EFI_HASH_ALGORITHM_SHA384_GUID \
+ { \
+ 0xefa96432, 0xde33, 0x4dd2, {0xae, 0xe6, 0x32, 0x8c, 0x33, 0xdf, 0x77, 0x7a } \
+ }
+
+#define EFI_HASH_ALGORITHM_SHA512_GUID \
+ { \
+ 0xcaa4381e, 0x750c, 0x4770, {0xb8, 0x70, 0x7a, 0x23, 0xb4, 0xe4, 0x21, 0x30 } \
+ }
+
+#define EFI_HASH_ALGORTIHM_MD5_GUID \
+ { \
+ 0xaf7c79c, 0x65b5, 0x4319, {0xb0, 0xae, 0x44, 0xec, 0x48, 0x4e, 0x4a, 0xd7 } \
+ }
+
+typedef struct _EFI_HASH_PROTOCOL EFI_HASH_PROTOCOL;
+
+typedef UINT8 EFI_MD5_HASH[16];
+typedef UINT8 EFI_SHA1_HASH[20];
+typedef UINT8 EFI_SHA224_HASH[28];
+typedef UINT8 EFI_SHA256_HASH[32];
+typedef UINT8 EFI_SHA384_HASH[48];
+typedef UINT8 EFI_SHA512_HASH[64];
+
+typedef union {
+ EFI_MD5_HASH *Md5Hash;
+ EFI_SHA1_HASH *Sha1Hash;
+ EFI_SHA224_HASH *Sha224Hash;
+ EFI_SHA256_HASH *Sha256Hash;
+ EFI_SHA384_HASH *Sha384Hash;
+ EFI_SHA512_HASH *Sha512Hash;
+} EFI_HASH_OUTPUT;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HASH_GET_HASH_SIZE) (
+ IN CONST EFI_HASH_PROTOCOL *This,
+ IN CONST EFI_GUID *HashAlgorithm,
+ OUT UINTN *HashSize
+ )
+/*++
+
+ Routine Description:
+ Returns the size of the hash which results from a specific algorithm.
+
+ Arguments:
+ This - Points to this instance of EFI_HASH_PROTOCOL.
+ HashAlgorithm - Points to the EFI_GUID which identifies the algorithm to use.
+ HashSize - Holds the returned size of the algorithm¡¯s hash.
+
+ Returns:
+ EFI_SUCCESS - Hash size returned successfully.
+ EFI_INVALID_PARAMETER - HashSize is NULL
+ EFI_UNSUPPORTED - The algorithm specified by HashAlgorithm is not supported
+ by this driver.
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HASH_HASH) (
+ IN CONST EFI_HASH_PROTOCOL *This,
+ IN CONST EFI_GUID *HashAlgorithm,
+ IN BOOLEAN Extend,
+ IN CONST UINT8 *Message,
+ IN UINT64 MessageSize,
+ IN OUT EFI_HASH_OUTPUT *Hash
+ )
+/*++
+
+ Routine Description:
+ Returns the size of the hash which results from a specific algorithm.
+
+ Arguments:
+ This - Points to this instance of EFI_HASH_PROTOCOL.
+ HashAlgorithm - Points to the EFI_GUID which identifies the algorithm to use.
+ Extend - Specifies whether to create a new hash (FALSE) or extend the specified
+ existing hash (TRUE).
+ Message - Points to the start of the message.
+ MessageSize - The size of Message, in bytes.
+ Hash - On input, if Extend is TRUE, then this holds the hash to extend. On
+ output, holds the resulting hash computed from the message.
+
+ Returns:
+ EFI_SUCCESS - Hash returned successfully.
+ EFI_INVALID_PARAMETER - Message or Hash is NULL
+ EFI_UNSUPPORTED - The algorithm specified by HashAlgorithm is not supported by this
+ driver. Or extend is TRUE and the algorithm doesn¡¯t support extending the hash.
+
+--*/
+;
+
+struct _EFI_HASH_PROTOCOL {
+ EFI_HASH_GET_HASH_SIZE GetHashSize;
+ EFI_HASH_HASH Hash;
+};
+
+extern EFI_GUID gEfiHashServiceBindingProtocolGuid;
+extern EFI_GUID gEfiHashProtocolGuid;
+extern EFI_GUID gEfiHashAlgorithmSha1Guid;
+extern EFI_GUID gEfiHashAlgorithmSha224Guid;
+extern EFI_GUID gEfiHashAlgorithmSha256Guid;
+extern EFI_GUID gEfiHashAlgorithmSha384Guid;
+extern EFI_GUID gEfiHashAlgorithmSha512Guid;
+extern EFI_GUID gEfiHashAlgorithmMD5Guid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.c b/EDK/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.c
new file mode 100644
index 0000000..7e41697
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiConfigAccess.c
+
+Abstract:
+
+ EFI_HII_CONFIG_ACCESS_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiConfigAccess)
+
+EFI_GUID gEfiHiiConfigAccessProtocolGuid = EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiConfigAccessProtocolGuid, "HII Config Access Protocol", "HII Config Access 2.1 protocol");
diff --git a/EDK/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.h b/EDK/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.h
new file mode 100644
index 0000000..9398488
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.h
@@ -0,0 +1,147 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiConfigAccess.h
+
+Abstract:
+
+ EFI_HII_CONFIG_ACCESS_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#ifndef _HII_CONFIG_ACCESS_H_
+#define _HII_CONFIG_ACCESS_H_
+
+#include EFI_PROTOCOL_DEFINITION (FormBrowser2)
+
+#define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \
+ { \
+ 0x330d4706, 0xf2a0, 0x4e4f, 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_HII_CONFIG_ACCESS_PROTOCOL);
+
+typedef UINTN EFI_BROWSER_ACTION;
+
+#define EFI_BROWSER_ACTION_CHANGING 0
+#define EFI_BROWSER_ACTION_CHANGED 1
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_ACCESS_EXTRACT_CONFIG) (
+ IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
+ IN CONST EFI_STRING Request,
+ OUT EFI_STRING *Progress,
+ OUT EFI_STRING *Results
+ )
+/*++
+
+ Routine Description:
+ This function allows a caller to extract the current configuration for one
+ or more named elements from the target driver.
+
+ Arguments:
+ This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
+ Request - A null-terminated Unicode string in <ConfigRequest> format.
+ Progress - On return, points to a character in the Request string.
+ Points to the string's null terminator if request was successful.
+ Points to the most recent '&' before the first failing name/value
+ pair (or the beginning of the string if the failure is in the
+ first name/value pair) if the request was not successful.
+ Results - A null-terminated Unicode string in <ConfigAltResp> format which
+ has all values filled in for the names in the Request string.
+ String to be allocated by the called function.
+
+ Returns:
+ EFI_SUCCESS - The Results is filled with the requested values.
+ EFI_OUT_OF_RESOURCES - Not enough memory to store the results.
+ EFI_INVALID_PARAMETER - Request is NULL, illegal syntax, or unknown name.
+ EFI_NOT_FOUND - Routing data doesn't match any storage in this driver.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_ACCESS_ROUTE_CONFIG) (
+ IN EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
+ IN CONST EFI_STRING Configuration,
+ OUT EFI_STRING *Progress
+ )
+/*++
+
+ Routine Description:
+ This function processes the results of changes in configuration.
+
+ Arguments:
+ This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
+ Configuration - A null-terminated Unicode string in <ConfigResp> format.
+ Progress - A pointer to a string filled in with the offset of the most
+ recent '&' before the first failing name/value pair (or the
+ beginning of the string if the failure is in the first
+ name/value pair) or the terminating NULL if all was successful.
+
+ Returns:
+ EFI_SUCCESS - The Results is processed successfully.
+ EFI_INVALID_PARAMETER - Configuration is NULL.
+ EFI_NOT_FOUND - Routing data doesn't match any storage in this driver.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK) (
+ IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
+ IN EFI_BROWSER_ACTION Action,
+ IN EFI_QUESTION_ID QuestionId,
+ IN UINT8 Type,
+ IN EFI_IFR_TYPE_VALUE *Value,
+ OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
+ )
+/*++
+
+ Routine Description:
+ This function processes the results of changes in configuration.
+
+ Arguments:
+ This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
+ Action - Specifies the type of action taken by the browser.
+ QuestionId - A unique value which is sent to the original exporting driver
+ so that it can identify the type of data to expect.
+ Type - The type of value for the question.
+ Value - A pointer to the data being sent to the original exporting driver.
+ ActionRequest - On return, points to the action requested by the callback function.
+
+ Returns:
+ EFI_SUCCESS - The callback successfully handled the action.
+ EFI_OUT_OF_RESOURCES - Not enough storage is available to hold the variable and its data.
+ EFI_DEVICE_ERROR - The variable could not be saved.
+ EFI_UNSUPPORTED - The specified Action is not supported by the callback.
+
+--*/
+;
+
+typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL {
+ EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig;
+ EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig;
+ EFI_HII_ACCESS_FORM_CALLBACK Callback;
+} EFI_HII_CONFIG_ACCESS_PROTOCOL;
+
+extern EFI_GUID gEfiHiiConfigAccessProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.c b/EDK/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.c
new file mode 100644
index 0000000..19a178f
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiConfigRouting.c
+
+Abstract:
+
+ EFI_HII_CONFIG_ROUTING_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiConfigRouting)
+
+EFI_GUID gEfiHiiConfigRoutingProtocolGuid = EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiConfigRoutingProtocolGuid, "HII Config Routing Protocol", "HII Config Routing 2.1 protocol");
diff --git a/EDK/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.h b/EDK/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.h
new file mode 100644
index 0000000..f8bdff8
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.h
@@ -0,0 +1,314 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiConfigRouting.h
+
+Abstract:
+
+ EFI_HII_CONFIG_ROUTING_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#ifndef __EFI_HII_CONFIG_ROUTING_H__
+#define __EFI_HII_CONFIG_ROUTING_H__
+
+#include "EfiHii.h"
+
+#define EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID \
+ { \
+ 0x587e72d7, 0xcc50, 0x4f79, 0x82, 0x09, 0xca, 0x29, 0x1f, 0xc1, 0xa1, 0x0f \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_HII_CONFIG_ROUTING_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_EXTRACT_CONFIG) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING Request,
+ OUT EFI_STRING *Progress,
+ OUT EFI_STRING *Results
+ )
+/*++
+
+ Routine Description:
+ This function allows a caller to extract the current configuration
+ for one or more named elements from one or more drivers.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ Request - A null-terminated Unicode string in <MultiConfigRequest> format.
+ Progress - On return, points to a character in the Request string. Points to the string's null
+ terminator if request was successful. Points to the most recent '&' before the first
+ failing name / value pair (or the beginning of the string if the failure is in the first
+ name / value pair) if the request was not successful.
+ Results - Null-terminated Unicode string in <MultiConfigAltResp> format which has all
+ values filled in for the names in the Request string. String to be allocated by the called
+ function.
+
+ Returns:
+ EFI_SUCCESS - The Results string is filled with the values
+ corresponding to all requested names.
+ EFI_OUT_OF_RESOURCES - Not enough memory to store the parts of the results
+ that must be stored awaiting possible future
+ protocols.
+ EFI_NOT_FOUND - Routing data doesn't match any known driver.
+ Progress set to the 'G' in "GUID" of the routing
+ header that doesn't match. Note: There is no
+ requirement that all routing data be validated before
+ any configuration extraction.
+ EFI_INVALID_PARAMETER - For example, passing in a NULL for the Request
+ parameter would result in this type of error. The
+ Progress parameter is set to NULL.
+
+ EFI_INVALID_PARAMETER - Illegal syntax. Progress set to most recent & before
+ the error or the beginning of the string.
+
+ EFI_INVALID_PARAMETER - Unknown name. Progress points to the & before
+ the name in question.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_EXPORT_CONFIG) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ OUT EFI_STRING *Results
+ )
+/*++
+
+ Routine Description:
+ This function allows the caller to request the current configuration for the
+ entirety of the current HII database and returns the data in a null-terminated Unicode string.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ Results - Null-terminated Unicode string in <MultiConfigAltResp> format which has all
+ values filled in for the names in the Request string. String to be allocated by the called
+ function. De-allocation is up to the caller.
+
+ Returns:
+ EFI_SUCCESS - The Results string is filled with the values
+ corresponding to all requested names.
+ EFI_OUT_OF_RESOURCES - Not enough memory to store the parts of the results
+ that must be stored awaiting possible future
+ protocols.
+ EFI_INVALID_PARAMETER - For example, passing in a NULL for the Results
+ parameter would result in this type of error.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_ROUTE_CONFIG) (
+ IN EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING Configuration,
+ OUT EFI_STRING *Progress
+ )
+/*++
+
+ Routine Description:
+ This function processes the results of processing forms and routes it to the
+ appropriate handlers or storage.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ Configuration - A null-terminated Unicode string in <MulltiConfigResp> format.
+ Progress - A pointer to a string filled in with the offset of the most recent "&" before the first
+ failing name / value pair (or the beginning of the string if the failure is in the first
+ name / value pair) or the terminating NULL if all was successful.
+
+ Returns:
+ EFI_SUCCESS - The results have been distributed or are awaiting
+ distribution.
+ EFI_OUT_OF_RESOURCES - Not enough memory to store the parts of the results
+ that must be stored awaiting possible future
+ protocols.
+ EFI_INVALID_PARAMETER - Passing in a NULL for the Configuration
+ parameter would result in this type of error.
+ EFI_NOT_FOUND - Target for the specified routing data was not found.
+
+--*/
+;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_BLOCK_TO_CONFIG) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING ConfigRequest,
+ IN CONST UINT8 *Block,
+ IN CONST UINTN BlockSize,
+ OUT EFI_STRING *Config,
+ OUT EFI_STRING *Progress
+ )
+/*++
+
+ Routine Description:
+ This helper function is to be called by drivers to map configuration data stored
+ in byte array ("block") formats such as UEFI Variables into current configuration strings.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ ConfigRequest - A null-terminated Unicode string in <ConfigRequest> format.
+ Block - Array of bytes defining the block's configuration.
+ BlockSize - Length in bytes of Block.
+ Config - Filled-in configuration string. String allocated by the function.
+ Returned only if call is successful.
+ Progress - A pointer to a string filled in with the offset of the most recent "&" before the first
+ failing name / value pair (or the beginning of the string if the failure is in the first
+ name / value pair) or the terminating NULL if all was successful.
+
+ Returns:
+ EFI_SUCCESS - The request succeeded. Progress points to the null
+ terminator at the end of the ConfigRequest
+ string.
+ EFI_OUT_OF_RESOURCES - Not enough memory to allocate Config.
+ Progress points to the first character of
+ ConfigRequest.
+ EFI_INVALID_PARAMETER - Passing in a NULL for the ConfigRequest or
+ Block parameter would result in this type of
+ error. Progress points to the first character of
+ ConfigRequest.
+ EFI_NOT_FOUND - Target for the specified routing data was not found.
+ Progress points to the "G" in "GUID" of the
+ errant routing data.
+ EFI_DEVICE_ERROR - Block not large enough. Progress undefined.
+ EFI_INVALID_PARAMETER - Encountered non <BlockName> formatted string.
+ Block is left updated and Progress points at the "&"
+ preceding the first non-<BlockName>.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_CONFIG_TO_BLOCK) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING ConfigResp,
+ IN OUT UINT8 *Block,
+ IN OUT UINTN *BlockSize,
+ OUT EFI_STRING *Progress
+ )
+/*++
+
+ Routine Description:
+ This helper function is to be called by drivers to map configuration strings
+ to configurations stored in byte array ("block") formats such as UEFI Variables.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ ConfigResp - A null-terminated Unicode string in <ConfigResp> format.
+ Block - A possibly null array of bytes representing the current block.
+ Only bytes referenced in the ConfigResp string in the block are modified.
+ If this parameter is null or if the *BlockSize parameter is (on input)
+ shorter than required by the Configuration string, only the BlockSize
+ parameter is updated and an appropriate status (see below) is returned.
+
+ BlockSize - The length of the Block in units of UINT8. On input, this is the size of the Block.
+ On output, if successful, contains the index of the last modified byte in the Block.
+
+ Progress - On return, points to an element of the ConfigResp string filled in with the offset of
+ the most recent "&" before the first failing name / value pair (or the beginning of the
+ string if the failure is in the first name / value pair) or the terminating NULL if all was
+ successful.
+ Returns:
+ EFI_SUCCESS - The request succeeded. Progress points to the null
+ terminator at the end of the ConfigResp
+ string.
+ EFI_OUT_OF_RESOURCES - Not enough memory to allocate Config.
+ Progress points to the first character of
+ ConfigResp.
+ EFI_INVALID_PARAMETER - Passing in a NULL for the ConfigResp or
+ Block parameter would result in this type of error.
+ Progress points to the first character of
+ ConfigResp.
+ EFI_NOT_FOUND - Target for the specified routing data was not found.
+ Progress points to the "G" in "GUID" of the
+ errant routing data.
+ EFI_INVALID_PARAMETER - Encountered non <BlockName> formatted name /
+ value pair. Block is left updated and
+ Progress points at the "&" preceding the first
+ non-<BlockName>.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI * EFI_HII_GET_ALT_CFG) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING Configuration,
+ IN CONST EFI_GUID *Guid,
+ IN CONST EFI_STRING Name,
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN CONST UINT16 *AltCfgId,
+ OUT EFI_STRING *AltCfgResp
+ )
+/*++
+
+ Routine Description:
+ This helper function is to be called by drivers to extract portions of
+ a larger configuration string.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ Configuration - A null-terminated Unicode string in <MultiConfigAltResp> format.
+ Guid - A pointer to the GUID value to search for in the
+ routing portion of the ConfigResp string when retrieving
+ the requested data. If Guid is NULL, then all GUID
+ values will be searched for.
+ Name - A pointer to the NAME value to search for in the
+ routing portion of the ConfigResp string when retrieving
+ the requested data. If Name is NULL, then all Name
+ values will be searched for.
+ DevicePath - A pointer to the PATH value to search for in the
+ routing portion of the ConfigResp string when retrieving
+ the requested data. If DevicePath is NULL, then all
+ DevicePath values will be searched for.
+ AltCfgId - A pointer to the ALTCFG value to search for in the
+ routing portion of the ConfigResp string when retrieving
+ the requested data. If this parameter is NULL,
+ then the current setting will be retrieved.
+ AltCfgResp - A pointer to a buffer which will be allocated by the
+ function which contains the retrieved string as requested.
+ This buffer is only allocated if the call was successful.
+
+ Returns:
+ EFI_SUCCESS - The request succeeded. The requested data was extracted
+ and placed in the newly allocated AltCfgResp buffer.
+ EFI_OUT_OF_RESOURCES - Not enough memory to allocate AltCfgResp.
+ EFI_INVALID_PARAMETER - Any parameter is invalid.
+ EFI_NOT_FOUND - Target for the specified routing data was not found.
+
+--*/
+;
+
+
+typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL {
+ EFI_HII_EXTRACT_CONFIG ExtractConfig;
+ EFI_HII_EXPORT_CONFIG ExportConfig;
+ EFI_HII_ROUTE_CONFIG RouteConfig;
+ EFI_HII_BLOCK_TO_CONFIG BlockToConfig;
+ EFI_HII_CONFIG_TO_BLOCK ConfigToBlock;
+ EFI_HII_GET_ALT_CFG GetAltConfig;
+} EFI_HII_CONFIG_ROUTING_PROTOCOL;
+
+extern EFI_GUID gEfiHiiConfigRoutingProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.c b/EDK/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.c
new file mode 100644
index 0000000..6363d53
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiDatabase.c
+
+Abstract:
+
+ EFI_HII_DATABASE_PROTOCOL
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiDatabase)
+
+EFI_GUID gEfiHiiDatabaseProtocolGuid = EFI_HII_DATABASE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiDatabaseProtocolGuid, "EFI HII DATABASE Protocol", "UEFI 2.1 HII DATABASE Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.h b/EDK/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.h
new file mode 100644
index 0000000..e45c86a
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.h
@@ -0,0 +1,454 @@
+/*++
+
+Copyright (c) 2007 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiDatabase.h
+
+Abstract:
+
+ EFI_HII_DATABASE_PROTOCOL from UEFI 2.1 specification.
+
+ This protocol is a database manager for HII related data structures.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_HII_DATABASE_PROTOCOL_H__
+#define __EFI_HII_DATABASE_PROTOCOL_H__
+
+#include "EfiHii.h"
+
+//
+// Global ID for the Hii Database Protocol.
+//
+
+#define EFI_HII_DATABASE_PROTOCOL_GUID \
+ { \
+ 0xef9fc172, 0xa1b2, 0x4693, 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 \
+ }
+
+#define EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID \
+ { \
+ 0x14982a4f, 0xb0ed, 0x45b8, 0xa8, 0x11, 0x5a, 0x7a, 0x9b, 0xc2, 0x32, 0xdf \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_HII_DATABASE_PROTOCOL);
+
+typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE;
+
+#define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001
+#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002
+#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004
+#define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_NOTIFY) (
+ IN UINT8 PackageType,
+ IN CONST EFI_GUID *PackageGuid,
+ IN CONST EFI_HII_PACKAGE_HEADER *Package,
+ IN EFI_HII_HANDLE Handle,
+ IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
+ )
+/*++
+
+ Routine Description:
+ Functions which are registered to receive notification of database events have this prototype. The
+ actual event is encoded in NotifyType. The following table describes how PackageType,
+ PackageGuid, Handle, and Package are used for each of the notification types.
+
+ Arguments:
+ PackageType - Package type of the notification.
+ PackageGuid - If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to
+ the GUID which must match the Guid field of
+ EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must be NULL.
+ Package - Points to the package referred to by the notification.
+ Handle - The handle of the package list which contains the specified package.
+ NotifyType - The type of change concerning the database.
+
+ Returns:
+ EFI status code.
+
+--*/
+;
+
+//
+// EFI_HII_DATABASE_PROTOCOL protocol prototypes
+//
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_NEW_PACK) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,
+ IN CONST EFI_HANDLE DriverHandle,
+ OUT EFI_HII_HANDLE *Handle
+ )
+/*++
+
+ Routine Description:
+ This function adds the packages in the package list to the database and returns a handle. If there is a
+ EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
+ create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ PackageList - A pointer to an EFI_HII_PACKAGE_LIST_HEADER structure.
+ DriverHandle - Associate the package list with this EFI handle.
+ Handle - A pointer to the EFI_HII_HANDLE instance.
+
+ Returns:
+ EFI_SUCCESS - The package list associated with the Handle
+ was added to the HII database.
+ EFI_OUT_OF_RESOURCES - Unable to allocate necessary resources for the
+ new database contents.
+ EFI_INVALID_PARAMETER - PackageList is NULL or Handle is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_REMOVE_PACK) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HII_HANDLE Handle
+ )
+/*++
+
+ Routine Description:
+ This function removes the package list that is associated with a handle Handle
+ from the HII database. Before removing the package, any registered functions
+ with the notification type REMOVE_PACK and the same package type will be called.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ Handle - The handle that was registered to the data that is requested
+ for removal.
+
+ Returns:
+ EFI_SUCCESS - The data associated with the Handle was removed from
+ the HII database.
+ EFI_NOT_FOUND - The specified Handle is not in database.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_UPDATE_PACK) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HII_HANDLE Handle,
+ IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList
+ )
+/*++
+
+ Routine Description:
+ This function updates the existing package list (which has the specified Handle)
+ in the HII databases, using the new package list specified by PackageList.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ Handle - The handle that was registered to the data that is
+ requested to be updated.
+ PackageList - A pointer to an EFI_HII_PACKAGE_LIST_HEADER package.
+
+ Returns:
+ EFI_SUCCESS - The HII database was successfully updated.
+ EFI_OUT_OF_RESOURCES - Unable to allocate enough memory for the updated database.
+ EFI_INVALID_PARAMETER - PackageList was NULL.
+ EFI_NOT_FOUND - The specified Handle is not in database.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_LIST_PACKS) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN UINT8 PackageType,
+ IN CONST EFI_GUID *PackageGuid,
+ IN OUT UINTN *HandleBufferLength,
+ OUT EFI_HII_HANDLE *Handle
+ )
+/*++
+
+ Routine Description:
+ This function returns a list of the package handles of the specified type
+ that are currently active in the database. The pseudo-type
+ EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ PackageType - Specifies the package type of the packages to list or
+ EFI_HII_PACKAGE_TYPE_ALL for all packages to be listed.
+ PackageGuid - If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this
+ is the pointer to the GUID which must match the Guid
+ field of EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise,
+ it must be NULL.
+ HandleBufferLength - On input, a pointer to the length of the handle buffer.
+ On output, the length of the handle buffer that is
+ required for the handles found.
+ Handle - An array of EFI_HII_HANDLE instances returned.
+
+ Returns:
+ EFI_SUCCESS - The matching handles are outputed successfully.
+ HandleBufferLength is updated with the actual length.
+ EFI_BUFFER_TO_SMALL - The HandleBufferLength parameter indicates that
+ Handle is too small to support the number of handles.
+ HandleBufferLength is updated with a value that will
+ enable the data to fit.
+ EFI_NOT_FOUND - No matching handle could not be found in database.
+ EFI_INVALID_PARAMETER - Handle or HandleBufferLength was NULL.
+ EFI_INVALID_PARAMETER - PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
+ PackageGuid is not NULL, PackageType is a EFI_HII_
+ PACKAGE_TYPE_GUID but PackageGuid is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_EXPORT_PACKS) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HII_HANDLE Handle,
+ IN OUT UINTN *BufferSize,
+ OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer
+ )
+/*++
+
+ Routine Description:
+ This function will export one or all package lists in the database to a buffer.
+ For each package list exported, this function will call functions registered
+ with EXPORT_PACK and then copy the package list to the buffer.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ Handle - An EFI_HII_HANDLE that corresponds to the desired package
+ list in the HII database to export or NULL to indicate
+ all package lists should be exported.
+ BufferSize - On input, a pointer to the length of the buffer.
+ On output, the length of the buffer that is required for
+ the exported data.
+ Buffer - A pointer to a buffer that will contain the results of
+ the export function.
+
+ Returns:
+ EFI_SUCCESS - Package exported.
+ EFI_BUFFER_TO_SMALL - The HandleBufferLength parameter indicates that Handle
+ is too small to support the number of handles.
+ HandleBufferLength is updated with a value that will
+ enable the data to fit.
+ EFI_NOT_FOUND - The specifiecd Handle could not be found in the current
+ database.
+ EFI_INVALID_PARAMETER - Handle or Buffer or BufferSize was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_REGISTER_NOTIFY) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN UINT8 PackageType,
+ IN CONST EFI_GUID *PackageGuid,
+ IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn,
+ IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
+ OUT EFI_HANDLE *NotifyHandle
+ )
+/*++
+
+ Routine Description:
+ This function registers a function which will be called when specified actions related to packages of
+ the specified type occur in the HII database. By registering a function, other HII-related drivers are
+ notified when specific package types are added, removed or updated in the HII database.
+ Each driver or application which registers a notification should use
+ EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ PackageType - Specifies the package type of the packages to list or
+ EFI_HII_PACKAGE_TYPE_ALL for all packages to be listed.
+ PackageGuid - If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to
+ the GUID which must match the Guid field of
+ EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must be NULL.
+ PackageNotifyFn - Points to the function to be called when the event specified by
+ NotificationType occurs.
+ NotifyType - Describes the types of notification which this function will be receiving.
+ NotifyHandle - Points to the unique handle assigned to the registered notification. Can be used in
+ EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() to stop notifications.
+
+ Returns:
+ EFI_SUCCESS - Notification registered successfully.
+ EFI_OUT_OF_RESOURCES - Unable to allocate necessary data structures
+ EFI_INVALID_PARAMETER - NotifyHandle is NULL.
+ EFI_INVALID_PARAMETER - PackageGuid is not NULL when PackageType is not
+ EFI_HII_PACKAGE_TYPE_GUID.
+ EFI_INVALID_PARAMETER - PackageGuid is NULL when PackageType is EFI_HII_PACKAGE_TYPE_GUID.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_UNREGISTER_NOTIFY) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HANDLE NotificationHandle
+ )
+/*++
+
+ Routine Description:
+ Removes the specified HII database package-related notification.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ NotifyHandle - The handle of the notification function being unregistered.
+
+ Returns:
+ EFI_SUCCESS - Notification is unregistered successfully.
+ EFI_NOT_FOUND - The incoming notification handle does not exist
+ in current hii database.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_FIND_KEYBOARD_LAYOUTS) (
+ IN EFI_HII_DATABASE_PROTOCOL *This,
+ IN OUT UINT16 *KeyGuidBufferLength,
+ OUT EFI_GUID *KeyGuidBuffer
+ )
+/*++
+
+ Routine Description:
+ This routine retrieves an array of GUID values for each keyboard layout that
+ was previously registered in the system.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ KeyGuidBufferLength - On input, a pointer to the length of the keyboard GUID
+ buffer. On output, the length of the handle buffer
+ that is required for the handles found.
+ KeyGuidBuffer - An array of keyboard layout GUID instances returned.
+
+ Returns:
+ EFI_SUCCESS - KeyGuidBuffer was updated successfully.
+ EFI_BUFFER_TOO_SMALL - The KeyGuidBufferLength parameter indicates
+ that KeyGuidBuffer is too small to support the
+ number of GUIDs. KeyGuidBufferLength is
+ updated with a value that will enable the data to fit.
+ EFI_INVALID_PARAMETER - The KeyGuidBuffer or KeyGuidBufferLength was NULL.
+ EFI_NOT_FOUND - There was no keyboard layout.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT) (
+ IN EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_GUID *KeyGuid,
+ IN OUT UINT16 *KeyboardLayoutLength,
+ OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout
+ )
+/*++
+
+ Routine Description:
+ This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
+ on a keyboard and the character(s) that are associated with a particular set of key strokes.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ KeyGuid - A pointer to the unique ID associated with a given keyboard layout. If KeyGuid is
+ NULL then the current layout will be retrieved.
+ KeyboardLayoutLength - On input, a pointer to the length of the KeyboardLayout buffer.
+ On output, the length of the data placed into KeyboardLayout.
+ KeyboardLayout - A pointer to a buffer containing the retrieved keyboard layout.
+
+ Returns:
+ EFI_SUCCESS - The keyboard layout was retrieved successfully.
+ EFI_NOT_FOUND - The requested keyboard layout was not found.
+ EFI_INVALID_PARAMETER - The KeyboardLayout or KeyboardLayoutLength was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_SET_KEYBOARD_LAYOUT) (
+ IN EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_GUID *KeyGuid
+ )
+/*++
+
+ Routine Description:
+ This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
+ is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
+ group type. This is so that agents which are sensitive to the current keyboard layout being changed
+ can be notified of this change.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ KeyGuid - A pointer to the unique ID associated with a given keyboard layout.
+
+ Returns:
+ EFI_SUCCESS - The current keyboard layout was successfully set.
+ EFI_NOT_FOUND - The referenced keyboard layout was not found, so action was taken.
+ EFI_INVALID_PARAMETER - The KeyGuid was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_GET_PACK_HANDLE) (
+ IN EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageListHandle,
+ OUT EFI_HANDLE *DriverHandle
+ )
+/*++
+
+ Routine Description:
+ Return the EFI handle associated with a package list.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ PackageListHandle - An EFI_HII_HANDLE that corresponds to the desired package list in the
+ HIIdatabase.
+ DriverHandle - On return, contains the EFI_HANDLE which was registered with the package list in
+ NewPackageList().
+
+ Returns:
+ EFI_SUCCESS - The DriverHandle was returned successfully.
+ EFI_INVALID_PARAMETER - The PackageListHandle was not valid or DriverHandle was NULL.
+
+--*/
+;
+
+typedef struct _EFI_HII_DATABASE_PROTOCOL {
+ EFI_HII_DATABASE_NEW_PACK NewPackageList;
+ EFI_HII_DATABASE_REMOVE_PACK RemovePackageList;
+ EFI_HII_DATABASE_UPDATE_PACK UpdatePackageList;
+ EFI_HII_DATABASE_LIST_PACKS ListPackageLists;
+ EFI_HII_DATABASE_EXPORT_PACKS ExportPackageLists;
+ EFI_HII_DATABASE_REGISTER_NOTIFY RegisterPackageNotify;
+ EFI_HII_DATABASE_UNREGISTER_NOTIFY UnregisterPackageNotify;
+ EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts;
+ EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout;
+ EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout;
+ EFI_HII_DATABASE_GET_PACK_HANDLE GetPackageListHandle;
+} EFI_HII_DATABASE_PROTOCOL;
+
+extern EFI_GUID gEfiHiiDatabaseProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/HiiFont/HiiFont.c b/EDK/Foundation/Efi/Protocol/HiiFont/HiiFont.c
new file mode 100644
index 0000000..02f79d3
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiFont/HiiFont.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiFont.c
+
+Abstract:
+
+ EFI_HII_FONT_PROTOCOL
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiFont)
+
+EFI_GUID gEfiHiiFontProtocolGuid = EFI_HII_FONT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiFontProtocolGuid, "EFI HII FONT Protocol", "UEFI 2.1 HII FONT Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/HiiFont/HiiFont.h b/EDK/Foundation/Efi/Protocol/HiiFont/HiiFont.h
new file mode 100644
index 0000000..f86a907
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiFont/HiiFont.h
@@ -0,0 +1,289 @@
+/*++
+
+Copyright (c) 2007 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiFont.h
+
+Abstract:
+
+ EFI_HII_FONT_PROTOCOL from UEFI 2.1 specification.
+
+ This protocol provides interfaces to retrieve font information.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_HII_FONT_PROTOCOL_H__
+#define __EFI_HII_FONT_PROTOCOL_H__
+
+#include EFI_PROTOCOL_DEFINITION (GraphicsOutput)
+#include EFI_PROTOCOL_DEFINITION (HiiImage)
+
+//
+// Global ID for the Hii Font Protocol.
+//
+
+#define EFI_HII_FONT_PROTOCOL_GUID \
+ { \
+ 0xe9ca4775, 0x8657, 0x47fc, 0x97, 0xe7, 0x7e, 0xd6, 0x5a, 0x8, 0x43, 0x24 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_HII_FONT_PROTOCOL);
+
+typedef UINT32 EFI_HII_OUT_FLAGS;
+typedef UINT32 EFI_FONT_INFO_MASK;
+typedef VOID* EFI_FONT_HANDLE;
+
+typedef struct _EFI_HII_ROW_INFO {
+ UINTN StartIndex;
+ UINTN EndIndex;
+ UINTN LineHeight;
+ UINTN LineWidth;
+ UINTN BaselineOffset;
+} EFI_HII_ROW_INFO;
+
+typedef struct {
+ EFI_HII_FONT_STYLE FontStyle;
+ UINT16 FontSize; // character cell height in pixels
+ CHAR16 FontName[1];
+} EFI_FONT_INFO;
+
+typedef struct _EFI_FONT_DISPLAY_INFO {
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor;
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor;
+ EFI_FONT_INFO_MASK FontInfoMask;
+ EFI_FONT_INFO FontInfo;
+} EFI_FONT_DISPLAY_INFO;
+
+#define EFI_HII_OUT_FLAG_CLIP 0x00000001
+#define EFI_HII_OUT_FLAG_WRAP 0x00000002
+#define EFI_HII_OUT_FLAG_CLIP_CLEAN_Y 0x00000004
+#define EFI_HII_OUT_FLAG_CLIP_CLEAN_X 0x00000008
+#define EFI_HII_OUT_FLAG_TRANSPARENT 0x00000010
+#define EFI_HII_IGNORE_IF_NO_GLYPH 0x00000020
+#define EFI_HII_IGNORE_LINE_BREAK 0x00000040
+#define EFI_HII_DIRECT_TO_SCREEN 0x00000080
+
+#define EFI_FONT_INFO_SYS_FONT 0x00000001
+#define EFI_FONT_INFO_SYS_SIZE 0x00000002
+#define EFI_FONT_INFO_SYS_STYLE 0x00000004
+#define EFI_FONT_INFO_SYS_FORE_COLOR 0x00000010
+#define EFI_FONT_INFO_SYS_BACK_COLOR 0x00000020
+#define EFI_FONT_INFO_RESIZE 0x00001000
+#define EFI_FONT_INFO_RESTYLE 0x00002000
+#define EFI_FONT_INFO_ANY_FONT 0x00010000
+#define EFI_FONT_INFO_ANY_SIZE 0x00020000
+#define EFI_FONT_INFO_ANY_STYLE 0x00040000
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_STRING_TO_IMAGE) (
+ IN CONST EFI_HII_FONT_PROTOCOL *This,
+ IN EFI_HII_OUT_FLAGS Flags,
+ IN CONST EFI_STRING String,
+ IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
+ IN OUT EFI_IMAGE_OUTPUT **Blt,
+ IN UINTN BltX,
+ IN UINTN BltY,
+ OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
+ OUT UINTN *RowInfoArraySize OPTIONAL,
+ OUT UINTN *ColumnInfoArray OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Renders a string to a bitmap or to the display.
+
+ Arguments:
+ This - A pointer to the EFI_HII_FONT_PROTOCOL instance.
+ Flags - Describes how the string is to be drawn.
+ String - Points to the null-terminated string to be displayed.
+ StringInfo - Points to the string output information, including the color and font.
+ If NULL, then the string will be output in the default system font and color.
+ Blt - If this points to a non-NULL on entry, this points to the image, which is Width pixels
+ wide and Height pixels high. The string will be drawn onto this image and
+ EFI_HII_OUT_FLAG_CLIP is implied. If this points to a NULL on entry, then a
+ buffer will be allocated to hold the generated image and the pointer updated on exit. It
+ is the caller¡¯s responsibility to free this buffer.
+ BltX,BLTY - Specifies the offset from the left and top edge of the image of the first character cell in
+ the image.
+ RowInfoArray - If this is non-NULL on entry, then on exit, this will point to an allocated buffer
+ containing row information and RowInfoArraySize will be updated to contain the
+ number of elements. This array describes the characters which were at least partially
+ drawn and the heights of the rows. It is the caller¡¯s responsibility to free this buffer.
+ RowInfoArraySize - If this is non-NULL on entry, then on exit it contains the number of elements in
+ RowInfoArray.
+ ColumnInfoArray - If this is non-NULL, then on return it will be filled with the horizontal offset for each
+ character in the string on the row where it is displayed. Non-printing characters will
+ have the offset ~0. The caller is responsible to allocate a buffer large enough so that
+ there is one entry for each character in the string, not including the null-terminator. It
+ is possible when character display is normalized that some character cells overlap.
+
+ Returns:
+ EFI_SUCCESS - The string was successfully rendered.
+ EFI_OUT_OF_RESOURCES - Unable to allocate an output buffer for RowInfoArray or Blt.
+ EFI_INVALID_PARAMETER - The String or Blt was NULL.
+ EFI_INVALID_PARAMETER - Flags were invalid combination.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_STRING_ID_TO_IMAGE) (
+ IN CONST EFI_HII_FONT_PROTOCOL *This,
+ IN EFI_HII_OUT_FLAGS Flags,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_STRING_ID StringId,
+ IN CONST CHAR8* Language,
+ IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
+ IN OUT EFI_IMAGE_OUTPUT **Blt,
+ IN UINTN BltX,
+ IN UINTN BltY,
+ OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
+ OUT UINTN *RowInfoArraySize OPTIONAL,
+ OUT UINTN *ColumnInfoArray OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Render a string to a bitmap or the screen containing the contents of the specified string.
+
+ Arguments:
+ This - A pointer to the EFI_HII_FONT_PROTOCOL instance.
+ Flags - Describes how the string is to be drawn.
+ PackageList - The package list in the HII database to search for the specified string.
+ StringId - The string¡¯s id, which is unique within PackageList.
+ Language - Points to the language for the retrieved string. If NULL, then the current system
+ language is used.
+ StringInfo - Points to the string output information, including the color and font.
+ If NULL, then the string will be output in the default system font and color.
+ Blt - If this points to a non-NULL on entry, this points to the image, which is Width pixels
+ wide and Height pixels high. The string will be drawn onto this image and
+ EFI_HII_OUT_FLAG_CLIP is implied. If this points to a NULL on entry, then a
+ buffer will be allocated to hold the generated image and the pointer updated on exit. It
+ is the caller¡¯s responsibility to free this buffer.
+ BltX,BLTY - Specifies the offset from the left and top edge of the image of the first character cell in
+ the image.
+ RowInfoArray - If this is non-NULL on entry, then on exit, this will point to an allocated buffer
+ containing row information and RowInfoArraySize will be updated to contain the
+ number of elements. This array describes the characters which were at least partially
+ drawn and the heights of the rows. It is the caller¡¯s responsibility to free this buffer.
+ RowInfoArraySize - If this is non-NULL on entry, then on exit it contains the number of elements in
+ RowInfoArray.
+ ColumnInfoArray - If this is non-NULL, then on return it will be filled with the horizontal offset for each
+ character in the string on the row where it is displayed. Non-printing characters will
+ have the offset ~0. The caller is responsible to allocate a buffer large enough so that
+ there is one entry for each character in the string, not including the null-terminator. It
+ is possible when character display is normalized that some character cells overlap.
+
+ Returns:
+ EFI_SUCCESS - The string was successfully rendered.
+ EFI_OUT_OF_RESOURCES - Unable to allocate an output buffer for RowInfoArray or Blt.
+ EFI_INVALID_PARAMETER - The Blt or PackageList was NULL.
+ EFI_INVALID_PARAMETER - Flags were invalid combination.
+ EFI_NOT_FOUND - The specified PackageList is not in the Database or the stringid is not
+ in the specified PackageList.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_GLYPH) (
+ IN CONST EFI_HII_FONT_PROTOCOL *This,
+ IN CHAR16 Char,
+ IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,
+ OUT EFI_IMAGE_OUTPUT **Blt,
+ OUT UINTN *Baseline OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Convert the glyph for a single character into a bitmap.
+
+ Arguments:
+ This - A pointer to the EFI_HII_FONT_PROTOCOL instance.
+ Char - Character to retrieve.
+ StringInfo - Points to the string font and color information or NULL if the string should use the
+ default system font and color.
+ Blt - Thus must point to a NULL on entry. A buffer will be allocated to hold the output and
+ the pointer updated on exit. It is the caller¡¯s responsibility to free this buffer.
+ Baseline - Number of pixels from the bottom of the bitmap to the baseline.
+
+ Returns:
+ EFI_SUCCESS - Glyph bitmap created.
+ EFI_OUT_OF_RESOURCES - Unable to allocate the output buffer Blt.
+ EFI_WARN_UNKNOWN_GLYPH - The glyph was unknown and was
+ replaced with the glyph for Unicode
+ character 0xFFFD.
+ EFI_INVALID_PARAMETER - Blt is NULL or *Blt is not NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_FONT_INFO) (
+ IN CONST EFI_HII_FONT_PROTOCOL *This,
+ IN OUT EFI_FONT_HANDLE *FontHandle,
+ IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL
+ OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,
+ IN CONST EFI_STRING String OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ This function iterates through fonts which match the specified font, using
+ the specified criteria. If String is non-NULL, then all of the characters in
+ the string must exist in order for a candidate font to be returned.
+
+ Arguments:
+ This - A pointer to the EFI_HII_FONT_PROTOCOL instance.
+ FontHandle - On entry, points to the font handle returned by a previous
+ call to GetFontInfo() or points to NULL to start with the
+ first font. On return, points to the returned font handle or
+ points to NULL if there are no more matching fonts.
+ StringInfoIn - Upon entry, points to the font to return information about.
+ If NULL, then the information about the system default
+ font will be returned.
+ StringInfoOut - Upon return, contains the matching font¡¯s information.
+ If NULL, then no information is returned.
+ It's caller's responsibility to free this buffer.
+ String - Points to the string which will be tested to determine
+ if all characters are available. If NULL, then any font
+ is acceptable.
+
+ Returns:
+ EFI_SUCCESS - Matching font returned successfully.
+ EFI_NOT_FOUND - No matching font was found.
+ EFI_INVALID_PARAMETER - StringInfoIn->FontInfoMask is an invalid combination.
+ EFI_OUT_OF_RESOURCES - There were insufficient resources to complete the request.
+
+--*/
+;
+
+
+//
+// Interface structure for the EFI_HII_FONT_PROTOCOL
+//
+typedef struct _EFI_HII_FONT_PROTOCOL {
+ EFI_HII_STRING_TO_IMAGE StringToImage;
+ EFI_HII_STRING_ID_TO_IMAGE StringIdToImage;
+ EFI_HII_GET_GLYPH GetGlyph;
+ EFI_HII_GET_FONT_INFO GetFontInfo;
+} EFI_HII_FONT_PROTOCOL;
+
+extern EFI_GUID gEfiHiiFontProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/HiiImage/HiiImage.c b/EDK/Foundation/Efi/Protocol/HiiImage/HiiImage.c
new file mode 100644
index 0000000..69ae266
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiImage/HiiImage.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiImage.c
+
+Abstract:
+
+ EFI_HII_IMAGE_PROTOCOL
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiImage)
+
+EFI_GUID gEfiHiiImageProtocolGuid = EFI_HII_IMAGE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiImageProtocolGuid, "EFI HII IMAGE Protocol", "UEFI 2.1 HII IMAGE Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/HiiImage/HiiImage.h b/EDK/Foundation/Efi/Protocol/HiiImage/HiiImage.h
new file mode 100644
index 0000000..b31cfaa
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiImage/HiiImage.h
@@ -0,0 +1,256 @@
+/*++
+
+Copyright (c) 2007 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiImage.h
+
+Abstract:
+
+ EFI_HII_IMAGE_PROTOCOL from UEFI 2.1 specification.
+
+ This protocol provides access to images in the images database.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_HII_IMAGE_PROTOCOL_H__
+#define __EFI_HII_IMAGE_PROTOCOL_H__
+
+#include "EfiHii.h"
+#include EFI_PROTOCOL_DEFINITION (GraphicsOutput)
+
+//
+// Global ID for the Hii Image Protocol.
+//
+#define EFI_HII_IMAGE_PROTOCOL_GUID \
+ { \
+ 0x31a6406a, 0x6bdf, 0x4e46, 0xb2, 0xa2, 0xeb, 0xaa, 0x89, 0xc4, 0x9, 0x20 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_HII_IMAGE_PROTOCOL);
+
+typedef UINT32 EFI_HII_DRAW_FLAGS;
+
+typedef struct _EFI_IMAGE_INPUT {
+ UINT32 Flags;
+ UINT16 Width;
+ UINT16 Height;
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap;
+} EFI_IMAGE_INPUT;
+
+#define EFI_IMAGE_TRANSPARENT 0x00000001
+
+typedef struct _EFI_IMAGE_OUTPUT {
+ UINT16 Width;
+ UINT16 Height;
+ union {
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL *Screen;
+ } Image;
+} EFI_IMAGE_OUTPUT;
+
+#define EFI_HII_DRAW_FLAG_CLIP 0x00000001
+#define EFI_HII_DRAW_FLAG_TRANSPARENT 0x00000030
+#define EFI_HII_DRAW_FLAG_DEFAULT 0x00000000
+#define EFI_HII_DRAW_FLAG_FORCE_TRANS 0x00000010
+#define EFI_HII_DRAW_FLAG_FORCE_OPAQUE 0x00000020
+#define EFI_HII_DIRECT_TO_SCREEN 0x00000080
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_NEW_IMAGE) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ OUT EFI_IMAGE_ID *ImageId,
+ IN CONST EFI_IMAGE_INPUT *Image
+ )
+/*++
+
+ Routine Description:
+ This function adds the image Image to the group of images owned by PackageList, and returns
+ a new image identifier (ImageId).
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ PackageList - Handle of the package list where this image will be added.
+ ImageId - On return, contains the new image id, which is unique within PackageList.
+ Image - Points to the image.
+
+ Returns:
+ EFI_SUCCESS - The new image was added successfully.
+ EFI_NOT_FOUND - The specified PackageList could not be found in database.
+ EFI_OUT_OF_RESOURCES - Could not add the image due to lack of resources.
+ EFI_INVALID_PARAMETER - Image is NULL or ImageId is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_IMAGE) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_IMAGE_ID ImageId,
+ OUT EFI_IMAGE_INPUT *Image
+ )
+/*++
+
+ Routine Description:
+ This function retrieves the image specified by ImageId which is associated with
+ the specified PackageList and copies it into the buffer specified by Image.
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ PackageList - Handle of the package list where this image will be searched.
+ ImageId - The image¡¯s id,, which is unique within PackageList.
+ Image - Points to the image.
+
+ Returns:
+ EFI_SUCCESS - The new image was returned successfully.
+ EFI_NOT_FOUND - The image specified by ImageId is not available.
+ The specified PackageList is not in the database.
+ EFI_INVALID_PARAMETER - The Image or ImageSize was NULL.
+ EFI_OUT_OF_RESOURCES - The bitmap could not be retrieved because there was not
+ enough memory.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_SET_IMAGE) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_IMAGE_ID ImageId,
+ IN CONST EFI_IMAGE_INPUT *Image
+ )
+/*++
+
+ Routine Description:
+ This function updates the image specified by ImageId in the specified PackageListHandle to
+ the image specified by Image.
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ PackageList - The package list containing the images.
+ ImageId - The image¡¯s id,, which is unique within PackageList.
+ Image - Points to the image.
+
+ Returns:
+ EFI_SUCCESS - The new image was updated successfully.
+ EFI_NOT_FOUND - The image specified by ImageId is not in the database.
+ The specified PackageList is not in the database.
+ EFI_INVALID_PARAMETER - The Image was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DRAW_IMAGE) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_DRAW_FLAGS Flags,
+ IN CONST EFI_IMAGE_INPUT *Image,
+ IN OUT EFI_IMAGE_OUTPUT **Blt,
+ IN UINTN BltX,
+ IN UINTN BltY
+ )
+/*++
+
+ Routine Description:
+ This function renders an image to a bitmap or the screen using the specified
+ color and options. It draws the image on an existing bitmap, allocates a new
+ bitmap or uses the screen. The images can be clipped.
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ Flags - Describes how the image is to be drawn.
+ Image - Points to the image to be displayed.
+ Blt - If this points to a non-NULL on entry, this points to the
+ image, which is Width pixels wide and Height pixels high.
+ The image will be drawn onto this image and
+ EFI_HII_DRAW_FLAG_CLIP is implied. If this points to a
+ NULL on entry, then a buffer will be allocated to hold
+ the generated image and the pointer updated on exit. It
+ is the caller¡¯s responsibility to free this buffer.
+ BltX, BltY - Specifies the offset from the left and top edge of the
+ output image of the first pixel in the image.
+
+ Returns:
+ EFI_SUCCESS - The image was successfully drawn.
+ EFI_OUT_OF_RESOURCES - Unable to allocate an output buffer for Blt.
+ EFI_INVALID_PARAMETER - The Image or Blt was NULL.
+ EFI_INVALID_PARAMETER - Any combination of Flags is invalid.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DRAW_IMAGE_ID) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_DRAW_FLAGS Flags,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_IMAGE_ID ImageId,
+ IN OUT EFI_IMAGE_OUTPUT **Blt,
+ IN UINTN BltX,
+ IN UINTN BltY
+ )
+
+/*++
+
+ Routine Description:
+ This function renders an image to a bitmap or the screen using the specified
+ color and options. It draws the image on an existing bitmap, allocates a new
+ bitmap or uses the screen. The images can be clipped.
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ Flags - Describes how the image is to be drawn.
+ PackageList - The package list in the HII database to search for the
+ specified image.
+ ImageId - The image's id, which is unique within PackageList.
+ Blt - If this points to a non-NULL on entry, this points to the
+ image, which is Width pixels wide and Height pixels high.
+ The image will be drawn onto this image and
+ EFI_HII_DRAW_FLAG_CLIP is implied. If this points to a
+ NULL on entry, then a buffer will be allocated to hold
+ the generated image and the pointer updated on exit. It
+ is the caller¡¯s responsibility to free this buffer.
+ BltX, BltY - Specifies the offset from the left and top edge of the
+ output image of the first pixel in the image.
+
+ Returns:
+ EFI_SUCCESS - The image was successfully drawn.
+ EFI_OUT_OF_RESOURCES - Unable to allocate an output buffer for Blt.
+ EFI_NOT_FOUND - The image specified by ImageId is not in the database.
+ The specified PackageList is not in the database.
+ EFI_INVALID_PARAMETER - The Blt was NULL.
+
+--*/
+;
+
+//
+// Interface structure for the EFI_HII_IMAGE_PROTOCOL
+//
+typedef struct _EFI_HII_IMAGE_PROTOCOL {
+ EFI_HII_NEW_IMAGE NewImage;
+ EFI_HII_GET_IMAGE GetImage;
+ EFI_HII_SET_IMAGE SetImage;
+ EFI_HII_DRAW_IMAGE DrawImage;
+ EFI_HII_DRAW_IMAGE_ID DrawImageId;
+} EFI_HII_IMAGE_PROTOCOL;
+
+extern EFI_GUID gEfiHiiImageProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/HiiPackageList/HiiPackageList.c b/EDK/Foundation/Efi/Protocol/HiiPackageList/HiiPackageList.c
new file mode 100644
index 0000000..276cd02
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiPackageList/HiiPackageList.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiPackageList.c
+
+Abstract:
+
+ EFI_HII_PACKAGE_LIST_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiPackageList)
+
+EFI_GUID gEfiHiiPackageListProtocolGuid = EFI_HII_PACKAGE_LIST_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiPackageListProtocolGuid, "HII Package List Protocol", "HII Package List 2.1 protocol");
diff --git a/EDK/Foundation/Efi/Protocol/HiiPackageList/HiiPackageList.h b/EDK/Foundation/Efi/Protocol/HiiPackageList/HiiPackageList.h
new file mode 100644
index 0000000..55aec60
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiPackageList/HiiPackageList.h
@@ -0,0 +1,36 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiPackageList.h
+
+Abstract:
+
+ EFI_HII_PACKAGE_LIST_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#ifndef _HII_PACKAGE_LIST_H_
+#define _HII_PACKAGE_LIST_H_
+
+#include "EfiHii.h"
+
+#define EFI_HII_PACKAGE_LIST_PROTOCOL_GUID \
+ { \
+ 0x6a1ee763, 0xd47a, 0x43b4, 0xaa, 0xbe, 0xef, 0x1d, 0xe2, 0xab, 0x56, 0xfc \
+ }
+
+typedef EFI_HII_PACKAGE_LIST_HEADER * EFI_HII_PACKAGE_LIST_PROTOCOL;
+
+extern EFI_GUID gEfiHiiPackageListProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/HiiString/HiiString.c b/EDK/Foundation/Efi/Protocol/HiiString/HiiString.c
new file mode 100644
index 0000000..adb52b4
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiString/HiiString.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiString.c
+
+Abstract:
+
+ EFI_HII_STRING_PROTOCOL
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiString)
+
+EFI_GUID gEfiHiiStringProtocolGuid = EFI_HII_STRING_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiStringProtocolGuid, "EFI HII STRING Protocol", "UEFI 2.1 HII STRING Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/HiiString/HiiString.h b/EDK/Foundation/Efi/Protocol/HiiString/HiiString.h
new file mode 100644
index 0000000..fdc7c4d
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/HiiString/HiiString.h
@@ -0,0 +1,253 @@
+/*++
+
+Copyright (c) 2007 - 2010, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ HiiString.h
+
+Abstract:
+
+ EFI_HII_STRING_PROTOCOL from UEFI 2.1 specification.
+
+ This protocol provides interfaces to manipulate string data.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_HII_STRING_PROTOCOL_H__
+#define __EFI_HII_STRING_PROTOCOL_H__
+
+#include EFI_PROTOCOL_DEFINITION (HiiFont)
+
+//
+// Global ID for the Hii String Protocol.
+//
+#define EFI_HII_STRING_PROTOCOL_GUID \
+ { \
+ 0xfd96974, 0x23aa, 0x4cdc, 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_HII_STRING_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_NEW_STRING) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ OUT EFI_STRING_ID *StringId,
+ IN CONST CHAR8 *Language,
+ IN CONST CHAR16 *LanguageName, OPTIONAL
+ IN CONST EFI_STRING String,
+ IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ This function adds the string String to the group of strings owned by PackageList, with the
+ specified font information StringFontInfo and returns a new string id.
+ The new string identifier is guaranteed to be unique within the package list.
+ That new string identifier is reserved for all languages in the package list.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ PackageList - Handle of the package list where this string will be added.
+ StringId - On return, contains the new strings id, which is unique within PackageList.
+ Language - Points to the language for the new string.
+ LanguageName - Points to the printable language name to associate with the passed in
+ Language field.If LanguageName is not NULL and the string package header's LanguageName
+ associated with a given Language is not zero, the LanguageName being passed
+ in will be ignored.
+ String - Points to the new null-terminated string.
+ StringFontInfo - Points to the new string¡¯s font information or NULL if the string should have the
+ default system font, size and style.
+
+ Returns:
+ EFI_SUCCESS - The new string was added successfully.
+ EFI_NOT_FOUND - The specified PackageList could not be found in database.
+ EFI_OUT_OF_RESOURCES - Could not add the string due to lack of resources.
+ EFI_INVALID_PARAMETER - String is NULL or StringId is NULL or Language is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_STRING) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN CONST CHAR8 *Language,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_STRING_ID StringId,
+ OUT EFI_STRING String,
+ IN OUT UINTN *StringSize,
+ OUT EFI_FONT_INFO **StringFontInfo OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ This function retrieves the string specified by StringId which is associated
+ with the specified PackageList in the language Language and copies it into
+ the buffer specified by String.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ Language - Points to the language for the retrieved string.
+ PackageList - The package list in the HII database to search for the
+ specified string.
+ StringId - The string's id, which is unique within PackageList.
+ String - Points to the new null-terminated string.
+ StringSize - On entry, points to the size of the buffer pointed to by
+ String, in bytes. On return,
+ points to the length of the string, in bytes.
+ StringFontInfo - Points to a buffer that will be callee allocated and will
+ have the string's font information into this buffer.
+ The caller is responsible for freeing this buffer.
+ If the parameter is NULL a buffer will not be allocated
+ and the string font information will not be returned.
+
+ Returns:
+ EFI_SUCCESS - The string was returned successfully.
+ EFI_NOT_FOUND - The string specified by StringId is not available.
+ The specified PackageList is not in the database.
+ EFI_INVALID_LANGUAGE - The string specified by StringId is available but
+ not in the specified language.
+ EFI_BUFFER_TOO_SMALL - The buffer specified by StringSize is too small to
+ hold the string.
+ EFI_INVALID_PARAMETER - The String or Language or StringSize was NULL.
+ EFI_OUT_OF_RESOURCES - There were insufficient resources to complete the
+ request.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_SET_STRING) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_STRING_ID StringId,
+ IN CONST CHAR8 *Language,
+ IN CONST EFI_STRING String,
+ IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ This function updates the string specified by StringId in the specified PackageList to the text
+ specified by String and, optionally, the font information specified by StringFontInfo.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ PackageList - The package list containing the strings.
+ StringId - The string¡¯s id, which is unique within PackageList.
+ Language - Points to the language for the updated string.
+ String - Points to the new null-terminated string.
+ StringFontInfo - Points to the string¡¯s font information or NULL if the string font information is not
+ changed.
+
+ Returns:
+ EFI_SUCCESS - The string was updated successfully.
+ EFI_NOT_FOUND - The string specified by StringId is not in the database.
+ The specified PackageList is not in the database.
+ EFI_INVALID_PARAMETER - The String or Language was NULL.
+ EFI_OUT_OF_RESOURCES - The system is out of resources to accomplish the task.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_LANGUAGES) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN OUT CHAR8 *Languages,
+ IN OUT UINTN *LanguagesSize
+ )
+/*++
+
+ Routine Description:
+ This function returns the list of supported languages, in the format specified
+ in Appendix M of UEFI 2.1 spec.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ PackageList - The package list to examine.
+ Languages - Points to the buffer to hold the returned string.
+ LanguagesSize - On entry, points to the size of the buffer pointed to by
+ Languages, in bytes. On
+ return, points to the length of Languages, in bytes.
+
+ Returns:
+ EFI_SUCCESS - The languages were returned successfully.
+ EFI_INVALID_PARAMETER - The Languages or LanguagesSize was NULL.
+ EFI_BUFFER_TOO_SMALL - The LanguagesSize is too small to hold the list of
+ supported languages. LanguageSize is updated to
+ contain the required size.
+ EFI_NOT_FOUND - The specified PackageList is not in the database.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_2ND_LANGUAGES) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN CONST CHAR8 *FirstLanguage,
+ IN OUT CHAR8 *SecondLanguages,
+ IN OUT UINTN *SecondLanguagesSize
+ )
+/*++
+
+ Routine Description:
+ Each string package has associated with it a single primary language and zero
+ or more secondary languages. This routine returns the secondary languages
+ associated with a package list.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ PackageList - The package list to examine.
+ FirstLanguage - Points to the primary language.
+ SecondaryLanguages - Points to the buffer to hold the returned list of
+ secondary languages for the specified FirstLanguage.
+ If there are no secondary languages, the function
+ returns successfully, but this is set to NULL.
+ SecondaryLanguageSize - On entry, points to the size of the buffer pointed to
+ by SecondLanguages, in bytes. On return, points to
+ the length of SecondLanguages in bytes.
+
+ Returns:
+ EFI_SUCCESS - Secondary languages were correctly returned.
+ EFI_INVALID_PARAMETER - FirstLanguage or SecondLanguages or SecondLanguagesSize was NULL.
+ EFI_BUFFER_TOO_SMALL - The buffer specified by SecondLanguagesSize is
+ too small to hold the returned information.
+ SecondLanguageSize is updated to hold the size of
+ the buffer required.
+ EFI_INVALID_LANGUAGE - The language specified by FirstLanguage is not
+ present in the specified package list.
+ EFI_NOT_FOUND - The specified PackageList is not in the Database.
+
+--*/
+;
+//
+// Interface structure for the EFI_HII_STRING_PROTOCOL
+//
+typedef struct _EFI_HII_STRING_PROTOCOL {
+ EFI_HII_NEW_STRING NewString;
+ EFI_HII_GET_STRING GetString;
+ EFI_HII_SET_STRING SetString;
+ EFI_HII_GET_LANGUAGES GetLanguages;
+ EFI_HII_GET_2ND_LANGUAGES GetSecondaryLanguages;
+} EFI_HII_STRING_PROTOCOL;
+
+extern EFI_GUID gEfiHiiStringProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/IScsiInitiatorName/IScsiInitiatorName.c b/EDK/Foundation/Efi/Protocol/IScsiInitiatorName/IScsiInitiatorName.c
new file mode 100644
index 0000000..38df0ec
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/IScsiInitiatorName/IScsiInitiatorName.c
@@ -0,0 +1,27 @@
+/*++
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ IScsiInitatorName.c
+
+Abstract:
+ EFI_ISCSI_INITIATOR_NAME_PROTOCOL as defined in UEFI 2.0.
+ It rovides the ability to get and set the iSCSI Initiator Name.
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (IScsiInitiatorName)
+
+EFI_GUID gEfiIScsiInitiatorNameProtocolGuid = EFI_ISCSI_INITIATOR_NAME_PROTOCOL_GUID;
+EFI_GUID_STRING(&gEfiIScsiInitiatorNameProtocolGuid, "ISCSI Initiator Name Protocol", "UEFI 2.0 ISCSI Initiator Name Protocol"); \ No newline at end of file
diff --git a/EDK/Foundation/Efi/Protocol/IScsiInitiatorName/IScsiInitiatorName.h b/EDK/Foundation/Efi/Protocol/IScsiInitiatorName/IScsiInitiatorName.h
new file mode 100644
index 0000000..c578538
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/IScsiInitiatorName/IScsiInitiatorName.h
@@ -0,0 +1,98 @@
+/*++
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ IScsiInitatorName.h
+
+Abstract:
+ EFI_ISCSI_INITIATOR_NAME_PROTOCOL as defined in UEFI 2.0.
+ It rovides the ability to get and set the iSCSI Initiator Name.
+
+Revision History
+
+--*/
+
+#ifndef __ISCSI_INITIATOR_NAME_H__
+#define __ISCSI_INITIATOR_NAME_H__
+
+#define EFI_ISCSI_INITIATOR_NAME_PROTOCOL_GUID \
+{ \
+ 0x59324945, 0xec44, 0x4c0d, {0xb1, 0xcd, 0x9d, 0xb1, 0x39, 0xdf, 0x7, 0xc } \
+}
+
+typedef struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL EFI_ISCSI_INITIATOR_NAME_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISCSI_INITIATOR_NAME_GET) (
+ IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
+ IN OUT UINTN *BufferSize,
+ OUT VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Retrieves the current set value of iSCSI Initiator Name.
+
+ Arguments:
+ This - Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
+ BufferSize - Size of the buffer in bytes pointed to by Buffer / Actual size of the
+ variable data buffer.
+ Buffer - Pointer to the buffer for data to be read.
+
+ Returns:
+ EFI_SUCCESS - Data was successfully retrieved into the provided buffer and the
+ BufferSize was sufficient to handle the iSCSI initiator name
+ EFI_BUFFER_TOO_SMALL - BufferSize is too small for the result.
+ EFI_INVALID_PARAMETER - BufferSize or Buffer is NULL.
+ EFI_DEVICE_ERROR - The iSCSI initiator name could not be retrieved due to a hardware error.
+
+--*/
+;
+
+
+
+typedef EFI_STATUS
+(EFIAPI *EFI_ISCSI_INITIATOR_NAME_SET) (
+ IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
+ IN OUT UINTN *BufferSize,
+ IN VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Sets the iSCSI Initiator Name.
+
+ Arguments:
+ This - Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
+ BufferSize - Size of the buffer in bytes pointed to by Buffer.
+ Buffer - Pointer to the buffer for data to be written.
+
+ Returns:
+ EFI_SUCCESS - Data was successfully stored by the protocol.
+ EFI_UNSUPPORTED - Platform policies do not allow for data to be written.
+ EFI_INVALID_PARAMETER - BufferSize or Buffer is NULL, or BufferSize exceeds the maximum allowed limit.
+ EFI_DEVICE_ERROR - The data could not be stored due to a hardware error.
+ EFI_OUT_OF_RESOURCES - Not enough storage is available to hold the data.
+ EFI_PROTOCOL_ERROR - Input iSCSI initiator name does not adhere to RFC 3720
+ (and other related protocols)
+
+--*/
+;
+
+struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL {
+ EFI_ISCSI_INITIATOR_NAME_GET Get;
+ EFI_ISCSI_INITIATOR_NAME_SET Set;
+};
+
+extern EFI_GUID gEfiIScsiInitiatorNameProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Ip4/Ip4.c b/EDK/Foundation/Efi/Protocol/Ip4/Ip4.c
new file mode 100644
index 0000000..fba749b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Ip4/Ip4.c
@@ -0,0 +1,41 @@
+/*++
+
+Copyright (c) 2005 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+
+Module Name:
+
+ Ip4.c
+
+Abstract:
+
+ UEFI IPv4 protocol.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Ip4)
+
+EFI_GUID gEfiIp4ServiceBindingProtocolGuid
+ = EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID;
+
+EFI_GUID gEfiIp4ProtocolGuid = EFI_IP4_PROTOCOL_GUID;
+
+EFI_GUID_STRING (
+ &gEfiIp4ServiceBindingProtocolGuid,
+ "IP4 Service Binding Protocol",
+ "IP4 Service Binding Protocol"
+ );
+
+EFI_GUID_STRING (
+ &gEfiIp4ProtocolGuid,
+ "IP4 Protocol",
+ "IP4 Protocol"
+ );
diff --git a/EDK/Foundation/Efi/Protocol/Ip4/Ip4.h b/EDK/Foundation/Efi/Protocol/Ip4/Ip4.h
new file mode 100644
index 0000000..4c06a1c
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Ip4/Ip4.h
@@ -0,0 +1,241 @@
+/*++
+
+Copyright (c) 2005 - 2011, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Ip4.h
+
+Abstract:
+
+ UEFI IPv4 protocol.
+
+--*/
+
+#ifndef _IP4_H_
+#define _IP4_H_
+
+#include EFI_PROTOCOL_DEFINITION (ManagedNetwork)
+#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
+
+//
+//GUID definitions
+//
+#define EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID \
+ {0xc51711e7, 0xb4bf, 0x404a, 0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4}
+
+#define EFI_IP4_PROTOCOL_GUID \
+ {0x41d94cd2, 0x35b6, 0x455a, 0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd}
+
+EFI_FORWARD_DECLARATION (EFI_IP4_PROTOCOL);
+
+typedef struct {
+ EFI_HANDLE InstanceHandle;
+ EFI_IPv4_ADDRESS Ip4Address;
+ EFI_IPv4_ADDRESS SubnetMask;
+} EFI_IP4_ADDRESS_PAIR;
+
+typedef struct {
+ EFI_HANDLE DriverHandle;
+ UINT32 AddressCount;
+ EFI_IP4_ADDRESS_PAIR AddressPairs[1];
+} EFI_IP4_VARIABLE_DATA;
+
+typedef struct {
+ UINT8 DefaultProtocol;
+ BOOLEAN AcceptAnyProtocol;
+ BOOLEAN AcceptIcmpErrors;
+ BOOLEAN AcceptBroadcast;
+ BOOLEAN AcceptPromiscuous;
+ BOOLEAN UseDefaultAddress;
+ EFI_IPv4_ADDRESS StationAddress;
+ EFI_IPv4_ADDRESS SubnetMask;
+ UINT8 TypeOfService;
+ UINT8 TimeToLive;
+ BOOLEAN DoNotFragment;
+ BOOLEAN RawData;
+ UINT32 ReceiveTimeout;
+ UINT32 TransmitTimeout;
+} EFI_IP4_CONFIG_DATA;
+
+
+typedef struct _EFI_IP4_ROUTE_TABLE {
+ EFI_IPv4_ADDRESS SubnetAddress;
+ EFI_IPv4_ADDRESS SubnetMask;
+ EFI_IPv4_ADDRESS GatewayAddress;
+} EFI_IP4_ROUTE_TABLE;
+
+typedef struct _EFI_IP4_ICMP_TYPE {
+ UINT8 Type;
+ UINT8 Code;
+} EFI_IP4_ICMP_TYPE;
+
+typedef struct {
+ BOOLEAN IsStarted;
+ UINT32 MaxPacketSize;
+ EFI_IP4_CONFIG_DATA ConfigData;
+ BOOLEAN IsConfigured;
+
+ UINT32 GroupCount;
+ EFI_IPv4_ADDRESS *GroupTable;
+
+ UINT32 RouteCount;
+ EFI_IP4_ROUTE_TABLE *RouteTable;
+
+ UINT32 IcmpTypeCount;
+ EFI_IP4_ICMP_TYPE *IcmpTypeList;
+} EFI_IP4_MODE_DATA;
+
+#pragma pack(1)
+typedef struct _EFI_IP4_HEADER {
+ UINT8 HeaderLength:4;
+ UINT8 Version:4;
+ UINT8 TypeOfService;
+ UINT16 TotalLength;
+ UINT16 Identification;
+ UINT16 Fragmentation;
+ UINT8 TimeToLive;
+ UINT8 Protocol;
+ UINT16 Checksum;
+ EFI_IPv4_ADDRESS SourceAddress;
+ EFI_IPv4_ADDRESS DestinationAddress;
+} EFI_IP4_HEADER;
+#pragma pack()
+
+typedef struct _EFI_IP4_FRAGMENT_DATA {
+ UINT32 FragmentLength;
+ VOID *FragmentBuffer;
+} EFI_IP4_FRAGMENT_DATA;
+
+
+typedef struct _EFI_IP4_OVERRIDE_DATA {
+ EFI_IPv4_ADDRESS SourceAddress;
+ EFI_IPv4_ADDRESS GatewayAddress;
+
+ UINT8 Protocol;
+ UINT8 TypeOfService;
+ UINT8 TimeToLive;
+ BOOLEAN DoNotFragment;
+} EFI_IP4_OVERRIDE_DATA;
+
+typedef struct _EFI_IP4_TRANSMIT_DATA {
+ EFI_IPv4_ADDRESS DestinationAddress;
+
+ EFI_IP4_OVERRIDE_DATA *OverrideData;
+ UINT32 OptionsLength;
+ VOID *OptionsBuffer;
+
+ UINT32 TotalDataLength;
+ UINT32 FragmentCount;
+ EFI_IP4_FRAGMENT_DATA FragmentTable[1];
+} EFI_IP4_TRANSMIT_DATA;
+
+typedef struct _EFI_IP4_RECEIVE_DATA {
+ EFI_TIME TimeStamp;
+ EFI_EVENT RecycleSignal;
+
+ UINT32 HeaderLength;
+ EFI_IP4_HEADER *Header;
+
+ UINT32 OptionsLength;
+ VOID *Options;
+
+ UINT32 DataLength;
+ UINT32 FragmentCount;
+ EFI_IP4_FRAGMENT_DATA FragmentTable[1];
+} EFI_IP4_RECEIVE_DATA;
+
+typedef struct _EFI_IP4_COMPLETION_TOKEN {
+ EFI_EVENT Event;
+ EFI_STATUS Status;
+
+ union {
+ EFI_IP4_RECEIVE_DATA *RxData;
+ EFI_IP4_TRANSMIT_DATA *TxData;
+ } Packet;
+} EFI_IP4_COMPLETION_TOKEN;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_GET_MODE_DATA) (
+ IN EFI_IP4_PROTOCOL *This,
+ OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
+ OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
+ OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_CONFIGURE) (
+ IN EFI_IP4_PROTOCOL *This,
+ IN EFI_IP4_CONFIG_DATA *IpConfigData OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_GROUPS) (
+ IN EFI_IP4_PROTOCOL *This,
+ IN BOOLEAN JoinFlag,
+ IN EFI_IPv4_ADDRESS *GroupAddress OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_ROUTES) (
+ IN EFI_IP4_PROTOCOL *This,
+ IN BOOLEAN DeleteRoute,
+ IN EFI_IPv4_ADDRESS *SubnetAddress,
+ IN EFI_IPv4_ADDRESS *SubnetMask,
+ IN EFI_IPv4_ADDRESS *GatewayAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_TRANSMIT) (
+ IN EFI_IP4_PROTOCOL *This,
+ IN EFI_IP4_COMPLETION_TOKEN *Token
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_RECEIVE) (
+ IN EFI_IP4_PROTOCOL *This,
+ IN EFI_IP4_COMPLETION_TOKEN *Token
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_CANCEL) (
+ IN EFI_IP4_PROTOCOL *This,
+ IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_POLL) (
+ IN EFI_IP4_PROTOCOL *This
+ );
+
+typedef struct _EFI_IP4_PROTOCOL {
+ EFI_IP4_GET_MODE_DATA GetModeData;
+ EFI_IP4_CONFIGURE Configure;
+ EFI_IP4_GROUPS Groups;
+ EFI_IP4_ROUTES Routes;
+ EFI_IP4_TRANSMIT Transmit;
+ EFI_IP4_RECEIVE Receive;
+ EFI_IP4_CANCEL Cancel;
+ EFI_IP4_POLL Poll;
+} EFI_IP4_PROTOCOL;
+
+
+extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid;
+extern EFI_GUID gEfiIp4RegistryDataGuid;
+extern EFI_GUID gEfiIp4ProtocolGuid;
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Ip4Config/Ip4Config.c b/EDK/Foundation/Efi/Protocol/Ip4Config/Ip4Config.c
new file mode 100644
index 0000000..7ff845b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Ip4Config/Ip4Config.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Ip4Config.c
+
+Abstract:
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Ip4Config)
+
+EFI_GUID gEfiIp4ConfigProtocolGuid = EFI_IP4_CONFIG_PROTOCOL_GUID;
+
+EFI_GUID_STRING (
+ &gEfiIp4ConfigProtocolGuid,
+ "Ip4Config Protocol",
+ "Ip4Config Protocol"
+ );
diff --git a/EDK/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h b/EDK/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h
new file mode 100644
index 0000000..c6d4b86
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h
@@ -0,0 +1,72 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Ip4Config.h
+
+Abstract:
+
+--*/
+
+#ifndef _IP4CONFIG_H_
+#define _IP4CONFIG_H_
+
+#include EFI_PROTOCOL_DEFINITION (Ip4)
+
+#define EFI_IP4_CONFIG_PROTOCOL_GUID \
+ { 0x3b95aa31, 0x3793, 0x434b, 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e }
+
+EFI_FORWARD_DECLARATION (EFI_IP4_CONFIG_PROTOCOL);
+
+#define IP4_CONFIG_VARIABLE_ATTRIBUTES (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)
+
+typedef struct {
+ EFI_IPv4_ADDRESS StationAddress;
+ EFI_IPv4_ADDRESS SubnetMask;
+ UINT32 RouteTableSize;
+ EFI_IP4_ROUTE_TABLE *RouteTable;
+} EFI_IP4_IPCONFIG_DATA;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_CONFIG_START) (
+ IN EFI_IP4_CONFIG_PROTOCOL *This,
+ IN EFI_EVENT DoneEvent,
+ IN EFI_EVENT ReconfigEvent
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_CONFIG_STOP) (
+ IN EFI_IP4_CONFIG_PROTOCOL *This
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP4_CONFIG_GET_DATA) (
+ IN EFI_IP4_CONFIG_PROTOCOL *This,
+ IN OUT UINTN *ConfigDataSize,
+ OUT EFI_IP4_IPCONFIG_DATA *ConfigData OPTIONAL
+ );
+
+
+typedef struct _EFI_IP4_CONFIG_PROTOCOL {
+ EFI_IP4_CONFIG_START Start;
+ EFI_IP4_CONFIG_STOP Stop;
+ EFI_IP4_CONFIG_GET_DATA GetData;
+} EFI_IP4_CONFIG_PROTOCOL;
+
+
+extern EFI_GUID gEfiIp4ConfigProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/LoadFile/LoadFile.c b/EDK/Foundation/Efi/Protocol/LoadFile/LoadFile.c
new file mode 100644
index 0000000..1fd7adc
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/LoadFile/LoadFile.c
@@ -0,0 +1,33 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ LoadFile.c
+
+Abstract:
+
+ Load File protocol as defined in the EFI 1.0 specification.
+
+ Load file protocol exists to supports the addition of new boot devices,
+ and to support booting from devices that do not map well to file system.
+ Network boot is done via a LoadFile protocol.
+
+ EFI 1.0 can boot from any device that produces a LoadFile protocol.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (LoadFile)
+
+EFI_GUID gEfiLoadFileProtocolGuid = LOAD_FILE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiLoadFileProtocolGuid, "LoadFile Protocol", "EFI 1.0 Load File Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/LoadFile/LoadFile.h b/EDK/Foundation/Efi/Protocol/LoadFile/LoadFile.h
new file mode 100644
index 0000000..d530818
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/LoadFile/LoadFile.h
@@ -0,0 +1,87 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ LoadFile.h
+
+Abstract:
+
+ Load File protocol as defined in the EFI 1.0 specification.
+
+ Load file protocol exists to supports the addition of new boot devices,
+ and to support booting from devices that do not map well to file system.
+ Network boot is done via a LoadFile protocol.
+
+ EFI 1.0 can boot from any device that produces a LoadFile protocol.
+
+--*/
+
+#ifndef _LOAD_FILE_H_
+#define _LOAD_FILE_H_
+
+#define LOAD_FILE_PROTOCOL_GUID \
+ { \
+ 0x56EC3091, 0x954C, 0x11d2, 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_LOAD_FILE_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LOAD_FILE) (
+ IN EFI_LOAD_FILE_PROTOCOL * This,
+ IN EFI_DEVICE_PATH_PROTOCOL * FilePath,
+ IN BOOLEAN BootPolicy,
+ IN OUT UINTN *BufferSize,
+ IN VOID *Buffer OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Causes the driver to load a specified file.
+
+ Arguments:
+ This - Protocol instance pointer.
+ FilePath - The device specific path of the file to load.
+ BootPolicy - If TRUE, indicates that the request originates from the
+ boot manager is attempting to load FilePath as a boot
+ selection. If FALSE, then FilePath must match as exact file
+ to be loaded.
+ BufferSize - On input the size of Buffer in bytes. On output with a return
+ code of EFI_SUCCESS, the amount of data transferred to
+ Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,
+ the size of Buffer required to retrieve the requested file.
+ Buffer - The memory buffer to transfer the file to. IF Buffer is NULL,
+ then no the size of the requested file is returned in
+ BufferSize.
+
+ Returns:
+ EFI_SUCCESS - The file was loaded.
+ EFI_UNSUPPORTED - The device does not support the provided BootPolicy
+ EFI_INVALID_PARAMETER - FilePath is not a valid device path, or
+ BufferSize is NULL.
+ EFI_NO_MEDIA - No medium was present to load the file.
+ EFI_DEVICE_ERROR - The file was not loaded due to a device error.
+ EFI_NO_RESPONSE - The remote system did not respond.
+ EFI_NOT_FOUND - The file was not found
+ EFI_ABORTED - The file load process was manually cancelled.
+
+--*/
+;
+
+typedef struct _EFI_LOAD_FILE_PROTOCOL {
+ EFI_LOAD_FILE LoadFile;
+} EFI_LOAD_FILE_PROTOCOL;
+
+extern EFI_GUID gEfiLoadFileProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/LoadFile2/LoadFile2.c b/EDK/Foundation/Efi/Protocol/LoadFile2/LoadFile2.c
new file mode 100644
index 0000000..7e47b61
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/LoadFile2/LoadFile2.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ LoadFile2.c
+
+Abstract:
+
+ Load File2 protocol as defined in the UEFI specification.
+
+ Load File2 protocol exists to support to obtain files from arbitrary devices
+ but are not used as boot options.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (LoadFile2)
+
+EFI_GUID gEfiLoadFile2ProtocolGuid = EFI_LOAD_FILE2_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiLoad2FileProtocolGuid, "LoadFile2 Protocol", "UEFI 2.1 Load File2 Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/LoadFile2/LoadFile2.h b/EDK/Foundation/Efi/Protocol/LoadFile2/LoadFile2.h
new file mode 100644
index 0000000..295cd82
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/LoadFile2/LoadFile2.h
@@ -0,0 +1,84 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ LoadFile2.h
+
+Abstract:
+
+ Load File2 protocol as defined in the UEFI specification.
+
+ Load File2 protocol exists to support to obtain files from arbitrary devices
+ but are not used as boot options.
+
+--*/
+
+#ifndef _LOAD_FILE2_H_
+#define _LOAD_FILE2_H_
+
+#define EFI_LOAD_FILE2_PROTOCOL_GUID \
+ { \
+ 0x4006c0c1, 0xfcb3, 0x403e, 0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_LOAD_FILE2_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LOAD_FILE2_LOAD_FILE) (
+ IN EFI_LOAD_FILE2_PROTOCOL * This,
+ IN EFI_DEVICE_PATH_PROTOCOL * FilePath,
+ IN BOOLEAN BootPolicy,
+ IN OUT UINTN *BufferSize,
+ IN VOID *Buffer OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Causes the driver to load a specified file.
+
+ Arguments:
+ This - Protocol instance pointer.
+ FilePath - The device specific path of the file to load.
+ BootPolicy - Should always be FALSE.
+ BufferSize - On input the size of Buffer in bytes. On output with a return
+ code of EFI_SUCCESS, the amount of data transferred to
+ Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,
+ the size of Buffer required to retrieve the requested file.
+ Buffer - The memory buffer to transfer the file to. IF Buffer is NULL,
+ then no the size of the requested file is returned in
+ BufferSize.
+
+ Returns:
+ EFI_SUCCESS - The file was loaded.
+ EFI_UNSUPPORTED - BootPolicy is TRUE.
+ EFI_INVALID_PARAMETER - FilePath is not a valid device path, or
+ BufferSize is NULL.
+ EFI_NO_MEDIA - No medium was present to load the file.
+ EFI_DEVICE_ERROR - The file was not loaded due to a device error.
+ EFI_NO_RESPONSE - The remote system did not respond.
+ EFI_NOT_FOUND - The file was not found
+ EFI_ABORTED - The file load process was manually cancelled.
+ EFI_BUFFER_TOO_SMALL - The BufferSize is too small to read the current
+ directory entry. BufferSize has been updated with
+ the size needed to complete the request.
+
+--*/
+;
+
+typedef struct _EFI_LOAD_FILE2_PROTOCOL {
+ EFI_LOAD_FILE2_LOAD_FILE LoadFile;
+} EFI_LOAD_FILE2_PROTOCOL;
+
+extern EFI_GUID gEfiLoadFile2ProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/LoadedImage/LoadedImage.c b/EDK/Foundation/Efi/Protocol/LoadedImage/LoadedImage.c
new file mode 100644
index 0000000..7be2695
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/LoadedImage/LoadedImage.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ LoadedImage.c
+
+Abstract:
+
+ EFI 1.0 Loaded Image Protocol definition.
+
+ Every EFI driver and application is passed an image handle when it is loaded.
+ This image handle will contain a Loaded Image Protocol.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (LoadedImage)
+
+EFI_GUID gEfiLoadedImageProtocolGuid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiLoadedImageProtocolGuid, "LoadedImage Protocol", "EFI 1.0 Loaded Image Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/LoadedImage/LoadedImage.h b/EDK/Foundation/Efi/Protocol/LoadedImage/LoadedImage.h
new file mode 100644
index 0000000..78579dc
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/LoadedImage/LoadedImage.h
@@ -0,0 +1,73 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ LoadedImage.h
+
+Abstract:
+
+ EFI 1.0 Loaded image protocol definition.
+
+ Every EFI driver and application is passed an image handle when it is loaded.
+ This image handle will contain a Loaded Image Protocol.
+
+--*/
+
+#ifndef _LOADED_IMAGE_H_
+#define _LOADED_IMAGE_H_
+
+#define EFI_LOADED_IMAGE_PROTOCOL_GUID \
+ { \
+ 0x5B1B31A1, 0x9562, 0x11d2, 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B \
+ }
+
+//
+// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h
+//
+#define EFI_LOADED_IMAGE_INFORMATION_REVISION 0x1000
+
+typedef struct {
+ UINT32 Revision;
+ EFI_HANDLE ParentHandle;
+ EFI_SYSTEM_TABLE *SystemTable;
+
+ //
+ // Source location of image
+ //
+ EFI_HANDLE DeviceHandle;
+ EFI_DEVICE_PATH_PROTOCOL *FilePath;
+ VOID *Reserved;
+
+ //
+ // Images load options
+ //
+ UINT32 LoadOptionsSize;
+ VOID *LoadOptions;
+
+ //
+ // Location of where image was loaded
+ //
+ VOID *ImageBase;
+ UINT64 ImageSize;
+ EFI_MEMORY_TYPE ImageCodeType;
+ EFI_MEMORY_TYPE ImageDataType;
+
+ //
+ // If the driver image supports a dynamic unload request
+ //
+ EFI_IMAGE_UNLOAD Unload;
+
+} EFI_LOADED_IMAGE_PROTOCOL;
+
+extern EFI_GUID gEfiLoadedImageProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.c b/EDK/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.c
new file mode 100644
index 0000000..6b0570b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.c
@@ -0,0 +1,32 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ LoadedImageDevicePath.c
+
+Abstract:
+
+ The Loaded Image Device Path Protocol as defined in UEFI 2.1.
+
+ When installed, the Loaded Image Device Path Protocol specifies the device
+ path that was used when a PE/COFF image was loaded through the EFI Boot
+ Service LoadImage().
+
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (LoadedImageDevicePath)
+
+EFI_GUID gEfiLoadedImageDevicePathProtocolGuid = EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiLoadedImageDevicePathProtocolGuid, "Loaded Image Device Path Protocol", "UEFI 2.1 Loaded Image Device Path protocol");
diff --git a/EDK/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.h b/EDK/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.h
new file mode 100644
index 0000000..7a05f64
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.h
@@ -0,0 +1,44 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ LoadedImageDevicePath.h
+
+Abstract:
+
+ The Loaded Image Device Path Protocol as defined in UEFI 2.1.
+
+ When installed, the Loaded Image Device Path Protocol specifies the device
+ path that was used when a PE/COFF image was loaded through the EFI Boot
+ Service LoadImage().
+
+
+--*/
+
+#ifndef _LOADED_IMAGE_DEVICE_PATH_H_
+#define _LOADED_IMAGE_DEVICE_PATH_H_
+
+#include EFI_PROTOCOL_DEFINITION (DevicePath)
+
+//
+// Loaded Image Device Path protocol
+//
+#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \
+ { \
+ 0xbc62157e, 0x3e33, 0x4fec, 0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf \
+ }
+
+typedef EFI_DEVICE_PATH_PROTOCOL EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL;
+
+extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.c b/EDK/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.c
new file mode 100644
index 0000000..53c461c
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2005 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ManagedNetwork.c
+
+Abstract:
+
+ UEFI Managed Network protocol.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (ManagedNetwork)
+
+EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid = EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID;
+EFI_GUID gEfiManagedNetworkProtocolGuid = EFI_MANAGED_NETWORK_PROTOCOL_GUID;
+
+EFI_GUID_STRING (&gEfiManagedNetworkServiceBindingProtocolGuid, "Managed Network Service Binding Protocol", "Managed Network Service Binding Protocol");
+EFI_GUID_STRING (&gEfiManagedNetworkProtocolGuid, "Managed Network Protocol", "Managed Network Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h b/EDK/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h
new file mode 100644
index 0000000..aa02ac9
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h
@@ -0,0 +1,164 @@
+/*++
+
+Copyright (c) 2005 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ManagedNetwork.h
+
+Abstract:
+
+ UEFI Managed Network protocol definition.
+
+--*/
+
+#ifndef _MANAGED_NETWORK_H_
+#define _MANAGED_NETWORK_H_
+
+#include EFI_PROTOCOL_DEFINITION (SimpleNetwork)
+#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
+
+#define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \
+ { 0xf36ff770, 0xa7e1, 0x42cf, 0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c }
+
+#define EFI_MANAGED_NETWORK_PROTOCOL_GUID \
+ { 0x7ab33a91, 0xace5, 0x4326, 0xb5, 0x72, 0xe7, 0xee, 0x33, 0xd3, 0x9f, 0x16 }
+
+EFI_FORWARD_DECLARATION (EFI_MANAGED_NETWORK_PROTOCOL);
+
+typedef struct {
+ UINT32 ReceivedQueueTimeoutValue;
+ UINT32 TransmitQueueTimeoutValue;
+ UINT16 ProtocolTypeFilter;
+ BOOLEAN EnableUnicastReceive;
+ BOOLEAN EnableMulticastReceive;
+ BOOLEAN EnableBroadcastReceive;
+ BOOLEAN EnablePromiscuousReceive;
+ BOOLEAN FlushQueuesOnReset;
+ BOOLEAN EnableReceiveTimestamps;
+ BOOLEAN DisableBackgroundPolling;
+} EFI_MANAGED_NETWORK_CONFIG_DATA;
+
+typedef struct {
+ EFI_TIME Timestamp;
+ EFI_EVENT RecycleEvent;
+ UINT32 PacketLength;
+ UINT32 HeaderLength;
+ UINT32 AddressLength;
+ UINT32 DataLength;
+ BOOLEAN BroadcastFlag;
+ BOOLEAN MulticastFlag;
+ BOOLEAN PromiscuousFlag;
+ UINT16 ProtocolType;
+ VOID *DestinationAddress;
+ VOID *SourceAddress;
+ VOID *MediaHeader;
+ VOID *PacketData;
+} EFI_MANAGED_NETWORK_RECEIVE_DATA;
+
+typedef struct {
+ UINT32 FragmentLength;
+ VOID *FragmentBuffer;
+} EFI_MANAGED_NETWORK_FRAGMENT_DATA;
+
+typedef struct {
+ EFI_MAC_ADDRESS *DestinationAddress;
+ EFI_MAC_ADDRESS *SourceAddress;
+ UINT16 ProtocolType;
+ UINT32 DataLength;
+ UINT16 HeaderLength;
+ UINT16 FragmentCount;
+ EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable[1];
+} EFI_MANAGED_NETWORK_TRANSMIT_DATA;
+
+
+typedef struct {
+ EFI_EVENT Event;
+ EFI_STATUS Status;
+ union {
+ EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData;
+ EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData;
+ } Packet;
+} EFI_MANAGED_NETWORK_COMPLETION_TOKEN;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MANAGED_NETWORK_GET_MODE_DATA) (
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,
+ OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
+ OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MANAGED_NETWORK_CONFIGURE) (
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,
+ IN EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC) (
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,
+ IN BOOLEAN Ipv6Flag,
+ IN EFI_IP_ADDRESS *IpAddress,
+ OUT EFI_MAC_ADDRESS *MacAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MANAGED_NETWORK_GROUPS) (
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,
+ IN BOOLEAN JoinFlag,
+ IN EFI_MAC_ADDRESS *MacAddress OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MANAGED_NETWORK_TRANSMIT) (
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,
+ IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MANAGED_NETWORK_RECEIVE) (
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,
+ IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MANAGED_NETWORK_CANCEL) (
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This,
+ IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MANAGED_NETWORK_POLL) (
+ IN EFI_MANAGED_NETWORK_PROTOCOL *This
+ );
+
+typedef struct _EFI_MANAGED_NETWORK_PROTOCOL {
+ EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData;
+ EFI_MANAGED_NETWORK_CONFIGURE Configure;
+ EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC McastIpToMac;
+ EFI_MANAGED_NETWORK_GROUPS Groups;
+ EFI_MANAGED_NETWORK_TRANSMIT Transmit;
+ EFI_MANAGED_NETWORK_RECEIVE Receive;
+ EFI_MANAGED_NETWORK_CANCEL Cancel;
+ EFI_MANAGED_NETWORK_POLL Poll;
+} EFI_MANAGED_NETWORK_PROTOCOL;
+
+extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid;
+extern EFI_GUID gEfiManagedNetworkProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Mtftp4/Mtftp4.c b/EDK/Foundation/Efi/Protocol/Mtftp4/Mtftp4.c
new file mode 100644
index 0000000..3c35ad4
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Mtftp4/Mtftp4.c
@@ -0,0 +1,39 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Mtftp4.c
+
+Abstract:
+
+ UEFI Multicast Trivial File Transfer Protocol GUID Declaration.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Mtftp4)
+
+EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid = EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID;
+EFI_GUID gEfiMtftp4ProtocolGuid = EFI_MTFTP4_PROTOCOL_GUID;
+
+EFI_GUID_STRING (
+ &gEfiMtftp4ServiceBindingProtocolGuid,
+ "MTFTP4 Service Binding Protocol",
+ "MTFTP4 Service Binding Protocol"
+ );
+
+EFI_GUID_STRING (
+ &gEfiMtftp4ProtocolGuid,
+ "MTFTP4 Protocol",
+ "MTFTP4 Protocol"
+ );
+
diff --git a/EDK/Foundation/Efi/Protocol/Mtftp4/Mtftp4.h b/EDK/Foundation/Efi/Protocol/Mtftp4/Mtftp4.h
new file mode 100644
index 0000000..f18dd0b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Mtftp4/Mtftp4.h
@@ -0,0 +1,308 @@
+/*++
+
+Copyright (c) 2006 - 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Mtftp4.h
+
+Abstract:
+
+ UEFI Multicast Trivial File Tranfer Protocol Definition
+
+--*/
+
+#ifndef __EFI_MTFTP4_H__
+#define __EFI_MTFTP4_H__
+
+#include EFI_PROTOCOL_DEFINITION(ServiceBinding)
+
+#define EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID \
+ { 0x2FE800BE, 0x8F01, 0x4aa6, 0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F }
+
+#define EFI_MTFTP4_PROTOCOL_GUID \
+ { 0x78247c57, 0x63db, 0x4708, 0x99, 0xc2, 0xa8, 0xb4, 0xa9, 0xa6, 0x1f, 0x6b }
+
+EFI_FORWARD_DECLARATION (EFI_MTFTP4_PROTOCOL);
+EFI_FORWARD_DECLARATION (EFI_MTFTP4_TOKEN);
+
+extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid;
+extern EFI_GUID gEfiMtftp4ProtocolGuid;
+
+
+//
+//MTFTP4 packet opcode definition
+//
+#define EFI_MTFTP4_OPCODE_RRQ 1
+#define EFI_MTFTP4_OPCODE_WRQ 2
+#define EFI_MTFTP4_OPCODE_DATA 3
+#define EFI_MTFTP4_OPCODE_ACK 4
+#define EFI_MTFTP4_OPCODE_ERROR 5
+#define EFI_MTFTP4_OPCODE_OACK 6
+#define EFI_MTFTP4_OPCODE_DIR 7
+#define EFI_MTFTP4_OPCODE_DATA8 8
+#define EFI_MTFTP4_OPCODE_ACK8 9
+
+//
+//MTFTP4 error code definition
+//
+#define EFI_MTFTP4_ERRORCODE_NOT_DEFINED 0
+#define EFI_MTFTP4_ERRORCODE_FILE_NOT_FOUND 1
+#define EFI_MTFTP4_ERRORCODE_ACCESS_VIOLATION 2
+#define EFI_MTFTP4_ERRORCODE_DISK_FULL 3
+#define EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION 4
+#define EFI_MTFTP4_ERRORCODE_UNKNOWN_TRANSFER_ID 5
+#define EFI_MTFTP4_ERRORCODE_FILE_ALREADY_EXISTS 6
+#define EFI_MTFTP4_ERRORCODE_NO_SUCH_USER 7
+#define EFI_MTFTP4_ERRORCODE_REQUEST_DENIED 8
+
+
+//
+//MTFTP4 pacekt definition
+//
+#pragma pack(1)
+
+typedef struct {
+ UINT16 OpCode;
+ UINT8 Filename[1];
+} EFI_MTFTP4_REQ_HEADER;
+
+typedef struct {
+ UINT16 OpCode;
+ UINT8 Data[1];
+} EFI_MTFTP4_OACK_HEADER;
+
+typedef struct {
+ UINT16 OpCode;
+ UINT16 Block;
+ UINT8 Data[1];
+} EFI_MTFTP4_DATA_HEADER;
+
+typedef struct {
+ UINT16 OpCode;
+ UINT16 Block[1];
+} EFI_MTFTP4_ACK_HEADER;
+
+typedef struct {
+ UINT16 OpCode;
+ UINT64 Block;
+ UINT8 Data[1];
+} EFI_MTFTP4_DATA8_HEADER;
+
+typedef struct {
+ UINT16 OpCode;
+ UINT64 Block[1];
+} EFI_MTFTP4_ACK8_HEADER;
+
+typedef struct {
+ UINT16 OpCode;
+ UINT16 ErrorCode;
+ UINT8 ErrorMessage[1];
+} EFI_MTFTP4_ERROR_HEADER;
+
+typedef union {
+ UINT16 OpCode;
+ EFI_MTFTP4_REQ_HEADER Rrq;
+ EFI_MTFTP4_REQ_HEADER Wrq;
+ EFI_MTFTP4_OACK_HEADER Oack;
+ EFI_MTFTP4_DATA_HEADER Data;
+ EFI_MTFTP4_ACK_HEADER Ack;
+ EFI_MTFTP4_DATA8_HEADER Data8;
+ EFI_MTFTP4_ACK8_HEADER Ack8;
+ EFI_MTFTP4_ERROR_HEADER Error;
+} EFI_MTFTP4_PACKET;
+
+#pragma pack()
+
+//
+//MTFTP4 option definition
+//
+typedef struct {
+ UINT8 *OptionStr;
+ UINT8 *ValueStr;
+} EFI_MTFTP4_OPTION;
+
+//
+//MTFTP4 config data
+//
+typedef struct {
+ BOOLEAN UseDefaultSetting;
+ EFI_IPv4_ADDRESS StationIp;
+ EFI_IPv4_ADDRESS SubnetMask;
+ UINT16 LocalPort;
+ EFI_IPv4_ADDRESS GatewayIp;
+ EFI_IPv4_ADDRESS ServerIp;
+ UINT16 InitialServerPort;
+ UINT16 TryCount;
+ UINT16 TimeoutValue;
+} EFI_MTFTP4_CONFIG_DATA;
+
+//
+//MTFTP4 Mode data
+//
+typedef struct {
+ EFI_MTFTP4_CONFIG_DATA ConfigData;
+ UINT8 SupportedOptionCount;
+ UINT8 **SupportedOptoins;
+ UINT8 UnsupportedOptionCount;
+ UINT8 **UnsupportedOptoins;
+} EFI_MTFTP4_MODE_DATA;
+
+
+//
+//MTFTP4 override data
+//
+typedef struct {
+ EFI_IPv4_ADDRESS GatewayIp;
+ EFI_IPv4_ADDRESS ServerIp;
+ UINT16 ServerPort;
+ UINT16 TryCount;
+ UINT16 TimeoutValue;
+} EFI_MTFTP4_OVERRIDE_DATA;
+
+
+//
+//Packet checking function
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_CHECK_PACKET)(
+ IN EFI_MTFTP4_PROTOCOL *This,
+ IN EFI_MTFTP4_TOKEN *Token,
+ IN UINT16 PacketLen,
+ IN EFI_MTFTP4_PACKET *Paket
+ );
+
+//
+//Timeout callback funtion
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_TIMEOUT_CALLBACK) (
+ IN EFI_MTFTP4_PROTOCOL *This,
+ IN EFI_MTFTP4_TOKEN *Token
+ );
+
+//
+//Packet needed function
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_PACKET_NEEDED) (
+ IN EFI_MTFTP4_PROTOCOL *This,
+ IN EFI_MTFTP4_TOKEN *Token,
+ IN OUT UINT16 *Length,
+ OUT VOID **Buffer
+ );
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_GET_MODE_DATA) (
+ IN EFI_MTFTP4_PROTOCOL *This,
+ OUT EFI_MTFTP4_MODE_DATA *ModeData
+ );
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_CONFIGURE) (
+ IN EFI_MTFTP4_PROTOCOL *This,
+ IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL
+ );
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_GET_INFO) (
+ IN EFI_MTFTP4_PROTOCOL *This,
+ IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData OPTIONAL,
+ IN UINT8 *Filename,
+ IN UINT8 *ModeStr OPTIONAL,
+ IN UINT8 OptionCount,
+ IN EFI_MTFTP4_OPTION *OptionList,
+ OUT UINT32 *PacketLength,
+ OUT EFI_MTFTP4_PACKET **Packet OPTIONAL
+ );
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_PARSE_OPTIONS) (
+ IN EFI_MTFTP4_PROTOCOL *This,
+ IN UINT32 PacketLen,
+ IN EFI_MTFTP4_PACKET *Packet,
+ OUT UINT32 *OptionCount,
+ OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL
+ );
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_READ_FILE) (
+ IN EFI_MTFTP4_PROTOCOL *This,
+ IN EFI_MTFTP4_TOKEN *Token
+ );
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_WRITE_FILE) (
+ IN EFI_MTFTP4_PROTOCOL *This,
+ IN EFI_MTFTP4_TOKEN *Token
+ );
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_READ_DIRECTORY) (
+ IN EFI_MTFTP4_PROTOCOL *This,
+ IN EFI_MTFTP4_TOKEN *Token
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MTFTP4_POLL) (
+ IN EFI_MTFTP4_PROTOCOL *This
+);
+
+
+typedef struct _EFI_MTFTP4_PROTOCOL {
+ EFI_MTFTP4_GET_MODE_DATA GetModeData;
+ EFI_MTFTP4_CONFIGURE Configure;
+ EFI_MTFTP4_GET_INFO GetInfo;
+ EFI_MTFTP4_PARSE_OPTIONS ParseOptions;
+ EFI_MTFTP4_READ_FILE ReadFile;
+ EFI_MTFTP4_WRITE_FILE WriteFile;
+ EFI_MTFTP4_READ_DIRECTORY ReadDirectory;
+ EFI_MTFTP4_POLL Poll;
+} EFI_MTFTP4_PROTOCOL;
+
+//
+//MTFTP4 token data
+//
+typedef struct _EFI_MTFTP4_TOKEN{
+ IN OUT EFI_STATUS Status;
+ IN EFI_EVENT Event;
+ IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData;
+ IN UINT8 *Filename;
+ IN UINT8 *ModeStr;
+ IN UINT32 OptionCount;
+ IN EFI_MTFTP4_OPTION *OptionList;
+ IN OUT UINT64 BufferSize;
+ IN OUT VOID *Buffer;
+ IN VOID *Context;
+ IN EFI_MTFTP4_CHECK_PACKET CheckPacket;
+ IN EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback;
+ IN EFI_MTFTP4_PACKET_NEEDED PacketNeeded;
+} EFI_MTFTP4_TOKEN;
+
+#endif
+
diff --git a/EDK/Foundation/Efi/Protocol/PciIo/PciIo.c b/EDK/Foundation/Efi/Protocol/PciIo/PciIo.c
new file mode 100644
index 0000000..d6d30cc
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PciIo/PciIo.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PciIo.c
+
+Abstract:
+
+ EFI PCI I/O Protocol
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+
+#include EFI_PROTOCOL_DEFINITION (PciIo)
+
+EFI_GUID gEfiPciIoProtocolGuid = EFI_PCI_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiPciIoProtocolGuid, "PCI IO Protocol", "EFI 1.1 PCI IO Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/PciIo/PciIo.h b/EDK/Foundation/Efi/Protocol/PciIo/PciIo.h
new file mode 100644
index 0000000..c43f013
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PciIo/PciIo.h
@@ -0,0 +1,275 @@
+/*++
+
+Copyright (c) 2004 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PciIo.h
+
+Abstract:
+
+ EFI PCI I/O Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_PCI_IO_H
+#define _EFI_PCI_IO_H
+
+//
+// Global ID for the PCI I/O Protocol
+//
+#define EFI_PCI_IO_PROTOCOL_GUID \
+ { \
+ 0x4cf5b200, 0x68b8, 0x4ca5, 0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_PCI_IO_PROTOCOL);
+
+//
+// Prototypes for the PCI I/O Protocol
+//
+typedef enum {
+ EfiPciIoWidthUint8 = 0,
+ EfiPciIoWidthUint16,
+ EfiPciIoWidthUint32,
+ EfiPciIoWidthUint64,
+ EfiPciIoWidthFifoUint8,
+ EfiPciIoWidthFifoUint16,
+ EfiPciIoWidthFifoUint32,
+ EfiPciIoWidthFifoUint64,
+ EfiPciIoWidthFillUint8,
+ EfiPciIoWidthFillUint16,
+ EfiPciIoWidthFillUint32,
+ EfiPciIoWidthFillUint64,
+ EfiPciIoWidthMaximum
+} EFI_PCI_IO_PROTOCOL_WIDTH;
+
+//
+// Complete PCI address generater
+//
+#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff // Special BAR that passes a memory or I/O cycle through unchanged
+#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f // All the following I/O and Memory cycles
+#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 // I/O cycles 0x0000-0x00FF (10 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002 // I/O cycles 0x0000-0x03FF (10 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004 // I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008 // MEM cycles 0xA0000-0xBFFFF (24 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010 // I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 // I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 // I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 // Map a memory range so write are combined
+#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 // Enable the I/O decode bit in the PCI Config Header
+#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 // Enable the Memory decode bit in the PCI Config Header
+#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 // Enable the DMA bit in the PCI Config Header
+#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800 // Map a memory range so all r/w accesses are cached
+#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 // Disable a memory range
+#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000 // Clear for an add-in PCI Device
+#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000 // Clear for a physical PCI Option ROM accessed through ROM BAR
+#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 // Clear for PCI controllers that can not genrate a DAC
+//
+// The following definition is added in EFI1.1 spec update and UEFI2.0 spec.
+//
+#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000 // I/O cycles 0x0100-0x03FF (16 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 // I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000 // I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
+
+#define EFI_PCI_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER)
+#define EFI_VGA_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO)
+
+//
+// *******************************************************
+// EFI_PCI_IO_PROTOCOL_OPERATION
+// *******************************************************
+//
+typedef enum {
+ EfiPciIoOperationBusMasterRead,
+ EfiPciIoOperationBusMasterWrite,
+ EfiPciIoOperationBusMasterCommonBuffer,
+ EfiPciIoOperationMaximum
+} EFI_PCI_IO_PROTOCOL_OPERATION;
+
+//
+// *******************************************************
+// EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION
+// *******************************************************
+//
+typedef enum {
+ EfiPciIoAttributeOperationGet,
+ EfiPciIoAttributeOperationSet,
+ EfiPciIoAttributeOperationEnable,
+ EfiPciIoAttributeOperationDisable,
+ EfiPciIoAttributeOperationSupported,
+ EfiPciIoAttributeOperationMaximum
+} EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_POLL_IO_MEM) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
+ IN UINT8 BarIndex,
+ IN UINT64 Offset,
+ IN UINT64 Mask,
+ IN UINT64 Value,
+ IN UINT64 Delay,
+ OUT UINT64 *Result
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_IO_MEM) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
+ IN UINT8 BarIndex,
+ IN UINT64 Offset,
+ IN UINTN Count,
+ IN OUT VOID *Buffer
+ );
+
+typedef struct {
+ EFI_PCI_IO_PROTOCOL_IO_MEM Read;
+ EFI_PCI_IO_PROTOCOL_IO_MEM Write;
+} EFI_PCI_IO_PROTOCOL_ACCESS;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_CONFIG) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
+ IN UINT32 Offset,
+ IN UINTN Count,
+ IN OUT VOID *Buffer
+ );
+
+typedef struct {
+ EFI_PCI_IO_PROTOCOL_CONFIG Read;
+ EFI_PCI_IO_PROTOCOL_CONFIG Write;
+} EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_COPY_MEM) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
+ IN UINT8 DestBarIndex,
+ IN UINT64 DestOffset,
+ IN UINT8 SrcBarIndex,
+ IN UINT64 SrcOffset,
+ IN UINTN Count
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_MAP) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN EFI_PCI_IO_PROTOCOL_OPERATION Operation,
+ IN VOID *HostAddress,
+ IN OUT UINTN *NumberOfBytes,
+ OUT EFI_PHYSICAL_ADDRESS * DeviceAddress,
+ OUT VOID **Mapping
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_UNMAP) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN VOID *Mapping
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN EFI_ALLOCATE_TYPE Type,
+ IN EFI_MEMORY_TYPE MemoryType,
+ IN UINTN Pages,
+ OUT VOID **HostAddress,
+ IN UINT64 Attributes
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_FREE_BUFFER) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN UINTN Pages,
+ IN VOID *HostAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_FLUSH) (
+ IN EFI_PCI_IO_PROTOCOL * This
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_LOCATION) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ OUT UINTN *SegmentNumber,
+ OUT UINTN *BusNumber,
+ OUT UINTN *DeviceNumber,
+ OUT UINTN *FunctionNumber
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_ATTRIBUTES) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation,
+ IN UINT64 Attributes,
+ OUT UINT64 *Result OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN UINT8 BarIndex,
+ OUT UINT64 *Supports, OPTIONAL
+ OUT VOID **Resources OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES) (
+ IN EFI_PCI_IO_PROTOCOL * This,
+ IN UINT64 Attributes,
+ IN UINT8 BarIndex,
+ IN OUT UINT64 *Offset,
+ IN OUT UINT64 *Length
+ );
+
+//
+// Interface structure for the PCI I/O Protocol
+//
+typedef struct _EFI_PCI_IO_PROTOCOL {
+ EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem;
+ EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo;
+ EFI_PCI_IO_PROTOCOL_ACCESS Mem;
+ EFI_PCI_IO_PROTOCOL_ACCESS Io;
+ EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS Pci;
+ EFI_PCI_IO_PROTOCOL_COPY_MEM CopyMem;
+ EFI_PCI_IO_PROTOCOL_MAP Map;
+ EFI_PCI_IO_PROTOCOL_UNMAP Unmap;
+ EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer;
+ EFI_PCI_IO_PROTOCOL_FREE_BUFFER FreeBuffer;
+ EFI_PCI_IO_PROTOCOL_FLUSH Flush;
+ EFI_PCI_IO_PROTOCOL_GET_LOCATION GetLocation;
+ EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes;
+ EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes;
+ EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes;
+ UINT64 RomSize;
+ VOID *RomImage;
+} EFI_PCI_IO_PROTOCOL;
+
+extern EFI_GUID gEfiPciIoProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/PciRootBridgeIo/PciRootBridgeIo.c b/EDK/Foundation/Efi/Protocol/PciRootBridgeIo/PciRootBridgeIo.c
new file mode 100644
index 0000000..3d8e67a
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PciRootBridgeIo/PciRootBridgeIo.c
@@ -0,0 +1,32 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PciRootBridgeIo.c
+
+Abstract:
+
+ PCI Root Bridge I/O protocol as defined in the EFI 1.1 specification.
+
+ PCI Root Bridge I/O protocol is used by PCI Bus Driver to perform PCI Memory, PCI I/O,
+ and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform
+ defferent types of bus mastering DMA
+
+--*/
+
+#include "EfiSpec.h"
+
+#include EFI_PROTOCOL_DEFINITION (PciRootBridgeIo)
+
+EFI_GUID gEfiPciRootBridgeIoProtocolGuid = EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiPciRootBridgeIoProtocolGuid, "PciRootBridgeIo Protocol", "EFI 1.1 Pci Root Bridge IO Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/PciRootBridgeIo/PciRootBridgeIo.h b/EDK/Foundation/Efi/Protocol/PciRootBridgeIo/PciRootBridgeIo.h
new file mode 100644
index 0000000..154eb94
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PciRootBridgeIo/PciRootBridgeIo.h
@@ -0,0 +1,220 @@
+/*++
+
+Copyright (c) 2004 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PciRootBridgeIo.h
+
+Abstract:
+
+ PCI Root Bridge I/O protocol as defined in the EFI 1.1 specification.
+
+ PCI Root Bridge I/O protocol is used by PCI Bus Driver to perform PCI Memory, PCI I/O,
+ and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform
+ defferent types of bus mastering DMA
+
+--*/
+
+#ifndef _PCI_ROOT_BRIDGE_IO_H_
+#define _PCI_ROOT_BRIDGE_IO_H_
+
+#define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \
+ { \
+ 0x2f707ebb, 0x4a1a, 0x11d4, 0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL);
+
+typedef enum {
+ EfiPciWidthUint8,
+ EfiPciWidthUint16,
+ EfiPciWidthUint32,
+ EfiPciWidthUint64,
+ EfiPciWidthFifoUint8,
+ EfiPciWidthFifoUint16,
+ EfiPciWidthFifoUint32,
+ EfiPciWidthFifoUint64,
+ EfiPciWidthFillUint8,
+ EfiPciWidthFillUint16,
+ EfiPciWidthFillUint32,
+ EfiPciWidthFillUint64,
+ EfiPciWidthMaximum
+} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH;
+
+typedef enum {
+ EfiPciOperationBusMasterRead,
+ EfiPciOperationBusMasterWrite,
+ EfiPciOperationBusMasterCommonBuffer,
+ EfiPciOperationBusMasterRead64,
+ EfiPciOperationBusMasterWrite64,
+ EfiPciOperationBusMasterCommonBuffer64,
+ EfiPciOperationMaximum
+} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION;
+
+#define EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001
+#define EFI_PCI_ATTRIBUTE_ISA_IO 0x0002
+#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO 0x0004
+#define EFI_PCI_ATTRIBUTE_VGA_MEMORY 0x0008
+#define EFI_PCI_ATTRIBUTE_VGA_IO 0x0010
+#define EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO 0x0020
+#define EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO 0x0040
+#define EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080
+#define EFI_PCI_ATTRIBUTE_MEMORY_CACHED 0x0800
+#define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE 0x1000
+#define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000
+//
+// The following definition is added in EFI1.1 spec update and UEFI2.0 spec.
+//
+#define EFI_PCI_ATTRIBUTE_ISA_IO_16 0x10000
+#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000
+#define EFI_PCI_ATTRIBUTE_VGA_IO_16 0x40000
+
+#define EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER (EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED | EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE)
+
+#define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER)
+
+#define EFI_PCI_ADDRESS(bus, dev, func, reg) \
+ ((UINT64) ((((UINTN) bus) << 24) + (((UINTN) dev) << 16) + (((UINTN) func) << 8) + ((UINTN) reg)))
+
+typedef struct {
+ UINT8 Register;
+ UINT8 Function;
+ UINT8 Device;
+ UINT8 Bus;
+ UINT32 ExtendedRegister;
+} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
+ IN UINT64 Address,
+ IN UINT64 Mask,
+ IN UINT64 Value,
+ IN UINT64 Delay,
+ OUT UINT64 *Result
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
+ IN UINT64 Address,
+ IN UINTN Count,
+ IN OUT VOID *Buffer
+ );
+
+typedef struct {
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write;
+} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
+ IN UINT64 DestAddress,
+ IN UINT64 SrcAddress,
+ IN UINTN Count
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation,
+ IN VOID *HostAddress,
+ IN OUT UINTN *NumberOfBytes,
+ OUT EFI_PHYSICAL_ADDRESS * DeviceAddress,
+ OUT VOID **Mapping
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ IN VOID *Mapping
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ IN EFI_ALLOCATE_TYPE Type,
+ IN EFI_MEMORY_TYPE MemoryType,
+ IN UINTN Pages,
+ IN OUT VOID **HostAddress,
+ IN UINT64 Attributes
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ IN UINTN Pages,
+ IN VOID *HostAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ OUT UINT64 *Supports,
+ OUT UINT64 *Attributes
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ IN UINT64 Attributes,
+ IN OUT UINT64 *ResourceBase,
+ IN OUT UINT64 *ResourceLength
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION) (
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,
+ OUT VOID **Resources
+ );
+
+typedef struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL {
+ EFI_HANDLE ParentHandle;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollMem;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollIo;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Mem;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Io;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Pci;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM CopyMem;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP Map;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP Unmap;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER FreeBuffer;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH Flush;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES GetAttributes;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES SetAttributes;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION Configuration;
+ UINT32 SegmentNumber;
+} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL;
+
+extern EFI_GUID gEfiPciRootBridgeIoProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/PlatformDriverOverride/PlatformDriverOverride.c b/EDK/Foundation/Efi/Protocol/PlatformDriverOverride/PlatformDriverOverride.c
new file mode 100644
index 0000000..1f03c6d
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PlatformDriverOverride/PlatformDriverOverride.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PlatformDriverOverride.c
+
+Abstract:
+
+ Platform Driver Override protocol as defined in the EFI 1.1 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (PlatformDriverOverride)
+
+EFI_GUID gEfiPlatformDriverOverrideProtocolGuid = EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (
+ &gEfiPlatformDriverOverrideProtocolGuid, "Platform Driver Override Protocol",
+ "EFI 1.1 Platform Driver Override Protocol"
+ );
diff --git a/EDK/Foundation/Efi/Protocol/PlatformDriverOverride/PlatformDriverOverride.h b/EDK/Foundation/Efi/Protocol/PlatformDriverOverride/PlatformDriverOverride.h
new file mode 100644
index 0000000..5b285da
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PlatformDriverOverride/PlatformDriverOverride.h
@@ -0,0 +1,74 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PlatformDriverOverride.h
+
+Abstract:
+
+ Platform Driver Override protocol as defined in the EFI 1.1 specification.
+
+--*/
+
+#ifndef _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_H_
+#define _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_H_
+
+//
+// Global ID for the Platform Driver Override Protocol
+//
+#define EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID \
+ { \
+ 0x6b30c738, 0xa391, 0x11d4, 0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL);
+
+//
+// Prototypes for the Platform Driver Override Protocol
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER) (
+ IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN OUT EFI_HANDLE * DriverImageHandle
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH) (
+ IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DriverImagePath
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED) (
+ IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL * DriverImagePath,
+ IN EFI_HANDLE DriverImageHandle
+ );
+
+//
+// Interface structure for the Platform Driver Override Protocol
+//
+typedef struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL {
+ EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
+ EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH GetDriverPath;
+ EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED DriverLoaded;
+} EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL;
+
+extern EFI_GUID gEfiPlatformDriverOverrideProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.c b/EDK/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.c
new file mode 100644
index 0000000..36d9e3d
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PlatformToDriverConfiguration.c
+
+Abstract:
+
+ UEFI Platform to Driver Configuration Protocol
+
+Revision History:
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (PlatformToDriverConfiguration)
+
+EFI_GUID gEfiPlatformToDriverConfigurationProtocolGuid = EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL_GUID;
+EFI_GUID gEfiPlatformToDriverConfigurationClpGuid = EFI_PLATFORM_TO_DRIVER_CONFIGURATION_CLP_GUID;
+
+EFI_GUID_STRING
+ (&gEfiPlatformToDriverConfigurationProtocolGuid, "Platform to Driver Configuration Protocol", "UEFI 2.1 Platform to Driver Configuration Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.h b/EDK/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.h
new file mode 100644
index 0000000..c3663ca
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.h
@@ -0,0 +1,173 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ PlatformToDriverConfiguration.h
+
+Abstract:
+
+ UEFI Platform to Driver Configuration Protocol
+
+Revision History:
+
+--*/
+
+#ifndef _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_H_
+#define _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_H_
+
+//
+// Global ID for the Platform to Driver Configuration Protocol
+//
+#define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL_GUID \
+ { \
+ 0x642cd590, 0x8059, 0x4c0a, 0xa9, 0x58, 0xc5, 0xec, 0x07, 0xd2, 0x3c, 0x4b \
+ }
+
+#define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_CLP_GUID \
+ { \
+ 0x345ecc0e, 0x0cb6, 0x4b75, 0xbb, 0x57, 0x1b, 0x12, 0x9c, 0x47, 0x33, 0x3e \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL);
+
+typedef enum {
+ EfiPlatformConfigurationActionNone = 0,
+ EfiPlatformConfigurationActionStopController = 1,
+ EfiPlatformConfigurationActionRestartController = 2,
+ EfiPlatformConfigurationActionRestartPlatform = 3,
+ EfiPlatformConfigurationActionNvramFailed = 4,
+ EfiPlatformConfigurationActionMaximum
+} EFI_PLATFORM_CONFIGURATION_ACTION;
+
+typedef struct {
+ CHAR8 *CLPCommand;
+ UINT32 CLPCommandLength;
+ CHAR8 *CLPReturnString;
+ UINT32 CLPReturnStringLength;
+ UINT8 CLPCmdStatus;
+ UINT8 CLPErrorValue;
+ UINT16 CLPMsgCode;
+} EFI_CONFIGURE_CLP_PARAMETER_BLK;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY) (
+ IN EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle, OPTIONAL
+ IN UINTN *Instance,
+ OUT EFI_GUID **ParameterTypeGuid,
+ OUT VOID **ParameterBlock,
+ OUT UINTN *ParameterBlockSize
+ );
+/*++
+
+ Routine Description:
+ Allows the UEFI driver to query the platform for configuration information
+ needed to complete the drivers Start() operation.
+
+ Arguments:
+ This - A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance.
+ ControllerHandle - The handle the platform will return configuration
+ information about.
+ ChildHandle - The handle of the child controller to set options on.
+ This is an optional parameter that may be NULL. It will
+ be NULL for device drivers, and for a bus drivers that
+ wish to set options for the bus controller. It will not
+ be NULL for a bus driver that wishes to set options for
+ one of its child controllers.
+ Instance - Pointer to the Instance value. Zero means return the first
+ query data. The caller should increment this value by one
+ each time to retrieve successive data.
+ ParameterTypeGuid - An EFI_GUID that defines the contents of ParameterBlock.
+ UEFI drivers must use the ParameterTypeGuid to determine
+ how to parse the ParameterBlock. The caller should not
+ attempt to free ParameterTypeGuid.
+ ParameterBlock - The platform returns a pointer to the ParameterBlock
+ structure which contains details about the configuration
+ parameters specific to the ParameterTypeGuid. This structure
+ is defined based on the protocol and may be different for
+ different protocols. UEFI driver decodes this structure
+ and its contents based on ProtocolGuid. ParameterBlock
+ is allocated by the platform and the platform is responsible
+ for freeing the ParameterBlock after Response is called.
+ ParameterBlockSize - The platform returns the size of the ParameterBlock in bytes.
+
+ Returns:
+ EFI_SUCCESS - The platform return parameter information for ControllerHandle.
+ EFI_NOT_FOUND - No more unread Instance exists.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - Instance is NULL.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to return
+ parameter block information for the controller specified
+ by ControllerHandle and ChildHandle.
+ EFI_OUT_RESOURCES - There are not enough resources available to set the
+ configuration options for the controller specified
+ by ControllerHandle and ChildHandle.
+
+--*/
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE) (
+ IN EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN UINTN *Instance,
+ IN EFI_GUID *ParameterTypeGuid,
+ IN VOID *ParameterBlock,
+ IN UINTN ParameterBlockSize ,
+ IN EFI_PLATFORM_CONFIGURATION_ACTION ConfigurationAction
+ );
+/*++
+
+ Routine Description:
+ Tell the platform what actions where taken by the driver after processing
+ the data returned from Query.
+
+ Arguments:
+ This - A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance.
+ ControllerHandle - The handle the platform will return configuration
+ information about.
+ ChildHandle - The handle of the child controller to set options on.
+ This is an optional parameter that may be NULL. It will
+ be NULL for device drivers, and for a bus drivers that
+ wish to set options for the bus controller. It will not
+ be NULL for a bus driver that wishes to set options for
+ one of its child controllers.
+ Instance - Instance data returned from Query.
+ ParameterTypeGuid - ParameterTypeGuid returned from Query.
+ ParameterBlock - ParameterBlock returned from Query.
+ ParameterBlockSize - The ParameterBlock size returned from Query.
+ ConfigurationAction- The driver tells the platform what action is required
+ for ParameterBlock to take effect.
+
+ Returns:
+ EFI_SUCCESS - The platform return parameter information for ControllerHandle.
+ EFI_NOT_FOUND - Instance was not found.
+ EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
+ EFI_INVALID_PARAMETER - Instance is zero.
+
+--*/
+
+//
+// Interface structure for the Platform to Driver Configuration Protocol
+//
+typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL {
+ EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY Query;
+ EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE Response;
+} EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL;
+
+extern EFI_GUID gEfiPlatformToDriverConfigurationProtocolGuid;
+extern EFI_GUID gEfiPlatformToDriverConfigurationClpGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/PxeBaseCode/PxeBaseCode.c b/EDK/Foundation/Efi/Protocol/PxeBaseCode/PxeBaseCode.c
new file mode 100644
index 0000000..85a1677
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PxeBaseCode/PxeBaseCode.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+ PxeBaseCode.c
+
+Abstract:
+ PxeBaseCode GUID declaration.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (PxeBaseCode)
+
+EFI_GUID gEfiPxeBaseCodeProtocolGuid = EFI_PXE_BASE_CODE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiPxeBaseCodeProtocolGuid, "PXE Base Code Protocol", "EFI PXE Base Code Protocol");
+
+/* EOF - PxeBaseCode.c */
diff --git a/EDK/Foundation/Efi/Protocol/PxeBaseCode/PxeBaseCode.h b/EDK/Foundation/Efi/Protocol/PxeBaseCode/PxeBaseCode.h
new file mode 100644
index 0000000..811892a
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PxeBaseCode/PxeBaseCode.h
@@ -0,0 +1,386 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+ PxeBaseCode.h
+
+Abstract:
+ EFI PXE Base Code Protocol definitions.
+
+--*/
+#ifndef _EFIPXEBC_H
+#define _EFIPXEBC_H
+
+#include "Pxe.h"
+
+//
+// PXE Base Code protocol
+//
+#define EFI_PXE_BASE_CODE_PROTOCOL_GUID \
+ { \
+ 0x03c4e603, 0xac28, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_PXE_BASE_CODE_PROTOCOL);
+
+//
+// Default IP TTL and ToS.
+//
+#define DEFAULT_TTL 16
+#define DEFAULT_ToS 0
+
+//
+// ICMP error format
+//
+typedef struct {
+ UINT8 Type;
+ UINT8 Code;
+ UINT16 Checksum;
+ union {
+ UINT32 reserved;
+ UINT32 Mtu;
+ UINT32 Pointer;
+ struct {
+ UINT16 Identifier;
+ UINT16 Sequence;
+ } Echo;
+ } u;
+ UINT8 Data[494];
+} EFI_PXE_BASE_CODE_ICMP_ERROR;
+
+//
+// TFTP error format
+//
+typedef struct {
+ UINT8 ErrorCode;
+ CHAR8 ErrorString[127];
+} EFI_PXE_BASE_CODE_TFTP_ERROR;
+
+//
+// IP Receive Filter definitions
+//
+#define EFI_PXE_BASE_CODE_MAX_IPCNT 8
+
+typedef struct {
+ UINT8 Filters;
+ UINT8 IpCnt;
+ UINT16 reserved;
+ EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_IPCNT];
+} EFI_PXE_BASE_CODE_IP_FILTER;
+
+#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001
+#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002
+#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004
+#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008
+
+//
+// ARP Cache definitions
+//
+typedef struct {
+ EFI_IP_ADDRESS IpAddr;
+ EFI_MAC_ADDRESS MacAddr;
+} EFI_PXE_BASE_CODE_ARP_ENTRY;
+
+typedef struct {
+ EFI_IP_ADDRESS IpAddr;
+ EFI_IP_ADDRESS SubnetMask;
+ EFI_IP_ADDRESS GwAddr;
+} EFI_PXE_BASE_CODE_ROUTE_ENTRY;
+
+//
+// UDP definitions
+//
+typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT;
+
+#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001
+#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002
+#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004
+#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008
+#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010
+#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020
+
+//
+// Discover() definitions
+//
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_NEC_ESMPRO 4
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_WSoD 5
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_LCCM 6
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_CA_UNICENTER_TNG 7
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW 8
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9 9
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10 10
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11 11
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_NOT_USED_12 12
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_INSTALL 13
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT 14
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO 15
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT 16
+//
+// 17 through 32767 are reserved
+// 32768 through 65279 are for vendor use
+// 65280 through 65534 are reserved
+//
+#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535
+
+#define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK 0x7FFF
+#define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000
+
+//
+// Discover() server list structure.
+//
+typedef struct {
+ UINT16 Type;
+ BOOLEAN AcceptAnyResponse;
+ UINT8 Reserved;
+ EFI_IP_ADDRESS IpAddr;
+} EFI_PXE_BASE_CODE_SRVLIST;
+
+//
+// Discover() information override structure.
+//
+typedef struct {
+ BOOLEAN UseMCast;
+ BOOLEAN UseBCast;
+ BOOLEAN UseUCast;
+ BOOLEAN MustUseList;
+ EFI_IP_ADDRESS ServerMCastIp;
+ UINT16 IpCnt;
+ EFI_PXE_BASE_CODE_SRVLIST SrvList[1];
+} EFI_PXE_BASE_CODE_DISCOVER_INFO;
+
+//
+// Mtftp() definitions
+//
+typedef enum {
+ EFI_PXE_BASE_CODE_TFTP_FIRST,
+ EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE,
+ EFI_PXE_BASE_CODE_TFTP_READ_FILE,
+ EFI_PXE_BASE_CODE_TFTP_WRITE_FILE,
+ EFI_PXE_BASE_CODE_TFTP_READ_DIRECTORY,
+ EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE,
+ EFI_PXE_BASE_CODE_MTFTP_READ_FILE,
+ EFI_PXE_BASE_CODE_MTFTP_READ_DIRECTORY,
+ EFI_PXE_BASE_CODE_MTFTP_LAST
+} EFI_PXE_BASE_CODE_TFTP_OPCODE;
+
+typedef struct {
+ EFI_IP_ADDRESS MCastIp;
+ EFI_PXE_BASE_CODE_UDP_PORT CPort;
+ EFI_PXE_BASE_CODE_UDP_PORT SPort;
+ UINT16 ListenTimeout;
+ UINT16 TransmitTimeout;
+} EFI_PXE_BASE_CODE_MTFTP_INFO;
+
+//
+// PXE Base Code Mode structure
+//
+#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8
+#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8
+
+typedef struct {
+ BOOLEAN Started;
+ BOOLEAN Ipv6Available;
+ BOOLEAN Ipv6Supported;
+ BOOLEAN UsingIpv6;
+ BOOLEAN BisSupported;
+ BOOLEAN BisDetected;
+ BOOLEAN AutoArp;
+ BOOLEAN SendGUID;
+ BOOLEAN DhcpDiscoverValid;
+ BOOLEAN DhcpAckReceived;
+ BOOLEAN ProxyOfferReceived;
+ BOOLEAN PxeDiscoverValid;
+ BOOLEAN PxeReplyReceived;
+ BOOLEAN PxeBisReplyReceived;
+ BOOLEAN IcmpErrorReceived;
+ BOOLEAN TftpErrorReceived;
+ BOOLEAN MakeCallbacks;
+ UINT8 TTL;
+ UINT8 ToS;
+ EFI_IP_ADDRESS StationIp;
+ EFI_IP_ADDRESS SubnetMask;
+ EFI_PXE_BASE_CODE_PACKET DhcpDiscover;
+ EFI_PXE_BASE_CODE_PACKET DhcpAck;
+ EFI_PXE_BASE_CODE_PACKET ProxyOffer;
+ EFI_PXE_BASE_CODE_PACKET PxeDiscover;
+ EFI_PXE_BASE_CODE_PACKET PxeReply;
+ EFI_PXE_BASE_CODE_PACKET PxeBisReply;
+ EFI_PXE_BASE_CODE_IP_FILTER IpFilter;
+ UINT32 ArpCacheEntries;
+ EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES];
+ UINT32 RouteTableEntries;
+ EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES];
+ EFI_PXE_BASE_CODE_ICMP_ERROR IcmpError;
+ EFI_PXE_BASE_CODE_TFTP_ERROR TftpError;
+} EFI_PXE_BASE_CODE_MODE;
+
+//
+// PXE Base Code Interface Function definitions
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_START) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN BOOLEAN UseIpv6
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_STOP) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_DHCP) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN BOOLEAN SortOffers
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_DISCOVER) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN UINT16 Type,
+ IN UINT16 *Layer,
+ IN BOOLEAN UseBis,
+ IN OUT EFI_PXE_BASE_CODE_DISCOVER_INFO * Info OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_MTFTP) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation,
+ IN OUT VOID *BufferPtr OPTIONAL,
+ IN BOOLEAN Overwrite,
+ IN OUT UINT64 *BufferSize,
+ IN UINTN *BlockSize OPTIONAL,
+ IN EFI_IP_ADDRESS * ServerIp,
+ IN UINT8 *Filename,
+ IN EFI_PXE_BASE_CODE_MTFTP_INFO * Info OPTIONAL,
+ IN BOOLEAN DontUseBuffer
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_UDP_WRITE) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN UINT16 OpFlags,
+ IN EFI_IP_ADDRESS * DestIp,
+ IN EFI_PXE_BASE_CODE_UDP_PORT * DestPort,
+ IN EFI_IP_ADDRESS * GatewayIp, OPTIONAL
+ IN EFI_IP_ADDRESS * SrcIp, OPTIONAL
+ IN OUT EFI_PXE_BASE_CODE_UDP_PORT * SrcPort, OPTIONAL
+ IN UINTN *HeaderSize, OPTIONAL
+ IN VOID *HeaderPtr, OPTIONAL
+ IN UINTN *BufferSize,
+ IN VOID *BufferPtr
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_UDP_READ) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN UINT16 OpFlags,
+ IN OUT EFI_IP_ADDRESS * DestIp, OPTIONAL
+ IN OUT EFI_PXE_BASE_CODE_UDP_PORT * DestPort, OPTIONAL
+ IN OUT EFI_IP_ADDRESS * SrcIp, OPTIONAL
+ IN OUT EFI_PXE_BASE_CODE_UDP_PORT * SrcPort, OPTIONAL
+ IN UINTN *HeaderSize, OPTIONAL
+ IN VOID *HeaderPtr, OPTIONAL
+ IN OUT UINTN *BufferSize,
+ IN VOID *BufferPtr
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN EFI_PXE_BASE_CODE_IP_FILTER * NewFilter
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_ARP) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN EFI_IP_ADDRESS * IpAddr,
+ IN EFI_MAC_ADDRESS * MacAddr OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN BOOLEAN *NewAutoArp, OPTIONAL
+ IN BOOLEAN *NewSendGUID, OPTIONAL
+ IN UINT8 *NewTTL, OPTIONAL
+ IN UINT8 *NewToS, OPTIONAL
+ IN BOOLEAN *NewMakeCallback OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ IN EFI_IP_ADDRESS * NewStationIp, OPTIONAL
+ IN EFI_IP_ADDRESS * NewSubnetMask OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL * This,
+ BOOLEAN *NewDhcpDiscoverValid, OPTIONAL
+ BOOLEAN *NewDhcpAckReceived, OPTIONAL
+ BOOLEAN *NewProxyOfferReceived, OPTIONAL
+ BOOLEAN *NewPxeDiscoverValid, OPTIONAL
+ BOOLEAN *NewPxeReplyReceived, OPTIONAL
+ BOOLEAN *NewPxeBisReplyReceived, OPTIONAL
+ IN EFI_PXE_BASE_CODE_PACKET * NewDhcpDiscover, OPTIONAL
+ IN EFI_PXE_BASE_CODE_PACKET * NewDhcpAck, OPTIONAL
+ IN EFI_PXE_BASE_CODE_PACKET * NewProxyOffer, OPTIONAL
+ IN EFI_PXE_BASE_CODE_PACKET * NewPxeDiscover, OPTIONAL
+ IN EFI_PXE_BASE_CODE_PACKET * NewPxeReply, OPTIONAL
+ IN EFI_PXE_BASE_CODE_PACKET * NewPxeBisReply OPTIONAL
+ );
+
+//
+// PXE Base Code Protocol structure
+//
+#define EFI_PXE_BASE_CODE_INTERFACE_REVISION 0x00010000
+
+typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
+ UINT64 Revision;
+ EFI_PXE_BASE_CODE_START Start;
+ EFI_PXE_BASE_CODE_STOP Stop;
+ EFI_PXE_BASE_CODE_DHCP Dhcp;
+ EFI_PXE_BASE_CODE_DISCOVER Discover;
+ EFI_PXE_BASE_CODE_MTFTP Mtftp;
+ EFI_PXE_BASE_CODE_UDP_WRITE UdpWrite;
+ EFI_PXE_BASE_CODE_UDP_READ UdpRead;
+ EFI_PXE_BASE_CODE_SET_IP_FILTER SetIpFilter;
+ EFI_PXE_BASE_CODE_ARP Arp;
+ EFI_PXE_BASE_CODE_SET_PARAMETERS SetParameters;
+ EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp;
+ EFI_PXE_BASE_CODE_SET_PACKETS SetPackets;
+ EFI_PXE_BASE_CODE_MODE *Mode;
+} EFI_PXE_BASE_CODE_PROTOCOL;
+
+extern EFI_GUID gEfiPxeBaseCodeProtocolGuid;
+
+#endif /* _EFIPXEBC_H */
+
+/* EOF - PxeBaseCode.h */
diff --git a/EDK/Foundation/Efi/Protocol/PxeBaseCodeCallBack/PxeBaseCodeCallBack.c b/EDK/Foundation/Efi/Protocol/PxeBaseCodeCallBack/PxeBaseCodeCallBack.c
new file mode 100644
index 0000000..560a73d
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PxeBaseCodeCallBack/PxeBaseCodeCallBack.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+ PxeBaseCodeCallBack.c
+
+Abstract:
+ PXE BaseCode Callback GUID declaration.
+
+--*/
+
+#include "EfiSpec.h"
+
+#include EFI_PROTOCOL_DEFINITION (PxeBaseCodeCallBack)
+
+EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid = EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (&gEfiPxeBaseCodeCallbackProtocolGuid, "PXE Base Code Callback Protocol", "EFI PXE Base Code Callback Protocol");
+
+/* EOF - PxeBaseCodeCallBack.c */
diff --git a/EDK/Foundation/Efi/Protocol/PxeBaseCodeCallBack/PxeBaseCodeCallBack.h b/EDK/Foundation/Efi/Protocol/PxeBaseCodeCallBack/PxeBaseCodeCallBack.h
new file mode 100644
index 0000000..6e7c0ab
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/PxeBaseCodeCallBack/PxeBaseCodeCallBack.h
@@ -0,0 +1,82 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+ PxeBaseCodeCallBack.h
+
+Abstract:
+ EFI PXE Base Code CallBack Protocol
+
+--*/
+
+#ifndef _PXE_BASE_CODE_CALLBACK_H_
+#define _PXE_BASE_CODE_CALLBACK_H_
+
+#include "Pxe.h"
+
+//
+// Call Back Definitions
+//
+#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID \
+ { \
+ 0x245dca21, 0xfb7b, 0x11d3, 0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+//
+// Revision Number
+//
+#define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION 0x00010000
+
+//
+// Protocol definition
+//
+EFI_FORWARD_DECLARATION (EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL);
+
+typedef enum {
+ EFI_PXE_BASE_CODE_FUNCTION_FIRST,
+ EFI_PXE_BASE_CODE_FUNCTION_DHCP,
+ EFI_PXE_BASE_CODE_FUNCTION_DISCOVER,
+ EFI_PXE_BASE_CODE_FUNCTION_MTFTP,
+ EFI_PXE_BASE_CODE_FUNCTION_UDP_WRITE,
+ EFI_PXE_BASE_CODE_FUNCTION_UDP_READ,
+ EFI_PXE_BASE_CODE_FUNCTION_ARP,
+ EFI_PXE_BASE_CODE_FUNCTION_IGMP,
+ EFI_PXE_BASE_CODE_FUNCTION_TCP_WRITE,
+ EFI_PXE_BASE_CODE_FUNCTION_TCP_READ,
+ EFI_PXE_BASE_CODE_PXE_FUNCTION_LAST
+} EFI_PXE_BASE_CODE_FUNCTION;
+
+typedef enum {
+ EFI_PXE_BASE_CODE_CALLBACK_STATUS_FIRST,
+ EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,
+ EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT,
+ EFI_PXE_BASE_CODE_CALLBACK_STATUS_LAST
+} EFI_PXE_BASE_CODE_CALLBACK_STATUS;
+
+typedef EFI_PXE_BASE_CODE_CALLBACK_STATUS (EFIAPI *EFI_PXE_CALLBACK)
+ (
+ IN EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL * This,
+ IN EFI_PXE_BASE_CODE_FUNCTION Function,
+ IN BOOLEAN Received,
+ IN UINT32 PacketLen,
+ IN EFI_PXE_BASE_CODE_PACKET * Packet OPTIONAL
+ );
+
+typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL {
+ UINT64 Revision;
+ EFI_PXE_CALLBACK Callback;
+} EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;
+
+extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid;
+
+#endif /* _EFIPXEBC_H */
+
+/* EOF - PxeBaseCodeCallBack.h */
diff --git a/EDK/Foundation/Efi/Protocol/ScsiIo/ScsiIo.c b/EDK/Foundation/Efi/Protocol/ScsiIo/ScsiIo.c
new file mode 100644
index 0000000..873ff4c
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ScsiIo/ScsiIo.c
@@ -0,0 +1,26 @@
+/*++
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ScsiIo.c
+
+Abstract:
+ EFI_SCSI_IO_PROTOCOL as defined in UEFI 2.0.
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (ScsiIo)
+
+EFI_GUID gEfiScsiIoProtocolGuid = EFI_SCSI_IO_PROTOCOL_GUID;
+EFI_GUID_STRING(&gEfiScsiIoProtocolGuid, "SCSI IO protoco", "UEFI 2.0 SCSI IO protocol");
diff --git a/EDK/Foundation/Efi/Protocol/ScsiIo/ScsiIo.h b/EDK/Foundation/Efi/Protocol/ScsiIo/ScsiIo.h
new file mode 100644
index 0000000..cdeb117
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ScsiIo/ScsiIo.h
@@ -0,0 +1,256 @@
+/*++
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ScsiIo.h
+
+Abstract:
+ EFI_SCSI_IO_PROTOCOL as defined in UEFI 2.0.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_SCSI_IO_PROTOCOL_H__
+#define __EFI_SCSI_IO_PROTOCOL_H__
+
+#define EFI_SCSI_IO_PROTOCOL_GUID \
+ { \
+ 0x932f47e6, 0x2362, 0x4002, {0x80, 0x3e, 0x3c, 0xd5, 0x4b, 0x13, 0x8f, 0x85 } \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+typedef struct _EFI_SCSI_IO_PROTOCOL EFI_SCSI_IO_PROTOCOL;
+
+//
+// SCSI Data Direction definition
+//
+#define EFI_SCSI_IO_DATA_DIRECTION_READ 0
+#define EFI_SCSI_IO_DATA_DIRECTION_WRITE 1
+#define EFI_SCSI_IO_DATA_DIRECTION_BIDIRECTIONAL 2
+
+//
+// SCSI Host Adapter Status definition
+//
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_OK 0x00
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND 0x09 // timeout when processing the command
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_TIMEOUT 0x0b // timeout when waiting for the command processing
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_MESSAGE_REJECT 0x0d // a message reject was received when processing command
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_BUS_RESET 0x0e // a bus reset was detected
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_PARITY_ERROR 0x0f
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED 0x10 // the adapter failed in issuing request sense command
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT 0x11 // selection timeout
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN 0x12 // data overrun or data underrun
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_BUS_FREE 0x13 // Unexepected bus free
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14 // Target bus phase sequence failure
+#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_OTHER 0x7f
+
+
+//
+// SCSI Target Status definition
+//
+#define EFI_SCSI_IO_STATUS_TARGET_GOOD 0x00
+#define EFI_SCSI_IO_STATUS_TARGET_CHECK_CONDITION 0x02 // check condition
+#define EFI_SCSI_IO_STATUS_TARGET_CONDITION_MET 0x04 // condition met
+#define EFI_SCSI_IO_STATUS_TARGET_BUSY 0x08 // busy
+#define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE 0x10 // intermediate
+#define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14 // intermediate-condition met
+#define EFI_SCSI_IO_STATUS_TARGET_RESERVATION_CONFLICT 0x18 // reservation conflict
+#define EFI_SCSI_IO_STATUS_TARGET_COMMOND_TERMINATED 0x22 // command terminated
+#define EFI_SCSI_IO_STATUS_TARGET_QUEUE_FULL 0x28 // queue full
+
+typedef struct {
+ UINT64 Timeout;
+ VOID *InDataBuffer;
+ VOID *OutDataBuffer;
+ VOID *SenseData;
+ VOID *Cdb;
+ UINT32 InTransferLength;
+ UINT32 OutTransferLength;
+ UINT8 CdbLength;
+ UINT8 DataDirection;
+ UINT8 HostAdapterStatus;
+ UINT8 TargetStatus;
+ UINT8 SenseDataLength;
+} EFI_SCSI_IO_SCSI_REQUEST_PACKET;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE) (
+ IN EFI_SCSI_IO_PROTOCOL *This,
+ OUT UINT8 *DeviceType
+ )
+/*++
+
+ Routine Description:
+ Retrieves the device type information of the SCSI Controller.
+
+ Arguments:
+ This - Protocol instance pointer.
+ DeviceType - A pointer to the device type information
+ retrieved from the SCSI Controller.
+
+ Returns:
+ EFI_SUCCESS - Retrieves the device type information successfully.
+ EFI_INVALID_PARAMETER - The DeviceType is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION) (
+ IN EFI_SCSI_IO_PROTOCOL *This,
+ IN OUT UINT8 **Target,
+ OUT UINT64 *Lun
+ )
+/*++
+
+ Routine Description:
+ Retrieves the device location in the SCSI channel.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Target - A pointer to the Target Array which represents ID of a SCSI device
+ on the SCSI channel.
+ Lun - A pointer to the LUN of the SCSI device on
+ the SCSI channel.
+
+ Returns:
+ EFI_SUCCESS - Retrieves the device location successfully.
+ EFI_INVALID_PARAMETER - The Target or Lun is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_BUS) (
+ IN EFI_SCSI_IO_PROTOCOL *This
+ )
+/*++
+
+ Routine Description:
+ Resets the SCSI Bus that the SCSI Controller is attached to.
+
+ Arguments:
+ This - This Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - The SCSI bus is reset successfully.
+ EFI_DEVICE_ERROR - Errors encountered when resetting the SCSI bus.
+ EFI_UNSUPPORTED - The bus reset operation is not supported by the
+ SCSI Host Controller.
+ EFI_TIMEOUT - A timeout occurred while attempting to reset
+ the SCSI bus.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_DEVICE) (
+ IN EFI_SCSI_IO_PROTOCOL *This
+ )
+/*++
+
+ Routine Description:
+ Resets the SCSI Controller that the device handle specifies.
+
+ Arguments:
+ This - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - Reset the SCSI controller successfully.
+ EFI_DEVICE_ERROR - Errors are encountered when resetting the
+ SCSI Controller.
+ EFI_UNSUPPORTED - The SCSI bus does not support a device
+ reset operation.
+ EFI_TIMEOUT - A timeout occurred while attempting to
+ reset the SCSI Controller.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND) (
+ IN EFI_SCSI_IO_PROTOCOL *This,
+ IN OUT EFI_SCSI_IO_SCSI_REQUEST_PACKET *Packet,
+ IN EFI_EVENT Event OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Sends a SCSI Request Packet to the SCSI Controller for execution.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Packet - The SCSI request packet to send to the SCSI
+ Controller specified by the device handle.
+ Event - If the SCSI bus where the SCSI device is attached
+ does not support non-blocking I/O, then Event is
+ ignored, and blocking I/O is performed.
+ If Event is NULL, then blocking I/O is performed.
+ If Event is not NULL and non-blocking I/O is
+ supported, then non-blocking I/O is performed,
+ and Event will be signaled when the SCSI Request
+ Packet completes.
+
+ Returns:
+ EFI_SUCCESS - The SCSI Request Packet was sent by the host
+ successfully, and TransferLength bytes were
+ transferred to/from DataBuffer.See
+ HostAdapterStatus, TargetStatus,
+ SenseDataLength, and SenseData in that order
+ for additional status information.
+ EFI_BAD_BUFFER_SIZE - The SCSI Request Packet was executed,
+ but the entire DataBuffer could not be transferred.
+ The actual number of bytes transferred is returned
+ in TransferLength. See HostAdapterStatus,
+ TargetStatus, SenseDataLength, and SenseData in
+ that order for additional status information.
+ EFI_NOT_READY - The SCSI Request Packet could not be sent because
+ there are too many SCSI Command Packets already
+ queued.The caller may retry again later.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to send
+ the SCSI Request Packet. See HostAdapterStatus,
+ TargetStatus, SenseDataLength, and SenseData in
+ that order for additional status information.
+ EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid.
+ The SCSI Request Packet was not sent, so no
+ additional status information is available.
+ EFI_UNSUPPORTED - The command described by the SCSI Request Packet
+ is not supported by the SCSI initiator(i.e., SCSI
+ Host Controller). The SCSI Request Packet was not
+ sent, so no additional status information is
+ available.
+ EFI_TIMEOUT - A timeout occurred while waiting for the SCSI
+ Request Packet to execute. See HostAdapterStatus,
+ TargetStatus, SenseDataLength, and SenseData in
+ that order for additional status information.
+--*/
+;
+
+struct _EFI_SCSI_IO_PROTOCOL {
+ EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE GetDeviceType;
+ EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION GetDeviceLocation;
+ EFI_SCSI_IO_PROTOCOL_RESET_BUS ResetBus;
+ EFI_SCSI_IO_PROTOCOL_RESET_DEVICE ResetDevice;
+ EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND ExecuteScsiCommand;
+ UINT32 IoAlign;
+};
+
+extern EFI_GUID gEfiScsiIoProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/ScsiPassThru/ScsiPassThru.c b/EDK/Foundation/Efi/Protocol/ScsiPassThru/ScsiPassThru.c
new file mode 100644
index 0000000..5089a42
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ScsiPassThru/ScsiPassThru.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ScsiPassThru.c
+
+Abstract:
+
+ SCSI Pass Through protocol.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (ScsiPassThru)
+
+EFI_GUID gEfiScsiPassThruProtocolGuid = EFI_SCSI_PASS_THRU_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiScsiPassThruProtocolGuid, "SCSI Pass Through Protocol", "EFI 1.0 SCSI Pass Through protocol");
diff --git a/EDK/Foundation/Efi/Protocol/ScsiPassThru/ScsiPassThru.h b/EDK/Foundation/Efi/Protocol/ScsiPassThru/ScsiPassThru.h
new file mode 100644
index 0000000..61463af
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ScsiPassThru/ScsiPassThru.h
@@ -0,0 +1,332 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ScsiPassThru.h
+
+Abstract:
+
+ SCSI Pass Through protocol.
+
+--*/
+
+#ifndef __SCSI_PT_H__
+#define __SCSI_PT_H__
+
+#define EFI_SCSI_PASS_THRU_PROTOCOL_GUID \
+ { \
+ 0xa59e8fcf, 0xbda0, 0x43bb, 0x90, 0xb1, 0xd3, 0x73, 0x2e, 0xca, 0xa8, 0x77 \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_SCSI_PASS_THRU_PROTOCOL);
+
+#define EFI_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001
+#define EFI_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002
+#define EFI_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004
+
+//
+// SCSI Host Adapter Status definition
+//
+#define EFI_SCSI_STATUS_HOST_ADAPTER_OK 0x00
+#define EFI_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND 0x09 // timeout when processing the command
+#define EFI_SCSI_STATUS_HOST_ADAPTER_TIMEOUT 0x0b // timeout when waiting for the command processing
+#define EFI_SCSI_STATUS_HOST_ADAPTER_MESSAGE_REJECT 0x0d // a message reject was received when processing command
+#define EFI_SCSI_STATUS_HOST_ADAPTER_BUS_RESET 0x0e // a bus reset was detected
+#define EFI_SCSI_STATUS_HOST_ADAPTER_PARITY_ERROR 0x0f
+#define EFI_SCSI_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED 0x10 // the adapter failed in issuing request sense command
+#define EFI_SCSI_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT 0x11 // selection timeout
+#define EFI_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN 0x12 // data overrun or data underrun
+#define EFI_SCSI_STATUS_HOST_ADAPTER_BUS_FREE 0x13 // Unexepected bus free
+#define EFI_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14 // Target bus phase sequence failure
+#define EFI_SCSI_STATUS_HOST_ADAPTER_OTHER 0x7f
+
+//
+// SCSI Target Status definition
+//
+#define EFI_SCSI_STATUS_TARGET_GOOD 0x00
+#define EFI_SCSI_STATUS_TARGET_CHECK_CONDITION 0x02 // check condition
+#define EFI_SCSI_STATUS_TARGET_CONDITION_MET 0x04 // condition met
+#define EFI_SCSI_STATUS_TARGET_BUSY 0x08 // busy
+#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE 0x10 // intermediate
+#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14 // intermediate-condition met
+#define EFI_SCSI_STATUS_TARGET_RESERVATION_CONFLICT 0x18 // reservation conflict
+#define EFI_SCSI_STATUS_TARGET_COMMOND_TERMINATED 0x22 // command terminated
+#define EFI_SCSI_STATUS_TARGET_QUEUE_FULL 0x28 // queue full
+typedef struct {
+ UINT64 Timeout;
+ VOID *DataBuffer;
+ VOID *SenseData;
+ VOID *Cdb;
+ UINT32 TransferLength;
+ UINT8 CdbLength;
+ UINT8 DataDirection;
+ UINT8 HostAdapterStatus;
+ UINT8 TargetStatus;
+ UINT8 SenseDataLength;
+} EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET;
+
+typedef struct {
+ CHAR16 *ControllerName;
+ CHAR16 *ChannelName;
+ UINT32 AdapterId;
+ UINT32 Attributes;
+ UINT32 IoAlign;
+} EFI_SCSI_PASS_THRU_MODE;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_PASS_THRU_PASSTHRU) (
+ IN EFI_SCSI_PASS_THRU_PROTOCOL * This,
+ IN UINT32 Target,
+ IN UINT64 Lun,
+ IN OUT EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET * Packet,
+ IN EFI_EVENT Event OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Sends a SCSI Request Packet to a SCSI device that is attached to
+ the SCSI channel. This function supports both blocking I/O and
+ non-blocking I/O. The blocking I/O functionality is required,
+ and the non-blocking I/O functionality is optional.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Target - The Target ID of the SCSI device to
+ send the SCSI Request Packet.
+ Lun - The LUN of the SCSI device to send the
+ SCSI Request Packet.
+ Packet - A pointer to the SCSI Request Packet to send
+ to the SCSI device specified by Target and Lun.
+ Event - If non-blocking I/O is not supported then Event
+ is ignored, and blocking I/O is performed.
+ If Event is NULL, then blocking I/O is performed.
+ If Event is not NULL and non blocking I/O is
+ supported, then non-blocking I/O is performed,
+ and Event will be signaled when the SCSI Request
+ Packet completes
+
+ Returns:
+ EFI_SUCCESSThe - SCSI Request Packet was sent by the host, and
+ TransferLength bytes were transferred to/from
+ DataBuffer.See HostAdapterStatus, TargetStatus,
+ SenseDataLength,and SenseData in that order
+ for additional status information.
+ EFI_BAD_BUFFER_SIZE - The SCSI Request Packet was executed, but the
+ entire DataBuffer could not be transferred.
+ The actual number of bytes transferred is returned
+ in TransferLength. See HostAdapterStatus,
+ TargetStatus, SenseDataLength, and SenseData in
+ that order for additional status information.
+ EFI_NOT_READY - The SCSI Request Packet could not be sent because
+ there are too many SCSI Request Packets already
+ queued. The caller may retry again later.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to send
+ the SCSI Request Packet. See HostAdapterStatus,
+ TargetStatus, SenseDataLength, and SenseData in
+ that order for additional status information.
+ EFI_INVALID_PARAMETER - Target, Lun, or the contents of ScsiRequestPacket
+ are invalid. The SCSI Request Packet was not sent,
+ so no additional status information is available.
+ EFI_UNSUPPORTED - The command described by the SCSI Request Packet
+ is not supported by the host adapter. The SCSI
+ Request Packet was not sent, so no additional
+ status information is available.
+ EFI_TIMEOUT - A timeout occurred while waiting for the SCSI
+ Request Packet to execute. See HostAdapterStatus,
+ TargetStatus, SenseDataLength, and SenseData in
+ that order for additional status information.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_PASS_THRU_GET_NEXT_DEVICE) (
+ IN EFI_SCSI_PASS_THRU_PROTOCOL * This,
+ IN OUT UINT32 *Target,
+ IN OUT UINT64 *Lun
+ )
+/*++
+
+ Routine Description:
+ Used to retrieve the list of legal Target IDs for SCSI devices
+ on a SCSI channel.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Target - On input, a pointer to the Target ID of a
+ SCSI device present on the SCSI channel.
+ On output, a pointer to the Target ID of
+ the next SCSI device present on a SCSI channel.
+ An input value of 0xFFFFFFFF retrieves the
+ Target ID of the first SCSI device present on
+ a SCSI channel.
+ Lun - On input, a pointer to the LUN of a SCSI device
+ present on the SCSI channel.On output, a pointer
+ to the LUN of the next SCSI device present on a
+ SCSI channel.
+ Returns:
+ EFI_SUCCESS - The Target ID of the next SCSI device on the SCSI
+ channel was returned in Target and Lun.
+ EFI_NOT_FOUND - There are no more SCSI devices on this SCSI channel.
+ EFI_INVALID_PARAMETER - Target is not 0xFFFFFFFF, and Target and Lun were
+ not returned on a previous call to GetNextDevice().
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_PASS_THRU_BUILD_DEVICE_PATH) (
+ IN EFI_SCSI_PASS_THRU_PROTOCOL * This,
+ IN UINT32 Target,
+ IN UINT64 Lun,
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
+ )
+/*++
+
+ Routine Description:
+ Used to allocate and build a device path node for a SCSI device
+ on a SCSI channel.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Target - The Target ID of the SCSI device for which
+ a device path node is to be allocated and built.
+ Lun - The LUN of the SCSI device for which a device
+ path node is to be allocated and built.
+ DevicePath - A pointer to a single device path node that
+ describes the SCSI device specified by
+ Target and Lun. This function is responsible
+ for allocating the buffer DevicePath with the boot
+ service AllocatePool(). It is the caller's
+ responsibility to free DevicePath when the caller
+ is finished with DevicePath.
+ Returns:
+ EFI_SUCCESS - The device path node that describes the SCSI device
+ specified by Target and Lun was allocated and
+ returned in DevicePath.
+ EFI_NOT_FOUND - The SCSI devices specified by Target and Lun does
+ not exist on the SCSI channel.
+ EFI_INVALID_PARAMETER - DevicePath is NULL.
+ EFI_OUT_OF_RESOURCES - There are not enough resources to allocate
+ DevicePath.
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_PASS_THRU_GET_TARGET_LUN) (
+ IN EFI_SCSI_PASS_THRU_PROTOCOL * This,
+ IN EFI_DEVICE_PATH_PROTOCOL * DevicePath,
+ OUT UINT32 *Target,
+ OUT UINT64 *Lun
+ )
+/*++
+
+ Routine Description:
+ Used to translate a device path node to a Target ID and LUN.
+
+ Arguments:
+ This - Protocol instance pointer.
+ DevicePath - A pointer to the device path node that
+ describes a SCSI device on the SCSI channel.
+ Target - A pointer to the Target ID of a SCSI device
+ on the SCSI channel.
+ Lun - A pointer to the LUN of a SCSI device on
+ the SCSI channel.
+ Returns:
+ EFI_SUCCESS - DevicePath was successfully translated to a
+ Target ID and LUN, and they were returned
+ in Target and Lun.
+ EFI_INVALID_PARAMETER - DevicePath is NULL.
+ EFI_INVALID_PARAMETER - Target is NULL.
+ EFI_INVALID_PARAMETER - Lun is NULL.
+ EFI_UNSUPPORTED - This driver does not support the device path
+ node type in DevicePath.
+ EFI_NOT_FOUND - A valid translation from DevicePath to a
+ Target ID and LUN does not exist.
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_PASS_THRU_RESET_CHANNEL) (
+ IN EFI_SCSI_PASS_THRU_PROTOCOL * This
+ )
+/*++
+
+ Routine Description:
+ Resets a SCSI channel.This operation resets all the
+ SCSI devices connected to the SCSI channel.
+
+ Arguments:
+ This - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - The SCSI channel was reset.
+ EFI_UNSUPPORTED - The SCSI channel does not support
+ a channel reset operation.
+ EFI_DEVICE_ERROR - A device error occurred while
+ attempting to reset the SCSI channel.
+ EFI_TIMEOUT - A timeout occurred while attempting
+ to reset the SCSI channel.
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SCSI_PASS_THRU_RESET_TARGET) (
+ IN EFI_SCSI_PASS_THRU_PROTOCOL * This,
+ IN UINT32 Target,
+ IN UINT64 Lun
+ )
+/*++
+
+ Routine Description:
+ Resets a SCSI device that is connected to a SCSI channel.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Target - The Target ID of the SCSI device to reset.
+ Lun - The LUN of the SCSI device to reset.
+
+ Returns:
+ EFI_SUCCESS - The SCSI device specified by Target and
+ Lun was reset.
+ EFI_UNSUPPORTED - The SCSI channel does not support a target
+ reset operation.
+ EFI_INVALID_PARAMETER - Target or Lun are invalid.
+ EFI_DEVICE_ERROR - A device error occurred while attempting
+ to reset the SCSI device specified by Target
+ and Lun.
+ EFI_TIMEOUT - A timeout occurred while attempting to reset
+ the SCSI device specified by Target and Lun.
+--*/
+;
+
+typedef struct _EFI_SCSI_PASS_THRU_PROTOCOL {
+ EFI_SCSI_PASS_THRU_MODE *Mode;
+ EFI_SCSI_PASS_THRU_PASSTHRU PassThru;
+ EFI_SCSI_PASS_THRU_GET_NEXT_DEVICE GetNextDevice;
+ EFI_SCSI_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath;
+ EFI_SCSI_PASS_THRU_GET_TARGET_LUN GetTargetLun;
+ EFI_SCSI_PASS_THRU_RESET_CHANNEL ResetChannel;
+ EFI_SCSI_PASS_THRU_RESET_TARGET ResetTarget;
+} EFI_SCSI_PASS_THRU_PROTOCOL;
+
+extern EFI_GUID gEfiScsiPassThruProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/ScsiPassThruExt/ScsiPassThruExt.c b/EDK/Foundation/Efi/Protocol/ScsiPassThruExt/ScsiPassThruExt.c
new file mode 100644
index 0000000..7163ac8
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ScsiPassThruExt/ScsiPassThruExt.c
@@ -0,0 +1,28 @@
+/*++
+
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ScsiPassThruExt.c
+
+Abstract:
+ EFI_EXT_SCSI_PASS_THRU_PROTOCOL as defined in UEFI 2.0.
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (ScsiPassThruExt)
+
+EFI_GUID gEfiExtScsiPassThruProtocolGuid = EFI_EXT_SCSI_PASS_THRU_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiExtScsiPassThruProtocolGuid, "Extended Scsi Pass Thru", "UEFI 2.0 Extended SCSI Pass Thru protocol");
diff --git a/EDK/Foundation/Efi/Protocol/ScsiPassThruExt/ScsiPassThruExt.h b/EDK/Foundation/Efi/Protocol/ScsiPassThruExt/ScsiPassThruExt.h
new file mode 100644
index 0000000..0b5178d
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ScsiPassThruExt/ScsiPassThruExt.h
@@ -0,0 +1,365 @@
+/*++
+
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ScsiPassThruExt.h
+
+Abstract:
+ EFI_EXT_SCSI_PASS_THRU_PROTOCOL as defined in UEFI 2.0.
+
+Revision History
+
+--*/
+
+#ifndef __EXT_SCSI_PASS_THROUGH_PROTOCOL_H__
+#define __EXT_SCSI_PASS_THROUGH_PROTOCOL_H__
+
+#define EFI_EXT_SCSI_PASS_THRU_PROTOCOL_GUID \
+ { \
+ 0x143b7632, 0xb81b, 0x4cb7, {0xab, 0xd3, 0xb6, 0x25, 0xa5, 0xb9, 0xbf, 0xfe } \
+ }
+
+typedef struct _EFI_EXT_SCSI_PASS_THRU_PROTOCOL EFI_EXT_SCSI_PASS_THRU_PROTOCOL;
+
+#define TARGET_MAX_BYTES 0x10
+
+#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001
+#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002
+#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004
+
+//
+// DataDirection
+//
+#define EFI_EXT_SCSI_DATA_DIRECTION_READ 0
+#define EFI_EXT_SCSI_DATA_DIRECTION_WRITE 1
+#define EFI_EXT_SCSI_DATA_DIRECTION_BIDIRECTIONAL 2
+//
+// HostAdapterStatus
+//
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OK 0x00
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND 0x09
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT 0x0b
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_MESSAGE_REJECT 0x0d
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_RESET 0x0e
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PARITY_ERROR 0x0f
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED 0x10
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT 0x11
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN 0x12
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_FREE 0x13
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14
+#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OTHER 0x7f
+//
+// TargetStatus
+//
+#define EFI_EXT_SCSI_STATUS_TARGET_GOOD 0x00
+#define EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION 0x02
+#define EFI_EXT_SCSI_STATUS_TARGET_CONDITION_MET 0x04
+#define EFI_EXT_SCSI_STATUS_TARGET_BUSY 0x08
+#define EFI_EXT_SCSI_STATUS_TARGET_INTERMEDIATE 0x10
+#define EFI_EXT_SCSI_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14
+#define EFI_EXT_SCSI_STATUS_TARGET_RESERVATION_CONFLICT 0x18
+#define EFI_EXT_SCSI_STATUS_TARGET_TASK_SET_FULL 0x28
+#define EFI_EXT_SCSI_STATUS_TARGET_ACA_ACTIVE 0x30
+#define EFI_EXT_SCSI_STATUS_TARGET_TASK_ABORTED 0x40
+
+typedef struct {
+ UINT32 AdapterId;
+ UINT32 Attributes;
+ UINT32 IoAlign;
+} EFI_EXT_SCSI_PASS_THRU_MODE;
+
+typedef struct {
+ UINT64 Timeout;
+ VOID *InDataBuffer;
+ VOID *OutDataBuffer;
+ VOID *SenseData;
+ VOID *Cdb;
+ UINT32 InTransferLength;
+ UINT32 OutTransferLength;
+ UINT8 CdbLength;
+ UINT8 DataDirection;
+ UINT8 HostAdapterStatus;
+ UINT8 TargetStatus;
+ UINT8 SenseDataLength;
+} EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_PASSTHRU) (
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN UINT8 *Target,
+ IN UINT64 Lun,
+ IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
+ IN EFI_EVENT Event OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function
+ supports both blocking I/O and nonblocking I/O. The blocking I/O functionality is required, and the
+ nonblocking I/O functionality is optional.
+
+ Arguments:
+ This - A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
+ Target - The Target is an array of size TARGET_MAX_BYTES and it represents
+ the id of the SCSI device to send the SCSI Request Packet. Each
+ transport driver may chose to utilize a subset of this size to suit the needs
+ of transport target representation. For example, a Fibre Channel driver
+ may use only 8 bytes (WWN) to represent an FC target.
+ Lun - The LUN of the SCSI device to send the SCSI Request Packet.
+ Packet - A pointer to the SCSI Request Packet to send to the SCSI device
+ specified by Target and Lun.
+ Event - If nonblocking I/O is not supported then Event is ignored, and blocking
+ I/O is performed. If Event is NULL, then blocking I/O is performed. If
+ Event is not NULL and non blocking I/O is supported, then
+ nonblocking I/O is performed, and Event will be signaled when the
+ SCSI Request Packet completes.
+
+ Returns:
+ EFI_SUCCESS - The SCSI Request Packet was sent by the host. For bi-directional
+ commands, InTransferLength bytes were transferred from
+ InDataBuffer. For write and bi-directional commands,
+ OutTransferLength bytes were transferred by
+ OutDataBuffer.
+ EFI_BAD_BUFFER_SIZE - The SCSI Request Packet was not executed. The number of bytes that
+ could be transferred is returned in InTransferLength. For write
+ and bi-directional commands, OutTransferLength bytes were
+ transferred by OutDataBuffer.
+ EFI_NOT_READY - The SCSI Request Packet could not be sent because there are too many
+ SCSI Request Packets already queued. The caller may retry again later.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to send the SCSI Request
+ Packet.
+ EFI_INVALID_PARAMETER- Target, Lun, or the contents of ScsiRequestPacket are invalid.
+ EFI_UNSUPPORTED - The command described by the SCSI Request Packet is not supported
+ by the host adapter. This includes the case of Bi-directional SCSI
+ commands not supported by the implementation. The SCSI Request
+ Packet was not sent, so no additional status information is available.
+ EFI_TIMEOUT - A timeout occurred while waiting for the SCSI Request Packet to execute.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET_LUN) (
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN OUT UINT8 **Target,
+ IN OUT UINT64 *Lun
+ )
+/*++
+ Routine Description:
+ Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These
+ can either be the list SCSI devices that are actually present on the SCSI channel, or the list of legal
+ Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the
+ Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI
+ channel.
+
+ Arguments:
+ This - A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance
+ Target - On input, a pointer to the Target ID (an array of size
+ TARGET_MAX_BYTES) of a SCSI device present on the SCSI channel.
+ On output, a pointer to the Target ID (an array of
+ TARGET_MAX_BYTES) of the next SCSI device present on a SCSI
+ channel. An input value of 0xF(all bytes in the array are 0xF) in the
+ Target array retrieves the Target ID of the first SCSI device present on
+ a SCSI channel.
+ Lun - On input, a pointer to the LUN of a SCSI device present on the SCSI
+ channel. On output, a pointer to the LUN of the next SCSI device present
+ on a SCSI channel.
+
+ Returns:
+ EFI_SUCCESS - The Target ID and LUN of the next SCSI device on the SCSI
+ channel was returned in Target and Lun.
+ EFI_INVALID_PARAMETER - Target array is not all 0xF, and Target and Lun were
+ not returned on a previous call to GetNextTargetLun().
+ EFI_NOT_FOUND - There are no more SCSI devices on this SCSI channel.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_BUILD_DEVICE_PATH) (
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN UINT8 *Target,
+ IN UINT64 Lun,
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
+ )
+/*++
+
+ Routine Description:
+ Used to allocate and build a device path node for a SCSI device on a SCSI channel.
+
+ Arguments:
+ This - A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
+ Target - The Target is an array of size TARGET_MAX_BYTES and it specifies the
+ Target ID of the SCSI device for which a device path node is to be
+ allocated and built. Transport drivers may chose to utilize a subset of
+ this size to suit the representation of targets. For example, a Fibre
+ Channel driver may use only 8 bytes (WWN) in the array to represent a
+ FC target.
+ Lun - The LUN of the SCSI device for which a device path node is to be
+ allocated and built.
+
+ DevicePath - A pointer to a single device path node that describes the SCSI device
+ specified by Target and Lun. This function is responsible for
+ allocating the buffer DevicePath with the boot service
+ AllocatePool(). It is the caller's responsibility to free
+ DevicePath when the caller is finished with DevicePath.
+
+ Returns:
+ EFI_SUCCESS - The device path node that describes the SCSI device specified by
+ Target and Lun was allocated and returned in
+ DevicePath.
+ EFI_INVALID_PARAMETER - DevicePath is NULL.
+ EFI_NOT_FOUND - The SCSI devices specified by Target and Lun does not exist
+ on the SCSI channel.
+ EFI_OUT_OF_RESOURCES - There are not enough resources to allocate DevicePath.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_TARGET_LUN) (
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ OUT UINT8 **Target,
+ OUT UINT64 *Lun
+ )
+/*++
+
+ Routine Description:
+ Used to translate a device path node to a Target ID and LUN.
+
+ Arguments:
+ This - A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
+ DevicePath - A pointer to a single device path node that describes the SCSI device
+ on the SCSI channel.
+ Target - A pointer to the Target Array which represents the ID of a SCSI device
+ on the SCSI channel.
+ Lun - A pointer to the LUN of a SCSI device on the SCSI channel.
+
+ Returns:
+ EFI_SUCCESS - DevicePath was successfully translated to a Target ID and
+ LUN, and they were returned in Target and Lun.
+ EFI_INVALID_PARAMETER - DevicePath or Target or Lun is NULL.
+ EFI_NOT_FOUND - A valid translation from DevicePath to a Target ID and LUN
+ does not exist.
+ EFI_UNSUPPORTED - This driver does not support the device path node type in
+ DevicePath.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_RESET_CHANNEL) (
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
+ )
+/*++
+
+ Routine Description:
+ Resets a SCSI channel. This operation resets all the SCSI devices connected to the SCSI channel.
+
+ Arguments:
+ This - A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
+
+ Returns:
+ EFI_SUCCESS - The SCSI channel was reset.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to reset the SCSI channel.
+ EFI_TIMEOUT - A timeout occurred while attempting to reset the SCSI channel.
+ EFI_UNSUPPORTED - The SCSI channel does not support a channel reset operation.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_RESET_TARGET_LUN) (
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN UINT8 *Target,
+ IN UINT64 Lun
+ )
+/*++
+
+ Routine Description:
+ Resets a SCSI logical unit that is connected to a SCSI channel.
+
+ Arguments:
+ This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
+ Target The Target is an array of size TARGET_MAX_BYTE and it represents the
+ target port ID of the SCSI device containing the SCSI logical unit to
+ reset. Transport drivers may chose to utilize a subset of this array to suit
+ the representation of their targets.
+ Lun The LUN of the SCSI device to reset.
+
+ Returns:
+ EFI_SUCCESS - The SCSI device specified by Target and Lun was reset.
+ EFI_INVALID_PARAMETER - Target or Lun is NULL.
+ EFI_TIMEOUT - A timeout occurred while attempting to reset the SCSI device
+ specified by Target and Lun.
+ EFI_UNSUPPORTED - The SCSI channel does not support a target reset operation.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to reset the SCSI device
+ specified by Target and Lun.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET) (
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN OUT UINT8 **Target
+ )
+/*++
+
+ Routine Description:
+ Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either
+ be the list SCSI devices that are actually present on the SCSI channel, or the list of legal Target IDs
+ for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to
+ see if a SCSI device is actually present at that location on the SCSI channel.
+
+ Arguments:
+ This - A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
+ Target - (TARGET_MAX_BYTES) of a SCSI device present on the SCSI channel.
+ On output, a pointer to the Target ID (an array of
+ TARGET_MAX_BYTES) of the next SCSI device present on a SCSI
+ channel. An input value of 0xF(all bytes in the array are 0xF) in the
+ Target array retrieves the Target ID of the first SCSI device present on a
+ SCSI channel.
+
+ Returns:
+ EFI_SUCCESS - The Target ID of the next SCSI device on the SCSI
+ channel was returned in Target.
+ EFI_INVALID_PARAMETER - Target or Lun is NULL.
+ EFI_TIMEOUT - Target array is not all 0xF, and Target were not
+ returned on a previous call to GetNextTarget().
+ EFI_NOT_FOUND - There are no more SCSI devices on this SCSI channel.
+
+--*/
+;
+
+struct _EFI_EXT_SCSI_PASS_THRU_PROTOCOL {
+ EFI_EXT_SCSI_PASS_THRU_MODE *Mode;
+ EFI_EXT_SCSI_PASS_THRU_PASSTHRU PassThru;
+ EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET_LUN GetNextTargetLun;
+ EFI_EXT_SCSI_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath;
+ EFI_EXT_SCSI_PASS_THRU_GET_TARGET_LUN GetTargetLun;
+ EFI_EXT_SCSI_PASS_THRU_RESET_CHANNEL ResetChannel;
+ EFI_EXT_SCSI_PASS_THRU_RESET_TARGET_LUN ResetTargetLun;
+ EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET GetNextTarget;
+};
+
+extern EFI_GUID gEfiExtScsiPassThruProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/SerialIO/SerialIo.c b/EDK/Foundation/Efi/Protocol/SerialIO/SerialIo.c
new file mode 100644
index 0000000..efb9d7a
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SerialIO/SerialIo.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SerialIo.c
+
+Abstract:
+
+ Serial IO protocol as defined in the EFI 1.0 specification.
+
+ Abstraction of a basic serial device. Targeted at 16550 UART, but
+ could be much more generic.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (SerialIo)
+
+EFI_GUID gEfiSerialIoProtocolGuid = EFI_SERIAL_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSerialIoProtocolGuid, "SerialIo Protocol", "EFI 1.0 Serial IO Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/SerialIO/SerialIo.h b/EDK/Foundation/Efi/Protocol/SerialIO/SerialIo.h
new file mode 100644
index 0000000..267d762
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SerialIO/SerialIo.h
@@ -0,0 +1,296 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SerialIo.h
+
+Abstract:
+
+ Serial IO protocol as defined in the EFI 1.0 specification.
+
+ Abstraction of a basic serial device. Targeted at 16550 UART, but
+ could be much more generic.
+
+--*/
+
+#ifndef _SERIAL_IO_H_
+#define _SERIAL_IO_H_
+
+#define EFI_SERIAL_IO_PROTOCOL_GUID \
+ { \
+ 0xBB25CF6F, 0xF1D4, 0x11D2, 0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SERIAL_IO_PROTOCOL);
+
+//
+// Serial IO Data structures
+//
+typedef enum {
+ DefaultParity,
+ NoParity,
+ EvenParity,
+ OddParity,
+ MarkParity,
+ SpaceParity
+} EFI_PARITY_TYPE;
+
+typedef enum {
+ DefaultStopBits,
+ OneStopBit,
+ OneFiveStopBits,
+ TwoStopBits
+} EFI_STOP_BITS_TYPE;
+
+//
+// define for Control bits, grouped by read only, write only, and read write
+//
+//
+// Read Only
+//
+#define EFI_SERIAL_CLEAR_TO_SEND 0x00000010
+#define EFI_SERIAL_DATA_SET_READY 0x00000020
+#define EFI_SERIAL_RING_INDICATE 0x00000040
+#define EFI_SERIAL_CARRIER_DETECT 0x00000080
+#define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x00000100
+#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x00000200
+
+//
+// Write Only
+//
+#define EFI_SERIAL_REQUEST_TO_SEND 0x00000002
+#define EFI_SERIAL_DATA_TERMINAL_READY 0x00000001
+
+//
+// Read Write
+//
+#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x00001000
+#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x00002000
+#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000
+
+//
+// Serial IO Member Functions
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SERIAL_RESET) (
+ IN EFI_SERIAL_IO_PROTOCOL * This
+ )
+/*++
+
+ Routine Description:
+ Reset the serial device.
+
+ Arguments:
+ This - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - The device was reset.
+ EFI_DEVICE_ERROR - The serial device could not be reset.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SERIAL_SET_ATTRIBUTES) (
+ IN EFI_SERIAL_IO_PROTOCOL * This,
+ IN UINT64 BaudRate,
+ IN UINT32 ReceiveFifoDepth,
+ IN UINT32 Timeout,
+ IN EFI_PARITY_TYPE Parity,
+ IN UINT8 DataBits,
+ IN EFI_STOP_BITS_TYPE StopBits
+ )
+/*++
+
+ Routine Description:
+ Sets the baud rate, receive FIFO depth, transmit/receice time out, parity,
+ data buts, and stop bits on a serial device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ BaudRate - The requested baud rate. A BaudRate value of 0 will use the the
+ device's default interface speed.
+ ReveiveFifoDepth - The requested depth of the FIFO on the receive side of the
+ serial interface. A ReceiveFifoDepth value of 0 will use
+ the device's dfault FIFO depth.
+ Timeout - The requested time out for a single character in microseconds.
+ This timeout applies to both the transmit and receive side of the
+ interface. A Timeout value of 0 will use the device's default time
+ out value.
+ Parity - The type of parity to use on this serial device. A Parity value of
+ DefaultParity will use the device's default parity value.
+ DataBits - The number of data bits to use on the serial device. A DataBits
+ vaule of 0 will use the device's default data bit setting.
+ StopBits - The number of stop bits to use on this serial device. A StopBits
+ value of DefaultStopBits will use the device's default number of
+ stop bits.
+
+ Returns:
+ EFI_SUCCESS - The device was reset.
+ EFI_DEVICE_ERROR - The serial device could not be reset.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS) (
+ IN EFI_SERIAL_IO_PROTOCOL * This,
+ IN UINT32 Control
+ )
+/*++
+
+ Routine Description:
+ Set the control bits on a serial device
+
+ Arguments:
+ This - Protocol instance pointer.
+ Control - Set the bits of Control that are settable.
+
+ Returns:
+ EFI_SUCCESS - The new control bits were set on the serial device.
+ EFI_UNSUPPORTED - The serial device does not support this operation.
+ EFI_DEVICE_ERROR - The serial device is not functioning correctly.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SERIAL_GET_CONTROL_BITS) (
+ IN EFI_SERIAL_IO_PROTOCOL * This,
+ OUT UINT32 *Control
+ )
+/*++
+
+ Routine Description:
+ Retrieves the status of thecontrol bits on a serial device
+
+ Arguments:
+ This - Protocol instance pointer.
+ Control - A pointer to return the current Control signals from the serial
+ device.
+
+ Returns:
+ EFI_SUCCESS - The control bits were read from the serial device.
+ EFI_DEVICE_ERROR - The serial device is not functioning correctly.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SERIAL_WRITE) (
+ IN EFI_SERIAL_IO_PROTOCOL * This,
+ IN OUT UINTN *BufferSize,
+ IN VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Writes data to a serial device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ BufferSize - On input, the size of the Buffer. On output, the amount of
+ data actually written.
+ Buffer - The buffer of data to write
+
+ Returns:
+ EFI_SUCCESS - The data was written.
+ EFI_DEVICE_ERROR - The device reported an error.
+ EFI_TIMEOUT - The data write was stopped due to a timeout.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SERIAL_READ) (
+ IN EFI_SERIAL_IO_PROTOCOL * This,
+ IN OUT UINTN *BufferSize,
+ OUT VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Writes data to a serial device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ BufferSize - On input, the size of the Buffer. On output, the amount of
+ data returned in Buffer.
+ Buffer - The buffer to return the data into.
+
+ Returns:
+ EFI_SUCCESS - The data was read.
+ EFI_DEVICE_ERROR - The device reported an error.
+ EFI_TIMEOUT - The data write was stopped due to a timeout.
+
+--*/
+;
+
+/*++
+
+ The data values in SERIAL_IO_MODE are read-only and are updated by the code
+ that produces the SERIAL_IO_PROTOCOL member functions.
+
+ ControlMask - A mask fo the Control bits that the device supports. The device
+ must always support the Input Buffer Empty control bit.
+ TimeOut - If applicable, the number of microseconds to wait before timing out
+ a Read or Write operation.
+ BaudRate - If applicable, the current baud rate setting of the device; otherwise,
+ baud rate has the value of zero to indicate that device runs at the
+ device's designed speed.
+ ReceiveFifoDepth - The number of characters the device will buffer on input
+ DataBits - The number of characters the device will buffer on input
+ Parity - If applicable, this is the EFI_PARITY_TYPE that is computed or
+ checked as each character is transmitted or reveived. If the device
+ does not support parity the value is the default parity value.
+ StopBits - If applicable, the EFI_STOP_BITS_TYPE number of stop bits per
+ character. If the device does not support stop bits the value is
+ the default stop bit values.
+
+--*/
+typedef struct {
+ UINT32 ControlMask;
+
+ //
+ // current Attributes
+ //
+ UINT32 Timeout;
+ UINT64 BaudRate;
+ UINT32 ReceiveFifoDepth;
+ UINT32 DataBits;
+ UINT32 Parity;
+ UINT32 StopBits;
+} EFI_SERIAL_IO_MODE;
+
+#define SERIAL_IO_INTERFACE_REVISION 0x00010000
+
+typedef struct _EFI_SERIAL_IO_PROTOCOL {
+ UINT32 Revision;
+ EFI_SERIAL_RESET Reset;
+ EFI_SERIAL_SET_ATTRIBUTES SetAttributes;
+ EFI_SERIAL_SET_CONTROL_BITS SetControl;
+ EFI_SERIAL_GET_CONTROL_BITS GetControl;
+ EFI_SERIAL_WRITE Write;
+ EFI_SERIAL_READ Read;
+
+ EFI_SERIAL_IO_MODE *Mode;
+} EFI_SERIAL_IO_PROTOCOL;
+
+extern EFI_GUID gEfiSerialIoProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/ServiceBinding/ServiceBinding.h b/EDK/Foundation/Efi/Protocol/ServiceBinding/ServiceBinding.h
new file mode 100644
index 0000000..1a990a5
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/ServiceBinding/ServiceBinding.h
@@ -0,0 +1,88 @@
+/*++
+
+Copyright (c) 2005, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ServiceBinding.h
+
+Abstract:
+
+ UEFI Service Binding protocol definition.
+
+--*/
+
+#ifndef _EFI_SERVICE_BINDING_H_
+#define _EFI_SERVICE_BINDING_H_
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_SERVICE_BINDING_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SERVICE_BINDING_CREATE_CHILD) (
+ IN EFI_SERVICE_BINDING_PROTOCOL *This,
+ IN OUT EFI_HANDLE *ChildHandle
+ )
+/*++
+
+ Routine Description:
+ Creates a child handle with a set of I/O services.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ChildHandle - Pointer to the handle of the child to create. If it is NULL,
+ then a new handle is created. If it is not NULL, then the
+ I/O services are added to the existing child handle.
+
+ Returns:
+ EFI_SUCCES - The child handle was created with the I/O services.
+ EFI_OUT_OF_RESOURCES - There are not enough resources availabe to create
+ the child.
+ other - The child handle was not created.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SERVICE_BINDING_DESTROY_CHILD) (
+ IN struct _EFI_SERVICE_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE ChildHandle
+ )
+/*++
+
+ Routine Description:
+ Destroys a child handle with a set of I/O services.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ChildHandle - Handle of the child to destroy.
+
+ Returns:
+ EFI_SUCCES - The I/O services were removed from the child handle.
+ EFI_UNSUPPORTED - The child handle does not support the I/O services
+ that are being removed.
+ EFI_INVALID_PARAMETER - Child handle is not a valid EFI Handle.
+ EFI_ACCESS_DENIED - The child handle could not be destroyed because its
+ I/O services are being used.
+ other - The child handle was not destroyed.
+
+--*/
+;
+
+typedef struct _EFI_SERVICE_BINDING_PROTOCOL {
+ EFI_SERVICE_BINDING_CREATE_CHILD CreateChild;
+ EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild;
+} EFI_SERVICE_BINDING_PROTOCOL;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.c b/EDK/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.c
new file mode 100644
index 0000000..4cbcd2e
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.c
@@ -0,0 +1,33 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleFileSystem.c
+
+Abstract:
+
+ SimpleFileSystem protocol as defined in the EFI 1.0 specification.
+
+ The SimpleFileSystem protocol is the programatic access to the FAT (12,16,32)
+ file system specified in EFI 1.0. It can also be used to abstract any
+ file system other than FAT.
+
+ EFI 1.0 can boot from any valid EFI image contained in a SimpleFileSystem
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (SimpleFileSystem)
+
+EFI_GUID gEfiSimpleFileSystemProtocolGuid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSimpleFileSystemProtocolGuid, "Filesystem Protocol", "EFI 1.0 Simple FileSystem Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.h b/EDK/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.h
new file mode 100644
index 0000000..a2ba456
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.h
@@ -0,0 +1,375 @@
+/*++
+
+Copyright (c) 2004 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleFileSystem.h
+
+Abstract:
+
+ SimpleFileSystem protocol as defined in the EFI 1.0 specification.
+
+ The SimpleFileSystem protocol is the programatic access to the FAT (12,16,32)
+ file system specified in EFI 1.0. It can also be used to abstract a file
+ system other than FAT.
+
+ EFI 1.0 can boot from any valid EFI image contained in a SimpleFileSystem
+
+--*/
+
+#ifndef _SIMPLE_FILE_SYSTEM_H_
+#define _SIMPLE_FILE_SYSTEM_H_
+
+#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \
+ { \
+ 0x964e5b22, 0x6459, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SIMPLE_FILE_SYSTEM_PROTOCOL);
+EFI_FORWARD_DECLARATION (EFI_FILE);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_VOLUME_OPEN) (
+ IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * This,
+ OUT EFI_FILE **Root
+ )
+/*++
+
+ Routine Description:
+ Open the root directory on a volume.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Root - Returns an Open file handle for the root directory
+
+ Returns:
+ EFI_SUCCESS - The device was opened.
+ EFI_UNSUPPORTED - This volume does not suppor the file system.
+ EFI_NO_MEDIA - The device has no media.
+ EFI_DEVICE_ERROR - The device reported an error.
+ EFI_VOLUME_CORRUPTED - The file system structures are corrupted
+ EFI_ACCESS_DENIED - The service denied access to the file
+ EFI_OUT_OF_RESOURCES - The volume was not opened due to lack of resources
+
+--*/
+;
+
+#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION 0x00010000
+
+typedef struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL {
+ UINT64 Revision;
+ EFI_VOLUME_OPEN OpenVolume;
+} EFI_SIMPLE_FILE_SYSTEM_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_OPEN) (
+ IN EFI_FILE * File,
+ OUT EFI_FILE **NewHandle,
+ IN CHAR16 *FileName,
+ IN UINT64 OpenMode,
+ IN UINT64 Attributes
+ )
+/*++
+
+ Routine Description:
+ Open the root directory on a volume.
+
+ Arguments:
+ File - Protocol instance pointer.
+ NewHandle - Returns File Handle for FileName
+ FileName - Null terminated string. "\", ".", and ".." are supported
+ OpenMode - Open mode for file.
+ Attributes - Only used for EFI_FILE_MODE_CREATE
+
+ Returns:
+ EFI_SUCCESS - The device was opened.
+ EFI_NOT_FOUND - The specified file could not be found on the device
+ EFI_NO_MEDIA - The device has no media.
+ EFI_MEDIA_CHANGED - The media has changed
+ EFI_DEVICE_ERROR - The device reported an error.
+ EFI_VOLUME_CORRUPTED - The file system structures are corrupted
+ EFI_ACCESS_DENIED - The service denied access to the file
+ EFI_OUT_OF_RESOURCES - The volume was not opened due to lack of resources
+ EFI_VOLUME_FULL - The volume is full.
+
+--*/
+;
+
+//
+// Open modes
+//
+#define EFI_FILE_MODE_READ 0x0000000000000001
+#define EFI_FILE_MODE_WRITE 0x0000000000000002
+#define EFI_FILE_MODE_CREATE 0x8000000000000000
+
+//
+// File attributes
+//
+#define EFI_FILE_READ_ONLY 0x0000000000000001
+#define EFI_FILE_HIDDEN 0x0000000000000002
+#define EFI_FILE_SYSTEM 0x0000000000000004
+#define EFI_FILE_RESERVED 0x0000000000000008
+#define EFI_FILE_DIRECTORY 0x0000000000000010
+#define EFI_FILE_ARCHIVE 0x0000000000000020
+#define EFI_FILE_VALID_ATTR 0x0000000000000037
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_CLOSE) (
+ IN EFI_FILE * File
+ )
+/*++
+
+ Routine Description:
+ Close the file handle
+
+ Arguments:
+ File - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS- The device was opened.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_DELETE) (
+ IN EFI_FILE * File
+ )
+/*++
+
+ Routine Description:
+ Close and delete the file handle
+
+ Arguments:
+ File - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - The device was opened.
+ EFI_WARN_DELETE_FAILURE - The handle was closed but the file was not
+ deleted
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_READ) (
+ IN EFI_FILE * File,
+ IN OUT UINTN *BufferSize,
+ OUT VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Read data from the file.
+
+ Arguments:
+ File - Protocol instance pointer.
+ BufferSize - On input size of buffer, on output amount of data in
+ buffer.
+ Buffer - The buffer in which data is read.
+
+ Returns:
+ EFI_SUCCESS - Data was read.
+ EFI_NO_MEDIA - The device has no media
+ EFI_DEVICE_ERROR - The device reported an error
+ EFI_VOLUME_CORRUPTED - The file system structures are corrupted
+ EFI_BUFFER_TO_SMALL - BufferSize is too small. BufferSize contains
+ required size
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_WRITE) (
+ IN EFI_FILE * File,
+ IN OUT UINTN *BufferSize,
+ IN VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Write data from to the file.
+
+ Arguments:
+ File - Protocol instance pointer.
+ BufferSize - On input size of buffer, on output amount of data in buffer.
+ Buffer - The buffer in which data to write.
+
+ Returns:
+ EFI_SUCCESS - Data was written.
+ EFI_UNSUPPORT - Writes to Open directory are not supported
+ EFI_NO_MEDIA - The device has no media
+ EFI_DEVICE_ERROR - The device reported an error
+ EFI_VOLUME_CORRUPTED - The file system structures are corrupted
+ EFI_WRITE_PROTECTED - The device is write protected
+ EFI_ACCESS_DENIED - The file was open for read only
+ EFI_VOLUME_FULL - The volume is full
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_SET_POSITION) (
+ IN EFI_FILE * File,
+ IN UINT64 Position
+ )
+/*++
+
+ Routine Description:
+ Set a files current position
+
+ Arguments:
+ File - Protocol instance pointer.
+ Position - Byte possition from the start of the file
+
+ Returns:
+ EFI_SUCCESS - Data was written.
+ EFI_UNSUPPORTED - Seek request for non-zero is not valid on open.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_GET_POSITION) (
+ IN EFI_FILE * File,
+ OUT UINT64 *Position
+ )
+/*++
+
+ Routine Description:
+ Get a files current position
+
+ Arguments:
+ File - Protocol instance pointer.
+ Position - Byte possition from the start of the file
+
+ Returns:
+ EFI_SUCCESS - Data was written.
+ EFI_UNSUPPORTED - Seek request for non-zero is not valid on open.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_GET_INFO) (
+ IN EFI_FILE * File,
+ IN EFI_GUID * InformationType,
+ IN OUT UINTN *BufferSize,
+ OUT VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Get information about a file
+
+ Arguments:
+ File - Protocol instance pointer.
+ InformationType - Type of info to return in Buffer
+ BufferSize - On input size of buffer, on output amount of data in
+ buffer.
+ Buffer - The buffer to return data.
+
+ Returns:
+ EFI_SUCCESS - Data was returned.
+ EFI_UNSUPPORT - InformationType is not supported
+ EFI_NO_MEDIA - The device has no media
+ EFI_DEVICE_ERROR - The device reported an error
+ EFI_VOLUME_CORRUPTED - The file system structures are corrupted
+ EFI_WRITE_PROTECTED - The device is write protected
+ EFI_ACCESS_DENIED - The file was open for read only
+ EFI_BUFFER_TOO_SMALL - Buffer was too small, required size returned in
+ BufferSize
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_SET_INFO) (
+ IN EFI_FILE * File,
+ IN EFI_GUID * InformationType,
+ IN UINTN BufferSize,
+ IN VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Set information about a file
+
+ Arguments:
+ File - Protocol instance pointer.
+ InformationType - Type of info in Buffer
+ BufferSize - Size of buffer.
+ Buffer - The data to write.
+
+ Returns:
+ EFI_SUCCESS - Data was returned.
+ EFI_UNSUPPORT - InformationType is not supported
+ EFI_NO_MEDIA - The device has no media
+ EFI_DEVICE_ERROR - The device reported an error
+ EFI_VOLUME_CORRUPTED - The file system structures are corrupted
+ EFI_WRITE_PROTECTED - The device is write protected
+ EFI_ACCESS_DENIED - The file was open for read only
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FILE_FLUSH) (
+ IN EFI_FILE * File
+ )
+/*++
+
+ Routine Description:
+ Flush data back for the file handle
+
+ Arguments:
+ File - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - Data was written.
+ EFI_UNSUPPORT - Writes to Open directory are not supported
+ EFI_NO_MEDIA - The device has no media
+ EFI_DEVICE_ERROR - The device reported an error
+ EFI_VOLUME_CORRUPTED - The file system structures are corrupted
+ EFI_WRITE_PROTECTED - The device is write protected
+ EFI_ACCESS_DENIED - The file was open for read only
+ EFI_VOLUME_FULL - The volume is full
+
+--*/
+;
+
+#define EFI_FILE_HANDLE_REVISION 0x00010000
+typedef struct _EFI_FILE {
+ UINT64 Revision;
+ EFI_FILE_OPEN Open;
+ EFI_FILE_CLOSE Close;
+ EFI_FILE_DELETE Delete;
+ EFI_FILE_READ Read;
+ EFI_FILE_WRITE Write;
+ EFI_FILE_GET_POSITION GetPosition;
+ EFI_FILE_SET_POSITION SetPosition;
+ EFI_FILE_GET_INFO GetInfo;
+ EFI_FILE_SET_INFO SetInfo;
+ EFI_FILE_FLUSH Flush;
+} EFI_FILE, *EFI_FILE_HANDLE, EFI_FILE_PROTOCOL;
+
+extern EFI_GUID gEfiSimpleFileSystemProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/SimpleNetwork/SimpleNetwork.c b/EDK/Foundation/Efi/Protocol/SimpleNetwork/SimpleNetwork.c
new file mode 100644
index 0000000..74cb94d
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleNetwork/SimpleNetwork.c
@@ -0,0 +1,34 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleNetwork.c
+
+Abstract:
+
+ Simple Network protocol as defined in the EFI 1.0 specification.
+
+ Basic network device abstraction.
+
+ Rx - Received
+ Tx - Transmit
+ MCast - MultiCast
+ ...
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (SimpleNetwork)
+
+EFI_GUID gEfiSimpleNetworkProtocolGuid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSimpleNetworkProtocolGuid, "Simple Network Protocol", "EFI 1.0 Simple Network Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/SimpleNetwork/SimpleNetwork.h b/EDK/Foundation/Efi/Protocol/SimpleNetwork/SimpleNetwork.h
new file mode 100644
index 0000000..15b670e
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleNetwork/SimpleNetwork.h
@@ -0,0 +1,639 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleNetwork.h
+
+Abstract:
+
+ Simple Network protocol as defined in the EFI 1.0 specification.
+
+ Basic network device abstraction.
+
+ Rx - Received
+ Tx - Transmit
+ MCast - MultiCast
+ ...
+
+--*/
+
+#ifndef _SIMPLE_NETWORK_H_
+#define _SIMPLE_NETWORK_H_
+
+#define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \
+ { \
+ 0xA19832B9, 0xAC25, 0x11D3, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SIMPLE_NETWORK_PROTOCOL);
+
+//
+// Simple Network Protocol data structures
+//
+typedef struct {
+ //
+ // Total number of frames received. Includes frames with errors and
+ // dropped frames.
+ //
+ UINT64 RxTotalFrames;
+
+ //
+ // Number of valid frames received and copied into receive buffers.
+ //
+ UINT64 RxGoodFrames;
+
+ //
+ // Number of frames below the minimum length for the media.
+ // This would be <64 for ethernet.
+ //
+ UINT64 RxUndersizeFrames;
+
+ //
+ // Number of frames longer than the maxminum length for the
+ // media. This would be >1500 for ethernet.
+ //
+ UINT64 RxOversizeFrames;
+
+ //
+ // Valid frames that were dropped because receive buffers were full.
+ //
+ UINT64 RxDroppedFrames;
+
+ //
+ // Number of valid unicast frames received and not dropped.
+ //
+ UINT64 RxUnicastFrames;
+
+ //
+ // Number of valid broadcast frames received and not dropped.
+ //
+ UINT64 RxBroadcastFrames;
+
+ //
+ // Number of valid mutlicast frames received and not dropped.
+ //
+ UINT64 RxMulticastFrames;
+
+ //
+ // Number of frames w/ CRC or alignment errors.
+ //
+ UINT64 RxCrcErrorFrames;
+
+ //
+ // Total number of bytes received. Includes frames with errors
+ // and dropped frames.
+ //
+ UINT64 RxTotalBytes;
+
+ //
+ // Transmit statistics.
+ //
+ UINT64 TxTotalFrames;
+ UINT64 TxGoodFrames;
+ UINT64 TxUndersizeFrames;
+ UINT64 TxOversizeFrames;
+ UINT64 TxDroppedFrames;
+ UINT64 TxUnicastFrames;
+ UINT64 TxBroadcastFrames;
+ UINT64 TxMulticastFrames;
+ UINT64 TxCrcErrorFrames;
+ UINT64 TxTotalBytes;
+
+ //
+ // Number of collisions detection on this subnet.
+ //
+ UINT64 Collisions;
+
+ //
+ // Number of frames destined for unsupported protocol.
+ //
+ UINT64 UnsupportedProtocol;
+
+} EFI_NETWORK_STATISTICS;
+
+typedef enum {
+ EfiSimpleNetworkStopped,
+ EfiSimpleNetworkStarted,
+ EfiSimpleNetworkInitialized,
+ EfiSimpleNetworkMaxState
+} EFI_SIMPLE_NETWORK_STATE;
+
+#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
+#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
+#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
+#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
+#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
+
+#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
+#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
+#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
+#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
+
+#define MAX_MCAST_FILTER_CNT 16
+typedef struct {
+ UINT32 State;
+ UINT32 HwAddressSize;
+ UINT32 MediaHeaderSize;
+ UINT32 MaxPacketSize;
+ UINT32 NvRamSize;
+ UINT32 NvRamAccessSize;
+ UINT32 ReceiveFilterMask;
+ UINT32 ReceiveFilterSetting;
+ UINT32 MaxMCastFilterCount;
+ UINT32 MCastFilterCount;
+ EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT];
+ EFI_MAC_ADDRESS CurrentAddress;
+ EFI_MAC_ADDRESS BroadcastAddress;
+ EFI_MAC_ADDRESS PermanentAddress;
+ UINT8 IfType;
+ BOOLEAN MacAddressChangeable;
+ BOOLEAN MultipleTxSupported;
+ BOOLEAN MediaPresentSupported;
+ BOOLEAN MediaPresent;
+} EFI_SIMPLE_NETWORK_MODE;
+
+//
+// Protocol Member Functions
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_START) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This
+ )
+/*++
+
+ Routine Description:
+ Changes the state of a network interface from "stopped" to "started".
+
+ Arguments:
+ This - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - The network interface was started.
+ EFI_ALREADY_STARTED - The network interface is already in the started state.
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This
+ )
+/*++
+
+ Routine Description:
+ Changes the state of a network interface from "started" to "stopped".
+
+ Arguments:
+ This - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - The network interface was stopped.
+ EFI_ALREADY_STARTED - The network interface is already in the stopped state.
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ IN UINTN ExtraRxBufferSize OPTIONAL,
+ IN UINTN ExtraTxBufferSize OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Resets a network adapter and allocates the transmit and receive buffers
+ required by the network interface; optionally, also requests allocation
+ of additional transmit and receive buffers.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ExtraRxBufferSize - The size, in bytes, of the extra receive buffer space
+ that the driver should allocate for the network interface.
+ Some network interfaces will not be able to use the extra
+ buffer, and the caller will not know if it is actually
+ being used.
+ ExtraTxBufferSize - The size, in bytes, of the extra transmit buffer space
+ that the driver should allocate for the network interface.
+ Some network interfaces will not be able to use the extra
+ buffer, and the caller will not know if it is actually
+ being used.
+
+ Returns:
+ EFI_SUCCESS - The network interface was initialized.
+ EFI_NOT_STARTED - The network interface has not been started
+ EFI_OUT_OF_RESOURCES - There was not enough memory for the transmit and
+ receive buffers. .
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ IN BOOLEAN ExtendedVerification
+ )
+/*++
+
+ Routine Description:
+ Resets a network adapter and re-initializes it with the parameters that were
+ provided in the previous call to Initialize().
+
+ Arguments:
+ This - Protocol instance pointer.
+ ExtendedVerification - Indicates that the driver may perform a more
+ exhaustive verification operation of the device
+ during reset.
+
+
+ Returns:
+ EFI_SUCCESS - The network interface was reset.
+ EFI_NOT_STARTED - The network interface has not been started
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This
+ )
+/*++
+
+ Routine Description:
+ Resets a network adapter and leaves it in a state that is safe for
+ another driver to initialize.
+
+ Arguments:
+ This - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - The network interface was shutdown.
+ EFI_NOT_STARTED - The network interface has not been started
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ IN UINT32 Enable,
+ IN UINT32 Disable,
+ IN BOOLEAN ResetMCastFilter,
+ IN UINTN MCastFilterCnt OPTIONAL,
+ IN EFI_MAC_ADDRESS * MCastFilter OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Manages the multicast receive filters of a network interface.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Enable - A bit mask of receive filters to enable on the network interface.
+ Disable - A bit mask of receive filters to disable on the network interface.
+ ResetMCastFilter - Set to TRUE to reset the contents of the multicast receive
+ filters on the network interface to their default values.
+ McastFilterCnt - Number of multicast HW MAC addresses in the new
+ MCastFilter list. This value must be less than or equal to
+ the MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This
+ field is optional if ResetMCastFilter is TRUE.
+ MCastFilter - A pointer to a list of new multicast receive filter HW MAC
+ addresses. This list will replace any existing multicast
+ HW MAC address list. This field is optional if
+ ResetMCastFilter is TRUE.
+
+ Returns:
+ EFI_SUCCESS - The multicast receive filter list was updated.
+ EFI_NOT_STARTED - The network interface has not been started
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ IN BOOLEAN Reset,
+ IN EFI_MAC_ADDRESS * New OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Modifies or resets the current station address, if supported.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Reset - Flag used to reset the station address to the network interfaces
+ permanent address.
+ New - New station address to be used for the network interface.
+
+ Returns:
+ EFI_SUCCESS - The network interfaces station address was updated.
+ EFI_NOT_STARTED - The network interface has not been started
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ IN BOOLEAN Reset,
+ IN OUT UINTN *StatisticsSize OPTIONAL,
+ OUT EFI_NETWORK_STATISTICS * StatisticsTable OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Resets or collects the statistics on a network interface.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Reset - Set to TRUE to reset the statistics for the network interface.
+ StatisticsSize - On input the size, in bytes, of StatisticsTable. On
+ output the size, in bytes, of the resulting table of
+ statistics.
+ StatisticsTable - A pointer to the EFI_NETWORK_STATISTICS structure that
+ contains the statistics.
+
+ Returns:
+ EFI_SUCCESS - The statistics were collected from the network interface.
+ EFI_NOT_STARTED - The network interface has not been started.
+ EFI_BUFFER_TOO_SMALL - The Statistics buffer was too small. The current buffer
+ size needed to hold the statistics is returned in
+ StatisticsSize.
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ IN BOOLEAN IPv6,
+ IN EFI_IP_ADDRESS * IP,
+ OUT EFI_MAC_ADDRESS * MAC
+ )
+/*++
+
+ Routine Description:
+ Converts a multicast IP address to a multicast HW MAC address.
+
+ Arguments:
+ This - Protocol instance pointer.
+ IPv6 - Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set
+ to FALSE if the multicast IP address is IPv4 [RFC 791].
+ IP - The multicast IP address that is to be converted to a multicast
+ HW MAC address.
+ MAC - The multicast HW MAC address that is to be generated from IP.
+
+ Returns:
+ EFI_SUCCESS - The multicast IP address was mapped to the multicast
+ HW MAC address.
+ EFI_NOT_STARTED - The network interface has not been started.
+ EFI_BUFFER_TOO_SMALL - The Statistics buffer was too small. The current buffer
+ size needed to hold the statistics is returned in
+ StatisticsSize.
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ IN BOOLEAN ReadWrite,
+ IN UINTN Offset,
+ IN UINTN BufferSize,
+ IN OUT VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Performs read and write operations on the NVRAM device attached to a
+ network interface.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ReadWrite - TRUE for read operations, FALSE for write operations.
+ Offset - Byte offset in the NVRAM device at which to start the read or
+ write operation. This must be a multiple of NvRamAccessSize and
+ less than NvRamSize.
+ BufferSize - The number of bytes to read or write from the NVRAM device.
+ This must also be a multiple of NvramAccessSize.
+ Buffer - A pointer to the data buffer.
+
+ Returns:
+ EFI_SUCCESS - The NVRAM access was performed.
+ EFI_NOT_STARTED - The network interface has not been started.
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ OUT UINT32 *InterruptStatus OPTIONAL,
+ OUT VOID **TxBuf OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Reads the current interrupt status and recycled transmit buffer status from
+ a network interface.
+
+ Arguments:
+ This - Protocol instance pointer.
+ InterruptStatus - A pointer to the bit mask of the currently active interrupts
+ If this is NULL, the interrupt status will not be read from
+ the device. If this is not NULL, the interrupt status will
+ be read from the device. When the interrupt status is read,
+ it will also be cleared. Clearing the transmit interrupt
+ does not empty the recycled transmit buffer array.
+ TxBuf - Recycled transmit buffer address. The network interface will
+ not transmit if its internal recycled transmit buffer array
+ is full. Reading the transmit buffer does not clear the
+ transmit interrupt. If this is NULL, then the transmit buffer
+ status will not be read. If there are no transmit buffers to
+ recycle and TxBuf is not NULL, * TxBuf will be set to NULL.
+
+ Returns:
+ EFI_SUCCESS - The status of the network interface was retrieved.
+ EFI_NOT_STARTED - The network interface has not been started.
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ IN UINTN HeaderSize,
+ IN UINTN BufferSize,
+ IN VOID *Buffer,
+ IN EFI_MAC_ADDRESS * SrcAddr OPTIONAL,
+ IN EFI_MAC_ADDRESS * DestAddr OPTIONAL,
+ IN UINT16 *Protocol OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Places a packet in the transmit queue of a network interface.
+
+ Arguments:
+ This - Protocol instance pointer.
+ HeaderSize - The size, in bytes, of the media header to be filled in by
+ the Transmit() function. If HeaderSize is non-zero, then it
+ must be equal to This->Mode->MediaHeaderSize and the DestAddr
+ and Protocol parameters must not be NULL.
+ BufferSize - The size, in bytes, of the entire packet (media header and
+ data) to be transmitted through the network interface.
+ Buffer - A pointer to the packet (media header followed by data) to be
+ transmitted. This parameter cannot be NULL. If HeaderSize is zero,
+ then the media header in Buffer must already be filled in by the
+ caller. If HeaderSize is non-zero, then the media header will be
+ filled in by the Transmit() function.
+ SrcAddr - The source HW MAC address. If HeaderSize is zero, then this parameter
+ is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then
+ This->Mode->CurrentAddress is used for the source HW MAC address.
+ DsetAddr - The destination HW MAC address. If HeaderSize is zero, then this
+ parameter is ignored.
+ Protocol - The type of header to build. If HeaderSize is zero, then this
+ parameter is ignored. See RFC 1700, section "Ether Types", for
+ examples.
+
+ Returns:
+ EFI_SUCCESS - The packet was placed on the transmit queue.
+ EFI_NOT_STARTED - The network interface has not been started.
+ EFI_NOT_READY - The network interface is too busy to accept this transmit
+ request.
+ EFI_BUFFER_TOO_SMALL - The BufferSize parameter is too small.
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
+ IN EFI_SIMPLE_NETWORK_PROTOCOL * This,
+ OUT UINTN *HeaderSize OPTIONAL,
+ IN OUT UINTN *BufferSize,
+ OUT VOID *Buffer,
+ OUT EFI_MAC_ADDRESS * SrcAddr OPTIONAL,
+ OUT EFI_MAC_ADDRESS * DestAddr OPTIONAL,
+ OUT UINT16 *Protocol OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Receives a packet from a network interface.
+
+ Arguments:
+ This - Protocol instance pointer.
+ HeaderSize - The size, in bytes, of the media header received on the network
+ interface. If this parameter is NULL, then the media header size
+ will not be returned.
+ BufferSize - On entry, the size, in bytes, of Buffer. On exit, the size, in
+ bytes, of the packet that was received on the network interface.
+ Buffer - A pointer to the data buffer to receive both the media header and
+ the data.
+ SrcAddr - The source HW MAC address. If this parameter is NULL, the
+ HW MAC source address will not be extracted from the media
+ header.
+ DsetAddr - The destination HW MAC address. If this parameter is NULL,
+ the HW MAC destination address will not be extracted from the
+ media header.
+ Protocol - The media header type. If this parameter is NULL, then the
+ protocol will not be extracted from the media header. See
+ RFC 1700 section "Ether Types" for examples.
+
+ Returns:
+ EFI_SUCCESS - The received data was stored in Buffer, and BufferSize has
+ been updated to the number of bytes received.
+ EFI_NOT_STARTED - The network interface has not been started.
+ EFI_NOT_READY - The network interface is too busy to accept this transmit
+ request.
+ EFI_BUFFER_TOO_SMALL - The BufferSize parameter is too small.
+ EFI_INVALID_PARAMETER - One or more of the parameters has an unsupported value.
+ EFI_DEVICE_ERROR - The command could not be sent to the network interface.
+ EFI_UNSUPPORTED - This function is not supported by the network interface.
+
+--*/
+;
+
+#define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000
+
+typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL {
+ UINT64 Revision;
+ EFI_SIMPLE_NETWORK_START Start;
+ EFI_SIMPLE_NETWORK_STOP Stop;
+ EFI_SIMPLE_NETWORK_INITIALIZE Initialize;
+ EFI_SIMPLE_NETWORK_RESET Reset;
+ EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown;
+ EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters;
+ EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress;
+ EFI_SIMPLE_NETWORK_STATISTICS Statistics;
+ EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac;
+ EFI_SIMPLE_NETWORK_NVDATA NvData;
+ EFI_SIMPLE_NETWORK_GET_STATUS GetStatus;
+ EFI_SIMPLE_NETWORK_TRANSMIT Transmit;
+ EFI_SIMPLE_NETWORK_RECEIVE Receive;
+ EFI_EVENT WaitForPacket;
+ EFI_SIMPLE_NETWORK_MODE *Mode;
+} EFI_SIMPLE_NETWORK_PROTOCOL;
+
+extern EFI_GUID gEfiSimpleNetworkProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/SimplePointer/SimplePointer.c b/EDK/Foundation/Efi/Protocol/SimplePointer/SimplePointer.c
new file mode 100644
index 0000000..5b3171d
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimplePointer/SimplePointer.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimplePointer.c
+
+Abstract:
+
+ Simple Pointer protocol from the EFI 1.1 specification.
+
+ Abstraction of a very simple pointer device like a mice or trackballs.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (SimplePointer)
+
+EFI_GUID gEfiSimplePointerProtocolGuid = EFI_SIMPLE_POINTER_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSimplePointerProtocolGuid, "Simple Pointer Protocol", "EFI 1.1 Simple Pointer Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/SimplePointer/SimplePointer.h b/EDK/Foundation/Efi/Protocol/SimplePointer/SimplePointer.h
new file mode 100644
index 0000000..aaa9c4b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimplePointer/SimplePointer.h
@@ -0,0 +1,76 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimplePointer.h
+
+Abstract:
+
+ Simple Pointer protocol from the EFI 1.1 specification.
+
+ Abstraction of a very simple pointer device like a mice or tracekballs.
+
+--*/
+
+#ifndef _SIMPLE_POINTER_H_
+#define _SIMPLE_POINTER_H_
+
+#define EFI_SIMPLE_POINTER_PROTOCOL_GUID \
+ { \
+ 0x31878c87, 0xb75, 0x11d5, 0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SIMPLE_POINTER_PROTOCOL);
+
+//
+// Data structures
+//
+typedef struct {
+ INT32 RelativeMovementX;
+ INT32 RelativeMovementY;
+ INT32 RelativeMovementZ;
+ BOOLEAN LeftButton;
+ BOOLEAN RightButton;
+} EFI_SIMPLE_POINTER_STATE;
+
+typedef struct {
+ UINT64 ResolutionX;
+ UINT64 ResolutionY;
+ UINT64 ResolutionZ;
+ BOOLEAN LeftButton;
+ BOOLEAN RightButton;
+} EFI_SIMPLE_POINTER_MODE;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_POINTER_RESET) (
+ IN EFI_SIMPLE_POINTER_PROTOCOL * This,
+ IN BOOLEAN ExtendedVerification
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE) (
+ IN EFI_SIMPLE_POINTER_PROTOCOL * This,
+ IN OUT EFI_SIMPLE_POINTER_STATE * State
+ );
+
+typedef struct _EFI_SIMPLE_POINTER_PROTOCOL {
+ EFI_SIMPLE_POINTER_RESET Reset;
+ EFI_SIMPLE_POINTER_GET_STATE GetState;
+ EFI_EVENT WaitForInput;
+ EFI_SIMPLE_POINTER_MODE *Mode;
+} EFI_SIMPLE_POINTER_PROTOCOL;
+
+extern EFI_GUID gEfiSimplePointerProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/SimpleTextIn/SimpleTextIn.c b/EDK/Foundation/Efi/Protocol/SimpleTextIn/SimpleTextIn.c
new file mode 100644
index 0000000..56f24f6
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleTextIn/SimpleTextIn.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleTextIn.c
+
+Abstract:
+
+ Simple Text In protocol from the EFI 1.0 specification.
+
+ Abstraction of a very simple input device like a keyboard or serial
+ terminal.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
+
+EFI_GUID gEfiSimpleTextInProtocolGuid = EFI_SIMPLE_TEXT_IN_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSimpleTextInProtocolGuid, "Simple Text In Protocol", "EFI 1.0 Simple Text In Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/SimpleTextIn/SimpleTextIn.h b/EDK/Foundation/Efi/Protocol/SimpleTextIn/SimpleTextIn.h
new file mode 100644
index 0000000..6a514de
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleTextIn/SimpleTextIn.h
@@ -0,0 +1,136 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleTextIn.h
+
+Abstract:
+
+ Simple Text In protocol from the EFI 1.0 specification.
+
+ Abstraction of a very simple input device like a keyboard or serial
+ terminal.
+
+--*/
+
+#ifndef _SIMPLE_TEXT_IN_H_
+#define _SIMPLE_TEXT_IN_H_
+
+#define EFI_SIMPLE_TEXT_IN_PROTOCOL_GUID \
+ { \
+ 0x387477c1, 0x69c7, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SIMPLE_TEXT_IN_PROTOCOL);
+
+//
+// Data structures
+//
+typedef struct {
+ UINT16 ScanCode;
+ CHAR16 UnicodeChar;
+} EFI_INPUT_KEY;
+
+//
+// Required unicode control chars
+//
+#define CHAR_NULL 0x0000
+#define CHAR_BACKSPACE 0x0008
+#define CHAR_TAB 0x0009
+#define CHAR_LINEFEED 0x000A
+#define CHAR_CARRIAGE_RETURN 0x000D
+
+//
+// EFI Scan codes
+//
+#define SCAN_NULL 0x0000
+#define SCAN_UP 0x0001
+#define SCAN_DOWN 0x0002
+#define SCAN_RIGHT 0x0003
+#define SCAN_LEFT 0x0004
+#define SCAN_HOME 0x0005
+#define SCAN_END 0x0006
+#define SCAN_INSERT 0x0007
+#define SCAN_DELETE 0x0008
+#define SCAN_PAGE_UP 0x0009
+#define SCAN_PAGE_DOWN 0x000A
+#define SCAN_F1 0x000B
+#define SCAN_F2 0x000C
+#define SCAN_F3 0x000D
+#define SCAN_F4 0x000E
+#define SCAN_F5 0x000F
+#define SCAN_F6 0x0010
+#define SCAN_F7 0x0011
+#define SCAN_F8 0x0012
+#define SCAN_F9 0x0013
+#define SCAN_F10 0x0014
+#define SCAN_F11 0x0015
+#define SCAN_F12 0x0016
+#define SCAN_ESC 0x0017
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_INPUT_RESET) (
+ IN EFI_SIMPLE_TEXT_IN_PROTOCOL * This,
+ IN BOOLEAN ExtendedVerification
+ )
+/*++
+
+ Routine Description:
+ Reset the input device and optionaly run diagnostics
+
+ Arguments:
+ This - Protocol instance pointer.
+ ExtendedVerification - Driver may perform diagnostics on reset.
+
+ Returns:
+ EFI_SUCCESS - The device was reset.
+ EFI_DEVICE_ERROR - The device is not functioning properly and could
+ not be reset.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_INPUT_READ_KEY) (
+ IN EFI_SIMPLE_TEXT_IN_PROTOCOL * This,
+ OUT EFI_INPUT_KEY * Key
+ )
+/*++
+
+ Routine Description:
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Key - Driver may perform diagnostics on reset.
+
+ Returns:
+ EFI_SUCCESS - The keystroke information was returned.
+ EFI_NOT_READY - There was no keystroke data availiable.
+ EFI_DEVICE_ERROR - The keydtroke information was not returned due to
+ hardware errors.
+
+--*/
+;
+
+typedef struct _EFI_SIMPLE_TEXT_IN_PROTOCOL {
+ EFI_INPUT_RESET Reset;
+ EFI_INPUT_READ_KEY ReadKeyStroke;
+ EFI_EVENT WaitForKey;
+} EFI_SIMPLE_TEXT_IN_PROTOCOL;
+
+extern EFI_GUID gEfiSimpleTextInProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.c b/EDK/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.c
new file mode 100644
index 0000000..3a40e77
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleTextInputEx.c
+
+Abstract:
+
+ EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL from the UEFI 2.1 specification.
+
+ This protocol defines an extension to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ which exposes much more state and modifier information from the input device,
+ also allows one to register a notification for a particular keystroke.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (SimpleTextInputEx)
+
+EFI_GUID gEfiSimpleTextInputExProtocolGuid = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSimpleTextInputExProtocolGuid, "Simple Text Input Ex Protocol", "UEFI 2.1 Simple Text Input Ex Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.h b/EDK/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.h
new file mode 100644
index 0000000..4a04f9c
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.h
@@ -0,0 +1,255 @@
+/*++
+
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleTextInputEx.h
+
+Abstract:
+
+ EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL from the UEFI 2.1 specification.
+
+ This protocol defines an extension to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ which exposes much more state and modifier information from the input device,
+ also allows one to register a notification for a particular keystroke.
+
+--*/
+
+#ifndef __SIMPLE_TEXT_INPUT_EX_H__
+#define __SIMPLE_TEXT_INPUT_EX_H__
+
+#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
+
+#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
+ { \
+ 0xdd9e7534, 0x7762, 0x4698, 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa\
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL);
+
+//
+// Data structures
+//
+
+typedef UINT8 EFI_KEY_TOGGLE_STATE;
+//
+// Any Shift or Toggle State that is valid should have
+// high order bit set.
+//
+typedef struct EFI_KEY_STATE {
+ UINT32 KeyShiftState;
+ EFI_KEY_TOGGLE_STATE KeyToggleState;
+} EFI_KEY_STATE;
+
+typedef struct {
+ EFI_INPUT_KEY Key;
+ EFI_KEY_STATE KeyState;
+} EFI_KEY_DATA;
+
+//
+// Shift state
+//
+#define EFI_SHIFT_STATE_VALID 0x80000000
+#define EFI_RIGHT_SHIFT_PRESSED 0x00000001
+#define EFI_LEFT_SHIFT_PRESSED 0x00000002
+#define EFI_RIGHT_CONTROL_PRESSED 0x00000004
+#define EFI_LEFT_CONTROL_PRESSED 0x00000008
+#define EFI_RIGHT_ALT_PRESSED 0x00000010
+#define EFI_LEFT_ALT_PRESSED 0x00000020
+#define EFI_RIGHT_LOGO_PRESSED 0x00000040
+#define EFI_LEFT_LOGO_PRESSED 0x00000080
+#define EFI_MENU_KEY_PRESSED 0x00000100
+#define EFI_SYS_REQ_PRESSED 0x00000200
+
+//
+// Toggle state
+//
+#define EFI_TOGGLE_STATE_VALID 0x80
+#define EFI_SCROLL_LOCK_ACTIVE 0x01
+#define EFI_NUM_LOCK_ACTIVE 0x02
+#define EFI_CAPS_LOCK_ACTIVE 0x04
+
+//
+// EFI Scan codes
+//
+#define SCAN_F13 0x0068
+#define SCAN_F14 0x0069
+#define SCAN_F15 0x006A
+#define SCAN_F16 0x006B
+#define SCAN_F17 0x006C
+#define SCAN_F18 0x006D
+#define SCAN_F19 0x006E
+#define SCAN_F20 0x006F
+#define SCAN_F21 0x0070
+#define SCAN_F22 0x0071
+#define SCAN_F23 0x0072
+#define SCAN_F24 0x0073
+#define SCAN_MUTE 0x007F
+#define SCAN_VOLUME_UP 0x0080
+#define SCAN_VOLUME_DOWN 0x0081
+#define SCAN_BRIGHTNESS_UP 0x0100
+#define SCAN_BRIGHTNESS_DOWN 0x0101
+#define SCAN_SUSPEND 0x0102
+#define SCAN_HIBERNATE 0x0103
+#define SCAN_TOGGLE_DISPLAY 0x0104
+#define SCAN_RECOVERY 0x0105
+#define SCAN_EJECT 0x0106
+
+
+//
+// EFI Key Notfication Function
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_KEY_NOTIFY_FUNCTION) (
+ IN EFI_KEY_DATA *KeyData
+ )
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_INPUT_RESET_EX) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ IN BOOLEAN ExtendedVerification
+ )
+/*++
+
+ Routine Description:
+ Reset the input device and optionaly run diagnostics
+
+ Arguments:
+ This - Protocol instance pointer.
+ ExtendedVerification - Driver may perform diagnostics on reset.
+
+ Returns:
+ EFI_SUCCESS - The device was reset.
+ EFI_DEVICE_ERROR - The device is not functioning properly and could
+ not be reset.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_INPUT_READ_KEY_EX) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ OUT EFI_KEY_DATA *KeyData
+ )
+/*++
+
+ Routine Description:
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
+
+ Arguments:
+ This - Protocol instance pointer.
+ KeyData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
+
+ Returns:
+ EFI_SUCCESS - The keystroke information was returned.
+ EFI_NOT_READY - There was no keystroke data availiable.
+ EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ hardware errors.
+ EFI_INVALID_PARAMETER - KeyData is NULL.
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_STATE) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ IN EFI_KEY_TOGGLE_STATE *KeyToggleState
+ )
+/*++
+
+ Routine Description:
+ Set certain state for the input device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
+ state for the input device.
+
+ Returns:
+ EFI_SUCCESS - The device state was set successfully.
+ EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ not have the setting adjusted.
+ EFI_UNSUPPORTED - The device does not have the ability to set its state.
+ EFI_INVALID_PARAMETER - KeyToggleState is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ IN EFI_KEY_DATA *KeyData,
+ IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
+ OUT EFI_HANDLE *NotifyHandle
+ )
+/*++
+
+ Routine Description:
+ Register a notification function for a particular keystroke for the input device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ KeyData - A pointer to a buffer that is filled in with the keystroke
+ information data for the key that was pressed.
+ KeyNotificationFunction - Points to the function to be called when the key
+ sequence is typed specified by KeyData.
+ NotifyHandle - Points to the unique handle assigned to the registered notification.
+
+ Returns:
+ EFI_SUCCESS - The notification function was registered successfully.
+ EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
+ EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ IN EFI_HANDLE NotificationHandle
+ )
+/*++
+
+ Routine Description:
+ Remove a registered notification function from a particular keystroke.
+
+ Arguments:
+ This - Protocol instance pointer.
+ NotificationHandle - The handle of the notification function being unregistered.
+
+ Returns:
+ EFI_SUCCESS - The notification function was unregistered successfully.
+ EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
+ EFI_NOT_FOUND - Can not find the matching entry in database.
+
+--*/
+;
+
+typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
+ EFI_INPUT_RESET_EX Reset;
+ EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx;
+ EFI_EVENT WaitForKeyEx;
+ EFI_SET_STATE SetState;
+ EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify;
+ EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify;
+} EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
+
+extern EFI_GUID gEfiSimpleTextInputExProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/SimpleTextOut/SimpleTextOut.c b/EDK/Foundation/Efi/Protocol/SimpleTextOut/SimpleTextOut.c
new file mode 100644
index 0000000..cb8b929
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleTextOut/SimpleTextOut.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleTextOut.c
+
+Abstract:
+
+ Simple Text Out protocol from the EFI 1.0 specification.
+
+ Abstraction of a very simple text based output device like VGA text mode or
+ a serial terminal.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (SimpleTextOut)
+
+EFI_GUID gEfiSimpleTextOutProtocolGuid = EFI_SIMPLE_TEXT_OUT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSimpleTextOutProtocolGuid, "Simple Text Out Protocol", "EFI 1.0 Simple Text Out Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/SimpleTextOut/SimpleTextOut.h b/EDK/Foundation/Efi/Protocol/SimpleTextOut/SimpleTextOut.h
new file mode 100644
index 0000000..012eef6
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/SimpleTextOut/SimpleTextOut.h
@@ -0,0 +1,423 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ SimpleTextOut.h
+
+Abstract:
+
+ Simple Text Out protocol from the EFI 1.0 specification.
+
+ Abstraction of a very simple text based output device like VGA text mode or
+ a serial terminal. The Simple Text Out protocol instance can represent
+ a single hardware device or a virtual device that is an agregation
+ of multiple physical devices.
+
+--*/
+
+#ifndef _SIMPLE_TEXT_OUT_H_
+#define _SIMPLE_TEXT_OUT_H_
+
+#define EFI_SIMPLE_TEXT_OUT_PROTOCOL_GUID \
+ { \
+ 0x387477c2, 0x69c7, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SIMPLE_TEXT_OUT_PROTOCOL);
+
+//
+// Define's for required EFI Unicode Box Draw characters
+//
+#define BOXDRAW_HORIZONTAL 0x2500
+#define BOXDRAW_VERTICAL 0x2502
+#define BOXDRAW_DOWN_RIGHT 0x250c
+#define BOXDRAW_DOWN_LEFT 0x2510
+#define BOXDRAW_UP_RIGHT 0x2514
+#define BOXDRAW_UP_LEFT 0x2518
+#define BOXDRAW_VERTICAL_RIGHT 0x251c
+#define BOXDRAW_VERTICAL_LEFT 0x2524
+#define BOXDRAW_DOWN_HORIZONTAL 0x252c
+#define BOXDRAW_UP_HORIZONTAL 0x2534
+#define BOXDRAW_VERTICAL_HORIZONTAL 0x253c
+#define BOXDRAW_DOUBLE_HORIZONTAL 0x2550
+#define BOXDRAW_DOUBLE_VERTICAL 0x2551
+#define BOXDRAW_DOWN_RIGHT_DOUBLE 0x2552
+#define BOXDRAW_DOWN_DOUBLE_RIGHT 0x2553
+#define BOXDRAW_DOUBLE_DOWN_RIGHT 0x2554
+#define BOXDRAW_DOWN_LEFT_DOUBLE 0x2555
+#define BOXDRAW_DOWN_DOUBLE_LEFT 0x2556
+#define BOXDRAW_DOUBLE_DOWN_LEFT 0x2557
+#define BOXDRAW_UP_RIGHT_DOUBLE 0x2558
+#define BOXDRAW_UP_DOUBLE_RIGHT 0x2559
+#define BOXDRAW_DOUBLE_UP_RIGHT 0x255a
+#define BOXDRAW_UP_LEFT_DOUBLE 0x255b
+#define BOXDRAW_UP_DOUBLE_LEFT 0x255c
+#define BOXDRAW_DOUBLE_UP_LEFT 0x255d
+#define BOXDRAW_VERTICAL_RIGHT_DOUBLE 0x255e
+#define BOXDRAW_VERTICAL_DOUBLE_RIGHT 0x255f
+#define BOXDRAW_DOUBLE_VERTICAL_RIGHT 0x2560
+#define BOXDRAW_VERTICAL_LEFT_DOUBLE 0x2561
+#define BOXDRAW_VERTICAL_DOUBLE_LEFT 0x2562
+#define BOXDRAW_DOUBLE_VERTICAL_LEFT 0x2563
+#define BOXDRAW_DOWN_HORIZONTAL_DOUBLE 0x2564
+#define BOXDRAW_DOWN_DOUBLE_HORIZONTAL 0x2565
+#define BOXDRAW_DOUBLE_DOWN_HORIZONTAL 0x2566
+#define BOXDRAW_UP_HORIZONTAL_DOUBLE 0x2567
+#define BOXDRAW_UP_DOUBLE_HORIZONTAL 0x2568
+#define BOXDRAW_DOUBLE_UP_HORIZONTAL 0x2569
+#define BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE 0x256a
+#define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL 0x256b
+#define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL 0x256c
+
+//
+// EFI Required Block Elements Code Chart
+//
+#define BLOCKELEMENT_FULL_BLOCK 0x2588
+#define BLOCKELEMENT_LIGHT_SHADE 0x2591
+
+//
+// EFI Required Geometric Shapes Code Chart
+//
+#define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2
+#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba
+#define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc
+#define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4
+
+//
+// EFI Required Arrow shapes
+//
+#define ARROW_LEFT 0x2190
+#define ARROW_UP 0x2191
+#define ARROW_RIGHT 0x2192
+#define ARROW_DOWN 0x2193
+
+//
+// EFI Console Colours
+//
+#define EFI_BLACK 0x00
+#define EFI_BLUE 0x01
+#define EFI_GREEN 0x02
+#define EFI_CYAN (EFI_BLUE | EFI_GREEN)
+#define EFI_RED 0x04
+#define EFI_MAGENTA (EFI_BLUE | EFI_RED)
+#define EFI_BROWN (EFI_GREEN | EFI_RED)
+#define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED)
+#define EFI_BRIGHT 0x08
+#define EFI_DARKGRAY (EFI_BRIGHT)
+#define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT)
+#define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT)
+#define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT)
+#define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT)
+#define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT)
+#define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT)
+#define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
+
+#define EFI_TEXT_ATTR(f, b) ((f) | ((b) << 4))
+
+#define EFI_BACKGROUND_BLACK 0x00
+#define EFI_BACKGROUND_BLUE 0x10
+#define EFI_BACKGROUND_GREEN 0x20
+#define EFI_BACKGROUND_CYAN (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN)
+#define EFI_BACKGROUND_RED 0x40
+#define EFI_BACKGROUND_MAGENTA (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED)
+#define EFI_BACKGROUND_BROWN (EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
+#define EFI_BACKGROUND_LIGHTGRAY (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
+
+//
+// We currently define attributes from 0 - 7F for color manipulations
+// To internally handle the local display characteristics for a particular character, we are defining
+// Bit 7 to signify the local glyph representation for a character. If turned on, glyphs will be
+// pulled from the wide glyph database and will display locally as a wide character (16 X 19 versus 8 X 19)
+// If bit 7 is off, the narrow glyph database will be used. This does NOT affect information that is sent to
+// non-local displays (e.g. serial or LAN consoles).
+//
+#define EFI_WIDE_ATTRIBUTE 0x80
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TEXT_RESET) (
+ IN EFI_SIMPLE_TEXT_OUT_PROTOCOL * This,
+ IN BOOLEAN ExtendedVerification
+ )
+/*++
+
+ Routine Description:
+ Reset the text output device hardware and optionaly run diagnostics
+
+ Arguments:
+ This - Protocol instance pointer.
+ ExtendedVerification - Driver may perform more exhaustive verfication
+ operation of the device during reset.
+
+ Returns:
+ EFI_SUCCESS - The text output device was reset.
+ EFI_DEVICE_ERROR - The text output device is not functioning correctly and
+ could not be reset.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TEXT_OUTPUT_STRING) (
+ IN EFI_SIMPLE_TEXT_OUT_PROTOCOL * This,
+ IN CHAR16 *String
+ )
+/*++
+
+ Routine Description:
+ Write a Unicode string to the output device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - The NULL-terminated Unicode string to be displayed on the output
+ device(s). All output devices must also support the Unicode
+ drawing defined in this file.
+
+ Returns:
+ EFI_SUCCESS - The string was output to the device.
+ EFI_DEVICE_ERROR - The device reported an error while attempting to output
+ the text.
+ EFI_UNSUPPORTED - The output device's mode is not currently in a
+ defined text mode.
+ EFI_WARN_UNKNOWN_GLYPH - This warning code indicates that some of the
+ characters in the Unicode string could not be
+ rendered and were skipped.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TEXT_TEST_STRING) (
+ IN EFI_SIMPLE_TEXT_OUT_PROTOCOL * This,
+ IN CHAR16 *String
+ )
+/*++
+
+ Routine Description:
+ Verifies that all characters in a Unicode string can be output to the
+ target device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - The NULL-terminated Unicode string to be examined for the output
+ device(s).
+
+ Returns:
+ EFI_SUCCESS - The device(s) are capable of rendering the output string.
+ EFI_UNSUPPORTED - Some of the characters in the Unicode string cannot be
+ rendered by one or more of the output devices mapped
+ by the EFI handle.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TEXT_QUERY_MODE) (
+ IN EFI_SIMPLE_TEXT_OUT_PROTOCOL * This,
+ IN UINTN ModeNumber,
+ OUT UINTN *Columns,
+ OUT UINTN *Rows
+ )
+/*++
+
+ Routine Description:
+ Returns information for an available text mode that the output device(s)
+ supports.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ModeNumber - The mode number to return information on.
+ Columns, Rows - Returns the geometry of the text output device for the
+ requested ModeNumber.
+
+ Returns:
+ EFI_SUCCESS - The requested mode information was returned.
+ EFI_DEVICE_ERROR - The device had an error and could not complete the request.
+ EFI_UNSUPPORTED - The mode number was not valid.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TEXT_SET_MODE) (
+ IN EFI_SIMPLE_TEXT_OUT_PROTOCOL * This,
+ IN UINTN ModeNumber
+ )
+/*++
+
+ Routine Description:
+ Sets the output device(s) to a specified mode.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ModeNumber - The mode number to set.
+
+ Returns:
+ EFI_SUCCESS - The requested text mode was set.
+ EFI_DEVICE_ERROR - The device had an error and could not complete the request.
+ EFI_UNSUPPORTED - The mode number was not valid.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TEXT_SET_ATTRIBUTE) (
+ IN EFI_SIMPLE_TEXT_OUT_PROTOCOL * This,
+ IN UINTN Attribute
+ )
+/*++
+
+ Routine Description:
+ Sets the background and foreground colors for the OutputString () and
+ ClearScreen () functions.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Attribute - The attribute to set. Bits 0..3 are the foreground color, and
+ bits 4..6 are the background color. All other bits are undefined
+ and must be zero. The valid Attributes are defined in this file.
+
+ Returns:
+ EFI_SUCCESS - The attribute was set.
+ EFI_DEVICE_ERROR - The device had an error and could not complete the request.
+ EFI_UNSUPPORTED - The attribute requested is not defined.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TEXT_CLEAR_SCREEN) (
+ IN EFI_SIMPLE_TEXT_OUT_PROTOCOL * This
+ )
+/*++
+
+ Routine Description:
+ Clears the output device(s) display to the currently selected background
+ color.
+
+ Arguments:
+ This - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - The operation completed successfully.
+ EFI_DEVICE_ERROR - The device had an error and could not complete the request.
+ EFI_UNSUPPORTED - The output device is not in a valid text mode.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TEXT_SET_CURSOR_POSITION) (
+ IN EFI_SIMPLE_TEXT_OUT_PROTOCOL * This,
+ IN UINTN Column,
+ IN UINTN Row
+ )
+/*++
+
+ Routine Description:
+ Sets the current coordinates of the cursor position
+
+ Arguments:
+ This - Protocol instance pointer.
+ Column, Row - the position to set the cursor to. Must be greater than or
+ equal to zero and less than the number of columns and rows
+ by QueryMode ().
+
+ Returns:
+ EFI_SUCCESS - The operation completed successfully.
+ EFI_DEVICE_ERROR - The device had an error and could not complete the request.
+ EFI_UNSUPPORTED - The output device is not in a valid text mode, or the
+ cursor position is invalid for the current mode.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TEXT_ENABLE_CURSOR) (
+ IN EFI_SIMPLE_TEXT_OUT_PROTOCOL * This,
+ IN BOOLEAN Enable
+ )
+/*++
+
+ Routine Description:
+ Makes the cursor visible or invisible
+
+ Arguments:
+ This - Protocol instance pointer.
+ Visible - If TRUE, the cursor is set to be visible. If FALSE, the cursor is
+ set to be invisible.
+
+ Returns:
+ EFI_SUCCESS - The operation completed successfully.
+ EFI_DEVICE_ERROR - The device had an error and could not complete the
+ request, or the device does not support changing
+ the cursor mode.
+ EFI_UNSUPPORTED - The output device is not in a valid text mode.
+
+--*/
+;
+
+/*++
+ Mode Structure pointed to by Simple Text Out protocol.
+
+ MaxMode - The number of modes supported by QueryMode () and SetMode ().
+ Mode - The text mode of the output device(s).
+ Attribute - The current character output attribute
+ CursorColumn - The cursor's column.
+ CursorRow - The cursor's row.
+ CursorVisible - The cursor is currently visbile or not.
+
+--*/
+typedef struct {
+ INT32 MaxMode;
+
+ //
+ // current settings
+ //
+ INT32 Mode;
+ INT32 Attribute;
+ INT32 CursorColumn;
+ INT32 CursorRow;
+ BOOLEAN CursorVisible;
+} EFI_SIMPLE_TEXT_OUTPUT_MODE;
+
+typedef struct _EFI_SIMPLE_TEXT_OUT_PROTOCOL {
+ EFI_TEXT_RESET Reset;
+
+ EFI_TEXT_OUTPUT_STRING OutputString;
+ EFI_TEXT_TEST_STRING TestString;
+
+ EFI_TEXT_QUERY_MODE QueryMode;
+ EFI_TEXT_SET_MODE SetMode;
+ EFI_TEXT_SET_ATTRIBUTE SetAttribute;
+
+ EFI_TEXT_CLEAR_SCREEN ClearScreen;
+ EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition;
+ EFI_TEXT_ENABLE_CURSOR EnableCursor;
+
+ //
+ // Current mode
+ //
+ EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode;
+} EFI_SIMPLE_TEXT_OUT_PROTOCOL;
+
+extern EFI_GUID gEfiSimpleTextOutProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/TapeIo/TapeIo.c b/EDK/Foundation/Efi/Protocol/TapeIo/TapeIo.c
new file mode 100644
index 0000000..bd9c302
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/TapeIo/TapeIo.c
@@ -0,0 +1,28 @@
+/*++
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ TapeIo.c
+
+Abstract:
+ EFI_TAPE_IO_PROTOCOL as defined in the UEFI 2.0.
+ Provide services to control and access a tape device.
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (TapeIo)
+
+EFI_GUID gEfiTapeIoProtocolGuid = EFI_TAPE_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiTapeIoProtocolGuid, "Tape IO protoco", "UEFI 2.0 Tape IO protocol");
diff --git a/EDK/Foundation/Efi/Protocol/TapeIo/TapeIo.h b/EDK/Foundation/Efi/Protocol/TapeIo/TapeIo.h
new file mode 100644
index 0000000..5a3159f
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/TapeIo/TapeIo.h
@@ -0,0 +1,263 @@
+/*++
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ TapeIo.h
+
+Abstract:
+ EFI_TAPE_IO_PROTOCOL as defined in the UEFI 2.0.
+ Provide services to control and access a tape device.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_TAPE_IO_PROTOCOL_H__
+#define __EFI_TAPE_IO_PROTOCOL_H__
+
+#define EFI_TAPE_IO_PROTOCOL_GUID \
+ { \
+ 0x1e93e633, 0xd65a, 0x459e, {0xab, 0x84, 0x93, 0xd9, 0xec, 0x26, 0x6d, 0x18 } \
+ }
+
+typedef struct _EFI_TAPE_IO_PROTOCOL EFI_TAPE_IO_PROTOCOL;
+
+typedef struct {
+ UINT64 Signature;
+ UINT32 Revision;
+ UINT32 BootDescSize;
+ UINT32 BootDescCRC;
+ EFI_GUID TapeGUID;
+ EFI_GUID TapeType;
+ EFI_GUID TapeUnique;
+ UINT32 BLLocation;
+ UINT32 BLBlocksize;
+ UINT32 BLFilesize;
+ CHAR8 OSVersion[40];
+ CHAR8 AppVersion[40];
+ CHAR8 CreationDate[10];
+ CHAR8 CreationTime[10];
+ CHAR8 SystemName[256]; // UTF-8
+ CHAR8 TapeTitle[120]; // UTF-8
+ CHAR8 pad[468]; // pad to 1024
+} TAPE_HEADER;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TAPE_READ) (
+ IN EFI_TAPE_IO_PROTOCOL *This,
+ IN OUT UINTN *BufferSize,
+ OUT VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Reads from the tape.
+
+ Arguments:
+ This - A pointer to the EFI_TAPE_IO_PROTOCOL instance.
+ BufferSize - Size of the buffer in bytes pointed to by Buffer.
+ Buffer - Pointer to the buffer for data to be read into.
+
+ Returns:
+ EFI_SUCCESS - Data was successfully transferred from the media.
+ EFI_END_OF_FILE - A filemark was encountered which limited the data
+ transferred by the read operation or the head is positioned
+ just after a filemark.
+ EFI_NO_MEDIA - No media is loaded in the device.
+ EFI_NOT_READY - The transfer failed since the device was not ready (e.g. not
+ online). The transfer may be retried at a later time.
+ EFI_UNSUPPORTED - The device does not support this type of transfer.
+ EFI_TIMEOUT - The transfer failed to complete within the timeout specified.
+ EFI_MEDIA_CHANGED - The media in the device was changed since the last access.
+ The transfer was aborted since the current position of the
+ media may be incorrect.
+ EFI_INVALID_PARAMETER - A NULL Buffer was specified with a non-zero
+ BufferSize or the device is operating in fixed block
+ size mode and the BufferSize was not a multiple of
+ device¡¯s fixed block size
+ EFI_DEVICE_ERROR - A device error occurred while attempting to transfer data
+ from the media.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TAPE_WRITE) (
+ IN EFI_TAPE_IO_PROTOCOL *This,
+ IN UINTN *BufferSize,
+ IN VOID *Buffer
+ )
+/*++
+
+ Routine Description:
+ Writes to the tape.
+
+ Arguments:
+ This - A pointer to the EFI_TAPE_IO_PROTOCOL instance.
+ BufferSize - Size of the buffer in bytes pointed to by Buffer.
+ Buffer - Pointer to the buffer for data to be written from.
+
+ Returns:
+ EFI_SUCCESS - Data was successfully transferred to the media.
+ EFI_END_OF_MEDIA - The logical end of media has been reached. Data may have
+ been successfully transferred to the media.
+ EFI_NO_MEDIA - No media is loaded in the device.
+ EFI_NOT_READY - The transfer failed since the device was not ready (e.g. not
+ online). The transfer may be retried at a later time.
+ EFI_UNSUPPORTED - The device does not support this type of transfer.
+ EFI_TIMEOUT - The transfer failed to complete within the timeout specified.
+ EFI_MEDIA_CHANGED - The media in the device was changed since the last access.
+ The transfer was aborted since the current position of the
+ media may be incorrect.
+ EFI_WRITE_PROTECTED - The media in the device is write-protected. The transfer
+ was aborted since a write cannot be completed.
+ EFI_INVALID_PARAMETER - A NULL Buffer was specified with a non-zero
+ BufferSize or the device is operating in fixed block
+ size mode and the BufferSize was not a multiple of
+ device¡¯s fixed block size
+ EFI_DEVICE_ERROR A device error occurred while attempting to transfer data
+ from the media.
+
+--*/
+;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TAPE_REWIND) (
+ IN EFI_TAPE_IO_PROTOCOL *This
+ )
+/*++
+
+ Routine Description:
+ Rewinds the tape.
+
+ Arguments:
+ This - A pointer to the EFI_TAPE_IO_PROTOCOL instance.
+
+ Returns:
+ EFI_SUCCESS - The media was successfully repositioned.
+ EFI_NO_MEDIA - No media is loaded in the device.
+ EFI_NOT_READY - Repositioning the media failed since the device was not
+ ready (e.g. not online). The transfer may be retried at a later time.
+ EFI_UNSUPPORTED - The device does not support this type of media repositioning.
+ EFI_TIMEOUT - Repositioning of the media did not complete within the timeout specified.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to reposition the media.
+
+--*/
+;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TAPE_SPACE) (
+ IN EFI_TAPE_IO_PROTOCOL *This,
+ INTN Direction,
+ UINTN Type
+ )
+/*++
+
+ Routine Description:
+ Positions the tape.
+
+ Arguments:
+ This - A pointer to the EFI_TAPE_IO_PROTOCOL instance.
+ Direction - Direction and number of data blocks or filemarks to space over on media.
+ Type - Type of mark to space over on media.
+
+ Returns:
+ EFI_SUCCESS - The media was successfully repositioned.
+ EFI_END_OF_MEDIA - Beginning or end of media was reached before the
+ indicated number of data blocks or filemarks were found.
+ EFI_NO_MEDIA - No media is loaded in the device.
+ EFI_NOT_READY - The reposition failed since the device was not ready (e.g. not
+ online). The reposition may be retried at a later time.
+ EFI_UNSUPPORTED - The device does not support this type of repositioning.
+ EFI_TIMEOUT - The repositioning failed to complete within the timeout specified.
+ EFI_MEDIA_CHANGED - The media in the device was changed since the last access.
+ Repositioning the media was aborted since the current
+ position of the media may be incorrect.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to reposition the media.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TAPE_WRITEFM) (
+ IN EFI_TAPE_IO_PROTOCOL *This,
+ IN UINTN Count
+ )
+/*++
+
+ Routine Description:
+ Writes filemarks to the media.
+
+ Arguments:
+ This - A pointer to the EFI_TAPE_IO_PROTOCOL instance.
+ Count - Number of filemarks to write to the media.
+
+ Returns:
+ EFI_SUCCESS - Data was successfully transferred from the media.
+ EFI_NO_MEDIA - No media is loaded in the device.
+ EFI_NOT_READY - The transfer failed since the device was not ready (e.g. not
+ online). The transfer may be retried at a later time.
+ EFI_UNSUPPORTED - The device does not support this type of repositioning.
+ EFI_TIMEOUT - The transfer failed to complete within the timeout specified.
+ EFI_MEDIA_CHANGED - The media in the device was changed since the last access.
+ The transfer was aborted since the current position of the
+ media may be incorrect.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to transfer data from the media.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TAPE_RESET) (
+ IN EFI_TAPE_IO_PROTOCOL *This,
+ IN BOOLEAN ExtendedVerification
+ )
+/*++
+
+ Routine Description:
+ Resets the tape device.
+
+ Arguments:
+ This - A pointer to the EFI_TAPE_IO_PROTOCOL instance.
+ ExtendedVerification - Indicates whether the parent bus should also be reset.
+
+ Returns:
+ EFI_SUCCESS - The bus and/or device were successfully reset.
+ EFI_NO_MEDIA - No media is loaded in the device.
+ EFI_NOT_READY - The reset failed since the device and/or bus was not ready.
+ The reset may be retried at a later time.
+ EFI_UNSUPPORTED - The device does not support this type of reset.
+ EFI_TIMEOUT - The reset did not complete within the timeout allowed.
+ EFI_DEVICE_ERROR - A device error occurred while attempting to reset the bus and/or device.
+
+--*/
+;
+
+struct _EFI_TAPE_IO_PROTOCOL {
+ EFI_TAPE_READ TapeRead;
+ EFI_TAPE_WRITE TapeWrite;
+ EFI_TAPE_REWIND TapeRewind;
+ EFI_TAPE_SPACE TapeSpace;
+ EFI_TAPE_WRITEFM TapeWriteFM;
+ EFI_TAPE_RESET TapeReset;
+};
+
+extern EFI_GUID gEfiTapeIoProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Tcp4/Tcp4.c b/EDK/Foundation/Efi/Protocol/Tcp4/Tcp4.c
new file mode 100644
index 0000000..3d7660e
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Tcp4/Tcp4.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2005 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Tcp4.c
+
+Abstract:
+
+ UEFI TCPv4 Protocol
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Tcp4)
+
+EFI_GUID gEfiTcp4ServiceBindingProtocolGuid = EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID;
+EFI_GUID gEfiTcp4ProtocolGuid = EFI_TCP4_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiTcp4ServiceBindingProtocolGuid, "TCP4 Service Binding Protocol", "TCP4 Service Binding Protocol");
+EFI_GUID_STRING(&gEfiTcp4ProtocolGuid, "TCP4 Protocol", "TCP4 Protocol");
+
diff --git a/EDK/Foundation/Efi/Protocol/Tcp4/Tcp4.h b/EDK/Foundation/Efi/Protocol/Tcp4/Tcp4.h
new file mode 100644
index 0000000..c482d35
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Tcp4/Tcp4.h
@@ -0,0 +1,247 @@
+/*++
+
+Copyright (c) 2005 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Tcp4.h
+
+Abstract:
+
+ UEFI TCPv4 Protocol Definition
+
+--*/
+
+#ifndef _TCP4_H_
+#define _TCP4_H_
+
+#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
+#include EFI_PROTOCOL_DEFINITION (Ip4)
+
+#define EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID \
+ { \
+ 0x00720665, 0x67EB, 0x4a99, 0xBA, 0xF7, 0xD3, 0xC3, 0x3A, 0x1C, 0x7C, 0xC9 \
+ }
+
+extern EFI_GUID gEfiTcp4ServiceBindingProtocolGuid;
+
+#define EFI_TCP4_PROTOCOL_GUID \
+ { \
+ 0x65530BC7, 0xA359, 0x410f, 0xB0, 0x10, 0x5A, 0xAD, 0xC7, 0xEC, 0x2B, 0x62 \
+ }
+
+extern EFI_GUID gEfiTcp4ProtocolGuid;
+
+EFI_FORWARD_DECLARATION (EFI_TCP4_PROTOCOL);
+
+typedef struct {
+ EFI_HANDLE InstanceHandle;
+ EFI_IPv4_ADDRESS LocalAddress;
+ UINT16 LocalPort;
+ EFI_IPv4_ADDRESS RemoteAddress;
+ UINT16 RemotePort;
+} EFI_TCP4_SERVICE_POINT;
+
+typedef struct {
+ EFI_HANDLE DriverHandle;
+ UINT32 ServiceCount;
+ EFI_TCP4_SERVICE_POINT Services[1];
+} EFI_TCP4_VARIABLE_DATA;
+
+typedef struct {
+ BOOLEAN UseDefaultAddress;
+ EFI_IPv4_ADDRESS StationAddress;
+ EFI_IPv4_ADDRESS SubnetMask;
+ UINT16 StationPort;
+ EFI_IPv4_ADDRESS RemoteAddress;
+ UINT16 RemotePort;
+ BOOLEAN ActiveFlag;
+} EFI_TCP4_ACCESS_POINT;
+
+typedef struct {
+ UINT32 ReceiveBufferSize;
+ UINT32 SendBufferSize;
+ UINT32 MaxSynBackLog;
+ UINT32 ConnectionTimeout;
+ UINT32 DataRetries;
+ UINT32 FinTimeout;
+ UINT32 TimeWaitTimeout;
+ UINT32 KeepAliveProbes;
+ UINT32 KeepAliveTime;
+ UINT32 KeepAliveInterval;
+ BOOLEAN EnableNagle;
+ BOOLEAN EnableTimeStamp;
+ BOOLEAN EnableWindowScaling;
+ BOOLEAN EnableSelectiveAck;
+ BOOLEAN EnablePathMtuDiscovery;
+} EFI_TCP4_OPTION;
+
+typedef struct {
+ UINT8 TypeOfService;
+ UINT8 TimeToLive;
+ EFI_TCP4_ACCESS_POINT AccessPoint;
+ EFI_TCP4_OPTION *ControlOption;
+} EFI_TCP4_CONFIG_DATA;
+
+typedef enum {
+ Tcp4StateClosed = 0,
+ Tcp4StateListen = 1,
+ Tcp4StateSynSent = 2,
+ Tcp4StateSynReceived= 3,
+ Tcp4StateEstablished= 4,
+ Tcp4StateFinWait1 = 5,
+ Tcp4StateFinWait2 = 6,
+ Tcp4StateClosing = 7,
+ Tcp4StateTimeWait = 8,
+ Tcp4StateCloseWait = 9,
+ Tcp4StateLastAck = 10
+} EFI_TCP4_CONNECTION_STATE;
+
+typedef struct {
+ EFI_EVENT Event;
+ EFI_STATUS Status;
+} EFI_TCP4_COMPLETION_TOKEN;
+
+typedef struct {
+ EFI_TCP4_COMPLETION_TOKEN CompletionToken;
+} EFI_TCP4_CONNECTION_TOKEN;
+
+typedef struct {
+ EFI_TCP4_COMPLETION_TOKEN CompletionToken;
+ EFI_HANDLE NewChildHandle;
+} EFI_TCP4_LISTEN_TOKEN;
+
+typedef struct {
+ UINT32 FragmentLength;
+ VOID *FragmentBuffer;
+} EFI_TCP4_FRAGMENT_DATA;
+
+typedef struct {
+ BOOLEAN UrgentFlag;
+ UINT32 DataLength;
+ UINT32 FragmentCount;
+ EFI_TCP4_FRAGMENT_DATA FragmentTable[1];
+} EFI_TCP4_RECEIVE_DATA;
+
+typedef struct {
+ BOOLEAN Push;
+ BOOLEAN Urgent;
+ UINT32 DataLength;
+ UINT32 FragmentCount;
+ EFI_TCP4_FRAGMENT_DATA FragmentTable[1];
+} EFI_TCP4_TRANSMIT_DATA;
+
+typedef struct {
+ EFI_TCP4_COMPLETION_TOKEN CompletionToken;
+ union {
+ EFI_TCP4_RECEIVE_DATA *RxData;
+ EFI_TCP4_TRANSMIT_DATA *TxData;
+ } Packet;
+} EFI_TCP4_IO_TOKEN;
+
+typedef struct {
+ EFI_TCP4_COMPLETION_TOKEN CompletionToken;
+ BOOLEAN AbortOnClose;
+} EFI_TCP4_CLOSE_TOKEN;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_GET_MODE_DATA) (
+ IN EFI_TCP4_PROTOCOL *This,
+ OUT EFI_TCP4_CONNECTION_STATE *Tcp4State OPTIONAL,
+ OUT EFI_TCP4_CONFIG_DATA *Tcp4ConfigData OPTIONAL,
+ OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
+ OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
+ OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_CONFIGURE) (
+ IN EFI_TCP4_PROTOCOL *This,
+ IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_ROUTES) (
+ IN EFI_TCP4_PROTOCOL *This,
+ IN BOOLEAN DeleteRoute,
+ IN EFI_IPv4_ADDRESS *SubnetAddress,
+ IN EFI_IPv4_ADDRESS *SubnetMask,
+ IN EFI_IPv4_ADDRESS *GatewayAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_CONNECT) (
+ IN EFI_TCP4_PROTOCOL *This,
+ IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_ACCEPT) (
+ IN EFI_TCP4_PROTOCOL *This,
+ IN EFI_TCP4_LISTEN_TOKEN *ListenToken
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_TRANSMIT) (
+ IN EFI_TCP4_PROTOCOL *This,
+ IN EFI_TCP4_IO_TOKEN *Token
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_RECEIVE) (
+ IN EFI_TCP4_PROTOCOL *This,
+ IN EFI_TCP4_IO_TOKEN *Token
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_CLOSE) (
+ IN EFI_TCP4_PROTOCOL *This,
+ IN EFI_TCP4_CLOSE_TOKEN *CloseToken
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_CANCEL) (
+ IN EFI_TCP4_PROTOCOL *This,
+ IN EFI_TCP4_COMPLETION_TOKEN *Token OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP4_POLL) (
+ IN EFI_TCP4_PROTOCOL *This
+ );
+
+typedef struct _EFI_TCP4_PROTOCOL {
+ EFI_TCP4_GET_MODE_DATA GetModeData;
+ EFI_TCP4_CONFIGURE Configure;
+ EFI_TCP4_ROUTES Routes;
+ EFI_TCP4_CONNECT Connect;
+ EFI_TCP4_ACCEPT Accept;
+ EFI_TCP4_TRANSMIT Transmit;
+ EFI_TCP4_RECEIVE Receive;
+ EFI_TCP4_CLOSE Close;
+ EFI_TCP4_CANCEL Cancel;
+ EFI_TCP4_POLL Poll;
+} EFI_TCP4_PROTOCOL;
+
+#define EFI_CONNECTION_FIN EFIERR (104)
+#define EFI_CONNECTION_RESET EFIERR (105)
+#define EFI_CONNECTION_REFUSED EFIERR (106)
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/Udp4/Udp4.c b/EDK/Foundation/Efi/Protocol/Udp4/Udp4.c
new file mode 100644
index 0000000..29b97b9
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Udp4/Udp4.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Udp4.c
+
+Abstract:
+
+ UEFI UDPv4 protocol.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (Udp4)
+
+EFI_GUID gEfiUdp4ServiceBindingProtocolGuid = EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID;
+EFI_GUID gEfiUdp4ProtocolGuid = EFI_UDP4_PROTOCOL_GUID;
+
+EFI_GUID_STRING (&gEfiUdp4ServiceBindingProtocolGuid, "UDP4 Service Binding Protocol", "UDP4 Service Binding Protocol");
+EFI_GUID_STRING (&gEfiUdp4ProtocolGuid, "UDP4 Protocol", "UDP4 Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/Udp4/Udp4.h b/EDK/Foundation/Efi/Protocol/Udp4/Udp4.h
new file mode 100644
index 0000000..68ad3f8
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/Udp4/Udp4.h
@@ -0,0 +1,214 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Udp4.h
+
+Abstract:
+
+--*/
+
+#ifndef _UDP4_H_
+#define _UDP4_H_
+
+#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
+#include EFI_PROTOCOL_DEFINITION (Ip4)
+
+//
+//GUID definitions
+//
+#define EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID \
+ { 0x83f01464, 0x99bd, 0x45e5, 0xb3, 0x83, 0xaf, 0x63, 0x05, 0xd8, 0xe9, 0xe6 }
+
+#define EFI_UDP4_PROTOCOL_GUID \
+ { 0x3ad9df29, 0x4501, 0x478d, 0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 }
+
+typedef struct {
+ EFI_HANDLE InstanceHandle;
+ EFI_IPv4_ADDRESS LocalAddress;
+ UINT16 LocalPort;
+ EFI_IPv4_ADDRESS RemoteAddress;
+ UINT16 RemotePort;
+} EFI_UDP4_SERVICE_POINT;
+
+typedef struct {
+ EFI_HANDLE DriverHandle;
+ UINT32 ServiceCount;
+ EFI_UDP4_SERVICE_POINT Services[1];
+} EFI_UDP4_VARIABLE_DATA;
+
+//
+//ICMP error definitions
+//
+#define EFI_NETWORK_UNREACHABLE EFIERR(100)
+#define EFI_HOST_UNREACHABLE EFIERR(101)
+#define EFI_PROTOCOL_UNREACHABLE EFIERR(102)
+#define EFI_PORT_UNREACHABLE EFIERR(103)
+
+EFI_FORWARD_DECLARATION (EFI_UDP4_PROTOCOL);
+
+//*************************************************
+// EFI_UDP4_FRAGMENT_DATA *
+//*************************************************
+typedef struct {
+ UINT32 FragmentLength;
+ VOID *FragmentBuffer;
+} EFI_UDP4_FRAGMENT_DATA;
+
+//*************************************************
+// EFI_UDP4_SESSION_DATA *
+//*************************************************
+typedef struct {
+ EFI_IPv4_ADDRESS SourceAddress;
+ UINT16 SourcePort;
+ EFI_IPv4_ADDRESS DestinationAddress;
+ UINT16 DestinationPort;
+} EFI_UDP4_SESSION_DATA;
+
+//************************************************
+// EFI_UDP4_CONFIG_DATA *
+//************************************************
+typedef struct {
+ //Receiving Filters
+ BOOLEAN AcceptBroadcast;
+ BOOLEAN AcceptPromiscuous;
+ BOOLEAN AcceptAnyPort;
+ BOOLEAN AllowDuplicatePort;
+ //I/O parameters
+ UINT8 TypeOfService;
+ UINT8 TimeToLive;
+ BOOLEAN DoNotFragment;
+ UINT32 ReceiveTimeout;
+ UINT32 TransmitTimeout;
+ //Access Point
+ BOOLEAN UseDefaultAddress;
+ EFI_IPv4_ADDRESS StationAddress;
+ EFI_IPv4_ADDRESS SubnetMask;
+ UINT16 StationPort;
+ EFI_IPv4_ADDRESS RemoteAddress;
+ UINT16 RemotePort;
+} EFI_UDP4_CONFIG_DATA;
+
+//*******************************************************
+// EFI_UDP4_TRANSMIT_DATA *
+//*******************************************************
+typedef struct {
+ EFI_UDP4_SESSION_DATA *UdpSessionData;
+ EFI_IPv4_ADDRESS *GatewayAddress;
+ UINT32 DataLength;
+ UINT32 FragmentCount;
+ EFI_UDP4_FRAGMENT_DATA FragmentTable[1];
+} EFI_UDP4_TRANSMIT_DATA;
+
+//*******************************************************
+// EFI_UDP4_RECEIVE_DATA *
+//*******************************************************
+typedef struct {
+ EFI_TIME TimeStamp;
+ EFI_EVENT RecycleSignal;
+ EFI_UDP4_SESSION_DATA UdpSession;
+ UINT32 DataLength;
+ UINT32 FragmentCount;
+ EFI_UDP4_FRAGMENT_DATA FragmentTable[1];
+} EFI_UDP4_RECEIVE_DATA;
+
+
+//*******************************************************
+// EFI_UDP4_COMPLETION_TOKEN *
+//*******************************************************
+typedef struct {
+ EFI_EVENT Event;
+ EFI_STATUS Status;
+ union {
+ EFI_UDP4_RECEIVE_DATA *RxData;
+ EFI_UDP4_TRANSMIT_DATA *TxData;
+ } Packet;
+} EFI_UDP4_COMPLETION_TOKEN;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP4_GET_MODE_DATA) (
+ IN EFI_UDP4_PROTOCOL *This,
+ OUT EFI_UDP4_CONFIG_DATA *Udp4ConfigData OPTIONAL,
+ OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
+ OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
+ OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP4_CONFIGURE) (
+ IN EFI_UDP4_PROTOCOL *This,
+ IN EFI_UDP4_CONFIG_DATA *UdpConfigData OPTIONAL
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP4_GROUPS) (
+ IN EFI_UDP4_PROTOCOL *This,
+ IN BOOLEAN JoinFlag,
+ IN EFI_IPv4_ADDRESS *MulticastAddress OPTIONAL
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP4_ROUTES) (
+ IN EFI_UDP4_PROTOCOL *This,
+ IN BOOLEAN DeleteRoute,
+ IN EFI_IPv4_ADDRESS *SubnetAddress,
+ IN EFI_IPv4_ADDRESS *SubnetMask,
+ IN EFI_IPv4_ADDRESS *GatewayAddress
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP4_TRANSMIT) (
+ IN EFI_UDP4_PROTOCOL *This,
+ IN EFI_UDP4_COMPLETION_TOKEN *Token
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP4_RECEIVE) (
+ IN EFI_UDP4_PROTOCOL *This,
+ IN EFI_UDP4_COMPLETION_TOKEN *Token
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP4_CANCEL)(
+ IN EFI_UDP4_PROTOCOL *This,
+ IN EFI_UDP4_COMPLETION_TOKEN *Token OPTIONAL
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP4_POLL) (
+ IN EFI_UDP4_PROTOCOL *This
+);
+
+typedef struct _EFI_UDP4_PROTOCOL {
+ EFI_UDP4_GET_MODE_DATA GetModeData;
+ EFI_UDP4_CONFIGURE Configure;
+ EFI_UDP4_GROUPS Groups;
+ EFI_UDP4_ROUTES Routes;
+ EFI_UDP4_TRANSMIT Transmit;
+ EFI_UDP4_RECEIVE Receive;
+ EFI_UDP4_CANCEL Cancel;
+ EFI_UDP4_POLL Poll;
+} EFI_UDP4_PROTOCOL;
+
+extern EFI_GUID gEfiUdp4ServiceBindingProtocolGuid;
+extern EFI_GUID gEfiUdp4ProtocolGuid;
+extern EFI_GUID gEfiUdp4RegistryDataGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/UgaDraw/UgaDraw.c b/EDK/Foundation/Efi/Protocol/UgaDraw/UgaDraw.c
new file mode 100644
index 0000000..a3d335e
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UgaDraw/UgaDraw.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UgaDraw.c
+
+Abstract:
+
+ UGA Draw protocol from the EFI 1.1 specification.
+
+ Abstraction of a very simple graphics device.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (UgaDraw)
+
+EFI_GUID gEfiUgaDrawProtocolGuid = EFI_UGA_DRAW_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiUgaDrawProtocolGuid, "UGA Draw Protocol", "EFI 1.1 UGA Draw Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/UgaDraw/UgaDraw.h b/EDK/Foundation/Efi/Protocol/UgaDraw/UgaDraw.h
new file mode 100644
index 0000000..e322f6b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UgaDraw/UgaDraw.h
@@ -0,0 +1,181 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UgaDraw.h
+
+Abstract:
+
+ UGA Draw protocol from the EFI 1.1 specification.
+
+ Abstraction of a very simple graphics device.
+
+--*/
+
+#ifndef __UGA_DRAW_H__
+#define __UGA_DRAW_H__
+
+#define EFI_UGA_DRAW_PROTOCOL_GUID \
+ { \
+ 0x982c298b, 0xf4fa, 0x41cb, 0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 \
+ }
+
+typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UGA_DRAW_PROTOCOL_GET_MODE) (
+ IN EFI_UGA_DRAW_PROTOCOL * This,
+ OUT UINT32 *HorizontalResolution,
+ OUT UINT32 *VerticalResolution,
+ OUT UINT32 *ColorDepth,
+ OUT UINT32 *RefreshRate
+ )
+/*++
+
+ Routine Description:
+ Return the current video mode information.
+
+ Arguments:
+ This - Protocol instance pointer.
+ HorizontalResolution - Current video horizontal resolution in pixels
+ VerticalResolution - Current video vertical resolution in pixels
+ ColorDepth - Current video color depth in bits per pixel
+ RefreshRate - Current video refresh rate in Hz.
+
+ Returns:
+ EFI_SUCCESS - Mode information returned.
+ EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
+ EFI_INVALID_PARAMETER - One of the input args was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UGA_DRAW_PROTOCOL_SET_MODE) (
+ IN EFI_UGA_DRAW_PROTOCOL * This,
+ IN UINT32 HorizontalResolution,
+ IN UINT32 VerticalResolution,
+ IN UINT32 ColorDepth,
+ IN UINT32 RefreshRate
+ )
+/*++
+
+ Routine Description:
+ Return the current video mode information.
+
+ Arguments:
+ This - Protocol instance pointer.
+ HorizontalResolution - Current video horizontal resolution in pixels
+ VerticalResolution - Current video vertical resolution in pixels
+ ColorDepth - Current video color depth in bits per pixel
+ RefreshRate - Current video refresh rate in Hz.
+
+ Returns:
+ EFI_SUCCESS - Mode information returned.
+ EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
+
+--*/
+;
+
+typedef struct {
+ UINT8 Blue;
+ UINT8 Green;
+ UINT8 Red;
+ UINT8 Reserved;
+} EFI_UGA_PIXEL;
+
+typedef union {
+ EFI_UGA_PIXEL Pixel;
+ UINT32 Raw;
+} EFI_UGA_PIXEL_UNION;
+
+typedef enum {
+ EfiUgaVideoFill,
+ EfiUgaVideoToBltBuffer,
+ EfiUgaBltBufferToVideo,
+ EfiUgaVideoToVideo,
+ EfiUgaBltMax
+} EFI_UGA_BLT_OPERATION;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT) (
+ IN EFI_UGA_DRAW_PROTOCOL * This,
+ IN EFI_UGA_PIXEL * BltBuffer, OPTIONAL
+ IN EFI_UGA_BLT_OPERATION BltOperation,
+ IN UINTN SourceX,
+ IN UINTN SourceY,
+ IN UINTN DestinationX,
+ IN UINTN DestinationY,
+ IN UINTN Width,
+ IN UINTN Height,
+ IN UINTN Delta OPTIONAL
+ );
+
+/*++
+
+ Routine Description:
+ The following table defines actions for BltOperations:
+ EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
+ directly to every pixel of the video display rectangle
+ (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.
+ EfiUgaVideoToBltBuffer - Read data from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
+ the BltBuffer rectangle (DestinationX, DestinationY )
+ (DestinationX + Width, DestinationY + Height). If DestinationX or
+ DestinationY is not zero then Delta must be set to the length in bytes
+ of a row in the BltBuffer.
+ EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
+ video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
+ not zero then Delta must be set to the length in bytes of a row in the
+ BltBuffer.
+ EfiUgaVideoToVideo - Copy from the video display rectangle (SourceX, SourceY)
+ (SourceX + Width, SourceY + Height) .to the video display rectangle
+ (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
+ The BltBuffer and Delta are not used in this mode.
+
+ Arguments:
+ This - Protocol instance pointer.
+ BltBuffer - Buffer containing data to blit into video buffer. This
+ buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
+ BltOperation - Operation to perform on BlitBuffer and video memory
+ SourceX - X coordinate of source for the BltBuffer.
+ SourceY - Y coordinate of source for the BltBuffer.
+ DestinationX - X coordinate of destination for the BltBuffer.
+ DestinationY - Y coordinate of destination for the BltBuffer.
+ Width - Width of rectangle in BltBuffer in pixels.
+ Height - Hight of rectangle in BltBuffer in pixels.
+ Delta -
+
+ Returns:
+ EFI_SUCCESS - The Blt operation completed.
+ EFI_INVALID_PARAMETER - BltOperation is not valid.
+ EFI_DEVICE_ERROR - A hardware error occured writting to the video
+ buffer.
+
+--*/
+;
+
+typedef struct _EFI_UGA_DRAW_PROTOCOL {
+ EFI_UGA_DRAW_PROTOCOL_GET_MODE GetMode;
+ EFI_UGA_DRAW_PROTOCOL_SET_MODE SetMode;
+ EFI_UGA_DRAW_PROTOCOL_BLT Blt;
+} EFI_UGA_DRAW_PROTOCOL;
+
+extern EFI_GUID gEfiUgaDrawProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/UgaIo/UgaIo.c b/EDK/Foundation/Efi/Protocol/UgaIo/UgaIo.c
new file mode 100644
index 0000000..a31d483
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UgaIo/UgaIo.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UgaIo.c
+
+Abstract:
+
+ UGA IO protocol from the EFI 1.1 specification.
+
+ Abstraction of a very simple graphics device.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (UgaIo)
+
+EFI_GUID gEfiUgaIoProtocolGuid = EFI_UGA_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiUgaIoProtocolGuid, "UGA Protocol", "EFI 1.1 UGA Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/UgaIo/UgaIo.h b/EDK/Foundation/Efi/Protocol/UgaIo/UgaIo.h
new file mode 100644
index 0000000..9b74b9a
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UgaIo/UgaIo.h
@@ -0,0 +1,236 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UgaIo.h
+
+Abstract:
+
+ UGA IO protocol from the EFI 1.1 specification.
+
+ Abstraction of a very simple graphics device.
+
+--*/
+
+#ifndef __UGA_IO_H__
+#define __UGA_IO_H__
+
+#define EFI_UGA_IO_PROTOCOL_GUID \
+ { \
+ 0x61a4d49e, 0x6f68, 0x4f1b, 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 \
+ }
+
+typedef struct _EFI_UGA_IO_PROTOCOL EFI_UGA_IO_PROTOCOL;
+
+typedef UINT32 UGA_STATUS;
+
+typedef enum {
+ UgaDtParentBus = 1,
+ UgaDtGraphicsController,
+ UgaDtOutputController,
+ UgaDtOutputPort,
+ UgaDtOther
+}
+UGA_DEVICE_TYPE, *PUGA_DEVICE_TYPE;
+
+typedef UINT32 UGA_DEVICE_ID, *PUGA_DEVICE_ID;
+
+typedef struct {
+ UGA_DEVICE_TYPE deviceType;
+ UGA_DEVICE_ID deviceId;
+ UINT32 ui32DeviceContextSize;
+ UINT32 ui32SharedContextSize;
+}
+UGA_DEVICE_DATA, *PUGA_DEVICE_DATA;
+
+typedef struct _UGA_DEVICE {
+ VOID *pvDeviceContext;
+ VOID *pvSharedContext;
+ VOID *pvRunTimeContext;
+ struct _UGA_DEVICE *pParentDevice;
+ VOID *pvBusIoServices;
+ VOID *pvStdIoServices;
+ UGA_DEVICE_DATA deviceData;
+}
+UGA_DEVICE, *PUGA_DEVICE;
+
+#ifndef UGA_IO_REQUEST_CODE
+//
+// Prevent conflicts with UGA typedefs.
+//
+typedef enum {
+ UgaIoGetVersion = 1,
+ UgaIoGetChildDevice,
+ UgaIoStartDevice,
+ UgaIoStopDevice,
+ UgaIoFlushDevice,
+ UgaIoResetDevice,
+ UgaIoGetDeviceState,
+ UgaIoSetDeviceState,
+ UgaIoSetPowerState,
+ UgaIoGetMemoryConfiguration,
+ UgaIoSetVideoMode,
+ UgaIoCopyRectangle,
+ UgaIoGetEdidSegment,
+ UgaIoDeviceChannelOpen,
+ UgaIoDeviceChannelClose,
+ UgaIoDeviceChannelRead,
+ UgaIoDeviceChannelWrite,
+ UgaIoGetPersistentDataSize,
+ UgaIoGetPersistentData,
+ UgaIoSetPersistentData,
+ UgaIoGetDevicePropertySize,
+ UgaIoGetDeviceProperty,
+ UgaIoBtPrivateInterface
+}
+UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE;
+
+#endif
+
+typedef struct {
+ IN UGA_IO_REQUEST_CODE ioRequestCode;
+ IN VOID *pvInBuffer;
+ IN UINT64 ui64InBufferSize;
+ OUT VOID *pvOutBuffer;
+ IN UINT64 ui64OutBufferSize;
+ OUT UINT64 ui64BytesReturned;
+}
+UGA_IO_REQUEST, *PUGA_IO_REQUEST;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UGA_IO_PROTOCOL_CREATE_DEVICE) (
+ IN EFI_UGA_IO_PROTOCOL * This,
+ IN UGA_DEVICE * ParentDevice,
+ IN UGA_DEVICE_DATA * DeviceData,
+ IN VOID *RunTimeContext,
+ OUT UGA_DEVICE **Device
+ );
+
+/*++
+
+ Routine Description:
+
+ Dynamically allocate storage for a child UGA_DEVICE .
+
+ Arguments:
+
+ This - The EFI_UGA_IO_PROTOCOL instance. Type EFI_UGA_IO_PROTOCOL is
+ defined in Section 10.7.
+
+ ParentDevice - ParentDevice specifies a pointer to the parent device of Device.
+
+ DeviceData - A pointer to UGA_DEVICE_DATA returned from a call to DispatchService()
+ with a UGA_DEVICE of Parent and an IoRequest of type UgaIoGetChildDevice.
+
+ RuntimeContext - Context to associate with Device.
+
+ Device - The Device returns a dynamically allocated child UGA_DEVICE object
+ for ParentDevice. The caller is responsible for deleting Device.
+
+ Returns:
+
+ EFI_SUCCESS - Device was returned.
+
+ EFI_INVALID_PARAMETER - One of the arguments was not valid.
+
+ EFI_DEVICE_ERROR - The device had an error and could not complete the request.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UGA_IO_PROTOCOL_DELETE_DEVICE) (
+ IN EFI_UGA_IO_PROTOCOL * This,
+ IN UGA_DEVICE * Device
+ );
+
+/*++
+
+ Routine Description:
+
+ Delete a dynamically allocated child UGA_DEVICE object that was allocated via
+ CreateDevice() .
+
+ Arguments:
+
+ This - The EFI_UGA_IO_PROTOCOL instance. Type EFI_UGA_IO_PROTOCOL is defined
+ in Section 10.7.
+
+ Device - The Device points to a UGA_DEVICE object that was dynamically
+ allocated via a CreateDevice() call.
+
+ Returns:
+
+ EFI_SUCCESS - Device was deleted.
+
+ EFI_INVALID_PARAMETER - The Device was not allocated via CreateDevice()
+
+--*/
+typedef UGA_STATUS (EFIAPI *PUGA_FW_SERVICE_DISPATCH) (IN PUGA_DEVICE pDevice, IN OUT PUGA_IO_REQUEST pIoRequest);
+
+/*++
+
+ Routine Description:
+
+ This is the main UGA service dispatch routine for all UGA_IO_REQUEST s.
+
+ Arguments:
+
+ pDevice - pDevice specifies a pointer to a device object associated with a
+ device enumerated by a pIoRequest->ioRequestCode of type
+ UgaIoGetChildDevice. The root device for the EFI_UGA_IO_PROTOCOL
+ is represented by pDevice being set to NULL.
+
+ pIoRequest - pIoRequest points to a caller allocated buffer that contains data
+ defined by pIoRequest->ioRequestCode. See Related Definitions for
+ a definition of UGA_IO_REQUEST_CODE s and their associated data
+ structures.
+
+ Returns:
+
+ Varies depending on pIoRequest.
+
+--*/
+typedef struct _EFI_UGA_IO_PROTOCOL {
+ EFI_UGA_IO_PROTOCOL_CREATE_DEVICE CreateDevice;
+ EFI_UGA_IO_PROTOCOL_DELETE_DEVICE DeleteDevice;
+ PUGA_FW_SERVICE_DISPATCH DispatchService;
+} EFI_UGA_IO_PROTOCOL;
+
+extern EFI_GUID gEfiUgaIoProtocolGuid;
+
+//
+// Data structure that is stored in the EFI Configuration Table with the
+// EFI_UGA_IO_PROTOCOL_GUID. The option ROMs listed in this table may have
+// EBC UGA drivers.
+//
+typedef struct {
+ UINT32 Version;
+ UINT32 HeaderSize;
+ UINT32 SizeOfEntries;
+ UINT32 NumberOfEntries;
+} EFI_DRIVER_OS_HANDOFF_HEADER;
+
+typedef enum {
+ EfiUgaDriverFromPciRom,
+ EfiUgaDriverFromSystem,
+ EfiDriverHandoffMax
+} EFI_DRIVER_HANOFF_ENUM;
+
+typedef struct {
+ EFI_DRIVER_HANOFF_ENUM Type;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ VOID *PciRomImage;
+ UINT64 PciRomSize;
+} EFI_DRIVER_OS_HANDOFF;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c b/EDK/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c
new file mode 100644
index 0000000..dfe0870
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UnicodeCollation.c
+
+Abstract:
+
+ Unicode Collation protocol that follows the EFI 1.0 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (UnicodeCollation)
+
+EFI_GUID gEfiUnicodeCollationProtocolGuid = EFI_UNICODE_COLLATION_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiUnicodeCollationProtocolGuid, "Unicode Collation Protocol", "EFI 1.0 Unicode Collation Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h b/EDK/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h
new file mode 100644
index 0000000..211d6c4
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h
@@ -0,0 +1,211 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UnicodeCollation.h
+
+Abstract:
+
+ Unicode Collation protocol that follows the EFI 1.0 specification.
+
+--*/
+
+#ifndef _UNICODE_COLLATION_H_
+#define _UNICODE_COLLATION_H_
+
+#define EFI_UNICODE_COLLATION_PROTOCOL_GUID \
+ { \
+ 0x1d85cd7f, 0xf43d, 0x11d2, 0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_UNICODE_COLLATION_PROTOCOL);
+
+//
+// Protocol data structures and defines
+//
+#define EFI_UNICODE_BYTE_ORDER_MARK ((CHAR16)(0xfeff))
+#define EFI_UNICODE_BYTE_ORDER_MARK_REVERSE ((CHAR16)(0xfffe))
+
+//
+// Protocol member functions
+//
+typedef
+INTN
+(EFIAPI *EFI_UNICODE_COLLATION_STRICOLL) (
+ IN EFI_UNICODE_COLLATION_PROTOCOL * This,
+ IN CHAR16 *Str1,
+ IN CHAR16 *Str2
+ )
+/*++
+
+ Routine Description:
+ Performs a case-insensitive comparison of two Null-terminated Unicode
+ strings.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Str1 - A pointer to a Null-terminated Unicode string.
+ Str2 - A pointer to a Null-terminated Unicode string.
+
+ Returns:
+ 0 - Str1 is equivalent to Str2
+ > 0 - Str1 is lexically greater than Str2
+ < 0 - Str1 is lexically less than Str2
+
+--*/
+;
+
+typedef
+BOOLEAN
+(EFIAPI *EFI_UNICODE_COLLATION_METAIMATCH) (
+ IN EFI_UNICODE_COLLATION_PROTOCOL * This,
+ IN CHAR16 *String,
+ IN CHAR16 *Pattern
+ )
+/*++
+
+ Routine Description:
+ Performs a case-insensitive comparison of a Null-terminated Unicode
+ pattern string and a Null-terminated Unicode string.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - A pointer to a Null-terminated Unicode string.
+ Pattern - A pointer to a Null-terminated Unicode pattern string.
+
+ Returns:
+ TRUE - Pattern was found in String.
+ FALSE - Pattern was not found in String.
+
+--*/
+;
+
+typedef
+VOID
+(EFIAPI *EFI_UNICODE_COLLATION_STRLWR) (
+ IN EFI_UNICODE_COLLATION_PROTOCOL * This,
+ IN OUT CHAR16 *Str
+ )
+/*++
+
+ Routine Description:
+ Converts all the Unicode characters in a Null-terminated Unicode string to
+ lower case Unicode characters.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - A pointer to a Null-terminated Unicode string.
+
+ Returns:
+ NONE
+
+--*/
+;
+
+typedef
+VOID
+(EFIAPI *EFI_UNICODE_COLLATION_STRUPR) (
+ IN EFI_UNICODE_COLLATION_PROTOCOL * This,
+ IN OUT CHAR16 *Str
+ )
+/*++
+
+ Routine Description:
+ Converts all the Unicode characters in a Null-terminated Unicode string to upper
+ case Unicode characters.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - A pointer to a Null-terminated Unicode string.
+
+ Returns:
+ NONE
+
+--*/
+;
+
+typedef
+VOID
+(EFIAPI *EFI_UNICODE_COLLATION_FATTOSTR) (
+ IN EFI_UNICODE_COLLATION_PROTOCOL * This,
+ IN UINTN FatSize,
+ IN CHAR8 *Fat,
+ OUT CHAR16 *String
+ )
+/*++
+
+ Routine Description:
+ Converts an 8.3 FAT file name in an OEM character set to a Null-terminated
+ Unicode string.
+
+ Arguments:
+ This - Protocol instance pointer.
+ FatSize - The size of the string Fat in bytes.
+ Fat - A pointer to a Null-terminated string that contains an 8.3 file
+ name using an OEM character set.
+ String - A pointer to a Null-terminated Unicode string. The string must
+ be preallocated to hold FatSize Unicode characters.
+ Returns:
+ NONE
+
+--*/
+;
+
+typedef
+BOOLEAN
+(EFIAPI *EFI_UNICODE_COLLATION_STRTOFAT) (
+ IN EFI_UNICODE_COLLATION_PROTOCOL * This,
+ IN CHAR16 *String,
+ IN UINTN FatSize,
+ OUT CHAR8 *Fat
+ )
+/*++
+
+ Routine Description:
+ Converts a Null-terminated Unicode string to legal characters in a FAT
+ filename using an OEM character set.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - A pointer to a Null-terminated Unicode string. The string must
+ be preallocated to hold FatSize Unicode characters.
+ FatSize - The size of the string Fat in bytes.
+ Fat - A pointer to a Null-terminated string that contains an 8.3 file
+ name using an OEM character set.
+ Returns:
+ TRUE - Fat is a Long File Name
+ FALSE - Fat is an 8.3 file name
+
+--*/
+;
+
+typedef struct _EFI_UNICODE_COLLATION_PROTOCOL {
+ //
+ // general
+ //
+ EFI_UNICODE_COLLATION_STRICOLL StriColl;
+ EFI_UNICODE_COLLATION_METAIMATCH MetaiMatch;
+ EFI_UNICODE_COLLATION_STRLWR StrLwr;
+ EFI_UNICODE_COLLATION_STRUPR StrUpr;
+
+ //
+ // for supporting fat volumes
+ //
+ EFI_UNICODE_COLLATION_FATTOSTR FatToStr;
+ EFI_UNICODE_COLLATION_STRTOFAT StrToFat;
+
+ CHAR8 *SupportedLanguages;
+} EFI_UNICODE_COLLATION_PROTOCOL;
+
+extern EFI_GUID gEfiUnicodeCollationProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.c b/EDK/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.c
new file mode 100644
index 0000000..3fd5655
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UnicodeCollation2.c
+
+Abstract:
+
+ Unicode Collation2 protocol that follows the UEFI 2.0 specification.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (UnicodeCollation2)
+
+EFI_GUID gEfiUnicodeCollation2ProtocolGuid = EFI_UNICODE_COLLATION2_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiUnicodeCollation2ProtocolGuid, "Unicode Collation Protocol", "UEFI 2.0 Unicode Collation2 Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.h b/EDK/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.h
new file mode 100644
index 0000000..b9b150f
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.h
@@ -0,0 +1,211 @@
+/*++
+
+Copyright (c) 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UnicodeCollation2.h
+
+Abstract:
+
+ Unicode Collation2 protocol that follows the UEFI 2.0 specification.
+
+--*/
+
+#ifndef _UNICODE_COLLATION2_H_
+#define _UNICODE_COLLATION2_H_
+
+#define EFI_UNICODE_COLLATION2_PROTOCOL_GUID \
+ { \
+ 0xa4c751fc, 0x23ae, 0x4c3e, 0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_UNICODE_COLLATION2_PROTOCOL);
+
+//
+// Protocol data structures and defines
+//
+#define EFI_UNICODE_BYTE_ORDER_MARK ((CHAR16)(0xfeff))
+#define EFI_UNICODE_BYTE_ORDER_MARK_REVERSE ((CHAR16)(0xfffe))
+
+//
+// Protocol member functions
+//
+typedef
+INTN
+(EFIAPI *EFI_UNICODE_COLLATION2_STRICOLL) (
+ IN EFI_UNICODE_COLLATION2_PROTOCOL * This,
+ IN CHAR16 *Str1,
+ IN CHAR16 *Str2
+ )
+/*++
+
+ Routine Description:
+ Performs a case-insensitive comparison of two Null-terminated Unicode
+ strings.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Str1 - A pointer to a Null-terminated Unicode string.
+ Str2 - A pointer to a Null-terminated Unicode string.
+
+ Returns:
+ 0 - Str1 is equivalent to Str2
+ > 0 - Str1 is lexically greater than Str2
+ < 0 - Str1 is lexically less than Str2
+
+--*/
+;
+
+typedef
+BOOLEAN
+(EFIAPI *EFI_UNICODE_COLLATION2_METAIMATCH) (
+ IN EFI_UNICODE_COLLATION2_PROTOCOL * This,
+ IN CHAR16 *String,
+ IN CHAR16 *Pattern
+ )
+/*++
+
+ Routine Description:
+ Performs a case-insensitive comparison of a Null-terminated Unicode
+ pattern string and a Null-terminated Unicode string.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - A pointer to a Null-terminated Unicode string.
+ Pattern - A pointer to a Null-terminated Unicode pattern string.
+
+ Returns:
+ TRUE - Pattern was found in String.
+ FALSE - Pattern was not found in String.
+
+--*/
+;
+
+typedef
+VOID
+(EFIAPI *EFI_UNICODE_COLLATION2_STRLWR) (
+ IN EFI_UNICODE_COLLATION2_PROTOCOL * This,
+ IN OUT CHAR16 *Str
+ )
+/*++
+
+ Routine Description:
+ Converts all the Unicode characters in a Null-terminated Unicode string to
+ lower case Unicode characters.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - A pointer to a Null-terminated Unicode string.
+
+ Returns:
+ NONE
+
+--*/
+;
+
+typedef
+VOID
+(EFIAPI *EFI_UNICODE_COLLATION2_STRUPR) (
+ IN EFI_UNICODE_COLLATION2_PROTOCOL * This,
+ IN OUT CHAR16 *Str
+ )
+/*++
+
+ Routine Description:
+ Converts all the Unicode characters in a Null-terminated Unicode string to upper
+ case Unicode characters.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - A pointer to a Null-terminated Unicode string.
+
+ Returns:
+ NONE
+
+--*/
+;
+
+typedef
+VOID
+(EFIAPI *EFI_UNICODE_COLLATION2_FATTOSTR) (
+ IN EFI_UNICODE_COLLATION2_PROTOCOL * This,
+ IN UINTN FatSize,
+ IN CHAR8 *Fat,
+ OUT CHAR16 *String
+ )
+/*++
+
+ Routine Description:
+ Converts an 8.3 FAT file name in an OEM character set to a Null-terminated
+ Unicode string.
+
+ Arguments:
+ This - Protocol instance pointer.
+ FatSize - The size of the string Fat in bytes.
+ Fat - A pointer to a Null-terminated string that contains an 8.3 file
+ name using an OEM character set.
+ String - A pointer to a Null-terminated Unicode string. The string must
+ be preallocated to hold FatSize Unicode characters.
+ Returns:
+ NONE
+
+--*/
+;
+
+typedef
+BOOLEAN
+(EFIAPI *EFI_UNICODE_COLLATION2_STRTOFAT) (
+ IN EFI_UNICODE_COLLATION2_PROTOCOL * This,
+ IN CHAR16 *String,
+ IN UINTN FatSize,
+ OUT CHAR8 *Fat
+ )
+/*++
+
+ Routine Description:
+ Converts a Null-terminated Unicode string to legal characters in a FAT
+ filename using an OEM character set.
+
+ Arguments:
+ This - Protocol instance pointer.
+ String - A pointer to a Null-terminated Unicode string. The string must
+ be preallocated to hold FatSize Unicode characters.
+ FatSize - The size of the string Fat in bytes.
+ Fat - A pointer to a Null-terminated string that contains an 8.3 file
+ name using an OEM character set.
+ Returns:
+ TRUE - Fat is a Long File Name
+ FALSE - Fat is an 8.3 file name
+
+--*/
+;
+
+typedef struct _EFI_UNICODE_COLLATION2_PROTOCOL {
+ //
+ // general
+ //
+ EFI_UNICODE_COLLATION2_STRICOLL StriColl;
+ EFI_UNICODE_COLLATION2_METAIMATCH MetaiMatch;
+ EFI_UNICODE_COLLATION2_STRLWR StrLwr;
+ EFI_UNICODE_COLLATION2_STRUPR StrUpr;
+
+ //
+ // for supporting fat volumes
+ //
+ EFI_UNICODE_COLLATION2_FATTOSTR FatToStr;
+ EFI_UNICODE_COLLATION2_STRTOFAT StrToFat;
+
+ CHAR8 *SupportedLanguages;
+} EFI_UNICODE_COLLATION2_PROTOCOL;
+
+extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/UsbHostController/UsbHostController.c b/EDK/Foundation/Efi/Protocol/UsbHostController/UsbHostController.c
new file mode 100644
index 0000000..9260c0b
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UsbHostController/UsbHostController.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UsbHostController.c
+
+Abstract:
+
+ USB Host Controller protocol.
+
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (UsbHostController)
+
+EFI_GUID gEfiUsbHcProtocolGuid = EFI_USB_HC_PROTOCOL_GUID;
+EFI_GUID gEfiUsb2HcProtocolGuid = EFI_USB2_HC_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiUsbHcProtocolGuid, "Usb Host Controller Protocol", "USB 1.1 Host Controller");
+EFI_GUID_STRING(&gEfiUsb2HcProtocolGuid, "Usb2 Host Controller Protocol", "USB 2.0 Host Controller");
diff --git a/EDK/Foundation/Efi/Protocol/UsbHostController/UsbHostController.h b/EDK/Foundation/Efi/Protocol/UsbHostController/UsbHostController.h
new file mode 100644
index 0000000..5a673d8
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UsbHostController/UsbHostController.h
@@ -0,0 +1,411 @@
+/*++
+
+Copyright (c) 2004 - 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UsbHostController.h
+
+Abstract:
+
+
+--*/
+
+#ifndef _USB_HOSTCONTROLLER_H_
+#define _USB_HOSTCONTROLLER_H_
+
+#include "usb.h"
+#include EFI_PROTOCOL_DEFINITION (UsbIo)
+
+#define EFI_USB_HC_PROTOCOL_GUID \
+ { \
+ 0xf5089266, 0x1aa0, 0x4953, 0x97, 0xd8, 0x56, 0x2f, 0x8a, 0x73, 0xb5, 0x19 \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_USB_HC_PROTOCOL);
+
+typedef enum {
+ EfiUsbHcStateHalt,
+ EfiUsbHcStateOperational,
+ EfiUsbHcStateSuspend,
+ EfiUsbHcStateMaximum
+} EFI_USB_HC_STATE;
+
+#define EFI_USB_HC_RESET_GLOBAL 0x0001
+#define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002
+#define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004
+#define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008
+
+//
+// Protocol definitions
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_RESET) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT16 Attributes
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_GET_STATE) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ OUT EFI_USB_HC_STATE * State
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_SET_STATE) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN EFI_USB_HC_STATE State
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT8 DeviceAddress,
+ IN BOOLEAN IsSlowDevice,
+ IN UINT8 MaximumPacketLength,
+ IN EFI_USB_DEVICE_REQUEST * Request,
+ IN EFI_USB_DATA_DIRECTION TransferDirection,
+ IN OUT VOID *Data OPTIONAL,
+ IN OUT UINTN *DataLength OPTIONAL,
+ IN UINTN TimeOut,
+ OUT UINT32 *TransferResult
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_BULK_TRANSFER) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN UINT8 MaximumPacketLength,
+ IN OUT VOID *Data,
+ IN OUT UINTN *DataLength,
+ IN OUT UINT8 *DataToggle,
+ IN UINTN TimeOut,
+ OUT UINT32 *TransferResult
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN BOOLEAN IsSlowDevice,
+ IN UINT8 MaxiumPacketLength,
+ IN BOOLEAN IsNewTransfer,
+ IN OUT UINT8 *DataToggle,
+ IN UINTN PollingInterval OPTIONAL,
+ IN UINTN DataLength OPTIONAL,
+ IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL,
+ IN VOID *Context OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN BOOLEAN IsSlowDevice,
+ IN UINT8 MaximumPacketLength,
+ IN OUT VOID *Data,
+ IN OUT UINTN *DataLength,
+ IN OUT UINT8 *DataToggle,
+ IN UINTN TimeOut,
+ OUT UINT32 *TransferResult
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN UINT8 MaximumPacketLength,
+ IN OUT VOID *Data,
+ IN UINTN DataLength,
+ OUT UINT32 *TransferResult
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN UINT8 MaximumPacketLength,
+ IN OUT VOID *Data,
+ IN UINTN DataLength,
+ IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
+ IN VOID *Context OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ OUT UINT8 *PortNumber
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT8 PortNumber,
+ OUT EFI_USB_PORT_STATUS * PortStatus
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT8 PortNumber,
+ IN EFI_USB_PORT_FEATURE PortFeature
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE) (
+ IN EFI_USB_HC_PROTOCOL * This,
+ IN UINT8 PortNumber,
+ IN EFI_USB_PORT_FEATURE PortFeature
+ );
+
+typedef struct _EFI_USB_HC_PROTOCOL {
+ EFI_USB_HC_PROTOCOL_RESET Reset;
+ EFI_USB_HC_PROTOCOL_GET_STATE GetState;
+ EFI_USB_HC_PROTOCOL_SET_STATE SetState;
+ EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer;
+ EFI_USB_HC_PROTOCOL_BULK_TRANSFER BulkTransfer;
+ EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer;
+ EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer;
+ EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;
+ EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;
+ EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER GetRootHubPortNumber;
+ EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus;
+ EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature;
+ EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature;
+ UINT16 MajorRevision;
+ UINT16 MinorRevision;
+} EFI_USB_HC_PROTOCOL;
+
+extern EFI_GUID gEfiUsbHcProtocolGuid;
+
+
+#define EFI_USB2_HC_PROTOCOL_GUID \
+ { \
+ 0x3e745226, 0x9818, 0x45b6, 0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_USB2_HC_PROTOCOL);
+
+#define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004
+#define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008
+
+typedef struct {
+ UINT8 TranslatorHubAddress;
+ UINT8 TranslatorPortNumber;
+} EFI_USB2_HC_TRANSACTION_TRANSLATOR;
+
+//
+// Protocol definitions
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_CAPABILITY) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ OUT UINT8 *MaxSpeed,
+ OUT UINT8 *PortNumber,
+ OUT UINT8 *Is64BitCapable
+ );
+
+#define EFI_USB_SPEED_FULL 0x0000
+#define EFI_USB_SPEED_LOW 0x0001
+#define EFI_USB_SPEED_HIGH 0x0002
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_RESET) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT16 Attributes
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_STATE) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ OUT EFI_USB_HC_STATE *State
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_SET_STATE) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN EFI_USB_HC_STATE State
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 DeviceSpeed,
+ IN UINTN MaximumPacketLength,
+ IN EFI_USB_DEVICE_REQUEST *Request,
+ IN EFI_USB_DATA_DIRECTION TransferDirection,
+ IN OUT VOID *Data OPTIONAL,
+ IN OUT UINTN *DataLength OPTIONAL,
+ IN UINTN TimeOut,
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
+ OUT UINT32 *TransferResult
+ );
+
+#define EFI_USB_MAX_BULK_BUFFER_NUM 10
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_BULK_TRANSFER) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN UINT8 DeviceSpeed,
+ IN UINTN MaximumPacketLength,
+ IN UINT8 DataBuffersNumber,
+ IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
+ IN OUT UINTN *DataLength,
+ IN OUT UINT8 *DataToggle,
+ IN UINTN TimeOut,
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
+ OUT UINT32 *TransferResult
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN UINT8 DeviceSpeed,
+ IN UINTN MaxiumPacketLength,
+ IN BOOLEAN IsNewTransfer,
+ IN OUT UINT8 *DataToggle,
+ IN UINTN PollingInterval OPTIONAL,
+ IN UINTN DataLength OPTIONAL,
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
+ IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL,
+ IN VOID *Context OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN UINT8 DeviceSpeed,
+ IN UINTN MaximumPacketLength,
+ IN OUT VOID *Data,
+ IN OUT UINTN *DataLength,
+ IN OUT UINT8 *DataToggle,
+ IN UINTN TimeOut,
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
+ OUT UINT32 *TransferResult
+ );
+
+#define EFI_USB_MAX_ISO_BUFFER_NUM 7
+#define EFI_USB_MAX_ISO_BUFFER_NUM1 2
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN UINT8 DeviceSpeed,
+ IN UINTN MaximumPacketLength,
+ IN UINT8 DataBuffersNumber,
+ IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
+ IN UINTN DataLength,
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
+ OUT UINT32 *TransferResult
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT8 DeviceAddress,
+ IN UINT8 EndPointAddress,
+ IN UINT8 DeviceSpeed,
+ IN UINTN MaximumPacketLength,
+ IN UINT8 DataBuffersNumber,
+ IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
+ IN UINTN DataLength,
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
+ IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
+ IN VOID *Context OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT8 PortNumber,
+ OUT EFI_USB_PORT_STATUS *PortStatus
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT8 PortNumber,
+ IN EFI_USB_PORT_FEATURE PortFeature
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE) (
+ IN EFI_USB2_HC_PROTOCOL *This,
+ IN UINT8 PortNumber,
+ IN EFI_USB_PORT_FEATURE PortFeature
+ );
+
+typedef struct _EFI_USB2_HC_PROTOCOL {
+ EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability;
+ EFI_USB2_HC_PROTOCOL_RESET Reset;
+ EFI_USB2_HC_PROTOCOL_GET_STATE GetState;
+ EFI_USB2_HC_PROTOCOL_SET_STATE SetState;
+ EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer;
+ EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer;
+ EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer;
+ EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer;
+ EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;
+ EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;
+ EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus;
+ EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature;
+ EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature;
+ UINT16 MajorRevision;
+ UINT16 MinorRevision;
+} EFI_USB2_HC_PROTOCOL;
+
+extern EFI_GUID gEfiUsb2HcProtocolGuid;
+
+#endif
diff --git a/EDK/Foundation/Efi/Protocol/UsbIo/UsbIo.c b/EDK/Foundation/Efi/Protocol/UsbIo/UsbIo.c
new file mode 100644
index 0000000..929eefb
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UsbIo/UsbIo.c
@@ -0,0 +1,30 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UsbIo.c
+
+Abstract:
+
+ EFI Usb I/O Protocol
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+
+#include EFI_PROTOCOL_DEFINITION (UsbIo)
+
+EFI_GUID gEfiUsbIoProtocolGuid = EFI_USB_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiUsbIoProtocolGuid, "Usb IO Protocol", "EFI 1.1 Usb IO Protocol");
diff --git a/EDK/Foundation/Efi/Protocol/UsbIo/UsbIo.h b/EDK/Foundation/Efi/Protocol/UsbIo/UsbIo.h
new file mode 100644
index 0000000..1438e49
--- /dev/null
+++ b/EDK/Foundation/Efi/Protocol/UsbIo/UsbIo.h
@@ -0,0 +1,205 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ UsbIo.h
+
+Abstract:
+
+ EFI Usb I/O Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_USB_IO_H
+#define _EFI_USB_IO_H
+
+#include "usb.h"
+
+//
+// Global ID for the USB I/O Protocol
+//
+#define EFI_USB_IO_PROTOCOL_GUID \
+ { \
+ 0x2B2F68D6, 0x0CD2, 0x44cf, 0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_USB_IO_PROTOCOL);
+
+//
+// Asynchronous USB transfer call back function
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ASYNC_USB_TRANSFER_CALLBACK) (
+ IN VOID *Data,
+ IN UINTN DataLength,
+ IN VOID *Context,
+ IN UINT32 Status
+ );
+
+//
+// Prototype for EFI USB I/O protocol
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_CONTROL_TRANSFER) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ IN EFI_USB_DEVICE_REQUEST * Request,
+ IN EFI_USB_DATA_DIRECTION Direction,
+ IN UINT32 Timeout,
+ IN OUT VOID *Data OPTIONAL,
+ IN UINTN DataLength OPTIONAL,
+ OUT UINT32 *Status
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_BULK_TRANSFER) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ IN UINT8 DeviceEndpoint,
+ IN OUT VOID *Data,
+ IN OUT UINTN *DataLength,
+ IN UINTN Timeout,
+ OUT UINT32 *Status
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ IN UINT8 DeviceEndpoint,
+ IN BOOLEAN IsNewTransfer,
+ IN UINTN PollingInterval OPTIONAL,
+ IN UINTN DataLength OPTIONAL,
+ IN EFI_ASYNC_USB_TRANSFER_CALLBACK InterruptCallBack OPTIONAL,
+ IN VOID *Context OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_SYNC_INTERRUPT_TRANSFER) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ IN UINT8 DeviceEndpoint,
+ IN OUT VOID *Data,
+ IN OUT UINTN *DataLength,
+ IN UINTN Timeout,
+ OUT UINT32 *Status
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_ISOCHRONOUS_TRANSFER) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ IN UINT8 DeviceEndpoint,
+ IN OUT VOID *Data,
+ IN UINTN DataLength,
+ OUT UINT32 *Status
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ IN UINT8 DeviceEndpoint,
+ IN OUT VOID *Data,
+ IN UINTN DataLength,
+ IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
+ IN VOID *Context OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_PORT_RESET) (
+ IN EFI_USB_IO_PROTOCOL * This
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_GET_DEVICE_DESCRIPTOR) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ OUT EFI_USB_DEVICE_DESCRIPTOR * DeviceDescriptor
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_GET_CONFIG_DESCRIPTOR) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ OUT EFI_USB_CONFIG_DESCRIPTOR * ConfigurationDescriptor
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_GET_INTERFACE_DESCRIPTOR) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ OUT EFI_USB_INTERFACE_DESCRIPTOR * InterfaceDescriptor
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ IN UINT8 EndpointIndex,
+ OUT EFI_USB_ENDPOINT_DESCRIPTOR * EndpointDescriptor
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_GET_STRING_DESCRIPTOR) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ IN UINT16 LangID,
+ IN UINT8 StringID,
+ OUT CHAR16 **String
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_IO_GET_SUPPORTED_LANGUAGE) (
+ IN EFI_USB_IO_PROTOCOL * This,
+ OUT UINT16 **LangIDTable,
+ OUT UINT16 *TableSize
+ );
+
+//
+// Protocol Interface Structure
+//
+typedef struct _EFI_USB_IO_PROTOCOL {
+ //
+ // IO transfer
+ //
+ EFI_USB_IO_CONTROL_TRANSFER UsbControlTransfer;
+ EFI_USB_IO_BULK_TRANSFER UsbBulkTransfer;
+ EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER UsbAsyncInterruptTransfer;
+ EFI_USB_IO_SYNC_INTERRUPT_TRANSFER UsbSyncInterruptTransfer;
+ EFI_USB_IO_ISOCHRONOUS_TRANSFER UsbIsochronousTransfer;
+ EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsyncIsochronousTransfer;
+
+ //
+ // Common device request
+ //
+ EFI_USB_IO_GET_DEVICE_DESCRIPTOR UsbGetDeviceDescriptor;
+ EFI_USB_IO_GET_CONFIG_DESCRIPTOR UsbGetConfigDescriptor;
+ EFI_USB_IO_GET_INTERFACE_DESCRIPTOR UsbGetInterfaceDescriptor;
+ EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR UsbGetEndpointDescriptor;
+ EFI_USB_IO_GET_STRING_DESCRIPTOR UsbGetStringDescriptor;
+ EFI_USB_IO_GET_SUPPORTED_LANGUAGE UsbGetSupportedLanguages;
+
+ //
+ // Reset controller's parent port
+ //
+ EFI_USB_IO_PORT_RESET UsbPortReset;
+} EFI_USB_IO_PROTOCOL;
+
+extern EFI_GUID gEfiUsbIoProtocolGuid;
+
+#endif