From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.8424.1648568651692032415 for ; Tue, 29 Mar 2022 08:44:12 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=V2Ec8RtO; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: guo.dong@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648568651; x=1680104651; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=/LKoZMVwiDyqOWKt+V4VL9x4WcK5J2M+kCFMwE2kN1Q=; b=V2Ec8RtOCQkaVdXwGitV6DTuIu3wwFAh/gXrPAkRHWCfx+VhbVbucSIP FJrOMXy76/dwEQES+k/hCvJJ9LqmaO+lL1zWvnqlOXn6VitGXXNLUj2WF +hnZBcitA7QSIzVQFA2HthiKibVqDW7yc74C/m92AqX3bmtzt/FatUmz6 Aw/eXzgB8A3p4l1sHWiAYpRqPAsfBkVELCCmwmvTI0HFeTvFhydgktRFM wK+CC6iVmgVQquzjRnUXW6ORM3aqCINqH5NVmTZuOxlbz+OWxj+QRIeWj Q/EaoEyN3Eeh1ogRtmnTC3wQHVqI4ObgHjllyqiEhwuoGx/2NB5oimm1w g==; X-IronPort-AV: E=McAfee;i="6200,9189,10301"; a="239876512" X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="239876512" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 08:44:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="521483867" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga006.jf.intel.com with ESMTP; 29 Mar 2022 08:44:10 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) 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.27; Tue, 29 Mar 2022 08:44:09 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 29 Mar 2022 08:44:09 -0700 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.27 via Frontend Transport; Tue, 29 Mar 2022 08:44:09 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.40) 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.21; Tue, 29 Mar 2022 08:44:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U4d9FYDshoV2k5h14oaoI9Azx0IuzM5M2H8VEIzTQR5/RYzZhYHuEBOXoTX4cxrLXqB4z571CLugRK9Bn02X/Xmjb+xoqfdaMnfcvEjpjNRJfUzF91MsIqfrtQk3nLDMCDbvrOW5XCUs55N1oKXJ3QZlVXjIiVNKX3MMfWDghNNQKrHcji1kzGRtDYYKtay70Fo/XeuJEtmi801wEjjk/nYZlZ7nCPqzy/CQkBsZkuVhb6462K/wha1cqsuxs9cOiC0gABpm9gnPbaRZl/feBorAQfE9O/5+TCjp0NlN3R6JwUNzOfdZStildrSgyh4BJlbQhORwEV4cfxyPJdXGkQ== 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=+/a50dnKAv4LJSNY5LrexHZKCKqhwtv9WUDEkO/IWRU=; b=mIx58nFnBZJrZiqlYsWdM7ssRBn4rxk3HKbmOtNl8h16UxrZgfuYvdw0FkB2+oF6Jua0DWKnzS5u4B1A4M+tsD6iy7AYhFJndeJKZvc0Ytz06sb52WfFof4iADx+RdbQ98bDRMomWfopyVica+XIjrLGAQ/j3HqDY+OoNH19mx+0AlK1c2IYxuxJ4BidFG/vmK++jQ3oRGEq0yx8It/mlklSJEqGd7TrIdvKhMDKQ9U22B3Dyyjkg9T9NzF5VNqYt+eAHGrW4JMT1P3Wq9ChtDrRifuX9yjEYsp6boBrROY+vjfUIUEhAOxbvmsNV+JgWrRLfIL1qmb8YmxyjbHDKw== 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 BYAPR11MB3622.namprd11.prod.outlook.com (2603:10b6:a03:fe::30) by DM5PR11MB1467.namprd11.prod.outlook.com (2603:10b6:4:a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.17; Tue, 29 Mar 2022 15:44:06 +0000 Received: from BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::b13f:e635:ce8d:fad1]) by BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::b13f:e635:ce8d:fad1%4]) with mapi id 15.20.5123.019; Tue, 29 Mar 2022 15:44:06 +0000 From: "Guo Dong" To: "Xie, Yuanhao" , "Ni, Ray" CC: "You, Benjamin" , "Rhodes, Sean" , "devel@edk2.groups.io" Subject: Re: [PATCH 1/2] UefiPayloadPkg: Add a new DebugPrintErrorLevelLib instance Thread-Topic: [PATCH 1/2] UefiPayloadPkg: Add a new DebugPrintErrorLevelLib instance Thread-Index: AQHYQmjuDHC/go7o4UeMnHUjSSy6D6zVvVyggAAxToCAAJQGkA== Date: Tue, 29 Mar 2022 15:44:06 +0000 Message-ID: References: <20220328055849.989-1-yuanhao.xie@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 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: 92e7e79b-c1e1-43d8-b4be-08da119af567 x-ms-traffictypediagnostic: DM5PR11MB1467:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hlsDdwchFxf1LPlxMePCDVYBABEcD7w4wooyxgW7pQt5ebJSUpRadCpqzD7bBgx1r8Iz1QXBKFkn20ZiOWMQDVvPDNq4qRrP7ENzjRvfUivt3pOBJ6QEL2HZ+XL//ohW7VtkuF1H6cufhcVufIqoPzPvI0P7M/AZFg4U+C9FSejqo+u8jENtzCptT+ROF/gZH/3P1qZ9Zol2ez6MNJHZVbDNLL75CSlCJKfzg3lMKKs/arMDiQmKm9DYKG1vt8jCwH93wwKlb2Kf5bWt15PMvL/A5wDah+2Lv6LeMOXKGkYzDlSl9qMFHJdUs6yor8VzJHIfTcJNauiSZtR7rgk83ZsoPcAsF/IPfPVDKKak4ikAa4dBT6B1D86iY/0s4L7Nh97CauqF/CCpyo3ht1gSjuf3qW6rNvZ76NF01OS+1mJVM1u7Px11f58poQ776KxYRToc0+PlW4QAuSe8jezc5QPAKCs5+dRUv00Bp3MjSbjcbVe5rFi8UDOz5g9j2rVyVFWGgSaqmz3kKH6RxspIxDaScg2CpvBy4gnb192GQyCXrcjOiG3f31YkvLhxj7u3D7wlnaYcEz7Lut6yLP56VAAkV64VDkT7d7ascXmaUZTEM5VCLhl28tn20/VrnqmnQb6hTJ3GCCv9huWhIfg/73ews9FQI62ImQ9n8HoitYG+qwOftaricqy+90ilw0JXebDkc/u//JCSSQZ4LUypd0VzVMmzqjLtQf1uJ0FkRuY= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3622.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(2906002)(38100700002)(38070700005)(71200400001)(66556008)(66946007)(508600001)(6506007)(7696005)(9686003)(122000001)(52536014)(53546011)(8936002)(82960400001)(55016003)(316002)(64756008)(83380400001)(110136005)(186003)(86362001)(8676002)(66476007)(4326008)(76116006)(54906003)(5660300002)(33656002)(66446008)(6636002)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 2 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tpHcPUmEnw7nywi6KIg+lF0WhNul2HubE4Qi/dINtxVlugsrkU216K2MM1yB?= =?us-ascii?Q?0oHuEYM83EGStveJAxs8Qat52OqNDeNGVXQ2sFCwrzeqXk8S5SE5R3EvVOVT?= =?us-ascii?Q?anLXhCSLJaxZvLL2j6ZHHJMq/n+12X9AUNU3CwKECkx0KP/sMqCk4BdSLMqm?= =?us-ascii?Q?9xf6uWdq7Jv99SD5+m2tSd/XaMiaT+nzo4Zbp/4Y/ufmbbCnAryUu53+EL66?= =?us-ascii?Q?bvQlT3A6pUoYkYbLFOL1MJ7BG/ZZPW7etm7IKKeGIyaCkMrmlFpe+avZWz+S?= =?us-ascii?Q?Go8qVXSF76nq/bFpwhLSBoXJa4M4DPGtspPmaut83a71Wm5OxE3yi8jLFwk6?= =?us-ascii?Q?aZV+qAzWytmZzNfjX/dlVyxHbwXYh1urjOR/QJReZYrh0HozdKejDKGjZivy?= =?us-ascii?Q?GUoMKPCn65w+vABciYWaEnKdDVj2HrVLgejk9qI09B3O3ZD6NK39AvSDiO0N?= =?us-ascii?Q?t15KFBvEU3ZOg7LfZCPmrjrEeiWHhlE6AS5gfaWyYQSk3nnvqJGZc7f9SSaJ?= =?us-ascii?Q?hpUFoimW1KoyYj5NpC6bSd/scpb2Ct57R/znvWNFW5rd//SR+9O2IIyos+KA?= =?us-ascii?Q?SpNQ7s1iJ6LdZuK5Z/iYvhzAlTMt/pvj0TQ/NLNf5KM5m2yXSJraF2jhSLsI?= =?us-ascii?Q?eOKq6HioAdH9lxAVwwsnUzepfutQM81lB59ZFDbdhAgJaib818+j5sBKPCTW?= =?us-ascii?Q?ZW+ut+JJ8BHior083E7rA0xYd1lRV1y1YuROzlzDUN+DwzbaBLOKu6A1thdn?= =?us-ascii?Q?EepcYA4FHl2aQtA0hjvy6ng4sp1eIfUq9qZLxQ8vzuJg7AMJPhZZE6WATzaI?= =?us-ascii?Q?57ko7eHNPQyxnLD/0ZbmGGT75rWFTSczpeMkuXfJFQ0IGBpw2kyEDKreXtLX?= =?us-ascii?Q?OcUenHyxHwjtm7QJEWFOJA+X/nNzZZaPrYU3vs7dINuat+jNA7BLwrkcjrQi?= =?us-ascii?Q?st9kZo9GFla8WPoLuTjEG1/gayIs0Idwbfffht6ZhPk9Qt9A1MAoMdkoybUg?= =?us-ascii?Q?WNDdn81Cr3WKeaOk5UvBZd9/fYwvprwKp4dlaMOt93Tpsi68aQBZMNDpVlJG?= =?us-ascii?Q?epKCPgE3TmH9byeoJMmMVkL4zllBXahejEJqiNQzc25KQCdcI0uFuK7xnw96?= =?us-ascii?Q?WIv4prmufoXRAdL9IkxD5RPpHYBZMl6oLOulOs+cvAOW0K60t+bX2LNGesHd?= =?us-ascii?Q?7biJ1vJOuzuJf16rt6qfEcBxrv/bMI+2cKVwNubwv0XtDp34P0x5olpdMNmG?= =?us-ascii?Q?BmSZgOue4641skb+OpKCIgrXRxa92iMIxcJnFhkJR2pR3CcfJVuPDfZB2rNj?= =?us-ascii?Q?O0shx9lOZj9mMt9a7SO9TmzM9q2W7DhfHzi3Tl9bHS4SqwhDGeZRFcWNLJa0?= =?us-ascii?Q?g6f2SmjxL3lXPHZKnjk+sWf34I198i/Pz+D7pzV/BzUyvIfd6smArvw8nNy7?= =?us-ascii?Q?c8EXxjWYczzWtCpd/7L1dD6Zyhb2NI4hJVPXi/LzBO20+Sxuw+6kbcmI2FFh?= =?us-ascii?Q?bcGmXs9oRyPfxM6Y7Rn/xR57/UN25AaiVcep2ZyOpfcHxay3sCf2kbDa1/tb?= =?us-ascii?Q?rk+fF88gkRdw+Fv0V0bYtWyCb0PhSTsIJlgA0S1GDmOZS7bvlgCf3lptJn/M?= =?us-ascii?Q?IOEelcqL4zsI/Olr1fm6sb1CCx3RS/tdFe1RaN4FHiPpzzUk5wgniDknqkvA?= =?us-ascii?Q?4u0d+2HDA3xKfkKvWE6leqz/QMwwCvk6hqj3Vm1MrUZBd/e/BhEVx1sWPjVZ?= =?us-ascii?Q?WRvCAp+v8hBM5W5/mz5OzENzcX7Y7BkKSalFdS78duCouAd+HGbs/VB7WH/h?= x-ms-exchange-antispam-messagedata-1: YHkfAX54v9+jtQ== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3622.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92e7e79b-c1e1-43d8-b4be-08da119af567 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Mar 2022 15:44:06.4165 (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: bFX6QMBv3wxNOygQndsrvrf3II1C5M4WxLYeKhs4m+Zw4Toi60h9oQT69AN0vyA0+dxbSSbTLpLY0TtuULCavg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1467 Return-Path: guo.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Yuanhao, The suggestion looks good to me. Thanks, Guo -----Original Message----- From: Xie, Yuanhao =20 Sent: Monday, March 28, 2022 11:54 PM To: Dong, Guo ; Ni, Ray Cc: You, Benjamin ; Rhodes, Sean ; devel@edk2.groups.io Subject: RE: [PATCH 1/2] UefiPayloadPkg: Add a new DebugPrintErrorLevelLib = instance Hi Guo, Sorry for the late response. Just as we discussed today, and also from the suggestions by Ray, in the ne= w patch I will=20 1. changed "UNIVERSAL_PAYLOAD_ DEBUG_PRINT_ERROR_LEVEL" to "UEFI_PAYLOAD_DE= BUG_PRINT_ERROR_LEVEL", and 2. add a comment referencing Debuglib.h to decl= are bits for "ErrorLevel" parameters. The reason why better not just declar= e those common bits is because it can cause confusion if other developers s= till use the rest. What do you think? Thanks, Yuanhao -----Original Message----- From: Dong, Guo Sent: Tuesday, March 29, 2022 12:00 PM To: Xie, Yuanhao ; devel@edk2.groups.io Cc: Ni, Ray ; You, Benjamin ; Rho= des, Sean Subject: RE: [PATCH 1/2] UefiPayloadPkg: Add a new DebugPrintErrorLevelLib = instance I replied in another email. It looks the comments are not addressed in this= patch, especially on this comment: In the DebugPrintErrorLevel.h, ErrorLevel is defined as UINT32, but its usa= ge is not clear for bootloaders ( so need add more info in the header file) Thanks, Guo -----Original Message----- From: Xie, Yuanhao Sent: Sunday, March 27, 2022 10:59 PM To: devel@edk2.groups.io Cc: Dong, Guo ; Ni, Ray ; Maurice Ma = ; You, Benjamin ; Rhodes, Sea= n Subject: [PATCH 1/2] UefiPayloadPkg: Add a new DebugPrintErrorLevelLib inst= ance It consumes the HOB defined in UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h, and allow bootloader t= o config DebugPrintErrorLevel. Cc: Guo Dong Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You Cc: Sean Rhodes Signed-off-by: Yuanhao Xie --- UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h = | 27 +++++++++++++++++++++++++++ UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibH= ob.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++++++++ UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibH= ob.inf | 39 +++++++++++++++++++++++++++++++++++++++ UefiPayloadPkg/UefiPayloadPkg.dec = | 2 +- 4 files changed, 144 insertions(+), 1 deletion(-) diff --git a/UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h b/UefiPaylo= adPkg/Include/Guid/DebugPrintErrorLevel.h new file mode 100644 index 0000000000..9a3f4eb28e --- /dev/null +++ b/UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h @@ -0,0 +1,27 @@ +/** @file + Define the structure for Debug Print Error Level Guid Hob. + +Copyright (c) 2022, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef UNIVERSAL_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_H_ +#define UNIVERSAL_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_H_ + +#include +#include + +#pragma pack (1) + +typedef struct { + UNIVERSAL_PAYLOAD_GENERIC_HEADER Header; + UINT32 ErrorLevel; +} UNIVERSAL_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL; + +#pragma pack() + +#define UNIVERSAL_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_REVISION 1 + +extern GUID gEdkiiDebugPrintErrorLevelGuid; #endif diff --git a/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintEr= rorLevelLibHob.c b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugP= rintErrorLevelLibHob.c new file mode 100644 index 0000000000..18378249ab --- /dev/null +++ b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorL +++ evelLibHob.c @@ -0,0 +1,77 @@ +/** @file + Debug Print Error Level library instance that retrieves + the DebugPrintErrorLevel from bootloader. + + Copyright (c) 2022, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +STATIC UINT32 gDebugPrintErrorLevel; +STATIC BOOLEAN gDebugPrintErrorLevelInitialized =3D FALSE; +/** + Returns the debug print error level mask for the current module. + + @return Debug print error level mask for the current module. + +**/ +UINT32 +EFIAPI +GetDebugPrintErrorLevel ( + VOID + ) +{ + VOID *GuidHob; + UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader; + UNIVERSAL_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL *DebugPrintErrorLevel; + + if (!gDebugPrintErrorLevelInitialized) { + gDebugPrintErrorLevelInitialized =3D TRUE; + gDebugPrintErrorLevel =3D PcdGet32(PcdDebugPrintErrorLevel); + GuidHob =3D GetFirstGuidHob (&gEdkiiDebugPrintErrorLevelGuid); + if (GuidHob !=3D NULL) { + GenericHeader =3D (UNIVERSAL_PAYLOAD_GENERIC_HEADER *)GET_GUID_HOB_D= ATA (GuidHob); + if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) < GET_GUID_HOB_DATA_S= IZE (GuidHob))=20 + && (GenericHeader->Length <=3D GET_GUID_HOB_DATA_SIZE (GuidHob))= ) { + if (GenericHeader->Revision =3D=3D UNIVERSAL_PAYLOAD_DEBUG_PRINT_E= RROR_LEVEL_REVISION) { + DebugPrintErrorLevel =3D (UNIVERSAL_PAYLOAD_DEBUG_PRINT_ERROR_L= EVEL *)GET_GUID_HOB_DATA (GuidHob); + if (DebugPrintErrorLevel->Header.Length > UNIVERSAL_PAYLOAD_SIZE= OF_THROUGH_FIELD (UNIVERSAL_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL, ErrorLevel)) { + gDebugPrintErrorLevel =3D DebugPrintErrorLevel->ErrorLevel; =20 + } + } + }=20 + } + } + return gDebugPrintErrorLevel; +} + +/** + Sets the global debug print error level mask fpr the entire platform. + + @param ErrorLevel Global debug print error level. + + @retval TRUE The debug print error level mask was sucessfully= set. + @retval FALSE The debug print error level mask could not be se= t. + +**/ +BOOLEAN +EFIAPI +SetDebugPrintErrorLevel ( + UINT32 ErrorLevel + ) +{ + // + // This library uinstance does not support setting the global debug=20 +print error + // level mask. + // + return FALSE; +} diff --git a/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintEr= rorLevelLibHob.inf b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/Debu= gPrintErrorLevelLibHob.inf new file mode 100644 index 0000000000..0845b5a2f4 --- /dev/null +++ b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorL +++ evelLibHob.inf @@ -0,0 +1,39 @@ +## @file +# Debug Print Error Level library instance that retrieves # the=20 +DebugPrintErrorLevel from bootloader. +# +# Copyright (c) 2022, Intel Corporation. All rights reserved.
# # +SPDX-License-Identifier: BSD-2-Clause-Patent # ## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D DebugPrintErrorLevelLibHob + FILE_GUID =3D c3fead6d-bd4c-4131-bd5f-4bbceecc0fef + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D DebugPrintErrorLevelLib + +# +# VALID_ARCHITECTURES =3D IA32 X64 EBC +# + +[Sources] + DebugPrintErrorLevelLibHob.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + UefiPayloadPkg/UefiPayloadPkg.dec + +[LibraryClasses] + PcdLib + HobLib + +[Pcd] + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel + +[Guids] + gEdkiiDebugPrintErrorLevelGuid diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayload= Pkg.dec index 4051172caf..5c1aeb8235 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dec +++ b/UefiPayloadPkg/UefiPayloadPkg.dec @@ -31,7 +31,7 @@ =20 ##include/Guid/BootManagerMenu.h gEdkiiBootManagerMenuFileGuid =3D { 0xdf939333, 0x42fc, 0x4b2a, { 0xa5, = 0x9e, 0xbb, 0xae, 0x82, 0x81, 0xfe, 0xef }} - + gEdkiiDebugPrintErrorLevelGuid =3D { 0xad82f436, 0x75c5, 0x4aa9, {=20 + 0x92, 0x93, 0xc5, 0x55, 0x0a, 0x7f, 0xf9, 0x71 }} gUefiAcpiBoardInfoGuid =3D {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x= 2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}} gUefiSerialPortInfoGuid =3D { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98,= 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } } gLoaderMemoryMapInfoGuid =3D { 0xa1ff7424, 0x7a1a, 0x478e, { 0xa9, 0xe4,= 0x92, 0xf3, 0x57, 0xd1, 0x28, 0x32 } } -- 2.30.0.windows.1