From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=203.18.50.4; helo=nat-hk.nvidia.com; envelope-from=ashishsingha@nvidia.com; receiver=edk2-devel@lists.01.org Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C426520886F3C for ; Thu, 21 Feb 2019 13:22:29 -0800 (PST) Received: from hkpgpgate101.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 22 Feb 2019 05:22:28 +0800 Received: from HKMAIL102.nvidia.com ([10.18.16.11]) by hkpgpgate101.nvidia.com (PGP Universal service); Thu, 21 Feb 2019 13:22:26 -0800 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Thu, 21 Feb 2019 13:22:26 -0800 Received: from HKMAIL103.nvidia.com (10.18.16.12) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 21 Feb 2019 21:22:24 +0000 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.50) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Thu, 21 Feb 2019 21:22:24 +0000 Received: from DM6PR12MB3324.namprd12.prod.outlook.com (20.178.31.154) by DM6PR12MB2697.namprd12.prod.outlook.com (20.176.116.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.19; Thu, 21 Feb 2019 21:22:18 +0000 Received: from DM6PR12MB3324.namprd12.prod.outlook.com ([fe80::f8d4:91e2:b81b:3b81]) by DM6PR12MB3324.namprd12.prod.outlook.com ([fe80::f8d4:91e2:b81b:3b81%4]) with mapi id 15.20.1643.016; Thu, 21 Feb 2019 21:22:18 +0000 From: Ashish Singhal To: "edk2-devel@lists.01.org" , Sami Mujawar Thread-Topic: [PATCH v1 0/6] DynamicTablesPkg: Framework updates and fixes Thread-Index: AdTKK1JpTTz9UI0wS961hW6jxZkXbA== Date: Thu, 21 Feb 2019 21:22:18 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Enabled=True; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SiteId=43083d15-7273-40c1-b7db-39efd9ccc17a; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Owner=ashishsingha@nvidia.com; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SetDate=2019-02-21T21:22:15.0552718Z; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Name=Unrestricted; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Application=Microsoft Azure Information Protection; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Extended_MSFT_Method=Automatic; Sensitivity=Unrestricted authentication-results: spf=none (sender IP is ) smtp.mailfrom=ashishsingha@nvidia.com; x-originating-ip: [216.228.112.22] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ba0ad64b-8796-4451-5d1e-08d69842a8a3 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600110)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DM6PR12MB2697; x-ms-traffictypediagnostic: DM6PR12MB2697: x-ms-exchange-purlcount: 22 x-microsoft-exchange-diagnostics: =?us-ascii?Q?1; DM6PR12MB2697; 23:Fsuz5M6sEhRq8FLAYzbOzkkSBCGM73DkmHiNDHjAi?= =?us-ascii?Q?z23QHfhL875GhttKjJAUp0nkI+RUAMYKMb11c6IjAv/sXy7/zXuheFFrMyF+?= =?us-ascii?Q?H4AlG+6CbjYAtd8raXFA91X8TGQRnhn9SNtqNwJQ0h/PkVCtXmR1KN9fc3Om?= =?us-ascii?Q?ZoDhmCpNqDCzUBWVoRWeWSWWDSYosdfjFTYhQWNWcY8ZCgtqYv5cytr/MfqA?= =?us-ascii?Q?0UgripWrf9XCW8s9L5bEp+msojngNFBFYPrc5otXTOYWtBSLtasp2UDI3RBQ?= =?us-ascii?Q?CnBE8I+7VHCY+bd+NH9qcLw03n4yfAEHYTKakydEkObojEu79HS3mwJCM5WV?= =?us-ascii?Q?LqI0lGSZvCfHnTETnI/6PO5iY1YhNZmAuy2VOxfTv3Xpl2aD0ZOUF/IKLXIU?= =?us-ascii?Q?9TlemiMFisyvJlb4KJT8hKUOWKtc9CjfFyWVcTpd0S9MDHCxmr3mu78AmXPQ?= =?us-ascii?Q?cU3RXtyij5tsts3y1mfFFZ9JpQpRG/7+AxdivarDwvN1Ceqci+PQ+UoWD+y+?= =?us-ascii?Q?iH2L5YYduJ7HFTu5gDahWmEQPj1XUpnxjQynH/1wa+mLyt6F2h2A3kyl/Agv?= =?us-ascii?Q?KRjD6x7qbYmopgqBemvPsWABK86/OC3LPdyn6gZKFYShL5alItM0RKm9YhJ+?= =?us-ascii?Q?sLvUDwXCJ+2ZhqO3VdbkWRYKLv3k0llA5iBe2PE1W2abMDBi6V+9KQbMO3UL?= =?us-ascii?Q?Q1xcrqvS9o2Px1A5lJze3p+B0pvxjpffJL5zdD2YP+reN9RNYP/5wC37Untq?= =?us-ascii?Q?wQqnUkDLofPuOxsudF3i0ZPLLlGDGLccB6STMQMDM/bPu8zxxJWtHOrocIjw?= =?us-ascii?Q?a8fvutsKJjIxOWQgnOLVl1JP3vQhRbQUKIRFNDm9B3CDED4z+KbNS/idI4EI?= =?us-ascii?Q?ECzu05gSzpvDLFz5aNMpibf4lU3cE1/uOitF2QpkRqnnU8sQ1elvTxGKNREQ?= =?us-ascii?Q?6Vz4GljkDjOuWDyYfHXBP6lzwNW3r5UBC5h5zPKCCjp4VVRFCMWfrnVh5XG4?= =?us-ascii?Q?+xLFS11eUFxWF+wy6oIrcSFEzj6hl0kcAUaVrwFhHxoabNgOUVPdTtOvITxR?= =?us-ascii?Q?LyYdPhw/8WFDP0VlFJtE/RXHR/K/Jo8IdnxYlxLMR22rAt7jx0fiI+/B0ncf?= =?us-ascii?Q?mt9WUfbaeP1cGseLgaHTlWBBOtJ1epu96KxgXnLajD/K13/UXQgugu3oFHoB?= =?us-ascii?Q?PcOA7oQDH03SqvY2VfF4vjAlIfxbsi5D10SKuh9aqhgvczeh1bolb4BuywFV?= =?us-ascii?Q?iTLPTE7uPE1oqtfQC3KoIfk32uGMEzCDLIfEtL4gwt7jsixhtTmn2xN4oYWN?= =?us-ascii?Q?WkGXUrLjXfRMqV92iC8hwNHDplYkOKb4M2Kl5SOp3Np6EeBoARuPeLSoLWTe?= =?us-ascii?Q?WiUd7fu3UOijA+M1Dob1WRGQpDs/VTvdAxr3B0pr05ZsF5iG+Iv84ZGpUZJk?= =?us-ascii?Q?10FoRv83CFxrVypUuhxy9sHcDZc+26RHrtjoiUrNUx63YLk8ofOTHffGhTBn?= =?us-ascii?Q?xfel7nrEAfIzoBKzDF51ugE4dFUaoRXarbzl8EhAlCjklsBcoWXINbT8+W7y?= =?us-ascii?Q?KX8PhGHjEIeVuAk+piS5zqU0Mkm6m1fquRGdZo=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09555FB1AD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(376002)(136003)(396003)(346002)(13464003)(27574002)(51444003)(189003)(199004)(8936002)(3846002)(2501003)(5660300002)(25786009)(53936002)(6116002)(2906002)(15650500001)(486006)(6306002)(86362001)(478600001)(114624004)(7736002)(2420400007)(53946003)(74316002)(55016002)(105586002)(30864003)(9686003)(186003)(6246003)(256004)(71200400001)(15188155005)(8676002)(305945005)(71190400001)(19627235002)(53546011)(229853002)(7696005)(14454004)(68736007)(16799955002)(561944003)(110136005)(7110500001)(106356001)(14444005)(53376002)(102836004)(966005)(476003)(97736004)(33656002)(6436002)(81166006)(66066001)(99286004)(81156014)(26005)(316002)(6506007)(579004)(559001)(569006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR12MB2697; H:DM6PR12MB3324.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nvidia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Yc/GvAamMO1gsesb+GjooImL7+h76sJlmOwoUndoCukJXgaea+JiaccyjSBHPMymDqT1CBbZk37BQAYEpbkyu1j8ZqE2TmgYl12d6cB7SmGCs28oESRhs2FxKsLkSpECQBXAl74a4DtjzbyaxXSeZ62CcTyFerLvOhqmHI/akFiB47j4L3VN/BIQDPDOXmLsdcdPjI5OPu2YJi4BU3ygTI/HE2IIGUu7Gnav9UB7x63hucbceZilsYorlsEq3kFl7Mcx5pP4msVcHK69ixw6daoUmR04V+dAzqtSfdiffVE1pkqQMBwBTh5q4OrlvFLHhw8T4gMovtv35XPfaVHk0BNZ5EvCFnIe0qQduO268gRyfN1ZGXYNN8TYWe1l6CR8xJq2fmvNJ5QqcH4I0Y5l1vSOHS003y8cIUCz83KaT/A= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ba0ad64b-8796-4451-5d1e-08d69842a8a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2019 21:22:18.1804 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2697 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1550784149; bh=nZ7m1+NRLV/HMwsLdHbhlpF4du+r5fBwKKjMvQ4Dncc=; h=X-PGP-Universal:From:To:Subject:Thread-Topic:Thread-Index:Date: Message-ID:Accept-Language:X-MS-Has-Attach:X-MS-TNEF-Correlator: msip_labels:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-microsoft-antispam:x-ms-traffictypediagnostic: x-ms-exchange-purlcount:x-microsoft-exchange-diagnostics: x-microsoft-antispam-prvs:x-forefront-prvs: x-forefront-antispam-report:received-spf: x-ms-exchange-senderadcheck:x-microsoft-antispam-message-info: MIME-Version:X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type:Content-Transfer-Encoding; b=DY/wCgytzE4khQORoXNPokMOJH5qWF787WcPGIoMRE9a/JM3+awrTq84g37XWI6Oo /MiMb4+VABTA6xewWqCq0q3I6/9o1oiIzHNuxXQQNqbS/iWVtizo82XrXYgwHOzmd5 49iDMQDMKrbA0uYzPqdb5148HAWYQnWUEgUcIH8dlTP4TruiArZ4Zucl4D/9tS92y5 1irrhQ+dWT/W8hw5/WfJNkOd//R5MXmVC7RyRqR9J/gYYsGKtu6TWW+MFLoeAOZGlN TLpnr/O+SbMV3pKvUdn8QVsofqcEiXjGVL67lFeX97a6bgzBuusoCtiaubZ2iipZCT lLaUpMabu922A== Subject: Re: [PATCH v1 0/6] DynamicTablesPkg: Framework updates and fixes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2019 21:22:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Tested-by: Ashish Singhal -----Original Message----- From: edk2-devel On Behalf Of edk2-deve= l-request@lists.01.org Sent: Thursday, February 21, 2019 1:00 PM To: edk2-devel@lists.01.org Subject: edk2-devel Digest, Vol 44, Issue 53 Send edk2-devel mailing list submissions to =09edk2-devel@lists.01.org To subscribe or unsubscribe via the World Wide Web, visit =09https://lists.01.org/mailman/listinfo/edk2-devel or, via email, send a message with subject or body 'help' to =09edk2-devel-request@lists.01.org You can reach the person managing the list at =09edk2-devel-owner@lists.01.org When replying, please edit your Subject line so it is more specific than "Re: Contents of edk2-devel digest..." Today's Topics: =20 1. [Patch edk2 Wiki] Add ATA Security feature set support for =20 edk2-stable201903 (Hao Wu) =20 2. Re: [PATCH] BaseTools:Build fail if define [DEPEX] in library =20 inf (Feng, Bob C) =20 3. Re: [PATCH] BaseTools:Some build generated files content are =20 not ordered on linux (Feng, Bob C) =20 4. Re: [PATCH v4 0/7] ResetSystemLib changings (Gao, Liming) =20 5. Re: [PATCH v2 1/5] MdeModulePkg/UefiBootManagerLib: fix =20 LoadImage/StartImage status code rep. (Laszlo Ersek) =20 6. Re: [patch 2/2] MdeModulePkg/BmBoot: Report status when fail =20 to load/start boot option (Laszlo Ersek) =20 7. Re: [PATCH] MdeModulePkg/VariableSmmRuntimeDxe: Refactor =20 locating Variable Arch Protocol (Laszlo Ersek) =20 8. Re: [PATCH] MdeModulePkg/VariableSmmRuntimeDxe: Refactor =20 locating Variable Arch Protocol (Ard Biesheuvel) =20 9. Re: [PATCH] MdeModulePkg/VariableSmmRuntimeDxe: Refactor =20 locating Variable Arch Protocol (Zeng, Star) =20 10. Re: [PATCH] MdeModulePkg/VariableSmmRuntimeDxe: Refactor =20 locating Variable Arch Protocol (Ard Biesheuvel) =20 11. [PATCH v3 0/5] MdeModulePkg, OvmfPkg, ArmVirtPkg: more =20 visible boot progress reporting (Laszlo Ersek) =20 12. [PATCH v3 1/5] MdeModulePkg/UefiBootManagerLib: fix =20 LoadImage/StartImage status code rep. (Laszlo Ersek) =20 13. [PATCH v3 2/5] OvmfPkg: add library to track boot option =20 loading/starting on the console (Laszlo Ersek) =20 14. [PATCH v3 3/5] OvmfPkg/PlatformBootManagerLib: display boot =20 option loading/starting (Laszlo Ersek) =20 15. [PATCH v3 4/5] ArmVirtPkg/ArmVirtQemu*: enable minimal Status =20 Code Routing in DXE (Laszlo Ersek) =20 16. [PATCH v3 5/5] ArmVirtPkg/PlatformBootManagerLib: display =20 boot option loading/starting (Laszlo Ersek) =20 17. [PATCH v2 0/2] Maintainers: updates for ArmVirtPkg and =20 OvmfPkg (Laszlo Ersek) =20 18. [PATCH v2 1/2] Maintainers: add TPM2 reviewers for OvmfPkg =20 (Laszlo Ersek) =20 19. [PATCH v2 2/2] Maintainers: specify the scope for =20 OvmfPkg/ArmVirtPkg Xen module reviewers (Laszlo Ersek) =20 20. Re: [PATCH v2 0/2] Maintainers: updates for ArmVirtPkg and =20 OvmfPkg (Ard Biesheuvel) =20 21. Re: [PATCH v2 2/2] Maintainers: specify the scope for =20 OvmfPkg/ArmVirtPkg Xen module reviewers (Anthony PERARD) =20 22. [Patch V2] BaseTools: Correct the value assignment for =20 StructurePcd (Feng, Bob C) =20 23. [PATCH] Maintainers.txt: Update e-mail address for Julien =20 Grall (Julien Grall) =20 24. Re: [PATCH] Maintainers.txt: Update e-mail address for Julien =20 Grall (Ard Biesheuvel) =20 25. Re: [PATCH] Maintainers.txt: Update e-mail address for Julien =20 Grall (Laszlo Ersek) =20 26. Re: [PATCH v2 2/2] Maintainers: specify the scope for =20 OvmfPkg/ArmVirtPkg Xen module reviewers (Julien Grall) =20 27. Re: [PATCH] Maintainers.txt: Update e-mail address for Julien =20 Grall (Julien Grall) =20 28. Re: [PATCH v2 2/2] Maintainers: specify the scope for =20 OvmfPkg/ArmVirtPkg Xen module reviewers (Laszlo Ersek) =20 29. Re: [PATCH v2 1/2] Maintainers: add TPM2 reviewers for =20 OvmfPkg (Marc-Andr? Lureau) =20 30. [PATCH v1 5/6] DynamicTablesPkg: Remove GIC Distributor Id =20 field (Sami Mujawar) =20 31. [PATCH v1 0/6] DynamicTablesPkg: Framework updates and fixes =20 (Sami Mujawar) =20 32. [PATCH v1 2/6] DynamicTablesPkg: Rename enum used for ID =20 Mapping (Sami Mujawar) =20 33. [PATCH v1 4/6] DynamicTablesPkg: DGB2: Update =20 DBG2_DEBUG_PORT_DDI (Sami Mujawar) =20 34. [PATCH v1 1/6] DynamicTablesPkg: Fix depex and protocol =20 section (Sami Mujawar) =20 35. [PATCH v1 3/6] DynamicTablesPkg: Add OEM Info (Sami Mujawar) =20 36. [PATCH v1 6/6] DynamicTablesPkg: Minor updates and fix typos =20 (Sami Mujawar) =20 37. [PATCH edk2-platforms v1 4/4] Platform/ARM: Juno: Config Mgr =20 remove GICD ID (Sami Mujawar) =20 38. [PATCH edk2-platforms v1 1/4] Platform/ARM: Juno: =20 Configuration Manager depex (Sami Mujawar) =20 39. [PATCH edk2-platforms v1 3/4] Platform/ARM: FVP: Config Mgr =20 remove GICD ID (Sami Mujawar) =20 40. [PATCH edk2-platforms v1 2/4] Platform/ARM: FVP: =20 Configuration Manager depex (Sami Mujawar) =20 41. [PATCH edk2-platforms v1 0/4] Platform/ARM: Updates =20 corresponding to Dynamic Tables Framework changes (Sami Mujawar) =20 42. [PATCH 0/2] DynamicTablesPkg Updates (Ashish Singhal) =20 43. [PATCH 2/2] DynamicTablesPkg/AcpiSpcrLibArm: Support 16550 =20 UART. (Ashish Singhal) =20 44. [PATCH 1/2] DynamicTablesPkg/DynamicTableManagerDxe: Update =20 DEPEX (Ashish Singhal) =20 45. Re: [PATCH] Maintainers.txt: Update e-mail address for Julien =20 Grall (Laszlo Ersek) =20 46. Re: [PATCH v2 0/2] Maintainers: updates for ArmVirtPkg and =20 OvmfPkg (Laszlo Ersek) ---------------------------------------------------------------------- Message: 1 Date: Thu, 21 Feb 2019 14:04:34 +0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Liming Gao Subject: [edk2] [Patch edk2 Wiki] Add ATA Security feature set support =09for edk2-stable201903 Message-ID: <20190221060434.15608-1-hao.a.wu@intel.com> Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu --- =20EDK-II-Release-Planning.md | 1 + =201 file changed, 1 insertion(+) diff --git a/EDK-II-Release-Planning.md b/EDK-II-Release-Planning.md index 095da69..9244fc4 100644 --- a/EDK-II-Release-Planning.md +++ b/EDK-II-Release-Planning.md @@ -27,6 +27,7 @@ =20* [Support PI1.7 EFI_PEI_CORE_FV_LOCATION_PPI](https://bugzilla.tianoc= ore.org/show_bug.cgi?id=3D1524) =20* [Remove unused tool chain configuration in tools_def.template](https= ://bugzilla.tianocore.org/show_bug.cgi?id=3D1377) =20* [BaseTools supports to the driver combination](https://bugzilla.tian= ocore.org/show_bug.cgi?id=3D1520) +* [Add Security feature set support for ATA devices](https://bugzilla.ti= anocore.org/show_bug.cgi?id=3D1529) =20* Standalone MM build of authenticated variable stack (bugzilla link T= BD) =20* TBD Bugzilla List =20 --=20 2.12.0.windows.1 ------------------------------ Message: 2 Date: Thu, 21 Feb 2019 06:44:12 +0000 From: "Feng, Bob C" To: "Fan, ZhijuX" , "edk2-devel@lists.01.org" =09 Cc: "Gao, Liming" Subject: Re: [edk2] [PATCH] BaseTools:Build fail if define [DEPEX] in =09library inf Message-ID: =09<08650203BA1BD64D8AD9B6D5D74A85D16008C29F@SHSMSX101.ccr.corp.intel.com= > =09 Content-Type: text/plain; charset=3D"us-ascii" Reviewed-by: Bob Feng -----Original Message----- From: Fan, ZhijuX=20 Sent: Thursday, February 21, 2019 9:34 AM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Feng, Bob C Subject: [PATCH] BaseTools:Build fail if define [DEPEX] in library inf When define [DEPEX] in lib inf to build, it will fail and report" gUefiOvmfPkgTokenSpaceGuid.test1 used in [Depex] section should be used a= s FixedAtBuild type and VOID* datum type in the module." But we define this PCD to FixedAtBuild type and VOID* datum type indeed. DEC: [PcdsFixedAtBuild] gUefiOvmfPkgTokenSpaceGuid.test1 | {GUID("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x3c DSC: add pcd under lib inf as below: NULL|TestPkg/TestLib/TestLib.inf =20 =20 gUefiOvmfPkgTokenSpaceGuid.test1 | {GUID(gUefiOvmfPkgTokenSpaceGuid= )} Lib inf:(TestPkg/TestLib/TestLib.inf) [Depex] gUefiOvmfPkgTokenSpaceGuid.test1 [FixedPcd] gUefiOvmfPkgTokenSpaceGuid.test1 Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- =20BaseTools/Source/Python/AutoGen/AutoGen.py | 10 ++++++++-- =201 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Sourc= e/Python/AutoGen/AutoGen.py index 2452ecbcba..81361559b3 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -2892,10 +2892,16 @@ class ModuleAutoGen(AutoGen): =20 if '.' not in item: =20 NewList.append(item) =20 else: - if item not in self.FixedVoidTypePcds: + FixedVoidTypePcds =3D {} + if item in self.FixedVoidTypePcds: + FixedVoidTypePcds =3D self.FixedVoidTypePcds= + elif M in self.PlatformInfo.LibraryAutoGenList: + Index =3D self.PlatformInfo.LibraryAutoGenLi= st.index(M) + FixedVoidTypePcds =3D self.PlatformInfo.Libr= aryAutoGenList[Index].FixedVoidTypePcds + if item not in FixedVoidTypePcds: =20 EdkLogger.error("build", FORMAT_INVALID, "= {} used in [Depex] section should be used as FixedAtBuild type and VOID* = datum type in the module.".format(item)) =20 else: - Value =3D self.FixedVoidTypePcds[item] + Value =3D FixedVoidTypePcds[item] =20 if len(Value.split(',')) !=3D 16: =20 EdkLogger.error("build", FORMAT_INVALI= D, =20 "{} used in [Depex] se= ction should be used as FixedAtBuild type and VOID* datum type and 16 byt= es in the module.".format(item)) -- 2.14.1.windows.1 ------------------------------ Message: 3 Date: Thu, 21 Feb 2019 06:44:34 +0000 From: "Feng, Bob C" To: "Fan, ZhijuX" , "edk2-devel@lists.01.org" =09 Cc: "Gao, Liming" Subject: Re: [edk2] [PATCH] BaseTools:Some build generated files =09content are not ordered on linux Message-ID: =09<08650203BA1BD64D8AD9B6D5D74A85D16008C2AF@SHSMSX101.ccr.corp.intel.com= > =09 Content-Type: text/plain; charset=3D"us-ascii" Reviewed-by: Bob Feng -----Original Message----- From: Fan, ZhijuX=20 Sent: Thursday, February 21, 2019 1:18 PM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Feng, Bob C Subject: [edk2][PATCH] BaseTools:Some build generated files content are n= ot ordered on linux If the WORKSPACE environment variable has been set,The variables that con= trol stable sorting will not be set. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- =20edksetup.sh | 2 +- =201 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edksetup.sh b/edksetup.sh index a8897d10f8..39f62a29bd 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -49,6 +49,7 @@ function SetWorkspace() =20 # =20 # If WORKSPACE is already set, then we can return right now =20 # + export PYTHONHASHSEED=3D1 =20 if [ -n "$WORKSPACE" ] =20 then =20 return 0 @@ -77,7 +78,6 @@ function SetWorkspace() =20 # Set $WORKSPACE =20 # =20 export WORKSPACE=3D`pwd` - export PYTHONHASHSEED=3D1 =20 return 0 =20} =20 -- 2.14.1.windows.1 ------------------------------ Message: 4 Date: Thu, 21 Feb 2019 06:53:02 +0000 From: "Gao, Liming" To: "Gao, Zhichao" , "edk2-devel@lists.01.org" =09 Subject: Re: [edk2] [PATCH v4 0/7] ResetSystemLib changings Message-ID: =09<4A89E2EF3DFEDB4C8BFDE51014F606A14E3E40D2@SHSMSX104.ccr.corp.intel.com= > =09 Content-Type: text/plain; charset=3D"us-ascii" Reviewed-by: Liming Gao > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of = Zhichao Gao > Sent: Thursday, February 21, 2019 9:00 AM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [edk2] [PATCH v4 0/7] ResetSystemLib changings >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1460 > Add a new API ResetSystem in ResetSystemLib. > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1461 > Implement a runtime library instance of ResetSystemLib base on the new = changing. >=20 > V2: Add some required data type header file >=20 > V3: Resolve a case-typing error. >=20 > V4: Change the ResetSystemRuntimeDxe/ResetSystem.c name to RuntimeServi= ceResetSystem. > Add a new interface for PEI version ResetSystemLib. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Zhichao Gao > Cc: Ray Ni > Cc: Liming Gao >=20 > Zhichao Gao (7): > MdeModulePkg: change the function name ResetSystem > MdeModulePkg: Add the new API ResetSystem in the head file > MdeModulePkg: Add a new API ResetSystem for DXE ResetSystemLib > MdeModulePkg: Add a new API ResetSystem for Null version > MdeModulePkg: Add a new API ResetSystem for PEI ResetSystemLib > MdeModulePkg: Add a runtime library instance of ResetSystemLib > MdeModulePkg: Add the runtime ResetSystemLib in MdeModulePkg.dsc >=20 > MdeModulePkg/Include/Library/ResetSystemLib.h | 28 ++- > .../BaseResetSystemLibNull.c | 27 +++ > .../Library/DxeResetSystemLib/DxeResetSystemLib.c | 28 ++- > .../Library/PeiResetSystemLib/PeiResetSystemLib.c | 28 ++- > .../RuntimeResetSystemLib/RuntimeResetSystemLib.c | 216 +++++++++++++= ++++++++ > .../RuntimeResetSystemLib.inf | 50 +++++ > .../RuntimeResetSystemLib.uni | 21 ++ > MdeModulePkg/MdeModulePkg.dsc | 1 + > .../Universal/ResetSystemRuntimeDxe/ResetSystem.c | 8 +- > .../Universal/ResetSystemRuntimeDxe/ResetSystem.h | 4 +- > 10 files changed, 402 insertions(+), 9 deletions(-) > create mode 100644 MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeR= esetSystemLib.c > create mode 100644 MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeR= esetSystemLib.inf > create mode 100644 MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeR= esetSystemLib.uni >=20 > -- > 2.16.2.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ------------------------------ Message: 5 Date: Thu, 21 Feb 2019 09:36:37 +0100 From: Laszlo Ersek To: "Ni, Ray" , edk2-devel@lists.01.org Cc: Dandan Bi , Hao Wu , Jian =09J Wang , Sean Brogan =09, Star Zeng Subject: Re: [edk2] [PATCH v2 1/5] MdeModulePkg/UefiBootManagerLib: =09fix LoadImage/StartImage status code rep. Message-ID: <9e5cad87-5f32-37e4-210a-afb904089aff@redhat.com> Content-Type: text/plain; charset=3Dutf-8 On 02/20/19 14:17, Ni, Ray wrote: > On 2/20/2019 4:16 PM, Laszlo Ersek wrote: >> In the EFI_RETURN_STATUS_EXTENDED_DATA structure from PI-1.7, there >> may be >> padding between the DataHeader and ReturnStatus members. The >> REPORT_STATUS_CODE_EX() macro starts populating the structure immediat= ely >> after DataHeader, therefore the source data must provide for the paddi= ng. >> >> Extract the BmReportImageFailure() function from EfiBootManagerBoot(),= >> prepare a zero padding (if any) in a temporary >> EFI_RETURN_STATUS_EXTENDED_DATA object, and fix the >> REPORT_STATUS_CODE_EX() macro invocation. >> >> Cc: Dandan Bi >> Cc: Hao Wu >> Cc: Jian J Wang >> Cc: Ray Ni >> Cc: Sean Brogan >> Cc: Star Zeng >> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1539 >> Fixes: c2cf8720a5aad74230767a1f11bade2d86de3745 >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Laszlo Ersek >> --- >> >> Notes: >> ???? v2: >> ???? - new in v2 >> >> ? MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h |? 1 + >> ? MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c???? | 69 >> +++++++++++++++----- >> ? 2 files changed, 52 insertions(+), 18 deletions(-) >> >> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h >> b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h >> index 978fbff966f6..0fef63fceedf 100644 >> --- a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h >> +++ b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h >> @@ -51,6 +51,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, >> EITHER EXPRESS OR IMPLIED. >> ? #include >> ? #include >> ? #include >> +#include >> ? #include >> ? ? #include >> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >> b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >> index 9be1633b7480..ffb98c6c9b83 100644 >> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >> @@ -1667,6 +1667,55 @@ BmIsBootManagerMenuFilePath ( >> ??? return FALSE; >> ? } >> ? +/** >> +? Report status code with EFI_RETURN_STATUS_EXTENDED_DATA about >> LoadImage() or >> +? StartImage() failure. >> + >> +? @param[in] ErrorCode????? An Error Code in the Software Class, DXE >> Boot >> +??????????????????????????? Service Driver Subclass. ErrorCode will >> be used to >> +??????????????????????????? compose the Value parameter for status co= de >> +??????????????????????????? reporting. Must be one of >> +??????????????????????????? EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR a= nd >> +??????????????????????????? EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED. >> + >> +? @param[in] FailureStatus? The failure status returned by the boot >> service >> +??????????????????????????? that should be reported. >> +**/ >> +VOID >> +BmReportImageFailure ( > Laszlo, > Thanks for quick fixing this issue. > To match the status code it reports, how about rename the function as > "BmReportLoadFailure"? Sure, I can do that. > Another minor comments in below. >> +? IN UINT32???? ErrorCode, >> +? IN EFI_STATUS FailureStatus >> +? ) >> +{ >> +? EFI_RETURN_STATUS_EXTENDED_DATA ExtendedData; >> +? VOID??????????????????????????? *PaddingStart; >> +? UINTN?????????????????????????? PaddingSize; >> + >> +? if (!ReportErrorCodeEnabled ()) { >> +??? return; >> +? } >> + >> +? ASSERT ( >> +??? (ErrorCode =3D=3D EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR) || >> +??? (ErrorCode =3D=3D EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED) >> +??? ); >> + >> +? PaddingStart =3D &ExtendedData.DataHeader + 1; >> +? PaddingSize =3D (UINTN) &ExtendedData.ReturnStatus - (UINTN) >> PaddingStart; >> +? ZeroMem (PaddingStart, PaddingSize); >=20 > I prefer "ZeroMem (&ExtendedData, sizeof (ExtendedData))" instead of > introducing local variables such as PaddingStart/PaddingSize. > This makes code more good-looking:). I agree that that looks more natural. I didn't know how much you'd like me to "optimize" this logic. Because, (1) an optimizing compiler can eliminate PaddingSize from the ZeroMem() call (replacing it with a constant); in other words, the PaddingSize calculation would have no runtime cost, (2) the ZeroMem() call would have to clear fewer bytes. I hesitated between the smallest possible ZeroMem() and the easiest-to-read ZeroMem(). I will rework it in v3. >=20 >> +? ExtendedData.ReturnStatus =3D FailureStatus; >> + >> +? REPORT_STATUS_CODE_EX ( >> +??? (EFI_ERROR_CODE | EFI_ERROR_MINOR), >> +??? (EFI_SOFTWARE_DXE_BS_DRIVER | ErrorCode), >> +??? 0, >> +??? NULL, >> +??? NULL, >> +??? PaddingStart, > &ExtendedData.DataHeader + 1 >=20 >> +??? PaddingSize + sizeof (ExtendedData.ReturnStatus) > sizeof (ExtendedData) - sizeof (ExtendedData.DataHeader) Yes. Thanks, Laszlo >> +??? ); >> +} >> + >> ? /** >> ??? Attempt to boot the EFI boot option. This routine sets >> L"BootCurent" and >> ??? also signals the EFI ready to boot event. If the device path for >> the option >> @@ -1822,15 +1871,7 @@ EfiBootManagerBoot ( >> ??????? // >> ??????? // Report Status Code with the failure status to indicate that= >> the failure to load boot option >> ??????? // >> -????? REPORT_STATUS_CODE_EX ( >> -??????? EFI_ERROR_CODE | EFI_ERROR_MINOR, >> -??????? (EFI_SOFTWARE_DXE_BS_DRIVER | >> EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR), >> -??????? 0, >> -??????? NULL, >> -??????? NULL, >> -??????? &Status, >> -??????? sizeof (EFI_STATUS) >> -??????? ); >> +????? BmReportImageFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR, >> Status); >> ??????? BootOption->Status =3D Status; >> ??????? // >> ??????? // Destroy the RAM disk >> @@ -1911,15 +1952,7 @@ EfiBootManagerBoot ( >> ????? // >> ????? // Report Status Code with the failure status to indicate that >> boot failure >> ????? // >> -??? REPORT_STATUS_CODE_EX ( >> -????? EFI_ERROR_CODE | EFI_ERROR_MINOR, >> -????? (EFI_SOFTWARE_DXE_BS_DRIVER | >> EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED), >> -????? 0, >> -????? NULL, >> -????? NULL, >> -????? &Status, >> -????? sizeof (EFI_STATUS) >> -????? ); >> +??? BmReportImageFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED, Status= ); >> ??? } >> ??? PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) >> OptionNumber); >> ? >=20 >=20 ------------------------------ Message: 6 Date: Thu, 21 Feb 2019 09:55:52 +0100 From: Laszlo Ersek To: "Doran, Mark" , "Ni, Ray" =09, "Bi, Dandan" Cc: "edk2-devel@lists.01.org" , "Wu, Hao A" =09 Subject: Re: [edk2] [patch 2/2] MdeModulePkg/BmBoot: Report status =09when fail to load/start boot option Message-ID: <08ffc80e-2e37-5317-182c-5da1391d0ff4@redhat.com> Content-Type: text/plain; charset=3Dutf-8 On 02/20/19 18:19, Doran, Mark wrote: >> -----Original Message----- >> From: Laszlo Ersek [mailto:lersek@redhat.com] >> Sent: Wednesday, February 20, 2019 1:25 AM >> To: Ni, Ray ; Bi, Dandan >> Cc: edk2-devel@lists.01.org; Wu, Hao A ; Doran, Ma= rk >> >> Subject: Re: [edk2] [patch 2/2] MdeModulePkg/BmBoot: Report status whe= n >> fail to load/start boot option >> >> +Mark, for my comments on the process >=20 > Thank you :) > =20 >> On 02/20/19 03:21, Ni, Ray wrote: >>> Laszlo, >>> Thanks for catching this. >>> >>> GenPerformMemoryTest() in >>> MdeModulePkg\Universal\MemoryTest\GenericMemoryTestDxe\LightMemoryTes= t >>> .c uses the same technics as you suggested. >>> >>> I give up to propose another option: having pack(1) for the new statu= s >> structure. >> >> I think that byte-packing EFI_RETURN_STATUS_EXTENDED_DATA in the PI-1.= 7 >> spec would have been viable, but we should have thought about that in >> advance. The PI and UEFI specs require natural alignment for structure= >> members, unless stated otherwise. There *are* a number of examples of >> "stated otherwise" (the term that the specs use is frequently "byte-pa= cked >> structure"). Again, we should have thought of that in advance, before = PI- >> 1.7 was released, so now we can only fix the way the object is populat= ed. >=20 > Agreed. > =20 >> More generally, I think this demonstrates a flaw in the standardizatio= n >> process. PIWG and USWG should only standardize existing practice; that= =20is, >> features that have at least one functional implementation. (Not necess= arily >> open source, but the interfaces should be battle-hardened >> *first*.) The restriction where we can't even propose patches for edk2= >> before the standards are updated is very counter-productive. There's >> practically zero chance for getting an actual implementation peer-revi= ewed >> and peer-tested before proposing the API for the standard. >> >> Personally I have suggested in the past to implement some new features= =20as >> edk2 extensions first, and once they work, to upstream them to the >> standards. This idea is usually rejected by maintainers, because >> maintainers worry about becoming stuck with more and more edk2 extensi= ons >> to core code (i.e., they worry about the feature proponents not making= =20good >> on their promise to standardize). Unfortunately, the alternative (=3D = the >> current practice) is that we standardize speculative interfaces, which= =20then >> prove suboptimal once we implement them. >=20 > So personally I'm a big believer in having working code for things we w= rite down in the standards. When EFI was first drafted that's how we did= =20it: what was then known as "the sample implementation" and the actual = spec content were more or less developed in parallel and the spec wasn't = done until the code was working satisfactorily. We got away from that la= rgely because when the UEFI Forum was formed, there was nominal interest = in promoting more than one implementation and keeping spec and code requi= rements separate was a part of that. >=20 > Recent changes, particularly inside Intel, present an opportunity for u= s to revisit this issue. I'm advocating for the approach of spec-follows= -code for new Contributions that Intel will make to the open source proje= ct going forward. I'll have more to say about this at upcoming industry = events. >=20 Sounds fantastic! Thank you! Laszlo ------------------------------ Message: 7 Date: Thu, 21 Feb 2019 10:04:35 +0100 From: Laszlo Ersek To: Ard Biesheuvel , Jagadeesh Ujja =09, "Zeng, Star" , "Yao, =09Jiewen" Cc: "Kinney, Michael D" , "Gao, Liming" =09, "edk2-devel@lists.01.org" =09, "Zhang, Chao B" Subject: Re: [edk2] [PATCH] MdeModulePkg/VariableSmmRuntimeDxe: =09Refactor locating Variable Arch Protocol Message-ID: <615a9ac8-1ca9-94e1-a473-b251dae57460@redhat.com> Content-Type: text/plain; charset=3Dutf-8 On 02/20/19 13:23, Ard Biesheuvel wrote: > On Wed, 20 Feb 2019 at 06:53, Jagadeesh Ujja w= rote: >> >> hi Ard, >> On Tue, Feb 19, 2019 at 6:55 PM Ard Biesheuvel >> wrote: >>> >>> Hello Jagadeesh, >>> >>> On Tue, 19 Feb 2019 at 11:47, Jagadeesh Ujja = =20wrote: >>>> >>>> In preparation for providing a standalone MM based non-secure variab= le >>>> runtime driver, factor out some portions that are specific to the >>>> traditional driver, mainly related to locating variable arch protoco= l >>>> and variable write arch protocol, which are not required to be locat= ed >>>> when using standalone MM based secure variable implementation. >>>> >>> >>> While i think this change is correct from a technical perspective, I >>> don't think this is the right approach. >>> >> these changes are mandatory, this is one of the possible solution. >> >>> It was a deliberate decision to expose the MM services in a way that >>> only the producer of the communication protocol is aware of the >>> implementation details, i.e., whether it is backed by tradtional MM o= r >>> standalone MM. >>> >> can you please provide more details on how "exposing the MM services" >> will help to resolve the issue here. if this helps, definitely i will = use that. >> >=20 > Let me rephrase this for the benefit of the MdeModulePkg maintainers, > and ask them their opinion. >=20 > Currently, the DXE runtime driver that produces the architectural > varstore protocols that are based on communication with MM components > living elsewhere, rely on the EFI protocol database for sequencing. > I.e., after dispatch, they wait for certain protocols to be installed > into the DXE protocol database by the SMM drivers before proceeding to > install the variable arch protocols. >=20 > This does not work for standalone MM, since it has no access to the > DXE protocol database, nor is it needed, since it may be assumed that > the MM execution context is fully configured by the time the DXE phase > starts. >=20 > Jagadeesh's proposal is to factor this out, and create two different > .INFs to build the same DXE runtime driver in two different ways. This > defeats the purpose of having an abstract MM communication protocol, > so it is something I would like to avoid. On the other hand, is it not > obvious how to parameterize this requirement in another way. >=20 > For the moment, I could live with putting this into a library, and > leave it up to the platform to ensure the combination of the library > resolution with the driver that produces the MM communicate protocol > is a sane one. >=20 > Any thoughts? I think I'm missing the gist of the library approach; still, would it be possible for affected platforms (i.e. those that depend on standalone MM) to procude the necessary DXE protocols (for unblocking the variable runtime driver) in a platform DXE driver? Thanks Laszlo ------------------------------ Message: 8 Date: Thu, 21 Feb 2019 10:11:44 +0100 From: Ard Biesheuvel To: Laszlo Ersek Cc: Jagadeesh Ujja , "Zeng, Star" =09, "Yao, Jiewen" , "Kinney, =09Michael D" , "Gao, Liming" =09, "edk2-devel@lists.01.org" =09, "Zhang, Chao B" Subject: Re: [edk2] [PATCH] MdeModulePkg/VariableSmmRuntimeDxe: =09Refactor locating Variable Arch Protocol Message-ID: =09 Content-Type: text/plain; charset=3D"UTF-8" On Thu, 21 Feb 2019 at 10:04, Laszlo Ersek wrote: > > On 02/20/19 13:23, Ard Biesheuvel wrote: > > On Wed, 20 Feb 2019 at 06:53, Jagadeesh Ujja = =20wrote: > >> > >> hi Ard, > >> On Tue, Feb 19, 2019 at 6:55 PM Ard Biesheuvel > >> wrote: > >>> > >>> Hello Jagadeesh, > >>> > >>> On Tue, 19 Feb 2019 at 11:47, Jagadeesh Ujja wrote: > >>>> > >>>> In preparation for providing a standalone MM based non-secure vari= able > >>>> runtime driver, factor out some portions that are specific to the > >>>> traditional driver, mainly related to locating variable arch proto= col > >>>> and variable write arch protocol, which are not required to be loc= ated > >>>> when using standalone MM based secure variable implementation. > >>>> > >>> > >>> While i think this change is correct from a technical perspective, = I > >>> don't think this is the right approach. > >>> > >> these changes are mandatory, this is one of the possible solution. > >> > >>> It was a deliberate decision to expose the MM services in a way tha= t > >>> only the producer of the communication protocol is aware of the > >>> implementation details, i.e., whether it is backed by tradtional MM= =20or > >>> standalone MM. > >>> > >> can you please provide more details on how "exposing the MM services= " > >> will help to resolve the issue here. if this helps, definitely i wil= l use that. > >> > > > > Let me rephrase this for the benefit of the MdeModulePkg maintainers,= > > and ask them their opinion. > > > > Currently, the DXE runtime driver that produces the architectural > > varstore protocols that are based on communication with MM components= > > living elsewhere, rely on the EFI protocol database for sequencing. > > I.e., after dispatch, they wait for certain protocols to be installed= > > into the DXE protocol database by the SMM drivers before proceeding t= o > > install the variable arch protocols. > > > > This does not work for standalone MM, since it has no access to the > > DXE protocol database, nor is it needed, since it may be assumed that= > > the MM execution context is fully configured by the time the DXE phas= e > > starts. > > > > Jagadeesh's proposal is to factor this out, and create two different > > .INFs to build the same DXE runtime driver in two different ways. Thi= s > > defeats the purpose of having an abstract MM communication protocol, > > so it is something I would like to avoid. On the other hand, is it no= t > > obvious how to parameterize this requirement in another way. > > > > For the moment, I could live with putting this into a library, and > > leave it up to the platform to ensure the combination of the library > > resolution with the driver that produces the MM communicate protocol > > is a sane one. > > > > Any thoughts? > > I think I'm missing the gist of the library approach; still, would it b= e > possible for affected platforms (i.e. those that depend on standalone > MM) to procude the necessary DXE protocols (for unblocking the variable= > runtime driver) in a platform DXE driver? > Yes, that is the other option: we could create a library that unconditionally produces those protocols and hook it into the MM communication driver via NULL library class resolution. ------------------------------ Message: 9 Date: Thu, 21 Feb 2019 17:33:05 +0800 From: "Zeng, Star" To: Ard Biesheuvel , Laszlo Ersek =09 Cc: "edk2-devel@lists.01.org" , "Gao, Liming" =09, "Yao, Jiewen" , "Zhang, =09Chao B" , "Kinney, Michael D" =09, star.zeng@intel.com Subject: Re: [edk2] [PATCH] MdeModulePkg/VariableSmmRuntimeDxe: =09Refactor locating Variable Arch Protocol Message-ID: Content-Type: text/plain; charset=3Dutf-8; format=3Dflowed On 2019/2/21 17:11, Ard Biesheuvel wrote: > On Thu, 21 Feb 2019 at 10:04, Laszlo Ersek wrote: >> >> On 02/20/19 13:23, Ard Biesheuvel wrote: >>> On Wed, 20 Feb 2019 at 06:53, Jagadeesh Ujja = =20wrote: >>>> >>>> hi Ard, >>>> On Tue, Feb 19, 2019 at 6:55 PM Ard Biesheuvel >>>> wrote: >>>>> >>>>> Hello Jagadeesh, >>>>> >>>>> On Tue, 19 Feb 2019 at 11:47, Jagadeesh Ujja wrote: >>>>>> >>>>>> In preparation for providing a standalone MM based non-secure vari= able >>>>>> runtime driver, factor out some portions that are specific to the >>>>>> traditional driver, mainly related to locating variable arch proto= col >>>>>> and variable write arch protocol, which are not required to be loc= ated >>>>>> when using standalone MM based secure variable implementation. >>>>>> >>>>> >>>>> While i think this change is correct from a technical perspective, = I >>>>> don't think this is the right approach. >>>>> >>>> these changes are mandatory, this is one of the possible solution. >>>> >>>>> It was a deliberate decision to expose the MM services in a way tha= t >>>>> only the producer of the communication protocol is aware of the >>>>> implementation details, i.e., whether it is backed by tradtional MM= =20or >>>>> standalone MM. >>>>> >>>> can you please provide more details on how "exposing the MM services= " >>>> will help to resolve the issue here. if this helps, definitely i wil= l use that. >>>> >>> >>> Let me rephrase this for the benefit of the MdeModulePkg maintainers,= >>> and ask them their opinion. >>> >>> Currently, the DXE runtime driver that produces the architectural >>> varstore protocols that are based on communication with MM components= >>> living elsewhere, rely on the EFI protocol database for sequencing. >>> I.e., after dispatch, they wait for certain protocols to be installed= >>> into the DXE protocol database by the SMM drivers before proceeding t= o >>> install the variable arch protocols. >>> >>> This does not work for standalone MM, since it has no access to the >>> DXE protocol database, nor is it needed, since it may be assumed that= >>> the MM execution context is fully configured by the time the DXE phas= e >>> starts. >>> >>> Jagadeesh's proposal is to factor this out, and create two different >>> .INFs to build the same DXE runtime driver in two different ways. Thi= s >>> defeats the purpose of having an abstract MM communication protocol, >>> so it is something I would like to avoid. On the other hand, is it no= t >>> obvious how to parameterize this requirement in another way. >>> >>> For the moment, I could live with putting this into a library, and >>> leave it up to the platform to ensure the combination of the library >>> resolution with the driver that produces the MM communicate protocol >>> is a sane one. >>> >>> Any thoughts? >> >> I think I'm missing the gist of the library approach; still, would it = be >> possible for affected platforms (i.e. those that depend on standalone >> MM) to procude the necessary DXE protocols (for unblocking the variabl= e >> runtime driver) in a platform DXE driver? >> >=20 > Yes, that is the other option: we could create a library that > unconditionally produces those protocols and hook it into the MM > communication driver via NULL library class resolution. >=20 I am not familiar with standalone MM, either ARM. So may have no much=20 valuable opinion. For this case, standalone MM could not install DXE protocols into DXE=20 protocol database to notify the wrapper (VariableSmmRuntimeDxe), so need = another way to install the DXE protocols, right? Could standalone MM assume the MM handler for variable is ready when MM=20 communication driver runs? If yes, a NULL library instance should work (as a stub to install the=20 DXE protocols in its constructor). :) Thanks, Star ------------------------------ Message: 10 Date: Thu, 21 Feb 2019 10:45:37 +0100 From: Ard Biesheuvel To: "Zeng, Star" Cc: Laszlo Ersek , "edk2-devel@lists.01.org" =09, "Gao, Liming" , =09"Yao, Jiewen" , "Zhang, Chao B" =09, "Kinney, Michael D" =09 Subject: Re: [edk2] [PATCH] MdeModulePkg/VariableSmmRuntimeDxe: =09Refactor locating Variable Arch Protocol Message-ID: =09 Content-Type: text/plain; charset=3D"UTF-8" On Thu, 21 Feb 2019 at 10:33, Zeng, Star wrote: > > On 2019/2/21 17:11, Ard Biesheuvel wrote: > > On Thu, 21 Feb 2019 at 10:04, Laszlo Ersek wrote:= > >> > >> On 02/20/19 13:23, Ard Biesheuvel wrote: > >>> On Wed, 20 Feb 2019 at 06:53, Jagadeesh Ujja wrote: > >>>> > >>>> hi Ard, > >>>> On Tue, Feb 19, 2019 at 6:55 PM Ard Biesheuvel > >>>> wrote: > >>>>> > >>>>> Hello Jagadeesh, > >>>>> > >>>>> On Tue, 19 Feb 2019 at 11:47, Jagadeesh Ujja wrote: > >>>>>> > >>>>>> In preparation for providing a standalone MM based non-secure va= riable > >>>>>> runtime driver, factor out some portions that are specific to th= e > >>>>>> traditional driver, mainly related to locating variable arch pro= tocol > >>>>>> and variable write arch protocol, which are not required to be l= ocated > >>>>>> when using standalone MM based secure variable implementation. > >>>>>> > >>>>> > >>>>> While i think this change is correct from a technical perspective= , I > >>>>> don't think this is the right approach. > >>>>> > >>>> these changes are mandatory, this is one of the possible solution.= > >>>> > >>>>> It was a deliberate decision to expose the MM services in a way t= hat > >>>>> only the producer of the communication protocol is aware of the > >>>>> implementation details, i.e., whether it is backed by tradtional = MM or > >>>>> standalone MM. > >>>>> > >>>> can you please provide more details on how "exposing the MM servic= es" > >>>> will help to resolve the issue here. if this helps, definitely i w= ill use that. > >>>> > >>> > >>> Let me rephrase this for the benefit of the MdeModulePkg maintainer= s, > >>> and ask them their opinion. > >>> > >>> Currently, the DXE runtime driver that produces the architectural > >>> varstore protocols that are based on communication with MM componen= ts > >>> living elsewhere, rely on the EFI protocol database for sequencing.= > >>> I.e., after dispatch, they wait for certain protocols to be install= ed > >>> into the DXE protocol database by the SMM drivers before proceeding= =20to > >>> install the variable arch protocols. > >>> > >>> This does not work for standalone MM, since it has no access to the= > >>> DXE protocol database, nor is it needed, since it may be assumed th= at > >>> the MM execution context is fully configured by the time the DXE ph= ase > >>> starts. > >>> > >>> Jagadeesh's proposal is to factor this out, and create two differen= t > >>> .INFs to build the same DXE runtime driver in two different ways. T= his > >>> defeats the purpose of having an abstract MM communication protocol= , > >>> so it is something I would like to avoid. On the other hand, is it = not > >>> obvious how to parameterize this requirement in another way. > >>> > >>> For the moment, I could live with putting this into a library, and > >>> leave it up to the platform to ensure the combination of the librar= y > >>> resolution with the driver that produces the MM communicate protoco= l > >>> is a sane one. > >>> > >>> Any thoughts? > >> > >> I think I'm missing the gist of the library approach; still, would i= t be > >> possible for affected platforms (i.e. those that depend on standalon= e > >> MM) to procude the necessary DXE protocols (for unblocking the varia= ble > >> runtime driver) in a platform DXE driver? > >> > > > > Yes, that is the other option: we could create a library that > > unconditionally produces those protocols and hook it into the MM > > communication driver via NULL library class resolution. > > > > I am not familiar with standalone MM, either ARM. So may have no much > valuable opinion. > > For this case, standalone MM could not install DXE protocols into DXE > protocol database to notify the wrapper (VariableSmmRuntimeDxe), so nee= d > another way to install the DXE protocols, right? Yes > Could standalone MM assume the MM handler for variable is ready when MM= > communication driver runs? Yes > If yes, a NULL library instance should work (as a stub to install the > DXE protocols in its constructor). :) > Yes, that was my suggestion. So Jagadeesh, could you please take this approach instead? - Create a library in StandaloneMmPkg with LIBRARY_CLASS =3D NULL and a constructor that installs the two protocols. - Update your platform so that the MM communication driver is included as= ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf { =20 =20 NULL|StandaloneMmPkg/Library/VariableMmDependency/VariableMmDepende= ncy.inf } I don't think this will violate any ordering constraints, given that the drivers that have a dependency on these protocols also have a dependency on the MM communicate driver itself. Thanks, Ard. ------------------------------ Message: 11 Date: Thu, 21 Feb 2019 11:41:07 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Cc: Anthony Perard , Ard Biesheuvel =09, Dandan Bi , Hao Wu =09, Jian J Wang , Jordan =09Justen , Julien Grall =09, Ray Ni , Sean Brogan =09, Star Zeng Subject: [edk2] [PATCH v3 0/5] MdeModulePkg, OvmfPkg, ArmVirtPkg: more =09visible boot progress reporting Message-ID: <20190221104112.14995-1-lersek@redhat.com> Repo: https://github.com/lersek/edk2.git Branch: boot_diags_v3 Addressing feedback for v2, which was posted at: =20 https://lists.01.org/pipermail/edk2-devel/2019-February/036965.html =20 http://mid.mail-archive.com/20190220081644.8238-1-lersek@redhat.com Changes are noted per patch. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Dandan Bi Cc: Hao Wu Cc: Jian J Wang Cc: Jordan Justen Cc: Julien Grall Cc: Ray Ni Cc: Sean Brogan Cc: Star Zeng Thanks! Laszlo Laszlo Ersek (5): =20 MdeModulePkg/UefiBootManagerLib: fix LoadImage/StartImage status code= =20 rep. =20 OvmfPkg: add library to track boot option loading/starting on the =20 console =20 OvmfPkg/PlatformBootManagerLib: display boot option loading/starting =20 ArmVirtPkg/ArmVirtQemu*: enable minimal Status Code Routing in DXE =20 ArmVirtPkg/PlatformBootManagerLib: display boot option =20 loading/starting =20ArmVirtPkg/ArmVirtQemu.dsc |= =20 11 + =20ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc |= =20 5 + =20ArmVirtPkg/ArmVirtQemuKernel.dsc |= =20 11 + =20ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c |= =20 3 + =20ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |= =20 1 + =20MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c |= =20 65 ++-- =20MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h |= =20 1 + =20OvmfPkg/Include/Library/PlatformBmPrintScLib.h |= =20 41 +++ =20OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf |= =20 66 +++++ =20OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c |= =20310 ++++++++++++++++++++ =20OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c |= =20 3 + =20OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |= =20 1 + =20OvmfPkg/OvmfPkg.dec |= =20 5 + =20OvmfPkg/OvmfPkgIa32.dsc |= =20 1 + =20OvmfPkg/OvmfPkgIa32X64.dsc |= =20 1 + =20OvmfPkg/OvmfPkgX64.dsc |= =20 1 + =2016 files changed, 508 insertions(+), 18 deletions(-) =20create mode 100644 OvmfPkg/Include/Library/PlatformBmPrintScLib.h =20create mode 100644 OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrin= tScLib.inf =20create mode 100644 OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHand= ler.c --=20 2.19.1.3.g30247aa5d201 ------------------------------ Message: 12 Date: Thu, 21 Feb 2019 11:41:08 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Cc: Dandan Bi , Hao Wu , Jian =09J Wang , Ray Ni , Sean Brogan= =09, Star Zeng Subject: [edk2] [PATCH v3 1/5] MdeModulePkg/UefiBootManagerLib: fix =09LoadImage/StartImage status code rep. Message-ID: <20190221104112.14995-2-lersek@redhat.com> In the EFI_RETURN_STATUS_EXTENDED_DATA structure from PI-1.7, there may b= e padding between the DataHeader and ReturnStatus members. The REPORT_STATUS_CODE_EX() macro starts populating the structure immediately= after DataHeader, therefore the source data must provide for the padding.= Extract the BmReportLoadFailure() function from EfiBootManagerBoot(), prepare a zero padding (if any) in a temporary EFI_RETURN_STATUS_EXTENDED_DATA object, and fix the REPORT_STATUS_CODE_EX() macro invocation. Cc: Dandan Bi Cc: Hao Wu Cc: Jian J Wang Cc: Ray Ni Cc: Sean Brogan Cc: Star Zeng Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1539 Fixes: c2cf8720a5aad74230767a1f11bade2d86de3745 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- Notes: =20 v3: =20 =20 =20 - rename BmReportImageFailure() to BmReportLoadFailure() [Ray] =20 =20 =20 - eliminate PaddingStart and PaddingSize; zero out the full Extende= dData =20 struct [Ray] =20 =20 =20 - don't pick up Ard's R-b due to the change above being functional = in =20 nature =20 =20 =20 v2: =20 - new in v2 =20MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h | 1 + =20MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 65 ++++++++++++= ++------ =202 files changed, 48 insertions(+), 18 deletions(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h b/MdeMo= dulePkg/Library/UefiBootManagerLib/InternalBm.h index 978fbff966f6..0fef63fceedf 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h +++ b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h @@ -51,6 +51,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITH= ER EXPRESS OR IMPLIED. =20#include =20#include =20#include +#include =20#include =20 =20#include diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModule= Pkg/Library/UefiBootManagerLib/BmBoot.c index 9be1633b7480..02ff354ef6a3 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -1667,6 +1667,51 @@ BmIsBootManagerMenuFilePath ( =20 return FALSE; =20} =20 +/** + Report status code with EFI_RETURN_STATUS_EXTENDED_DATA about LoadImag= e() or + StartImage() failure. + + @param[in] ErrorCode An Error Code in the Software Class, DXE Boo= t + Service Driver Subclass. ErrorCode will be u= sed to + compose the Value parameter for status code + reporting. Must be one of + EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR and + EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED. + + @param[in] FailureStatus The failure status returned by the boot serv= ice + that should be reported. +**/ +VOID +BmReportLoadFailure ( + IN UINT32 ErrorCode, + IN EFI_STATUS FailureStatus + ) +{ + EFI_RETURN_STATUS_EXTENDED_DATA ExtendedData; + + if (!ReportErrorCodeEnabled ()) { + return; + } + + ASSERT ( + (ErrorCode =3D=3D EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR) || + (ErrorCode =3D=3D EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED) + ); + + ZeroMem (&ExtendedData, sizeof (ExtendedData)); + ExtendedData.ReturnStatus =3D FailureStatus; + + REPORT_STATUS_CODE_EX ( + (EFI_ERROR_CODE | EFI_ERROR_MINOR), + (EFI_SOFTWARE_DXE_BS_DRIVER | ErrorCode), + 0, + NULL, + NULL, + &ExtendedData.DataHeader + 1, + sizeof (ExtendedData) - sizeof (ExtendedData.DataHeader) + ); +} + =20/** =20 Attempt to boot the EFI boot option. This routine sets L"BootCurent"= =20and =20 also signals the EFI ready to boot event. If the device path for the= =20option @@ -1822,15 +1867,7 @@ EfiBootManagerBoot ( =20 // =20 // Report Status Code with the failure status to indicate that t= he failure to load boot option =20 // - REPORT_STATUS_CODE_EX ( - EFI_ERROR_CODE | EFI_ERROR_MINOR, - (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_= ERROR), - 0, - NULL, - NULL, - &Status, - sizeof (EFI_STATUS) - ); + BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR, Stat= us); =20 BootOption->Status =3D Status; =20 // =20 // Destroy the RAM disk @@ -1911,15 +1948,7 @@ EfiBootManagerBoot ( =20 // =20 // Report Status Code with the failure status to indicate that boo= t failure =20 // - REPORT_STATUS_CODE_EX ( - EFI_ERROR_CODE | EFI_ERROR_MINOR, - (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED)= , - 0, - NULL, - NULL, - &Status, - sizeof (EFI_STATUS) - ); + BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED, Status); =20 } =20 PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) OptionNum= ber); =20 --=20 2.19.1.3.g30247aa5d201 ------------------------------ Message: 13 Date: Thu, 21 Feb 2019 11:41:09 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Cc: Anthony Perard , Ard Biesheuvel =09, Jordan Justen =09, Julien Grall , =09Ray Ni Subject: [edk2] [PATCH v3 2/5] OvmfPkg: add library to track boot =09option loading/starting on the console Message-ID: <20190221104112.14995-3-lersek@redhat.com> Introduce the Platform Boot Manager Print Status Code Library (for short,= PlatformBmPrintScLib) class for catching and printing the LoadImage() / StartImage() preparations, and return statuses, that are reported by UefiBootManagerLib. In the primary library instance, catch only such status codes that UefiBootManagerLib reports from the same module that contains PlatformBmPrintScLib. The intent is to establish a reporting-printing channel within BdsDxe, between UefiBootManagerLib and PlatformBmPrintScLib. Ignore status codes originating elsewhence, e.g. from UiApp's copy of UefiBootManagerLib. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Cc: Ray Ni Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1515418 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- Notes: =20 v3: =20 =20 =20 - Refresh leading comment on HandleStatusCode(): the highest permit= ted =20 TPL is TPL_CALLBACK. No code change. =20 =20 =20 - pick up Ard's R-b =20 =20 =20 v2: =20 =20 =20 - Split the status code handling to a separate library, so that it'= s =20 easy to reuse in ArmVirtPkg. =20 =20 =20 - Rework the logic based on =20 and =20 , and follow R= ay's =20 advice in =20 : =20 =20 =20 - The boot option details are fetched via BootCurrent. =20 =20 =20 - For reporting LoadImage() and StartImage() preparations, replac= e the =20 originally proposed PcdDebugCodeOsLoaderDetail status code with= =20the =20 existent (edk2-specific) PcdProgressCodeOsLoaderLoad and =20 PcdProgressCodeOsLoaderStart status codes. =20 =20 =20 - For reporting LoadImage() and StartImage() return values, repla= ce =20 the originally proposed PcdDebugCodeOsLoaderDetail status code = with =20 the standard EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR and =20 EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED status codes. =20 =20 =20 - For all four kinds of reports, replace the originally proposed = "OS =20 Loader Detail" structure (and GUID) with the recently standardi= zed =20 EFI_RETURN_STATUS_EXTENDED_DATA structure. =20OvmfPkg/OvmfPkg.dec | 5 + =20OvmfPkg/OvmfPkgIa32.dsc | 1 + =20OvmfPkg/OvmfPkgIa32X64.dsc | 1 + =20OvmfPkg/OvmfPkgX64.dsc | 1 + =20OvmfPkg/Include/Library/PlatformBmPrintScLib.h | 41 ++= + =20OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf | 66 ++= +++ =20OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c | 310 ++= ++++++++++++++++++ =207 files changed, 425 insertions(+) diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 7666297cf8f1..e50c6179a249 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -45,6 +45,11 @@ [LibraryClasses] =20 # access. =20 PciCapPciSegmentLib|Include/Library/PciCapPciSegmentLib.h =20 + ## @libraryclass Register a status code handler for printing the Boo= t + # Manager's LoadImage() and StartImage() preparations= , and + # return codes, to the UEFI console. + PlatformBmPrintScLib|Include/Library/PlatformBmPrintScLib.h + =20 ## @libraryclass Access QEMU's firmware configuration interface =20 # =20 QemuFwCfgLib|Include/Library/QemuFwCfgLib.h diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index f9216af479f4..5b885590b275 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -348,6 +348,7 @@ [LibraryClasses.common.DXE_DRIVER] =20 UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf =20 DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf =20 PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/Platfo= rmBootManagerLib.inf + PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPr= intScLib.inf =20 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.i= nf =20 CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Dxe= CpuExceptionHandlerLib.inf =20!if $(SMM_REQUIRE) =3D=3D TRUE diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 1e470de74434..bbf0853ee6b9 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -353,6 +353,7 @@ [LibraryClasses.common.DXE_DRIVER] =20 UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf =20 DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf =20 PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/Platfo= rmBootManagerLib.inf + PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPr= intScLib.inf =20 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.i= nf =20 CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Dxe= CpuExceptionHandlerLib.inf =20!if $(SMM_REQUIRE) =3D=3D TRUE diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index e4929d8cf4a8..d81460f52041 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -353,6 +353,7 @@ [LibraryClasses.common.DXE_DRIVER] =20 UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf =20 DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf =20 PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/Platfo= rmBootManagerLib.inf + PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPr= intScLib.inf =20 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.i= nf =20 CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Dxe= CpuExceptionHandlerLib.inf =20!if $(SMM_REQUIRE) =3D=3D TRUE diff --git a/OvmfPkg/Include/Library/PlatformBmPrintScLib.h b/OvmfPkg/Inc= lude/Library/PlatformBmPrintScLib.h new file mode 100644 index 000000000000..1777f9d7c947 --- /dev/null +++ b/OvmfPkg/Include/Library/PlatformBmPrintScLib.h @@ -0,0 +1,41 @@ +/** @file + Register a status code handler for printing the Boot Manager's LoadIma= ge() + and StartImage() preparations, and return codes, to the UEFI console. + + This feature enables users that are not accustomed to analyzing the fi= rmware + log to glean some information about UEFI boot option processing (loadi= ng and + starting). + + Copyright (C) 2019, Red Hat, Inc. + + This program and the accompanying materials are licensed and made avai= lable + under the terms and conditions of the BSD License which accompanies th= is + 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. +**/ + +#ifndef __PLATFORM_BM_PRINT_SC_LIB__ +#define __PLATFORM_BM_PRINT_SC_LIB__ + +#include + +/** + Register a status code handler for printing the Boot Manager's LoadIma= ge() + and StartImage() preparations, and return codes, to the UEFI console. + + @retval EFI_SUCCESS The status code handler has been successfully + registered. + + @return Error codes propagated from boot services and fro= m + EFI_RSC_HANDLER_PROTOCOL. +**/ +EFI_STATUS +EFIAPI +PlatformBmPrintScRegisterHandler ( + VOID + ); + +#endif // __PLATFORM_BM_PRINT_SC_LIB__ diff --git a/OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.in= f b/OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf new file mode 100644 index 000000000000..8f02e0b48236 --- /dev/null +++ b/OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf @@ -0,0 +1,66 @@ +## @file +# Register a status code handler for printing the Boot Manager's LoadIma= ge() +# and StartImage() preparations, and return codes, to the UEFI console. +# +# This feature enables users that are not accustomed to analyzing the fi= rmware +# log to glean some information about UEFI boot option processing (loadi= ng and +# starting). +# +# This library instance filters out (ignores) status codes that are not +# reported by the containing firmware module. The intent is to link this= +# library instance into BdsDxe via PlatformBootManagerLib (which BdsDxe = depends +# upon), then catch only those status codes that BdsDxe reports (which h= appens +# via UefiBootManagerLib). Status codes reported by other modules (such = as +# UiApp), via UefiBootManagerLib or otherwise, are meant to be ignored. +# +# Copyright (C) 2019, Red Hat, Inc. +# +# This program and the accompanying materials are licensed and made avai= lable +# under the terms and conditions of the BSD License which accompanies th= is +# 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] + INF_VERSION =3D 1.27 + BASE_NAME =3D PlatformBmPrintScLib + FILE_GUID =3D 3417c705-903e-41a7-9485-3fafebf60917 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D PlatformBmPrintScLib|DXE_DRIVER + +[Sources] + StatusCodeHandler.c + +[Packages] + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + +[LibraryClasses] + BaseMemoryLib + DebugLib + DevicePathLib + MemoryAllocationLib + PcdLib + PrintLib + UefiBootManagerLib + UefiBootServicesTableLib + UefiLib + UefiRuntimeServicesTableLib + +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderLoad ## CONSUME= S + gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderStart ## CONSUME= S + +[Protocols] + gEfiRscHandlerProtocolGuid ## CONSUME= S + +[Guids] + gEfiGlobalVariableGuid ## CONSUME= S + gEfiStatusCodeSpecificDataGuid ## CONSUME= S + +[Depex.common.DXE_DRIVER] + gEfiRscHandlerProtocolGuid AND gEfiVariableArchProtocolGuid diff --git a/OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c b/O= vmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c new file mode 100644 index 000000000000..3afe9d9690c7 --- /dev/null +++ b/OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c @@ -0,0 +1,310 @@ +/** @file + Register a status code handler for printing the Boot Manager's LoadIma= ge() + and StartImage() preparations, and return codes, to the UEFI console. + + This feature enables users that are not accustomed to analyzing the fi= rmware + log to glean some information about UEFI boot option processing (loadi= ng and + starting). + + This library instance filters out (ignores) status codes that are not + reported by the containing firmware module. The intent is to link this= + library instance into BdsDxe via PlatformBootManagerLib (which BdsDxe = depends + upon), then catch only those status codes that BdsDxe reports (which h= appens + via UefiBootManagerLib). Status codes reported by other modules (such = as + UiApp), via UefiBootManagerLib or otherwise, are meant to be ignored. + + Copyright (C) 2019, Red Hat, Inc. + + This program and the accompanying materials are licensed and made avai= lable + under the terms and conditions of the BSD License which accompanies th= is + 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. +**/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + + +// +// Convenience variables for the status codes that are relevant for Load= Image() +// and StartImage() preparations and return codes. +// +STATIC EFI_STATUS_CODE_VALUE mLoadPrep; +STATIC EFI_STATUS_CODE_VALUE mLoadFail; +STATIC EFI_STATUS_CODE_VALUE mStartPrep; +STATIC EFI_STATUS_CODE_VALUE mStartFail; + + +/** + Handle status codes reported through ReportStatusCodeLib / + EFI_STATUS_CODE_PROTOCOL.ReportStatusCode(). Format matching status co= des to + the system console. + + The highest TPL at which this handler can be registered with + EFI_RSC_HANDLER_PROTOCOL.Register() is TPL_CALLBACK. That's because + HandleStatusCode() uses the UEFI variable services. + + The parameter list of this function precisely matches that of + EFI_STATUS_CODE_PROTOCOL.ReportStatusCode(). + + The return status of this function is ignored by the caller, but the f= unction + still returns sensible codes: + + @retval EFI_SUCCESS The status code has been processed; = either + as a no-op, due to filtering, or by + formatting it to the system console.= + + @retval EFI_INVALID_PARAMETER Unknown or malformed contents have b= een + detected in Data. + + @retval EFI_INCOMPATIBLE_VERSION Unexpected UEFI variable behavior ha= s been + encountered. + + @return Error codes propagated from underlyi= ng + services. +**/ +STATIC +EFI_STATUS +EFIAPI +HandleStatusCode ( + IN EFI_STATUS_CODE_TYPE CodeType, + IN EFI_STATUS_CODE_VALUE Value, + IN UINT32 Instance, + IN EFI_GUID *CallerId, + IN EFI_STATUS_CODE_DATA *Data + ) +{ + UINTN VariableSize; + UINT16 BootCurrent; + EFI_STATUS Status; + CHAR16 BootOptionName[ARRAY_SIZE (L"Boot####")];= + EFI_BOOT_MANAGER_LOAD_OPTION BmBootOption; + BOOLEAN DevPathStringIsDynamic; + CHAR16 *DevPathString; + + // + // Ignore all status codes that are irrelevant for LoadImage() and + // StartImage() preparations and return codes. + // + if (Value !=3D mLoadPrep && Value !=3D mLoadFail && + Value !=3D mStartPrep && Value !=3D mStartFail) { + return EFI_SUCCESS; + } + // + // Ignore status codes that are not reported by the same containing mo= dule. + // + if (!CompareGuid (CallerId, &gEfiCallerIdGuid)) { + return EFI_SUCCESS; + } + + // + // Sanity-check Data in case of failure reports. + // + if ((Value =3D=3D mLoadFail || Value =3D=3D mStartFail) && + (Data =3D=3D NULL || + Data->HeaderSize !=3D sizeof *Data || + Data->Size !=3D sizeof (EFI_RETURN_STATUS_EXTENDED_DATA) - sizeof= =20*Data || + !CompareGuid (&Data->Type, &gEfiStatusCodeSpecificDataGuid))) { + DEBUG ((DEBUG_ERROR, "%a:%a: malformed Data\n", gEfiCallerBaseName, + __FUNCTION__)); + return EFI_INVALID_PARAMETER; + } + + // + // Get the number of the Boot#### option that the status code applies = to. + // + VariableSize =3D sizeof BootCurrent; + Status =3D gRT->GetVariable (EFI_BOOT_CURRENT_VARIABLE_NAME, + &gEfiGlobalVariableGuid, NULL /* Attributes */, + &VariableSize, &BootCurrent); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a:%a: failed to get %g:\"%s\": %r\n", + gEfiCallerBaseName, __FUNCTION__, &gEfiGlobalVariableGuid, + EFI_BOOT_CURRENT_VARIABLE_NAME, Status)); + return Status; + } + if (VariableSize !=3D sizeof BootCurrent) { + DEBUG ((DEBUG_ERROR, "%a:%a: got %Lu bytes for %g:\"%s\", expected %= Lu\n", + gEfiCallerBaseName, __FUNCTION__, (UINT64)VariableSize, + &gEfiGlobalVariableGuid, EFI_BOOT_CURRENT_VARIABLE_NAME, + (UINT64)sizeof BootCurrent)); + return EFI_INCOMPATIBLE_VERSION; + } + + // + // Get the Boot#### option that the status code applies to. + // + UnicodeSPrint (BootOptionName, sizeof BootOptionName, L"Boot%04x", + BootCurrent); + Status =3D EfiBootManagerVariableToLoadOption (BootOptionName, &BmBoot= Option); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, + "%a:%a: EfiBootManagerVariableToLoadOption(\"%s\"): %r\n", + gEfiCallerBaseName, __FUNCTION__, BootOptionName, Status)); + return Status; + } + + // + // Format the device path. + // + DevPathStringIsDynamic =3D TRUE; + DevPathString =3D ConvertDevicePathToText ( + BmBootOption.FilePath, + FALSE, // DisplayOnly + FALSE // AllowShortcuts + ); + if (DevPathString =3D=3D NULL) { + DevPathStringIsDynamic =3D FALSE; + DevPathString =3D L""; + } + + // + // Print the message to the console. + // + if (Value =3D=3D mLoadPrep || Value =3D=3D mStartPrep) { + Print ( + L"%a: %a %s \"%s\" from %s\n", + gEfiCallerBaseName, + Value =3D=3D mLoadPrep ? "loading" : "starting", + BootOptionName, + BmBootOption.Description, + DevPathString + ); + } else { + Print ( + L"%a: failed to %a %s \"%s\" from %s: %r\n", + gEfiCallerBaseName, + Value =3D=3D mLoadFail ? "load" : "start", + BootOptionName, + BmBootOption.Description, + DevPathString, + ((EFI_RETURN_STATUS_EXTENDED_DATA *)Data)->ReturnStatus + ); + } + + // + // Done. + // + if (DevPathStringIsDynamic) { + FreePool (DevPathString); + } + EfiBootManagerFreeLoadOption (&BmBootOption); + return EFI_SUCCESS; +} + + +/** + Unregister HandleStatusCode() at ExitBootServices(). + + (See EFI_RSC_HANDLER_PROTOCOL in Volume 3 of the Platform Init spec.) + + @param[in] Event Event whose notification function is being invoked= . + + @param[in] Context Pointer to EFI_RSC_HANDLER_PROTOCOL, originally lo= oked up + when HandleStatusCode() was registered. +**/ +STATIC +VOID +EFIAPI +UnregisterAtExitBootServices ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + EFI_RSC_HANDLER_PROTOCOL *StatusCodeRouter; + + StatusCodeRouter =3D Context; + StatusCodeRouter->Unregister (HandleStatusCode); +} + + +/** + Register a status code handler for printing the Boot Manager's LoadIma= ge() + and StartImage() preparations, and return codes, to the UEFI console. + + @retval EFI_SUCCESS The status code handler has been successfully + registered. + + @return Error codes propagated from boot services and fro= m + EFI_RSC_HANDLER_PROTOCOL. +**/ +EFI_STATUS +EFIAPI +PlatformBmPrintScRegisterHandler ( + VOID + ) +{ + EFI_STATUS Status; + EFI_RSC_HANDLER_PROTOCOL *StatusCodeRouter; + EFI_EVENT ExitBootEvent; + + Status =3D gBS->LocateProtocol (&gEfiRscHandlerProtocolGuid, + NULL /* Registration */, (VOID **)&StatusCodeRouter); + ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status)) { + return Status; + } + + // + // Set the EFI_STATUS_CODE_VALUE convenience variables. + // + mLoadPrep =3D PcdGet32 (PcdProgressCodeOsLoaderLoad); + mLoadFail =3D (EFI_SOFTWARE_DXE_BS_DRIVER | + EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR); + mStartPrep =3D PcdGet32 (PcdProgressCodeOsLoaderStart); + mStartFail =3D (EFI_SOFTWARE_DXE_BS_DRIVER | + EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED); + + // + // Register the handler callback. + // + Status =3D StatusCodeRouter->Register (HandleStatusCode, TPL_CALLBACK)= ; + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a:%a: failed to register status code handler:= =20%r\n", + gEfiCallerBaseName, __FUNCTION__, Status)); + return Status; + } + + // + // Status code reporting and routing/handling extend into OS runtime. = Since + // we don't want our handler to survive the BDS phase, we have to unre= gister + // the callback at ExitBootServices(). (See EFI_RSC_HANDLER_PROTOCOL i= n + // Volume 3 of the Platform Init spec.) + // + Status =3D gBS->CreateEvent ( + EVT_SIGNAL_EXIT_BOOT_SERVICES, // Type + TPL_CALLBACK, // NotifyTpl + UnregisterAtExitBootServices, // NotifyFunction + StatusCodeRouter, // NotifyContext + &ExitBootEvent // Event + ); + if (EFI_ERROR (Status)) { + // + // We have to unregister the callback right now, and fail the functi= on. + // + DEBUG ((DEBUG_ERROR, "%a:%a: failed to create ExitBootServices() eve= nt: " + "%r\n", gEfiCallerBaseName, __FUNCTION__, Status)); + StatusCodeRouter->Unregister (HandleStatusCode); + return Status; + } + + return EFI_SUCCESS; +} --=20 2.19.1.3.g30247aa5d201 ------------------------------ Message: 14 Date: Thu, 21 Feb 2019 11:41:10 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Cc: Anthony Perard , Ard Biesheuvel =09, Jordan Justen =09, Julien Grall , =09Ray Ni Subject: [edk2] [PATCH v3 3/5] OvmfPkg/PlatformBootManagerLib: display =09boot option loading/starting Message-ID: <20190221104112.14995-4-lersek@redhat.com> Consume PlatformBmPrintScLib, added earlier in this series. When BdsDxe+UefiBootManagerLib report LoadImage() / StartImage() preparations and return statuses, print the reports to the UEFI console. This allows end-users better visibility into the boot process. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Cc: Ray Ni Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1515418 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- Notes: =20 v3: =20 - pick up Ard's R-b =20 =20 =20 v2: =20 =20 =20 - Split the OvmfPkg/PlatformBootManagerLib change to a separate pat= ch. =20 =20 =20 - Drop general messages from PlatformBootManagerAfterConsole(), whi= ch =20 would report calls of EfiBootManagerRefreshAllBootOption(), =20 RemoveStaleFvFileOptions(), and SetBootOrderFromQemu(). Those mes= sages =20 weren't really helpful for diagnosing boot problems. =20OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 = + =20OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 3 = +++ =202 files changed, 4 insertions(+) diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLi= b.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf= index 5d9b53bf2d1e..c41aaeef3fc3 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -58,6 +58,7 @@ [LibraryClasses] =20 QemuBootOrderLib =20 ReportStatusCodeLib =20 UefiLib + PlatformBmPrintScLib =20 Tcg2PhysicalPresenceLib =20 =20[Pcd] diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfP= kg/Library/PlatformBootManagerLib/BdsPlatform.c index b2faa797c61b..12303fb0f1f3 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -16,6 +16,7 @@ =20#include =20#include =20#include +#include =20#include =20 =20 @@ -1542,6 +1543,8 @@ PlatformBootManagerAfterConsole ( =20 =20 RemoveStaleFvFileOptions (); =20 SetBootOrderFromQemu (); + + PlatformBmPrintScRegisterHandler (); =20} =20 =20/** --=20 2.19.1.3.g30247aa5d201 ------------------------------ Message: 15 Date: Thu, 21 Feb 2019 11:41:11 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Subject: [edk2] [PATCH v3 4/5] ArmVirtPkg/ArmVirtQemu*: enable minimal =09Status Code Routing in DXE Message-ID: <20190221104112.14995-5-lersek@redhat.com> The EFI_RETURN_STATUS_EXTENDED_DATA feature from PI-1.7 () enables platform co= de to learn about boot option failures (loading and launching) via status codes reported by the UEFI Boot Manager. In commit 59541d41633c, we removed all status code support from ArmVirtPkg. Reenable that support now, minimally, just to the extent so w= e can benefit from the PI-1.7 feature mentioned above: (1) Include the ReportStatusCodeRouterRuntimeDxe driver. =20 This driver produces two protocols, EFI_STATUS_CODE_PROTOCOL and =20 EFI_RSC_HANDLER_PROTOCOL. The former allows DXE phase modules and =20 runtime modules to report (produce) status codes. The latter allows= =20 the same types of modules to register callbacks for status code =20 handling (consumption). =20 (Handler registration occurs only at boot time. Status codes are =20 delivered to each handler at runtime as well, unless the handler is= =20 unregistered at ExitBootServices().) (2) Resolve ReportStatusCodeLib to a non-Null instance, for DXE_DRIVER =20 modules only. This way DXE_DRIVER modules that use the =20 REPORT_STATUS_CODE_EX() macro and friends will reach =20 EFI_STATUS_CODE_PROTOCOL from point (1). (3) Set PcdReportStatusCodePropertyMask to 3 (the default value is 0). =20 This causes the REPORT_STATUS_CODE_EX() macro and friends to let =20 Progress Codes (bit#0) and Error Codes (bit#1) through to point (1)= . =20 Debug Codes (bit#2) are filtered out. (4) Include no driver, for now, that registers any status code handler vi= a =20 EFI_RSC_HANDLER_PROTOCOL, from point (1). Status codes that reach =20 ReportStatusCodeRouterRuntimeDxe will be thrown away. (5) Modify only the ArmVirtQemu* platforms. A status code handler will =20 be added to "ArmVirtPkg/Library/PlatformBootManagerLib" in the next= =20patch, =20 and this library instance is not consumed by ArmVirtXen. Cc: Ard Biesheuvel Cc: Julien Grall Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1515418 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- Notes: =20 v3: =20 - pick up Ard's R-b =20 =20 =20 v2: =20 - new in v2 =20ArmVirtPkg/ArmVirtQemu.dsc | 10 ++++++++++ =20ArmVirtPkg/ArmVirtQemuKernel.dsc | 10 ++++++++++ =20ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 5 +++++ =203 files changed, 25 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 8cc31fda7a37..ec97d5a14b3a 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -69,6 +69,9 @@ [LibraryClasses.common] =20[LibraryClasses.common.PEIM] =20 ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemI= nfoPeiLib.inf =20 +[LibraryClasses.common.DXE_DRIVER] + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRep= ortStatusCodeLib.inf + =20[LibraryClasses.common.UEFI_DRIVER] =20 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf =20 @@ -155,6 +158,8 @@ [PcdsFixedAtBuild.common] =20 gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPoli= cy|0x04 =20!endif =20 + gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3 + =20[PcdsFixedAtBuild.AARCH64] =20 # Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entr= y point, =20 # if the entry point version is >=3D 3.0. AARCH64 OSes cannot assume= =20the @@ -304,6 +309,11 @@ [Components.common] =20 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf =20 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf =20 + # + # Status Code Routing + # + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusC= odeRouterRuntimeDxe.inf + =20 # =20 # Platform Driver =20 # diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKer= nel.dsc index c3e0c9bf2549..e8c065229b21 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -66,6 +66,9 @@ [LibraryClasses.common] =20 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibP= ci.inf =20 PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBr= idgeLib.inf =20 +[LibraryClasses.common.DXE_DRIVER] + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRep= ortStatusCodeLib.inf + =20[LibraryClasses.common.UEFI_DRIVER] =20 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf =20 @@ -149,6 +152,8 @@ [PcdsFixedAtBuild.common] =20 gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPoli= cy|0x04 =20!endif =20 + gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3 + =20[PcdsPatchableInModule.common] =20 # =20 # This will be overridden in the code @@ -288,6 +293,11 @@ [Components.common] =20 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf =20 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf =20 + # + # Status Code Routing + # + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusC= odeRouterRuntimeDxe.inf + =20 # =20 # Platform Driver =20 # diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQem= uFvMain.fdf.inc index dc6a0a2bcdc7..098d40b61b15 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -91,6 +91,11 @@ [FV.FvMain] =20 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishD= xe.inf =20 INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf =20 + # + # Status Code Routing + # + INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportSta= tusCodeRouterRuntimeDxe.inf + =20 # =20 # Platform Driver =20 # --=20 2.19.1.3.g30247aa5d201 ------------------------------ Message: 16 Date: Thu, 21 Feb 2019 11:41:12 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Subject: [edk2] [PATCH v3 5/5] ArmVirtPkg/PlatformBootManagerLib: =09display boot option loading/starting Message-ID: <20190221104112.14995-6-lersek@redhat.com> Consume PlatformBmPrintScLib, added earlier in this series. When BdsDxe+UefiBootManagerLib report LoadImage() / StartImage() preparations and return statuses, print the reports to the UEFI console. This allows end-users better visibility into the boot process. Cc: Ard Biesheuvel Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1515418 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- Notes: =20 v3: =20 - pick up Ard's R-b =20 =20 =20 v2: =20 - new in v2 =20ArmVirtPkg/ArmVirtQemu.dsc |= =201 + =20ArmVirtPkg/ArmVirtQemuKernel.dsc |= =201 + =20ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |= =201 + =20ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c |= =203 +++ =204 files changed, 6 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index ec97d5a14b3a..a77d71bcea36 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -58,6 +58,7 @@ [LibraryClasses.common] =20 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.= inf =20 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf =20 PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/Pla= tformBootManagerLib.inf + PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPr= intScLib.inf =20 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Custo= mizedDisplayLib.inf =20 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBuffer= BltLib.inf =20 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.i= nf diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKer= nel.dsc index e8c065229b21..1e5388ae708f 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -58,6 +58,7 @@ [LibraryClasses.common] =20 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.= inf =20 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf =20 PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/Pla= tformBootManagerLib.inf + PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPr= intScLib.inf =20 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Custo= mizedDisplayLib.inf =20 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBuffer= BltLib.inf =20 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.i= nf diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManage= rLib.inf b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerL= ib.inf index 0cbc82f5d27d..9a8a70379e67 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.in= f +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.in= f @@ -50,6 +50,7 @@ [LibraryClasses] =20 DevicePathLib =20 MemoryAllocationLib =20 PcdLib + PlatformBmPrintScLib =20 PrintLib =20 QemuBootOrderLib =20 QemuFwCfgLib diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/Arm= VirtPkg/Library/PlatformBootManagerLib/PlatformBm.c index 534357eff46b..0e8d7501fb1d 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -20,6 +20,7 @@ =20#include =20#include =20#include +#include =20#include =20#include =20#include @@ -833,6 +834,8 @@ PlatformBootManagerAfterConsole ( =20 =20 RemoveStaleFvFileOptions (); =20 SetBootOrderFromQemu (); + + PlatformBmPrintScRegisterHandler (); =20} =20 =20/** --=20 2.19.1.3.g30247aa5d201 ------------------------------ Message: 17 Date: Thu, 21 Feb 2019 13:28:02 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Cc: Andrew Fish , Anthony Perard =09, Ard Biesheuvel =09, Jordan Justen =09, Julien Grall , =09Leif Lindholm , Marc-Andr? Lureau =09, Michael D Kinney =09, Stefan Berger Subject: [edk2] [PATCH v2 0/2] Maintainers: updates for ArmVirtPkg and =09OvmfPkg Message-ID: <20190221122804.20314-1-lersek@redhat.com> Content-Type: text/plain; charset=3DUTF-8 Previous version: =20 [edk2] [PATCH] Maintainers: add TPM2 reviewers for OvmfPkg =20 https://lists.01.org/pipermail/edk2-devel/2019-February/036495.html Patch #1 in v2 is an iteration of the above. Patch #2 in v2 is new. Cc: Andrew Fish Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Cc: Leif Lindholm Cc: Marc-Andr? Lureau Cc: Michael D Kinney Cc: Stefan Berger Thanks, Laszlo Laszlo Ersek (2): =20 Maintainers: add TPM2 reviewers for OvmfPkg =20 Maintainers: specify the scope for OvmfPkg/ArmVirtPkg Xen module =20 reviewers =20Maintainers.txt | 7 +++++++ =201 file changed, 7 insertions(+) --=20 2.19.1.3.g30247aa5d201 ------------------------------ Message: 18 Date: Thu, 21 Feb 2019 13:28:03 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Cc: Andrew Fish , Ard Biesheuvel =09, Jordan Justen =09, Leif Lindholm ,= =09Marc-Andr? Lureau , Michael D Kinney =09, Stefan Berger Subject: [edk2] [PATCH v2 1/2] Maintainers: add TPM2 reviewers for =09OvmfPkg Message-ID: <20190221122804.20314-2-lersek@redhat.com> Content-Type: text/plain; charset=3DUTF-8 OVMF can be built with a significant amount of TPM2 code now; add Marc-Andr? and Stefan as Reviewers for TPM2-related patches. Keep the list of "R" entries alphabetically sorted. Cc: Andrew Fish Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Leif Lindholm Cc: Marc-Andr? Lureau Cc: Michael D Kinney Cc: Stefan Berger Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Leif Lindholm Reviewed-by: Stefan Berger Acked-by: Ard Biesheuvel Acked-by: Jordan Justen --- Notes: =20 v2: =20 - pick up feedback tags =20 - describe the Reviewership scope, in the format seen under MdeModu= lePkg =20 [Marc-Andr?] =20Maintainers.txt | 4 ++++ =201 file changed, 4 insertions(+) diff --git a/Maintainers.txt b/Maintainers.txt index 3b2676bc32ea..e45b77039d67 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -218,6 +218,10 @@ M: Laszlo Ersek =20M: Ard Biesheuvel =20R: Anthony Perard =20R: Julien Grall +R: Marc-Andr? Lureau + (TPM2 modules) +R: Stefan Berger + (TPM2 modules) =20S: Maintained =20 =20PcAtChipsetPkg --=20 2.19.1.3.g30247aa5d201 ------------------------------ Message: 19 Date: Thu, 21 Feb 2019 13:28:04 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Cc: Andrew Fish , Anthony Perard =09, Ard Biesheuvel =09, Jordan Justen =09, Julien Grall , =09Leif Lindholm , Michael D Kinney =09 Subject: [edk2] [PATCH v2 2/2] Maintainers: specify the scope for =09OvmfPkg/ArmVirtPkg Xen module reviewers Message-ID: <20190221122804.20314-3-lersek@redhat.com> Content-Type: text/plain; charset=3DUTF-8 We can use the format introduced under MdeModulePkg to clarify the reviewership scopes a little. This should decrease the review spam that Xen reviewers get. Cc: Andrew Fish Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Cc: Leif Lindholm Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- Notes: =20 v2: =20 - new in v2 =20Maintainers.txt | 3 +++ =201 file changed, 3 insertions(+) diff --git a/Maintainers.txt b/Maintainers.txt index e45b77039d67..86f80b7d38a0 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -81,6 +81,7 @@ W: https://github.com/tianocore/tianocore.github.io/wik= i/ArmVirtPkg =20M: Laszlo Ersek =20M: Ard Biesheuvel =20R: Julien Grall + (Xen modules) =20 =20BaseTools =20W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools @@ -217,7 +218,9 @@ M: Jordan Justen =20M: Laszlo Ersek =20M: Ard Biesheuvel =20R: Anthony Perard + (Xen modules) =20R: Julien Grall + (Xen modules) =20R: Marc-Andr? Lureau =20 (TPM2 modules) =20R: Stefan Berger --=20 2.19.1.3.g30247aa5d201 ------------------------------ Message: 20 Date: Thu, 21 Feb 2019 13:30:09 +0100 From: Ard Biesheuvel To: Laszlo Ersek Cc: "edk2-devel@lists.01.org" , Andrew Fish =09, Anthony Perard , Jordan =09Justen , Julien Grall =09, Leif Lindholm , =09Marc-Andr? Lureau , Michael D Kinney =09, Stefan Berger Subject: Re: [edk2] [PATCH v2 0/2] Maintainers: updates for ArmVirtPkg =09and OvmfPkg Message-ID: =09 Content-Type: text/plain; charset=3D"UTF-8" On Thu, 21 Feb 2019 at 13:28, Laszlo Ersek wrote: > > Previous version: > [edk2] [PATCH] Maintainers: add TPM2 reviewers for OvmfPkg > https://lists.01.org/pipermail/edk2-devel/2019-February/036495.html > > Patch #1 in v2 is an iteration of the above. Patch #2 in v2 is new. > > Cc: Andrew Fish > Cc: Anthony Perard > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Julien Grall > Cc: Leif Lindholm > Cc: Marc-Andr? Lureau > Cc: Michael D Kinney > Cc: Stefan Berger > > Thanks, > Laszlo > > Laszlo Ersek (2): > Maintainers: add TPM2 reviewers for OvmfPkg > Maintainers: specify the scope for OvmfPkg/ArmVirtPkg Xen module > reviewers > Acked-by: Ard Biesheuvel =20 (for the series) ------------------------------ Message: 21 Date: Thu, 21 Feb 2019 12:32:36 +0000 From: Anthony PERARD To: Laszlo Ersek Cc: , Andrew Fish , Ard =09Biesheuvel , Jordan Justen =09, Julien Grall , =09Leif Lindholm , Michael D Kinney =09 Subject: Re: [edk2] [PATCH v2 2/2] Maintainers: specify the scope for =09OvmfPkg/ArmVirtPkg Xen module reviewers Message-ID: <20190221123236.GD1349@perard.uk.xensource.com> Content-Type: text/plain; charset=3D"iso-8859-1" On Thu, Feb 21, 2019 at 01:28:04PM +0100, Laszlo Ersek wrote: > We can use the format introduced under MdeModulePkg to clarify the > reviewership scopes a little. This should decrease the review spam that= > Xen reviewers get. >=20 > Cc: Andrew Fish > Cc: Anthony Perard > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Julien Grall > Cc: Leif Lindholm > Cc: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Laszlo Ersek > --- >=20 > Notes: > v2: > - new in v2 >=20 > Maintainers.txt | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/Maintainers.txt b/Maintainers.txt > index e45b77039d67..86f80b7d38a0 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -81,6 +81,7 @@ W: https://github.com/tianocore/tianocore.github.io/w= iki/ArmVirtPkg > M: Laszlo Ersek > M: Ard Biesheuvel > R: Julien Grall > + (Xen modules) > =20 > BaseTools > W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools > @@ -217,7 +218,9 @@ M: Jordan Justen > M: Laszlo Ersek > M: Ard Biesheuvel > R: Anthony Perard > + (Xen modules) > R: Julien Grall > + (Xen modules) > R: Marc-Andr? Lureau > (TPM2 modules) > R: Stefan Berger Acked-by: Anthony PERARD Thanks, --=20 Anthony PERARD ------------------------------ Message: 22 Date: Thu, 21 Feb 2019 22:37:31 +0800 From: "Feng, Bob C" To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao Subject: [edk2] [Patch V2] BaseTools: Correct the value assignment for =09StructurePcd Message-ID: <20190221143731.12732-1-bob.c.feng@intel.com> This patch is to fix the code bug in StructurePcd overall value assignment logic. If a Pcd Array size is fixed but the size of actual value in Dsc or Dec is bigger than the Pcd array size, the tool will report error about such setting and stop build. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- =20BaseTools/Source/Python/Common/Misc.py | 1 + =20.../Python/Workspace/BuildClassObject.py | 78 ++++--- =20.../Source/Python/Workspace/DecBuildData.py | 2 +- =20.../Source/Python/Workspace/DscBuildData.py | 211 ++++++++++++++----= =204 files changed, 218 insertions(+), 74 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Py= thon/Common/Misc.py index c7daf5417c..526aa2dd54 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -40,10 +40,11 @@ from Common.Parsing import GetSplitValueList =20from Common.LongFilePathSupport import OpenLongFilePath as open =20from Common.MultipleWorkspace import MultipleWorkspace as mws =20from CommonDataClass.Exceptions import BadExpression =20from Common.caching import cached_property =20 +ArrayIndex =3D re.compile("\[\s*[0-9a-fA-FxX]*\s*\]") =20## Regular expression used to find out place holders in string templat= e =20gPlaceholderPattern =3D re.compile("\$\{([^$()\s]+)\}", re.MULTILINE |= =20re.UNICODE) =20 =20## regular expressions for map file processing =20startPatternGeneral =3D re.compile("^Start[' ']+Length[' ']+Name[' ']+= Class") diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/Base= Tools/Source/Python/Workspace/BuildClassObject.py index b82af49236..b50e250cfb 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -14,14 +14,16 @@ =20from collections import OrderedDict, namedtuple =20from Common.DataType import * =20import collections =20import re =20from collections import OrderedDict -from Common.Misc import CopyDict +from Common.Misc import CopyDict,ArrayIndex =20import copy +import Common.EdkLogger as EdkLogger +from Common.BuildToolError import OPTION_VALUE_INVALID =20StructPattern =3D re.compile(r'[_a-zA-Z][0-9A-Za-z_\[\]]*$') -ArrayIndex =3D re.compile("\[\s*[0-9a-fA-FxX]*\s*\]") + =20## PcdClassObject =20# =20# This Class is used for PcdObject =20# =20# @param object: Inherited from object class @@ -66,44 +68,62 @@ class PcdClassObject(object): =20 self.validateranges =3D validateranges if validateranges is no= t None else [] =20 self.validlists =3D validlists if validlists is not None else = [] =20 self.expressions =3D expressions if expressions is not None el= se [] =20 self.DscDefaultValue =3D None =20 self.DscRawValue =3D {} + self.DscRawValueInfo =3D {} =20 if IsDsc: =20 self.DscDefaultValue =3D Value =20 self.PcdValueFromComm =3D "" =20 self.PcdValueFromFdf =3D "" =20 self.CustomAttribute =3D {} =20 self.UserDefinedDefaultStoresFlag =3D UserDefinedDefaultStores= Flag =20 self._Capacity =3D None =20 =20 @property =20 def Capacity(self): - self._Capacity =3D [] - dimension =3D ArrayIndex.findall(self._DatumType) - for item in dimension: - maxsize =3D item.lstrip("[").rstrip("]").strip() - if not maxsize: - maxsize =3D "-1" - maxsize =3D str(int(maxsize,16)) if maxsize.startswith(("0x"= ,"0X")) else maxsize - self._Capacity.append(maxsize) - if hasattr(self, "SkuOverrideValues"): - for sku in self.SkuOverrideValues: - for defaultstore in self.SkuOverrideValues[sku]: - fields =3D self.SkuOverrideValues[sku][defaultstore]= - for demesionattr in fields: - deme =3D ArrayIndex.findall(demesionattr) - for i in range(len(deme)-1): - if int(deme[i].lstrip("[").rstrip("]").strip= ()) > int(self._Capacity[i]): - print ("error") - if hasattr(self,"DefaultValues"): - for demesionattr in self.DefaultValues: - deme =3D ArrayIndex.findall(demesionattr) - for i in range(len(deme)-1): - if int(deme[i].lstrip("[").rstrip("]").strip()) > in= t(self._Capacity[i]): - print ("error") + if self._Capacity is None: + self._Capacity =3D [] + dimension =3D ArrayIndex.findall(self._DatumType) + for item in dimension: + maxsize =3D item.lstrip("[").rstrip("]").strip() + if not maxsize: + maxsize =3D "-1" + maxsize =3D str(int(maxsize,16)) if maxsize.startswith((= "0x","0X")) else maxsize + self._Capacity.append(maxsize) + if hasattr(self, "SkuOverrideValues"): + for sku in self.SkuOverrideValues: + for defaultstore in self.SkuOverrideValues[sku]: + fields =3D self.SkuOverrideValues[sku][defaultst= ore] + for demesionattr in fields: + fieldinfo =3D fields[demesionattr] + deme =3D ArrayIndex.findall(demesionattr) + for i in range(len(deme)): + if int(deme[i].lstrip("[").rstrip("]").s= trip()) >=3D int(self._Capacity[i]): + if self._Capacity[i] !=3D "-1": + firstfieldinfo =3D list(fieldinf= o.values())[0] + EdkLogger.error('Build', OPTION_= VALUE_INVALID, "For Pcd %s, Array Index exceed the Array size. From %s Li= ne %s \n " % + (".".join((self.TokenSpaceGuidCName,= =20self.TokenCName)), firstfieldinfo[1],firstfieldinfo[2] )) + if hasattr(self,"DefaultValues"): + for demesionattr in self.DefaultValues: + fieldinfo =3D self.DefaultValues[demesionattr] + deme =3D ArrayIndex.findall(demesionattr) + for i in range(len(deme)): + if int(deme[i].lstrip("[").rstrip("]").strip()) = >=3D int(self._Capacity[i]): + if self._Capacity[i] !=3D "-1": + firstfieldinfo =3D list(fieldinfo.values= ())[0] + EdkLogger.error('Build', OPTION_VALUE_IN= VALID, "For Pcd %s, Array Index exceed the Array size. From %s Line %s \n= =20" % + (".".join((self.TokenSpaceGuidCName,= =20self.TokenCName)), firstfieldinfo[1],firstfieldinfo[2] )) =20 return self._Capacity + + def PcdArraySize(self): + if self.Capacity[-1] =3D=3D "-1": + return -1 + size =3D 1 + for de in self.Capacity: + size =3D size * int(de) + return size =20 @property =20 def DatumType(self): =20 return self._DatumType =20 =20 @DatumType.setter @@ -231,10 +251,11 @@ class PcdClassObject(object): =20 new_pcd.IsFromDsc =3D self.IsFromDsc =20 new_pcd.PcdValueFromComm =3D self.PcdValueFromComm =20 new_pcd.PcdValueFromFdf =3D self.PcdValueFromFdf =20 new_pcd.UserDefinedDefaultStoresFlag =3D self.UserDefinedDefau= ltStoresFlag =20 new_pcd.DscRawValue =3D self.DscRawValue + new_pcd.DscRawValueInfo =3D self.DscRawValueInfo =20 new_pcd.CustomAttribute =3D self.CustomAttribute =20 new_pcd.validateranges =3D [item for item in self.validaterang= es] =20 new_pcd.validlists =3D [item for item in self.validlists] =20 new_pcd.expressions =3D [item for item in self.expressions] =20 new_pcd.SkuInfoList =3D {key: copy.deepcopy(skuobj) for key,sk= uobj in self.SkuInfoList.items()} @@ -266,10 +287,11 @@ class StructurePcd(PcdClassObject): =20 self.SkuOverrideValues =3D OrderedDict() =20 self.StructName =3D None =20 self.PcdDefineLineNo =3D 0 =20 self.PkgPath =3D "" =20 self.DefaultValueFromDec =3D "" + self.DefaultValueFromDecInfo =3D None =20 self.ValueChain =3D set() =20 self.PcdFieldValueFromComm =3D OrderedDict() =20 self.PcdFieldValueFromFdf =3D OrderedDict() =20 self.DefaultFromDSC=3DNone =20 def __repr__(self): @@ -281,12 +303,13 @@ class StructurePcd(PcdClassObject): =20 if FieldName in self.DefaultValues[DimensionAttr]: =20 del self.DefaultValues[DimensionAttr][FieldName] =20 self.DefaultValues[DimensionAttr][FieldName] =3D [Value.strip(= ), FileName, LineNo] =20 return self.DefaultValues[DimensionAttr][FieldName] =20 - def SetDecDefaultValue(self, DefaultValue): + def SetDecDefaultValue(self, DefaultValue,decpath=3DNone,lineno=3DNo= ne): =20 self.DefaultValueFromDec =3D DefaultValue + self.DefaultValueFromDecInfo =3D (decpath,lineno) =20 def AddOverrideValue (self, FieldName, Value, SkuName, DefaultStor= eName, FileName=3D"", LineNo=3D0, DimensionAttr =3D '-1'): =20 if SkuName not in self.SkuOverrideValues: =20 self.SkuOverrideValues[SkuName] =3D OrderedDict() =20 if DefaultStoreName not in self.SkuOverrideValues[SkuName]: =20 self.SkuOverrideValues[SkuName][DefaultStoreName] =3D Orde= redDict() @@ -317,20 +340,22 @@ class StructurePcd(PcdClassObject): =20 self.IsFromDsc =3D PcdObject.IsFromDsc if PcdObject.IsFromDsc = else self.IsFromDsc =20 self.validateranges =3D PcdObject.validateranges if PcdObject.= validateranges else self.validateranges =20 self.validlists =3D PcdObject.validlists if PcdObject.validlis= ts else self.validlists =20 self.expressions =3D PcdObject.expressions if PcdObject.expres= sions else self.expressions =20 self.DscRawValue =3D PcdObject.DscRawValue if PcdObject.DscRaw= Value else self.DscRawValue + self.DscRawValueInfo =3D PcdObject.DscRawValueInfo if PcdObject.= DscRawValueInfo else self.DscRawValueInfo =20 self.PcdValueFromComm =3D PcdObject.PcdValueFromComm if PcdObj= ect.PcdValueFromComm else self.PcdValueFromComm =20 self.PcdValueFromFdf =3D PcdObject.PcdValueFromFdf if PcdObjec= t.PcdValueFromFdf else self.PcdValueFromFdf =20 self.CustomAttribute =3D PcdObject.CustomAttribute if PcdObjec= t.CustomAttribute else self.CustomAttribute =20 self.UserDefinedDefaultStoresFlag =3D PcdObject.UserDefinedDef= aultStoresFlag if PcdObject.UserDefinedDefaultStoresFlag else self.UserDe= finedDefaultStoresFlag =20 if isinstance(PcdObject, StructurePcd): =20 self.StructuredPcdIncludeFile =3D PcdObject.StructuredPcdI= ncludeFile if PcdObject.StructuredPcdIncludeFile else self.StructuredPcdI= ncludeFile =20 self.PackageDecs =3D PcdObject.PackageDecs if PcdObject.Pa= ckageDecs else self.PackageDecs =20 self.DefaultValues =3D PcdObject.DefaultValues if PcdObjec= t.DefaultValues else self.DefaultValues =20 self.PcdMode =3D PcdObject.PcdMode if PcdObject.PcdMode el= se self.PcdMode =20 self.DefaultValueFromDec =3D PcdObject.DefaultValueFromDec= =20if PcdObject.DefaultValueFromDec else self.DefaultValueFromDec + self.DefaultValueFromDecInfo =3D PcdObject.DefaultValueFromD= ecInfo if PcdObject.DefaultValueFromDecInfo else self.DefaultValueFromDec= Info =20 self.SkuOverrideValues =3D PcdObject.SkuOverrideValues if = PcdObject.SkuOverrideValues else self.SkuOverrideValues =20 self.StructName =3D PcdObject.DatumType if PcdObject.Datum= Type else self.StructName =20 self.PcdDefineLineNo =3D PcdObject.PcdDefineLineNo if PcdO= bject.PcdDefineLineNo else self.PcdDefineLineNo =20 self.PkgPath =3D PcdObject.PkgPath if PcdObject.PkgPath el= se self.PkgPath =20 self.ValueChain =3D PcdObject.ValueChain if PcdObject.Valu= eChain else self.ValueChain @@ -340,10 +365,11 @@ class StructurePcd(PcdClassObject): =20 def __deepcopy__(self,memo): =20 new_pcd =3D StructurePcd() =20 self.sharedcopy(new_pcd) =20 =20 new_pcd.DefaultValueFromDec =3D self.DefaultValueFromDec + new_pcd.DefaultValueFromDecInfo =3D self.DefaultValueFromDecInfo= =20 new_pcd.PcdMode =3D self.PcdMode =20 new_pcd.StructName =3D self.DatumType =20 new_pcd.PcdDefineLineNo =3D self.PcdDefineLineNo =20 new_pcd.PkgPath =3D self.PkgPath =20 new_pcd.StructuredPcdIncludeFile =3D [item for item in self.St= ructuredPcdIncludeFile] diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTool= s/Source/Python/Workspace/DecBuildData.py index 149c057b70..ea0f816e27 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -399,11 +399,11 @@ class DecBuildData(PackageBuildClassObject): =20 struct_pcd.copy(item) =20 struct_pcd.TokenValue =3D struct_pcd.TokenValue.st= rip("{").strip() =20 struct_pcd.TokenSpaceGuidCName, struct_pcd.TokenCN= ame =3D pcdname.split(".") =20 struct_pcd.PcdDefineLineNo =3D LineNo =20 struct_pcd.PkgPath =3D self.MetaFile.File - struct_pcd.SetDecDefaultValue(item.DefaultValue) + struct_pcd.SetDecDefaultValue(item.DefaultValue,self= .MetaFile.File,LineNo) =20 else: =20 DemesionAttr, Fields =3D self.ParsePcdName(item.To= kenCName) =20 struct_pcd.AddDefaultValue(Fields, item.DefaultVal= ue, self.MetaFile.File, LineNo,DemesionAttr) =20 =20 struct_pcd.PackageDecs =3D dep_pkgs diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTool= s/Source/Python/Workspace/DscBuildData.py index 1ffefe6e7e..7b8c9eedf6 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -31,21 +31,20 @@ from .MetaDataTable import * =20from .MetaFileTable import * =20from .MetaFileParser import * =20 =20from .WorkspaceCommon import GetDeclaredPcd =20from Common.Misc import AnalyzeDscPcd -from Common.Misc import ProcessDuplicatedInf,RemoveCComments +from Common.Misc import ProcessDuplicatedInf,RemoveCComments,ArrayIndex =20import re =20from Common.Parsing import IsValidWord =20from Common.VariableAttributes import VariableAttributes =20import Common.GlobalData as GlobalData =20import subprocess =20from functools import reduce =20from Common.Misc import SaveFileOnChange =20from Workspace.BuildClassObject import PlatformBuildClassObject, Struc= turePcd, PcdClassObject, ModuleBuildClassObject =20from collections import OrderedDict, defaultdict -from .BuildClassObject import ArrayIndex =20 =20def _IsFieldValueAnArray (Value): =20 Value =3D Value.strip() =20 if Value.startswith(TAB_GUID) and Value.endswith(')'): =20 return True @@ -1681,21 +1680,21 @@ class DscBuildData(PlatformBuildClassObject): =20 File=3Dself.MetaFile, Line=3DDummy= 4) =20 if int(MaxDatumSize, 0) < 0: =20 EdkLogger.error('build', FORMAT_INVALID, "The size= =20value can't be set to negative value for %s." % ".".join((TokenSpaceGu= id, PcdCName)), =20 File=3Dself.MetaFile, Line=3DDummy= 4) =20 if (PcdCName, TokenSpaceGuid) in PcdValueDict: - PcdValueDict[PcdCName, TokenSpaceGuid][SkuName] =3D (Pcd= Value, DatumType, MaxDatumSize) + PcdValueDict[PcdCName, TokenSpaceGuid][SkuName] =3D (Pcd= Value, DatumType, MaxDatumSize,Dummy4) =20 else: - PcdValueDict[PcdCName, TokenSpaceGuid] =3D {SkuName:(Pcd= Value, DatumType, MaxDatumSize)} + PcdValueDict[PcdCName, TokenSpaceGuid] =3D {SkuName:(Pcd= Value, DatumType, MaxDatumSize,Dummy4)} =20 =20 for ((PcdCName, TokenSpaceGuid), PcdSetting) in PcdValueDict.i= tems(): =20 if self.SkuIdMgr.SystemSkuId in PcdSetting: - PcdValue, DatumType, MaxDatumSize =3D PcdSetting[self.Sk= uIdMgr.SystemSkuId] + PcdValue, DatumType, MaxDatumSize,_ =3D PcdSetting[self.= SkuIdMgr.SystemSkuId] =20 elif TAB_DEFAULT in PcdSetting: - PcdValue, DatumType, MaxDatumSize =3D PcdSetting[TAB_DEF= AULT] + PcdValue, DatumType, MaxDatumSize,_ =3D PcdSetting[TAB_= DEFAULT] =20 elif TAB_COMMON in PcdSetting: - PcdValue, DatumType, MaxDatumSize =3D PcdSetting[TAB_COM= MON] + PcdValue, DatumType, MaxDatumSize,_ =3D PcdSetting[TAB_= COMMON] =20 else: =20 PcdValue =3D None =20 DatumType =3D None =20 MaxDatumSize =3D None =20 @@ -1713,11 +1712,13 @@ class DscBuildData(PlatformBuildClassObject): =20 IsDsc=3DTrue) =20 for SkuName in PcdValueDict[PcdCName, TokenSpaceGuid]: =20 Settings =3D PcdValueDict[PcdCName, TokenSpaceGuid][Sk= uName] =20 if SkuName not in Pcds[PcdCName, TokenSpaceGuid].DscRa= wValue: =20 Pcds[PcdCName, TokenSpaceGuid].DscRawValue[SkuName= ] =3D {} + Pcds[PcdCName, TokenSpaceGuid].DscRawValueInfo[SkuNa= me] =3D {} =20 Pcds[PcdCName, TokenSpaceGuid].DscRawValue[SkuName][TA= B_DEFAULT_STORES_DEFAULT] =3D Settings[0] + Pcds[PcdCName, TokenSpaceGuid].DscRawValueInfo[SkuName][= TAB_DEFAULT_STORES_DEFAULT] =3D (self.MetaFile.File,Settings[3]) =20 return Pcds =20 =20 @staticmethod =20 def GetStructurePcdMaxSize(str_pcd): =20 pcd_default_value =3D str_pcd.DefaultValue @@ -1766,28 +1767,45 @@ class DscBuildData(PlatformBuildClassObject): =20 return Result =20 =20 def GenerateSizeFunction(self, Pcd): =20 CApp =3D "// Default Value in Dec \n" =20 CApp =3D CApp + "void Cal_%s_%s_Size(UINT32 *Size){\n" % (Pcd.= TokenSpaceGuidCName, Pcd.TokenCName) - if Pcd.IsArray(): + + if Pcd.IsArray() and Pcd.Capacity[-1] !=3D "-1": + CApp +=3D " *Size =3D (sizeof (%s) > *Size ? sizeof (%s) : = *Size);\n" % (Pcd.DatumType,Pcd.DatumType) + else: + if "{CODE(" in Pcd.DefaultValueFromDec: + CApp +=3D " *Size =3D (sizeof (%s_%s_INIT_Value) > *Siz= e ? sizeof (%s_%s_INIT_Value) : *Size);\n" % (Pcd.TokenSpaceGuidCName,Pcd= .TokenCName,Pcd.TokenSpaceGuidCName,Pcd.TokenCName) =20 if Pcd.Type in PCD_DYNAMIC_TYPE_SET | PCD_DYNAMIC_EX_TYPE_= SET: =20 for skuname in Pcd.SkuInfoList: =20 skuobj =3D Pcd.SkuInfoList[skuname] =20 if skuobj.VariableName: =20 for defaultstore in skuobj.DefaultStoreDict: =20 pcddef =3D self.GetPcdDscRawDefaultValue(P= cd,skuname,defaultstore) - if pcddef and "{CODE(" in pcddef: - CApp +=3D " *Size =3D (sizeof (%s_%s_%s= _%s_Value) > *Size ? sizeof (%s_%s_%s_%s_Value) : *Size);\n" % (Pcd.Token= SpaceGuidCName,Pcd.TokenCName,skuname,defaultstore,Pcd.TokenSpaceGuidCNam= e,Pcd.TokenCName,skuname,defaultstore) + if pcddef: + if "{CODE(" in pcddef: + CApp +=3D " *Size =3D (sizeof (%s_%= s_%s_%s_Value) > *Size ? sizeof (%s_%s_%s_%s_Value) : *Size);\n" % (Pcd.T= okenSpaceGuidCName,Pcd.TokenCName,skuname,defaultstore,Pcd.TokenSpaceGuid= CName,Pcd.TokenCName,skuname,defaultstore) + else: + CApp +=3D " *Size =3D %s > *Size ? = %s : *Size;\n" % (self.GetStructurePcdMaxSize(Pcd),self.GetStructurePcdMa= xSize(Pcd)) =20 else: =20 pcddef =3D self.GetPcdDscRawDefaultValue(Pcd,s= kuname,TAB_DEFAULT_STORES_DEFAULT) - if pcddef and "{CODE(" in pcddef: - CApp +=3D " *Size =3D (sizeof (%s_%s_%s_%s_= Value) > *Size ? sizeof (%s_%s_%s_%s_Value) : *Size);\n" % (Pcd.TokenSpac= eGuidCName,Pcd.TokenCName,skuname,TAB_DEFAULT_STORES_DEFAULT,Pcd.TokenSpa= ceGuidCName,Pcd.TokenCName,skuname,TAB_DEFAULT_STORES_DEFAULT) + if pcddef: + if "{CODE(" in pcddef: + CApp +=3D " *Size =3D (sizeof (%s_%s_%s= _%s_Value) > *Size ? sizeof (%s_%s_%s_%s_Value) : *Size);\n" % (Pcd.Token= SpaceGuidCName,Pcd.TokenCName,skuname,TAB_DEFAULT_STORES_DEFAULT,Pcd.Toke= nSpaceGuidCName,Pcd.TokenCName,skuname,TAB_DEFAULT_STORES_DEFAULT) + else: + CApp +=3D " *Size =3D %s > *Size ? %s := =20*Size;\n" % (self.GetStructurePcdMaxSize(Pcd),self.GetStructurePcdMaxS= ize(Pcd)) =20 else: =20 pcddef =3D self.GetPcdDscRawDefaultValue(Pcd,TAB_DEFAU= LT,TAB_DEFAULT_STORES_DEFAULT) - if pcddef and "{CODE(" in pcddef: - CApp +=3D " *Size =3D (sizeof (%s_%s_%s_%s_Value) >= =20*Size ? sizeof (%s_%s_%s_%s_Value) : *Size);\n" % (Pcd.TokenSpaceGuidC= Name,Pcd.TokenCName,TAB_DEFAULT,TAB_DEFAULT_STORES_DEFAULT,Pcd.TokenSpace= GuidCName,Pcd.TokenCName,TAB_DEFAULT,TAB_DEFAULT_STORES_DEFAULT) + if pcddef: + if "{CODE(" in pcddef: + CApp +=3D " *Size =3D (sizeof (%s_%s_%s_%s_Valu= e) > *Size ? sizeof (%s_%s_%s_%s_Value) : *Size);\n" % (Pcd.TokenSpaceGui= dCName,Pcd.TokenCName,TAB_DEFAULT,TAB_DEFAULT_STORES_DEFAULT,Pcd.TokenSpa= ceGuidCName,Pcd.TokenCName,TAB_DEFAULT,TAB_DEFAULT_STORES_DEFAULT) + else: + CApp +=3D " *Size =3D %s > *Size ? %s : *Size;\= n" % (self.GetStructurePcdMaxSize(Pcd),self.GetStructurePcdMaxSize(Pcd)) + ActualCap =3D [] =20 for index in Pcd.DefaultValues: + if index: + ActualCap.append(index) =20 FieldList =3D Pcd.DefaultValues[index] =20 if not FieldList: =20 continue =20 for FieldName in FieldList: =20 FieldName =3D "." + FieldName @@ -1804,22 +1822,24 @@ class DscBuildData(PlatformBuildClassObject): =20 else: =20 NewFieldName =3D '' =20 FieldName_ori =3D FieldName.strip('.') =20 while '[' in FieldName: =20 NewFieldName =3D NewFieldName + FieldName.spli= t('[', 1)[0] + '[0]' - ArrayIndex =3D int(FieldName.split('[', 1)[1].sp= lit(']', 1)[0]) + Array_Index =3D int(FieldName.split('[', 1)[1].s= plit(']', 1)[0]) =20 FieldName =3D FieldName.split(']', 1)[1] =20 FieldName =3D NewFieldName + FieldName =20 while '[' in FieldName and not Pcd.IsArray: =20 FieldName =3D FieldName.rsplit('[', 1)[0] - CApp =3D CApp + ' __FLEXIBLE_SIZE(*Size, %s, %s= , %d); // From %s Line %d Value %s\n' % (Pcd.DatumType, FieldName.strip("= ."), ArrayIndex + 1, FieldList[FieldName_ori][1], FieldList[FieldName_ori= ][2], FieldList[FieldName_ori][0]) + CApp =3D CApp + ' __FLEXIBLE_SIZE(*Size, %s, %s= , %d); // From %s Line %d Value %s\n' % (Pcd.DatumType, FieldName.strip("= ."), Array_Index + 1, FieldList[FieldName_ori][1], FieldList[FieldName_or= i][2], FieldList[FieldName_ori][0]) =20 for skuname in Pcd.SkuOverrideValues: =20 if skuname =3D=3D TAB_COMMON: =20 continue =20 for defaultstorenameitem in Pcd.SkuOverrideValues[skuname]= : =20 CApp =3D CApp + "// SkuName: %s, DefaultStoreName: %s= =20\n" % (skuname, defaultstorenameitem) =20 for index in Pcd.SkuOverrideValues[skuname][defaultsto= renameitem]: + if index: + ActualCap.append(index) =20 for FieldList in [Pcd.SkuOverrideValues[skuname][d= efaultstorenameitem][index]]: =20 if not FieldList: =20 continue =20 for FieldName in FieldList: =20 FieldName =3D "." + FieldName @@ -1836,16 +1856,16 @@ class DscBuildData(PlatformBuildClassObject): =20 else: =20 NewFieldName =3D '' =20 FieldName_ori =3D FieldName.strip('.')= =20 while '[' in FieldName: =20 NewFieldName =3D NewFieldName + Fi= eldName.split('[', 1)[0] + '[0]' - ArrayIndex =3D int(FieldName.split('= [', 1)[1].split(']', 1)[0]) + Array_Index =3D int(FieldName.split(= '[', 1)[1].split(']', 1)[0]) =20 FieldName =3D FieldName.split(']',= =201)[1] =20 FieldName =3D NewFieldName + FieldName= =20 while '[' in FieldName and not Pcd.IsA= rray: =20 FieldName =3D FieldName.rsplit('['= , 1)[0] - CApp =3D CApp + ' __FLEXIBLE_SIZE(*= Size, %s, %s, %d); // From %s Line %d Value %s \n' % (Pcd.DatumType, Fiel= dName.strip("."), ArrayIndex + 1, FieldList[FieldName_ori][1], FieldList[= FieldName_ori][2], FieldList[FieldName_ori][0]) + CApp =3D CApp + ' __FLEXIBLE_SIZE(*= Size, %s, %s, %d); // From %s Line %d Value %s \n' % (Pcd.DatumType, Fiel= dName.strip("."), Array_Index + 1, FieldList[FieldName_ori][1], FieldList= [FieldName_ori][2], FieldList[FieldName_ori][0]) =20 if Pcd.PcdFieldValueFromFdf: =20 CApp =3D CApp + "// From fdf \n" =20 for FieldName in Pcd.PcdFieldValueFromFdf: =20 FieldName =3D "." + FieldName =20 IsArray =3D _IsFieldValueAnArray(Pcd.PcdFieldValueFromFdf[= FieldName.strip(".")][0]) @@ -1861,16 +1881,16 @@ class DscBuildData(PlatformBuildClassObject): =20 else: =20 NewFieldName =3D '' =20 FieldName_ori =3D FieldName.strip('.') =20 while '[' in FieldName: =20 NewFieldName =3D NewFieldName + FieldName.split('[= ', 1)[0] + '[0]' - ArrayIndex =3D int(FieldName.split('[', 1)[1].split(= ']', 1)[0]) + Array_Index =3D int(FieldName.split('[', 1)[1].split= (']', 1)[0]) =20 FieldName =3D FieldName.split(']', 1)[1] =20 FieldName =3D NewFieldName + FieldName =20 while '[' in FieldName: =20 FieldName =3D FieldName.rsplit('[', 1)[0] - CApp =3D CApp + ' __FLEXIBLE_SIZE(*Size, %s, %s, %d= ); // From %s Line %s Value %s \n' % (Pcd.DatumType, FieldName.strip(".")= , ArrayIndex + 1, Pcd.PcdFieldValueFromFdf[FieldName_ori][1], Pcd.PcdFiel= dValueFromFdf[FieldName_ori][2], Pcd.PcdFieldValueFromFdf[FieldName_ori][= 0]) + CApp =3D CApp + ' __FLEXIBLE_SIZE(*Size, %s, %s, %d= ); // From %s Line %s Value %s \n' % (Pcd.DatumType, FieldName.strip(".")= , Array_Index + 1, Pcd.PcdFieldValueFromFdf[FieldName_ori][1], Pcd.PcdFie= ldValueFromFdf[FieldName_ori][2], Pcd.PcdFieldValueFromFdf[FieldName_ori]= [0]) =20 if Pcd.PcdFieldValueFromComm: =20 CApp =3D CApp + "// From Command Line \n" =20 for FieldName in Pcd.PcdFieldValueFromComm: =20 FieldName =3D "." + FieldName =20 IsArray =3D _IsFieldValueAnArray(Pcd.PcdFieldValueFromComm= [FieldName.strip(".")][0]) @@ -1886,20 +1906,41 @@ class DscBuildData(PlatformBuildClassObject): =20 else: =20 NewFieldName =3D '' =20 FieldName_ori =3D FieldName.strip('.') =20 while '[' in FieldName: =20 NewFieldName =3D NewFieldName + FieldName.split('[= ', 1)[0] + '[0]' - ArrayIndex =3D int(FieldName.split('[', 1)[1].split(= ']', 1)[0]) + Array_Index =3D int(FieldName.split('[', 1)[1].split= (']', 1)[0]) =20 FieldName =3D FieldName.split(']', 1)[1] =20 FieldName =3D NewFieldName + FieldName =20 while '[' in FieldName and not Pcd.IsArray: =20 FieldName =3D FieldName.rsplit('[', 1)[0] - CApp =3D CApp + ' __FLEXIBLE_SIZE(*Size, %s, %s, %d= ); // From %s Line %d Value %s \n' % (Pcd.DatumType, FieldName.strip(".")= , ArrayIndex + 1, Pcd.PcdFieldValueFromComm[FieldName_ori][1], Pcd.PcdFie= ldValueFromComm[FieldName_ori][2], Pcd.PcdFieldValueFromComm[FieldName_or= i][0]) + CApp =3D CApp + ' __FLEXIBLE_SIZE(*Size, %s, %s, %d= ); // From %s Line %d Value %s \n' % (Pcd.DatumType, FieldName.strip(".")= , Array_Index + 1, Pcd.PcdFieldValueFromComm[FieldName_ori][1], Pcd.PcdFi= eldValueFromComm[FieldName_ori][2], Pcd.PcdFieldValueFromComm[FieldName_o= ri][0]) =20 if Pcd.GetPcdMaxSize(): =20 CApp =3D CApp + " *Size =3D (%d > *Size ? %d : *Size); //= =20The Pcd maxsize is %d \n" % (Pcd.GetPcdMaxSize(), Pcd.GetPcdMaxSize(),= =20Pcd.GetPcdMaxSize()) + ArraySizeByAssign =3D self.CalculateActualCap(ActualCap) + if ArraySizeByAssign > 1: + CApp =3D CApp + " *Size =3D (%d > *Size ? %d : *Size); \n" = % (ArraySizeByAssign, ArraySizeByAssign) =20 CApp =3D CApp + "}\n" =20 return CApp + def CalculateActualCap(self,ActualCap): + if not ActualCap: + return 1 + maxsize =3D 1 + for item in ActualCap: + index_elements =3D ArrayIndex.findall(item) + rt =3D 1 + for index_e in index_elements: + index_num =3D index_e.lstrip("[").rstrip("]").strip() + if not index_num: + # Not support flexiable pcd array assignment=20 + return 1 + index_num =3D int(index_num,16) if index_num.startswith(= ("0x","0X")) else int(index_num) + rt =3D rt * (index_num+1) + if rt >maxsize: + maxsize =3D rt + + return maxsize =20 =20 @staticmethod =20 def GenerateSizeStatments(Pcd,skuname,defaultstorename): =20 if Pcd.IsArray(): =20 r_datatype =3D [Pcd.BaseDatumType] @@ -1974,10 +2015,11 @@ class DscBuildData(PlatformBuildClassObject): =20 def GenerateDefaultValueAssignFunction(self, Pcd): =20 CApp =3D "// Default value in Dec \n" =20 CApp =3D CApp + "void Assign_%s_%s_Default_Value(%s *Pcd){\n" = % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName, Pcd.BaseDatumType) =20 CApp =3D CApp + ' UINT32 FieldSize;\n' =20 CApp =3D CApp + ' CHAR8 *Value;\n' + CApp =3D CApp + ' UINT32 PcdArraySize;\n' =20 DefaultValueFromDec =3D Pcd.DefaultValueFromDec =20 IsArray =3D _IsFieldValueAnArray(Pcd.DefaultValueFromDec) =20 if IsArray: =20 try: =20 DefaultValueFromDec =3D ValueExpressionEx(Pcd.DefaultV= alueFromDec, TAB_VOID)(True) @@ -1985,18 +2027,33 @@ class DscBuildData(PlatformBuildClassObject): =20 EdkLogger.error("Build", FORMAT_INVALID, "Invalid valu= e format for %s.%s, from DEC: %s" % =20 (Pcd.TokenSpaceGuidCName, Pcd.TokenCNa= me, DefaultValueFromDec)) =20 DefaultValueFromDec =3D StringToArray(DefaultValueFromDec) =20 Value, ValueSize =3D ParseFieldValue (DefaultValueFromDec) =20 if IsArray: - # - # Use memcpy() to copy value into field - # - if "{CODE(" in Pcd.DefaultValueFromDec: - CApp =3D CApp + ' memcpy (Pcd, %s_%s_INIT_Value, sizeof= (%s_%s_INIT_Value));\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,Pcd.To= kenSpaceGuidCName, Pcd.TokenCName) + # + # Use memcpy() to copy value into field + # + if Pcd.IsArray(): + pcdarraysize =3D Pcd.PcdArraySize() + if "{CODE(" in Pcd.DefaultValueFromDec: + if Pcd.Capacity[-1] !=3D "-1": + CApp =3D CApp + '__STATIC_ASSERT(sizeof(%s_%s_IN= IT_Value) < %d * sizeof(%s), "Pcd %s.%s Value in Dec exceed the array cap= ability %s"); // From %s Line %s \n ' % (Pcd.TokenSpaceGuidCName, Pcd.To= kenCName,pcdarraysize,Pcd.BaseDatumType,Pcd.TokenSpaceGuidCName, Pcd.Toke= nCName,Pcd.DatumType,Pcd.DefaultValueFromDecInfo[0],Pcd.DefaultValueFromD= ecInfo[1]) + CApp =3D CApp + ' PcdArraySize =3D sizeof(%s_%s_INIT= _Value);\n ' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName) + CApp =3D CApp + ' memcpy (Pcd, %s_%s_INIT_Value,Pcd= ArraySize);\n ' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName) + else: + if Pcd.Capacity[-1] !=3D "-1": + CApp =3D CApp + '__STATIC_ASSERT(%d < %d * sizeo= f(%s), "Pcd %s.%s Value in Dec exceed the array capability %s"); // From = %s Line %s \n' % (ValueSize,pcdarraysize,Pcd.BaseDatumType,Pcd.TokenSpace= GuidCName, Pcd.TokenCName,Pcd.DatumType,Pcd.DefaultValueFromDecInfo[0],Pc= d.DefaultValueFromDecInfo[1]) + CApp =3D CApp + ' PcdArraySize =3D %d;\n' % ValueSiz= e + CApp =3D CApp + ' Value =3D %s; // From DEC Def= ault Value %s\n' % (DscBuildData.IntToCString(Value, ValueSize), Pcd.Defa= ultValueFromDec) + CApp =3D CApp + ' memcpy (Pcd, Value, PcdArraySize)= ;\n' =20 else: - CApp =3D CApp + ' Value =3D %s; // From DEC Default= =20Value %s\n' % (DscBuildData.IntToCString(Value, ValueSize), Pcd.Defaul= tValueFromDec) - CApp =3D CApp + ' memcpy (Pcd, Value, %d);\n' % (ValueS= ize) + if "{CODE(" in Pcd.DefaultValueFromDec: + CApp =3D CApp + ' PcdArraySize =3D sizeof(%s_%s_INI= T_Value);\n ' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName) + CApp =3D CApp + ' memcpy (Pcd, &%s_%s_INIT_Value,Pc= dArraySize);\n ' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName) + else: + CApp =3D CApp + ' Value =3D %s; // From DEC Def= ault Value %s\n' % (DscBuildData.IntToCString(Value, ValueSize), Pcd.Defa= ultValueFromDec) + CApp =3D CApp + ' memcpy (Pcd, Value, %d);\n' % (Va= lueSize) =20 elif isinstance(Value, str): =20 CApp =3D CApp + ' Pcd =3D %s; // From DEC Default Value %= s\n' % (Value, Pcd.DefaultValueFromDec) =20 for index in Pcd.DefaultValues: =20 FieldList =3D Pcd.DefaultValues[index] =20 if not FieldList: @@ -2050,18 +2107,33 @@ class DscBuildData(PlatformBuildClassObject): =20 pcddefaultvalue =3D Pcd.DscRawValue.get(SkuName, {}).g= et(DefaultStoreName) =20 else: =20 pcddefaultvalue =3D Pcd.DscRawValue.get(SkuName, {}).get(T= AB_DEFAULT_STORES_DEFAULT) =20 =20 return pcddefaultvalue + def GetPcdDscRawValueInfo(self,Pcd, SkuName,DefaultStoreName): + DscValueInfo =3D Pcd.DscRawValueInfo.get(SkuName, {}).get(Defaul= tStoreName) + if DscValueInfo: + dscfilepath,lineno =3D DscValueInfo + else: + dscfilepath =3D self.MetaFile.File + lineno =3D "" + return dscfilepath,lineno + =20 def GenerateInitValueFunction(self, Pcd, SkuName, DefaultStoreName= ): =20 CApp =3D "// Value in Dsc for Sku: %s, DefaultStore %s\n" % (S= kuName, DefaultStoreName) =20 CApp =3D CApp + "void Assign_%s_%s_%s_%s_Value(%s *Pcd){\n" % = (Pcd.TokenSpaceGuidCName, Pcd.TokenCName, SkuName, DefaultStoreName, Pcd.= BaseDatumType) =20 CApp =3D CApp + ' UINT32 FieldSize;\n' =20 CApp =3D CApp + ' CHAR8 *Value;\n' + CApp =3D CApp + ' UINT32 PcdArraySize;\n' =20 =20 CApp =3D CApp + "// SkuName: %s, DefaultStoreName: %s \n" % (= TAB_DEFAULT, TAB_DEFAULT_STORES_DEFAULT) =20 inherit_OverrideValues =3D Pcd.SkuOverrideValues[SkuName] + dscfilepath,lineno =3D self.GetPcdDscRawValueInfo(Pcd, SkuName, = DefaultStoreName) + if lineno: + valuefrom =3D "%s Line %s" % (dscfilepath,str(lineno)) + else: + valuefrom =3D dscfilepath =20 =20 pcddefaultvalue =3D self.GetPcdDscRawDefaultValue(Pcd, SkuName= , DefaultStoreName) =20 if pcddefaultvalue: =20 FieldList =3D pcddefaultvalue =20 IsArray =3D _IsFieldValueAnArray(FieldList) @@ -2075,37 +2147,75 @@ class DscBuildData(PlatformBuildClassObject): =20 Value, ValueSize =3D ParseFieldValue (FieldList) =20 =20 if (SkuName, DefaultStoreName) =3D=3D (TAB_DEFAULT, TAB_DE= FAULT_STORES_DEFAULT): =20 if isinstance(Value, str): =20 if "{CODE(" in Value: - CApp =3D CApp + ' memcpy (Pcd, %s_%s_%s_%s_Valu= e, sizeof(%s_%s_%s_%s_Value));\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCN= ame,SkuName, DefaultStoreName,Pcd.TokenSpaceGuidCName, Pcd.TokenCName,Sku= Name, DefaultStoreName) + if Pcd.IsArray() and Pcd.Capacity[-1] !=3D "-1":= + pcdarraysize =3D Pcd.PcdArraySize() + CApp =3D CApp + '__STATIC_ASSERT(sizeof(%s_%= s_%s_%s_Value) < %d * sizeof(%s), "Pcd %s.%s Value in Dsc exceed the arra= y capability %s"); // From %s \n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCN= ame,SkuName, DefaultStoreName,pcdarraysize,Pcd.BaseDatumType,Pcd.TokenSpa= ceGuidCName, Pcd.TokenCName,Pcd.DatumType, valuefrom) + CApp =3D CApp+ ' PcdArraySize =3D sizeof(%s_%s_%= s_%s_Value);\n ' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuName, Defa= ultStoreName) + CApp =3D CApp + ' memcpy (Pcd, &%s_%s_%s_%s_Val= ue,PcdArraySize);\n ' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuName,= =20DefaultStoreName) =20 else: =20 CApp =3D CApp + ' Pcd =3D %s; // From DSC Def= ault Value %s\n' % (Value, Pcd.DefaultFromDSC.get(TAB_DEFAULT, {}).get(TA= B_DEFAULT_STORES_DEFAULT, Pcd.DefaultValue) if Pcd.DefaultFromDSC else Pc= d.DefaultValue) =20 elif IsArray: - # - # Use memcpy() to copy value into field - # - if Pcd.IsArray() and "{CODE(" in pcddefaultvalue: - CApp =3D CApp + ' memcpy (Pcd, %s_%s_%s_%s_Valu= e, sizeof(%s_%s_%s_%s_Value));\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCN= ame,SkuName, DefaultStoreName,Pcd.TokenSpaceGuidCName, Pcd.TokenCName,Sku= Name, DefaultStoreName) + # + # Use memcpy() to copy value into field + # + if Pcd.IsArray(): + pcdarraysize =3D Pcd.PcdArraySize() + if "{CODE(" in pcddefaultvalue: + if Pcd.Capacity[-1] !=3D "-1": + CApp =3D CApp + '__STATIC_ASSERT(sizeof(= %s_%s_%s_%s_Value) < %d * sizeof(%s), "Pcd %s.%s Value in Dsc exceed the = array capability %s"); // From %s \n' % (Pcd.TokenSpaceGuidCName, Pcd.To= kenCName,SkuName, DefaultStoreName,pcdarraysize,Pcd.BaseDatumType,Pcd.Tok= enSpaceGuidCName, Pcd.TokenCName,Pcd.DatumType,valuefrom) + CApp =3D CApp + ' PcdArraySize =3D sizeof(%s= _%s_%s_%s_Value);\n ' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuName,= =20DefaultStoreName) + CApp =3D CApp + ' memcpy (Pcd, %s_%s_%s_%s_= Value, PcdArraySize);\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuNa= me, DefaultStoreName) + else: + if Pcd.Capacity[-1] !=3D "-1": + CApp =3D CApp + '__STATIC_ASSERT(%d < %d= =20* sizeof(%s), "Pcd %s.%s Value in Dsc exceed the array capability %s")= ; // From %s \n' % (ValueSize,pcdarraysize,Pcd.BaseDatumType,Pcd.TokenSp= aceGuidCName, Pcd.TokenCName,Pcd.DatumType,valuefrom) + CApp =3D CApp + ' PcdArraySize =3D %d;\n' % = ValueSize + CApp =3D CApp + ' Value =3D %s; // From= =20DSC Default Value %s\n' % (DscBuildData.IntToCString(Value, ValueSize)= , Pcd.DefaultFromDSC.get(TAB_DEFAULT, {}).get(TAB_DEFAULT_STORES_DEFAULT,= =20Pcd.DefaultValue) if Pcd.DefaultFromDSC else Pcd.DefaultValue) + CApp =3D CApp + ' memcpy (Pcd, Value, PcdAr= raySize);\n' =20 else: - CApp =3D CApp + ' Value =3D %s; // From DSC= =20Default Value %s\n' % (DscBuildData.IntToCString(Value, ValueSize), Pc= d.DefaultFromDSC.get(TAB_DEFAULT, {}).get(TAB_DEFAULT_STORES_DEFAULT, Pcd= .DefaultValue) if Pcd.DefaultFromDSC else Pcd.DefaultValue) - CApp =3D CApp + ' memcpy (Pcd, Value, %d);\n' %= =20(ValueSize) + if "{CODE(" in pcddefaultvalue: + CApp =3D CApp + ' PcdArraySize =3D %d < siz= eof(%s) * %d ? %d: sizeof(%s) * %d;\n ' % (ValueSize,Pcd.BaseDatumType,pc= darraysize,ValueSize,Pcd.BaseDatumType,pcdarraysize) + CApp =3D CApp + ' memcpy (Pcd, &%s_%s_%s_%s= _Value, PcdArraySize);\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuN= ame, DefaultStoreName) + else: + CApp =3D CApp + ' Value =3D %s; // From= =20DSC Default Value %s\n' % (DscBuildData.IntToCString(Value, ValueSize)= , Pcd.DefaultFromDSC.get(TAB_DEFAULT, {}).get(TAB_DEFAULT_STORES_DEFAULT,= =20Pcd.DefaultValue) if Pcd.DefaultFromDSC else Pcd.DefaultValue) + CApp =3D CApp + ' memcpy (Pcd, Value, %d);\= n' % (ValueSize) =20 else: =20 if isinstance(Value, str): =20 if "{CODE(" in Value: - CApp =3D CApp + ' memcpy (Pcd, %s_%s_%s_%s_Valu= e, sizeof(%s_%s_%s_%s_Value));\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCN= ame,SkuName, DefaultStoreName,Pcd.TokenSpaceGuidCName, Pcd.TokenCName,Sku= Name, DefaultStoreName) + if Pcd.IsArray() and Pcd.Capacity[-1] !=3D "-1":= + pcdarraysize =3D Pcd.PcdArraySize() + CApp =3D CApp + '__STATIC_ASSERT(sizeof(%s_%= s_%s_%s_Value) < %d * sizeof(%s), "Pcd %s.%s Value in Dsc exceed the arra= y capability %s"); // From %s \n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCN= ame,SkuName, DefaultStoreName,pcdarraysize,Pcd.BaseDatumType,Pcd.TokenSpa= ceGuidCName, Pcd.TokenCName,Pcd.DatumType,valuefrom) + CApp =3D CApp + ' PcdArraySize =3D sizeof(%s_%s_= %s_%s_Value);\n '% (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuName, Defa= ultStoreName) + CApp =3D CApp + ' memcpy (Pcd, &%s_%s_%s_%s_Val= ue, PcdArraySize);\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuName,= =20DefaultStoreName) =20 else: =20 CApp =3D CApp + ' Pcd =3D %s; // From DSC Def= ault Value %s\n' % (Value, Pcd.DscRawValue.get(SkuName, {}).get(DefaultSt= oreName)) =20 elif IsArray: - # - # Use memcpy() to copy value into field - # - if Pcd.IsArray() and "{CODE(" in pcddefaultvalue: - CApp =3D CApp + ' memcpy (Pcd, %s_%s_%s_%s_Valu= e, sizeof(%s_%s_%s_%s_Value));\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCN= ame,SkuName, DefaultStoreName,Pcd.TokenSpaceGuidCName, Pcd.TokenCName,Sku= Name, DefaultStoreName) + # + # Use memcpy() to copy value into field + # + if Pcd.IsArray(): + pcdarraysize =3D Pcd.PcdArraySize() + if "{CODE(" in pcddefaultvalue: + if Pcd.Capacity[-1] !=3D "-1": + CApp =3D CApp + '__STATIC_ASSERT(sizeof(= %s_%s_%s_%s_Value) < %d * sizeof(%s), "Pcd %s.%s Value in Dsc exceed the = array capability %s"); // From %s \n' % (Pcd.TokenSpaceGuidCName, Pcd.To= kenCName,SkuName, DefaultStoreName,pcdarraysize,Pcd.BaseDatumType,Pcd.Tok= enSpaceGuidCName, Pcd.TokenCName,Pcd.DatumType,valuefrom) + CApp + ' PcdArraySize =3D sizeof(%s_%s_%s_%s= _Value);\n ' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuName, DefaultS= toreName) + CApp =3D CApp + ' memcpy (Pcd, %s_%s_%s_%s_= Value, PcdArraySize);\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuNa= me, DefaultStoreName) + else: + if Pcd.Capacity[-1] !=3D "-1": + CApp =3D CApp + '__STATIC_ASSERT(%d < %d= =20* sizeof(%s), "Pcd %s.%s Value in Dsc exceed the array capability %s")= ; // From %s \n' % (ValueSize,pcdarraysize,Pcd.BaseDatumType,Pcd.TokenSp= aceGuidCName, Pcd.TokenCName,Pcd.DatumType,valuefrom) + CApp =3D CApp + ' PcdArraySize =3D %d;\n' % = ValueSize + CApp =3D CApp + ' Value =3D %s; // From= =20DSC Default Value %s\n' % (DscBuildData.IntToCString(Value, ValueSize)= , Pcd.DscRawValue.get(TAB_DEFAULT, {}).get(TAB_DEFAULT_STORES_DEFAULT, Pc= d.DefaultValue) if Pcd.DefaultFromDSC else Pcd.DefaultValue) + CApp =3D CApp + ' memcpy (Pcd, Value, PcdAr= raySize);\n' =20 else: - CApp =3D CApp + ' Value =3D %s; // From DSC= =20Default Value %s\n' % (DscBuildData.IntToCString(Value, ValueSize), Pc= d.DscRawValue.get(SkuName, {}).get(DefaultStoreName)) - CApp =3D CApp + ' memcpy (Pcd, Value, %d);\n' %= =20(ValueSize) + if "{CODE(" in pcddefaultvalue: + CApp =3D CApp + ' PcdArraySize =3D %d < siz= eof(%s) * %d ? %d: sizeof(%s) * %d;\n ' % (ValueSize,Pcd.BaseDatumType,pc= darraysize,ValueSize,Pcd.BaseDatumType,pcdarraysize) + CApp =3D CApp + ' memcpy (Pcd, &%s_%s_%s_%s= _Value, PcdArraySize);\n' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,SkuN= ame, DefaultStoreName) + else: + CApp =3D CApp + ' Value =3D %s; // From= =20DSC Default Value %s\n' % (DscBuildData.IntToCString(Value, ValueSize)= , Pcd.DscRawValue.get(SkuName, {}).get(DefaultStoreName)) + CApp =3D CApp + ' memcpy (Pcd, Value, %d);\= n' % (ValueSize) =20 =20 inheritvalue =3D inherit_OverrideValues.get(DefaultStoreName) =20 if not inheritvalue: =20 inheritvalue =3D [] =20 for index in inheritvalue: @@ -2327,10 +2437,13 @@ class DscBuildData(PlatformBuildClassObject): =20 # the flexible array member. The flexible array member mu= st be the last field =20 # in a structure. The size formula for this case is: =20 # OFFSET_OF(FlexbleArrayField) + sizeof(FlexibleArray[0]) = * (HighestIndex + 1) =20 # =20 CApp =3D CApp + DscBuildData.GenerateSizeStatments(Pcd,Sku= Name,DefaultStoreName) + if Pcd.IsArray() and Pcd.Capacity[-1] !=3D "-1": + CApp =3D CApp + ' OriginalSize =3D OriginalSize < sizeo= f(%s) * %d? OriginalSize:sizeof(%s) * %d; \n' % (Pcd.BaseDatumType,Pcd.Pc= dArraySize(),Pcd.BaseDatumType,Pcd.PcdArraySize()) + CApp =3D CApp + ' Size =3D sizeof(%s) * %d; \n' % (Pcd.= BaseDatumType,Pcd.PcdArraySize()) =20 =20 # =20 # Allocate and zero buffer for the PCD =20 # Must handle cases where current value is smaller, larger= , or same size =20 # Always keep that larger one as the current size @@ -2377,12 +2490,10 @@ class DscBuildData(PlatformBuildClassObject): =20 =20 def GenerateArrayAssignment(self, Pcd): =20 CApp =3D "" =20 if not Pcd: =20 return CApp - if not Pcd.IsArray(): - return CApp =20 Demesion =3D "" =20 for d in Pcd.Capacity: =20 Demesion +=3D "[]" =20 =20 Value =3D Pcd.DefaultValueFromDec @@ -2770,11 +2881,13 @@ class DscBuildData(PlatformBuildClassObject): =20 None, =20 IsDsc=3DTrue) =20 =20 if SkuName not in Pcds[PcdCName, TokenSpaceGuid].DscRawVal= ue: =20 Pcds[PcdCName, TokenSpaceGuid].DscRawValue[SkuName] =3D= =20{} + Pcds[PcdCName, TokenSpaceGuid].DscRawValueInfo[SkuName] = =3D {} =20 Pcds[PcdCName, TokenSpaceGuid].DscRawValue[SkuName][TAB_DE= FAULT_STORES_DEFAULT] =3D PcdValue + Pcds[PcdCName, TokenSpaceGuid].DscRawValueInfo[SkuName][TAB_= DEFAULT_STORES_DEFAULT] =3D (self.MetaFile.File,Dummy4) =20 =20 for pcd in Pcds.values(): =20 pcdDecObject =3D self._DecPcds[pcd.TokenCName, pcd.TokenSp= aceGuidCName] =20 # Only fix the value while no value provided in DSC file. =20 for sku in pcd.SkuInfoList.values(): @@ -2972,11 +3085,13 @@ class DscBuildData(PlatformBuildClassObject): =20 Pcds[PcdCName, TokenSpaceGuid] =3D PcdClassObj =20 =20 Pcds[PcdCName, TokenSpaceGuid].CustomAttribute['DscPos= ition'] =3D int(Dummy4) =20 if SkuName not in Pcds[PcdCName, TokenSpaceGuid].DscRawVal= ue: =20 Pcds[PcdCName, TokenSpaceGuid].DscRawValue[SkuName] =3D= =20{} + Pcds[PcdCName, TokenSpaceGuid].DscRawValueInfo[SkuName] = =3D {} =20 Pcds[PcdCName, TokenSpaceGuid].DscRawValue[SkuName][Defaul= tStore] =3D DefaultValue + Pcds[PcdCName, TokenSpaceGuid].DscRawValueInfo[SkuName][Defa= ultStore] =3D (self.MetaFile.File,Dummy4) =20 for pcd in Pcds.values(): =20 pcdDecObject =3D self._DecPcds[pcd.TokenCName, pcd.TokenSp= aceGuidCName] =20 pcd.DatumType =3D pcdDecObject.DatumType =20 # Only fix the value while no value provided in DSC file. =20 for sku in pcd.SkuInfoList.values(): @@ -3110,11 +3225,13 @@ class DscBuildData(PlatformBuildClassObject): =20 None, =20 IsDsc=3DTrue) =20 =20 if SkuName not in Pcds[PcdCName, TokenSpaceGuid].DscRawVal= ue: =20 Pcds[PcdCName, TokenSpaceGuid].DscRawValue[SkuName] =3D= =20{} + Pcds[PcdCName, TokenSpaceGuid].DscRawValueInfo[SkuName] = =3D {} =20 Pcds[PcdCName, TokenSpaceGuid].DscRawValue[SkuName][TAB_DE= FAULT_STORES_DEFAULT] =3D InitialValue + Pcds[PcdCName, TokenSpaceGuid].DscRawValueInfo[SkuName][TAB_= DEFAULT_STORES_DEFAULT] =3D (self.MetaFile.File,Dummy4) =20 for pcd in Pcds.values(): =20 pcdDecObject =3D self._DecPcds[pcd.TokenCName, pcd.TokenSp= aceGuidCName] =20 pcd.DatumType =3D pcdDecObject.DatumType =20 # Only fix the value while no value provided in DSC file. =20 for sku in pcd.SkuInfoList.values(): --=20 2.18.0.windows.1 ------------------------------ Message: 23 Date: Thu, 21 Feb 2019 15:21:07 +0000 From: Julien Grall To: edk2-devel@lists.01.org Cc: afish@apple.com, lersek@redhat.com, leif.lindholm@linaro.org, =09michael.d.kinney@intel.com, Julien Grall Subject: [edk2] [PATCH] Maintainers.txt: Update e-mail address for =09Julien Grall Message-ID: <20190221152107.8263-1-julien.grall@arm.com> I don't watch much my Linaro e-mail anymore. So update my e-mail address from Linaro to the Arm one. Contributed-under: Tianocore Contribution Agreement 1.1 Signed-off-by: Julien Grall --- =20Maintainers.txt | 4 ++-- =201 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index 3b2676bc32..1e3fdc1de9 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -80,7 +80,7 @@ ArmVirtPkg =20W: https://github.com/tianocore/tianocore.github.io/wiki/ArmVirtPkg =20M: Laszlo Ersek =20M: Ard Biesheuvel -R: Julien Grall +R: Julien Grall =20 =20BaseTools =20W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools @@ -217,7 +217,7 @@ M: Jordan Justen =20M: Laszlo Ersek =20M: Ard Biesheuvel =20R: Anthony Perard -R: Julien Grall +R: Julien Grall =20S: Maintained =20 =20PcAtChipsetPkg --=20 2.11.0 ------------------------------ Message: 24 Date: Thu, 21 Feb 2019 16:45:18 +0100 From: Ard Biesheuvel To: Julien Grall Cc: "edk2-devel@lists.01.org" , "Kinney, =09Michael D" , Laszlo Ersek =09 Subject: Re: [edk2] [PATCH] Maintainers.txt: Update e-mail address for =09Julien Grall Message-ID: =09 Content-Type: text/plain; charset=3D"UTF-8" On Thu, 21 Feb 2019 at 16:29, Julien Grall wrote: > > I don't watch much my Linaro e-mail anymore. So update my e-mail addres= s > from Linaro to the Arm one. > > Contributed-under: Tianocore Contribution Agreement 1.1 > Signed-off-by: Julien Grall Acked-by: Ard Biesheuvel > --- > Maintainers.txt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Maintainers.txt b/Maintainers.txt > index 3b2676bc32..1e3fdc1de9 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -80,7 +80,7 @@ ArmVirtPkg > W: https://github.com/tianocore/tianocore.github.io/wiki/ArmVirtPkg > M: Laszlo Ersek > M: Ard Biesheuvel > -R: Julien Grall > +R: Julien Grall > > BaseTools > W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools > @@ -217,7 +217,7 @@ M: Jordan Justen > M: Laszlo Ersek > M: Ard Biesheuvel > R: Anthony Perard > -R: Julien Grall > +R: Julien Grall > S: Maintained > > PcAtChipsetPkg > -- > 2.11.0 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ------------------------------ Message: 25 Date: Thu, 21 Feb 2019 17:47:14 +0100 From: Laszlo Ersek To: Julien Grall , edk2-devel@lists.01.org Cc: afish@apple.com, leif.lindholm@linaro.org, =09michael.d.kinney@intel.com Subject: Re: [edk2] [PATCH] Maintainers.txt: Update e-mail address for =09Julien Grall Message-ID: <10a4fa4a-e94a-2d6a-ef3b-8ef6b5bdd959@redhat.com> Content-Type: text/plain; charset=3Dutf-8 On 02/21/19 16:21, Julien Grall wrote: > I don't watch much my Linaro e-mail anymore. So update my e-mail addres= s > from Linaro to the Arm one. >=20 > Contributed-under: Tianocore Contribution Agreement 1.1 > Signed-off-by: Julien Grall > --- > Maintainers.txt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/Maintainers.txt b/Maintainers.txt > index 3b2676bc32..1e3fdc1de9 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -80,7 +80,7 @@ ArmVirtPkg > W: https://github.com/tianocore/tianocore.github.io/wiki/ArmVirtPkg > M: Laszlo Ersek > M: Ard Biesheuvel > -R: Julien Grall > +R: Julien Grall > =20 > BaseTools > W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools > @@ -217,7 +217,7 @@ M: Jordan Justen > M: Laszlo Ersek > M: Ard Biesheuvel > R: Anthony Perard > -R: Julien Grall > +R: Julien Grall > S: Maintained > =20 > PcAtChipsetPkg >=20 Acked-by: Laszlo Ersek Ard, I assume we'll push this before my =20 [edk2] [PATCH v2 0/2] Maintainers: updates for ArmVirtPkg and OvmfPkg= This patch is going to cause conflicts for my series, but I'll resolve those when I push the series. Julien: can you please also ACK patch #2 of the series that I reference above. If you are subscribed to the list with your @arm.com email address, you should find it at least in your list folder (if not in your inbox). Thanks, Laszlo ------------------------------ Message: 26 Date: Thu, 21 Feb 2019 16:49:15 +0000 From: Julien Grall To: Laszlo Ersek , edk2-devel@lists.01.org Cc: Andrew Fish , Anthony Perard =09, Ard Biesheuvel =09, Jordan Justen =09, Leif Lindholm ,= =09Michael D Kinney Subject: Re: [edk2] [PATCH v2 2/2] Maintainers: specify the scope for =09OvmfPkg/ArmVirtPkg Xen module reviewers Message-ID: <8e4f2158-3b17-5799-3152-47e477cf74ae@arm.com> Content-Type: text/plain; charset=3Dutf-8; format=3Dflowed Hi Laszlo, On 21/02/2019 12:28, Laszlo Ersek wrote: > We can use the format introduced under MdeModulePkg to clarify the > reviewership scopes a little. This should decrease the review spam that= > Xen reviewers get. >=20 > Cc: Andrew Fish > Cc: Anthony Perard > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Julien Grall > Cc: Leif Lindholm > Cc: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Laszlo Ersek > --- >=20 > Notes: > v2: > - new in v2 >=20 > Maintainers.txt | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/Maintainers.txt b/Maintainers.txt > index e45b77039d67..86f80b7d38a0 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -81,6 +81,7 @@ W: https://github.com/tianocore/tianocore.github.io/w= iki/ArmVirtPkg > M: Laszlo Ersek > M: Ard Biesheuvel > R: Julien Grall > + (Xen modules) > =20 > BaseTools > W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools > @@ -217,7 +218,9 @@ M: Jordan Justen > M: Laszlo Ersek > M: Ard Biesheuvel > R: Anthony Perard > + (Xen modules) > R: Julien Grall > + (Xen modules) > R: Marc-Andr? Lureau > (TPM2 modules) > R: Stefan Berger >=20 Acked-by: Julien Grall Cheers, --=20 Julien Grall ------------------------------ Message: 27 Date: Thu, 21 Feb 2019 16:50:55 +0000 From: Julien Grall To: Laszlo Ersek , edk2-devel@lists.01.org Cc: afish@apple.com, leif.lindholm@linaro.org, =09michael.d.kinney@intel.com Subject: Re: [edk2] [PATCH] Maintainers.txt: Update e-mail address for =09Julien Grall Message-ID: <52406734-b421-c2fc-55dd-0396af97a905@arm.com> Content-Type: text/plain; charset=3Dutf-8; format=3Dflowed Hi, On 21/02/2019 16:47, Laszlo Ersek wrote: > On 02/21/19 16:21, Julien Grall wrote: >> I don't watch much my Linaro e-mail anymore. So update my e-mail addre= ss >> from Linaro to the Arm one. >> >> Contributed-under: Tianocore Contribution Agreement 1.1 >> Signed-off-by: Julien Grall >> --- >> Maintainers.txt | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/Maintainers.txt b/Maintainers.txt >> index 3b2676bc32..1e3fdc1de9 100644 >> --- a/Maintainers.txt >> +++ b/Maintainers.txt >> @@ -80,7 +80,7 @@ ArmVirtPkg >> W: https://github.com/tianocore/tianocore.github.io/wiki/ArmVirtPkg >> M: Laszlo Ersek >> M: Ard Biesheuvel >> -R: Julien Grall >> +R: Julien Grall >> =20 >> BaseTools >> W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools >> @@ -217,7 +217,7 @@ M: Jordan Justen >> M: Laszlo Ersek >> M: Ard Biesheuvel >> R: Anthony Perard >> -R: Julien Grall >> +R: Julien Grall >> S: Maintained >> =20 >> PcAtChipsetPkg >> >=20 > Acked-by: Laszlo Ersek >=20 > Ard, I assume we'll push this before my >=20 > [edk2] [PATCH v2 0/2] Maintainers: updates for ArmVirtPkg and OvmfPk= g >=20 > This patch is going to cause conflicts for my series, but I'll resolve > those when I push the series. Thank you for resolving the conflicts. > Julien: can you please also ACK patch #2 of the series that I reference= > above. If you are subscribed to the list with your @arm.com email > address, you should find it at least in your list folder (if not in you= r > inbox). It is acked now. Cheers, --=20 Julien Grall ------------------------------ Message: 28 Date: Thu, 21 Feb 2019 17:56:53 +0100 From: Laszlo Ersek To: Julien Grall , edk2-devel@lists.01.org Cc: Andrew Fish , Anthony Perard =09, Ard Biesheuvel =09, Jordan Justen =09, Leif Lindholm ,= =09Michael D Kinney Subject: Re: [edk2] [PATCH v2 2/2] Maintainers: specify the scope for =09OvmfPkg/ArmVirtPkg Xen module reviewers Message-ID: <1d07427a-3178-bb0b-38e4-8ecf7264153d@redhat.com> Content-Type: text/plain; charset=3Dutf-8 On 02/21/19 17:49, Julien Grall wrote: > Hi Laszlo, >=20 > On 21/02/2019 12:28, Laszlo Ersek wrote: >> We can use the format introduced under MdeModulePkg to clarify the >> reviewership scopes a little. This should decrease the review spam tha= t >> Xen reviewers get. >> >> Cc: Andrew Fish >> Cc: Anthony Perard >> Cc: Ard Biesheuvel >> Cc: Jordan Justen >> Cc: Julien Grall >> Cc: Leif Lindholm >> Cc: Michael D Kinney >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Laszlo Ersek >> --- >> >> Notes: >> ???? v2: >> ???? - new in v2 >> >> ? Maintainers.txt | 3 +++ >> ? 1 file changed, 3 insertions(+) >> >> diff --git a/Maintainers.txt b/Maintainers.txt >> index e45b77039d67..86f80b7d38a0 100644 >> --- a/Maintainers.txt >> +++ b/Maintainers.txt >> @@ -81,6 +81,7 @@ W: >> https://github.com/tianocore/tianocore.github.io/wiki/ArmVirtPkg >> ? M: Laszlo Ersek >> ? M: Ard Biesheuvel >> ? R: Julien Grall >> +?? (Xen modules) >> ? ? BaseTools >> ? W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools >> @@ -217,7 +218,9 @@ M: Jordan Justen >> ? M: Laszlo Ersek >> ? M: Ard Biesheuvel >> ? R: Anthony Perard >> +?? (Xen modules) >> ? R: Julien Grall >> +?? (Xen modules) >> ? R: Marc-Andr? Lureau >> ???? (TPM2 modules) >> ? R: Stefan Berger >> >=20 > Acked-by: Julien Grall Thanks! (For readers not following the other thread: by the time I push this, Maintainers.txt will refer to Julien's @arm.com email address. I'll resolve the conflict, and there won't be a mismatch between the text file contents and Julien's ACK.) Laszlo ------------------------------ Message: 29 Date: Thu, 21 Feb 2019 18:16:11 +0100 From: Marc-Andr? Lureau To: Laszlo Ersek Cc: edk2-devel@lists.01.org, Andrew Fish , Ard =09Biesheuvel , Jordan Justen =09, Leif Lindholm =09, Michael D Kinney =09, Stefan Berger Subject: Re: [edk2] [PATCH v2 1/2] Maintainers: add TPM2 reviewers for =09OvmfPkg Message-ID: =09 Content-Type: text/plain; charset=3D"UTF-8" Hi On Thu, Feb 21, 2019 at 1:28 PM Laszlo Ersek wrote: > > OVMF can be built with a significant amount of TPM2 code now; add > Marc-Andr? and Stefan as Reviewers for TPM2-related patches. > > Keep the list of "R" entries alphabetically sorted. > > Cc: Andrew Fish > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Leif Lindholm > Cc: Marc-Andr? Lureau > Cc: Michael D Kinney > Cc: Stefan Berger > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Laszlo Ersek > Reviewed-by: Leif Lindholm > Reviewed-by: Stefan Berger > Acked-by: Ard Biesheuvel > Acked-by: Jordan Justen Reviewed-by: Marc-Andr? Lureau > --- > > Notes: > v2: > - pick up feedback tags > - describe the Reviewership scope, in the format seen under MdeModu= lePkg > [Marc-Andr?] > > Maintainers.txt | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Maintainers.txt b/Maintainers.txt > index 3b2676bc32ea..e45b77039d67 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -218,6 +218,10 @@ M: Laszlo Ersek > M: Ard Biesheuvel > R: Anthony Perard > R: Julien Grall > +R: Marc-Andr? Lureau > + (TPM2 modules) > +R: Stefan Berger > + (TPM2 modules) > S: Maintained > > PcAtChipsetPkg > -- > 2.19.1.3.g30247aa5d201 > > ------------------------------ Message: 30 Date: Thu, 21 Feb 2019 18:14:13 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: alexei.fedorov@arm.com, leif.lindholm@linaro.org, =09Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH v1 5/6] DynamicTablesPkg: Remove GIC =09Distributor Id field Message-ID: <20190221181414.83136-6-sami.mujawar@arm.com> According to ACPI 6.2 Specification - Errata A, 'One, and only one, GIC distributor structure must be present in the MADT for an ARM based system'. Therefore, the GIC Distributor ID field in the ACPI MADT GICD substructure can be set to zero and there is no need for the Configuration Manager to provide this information. Update the CM_ARM_GICD_INFO structure to remove the GicId field. Similarly update the MADT Generator to set the GicId field in the GICD substructure to zero. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 5 += ---- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c | 4 += ++- =202 files changed, 4 insertions(+), 5 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTabl= esPkg/Include/ArmNameSpaceObjects.h index 2adaa788083e4e15d049f5f6b6312f77f3c02488..73139eb3273e89205ef9e6bee= 67b1b842f7f516b 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -1,6 +1,6 @@ =20/** @file =20 - Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. + Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. =20 =20 This program and the accompanying materials =20 are licensed and made available under the terms and conditions of th= e BSD License @@ -166,9 +166,6 @@ typedef struct CmArmGicCInfo { =20 GIC Distributor information for the Platform. =20*/ =20typedef struct CmArmGicDInfo { - /// The GIC Distributor ID. - UINT32 GicId; - =20 /// The Physical Base address for the GIC Distributor. =20 UINT64 PhysicalBaseAddress; =20 diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c index 1ee0b9e006bfa00ea5bbf6aa64209dac244c90a0..6b89c3f65d36ff35fcfc81cdf= fdeae8e4306c976 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c @@ -192,7 +192,9 @@ AddGICD ( =20 // UINT16 Reserved =20 Gicd->Reserved1 =3D EFI_ACPI_RESERVED_WORD; =20 // UINT32 Identifier - Gicd->GicId =3D GicDInfo->GicId; + // One, and only one, GIC distributor structure must be present + // in the MADT for an ARM based system + Gicd->GicId =3D 0; =20 // UINT64 PhysicalBaseAddress =20 Gicd->PhysicalBaseAddress =3D GicDInfo->PhysicalBaseAddress; =20 // UINT32 VectorBase --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 31 Date: Thu, 21 Feb 2019 18:14:08 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: alexei.fedorov@arm.com, leif.lindholm@linaro.org, =09Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH v1 0/6] DynamicTablesPkg: Framework updates and =09fixes Message-ID: <20190221181414.83136-1-sami.mujawar@arm.com> This patch series updates the Dynamic Tables Framework to incorporate the following changes: =20 * Fix DEPEX to load modules in correct order. =20 * Add options for OEMs to provide OEM Table ID and revision. =20 * Update DBG2_DEBUG_PORT_DDI macro to remove unused parameter. =20 * Remove GIC Distributor ID field. =20 * Minor updates to comments and typo fixes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar The changes can be seen at: https://github.com/samimujawar/edk2/tree/473_dynamic_tables_framework_v1 The corresponding edk2-platform code changes can be seen at: https://github.com/samimujawar/edk2-platforms/tree/473_dynamic_tables_fra= mework_v1 Sami Mujawar (6): =20 DynamicTablesPkg: Fix depex and protocol section =20 DynamicTablesPkg: Rename enum used for ID Mapping =20 DynamicTablesPkg: Add OEM Info =20 DynamicTablesPkg: DGB2: Update DBG2_DEBUG_PORT_DDI =20 DynamicTablesPkg: Remove GIC Distributor Id field =20 DynamicTablesPkg: Minor updates and fix typos =20DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe= .inf | 7 +- =20DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .inf | 11 +-- =20DynamicTablesPkg/Include/ArmNameSpaceObjects.h = =20 | 73 +++++++++++++++----- =20DynamicTablesPkg/Include/Library/TableHelperLib.h = =20 | 4 +- =20DynamicTablesPkg/Include/StandardNameSpaceObjects.h = =20 | 18 +++++ =20DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c = =20 | 7 +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c = =20 | 2 +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c = =20 | 2 +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c = =20 | 8 +-- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c = =20 | 6 +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c = =20 | 2 +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c = =20 | 2 +- =20DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c = =20 | 26 +++++-- =2013 files changed, 119 insertions(+), 49 deletions(-) --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 32 Date: Thu, 21 Feb 2019 18:14:10 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: alexei.fedorov@arm.com, leif.lindholm@linaro.org, =09Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH v1 2/6] DynamicTablesPkg: Rename enum used for =09ID Mapping Message-ID: <20190221181414.83136-3-sami.mujawar@arm.com> Renamed the enum EArmObjIdMapping to EArmObjIdMappingArray and updated the IORT generator accordingly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 2 += - =20DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 6 += ++--- =202 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTabl= esPkg/Include/ArmNameSpaceObjects.h index 93cb6949f0eb2ac2ad3524494e4a14c7a6fab4b8..2adaa788083e4e15d049f5f6b= 6312f77f3c02488 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -52,7 +52,7 @@ typedef enum ArmObjectID { =20 EArmObjSmmuV3, ///< 22 - SMMUv3 =20 EArmObjPmcg, ///< 23 - PMCG =20 EArmObjGicItsIdentifierArray, ///< 24 - GIC ITS Identifier Arr= ay - EArmObjIdMapping, ///< 25 - ID Mapping + EArmObjIdMappingArray, ///< 25 - ID Mapping Array =20 EArmObjSmmuInterruptArray, ///< 26 - SMMU Interrupt Array =20 EArmObjMax =20} EARM_OBJECT_ID; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index a3ee60664ecbeb1b12b01683f838e11804884daf..b53c4bb47798d4ad441db1fe1= b1e5b180e313403 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -44,7 +44,7 @@ Requirements: =20 - EArmObjSmmuV3 =20 - EArmObjPmcg =20 - EArmObjGicItsIdentifierArray - - EArmObjIdMapping + - EArmObjIdMappingArray =20 - EArmObjGicItsIdentifierArray =20*/ =20 @@ -116,7 +116,7 @@ GET_OBJECT_LIST ( =20*/ =20GET_OBJECT_LIST ( =20 EObjNameSpaceArm, - EArmObjIdMapping, + EArmObjIdMappingArray, =20 CM_ARM_ID_MAPPING =20 ); =20 @@ -653,7 +653,7 @@ AddIdMappingArray ( =20 Generator =3D (ACPI_IORT_GENERATOR*)This; =20 =20 // Get the Id Mapping Array - Status =3D GetEArmObjIdMapping ( + Status =3D GetEArmObjIdMappingArray ( =20 CfgMgrProtocol, =20 IdMappingToken, =20 &IdMappings, --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 33 Date: Thu, 21 Feb 2019 18:14:12 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: alexei.fedorov@arm.com, leif.lindholm@linaro.org, =09Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH v1 4/6] DynamicTablesPkg: DGB2: Update =09DBG2_DEBUG_PORT_DDI Message-ID: <20190221181414.83136-5-sami.mujawar@arm.com> The DBG2_DEBUG_PORT_DDI() macro supports adding only one Generic Base Address Register. Therefore, removed the superfluous parameter NumReg and updated the macro to use DBG2_NUMBER_OF_GENERIC_ADDRESS_REGISTERS which has a value 1. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c | 5 += ---- =201 file changed, 1 insertion(+), 4 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c index 697cfc46abaedf34d30abf26e7ebb2b4d271822a..90380f48da017b257476ee63b= cc1beae5efe1d65 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c @@ -97,14 +97,12 @@ typedef struct { =20/** A helper macro used for initializing the debug port device =20 information structure. =20 - @param [in] NumReg The number of generic address registers. =20 @param [in] SubType The DBG Port SubType. =20 @param [in] UartBase The UART port base address. =20 @param [in] UartAddrLen The UART port address range length. =20 @param [in] UartNameStr The UART port name string. =20**/ =20#define DBG2_DEBUG_PORT_DDI( = \ - NumReg, \ =20 SubType, = \ =20 UartBase, = \ =20 UartAddrLen, = \ @@ -116,7 +114,7 @@ typedef struct { =20 /* UINT16 Length */ = \ =20 sizeof (DBG2_DEBUG_DEVICE_INFORMATION), = \ =20 /* UINT8 NumberofGenericAddressRegisters */ = \ - NumReg, \ + DBG2_NUMBER_OF_GENERIC_ADDRESS_REGISTERS, \ =20 /* UINT16 NameSpaceStringLength */ = \ =20 DBG2_NAMESPACESTRING_FIELD_SIZE, = \ =20 /* UINT16 NameSpaceStringOffset */ = \ @@ -164,7 +162,6 @@ DBG2_TABLE AcpiDbg2 =3D { =20 * Debug port 1 =20 */ =20 DBG2_DEBUG_PORT_DDI ( - DBG2_NUMBER_OF_GENERIC_ADDRESS_REGISTERS, =20 0, // {Template}: Serial Port Subtype =20 0, // {Template}: Serial Port Base Address =20 PL011_UART_LENGTH, --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 34 Date: Thu, 21 Feb 2019 18:14:09 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: alexei.fedorov@arm.com, leif.lindholm@linaro.org, =09Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH v1 1/6] DynamicTablesPkg: Fix depex and =09protocol section Message-ID: <20190221181414.83136-2-sami.mujawar@arm.com> Updated the DynamicTableFactoryDxe and DynamicTableManagerDxe to setup the correct dependency order. Also updated the Protocols section to reflect the protocols that are produced or consumed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe= .inf | 7 ++----- =20DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .inf | 11 +++++++---- =202 files changed, 9 insertions(+), 9 deletions(-) diff --git a/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTable= FactoryDxe.inf b/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicT= ableFactoryDxe.inf index 740811d0fc0590543a62360e6753eb04fb675d70..02c907c38023e8b44829a38ed= 93436904d8cf3d3 100644 --- a/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactory= Dxe.inf +++ b/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactory= Dxe.inf @@ -1,7 +1,7 @@ =20## @file =20# Module to manage the list of available table factories. =20# -# Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. +# Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. =20# =20# This program and the accompanying materials =20# are licensed and made available under the terms and conditions of t= he BSD License @@ -51,10 +51,7 @@ [FixedPcd] =20 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxCustomDTGenerators =20 =20[Protocols] - gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUM= ED - gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUM= ED - gEdkiiConfigurationManagerProtocolGuid - gEdkiiDynamicTableFactoryProtocolGuid + gEdkiiDynamicTableFactoryProtocolGuid # PRODUCES =20 =20[Depex] =20 TRUE diff --git a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTable= ManagerDxe.inf b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicT= ableManagerDxe.inf index 2aeaf15b157c0172c9cb073e55d789944a73e2ec..39b10b5536bc341dc253801b8= ed7640a8b5d4217 100644 --- a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManager= Dxe.inf +++ b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManager= Dxe.inf @@ -1,7 +1,7 @@ =20## @file =20# Module that drives the table generation and installation process. =20# -# Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. +# Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. =20# =20# This program and the accompanying materials =20# are licensed and made available under the terms and conditions of t= he BSD License @@ -42,9 +42,12 @@ [LibraryClasses] =20 =20[Protocols] =20 gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONS= UMED - gEdkiiConfigurationManagerProtocolGuid - gEdkiiDynamicTableFactoryProtocolGuid + + gEdkiiConfigurationManagerProtocolGuid # PROTOCOL ALWAYS_CONSUM= ED + gEdkiiDynamicTableFactoryProtocolGuid # PROTOCOL ALWAYS_CONSUM= ED =20 =20[Depex] - gEdkiiConfigurationManagerProtocolGuid + gEfiAcpiTableProtocolGuid + AND gEdkiiConfigurationManagerProtocolGuid + AND gEdkiiDynamicTableFactoryProtocolGuid =20 --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 35 Date: Thu, 21 Feb 2019 18:14:11 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: alexei.fedorov@arm.com, leif.lindholm@linaro.org, =09Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH v1 3/6] DynamicTablesPkg: Add OEM Info Message-ID: <20190221181414.83136-4-sami.mujawar@arm.com> Added option for OEMs to provide OEM Table ID and OEM Revision for ACPI tables. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20DynamicTablesPkg/Include/Library/TableHelperLib.h | 4 = +-- =20DynamicTablesPkg/Include/StandardNameSpaceObjects.h | 18 = ++++++++++++++ =20DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c | 2 = +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c | 2 = +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c | 2 = +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 2 = +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c | 2 = +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c | 2 = +- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c | 2 = +- =20DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c | 26 = ++++++++++++++------ =2010 files changed, 46 insertions(+), 16 deletions(-) diff --git a/DynamicTablesPkg/Include/Library/TableHelperLib.h b/DynamicT= ablesPkg/Include/Library/TableHelperLib.h index 3c4e1d23d2e6955388ab0b51fb57779f2225beb2..0f872bc3d08bf78e33bd8dab8= 66e7bf57e00cb8c 100644 --- a/DynamicTablesPkg/Include/Library/TableHelperLib.h +++ b/DynamicTablesPkg/Include/Library/TableHelperLib.h @@ -45,7 +45,7 @@ GetCgfMgrInfo ( =20 @param [in] Generator Pointer to the ACPI table Generator. =20 @param [in,out] AcpiHeader Pointer to the ACPI table header to b= e =20 updated. - @param [in] Revision Revision of the ACPI table. + @param [in] AcpiTableInfo Pointer to the ACPI table info structur= e. =20 @param [in] Length Length of the ACPI table. =20 =20 @retval EFI_SUCCESS The ACPI table is updated successfully= . @@ -61,7 +61,7 @@ AddAcpiHeader ( =20 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrPr= otocol, =20 IN CONST ACPI_TABLE_GENERATOR * CONST Generato= r, =20 IN OUT EFI_ACPI_DESCRIPTION_HEADER * CONST AcpiHead= er, - IN CONST UINT32 Revision, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableI= nfo, =20 IN CONST UINT32 Length =20 ); =20 diff --git a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h b/Dynami= cTablesPkg/Include/StandardNameSpaceObjects.h index 4377ee8f785399b02fec824f3a34d2f4ed3b1c01..58503858b27141cf7647a410c= 4b0b3fa574033de 100644 --- a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h @@ -93,6 +93,24 @@ typedef struct CmAStdObjAcpiTableInfo { =20 /// Optional pointer to the ACPI table data =20 EFI_ACPI_DESCRIPTION_HEADER * AcpiTableData; =20 + /// An OEM-supplied string that the OEM uses to identify the particula= r + /// data table. This field is particularly useful when defining a defi= nition + /// block to distinguish definition block functions. The OEM assigns e= ach + /// dissimilar table a new OEM Table ID. + /// This field could be constructed using the SIGNATURE_64() macro. + /// e.g. SIGNATURE_64 ('A','R','M','H','G','T','D','T') + /// Note: If this field is not populated (has value of Zero), then the= + /// Generators shall populate this information using part of the + /// CM_STD_OBJ_CONFIGURATION_MANAGER_INFO.OemId field and the + /// ACPI table signature. + UINT64 OemTableId; + + /// An OEM-supplied revision number. Larger numbers are assumed to be + /// newer revisions. + /// Note: If this field is not populated (has value of Zero), then the= + /// Generators shall populate this information using the revision of t= he + /// Configuration Manager (CM_STD_OBJ_CONFIGURATION_MANAGER_INFO.Revis= ion). + UINT32 OemRevision; =20} CM_STD_OBJ_ACPI_TABLE_INFO; =20 =20/** A structure used to describe the SMBIOS table generators to be inv= oked. diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c index e21e2b660634b1aedce8167b74573694d6df2a3b..697cfc46abaedf34d30abf26e= 7ebb2b4d271822a 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c @@ -342,7 +342,7 @@ BuildDbg2Table ( =20 CfgMgrProtocol, =20 This, =20 (EFI_ACPI_DESCRIPTION_HEADER*)&AcpiDbg2, - AcpiTableInfo->AcpiTableRevision, + AcpiTableInfo, =20 sizeof (DBG2_TABLE) =20 ); =20 if (EFI_ERROR (Status)) { diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c index 62927b51d6d7c1585da1cb0d59785e2382639002..6699901b42a63a152027de598= 87ed097748ece91 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c @@ -537,7 +537,7 @@ BuildFadtTable ( =20 CfgMgrProtocol, =20 This, =20 (EFI_ACPI_DESCRIPTION_HEADER*)&AcpiFadt, - AcpiTableInfo->AcpiTableRevision, + AcpiTableInfo, =20 sizeof (EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE) =20 ); =20 if (EFI_ERROR (Status)) { diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c index 70f52507bc7f12a776f76271b3f378bc62e717ba..d58794ee3ef5b72a8b2e3eb93= 0ad5ab5bbb57c38 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c @@ -518,7 +518,7 @@ BuildGtdtTable ( =20 CfgMgrProtocol, =20 This, =20 &Gtdt->Header, - AcpiTableInfo->AcpiTableRevision, + AcpiTableInfo, =20 TableSize =20 ); =20 if (EFI_ERROR (Status)) { diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index b53c4bb47798d4ad441db1fe1b1e5b180e313403..2bac7a59ea40d6a3cae675b39= d5df26ab7783a29 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -1798,7 +1798,7 @@ BuildIortTable ( =20 CfgMgrProtocol, =20 This, =20 &Iort->Header, - AcpiTableInfo->AcpiTableRevision, + AcpiTableInfo, =20 TableSize =20 ); =20 if (EFI_ERROR (Status)) { diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c index 06794758308e028b7d8da06670b1793cbdb3ae81..1ee0b9e006bfa00ea5bbf6aa6= 4209dac244c90a0 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c @@ -569,7 +569,7 @@ BuildMadtTable ( =20 CfgMgrProtocol, =20 This, =20 &Madt->Header, - AcpiTableInfo->AcpiTableRevision, + AcpiTableInfo, =20 TableSize =20 ); =20 if (EFI_ERROR (Status)) { diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c index 29eb72bd917227e87b8f126aa098a6e0ff3918cc..2131683a35158f40304892da9= ab12e547483a4bc 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c @@ -220,7 +220,7 @@ BuildMcfgTable ( =20 CfgMgrProtocol, =20 This, =20 &Mcfg->Header, - AcpiTableInfo->AcpiTableRevision, + AcpiTableInfo, =20 TableSize =20 ); =20 if (EFI_ERROR (Status)) { diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c index 23d3a50713d200321e3d93850c1b42e48da2faeb..5018eb8ebfb4053fe845e5403= b0ad1df373255a0 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c @@ -209,7 +209,7 @@ BuildSpcrTable ( =20 CfgMgrProtocol, =20 This, =20 (EFI_ACPI_DESCRIPTION_HEADER*)&AcpiSpcr, - AcpiTableInfo->AcpiTableRevision, + AcpiTableInfo, =20 sizeof (EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE) =20 ); =20 if (EFI_ERROR (Status)) { diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c= =20b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c index 02860ddf233b4a44c30450c8c090b416f1e07d81..203207bac2b202f568072b68e= 8cb25c5c258045f 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c @@ -100,7 +100,7 @@ GetCgfMgrInfo ( =20 @param [in] Generator Pointer to the ACPI table Generator. =20 @param [in,out] AcpiHeader Pointer to the ACPI table header to b= e =20 updated. - @param [in] Revision Revision of the ACPI table. + @param [in] AcpiTableInfo Pointer to the ACPI table info structur= e. =20 @param [in] Length Length of the ACPI table. =20 =20 @retval EFI_SUCCESS The ACPI table is updated successfully= . @@ -116,7 +116,7 @@ AddAcpiHeader ( =20 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrPr= otocol, =20 IN CONST ACPI_TABLE_GENERATOR * CONST Generato= r, =20 IN OUT EFI_ACPI_DESCRIPTION_HEADER * CONST AcpiHead= er, - IN CONST UINT32 Revision, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableI= nfo, =20 IN CONST UINT32 Length =20 ) =20{ @@ -151,7 +151,7 @@ AddAcpiHeader ( =20 // UINT32 Length =20 AcpiHeader->Length =3D Length; =20 // UINT8 Revision - AcpiHeader->Revision =3D Revision; + AcpiHeader->Revision =3D AcpiTableInfo->AcpiTableRevision; =20 // UINT8 Checksum =20 AcpiHeader->Checksum =3D 0; =20 @@ -159,12 +159,24 @@ AddAcpiHeader ( =20 CopyMem (AcpiHeader->OemId, CfgMfrInfo->OemId, sizeof (AcpiHeader->O= emId)); =20 =20 // UINT64 OemTableId - AcpiHeader->OemTableId =3D Generator->CreatorId; - AcpiHeader->OemTableId <<=3D 32; - AcpiHeader->OemTableId |=3D Generator->AcpiTableSignature; + if (AcpiTableInfo->OemTableId !=3D 0) { + AcpiHeader->OemTableId =3D AcpiTableInfo->OemTableId; + } else { + AcpiHeader->OemTableId =3D SIGNATURE_32 ( + CfgMfrInfo->OemId[0], + CfgMfrInfo->OemId[1], + CfgMfrInfo->OemId[2], + CfgMfrInfo->OemId[3] + ) | + ((UINT64)Generator->AcpiTableSignature << 3= 2); + } =20 =20 // UINT32 OemRevision - AcpiHeader->OemRevision =3D CfgMfrInfo->Revision; + if (AcpiTableInfo->OemRevision !=3D 0) { + AcpiHeader->OemRevision =3D AcpiTableInfo->OemRevision; + } else { + AcpiHeader->OemRevision =3D CfgMfrInfo->Revision; + } =20 =20 // UINT32 CreatorId =20 AcpiHeader->CreatorId =3D Generator->CreatorId; --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 36 Date: Thu, 21 Feb 2019 18:14:14 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: alexei.fedorov@arm.com, leif.lindholm@linaro.org, =09Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH v1 6/6] DynamicTablesPkg: Minor updates and fix =09typos Message-ID: <20190221181414.83136-7-sami.mujawar@arm.com> Minor updates to comments and typo fixes. Also removed unused structure CM_ARM_CPU_INFO_LIST. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 66 ++++++++++++++++--= -- =201 file changed, 55 insertions(+), 11 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTabl= esPkg/Include/ArmNameSpaceObjects.h index 73139eb3273e89205ef9e6bee67b1b842f7f516b..ec31c40449d0658f98a89ce0b= b6f604b491f1f34 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -59,6 +59,8 @@ typedef enum ArmObjectID { =20 =20/** A structure that describes the =20 ARM Boot Architecture flags. + + ID: EArmObjBootArchInfo =20*/ =20typedef struct CmArmBootArchInfo { =20 /** This is the ARM_BOOT_ARCH flags field of the FADT Table @@ -71,13 +73,10 @@ typedef struct CmArmCpuInfo { =20 // Reserved for use when SMBIOS tables are implemented =20} CM_ARM_CPU_INFO; =20 -typedef struct CmArmCpuInfoList { - UINT32 CpuCount; - CM_ARM_CPU_INFO * CpuInfo; -} CM_ARM_CPU_INFO_LIST; - =20/** A structure that describes the =20 Power Management Profile Information for the Platform. + + ID: EArmObjPowerManagementProfileInfo =20*/ =20typedef struct CmArmPowerManagementProfileInfo { =20 /** This is the Preferred_PM_Profile field of the FADT Table @@ -88,6 +87,8 @@ typedef struct CmArmPowerManagementProfileInfo { =20 =20/** A structure that describes the =20 GIC CPU Interface for the Platform. + + ID: EArmObjGicCInfo =20*/ =20typedef struct CmArmGicCInfo { =20 /// The GIC CPU Interface number. @@ -164,6 +165,8 @@ typedef struct CmArmGicCInfo { =20 =20/** A structure that describes the =20 GIC Distributor information for the Platform. + + ID: EArmObjGicDInfo =20*/ =20typedef struct CmArmGicDInfo { =20 /// The Physical Base address for the GIC Distributor. @@ -184,6 +187,8 @@ typedef struct CmArmGicDInfo { =20 =20/** A structure that describes the =20 GIC MSI Frame information for the Platform. + + ID: EArmObjGicMsiFrameInfo =20*/ =20typedef struct CmArmGicMsiFrameInfo { =20 /// The GIC MSI Frame ID @@ -207,6 +212,8 @@ typedef struct CmArmGicMsiFrameInfo { =20 =20/** A structure that describes the =20 GIC Redistributor information for the Platform. + + ID: EArmObjGicRedistributorInfo =20*/ =20typedef struct CmArmGicRedistInfo { =20 /** The physical address of a page range @@ -220,6 +227,8 @@ typedef struct CmArmGicRedistInfo { =20 =20/** A structure that describes the =20 GIC Interrupt Translation Service information for the Platform. + + ID: EArmObjGicItsInfo =20*/ =20typedef struct CmArmGicItsInfo { =20 /// The GIC ITS ID @@ -231,6 +240,9 @@ typedef struct CmArmGicItsInfo { =20 =20/** A structure that describes the =20 Serial Port information for the Platform. + + ID: EArmObjSerialConsolePortInfo or + EArmObjSerialDebugPortInfo =20*/ =20typedef struct CmArmSerialPortInfo { =20 /// The physical base address for the serial port @@ -251,6 +263,8 @@ typedef struct CmArmSerialPortInfo { =20 =20/** A structure that describes the =20 Generic Timer information for the Platform. + + ID: EArmObjGenericTimerInfo =20*/ =20typedef struct CmArmGenericTimerInfo { =20 /// The physical base address for the counter control frame @@ -286,6 +300,8 @@ typedef struct CmArmGenericTimerInfo { =20 =20/** A structure that describes the =20 Platform Generic Block Timer Frame information for the Platform. + + ID: EArmObjGTBlockTimerFrameInfo =20*/ =20typedef struct CmArmGTBlockTimerFrameInfo { =20 /// The Generic Timer frame number @@ -321,6 +337,8 @@ typedef struct CmArmGTBlockTimerFrameInfo { =20 =20/** A structure that describes the =20 Platform Generic Block Timer information for the Platform. + + ID: EArmObjPlatformGTBlockInfo =20*/ =20typedef struct CmArmGTBlockInfo { =20 /// The physical base address for the GT Block Timer structure @@ -335,6 +353,8 @@ typedef struct CmArmGTBlockInfo { =20 =20/** A structure that describes the =20 SBSA Generic Watchdog information for the Platform. + + ID: EArmObjPlatformGenericWatchdogInfo =20*/ =20typedef struct CmArmGenericWatchdogInfo { =20 /// The physical base address of the SBSA Watchdog control frame @@ -354,6 +374,8 @@ typedef struct CmArmGenericWatchdogInfo { =20 =20/** A structure that describes the =20 PCI Configuration Space information for the Platform. + + ID: EArmObjPciConfigSpaceInfo =20*/ =20typedef struct CmArmPciConfigSpaceInfo { =20 /// The physical base address for the PCI segment @@ -371,6 +393,8 @@ typedef struct CmArmPciConfigSpaceInfo { =20 =20/** A structure that describes the =20 Hypervisor Vendor ID information for the Platform. + + ID: EArmObjHypervisorVendorIdentity =20*/ =20typedef struct CmArmHypervisorVendorId { =20 /// The hypervisor Vendor ID @@ -379,6 +403,8 @@ typedef struct CmArmHypervisorVendorId { =20 =20/** A structure that describes the =20 Fixed feature flags for the Platform. + + ID: EArmObjFixedFeatureFlags =20*/ =20typedef struct CmArmFixedFeatureFlags { =20 /// The Fixed feature flags @@ -387,9 +413,11 @@ typedef struct CmArmFixedFeatureFlags { =20 =20/** A structure that describes the =20 ITS Group node for the Platform. + + ID: EArmObjItsGroup =20*/ =20typedef struct CmArmItsGroupNode { - /// An unique token used to ideintify this object + /// An unique token used to identify this object =20 CM_OBJECT_TOKEN Token; =20 /// The number of ITS identifiers in the ITS node =20 UINT32 ItsIdCount; @@ -399,6 +427,8 @@ typedef struct CmArmItsGroupNode { =20 =20/** A structure that describes the =20 GIC ITS Identifiers for an ITS Group node. + + ID: EArmObjGicItsIdentifierArray =20*/ =20typedef struct CmArmGicItsIdentifier { =20 /// The ITS Identifier @@ -407,9 +437,11 @@ typedef struct CmArmGicItsIdentifier { =20 =20/** A structure that describes the =20 Named component node for the Platform. + + ID: EArmObjNamedComponent =20*/ =20typedef struct CmArmNamedComponentNode { - /// An unique token used to ideintify this object + /// An unique token used to identify this object =20 CM_OBJECT_TOKEN Token; =20 /// Number of ID mappings =20 UINT32 IdMappingCount; @@ -436,9 +468,11 @@ typedef struct CmArmNamedComponentNode { =20 =20/** A structure that describes the =20 Root complex node for the Platform. + + ID: EArmObjRootComplex =20*/ =20typedef struct CmArmRootComplexNode { - /// An unique token used to ideintify this object + /// An unique token used to identify this object =20 CM_OBJECT_TOKEN Token; =20 /// Number of ID mappings =20 UINT32 IdMappingCount; @@ -462,9 +496,11 @@ typedef struct CmArmRootComplexNode { =20 =20/** A structure that describes the =20 SMMUv1 or SMMUv2 node for the Platform. + + ID: EArmObjSmmuV1SmmuV2 =20*/ =20typedef struct CmArmSmmuV1SmmuV2Node { - /// An unique token used to ideintify this object + /// An unique token used to identify this object =20 CM_OBJECT_TOKEN Token; =20 /// Number of ID mappings =20 UINT32 IdMappingCount; @@ -502,9 +538,11 @@ typedef struct CmArmSmmuV1SmmuV2Node { =20 =20/** A structure that describes the =20 SMMUv3 node for the Platform. + + ID: EArmObjSmmuV3 =20*/ =20typedef struct CmArmSmmuV3Node { - /// An unique token used to ideintify this object + /// An unique token used to identify this object =20 CM_OBJECT_TOKEN Token; =20 /// Number of ID mappings =20 UINT32 IdMappingCount; @@ -536,9 +574,11 @@ typedef struct CmArmSmmuV3Node { =20 =20/** A structure that describes the =20 PMCG node for the Platform. + + ID: EArmObjPmcg =20*/ =20typedef struct CmArmPmcgNode { - /// An unique token used to ideintify this object + /// An unique token used to identify this object =20 CM_OBJECT_TOKEN Token; =20 /// Number of ID mappings =20 UINT32 IdMappingCount; @@ -558,6 +598,8 @@ typedef struct CmArmPmcgNode { =20 =20/** A structure that describes the =20 ID Mappings for the Platform. + + ID: EArmObjIdMappingArray =20*/ =20typedef struct CmArmIdMapping { =20 /// Input base @@ -574,6 +616,8 @@ typedef struct CmArmIdMapping { =20 =20/** A structure that describes the =20 SMMU interrupts for the Platform. + + ID: EArmObjSmmuInterruptArray =20*/ =20typedef struct CmArmSmmuInterrupt { =20 /// Interrupt number --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 37 Date: Thu, 21 Feb 2019 18:15:25 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: Sami Mujawar , ard.biesheuvel@linaro.org, =09leif.lindholm@linaro.org, michael.d.kinney@intel.com, =09alexei.fedorov@arm.com, Matteo.Carlini@arm.com, =09Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH edk2-platforms v1 4/4] Platform/ARM: Juno: =09Config Mgr remove GICD ID Message-ID: <20190221181525.49624-5-sami.mujawar@arm.com> According to ACPI 6.2 Specification - Errata A, 'One, and only one, GIC distributor structure must be present in the MADT for an ARM based system'. Accordingly the CM_ARM_GICD_INFO structure has been updated to remove the GicId field as this value is set to zero by the MADT generator. This update reflects the corresponding change required to the Configuration Manager. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManager.c | 1 - =201 file changed, 1 deletion(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManag= erDxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/= ConfigurationManagerDxe/ConfigurationManager.c index 55f0984ee6741f5434dd1ec673281c78e2a576f2..444c1d95af27d938da76e00e4= 1756b800b977589 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/C= onfigurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/C= onfigurationManager.c @@ -145,7 +145,6 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformReposit= oryInfo =3D { =20 =20 // GIC Distributor Info =20 { - 0, // UINT32 GicId =20 FixedPcdGet64 (PcdGicDistributorBase), // UINT64 PhysicalBaseAdd= ress =20 0, // UINT32 SystemVectorBas= e =20 2 // UINT8 GicVersion --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 38 Date: Thu, 21 Feb 2019 18:15:22 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: Sami Mujawar , ard.biesheuvel@linaro.org, =09leif.lindholm@linaro.org, michael.d.kinney@intel.com, =09alexei.fedorov@arm.com, Matteo.Carlini@arm.com, =09Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH edk2-platforms v1 1/4] Platform/ARM: Juno: =09Configuration Manager depex Message-ID: <20190221181525.49624-2-sami.mujawar@arm.com> The Configuration Manager needs to be loaded before other Dynamic Tables Framework Modules. Fix the DEPEX section for Configuration Manager Dxe to remove incorrect dependency. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManagerDxe.inf | 4 ++-- =201 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManag= erDxe/ConfigurationManagerDxe.inf b/Platform/ARM/JunoPkg/ConfigurationMan= ager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf index 1491653ab8fe4d44ce11bdf9116f187cc3edf817..a8ef27108237d5cdf20166cff= e7a348ebb2b2b12 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/C= onfigurationManagerDxe.inf +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/C= onfigurationManagerDxe.inf @@ -1,7 +1,7 @@ =20## @file =20# Configuration Manager Dxe =20# -# Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. +# Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. =20# =20# This program and the accompanying materials =20# are licensed and made available under the terms and conditions of t= he BSD License @@ -83,4 +83,4 @@ [FixedPcd] =20[Pcd] =20 =20[Depex] - gEdkiiDynamicTableFactoryProtocolGuid + TRUE --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 39 Date: Thu, 21 Feb 2019 18:15:24 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: Sami Mujawar , ard.biesheuvel@linaro.org, =09leif.lindholm@linaro.org, michael.d.kinney@intel.com, =09alexei.fedorov@arm.com, Matteo.Carlini@arm.com, =09Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH edk2-platforms v1 3/4] Platform/ARM: FVP: =09Config Mgr remove GICD ID Message-ID: <20190221181525.49624-4-sami.mujawar@arm.com> According to ACPI 6.2 Specification - Errata A, 'One, and only one, GIC distributor structure must be present in the MADT for an ARM based system'. Accordingly the CM_ARM_GICD_INFO structure has been updated to remove the GicId field as this value is set to zero by the MADT generator. This update reflects the corresponding change required to the Configuration Manager. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/= ConfigurationManager.c | 1 - =201 file changed, 1 deletion(-) diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationM= anagerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/Configuration= Manager/ConfigurationManagerDxe/ConfigurationManager.c index 66ee79341dfeceff1dc70c32b308056d87b99540..cdde32f6b43e876d8869941b4= a11b0da8c72224e 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerD= xe/ConfigurationManager.c +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerD= xe/ConfigurationManager.c @@ -116,7 +116,6 @@ EDKII_PLATFORM_REPOSITORY_INFO VExpressPlatRepository= Info =3D { =20 =20 // GIC Distributor Info =20 { - 0, // UINT32 GicId =20 FixedPcdGet64 (PcdGicDistributorBase), // UINT64 PhysicalBaseAdd= ress =20 0, // UINT32 SystemVectorBas= e =20 3 // UINT8 GicVersion --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 40 Date: Thu, 21 Feb 2019 18:15:23 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: Sami Mujawar , ard.biesheuvel@linaro.org, =09leif.lindholm@linaro.org, michael.d.kinney@intel.com, =09alexei.fedorov@arm.com, Matteo.Carlini@arm.com, =09Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH edk2-platforms v1 2/4] Platform/ARM: FVP: =09Configuration Manager depex Message-ID: <20190221181525.49624-3-sami.mujawar@arm.com> The Configuration Manager needs to be loaded before other Dynamic Tables Framework Modules. Fix the DEPEX section for Configuration Manager Dxe to remove incorrect dependency. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- =20Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/= ConfigurationManagerDxe.inf | 4 ++-- =201 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationM= anagerDxe/ConfigurationManagerDxe.inf b/Platform/ARM/VExpressPkg/Configur= ationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf index c4c8f462b8fa8ea718589f2265ae42953ac0a49a..299c61f10f6fe41060d648a6f= adcc63c310108a9 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerD= xe/ConfigurationManagerDxe.inf +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerD= xe/ConfigurationManagerDxe.inf @@ -1,7 +1,7 @@ =20## @file =20# Configuration Manager Dxe =20# -# Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. +# Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. =20# =20# This program and the accompanying materials =20# are licensed and made available under the terms and conditions of t= he BSD License @@ -76,4 +76,4 @@ [FixedPcd] =20[Pcd] =20 =20[Depex] - gEdkiiDynamicTableFactoryProtocolGuid + TRUE --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 41 Date: Thu, 21 Feb 2019 18:15:21 +0000 From: Sami Mujawar To: edk2-devel@lists.01.org Cc: Sami Mujawar , ard.biesheuvel@linaro.org, =09leif.lindholm@linaro.org, michael.d.kinney@intel.com, =09alexei.fedorov@arm.com, Matteo.Carlini@arm.com, =09Stephanie.Hughes-Fitt@arm.com, nd@arm.com Subject: [edk2] [PATCH edk2-platforms v1 0/4] Platform/ARM: Updates =09corresponding to Dynamic Tables Framework changes Message-ID: <20190221181525.49624-1-sami.mujawar@arm.com> The Dynamic tables framework has been updated to incorporated a series of= updates namely: =20 * Resolving DEPEX order for modules. =20 * Removing GIC Distributor ID This patch series implement the corresponding changes required in the pla= tform Configuration Manager. Note: This patch series is dependent on the patch series: https://lists.01.org/pipermail/edk2-devel/2019-January/035611.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar The changes can be seen at: https://github.com/samimujawar/edk2-platforms/tree/473_dynamic_tables_fra= mework_v1 The corresponding edk2 code changes can be seen at: https://github.com/samimujawar/edk2/tree/473_dynamic_tables_framework_v1 Sami Mujawar (4): =20 Platform/ARM: Juno: Configuration Manager depex =20 Platform/ARM: FVP: Configuration Manager depex =20 Platform/ARM: FVP: Config Mgr remove GICD ID =20 Platform/ARM: Juno: Config Mgr remove GICD ID =20Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManager.c | 1 - =20Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManagerDxe.inf | 4 ++-- =20Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/= ConfigurationManager.c | 1 - =20Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/= ConfigurationManagerDxe.inf | 4 ++-- =204 files changed, 4 insertions(+), 6 deletions(-) --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' ------------------------------ Message: 42 Date: Thu, 21 Feb 2019 11:38:55 -0700 From: Ashish Singhal To: Cc: , , Ashish Singhal =09 Subject: [edk2] [PATCH 0/2] DynamicTablesPkg Updates Message-ID: Content-Type: text/plain DynamicTablesPkg/DynamicTableManagerDxe: Update DEPEX This patch adds appropriate dependencies to DynamicTableManagerDxe. The initialization function fails if gEdkiiDynamicTableFactoryProtocolGui= d and gEdkiiConfigurationManagerProtocolGuid are not present already. Since= we are not relying on a callback but locating these in initialization, we= should add these dependencies. Towards the end of initialization function= where we build and install ACPI tables, we locate gEfiAcpiTableProtocolGu= id and return a failure is not present. We need to add approriate dependency= for this as well. Adding these proper dependencies would make the code no= t rely on drivers forcefully dispatched in a particular order DynamicTablesPkg/AcpiSpcrLibArm: Support 16550 UART. This patch adds support for 16550 UART in ACPI SPCR table. HLOS support f= or this type of UART is already present. Both the patches have been verified to work on hardware. Ashish Singhal (2): =20 DynamicTablesPkg/DynamicTableManagerDxe: Update DEPEX =20 DynamicTablesPkg/AcpiSpcrLibArm: Support 16550 UART. =20.../Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.inf = | 4 +++- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c = | 2 ++ =202 files changed, 5 insertions(+), 1 deletion(-) --=20 2.7.4 ------------------------------ Message: 43 Date: Thu, 21 Feb 2019 11:38:57 -0700 From: Ashish Singhal To: Cc: , , Ashish Singhal =09 Subject: [edk2] [PATCH 2/2] DynamicTablesPkg/AcpiSpcrLibArm: Support =0916550 UART. Message-ID: =09<8960abcec179f116cc195523ae826eecc2968d4a.1550773480.git.ashishsingha@= nvidia.com> =09 Content-Type: text/plain Add support for 16550 UART to ACPI SPCR table as it is a supported UART type by HLOS. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ashish Singhal --- =20DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c | 2 += + =201 file changed, 2 insertions(+) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c index 23d3a50..a4654ac 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c @@ -189,6 +189,8 @@ BuildSpcrTable ( =20 (SerialPortInfo->PortSubtype !=3D =20 EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART) && =20 (SerialPortInfo->PortSubtype !=3D + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550) && + (SerialPortInfo->PortSubtype !=3D =20 EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_DCC)) { =20 Status =3D EFI_INVALID_PARAMETER; =20 DEBUG (( --=20 2.7.4 ------------------------------ Message: 44 Date: Thu, 21 Feb 2019 11:38:56 -0700 From: Ashish Singhal To: Cc: , , Ashish Singhal =09 Subject: [edk2] [PATCH 1/2] DynamicTablesPkg/DynamicTableManagerDxe: =09Update DEPEX Message-ID: =09<1015295535e2bf2b69a321be1b913be45a77fc94.1550773480.git.ashishsingha@= nvidia.com> =09 Content-Type: text/plain DynamicTableManagerDxe initialization fails if gEdkiiDynamicTableFactoryProtocolGuid, gEdkiiConfigurationManagerProtocolGuid and gEfiAcpiTableProtocolGuid are not already available. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ashish Singhal --- =20.../Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.inf = | 4 +++- =201 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTable= ManagerDxe.inf b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicT= ableManagerDxe.inf index 2aeaf15..fef8b20 100644 --- a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManager= Dxe.inf +++ b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManager= Dxe.inf @@ -46,5 +46,7 @@ =20 gEdkiiDynamicTableFactoryProtocolGuid =20 =20[Depex] - gEdkiiConfigurationManagerProtocolGuid + gEfiAcpiTableProtocolGuid AND + gEdkiiConfigurationManagerProtocolGuid AND + gEdkiiDynamicTableFactoryProtocolGuid =20 --=20 2.7.4 ------------------------------ Message: 45 Date: Thu, 21 Feb 2019 20:25:17 +0100 From: Laszlo Ersek To: Julien Grall , edk2-devel@lists.01.org Cc: michael.d.kinney@intel.com Subject: Re: [edk2] [PATCH] Maintainers.txt: Update e-mail address for =09Julien Grall Message-ID: Content-Type: text/plain; charset=3Dutf-8 On 02/21/19 16:21, Julien Grall wrote: > I don't watch much my Linaro e-mail anymore. So update my e-mail addres= s > from Linaro to the Arm one. >=20 > Contributed-under: Tianocore Contribution Agreement 1.1 > Signed-off-by: Julien Grall > --- > Maintainers.txt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/Maintainers.txt b/Maintainers.txt > index 3b2676bc32..1e3fdc1de9 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -80,7 +80,7 @@ ArmVirtPkg > W: https://github.com/tianocore/tianocore.github.io/wiki/ArmVirtPkg > M: Laszlo Ersek > M: Ard Biesheuvel > -R: Julien Grall > +R: Julien Grall > =20 > BaseTools > W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools > @@ -217,7 +217,7 @@ M: Jordan Justen > M: Laszlo Ersek > M: Ard Biesheuvel > R: Anthony Perard > -R: Julien Grall > +R: Julien Grall > S: Maintained > =20 > PcAtChipsetPkg >=20 Pushed as commit 98fc52c44eee. Thanks Laszlo ------------------------------ Message: 46 Date: Thu, 21 Feb 2019 20:42:38 +0100 From: Laszlo Ersek To: edk2-devel@lists.01.org Cc: Jordan Justen , Michael D Kinney =09, Anthony Perard =09 Subject: Re: [edk2] [PATCH v2 0/2] Maintainers: updates for ArmVirtPkg =09and OvmfPkg Message-ID: <258dda29-8f6e-1658-ccdf-db323e533ee8@redhat.com> Content-Type: text/plain; charset=3Dutf-8 On 02/21/19 13:28, Laszlo Ersek wrote: > Previous version: > [edk2] [PATCH] Maintainers: add TPM2 reviewers for OvmfPkg > https://lists.01.org/pipermail/edk2-devel/2019-February/036495.html >=20 > Patch #1 in v2 is an iteration of the above. Patch #2 in v2 is new. >=20 > Cc: Andrew Fish > Cc: Anthony Perard > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Julien Grall > Cc: Leif Lindholm > Cc: Marc-Andr? Lureau > Cc: Michael D Kinney > Cc: Stefan Berger >=20 > Thanks, > Laszlo >=20 > Laszlo Ersek (2): > Maintainers: add TPM2 reviewers for OvmfPkg > Maintainers: specify the scope for OvmfPkg/ArmVirtPkg Xen module > reviewers >=20 > Maintainers.txt | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 Pushed as commit range 98fc52c44eee..94e0dd1afe53. Thanks, Laszlo ------------------------------ Subject: Digest Footer _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ------------------------------ End of edk2-devel Digest, Vol 44, Issue 53 ****************************************** -------------------------------------------------------------------------= ---------- This email message is for the sole use of the intended recipient(s) and m= ay contain confidential information. Any unauthorized review, use, disclosure or di= stribution is prohibited. If you are not the intended recipient, please contact the= =20sender by reply email and destroy all copies of the original message. -------------------------------------------------------------------------= ----------