[edk2-devel] [PATCH v2] MdeModulePkg/Include: Long debug string is truncated to 104 char

Cosmo Lai posted 1 patch 1 year, 9 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[edk2-devel] [PATCH v2] MdeModulePkg/Include: Long debug string is truncated to 104 char
Posted by Cosmo Lai 1 year, 9 months ago
From: Cosmo Lai <cosmo.lai@intel.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3986

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.

Signed-off-by: Cosmo Lai <cosmo.lai@intel.com>
---
 MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
 
 ///
 /// This structure contains the ErrorLevel passed into the DEBUG() macro, followed
-- 
2.16.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91415): https://edk2.groups.io/g/devel/message/91415
Mute This Topic: https://groups.io/mt/92401812/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2] MdeModulePkg/Include: Long debug string is truncated to 104 char
Posted by Wang, Jian J 1 year, 9 months ago
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>

Regards,
Jian

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Cosmo Lai
> Sent: Wednesday, July 13, 2022 3:26 PM
> To: devel@edk2.groups.io
> Cc: Lai, Cosmo <cosmo.lai@intel.com>
> Subject: [edk2-devel] [PATCH v2] MdeModulePkg/Include: Long debug string is
> truncated to 104 char
> 
> From: Cosmo Lai <cosmo.lai@intel.com>
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3986
> 
> 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.
> 
> Signed-off-by: Cosmo Lai <cosmo.lai@intel.com>
> ---
>  MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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
> 
>  ///
>  /// This structure contains the ErrorLevel passed into the DEBUG() macro,
> followed
> --
> 2.16.2.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91436): https://edk2.groups.io/g/devel/message/91436
Mute This Topic: https://groups.io/mt/92401812/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-