summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Include
diff options
context:
space:
mode:
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2006-04-21 22:54:32 +0000
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2006-04-21 22:54:32 +0000
commit878ddf1fc3540a715f63594ed22b6929e881afb4 (patch)
treec56c44dac138137b510e1fba7c3efe5e4d84bea2 /EdkModulePkg/Include
downloadedk2-platforms-878ddf1fc3540a715f63594ed22b6929e881afb4.tar.xz
Initial import.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Include')
-rw-r--r--EdkModulePkg/Include/Common/CapsuleName.h28
-rw-r--r--EdkModulePkg/Include/Common/DecompressLibraryHob.h47
-rw-r--r--EdkModulePkg/Include/Common/FlashMap.h110
-rw-r--r--EdkModulePkg/Include/Common/Variable.h78
-rw-r--r--EdkModulePkg/Include/Common/WorkingBlockHeader.h47
-rw-r--r--EdkModulePkg/Include/EdkDxe.h95
-rw-r--r--EdkModulePkg/Include/EdkDxeCore.h53
-rw-r--r--EdkModulePkg/Include/EdkDxeDepex.h62
-rw-r--r--EdkModulePkg/Include/EdkPeiCore.h42
-rw-r--r--EdkModulePkg/Include/EdkPeim.h58
-rw-r--r--EdkModulePkg/Include/EdkPeimDepex.h56
-rw-r--r--EdkModulePkg/Include/Guid/AlternateFvBlock.h32
-rw-r--r--EdkModulePkg/Include/Guid/Bmp.h62
-rw-r--r--EdkModulePkg/Include/Guid/BootState.h36
-rw-r--r--EdkModulePkg/Include/Guid/CapsuleVendor.h35
-rw-r--r--EdkModulePkg/Include/Guid/CompatibleMemoryTested.h32
-rw-r--r--EdkModulePkg/Include/Guid/ConsoleInDevice.h29
-rw-r--r--EdkModulePkg/Include/Guid/ConsoleOutDevice.h29
-rw-r--r--EdkModulePkg/Include/Guid/ExtendedSalGuid.h279
-rw-r--r--EdkModulePkg/Include/Guid/FlashMapHob.h33
-rw-r--r--EdkModulePkg/Include/Guid/HotPlugDevice.h28
-rw-r--r--EdkModulePkg/Include/Guid/MemoryTypeInformation.h35
-rw-r--r--EdkModulePkg/Include/Guid/MiniShellFile.h30
-rw-r--r--EdkModulePkg/Include/Guid/PciHotplugDevice.h30
-rw-r--r--EdkModulePkg/Include/Guid/PciOptionRomTable.h46
-rw-r--r--EdkModulePkg/Include/Guid/PeiPeCoffLoader.h67
-rw-r--r--EdkModulePkg/Include/Guid/PeiPerformanceHob.h60
-rw-r--r--EdkModulePkg/Include/Guid/PrimaryConsoleInDevice.h29
-rw-r--r--EdkModulePkg/Include/Guid/PrimaryConsoleOutDevice.h28
-rw-r--r--EdkModulePkg/Include/Guid/PrimaryStandardErrorDevice.h28
-rw-r--r--EdkModulePkg/Include/Guid/ShellFile.h31
-rw-r--r--EdkModulePkg/Include/Guid/StandardErrorDevice.h29
-rw-r--r--EdkModulePkg/Include/Guid/StatusCode.h33
-rw-r--r--EdkModulePkg/Include/Guid/StatusCodeCallerId.h30
-rw-r--r--EdkModulePkg/Include/Guid/SystemNvDataGuid.h45
-rw-r--r--EdkModulePkg/Include/Library/CustomDecompressLib.h42
-rw-r--r--EdkModulePkg/Include/Library/EdkBsDataHubStatusCodeLib.h47
-rw-r--r--EdkModulePkg/Include/Library/EdkDxeSalLib.h141
-rw-r--r--EdkModulePkg/Include/Library/EdkFvbServiceLib.h250
-rw-r--r--EdkModulePkg/Include/Library/EdkGraphicsLib.h185
-rw-r--r--EdkModulePkg/Include/Library/EdkIfrSupportLib.h1270
-rw-r--r--EdkModulePkg/Include/Library/EdkMemoryStatusCodeLib.h48
-rw-r--r--EdkModulePkg/Include/Library/EdkPeCoffLoaderLib.h32
-rw-r--r--EdkModulePkg/Include/Library/EdkPeCoffLoaderX64Lib.h33
-rw-r--r--EdkModulePkg/Include/Library/EdkRtMemoryStatusCodeLib.h66
-rw-r--r--EdkModulePkg/Include/Library/EdkRtPlatformStatusCodeLib.h49
-rw-r--r--EdkModulePkg/Include/Library/EdkScsiLib.h299
-rw-r--r--EdkModulePkg/Include/Library/EdkUsbLib.h373
-rw-r--r--EdkModulePkg/Include/Library/TianoDecompressLib.h42
-rw-r--r--EdkModulePkg/Include/Ppi/BaseMemoryTest.h56
-rw-r--r--EdkModulePkg/Include/Ppi/FlashMap.h52
-rw-r--r--EdkModulePkg/Include/Ppi/PeiInMemory.h29
-rw-r--r--EdkModulePkg/Include/Ppi/StatusCodeMemory.h53
-rw-r--r--EdkModulePkg/Include/Protocol/AcpiS3Save.h61
-rw-r--r--EdkModulePkg/Include/Protocol/ConsoleControl.h121
-rw-r--r--EdkModulePkg/Include/Protocol/CustomizedDecompress.h137
-rw-r--r--EdkModulePkg/Include/Protocol/DebugAssert.h89
-rw-r--r--EdkModulePkg/Include/Protocol/DebugLevel.h40
-rw-r--r--EdkModulePkg/Include/Protocol/DiskInfo.h179
-rw-r--r--EdkModulePkg/Include/Protocol/EdkDecompress.h137
-rw-r--r--EdkModulePkg/Include/Protocol/ExtendedSalBootService.h113
-rw-r--r--EdkModulePkg/Include/Protocol/FaultTolerantWriteLite.h88
-rw-r--r--EdkModulePkg/Include/Protocol/FvbExtension.h53
-rw-r--r--EdkModulePkg/Include/Protocol/GenericMemoryTest.h156
-rw-r--r--EdkModulePkg/Include/Protocol/IsaAcpi.h177
-rw-r--r--EdkModulePkg/Include/Protocol/IsaIo.h174
-rw-r--r--EdkModulePkg/Include/Protocol/LoadPe32Image.h68
-rw-r--r--EdkModulePkg/Include/Protocol/OEMBadging.h79
-rw-r--r--EdkModulePkg/Include/Protocol/PciHotPlugRequest.h54
-rw-r--r--EdkModulePkg/Include/Protocol/Performance.h166
-rw-r--r--EdkModulePkg/Include/Protocol/Print.h50
-rw-r--r--EdkModulePkg/Include/Protocol/PxeDhcp4.h350
-rw-r--r--EdkModulePkg/Include/Protocol/PxeDhcp4CallBack.h85
-rw-r--r--EdkModulePkg/Include/Protocol/ScsiIo.h241
-rw-r--r--EdkModulePkg/Include/Protocol/SecurityPolicy.h33
-rw-r--r--EdkModulePkg/Include/Protocol/UgaIo.h236
-rw-r--r--EdkModulePkg/Include/Protocol/UgaSplash.h42
-rw-r--r--EdkModulePkg/Include/Protocol/usbatapi.h83
78 files changed, 7871 insertions, 0 deletions
diff --git a/EdkModulePkg/Include/Common/CapsuleName.h b/EdkModulePkg/Include/Common/CapsuleName.h
new file mode 100644
index 0000000000..651fbe3889
--- /dev/null
+++ b/EdkModulePkg/Include/Common/CapsuleName.h
@@ -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:
+
+ CapsuleName.h
+
+Abstract:
+
+--*/
+
+#ifndef _CAPSULE_NAME_H
+#define _CAPSULE_NAME_H
+
+//
+// If capsule data is passed via a variable, then this name should be used.
+//
+#define EFI_CAPSULE_VARIABLE_NAME L"CapsuleUpdateData"
+
+#endif
diff --git a/EdkModulePkg/Include/Common/DecompressLibraryHob.h b/EdkModulePkg/Include/Common/DecompressLibraryHob.h
new file mode 100644
index 0000000000..ee7b8a2ea1
--- /dev/null
+++ b/EdkModulePkg/Include/Common/DecompressLibraryHob.h
@@ -0,0 +1,47 @@
+/*++
+
+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:
+
+ DecompressLibraryHob.h
+
+Abstract:
+
+ Declaration of HOB that is used to pass decompressor library functions from PEI to DXE
+
+--*/
+
+#ifndef __DECOMPRESS_LIBRARY_HOB_H__
+#define __DECOMPRESS_LIBRARY_HOB_H__
+
+typedef
+RETURN_STATUS
+(EFIAPI *DECOMPRESS_LIBRARY_GET_INFO) (
+ IN CONST VOID *Source,
+ IN UINT32 SourceSize,
+ OUT UINT32 *DestinationSize,
+ OUT UINT32 *ScratchSize
+ );
+
+typedef
+RETURN_STATUS
+(EFIAPI *DECOMPRESS_LIBRARY_DECOMPRESS) (
+ IN CONST VOID *Source,
+ IN OUT VOID *Destination,
+ IN OUT VOID *Scratch
+ );
+
+typedef struct {
+ DECOMPRESS_LIBRARY_GET_INFO GetInfo;
+ DECOMPRESS_LIBRARY_DECOMPRESS Decompress;
+} DECOMPRESS_LIBRARY;
+
+#endif
diff --git a/EdkModulePkg/Include/Common/FlashMap.h b/EdkModulePkg/Include/Common/FlashMap.h
new file mode 100644
index 0000000000..829fa2ddd6
--- /dev/null
+++ b/EdkModulePkg/Include/Common/FlashMap.h
@@ -0,0 +1,110 @@
+/*++
+
+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:
+
+ FlashMap.h
+
+Abstract:
+
+ FlashMap PPI defined in Tiano
+
+ This code abstracts FlashMap access
+
+--*/
+
+#ifndef __COMMON_FLASHMAP_H__
+#define __COMMON_FLASHMAP_H__
+
+#include <Common/Hob.h>
+//
+// Definition for flash map GUIDed HOBs
+//
+typedef UINT32 EFI_FLASH_AREA_ATTRIBUTES;
+
+#define EFI_FLASH_AREA_FV 0x0001
+#define EFI_FLASH_AREA_SUBFV 0x0002
+#define EFI_FLASH_AREA_MEMMAPPED_FV 0x0004
+#define EFI_FLASH_AREA_REQUIRED 0x0008
+#define EFI_FLASH_AREA_CORRUPT 0x0010
+
+typedef UINT8 EFI_FLASH_AREA_TYPE;
+
+#define EFI_FLASH_AREA_RECOVERY_BIOS 0x0 // Recovery code
+#define EFI_FLASH_AREA_MAIN_BIOS 0x1 // Regular BIOS code
+#define EFI_FLASH_AREA_PAL_B 0x2 // PAL-B
+#define EFI_FLASH_AREA_RESERVED_03 0x3 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_RESERVED_04 0x4 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_DMI_FRU 0x5 // DMI FRU information
+#define EFI_FLASH_AREA_OEM_BINARY 0x6 // OEM Binary Code/data
+#define EFI_FLASH_AREA_RESERVED_07 0x7 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_RESERVED_08 0x8 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_RESERVED_09 0x9 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_RESERVED_0A 0x0a // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_EFI_VARIABLES 0x0b // EFI variables
+#define EFI_FLASH_AREA_MCA_LOG 0x0c // MCA error log
+#define EFI_FLASH_AREA_SMBIOS_LOG 0x0d // SMBIOS error log
+#define EFI_FLASH_AREA_FTW_BACKUP 0x0e // A backup block during FTW operations
+#define EFI_FLASH_AREA_FTW_STATE 0x0f // State information during FTW operations
+#define EFI_FLASH_AREA_UNUSED 0x0fd // Not used
+#define EFI_FLASH_AREA_GUID_DEFINED 0x0fe // Usage defined by a GUID
+#pragma pack(1)
+//
+// An individual sub-area Entry.
+// A single flash area may consist of more than one sub-area.
+//
+typedef struct {
+ EFI_FLASH_AREA_ATTRIBUTES Attributes;
+ UINT32 Reserved;
+ EFI_PHYSICAL_ADDRESS Base;
+ EFI_PHYSICAL_ADDRESS Length;
+ EFI_GUID FileSystem;
+} EFI_FLASH_SUBAREA_ENTRY;
+
+typedef struct {
+ UINT8 Reserved[3];
+ EFI_FLASH_AREA_TYPE AreaType;
+ EFI_GUID AreaTypeGuid;
+ UINT32 NumEntries;
+ EFI_FLASH_SUBAREA_ENTRY Entries[1];
+} EFI_FLASH_MAP_ENTRY_DATA;
+
+typedef struct {
+ EFI_HOB_GENERIC_HEADER Header;
+ EFI_GUID Name;
+ UINT8 Reserved[3];
+ EFI_FLASH_AREA_TYPE AreaType;
+ EFI_GUID AreaTypeGuid;
+ UINT32 NumEntries;
+ EFI_FLASH_SUBAREA_ENTRY Entries[1];
+} EFI_HOB_FLASH_MAP_ENTRY_TYPE;
+
+//
+// Internal definitions
+//
+typedef struct {
+ UINT8 Reserved[3];
+ EFI_FLASH_AREA_TYPE AreaType;
+ EFI_GUID AreaTypeGuid;
+ UINT32 NumberOfEntries;
+ EFI_FLASH_SUBAREA_ENTRY SubAreaData;
+} EFI_FLASH_AREA_HOB_DATA;
+
+typedef struct {
+ UINTN Base;
+ UINTN Length;
+ EFI_FLASH_AREA_ATTRIBUTES Attributes;
+ EFI_FLASH_AREA_TYPE AreaType;
+} EFI_FLASH_AREA_DATA;
+
+#pragma pack()
+
+#endif
diff --git a/EdkModulePkg/Include/Common/Variable.h b/EdkModulePkg/Include/Common/Variable.h
new file mode 100644
index 0000000000..e75adafc12
--- /dev/null
+++ b/EdkModulePkg/Include/Common/Variable.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:
+
+ EfiVariable.h
+
+Abstract:
+
+ Header file for EFI Variable Services
+
+--*/
+
+#ifndef _EFI_VARIABLE_H_
+#define _EFI_VARIABLE_H_
+
+#define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')
+
+#define MAX_VARIABLE_SIZE 1024
+
+#define VARIABLE_DATA 0x55AA
+
+//
+// Variable Store Header flags
+//
+#define VARIABLE_STORE_FORMATTED 0x5a
+#define VARIABLE_STORE_HEALTHY 0xfe
+
+//
+// Variable Store Status
+//
+typedef enum {
+ EfiRaw,
+ EfiValid,
+ EfiInvalid,
+ EfiUnknown
+} VARIABLE_STORE_STATUS;
+
+//
+// Variable State flags
+//
+#define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion
+#define VAR_DELETED 0xfd // Variable is obsolete
+#define VAR_ADDED 0x7f // Variable has been completely added
+#define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)
+
+#pragma pack(1)
+
+typedef struct {
+ UINT32 Signature;
+ UINT32 Size;
+ UINT8 Format;
+ UINT8 State;
+ UINT16 Reserved;
+ UINT32 Reserved1;
+} VARIABLE_STORE_HEADER;
+
+typedef struct {
+ UINT16 StartId;
+ UINT8 State;
+ UINT8 Reserved;
+ UINT32 Attributes;
+ UINT32 NameSize;
+ UINT32 DataSize;
+ EFI_GUID VendorGuid;
+} VARIABLE_HEADER;
+
+#pragma pack()
+
+#endif // _EFI_VARIABLE_H_
diff --git a/EdkModulePkg/Include/Common/WorkingBlockHeader.h b/EdkModulePkg/Include/Common/WorkingBlockHeader.h
new file mode 100644
index 0000000000..235b740e83
--- /dev/null
+++ b/EdkModulePkg/Include/Common/WorkingBlockHeader.h
@@ -0,0 +1,47 @@
+/*++
+
+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:
+
+ EfiWorkingBlockHeader.h
+
+Abstract:
+
+ Defines data structure that is the headers found at the runtime
+ updatable firmware volumes, such as the FileSystemGuid of the
+ working block, the header structure of the variable block, FTW
+ working block, or event log block.
+
+--*/
+
+#ifndef _EFI_WORKING_BLOCK_HEADER_H_
+#define _EFI_WORKING_BLOCK_HEADER_H_
+
+//
+// EFI Fault tolerant working block header
+// The header is immediately followed by the write queue.
+//
+typedef struct {
+ EFI_GUID Signature;
+ UINT32 Crc;
+ UINT32 WorkingBlockValid : 1;
+ UINT32 WorkingBlockInvalid : 1;
+#define WORKING_BLOCK_VALID 0x1
+#define WORKING_BLOCK_INVALID 0x2
+ UINT32 Reserved : 6;
+ UINT8 Reserved3[3];
+ UINTN WriteQueueSize;
+ //
+ // UINT8 WriteQueue[WriteQueueSize];
+ //
+} EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER;
+
+#endif
diff --git a/EdkModulePkg/Include/EdkDxe.h b/EdkModulePkg/Include/EdkDxe.h
new file mode 100644
index 0000000000..775c52e84c
--- /dev/null
+++ b/EdkModulePkg/Include/EdkDxe.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:
+ EdkDxe.h
+
+Abstract:
+ This file defines the base package surface area for writting a PEIM
+
+ Things defined in the Tiano specification go in DxeCis.h.
+
+ Dxe.h contains build environment and library information needed to build
+ a basic Dxe driver. This file must match the "base package" definition of
+ how to write a Dxe driver.
+
+--*/
+
+#ifndef __EDK_DXE_H__
+#define __EDK_DXE_H__
+
+//
+#include <Common/FlashMap.h>
+// BUGBUG: We must include this lib here due to ordering issues
+//
+#include <Ipf/SalApi.h>
+#include <Library/PeCoffLib.h>
+
+
+#include <Guid/MemoryTypeInformation.h>
+#include <Guid/FlashMapHob.h>
+#include <Guid/SystemNvDataGuid.h>
+#include <Guid/AlternateFvBlock.h>
+#include <Guid/ConsoleInDevice.h>
+#include <Guid/ConsoleOutDevice.h>
+#include <Guid/StandardErrorDevice.h>
+#include <Guid/HotPlugDevice.h>
+#include <Guid/PrimaryStandardErrorDevice.h>
+#include <Guid/PrimaryConsoleInDevice.h>
+#include <Guid/PrimaryConsoleOutDevice.h>
+#include <Guid/Bmp.h>
+#include <Guid/BootState.h>
+#include <Guid/ShellFile.h>
+#include <Guid/MiniShellFile.h>
+#include <Guid/StatusCode.h>
+#include <Guid/PciOptionRomTable.h>
+#include <Guid/PciHotplugDevice.h>
+#include <Guid/ExtendedSalGuid.h>
+#include <Guid/PeiPeCoffLoader.h>
+#include <Guid/CapsuleVendor.h>
+#include <Guid/CompatibleMemoryTested.h>
+
+#include <Ppi/StatusCodeMemory.h>
+
+#include <Protocol/CustomizedDecompress.h>
+#include <Protocol/DebugLevel.h>
+#include <Protocol/LoadPe32Image.h>
+#include <Protocol/EdkDecompress.h>
+#include <Protocol/Print.h>
+#include <Protocol/GenericMemoryTest.h>
+#include <Protocol/DiskInfo.h>
+#include <Protocol/FvbExtension.h>
+#include <Protocol/SecurityPolicy.h>
+#include <Protocol/FaultTolerantWriteLite.h>
+#include <Protocol/ConsoleControl.h>
+#include <Protocol/OEMBadging.h>
+#include <Protocol/LegacyBios.h>
+#include <Protocol/UgaSplash.h>
+#include <Protocol/AcpiS3Save.h>
+#include <Protocol/Performance.h>
+#include <Protocol/PxeDhcp4.h>
+#include <Protocol/PxeDhcp4Callback.h>
+#include <Protocol/UgaIo.h>
+#include <Protocol/DebugAssert.h>
+#include <Protocol/usbatapi.h>
+#include <Protocol/PciHotPlugRequest.h>
+#include <Protocol/ExtendedSalBootService.h>
+#include <Protocol/IsaAcpi.h>
+
+#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
+//
+// Tiano8.5 Module use ScsiPassThru protocol together with the original ScsiIo protocol
+// In UEFI2.0, Module use ScsiPassThruExt Protocol with new UEFI2.0 ScsiIo protocol
+//
+#include <Protocol/ScsiIo.h>
+#endif
+
+#endif
diff --git a/EdkModulePkg/Include/EdkDxeCore.h b/EdkModulePkg/Include/EdkDxeCore.h
new file mode 100644
index 0000000000..d1b4ca77e3
--- /dev/null
+++ b/EdkModulePkg/Include/EdkDxeCore.h
@@ -0,0 +1,53 @@
+/*++
+
+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:
+ EdkDxe.h
+
+Abstract:
+ This file defines the base package surface area for writting a PEIM
+
+ Things defined in the Tiano specification go in DxeCis.h.
+
+ Dxe.h contains build environment and library information needed to build
+ a basic Dxe driver. This file must match the "base package" definition of
+ how to write a Dxe driver.
+
+--*/
+
+#ifndef __EDK_DXE_CORE_H__
+#define __EDK_DXE_CORE_H__
+
+//
+// BUGBUG: We must include this lib here due to ordering issues
+//
+#include <Common/DecompressLibraryHob.h>
+#include <Library/PeCoffLib.h>
+
+//
+// BUGBUG: Performance related protocol and Guid.
+// They are Tiano-private, but are required for DxeCore
+//
+#include <Protocol/Performance.h>
+#include <Guid/PeiPerformanceHob.h>
+//
+// BUGBUG: Do these really belomg here?
+//
+#include <Guid/PeiPeCoffLoader.h>
+#include <Guid/MemoryTypeInformation.h>
+
+#include <Protocol/CustomizedDecompress.h>
+#include <Protocol/DebugLevel.h>
+#include <Protocol/LoadPe32Image.h>
+#include <Protocol/EdkDecompress.h>
+#include <Protocol/Print.h>
+
+#endif
diff --git a/EdkModulePkg/Include/EdkDxeDepex.h b/EdkModulePkg/Include/EdkDxeDepex.h
new file mode 100644
index 0000000000..1ce8be1832
--- /dev/null
+++ b/EdkModulePkg/Include/EdkDxeDepex.h
@@ -0,0 +1,62 @@
+/*++
+
+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:
+ EdkDxeDepex.h
+
+Abstract:
+ This include file is only used in *.DXS files. Do not use this
+ include file in normal DXE code.
+
+ Depex - Dependency Expresion
+
+ The BNF grammar is thus:
+ <depex> ::= before GUID
+ | after GUID
+ | SOR <bool>
+ | <bool>
+ <bool> ::= <bool> and <term>
+ | <bool> or <term>
+ | <term>
+ <term> ::= not <factor>
+ | <factor>
+ <factor> ::= <bool>
+ | <boolval>
+ | <depinst>
+ | <termval>
+ <boolval> ::= true
+ | false
+ <depinst> ::= push GUID
+ <termval> ::= end
+
+--*/
+
+#ifndef __EDK_DXE_DEPEX_H__
+#define __EDK_DXE_DEPEX_H__
+
+#include <EdkDxe.h>
+
+//
+// The Depex grammer needs the following strings so we must undo
+// any pre-processor redefinitions
+//
+#undef DEPENDENCY_START
+#undef BEFORE
+#undef AFTER
+#undef SOR
+#undef AND
+#undef OR
+#undef NOT
+#undef TRUE
+#undef FALSE
+#undef DEPENDENCY_END
+
+#endif
diff --git a/EdkModulePkg/Include/EdkPeiCore.h b/EdkModulePkg/Include/EdkPeiCore.h
new file mode 100644
index 0000000000..4e07efb01b
--- /dev/null
+++ b/EdkModulePkg/Include/EdkPeiCore.h
@@ -0,0 +1,42 @@
+/*++
+
+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:
+ EdkDxe.h
+
+Abstract:
+ This file defines the base package surface area for writting a PEIM
+
+ Things defined in the Tiano specification go in DxeCis.h.
+
+ Dxe.h contains build environment and library information needed to build
+ a basic Dxe driver. This file must match the "base package" definition of
+ how to write a Dxe driver.
+
+--*/
+
+#ifndef __EDK_PEI_CORE_H__
+#define __EDK_PEI_CORE_H__
+
+//
+// BUGBUG: We must include this lib here due to ordering issues
+//
+#include <Library/PeCoffLib.h>
+
+#include <Guid/PeiPeCoffLoader.h>
+
+//
+// BUGBUG: Performance related Guid.
+// It is Tiano-private, but is required for PeiCore
+//
+#include <Guid/PeiPerformanceHob.h>
+
+#endif
diff --git a/EdkModulePkg/Include/EdkPeim.h b/EdkModulePkg/Include/EdkPeim.h
new file mode 100644
index 0000000000..5da04e555e
--- /dev/null
+++ b/EdkModulePkg/Include/EdkPeim.h
@@ -0,0 +1,58 @@
+/*++
+
+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:
+
+ EdkPeim.h
+
+Abstract:
+ This file defines the base package surface area for writting a PEIM
+
+ Things defined in the PEI CIS specification go in PeiCis.h.
+
+ EdkPeim.h contains build environment and library information needed to build
+ a basic PEIM that needs Tiano specific definitiosn. T
+
+ Currently we just add in some extra PPI and GUID definitions
+
+--*/
+
+#ifndef __EDK_PEIM_H__
+#define __EDK_PEIM_H__
+
+//
+#include <Common/FlashMap.h>
+#include <Common/DecompressLibraryHob.h>
+// BUGBUG: We must include this lib here due to ordering issues
+//
+#include <Library/PeCoffLib.h>
+
+//
+// BUGBUG: Performance related Guid.
+// It is Tiano-private, but is required for PeiCore
+//
+#include <Guid/PeiPerformanceHob.h>
+#include <Guid/PeiPeCoffLoader.h>
+#include <Guid/SystemNvDataGuid.h>
+#include <Guid/FlashMapHob.h>
+#include <Guid/MemoryTypeInformation.h>
+
+#include <Ppi/PeiInMemory.h>
+#include <Ppi/FlashMap.h>
+#include <Ppi/BaseMemoryTest.h>
+#include <Ppi/StatusCodeMemory.h>
+
+#include <Protocol/CustomizedDecompress.h>
+#include <Protocol/EdkDecompress.h>
+
+#include <Dxe/ArchProtocol/StatusCode.h>
+
+#endif
diff --git a/EdkModulePkg/Include/EdkPeimDepex.h b/EdkModulePkg/Include/EdkPeimDepex.h
new file mode 100644
index 0000000000..0b5059906e
--- /dev/null
+++ b/EdkModulePkg/Include/EdkPeimDepex.h
@@ -0,0 +1,56 @@
+/*++
+
+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:
+ EdkPeimDepex.h
+
+Abstract:
+ This include file is only used in *.DXS files. Do not use this
+ include file in normal Peim code.
+
+ Depex - Dependency Expresion
+
+ The BNF grammar is thus:
+ <depex> ::= <bool>
+ <bool> ::= <bool> and <term>
+ | <bool> or <term>
+ | <term>
+ <term> ::= not <factor>
+ | <factor>
+ <factor> ::= <bool>
+ | <boolval>
+ | <depinst>
+ | <termval>
+ <boolval> ::= true
+ | false
+ <depinst> ::= push GUID
+ <termval> ::= end
+
+--*/
+
+#ifndef __EDK_PEIM_DEPEX_H__
+#define __EDK_PEIM_DEPEX_H__
+
+#include <EdkPeim.h>
+
+//
+// The Depex grammer needs the following strings so we must undo
+// any pre-processor redefinitions
+//
+#undef DEPENDENCY_START
+#undef AND
+#undef OR
+#undef NOT
+#undef TRUE
+#undef FALSE
+#undef DEPENDENCY_END
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/AlternateFvBlock.h b/EdkModulePkg/Include/Guid/AlternateFvBlock.h
new file mode 100644
index 0000000000..e3a789a4d2
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/AlternateFvBlock.h
@@ -0,0 +1,32 @@
+/*++
+
+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:
+
+ AlternateFvBlock.h
+
+Abstract:
+
+ Tiano Guid used to define the Alternate Firmware Volume Block Guid.
+
+--*/
+
+#ifndef _ALT_FVB_GUID_H
+#define _ALT_FVB_GUID_H
+
+#define EFI_ALTERNATE_FV_BLOCK_GUID \
+ { \
+ 0xf496922d, 0x172f, 0x4bbc, {0xa1, 0xeb, 0xe, 0xeb, 0x94, 0x9c, 0x34, 0x86 } \
+ }
+
+extern EFI_GUID gEfiAlternateFvBlockGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/Bmp.h b/EdkModulePkg/Include/Guid/Bmp.h
new file mode 100644
index 0000000000..7a5f5a8d8e
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/Bmp.h
@@ -0,0 +1,62 @@
+/*++
+
+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:
+
+ Bmp.h
+
+Abstract:
+
+--*/
+
+#ifndef _BMP_GUID_H_
+#define _BMP_GUID_H_
+
+
+//
+// Definitions for BMP files
+//
+#pragma pack(1)
+
+typedef struct {
+ UINT8 Blue;
+ UINT8 Green;
+ UINT8 Red;
+ UINT8 Reserved;
+} BMP_COLOR_MAP;
+
+typedef struct {
+ CHAR8 CharB;
+ CHAR8 CharM;
+ UINT32 Size;
+ UINT16 Reserved[2];
+ UINT32 ImageOffset;
+ UINT32 HeaderSize;
+ UINT32 PixelWidth;
+ UINT32 PixelHeight;
+ UINT16 Planes; // Must be 1
+ UINT16 BitPerPixel; // 1, 4, 8, or 24
+ UINT32 CompressionType;
+ UINT32 ImageSize; // Compressed image size in bytes
+ UINT32 XPixelsPerMeter;
+ UINT32 YPixelsPerMeter;
+ UINT32 NumberOfColors;
+ UINT32 ImportantColors;
+} BMP_IMAGE_HEADER;
+
+#pragma pack()
+
+#define EFI_DEFAULT_BMP_LOGO_GUID \
+ {0x7BB28B99,0x61BB,0x11d5,{0x9A,0x5D,0x00,0x90,0x27,0x3F,0xC1,0x4D}}
+
+extern EFI_GUID gEfiDefaultBmpLogoGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/BootState.h b/EdkModulePkg/Include/Guid/BootState.h
new file mode 100644
index 0000000000..2d9a0d1faf
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/BootState.h
@@ -0,0 +1,36 @@
+/*++
+
+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:
+
+ BootState.h
+
+Abstract:
+
+ Constants and declarations that are common accross PEI and DXE.
+--*/
+
+#ifndef _BOOT_STATE_H_
+#define _BOOT_STATE_H_
+
+//
+// BOOT STATE
+//
+
+typedef UINT32 EFI_BOOT_STATE;
+
+#define BOOT_STATE_VARIABLE_NAME L"BootState"
+
+#define EFI_BOOT_STATE_VARIABLE_GUID \
+ {0x60b5e939, 0xfcf, 0x4227, {0xba, 0x83, 0x6b, 0xbe, 0xd4, 0x5b, 0xc0, 0xe3} }
+
+extern EFI_GUID gEfiBootStateGuid;
+#endif
diff --git a/EdkModulePkg/Include/Guid/CapsuleVendor.h b/EdkModulePkg/Include/Guid/CapsuleVendor.h
new file mode 100644
index 0000000000..4f5762883a
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/CapsuleVendor.h
@@ -0,0 +1,35 @@
+/*++
+
+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:
+
+ CapsuleVendor.h
+
+Abstract:
+
+ Capsule update Guid definitions
+
+--*/
+
+#ifndef _EFI_CAPSULE_VENDOR_GUID_H_
+#define _EFI_CAPSULE_VENDOR_GUID_H_
+
+//
+// Note -- This guid is used as a vendor GUID (depending on implementation)
+// for the capsule variable if the capsule pointer is passes through reset
+// via a variable.
+//
+#define EFI_CAPSULE_VENDOR_GUID \
+ { 0x711C703F, 0xC285, 0x4B10, { 0xA3, 0xB0, 0x36, 0xEC, 0xBD, 0x3C, 0x8B, 0xE2 } }
+
+extern EFI_GUID gEfiCapsuleVendorGuid;
+
+#endif // #ifndef _EFI_CAPSULE_VENDOR_GUID_H_
diff --git a/EdkModulePkg/Include/Guid/CompatibleMemoryTested.h b/EdkModulePkg/Include/Guid/CompatibleMemoryTested.h
new file mode 100644
index 0000000000..645cacf93e
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/CompatibleMemoryTested.h
@@ -0,0 +1,32 @@
+/*++
+
+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:
+
+ CompatibleMemoryTested.h
+
+Abstract:
+
+ Tiano Guid used for all Compatible Memory Range Tested GUID.
+
+--*/
+
+#ifndef _COMPATIBLE_MEMORY_TESTED_GUID_H_
+#define _COMPATIBLE_MEMORY_TESTED_GUID_H_
+
+#define EFI_COMPATIBLE_MEMORY_TESTED_PROTOCOL_GUID \
+ { \
+ 0x64c475ef, 0x344b, 0x492c, 0x93, 0xad, 0xab, 0x9e, 0xb4, 0x39, 0x50, 0x4 \
+ }
+
+extern EFI_GUID gEfiCompatibleMemoryTestedGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/ConsoleInDevice.h b/EdkModulePkg/Include/Guid/ConsoleInDevice.h
new file mode 100644
index 0000000000..6e53028307
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/ConsoleInDevice.h
@@ -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:
+
+ ConsoleInDevice.h
+
+Abstract:
+
+
+--*/
+
+#ifndef _CONSOLE_IN_DEVICE_H_
+#define _CONSOLE_IN_DEVICE_H_
+
+#define EFI_CONSOLE_IN_DEVICE_GUID \
+ { 0xd3b36f2b, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
+
+extern EFI_GUID gEfiConsoleInDeviceGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/ConsoleOutDevice.h b/EdkModulePkg/Include/Guid/ConsoleOutDevice.h
new file mode 100644
index 0000000000..691aa4167d
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/ConsoleOutDevice.h
@@ -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:
+
+ ConsoleOutDevice.h
+
+Abstract:
+
+
+--*/
+
+#ifndef _CONSOLE_OUT_DEVICE_H_
+#define _CONSOLE_OUT_DEVICE_H_
+
+#define EFI_CONSOLE_OUT_DEVICE_GUID \
+ { 0xd3b36f2c, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
+
+extern EFI_GUID gEfiConsoleOutDeviceGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/ExtendedSalGuid.h b/EdkModulePkg/Include/Guid/ExtendedSalGuid.h
new file mode 100644
index 0000000000..4a4dbee9c0
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/ExtendedSalGuid.h
@@ -0,0 +1,279 @@
+/*++
+
+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:
+
+ ExtendedSalGuid.h
+
+Abstract:
+
+
+--*/
+
+#ifndef _EXTENDED_SAL_GUID_H_
+#define _EXTENDED_SAL_GUID_H_
+
+//
+// Extended SAL Services protocol GUIDs
+//
+
+#define EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID \
+ { 0x5aea42b5, 0x31e1, 0x4515, {0xbc, 0x31, 0xb8, 0xd5, 0x25, 0x75, 0x65, 0xa6 } }
+
+#define EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID \
+ { 0x53a58d06, 0xac27, 0x4d8c, {0xb5, 0xe9, 0xf0, 0x8a, 0x80, 0x65, 0x41, 0x70 } }
+
+#define EFI_EXTENDED_SAL_LOCK_SERVICES_PROTOCOL_GUID \
+ { 0x76b75c23, 0xfe4f, 0x4e17, {0xa2, 0xad, 0x1a, 0x65, 0x3d, 0xbb, 0x49, 0x4a } }
+
+#define EFI_EXTENDED_SAL_VIRTUAL_SERVICES_PROTOCOL_GUID \
+ { 0xc1a74056, 0x260e, 0x4871, {0xa0, 0x31, 0xe6, 0x45, 0xa6, 0x5b, 0x6e, 0x11 } }
+
+#define EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID \
+ { 0x7e97a470, 0xefdb, 0x4d02, {0x8f, 0xce, 0x61, 0x90, 0xd2, 0x7b, 0xa2, 0x96 } }
+
+#define EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID \
+ { 0x4ecb6c53, 0xc641, 0x4370, {0x8c, 0xb2, 0x3b, 0x0e, 0x49, 0x6e, 0x83, 0x78 } }
+
+#define EFI_EXTENDED_SAL_MTC_SERVICES_PROTOCOL_GUID \
+ { 0x899afd18, 0x75e8, 0x408b, {0xa4, 0x1a, 0x6e, 0x2e, 0x7e, 0xcd, 0xf4, 0x54 } }
+
+#define EFI_EXTENDED_SAL_RESET_SERVICES_PROTOCOL_GUID \
+ { 0x7d019990, 0x8ce1, 0x46f5, {0xa7, 0x76, 0x3c, 0x51, 0x98, 0x67, 0x6a, 0xa0 } }
+
+#define EFI_EXTENDED_SAL_STATUS_CODE_SERVICES_PROTOCOL_GUID \
+ { 0xdbd91d, 0x55e9, 0x420f, {0x96, 0x39, 0x5e, 0x9f, 0x84, 0x37, 0xb4, 0x4f } }
+
+#define EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID \
+ { 0xa2271df1, 0xbcbb, 0x4f1d, {0x98, 0xa9, 0x06, 0xbc, 0x17, 0x2f, 0x07, 0x1a } }
+
+#define EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID \
+ { 0x697d81a2, 0xcf18, 0x4dc0, {0x9e, 0x0d, 0x06, 0x11, 0x3b, 0x61, 0x8a, 0x3f } }
+
+#define EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID \
+ { 0xe1cd9d21, 0x0fc2, 0x438d, {0x97, 0x03, 0x04, 0xe6, 0x6d, 0x96, 0x1e, 0x57 } }
+
+#define EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID \
+ { 0xd9e9fa06, 0x0fe0, 0x41c3, {0x96, 0xfb, 0x83, 0x42, 0x5a, 0x33, 0x94, 0xf8 } }
+
+#define EFI_EXTENDED_SAL_MCA_SERVICES_PROTOCOL_GUID \
+ { 0x2a591128, 0x6cc7, 0x42b1, {0x8a, 0xf0, 0x58, 0x93, 0x3b, 0x68, 0x2d, 0xbb } }
+
+#define EFI_EXTENDED_SAL_PCI_SERVICES_PROTOCOL_GUID \
+ { 0xa46b1a31, 0xad66, 0x4905, {0x92, 0xf6, 0x2b, 0x46, 0x59, 0xdc, 0x30, 0x63 } }
+
+#define EFI_EXTENDED_SAL_CACHE_SERVICES_PROTOCOL_GUID \
+ { 0xedc9494, 0x2743, 0x4ba5, { 0x88, 0x18, 0x0a, 0xef, 0x52, 0x13, 0xf1, 0x88 } }
+
+#define EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID \
+ { 0xcb3fd86e, 0x38a3, 0x4c03, {0x9a, 0x5c, 0x90, 0xcf, 0xa3, 0xa2, 0xab, 0x7a } }
+
+#define EFI_EXTENDED_SAL_ELOG_SERVICES_PROTOCOL_GUID \
+ { 0xd5e4ee5f, 0x3e0a, 0x453c, {0xa7, 0x25, 0xb6, 0x92, 0xbb, 0x6, 0x36, 0x5a } }
+
+#define EFI_EXTENDED_SAL_SENSOR_SERVICES_PROTOCOL_GUID \
+ { 0x4a153b6e, 0x85a1, 0x4982, {0x98, 0xf4, 0x6a, 0x8c, 0xfc, 0xa4, 0xab, 0xa1 } }
+
+#define EFI_EXTENDED_SAL_SM_COM_LAYER_SERVICES_PROTOCOL_GUID \
+ { 0x4356799, 0x81b7, 0x4e08, { 0xa3, 0x8d, 0xd9, 0x78, 0xfa, 0x47, 0xba, 0x42 } }
+
+#define EFI_EXTENDED_SAL_SST_GUID \
+ { 0x38802700, 0x868a, 0x4b4e, {0x81, 0xd4, 0x4f, 0x1b, 0xdc, 0xcf, 0xb4, 0x6f } }
+
+//
+// Extended Sal Proc Function IDs.
+//
+
+//
+// BugBug: These enums are name colisions waiting to happen. They should all be
+// prefixed with Esal! It might be better to just make them #define, so
+// they would be all caps.
+//
+
+typedef enum {
+ IoRead,
+ IoWrite,
+ MemRead,
+ MemWrite
+} EFI_EXTENDED_SAL_BASE_IO_SERVICES_FUNC_ID;
+
+typedef enum {
+ Stall
+} EFI_EXTENDED_SAL_STALL_FUNC_ID;
+
+
+typedef enum {
+ InitializeLockService,
+ AcquireLockService,
+ ReleaseLockService,
+ MaxLockServiceFunctionId
+} EFI_EXTENDED_SAL_LOCK_SERVICES_FUNC_ID;
+
+//
+// BugBug : Covert the first 3 functions into a lib functions
+// and move SalRegisterPhysicalAddress to SAL BASE Class
+//
+typedef enum {
+ SetVirtualAddress,
+ IsVirtual,
+ IsEfiRuntime,
+ SalRegisterPhysicalAddress
+} EFI_EXTENDED_SAL_VIRTUAL_SERVICES_FUNC_ID;
+
+typedef enum {
+ GetTime,
+ SetTime,
+ GetWakeupTime,
+ SetWakeupTime,
+ GetRtcFreq,
+ InitializeThreshold,
+ BumpThresholdCount,
+ GetThresholdCount
+} EFI_EXTENDED_SAL_RTC_SERVICES_FUNC_ID;
+
+typedef enum {
+ EsalGetVariable,
+ EsalGetNextVariableName,
+ EsalSetVariable
+} EFI_EXTENDED_SAL_VARIABLE_SERVICES_FUNC_ID;
+
+typedef enum {
+ GetNextHighMonotonicCount
+} EFI_EXTENDED_SAL_MTC_SERVICES_FUNC_ID;
+
+typedef enum {
+ ResetSystem
+} EFI_EXTENDED_SAL_RESET_SERVICES_FUNC_ID;
+
+typedef enum {
+ StatusCode
+} EFI_EXTENDED_SAL_STATUS_CODE_FUNC_ID;
+
+typedef enum {
+ ReportStatusCodeService
+} EFI_EXTENDED_SAL_STATUS_CODE_SERVICES_FUNC_ID;
+
+typedef enum {
+ Read,
+ Write,
+ EraseBlock,
+ GetVolumeAttributes,
+ SetVolumeAttributes,
+ GetPhysicalAddress,
+ GetBlockSize,
+ EraseCustomBlockRange,
+} EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_FUNC_ID;
+
+typedef enum {
+ AddCpuData,
+ RemoveCpuData,
+ ModifyCpuData,
+ GetCpuDataByID,
+ GetCpuDataByIndex,
+ SendIpi,
+ CurrentProcInfo,
+ NumProcessors,
+ SetMinState,
+ GetMinState
+} EFI_EXTENDED_SAL_MP_SERVICES_FUNC_ID;
+
+typedef enum {
+ PalProc,
+ SetNewPalEntry,
+ GetNewPalEntry
+} EFI_EXTENDED_SAL_PAL_SERVICES_FUNC_ID;
+
+typedef enum {
+ SalSetVectors,
+ SalMcRendez,
+ SalMcSetParams,
+ EsalGetVectors,
+ EsalMcGetParams,
+ EsalMcGetMcParams,
+ EsalGetMcCheckinFlags,
+ EsalGetPlatformBaseFreq
+} EFI_EXTENDED_SAL_BASE_SERVICES_FUNC_ID;
+
+typedef enum {
+ McaGetStateInfo,
+ McaRegisterCpu
+} EFI_EXTENDED_SAL_MCA_SERVICES_FUNC_ID;
+
+typedef enum {
+ SalPciConfigRead,
+ SalPciConfigWrite
+} EFI_EXTENDED_SAL_PCI_SERVICES_FUNC_ID;
+
+typedef enum {
+ SalCacheInit,
+ SalCacheFlush
+} EFI_EXTENDED_SAL_CACHE_SERVICES_FUNC_ID;
+
+typedef enum {
+ SalGetStateInfo,
+ SalGetStateInfoSize,
+ SalClearStateInfo,
+ EsalGetStateBuffer,
+ EsalSaveStateBuffer
+} EFI_EXTENDED_SAL_MCA_LOG_SERVICES_FUNC_ID;
+
+typedef enum {
+ SalSetEventLogData,
+ SalGetEventLogData,
+ SalEraseEventLogData,
+ SalActivateEventLogData
+} EFI_EXTENDED_SAL_ELOG_SERVICES_FUNC_ID;
+
+typedef enum {
+ EsalGetComControllerInfo,
+ EsalSendComData,
+ EsalReceiveComData
+} EFI_EXTENDED_SAL_SM_COM_LAYER_SERVICES_FUNC_ID;
+
+typedef enum {
+ SalUpdatePal
+} EFI_EXTENDED_SAL_UPDATE_PAL_SERVICES_FUNC_ID;
+
+typedef enum {
+ EsalReadSensorInfo,
+ EsalReadSensorStatus,
+ EsalRearmSensor,
+ EsalReadSensorData
+} EFI_EXTENDED_SAL_SENSOR_SERVICES_FUNC_ID;
+
+typedef struct {
+ UINT64 ProtoData;
+} ESAL_GUID_DUMMY_PROTOCOL;
+
+extern EFI_GUID gEfiExtendedSalBaseIoServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalStallServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalLockServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalVirtualServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalRtcServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalVariableServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalMtcServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalResetServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalStatusCodeServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalFvBlockServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalMpServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalPalServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalBaseServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalMcaServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalPciServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalCacheServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalMcaLogServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalElogServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalSensorServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalSmComLayerServicesProtocolGuid;
+extern EFI_GUID gEfiExtendedSalSstGuid;
+
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/FlashMapHob.h b/EdkModulePkg/Include/Guid/FlashMapHob.h
new file mode 100644
index 0000000000..a9e9b6736f
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/FlashMapHob.h
@@ -0,0 +1,33 @@
+/*++
+
+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:
+
+ FlashMapHob.h
+
+Abstract:
+
+ GUID used for Flash Map HOB entries in the HOB list.
+
+--*/
+
+#ifndef _FLASH_MAP_HOB_GUID_H_
+#define _FLASH_MAP_HOB_GUID_H_
+
+//
+// Definitions for Flash Map
+//
+#define EFI_FLASH_MAP_HOB_GUID \
+ { 0xb091e7d2, 0x5a0, 0x4198, {0x94, 0xf0, 0x74, 0xb7, 0xb8, 0xc5, 0x54, 0x59 } }
+
+extern EFI_GUID gEfiFlashMapHobGuid;
+
+#endif // _FLASH_MAP_HOB_GUID_H_
diff --git a/EdkModulePkg/Include/Guid/HotPlugDevice.h b/EdkModulePkg/Include/Guid/HotPlugDevice.h
new file mode 100644
index 0000000000..42fb6da8f3
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/HotPlugDevice.h
@@ -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:
+
+ HotPlugDevice.h
+
+Abstract:
+
+
+--*/
+
+#ifndef _HOT_PLUG_DEVICE_H_
+#define _HOT_PLUG_DEVICE_H_
+
+#define HOT_PLUG_DEVICE_GUID \
+ { 0x220ac432, 0x1d43, 0x49e5, {0xa7, 0x4f, 0x4c, 0x9d, 0xa6, 0x7a, 0xd2, 0x3b } }
+
+extern EFI_GUID gEfiHotPlugDeviceGuid;
+#endif
diff --git a/EdkModulePkg/Include/Guid/MemoryTypeInformation.h b/EdkModulePkg/Include/Guid/MemoryTypeInformation.h
new file mode 100644
index 0000000000..ed9270b09d
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/MemoryTypeInformation.h
@@ -0,0 +1,35 @@
+/*++
+
+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:
+ MemoryTypeInformation.h
+
+Abstract:
+ GUID used for Memory Type Information entries in the HOB list.
+
+--*/
+
+#ifndef __MEMORY_TYPE_INFORMATION_GUID_H__
+#define __MEMORY_TYPE_INFORMATION_GUID_H__
+
+#define EFI_MEMORY_TYPE_INFORMATION_GUID \
+ { 0x4c19049f,0x4137,0x4dd3, { 0x9c,0x10,0x8b,0x97,0xa8,0x3f,0xfd,0xfa } }
+
+#define EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME L"MemoryTypeInformation"
+
+extern EFI_GUID gEfiMemoryTypeInformationGuid;
+
+typedef struct {
+ UINT32 Type;
+ UINT32 NumberOfPages;
+} EFI_MEMORY_TYPE_INFORMATION;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/MiniShellFile.h b/EdkModulePkg/Include/Guid/MiniShellFile.h
new file mode 100644
index 0000000000..fa42d4d6b1
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/MiniShellFile.h
@@ -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:
+
+ EfiShell.h
+
+Abstract:
+
+ FFS Filename for EFI Shell
+
+--*/
+
+#ifndef _MINISHELLFILE_H_
+#define _MINISHELLFILE_H_
+
+#define EFI_MINI_SHELL_FILE_GUID \
+ { 0x86ad232b, 0xd33a, 0x465c, {0xbf, 0x5f, 0x41, 0x37, 0xb, 0xa9, 0x2f, 0xe2 } }
+
+extern EFI_GUID gEfiMiniShellFileGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/PciHotplugDevice.h b/EdkModulePkg/Include/Guid/PciHotplugDevice.h
new file mode 100644
index 0000000000..3b488ced2f
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/PciHotplugDevice.h
@@ -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:
+
+ PciHotplugDevice.h
+
+Abstract:
+
+ GUIDs used to indicate the device is Pccard hotplug device
+
+--*/
+
+#ifndef _PCI_HOTPLUG_DEVICE_GUID_H_
+#define _PCI_HOTPLUG_DEVICE_GUID_H_
+
+#define EFI_PCI_HOTPLUG_DEVICE_GUID \
+ { 0x0b280816, 0x52e7, 0x4e51, {0xaa, 0x57, 0x11, 0xbd, 0x41, 0xcb, 0xef, 0xc3 } }
+
+extern EFI_GUID gEfiPciHotplugDeviceGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/PciOptionRomTable.h b/EdkModulePkg/Include/Guid/PciOptionRomTable.h
new file mode 100644
index 0000000000..5ad956e1c3
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/PciOptionRomTable.h
@@ -0,0 +1,46 @@
+/*++
+
+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:
+
+ PciOptionRomTable.h
+
+Abstract:
+
+ GUID and data structure used to describe the list of PCI Option ROMs present in a system.
+
+--*/
+
+#ifndef _PCI_OPTION_ROM_TABLE_GUID_H_
+
+#define EFI_PCI_OPTION_ROM_TABLE_GUID \
+ { 0x7462660f, 0x1cbd, 0x48da, {0xad, 0x11, 0x91, 0x71, 0x79, 0x13, 0x83, 0x1c } }
+
+extern EFI_GUID gEfiPciOptionRomTableGuid;
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS RomAddress;
+ EFI_MEMORY_TYPE MemoryType;
+ UINT32 RomLength;
+ UINT32 Seg;
+ UINT8 Bus;
+ UINT8 Dev;
+ UINT8 Func;
+ BOOLEAN ExecutedLegacyBiosImage;
+ BOOLEAN DontLoadEfiRom;
+} EFI_PCI_OPTION_ROM_DESCRIPTOR;
+
+typedef struct {
+ UINT64 PciOptionRomCount;
+ EFI_PCI_OPTION_ROM_DESCRIPTOR *PciOptionRomDescriptors;
+} EFI_PCI_OPTION_ROM_TABLE;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/PeiPeCoffLoader.h b/EdkModulePkg/Include/Guid/PeiPeCoffLoader.h
new file mode 100644
index 0000000000..abafb71afd
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/PeiPeCoffLoader.h
@@ -0,0 +1,67 @@
+/*++
+
+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:
+ PeiPeCoffLoader.h
+
+Abstract:
+ GUID for the PE/COFF Loader APIs shared between PEI and DXE
+
+--*/
+
+#ifndef __PEI_PE_COFF_LOADER_H__
+#define __PEI_PE_COFF_LOADER_H__
+
+
+#define EFI_PEI_PE_COFF_LOADER_GUID \
+ { 0xd8117cff, 0x94a6, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
+
+typedef struct _EFI_PEI_PE_COFF_LOADER_PROTOCOL EFI_PEI_PE_COFF_LOADER_PROTOCOL;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PEI_PE_COFF_LOADER_GET_IMAGE_INFO) (
+ IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This,
+ IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PEI_PE_COFF_LOADER_LOAD_IMAGE) (
+ IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This,
+ IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PEI_PE_COFF_LOADER_RELOCATE_IMAGE) (
+ IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This,
+ IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PEI_PE_COFF_LOADER_UNLOAD_IMAGE) (
+ IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This,
+ IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
+ );
+
+struct _EFI_PEI_PE_COFF_LOADER_PROTOCOL {
+ EFI_PEI_PE_COFF_LOADER_GET_IMAGE_INFO GetImageInfo;
+ EFI_PEI_PE_COFF_LOADER_LOAD_IMAGE LoadImage;
+ EFI_PEI_PE_COFF_LOADER_RELOCATE_IMAGE RelocateImage;
+ EFI_PEI_PE_COFF_LOADER_UNLOAD_IMAGE UnloadImage;
+};
+
+extern EFI_GUID gEfiPeiPeCoffLoaderGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/PeiPerformanceHob.h b/EdkModulePkg/Include/Guid/PeiPerformanceHob.h
new file mode 100644
index 0000000000..33a2dc9089
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/PeiPerformanceHob.h
@@ -0,0 +1,60 @@
+/*++
+
+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:
+
+ PeiPerformanceHob.h
+
+Abstract:
+
+ GUIDs used for PEI Performance HOB data structures
+
+--*/
+
+#ifndef __PEI_PERFORMANCE_HOB_H__
+#define __PEI_PERFORMANCE_HOB_H__
+
+//
+// This is the GUID of PEI performance HOB
+//
+#define PEI_PERFORMANCE_HOB_GUID \
+ { 0xec4df5af, 0x4395, 0x4cc9, { 0x94, 0xde, 0x77, 0x50, 0x6d, 0x12, 0xc7, 0xb8 } }
+
+//
+// PEI_PERFORMANCE_STRING_SIZE must be a multiple of 8.
+//
+#define PEI_PERFORMANCE_STRING_SIZE 8
+#define PEI_PERFORMANCE_STRING_LENGTH (PEI_PERFORMANCE_STRING_SIZE - 1)
+//
+// Bugbug: This macro will be replaced by a binary patchable PCD entry in EdkModulePkg
+//
+#define MAX_PEI_PERFORMANCE_LOG_ENTRIES 28
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS Handle;
+ CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE];
+ CHAR8 Module[PEI_PERFORMANCE_STRING_SIZE];
+ UINT64 StartTimeStamp;
+ UINT64 EndTimeStamp;
+} PEI_PERFORMANCE_LOG_ENTRY;
+
+//
+// The header must be aligned at 8 bytes.
+//
+typedef struct {
+ UINT32 NumberOfEntries;
+ UINT32 Reserved;
+} PEI_PERFORMANCE_LOG_HEADER;
+
+
+extern EFI_GUID gPeiPerformanceHobGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/PrimaryConsoleInDevice.h b/EdkModulePkg/Include/Guid/PrimaryConsoleInDevice.h
new file mode 100644
index 0000000000..e5aa49cf44
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/PrimaryConsoleInDevice.h
@@ -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:
+
+ PrimaryConsoleInDevice.h
+
+Abstract:
+
+
+--*/
+
+#ifndef _PRIMARY_CONSOLE_IN_DEVICE_H_
+#define _PRIMARY_CONSOLE_IN_DEVICE_H_
+
+#define EFI_PRIMARY_CONSOLE_IN_DEVICE_GUID \
+ { 0xe451dcbe, 0x96a1, 0x4729, {0xa5, 0xcf, 0x6b, 0x9c, 0x2c, 0xff, 0x47, 0xfd } }
+
+extern EFI_GUID gEfiPrimaryConsoleInDeviceGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/PrimaryConsoleOutDevice.h b/EdkModulePkg/Include/Guid/PrimaryConsoleOutDevice.h
new file mode 100644
index 0000000000..f73d727e88
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/PrimaryConsoleOutDevice.h
@@ -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:
+
+ PrimaryConsoleOutDevice.h
+
+Abstract:
+
+--*/
+
+#ifndef _PRIMARY_CONSOLE_OUT_DEVICE_H_
+#define _PRIMARY_CONSOLE_OUT_DEVICE_H_
+
+#define EFI_PRIMARY_CONSOLE_OUT_DEVICE_GUID \
+ { 0x62bdf38a, 0xe3d5, 0x492c, {0x95, 0xc, 0x23, 0xa7, 0xf6, 0x6e, 0x67, 0x2e } }
+
+extern EFI_GUID gEfiPrimaryConsoleOutDeviceGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/PrimaryStandardErrorDevice.h b/EdkModulePkg/Include/Guid/PrimaryStandardErrorDevice.h
new file mode 100644
index 0000000000..97905ea6aa
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/PrimaryStandardErrorDevice.h
@@ -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:
+
+ PrimaryStandardErrorDevice.h
+
+Abstract:
+
+--*/
+
+#ifndef _PRIMARY_STANDARD_ERROR_DEVICE_H_
+#define _PRIMARY_STANDARD_ERROR_DEVICE_H_
+
+#define EFI_PRIMARY_STANDARD_ERROR_DEVICE_GUID \
+ { 0x5a68191b, 0x9b97, 0x4752, {0x99, 0x46, 0xe3, 0x6a, 0x5d, 0xa9, 0x42, 0xb1 } }
+
+extern EFI_GUID gEfiPrimaryStandardErrorDeviceGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/ShellFile.h b/EdkModulePkg/Include/Guid/ShellFile.h
new file mode 100644
index 0000000000..1f3d3b3d00
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/ShellFile.h
@@ -0,0 +1,31 @@
+/*++
+
+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:
+
+ EfiShell.h
+
+Abstract:
+
+ FFS Filename for EFI Shell
+
+--*/
+
+#ifndef _SHELLFILE_H_
+#define _SHELLFILE_H_
+
+#define EFI_SHELL_FILE_GUID \
+ { 0xc57ad6b7, 0x0515, 0x40a8, {0x9d, 0x21, 0x55, 0x16, 0x52, 0x85, 0x4e, 0x37 } }
+
+
+extern EFI_GUID gEfiShellFileGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/StandardErrorDevice.h b/EdkModulePkg/Include/Guid/StandardErrorDevice.h
new file mode 100644
index 0000000000..32b5af44c8
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/StandardErrorDevice.h
@@ -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:
+
+ StandardErrorDevice.h
+
+Abstract:
+
+
+--*/
+
+#ifndef _STANDARD_ERROR_DEVICE_H_
+#define _STANDARD_ERROR_DEVICE_H_
+
+#define EFI_STANDARD_ERROR_DEVICE_GUID \
+ { 0xd3b36f2d, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
+
+extern EFI_GUID gEfiStandardErrorDeviceGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/StatusCode.h b/EdkModulePkg/Include/Guid/StatusCode.h
new file mode 100644
index 0000000000..8242290b22
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/StatusCode.h
@@ -0,0 +1,33 @@
+/*++
+
+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:
+
+ StatusCode.h
+
+Abstract:
+
+ GUID used to identify Data Hub records that originate from the Tiano
+ ReportStatusCode API.
+
+--*/
+
+#ifndef _STATUS_CODE_H__
+#define _STATUS_CODE_H__
+
+#define EFI_STATUS_CODE_GUID \
+ { \
+ 0xd083e94c, 0x6560, 0x42e4, {0xb6, 0xd4, 0x2d, 0xf7, 0x5a, 0xdf, 0x6a, 0x2a } \
+ }
+
+extern EFI_GUID gEfiStatusCodeGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/StatusCodeCallerId.h b/EdkModulePkg/Include/Guid/StatusCodeCallerId.h
new file mode 100644
index 0000000000..8cf9d16928
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/StatusCodeCallerId.h
@@ -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:
+ StatusCodeCallerId.h
+
+Abstract:
+ GUID used to identify id for the caller who is initiating the Status Code.
+
+--*/
+
+#ifndef __STATUS_CODE_CALLER_ID_H__
+#define __STATUS_CODE_CALLER_ID_H__
+
+
+#define EFI_STANDARD_CALLER_ID_GUID \
+ {0xC9DCF469, 0xA7C4, 0x11D5, {0x87, 0xDA, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xB9} }
+
+extern EFI_GUID gEfiCallerIdGuid;
+
+
+#endif
diff --git a/EdkModulePkg/Include/Guid/SystemNvDataGuid.h b/EdkModulePkg/Include/Guid/SystemNvDataGuid.h
new file mode 100644
index 0000000000..946d4d8d03
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/SystemNvDataGuid.h
@@ -0,0 +1,45 @@
+/*++
+
+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:
+
+ SystemNvDataGuid.h
+
+Abstract:
+
+ GUIDs used for System Non Volatile HOB entries in the in the HOB list and FV Guids carrying
+ the System specific information.
+
+--*/
+
+#ifndef __SYSTEM_NV_DATA_GUID_H__
+#define __SYSTEM_NV_DATA_GUID_H__
+
+#define EFI_SYSTEM_NV_DATA_FV_GUID \
+ {0xfff12b8d, 0x7696, 0x4c8b, {0xa9, 0x85, 0x27, 0x47, 0x7, 0x5b, 0x4f, 0x50} }
+
+#define EFI_SYSTEM_NV_DATA_HOB_GUID \
+ {0xd6e5092d, 0xc7b2, 0x4872, {0xaf, 0x66, 0xfd, 0xc0, 0xe6, 0xf9, 0x5e, 0x78} }
+
+typedef struct {
+ EFI_GUID SystemNvDataHobGuid;
+ EFI_GUID SystemNvDataFvGuid;
+ EFI_LBA StartLba;
+ UINTN StartLbaOffset;
+ EFI_LBA EndLba;
+ UINTN EndLbaOffset;
+ UINT32 DataTypeSignature;
+} NV_SYSTEM_DATA_GUID_TYPE;
+
+extern EFI_GUID gEfiSystemNvDataHobGuid;
+extern EFI_GUID gEfiSystemNvDataFvGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/CustomDecompressLib.h b/EdkModulePkg/Include/Library/CustomDecompressLib.h
new file mode 100644
index 0000000000..6edd3ba80f
--- /dev/null
+++ b/EdkModulePkg/Include/Library/CustomDecompressLib.h
@@ -0,0 +1,42 @@
+/*++
+
+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:
+
+ CustomDecompressLib.h
+
+Abstract:
+
+ Custom Decompress Functions
+
+--*/
+
+#ifndef __CUSTOM_DECPOMPRESS_LIB_H__
+#define __CUSTOM_DECPOMPRESS_LIB_H__
+
+RETURN_STATUS
+EFIAPI
+CustomDecompressGetInfo (
+ IN CONST VOID *Source,
+ IN UINT32 SourceSize,
+ OUT UINT32 *DestinationSize,
+ OUT UINT32 *ScratchSize
+ );
+
+RETURN_STATUS
+EFIAPI
+CustomDecompress (
+ IN CONST VOID *Source,
+ IN OUT VOID *Destination,
+ IN OUT VOID *Scratch
+ );
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkBsDataHubStatusCodeLib.h b/EdkModulePkg/Include/Library/EdkBsDataHubStatusCodeLib.h
new file mode 100644
index 0000000000..a334c92697
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkBsDataHubStatusCodeLib.h
@@ -0,0 +1,47 @@
+/*++
+
+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:
+
+ BsDataHubStatusCodeLib.h
+
+Abstract:
+
+ Lib to provide data hub status code reporting.
+
+--*/
+
+#ifndef _EFI_BS_DATA_HUB_STATUS_CODE_LIB_H_
+#define _EFI_BS_DATA_HUB_STATUS_CODE_LIB_H_
+
+//
+// Initialization function
+//
+VOID
+BsDataHubStatusCodeInitialize (
+ VOID
+ )
+;
+
+//
+// Status code reporting function
+//
+EFI_STATUS
+BsDataHubReportStatusCode (
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID * CallerId,
+ IN EFI_STATUS_CODE_DATA * Data OPTIONAL
+ )
+;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkDxeSalLib.h b/EdkModulePkg/Include/Library/EdkDxeSalLib.h
new file mode 100644
index 0000000000..9d21846289
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkDxeSalLib.h
@@ -0,0 +1,141 @@
+/*++
+
+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:
+
+ EdkDxeSalLib.h
+
+Abstract:
+
+--*/
+
+#ifndef _ESAL_SERVICE_LIB_H__
+#define _ESAL_SERVICE_LIB_H__
+
+//#include <Ipf/SalApi.h>
+
+EFI_STATUS
+RegisterEsalFunction (
+ IN UINT64 FunctionId,
+ IN EFI_GUID *ClassGuid,
+ IN SAL_INTERNAL_EXTENDED_SAL_PROC Function,
+ IN VOID *ModuleGlobal
+ )
+/*++
+
+Routine Description:
+
+ Register ESAL Class Function and it's asociated global.
+ This function is boot service only!
+
+Arguments:
+ FunctionId - ID of function to register
+ ClassGuid - GUID of function class
+ Function - Function to register under ClassGuid/FunctionId pair
+ ModuleGlobal - Module global for Function.
+
+Returns:
+ EFI_SUCCESS - If ClassGuid/FunctionId Function was registered.
+
+--*/
+;
+
+EFI_STATUS
+RegisterEsalClass (
+ IN EFI_GUID *ClassGuid,
+ IN VOID *ModuleGlobal,
+ ...
+ )
+/*++
+
+Routine Description:
+
+ Register ESAL Class and it's asociated global.
+ This function is boot service only!
+
+Arguments:
+ ClassGuid - GUID of function class
+ ModuleGlobal - Module global for Function.
+ .. - SAL_INTERNAL_EXTENDED_SAL_PROC and FunctionId pairs. NULL
+ indicates the end of the list.
+
+Returns:
+ EFI_SUCCESS - All members of ClassGuid registered
+
+--*/
+;
+
+SAL_RETURN_REGS
+EfiCallEsalService (
+ IN EFI_GUID *ClassGuid,
+ IN UINT64 FunctionId,
+ IN UINT64 Arg2,
+ IN UINT64 Arg3,
+ IN UINT64 Arg4,
+ IN UINT64 Arg5,
+ IN UINT64 Arg6,
+ IN UINT64 Arg7,
+ IN UINT64 Arg8
+ )
+/*++
+
+Routine Description:
+
+ Call module that is not linked direclty to this module. This code is IP
+ relative and hides the binding issues of virtual or physical calling. The
+ function that gets dispatched has extra arguments that include the registered
+ module global and a boolean flag to indicate if the system is in virutal mode.
+
+Arguments:
+ ClassGuid - GUID of function
+ FunctionId - Function in ClassGuid to call
+ Arg2 - Argument 2 ClassGuid/FunctionId defined
+ Arg3 - Argument 3 ClassGuid/FunctionId defined
+ Arg4 - Argument 4 ClassGuid/FunctionId defined
+ Arg5 - Argument 5 ClassGuid/FunctionId defined
+ Arg6 - Argument 6 ClassGuid/FunctionId defined
+ Arg7 - Argument 7 ClassGuid/FunctionId defined
+ Arg8 - Argument 8 ClassGuid/FunctionId defined
+
+Returns:
+ Status of ClassGuid/FuncitonId
+
+--*/
+;
+
+SAL_RETURN_REGS
+SetEsalVirtualEntryPoint (
+ IN UINT64 EntryPoint,
+ IN UINT64 Gp
+ )
+;
+
+SAL_RETURN_REGS
+SetEsalPhysicalEntryPoint (
+ IN UINT64 EntryPoint,
+ IN UINT64 Gp
+ )
+;
+
+SAL_RETURN_REGS
+GetEsalEntryPoint (
+ VOID
+ )
+;
+
+VOID
+SalFlushCache (
+ IN EFI_PHYSICAL_ADDRESS Start,
+ IN UINT64 Length
+ )
+;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkFvbServiceLib.h b/EdkModulePkg/Include/Library/EdkFvbServiceLib.h
new file mode 100644
index 0000000000..16e00d3a8d
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkFvbServiceLib.h
@@ -0,0 +1,250 @@
+/*++
+
+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:
+
+ EdkFvbServiceLib.h
+
+Abstract:
+
+--*/
+#ifndef __EDK_FVB_SERVICE_LIB_H__
+#define __EDK_FVB_SERVICE_LIB_H__
+
+EFI_STATUS
+EfiFvbReadBlock (
+ IN UINTN Instance,
+ IN EFI_LBA Lba,
+ IN UINTN Offset,
+ IN OUT UINTN *NumBytes,
+ IN UINT8 *Buffer
+ )
+/*++
+
+Routine Description:
+ Reads specified number of bytes into a buffer from the specified block
+
+Arguments:
+ Instance - The FV instance to be read from
+ Lba - The logical block address to be read from
+ Offset - Offset into the block at which to begin reading
+ NumBytes - Pointer that on input contains the total size of
+ the buffer. On output, it contains the total number
+ of bytes read
+ Buffer - Pointer to a caller allocated buffer that will be
+ used to hold the data read
+
+Returns:
+
+ Status code
+
+ EFI_INVALID_PARAMETER - invalid parameter
+
+--*/
+;
+
+EFI_STATUS
+EfiFvbWriteBlock (
+ IN UINTN Instance,
+ IN EFI_LBA Lba,
+ IN UINTN Offset,
+ IN OUT UINTN *NumBytes,
+ IN UINT8 *Buffer
+ )
+/*++
+
+Routine Description:
+ Writes specified number of bytes from the input buffer to the block
+
+Arguments:
+ Instance - The FV instance to be written to
+ Lba - The starting logical block index to write to
+ Offset - Offset into the block at which to begin writing
+ NumBytes - Pointer that on input contains the total size of
+ the buffer. On output, it contains the total number
+ of bytes actually written
+ Buffer - Pointer to a caller allocated buffer that contains
+ the source for the write
+
+Returns:
+
+ Status code
+
+ EFI_INVALID_PARAMETER - invalid parameter
+
+--*/
+;
+
+EFI_STATUS
+EfiFvbEraseBlock (
+ IN UINTN Instance,
+ IN EFI_LBA Lba
+ )
+/*++
+
+Routine Description:
+ Erases and initializes a firmware volume block
+
+Arguments:
+ Instance - The FV instance to be erased
+ Lba - The logical block index to be erased
+
+Returns:
+
+ Status code
+
+ EFI_INVALID_PARAMETER - invalid parameter
+
+--*/
+;
+
+EFI_STATUS
+EfiFvbGetVolumeAttributes (
+ IN UINTN Instance,
+ OUT EFI_FVB_ATTRIBUTES *Attributes
+ )
+/*++
+
+Routine Description:
+ Retrieves attributes, insures positive polarity of attribute bits, returns
+ resulting attributes in output parameter
+
+Arguments:
+ Instance - The FV instance whose attributes is going to be
+ returned
+ Attributes - Output buffer which contains attributes
+
+Returns:
+ Status code
+
+ EFI_INVALID_PARAMETER - invalid parameter
+
+--*/
+;
+
+EFI_STATUS
+EfiFvbSetVolumeAttributes (
+ IN UINTN Instance,
+ IN EFI_FVB_ATTRIBUTES Attributes
+ )
+/*++
+
+Routine Description:
+ Modifies the current settings of the firmware volume according to the
+ input parameter, and returns the new setting of the volume
+
+Arguments:
+ Instance - The FV instance whose attributes is going to be
+ modified
+ Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES
+ containing the desired firmware volume settings.
+ On successful return, it contains the new settings
+ of the firmware volume
+
+Returns:
+ Status code
+
+ EFI_INVALID_PARAMETER - invalid parameter
+
+--*/
+;
+
+EFI_STATUS
+EfiFvbGetPhysicalAddress (
+ IN UINTN Instance,
+ OUT EFI_PHYSICAL_ADDRESS *BaseAddress
+ )
+/*++
+
+Routine Description:
+ Retrieves the physical address of a memory mapped FV
+
+Arguments:
+ Instance - The FV instance whose base address is going to be
+ returned
+ BaseAddress - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS
+ that on successful return, contains the base address
+ of the firmware volume.
+
+Returns:
+
+ Status code
+
+ EFI_INVALID_PARAMETER - invalid parameter
+
+--*/
+;
+
+EFI_STATUS
+EfiFvbGetBlockSize (
+ IN UINTN Instance,
+ IN EFI_LBA Lba,
+ OUT UINTN *BlockSize,
+ OUT UINTN *NumOfBlocks
+ )
+/*++
+
+Routine Description:
+ Retrieve the size of a logical block
+
+Arguments:
+ Instance - The FV instance whose block size is going to be
+ returned
+ Lba - Indicates which block to return the size for.
+ BlockSize - A pointer to a caller allocated UINTN in which
+ the size of the block is returned
+ NumOfBlocks - a pointer to a caller allocated UINTN in which the
+ number of consecutive blocks starting with Lba is
+ returned. All blocks in this range have a size of
+ BlockSize
+
+Returns:
+ EFI_SUCCESS - The firmware volume was read successfully and
+ contents are in Buffer
+
+ EFI_INVALID_PARAMETER - invalid parameter
+
+--*/
+;
+
+EFI_STATUS
+EfiFvbEraseCustomBlockRange (
+ IN UINTN Instance,
+ IN EFI_LBA StartLba,
+ IN UINTN OffsetStartLba,
+ IN EFI_LBA LastLba,
+ IN UINTN OffsetLastLba
+ )
+/*++
+
+Routine Description:
+ Erases and initializes a specified range of a firmware volume
+
+Arguments:
+ Instance - The FV instance to be erased
+ StartLba - The starting logical block index to be erased
+ OffsetStartLba - Offset into the starting block at which to
+ begin erasing
+ LastLba - The last logical block index to be erased
+ OffsetLastLba - Offset into the last block at which to end erasing
+
+Returns:
+
+ Status code
+
+ EFI_INVALID_PARAMETER - invalid parameter
+
+ EFI_UNSUPPORTED - not support
+
+--*/
+;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkGraphicsLib.h b/EdkModulePkg/Include/Library/EdkGraphicsLib.h
new file mode 100644
index 0000000000..52bedd891a
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkGraphicsLib.h
@@ -0,0 +1,185 @@
+/*++
+
+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:
+
+ GraphicsLib.h
+
+Abstract:
+
+
+--*/
+
+#ifndef _EFI_GRAPHICS_LIB_H_
+#define _EFI_GRAPHICS_LIB_H_
+
+EFI_STATUS
+GetGraphicsBitMapFromFV (
+ IN EFI_GUID *FileNameGuid,
+ OUT VOID **Image,
+ OUT UINTN *ImageSize
+ )
+/*++
+
+Routine Description:
+
+ Return the graphics image file named FileNameGuid into Image and return it's
+ size in ImageSize. All Firmware Volumes (FV) in the system are searched for the
+ file name.
+
+Arguments:
+
+ FileNameGuid - File Name of graphics file in the FV(s).
+
+ Image - Pointer to pointer to return graphics image. If NULL, a
+ buffer will be allocated.
+
+ ImageSize - Size of the graphics Image in bytes. Zero if no image found.
+
+
+Returns:
+
+ EFI_SUCCESS - Image and ImageSize are valid.
+ EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
+ EFI_NOT_FOUND - FileNameGuid not found
+
+--*/
+;
+
+EFI_STATUS
+ConvertBmpToUgaBlt (
+ IN VOID *BmpImage,
+ IN UINTN BmpImageSize,
+ IN OUT VOID **UgaBlt,
+ IN OUT UINTN *UgaBltSize,
+ OUT UINTN *PixelHeight,
+ OUT UINTN *PixelWidth
+ )
+/*++
+
+Routine Description:
+
+ Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer
+ is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt
+ buffer is passed in it will be used if it is big enough.
+
+Arguments:
+
+ BmpImage - Pointer to BMP file
+
+ BmpImageSize - Number of bytes in BmpImage
+
+ UgaBlt - Buffer containing UGA version of BmpImage.
+
+ UgaBltSize - Size of UgaBlt in bytes.
+
+ PixelHeight - Height of UgaBlt/BmpImage in pixels
+
+ PixelWidth - Width of UgaBlt/BmpImage in pixels
+
+
+Returns:
+
+ EFI_SUCCESS - UgaBlt and UgaBltSize are returned.
+ EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
+ EFI_BUFFER_TOO_SMALL - The passed in UgaBlt buffer is not big enough.
+ UgaBltSize will contain the required size.
+
+--*/
+;
+
+EFI_STATUS
+EnableQuietBoot (
+ IN EFI_GUID *LogoFile
+ )
+/*++
+
+Routine Description:
+
+ Use Console Control to turn off UGA based Simple Text Out consoles from going
+ to the UGA device. Put up LogoFile on every UGA device that is a console
+
+Arguments:
+
+ LogoFile - File name of logo to display on the center of the screen.
+
+
+Returns:
+
+ EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
+ displayed.
+ EFI_UNSUPPORTED - Logo not found
+
+--*/
+;
+
+EFI_STATUS
+DisableQuietBoot (
+ VOID
+ )
+/*++
+
+Routine Description:
+
+ Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
+ Simple Text Out screens will now be synced up with all non UGA output devices
+
+Arguments:
+
+ NONE
+
+Returns:
+
+ EFI_SUCCESS - UGA devices are back in text mode and synced up.
+ EFI_UNSUPPORTED - Logo not found
+
+--*/
+;
+
+EFI_STATUS
+LockKeyboards (
+ IN CHAR16 *Password
+ )
+/*++
+
+Routine Description:
+ Use Console Control Protocol to lock the Console In Spliter virtual handle.
+ This is the ConInHandle and ConIn handle in the EFI system table. All key
+ presses will be ignored until the Password is typed in. The only way to
+ disable the password is to type it in to a ConIn device.
+
+Arguments:
+ Password - Password used to lock ConIn device
+
+
+Returns:
+
+ EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
+ displayed.
+ EFI_UNSUPPORTED - Logo not found
+
+--*/
+;
+
+UINTN
+EFIAPI
+PrintXY (
+ IN UINTN X,
+ IN UINTN Y,
+ IN EFI_UGA_PIXEL *Foreground, OPTIONAL
+ IN EFI_UGA_PIXEL *Background, OPTIONAL
+ IN CHAR16 *Fmt,
+ ...
+ )
+;
+
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkIfrSupportLib.h b/EdkModulePkg/Include/Library/EdkIfrSupportLib.h
new file mode 100644
index 0000000000..d2a1ff5ee4
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkIfrSupportLib.h
@@ -0,0 +1,1270 @@
+/*++
+
+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:
+
+ IfrSupportLib.h
+
+Abstract:
+
+ The file contain all library function for Ifr Operations.
+
+--*/
+
+#ifndef _IFRSUPPORTLIBRARY_H
+#define _IFRSUPPORTLIBRARY_H
+
+#define DEFAULT_FORM_BUFFER_SIZE 0xFFFF
+#define DEFAULT_STRING_BUFFER_SIZE 0xFFFF
+
+#pragma pack(1)
+typedef struct {
+ CHAR16 *OptionString; // Passed in string to generate a token for in a truly dynamic form creation
+ STRING_REF StringToken; // This is used when creating a single op-code without generating a StringToken (have one already)
+ UINT16 Value;
+ UINT8 Flags;
+ UINT16 Key;
+} IFR_OPTION;
+#pragma pack()
+
+EFI_STATUS
+GetCurrentLanguage (
+ OUT CHAR16 *Lang
+ )
+/*++
+
+Routine Description:
+
+ Determine what is the current language setting
+
+Arguments:
+
+ Lang - Pointer of system language
+
+Returns:
+
+ Status code
+
+--*/
+;
+
+EFI_STATUS
+AddString (
+ IN VOID *StringBuffer,
+ IN CHAR16 *Language,
+ IN CHAR16 *String,
+ IN OUT STRING_REF *StringToken
+ )
+/*++
+
+Routine Description:
+
+ Add a string to the incoming buffer and return the token and offset data
+
+Arguments:
+
+ StringBuffer - The incoming buffer
+
+ Language - Currrent language
+
+ String - The string to be added
+
+ StringToken - The index where the string placed
+
+Returns:
+
+ EFI_OUT_OF_RESOURCES - No enough buffer to allocate
+
+ EFI_SUCCESS - String successfully added to the incoming buffer
+
+--*/
+;
+
+EFI_STATUS
+AddOpCode (
+ IN VOID *FormBuffer,
+ IN OUT VOID *OpCodeData
+ )
+/*++
+
+Routine Description:
+
+ Add op-code data to the FormBuffer
+
+Arguments:
+
+ FormBuffer - Form buffer to be inserted to
+
+ OpCodeData - Op-code data to be inserted
+
+Returns:
+
+ EFI_OUT_OF_RESOURCES - No enough buffer to allocate
+
+ EFI_SUCCESS - Op-code data successfully inserted
+
+--*/
+;
+
+EFI_STATUS
+CreateFormSet (
+ IN CHAR16 *FormSetTitle,
+ IN EFI_GUID *Guid,
+ IN UINT8 Class,
+ IN UINT8 SubClass,
+ IN OUT VOID **FormBuffer,
+ IN OUT VOID **StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a formset
+
+Arguments:
+
+ FormSetTitle - Title of formset
+
+ Guid - Guid of formset
+
+ Class - Class of formset
+
+ SubClass - Sub class of formset
+
+ FormBuffer - Pointer of the formset created
+
+ StringBuffer - Pointer of FormSetTitile string created
+
+Returns:
+
+ EFI_OUT_OF_RESOURCES - No enough buffer to allocate
+
+ EFI_SUCCESS - Formset successfully created
+
+--*/
+;
+
+EFI_STATUS
+CreateForm (
+ IN CHAR16 *FormTitle,
+ IN UINT16 FormId,
+ IN OUT VOID *FormBuffer,
+ IN OUT VOID *StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a form
+
+Arguments:
+
+ FormTitle - Title of the form
+
+ FormId - Id of the form
+
+ FormBuffer - Pointer of the form created
+
+ StringBuffer - Pointer of FormTitil string created
+
+Returns:
+
+ EFI_SUCCESS - Form successfully created
+
+--*/
+;
+
+EFI_STATUS
+CreateSubTitle (
+ IN CHAR16 *SubTitle,
+ IN OUT VOID *FormBuffer,
+ IN OUT VOID *StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a SubTitle
+
+Arguments:
+
+ SubTitle - Sub title to be created
+
+ FormBuffer - Where this subtitle to add to
+
+ StringBuffer - String buffer created for subtitle
+
+Returns:
+
+ EFI_SUCCESS - Subtitle successfully created
+
+--*/
+;
+
+EFI_STATUS
+CreateText (
+ IN CHAR16 *String,
+ IN CHAR16 *String2,
+ IN CHAR16 *String3,
+ IN UINT8 Flags,
+ IN UINT16 Key,
+ IN OUT VOID *FormBuffer,
+ IN OUT VOID *StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a line of text
+
+Arguments:
+
+ String - First string of the text
+
+ String2 - Second string of the text
+
+ String3 - Help string of the text
+
+ Flags - Flag of the text
+
+ Key - Key of the text
+
+ FormBuffer - The form where this text adds to
+
+ StringBuffer - String buffer created for String, String2 and String3
+
+Returns:
+
+ EFI_SUCCESS - Text successfully created
+
+--*/
+;
+
+EFI_STATUS
+CreateGoto (
+ IN UINT16 FormId,
+ IN CHAR16 *Prompt,
+ IN OUT VOID *FormBuffer,
+ IN OUT VOID *StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a hyperlink
+
+Arguments:
+
+ FormId - Form ID of the hyperlink
+
+ Prompt - Prompt of the hyperlink
+
+ FormBuffer - The form where this hyperlink adds to
+
+ StringBuffer - String buffer created for Prompt
+
+Returns:
+
+ EFI_SUCCESS - Hyperlink successfully created
+
+--*/
+;
+
+EFI_STATUS
+CreateOneOf (
+ IN UINT16 QuestionId,
+ IN UINT8 DataWidth,
+ IN CHAR16 *Prompt,
+ IN CHAR16 *Help,
+ IN IFR_OPTION *OptionsList,
+ IN UINTN OptionCount,
+ IN OUT VOID *FormBuffer,
+ IN OUT VOID *StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a one-of question with a set of options to choose from. The
+ OptionsList is a pointer to a null-terminated list of option descriptions.
+
+Arguments:
+
+ QuestionId - Question ID of the one-of box
+
+ DataWidth - DataWidth of the one-of box
+
+ Prompt - Prompt of the one-of box
+
+ Help - Help of the one-of box
+
+ OptionsList - Each string in it is an option of the one-of box
+
+ OptionCount - Option string count
+
+ FormBuffer - The form where this one-of box adds to
+
+ StringBuffer - String buffer created for Prompt, Help and Option strings
+
+Returns:
+
+ EFI_DEVICE_ERROR - DataWidth > 2
+
+ EFI_SUCCESS - One-Of box successfully created.
+
+--*/
+;
+
+EFI_STATUS
+CreateOrderedList (
+ IN UINT16 QuestionId,
+ IN UINT8 MaxEntries,
+ IN CHAR16 *Prompt,
+ IN CHAR16 *Help,
+ IN IFR_OPTION *OptionsList,
+ IN UINTN OptionCount,
+ IN OUT VOID *FormBuffer,
+ IN OUT VOID *StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a one-of question with a set of options to choose from. The
+ OptionsList is a pointer to a null-terminated list of option descriptions.
+
+Arguments:
+
+ QuestionId - Question ID of the ordered list
+
+ MaxEntries - MaxEntries of the ordered list
+
+ Prompt - Prompt of the ordered list
+
+ Help - Help of the ordered list
+
+ OptionsList - Each string in it is an option of the ordered list
+
+ OptionCount - Option string count
+
+ FormBuffer - The form where this ordered list adds to
+
+ StringBuffer - String buffer created for Prompt, Help and Option strings
+
+Returns:
+
+ EFI_SUCCESS - Ordered list successfully created.
+
+--*/
+;
+
+EFI_STATUS
+CreateCheckBox (
+ IN UINT16 QuestionId,
+ IN UINT8 DataWidth,
+ IN CHAR16 *Prompt,
+ IN CHAR16 *Help,
+ IN UINT8 Flags,
+ IN OUT VOID *FormBuffer,
+ IN OUT VOID *StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a checkbox
+
+Arguments:
+
+ QuestionId - Question ID of the check box
+
+ DataWidth - DataWidth of the check box
+
+ Prompt - Prompt of the check box
+
+ Help - Help of the check box
+
+ Flags - Flags of the check box
+
+ FormBuffer - The form where this check box adds to
+
+ StringBuffer - String buffer created for Prompt and Help.
+
+Returns:
+
+ EFI_DEVICE_ERROR - DataWidth > 1
+
+ EFI_SUCCESS - Check box successfully created
+
+--*/
+;
+
+EFI_STATUS
+CreateNumeric (
+ IN UINT16 QuestionId,
+ IN UINT8 DataWidth,
+ IN CHAR16 *Prompt,
+ IN CHAR16 *Help,
+ IN UINT16 Minimum,
+ IN UINT16 Maximum,
+ IN UINT16 Step,
+ IN UINT16 Default,
+ IN UINT8 Flags,
+ IN UINT16 Key,
+ IN OUT VOID *FormBuffer,
+ IN OUT VOID *StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a numeric
+
+Arguments:
+
+ QuestionId - Question ID of the numeric
+
+ DataWidth - DataWidth of the numeric
+
+ Prompt - Prompt of the numeric
+
+ Help - Help of the numeric
+
+ Minimum - Minumun boundary of the numeric
+
+ Maximum - Maximum boundary of the numeric
+
+ Step - Step of the numeric
+
+ Default - Default value
+
+ Flags - Flags of the numeric
+
+ Key - Key of the numeric
+
+ FormBuffer - The form where this numeric adds to
+
+ StringBuffer - String buffer created for Prompt and Help.
+
+Returns:
+
+ EFI_DEVICE_ERROR - DataWidth > 2
+
+ EFI_SUCCESS - Numeric is successfully created
+
+--*/
+;
+
+EFI_STATUS
+CreateString (
+ IN UINT16 QuestionId,
+ IN UINT8 DataWidth,
+ IN CHAR16 *Prompt,
+ IN CHAR16 *Help,
+ IN UINT8 MinSize,
+ IN UINT8 MaxSize,
+ IN UINT8 Flags,
+ IN UINT16 Key,
+ IN OUT VOID *FormBuffer,
+ IN OUT VOID *StringBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a string
+
+Arguments:
+
+ QuestionId - Question ID of the string
+
+ DataWidth - DataWidth of the string
+
+ Prompt - Prompt of the string
+
+ Help - Help of the string
+
+ MinSize - Min size boundary of the string
+
+ MaxSize - Max size boundary of the string
+
+ Flags - Flags of the string
+
+ Key - Key of the string
+
+ FormBuffer - The form where this string adds to
+
+ StringBuffer - String buffer created for Prompt and Help.
+
+Returns:
+
+ EFI_SUCCESS - String successfully created.
+
+--*/
+;
+
+EFI_STATUS
+ExtractDataFromHiiHandle (
+ IN EFI_HII_HANDLE HiiHandle,
+ IN OUT UINT16 *ImageLength,
+ OUT UINT8 *DefaultImage,
+ OUT EFI_GUID *Guid
+ )
+/*++
+
+Routine Description:
+
+ Extract information pertaining to the HiiHandle
+
+Arguments:
+
+ HiiHandle - Hii handle
+
+ ImageLength - For input, length of DefaultImage;
+ For output, length of actually required
+
+ DefaultImage - Image buffer prepared by caller
+
+ Guid - Guid information about the form
+
+Returns:
+
+ EFI_OUT_OF_RESOURCES - No enough buffer to allocate
+
+ EFI_BUFFER_TOO_SMALL - DefualtImage has no enough ImageLength
+
+ EFI_SUCCESS - Successfully extract data from Hii database.
+
+
+--*/
+;
+
+EFI_HII_HANDLE
+FindHiiHandle (
+ IN OUT EFI_HII_PROTOCOL **HiiProtocol, OPTIONAL
+ IN EFI_GUID *Guid
+ )
+/*++
+
+Routine Description:
+ Finds HII handle for given pack GUID previously registered with the HII.
+
+Arguments:
+ HiiProtocol - pointer to pointer to HII protocol interface.
+ If NULL, the interface will be found but not returned.
+ If it points to NULL, the interface will be found and
+ written back to the pointer that is pointed to.
+ Guid - The GUID of the pack that registered with the HII.
+
+Returns:
+ Handle to the HII pack previously registered by the memory driver.
+
+--*/
+;
+
+EFI_STATUS
+CreateSubTitleOpCode (
+ IN STRING_REF StringToken,
+ IN OUT VOID *FormBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a SubTitle opcode independent of string creation
+ This is used primarily by users who need to create just one particular valid op-code and the string
+ data will be assumed to exist in the HiiDatabase already. (Useful when exporting op-codes at a label
+ location to pre-defined forms in HII)
+
+Arguments:
+
+ StringToken - StringToken of the subtitle
+
+ FormBuffer - Output of subtitle as a form
+
+Returns:
+
+ EFI_SUCCESS - Subtitle created to be a form
+
+--*/
+;
+
+EFI_STATUS
+CreateTextOpCode (
+ IN STRING_REF StringToken,
+ IN STRING_REF StringTokenTwo,
+ IN STRING_REF StringTokenThree,
+ IN UINT8 Flags,
+ IN UINT16 Key,
+ IN OUT VOID *FormBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a Text opcode independent of string creation
+ This is used primarily by users who need to create just one particular valid op-code and the string
+ data will be assumed to exist in the HiiDatabase already. (Useful when exporting op-codes at a label
+ location to pre-defined forms in HII)
+
+Arguments:
+
+ StringToken - First string token of the text
+
+ StringTokenTwo - Second string token of the text
+
+ StringTokenThree - Help string token of the text
+
+ Flags - Flag of the text
+
+ Key - Key of the text
+
+ FormBuffer - Output of text as a form
+
+Returns:
+
+ EFI_SUCCESS - Text created to be a form
+
+--*/
+;
+
+EFI_STATUS
+CreateGotoOpCode (
+ IN UINT16 FormId,
+ IN STRING_REF StringToken,
+ IN STRING_REF StringTokenTwo,
+ IN UINT8 Flags,
+ IN UINT16 Key,
+ IN OUT VOID *FormBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a hyperlink opcode independent of string creation
+ This is used primarily by users who need to create just one particular valid op-code and the string
+ data will be assumed to exist in the HiiDatabase already. (Useful when exporting op-codes at a label
+ location to pre-defined forms in HII)
+
+Arguments:
+
+ FormId - Form ID of the hyperlink
+
+ StringToken - Prompt string token of the hyperlink
+
+ StringTokenTwo - Help string token of the hyperlink
+
+ Flags - Flags of the hyperlink
+
+ Key - Key of the hyperlink
+
+ FormBuffer - Output of hyperlink as a form
+
+Returns:
+
+ EFI_SUCCESS - Hyperlink created to be a form
+
+--*/
+;
+
+EFI_STATUS
+CreateOneOfOpCode (
+ IN UINT16 QuestionId,
+ IN UINT8 DataWidth,
+ IN STRING_REF PromptToken,
+ IN STRING_REF HelpToken,
+ IN IFR_OPTION *OptionsList,
+ IN UINTN OptionCount,
+ IN OUT VOID *FormBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a one-of opcode with a set of option op-codes to choose from independent of string creation.
+ This is used primarily by users who need to create just one particular valid op-code and the string
+ data will be assumed to exist in the HiiDatabase already. (Useful when exporting op-codes at a label
+ location to pre-defined forms in HII)
+
+ OptionsList is a pointer to a null-terminated list of option descriptions. Ensure that OptionsList[x].StringToken
+ has been filled in since this routine will not generate StringToken values.
+
+Arguments:
+
+ QuestionId - Question ID of the one-of box
+
+ DataWidth - DataWidth of the one-of box
+
+ PromptToken - Prompt string token of the one-of box
+
+ HelpToken - Help string token of the one-of box
+
+ OptionsList - Each string in it is an option of the one-of box
+
+ OptionCount - Option string count
+
+ FormBuffer - Output of One-Of box as a form
+
+Returns:
+
+ EFI_SUCCESS - One-Of box created to be a form
+
+ EFI_DEVICE_ERROR - DataWidth > 2
+
+--*/
+;
+
+EFI_STATUS
+CreateOrderedListOpCode (
+ IN UINT16 QuestionId,
+ IN UINT8 MaxEntries,
+ IN STRING_REF PromptToken,
+ IN STRING_REF HelpToken,
+ IN IFR_OPTION *OptionsList,
+ IN UINTN OptionCount,
+ IN OUT VOID *FormBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a ordered list opcode with a set of option op-codes to choose from independent of string creation.
+ This is used primarily by users who need to create just one particular valid op-code and the string
+ data will be assumed to exist in the HiiDatabase already. (Useful when exporting op-codes at a label
+ location to pre-defined forms in HII)
+
+ OptionsList is a pointer to a null-terminated list of option descriptions. Ensure that OptionsList[x].StringToken
+ has been filled in since this routine will not generate StringToken values.
+
+Arguments:
+
+ QuestionId - Question ID of the ordered list
+
+ MaxEntries - MaxEntries of the ordered list
+
+ PromptToken - Prompt string token of the ordered list
+
+ HelpToken - Help string token of the ordered list
+
+ OptionsList - Each string in it is an option of the ordered list
+
+ OptionCount - Option string count
+
+ FormBuffer - Output of ordered list as a form
+
+Returns:
+
+ EFI_SUCCESS - Ordered list created to be a form
+
+--*/
+;
+
+EFI_STATUS
+CreateCheckBoxOpCode (
+ IN UINT16 QuestionId,
+ IN UINT8 DataWidth,
+ IN STRING_REF PromptToken,
+ IN STRING_REF HelpToken,
+ IN UINT8 Flags,
+ IN UINT16 Key,
+ IN OUT VOID *FormBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a checkbox opcode independent of string creation
+ This is used primarily by users who need to create just one particular valid op-code and the string
+ data will be assumed to exist in the HiiDatabase already. (Useful when exporting op-codes at a label
+ location to pre-defined forms in HII)
+
+Arguments:
+
+ QuestionId - Question ID of the check box
+
+ DataWidth - DataWidth of the check box
+
+ PromptToken - Prompt string token of the check box
+
+ HelpToken - Help string token of the check box
+
+ Flags - Flags of the check box
+
+ Key - Key of the check box
+
+ FormBuffer - Output of the check box as a form
+
+Returns:
+
+ EFI_SUCCESS - Checkbox created to be a form
+
+ EFI_DEVICE_ERROR - DataWidth > 1
+
+--*/
+;
+
+EFI_STATUS
+CreateNumericOpCode (
+ IN UINT16 QuestionId,
+ IN UINT8 DataWidth,
+ IN STRING_REF PromptToken,
+ IN STRING_REF HelpToken,
+ IN UINT16 Minimum,
+ IN UINT16 Maximum,
+ IN UINT16 Step,
+ IN UINT16 Default,
+ IN UINT8 Flags,
+ IN UINT16 Key,
+ IN OUT VOID *FormBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a numeric opcode independent of string creation
+ This is used primarily by users who need to create just one particular valid op-code and the string
+ data will be assumed to exist in the HiiDatabase already. (Useful when exporting op-codes at a label
+ location to pre-defined forms in HII)
+
+Arguments:
+
+ QuestionId - Question ID of the numeric
+
+ DataWidth - DataWidth of the numeric
+
+ PromptToken - Prompt string token of the numeric
+
+ HelpToken - Help string token of the numeric
+
+ Minimum - Minumun boundary of the numeric
+
+ Maximum - Maximum boundary of the numeric
+
+ Step - Step of the numeric
+
+ Default - Default value of the numeric
+
+ Flags - Flags of the numeric
+
+ Key - Key of the numeric
+
+ FormBuffer - Output of the numeric as a form
+
+Returns:
+
+ EFI_SUCCESS - The numeric created to be a form.
+
+ EFI_DEVICE_ERROR - DataWidth > 2
+
+--*/
+;
+
+EFI_STATUS
+CreateStringOpCode (
+ IN UINT16 QuestionId,
+ IN UINT8 DataWidth,
+ IN STRING_REF PromptToken,
+ IN STRING_REF HelpToken,
+ IN UINT8 MinSize,
+ IN UINT8 MaxSize,
+ IN UINT8 Flags,
+ IN UINT16 Key,
+ IN OUT VOID *FormBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a numeric opcode independent of string creation
+ This is used primarily by users who need to create just one particular valid op-code and the string
+ data will be assumed to exist in the HiiDatabase already. (Useful when exporting op-codes at a label
+ location to pre-defined forms in HII)
+
+Arguments:
+
+ QuestionId - Question ID of the string
+
+ DataWidth - DataWidth of the string
+
+ PromptToken - Prompt token of the string
+
+ HelpToken - Help token of the string
+
+ MinSize - Min size boundary of the string
+
+ MaxSize - Max size boundary of the string
+
+ Flags - Flags of the string
+
+ Key - Key of the string
+
+ FormBuffer - Output of the string as a form
+
+Returns:
+
+ EFI_SUCCESS - String created to be a form.
+
+--*/
+;
+
+EFI_STATUS
+ValidateDataFromHiiHandle (
+ IN EFI_HII_HANDLE HiiHandle,
+ OUT BOOLEAN *Results
+ )
+/*++
+
+Routine Description:
+
+ Validate that the data associated with the HiiHandle in NVRAM is within
+ the reasonable parameters for that FormSet. Values for strings and passwords
+ are not verified due to their not having the equivalent of valid range settings.
+
+Arguments:
+
+ HiiHandle - Handle of the HII database entry to query
+
+ Results - If return Status is EFI_SUCCESS, Results provides valid data
+ TRUE = NVRAM Data is within parameters
+ FALSE = NVRAM Data is NOT within parameters
+
+Returns:
+
+ EFI_OUT_OF_RESOURCES - No enough buffer to allocate
+
+ EFI_SUCCESS - Data successfully validated
+--*/
+;
+
+EFI_STATUS
+CreateBannerOpCode (
+ IN UINT16 Title,
+ IN UINT16 LineNumber,
+ IN UINT8 Alignment,
+ IN OUT VOID *FormBuffer
+ )
+/*++
+
+Routine Description:
+
+ Create a banner opcode. This is primarily used by the FrontPage implementation from BDS.
+
+Arguments:
+
+ Title - Title of the banner
+
+ LineNumber - LineNumber of the banner
+
+ Alignment - Alignment of the banner
+
+ FormBuffer - Output of banner as a form
+
+Returns:
+
+ EFI_SUCCESS - Banner created to be a form.
+
+--*/
+;
+
+VOID
+EfiLibHiiVariablePackGetMap (
+ IN EFI_HII_VARIABLE_PACK *Pack,
+ OUT CHAR16 **Name, OPTIONAL
+ OUT EFI_GUID **Guid, OPTIONAL
+ OUT UINT16 *Id, OPTIONAL
+ OUT VOID **Var, OPTIONAL
+ OUT UINTN *Size OPTIONAL
+ )
+/*++
+
+Routine Description:
+
+ Extracts a variable form a Pack.
+
+Arguments:
+
+ Pack - List of variables
+ Name - Name of the variable/map
+ Guid - GUID of the variable/map
+ Var - Pointer to the variable/map
+ Size - Size of the variable/map in bytes
+
+Returns:
+
+ VOID.
+
+--*/
+;
+
+UINTN
+EfiLibHiiVariablePackListGetMapCnt (
+ IN EFI_HII_VARIABLE_PACK_LIST *List
+ )
+/*++
+
+Routine Description:
+
+ Finds a count of the variables/maps in the List.
+
+Arguments:
+
+ List - List of variables
+
+Returns:
+
+ Number of Map in the variable pack list.
+
+--*/
+;
+
+typedef VOID (EFI_LIB_HII_VARIABLE_PACK_LIST_CALLBACK) (
+ IN CHAR16 *Name,
+ IN EFI_GUID *Guid,
+ IN UINT16 Id,
+ IN VOID *Var,
+ IN UINTN Size
+ )
+/*++
+
+Routine Description:
+
+ type definition for the callback to be
+ used with EfiLibHiiVariablePackListForEachVar().
+
+Arguments:
+
+ Id - Variable/Map ID
+ Name - Name of the variable/map
+ Guid - GUID of the variable/map
+ Var - Pointer to the variable/map
+ Size - Size of the variable/map in bytes
+
+Returns:
+
+ VOID
+
+--*/
+;
+
+VOID
+EfiLibHiiVariablePackListForEachVar (
+ IN EFI_HII_VARIABLE_PACK_LIST *List,
+ IN EFI_LIB_HII_VARIABLE_PACK_LIST_CALLBACK *Callback
+ )
+/*++
+
+Routine Description:
+
+ Will iterate all variable/maps as appearing
+ in List and for each, it will call the Callback.
+
+Arguments:
+
+ List - List of variables
+ Callback - Routine to be called for each iterated variable.
+
+Returns:
+
+ VOID
+
+--*/
+;
+
+EFI_STATUS
+EfiLibHiiVariablePackListGetMapByIdx (
+ IN UINTN Idx,
+ IN EFI_HII_VARIABLE_PACK_LIST *List,
+ OUT CHAR16 **Name, OPTIONAL
+ OUT EFI_GUID **Guid, OPTIONAL
+ OUT UINT16 *Id, OPTIONAL
+ OUT VOID **Var,
+ OUT UINTN *Size
+ )
+/*++
+
+Routine Description:
+
+ Finds a variable form List given
+ the order number as appears in the List.
+
+Arguments:
+
+ Idx - The index of the variable/map to retrieve
+ List - List of variables
+ Name - Name of the variable/map
+ Guid - GUID of the variable/map
+ Var - Pointer to the variable/map
+ Size - Size of the variable/map in bytes
+
+Returns:
+
+ EFI_SUCCESS - Variable is found, OUT parameters are valid
+ EFI_NOT_FOUND - Variable is not found, OUT parameters are not valid
+
+--*/
+;
+
+EFI_STATUS
+EfiLibHiiVariablePackListGetMapById (
+ IN UINT16 Id,
+ IN EFI_HII_VARIABLE_PACK_LIST *List,
+ OUT CHAR16 **Name, OPTIONAL
+ OUT EFI_GUID **Guid, OPTIONAL
+ OUT VOID **Var,
+ OUT UINTN *Size
+ )
+/*++
+
+Routine Description:
+
+ Finds a variable form List given the
+ order number as appears in the List.
+
+Arguments:
+
+ Id - The ID of the variable/map to retrieve
+ List - List of variables
+ Name - Name of the variable/map
+ Guid - GUID of the variable/map
+ Var - Pointer to the variable/map
+ Size - Size of the variable/map in bytes
+
+Returns:
+
+ EFI_SUCCESS - Variable is found, OUT parameters are valid
+ EFI_NOT_FOUND - Variable is not found, OUT parameters are not valid
+
+--*/
+;
+
+EFI_STATUS
+EfiLibHiiVariablePackListGetMap (
+ IN EFI_HII_VARIABLE_PACK_LIST *List,
+ IN CHAR16 *Name,
+ IN EFI_GUID *Guid,
+ OUT UINT16 *Id,
+ OUT VOID **Var,
+ OUT UINTN *Size
+ )
+/*++
+
+Routine Description:
+
+ Finds a variable form EFI_HII_VARIABLE_PACK_LIST given name and GUID.
+
+Arguments:
+
+ List - List of variables
+ Name - Name of the variable/map to be found
+ Guid - GUID of the variable/map to be found
+ Var - Pointer to the variable/map found
+ Size - Size of the variable/map in bytes found
+
+Returns:
+
+ EFI_SUCCESS - variable is found, OUT parameters are valid
+ EFI_NOT_FOUND - variable is not found, OUT parameters are not valid
+
+--*/
+;
+
+EFI_STATUS
+EfiLibHiiVariableRetrieveFromNv (
+ IN CHAR16 *Name,
+ IN EFI_GUID *Guid,
+ IN UINTN Size,
+ OUT VOID **Var
+ )
+/*++
+
+Routine Description:
+ Finds out if a variable of specific Name/Guid/Size exists in NV.
+ If it does, it will retrieve it into the Var.
+
+Arguments:
+ Name, Guid, Size - Parameters of the variable to retrieve. Must match exactly.
+ Var - Variable will be retrieved into buffer pointed by this pointer.
+ If pointing to NULL, the buffer will be allocated. Caller is responsible for releasing the buffer.
+Returns:
+ EFI_SUCCESS - The variable of exact Name/Guid/Size parameters was retrieved and written to Var.
+ EFI_NOT_FOUND - The variable of this Name/Guid was not found in the NV.
+ EFI_LOAD_ERROR - The variable in the NV was of different size, or NV API returned error.
+
+--*/
+;
+
+////
+//// Variable override support.
+////
+
+EFI_STATUS
+EfiLibHiiVariableOverrideIfSuffix (
+ IN CHAR16 *Suffix,
+ IN CHAR16 *Name,
+ IN EFI_GUID *Guid,
+ IN UINTN Size,
+ OUT VOID *Var
+ )
+/*++
+
+Routine Description:
+ Overrrides the variable with NV data if found.
+ But it only does it if the Name ends with specified Suffix.
+ For example, if Suffix="MyOverride" and the Name="XyzSetupMyOverride",
+ the Suffix matches the end of Name, so the variable will be loaded from NV
+ provided the variable exists and the GUID and Size matches.
+
+Arguments:
+ Suffix - Suffix the Name should end with.
+ Name, Guid, Size - Parameters of the variable to retrieve. Must match exactly.
+ Var - Variable will be retrieved into this buffer.
+ Caller is responsible for providing storage of exactly Size size in bytes.
+Returns:
+ EFI_SUCCESS - The variable was overriden with NV variable of same Name/Guid/Size.
+ EFI_INVALID_PARAMETER - The name of the variable does not end with <Suffix>.
+ EFI_NOT_FOUND - The variable of this Name/Guid was not found in the NV.
+ EFI_LOAD_ERROR - The variable in the NV was of different size, or NV API returned error.
+
+--*/
+;
+
+EFI_STATUS
+EfiLibHiiVariableOverrideBySuffix (
+ IN CHAR16 *Suffix,
+ IN CHAR16 *Name,
+ IN EFI_GUID *Guid,
+ IN UINTN Size,
+ OUT VOID *Var
+ )
+/*++
+
+Routine Description:
+ Overrrides the variable with NV data if found.
+ But it only does it if the NV contains the same variable with Name is appended with Suffix.
+ For example, if Suffix="MyOverride" and the Name="XyzSetup",
+ the Suffix will be appended to the end of Name, and the variable with Name="XyzSetupMyOverride"
+ will be loaded from NV provided the variable exists and the GUID and Size matches.
+
+Arguments:
+ Suffix - Suffix the variable will be appended with.
+ Name, Guid, Size - Parameters of the variable to retrieve. Must match exactly.
+ Var - Variable will be retrieved into this buffer.
+ Caller is responsible for providing storage of exactly Size size in bytes.
+
+Returns:
+ EFI_SUCCESS - The variable was overriden with NV variable of same Name/Guid/Size.
+ EFI_NOT_FOUND - The variable of this Name/Guid was not found in the NV.
+ EFI_LOAD_ERROR - The variable in the NV was of different size, or NV API returned error.
+
+--*/
+;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkMemoryStatusCodeLib.h b/EdkModulePkg/Include/Library/EdkMemoryStatusCodeLib.h
new file mode 100644
index 0000000000..08aaf69c47
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkMemoryStatusCodeLib.h
@@ -0,0 +1,48 @@
+/*++
+
+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:
+
+ MemoryStatusCodeLib.h
+
+Abstract:
+
+ Lib to provide memory status code reporting.
+
+--*/
+
+#ifndef _PEI_MEMORY_STATUS_CODE_LIB_H_
+#define _PEI_MEMORY_STATUS_CODE_LIB_H_
+
+//
+// Initialization function
+//
+EFI_STATUS
+MemoryStatusCodeInitialize (
+ IN EFI_FFS_FILE_HEADER *FfsHeader,
+ IN EFI_PEI_SERVICES **PeiServices
+ )
+;
+
+//
+// Status code reporting function
+//
+EFI_STATUS
+MemoryReportStatusCode (
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID * CallerId,
+ IN EFI_STATUS_CODE_DATA * Data OPTIONAL
+ )
+;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkPeCoffLoaderLib.h b/EdkModulePkg/Include/Library/EdkPeCoffLoaderLib.h
new file mode 100644
index 0000000000..ccacf7ee5e
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkPeCoffLoaderLib.h
@@ -0,0 +1,32 @@
+/*++
+
+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:
+
+ EdkPeCoffLoaderLib.h
+
+Abstract:
+ Wrap the Base PE/COFF loader with the PE COFF Protocol
+
+
+
+--*/
+
+#ifndef __EDK_PE_COFF_LOADER_LIB__
+#define __EDK_PE_COFF_LOADER_LIB__
+
+EFI_PEI_PE_COFF_LOADER_PROTOCOL *
+EFIAPI
+GetPeCoffLoaderProtocol (
+ VOID
+ );
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkPeCoffLoaderX64Lib.h b/EdkModulePkg/Include/Library/EdkPeCoffLoaderX64Lib.h
new file mode 100644
index 0000000000..47756d3cf5
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkPeCoffLoaderX64Lib.h
@@ -0,0 +1,33 @@
+/*++
+
+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:
+
+ EdkPeCoffLoaderX64Lib.h
+
+Abstract:
+ Wrap the Base PE/COFF loader with the PE COFF Protocol
+
+
+
+--*/
+
+#ifndef __EDK_PE_COFF_LOADER_X64_LIB__
+#define __EDK_PE_COFF_LOADER_X64_LIB__
+
+EFI_PEI_PE_COFF_LOADER_PROTOCOL *
+EFIAPI
+GetPeCoffLoaderX64Protocol (
+ VOID
+ );
+
+#endif
+
diff --git a/EdkModulePkg/Include/Library/EdkRtMemoryStatusCodeLib.h b/EdkModulePkg/Include/Library/EdkRtMemoryStatusCodeLib.h
new file mode 100644
index 0000000000..02ae5a874e
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkRtMemoryStatusCodeLib.h
@@ -0,0 +1,66 @@
+/*++
+
+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:
+
+ RtMemoryStatusCodeLib.h
+
+Abstract:
+
+ Lib to provide memory status code reporting.
+
+--*/
+
+#ifndef _EFI_RT_MEMORY_STATUS_CODE_LIB_H_
+#define _EFI_RT_MEMORY_STATUS_CODE_LIB_H_
+
+//
+// Initialization function
+//
+VOID
+RtMemoryStatusCodeInitialize (
+ VOID
+ )
+;
+
+//
+// Status code reporting function
+//
+EFI_STATUS
+RtMemoryReportStatusCode (
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID * CallerId,
+ IN EFI_STATUS_CODE_DATA * Data OPTIONAL
+ )
+;
+
+//
+// Playback all prior status codes to a listener
+//
+typedef
+EFI_STATUS
+(*PLATFORM_REPORT_STATUS_CODE) (
+ IN EFI_STATUS_CODE_TYPE Type,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID * CallerId OPTIONAL,
+ IN EFI_STATUS_CODE_DATA * Data OPTIONAL
+ );
+
+VOID
+PlaybackStatusCodes (
+ IN PLATFORM_REPORT_STATUS_CODE ReportStatusCode
+ )
+;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkRtPlatformStatusCodeLib.h b/EdkModulePkg/Include/Library/EdkRtPlatformStatusCodeLib.h
new file mode 100644
index 0000000000..c0a690756e
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkRtPlatformStatusCodeLib.h
@@ -0,0 +1,49 @@
+/*++
+
+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:
+
+ RtPlatformStatusCodeLib.h
+
+Abstract:
+
+ Lib to provide platform implementations necessary for the Monolithic status
+ code to work.
+
+--*/
+
+#ifndef _EFI_PLATFORM_STATUS_CODE_LIB_H_
+#define _EFI_PLATFORM_STATUS_CODE_LIB_H_
+
+
+//
+// Initialization function
+//
+VOID
+RtPlatformStatusCodeInitialize (
+ VOID
+ )
+;
+
+//
+// Status code reporting function
+//
+EFI_STATUS
+RtPlatformReportStatusCode (
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID * CallerId,
+ IN EFI_STATUS_CODE_DATA * Data OPTIONAL
+ )
+;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkScsiLib.h b/EdkModulePkg/Include/Library/EdkScsiLib.h
new file mode 100644
index 0000000000..bb1a1adbb3
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkScsiLib.h
@@ -0,0 +1,299 @@
+/*++
+
+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:
+
+ ScsiLib.h
+
+ Abstract:
+
+ Common Libarary for SCSI
+
+ Revision History
+
+--*/
+
+#ifndef _SCSI_LIB_H
+#define _SCSI_LIB_H
+
+//
+// the time unit is 100ns, since the SCSI I/O defines timeout in 100ns unit.
+//
+#define EFI_SCSI_STALL_1_MICROSECOND 10
+#define EFI_SCSI_STALL_1_MILLISECOND 10000
+#define EFI_SCSI_STALL_1_SECOND 10000000
+
+//
+// this macro cannot be directly used by the gBS->Stall(),
+// since the value output by this macro is in 100ns unit,
+// not 1us unit (1us = 1000ns)
+//
+#define EfiScsiStallSeconds(a) (a) * EFI_SCSI_STALL_1_SECOND
+
+EFI_STATUS
+SubmitTestUnitReadyCommand (
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
+ IN UINT64 Timeout,
+ OUT VOID *SenseData,
+ OUT UINT8 *SenseDataLength,
+ OUT UINT8 *HostAdapterStatus,
+ OUT UINT8 *TargetStatus
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ ScsiIo - TODO: add argument description
+ Timeout - TODO: add argument description
+ SenseData - TODO: add argument description
+ SenseDataLength - TODO: add argument description
+ HostAdapterStatus - TODO: add argument description
+ TargetStatus - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+SubmitInquiryCommand (
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
+ IN UINT64 Timeout,
+ IN VOID *SenseData,
+ IN OUT UINT8 *SenseDataLength,
+ OUT UINT8 *HostAdapterStatus,
+ OUT UINT8 *TargetStatus,
+ IN OUT VOID *InquiryDataBuffer,
+ IN OUT UINT32 *InquiryDataLength,
+ IN BOOLEAN EnableVitalProductData
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ ScsiIo - TODO: add argument description
+ Timeout - TODO: add argument description
+ SenseData - TODO: add argument description
+ SenseDataLength - TODO: add argument description
+ HostAdapterStatus - TODO: add argument description
+ TargetStatus - TODO: add argument description
+ InquiryDataBuffer - TODO: add argument description
+ InquiryDataLength - TODO: add argument description
+ EnableVitalProductData - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+SubmitModeSense10Command (
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
+ IN UINT64 Timeout,
+ IN VOID *SenseData,
+ IN OUT UINT8 *SenseDataLength,
+ OUT UINT8 *HostAdapterStatus,
+ OUT UINT8 *TargetStatus,
+ IN VOID *DataBuffer,
+ IN OUT UINT32 *DataLength,
+ IN UINT8 DBDField, OPTIONAL
+ IN UINT8 PageControl,
+ IN UINT8 PageCode
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ ScsiIo - TODO: add argument description
+ Timeout - TODO: add argument description
+ SenseData - TODO: add argument description
+ SenseDataLength - TODO: add argument description
+ HostAdapterStatus - TODO: add argument description
+ TargetStatus - TODO: add argument description
+ DataBuffer - TODO: add argument description
+ DataLength - TODO: add argument description
+ DBDField - TODO: add argument description
+ PageControl - TODO: add argument description
+ PageCode - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+SubmitRequestSenseCommand (
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
+ IN UINT64 Timeout,
+ IN VOID *SenseData,
+ IN OUT UINT8 *SenseDataLength,
+ OUT UINT8 *HostAdapterStatus,
+ OUT UINT8 *TargetStatus
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ ScsiIo - TODO: add argument description
+ Timeout - TODO: add argument description
+ SenseData - TODO: add argument description
+ SenseDataLength - TODO: add argument description
+ HostAdapterStatus - TODO: add argument description
+ TargetStatus - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+//
+// Commands for direct access command
+//
+EFI_STATUS
+SubmitReadCapacityCommand (
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
+ IN UINT64 Timeout,
+ IN VOID *SenseData,
+ IN OUT UINT8 *SenseDataLength,
+ OUT UINT8 *HostAdapterStatus,
+ OUT UINT8 *TargetStatus,
+ OUT VOID *DataBuffer,
+ IN OUT UINT32 *DataLength,
+ IN BOOLEAN PMI
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ ScsiIo - TODO: add argument description
+ Timeout - TODO: add argument description
+ SenseData - TODO: add argument description
+ SenseDataLength - TODO: add argument description
+ HostAdapterStatus - TODO: add argument description
+ TargetStatus - TODO: add argument description
+ DataBuffer - TODO: add argument description
+ DataLength - TODO: add argument description
+ PMI - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+SubmitRead10Command (
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
+ IN UINT64 Timeout,
+ IN VOID *SenseData,
+ IN OUT UINT8 *SenseDataLength,
+ OUT UINT8 *HostAdapterStatus,
+ OUT UINT8 *TargetStatus,
+ OUT VOID *DataBuffer,
+ IN OUT UINT32 *DataLength,
+ IN UINT32 StartLba,
+ IN UINT32 SectorSize
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ ScsiIo - TODO: add argument description
+ Timeout - TODO: add argument description
+ SenseData - TODO: add argument description
+ SenseDataLength - TODO: add argument description
+ HostAdapterStatus - TODO: add argument description
+ TargetStatus - TODO: add argument description
+ DataBuffer - TODO: add argument description
+ DataLength - TODO: add argument description
+ StartLba - TODO: add argument description
+ SectorSize - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+SubmitWrite10Command (
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
+ IN UINT64 Timeout,
+ IN VOID *SenseData,
+ IN OUT UINT8 *SenseDataLength,
+ OUT UINT8 *HostAdapterStatus,
+ OUT UINT8 *TargetStatus,
+ OUT VOID *DataBuffer,
+ IN OUT UINT32 *DataLength,
+ IN UINT32 StartLba,
+ IN UINT32 SectorSize
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ ScsiIo - TODO: add argument description
+ Timeout - TODO: add argument description
+ SenseData - TODO: add argument description
+ SenseDataLength - TODO: add argument description
+ HostAdapterStatus - TODO: add argument description
+ TargetStatus - TODO: add argument description
+ DataBuffer - TODO: add argument description
+ DataLength - TODO: add argument description
+ StartLba - TODO: add argument description
+ SectorSize - TODO: add argument description
+
+Returns:
+
+ TODO: add return values
+
+--*/
+;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkUsbLib.h b/EdkModulePkg/Include/Library/EdkUsbLib.h
new file mode 100644
index 0000000000..005e045aac
--- /dev/null
+++ b/EdkModulePkg/Include/Library/EdkUsbLib.h
@@ -0,0 +1,373 @@
+/*++
+
+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:
+
+ UsbDxeLib.h
+
+ Abstract:
+
+ Common Dxe Libarary for USB
+ Add Constants & structure definitions for Usb HID
+
+ Revision History
+
+--*/
+
+#ifndef _USB_DXE_LIB_H
+#define _USB_DXE_LIB_H
+
+//
+// define the timeout time as 3ms
+//
+#define TIMEOUT_VALUE 3 * 1000
+
+//
+// HID constants definition, see HID rev1.0
+//
+//
+// HID report item format
+//
+#define HID_ITEM_FORMAT_SHORT 0
+#define HID_ITEM_FORMAT_LONG 1
+
+//
+// Special tag indicating long items
+//
+#define HID_ITEM_TAG_LONG 15
+
+//
+// HID report descriptor item type (prefix bit 2,3)
+//
+#define HID_ITEM_TYPE_MAIN 0
+#define HID_ITEM_TYPE_GLOBAL 1
+#define HID_ITEM_TYPE_LOCAL 2
+#define HID_ITEM_TYPE_RESERVED 3
+
+//
+// HID report descriptor main item tags
+//
+#define HID_MAIN_ITEM_TAG_INPUT 8
+#define HID_MAIN_ITEM_TAG_OUTPUT 9
+#define HID_MAIN_ITEM_TAG_FEATURE 11
+#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION 10
+#define HID_MAIN_ITEM_TAG_END_COLLECTION 12
+
+//
+// HID report descriptor main item contents
+//
+#define HID_MAIN_ITEM_CONSTANT 0x001
+#define HID_MAIN_ITEM_VARIABLE 0x002
+#define HID_MAIN_ITEM_RELATIVE 0x004
+#define HID_MAIN_ITEM_WRAP 0x008
+#define HID_MAIN_ITEM_NONLINEAR 0x010
+#define HID_MAIN_ITEM_NO_PREFERRED 0x020
+#define HID_MAIN_ITEM_NULL_STATE 0x040
+#define HID_MAIN_ITEM_VOLATILE 0x080
+#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100
+
+//
+// HID report descriptor collection item types
+//
+#define HID_COLLECTION_PHYSICAL 0
+#define HID_COLLECTION_APPLICATION 1
+#define HID_COLLECTION_LOGICAL 2
+
+//
+// HID report descriptor global item tags
+//
+#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE 0
+#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM 1
+#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM 2
+#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM 3
+#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM 4
+#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT 5
+#define HID_GLOBAL_ITEM_TAG_UNIT 6
+#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE 7
+#define HID_GLOBAL_ITEM_TAG_REPORT_ID 8
+#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT 9
+#define HID_GLOBAL_ITEM_TAG_PUSH 10
+#define HID_GLOBAL_ITEM_TAG_POP 11
+
+//
+// HID report descriptor local item tags
+//
+#define HID_LOCAL_ITEM_TAG_USAGE 0
+#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 1
+#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 2
+#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 3
+#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4
+#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5
+#define HID_LOCAL_ITEM_TAG_STRING_INDEX 7
+#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 8
+#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 9
+#define HID_LOCAL_ITEM_TAG_DELIMITER 10
+
+//
+// HID usage tables
+//
+#define HID_USAGE_PAGE 0xffff0000
+
+#define HID_UP_GENDESK 0x00010000
+#define HID_UP_KEYBOARD 0x00070000
+#define HID_UP_LED 0x00080000
+#define HID_UP_BUTTON 0x00090000
+#define HID_UP_CONSUMER 0x000c0000
+#define HID_UP_DIGITIZER 0x000d0000
+#define HID_UP_PID 0x000f0000
+
+#define HID_USAGE 0x0000ffff
+
+#define HID_GD_POINTER 0x00010001
+#define HID_GD_MOUSE 0x00010002
+#define HID_GD_JOYSTICK 0x00010004
+#define HID_GD_GAMEPAD 0x00010005
+#define HID_GD_HATSWITCH 0x00010039
+
+//
+// HID report types
+//
+#define HID_INPUT_REPORT 1
+#define HID_OUTPUT_REPORT 2
+#define HID_FEATURE_REPORT 3
+
+//
+// HID device quirks.
+//
+#define HID_QUIRK_INVERT 0x01
+#define HID_QUIRK_NOTOUCH 0x02
+
+//
+// HID class protocol request
+//
+#define EFI_USB_GET_REPORT_REQUEST 0x01
+#define EFI_USB_GET_IDLE_REQUEST 0x02
+#define EFI_USB_GET_PROTOCOL_REQUEST 0x03
+#define EFI_USB_SET_REPORT_REQUEST 0x09
+#define EFI_USB_SET_IDLE_REQUEST 0x0a
+#define EFI_USB_SET_PROTOCOL_REQUEST 0x0b
+
+#pragma pack(1)
+//
+// Descriptor header for Report/Physical Descriptors
+//
+typedef struct hid_class_descriptor {
+ UINT8 DescriptorType;
+ UINT16 DescriptorLength;
+} EFI_USB_HID_CLASS_DESCRIPTOR;
+
+typedef struct hid_descriptor {
+ UINT8 Length;
+ UINT8 DescriptorType;
+ UINT16 BcdHID;
+ UINT8 CountryCode;
+ UINT8 NumDescriptors;
+ EFI_USB_HID_CLASS_DESCRIPTOR HidClassDesc[1];
+} EFI_USB_HID_DESCRIPTOR;
+
+#pragma pack()
+
+EFI_STATUS
+UsbGetHidDescriptor (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT8 InterfaceNum,
+ OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor
+ );
+
+EFI_STATUS
+UsbGetReportDescriptor (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT8 InterfaceNum,
+ IN UINT16 DescriptorSize,
+ OUT UINT8 *DescriptorBuffer
+ );
+
+EFI_STATUS
+UsbGetProtocolRequest (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT8 Interface,
+ IN UINT8 *Protocol
+ );
+
+EFI_STATUS
+UsbSetProtocolRequest (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT8 Interface,
+ IN UINT8 Protocol
+ );
+
+EFI_STATUS
+UsbSetIdleRequest (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT8 Interface,
+ IN UINT8 ReportId,
+ IN UINT8 Duration
+ );
+
+EFI_STATUS
+UsbGetIdleRequest (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT8 Interface,
+ IN UINT8 ReportId,
+ OUT UINT8 *Duration
+ );
+
+EFI_STATUS
+UsbSetReportRequest (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT8 Interface,
+ IN UINT8 ReportId,
+ IN UINT8 ReportType,
+ IN UINT16 ReportLen,
+ IN UINT8 *Report
+ );
+
+EFI_STATUS
+UsbGetReportRequest (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT8 Interface,
+ IN UINT8 ReportId,
+ IN UINT8 ReportType,
+ IN UINT16 ReportLen,
+ IN UINT8 *Report
+ );
+
+//
+// Get Device Descriptor
+//
+EFI_STATUS
+UsbGetDescriptor (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT16 Value,
+ IN UINT16 Index,
+ IN UINT16 DescriptorLength,
+ OUT VOID *Descriptor,
+ OUT UINT32 *Status
+ );
+
+//
+// Set Device Descriptor
+//
+EFI_STATUS
+UsbSetDescriptor (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT16 Value,
+ IN UINT16 Index,
+ IN UINT16 DescriptorLength,
+ IN VOID *Descriptor,
+ OUT UINT32 *Status
+ );
+
+//
+// Get device Interface
+//
+EFI_STATUS
+UsbGetDeviceInterface (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT16 Index,
+ OUT UINT8 *AltSetting,
+ OUT UINT32 *Status
+ );
+
+//
+// Set device interface
+//
+EFI_STATUS
+UsbSetDeviceInterface (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT16 InterfaceNo,
+ IN UINT16 AltSetting,
+ OUT UINT32 *Status
+ );
+
+//
+// Get device configuration
+//
+EFI_STATUS
+UsbGetDeviceConfiguration (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ OUT UINT8 *ConfigValue,
+ OUT UINT32 *Status
+ );
+
+//
+// Set device configuration
+//
+EFI_STATUS
+UsbSetDeviceConfiguration (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT16 Value,
+ OUT UINT32 *Status
+ );
+
+//
+// Set Device Feature
+//
+EFI_STATUS
+UsbSetDeviceFeature (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN EFI_USB_RECIPIENT Recipient,
+ IN UINT16 Value,
+ IN UINT16 Target,
+ OUT UINT32 *Status
+ );
+
+//
+// Clear Device Feature
+//
+EFI_STATUS
+UsbClearDeviceFeature (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN EFI_USB_RECIPIENT Recipient,
+ IN UINT16 Value,
+ IN UINT16 Target,
+ OUT UINT32 *Status
+ );
+
+//
+// Get Device Status
+//
+EFI_STATUS
+UsbGetDeviceStatus (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN EFI_USB_RECIPIENT Recipient,
+ IN UINT16 Target,
+ OUT UINT16 *DevStatus,
+ OUT UINT32 *Status
+ );
+
+//
+// The following APIs are not basic library, but they are common used.
+//
+//
+// Usb Get String
+//
+EFI_STATUS
+UsbGetString (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT16 LangID,
+ IN UINT8 Index,
+ IN VOID *Buf,
+ IN UINTN BufSize,
+ OUT UINT32 *Status
+ );
+
+//
+// Clear endpoint stall
+//
+EFI_STATUS
+UsbClearEndpointHalt (
+ IN EFI_USB_IO_PROTOCOL *UsbIo,
+ IN UINT8 EndpointNo,
+ OUT UINT32 *Status
+ );
+
+#endif
diff --git a/EdkModulePkg/Include/Library/TianoDecompressLib.h b/EdkModulePkg/Include/Library/TianoDecompressLib.h
new file mode 100644
index 0000000000..58e9426a31
--- /dev/null
+++ b/EdkModulePkg/Include/Library/TianoDecompressLib.h
@@ -0,0 +1,42 @@
+/*++
+
+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:
+
+ TianoDecompressLib.h
+
+Abstract:
+
+ Tiano Decompress functions
+
+--*/
+
+#ifndef __TIANO_DECPOMPRESS_LIB_H__
+#define __TIANO_DECPOMPRESS_LIB_H__
+
+RETURN_STATUS
+EFIAPI
+TianoDecompressGetInfo (
+ IN CONST VOID *Source,
+ IN UINT32 SourceSize,
+ OUT UINT32 *DestinationSize,
+ OUT UINT32 *ScratchSize
+ );
+
+RETURN_STATUS
+EFIAPI
+TianoDecompress (
+ IN CONST VOID *Source,
+ IN OUT VOID *Destination,
+ IN OUT VOID *Scratch
+ );
+
+#endif
diff --git a/EdkModulePkg/Include/Ppi/BaseMemoryTest.h b/EdkModulePkg/Include/Ppi/BaseMemoryTest.h
new file mode 100644
index 0000000000..8b0be6e130
--- /dev/null
+++ b/EdkModulePkg/Include/Ppi/BaseMemoryTest.h
@@ -0,0 +1,56 @@
+/*++
+
+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:
+
+ BaseMemoryTest.h
+
+Abstract:
+
+ Pei memory test PPI as defined in Tiano
+
+ Used to Pei memory test in PEI
+
+--*/
+
+#ifndef _BASE_MEMORY_TEST_H_
+#define _BASE_MEMORY_TEST_H_
+
+#define PEI_BASE_MEMORY_TEST_GUID \
+ { 0xb6ec423c, 0x21d2, 0x490d, {0x85, 0xc6, 0xdd, 0x58, 0x64, 0xea, 0xa6, 0x74 } }
+
+typedef struct _PEI_BASE_MEMORY_TEST_PPI PEI_BASE_MEMORY_TEST_PPI;
+
+typedef enum {
+ Ignore,
+ Quick,
+ Sparse,
+ Extensive
+} PEI_MEMORY_TEST_OP;
+
+typedef
+EFI_STATUS
+(EFIAPI *PEI_BASE_MEMORY_TEST) (
+ IN EFI_PEI_SERVICES **PeiServices,
+ IN PEI_BASE_MEMORY_TEST_PPI * This,
+ IN EFI_PHYSICAL_ADDRESS BeginAddress,
+ IN UINT64 MemoryLength,
+ IN PEI_MEMORY_TEST_OP Operation,
+ OUT EFI_PHYSICAL_ADDRESS * ErrorAddress
+ );
+
+struct _PEI_BASE_MEMORY_TEST_PPI {
+ PEI_BASE_MEMORY_TEST BaseMemoryTest;
+};
+
+extern EFI_GUID gPeiBaseMemoryTestPpiGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Ppi/FlashMap.h b/EdkModulePkg/Include/Ppi/FlashMap.h
new file mode 100644
index 0000000000..312f38b416
--- /dev/null
+++ b/EdkModulePkg/Include/Ppi/FlashMap.h
@@ -0,0 +1,52 @@
+/*++
+
+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:
+
+ FlashMap.h
+
+Abstract:
+
+ FlashMap PPI defined in Tiano
+
+ This code abstracts FlashMap access
+
+--*/
+
+#ifndef _PEI_FLASH_MAP_PPI_H_
+#define _PEI_FLASH_MAP_PPI_H_
+
+#define PEI_FLASH_MAP_PPI_GUID \
+ { 0xf34c2fa0, 0xde88, 0x4270, {0x84, 0x14, 0x96, 0x12, 0x22, 0xf4, 0x52, 0x1c } }
+
+typedef struct _PEI_FLASH_MAP_PPI PEI_FLASH_MAP_PPI;
+//
+// Functions
+//
+typedef
+EFI_STATUS
+(EFIAPI *PEI_GET_FLASH_AREA_INFO) (
+ IN EFI_PEI_SERVICES **PeiServices,
+ IN PEI_FLASH_MAP_PPI *This,
+ IN EFI_FLASH_AREA_TYPE AreaType,
+ IN EFI_GUID *AreaTypeGuid,
+ OUT UINT32 *NumEntries,
+ OUT EFI_FLASH_SUBAREA_ENTRY **Entries
+ );
+
+
+struct _PEI_FLASH_MAP_PPI {
+ PEI_GET_FLASH_AREA_INFO GetAreaInfo;
+};
+
+extern EFI_GUID gPeiFlashMapPpiGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Ppi/PeiInMemory.h b/EdkModulePkg/Include/Ppi/PeiInMemory.h
new file mode 100644
index 0000000000..74d0905766
--- /dev/null
+++ b/EdkModulePkg/Include/Ppi/PeiInMemory.h
@@ -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:
+
+ PeiInMemory.h
+
+Abstract:
+
+
+--*/
+
+#ifndef __PEI_IN_MEMORY_H__
+#define __PEI_IN_MEMORY_H__
+
+#define PEI_IN_MEMORY_GUID \
+ {0x643b8786, 0xb417, 0x48d2, {0x8f, 0x5e, 0x78, 0x19, 0x93, 0x1c, 0xae, 0xd8} }
+
+extern EFI_GUID gPeiInMemoryGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Ppi/StatusCodeMemory.h b/EdkModulePkg/Include/Ppi/StatusCodeMemory.h
new file mode 100644
index 0000000000..85b2b6de5f
--- /dev/null
+++ b/EdkModulePkg/Include/Ppi/StatusCodeMemory.h
@@ -0,0 +1,53 @@
+/*++
+
+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:
+
+ StatusCodeMemory.h
+
+Abstract:
+
+ Status Code memory descriptor PPI. Contains information about memory that
+ the Status Code PEIM may use to journal Status Codes.
+
+--*/
+
+#ifndef _PEI_STATUS_CODE_MEMORY_PPI_H_
+#define _PEI_STATUS_CODE_MEMORY_PPI_H_
+
+//
+// GUID definition
+//
+#define PEI_STATUS_CODE_MEMORY_PPI_GUID \
+ { 0x26f8ab01, 0xd3cd, 0x489c, {0x98, 0x4f, 0xdf, 0xde, 0xf7, 0x68, 0x39, 0x5b } }
+
+//
+// Data types
+//
+typedef struct {
+ EFI_STATUS_CODE_TYPE Type;
+ EFI_STATUS_CODE_VALUE Value;
+ UINT32 Instance;
+} EFI_STATUS_CODE_ENTRY;
+
+//
+// PPI definition
+//
+typedef struct {
+ UINTN FirstEntry;
+ UINTN LastEntry;
+ EFI_PHYSICAL_ADDRESS Address;
+ UINTN Length;
+} PEI_STATUS_CODE_MEMORY_PPI;
+
+extern EFI_GUID gPeiStatusCodeMemoryPpiGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/AcpiS3Save.h b/EdkModulePkg/Include/Protocol/AcpiS3Save.h
new file mode 100644
index 0000000000..1571e3dcd2
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/AcpiS3Save.h
@@ -0,0 +1,61 @@
+/*++
+
+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:
+
+ AcpiS3Save.h
+
+Abstract:
+
+
+--*/
+
+#ifndef _ACPI_S3_SAVE_PROTOCOL_H
+#define _ACPI_S3_SAVE_PROTOCOL_H
+
+//
+// Forward reference for pure ANSI compatability
+//
+typedef struct _EFI_ACPI_S3_SAVE_PROTOCOL EFI_ACPI_S3_SAVE_PROTOCOL;
+
+//
+// S3 Save Protocol GUID
+//
+#define EFI_ACPI_S3_SAVE_GUID \
+ { \
+ 0x125f2de1, 0xfb85, 0x440c, {0xa5, 0x4c, 0x4d, 0x99, 0x35, 0x8a, 0x8d, 0x38 } \
+ }
+
+//
+// Protocol Data Structures
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ACPI_S3_SAVE) (
+ IN EFI_ACPI_S3_SAVE_PROTOCOL * This,
+ IN VOID * LegacyMemoryAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ACPI_GET_LEGACY_MEMORY_SIZE) (
+ IN EFI_ACPI_S3_SAVE_PROTOCOL * This,
+ OUT UINTN * Size
+);
+
+struct _EFI_ACPI_S3_SAVE_PROTOCOL {
+ EFI_ACPI_GET_LEGACY_MEMORY_SIZE GetLegacyMemorySize;
+ EFI_ACPI_S3_SAVE S3Save;
+};
+
+extern EFI_GUID gEfiAcpiS3SaveProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/ConsoleControl.h b/EdkModulePkg/Include/Protocol/ConsoleControl.h
new file mode 100644
index 0000000000..c894302c66
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/ConsoleControl.h
@@ -0,0 +1,121 @@
+/*++
+
+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:
+
+ ConsoleControl.h
+
+Abstract:
+
+ Abstraction of a Text mode or UGA screen
+
+--*/
+
+#ifndef __CONSOLE_CONTROL_H__
+#define __CONSOLE_CONTROL_H__
+
+#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
+ { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21 } }
+
+typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;
+
+
+typedef enum {
+ EfiConsoleControlScreenText,
+ EfiConsoleControlScreenGraphics,
+ EfiConsoleControlScreenMaxValue
+} EFI_CONSOLE_CONTROL_SCREEN_MODE;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
+ IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
+ OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
+ OUT BOOLEAN *UgaExists, OPTIONAL
+ OUT BOOLEAN *StdInLocked OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Return the current video mode information. Also returns info about existence
+ of UGA Draw devices in system, and if the Std In device is locked. All the
+ arguments are optional and only returned if a non NULL pointer is passed in.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Mode - Are we in text of grahics mode.
+ UgaExists - TRUE if UGA Spliter has found a UGA device
+ StdInLocked - TRUE if StdIn device is keyboard locked
+
+ Returns:
+ EFI_SUCCESS - Mode information returned.
+
+--*/
+;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
+ IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
+ OUT EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
+ )
+/*++
+
+ Routine Description:
+ Set the current mode to either text or graphics. Graphics is
+ for Quiet Boot.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Mode - Mode to set the
+
+ Returns:
+ EFI_SUCCESS - Mode information returned.
+
+--*/
+;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
+ IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
+ IN CHAR16 *Password
+ )
+/*++
+
+ Routine Description:
+ Lock Std In devices until Password is typed.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Password - Password needed to unlock screen. NULL means unlock keyboard
+
+ Returns:
+ EFI_SUCCESS - Mode information returned.
+ EFI_DEVICE_ERROR - Std In not locked
+
+--*/
+;
+
+
+
+struct _EFI_CONSOLE_CONTROL_PROTOCOL {
+ EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;
+ EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;
+ EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;
+};
+
+extern EFI_GUID gEfiConsoleControlProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/CustomizedDecompress.h b/EdkModulePkg/Include/Protocol/CustomizedDecompress.h
new file mode 100644
index 0000000000..bff8d46e88
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/CustomizedDecompress.h
@@ -0,0 +1,137 @@
+/*++
+
+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:
+ CustomizedDecompress.h
+
+Abstract:
+ The user Customized Decompress Protocol Interface
+
+--*/
+
+#ifndef __CUSTOMIZED_DECOMPRESS_H__
+#define __CUSTOMIZED_DECOMPRESS_H__
+
+#define EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL_GUID \
+ { 0x9a44198e, 0xa4a2, 0x44e6, {0x8a, 0x1f, 0x39, 0xbe, 0xfd, 0xac, 0x89, 0x6f } }
+
+typedef struct _EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CUSTOMIZED_DECOMPRESS_GET_INFO) (
+ IN EFI_CUSTOMIZED_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_CUSTOMIZED_DECOMPRESS_DECOMPRESS) (
+ IN EFI_CUSTOMIZED_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).
+
+--*/
+
+struct _EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL {
+ EFI_CUSTOMIZED_DECOMPRESS_GET_INFO GetInfo;
+ EFI_CUSTOMIZED_DECOMPRESS_DECOMPRESS Decompress;
+};
+
+extern EFI_GUID gEfiCustomizedDecompressProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/DebugAssert.h b/EdkModulePkg/Include/Protocol/DebugAssert.h
new file mode 100644
index 0000000000..9d26d83277
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/DebugAssert.h
@@ -0,0 +1,89 @@
+/*++
+
+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:
+
+ DebugAssert.h
+
+Abstract:
+
+ This protocol allows provides debug services to a driver. This is not
+ debugger support, but things like ASSERT() and DEBUG() macros
+
+--*/
+
+#ifndef _DEBUG_ASSERT_H_
+#define _DEBUG_ASSERT_H_
+
+
+#define EFI_DEBUG_ASSERT_PROTOCOL_GUID \
+ { 0xbe499c92, 0x7d4b, 0x11d4, {0xbc, 0xee, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
+
+//
+// Forward reference for pure ANSI compatability
+//
+typedef struct _EFI_DEBUG_ASSERT_PROTOCOL EFI_DEBUG_ASSERT_PROTOCOL;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DEBUG_ASSERT) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN CHAR8 *FileName,
+ IN INTN LineNumber,
+ IN CHAR8 *Description
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DEBUG_PRINT) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN UINTN ErrorLevel,
+ IN CHAR8 *Format,
+ IN VA_LIST Marker
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_POST_CODE) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN UINT16 PostCode,
+ IN CHAR8 *PostCodeString OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_ERROR_LEVEL) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN UINTN *ErrorLevel
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_ERROR_LEVEL) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN UINTN ErrorLevel
+ );
+
+struct _EFI_DEBUG_ASSERT_PROTOCOL {
+
+ EFI_DEBUG_ASSERT Assert;
+ EFI_DEBUG_PRINT Print;
+ EFI_POST_CODE PostCode;
+
+ EFI_GET_ERROR_LEVEL GetErrorLevel;
+ EFI_SET_ERROR_LEVEL SetErrorLevel;
+
+};
+
+extern EFI_GUID gEfiDebugAssertProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/DebugLevel.h b/EdkModulePkg/Include/Protocol/DebugLevel.h
new file mode 100644
index 0000000000..9c5f06a21f
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/DebugLevel.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:
+
+ DebugLevel.h
+
+Abstract:
+ This protocol is used to abstract the Debug Mask serivces for
+ the specific driver or application image.
+
+--*/
+
+#ifndef __DEBUG_LEVEL_H__
+#define __DEBUG_LEVEL_H__
+
+//
+// 8D4C62E6-CD98-4e1d-AD6E-48BB50D29FF7
+//
+#define EFI_DEBUG_LEVEL_PROTOCOL_GUID \
+ { 0x8d4c62e6, 0xcd98, 0x4e1d, {0xad, 0x6e, 0x48, 0xbb, 0x50, 0xd2, 0x9f, 0xf7 } }
+
+//
+// DebugLevel protocol definition
+//
+typedef struct _EFI_DEBUG_LEVEL_PROTOCOL {
+ UINTN DebugLevel;
+} EFI_DEBUG_LEVEL_PROTOCOL;
+
+extern EFI_GUID gEfiDebugLevelProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/DiskInfo.h b/EdkModulePkg/Include/Protocol/DiskInfo.h
new file mode 100644
index 0000000000..6952163c22
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/DiskInfo.h
@@ -0,0 +1,179 @@
+/*++
+
+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:
+
+ DiskInfo.h
+
+Abstract:
+
+ Disk Info protocol is used to export Inquiry Data for a drive.
+ Its needed to support low level formating of drives in a mannor
+ thats DOS compatible.
+
+--*/
+
+#ifndef __DISK_INFO_H__
+#define __DISK_INFO_H__
+
+#define EFI_DISK_INFO_PROTOCOL_GUID \
+ { \
+ 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27 } \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DISK_INFO_INQUIRY) (
+ IN EFI_DISK_INFO_PROTOCOL * This,
+ IN OUT VOID *InquiryData,
+ IN OUT UINT32 *IntquiryDataSize
+ )
+/*++
+
+ Routine Description:
+ Return the results of the Inquiry command to a drive in InquiryData.
+ Data format of Inquiry data is defined by the Interface GUID.
+
+ Arguments:
+ This - Protocol instance pointer.
+ InquiryData - Results of Inquiry command to device
+ InquiryDataSize - Size of InquiryData in bytes.
+
+ Returns:
+ EFI_SUCCESS - InquiryData valid
+ EFI_NOT_FOUND - Device does not support this data class
+ EFI_DEVICE_ERROR - Error reading InquiryData from device
+ EFI_BUFFER_TOO_SMALL - IntquiryDataSize not big enough
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DISK_INFO_IDENTIFY) (
+ IN EFI_DISK_INFO_PROTOCOL * This,
+ IN OUT VOID *IdentifyData,
+ IN OUT UINT32 *IdentifyDataSize
+ )
+/*++
+
+ Routine Description:
+ Return the results of the Identify command to a drive in IdentifyData.
+ Data format of Identify data is defined by the Interface GUID.
+
+ Arguments:
+ This - Protocol instance pointer.
+ IdentifyData - Results of Identify command to device
+ IdentifyDataSize - Size of IdentifyData in bytes.
+
+ Returns:
+ EFI_SUCCESS - IdentifyData valid
+ EFI_NOT_FOUND - Device does not support this data class
+ EFI_DEVICE_ERROR - Error reading IdentifyData from device
+ EFI_BUFFER_TOO_SMALL - IdentifyDataSize not big enough
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DISK_INFO_SENSE_DATA) (
+ IN EFI_DISK_INFO_PROTOCOL * This,
+ IN OUT VOID *SenseData,
+ IN OUT UINT32 *SenseDataSize,
+ OUT UINT8 *SenseDataNumber
+ )
+/*++
+
+ Routine Description:
+ Return the results of the Request Sense command to a drive in SenseData.
+ Data format of Sense data is defined by the Interface GUID.
+
+ Arguments:
+ This - Protocol instance pointer.
+ SenseData - Results of Request Sense command to device
+ SenseDataSize - Size of SenseData in bytes.
+ SenseDataNumber - Type of SenseData
+
+ Returns:
+ EFI_SUCCESS - InquiryData valid
+ EFI_NOT_FOUND - Device does not support this data class
+ EFI_DEVICE_ERROR - Error reading InquiryData from device
+ EFI_BUFFER_TOO_SMALL - SenseDataSize not big enough
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DISK_INFO_WHICH_IDE) (
+ IN EFI_DISK_INFO_PROTOCOL * This,
+ OUT UINT32 *IdeChannel,
+ OUT UINT32 *IdeDevice
+ )
+/*++
+
+ Routine Description:
+ Return the results of the Request Sense command to a drive in SenseData.
+ Data format of Sense data is defined by the Interface GUID.
+
+ Arguments:
+ This - Protocol instance pointer.
+ IdeChannel - Primary or Secondary
+ IdeDevice - Master or Slave
+
+ Returns:
+ EFI_SUCCESS - IdeChannel and IdeDevice are valid
+ EFI_UNSUPPORTED - This is not an IDE device
+
+--*/
+;
+
+//
+// GUIDs for EFI_DISK_INFO_PROTOCOL.Interface. Defines the format of the
+// buffers returned by member functions
+//
+#define EFI_DISK_INFO_IDE_INTERFACE_GUID \
+ { \
+ 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \
+ }
+extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;
+
+#define EFI_DISK_INFO_SCSI_INTERFACE_GUID \
+ { \
+ 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \
+ }
+extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;
+
+#define EFI_DISK_INFO_USB_INTERFACE_GUID \
+ { \
+ 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \
+ }
+extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;
+
+struct _EFI_DISK_INFO_PROTOCOL {
+ EFI_GUID Interface;
+ EFI_DISK_INFO_INQUIRY Inquiry;
+ EFI_DISK_INFO_IDENTIFY Identify;
+ EFI_DISK_INFO_SENSE_DATA SenseData;
+ EFI_DISK_INFO_WHICH_IDE WhichIde;
+};
+
+extern EFI_GUID gEfiDiskInfoProtocolGuid;
+
+#endif
+
+
diff --git a/EdkModulePkg/Include/Protocol/EdkDecompress.h b/EdkModulePkg/Include/Protocol/EdkDecompress.h
new file mode 100644
index 0000000000..ab9b840cf2
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/EdkDecompress.h
@@ -0,0 +1,137 @@
+/*++
+
+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:
+ EdkDecompress.h
+
+Abstract:
+ The Tiano Decompress Protocol Interface
+
+--*/
+
+#ifndef __EDK_DECOMPRESS_H__
+#define __EDK_DECOMPRESS_H__
+
+#define EFI_TIANO_DECOMPRESS_PROTOCOL_GUID \
+ { 0xe84cf29c, 0x191f, 0x4eae, {0x96, 0xe1, 0xf4, 0x6a, 0xec, 0xea, 0xea, 0x0b } }
+
+typedef struct _EFI_TIANO_DECOMPRESS_PROTOCOL EFI_TIANO_DECOMPRESS_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TIANO_DECOMPRESS_GET_INFO) (
+ IN EFI_TIANO_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_TIANO_DECOMPRESS_DECOMPRESS) (
+ IN EFI_TIANO_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).
+
+--*/
+
+struct _EFI_TIANO_DECOMPRESS_PROTOCOL {
+ EFI_TIANO_DECOMPRESS_GET_INFO GetInfo;
+ EFI_TIANO_DECOMPRESS_DECOMPRESS Decompress;
+};
+
+extern EFI_GUID gEfiTianoDecompressProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/ExtendedSalBootService.h b/EdkModulePkg/Include/Protocol/ExtendedSalBootService.h
new file mode 100644
index 0000000000..28aceb3758
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/ExtendedSalBootService.h
@@ -0,0 +1,113 @@
+/*++
+
+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:
+
+ ExtendedSalBootService.h
+
+Abstract:
+
+--*/
+
+#ifndef _EXTENDED_SAL_PROTOCOL_H_
+#define _EXTENDED_SAL_PROTOCOL_H_
+
+#define EXTENDED_SAL_BOOT_SERVICE_PROTOCOL_GUID \
+ {0xde0ee9a4,0x3c7a,0x44f2, {0xb7,0x8b,0xe3,0xcc,0xd6,0x9c,0x3a,0xf7}}
+
+#define EXTENDED_SAL_SIGNATURE EFI_SIGNATURE_32('e', 's', 'a', 'l')
+
+#define SAL_MIN_STATE_SIZE 0x400 * 1
+#define PAL_SCARTCH_SIZE 0x400 * 3
+#define ALIGN_MINSTATE_SIZE 512
+#define MAX_SAL_RECORD_SIZE 8*1024
+
+#define SAL_RUNTIMESERVICE
+
+typedef UINT16 EFI_SAL_PROCESSOR_ID;
+
+typedef struct _EXTENDED_SAL_BOOT_SERVICE_PROTOCOL EXTENDED_SAL_BOOT_SERVICE_PROTOCOL;
+
+typedef
+SAL_RUNTIMESERVICE
+SAL_RETURN_REGS
+(EFIAPI *SAL_EXTENDED_SAL_PROC) (
+ IN EFI_GUID *ClassGuid,
+ IN UINT64 FunctionId,
+ IN UINT64 Arg2,
+ IN UINT64 Arg3,
+ IN UINT64 Arg4,
+ IN UINT64 Arg5,
+ IN UINT64 Arg6,
+ IN UINT64 Arg7,
+ IN UINT64 Arg8
+ );
+
+typedef
+SAL_RUNTIMESERVICE
+SAL_RETURN_REGS
+(EFIAPI *SAL_INTERNAL_EXTENDED_SAL_PROC) (
+ IN UINT64 FunctionId,
+ IN UINT64 Arg2,
+ IN UINT64 Arg3,
+ IN UINT64 Arg4,
+ IN UINT64 Arg5,
+ IN UINT64 Arg6,
+ IN UINT64 Arg7,
+ IN UINT64 Arg8,
+ IN SAL_EXTENDED_SAL_PROC ExtendedSalProc,
+ IN BOOLEAN VirtualMode,
+ IN VOID *ModuleGlobal
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EXTENDED_SAL_ADD_SST_INFO) (
+ IN EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *This,
+ IN UINT16 SalAVersion,
+ IN UINT16 SalBVersion,
+ IN CHAR8 *OemId,
+ IN CHAR8 *ProductId
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EXTENDED_SAL_ADD_SST_ENTRY) (
+ IN EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *This,
+ IN UINT8 EntryType,
+ IN UINT8 *TableEntry,
+ IN UINTN EntrySize
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EXTENDED_SAL_REGISTER_INTERNAL_PROC) (
+ IN EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *This,
+ IN EFI_GUID *ClassGuid,
+ IN UINT64 FunctionId,
+ IN SAL_INTERNAL_EXTENDED_SAL_PROC InternalSalProc,
+ IN VOID *PhysicalModuleGlobal
+ );
+
+//
+// Extended Sal Boot Service Protocol Interface
+//
+struct _EXTENDED_SAL_BOOT_SERVICE_PROTOCOL{
+ EXTENDED_SAL_ADD_SST_INFO AddSalSystemTableInfo;
+ EXTENDED_SAL_ADD_SST_ENTRY AddSalSystemTableEntry;
+ EXTENDED_SAL_REGISTER_INTERNAL_PROC AddExtendedSalProc;
+ SAL_EXTENDED_SAL_PROC ExtendedSalProc;
+ SAL_PROC SalProc;
+};
+
+extern EFI_GUID gEfiExtendedSalBootServiceProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/FaultTolerantWriteLite.h b/EdkModulePkg/Include/Protocol/FaultTolerantWriteLite.h
new file mode 100644
index 0000000000..c3ec825461
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/FaultTolerantWriteLite.h
@@ -0,0 +1,88 @@
+/*++
+
+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:
+
+ FaultTolerantWriteLite.h
+
+Abstract:
+
+ This is a simple fault tolerant write driver, based on PlatformFd library.
+ And it only supports write BufferSize <= SpareAreaLength.
+
+--*/
+
+#ifndef _FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H_
+#define _FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H_
+
+#define EFI_FTW_LITE_PROTOCOL_GUID \
+{ 0x3f557189, 0x8dae, 0x45ae, {0xa0, 0xb3, 0x2b, 0x99, 0xca, 0x7a, 0xa7, 0xa0 } }
+
+//
+// Forward reference for pure ANSI compatability
+//
+typedef struct _EFI_FTW_LITE_PROTOCOL EFI_FTW_LITE_PROTOCOL;
+
+//
+// Protocol API definitions
+//
+
+typedef
+EFI_STATUS
+(EFIAPI * EFI_FTW_LITE_WRITE) (
+ IN EFI_FTW_LITE_PROTOCOL *This,
+ IN EFI_HANDLE FvbHandle,
+ IN EFI_LBA Lba,
+ IN UINTN Offset,
+ IN UINTN *NumBytes,
+ IN VOID *Buffer
+ );
+/*++
+
+Routine Description:
+
+ Starts a target block update. This records information about the write
+ in fault tolerant storage and will complete the write in a recoverable
+ manner, ensuring at all times that either the original contents or
+ the modified contents are available.
+
+Arguments:
+
+ This - Calling context
+ FvBlockHandle - The handle of FVB protocol that provides services for
+ reading, writing, and erasing the target block.
+ Lba - The logical block address of the target block.
+ Offset - The offset within the target block to place the data.
+ Length - The number of bytes to write to the target block.
+ Buffer - The data to write.
+
+Returns:
+
+ EFI_SUCCESS - The function completed successfully
+ EFI_ABORTED - The function could not complete successfully.
+ EFI_BAD_BUFFER_SIZE - The write would span a block boundary,
+ which is not a valid action.
+ EFI_ACCESS_DENIED - No writes have been allocated.
+ EFI_NOT_READY - The last write has not been completed.
+ Restart () must be called to complete it.
+
+--*/
+
+//
+// Protocol declaration
+//
+struct _EFI_FTW_LITE_PROTOCOL {
+ EFI_FTW_LITE_WRITE Write;
+};
+
+extern EFI_GUID gEfiFaultTolerantWriteLiteProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/FvbExtension.h b/EdkModulePkg/Include/Protocol/FvbExtension.h
new file mode 100644
index 0000000000..c2be78b8e4
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/FvbExtension.h
@@ -0,0 +1,53 @@
+/*++
+
+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:
+
+ FvbExtension.h
+
+Abstract:
+
+ FVB Extension protocol that extends the FVB Class in a component fashion.
+
+--*/
+
+#ifndef _FVB_EXTENSION_H_
+#define _FVB_EXTENSION_H_
+
+#define EFI_FVB_EXTENSION_PROTOCOL_GUID \
+ {0x53a4c71b, 0xb581, 0x4170, {0x91, 0xb3, 0x8d, 0xb8, 0x7a, 0x4b, 0x5c, 0x46 } }
+
+typedef struct _EFI_FVB_EXTENSION_PROTOCOL EFI_FVB_EXTENSION_PROTOCOL;
+
+//
+// FVB Extension Function Prototypes
+//
+typedef
+EFI_STATUS
+(EFIAPI * EFI_FV_ERASE_CUSTOM_BLOCK) (
+ IN EFI_FVB_EXTENSION_PROTOCOL *This,
+ IN EFI_LBA StartLba,
+ IN UINTN OffsetStartLba,
+ IN EFI_LBA LastLba,
+ IN UINTN OffsetLastLba
+);
+
+//
+// IPMI TRANSPORT PROTOCOL
+//
+struct _EFI_FVB_EXTENSION_PROTOCOL {
+ EFI_FV_ERASE_CUSTOM_BLOCK EraseFvbCustomBlock;
+};
+
+extern EFI_GUID gEfiFvbExtensionProtocolGuid;
+
+#endif
+
diff --git a/EdkModulePkg/Include/Protocol/GenericMemoryTest.h b/EdkModulePkg/Include/Protocol/GenericMemoryTest.h
new file mode 100644
index 0000000000..8f566d3763
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/GenericMemoryTest.h
@@ -0,0 +1,156 @@
+/*++
+
+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:
+
+ GenericMemoryTest.h
+
+Abstract:
+
+ The EFI generic memory test protocol
+ For more information please look at EfiMemoryTest.doc
+
+--*/
+
+#ifndef __GENERIC_MEMORY_TEST_H__
+#define __GENERIC_MEMORY_TEST_H__
+
+#define EFI_GENERIC_MEMORY_TEST_PROTOCOL_GUID \
+ { 0x309de7f1, 0x7f5e, 0x4ace, {0xb4, 0x9c, 0x53, 0x1b, 0xe5, 0xaa, 0x95, 0xef} }
+
+typedef struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL EFI_GENERIC_MEMORY_TEST_PROTOCOL;
+
+typedef enum {
+ IGNORE,
+ QUICK,
+ SPARSE,
+ EXTENSIVE,
+ MAXLEVEL
+} EXTENDMEM_COVERAGE_LEVEL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MEMORY_TEST_INIT) (
+ IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,
+ IN EXTENDMEM_COVERAGE_LEVEL Level,
+ OUT BOOLEAN *RequireSoftECCInit
+ )
+/*++
+
+ Routine Description:
+ Initialize the generic memory test.
+
+ Arguments:
+ This - Protocol instance pointer.
+ Level - The coverage level of the memory test.
+ RequireSoftECCInit - Indicate if the memory need software ECC init.
+
+ Returns:
+ EFI_SUCCESS - The generic memory test initialized correctly.
+ EFI_NO_MEDIA - There is not any non-tested memory found, in this
+ function if not any non-tesed memory found means
+ that the memory test driver have not detect any
+ non-tested extended memory of current system.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PERFORM_MEMORY_TEST) (
+ IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,
+ OUT UINT64 *TestedMemorySize,
+ OUT UINT64 *TotalMemorySize,
+ OUT BOOLEAN *ErrorOut,
+ IN BOOLEAN IfTestAbort
+ )
+/*++
+
+ Routine Description:
+ Perform the memory test.
+
+ Arguments:
+ This - Protocol instance pointer.
+ TestedMemorySize - Return the tested extended memory size.
+ TotalMemorySize - Return the whole system physical memory size, this
+ value may be changed if in some case some error
+ DIMMs be disabled.
+ ErrorOut - Any time the memory error occurs, this will be TRUE.
+ IfTestAbort - Indicate if the user press "ESC" to skip the memory
+ test.
+
+ Returns:
+ EFI_SUCCESS - One block of memory test ok, the block size is hide
+ internally.
+ EFI_NOT_FOUND - Indicate all the non-tested memory blocks have
+ already go through.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MEMORY_TEST_FINISHED) (
+ IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This
+ )
+/*++
+
+ Routine Description:
+ The memory test finished.
+
+ Arguments:
+ This - Protocol instance pointer.
+
+ Returns:
+ EFI_SUCCESS - Successful free all the generic memory test driver
+ allocated resource and notify to platform memory
+ test driver that memory test finished.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MEMORY_TEST_COMPATIBLE_RANGE) (
+ IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,
+ IN EFI_PHYSICAL_ADDRESS StartAddress,
+ IN UINT64 Length
+ )
+/*++
+
+ Routine Description:
+ Provide capability to test compatible range which used by some sepcial
+ driver required using memory range before BDS perform memory test.
+
+ Arguments:
+ This - Protocol instance pointer.
+ StartAddress - The start address of the memory range.
+ Length - The memory range's length.
+
+ Return:
+ EFI_SUCCESS - The compatible memory range pass the memory test.
+ EFI_DEVICE_ERROR - The compatible memory range test find memory error
+ and also return return the error address.
+
+--*/
+;
+
+struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL {
+ EFI_MEMORY_TEST_INIT MemoryTestInit;
+ EFI_PERFORM_MEMORY_TEST PerformMemoryTest;
+ EFI_MEMORY_TEST_FINISHED Finished;
+ EFI_MEMORY_TEST_COMPATIBLE_RANGE CompatibleRangeTest;
+};
+
+extern EFI_GUID gEfiGenericMemTestProtocolGuid;
+
+#endif
+
diff --git a/EdkModulePkg/Include/Protocol/IsaAcpi.h b/EdkModulePkg/Include/Protocol/IsaAcpi.h
new file mode 100644
index 0000000000..c3d92f609d
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/IsaAcpi.h
@@ -0,0 +1,177 @@
+/*++
+
+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:
+
+ IsaAcpi.h
+
+Abstract:
+
+ EFI ISA Acpi Protocol
+
+Revision History
+
+--*/
+
+#ifndef _ISA_ACPI_H_
+#define _ISA_ACPI_H_
+
+#define EFI_ISA_ACPI_PROTOCOL_GUID \
+ { 0x64a892dc, 0x5561, 0x4536, { 0x92, 0xc7, 0x79, 0x9b, 0xfc, 0x18, 0x33, 0x55 } }
+
+typedef struct _EFI_ISA_ACPI_PROTOCOL EFI_ISA_ACPI_PROTOCOL;
+
+//
+// Resource Attribute definition
+//
+#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_EDGE_SENSITIVE 0x01
+#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_EDGE_SENSITIVE 0x02
+#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_LEVEL_SENSITIVE 0x04
+#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_LEVEL_SENSITIVE 0x08
+
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_MASK 0x03
+
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_A 0x01
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_B 0x02
+#define EFI_ISA_ACPI_DMA_SPEED_TYPE_F 0x03
+#define EFI_ISA_ACPI_DMA_COUNT_BY_BYTE 0x04
+#define EFI_ISA_ACPI_DMA_COUNT_BY_WORD 0x08
+#define EFI_ISA_ACPI_DMA_BUS_MASTER 0x10
+#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x20
+#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x40
+#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x80
+
+#define EFI_ISA_ACPI_MEMORY_WIDTH_MASK 0x03
+
+#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT 0x00
+#define EFI_ISA_ACPI_MEMORY_WIDTH_16_BIT 0x01
+#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT_AND_16_BIT 0x02
+#define EFI_ISA_ACPI_MEMORY_WRITEABLE 0x04
+#define EFI_ISA_ACPI_MEMORY_CACHEABLE 0x08
+#define EFI_ISA_ACPI_MEMORY_SHADOWABLE 0x10
+#define EFI_ISA_ACPI_MEMORY_EXPANSION_ROM 0x20
+
+#define EFI_ISA_ACPI_IO_DECODE_10_BITS 0x01
+#define EFI_ISA_ACPI_IO_DECODE_16_BITS 0x02
+
+//
+// Resource List definition:
+// at first, the resource was defined as below
+// but in the future, it will be defined again that follow ACPI spec: ACPI resource type
+// so that, in this driver, we can interpret the ACPI table and get the ISA device information.
+//
+
+typedef enum {
+ EfiIsaAcpiResourceEndOfList,
+ EfiIsaAcpiResourceIo,
+ EfiIsaAcpiResourceMemory,
+ EfiIsaAcpiResourceDma,
+ EfiIsaAcpiResourceInterrupt
+} EFI_ISA_ACPI_RESOURCE_TYPE;
+
+typedef struct {
+ EFI_ISA_ACPI_RESOURCE_TYPE Type;
+ UINT32 Attribute;
+ UINT32 StartRange;
+ UINT32 EndRange;
+} EFI_ISA_ACPI_RESOURCE;
+
+typedef struct {
+ UINT32 HID;
+ UINT32 UID;
+} EFI_ISA_ACPI_DEVICE_ID;
+
+typedef struct {
+ EFI_ISA_ACPI_DEVICE_ID Device;
+ EFI_ISA_ACPI_RESOURCE *ResourceItem;
+} EFI_ISA_ACPI_RESOURCE_LIST;
+
+//
+// Prototypes for the ISA ACPI Protocol
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_ACPI_DEVICE_ENUMERATE) (
+ IN EFI_ISA_ACPI_PROTOCOL *This,
+ OUT EFI_ISA_ACPI_DEVICE_ID **Device
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_ACPI_SET_DEVICE_POWER) (
+ IN EFI_ISA_ACPI_PROTOCOL *This,
+ IN EFI_ISA_ACPI_DEVICE_ID *Device,
+ IN BOOLEAN OnOff
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_ACPI_GET_CUR_RESOURCE) (
+ IN EFI_ISA_ACPI_PROTOCOL *This,
+ IN EFI_ISA_ACPI_DEVICE_ID *Device,
+ OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_ACPI_GET_POS_RESOURCE) (
+ IN EFI_ISA_ACPI_PROTOCOL *This,
+ IN EFI_ISA_ACPI_DEVICE_ID *Device,
+ OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_ACPI_SET_RESOURCE) (
+ IN EFI_ISA_ACPI_PROTOCOL *This,
+ IN EFI_ISA_ACPI_DEVICE_ID *Device,
+ IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_ACPI_ENABLE_DEVICE) (
+ IN EFI_ISA_ACPI_PROTOCOL *This,
+ IN EFI_ISA_ACPI_DEVICE_ID *Device,
+ IN BOOLEAN Enable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_ACPI_INIT_DEVICE) (
+ IN EFI_ISA_ACPI_PROTOCOL *This,
+ IN EFI_ISA_ACPI_DEVICE_ID *Device
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_ACPI_INTERFACE_INIT) (
+ IN EFI_ISA_ACPI_PROTOCOL *This
+ );
+
+//
+// Interface structure for the ISA ACPI Protocol
+//
+struct _EFI_ISA_ACPI_PROTOCOL {
+ EFI_ISA_ACPI_DEVICE_ENUMERATE DeviceEnumerate;
+ EFI_ISA_ACPI_SET_DEVICE_POWER SetPower;
+ EFI_ISA_ACPI_GET_CUR_RESOURCE GetCurResource;
+ EFI_ISA_ACPI_GET_POS_RESOURCE GetPosResource;
+ EFI_ISA_ACPI_SET_RESOURCE SetResource;
+ EFI_ISA_ACPI_ENABLE_DEVICE EnableDevice;
+ EFI_ISA_ACPI_INIT_DEVICE InitDevice;
+ EFI_ISA_ACPI_INTERFACE_INIT InterfaceInit;
+};
+
+extern EFI_GUID gEfiIsaAcpiProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/IsaIo.h b/EdkModulePkg/Include/Protocol/IsaIo.h
new file mode 100644
index 0000000000..8419dd4792
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/IsaIo.h
@@ -0,0 +1,174 @@
+/*++
+
+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:
+
+ IsaIo.h
+
+Abstract:
+
+ EFI ISA I/O Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_ISA_IO_H
+#define _EFI_ISA_IO_H
+
+//
+// Global ID for the ISA I/O Protocol
+//
+
+#define EFI_ISA_IO_PROTOCOL_GUID \
+ { 0x7ee2bd44, 0x3da0, 0x11d4, { 0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
+
+typedef struct _EFI_ISA_IO_PROTOCOL EFI_ISA_IO_PROTOCOL;
+
+//
+// Prototypes for the ISA I/O Protocol
+//
+
+typedef enum {
+ EfiIsaIoWidthUint8,
+ EfiIsaIoWidthUint16,
+ EfiIsaIoWidthUint32,
+ EfiIsaIoWidthReserved,
+ EfiIsaIoWidthFifoUint8,
+ EfiIsaIoWidthFifoUint16,
+ EfiIsaIoWidthFifoUint32,
+ EfiIsaIoWidthFifoReserved,
+ EfiIsaIoWidthFillUint8,
+ EfiIsaIoWidthFillUint16,
+ EfiIsaIoWidthFillUint32,
+ EfiIsaIoWidthFillReserved,
+ EfiIsaIoWidthMaximum
+} EFI_ISA_IO_PROTOCOL_WIDTH;
+
+//
+// Attributes for common buffer allocations
+//
+#define EFI_ISA_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x080 // Map a memory range so write are combined
+#define EFI_ISA_IO_ATTRIBUTE_MEMORY_CACHED 0x800 // Map a memory range so all r/w accesses are cached
+#define EFI_ISA_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 // Disable a memory range
+
+//
+// Channel attribute for DMA operations
+//
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE 0x001
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A 0x002
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B 0x004
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C 0x008
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8 0x010
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16 0x020
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE 0x040
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE 0x080
+#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE 0x100
+
+typedef enum {
+ EfiIsaIoOperationBusMasterRead,
+ EfiIsaIoOperationBusMasterWrite,
+ EfiIsaIoOperationBusMasterCommonBuffer,
+ EfiIsaIoOperationSlaveRead,
+ EfiIsaIoOperationSlaveWrite,
+ EfiIsaIoOperationMaximum
+} EFI_ISA_IO_PROTOCOL_OPERATION;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_IO_PROTOCOL_IO_MEM) (
+ IN EFI_ISA_IO_PROTOCOL *This,
+ IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
+ IN UINT32 Offset,
+ IN UINTN Count,
+ IN OUT VOID *Buffer
+ );
+
+typedef struct {
+ EFI_ISA_IO_PROTOCOL_IO_MEM Read;
+ EFI_ISA_IO_PROTOCOL_IO_MEM Write;
+} EFI_ISA_IO_PROTOCOL_ACCESS;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_IO_PROTOCOL_COPY_MEM) (
+ IN EFI_ISA_IO_PROTOCOL *This,
+ IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
+ IN UINT32 DestOffset,
+ IN UINT32 SrcOffset,
+ IN UINTN Count
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_IO_PROTOCOL_MAP) (
+ IN EFI_ISA_IO_PROTOCOL *This,
+ IN EFI_ISA_IO_PROTOCOL_OPERATION Operation,
+ IN UINT8 ChannelNumber OPTIONAL,
+ IN UINT32 ChannelAttributes,
+ IN VOID *HostAddress,
+ IN OUT UINTN *NumberOfBytes,
+ OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
+ OUT VOID **Mapping
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_IO_PROTOCOL_UNMAP) (
+ IN EFI_ISA_IO_PROTOCOL *This,
+ IN VOID *Mapping
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER) (
+ IN EFI_ISA_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_ISA_IO_PROTOCOL_FREE_BUFFER) (
+ IN EFI_ISA_IO_PROTOCOL *This,
+ IN UINTN Pages,
+ IN VOID *HostAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ISA_IO_PROTOCOL_FLUSH) (
+ IN EFI_ISA_IO_PROTOCOL *This
+ );
+
+//
+// Interface structure for the ISA I/O Protocol
+//
+struct _EFI_ISA_IO_PROTOCOL {
+ EFI_ISA_IO_PROTOCOL_ACCESS Mem;
+ EFI_ISA_IO_PROTOCOL_ACCESS Io;
+ EFI_ISA_IO_PROTOCOL_COPY_MEM CopyMem;
+ EFI_ISA_IO_PROTOCOL_MAP Map;
+ EFI_ISA_IO_PROTOCOL_UNMAP Unmap;
+ EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer;
+ EFI_ISA_IO_PROTOCOL_FREE_BUFFER FreeBuffer;
+ EFI_ISA_IO_PROTOCOL_FLUSH Flush;
+ EFI_ISA_ACPI_RESOURCE_LIST *ResourceList;
+ UINT32 RomSize;
+ VOID *RomImage;
+};
+
+extern EFI_GUID gEfiIsaIoProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/LoadPe32Image.h b/EdkModulePkg/Include/Protocol/LoadPe32Image.h
new file mode 100644
index 0000000000..d6f54aa527
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/LoadPe32Image.h
@@ -0,0 +1,68 @@
+/*++
+
+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:
+ LoadPe32Image.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_PE32_IMAGE_H__
+#define __LOAD_PE32_IMAGE_H__
+
+#define PE32_IMAGE_PROTOCOL_GUID \
+ {0x5cb5c776,0x60d5,0x45ee,{0x88,0x3c,0x45,0x27,0x8,0xcd,0x74,0x3f }}
+
+#define EFI_LOAD_PE_IMAGE_ATTRIBUTE_NONE 0x00
+#define EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION 0x01
+#define EFI_LOAD_PE_IMAGE_ATTRIBUTE_DEBUG_IMAGE_INFO_TABLE_REGISTRATION 0x02
+
+typedef struct _EFI_PE32_IMAGE_PROTOCOL EFI_PE32_IMAGE_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *LOAD_PE_IMAGE) (
+ IN EFI_PE32_IMAGE_PROTOCOL *This,
+ IN EFI_HANDLE ParentImageHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
+ IN VOID *SourceBuffer OPTIONAL,
+ IN UINTN SourceSize,
+ IN EFI_PHYSICAL_ADDRESS DstBuffer OPTIONAL,
+ OUT UINTN *NumberOfPages OPTIONAL,
+ OUT EFI_HANDLE *ImageHandle,
+ OUT EFI_PHYSICAL_ADDRESS *EntryPoint OPTIONAL,
+ IN UINT32 Attribute
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *UNLOAD_PE_IMAGE) (
+ IN EFI_PE32_IMAGE_PROTOCOL *This,
+ IN EFI_HANDLE ImageHandle
+ );
+
+struct _EFI_PE32_IMAGE_PROTOCOL {
+ LOAD_PE_IMAGE LoadPeImage;
+ UNLOAD_PE_IMAGE UnLoadPeImage;
+};
+
+extern EFI_GUID gEfiLoadPeImageProtocolGuid;
+
+#endif
+
diff --git a/EdkModulePkg/Include/Protocol/OEMBadging.h b/EdkModulePkg/Include/Protocol/OEMBadging.h
new file mode 100644
index 0000000000..6b4602e2ee
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/OEMBadging.h
@@ -0,0 +1,79 @@
+/*++
+
+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:
+
+ EfiOEMBadging.h
+
+Abstract:
+
+ EFI OEM Badging Protocol definition header file
+
+Revision History
+
+--*/
+
+#ifndef _EFI_OEM_BADGING_H_
+#define _EFI_OEM_BADGING_H_
+
+//
+// GUID for EFI OEM Badging Protocol
+//
+#define EFI_OEM_BADGING_PROTOCOL_GUID \
+ { 0x170e13c0, 0xbf1b, 0x4218, {0x87, 0x1d, 0x2a, 0xbd, 0xc6, 0xf8, 0x87, 0xbc } }
+
+
+typedef struct _EFI_OEM_BADGING_PROTOCOL EFI_OEM_BADGING_PROTOCOL;
+
+typedef enum {
+ EfiBadgingFormatBMP,
+ EfiBadgingFormatJPEG,
+ EfiBadgingFormatTIFF,
+ EfiBadgingFormatGIF,
+ EfiBadgingFormatUnknown
+} EFI_BADGING_FORMAT;
+
+typedef enum {
+ EfiBadgingDisplayAttributeLeftTop,
+ EfiBadgingDisplayAttributeCenterTop,
+ EfiBadgingDisplayAttributeRightTop,
+ EfiBadgingDisplayAttributeCenterRight,
+ EfiBadgingDisplayAttributeRightBottom,
+ EfiBadgingDisplayAttributeCenterBottom,
+ EfiBadgingDisplayAttributeLeftBottom,
+ EfiBadgingDisplayAttributeCenterLeft,
+ EfiBadgingDisplayAttributeCenter,
+ EfiBadgingDisplayAttributeCustomized
+} EFI_BADGING_DISPLAY_ATTRIBUTE;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BADGING_GET_IMAGE) (
+ IN EFI_OEM_BADGING_PROTOCOL *This,
+ IN OUT UINT32 *Instance,
+ OUT EFI_BADGING_FORMAT *Format,
+ OUT UINT8 **ImageData,
+ OUT UINTN *ImageSize,
+ OUT EFI_BADGING_DISPLAY_ATTRIBUTE *Attribute,
+ OUT UINTN *CoordinateX,
+ OUT UINTN *CoordinateY
+);
+
+
+struct _EFI_OEM_BADGING_PROTOCOL {
+ EFI_BADGING_GET_IMAGE GetImage;
+};
+
+
+extern EFI_GUID gEfiOEMBadgingProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/PciHotPlugRequest.h b/EdkModulePkg/Include/Protocol/PciHotPlugRequest.h
new file mode 100644
index 0000000000..6d194ae3f0
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/PciHotPlugRequest.h
@@ -0,0 +1,54 @@
+/*++
+
+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:
+
+ PciHotPlugRequest.h
+
+Abstract:
+
+
+
+--*/
+
+#ifndef _PCI_HOTPLUG_REQUEST_H_
+#define _PCI_HOTPLUG_REQUEST_H_
+
+#define EFI_PCI_HOTPLUG_REQUEST_PROTOCOL_GUID \
+{0x19cb87ab,0x2cb9,{0x4665,0x83,0x60,0xdd,0xcf,0x60,0x54,0xf7,0x9d}}
+
+typedef enum {
+ EfiPciHotPlugRequestAdd,
+ EfiPciHotplugRequestRemove
+} EFI_PCI_HOTPLUG_OPERATION;
+
+typedef struct _EFI_PCI_HOTPLUG_REQUEST_PROTOCOL EFI_PCI_HOTPLUG_REQUEST_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCI_HOTPLUG_REQUEST_NOTIFY) (
+ IN EFI_PCI_HOTPLUG_REQUEST_PROTOCOL *This,
+ IN EFI_PCI_HOTPLUG_OPERATION Operation,
+ IN EFI_HANDLE Controller,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL,
+ IN OUT UINT8 *NumberOfChildren,
+ IN OUT EFI_HANDLE *ChildHandleBuffer
+);
+
+
+
+struct _EFI_PCI_HOTPLUG_REQUEST_PROTOCOL {
+ EFI_PCI_HOTPLUG_REQUEST_NOTIFY Notify;
+};
+
+extern EFI_GUID gEfiPciHotPlugRequestProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/Performance.h b/EdkModulePkg/Include/Protocol/Performance.h
new file mode 100644
index 0000000000..c16ed8cced
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/Performance.h
@@ -0,0 +1,166 @@
+/*++
+
+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:
+
+ Performance.h
+
+Abstract:
+
+
+--*/
+
+#ifndef __PERFORMANCE_H_
+#define __PERFORMANCE_H_
+
+#define PERFORMANCE_PROTOCOL_GUID \
+ { 0x76b6bdfa, 0x2acd, 0x4462, {0x9E, 0x3F, 0xcb, 0x58, 0xC9, 0x69, 0xd9, 0x37 } }
+
+//
+// Forward reference for pure ANSI compatability
+//
+typedef struct _PERFORMANCE_PROTOCOL PERFORMANCE_PROTOCOL;
+
+#define DXE_TOK "DXE"
+#define SHELL_TOK "SHELL"
+#define PEI_TOK "PEI"
+#define BDS_TOK "BDS"
+#define DRIVERBINDING_START_TOK "DriverBinding:Start"
+#define DRIVERBINDING_SUPPORT_TOK "DriverBinding:Support"
+#define START_IMAGE_TOK "StartImage"
+#define LOAD_IMAGE_TOK "LoadImage"
+
+//
+// DXE_PERFORMANCE_STRING_SIZE must be a multiple of 8.
+//
+#define DXE_PERFORMANCE_STRING_SIZE 32
+#define DXE_PERFORMANCE_STRING_LENGTH (DXE_PERFORMANCE_STRING_SIZE - 1)
+
+//
+// The default guage entries number for DXE phase.
+//
+#define INIT_DXE_GAUGE_DATA_ENTRIES 800
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS Handle;
+ CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE];
+ CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE];
+ UINT64 StartTimeStamp;
+ UINT64 EndTimeStamp;
+} GAUGE_DATA_ENTRY;
+
+//
+// The header must be aligned at 8 bytes
+//
+typedef struct {
+ UINT32 NumberOfEntries;
+ UINT32 Reserved;
+} GAUGE_DATA_HEADER;
+
+/**
+ Adds a record at the end of the performance measurement log
+ that records the start time of a performance measurement.
+
+ Adds a record to the end of the performance measurement log
+ that contains the Handle, Token, and Module.
+ The end time of the new record must be set to zero.
+ If TimeStamp is not zero, then TimeStamp is used to fill in the start time in the record.
+ If TimeStamp is zero, the start time in the record is filled in with the value
+ read from the current time stamp.
+
+ @param Handle Pointer to environment specific context used
+ to identify the component being measured.
+ @param Token Pointer to a Null-terminated ASCII string
+ that identifies the component being measured.
+ @param Module Pointer to a Null-terminated ASCII string
+ that identifies the module being measured.
+ @param TimeStamp 64-bit time stamp.
+
+ @retval EFI_SUCCESS The data was read correctly from the device.
+ @retval EFI_OUT_OF_RESOURCES There are not enough resources to record the measurement.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI * PERFORMANCE_START_GAUGE) (
+ IN CONST VOID *Handle, OPTIONAL
+ IN CONST CHAR8 *Token, OPTIONAL
+ IN CONST CHAR8 *Module, OPTIONAL
+ IN UINT64 TimeStamp
+ );
+
+/**
+ Searches the performance measurement log from the beginning of the log
+ for the first matching record that contains a zero end time and fills in a valid end time.
+
+ Searches the performance measurement log from the beginning of the log
+ for the first record that matches Handle, Token, and Module and has an end time value of zero.
+ If the record can not be found then return EFI_NOT_FOUND.
+ If the record is found and TimeStamp is not zero,
+ then the end time in the record is filled in with the value specified by TimeStamp.
+ If the record is found and TimeStamp is zero, then the end time in the matching record
+ is filled in with the current time stamp value.
+
+ @param Handle Pointer to environment specific context used
+ to identify the component being measured.
+ @param Token Pointer to a Null-terminated ASCII string
+ that identifies the component being measured.
+ @param Module Pointer to a Null-terminated ASCII string
+ that identifies the module being measured.
+ @param TimeStamp 64-bit time stamp.
+
+ @retval EFI_SUCCESS The end of the measurement was recorded.
+ @retval EFI_NOT_FOUND The specified measurement record could not be found.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI * PERFORMANCE_END_GAUGE) (
+ IN CONST VOID *Handle, OPTIONAL
+ IN CONST CHAR8 *Token, OPTIONAL
+ IN CONST CHAR8 *Module, OPTIONAL
+ IN UINT64 TimeStamp
+ );
+
+/**
+ Retrieves a previously logged performance measurement.
+
+ Retrieves the performance log entry from the performance log specified by LogEntryKey.
+ If it stands for a valid entry, then EFI_SUCCESS is returned and
+ GaugeDataEntry stores the pointer to that entry.
+
+ @param LogEntryKey The key for the previous performance measurement log entry.
+ If 0, then the first performance measurement log entry is retrieved.
+ @param GaugeDataEntry The indirect pointer to the gauge data entry specified by LogEntryKey
+ if the retrieval is successful.
+
+ @retval EFI_SUCCESS The GuageDataEntry is successfuly found based on LogEntryKey.
+ @retval EFI_NOT_FOUND The LogEntryKey is the last entry (equals to the total entry number).
+ @retval EFI_INVALIDE_PARAMETER The LogEntryKey is not a valid entry (greater than the total entry number).
+ @retval EFI_INVALIDE_PARAMETER GaugeDataEntry is NULL.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI * PERFORMANCE_GET_GAUGE) (
+ IN UINTN LogEntryKey,
+ OUT GAUGE_DATA_ENTRY **GaugeDataEntry
+ );
+
+struct _PERFORMANCE_PROTOCOL {
+ PERFORMANCE_START_GAUGE StartGauge;
+ PERFORMANCE_END_GAUGE EndGauge;
+ PERFORMANCE_GET_GAUGE GetGauge;
+};
+
+extern EFI_GUID gPerformanceProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/Print.h b/EdkModulePkg/Include/Protocol/Print.h
new file mode 100644
index 0000000000..eee7a0db47
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/Print.h
@@ -0,0 +1,50 @@
+/*++
+
+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:
+
+ Print.h
+
+Abstract:
+
+ This file defines the Print protocol
+
+--*/
+
+#ifndef _PPRINT_H_
+#define _PPRINT_H_
+
+#define EFI_PRINT_PROTOCOL_GUID \
+ { 0xdf2d868e, 0x32fc, 0x4cf0, {0x8e, 0x6b, 0xff, 0xd9, 0x5d, 0x13, 0x43, 0xd0 } }
+
+//
+// Forward reference for pure ANSI compatability
+//
+typedef struct _EFI_PRINT_PROTOCOL EFI_PRINT_PROTOCOL;
+
+
+typedef
+UINTN
+(EFIAPI *EFI_VSPRINT) (
+ OUT CHAR16 *StartOfBuffer,
+ IN UINTN BufferSize,
+ IN CONST CHAR16 *FormatString,
+ IN VA_LIST Marker
+ );
+
+struct _EFI_PRINT_PROTOCOL {
+ EFI_VSPRINT VSPrint;
+};
+
+
+extern EFI_GUID gEfiPrintProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/PxeDhcp4.h b/EdkModulePkg/Include/Protocol/PxeDhcp4.h
new file mode 100644
index 0000000000..cd4602c06c
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/PxeDhcp4.h
@@ -0,0 +1,350 @@
+/*++
+
+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:
+ PxeDhcp4.h
+
+Abstract:
+ EFI PXE DHCPv4 protocol definition
+
+--*/
+
+#ifndef _PXEDHCP4_H_
+#define _PXEDHCP4_H_
+
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+//
+// PXE DHCPv4 GUID definition
+//
+
+#define EFI_PXE_DHCP4_PROTOCOL_GUID \
+ { 0x03c4e624, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x29, 0x3f, 0xc1, 0x4d } }
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+//
+// Interface definition
+//
+
+typedef struct _EFI_PXE_DHCP4_PROTOCOL EFI_PXE_DHCP4_PROTOCOL;
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+//
+// Descriptions of the DHCP version 4 header and options can be found
+// in RFC-2131 and RFC-2132 at www.ietf.org
+//
+
+#pragma pack(1)
+typedef struct {
+
+ UINT8 op;
+#define BOOTP_REQUEST 1
+#define BOOTP_REPLY 2
+
+ UINT8 htype;
+
+ UINT8 hlen;
+
+ UINT8 hops;
+
+ UINT32 xid;
+
+ UINT16 secs;
+#define DHCP4_INITIAL_SECONDS 4
+
+ UINT16 flags;
+#define DHCP4_BROADCAST_FLAG 0x8000
+
+ UINT32 ciaddr;
+
+ UINT32 yiaddr;
+
+ UINT32 siaddr;
+
+ UINT32 giaddr;
+
+ UINT8 chaddr[16];
+
+ UINT8 sname[64];
+
+ UINT8 fname[128];
+
+//
+// This is the minimum option length as specified in RFC-2131.
+// The packet must be padded out this far with DHCP4_PAD.
+// DHCPv4 packets are usually 576 bytes in length. This length
+// includes the IPv4 and UDPv4 headers but not the media header.
+// Note: Not all DHCP relay agents will forward DHCPv4 packets
+// if they are less than 384 bytes or exceed 576 bytes. Even if
+// the underlying hardware can handle smaller and larger packets,
+// many older relay agents will not accept them.
+//
+ UINT32 magik;
+#define DHCP4_MAGIK_NUMBER 0x63825363
+
+ UINT8 options[308];
+
+} DHCP4_HEADER;
+#pragma pack()
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+//
+// DHCPv4 packet definition. Room for 576 bytes including IP and
+// UDP header.
+//
+
+#define DHCP4_MAX_PACKET_SIZE 576
+#define DHCP4_UDP_HEADER_SIZE 8
+#define DHCP4_IP_HEADER_SIZE 20
+
+#pragma pack(1)
+typedef union _DHCP4_PACKET {
+ UINT32 _force_data_alignment;
+
+ UINT8 raw[1500];
+
+ DHCP4_HEADER dhcp4;
+} DHCP4_PACKET;
+#pragma pack()
+
+#define DHCP4_SERVER_PORT 67
+#define DHCP4_CLIENT_PORT 68
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+//
+// DHCPv4 and PXE option numbers.
+//
+
+#define DHCP4_PAD 0
+#define DHCP4_END 255
+#define DHCP4_SUBNET_MASK 1
+#define DHCP4_TIME_OFFSET 2
+#define DHCP4_ROUTER_LIST 3
+#define DHCP4_TIME_SERVERS 4
+#define DHCP4_NAME_SERVERS 5
+#define DHCP4_DNS_SERVERS 6
+#define DHCP4_LOG_SERVERS 7
+#define DHCP4_COOKIE_SERVERS 8
+#define DHCP4_LPR_SREVERS 9
+#define DHCP4_IMPRESS_SERVERS 10
+#define DHCP4_RESOURCE_LOCATION_SERVERS 11
+#define DHCP4_HOST_NAME 12
+#define DHCP4_BOOT_FILE_SIZE 13
+#define DHCP4_DUMP_FILE 14
+#define DHCP4_DOMAIN_NAME 15
+#define DHCP4_SWAP_SERVER 16
+#define DHCP4_ROOT_PATH 17
+#define DHCP4_EXTENSION_PATH 18
+#define DHCP4_IP_FORWARDING 19
+#define DHCP4_NON_LOCAL_SOURCE_ROUTE 20
+#define DHCP4_POLICY_FILTER 21
+#define DHCP4_MAX_DATAGRAM_SIZE 22
+#define DHCP4_DEFAULT_TTL 23
+#define DHCP4_MTU_AGING_TIMEOUT 24
+#define DHCP4_MTU_SIZES 25
+#define DHCP4_MTU_TO_USE 26
+#define DHCP4_ALL_SUBNETS_LOCAL 27
+#define DHCP4_BROADCAST_ADDRESS 28
+#define DHCP4_PERFORM_MASK_DISCOVERY 29
+#define DHCP4_RESPOND_TO_MASK_REQ 30
+#define DHCP4_PERFORM_ROUTER_DISCOVERY 31
+#define DHCP4_ROUTER_SOLICIT_ADDRESS 32
+#define DHCP4_STATIC_ROUTER_LIST 33
+#define DHCP4_USE_ARP_TRAILERS 34
+#define DHCP4_ARP_CACHE_TIMEOUT 35
+#define DHCP4_ETHERNET_ENCAPSULATION 36
+#define DHCP4_TCP_DEFAULT_TTL 37
+#define DHCP4_TCP_KEEP_ALIVE_INT 38
+#define DHCP4_KEEP_ALIVE_GARBAGE 39
+#define DHCP4_NIS_DOMAIN_NAME 40
+#define DHCP4_NIS_SERVERS 41
+#define DHCP4_NTP_SERVERS 42
+#define DHCP4_VENDOR_SPECIFIC 43
+# define PXE_MTFTP_IP 1
+# define PXE_MTFTP_CPORT 2
+# define PXE_MTFTP_SPORT 3
+# define PXE_MTFTP_TMOUT 4
+# define PXE_MTFTP_DELAY 5
+# define PXE_DISCOVERY_CONTROL 6
+# define PXE_DISABLE_BROADCAST_DISCOVERY 0x01
+# define PXE_DISABLE_MULTICAST_DISCOVERY 0x02
+# define PXE_ACCEPT_ONLY_PXE_BOOT_SERVERS 0x04
+# define PXE_DO_NOT_PROMPT 0x08
+# define PXE_DISCOVERY_MCAST_ADDR 7
+# define PXE_BOOT_SERVERS 8
+# define PXE_BOOT_MENU 9
+# define PXE_BOOT_PROMPT 10
+# define PXE_MCAST_ADDRS_ALLOC 11
+# define PXE_CREDENTIAL_TYPES 12
+# define PXE_BOOT_ITEM 71
+#define DHCP4_NBNS_SERVERS 44
+#define DHCP4_NBDD_SERVERS 45
+#define DHCP4_NETBIOS_NODE_TYPE 46
+#define DHCP4_NETBIOS_SCOPE 47
+#define DHCP4_XWINDOW_SYSTEM_FONT_SERVERS 48
+#define DHCP4_XWINDOW_SYSTEM_DISPLAY_MANAGERS 49
+#define DHCP4_REQUESTED_IP_ADDRESS 50
+#define DHCP4_LEASE_TIME 51
+#define DHCP4_OPTION_OVERLOAD 52
+# define DHCP4_OVERLOAD_FNAME 1
+# define DHCP4_OVERLOAD_SNAME 2
+# define DHCP4_OVERLOAD_FNAME_AND_SNAME 3
+#define DHCP4_MESSAGE_TYPE 53
+# define DHCP4_MESSAGE_TYPE_DISCOVER 1
+# define DHCP4_MESSAGE_TYPE_OFFER 2
+# define DHCP4_MESSAGE_TYPE_REQUEST 3
+# define DHCP4_MESSAGE_TYPE_DECLINE 4
+# define DHCP4_MESSAGE_TYPE_ACK 5
+# define DHCP4_MESSAGE_TYPE_NAK 6
+# define DHCP4_MESSAGE_TYPE_RELEASE 7
+# define DHCP4_MESSAGE_TYPE_INFORM 8
+#define DHCP4_SERVER_IDENTIFIER 54
+#define DHCP4_PARAMETER_REQUEST_LIST 55
+#define DHCP4_ERROR_MESSAGE 56
+#define DHCP4_MAX_MESSAGE_SIZE 57
+# define DHCP4_DEFAULT_MAX_MESSAGE_SIZE 576
+#define DHCP4_RENEWAL_TIME 58
+#define DHCP4_REBINDING_TIME 59
+#define DHCP4_CLASS_IDENTIFIER 60
+#define DHCP4_CLIENT_IDENTIFIER 61
+#define DHCP4_NISPLUS_DOMAIN_NAME 64
+#define DHCP4_NISPLUS_SERVERS 65
+#define DHCP4_TFTP_SERVER_NAME 66
+#define DHCP4_BOOTFILE 67
+#define DHCP4_MOBILE_IP_HOME_AGENTS 68
+#define DHCP4_SMPT_SERVERS 69
+#define DHCP4_POP3_SERVERS 70
+#define DHCP4_NNTP_SERVERS 71
+#define DHCP4_WWW_SERVERS 72
+#define DHCP4_FINGER_SERVERS 73
+#define DHCP4_IRC_SERVERS 74
+#define DHCP4_STREET_TALK_SERVERS 75
+#define DHCP4_STREET_TALK_DIR_ASSIST_SERVERS 76
+#define DHCP4_NDS_SERVERS 85
+#define DHCP4_NDS_TREE_NAME 86
+#define DHCP4_NDS_CONTEXT 87
+#define DHCP4_SYSTEM_ARCHITECTURE 93
+#define DHCP4_NETWORK_ARCHITECTURE 94
+#define DHCP4_PLATFORM_ID 97
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+//
+// DHCP4 option format.
+//
+
+#pragma pack(1)
+typedef struct {
+ UINT8 op;
+ UINT8 len;
+ UINT8 data[1];
+} DHCP4_OP;
+#pragma pack()
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+typedef struct {
+ DHCP4_PACKET Discover;
+ DHCP4_PACKET Offer;
+ DHCP4_PACKET Request;
+ DHCP4_PACKET AckNak;
+ BOOLEAN SetupCompleted;
+ BOOLEAN InitCompleted;
+ BOOLEAN SelectCompleted;
+ BOOLEAN IsBootp;
+ BOOLEAN IsAck;
+} EFI_PXE_DHCP4_DATA;
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_DHCP4_RUN) (
+ IN EFI_PXE_DHCP4_PROTOCOL *This,
+ IN OPTIONAL UINTN OpLen,
+ IN OPTIONAL VOID *OpList
+ );
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_DHCP4_SETUP) (
+ IN EFI_PXE_DHCP4_PROTOCOL *This,
+ IN OPTIONAL EFI_PXE_DHCP4_DATA * NewData
+ );
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_DHCP4_INIT) (
+ IN EFI_PXE_DHCP4_PROTOCOL *This,
+ IN UINTN SecondsTimeout,
+ OUT UINTN *Offers,
+ OUT DHCP4_PACKET **OfferList
+ );
+
+#define DHCP4_MIN_SECONDS 1
+#define DHCP4_MAX_SECONDS 60
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_DHCP4_SELECT) (
+ IN EFI_PXE_DHCP4_PROTOCOL *This,
+ IN UINTN SecondsTimeout,
+ IN DHCP4_PACKET * offer
+ );
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_DHCP4_RENEW) (
+ IN EFI_PXE_DHCP4_PROTOCOL *This,
+ UINTN seconds_timeout
+ );
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_DHCP4_REBIND) (
+ IN EFI_PXE_DHCP4_PROTOCOL *This,
+ UINTN seconds_timeout
+ );
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PXE_DHCP4_RELEASE) (
+ IN EFI_PXE_DHCP4_PROTOCOL * This
+ );
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+#define EFI_PXE_DHCP4_PROTOCOL_REVISION 0x00010000
+
+struct _EFI_PXE_DHCP4_PROTOCOL {
+ UINT64 Revision;
+ EFI_PXE_DHCP4_RUN Run;
+ EFI_PXE_DHCP4_SETUP Setup;
+ EFI_PXE_DHCP4_INIT Init;
+ EFI_PXE_DHCP4_SELECT Select;
+ EFI_PXE_DHCP4_RENEW Renew;
+ EFI_PXE_DHCP4_REBIND Rebind;
+ EFI_PXE_DHCP4_RELEASE Release;
+ EFI_PXE_DHCP4_DATA *Data;
+};
+
+//
+//
+//
+
+extern EFI_GUID gEfiPxeDhcp4ProtocolGuid;
+
+#endif /* _PXEDHCP4_H_ */
+/* EOF - PxeDhcp4.h */
diff --git a/EdkModulePkg/Include/Protocol/PxeDhcp4CallBack.h b/EdkModulePkg/Include/Protocol/PxeDhcp4CallBack.h
new file mode 100644
index 0000000000..aa2b89a884
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/PxeDhcp4CallBack.h
@@ -0,0 +1,85 @@
+/*++
+
+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:
+ PxeDhcp4Callback.h
+
+Abstract:
+ EFI PXE DHCP4 Callback protocol definition.
+
+--*/
+
+#ifndef _PXE_DHCP4CALLBACK_H
+#define _PXE_DHCP4CALLBACK_H
+
+#include <Protocol/PxeDhcp4.h>
+//
+// GUID definition
+//
+
+#define EFI_PXE_DHCP4_CALLBACK_PROTOCOL_GUID \
+{ 0xc1544c01, 0x92a4, 0x4198, {0x8a, 0x84, 0x77, 0x85, 0x83, 0xc2, 0x36, 0x21 } }
+
+
+//
+// Revision number
+//
+
+#define EFI_PXE_DHCP4_CALLBACK_INTERFACE_REVISION 0x00010000
+
+//
+// Interface definition
+//
+
+typedef struct _EFI_PXE_DHCP4_CALLBACK_PROTOCOL EFI_PXE_DHCP4_CALLBACK_PROTOCOL;
+
+typedef enum {
+ EFI_PXE_DHCP4_FUNCTION_FIRST,
+ EFI_PXE_DHCP4_FUNCTION_INIT,
+ EFI_PXE_DHCP4_FUNCTION_SELECT,
+ EFI_PXE_DHCP4_FUNCTION_RENEW,
+ EFI_PXE_DHCP4_FUNCTION_REBIND,
+ EFI_PXE_DHCP4_FUNCTION_LAST
+} EFI_PXE_DHCP4_FUNCTION;
+
+typedef enum {
+ EFI_PXE_DHCP4_CALLBACK_STATUS_FIRST,
+ EFI_PXE_DHCP4_CALLBACK_STATUS_ABORT,
+ EFI_PXE_DHCP4_CALLBACK_STATUS_IGNORE_ABORT,
+ EFI_PXE_DHCP4_CALLBACK_STATUS_KEEP_ABORT,
+ EFI_PXE_DHCP4_CALLBACK_STATUS_CONTINUE,
+ EFI_PXE_DHCP4_CALLBACK_STATUS_IGNORE_CONTINUE,
+ EFI_PXE_DHCP4_CALLBACK_STATUS_KEEP_CONTINUE,
+ EFI_PXE_DHCP4_CALLBACK_STATUS_LAST
+} EFI_PXE_DHCP4_CALLBACK_STATUS;
+
+typedef
+EFI_PXE_DHCP4_CALLBACK_STATUS
+(EFIAPI *EFI_PXE_DHCP4_CALLBACK) (
+ IN EFI_PXE_DHCP4_PROTOCOL *This,
+ IN EFI_PXE_DHCP4_FUNCTION Function,
+ IN UINT32 PacketLen,
+ IN DHCP4_PACKET *Packet OPTIONAL
+ );
+
+struct _EFI_PXE_DHCP4_CALLBACK_PROTOCOL {
+ UINT64 Revision;
+ EFI_PXE_DHCP4_CALLBACK Callback;
+};
+
+//
+// GUID declaration
+//
+
+extern EFI_GUID gEfiPxeDhcp4CallbackProtocolGuid;
+
+#endif /* _PXE_DHCP4CALLBACK_H */
+/* EOF - PxeDhcp4Callback.h */
diff --git a/EdkModulePkg/Include/Protocol/ScsiIo.h b/EdkModulePkg/Include/Protocol/ScsiIo.h
new file mode 100644
index 0000000000..1b0bbbf862
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/ScsiIo.h
@@ -0,0 +1,241 @@
+/*++
+
+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:
+
+ SCSI I/O protocol.
+
+--*/
+
+#ifndef __SCSI_IO_H__
+#define __SCSI_IO_H__
+
+#define EFI_SCSI_IO_PROTOCOL_GUID \
+ { 0x403cd195, 0xf233, 0x48ec, {0x84, 0x55, 0xb2, 0xe5, 0x2f, 0x1d, 0x9e, 0x2 } }
+
+//
+// Forward reference for pure ANSI compatability
+//
+typedef struct _EFI_SCSI_IO_PROTOCOL EFI_SCSI_IO_PROTOCOL;
+
+//
+// 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 *DataBuffer;
+ VOID *SenseData;
+ VOID *Cdb;
+ UINT32 TransferLength;
+ 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,
+ OUT UINT32 *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 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 - 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_CMD) (
+ 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_WARN_BUFFER_TOO_SMALL - 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_CMD ExecuteSCSICommand;
+};
+
+extern EFI_GUID gEfiScsiIoProtocolGuid;
+
+#endif
+
diff --git a/EdkModulePkg/Include/Protocol/SecurityPolicy.h b/EdkModulePkg/Include/Protocol/SecurityPolicy.h
new file mode 100644
index 0000000000..f587b441e5
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/SecurityPolicy.h
@@ -0,0 +1,33 @@
+/*++
+
+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:
+
+ SecurityPolicy.h
+
+Abstract:
+
+ Security Policy protocol as defined in the DXE CIS
+
+--*/
+
+#ifndef _SECURITY_POLICY_H_
+#define _SECURITY_POLICY_H_
+
+//
+// Security policy protocol GUID definition
+//
+#define EFI_SECURITY_POLICY_PROTOCOL_GUID \
+ {0x78E4D245, 0xCD4D, 0x4a05, {0xA2, 0xBA, 0x47, 0x43, 0xE8, 0x6C, 0xFC, 0xAB} }
+
+extern EFI_GUID gEfiSecurityPolicyProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/UgaIo.h b/EdkModulePkg/Include/Protocol/UgaIo.h
new file mode 100644
index 0000000000..91ff8df35a
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/UgaIo.h
@@ -0,0 +1,236 @@
+/*++
+
+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:
+
+ 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.
+
+--*/
+struct _EFI_UGA_IO_PROTOCOL {
+ EFI_UGA_IO_PROTOCOL_CREATE_DEVICE CreateDevice;
+ EFI_UGA_IO_PROTOCOL_DELETE_DEVICE DeleteDevice;
+ PUGA_FW_SERVICE_DISPATCH DispatchService;
+};
+
+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/EdkModulePkg/Include/Protocol/UgaSplash.h b/EdkModulePkg/Include/Protocol/UgaSplash.h
new file mode 100644
index 0000000000..51dcf523d3
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/UgaSplash.h
@@ -0,0 +1,42 @@
+/*++
+
+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:
+
+ UgaSplash.h
+
+Abstract:
+
+ UGA Splash screen protocol.
+
+ Abstraction of a very simple graphics device.
+
+--*/
+
+#ifndef __UGA_SPLASH_H__
+#define __UGA_SPLASH_H__
+
+
+#define EFI_UGA_SPLASH_PROTOCOL_GUID \
+ { 0xa45b3a0d, 0x2e55, 0x4c03, {0xad, 0x9c, 0x27, 0xd4, 0x82, 0xb, 0x50, 0x7e } }
+
+typedef struct _EFI_UGA_SPLASH_PROTOCOL EFI_UGA_SPLASH_PROTOCOL;
+
+
+struct _EFI_UGA_SPLASH_PROTOCOL {
+ UINT32 PixelWidth;
+ UINT32 PixelHeight;
+ EFI_UGA_PIXEL *Image;
+};
+
+extern EFI_GUID gEfiUgaSplashProtocolGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Protocol/usbatapi.h b/EdkModulePkg/Include/Protocol/usbatapi.h
new file mode 100644
index 0000000000..8801a7ae6c
--- /dev/null
+++ b/EdkModulePkg/Include/Protocol/usbatapi.h
@@ -0,0 +1,83 @@
+/*++
+
+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:
+
+ UsbAtapi.h
+
+Abstract:
+
+ EFI Atapi Protocol definition.
+
+Revision History
+
+--*/
+
+#ifndef _EFI_USB_ATAPI_H
+#define _EFI_USB_ATAPI_H
+
+//
+// Transfer protocol types
+//
+#define BOT 0x50
+#define CBI0 0x00
+#define CBI1 0x01
+
+//
+// SubClass Code (defines command set)
+//
+#define EFI_USB_SUBCLASS_RBC 0x01
+#define EFI_USB_SUBCLASS_ATAPI 0x02
+#define EFI_USB_SUBCLASS_QIC_157 0x03
+#define EFI_USB_SUBCLASS_UFI 0x04
+#define EFI_USB_SUBCLASS_SFF_8070i 0x05
+#define EFI_USB_SUBCLASS_SCSI 0x06
+#define EFI_USB_SUBCLASS_RESERVED_LOW 0x07
+#define EFI_USB_SUBCLASS_RESERVED_HIGH 0xff
+//
+// Global GUID for transfer protocol interface
+//
+#define EFI_USB_ATAPI_PROTOCOL_GUID \
+ { 0x2B2F68DA, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } }
+
+typedef struct _EFI_USB_ATAPI_PROTOCOL EFI_USB_ATAPI_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_ATAPI_PACKET_CMD) (
+ IN EFI_USB_ATAPI_PROTOCOL *This,
+ IN VOID *Command,
+ IN UINT8 CommandSize,
+ IN VOID *DataBuffer,
+ IN UINT32 BufferLength,
+ IN EFI_USB_DATA_DIRECTION Direction,
+ IN UINT16 TimeOutInMilliSeconds
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_USB_MASS_STORAGE_RESET) (
+ IN EFI_USB_ATAPI_PROTOCOL *This,
+ IN BOOLEAN ExtendedVerification
+);
+
+//
+// Protocol Interface Structure
+//
+struct _EFI_USB_ATAPI_PROTOCOL {
+ EFI_USB_ATAPI_PACKET_CMD UsbAtapiPacketCmd;
+ EFI_USB_MASS_STORAGE_RESET UsbAtapiReset;
+ UINT32 CommandProtocol;
+};
+
+extern EFI_GUID gEfiUsbAtapiProtocolGuid;
+
+#endif