]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/CapsulePei/Common/CommonHeader.h
MdeModulePkg CapsuleX64: Reduce reserved memory consumption
[mirror_edk2.git] / MdeModulePkg / Universal / CapsulePei / Common / CommonHeader.h
index d1ed24a572307c2e0446c8d92bbce2b19fa10487..6210d2133ebc3baa25fdb9d3a7fc76e4c1ee86c5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common header file.\r
 \r
-Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -15,6 +15,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef _CAPSULE_COMMON_HEADER_\r
 #define _CAPSULE_COMMON_HEADER_\r
 \r
+//\r
+// 8 extra pages for PF handler.\r
+//\r
+#define EXTRA_PAGE_TABLE_PAGES      8\r
+\r
 //\r
 // This capsule PEIM puts its private data at the start of the\r
 // coalesced capsule. Here's the structure definition.\r
@@ -33,6 +38,7 @@ typedef struct {
 #define CAPSULE_TEST_SIGNATURE SIGNATURE_32('T', 'E', 'S', 'T')\r
 \r
 #if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)\r
+#pragma pack(1)\r
 typedef struct {\r
   EFI_PHYSICAL_ADDRESS  EntryPoint;\r
   EFI_PHYSICAL_ADDRESS  StackBufferBase;\r
@@ -41,14 +47,23 @@ typedef struct {
   EFI_PHYSICAL_ADDRESS  BlockListAddr;\r
   EFI_PHYSICAL_ADDRESS  MemoryBase64Ptr;\r
   EFI_PHYSICAL_ADDRESS  MemorySize64Ptr;\r
+  BOOLEAN               Page1GSupport;\r
 } SWITCH_32_TO_64_CONTEXT;\r
 \r
 typedef struct {\r
   UINT16                ReturnCs;\r
   EFI_PHYSICAL_ADDRESS  ReturnEntryPoint;\r
   UINT64                ReturnStatus;\r
+  //\r
+  // NOTICE:\r
+  // Be careful about the Base field of IA32_DESCRIPTOR\r
+  // that is UINTN type.\r
+  // To extend new field for this structure, add it to\r
+  // right before this Gdtr field.\r
+  //\r
   IA32_DESCRIPTOR       Gdtr;\r
 } SWITCH_64_TO_32_CONTEXT;\r
+#pragma pack()\r
 #endif\r
 \r
 /**\r