]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/CapsulePei/Capsule.h
MdeModulePkg/CapsulePei: Optimize the CapsulePei
[mirror_edk2.git] / MdeModulePkg / Universal / CapsulePei / Capsule.h
index 68d8e427459f68f8dffda252c25dde0a5512f715..3d9cab02c48500eaca5f7f967eb69ea0471ef532 100644 (file)
@@ -1,15 +1,8 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions\r
-of the BSD License which accompanies this distribution.  The\r
-full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -24,6 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Ppi/ReadOnlyVariable2.h>\r
 #include <Guid/CapsuleVendor.h>\r
 \r
+#include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PeimEntryPoint.h>\r
 #include <Library/PeiServicesLib.h>\r
@@ -36,10 +30,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PcdLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
 #include <Library/DebugAgentLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
 #include <IndustryStandard/PeImage.h>\r
 #include "Common/CommonHeader.h"\r
 \r
-#ifdef MDE_CPU_IA32 \r
+#ifdef MDE_CPU_IA32\r
 \r
 #pragma pack(1)\r
 \r
@@ -78,7 +73,7 @@ typedef union {
     UINT64  CacheDisabled:1;          // 0 = Cached, 1=Non-Cached\r
     UINT64  Accessed:1;               // 0 = Not accessed, 1 = Accessed (set by CPU)\r
     UINT64  Dirty:1;                  // 0 = Not Dirty, 1 = written by processor on access to page\r
-    UINT64  MustBe1:1;                // Must be 1 \r
+    UINT64  MustBe1:1;                // Must be 1\r
     UINT64  Global:1;                 // 0 = Not global page, 1 = global page TLB not cleared on CR3 write\r
     UINT64  Available:3;              // Available for use by system software\r
     UINT64  PAT:1;                    //\r
@@ -102,7 +97,7 @@ typedef union {
     UINT64  CacheDisabled:1;          // 0 = Cached, 1=Non-Cached\r
     UINT64  Accessed:1;               // 0 = Not accessed, 1 = Accessed (set by CPU)\r
     UINT64  Dirty:1;                  // 0 = Not Dirty, 1 = written by processor on access to page\r
-    UINT64  MustBe1:1;                // Must be 1 \r
+    UINT64  MustBe1:1;                // Must be 1\r
     UINT64  Global:1;                 // 0 = Not global page, 1 = global page TLB not cleared on CR3 write\r
     UINT64  Available:3;              // Available for use by system software\r
     UINT64  PAT:1;                    //\r
@@ -119,10 +114,8 @@ typedef union {
 typedef\r
 EFI_STATUS\r
 (*COALESCE_ENTRY) (\r
-  IN EFI_PEI_SERVICES                **PeiServices,\r
-  IN EFI_CAPSULE_BLOCK_DESCRIPTOR    *BlockList,\r
-  IN OUT VOID                        **MemoryBase,\r
-  IN OUT UINTN                       *MemorySize\r
+  SWITCH_32_TO_64_CONTEXT       *EntrypointContext,\r
+  SWITCH_64_TO_32_CONTEXT       *ReturnContext\r
   );\r
 \r
 #endif\r