summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h6
-rw-r--r--MdePkg/Include/IndustryStandard/Pci.h3
-rw-r--r--MdePkg/Include/IndustryStandard/PciExpress21.h220
-rw-r--r--MdePkg/Include/IndustryStandard/PciExpress30.h32
-rw-r--r--MdePkg/Include/IndustryStandard/SmBios.h18
-rw-r--r--MdePkg/Include/Library/MemoryAllocationLib.h5
-rw-r--r--MdePkg/Include/Library/PcdLib.h68
-rw-r--r--MdePkg/Include/Library/PeiServicesTablePointerLib.h21
-rw-r--r--MdePkg/Include/Library/S3BootScriptLib.h6
-rw-r--r--MdePkg/Include/Protocol/AdapterInformation.h224
-rw-r--r--MdePkg/Include/Protocol/DiskIo2.h7
-rw-r--r--MdePkg/Include/Protocol/FirmwareManagement.h6
-rw-r--r--MdePkg/Include/Protocol/FormBrowser2.h4
-rw-r--r--MdePkg/Include/Protocol/Hash.h12
-rw-r--r--MdePkg/Include/Protocol/SimpleFileSystem.h12
-rw-r--r--MdePkg/Include/Uefi/UefiSpec.h75
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Thunk16.S129
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Thunk16.asm40
-rw-r--r--MdePkg/Library/BasePcdLibNull/PcdLib.c51
-rw-r--r--MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c6
-rw-r--r--MdePkg/Library/DxePcdLib/DxePcdLib.c64
-rw-r--r--MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c4
-rw-r--r--MdePkg/Library/PeiPcdLib/PeiPcdLib.c72
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c26
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c89
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf5
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c21
-rw-r--r--MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c6
-rw-r--r--MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c151
-rw-r--r--MdePkg/Library/UefiDevicePathLib/DevicePathToText.c68
-rw-r--r--MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h7
-rw-r--r--MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c6
-rw-r--r--MdePkg/MdePkg.dec14
-rw-r--r--MdePkg/MdePkg.dsc4
34 files changed, 1208 insertions, 274 deletions
diff --git a/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h b/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h
index 0d519d0a6..1e1a5ac97 100644
--- a/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h
+++ b/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h
@@ -2,7 +2,7 @@
The definition for iSCSI Boot Firmware Table, it's defined in Microsoft's
iSCSI Boot Firmware Table(iBFT) as Defined in ACPI 3.0b Specification.
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -157,6 +157,10 @@ typedef struct {
#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_CHAP BIT2
#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_RCHAP BIT3
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP 0
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP 1
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP 2
+
#pragma pack()
#endif
diff --git a/MdePkg/Include/IndustryStandard/Pci.h b/MdePkg/Include/IndustryStandard/Pci.h
index ed59a4571..a808494a7 100644
--- a/MdePkg/Include/IndustryStandard/Pci.h
+++ b/MdePkg/Include/IndustryStandard/Pci.h
@@ -1,7 +1,7 @@
/** @file
Support for the latest PCI standard.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -17,6 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <IndustryStandard/Pci30.h>
#include <IndustryStandard/PciExpress21.h>
+#include <IndustryStandard/PciExpress30.h>
#include <IndustryStandard/PciCodeId.h>
#endif
diff --git a/MdePkg/Include/IndustryStandard/PciExpress21.h b/MdePkg/Include/IndustryStandard/PciExpress21.h
index 2ebbc3250..a9915e032 100644
--- a/MdePkg/Include/IndustryStandard/PciExpress21.h
+++ b/MdePkg/Include/IndustryStandard/PciExpress21.h
@@ -1,7 +1,7 @@
/** @file
Support for the latest PCI standard.
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -70,4 +70,222 @@ typedef struct {
#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR5 0x38
#define EFI_PCIE_CAPABILITY_ID_SRIOV_VF_MIGRATION_STATE 0x3C
+typedef struct {
+ UINT32 CapabilityId:16;
+ UINT32 CapabilityVersion:4;
+ UINT32 NextCapabilityOffset:12;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER;
+
+#define PCI_EXP_EXT_HDR PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_ID 0x0001
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_VER1 0x1
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_VER2 0x2
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 UncorrectableErrorStatus;
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorStatus;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT32 HeaderLog;
+ UINT32 RootErrorCommand;
+ UINT32 RootErrorStatus;
+ UINT16 ErrorSourceIdentification;
+ UINT16 CorrectableErrorSourceIdentification;
+ UINT32 TlpPrefixLog[4];
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_ADVANCED_ERROR_REPORTING;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_VIRTUAL_CHANNEL_ID 0x0002
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_VIRTUAL_CHANNEL_MFVC 0x0009
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_VIRTUAL_CHANNEL_VER1 0x1
+
+typedef struct {
+ UINT32 VcResourceCapability:24;
+ UINT32 PortArbTableOffset:8;
+ UINT32 VcResourceControl;
+ UINT16 Reserved1;
+ UINT16 VcResourceStatus;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_VC;
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 ExtendedVcCount:3;
+ UINT32 PortVcCapability1:29;
+ UINT32 PortVcCapability2:24;
+ UINT32 VcArbTableOffset:8;
+ UINT16 PortVcControl;
+ UINT16 PortVcStatus;
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_VC Capability[1];
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_CAPABILITY;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_SERIAL_NUMBER_ID 0x0003
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_SERIAL_NUMBER_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT64 SerialNumber;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_SERIAL_NUMBER;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_ID 0x0005
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 ElementSelfDescription;
+ UINT32 Reserved;
+ UINT32 LinkEntry[1];
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_LINK_DECLARATION;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_GET_LINK_COUNT(LINK_DECLARATION) (UINT8)(((LINK_DECLARATION->ElementSelfDescription)&0x0000ff00)>>8)
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_CONTROL_ID 0x0006
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_CONTROL_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 RootComplexLinkCapabilities;
+ UINT16 RootComplexLinkControl;
+ UINT16 RootComplexLinkStatus;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_INTERNAL_LINK_CONTROL;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_POWER_BUDGETING_ID 0x0004
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_POWER_BUDGETING_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 DataSelect:8;
+ UINT32 Reserved:24;
+ UINT32 Data;
+ UINT32 PowerBudgetCapability:1;
+ UINT32 Reserved2:7;
+ UINT32 Reserved3:24;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_POWER_BUDGETING;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_ID 0x000D
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT16 AcsCapability;
+ UINT16 AcsControl;
+ UINT8 EgressControlVectorArray[1];
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_ACS_EXTENDED;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_CONTROL(ACS_EXTENDED) (UINT8)(((ACS_EXTENDED->AcsCapability)&0x00000020))
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_VECTOR_SIZE(ACS_EXTENDED) (UINT8)(((ACS_EXTENDED->AcsCapability)&0x0000FF00))
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_ID 0x0007
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 AssociationBitmap;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_MULTI_FUNCTION_VIRTUAL_CHANNEL_ID 0x0008
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_MULTI_FUNCTION_VIRTUAL_CHANNEL_VER1 0x1
+
+typedef PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_CAPABILITY PCI_EXPRESS_EXTENDED_CAPABILITIES_MULTI_FUNCTION_VIRTUAL_CHANNEL_CAPABILITY;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_ID 0x000B
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 VendorSpecificHeader;
+ UINT8 VendorSpecific[1];
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_VENDOR_SPECIFIC;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_GET_SIZE(VENDOR) (UINT16)(((VENDOR->VendorSpecificHeader)&0xFFF00000)>>20)
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_RCRB_HEADER_ID 0x000A
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_RCRB_HEADER_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT16 VendorId;
+ UINT16 DeviceId;
+ UINT32 RcrbCapabilities;
+ UINT32 RcrbControl;
+ UINT32 Reserved;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_RCRB_HEADER;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID 0x0012
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT16 MultiCastCapability;
+ UINT16 MulticastControl;
+ UINT64 McBaseAddress;
+ UINT64 McReceiveAddress;
+ UINT64 McBlockAll;
+ UINT64 McBlockUntranslated;
+ UINT64 McOverlayBar;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_MULTICAST;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_RESIZABLE_BAR_ID 0x0015
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_RESIZABLE_BAR_VER1 0x1
+
+typedef struct {
+ UINT32 ResizableBarCapability;
+ UINT16 ResizableBarControl;
+ UINT16 Reserved;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_ENTRY;
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_ENTRY Capability[1];
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR;
+
+#define GET_NUMBER_RESIZABLE_BARS(x) (((x->Capability[0].ResizableBarControl) & 0xE0) >> 5)
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_ARI_CAPABILITY_ID 0x000E
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_ARI_CAPABILITY_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT16 AriCapability;
+ UINT16 AriControl;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_ARI_CAPABILITY;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_ID 0x0016
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 DpaCapability;
+ UINT32 DpaLatencyIndicator;
+ UINT16 DpaStatus;
+ UINT16 DpaControl;
+ UINT8 DpaPowerAllocationArray[1];
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_DYNAMIC_POWER_ALLOCATION;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_GET_SUBSTATE_MAX(POWER) (UINT16)(((POWER->DpaCapability)&0x0000000F))
+
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_LATENCE_TOLERANCE_REPORTING_ID 0x0018
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_LATENCE_TOLERANCE_REPORTING_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT16 MaxSnoopLatency;
+ UINT16 MaxNoSnoopLatency;
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_LATENCE_TOLERANCE_REPORTING;
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_TPH_ID 0x0017
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_TPH_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 TphRequesterCapability;
+ UINT32 TphRequesterControl;
+ UINT16 TphStTable[1];
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_TPH;
+
+#define GET_TPH_TABLE_SIZE(x) ((x->TphRequesterCapability & 0x7FF0000)>>16) * sizeof(UINT16)
+
#endif
diff --git a/MdePkg/Include/IndustryStandard/PciExpress30.h b/MdePkg/Include/IndustryStandard/PciExpress30.h
new file mode 100644
index 000000000..6e9e105da
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/PciExpress30.h
@@ -0,0 +1,32 @@
+/** @file
+ Support for the PCI Express 3.0 standard.
+
+ This header file may not define all structures. Please extend as required.
+
+ Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _PCIEXPRESS30_H_
+#define _PCIEXPRESS30_H_
+
+#include "PciExpress21.h"
+
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_SECONDARY_PCIE_ID 0x0019
+#define PCI_EXPRESS_EXTENDED_CAPABILITY_SECONDARY_PCIE_VER1 0x1
+
+typedef struct {
+ PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
+ UINT32 LinkControl3;
+ UINT32 LaneErrorStatus;
+ UINT16 EqualizationControl[2];
+} PCI_EXPRESS_EXTENDED_CAPABILITIES_SECONDARY_PCIE;
+
+#endif
diff --git a/MdePkg/Include/IndustryStandard/SmBios.h b/MdePkg/Include/IndustryStandard/SmBios.h
index c74e18a7f..91e85eeee 100644
--- a/MdePkg/Include/IndustryStandard/SmBios.h
+++ b/MdePkg/Include/IndustryStandard/SmBios.h
@@ -1,7 +1,7 @@
/** @file
Industry Standard Definitions of SMBIOS Table Specification v2.7.1
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -566,6 +566,22 @@ typedef enum {
} PROCESSOR_FAMILY_DATA;
///
+/// Processor Information2 - Processor Family2.
+///
+typedef enum {
+ ProcessorFamilySH3 = 0x0104,
+ ProcessorFamilySH4 = 0x0105,
+ ProcessorFamilyARM = 0x0118,
+ ProcessorFamilyStrongARM = 0x0119,
+ ProcessorFamily6x86 = 0x012C,
+ ProcessorFamilyMediaGX = 0x012D,
+ ProcessorFamilyMII = 0x012E,
+ ProcessorFamilyWinChip = 0x0140,
+ ProcessorFamilyDSP = 0x015E,
+ ProcessorFamilyVideoProcessor = 0x01F4
+} PROCESSOR_FAMILY2_DATA;
+
+///
/// Processor Information - Voltage.
///
typedef struct {
diff --git a/MdePkg/Include/Library/MemoryAllocationLib.h b/MdePkg/Include/Library/MemoryAllocationLib.h
index b5384498e..0df59e60a 100644
--- a/MdePkg/Include/Library/MemoryAllocationLib.h
+++ b/MdePkg/Include/Library/MemoryAllocationLib.h
@@ -6,7 +6,7 @@
and SMM (for example) is done via a different mechanism. Using a common library interface makes it
much easier to port algorithms from phase to phase.
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -110,6 +110,7 @@ FreePages (
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation. Must be a power of two.
@@ -134,6 +135,7 @@ AllocateAlignedPages (
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation. Must be a power of two.
@@ -158,6 +160,7 @@ AllocateAlignedRuntimePages (
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation. Must be a power of two.
diff --git a/MdePkg/Include/Library/PcdLib.h b/MdePkg/Include/Library/PcdLib.h
index 1ea4ac7ce..ea39bb53b 100644
--- a/MdePkg/Include/Library/PcdLib.h
+++ b/MdePkg/Include/Library/PcdLib.h
@@ -14,7 +14,7 @@
There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),
PatchPcdGetXX(), and PatchPcdSetXX().
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -439,6 +439,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Sets the 8-bit value for the token specified by TokenName. Value is returned.
If TokenName is not a valid token in the token space, then the module will not build.
+ If the set operation was not correctly performed, then ASSERT().
+
@param TokenName The name of the PCD token to retrieve a current value for.
@param Value The 8-bit value to set.
@@ -454,6 +456,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Sets the 16-bit value for the token specified by TokenName. Value is returned.
If TokenName is not a valid token in the token space, then the module will not build.
+ If the set operation was not correctly performed, then ASSERT().
+
@param TokenName The name of the PCD token to retrieve a current value for.
@param Value The 16-bit value to set.
@@ -469,6 +473,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Sets the 32-bit value for the token specified by TokenName. Value is returned.
If TokenName is not a valid token in the token space, then the module will not build.
+ If the set operation was not correctly performed, then ASSERT().
+
@param TokenName The name of the PCD token to retrieve a current value for.
@param Value The 32-bit value to set.
@@ -501,7 +507,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
then set SizeOfBuffer to the maximum size supported by TokenName and return NULL
to indicate that the set operation was not actually performed. If SizeOfBuffer
is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported
- by TokenName and NULL must be returned.
+ by TokenName and NULL must be returned, or ASSERT() if the set operation was not corretly performed.
If TokenName is not a valid token in the token space, then the module will not build.
If SizeOfBuffer is NULL, then ASSERT().
@@ -523,6 +529,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Sets the Boolean value for the token specified by TokenName. Value is returned.
If TokenName is not a valid token in the token space, then the module will not build.
+ If the set operation was not correctly performed, then ASSERT().
+
@param TokenName The name of the PCD token to set the current value for.
@param Buffer The Boolean value to set.
@@ -667,6 +675,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
then the module will not build.
If Guid is NULL, then ASSERT().
+ If the set operation was not correctly performed, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@@ -687,6 +696,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
then the module will not build.
If Guid is NULL, then ASSERT().
+ If the set operation was not correctly performed, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@@ -707,6 +717,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
then the module will not build.
If Guid is NULL, then ASSERT().
+ If the set operation was not correctly performed, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@@ -727,6 +738,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
then the module will not build.
If Guid is NULL, then ASSERT().
+ If the set operation was not correctly performed, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@@ -747,7 +759,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
NULL to indicate that the set operation was not actually performed. If SizeOfBuffer
is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by
- Guid and TokenName and NULL must be returned.
+ Guid and TokenName and NULL must be returned, or ASSERT() if the set operation was not corretly performed.
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
@@ -776,6 +788,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
then the module will not build.
If Guid is NULL, then ASSERT().
+ If the set operation was not correctly performed, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@@ -1081,7 +1094,9 @@ LibPcdGetExSize (
Sets the 8-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 8-bit value to set.
@@ -1101,7 +1116,9 @@ LibPcdSet8 (
Sets the 16-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 16-bit value to set.
@@ -1121,7 +1138,9 @@ LibPcdSet16 (
Sets the 32-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 32-bit value to set.
@@ -1141,7 +1160,9 @@ LibPcdSet32 (
Sets the 64-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 64-bit value to set.
@@ -1163,7 +1184,8 @@ LibPcdSet64 (
specified by Buffer and SizeOfBuffer. Buffer is returned.
If SizeOfBuffer is greater than the maximum size support by TokenNumber,
then set SizeOfBuffer to the maximum size supported by TokenNumber and
- return NULL to indicate that the set operation was not actually performed.
+ return NULL to indicate that the set operation was not actually performed,
+ or ASSERT() if the set operation was not corretly performed.
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
maximum size supported by TokenName and NULL must be returned.
@@ -1192,7 +1214,9 @@ LibPcdSetPtr (
Sets the Boolean value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The boolean value to set.
@@ -1212,9 +1236,10 @@ LibPcdSetBool (
Sets the 8-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -1237,9 +1262,10 @@ LibPcdSetEx8 (
Sets the 16-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -1262,9 +1288,10 @@ LibPcdSetEx16 (
Sets the 32-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -1287,8 +1314,10 @@ LibPcdSetEx32 (
Sets the 64-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -1313,7 +1342,7 @@ LibPcdSetEx64 (
Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
supported by TokenNumber and return NULL to indicate that the set operation
- was not actually performed.
+ was not actually performed, or ASSERT() if the set operation was not corretly performed.
If Guid is NULL, then ASSERT().
If SizeOfBuffer is NULL, then ASSERT().
@@ -1343,9 +1372,10 @@ LibPcdSetExPtr (
Sets the Boolean value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
diff --git a/MdePkg/Include/Library/PeiServicesTablePointerLib.h b/MdePkg/Include/Library/PeiServicesTablePointerLib.h
index 601e1d57f..b1bed2579 100644
--- a/MdePkg/Include/Library/PeiServicesTablePointerLib.h
+++ b/MdePkg/Include/Library/PeiServicesTablePointerLib.h
@@ -1,7 +1,7 @@
/** @file
Provides a service to retrieve a pointer to the PEI Services Table.
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -50,5 +50,24 @@ SetPeiServicesTablePointer (
IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer
);
+/**
+ Perform CPU specific actions required to migrate the PEI Services Table
+ pointer from temporary RAM to permanent RAM.
+
+ For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes
+ immediately preceding the Interrupt Descriptor Table (IDT) in memory.
+ For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes
+ immediately preceding the Interrupt Descriptor Table (IDT) in memory.
+ For Itanium and ARM CPUs, a the PEI Services Table Pointer is stored in
+ a dedicated CPU register. This means that there is no memory storage
+ associated with storing the PEI Services Table pointer, so no additional
+ migration actions are required for Itanium or ARM CPUs.
+
+**/
+VOID
+EFIAPI
+MigratePeiServicesTablePointer (
+ );
+
#endif
diff --git a/MdePkg/Include/Library/S3BootScriptLib.h b/MdePkg/Include/Library/S3BootScriptLib.h
index 0776812e6..1afb07c24 100644
--- a/MdePkg/Include/Library/S3BootScriptLib.h
+++ b/MdePkg/Include/Library/S3BootScriptLib.h
@@ -5,7 +5,7 @@
be provided in the Framework version library instance, which means some of these
APIs cannot be used if the underlying firmware is Framework and not PI.
- Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -281,7 +281,7 @@ S3BootScriptSaveStall (
);
/**
- Adds a record for an execution stall on the processor into a specified boot script table.
+ Adds a record for dispatching specified arbitrary code into a specified boot script table.
@param[in] EntryPoint The entry point of the code to be dispatched.
@param[in] Context The argument to be passed into the EntryPoint of the code
@@ -492,7 +492,7 @@ S3BootScriptSaveInformationAsciiString (
for figuring out how to get the script to run on an S3 resume because the boot script
maintained by the lib will be destroyed.
- @return the base address of the new copy of the boot script tble.
+ @return the base address of the new copy of the boot script table.
**/
UINT8*
diff --git a/MdePkg/Include/Protocol/AdapterInformation.h b/MdePkg/Include/Protocol/AdapterInformation.h
new file mode 100644
index 000000000..b9dac1ad7
--- /dev/null
+++ b/MdePkg/Include/Protocol/AdapterInformation.h
@@ -0,0 +1,224 @@
+/** @file
+ EFI Adapter Information Protocol definition.
+ The EFI Adapter Information Protocol is used to dynamically and quickly discover
+ or set device information for an adapter.
+
+ Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ @par Revision Reference:
+ This Protocol is introduced in UEFI Specification 2.4
+
+**/
+
+#ifndef __EFI_ADAPTER_INFORMATION_PROTOCOL_H__
+#define __EFI_ADAPTER_INFORMATION_PROTOCOL_H__
+
+
+#define EFI_ADAPTER_INFORMATION_PROTOCOL_GUID \
+ { \
+ 0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 } \
+ }
+
+#define EFI_ADAPTER_INFO_MEDIA_STATE_GUID \
+ { \
+ 0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 } \
+ }
+
+#define EFI_ADAPTER_INFO_NETWORK_BOOT_GUID \
+ { \
+ 0x1FBD2960, 0x4130, 0x41E5, {0x94, 0xAC, 0xD2, 0xCF, 0x03, 0x7F, 0xB3, 0x7C } \
+ }
+
+#define EFI_ADAPTER_INFO_SAN_MAC_ADDRESS_GUID \
+ { \
+ 0x114da5ef, 0x2cf1, 0x4e12, {0x9b, 0xbb, 0xc4, 0x70, 0xb5, 0x52, 0x5, 0xd9 } \
+ }
+
+typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL EFI_ADAPTER_INFORMATION_PROTOCOL;
+
+///
+/// EFI_ADAPTER_INFO_MEDIA_STATE
+///
+typedef struct {
+ ///
+ /// Returns the current media state status. MediaState can have any of the following values:
+ /// EFI_SUCCESS: There is media attached to the network adapter. EFI_NOT_READY: This detects a bounced state.
+ /// There was media attached to the network adapter, but it was removed and reattached. EFI_NO_MEDIA: There is
+ /// not any media attached to the network.
+ ///
+ EFI_STATUS MediaState;
+}EFI_ADAPTER_INFO_MEDIA_STATE;
+
+///
+/// EFI_ADAPTER_INFO_NETWORK_BOOT
+///
+typedef struct {
+ ///
+ /// TRUE if the adapter supports booting from iSCSI IPv4 targets.
+ ///
+ BOOLEAN iSsciIpv4BootCapablity;
+ ///
+ /// TRUE if the adapter supports booting from iSCSI IPv6 targets.
+ ///
+ BOOLEAN iScsiIpv6BootCapablity;
+ ///
+ /// TRUE if the adapter supports booting from FCoE targets.
+ ///
+ BOOLEAN FCoeBootCapablity;
+ ///
+ /// TRUE if the adapter supports an offload engine (such as TCP
+ /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations.
+ ///
+ BOOLEAN OffloadCapability;
+ ///
+ /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI
+ /// boot operations.
+ ///
+ BOOLEAN iScsiMpioCapability;
+ ///
+ /// TRUE if the adapter is currently configured to boot from iSCSI
+ /// IPv4 targets.
+ ///
+ BOOLEAN iScsiIpv4Boot;
+ ///
+ /// TRUE if the adapter is currently configured to boot from iSCSI
+ /// IPv6 targets.
+ ///
+ BOOLEAN iScsiIpv6Boot;
+ ///
+ /// TRUE if the adapter is currently configured to boot from FCoE targets.
+ ///
+ BOOLEAN FCoeBoot;
+}EFI_ADAPTER_INFO_NETWORK_BOOT;
+
+///
+/// EFI_ADAPTER_INFO_SAN_MAC_ADDRESS
+///
+typedef struct {
+ ///
+ /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet
+ /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter.
+ ///
+ EFI_MAC_ADDRESS SanMacAddress;
+}EFI_ADAPTER_INFO_SAN_MAC_ADDRESS;
+
+/**
+ Returns the current state information for the adapter.
+
+ This function returns information of type InformationType from the adapter.
+ If an adapter does not support the requested informational type, then
+ EFI_UNSUPPORTED is returned.
+
+ @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
+ @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
+ @param[out] InforamtionBlock The service returns a pointer to the buffer with the InformationBlock
+ structure which contains details about the data specific to InformationType.
+ @param[out] InforamtionBlockSize The driver returns the size of the InformationBlock in bytes.
+
+ @retval EFI_SUCCESS The InformationType information was retrieved.
+ @retval EFI_UNSUPPORTED The InformationType is not known.
+ @retval EFI_DEVICE_ERROR The device reported an error.
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
+ @retval EFI_INVALID_PARAMETER This is NULL.
+ @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
+ @retval EFI_INVALID_PARAMETER InformationBlockSize is NULL.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ADAPTER_INFO_GET_INFO)(
+ IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,
+ IN EFI_GUID *InformationType,
+ OUT VOID **InformationBlock,
+ OUT UINTN *InformationBlockSize
+ );
+
+/**
+ Sets state information for an adapter.
+
+ This function sends information of type InformationType for an adapter.
+ If an adapter does not support the requested information type, then EFI_UNSUPPORTED
+ is returned.
+
+ @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
+ @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
+ @param[in] InforamtionBlock A pointer to the InformationBlock structure which contains details
+ about the data specific to InformationType.
+ @param[in] InforamtionBlockSize The size of the InformationBlock in bytes.
+
+ @retval EFI_SUCCESS The information was received and interpreted successfully.
+ @retval EFI_UNSUPPORTED The InformationType is not known.
+ @retval EFI_DEVICE_ERROR The device reported an error.
+ @retval EFI_INVALID_PARAMETER This is NULL.
+ @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
+ @retval EFI_WRITE_PROTECTED The InformationType cannot be modified using EFI_ADAPTER_INFO_SET_INFO().
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ADAPTER_INFO_SET_INFO)(
+ IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,
+ IN EFI_GUID *InformationType,
+ IN VOID *InformationBlock,
+ IN UINTN InformationBlockSize
+ );
+
+/**
+ Get a list of supported information types for this instance of the protocol.
+
+ This function returns a list of InformationType GUIDs that are supported on an
+ adapter with this instance of EFI_ADAPTER_INFORMATION_PROTOCOL. The list is returned
+ in InfoTypesBuffer, and the number of GUID pointers in InfoTypesBuffer is returned in
+ InfoTypesBufferCount.
+
+ @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
+ @param[out] InfoTypesBuffer A pointer to the list of InformationType GUID pointers that are supported
+ by This.
+ @param[out] InfoTypesBufferCount A pointer to the number of GUID pointers present in InfoTypesBuffer.
+
+ @retval EFI_SUCCESS The list of information type GUIDs that are supported on this adapter was
+ returned in InfoTypesBuffer. The number of information type GUIDs was
+ returned in InfoTypesBufferCount.
+ @retval EFI_INVALID_PARAMETER This is NULL.
+ @retval EFI_INVALID_PARAMETER InfoTypesBuffer is NULL.
+ @retval EFI_INVALID_PARAMETER InfoTypesBufferCount is NULL.
+ @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES)(
+ IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,
+ OUT EFI_GUID **InfoTypesBuffer,
+ OUT UINTN *InfoTypesBufferCount
+ );
+
+///
+/// EFI_ADAPTER_INFORMATION_PROTOCOL
+/// The protocol for adapter provides the following services.
+/// - Gets device state information from adapter.
+/// - Sets device information for adapter.
+/// - Gets a list of supported information types for this instance of the protocol.
+///
+typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL {
+ EFI_ADAPTER_INFO_GET_INFO GetInformation;
+ EFI_ADAPTER_INFO_SET_INFO SetInformation;
+ EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes;
+};
+
+extern EFI_GUID gEfiAdapterInformationProtocolGuid;
+
+extern EFI_GUID gEfiAdapterInfoMediaStateGuid;
+
+extern EFI_GUID gEfiAdapterInfoNetworkBootGuid;
+
+extern EFI_GUID gEfiAdapterInfoSanMacAddressGuid;
+
+#endif
diff --git a/MdePkg/Include/Protocol/DiskIo2.h b/MdePkg/Include/Protocol/DiskIo2.h
index a6badf231..6e0665b1d 100644
--- a/MdePkg/Include/Protocol/DiskIo2.h
+++ b/MdePkg/Include/Protocol/DiskIo2.h
@@ -1,9 +1,8 @@
/** @file
- Disk IO protocol as defined in the UEFI 2.0 specification.
+ Disk I/O 2 protocol as defined in the UEFI 2.4 specification.
- The Disk IO2 protocol is used to convert block oriented devices into byte
- oriented devices. The Disk IO protocol is intended to layer on top of the
- Block IO protocol.
+ The Disk I/O 2 protocol defines an extension to the Disk I/O protocol to enable
+ non-blocking / asynchronous byte-oriented disk operation.
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h
index ae840268a..56b0ff53a 100644
--- a/MdePkg/Include/Protocol/FirmwareManagement.h
+++ b/MdePkg/Include/Protocol/FirmwareManagement.h
@@ -8,7 +8,7 @@
CheckImage(), GetPackageInfo(), and SetPackageInfo() shall return
EFI_UNSUPPORTED if not supported by the driver.
- Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -130,7 +130,7 @@ typedef struct {
#define IMAGE_COMPATIBILITY_CHECK_SUPPORTED 0x0000000000000001
///
-/// Descriptor Version
+/// Descriptor Version exposed by GetImageInfo() function
///
#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 2
@@ -148,6 +148,8 @@ typedef struct {
/// Provides the authorization for the firmware image operations. It is a signature across
/// the image data and the Monotonic Count value. Caller uses the private key that is
/// associated with a public key that has been provisioned via the key exchange.
+ /// Because this is defined as a signature, WIN_CERTIFICATE_UEFI_GUID.CertType must
+ /// be EFI_CERT_TYPE_PKCS7_GUID.
///
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
} EFI_FIRMWARE_IMAGE_AUTHENTICATION;
diff --git a/MdePkg/Include/Protocol/FormBrowser2.h b/MdePkg/Include/Protocol/FormBrowser2.h
index 976ffb8a7..9e83bfa6f 100644
--- a/MdePkg/Include/Protocol/FormBrowser2.h
+++ b/MdePkg/Include/Protocol/FormBrowser2.h
@@ -4,7 +4,7 @@
The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to
leverage the EFI configuration driver interface.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -82,7 +82,7 @@ typedef UINTN EFI_BROWSER_ACTION_REQUEST;
@param FormSetGuid This field points to the EFI_GUID which must match the Guid field or one of the
elements of the ClassId field in the EFI_IFR_FORM_SET op-code. If
- FormsetGuid is NULL, then this function will display the the form set class
+ FormsetGuid is NULL, then this function will display the form set class
EFI_HII_PLATFORM_SETUP_FORMSET_GUID.
@param FormId This field specifies the identifier of the form within the form set to render as the first
diff --git a/MdePkg/Include/Protocol/Hash.h b/MdePkg/Include/Protocol/Hash.h
index 9299c9669..1f9b3b32a 100644
--- a/MdePkg/Include/Protocol/Hash.h
+++ b/MdePkg/Include/Protocol/Hash.h
@@ -5,7 +5,7 @@
provided by a driver and to create and destroy instances of the EFI Hash Protocol
so that a multiple drivers can use the underlying hashing services.
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -69,6 +69,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
0x8628752a, 0x6cb7, 0x4814, {0x96, 0xfc, 0x24, 0xa8, 0x15, 0xac, 0x22, 0x26 } \
}
+//
+// Note: Use of the following algorithms with EFI_HASH_PROTOCOL is deprecated.
+// EFI_HASH_ALGORITHM_SHA1_GUID
+// EFI_HASH_ALGORITHM_SHA224_GUID
+// EFI_HASH_ALGORITHM_SHA256_GUID
+// EFI_HASH_ALGORITHM_SHA384_GUID
+// EFI_HASH_ALGORITHM_SHA512_GUID
+// EFI_HASH_ALGORTIHM_MD5_GUID
+//
+
typedef struct _EFI_HASH_PROTOCOL EFI_HASH_PROTOCOL;
typedef UINT8 EFI_MD5_HASH[16];
diff --git a/MdePkg/Include/Protocol/SimpleFileSystem.h b/MdePkg/Include/Protocol/SimpleFileSystem.h
index bc6718cf6..461e56822 100644
--- a/MdePkg/Include/Protocol/SimpleFileSystem.h
+++ b/MdePkg/Include/Protocol/SimpleFileSystem.h
@@ -7,7 +7,7 @@
UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -517,8 +517,10 @@ EFI_STATUS
IN OUT EFI_FILE_IO_TOKEN *Token
);
-#define EFI_FILE_PROTOCOL_REVISION 0x00010000
-#define EFI_FILE_PROTOCOL_REVISION2 0x00020000
+#define EFI_FILE_PROTOCOL_REVISION 0x00010000
+#define EFI_FILE_PROTOCOL_REVISION2 0x00020000
+#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2
+
//
// Revision defined in EFI1.1.
//
@@ -534,8 +536,8 @@ EFI_STATUS
struct _EFI_FILE_PROTOCOL {
///
/// The version of the EFI_FILE_PROTOCOL interface. The version specified
- /// by this specification is 0x00010000. Future versions are required
- /// to be backward compatible to version 1.0.
+ /// by this specification is EFI_FILE_PROTOCOL_LATEST_REVISION.
+ /// Future versions are required to be backward compatible to version 1.0.
///
UINT64 Revision;
EFI_FILE_OPEN Open;
diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h
index e6819aa28..168ebf511 100644
--- a/MdePkg/Include/Uefi/UefiSpec.h
+++ b/MdePkg/Include/Uefi/UefiSpec.h
@@ -2043,41 +2043,46 @@ EFI_STATUS
///
/// EFI Boot Key Data
///
-typedef UINT32 EFI_BOOT_KEY_DATA;
-///
-/// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.
-///
-#define EFI_KEY_OPTION_REVISION_MASK 0x000000FF
-///
-/// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).
-///
-#define EFI_KEY_OPTION_SHIFT_PRESSED_MASK BIT8
-///
-/// Either the left or right Control keys must be pressed (1) or must not be pressed (0).
-///
-#define EFI_KEY_OPTION_CONTROL_PRESSED_MASK BIT9
-///
-/// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).
-///
-#define EFI_KEY_OPTION_ALT_PRESSED_MASK BIT10
-///
-/// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).
-///
-#define EFI_KEY_OPTION_LOGO_PRESSED_MASK BIT11
-///
-/// The Menu key must be pressed (1) or must not be pressed (0).
-///
-#define EFI_KEY_OPTION_MENU_PRESSED_MASK BIT12
-///
-/// The SysReq key must be pressed (1) or must not be pressed (0).
-///
-#define EFI_KEY_OPTION_SYS_REQ_PRESSED_MASK BIT13
-///
-/// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If
-/// zero, then only the shift state is considered. If more than one, then the boot option will
-/// only be launched if all of the specified keys are pressed with the same shift state.
-///
-#define EFI_KEY_OPTION_INPUT_KEY_COUNT_MASK (BIT30 | BIT31)
+typedef union {
+ struct {
+ ///
+ /// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.
+ ///
+ UINT32 Revision : 8;
+ ///
+ /// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).
+ ///
+ UINT32 ShiftPressed : 1;
+ ///
+ /// Either the left or right Control keys must be pressed (1) or must not be pressed (0).
+ ///
+ UINT32 ControlPressed : 1;
+ ///
+ /// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).
+ ///
+ UINT32 AltPressed : 1;
+ ///
+ /// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).
+ ///
+ UINT32 LogoPressed : 1;
+ ///
+ /// The Menu key must be pressed (1) or must not be pressed (0).
+ ///
+ UINT32 MenuPressed : 1;
+ ///
+ /// The SysReq key must be pressed (1) or must not be pressed (0).
+ ///
+ UINT32 SysReqPressed : 1;
+ UINT32 Reserved : 16;
+ ///
+ /// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If
+ /// zero, then only the shift state is considered. If more than one, then the boot option will
+ /// only be launched if all of the specified keys are pressed with the same shift state.
+ ///
+ UINT32 InputKeyCount : 2;
+ } Options;
+ UINT32 PackedValue;
+} EFI_BOOT_KEY_DATA;
///
/// EFI Key Option.
diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.S b/MdePkg/Library/BaseLib/Ia32/Thunk16.S
index 8356c5a1c..185655eec 100644
--- a/MdePkg/Library/BaseLib/Ia32/Thunk16.S
+++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.S
@@ -24,6 +24,28 @@
ASM_GLOBAL ASM_PFX(m16Start), ASM_PFX(m16Size), ASM_PFX(mThunk16Attr), ASM_PFX(m16Gdt), ASM_PFX(m16GdtrBase), ASM_PFX(mTransition)
ASM_GLOBAL ASM_PFX(InternalAsmThunk16)
+# define the structure of IA32_REGS
+.set _EDI, 0 #size 4
+.set _ESI, 4 #size 4
+.set _EBP, 8 #size 4
+.set _ESP, 12 #size 4
+.set _EBX, 16 #size 4
+.set _EDX, 20 #size 4
+.set _ECX, 24 #size 4
+.set _EAX, 28 #size 4
+.set _DS, 32 #size 2
+.set _ES, 34 #size 2
+.set _FS, 36 #size 2
+.set _GS, 38 #size 2
+.set _EFLAGS, 40 #size 4
+.set _EIP, 44 #size 4
+.set _CS, 48 #size 2
+.set _SS, 50 #size 2
+.set IA32_REGS_SIZE, 52
+
+ .text
+ .code16
+
ASM_PFX(m16Start):
SavedGdt: .space 6
@@ -31,21 +53,22 @@ SavedGdt: .space 6
ASM_PFX(BackFromUserCode):
push %ss
push %cs
- .byte 0x66
- call L_Base1 # push eip
+
+ calll L_Base1 # push eip
L_Base1:
- pushfw # pushfd actually
+ pushfl
cli # disable interrupts
push %gs
push %fs
push %es
push %ds
- pushaw # pushad actually
+ pushal
.byte 0x66, 0xba # mov edx, imm32
ASM_PFX(ThunkAttr): .space 4
testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl
jz 1f
- movl $0x15cd2401, %eax # mov ax, 2401h & int 15h
+ movw $0x2401, %ax
+ int $0x15
cli # disable interrupts
jnc 2f
1:
@@ -55,27 +78,26 @@ ASM_PFX(ThunkAttr): .space 4
orb $2, %al
outb %al, $0x92 # deactivate A20M#
2:
- xorw %ax, %ax # xor eax, eax
- movl %ss, %eax # mov ax, ss
- .byte 0x67, 0x66, 0x8d, 0x6c, 0x24, 0x34, 0x66
- mov %ebp, 0xffffffd8(%esi)
- mov 0xfffffff8(%esi), %ebx
- shlw $4, %ax # shl eax, 4
- addw %ax, %bp # add ebp, eax
- .byte 0x66, 0xb8 # mov eax, imm32
+ xorl %eax, %eax
+ movw %ss, %ax
+ leal IA32_REGS_SIZE(%esp), %ebp
+ mov %ebp, (_ESP - IA32_REGS_SIZE)(%bp)
+ mov (_EIP - IA32_REGS_SIZE)(%bp), %bx
+ shll $4, %eax
+ addl %eax, %ebp
+ .byte 0x66, 0xb8 # mov eax, imm32
SavedCr4: .space 4
movl %eax, %cr4
- lgdtw %cs:0xfffffff2(%edi)
- .byte 0x66, 0xb8 # mov eax, imm32
+ lgdtl %cs:(SavedGdt - L_Base1)(%bx)
+ .byte 0x66, 0xb8 # mov eax, imm32
SavedCr0: .space 4
movl %eax, %cr0
.byte 0xb8 # mov ax, imm16
SavedSs: .space 2
movl %eax, %ss
- .byte 0x66, 0xbc # mov esp, imm32
+ .byte 0x66, 0xbc # mov esp, imm32
SavedEsp: .space 4
- .byte 0x66
- lret # return to protected mode
+ lretl # return to protected mode
_EntryPoint: .long ASM_PFX(ToUserCode) - ASM_PFX(m16Start)
.word 0x8
@@ -85,37 +107,31 @@ _16Gdtr: .word GdtEnd - _NullSegDesc - 1
_16GdtrBase: .long _NullSegDesc
ASM_PFX(ToUserCode):
- movl %ss, %edx
- movl %ecx, %ss # set new segment selectors
- movl %ecx, %ds
- movl %ecx, %es
- movl %ecx, %fs
- movl %ecx, %gs
- movl %eax, %cr0
- movl %ebp, %cr4 # real mode starts at next instruction
- movl %esi, %ss # set up 16-bit stack segment
- xchgw %bx, %sp # set up 16-bit stack pointer
- .byte 0x66
- call L_Base # push eip
-L_Base:
- popw %bp # ebp <- offset L_Base
- .byte 0x67; # address size override
- push 54(%esp)
- lea 0xc(%esi), %eax
- push %eax
- lret
+ movw %ss, %dx
+ movw %cx, %ss # set new segment selectors
+ movw %cx, %ds
+ movw %cx, %es
+ movw %cx, %fs
+ movw %cx, %gs
+ movl %eax, %cr0 # real mode starts at next instruction
+ # which (per SDM) *must* be a far JMP.
+ ljmpw $0,$0 # will be filled in by InternalAsmThunk16
+L_Base: # to point here.
+ movl %ebp, %cr4
+ movw %si, %ss # set up 16-bit stack segment
+ xchgl %ebx, %esp # set up 16-bit stack pointer
-L_RealMode:
- mov %edx, %cs:0xffffffc5(%esi)
- mov %bx, %cs:0xffffffcb(%esi)
- lidtw %cs:0xffffffd7(%esi)
- popaw # popad actually
+ movw IA32_REGS_SIZE(%esp), %bp # get BackToUserCode address from stack
+ mov %dx, %cs:(SavedSs - ASM_PFX(BackFromUserCode))(%bp)
+ mov %ebx, %cs:(SavedEsp - ASM_PFX(BackFromUserCode))(%bp)
+ lidtl %cs:(_16Idtr - ASM_PFX(BackFromUserCode))(%bp)
+ popal
pop %ds
pop %es
pop %fs
pop %gs
- popfw # popfd
- lretw # transfer control to user code
+ popfl
+ lretl # transfer control to user code
_NullSegDesc: .quad 0
_16CsDesc:
@@ -134,6 +150,7 @@ _16DsDesc:
.byte 0
GdtEnd:
+ .code32
#
# @param RegSet The pointer to a IA32_DWORD_REGS structure
# @param Transition The pointer to the transition code
@@ -149,41 +166,43 @@ ASM_PFX(InternalAsmThunk16):
push %fs
push %gs
movl 36(%esp), %esi # esi <- RegSet
- movzwl 0x32(%esi), %edx
- mov 0xc(%esi), %edi
- add $0xffffffc8, %edi
+ movzwl _SS(%esi), %edx
+ mov _ESP(%esi), %edi
+ add $(-(IA32_REGS_SIZE + 4)), %edi
movl %edi, %ebx # ebx <- stack offset
imul $0x10, %edx, %eax
- push $0xd
+ push $(IA32_REGS_SIZE / 4)
addl %eax, %edi # edi <- linear address of 16-bit stack
pop %ecx
rep
movsl # copy RegSet
movl 40(%esp), %eax # eax <- address of transition code
movl %edx, %esi # esi <- 16-bit stack segment
- lea 0x61(%eax), %edx
+ lea (SavedCr0 - ASM_PFX(m16Start))(%eax), %edx
movl %eax, %ecx
andl $0xf, %ecx
shll $12, %eax
- lea 0x6(%ecx), %ecx
+ lea (ASM_PFX(BackFromUserCode) - ASM_PFX(m16Start))(%ecx), %ecx
movw %cx, %ax
stosl # [edi] <- return address of user code
- sgdtl 0xffffff9f(%edx)
+ addl $(L_Base - ASM_PFX(BackFromUserCode)), %eax
+ movl %eax, (L_Base - SavedCr0 - 4)(%edx)
+ sgdtl (SavedGdt - SavedCr0)(%edx)
sidtl 0x24(%esp)
movl %cr0, %eax
movl %eax, (%edx) # save CR0 in SavedCr0
andl $0x7ffffffe, %eax # clear PE, PG bits
movl %cr4, %ebp
- mov %ebp, 0xfffffff1(%edx)
+ mov %ebp, (SavedCr4 - SavedCr0)(%edx)
andl $0xffffffcf, %ebp # clear PAE, PSE bits
pushl $0x10
pop %ecx # ecx <- selector for data segments
- lgdtl 0x20(%edx)
+ lgdtl (_16Gdtr - SavedCr0)(%edx)
pushfl
- lcall *0x14(%edx)
+ lcall *(_EntryPoint - SavedCr0)(%edx)
popfl
lidtl 0x24(%esp)
- lea 0xffffffcc(%ebp), %eax
+ lea -IA32_REGS_SIZE(%ebp), %eax
pop %gs
pop %fs
pop %es
diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.asm b/MdePkg/Library/BaseLib/Ia32/Thunk16.asm
index 3e84aedf3..08955d4e9 100644
--- a/MdePkg/Library/BaseLib/Ia32/Thunk16.asm
+++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.asm
@@ -157,24 +157,30 @@ _ToUserCode PROC
mov es, ecx
mov fs, ecx
mov gs, ecx
- mov cr0, eax
- mov cr4, ebp ; real mode starts at next instruction
+ mov cr0, eax ; real mode starts at next instruction
+ ; which (per SDM) *must* be a far JMP.
+ DB 0eah
+_RealAddr DW 0,0 ; filled in by InternalAsmThunk16
+
+ mov cr4, ebp
mov ss, esi ; set up 16-bit stack segment
xchg sp, bx ; set up 16-bit stack pointer
- DB 66h
- call @Base ; push eip
-@Base:
- pop bp ; ebp <- address of @Base
- DB 67h ; address size override
- push [esp + sizeof (IA32_REGS) + 2]
- lea eax, [esi + (@RealMode - @Base)]
- push eax
- retf
-@RealMode:
- mov cs:[esi + (SavedSs - @Base)], edx
- mov cs:[esi + (SavedEsp - @Base)], bx
- DB 66h
- lidt fword ptr cs:[esi + (_16Idtr - @Base)]
+
+; mov bp, [esp + sizeof(IA32_REGS)
+ DB 67h
+ mov ebp, [esp + sizeof(IA32_REGS)] ; BackFromUserCode address from stack
+
+; mov cs:[bp + (SavedSs - _BackFromUserCode)], dx
+ mov cs:[esi + (SavedSs - _BackFromUserCode)], edx
+
+; mov cs:[bp + (SavedEsp - _BackFromUserCode)], ebx
+ DB 2eh, 66h, 89h, 9eh
+ DW SavedEsp - _BackFromUserCode
+
+; lidt cs:[bp + (_16Idtr - _BackFromUserCode)]
+ DB 2eh, 66h, 0fh, 01h, 9eh
+ DW _16Idtr - _BackFromUserCode
+
popaw ; popad actually
pop ds
pop es
@@ -230,6 +236,8 @@ InternalAsmThunk16 PROC USES ebp ebx esi edi ds es fs gs
lea ecx, [ecx + (_BackFromUserCode - m16Start)]
mov ax, cx
stosd ; [edi] <- return address of user code
+ add eax, _RealAddr + 4 - _BackFromUserCode
+ mov dword ptr [edx + (_RealAddr - SavedCr0)], eax
sgdt fword ptr [edx + (SavedGdt - SavedCr0)]
sidt fword ptr [esp + 36] ; save IDT stack in argument space
mov eax, cr0
diff --git a/MdePkg/Library/BasePcdLibNull/PcdLib.c b/MdePkg/Library/BasePcdLibNull/PcdLib.c
index 8333aaa3f..e03c01da5 100644
--- a/MdePkg/Library/BasePcdLibNull/PcdLib.c
+++ b/MdePkg/Library/BasePcdLibNull/PcdLib.c
@@ -1,7 +1,7 @@
/** @file
A emptry template implementation of PCD Library.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -400,7 +400,9 @@ LibPcdGetExSize (
Sets the 8-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 8-bit value to set.
@@ -426,7 +428,9 @@ LibPcdSet8 (
Sets the 16-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 16-bit value to set.
@@ -452,7 +456,9 @@ LibPcdSet16 (
Sets the 32-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 32-bit value to set.
@@ -478,7 +484,9 @@ LibPcdSet32 (
Sets the 64-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 64-bit value to set.
@@ -506,7 +514,8 @@ LibPcdSet64 (
specified by Buffer and SizeOfBuffer. Buffer is returned.
If SizeOfBuffer is greater than the maximum size support by TokenNumber,
then set SizeOfBuffer to the maximum size supported by TokenNumber and
- return NULL to indicate that the set operation was not actually performed.
+ return NULL to indicate that the set operation was not actually performed,
+ or ASSERT() if the set operation was not corretly performed.
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
maximum size supported by TokenName and NULL must be returned.
@@ -541,7 +550,9 @@ LibPcdSetPtr (
Sets the Boolean value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The boolean value to set.
@@ -567,9 +578,10 @@ LibPcdSetBool (
Sets the 8-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -598,9 +610,10 @@ LibPcdSetEx8 (
Sets the 16-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -629,9 +642,10 @@ LibPcdSetEx16 (
Sets the 32-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -660,8 +674,10 @@ LibPcdSetEx32 (
Sets the 64-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -692,7 +708,7 @@ LibPcdSetEx64 (
Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
supported by TokenNumber and return NULL to indicate that the set operation
- was not actually performed.
+ was not actually performed, or ASSERT() if the set operation was not corretly performed.
If Guid is NULL, then ASSERT().
If SizeOfBuffer is NULL, then ASSERT().
@@ -728,9 +744,10 @@ LibPcdSetExPtr (
Sets the Boolean value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
diff --git a/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c b/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c
index 8e1ca7f4e..bb075db7d 100644
--- a/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c
+++ b/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c
@@ -1,7 +1,7 @@
/** @file
Null function implementation for EFI S3 boot script.
- Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -257,7 +257,7 @@ S3BootScriptSaveDispatch (
return RETURN_SUCCESS;
}
/**
- Adds a record for an execution stall on the processor into a specified boot script table.
+ Adds a record for dispatching specified arbitrary code into a specified boot script table.
@param EntryPoint Entry point of the code to be dispatched.
@param Context Argument to be passed into the EntryPoint of the code to be dispatched.
@@ -455,7 +455,7 @@ S3BootScriptSaveInformationAsciiString (
how to get the script to run on an S3 resume because the boot script maintained by the lib will be
destroyed.
- @return the base address of the new copy of the boot script tble.
+ @return the base address of the new copy of the boot script table.
**/
UINT8*
diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLib/DxePcdLib.c
index bc87c4e6a..6f3a1b286 100644
--- a/MdePkg/Library/DxePcdLib/DxePcdLib.c
+++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c
@@ -1,7 +1,7 @@
/** @file
Implementation of PcdLib class library for DXE phase.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -489,7 +489,9 @@ LibPcdGetExSize (
Sets the 8-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 8-bit value to set.
@@ -518,7 +520,9 @@ LibPcdSet8 (
Sets the 16-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 16-bit value to set.
@@ -547,7 +551,9 @@ LibPcdSet16 (
Sets the 32-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 32-bit value to set.
@@ -576,6 +582,8 @@ LibPcdSet32 (
Sets the 64-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
+
+ If the set operation was not correctly performed, then ASSERT().
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 64-bit value to set.
@@ -607,7 +615,8 @@ LibPcdSet64 (
specified by Buffer and SizeOfBuffer. Buffer is returned.
If SizeOfBuffer is greater than the maximum size support by TokenNumber,
then set SizeOfBuffer to the maximum size supported by TokenNumber and
- return NULL to indicate that the set operation was not actually performed.
+ return NULL to indicate that the set operation was not actually performed,
+ or ASSERT() if the set operation was not correctly performed.
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
maximum size supported by TokenName and NULL must be returned.
@@ -631,6 +640,7 @@ LibPcdSetPtr (
)
{
EFI_STATUS Status;
+ UINTN InputSizeOfBuffer;
ASSERT (SizeOfBuffer != NULL);
@@ -638,10 +648,12 @@ LibPcdSetPtr (
ASSERT (Buffer != NULL);
}
+ InputSizeOfBuffer = *SizeOfBuffer;
Status = GetPcdProtocol()->SetPtr (TokenNumber, SizeOfBuffer, (VOID *) Buffer);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) && (*SizeOfBuffer < InputSizeOfBuffer)) {
return NULL;
}
+ ASSERT_EFI_ERROR (Status);
return (VOID *)Buffer;
}
@@ -653,7 +665,9 @@ LibPcdSetPtr (
Sets the Boolean value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The boolean value to set.
@@ -682,9 +696,10 @@ LibPcdSetBool (
Sets the 8-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -718,9 +733,10 @@ LibPcdSetEx8 (
Sets the 16-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -754,9 +770,10 @@ LibPcdSetEx16 (
Sets the 32-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -790,8 +807,10 @@ LibPcdSetEx32 (
Sets the 64-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -827,7 +846,7 @@ LibPcdSetEx64 (
Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
supported by TokenNumber and return NULL to indicate that the set operation
- was not actually performed.
+ was not actually performed, or ASSERT() if the set operation was not corretly performed.
If Guid is NULL, then ASSERT().
If SizeOfBuffer is NULL, then ASSERT().
@@ -852,6 +871,7 @@ LibPcdSetExPtr (
)
{
EFI_STATUS Status;
+ UINTN InputSizeOfBuffer;
ASSERT (Guid != NULL);
@@ -861,10 +881,12 @@ LibPcdSetExPtr (
ASSERT (Buffer != NULL);
}
+ InputSizeOfBuffer = *SizeOfBuffer;
Status = GetPiPcdProtocol()->SetPtr (Guid, TokenNumber, SizeOfBuffer, Buffer);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) && (*SizeOfBuffer < InputSizeOfBuffer)) {
return NULL;
}
+ ASSERT_EFI_ERROR (Status);
return Buffer;
}
@@ -876,9 +898,10 @@ LibPcdSetExPtr (
Sets the Boolean value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -1002,7 +1025,10 @@ LibPcdGetNextToken (
IN UINTN TokenNumber
)
{
- GetPiPcdProtocol()->GetNextToken (Guid, &TokenNumber);
+ EFI_STATUS Status;
+
+ Status = GetPiPcdProtocol()->GetNextToken (Guid, &TokenNumber);
+ ASSERT (!EFI_ERROR (Status) || TokenNumber == 0);
return TokenNumber;
}
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
index 90d4bbfd4..e325908aa 100644
--- a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
@@ -189,6 +189,7 @@ FreePages (
If there is not enough memory at the specified alignment remaining to satisfy the request, then
NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param MemoryType The type of memory to allocate.
@param Pages The number of 4 KB pages to allocate.
@@ -242,6 +243,7 @@ InternalAllocateAlignedPages (
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation.
@@ -270,6 +272,7 @@ AllocateAlignedPages (
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation.
@@ -298,6 +301,7 @@ AllocateAlignedRuntimePages (
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation.
diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
index a57751f41..536e1d05d 100644
--- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
+++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
@@ -1,7 +1,7 @@
/** @file
Implementation of PcdLib class library for PEI phase.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -490,7 +490,9 @@ LibPcdGetExSize (
Sets the 8-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 8-bit value to set.
@@ -520,7 +522,9 @@ LibPcdSet8 (
Sets the 16-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 16-bit value to set.
@@ -550,7 +554,9 @@ LibPcdSet16 (
Sets the 32-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 32-bit value to set.
@@ -580,7 +586,9 @@ LibPcdSet32 (
Sets the 64-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 64-bit value to set.
@@ -612,7 +620,8 @@ LibPcdSet64 (
specified by Buffer and SizeOfBuffer. Buffer is returned.
If SizeOfBuffer is greater than the maximum size support by TokenNumber,
then set SizeOfBuffer to the maximum size supported by TokenNumber and
- return NULL to indicate that the set operation was not actually performed.
+ return NULL to indicate that the set operation was not actually performed,
+ or ASSERT() if the set operation was not corretly performed.
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
maximum size supported by TokenName and NULL must be returned.
@@ -636,18 +645,20 @@ LibPcdSetPtr (
)
{
EFI_STATUS Status;
+ UINTN InputSizeOfBuffer;
ASSERT (SizeOfBuffer != NULL);
if (*SizeOfBuffer > 0) {
ASSERT (Buffer != NULL);
}
-
- Status = (GetPcdPpiPointer ())->SetPtr (TokenNumber, SizeOfBuffer, (VOID *) Buffer);
- if (EFI_ERROR (Status)) {
+ InputSizeOfBuffer = *SizeOfBuffer;
+ Status = (GetPcdPpiPointer ())->SetPtr (TokenNumber, SizeOfBuffer, (VOID *) Buffer);
+ if (EFI_ERROR (Status) && (*SizeOfBuffer < InputSizeOfBuffer)) {
return NULL;
}
+ ASSERT_EFI_ERROR (Status);
return (VOID *) Buffer;
}
@@ -659,7 +670,9 @@ LibPcdSetPtr (
Sets the Boolean value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
-
+
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The boolean value to set.
@@ -689,9 +702,10 @@ LibPcdSetBool (
Sets the 8-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -726,9 +740,10 @@ LibPcdSetEx8 (
Sets the 16-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -761,9 +776,10 @@ LibPcdSetEx16 (
Sets the 32-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -798,8 +814,10 @@ LibPcdSetEx32 (
Sets the 64-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -835,7 +853,7 @@ LibPcdSetEx64 (
Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
supported by TokenNumber and return NULL to indicate that the set operation
- was not actually performed.
+ was not actually performed, or ASSERT() if the set operation was not corretly performed.
If Guid is NULL, then ASSERT().
If SizeOfBuffer is NULL, then ASSERT().
@@ -860,17 +878,21 @@ LibPcdSetExPtr (
)
{
EFI_STATUS Status;
+ UINTN InputSizeOfBuffer;
+
+
ASSERT (SizeOfBuffer != NULL);
if (*SizeOfBuffer > 0) {
ASSERT (Buffer != NULL);
}
ASSERT (Guid != NULL);
+ InputSizeOfBuffer = *SizeOfBuffer;
Status = (GetPiPcdPpiPointer ())->SetPtr (Guid, TokenNumber, SizeOfBuffer, Buffer);
-
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) && (*SizeOfBuffer < InputSizeOfBuffer)) {
return NULL;
}
+ ASSERT_EFI_ERROR (Status);
return Buffer;
}
@@ -882,9 +904,10 @@ LibPcdSetExPtr (
Sets the Boolean value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
-
+
If Guid is NULL, then ASSERT().
-
+ If the set operation was not correctly performed, then ASSERT().
+
@param[in] Guid The pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@@ -1010,7 +1033,10 @@ LibPcdGetNextToken (
IN UINTN TokenNumber
)
{
- (GetPiPcdPpiPointer ())->GetNextToken (Guid, &TokenNumber);
+ EFI_STATUS Status;
+
+ Status = (GetPiPcdPpiPointer ())->GetNextToken (Guid, &TokenNumber);
+ ASSERT (!EFI_ERROR (Status) || TokenNumber == 0);
return TokenNumber;
}
diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
index 9b02316af..0c687a526 100644
--- a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
+++ b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
@@ -4,7 +4,7 @@
This library is used for PEIM which does executed from flash device directly but
executed in memory.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -88,4 +88,28 @@ PeiServicesTablePointerLibConstructor (
return EFI_SUCCESS;
}
+/**
+ Perform CPU specific actions required to migrate the PEI Services Table
+ pointer from temporary RAM to permanent RAM.
+
+ For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes
+ immediately preceding the Interrupt Descriptor Table (IDT) in memory.
+ For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes
+ immediately preceding the Interrupt Descriptor Table (IDT) in memory.
+ For Itanium and ARM CPUs, a the PEI Services Table Pointer is stored in
+ a dedicated CPU register. This means that there is no memory storage
+ associated with storing the PEI Services Table pointer, so no additional
+ migration actions are required for Itanium or ARM CPUs.
+**/
+VOID
+EFIAPI
+MigratePeiServicesTablePointer (
+ )
+{
+ //
+ // PEI Services Table pointer is cached in the global variable. No additional
+ // migration actions are required.
+ //
+ return;
+}
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
index 4e3f013ed..1ce3c727e 100644
--- a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
@@ -4,7 +4,7 @@
According to PI specification, the peiservice pointer is stored prior at IDT
table in IA32 and x64 architecture.
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -21,7 +21,6 @@
#include <Library/PeiServicesTablePointerLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
-#include <Ppi/TemporaryRamSupport.h>
/**
Retrieves the cached value of the PEI Services Table pointer.
@@ -70,42 +69,62 @@ SetPeiServicesTablePointer (
)
{
IA32_DESCRIPTOR Idtr;
- EFI_PHYSICAL_ADDRESS IdtBase;
- EFI_STATUS Status;
- EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI *TemporaryRamSupportPpi;
ASSERT (PeiServicesTablePointer != NULL);
AsmReadIdtr (&Idtr);
- if ((*(UINTN*)(Idtr.Base - sizeof (UINTN))) != (UINTN)PeiServicesTablePointer) {
- (*(UINTN*)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer;
- Status = (*PeiServicesTablePointer)->LocatePpi (
- PeiServicesTablePointer,
- &gEfiTemporaryRamSupportPpiGuid,
- 0,
- NULL,
- (VOID**)&TemporaryRamSupportPpi
- );
-
- if (EFI_ERROR (Status)) {
- //
- // If TemporaryRamSupportPpi is not found, Idt table needs to be migrated into memory.
- //
- Status = (*PeiServicesTablePointer)->AllocatePages (
- PeiServicesTablePointer,
- EfiBootServicesCode,
- EFI_SIZE_TO_PAGES(Idtr.Limit + 1 + sizeof (UINTN)),
- &IdtBase
- );
- if (!EFI_ERROR (Status)) {
- //
- // Migrate Idt table
- //
- CopyMem ((VOID *) (UINTN) IdtBase, (VOID *) (Idtr.Base - sizeof (UINTN)), Idtr.Limit + 1 + sizeof (UINTN));
- Idtr.Base = (UINTN) IdtBase + sizeof (UINTN);
- AsmWriteIdtr (&Idtr);
- }
- }
- }
+ (*(UINTN*)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer;
+}
+
+/**
+ Perform CPU specific actions required to migrate the PEI Services Table
+ pointer from temporary RAM to permanent RAM.
+
+ For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes
+ immediately preceding the Interrupt Descriptor Table (IDT) in memory.
+ For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes
+ immediately preceding the Interrupt Descriptor Table (IDT) in memory.
+ For Itanium and ARM CPUs, a the PEI Services Table Pointer is stored in
+ a dedicated CPU register. This means that there is no memory storage
+ associated with storing the PEI Services Table pointer, so no additional
+ migration actions are required for Itanium or ARM CPUs.
+
+ If The cached PEI Services Table pointer is NULL, then ASSERT().
+ If the permanent memory is allocated failed, then ASSERT().
+**/
+VOID
+EFIAPI
+MigratePeiServicesTablePointer (
+ )
+{
+ EFI_STATUS Status;
+ IA32_DESCRIPTOR Idtr;
+ EFI_PHYSICAL_ADDRESS IdtBase;
+ CONST EFI_PEI_SERVICES **PeiServices;
+
+ //
+ // Get PEI Services Table pointer
+ //
+ AsmReadIdtr (&Idtr);
+ PeiServices = (CONST EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.Base - sizeof (UINTN)));
+ ASSERT (PeiServices != NULL);
+ //
+ // Allocate the permanent memory.
+ //
+ Status = (*PeiServices)->AllocatePages (
+ PeiServices,
+ EfiBootServicesCode,
+ EFI_SIZE_TO_PAGES(Idtr.Limit + 1 + sizeof (UINTN)),
+ &IdtBase
+ );
+ ASSERT_EFI_ERROR (Status);
+ //
+ // Idt table needs to be migrated into memory.
+ //
+ CopyMem ((VOID *) (UINTN) IdtBase, (VOID *) (Idtr.Base - sizeof (UINTN)), Idtr.Limit + 1 + sizeof (UINTN));
+ Idtr.Base = (UINTN) IdtBase + sizeof (UINTN);
+ AsmWriteIdtr (&Idtr);
+
+ return;
}
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
index 020a7f7e8..7ebe9c81a 100644
--- a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
@@ -4,7 +4,7 @@
# PEI Services Table Pointer Library implementation that retrieves a pointer to the PEI
# Services Table from the IDT on IA-32 and x64.
#
-# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -40,6 +40,3 @@
DebugLib
BaseLib
BaseMemoryLib
-
-[Ppis]
- gEfiTemporaryRamSupportPpiGuid ## SOMETIMES_CONSUMES
diff --git a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c
index 4c91a9618..5da6e1d75 100644
--- a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c
+++ b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c
@@ -2,7 +2,7 @@
PEI Services Table Pointer Library implementation for IPF that uses Kernel
Register 7 to store the pointer.
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -66,6 +66,25 @@ SetPeiServicesTablePointer (
AsmWriteKr7 ((UINT64)(UINTN)PeiServicesTablePointer);
}
+/**
+ Perform CPU specific actions required to migrate the PEI Services Table
+ pointer from temporary RAM to permanent RAM.
+ For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes
+ immediately preceding the Interrupt Descriptor Table (IDT) in memory.
+ For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes
+ immediately preceding the Interrupt Descriptor Table (IDT) in memory.
+ For Itanium and ARM CPUs, a the PEI Services Table Pointer is stored in
+ a dedicated CPU register. This means that there is no memory storage
+ associated with storing the PEI Services Table pointer, so no additional
+ migration actions are required for Itanium or ARM CPUs.
+**/
+VOID
+EFIAPI
+MigratePeiServicesTablePointer (
+ )
+{
+ return;
+}
diff --git a/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c
index d68c1a1b6..49d7a57a0 100644
--- a/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c
@@ -11,7 +11,7 @@
In addition, allocation for the Reserved memory types are not supported and
will always return NULL.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -285,6 +285,7 @@ FreePages (
If Pages is 0, then NULL is returned. If there is not enough memory at the
specified alignment remaining to satisfy the request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param MemoryType The type of memory to allocate.
@param Pages The number of 4 KB pages to allocate.
@@ -372,6 +373,7 @@ InternalAllocateAlignedPages (
specified alignment remaining to satisfy the request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation.
@@ -400,6 +402,7 @@ AllocateAlignedPages (
specified alignment remaining to satisfy the request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation.
@@ -428,6 +431,7 @@ AllocateAlignedRuntimePages (
specified alignment remaining to satisfy the request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation.
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
index 8943191bd..008ec0b96 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
@@ -1,7 +1,7 @@
/** @file
DevicePathFromText protocol as defined in the UEFI 2.0 specification.
-Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -535,6 +535,79 @@ StrToAscii (
}
/**
+ Converts a generic text device path node to device path structure.
+
+ @param Type The type of the device path node.
+ @param TextDeviceNode The input text device path node.
+
+ @return A pointer to device path structure.
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+DevPathFromTextGenericPath (
+ IN UINT8 Type,
+ IN CHAR16 *TextDeviceNode
+ )
+{
+ EFI_DEVICE_PATH_PROTOCOL *Node;
+ CHAR16 *SubtypeStr;
+ CHAR16 *DataStr;
+ UINTN DataLength;
+
+ SubtypeStr = GetNextParamStr (&TextDeviceNode);
+ DataStr = GetNextParamStr (&TextDeviceNode);
+
+ if (DataStr == NULL) {
+ DataLength = 0;
+ } else {
+ DataLength = StrLen (DataStr) / 2;
+ }
+ Node = CreateDeviceNode (
+ Type,
+ (UINT8) Strtoi (SubtypeStr),
+ (UINT16) (sizeof (EFI_DEVICE_PATH_PROTOCOL) + DataLength)
+ );
+
+ StrToBuf ((UINT8 *) (Node + 1), DataLength, DataStr);
+ return Node;
+}
+
+/**
+ Converts a generic text device path node to device path structure.
+
+ @param TextDeviceNode The input Text device path node.
+
+ @return A pointer to device path structure.
+
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+DevPathFromTextPath (
+ IN CHAR16 *TextDeviceNode
+ )
+{
+ CHAR16 *TypeStr;
+
+ TypeStr = GetNextParamStr (&TextDeviceNode);
+
+ return DevPathFromTextGenericPath ((UINT8) Strtoi (TypeStr), TextDeviceNode);
+}
+
+/**
+ Converts a generic hardware text device path node to Hardware device path structure.
+
+ @param TextDeviceNode The input Text device path node.
+
+ @return A pointer to Hardware device path structure.
+
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+DevPathFromTextHardwarePath (
+ IN CHAR16 *TextDeviceNode
+ )
+{
+ return DevPathFromTextGenericPath (HARDWARE_DEVICE_PATH, TextDeviceNode);
+}
+
+/**
Converts a text device path node to Hardware PCI device path structure.
@param TextDeviceNode The input Text device path node.
@@ -719,6 +792,22 @@ DevPathFromTextCtrl (
}
/**
+ Converts a generic ACPI text device path node to ACPI device path structure.
+
+ @param TextDeviceNode The input Text device path node.
+
+ @return A pointer to ACPI device path structure.
+
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+DevPathFromTextAcpiPath (
+ IN CHAR16 *TextDeviceNode
+ )
+{
+ return DevPathFromTextGenericPath (ACPI_DEVICE_PATH, TextDeviceNode);
+}
+
+/**
Converts a string to EisaId.
@param Text The input string.
@@ -1046,6 +1135,22 @@ DevPathFromTextAcpiAdr (
}
/**
+ Converts a generic messaging text device path node to messaging device path structure.
+
+ @param TextDeviceNode The input Text device path node.
+
+ @return A pointer to messaging device path structure.
+
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+DevPathFromTextMsg (
+ IN CHAR16 *TextDeviceNode
+ )
+{
+ return DevPathFromTextGenericPath (MESSAGING_DEVICE_PATH, TextDeviceNode);
+}
+
+/**
Converts a text device path node to Parallel Port device path structure.
@param TextDeviceNode The input Text device path node.
@@ -2521,6 +2626,22 @@ DevPathFromTextVlan (
}
/**
+ Converts a media text device path node to media device path structure.
+
+ @param TextDeviceNode The input Text device path node.
+
+ @return A pointer to media device path structure.
+
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+DevPathFromTextMediaPath (
+ IN CHAR16 *TextDeviceNode
+ )
+{
+ return DevPathFromTextGenericPath (MEDIA_DEVICE_PATH, TextDeviceNode);
+}
+
+/**
Converts a text device path node to HD device path structure.
@param TextDeviceNode The input Text device path node.
@@ -2775,6 +2896,23 @@ DevPathFromTextRelativeOffsetRange (
return (EFI_DEVICE_PATH_PROTOCOL *) Offset;
}
+
+/**
+ Converts a BBS text device path node to BBS device path structure.
+
+ @param TextDeviceNode The input Text device path node.
+
+ @return A pointer to BBS device path structure.
+
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+DevPathFromTextBbsPath (
+ IN CHAR16 *TextDeviceNode
+ )
+{
+ return DevPathFromTextGenericPath (BBS_DEVICE_PATH, TextDeviceNode);
+}
+
/**
Converts a text device path node to BIOS Boot Specification device path structure.
@@ -2862,11 +3000,16 @@ DevPathFromTextSata (
}
GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE mUefiDevicePathLibDevPathFromTextTable[] = {
+ {L"Path", DevPathFromTextPath },
+
+ {L"HardwarePath", DevPathFromTextHardwarePath },
{L"Pci", DevPathFromTextPci },
{L"PcCard", DevPathFromTextPcCard },
{L"MemoryMapped", DevPathFromTextMemoryMapped },
{L"VenHw", DevPathFromTextVenHw },
{L"Ctrl", DevPathFromTextCtrl },
+
+ {L"AcpiPath", DevPathFromTextAcpiPath },
{L"Acpi", DevPathFromTextAcpi },
{L"PciRoot", DevPathFromTextPciRoot },
{L"PcieRoot", DevPathFromTextPcieRoot },
@@ -2877,6 +3020,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE mUefiDevicePathLibDevP
{L"AcpiEx", DevPathFromTextAcpiEx },
{L"AcpiExp", DevPathFromTextAcpiExp },
{L"AcpiAdr", DevPathFromTextAcpiAdr },
+
+ {L"Msg", DevPathFromTextMsg },
{L"Ata", DevPathFromTextAta },
{L"Scsi", DevPathFromTextScsi },
{L"Fibre", DevPathFromTextFibre },
@@ -2918,6 +3063,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE mUefiDevicePathLibDevP
{L"Unit", DevPathFromTextUnit },
{L"iSCSI", DevPathFromTextiSCSI },
{L"Vlan", DevPathFromTextVlan },
+
+ {L"MediaPath", DevPathFromTextMediaPath },
{L"HD", DevPathFromTextHD },
{L"CDROM", DevPathFromTextCDROM },
{L"VenMedia", DevPathFromTextVenMedia },
@@ -2925,6 +3072,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE mUefiDevicePathLibDevP
{L"Fv", DevPathFromTextFv },
{L"FvFile", DevPathFromTextFvFile },
{L"Offset", DevPathFromTextRelativeOffsetRange },
+
+ {L"BbsPath", DevPathFromTextBbsPath },
{L"BBS", DevPathFromTextBBS },
{L"Sata", DevPathFromTextSata },
{NULL, NULL}
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
index eebdbf239..9b1ca8e28 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
@@ -1,7 +1,7 @@
/** @file
DevicePathToText protocol as defined in the UEFI 2.0 specification.
-Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1755,6 +1755,15 @@ DevPathToTextEndInstance (
UefiDevicePathLibCatPrint (Str, L",");
}
+GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_GENERIC_TABLE mUefiDevicePathLibToTextTableGeneric[] = {
+ {HARDWARE_DEVICE_PATH, L"HardwarePath" },
+ {ACPI_DEVICE_PATH, L"AcpiPath" },
+ {MESSAGING_DEVICE_PATH, L"Msg" },
+ {MEDIA_DEVICE_PATH, L"MediaPath" },
+ {BBS_DEVICE_PATH, L"BbsPath" },
+ {0, NULL}
+};
+
/**
Converts an unknown device path structure to its string representative.
@@ -1769,17 +1778,48 @@ DevPathToTextEndInstance (
**/
VOID
-DevPathToTextNodeUnknown (
+DevPathToTextNodeGeneric (
IN OUT POOL_PRINT *Str,
IN VOID *DevPath,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
)
{
- UefiDevicePathLibCatPrint (Str, L"?");
+ EFI_DEVICE_PATH_PROTOCOL *Node;
+ UINTN Index;
+
+ Node = DevPath;
+
+ for (Index = 0; mUefiDevicePathLibToTextTableGeneric[Index].Text != NULL; Index++) {
+ if (DevicePathType (Node) == mUefiDevicePathLibToTextTableGeneric[Index].Type) {
+ break;
+ }
+ }
+
+ if (mUefiDevicePathLibToTextTableGeneric[Index].Text == NULL) {
+ //
+ // It's a node whose type cannot be recognized
+ //
+ UefiDevicePathLibCatPrint (Str, L"Path(%d,%d", DevicePathType (Node), DevicePathSubType (Node));
+ } else {
+ //
+ // It's a node whose type can be recognized
+ //
+ UefiDevicePathLibCatPrint (Str, L"%s(%d", mUefiDevicePathLibToTextTableGeneric[Index].Text, DevicePathSubType (Node));
+ }
+
+ Index = sizeof (EFI_DEVICE_PATH_PROTOCOL);
+ if (Index < DevicePathNodeLength (Node)) {
+ UefiDevicePathLibCatPrint (Str, L",");
+ for (; Index < DevicePathNodeLength (Node); Index++) {
+ UefiDevicePathLibCatPrint (Str, L"%02x", ((UINT8 *) Node)[Index]);
+ }
+ }
+
+ UefiDevicePathLibCatPrint (Str, L")");
}
-GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLibDevPathToTextTable[] = {
+GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLibToTextTable[] = {
{HARDWARE_DEVICE_PATH, HW_PCI_DP, DevPathToTextPci },
{HARDWARE_DEVICE_PATH, HW_PCCARD_DP, DevPathToTextPccard },
{HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, DevPathToTextMemMap },
@@ -1858,12 +1898,12 @@ UefiDevicePathLibConvertDeviceNodeToText (
// Process the device path node
// If not found, use a generic function
//
- ToText = DevPathToTextNodeUnknown;
- for (Index = 0; mUefiDevicePathLibDevPathToTextTable[Index].Function != NULL; Index++) {
- if (DevicePathType (DeviceNode) == mUefiDevicePathLibDevPathToTextTable[Index].Type &&
- DevicePathSubType (DeviceNode) == mUefiDevicePathLibDevPathToTextTable[Index].SubType
+ ToText = DevPathToTextNodeGeneric;
+ for (Index = 0; mUefiDevicePathLibToTextTable[Index].Function != NULL; Index++) {
+ if (DevicePathType (DeviceNode) == mUefiDevicePathLibToTextTable[Index].Type &&
+ DevicePathSubType (DeviceNode) == mUefiDevicePathLibToTextTable[Index].SubType
) {
- ToText = mUefiDevicePathLibDevPathToTextTable[Index].Function;
+ ToText = mUefiDevicePathLibToTextTable[Index].Function;
break;
}
}
@@ -1921,13 +1961,13 @@ UefiDevicePathLibConvertDevicePathToText (
// Find the handler to dump this device path node
// If not found, use a generic function
//
- ToText = DevPathToTextNodeUnknown;
- for (Index = 0; mUefiDevicePathLibDevPathToTextTable[Index].Function != NULL; Index += 1) {
+ ToText = DevPathToTextNodeGeneric;
+ for (Index = 0; mUefiDevicePathLibToTextTable[Index].Function != NULL; Index += 1) {
- if (DevicePathType (Node) == mUefiDevicePathLibDevPathToTextTable[Index].Type &&
- DevicePathSubType (Node) == mUefiDevicePathLibDevPathToTextTable[Index].SubType
+ if (DevicePathType (Node) == mUefiDevicePathLibToTextTable[Index].Type &&
+ DevicePathSubType (Node) == mUefiDevicePathLibToTextTable[Index].SubType
) {
- ToText = mUefiDevicePathLibDevPathToTextTable[Index].Function;
+ ToText = mUefiDevicePathLibToTextTable[Index].Function;
break;
}
}
diff --git a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h
index a7ed53189..233844cfc 100644
--- a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h
+++ b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h
@@ -1,7 +1,7 @@
/** @file
Definition for Device Path library.
-Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -69,6 +69,11 @@ typedef struct {
} DEVICE_PATH_TO_TEXT_TABLE;
typedef struct {
+ UINT8 Type;
+ CHAR16 *Text;
+} DEVICE_PATH_TO_TEXT_GENERIC_TABLE;
+
+typedef struct {
CHAR16 *DevicePathNodeText;
DEVICE_PATH_FROM_TEXT Function;
} DEVICE_PATH_FROM_TEXT_TABLE;
diff --git a/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c
index 0ccb52449..f1eaccc8d 100644
--- a/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c
@@ -2,7 +2,7 @@
Support routines for memory allocation routines based
on boot services for Dxe phase drivers.
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -160,6 +160,7 @@ FreePages (
If there is not enough memory at the specified alignment remaining to satisfy the request, then
NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param MemoryType The type of memory to allocate.
@param Pages The number of 4 KB pages to allocate.
@@ -246,6 +247,7 @@ InternalAllocateAlignedPages (
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation. Must be a power of two.
@@ -273,6 +275,7 @@ AllocateAlignedPages (
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation. Must be a power of two.
@@ -300,6 +303,7 @@ AllocateAlignedRuntimePages (
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
+ If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@param Alignment The requested alignment of the allocation. Must be a power of two.
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 9b37abdc9..affff516e 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -3,9 +3,9 @@
# This Package provides all definitions(including functions, MACROs, structures and library classes)
# and libraries instances, which are defined in MDE Specification.
# It also provides the definitions(including PPIs/PROTOCOLs/GUIDs) of
-# EFI1.10/UEFI2.3.1/PI1.2 and some Industry Standards.
+# EFI1.10/UEFI2.4/PI1.3 and some Industry Standards.
#
-# Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available under
@@ -23,7 +23,7 @@
DEC_SPECIFICATION = 0x00010005
PACKAGE_NAME = MdePkg
PACKAGE_GUID = 1E73767F-8F52-4603-AEB4-F29B510B6766
- PACKAGE_VERSION = 1.03
+ PACKAGE_VERSION = 1.04
[Includes]
@@ -528,6 +528,11 @@
gEfiRngAlgorithmX931AesGuid = { 0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9 }}
gEfiRngAlgorithmRaw = { 0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 }}
+ ## Include/Protocol/AdapterInformation.h
+ gEfiAdapterInfoMediaStateGuid = { 0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 }}
+ gEfiAdapterInfoNetworkBootGuid = { 0x1FBD2960, 0x4130, 0x41E5, {0x94, 0xAC, 0xD2, 0xCF, 0x03, 0x7F, 0xB3, 0x7C }}
+ gEfiAdapterInfoSanMacAddressGuid = { 0x114da5ef, 0x2cf1, 0x4e12, {0x9b, 0xbb, 0xc4, 0x70, 0xb5, 0x52, 0x5, 0xd9 }}
+
#
# GUID defined in PI1.0
#
@@ -1353,6 +1358,9 @@
## Include/Protocol/Rng.h
gEfiRngProtocolGuid = { 0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44 }}
+
+ ## Include/Protocol/AdapterInformation.h
+ gEfiAdapterInformationProtocolGuid = { 0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 }}
[PcdsFeatureFlag]
## If TRUE, the component name protocol will not be installed.
diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
index 389c4eb05..092483565 100644
--- a/MdePkg/MdePkg.dsc
+++ b/MdePkg/MdePkg.dsc
@@ -1,7 +1,7 @@
## @file
# EFI/PI MdePkg Package
#
-# Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -17,7 +17,7 @@
[Defines]
PLATFORM_NAME = Mde
PLATFORM_GUID = 082F8BFC-0455-4859-AE3C-ECD64FB81642
- PLATFORM_VERSION = 1.03
+ PLATFORM_VERSION = 1.04
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/Mde
SUPPORTED_ARCHITECTURES = IA32|IPF|X64|EBC|ARM|AARCH64