aboutsummaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/Pi
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2020-06-03 18:44:51 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2020-06-03 18:44:51 +0000
commit4a14dfcc1110b35118d5be8054fecf59ffb83032 (patch)
tree8bf1574ccba91c926acbe0a05d32482ba8825e26 /MdePkg/Include/Pi
parent0499b37cea9ca98acfe36368e521ad36b7783f2d (diff)
downloadsrc-vendor/edk2.tar.gz
src-vendor/edk2.zip
As with the previous import, only the MdePkg subdirectory has been brought in. The line-endings were also converted using: % find . -type f | xargs -n 1 sed -I.BAK -e `printf "s/\r//g"` % find . -name \*.BAK | xargs rm
Notes
Notes: svn path=/vendor/edk2/dist/; revision=361765 svn path=/vendor/edk2/ca407c7246bf405da6d9b1b9d93e5e7f17b4b1f9/; revision=361766; tag=vendor/edk2/ca407c7246bf405da6d9b1b9d93e5e7f17b4b1f9
Diffstat (limited to 'MdePkg/Include/Pi')
-rw-r--r--MdePkg/Include/Pi/PiBootMode.h8
-rw-r--r--MdePkg/Include/Pi/PiDependency.h24
-rw-r--r--MdePkg/Include/Pi/PiDxeCis.h86
-rw-r--r--MdePkg/Include/Pi/PiFirmwareFile.h53
-rw-r--r--MdePkg/Include/Pi/PiFirmwareVolume.h31
-rw-r--r--MdePkg/Include/Pi/PiHob.h51
-rw-r--r--MdePkg/Include/Pi/PiI2c.h10
-rw-r--r--MdePkg/Include/Pi/PiMmCis.h345
-rw-r--r--MdePkg/Include/Pi/PiMultiPhase.h74
-rw-r--r--MdePkg/Include/Pi/PiPeiCis.h183
-rw-r--r--MdePkg/Include/Pi/PiS3BootScript.h12
-rw-r--r--MdePkg/Include/Pi/PiSmmCis.h227
-rw-r--r--MdePkg/Include/Pi/PiSmmCommunicationAcpiTable.h20
-rw-r--r--MdePkg/Include/Pi/PiStatusCode.h38
14 files changed, 707 insertions, 455 deletions
diff --git a/MdePkg/Include/Pi/PiBootMode.h b/MdePkg/Include/Pi/PiBootMode.h
index 793833bccd4e..74b499a60427 100644
--- a/MdePkg/Include/Pi/PiBootMode.h
+++ b/MdePkg/Include/Pi/PiBootMode.h
@@ -2,13 +2,7 @@
Present the boot mode values in PI.
Copyright (c) 2006 - 2012, 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.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
PI Version 1.2.1A
diff --git a/MdePkg/Include/Pi/PiDependency.h b/MdePkg/Include/Pi/PiDependency.h
index da2cfee5f50b..82d59175abe7 100644
--- a/MdePkg/Include/Pi/PiDependency.h
+++ b/MdePkg/Include/Pi/PiDependency.h
@@ -1,14 +1,8 @@
/** @file
Present the dependency expression values in PI.
- Copyright (c) 2006 - 2008, 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.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
PI Version 1.0
@@ -17,16 +11,16 @@
#ifndef __PI_DEPENDENCY_H__
#define __PI_DEPENDENCY_H__
-///
+///
/// If present, this must be the first and only opcode,
/// EFI_DEP_BEFORE may be used by DXE and SMM drivers.
-///
+///
#define EFI_DEP_BEFORE 0x00
-///
+///
/// If present, this must be the first and only opcode,
/// EFI_DEP_AFTER may be used by DXE and SMM drivers.
-///
+///
#define EFI_DEP_AFTER 0x01
#define EFI_DEP_PUSH 0x02
@@ -38,10 +32,10 @@
#define EFI_DEP_END 0x08
-///
+///
/// If present, this must be the first opcode,
/// EFI_DEP_SOR is only used by DXE driver.
-///
+///
#define EFI_DEP_SOR 0x09
-#endif
+#endif
diff --git a/MdePkg/Include/Pi/PiDxeCis.h b/MdePkg/Include/Pi/PiDxeCis.h
index 5c157a8179e0..d69ec896357c 100644
--- a/MdePkg/Include/Pi/PiDxeCis.h
+++ b/MdePkg/Include/Pi/PiDxeCis.h
@@ -1,17 +1,11 @@
/** @file
Include file matches things in PI.
-Copyright (c) 2006 - 2015, 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
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
- PI Version 1.4
+ PI Version 1.7
**/
@@ -49,10 +43,14 @@ typedef enum {
///
EfiGcdMemoryTypeMemoryMappedIo,
///
- /// A memory region that is visible to the boot processor.
- /// This memory supports byte-addressable non-volatility.
+ /// A memory region that is visible to the boot processor.
+ /// This memory supports byte-addressable non-volatility.
///
- EfiGcdMemoryTypePersistentMemory,
+ EfiGcdMemoryTypePersistent,
+ //
+ // Keep original one for the compatibility.
+ //
+ EfiGcdMemoryTypePersistentMemory = EfiGcdMemoryTypePersistent,
///
/// A memory region that provides higher reliability relative to other memory in the
/// system. If all memory has the same reliability, then this bit is not used.
@@ -85,7 +83,7 @@ typedef enum {
///
/// The type of allocation to perform.
-///
+///
typedef enum {
///
/// The GCD memory space map is searched from the lowest address up to the highest address
@@ -93,22 +91,22 @@ typedef enum {
///
EfiGcdAllocateAnySearchBottomUp,
///
- /// The GCD memory space map is searched from the lowest address up
+ /// The GCD memory space map is searched from the lowest address up
/// to the specified MaxAddress looking for unallocated memory ranges.
///
EfiGcdAllocateMaxAddressSearchBottomUp,
///
- /// The GCD memory space map is checked to see if the memory range starting
+ /// The GCD memory space map is checked to see if the memory range starting
/// at the specified Address is available.
///
EfiGcdAllocateAddress,
///
- /// The GCD memory space map is searched from the highest address down to the lowest address
+ /// The GCD memory space map is searched from the highest address down to the lowest address
/// looking for unallocated memory ranges.
///
EfiGcdAllocateAnySearchTopDown,
///
- /// The GCD memory space map is searched from the specified MaxAddress
+ /// The GCD memory space map is searched from the specified MaxAddress
/// down to the lowest address looking for unallocated memory ranges.
///
EfiGcdAllocateMaxAddressSearchTopDown,
@@ -117,35 +115,35 @@ typedef enum {
///
/// EFI_GCD_MEMORY_SPACE_DESCRIPTOR.
-///
+///
typedef struct {
///
/// The physical address of the first byte in the memory region. Type
/// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function
/// description in the UEFI 2.0 specification.
- ///
+ ///
EFI_PHYSICAL_ADDRESS BaseAddress;
///
/// The number of bytes in the memory region.
- ///
+ ///
UINT64 Length;
///
/// The bit mask of attributes that the memory region is capable of supporting. The bit
/// mask of available attributes is defined in the GetMemoryMap() function description
/// in the UEFI 2.0 specification.
- ///
+ ///
UINT64 Capabilities;
///
/// The bit mask of attributes that the memory region is currently using. The bit mask of
/// available attributes is defined in GetMemoryMap().
- ///
+ ///
UINT64 Attributes;
///
/// Type of the memory region. Type EFI_GCD_MEMORY_TYPE is defined in the
/// AddMemorySpace() function description.
- ///
+ ///
EFI_GCD_MEMORY_TYPE GcdMemoryType;
///
@@ -153,7 +151,7 @@ typedef struct {
/// PhysicalStart and NumberOfBytes. If this field is NULL, then the memory
/// resource is not currently allocated. Type EFI_HANDLE is defined in
/// InstallProtocolInterface() in the UEFI 2.0 specification.
- ///
+ ///
EFI_HANDLE ImageHandle;
///
@@ -162,19 +160,19 @@ typedef struct {
/// field is NULL, then the memory resource is not associated with a device that is
/// described by a device handle. Type EFI_HANDLE is defined in
/// InstallProtocolInterface() in the UEFI 2.0 specification.
- ///
+ ///
EFI_HANDLE DeviceHandle;
} EFI_GCD_MEMORY_SPACE_DESCRIPTOR;
///
/// EFI_GCD_IO_SPACE_DESCRIPTOR.
-///
+///
typedef struct {
///
/// Physical address of the first byte in the I/O region. Type
/// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function
/// description in the UEFI 2.0 specification.
- ///
+ ///
EFI_PHYSICAL_ADDRESS BaseAddress;
///
@@ -182,18 +180,18 @@ typedef struct {
///
UINT64 Length;
- ///
+ ///
/// Type of the I/O region. Type EFI_GCD_IO_TYPE is defined in the
/// AddIoSpace() function description.
- ///
+ ///
EFI_GCD_IO_TYPE GcdIoType;
- ///
+ ///
/// The image handle of the agent that allocated the I/O resource described by
/// PhysicalStart and NumberOfBytes. If this field is NULL, then the I/O
/// resource is not currently allocated. Type EFI_HANDLE is defined in
/// InstallProtocolInterface() in the UEFI 2.0 specification.
- ///
+ ///
EFI_HANDLE ImageHandle;
///
@@ -202,7 +200,7 @@ typedef struct {
/// the I/O resource is not associated with a device that is described by a device handle.
/// Type EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI
/// 2.0 specification.
- ///
+ ///
EFI_HANDLE DeviceHandle;
} EFI_GCD_IO_SPACE_DESCRIPTOR;
@@ -216,7 +214,7 @@ typedef struct {
of the memory resource being added.
@param Length The size, in bytes, of the memory resource that
is being added.
- @param Capabilities The bit mask of attributes that the memory
+ @param Capabilities The bit mask of attributes that the memory
resource region supports.
@retval EFI_SUCCESS The memory resource was added to the global
@@ -224,13 +222,13 @@ typedef struct {
@retval EFI_INVALID_PARAMETER GcdMemoryType is invalid.
@retval EFI_INVALID_PARAMETER Length is zero.
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to add
- the memory resource to the global coherency
+ the memory resource to the global coherency
domain of the processor.
@retval EFI_UNSUPPORTED The processor does not support one or more bytes
- of the memory resource range specified by
+ of the memory resource range specified by
BaseAddress and Length.
@retval EFI_ACCESS_DENIED One or more bytes of the memory resource range
- specified by BaseAddress and Length conflicts
+ specified by BaseAddress and Length conflicts
with a memory resource range that was previously
added to the global coherency domain of the processor.
@retval EFI_ACCESS_DENIED One or more bytes of the memory resource range
@@ -258,7 +256,7 @@ EFI_STATUS
@param Length The size in bytes of the memory resource range that
is being allocated.
@param BaseAddress A pointer to a physical address to allocate.
- @param Imagehandle The image handle of the agent that is allocating
+ @param Imagehandle The image handle of the agent that is allocating
the memory resource.
@param DeviceHandle The device handle for which the memory resource
is being allocated.
@@ -298,7 +296,7 @@ EFI_STATUS
@retval EFI_SUCCESS The memory resource was freed from the global coherency domain of
the processor.
- @retval EFI_INVALID_PARAMETER Length is zero.
+ @retval EFI_INVALID_PARAMETER Length is zero.
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory
resource range specified by BaseAddress and Length.
@retval EFI_NOT_FOUND The memory resource range specified by BaseAddress and
@@ -323,7 +321,7 @@ EFI_STATUS
@retval EFI_SUCCESS The memory resource was removed from the global coherency
domain of the processor.
- @retval EFI_INVALID_PARAMETER Length is zero.
+ @retval EFI_INVALID_PARAMETER Length is zero.
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory
resource range specified by BaseAddress and Length.
@retval EFI_NOT_FOUND One or more bytes of the memory resource range specified by
@@ -370,7 +368,7 @@ EFI_STATUS
@param Attributes The bit mask of attributes to set for the memory region.
@retval EFI_SUCCESS The attributes were set for the memory region.
- @retval EFI_INVALID_PARAMETER Length is zero.
+ @retval EFI_INVALID_PARAMETER Length is zero.
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory
resource range specified by BaseAddress and Length.
@retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource
@@ -606,8 +604,8 @@ EFI_STATUS
/**
Loads and executed DXE drivers from firmware volumes.
- The Dispatch() function searches for DXE drivers in firmware volumes that have been
- installed since the last time the Dispatch() service was called. It then evaluates
+ The Dispatch() function searches for DXE drivers in firmware volumes that have been
+ installed since the last time the Dispatch() service was called. It then evaluates
the dependency expressions of all the DXE drivers and loads and executes those DXE
drivers whose dependency expression evaluate to TRUE. This service must interact with
the Security Architectural Protocol to authenticate DXE drivers before they are executed.
@@ -675,7 +673,7 @@ EFI_STATUS
@retval EFI_VOLUME_CORRUPTED The firmware volume described by FirmwareVolumeHeader
and Size is corrupted.
@retval EFI_OUT_OF_RESOURCES There are not enough system resources available to produce the
- EFI_FIRMWARE_VOLUME_PROTOCOL and EFI_DEVICE_PATH_PROTOCOL
+ EFI_FIRMWARE_VOLUME_PROTOCOL and EFI_DEVICE_PATH_PROTOCOL
for the firmware volume described by FirmwareVolumeHeader and Size.
**/
@@ -692,7 +690,7 @@ EFI_STATUS
//
#define DXE_SERVICES_SIGNATURE 0x565245535f455844ULL
#define DXE_SPECIFICATION_MAJOR_REVISION 1
-#define DXE_SPECIFICATION_MINOR_REVISION 40
+#define DXE_SPECIFICATION_MINOR_REVISION 70
#define DXE_SERVICES_REVISION ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION))
typedef struct {
diff --git a/MdePkg/Include/Pi/PiFirmwareFile.h b/MdePkg/Include/Pi/PiFirmwareFile.h
index 5591608baf1c..bfb8fe3695e5 100644
--- a/MdePkg/Include/Pi/PiFirmwareFile.h
+++ b/MdePkg/Include/Pi/PiFirmwareFile.h
@@ -1,17 +1,11 @@
/** @file
The firmware file related definitions in PI.
-Copyright (c) 2006 - 2015, 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
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
- PI Version 1.4.
+ PI Version 1.6.
**/
@@ -71,10 +65,15 @@ typedef UINT8 EFI_FFS_FILE_STATE;
#define EFI_FV_FILETYPE_DRIVER 0x07
#define EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER 0x08
#define EFI_FV_FILETYPE_APPLICATION 0x09
-#define EFI_FV_FILETYPE_SMM 0x0A
+#define EFI_FV_FILETYPE_MM 0x0A
+#define EFI_FV_FILETYPE_SMM EFI_FV_FILETYPE_MM
#define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE 0x0B
-#define EFI_FV_FILETYPE_COMBINED_SMM_DXE 0x0C
-#define EFI_FV_FILETYPE_SMM_CORE 0x0D
+#define EFI_FV_FILETYPE_COMBINED_MM_DXE 0x0C
+#define EFI_FV_FILETYPE_COMBINED_SMM_DXE EFI_FV_FILETYPE_COMBINED_MM_DXE
+#define EFI_FV_FILETYPE_MM_CORE 0x0D
+#define EFI_FV_FILETYPE_SMM_CORE EFI_FV_FILETYPE_MM_CORE
+#define EFI_FV_FILETYPE_MM_STANDALONE 0x0E
+#define EFI_FV_FILETYPE_MM_CORE_STANDALONE 0x0F
#define EFI_FV_FILETYPE_OEM_MIN 0xc0
#define EFI_FV_FILETYPE_OEM_MAX 0xdf
#define EFI_FV_FILETYPE_DEBUG_MIN 0xe0
@@ -86,6 +85,7 @@ typedef UINT8 EFI_FFS_FILE_STATE;
/// FFS File Attributes.
///
#define FFS_ATTRIB_LARGE_FILE 0x01
+#define FFS_ATTRIB_DATA_ALIGNMENT_2 0x02
#define FFS_ATTRIB_FIXED 0x04
#define FFS_ATTRIB_DATA_ALIGNMENT 0x38
#define FFS_ATTRIB_CHECKSUM 0x40
@@ -179,8 +179,15 @@ typedef struct {
#define IS_FFS_FILE2(FfsFileHeaderPtr) \
(((((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Attributes) & FFS_ATTRIB_LARGE_FILE) == FFS_ATTRIB_LARGE_FILE)
-#define FFS_FILE_SIZE(FfsFileHeaderPtr) \
- ((UINT32) (*((UINT32 *) ((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Size) & 0x00ffffff))
+///
+/// The argument passed as the FfsFileHeaderPtr parameter to the
+/// FFS_FILE_SIZE() function-like macro below must not have side effects:
+/// FfsFileHeaderPtr is evaluated multiple times.
+///
+#define FFS_FILE_SIZE(FfsFileHeaderPtr) ((UINT32) ( \
+ (((EFI_FFS_FILE_HEADER *) (UINTN) (FfsFileHeaderPtr))->Size[0] ) | \
+ (((EFI_FFS_FILE_HEADER *) (UINTN) (FfsFileHeaderPtr))->Size[1] << 8) | \
+ (((EFI_FFS_FILE_HEADER *) (UINTN) (FfsFileHeaderPtr))->Size[2] << 16)))
#define FFS_FILE2_SIZE(FfsFileHeaderPtr) \
((UINT32) (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize))
@@ -216,7 +223,8 @@ typedef UINT8 EFI_SECTION_TYPE;
#define EFI_SECTION_FREEFORM_SUBTYPE_GUID 0x18
#define EFI_SECTION_RAW 0x19
#define EFI_SECTION_PEI_DEPEX 0x1B
-#define EFI_SECTION_SMM_DEPEX 0x1C
+#define EFI_SECTION_MM_DEPEX 0x1C
+#define EFI_SECTION_SMM_DEPEX EFI_SECTION_MM_DEPEX
///
/// Common section header.
@@ -479,11 +487,18 @@ typedef struct {
CHAR16 VersionString[1];
} EFI_VERSION_SECTION2;
-#define IS_SECTION2(SectionHeaderPtr) \
- ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) (UINTN) SectionHeaderPtr)->Size) & 0x00ffffff) == 0x00ffffff)
+///
+/// The argument passed as the SectionHeaderPtr parameter to the SECTION_SIZE()
+/// and IS_SECTION2() function-like macros below must not have side effects:
+/// SectionHeaderPtr is evaluated multiple times.
+///
+#define SECTION_SIZE(SectionHeaderPtr) ((UINT32) ( \
+ (((EFI_COMMON_SECTION_HEADER *) (UINTN) (SectionHeaderPtr))->Size[0] ) | \
+ (((EFI_COMMON_SECTION_HEADER *) (UINTN) (SectionHeaderPtr))->Size[1] << 8) | \
+ (((EFI_COMMON_SECTION_HEADER *) (UINTN) (SectionHeaderPtr))->Size[2] << 16)))
-#define SECTION_SIZE(SectionHeaderPtr) \
- ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) (UINTN) SectionHeaderPtr)->Size) & 0x00ffffff))
+#define IS_SECTION2(SectionHeaderPtr) \
+ (SECTION_SIZE (SectionHeaderPtr) == 0x00ffffff)
#define SECTION2_SIZE(SectionHeaderPtr) \
(((EFI_COMMON_SECTION_HEADER2 *) (UINTN) SectionHeaderPtr)->ExtendedSize)
diff --git a/MdePkg/Include/Pi/PiFirmwareVolume.h b/MdePkg/Include/Pi/PiFirmwareVolume.h
index 6ef2f1fc33f3..ca13075b77d9 100644
--- a/MdePkg/Include/Pi/PiFirmwareVolume.h
+++ b/MdePkg/Include/Pi/PiFirmwareVolume.h
@@ -1,17 +1,11 @@
/** @file
The firmware volume related definitions in PI.
- 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
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
- PI Version 1.3
+ PI Version 1.6
**/
@@ -231,4 +225,23 @@ typedef struct {
///
} EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE;
+#define EFI_FV_EXT_TYPE_USED_SIZE_TYPE 0x03
+
+///
+/// The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find
+/// out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV.
+///
+typedef struct {
+ ///
+ /// Standard extension entry, with the type EFI_FV_EXT_TYPE_USED_SIZE_TYPE.
+ ///
+ EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr;
+ ///
+ /// The number of bytes of the FV that are in uses. The remaining
+ /// EFI_FIRMWARE_VOLUME_HEADER FvLength minus UsedSize bytes in
+ /// the FV must contain the value implied by EFI_FVB2_ERASE_POLARITY.
+ ///
+ UINT32 UsedSize;
+} EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE;
+
#endif
diff --git a/MdePkg/Include/Pi/PiHob.h b/MdePkg/Include/Pi/PiHob.h
index d7dad133a70a..b38b15aee650 100644
--- a/MdePkg/Include/Pi/PiHob.h
+++ b/MdePkg/Include/Pi/PiHob.h
@@ -1,17 +1,11 @@
/** @file
HOB related definitions in PI.
-Copyright (c) 2006 - 2016, 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
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
- PI Version 1.4a
+ PI Version 1.6
**/
@@ -31,6 +25,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define EFI_HOB_TYPE_FV2 0x0009
#define EFI_HOB_TYPE_LOAD_PEIM_UNUSED 0x000A
#define EFI_HOB_TYPE_UEFI_CAPSULE 0x000B
+#define EFI_HOB_TYPE_FV3 0x000C
#define EFI_HOB_TYPE_UNUSED 0xFFFE
#define EFI_HOB_TYPE_END_OF_HOB_LIST 0xFFFF
@@ -399,6 +394,43 @@ typedef struct {
EFI_GUID FileName;
} EFI_HOB_FIRMWARE_VOLUME2;
+///
+/// Details the location of a firmware volume that was extracted
+/// from a file within another firmware volume.
+///
+typedef struct {
+ ///
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV3.
+ ///
+ EFI_HOB_GENERIC_HEADER Header;
+ ///
+ /// The physical memory-mapped base address of the firmware volume.
+ ///
+ EFI_PHYSICAL_ADDRESS BaseAddress;
+ ///
+ /// The length in bytes of the firmware volume.
+ ///
+ UINT64 Length;
+ ///
+ /// The authentication status.
+ ///
+ UINT32 AuthenticationStatus;
+ ///
+ /// TRUE if the FV was extracted as a file within another firmware volume.
+ /// FALSE otherwise.
+ ///
+ BOOLEAN ExtractedFv;
+ ///
+ /// The name of the firmware volume.
+ /// Valid only if IsExtractedFv is TRUE.
+ ///
+ EFI_GUID FvName;
+ ///
+ /// The name of the firmware file that contained this firmware volume.
+ /// Valid only if IsExtractedFv is TRUE.
+ ///
+ EFI_GUID FileName;
+} EFI_HOB_FIRMWARE_VOLUME3;
///
/// Describes processor information, such as address space and I/O space capabilities.
@@ -469,6 +501,7 @@ typedef union {
EFI_HOB_GUID_TYPE *Guid;
EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume;
EFI_HOB_FIRMWARE_VOLUME2 *FirmwareVolume2;
+ EFI_HOB_FIRMWARE_VOLUME3 *FirmwareVolume3;
EFI_HOB_CPU *Cpu;
EFI_HOB_MEMORY_POOL *Pool;
EFI_HOB_UEFI_CAPSULE *Capsule;
diff --git a/MdePkg/Include/Pi/PiI2c.h b/MdePkg/Include/Pi/PiI2c.h
index 4aa55f5e3e6d..45f0917aee0a 100644
--- a/MdePkg/Include/Pi/PiI2c.h
+++ b/MdePkg/Include/Pi/PiI2c.h
@@ -1,14 +1,8 @@
/** @file
Include file matches things in PI.
-Copyright (c) 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 that accompanies this distribution.
-The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
PI Version 1.3
diff --git a/MdePkg/Include/Pi/PiMmCis.h b/MdePkg/Include/Pi/PiMmCis.h
new file mode 100644
index 000000000000..a802ad076af9
--- /dev/null
+++ b/MdePkg/Include/Pi/PiMmCis.h
@@ -0,0 +1,345 @@
+/** @file
+ Common definitions in the Platform Initialization Specification version 1.5
+ VOLUME 4 Management Mode Core Interface version.
+
+ Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _PI_MMCIS_H_
+#define _PI_MMCIS_H_
+
+#include <Pi/PiMultiPhase.h>
+#include <Protocol/MmCpuIo.h>
+
+typedef struct _EFI_MM_SYSTEM_TABLE EFI_MM_SYSTEM_TABLE;
+
+///
+/// The Management Mode System Table (MMST) signature
+///
+#define MM_MMST_SIGNATURE SIGNATURE_32 ('S', 'M', 'S', 'T')
+///
+/// The Management Mode System Table (MMST) revision is 1.6
+///
+#define MM_SPECIFICATION_MAJOR_REVISION 1
+#define MM_SPECIFICATION_MINOR_REVISION 60
+#define EFI_MM_SYSTEM_TABLE_REVISION ((MM_SPECIFICATION_MAJOR_REVISION<<16) | (MM_SPECIFICATION_MINOR_REVISION))
+
+/**
+ Adds, updates, or removes a configuration table entry from the Management Mode System Table.
+
+ The MmInstallConfigurationTable() function is used to maintain the list
+ of configuration tables that are stored in the Management Mode System
+ Table. The list is stored as an array of (GUID, Pointer) pairs. The list
+ must be allocated from pool memory with PoolType set to EfiRuntimeServicesData.
+
+ @param[in] SystemTable A pointer to the MM System Table (MMST).
+ @param[in] Guid A pointer to the GUID for the entry to add, update, or remove.
+ @param[in] Table A pointer to the buffer of the table to add.
+ @param[in] TableSize The size of the table to install.
+
+ @retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed.
+ @retval EFI_INVALID_PARAMETER Guid is not valid.
+ @retval EFI_NOT_FOUND An attempt was made to delete a non-existent entry.
+ @retval EFI_OUT_OF_RESOURCES There is not enough memory available to complete the operation.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MM_INSTALL_CONFIGURATION_TABLE)(
+ IN CONST EFI_MM_SYSTEM_TABLE *SystemTable,
+ IN CONST EFI_GUID *Guid,
+ IN VOID *Table,
+ IN UINTN TableSize
+ );
+
+/**
+ This service lets the caller to get one distinct application processor (AP) to execute
+ a caller-provided code stream while in MM.
+
+ @param[in] Procedure A pointer to the code stream to be run on the designated
+ AP of the system.
+ @param[in] CpuNumber The zero-based index of the processor number of the AP
+ on which the code stream is supposed to run.
+ @param[in,out] ProcArguments Allows the caller to pass a list of parameters to the code
+ that is run by the AP.
+
+ @retval EFI_SUCCESS The call was successful and the return parameters are valid.
+ @retval EFI_INVALID_PARAMETER The input arguments are out of range.
+ @retval EFI_INVALID_PARAMETER The CPU requested is not available on this SMI invocation.
+ @retval EFI_INVALID_PARAMETER The CPU cannot support an additional service invocation.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MM_STARTUP_THIS_AP)(
+ IN EFI_AP_PROCEDURE Procedure,
+ IN UINTN CpuNumber,
+ IN OUT VOID *ProcArguments OPTIONAL
+ );
+
+/**
+ Function prototype for protocol install notification.
+
+ @param[in] Protocol Points to the protocol's unique identifier.
+ @param[in] Interface Points to the interface instance.
+ @param[in] Handle The handle on which the interface was installed.
+
+ @return Status Code
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MM_NOTIFY_FN)(
+ IN CONST EFI_GUID *Protocol,
+ IN VOID *Interface,
+ IN EFI_HANDLE Handle
+ );
+
+/**
+ Register a callback function be called when a particular protocol interface is installed.
+
+ The MmRegisterProtocolNotify() function creates a registration Function that is to be
+ called whenever a protocol interface is installed for Protocol by
+ MmInstallProtocolInterface().
+ If Function == NULL and Registration is an existing registration, then the callback is unhooked.
+
+ @param[in] Protocol The unique ID of the protocol for which the event is to be registered.
+ @param[in] Function Points to the notification function.
+ @param[out] Registration A pointer to a memory location to receive the registration value.
+
+ @retval EFI_SUCCESS Successfully returned the registration record
+ that has been added or unhooked.
+ @retval EFI_INVALID_PARAMETER Protocol is NULL or Registration is NULL.
+ @retval EFI_OUT_OF_RESOURCES Not enough memory resource to finish the request.
+ @retval EFI_NOT_FOUND If the registration is not found when Function == NULL.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MM_REGISTER_PROTOCOL_NOTIFY)(
+ IN CONST EFI_GUID *Protocol,
+ IN EFI_MM_NOTIFY_FN Function,
+ OUT VOID **Registration
+ );
+
+/**
+ Manage MMI of a particular type.
+
+ @param[in] HandlerType Points to the handler type or NULL for root MMI handlers.
+ @param[in] Context Points to an optional context buffer.
+ @param[in,out] CommBuffer Points to the optional communication buffer.
+ @param[in,out] CommBufferSize Points to the size of the optional communication buffer.
+
+ @retval EFI_WARN_INTERRUPT_SOURCE_PENDING Interrupt source was processed successfully but not quiesced.
+ @retval EFI_INTERRUPT_PENDING One or more SMI sources could not be quiesced.
+ @retval EFI_NOT_FOUND Interrupt source was not handled or quiesced.
+ @retval EFI_SUCCESS Interrupt source was handled and quiesced.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MM_INTERRUPT_MANAGE)(
+ IN CONST EFI_GUID *HandlerType,
+ IN CONST VOID *Context OPTIONAL,
+ IN OUT VOID *CommBuffer OPTIONAL,
+ IN OUT UINTN *CommBufferSize OPTIONAL
+ );
+
+/**
+ Main entry point for an MM handler dispatch or communicate-based callback.
+
+ @param[in] DispatchHandle The unique handle assigned to this handler by MmiHandlerRegister().
+ @param[in] Context Points to an optional handler context which was specified when the
+ handler was registered.
+ @param[in,out] CommBuffer A pointer to a collection of data in memory that will
+ be conveyed from a non-MM environment into an MM environment.
+ @param[in,out] CommBufferSize The size of the CommBuffer.
+
+ @retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers
+ should still be called.
+ @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should
+ still be called.
+ @retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still
+ be called.
+ @retval EFI_INTERRUPT_PENDING The interrupt could not be quiesced.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MM_HANDLER_ENTRY_POINT)(
+ IN EFI_HANDLE DispatchHandle,
+ IN CONST VOID *Context OPTIONAL,
+ IN OUT VOID *CommBuffer OPTIONAL,
+ IN OUT UINTN *CommBufferSize OPTIONAL
+ );
+
+/**
+ Registers a handler to execute within MM.
+
+ @param[in] Handler Handler service function pointer.
+ @param[in] HandlerType Points to the handler type or NULL for root MMI handlers.
+ @param[out] DispatchHandle On return, contains a unique handle which can be used to later
+ unregister the handler function.
+
+ @retval EFI_SUCCESS MMI handler added successfully.
+ @retval EFI_INVALID_PARAMETER Handler is NULL or DispatchHandle is NULL.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MM_INTERRUPT_REGISTER)(
+ IN EFI_MM_HANDLER_ENTRY_POINT Handler,
+ IN CONST EFI_GUID *HandlerType OPTIONAL,
+ OUT EFI_HANDLE *DispatchHandle
+ );
+
+/**
+ Unregister a handler in MM.
+
+ @param[in] DispatchHandle The handle that was specified when the handler was registered.
+
+ @retval EFI_SUCCESS Handler function was successfully unregistered.
+ @retval EFI_INVALID_PARAMETER DispatchHandle does not refer to a valid handle.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MM_INTERRUPT_UNREGISTER)(
+ IN EFI_HANDLE DispatchHandle
+ );
+
+///
+/// Processor information and functionality needed by MM Foundation.
+///
+typedef struct _EFI_MM_ENTRY_CONTEXT {
+ EFI_MM_STARTUP_THIS_AP MmStartupThisAp;
+ ///
+ /// A number between zero and the NumberOfCpus field. This field designates which
+ /// processor is executing the MM Foundation.
+ ///
+ UINTN CurrentlyExecutingCpu;
+ ///
+ /// The number of possible processors in the platform. This is a 1 based
+ /// counter. This does not indicate the number of processors that entered MM.
+ ///
+ UINTN NumberOfCpus;
+ ///
+ /// Points to an array, where each element describes the number of bytes in the
+ /// corresponding save state specified by CpuSaveState. There are always
+ /// NumberOfCpus entries in the array.
+ ///
+ UINTN *CpuSaveStateSize;
+ ///
+ /// Points to an array, where each element is a pointer to a CPU save state. The
+ /// corresponding element in CpuSaveStateSize specifies the number of bytes in the
+ /// save state area. There are always NumberOfCpus entries in the array.
+ ///
+ VOID **CpuSaveState;
+} EFI_MM_ENTRY_CONTEXT;
+
+/**
+ This function is the main entry point to the MM Foundation.
+
+ @param[in] MmEntryContext Processor information and functionality needed by MM Foundation.
+**/
+typedef
+VOID
+(EFIAPI *EFI_MM_ENTRY_POINT)(
+ IN CONST EFI_MM_ENTRY_CONTEXT *MmEntryContext
+ );
+
+///
+/// Management Mode System Table (MMST)
+///
+/// The Management Mode System Table (MMST) is a table that contains a collection of common
+/// services for managing MMRAM allocation and providing basic I/O services. These services are
+/// intended for both preboot and runtime usage.
+///
+struct _EFI_MM_SYSTEM_TABLE {
+ ///
+ /// The table header for the SMST.
+ ///
+ EFI_TABLE_HEADER Hdr;
+ ///
+ /// A pointer to a NULL-terminated Unicode string containing the vendor name.
+ /// It is permissible for this pointer to be NULL.
+ ///
+ CHAR16 *MmFirmwareVendor;
+ ///
+ /// The particular revision of the firmware.
+ ///
+ UINT32 MmFirmwareRevision;
+
+ EFI_MM_INSTALL_CONFIGURATION_TABLE MmInstallConfigurationTable;
+
+ ///
+ /// I/O Service
+ ///
+ EFI_MM_CPU_IO_PROTOCOL MmIo;
+
+ ///
+ /// Runtime memory services
+ ///
+ EFI_ALLOCATE_POOL MmAllocatePool;
+ EFI_FREE_POOL MmFreePool;
+ EFI_ALLOCATE_PAGES MmAllocatePages;
+ EFI_FREE_PAGES MmFreePages;
+
+ ///
+ /// MP service
+ ///
+ EFI_MM_STARTUP_THIS_AP MmStartupThisAp;
+
+ ///
+ /// CPU information records
+ ///
+
+ ///
+ /// A number between zero and and the NumberOfCpus field. This field designates
+ /// which processor is executing the MM infrastructure.
+ ///
+ UINTN CurrentlyExecutingCpu;
+ ///
+ /// The number of possible processors in the platform. This is a 1 based counter.
+ ///
+ UINTN NumberOfCpus;
+ ///
+ /// Points to an array, where each element describes the number of bytes in the
+ /// corresponding save state specified by CpuSaveState. There are always
+ /// NumberOfCpus entries in the array.
+ ///
+ UINTN *CpuSaveStateSize;
+ ///
+ /// Points to an array, where each element is a pointer to a CPU save state. The
+ /// corresponding element in CpuSaveStateSize specifies the number of bytes in the
+ /// save state area. There are always NumberOfCpus entries in the array.
+ ///
+ VOID **CpuSaveState;
+
+ ///
+ /// Extensibility table
+ ///
+
+ ///
+ /// The number of UEFI Configuration Tables in the buffer MmConfigurationTable.
+ ///
+ UINTN NumberOfTableEntries;
+ ///
+ /// A pointer to the UEFI Configuration Tables. The number of entries in the table is
+ /// NumberOfTableEntries.
+ ///
+ EFI_CONFIGURATION_TABLE *MmConfigurationTable;
+
+ ///
+ /// Protocol services
+ ///
+ EFI_INSTALL_PROTOCOL_INTERFACE MmInstallProtocolInterface;
+ EFI_UNINSTALL_PROTOCOL_INTERFACE MmUninstallProtocolInterface;
+ EFI_HANDLE_PROTOCOL MmHandleProtocol;
+ EFI_MM_REGISTER_PROTOCOL_NOTIFY MmRegisterProtocolNotify;
+ EFI_LOCATE_HANDLE MmLocateHandle;
+ EFI_LOCATE_PROTOCOL MmLocateProtocol;
+
+ ///
+ /// MMI Management functions
+ ///
+ EFI_MM_INTERRUPT_MANAGE MmiManage;
+ EFI_MM_INTERRUPT_REGISTER MmiHandlerRegister;
+ EFI_MM_INTERRUPT_UNREGISTER MmiHandlerUnRegister;
+};
+
+#endif
diff --git a/MdePkg/Include/Pi/PiMultiPhase.h b/MdePkg/Include/Pi/PiMultiPhase.h
index 3561254b337f..e4f2f00c27db 100644
--- a/MdePkg/Include/Pi/PiMultiPhase.h
+++ b/MdePkg/Include/Pi/PiMultiPhase.h
@@ -1,14 +1,8 @@
/** @file
Include file matches things in PI for multiple module types.
-Copyright (c) 2006 - 2015, 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
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
These elements are defined in UEFI Platform Initialization Specification 1.2.
@@ -30,10 +24,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Produces an error code in the range reserved for use by the Platform Initialization
Architecture Specification.
- The supported 32-bit range is 0xA0000000-0xBFFFFFFF
- The supported 64-bit range is 0xA000000000000000-0xBFFFFFFFFFFFFFFF
+ The supported 32-bit range is 0xA0000000-0xBFFFFFFF
+ The supported 64-bit range is 0xA000000000000000-0xBFFFFFFFFFFFFFFF
- @param StatusCode The status code value to convert into a warning code.
+ @param StatusCode The status code value to convert into a warning code.
StatusCode must be in the range 0x00000000..0x1FFFFFFF.
@return The value specified by StatusCode in the PI reserved range.
@@ -47,7 +41,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define EFI_REQUEST_UNLOAD_IMAGE DXE_ERROR (1)
///
-/// If this value is returned by an API, it means the capability is not yet
+/// If this value is returned by an API, it means the capability is not yet
/// installed/available/ready to use.
///
#define EFI_NOT_AVAILABLE_YET DXE_ERROR (2)
@@ -66,9 +60,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
#define PI_ENCODE_ERROR(a) (MAX_BIT | (MAX_BIT >> 2) | (a))
-///
+///
/// Return status codes defined in SMM CIS.
-///
+///
#define EFI_INTERRUPT_PENDING PI_ENCODE_ERROR (0)
#define EFI_WARN_INTERRUPT_SOURCE_PENDING PI_ENCODE_WARNING (0)
@@ -76,7 +70,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// Bitmask of values for Authentication Status.
-/// Authentication Status is returned from EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL
+/// Authentication Status is returned from EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL
/// and the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
///
/// xx00 Image was not signed.
@@ -95,43 +89,49 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///@}
///
-/// SMRAM states and capabilities
+/// MMRAM states and capabilities
///
-#define EFI_SMRAM_OPEN 0x00000001
-#define EFI_SMRAM_CLOSED 0x00000002
-#define EFI_SMRAM_LOCKED 0x00000004
+#define EFI_MMRAM_OPEN 0x00000001
+#define EFI_MMRAM_CLOSED 0x00000002
+#define EFI_MMRAM_LOCKED 0x00000004
#define EFI_CACHEABLE 0x00000008
#define EFI_ALLOCATED 0x00000010
#define EFI_NEEDS_TESTING 0x00000020
#define EFI_NEEDS_ECC_INITIALIZATION 0x00000040
+#define EFI_SMRAM_OPEN EFI_MMRAM_OPEN
+#define EFI_SMRAM_CLOSED EFI_MMRAM_CLOSED
+#define EFI_SMRAM_LOCKED EFI_MMRAM_LOCKED
+
///
-/// Structure describing a SMRAM region and its accessibility attributes.
+/// Structure describing a MMRAM region and its accessibility attributes.
///
typedef struct {
///
- /// Designates the physical address of the SMRAM in memory. This view of memory is
- /// the same as seen by I/O-based agents, for example, but it may not be the address seen
+ /// Designates the physical address of the MMRAM in memory. This view of memory is
+ /// the same as seen by I/O-based agents, for example, but it may not be the address seen
/// by the processors.
///
EFI_PHYSICAL_ADDRESS PhysicalStart;
///
- /// Designates the address of the SMRAM, as seen by software executing on the
+ /// Designates the address of the MMRAM, as seen by software executing on the
/// processors. This address may or may not match PhysicalStart.
///
- EFI_PHYSICAL_ADDRESS CpuStart;
+ EFI_PHYSICAL_ADDRESS CpuStart;
///
- /// Describes the number of bytes in the SMRAM region.
+ /// Describes the number of bytes in the MMRAM region.
///
UINT64 PhysicalSize;
///
- /// Describes the accessibility attributes of the SMRAM. These attributes include the
- /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical
- /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC
+ /// Describes the accessibility attributes of the MMRAM. These attributes include the
+ /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical
+ /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC
/// initialization).
///
UINT64 RegionState;
-} EFI_SMRAM_DESCRIPTOR;
+} EFI_MMRAM_DESCRIPTOR;
+
+typedef EFI_MMRAM_DESCRIPTOR EFI_SMRAM_DESCRIPTOR;
typedef enum {
EFI_PCD_TYPE_8,
@@ -176,4 +176,20 @@ VOID
IN OUT VOID *Buffer
);
+/**
+ The function prototype for invoking a function on an Application Processor.
+
+ This definition is used by the UEFI MM MP Serices Protocol.
+
+ @param[in] ProcedureArgument The pointer to private data buffer.
+
+ @retval EFI_SUCCESS Excutive the procedure successfully
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_AP_PROCEDURE2)(
+ IN VOID *ProcedureArgument
+);
+
#endif
diff --git a/MdePkg/Include/Pi/PiPeiCis.h b/MdePkg/Include/Pi/PiPeiCis.h
index 3963aa030d27..3f25f58c957e 100644
--- a/MdePkg/Include/Pi/PiPeiCis.h
+++ b/MdePkg/Include/Pi/PiPeiCis.h
@@ -1,18 +1,11 @@
/** @file
PI PEI master include file. This file should match the PI spec.
-Copyright (c) 2006 - 2016, 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
-http://opensource.org/licenses/bsd-license.php.
-
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
- PI Version 1.4a.
+ PI Version 1.7.
**/
@@ -24,22 +17,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// The handles of EFI FV.
-///
+///
typedef VOID *EFI_PEI_FV_HANDLE;
///
/// The handles of EFI FFS.
-///
+///
typedef VOID *EFI_PEI_FILE_HANDLE;
///
/// Declare the forward reference data structure for EFI_PEI_SERVICE.
-///
+///
typedef struct _EFI_PEI_SERVICES EFI_PEI_SERVICES;
///
/// Declare the forward reference data structure for EFI_PEI_NOTIFY_DESCRIPTOR.
-///
+///
typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR;
@@ -48,8 +41,8 @@ typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR;
/**
- The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI
- Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header.
+ The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI
+ Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header.
@param FileHandle Pointer to the FFS file header.
@param PeiServices Describes the list of possible PEI Services.
@@ -95,7 +88,7 @@ EFI_STATUS
///
/// The data structure through which a PEIM describes available services to the PEI Foundation.
-///
+///
typedef struct {
///
/// This field is a set of flags describing the characteristics of this imported table entry.
@@ -112,10 +105,10 @@ typedef struct {
VOID *Ppi;
} EFI_PEI_PPI_DESCRIPTOR;
-///
-/// The data structure in a given PEIM that tells the PEI
+///
+/// The data structure in a given PEIM that tells the PEI
/// Foundation where to invoke the notification service.
-///
+///
struct _EFI_PEI_NOTIFY_DESCRIPTOR {
///
/// Details if the type of notification are callback or dispatch.
@@ -147,9 +140,9 @@ typedef union {
} EFI_PEI_DESCRIPTOR;
/**
- This service is the first one provided by the PEI Foundation. This function
- installs an interface in the PEI PPI database by GUID. The purpose of the
- service is to publish an interface that other parties can use to call
+ This service is the first one provided by the PEI Foundation. This function
+ installs an interface in the PEI PPI database by GUID. The purpose of the
+ service is to publish an interface that other parties can use to call
additional PEIMs.
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table
@@ -157,8 +150,8 @@ typedef union {
@param PpiList A pointer to the list of interfaces that the caller shall install.
@retval EFI_SUCCESS The interface was successfully installed.
- @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI
- descriptors in the list do not have the
+ @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI
+ descriptors in the list do not have the
EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
@retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
@@ -171,10 +164,10 @@ EFI_STATUS
);
/**
- This function reinstalls an interface in the PEI PPI database by GUID.
- The purpose of the service is to publish an interface that other parties
- can use to replace a same-named interface in the protocol database
- with a different interface.
+ This function reinstalls an interface in the PEI PPI database by GUID.
+ The purpose of the service is to publish an interface that other parties
+ can use to replace a same-named interface in the protocol database
+ with a different interface.
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table
published by the PEI Foundation.
@@ -182,7 +175,7 @@ EFI_STATUS
@param NewPpi A pointer to the new interfaces that the caller shall install.
@retval EFI_SUCCESS The interface was successfully installed.
- @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the
+ @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the
list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
@retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
@retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been installed.
@@ -197,7 +190,7 @@ EFI_STATUS
);
/**
- This function locates an interface in the PEI PPI database by GUID.
+ This function locates an interface in the PEI PPI database by GUID.
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.
@param Guid A pointer to the GUID whose corresponding interface needs to be found.
@@ -220,17 +213,17 @@ EFI_STATUS
);
/**
- This function installs a notification service to be called back when a
- given interface is installed or reinstalled. The purpose of the service
- is to publish an interface that other parties can use to call additional PPIs
+ This function installs a notification service to be called back when a
+ given interface is installed or reinstalled. The purpose of the service
+ is to publish an interface that other parties can use to call additional PPIs
that may materialize later.
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
@param NotifyList A pointer to the list of notification interfaces that the caller shall install.
@retval EFI_SUCCESS The interface was successfully installed.
- @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL, or any of the PEI PPI descriptors in the
- list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
+ @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL, or any of the PEI PPI descriptors in the
+ list do not have the EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES bit set in the Flags field.
@retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
**/
@@ -274,7 +267,7 @@ EFI_STATUS
);
/**
- This function returns the pointer to the list of Hand-Off Blocks (HOBs) in memory.
+ This function returns the pointer to the list of Hand-Off Blocks (HOBs) in memory.
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
@param HobList A pointer to the list of HOBs that the PEI Foundation will initialize
@@ -312,8 +305,8 @@ EFI_STATUS
);
/**
- The purpose of the service is to abstract the capability of the PEI
- Foundation to discover instances of firmware volumes in the system.
+ The purpose of the service is to abstract the capability of the PEI
+ Foundation to discover instances of firmware volumes in the system.
This service enables PEIMs to discover additional firmware volumes. The PEI Foundation uses this
service to abstract the locations and formats of various firmware volumes. These volumes include
@@ -449,18 +442,23 @@ EFI_STATUS
);
/**
- The purpose of the service is to publish an interface that allows
+ The purpose of the service is to publish an interface that allows
PEIMs to allocate memory ranges that are managed by the PEI Foundation.
+ Prior to InstallPeiMemory() being called, PEI will allocate pages from the heap.
+ After InstallPeiMemory() is called, PEI will allocate pages within the region
+ of memory provided by InstallPeiMemory() service in a best-effort fashion.
+ Location-specific allocations are not managed by the PEI foundation code.
+
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
@param MemoryType The type of memory to allocate.
@param Pages The number of contiguous 4 KB pages to allocate.
- @param Memory A pointer to a physical address. On output, the address is set to the base
+ @param Memory A pointer to a physical address. On output, the address is set to the base
of the page range that was allocated.
@retval EFI_SUCCESS The memory range was successfully allocated.
@retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
- @retval EFI_INVALID_PARAMETER The type is not equal to EfiLoaderCode, EfiLoaderData, EfiRuntimeServicesCode,
+ @retval EFI_INVALID_PARAMETER The type is not equal to EfiLoaderCode, EfiLoaderData, EfiRuntimeServicesCode,
EfiRuntimeServicesData, EfiBootServicesCode, EfiBootServicesData,
EfiACPIReclaimMemory, EfiReservedMemoryType, or EfiACPIMemoryNVS.
@@ -475,7 +473,28 @@ EFI_STATUS
);
/**
- The purpose of this service is to publish an interface that
+ Frees memory pages.
+
+ @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
+ @param[in] Memory The base physical address of the pages to be freed.
+ @param[in] Pages The number of contiguous 4 KB pages to free.
+
+ @retval EFI_SUCCESS The requested pages were freed.
+ @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.
+ @retval EFI_NOT_FOUND The requested memory pages were not allocated with
+ AllocatePages().
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PEI_FREE_PAGES) (
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN EFI_PHYSICAL_ADDRESS Memory,
+ IN UINTN Pages
+ );
+
+/**
+ The purpose of this service is to publish an interface that
allows PEIMs to allocate memory ranges that are managed by the PEI Foundation.
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
@@ -571,7 +590,7 @@ EFI_STATUS
This service resets the entire platform, including all processors
and devices, and reboots the system.
- This service will never return EFI_SUCCESS.
+ This service will never return EFI_SUCCESS.
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES
table published by the PEI Foundation.
@@ -590,14 +609,12 @@ EFI_STATUS
@param[in] ResetType The type of reset to perform.
@param[in] ResetStatus The status code for the reset.
- @param[in] DataSize The size, in bytes, of WatchdogData.
+ @param[in] DataSize The size, in bytes, of ResetData.
@param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
the data buffer starts with a Null-terminated string, optionally
followed by additional binary data. The string is a description
that the caller may use to further indicate the reason for the
- system reset. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
typedef
@@ -713,7 +730,7 @@ typedef struct {
@retval EFI_INVALID_PARAMETER FileHandle does not
represent a valid file.
@retval EFI_INVALID_PARAMETER FileInfo is NULL.
-
+
**/
typedef
EFI_STATUS
@@ -813,7 +830,7 @@ EFI_STATUS
@param FileHandle PEIM's file handle. Must be the currently
executing PEIM.
-
+
@retval EFI_SUCCESS The PEIM was successfully registered for
shadowing.
@retval EFI_ALREADY_STARTED The PEIM was previously
@@ -833,10 +850,10 @@ EFI_STATUS
// PEI Specification Revision information
//
#define PEI_SPECIFICATION_MAJOR_REVISION 1
-#define PEI_SPECIFICATION_MINOR_REVISION 40
+#define PEI_SPECIFICATION_MINOR_REVISION 70
///
-/// Specification inconsistency here:
-/// In the PI1.0 spec, PEI_SERVICES_SIGNATURE is defined as 0x5652455320494550. But
+/// Specification inconsistency here:
+/// In the PI1.0 spec, PEI_SERVICES_SIGNATURE is defined as 0x5652455320494550. But
/// to pass a multiple tool chain, it appends an ULL.
///
//
@@ -844,14 +861,14 @@ EFI_STATUS
//
#define PEI_SERVICES_SIGNATURE 0x5652455320494550ULL
///
-/// Specification inconsistency here:
-/// In the PI1.0 specification, there is a typo error in PEI_SERVICES_REVISION. In the specification the defintion is
+/// Specification inconsistency here:
+/// In the PI1.0 specification, there is a typo error in PEI_SERVICES_REVISION. In the specification the defintion is
/// #define ((PEI_SPECIFICATION_MAJOR_REVISION<<16) |(PEI_SPECIFICATION_MINOR_REVISION))
/// and it should be as follows:
///
#define PEI_SERVICES_REVISION ((PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION))
-///
+///
/// EFI_PEI_SERVICES is a collection of functions whose implementation is provided by the PEI
/// Foundation. These services fall into various classes, including the following:
/// - Managing the boot mode
@@ -929,6 +946,7 @@ struct _EFI_PEI_SERVICES {
EFI_PEI_FFS_FIND_SECTION_DATA3 FindSectionData3;
EFI_PEI_FFS_GET_FILE_INFO2 FfsGetFileInfo2;
EFI_PEI_RESET2_SYSTEM ResetSystem2;
+ EFI_PEI_FREE_PAGES FreePages;
};
@@ -936,63 +954,63 @@ struct _EFI_PEI_SERVICES {
/// EFI_SEC_PEI_HAND_OFF structure holds information about
/// PEI core's operating environment, such as the size of location of
/// temporary RAM, the stack location and BFV location.
-///
+///
typedef struct _EFI_SEC_PEI_HAND_OFF {
///
/// Size of the data structure.
- ///
+ ///
UINT16 DataSize;
///
- /// Points to the first byte of the boot firmware volume,
- /// which the PEI Dispatcher should search for
+ /// Points to the first byte of the boot firmware volume,
+ /// which the PEI Dispatcher should search for
/// PEI modules.
- ///
+ ///
VOID *BootFirmwareVolumeBase;
///
/// Size of the boot firmware volume, in bytes.
- ///
+ ///
UINTN BootFirmwareVolumeSize;
///
/// Points to the first byte of the temporary RAM.
- ///
+ ///
VOID *TemporaryRamBase;
///
/// Size of the temporary RAM, in bytes.
- ///
+ ///
UINTN TemporaryRamSize;
///
- /// Points to the first byte of the temporary RAM
- /// available for use by the PEI Foundation. The area
- /// described by PeiTemporaryRamBase and PeiTemporaryRamSize
+ /// Points to the first byte of the temporary RAM
+ /// available for use by the PEI Foundation. The area
+ /// described by PeiTemporaryRamBase and PeiTemporaryRamSize
/// must not extend outside beyond the area described by
/// TemporaryRamBase & TemporaryRamSize. This area should not
- /// overlap with the area reported by StackBase and
+ /// overlap with the area reported by StackBase and
/// StackSize.
///
VOID *PeiTemporaryRamBase;
///
- /// The size of the available temporary RAM available for
+ /// The size of the available temporary RAM available for
/// use by the PEI Foundation, in bytes.
- ///
+ ///
UINTN PeiTemporaryRamSize;
///
- /// Points to the first byte of the stack.
- /// This are may be part of the memory described by
- /// TemporaryRamBase and TemporaryRamSize
+ /// Points to the first byte of the stack.
+ /// This are may be part of the memory described by
+ /// TemporaryRamBase and TemporaryRamSize
/// or may be an entirely separate area.
- ///
+ ///
VOID *StackBase;
///
/// Size of the stack, in bytes.
- ///
+ ///
UINTN StackSize;
} EFI_SEC_PEI_HAND_OFF;
@@ -1004,13 +1022,14 @@ typedef struct _EFI_SEC_PEI_HAND_OFF {
allows the SEC phase to pass information about the stack,
temporary RAM and the Boot Firmware Volume. In addition, it also
allows the SEC phase to pass services and data forward for use
- during the PEI phase in the form of one or more PPIs. There is
- no limit to the number of additional PPIs that can be passed
- from SEC into the PEI Foundation. As part of its initialization
- phase, the PEI Foundation will add these SEC-hosted PPIs to its
- PPI database such that both the PEI Foundation and any modules
- can leverage the associated service calls and/or code in these
- early PPIs.
+ during the PEI phase in the form of one or more PPIs. These PPI's
+ will be installed and/or immediately signaled if they are
+ notification type. There is no limit to the number of additional
+ PPIs that can be passed from SEC into the PEI Foundation. As part
+ of its initialization phase, the PEI Foundation will add these
+ SEC-hosted PPIs to its PPI database such that both the PEI
+ Foundation and any modules can leverage the associated service
+ calls and/or code in these early PPIs.
@param SecCoreData Points to a data structure containing
information about the PEI core's
diff --git a/MdePkg/Include/Pi/PiS3BootScript.h b/MdePkg/Include/Pi/PiS3BootScript.h
index 466f084ee0e5..b1c4de28596d 100644
--- a/MdePkg/Include/Pi/PiS3BootScript.h
+++ b/MdePkg/Include/Pi/PiS3BootScript.h
@@ -1,15 +1,9 @@
/** @file
- This file contains the boot script defintions that are shared between the
+ This file contains the boot script defintions that are shared between the
Boot Script Executor PPI and the Boot Script Save Protocol.
- Copyright (c) 2009, 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.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
diff --git a/MdePkg/Include/Pi/PiSmmCis.h b/MdePkg/Include/Pi/PiSmmCis.h
index 7e8cd5f54500..f081dc2aaf8d 100644
--- a/MdePkg/Include/Pi/PiSmmCis.h
+++ b/MdePkg/Include/Pi/PiSmmCis.h
@@ -2,35 +2,25 @@
Common definitions in the Platform Initialization Specification version 1.4a
VOLUME 4 System Management Mode Core Interface version.
- Copyright (c) 2009 - 2016, 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.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _PI_SMMCIS_H_
#define _PI_SMMCIS_H_
-#include <Pi/PiMultiPhase.h>
+#include <Pi/PiMmCis.h>
#include <Protocol/SmmCpuIo2.h>
typedef struct _EFI_SMM_SYSTEM_TABLE2 EFI_SMM_SYSTEM_TABLE2;
-
-///
-/// The System Management System Table (SMST) signature
-///
-#define SMM_SMST_SIGNATURE SIGNATURE_32 ('S', 'M', 'S', 'T')
-///
-/// The System Management System Table (SMST) revision is 1.4
-///
-#define SMM_SPECIFICATION_MAJOR_REVISION 1
-#define SMM_SPECIFICATION_MINOR_REVISION 40
-#define EFI_SMM_SYSTEM_TABLE2_REVISION ((SMM_SPECIFICATION_MAJOR_REVISION<<16) | (SMM_SPECIFICATION_MINOR_REVISION))
+//
+// Define new MM related definition introduced by PI 1.5.
+//
+#define SMM_SMST_SIGNATURE MM_MMST_SIGNATURE
+#define SMM_SPECIFICATION_MAJOR_REVISION MM_SPECIFICATION_MAJOR_REVISION
+#define SMM_SPECIFICATION_MINOR_REVISION MM_SPECIFICATION_MINOR_REVISION
+#define EFI_SMM_SYSTEM_TABLE2_REVISION EFI_MM_SYSTEM_TABLE_REVISION
/**
Adds, updates, or removes a configuration table entry from the System Management System Table.
@@ -53,160 +43,19 @@ typedef struct _EFI_SMM_SYSTEM_TABLE2 EFI_SMM_SYSTEM_TABLE2;
typedef
EFI_STATUS
(EFIAPI *EFI_SMM_INSTALL_CONFIGURATION_TABLE2)(
- IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable,
- IN CONST EFI_GUID *Guid,
- IN VOID *Table,
- IN UINTN TableSize
- );
-
-/**
- This service lets the caller to get one distinct application processor (AP) to execute
- a caller-provided code stream while in SMM.
-
- @param[in] Procedure A pointer to the code stream to be run on the designated
- AP of the system.
- @param[in] CpuNumber The zero-based index of the processor number of the AP
- on which the code stream is supposed to run.
- @param[in,out] ProcArguments Allows the caller to pass a list of parameters to the code
- that is run by the AP.
-
- @retval EFI_SUCCESS The call was successful and the return parameters are valid.
- @retval EFI_INVALID_PARAMETER The input arguments are out of range.
- @retval EFI_INVALID_PARAMETER The CPU requested is not available on this SMI invocation.
- @retval EFI_INVALID_PARAMETER The CPU cannot support an additional service invocation.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_STARTUP_THIS_AP)(
- IN EFI_AP_PROCEDURE Procedure,
- IN UINTN CpuNumber,
- IN OUT VOID *ProcArguments OPTIONAL
- );
-
-/**
- Function prototype for protocol install notification.
-
- @param[in] Protocol Points to the protocol's unique identifier.
- @param[in] Interface Points to the interface instance.
- @param[in] Handle The handle on which the interface was installed.
-
- @return Status Code
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_NOTIFY_FN)(
- IN CONST EFI_GUID *Protocol,
- IN VOID *Interface,
- IN EFI_HANDLE Handle
- );
-
-/**
- Register a callback function be called when a particular protocol interface is installed.
-
- The SmmRegisterProtocolNotify() function creates a registration Function that is to be
- called whenever a protocol interface is installed for Protocol by
- SmmInstallProtocolInterface().
- If Function == NULL and Registration is an existing registration, then the callback is unhooked.
-
- @param[in] Protocol The unique ID of the protocol for which the event is to be registered.
- @param[in] Function Points to the notification function.
- @param[out] Registration A pointer to a memory location to receive the registration value.
-
- @retval EFI_SUCCESS Successfully returned the registration record
- that has been added or unhooked.
- @retval EFI_INVALID_PARAMETER Protocol is NULL or Registration is NULL.
- @retval EFI_OUT_OF_RESOURCES Not enough memory resource to finish the request.
- @retval EFI_NOT_FOUND If the registration is not found when Function == NULL.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_REGISTER_PROTOCOL_NOTIFY)(
- IN CONST EFI_GUID *Protocol,
- IN EFI_SMM_NOTIFY_FN Function,
- OUT VOID **Registration
+ IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable,
+ IN CONST EFI_GUID *Guid,
+ IN VOID *Table,
+ IN UINTN TableSize
);
-/**
- Manage SMI of a particular type.
-
- @param[in] HandlerType Points to the handler type or NULL for root SMI handlers.
- @param[in] Context Points to an optional context buffer.
- @param[in,out] CommBuffer Points to the optional communication buffer.
- @param[in,out] CommBufferSize Points to the size of the optional communication buffer.
-
- @retval EFI_WARN_INTERRUPT_SOURCE_PENDING Interrupt source was processed successfully but not quiesced.
- @retval EFI_INTERRUPT_PENDING One or more SMI sources could not be quiesced.
- @retval EFI_NOT_FOUND Interrupt source was not handled or quiesced.
- @retval EFI_SUCCESS Interrupt source was handled and quiesced.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_INTERRUPT_MANAGE)(
- IN CONST EFI_GUID *HandlerType,
- IN CONST VOID *Context OPTIONAL,
- IN OUT VOID *CommBuffer OPTIONAL,
- IN OUT UINTN *CommBufferSize OPTIONAL
- );
-
-/**
- Main entry point for an SMM handler dispatch or communicate-based callback.
-
- @param[in] DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
- @param[in] Context Points to an optional handler context which was specified when the
- handler was registered.
- @param[in,out] CommBuffer A pointer to a collection of data in memory that will
- be conveyed from a non-SMM environment into an SMM environment.
- @param[in,out] CommBufferSize The size of the CommBuffer.
-
- @retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers
- should still be called.
- @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should
- still be called.
- @retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still
- be called.
- @retval EFI_INTERRUPT_PENDING The interrupt could not be quiesced.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_HANDLER_ENTRY_POINT2)(
- IN EFI_HANDLE DispatchHandle,
- IN CONST VOID *Context OPTIONAL,
- IN OUT VOID *CommBuffer OPTIONAL,
- IN OUT UINTN *CommBufferSize OPTIONAL
- );
-
-/**
- Registers a handler to execute within SMM.
-
- @param[in] Handler Handler service function pointer.
- @param[in] HandlerType Points to the handler type or NULL for root SMI handlers.
- @param[out] DispatchHandle On return, contains a unique handle which can be used to later
- unregister the handler function.
-
- @retval EFI_SUCCESS SMI handler added successfully.
- @retval EFI_INVALID_PARAMETER Handler is NULL or DispatchHandle is NULL.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_INTERRUPT_REGISTER)(
- IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
- IN CONST EFI_GUID *HandlerType OPTIONAL,
- OUT EFI_HANDLE *DispatchHandle
- );
-
-/**
- Unregister a handler in SMM.
-
- @param[in] DispatchHandle The handle that was specified when the handler was registered.
-
- @retval EFI_SUCCESS Handler function was successfully unregistered.
- @retval EFI_INVALID_PARAMETER DispatchHandle does not refer to a valid handle.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_INTERRUPT_UNREGISTER)(
- IN EFI_HANDLE DispatchHandle
- );
+typedef EFI_MM_STARTUP_THIS_AP EFI_SMM_STARTUP_THIS_AP;
+typedef EFI_MM_NOTIFY_FN EFI_SMM_NOTIFY_FN;
+typedef EFI_MM_REGISTER_PROTOCOL_NOTIFY EFI_SMM_REGISTER_PROTOCOL_NOTIFY;
+typedef EFI_MM_INTERRUPT_MANAGE EFI_SMM_INTERRUPT_MANAGE;
+typedef EFI_MM_HANDLER_ENTRY_POINT EFI_SMM_HANDLER_ENTRY_POINT2;
+typedef EFI_MM_INTERRUPT_REGISTER EFI_SMM_INTERRUPT_REGISTER;
+typedef EFI_MM_INTERRUPT_UNREGISTER EFI_SMM_INTERRUPT_UNREGISTER;
///
/// Processor information and functionality needed by SMM Foundation.
@@ -214,24 +63,24 @@ EFI_STATUS
typedef struct _EFI_SMM_ENTRY_CONTEXT {
EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp;
///
- /// A number between zero and the NumberOfCpus field. This field designates which
+ /// A number between zero and the NumberOfCpus field. This field designates which
/// processor is executing the SMM Foundation.
///
UINTN CurrentlyExecutingCpu;
///
- /// The number of possible processors in the platform. This is a 1 based
+ /// The number of possible processors in the platform. This is a 1 based
/// counter. This does not indicate the number of processors that entered SMM.
///
UINTN NumberOfCpus;
///
- /// Points to an array, where each element describes the number of bytes in the
- /// corresponding save state specified by CpuSaveState. There are always
- /// NumberOfCpus entries in the array.
+ /// Points to an array, where each element describes the number of bytes in the
+ /// corresponding save state specified by CpuSaveState. There are always
+ /// NumberOfCpus entries in the array.
///
UINTN *CpuSaveStateSize;
///
- /// Points to an array, where each element is a pointer to a CPU save state. The
- /// corresponding element in CpuSaveStateSize specifies the number of bytes in the
+ /// Points to an array, where each element is a pointer to a CPU save state. The
+ /// corresponding element in CpuSaveStateSize specifies the number of bytes in the
/// save state area. There are always NumberOfCpus entries in the array.
///
VOID **CpuSaveState;
@@ -251,8 +100,8 @@ VOID
///
/// System Management System Table (SMST)
///
-/// The System Management System Table (SMST) is a table that contains a collection of common
-/// services for managing SMRAM allocation and providing basic I/O services. These services are
+/// The System Management System Table (SMST) is a table that contains a collection of common
+/// services for managing SMRAM allocation and providing basic I/O services. These services are
/// intended for both preboot and runtime usage.
///
struct _EFI_SMM_SYSTEM_TABLE2 {
@@ -295,7 +144,7 @@ struct _EFI_SMM_SYSTEM_TABLE2 {
///
///
- /// A number between zero and and the NumberOfCpus field. This field designates
+ /// A number between zero and and the NumberOfCpus field. This field designates
/// which processor is executing the SMM infrastructure.
///
UINTN CurrentlyExecutingCpu;
@@ -304,14 +153,14 @@ struct _EFI_SMM_SYSTEM_TABLE2 {
///
UINTN NumberOfCpus;
///
- /// Points to an array, where each element describes the number of bytes in the
- /// corresponding save state specified by CpuSaveState. There are always
- /// NumberOfCpus entries in the array.
+ /// Points to an array, where each element describes the number of bytes in the
+ /// corresponding save state specified by CpuSaveState. There are always
+ /// NumberOfCpus entries in the array.
///
UINTN *CpuSaveStateSize;
///
- /// Points to an array, where each element is a pointer to a CPU save state. The
- /// corresponding element in CpuSaveStateSize specifies the number of bytes in the
+ /// Points to an array, where each element is a pointer to a CPU save state. The
+ /// corresponding element in CpuSaveStateSize specifies the number of bytes in the
/// save state area. There are always NumberOfCpus entries in the array.
///
VOID **CpuSaveState;
@@ -325,8 +174,8 @@ struct _EFI_SMM_SYSTEM_TABLE2 {
///
UINTN NumberOfTableEntries;
///
- /// A pointer to the UEFI Configuration Tables. The number of entries in the table is
- /// NumberOfTableEntries.
+ /// A pointer to the UEFI Configuration Tables. The number of entries in the table is
+ /// NumberOfTableEntries.
///
EFI_CONFIGURATION_TABLE *SmmConfigurationTable;
diff --git a/MdePkg/Include/Pi/PiSmmCommunicationAcpiTable.h b/MdePkg/Include/Pi/PiSmmCommunicationAcpiTable.h
deleted file mode 100644
index a683299b6abb..000000000000
--- a/MdePkg/Include/Pi/PiSmmCommunicationAcpiTable.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/** @file
- PI SMM Communication ACPI Table Definition.
-
-Copyright (c) 2011, 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
-http://opensource.org/licenses/bsd-license.php.
-
-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 __PI_SMM_COMMUNICATION_ACPI_TABLE__
-#define __PI_SMM_COMMUNICATION_ACPI_TABLE__
-
-#include <Uefi/UefiAcpiDataTable.h>
-
-#endif
diff --git a/MdePkg/Include/Pi/PiStatusCode.h b/MdePkg/Include/Pi/PiStatusCode.h
index adb70ca2050f..e484f2027f5c 100644
--- a/MdePkg/Include/Pi/PiStatusCode.h
+++ b/MdePkg/Include/Pi/PiStatusCode.h
@@ -1,17 +1,11 @@
/** @file
StatusCode related definitions in PI.
-Copyright (c) 2009 - 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 that accompanies this distribution.
-The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
- These status codes are defined in UEFI Platform Initialization Specification 1.2,
+ These status codes are defined in UEFI Platform Initialization Specification 1.2,
Volume 3: Shared Architectural Elements.
**/
@@ -133,7 +127,7 @@ typedef struct {
#define EFI_SOFTWARE 0x03000000
///@}
-///
+///
/// Computing Unit Subclass definitions.
/// Values of 8-127 are reserved for future use by this specification.
/// Values of 128-255 are reserved for OEM use.
@@ -346,6 +340,7 @@ typedef struct {
#define EFI_CHIPSET_EC_BAD_BATTERY (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_CHIPSET_EC_DXE_NB_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_CHIPSET_EC_DXE_SB_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000002)
+#define EFI_CHIPSET_EC_INTRUDER_DETECT (EFI_SUBCLASS_SPECIFIC | 0x00000003)
///@}
///
@@ -367,6 +362,7 @@ typedef struct {
#define EFI_PERIPHERAL_AUDIO_OUTPUT (EFI_PERIPHERAL | 0x000A0000)
#define EFI_PERIPHERAL_LCD_DEVICE (EFI_PERIPHERAL | 0x000B0000)
#define EFI_PERIPHERAL_NETWORK (EFI_PERIPHERAL | 0x000C0000)
+#define EFI_PERIPHERAL_DOCKING (EFI_PERIPHERAL | 0x000D0000)
///@}
///
@@ -381,6 +377,7 @@ typedef struct {
#define EFI_P_PC_ENABLE 0x00000004
#define EFI_P_PC_RECONFIG 0x00000005
#define EFI_P_PC_DETECTED 0x00000006
+#define EFI_P_PC_REMOVED 0x00000007
///@}
//
@@ -470,8 +467,9 @@ typedef struct {
/// Peripheral Class Keyboard Subclass Error Code definitions.
///
///@{
-#define EFI_P_KEYBOARD_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000)
-#define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x00000001)
+#define EFI_P_KEYBOARD_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000)
+#define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x00000001)
+#define EFI_P_KEYBOARD_EC_BUFFER_FULL (EFI_SUBCLASS_SPECIFIC | 0x00000002)
///@}
///
@@ -768,6 +766,7 @@ typedef struct {
#define EFI_SW_PEI_PC_RECOVERY_AUTO (EFI_SUBCLASS_SPECIFIC | 0x00000004)
#define EFI_SW_PEI_PC_S3_BOOT_SCRIPT (EFI_SUBCLASS_SPECIFIC | 0x00000005)
#define EFI_SW_PEI_PC_OS_WAKE (EFI_SUBCLASS_SPECIFIC | 0x00000006)
+#define EFI_SW_PEI_PC_S3_STARTED (EFI_SUBCLASS_SPECIFIC | 0x00000007)
///@}
///
@@ -790,6 +789,11 @@ typedef struct {
#define EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_SW_DXE_BS_PC_EXIT_BOOT_SERVICES_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000003)
#define EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000004)
+#define EFI_SW_DXE_BS_PC_VARIABLE_SERVICES_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000005)
+#define EFI_SW_DXE_BS_PC_VARIABLE_RECLAIM (EFI_SUBCLASS_SPECIFIC | 0x00000006)
+#define EFI_SW_DXE_BS_PC_ATTEMPT_BOOT_ORDER_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000007)
+#define EFI_SW_DXE_BS_PC_CONFIG_RESET (EFI_SUBCLASS_SPECIFIC | 0x00000008)
+#define EFI_SW_DXE_BS_PC_CSM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000009)
///@}
//
@@ -979,6 +983,8 @@ typedef struct {
#define EFI_SW_EC_PWD_CLR_REQUEST 0x0000000F
#define EFI_SW_EC_PWD_CLEARED 0x00000010
#define EFI_SW_EC_EVENT_LOG_FULL 0x00000011
+#define EFI_SW_EC_WRITE_PROTECTED 0x00000012
+#define EFI_SW_EC_FV_CORRUPTED 0x00000013
///@}
//
@@ -1010,6 +1016,8 @@ typedef struct {
#define EFI_SW_PEI_EC_S3_RESUME_FAILED (EFI_SUBCLASS_SPECIFIC | 0x00000005)
#define EFI_SW_PEI_EC_RECOVERY_PPI_NOT_FOUND (EFI_SUBCLASS_SPECIFIC | 0x00000006)
#define EFI_SW_PEI_EC_RECOVERY_FAILED (EFI_SUBCLASS_SPECIFIC | 0x00000007)
+#define EFI_SW_PEI_EC_S3_RESUME_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000008)
+#define EFI_SW_PEI_EC_INVALID_CAPSULE (EFI_SUBCLASS_SPECIFIC | 0x00000009)
///@}
///
@@ -1186,9 +1194,9 @@ typedef struct {
/// definitions in the EFI specification.
///
///@{
-#define EFI_SW_EC_ARM_RESET EXCEPT_ARM_RESET
-#define EFI_SW_EC_ARM_UNDEFINED_INSTRUCTION EXCEPT_ARM_UNDEFINED_INSTRUCTION
-#define EFI_SW_EC_ARM_SOFTWARE_INTERRUPT EXCEPT_ARM_SOFTWARE_INTERRUPT
+#define EFI_SW_EC_ARM_RESET EXCEPT_ARM_RESET
+#define EFI_SW_EC_ARM_UNDEFINED_INSTRUCTION EXCEPT_ARM_UNDEFINED_INSTRUCTION
+#define EFI_SW_EC_ARM_SOFTWARE_INTERRUPT EXCEPT_ARM_SOFTWARE_INTERRUPT
#define EFI_SW_EC_ARM_PREFETCH_ABORT EXCEPT_ARM_PREFETCH_ABORT
#define EFI_SW_EC_ARM_DATA_ABORT EXCEPT_ARM_DATA_ABORT
#define EFI_SW_EC_ARM_RESERVED EXCEPT_ARM_RESERVED