From nobody Sat May 18 10:08:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+91520+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91520+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1658210329; cv=none; d=zohomail.com; s=zohoarc; b=RDEsbKLHP1AD9jY9dpNJ6fayQ4h7bzoB85TW0OGF3cs3jbfXliceGJ8zO4jSGSjoO9KBx1Gtajg94D4o+CAw3O5ISZb+3tnyojEFwiUsBuieDHx1A+AbqlptppbuYVpIzJ28OauEklPjh4QcJfwVT4mH+cPohKqaaz06gJT+bbM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658210329; h=Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=7CbYzgZXwPNvvcH3DYTYZjrmGf4Kl6PoR276p7/vOKI=; b=cOsg8o8ShjPRgA8bXM6kShRklFXZjfw1pJ0FNdVgtRqsAX9yO3mCh5GslMGz2jrzmi5NrUWoqXXCz0/ssaCmVauqX5hLvucFWIFqU/Zw+NDRE/+8bPouTUIyl+Mp360kOk0LkVc5q6lSyVsRw34N96QZU1FA8j8b0SWy1qwF3Ko= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91520+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1658210329044231.34153160329367; Mon, 18 Jul 2022 22:58:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id a3V7YY1788612x8MvH4pkpxJ; Mon, 18 Jul 2022 22:58:48 -0700 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web12.37478.1658210327581703622 for ; Mon, 18 Jul 2022 22:58:47 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10412"; a="287145549" X-IronPort-AV: E=Sophos;i="5.92,283,1650956400"; d="scan'208";a="287145549" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 22:58:47 -0700 X-IronPort-AV: E=Sophos;i="5.92,283,1650956400"; d="scan'208";a="655603901" X-Received: from cosmolai-mobl1.gar.corp.intel.com ([10.252.134.41]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 22:58:43 -0700 From: "Cosmo Lai" To: devel@edk2.groups.io Cc: Cosmo Lai , Jian J Wang , Liming Gao , Dandan Bi Subject: [edk2-devel] [PATCH v5] MdeModulePkg/Include: Long debug string is truncated to 104 char Date: Tue, 19 Jul 2022 13:58:32 +0800 Message-Id: <98b4283b3ccad4a64b141ae7832f0698dd777877.1658210289.git.cosmo.lai@intel.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,cosmo.lai@intel.com X-Gm-Message-State: lfRB7GXYw65lK5srdLVynubBx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1658210328; bh=OSd5myvB66an9I+98rnH9mQRlNLKat0xkkiM3jho0KQ=; h=Cc:Date:From:Reply-To:Subject:To; b=tkSF4pJpRAM6ZmnfgWMOmhCVDi4nUXnKrU8u5ckC9+siLQTGu3gp6J4YrTR4PxwPTXL 3uYiMYouwGcg415lZ2gc3dD6tduUUHJugfSXZrNWOCYz2yeVR8V/jhG7Nl+2p/ozd+JDT CDKKgESeY+DqvRLoC5o0KFyu9ERZKX7mdrA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1658210331044100001 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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_EXTENDED_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 ReportStatusCodeLib to support longer debug string. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Cosmo Lai Reviewed-by: Dandan Bi Reviewed-by: Liming Gao --- 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 _STATUS_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 /// /// The 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 +/// status code is reported. +/// +#define MAX_EXTENDED_DATA_SIZE (EFI_STATUS_CODE_DATA_MAX_SIZE + sizeof(EF= I_STATUS_CODE_DATA)) =20 /// /// This structure contains the ErrorLevel passed into the DEBUG() macro, = followed diff --git a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLi= b.c b/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.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 phase -// -#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/ReportStatusCodeLi= b.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; --=20 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#91520): https://edk2.groups.io/g/devel/message/91520 Mute This Topic: https://groups.io/mt/92477444/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-