From: "Kinney, Michael D" <michael.d.kinney@intel.com>
To: "Yao, Jiewen" <jiewen.yao@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Tian, Feng" <feng.tian@intel.com>,
"Zhang, Chao B" <chao.b.zhang@intel.com>,
"Gao, Liming" <liming.gao@intel.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH V4 03/15] MdeModulePkg/MdeModulePkg.dec: Add capsule related definition.
Date: Wed, 26 Oct 2016 03:00:34 +0000 [thread overview]
Message-ID: <E92EE9817A31E24EB0585FDF735412F56483B23B@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C50386B75A8@shsmsx102.ccr.corp.intel.com>
Jiewen,
Are these default values allocated from the OEM extension areas?
Or are the allocated from the PI Spec reserved areas? I do not think we should use values reserved for future PI Specifications.
I am ok with EDK II defining its own extended status codes. However, the detailed description of each of these PCDs needs to add a note that states that the default value is a value that does not conflict with the PI Specification or any other EDK II defined status code values. Platforms may need to override these values to prevent conflict with other OEM defined status code values.
Thanks,
Mike
From: Yao, Jiewen
Sent: Tuesday, October 25, 2016 7:28 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; edk2-devel@lists.01.org
Cc: Tian, Feng <feng.tian@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Gao, Liming <liming.gao@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: RE: [edk2] [PATCH V4 03/15] MdeModulePkg/MdeModulePkg.dec: Add capsule related definition.
That is good question.
I follow the EDKII guideline to add new status code into code.
If we need a new status code, which is not defined in PI spec, we will use PCD to avoid conflict.
The benefit is that
1) The IBV/OEM implementation may choose to override this value, if the value is already used.
2) We can change the default value, if the value is used in future PI spec.
We have below examples in current code base:
C:\home\EdkIIGit\edk2\MdeModulePkg\MdeModulePkg.dec(797): gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderLoad|0x03058000|UINT32|0x30001030
C:\home\EdkIIGit\edk2\MdeModulePkg\MdeModulePkg.dec(803): gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderStart|0x03058001|UINT32|0x30001031
C:\home\EdkIIGit\edk2\MdeModulePkg\MdeModulePkg.dec(809): gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeS3SuspendStart|0x03078000|UINT32|0x30001032
C:\home\EdkIIGit\edk2\MdeModulePkg\MdeModulePkg.dec(815): gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeS3SuspendEnd|0x03078001|UINT32|0x30001033
C:\home\EdkIIGit\edk2\SecurityPkg\SecurityPkg.dec(300): gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeSubClassTpmDevice|0x010D0000|UINT32|0x00000007
That is why I add them to be new PCD.
Thank you
Yao Jiewen
From: Kinney, Michael D
Sent: Wednesday, October 26, 2016 10:02 AM
To: Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Cc: Tian, Feng <feng.tian@intel.com<mailto:feng.tian@intel.com>>; Zhang, Chao B <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>; Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>; Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
Subject: RE: [edk2] [PATCH V4 03/15] MdeModulePkg/MdeModulePkg.dec: Add capsule related definition.
Jiewen,
Can you explain how you allocated the progress code values for capsule related operations?
How do you guarantee these will not conflict with future versions of PI specifications?
Also, is there a reason to make these PCDs? If these can be fixed values in extensible
value regions of PI Status Codes, then couldn't #defines in a .h file be used instead
of adding more PCDs?
Thanks,
Mike
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiewen Yao
> Sent: Saturday, October 22, 2016 7:20 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Cc: Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; Tian, Feng <feng.tian@intel.com<mailto:feng.tian@intel.com>>;
> Zhang, Chao B <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>; Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>; Zeng, Star
> <star.zeng@intel.com<mailto:star.zeng@intel.com>>
> Subject: [edk2] [PATCH V4 03/15] MdeModulePkg/MdeModulePkg.dec: Add capsule related
> definition.
>
> 1) Add capsule related library.
> FmpAuthenticationLib
> 2) Add capsule related status code PCD.
> PcdStatusCodeSubClassCapsule
> PcdCapsuleStatusCodeProcessCapsulesBegin
> PcdCapsuleStatusCodeProcessCapsulesEnd
> PcdCapsuleStatusCodeUpdatingFirmware
> PcdCapsuleStatusCodeUpdateFirmwareSuccess
> PcdCapsuleStatusCodeUpdateFirmwareFailed
> PcdCapsuleStatusCodeResettingSystem
> 3) Add capsule status variable PCD - CapsuleMax value.
> PcdCapsuleMax
> 4) Add system FMP indicator PCD - used by ESRT.
> PcdSystemFmpCapsuleImageTypeIdGuid
> 5) Add PcdTestKeyUsed PCD.
> This PCD can be set by platform to indicate if there is any
> test key used in current BIOS, such as recovery key,
> or capsule update key.
> Then the generic UI may consume this PCD to show warning information.
> Other platform driver may also consume this PCD to know such info,
> and report it via platform specific way.
>
> Cc: Feng Tian <feng.tian@intel.com<mailto:feng.tian@intel.com>>
> Cc: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>
> Cc: Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
> Cc: Liming Gao <liming.gao@intel.com<mailto:liming.gao@intel.com>>
> Cc: Chao Zhang <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
> Reviewed-by: Liming Gao <liming.gao@intel.com<mailto:liming.gao@intel.com>>
> ---
> MdeModulePkg/MdeModulePkg.dec | 59 ++++++++++++++++++++
> 1 file changed, 59 insertions(+)
>
> diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
> index 74b8700..3f37cca 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -157,6 +157,10 @@
> ##
> FrameBufferBltLib|Include/Library/FrameBufferBltLib.h
>
> + ## @libraryclass Provides services to authenticate a UEFI defined FMP Capsule.
> + #
> + FmpAuthenticationLib|Include/Library/FmpAuthenticationLib.h
> +
> [Guids]
> ## MdeModule package token space guid
> # Include/Guid/MdeModulePkgTokenSpace.h
> @@ -1141,6 +1145,52 @@
> # The default value is 0 that means infinite.
> # @Prompt MAX repair count
> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxRepairCount|0x00|UINT32|0x00010076
> +
> + ## Status Code for Capsule subclass definitions.<BR><BR>
> + # EFI_SOFTWARE_CAPSULE = (EFI_SOFTWARE | 0x00150000) = 0x03150000<BR>
> + # @Prompt Status Code for Capsule subclass definitions
> + # @ValidList 0x80000003 | 0x03150000
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeSubClassCapsule|0x03150000|UINT32|0x0000010
> 0
> +
> + ## Status Code for Capsule definitions.<BR><BR>
> + # EFI_CAPSULE_PROCESS_CAPSULES_BEGIN = (EFI_SUBCLASS_SPECIFIC | 0x00000001) =
> 0x00010001<BR>
> + # @Prompt Status Code for Capsule definitions
> + # @ValidList 0x80000003 | 0x00010001
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeProcessCapsulesBegin|0x00010001|UINT
> 32|0x00000101
> +
> + ## Status Code for Capsule definitions.<BR><BR>
> + # EFI_CAPSULE_PROCESS_CAPSULES_END = (EFI_SUBCLASS_SPECIFIC | 0x00000002) =
> 0x00010002<BR>
> + # @Prompt Status Code for Capsule definitions
> + # @ValidList 0x80000003 | 0x00010002
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeProcessCapsulesEnd|0x00010002|UINT32
> |0x00000102
> +
> + ## Status Code for Capsule definitions.<BR><BR>
> + # EFI_CAPSULE_UPDATING_FIRMWARE = (EFI_SUBCLASS_SPECIFIC | 0x00000003) =
> 0x00010003<BR>
> + # @Prompt Status Code for Capsule definitions
> + # @ValidList 0x80000003 | 0x00010003
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeUpdatingFirmware|0x00010003|UINT32|0
> x00000103
> +
> + ## Status Code for Capsule definitions.<BR><BR>
> + # EFI_CAPSULE_UPDATE_FIRMWARE_SUCCESS = (EFI_SUBCLASS_SPECIFIC | 0x00000004) =
> 0x00010004<BR>
> + # @Prompt Status Code for Capsule definitions
> + # @ValidList 0x80000003 | 0x00010004
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeUpdateFirmwareSuccess|0x00010004|UIN
> T32|0x00000104
> +
> + ## Status Code for Capsule definitions.<BR><BR>
> + # EFI_CAPSULE_UPDATE_FIRMWARE_FAILED = (EFI_SUBCLASS_SPECIFIC | 0x00000005) =
> 0x00010005<BR>
> + # @Prompt Status Code for Capsule definitions
> + # @ValidList 0x80000003 | 0x00010005
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeUpdateFirmwareFailed|0x00010005|UINT
> 32|0x00000105
> +
> + ## Status Code for Capsule definitions.<BR><BR>
> + # EFI_CAPSULE_RESETTING_SYSTEM = (EFI_SUBCLASS_SPECIFIC | 0x00000006) =
> 0x00010006<BR>
> + # @Prompt Status Code for Capsule definitions
> + # @ValidList 0x80000003 | 0x00010001
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeResettingSystem|0x00010006|UINT32|0x
> 00000106
> +
> + ## CapsuleMax value in capsule report variable.
> + # @Prompt CapsuleMax value in capsule report variable.
> + gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleMax|0xFFFF|UINT16|0x00000107
>
> [PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> ## This PCD defines the Console output row. The default value is 25 according to
> UEFI spec.
> @@ -1587,6 +1637,11 @@
> # The PCD data must be in UNICODE format.
> gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"FVMAIN.FV"|VOID*|0x30001045
>
> + ## This PCD hold a list GUIDs for the ImageTypeId to indicate the
> + # FMP capsule is a system FMP.
> + # @Prompt A list of system FMP ImageTypeId GUIDs
> + gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{0xd3, 0xee, 0x7e,
> 0x3f, 0x91, 0xf4, 0x1e, 0x40, 0x9e, 0xce, 0x74, 0x31, 0x32, 0x2e, 0xad,
> 0xf6}|VOID*|0x30001046
> +
> [PcdsPatchableInModule]
> ## Specify memory size with page number for PEI code when
> # Loading Module at Fixed Address feature is enabled.
> @@ -1639,5 +1694,9 @@
> # @ValidList 0x80000001 | 0x0
> gEfiMdeModulePkgTokenSpaceGuid.PcdIdentifyMappingPageTablePtr|0x0|UINT64|0x00030002
>
> + ## This dynamic PCD holds the information if there is any test key used by the
> platform.
> + # @Prompt If there is any test key used by the platform.
> + gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003
> +
> [UserExtensions.TianoCore."ExtraFiles"]
> MdeModulePkgExtra.uni
> --
> 2.7.4.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2016-10-26 3:00 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-23 2:20 [PATCH V4 00/15] Add capsule support lib and app Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 01/15] MdeModulePkg/Include: Add FmpAuthenticationLib header Jiewen Yao
2016-10-25 23:54 ` Kinney, Michael D
2016-10-26 0:50 ` Yao, Jiewen
2016-10-26 2:06 ` Kinney, Michael D
2016-10-23 2:20 ` [PATCH V4 02/15] MdeModulePkg/CapsuleLib: Add ProcessCapsules() API Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 03/15] MdeModulePkg/MdeModulePkg.dec: Add capsule related definition Jiewen Yao
2016-10-26 2:01 ` Kinney, Michael D
2016-10-26 2:27 ` Yao, Jiewen
2016-10-26 3:00 ` Kinney, Michael D [this message]
2016-10-26 4:45 ` Yao, Jiewen
2016-10-26 4:58 ` Yao, Jiewen
2016-10-23 2:20 ` [PATCH V4 04/15] MdeModulePkg/FmpAuthenticationLibNull: Add NULL instance FMP Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 05/15] MdeModulePkg/DxeCapsuleLibNull: Add ProcessCapsules() interface Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 06/15] MdeModulePkg/DxeCapsuleLibFmp: Add DxeCapsuleLibFmp instance Jiewen Yao
2016-10-27 0:09 ` Kinney, Michael D
2016-10-27 1:33 ` Yao, Jiewen
2016-10-23 2:20 ` [PATCH V4 07/15] MdeModulePkg/Esrt: Add ESRT_FW_TYPE_SYSTEMFIRMWARE check Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 08/15] MdeModulePkg/CapsuleApp: Add CapsuleApp application Jiewen Yao
2016-10-25 23:26 ` Kinney, Michael D
2016-10-26 0:42 ` Yao, Jiewen
2016-10-26 1:50 ` Yao, Jiewen
2016-10-26 2:05 ` Kinney, Michael D
2016-10-26 2:19 ` Yao, Jiewen
2016-10-27 0:13 ` Kinney, Michael D
2016-10-23 2:20 ` [PATCH V4 09/15] MdeModulePkg/UiApp: Show test key warning info in FrontPage Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 10/15] MdeModulePkg/MdeModulePkg.dsc: Add FMP related component Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 11/15] IntelFrameworkModulePkg/DxeCapsuleLib: Add ProcessCapsules() interface Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 12/15] SecurityPkg/SecurityPkg.dec: Add PcdPkcs7CertBuffer PCD Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 13/15] SecurityPkg/FmpAuthenticationLibPkcs7: Add PKCS7 instance for FMP Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 14/15] SecurityPkg/FmpAuthenticationLibRsa2048Sha256: Add RSA2048 instance Jiewen Yao
2016-10-23 2:20 ` [PATCH V4 15/15] SecurityPkg/SecurityPkg.dsc: Add FmpAuthenticationLib* 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=E92EE9817A31E24EB0585FDF735412F56483B23B@ORSMSX113.amr.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