Commit Graph

3 Commits

Author SHA1 Message Date
Laszlo Ersek 3d8ac52a5d OvmfPkg: PlatformDebugLibIoPort: fix AsciiSPrint() format string
The LineNumber parameter of the DebugAssert() function has type UINTN.
DebugAssert() passes it to AsciiSPrint() with the %d conversion specifier
at the moment, but %d would require an INT32 argument.

Fix this by casting LineNumber to UINT64, also employing the matching
decimal conversion specifier, %Lu.

(Another possibility would be to cast LineNumber to INT32, but a
UINTN->INT32 cast is not value preserving, generally speaking.)

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Scott Duplichan <scott@notabs.org>
Reported-by: Scott Duplichan <scott@notabs.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18173 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-06 10:13:33 +00:00
Liming Gao 5e795f936f OvmfPkg: Update PlatformBaseDebugLibIoPort library
Implement new API DebugPrintLevelEnabled() to base on PCD PcdFixedDebugPrintErrorLevel.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16797 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-06 06:38:37 +00:00
jljusten b90aefa9e4 OvmfPkg: add support for debug console on port 0x402
This patch adds support for a debug console on the same port that is used
by SeaBIOS.  This makes it easier to debug OVMF, because it does not mix
debug and serial output on the same device.  It also makes it easier to
leave some of the debug messages on even in release builds.

To enable it, pass "-debugcon stdio -global isa-debugcon.iobase=0x402" to
QEMU.

The new mechanism is enabled by default, but a regular serial console can
be chosen by adding -D DEBUG_ON_SERIAL_PORT to the build options.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
[jordan.l.justen@intel.com: MAX_DEBUG_MESSAGE_LENGTH=>0x100, p=>Ptr]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13562 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-26 16:36:39 +00:00