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.web08.35957.1658195908566433306 for ; Mon, 18 Jul 2022 18:58:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=DEWK5TEJ; 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 BC92ECD1F778 for ; Tue, 19 Jul 2022 09:58:25 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1658195905; bh=itnPXyhr1cKLNJUZiziZ2xjBhX5CDjCMv2YtKRChv08=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=DEWK5TEJy6C+ByTy3gL9yYMrfqYoD0XoLWLEqzQjQVAtFVauIvYhSgDWiqaZcTAh9 OYMTYDq+IzbxLNiJhK7yes6HvnjCdVwgGJs8Y7NrPn+gptpVTXB+ADHfli/i7/ZSiP KUGxqZyoFhA1BmivcoGJO3cJCoYIipmHsnlzLYD4= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id B82FBCD1F776 for ; Tue, 19 Jul 2022 09:58:25 +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 7AD88CD1F74C for ; Tue, 19 Jul 2022 09:58:25 +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 11203CD1F779 for ; Tue, 19 Jul 2022 09:58:22 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 19 Jul 2022 09:58:19 +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: <83e97457873d93c8b1eab91b513aae2e444e08ca.1657849347.git.cosmo.lai@intel.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbUEFUQ0ggdjNdIE1kZU1vZHVsZVBrZy9JbmNsdWRlOiBMb25nIGRlYnVnIHN0cmluZyBpcyB0cnVuY2F0ZWQgdG8gMTA0IGNoYXI=?= Date: Tue, 19 Jul 2022 09:58:23 +0800 Message-ID: <001501d89b13$0733f880$159be980$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHeaxn77YMJWerZjGBPpu04en+ZKwD72yeZrXFt39A= Sender: "gaoliming" Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Dandan: Good point. I suggest to also define EFI_STATUS_CODE_DATA_MAX_SIZE = into the MdeModulePkg\Include\Guid\StatusCodeDataTypeDebug.h. Its value can = be MAX_EXTENDED_DATA_SIZE + sizeof (EFI_STATUS_CODE_DATA) Thanks Liming > -----=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=C218=C8=D5 16:38 > =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 v3] MdeModulePkg/Include: Long debug string = is truncated > to 104 char >=20 > Hi Cosmo, >=20 > Could you set the value of macro EFI_STATUS_CODE_DATA_MAX_SIZE less > than the value of MAX_EXTENDED_DATA_SIZE (also 0x200)- sizeof > (EFI_STATUS_CODE_DATA)? >=20 > For example, the implementation of ReportStatusCodeEx in > MdeModulePkg/Library/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? >=20 > if (ExtendedDataSize > (MAX_EXTENDED_DATA_SIZE - sizeof > (EFI_STATUS_CODE_DATA))) { > // > // The local variable Buffer not large enough to hold the extended = data > associated > // with the status code being reported. > // > DEBUG ((DEBUG_ERROR, "Status code extended data is too large to be > reported!\n")); > return EFI_OUT_OF_RESOURCES; > } >=20 > Thanks, > Dandan >=20 > -----Original Message----- > From: Lai, Cosmo > 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 >=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. > It can be set to 0x200 to follow MAX_EXTENDED_DATA_SIZE (also 0x200) > 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 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h > b/MdeModulePkg/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 /// > /// 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 >=20 > /// > /// This structure contains the ErrorLevel passed into the DEBUG() = macro, > followed > -- > 2.16.2.windows.1