summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Include/Guid
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2024-06-04 06:43:08 +0300
committerkx <kx@radix.pro>2024-06-04 06:43:08 +0300
commit7e2ccccace24636f29ddc210b94606abd4c7e42b (patch)
tree545d43ea12671048956cafeb12303e84d601e571 /MdeModulePkg/Include/Guid
parent27b044605cd5f6b33a3d231576003850b3fe305b (diff)
downloadedk2-trunk.tar.xz
Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305btrunk
Diffstat (limited to 'MdeModulePkg/Include/Guid')
-rw-r--r--MdeModulePkg/Include/Guid/AcpiS3Context.h132
-rw-r--r--MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h46
-rw-r--r--MdeModulePkg/Include/Guid/BootScriptExecutorVariable.h84
-rw-r--r--MdeModulePkg/Include/Guid/CapsuleVendor.h118
-rw-r--r--MdeModulePkg/Include/Guid/ConnectConInEvent.h36
-rw-r--r--MdeModulePkg/Include/Guid/ConsoleInDevice.h36
-rw-r--r--MdeModulePkg/Include/Guid/ConsoleOutDevice.h34
-rw-r--r--MdeModulePkg/Include/Guid/Crc32GuidedSectionExtraction.h36
-rw-r--r--MdeModulePkg/Include/Guid/DebugMask.h136
-rw-r--r--MdeModulePkg/Include/Guid/DriverSampleHii.h62
-rw-r--r--MdeModulePkg/Include/Guid/EndOfS3Resume.h40
-rw-r--r--MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h36
-rw-r--r--MdeModulePkg/Include/Guid/ExtendedFirmwarePerformance.h508
-rw-r--r--MdeModulePkg/Include/Guid/FaultTolerantWrite.h96
-rw-r--r--MdeModulePkg/Include/Guid/FirmwarePerformance.h278
-rw-r--r--MdeModulePkg/Include/Guid/HiiBootMaintenanceFormset.h40
-rw-r--r--MdeModulePkg/Include/Guid/HiiResourceSampleHii.h34
-rw-r--r--MdeModulePkg/Include/Guid/IdleLoopEvent.h36
-rw-r--r--MdeModulePkg/Include/Guid/LoadModuleAtFixedAddress.h54
-rw-r--r--MdeModulePkg/Include/Guid/LzmaDecompress.h58
-rw-r--r--MdeModulePkg/Include/Guid/MdeModuleHii.h462
-rw-r--r--MdeModulePkg/Include/Guid/MdeModulePkgTokenSpace.h38
-rw-r--r--MdeModulePkg/Include/Guid/MemoryProfile.h932
-rw-r--r--MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h194
-rw-r--r--MdeModulePkg/Include/Guid/MemoryTypeInformation.h68
-rw-r--r--MdeModulePkg/Include/Guid/MigratedFvInfo.h122
-rw-r--r--MdeModulePkg/Include/Guid/MtcVendor.h50
-rw-r--r--MdeModulePkg/Include/Guid/NonDiscoverableDevice.h102
-rw-r--r--MdeModulePkg/Include/Guid/PcdDataBaseHobGuid.h38
-rw-r--r--MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h452
-rw-r--r--MdeModulePkg/Include/Guid/Performance.h672
-rw-r--r--MdeModulePkg/Include/Guid/PerformanceMeasurement.h144
-rw-r--r--MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h114
-rw-r--r--MdeModulePkg/Include/Guid/PiSmmMemoryAttributesTable.h90
-rw-r--r--MdeModulePkg/Include/Guid/PlatDriOverrideHii.h38
-rw-r--r--MdeModulePkg/Include/Guid/PlatformHasAcpi.h56
-rw-r--r--MdeModulePkg/Include/Guid/RamDiskHii.h38
-rw-r--r--MdeModulePkg/Include/Guid/RecoveryDevice.h124
-rw-r--r--MdeModulePkg/Include/Guid/RngAlgorithm.h46
-rw-r--r--MdeModulePkg/Include/Guid/S3SmmInitDone.h42
-rw-r--r--MdeModulePkg/Include/Guid/S3StorageDeviceInitList.h114
-rw-r--r--MdeModulePkg/Include/Guid/SerialPortLibVendor.h38
-rw-r--r--MdeModulePkg/Include/Guid/SmiHandlerProfile.h418
-rw-r--r--MdeModulePkg/Include/Guid/SmmLockBox.h132
-rw-r--r--MdeModulePkg/Include/Guid/SmmVariableCommon.h300
-rw-r--r--MdeModulePkg/Include/Guid/StandardErrorDevice.h36
-rw-r--r--MdeModulePkg/Include/Guid/StatusCodeCallbackGuid.h40
-rw-r--r--MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h102
-rw-r--r--MdeModulePkg/Include/Guid/StatusCodeDataTypeVariable.h68
-rw-r--r--MdeModulePkg/Include/Guid/SystemNvDataGuid.h222
-rw-r--r--MdeModulePkg/Include/Guid/TraceHubDebugInfoHob.h48
-rw-r--r--MdeModulePkg/Include/Guid/TtyTerm.h72
-rw-r--r--MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h62
-rw-r--r--MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h166
-rw-r--r--MdeModulePkg/Include/Guid/VarErrorFlag.h68
-rw-r--r--MdeModulePkg/Include/Guid/VariableFlashInfo.h222
-rw-r--r--MdeModulePkg/Include/Guid/VariableFormat.h442
-rw-r--r--MdeModulePkg/Include/Guid/VariableIndexTable.h82
-rw-r--r--MdeModulePkg/Include/Guid/ZeroGuid.h38
59 files changed, 4196 insertions, 4196 deletions
diff --git a/MdeModulePkg/Include/Guid/AcpiS3Context.h b/MdeModulePkg/Include/Guid/AcpiS3Context.h
index 72d173c4fd..b3e2f436c3 100644
--- a/MdeModulePkg/Include/Guid/AcpiS3Context.h
+++ b/MdeModulePkg/Include/Guid/AcpiS3Context.h
@@ -1,66 +1,66 @@
-/** @file
- Definitions for data structures used in S3 resume.
-
-Copyright (c) 2011 - 2023, Intel Corporation. All rights reserved.<BR>
-
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _ACPI_S3_DATA_H_
-#define _ACPI_S3_DATA_H_
-
-#include <Library/BaseLib.h>
-
-#define SMM_S3_RESUME_SMM_32 SIGNATURE_64 ('S','M','M','S','3','_','3','2')
-#define SMM_S3_RESUME_SMM_64 SIGNATURE_64 ('S','M','M','S','3','_','6','4')
-
-#pragma pack(1)
-
-typedef struct {
- UINT64 Signature;
- EFI_PHYSICAL_ADDRESS SmmS3ResumeEntryPoint;
- EFI_PHYSICAL_ADDRESS SmmS3StackBase;
- UINT64 SmmS3StackSize;
- UINT64 SmmS3Cr0;
- UINT64 SmmS3Cr3;
- UINT64 SmmS3Cr4;
- UINT16 ReturnCs;
- EFI_PHYSICAL_ADDRESS ReturnEntryPoint;
- EFI_PHYSICAL_ADDRESS ReturnContext1;
- EFI_PHYSICAL_ADDRESS ReturnContext2;
- EFI_PHYSICAL_ADDRESS ReturnStackPointer;
- EFI_PHYSICAL_ADDRESS MpService2Ppi;
- EFI_PHYSICAL_ADDRESS Smst;
-} SMM_S3_RESUME_STATE;
-
-typedef struct {
- EFI_PHYSICAL_ADDRESS AcpiFacsTable;
- EFI_PHYSICAL_ADDRESS IdtrProfile;
- EFI_PHYSICAL_ADDRESS S3NvsPageTableAddress;
- EFI_PHYSICAL_ADDRESS BootScriptStackBase;
- UINT64 BootScriptStackSize;
- EFI_PHYSICAL_ADDRESS S3DebugBufferAddress;
-} ACPI_S3_CONTEXT;
-
-typedef struct {
- UINT16 ReturnCs;
- UINT64 ReturnStatus;
- EFI_PHYSICAL_ADDRESS ReturnEntryPoint;
- EFI_PHYSICAL_ADDRESS ReturnStackPointer;
- EFI_PHYSICAL_ADDRESS AsmTransferControl;
- IA32_DESCRIPTOR Idtr;
-} PEI_S3_RESUME_STATE;
-
-#pragma pack()
-
-#define EFI_ACPI_S3_CONTEXT_GUID \
- { \
- 0xef98d3a, 0x3e33, 0x497a, {0xa4, 0x1, 0x77, 0xbe, 0x3e, 0xb7, 0x4f, 0x38} \
- }
-
-extern EFI_GUID gEfiAcpiS3ContextGuid;
-
-extern EFI_GUID gEfiAcpiVariableGuid;
-
-#endif
+/** @file
+ Definitions for data structures used in S3 resume.
+
+Copyright (c) 2011 - 2023, Intel Corporation. All rights reserved.<BR>
+
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _ACPI_S3_DATA_H_
+#define _ACPI_S3_DATA_H_
+
+#include <Library/BaseLib.h>
+
+#define SMM_S3_RESUME_SMM_32 SIGNATURE_64 ('S','M','M','S','3','_','3','2')
+#define SMM_S3_RESUME_SMM_64 SIGNATURE_64 ('S','M','M','S','3','_','6','4')
+
+#pragma pack(1)
+
+typedef struct {
+ UINT64 Signature;
+ EFI_PHYSICAL_ADDRESS SmmS3ResumeEntryPoint;
+ EFI_PHYSICAL_ADDRESS SmmS3StackBase;
+ UINT64 SmmS3StackSize;
+ UINT64 SmmS3Cr0;
+ UINT64 SmmS3Cr3;
+ UINT64 SmmS3Cr4;
+ UINT16 ReturnCs;
+ EFI_PHYSICAL_ADDRESS ReturnEntryPoint;
+ EFI_PHYSICAL_ADDRESS ReturnContext1;
+ EFI_PHYSICAL_ADDRESS ReturnContext2;
+ EFI_PHYSICAL_ADDRESS ReturnStackPointer;
+ EFI_PHYSICAL_ADDRESS MpService2Ppi;
+ EFI_PHYSICAL_ADDRESS Smst;
+} SMM_S3_RESUME_STATE;
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS AcpiFacsTable;
+ EFI_PHYSICAL_ADDRESS IdtrProfile;
+ EFI_PHYSICAL_ADDRESS S3NvsPageTableAddress;
+ EFI_PHYSICAL_ADDRESS BootScriptStackBase;
+ UINT64 BootScriptStackSize;
+ EFI_PHYSICAL_ADDRESS S3DebugBufferAddress;
+} ACPI_S3_CONTEXT;
+
+typedef struct {
+ UINT16 ReturnCs;
+ UINT64 ReturnStatus;
+ EFI_PHYSICAL_ADDRESS ReturnEntryPoint;
+ EFI_PHYSICAL_ADDRESS ReturnStackPointer;
+ EFI_PHYSICAL_ADDRESS AsmTransferControl;
+ IA32_DESCRIPTOR Idtr;
+} PEI_S3_RESUME_STATE;
+
+#pragma pack()
+
+#define EFI_ACPI_S3_CONTEXT_GUID \
+ { \
+ 0xef98d3a, 0x3e33, 0x497a, {0xa4, 0x1, 0x77, 0xbe, 0x3e, 0xb7, 0x4f, 0x38} \
+ }
+
+extern EFI_GUID gEfiAcpiS3ContextGuid;
+
+extern EFI_GUID gEfiAcpiVariableGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h b/MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h
index 69b5309530..6c43db29c3 100644
--- a/MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h
+++ b/MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h
@@ -1,23 +1,23 @@
-/** @file
- Definition for structure & defines exported by Boot Discovery Policy UI
-
- Copyright (c) 2021, ARM Ltd. All rights reserved.<BR>
- Copyright (c) 2021, Semihalf All rights reserved.<BR>
-
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef BOOT_DISCOVERY_POLICY_UI_LIB_H_
-#define BOOT_DISCOVERY_POLICY_UI_LIB_H_
-
-#define BDP_CONNECT_MINIMAL 0 /* Do not connect any additional devices */
-#define BDP_CONNECT_NET 1
-#define BDP_CONNECT_ALL 2
-
-#define BOOT_DISCOVERY_POLICY_MGR_FORMSET_GUID { 0x5b6f7107, 0xbb3c, 0x4660, { 0x92, 0xcd, 0x54, 0x26, 0x90, 0x28, 0x0b, 0xbd } }
-
-#define BOOT_DISCOVERY_POLICY_VAR L"BootDiscoveryPolicy"
-#define BOOT_DISCOVERY_POLICY_OLD_VAR L"BootDiscoveryPolicyOld"
-
-#endif
+/** @file
+ Definition for structure & defines exported by Boot Discovery Policy UI
+
+ Copyright (c) 2021, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2021, Semihalf All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef BOOT_DISCOVERY_POLICY_UI_LIB_H_
+#define BOOT_DISCOVERY_POLICY_UI_LIB_H_
+
+#define BDP_CONNECT_MINIMAL 0 /* Do not connect any additional devices */
+#define BDP_CONNECT_NET 1
+#define BDP_CONNECT_ALL 2
+
+#define BOOT_DISCOVERY_POLICY_MGR_FORMSET_GUID { 0x5b6f7107, 0xbb3c, 0x4660, { 0x92, 0xcd, 0x54, 0x26, 0x90, 0x28, 0x0b, 0xbd } }
+
+#define BOOT_DISCOVERY_POLICY_VAR L"BootDiscoveryPolicy"
+#define BOOT_DISCOVERY_POLICY_OLD_VAR L"BootDiscoveryPolicyOld"
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/BootScriptExecutorVariable.h b/MdeModulePkg/Include/Guid/BootScriptExecutorVariable.h
index d780b1b853..e16e572b6c 100644
--- a/MdeModulePkg/Include/Guid/BootScriptExecutorVariable.h
+++ b/MdeModulePkg/Include/Guid/BootScriptExecutorVariable.h
@@ -1,42 +1,42 @@
-/** @file
- Define Name, GUID and data format for an EFI Variable that is used to save the entry point
- of a code segment which will be loaded and executed by a standalone boot script
- executor on S3 boot path.
-
- Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _BOOT_SCRIPT_EXECUTOR_VARIABLE_H_
-#define _BOOT_SCRIPT_EXECUTOR_VARIABLE_H_
-
-#define EFI_BOOT_SCRIPT_EXECUTOR_VARIABLE_GUID \
- { \
- 0x3079818c, 0x46d4, 0x4a73, {0xae, 0xf3, 0xe3, 0xe4, 0x6c, 0xf1, 0xee, 0xdb} \
- }
-
-//
-// The following structure boosts performance by combining structure all ACPI related variables into one.
-//
-#pragma pack(1)
-
-typedef struct {
- EFI_PHYSICAL_ADDRESS BootScriptExecutorEntrypoint;
-} BOOT_SCRIPT_EXECUTOR_VARIABLE;
-
-#pragma pack()
-
-#define BOOT_SCRIPT_EXECUTOR_VARIABLE_NAME L"BootScriptExecutorVariable"
-
-extern EFI_GUID gEfiBootScriptExecutorVariableGuid;
-
-#define EFI_BOOT_SCRIPT_EXECUTOR_CONTEXT_GUID \
- { \
- 0x79cb58c4, 0xac51, 0x442f, {0xaf, 0xd7, 0x98, 0xe4, 0x7d, 0x2e, 0x99, 0x8} \
- }
-
-extern EFI_GUID gEfiBootScriptExecutorContextGuid;
-
-#endif
+/** @file
+ Define Name, GUID and data format for an EFI Variable that is used to save the entry point
+ of a code segment which will be loaded and executed by a standalone boot script
+ executor on S3 boot path.
+
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _BOOT_SCRIPT_EXECUTOR_VARIABLE_H_
+#define _BOOT_SCRIPT_EXECUTOR_VARIABLE_H_
+
+#define EFI_BOOT_SCRIPT_EXECUTOR_VARIABLE_GUID \
+ { \
+ 0x3079818c, 0x46d4, 0x4a73, {0xae, 0xf3, 0xe3, 0xe4, 0x6c, 0xf1, 0xee, 0xdb} \
+ }
+
+//
+// The following structure boosts performance by combining structure all ACPI related variables into one.
+//
+#pragma pack(1)
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS BootScriptExecutorEntrypoint;
+} BOOT_SCRIPT_EXECUTOR_VARIABLE;
+
+#pragma pack()
+
+#define BOOT_SCRIPT_EXECUTOR_VARIABLE_NAME L"BootScriptExecutorVariable"
+
+extern EFI_GUID gEfiBootScriptExecutorVariableGuid;
+
+#define EFI_BOOT_SCRIPT_EXECUTOR_CONTEXT_GUID \
+ { \
+ 0x79cb58c4, 0xac51, 0x442f, {0xaf, 0xd7, 0x98, 0xe4, 0x7d, 0x2e, 0x99, 0x8} \
+ }
+
+extern EFI_GUID gEfiBootScriptExecutorContextGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/CapsuleVendor.h b/MdeModulePkg/Include/Guid/CapsuleVendor.h
index 46615adb25..de09e575ab 100644
--- a/MdeModulePkg/Include/Guid/CapsuleVendor.h
+++ b/MdeModulePkg/Include/Guid/CapsuleVendor.h
@@ -1,59 +1,59 @@
-/** @file
- This file defines:
- * the capsule vendor GUID for capsule variables and the HOB.
- * the capsule variable name.
- * the capsule GUID HOB data structure.
- The capsule HOB and variable can be used to store the capsule image start address and length.
- They are used by EDKII implementation of capsule update across a system reset.
-
- @par Note: EDKII implementation of capsule updating has discarded this capsule GUID HOB data
- structure and used one UEFI Capsule HOB (defined in PI Specification 1.2) instead.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __EFI_CAPSULE_VENDOR_GUID_H__
-#define __EFI_CAPSULE_VENDOR_GUID_H__
-
-///
-/// This guid is used as a variable GUID for the capsule variable
-/// if the capsule pointer is passed through reset via a variable.
-///
-/// This guid is also used as a hob GUID for the capsule data
-/// when the capsule pointer is passed from PEI phase to DXE phase.
-///
-#define EFI_CAPSULE_VENDOR_GUID \
- { 0x711C703F, 0xC285, 0x4B10, { 0xA3, 0xB0, 0x36, 0xEC, 0xBD, 0x3C, 0x8B, 0xE2 } }
-
-///
-/// Name of capsule variable.
-///
-#define EFI_CAPSULE_VARIABLE_NAME L"CapsuleUpdateData"
-
-///
-/// The data structure of the capsule guid hob entry.
-/// Note: EDKII implementation has discarded this structure and used
-/// UEFI_CAPSULE_HOB instead.
-///
-typedef struct {
- EFI_PHYSICAL_ADDRESS BaseAddress; ///< Capsule data start address.
- UINT32 Length; ///< Length of capsule data.
-} CAPSULE_HOB_INFO;
-
-//
-// The variable describes the long mode buffer used by IA32 Capsule PEIM
-// to call X64 CapsuleCoalesce code to handle >4GB capsule blocks.
-//
-#define EFI_CAPSULE_LONG_MODE_BUFFER_NAME L"CapsuleLongModeBuffer"
-
-typedef struct {
- EFI_PHYSICAL_ADDRESS PageTableAddress;
- EFI_PHYSICAL_ADDRESS StackBaseAddress;
- UINT64 StackSize;
-} EFI_CAPSULE_LONG_MODE_BUFFER;
-
-extern EFI_GUID gEfiCapsuleVendorGuid;
-
-#endif // #ifndef _EFI_CAPSULE_VENDOR_GUID_H_
+/** @file
+ This file defines:
+ * the capsule vendor GUID for capsule variables and the HOB.
+ * the capsule variable name.
+ * the capsule GUID HOB data structure.
+ The capsule HOB and variable can be used to store the capsule image start address and length.
+ They are used by EDKII implementation of capsule update across a system reset.
+
+ @par Note: EDKII implementation of capsule updating has discarded this capsule GUID HOB data
+ structure and used one UEFI Capsule HOB (defined in PI Specification 1.2) instead.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __EFI_CAPSULE_VENDOR_GUID_H__
+#define __EFI_CAPSULE_VENDOR_GUID_H__
+
+///
+/// This guid is used as a variable GUID for the capsule variable
+/// if the capsule pointer is passed through reset via a variable.
+///
+/// This guid is also used as a hob GUID for the capsule data
+/// when the capsule pointer is passed from PEI phase to DXE phase.
+///
+#define EFI_CAPSULE_VENDOR_GUID \
+ { 0x711C703F, 0xC285, 0x4B10, { 0xA3, 0xB0, 0x36, 0xEC, 0xBD, 0x3C, 0x8B, 0xE2 } }
+
+///
+/// Name of capsule variable.
+///
+#define EFI_CAPSULE_VARIABLE_NAME L"CapsuleUpdateData"
+
+///
+/// The data structure of the capsule guid hob entry.
+/// Note: EDKII implementation has discarded this structure and used
+/// UEFI_CAPSULE_HOB instead.
+///
+typedef struct {
+ EFI_PHYSICAL_ADDRESS BaseAddress; ///< Capsule data start address.
+ UINT32 Length; ///< Length of capsule data.
+} CAPSULE_HOB_INFO;
+
+//
+// The variable describes the long mode buffer used by IA32 Capsule PEIM
+// to call X64 CapsuleCoalesce code to handle >4GB capsule blocks.
+//
+#define EFI_CAPSULE_LONG_MODE_BUFFER_NAME L"CapsuleLongModeBuffer"
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS PageTableAddress;
+ EFI_PHYSICAL_ADDRESS StackBaseAddress;
+ UINT64 StackSize;
+} EFI_CAPSULE_LONG_MODE_BUFFER;
+
+extern EFI_GUID gEfiCapsuleVendorGuid;
+
+#endif // #ifndef _EFI_CAPSULE_VENDOR_GUID_H_
diff --git a/MdeModulePkg/Include/Guid/ConnectConInEvent.h b/MdeModulePkg/Include/Guid/ConnectConInEvent.h
index 6feeca2291..d47fc3c902 100644
--- a/MdeModulePkg/Include/Guid/ConnectConInEvent.h
+++ b/MdeModulePkg/Include/Guid/ConnectConInEvent.h
@@ -1,18 +1,18 @@
-/** @file
- GUID for an event that is signaled on the first attempt to check for a keystroke
- from the ConIn device.
-
- Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __CONNECT_CONIN_EVENT_GUID_H__
-#define __CONNECT_CONIN_EVENT_GUID_H__
-
-#define CONNECT_CONIN_EVENT_GUID \
- { 0xdb4e8151, 0x57ed, 0x4bed, { 0x88, 0x33, 0x67, 0x51, 0xb5, 0xd1, 0xa8, 0xd7 }}
-
-extern EFI_GUID gConnectConInEventGuid;
-
-#endif
+/** @file
+ GUID for an event that is signaled on the first attempt to check for a keystroke
+ from the ConIn device.
+
+ Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __CONNECT_CONIN_EVENT_GUID_H__
+#define __CONNECT_CONIN_EVENT_GUID_H__
+
+#define CONNECT_CONIN_EVENT_GUID \
+ { 0xdb4e8151, 0x57ed, 0x4bed, { 0x88, 0x33, 0x67, 0x51, 0xb5, 0xd1, 0xa8, 0xd7 }}
+
+extern EFI_GUID gConnectConInEventGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/ConsoleInDevice.h b/MdeModulePkg/Include/Guid/ConsoleInDevice.h
index 597f0c248e..e174e05ba5 100644
--- a/MdeModulePkg/Include/Guid/ConsoleInDevice.h
+++ b/MdeModulePkg/Include/Guid/ConsoleInDevice.h
@@ -1,18 +1,18 @@
-/** @file
- This GUID can be installed to the device handle to specify that the device is the console-in device.
-
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __CONSOLE_IN_DEVICE_H__
-#define __CONSOLE_IN_DEVICE_H__
-
-#define EFI_CONSOLE_IN_DEVICE_GUID \
- { 0xd3b36f2b, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
-
-extern EFI_GUID gEfiConsoleInDeviceGuid;
-
-#endif
+/** @file
+ This GUID can be installed to the device handle to specify that the device is the console-in device.
+
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __CONSOLE_IN_DEVICE_H__
+#define __CONSOLE_IN_DEVICE_H__
+
+#define EFI_CONSOLE_IN_DEVICE_GUID \
+ { 0xd3b36f2b, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
+
+extern EFI_GUID gEfiConsoleInDeviceGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/ConsoleOutDevice.h b/MdeModulePkg/Include/Guid/ConsoleOutDevice.h
index 9cf13b8d54..615384dcaa 100644
--- a/MdeModulePkg/Include/Guid/ConsoleOutDevice.h
+++ b/MdeModulePkg/Include/Guid/ConsoleOutDevice.h
@@ -1,17 +1,17 @@
-/** @file
- This GUID can be installed to the device handle to specify that the device is the console-out device.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __CONSOLE_OUT_DEVICE_H__
-#define __CONSOLE_OUT_DEVICE_H__
-
-#define EFI_CONSOLE_OUT_DEVICE_GUID \
- { 0xd3b36f2c, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
-
-extern EFI_GUID gEfiConsoleOutDeviceGuid;
-
-#endif
+/** @file
+ This GUID can be installed to the device handle to specify that the device is the console-out device.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __CONSOLE_OUT_DEVICE_H__
+#define __CONSOLE_OUT_DEVICE_H__
+
+#define EFI_CONSOLE_OUT_DEVICE_GUID \
+ { 0xd3b36f2c, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
+
+extern EFI_GUID gEfiConsoleOutDeviceGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/Crc32GuidedSectionExtraction.h b/MdeModulePkg/Include/Guid/Crc32GuidedSectionExtraction.h
index 84c7c09ac3..c1d4c16d77 100644
--- a/MdeModulePkg/Include/Guid/Crc32GuidedSectionExtraction.h
+++ b/MdeModulePkg/Include/Guid/Crc32GuidedSectionExtraction.h
@@ -1,18 +1,18 @@
-/** @file
- This file defines CRC32 GUID to specify the CRC32
- encapsulation scheme for the GUIDed section.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __CRC32_GUIDED_SECTION_EXTRACTION_H__
-#define __CRC32_GUIDED_SECTION_EXTRACTION_H__
-
-#define EFI_CRC32_GUIDED_SECTION_EXTRACTION_GUID \
- { 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } }
-
-extern EFI_GUID gEfiCrc32GuidedSectionExtractionGuid;
-
-#endif
+/** @file
+ This file defines CRC32 GUID to specify the CRC32
+ encapsulation scheme for the GUIDed section.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __CRC32_GUIDED_SECTION_EXTRACTION_H__
+#define __CRC32_GUIDED_SECTION_EXTRACTION_H__
+
+#define EFI_CRC32_GUIDED_SECTION_EXTRACTION_GUID \
+ { 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } }
+
+extern EFI_GUID gEfiCrc32GuidedSectionExtractionGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/DebugMask.h b/MdeModulePkg/Include/Guid/DebugMask.h
index 427bcbb147..203831724f 100644
--- a/MdeModulePkg/Include/Guid/DebugMask.h
+++ b/MdeModulePkg/Include/Guid/DebugMask.h
@@ -1,68 +1,68 @@
-/** @file
-
- Debug Mask Protocol.
-
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __DEBUG_MASK_H__
-#define __DEBUG_MASK_H__
-
-///
-/// Protocol GUID for DXE Phase Debug Mask support
-///
-#define EFI_DEBUG_MASK_PROTOCOL_GUID \
- { 0x4c8a2451, 0xc207, 0x405b, {0x96, 0x94, 0x99, 0xea, 0x13, 0x25, 0x13, 0x41} }
-
-///
-/// Forward reference for pure ANSI compatability
-///
-typedef struct _EFI_DEBUG_MASK_PROTOCOL EFI_DEBUG_MASK_PROTOCOL;
-
-///
-///
-///
-#define EFI_DEBUG_MASK_REVISION 0x00010000
-
-//
-// DebugMask member functions definition
-//
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_DEBUG_MASK)(
- IN EFI_DEBUG_MASK_PROTOCOL *This,
- IN OUT UINTN *CurrentDebugMask
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_DEBUG_MASK)(
- IN EFI_DEBUG_MASK_PROTOCOL *This,
- IN UINTN NewDebugMask
- );
-
-///
-/// DebugMask protocol definition
-///
-struct _EFI_DEBUG_MASK_PROTOCOL {
- INT64 Revision;
- EFI_GET_DEBUG_MASK GetDebugMask;
- EFI_SET_DEBUG_MASK SetDebugMask;
-};
-
-extern EFI_GUID gEfiDebugMaskProtocolGuid;
-
-///
-/// GUID used to store the global debug mask in an the "EFIDebug" EFI Variabe
-/// Also used as a GUIDed HOB that contains a UINT32 debug mask default value
-///
-#define EFI_GENERIC_VARIABLE_GUID \
- { 0x59d1c24f, 0x50f1, 0x401a, {0xb1, 0x01, 0xf3, 0x3e, 0x0d, 0xae, 0xd4, 0x43} }
-
-#define DEBUG_MASK_VARIABLE_NAME L"EFIDebug"
-
-extern EFI_GUID gEfiGenericVariableGuid;
-
-#endif
+/** @file
+
+ Debug Mask Protocol.
+
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __DEBUG_MASK_H__
+#define __DEBUG_MASK_H__
+
+///
+/// Protocol GUID for DXE Phase Debug Mask support
+///
+#define EFI_DEBUG_MASK_PROTOCOL_GUID \
+ { 0x4c8a2451, 0xc207, 0x405b, {0x96, 0x94, 0x99, 0xea, 0x13, 0x25, 0x13, 0x41} }
+
+///
+/// Forward reference for pure ANSI compatability
+///
+typedef struct _EFI_DEBUG_MASK_PROTOCOL EFI_DEBUG_MASK_PROTOCOL;
+
+///
+///
+///
+#define EFI_DEBUG_MASK_REVISION 0x00010000
+
+//
+// DebugMask member functions definition
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_DEBUG_MASK)(
+ IN EFI_DEBUG_MASK_PROTOCOL *This,
+ IN OUT UINTN *CurrentDebugMask
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_DEBUG_MASK)(
+ IN EFI_DEBUG_MASK_PROTOCOL *This,
+ IN UINTN NewDebugMask
+ );
+
+///
+/// DebugMask protocol definition
+///
+struct _EFI_DEBUG_MASK_PROTOCOL {
+ INT64 Revision;
+ EFI_GET_DEBUG_MASK GetDebugMask;
+ EFI_SET_DEBUG_MASK SetDebugMask;
+};
+
+extern EFI_GUID gEfiDebugMaskProtocolGuid;
+
+///
+/// GUID used to store the global debug mask in an the "EFIDebug" EFI Variabe
+/// Also used as a GUIDed HOB that contains a UINT32 debug mask default value
+///
+#define EFI_GENERIC_VARIABLE_GUID \
+ { 0x59d1c24f, 0x50f1, 0x401a, {0xb1, 0x01, 0xf3, 0x3e, 0x0d, 0xae, 0xd4, 0x43} }
+
+#define DEBUG_MASK_VARIABLE_NAME L"EFIDebug"
+
+extern EFI_GUID gEfiGenericVariableGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/DriverSampleHii.h b/MdeModulePkg/Include/Guid/DriverSampleHii.h
index b8d8c79845..00751e3b99 100644
--- a/MdeModulePkg/Include/Guid/DriverSampleHii.h
+++ b/MdeModulePkg/Include/Guid/DriverSampleHii.h
@@ -1,31 +1,31 @@
-/** @file
- GUIDs used as HII FormSet and HII Package list GUID in Driver Sample driver.
-
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __DRIVER_SAMPLE_HII_GUID_H__
-#define __DRIVER_SAMPLE_HII_GUID_H__
-
-#define DRIVER_SAMPLE_FORMSET_GUID \
- { \
- 0xA04A27f4, 0xDF00, 0x4D42, {0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D} \
- }
-
-#define DRIVER_SAMPLE_INVENTORY_GUID \
- { \
- 0xb3f56470, 0x6141, 0x4621, {0x8f, 0x19, 0x70, 0x4e, 0x57, 0x7a, 0xa9, 0xe8} \
- }
-
-#define EFI_IFR_REFRESH_ID_OP_GUID \
- { \
- 0xF5E655D9, 0x02A6, 0x46f2, {0x9E, 0x76, 0xB8, 0xBE, 0x8E, 0x60, 0xAB, 0x22} \
- }
-
-extern EFI_GUID gDriverSampleFormSetGuid;
-extern EFI_GUID gDriverSampleInventoryGuid;
-extern EFI_GUID gEfiIfrRefreshIdOpGuid;
-
-#endif
+/** @file
+ GUIDs used as HII FormSet and HII Package list GUID in Driver Sample driver.
+
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __DRIVER_SAMPLE_HII_GUID_H__
+#define __DRIVER_SAMPLE_HII_GUID_H__
+
+#define DRIVER_SAMPLE_FORMSET_GUID \
+ { \
+ 0xA04A27f4, 0xDF00, 0x4D42, {0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D} \
+ }
+
+#define DRIVER_SAMPLE_INVENTORY_GUID \
+ { \
+ 0xb3f56470, 0x6141, 0x4621, {0x8f, 0x19, 0x70, 0x4e, 0x57, 0x7a, 0xa9, 0xe8} \
+ }
+
+#define EFI_IFR_REFRESH_ID_OP_GUID \
+ { \
+ 0xF5E655D9, 0x02A6, 0x46f2, {0x9E, 0x76, 0xB8, 0xBE, 0x8E, 0x60, 0xAB, 0x22} \
+ }
+
+extern EFI_GUID gDriverSampleFormSetGuid;
+extern EFI_GUID gDriverSampleInventoryGuid;
+extern EFI_GUID gEfiIfrRefreshIdOpGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/EndOfS3Resume.h b/MdeModulePkg/Include/Guid/EndOfS3Resume.h
index 1b89f3cc6e..aa7f10f474 100644
--- a/MdeModulePkg/Include/Guid/EndOfS3Resume.h
+++ b/MdeModulePkg/Include/Guid/EndOfS3Resume.h
@@ -1,20 +1,20 @@
-/** @file
- This GUID will be installed at the end of S3 resume phase as protocol in SMM environment.
- It allows for SMM drivers to hook this point and do the required tasks.
-
- Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __END_OF_S3_RESUME_H__
-#define __END_OF_S3_RESUME_H__
-
-#define EDKII_END_OF_S3_RESUME_GUID \
- { \
- 0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } \
- }
-
-extern EFI_GUID gEdkiiEndOfS3ResumeGuid;
-
-#endif
+/** @file
+ This GUID will be installed at the end of S3 resume phase as protocol in SMM environment.
+ It allows for SMM drivers to hook this point and do the required tasks.
+
+ Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __END_OF_S3_RESUME_H__
+#define __END_OF_S3_RESUME_H__
+
+#define EDKII_END_OF_S3_RESUME_GUID \
+ { \
+ 0x96f5296d, 0x05f7, 0x4f3c, {0x84, 0x67, 0xe4, 0x56, 0x89, 0x0e, 0x0c, 0xb5 } \
+ }
+
+extern EFI_GUID gEdkiiEndOfS3ResumeGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h b/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h
index fbed870afb..b696ffed51 100644
--- a/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h
+++ b/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h
@@ -1,18 +1,18 @@
-/** @file
- GUID is the name of events used with ExitBootServices in order to be notified
- when this ExitBootServices Call is failed.
-
- Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __EVENT_EXIT_BOOT_FAILED_GUID_H__
-#define __EVENT_EXIT_BOOT_FAILED_GUID_H__
-
-#define EVENT_GROUP_EXIT_BOOT_SERVICES_FAILED \
- { 0x4f6c5507, 0x232f, 0x4787, { 0xb9, 0x5e, 0x72, 0xf8, 0x62, 0x49, 0xc, 0xb1 } }
-
-extern EFI_GUID gEventExitBootServicesFailedGuid;
-
-#endif
+/** @file
+ GUID is the name of events used with ExitBootServices in order to be notified
+ when this ExitBootServices Call is failed.
+
+ Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __EVENT_EXIT_BOOT_FAILED_GUID_H__
+#define __EVENT_EXIT_BOOT_FAILED_GUID_H__
+
+#define EVENT_GROUP_EXIT_BOOT_SERVICES_FAILED \
+ { 0x4f6c5507, 0x232f, 0x4787, { 0xb9, 0x5e, 0x72, 0xf8, 0x62, 0x49, 0xc, 0xb1 } }
+
+extern EFI_GUID gEventExitBootServicesFailedGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/ExtendedFirmwarePerformance.h b/MdeModulePkg/Include/Guid/ExtendedFirmwarePerformance.h
index 20be7654c8..52ae89eb06 100644
--- a/MdeModulePkg/Include/Guid/ExtendedFirmwarePerformance.h
+++ b/MdeModulePkg/Include/Guid/ExtendedFirmwarePerformance.h
@@ -1,254 +1,254 @@
-/** @file
- This file defines edk2 extended firmware performance records.
- These records will be added into ACPI FPDT Firmware Basic Boot Performance Table.
-
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __EXTENDED_FIRMWARE_PERFORMANCE_H__
-#define __EXTENDED_FIRMWARE_PERFORMANCE_H__
-
-#include <IndustryStandard/Acpi.h>
-
-//
-// Known performance tokens
-//
-#define SEC_TOK "SEC" ///< SEC Phase
-#define DXE_TOK "DXE" ///< DXE Phase
-#define PEI_TOK "PEI" ///< PEI Phase
-#define BDS_TOK "BDS" ///< BDS Phase
-#define DRIVERBINDING_START_TOK "DB:Start:" ///< Driver Binding Start() function call
-#define DRIVERBINDING_SUPPORT_TOK "DB:Support:" ///< Driver Binding Support() function call
-#define DRIVERBINDING_STOP_TOK "DB:Stop:" ///< Driver Binding Stop() function call
-#define LOAD_IMAGE_TOK "LoadImage:" ///< Load a dispatched module
-#define START_IMAGE_TOK "StartImage:" ///< Dispatched Modules Entry Point execution
-#define PEIM_TOK "PEIM" ///< PEIM Modules Entry Point execution
-
-//
-// Misc defines
-//
-#define FPDT_RECORD_REVISION_1 (0x01)
-
-//
-// Length field in EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER is a UINT8, thus:
-//
-#define FPDT_MAX_PERF_RECORD_SIZE (MAX_UINT8)
-
-//
-// FPDT Record Types
-//
-#define FPDT_GUID_EVENT_TYPE 0x1010
-#define FPDT_DYNAMIC_STRING_EVENT_TYPE 0x1011
-#define FPDT_DUAL_GUID_STRING_EVENT_TYPE 0x1012
-#define FPDT_GUID_QWORD_EVENT_TYPE 0x1013
-#define FPDT_GUID_QWORD_STRING_EVENT_TYPE 0x1014
-
-//
-// EDKII extended Fpdt record structures
-//
-#define FPDT_STRING_EVENT_RECORD_NAME_LENGTH 24
-
-#pragma pack(1)
-//
-// FPDT Boot Performance Guid Event Record Structure
-//
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// ProgressID < 0x10 are reserved for core performance entries.
- /// Start measurement point shall have lowered one nibble set to zero and
- /// corresponding end points shall have lowered one nibble set to non-zero value;
- /// keeping other nibbles same as start point.
- ///
- UINT16 ProgressID;
- ///
- /// APIC ID for the processor in the system used as a timestamp clock source.
- /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
- ///
- UINT32 ApicID;
- ///
- /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
- ///
- UINT64 Timestamp;
- ///
- /// If ProgressID < 0x10, GUID of the referenced module; otherwise, GUID of the module logging the event.
- ///
- EFI_GUID Guid;
-} FPDT_GUID_EVENT_RECORD;
-
-//
-// FPDT Boot Performance Dynamic String Event Record Structure
-//
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// ProgressID < 0x10 are reserved for core performance entries.
- /// Start measurement point shall have lowered one nibble set to zero and
- /// corresponding end points shall have lowered one nibble set to non-zero value;
- /// keeping other nibbles same as start point.
- ///
- UINT16 ProgressID;
- ///
- /// APIC ID for the processor in the system used as a timestamp clock source.
- /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
- ///
- UINT32 ApicID;
- ///
- /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
- ///
- UINT64 Timestamp;
- ///
- /// If ProgressID < 0x10, GUID of the referenced module; otherwise, GUID of the module logging the event.
- ///
- EFI_GUID Guid;
- ///
- /// ASCII string describing the module. Padding supplied at the end if necessary with null characters (0x00).
- /// It may be module name, function name, or token name.
- ///
- CHAR8 String[0];
-} FPDT_DYNAMIC_STRING_EVENT_RECORD;
-
-//
-// FPDT Boot Performance Dual GUID String Event Record Structure
-//
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// ProgressID < 0x10 are reserved for core performance entries.
- /// Start measurement point shall have lowered one nibble set to zero and
- /// corresponding end points shall have lowered one nibble set to non-zero value;
- /// keeping other nibbles same as start point.
- ///
- UINT16 ProgressID;
- ///
- /// APIC ID for the processor in the system used as a timestamp clock source.
- /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
- ///
- UINT32 ApicID;
- ///
- /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
- ///
- UINT64 Timestamp;
- ///
- /// GUID of the module logging the event.
- ///
- EFI_GUID Guid1;
- ///
- /// Event or Ppi or Protocol GUID for Callback.
- ///
- EFI_GUID Guid2;
- ///
- /// ASCII string describing the module. Padding supplied at the end if necessary with null characters (0x00).
- /// It is the function name.
- ///
- CHAR8 String[0];
-} FPDT_DUAL_GUID_STRING_EVENT_RECORD;
-
-//
-// FPDT Boot Performance GUID Qword Event Record Structure
-//
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// ProgressID < 0x10 are reserved for core performance entries.
- /// Start measurement point shall have lowered one nibble set to zero and
- /// corresponding end points shall have lowered one nibble set to non-zero value;
- /// keeping other nibbles same as start point.
- ///
- UINT16 ProgressID;
- ///
- /// APIC ID for the processor in the system used as a timestamp clock source.
- /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
- ///
- UINT32 ApicID;
- ///
- /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
- ///
- UINT64 Timestamp;
- ///
- /// GUID of the module logging the event
- ///
- EFI_GUID Guid;
- ///
- /// Qword of misc data, meaning depends on the ProgressId
- ///
- UINT64 Qword;
-} FPDT_GUID_QWORD_EVENT_RECORD;
-
-//
-// FPDT Boot Performance GUID Qword String Event Record Structure
-//
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// ProgressID < 0x10 are reserved for core performance entries.
- /// Start measurement point shall have lowered one nibble set to zero and
- /// corresponding end points shall have lowered one nibble set to non-zero value;
- /// keeping other nibbles same as start point.
- ///
- UINT16 ProgressID;
- ///
- /// APIC ID for the processor in the system used as a timestamp clock source.
- /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
- ///
- UINT32 ApicID;
- ///
- /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
- ///
- UINT64 Timestamp;
- ///
- /// GUID of the module logging the event
- ///
- EFI_GUID Guid;
- ///
- /// Qword of misc data, meaning depends on the ProgressId
- ///
- UINT64 Qword;
- ///
- /// ASCII string describing the module. Padding supplied at the end if necessary with null characters (0x00).
- ///
- CHAR8 String[0];
-} FPDT_GUID_QWORD_STRING_EVENT_RECORD;
-
-#pragma pack()
-
-//
-// Union of all FPDT records
-//
-typedef union {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER RecordHeader;
- FPDT_GUID_EVENT_RECORD GuidEvent;
- FPDT_DYNAMIC_STRING_EVENT_RECORD DynamicStringEvent;
- FPDT_DUAL_GUID_STRING_EVENT_RECORD DualGuidStringEvent;
- FPDT_GUID_QWORD_EVENT_RECORD GuidQwordEvent;
- FPDT_GUID_QWORD_STRING_EVENT_RECORD GuidQwordStringEvent;
-} FPDT_RECORD;
-
-//
-// Union of all pointers to FPDT records
-//
-typedef union {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER *RecordHeader;
- FPDT_GUID_EVENT_RECORD *GuidEvent;
- FPDT_DYNAMIC_STRING_EVENT_RECORD *DynamicStringEvent;
- FPDT_DUAL_GUID_STRING_EVENT_RECORD *DualGuidStringEvent;
- FPDT_GUID_QWORD_EVENT_RECORD *GuidQwordEvent;
- FPDT_GUID_QWORD_STRING_EVENT_RECORD *GuidQwordStringEvent;
-} FPDT_RECORD_PTR;
-
-///
-/// Hob:
-/// GUID - gEdkiiFpdtExtendedFirmwarePerformanceGuid;
-/// Data - FPDT_PEI_EXT_PERF_HEADER + one or more FPDT records
-///
-typedef struct {
- UINT32 SizeOfAllEntries;
- UINT32 LoadImageCount;
- UINT32 HobIsFull;
-} FPDT_PEI_EXT_PERF_HEADER;
-
-extern EFI_GUID gEdkiiFpdtExtendedFirmwarePerformanceGuid;
-
-#endif
+/** @file
+ This file defines edk2 extended firmware performance records.
+ These records will be added into ACPI FPDT Firmware Basic Boot Performance Table.
+
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __EXTENDED_FIRMWARE_PERFORMANCE_H__
+#define __EXTENDED_FIRMWARE_PERFORMANCE_H__
+
+#include <IndustryStandard/Acpi.h>
+
+//
+// Known performance tokens
+//
+#define SEC_TOK "SEC" ///< SEC Phase
+#define DXE_TOK "DXE" ///< DXE Phase
+#define PEI_TOK "PEI" ///< PEI Phase
+#define BDS_TOK "BDS" ///< BDS Phase
+#define DRIVERBINDING_START_TOK "DB:Start:" ///< Driver Binding Start() function call
+#define DRIVERBINDING_SUPPORT_TOK "DB:Support:" ///< Driver Binding Support() function call
+#define DRIVERBINDING_STOP_TOK "DB:Stop:" ///< Driver Binding Stop() function call
+#define LOAD_IMAGE_TOK "LoadImage:" ///< Load a dispatched module
+#define START_IMAGE_TOK "StartImage:" ///< Dispatched Modules Entry Point execution
+#define PEIM_TOK "PEIM" ///< PEIM Modules Entry Point execution
+
+//
+// Misc defines
+//
+#define FPDT_RECORD_REVISION_1 (0x01)
+
+//
+// Length field in EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER is a UINT8, thus:
+//
+#define FPDT_MAX_PERF_RECORD_SIZE (MAX_UINT8)
+
+//
+// FPDT Record Types
+//
+#define FPDT_GUID_EVENT_TYPE 0x1010
+#define FPDT_DYNAMIC_STRING_EVENT_TYPE 0x1011
+#define FPDT_DUAL_GUID_STRING_EVENT_TYPE 0x1012
+#define FPDT_GUID_QWORD_EVENT_TYPE 0x1013
+#define FPDT_GUID_QWORD_STRING_EVENT_TYPE 0x1014
+
+//
+// EDKII extended Fpdt record structures
+//
+#define FPDT_STRING_EVENT_RECORD_NAME_LENGTH 24
+
+#pragma pack(1)
+//
+// FPDT Boot Performance Guid Event Record Structure
+//
+typedef struct {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ ///
+ /// ProgressID < 0x10 are reserved for core performance entries.
+ /// Start measurement point shall have lowered one nibble set to zero and
+ /// corresponding end points shall have lowered one nibble set to non-zero value;
+ /// keeping other nibbles same as start point.
+ ///
+ UINT16 ProgressID;
+ ///
+ /// APIC ID for the processor in the system used as a timestamp clock source.
+ /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
+ ///
+ UINT32 ApicID;
+ ///
+ /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
+ ///
+ UINT64 Timestamp;
+ ///
+ /// If ProgressID < 0x10, GUID of the referenced module; otherwise, GUID of the module logging the event.
+ ///
+ EFI_GUID Guid;
+} FPDT_GUID_EVENT_RECORD;
+
+//
+// FPDT Boot Performance Dynamic String Event Record Structure
+//
+typedef struct {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ ///
+ /// ProgressID < 0x10 are reserved for core performance entries.
+ /// Start measurement point shall have lowered one nibble set to zero and
+ /// corresponding end points shall have lowered one nibble set to non-zero value;
+ /// keeping other nibbles same as start point.
+ ///
+ UINT16 ProgressID;
+ ///
+ /// APIC ID for the processor in the system used as a timestamp clock source.
+ /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
+ ///
+ UINT32 ApicID;
+ ///
+ /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
+ ///
+ UINT64 Timestamp;
+ ///
+ /// If ProgressID < 0x10, GUID of the referenced module; otherwise, GUID of the module logging the event.
+ ///
+ EFI_GUID Guid;
+ ///
+ /// ASCII string describing the module. Padding supplied at the end if necessary with null characters (0x00).
+ /// It may be module name, function name, or token name.
+ ///
+ CHAR8 String[0];
+} FPDT_DYNAMIC_STRING_EVENT_RECORD;
+
+//
+// FPDT Boot Performance Dual GUID String Event Record Structure
+//
+typedef struct {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ ///
+ /// ProgressID < 0x10 are reserved for core performance entries.
+ /// Start measurement point shall have lowered one nibble set to zero and
+ /// corresponding end points shall have lowered one nibble set to non-zero value;
+ /// keeping other nibbles same as start point.
+ ///
+ UINT16 ProgressID;
+ ///
+ /// APIC ID for the processor in the system used as a timestamp clock source.
+ /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
+ ///
+ UINT32 ApicID;
+ ///
+ /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
+ ///
+ UINT64 Timestamp;
+ ///
+ /// GUID of the module logging the event.
+ ///
+ EFI_GUID Guid1;
+ ///
+ /// Event or Ppi or Protocol GUID for Callback.
+ ///
+ EFI_GUID Guid2;
+ ///
+ /// ASCII string describing the module. Padding supplied at the end if necessary with null characters (0x00).
+ /// It is the function name.
+ ///
+ CHAR8 String[0];
+} FPDT_DUAL_GUID_STRING_EVENT_RECORD;
+
+//
+// FPDT Boot Performance GUID Qword Event Record Structure
+//
+typedef struct {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ ///
+ /// ProgressID < 0x10 are reserved for core performance entries.
+ /// Start measurement point shall have lowered one nibble set to zero and
+ /// corresponding end points shall have lowered one nibble set to non-zero value;
+ /// keeping other nibbles same as start point.
+ ///
+ UINT16 ProgressID;
+ ///
+ /// APIC ID for the processor in the system used as a timestamp clock source.
+ /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
+ ///
+ UINT32 ApicID;
+ ///
+ /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
+ ///
+ UINT64 Timestamp;
+ ///
+ /// GUID of the module logging the event
+ ///
+ EFI_GUID Guid;
+ ///
+ /// Qword of misc data, meaning depends on the ProgressId
+ ///
+ UINT64 Qword;
+} FPDT_GUID_QWORD_EVENT_RECORD;
+
+//
+// FPDT Boot Performance GUID Qword String Event Record Structure
+//
+typedef struct {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ ///
+ /// ProgressID < 0x10 are reserved for core performance entries.
+ /// Start measurement point shall have lowered one nibble set to zero and
+ /// corresponding end points shall have lowered one nibble set to non-zero value;
+ /// keeping other nibbles same as start point.
+ ///
+ UINT16 ProgressID;
+ ///
+ /// APIC ID for the processor in the system used as a timestamp clock source.
+ /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
+ ///
+ UINT32 ApicID;
+ ///
+ /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
+ ///
+ UINT64 Timestamp;
+ ///
+ /// GUID of the module logging the event
+ ///
+ EFI_GUID Guid;
+ ///
+ /// Qword of misc data, meaning depends on the ProgressId
+ ///
+ UINT64 Qword;
+ ///
+ /// ASCII string describing the module. Padding supplied at the end if necessary with null characters (0x00).
+ ///
+ CHAR8 String[0];
+} FPDT_GUID_QWORD_STRING_EVENT_RECORD;
+
+#pragma pack()
+
+//
+// Union of all FPDT records
+//
+typedef union {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER RecordHeader;
+ FPDT_GUID_EVENT_RECORD GuidEvent;
+ FPDT_DYNAMIC_STRING_EVENT_RECORD DynamicStringEvent;
+ FPDT_DUAL_GUID_STRING_EVENT_RECORD DualGuidStringEvent;
+ FPDT_GUID_QWORD_EVENT_RECORD GuidQwordEvent;
+ FPDT_GUID_QWORD_STRING_EVENT_RECORD GuidQwordStringEvent;
+} FPDT_RECORD;
+
+//
+// Union of all pointers to FPDT records
+//
+typedef union {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER *RecordHeader;
+ FPDT_GUID_EVENT_RECORD *GuidEvent;
+ FPDT_DYNAMIC_STRING_EVENT_RECORD *DynamicStringEvent;
+ FPDT_DUAL_GUID_STRING_EVENT_RECORD *DualGuidStringEvent;
+ FPDT_GUID_QWORD_EVENT_RECORD *GuidQwordEvent;
+ FPDT_GUID_QWORD_STRING_EVENT_RECORD *GuidQwordStringEvent;
+} FPDT_RECORD_PTR;
+
+///
+/// Hob:
+/// GUID - gEdkiiFpdtExtendedFirmwarePerformanceGuid;
+/// Data - FPDT_PEI_EXT_PERF_HEADER + one or more FPDT records
+///
+typedef struct {
+ UINT32 SizeOfAllEntries;
+ UINT32 LoadImageCount;
+ UINT32 HobIsFull;
+} FPDT_PEI_EXT_PERF_HEADER;
+
+extern EFI_GUID gEdkiiFpdtExtendedFirmwarePerformanceGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/FaultTolerantWrite.h b/MdeModulePkg/Include/Guid/FaultTolerantWrite.h
index 29c4aeba6a..875ab204c7 100644
--- a/MdeModulePkg/Include/Guid/FaultTolerantWrite.h
+++ b/MdeModulePkg/Include/Guid/FaultTolerantWrite.h
@@ -1,48 +1,48 @@
-/** @file
- Define the GUID gEdkiiFaultTolerantWriteGuid that will be used to build
- FAULT_TOLERANT_WRITE_LAST_WRITE_DATA GUID hob and install PPI to inform the check
- for FTW last write data has been done. The GUID hob will be only built if FTW last write was
- still in progress with SpareComplete set and DestinationComplete not set.
-
-Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _FAULT_TOLERANT_WRITE_H_
-#define _FAULT_TOLERANT_WRITE_H_
-
-#define EDKII_FAULT_TOLERANT_WRITE_GUID \
- { \
- 0x1d3e9cb8, 0x43af, 0x490b, { 0x83, 0xa, 0x35, 0x16, 0xaa, 0x53, 0x20, 0x47 } \
- }
-
-//
-// FTW Last write data. It will be used as gEdkiiFaultTolerantWriteGuid GUID hob data.
-//
-typedef struct {
- ///
- /// Target address to be updated in FTW last write.
- ///
- EFI_PHYSICAL_ADDRESS TargetAddress;
- ///
- /// Spare address to back up the updated buffer.
- ///
- EFI_PHYSICAL_ADDRESS SpareAddress;
- ///
- /// The length of data that have been backed up in spare block.
- /// It is also the length of target block that has been erased.
- ///
- UINT64 Length;
-} FAULT_TOLERANT_WRITE_LAST_WRITE_DATA;
-
-//
-// This GUID will be used to install PPI to inform the check for FTW last write data has been done.
-// The related FAULT_TOLERANT_WRITE_LAST_WRITE_DATA GUID hob will be only built if
-// FTW last write was still in progress with SpareComplete set and DestinationComplete not set.
-// It means the target buffer has been backed up in spare block, then target block has been erased,
-// but the target buffer has not been writen in target block from spare block.
-//
-extern EFI_GUID gEdkiiFaultTolerantWriteGuid;
-
-#endif
+/** @file
+ Define the GUID gEdkiiFaultTolerantWriteGuid that will be used to build
+ FAULT_TOLERANT_WRITE_LAST_WRITE_DATA GUID hob and install PPI to inform the check
+ for FTW last write data has been done. The GUID hob will be only built if FTW last write was
+ still in progress with SpareComplete set and DestinationComplete not set.
+
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _FAULT_TOLERANT_WRITE_H_
+#define _FAULT_TOLERANT_WRITE_H_
+
+#define EDKII_FAULT_TOLERANT_WRITE_GUID \
+ { \
+ 0x1d3e9cb8, 0x43af, 0x490b, { 0x83, 0xa, 0x35, 0x16, 0xaa, 0x53, 0x20, 0x47 } \
+ }
+
+//
+// FTW Last write data. It will be used as gEdkiiFaultTolerantWriteGuid GUID hob data.
+//
+typedef struct {
+ ///
+ /// Target address to be updated in FTW last write.
+ ///
+ EFI_PHYSICAL_ADDRESS TargetAddress;
+ ///
+ /// Spare address to back up the updated buffer.
+ ///
+ EFI_PHYSICAL_ADDRESS SpareAddress;
+ ///
+ /// The length of data that have been backed up in spare block.
+ /// It is also the length of target block that has been erased.
+ ///
+ UINT64 Length;
+} FAULT_TOLERANT_WRITE_LAST_WRITE_DATA;
+
+//
+// This GUID will be used to install PPI to inform the check for FTW last write data has been done.
+// The related FAULT_TOLERANT_WRITE_LAST_WRITE_DATA GUID hob will be only built if
+// FTW last write was still in progress with SpareComplete set and DestinationComplete not set.
+// It means the target buffer has been backed up in spare block, then target block has been erased,
+// but the target buffer has not been writen in target block from spare block.
+//
+extern EFI_GUID gEdkiiFaultTolerantWriteGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/FirmwarePerformance.h b/MdeModulePkg/Include/Guid/FirmwarePerformance.h
index 3ce146eba1..1883a5961c 100644
--- a/MdeModulePkg/Include/Guid/FirmwarePerformance.h
+++ b/MdeModulePkg/Include/Guid/FirmwarePerformance.h
@@ -1,139 +1,139 @@
-/** @file
- ACPI Firmware Performance Data Table (FPDT) implementation specific definitions.
-
- Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _FIRMWARE_PERFORMANCE_GUID_H_
-#define _FIRMWARE_PERFORMANCE_GUID_H_
-
-#include <PiPei.h>
-#include <IndustryStandard/Acpi.h>
-#include <Ppi/SecPerformance.h>
-
-///
-/// This GUID is used for FPDT implementation specific EFI Variable, LockBox and Hob.
-///
-/// EFI Variable:
-/// GUID - gEfiFirmwarePerformanceGuid
-/// Name - EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME
-/// Data - FIRMWARE_PERFORMANCE_VARIABLE
-///
-/// LockBox:
-/// GUID - gEfiFirmwarePerformanceGuid
-/// Data - EFI_ACPI_BASIC_S3_SUSPEND_PERFORMANCE_RECORD
-///
-/// Hob:
-/// GUID - gEfiFirmwarePerformanceGuid
-/// Data - FIRMWARE_SEC_PERFORMANCE (defined in <Ppi/SecPerformance.h>)
-///
-/// SMI:
-/// GUID - gEfiFirmwarePerformanceGuid
-/// Data - SMM_BOOT_RECORD_COMMUNICATE
-///
-/// StatusCodeData:
-/// Type - gEfiFirmwarePerformanceGuid
-/// Data - One or more boot record
-///
-#define EFI_FIRMWARE_PERFORMANCE_GUID \
- { \
- 0xc095791a, 0x3001, 0x47b2, {0x80, 0xc9, 0xea, 0xc7, 0x31, 0x9f, 0x2f, 0xa4 } \
- }
-
-#define EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME L"FirmwarePerformance"
-
-/// LockBox:
-/// GUID - gFirmwarePerformanceS3PointerGuid
-/// Data - S3 performance table pointer
-///
-#define FIRMWARE_PERFORMANCE_S3_POINTER_GUID \
- { \
- 0xdc65adc, 0xa973, 0x4130, { 0x8d, 0xf0, 0x2a, 0xdb, 0xeb, 0x9e, 0x4a, 0x31 } \
- }
-
-#pragma pack(1)
-
-///
-/// Firmware Performance Data Table.
-/// This structure will be installed into ACPI table as FPDT in normal boot path.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header; ///< Common ACPI description table header.
- EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD BootPointerRecord; ///< Basic Boot Performance Table Pointer record.
- EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD S3PointerRecord; ///< S3 Performance Table Pointer record.
-} FIRMWARE_PERFORMANCE_TABLE;
-
-///
-/// S3 Performance Data Table.
-/// This structure contains S3 performance records which will be updated in S3
-/// suspend and S3 resume boot path.
-///
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; ///< Common ACPI table header.
- EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD S3Resume; ///< Basic S3 Resume performance record.
- EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD S3Suspend; ///< Basic S3 Suspend performance record.
-} S3_PERFORMANCE_TABLE;
-
-///
-/// Basic Boot Performance Data Table.
-/// This structure contains BasicBoot performance record.
-///
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; ///< Common ACPI table header.
- EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD BasicBoot; ///< Basic Boot Resume performance record.
- //
- // one or more boot performance records.
- //
-} BOOT_PERFORMANCE_TABLE;
-
-///
-/// Boot performance table for the performance record in SMM phase.
-///
-///
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; ///< Common ACPI table header.
- //
- // one or more boot performance records.
- //
-} SMM_BOOT_PERFORMANCE_TABLE;
-
-///
-/// Performance data pointed by Performance Pointer Record.
-///
-typedef struct {
- BOOT_PERFORMANCE_TABLE BootPerformance; ///< Basic Boot Performance.
- S3_PERFORMANCE_TABLE S3Performance; ///< S3 performance.
-} FIRMWARE_PERFORMANCE_RUNTIME_DATA;
-
-///
-/// Variable defined for FPDT implementation.
-/// This Variable is produced by FPDT DXE module.
-///
-typedef struct {
- EFI_PHYSICAL_ADDRESS BootPerformanceTablePointer; ///< Pointer to Boot Performance Table.
- EFI_PHYSICAL_ADDRESS S3PerformanceTablePointer; ///< Pointer to S3 Performance Table.
-} FIRMWARE_PERFORMANCE_VARIABLE;
-
-#pragma pack()
-
-//
-// Log BOOT RECORD from SMM driver on boot time.
-//
-#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_SIZE 1
-#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA 2
-#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET 3
-
-typedef struct {
- UINTN Function;
- EFI_STATUS ReturnStatus;
- UINTN BootRecordSize;
- VOID *BootRecordData;
- UINTN BootRecordOffset;
-} SMM_BOOT_RECORD_COMMUNICATE;
-
-extern EFI_GUID gEfiFirmwarePerformanceGuid;
-extern EFI_GUID gFirmwarePerformanceS3PointerGuid;
-
-#endif
+/** @file
+ ACPI Firmware Performance Data Table (FPDT) implementation specific definitions.
+
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _FIRMWARE_PERFORMANCE_GUID_H_
+#define _FIRMWARE_PERFORMANCE_GUID_H_
+
+#include <PiPei.h>
+#include <IndustryStandard/Acpi.h>
+#include <Ppi/SecPerformance.h>
+
+///
+/// This GUID is used for FPDT implementation specific EFI Variable, LockBox and Hob.
+///
+/// EFI Variable:
+/// GUID - gEfiFirmwarePerformanceGuid
+/// Name - EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME
+/// Data - FIRMWARE_PERFORMANCE_VARIABLE
+///
+/// LockBox:
+/// GUID - gEfiFirmwarePerformanceGuid
+/// Data - EFI_ACPI_BASIC_S3_SUSPEND_PERFORMANCE_RECORD
+///
+/// Hob:
+/// GUID - gEfiFirmwarePerformanceGuid
+/// Data - FIRMWARE_SEC_PERFORMANCE (defined in <Ppi/SecPerformance.h>)
+///
+/// SMI:
+/// GUID - gEfiFirmwarePerformanceGuid
+/// Data - SMM_BOOT_RECORD_COMMUNICATE
+///
+/// StatusCodeData:
+/// Type - gEfiFirmwarePerformanceGuid
+/// Data - One or more boot record
+///
+#define EFI_FIRMWARE_PERFORMANCE_GUID \
+ { \
+ 0xc095791a, 0x3001, 0x47b2, {0x80, 0xc9, 0xea, 0xc7, 0x31, 0x9f, 0x2f, 0xa4 } \
+ }
+
+#define EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME L"FirmwarePerformance"
+
+/// LockBox:
+/// GUID - gFirmwarePerformanceS3PointerGuid
+/// Data - S3 performance table pointer
+///
+#define FIRMWARE_PERFORMANCE_S3_POINTER_GUID \
+ { \
+ 0xdc65adc, 0xa973, 0x4130, { 0x8d, 0xf0, 0x2a, 0xdb, 0xeb, 0x9e, 0x4a, 0x31 } \
+ }
+
+#pragma pack(1)
+
+///
+/// Firmware Performance Data Table.
+/// This structure will be installed into ACPI table as FPDT in normal boot path.
+///
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header; ///< Common ACPI description table header.
+ EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD BootPointerRecord; ///< Basic Boot Performance Table Pointer record.
+ EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD S3PointerRecord; ///< S3 Performance Table Pointer record.
+} FIRMWARE_PERFORMANCE_TABLE;
+
+///
+/// S3 Performance Data Table.
+/// This structure contains S3 performance records which will be updated in S3
+/// suspend and S3 resume boot path.
+///
+typedef struct {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; ///< Common ACPI table header.
+ EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD S3Resume; ///< Basic S3 Resume performance record.
+ EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD S3Suspend; ///< Basic S3 Suspend performance record.
+} S3_PERFORMANCE_TABLE;
+
+///
+/// Basic Boot Performance Data Table.
+/// This structure contains BasicBoot performance record.
+///
+typedef struct {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; ///< Common ACPI table header.
+ EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD BasicBoot; ///< Basic Boot Resume performance record.
+ //
+ // one or more boot performance records.
+ //
+} BOOT_PERFORMANCE_TABLE;
+
+///
+/// Boot performance table for the performance record in SMM phase.
+///
+///
+typedef struct {
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; ///< Common ACPI table header.
+ //
+ // one or more boot performance records.
+ //
+} SMM_BOOT_PERFORMANCE_TABLE;
+
+///
+/// Performance data pointed by Performance Pointer Record.
+///
+typedef struct {
+ BOOT_PERFORMANCE_TABLE BootPerformance; ///< Basic Boot Performance.
+ S3_PERFORMANCE_TABLE S3Performance; ///< S3 performance.
+} FIRMWARE_PERFORMANCE_RUNTIME_DATA;
+
+///
+/// Variable defined for FPDT implementation.
+/// This Variable is produced by FPDT DXE module.
+///
+typedef struct {
+ EFI_PHYSICAL_ADDRESS BootPerformanceTablePointer; ///< Pointer to Boot Performance Table.
+ EFI_PHYSICAL_ADDRESS S3PerformanceTablePointer; ///< Pointer to S3 Performance Table.
+} FIRMWARE_PERFORMANCE_VARIABLE;
+
+#pragma pack()
+
+//
+// Log BOOT RECORD from SMM driver on boot time.
+//
+#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_SIZE 1
+#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA 2
+#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET 3
+
+typedef struct {
+ UINTN Function;
+ EFI_STATUS ReturnStatus;
+ UINTN BootRecordSize;
+ VOID *BootRecordData;
+ UINTN BootRecordOffset;
+} SMM_BOOT_RECORD_COMMUNICATE;
+
+extern EFI_GUID gEfiFirmwarePerformanceGuid;
+extern EFI_GUID gFirmwarePerformanceS3PointerGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/HiiBootMaintenanceFormset.h b/MdeModulePkg/Include/Guid/HiiBootMaintenanceFormset.h
index 7c58557499..f303dad652 100644
--- a/MdeModulePkg/Include/Guid/HiiBootMaintenanceFormset.h
+++ b/MdeModulePkg/Include/Guid/HiiBootMaintenanceFormset.h
@@ -1,20 +1,20 @@
-/** @file
- Guid definition for Boot Maintainence Formset.
-
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __HII_BOOT_MAINTENANCE_FORMSET_H__
-#define __HII_BOOT_MAINTENANCE_FORMSET_H__
-
-///
-/// Guid define to group the item show on the Boot Menaintenance Manager Menu.
-///
-#define EFI_IFR_BOOT_MAINTENANCE_GUID \
- { 0xb2dedc91, 0xd59f, 0x48d2, { 0x89, 0x8a, 0x12, 0x49, 0xc, 0x74, 0xa4, 0xe0 } }
-
-extern EFI_GUID gEfiIfrBootMaintenanceGuid;
-
-#endif
+/** @file
+ Guid definition for Boot Maintainence Formset.
+
+Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __HII_BOOT_MAINTENANCE_FORMSET_H__
+#define __HII_BOOT_MAINTENANCE_FORMSET_H__
+
+///
+/// Guid define to group the item show on the Boot Menaintenance Manager Menu.
+///
+#define EFI_IFR_BOOT_MAINTENANCE_GUID \
+ { 0xb2dedc91, 0xd59f, 0x48d2, { 0x89, 0x8a, 0x12, 0x49, 0xc, 0x74, 0xa4, 0xe0 } }
+
+extern EFI_GUID gEfiIfrBootMaintenanceGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h b/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h
index e59a7c47ee..a4a17227ba 100644
--- a/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h
+++ b/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h
@@ -1,17 +1,17 @@
-/** @file
- GUID used as HII FormSet GUID in HII Resource Sample driver.
-
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __HII_RESOURCE_SAMPLE_HII_GUID_H__
-#define __HII_RESOURCE_SAMPLE_HII_GUID_H__
-
-#define HII_RESOURCE_SAMPLE_FORM_SET_GUID \
- { 0x4f4ef7f0, 0xaa29, 0x4ce9, { 0xba, 0x41, 0x64, 0x3e, 0x1, 0x23, 0xa9, 0x9f }}
-
-extern EFI_GUID gHiiResourceSamleFormSetGuid;
-
-#endif
+/** @file
+ GUID used as HII FormSet GUID in HII Resource Sample driver.
+
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __HII_RESOURCE_SAMPLE_HII_GUID_H__
+#define __HII_RESOURCE_SAMPLE_HII_GUID_H__
+
+#define HII_RESOURCE_SAMPLE_FORM_SET_GUID \
+ { 0x4f4ef7f0, 0xaa29, 0x4ce9, { 0xba, 0x41, 0x64, 0x3e, 0x1, 0x23, 0xa9, 0x9f }}
+
+extern EFI_GUID gHiiResourceSamleFormSetGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/IdleLoopEvent.h b/MdeModulePkg/Include/Guid/IdleLoopEvent.h
index 7afc9dcbcf..507db3fcc0 100644
--- a/MdeModulePkg/Include/Guid/IdleLoopEvent.h
+++ b/MdeModulePkg/Include/Guid/IdleLoopEvent.h
@@ -1,18 +1,18 @@
-/** @file
- GUID is the name of events used with CreateEventEx in order to be notified
- when the DXE Core is idle.
-
- Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __IDLE_LOOP_EVENT_GUID_H__
-#define __IDLE_LOOP_EVENT_GUID_H__
-
-#define IDLE_LOOP_EVENT_GUID \
- { 0x3c8d294c, 0x5fc3, 0x4451, { 0xbb, 0x31, 0xc4, 0xc0, 0x32, 0x29, 0x5e, 0x6c } }
-
-extern EFI_GUID gIdleLoopEventGuid;
-
-#endif
+/** @file
+ GUID is the name of events used with CreateEventEx in order to be notified
+ when the DXE Core is idle.
+
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __IDLE_LOOP_EVENT_GUID_H__
+#define __IDLE_LOOP_EVENT_GUID_H__
+
+#define IDLE_LOOP_EVENT_GUID \
+ { 0x3c8d294c, 0x5fc3, 0x4451, { 0xbb, 0x31, 0xc4, 0xc0, 0x32, 0x29, 0x5e, 0x6c } }
+
+extern EFI_GUID gIdleLoopEventGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/LoadModuleAtFixedAddress.h b/MdeModulePkg/Include/Guid/LoadModuleAtFixedAddress.h
index bf1f47531d..a5193b86af 100644
--- a/MdeModulePkg/Include/Guid/LoadModuleAtFixedAddress.h
+++ b/MdeModulePkg/Include/Guid/LoadModuleAtFixedAddress.h
@@ -1,27 +1,27 @@
-/** @file
- This file defines a configuration Table Guid for Load module at fixed address.
-
- This configuration table is to hold the top address below which the Dxe runtime code and
- boot time code will be loaded and Tseg base. When this feature is enabled, Build tools will assigned
- module loading address relative to these two addresses.
-
-
-Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __LOAD_MODULE_AT_FIX_ADDRESS_GUID_H__
-#define __LOAD_MODULE_AT_FIX_ADDRESS_GUID_H__
-
-#define EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE_GUID \
- { 0x2CA88B53,0xD296,0x4080, { 0xA4,0xA5,0xCA,0xD9,0xBA,0xE2,0x4B,0x9} }
-
-extern EFI_GUID gLoadFixedAddressConfigurationTableGuid;
-
-typedef struct {
- EFI_PHYSICAL_ADDRESS DxeCodeTopAddress; ///< The top address below which the Dxe runtime code and below which the Dxe runtime/boot code and PEI code.
- EFI_PHYSICAL_ADDRESS SmramBase; ///< SMRAM base address. The build tool assigns an offset relative to the SMRAM base for a SMM driver.
-} EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE;
-
-#endif
+/** @file
+ This file defines a configuration Table Guid for Load module at fixed address.
+
+ This configuration table is to hold the top address below which the Dxe runtime code and
+ boot time code will be loaded and Tseg base. When this feature is enabled, Build tools will assigned
+ module loading address relative to these two addresses.
+
+
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __LOAD_MODULE_AT_FIX_ADDRESS_GUID_H__
+#define __LOAD_MODULE_AT_FIX_ADDRESS_GUID_H__
+
+#define EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE_GUID \
+ { 0x2CA88B53,0xD296,0x4080, { 0xA4,0xA5,0xCA,0xD9,0xBA,0xE2,0x4B,0x9} }
+
+extern EFI_GUID gLoadFixedAddressConfigurationTableGuid;
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS DxeCodeTopAddress; ///< The top address below which the Dxe runtime code and below which the Dxe runtime/boot code and PEI code.
+ EFI_PHYSICAL_ADDRESS SmramBase; ///< SMRAM base address. The build tool assigns an offset relative to the SMRAM base for a SMM driver.
+} EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/LzmaDecompress.h b/MdeModulePkg/Include/Guid/LzmaDecompress.h
index b2b6d61c94..b292e25ceb 100644
--- a/MdeModulePkg/Include/Guid/LzmaDecompress.h
+++ b/MdeModulePkg/Include/Guid/LzmaDecompress.h
@@ -1,29 +1,29 @@
-/** @file
- Lzma Custom decompress algorithm Guid definition.
-
-Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __LZMA_DECOMPRESS_GUID_H__
-#define __LZMA_DECOMPRESS_GUID_H__
-
-///
-/// The Global ID used to identify a section of an FFS file of type
-/// EFI_SECTION_GUID_DEFINED, whose contents have been compressed using LZMA.
-///
-#define LZMA_CUSTOM_DECOMPRESS_GUID \
- { 0xEE4E5898, 0x3914, 0x4259, { 0x9D, 0x6E, 0xDC, 0x7B, 0xD7, 0x94, 0x03, 0xCF } }
-
-///
-/// The Global ID used to identify a section of an FFS file of type
-/// EFI_SECTION_GUID_DEFINED, whose contents have been compressed using LZMA with X86 code Converter.
-///
-#define LZMAF86_CUSTOM_DECOMPRESS_GUID \
- { 0xD42AE6BD, 0x1352, 0x4bfb, { 0x90, 0x9A, 0xCA, 0x72, 0xA6, 0xEA, 0xE8, 0x89 } }
-
-extern GUID gLzmaCustomDecompressGuid;
-extern GUID gLzmaF86CustomDecompressGuid;
-
-#endif
+/** @file
+ Lzma Custom decompress algorithm Guid definition.
+
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __LZMA_DECOMPRESS_GUID_H__
+#define __LZMA_DECOMPRESS_GUID_H__
+
+///
+/// The Global ID used to identify a section of an FFS file of type
+/// EFI_SECTION_GUID_DEFINED, whose contents have been compressed using LZMA.
+///
+#define LZMA_CUSTOM_DECOMPRESS_GUID \
+ { 0xEE4E5898, 0x3914, 0x4259, { 0x9D, 0x6E, 0xDC, 0x7B, 0xD7, 0x94, 0x03, 0xCF } }
+
+///
+/// The Global ID used to identify a section of an FFS file of type
+/// EFI_SECTION_GUID_DEFINED, whose contents have been compressed using LZMA with X86 code Converter.
+///
+#define LZMAF86_CUSTOM_DECOMPRESS_GUID \
+ { 0xD42AE6BD, 0x1352, 0x4bfb, { 0x90, 0x9A, 0xCA, 0x72, 0xA6, 0xEA, 0xE8, 0x89 } }
+
+extern GUID gLzmaCustomDecompressGuid;
+extern GUID gLzmaF86CustomDecompressGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/MdeModuleHii.h b/MdeModulePkg/Include/Guid/MdeModuleHii.h
index 798bcbaaae..7165525d57 100644
--- a/MdeModulePkg/Include/Guid/MdeModuleHii.h
+++ b/MdeModulePkg/Include/Guid/MdeModuleHii.h
@@ -1,231 +1,231 @@
-/** @file
- EDKII extented HII IFR guid opcodes.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __MDEMODULE_HII_H__
-#define __MDEMODULE_HII_H__
-
-#define NARROW_CHAR 0xFFF0
-#define WIDE_CHAR 0xFFF1
-#define NON_BREAKING_CHAR 0xFFF2
-
-///
-/// State defined for password statemachine .
-///
-#define BROWSER_STATE_VALIDATE_PASSWORD 0
-#define BROWSER_STATE_SET_PASSWORD 1
-
-///
-/// GUIDed opcodes defined for EDKII implementation.
-///
-#define EFI_IFR_TIANO_GUID \
- { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
-
-#pragma pack(1)
-
-///
-/// EDKII implementation extension opcodes, new extension can be added here later.
-///
-#define EFI_IFR_EXTEND_OP_LABEL 0x0
-#define EFI_IFR_EXTEND_OP_BANNER 0x1
-#define EFI_IFR_EXTEND_OP_TIMEOUT 0x2
-#define EFI_IFR_EXTEND_OP_CLASS 0x3
-#define EFI_IFR_EXTEND_OP_SUBCLASS 0x4
-
-///
-/// Label opcode.
-///
-typedef struct _EFI_IFR_GUID_LABEL {
- EFI_IFR_OP_HEADER Header;
- ///
- /// EFI_IFR_TIANO_GUID.
- ///
- EFI_GUID Guid;
- ///
- /// EFI_IFR_EXTEND_OP_LABEL.
- ///
- UINT8 ExtendOpCode;
- ///
- /// Label Number.
- ///
- UINT16 Number;
-} EFI_IFR_GUID_LABEL;
-
-#define EFI_IFR_BANNER_ALIGN_LEFT 0
-#define EFI_IFR_BANNER_ALIGN_CENTER 1
-#define EFI_IFR_BANNER_ALIGN_RIGHT 2
-
-///
-/// Banner opcode.
-///
-typedef struct _EFI_IFR_GUID_BANNER {
- EFI_IFR_OP_HEADER Header;
- ///
- /// EFI_IFR_TIANO_GUID.
- ///
- EFI_GUID Guid;
- ///
- /// EFI_IFR_EXTEND_OP_BANNER
- ///
- UINT8 ExtendOpCode;
- EFI_STRING_ID Title; ///< The string token for the banner title.
- UINT16 LineNumber; ///< 1-based line number.
- UINT8 Alignment; ///< left, center, or right-aligned.
-} EFI_IFR_GUID_BANNER;
-
-///
-/// Timeout opcode.
-///
-typedef struct _EFI_IFR_GUID_TIMEOUT {
- EFI_IFR_OP_HEADER Header;
- ///
- /// EFI_IFR_TIANO_GUID.
- ///
- EFI_GUID Guid;
- ///
- /// EFI_IFR_EXTEND_OP_TIMEOUT.
- ///
- UINT8 ExtendOpCode;
- UINT16 TimeOut; ///< TimeOut Value.
-} EFI_IFR_GUID_TIMEOUT;
-
-#define EFI_NON_DEVICE_CLASS 0x00
-#define EFI_DISK_DEVICE_CLASS 0x01
-#define EFI_VIDEO_DEVICE_CLASS 0x02
-#define EFI_NETWORK_DEVICE_CLASS 0x04
-#define EFI_INPUT_DEVICE_CLASS 0x08
-#define EFI_ON_BOARD_DEVICE_CLASS 0x10
-#define EFI_OTHER_DEVICE_CLASS 0x20
-
-///
-/// Device Class opcode.
-///
-typedef struct _EFI_IFR_GUID_CLASS {
- EFI_IFR_OP_HEADER Header;
- ///
- /// EFI_IFR_TIANO_GUID.
- ///
- EFI_GUID Guid;
- ///
- /// EFI_IFR_EXTEND_OP_CLASS.
- ///
- UINT8 ExtendOpCode;
- UINT16 Class; ///< Device Class from the above.
-} EFI_IFR_GUID_CLASS;
-
-#define EFI_SETUP_APPLICATION_SUBCLASS 0x00
-#define EFI_GENERAL_APPLICATION_SUBCLASS 0x01
-#define EFI_FRONT_PAGE_SUBCLASS 0x02
-#define EFI_SINGLE_USE_SUBCLASS 0x03
-
-///
-/// SubClass opcode
-///
-typedef struct _EFI_IFR_GUID_SUBCLASS {
- EFI_IFR_OP_HEADER Header;
- ///
- /// EFI_IFR_TIANO_GUID.
- ///
- EFI_GUID Guid;
- ///
- /// EFI_IFR_EXTEND_OP_SUBCLASS.
- ///
- UINT8 ExtendOpCode;
- UINT16 SubClass; ///< Sub Class type from the above.
-} EFI_IFR_GUID_SUBCLASS;
-
-///
-/// GUIDed opcodes support for framework vfr.
-///
-#define EFI_IFR_FRAMEWORK_GUID \
- { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
-
-///
-/// Two extended opcodes are added, and new extensions can be added here later.
-/// One is for framework OneOf question Option Key value;
-/// another is for framework vareqval.
-///
-#define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0
-#define EFI_IFR_EXTEND_OP_VAREQNAME 0x1
-
-///
-/// Store the framework vfr option key value.
-///
-typedef struct _EFI_IFR_GUID_OPTIONKEY {
- EFI_IFR_OP_HEADER Header;
- ///
- /// EFI_IFR_FRAMEWORK_GUID.
- ///
- EFI_GUID Guid;
- ///
- /// EFI_IFR_EXTEND_OP_OPTIONKEY.
- ///
- UINT8 ExtendOpCode;
- ///
- /// OneOf Questiond ID binded by OneOf Option.
- ///
- EFI_QUESTION_ID QuestionId;
- ///
- /// The OneOf Option Value.
- ///
- EFI_IFR_TYPE_VALUE OptionValue;
- ///
- /// The Framework OneOf Option Key Value.
- ///
- UINT16 KeyValue;
-} EFI_IFR_GUID_OPTIONKEY;
-
-///
-/// Store the framework vfr vareqval name number.
-///
-typedef struct _EFI_IFR_GUID_VAREQNAME {
- EFI_IFR_OP_HEADER Header;
- ///
- /// EFI_IFR_FRAMEWORK_GUID.
- ///
- EFI_GUID Guid;
- ///
- /// EFI_IFR_EXTEND_OP_VAREQNAME.
- ///
- UINT8 ExtendOpCode;
- ///
- /// Question ID of the Numeric Opcode created.
- ///
- EFI_QUESTION_ID QuestionId;
- ///
- /// For vareqval (0x100), NameId is 0x100.
- /// This value will convert to a Unicode String following this rule;
- /// sprintf(StringBuffer, "%d", NameId) .
- /// The the Unicode String will be used as a EFI Variable Name.
- ///
- UINT16 NameId;
-} EFI_IFR_GUID_VAREQNAME;
-
-///
-/// EDKII implementation extension GUID, used to indaicate there are bit fields in the varstore.
-///
-#define EDKII_IFR_BIT_VARSTORE_GUID \
- {0x82DDD68B, 0x9163, 0x4187, {0x9B, 0x27, 0x20, 0xA8, 0xFD, 0x60,0xA7, 0x1D}}
-
-///
-/// EDKII implementation extension flags, used to indaicate the disply style and bit width for bit filed storage.
-/// Two high bits for display style and the low six bits for bit width.
-///
-#define EDKII_IFR_DISPLAY_BIT 0xC0
-#define EDKII_IFR_DISPLAY_INT_DEC_BIT 0x00
-#define EDKII_IFR_DISPLAY_UINT_DEC_BIT 0x40
-#define EDKII_IFR_DISPLAY_UINT_HEX_BIT 0x80
-
-#define EDKII_IFR_NUMERIC_SIZE_BIT 0x3F
-
-#pragma pack()
-
-extern EFI_GUID gEfiIfrTianoGuid;
-extern EFI_GUID gEfiIfrFrameworkGuid;
-extern EFI_GUID gEdkiiIfrBitVarstoreGuid;
-
-#endif
+/** @file
+ EDKII extented HII IFR guid opcodes.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __MDEMODULE_HII_H__
+#define __MDEMODULE_HII_H__
+
+#define NARROW_CHAR 0xFFF0
+#define WIDE_CHAR 0xFFF1
+#define NON_BREAKING_CHAR 0xFFF2
+
+///
+/// State defined for password statemachine .
+///
+#define BROWSER_STATE_VALIDATE_PASSWORD 0
+#define BROWSER_STATE_SET_PASSWORD 1
+
+///
+/// GUIDed opcodes defined for EDKII implementation.
+///
+#define EFI_IFR_TIANO_GUID \
+ { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
+
+#pragma pack(1)
+
+///
+/// EDKII implementation extension opcodes, new extension can be added here later.
+///
+#define EFI_IFR_EXTEND_OP_LABEL 0x0
+#define EFI_IFR_EXTEND_OP_BANNER 0x1
+#define EFI_IFR_EXTEND_OP_TIMEOUT 0x2
+#define EFI_IFR_EXTEND_OP_CLASS 0x3
+#define EFI_IFR_EXTEND_OP_SUBCLASS 0x4
+
+///
+/// Label opcode.
+///
+typedef struct _EFI_IFR_GUID_LABEL {
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
+ EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_LABEL.
+ ///
+ UINT8 ExtendOpCode;
+ ///
+ /// Label Number.
+ ///
+ UINT16 Number;
+} EFI_IFR_GUID_LABEL;
+
+#define EFI_IFR_BANNER_ALIGN_LEFT 0
+#define EFI_IFR_BANNER_ALIGN_CENTER 1
+#define EFI_IFR_BANNER_ALIGN_RIGHT 2
+
+///
+/// Banner opcode.
+///
+typedef struct _EFI_IFR_GUID_BANNER {
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
+ EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_BANNER
+ ///
+ UINT8 ExtendOpCode;
+ EFI_STRING_ID Title; ///< The string token for the banner title.
+ UINT16 LineNumber; ///< 1-based line number.
+ UINT8 Alignment; ///< left, center, or right-aligned.
+} EFI_IFR_GUID_BANNER;
+
+///
+/// Timeout opcode.
+///
+typedef struct _EFI_IFR_GUID_TIMEOUT {
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
+ EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_TIMEOUT.
+ ///
+ UINT8 ExtendOpCode;
+ UINT16 TimeOut; ///< TimeOut Value.
+} EFI_IFR_GUID_TIMEOUT;
+
+#define EFI_NON_DEVICE_CLASS 0x00
+#define EFI_DISK_DEVICE_CLASS 0x01
+#define EFI_VIDEO_DEVICE_CLASS 0x02
+#define EFI_NETWORK_DEVICE_CLASS 0x04
+#define EFI_INPUT_DEVICE_CLASS 0x08
+#define EFI_ON_BOARD_DEVICE_CLASS 0x10
+#define EFI_OTHER_DEVICE_CLASS 0x20
+
+///
+/// Device Class opcode.
+///
+typedef struct _EFI_IFR_GUID_CLASS {
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
+ EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_CLASS.
+ ///
+ UINT8 ExtendOpCode;
+ UINT16 Class; ///< Device Class from the above.
+} EFI_IFR_GUID_CLASS;
+
+#define EFI_SETUP_APPLICATION_SUBCLASS 0x00
+#define EFI_GENERAL_APPLICATION_SUBCLASS 0x01
+#define EFI_FRONT_PAGE_SUBCLASS 0x02
+#define EFI_SINGLE_USE_SUBCLASS 0x03
+
+///
+/// SubClass opcode
+///
+typedef struct _EFI_IFR_GUID_SUBCLASS {
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
+ EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_SUBCLASS.
+ ///
+ UINT8 ExtendOpCode;
+ UINT16 SubClass; ///< Sub Class type from the above.
+} EFI_IFR_GUID_SUBCLASS;
+
+///
+/// GUIDed opcodes support for framework vfr.
+///
+#define EFI_IFR_FRAMEWORK_GUID \
+ { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
+
+///
+/// Two extended opcodes are added, and new extensions can be added here later.
+/// One is for framework OneOf question Option Key value;
+/// another is for framework vareqval.
+///
+#define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0
+#define EFI_IFR_EXTEND_OP_VAREQNAME 0x1
+
+///
+/// Store the framework vfr option key value.
+///
+typedef struct _EFI_IFR_GUID_OPTIONKEY {
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_FRAMEWORK_GUID.
+ ///
+ EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_OPTIONKEY.
+ ///
+ UINT8 ExtendOpCode;
+ ///
+ /// OneOf Questiond ID binded by OneOf Option.
+ ///
+ EFI_QUESTION_ID QuestionId;
+ ///
+ /// The OneOf Option Value.
+ ///
+ EFI_IFR_TYPE_VALUE OptionValue;
+ ///
+ /// The Framework OneOf Option Key Value.
+ ///
+ UINT16 KeyValue;
+} EFI_IFR_GUID_OPTIONKEY;
+
+///
+/// Store the framework vfr vareqval name number.
+///
+typedef struct _EFI_IFR_GUID_VAREQNAME {
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_FRAMEWORK_GUID.
+ ///
+ EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_VAREQNAME.
+ ///
+ UINT8 ExtendOpCode;
+ ///
+ /// Question ID of the Numeric Opcode created.
+ ///
+ EFI_QUESTION_ID QuestionId;
+ ///
+ /// For vareqval (0x100), NameId is 0x100.
+ /// This value will convert to a Unicode String following this rule;
+ /// sprintf(StringBuffer, "%d", NameId) .
+ /// The the Unicode String will be used as a EFI Variable Name.
+ ///
+ UINT16 NameId;
+} EFI_IFR_GUID_VAREQNAME;
+
+///
+/// EDKII implementation extension GUID, used to indaicate there are bit fields in the varstore.
+///
+#define EDKII_IFR_BIT_VARSTORE_GUID \
+ {0x82DDD68B, 0x9163, 0x4187, {0x9B, 0x27, 0x20, 0xA8, 0xFD, 0x60,0xA7, 0x1D}}
+
+///
+/// EDKII implementation extension flags, used to indaicate the disply style and bit width for bit filed storage.
+/// Two high bits for display style and the low six bits for bit width.
+///
+#define EDKII_IFR_DISPLAY_BIT 0xC0
+#define EDKII_IFR_DISPLAY_INT_DEC_BIT 0x00
+#define EDKII_IFR_DISPLAY_UINT_DEC_BIT 0x40
+#define EDKII_IFR_DISPLAY_UINT_HEX_BIT 0x80
+
+#define EDKII_IFR_NUMERIC_SIZE_BIT 0x3F
+
+#pragma pack()
+
+extern EFI_GUID gEfiIfrTianoGuid;
+extern EFI_GUID gEfiIfrFrameworkGuid;
+extern EFI_GUID gEdkiiIfrBitVarstoreGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/MdeModulePkgTokenSpace.h b/MdeModulePkg/Include/Guid/MdeModulePkgTokenSpace.h
index 210f42f0ae..8f251f55e0 100644
--- a/MdeModulePkg/Include/Guid/MdeModulePkgTokenSpace.h
+++ b/MdeModulePkg/Include/Guid/MdeModulePkgTokenSpace.h
@@ -1,19 +1,19 @@
-/** @file
- GUID for MdeModulePkg PCD Token Space.
-
-Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _MDEMODULEPKG_TOKEN_SPACE_GUID_H_
-#define _MDEMODULEPKG_TOKEN_SPACE_GUID_H_
-
-#define MDEMODULEPKG_TOKEN_SPACE_GUID \
- { \
- 0xA1AFF049, 0xFDEB, 0x442a, { 0xB3, 0x20, 0x13, 0xAB, 0x4C, 0xB7, 0x2B, 0xBC } \
- }
-
-extern EFI_GUID gEfiMdeModulePkgTokenSpaceGuid;
-
-#endif
+/** @file
+ GUID for MdeModulePkg PCD Token Space.
+
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _MDEMODULEPKG_TOKEN_SPACE_GUID_H_
+#define _MDEMODULEPKG_TOKEN_SPACE_GUID_H_
+
+#define MDEMODULEPKG_TOKEN_SPACE_GUID \
+ { \
+ 0xA1AFF049, 0xFDEB, 0x442a, { 0xB3, 0x20, 0x13, 0xAB, 0x4C, 0xB7, 0x2B, 0xBC } \
+ }
+
+extern EFI_GUID gEfiMdeModulePkgTokenSpaceGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/MemoryProfile.h b/MdeModulePkg/Include/Guid/MemoryProfile.h
index 8194b06330..846c2d7b42 100644
--- a/MdeModulePkg/Include/Guid/MemoryProfile.h
+++ b/MdeModulePkg/Include/Guid/MemoryProfile.h
@@ -1,466 +1,466 @@
-/** @file
- Memory profile data structure.
-
- Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _MEMORY_PROFILE_H_
-#define _MEMORY_PROFILE_H_
-
-#include <Pi/PiFirmwareFile.h>
-
-//
-// For BIOS MemoryType (0 ~ EfiMaxMemoryType - 1), it is recorded in UsageByType[MemoryType]. (Each valid entry has one entry)
-// For OS MemoryType (0x80000000 ~ 0xFFFFFFFF), it is recorded in UsageByType[EfiMaxMemoryType]. (All types are combined into one entry)
-// For OEM MemoryType (0x70000000 ~ 0x7FFFFFFF), it is recorded in UsageByType[EfiMaxMemoryType + 1]. (All types are combined into one entry)
-//
-
-typedef struct {
- UINT32 Signature;
- UINT16 Length;
- UINT16 Revision;
-} MEMORY_PROFILE_COMMON_HEADER;
-
-#define MEMORY_PROFILE_CONTEXT_SIGNATURE SIGNATURE_32 ('M','P','C','T')
-#define MEMORY_PROFILE_CONTEXT_REVISION 0x0002
-
-typedef struct {
- MEMORY_PROFILE_COMMON_HEADER Header;
- UINT64 CurrentTotalUsage;
- UINT64 PeakTotalUsage;
- UINT64 CurrentTotalUsageByType[EfiMaxMemoryType + 2];
- UINT64 PeakTotalUsageByType[EfiMaxMemoryType + 2];
- UINT64 TotalImageSize;
- UINT32 ImageCount;
- UINT32 SequenceCount;
-} MEMORY_PROFILE_CONTEXT;
-
-#define MEMORY_PROFILE_DRIVER_INFO_SIGNATURE SIGNATURE_32 ('M','P','D','I')
-#define MEMORY_PROFILE_DRIVER_INFO_REVISION 0x0003
-
-typedef struct {
- MEMORY_PROFILE_COMMON_HEADER Header;
- EFI_GUID FileName;
- PHYSICAL_ADDRESS ImageBase;
- UINT64 ImageSize;
- PHYSICAL_ADDRESS EntryPoint;
- UINT16 ImageSubsystem;
- EFI_FV_FILETYPE FileType;
- UINT8 Reserved[1];
- UINT32 AllocRecordCount;
- UINT64 CurrentUsage;
- UINT64 PeakUsage;
- UINT64 CurrentUsageByType[EfiMaxMemoryType + 2];
- UINT64 PeakUsageByType[EfiMaxMemoryType + 2];
- UINT16 PdbStringOffset;
- UINT8 Reserved2[6];
- // CHAR8 PdbString[];
-} MEMORY_PROFILE_DRIVER_INFO;
-
-typedef enum {
- MemoryProfileActionAllocatePages = 1,
- MemoryProfileActionFreePages = 2,
- MemoryProfileActionAllocatePool = 3,
- MemoryProfileActionFreePool = 4,
-} MEMORY_PROFILE_ACTION;
-
-//
-// Below is the detailed MEMORY_PROFILE_ACTION definition.
-//
-// 31 15 9 8 8 7 7 6 6 5-4 3 - 0
-// +----------------------------------------------+
-// |User | |Lib| |Re|Copy|Zero|Align|Type|Basic|
-// +----------------------------------------------+
-//
-
-//
-// Basic Action
-// 1 : AllocatePages
-// 2 : FreePages
-// 3 : AllocatePool
-// 4 : FreePool
-//
-#define MEMORY_PROFILE_ACTION_BASIC_MASK 0xF
-
-//
-// Extension
-//
-#define MEMORY_PROFILE_ACTION_EXTENSION_MASK 0xFFF0
-#define MEMORY_PROFILE_ACTION_EXTENSION_LIB_MASK 0x8000
-#define MEMORY_PROFILE_ACTION_EXTENSION_REALLOC_MASK 0x0200
-#define MEMORY_PROFILE_ACTION_EXTENSION_COPY_MASK 0x0100
-#define MEMORY_PROFILE_ACTION_EXTENSION_ZERO_MASK 0x0080
-#define MEMORY_PROFILE_ACTION_EXTENSION_ALIGN_MASK 0x0040
-#define MEMORY_PROFILE_ACTION_EXTENSION_MEM_TYPE_MASK 0x0030
-#define MEMORY_PROFILE_ACTION_EXTENSION_MEM_TYPE_BASIC 0x0000
-#define MEMORY_PROFILE_ACTION_EXTENSION_MEM_TYPE_RUNTIME 0x0010
-#define MEMORY_PROFILE_ACTION_EXTENSION_MEM_TYPE_RESERVED 0x0020
-
-//
-// Extension (used by memory allocation lib)
-//
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_PAGES 0x8001
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RUNTIME_PAGES 0x8011
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RESERVED_PAGES 0x8021
-#define MEMORY_PROFILE_ACTION_LIB_FREE_PAGES 0x8002
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_ALIGNED_PAGES 0x8041
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_ALIGNED_RUNTIME_PAGES 0x8051
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_ALIGNED_RESERVED_PAGES 0x8061
-#define MEMORY_PROFILE_ACTION_LIB_FREE_ALIGNED_PAGES 0x8042
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_POOL 0x8003
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RUNTIME_POOL 0x8013
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RESERVED_POOL 0x8023
-#define MEMORY_PROFILE_ACTION_LIB_FREE_POOL 0x8004
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_ZERO_POOL 0x8083
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RUNTIME_ZERO_POOL 0x8093
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RESERVED_ZERO_POOL 0x80a3
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_COPY_POOL 0x8103
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RUNTIME_COPY_POOL 0x8113
-#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RESERVED_COPY_POOL 0x8123
-#define MEMORY_PROFILE_ACTION_LIB_REALLOCATE_POOL 0x8203
-#define MEMORY_PROFILE_ACTION_LIB_REALLOCATE_RUNTIME_POOL 0x8213
-#define MEMORY_PROFILE_ACTION_LIB_REALLOCATE_RESERVED_POOL 0x8223
-
-//
-// User defined: 0x80000000~0xFFFFFFFF
-//
-// NOTE: User defined action MUST OR the basic action,
-// so that core can know the action is allocate or free,
-// and the type is pages (can be freed partially)
-// or pool (cannot be freed partially).
-//
-#define MEMORY_PROFILE_ACTION_USER_DEFINED_MASK 0x80000000
-
-#define MEMORY_PROFILE_ALLOC_INFO_SIGNATURE SIGNATURE_32 ('M','P','A','I')
-#define MEMORY_PROFILE_ALLOC_INFO_REVISION 0x0002
-
-typedef struct {
- MEMORY_PROFILE_COMMON_HEADER Header;
- PHYSICAL_ADDRESS CallerAddress;
- UINT32 SequenceId;
- UINT8 Reserved[2];
- UINT16 ActionStringOffset;
- MEMORY_PROFILE_ACTION Action;
- EFI_MEMORY_TYPE MemoryType;
- PHYSICAL_ADDRESS Buffer;
- UINT64 Size;
- // CHAR8 ActionString[];
-} MEMORY_PROFILE_ALLOC_INFO;
-
-#define MEMORY_PROFILE_DESCRIPTOR_SIGNATURE SIGNATURE_32 ('M','P','D','R')
-#define MEMORY_PROFILE_DESCRIPTOR_REVISION 0x0001
-
-typedef struct {
- MEMORY_PROFILE_COMMON_HEADER Header;
- PHYSICAL_ADDRESS Address;
- UINT64 Size;
-} MEMORY_PROFILE_DESCRIPTOR;
-
-#define MEMORY_PROFILE_FREE_MEMORY_SIGNATURE SIGNATURE_32 ('M','P','R','M')
-#define MEMORY_PROFILE_FREE_MEMORY_REVISION 0x0001
-
-typedef struct {
- MEMORY_PROFILE_COMMON_HEADER Header;
- UINT64 TotalFreeMemoryPages;
- UINT32 FreeMemoryEntryCount;
- UINT8 Reserved[4];
- // MEMORY_PROFILE_DESCRIPTOR MemoryDescriptor[FreeMemoryEntryCount];
-} MEMORY_PROFILE_FREE_MEMORY;
-
-#define MEMORY_PROFILE_MEMORY_RANGE_SIGNATURE SIGNATURE_32 ('M','P','M','R')
-#define MEMORY_PROFILE_MEMORY_RANGE_REVISION 0x0001
-
-typedef struct {
- MEMORY_PROFILE_COMMON_HEADER Header;
- UINT32 MemoryRangeCount;
- UINT8 Reserved[4];
- // MEMORY_PROFILE_DESCRIPTOR MemoryDescriptor[MemoryRangeCount];
-} MEMORY_PROFILE_MEMORY_RANGE;
-
-//
-// UEFI memory profile layout:
-// +--------------------------------+
-// | CONTEXT |
-// +--------------------------------+
-// | DRIVER_INFO(1) |
-// +--------------------------------+
-// | ALLOC_INFO(1, 1) |
-// +--------------------------------+
-// | ALLOC_INFO(1, m1) |
-// +--------------------------------+
-// | DRIVER_INFO(n) |
-// +--------------------------------+
-// | ALLOC_INFO(n, 1) |
-// +--------------------------------+
-// | ALLOC_INFO(n, mn) |
-// +--------------------------------+
-//
-
-typedef struct _EDKII_MEMORY_PROFILE_PROTOCOL EDKII_MEMORY_PROFILE_PROTOCOL;
-
-/**
- Get memory profile data.
-
- @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
- @param[in, out] ProfileSize On entry, points to the size in bytes of the ProfileBuffer.
- On return, points to the size of the data returned in ProfileBuffer.
- @param[out] ProfileBuffer Profile buffer.
-
- @return EFI_SUCCESS Get the memory profile data successfully.
- @return EFI_UNSUPPORTED Memory profile is unsupported.
- @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data.
- ProfileSize is updated with the size required.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EDKII_MEMORY_PROFILE_GET_DATA)(
- IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
- IN OUT UINT64 *ProfileSize,
- OUT VOID *ProfileBuffer
- );
-
-/**
- Register image to memory profile.
-
- @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
- @param[in] FilePath File path of the image.
- @param[in] ImageBase Image base address.
- @param[in] ImageSize Image size.
- @param[in] FileType File type of the image.
-
- @return EFI_SUCCESS Register successfully.
- @return EFI_UNSUPPORTED Memory profile is unsupported,
- or memory profile for the image is not required.
- @return EFI_OUT_OF_RESOURCES No enough resource for this register.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EDKII_MEMORY_PROFILE_REGISTER_IMAGE)(
- IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
- IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
- IN PHYSICAL_ADDRESS ImageBase,
- IN UINT64 ImageSize,
- IN EFI_FV_FILETYPE FileType
- );
-
-/**
- Unregister image from memory profile.
-
- @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
- @param[in] FilePath File path of the image.
- @param[in] ImageBase Image base address.
- @param[in] ImageSize Image size.
-
- @return EFI_SUCCESS Unregister successfully.
- @return EFI_UNSUPPORTED Memory profile is unsupported,
- or memory profile for the image is not required.
- @return EFI_NOT_FOUND The image is not found.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EDKII_MEMORY_PROFILE_UNREGISTER_IMAGE)(
- IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
- IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
- IN PHYSICAL_ADDRESS ImageBase,
- IN UINT64 ImageSize
- );
-
-#define MEMORY_PROFILE_RECORDING_ENABLE TRUE
-#define MEMORY_PROFILE_RECORDING_DISABLE FALSE
-
-/**
- Get memory profile recording state.
-
- @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
- @param[out] RecordingState Recording state.
-
- @return EFI_SUCCESS Memory profile recording state is returned.
- @return EFI_UNSUPPORTED Memory profile is unsupported.
- @return EFI_INVALID_PARAMETER RecordingState is NULL.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EDKII_MEMORY_PROFILE_GET_RECORDING_STATE)(
- IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
- OUT BOOLEAN *RecordingState
- );
-
-/**
- Set memory profile recording state.
-
- @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
- @param[in] RecordingState Recording state.
-
- @return EFI_SUCCESS Set memory profile recording state successfully.
- @return EFI_UNSUPPORTED Memory profile is unsupported.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EDKII_MEMORY_PROFILE_SET_RECORDING_STATE)(
- IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
- IN BOOLEAN RecordingState
- );
-
-/**
- Record memory profile of multilevel caller.
-
- @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
- @param[in] CallerAddress Address of caller.
- @param[in] Action Memory profile action.
- @param[in] MemoryType Memory type.
- EfiMaxMemoryType means the MemoryType is unknown.
- @param[in] Buffer Buffer address.
- @param[in] Size Buffer size.
- @param[in] ActionString String for memory profile action.
- Only needed for user defined allocate action.
-
- @return EFI_SUCCESS Memory profile is updated.
- @return EFI_UNSUPPORTED Memory profile is unsupported,
- or memory profile for the image is not required,
- or memory profile for the memory type is not required.
- @return EFI_ACCESS_DENIED It is during memory profile data getting.
- @return EFI_ABORTED Memory profile recording is not enabled.
- @return EFI_OUT_OF_RESOURCES No enough resource to update memory profile for allocate action.
- @return EFI_NOT_FOUND No matched allocate info found for free action.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EDKII_MEMORY_PROFILE_RECORD)(
- IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
- IN PHYSICAL_ADDRESS CallerAddress,
- IN MEMORY_PROFILE_ACTION Action,
- IN EFI_MEMORY_TYPE MemoryType,
- IN VOID *Buffer,
- IN UINTN Size,
- IN CHAR8 *ActionString OPTIONAL
- );
-
-struct _EDKII_MEMORY_PROFILE_PROTOCOL {
- EDKII_MEMORY_PROFILE_GET_DATA GetData;
- EDKII_MEMORY_PROFILE_REGISTER_IMAGE RegisterImage;
- EDKII_MEMORY_PROFILE_UNREGISTER_IMAGE UnregisterImage;
- EDKII_MEMORY_PROFILE_GET_RECORDING_STATE GetRecordingState;
- EDKII_MEMORY_PROFILE_SET_RECORDING_STATE SetRecordingState;
- EDKII_MEMORY_PROFILE_RECORD Record;
-};
-
-//
-// SMRAM profile layout:
-// +--------------------------------+
-// | CONTEXT |
-// +--------------------------------+
-// | DRIVER_INFO(1) |
-// +--------------------------------+
-// | ALLOC_INFO(1, 1) |
-// +--------------------------------+
-// | ALLOC_INFO(1, m1) |
-// +--------------------------------+
-// | DRIVER_INFO(n) |
-// +--------------------------------+
-// | ALLOC_INFO(n, 1) |
-// +--------------------------------+
-// | ALLOC_INFO(n, mn) |
-// +--------------------------------+
-// | FREE_MEMORY |
-// +--------------------------------+
-// | FREE MEMORY DESCRIPTOR(1) |
-// +--------------------------------+
-// | FREE MEMORY DESCRIPTOR(p) |
-// +--------------------------------+
-// | MEMORY_RANGE |
-// +--------------------------------+
-// | MEMORY RANGE DESCRIPTOR(1) |
-// +--------------------------------+
-// | MEMORY RANGE DESCRIPTOR(q) |
-// +--------------------------------+
-//
-
-//
-// SMRAM profile command
-//
-#define SMRAM_PROFILE_COMMAND_GET_PROFILE_INFO 0x1
-#define SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA 0x2
-//
-// Below 2 commands have been deprecated. They may not be re-used.
-//
-#define SMRAM_PROFILE_COMMAND_DEPRECATED1 0x3
-#define SMRAM_PROFILE_COMMAND_DEPRECATED2 0x4
-
-#define SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET 0x5
-#define SMRAM_PROFILE_COMMAND_GET_RECORDING_STATE 0x6
-#define SMRAM_PROFILE_COMMAND_SET_RECORDING_STATE 0x7
-
-typedef struct {
- UINT32 Command;
- UINT32 DataLength;
- UINT64 ReturnStatus;
-} SMRAM_PROFILE_PARAMETER_HEADER;
-
-typedef struct {
- SMRAM_PROFILE_PARAMETER_HEADER Header;
- UINT64 ProfileSize;
-} SMRAM_PROFILE_PARAMETER_GET_PROFILE_INFO;
-
-typedef struct {
- SMRAM_PROFILE_PARAMETER_HEADER Header;
- UINT64 ProfileSize;
- PHYSICAL_ADDRESS ProfileBuffer;
-} SMRAM_PROFILE_PARAMETER_GET_PROFILE_DATA;
-
-typedef struct {
- SMRAM_PROFILE_PARAMETER_HEADER Header;
- //
- // On input, profile buffer size.
- // On output, actual profile data size copied.
- //
- UINT64 ProfileSize;
- PHYSICAL_ADDRESS ProfileBuffer;
- //
- // On input, profile buffer offset to copy.
- // On output, next time profile buffer offset to copy.
- //
- UINT64 ProfileOffset;
-} SMRAM_PROFILE_PARAMETER_GET_PROFILE_DATA_BY_OFFSET;
-
-typedef struct {
- SMRAM_PROFILE_PARAMETER_HEADER Header;
- BOOLEAN RecordingState;
-} SMRAM_PROFILE_PARAMETER_RECORDING_STATE;
-
-typedef struct {
- SMRAM_PROFILE_PARAMETER_HEADER Header;
- EFI_GUID FileName;
- PHYSICAL_ADDRESS ImageBuffer;
- UINT64 NumberOfPage;
-} SMRAM_PROFILE_PARAMETER_REGISTER_IMAGE;
-
-typedef struct {
- SMRAM_PROFILE_PARAMETER_HEADER Header;
- EFI_GUID FileName;
- PHYSICAL_ADDRESS ImageBuffer;
- UINT64 NumberOfPage;
-} SMRAM_PROFILE_PARAMETER_UNREGISTER_IMAGE;
-
-#define EDKII_MEMORY_PROFILE_GUID {\
- 0x821c9a09, 0x541a, 0x40f6, { 0x9f, 0x43, 0xa, 0xd1, 0x93, 0xa1, 0x2c, 0xfe } \
-}
-
-extern EFI_GUID gEdkiiMemoryProfileGuid;
-
-typedef EDKII_MEMORY_PROFILE_PROTOCOL EDKII_SMM_MEMORY_PROFILE_PROTOCOL;
-
-#define EDKII_SMM_MEMORY_PROFILE_GUID {\
- 0xe22bbcca, 0x516a, 0x46a8, { 0x80, 0xe2, 0x67, 0x45, 0xe8, 0x36, 0x93, 0xbd } \
-}
-
-extern EFI_GUID gEdkiiSmmMemoryProfileGuid;
-
-#endif
+/** @file
+ Memory profile data structure.
+
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _MEMORY_PROFILE_H_
+#define _MEMORY_PROFILE_H_
+
+#include <Pi/PiFirmwareFile.h>
+
+//
+// For BIOS MemoryType (0 ~ EfiMaxMemoryType - 1), it is recorded in UsageByType[MemoryType]. (Each valid entry has one entry)
+// For OS MemoryType (0x80000000 ~ 0xFFFFFFFF), it is recorded in UsageByType[EfiMaxMemoryType]. (All types are combined into one entry)
+// For OEM MemoryType (0x70000000 ~ 0x7FFFFFFF), it is recorded in UsageByType[EfiMaxMemoryType + 1]. (All types are combined into one entry)
+//
+
+typedef struct {
+ UINT32 Signature;
+ UINT16 Length;
+ UINT16 Revision;
+} MEMORY_PROFILE_COMMON_HEADER;
+
+#define MEMORY_PROFILE_CONTEXT_SIGNATURE SIGNATURE_32 ('M','P','C','T')
+#define MEMORY_PROFILE_CONTEXT_REVISION 0x0002
+
+typedef struct {
+ MEMORY_PROFILE_COMMON_HEADER Header;
+ UINT64 CurrentTotalUsage;
+ UINT64 PeakTotalUsage;
+ UINT64 CurrentTotalUsageByType[EfiMaxMemoryType + 2];
+ UINT64 PeakTotalUsageByType[EfiMaxMemoryType + 2];
+ UINT64 TotalImageSize;
+ UINT32 ImageCount;
+ UINT32 SequenceCount;
+} MEMORY_PROFILE_CONTEXT;
+
+#define MEMORY_PROFILE_DRIVER_INFO_SIGNATURE SIGNATURE_32 ('M','P','D','I')
+#define MEMORY_PROFILE_DRIVER_INFO_REVISION 0x0003
+
+typedef struct {
+ MEMORY_PROFILE_COMMON_HEADER Header;
+ EFI_GUID FileName;
+ PHYSICAL_ADDRESS ImageBase;
+ UINT64 ImageSize;
+ PHYSICAL_ADDRESS EntryPoint;
+ UINT16 ImageSubsystem;
+ EFI_FV_FILETYPE FileType;
+ UINT8 Reserved[1];
+ UINT32 AllocRecordCount;
+ UINT64 CurrentUsage;
+ UINT64 PeakUsage;
+ UINT64 CurrentUsageByType[EfiMaxMemoryType + 2];
+ UINT64 PeakUsageByType[EfiMaxMemoryType + 2];
+ UINT16 PdbStringOffset;
+ UINT8 Reserved2[6];
+ // CHAR8 PdbString[];
+} MEMORY_PROFILE_DRIVER_INFO;
+
+typedef enum {
+ MemoryProfileActionAllocatePages = 1,
+ MemoryProfileActionFreePages = 2,
+ MemoryProfileActionAllocatePool = 3,
+ MemoryProfileActionFreePool = 4,
+} MEMORY_PROFILE_ACTION;
+
+//
+// Below is the detailed MEMORY_PROFILE_ACTION definition.
+//
+// 31 15 9 8 8 7 7 6 6 5-4 3 - 0
+// +----------------------------------------------+
+// |User | |Lib| |Re|Copy|Zero|Align|Type|Basic|
+// +----------------------------------------------+
+//
+
+//
+// Basic Action
+// 1 : AllocatePages
+// 2 : FreePages
+// 3 : AllocatePool
+// 4 : FreePool
+//
+#define MEMORY_PROFILE_ACTION_BASIC_MASK 0xF
+
+//
+// Extension
+//
+#define MEMORY_PROFILE_ACTION_EXTENSION_MASK 0xFFF0
+#define MEMORY_PROFILE_ACTION_EXTENSION_LIB_MASK 0x8000
+#define MEMORY_PROFILE_ACTION_EXTENSION_REALLOC_MASK 0x0200
+#define MEMORY_PROFILE_ACTION_EXTENSION_COPY_MASK 0x0100
+#define MEMORY_PROFILE_ACTION_EXTENSION_ZERO_MASK 0x0080
+#define MEMORY_PROFILE_ACTION_EXTENSION_ALIGN_MASK 0x0040
+#define MEMORY_PROFILE_ACTION_EXTENSION_MEM_TYPE_MASK 0x0030
+#define MEMORY_PROFILE_ACTION_EXTENSION_MEM_TYPE_BASIC 0x0000
+#define MEMORY_PROFILE_ACTION_EXTENSION_MEM_TYPE_RUNTIME 0x0010
+#define MEMORY_PROFILE_ACTION_EXTENSION_MEM_TYPE_RESERVED 0x0020
+
+//
+// Extension (used by memory allocation lib)
+//
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_PAGES 0x8001
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RUNTIME_PAGES 0x8011
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RESERVED_PAGES 0x8021
+#define MEMORY_PROFILE_ACTION_LIB_FREE_PAGES 0x8002
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_ALIGNED_PAGES 0x8041
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_ALIGNED_RUNTIME_PAGES 0x8051
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_ALIGNED_RESERVED_PAGES 0x8061
+#define MEMORY_PROFILE_ACTION_LIB_FREE_ALIGNED_PAGES 0x8042
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_POOL 0x8003
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RUNTIME_POOL 0x8013
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RESERVED_POOL 0x8023
+#define MEMORY_PROFILE_ACTION_LIB_FREE_POOL 0x8004
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_ZERO_POOL 0x8083
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RUNTIME_ZERO_POOL 0x8093
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RESERVED_ZERO_POOL 0x80a3
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_COPY_POOL 0x8103
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RUNTIME_COPY_POOL 0x8113
+#define MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RESERVED_COPY_POOL 0x8123
+#define MEMORY_PROFILE_ACTION_LIB_REALLOCATE_POOL 0x8203
+#define MEMORY_PROFILE_ACTION_LIB_REALLOCATE_RUNTIME_POOL 0x8213
+#define MEMORY_PROFILE_ACTION_LIB_REALLOCATE_RESERVED_POOL 0x8223
+
+//
+// User defined: 0x80000000~0xFFFFFFFF
+//
+// NOTE: User defined action MUST OR the basic action,
+// so that core can know the action is allocate or free,
+// and the type is pages (can be freed partially)
+// or pool (cannot be freed partially).
+//
+#define MEMORY_PROFILE_ACTION_USER_DEFINED_MASK 0x80000000
+
+#define MEMORY_PROFILE_ALLOC_INFO_SIGNATURE SIGNATURE_32 ('M','P','A','I')
+#define MEMORY_PROFILE_ALLOC_INFO_REVISION 0x0002
+
+typedef struct {
+ MEMORY_PROFILE_COMMON_HEADER Header;
+ PHYSICAL_ADDRESS CallerAddress;
+ UINT32 SequenceId;
+ UINT8 Reserved[2];
+ UINT16 ActionStringOffset;
+ MEMORY_PROFILE_ACTION Action;
+ EFI_MEMORY_TYPE MemoryType;
+ PHYSICAL_ADDRESS Buffer;
+ UINT64 Size;
+ // CHAR8 ActionString[];
+} MEMORY_PROFILE_ALLOC_INFO;
+
+#define MEMORY_PROFILE_DESCRIPTOR_SIGNATURE SIGNATURE_32 ('M','P','D','R')
+#define MEMORY_PROFILE_DESCRIPTOR_REVISION 0x0001
+
+typedef struct {
+ MEMORY_PROFILE_COMMON_HEADER Header;
+ PHYSICAL_ADDRESS Address;
+ UINT64 Size;
+} MEMORY_PROFILE_DESCRIPTOR;
+
+#define MEMORY_PROFILE_FREE_MEMORY_SIGNATURE SIGNATURE_32 ('M','P','R','M')
+#define MEMORY_PROFILE_FREE_MEMORY_REVISION 0x0001
+
+typedef struct {
+ MEMORY_PROFILE_COMMON_HEADER Header;
+ UINT64 TotalFreeMemoryPages;
+ UINT32 FreeMemoryEntryCount;
+ UINT8 Reserved[4];
+ // MEMORY_PROFILE_DESCRIPTOR MemoryDescriptor[FreeMemoryEntryCount];
+} MEMORY_PROFILE_FREE_MEMORY;
+
+#define MEMORY_PROFILE_MEMORY_RANGE_SIGNATURE SIGNATURE_32 ('M','P','M','R')
+#define MEMORY_PROFILE_MEMORY_RANGE_REVISION 0x0001
+
+typedef struct {
+ MEMORY_PROFILE_COMMON_HEADER Header;
+ UINT32 MemoryRangeCount;
+ UINT8 Reserved[4];
+ // MEMORY_PROFILE_DESCRIPTOR MemoryDescriptor[MemoryRangeCount];
+} MEMORY_PROFILE_MEMORY_RANGE;
+
+//
+// UEFI memory profile layout:
+// +--------------------------------+
+// | CONTEXT |
+// +--------------------------------+
+// | DRIVER_INFO(1) |
+// +--------------------------------+
+// | ALLOC_INFO(1, 1) |
+// +--------------------------------+
+// | ALLOC_INFO(1, m1) |
+// +--------------------------------+
+// | DRIVER_INFO(n) |
+// +--------------------------------+
+// | ALLOC_INFO(n, 1) |
+// +--------------------------------+
+// | ALLOC_INFO(n, mn) |
+// +--------------------------------+
+//
+
+typedef struct _EDKII_MEMORY_PROFILE_PROTOCOL EDKII_MEMORY_PROFILE_PROTOCOL;
+
+/**
+ Get memory profile data.
+
+ @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
+ @param[in, out] ProfileSize On entry, points to the size in bytes of the ProfileBuffer.
+ On return, points to the size of the data returned in ProfileBuffer.
+ @param[out] ProfileBuffer Profile buffer.
+
+ @return EFI_SUCCESS Get the memory profile data successfully.
+ @return EFI_UNSUPPORTED Memory profile is unsupported.
+ @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data.
+ ProfileSize is updated with the size required.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_MEMORY_PROFILE_GET_DATA)(
+ IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
+ IN OUT UINT64 *ProfileSize,
+ OUT VOID *ProfileBuffer
+ );
+
+/**
+ Register image to memory profile.
+
+ @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
+ @param[in] FilePath File path of the image.
+ @param[in] ImageBase Image base address.
+ @param[in] ImageSize Image size.
+ @param[in] FileType File type of the image.
+
+ @return EFI_SUCCESS Register successfully.
+ @return EFI_UNSUPPORTED Memory profile is unsupported,
+ or memory profile for the image is not required.
+ @return EFI_OUT_OF_RESOURCES No enough resource for this register.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_MEMORY_PROFILE_REGISTER_IMAGE)(
+ IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
+ IN PHYSICAL_ADDRESS ImageBase,
+ IN UINT64 ImageSize,
+ IN EFI_FV_FILETYPE FileType
+ );
+
+/**
+ Unregister image from memory profile.
+
+ @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
+ @param[in] FilePath File path of the image.
+ @param[in] ImageBase Image base address.
+ @param[in] ImageSize Image size.
+
+ @return EFI_SUCCESS Unregister successfully.
+ @return EFI_UNSUPPORTED Memory profile is unsupported,
+ or memory profile for the image is not required.
+ @return EFI_NOT_FOUND The image is not found.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_MEMORY_PROFILE_UNREGISTER_IMAGE)(
+ IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
+ IN PHYSICAL_ADDRESS ImageBase,
+ IN UINT64 ImageSize
+ );
+
+#define MEMORY_PROFILE_RECORDING_ENABLE TRUE
+#define MEMORY_PROFILE_RECORDING_DISABLE FALSE
+
+/**
+ Get memory profile recording state.
+
+ @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
+ @param[out] RecordingState Recording state.
+
+ @return EFI_SUCCESS Memory profile recording state is returned.
+ @return EFI_UNSUPPORTED Memory profile is unsupported.
+ @return EFI_INVALID_PARAMETER RecordingState is NULL.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_MEMORY_PROFILE_GET_RECORDING_STATE)(
+ IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
+ OUT BOOLEAN *RecordingState
+ );
+
+/**
+ Set memory profile recording state.
+
+ @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
+ @param[in] RecordingState Recording state.
+
+ @return EFI_SUCCESS Set memory profile recording state successfully.
+ @return EFI_UNSUPPORTED Memory profile is unsupported.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_MEMORY_PROFILE_SET_RECORDING_STATE)(
+ IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
+ IN BOOLEAN RecordingState
+ );
+
+/**
+ Record memory profile of multilevel caller.
+
+ @param[in] This The EDKII_MEMORY_PROFILE_PROTOCOL instance.
+ @param[in] CallerAddress Address of caller.
+ @param[in] Action Memory profile action.
+ @param[in] MemoryType Memory type.
+ EfiMaxMemoryType means the MemoryType is unknown.
+ @param[in] Buffer Buffer address.
+ @param[in] Size Buffer size.
+ @param[in] ActionString String for memory profile action.
+ Only needed for user defined allocate action.
+
+ @return EFI_SUCCESS Memory profile is updated.
+ @return EFI_UNSUPPORTED Memory profile is unsupported,
+ or memory profile for the image is not required,
+ or memory profile for the memory type is not required.
+ @return EFI_ACCESS_DENIED It is during memory profile data getting.
+ @return EFI_ABORTED Memory profile recording is not enabled.
+ @return EFI_OUT_OF_RESOURCES No enough resource to update memory profile for allocate action.
+ @return EFI_NOT_FOUND No matched allocate info found for free action.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_MEMORY_PROFILE_RECORD)(
+ IN EDKII_MEMORY_PROFILE_PROTOCOL *This,
+ IN PHYSICAL_ADDRESS CallerAddress,
+ IN MEMORY_PROFILE_ACTION Action,
+ IN EFI_MEMORY_TYPE MemoryType,
+ IN VOID *Buffer,
+ IN UINTN Size,
+ IN CHAR8 *ActionString OPTIONAL
+ );
+
+struct _EDKII_MEMORY_PROFILE_PROTOCOL {
+ EDKII_MEMORY_PROFILE_GET_DATA GetData;
+ EDKII_MEMORY_PROFILE_REGISTER_IMAGE RegisterImage;
+ EDKII_MEMORY_PROFILE_UNREGISTER_IMAGE UnregisterImage;
+ EDKII_MEMORY_PROFILE_GET_RECORDING_STATE GetRecordingState;
+ EDKII_MEMORY_PROFILE_SET_RECORDING_STATE SetRecordingState;
+ EDKII_MEMORY_PROFILE_RECORD Record;
+};
+
+//
+// SMRAM profile layout:
+// +--------------------------------+
+// | CONTEXT |
+// +--------------------------------+
+// | DRIVER_INFO(1) |
+// +--------------------------------+
+// | ALLOC_INFO(1, 1) |
+// +--------------------------------+
+// | ALLOC_INFO(1, m1) |
+// +--------------------------------+
+// | DRIVER_INFO(n) |
+// +--------------------------------+
+// | ALLOC_INFO(n, 1) |
+// +--------------------------------+
+// | ALLOC_INFO(n, mn) |
+// +--------------------------------+
+// | FREE_MEMORY |
+// +--------------------------------+
+// | FREE MEMORY DESCRIPTOR(1) |
+// +--------------------------------+
+// | FREE MEMORY DESCRIPTOR(p) |
+// +--------------------------------+
+// | MEMORY_RANGE |
+// +--------------------------------+
+// | MEMORY RANGE DESCRIPTOR(1) |
+// +--------------------------------+
+// | MEMORY RANGE DESCRIPTOR(q) |
+// +--------------------------------+
+//
+
+//
+// SMRAM profile command
+//
+#define SMRAM_PROFILE_COMMAND_GET_PROFILE_INFO 0x1
+#define SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA 0x2
+//
+// Below 2 commands have been deprecated. They may not be re-used.
+//
+#define SMRAM_PROFILE_COMMAND_DEPRECATED1 0x3
+#define SMRAM_PROFILE_COMMAND_DEPRECATED2 0x4
+
+#define SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET 0x5
+#define SMRAM_PROFILE_COMMAND_GET_RECORDING_STATE 0x6
+#define SMRAM_PROFILE_COMMAND_SET_RECORDING_STATE 0x7
+
+typedef struct {
+ UINT32 Command;
+ UINT32 DataLength;
+ UINT64 ReturnStatus;
+} SMRAM_PROFILE_PARAMETER_HEADER;
+
+typedef struct {
+ SMRAM_PROFILE_PARAMETER_HEADER Header;
+ UINT64 ProfileSize;
+} SMRAM_PROFILE_PARAMETER_GET_PROFILE_INFO;
+
+typedef struct {
+ SMRAM_PROFILE_PARAMETER_HEADER Header;
+ UINT64 ProfileSize;
+ PHYSICAL_ADDRESS ProfileBuffer;
+} SMRAM_PROFILE_PARAMETER_GET_PROFILE_DATA;
+
+typedef struct {
+ SMRAM_PROFILE_PARAMETER_HEADER Header;
+ //
+ // On input, profile buffer size.
+ // On output, actual profile data size copied.
+ //
+ UINT64 ProfileSize;
+ PHYSICAL_ADDRESS ProfileBuffer;
+ //
+ // On input, profile buffer offset to copy.
+ // On output, next time profile buffer offset to copy.
+ //
+ UINT64 ProfileOffset;
+} SMRAM_PROFILE_PARAMETER_GET_PROFILE_DATA_BY_OFFSET;
+
+typedef struct {
+ SMRAM_PROFILE_PARAMETER_HEADER Header;
+ BOOLEAN RecordingState;
+} SMRAM_PROFILE_PARAMETER_RECORDING_STATE;
+
+typedef struct {
+ SMRAM_PROFILE_PARAMETER_HEADER Header;
+ EFI_GUID FileName;
+ PHYSICAL_ADDRESS ImageBuffer;
+ UINT64 NumberOfPage;
+} SMRAM_PROFILE_PARAMETER_REGISTER_IMAGE;
+
+typedef struct {
+ SMRAM_PROFILE_PARAMETER_HEADER Header;
+ EFI_GUID FileName;
+ PHYSICAL_ADDRESS ImageBuffer;
+ UINT64 NumberOfPage;
+} SMRAM_PROFILE_PARAMETER_UNREGISTER_IMAGE;
+
+#define EDKII_MEMORY_PROFILE_GUID {\
+ 0x821c9a09, 0x541a, 0x40f6, { 0x9f, 0x43, 0xa, 0xd1, 0x93, 0xa1, 0x2c, 0xfe } \
+}
+
+extern EFI_GUID gEdkiiMemoryProfileGuid;
+
+typedef EDKII_MEMORY_PROFILE_PROTOCOL EDKII_SMM_MEMORY_PROFILE_PROTOCOL;
+
+#define EDKII_SMM_MEMORY_PROFILE_GUID {\
+ 0xe22bbcca, 0x516a, 0x46a8, { 0x80, 0xe2, 0x67, 0x45, 0xe8, 0x36, 0x93, 0xbd } \
+}
+
+extern EFI_GUID gEdkiiSmmMemoryProfileGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h b/MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h
index a924c592c9..14e3177495 100644
--- a/MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h
+++ b/MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h
@@ -1,97 +1,97 @@
-/** @file
- GUID used to identify status code records HOB that originate from the PEI status code.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __MEMORY_STATUS_CODE_RECORD_H__
-#define __MEMORY_STATUS_CODE_RECORD_H__
-
-///
-/// Global ID used to identify GUIDed HOBs that start with a structure of type
-/// MEMORY_STATUSCODE_PACKET_HEADER, followed by an array of structures of type
-/// MEMORY_STATUSCODE_RECORD. These GUIDed HOBs record all the information
-/// passed into the ReportStatusCode() service of PEI Services Table.
-///
-/// <pre>
-/// Memory status code records packet structure :
-/// +---------------+----------+----------+-----+----------+-----+----------+
-/// | Packet Header | Record 1 | Record 2 | ... + Record n | ... | Record m |
-/// +---------------+----------+----------+-----+----------+-----+----------+
-/// ^ ^ ^
-/// +--------- RecordIndex -----------+ |
-/// +---------------- MaxRecordsNumber----------------------+
-/// </pre>
-///
-#define MEMORY_STATUS_CODE_RECORD_GUID \
- { \
- 0x60cc026, 0x4c0d, 0x4dda, {0x8f, 0x41, 0x59, 0x5f, 0xef, 0x0, 0xa5, 0x2} \
- }
-
-///
-/// A header structure that is followed by an array of records that contain the
-/// parameters passed into the ReportStatusCode() service in the PEI Services Table.
-///
-typedef struct {
- ///
- /// Index of the packet.
- ///
- UINT16 PacketIndex;
- ///
- /// The number of active records in the packet.
- ///
- UINT16 RecordIndex;
- ///
- /// The maximum number of records that the packet can store.
- ///
- UINT32 MaxRecordsNumber;
-} MEMORY_STATUSCODE_PACKET_HEADER;
-
-///
-/// A header structure that is followed by an array of records that contain the
-/// parameters passed into the ReportStatusCode() service in the DXE Services Table.
-///
-typedef struct {
- ///
- /// The index pointing to the last recored being stored.
- ///
- UINT32 RecordIndex;
- ///
- /// The number of records being stored.
- ///
- UINT32 NumberOfRecords;
- ///
- /// The maximum number of records that can be stored.
- ///
- UINT32 MaxRecordsNumber;
-} RUNTIME_MEMORY_STATUSCODE_HEADER;
-
-///
-/// A structure that contains the parameters passed into the ReportStatusCode()
-/// service in the PEI Services Table.
-///
-typedef struct {
- ///
- /// Status Code type to be reported.
- ///
- EFI_STATUS_CODE_TYPE CodeType;
-
- ///
- /// An operation, plus value information about the class and subclass, used to
- /// classify the hardware and software entity.
- ///
- EFI_STATUS_CODE_VALUE Value;
-
- ///
- /// The enumeration of a hardware or software entity within
- /// the system. Valid instance numbers start with the number 1.
- ///
- UINT32 Instance;
-} MEMORY_STATUSCODE_RECORD;
-
-extern EFI_GUID gMemoryStatusCodeRecordGuid;
-
-#endif
+/** @file
+ GUID used to identify status code records HOB that originate from the PEI status code.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __MEMORY_STATUS_CODE_RECORD_H__
+#define __MEMORY_STATUS_CODE_RECORD_H__
+
+///
+/// Global ID used to identify GUIDed HOBs that start with a structure of type
+/// MEMORY_STATUSCODE_PACKET_HEADER, followed by an array of structures of type
+/// MEMORY_STATUSCODE_RECORD. These GUIDed HOBs record all the information
+/// passed into the ReportStatusCode() service of PEI Services Table.
+///
+/// <pre>
+/// Memory status code records packet structure :
+/// +---------------+----------+----------+-----+----------+-----+----------+
+/// | Packet Header | Record 1 | Record 2 | ... + Record n | ... | Record m |
+/// +---------------+----------+----------+-----+----------+-----+----------+
+/// ^ ^ ^
+/// +--------- RecordIndex -----------+ |
+/// +---------------- MaxRecordsNumber----------------------+
+/// </pre>
+///
+#define MEMORY_STATUS_CODE_RECORD_GUID \
+ { \
+ 0x60cc026, 0x4c0d, 0x4dda, {0x8f, 0x41, 0x59, 0x5f, 0xef, 0x0, 0xa5, 0x2} \
+ }
+
+///
+/// A header structure that is followed by an array of records that contain the
+/// parameters passed into the ReportStatusCode() service in the PEI Services Table.
+///
+typedef struct {
+ ///
+ /// Index of the packet.
+ ///
+ UINT16 PacketIndex;
+ ///
+ /// The number of active records in the packet.
+ ///
+ UINT16 RecordIndex;
+ ///
+ /// The maximum number of records that the packet can store.
+ ///
+ UINT32 MaxRecordsNumber;
+} MEMORY_STATUSCODE_PACKET_HEADER;
+
+///
+/// A header structure that is followed by an array of records that contain the
+/// parameters passed into the ReportStatusCode() service in the DXE Services Table.
+///
+typedef struct {
+ ///
+ /// The index pointing to the last recored being stored.
+ ///
+ UINT32 RecordIndex;
+ ///
+ /// The number of records being stored.
+ ///
+ UINT32 NumberOfRecords;
+ ///
+ /// The maximum number of records that can be stored.
+ ///
+ UINT32 MaxRecordsNumber;
+} RUNTIME_MEMORY_STATUSCODE_HEADER;
+
+///
+/// A structure that contains the parameters passed into the ReportStatusCode()
+/// service in the PEI Services Table.
+///
+typedef struct {
+ ///
+ /// Status Code type to be reported.
+ ///
+ EFI_STATUS_CODE_TYPE CodeType;
+
+ ///
+ /// An operation, plus value information about the class and subclass, used to
+ /// classify the hardware and software entity.
+ ///
+ EFI_STATUS_CODE_VALUE Value;
+
+ ///
+ /// The enumeration of a hardware or software entity within
+ /// the system. Valid instance numbers start with the number 1.
+ ///
+ UINT32 Instance;
+} MEMORY_STATUSCODE_RECORD;
+
+extern EFI_GUID gMemoryStatusCodeRecordGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/MemoryTypeInformation.h b/MdeModulePkg/Include/Guid/MemoryTypeInformation.h
index 65adcf478b..3f792e9b48 100644
--- a/MdeModulePkg/Include/Guid/MemoryTypeInformation.h
+++ b/MdeModulePkg/Include/Guid/MemoryTypeInformation.h
@@ -1,34 +1,34 @@
-/** @file
- This file defines:
- * Memory Type Information GUID for Guided HOB and Variable.
- * Memory Type Information Variable Name.
- * Memory Type Information GUID HOB data structure.
-
- The memory type information HOB and variable can be used to store information
- for each memory type in Variable or HOB.
-
- The Memory Type Information GUID can also be optionally used as the Owner
- field of a Resource Descriptor HOB to provide the preferred memory range
- for the memory types described in the Memory Type Information GUID HOB.
-
- Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __MEMORY_TYPE_INFORMATION_GUID_H__
-#define __MEMORY_TYPE_INFORMATION_GUID_H__
-
-#define EFI_MEMORY_TYPE_INFORMATION_GUID \
- { 0x4c19049f,0x4137,0x4dd3, { 0x9c,0x10,0x8b,0x97,0xa8,0x3f,0xfd,0xfa } }
-
-#define EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME L"MemoryTypeInformation"
-
-extern EFI_GUID gEfiMemoryTypeInformationGuid;
-
-typedef struct {
- UINT32 Type; ///< EFI memory type defined in UEFI specification.
- UINT32 NumberOfPages; ///< The pages of this type memory.
-} EFI_MEMORY_TYPE_INFORMATION;
-
-#endif
+/** @file
+ This file defines:
+ * Memory Type Information GUID for Guided HOB and Variable.
+ * Memory Type Information Variable Name.
+ * Memory Type Information GUID HOB data structure.
+
+ The memory type information HOB and variable can be used to store information
+ for each memory type in Variable or HOB.
+
+ The Memory Type Information GUID can also be optionally used as the Owner
+ field of a Resource Descriptor HOB to provide the preferred memory range
+ for the memory types described in the Memory Type Information GUID HOB.
+
+ Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __MEMORY_TYPE_INFORMATION_GUID_H__
+#define __MEMORY_TYPE_INFORMATION_GUID_H__
+
+#define EFI_MEMORY_TYPE_INFORMATION_GUID \
+ { 0x4c19049f,0x4137,0x4dd3, { 0x9c,0x10,0x8b,0x97,0xa8,0x3f,0xfd,0xfa } }
+
+#define EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME L"MemoryTypeInformation"
+
+extern EFI_GUID gEfiMemoryTypeInformationGuid;
+
+typedef struct {
+ UINT32 Type; ///< EFI memory type defined in UEFI specification.
+ UINT32 NumberOfPages; ///< The pages of this type memory.
+} EFI_MEMORY_TYPE_INFORMATION;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/MigratedFvInfo.h b/MdeModulePkg/Include/Guid/MigratedFvInfo.h
index 1c8b0dfefc..a4306a89f2 100644
--- a/MdeModulePkg/Include/Guid/MigratedFvInfo.h
+++ b/MdeModulePkg/Include/Guid/MigratedFvInfo.h
@@ -1,61 +1,61 @@
-/** @file
- Migrated FV information
-
-Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __EDKII_MIGRATED_FV_INFO_GUID_H__
-#define __EDKII_MIGRATED_FV_INFO_GUID_H__
-
-//
-// FLAGS_FV_RAW_DATA_COPY indicates FV raw data will be copied to permanent memory
-// or not. When FV is migrated to permanent memory, it will be rebased and raw
-// data will be lost. This bit can be configured as below values:
-// 0: FV raw data will not be used in later phase, and the copy will be skipped to
-// optimize boot performance.
-// 1: FV raw data will be copied to permanent memory for later phase use (such as
-// FV measurement).
-//
-#define FLAGS_FV_RAW_DATA_COPY BIT0
-
-///
-/// In real use cases, not all FVs need migrate to permanent memory before TempRam tears
-/// down. EDKII_MIGRATION_INFO hob should be published by platform to indicate which
-/// FVs need migration to optimize boot performance. If this hob is not detected by Pei
-/// Core, all FVs on TempRam will be migrated and FV raw data will also be copied.
-/// Only one EDKII_MIGRATION_INFO hob should be published by platform, and this hob will
-/// take effect only when migration feature is enabled by PCD.
-///
-typedef struct {
- UINT32 FvOrgBaseOnTempRam; // Original FV address on Temporary Ram
- //
- // FV Migration Flags:
- // Bit0: Indicate to copy FV raw data or not
- // Others: Reserved bits
- //
- UINT32 FvMigrationFlags;
-} TO_MIGRATE_FV_INFO;
-
-typedef struct {
- BOOLEAN MigrateAll; // Migrate all FVs and also copy FV raw data
- //
- // ToMigrateFvCount and ToMigrateFvInfo array indicate which FVs need be migrated, and
- // these info should be ignored when MigrateAll field is set to TRUE.
- //
- UINT32 ToMigrateFvCount;
- // TO_MIGRATE_FV_INFO ToMigrateFvInfo[];
-} EDKII_MIGRATION_INFO;
-
-typedef struct {
- UINT32 FvOrgBase; // original FV address
- UINT32 FvNewBase; // new FV address
- UINT32 FvDataBase; // original FV data, 0 means raw data is not copied
- UINT32 FvLength; // Fv Length
-} EDKII_MIGRATED_FV_INFO;
-
-extern EFI_GUID gEdkiiMigrationInfoGuid;
-extern EFI_GUID gEdkiiMigratedFvInfoGuid;
-
-#endif // #ifndef __EDKII_MIGRATED_FV_INFO_GUID_H__
+/** @file
+ Migrated FV information
+
+Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __EDKII_MIGRATED_FV_INFO_GUID_H__
+#define __EDKII_MIGRATED_FV_INFO_GUID_H__
+
+//
+// FLAGS_FV_RAW_DATA_COPY indicates FV raw data will be copied to permanent memory
+// or not. When FV is migrated to permanent memory, it will be rebased and raw
+// data will be lost. This bit can be configured as below values:
+// 0: FV raw data will not be used in later phase, and the copy will be skipped to
+// optimize boot performance.
+// 1: FV raw data will be copied to permanent memory for later phase use (such as
+// FV measurement).
+//
+#define FLAGS_FV_RAW_DATA_COPY BIT0
+
+///
+/// In real use cases, not all FVs need migrate to permanent memory before TempRam tears
+/// down. EDKII_MIGRATION_INFO hob should be published by platform to indicate which
+/// FVs need migration to optimize boot performance. If this hob is not detected by Pei
+/// Core, all FVs on TempRam will be migrated and FV raw data will also be copied.
+/// Only one EDKII_MIGRATION_INFO hob should be published by platform, and this hob will
+/// take effect only when migration feature is enabled by PCD.
+///
+typedef struct {
+ UINT32 FvOrgBaseOnTempRam; // Original FV address on Temporary Ram
+ //
+ // FV Migration Flags:
+ // Bit0: Indicate to copy FV raw data or not
+ // Others: Reserved bits
+ //
+ UINT32 FvMigrationFlags;
+} TO_MIGRATE_FV_INFO;
+
+typedef struct {
+ BOOLEAN MigrateAll; // Migrate all FVs and also copy FV raw data
+ //
+ // ToMigrateFvCount and ToMigrateFvInfo array indicate which FVs need be migrated, and
+ // these info should be ignored when MigrateAll field is set to TRUE.
+ //
+ UINT32 ToMigrateFvCount;
+ // TO_MIGRATE_FV_INFO ToMigrateFvInfo[];
+} EDKII_MIGRATION_INFO;
+
+typedef struct {
+ UINT32 FvOrgBase; // original FV address
+ UINT32 FvNewBase; // new FV address
+ UINT32 FvDataBase; // original FV data, 0 means raw data is not copied
+ UINT32 FvLength; // Fv Length
+} EDKII_MIGRATED_FV_INFO;
+
+extern EFI_GUID gEdkiiMigrationInfoGuid;
+extern EFI_GUID gEdkiiMigratedFvInfoGuid;
+
+#endif // #ifndef __EDKII_MIGRATED_FV_INFO_GUID_H__
diff --git a/MdeModulePkg/Include/Guid/MtcVendor.h b/MdeModulePkg/Include/Guid/MtcVendor.h
index 74163972aa..dae3fd7e46 100644
--- a/MdeModulePkg/Include/Guid/MtcVendor.h
+++ b/MdeModulePkg/Include/Guid/MtcVendor.h
@@ -1,25 +1,25 @@
-/** @file
- GUID is for MTC variable.
-
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __MTC_VENDOR_GUID_H__
-#define __MTC_VENDOR_GUID_H__
-
-//
-// Vendor GUID of the variable for the high part of monotonic counter (UINT32).
-//
-#define MTC_VENDOR_GUID \
- { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } }
-
-//
-// Name of the variable for the high part of monotonic counter
-//
-#define MTC_VARIABLE_NAME L"MTC"
-
-extern EFI_GUID gMtcVendorGuid;
-
-#endif
+/** @file
+ GUID is for MTC variable.
+
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __MTC_VENDOR_GUID_H__
+#define __MTC_VENDOR_GUID_H__
+
+//
+// Vendor GUID of the variable for the high part of monotonic counter (UINT32).
+//
+#define MTC_VENDOR_GUID \
+ { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } }
+
+//
+// Name of the variable for the high part of monotonic counter
+//
+#define MTC_VARIABLE_NAME L"MTC"
+
+extern EFI_GUID gMtcVendorGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/NonDiscoverableDevice.h b/MdeModulePkg/Include/Guid/NonDiscoverableDevice.h
index 26fa5d28a1..b16840aeda 100644
--- a/MdeModulePkg/Include/Guid/NonDiscoverableDevice.h
+++ b/MdeModulePkg/Include/Guid/NonDiscoverableDevice.h
@@ -1,51 +1,51 @@
-/** @file
- GUIDs to identify devices that are not on a discoverable bus but can be
- controlled by a standard class driver
-
- Copyright (c) 2016, Linaro, Ltd. All rights reserved.<BR>
-
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __NON_DISCOVERABLE_DEVICE_GUID_H__
-#define __NON_DISCOVERABLE_DEVICE_GUID_H__
-
-#define EDKII_NON_DISCOVERABLE_AHCI_DEVICE_GUID \
- { 0xC7D35798, 0xE4D2, 0x4A93, {0xB1, 0x45, 0x54, 0x88, 0x9F, 0x02, 0x58, 0x4B } }
-
-#define EDKII_NON_DISCOVERABLE_AMBA_DEVICE_GUID \
- { 0x94440339, 0xCC93, 0x4506, {0xB4, 0xC6, 0xEE, 0x8D, 0x0F, 0x4C, 0xA1, 0x91 } }
-
-#define EDKII_NON_DISCOVERABLE_EHCI_DEVICE_GUID \
- { 0xEAEE5615, 0x0CFD, 0x45FC, {0x87, 0x69, 0xA0, 0xD8, 0x56, 0x95, 0xAF, 0x85 } }
-
-#define EDKII_NON_DISCOVERABLE_NVME_DEVICE_GUID \
- { 0xC5F25542, 0x2A79, 0x4A26, {0x81, 0xBB, 0x4E, 0xA6, 0x32, 0x33, 0xB3, 0x09 } }
-
-#define EDKII_NON_DISCOVERABLE_OHCI_DEVICE_GUID \
- { 0xB20005B0, 0xBB2D, 0x496F, {0x86, 0x9C, 0x23, 0x0B, 0x44, 0x79, 0xE7, 0xD1 } }
-
-#define EDKII_NON_DISCOVERABLE_SDHCI_DEVICE_GUID \
- { 0x1DD1D619, 0xF9B8, 0x463E, {0x86, 0x81, 0xD1, 0xDC, 0x7C, 0x07, 0xB7, 0x2C } }
-
-#define EDKII_NON_DISCOVERABLE_UFS_DEVICE_GUID \
- { 0x2EA77912, 0x80A8, 0x4947, {0xBE, 0x69, 0xCD, 0xD0, 0x0A, 0xFB, 0xE5, 0x56 } }
-
-#define EDKII_NON_DISCOVERABLE_UHCI_DEVICE_GUID \
- { 0xA8CDA0A2, 0x4F37, 0x4A1B, {0x8E, 0x10, 0x8E, 0xF3, 0xCC, 0x3B, 0xF3, 0xA8 } }
-
-#define EDKII_NON_DISCOVERABLE_XHCI_DEVICE_GUID \
- { 0xB1BE0BC5, 0x6C28, 0x442D, {0xAA, 0x37, 0x15, 0x1B, 0x42, 0x57, 0xBD, 0x78 } }
-
-extern EFI_GUID gEdkiiNonDiscoverableAhciDeviceGuid;
-extern EFI_GUID gEdkiiNonDiscoverableAmbaDeviceGuid;
-extern EFI_GUID gEdkiiNonDiscoverableEhciDeviceGuid;
-extern EFI_GUID gEdkiiNonDiscoverableNvmeDeviceGuid;
-extern EFI_GUID gEdkiiNonDiscoverableOhciDeviceGuid;
-extern EFI_GUID gEdkiiNonDiscoverableSdhciDeviceGuid;
-extern EFI_GUID gEdkiiNonDiscoverableUfsDeviceGuid;
-extern EFI_GUID gEdkiiNonDiscoverableUhciDeviceGuid;
-extern EFI_GUID gEdkiiNonDiscoverableXhciDeviceGuid;
-
-#endif
+/** @file
+ GUIDs to identify devices that are not on a discoverable bus but can be
+ controlled by a standard class driver
+
+ Copyright (c) 2016, Linaro, Ltd. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __NON_DISCOVERABLE_DEVICE_GUID_H__
+#define __NON_DISCOVERABLE_DEVICE_GUID_H__
+
+#define EDKII_NON_DISCOVERABLE_AHCI_DEVICE_GUID \
+ { 0xC7D35798, 0xE4D2, 0x4A93, {0xB1, 0x45, 0x54, 0x88, 0x9F, 0x02, 0x58, 0x4B } }
+
+#define EDKII_NON_DISCOVERABLE_AMBA_DEVICE_GUID \
+ { 0x94440339, 0xCC93, 0x4506, {0xB4, 0xC6, 0xEE, 0x8D, 0x0F, 0x4C, 0xA1, 0x91 } }
+
+#define EDKII_NON_DISCOVERABLE_EHCI_DEVICE_GUID \
+ { 0xEAEE5615, 0x0CFD, 0x45FC, {0x87, 0x69, 0xA0, 0xD8, 0x56, 0x95, 0xAF, 0x85 } }
+
+#define EDKII_NON_DISCOVERABLE_NVME_DEVICE_GUID \
+ { 0xC5F25542, 0x2A79, 0x4A26, {0x81, 0xBB, 0x4E, 0xA6, 0x32, 0x33, 0xB3, 0x09 } }
+
+#define EDKII_NON_DISCOVERABLE_OHCI_DEVICE_GUID \
+ { 0xB20005B0, 0xBB2D, 0x496F, {0x86, 0x9C, 0x23, 0x0B, 0x44, 0x79, 0xE7, 0xD1 } }
+
+#define EDKII_NON_DISCOVERABLE_SDHCI_DEVICE_GUID \
+ { 0x1DD1D619, 0xF9B8, 0x463E, {0x86, 0x81, 0xD1, 0xDC, 0x7C, 0x07, 0xB7, 0x2C } }
+
+#define EDKII_NON_DISCOVERABLE_UFS_DEVICE_GUID \
+ { 0x2EA77912, 0x80A8, 0x4947, {0xBE, 0x69, 0xCD, 0xD0, 0x0A, 0xFB, 0xE5, 0x56 } }
+
+#define EDKII_NON_DISCOVERABLE_UHCI_DEVICE_GUID \
+ { 0xA8CDA0A2, 0x4F37, 0x4A1B, {0x8E, 0x10, 0x8E, 0xF3, 0xCC, 0x3B, 0xF3, 0xA8 } }
+
+#define EDKII_NON_DISCOVERABLE_XHCI_DEVICE_GUID \
+ { 0xB1BE0BC5, 0x6C28, 0x442D, {0xAA, 0x37, 0x15, 0x1B, 0x42, 0x57, 0xBD, 0x78 } }
+
+extern EFI_GUID gEdkiiNonDiscoverableAhciDeviceGuid;
+extern EFI_GUID gEdkiiNonDiscoverableAmbaDeviceGuid;
+extern EFI_GUID gEdkiiNonDiscoverableEhciDeviceGuid;
+extern EFI_GUID gEdkiiNonDiscoverableNvmeDeviceGuid;
+extern EFI_GUID gEdkiiNonDiscoverableOhciDeviceGuid;
+extern EFI_GUID gEdkiiNonDiscoverableSdhciDeviceGuid;
+extern EFI_GUID gEdkiiNonDiscoverableUfsDeviceGuid;
+extern EFI_GUID gEdkiiNonDiscoverableUhciDeviceGuid;
+extern EFI_GUID gEdkiiNonDiscoverableXhciDeviceGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/PcdDataBaseHobGuid.h b/MdeModulePkg/Include/Guid/PcdDataBaseHobGuid.h
index 0cfe8bc68d..4ae1400ff3 100644
--- a/MdeModulePkg/Include/Guid/PcdDataBaseHobGuid.h
+++ b/MdeModulePkg/Include/Guid/PcdDataBaseHobGuid.h
@@ -1,19 +1,19 @@
-/** @file
- Hob guid for Pcd DataBase.
-
-Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _PCD_DATABASE_HOB_GUID_H_
-#define _PCD_DATABASE_HOB_GUID_H_
-
-#define PCD_DATABASE_HOB_GUID \
- { \
- 0xEA296D92, 0x0B69, 0x423C, { 0x8C, 0x28, 0x33, 0xB4, 0xE0, 0xA9, 0x12, 0x68 } \
- }
-
-extern EFI_GUID gPcdDataBaseHobGuid;
-
-#endif
+/** @file
+ Hob guid for Pcd DataBase.
+
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _PCD_DATABASE_HOB_GUID_H_
+#define _PCD_DATABASE_HOB_GUID_H_
+
+#define PCD_DATABASE_HOB_GUID \
+ { \
+ 0xEA296D92, 0x0B69, 0x423C, { 0x8C, 0x28, 0x33, 0xB4, 0xE0, 0xA9, 0x12, 0x68 } \
+ }
+
+extern EFI_GUID gPcdDataBaseHobGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h b/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h
index bac8fd59bf..1f0b012708 100644
--- a/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h
+++ b/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h
@@ -1,226 +1,226 @@
-/** @file
- Guid for Pcd DataBase Signature.
-
-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _PCD_DATABASE_SIGNATURE_GUID_H_
-#define _PCD_DATABASE_SIGNATURE_GUID_H_
-
-#define PCD_DATA_BASE_SIGNATURE_GUID \
-{ 0x3c7d193c, 0x682c, 0x4c14, { 0xa6, 0x8f, 0x55, 0x2d, 0xea, 0x4f, 0x43, 0x7e } }
-
-extern EFI_GUID gPcdDataBaseSignatureGuid;
-
-//
-// Common definitions
-//
-typedef UINT64 SKU_ID;
-
-#define PCD_TYPE_SHIFT 28
-
-#define PCD_TYPE_DATA (0x0U << PCD_TYPE_SHIFT)
-#define PCD_TYPE_HII (0x8U << PCD_TYPE_SHIFT)
-#define PCD_TYPE_VPD (0x4U << PCD_TYPE_SHIFT)
-#define PCD_TYPE_STRING (0x1U << PCD_TYPE_SHIFT)
-
-#define PCD_TYPE_ALL_SET (PCD_TYPE_DATA | PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_STRING)
-
-#define PCD_DATUM_TYPE_SHIFT 24
-
-#define PCD_DATUM_TYPE_POINTER (0x0U << PCD_DATUM_TYPE_SHIFT)
-#define PCD_DATUM_TYPE_UINT8 (0x1U << PCD_DATUM_TYPE_SHIFT)
-#define PCD_DATUM_TYPE_UINT16 (0x2U << PCD_DATUM_TYPE_SHIFT)
-#define PCD_DATUM_TYPE_UINT32 (0x4U << PCD_DATUM_TYPE_SHIFT)
-#define PCD_DATUM_TYPE_UINT64 (0x8U << PCD_DATUM_TYPE_SHIFT)
-
-#define PCD_DATUM_TYPE_ALL_SET (PCD_DATUM_TYPE_POINTER | \
- PCD_DATUM_TYPE_UINT8 | \
- PCD_DATUM_TYPE_UINT16 | \
- PCD_DATUM_TYPE_UINT32 | \
- PCD_DATUM_TYPE_UINT64)
-
-#define PCD_DATUM_TYPE_SHIFT2 20
-
-#define PCD_DATUM_TYPE_UINT8_BOOLEAN (0x1U << PCD_DATUM_TYPE_SHIFT2)
-
-#define PCD_DATABASE_OFFSET_MASK (~(PCD_TYPE_ALL_SET | PCD_DATUM_TYPE_ALL_SET | PCD_DATUM_TYPE_UINT8_BOOLEAN))
-
-typedef struct {
- UINT32 ExTokenNumber;
- UINT16 TokenNumber; // Token Number for Dynamic-Ex PCD.
- UINT16 ExGuidIndex; // Index of GuidTable in units of GUID.
-} DYNAMICEX_MAPPING;
-
-typedef struct {
- UINT32 StringIndex; // Offset in String Table in units of UINT8.
- UINT32 DefaultValueOffset; // Offset of the Default Value.
- UINT16 GuidTableIndex; // Offset in Guid Table in units of GUID.
- UINT16 Offset; // Offset in Variable.
- UINT32 Attributes; // Variable attributes.
- UINT16 Property; // Variable property.
- UINT16 Reserved;
-} VARIABLE_HEAD;
-
-typedef struct {
- UINT32 Offset;
-} VPD_HEAD;
-
-typedef UINT32 STRING_HEAD;
-
-typedef UINT16 SIZE_INFO;
-
-typedef struct {
- UINT32 TokenSpaceCNameIndex; // Offset in String Table in units of UINT8.
- UINT32 PcdCNameIndex; // Offset in String Table in units of UINT8.
-} PCD_NAME_INDEX;
-
-typedef UINT32 TABLE_OFFSET;
-
-typedef struct {
- GUID Signature; // PcdDataBaseGuid.
- UINT32 BuildVersion;
- UINT32 Length; // Length of DEFAULT SKU PCD DB
- SKU_ID SystemSkuId; // Current SkuId value.
- UINT32 LengthForAllSkus; // Length of all SKU PCD DB
- UINT32 UninitDataBaseSize; // Total size for PCD those default value with 0.
- TABLE_OFFSET LocalTokenNumberTableOffset;
- TABLE_OFFSET ExMapTableOffset;
- TABLE_OFFSET GuidTableOffset;
- TABLE_OFFSET StringTableOffset;
- TABLE_OFFSET SizeTableOffset;
- TABLE_OFFSET SkuIdTableOffset;
- TABLE_OFFSET PcdNameTableOffset;
- UINT16 LocalTokenCount; // LOCAL_TOKEN_NUMBER for all.
- UINT16 ExTokenCount; // EX_TOKEN_NUMBER for DynamicEx.
- UINT16 GuidTableCount; // The Number of Guid in GuidTable.
- UINT8 Pad[6]; // Pad bytes to satisfy the alignment.
-
- //
- // Default initialized external PCD database binary structure
- //
- // Padding is needed to keep necessary alignment
- //
- // SKU_ID SkuIdTable[]; // SkuIds system supports.
- // UINT64 ValueUint64[];
- // UINT32 ValueUint32[];
- // VPD_HEAD VpdHead[]; // VPD Offset
- // DYNAMICEX_MAPPING ExMapTable[]; // DynamicEx PCD mapped to LocalIndex in LocalTokenNumberTable. It can be accessed by the ExMapTableOffset.
- // UINT32 LocalTokenNumberTable[]; // Offset | DataType | PCD Type. It can be accessed by LocalTokenNumberTableOffset.
- // GUID GuidTable[]; // GUID for DynamicEx and HII PCD variable Guid. It can be accessed by the GuidTableOffset.
- // STRING_HEAD StringHead[]; // String PCD
- // PCD_NAME_INDEX PcdNameTable[]; // PCD name index info. It can be accessed by the PcdNameTableOffset.
- // VARIABLE_HEAD VariableHead[]; // HII PCD
- // UINT8 StringTable[]; // String for String PCD value and HII PCD Variable Name. It can be accessed by StringTableOffset.
- // SIZE_INFO SizeTable[]; // MaxSize and CurSize for String PCD. It can be accessed by SizeTableOffset.
- // UINT16 ValueUint16[];
- // UINT8 ValueUint8[];
- // BOOLEAN ValueBoolean[];
-} PCD_DATABASE_INIT;
-
-//
-// PEI and DXE Pcd driver use the same PCD database
-//
-typedef PCD_DATABASE_INIT PEI_PCD_DATABASE;
-typedef PCD_DATABASE_INIT DXE_PCD_DATABASE;
-
-typedef struct {
- PEI_PCD_DATABASE *PeiDb;
- DXE_PCD_DATABASE *DxeDb;
-} PCD_DATABASE;
-
-typedef struct {
- UINT32 Offset : 24;
- UINT32 Value : 8;
-} PCD_DATA_DELTA;
-
-typedef struct {
- SKU_ID SkuId;
- UINT16 DefaultId;
- UINT8 Reserved[6];
-} PCD_DEFAULT_INFO;
-
-typedef struct {
- //
- // Full size, it must be at 8 byte alignment.
- //
- UINT32 DataSize;
- //
- // HeaderSize includes HeaderSize fields and DefaultInfo arrays
- //
- UINT32 HeaderSize;
- //
- // DefaultInfo arrays those have the same default setting.
- //
- PCD_DEFAULT_INFO DefaultInfo[1];
- //
- // Default data is stored as variable storage or the array of DATA_DELTA.
- //
-} PCD_DEFAULT_DATA;
-
-#define PCD_NV_STORE_DEFAULT_BUFFER_SIGNATURE SIGNATURE_32('N', 'S', 'D', 'B')
-
-typedef struct {
- //
- // PCD_NV_STORE_DEFAULT_BUFFER_SIGNATURE
- //
- UINT32 Signature;
- //
- // Length of the taken default buffer
- //
- UINT32 Length;
- //
- // Length of the total reserved buffer
- //
- UINT32 MaxLength;
- //
- // Reserved for 8 byte alignment
- //
- UINT32 Reserved;
- // one or more PCD_DEFAULT_DATA
-} PCD_NV_STORE_DEFAULT_BUFFER_HEADER;
-
-//
-// NvStoreDefaultValueBuffer layout:
-// +-------------------------------------+
-// | PCD_NV_STORE_DEFAULT_BUFFER_HEADER |
-// +-------------------------------------+
-// | PCD_DEFAULT_DATA (DEFAULT, Standard)|
-// +-------------------------------------+
-// | PCD_DATA_DELTA (DEFAULT, Standard)|
-// +-------------------------------------+
-// | ...... |
-// +-------------------------------------+
-// | PCD_DEFAULT_DATA (SKU A, Standard) |
-// +-------------------------------------+
-// | PCD_DATA_DELTA (SKU A, Standard) |
-// +-------------------------------------+
-// | ...... |
-// +-------------------------------------+
-//
-
-#pragma pack(1)
-typedef struct {
- SKU_ID SkuId;
- SKU_ID SkuIdCompared;
- UINT32 Length;
- // PCD_DATA_DELTA DeltaData[]
-} PCD_DATABASE_SKU_DELTA;
-
-//
-// PCD database layout:
-// +---------------------------------+
-// | PCD_DATABASE_INIT (DEFAULT SKU) |
-// +---------------------------------+
-// | PCD_DATABASE_SKU_DELTA (SKU A) |
-// +---------------------------------+
-// | PCD_DATABASE_SKU_DELTA (SKU B) |
-// +---------------------------------+
-// | ...... |
-// +---------------------------------+
-//
-#pragma pack()
-
-#endif
+/** @file
+ Guid for Pcd DataBase Signature.
+
+Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _PCD_DATABASE_SIGNATURE_GUID_H_
+#define _PCD_DATABASE_SIGNATURE_GUID_H_
+
+#define PCD_DATA_BASE_SIGNATURE_GUID \
+{ 0x3c7d193c, 0x682c, 0x4c14, { 0xa6, 0x8f, 0x55, 0x2d, 0xea, 0x4f, 0x43, 0x7e } }
+
+extern EFI_GUID gPcdDataBaseSignatureGuid;
+
+//
+// Common definitions
+//
+typedef UINT64 SKU_ID;
+
+#define PCD_TYPE_SHIFT 28
+
+#define PCD_TYPE_DATA (0x0U << PCD_TYPE_SHIFT)
+#define PCD_TYPE_HII (0x8U << PCD_TYPE_SHIFT)
+#define PCD_TYPE_VPD (0x4U << PCD_TYPE_SHIFT)
+#define PCD_TYPE_STRING (0x1U << PCD_TYPE_SHIFT)
+
+#define PCD_TYPE_ALL_SET (PCD_TYPE_DATA | PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_STRING)
+
+#define PCD_DATUM_TYPE_SHIFT 24
+
+#define PCD_DATUM_TYPE_POINTER (0x0U << PCD_DATUM_TYPE_SHIFT)
+#define PCD_DATUM_TYPE_UINT8 (0x1U << PCD_DATUM_TYPE_SHIFT)
+#define PCD_DATUM_TYPE_UINT16 (0x2U << PCD_DATUM_TYPE_SHIFT)
+#define PCD_DATUM_TYPE_UINT32 (0x4U << PCD_DATUM_TYPE_SHIFT)
+#define PCD_DATUM_TYPE_UINT64 (0x8U << PCD_DATUM_TYPE_SHIFT)
+
+#define PCD_DATUM_TYPE_ALL_SET (PCD_DATUM_TYPE_POINTER | \
+ PCD_DATUM_TYPE_UINT8 | \
+ PCD_DATUM_TYPE_UINT16 | \
+ PCD_DATUM_TYPE_UINT32 | \
+ PCD_DATUM_TYPE_UINT64)
+
+#define PCD_DATUM_TYPE_SHIFT2 20
+
+#define PCD_DATUM_TYPE_UINT8_BOOLEAN (0x1U << PCD_DATUM_TYPE_SHIFT2)
+
+#define PCD_DATABASE_OFFSET_MASK (~(PCD_TYPE_ALL_SET | PCD_DATUM_TYPE_ALL_SET | PCD_DATUM_TYPE_UINT8_BOOLEAN))
+
+typedef struct {
+ UINT32 ExTokenNumber;
+ UINT16 TokenNumber; // Token Number for Dynamic-Ex PCD.
+ UINT16 ExGuidIndex; // Index of GuidTable in units of GUID.
+} DYNAMICEX_MAPPING;
+
+typedef struct {
+ UINT32 StringIndex; // Offset in String Table in units of UINT8.
+ UINT32 DefaultValueOffset; // Offset of the Default Value.
+ UINT16 GuidTableIndex; // Offset in Guid Table in units of GUID.
+ UINT16 Offset; // Offset in Variable.
+ UINT32 Attributes; // Variable attributes.
+ UINT16 Property; // Variable property.
+ UINT16 Reserved;
+} VARIABLE_HEAD;
+
+typedef struct {
+ UINT32 Offset;
+} VPD_HEAD;
+
+typedef UINT32 STRING_HEAD;
+
+typedef UINT16 SIZE_INFO;
+
+typedef struct {
+ UINT32 TokenSpaceCNameIndex; // Offset in String Table in units of UINT8.
+ UINT32 PcdCNameIndex; // Offset in String Table in units of UINT8.
+} PCD_NAME_INDEX;
+
+typedef UINT32 TABLE_OFFSET;
+
+typedef struct {
+ GUID Signature; // PcdDataBaseGuid.
+ UINT32 BuildVersion;
+ UINT32 Length; // Length of DEFAULT SKU PCD DB
+ SKU_ID SystemSkuId; // Current SkuId value.
+ UINT32 LengthForAllSkus; // Length of all SKU PCD DB
+ UINT32 UninitDataBaseSize; // Total size for PCD those default value with 0.
+ TABLE_OFFSET LocalTokenNumberTableOffset;
+ TABLE_OFFSET ExMapTableOffset;
+ TABLE_OFFSET GuidTableOffset;
+ TABLE_OFFSET StringTableOffset;
+ TABLE_OFFSET SizeTableOffset;
+ TABLE_OFFSET SkuIdTableOffset;
+ TABLE_OFFSET PcdNameTableOffset;
+ UINT16 LocalTokenCount; // LOCAL_TOKEN_NUMBER for all.
+ UINT16 ExTokenCount; // EX_TOKEN_NUMBER for DynamicEx.
+ UINT16 GuidTableCount; // The Number of Guid in GuidTable.
+ UINT8 Pad[6]; // Pad bytes to satisfy the alignment.
+
+ //
+ // Default initialized external PCD database binary structure
+ //
+ // Padding is needed to keep necessary alignment
+ //
+ // SKU_ID SkuIdTable[]; // SkuIds system supports.
+ // UINT64 ValueUint64[];
+ // UINT32 ValueUint32[];
+ // VPD_HEAD VpdHead[]; // VPD Offset
+ // DYNAMICEX_MAPPING ExMapTable[]; // DynamicEx PCD mapped to LocalIndex in LocalTokenNumberTable. It can be accessed by the ExMapTableOffset.
+ // UINT32 LocalTokenNumberTable[]; // Offset | DataType | PCD Type. It can be accessed by LocalTokenNumberTableOffset.
+ // GUID GuidTable[]; // GUID for DynamicEx and HII PCD variable Guid. It can be accessed by the GuidTableOffset.
+ // STRING_HEAD StringHead[]; // String PCD
+ // PCD_NAME_INDEX PcdNameTable[]; // PCD name index info. It can be accessed by the PcdNameTableOffset.
+ // VARIABLE_HEAD VariableHead[]; // HII PCD
+ // UINT8 StringTable[]; // String for String PCD value and HII PCD Variable Name. It can be accessed by StringTableOffset.
+ // SIZE_INFO SizeTable[]; // MaxSize and CurSize for String PCD. It can be accessed by SizeTableOffset.
+ // UINT16 ValueUint16[];
+ // UINT8 ValueUint8[];
+ // BOOLEAN ValueBoolean[];
+} PCD_DATABASE_INIT;
+
+//
+// PEI and DXE Pcd driver use the same PCD database
+//
+typedef PCD_DATABASE_INIT PEI_PCD_DATABASE;
+typedef PCD_DATABASE_INIT DXE_PCD_DATABASE;
+
+typedef struct {
+ PEI_PCD_DATABASE *PeiDb;
+ DXE_PCD_DATABASE *DxeDb;
+} PCD_DATABASE;
+
+typedef struct {
+ UINT32 Offset : 24;
+ UINT32 Value : 8;
+} PCD_DATA_DELTA;
+
+typedef struct {
+ SKU_ID SkuId;
+ UINT16 DefaultId;
+ UINT8 Reserved[6];
+} PCD_DEFAULT_INFO;
+
+typedef struct {
+ //
+ // Full size, it must be at 8 byte alignment.
+ //
+ UINT32 DataSize;
+ //
+ // HeaderSize includes HeaderSize fields and DefaultInfo arrays
+ //
+ UINT32 HeaderSize;
+ //
+ // DefaultInfo arrays those have the same default setting.
+ //
+ PCD_DEFAULT_INFO DefaultInfo[1];
+ //
+ // Default data is stored as variable storage or the array of DATA_DELTA.
+ //
+} PCD_DEFAULT_DATA;
+
+#define PCD_NV_STORE_DEFAULT_BUFFER_SIGNATURE SIGNATURE_32('N', 'S', 'D', 'B')
+
+typedef struct {
+ //
+ // PCD_NV_STORE_DEFAULT_BUFFER_SIGNATURE
+ //
+ UINT32 Signature;
+ //
+ // Length of the taken default buffer
+ //
+ UINT32 Length;
+ //
+ // Length of the total reserved buffer
+ //
+ UINT32 MaxLength;
+ //
+ // Reserved for 8 byte alignment
+ //
+ UINT32 Reserved;
+ // one or more PCD_DEFAULT_DATA
+} PCD_NV_STORE_DEFAULT_BUFFER_HEADER;
+
+//
+// NvStoreDefaultValueBuffer layout:
+// +-------------------------------------+
+// | PCD_NV_STORE_DEFAULT_BUFFER_HEADER |
+// +-------------------------------------+
+// | PCD_DEFAULT_DATA (DEFAULT, Standard)|
+// +-------------------------------------+
+// | PCD_DATA_DELTA (DEFAULT, Standard)|
+// +-------------------------------------+
+// | ...... |
+// +-------------------------------------+
+// | PCD_DEFAULT_DATA (SKU A, Standard) |
+// +-------------------------------------+
+// | PCD_DATA_DELTA (SKU A, Standard) |
+// +-------------------------------------+
+// | ...... |
+// +-------------------------------------+
+//
+
+#pragma pack(1)
+typedef struct {
+ SKU_ID SkuId;
+ SKU_ID SkuIdCompared;
+ UINT32 Length;
+ // PCD_DATA_DELTA DeltaData[]
+} PCD_DATABASE_SKU_DELTA;
+
+//
+// PCD database layout:
+// +---------------------------------+
+// | PCD_DATABASE_INIT (DEFAULT SKU) |
+// +---------------------------------+
+// | PCD_DATABASE_SKU_DELTA (SKU A) |
+// +---------------------------------+
+// | PCD_DATABASE_SKU_DELTA (SKU B) |
+// +---------------------------------+
+// | ...... |
+// +---------------------------------+
+//
+#pragma pack()
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/Performance.h b/MdeModulePkg/Include/Guid/Performance.h
index 58e8f5ec5b..b4d9b6bbd6 100644
--- a/MdeModulePkg/Include/Guid/Performance.h
+++ b/MdeModulePkg/Include/Guid/Performance.h
@@ -1,336 +1,336 @@
-/** @file
- This file defines performance-related definitions, including the format of:
- * performance GUID HOB.
- * performance protocol interfaces.
- * performance variables.
-
-Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __PERFORMANCE_DATA_H__
-#define __PERFORMANCE_DATA_H__
-
-#define PERFORMANCE_PROPERTY_REVISION 0x1
-
-typedef struct {
- UINT32 Revision;
- UINT32 Reserved;
- UINT64 Frequency;
- UINT64 TimerStartValue;
- UINT64 TimerEndValue;
-} PERFORMANCE_PROPERTY;
-
-//
-// PEI_PERFORMANCE_STRING_SIZE must be a multiple of 8.
-//
-#define PEI_PERFORMANCE_STRING_SIZE 8
-#define PEI_PERFORMANCE_STRING_LENGTH (PEI_PERFORMANCE_STRING_SIZE - 1)
-
-typedef struct {
- EFI_PHYSICAL_ADDRESS Handle;
- CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
- CHAR8 Module[PEI_PERFORMANCE_STRING_SIZE]; ///< Module string name.
- UINT64 StartTimeStamp; ///< Start time point.
- UINT64 EndTimeStamp; ///< End time point.
-} PEI_PERFORMANCE_LOG_ENTRY;
-
-//
-// The header must be aligned at 8 bytes.
-//
-typedef struct {
- UINT32 NumberOfEntries; ///< The number of all performance log entries.
- UINT32 Reserved;
-} PEI_PERFORMANCE_LOG_HEADER;
-
-#define PERFORMANCE_PROTOCOL_GUID \
- { 0x76b6bdfa, 0x2acd, 0x4462, { 0x9E, 0x3F, 0xcb, 0x58, 0xC9, 0x69, 0xd9, 0x37 } }
-
-#define PERFORMANCE_EX_PROTOCOL_GUID \
- { 0x1ea81bec, 0xf01a, 0x4d98, { 0xa2, 0x1, 0x4a, 0x61, 0xce, 0x2f, 0xc0, 0x22 } }
-
-//
-// Forward reference for pure ANSI compatibility
-//
-typedef struct _PERFORMANCE_PROTOCOL PERFORMANCE_PROTOCOL;
-typedef struct _PERFORMANCE_EX_PROTOCOL PERFORMANCE_EX_PROTOCOL;
-
-//
-// DXE_PERFORMANCE_STRING_SIZE must be a multiple of 8.
-//
-#define DXE_PERFORMANCE_STRING_SIZE 32
-#define DXE_PERFORMANCE_STRING_LENGTH (DXE_PERFORMANCE_STRING_SIZE - 1)
-
-//
-// The default guage entries number for DXE phase.
-//
-#define INIT_DXE_GAUGE_DATA_ENTRIES 800
-
-typedef struct {
- EFI_PHYSICAL_ADDRESS Handle;
- CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
- CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.
- UINT64 StartTimeStamp; ///< Start time point.
- UINT64 EndTimeStamp; ///< End time point.
-} GAUGE_DATA_ENTRY;
-
-typedef struct {
- EFI_PHYSICAL_ADDRESS Handle;
- CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
- CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.
- UINT64 StartTimeStamp; ///< Start time point.
- UINT64 EndTimeStamp; ///< End time point.
- UINT32 Identifier; ///< Identifier.
-} GAUGE_DATA_ENTRY_EX;
-
-//
-// The header must be aligned at 8 bytes
-//
-typedef struct {
- UINT32 NumberOfEntries; ///< The number of all performance gauge entries.
- UINT32 Reserved;
-} GAUGE_DATA_HEADER;
-
-//
-// SMM Performance Protocol definitions
-//
-
-#define SMM_PERFORMANCE_PROTOCOL_GUID \
- { 0xf866226a, 0xeaa5, 0x4f5a, { 0xa9, 0xa, 0x6c, 0xfb, 0xa5, 0x7c, 0x58, 0x8e } }
-
-#define SMM_PERFORMANCE_EX_PROTOCOL_GUID \
- { 0x931fc048, 0xc71d, 0x4455, { 0x89, 0x30, 0x47, 0x6, 0x30, 0xe3, 0xe, 0xe5 } }
-
-//
-// SMM_PERFORMANCE_STRING_SIZE.
-//
-#define SMM_PERFORMANCE_STRING_SIZE 32
-#define SMM_PERFORMANCE_STRING_LENGTH (SMM_PERFORMANCE_STRING_SIZE - 1)
-
-//
-// The default guage entries number for SMM phase.
-//
-#define INIT_SMM_GAUGE_DATA_ENTRIES 200
-
-typedef struct {
- UINTN Function;
- EFI_STATUS ReturnStatus;
- UINTN NumberOfEntries;
- UINTN LogEntryKey;
- GAUGE_DATA_ENTRY *GaugeData;
-} SMM_PERF_COMMUNICATE;
-
-typedef struct {
- UINTN Function;
- EFI_STATUS ReturnStatus;
- UINTN NumberOfEntries;
- UINTN LogEntryKey;
- GAUGE_DATA_ENTRY_EX *GaugeDataEx;
-} SMM_PERF_COMMUNICATE_EX;
-
-#define SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER 1
-#define SMM_PERF_FUNCTION_GET_GAUGE_DATA 2
-
-/**
- Adds a record at the end of the performance measurement log
- that records the start time of a performance measurement.
-
- The added record contains the Handle, Token, and Module.
- The end time of the new record is not recorded, so it is set to zero.
- If TimeStamp is not zero, then TimeStamp is used to fill in the start time in the record.
- If TimeStamp is zero, the start time in the record is filled in with the value
- read from the current time stamp.
-
- @param Handle The pointer to environment specific context used
- to identify the component being measured.
- @param Token The pointer to a Null-terminated ASCII string
- that identifies the component being measured.
- @param Module The pointer to a Null-terminated ASCII string
- that identifies the module being measured.
- @param TimeStamp The 64-bit time stamp.
-
- @retval EFI_SUCCESS The data was read correctly from the device.
- @retval EFI_OUT_OF_RESOURCES There are not enough resources to record the measurement.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PERFORMANCE_START_GAUGE)(
- IN CONST VOID *Handle OPTIONAL,
- IN CONST CHAR8 *Token OPTIONAL,
- IN CONST CHAR8 *Module OPTIONAL,
- IN UINT64 TimeStamp
- );
-
-/**
- Searches the performance measurement log from the beginning of the log
- for the first matching record that contains a zero end time and fills in a valid end time.
-
- Searches the performance measurement log from the beginning of the log
- for the first record that matches Handle, Token, and Module, and has an end time value of zero.
- If the record can not be found then return EFI_NOT_FOUND.
- If the record is found and TimeStamp is not zero,
- then the end time in the record is filled in with the value specified by TimeStamp.
- If the record is found and TimeStamp is zero, then the end time in the matching record
- is filled in with the current time stamp value.
-
- @param Handle The pointer to environment specific context used
- to identify the component being measured.
- @param Token The pointer to a Null-terminated ASCII string
- that identifies the component being measured.
- @param Module The pointer to a Null-terminated ASCII string
- that identifies the module being measured.
- @param TimeStamp The 64-bit time stamp.
-
- @retval EFI_SUCCESS The end of the measurement was recorded.
- @retval EFI_NOT_FOUND The specified measurement record could not be found.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PERFORMANCE_END_GAUGE)(
- IN CONST VOID *Handle OPTIONAL,
- IN CONST CHAR8 *Token OPTIONAL,
- IN CONST CHAR8 *Module OPTIONAL,
- IN UINT64 TimeStamp
- );
-
-/**
- Retrieves a previously logged performance measurement.
- It can also retrieve the log created by StartGaugeEx and EndGaugeEx of PERFORMANCE_EX_PROTOCOL,
- and then eliminate the Identifier.
-
- Retrieves the performance log entry from the performance log specified by LogEntryKey.
- If it stands for a valid entry, then EFI_SUCCESS is returned and
- GaugeDataEntry stores the pointer to that entry.
-
- @param LogEntryKey The key for the previous performance measurement log entry.
- If 0, then the first performance measurement log entry is retrieved.
- @param GaugeDataEntry Out parameter for the indirect pointer to the gauge data entry specified by LogEntryKey.
-
- @retval EFI_SUCCESS The GuageDataEntry is successfully found based on LogEntryKey.
- @retval EFI_NOT_FOUND There is no entry after the measurement referred to by LogEntryKey.
- @retval EFI_INVALID_PARAMETER The LogEntryKey is not a valid entry, or GaugeDataEntry is NULL.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PERFORMANCE_GET_GAUGE)(
- IN UINTN LogEntryKey,
- OUT GAUGE_DATA_ENTRY **GaugeDataEntry
- );
-
-/**
- Adds a record at the end of the performance measurement log
- that records the start time of a performance measurement.
-
- The added record contains the Handle, Token, Module and Identifier.
- The end time of the new record is not recorded, so it is set to zero.
- If TimeStamp is not zero, then TimeStamp is used to fill in the start time in the record.
- If TimeStamp is zero, the start time in the record is filled in with the value
- read from the current time stamp.
-
- @param Handle The pointer to environment specific context used
- to identify the component being measured.
- @param Token The pointer to a Null-terminated ASCII string
- that identifies the component being measured.
- @param Module The pointer to a Null-terminated ASCII string
- that identifies the module being measured.
- @param TimeStamp The 64-bit time stamp.
- @param Identifier 32-bit identifier. If the value is 0, the created record
- is same as the one created by StartGauge of PERFORMANCE_PROTOCOL.
-
- @retval EFI_SUCCESS The data was read correctly from the device.
- @retval EFI_OUT_OF_RESOURCES There are not enough resources to record the measurement.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PERFORMANCE_START_GAUGE_EX)(
- IN CONST VOID *Handle OPTIONAL,
- IN CONST CHAR8 *Token OPTIONAL,
- IN CONST CHAR8 *Module OPTIONAL,
- IN UINT64 TimeStamp,
- IN UINT32 Identifier
- );
-
-/**
- Searches the performance measurement log from the beginning of the log
- for the first matching record that contains a zero end time and fills in a valid end time.
-
- Searches the performance measurement log from the beginning of the log
- for the first record that matches Handle, Token, Module and Identifier, and has an end time value of zero.
- If the record can not be found then return EFI_NOT_FOUND.
- If the record is found and TimeStamp is not zero,
- then the end time in the record is filled in with the value specified by TimeStamp.
- If the record is found and TimeStamp is zero, then the end time in the matching record
- is filled in with the current time stamp value.
-
- @param Handle The pointer to environment specific context used
- to identify the component being measured.
- @param Token The pointer to a Null-terminated ASCII string
- that identifies the component being measured.
- @param Module The pointer to a Null-terminated ASCII string
- that identifies the module being measured.
- @param TimeStamp The 64-bit time stamp.
- @param Identifier 32-bit identifier. If the value is 0, the found record
- is same as the one found by EndGauge of PERFORMANCE_PROTOCOL.
-
- @retval EFI_SUCCESS The end of the measurement was recorded.
- @retval EFI_NOT_FOUND The specified measurement record could not be found.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PERFORMANCE_END_GAUGE_EX)(
- IN CONST VOID *Handle OPTIONAL,
- IN CONST CHAR8 *Token OPTIONAL,
- IN CONST CHAR8 *Module OPTIONAL,
- IN UINT64 TimeStamp,
- IN UINT32 Identifier
- );
-
-/**
- Retrieves a previously logged performance measurement.
- It can also retrieve the log created by StartGauge and EndGauge of PERFORMANCE_PROTOCOL,
- and then assign the Identifier with 0.
-
- Retrieves the performance log entry from the performance log specified by LogEntryKey.
- If it stands for a valid entry, then EFI_SUCCESS is returned and
- GaugeDataEntryEx stores the pointer to that entry.
-
- @param LogEntryKey The key for the previous performance measurement log entry.
- If 0, then the first performance measurement log entry is retrieved.
- @param GaugeDataEntryEx Out parameter for the indirect pointer to the extented gauge data entry specified by LogEntryKey.
-
- @retval EFI_SUCCESS The GuageDataEntryEx is successfully found based on LogEntryKey.
- @retval EFI_NOT_FOUND There is no entry after the measurement referred to by LogEntryKey.
- @retval EFI_INVALID_PARAMETER The LogEntryKey is not a valid entry, or GaugeDataEntryEx is NULL.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PERFORMANCE_GET_GAUGE_EX)(
- IN UINTN LogEntryKey,
- OUT GAUGE_DATA_ENTRY_EX **GaugeDataEntryEx
- );
-
-struct _PERFORMANCE_PROTOCOL {
- PERFORMANCE_START_GAUGE StartGauge;
- PERFORMANCE_END_GAUGE EndGauge;
- PERFORMANCE_GET_GAUGE GetGauge;
-};
-
-struct _PERFORMANCE_EX_PROTOCOL {
- PERFORMANCE_START_GAUGE_EX StartGaugeEx;
- PERFORMANCE_END_GAUGE_EX EndGaugeEx;
- PERFORMANCE_GET_GAUGE_EX GetGaugeEx;
-};
-
-extern EFI_GUID gPerformanceProtocolGuid;
-extern EFI_GUID gSmmPerformanceProtocolGuid;
-extern EFI_GUID gPerformanceExProtocolGuid;
-extern EFI_GUID gSmmPerformanceExProtocolGuid;
-
-#endif
+/** @file
+ This file defines performance-related definitions, including the format of:
+ * performance GUID HOB.
+ * performance protocol interfaces.
+ * performance variables.
+
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __PERFORMANCE_DATA_H__
+#define __PERFORMANCE_DATA_H__
+
+#define PERFORMANCE_PROPERTY_REVISION 0x1
+
+typedef struct {
+ UINT32 Revision;
+ UINT32 Reserved;
+ UINT64 Frequency;
+ UINT64 TimerStartValue;
+ UINT64 TimerEndValue;
+} PERFORMANCE_PROPERTY;
+
+//
+// PEI_PERFORMANCE_STRING_SIZE must be a multiple of 8.
+//
+#define PEI_PERFORMANCE_STRING_SIZE 8
+#define PEI_PERFORMANCE_STRING_LENGTH (PEI_PERFORMANCE_STRING_SIZE - 1)
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS Handle;
+ CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
+ CHAR8 Module[PEI_PERFORMANCE_STRING_SIZE]; ///< Module string name.
+ UINT64 StartTimeStamp; ///< Start time point.
+ UINT64 EndTimeStamp; ///< End time point.
+} PEI_PERFORMANCE_LOG_ENTRY;
+
+//
+// The header must be aligned at 8 bytes.
+//
+typedef struct {
+ UINT32 NumberOfEntries; ///< The number of all performance log entries.
+ UINT32 Reserved;
+} PEI_PERFORMANCE_LOG_HEADER;
+
+#define PERFORMANCE_PROTOCOL_GUID \
+ { 0x76b6bdfa, 0x2acd, 0x4462, { 0x9E, 0x3F, 0xcb, 0x58, 0xC9, 0x69, 0xd9, 0x37 } }
+
+#define PERFORMANCE_EX_PROTOCOL_GUID \
+ { 0x1ea81bec, 0xf01a, 0x4d98, { 0xa2, 0x1, 0x4a, 0x61, 0xce, 0x2f, 0xc0, 0x22 } }
+
+//
+// Forward reference for pure ANSI compatibility
+//
+typedef struct _PERFORMANCE_PROTOCOL PERFORMANCE_PROTOCOL;
+typedef struct _PERFORMANCE_EX_PROTOCOL PERFORMANCE_EX_PROTOCOL;
+
+//
+// DXE_PERFORMANCE_STRING_SIZE must be a multiple of 8.
+//
+#define DXE_PERFORMANCE_STRING_SIZE 32
+#define DXE_PERFORMANCE_STRING_LENGTH (DXE_PERFORMANCE_STRING_SIZE - 1)
+
+//
+// The default guage entries number for DXE phase.
+//
+#define INIT_DXE_GAUGE_DATA_ENTRIES 800
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS Handle;
+ CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
+ CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.
+ UINT64 StartTimeStamp; ///< Start time point.
+ UINT64 EndTimeStamp; ///< End time point.
+} GAUGE_DATA_ENTRY;
+
+typedef struct {
+ EFI_PHYSICAL_ADDRESS Handle;
+ CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name.
+ CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name.
+ UINT64 StartTimeStamp; ///< Start time point.
+ UINT64 EndTimeStamp; ///< End time point.
+ UINT32 Identifier; ///< Identifier.
+} GAUGE_DATA_ENTRY_EX;
+
+//
+// The header must be aligned at 8 bytes
+//
+typedef struct {
+ UINT32 NumberOfEntries; ///< The number of all performance gauge entries.
+ UINT32 Reserved;
+} GAUGE_DATA_HEADER;
+
+//
+// SMM Performance Protocol definitions
+//
+
+#define SMM_PERFORMANCE_PROTOCOL_GUID \
+ { 0xf866226a, 0xeaa5, 0x4f5a, { 0xa9, 0xa, 0x6c, 0xfb, 0xa5, 0x7c, 0x58, 0x8e } }
+
+#define SMM_PERFORMANCE_EX_PROTOCOL_GUID \
+ { 0x931fc048, 0xc71d, 0x4455, { 0x89, 0x30, 0x47, 0x6, 0x30, 0xe3, 0xe, 0xe5 } }
+
+//
+// SMM_PERFORMANCE_STRING_SIZE.
+//
+#define SMM_PERFORMANCE_STRING_SIZE 32
+#define SMM_PERFORMANCE_STRING_LENGTH (SMM_PERFORMANCE_STRING_SIZE - 1)
+
+//
+// The default guage entries number for SMM phase.
+//
+#define INIT_SMM_GAUGE_DATA_ENTRIES 200
+
+typedef struct {
+ UINTN Function;
+ EFI_STATUS ReturnStatus;
+ UINTN NumberOfEntries;
+ UINTN LogEntryKey;
+ GAUGE_DATA_ENTRY *GaugeData;
+} SMM_PERF_COMMUNICATE;
+
+typedef struct {
+ UINTN Function;
+ EFI_STATUS ReturnStatus;
+ UINTN NumberOfEntries;
+ UINTN LogEntryKey;
+ GAUGE_DATA_ENTRY_EX *GaugeDataEx;
+} SMM_PERF_COMMUNICATE_EX;
+
+#define SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER 1
+#define SMM_PERF_FUNCTION_GET_GAUGE_DATA 2
+
+/**
+ Adds a record at the end of the performance measurement log
+ that records the start time of a performance measurement.
+
+ The added record contains the Handle, Token, and Module.
+ The end time of the new record is not recorded, so it is set to zero.
+ If TimeStamp is not zero, then TimeStamp is used to fill in the start time in the record.
+ If TimeStamp is zero, the start time in the record is filled in with the value
+ read from the current time stamp.
+
+ @param Handle The pointer to environment specific context used
+ to identify the component being measured.
+ @param Token The pointer to a Null-terminated ASCII string
+ that identifies the component being measured.
+ @param Module The pointer to a Null-terminated ASCII string
+ that identifies the module being measured.
+ @param TimeStamp The 64-bit time stamp.
+
+ @retval EFI_SUCCESS The data was read correctly from the device.
+ @retval EFI_OUT_OF_RESOURCES There are not enough resources to record the measurement.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *PERFORMANCE_START_GAUGE)(
+ IN CONST VOID *Handle OPTIONAL,
+ IN CONST CHAR8 *Token OPTIONAL,
+ IN CONST CHAR8 *Module OPTIONAL,
+ IN UINT64 TimeStamp
+ );
+
+/**
+ Searches the performance measurement log from the beginning of the log
+ for the first matching record that contains a zero end time and fills in a valid end time.
+
+ Searches the performance measurement log from the beginning of the log
+ for the first record that matches Handle, Token, and Module, and has an end time value of zero.
+ If the record can not be found then return EFI_NOT_FOUND.
+ If the record is found and TimeStamp is not zero,
+ then the end time in the record is filled in with the value specified by TimeStamp.
+ If the record is found and TimeStamp is zero, then the end time in the matching record
+ is filled in with the current time stamp value.
+
+ @param Handle The pointer to environment specific context used
+ to identify the component being measured.
+ @param Token The pointer to a Null-terminated ASCII string
+ that identifies the component being measured.
+ @param Module The pointer to a Null-terminated ASCII string
+ that identifies the module being measured.
+ @param TimeStamp The 64-bit time stamp.
+
+ @retval EFI_SUCCESS The end of the measurement was recorded.
+ @retval EFI_NOT_FOUND The specified measurement record could not be found.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *PERFORMANCE_END_GAUGE)(
+ IN CONST VOID *Handle OPTIONAL,
+ IN CONST CHAR8 *Token OPTIONAL,
+ IN CONST CHAR8 *Module OPTIONAL,
+ IN UINT64 TimeStamp
+ );
+
+/**
+ Retrieves a previously logged performance measurement.
+ It can also retrieve the log created by StartGaugeEx and EndGaugeEx of PERFORMANCE_EX_PROTOCOL,
+ and then eliminate the Identifier.
+
+ Retrieves the performance log entry from the performance log specified by LogEntryKey.
+ If it stands for a valid entry, then EFI_SUCCESS is returned and
+ GaugeDataEntry stores the pointer to that entry.
+
+ @param LogEntryKey The key for the previous performance measurement log entry.
+ If 0, then the first performance measurement log entry is retrieved.
+ @param GaugeDataEntry Out parameter for the indirect pointer to the gauge data entry specified by LogEntryKey.
+
+ @retval EFI_SUCCESS The GuageDataEntry is successfully found based on LogEntryKey.
+ @retval EFI_NOT_FOUND There is no entry after the measurement referred to by LogEntryKey.
+ @retval EFI_INVALID_PARAMETER The LogEntryKey is not a valid entry, or GaugeDataEntry is NULL.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *PERFORMANCE_GET_GAUGE)(
+ IN UINTN LogEntryKey,
+ OUT GAUGE_DATA_ENTRY **GaugeDataEntry
+ );
+
+/**
+ Adds a record at the end of the performance measurement log
+ that records the start time of a performance measurement.
+
+ The added record contains the Handle, Token, Module and Identifier.
+ The end time of the new record is not recorded, so it is set to zero.
+ If TimeStamp is not zero, then TimeStamp is used to fill in the start time in the record.
+ If TimeStamp is zero, the start time in the record is filled in with the value
+ read from the current time stamp.
+
+ @param Handle The pointer to environment specific context used
+ to identify the component being measured.
+ @param Token The pointer to a Null-terminated ASCII string
+ that identifies the component being measured.
+ @param Module The pointer to a Null-terminated ASCII string
+ that identifies the module being measured.
+ @param TimeStamp The 64-bit time stamp.
+ @param Identifier 32-bit identifier. If the value is 0, the created record
+ is same as the one created by StartGauge of PERFORMANCE_PROTOCOL.
+
+ @retval EFI_SUCCESS The data was read correctly from the device.
+ @retval EFI_OUT_OF_RESOURCES There are not enough resources to record the measurement.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *PERFORMANCE_START_GAUGE_EX)(
+ IN CONST VOID *Handle OPTIONAL,
+ IN CONST CHAR8 *Token OPTIONAL,
+ IN CONST CHAR8 *Module OPTIONAL,
+ IN UINT64 TimeStamp,
+ IN UINT32 Identifier
+ );
+
+/**
+ Searches the performance measurement log from the beginning of the log
+ for the first matching record that contains a zero end time and fills in a valid end time.
+
+ Searches the performance measurement log from the beginning of the log
+ for the first record that matches Handle, Token, Module and Identifier, and has an end time value of zero.
+ If the record can not be found then return EFI_NOT_FOUND.
+ If the record is found and TimeStamp is not zero,
+ then the end time in the record is filled in with the value specified by TimeStamp.
+ If the record is found and TimeStamp is zero, then the end time in the matching record
+ is filled in with the current time stamp value.
+
+ @param Handle The pointer to environment specific context used
+ to identify the component being measured.
+ @param Token The pointer to a Null-terminated ASCII string
+ that identifies the component being measured.
+ @param Module The pointer to a Null-terminated ASCII string
+ that identifies the module being measured.
+ @param TimeStamp The 64-bit time stamp.
+ @param Identifier 32-bit identifier. If the value is 0, the found record
+ is same as the one found by EndGauge of PERFORMANCE_PROTOCOL.
+
+ @retval EFI_SUCCESS The end of the measurement was recorded.
+ @retval EFI_NOT_FOUND The specified measurement record could not be found.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *PERFORMANCE_END_GAUGE_EX)(
+ IN CONST VOID *Handle OPTIONAL,
+ IN CONST CHAR8 *Token OPTIONAL,
+ IN CONST CHAR8 *Module OPTIONAL,
+ IN UINT64 TimeStamp,
+ IN UINT32 Identifier
+ );
+
+/**
+ Retrieves a previously logged performance measurement.
+ It can also retrieve the log created by StartGauge and EndGauge of PERFORMANCE_PROTOCOL,
+ and then assign the Identifier with 0.
+
+ Retrieves the performance log entry from the performance log specified by LogEntryKey.
+ If it stands for a valid entry, then EFI_SUCCESS is returned and
+ GaugeDataEntryEx stores the pointer to that entry.
+
+ @param LogEntryKey The key for the previous performance measurement log entry.
+ If 0, then the first performance measurement log entry is retrieved.
+ @param GaugeDataEntryEx Out parameter for the indirect pointer to the extented gauge data entry specified by LogEntryKey.
+
+ @retval EFI_SUCCESS The GuageDataEntryEx is successfully found based on LogEntryKey.
+ @retval EFI_NOT_FOUND There is no entry after the measurement referred to by LogEntryKey.
+ @retval EFI_INVALID_PARAMETER The LogEntryKey is not a valid entry, or GaugeDataEntryEx is NULL.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *PERFORMANCE_GET_GAUGE_EX)(
+ IN UINTN LogEntryKey,
+ OUT GAUGE_DATA_ENTRY_EX **GaugeDataEntryEx
+ );
+
+struct _PERFORMANCE_PROTOCOL {
+ PERFORMANCE_START_GAUGE StartGauge;
+ PERFORMANCE_END_GAUGE EndGauge;
+ PERFORMANCE_GET_GAUGE GetGauge;
+};
+
+struct _PERFORMANCE_EX_PROTOCOL {
+ PERFORMANCE_START_GAUGE_EX StartGaugeEx;
+ PERFORMANCE_END_GAUGE_EX EndGaugeEx;
+ PERFORMANCE_GET_GAUGE_EX GetGaugeEx;
+};
+
+extern EFI_GUID gPerformanceProtocolGuid;
+extern EFI_GUID gSmmPerformanceProtocolGuid;
+extern EFI_GUID gPerformanceExProtocolGuid;
+extern EFI_GUID gSmmPerformanceExProtocolGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/PerformanceMeasurement.h b/MdeModulePkg/Include/Guid/PerformanceMeasurement.h
index ddee8bfe5b..83a069dd75 100644
--- a/MdeModulePkg/Include/Guid/PerformanceMeasurement.h
+++ b/MdeModulePkg/Include/Guid/PerformanceMeasurement.h
@@ -1,72 +1,72 @@
-/** @file
-
-Performance measurement protocol, allows logging performance data.
-
-Copyright (c) 2017, Microsoft Corporation<BR>
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _PERFORMANCE_MEASUREMENT_H_
-#define _PERFORMANCE_MEASUREMENT_H_
-
-//
-// GUID for Performance measurement Protocol
-//
-#define PERFORMANCE_MEASUREMENT_PROTOCOL_GUID \
- { 0xc85d06be, 0x5f75, 0x48ce, {0xa8, 0x0f, 0x12, 0x36, 0xba, 0x3b, 0x87, 0xb1 } }
-
-#define SMM_PERFORMANCE_MEASUREMENT_PROTOCOL_GUID \
- { 0xd56b6d73, 0x1a7b, 0x4015, {0x9b, 0xb4, 0x7b, 0x07, 0x17, 0x29, 0xed, 0x24 } }
-
-typedef struct _EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL;
-
-typedef enum {
- PerfStartEntry, // used in StartPerformanceMeasurement()/StartPerformanceMeasurementEx()
- // (map to PERF_START/PERF_START_EX)
- PerfEndEntry, // used in EndPerformanceMeasurement()/EndPerformanceMeasurementEx()
- // (map to PERF_END/PERF_END_EX)
- PerfEntry // used in LogPerformanceMeasurement()
- // (map to other Perf macros except above 4 macros)
-} PERF_MEASUREMENT_ATTRIBUTE;
-
-/**
- Create performance record with event description and a timestamp.
-
- @param CallerIdentifier - Image handle or pointer to caller ID GUID.
- @param Guid - Pointer to a GUID.
- @param String - Pointer to a string describing the measurement.
- @param TimeStamp - 64-bit time stamp.
- @param Address - Pointer to a location in memory relevant to the measurement.
- @param Identifier - Performance identifier describing the type of measurement.
- @param Attribute - The attribute of the measurement. According to attribute can create a start
- record for PERF_START/PERF_START_EX, or a end record for PERF_END/PERF_END_EX,
- or a general record for other Perf macros.
-
- @retval EFI_SUCCESS - Successfully created performance record.
- @retval EFI_OUT_OF_RESOURCES - Ran out of space to store the records.
- @retval EFI_INVALID_PARAMETER - Invalid parameter passed to function - NULL
- pointer or invalid PerfId.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *CREATE_PERFORMANCE_MEASUREMENT)(
- IN CONST VOID *CallerIdentifier OPTIONAL,
- IN CONST VOID *Guid OPTIONAL,
- IN CONST CHAR8 *String OPTIONAL,
- IN UINT64 TimeStamp OPTIONAL,
- IN UINT64 Address OPTIONAL,
- IN UINT32 Identifier,
- IN PERF_MEASUREMENT_ATTRIBUTE Attribute
- );
-
-struct _EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL {
- CREATE_PERFORMANCE_MEASUREMENT CreatePerformanceMeasurement;
-};
-
-extern EFI_GUID gEdkiiPerformanceMeasurementProtocolGuid;
-extern EFI_GUID gEdkiiSmmPerformanceMeasurementProtocolGuid;
-
-#endif // _PERFORMANCE_MEASUREMENT_H_
+/** @file
+
+Performance measurement protocol, allows logging performance data.
+
+Copyright (c) 2017, Microsoft Corporation<BR>
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _PERFORMANCE_MEASUREMENT_H_
+#define _PERFORMANCE_MEASUREMENT_H_
+
+//
+// GUID for Performance measurement Protocol
+//
+#define PERFORMANCE_MEASUREMENT_PROTOCOL_GUID \
+ { 0xc85d06be, 0x5f75, 0x48ce, {0xa8, 0x0f, 0x12, 0x36, 0xba, 0x3b, 0x87, 0xb1 } }
+
+#define SMM_PERFORMANCE_MEASUREMENT_PROTOCOL_GUID \
+ { 0xd56b6d73, 0x1a7b, 0x4015, {0x9b, 0xb4, 0x7b, 0x07, 0x17, 0x29, 0xed, 0x24 } }
+
+typedef struct _EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL;
+
+typedef enum {
+ PerfStartEntry, // used in StartPerformanceMeasurement()/StartPerformanceMeasurementEx()
+ // (map to PERF_START/PERF_START_EX)
+ PerfEndEntry, // used in EndPerformanceMeasurement()/EndPerformanceMeasurementEx()
+ // (map to PERF_END/PERF_END_EX)
+ PerfEntry // used in LogPerformanceMeasurement()
+ // (map to other Perf macros except above 4 macros)
+} PERF_MEASUREMENT_ATTRIBUTE;
+
+/**
+ Create performance record with event description and a timestamp.
+
+ @param CallerIdentifier - Image handle or pointer to caller ID GUID.
+ @param Guid - Pointer to a GUID.
+ @param String - Pointer to a string describing the measurement.
+ @param TimeStamp - 64-bit time stamp.
+ @param Address - Pointer to a location in memory relevant to the measurement.
+ @param Identifier - Performance identifier describing the type of measurement.
+ @param Attribute - The attribute of the measurement. According to attribute can create a start
+ record for PERF_START/PERF_START_EX, or a end record for PERF_END/PERF_END_EX,
+ or a general record for other Perf macros.
+
+ @retval EFI_SUCCESS - Successfully created performance record.
+ @retval EFI_OUT_OF_RESOURCES - Ran out of space to store the records.
+ @retval EFI_INVALID_PARAMETER - Invalid parameter passed to function - NULL
+ pointer or invalid PerfId.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *CREATE_PERFORMANCE_MEASUREMENT)(
+ IN CONST VOID *CallerIdentifier OPTIONAL,
+ IN CONST VOID *Guid OPTIONAL,
+ IN CONST CHAR8 *String OPTIONAL,
+ IN UINT64 TimeStamp OPTIONAL,
+ IN UINT64 Address OPTIONAL,
+ IN UINT32 Identifier,
+ IN PERF_MEASUREMENT_ATTRIBUTE Attribute
+ );
+
+struct _EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL {
+ CREATE_PERFORMANCE_MEASUREMENT CreatePerformanceMeasurement;
+};
+
+extern EFI_GUID gEdkiiPerformanceMeasurementProtocolGuid;
+extern EFI_GUID gEdkiiSmmPerformanceMeasurementProtocolGuid;
+
+#endif // _PERFORMANCE_MEASUREMENT_H_
diff --git a/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h b/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h
index 93fa39771f..c001f583c4 100644
--- a/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h
+++ b/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h
@@ -1,57 +1,57 @@
-/** @file
-
-Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _PI_SMM_COMMUNICATION_REGION_TABLE_H_
-#define _PI_SMM_COMMUNICATION_REGION_TABLE_H_
-
-#define EDKII_PI_SMM_COMMUNICATION_REGION_TABLE_GUID {\
- 0x4e28ca50, 0xd582, 0x44ac, {0xa1, 0x1f, 0xe3, 0xd5, 0x65, 0x26, 0xdb, 0x34} \
-}
-
-//
-// This table to declare the generic SMM communication buffer location.
-// If this table is present, it means the SMM communication buffer is restricted to
-// EfiReservedMemoryType, EfiACPIMemoryNVS, or EfiRuntimeServicesData.
-//
-// This table is installed to UEFI configuration table by generic driver
-// or platform driver, at early DXE phase.
-//
-// The EFI_MEMORY_DESCRIPTOR entry must contain at least one entry.
-// The entries must be normal memory region in EfiReservedMemoryType, EfiACPIMemoryNVS,
-// or EfiRuntimeServicesData.
-// If the Entry.Type is EfiConventionalMemory, it means this entry is free to use.
-// If the Entry.Type is other, it means this entry is occupied.
-//
-// Any non-SMM component may put communication data there, then use
-// UEFI defined SMM Communication ACPI Table, or PI defined EFI_SMM_COMMUNICATION_PROTOCOL
-// to communicate with SMI handler. The process is:
-// 1) Find an entry whose type is EfiConventional.
-// 2) Change type to be EfiReservedMemoryType before use.
-// 3) Use it.
-// 4) Restore type be EfiConventional.
-// The step 2) must be performed as an atomic transaction, if there might be conflict during runtime.
-// For example, on IA-32/x64 platforms, this can be done using the CMPXCHG CPU instruction.
-// If there is guarantee on no conflict during boot time, these steps can be skipped.
-// For example, DXE, UEFI driver and UEFI application runs in sequence.
-//
-// For example, FPDT driver can use this communication buffer to get SMM
-// performance data in SMM. Profile driver can use this communication buffer
-// to get SMM profile data in SMM.
-//
-typedef struct {
- UINT32 Version;
- UINT32 NumberOfEntries;
- UINT32 DescriptorSize;
- UINT32 Reserved;
- // EFI_MEMORY_DESCRIPTOR Entry[1];
-} EDKII_PI_SMM_COMMUNICATION_REGION_TABLE;
-
-#define EDKII_PI_SMM_COMMUNICATION_REGION_TABLE_VERSION 0x00000001
-
-extern EFI_GUID gEdkiiPiSmmCommunicationRegionTableGuid;
-
-#endif
+/** @file
+
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _PI_SMM_COMMUNICATION_REGION_TABLE_H_
+#define _PI_SMM_COMMUNICATION_REGION_TABLE_H_
+
+#define EDKII_PI_SMM_COMMUNICATION_REGION_TABLE_GUID {\
+ 0x4e28ca50, 0xd582, 0x44ac, {0xa1, 0x1f, 0xe3, 0xd5, 0x65, 0x26, 0xdb, 0x34} \
+}
+
+//
+// This table to declare the generic SMM communication buffer location.
+// If this table is present, it means the SMM communication buffer is restricted to
+// EfiReservedMemoryType, EfiACPIMemoryNVS, or EfiRuntimeServicesData.
+//
+// This table is installed to UEFI configuration table by generic driver
+// or platform driver, at early DXE phase.
+//
+// The EFI_MEMORY_DESCRIPTOR entry must contain at least one entry.
+// The entries must be normal memory region in EfiReservedMemoryType, EfiACPIMemoryNVS,
+// or EfiRuntimeServicesData.
+// If the Entry.Type is EfiConventionalMemory, it means this entry is free to use.
+// If the Entry.Type is other, it means this entry is occupied.
+//
+// Any non-SMM component may put communication data there, then use
+// UEFI defined SMM Communication ACPI Table, or PI defined EFI_SMM_COMMUNICATION_PROTOCOL
+// to communicate with SMI handler. The process is:
+// 1) Find an entry whose type is EfiConventional.
+// 2) Change type to be EfiReservedMemoryType before use.
+// 3) Use it.
+// 4) Restore type be EfiConventional.
+// The step 2) must be performed as an atomic transaction, if there might be conflict during runtime.
+// For example, on IA-32/x64 platforms, this can be done using the CMPXCHG CPU instruction.
+// If there is guarantee on no conflict during boot time, these steps can be skipped.
+// For example, DXE, UEFI driver and UEFI application runs in sequence.
+//
+// For example, FPDT driver can use this communication buffer to get SMM
+// performance data in SMM. Profile driver can use this communication buffer
+// to get SMM profile data in SMM.
+//
+typedef struct {
+ UINT32 Version;
+ UINT32 NumberOfEntries;
+ UINT32 DescriptorSize;
+ UINT32 Reserved;
+ // EFI_MEMORY_DESCRIPTOR Entry[1];
+} EDKII_PI_SMM_COMMUNICATION_REGION_TABLE;
+
+#define EDKII_PI_SMM_COMMUNICATION_REGION_TABLE_VERSION 0x00000001
+
+extern EFI_GUID gEdkiiPiSmmCommunicationRegionTableGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/PiSmmMemoryAttributesTable.h b/MdeModulePkg/Include/Guid/PiSmmMemoryAttributesTable.h
index 88f67232bd..8303126ca1 100644
--- a/MdeModulePkg/Include/Guid/PiSmmMemoryAttributesTable.h
+++ b/MdeModulePkg/Include/Guid/PiSmmMemoryAttributesTable.h
@@ -1,45 +1,45 @@
-/** @file
- Define the GUID of the EDKII PI SMM memory attribute table, which
- is published by PI SMM Core.
-
-Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _PI_SMM_MEMORY_ATTRIBUTES_TABLE_H_
-#define _PI_SMM_MEMORY_ATTRIBUTES_TABLE_H_
-
-#define EDKII_PI_SMM_MEMORY_ATTRIBUTES_TABLE_GUID {\
- 0x6b9fd3f7, 0x16df, 0x45e8, {0xbd, 0x39, 0xb9, 0x4a, 0x66, 0x54, 0x1a, 0x5d} \
-}
-
-//
-// The PI SMM memory attribute table contains the SMM memory map for SMM image.
-//
-// This table is installed to SMST as SMM configuration table.
-//
-// This table is published at gEfiSmmEndOfDxeProtocolGuid notification, because
-// there should be no more SMM driver loaded after that. The EfiRuntimeServicesCode
-// region should not be changed any more.
-//
-// This table is published, if and only if all SMM PE/COFF have aligned section
-// as specified in UEFI specification Section 2.3. For example, IA32/X64 alignment is 4KiB.
-//
-// If this table is published, the EfiRuntimeServicesCode contains code only
-// and it is EFI_MEMORY_RO; the EfiRuntimeServicesData contains data only
-// and it is EFI_MEMORY_XP.
-//
-typedef struct {
- UINT32 Version;
- UINT32 NumberOfEntries;
- UINT32 DescriptorSize;
- UINT32 Reserved;
- // EFI_MEMORY_DESCRIPTOR Entry[1];
-} EDKII_PI_SMM_MEMORY_ATTRIBUTES_TABLE;
-
-#define EDKII_PI_SMM_MEMORY_ATTRIBUTES_TABLE_VERSION 0x00000001
-
-extern EFI_GUID gEdkiiPiSmmMemoryAttributesTableGuid;
-
-#endif
+/** @file
+ Define the GUID of the EDKII PI SMM memory attribute table, which
+ is published by PI SMM Core.
+
+Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _PI_SMM_MEMORY_ATTRIBUTES_TABLE_H_
+#define _PI_SMM_MEMORY_ATTRIBUTES_TABLE_H_
+
+#define EDKII_PI_SMM_MEMORY_ATTRIBUTES_TABLE_GUID {\
+ 0x6b9fd3f7, 0x16df, 0x45e8, {0xbd, 0x39, 0xb9, 0x4a, 0x66, 0x54, 0x1a, 0x5d} \
+}
+
+//
+// The PI SMM memory attribute table contains the SMM memory map for SMM image.
+//
+// This table is installed to SMST as SMM configuration table.
+//
+// This table is published at gEfiSmmEndOfDxeProtocolGuid notification, because
+// there should be no more SMM driver loaded after that. The EfiRuntimeServicesCode
+// region should not be changed any more.
+//
+// This table is published, if and only if all SMM PE/COFF have aligned section
+// as specified in UEFI specification Section 2.3. For example, IA32/X64 alignment is 4KiB.
+//
+// If this table is published, the EfiRuntimeServicesCode contains code only
+// and it is EFI_MEMORY_RO; the EfiRuntimeServicesData contains data only
+// and it is EFI_MEMORY_XP.
+//
+typedef struct {
+ UINT32 Version;
+ UINT32 NumberOfEntries;
+ UINT32 DescriptorSize;
+ UINT32 Reserved;
+ // EFI_MEMORY_DESCRIPTOR Entry[1];
+} EDKII_PI_SMM_MEMORY_ATTRIBUTES_TABLE;
+
+#define EDKII_PI_SMM_MEMORY_ATTRIBUTES_TABLE_VERSION 0x00000001
+
+extern EFI_GUID gEdkiiPiSmmMemoryAttributesTableGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h b/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h
index 811160433a..0c24c88dcc 100644
--- a/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h
+++ b/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h
@@ -1,19 +1,19 @@
-/** @file
- GUIDs used as HII FormSet and HII Package list GUID in PlatDriOverride driver.
-
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __PLATFORM_DRIVER_OVERRIDE_HII_GUID_H__
-#define __PLATFORM_DRIVER_OVERRIDE_HII_GUID_H__
-
-#define PLAT_OVER_MNGR_GUID \
- { \
- 0x8614567d, 0x35be, 0x4415, {0x8d, 0x88, 0xbd, 0x7d, 0xc, 0x9c, 0x70, 0xc0} \
- }
-
-extern EFI_GUID gPlatformOverridesManagerGuid;
-
-#endif
+/** @file
+ GUIDs used as HII FormSet and HII Package list GUID in PlatDriOverride driver.
+
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __PLATFORM_DRIVER_OVERRIDE_HII_GUID_H__
+#define __PLATFORM_DRIVER_OVERRIDE_HII_GUID_H__
+
+#define PLAT_OVER_MNGR_GUID \
+ { \
+ 0x8614567d, 0x35be, 0x4415, {0x8d, 0x88, 0xbd, 0x7d, 0xc, 0x9c, 0x70, 0xc0} \
+ }
+
+extern EFI_GUID gPlatformOverridesManagerGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/PlatformHasAcpi.h b/MdeModulePkg/Include/Guid/PlatformHasAcpi.h
index d54fad77c0..d690839cba 100644
--- a/MdeModulePkg/Include/Guid/PlatformHasAcpi.h
+++ b/MdeModulePkg/Include/Guid/PlatformHasAcpi.h
@@ -1,28 +1,28 @@
-/** @file
- EDKII Platform Has ACPI GUID
-
- A NULL protocol instance with this GUID in the DXE protocol database, and/or
- a NULL PPI with this GUID in the PPI database, implies that the platform
- provides the operating system with an ACPI-based hardware description. Note
- that this is not necessarily exclusive with different kinds of hardware
- description (for example, a Device Tree-based one). A platform driver and/or
- PEIM is supposed to produce a single instance of the protocol and/or PPI
- (with NULL contents), if appropriate.
-
- Copyright (C) 2017, Red Hat, Inc.
-
- SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#ifndef __EDKII_PLATFORM_HAS_ACPI_H__
-#define __EDKII_PLATFORM_HAS_ACPI_H__
-
-#define EDKII_PLATFORM_HAS_ACPI_GUID \
- { \
- 0xf0966b41, 0xc23f, 0x41b9, \
- { 0x96, 0x04, 0x0f, 0xf7, 0xe1, 0x11, 0x96, 0x5a } \
- }
-
-extern EFI_GUID gEdkiiPlatformHasAcpiGuid;
-
-#endif
+/** @file
+ EDKII Platform Has ACPI GUID
+
+ A NULL protocol instance with this GUID in the DXE protocol database, and/or
+ a NULL PPI with this GUID in the PPI database, implies that the platform
+ provides the operating system with an ACPI-based hardware description. Note
+ that this is not necessarily exclusive with different kinds of hardware
+ description (for example, a Device Tree-based one). A platform driver and/or
+ PEIM is supposed to produce a single instance of the protocol and/or PPI
+ (with NULL contents), if appropriate.
+
+ Copyright (C) 2017, Red Hat, Inc.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef __EDKII_PLATFORM_HAS_ACPI_H__
+#define __EDKII_PLATFORM_HAS_ACPI_H__
+
+#define EDKII_PLATFORM_HAS_ACPI_GUID \
+ { \
+ 0xf0966b41, 0xc23f, 0x41b9, \
+ { 0x96, 0x04, 0x0f, 0xf7, 0xe1, 0x11, 0x96, 0x5a } \
+ }
+
+extern EFI_GUID gEdkiiPlatformHasAcpiGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/RamDiskHii.h b/MdeModulePkg/Include/Guid/RamDiskHii.h
index 3c8dfadf6b..1176ddcb1f 100644
--- a/MdeModulePkg/Include/Guid/RamDiskHii.h
+++ b/MdeModulePkg/Include/Guid/RamDiskHii.h
@@ -1,19 +1,19 @@
-/** @file
- GUIDs used as HII FormSet and HII Package list GUID in RamDiskDxe driver.
-
- Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __RAM_DISK_HII_GUID_H__
-#define __RAM_DISK_HII_GUID_H__
-
-#define RAM_DISK_FORM_SET_GUID \
- { \
- 0x2a46715f, 0x3581, 0x4a55, {0x8e, 0x73, 0x2b, 0x76, 0x9a, 0xaa, 0x30, 0xc5} \
- }
-
-extern EFI_GUID gRamDiskFormSetGuid;
-
-#endif
+/** @file
+ GUIDs used as HII FormSet and HII Package list GUID in RamDiskDxe driver.
+
+ Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __RAM_DISK_HII_GUID_H__
+#define __RAM_DISK_HII_GUID_H__
+
+#define RAM_DISK_FORM_SET_GUID \
+ { \
+ 0x2a46715f, 0x3581, 0x4a55, {0x8e, 0x73, 0x2b, 0x76, 0x9a, 0xaa, 0x30, 0xc5} \
+ }
+
+extern EFI_GUID gRamDiskFormSetGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/RecoveryDevice.h b/MdeModulePkg/Include/Guid/RecoveryDevice.h
index c920ce04a3..f6211ee160 100644
--- a/MdeModulePkg/Include/Guid/RecoveryDevice.h
+++ b/MdeModulePkg/Include/Guid/RecoveryDevice.h
@@ -1,62 +1,62 @@
-/** @file
- Defines Name GUIDs to represent a Recovery Capsule loaded from a recovery device.
-
- These are contracts between the recovery module and device recovery module
- that convey the name of a given recovery module type.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _RECOVERY_DEVICE_H_
-#define _RECOVERY_DEVICE_H_
-
-///
-/// The Global ID used to identify a recovery capsule that was loaded from a CD/DVD device.
-///
-#define RECOVERY_ON_DATA_CD_GUID \
- { \
- 0x5cac0099, 0x0dc9, 0x48e5, {0x80, 0x68, 0xbb, 0x95, 0xf5, 0x40, 0x0a, 0x9f } \
- }
-
-///
-/// The Global ID used to identify a recovery capsule that was loaded from floppy device.
-///
-#define RECOVERY_ON_FAT_FLOPPY_DISK_GUID \
- { \
- 0x2e3d2e75, 0x9b2e, 0x412d, {0xb4, 0xb1, 0x70, 0x41, 0x6b, 0x87, 0x0, 0xff } \
- }
-
-///
-/// The Global ID used to identify a recovery capsule that was loaded from IDE hard drive.
-///
-#define RECOVERY_ON_FAT_IDE_DISK_GUID \
- { \
- 0xb38573b6, 0x6200, 0x4ac5, {0xb5, 0x1d, 0x82, 0xe6, 0x59, 0x38, 0xd7, 0x83 } \
- }
-
-///
-/// The Global ID used to identify a recovery capsule that was loaded from USB BOT device.
-///
-#define RECOVERY_ON_FAT_USB_DISK_GUID \
- { \
- 0x0ffbce19, 0x324c, 0x4690, {0xa0, 0x09, 0x98, 0xc6, 0xae, 0x2e, 0xb1, 0x86 } \
- }
-
-///
-/// The Global ID used to identify a recovery capsule that was loaded from NVM Express device.
-///
-#define RECOVERY_ON_FAT_NVME_DISK_GUID \
- { \
- 0xc770a27f, 0x956a, 0x497a, {0x85, 0x48, 0xe0, 0x61, 0x97, 0x58, 0x8b, 0xf6 } \
- }
-
-extern EFI_GUID gRecoveryOnDataCdGuid;
-extern EFI_GUID gRecoveryOnFatFloppyDiskGuid;
-extern EFI_GUID gRecoveryOnFatIdeDiskGuid;
-extern EFI_GUID gRecoveryOnFatUsbDiskGuid;
-extern EFI_GUID gRecoveryOnFatNvmeDiskGuid;
-
-#endif
+/** @file
+ Defines Name GUIDs to represent a Recovery Capsule loaded from a recovery device.
+
+ These are contracts between the recovery module and device recovery module
+ that convey the name of a given recovery module type.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _RECOVERY_DEVICE_H_
+#define _RECOVERY_DEVICE_H_
+
+///
+/// The Global ID used to identify a recovery capsule that was loaded from a CD/DVD device.
+///
+#define RECOVERY_ON_DATA_CD_GUID \
+ { \
+ 0x5cac0099, 0x0dc9, 0x48e5, {0x80, 0x68, 0xbb, 0x95, 0xf5, 0x40, 0x0a, 0x9f } \
+ }
+
+///
+/// The Global ID used to identify a recovery capsule that was loaded from floppy device.
+///
+#define RECOVERY_ON_FAT_FLOPPY_DISK_GUID \
+ { \
+ 0x2e3d2e75, 0x9b2e, 0x412d, {0xb4, 0xb1, 0x70, 0x41, 0x6b, 0x87, 0x0, 0xff } \
+ }
+
+///
+/// The Global ID used to identify a recovery capsule that was loaded from IDE hard drive.
+///
+#define RECOVERY_ON_FAT_IDE_DISK_GUID \
+ { \
+ 0xb38573b6, 0x6200, 0x4ac5, {0xb5, 0x1d, 0x82, 0xe6, 0x59, 0x38, 0xd7, 0x83 } \
+ }
+
+///
+/// The Global ID used to identify a recovery capsule that was loaded from USB BOT device.
+///
+#define RECOVERY_ON_FAT_USB_DISK_GUID \
+ { \
+ 0x0ffbce19, 0x324c, 0x4690, {0xa0, 0x09, 0x98, 0xc6, 0xae, 0x2e, 0xb1, 0x86 } \
+ }
+
+///
+/// The Global ID used to identify a recovery capsule that was loaded from NVM Express device.
+///
+#define RECOVERY_ON_FAT_NVME_DISK_GUID \
+ { \
+ 0xc770a27f, 0x956a, 0x497a, {0x85, 0x48, 0xe0, 0x61, 0x97, 0x58, 0x8b, 0xf6 } \
+ }
+
+extern EFI_GUID gRecoveryOnDataCdGuid;
+extern EFI_GUID gRecoveryOnFatFloppyDiskGuid;
+extern EFI_GUID gRecoveryOnFatIdeDiskGuid;
+extern EFI_GUID gRecoveryOnFatUsbDiskGuid;
+extern EFI_GUID gRecoveryOnFatNvmeDiskGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/RngAlgorithm.h b/MdeModulePkg/Include/Guid/RngAlgorithm.h
index e2ac2ba3e5..c3121f873b 100644
--- a/MdeModulePkg/Include/Guid/RngAlgorithm.h
+++ b/MdeModulePkg/Include/Guid/RngAlgorithm.h
@@ -1,23 +1,23 @@
-/** @file
- Rng Algorithm
-
- Copyright (c) 2023, Arm Limited. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#ifndef RNG_ALGORITHM_GUID_H_
-#define RNG_ALGORITHM_GUID_H_
-
-///
-/// The implementation of a Random Number Generator might be unsafe, when using
-/// a dummy implementation for instance. Allow identifying such implementation
-/// with this GUID.
-///
-#define EDKII_RNG_ALGORITHM_UNSAFE \
- { \
- 0x869f728c, 0x409d, 0x4ab4, {0xac, 0x03, 0x71, 0xd3, 0x09, 0xc1, 0xb3, 0xf4 } \
- }
-
-extern EFI_GUID gEdkiiRngAlgorithmUnSafe;
-
-#endif // #ifndef RNG_ALGORITHM_GUID_H_
+/** @file
+ Rng Algorithm
+
+ Copyright (c) 2023, Arm Limited. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef RNG_ALGORITHM_GUID_H_
+#define RNG_ALGORITHM_GUID_H_
+
+///
+/// The implementation of a Random Number Generator might be unsafe, when using
+/// a dummy implementation for instance. Allow identifying such implementation
+/// with this GUID.
+///
+#define EDKII_RNG_ALGORITHM_UNSAFE \
+ { \
+ 0x869f728c, 0x409d, 0x4ab4, {0xac, 0x03, 0x71, 0xd3, 0x09, 0xc1, 0xb3, 0xf4 } \
+ }
+
+extern EFI_GUID gEdkiiRngAlgorithmUnSafe;
+
+#endif // #ifndef RNG_ALGORITHM_GUID_H_
diff --git a/MdeModulePkg/Include/Guid/S3SmmInitDone.h b/MdeModulePkg/Include/Guid/S3SmmInitDone.h
index 7deea2b968..88c40e4367 100644
--- a/MdeModulePkg/Include/Guid/S3SmmInitDone.h
+++ b/MdeModulePkg/Include/Guid/S3SmmInitDone.h
@@ -1,21 +1,21 @@
-/** @file
- After S3 SMM initialization is done and before S3 boot script is executed,
- this GUID is installed as PPI in PEI and protocol in SMM environment.
- It allows for PEIMs or SMM drivers to hook this point and do the required tasks.
-
- Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __S3_SMM_INIT_DONE_H__
-#define __S3_SMM_INIT_DONE_H__
-
-#define EDKII_S3_SMM_INIT_DONE_GUID \
- { \
- 0x8f9d4825, 0x797d, 0x48fc, { 0x84, 0x71, 0x84, 0x50, 0x25, 0x79, 0x2e, 0xf6 } \
- }
-
-extern EFI_GUID gEdkiiS3SmmInitDoneGuid;
-
-#endif
+/** @file
+ After S3 SMM initialization is done and before S3 boot script is executed,
+ this GUID is installed as PPI in PEI and protocol in SMM environment.
+ It allows for PEIMs or SMM drivers to hook this point and do the required tasks.
+
+ Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __S3_SMM_INIT_DONE_H__
+#define __S3_SMM_INIT_DONE_H__
+
+#define EDKII_S3_SMM_INIT_DONE_GUID \
+ { \
+ 0x8f9d4825, 0x797d, 0x48fc, { 0x84, 0x71, 0x84, 0x50, 0x25, 0x79, 0x2e, 0xf6 } \
+ }
+
+extern EFI_GUID gEdkiiS3SmmInitDoneGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/S3StorageDeviceInitList.h b/MdeModulePkg/Include/Guid/S3StorageDeviceInitList.h
index 5cc545de90..b2e85eb1cc 100644
--- a/MdeModulePkg/Include/Guid/S3StorageDeviceInitList.h
+++ b/MdeModulePkg/Include/Guid/S3StorageDeviceInitList.h
@@ -1,57 +1,57 @@
-/** @file
- Define the LockBox GUID for list of storage devices need to be initialized in
- S3.
-
- Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
-
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __S3_STORAGE_DEVICE_INIT_LIST_H__
-#define __S3_STORAGE_DEVICE_INIT_LIST_H__
-
-#define S3_STORAGE_DEVICE_INIT_LIST \
- { \
- 0x310e9b8c, 0xcf90, 0x421e, { 0x8e, 0x9b, 0x9e, 0xef, 0xb6, 0x17, 0xc8, 0xef } \
- }
-
-//
-// The LockBox will store a DevicePath structure that contains one or more
-// DevicePath instances. Each instance denotes a storage device that needs to
-// get initialized during the S3 resume.
-//
-// For example, if there is only one storage device stored in the list, the
-// content of this LockBox will be:
-//
-// +-------------------------------------------------------+
-// | DevPath Instance #1 |
-// | (Terminated by an End of Hardware Device Path node |
-// | with an End Entire Device Path sub-type) |
-// +-------------------------------------------------------+
-//
-// If there are n (n > 1) storage devices in the list, the content of this
-// LockBox will be:
-//
-// +-------------------------------------------------------+
-// | DevPath Instance #1 |
-// | (Terminated by an End of Hardware Device Path node |
-// | with an End This Instance of a Device Path sub-type) |
-// +-------------------------------------------------------+
-// | DevPath Instance #2 |
-// | (Terminated by an End of Hardware Device Path node |
-// | with an End This Instance of a Device Path sub-type) |
-// +-------------------------------------------------------+
-// | ... |
-// +-------------------------------------------------------+
-// | DevPath Instance #n |
-// | (Terminated by an End of Hardware Device Path node |
-// | with an End Entire Device Path sub-type) |
-// +-------------------------------------------------------+
-//
-// The attribute of the LockBox should be set to
-// 'LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY'.
-//
-extern EFI_GUID gS3StorageDeviceInitListGuid;
-
-#endif // __S3_STORAGE_DEVICE_INIT_LIST_H__
+/** @file
+ Define the LockBox GUID for list of storage devices need to be initialized in
+ S3.
+
+ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __S3_STORAGE_DEVICE_INIT_LIST_H__
+#define __S3_STORAGE_DEVICE_INIT_LIST_H__
+
+#define S3_STORAGE_DEVICE_INIT_LIST \
+ { \
+ 0x310e9b8c, 0xcf90, 0x421e, { 0x8e, 0x9b, 0x9e, 0xef, 0xb6, 0x17, 0xc8, 0xef } \
+ }
+
+//
+// The LockBox will store a DevicePath structure that contains one or more
+// DevicePath instances. Each instance denotes a storage device that needs to
+// get initialized during the S3 resume.
+//
+// For example, if there is only one storage device stored in the list, the
+// content of this LockBox will be:
+//
+// +-------------------------------------------------------+
+// | DevPath Instance #1 |
+// | (Terminated by an End of Hardware Device Path node |
+// | with an End Entire Device Path sub-type) |
+// +-------------------------------------------------------+
+//
+// If there are n (n > 1) storage devices in the list, the content of this
+// LockBox will be:
+//
+// +-------------------------------------------------------+
+// | DevPath Instance #1 |
+// | (Terminated by an End of Hardware Device Path node |
+// | with an End This Instance of a Device Path sub-type) |
+// +-------------------------------------------------------+
+// | DevPath Instance #2 |
+// | (Terminated by an End of Hardware Device Path node |
+// | with an End This Instance of a Device Path sub-type) |
+// +-------------------------------------------------------+
+// | ... |
+// +-------------------------------------------------------+
+// | DevPath Instance #n |
+// | (Terminated by an End of Hardware Device Path node |
+// | with an End Entire Device Path sub-type) |
+// +-------------------------------------------------------+
+//
+// The attribute of the LockBox should be set to
+// 'LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY'.
+//
+extern EFI_GUID gS3StorageDeviceInitListGuid;
+
+#endif // __S3_STORAGE_DEVICE_INIT_LIST_H__
diff --git a/MdeModulePkg/Include/Guid/SerialPortLibVendor.h b/MdeModulePkg/Include/Guid/SerialPortLibVendor.h
index 6cb8e003c6..2b319e69cb 100644
--- a/MdeModulePkg/Include/Guid/SerialPortLibVendor.h
+++ b/MdeModulePkg/Include/Guid/SerialPortLibVendor.h
@@ -1,19 +1,19 @@
-/** @file
- Define the SerialDxe GUID.
-
- Copyright (c) 2019, Citrix Systems, Inc.
-
- SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#ifndef __SERIAL_PORT_LIB_VENDOR_H__
-#define __SERIAL_PORT_LIB_VENDOR_H__
-
-#define EDKII_SERIAL_PORT_LIB_VENDOR_GUID {\
- 0xD3987D4B, 0x971A, 0x435F, \
- { 0x8C, 0xAF, 0x49, 0x67, 0xEB, 0x62, 0x72, 0x41 } \
- }
-
-extern EFI_GUID gEdkiiSerialPortLibVendorGuid;
-
-#endif // __SERIAL_PORT_LIB_VENDOR_H__
+/** @file
+ Define the SerialDxe GUID.
+
+ Copyright (c) 2019, Citrix Systems, Inc.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef __SERIAL_PORT_LIB_VENDOR_H__
+#define __SERIAL_PORT_LIB_VENDOR_H__
+
+#define EDKII_SERIAL_PORT_LIB_VENDOR_GUID {\
+ 0xD3987D4B, 0x971A, 0x435F, \
+ { 0x8C, 0xAF, 0x49, 0x67, 0xEB, 0x62, 0x72, 0x41 } \
+ }
+
+extern EFI_GUID gEdkiiSerialPortLibVendorGuid;
+
+#endif // __SERIAL_PORT_LIB_VENDOR_H__
diff --git a/MdeModulePkg/Include/Guid/SmiHandlerProfile.h b/MdeModulePkg/Include/Guid/SmiHandlerProfile.h
index 6f155a09e0..daad6d898c 100644
--- a/MdeModulePkg/Include/Guid/SmiHandlerProfile.h
+++ b/MdeModulePkg/Include/Guid/SmiHandlerProfile.h
@@ -1,209 +1,209 @@
-/** @file
- Header file for SMI handler profile definition.
-
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _SMI_HANDLER_PROFILE_H_
-#define _SMI_HANDLER_PROFILE_H_
-
-#include <PiSmm.h>
-#include <Protocol/SmmGpiDispatch2.h>
-#include <Protocol/SmmIoTrapDispatch2.h>
-#include <Protocol/SmmPeriodicTimerDispatch2.h>
-#include <Protocol/SmmPowerButtonDispatch2.h>
-#include <Protocol/SmmStandbyButtonDispatch2.h>
-#include <Protocol/SmmSwDispatch2.h>
-#include <Protocol/SmmSxDispatch2.h>
-#include <Protocol/SmmUsbDispatch2.h>
-
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 Revision;
- UINT8 Reserved[4];
-} SMM_CORE_DATABASE_COMMON_HEADER;
-
-#define SMM_CORE_IMAGE_DATABASE_SIGNATURE SIGNATURE_32 ('S','C','I','D')
-#define SMM_CORE_IMAGE_DATABASE_REVISION 0x0001
-
-typedef struct {
- SMM_CORE_DATABASE_COMMON_HEADER Header;
- EFI_GUID FileGuid;
- PHYSICAL_ADDRESS EntryPoint;
- PHYSICAL_ADDRESS ImageBase;
- UINT64 ImageSize;
- UINT32 ImageRef;
- UINT16 PdbStringOffset;
- UINT8 Reserved[2];
- // CHAR8 PdbString[];
-} SMM_CORE_IMAGE_DATABASE_STRUCTURE;
-
-#define SMM_CORE_SMI_DATABASE_SIGNATURE SIGNATURE_32 ('S','C','S','D')
-#define SMM_CORE_SMI_DATABASE_REVISION 0x0001
-
-typedef enum {
- SmmCoreSmiHandlerCategoryRootHandler,
- SmmCoreSmiHandlerCategoryGuidHandler,
- SmmCoreSmiHandlerCategoryHardwareHandler,
-} SMM_CORE_SMI_HANDLER_CATEGORY;
-
-//
-// Context for SmmCoreSmiHandlerCategoryRootHandler:
-// NULL
-// Context for SmmCoreSmiHandlerCategoryGuidHandler:
-// NULL
-// Context for SmmCoreSmiHandlerCategoryHardwareHandler:
-// (NOTE: The context field should NOT include any data pointer.)
-// gEfiSmmSwDispatch2ProtocolGuid: (EFI_SMM_SW_REGISTER_CONTEXT => SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT)
-// gEfiSmmSxDispatch2ProtocolGuid: EFI_SMM_SX_REGISTER_CONTEXT
-// gEfiSmmPowerButtonDispatch2ProtocolGuid: EFI_SMM_POWER_BUTTON_REGISTER_CONTEXT
-// gEfiSmmStandbyButtonDispatch2ProtocolGuid: EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT
-// gEfiSmmPeriodicTimerDispatch2ProtocolGuid: EFI_SMM_PERIODIC_TIMER_CONTEXT
-// gEfiSmmGpiDispatch2ProtocolGuid: EFI_SMM_GPI_REGISTER_CONTEXT
-// gEfiSmmIoTrapDispatch2ProtocolGuid: EFI_SMM_IO_TRAP_REGISTER_CONTEXT
-// gEfiSmmUsbDispatch2ProtocolGuid: (EFI_SMM_USB_REGISTER_CONTEXT => SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT)
-// Other: GUID specific
-
-typedef struct {
- EFI_USB_SMI_TYPE Type;
- UINT32 DevicePathSize;
- // UINT8 DevicePath[DevicePathSize];
-} SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT;
-
-typedef struct {
- UINT64 SwSmiInputValue;
-} SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT;
-
-typedef struct {
- UINT32 Length;
- UINT32 ImageRef;
- PHYSICAL_ADDRESS CallerAddr;
- PHYSICAL_ADDRESS Handler;
- UINT16 ContextBufferOffset;
- UINT8 Reserved[2];
- UINT32 ContextBufferSize;
- // UINT8 ContextBuffer[];
-} SMM_CORE_SMI_HANDLER_STRUCTURE;
-
-typedef struct {
- SMM_CORE_DATABASE_COMMON_HEADER Header;
- EFI_GUID HandlerType;
- UINT32 HandlerCategory;
- UINT32 HandlerCount;
- // SMM_CORE_SMI_HANDLER_STRUCTURE Handler[HandlerCount];
-} SMM_CORE_SMI_DATABASE_STRUCTURE;
-
-//
-// Layout:
-// +-------------------------------------+
-// | SMM_CORE_IMAGE_DATABASE_STRUCTURE |
-// +-------------------------------------+
-// | SMM_CORE_SMI_DATABASE_STRUCTURE |
-// +-------------------------------------+
-//
-
-//
-// SMM_CORE dump command
-//
-#define SMI_HANDLER_PROFILE_COMMAND_GET_INFO 0x1
-#define SMI_HANDLER_PROFILE_COMMAND_GET_DATA_BY_OFFSET 0x2
-
-typedef struct {
- UINT32 Command;
- UINT32 DataLength;
- UINT64 ReturnStatus;
-} SMI_HANDLER_PROFILE_PARAMETER_HEADER;
-
-typedef struct {
- SMI_HANDLER_PROFILE_PARAMETER_HEADER Header;
- UINT64 DataSize;
-} SMI_HANDLER_PROFILE_PARAMETER_GET_INFO;
-
-typedef struct {
- SMI_HANDLER_PROFILE_PARAMETER_HEADER Header;
- //
- // On input, data buffer size.
- // On output, actual data buffer size copied.
- //
- UINT64 DataSize;
- PHYSICAL_ADDRESS DataBuffer;
- //
- // On input, data buffer offset to copy.
- // On output, next time data buffer offset to copy.
- //
- UINT64 DataOffset;
-} SMI_HANDLER_PROFILE_PARAMETER_GET_DATA_BY_OFFSET;
-
-#define SMI_HANDLER_PROFILE_GUID {0x49174342, 0x7108, 0x409b, {0x8b, 0xbe, 0x65, 0xfd, 0xa8, 0x53, 0x89, 0xf5}}
-
-extern EFI_GUID gSmiHandlerProfileGuid;
-
-typedef struct _SMI_HANDLER_PROFILE_PROTOCOL SMI_HANDLER_PROFILE_PROTOCOL;
-
-/**
- This function is called by SmmChildDispatcher module to report
- a new SMI handler is registered, to SmmCore.
-
- @param This The protocol instance
- @param HandlerGuid The GUID to identify the type of the handler.
- For the SmmChildDispatch protocol, the HandlerGuid
- must be the GUID of SmmChildDispatch protocol.
- @param Handler The SMI handler.
- @param CallerAddress The address of the module who registers the SMI handler.
- @param Context The context of the SMI handler.
- For the SmmChildDispatch protocol, the Context
- must match the one defined for SmmChildDispatch protocol.
- @param ContextSize The size of the context in bytes.
- For the SmmChildDispatch protocol, the Context
- must match the one defined for SmmChildDispatch protocol.
-
- @retval EFI_SUCCESS The information is recorded.
- @retval EFI_OUT_OF_RESOURCES There is no enough resource to record the information.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *SMI_HANDLER_PROFILE_REGISTER_HANDLER)(
- IN SMI_HANDLER_PROFILE_PROTOCOL *This,
- IN EFI_GUID *HandlerGuid,
- IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
- IN PHYSICAL_ADDRESS CallerAddress,
- IN VOID *Context OPTIONAL,
- IN UINTN ContextSize OPTIONAL
- );
-
-/**
- This function is called by SmmChildDispatcher module to report
- an existing SMI handler is unregistered, to SmmCore.
-
- @param This The protocol instance
- @param HandlerGuid The GUID to identify the type of the handler.
- For the SmmChildDispatch protocol, the HandlerGuid
- must be the GUID of SmmChildDispatch protocol.
- @param Handler The SMI handler.
- @param Context The context of the SMI handler.
- If it is NOT NULL, it will be used to check what is registered.
- @param ContextSize The size of the context in bytes.
- If Context is NOT NULL, it will be used to check what is registered.
-
- @retval EFI_SUCCESS The original record is removed.
- @retval EFI_NOT_FOUND There is no record for the HandlerGuid and handler.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *SMI_HANDLER_PROFILE_UNREGISTER_HANDLER)(
- IN SMI_HANDLER_PROFILE_PROTOCOL *This,
- IN EFI_GUID *HandlerGuid,
- IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
- IN VOID *Context OPTIONAL,
- IN UINTN ContextSize OPTIONAL
- );
-
-struct _SMI_HANDLER_PROFILE_PROTOCOL {
- SMI_HANDLER_PROFILE_REGISTER_HANDLER RegisterHandler;
- SMI_HANDLER_PROFILE_UNREGISTER_HANDLER UnregisterHandler;
-};
-
-#endif
+/** @file
+ Header file for SMI handler profile definition.
+
+Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _SMI_HANDLER_PROFILE_H_
+#define _SMI_HANDLER_PROFILE_H_
+
+#include <PiSmm.h>
+#include <Protocol/SmmGpiDispatch2.h>
+#include <Protocol/SmmIoTrapDispatch2.h>
+#include <Protocol/SmmPeriodicTimerDispatch2.h>
+#include <Protocol/SmmPowerButtonDispatch2.h>
+#include <Protocol/SmmStandbyButtonDispatch2.h>
+#include <Protocol/SmmSwDispatch2.h>
+#include <Protocol/SmmSxDispatch2.h>
+#include <Protocol/SmmUsbDispatch2.h>
+
+typedef struct {
+ UINT32 Signature;
+ UINT32 Length;
+ UINT32 Revision;
+ UINT8 Reserved[4];
+} SMM_CORE_DATABASE_COMMON_HEADER;
+
+#define SMM_CORE_IMAGE_DATABASE_SIGNATURE SIGNATURE_32 ('S','C','I','D')
+#define SMM_CORE_IMAGE_DATABASE_REVISION 0x0001
+
+typedef struct {
+ SMM_CORE_DATABASE_COMMON_HEADER Header;
+ EFI_GUID FileGuid;
+ PHYSICAL_ADDRESS EntryPoint;
+ PHYSICAL_ADDRESS ImageBase;
+ UINT64 ImageSize;
+ UINT32 ImageRef;
+ UINT16 PdbStringOffset;
+ UINT8 Reserved[2];
+ // CHAR8 PdbString[];
+} SMM_CORE_IMAGE_DATABASE_STRUCTURE;
+
+#define SMM_CORE_SMI_DATABASE_SIGNATURE SIGNATURE_32 ('S','C','S','D')
+#define SMM_CORE_SMI_DATABASE_REVISION 0x0001
+
+typedef enum {
+ SmmCoreSmiHandlerCategoryRootHandler,
+ SmmCoreSmiHandlerCategoryGuidHandler,
+ SmmCoreSmiHandlerCategoryHardwareHandler,
+} SMM_CORE_SMI_HANDLER_CATEGORY;
+
+//
+// Context for SmmCoreSmiHandlerCategoryRootHandler:
+// NULL
+// Context for SmmCoreSmiHandlerCategoryGuidHandler:
+// NULL
+// Context for SmmCoreSmiHandlerCategoryHardwareHandler:
+// (NOTE: The context field should NOT include any data pointer.)
+// gEfiSmmSwDispatch2ProtocolGuid: (EFI_SMM_SW_REGISTER_CONTEXT => SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT)
+// gEfiSmmSxDispatch2ProtocolGuid: EFI_SMM_SX_REGISTER_CONTEXT
+// gEfiSmmPowerButtonDispatch2ProtocolGuid: EFI_SMM_POWER_BUTTON_REGISTER_CONTEXT
+// gEfiSmmStandbyButtonDispatch2ProtocolGuid: EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT
+// gEfiSmmPeriodicTimerDispatch2ProtocolGuid: EFI_SMM_PERIODIC_TIMER_CONTEXT
+// gEfiSmmGpiDispatch2ProtocolGuid: EFI_SMM_GPI_REGISTER_CONTEXT
+// gEfiSmmIoTrapDispatch2ProtocolGuid: EFI_SMM_IO_TRAP_REGISTER_CONTEXT
+// gEfiSmmUsbDispatch2ProtocolGuid: (EFI_SMM_USB_REGISTER_CONTEXT => SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT)
+// Other: GUID specific
+
+typedef struct {
+ EFI_USB_SMI_TYPE Type;
+ UINT32 DevicePathSize;
+ // UINT8 DevicePath[DevicePathSize];
+} SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT;
+
+typedef struct {
+ UINT64 SwSmiInputValue;
+} SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT;
+
+typedef struct {
+ UINT32 Length;
+ UINT32 ImageRef;
+ PHYSICAL_ADDRESS CallerAddr;
+ PHYSICAL_ADDRESS Handler;
+ UINT16 ContextBufferOffset;
+ UINT8 Reserved[2];
+ UINT32 ContextBufferSize;
+ // UINT8 ContextBuffer[];
+} SMM_CORE_SMI_HANDLER_STRUCTURE;
+
+typedef struct {
+ SMM_CORE_DATABASE_COMMON_HEADER Header;
+ EFI_GUID HandlerType;
+ UINT32 HandlerCategory;
+ UINT32 HandlerCount;
+ // SMM_CORE_SMI_HANDLER_STRUCTURE Handler[HandlerCount];
+} SMM_CORE_SMI_DATABASE_STRUCTURE;
+
+//
+// Layout:
+// +-------------------------------------+
+// | SMM_CORE_IMAGE_DATABASE_STRUCTURE |
+// +-------------------------------------+
+// | SMM_CORE_SMI_DATABASE_STRUCTURE |
+// +-------------------------------------+
+//
+
+//
+// SMM_CORE dump command
+//
+#define SMI_HANDLER_PROFILE_COMMAND_GET_INFO 0x1
+#define SMI_HANDLER_PROFILE_COMMAND_GET_DATA_BY_OFFSET 0x2
+
+typedef struct {
+ UINT32 Command;
+ UINT32 DataLength;
+ UINT64 ReturnStatus;
+} SMI_HANDLER_PROFILE_PARAMETER_HEADER;
+
+typedef struct {
+ SMI_HANDLER_PROFILE_PARAMETER_HEADER Header;
+ UINT64 DataSize;
+} SMI_HANDLER_PROFILE_PARAMETER_GET_INFO;
+
+typedef struct {
+ SMI_HANDLER_PROFILE_PARAMETER_HEADER Header;
+ //
+ // On input, data buffer size.
+ // On output, actual data buffer size copied.
+ //
+ UINT64 DataSize;
+ PHYSICAL_ADDRESS DataBuffer;
+ //
+ // On input, data buffer offset to copy.
+ // On output, next time data buffer offset to copy.
+ //
+ UINT64 DataOffset;
+} SMI_HANDLER_PROFILE_PARAMETER_GET_DATA_BY_OFFSET;
+
+#define SMI_HANDLER_PROFILE_GUID {0x49174342, 0x7108, 0x409b, {0x8b, 0xbe, 0x65, 0xfd, 0xa8, 0x53, 0x89, 0xf5}}
+
+extern EFI_GUID gSmiHandlerProfileGuid;
+
+typedef struct _SMI_HANDLER_PROFILE_PROTOCOL SMI_HANDLER_PROFILE_PROTOCOL;
+
+/**
+ This function is called by SmmChildDispatcher module to report
+ a new SMI handler is registered, to SmmCore.
+
+ @param This The protocol instance
+ @param HandlerGuid The GUID to identify the type of the handler.
+ For the SmmChildDispatch protocol, the HandlerGuid
+ must be the GUID of SmmChildDispatch protocol.
+ @param Handler The SMI handler.
+ @param CallerAddress The address of the module who registers the SMI handler.
+ @param Context The context of the SMI handler.
+ For the SmmChildDispatch protocol, the Context
+ must match the one defined for SmmChildDispatch protocol.
+ @param ContextSize The size of the context in bytes.
+ For the SmmChildDispatch protocol, the Context
+ must match the one defined for SmmChildDispatch protocol.
+
+ @retval EFI_SUCCESS The information is recorded.
+ @retval EFI_OUT_OF_RESOURCES There is no enough resource to record the information.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *SMI_HANDLER_PROFILE_REGISTER_HANDLER)(
+ IN SMI_HANDLER_PROFILE_PROTOCOL *This,
+ IN EFI_GUID *HandlerGuid,
+ IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
+ IN PHYSICAL_ADDRESS CallerAddress,
+ IN VOID *Context OPTIONAL,
+ IN UINTN ContextSize OPTIONAL
+ );
+
+/**
+ This function is called by SmmChildDispatcher module to report
+ an existing SMI handler is unregistered, to SmmCore.
+
+ @param This The protocol instance
+ @param HandlerGuid The GUID to identify the type of the handler.
+ For the SmmChildDispatch protocol, the HandlerGuid
+ must be the GUID of SmmChildDispatch protocol.
+ @param Handler The SMI handler.
+ @param Context The context of the SMI handler.
+ If it is NOT NULL, it will be used to check what is registered.
+ @param ContextSize The size of the context in bytes.
+ If Context is NOT NULL, it will be used to check what is registered.
+
+ @retval EFI_SUCCESS The original record is removed.
+ @retval EFI_NOT_FOUND There is no record for the HandlerGuid and handler.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *SMI_HANDLER_PROFILE_UNREGISTER_HANDLER)(
+ IN SMI_HANDLER_PROFILE_PROTOCOL *This,
+ IN EFI_GUID *HandlerGuid,
+ IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
+ IN VOID *Context OPTIONAL,
+ IN UINTN ContextSize OPTIONAL
+ );
+
+struct _SMI_HANDLER_PROFILE_PROTOCOL {
+ SMI_HANDLER_PROFILE_REGISTER_HANDLER RegisterHandler;
+ SMI_HANDLER_PROFILE_UNREGISTER_HANDLER UnregisterHandler;
+};
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/SmmLockBox.h b/MdeModulePkg/Include/Guid/SmmLockBox.h
index 3447c58728..570df8a9ea 100644
--- a/MdeModulePkg/Include/Guid/SmmLockBox.h
+++ b/MdeModulePkg/Include/Guid/SmmLockBox.h
@@ -1,66 +1,66 @@
-/** @file
- SmmLockBox guid header file.
-
-Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
-
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _SMM_LOCK_BOX_GUID_H_
-#define _SMM_LOCK_BOX_GUID_H_
-
-#define EFI_SMM_LOCK_BOX_COMMUNICATION_GUID \
- {0x2a3cfebd, 0x27e8, 0x4d0a, {0x8b, 0x79, 0xd6, 0x88, 0xc2, 0xa3, 0xe1, 0xc0}}
-
-//
-// Below data structure is used for communication between PEI/DXE to SMM.
-//
-
-#define EFI_SMM_LOCK_BOX_COMMAND_SAVE 0x1
-#define EFI_SMM_LOCK_BOX_COMMAND_UPDATE 0x2
-#define EFI_SMM_LOCK_BOX_COMMAND_RESTORE 0x3
-#define EFI_SMM_LOCK_BOX_COMMAND_SET_ATTRIBUTES 0x4
-#define EFI_SMM_LOCK_BOX_COMMAND_RESTORE_ALL_IN_PLACE 0x5
-
-typedef struct {
- UINT32 Command;
- UINT32 DataLength;
- UINT64 ReturnStatus;
-} EFI_SMM_LOCK_BOX_PARAMETER_HEADER;
-
-typedef struct {
- EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
- GUID Guid;
- PHYSICAL_ADDRESS Buffer;
- UINT64 Length;
-} EFI_SMM_LOCK_BOX_PARAMETER_SAVE;
-
-typedef struct {
- EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
- GUID Guid;
- UINT64 Offset;
- PHYSICAL_ADDRESS Buffer;
- UINT64 Length;
-} EFI_SMM_LOCK_BOX_PARAMETER_UPDATE;
-
-typedef struct {
- EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
- GUID Guid;
- PHYSICAL_ADDRESS Buffer;
- UINT64 Length;
-} EFI_SMM_LOCK_BOX_PARAMETER_RESTORE;
-
-typedef struct {
- EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
- GUID Guid;
- UINT64 Attributes;
-} EFI_SMM_LOCK_BOX_PARAMETER_SET_ATTRIBUTES;
-
-typedef struct {
- EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
-} EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE;
-
-extern EFI_GUID gEfiSmmLockBoxCommunicationGuid;
-
-#endif
+/** @file
+ SmmLockBox guid header file.
+
+Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _SMM_LOCK_BOX_GUID_H_
+#define _SMM_LOCK_BOX_GUID_H_
+
+#define EFI_SMM_LOCK_BOX_COMMUNICATION_GUID \
+ {0x2a3cfebd, 0x27e8, 0x4d0a, {0x8b, 0x79, 0xd6, 0x88, 0xc2, 0xa3, 0xe1, 0xc0}}
+
+//
+// Below data structure is used for communication between PEI/DXE to SMM.
+//
+
+#define EFI_SMM_LOCK_BOX_COMMAND_SAVE 0x1
+#define EFI_SMM_LOCK_BOX_COMMAND_UPDATE 0x2
+#define EFI_SMM_LOCK_BOX_COMMAND_RESTORE 0x3
+#define EFI_SMM_LOCK_BOX_COMMAND_SET_ATTRIBUTES 0x4
+#define EFI_SMM_LOCK_BOX_COMMAND_RESTORE_ALL_IN_PLACE 0x5
+
+typedef struct {
+ UINT32 Command;
+ UINT32 DataLength;
+ UINT64 ReturnStatus;
+} EFI_SMM_LOCK_BOX_PARAMETER_HEADER;
+
+typedef struct {
+ EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
+ GUID Guid;
+ PHYSICAL_ADDRESS Buffer;
+ UINT64 Length;
+} EFI_SMM_LOCK_BOX_PARAMETER_SAVE;
+
+typedef struct {
+ EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
+ GUID Guid;
+ UINT64 Offset;
+ PHYSICAL_ADDRESS Buffer;
+ UINT64 Length;
+} EFI_SMM_LOCK_BOX_PARAMETER_UPDATE;
+
+typedef struct {
+ EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
+ GUID Guid;
+ PHYSICAL_ADDRESS Buffer;
+ UINT64 Length;
+} EFI_SMM_LOCK_BOX_PARAMETER_RESTORE;
+
+typedef struct {
+ EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
+ GUID Guid;
+ UINT64 Attributes;
+} EFI_SMM_LOCK_BOX_PARAMETER_SET_ATTRIBUTES;
+
+typedef struct {
+ EFI_SMM_LOCK_BOX_PARAMETER_HEADER Header;
+} EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE;
+
+extern EFI_GUID gEfiSmmLockBoxCommunicationGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/SmmVariableCommon.h b/MdeModulePkg/Include/Guid/SmmVariableCommon.h
index 1a1ab4fcc1..ae477d4921 100644
--- a/MdeModulePkg/Include/Guid/SmmVariableCommon.h
+++ b/MdeModulePkg/Include/Guid/SmmVariableCommon.h
@@ -1,150 +1,150 @@
-/** @file
- The file defined some common structures used for communicating between SMM variable module and SMM variable wrapper module.
-
-Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _SMM_VARIABLE_COMMON_H_
-#define _SMM_VARIABLE_COMMON_H_
-
-#include <Guid/VariableFormat.h>
-#include <Protocol/VarCheck.h>
-
-#define EFI_SMM_VARIABLE_WRITE_GUID \
- { 0x93ba1826, 0xdffb, 0x45dd, { 0x82, 0xa7, 0xe7, 0xdc, 0xaa, 0x3b, 0xbd, 0xf3 } }
-
-extern EFI_GUID gSmmVariableWriteGuid;
-
-//
-// This structure is used for SMM variable. the collected statistics data is saved in SMRAM. It can be got from
-// SMI handler. The communication buffer should be:
-// EFI_MM_COMMUNICATE_HEADER + SMM_VARIABLE_COMMUNICATE_HEADER + payload.
-//
-typedef struct {
- UINTN Function;
- EFI_STATUS ReturnStatus;
- UINT8 Data[1];
-} SMM_VARIABLE_COMMUNICATE_HEADER;
-
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
-//
-#define SMM_VARIABLE_FUNCTION_GET_VARIABLE 1
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME.
-//
-#define SMM_VARIABLE_FUNCTION_GET_NEXT_VARIABLE_NAME 2
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
-//
-#define SMM_VARIABLE_FUNCTION_SET_VARIABLE 3
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO.
-//
-#define SMM_VARIABLE_FUNCTION_QUERY_VARIABLE_INFO 4
-//
-// It is a notify event, no extra payload for this function.
-//
-#define SMM_VARIABLE_FUNCTION_READY_TO_BOOT 5
-//
-// It is a notify event, no extra payload for this function.
-//
-#define SMM_VARIABLE_FUNCTION_EXIT_BOOT_SERVICE 6
-//
-// The payload for this function is VARIABLE_INFO_ENTRY. The GUID in EFI_MM_COMMUNICATE_HEADER
-// is gEfiSmmVariableProtocolGuid.
-//
-#define SMM_VARIABLE_FUNCTION_GET_STATISTICS 7
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_LOCK_VARIABLE
-//
-#define SMM_VARIABLE_FUNCTION_LOCK_VARIABLE 8
-
-#define SMM_VARIABLE_FUNCTION_VAR_CHECK_VARIABLE_PROPERTY_SET 9
-
-#define SMM_VARIABLE_FUNCTION_VAR_CHECK_VARIABLE_PROPERTY_GET 10
-
-#define SMM_VARIABLE_FUNCTION_GET_PAYLOAD_SIZE 11
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_RUNTIME_VARIABLE_CACHE_CONTEXT
-//
-#define SMM_VARIABLE_FUNCTION_INIT_RUNTIME_VARIABLE_CACHE_CONTEXT 12
-
-#define SMM_VARIABLE_FUNCTION_SYNC_RUNTIME_CACHE 13
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_GET_RUNTIME_CACHE_INFO
-//
-#define SMM_VARIABLE_FUNCTION_GET_RUNTIME_CACHE_INFO 14
-
-///
-/// Size of SMM communicate header, without including the payload.
-///
-#define SMM_COMMUNICATE_HEADER_SIZE (OFFSET_OF (EFI_MM_COMMUNICATE_HEADER, Data))
-
-///
-/// Size of SMM variable communicate header, without including the payload.
-///
-#define SMM_VARIABLE_COMMUNICATE_HEADER_SIZE (OFFSET_OF (SMM_VARIABLE_COMMUNICATE_HEADER, Data))
-
-///
-/// This structure is used to communicate with SMI handler by SetVariable and GetVariable.
-///
-typedef struct {
- EFI_GUID Guid;
- UINTN DataSize;
- UINTN NameSize;
- UINT32 Attributes;
- CHAR16 Name[1];
-} SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE;
-
-///
-/// This structure is used to communicate with SMI handler by GetNextVariableName.
-///
-typedef struct {
- EFI_GUID Guid;
- UINTN NameSize; // Return name buffer size
- CHAR16 Name[1];
-} SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME;
-
-///
-/// This structure is used to communicate with SMI handler by QueryVariableInfo.
-///
-typedef struct {
- UINT64 MaximumVariableStorageSize;
- UINT64 RemainingVariableStorageSize;
- UINT64 MaximumVariableSize;
- UINT32 Attributes;
-} SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO;
-
-typedef SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME SMM_VARIABLE_COMMUNICATE_LOCK_VARIABLE;
-
-typedef struct {
- EFI_GUID Guid;
- UINTN NameSize;
- VAR_CHECK_VARIABLE_PROPERTY VariableProperty;
- CHAR16 Name[1];
-} SMM_VARIABLE_COMMUNICATE_VAR_CHECK_VARIABLE_PROPERTY;
-
-typedef struct {
- UINTN VariablePayloadSize;
-} SMM_VARIABLE_COMMUNICATE_GET_PAYLOAD_SIZE;
-
-typedef struct {
- BOOLEAN *ReadLock;
- BOOLEAN *PendingUpdate;
- BOOLEAN *HobFlushComplete;
- VARIABLE_STORE_HEADER *RuntimeHobCache;
- VARIABLE_STORE_HEADER *RuntimeNvCache;
- VARIABLE_STORE_HEADER *RuntimeVolatileCache;
-} SMM_VARIABLE_COMMUNICATE_RUNTIME_VARIABLE_CACHE_CONTEXT;
-
-typedef struct {
- UINTN TotalHobStorageSize;
- UINTN TotalNvStorageSize;
- UINTN TotalVolatileStorageSize;
- BOOLEAN AuthenticatedVariableUsage;
-} SMM_VARIABLE_COMMUNICATE_GET_RUNTIME_CACHE_INFO;
-
-#endif // _SMM_VARIABLE_COMMON_H_
+/** @file
+ The file defined some common structures used for communicating between SMM variable module and SMM variable wrapper module.
+
+Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _SMM_VARIABLE_COMMON_H_
+#define _SMM_VARIABLE_COMMON_H_
+
+#include <Guid/VariableFormat.h>
+#include <Protocol/VarCheck.h>
+
+#define EFI_SMM_VARIABLE_WRITE_GUID \
+ { 0x93ba1826, 0xdffb, 0x45dd, { 0x82, 0xa7, 0xe7, 0xdc, 0xaa, 0x3b, 0xbd, 0xf3 } }
+
+extern EFI_GUID gSmmVariableWriteGuid;
+
+//
+// This structure is used for SMM variable. the collected statistics data is saved in SMRAM. It can be got from
+// SMI handler. The communication buffer should be:
+// EFI_MM_COMMUNICATE_HEADER + SMM_VARIABLE_COMMUNICATE_HEADER + payload.
+//
+typedef struct {
+ UINTN Function;
+ EFI_STATUS ReturnStatus;
+ UINT8 Data[1];
+} SMM_VARIABLE_COMMUNICATE_HEADER;
+
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
+//
+#define SMM_VARIABLE_FUNCTION_GET_VARIABLE 1
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME.
+//
+#define SMM_VARIABLE_FUNCTION_GET_NEXT_VARIABLE_NAME 2
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
+//
+#define SMM_VARIABLE_FUNCTION_SET_VARIABLE 3
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO.
+//
+#define SMM_VARIABLE_FUNCTION_QUERY_VARIABLE_INFO 4
+//
+// It is a notify event, no extra payload for this function.
+//
+#define SMM_VARIABLE_FUNCTION_READY_TO_BOOT 5
+//
+// It is a notify event, no extra payload for this function.
+//
+#define SMM_VARIABLE_FUNCTION_EXIT_BOOT_SERVICE 6
+//
+// The payload for this function is VARIABLE_INFO_ENTRY. The GUID in EFI_MM_COMMUNICATE_HEADER
+// is gEfiSmmVariableProtocolGuid.
+//
+#define SMM_VARIABLE_FUNCTION_GET_STATISTICS 7
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_LOCK_VARIABLE
+//
+#define SMM_VARIABLE_FUNCTION_LOCK_VARIABLE 8
+
+#define SMM_VARIABLE_FUNCTION_VAR_CHECK_VARIABLE_PROPERTY_SET 9
+
+#define SMM_VARIABLE_FUNCTION_VAR_CHECK_VARIABLE_PROPERTY_GET 10
+
+#define SMM_VARIABLE_FUNCTION_GET_PAYLOAD_SIZE 11
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_RUNTIME_VARIABLE_CACHE_CONTEXT
+//
+#define SMM_VARIABLE_FUNCTION_INIT_RUNTIME_VARIABLE_CACHE_CONTEXT 12
+
+#define SMM_VARIABLE_FUNCTION_SYNC_RUNTIME_CACHE 13
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_GET_RUNTIME_CACHE_INFO
+//
+#define SMM_VARIABLE_FUNCTION_GET_RUNTIME_CACHE_INFO 14
+
+///
+/// Size of SMM communicate header, without including the payload.
+///
+#define SMM_COMMUNICATE_HEADER_SIZE (OFFSET_OF (EFI_MM_COMMUNICATE_HEADER, Data))
+
+///
+/// Size of SMM variable communicate header, without including the payload.
+///
+#define SMM_VARIABLE_COMMUNICATE_HEADER_SIZE (OFFSET_OF (SMM_VARIABLE_COMMUNICATE_HEADER, Data))
+
+///
+/// This structure is used to communicate with SMI handler by SetVariable and GetVariable.
+///
+typedef struct {
+ EFI_GUID Guid;
+ UINTN DataSize;
+ UINTN NameSize;
+ UINT32 Attributes;
+ CHAR16 Name[1];
+} SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE;
+
+///
+/// This structure is used to communicate with SMI handler by GetNextVariableName.
+///
+typedef struct {
+ EFI_GUID Guid;
+ UINTN NameSize; // Return name buffer size
+ CHAR16 Name[1];
+} SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME;
+
+///
+/// This structure is used to communicate with SMI handler by QueryVariableInfo.
+///
+typedef struct {
+ UINT64 MaximumVariableStorageSize;
+ UINT64 RemainingVariableStorageSize;
+ UINT64 MaximumVariableSize;
+ UINT32 Attributes;
+} SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO;
+
+typedef SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME SMM_VARIABLE_COMMUNICATE_LOCK_VARIABLE;
+
+typedef struct {
+ EFI_GUID Guid;
+ UINTN NameSize;
+ VAR_CHECK_VARIABLE_PROPERTY VariableProperty;
+ CHAR16 Name[1];
+} SMM_VARIABLE_COMMUNICATE_VAR_CHECK_VARIABLE_PROPERTY;
+
+typedef struct {
+ UINTN VariablePayloadSize;
+} SMM_VARIABLE_COMMUNICATE_GET_PAYLOAD_SIZE;
+
+typedef struct {
+ BOOLEAN *ReadLock;
+ BOOLEAN *PendingUpdate;
+ BOOLEAN *HobFlushComplete;
+ VARIABLE_STORE_HEADER *RuntimeHobCache;
+ VARIABLE_STORE_HEADER *RuntimeNvCache;
+ VARIABLE_STORE_HEADER *RuntimeVolatileCache;
+} SMM_VARIABLE_COMMUNICATE_RUNTIME_VARIABLE_CACHE_CONTEXT;
+
+typedef struct {
+ UINTN TotalHobStorageSize;
+ UINTN TotalNvStorageSize;
+ UINTN TotalVolatileStorageSize;
+ BOOLEAN AuthenticatedVariableUsage;
+} SMM_VARIABLE_COMMUNICATE_GET_RUNTIME_CACHE_INFO;
+
+#endif // _SMM_VARIABLE_COMMON_H_
diff --git a/MdeModulePkg/Include/Guid/StandardErrorDevice.h b/MdeModulePkg/Include/Guid/StandardErrorDevice.h
index 400d9a039c..d6cfc60706 100644
--- a/MdeModulePkg/Include/Guid/StandardErrorDevice.h
+++ b/MdeModulePkg/Include/Guid/StandardErrorDevice.h
@@ -1,18 +1,18 @@
-/** @file
- This GUID is installed to the device handler to specify that the device is a StdErr device.
-
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __STANDARD_ERROR_DEVICE_H__
-#define __STANDARD_ERROR_DEVICE_H__
-
-#define EFI_STANDARD_ERROR_DEVICE_GUID \
- { 0xd3b36f2d, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
-
-extern EFI_GUID gEfiStandardErrorDeviceGuid;
-
-#endif
+/** @file
+ This GUID is installed to the device handler to specify that the device is a StdErr device.
+
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __STANDARD_ERROR_DEVICE_H__
+#define __STANDARD_ERROR_DEVICE_H__
+
+#define EFI_STANDARD_ERROR_DEVICE_GUID \
+ { 0xd3b36f2d, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
+
+extern EFI_GUID gEfiStandardErrorDeviceGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/StatusCodeCallbackGuid.h b/MdeModulePkg/Include/Guid/StatusCodeCallbackGuid.h
index 0e5af6aff6..195a490cf5 100644
--- a/MdeModulePkg/Include/Guid/StatusCodeCallbackGuid.h
+++ b/MdeModulePkg/Include/Guid/StatusCodeCallbackGuid.h
@@ -1,20 +1,20 @@
-/** @file
- GUID used to identify HOB for pointers to callback functios registered on
- PEI report status code router.
-
-Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __STATUS_CODE_CALLBACK_H__
-#define __STATUS_CODE_CALLBACK_H__
-
-#define STATUS_CODE_CALLBACK_GUID \
- { \
- 0xe701458c, 0x4900, 0x4ca5, {0xb7, 0x72, 0x3d, 0x37, 0x94, 0x9f, 0x79, 0x27} \
- }
-
-extern EFI_GUID gStatusCodeCallbackGuid;
-
-#endif
+/** @file
+ GUID used to identify HOB for pointers to callback functios registered on
+ PEI report status code router.
+
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __STATUS_CODE_CALLBACK_H__
+#define __STATUS_CODE_CALLBACK_H__
+
+#define STATUS_CODE_CALLBACK_GUID \
+ { \
+ 0xe701458c, 0x4900, 0x4ca5, {0xb7, 0x72, 0x3d, 0x37, 0x94, 0x9f, 0x79, 0x27} \
+ }
+
+extern EFI_GUID gStatusCodeCallbackGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
index 6f2688064b..451e829b00 100644
--- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
+++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
@@ -1,51 +1,51 @@
-/** @file
- This file defines the GUID and data structure used to pass DEBUG() macro
- information to the Status Code Protocol and Status Code PPI.
-
-Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _STATUS_CODE_DATA_TYPE_DEBUG_H_
-#define _STATUS_CODE_DATA_TYPE_DEBUG_H_
-
-#include <Pi/PiStatusCode.h>
-
-///
-/// The Global ID used to identify a structure of type EFI_DEBUG_INFO.
-///
-#define EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID \
- { \
- 0x9A4E9246, 0xD553, 0x11D5, { 0x87, 0xE2, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xb9 } \
- }
-
-///
-/// The maximum size of an EFI_DEBUG_INFO structure.
-///
-#define EFI_STATUS_CODE_DATA_MAX_SIZE 0x200
-
-///
-/// Define the maximum extended data size that is supported when a
-/// status code is reported.
-///
-#define MAX_EXTENDED_DATA_SIZE (EFI_STATUS_CODE_DATA_MAX_SIZE + sizeof(EFI_STATUS_CODE_DATA))
-
-///
-/// This structure contains the ErrorLevel passed into the DEBUG() macro, followed
-/// by a 96-byte buffer that contains the variable argument list passed to the
-/// DEBUG() macro that has been converted to a BASE_LIST. The 96-byte buffer is
-/// followed by a Null-terminated ASCII string that is the Format string passed
-/// to the DEBUG() macro. The maximum size of this structure is defined by
-/// EFI_STATUS_CODE_DATA_MAX_SIZE.
-///
-typedef struct {
- ///
- /// The debug error level passed into a DEBUG() macro.
- ///
- UINT32 ErrorLevel;
-} EFI_DEBUG_INFO;
-
-extern EFI_GUID gEfiStatusCodeDataTypeDebugGuid;
-
-#endif // _STATUS_CODE_DATA_TYPE_DEBUG_H_
+/** @file
+ This file defines the GUID and data structure used to pass DEBUG() macro
+ information to the Status Code Protocol and Status Code PPI.
+
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _STATUS_CODE_DATA_TYPE_DEBUG_H_
+#define _STATUS_CODE_DATA_TYPE_DEBUG_H_
+
+#include <Pi/PiStatusCode.h>
+
+///
+/// The Global ID used to identify a structure of type EFI_DEBUG_INFO.
+///
+#define EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID \
+ { \
+ 0x9A4E9246, 0xD553, 0x11D5, { 0x87, 0xE2, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xb9 } \
+ }
+
+///
+/// The maximum size of an EFI_DEBUG_INFO structure.
+///
+#define EFI_STATUS_CODE_DATA_MAX_SIZE 0x200
+
+///
+/// Define the maximum extended data size that is supported when a
+/// status code is reported.
+///
+#define MAX_EXTENDED_DATA_SIZE (EFI_STATUS_CODE_DATA_MAX_SIZE + sizeof(EFI_STATUS_CODE_DATA))
+
+///
+/// This structure contains the ErrorLevel passed into the DEBUG() macro, followed
+/// by a 96-byte buffer that contains the variable argument list passed to the
+/// DEBUG() macro that has been converted to a BASE_LIST. The 96-byte buffer is
+/// followed by a Null-terminated ASCII string that is the Format string passed
+/// to the DEBUG() macro. The maximum size of this structure is defined by
+/// EFI_STATUS_CODE_DATA_MAX_SIZE.
+///
+typedef struct {
+ ///
+ /// The debug error level passed into a DEBUG() macro.
+ ///
+ UINT32 ErrorLevel;
+} EFI_DEBUG_INFO;
+
+extern EFI_GUID gEfiStatusCodeDataTypeDebugGuid;
+
+#endif // _STATUS_CODE_DATA_TYPE_DEBUG_H_
diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeVariable.h b/MdeModulePkg/Include/Guid/StatusCodeDataTypeVariable.h
index a0edac365f..6770c45f43 100644
--- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeVariable.h
+++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeVariable.h
@@ -1,34 +1,34 @@
-/** @file
- This file defines the GUID and data structure used to pass variable setting
- failure information to the Status Code Protocol.
-
-Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _STATUS_CODE_DATA_TYPE_VARIABLE_H_
-#define _STATUS_CODE_DATA_TYPE_VARIABLE_H_
-
-///
-/// The Global ID used to identify a structure of type EDKII_SET_VARIABLE_STATUS.
-/// The status code value is PcdGet32 (PcdErrorCodeSetVariable).
-///
-#define EDKII_STATUS_CODE_DATA_TYPE_VARIABLE_GUID \
- { \
- 0xf6ee6dbb, 0xd67f, 0x4ea0, { 0x8b, 0x96, 0x6a, 0x71, 0xb1, 0x9d, 0x84, 0xad } \
- }
-
-typedef struct {
- EFI_GUID Guid;
- UINTN NameSize;
- UINTN DataSize;
- EFI_STATUS SetStatus;
- UINT32 Attributes;
- // CHAR16 Name[];
- // UINT8 Data[];
-} EDKII_SET_VARIABLE_STATUS;
-
-extern EFI_GUID gEdkiiStatusCodeDataTypeVariableGuid;
-
-#endif // _STATUS_CODE_DATA_TYPE_VARIABLE_H_
+/** @file
+ This file defines the GUID and data structure used to pass variable setting
+ failure information to the Status Code Protocol.
+
+Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _STATUS_CODE_DATA_TYPE_VARIABLE_H_
+#define _STATUS_CODE_DATA_TYPE_VARIABLE_H_
+
+///
+/// The Global ID used to identify a structure of type EDKII_SET_VARIABLE_STATUS.
+/// The status code value is PcdGet32 (PcdErrorCodeSetVariable).
+///
+#define EDKII_STATUS_CODE_DATA_TYPE_VARIABLE_GUID \
+ { \
+ 0xf6ee6dbb, 0xd67f, 0x4ea0, { 0x8b, 0x96, 0x6a, 0x71, 0xb1, 0x9d, 0x84, 0xad } \
+ }
+
+typedef struct {
+ EFI_GUID Guid;
+ UINTN NameSize;
+ UINTN DataSize;
+ EFI_STATUS SetStatus;
+ UINT32 Attributes;
+ // CHAR16 Name[];
+ // UINT8 Data[];
+} EDKII_SET_VARIABLE_STATUS;
+
+extern EFI_GUID gEdkiiStatusCodeDataTypeVariableGuid;
+
+#endif // _STATUS_CODE_DATA_TYPE_VARIABLE_H_
diff --git a/MdeModulePkg/Include/Guid/SystemNvDataGuid.h b/MdeModulePkg/Include/Guid/SystemNvDataGuid.h
index 85f226d0cc..f01be386b4 100644
--- a/MdeModulePkg/Include/Guid/SystemNvDataGuid.h
+++ b/MdeModulePkg/Include/Guid/SystemNvDataGuid.h
@@ -1,111 +1,111 @@
-/** @file
- This file defines NvDataFv GUID and FTW working block structures.
- The NvDataFv GUID can be used as FileSystemGuid in EFI_FIRMWARE_VOLUME_HEADER if
- this FV image contains NV data, such as NV variable data.
- This file also defines WorkingBlockSignature GUID for FTW working block signature.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __SYSTEM_NV_DATA_GUID_H__
-#define __SYSTEM_NV_DATA_GUID_H__
-
-#define EFI_SYSTEM_NV_DATA_FV_GUID \
- {0xfff12b8d, 0x7696, 0x4c8b, {0xa9, 0x85, 0x27, 0x47, 0x7, 0x5b, 0x4f, 0x50} }
-
-#define EDKII_WORKING_BLOCK_SIGNATURE_GUID \
- {0x9e58292b, 0x7c68, 0x497d, {0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95} }
-
-extern EFI_GUID gEfiSystemNvDataFvGuid;
-extern EFI_GUID gEdkiiWorkingBlockSignatureGuid;
-
-#define WORKING_BLOCK_VALID 0x1
-#define WORKING_BLOCK_INVALID 0x2
-
-///
-/// The EDKII Fault tolerant working block header.
-/// The header is immediately followed by the write queue data.
-///
-typedef struct {
- ///
- /// FTW working block signature.
- /// Its value has be updated from gEfiSystemNvDataFvGuid to gEdkiiWorkingBlockSignatureGuid,
- /// because its write queue data format has been updated to support the crossing archs.
- ///
- EFI_GUID Signature;
- ///
- /// 32bit CRC calculated for this header.
- ///
- UINT32 Crc;
- ///
- /// Working block valid bit.
- ///
- UINT8 WorkingBlockValid : 1;
- UINT8 WorkingBlockInvalid : 1;
- UINT8 Reserved : 6;
- UINT8 Reserved3[3];
- ///
- /// Total size of the following write queue range.
- ///
- UINT64 WriteQueueSize;
- ///
- /// Write Queue data.
- ///
- /// EFI_FAULT_TOLERANT_WRITE_HEADER FtwHeader;
- /// EFI_FAULT_TOLERANT_WRITE_RECORD FtwRecord[FtwHeader.NumberOfWrites]
- /// EFI_FAULT_TOLERANT_WRITE_HEADER FtwHeader2;
- /// EFI_FAULT_TOLERANT_WRITE_RECORD FtwRecord2[FtwHeader2.NumberOfWrites]
- /// ...
- ///
-} EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER;
-
-#define FTW_VALID_STATE 0
-#define FTW_INVALID_STATE 1
-
-//
-// EFI Fault tolerant block update write queue entry.
-//
-typedef struct {
- UINT8 HeaderAllocated : 1;
- UINT8 WritesAllocated : 1;
- UINT8 Complete : 1;
- UINT8 Reserved : 5;
- EFI_GUID CallerId;
- UINT64 NumberOfWrites;
- UINT64 PrivateDataSize;
-} EFI_FAULT_TOLERANT_WRITE_HEADER;
-
-//
-// EFI Fault tolerant block update write queue record.
-//
-typedef struct {
- UINT8 BootBlockUpdate : 1;
- UINT8 SpareComplete : 1;
- UINT8 DestinationComplete : 1;
- UINT8 Reserved : 5;
- EFI_LBA Lba;
- UINT64 Offset;
- UINT64 Length;
- //
- // Relative offset to spare block.
- //
- INT64 RelativeOffset;
- //
- // UINT8 PrivateData[PrivateDataSize]
- //
-} EFI_FAULT_TOLERANT_WRITE_RECORD;
-
-#define FTW_RECORD_SIZE(PrivateDataSize) (sizeof (EFI_FAULT_TOLERANT_WRITE_RECORD) + (UINTN) PrivateDataSize)
-
-#define FTW_RECORD_TOTAL_SIZE(NumberOfWrites, PrivateDataSize) \
- ((UINTN) (NumberOfWrites) * (sizeof (EFI_FAULT_TOLERANT_WRITE_RECORD) + (UINTN) PrivateDataSize))
-
-#define FTW_WRITE_TOTAL_SIZE(NumberOfWrites, PrivateDataSize) \
- ( \
- sizeof (EFI_FAULT_TOLERANT_WRITE_HEADER) + (UINTN) (NumberOfWrites) * \
- (sizeof (EFI_FAULT_TOLERANT_WRITE_RECORD) + (UINTN) PrivateDataSize) \
- )
-
-#endif
+/** @file
+ This file defines NvDataFv GUID and FTW working block structures.
+ The NvDataFv GUID can be used as FileSystemGuid in EFI_FIRMWARE_VOLUME_HEADER if
+ this FV image contains NV data, such as NV variable data.
+ This file also defines WorkingBlockSignature GUID for FTW working block signature.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __SYSTEM_NV_DATA_GUID_H__
+#define __SYSTEM_NV_DATA_GUID_H__
+
+#define EFI_SYSTEM_NV_DATA_FV_GUID \
+ {0xfff12b8d, 0x7696, 0x4c8b, {0xa9, 0x85, 0x27, 0x47, 0x7, 0x5b, 0x4f, 0x50} }
+
+#define EDKII_WORKING_BLOCK_SIGNATURE_GUID \
+ {0x9e58292b, 0x7c68, 0x497d, {0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95} }
+
+extern EFI_GUID gEfiSystemNvDataFvGuid;
+extern EFI_GUID gEdkiiWorkingBlockSignatureGuid;
+
+#define WORKING_BLOCK_VALID 0x1
+#define WORKING_BLOCK_INVALID 0x2
+
+///
+/// The EDKII Fault tolerant working block header.
+/// The header is immediately followed by the write queue data.
+///
+typedef struct {
+ ///
+ /// FTW working block signature.
+ /// Its value has be updated from gEfiSystemNvDataFvGuid to gEdkiiWorkingBlockSignatureGuid,
+ /// because its write queue data format has been updated to support the crossing archs.
+ ///
+ EFI_GUID Signature;
+ ///
+ /// 32bit CRC calculated for this header.
+ ///
+ UINT32 Crc;
+ ///
+ /// Working block valid bit.
+ ///
+ UINT8 WorkingBlockValid : 1;
+ UINT8 WorkingBlockInvalid : 1;
+ UINT8 Reserved : 6;
+ UINT8 Reserved3[3];
+ ///
+ /// Total size of the following write queue range.
+ ///
+ UINT64 WriteQueueSize;
+ ///
+ /// Write Queue data.
+ ///
+ /// EFI_FAULT_TOLERANT_WRITE_HEADER FtwHeader;
+ /// EFI_FAULT_TOLERANT_WRITE_RECORD FtwRecord[FtwHeader.NumberOfWrites]
+ /// EFI_FAULT_TOLERANT_WRITE_HEADER FtwHeader2;
+ /// EFI_FAULT_TOLERANT_WRITE_RECORD FtwRecord2[FtwHeader2.NumberOfWrites]
+ /// ...
+ ///
+} EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER;
+
+#define FTW_VALID_STATE 0
+#define FTW_INVALID_STATE 1
+
+//
+// EFI Fault tolerant block update write queue entry.
+//
+typedef struct {
+ UINT8 HeaderAllocated : 1;
+ UINT8 WritesAllocated : 1;
+ UINT8 Complete : 1;
+ UINT8 Reserved : 5;
+ EFI_GUID CallerId;
+ UINT64 NumberOfWrites;
+ UINT64 PrivateDataSize;
+} EFI_FAULT_TOLERANT_WRITE_HEADER;
+
+//
+// EFI Fault tolerant block update write queue record.
+//
+typedef struct {
+ UINT8 BootBlockUpdate : 1;
+ UINT8 SpareComplete : 1;
+ UINT8 DestinationComplete : 1;
+ UINT8 Reserved : 5;
+ EFI_LBA Lba;
+ UINT64 Offset;
+ UINT64 Length;
+ //
+ // Relative offset to spare block.
+ //
+ INT64 RelativeOffset;
+ //
+ // UINT8 PrivateData[PrivateDataSize]
+ //
+} EFI_FAULT_TOLERANT_WRITE_RECORD;
+
+#define FTW_RECORD_SIZE(PrivateDataSize) (sizeof (EFI_FAULT_TOLERANT_WRITE_RECORD) + (UINTN) PrivateDataSize)
+
+#define FTW_RECORD_TOTAL_SIZE(NumberOfWrites, PrivateDataSize) \
+ ((UINTN) (NumberOfWrites) * (sizeof (EFI_FAULT_TOLERANT_WRITE_RECORD) + (UINTN) PrivateDataSize))
+
+#define FTW_WRITE_TOTAL_SIZE(NumberOfWrites, PrivateDataSize) \
+ ( \
+ sizeof (EFI_FAULT_TOLERANT_WRITE_HEADER) + (UINTN) (NumberOfWrites) * \
+ (sizeof (EFI_FAULT_TOLERANT_WRITE_RECORD) + (UINTN) PrivateDataSize) \
+ )
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/TraceHubDebugInfoHob.h b/MdeModulePkg/Include/Guid/TraceHubDebugInfoHob.h
index 367f97dc90..409af3aacf 100644
--- a/MdeModulePkg/Include/Guid/TraceHubDebugInfoHob.h
+++ b/MdeModulePkg/Include/Guid/TraceHubDebugInfoHob.h
@@ -1,24 +1,24 @@
-/** @file
-This header file declares Trace Hub related structure.
-
-Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
-
-SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#ifndef TRACE_HUB_DEBUG_INFO_HOB_H_
-#define TRACE_HUB_DEBUG_INFO_HOB_H_
-
-#define TRACEHUB_DEBUG_INFO_HOB_REVISION 1
-
-typedef struct {
- UINT16 Revision; // Structure revision
- BOOLEAN Flag; // Flag to enable or disable Trace Hub debug message.
- UINT8 DebugLevel; // Debug level for Trace Hub.
- UINT8 Rvsd[4]; // Reserved for future use
- UINT64 TraceHubMmioAddress; // MMIO address where Trace Hub debug message output to.
-} TRACEHUB_DEBUG_INFO_HOB;
-
-extern GUID gTraceHubDebugInfoHobGuid;
-
-#endif // TRACE_HUB_DEBUG_INFO_HOB_H_
+/** @file
+This header file declares Trace Hub related structure.
+
+Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
+
+SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef TRACE_HUB_DEBUG_INFO_HOB_H_
+#define TRACE_HUB_DEBUG_INFO_HOB_H_
+
+#define TRACEHUB_DEBUG_INFO_HOB_REVISION 1
+
+typedef struct {
+ UINT16 Revision; // Structure revision
+ BOOLEAN Flag; // Flag to enable or disable Trace Hub debug message.
+ UINT8 DebugLevel; // Debug level for Trace Hub.
+ UINT8 Rvsd[4]; // Reserved for future use
+ UINT64 TraceHubMmioAddress; // MMIO address where Trace Hub debug message output to.
+} TRACEHUB_DEBUG_INFO_HOB;
+
+extern GUID gTraceHubDebugInfoHobGuid;
+
+#endif // TRACE_HUB_DEBUG_INFO_HOB_H_
diff --git a/MdeModulePkg/Include/Guid/TtyTerm.h b/MdeModulePkg/Include/Guid/TtyTerm.h
index 6bd999cc96..b5e47edb79 100644
--- a/MdeModulePkg/Include/Guid/TtyTerm.h
+++ b/MdeModulePkg/Include/Guid/TtyTerm.h
@@ -1,36 +1,36 @@
-/** @file
-GUID definition for TtyTerm terminal type. The TtyTerm terminal aims to
-provide support for modern *nix terminals.
-
-
-Copyright (c) 2015 Linaro Ltd.
-Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __TTYTERM_H__
-#define __TTYTERM_H__
-
-#define EFI_TTY_TERM_GUID \
- {0x7d916d80, 0x5bb1, 0x458c, {0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94 } }
-
-#define EDKII_LINUX_TERM_GUID \
- {0xe4364a7f, 0xf825, 0x430e, {0x9d, 0x3a, 0x9c, 0x9b, 0xe6, 0x81, 0x7c, 0xa5 } }
-
-#define EDKII_XTERM_R6_GUID \
- {0xfbfca56b, 0xbb36, 0x4b78, {0xaa, 0xab, 0xbe, 0x1b, 0x97, 0xec, 0x7c, 0xcb } }
-
-#define EDKII_VT400_GUID \
- {0x8e46dddd, 0x3d49, 0x4a9d, {0xb8, 0x75, 0x3c, 0x08, 0x6f, 0x6a, 0xa2, 0xbd } }
-
-#define EDKII_SCO_TERM_GUID \
- {0xfc7dd6e0, 0x813c, 0x434d, {0xb4, 0xda, 0x3b, 0xd6, 0x49, 0xe9, 0xe1, 0x5a } }
-
-extern EFI_GUID gEfiTtyTermGuid;
-extern EFI_GUID gEdkiiLinuxTermGuid;
-extern EFI_GUID gEdkiiXtermR6Guid;
-extern EFI_GUID gEdkiiVT400Guid;
-extern EFI_GUID gEdkiiSCOTermGuid;
-
-#endif
+/** @file
+GUID definition for TtyTerm terminal type. The TtyTerm terminal aims to
+provide support for modern *nix terminals.
+
+
+Copyright (c) 2015 Linaro Ltd.
+Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __TTYTERM_H__
+#define __TTYTERM_H__
+
+#define EFI_TTY_TERM_GUID \
+ {0x7d916d80, 0x5bb1, 0x458c, {0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94 } }
+
+#define EDKII_LINUX_TERM_GUID \
+ {0xe4364a7f, 0xf825, 0x430e, {0x9d, 0x3a, 0x9c, 0x9b, 0xe6, 0x81, 0x7c, 0xa5 } }
+
+#define EDKII_XTERM_R6_GUID \
+ {0xfbfca56b, 0xbb36, 0x4b78, {0xaa, 0xab, 0xbe, 0x1b, 0x97, 0xec, 0x7c, 0xcb } }
+
+#define EDKII_VT400_GUID \
+ {0x8e46dddd, 0x3d49, 0x4a9d, {0xb8, 0x75, 0x3c, 0x08, 0x6f, 0x6a, 0xa2, 0xbd } }
+
+#define EDKII_SCO_TERM_GUID \
+ {0xfc7dd6e0, 0x813c, 0x434d, {0xb4, 0xda, 0x3b, 0xd6, 0x49, 0xe9, 0xe1, 0x5a } }
+
+extern EFI_GUID gEfiTtyTermGuid;
+extern EFI_GUID gEdkiiLinuxTermGuid;
+extern EFI_GUID gEdkiiXtermR6Guid;
+extern EFI_GUID gEdkiiVT400Guid;
+extern EFI_GUID gEdkiiSCOTermGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h b/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h
index c43f0656ea..c8a321110e 100644
--- a/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h
+++ b/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h
@@ -1,31 +1,31 @@
-/** @file
- USB KeyBoard Layout GUIDs
-
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __USB_KEYBOARD_LAYOUT_GUID_H__
-#define __USB_KEYBOARD_LAYOUT_GUID_H__
-
-//
-// GUID for USB keyboard HII package list.
-//
-#define USB_KEYBOARD_LAYOUT_PACKAGE_GUID \
- { \
- 0xc0f3b43, 0x44de, 0x4907, { 0xb4, 0x78, 0x22, 0x5f, 0x6f, 0x62, 0x89, 0xdc } \
- }
-
-//
-// GUID for USB keyboard layout
-//
-#define USB_KEYBOARD_LAYOUT_KEY_GUID \
- { \
- 0x3a4d7a7c, 0x18a, 0x4b42, { 0x81, 0xb3, 0xdc, 0x10, 0xe3, 0xb5, 0x91, 0xbd } \
- }
-
-extern EFI_GUID gUsbKeyboardLayoutPackageGuid;
-extern EFI_GUID gUsbKeyboardLayoutKeyGuid;
-
-#endif
+/** @file
+ USB KeyBoard Layout GUIDs
+
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __USB_KEYBOARD_LAYOUT_GUID_H__
+#define __USB_KEYBOARD_LAYOUT_GUID_H__
+
+//
+// GUID for USB keyboard HII package list.
+//
+#define USB_KEYBOARD_LAYOUT_PACKAGE_GUID \
+ { \
+ 0xc0f3b43, 0x44de, 0x4907, { 0xb4, 0x78, 0x22, 0x5f, 0x6f, 0x62, 0x89, 0xdc } \
+ }
+
+//
+// GUID for USB keyboard layout
+//
+#define USB_KEYBOARD_LAYOUT_KEY_GUID \
+ { \
+ 0x3a4d7a7c, 0x18a, 0x4b42, { 0x81, 0xb3, 0xdc, 0x10, 0xe3, 0xb5, 0x91, 0xbd } \
+ }
+
+extern EFI_GUID gUsbKeyboardLayoutPackageGuid;
+extern EFI_GUID gUsbKeyboardLayoutKeyGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h b/MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h
index a692fa40c9..9e470adecd 100644
--- a/MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h
+++ b/MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h
@@ -1,83 +1,83 @@
-/** @file -- VarCheckPolicyMmiCommon.h
-This header contains communication definitions that are shared between DXE
-and the MM component of VarCheckPolicy.
-
-Copyright (c) Microsoft Corporation.
-SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#ifndef _VAR_CHECK_POLICY_MMI_COMMON_H_
-#define _VAR_CHECK_POLICY_MMI_COMMON_H_
-
-#define VAR_CHECK_POLICY_COMM_SIG SIGNATURE_32('V', 'C', 'P', 'C')
-#define VAR_CHECK_POLICY_COMM_REVISION 1
-
-#pragma pack(push, 1)
-
-typedef struct _VAR_CHECK_POLICY_COMM_HEADER {
- UINT32 Signature;
- UINT32 Revision;
- UINT32 Command;
- EFI_STATUS Result;
-} VAR_CHECK_POLICY_COMM_HEADER;
-
-typedef struct _VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS {
- BOOLEAN State;
-} VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS;
-
-typedef struct _VAR_CHECK_POLICY_COMM_DUMP_PARAMS {
- UINT32 PageRequested;
- UINT32 TotalSize;
- UINT32 PageSize;
- BOOLEAN HasMore;
-} VAR_CHECK_POLICY_COMM_DUMP_PARAMS;
-
-typedef union {
- VARIABLE_POLICY_ENTRY VariablePolicy;
- VARIABLE_LOCK_ON_VAR_STATE_POLICY LockOnVarStatePolicy;
-} VAR_CHECK_POLICY_OUTPUT_POLICY_ENTRY;
-
-typedef struct _VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS {
- EFI_GUID InputVendorGuid;
- UINT32 InputVariableNameSize;
- UINT32 OutputVariableNameSize;
- VAR_CHECK_POLICY_OUTPUT_POLICY_ENTRY OutputPolicyEntry;
- CHAR16 InputVariableName[1];
-} VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS;
-
-#pragma pack(pop)
-
-#define VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS_END \
- (OFFSET_OF(VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS, InputVariableName))
-
-// Make sure that we will hold at least the headers.
-#define VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE MAX((OFFSET_OF(EFI_MM_COMMUNICATE_HEADER, Data) + sizeof (VAR_CHECK_POLICY_COMM_HEADER) + EFI_PAGES_TO_SIZE(1)), EFI_PAGES_TO_SIZE(4))
-#define VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE (VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE - \
- (OFFSET_OF(EFI_MM_COMMUNICATE_HEADER, Data) + \
- sizeof(VAR_CHECK_POLICY_COMM_HEADER) + \
- sizeof(VAR_CHECK_POLICY_COMM_DUMP_PARAMS)))
-
-#define VAR_CHECK_POLICY_MM_GET_INFO_BUFFER_SIZE (VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE - \
- (OFFSET_OF(EFI_MM_COMMUNICATE_HEADER, Data) + \
- sizeof(VAR_CHECK_POLICY_COMM_HEADER) + \
- OFFSET_OF(VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS, InputVariableName)))
-
-STATIC_ASSERT (
- VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE < VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE,
- "an integer underflow may have occurred calculating VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE"
- );
-
-STATIC_ASSERT (
- VAR_CHECK_POLICY_MM_GET_INFO_BUFFER_SIZE < VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE,
- "an integer underflow may have occurred calculating VAR_CHECK_POLICY_MM_GET_INFO_BUFFER_SIZE"
- );
-
-#define VAR_CHECK_POLICY_COMMAND_DISABLE 0x0001
-#define VAR_CHECK_POLICY_COMMAND_IS_ENABLED 0x0002
-#define VAR_CHECK_POLICY_COMMAND_REGISTER 0x0003
-#define VAR_CHECK_POLICY_COMMAND_DUMP 0x0004
-#define VAR_CHECK_POLICY_COMMAND_LOCK 0x0005
-#define VAR_CHECK_POLICY_COMMAND_GET_INFO 0x0006
-#define VAR_CHECK_POLICY_COMMAND_GET_LOCK_VAR_STATE_INFO 0x0007
-
-#endif // _VAR_CHECK_POLICY_MMI_COMMON_H_
+/** @file -- VarCheckPolicyMmiCommon.h
+This header contains communication definitions that are shared between DXE
+and the MM component of VarCheckPolicy.
+
+Copyright (c) Microsoft Corporation.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef _VAR_CHECK_POLICY_MMI_COMMON_H_
+#define _VAR_CHECK_POLICY_MMI_COMMON_H_
+
+#define VAR_CHECK_POLICY_COMM_SIG SIGNATURE_32('V', 'C', 'P', 'C')
+#define VAR_CHECK_POLICY_COMM_REVISION 1
+
+#pragma pack(push, 1)
+
+typedef struct _VAR_CHECK_POLICY_COMM_HEADER {
+ UINT32 Signature;
+ UINT32 Revision;
+ UINT32 Command;
+ EFI_STATUS Result;
+} VAR_CHECK_POLICY_COMM_HEADER;
+
+typedef struct _VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS {
+ BOOLEAN State;
+} VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS;
+
+typedef struct _VAR_CHECK_POLICY_COMM_DUMP_PARAMS {
+ UINT32 PageRequested;
+ UINT32 TotalSize;
+ UINT32 PageSize;
+ BOOLEAN HasMore;
+} VAR_CHECK_POLICY_COMM_DUMP_PARAMS;
+
+typedef union {
+ VARIABLE_POLICY_ENTRY VariablePolicy;
+ VARIABLE_LOCK_ON_VAR_STATE_POLICY LockOnVarStatePolicy;
+} VAR_CHECK_POLICY_OUTPUT_POLICY_ENTRY;
+
+typedef struct _VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS {
+ EFI_GUID InputVendorGuid;
+ UINT32 InputVariableNameSize;
+ UINT32 OutputVariableNameSize;
+ VAR_CHECK_POLICY_OUTPUT_POLICY_ENTRY OutputPolicyEntry;
+ CHAR16 InputVariableName[1];
+} VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS;
+
+#pragma pack(pop)
+
+#define VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS_END \
+ (OFFSET_OF(VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS, InputVariableName))
+
+// Make sure that we will hold at least the headers.
+#define VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE MAX((OFFSET_OF(EFI_MM_COMMUNICATE_HEADER, Data) + sizeof (VAR_CHECK_POLICY_COMM_HEADER) + EFI_PAGES_TO_SIZE(1)), EFI_PAGES_TO_SIZE(4))
+#define VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE (VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE - \
+ (OFFSET_OF(EFI_MM_COMMUNICATE_HEADER, Data) + \
+ sizeof(VAR_CHECK_POLICY_COMM_HEADER) + \
+ sizeof(VAR_CHECK_POLICY_COMM_DUMP_PARAMS)))
+
+#define VAR_CHECK_POLICY_MM_GET_INFO_BUFFER_SIZE (VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE - \
+ (OFFSET_OF(EFI_MM_COMMUNICATE_HEADER, Data) + \
+ sizeof(VAR_CHECK_POLICY_COMM_HEADER) + \
+ OFFSET_OF(VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS, InputVariableName)))
+
+STATIC_ASSERT (
+ VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE < VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE,
+ "an integer underflow may have occurred calculating VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE"
+ );
+
+STATIC_ASSERT (
+ VAR_CHECK_POLICY_MM_GET_INFO_BUFFER_SIZE < VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE,
+ "an integer underflow may have occurred calculating VAR_CHECK_POLICY_MM_GET_INFO_BUFFER_SIZE"
+ );
+
+#define VAR_CHECK_POLICY_COMMAND_DISABLE 0x0001
+#define VAR_CHECK_POLICY_COMMAND_IS_ENABLED 0x0002
+#define VAR_CHECK_POLICY_COMMAND_REGISTER 0x0003
+#define VAR_CHECK_POLICY_COMMAND_DUMP 0x0004
+#define VAR_CHECK_POLICY_COMMAND_LOCK 0x0005
+#define VAR_CHECK_POLICY_COMMAND_GET_INFO 0x0006
+#define VAR_CHECK_POLICY_COMMAND_GET_LOCK_VAR_STATE_INFO 0x0007
+
+#endif // _VAR_CHECK_POLICY_MMI_COMMON_H_
diff --git a/MdeModulePkg/Include/Guid/VarErrorFlag.h b/MdeModulePkg/Include/Guid/VarErrorFlag.h
index e59ad79283..2b3d806009 100644
--- a/MdeModulePkg/Include/Guid/VarErrorFlag.h
+++ b/MdeModulePkg/Include/Guid/VarErrorFlag.h
@@ -1,34 +1,34 @@
-/** @file
- Variable error flag definitions.
-
- Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _VARIABLE_ERROR_FLAG_H_
-#define _VARIABLE_ERROR_FLAG_H_
-
-//
-// Before EndOfDxe, the variable indicates the last boot variable error flag,
-// then it means the last boot variable error flag must be got before EndOfDxe.
-// After EndOfDxe, the variable indicates the current boot variable error flag,
-// then it means the current boot variable error flag must be got after EndOfDxe.
-//
-// If the variable is not present, it has the same meaning with VAR_ERROR_FLAG_NO_ERROR.
-//
-#define VAR_ERROR_FLAG_NAME L"VarErrorFlag"
-
-#define VAR_ERROR_FLAG_NO_ERROR 0xFF // 1111-1111
-#define VAR_ERROR_FLAG_SYSTEM_ERROR 0xEF // 1110-1111
-#define VAR_ERROR_FLAG_USER_ERROR 0xFE // 1111-1110
-
-typedef UINT8 VAR_ERROR_FLAG;
-
-#define EDKII_VAR_ERROR_FLAG_GUID {\
- 0x4b37fe8, 0xf6ae, 0x480b, { 0xbd, 0xd5, 0x37, 0xd9, 0x8c, 0x5e, 0x89, 0xaa } \
-};
-
-extern EFI_GUID gEdkiiVarErrorFlagGuid;
-
-#endif
+/** @file
+ Variable error flag definitions.
+
+ Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _VARIABLE_ERROR_FLAG_H_
+#define _VARIABLE_ERROR_FLAG_H_
+
+//
+// Before EndOfDxe, the variable indicates the last boot variable error flag,
+// then it means the last boot variable error flag must be got before EndOfDxe.
+// After EndOfDxe, the variable indicates the current boot variable error flag,
+// then it means the current boot variable error flag must be got after EndOfDxe.
+//
+// If the variable is not present, it has the same meaning with VAR_ERROR_FLAG_NO_ERROR.
+//
+#define VAR_ERROR_FLAG_NAME L"VarErrorFlag"
+
+#define VAR_ERROR_FLAG_NO_ERROR 0xFF // 1111-1111
+#define VAR_ERROR_FLAG_SYSTEM_ERROR 0xEF // 1110-1111
+#define VAR_ERROR_FLAG_USER_ERROR 0xFE // 1111-1110
+
+typedef UINT8 VAR_ERROR_FLAG;
+
+#define EDKII_VAR_ERROR_FLAG_GUID {\
+ 0x4b37fe8, 0xf6ae, 0x480b, { 0xbd, 0xd5, 0x37, 0xd9, 0x8c, 0x5e, 0x89, 0xaa } \
+};
+
+extern EFI_GUID gEdkiiVarErrorFlagGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/VariableFlashInfo.h b/MdeModulePkg/Include/Guid/VariableFlashInfo.h
index 992a0dcdd3..5d836f3ea9 100644
--- a/MdeModulePkg/Include/Guid/VariableFlashInfo.h
+++ b/MdeModulePkg/Include/Guid/VariableFlashInfo.h
@@ -1,111 +1,111 @@
-/** @file
- This file defines the GUID and data structure used to pass information about
- a variable store mapped on flash (i.e. a MMIO firmware volume) to the modules
- that consume that information such as the DXE and MM UEFI variable drivers.
-
- The HOB described in this file is currently optional. It is primarily provided
- to allow a platform to dynamically describe the flash information to environments
- such as Standalone MM that cannot access the prior method using dynamic PCDs.
-
- Even for platforms that use Standalone MM, if the information is only stored
- statically such as with FixedAtBuild PCDs, the HOB is not required.
-
- Every point of consumption in this package that uses the PCDs will first check
- for the HOB and use its value if present.
-
- Early modules such as the PEI UEFI variable driver might also consume this
- information. For modules such as these, that execute early in the boot flow,
- at least two approaches are possible depending on platform design.
-
- 1. If the information in the HOB exactly matches the information in the PCDs,
- (i.e. the HOB values are set using the PCD values), let the driver read
- the information from the PCD and produce the HOB later in boot.
-
- 2. Produce the HOB very early in boot. For example, the earliest point the HOB
- is currently consumed is in FaultTolerantWritePei. Note that FaultTolerantWritePei
- produces gEdkiiFaultTolerantWriteGuid which is a dependency for VariablePei.
-
- Therefore, attaching a NULL class library to FaultTolerantWritePei with a
- constructor that produces the HOB will guarantee it is produced before the first
- point of consumption as the constructor is executed before the module entry point.
-
- Copyright (c) Microsoft Corporation.<BR>
-
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef VARIABLE_FLASH_INFO_H_
-#define VARIABLE_FLASH_INFO_H_
-
-#define VARIABLE_FLASH_INFO_HOB_GUID \
- { 0x5d11c653, 0x8154, 0x4ac3, { 0xa8, 0xc2, 0xfb, 0xa2, 0x89, 0x20, 0xfc, 0x90 }}
-
-#define VARIABLE_FLASH_INFO_HOB_VERSION 1
-
-extern EFI_GUID gVariableFlashInfoHobGuid;
-
-#pragma pack (push, 1)
-
-///
-/// This structure can be used to describe UEFI variable
-/// flash information.
-///
-typedef struct {
- ///
- /// Version of this structure.
- ///
- /// Increment the value when the structure is modified.
- ///
- UINT32 Version;
- ///
- /// Reserved field.
- ///
- /// Currently reserved for natural alignment.
- ///
- UINT32 Reserved;
- ///
- /// Base address of the non-volatile variable range in the flash device.
- ///
- /// Note that this address should align with the block size requirements of the flash device.
- ///
- EFI_PHYSICAL_ADDRESS NvVariableBaseAddress;
- ///
- /// Size of the non-volatile variable range in the flash device.
- ///
- /// Note that this value should be less than or equal to FtwSpareLength to support reclaim of
- /// entire variable store area.
- /// Note that this address should align with the block size requirements of the flash device.
- ///
- UINT64 NvVariableLength;
- ///
- /// Base address of the FTW spare block range in the flash device.
- ///
- /// Note that this address should align with the block size requirements of the flash device.
- ///
- EFI_PHYSICAL_ADDRESS FtwSpareBaseAddress;
- ///
- /// Size of the FTW spare block range in the flash device.
- ///
- /// Note that this value should be greater than or equal to NvVariableLength.
- /// Note that this address should align with the block size requirements of the flash device.
- ///
- UINT64 FtwSpareLength;
- ///
- /// Base address of the FTW working block range in the flash device.
- ///
- /// Note that if FtwWorkingLength is larger than on block size, this value should be block size aligned.
- ///
- EFI_PHYSICAL_ADDRESS FtwWorkingBaseAddress;
- ///
- /// Size of the FTW working block range in the flash device.
- ///
- /// Note that if the value is less than on block size, the range should not span blocks.
- /// Note that if the value is larger than one block size, this value should be block size aligned.
- ///
- UINT64 FtwWorkingLength;
-} VARIABLE_FLASH_INFO;
-
-#pragma pack (pop)
-
-#endif
+/** @file
+ This file defines the GUID and data structure used to pass information about
+ a variable store mapped on flash (i.e. a MMIO firmware volume) to the modules
+ that consume that information such as the DXE and MM UEFI variable drivers.
+
+ The HOB described in this file is currently optional. It is primarily provided
+ to allow a platform to dynamically describe the flash information to environments
+ such as Standalone MM that cannot access the prior method using dynamic PCDs.
+
+ Even for platforms that use Standalone MM, if the information is only stored
+ statically such as with FixedAtBuild PCDs, the HOB is not required.
+
+ Every point of consumption in this package that uses the PCDs will first check
+ for the HOB and use its value if present.
+
+ Early modules such as the PEI UEFI variable driver might also consume this
+ information. For modules such as these, that execute early in the boot flow,
+ at least two approaches are possible depending on platform design.
+
+ 1. If the information in the HOB exactly matches the information in the PCDs,
+ (i.e. the HOB values are set using the PCD values), let the driver read
+ the information from the PCD and produce the HOB later in boot.
+
+ 2. Produce the HOB very early in boot. For example, the earliest point the HOB
+ is currently consumed is in FaultTolerantWritePei. Note that FaultTolerantWritePei
+ produces gEdkiiFaultTolerantWriteGuid which is a dependency for VariablePei.
+
+ Therefore, attaching a NULL class library to FaultTolerantWritePei with a
+ constructor that produces the HOB will guarantee it is produced before the first
+ point of consumption as the constructor is executed before the module entry point.
+
+ Copyright (c) Microsoft Corporation.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef VARIABLE_FLASH_INFO_H_
+#define VARIABLE_FLASH_INFO_H_
+
+#define VARIABLE_FLASH_INFO_HOB_GUID \
+ { 0x5d11c653, 0x8154, 0x4ac3, { 0xa8, 0xc2, 0xfb, 0xa2, 0x89, 0x20, 0xfc, 0x90 }}
+
+#define VARIABLE_FLASH_INFO_HOB_VERSION 1
+
+extern EFI_GUID gVariableFlashInfoHobGuid;
+
+#pragma pack (push, 1)
+
+///
+/// This structure can be used to describe UEFI variable
+/// flash information.
+///
+typedef struct {
+ ///
+ /// Version of this structure.
+ ///
+ /// Increment the value when the structure is modified.
+ ///
+ UINT32 Version;
+ ///
+ /// Reserved field.
+ ///
+ /// Currently reserved for natural alignment.
+ ///
+ UINT32 Reserved;
+ ///
+ /// Base address of the non-volatile variable range in the flash device.
+ ///
+ /// Note that this address should align with the block size requirements of the flash device.
+ ///
+ EFI_PHYSICAL_ADDRESS NvVariableBaseAddress;
+ ///
+ /// Size of the non-volatile variable range in the flash device.
+ ///
+ /// Note that this value should be less than or equal to FtwSpareLength to support reclaim of
+ /// entire variable store area.
+ /// Note that this address should align with the block size requirements of the flash device.
+ ///
+ UINT64 NvVariableLength;
+ ///
+ /// Base address of the FTW spare block range in the flash device.
+ ///
+ /// Note that this address should align with the block size requirements of the flash device.
+ ///
+ EFI_PHYSICAL_ADDRESS FtwSpareBaseAddress;
+ ///
+ /// Size of the FTW spare block range in the flash device.
+ ///
+ /// Note that this value should be greater than or equal to NvVariableLength.
+ /// Note that this address should align with the block size requirements of the flash device.
+ ///
+ UINT64 FtwSpareLength;
+ ///
+ /// Base address of the FTW working block range in the flash device.
+ ///
+ /// Note that if FtwWorkingLength is larger than on block size, this value should be block size aligned.
+ ///
+ EFI_PHYSICAL_ADDRESS FtwWorkingBaseAddress;
+ ///
+ /// Size of the FTW working block range in the flash device.
+ ///
+ /// Note that if the value is less than on block size, the range should not span blocks.
+ /// Note that if the value is larger than one block size, this value should be block size aligned.
+ ///
+ UINT64 FtwWorkingLength;
+} VARIABLE_FLASH_INFO;
+
+#pragma pack (pop)
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/VariableFormat.h b/MdeModulePkg/Include/Guid/VariableFormat.h
index 534007a710..36196067a1 100644
--- a/MdeModulePkg/Include/Guid/VariableFormat.h
+++ b/MdeModulePkg/Include/Guid/VariableFormat.h
@@ -1,221 +1,221 @@
-/** @file
- The variable data structures are related to EDK II-specific implementation of UEFI variables.
- VariableFormat.h defines variable data headers and variable storage region headers.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __VARIABLE_FORMAT_H__
-#define __VARIABLE_FORMAT_H__
-
-#define EFI_VARIABLE_GUID \
- { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d } }
-
-#define EFI_AUTHENTICATED_VARIABLE_GUID \
- { 0xaaf32c78, 0x947b, 0x439a, { 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92 } }
-
-extern EFI_GUID gEfiVariableGuid;
-extern EFI_GUID gEfiAuthenticatedVariableGuid;
-
-///
-/// Alignment of variable name and data, according to the architecture:
-/// * For IA-32 and Intel(R) 64 architectures: 1.
-///
-#define ALIGNMENT 1
-
-//
-// GET_PAD_SIZE calculates the miminal pad bytes needed to make the current pad size satisfy the alignment requirement.
-//
-#if (ALIGNMENT == 1)
-#define GET_PAD_SIZE(a) (0)
-#else
-#define GET_PAD_SIZE(a) (((~a) + 1) & (ALIGNMENT - 1))
-#endif
-
-///
-/// Alignment of Variable Data Header in Variable Store region.
-///
-#define HEADER_ALIGNMENT 4
-#define HEADER_ALIGN(Header) (((UINTN) (Header) + HEADER_ALIGNMENT - 1) & (~(HEADER_ALIGNMENT - 1)))
-
-///
-/// Status of Variable Store Region.
-///
-typedef enum {
- EfiRaw,
- EfiValid,
- EfiInvalid,
- EfiUnknown
-} VARIABLE_STORE_STATUS;
-
-#pragma pack(1)
-
-#define VARIABLE_STORE_SIGNATURE EFI_VARIABLE_GUID
-#define AUTHENTICATED_VARIABLE_STORE_SIGNATURE EFI_AUTHENTICATED_VARIABLE_GUID
-
-///
-/// Variable Store Header Format and State.
-///
-#define VARIABLE_STORE_FORMATTED 0x5a
-#define VARIABLE_STORE_HEALTHY 0xfe
-
-///
-/// Variable Store region header.
-///
-typedef struct {
- ///
- /// Variable store region signature.
- ///
- EFI_GUID Signature;
- ///
- /// Size of entire variable store,
- /// including size of variable store header but not including the size of FvHeader.
- ///
- UINT32 Size;
- ///
- /// Variable region format state.
- ///
- UINT8 Format;
- ///
- /// Variable region healthy state.
- ///
- UINT8 State;
- UINT16 Reserved;
- UINT32 Reserved1;
-} VARIABLE_STORE_HEADER;
-
-///
-/// Variable data start flag.
-///
-#define VARIABLE_DATA 0x55AA
-
-///
-/// Variable State flags.
-///
-#define VAR_IN_DELETED_TRANSITION 0xfe ///< Variable is in obsolete transition.
-#define VAR_DELETED 0xfd ///< Variable is obsolete.
-#define VAR_HEADER_VALID_ONLY 0x7f ///< Variable header has been valid.
-#define VAR_ADDED 0x3f ///< Variable has been completely added.
-
-///
-/// Variable Attribute combinations.
-///
-#define VARIABLE_ATTRIBUTE_NV_BS (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)
-#define VARIABLE_ATTRIBUTE_BS_RT (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)
-#define VARIABLE_ATTRIBUTE_BS_RT_AT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)
-#define VARIABLE_ATTRIBUTE_NV_BS_RT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_NON_VOLATILE)
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_HARDWARE_ERROR_RECORD)
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_AT (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)
-#define VARIABLE_ATTRIBUTE_AT EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR_AT (VARIABLE_ATTRIBUTE_NV_BS_RT_HR | VARIABLE_ATTRIBUTE_AT)
-///
-/// EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered as reserved
-///
-#define VARIABLE_ATTRIBUTE_AT_AW (EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_AW (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR_AT_AW (VARIABLE_ATTRIBUTE_NV_BS_RT_HR | VARIABLE_ATTRIBUTE_AT_AW)
-
-///
-/// Single Variable Data Header Structure.
-///
-typedef struct {
- ///
- /// Variable Data Start Flag.
- ///
- UINT16 StartId;
- ///
- /// Variable State defined above.
- ///
- UINT8 State;
- UINT8 Reserved;
- ///
- /// Attributes of variable defined in UEFI specification.
- ///
- UINT32 Attributes;
- ///
- /// Size of variable null-terminated Unicode string name.
- ///
- UINT32 NameSize;
- ///
- /// Size of the variable data without this header.
- ///
- UINT32 DataSize;
- ///
- /// A unique identifier for the vendor that produces and consumes this varaible.
- ///
- EFI_GUID VendorGuid;
-} VARIABLE_HEADER;
-
-///
-/// Single Authenticated Variable Data Header Structure.
-///
-typedef struct {
- ///
- /// Variable Data Start Flag.
- ///
- UINT16 StartId;
- ///
- /// Variable State defined above.
- ///
- UINT8 State;
- UINT8 Reserved;
- ///
- /// Attributes of variable defined in UEFI specification.
- ///
- UINT32 Attributes;
- ///
- /// Associated monotonic count value against replay attack.
- ///
- UINT64 MonotonicCount;
- ///
- /// Associated TimeStamp value against replay attack.
- ///
- EFI_TIME TimeStamp;
- ///
- /// Index of associated public key in database.
- ///
- UINT32 PubKeyIndex;
- ///
- /// Size of variable null-terminated Unicode string name.
- ///
- UINT32 NameSize;
- ///
- /// Size of the variable data without this header.
- ///
- UINT32 DataSize;
- ///
- /// A unique identifier for the vendor that produces and consumes this varaible.
- ///
- EFI_GUID VendorGuid;
-} AUTHENTICATED_VARIABLE_HEADER;
-
-typedef struct {
- EFI_GUID *Guid;
- CHAR16 *Name;
- UINTN VariableSize;
-} VARIABLE_ENTRY_CONSISTENCY;
-
-#pragma pack()
-
-typedef struct _VARIABLE_INFO_ENTRY VARIABLE_INFO_ENTRY;
-
-///
-/// This structure contains the variable list that is put in EFI system table.
-/// The variable driver collects all variables that were used at boot service time and produces this list.
-/// This is an optional feature to dump all used variables in shell environment.
-///
-struct _VARIABLE_INFO_ENTRY {
- VARIABLE_INFO_ENTRY *Next; ///< Pointer to next entry.
- EFI_GUID VendorGuid; ///< Guid of Variable.
- CHAR16 *Name; ///< Name of Variable.
- UINT32 Attributes; ///< Attributes of variable defined in UEFI specification.
- UINT32 ReadCount; ///< Number of times to read this variable.
- UINT32 WriteCount; ///< Number of times to write this variable.
- UINT32 DeleteCount; ///< Number of times to delete this variable.
- UINT32 CacheCount; ///< Number of times that cache hits this variable.
- BOOLEAN Volatile; ///< TRUE if volatile, FALSE if non-volatile.
-};
-
-#endif // _EFI_VARIABLE_H_
+/** @file
+ The variable data structures are related to EDK II-specific implementation of UEFI variables.
+ VariableFormat.h defines variable data headers and variable storage region headers.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __VARIABLE_FORMAT_H__
+#define __VARIABLE_FORMAT_H__
+
+#define EFI_VARIABLE_GUID \
+ { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d } }
+
+#define EFI_AUTHENTICATED_VARIABLE_GUID \
+ { 0xaaf32c78, 0x947b, 0x439a, { 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92 } }
+
+extern EFI_GUID gEfiVariableGuid;
+extern EFI_GUID gEfiAuthenticatedVariableGuid;
+
+///
+/// Alignment of variable name and data, according to the architecture:
+/// * For IA-32 and Intel(R) 64 architectures: 1.
+///
+#define ALIGNMENT 1
+
+//
+// GET_PAD_SIZE calculates the miminal pad bytes needed to make the current pad size satisfy the alignment requirement.
+//
+#if (ALIGNMENT == 1)
+#define GET_PAD_SIZE(a) (0)
+#else
+#define GET_PAD_SIZE(a) (((~a) + 1) & (ALIGNMENT - 1))
+#endif
+
+///
+/// Alignment of Variable Data Header in Variable Store region.
+///
+#define HEADER_ALIGNMENT 4
+#define HEADER_ALIGN(Header) (((UINTN) (Header) + HEADER_ALIGNMENT - 1) & (~(HEADER_ALIGNMENT - 1)))
+
+///
+/// Status of Variable Store Region.
+///
+typedef enum {
+ EfiRaw,
+ EfiValid,
+ EfiInvalid,
+ EfiUnknown
+} VARIABLE_STORE_STATUS;
+
+#pragma pack(1)
+
+#define VARIABLE_STORE_SIGNATURE EFI_VARIABLE_GUID
+#define AUTHENTICATED_VARIABLE_STORE_SIGNATURE EFI_AUTHENTICATED_VARIABLE_GUID
+
+///
+/// Variable Store Header Format and State.
+///
+#define VARIABLE_STORE_FORMATTED 0x5a
+#define VARIABLE_STORE_HEALTHY 0xfe
+
+///
+/// Variable Store region header.
+///
+typedef struct {
+ ///
+ /// Variable store region signature.
+ ///
+ EFI_GUID Signature;
+ ///
+ /// Size of entire variable store,
+ /// including size of variable store header but not including the size of FvHeader.
+ ///
+ UINT32 Size;
+ ///
+ /// Variable region format state.
+ ///
+ UINT8 Format;
+ ///
+ /// Variable region healthy state.
+ ///
+ UINT8 State;
+ UINT16 Reserved;
+ UINT32 Reserved1;
+} VARIABLE_STORE_HEADER;
+
+///
+/// Variable data start flag.
+///
+#define VARIABLE_DATA 0x55AA
+
+///
+/// Variable State flags.
+///
+#define VAR_IN_DELETED_TRANSITION 0xfe ///< Variable is in obsolete transition.
+#define VAR_DELETED 0xfd ///< Variable is obsolete.
+#define VAR_HEADER_VALID_ONLY 0x7f ///< Variable header has been valid.
+#define VAR_ADDED 0x3f ///< Variable has been completely added.
+
+///
+/// Variable Attribute combinations.
+///
+#define VARIABLE_ATTRIBUTE_NV_BS (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)
+#define VARIABLE_ATTRIBUTE_BS_RT (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)
+#define VARIABLE_ATTRIBUTE_BS_RT_AT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)
+#define VARIABLE_ATTRIBUTE_NV_BS_RT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_NON_VOLATILE)
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_HARDWARE_ERROR_RECORD)
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_AT (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)
+#define VARIABLE_ATTRIBUTE_AT EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR_AT (VARIABLE_ATTRIBUTE_NV_BS_RT_HR | VARIABLE_ATTRIBUTE_AT)
+///
+/// EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered as reserved
+///
+#define VARIABLE_ATTRIBUTE_AT_AW (EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_AW (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR_AT_AW (VARIABLE_ATTRIBUTE_NV_BS_RT_HR | VARIABLE_ATTRIBUTE_AT_AW)
+
+///
+/// Single Variable Data Header Structure.
+///
+typedef struct {
+ ///
+ /// Variable Data Start Flag.
+ ///
+ UINT16 StartId;
+ ///
+ /// Variable State defined above.
+ ///
+ UINT8 State;
+ UINT8 Reserved;
+ ///
+ /// Attributes of variable defined in UEFI specification.
+ ///
+ UINT32 Attributes;
+ ///
+ /// Size of variable null-terminated Unicode string name.
+ ///
+ UINT32 NameSize;
+ ///
+ /// Size of the variable data without this header.
+ ///
+ UINT32 DataSize;
+ ///
+ /// A unique identifier for the vendor that produces and consumes this varaible.
+ ///
+ EFI_GUID VendorGuid;
+} VARIABLE_HEADER;
+
+///
+/// Single Authenticated Variable Data Header Structure.
+///
+typedef struct {
+ ///
+ /// Variable Data Start Flag.
+ ///
+ UINT16 StartId;
+ ///
+ /// Variable State defined above.
+ ///
+ UINT8 State;
+ UINT8 Reserved;
+ ///
+ /// Attributes of variable defined in UEFI specification.
+ ///
+ UINT32 Attributes;
+ ///
+ /// Associated monotonic count value against replay attack.
+ ///
+ UINT64 MonotonicCount;
+ ///
+ /// Associated TimeStamp value against replay attack.
+ ///
+ EFI_TIME TimeStamp;
+ ///
+ /// Index of associated public key in database.
+ ///
+ UINT32 PubKeyIndex;
+ ///
+ /// Size of variable null-terminated Unicode string name.
+ ///
+ UINT32 NameSize;
+ ///
+ /// Size of the variable data without this header.
+ ///
+ UINT32 DataSize;
+ ///
+ /// A unique identifier for the vendor that produces and consumes this varaible.
+ ///
+ EFI_GUID VendorGuid;
+} AUTHENTICATED_VARIABLE_HEADER;
+
+typedef struct {
+ EFI_GUID *Guid;
+ CHAR16 *Name;
+ UINTN VariableSize;
+} VARIABLE_ENTRY_CONSISTENCY;
+
+#pragma pack()
+
+typedef struct _VARIABLE_INFO_ENTRY VARIABLE_INFO_ENTRY;
+
+///
+/// This structure contains the variable list that is put in EFI system table.
+/// The variable driver collects all variables that were used at boot service time and produces this list.
+/// This is an optional feature to dump all used variables in shell environment.
+///
+struct _VARIABLE_INFO_ENTRY {
+ VARIABLE_INFO_ENTRY *Next; ///< Pointer to next entry.
+ EFI_GUID VendorGuid; ///< Guid of Variable.
+ CHAR16 *Name; ///< Name of Variable.
+ UINT32 Attributes; ///< Attributes of variable defined in UEFI specification.
+ UINT32 ReadCount; ///< Number of times to read this variable.
+ UINT32 WriteCount; ///< Number of times to write this variable.
+ UINT32 DeleteCount; ///< Number of times to delete this variable.
+ UINT32 CacheCount; ///< Number of times that cache hits this variable.
+ BOOLEAN Volatile; ///< TRUE if volatile, FALSE if non-volatile.
+};
+
+#endif // _EFI_VARIABLE_H_
diff --git a/MdeModulePkg/Include/Guid/VariableIndexTable.h b/MdeModulePkg/Include/Guid/VariableIndexTable.h
index f18a5e3c43..252bc3a84d 100644
--- a/MdeModulePkg/Include/Guid/VariableIndexTable.h
+++ b/MdeModulePkg/Include/Guid/VariableIndexTable.h
@@ -1,41 +1,41 @@
-/** @file
- The variable data structures are related to EDK II-specific implementation of UEFI variables.
- VariableFormat.h defines variable data headers and variable storage region headers.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __VARIABLE_INDEX_TABLE_H__
-#define __VARIABLE_INDEX_TABLE_H__
-
-typedef struct {
- VARIABLE_HEADER *CurrPtr;
- VARIABLE_HEADER *EndPtr;
- VARIABLE_HEADER *StartPtr;
-} VARIABLE_POINTER_TRACK;
-
-#define VARIABLE_INDEX_TABLE_VOLUME 122
-
-#define EFI_VARIABLE_INDEX_TABLE_GUID \
- { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c } }
-
-extern EFI_GUID gEfiVariableIndexTableGuid;
-
-///
-/// Use this data structure to store variable-related info, which can decrease
-/// the cost of access to NV.
-///
-typedef struct {
- UINT16 Length;
- UINT16 GoneThrough;
- VARIABLE_HEADER *EndPtr;
- VARIABLE_HEADER *StartPtr;
- ///
- /// This field is used to store the distance of two neighbouring VAR_ADDED type variables.
- /// The meaning of the field is implement-dependent.
- UINT16 Index[VARIABLE_INDEX_TABLE_VOLUME];
-} VARIABLE_INDEX_TABLE;
-
-#endif // __VARIABLE_INDEX_TABLE_H__
+/** @file
+ The variable data structures are related to EDK II-specific implementation of UEFI variables.
+ VariableFormat.h defines variable data headers and variable storage region headers.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __VARIABLE_INDEX_TABLE_H__
+#define __VARIABLE_INDEX_TABLE_H__
+
+typedef struct {
+ VARIABLE_HEADER *CurrPtr;
+ VARIABLE_HEADER *EndPtr;
+ VARIABLE_HEADER *StartPtr;
+} VARIABLE_POINTER_TRACK;
+
+#define VARIABLE_INDEX_TABLE_VOLUME 122
+
+#define EFI_VARIABLE_INDEX_TABLE_GUID \
+ { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c } }
+
+extern EFI_GUID gEfiVariableIndexTableGuid;
+
+///
+/// Use this data structure to store variable-related info, which can decrease
+/// the cost of access to NV.
+///
+typedef struct {
+ UINT16 Length;
+ UINT16 GoneThrough;
+ VARIABLE_HEADER *EndPtr;
+ VARIABLE_HEADER *StartPtr;
+ ///
+ /// This field is used to store the distance of two neighbouring VAR_ADDED type variables.
+ /// The meaning of the field is implement-dependent.
+ UINT16 Index[VARIABLE_INDEX_TABLE_VOLUME];
+} VARIABLE_INDEX_TABLE;
+
+#endif // __VARIABLE_INDEX_TABLE_H__
diff --git a/MdeModulePkg/Include/Guid/ZeroGuid.h b/MdeModulePkg/Include/Guid/ZeroGuid.h
index bcdca8353c..d1716e1fa8 100644
--- a/MdeModulePkg/Include/Guid/ZeroGuid.h
+++ b/MdeModulePkg/Include/Guid/ZeroGuid.h
@@ -1,19 +1,19 @@
-/** @file
- GUID has all zero values.
-
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __ZERO_GUID_H__
-#define __ZERO_GUID_H__
-
-#define ZERO_GUID \
- { \
- 0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} \
- }
-
-extern EFI_GUID gZeroGuid;
-
-#endif
+/** @file
+ GUID has all zero values.
+
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __ZERO_GUID_H__
+#define __ZERO_GUID_H__
+
+#define ZERO_GUID \
+ { \
+ 0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} \
+ }
+
+extern EFI_GUID gZeroGuid;
+
+#endif