Rollback r17113.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17114 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Hao Wu 2015-04-03 05:23:13 +00:00 committed by hwu1225
parent a22b4387ad
commit 7105857827
4 changed files with 123 additions and 289 deletions

View File

@ -2,10 +2,10 @@
Guid & data structure used for Delivering Capsules Containing Updates to Firmware
Management Protocol
Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2013 - 2014, 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
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,
@ -56,7 +56,7 @@ typedef struct {
UINT32 Version;
///
/// Used to identify device firmware targeted by this update. This guid is matched by
/// Used to identifiy device firmware targeted by this update. This guid is matched by
/// system firmware against ImageTypeId field within a EFI_FIRMWARE_IMAGE_DESCRIPTOR
///
EFI_GUID UpdateImageTypeId;
@ -73,25 +73,16 @@ typedef struct {
UINT32 UpdateImageSize;
///
/// Size of the VendorCode bytes which optionally immediately follow binary update image in the capsule
///Size of the VendorCode bytes which optionally immediately follow binary update image in the capsule
///
UINT32 UpdateVendorCodeSize;
///
/// The HardwareInstance to target with this update. If value is zero it means match all
/// HardwareInstances. This field allows update software to target only a single device in
/// cases where there are more than one device with the same ImageTypeId GUID.
/// This header is outside the signed data of the Authentication Info structure and
/// therefore can be modified without changing the Auth data.
///
UINT64 UpdateHardwareInstance;
} EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;
#pragma pack()
#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x00000001
#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000002
#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000001
extern EFI_GUID gEfiFmpCapsuleGuid;

View File

@ -1,125 +0,0 @@
/** @file
Guid & data structure used for EFI System Resource Table (ESRT)
Copyright (c) 2015, 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.
@par Revision Reference:
GUIDs defined in UEFI 2.5 spec.
**/
#ifndef _SYSTEM_RESOURCE_TABLE_H__
#define _SYSTEM_RESOURCE_TABLE_H__
#define EFI_SYSTEM_RESOURCE_TABLE_GUID \
{ \
0xb122a263, 0x3661, 0x4f68, {0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80 } \
}
///
/// Current Entry Version
///
#define EFI_SYSTEM_RESOURCE_TABLE_FIRMWARE_RESOURCE_VERSION 1
///
/// Firmware Type Definitions
///
#define ESRT_FW_TYPE_UNKNOWN 0x00000000
#define ESRT_FW_TYPE_SYSTEMFIRMWARE 0x00000001
#define ESRT_FW_TYPE_DEVICEFIRMWARE 0x00000002
#define ESRT_FW_TYPE_UEFIDRIVER 0x00000003
///
/// Last Attempt Status Values
///
#define LAST_ATTEMPT_STATUS_SUCCESS 0x00000000
#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL 0x00000001
#define LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES 0x00000002
#define LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION 0x00000003
#define LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT 0x00000004
#define LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR 0x00000005
#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_AC 0x00000006
#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_BATT 0x00000007
typedef struct {
///
/// The firmware class field contains a GUID that identifies a firmware component
/// that can be updated via UpdateCapsule(). This GUID must be unique within all
/// entries of the ESRT.
///
EFI_GUID FwClass;
///
/// Identifies the type of firmware resource.
///
UINT32 FwType;
///
/// The firmware version field represents the current version of the firmware
/// resource, value must always increase as a larger number represents a newer
/// version.
///
UINT32 FwVersion;
///
/// The lowest firmware resource version to which a firmware resource can be
/// rolled back for the given system/device. Generally this is used to protect
/// against known and fixed security issues.
///
UINT32 LowestSupportedFwVersion;
///
/// The capsule flags field contains the CapsuleGuid flags (bits 0- 15) as defined
/// in the EFI_CAPSULE_HEADER that will be set in the capsule header.
///
UINT32 CapsuleFlags;
///
/// The last attempt version field describes the last firmware version for which
/// an update was attempted (uses the same format as Firmware Version).
/// Last Attempt Version is updated each time an UpdateCapsule() is attempted for
/// an ESRT entry and is preserved across reboots (non-volatile). However, in
/// cases where the attempt version is not recorded due to limitations in the
/// update process, the field shall set to zero after a failed update. Similarly,
/// in the case of a removable device, this value is set to 0 in cases where the
/// device has not been updated since being added to the system.
///
UINT32 LastAttemptVersion;
///
/// The last attempt status field describes the result of the last firmware update
/// attempt for the firmware resource entry.
/// LastAttemptStatus is updated each time an UpdateCapsule() is attempted for an
/// ESRT entry and is preserved across reboots (non-volatile).
/// If a firmware update has never been attempted or is unknown, for example after
/// fresh insertion of a removable device, LastAttemptStatus must be set to Success.
///
UINT32 LastAttemptStatus;
} EFI_SYSTEM_RESOURCE_ENTRY;
typedef struct {
///
/// The number of firmware resources in the table, must not be zero.
///
UINT32 FwResourceCount;
///
/// The maximum number of resource array entries that can be within the table
/// without reallocating the table, must not be zero.
///
UINT32 FwResourceCountMax;
///
/// The version of the EFI_SYSTEM_RESOURCE_ENTRY entities used in this table.
/// This field should be set to 1.
///
UINT64 FwResourceVersion;
///
/// Array of EFI_SYSTEM_RESOURCE_ENTRY
///
//EFI_SYSTEM_RESOURCE_ENTRY Entries[];
} EFI_SYSTEM_RESOURCE_TABLE;
extern EFI_GUID gEfiSystemResourceTableGuid;
#endif

View File

@ -8,11 +8,11 @@
CheckImage(), GetPackageInfo(), and SetPackageInfo() shall return
EFI_UNSUPPORTED if not supported by the driver.
Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2013 - 2014, Hewlett-Packard Development Company, L.P.<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
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,
@ -39,12 +39,12 @@ typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FIRMWARE_MANAGEMENT_PROTOCO
///
typedef struct {
///
/// A unique number identifying the firmware image within the device. The number is
/// A unique number identifying the firmware image within the device. The number is
/// between 1 and DescriptorCount.
///
UINT8 ImageIndex;
///
/// A unique GUID identifying the firmware image type.
/// A unique number identifying the firmware image type.
///
EFI_GUID ImageTypeId;
///
@ -65,24 +65,24 @@ typedef struct {
///
CHAR16 *VersionName;
///
/// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
/// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
///
UINTN Size;
///
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
/// supported and the current setting value is indicated in AttributesSetting. A
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
/// supported and the current setting value is indicated in AttributesSetting. A
/// value of 0 indicates the attribute is not supported and the current setting value in
/// AttributesSetting is meaningless.
///
UINT64 AttributesSupported;
///
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
/// this parameter.
///
UINT64 AttributesSetting;
///
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
/// values of this parameter.
///
UINT64 Compatibilities;
@ -91,32 +91,6 @@ typedef struct {
/// present in version 2 or higher.
///
UINT32 LowestSupportedImageVersion;
///
/// Describes the version that was last attempted to update. If no update attempted the
/// value will be 0. If the update attempted was improperly formatted and no version
/// number was available then the value will be zero. Only present in version 3 or higher.
UINT32 LastAttemptVersion;
///
/// Describes the status that was last attempted to update. If no update has been attempted
/// the value will be LAST_ATTEMPT_STATUS_SUCCESS. Only present in version 3 or higher.
///
UINT32 LastAttemptStatus;
///
/// An optional number to identify the unique hardware instance within the system for
/// devices that may have multiple instances (Example: a plug in pci network card). This
/// number must be unique within the namespace of the ImageTypeId GUID and
/// ImageIndex. For FMP instances that have multiple descriptors for a single
/// hardware instance, all descriptors must have the same HardwareInstance value.
/// This number must be consistent between boots and should be based on some sort of
/// hardware identified unique id (serial number, etc) whenever possible. If a hardware
/// based number is not available the FMP provider may use some other characteristic
/// such as device path, bus/dev/function, slot num, etc for generating the
/// HardwareInstance. For implementations that will never have more than one
/// instance a zero can be used. A zero means the FMP provider is not able to determine a
/// unique hardware instance number or a hardware instance number is not needed. Only
/// present in version 3 or higher.
///
UINT64 HardwareInstance;
} EFI_FIRMWARE_IMAGE_DESCRIPTOR;
@ -130,7 +104,7 @@ typedef struct {
#define IMAGE_ATTRIBUTE_IMAGE_UPDATABLE 0x0000000000000001
///
/// The attribute IMAGE_ATTRIBUTE_RESET_REQUIRED indicates a reset of the device is required
/// for the new firmware image to take effect after a firmware update. The device is the device hosting
/// for the new firmware image to take effect after a firmware update. The device is the device hosting
/// the firmware image.
///
#define IMAGE_ATTRIBUTE_RESET_REQUIRED 0x0000000000000002
@ -163,7 +137,7 @@ typedef struct {
///
/// Descriptor Version exposed by GetImageInfo() function
///
#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 3
#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 2
///
@ -171,13 +145,13 @@ typedef struct {
///
typedef struct {
///
/// It is included in the signature of AuthInfo. It is used to ensure freshness/no replay.
/// It is included in the signature of AuthInfo. It is used to ensure freshness/no replay.
/// It is incremented during each firmware image operation.
///
UINT64 MonotonicCount;
///
/// Provides the authorization for the firmware image operations. It is a signature across
/// the image data and the Monotonic Count value. Caller uses the private key that is
/// Provides the authorization for the firmware image operations. It is a signature across
/// the image data and the Monotonic Count value. Caller uses the private key that is
/// associated with a public key that has been provisioned via the key exchange.
/// Because this is defined as a signature, WIN_CERTIFICATE_UEFI_GUID.CertType must
/// be EFI_CERT_TYPE_PKCS7_GUID.
@ -342,17 +316,17 @@ EFI_STATUS
If the firmware image is updatable, the function should perform the following minimal validations
before proceeding to do the firmware image update.
- Validate the image authentication if image has attribute
IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED. The function returns
IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED. The function returns
EFI_SECURITY_VIOLATION if the validation fails.
- Validate the image is a supported image for this device. The function returns EFI_ABORTED if
the image is unsupported. The function can optionally provide more detailed information on
- Validate the image is a supported image for this device. The function returns EFI_ABORTED if
the image is unsupported. The function can optionally provide more detailed information on
why the image is not a supported image.
- Validate the data from VendorCode if not null. Image validation must be performed before
VendorCode data validation. VendorCode data is ignored or considered invalid if image
validation failed. The function returns EFI_ABORTED if the data is invalid.
- Validate the data from VendorCode if not null. Image validation must be performed before
VendorCode data validation. VendorCode data is ignored or considered invalid if image
validation failed. The function returns EFI_ABORTED if the data is invalid.
VendorCode enables vendor to implement vendor-specific firmware image update policy. Null if
the caller did not specify the policy or use the default policy. As an example, vendor can implement
VendorCode enables vendor to implement vendor-specific firmware image update policy. Null if
the caller did not specify the policy or use the default policy. As an example, vendor can implement
a policy to allow an option to force a firmware image update when the abort reason is due to the new
firmware image version is older than the current firmware image version or bad image checksum.
Sensitive operations such as those wiping the entire firmware image and render the device to be

View File

@ -554,12 +554,6 @@
gEfiAdapterInfoNetworkBootGuid = { 0x1FBD2960, 0x4130, 0x41E5, {0x94, 0xAC, 0xD2, 0xCF, 0x03, 0x7F, 0xB3, 0x7C }}
gEfiAdapterInfoSanMacAddressGuid = { 0x114da5ef, 0x2cf1, 0x4e12, {0x9b, 0xbb, 0xc4, 0x70, 0xb5, 0x52, 0x5, 0xd9 }}
#
# GUIDs defined in UEFI2.5
#
## Include/Guid/SystemResourceTable.h
gEfiSystemResourceTableGuid = { 0xb122a263, 0x3661, 0x4f68, {0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80 }}
#
# GUID defined in PI1.0
#