public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test
@ 2021-03-30 15:08 Heinrich Schuchardt
  2021-04-05 14:46 ` G Edhaya Chandran
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Heinrich Schuchardt @ 2021-03-30 15:08 UTC (permalink / raw)
  To: EDK II Development
  Cc: Eric Jin, G Edhaya Chandran, Barton Gao, Arvin Chen,
	Samer El-Haj-Mahmoud, Heinrich Schuchardt, G Edhaya Chandran

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

SctPrint() requires that %d refers to an UINTN parameter.

SimpleTextOutBBTestFunction_uefi.c has a lot of
StandardLib->RecordAssertion() calls where an INT32 is passed
as argument for a '%d' print code.

This leads to incorrect output like:

MaxMode=-549755813885,

-549755813885 is 0x0xFFFFFF8000000003. So MaxMode actually
is an INT32 with value 3 in this example.

Convert the parameters to UINTN.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
---
 .../SimpleTextOutBBTestFunction_uefi.c        | 624 +++++++++---------
 1 file changed, 312 insertions(+), 312 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c
index 2bc9bcdb51f9..a833498c2816 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c
@@ -176,12 +176,12 @@ BBTestResetFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->MaxMode,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.MaxMode
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.MaxMode
                  );

   //
@@ -272,12 +272,12 @@ BBTestResetFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->MaxMode,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.MaxMode
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.MaxMode
                  );

   //
@@ -505,12 +505,12 @@ BBTestResetFunctionAutoTest (
                    L"Expected:Cursor Position(%d x %d), MaxMode=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->MaxMode,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.MaxMode
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.MaxMode
                    );

     //
@@ -582,12 +582,12 @@ BBTestResetFunctionAutoTest (
                    L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->MaxMode,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.MaxMode
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.MaxMode
                    );

     //
@@ -850,18 +850,18 @@ BBTestOutputStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -987,18 +987,18 @@ BBTestOutputStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1094,18 +1094,18 @@ BBTestOutputStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1217,18 +1217,18 @@ BBTestOutputStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1469,18 +1469,18 @@ BBTestOutputStringFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1626,18 +1626,18 @@ BBTestOutputStringFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1754,18 +1754,18 @@ BBTestOutputStringFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1897,18 +1897,18 @@ BBTestOutputStringFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -2240,18 +2240,18 @@ BBTestTestStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -2433,18 +2433,18 @@ BBTestQueryModeFunctionAutoTest (
                    __FILE__,
                    (UINTN)__LINE__,
                    Index,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     if ( EFI_UNSUPPORTED == Status && 1 == Index ) {
@@ -2720,18 +2720,18 @@ BBTestSetModeFunctionManualTest (
                    __FILE__,
                    (UINTN)__LINE__,
                    Index,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -2968,18 +2968,18 @@ BBTestSetModeFunctionAutoTest (
                    __FILE__,
                    (UINTN)__LINE__,
                    Index,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -3193,18 +3193,18 @@ BBTestSetAttributeFunctionManualTest (
                        L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                        __FILE__,
                        (UINTN)__LINE__,
-                       SimpleOut->Mode->CursorColumn,
-                       SimpleOut->Mode->CursorRow,
-                       SimpleOut->Mode->Mode,
-                       SimpleOut->Mode->MaxMode,
-                       SimpleOut->Mode->Attribute,
-                       SimpleOut->Mode->CursorVisible,
-                       ModeExpected.CursorColumn,
-                       ModeExpected.CursorRow,
-                       ModeExpected.Mode,
-                       ModeExpected.MaxMode,
-                       ModeExpected.Attribute,
-                       ModeExpected.CursorVisible
+                       (UINTN)SimpleOut->Mode->CursorColumn,
+                       (UINTN)SimpleOut->Mode->CursorRow,
+                       (UINTN)SimpleOut->Mode->Mode,
+                       (UINTN)SimpleOut->Mode->MaxMode,
+                       (UINTN)SimpleOut->Mode->Attribute,
+                       (UINTN)SimpleOut->Mode->CursorVisible,
+                       (UINTN)ModeExpected.CursorColumn,
+                       (UINTN)ModeExpected.CursorRow,
+                       (UINTN)ModeExpected.Mode,
+                       (UINTN)ModeExpected.MaxMode,
+                       (UINTN)ModeExpected.Attribute,
+                       (UINTN)ModeExpected.CursorVisible
                        );
         Result = FALSE;
       }
@@ -3451,18 +3451,18 @@ BBTestSetAttributeFunctionAutoTest (
                          L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                          __FILE__,
                          (UINTN)__LINE__,
-                         SimpleOut->Mode->CursorColumn,
-                         SimpleOut->Mode->CursorRow,
-                         SimpleOut->Mode->Mode,
-                         SimpleOut->Mode->MaxMode,
-                         SimpleOut->Mode->Attribute,
-                         SimpleOut->Mode->CursorVisible,
-                         ModeExpected.CursorColumn,
-                         ModeExpected.CursorRow,
-                         ModeExpected.Mode,
-                         ModeExpected.MaxMode,
-                         ModeExpected.Attribute,
-                         ModeExpected.CursorVisible
+                         (UINTN)SimpleOut->Mode->CursorColumn,
+                         (UINTN)SimpleOut->Mode->CursorRow,
+                         (UINTN)SimpleOut->Mode->Mode,
+                         (UINTN)SimpleOut->Mode->MaxMode,
+                         (UINTN)SimpleOut->Mode->Attribute,
+                         (UINTN)SimpleOut->Mode->CursorVisible,
+                         (UINTN)ModeExpected.CursorColumn,
+                         (UINTN)ModeExpected.CursorRow,
+                         (UINTN)ModeExpected.Mode,
+                         (UINTN)ModeExpected.MaxMode,
+                         (UINTN)ModeExpected.Attribute,
+                         (UINTN)ModeExpected.CursorVisible
                          );
 		  Result = FALSE;
         }
@@ -3653,18 +3653,18 @@ BBTestClearScreenFunctionManualTest (
                  L" Expected: Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -3896,18 +3896,18 @@ BBTestClearScreenFunctionAutoTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -4143,18 +4143,18 @@ BBTestSetCursorPositionFunctionManualTest (
                        L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                        __FILE__,
                        (UINTN)__LINE__,
-                       SimpleOut->Mode->CursorColumn,
-                       SimpleOut->Mode->CursorRow,
-                       SimpleOut->Mode->Mode,
-                       SimpleOut->Mode->MaxMode,
-                       SimpleOut->Mode->Attribute,
-                       SimpleOut->Mode->CursorVisible,
-                       ModeExpected.CursorColumn,
-                       ModeExpected.CursorRow,
-                       ModeExpected.Mode,
-                       ModeExpected.MaxMode,
-                       ModeExpected.Attribute,
-                       ModeExpected.CursorVisible
+                       (UINTN)SimpleOut->Mode->CursorColumn,
+                       (UINTN)SimpleOut->Mode->CursorRow,
+                       (UINTN)SimpleOut->Mode->Mode,
+                       (UINTN)SimpleOut->Mode->MaxMode,
+                       (UINTN)SimpleOut->Mode->Attribute,
+                       (UINTN)SimpleOut->Mode->CursorVisible,
+                       (UINTN)ModeExpected.CursorColumn,
+                       (UINTN)ModeExpected.CursorRow,
+                       (UINTN)ModeExpected.Mode,
+                       (UINTN)ModeExpected.MaxMode,
+                       (UINTN)ModeExpected.Attribute,
+                       (UINTN)ModeExpected.CursorVisible
                        );
         Result = FALSE;
       }
@@ -4434,18 +4434,18 @@ BBTestSetCursorPositionFunctionAutoTest (
                          L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                          __FILE__,
                          (UINTN)__LINE__,
-                         SimpleOut->Mode->CursorColumn,
-                         SimpleOut->Mode->CursorRow,
-                         SimpleOut->Mode->Mode,
-                         SimpleOut->Mode->MaxMode,
-                         SimpleOut->Mode->Attribute,
-                         SimpleOut->Mode->CursorVisible,
-                         ModeExpected.CursorColumn,
-                         ModeExpected.CursorRow,
-                         ModeExpected.Mode,
-                         ModeExpected.MaxMode,
-                         ModeExpected.Attribute,
-                         ModeExpected.CursorVisible
+                         (UINTN)SimpleOut->Mode->CursorColumn,
+                         (UINTN)SimpleOut->Mode->CursorRow,
+                         (UINTN)SimpleOut->Mode->Mode,
+                         (UINTN)SimpleOut->Mode->MaxMode,
+                         (UINTN)SimpleOut->Mode->Attribute,
+                         (UINTN)SimpleOut->Mode->CursorVisible,
+                         (UINTN)ModeExpected.CursorColumn,
+                         (UINTN)ModeExpected.CursorRow,
+                         (UINTN)ModeExpected.Mode,
+                         (UINTN)ModeExpected.MaxMode,
+                         (UINTN)ModeExpected.Attribute,
+                         (UINTN)ModeExpected.CursorVisible
                          );
 		  Result = FALSE;
         }
@@ -4669,18 +4669,18 @@ BBTestEnableCursorFunctionManualTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -4739,18 +4739,18 @@ BBTestEnableCursorFunctionManualTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );
   } else {
     //
@@ -4803,18 +4803,18 @@ BBTestEnableCursorFunctionManualTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -4888,18 +4888,18 @@ BBTestEnableCursorFunctionManualTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );
   } else {
     //
@@ -5128,18 +5128,18 @@ BBTestEnableCursorFunctionAutoTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -5212,18 +5212,18 @@ BBTestEnableCursorFunctionAutoTest (
                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );


--
2.30.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test
  2021-03-30 15:08 [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test Heinrich Schuchardt
@ 2021-04-05 14:46 ` G Edhaya Chandran
  2021-05-09 17:10 ` Samer El-Haj-Mahmoud
  2021-05-10  9:24 ` [edk2-devel] " Sunny Wang
  2 siblings, 0 replies; 8+ messages in thread
From: G Edhaya Chandran @ 2021-04-05 14:46 UTC (permalink / raw)
  To: Heinrich Schuchardt, EDK II Development
  Cc: Eric Jin, Barton Gao, Arvin Chen, Samer El-Haj-Mahmoud

Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>

> -----Original Message-----
> From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Sent: 30 March 2021 20:39
> To: EDK II Development <devel@edk2.groups.io>
> Cc: Eric Jin <eric.jin@intel.com>; G Edhaya Chandran
> <Edhaya.Chandran@arm.com>; Barton Gao <gaojie@byosoft.com.cn>; Arvin
> Chen <arvinx.chen@intel.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; Heinrich Schuchardt <xypron.glpk@gmx.de>; G Edhaya
> Chandran <Edhaya.Chandran@arm.com>
> Subject: [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in
> SimpleTextOut test
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3253
>
> SctPrint() requires that %d refers to an UINTN parameter.
>
> SimpleTextOutBBTestFunction_uefi.c has a lot of
> StandardLib->RecordAssertion() calls where an INT32 is passed
> as argument for a '%d' print code.
>
> This leads to incorrect output like:
>
> MaxMode=-549755813885,
>
> -549755813885 is 0x0xFFFFFF8000000003. So MaxMode actually is an INT32
> with value 3 in this example.
>
> Convert the parameters to UINTN.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
> ---
>  .../SimpleTextOutBBTestFunction_uefi.c        | 624 +++++++++---------
>  1 file changed, 312 insertions(+), 312 deletions(-)
>
> diff --git a/uefi-
> sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTe
> xtOutBBTestFunction_uefi.c b/uefi-
> sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTe
> xtOutBBTestFunction_uefi.c
> index 2bc9bcdb51f9..a833498c2816 100644
> --- a/uefi-
> sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTe
> xtOutBBTestFunction_uefi.c
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxT
> +++ est/SimpleTextOutBBTestFunction_uefi.c
> @@ -176,12 +176,12 @@ BBTestResetFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->MaxMode,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.MaxMode
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.MaxMode
>                   );
>
>    //
> @@ -272,12 +272,12 @@ BBTestResetFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->MaxMode,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.MaxMode
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.MaxMode
>                   );
>
>    //
> @@ -505,12 +505,12 @@ BBTestResetFunctionAutoTest (
>                     L"Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->MaxMode,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.MaxMode
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.MaxMode
>                     );
>
>      //
> @@ -582,12 +582,12 @@ BBTestResetFunctionAutoTest (
>                     L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->MaxMode,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.MaxMode
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.MaxMode
>                     );
>
>      //
> @@ -850,18 +850,18 @@ BBTestOutputStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -987,18 +987,18 @@ BBTestOutputStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1094,18 +1094,18 @@ BBTestOutputStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1217,18 +1217,18 @@ BBTestOutputStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1469,18 +1469,18 @@ BBTestOutputStringFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1626,18 +1626,18 @@ BBTestOutputStringFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1754,18 +1754,18 @@ BBTestOutputStringFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1897,18 +1897,18 @@ BBTestOutputStringFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -2240,18 +2240,18 @@ BBTestTestStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -2433,18 +2433,18 @@ BBTestQueryModeFunctionAutoTest (
>                     __FILE__,
>                     (UINTN)__LINE__,
>                     Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      if ( EFI_UNSUPPORTED == Status && 1 == Index ) { @@ -2720,18 +2720,18
> @@ BBTestSetModeFunctionManualTest (
>                     __FILE__,
>                     (UINTN)__LINE__,
>                     Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -2968,18 +2968,18 @@ BBTestSetModeFunctionAutoTest (
>                     __FILE__,
>                     (UINTN)__LINE__,
>                     Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -3193,18 +3193,18 @@ BBTestSetAttributeFunctionManualTest (
>                         L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                         __FILE__,
>                         (UINTN)__LINE__,
> -                       SimpleOut->Mode->CursorColumn,
> -                       SimpleOut->Mode->CursorRow,
> -                       SimpleOut->Mode->Mode,
> -                       SimpleOut->Mode->MaxMode,
> -                       SimpleOut->Mode->Attribute,
> -                       SimpleOut->Mode->CursorVisible,
> -                       ModeExpected.CursorColumn,
> -                       ModeExpected.CursorRow,
> -                       ModeExpected.Mode,
> -                       ModeExpected.MaxMode,
> -                       ModeExpected.Attribute,
> -                       ModeExpected.CursorVisible
> +                       (UINTN)SimpleOut->Mode->CursorColumn,
> +                       (UINTN)SimpleOut->Mode->CursorRow,
> +                       (UINTN)SimpleOut->Mode->Mode,
> +                       (UINTN)SimpleOut->Mode->MaxMode,
> +                       (UINTN)SimpleOut->Mode->Attribute,
> +                       (UINTN)SimpleOut->Mode->CursorVisible,
> +                       (UINTN)ModeExpected.CursorColumn,
> +                       (UINTN)ModeExpected.CursorRow,
> +                       (UINTN)ModeExpected.Mode,
> +                       (UINTN)ModeExpected.MaxMode,
> +                       (UINTN)ModeExpected.Attribute,
> +                       (UINTN)ModeExpected.CursorVisible
>                         );
>          Result = FALSE;
>        }
> @@ -3451,18 +3451,18 @@ BBTestSetAttributeFunctionAutoTest (
>                           L" Expected:Cursor Position(%d x %d), Mode=%d,
> MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                           __FILE__,
>                           (UINTN)__LINE__,
> -                         SimpleOut->Mode->CursorColumn,
> -                         SimpleOut->Mode->CursorRow,
> -                         SimpleOut->Mode->Mode,
> -                         SimpleOut->Mode->MaxMode,
> -                         SimpleOut->Mode->Attribute,
> -                         SimpleOut->Mode->CursorVisible,
> -                         ModeExpected.CursorColumn,
> -                         ModeExpected.CursorRow,
> -                         ModeExpected.Mode,
> -                         ModeExpected.MaxMode,
> -                         ModeExpected.Attribute,
> -                         ModeExpected.CursorVisible
> +                         (UINTN)SimpleOut->Mode->CursorColumn,
> +                         (UINTN)SimpleOut->Mode->CursorRow,
> +                         (UINTN)SimpleOut->Mode->Mode,
> +                         (UINTN)SimpleOut->Mode->MaxMode,
> +                         (UINTN)SimpleOut->Mode->Attribute,
> +                         (UINTN)SimpleOut->Mode->CursorVisible,
> +                         (UINTN)ModeExpected.CursorColumn,
> +                         (UINTN)ModeExpected.CursorRow,
> +                         (UINTN)ModeExpected.Mode,
> +                         (UINTN)ModeExpected.MaxMode,
> +                         (UINTN)ModeExpected.Attribute,
> +                         (UINTN)ModeExpected.CursorVisible
>                           );
>    Result = FALSE;
>          }
> @@ -3653,18 +3653,18 @@ BBTestClearScreenFunctionManualTest (
>                   L" Expected: Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -3896,18 +3896,18 @@ BBTestClearScreenFunctionAutoTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -4143,18 +4143,18 @@ BBTestSetCursorPositionFunctionManualTest (
>                         L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                         __FILE__,
>                         (UINTN)__LINE__,
> -                       SimpleOut->Mode->CursorColumn,
> -                       SimpleOut->Mode->CursorRow,
> -                       SimpleOut->Mode->Mode,
> -                       SimpleOut->Mode->MaxMode,
> -                       SimpleOut->Mode->Attribute,
> -                       SimpleOut->Mode->CursorVisible,
> -                       ModeExpected.CursorColumn,
> -                       ModeExpected.CursorRow,
> -                       ModeExpected.Mode,
> -                       ModeExpected.MaxMode,
> -                       ModeExpected.Attribute,
> -                       ModeExpected.CursorVisible
> +                       (UINTN)SimpleOut->Mode->CursorColumn,
> +                       (UINTN)SimpleOut->Mode->CursorRow,
> +                       (UINTN)SimpleOut->Mode->Mode,
> +                       (UINTN)SimpleOut->Mode->MaxMode,
> +                       (UINTN)SimpleOut->Mode->Attribute,
> +                       (UINTN)SimpleOut->Mode->CursorVisible,
> +                       (UINTN)ModeExpected.CursorColumn,
> +                       (UINTN)ModeExpected.CursorRow,
> +                       (UINTN)ModeExpected.Mode,
> +                       (UINTN)ModeExpected.MaxMode,
> +                       (UINTN)ModeExpected.Attribute,
> +                       (UINTN)ModeExpected.CursorVisible
>                         );
>          Result = FALSE;
>        }
> @@ -4434,18 +4434,18 @@ BBTestSetCursorPositionFunctionAutoTest (
>                           L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                           __FILE__,
>                           (UINTN)__LINE__,
> -                         SimpleOut->Mode->CursorColumn,
> -                         SimpleOut->Mode->CursorRow,
> -                         SimpleOut->Mode->Mode,
> -                         SimpleOut->Mode->MaxMode,
> -                         SimpleOut->Mode->Attribute,
> -                         SimpleOut->Mode->CursorVisible,
> -                         ModeExpected.CursorColumn,
> -                         ModeExpected.CursorRow,
> -                         ModeExpected.Mode,
> -                         ModeExpected.MaxMode,
> -                         ModeExpected.Attribute,
> -                         ModeExpected.CursorVisible
> +                         (UINTN)SimpleOut->Mode->CursorColumn,
> +                         (UINTN)SimpleOut->Mode->CursorRow,
> +                         (UINTN)SimpleOut->Mode->Mode,
> +                         (UINTN)SimpleOut->Mode->MaxMode,
> +                         (UINTN)SimpleOut->Mode->Attribute,
> +                         (UINTN)SimpleOut->Mode->CursorVisible,
> +                         (UINTN)ModeExpected.CursorColumn,
> +                         (UINTN)ModeExpected.CursorRow,
> +                         (UINTN)ModeExpected.Mode,
> +                         (UINTN)ModeExpected.MaxMode,
> +                         (UINTN)ModeExpected.Attribute,
> +                         (UINTN)ModeExpected.CursorVisible
>                           );
>    Result = FALSE;
>          }
> @@ -4669,18 +4669,18 @@ BBTestEnableCursorFunctionManualTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -4739,18 +4739,18 @@ BBTestEnableCursorFunctionManualTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>    } else {
>      //
> @@ -4803,18 +4803,18 @@ BBTestEnableCursorFunctionManualTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -4888,18 +4888,18 @@ BBTestEnableCursorFunctionManualTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>    } else {
>      //
> @@ -5128,18 +5128,18 @@ BBTestEnableCursorFunctionAutoTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      AssertionType = EFI_TEST_ASSERTION_PASSED; @@ -5212,18 +5212,18 @@
> BBTestEnableCursorFunctionAutoTest (
>                     L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>
> --
> 2.30.2

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test
  2021-03-30 15:08 [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test Heinrich Schuchardt
  2021-04-05 14:46 ` G Edhaya Chandran
@ 2021-05-09 17:10 ` Samer El-Haj-Mahmoud
  2021-05-10  9:24 ` [edk2-devel] " Sunny Wang
  2 siblings, 0 replies; 8+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-09 17:10 UTC (permalink / raw)
  To: Heinrich Schuchardt, EDK II Development
  Cc: Eric Jin, G Edhaya Chandran, Barton Gao, Arvin Chen,
	G Edhaya Chandran, Samer El-Haj-Mahmoud

Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>

> -----Original Message-----
> From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Sent: Tuesday, March 30, 2021 11:09 AM
> To: EDK II Development <devel@edk2.groups.io>
> Cc: Eric Jin <eric.jin@intel.com>; G Edhaya Chandran
> <Edhaya.Chandran@arm.com>; Barton Gao <gaojie@byosoft.com.cn>; Arvin
> Chen <arvinx.chen@intel.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; Heinrich Schuchardt <xypron.glpk@gmx.de>; G
> Edhaya Chandran <Edhaya.Chandran@arm.com>
> Subject: [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in
> SimpleTextOut test
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3253
>
> SctPrint() requires that %d refers to an UINTN parameter.
>
> SimpleTextOutBBTestFunction_uefi.c has a lot of
> StandardLib->RecordAssertion() calls where an INT32 is passed
> as argument for a '%d' print code.
>
> This leads to incorrect output like:
>
> MaxMode=-549755813885,
>
> -549755813885 is 0x0xFFFFFF8000000003. So MaxMode actually is an INT32
> with value 3 in this example.
>
> Convert the parameters to UINTN.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
> ---
>  .../SimpleTextOutBBTestFunction_uefi.c        | 624 +++++++++---------
>  1 file changed, 312 insertions(+), 312 deletions(-)
>
> diff --git a/uefi-
> sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/Simpl
> eTextOutBBTestFunction_uefi.c b/uefi-
> sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/Simpl
> eTextOutBBTestFunction_uefi.c
> index 2bc9bcdb51f9..a833498c2816 100644
> --- a/uefi-
> sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/Simpl
> eTextOutBBTestFunction_uefi.c
> +++ b/uefi-
> sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxT
> +++ est/SimpleTextOutBBTestFunction_uefi.c
> @@ -176,12 +176,12 @@ BBTestResetFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->MaxMode,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.MaxMode
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.MaxMode
>                   );
>
>    //
> @@ -272,12 +272,12 @@ BBTestResetFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->MaxMode,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.MaxMode
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.MaxMode
>                   );
>
>    //
> @@ -505,12 +505,12 @@ BBTestResetFunctionAutoTest (
>                     L"Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->MaxMode,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.MaxMode
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.MaxMode
>                     );
>
>      //
> @@ -582,12 +582,12 @@ BBTestResetFunctionAutoTest (
>                     L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->MaxMode,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.MaxMode
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.MaxMode
>                     );
>
>      //
> @@ -850,18 +850,18 @@ BBTestOutputStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -987,18 +987,18 @@ BBTestOutputStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1094,18 +1094,18 @@ BBTestOutputStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1217,18 +1217,18 @@ BBTestOutputStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1469,18 +1469,18 @@ BBTestOutputStringFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1626,18 +1626,18 @@ BBTestOutputStringFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1754,18 +1754,18 @@ BBTestOutputStringFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -1897,18 +1897,18 @@ BBTestOutputStringFunctionManualTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -2240,18 +2240,18 @@ BBTestTestStringFunctionAutoTest (
>                   L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -2433,18 +2433,18 @@ BBTestQueryModeFunctionAutoTest (
>                     __FILE__,
>                     (UINTN)__LINE__,
>                     Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      if ( EFI_UNSUPPORTED == Status && 1 == Index ) { @@ -2720,18 +2720,18
> @@ BBTestSetModeFunctionManualTest (
>                     __FILE__,
>                     (UINTN)__LINE__,
>                     Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -2968,18 +2968,18 @@ BBTestSetModeFunctionAutoTest (
>                     __FILE__,
>                     (UINTN)__LINE__,
>                     Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -3193,18 +3193,18 @@ BBTestSetAttributeFunctionManualTest (
>                         L" Expected:Cursor Position(%d x %d), Mode=%d,
> MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                         __FILE__,
>                         (UINTN)__LINE__,
> -                       SimpleOut->Mode->CursorColumn,
> -                       SimpleOut->Mode->CursorRow,
> -                       SimpleOut->Mode->Mode,
> -                       SimpleOut->Mode->MaxMode,
> -                       SimpleOut->Mode->Attribute,
> -                       SimpleOut->Mode->CursorVisible,
> -                       ModeExpected.CursorColumn,
> -                       ModeExpected.CursorRow,
> -                       ModeExpected.Mode,
> -                       ModeExpected.MaxMode,
> -                       ModeExpected.Attribute,
> -                       ModeExpected.CursorVisible
> +                       (UINTN)SimpleOut->Mode->CursorColumn,
> +                       (UINTN)SimpleOut->Mode->CursorRow,
> +                       (UINTN)SimpleOut->Mode->Mode,
> +                       (UINTN)SimpleOut->Mode->MaxMode,
> +                       (UINTN)SimpleOut->Mode->Attribute,
> +                       (UINTN)SimpleOut->Mode->CursorVisible,
> +                       (UINTN)ModeExpected.CursorColumn,
> +                       (UINTN)ModeExpected.CursorRow,
> +                       (UINTN)ModeExpected.Mode,
> +                       (UINTN)ModeExpected.MaxMode,
> +                       (UINTN)ModeExpected.Attribute,
> +                       (UINTN)ModeExpected.CursorVisible
>                         );
>          Result = FALSE;
>        }
> @@ -3451,18 +3451,18 @@ BBTestSetAttributeFunctionAutoTest (
>                           L" Expected:Cursor Position(%d x %d), Mode=%d,
> MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                           __FILE__,
>                           (UINTN)__LINE__,
> -                         SimpleOut->Mode->CursorColumn,
> -                         SimpleOut->Mode->CursorRow,
> -                         SimpleOut->Mode->Mode,
> -                         SimpleOut->Mode->MaxMode,
> -                         SimpleOut->Mode->Attribute,
> -                         SimpleOut->Mode->CursorVisible,
> -                         ModeExpected.CursorColumn,
> -                         ModeExpected.CursorRow,
> -                         ModeExpected.Mode,
> -                         ModeExpected.MaxMode,
> -                         ModeExpected.Attribute,
> -                         ModeExpected.CursorVisible
> +                         (UINTN)SimpleOut->Mode->CursorColumn,
> +                         (UINTN)SimpleOut->Mode->CursorRow,
> +                         (UINTN)SimpleOut->Mode->Mode,
> +                         (UINTN)SimpleOut->Mode->MaxMode,
> +                         (UINTN)SimpleOut->Mode->Attribute,
> +                         (UINTN)SimpleOut->Mode->CursorVisible,
> +                         (UINTN)ModeExpected.CursorColumn,
> +                         (UINTN)ModeExpected.CursorRow,
> +                         (UINTN)ModeExpected.Mode,
> +                         (UINTN)ModeExpected.MaxMode,
> +                         (UINTN)ModeExpected.Attribute,
> +                         (UINTN)ModeExpected.CursorVisible
>                           );
>                 Result = FALSE;
>          }
> @@ -3653,18 +3653,18 @@ BBTestClearScreenFunctionManualTest (
>                   L" Expected: Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                   __FILE__,
>                   (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                   );
>
>    //
> @@ -3896,18 +3896,18 @@ BBTestClearScreenFunctionAutoTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -4143,18 +4143,18 @@ BBTestSetCursorPositionFunctionManualTest (
>                         L"Expected:Cursor Position(%d x %d), Mode=%d,
> MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                         __FILE__,
>                         (UINTN)__LINE__,
> -                       SimpleOut->Mode->CursorColumn,
> -                       SimpleOut->Mode->CursorRow,
> -                       SimpleOut->Mode->Mode,
> -                       SimpleOut->Mode->MaxMode,
> -                       SimpleOut->Mode->Attribute,
> -                       SimpleOut->Mode->CursorVisible,
> -                       ModeExpected.CursorColumn,
> -                       ModeExpected.CursorRow,
> -                       ModeExpected.Mode,
> -                       ModeExpected.MaxMode,
> -                       ModeExpected.Attribute,
> -                       ModeExpected.CursorVisible
> +                       (UINTN)SimpleOut->Mode->CursorColumn,
> +                       (UINTN)SimpleOut->Mode->CursorRow,
> +                       (UINTN)SimpleOut->Mode->Mode,
> +                       (UINTN)SimpleOut->Mode->MaxMode,
> +                       (UINTN)SimpleOut->Mode->Attribute,
> +                       (UINTN)SimpleOut->Mode->CursorVisible,
> +                       (UINTN)ModeExpected.CursorColumn,
> +                       (UINTN)ModeExpected.CursorRow,
> +                       (UINTN)ModeExpected.Mode,
> +                       (UINTN)ModeExpected.MaxMode,
> +                       (UINTN)ModeExpected.Attribute,
> +                       (UINTN)ModeExpected.CursorVisible
>                         );
>          Result = FALSE;
>        }
> @@ -4434,18 +4434,18 @@ BBTestSetCursorPositionFunctionAutoTest (
>                           L"Expected:Cursor Position(%d x %d), Mode=%d,
> MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                           __FILE__,
>                           (UINTN)__LINE__,
> -                         SimpleOut->Mode->CursorColumn,
> -                         SimpleOut->Mode->CursorRow,
> -                         SimpleOut->Mode->Mode,
> -                         SimpleOut->Mode->MaxMode,
> -                         SimpleOut->Mode->Attribute,
> -                         SimpleOut->Mode->CursorVisible,
> -                         ModeExpected.CursorColumn,
> -                         ModeExpected.CursorRow,
> -                         ModeExpected.Mode,
> -                         ModeExpected.MaxMode,
> -                         ModeExpected.Attribute,
> -                         ModeExpected.CursorVisible
> +                         (UINTN)SimpleOut->Mode->CursorColumn,
> +                         (UINTN)SimpleOut->Mode->CursorRow,
> +                         (UINTN)SimpleOut->Mode->Mode,
> +                         (UINTN)SimpleOut->Mode->MaxMode,
> +                         (UINTN)SimpleOut->Mode->Attribute,
> +                         (UINTN)SimpleOut->Mode->CursorVisible,
> +                         (UINTN)ModeExpected.CursorColumn,
> +                         (UINTN)ModeExpected.CursorRow,
> +                         (UINTN)ModeExpected.Mode,
> +                         (UINTN)ModeExpected.MaxMode,
> +                         (UINTN)ModeExpected.Attribute,
> +                         (UINTN)ModeExpected.CursorVisible
>                           );
>                 Result = FALSE;
>          }
> @@ -4669,18 +4669,18 @@ BBTestEnableCursorFunctionManualTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -4739,18 +4739,18 @@ BBTestEnableCursorFunctionManualTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>    } else {
>      //
> @@ -4803,18 +4803,18 @@ BBTestEnableCursorFunctionManualTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      //
> @@ -4888,18 +4888,18 @@ BBTestEnableCursorFunctionManualTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>    } else {
>      //
> @@ -5128,18 +5128,18 @@ BBTestEnableCursorFunctionAutoTest (
>                     L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>      AssertionType = EFI_TEST_ASSERTION_PASSED; @@ -5212,18 +5212,18
> @@ BBTestEnableCursorFunctionAutoTest (
>                     L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
>                     __FILE__,
>                     (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                     );
>
>
> --
> 2.30.2

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test
  2021-03-30 15:08 [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test Heinrich Schuchardt
  2021-04-05 14:46 ` G Edhaya Chandran
  2021-05-09 17:10 ` Samer El-Haj-Mahmoud
@ 2021-05-10  9:24 ` Sunny Wang
  2021-05-10 10:29   ` Heinrich Schuchardt
  2 siblings, 1 reply; 8+ messages in thread
From: Sunny Wang @ 2021-05-10  9:24 UTC (permalink / raw)
  To: devel@edk2.groups.io, xypron.glpk@gmx.de
  Cc: Eric Jin, G Edhaya Chandran, Barton Gao, Arvin Chen,
	Samer El-Haj-Mahmoud, Sunny Wang

Looks good. However, I'm thinking about if this is a UEFI specification issue. It looks like we should change the parameter type in EFI_SIMPLE_TEXT_OUTPUT_MODE data structure instead of doing typecasting.
Morevover, we may also need to check the files below:
       - uefi-sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestConformance_efi.c
       - uefi-sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestConformance_uefi.c
       - uefi-sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestFunction_efi.c
       - uefi-sct\SctPkg\TestCase\UEFI\IHV\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestConformance_uefi.c

Reviewed-by: Sunny Wang <sunny.wang@arm.com>

Best Regards,
Sunny Wang

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Heinrich Schuchardt via groups.io
Sent: Tuesday, March 30, 2021 11:09 PM
To: EDK II Development <devel@edk2.groups.io>
Cc: Eric Jin <eric.jin@intel.com>; G Edhaya Chandran <Edhaya.Chandran@arm.com>; Barton Gao <gaojie@byosoft.com.cn>; Arvin Chen <arvinx.chen@intel.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Heinrich Schuchardt <xypron.glpk@gmx.de>; G Edhaya Chandran <Edhaya.Chandran@arm.com>
Subject: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test

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

SctPrint() requires that %d refers to an UINTN parameter.

SimpleTextOutBBTestFunction_uefi.c has a lot of
StandardLib->RecordAssertion() calls where an INT32 is passed
as argument for a '%d' print code.

This leads to incorrect output like:

MaxMode=-549755813885,

-549755813885 is 0x0xFFFFFF8000000003. So MaxMode actually is an INT32 with value 3 in this example.

Convert the parameters to UINTN.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
---
 .../SimpleTextOutBBTestFunction_uefi.c        | 624 +++++++++---------
 1 file changed, 312 insertions(+), 312 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c
index 2bc9bcdb51f9..a833498c2816 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxT
+++ est/SimpleTextOutBBTestFunction_uefi.c
@@ -176,12 +176,12 @@ BBTestResetFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->MaxMode,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.MaxMode
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.MaxMode
                  );

   //
@@ -272,12 +272,12 @@ BBTestResetFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->MaxMode,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.MaxMode
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.MaxMode
                  );

   //
@@ -505,12 +505,12 @@ BBTestResetFunctionAutoTest (
                    L"Expected:Cursor Position(%d x %d), MaxMode=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->MaxMode,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.MaxMode
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.MaxMode
                    );

     //
@@ -582,12 +582,12 @@ BBTestResetFunctionAutoTest (
                    L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->MaxMode,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.MaxMode
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.MaxMode
                    );

     //
@@ -850,18 +850,18 @@ BBTestOutputStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -987,18 +987,18 @@ BBTestOutputStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1094,18 +1094,18 @@ BBTestOutputStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1217,18 +1217,18 @@ BBTestOutputStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1469,18 +1469,18 @@ BBTestOutputStringFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1626,18 +1626,18 @@ BBTestOutputStringFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1754,18 +1754,18 @@ BBTestOutputStringFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -1897,18 +1897,18 @@ BBTestOutputStringFunctionManualTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -2240,18 +2240,18 @@ BBTestTestStringFunctionAutoTest (
                  L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -2433,18 +2433,18 @@ BBTestQueryModeFunctionAutoTest (
                    __FILE__,
                    (UINTN)__LINE__,
                    Index,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     if ( EFI_UNSUPPORTED == Status && 1 == Index ) { @@ -2720,18 +2720,18 @@ BBTestSetModeFunctionManualTest (
                    __FILE__,
                    (UINTN)__LINE__,
                    Index,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -2968,18 +2968,18 @@ BBTestSetModeFunctionAutoTest (
                    __FILE__,
                    (UINTN)__LINE__,
                    Index,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -3193,18 +3193,18 @@ BBTestSetAttributeFunctionManualTest (
                        L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                        __FILE__,
                        (UINTN)__LINE__,
-                       SimpleOut->Mode->CursorColumn,
-                       SimpleOut->Mode->CursorRow,
-                       SimpleOut->Mode->Mode,
-                       SimpleOut->Mode->MaxMode,
-                       SimpleOut->Mode->Attribute,
-                       SimpleOut->Mode->CursorVisible,
-                       ModeExpected.CursorColumn,
-                       ModeExpected.CursorRow,
-                       ModeExpected.Mode,
-                       ModeExpected.MaxMode,
-                       ModeExpected.Attribute,
-                       ModeExpected.CursorVisible
+                       (UINTN)SimpleOut->Mode->CursorColumn,
+                       (UINTN)SimpleOut->Mode->CursorRow,
+                       (UINTN)SimpleOut->Mode->Mode,
+                       (UINTN)SimpleOut->Mode->MaxMode,
+                       (UINTN)SimpleOut->Mode->Attribute,
+                       (UINTN)SimpleOut->Mode->CursorVisible,
+                       (UINTN)ModeExpected.CursorColumn,
+                       (UINTN)ModeExpected.CursorRow,
+                       (UINTN)ModeExpected.Mode,
+                       (UINTN)ModeExpected.MaxMode,
+                       (UINTN)ModeExpected.Attribute,
+                       (UINTN)ModeExpected.CursorVisible
                        );
         Result = FALSE;
       }
@@ -3451,18 +3451,18 @@ BBTestSetAttributeFunctionAutoTest (
                          L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                          __FILE__,
                          (UINTN)__LINE__,
-                         SimpleOut->Mode->CursorColumn,
-                         SimpleOut->Mode->CursorRow,
-                         SimpleOut->Mode->Mode,
-                         SimpleOut->Mode->MaxMode,
-                         SimpleOut->Mode->Attribute,
-                         SimpleOut->Mode->CursorVisible,
-                         ModeExpected.CursorColumn,
-                         ModeExpected.CursorRow,
-                         ModeExpected.Mode,
-                         ModeExpected.MaxMode,
-                         ModeExpected.Attribute,
-                         ModeExpected.CursorVisible
+                         (UINTN)SimpleOut->Mode->CursorColumn,
+                         (UINTN)SimpleOut->Mode->CursorRow,
+                         (UINTN)SimpleOut->Mode->Mode,
+                         (UINTN)SimpleOut->Mode->MaxMode,
+                         (UINTN)SimpleOut->Mode->Attribute,
+                         (UINTN)SimpleOut->Mode->CursorVisible,
+                         (UINTN)ModeExpected.CursorColumn,
+                         (UINTN)ModeExpected.CursorRow,
+                         (UINTN)ModeExpected.Mode,
+                         (UINTN)ModeExpected.MaxMode,
+                         (UINTN)ModeExpected.Attribute,
+                         (UINTN)ModeExpected.CursorVisible
                          );
                  Result = FALSE;
         }
@@ -3653,18 +3653,18 @@ BBTestClearScreenFunctionManualTest (
                  L" Expected: Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                  __FILE__,
                  (UINTN)__LINE__,
-                 SimpleOut->Mode->CursorColumn,
-                 SimpleOut->Mode->CursorRow,
-                 SimpleOut->Mode->Mode,
-                 SimpleOut->Mode->MaxMode,
-                 SimpleOut->Mode->Attribute,
-                 SimpleOut->Mode->CursorVisible,
-                 ModeExpected.CursorColumn,
-                 ModeExpected.CursorRow,
-                 ModeExpected.Mode,
-                 ModeExpected.MaxMode,
-                 ModeExpected.Attribute,
-                 ModeExpected.CursorVisible
+                 (UINTN)SimpleOut->Mode->CursorColumn,
+                 (UINTN)SimpleOut->Mode->CursorRow,
+                 (UINTN)SimpleOut->Mode->Mode,
+                 (UINTN)SimpleOut->Mode->MaxMode,
+                 (UINTN)SimpleOut->Mode->Attribute,
+                 (UINTN)SimpleOut->Mode->CursorVisible,
+                 (UINTN)ModeExpected.CursorColumn,
+                 (UINTN)ModeExpected.CursorRow,
+                 (UINTN)ModeExpected.Mode,
+                 (UINTN)ModeExpected.MaxMode,
+                 (UINTN)ModeExpected.Attribute,
+                 (UINTN)ModeExpected.CursorVisible
                  );

   //
@@ -3896,18 +3896,18 @@ BBTestClearScreenFunctionAutoTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -4143,18 +4143,18 @@ BBTestSetCursorPositionFunctionManualTest (
                        L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                        __FILE__,
                        (UINTN)__LINE__,
-                       SimpleOut->Mode->CursorColumn,
-                       SimpleOut->Mode->CursorRow,
-                       SimpleOut->Mode->Mode,
-                       SimpleOut->Mode->MaxMode,
-                       SimpleOut->Mode->Attribute,
-                       SimpleOut->Mode->CursorVisible,
-                       ModeExpected.CursorColumn,
-                       ModeExpected.CursorRow,
-                       ModeExpected.Mode,
-                       ModeExpected.MaxMode,
-                       ModeExpected.Attribute,
-                       ModeExpected.CursorVisible
+                       (UINTN)SimpleOut->Mode->CursorColumn,
+                       (UINTN)SimpleOut->Mode->CursorRow,
+                       (UINTN)SimpleOut->Mode->Mode,
+                       (UINTN)SimpleOut->Mode->MaxMode,
+                       (UINTN)SimpleOut->Mode->Attribute,
+                       (UINTN)SimpleOut->Mode->CursorVisible,
+                       (UINTN)ModeExpected.CursorColumn,
+                       (UINTN)ModeExpected.CursorRow,
+                       (UINTN)ModeExpected.Mode,
+                       (UINTN)ModeExpected.MaxMode,
+                       (UINTN)ModeExpected.Attribute,
+                       (UINTN)ModeExpected.CursorVisible
                        );
         Result = FALSE;
       }
@@ -4434,18 +4434,18 @@ BBTestSetCursorPositionFunctionAutoTest (
                          L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                          __FILE__,
                          (UINTN)__LINE__,
-                         SimpleOut->Mode->CursorColumn,
-                         SimpleOut->Mode->CursorRow,
-                         SimpleOut->Mode->Mode,
-                         SimpleOut->Mode->MaxMode,
-                         SimpleOut->Mode->Attribute,
-                         SimpleOut->Mode->CursorVisible,
-                         ModeExpected.CursorColumn,
-                         ModeExpected.CursorRow,
-                         ModeExpected.Mode,
-                         ModeExpected.MaxMode,
-                         ModeExpected.Attribute,
-                         ModeExpected.CursorVisible
+                         (UINTN)SimpleOut->Mode->CursorColumn,
+                         (UINTN)SimpleOut->Mode->CursorRow,
+                         (UINTN)SimpleOut->Mode->Mode,
+                         (UINTN)SimpleOut->Mode->MaxMode,
+                         (UINTN)SimpleOut->Mode->Attribute,
+                         (UINTN)SimpleOut->Mode->CursorVisible,
+                         (UINTN)ModeExpected.CursorColumn,
+                         (UINTN)ModeExpected.CursorRow,
+                         (UINTN)ModeExpected.Mode,
+                         (UINTN)ModeExpected.MaxMode,
+                         (UINTN)ModeExpected.Attribute,
+                         (UINTN)ModeExpected.CursorVisible
                          );
                  Result = FALSE;
         }
@@ -4669,18 +4669,18 @@ BBTestEnableCursorFunctionManualTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -4739,18 +4739,18 @@ BBTestEnableCursorFunctionManualTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );
   } else {
     //
@@ -4803,18 +4803,18 @@ BBTestEnableCursorFunctionManualTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     //
@@ -4888,18 +4888,18 @@ BBTestEnableCursorFunctionManualTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );
   } else {
     //
@@ -5128,18 +5128,18 @@ BBTestEnableCursorFunctionAutoTest (
                    L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );

     AssertionType = EFI_TEST_ASSERTION_PASSED; @@ -5212,18 +5212,18 @@ BBTestEnableCursorFunctionAutoTest (
                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
                    __FILE__,
                    (UINTN)__LINE__,
-                   SimpleOut->Mode->CursorColumn,
-                   SimpleOut->Mode->CursorRow,
-                   SimpleOut->Mode->Mode,
-                   SimpleOut->Mode->MaxMode,
-                   SimpleOut->Mode->Attribute,
-                   SimpleOut->Mode->CursorVisible,
-                   ModeExpected.CursorColumn,
-                   ModeExpected.CursorRow,
-                   ModeExpected.Mode,
-                   ModeExpected.MaxMode,
-                   ModeExpected.Attribute,
-                   ModeExpected.CursorVisible
+                   (UINTN)SimpleOut->Mode->CursorColumn,
+                   (UINTN)SimpleOut->Mode->CursorRow,
+                   (UINTN)SimpleOut->Mode->Mode,
+                   (UINTN)SimpleOut->Mode->MaxMode,
+                   (UINTN)SimpleOut->Mode->Attribute,
+                   (UINTN)SimpleOut->Mode->CursorVisible,
+                   (UINTN)ModeExpected.CursorColumn,
+                   (UINTN)ModeExpected.CursorRow,
+                   (UINTN)ModeExpected.Mode,
+                   (UINTN)ModeExpected.MaxMode,
+                   (UINTN)ModeExpected.Attribute,
+                   (UINTN)ModeExpected.CursorVisible
                    );


--
2.30.2



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#73535): https://edk2.groups.io/g/devel/message/73535
Mute This Topic: https://groups.io/mt/81724304/5985097
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [Sunny.Wang@arm.com] -=-=-=-=-=-=


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test
  2021-05-10  9:24 ` [edk2-devel] " Sunny Wang
@ 2021-05-10 10:29   ` Heinrich Schuchardt
  2021-05-12  6:22     ` G Edhaya Chandran
  2021-05-12  9:19     ` Sunny Wang
  0 siblings, 2 replies; 8+ messages in thread
From: Heinrich Schuchardt @ 2021-05-10 10:29 UTC (permalink / raw)
  To: Sunny Wang, devel@edk2.groups.io
  Cc: Eric Jin, G Edhaya Chandran, Barton Gao, Arvin Chen,
	Samer El-Haj-Mahmoud

On 5/10/21 11:24 AM, Sunny Wang wrote:
> Looks good. However, I'm thinking about if this is a UEFI specification issue. It looks like we should change the parameter type in EFI_SIMPLE_TEXT_OUTPUT_MODE data structure instead of doing typecasting.
> Morevover, we may also need to check the files below:
>         - uefi-sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestConformance_efi.c
>         - uefi-sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestConformance_uefi.c
>         - uefi-sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestFunction_efi.c
>         - uefi-sct\SctPkg\TestCase\UEFI\IHV\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestConformance_uefi.c
>
> Reviewed-by: Sunny Wang <sunny.wang@arm.com>

Thank you for reviewing.

I had a look into the UEFI spec 2.9:

Structure SIMPLE_TEXT_OUTPUT_MODE is defined with Mode and MaxMode as INT32.

EDK II uses the structure name EFI_SIMPLE_TEXT_OUTPUT_MODE instead of
SIMPLE_TEXT_OUTPUT_MODE.

Changing the component types in SIMPLE_TEXT_OUTPUT_MODE would break
forward and backward compatibility of UEFI applications. I see no value
in such a change.

Best regards

Heinrich

>
> Best Regards,
> Sunny Wang
>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Heinrich Schuchardt via groups.io
> Sent: Tuesday, March 30, 2021 11:09 PM
> To: EDK II Development <devel@edk2.groups.io>
> Cc: Eric Jin <eric.jin@intel.com>; G Edhaya Chandran <Edhaya.Chandran@arm.com>; Barton Gao <gaojie@byosoft.com.cn>; Arvin Chen <arvinx.chen@intel.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Heinrich Schuchardt <xypron.glpk@gmx.de>; G Edhaya Chandran <Edhaya.Chandran@arm.com>
> Subject: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3253
>
> SctPrint() requires that %d refers to an UINTN parameter.
>
> SimpleTextOutBBTestFunction_uefi.c has a lot of
> StandardLib->RecordAssertion() calls where an INT32 is passed
> as argument for a '%d' print code.
>
> This leads to incorrect output like:
>
> MaxMode=-549755813885,
>
> -549755813885 is 0x0xFFFFFF8000000003. So MaxMode actually is an INT32 with value 3 in this example.
>
> Convert the parameters to UINTN.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
> ---
>   .../SimpleTextOutBBTestFunction_uefi.c        | 624 +++++++++---------
>   1 file changed, 312 insertions(+), 312 deletions(-)
>
> diff --git a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c
> index 2bc9bcdb51f9..a833498c2816 100644
> --- a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTest/SimpleTextOutBBTestFunction_uefi.c
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxT
> +++ est/SimpleTextOutBBTestFunction_uefi.c
> @@ -176,12 +176,12 @@ BBTestResetFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->MaxMode,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.MaxMode
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.MaxMode
>                    );
>
>     //
> @@ -272,12 +272,12 @@ BBTestResetFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->MaxMode,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.MaxMode
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.MaxMode
>                    );
>
>     //
> @@ -505,12 +505,12 @@ BBTestResetFunctionAutoTest (
>                      L"Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->MaxMode,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.MaxMode
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.MaxMode
>                      );
>
>       //
> @@ -582,12 +582,12 @@ BBTestResetFunctionAutoTest (
>                      L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->MaxMode,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.MaxMode
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.MaxMode
>                      );
>
>       //
> @@ -850,18 +850,18 @@ BBTestOutputStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -987,18 +987,18 @@ BBTestOutputStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1094,18 +1094,18 @@ BBTestOutputStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1217,18 +1217,18 @@ BBTestOutputStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1469,18 +1469,18 @@ BBTestOutputStringFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1626,18 +1626,18 @@ BBTestOutputStringFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1754,18 +1754,18 @@ BBTestOutputStringFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1897,18 +1897,18 @@ BBTestOutputStringFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -2240,18 +2240,18 @@ BBTestTestStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -2433,18 +2433,18 @@ BBTestQueryModeFunctionAutoTest (
>                      __FILE__,
>                      (UINTN)__LINE__,
>                      Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       if ( EFI_UNSUPPORTED == Status && 1 == Index ) { @@ -2720,18 +2720,18 @@ BBTestSetModeFunctionManualTest (
>                      __FILE__,
>                      (UINTN)__LINE__,
>                      Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -2968,18 +2968,18 @@ BBTestSetModeFunctionAutoTest (
>                      __FILE__,
>                      (UINTN)__LINE__,
>                      Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -3193,18 +3193,18 @@ BBTestSetAttributeFunctionManualTest (
>                          L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                          __FILE__,
>                          (UINTN)__LINE__,
> -                       SimpleOut->Mode->CursorColumn,
> -                       SimpleOut->Mode->CursorRow,
> -                       SimpleOut->Mode->Mode,
> -                       SimpleOut->Mode->MaxMode,
> -                       SimpleOut->Mode->Attribute,
> -                       SimpleOut->Mode->CursorVisible,
> -                       ModeExpected.CursorColumn,
> -                       ModeExpected.CursorRow,
> -                       ModeExpected.Mode,
> -                       ModeExpected.MaxMode,
> -                       ModeExpected.Attribute,
> -                       ModeExpected.CursorVisible
> +                       (UINTN)SimpleOut->Mode->CursorColumn,
> +                       (UINTN)SimpleOut->Mode->CursorRow,
> +                       (UINTN)SimpleOut->Mode->Mode,
> +                       (UINTN)SimpleOut->Mode->MaxMode,
> +                       (UINTN)SimpleOut->Mode->Attribute,
> +                       (UINTN)SimpleOut->Mode->CursorVisible,
> +                       (UINTN)ModeExpected.CursorColumn,
> +                       (UINTN)ModeExpected.CursorRow,
> +                       (UINTN)ModeExpected.Mode,
> +                       (UINTN)ModeExpected.MaxMode,
> +                       (UINTN)ModeExpected.Attribute,
> +                       (UINTN)ModeExpected.CursorVisible
>                          );
>           Result = FALSE;
>         }
> @@ -3451,18 +3451,18 @@ BBTestSetAttributeFunctionAutoTest (
>                            L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                            __FILE__,
>                            (UINTN)__LINE__,
> -                         SimpleOut->Mode->CursorColumn,
> -                         SimpleOut->Mode->CursorRow,
> -                         SimpleOut->Mode->Mode,
> -                         SimpleOut->Mode->MaxMode,
> -                         SimpleOut->Mode->Attribute,
> -                         SimpleOut->Mode->CursorVisible,
> -                         ModeExpected.CursorColumn,
> -                         ModeExpected.CursorRow,
> -                         ModeExpected.Mode,
> -                         ModeExpected.MaxMode,
> -                         ModeExpected.Attribute,
> -                         ModeExpected.CursorVisible
> +                         (UINTN)SimpleOut->Mode->CursorColumn,
> +                         (UINTN)SimpleOut->Mode->CursorRow,
> +                         (UINTN)SimpleOut->Mode->Mode,
> +                         (UINTN)SimpleOut->Mode->MaxMode,
> +                         (UINTN)SimpleOut->Mode->Attribute,
> +                         (UINTN)SimpleOut->Mode->CursorVisible,
> +                         (UINTN)ModeExpected.CursorColumn,
> +                         (UINTN)ModeExpected.CursorRow,
> +                         (UINTN)ModeExpected.Mode,
> +                         (UINTN)ModeExpected.MaxMode,
> +                         (UINTN)ModeExpected.Attribute,
> +                         (UINTN)ModeExpected.CursorVisible
>                            );
>                    Result = FALSE;
>           }
> @@ -3653,18 +3653,18 @@ BBTestClearScreenFunctionManualTest (
>                    L" Expected: Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -3896,18 +3896,18 @@ BBTestClearScreenFunctionAutoTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -4143,18 +4143,18 @@ BBTestSetCursorPositionFunctionManualTest (
>                          L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                          __FILE__,
>                          (UINTN)__LINE__,
> -                       SimpleOut->Mode->CursorColumn,
> -                       SimpleOut->Mode->CursorRow,
> -                       SimpleOut->Mode->Mode,
> -                       SimpleOut->Mode->MaxMode,
> -                       SimpleOut->Mode->Attribute,
> -                       SimpleOut->Mode->CursorVisible,
> -                       ModeExpected.CursorColumn,
> -                       ModeExpected.CursorRow,
> -                       ModeExpected.Mode,
> -                       ModeExpected.MaxMode,
> -                       ModeExpected.Attribute,
> -                       ModeExpected.CursorVisible
> +                       (UINTN)SimpleOut->Mode->CursorColumn,
> +                       (UINTN)SimpleOut->Mode->CursorRow,
> +                       (UINTN)SimpleOut->Mode->Mode,
> +                       (UINTN)SimpleOut->Mode->MaxMode,
> +                       (UINTN)SimpleOut->Mode->Attribute,
> +                       (UINTN)SimpleOut->Mode->CursorVisible,
> +                       (UINTN)ModeExpected.CursorColumn,
> +                       (UINTN)ModeExpected.CursorRow,
> +                       (UINTN)ModeExpected.Mode,
> +                       (UINTN)ModeExpected.MaxMode,
> +                       (UINTN)ModeExpected.Attribute,
> +                       (UINTN)ModeExpected.CursorVisible
>                          );
>           Result = FALSE;
>         }
> @@ -4434,18 +4434,18 @@ BBTestSetCursorPositionFunctionAutoTest (
>                            L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                            __FILE__,
>                            (UINTN)__LINE__,
> -                         SimpleOut->Mode->CursorColumn,
> -                         SimpleOut->Mode->CursorRow,
> -                         SimpleOut->Mode->Mode,
> -                         SimpleOut->Mode->MaxMode,
> -                         SimpleOut->Mode->Attribute,
> -                         SimpleOut->Mode->CursorVisible,
> -                         ModeExpected.CursorColumn,
> -                         ModeExpected.CursorRow,
> -                         ModeExpected.Mode,
> -                         ModeExpected.MaxMode,
> -                         ModeExpected.Attribute,
> -                         ModeExpected.CursorVisible
> +                         (UINTN)SimpleOut->Mode->CursorColumn,
> +                         (UINTN)SimpleOut->Mode->CursorRow,
> +                         (UINTN)SimpleOut->Mode->Mode,
> +                         (UINTN)SimpleOut->Mode->MaxMode,
> +                         (UINTN)SimpleOut->Mode->Attribute,
> +                         (UINTN)SimpleOut->Mode->CursorVisible,
> +                         (UINTN)ModeExpected.CursorColumn,
> +                         (UINTN)ModeExpected.CursorRow,
> +                         (UINTN)ModeExpected.Mode,
> +                         (UINTN)ModeExpected.MaxMode,
> +                         (UINTN)ModeExpected.Attribute,
> +                         (UINTN)ModeExpected.CursorVisible
>                            );
>                    Result = FALSE;
>           }
> @@ -4669,18 +4669,18 @@ BBTestEnableCursorFunctionManualTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -4739,18 +4739,18 @@ BBTestEnableCursorFunctionManualTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>     } else {
>       //
> @@ -4803,18 +4803,18 @@ BBTestEnableCursorFunctionManualTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -4888,18 +4888,18 @@ BBTestEnableCursorFunctionManualTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>     } else {
>       //
> @@ -5128,18 +5128,18 @@ BBTestEnableCursorFunctionAutoTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       AssertionType = EFI_TEST_ASSERTION_PASSED; @@ -5212,18 +5212,18 @@ BBTestEnableCursorFunctionAutoTest (
>                      L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>
> --
> 2.30.2
>
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#73535): https://edk2.groups.io/g/devel/message/73535
> Mute This Topic: https://groups.io/mt/81724304/5985097
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [Sunny.Wang@arm.com] -=-=-=-=-=-=
>
>
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test
  2021-05-10 10:29   ` Heinrich Schuchardt
@ 2021-05-12  6:22     ` G Edhaya Chandran
  2021-05-12  9:19     ` Sunny Wang
  1 sibling, 0 replies; 8+ messages in thread
From: G Edhaya Chandran @ 2021-05-12  6:22 UTC (permalink / raw)
  To: Heinrich Schuchardt, Sunny Wang, devel@edk2.groups.io
  Cc: Eric Jin, Barton Gao, Arvin Chen, Samer El-Haj-Mahmoud

Hi Sunny,

    Do you have any further comments on this change?
If not, can we upstream the change?

With Warm Regards,
Edhay


> -----Original Message-----
> From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Sent: 10 May 2021 16:00
> To: Sunny Wang <Sunny.Wang@arm.com>; devel@edk2.groups.io
> Cc: Eric Jin <eric.jin@intel.com>; G Edhaya Chandran
> <Edhaya.Chandran@arm.com>; Barton Gao <gaojie@byosoft.com.cn>; Arvin
> Chen <arvinx.chen@intel.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>
> Subject: Re: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type
> mismatch in SimpleTextOut test
>
> On 5/10/21 11:24 AM, Sunny Wang wrote:
> > Looks good. However, I'm thinking about if this is a UEFI specification issue. It
> looks like we should change the parameter type in
> EFI_SIMPLE_TEXT_OUTPUT_MODE data structure instead of doing typecasting.
> > Morevover, we may also need to check the files below:
> >         - uefi-
> sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTex
> tOutBBTestConformance_efi.c
> >         - uefi-
> sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTex
> tOutBBTestConformance_uefi.c
> >         - uefi-
> sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTex
> tOutBBTestFunction_efi.c
> >         -
> > uefi-sct\SctPkg\TestCase\UEFI\IHV\Protocol\SimpleTextOut\BlackBoxTest\
> > SimpleTextOutBBTestConformance_uefi.c
> >
> > Reviewed-by: Sunny Wang <sunny.wang@arm.com>
>
> Thank you for reviewing.
>
> I had a look into the UEFI spec 2.9:
>
> Structure SIMPLE_TEXT_OUTPUT_MODE is defined with Mode and MaxMode
> as INT32.
>
> EDK II uses the structure name EFI_SIMPLE_TEXT_OUTPUT_MODE instead of
> SIMPLE_TEXT_OUTPUT_MODE.
>
> Changing the component types in SIMPLE_TEXT_OUTPUT_MODE would break
> forward and backward compatibility of UEFI applications. I see no value in such
> a change.
>
> Best regards
>
> Heinrich
>
> >
> > Best Regards,
> > Sunny Wang
> >
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > Heinrich Schuchardt via groups.io
> > Sent: Tuesday, March 30, 2021 11:09 PM
> > To: EDK II Development <devel@edk2.groups.io>
> > Cc: Eric Jin <eric.jin@intel.com>; G Edhaya Chandran
> > <Edhaya.Chandran@arm.com>; Barton Gao <gaojie@byosoft.com.cn>; Arvin
> > Chen <arvinx.chen@intel.com>; Samer El-Haj-Mahmoud
> > <Samer.El-Haj-Mahmoud@arm.com>; Heinrich Schuchardt
> > <xypron.glpk@gmx.de>; G Edhaya Chandran <Edhaya.Chandran@arm.com>
> > Subject: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type
> > mismatch in SimpleTextOut test
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3253
> >
> > SctPrint() requires that %d refers to an UINTN parameter.
> >
> > SimpleTextOutBBTestFunction_uefi.c has a lot of
> > StandardLib->RecordAssertion() calls where an INT32 is passed
> > as argument for a '%d' print code.
> >
> > This leads to incorrect output like:
> >
> > MaxMode=-549755813885,
> >
> > -549755813885 is 0x0xFFFFFF8000000003. So MaxMode actually is an INT32
> with value 3 in this example.
> >
> > Convert the parameters to UINTN.
> >
> > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
> > ---
> >   .../SimpleTextOutBBTestFunction_uefi.c        | 624 +++++++++---------
> >   1 file changed, 312 insertions(+), 312 deletions(-)
> >
> > diff --git
> > a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTes
> > t/SimpleTextOutBBTestFunction_uefi.c
> > b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTes
> > t/SimpleTextOutBBTestFunction_uefi.c
> > index 2bc9bcdb51f9..a833498c2816 100644
> > ---
> > a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTes
> > t/SimpleTextOutBBTestFunction_uefi.c
> > +++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBo
> > +++ xT est/SimpleTextOutBBTestFunction_uefi.c
> > @@ -176,12 +176,12 @@ BBTestResetFunctionManualTest (
> >                    L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.MaxMode
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.MaxMode
> >                    );
> >
> >     //
> > @@ -272,12 +272,12 @@ BBTestResetFunctionManualTest (
> >                    L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.MaxMode
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.MaxMode
> >                    );
> >
> >     //
> > @@ -505,12 +505,12 @@ BBTestResetFunctionAutoTest (
> >                      L"Expected:Cursor Position(%d x %d), MaxMode=%d.",
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.MaxMode
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.MaxMode
> >                      );
> >
> >       //
> > @@ -582,12 +582,12 @@ BBTestResetFunctionAutoTest (
> >                      L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.MaxMode
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.MaxMode
> >                      );
> >
> >       //
> > @@ -850,18 +850,18 @@ BBTestOutputStringFunctionAutoTest (
> >                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -987,18 +987,18 @@ BBTestOutputStringFunctionAutoTest (
> >                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -1094,18 +1094,18 @@ BBTestOutputStringFunctionAutoTest (
> >                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -1217,18 +1217,18 @@ BBTestOutputStringFunctionAutoTest (
> >                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -1469,18 +1469,18 @@ BBTestOutputStringFunctionManualTest (
> >                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -1626,18 +1626,18 @@ BBTestOutputStringFunctionManualTest (
> >                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -1754,18 +1754,18 @@ BBTestOutputStringFunctionManualTest (
> >                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -1897,18 +1897,18 @@ BBTestOutputStringFunctionManualTest (
> >                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -2240,18 +2240,18 @@ BBTestTestStringFunctionAutoTest (
> >                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -2433,18 +2433,18 @@ BBTestQueryModeFunctionAutoTest (
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> >                      Index,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >
> >       if ( EFI_UNSUPPORTED == Status && 1 == Index ) { @@ -2720,18 +2720,18
> @@ BBTestSetModeFunctionManualTest (
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> >                      Index,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >
> >       //
> > @@ -2968,18 +2968,18 @@ BBTestSetModeFunctionAutoTest (
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> >                      Index,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >
> >       //
> > @@ -3193,18 +3193,18 @@ BBTestSetAttributeFunctionManualTest (
> >                          L" Expected:Cursor Position(%d x %d), Mode=%d,
> MaxMode=%d, Attribute=%d, CursorVisible=%d.",
> >                          __FILE__,
> >                          (UINTN)__LINE__,
> > -                       SimpleOut->Mode->CursorColumn,
> > -                       SimpleOut->Mode->CursorRow,
> > -                       SimpleOut->Mode->Mode,
> > -                       SimpleOut->Mode->MaxMode,
> > -                       SimpleOut->Mode->Attribute,
> > -                       SimpleOut->Mode->CursorVisible,
> > -                       ModeExpected.CursorColumn,
> > -                       ModeExpected.CursorRow,
> > -                       ModeExpected.Mode,
> > -                       ModeExpected.MaxMode,
> > -                       ModeExpected.Attribute,
> > -                       ModeExpected.CursorVisible
> > +                       (UINTN)SimpleOut->Mode->CursorColumn,
> > +                       (UINTN)SimpleOut->Mode->CursorRow,
> > +                       (UINTN)SimpleOut->Mode->Mode,
> > +                       (UINTN)SimpleOut->Mode->MaxMode,
> > +                       (UINTN)SimpleOut->Mode->Attribute,
> > +                       (UINTN)SimpleOut->Mode->CursorVisible,
> > +                       (UINTN)ModeExpected.CursorColumn,
> > +                       (UINTN)ModeExpected.CursorRow,
> > +                       (UINTN)ModeExpected.Mode,
> > +                       (UINTN)ModeExpected.MaxMode,
> > +                       (UINTN)ModeExpected.Attribute,
> > +                       (UINTN)ModeExpected.CursorVisible
> >                          );
> >           Result = FALSE;
> >         }
> > @@ -3451,18 +3451,18 @@ BBTestSetAttributeFunctionAutoTest (
> >                            L" Expected:Cursor Position(%d x %d), Mode=%d,
> MaxMode=%d, Attribute=%d, CursorVisible=%d.",
> >                            __FILE__,
> >                            (UINTN)__LINE__,
> > -                         SimpleOut->Mode->CursorColumn,
> > -                         SimpleOut->Mode->CursorRow,
> > -                         SimpleOut->Mode->Mode,
> > -                         SimpleOut->Mode->MaxMode,
> > -                         SimpleOut->Mode->Attribute,
> > -                         SimpleOut->Mode->CursorVisible,
> > -                         ModeExpected.CursorColumn,
> > -                         ModeExpected.CursorRow,
> > -                         ModeExpected.Mode,
> > -                         ModeExpected.MaxMode,
> > -                         ModeExpected.Attribute,
> > -                         ModeExpected.CursorVisible
> > +                         (UINTN)SimpleOut->Mode->CursorColumn,
> > +                         (UINTN)SimpleOut->Mode->CursorRow,
> > +                         (UINTN)SimpleOut->Mode->Mode,
> > +                         (UINTN)SimpleOut->Mode->MaxMode,
> > +                         (UINTN)SimpleOut->Mode->Attribute,
> > +                         (UINTN)SimpleOut->Mode->CursorVisible,
> > +                         (UINTN)ModeExpected.CursorColumn,
> > +                         (UINTN)ModeExpected.CursorRow,
> > +                         (UINTN)ModeExpected.Mode,
> > +                         (UINTN)ModeExpected.MaxMode,
> > +                         (UINTN)ModeExpected.Attribute,
> > +                         (UINTN)ModeExpected.CursorVisible
> >                            );
> >                    Result = FALSE;
> >           }
> > @@ -3653,18 +3653,18 @@ BBTestClearScreenFunctionManualTest (
> >                    L" Expected: Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                    __FILE__,
> >                    (UINTN)__LINE__,
> > -                 SimpleOut->Mode->CursorColumn,
> > -                 SimpleOut->Mode->CursorRow,
> > -                 SimpleOut->Mode->Mode,
> > -                 SimpleOut->Mode->MaxMode,
> > -                 SimpleOut->Mode->Attribute,
> > -                 SimpleOut->Mode->CursorVisible,
> > -                 ModeExpected.CursorColumn,
> > -                 ModeExpected.CursorRow,
> > -                 ModeExpected.Mode,
> > -                 ModeExpected.MaxMode,
> > -                 ModeExpected.Attribute,
> > -                 ModeExpected.CursorVisible
> > +                 (UINTN)SimpleOut->Mode->CursorColumn,
> > +                 (UINTN)SimpleOut->Mode->CursorRow,
> > +                 (UINTN)SimpleOut->Mode->Mode,
> > +                 (UINTN)SimpleOut->Mode->MaxMode,
> > +                 (UINTN)SimpleOut->Mode->Attribute,
> > +                 (UINTN)SimpleOut->Mode->CursorVisible,
> > +                 (UINTN)ModeExpected.CursorColumn,
> > +                 (UINTN)ModeExpected.CursorRow,
> > +                 (UINTN)ModeExpected.Mode,
> > +                 (UINTN)ModeExpected.MaxMode,
> > +                 (UINTN)ModeExpected.Attribute,
> > +                 (UINTN)ModeExpected.CursorVisible
> >                    );
> >
> >     //
> > @@ -3896,18 +3896,18 @@ BBTestClearScreenFunctionAutoTest (
> >                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >
> >       //
> > @@ -4143,18 +4143,18 @@ BBTestSetCursorPositionFunctionManualTest (
> >                          L"Expected:Cursor Position(%d x %d), Mode=%d,
> MaxMode=%d, Attribute=%d, CursorVisible=%d.",
> >                          __FILE__,
> >                          (UINTN)__LINE__,
> > -                       SimpleOut->Mode->CursorColumn,
> > -                       SimpleOut->Mode->CursorRow,
> > -                       SimpleOut->Mode->Mode,
> > -                       SimpleOut->Mode->MaxMode,
> > -                       SimpleOut->Mode->Attribute,
> > -                       SimpleOut->Mode->CursorVisible,
> > -                       ModeExpected.CursorColumn,
> > -                       ModeExpected.CursorRow,
> > -                       ModeExpected.Mode,
> > -                       ModeExpected.MaxMode,
> > -                       ModeExpected.Attribute,
> > -                       ModeExpected.CursorVisible
> > +                       (UINTN)SimpleOut->Mode->CursorColumn,
> > +                       (UINTN)SimpleOut->Mode->CursorRow,
> > +                       (UINTN)SimpleOut->Mode->Mode,
> > +                       (UINTN)SimpleOut->Mode->MaxMode,
> > +                       (UINTN)SimpleOut->Mode->Attribute,
> > +                       (UINTN)SimpleOut->Mode->CursorVisible,
> > +                       (UINTN)ModeExpected.CursorColumn,
> > +                       (UINTN)ModeExpected.CursorRow,
> > +                       (UINTN)ModeExpected.Mode,
> > +                       (UINTN)ModeExpected.MaxMode,
> > +                       (UINTN)ModeExpected.Attribute,
> > +                       (UINTN)ModeExpected.CursorVisible
> >                          );
> >           Result = FALSE;
> >         }
> > @@ -4434,18 +4434,18 @@ BBTestSetCursorPositionFunctionAutoTest (
> >                            L"Expected:Cursor Position(%d x %d), Mode=%d,
> MaxMode=%d, Attribute=%d, CursorVisible=%d.",
> >                            __FILE__,
> >                            (UINTN)__LINE__,
> > -                         SimpleOut->Mode->CursorColumn,
> > -                         SimpleOut->Mode->CursorRow,
> > -                         SimpleOut->Mode->Mode,
> > -                         SimpleOut->Mode->MaxMode,
> > -                         SimpleOut->Mode->Attribute,
> > -                         SimpleOut->Mode->CursorVisible,
> > -                         ModeExpected.CursorColumn,
> > -                         ModeExpected.CursorRow,
> > -                         ModeExpected.Mode,
> > -                         ModeExpected.MaxMode,
> > -                         ModeExpected.Attribute,
> > -                         ModeExpected.CursorVisible
> > +                         (UINTN)SimpleOut->Mode->CursorColumn,
> > +                         (UINTN)SimpleOut->Mode->CursorRow,
> > +                         (UINTN)SimpleOut->Mode->Mode,
> > +                         (UINTN)SimpleOut->Mode->MaxMode,
> > +                         (UINTN)SimpleOut->Mode->Attribute,
> > +                         (UINTN)SimpleOut->Mode->CursorVisible,
> > +                         (UINTN)ModeExpected.CursorColumn,
> > +                         (UINTN)ModeExpected.CursorRow,
> > +                         (UINTN)ModeExpected.Mode,
> > +                         (UINTN)ModeExpected.MaxMode,
> > +                         (UINTN)ModeExpected.Attribute,
> > +                         (UINTN)ModeExpected.CursorVisible
> >                            );
> >                    Result = FALSE;
> >           }
> > @@ -4669,18 +4669,18 @@ BBTestEnableCursorFunctionManualTest (
> >                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >
> >       //
> > @@ -4739,18 +4739,18 @@ BBTestEnableCursorFunctionManualTest (
> >                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >     } else {
> >       //
> > @@ -4803,18 +4803,18 @@ BBTestEnableCursorFunctionManualTest (
> >                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >
> >       //
> > @@ -4888,18 +4888,18 @@ BBTestEnableCursorFunctionManualTest (
> >                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >     } else {
> >       //
> > @@ -5128,18 +5128,18 @@ BBTestEnableCursorFunctionAutoTest (
> >                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >
> >       AssertionType = EFI_TEST_ASSERTION_PASSED; @@ -5212,18 +5212,18
> @@ BBTestEnableCursorFunctionAutoTest (
> >                      L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d,
> Attribute=%d, CursorVisible=%d.",
> >                      __FILE__,
> >                      (UINTN)__LINE__,
> > -                   SimpleOut->Mode->CursorColumn,
> > -                   SimpleOut->Mode->CursorRow,
> > -                   SimpleOut->Mode->Mode,
> > -                   SimpleOut->Mode->MaxMode,
> > -                   SimpleOut->Mode->Attribute,
> > -                   SimpleOut->Mode->CursorVisible,
> > -                   ModeExpected.CursorColumn,
> > -                   ModeExpected.CursorRow,
> > -                   ModeExpected.Mode,
> > -                   ModeExpected.MaxMode,
> > -                   ModeExpected.Attribute,
> > -                   ModeExpected.CursorVisible
> > +                   (UINTN)SimpleOut->Mode->CursorColumn,
> > +                   (UINTN)SimpleOut->Mode->CursorRow,
> > +                   (UINTN)SimpleOut->Mode->Mode,
> > +                   (UINTN)SimpleOut->Mode->MaxMode,
> > +                   (UINTN)SimpleOut->Mode->Attribute,
> > +                   (UINTN)SimpleOut->Mode->CursorVisible,
> > +                   (UINTN)ModeExpected.CursorColumn,
> > +                   (UINTN)ModeExpected.CursorRow,
> > +                   (UINTN)ModeExpected.Mode,
> > +                   (UINTN)ModeExpected.MaxMode,
> > +                   (UINTN)ModeExpected.Attribute,
> > +                   (UINTN)ModeExpected.CursorVisible
> >                      );
> >
> >
> > --
> > 2.30.2
> >
> >
> >
> > -=-=-=-=-=-=
> > Groups.io Links: You receive all messages sent to this group.
> > View/Reply Online (#73535):
> > https://edk2.groups.io/g/devel/message/73535
> > Mute This Topic: https://groups.io/mt/81724304/5985097
> > Group Owner: devel+owner@edk2.groups.io
> > Unsubscribe: https://edk2.groups.io/g/devel/unsub [Sunny.Wang@arm.com]
> > -=-=-=-=-=-=
> >
> >
> > IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended recipient,
> please notify the sender immediately and do not disclose the contents to any
> other person, use it for any purpose, or store or copy the information in any
> medium. Thank you.
> >

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test
  2021-05-10 10:29   ` Heinrich Schuchardt
  2021-05-12  6:22     ` G Edhaya Chandran
@ 2021-05-12  9:19     ` Sunny Wang
  2021-05-12 16:03       ` G Edhaya Chandran
  1 sibling, 1 reply; 8+ messages in thread
From: Sunny Wang @ 2021-05-12  9:19 UTC (permalink / raw)
  To: Heinrich Schuchardt, devel@edk2.groups.io
  Cc: Eric Jin, G Edhaya Chandran, Barton Gao, Arvin Chen,
	Samer El-Haj-Mahmoud, Sunny Wang

Thanks for checking my comment, Heinrich.
I was thinking that this may be a mistake made in the very beginning because there may be no possibility to have a negative value in the members (like MaxMode) in SIMPLE_TEXT_OUTPUT_MODE structure. However, you made a good point about the compatibility issue. I agree that it is not worth further checking and making change for EFI_SIMPLE_TEXT_OUTPUT_MODE data structure, so you change is good enough!

Best Regards,
Sunny Wang

-----Original Message-----
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Sent: Monday, May 10, 2021 6:30 PM
To: Sunny Wang <Sunny.Wang@arm.com>; devel@edk2.groups.io
Cc: Eric Jin <eric.jin@intel.com>; G Edhaya Chandran <Edhaya.Chandran@arm.com>; Barton Gao <gaojie@byosoft.com.cn>; Arvin Chen <arvinx.chen@intel.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test

On 5/10/21 11:24 AM, Sunny Wang wrote:
> Looks good. However, I'm thinking about if this is a UEFI specification issue. It looks like we should change the parameter type in EFI_SIMPLE_TEXT_OUTPUT_MODE data structure instead of doing typecasting.
> Morevover, we may also need to check the files below:
>         - uefi-sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestConformance_efi.c
>         - uefi-sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestConformance_uefi.c
>         - uefi-sct\SctPkg\TestCase\UEFI\EFI\Protocol\SimpleTextOut\BlackBoxTest\SimpleTextOutBBTestFunction_efi.c
>         -
> uefi-sct\SctPkg\TestCase\UEFI\IHV\Protocol\SimpleTextOut\BlackBoxTest\
> SimpleTextOutBBTestConformance_uefi.c
>
> Reviewed-by: Sunny Wang <sunny.wang@arm.com>

Thank you for reviewing.

I had a look into the UEFI spec 2.9:

Structure SIMPLE_TEXT_OUTPUT_MODE is defined with Mode and MaxMode as INT32.

EDK II uses the structure name EFI_SIMPLE_TEXT_OUTPUT_MODE instead of SIMPLE_TEXT_OUTPUT_MODE.

Changing the component types in SIMPLE_TEXT_OUTPUT_MODE would break forward and backward compatibility of UEFI applications. I see no value in such a change.

Best regards

Heinrich

>
> Best Regards,
> Sunny Wang
>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> Heinrich Schuchardt via groups.io
> Sent: Tuesday, March 30, 2021 11:09 PM
> To: EDK II Development <devel@edk2.groups.io>
> Cc: Eric Jin <eric.jin@intel.com>; G Edhaya Chandran
> <Edhaya.Chandran@arm.com>; Barton Gao <gaojie@byosoft.com.cn>; Arvin
> Chen <arvinx.chen@intel.com>; Samer El-Haj-Mahmoud
> <Samer.El-Haj-Mahmoud@arm.com>; Heinrich Schuchardt
> <xypron.glpk@gmx.de>; G Edhaya Chandran <Edhaya.Chandran@arm.com>
> Subject: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type
> mismatch in SimpleTextOut test
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3253
>
> SctPrint() requires that %d refers to an UINTN parameter.
>
> SimpleTextOutBBTestFunction_uefi.c has a lot of
> StandardLib->RecordAssertion() calls where an INT32 is passed
> as argument for a '%d' print code.
>
> This leads to incorrect output like:
>
> MaxMode=-549755813885,
>
> -549755813885 is 0x0xFFFFFF8000000003. So MaxMode actually is an INT32 with value 3 in this example.
>
> Convert the parameters to UINTN.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
> ---
>   .../SimpleTextOutBBTestFunction_uefi.c        | 624 +++++++++---------
>   1 file changed, 312 insertions(+), 312 deletions(-)
>
> diff --git
> a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTes
> t/SimpleTextOutBBTestFunction_uefi.c
> b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTes
> t/SimpleTextOutBBTestFunction_uefi.c
> index 2bc9bcdb51f9..a833498c2816 100644
> ---
> a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBoxTes
> t/SimpleTextOutBBTestFunction_uefi.c
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextOut/BlackBo
> +++ xT est/SimpleTextOutBBTestFunction_uefi.c
> @@ -176,12 +176,12 @@ BBTestResetFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->MaxMode,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.MaxMode
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.MaxMode
>                    );
>
>     //
> @@ -272,12 +272,12 @@ BBTestResetFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->MaxMode,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.MaxMode
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.MaxMode
>                    );
>
>     //
> @@ -505,12 +505,12 @@ BBTestResetFunctionAutoTest (
>                      L"Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->MaxMode,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.MaxMode
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.MaxMode
>                      );
>
>       //
> @@ -582,12 +582,12 @@ BBTestResetFunctionAutoTest (
>                      L" Expected:Cursor Position(%d x %d), MaxMode=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->MaxMode,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.MaxMode
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.MaxMode
>                      );
>
>       //
> @@ -850,18 +850,18 @@ BBTestOutputStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -987,18 +987,18 @@ BBTestOutputStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1094,18 +1094,18 @@ BBTestOutputStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1217,18 +1217,18 @@ BBTestOutputStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1469,18 +1469,18 @@ BBTestOutputStringFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1626,18 +1626,18 @@ BBTestOutputStringFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1754,18 +1754,18 @@ BBTestOutputStringFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -1897,18 +1897,18 @@ BBTestOutputStringFunctionManualTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -2240,18 +2240,18 @@ BBTestTestStringFunctionAutoTest (
>                    L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -2433,18 +2433,18 @@ BBTestQueryModeFunctionAutoTest (
>                      __FILE__,
>                      (UINTN)__LINE__,
>                      Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       if ( EFI_UNSUPPORTED == Status && 1 == Index ) { @@ -2720,18 +2720,18 @@ BBTestSetModeFunctionManualTest (
>                      __FILE__,
>                      (UINTN)__LINE__,
>                      Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -2968,18 +2968,18 @@ BBTestSetModeFunctionAutoTest (
>                      __FILE__,
>                      (UINTN)__LINE__,
>                      Index,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -3193,18 +3193,18 @@ BBTestSetAttributeFunctionManualTest (
>                          L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                          __FILE__,
>                          (UINTN)__LINE__,
> -                       SimpleOut->Mode->CursorColumn,
> -                       SimpleOut->Mode->CursorRow,
> -                       SimpleOut->Mode->Mode,
> -                       SimpleOut->Mode->MaxMode,
> -                       SimpleOut->Mode->Attribute,
> -                       SimpleOut->Mode->CursorVisible,
> -                       ModeExpected.CursorColumn,
> -                       ModeExpected.CursorRow,
> -                       ModeExpected.Mode,
> -                       ModeExpected.MaxMode,
> -                       ModeExpected.Attribute,
> -                       ModeExpected.CursorVisible
> +                       (UINTN)SimpleOut->Mode->CursorColumn,
> +                       (UINTN)SimpleOut->Mode->CursorRow,
> +                       (UINTN)SimpleOut->Mode->Mode,
> +                       (UINTN)SimpleOut->Mode->MaxMode,
> +                       (UINTN)SimpleOut->Mode->Attribute,
> +                       (UINTN)SimpleOut->Mode->CursorVisible,
> +                       (UINTN)ModeExpected.CursorColumn,
> +                       (UINTN)ModeExpected.CursorRow,
> +                       (UINTN)ModeExpected.Mode,
> +                       (UINTN)ModeExpected.MaxMode,
> +                       (UINTN)ModeExpected.Attribute,
> +                       (UINTN)ModeExpected.CursorVisible
>                          );
>           Result = FALSE;
>         }
> @@ -3451,18 +3451,18 @@ BBTestSetAttributeFunctionAutoTest (
>                            L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                            __FILE__,
>                            (UINTN)__LINE__,
> -                         SimpleOut->Mode->CursorColumn,
> -                         SimpleOut->Mode->CursorRow,
> -                         SimpleOut->Mode->Mode,
> -                         SimpleOut->Mode->MaxMode,
> -                         SimpleOut->Mode->Attribute,
> -                         SimpleOut->Mode->CursorVisible,
> -                         ModeExpected.CursorColumn,
> -                         ModeExpected.CursorRow,
> -                         ModeExpected.Mode,
> -                         ModeExpected.MaxMode,
> -                         ModeExpected.Attribute,
> -                         ModeExpected.CursorVisible
> +                         (UINTN)SimpleOut->Mode->CursorColumn,
> +                         (UINTN)SimpleOut->Mode->CursorRow,
> +                         (UINTN)SimpleOut->Mode->Mode,
> +                         (UINTN)SimpleOut->Mode->MaxMode,
> +                         (UINTN)SimpleOut->Mode->Attribute,
> +                         (UINTN)SimpleOut->Mode->CursorVisible,
> +                         (UINTN)ModeExpected.CursorColumn,
> +                         (UINTN)ModeExpected.CursorRow,
> +                         (UINTN)ModeExpected.Mode,
> +                         (UINTN)ModeExpected.MaxMode,
> +                         (UINTN)ModeExpected.Attribute,
> +                         (UINTN)ModeExpected.CursorVisible
>                            );
>                    Result = FALSE;
>           }
> @@ -3653,18 +3653,18 @@ BBTestClearScreenFunctionManualTest (
>                    L" Expected: Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                    __FILE__,
>                    (UINTN)__LINE__,
> -                 SimpleOut->Mode->CursorColumn,
> -                 SimpleOut->Mode->CursorRow,
> -                 SimpleOut->Mode->Mode,
> -                 SimpleOut->Mode->MaxMode,
> -                 SimpleOut->Mode->Attribute,
> -                 SimpleOut->Mode->CursorVisible,
> -                 ModeExpected.CursorColumn,
> -                 ModeExpected.CursorRow,
> -                 ModeExpected.Mode,
> -                 ModeExpected.MaxMode,
> -                 ModeExpected.Attribute,
> -                 ModeExpected.CursorVisible
> +                 (UINTN)SimpleOut->Mode->CursorColumn,
> +                 (UINTN)SimpleOut->Mode->CursorRow,
> +                 (UINTN)SimpleOut->Mode->Mode,
> +                 (UINTN)SimpleOut->Mode->MaxMode,
> +                 (UINTN)SimpleOut->Mode->Attribute,
> +                 (UINTN)SimpleOut->Mode->CursorVisible,
> +                 (UINTN)ModeExpected.CursorColumn,
> +                 (UINTN)ModeExpected.CursorRow,
> +                 (UINTN)ModeExpected.Mode,
> +                 (UINTN)ModeExpected.MaxMode,
> +                 (UINTN)ModeExpected.Attribute,
> +                 (UINTN)ModeExpected.CursorVisible
>                    );
>
>     //
> @@ -3896,18 +3896,18 @@ BBTestClearScreenFunctionAutoTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -4143,18 +4143,18 @@ BBTestSetCursorPositionFunctionManualTest (
>                          L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                          __FILE__,
>                          (UINTN)__LINE__,
> -                       SimpleOut->Mode->CursorColumn,
> -                       SimpleOut->Mode->CursorRow,
> -                       SimpleOut->Mode->Mode,
> -                       SimpleOut->Mode->MaxMode,
> -                       SimpleOut->Mode->Attribute,
> -                       SimpleOut->Mode->CursorVisible,
> -                       ModeExpected.CursorColumn,
> -                       ModeExpected.CursorRow,
> -                       ModeExpected.Mode,
> -                       ModeExpected.MaxMode,
> -                       ModeExpected.Attribute,
> -                       ModeExpected.CursorVisible
> +                       (UINTN)SimpleOut->Mode->CursorColumn,
> +                       (UINTN)SimpleOut->Mode->CursorRow,
> +                       (UINTN)SimpleOut->Mode->Mode,
> +                       (UINTN)SimpleOut->Mode->MaxMode,
> +                       (UINTN)SimpleOut->Mode->Attribute,
> +                       (UINTN)SimpleOut->Mode->CursorVisible,
> +                       (UINTN)ModeExpected.CursorColumn,
> +                       (UINTN)ModeExpected.CursorRow,
> +                       (UINTN)ModeExpected.Mode,
> +                       (UINTN)ModeExpected.MaxMode,
> +                       (UINTN)ModeExpected.Attribute,
> +                       (UINTN)ModeExpected.CursorVisible
>                          );
>           Result = FALSE;
>         }
> @@ -4434,18 +4434,18 @@ BBTestSetCursorPositionFunctionAutoTest (
>                            L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                            __FILE__,
>                            (UINTN)__LINE__,
> -                         SimpleOut->Mode->CursorColumn,
> -                         SimpleOut->Mode->CursorRow,
> -                         SimpleOut->Mode->Mode,
> -                         SimpleOut->Mode->MaxMode,
> -                         SimpleOut->Mode->Attribute,
> -                         SimpleOut->Mode->CursorVisible,
> -                         ModeExpected.CursorColumn,
> -                         ModeExpected.CursorRow,
> -                         ModeExpected.Mode,
> -                         ModeExpected.MaxMode,
> -                         ModeExpected.Attribute,
> -                         ModeExpected.CursorVisible
> +                         (UINTN)SimpleOut->Mode->CursorColumn,
> +                         (UINTN)SimpleOut->Mode->CursorRow,
> +                         (UINTN)SimpleOut->Mode->Mode,
> +                         (UINTN)SimpleOut->Mode->MaxMode,
> +                         (UINTN)SimpleOut->Mode->Attribute,
> +                         (UINTN)SimpleOut->Mode->CursorVisible,
> +                         (UINTN)ModeExpected.CursorColumn,
> +                         (UINTN)ModeExpected.CursorRow,
> +                         (UINTN)ModeExpected.Mode,
> +                         (UINTN)ModeExpected.MaxMode,
> +                         (UINTN)ModeExpected.Attribute,
> +                         (UINTN)ModeExpected.CursorVisible
>                            );
>                    Result = FALSE;
>           }
> @@ -4669,18 +4669,18 @@ BBTestEnableCursorFunctionManualTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -4739,18 +4739,18 @@ BBTestEnableCursorFunctionManualTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>     } else {
>       //
> @@ -4803,18 +4803,18 @@ BBTestEnableCursorFunctionManualTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       //
> @@ -4888,18 +4888,18 @@ BBTestEnableCursorFunctionManualTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>     } else {
>       //
> @@ -5128,18 +5128,18 @@ BBTestEnableCursorFunctionAutoTest (
>                      L"Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>       AssertionType = EFI_TEST_ASSERTION_PASSED; @@ -5212,18 +5212,18 @@ BBTestEnableCursorFunctionAutoTest (
>                      L" Expected:Cursor Position(%d x %d), Mode=%d, MaxMode=%d, Attribute=%d, CursorVisible=%d.",
>                      __FILE__,
>                      (UINTN)__LINE__,
> -                   SimpleOut->Mode->CursorColumn,
> -                   SimpleOut->Mode->CursorRow,
> -                   SimpleOut->Mode->Mode,
> -                   SimpleOut->Mode->MaxMode,
> -                   SimpleOut->Mode->Attribute,
> -                   SimpleOut->Mode->CursorVisible,
> -                   ModeExpected.CursorColumn,
> -                   ModeExpected.CursorRow,
> -                   ModeExpected.Mode,
> -                   ModeExpected.MaxMode,
> -                   ModeExpected.Attribute,
> -                   ModeExpected.CursorVisible
> +                   (UINTN)SimpleOut->Mode->CursorColumn,
> +                   (UINTN)SimpleOut->Mode->CursorRow,
> +                   (UINTN)SimpleOut->Mode->Mode,
> +                   (UINTN)SimpleOut->Mode->MaxMode,
> +                   (UINTN)SimpleOut->Mode->Attribute,
> +                   (UINTN)SimpleOut->Mode->CursorVisible,
> +                   (UINTN)ModeExpected.CursorColumn,
> +                   (UINTN)ModeExpected.CursorRow,
> +                   (UINTN)ModeExpected.Mode,
> +                   (UINTN)ModeExpected.MaxMode,
> +                   (UINTN)ModeExpected.Attribute,
> +                   (UINTN)ModeExpected.CursorVisible
>                      );
>
>
> --
> 2.30.2
>
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#73535):
> https://edk2.groups.io/g/devel/message/73535
> Mute This Topic: https://groups.io/mt/81724304/5985097
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [Sunny.Wang@arm.com]
> -=-=-=-=-=-=
>
>
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test
  2021-05-12  9:19     ` Sunny Wang
@ 2021-05-12 16:03       ` G Edhaya Chandran
  0 siblings, 0 replies; 8+ messages in thread
From: G Edhaya Chandran @ 2021-05-12 16:03 UTC (permalink / raw)
  To: Sunny Wang, devel

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

The changes are upstreamed by commit-id : https://github.com/tianocore/edk2-test/commit/2821093d6f2b3521c453834f0657cf07c0908155

[-- Attachment #2: Type: text/html, Size: 135 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-12 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-30 15:08 [PATCH edk2-test 1/1] uefi-sct/SctPkg: IHV: type mismatch in SimpleTextOut test Heinrich Schuchardt
2021-04-05 14:46 ` G Edhaya Chandran
2021-05-09 17:10 ` Samer El-Haj-Mahmoud
2021-05-10  9:24 ` [edk2-devel] " Sunny Wang
2021-05-10 10:29   ` Heinrich Schuchardt
2021-05-12  6:22     ` G Edhaya Chandran
2021-05-12  9:19     ` Sunny Wang
2021-05-12 16:03       ` G Edhaya Chandran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox