public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Tian, Feng" <feng.tian@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>,
	"Zhang, Chao B" <chao.b.zhang@intel.com>
Subject: Re: [PATCH V5 06/12] SignedCapsulePkg/CapsulePkg.dec: Add capsule related definition.
Date: Wed, 2 Nov 2016 00:38:14 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B49D19D@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <E92EE9817A31E24EB0585FDF735412F56483EC73@ORSMSX113.amr.corp.intel.com>

Mike:
  To be simplification for below FILE statement, we can update tool to support GuidCName and PCD value as FILE GUID.

FILE RAW = AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215 { # PcdEdkiiSystemFirmwareFileGuid     ==> FILE RAW = PcdEdkiiSystemFirmwareFileGuid
$(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/Vlv.ROM
}

FILE RAW = ce57b167-b0e4-41e8-a897-5f4feb781d40 { # gEdkiiSystemFmpCapsuleDriverFvFileGuid    ==> FILE RAW = gEdkiiSystemFmpCapsuleDriverFvFileGuid
$(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/CAPSULEDISPATCHFV.Fv
}

FILE RAW = 812136D3-4D3A-433A-9418-29BB9BF78F6E { # gEdkiiSystemFmpCapsuleConfigFileGuid
Vlv2TbltDevicePkg/Feature/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
}

Thanks
Liming
From: Kinney, Michael D
Sent: Wednesday, November 2, 2016 5:57 AM
To: Yao, Jiewen <jiewen.yao@intel.com>; edk2-devel@lists.01.org; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Tian, Feng <feng.tian@intel.com>; Zeng, Star <star.zeng@intel.com>; Gao, Liming <liming.gao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>
Subject: RE: [PATCH V5 06/12] SignedCapsulePkg/CapsulePkg.dec: Add capsule related definition.

Jiewen,

Why is PcdEdkiiSystemFirmwareFileGuid a PCD instead of a GUID like
gEdkiiSystemFmpCapsuleDriverFvFileGuid and
gEdkiiSystemFmpCapsuleConfigFileGuid?

The PcdEdkiiSystemFirmwareFileGuid value from the DEC file default is
used for both Quark and Vlv2 platforms, so it does not appear to be a
value you expect a platform developer to make unique per platform.

It makes sense to use a fixed value, so the system firmware update
Processing can find the FFS file in the Cargo FV to find the
Binary file described by the INI file with FFS file GUID of
gEdkiiSystemFmpCapsuleConfigFileGuid.


The following is an example of where this PCD and GUIDs are used
In an FDF file to generate a firmware update image and recovery imaghe.

[FV.SystemFirmwareUpdateCargo]
FvAlignment = 16
ERASE_POLARITY = 1
MEMORY_MAPPED = TRUE
STICKY_WRITE = TRUE
LOCK_CAP = TRUE
LOCK_STATUS = TRUE
WRITE_DISABLED_CAP = TRUE
WRITE_ENABLED_CAP = TRUE
WRITE_STATUS = TRUE
WRITE_LOCK_CAP = TRUE
WRITE_LOCK_STATUS = TRUE
READ_DISABLED_CAP = TRUE
READ_ENABLED_CAP = TRUE
READ_STATUS = TRUE
READ_LOCK_CAP = TRUE
READ_LOCK_STATUS = TRUE

FILE RAW = AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215 { # PcdEdkiiSystemFirmwareFileGuid
$(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/Vlv.ROM
}

FILE RAW = ce57b167-b0e4-41e8-a897-5f4feb781d40 { # gEdkiiSystemFmpCapsuleDriverFvFileGuid
$(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/CAPSULEDISPATCHFV.Fv
}

FILE RAW = 812136D3-4D3A-433A-9418-29BB9BF78F6E { # gEdkiiSystemFmpCapsuleConfigFileGuid
Vlv2TbltDevicePkg/Feature/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
}

Best regards,

Mike


> -----Original Message-----
> From: Yao, Jiewen
> Sent: Thursday, October 27, 2016 6:42 AM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Cc: Tian, Feng ; Zeng, Star ; Kinney, Michael
> D ; Gao, Liming ; Zhang, Chao B
>
> Subject: [PATCH V5 06/12] SignedCapsulePkg/CapsulePkg.dec: Add capsule related
> definition.
>
> 1) Add capsule related GUID.
> EdkiiSystemFmpCapsule
> 2) Add capsule related library.
> EdkiiSystemCapsuleLib
> IniParsingLib
> PlatformFlashAccessLib
> 3) Add EDKII system capsule related DynamicEx PCD
> PcdEdkiiSystemFirmwareImageDescriptor
> PcdEdkiiSystemFirmwareFileGuid
> NOTE: We use DynamicEx here because the update driver may be in
> the capsule FMP, instead of system firmware.
> The update driver MUST use the PCD info produced system firmware.
> 4) Add Test key file PCD
> These PCDs indicate the GUID of FFS which contains test key file.
>
> Cc: Feng Tian
> Cc: Star Zeng
> Cc: Michael D Kinney
> Cc: Liming Gao
> Cc: Chao Zhang
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao
> Reviewed-by: Liming Gao
> ---
> SignedCapsulePkg/SignedCapsulePkg.dec | 76 ++++++++++++++++++++
> 1 file changed, 76 insertions(+)
>
> diff --git a/SignedCapsulePkg/SignedCapsulePkg.dec
> b/SignedCapsulePkg/SignedCapsulePkg.dec
> new file mode 100644
> index 0000000..436d602
> --- /dev/null
> +++ b/SignedCapsulePkg/SignedCapsulePkg.dec
> @@ -0,0 +1,76 @@
> +## @file
> +# This package provides EDKII capsule related support.
> +#
> +# Copyright (c) 2016, Intel Corporation. All rights reserved.

> +# This program and the accompanying materials are licensed and made available under
> +# the terms and conditions of the BSD License that 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.
> +#
> +##
> +
> +
> +[Defines]
> + DEC_SPECIFICATION = 0x00010005
> + PACKAGE_NAME = SignedCapsulePkg
> + PACKAGE_GUID = 75AA5D82-7BC4-44A9-82FB-0820EBC79BED
> + PACKAGE_VERSION = 0.1
> +
> +[Includes]
> + Include
> +
> +[LibraryClasses]
> + ## @libraryclass Provides services for EDKII system FMP capsule.
> + #
> + EdkiiSystemCapsuleLib|Include/Library/EdkiiSystemCapsuleLib.h
> +
> + ## @libraryclass Provides services to parse the INI configuration file.
> + #
> + IniParsingLib|Include/Library/IniParsingLib.h
> +
> + ## @libraryclass Provides services to access flash device.
> + #
> + PlatformFlashAccessLib|Include/Library/PlatformFlashAccessLib.h
> +
> +[Guids]
> + gEfiSignedCapsulePkgTokenSpaceGuid = { 0xe1eb612f, 0x1c6c, 0x485d, { 0x9d, 0x6,
> 0x65, 0x8, 0x44, 0x88, 0x15, 0x69 }}
> +
> + ## Include/Guid/EdkiiSystemFmpCapsule.h
> + gEdkiiSystemFirmwareImageDescriptorFileGuid = {0x90b2b846, 0xca6d, 0x4d6e, {0xa8,
> 0xd3, 0xc1, 0x40, 0xa8, 0xe1, 0x10, 0xac}}
> + gEdkiiSystemFmpCapsuleConfigFileGuid = {0x812136d3, 0x4d3a, 0x433a, {0x94,
> 0x18, 0x29, 0xbb, 0x9b, 0xf7, 0x8f, 0x6e}}
> + gEdkiiSystemFmpCapsuleDriverFvFileGuid = {0xce57b167, 0xb0e4, 0x41e8, {0xa8,
> 0x97, 0x5f, 0x4f, 0xeb, 0x78, 0x1d, 0x40}}
> +
> +[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> + ## This is the GUID of the FFS which contains the Rsa2048Sha256TestPublicKeyFile as
> a RAW section.
> + # @Prompt GUID of the FFS which contains the Rsa2048Sha256TestPublicKeyFile.
> + gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiRsa2048Sha256TestPublicKeyFileGuid|{0x04,
> 0xe1, 0xfe, 0xc4, 0x57, 0x66, 0x36, 0x49, 0xa6, 0x11, 0x13, 0x8d, 0xbc, 0x2a, 0x76,
> 0xad}|VOID*|0xA0010001
> +
> + ## This is the GUID of the FFS which contains the Pkcs7TestPublicKeyFile as a RAW
> section.
> + # @Prompt GUID of the FFS which contains the Pkcs7TestPublicKeyFile.
> + gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiPkcs7TestPublicKeyFileGuid|{0xba, 0xf5,
> 0x93, 0xf0, 0x37, 0x6f, 0x16, 0x48, 0x9e, 0x52, 0x91, 0xbe, 0xa0, 0xf7, 0xe0,
> 0xb8}|VOID*|0xA0010002
> +
> +[PcdsDynamicEx]
> + ## This dynamic PCD holds the EDKII system firmware image descriptor.
> + # This information can be used for version check in EDKII system FMP capsule.
> + # Only if the new EdkiiSystemFrimwareImageDescriptor.Version is not less than
> + # the current PcdEdkiiSystemFirmwareImageDescriptor.LowestSupportedVersion,
> + # the EDKII system FmpCapsule will be processed.
> + # The data structure of this PCD is EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR,
> + # SignedCapsulePkg/Include/Guid/EdkiiSystemFmpCapsule.h.
> + # It must be in [PcdsDynamicEx], because the EDKII system firmware update module
> may
> + # consume the PCD produced in current system firmware.
> + # @Prompt EDKII system firmware image descriptor.
> +
> gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor|{0x0}|VOID*|0x
> 00000037
> +
> + ## This dynamic PCD hold the GUID of a firmware FFS which includes EDKII
> + # system firmware image.
> + # An EDKII system firmware udpate module need consume this PCD to extract
> + # the EDKII system firmware from the capsule image.
> + # It must be in [PcdsDynamicEx], because the EDKII system firmware update module
> may
> + # consume the PCD produced in current system firmware image.
> + # @Prompt EDKII system firmware image FFS GUID.
> + gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{0xb2, 0x9e, 0x9c,
> 0xaf, 0xad, 0x12, 0x3e, 0x4d, 0xa4, 0xd4, 0x96, 0xf6, 0xc9, 0x96, 0x62,
> 0x15}|VOID*|0x00001010
> +
> --
> 2.7.4.windows.1


  reply	other threads:[~2016-11-02  0:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 13:42 [PATCH V5 00/12] Add EDKII signed capsule support Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 01/12] SignedCapsulePkg: Add license file Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 02/12] SignedCapsulePkg/Include: Add EDKII system FMP capsule header Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 03/12] SignedCapsulePkg/Include: Add EdkiiSystemCapsuleLib definition Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 04/12] SignedCapsulePkg/Include: Add IniParsingLib header Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 05/12] SignedCapsulePkg/Include: Add PlatformFlashAccessLib header Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 06/12] SignedCapsulePkg/CapsulePkg.dec: Add capsule related definition Jiewen Yao
2016-11-01 21:56   ` Kinney, Michael D
2016-11-02  0:38     ` Gao, Liming [this message]
2016-11-02  0:49       ` Yao, Jiewen
2016-11-02  1:03       ` Kinney, Michael D
2016-11-02  0:45     ` Yao, Jiewen
2016-11-02  1:10       ` Kinney, Michael D
2016-11-02  2:04         ` Yao, Jiewen
2016-11-02  3:40           ` Kinney, Michael D
2016-11-02  6:17             ` Kinney, Michael D
2016-11-02  7:01               ` Yao, Jiewen
2016-11-02  8:00               ` Yao, Jiewen
2016-10-27 13:42 ` [PATCH V5 07/12] SignedCapsulePkg/IniParsingLib: Add InitParsingLib instance Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 08/12] SignedCapsulePkg/EdkiiSystemCapsuleLib: Add EdkiiSystemCapsuleLib Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 09/12] SignedCapsulePkg/PlatformFlashAccessLib: Add NULL instance Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 10/12] SignedCapsulePkg/SystemFirmwareUpdate: Add SystemFirmwareUpdate Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 11/12] SignedCapsulePkg/RecoveryModuleLoadPei: Add RecoveryModuleLoadPei Jiewen Yao
2016-10-27 13:42 ` [PATCH V5 12/12] SignedCapsulePkg/CapsulePkg.dsc: Add capsule related component Jiewen Yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14B49D19D@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox