From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web08.24952.1658133479189351672 for ; Mon, 18 Jul 2022 01:37:59 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=IcbHZgag; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: dandan.bi@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658133479; x=1689669479; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=sSTNs+r4+1yIlNVTeS4BQhhOmzdeEg7HxKHQlWgJaNM=; b=IcbHZgage8ufufZXFy+4/PqP5taahU6YK8gKIEnSHlIqD93csca7Pth+ LRmgI+AVE3F/bjguzHXLcKnWCvNpxrKOVqg0P5MFxqYtQsi7frMQXeGtU Zm2OvDydfOI6sMraEBigbeQ+UGMOq7kdYkPeS432751hkJMDdmRATExqn o/ra6Vln9ZM3CwBXyne8DUsiXEqfi98Z8McroUZsMlD3iudo791N21QML wt5t7QjYz4Xj5QV14NFgOkw66o1+SGuVga8sIJui5KD0kmtojAhdzT7NY 3+/Tp6kNhKK1Emp0BxzwMXQC8Dkv1kqiMvIoJsiuQTzLmRf+Y4KAJwlbY Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="286186875" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="286186875" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 01:37:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="924257699" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP; 18 Jul 2022 01:37:58 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 18 Jul 2022 01:37:58 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 18 Jul 2022 01:37:58 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 18 Jul 2022 01:37:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MLoahPLgqrQH81ui2CBTDIM2/hADUj+zLASFwnqgox/17UUNiiRKijejKsuLOVNe9I6Jed5JwpDnbCp5xLj8PrpgsTDOZ55KACj/7twJFAA7B1f5QNXCC7/mIs5CwuutHaT9h4ulZ4y3QMHJG0Qt4FWrnYFbzJR+OTw6wQ2PPMjxyRKQ+if4bniYqGfbee50V3D6MDGju4IeO7BcQ5i77ClBwvUxgPEY4oeV/IG+dKlsa59uvQploYPzr9tfLmbOaSymd1pnPfR3K0saE2kn9/Fpbcpxj4ihGZN5EuG4EN1IB+VeZHu7ENNydmJAfDs6Oq47OtFo+n9t1CO3vmOvYA== 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=5YUwWXwVdN9pRVNgsRyYITMoww4nf0RDUrw9G3rzYWM=; b=ZMF+YEbWgZl8m+7UXHTK0pMSBlSsQP6Jh3o5VD3ynJCBjuj7dVWU7SDc0GrvUPMU0n157nTVeTgkyJe7uVFqd1wVoOtdps58oXRH0HhNC6EHdZjptC+Hm7oQJs5HP8XdrX/LLqjEOaEo2KW5zl08AuelVRwmOg5rXHVSsnFMTf/Ju+kmFS/NoDnx903AABEAOZGDwEj1A92jDb6irMtEIPAUr4LehNi8wnknbN26p32S/4H2urSJDbleQLmnN7ZUGc70hGlFHq0W4kCSxDHoMrp5PL1o9prk6UCtZGvoaG/9KZp2MtrHiBviTzxx+t6M5BseJLBF1e5KS6/0fOnNSA== 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 PH0PR11MB5928.namprd11.prod.outlook.com (2603:10b6:510:144::16) by PH0PR11MB5579.namprd11.prod.outlook.com (2603:10b6:510:e6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12; Mon, 18 Jul 2022 08:37:55 +0000 Received: from PH0PR11MB5928.namprd11.prod.outlook.com ([fe80::e506:84a1:85da:5e51]) by PH0PR11MB5928.namprd11.prod.outlook.com ([fe80::e506:84a1:85da:5e51%4]) with mapi id 15.20.5438.012; Mon, 18 Jul 2022 08:37:55 +0000 From: "Dandan Bi" To: "Lai, Cosmo" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Gao, Liming" Subject: Re: [PATCH v3] MdeModulePkg/Include: Long debug string is truncated to 104 char Thread-Topic: [PATCH v3] MdeModulePkg/Include: Long debug string is truncated to 104 char Thread-Index: AQHYl+xMP6OFMAQdEUGP1zW9XBTtRK2D0H/g Date: Mon, 18 Jul 2022 08:37:55 +0000 Message-ID: References: <83e97457873d93c8b1eab91b513aae2e444e08ca.1657849347.git.cosmo.lai@intel.com> In-Reply-To: <83e97457873d93c8b1eab91b513aae2e444e08ca.1657849347.git.cosmo.lai@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: a8d7a7e6-cca7-442b-ba63-08da6898cfdc x-ms-traffictypediagnostic: PH0PR11MB5579:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: L3MGNzn6KYZLpnXm5MeMdQF8VeOSvPnst2uwKazrr7udjnGh4iqgM1pLG0u1U9YltOAK9pojT658I+JD6Bv8PY7K0kqR/4NHYTaGuSTUBQhyMnhVlFiaLtwx6PBrA954FVuNuhCm13bLD3DDdUFt0wEGGkk1lmyxsEUc1RA5xpCm8dnadtWORpHmcKwFGPxt7/TJTYdDZJYMrk1leaDXtn3Tez/Xi3Zv4dcpMpDNePCsWv8HTrx2GznGJX1F4zs9co0G4tWJVZ1+Okl+PurHrNM66ys/U+LWdqFIlza+sq4miYIrEWzR0q/QADs0ysOKfyifbO9jviK8GxNLsB8Fhpj9mS+B6gB3DKMOfZiaHpy7kwq3EkWxwNcpIR0Fuq5aiSwWcRai7wuYJdmQuMtNr2vUVJ2cFjgb848PXGU1GyITK7r3EujhqcbDHVsuAEU9kr05B5jx0y2teMcZx94KK4COEo/V+VeCwtLPYAmxjtXw7d6gjuq5P80oJNZWPKK9aKDKCCVk4kC5P09kYR3kKLRWe5uA6AeXvOr65xQpjdB/aGjKXkWxU02617ZnXD23NVZLgC/mkS+hh4z+KyAHXVEyE3beoKQfAP52NYOGl+UxjaEHJbKgAyyZ/tL5lpfUxaGOCjAAUchi33FDBV7hoQ8c/hnb62sX5S1g5e1HpClzfN3k1yxXaU/k3I+uhwI77NaqjoPg0za8/WVYcyjYpWtmK9rvczeYymWBtEQEWMT6xThAHV4JVg4yo8g4TwSqzsbeMCpb2XKMx2RvFnlSoQc1Z0FCIC89gNK6ozqigdpTuSCCdZU721zZtxVanjkw5quo7PwbZREmfNrevzJ5KeU79q676vVoTF/SDhHVatM= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5928.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(136003)(366004)(39860400002)(346002)(376002)(83380400001)(9686003)(26005)(186003)(33656002)(41300700001)(2906002)(7696005)(53546011)(6506007)(478600001)(55016003)(966005)(5660300002)(8936002)(52536014)(86362001)(110136005)(54906003)(38100700002)(316002)(122000001)(64756008)(38070700005)(76116006)(82960400001)(66476007)(66556008)(66946007)(66446008)(71200400001)(4326008)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?HSoJxnzC0zlHm8nmXnYk8er4dJ4p8y578xZhjBZJhoVQVlzhOf83zbUGHn8k?= =?us-ascii?Q?o94xJIwxf6BCKSX6akdVjvl/EHoqO0AqxTqdjWwvlKcQL5AhzCRwD6AIf0N5?= =?us-ascii?Q?FWiIflO8Vvenfp00xNfYaEkVohD1wwXamLgjD7eHfGpJyQiTwto4Y27PhQ/X?= =?us-ascii?Q?70wu8Ma1sLjGXxgAlScytjKzMptz/ZdPYSAOpeuym74ORYaBuNUqCwNSicJa?= =?us-ascii?Q?NjRZ5J1bmWKQJ0xOx47s8JH+fVLoXSkPp77IVKxc2LVYe+eXO8ykiZeExA9o?= =?us-ascii?Q?pHdETO0nLi0u3tt03KHxq4e/kJBDmQhP/qFcGh0pcgPDZo3UT4QrbhMHMdu2?= =?us-ascii?Q?F9IpE1ZU6PFWtt7QVifBoVX7fhwp1eObNuASNF2S8elY+FrBnvcCbBd+Q3ta?= =?us-ascii?Q?Sfb/Q+1ndfWsEcS12IG0pvrmGzYXydwMcNYe3vwAUucGz6hNWqmdFpB46T0o?= =?us-ascii?Q?dDJMOurIkPIG71w/6d0kA69wSwWdppfU6QUs0V2o/81Sh+aFWNehD1j0Wx9v?= =?us-ascii?Q?dvNNi3zq7g14U2vGPTZjbRSRX18Ouy4XQHVTooH3Q/kf22CtLEGuccG4jDiR?= =?us-ascii?Q?9jaaRdXriK6b1004heepxIcN2gRc3QASurxNKswD0/k233K2MXlkxwpPIKm4?= =?us-ascii?Q?U2LbFJAAUKk1KsorRtbIRDNQzq9WvbXVPrgU/QG6aK/B+8Zljs9gsAbWYKvg?= =?us-ascii?Q?fvq70Mc3qnOfKLav/DKHqyW+orVOuzMc5/53BlomhK1EHXM9saALmMDOcBjg?= =?us-ascii?Q?iJ74hSRINUEeugXAakaSasmWCX0BxRinmwErqHbhT8vdApDAz/enSQa/W7Ff?= =?us-ascii?Q?5aImXcZ5OvrLI3HX7Px8znB8bnMrvaAywJQyklA9EpWuMhWRt40VvDBMntkH?= =?us-ascii?Q?LK+FkNhSa+eTxeLEzKo7ctMWPXJMshJuGDxTLSxryU0IVrHdJcTsOu1pTCFD?= =?us-ascii?Q?piGvYuCqjmEZDvAHsYc0SR/qTB3xhWcZtUEZ+d+sJLDQUq0xs1UXH+eZi/4c?= =?us-ascii?Q?deRd/6B3vIsSSU9iNpdNidP0IujEraOJI42yLG8MNykv00ZpPYJa//lxcgBj?= =?us-ascii?Q?HlB2f1ynp5RWmV7arNjgWzsJrsObVHIyUsMG5JTxiB63IIWdh7KXpn8Crh+6?= =?us-ascii?Q?tVcgxMpfRdn/O0GC4CIcr3UqQ/8C7R2NOFN7VCLO5XSTbJUacKY7Grv+DEc8?= =?us-ascii?Q?KYIgo99TbyIBBwML6MYh+QyFttFJKmnRhG9lPwF3XRCqJERcdhMmdaeoqOaU?= =?us-ascii?Q?wg308oJFisvBUFMtcM52WNhWDm0NOxFNtll1FQlFQzGpbWuFI82iGHyMI3xc?= =?us-ascii?Q?2DyUPORFxe9m9JWHrYIBL4j+6aoOeNWRPhokUl3GOgx6faamubKVoH8INh+O?= =?us-ascii?Q?7Yu9UJtsgemtvou+iECQeZQAWs5O6CN75ZrON8N3nBdtOpu91iaE82HnMKxD?= =?us-ascii?Q?kjSSoV4bjoiDYyPUUZJxbUgSLBYiKoI3bvb3LEu+K1GGjsTEeZ0KrXmWzBeC?= =?us-ascii?Q?TpBudzuF4hNPRsmoEWKE6UINVPOHcNKLi/qRDytYRwprJhn4T0kkPTecSXan?= =?us-ascii?Q?2x95s+L4eiYTpmd38n7HI+ZlMPJ/0GMBK/MTClD1?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5928.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8d7a7e6-cca7-442b-ba63-08da6898cfdc X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jul 2022 08:37:55.7857 (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: f0QOMOB2DiUxchjUexEMXHaMk2aoAEzaiWysvdo1qRCY9fyK1FFhroJ6a8MtWK1zl+RqxjQSDfJpM9pKGn48pw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5579 Return-Path: dandan.bi@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Cosmo, Could you set the value of macro EFI_STATUS_CODE_DATA_MAX_SIZE less than t= he value of MAX_EXTENDED_DATA_SIZE (also 0x200)- sizeof (EFI_STATUS_CODE_D= ATA)? For example, the implementation of ReportStatusCodeEx in MdeModulePkg/Libra= ry/PeiReportStatusCodeLib/ReportStatusCodeLib.c has following check, It may cause some debug msg missed if setting EFI_STATUS_CODE_DATA_MAX_SIZE= same with MAX_EXTENDED_DATA_SIZE, right? if (ExtendedDataSize > (MAX_EXTENDED_DATA_SIZE - sizeof (EFI_STATUS_CODE_DA= TA))) { // // The local variable Buffer not large enough to hold the extended data a= ssociated // with the status code being reported. // DEBUG ((DEBUG_ERROR, "Status code extended data is too large to be report= ed!\n")); return EFI_OUT_OF_RESOURCES; } Thanks, Dandan -----Original Message----- From: Lai, Cosmo =20 Sent: Friday, July 15, 2022 9:43 AM To: devel@edk2.groups.io Cc: Lai, Cosmo ; Wang, Jian J ;= Gao, Liming ; Bi, Dandan Subject: [PATCH v3] MdeModulePkg/Include: Long debug string is truncated to= 104 char From: Cosmo Lai REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3986 The EFI_STATUS_CODE_DATA_MAX_SIZE is defined as 200 in MdeModulePkg. After reducing 96byte buffer for variable parameters it is limited to only = 104 char debug string. This is a non-necessary limitation. It can be set to 0x200 to follow MAX_EXTENDED_DATA_SIZE (also 0x200) which = is used in ReportStatusCodeLib to support longer debug string. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Cosmo Lai --- MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h b/MdeModul= ePkg/Include/Guid/StatusCodeDataTypeDebug.h index 16203452e4..2f408a5622 100644 --- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h +++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h @@ -21,7 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Th= e maximum size of an EFI_DEBUG_INFO structure. /// -#define EFI_STATUS_CODE_DATA_MAX_SIZE 200 +#define EFI_STATUS_CODE_DATA_MAX_SIZE 0x200 =20 /// /// This structure contains the ErrorLevel passed into the DEBUG() macro, = followed -- 2.16.2.windows.1