1 /*++
2 
3 Copyright (c) 2004 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution.  The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8 
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 
12 Module Name:
13 
14   EfiCapsule.h
15 
16 Abstract:
17 
18   Defines for the EFI Capsule functionality
19 
20 --*/
21 
22 #ifndef _EFI_CAPSULE_H
23 #define _EFI_CAPSULE_H
24 
25 
26 #define CAPSULE_BLOCK_DESCRIPTOR_SIGNATURE  EFI_SIGNATURE_32 ('C', 'B', 'D', 'S')
27 
28 typedef struct {
29   EFI_GUID  OemGuid;
30   UINT32    HeaderSize;
31   //
32   // UINT8                       OemHdrData[];
33   //
34 } EFI_CAPSULE_OEM_HEADER;
35 
36 #define MAX_SUPPORT_CAPSULE_NUM               50
37 #define CAPSULE_FLAGS_PERSIST_ACROSS_RESET    0x00010000
38 #define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE   0x00020000
39 
40 typedef struct {
41   UINT64                   Length;
42   union {
43     EFI_PHYSICAL_ADDRESS   DataBlock;
44     EFI_PHYSICAL_ADDRESS   ContinuationPointer;
45   } Union;
46 } EFI_CAPSULE_BLOCK_DESCRIPTOR;
47 
48 typedef struct {
49   EFI_GUID  CapsuleGuid;
50   UINT32    HeaderSize;
51   UINT32    Flags;
52   UINT32    CapsuleImageSize;
53 } EFI_CAPSULE_HEADER;
54 
55 typedef struct {
56   UINT32   CapsuleArrayNumber;
57   VOID*    CapsulePtr[1];
58 } EFI_CAPSULE_TABLE;
59 
60 //
61 // Bits in the flags field of the capsule header
62 //
63 #define EFI_CAPSULE_HEADER_FLAG_SETUP 0x00000001  // supports setup changes
64 //
65 // This is the GUID of the capsule header of the image on disk.
66 //
67 #define EFI_CAPSULE_GUID \
68   { \
69     0x3B6686BD, 0x0D76, 0x4030, 0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0 \
70   }
71 
72 //
73 // This is the GUID of the file created by the capsule application that contains
74 // the path to the device(s) to update.
75 //
76 #define EFI_PATH_FILE_NAME_GUID \
77   { \
78     0x7644C181, 0xFA6E, 0x46DA, 0x80, 0xCB, 0x04, 0xB9, 0x90, 0x40, 0x62, 0xE8 \
79   }
80 //
81 // This is the GUID of the configuration results file created by the capsule
82 // application.
83 //
84 #define EFI_CONFIG_FILE_NAME_GUID \
85   { \
86     0x98B8D59B, 0xE8BA, 0x48EE, 0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB \
87   }
88 
89 #endif
90