From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.1111.1658367722108105753 for ; Wed, 20 Jul 2022 18:42:02 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=aGrRhGq4; spf=pass (domain: intel.com, ip: 192.55.52.43, 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=1658367722; x=1689903722; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=eYIdxeeVi4aqIVASu3hPHhFAKB1hSRdYT/QkglWvO3o=; b=aGrRhGq4NcHWCZZ1jX8W3AxWTf/K5mtWOaaok0B7GCyyBZ/oOKqjJiYM XeI+Kr30CqDY+i+YjCqqCiMzV8MWEeOA56afhepFXMbzVqCJ8MGTL2CrW EUTSEHGIkfWkci+JnoHBdLsy1aCytfSF8K94FuHUyGGkpX7JtB78sLgg3 rgmQ8ShlaIiAaEOf771S11ReDxSQBJPJ6Li7mndiXBIIc+UoVc1o1+iQV QpTIMw9WPPSN+eap1x3nh9YZecN7HPrwpuYWz9/UUtYP2lAh1XcXldXYJ hMiQK06qWU+PqM225fYHV36k+mab8xml8f5fGH4Wc6pJMv5XFhL9Ja8bW g==; X-IronPort-AV: E=McAfee;i="6400,9594,10414"; a="373227659" X-IronPort-AV: E=Sophos;i="5.92,288,1650956400"; d="scan'208";a="373227659" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2022 18:42:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,288,1650956400"; d="scan'208";a="666095288" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga004.fm.intel.com with ESMTP; 20 Jul 2022 18:42:01 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 20 Jul 2022 18:42:00 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 20 Jul 2022 18:42:00 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2375.28 via Frontend Transport; Wed, 20 Jul 2022 18:42:00 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) 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.27; Wed, 20 Jul 2022 18:41:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bc7GscviLhhg+Kgw6amKLdXxVal7b3iWkHdXd0Lmg6p8zEjJz8SwrrdQMnj69ZUpF6uY5zt0USNjRMVVZLHdx+uOeTjpmgWPdfWT1otxdvMu9QKUvac7TAfIrBckkyqOg0l6thYcxPAy54yqYiWFtwGeuhlvI1qNtoO7VBoCV+sDDJIcyeirxhlctzE99Psinv1PwOwNyqAWwJqlWPDF5yix16lELOvA4YDRlkHVOPU72AMZ3BOV1stMRrrxWZsaz9eV3TYLfCS1/yzXt3aj80IF6YKjmSzN+ieodhGoe+57YbvWix6dgBWaapRglFs3qDd9yZJX0ROllclqIAjGFw== 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=nqd1MHgq27HwWm42IaleIkepNgmBj7GazTGtWhqt9Yg=; b=W58IX0snpcBEQGfOBSlSEaaQd0vpk2Tr7oOP9eKQFfOrtki41qRJEwetnELf4AqzoqHP7KIT5xSoAyCRWIhOwPInPaccgbmrk/TnLGRK7Q7yLOCUfNiQ2GDKrERE03eJXP7RgNDMf7QWgnIJfxT1Q/tlv96N4+np66duQrb/2pZsUGH1Z9xBmr3i4+FCdlgzlltoGqH0hILCHe6/nof9DPp8qbr+AlhM4uAxKcMUntSU4WKVJUiZ2WldhHViPuHWt2h02vqDsA6f4kKlmtu7OPP14R8f7t15k6q+HZ1Nd1hybVNWekKkN5YDDbecjtsmH+I4hF83WiR6qZRd3JDUPQ== 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 DM4PR11MB5326.namprd11.prod.outlook.com (2603:10b6:5:391::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Thu, 21 Jul 2022 01:41:58 +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; Thu, 21 Jul 2022 01:41:58 +0000 From: "Dandan Bi" To: "Lai, Cosmo" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Gao, Liming" Subject: Re: [PATCH v5] MdeModulePkg/Include: Long debug string is truncated to 104 char Thread-Topic: [PATCH v5] MdeModulePkg/Include: Long debug string is truncated to 104 char Thread-Index: AQHYmzSi6+u167sxCESeuCFdLvpgnK2ID4og Date: Thu, 21 Jul 2022 01:41:58 +0000 Message-ID: References: <98b4283b3ccad4a64b141ae7832f0698dd777877.1658210289.git.cosmo.lai@intel.com> In-Reply-To: <98b4283b3ccad4a64b141ae7832f0698dd777877.1658210289.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: 9864fe4f-2e16-42b3-a9f7-08da6aba3345 x-ms-traffictypediagnostic: DM4PR11MB5326: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: P28g6oH6dzAt0nl7FSC18TaVBVN0rZEBIOHVDtQ+Mlm8Pqzb6Fs/78g/v13jVpxKHvSbFc4ynlwK1MnrcoyPgjHOF7GdBrRoNhSNJUbvBMoBt6iOeRmcBnd7DGizHc9htOdt8vhWRjDjamB5zzfhC8f8Dw94O4CC0BnZ35T2AMfrTbdAV8MWUTjgUHkViSWAvq+WqcLbmlXgPkE8teon/vuu6T4A1C/4FemqQaQdgxHmCPn1WcFKkLeqbmwFxfqejh94fwXnEtxVRfEqd13VrmwUuyGp8L8k9fknqKNYdF6dMElWQz6nxN32w/uiB7JRUc8C27SZF4Nd7BwmiQnXVKlSTSeGglXxvwLChfQSHZbYga87t2ZrgteU3RPg0wR1OMJ04GjXSlOGlWlRw1IbCssQWb/BtKw+DX7iLOiT4iBPvtdxzoHbuhzeVJrjvX3N49Yn/7lFlpBEn03oc5kArH92QpqouNtwkHGsBtJt1Bm8lB9OVTthMYu26GFcZOinuGdr478qXeCRB5VT8Sl2cDdiiaVkxdPRCMsMy3Jqxv3kUPskvovenAvIfb2oZhCCGOa4u10RE4HfWVqtkYgbXC0J5vhMhmcOfVHVjQUMGUrSVKnzVgcRKSm2DGf3Z0FMl3kVQ6lsnAa2V/1uFcNFmYcbizssQ1yF4lpLrsFZMavzlbprGSLsbwtP/nuSJSs2ApuqGE8Zt1geKe43ipikxT9y+orFyZzCim5rO7TOX69xBECL9lj2PZ/E2d/Rc0+r+h+uC0pMAPJi7j91qq0Oijywb/xDu72AeXzqvAG76WTXrz0UheMoQcdf+ns7QtQFp2ECLZn7cRy3vNWCc7lQWA== 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)(136003)(346002)(39860400002)(366004)(396003)(376002)(122000001)(38070700005)(33656002)(86362001)(38100700002)(82960400001)(478600001)(8936002)(52536014)(966005)(5660300002)(316002)(54906003)(110136005)(41300700001)(71200400001)(4326008)(8676002)(66446008)(66476007)(66556008)(66946007)(64756008)(76116006)(186003)(55016003)(83380400001)(53546011)(6506007)(2906002)(7696005)(9686003)(26005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PrKr4aj66Mom2NBaGueTzhSzBmHa5R5MPM6JKSMjHy77EaEWW4ifDJbrw1K8?= =?us-ascii?Q?LCo1UVnv3/yFlaA9ziSkVdrE+OmC+06eh9VYTLyi4JuPn5XHSfnLCW6urmEC?= =?us-ascii?Q?pPuE5mewbmj78mGvBrbyQaKJ4EKWZP8Xn6tI86QtxgHUWRYq8yq/0krpZ18M?= =?us-ascii?Q?3MMKdbouA6/yLo/S95y7/hfHQs0vwjMkjvJrK+HHZnU625bEFoMaMXqlOQ8e?= =?us-ascii?Q?+rnvr1UGjijdkfk8h/BZ8SD2sqBaAZptDwS1gMV7C0FtsKMgtgNoICJehPme?= =?us-ascii?Q?+YKRfeY41xGc/reGaH8HP5SmQu2mF+Ek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yXoIpgKFFTD32+808jMmvC7t0D/n+7XMlKo+3VQ6soHV+K+7f/Dy28?= =?us-ascii?Q?hcjmOUBXYkXjjatIRVslOGpMJP6d6rpwKTT83vDv2JaZaxEcPW5S8uG/2fiF?= =?us-ascii?Q?+FzY3TE0gh96Jj6Agp9/ONtsh7SoiF2aF8l6OUKyhVDHkVFhfgA40rdyNm/i?= =?us-ascii?Q?n/9DHn0JwRRpRqe7EtHTNZK6BYtbbMt1uEsADYb2m6RLb2l6gbnuSj6unLkS?= =?us-ascii?Q?5UbiepMCComiJBzqB+PSc0GkXgNTH74LDQfmQwv5zIOb5mNg7vE6WKfmVBWF?= =?us-ascii?Q?gvGichYW47C+EYsRJOWvvPh24RYX35iBWmll1r3icy+xZkMX1zGAoCx1kA1w?= =?us-ascii?Q?g2KGftgP5vgnQk+qzHc3f9+9Wgc8cvh/DTuv7K+c?= 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: 9864fe4f-2e16-42b3-a9f7-08da6aba3345 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2022 01:41:58.2698 (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: ulQm+P8lfJtYpYddrDRAKXAwVkFTh+DGrYAh3lBVOfBNPo5yEGMSpkUzuqWidmClCT+UUUD7R5bliG73O/iqTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5326 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 Reviewed-by: Dandan Bi Thanks, Dandan -----Original Message----- From: Lai, Cosmo =20 Sent: Tuesday, July 19, 2022 1:59 PM To: devel@edk2.groups.io Cc: Lai, Cosmo ; Wang, Jian J ;= Gao, Liming ; Bi, Dandan Subject: [PATCH v5] 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. This change sets EFI_STATUS_CODE_DATA_MAX_SIZE to 0x200, and moves MAX_EXTE= NDED_DATA_SIZE definition to the same header file with value of EFI_STATUS_= CODE_DATA_MAX_SIZE + sizeof (EFI_STATUS_CODE_DATA) which is used in ReportS= tatusCodeLib 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 | 10 ++++++= +++- .../Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c | 6 ------ .../Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c | 5 ----- .../RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c | 5 ----- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h b/MdeModul= ePkg/Include/Guid/StatusCodeDataTypeDebug.h index 16203452e4..6f2688064b 100644 --- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h +++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h @@ -10,6 +10,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef _ST= ATUS_CODE_DATA_TYPE_DEBUG_H_ #define _STATUS_CODE_DATA_TYPE_DEBUG_H_ =20 +#include + /// /// The Global ID used to identify a structure of type EFI_DEBUG_INFO. /// @@ -21,7 +23,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// T= he maximum size of an EFI_DEBUG_INFO structure. /// -#define EFI_STATUS_CODE_DATA_MAX_SIZE 200 +#define EFI_STATUS_CODE_DATA_MAX_SIZE 0x200 + +/// +/// Define the maximum extended data size that is supported when a ///=20 +status code is reported. +/// +#define MAX_EXTENDED_DATA_SIZE (EFI_STATUS_CODE_DATA_MAX_SIZE +=20 +sizeof(EFI_STATUS_CODE_DATA)) =20 /// /// This structure contains the ErrorLevel passed into the DEBUG() macro, = followed diff --git a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportSta= tusCodeLib.c b/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCode= Lib.c index ed01d8aacb..da254b755f 100644 --- a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c +++ b/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c @@ -19,12 +19,6 @@ #include #include =20 -// -// Define the maximum extended data size that is supported when a status c= ode is -// reported at TPL_HIGH_LEVEL. -// -#define MAX_EXTENDED_DATA_SIZE 0x200 - EFI_STATUS_CODE_PROTOCOL *mReportStatusCodeLibStatusCodeProtocol =3D NULL= ; =20 /** diff --git a/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLi= b.c b/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c index b0a5f61cda..71da0e94fc 100644 --- a/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c +++ b/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c @@ -17,11 +17,6 @@ #include #include =20 -// -// Define the maximum extended data size that is supported in the PEI phas= e -// -#define MAX_EXTENDED_DATA_SIZE 0x200 - /** Internal worker function that reports a status code through the PEI Stat= us Code Service or OEM Hook Status Code Library. diff --git a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatu= sCodeLib.c b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatu= sCodeLib.c index fdda288d33..8fd20ff239 100644 --- a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLi= b.c +++ b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCod +++ eLib.c @@ -21,11 +21,6 @@ #include #include =20 -// -// Define the maximum extended data size that is supported when a status c= ode is reported. -// -#define MAX_EXTENDED_DATA_SIZE 0x200 - EFI_STATUS_CODE_PROTOCOL *mReportStatusCodeLibStatusCodeProtocol =3D NULL= ; EFI_EVENT mReportStatusCodeLibVirtualAddressChangeEvent; EFI_EVENT mReportStatusCodeLibExitBootServicesEvent; -- 2.16.2.windows.1