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

2022-07-15 Thread Cosmo Lai
From: Cosmo Lai 

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.

Cc: Jian J Wang 
Cc: Liming Gao 
Cc: Dandan Bi 

Signed-off-by: Cosmo Lai 
---
 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 (#91416): https://edk2.groups.io/g/devel/message/91416
Mute This Topic: https://groups.io/mt/92401813/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH] Debug msg is limited to 104 char due to EFI_STATUS_CODE_DATA_MAX_SIZE set to 200

2022-07-15 Thread Cosmo Lai
From: Cosmo Lai 

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 
---
 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 (#91414): https://edk2.groups.io/g/devel/message/91414
Mute This Topic: https://groups.io/mt/92401810/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2022-07-15 Thread Cosmo Lai
From: Cosmo Lai 

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 
---
 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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2022-07-18 Thread Cosmo Lai
From: Cosmo Lai 

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 - sizeof (EFI_STATUS_CODE_DATA) to follow
MAX_EXTENDED_DATA_SIZE (also 0x200) 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 
---
 MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h 
b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
index 16203452e4..a5c09a5729 100644
--- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
+++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
@@ -20,8 +20,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 ///
 /// The maximum size of an EFI_DEBUG_INFO structure.
+/// Set to 0x200 - sizeof (EFI_STATUS_CODE_DATA)
 ///
-#define EFI_STATUS_CODE_DATA_MAX_SIZE  200
+#define EFI_STATUS_CODE_DATA_MAX_SIZE  492
 
 ///
 /// 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 (#91468): https://edk2.groups.io/g/devel/message/91468
Mute This Topic: https://groups.io/mt/92461758/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2022-07-18 Thread Cosmo Lai
From: Cosmo Lai 

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 
---
 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(-)

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
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 
 
-//
-// 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 = NULL;
 
 /**
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 
 
-//
-// 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/ReportStatusCodeLib.c 
b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c
index fdda288d33..8fd20ff239 100644
--- a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c
@@ -21,11 +21,6 @@
 #include 
 #include 
 
-//
-// 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 = NULL;
 EFI_EVENT mReportStatusCodeLibVirtualAddressChangeEvent;
 EFI_EVENT mReportStatusCodeLibExitBootServicesEvent;
-- 
2.16.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91520): https://edk2.groups.io/g/devel/message/91520
Mute This Topic: https://groups.io/mt/92477444/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-