From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0706.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe46::706]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AFB251A1DEB for ; Tue, 11 Oct 2016 02:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=JRGHGlvfoiB1fXririJk90oOhDWAd0NuUqv2Y9H5VMA=; b=TZ5Q5zonItqva+GzB8XDtHT+lJVZUHjICDO5r1R0mkIiC+qMxqV/0Ye6yUuPag23WOpqAqsv4dYscL2wA9x3sRs9WdvyOzLT6N/cmse5zYd/57cfridSePS0lsdQufIL6nhfBBxmlzyJJ1e1P6tjgvqgKwGv6658k7vOAGaRPrk= Received: from BY1PR03MB1355.namprd03.prod.outlook.com (10.162.109.25) by BY1PR03MB1355.namprd03.prod.outlook.com (10.162.109.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Tue, 11 Oct 2016 09:34:30 +0000 Received: from BY1PR03MB1355.namprd03.prod.outlook.com ([10.162.109.25]) by BY1PR03MB1355.namprd03.prod.outlook.com ([10.162.109.25]) with mapi id 15.01.0659.018; Tue, 11 Oct 2016 09:34:30 +0000 From: Sean Brogan To: Jiewen Yao , "edk2-devel@lists.01.org" CC: Michael D Kinney , Feng Tian , Chao Zhang , Liming Gao , Star Zeng Thread-Topic: [edk2] [PATCH V2 07/50] MdeModulePkg/MdeModulePkg.dec: Add capsule related definition. Thread-Index: AQHSGxVZbAi6Zl+440OjbQgu5NB6p6CjDwNg Date: Tue, 11 Oct 2016 09:34:29 +0000 Message-ID: References: <1475238128-22448-1-git-send-email-jiewen.yao@intel.com> <1475238128-22448-8-git-send-email-jiewen.yao@intel.com> In-Reply-To: <1475238128-22448-8-git-send-email-jiewen.yao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sean.brogan@microsoft.com; x-originating-ip: [50.46.222.147] x-ms-office365-filtering-correlation-id: e6fe59cf-5cfa-4bb1-8ee7-08d3f1b9cd0a x-microsoft-exchange-diagnostics: 1; BY1PR03MB1355; 7:+TAHCdnWeSpFrz47AJOdEKOFx+0XZxbbcuwZgvwYElHFKY39tGIRqXhcZJGlpxKoHns5F2uU/GgvDnO/6h6yx7YddXoj7fC/9KvY6XQgGPLhY6CRkKzBg5TB1E90QD+xxtvJBb+udRoDZR56ey7vnFjqWeSlsLx2ol9UTqynyBBKnEnjdOcf6yw/1eEv2nZ/fzbCejtN/UfMvdfSygSaw7GrXBqEE0ENf+junhJTFFLD/ZCc0H+39gQKKD9EamGlPjaVOuQlEhujx/DGXKWcvdm4LxzMj5J1MzOVRDndvG2uS6IaesVr/tS+9Krg1ckyUKhWk5+2po+E7rsScbbyFI2wycR6bOpM117GYgyVAyhObbz/DWgDr//YwmwmLJXT x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1355; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(61426038)(61427038); SRVR:BY1PR03MB1355; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1355; x-forefront-prvs: 00922518D8 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(13464003)(189002)(377454003)(199003)(5002640100001)(15975445007)(77096005)(76576001)(2501003)(2900100001)(92566002)(122556002)(305945005)(7736002)(7696004)(5660300001)(5001770100001)(74316002)(97736004)(2950100002)(87936001)(7846002)(189998001)(4326007)(33656002)(2906002)(86362001)(11100500001)(575784001)(66066001)(8936002)(50986999)(3660700001)(54356999)(68736007)(9686002)(8990500004)(106356001)(99286002)(76176999)(81156014)(10400500002)(10290500002)(10090500001)(81166006)(105586002)(101416001)(86612001)(586003)(8676002)(3280700002)(5005710100001)(19580395003)(102836003)(19580405001)(6116002)(3846002)(106116001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1355; H:BY1PR03MB1355.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2016 09:34:29.8244 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1355 Subject: Re: [PATCH V2 07/50] MdeModulePkg/MdeModulePkg.dec: Add capsule related definition. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2016 09:34:33 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This would all go in the new package instead of MdeModulePkg. =20 Thanks Sean > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Jiewen Yao > Sent: Friday, September 30, 2016 5:21 AM > To: edk2-devel@lists.01.org > Cc: Michael D Kinney ; Feng Tian > ; Chao Zhang ; Liming Gao > ; Star Zeng > Subject: [edk2] [PATCH V2 07/50] MdeModulePkg/MdeModulePkg.dec: Add > capsule related definition. >=20 > 1) Add capsule related GUID. > EdkiiSystemFmpCapsule > 2) Add capsule related library. > EdkiiSystemCapsuleLib > FmpAuthenticationLib > IniParsingLib > PlatformFlashAccessLib.c > 3) Add capsule related status code PCD. > PcdStatusCodeSubClassCapsule > PcdCapsuleStatusCodeProcessCapsulesBegin > PcdCapsuleStatusCodeProcessCapsulesEnd > PcdCapsuleStatusCodeUpdatingFirmware > PcdCapsuleStatusCodeUpdateFirmwareSuccess > PcdCapsuleStatusCodeUpdateFirmwareFailed > PcdCapsuleStatusCodeResettingSystem > 4) Add capsule status variable PCD - CapsuleMax value. > PcdCapsuleMax > 5) Add EDKII system capsule related DynamicEx PCD > PcdEdkiiSystemFmpCapsuleMonotonicCount > PcdEdkiiSystemFirmwareImageDescriptor > PcdEdkiiSystemFirmwareFileGuid > PcdEdkiiSystemFmpCapsuleImageTypeIdGuid > 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. >=20 > 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 > --- > MdeModulePkg/MdeModulePkg.dec | 106 ++++++++++++++++++++ > 1 file changed, 106 insertions(+) >=20 > diff --git a/MdeModulePkg/MdeModulePkg.dec > b/MdeModulePkg/MdeModulePkg.dec index 8d90f16..ab23af7 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -157,6 +157,22 @@ > # > MemoryProfileLib|Include/Library/MemoryProfileLib.h >=20 > + ## @libraryclass Provides services to authenticate a UEFI defined FMP > Capsule. > + # > + FmpAuthenticationLib|Include/Library/FmpAuthenticationLib.h > + > + ## @libraryclass Provides services for EDKII system FMP capsule. > + # > + EdkiiSystemCapsuleLib|Include/Library/EdkiiSystemCapsuleLib.h > + > + ## @libraryclass Provides services to parse the INI configuration fil= e. > + # > + IniParsingLib|Include/Library/IniParsingLib.h > + > + ## @libraryclass Provides services to access flash device. > + # > + PlatformFlashAccessLib|Include/Library/PlatformFlashAccessLib.h > + > [Guids] > ## MdeModule package token space guid > # Include/Guid/MdeModulePkgTokenSpace.h > @@ -355,6 +371,11 @@ > ## Include/Guid/PiSmmCommunicationRegionTable.h > gEdkiiPiSmmCommunicationRegionTableGuid =3D { 0x4e28ca50, 0xd582, > 0x44ac, {0xa1, 0x1f, 0xe3, 0xd5, 0x65, 0x26, 0xdb, 0x34}} >=20 > + ## Include/Guid/EdkiiSystemFmpCapsule.h > + gEdkiiSystemFirmwareImageDescriptorFileGuid =3D {0x90b2b846, 0xca6d, > 0x4d6e, {0xa8, 0xd3, 0xc1, 0x40, 0xa8, 0xe1, 0x10, 0xac}} > + gEdkiiSystemFmpCapsuleConfigFileGuid =3D {0x812136d3, 0x4d3a, 0= x433a, > {0x94, 0x18, 0x29, 0xbb, 0x9b, 0xf7, 0x8f, 0x6e}} > + gEdkiiSystemFmpCapsuleDriverFvFileGuid =3D {0xce57b167, 0xb0e4, > 0x41e8, {0xa8, 0x97, 0x5f, 0x4f, 0xeb, 0x78, 0x1d, 0x40}} > + > [Ppis] > ## Include/Ppi/AtaController.h > gPeiAtaControllerPpiGuid =3D { 0xa45e60d1, 0xc719, 0x44aa, { 0xb= 0, 0x7a, > 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} > @@ -1130,6 +1151,52 @@ > # @Prompt MAX repair count >=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxRepairCount|0x00|UINT32|0x000 > 10076 >=20 > + ## Status Code for Capsule subclass definitions.

# > + EFI_SOFTWARE_CAPSULE =3D (EFI_SOFTWARE | 0x00150000) =3D > 0x03150000
> + # @Prompt Status Code for Capsule subclass definitions # @ValidList > + 0x80000003 | 0x03150000 > + > + > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeSubClassCapsule|0x031500 > 00 > + |UINT32|0x00000100 > + > + ## Status Code for Capsule definitions.

# > + EFI_CAPSULE_PROCESS_CAPSULES_BEGIN =3D (EFI_SUBCLASS_SPECIFIC | > + 0x00000001) =3D 0x00010001
# @Prompt Status Code for Capsule > + definitions # @ValidList 0x80000003 | 0x00010001 > + > + > gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeProcessCapsulesBeg > i > + n|0x00010001|UINT32|0x00000101 > + > + ## Status Code for Capsule definitions.

> + # EFI_CAPSULE_PROCESS_CAPSULES_END =3D (EFI_SUBCLASS_SPECIFIC | > 0x00000002) =3D 0x00010002
> + # @Prompt Status Code for Capsule definitions # @ValidList > + 0x80000003 | 0x00010002 > + > + > gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeProcessCapsulesEnd > | > + 0x00010002|UINT32|0x00000102 > + > + ## Status Code for Capsule definitions.

> + # EFI_CAPSULE_UPDATING_FIRMWARE =3D (EFI_SUBCLASS_SPECIFIC | > 0x00000003) =3D 0x00010003
> + # @Prompt Status Code for Capsule definitions # @ValidList > + 0x80000003 | 0x00010003 > + > + > gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeUpdatingFirmware| > 0x > + 00010003|UINT32|0x00000103 > + > + ## Status Code for Capsule definitions.

# > + EFI_CAPSULE_UPDATE_FIRMWARE_SUCCESS =3D (EFI_SUBCLASS_SPECIFIC | > + 0x00000004) =3D 0x00010004
# @Prompt Status Code for Capsule > + definitions # @ValidList 0x80000003 | 0x00010004 > + > + > gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeUpdateFirmwareSuc > ce > + ss|0x00010004|UINT32|0x00000104 > + > + ## Status Code for Capsule definitions.

# > + EFI_CAPSULE_UPDATE_FIRMWARE_FAILED =3D (EFI_SUBCLASS_SPECIFIC | > + 0x00000005) =3D 0x00010005
# @Prompt Status Code for Capsule > + definitions # @ValidList 0x80000003 | 0x00010005 > + > + > gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeUpdateFirmwareFail > e > + d|0x00010005|UINT32|0x00000105 > + > + ## Status Code for Capsule definitions.

> + # EFI_CAPSULE_RESETTING_SYSTEM =3D (EFI_SUBCLASS_SPECIFIC | > 0x00000006) =3D 0x00010006
> + # @Prompt Status Code for Capsule definitions # @ValidList > + 0x80000003 | 0x00010001 > + > + > gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeResettingSystem|0x > 0 > + 0010006|UINT32|0x00000106 > + > + ## CapsuleMax value in capsule report variable. > + # @Prompt CapsuleMax value in capsule report variable. > + > gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleMax|0xFFFF|UINT16|0x00000 > 107 > + > [PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] > ## This PCD defines the Console output row. The default value is 25 ac= cording > to UEFI spec. > # This PCD could be set to 0 then console output would be at max colu= mn > and max row. > @@ -1621,5 +1688,44 @@ > # @ValidList 0x80000001 | 0x0 >=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdIdentifyMappingPageTablePtr|0x0|UIN > T64|0x00030002 >=20 > +[PcdsDynamicEx] > + ## This dynamic PCD hold the FMP capsule monotonic count value for > +current > + # system firmware. It is used to ensure freshness/no replay on firmwa= re > update. > + # Only if the new system FmpCapsule > +EFI_FIRMWARE_IMAGE_AUTHENTICATION.MonotonicCount > + # is no less than this PcdFmpCapsuleMonotonicCount, the EDKII system > + # FmpCapsule will be processed. > + # It must be dynamicEx, because the EDKII system firmware update > +module may > + # consume the PCD produced in current system firmware. > + # @Prompt EDKII system FMP capsule monotonic count. > + > +gEfiMdeModulePkgTokenSpaceGuid.PcdEdkiiSystemFmpCapsuleMonotonicCo > unt|1 > +|UINT64|0x000035 > + > + ## This dynamic PCD hold 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 no > + less than # the current > + PcdEdkiiSystemFirmwareImageDescriptor.LowestSupportedVersion, > + # the EDKII system FmpCapsule will be processed. > + # It must be dynamicEx, because the EDKII system firmware update > + module may # consume the PCD produced in current system firmware. > + # @Prompt EDKII system firwmare image descriptor. > + > + > gEfiMdeModulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor| > { > + 0}|VOID*|0x00000037 > + > + ## 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 dynamicEx, because the EDKII system firmware update > + module may # consume the PCD produced in current system firmware. > + # @Prompt EDKII system firmware image FFS GUID. > + gEfiMdeModulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{0xb2, > + 0x9e, 0x9c, 0xaf, 0xad, 0x12, 0x3e, 0x4d, 0xa4, 0xd4, 0x96, 0xf6, > + 0xc9, 0x96, 0x62, 0x15}|VOID*|0x00001010 > + > + ## This dynamic PCD hold a list GUIDs for the ImageTypeId to indicate > + the # FMP capsule is EDKII system FMP. > + # An EDKII system firmware udpate module need consume this PCD to > + know if # This FMP capsule is a system FMP or device FMP. > + # It must be dynamicEx, because the EDKII system firmware update > + module may # consume the PCD produced in current system firmware. > + # @Prompt A list of EDKII system FMP ImageTypeId GUIDs > + > gEfiMdeModulePkgTokenSpaceGuid.PcdEdkiiSystemFmpCapsuleImageTypeIdGu > id > + |{0xd3, 0xee, 0x7e, 0x3f, 0x91, 0xf4, 0x1e, 0x40, 0x9e, 0xce, 0x74, > + 0x31, 0x32, 0x2e, 0xad, 0xf6}|VOID*|0x00001011 > + > [UserExtensions.TianoCore."ExtraFiles"] > MdeModulePkgExtra.uni > -- > 2.7.4.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel