From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web10.1897.1658372798237743596 for ; Wed, 20 Jul 2022 20:06:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=R2QwFEY6; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 4B686CD1F805 for ; Thu, 21 Jul 2022 11:06:35 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1658372795; bh=NvWb1rTDsQd6BTwLJBPZJ49+yZGkUeXXlDq6RYefcRE=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=R2QwFEY66qOumCs+biSla8P9xOPnLO+RasGGXx5YbZ//2/ePW8SVaWoQF2BvPhqy2 N+nm56yXuPvWK97YRJLmMGfTQeOwfJQrh5GMlrMjBNDUWk3wP3BM0M9mI/KgOWiJFS huRDa+rEc8n0apJM4OoB7eECFfE9s29u68YaTyqc= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 475BFCD1F808 for ; Thu, 21 Jul 2022 11:06:35 +0800 (CST) X-Virus-Scanned: by SpamTitan at intel-email.com Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 0AF87CD1F7F8 for ; Thu, 21 Jul 2022 11:06:35 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 921FECD1F6D6 for ; Thu, 21 Jul 2022 11:06:31 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 21 Jul 2022 11:06:27 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Bi, Dandan'" , "'Lai, Cosmo'" , Cc: "'Wang, Jian J'" References: <98b4283b3ccad4a64b141ae7832f0698dd777877.1658210289.git.cosmo.lai@intel.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbUEFUQ0ggdjVdIE1kZU1vZHVsZVBrZy9JbmNsdWRlOiBMb25nIGRlYnVnIHN0cmluZyBpcyB0cnVuY2F0ZWQgdG8gMTA0IGNoYXI=?= Date: Thu, 21 Jul 2022 11:06:31 +0800 Message-ID: <027601d89cae$e08ab960$a1a02c20$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIEhWyLgfPhWCqVbkjy4GJ+rH/mlQHYy20xrSGMenA= Sender: "gaoliming" Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Bi, Dandan > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA7=D4=C221=C8=D5 9:42 > =CA=D5=BC=FE=C8=CB: Lai, Cosmo ; = devel@edk2.groups.io > =B3=AD=CB=CD: Wang, Jian J ; Gao, Liming > > =D6=F7=CC=E2: RE: [PATCH v5] MdeModulePkg/Include: Long debug string = is truncated > to 104 char >=20 > Reviewed-by: Dandan Bi >=20 >=20 >=20 > Thanks, > Dandan > -----Original Message----- > From: Lai, Cosmo > 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 >=20 > From: Cosmo Lai >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3986 >=20 > 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. >=20 > Cc: Jian J Wang > Cc: Liming Gao > Cc: Dandan Bi >=20 > 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(-) >=20 > diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h > b/MdeModulePkg/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(EFI_STATUS_CODE_DATA)) >=20 > /// > /// This structure contains the ErrorLevel passed into the DEBUG() = macro, > followed diff --git > a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.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 > code 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/ReportStatusCodeLib.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 Status > Code Service or > OEM Hook Status Code Library. > diff --git > a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCod > eLib.c > b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCod > eLib.c > index fdda288d33..8fd20ff239 100644 > --- > a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCod > eLib.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 > code 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