]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Include: Long debug string is truncated to 104 char
authorCosmo Lai <cosmo.lai@intel.com>
Tue, 19 Jul 2022 05:58:32 +0000 (13:58 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 23 Jul 2022 03:12:49 +0000 (03:12 +0000)
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 <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Cosmo Lai <cosmo.lai@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c
MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c

index 16203452e4ff3a5e5c7593a9c3fa58e16fbeeb29..6f2688064b12e8c745525a96c52e41c37901c9f4 100644 (file)
@@ -10,6 +10,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #ifndef _STATUS_CODE_DATA_TYPE_DEBUG_H_\r
 #define _STATUS_CODE_DATA_TYPE_DEBUG_H_\r
 \r
+#include <Pi/PiStatusCode.h>\r
+\r
 ///\r
 /// The Global ID used to identify a structure of type EFI_DEBUG_INFO.\r
 ///\r
@@ -21,7 +23,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 ///\r
 /// The maximum size of an EFI_DEBUG_INFO structure.\r
 ///\r
-#define EFI_STATUS_CODE_DATA_MAX_SIZE  200\r
+#define EFI_STATUS_CODE_DATA_MAX_SIZE  0x200\r
+\r
+///\r
+/// Define the maximum extended data size that is supported when a\r
+/// status code is reported.\r
+///\r
+#define MAX_EXTENDED_DATA_SIZE  (EFI_STATUS_CODE_DATA_MAX_SIZE + sizeof(EFI_STATUS_CODE_DATA))\r
 \r
 ///\r
 /// This structure contains the ErrorLevel passed into the DEBUG() macro, followed\r
index ed01d8aacb0408886a880880f5b45c088004f213..da254b755fa62975538c986270ca265ab5060f1d 100644 (file)
 #include <Guid/StatusCodeDataTypeId.h>\r
 #include <Guid/StatusCodeDataTypeDebug.h>\r
 \r
-//\r
-// Define the maximum extended data size that is supported when a status code is\r
-// reported at TPL_HIGH_LEVEL.\r
-//\r
-#define MAX_EXTENDED_DATA_SIZE  0x200\r
-\r
 EFI_STATUS_CODE_PROTOCOL  *mReportStatusCodeLibStatusCodeProtocol = NULL;\r
 \r
 /**\r
index b0a5f61cdab28c078b5ddaa971b4fc3b2247aed3..71da0e94fc7370e32cd4d72845473a21fa4d9fa2 100644 (file)
 #include <Library/OemHookStatusCodeLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
-//\r
-// Define the maximum extended data size that is supported in the PEI phase\r
-//\r
-#define MAX_EXTENDED_DATA_SIZE  0x200\r
-\r
 /**\r
   Internal worker function that reports a status code through the PEI Status Code Service or\r
   OEM Hook Status Code Library.\r
index fdda288d3340559c616ce9e56353f62f81e84931..8fd20ff239f2ff30cc7223bba38eb519da488844 100644 (file)
 #include <Guid/StatusCodeDataTypeDebug.h>\r
 #include <Guid/EventGroup.h>\r
 \r
-//\r
-// Define the maximum extended data size that is supported when a status code is reported.\r
-//\r
-#define MAX_EXTENDED_DATA_SIZE  0x200\r
-\r
 EFI_STATUS_CODE_PROTOCOL  *mReportStatusCodeLibStatusCodeProtocol = NULL;\r
 EFI_EVENT                 mReportStatusCodeLibVirtualAddressChangeEvent;\r
 EFI_EVENT                 mReportStatusCodeLibExitBootServicesEvent;\r