summaryrefslogtreecommitdiff
path: root/EDK/Foundation/Efi/Protocol
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/Protocol
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'EDK/Foundation/Efi/Protocol')
-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
159 files changed, 17286 insertions, 0 deletions
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