From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.3877.1642042105674485540 for ; Wed, 12 Jan 2022 18:48:25 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=CaeoNUcV; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: nathaniel.l.desimone@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642042105; x=1673578105; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=i0ky0gH3EywI7RKI5uPKpefqiWY4qsOFluSkibl5+/s=; b=CaeoNUcVPvRQS7CO6g38NDRRggv6rtCk247JMH6Wvuyc76N8yYf/LUUu 3/FtaO9XNJr6RHVeza+jaXySCDfFDpvsYZcx95WsNglrVWRFG75mMORaO ZhFIcV62pK4azmGiJzp6hCqyYMzMNTPlMe2nhxd+6AaJ5o3W+dGT8e53u +l+zRLdZTLUpTrGxEDGVtqNvX/FN/b+YtXmXm105dVwDh3W5LPAhvJlfU gtbyuplJvFau7D/rWeKQoY/UJwrVhL4azYBxJPP9l/a5SVf0FFpicXLfx z6f+6+Xdsy7INctHKO91VQdrGnSVz8WD3hLtqT3rPRJqmS6tl6p0469Y9 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10225"; a="307261664" X-IronPort-AV: E=Sophos;i="5.88,284,1635231600"; d="scan'208";a="307261664" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2022 18:48:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,284,1635231600"; d="scan'208";a="691628694" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga005.jf.intel.com with ESMTP; 12 Jan 2022 18:48:24 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 12 Jan 2022 18:48:24 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 12 Jan 2022 18:48:24 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 12 Jan 2022 18:48:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EaxjvY0e6SMk87k2UeHXvW7MhL3TtC3z86zClmKepCA72qvNvoHMr8MXOaubQaKFCszDYDQNWrljMC/Xf2POkuzZQz6IUm7e5zaBfzhvgrzVf3j/fQoszq8jJCWwB6Oo39V7ShmRnylKGqKZDdCfFpuouGv7IZxvFMFfvEXvKeUEaEuh6U+4t2TjpSIMzronqGiO2KBrDqKGRWaRaHu4Xu0FA/hRInQtLs4jOSQOqckpyqAe5ciwlOV9sow25pKkjGoxagM/oAfEoPIU1baGNtFGoBBGYvDbJMPKp1yMhBXjvPBeuMhSlJGgc9LZAGI4uEBdxQ1xJXyL8opE0HAdkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8wkgZB0juxV8HaRSz9MaAZAzznCToh3DODS495oFcCQ=; b=kGObVAS+Rpo4oKoBi7/sGPtWswIEFz4mAC09VtrBimnjldWdh3hTAa9TiRRk1QM/gxuw024JGKCv2NQdM2rDgN8l5duKn/0LqeRgWstQzieqoa4gCTnJZeQGavY7oAhJG6uF+9GnYAxzzM38c9FA/wpI0jR0mfSdAuOku7SgHWfqkrepWV/1XZZ4FbJ6JGcw3AmCbmL2PdNvU35Q5y9S09j4RvFmHTKxYOM2eociy9RtR0NZtMyMIluWuir4nPAAieac1/VBhAPSGZ2xfCgIxkkmQrlq0+LC2oR+h9bpD36mBZI88+txrQ/phdwmvAYjAYa9iVrsNGFZ/kUUHNTxzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5821.namprd11.prod.outlook.com (2603:10b6:303:184::5) by MW5PR11MB5812.namprd11.prod.outlook.com (2603:10b6:303:193::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.11; Thu, 13 Jan 2022 02:48:21 +0000 Received: from MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6920:39b9:e18c:9dc5]) by MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6920:39b9:e18c:9dc5%8]) with mapi id 15.20.4867.011; Thu, 13 Jan 2022 02:48:21 +0000 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Oram, Isaac W" CC: "Dong, Eric" , "Gao, Liming" Subject: Re: [edk2-devel][edk2-platforms][PATCH V1 17/27] PostCodeDebugFeaturePkg: Complete as an advanced feature Thread-Topic: [edk2-devel][edk2-platforms][PATCH V1 17/27] PostCodeDebugFeaturePkg: Complete as an advanced feature Thread-Index: AQHYB1suo5bX14p6p0qgCEEHJ1MTkqxgJGag Date: Thu, 13 Jan 2022 02:48:21 +0000 Message-ID: References: <919e3268a0358c3d751c6ae5ce1e134d8ef35abc.1641953242.git.isaac.w.oram@intel.com> In-Reply-To: <919e3268a0358c3d751c6ae5ce1e134d8ef35abc.1641953242.git.isaac.w.oram@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b8d7639a-b6b3-45a1-432a-08d9d63f2997 x-ms-traffictypediagnostic: MW5PR11MB5812:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Jr5M8C6Hu82bwKCWHtVUgIHmOgFvdor8wTQjKTl/RGjKfaAI3+dLbLvQBzk/BigU/jXYDVjYHbpfqZvuOgnwTT/+CDfEB2M8H6DJHSlqHkcXKReyLmFI6KeVOcxrDpFgbLkcGkz8fLOTCoIMC4CsUQCrYnkbh4zLacfZYaxrcvZXHvzk4zCT9EbWdGZ+4yfgW4OgNUVXapXbV2NF6RCoIvXHozghxU9uykue4253YKqt8kOjiVSIGoAwPBddlHSt0MhNh3H014KqLe39AIeXGLCk8HPus78d1kpGOL/REn8j1KJjJQiLTO9PRC6rt/qAnq5d3FbgdlRdgQZC4LlUWFiqZd+MANHn4459Jx9EiY3x7Ya0Ro8/NM+gPCBBiIDYlxueO3Aex1AzaED4YI3GZ9oW4YcXrjTSv/8tPFJgSzYQzOAJnSmPXd7yW/lsQkXyZMnGpQaEiRD0oIydjhUGuB03gSSxrUAgT7xgjJ3NO5En5X1cTPhoZoB/fvoYzEfVlPiFz/ILfGDmuoe4V1CbQneKKe3MRyLQ1WMaAixV5oktraZLibUPNZzKnIpbmDi7FVnAR4SRMYIyb7TCjAmmOFbpZ4MTme6rTDFSTeQCpfDK0PtVsVWAv9PhQSI5yqa306Lvqm1ul2U6p6ARY8A0Q5TkCxWbBqwY4Q1MUgIy6ZhW1uorfEyny6YAtwN+ruFCvE8xWycQWPuo8ZIxyHthb/PTyA8vPpOSXT8uFsk4zSl3N+3ROo9j6KBQxXvP1vGAarlq+X59bXcwix0wv2ldNYEUyDHvd0dhOXWEmDqWSK7vXUz5++bwrcKok8MZTI/BFib5jTMKfqk7juAlnP0ZQuO3WWKeTDqMphEPXV/DVu0= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5821.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(38100700002)(508600001)(53546011)(2906002)(54906003)(82960400001)(966005)(8676002)(110136005)(26005)(83380400001)(64756008)(66556008)(7696005)(9686003)(52536014)(33656002)(55016003)(5660300002)(4326008)(6506007)(76116006)(122000001)(66446008)(186003)(30864003)(6636002)(66946007)(316002)(66476007)(71200400001)(38070700005)(86362001)(8936002)(213903007)(579004)(559001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hlR/6ZLoL3AfrrBWQxwdCxT9oNH3Lts7ppUi1Ld6kjInPJgrWcndrE1Hw9/M?= =?us-ascii?Q?xyPv2fTZlHfW27i7bmALmuNJN6CTGDMzD9WR2J6rM7qvtleIDUbz//P0dXJc?= =?us-ascii?Q?5LfvZcdrWPeHX59z/s8FtIO3MrDoiu/BrVbSQTP7ZwW2N15MAd2TJVI7PwR5?= =?us-ascii?Q?tEJnzUU+5Dysck/2iS3JbYFdP0H0AZh43mHYP74VqhtFy2p9bBTLekYMEwGK?= =?us-ascii?Q?INm/BA3aDKhzP3VlmM18CikghYB9rhxX9wFvNk9rBBG8Cwdr53z7crMotLo+?= =?us-ascii?Q?LIs+99GaE42bwpWh2G92iqYyQmuW/13lS3W5dA8PJVnEcDz3d6Q0xYyuJDGZ?= =?us-ascii?Q?ZgWRRCFPf6x5SPRs4QUoB2mgwKd39rrPWa3HlIyZlxoV6rweZ8ERlDTeUWE7?= =?us-ascii?Q?AF/YuJbD8qbv6kTg3Q2wCcDLFV8wNGQcRDDAcyJhjS3MR7vyB0ZatDHeRiQW?= =?us-ascii?Q?pqgYiCWhVLhz0fBflSwMLJNNxo0E2hZ/sj8Rw/kQdB1H/Tds0slgoHS1f+cZ?= =?us-ascii?Q?6HuzHaiuhm8ec5oSRDFCy8kXUqoUhB1N8+cfP2nH+4PIi/Un+ZD0M20/uH5i?= =?us-ascii?Q?DC8fsUYItZu1rzmaIH9YfphYrijNV+ajn3fQAyFekiDiA9+tzuvsWf/wmoeq?= =?us-ascii?Q?xZENrtlJcWfInf34KpQIl6NT412uK42TqJGY0w92GjhNQOrfNAR6aou4O28e?= =?us-ascii?Q?dG2S/d5Mu+SXQ3iiB9LfJRymmcPpVFiLbzXEij26WG82a0WPY9p734aK9Vm7?= =?us-ascii?Q?ecHMEW+pfaC0X519j+4Jjh8/DdjoYh5GzGS7kdf/ycOQry+BSKWCKYSFThso?= =?us-ascii?Q?HXvHfyz2fZMhC6RMAOMPieRjuGocH0WHxUeFO9c64c/2/dVk+PApx/hkwlag?= =?us-ascii?Q?KWr6xHI9yYAtK0ukYRYIJ75ntFy8oxtz3sFmvhTilij40o2m6WK4YnR6u/rs?= =?us-ascii?Q?4u+xjtm0j823ywIf9RxhzxU8V+rCzUb1qm2/vuDkP77lgfZF1iZ8uCCqUcqx?= =?us-ascii?Q?LF32FZorgGKB4H9vEvNt3Lva/Lh9hFL9K44Z7TX0rjqnXYifRecPhtqT2BDT?= =?us-ascii?Q?+NLtfX1w/a+njQKr77L8IvFxXsnT0NWyfbQyEhIJHyiPVnm7Jan+pcDFUI5W?= =?us-ascii?Q?O57A59Ko+tFGmJqMZzVunNisLqUn0hqZacLKDQRazp4ssKpRCAyctj9pzsNn?= =?us-ascii?Q?y4QGGubNoQJmQoIZlL+45jbUyw89OA5ablEpj276d2amhFuKVAQwxfk+jUds?= =?us-ascii?Q?5FVUDgluhDy0HWhta0zPwaH9qolJM63AR1h1m/whYQibRgurJBmL/6w/CDs/?= =?us-ascii?Q?NiH8V+g5g+UDioTWwG2NV21BSaiGP13MVtg+fwFLoPsh2wJXHSE7qJ5qVTPs?= =?us-ascii?Q?f0yTtyParn8pug8B8NiYeZvkyM2/RwbC8KUYFnhfJFFcQV+LMGJR5q+ce3Wx?= =?us-ascii?Q?XQD/tOFbQ0f6CPl91YyKtp+9UJaIgQOsBV0a7eQhSMA3/wMufdJtlLZQ8MZr?= =?us-ascii?Q?NW4fwSR69+NCv54VF96hGU3DwmGEy8KD11yh68to9SrKtJjL4xnAiCzMIFDk?= =?us-ascii?Q?GhBBfnMBNuePVwQYEpOm8CfalgLRnitmMMgVrx58Y6LwX+NW1Ua0zdt72v0w?= =?us-ascii?Q?i80BDnno/zPav68aFnzjhXFAsw26Yv9pqG8GmAzIAl39RJSC9pQIX+gaYWeJ?= =?us-ascii?Q?8cj9iQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8d7639a-b6b3-45a1-432a-08d9d63f2997 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2022 02:48:21.7448 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wbJujaZdrTfO5YAaFekkeKLmaTnQHd1fG5+jWmvJBH9ZxefMDxbk3BcvzoLYOHgJZ0UIV6Q0FvDNqfp9IcqF3glvlhIYO5Kv7L+ucrhjC7s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR11MB5812 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Issac, Comments inline. Thanks, Nate > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Oram, > Isaac W > Sent: Tuesday, January 11, 2022 6:20 PM > To: devel@edk2.groups.io > Cc: Oram, Isaac W ; Dong, Eric > ; Gao, Liming > Subject: [edk2-devel][edk2-platforms][PATCH V1 17/27] > PostCodeDebugFeaturePkg: Complete as an advanced feature >=20 > Add feature enable PCD. > Use MinPlatformPkg build include files. > Fix PEI_COR typo in PEI handler lib. > Build StatusCodeHandler components with unique filename GUID. > Add PreMemory.fdf and PostMemory.fdf include files. > Improve Readme formatting and feature enabling checklist. >=20 > Cc: Eric Dong > Cc: Liming Gao >=20 > Signed-off-by: Isaac Oram > --- >=20 > Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDe > bugFeature.dsc | 231 +++++-------= -------- >=20 > Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMemor > y.fdf | 14 ++ >=20 > Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemory. > fdf | 13 ++ >=20 > Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStat > usCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf | 2 +- >=20 > Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeat > urePkg.dec | 11 + >=20 > Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeat > urePkg.dsc | 30 +++ > Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md > | 31 ++- > 7 files changed, 146 insertions(+), 186 deletions(-) >=20 > diff --git > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode > DebugFeature.dsc > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode > DebugFeature.dsc > index 3d886fff38..31b0c02e79 100644 > --- > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode > DebugFeature.dsc > +++ > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode > D > +++ ebugFeature.dsc > @@ -12,192 +12,71 @@ > # > ## >=20 > - > ########################################################## > ###################### > -# > -# Defines Section - statements that will be processed to create a Makefi= le. > -# > - > ########################################################## > ###################### > [Defines] > -!ifndef $(PEI_ARCH) > - !error "PEI_ARCH must be specified to build this feature!" > -!endif > -!ifndef $(DXE_ARCH) > - !error "DXE_ARCH must be specified to build this feature!" > -!endif > + !ifndef $(PEI_ARCH) > + !error "PEI_ARCH must be specified to build this feature!" > + !endif > + !ifndef $(DXE_ARCH) > + !error "DXE_ARCH must be specified to build this feature!" > + !endif >=20 > - > ########################################################## > ###################### > -# > -# PCD Section - list of PCD Entries modified by the feature. > -# > - > ########################################################## > ###################### > + DEFINE POST_CODE_PEIM_FILENAME =3D 3ea07dd3-f837-40c0-ac56- > f3e18a30d01b > + DEFINE POST_CODE_DXE_FILENAME =3D e7d785f5-e2f3-45e3-b0e7- > 2291a6c6dea6 > + DEFINE POST_CODE_SMM_FILENAME =3D 02a955c7-48c0-4178-989b- > b3fea4b3c6a2 >=20 > -# Unmark the following and StatusCodeHandler.efi to build the .dsc file > directly -#[PcdsDynamicDefault] -# > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode| > TRUE > +[PcdsDynamicExDefault] > + # > + # By default, make the functional control DynamicExDefault PCD so that= it > can be enabled when debugging. > + # > + > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode >=20 > - > ########################################################## > ###################### > -# > -# Library Class section - list of all Library Classes needed by this fea= ture. > -# > - > ########################################################## > ###################### > +[LibraryClasses.Common] > + > +PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/Po > stCodeM > +apLib.inf >=20 > -!include MdePkg/MdeLibs.dsc.inc > +[LibraryClasses.PEIM, LibraryClasses.PEI_CORE] > + > +StatusCodeHandlerLib|PostCodeDebugFeaturePkg/Library/PostCodeStatus > Code > +HandlerLib/PeiPostCodeStatusCodeHandlerLib.inf >=20 > -[LibraryClasses] > - ####################################### > - # Edk2 Packages > - ####################################### > - BaseLib|MdePkg/Library/BaseLib/BaseLib.inf > - BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > - DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf > - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf > - DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf > - PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > - PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > - PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf > - > TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem > plate.inf > - > UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo > otServicesTableLib.inf > - > UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry > Point.inf > - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf > - > UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib > /UefiRuntimeServicesTableLib.inf > - PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf > +[LibraryClasses.DXE_RUNTIME_DRIVER] > + > +StatusCodeHandlerLib|PostCodeDebugFeaturePkg/Library/PostCodeStatus > Code > +HandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.inf >=20 > -[LibraryClasses.common.PEIM] > - ####################################### > - # Edk2 Packages > - ####################################### > - HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > - > MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory > AllocationLib.inf > - > PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/P > eiServicesTablePointerLibIdt.inf > +[LibraryClasses.DXE_SMM_DRIVER] > + > +StatusCodeHandlerLib|PostCodeDebugFeaturePkg/Library/PostCodeStatus > Code > +HandlerLib/SmmPostCodeStatusCodeHandlerLib.inf >=20 > - > [LibraryClasses.IA32.PEIM,LibraryClasses.IA32.PEI_CORE,LibraryClasses.IA3= 2. > SEC] > - ####################################### > - # Edk2 Packages > - ####################################### > - > ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiR > eportStatusCodeLib.inf > - > -[LibraryClasses.common.DXE_DRIVER] > - ####################################### > - # Edk2 Packages > - ####################################### > - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf > - > MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo > ryAllocationLib.inf > - > -[LibraryClasses.common.DXE_RUNTIME_DRIVER] > - ####################################### > - # Edk2 Packages > - ####################################### > - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf > - > MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo > ryAllocationLib.inf > - UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf > - > ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCod > eLib/RuntimeDxeReportStatusCodeLib.inf > - > -[LibraryClasses.common.UEFI_DRIVER] > - ####################################### > - # Edk2 Packages > - ####################################### > - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf > - > MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo > ryAllocationLib.inf > - > -[LibraryClasses.X64.DXE_SMM_DRIVER] > - ####################################### > - # Edk2 Packages > - ####################################### > - > SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesT > ableLib.inf > - > MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMe > moryAllocationLib.inf > - SmmIoLib|MdePkg/Library/SmmIoLib/SmmIoLib.inf > - SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf > - > ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/S > mmReportStatusCodeLib.inf > - > - > ########################################################## > ###################### > -# > -# Component section - list of all components that need built for this fe= ature. > -# > -# Note: The EDK II DSC file is not used to specify how compiled binary > images get placed > -# into firmware volume images. This section is just a list of modu= les to > compile from > -# source into UEFI-compliant binaries. > -# It is the FDF file that contains information on combining binary= files into > firmware > -# volume images, whose concept is beyond UEFI and is described in = PI > specification. > -# There may also be modules listed in this section that are not re= quired in > the FDF file, > -# When a module listed here is excluded from FDF file, then UEFI- > compliant binary will be > -# generated for it, but the binary will not be put into any firmwa= re > volume. > -# > - > ########################################################## > ###################### > -# > -# Feature PEI Components > -# > - > -# @todo: Change below line to [Components.$(PEI_ARCH)] after > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2308 > -# is completed. > [Components.IA32] This should be changed to [Components.$(PEI_ARCH)] > - ##################################### > - # PostCode Debug Feature Package > - ##################################### >=20 > - # Add library instances here that are not included in package componen= ts > and should be tested > - # in the package build. > - > PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/PeiPost > CodeStatusCodeHandlerLib.inf > + > MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.in > f { > + > + # > + # Many boards already have StatusCodeHandler components built from > the common core code > + # Providing a unique name avoids collisions. Both status code han= dler > components will > + # install their listeners with the status code routers. > + # > + FILE_GUID =3D $(POST_CODE_PEIM_FILENAME) > + > + > + > NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/P > eiP > + ostCodeStatusCodeHandlerLib.inf > + } >=20 > - # The following is an example for used with StatusCodeHandler: > -# > MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.in > f { > -# > -# > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibN > ull/OemHookStatusCodeLibNull.inf > -# > SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.= in > f > -# > PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDeb > ug.inf > -# > PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/Post > CodeMapLib.inf > -# > NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/P > eiPostCodeStatusCodeHandlerLib.inf > -# } > - > - # Add components here that should be included in the package build. > - > -# > -# Feature DXE Components > -# > - > -# @todo: Change below line to [Components.$(DXE_ARCH)] after > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2308 > -# is completed. > [Components.X64] This should be changed to [Components.$(DXE_ARCH)] > - ##################################### > - # PostCode Debug Feature Package > - ##################################### > + > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan > dlerRuntimeDxe.inf { > + > + # > + # Many boards already have StatusCodeHandler components built from > the common core code > + # Providing a unique name avoids collisions. Both status code han= dler > components will > + # install their listeners with the status code routers. > + # > + FILE_GUID =3D $(POST_CODE_DXE_FILENAME) > + > + > + > NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/R > unt > + imeDxePostCodeStatusCodeHandlerLib.inf > + } >=20 > - # Add library instances here that are not included in package componen= ts > and should be tested > - # in the package build. > - > PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/Runtim > eDxePostCodeStatusCodeHandlerLib.inf > - > PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/SmmPo > stCodeStatusCodeHandlerLib.inf > - > - # The following is an example for used with StatusCodeHandler: > -# > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan > dlerRuntimeDxe.inf { > -# > -# > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibN > ull/OemHookStatusCodeLibNull.inf > -# > SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.= in > f > -# > PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDeb > ug.inf > -# > PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/Post > CodeMapLib.inf > -# > NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/R > untimeDxePostCodeStatusCodeHandlerLib.inf > -# } > - > -# > MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm > m.inf { > -# > -# > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibN > ull/OemHookStatusCodeLibNull.inf > -# > SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.= in > f > -# > PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDeb > ug.inf > -# > PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/Post > CodeMapLib.inf > -# > NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/S > mmPostCodeStatusCodeHandlerLib.inf > -# } > - > - # Add components here that should be included in the package build. > - > - > ########################################################## > ######################################### > -# > -# BuildOptions Section - Define the module specific tool chain flags tha= t > should be used as > -# the default flags for a module. These flags are= appended to any > -# standard flags that are defined by the build pr= ocess. They can > be > -# applied for any modules or only those modules w= ith the > specific > -# module style (EDK or EDKII) specified in [Compo= nents] section. > -# > -# For advanced features, it is recommended to ena= ble > [BuildOptions] in > -# the applicable INF file so it does not affect t= he whole board > package > -# build when this DSC file is active. > -# > - > ########################################################## > ######################################### > -[BuildOptions] > + > MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm > m.inf { > + > + # > + # Many boards already have StatusCodeHandler components built from > the common core code > + # Providing a unique name avoids collisions. Both status code han= dler > components will > + # install their listeners with the status code routers. > + # > + FILE_GUID =3D $(POST_CODE_SMM_FILENAME) > + > + > + > NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/S > mmP > + ostCodeStatusCodeHandlerLib.inf > + } > diff --git > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMem > ory.fdf > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMem > ory.fdf > new file mode 100644 > index 0000000000..1be9b369a8 > --- /dev/null > +++ > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMem > or > +++ y.fdf > @@ -0,0 +1,14 @@ > +## @file > +# FDF file for post-memory BeepDebugFeature advanced feature. > +# > +# This file is intended to be included into another package so > +advanced features # can be conditionally included in the flash image > +by enabling the respective # feature via its FeaturePCD. > +# > +# Copyright (C) 2022 Intel Corporation. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent ## > + > +INF FILE_GUID =3D $(POST_CODE_DXE_FILENAME) > +MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHa > ndlerRu > +ntimeDxe.inf INF FILE_GUID =3D $(POST_CODE_SMM_FILENAME) > +MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerS > mm.inf > diff --git > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemo > ry.fdf > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemo > ry.fdf > new file mode 100644 > index 0000000000..168ceb1712 > --- /dev/null > +++ > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemo > ry > +++ .fdf > @@ -0,0 +1,13 @@ > +## @file > +# FDF file for pre-memory BeepDebugFeature advanced feature. > +# > +# This file is intended to be included into another package so > +advanced features # can be conditionally included in the flash image > +by enabling the respective # feature via its FeaturePCD. > +# > +# Copyright (C) 2022 Intel Corporation. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent ## > + > +INF FILE_GUID =3D $(POST_CODE_PEIM_FILENAME) > +MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.i > nf > diff --git > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS > tatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS > tatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf > index c27578fe90..72df81c77f 100644 > --- > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS > tatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf > +++ > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS > +++ tatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf > @@ -15,7 +15,7 @@ > FILE_GUID =3D FA32350A-63DB-4AC6-88D1-BC5327EE7EC= E > MODULE_TYPE =3D PEIM > CONSTRUCTOR =3D PeiPostCodeStatusCodeHandlerLibCons= tructor > - LIBRARY_CLASS =3D StatusCodeHandlerLib|SEC PEIM PEI_C= OR > + LIBRARY_CLASS =3D StatusCodeHandlerLib|SEC PEIM PEI_C= ORE >=20 > # > # The following information is for reference only and not required by th= e > build tools. > diff --git > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe > aturePkg.dec > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe > aturePkg.dec > index 5ba7b30ab6..42ac756a7c 100644 > --- > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe > aturePkg.dec > +++ > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe > at > +++ urePkg.dec > @@ -28,5 +28,16 @@ > [Guids] > gPostCodeDebugFeaturePkgTokenSpaceGuid =3D {0x68886ac8, 0x7a29, > 0x4845, {0xa7, 0x02, 0xe9, 0x83, 0xc8, 0x7f, 0xfb, 0xab}} >=20 > +[PcdsFeatureFlag] > + > +gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureE > nable|FA > +LSE|BOOLEAN|0x00000002 > + > [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] > + ## This PCD allows for dynamic control of post code use if so desired. > + # > + # The PCD value can be modified at boot time to activate and deactiva= te > the feature functionality. > + # > + # Note that this differs from PcdFeatureEnable which > + determines whether the feature is included # as an advanced feature > + in the flash image. If enabled, the feature is then eligible to be > activated/deactivated # via this PCD. > + # >=20 > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode| > FALSE|BOOLEAN|0x00000001 > diff --git > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe > aturePkg.dsc > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe > aturePkg.dsc > index 4f0bec4a6f..349604098f 100644 > --- > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe > aturePkg.dsc > +++ > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe > at > +++ urePkg.dsc > @@ -24,6 +24,36 @@ > PEI_ARCH =3D IA32 > DXE_ARCH =3D X64 >=20 > +[Packages] > + MinPlatformPkg/MinPlatformPkg.dec > + > +[PcdsFeatureFlag] > + # > + # PCD needed for MinPlatform build includes > + # > + gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable > |FALSE > + gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable > |FALSE > + gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable > |FALSE > + > +[PcdsDynamicExDefault] > + # > + # PCD needed for this feature to build > + # > + > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode| > TRUE > + > +# > +# Include common libraries > +# > +!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc > +!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc > +!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc > + > +[LibraryClasses.Common] > + # > + # Required by common status code handler infrastructure > + # > + > +PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePl > atfo > +rmHookLibNull.inf > + > # > # This package always builds the feature. > # > diff --git > a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md > b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md > index c49db35999..3fc52f1c00 100644 > --- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md > +++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md > @@ -16,7 +16,7 @@ It also provide a library of PostCodeMap lib, it map th= e > status code to post cod A library of PostCode lib is needed by platform. >=20 > In the library contstructor function, PostCodeStatusCodeHandlerLib regis= ter > the call back function for ReportStatusCode. > -When called, it call GetPostCodeFromStatusCode() in PostCodeMapLib to > get post code from status code, and call PostCode() in PostCodeLib to sho= w > the post code. > +When called, it call GetPostCodeFromStatusCode () in PostCodeMapLib to > get post code from status code, and call PostCode () in PostCodeLib to sh= ow > the post code. >=20 > PostCodeStatusCodeHandlerLib include 3 libraries for PEI, RuntimeDxe, > SMM: > * PeiPostCodeStatusCodeHandlerLib > @@ -38,6 +38,7 @@ This library provide a function to get post code from > status code. >=20 > ## Key Functions > * In PeiPostCodeStatusCodeHandlerLib: > +``` > EFI_STATUS > EFIAPI > PostCodeStatusCodeReportWorker ( > @@ -48,8 +49,10 @@ This library provide a function to get post code from > status code. > IN CONST EFI_GUID *CallerId, > IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL > ) > +``` >=20 > * In RuntimeDxePostCodeStatusCodeHandlerLib: > +``` > EFI_STATUS > EFIAPI > PostCodeStatusCodeReportWorker ( > @@ -59,8 +62,10 @@ This library provide a function to get post code from > status code. > IN EFI_GUID *CallerId, > IN EFI_STATUS_CODE_DATA *Data OPTIONAL > ) > +``` >=20 > * In SmmPostCodeStatusCodeHandlerLib: > +``` > EFI_STATUS > EFIAPI > PostCodeStatusCodeReportWorker ( > @@ -70,23 +75,28 @@ This library provide a function to get post code from > status code. > IN EFI_GUID *CallerId, > IN EFI_STATUS_CODE_DATA *Data OPTIONAL > ) > +``` >=20 > * In PostCodeMapLib: > +``` > UINT32 > EFIAPI > GetPostCodeFromStatusCode ( > IN EFI_STATUS_CODE_TYPE CodeType, > IN EFI_STATUS_CODE_VALUE Value > ) > +``` >=20 > ## Configuration > -* Link the library to StatusCodeHandler.efi. > +* Link the library to StatusCodeHandler.efi to add this status code hand= ler. > +``` > Example: >=20 > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan > dlerRuntimeDxe.inf { > >=20 > NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/R > untimeDxePostCodeStatusCodeHandlerLib.inf > } > - Refer to PostCodeDebugFeature.dsc for other example. > +``` > + Refer to PostCodeDebugFeature.dsc for another example. > * Config PCD > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode. > In platform .dsc file, need to config the type of > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode. > Use PcdsFixedAtBuild to save binary size, and use PcdsDynamic if want = to > enable/disable in runtime. > @@ -98,20 +108,23 @@ This library provide a function to get post code fro= m > status code. > Status Code (ReportStatusCode) -> Post Code > (GetPostCodeFromStatusCode). >=20 > ## Control Flows > -ReportStatusCode() -> PostCodeStatusCodeReportWorker() -> > GetPostCodeFromStatusCode() -> PostCode() > +ReportStatusCode () -> PostCodeStatusCodeReportWorker () -> > +GetPostCodeFromStatusCode () -> PostCode () >=20 > ## Build Flows > -There is not special build flows. > +There are not special build flows. >=20 > ## Test Point Results > -Verify the post code shown is correct. > +There are no test points defined. >=20 > ## Functional Exit Criteria > N/A >=20 > ## Feature Enabling Checklist > -* Set the PCD > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode > to TRUE. > -* The post code can be shown. > +* Set the PCD > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEn > able to TRUE. > +* Select the PCD type desired and set the PCD > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode > to TRUE. > +* Implemented a platform specific PostCodeMapLib if needed. > +* Verify the post code can be shown correctly. >=20 > ## Common Optimizations > -* Implemented platform's special PostCodeMapLib if needed. > +* Set > gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode > +based on a larger, board specific, size > + optimization or performance optimization setting. > -- > 2.27.0.windows.1 >=20 >=20 >=20 >=20 >=20