summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/CapsulePei/Capsule.h
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-12 20:35:46 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-12 20:35:46 +0000
commitda58b0db33a223751779e5311c947becbfdeb639 (patch)
treec85d2bdc3f9a8738b5b2c6b2c8dcef85c06de262 /MdeModulePkg/Universal/CapsulePei/Capsule.h
parent619b3e0e8d70668eca4dd5f07fbba7308c654646 (diff)
downloadedk2-platforms-da58b0db33a223751779e5311c947becbfdeb639.tar.xz
MdeModulePkg: Add Capsule PEIM
Signed-off-by: jljusten Reviewed-by: mdkinney Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12011 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/CapsulePei/Capsule.h')
-rw-r--r--MdeModulePkg/Universal/CapsulePei/Capsule.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/CapsulePei/Capsule.h b/MdeModulePkg/Universal/CapsulePei/Capsule.h
new file mode 100644
index 0000000000..2a042f288d
--- /dev/null
+++ b/MdeModulePkg/Universal/CapsulePei/Capsule.h
@@ -0,0 +1,55 @@
+/** @file
+
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials
+are licensed and made available under the terms and conditions
+of the BSD License which accompanies this distribution. The
+full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _CAPSULE_PEIM_H_
+#define _CAPSULE_PEIM_H_
+
+#include <PiPei.h>
+#include <Uefi/UefiSpec.h>
+
+#include <Ppi/Capsule.h>
+
+#include <Ppi/ReadOnlyVariable2.h>
+#include <Guid/CapsuleVendor.h>
+
+#include <Library/DebugLib.h>
+#include <Library/PeimEntryPoint.h>
+#include <Library/PeiServicesLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/HobLib.h>
+#include <Library/PeiServicesTablePointerLib.h>
+#include <Library/PrintLib.h>
+
+//
+// We want to avoid using memory at 0 for coalescing, so set a
+// min address.
+//
+#define MIN_COALESCE_ADDR 0x100000
+#define MAX_SUPPORT_CAPSULE_NUM 50
+
+//
+// This capsule PEIM puts its private data at the start of the
+// coalesced capsule. Here's the structure definition.
+//
+#define EFI_CAPSULE_PEIM_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('C', 'a', 'p', 'D')
+
+typedef struct {
+ UINT32 Signature;
+ UINTN CapsuleSize;
+} EFI_CAPSULE_PEIM_PRIVATE_DATA;
+
+#define CAPSULE_TEST_SIGNATURE SIGNATURE_32('T', 'E', 'S', 'T')
+
+#endif