]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/CapsulePei/Capsule.h
MdeModulePkg: Add Capsule PEIM
[mirror_edk2.git] / MdeModulePkg / Universal / CapsulePei / Capsule.h
1 /** @file
2
3 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
4
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions
7 of the BSD License which accompanies this distribution. The
8 full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _CAPSULE_PEIM_H_
17 #define _CAPSULE_PEIM_H_
18
19 #include <PiPei.h>
20 #include <Uefi/UefiSpec.h>
21
22 #include <Ppi/Capsule.h>
23
24 #include <Ppi/ReadOnlyVariable2.h>
25 #include <Guid/CapsuleVendor.h>
26
27 #include <Library/DebugLib.h>
28 #include <Library/PeimEntryPoint.h>
29 #include <Library/PeiServicesLib.h>
30 #include <Library/BaseMemoryLib.h>
31 #include <Library/HobLib.h>
32 #include <Library/PeiServicesTablePointerLib.h>
33 #include <Library/PrintLib.h>
34
35 //
36 // We want to avoid using memory at 0 for coalescing, so set a
37 // min address.
38 //
39 #define MIN_COALESCE_ADDR 0x100000
40 #define MAX_SUPPORT_CAPSULE_NUM 50
41
42 //
43 // This capsule PEIM puts its private data at the start of the
44 // coalesced capsule. Here's the structure definition.
45 //
46 #define EFI_CAPSULE_PEIM_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('C', 'a', 'p', 'D')
47
48 typedef struct {
49 UINT32 Signature;
50 UINTN CapsuleSize;
51 } EFI_CAPSULE_PEIM_PRIVATE_DATA;
52
53 #define CAPSULE_TEST_SIGNATURE SIGNATURE_32('T', 'E', 'S', 'T')
54
55 #endif