From 01b024f16be7c5252f45f1c91f30e135aeec9640 Mon Sep 17 00:00:00 2001 From: jljusten Date: Sat, 16 Oct 2010 18:51:32 +0000 Subject: DuetPkg DxeIpl: Send result of PrintValue to serial port PrintValue now uses PrintString so its result will be sent to the serial port in addition to the screen. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10951 6f19259b-4bc3-4df7-8a09-765794883524 --- DuetPkg/DxeIpl/Debug.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/DuetPkg/DxeIpl/Debug.c b/DuetPkg/DxeIpl/Debug.c index ac27de96b1..3462815640 100644 --- a/DuetPkg/DxeIpl/Debug.c +++ b/DuetPkg/DxeIpl/Debug.c @@ -20,6 +20,7 @@ Revision History: #include "DxeIpl.h" #include "SerialStatusCode.h" +#include "Debug.h" UINT8 *mCursor; UINT8 mHeaderIndex = 10; @@ -55,16 +56,20 @@ PrintValue ( ) { UINT32 Index; - UINT8 Char; + CHAR8 Char; + CHAR8 String[9]; for (Index = 0; Index < 8; Index++) { Char = (UINT8)(((Value >> ((7 - Index) * 4)) & 0x0f) + '0'); if (Char > '9') { Char = (UINT8) (Char - '0' - 10 + 'A'); } - *mCursor = Char; - mCursor += 2; + String[Index] = Char; } + + String[sizeof (String) - 1] = '\0'; + + PrintString (String); } VOID @@ -80,7 +85,7 @@ PrintValue64 ( VOID PrintString ( - UINT8 *String + CHAR8 *String ) { UINT32 Index; -- cgit v1.2.3