Tapan: UEFI spec doesn't define EFI_FIRMWARE_IMAGE_DESCRIPTOR_V1 and EFI_FIRMWARE_IMAGE_DESCRIPTOR_V2. MdePkg definitions follows UEFI/PI/IndustryStandard specification. For this case, the consumer code can base on current definition to use the different version structure. So, I don't think we need to add V1 and V2 structure into UEFI spec and MdePkg. But, they can still be added into your local driver for your development.
Thanks Liming From: Shah, Tapan [mailto:[email protected]] Sent: Thursday, March 17, 2016 10:30 PM To: Gao, Liming; [email protected]; Kinney, Michael D Cc: Carsey, Jaben; El-Haj-Mahmoud, Samer Subject: RE: [PATCH] MdePkg: Add EFI_FIRMWARE_IMAGE_DESCRIPTOR V1 and V2 structure definition. Liming, Having old version structure definition makes it clean for consumer to decode structure without being deterministic for which fields exists in structure based on its version and size. The only structure definition exist in .h file does not provide a clean way to decode the data. Tapan -----Original Message----- From: edk2-devel [mailto:[email protected]] On Behalf Of Gao, Liming Sent: Wednesday, March 16, 2016 8:53 PM To: Shah, Tapan ; [email protected]<mailto:[email protected]>; Kinney, Michael D Cc: Carsey, Jaben Subject: Re: [edk2] [PATCH] MdePkg: Add EFI_FIRMWARE_IMAGE_DESCRIPTOR V1 and V2 structure definition. Tapan: Consumer can base on version value to know the structure size and date. We don't need to add old version structure definition. Thanks Liming From: Shah, Tapan [mailto:[email protected]] Sent: Thursday, March 17, 2016 3:54 AM To: [email protected]<mailto:[email protected]>; Kinney, Michael D ; Gao, Liming Cc: Carsey, Jaben ; El-Haj-Mahmoud, Samer Subject: RE: [PATCH] MdePkg: Add EFI_FIRMWARE_IMAGE_DESCRIPTOR V1 and V2 structure definition. Michael / Liming, Can you please help review this change? Thanks, Tapan -----Original Message----- From: Carsey, Jaben [mailto:[email protected]] Sent: Wednesday, March 16, 2016 12:58 PM To: Shah, Tapan ; [email protected]<mailto:[email protected]> Cc: El-Haj-Mahmoud, Samer ; Carsey, Jaben Subject: RE: [PATCH] MdePkg: Add EFI_FIRMWARE_IMAGE_DESCRIPTOR V1 and V2 structure definition. Looks good. Reviewed-by: Jaben Carsey > -----Original Message----- > From: Tapan Shah [mailto:[email protected]] > Sent: Wednesday, March 16, 2016 10:31 AM > To: [email protected]<mailto:[email protected]> > Cc: [email protected]<mailto:[email protected]>; > Carsey, Jaben ; Tapan Shah > Subject: [PATCH] MdePkg: Add EFI_FIRMWARE_IMAGE_DESCRIPTOR V1 and > V2 structure definition. > > Add V1 and V2 structure definitions for EFI_FIRMWARE_IMAGE_DESCRIPTOR > structure. Consumer of the protocol needs correct structure definition > to decode structure fields correctly. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Tapan Shah > --- > MdePkg/Include/Protocol/FirmwareManagement.h | 116 > +++++++++++++++++++++++++++ > 1 file changed, 116 insertions(+) > > diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h > b/MdePkg/Include/Protocol/FirmwareManagement.h > index e615573..67f19fd 100644 > --- a/MdePkg/Include/Protocol/FirmwareManagement.h > +++ b/MdePkg/Include/Protocol/FirmwareManagement.h > @@ -10,6 +10,7 @@ > > Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. > Copyright (c) 2013 - 2014, Hewlett-Packard Development Company, L.P. > + (C) Copyright 2016 Hewlett Packard Enterprise Development LP > 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 @@ -119,6 +120,121 @@ typedef struct { > UINT64 HardwareInstance; > } EFI_FIRMWARE_IMAGE_DESCRIPTOR; > > +#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V1 1 #define > +EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V2 2 > + > +/// > +/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec < 2.4a /// typedef > +struct { /// /// A unique number identifying the firmware image > +within the device. The > number is > + /// between 1 and DescriptorCount. > + /// > + UINT8 ImageIndex; > + /// > + /// A unique number identifying the firmware image type. > + /// > + EFI_GUID ImageTypeId; > + /// > + /// A unique number identifying the firmware image. > + /// > + UINT64 ImageId; > + /// > + /// A pointer to a null-terminated string representing the firmware > + image > name. > + /// > + CHAR16 *ImageIdName; > + /// > + /// Identifies the version of the device firmware. The format is > + vendor > specific and new > + /// version must have a greater value than an old version. > + /// > + UINT32 Version; > + /// > + /// A pointer to a null-terminated string representing the firmware > + image > version name. > + /// > + CHAR16 *VersionName; > + /// > + /// 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 > + /// 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 > + /// this parameter. > + /// > + UINT64 AttributesSetting; > + /// > + /// Image compatibilities. See 'Image Compatibility Definitions' > + for possible > returned > + /// values of this parameter. > + /// > + UINT64 Compatibilities; > +} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V1; > + > + > +/// > +/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec > 2.4a and < 2.5 /// > +typedef struct { /// /// A unique number identifying the firmware > +image within the device. The > number is > + /// between 1 and DescriptorCount. > + /// > + UINT8 ImageIndex; > + /// > + /// A unique number identifying the firmware image type. > + /// > + EFI_GUID ImageTypeId; > + /// > + /// A unique number identifying the firmware image. > + /// > + UINT64 ImageId; > + /// > + /// A pointer to a null-terminated string representing the firmware > + image > name. > + /// > + CHAR16 *ImageIdName; > + /// > + /// Identifies the version of the device firmware. The format is > + vendor > specific and new > + /// version must have a greater value than an old version. > + /// > + UINT32 Version; > + /// > + /// A pointer to a null-terminated string representing the firmware > + image > version name. > + /// > + CHAR16 *VersionName; > + /// > + /// 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 > + /// 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 > + /// this parameter. > + /// > + UINT64 AttributesSetting; > + /// > + /// Image compatibilities. See 'Image Compatibility Definitions' > + for possible > returned > + /// values of this parameter. > + /// > + UINT64 Compatibilities; > + /// > + /// Describes the lowest ImageDescriptor version that the device > + will > accept. Only > + /// present in version 2 or higher. > + UINT32 LowestSupportedImageVersion; > +} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V2; > > // > // Image Attribute Definitions > -- > 2.6.2.windows.1 _______________________________________________ edk2-devel mailing list [email protected]<mailto:[email protected]> https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

