From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.3884.1642042039438756943 for ; Wed, 12 Jan 2022 18:47:20 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=UdaXMOe5; spf=pass (domain: intel.com, ip: 134.134.136.31, 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=1642042039; x=1673578039; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=uNWqavNoZWFz6fwemyhHlNYmuSjLzc58PpytZI24vno=; b=UdaXMOe5P1r91jQa9BDl3oP6OGhaKhzIUdHSVXPUOPymD6UJBR7IhQ6x Zv238oxR5rMezZI3OmcaFUARcFMN64+GjyufrCUj/HLUsRjBipdCP3i6i t6gA8pfeBWZgxhRbVsH9b8UwhEsn9bxp3D89bOGZIV6C3ucTZo07sgmCT H3R5Tgtqo+N8eELa7JmrKrIbo9RzGGI0K7vLNnvpljgH4XkBQK6MMCTD7 QLaG8+kIC8TusR1OENiDfkKsP5H2S/c3xtz/D1z1yI23U326QGNGUoMuZ hS+VkF3qAuKEh1tX3hTkFgTg0cLsp9EMeVZZlGcZm6lTQvH8HRU1Chk7q Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10225"; a="304649236" X-IronPort-AV: E=Sophos;i="5.88,284,1635231600"; d="scan'208";a="304649236" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2022 18:47:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,284,1635231600"; d="scan'208";a="593214037" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga004.fm.intel.com with ESMTP; 12 Jan 2022 18:47:18 -0800 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX605.amr.corp.intel.com (10.22.229.18) 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:47:17 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx605.amr.corp.intel.com (10.22.229.18) 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:47:17 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.49) by edgegateway.intel.com (134.134.137.102) 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:47:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TU67eChnEzIJ2bG/2jow9bZ8o1AIZZSbvq9JpfrQOR0BXwt5XoxWywRlpDrN/87IiuB2I1ADfhDmlV5aG8TsbN0AkMMLmaOlx7wgyDzNKgbkmzhsHwt6CjnqLAJPoD8xgjUxsFp2gSVPe6iNgw+b+ffngnk4h07hkrZM28DSqD7zVcT26npYrembPSJ7Qyz0MqMsfqVSu4KGSqxoIlC007YPqMypGShR2xh/i0gFnoGc3CXGbxUCtzZc/xs3SLizh9qW/kHPzAJCwMHjVb5/hQpDjmoVySCUC1TZ4Ky106E36REXY6NfsHVKiQNImcORLnCHTqQwmn8WM8fbTl/0/Q== 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=UAyR7mwCDpKOc23BMwBDVGgLGXklcu9aoXyZVbVK9L0=; b=g0gIHNdgn9homWI2e+L7ENbOX+VarUWHc3NX7/QI9p8i8F8NWhUHoX9aeA3vyv/R/x/tFxoDjvIHUQ/acXJykJifEdqgl6QXeebUMmdE+xDV93txlXrQWMHXxyAfpMnYDxierA8TuPd1cy8a9MlZhulL4sFr8d9yTr6AP25egBHsR9j0D5KbrnESXKIaf7E/EbirmwAv+9j3t02TamhrNwgG6CyMk75m076oa6uoFhgE6puT+SC+/WGsdTs8K//jmYkhuR314L0YUBwidq6EWGCRJJgxs6fYBCu89tCs+y0+++hl6o/KkLf/kZ64pcSIYQ+fi0D3WK47SuVmwc4z3Q== 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 MWHPR1101MB2285.namprd11.prod.outlook.com (2603:10b6:301:57::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9; Thu, 13 Jan 2022 02:47:14 +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:47:14 +0000 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Oram, Isaac W" CC: "Chaganty, Rangasai V" , "Gao, Liming" , "Dong, Eric" , "Tan, Ming" Subject: Re: [edk2-devel][edk2-platforms][PATCH V1 01/27] BeepDebugFeaturePkg: Use MinPlatformPkg build include files Thread-Topic: [edk2-devel][edk2-platforms][PATCH V1 01/27] BeepDebugFeaturePkg: Use MinPlatformPkg build include files Thread-Index: AQHYB1sPvG6sU4M0UkKio3btuOpX9axgIrZQ Date: Thu, 13 Jan 2022 02:47:14 +0000 Message-ID: References: <201dca4c4494241ebb61d4fa32d51385db12b9b4.1641953242.git.isaac.w.oram@intel.com> In-Reply-To: <201dca4c4494241ebb61d4fa32d51385db12b9b4.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: 48361185-2a8c-4fb4-7189-08d9d63f019c x-ms-traffictypediagnostic: MWHPR1101MB2285: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: dEVDQ+dZWKJzIlsCyKgubfVC23BN6l+nskzaeFiqsKN4Srh/je/3dzRJBpm4NysVNf/IPwurcCmVUZWdiPzQD6Sf4Uo8XRzs8YfoYWcQODbiangsMK1ituXq5tRCd7QQKC5JLcMlsS/f0wfCSSWVh37mZHPl2lsDrEMu1dq051GZZsW0TKt54mIBUJBY8Gkw2ZYadwImjWLbHx9uNkIgJaknooOMSg1aUAkgLkdMaJLaZ9ttAb6w7/PeqsN7IDZcD9PPbQb8glHNRqigEsKY3G91FxOGTU+Kt+czDZLlHYHqGd8jInM/OofkWFZMpszkjyq6XZ06xnpUAu8TZjaTXea+vgMgrm02oJV1i7Owf82W2bGVxVv0oz/BTw7Thod+wAKWnCf1CdH9x/cMlzVZKGaazJMF1xz1GZ88VZumN9bOkHCilXMTcMHURXmrW4Niq7+JIsZUOKbA8/iy1xNVCnuno8rPQ7RgveuMAveIddG7MxcQv6eILr+PVhDhiflOJrYyKknNYH17MpxxmjZ6p1xGOuhBzfbjWpNTKW11lFTjK4CLm5G6jV7miw6r6tJwdJ+dZ4p+zf4lOgh6yzppOtiOKjPbB2C8OhKvovNQclr2sCIJ+Z/D3haQvRmvZ4taupleUDA4bdfLO0Mv19tYfDHvg6/sawREGAttzCCOONpYIxbrVNKERyGBiXbKXncyt+Rqpls/CkPB0BZHMWpONpB5ZH5tIFS/PWQ71O1cu6aw3v/a/aMYzNTmr4kKhYuPpSl/PXyd0aU9nTZ3UA2e2DYbklhmm5IsikJ20s0aMQg7vyvkNk3SU08SNgpeIsXaI86iw2EHYZB7hmsdLF/4gw== 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)(66556008)(110136005)(55016003)(7696005)(66946007)(66476007)(54906003)(64756008)(76116006)(66446008)(6506007)(316002)(71200400001)(8676002)(83380400001)(38070700005)(2906002)(966005)(5660300002)(38100700002)(33656002)(53546011)(6636002)(82960400001)(86362001)(52536014)(9686003)(26005)(107886003)(30864003)(186003)(508600001)(122000001)(4326008)(8936002)(579004)(559001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?bSGLt4spJSHA63DkKC+oo1+spF0cXHAYw8xfslVh3g6yg1LBHB5hDDCeK7uf?= =?us-ascii?Q?wmMlU0eMr/6QRlxThbpNzCf+VSFRjS81R0SLumKpWsmGTkStUhLuC8hITs6g?= =?us-ascii?Q?N1F5CSa5pSfISgCvRxXa8GVs/Fn1MgWRNYdmFhYnUxnoeT4IryGOeyTB2MuO?= =?us-ascii?Q?IehAN6+R/ehwrPn77dij/ZqmvYehSP1Mka+5twW+LqYtGlkLybqpGG6m5cwH?= =?us-ascii?Q?OwsTj5UlauB3PedAbCq++Aedm/cly6mev1j8WNqw5/R2JFriVQvZUyhO+KAy?= =?us-ascii?Q?ymoVxKtj/XzVmxS4d5xk2y992KhBMiLCA3jbcIOeKaLxy8s3dycHRRlU8DuI?= =?us-ascii?Q?1G+K6bOFMlWMmoAr1kaeBiM/6nDuX+0scsbMNSxUwWuShiLV/kJuYr5wtBaC?= =?us-ascii?Q?Sv8u5V9UoaNRAq7wNrulppYoLi3eHZbBl+IEYu1khIv9OfhVQhwnksZLcVIW?= =?us-ascii?Q?D4QsAHb76F9txV4PB3nfIP1DjoxX2tkK3kPh+NWpnyhrbqUoVXMv7e1yB5cZ?= =?us-ascii?Q?gaJlBwUw1t4uW+P3JDqR7eBBtWnVKPfmtUqHLAy88JQzEDvzSPOpYDeoeJXI?= =?us-ascii?Q?SZDG34Pie0AKwLnCGuhJzHaqzoj7L5/llXpCzfJ36gZD/0rStFWcMJfm7jq5?= =?us-ascii?Q?iOXHtNj16I4iL/9DcigGJ8JPG5JIUaG8gx0Ztp+nRDS4YN3cV0xSWn24U76j?= =?us-ascii?Q?PYoZuzZ3TgSMoc+P2iWZVxSsYkdc0HVhgo/GUc1C2pv39uFLmvai7616E3Jw?= =?us-ascii?Q?sv4qRKtfBeZ547shRM8yOlw8CbwI1YBDaICnisiARabdUGrELLIKXsxYP+w9?= =?us-ascii?Q?hmipTGkG9Qt7Bd7vr5BYcFvNqILYgdsndFcXQKGy+klLCqSOQcwn/gmvr6ef?= =?us-ascii?Q?Ams64A6Ui/PVpTUwSre0uRTt3RXiz9fdV7JwC7KrYddFiG1vW1VuoCusdUaV?= =?us-ascii?Q?Zxw2EGYFNhn7FtiQ8ekR0efJ0bIFtvlujHaaVz9TmvD7ZFh7ylUX5/2GJ0eP?= =?us-ascii?Q?b00braUxoMLumu45HtY1A2DzxXP4Lq6ZkNREdVlWAhoWYLcsvHowIatA055i?= =?us-ascii?Q?Vzs3+0CyWWAqKtMAxkLqGWzQ7pzPXsyKby0k4Wtxn1DX1s+LT+InWroWtoOO?= =?us-ascii?Q?gubYo70AAbf03GgPMauqBAj4UBE74DFeqBmhsBXZB5Ot4pyszoxXwGTLdXKI?= =?us-ascii?Q?8sjS2IXReVUnUfql2XUgukKK26Bj4lD310v7a/gnZ9Tc6UnNWT/cNU8JuWd6?= =?us-ascii?Q?JB0LAleH3MTFBh1ADvYFO93L7YTEW9Paq91ZNI+Bc8E7k6w4xfFoUn1A72dT?= =?us-ascii?Q?7hQZXAJ7lKyYXE5KmlpgqmRKwIDawkS3jTXbeqH1zd5zbd+kNQBij4RPqZR6?= =?us-ascii?Q?6scH2wbuNaTwLjvDIb+ub72178ATGXXbhBRBFbnHsBmywDCMAcNPunsuYyRA?= =?us-ascii?Q?tAF6IRrZVxoW+29ZPyfDxVaUyt20o9zObR639jiKLF0UwuCFUTP6Wn2XNDov?= =?us-ascii?Q?XjaWaFjU143cwBRA+uJo5g38b86qnU91mu0wcWFFAsduKQfBiQm/tyTeRAel?= =?us-ascii?Q?JHghAGgDF9wPpnP7J10rtbd7k248Z64VukgCaaIsQrXQqqzBiR8D+DoLFp7z?= =?us-ascii?Q?Nhx2rjQ4lo0bQRJ5hq6hwCwOq22oXCUyPtYaAN2o7AyyavvRE4TjflbTAWBC?= =?us-ascii?Q?fDjOqA=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: 48361185-2a8c-4fb4-7189-08d9d63f019c X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2022 02:47:14.6699 (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: mD3GBw/w7KrA0FIij2fGgUrPnOpjTDQMXv1Tf+7/YxfjLTMf77C62HFEKwikrG1U0owGr7FWZEu3uu+xcrEC4Hbw7VyiMdkL6bb2AORhEB8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2285 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 Isaac, 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 ; Chaganty, Rangasai V > ; Gao, Liming > ; Dong, Eric ; Tan, Ming > > Subject: [edk2-devel][edk2-platforms][PATCH V1 01/27] > BeepDebugFeaturePkg: Use MinPlatformPkg build include files >=20 > The BeepDebugFeaturePkg was malformed and did not build anything and > thus wasn't testable in standalone build. >=20 > Added > gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable > to properly control the advanced feature inclusion. >=20 > Use the standard MinPlatform includes for core libraries. This increases = the > build time, but reduces complexity when integrating into a board build. B= oard > build optimization is more valuable than standalone build optimization. >=20 > Enable standalone build to test the library build and the component build= s > using edk2 StatusCodeHandler drivers. >=20 > Add unique file names for the StatusCodeHandler components to avoid > collisions with any existing board handlers when incorporated in board DS= C > and FDF files. >=20 > Add PreMemory.fdf and PostMemory.fdf content for including in board FDF > or AdvancedFeaturePkg in the future. >=20 > Removed unused sections in DSC and FDF to reduce file clutter. >=20 > Removed stale file header content from prior proprietary licensing. >=20 > Moved feature customization and common include into the package DSC file > to reduce board complexity when BeepDebugFeature.dsc is included. >=20 > Removed the FixedAtBuild build control for beep feature as it would be > redundant with the FeatureFlag control of the whole feature. Build contro= l is > via PcdBeepDebugFeatureEnable and dynamic control is via > PcdStatusCodeUseBeep. >=20 > Improved Readme content, format, and coding style use. >=20 > Cc: Sai Chaganty > Cc: Liming Gao > Cc: Eric Dong > Cc: Ming Tan >=20 > Signed-off-by: Isaac Oram > --- >=20 > Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.d > ec | 7 +- >=20 > Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.d > sc | 28 +++ >=20 > Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeat > ure.dsc | 222 ++++++----------= ---- >=20 > Features/Intel/Debugging/BeepDebugFeaturePkg/Include/Library/BeepLib. > h | 6 +- > Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PostMemory.fdf > | 14 ++ > Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PreMemory.fdf > | 13 ++ >=20 > Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCode > HandlerLib/PeiBeepStatusCodeHandlerLib.inf | 5 +- >=20 > Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCode > HandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf | 3 - >=20 > Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCode > HandlerLib/SmmBeepStatusCodeHandlerLib.inf | 3 - > Features/Intel/Debugging/BeepDebugFeaturePkg/Readme.md > | 91 +++++--- > 10 files changed, 186 insertions(+), 206 deletions(-) >=20 > diff --git > a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg > .dec > b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg > .dec > index 4f4b36b091..d90611da51 100644 > --- > a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg > .dec > +++ > b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg > .d > +++ ec > @@ -31,6 +31,9 @@ > [Guids] > gBeepDebugFeaturePkgTokenSpaceGuid =3D {0x54f56fb5, 0xea0e, 0x4518, > {0xa0, 0x3e, 0x1b, 0xeb, 0x56, 0x94, 0xd2, 0x16}} >=20 > -[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] > +[PcdsFeatureFlag] > + > +gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable|FA > LSE|BOOL > +EAN|0x00000000 > + > +[PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] > # Beep is a legacy feature, disabled it by default > - > gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep|FALSE|B > OOLEAN|0x00000001 > + > + > gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep|TRUE|BO > OLEAN|0 > + x00000001 > diff --git > a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg > .dsc > b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg > .dsc > index 47254f9974..56cad020bf 100644 > --- > a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg > .dsc > +++ > b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg > .d > +++ sc > @@ -24,6 +24,34 @@ > PEI_ARCH =3D IA32 > DXE_ARCH =3D X64 >=20 > +[Packages] > + MinPlatformPkg/MinPlatformPkg.dec > + BeepDebugFeaturePkg/BeepDebugFeaturePkg.dec > + > +[PcdsFeatureFlag] > + # > + # PCD needed for MinPlatform build includes > + # > + gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable > |FALSE > + gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable > |FALSE > + gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable > |FALSE > + > +[PcdsDynamicExDefault] > + gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep|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/BeepDebugFeaturePkg/Include/BeepDebugFe > ature.dsc > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFe > ature.dsc > index b24b3e458f..251de6932b 100644 > --- > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFe > ature.dsc > +++ > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFe > at > +++ ure.dsc > @@ -18,97 +18,16 @@ > # >=20 > ########################################################## > ###################### > [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 > - > - > ########################################################## > ###################### > -# > -# PCD Section - list of PCD Entries modified by the feature. > -# > - > ########################################################## > ###################### > - > -# Unmark the following and StatusCodeHandler.efi to build the .dsc file > directly -#[PcdsDynamicDefault] -# > gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep|TRUE > - > - > ########################################################## > ###################### > -# > -# Library Class section - list of all Library Classes needed by this fea= ture. > -# > - > ########################################################## > ###################### > - > -!include MdePkg/MdeLibs.dsc.inc > - > -[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 > - IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.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.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.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 > + !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 > + > + DEFINE BEEP_PEIM_FILENAME =3D b2356504-8ea3-42bd-912a-4b331990644a > + DEFINE BEEP_DXE_FILENAME =3D f1211fa9-d83d-4c79-8726-3afaebba1070 > + DEFINE BEEP_SMM_FILENAME =3D a82cd452-0f17-4417-b8be-bb8cfdf9fa26 >=20 >=20 > ########################################################## > ###################### > # > @@ -128,77 +47,60 @@ > # Feature PEI Components > # >=20 > -# @todo: Change below line to [Components.$(PEI_ARCH)] after > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2308 > -# is completed. > +# > +# By default, make the functional control a patcheable in module PCD # > +[PcdsPatchableInModule] > + gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep > + > +[LibraryClasses.Common] > + > BeepLib|Debugging/BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf > + > +BeepMapLib|Debugging/BeepDebugFeaturePkg/Library/BeepMapLib/Bee > pMapLib. > +inf > + > +[LibraryClasses.PEIM, LibraryClasses.PEI_CORE] > + > +StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepSta > tusCo > +deHandlerLib/PeiBeepStatusCodeHandlerLib.inf > + > +[LibraryClasses.DXE_RUNTIME_DRIVER] > + > +StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepSta > tusCo > +deHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf > + > +[LibraryClasses.DXE_SMM_DRIVER] > + > +StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepSta > tusCo > +deHandlerLib/SmmBeepStatusCodeHandlerLib.inf > + > [Components.IA32] This should be changed to [Components.$(PEI_ARCH)] > - ##################################### > - # Beep Debug Feature Package > - ##################################### >=20 > - # Add library instances here that are not included in package componen= ts > and should be tested > - # in the package build. > - > BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepStatusC > odeHandlerLib.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 $(BEEP_PEIM_FILENAME) > + > + > + > NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLi > b/Pe > + iBeepStatusCodeHandlerLib.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 > -# BeepLib|BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf > -# > BeepMapLib|BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf > -# > NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepSt > atusCodeHandlerLib.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)] > - ##################################### > - # Beep 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 $(BEEP_DXE_FILENAME) > + > + > + > NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLi > b/Ru > + ntimeDxeBeepStatusCodeHandlerLib.inf > + } >=20 > - # Add library instances here that are not included in package componen= ts > and should be tested > - # in the package build. > - > BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBee > pStatusCodeHandlerLib.inf > - > BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepStatus > CodeHandlerLib.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 > -# BeepLib|BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf > -# > BeepMapLib|BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf > -# > NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeD > xeBeepStatusCodeHandlerLib.inf > -# } > - > -# > MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm > m.inf { > -# > -# > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibN > ull/OemHookStatusCodeLibNull.inf > -# > SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.= in > f > -# BeepLib|BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf > -# > BeepMapLib|BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf > -# > NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeep > StatusCodeHandlerLib.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 $(BEEP_SMM_FILENAME) > + > + > + > NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLi > b/Sm > + mBeepStatusCodeHandlerLib.inf > + } > diff --git > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/Library/BeepLi > b.h > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/Library/BeepLi > b.h > index f768acc557..0b8f71b097 100644 > --- > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/Library/BeepLi > b.h > +++ > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/Library/BeepL > +++ ib.h > @@ -15,12 +15,12 @@ > Sends the 32-bit value specified by Value to Beep device, and returns > Value. > Some implementations of this library function may perform I/O operatio= ns > directly to Beep device. Other implementations may send Value to > - ReportStatusCode(), and the status code reporting mechanism will > eventually > + ReportStatusCode (), and the status code reporting mechanism will > + eventually > display the 32-bit value on the status reporting device. >=20 > - Beep() must actively prevent recursion. If Beep() is called while > + Beep () must actively prevent recursion. If Beep () is called while > processing another Post Code Library function, then > - Beep() must return Value immediately. > + Beep () must return Value immediately. >=20 > @param Value Beep count. > **/ > diff --git > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PostMemory.f > df > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PostMemory.f > df > new file mode 100644 > index 0000000000..447fb88235 > --- /dev/null > +++ > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PostMemory.f > d > +++ f > @@ -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 $(BEEP_DXE_FILENAME) > +MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHa > ndlerRu > +ntimeDxe.inf INF FILE_GUID =3D $(BEEP_SMM_FILENAME) > +MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerS > mm.inf > diff --git > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PreMemory.fd > f > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PreMemory.fd > f > new file mode 100644 > index 0000000000..160f5e3ffd > --- /dev/null > +++ > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PreMemory.fd > f > @@ -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 $(BEEP_PEIM_FILENAME) > +MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.i > nf > diff --git > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > eHandlerLib/PeiBeepStatusCodeHandlerLib.inf > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > eHandlerLib/PeiBeepStatusCodeHandlerLib.inf > index 421b246663..5be78a72e8 100644 > --- > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > eHandlerLib/PeiBeepStatusCodeHandlerLib.inf > +++ > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > +++ eHandlerLib/PeiBeepStatusCodeHandlerLib.inf > @@ -4,9 +4,6 @@ > # Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.
= # > SPDX-License-Identifier: BSD-2-Clause-Patent # -# vendor. This file may= not > be modified, except as allowed by -# additional terms of your license > agreement. > -# > ## >=20 > [Defines] > @@ -15,7 +12,7 @@ > FILE_GUID =3D C4210E71-0A38-4728-8D25-4876348AA38= 0 > MODULE_TYPE =3D PEIM > CONSTRUCTOR =3D PeiBeepStatusCodeHandlerLibConstruc= tor > - 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/BeepDebugFeaturePkg/Library/BeepStatusCod > eHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > eHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf > index b9aae39128..2343e35a78 100644 > --- > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > eHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf > +++ > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > +++ eHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf > @@ -4,9 +4,6 @@ > # Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.
= # > SPDX-License-Identifier: BSD-2-Clause-Patent # -# vendor. This file may= not > be modified, except as allowed by -# additional terms of your license > agreement. > -# > ## >=20 > [Defines] > diff --git > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > eHandlerLib/SmmBeepStatusCodeHandlerLib.inf > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > eHandlerLib/SmmBeepStatusCodeHandlerLib.inf > index caa82264ae..4db1748fe3 100644 > --- > a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > eHandlerLib/SmmBeepStatusCodeHandlerLib.inf > +++ > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod > +++ eHandlerLib/SmmBeepStatusCodeHandlerLib.inf > @@ -4,9 +4,6 @@ > # Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.
= # > SPDX-License-Identifier: BSD-2-Clause-Patent # -# vendor. This file may= not > be modified, except as allowed by -# additional terms of your license > agreement. > -# > ## >=20 > [Defines] > diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/Readme.md > b/Features/Intel/Debugging/BeepDebugFeaturePkg/Readme.md > index ee254d0f99..6626c9b764 100644 > --- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Readme.md > +++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Readme.md > @@ -6,25 +6,29 @@ > More Information: >=20 > ## Purpose > -The BeepDebugFeaturePkg include some useful beep debug libraries, such > as get beep value from status code and beep. > -This is an important capability in firmware development to get and analy= ze > the early error when there is not serial port. > +Very often it is necessary to debug very close to the reset vector or in > production systems that lack serial ports, seven segment displays, or use= ful > LED that are typically used to output useful debug messages. >=20 > +The BeepDebugFeaturePkg includes some useful beep focused debug > libraries. > + > +This isn't intended for production use. > + > +There is not currently seamless integration into the SecCore component > that handles the reset vector. In order to debug that early, it will be > necessary to use the BeepLib directly in SEC code. >=20 > # High-Level Theory of Operation > -It provide a library BeepStatusCodeHandlerLib used by edk2 > StatusCodeHandler.efi, used to do beep if needed. > -It also provide a library of BeepMap lib, it map the status code to beep > value. > +It provides a library, BeepStatusCodeHandlerLib, used by edk2 > StatusCodeHandler.efi, used to do beep if needed. > +It also provide a library of BeepMap lib which maps the status code to a > beep value. > A library of Beep lib is needed by platform, and this pkg has a Null > implementation. >=20 > -In the library contstructor function, BeepStatusCodeHandlerLib register = the > call back function for ReportStatusCode. > -When called, it call GetBeepFromStatusCode() in BeepMapLib to get beep > value from status code, and call Beep() in BeepLib to beep. > +In the library contstructor function, BeepStatusCodeHandlerLib registers > the call back function for ReportStatusCode. When called, it calls > GetBeepFromStatusCode (); in BeepMapLib to get beep value from status > code, and calls Beep () in BeepLib to beep a speaker. >=20 > -BeepStatusCodeHandlerLib include 3 libraries for PEI, RuntimeDxe, SMM: > +BeepStatusCodeHandlerLib includes three libraries for PEI, RuntimeDxe, > and SMM: > * PeiBeepStatusCodeHandlerLib > * RuntimeDxeBeepStatusCodeHandlerLib > * SmmBeepStatusCodeHandlerLib >=20 > ## Firmware Volumes > -Linked with StatusCodeHandler.efi, and make sure put the > StatusCodeHandler.efi after the ReportStatusCodeRouter.efi. > +These libraries need to be linked into StatusCodeHandler components. > +Make sure one puts the StatusCodeHandler.efi after the > ReportStatusCodeRouter.efi. >=20 > ## Modules > * BeepStatusCodeHandlerLib > @@ -32,13 +36,17 @@ Linked with StatusCodeHandler.efi, and make sure > put the StatusCodeHandler.efi a > * BeepLibNull >=20 > ## BeepStatusCodeHandlerLib > -This library register the call back function for ReportStatusCode, and g= et > beep valude from status code, and do beep. > +This library registers the callback function for ReportStatusCode, gets = beep > value from status code, and does the beep. >=20 > ## BeepMapLib > -This library provide a function to get beep value from status code. > +This library provides a function to get a beep value for a status code. > + > +## BeepLibNull > +This library provide a function to perform the beep. >=20 > ## Key Functions > * In PeiBeepStatusCodeHandlerLib: > +``` > EFI_STATUS > EFIAPI > BeepStatusCodeReportWorker ( > @@ -49,8 +57,10 @@ This library provide a function to get beep value from > status code. > IN CONST EFI_GUID *CallerId, > IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL > ) > +``` >=20 > * In RuntimeDxeBeepStatusCodeHandlerLib: > +``` > EFI_STATUS > EFIAPI > BeepStatusCodeReportWorker ( > @@ -60,8 +70,10 @@ This library provide a function to get beep value from > status code. > IN EFI_GUID *CallerId, > IN EFI_STATUS_CODE_DATA *Data OPTIONAL > ) > +``` >=20 > * In SmmBeepStatusCodeHandlerLib: > +``` > EFI_STATUS > EFIAPI > BeepStatusCodeReportWorker ( > @@ -71,55 +83,72 @@ This library provide a function to get beep value fro= m > status code. > IN EFI_GUID *CallerId, > IN EFI_STATUS_CODE_DATA *Data OPTIONAL > ) > +``` >=20 > * In BeepMapLib: > +``` > UINT32 > EFIAPI > GetBeepValueFromStatusCode ( > IN EFI_STATUS_CODE_TYPE CodeType, > IN EFI_STATUS_CODE_VALUE Value > - ) > + ) > +``` >=20 > * In BeepLib: > +``` > VOID > EFIAPI > Beep ( > IN UINT32 Value > - ) > + ) > +``` >=20 > ## Configuration > -* Link the library to StatusCodeHandler.efi. > - Example: > - > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan > dlerRuntimeDxe.inf { > - > - > NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeD > xeBeepStatusCodeHandlerLib.inf > - } > - Refer to BeepDebugFeature.dsc for other example. > -* Config PCD > gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep. > - In platform .dsc file, need to config the type of > gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep. > - Use PcdsFixedAtBuild to save binary size, and use PcdsDynamic if want = to > enable/disable in runtime. > -* Implemented platform's special BeepMapLib if needed. > -* Provide the platform's special BeepLib. > -* Make sure put the StatusCodeHandler.efi after the > ReportStatusCodeRouter.efi. > +* Configure PCD > gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep. > + In board DSC file, the board developer needs to configure the type of > gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep control > desired. > + [PcdsFixedAtBuild] is the feature default value as this has lowest siz= e. > + [PcdsDynamicExDefault] is the most common configuration as it provides > dynamic control during debugging. > +* Implemented board specific BeepMapLib if custom status code to beep > code mapping as needed. > +* Provide the board specific BeepLib to perform beeps on the board speci= fic > hardware. > +```The default library does not cause any hardware to beep``` >=20 > ## Data Flows > Status Code (ReportStatusCode) -> Beep Value > (GetBeepValueFromStatusCode). >=20 > ## Control Flows > -ReportStatusCode() -> BeepStatusCodeReportWorker() -> > GetBeepValueFromStatusCode() -> Beep() > +ReportStatusCode () -> BeepStatusCodeReportWorker () -> > +GetBeepValueFromStatusCode () -> Beep () >=20 > ## Build Flows > -There is not special build flows. > +Standalone build > +* build -a IA32 -a X64 -p > +Debugging\BeepDebugFeaturePkg\BeepDebugFeaturePkg.dsc >=20 > +AdvanceFeaturePkg build > +* build -a IA32 -a X64 -p AdvancedFeaturePkg/AdvancedFeaturePkg.dsc > ## Test Point Results > -Verify the post code shown is correct. > +None >=20 > ## Functional Exit Criteria > N/A >=20 > ## Feature Enabling Checklist > -* Set the PCD > gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep to TRUE. > -* Plug out all the memory, check can here the beep. > +* Verify in board DSC file that > +gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable set > to > +TRUE > +* Verify board specific BeepLib implemented and included in board DSC fi= le. > +* Verify that the board has a PlatformHookLib instance. There is a > +null library implementation if needed ``` > + > +PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePl > atfo > +rmHookLibNull.inf > +``` > +* Verify that your board has the StatusCodeHandler components (PEIM or > driver) desired. > +``` > + Example: > + > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan > dlerRuntimeDxe.inf { > + > + > NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeD > xeBeepStatusCodeHandlerLib.inf > + } > + There are default StatusCodeHandlers for PEI, RT, and SMM in > BeepDebugFeaturePkg/Include in PreMemory.fdf and PostMemory.fdf for > use. But most boards will already have these components and you will jus= t > want to add the appropriate *StatusCodeHandlerLib.inf to each component. > +``` > +* Build > +* Remove all the memory from the system and verify audible beep is heard > when attempting to boot. >=20 > ## Common Optimizations > -* Implemented platform's special BeepMapLib if needed. > +N/A > -- > 2.27.0.windows.1 >=20 >=20 >=20 >=20 >=20