Home | History | Annotate | Download | only in Guid
      1 /** @file
      2   Framework Capule related Definition.
      3 
      4 Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
      5 This program and the accompanying materials are licensed and made available under
      6 the terms and conditions of the BSD License that accompanies this distribution.
      7 The full text of the license may be found at
      8 http://opensource.org/licenses/bsd-license.php.
      9 
     10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     12 
     13   @par Revision Reference:
     14   Capsule Spec Version 0.9
     15 **/
     16 
     17 #ifndef _CAPSULE_GUID_H__
     18 #define _CAPSULE_GUID_H__
     19 
     20 //
     21 // This is the GUID of the capsule header of the image on disk.
     22 //
     23 #define EFI_CAPSULE_GUID \
     24   { \
     25     0x3B6686BD, 0x0D76, 0x4030, {0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0 } \
     26   }
     27 
     28 //
     29 // This is the GUID of the configuration results file created by the capsule
     30 // application.
     31 //
     32 #define EFI_CONFIG_FILE_NAME_GUID \
     33   { \
     34     0x98B8D59B, 0xE8BA, 0x48EE, {0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB } \
     35   }
     36 
     37 ///
     38 /// Bits in the flags field of the capsule header.
     39 /// This flag is set if the capsule can support setup changes, and cleared if it cannot.
     40 ///
     41 #define EFI_CAPSULE_HEADER_FLAG_SETUP 0x00000001
     42 
     43 #define CAPSULE_BLOCK_DESCRIPTOR_SIGNATURE  SIGNATURE_32 ('C', 'B', 'D', 'S')
     44 
     45 //
     46 // An array of these structs describe the blocks that make up a capsule for
     47 // a capsule update.
     48 //
     49 typedef struct {
     50   UINT64                Length;     ///< Length of the data block.
     51   EFI_PHYSICAL_ADDRESS  Data;       ///< Physical address of the data block.
     52   UINT32                Signature;  ///< CBDS.
     53   UINT32                CheckSum;   ///< To sum this structure to 0.
     54 } FRAMEWORK_EFI_CAPSULE_BLOCK_DESCRIPTOR;
     55 
     56 typedef struct {
     57   EFI_GUID  OemGuid;
     58   UINT32    HeaderSize;
     59   //
     60   // UINT8                       OemHdrData[];
     61   //
     62 } EFI_CAPSULE_OEM_HEADER;
     63 
     64 typedef struct {
     65   ///
     66   /// A defined GUID that indicates the start of a capsule.
     67   ///
     68   EFI_GUID  CapsuleGuid;
     69   ///
     70   /// The size of the EFI_CAPSULE_HEADER structure.
     71   ///
     72   UINT32    HeaderSize;
     73   ///
     74   /// A bit-mapped list describing the capsule's attributes.
     75   /// All undefined bits should be written as zero (0).
     76   ///
     77   UINT32    Flags;
     78   ///
     79   /// The length in bytes (27,415 for an image containing 27,415 bytes) of the entire image
     80   /// including all headers. If this value is greater than the size of the data presented in
     81   /// the capsule body, the image is separated across multiple media. If this
     82   /// value is less than the size of the data, it is an error.
     83   ///
     84   UINT32    CapsuleImageSize;
     85   ///
     86   /// A zero-based number that enables a capsule to be split into pieces and then
     87   /// recombined for easier transfer across media with limited size. The lower the
     88   /// SequenceNumber, the earlier in the final image that the part of the capsule is to
     89   /// appear. In capsules that are not split, this value shall be zero.
     90   ///
     91   UINT32    SequenceNumber;
     92   ///
     93   /// Used to group the various pieces of a split capsule to ensure that they comprise the
     94   /// same base image. It is valid for this item to be zero, in which case the capsule cannot
     95   /// be split into components.
     96   ///
     97   EFI_GUID  InstanceId;
     98   ///
     99   /// The offset in bytes from the beginning of the header to the start of an EFI string that
    100   /// contains a description of the identity of the subcapsules that make up the capsule. If
    101   /// the capsule is not split, this value should be zero. The same string should be
    102   /// presented for all subcapsules that constitute the same capsule.
    103   ///
    104   UINT32    OffsetToSplitInformation;
    105   ///
    106   /// The offset in bytes from the beginning of the header to the start of the part of the
    107   /// capsule that is to be transferred to DXE.
    108   ///
    109   UINT32    OffsetToCapsuleBody;
    110   ///
    111   /// The offset in bytes from the beginning of the header to the start of the OEM-defined
    112   /// header. This value must be less than OffsetToCapsuleBody.
    113   ///
    114   UINT32    OffsetToOemDefinedHeader;
    115   ///
    116   /// The offset in bytes from the beginning of the header to the start of human-readable
    117   /// text that describes the entity that created the capsule. This value must be less than OffsetToCapsuleBody.
    118   ///
    119   UINT32    OffsetToAuthorInformation;
    120   ///
    121   /// The offset in bytes from the beginning of the header to the start of human-readable
    122   /// text that describes the revision of the capsule and/or the capsule's contents. This
    123   /// value must be less than OffsetToCapsuleBody.
    124   ///
    125   UINT32    OffsetToRevisionInformation;
    126   ///
    127   /// The offset in bytes from the beginning of the header to the start of a one-line (less
    128   /// than 40 Unicode characters in any language) description of the capsule. It is intended
    129   /// to be used by OS-present applications when providing a list of capsules from which
    130   /// the user can choose. This value must be less than OffsetToCapsuleBody.
    131   ///
    132   UINT32    OffsetToShortDescription;
    133   ///
    134   /// The offset in bytes from the beginning of the header to the start of an EFI string
    135   ///
    136   UINT32    OffsetToLongDescription;
    137   ///
    138   /// This field is reserved for future use by this specification. For future compatibility,
    139   /// this field must be set to zero
    140   ///
    141   UINT32    OffsetToApplicableDevices;
    142 } FRAMEWORK_EFI_CAPSULE_HEADER;
    143 
    144 extern EFI_GUID gEfiCapsuleGuid;
    145 extern EFI_GUID gEfiConfigFileNameGuid;
    146 
    147 #endif
    148