From 6964b5c48c69e4961bad2dd9d6c02918f23c3be0 Mon Sep 17 00:00:00 2001 From: Cosmo Lai Date: Tue, 19 Jul 2022 13:58:32 +0800 Subject: MdeModulePkg/Include: Long debug string is truncated to 104 char 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. 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: Liming Gao Reviewed-by: Dandan Bi --- MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'MdeModulePkg/Include') 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_ +#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)) /// /// This structure contains the ErrorLevel passed into the DEBUG() macro, followed -- cgit