From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web08.4548.1642635078377772587 for ; Wed, 19 Jan 2022 15:31:18 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=TlyHT0bN; spf=pass (domain: intel.com, ip: 134.134.136.20, 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=1642635078; x=1674171078; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=kCcVUJ1X0zPWRambcCEoEN2oxygc8RHS6EXg630LYyY=; b=TlyHT0bNbSzraW38i87XDWNN9JWPmWgOJsQYCsOp/50kEltADFbEocQV 8SCDMFLB0Wmcn5806+wO2afuclaOOMM+F7R9P4QSkcTR7htnPy7Auaa4b qurrS5VYGUaAbuZ2tdbJVIpyCmyhgUikwEBCtIA6YGHcSPEZuxplR3ilN HaryJZ8JuTD6xJb57akbxEciplO0iNOh/3jZCHCO/Fpe5QXGbvX2OEmYX YwoOrvPqWNjEU8UaGJyoh6cyiO9O/tP8ZGpwGdFUl2zb7s1GGb3yvcZ9R wqjw4J5TOfdFrtAyN79gYZDAj8GOAbIoXxnwqDhfStwG5QxUGnpid7X3i w==; X-IronPort-AV: E=McAfee;i="6200,9189,10231"; a="232588856" X-IronPort-AV: E=Sophos;i="5.88,300,1635231600"; d="scan'208";a="232588856" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2022 15:31:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,300,1635231600"; d="scan'208";a="477578839" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga006.jf.intel.com with ESMTP; 19 Jan 2022 15:31:17 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 19 Jan 2022 15:31:16 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 19 Jan 2022 15:31:16 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx608.amr.corp.intel.com (10.18.126.88) 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, 19 Jan 2022 15:31:16 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.44) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 19 Jan 2022 15:31:16 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i+7SwHcVjjAWUuG77Zk8iELP8YLoqoCHgx7QfFmRSdUomeGLF23Ro8W7V3avubcxMdB/i2cFGgAO6vKBaFXzZGWV4YCgyk82Xss+6hw1hAJDKchT97VEMaSKg1zaIJpdrgXRMrBAt8wJKN/RiMSSq1jwap5nqcGLl0hC1lKn83v2lo5E6UgumebLpWB0w42iogjMF4gGfhvyRK1l4pMGBWOUoLvtp8a7c8AJdgOSSaVfAkkEShmmNnLNtU6FxbjX0n9h0EhB6d8HElGqxcHe2X2E7yR2tLkNwGgS364s3xq5z1ISHRMIyPkTANSBtsgCsaVTtQD4uFWfjKRIB+3yqQ== 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=5vu0w6rFl+wDNlRYUM0oVA8asPVsnxnNPvM5jVeFUPI=; b=lD17RqW21F5D8VSWQNu7Q20K6SjrgxAA8b4O0vIL7jB0MbuIh1xXjv3lDVuY2F6HgAP+T9kpx+luMVlnkbk3oRYYDZOVupZQLcpY/1UaBHRr2fe9Nwk/ON1TKgkNbOhOblGyADun4NEIA+dorE8XLfI7TiXZd3dH2+BPCRZBTvjbxte2uVGx2JamntbkF343Z1wPrXvgaYLcM1kSf0NF4PhC4VOYdjNvFpXo7bCTQa+yTk4fEnQLvxwtxxnKg4ux2q7GJ3QLuv8dJoLwGtftJBsllAlgQIyDUzpldmo4NPdv4OivLwF1H4p1efScfRbK+bJpvRFPaA4kHJ5qQEATAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MW4PR11MB5821.namprd11.prod.outlook.com (2603:10b6:303:184::5) by BL0PR11MB3410.namprd11.prod.outlook.com (2603:10b6:208:33::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.13; Wed, 19 Jan 2022 23:30:55 +0000 Received: from MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6920:39b9:e18c:9dc5]) by MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6920:39b9:e18c:9dc5%7]) with mapi id 15.20.4888.013; Wed, 19 Jan 2022 23:30:55 +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: AQHYB1sPvG6sU4M0UkKio3btuOpX9axrCjkg Date: Wed, 19 Jan 2022 23:30:54 +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: 6be9cbc8-93ef-494c-5ce9-08d9dba3bd38 x-ms-traffictypediagnostic: BL0PR11MB3410: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: bf6mzlWZmyNCo/BDYw2WSINQonHuQm7g4HXhK5keU5tYFRuRbxGe2XOfR6y6HaWuAZZHjTIs00FP+AMM5fb3IYC/R2abtBzAkZTBhVHY4L0s5nf9ovoFwfokk77cNjXHNAZ5NgCD2G65cPUFsP8Yz3GDlH5tprE7dBSwXXEVrMQYiPFgfpvM++t5cZD/PwuZsUJXKV1Ssx4bMaQKVMf2U8IdVNVcBKj4jXAWIfc1D/wAcXOGjZiCSPYzjkoHS19haie/Xl0UrBFlly/sM4yLvf718iPbcKfYnA8Y6e+f+P6OIbfg9i7RyC3hep2WRIxnJN4uBJ2O8+HZpeGGUaFaSPWjjGDy07h+bZ0pSH9jQpvMnhXgFswgpoICIR2t2/oMjfwS/1V4iQSUUeFY46ET8EVjCNaLvukFmSutIhEn55iKdF1wcA6El8tuNmyZi0FQRudKqIXyy7zSWimpE3UUt7KaGJf10Ftc6ccx+lJZiOO3A4bLB1+NW0YIcegTa2y1WE3SWN+Np+sPgqveW1hUs7ut9JtNRGGfKAFa0lRRFK52ysESkoUR7FZAlmkRqzj7ZmKuU1kjP3rUWl2BLfmG+xr3g1pvZv6tEhLip9IqN9m9gl1GBR1i3EBGK/iQ/JLFYehumls/CocCPQQ3lPJJ/2fzo1WQbPeVwF5twBMPJwi1z11cEXm25x9aPs3DhEuZ8cbWzg8hqc0wehbtyd6VOnN/kJZ2ssLzzhg10Dnm11vKNiyRrtVLxlov6hDJENwCYOABVyWnHZGC7pdahP3jAX5rtrdcxALnUIe8q6A6iLamyVKxWGVk1nRGdVyB+rQ8Ybu74A0701HAwJUFfpfVXQ== 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)(33656002)(508600001)(9686003)(82960400001)(966005)(4326008)(52536014)(38070700005)(2906002)(71200400001)(66476007)(55016003)(26005)(122000001)(186003)(38100700002)(8676002)(66946007)(64756008)(53546011)(83380400001)(6636002)(316002)(66556008)(5660300002)(30864003)(54906003)(8936002)(76116006)(86362001)(107886003)(7696005)(110136005)(66446008)(6506007)(579004)(559001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?urecdsfYGfNcJjs0LC5jrwQZ26UncPTNV/ezccnp8ME4rIDHxM63gr/8C7KC?= =?us-ascii?Q?QxKbuW3uRqsQ6Slm4F2c3bZa3phU8m4jxgG4zYUNOgi+wQedcj0h4HgmuGcb?= =?us-ascii?Q?fdUfW/fYvjtPbpD6U1ggsyQIsXhYgBRWrDJbabGf5/qdxK4f9WXT21zBMMLi?= =?us-ascii?Q?qQkzrcSVAzMt9s3JB9YwzWGseftEl2QSZLsZBoAkmvg3vROCk3hqUY/7Z7no?= =?us-ascii?Q?C4Lni/ZQj4nxA7CSkrsGbnr4uhRsPZk0Xf3ZKbA6Wxh7bYV1zyMzWznpglTs?= =?us-ascii?Q?imiAzJWeCcKn4IeD/nd+1g3OLbUubO0PjR5+AgvnaiCG26LNIUb12g0X//OH?= =?us-ascii?Q?RnlXNFZ86mRYuSlNUo04HgnxiNSPZ6AfnKOll80KnGU1ttrOTyd+Vkc0tx+a?= =?us-ascii?Q?kf3upgMLVcW+iK/ZlwvqkrtHcOEtiT1HxUCKvLwZAiUy6/KX8682tGPigGvW?= =?us-ascii?Q?iGkgSKKgELMxaQ2M17MAT0R2+9P3d1XVWQw5HX0Ya4JaBwip4NifkuVBpuXZ?= =?us-ascii?Q?KBysJ7kecWbKH/r4UkF35FodLwzCfJpms+sVxpvrv6fmsfA/o29AGCYJdEHm?= =?us-ascii?Q?1X1apTlfas8jsaN81m8j66G0nyNDz+KHmgJk9G1bCaKxSuUvnu/XefFtUAH2?= =?us-ascii?Q?2i+8PsnQaivvhtq0cjBSxqf1wRqfhAZKYA3KXHbooZi9APIyku0kTpF8OEBj?= =?us-ascii?Q?w9E0yGJ7BiHFBX5itF2ZS3mP03r0sT5lsrbi+4MG62vaIpo+r+RAkVeMk7rF?= =?us-ascii?Q?gIQC8myU1O9xUXh/6aR9sifpBzwnjqwWcBp6bEetTWEGHRYXUhB9zyh3YY3i?= =?us-ascii?Q?ICh73PJGOO7aj445UIdHU1w1SE3LSrKyEoK/IxQa2CfzvaON1e4udJXTy4Hg?= =?us-ascii?Q?DAJq1jlsS3agkg0ghJWB3ConxAtvyCkqV6+hz9bGv408o/KFsKCPrH+sguiX?= =?us-ascii?Q?uSRTNQJRfKfENtif4y4Atja6qrjDAkerixshhkO8vM5Sl7hc36/VAtKfuNW6?= =?us-ascii?Q?/e76YGXkfUG5DCTFFu1+aa7/RfBpBcp/GdfR8zurTotrHKQFim1PTirq6fqO?= =?us-ascii?Q?3yM2LRww+iLLhgvG0QRTBnbbg9zIJ6lhD1gjMPnNUvt/PkjGu6YScxPNq6lf?= =?us-ascii?Q?p9uZA2HSvxFZzk9Iolg+SsSaPJUyC7WII9RKaIQdl6SB+d5OQ8bImIDYNAWY?= =?us-ascii?Q?8ycBanoZOyfAnS31VRwq91zpI09uljksXICdiyC3Hiu5ts435j9f6nZdYxdW?= =?us-ascii?Q?YiY2ybzNZVkVL3Zfifx4yQqk7TobEQzhZAu02gt55vHTF+3xJmUJ/Pdr8yMH?= =?us-ascii?Q?3GmzVYQL5Cw0LjvZpvl6hfiHhv6+3rTGmTdgsk7XwXJnNnwIRJsHA+Yr2eak?= =?us-ascii?Q?65z390X0I3FoyA8VpSPaXoMInYRH7yMz6/TLQg+k4dETuDo24bECPXTRD5l3?= =?us-ascii?Q?0insMVLqERxtnGPQGK9xRC6Is90c40OUG2w2vBdsWGG/NnWZmz9S0SBF8Obm?= =?us-ascii?Q?a2zjMKqTZhVtBzAE5HdMuO/3Gc9uAFfkR+jNBZkUS/4w/iYE1wCq89gbrCew?= =?us-ascii?Q?TH7RDEnwmIuBOFS+l6nWOtML/YEadGI2ybqwZzIAapq1CkAPfe5RGIFfwXcB?= =?us-ascii?Q?/+iI73LoshGpPriskUI1bpeFQez/ZXnzD1EspUOeroe64qmsd5SJIfSOXQsZ?= =?us-ascii?Q?ywkEtg=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: 6be9cbc8-93ef-494c-5ce9-08d9dba3bd38 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2022 23:30:54.8188 (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: +fD1ZkDddU061W7oqryWnnc/8VJibIP8b/36xmJdhNeMXGo7mxFYJ7iLyC87cJrYpS4cDscsxG2+tvNqgV9doh6tKfB7EZSl4mFz2g4K7dw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3410 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 Reviewed-by: Nate DeSimone -----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 <= eric.dong@intel.com>; Tan, Ming Subject: [edk2-devel][edk2-platforms][PATCH V1 01/27] BeepDebugFeaturePkg: = Use MinPlatformPkg build include files The BeepDebugFeaturePkg was malformed and did not build anything and thus w= asn't testable in standalone build. Added gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable to properly control the advanced feature inclusion. Use the standard MinPlatform includes for core libraries. This increases th= e build time, but reduces complexity when integrating into a board build. B= oard build optimization is more valuable than standalone build optimization= . Enable standalone build to test the library build and the component builds = using edk2 StatusCodeHandler drivers. Add unique file names for the StatusCodeHandler components to avoid collisi= ons with any existing board handlers when incorporated in board DSC and FDF= files. Add PreMemory.fdf and PostMemory.fdf content for including in board FDF or = AdvancedFeaturePkg in the future. Removed unused sections in DSC and FDF to reduce file clutter. Removed stale file header content from prior proprietary licensing. Moved feature customization and common include into the package DSC file to= reduce board complexity when BeepDebugFeature.dsc is included. Removed the FixedAtBuild build control for beep feature as it would be redu= ndant with the FeatureFlag control of the whole feature. Build control is v= ia PcdBeepDebugFeatureEnable and dynamic control is via PcdStatusCodeUseBee= p. Improved Readme content, format, and coding style use. Cc: Sai Chaganty Cc: Liming Gao Cc: Eric Dong Cc: Ming Tan Signed-off-by: Isaac Oram --- Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.dec = | 7 +- Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.dsc = | 28 +++ Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc = | 222 ++++++-------------- 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 ++ Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandler= Lib/PeiBeepStatusCodeHandlerLib.inf | 5 +- Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandler= Lib/RuntimeDxeBeepStatusCodeHandlerLib.inf | 3 - Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandler= Lib/SmmBeepStatusCodeHandlerLib.inf | 3 - Features/Intel/Debugging/BeepDebugFeaturePkg/Readme.md = | 91 +++++--- 10 files changed, 186 insertions(+), 206 deletions(-) diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeatureP= kg.dec b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.d= ec 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, {0= xa0, 0x3e, 0x1b, 0xeb, 0x56, 0x94, 0xd2, 0x16}} =20 -[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] +[PcdsFeatureFlag] + =20 +gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable|FALSE|BOOL +EAN|0x00000000 + +[PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] # Beep is a legacy feature, disabled it by default - gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep|FALSE|BOOLEAN|0x= 00000001 + =20 + gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep|TRUE|BOOLEAN|0 + x00000001 diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeatureP= kg.dsc b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.d= sc 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 + # + =20 +PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfo +rmHookLibNull.inf + # # This package always builds the feature. # diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebug= Feature.dsc b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebu= gFeature.dsc index b24b3e458f..251de6932b 100644 --- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature= .dsc +++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeat +++ ure.dsc @@ -18,97 +18,16 @@ # ##########################################################################= ###### [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 di= rectly -#[PcdsDynamicDefault] -# gBeepDebugFeaturePkgTokenSpaceGuid.PcdSta= tusCodeUseBeep|TRUE - -##########################################################################= ###### -# -# Library Class section - list of all Library Classes needed by this featu= re. -# -##########################################################################= ###### - -!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/BaseTimerLibNullTemplat= e.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBoo= tServicesTableLib.inf - UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/U= efiRuntimeServicesTableLib.inf - PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf - -[LibraryClasses.common.PEIM] - ####################################### - # Edk2 Packages - ####################################### - HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf - MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf - PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/= PeiServicesTablePointerLibIdt.inf - -[LibraryClasses.IA32.PEIM,LibraryClasses.IA32.PEI_CORE,LibraryClasses.IA32= .SEC] - ####################################### - # Edk2 Packages - ####################################### - ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf - -[LibraryClasses.common.DXE_DRIVER] - ####################################### - # Edk2 Packages - ####################################### - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf - MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf - -[LibraryClasses.common.DXE_RUNTIME_DRIVER] - ####################################### - # Edk2 Packages - ####################################### - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf - MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf - UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf - ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/R= untimeDxeReportStatusCodeLib.inf - -[LibraryClasses.common.UEFI_DRIVER] - ####################################### - # Edk2 Packages - ####################################### - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf - MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf - -[LibraryClasses.X64.DXE_SMM_DRIVER] - ####################################### - # Edk2 Packages - ####################################### - SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableL= ib.inf - MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAlloc= ationLib.inf - SmmIoLib|MdePkg/Library/SmmIoLib/SmmIoLib.inf - SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf - ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmRepor= tStatusCodeLib.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 ##########################################################################= ###### # @@ -128,77 +47,60 @@ # Feature PEI Components # =20 -# @todo: Change below line to [Components.$(PEI_ARCH)] after https://bugzi= lla.tianocore.org/show_bug.cgi?id=3D2308 -# is completed. +# +# By default, make the functional control a patcheable in module PCD #=20 +[PcdsPatchableInModule] + gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep + +[LibraryClasses.Common] + BeepLib|Debugging/BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf + =20 +BeepMapLib|Debugging/BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib. +inf + +[LibraryClasses.PEIM, LibraryClasses.PEI_CORE] + =20 +StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCo +deHandlerLib/PeiBeepStatusCodeHandlerLib.inf + +[LibraryClasses.DXE_RUNTIME_DRIVER] + =20 +StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCo +deHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf + +[LibraryClasses.DXE_SMM_DRIVER] + =20 +StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCo +deHandlerLib/SmmBeepStatusCodeHandlerLib.inf + [Components.IA32] - ##################################### - # Beep Debug Feature Package - ##################################### =20 - # Add library instances here that are not included in package components= and should be tested - # in the package build. - BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepStatusCodeHa= ndlerLib.inf + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf { + + # + # Many boards already have StatusCodeHandler components built from t= he common core code + # Providing a unique name avoids collisions. Both status code handl= er components will + # install their listeners with the status code routers. + # + FILE_GUID =3D $(BEEP_PEIM_FILENAME) + + =20 + NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/Pe + iBeepStatusCodeHandlerLib.inf + } =20 - # The following is an example for used with StatusCodeHandler: -# MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf { -# -# OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/O= emHookStatusCodeLibNull.inf -# SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLib= Null.inf -# BeepLib|BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf -# BeepMapLib|BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf -# NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepSta= tusCodeHandlerLib.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://bugzi= lla.tianocore.org/show_bug.cgi?id=3D2308 -# is completed. [Components.X64] - ##################################### - # Beep Debug Feature Package - ##################################### + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRun= timeDxe.inf { + + # + # Many boards already have StatusCodeHandler components built from t= he common core code + # Providing a unique name avoids collisions. Both status code handl= er components will + # install their listeners with the status code routers. + # + FILE_GUID =3D $(BEEP_DXE_FILENAME) + + =20 + NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/Ru + ntimeDxeBeepStatusCodeHandlerLib.inf + } =20 - # Add library instances here that are not included in package components= and should be tested - # in the package build. - BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatu= sCodeHandlerLib.inf - BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepStatusCodeHa= ndlerLib.inf - - # The following is an example for used with StatusCodeHandler: -# MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRun= timeDxe.inf { -# -# OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/O= emHookStatusCodeLibNull.inf -# SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLib= Null.inf -# BeepLib|BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf -# BeepMapLib|BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf -# NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxe= BeepStatusCodeHandlerLib.inf -# } - -# MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf { -# -# OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/O= emHookStatusCodeLibNull.inf -# SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLib= Null.inf -# BeepLib|BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf -# BeepMapLib|BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf -# NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepSta= tusCodeHandlerLib.inf -# } - - # Add components here that should be included in the package build. - -##########################################################################= ######################### -# -# BuildOptions Section - Define the module specific tool chain flags that = should be used as -# the default flags for a module. These flags are a= ppended to any -# standard flags that are defined by the build proc= ess. They can be -# applied for any modules or only those modules wit= h the specific -# module style (EDK or EDKII) specified in [Compone= nts] section. -# -# For advanced features, it is recommended to enabl= e [BuildOptions] in -# the applicable INF file so it does not affect the= whole board package -# build when this DSC file is active. -# -##########################################################################= ######################### -[BuildOptions] + MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf { + + # + # Many boards already have StatusCodeHandler components built from t= he common core code + # Providing a unique name avoids collisions. Both status code handl= er components will + # install their listeners with the status code routers. + # + FILE_GUID =3D $(BEEP_SMM_FILENAME) + + =20 + NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/Sm + mBeepStatusCodeHandlerLib.inf + } diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/Library/B= eepLib.h b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/Library/Bee= pLib.h index f768acc557..0b8f71b097 100644 --- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/Library/BeepLib.= 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 Va= lue. Some implementations of this library function may perform I/O operations directly to Beep device. Other implementations may send Value to - ReportStatusCode(), and the status code reporting mechanism will eventua= lly + ReportStatusCode (), and the status code reporting mechanism will=20 + 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/PostMemor= y.fdf b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PostMemory.fdf new file mode 100644 index 0000000000..447fb88235 --- /dev/null +++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PostMemory.fd +++ 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=20 +advanced features # can be conditionally included in the flash image=20 +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)=20 +MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRu +ntimeDxe.inf INF FILE_GUID =3D $(BEEP_SMM_FILENAME)=20 +MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PreMemory= .fdf b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PreMemory.fdf new file mode 100644 index 0000000000..160f5e3ffd --- /dev/null +++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PreMemory.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=20 +advanced features # can be conditionally included in the flash image=20 +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)=20 +MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatu= sCodeHandlerLib/PeiBeepStatusCodeHandlerLib.inf b/Features/Intel/Debugging/= BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepStatusCodeHandl= erLib.inf index 421b246663..5be78a72e8 100644 --- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHa= ndlerLib/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-4876348AA380 MODULE_TYPE =3D PEIM CONSTRUCTOR =3D PeiBeepStatusCodeHandlerLibConstructo= r - LIBRARY_CLASS =3D StatusCodeHandlerLib|SEC PEIM PEI_COR + LIBRARY_CLASS =3D StatusCodeHandlerLib|SEC PEIM PEI_COR= E =20 # # The following information is for reference only and not required by the = build tools. diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatu= sCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf b/Features/Intel/Deb= ugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepS= tatusCodeHandlerLib.inf index b9aae39128..2343e35a78 100644 --- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHa= ndlerLib/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/BeepStatu= sCodeHandlerLib/SmmBeepStatusCodeHandlerLib.inf b/Features/Intel/Debugging/= BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepStatusCodeHandl= erLib.inf index caa82264ae..4db1748fe3 100644 --- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHa= ndlerLib/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/Featu= res/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 analyze= the early error when there is not serial port. +Very often it is necessary to debug very close to the reset vector or in p= roduction systems that lack serial ports, seven segment displays, or useful= 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 tha= t handles the reset vector. In order to debug that early, it will be necess= ary to use the BeepLib directly in SEC code. =20 # High-Level Theory of Operation -It provide a library BeepStatusCodeHandlerLib used by edk2 StatusCodeHandl= er.efi, used to do beep if needed. -It also provide a library of BeepMap lib, it map the status code to beep v= alue. +It provides a library, BeepStatusCodeHandlerLib, used by edk2 StatusCodeHa= ndler.efi, used to do beep if needed. +It also provide a library of BeepMap lib which maps the status code to a b= eep value. A library of Beep lib is needed by platform, and this pkg has a Null imple= mentation. =20 -In the library contstructor function, BeepStatusCodeHandlerLib register th= e call back function for ReportStatusCode. -When called, it call GetBeepFromStatusCode() in BeepMapLib to get beep val= ue from status code, and call Beep() in BeepLib to beep. +In the library contstructor function, BeepStatusCodeHandlerLib registers t= he call back function for ReportStatusCode. When called, it calls GetBeepFr= omStatusCode (); in BeepMapLib to get beep value from status code, and call= s 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 ReportStatusCodeRou= ter.efi. =20 ## Modules * BeepStatusCodeHandlerLib @@ -32,13 +36,17 @@ Linked with StatusCodeHandler.efi, and make sure put th= e StatusCodeHandler.efi a * BeepLibNull =20 ## BeepStatusCodeHandlerLib -This library register the call back function for ReportStatusCode, and get= beep valude from status code, and do beep. +This library registers the callback function for ReportStatusCode, gets be= ep 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 s= tatus 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 s= tatus 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 from = 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/StatusCodeHandlerR= untimeDxe.inf { - - NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxe= BeepStatusCodeHandlerLib.inf - } - Refer to BeepDebugFeature.dsc for other example. -* Config PCD gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep. - In platform .dsc file, need to config the type of gBeepDebugFeaturePkgTo= kenSpaceGuid.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 gB= eepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep control desired. + [PcdsFixedAtBuild] is the feature default value as this has lowest size. + [PcdsDynamicExDefault] is the most common configuration as it provides d= ynamic 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 specifi= c 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() -> GetBeepValueFromStat= usCode() -> Beep() +ReportStatusCode () -> BeepStatusCodeReportWorker () ->=20 +GetBeepValueFromStatusCode () -> Beep () =20 ## Build Flows -There is not special build flows. +Standalone build +* build -a IA32 -a X64 -p=20 +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 T= RUE. -* Plug out all the memory, check can here the beep. +* Verify in board DSC file that=20 +gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable set to=20 +TRUE +* Verify board specific BeepLib implemented and included in board DSC file= . +* Verify that the board has a PlatformHookLib instance. There is a=20 +null library implementation if needed ``` + =20 +PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfo +rmHookLibNull.inf +``` +* Verify that your board has the StatusCodeHandler components (PEIM or dri= ver) desired. +``` + Example: + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerR= untimeDxe.inf { + + NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxe= BeepStatusCodeHandlerLib.inf + } + There are default StatusCodeHandlers for PEI, RT, and SMM in BeepDebugFe= aturePkg/Include in PreMemory.fdf and PostMemory.fdf for use. But most boa= rds will already have these components and you will just want to add the ap= propriate *StatusCodeHandlerLib.inf to each component. +``` +* Build +* Remove all the memory from the system and verify audible beep is heard w= hen attempting to boot. =20 ## Common Optimizations -* Implemented platform's special BeepMapLib if needed. +N/A -- 2.27.0.windows.1