summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/ResetVector/SerialDebug.asm
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-16 23:29:15 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-16 23:29:15 +0000
commit7a55c43b072ec2192d35df5e44cf37eb8be06555 (patch)
tree0ffb3051583b198fa8b07a670a0fed8906221dad /OvmfPkg/ResetVector/SerialDebug.asm
parent8861fc792ce90cb7ab18a91bd3d6596d77ee0170 (diff)
downloadedk2-7a55c43b072ec2192d35df5e44cf37eb8be06555.tar.gz
edk2-7a55c43b072ec2192d35df5e44cf37eb8be06555.tar.bz2
edk2-7a55c43b072ec2192d35df5e44cf37eb8be06555.zip
OVMF ResetVector: Modify interface with SEC module
Previously it was: ESI/RSI - SEC Core entry point EDI/RDI - PEI Core entry point EBP/RBP - Start of BFV Now it is: RAX/EAX Initial value of the EAX register (BIST: Built-in Self Test) DI 'BP': boot-strap processor, or 'AP': application processor RBP/EBP Address of Boot Firmware Volume (BFV) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9571 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/ResetVector/SerialDebug.asm')
-rw-r--r--OvmfPkg/ResetVector/SerialDebug.asm46
1 files changed, 32 insertions, 14 deletions
diff --git a/OvmfPkg/ResetVector/SerialDebug.asm b/OvmfPkg/ResetVector/SerialDebug.asm
index 2959fa5450..8c2ffc66d3 100644
--- a/OvmfPkg/ResetVector/SerialDebug.asm
+++ b/OvmfPkg/ResetVector/SerialDebug.asm
@@ -1,6 +1,8 @@
;------------------------------------------------------------------------------
+; @file
+; Serial port debug support macros
;
-; Copyright (c) 2008, Intel Corporation
+; Copyright (c) 2008 - 2009, Intel Corporation
; All rights reserved. This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
@@ -9,18 +11,8 @@
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
-; Module Name:
-;
-; SerialDebug.asm
-;
-; Abstract:
-;
-; Serial port support macros
-;
;------------------------------------------------------------------------------
-BITS 16
-
;//---------------------------------------------
;// UART Register Offsets
;//---------------------------------------------
@@ -88,12 +80,38 @@ BITS 16
out dx, al
%endmacro
-%macro writeToSerialPort 1
+%macro debugShowCharacter 1
waitForSerialTxReady
outToSerialPort 0, %1
%endmacro
-real16InitSerialPort:
+%macro debugShowHexDigit 1
+ %if (%1 < 0xa)
+ debugShowCharacter BYTE ('0' + (%1))
+ %else
+ debugShowCharacter BYTE ('a' + ((%1) - 0xa))
+ %endif
+%endmacro
+
+%macro debugNewline 0
+ debugShowCharacter `\r`
+ debugShowCharacter `\n`
+%endmacro
+
+%macro debugShowPostCode 1
+ debugShowHexDigit (((%1) >> 4) & 0xf)
+ debugShowHexDigit ((%1) & 0xf)
+ debugNewline
+%endmacro
+
+BITS 16
+
+%macro debugInitialize 0
+ jmp real16InitDebug
+real16InitDebugReturn:
+%endmacro
+
+real16InitDebug:
;
; Set communications format
;
@@ -110,5 +128,5 @@ real16InitSerialPort:
;
outToSerialPort LCR_OFFSET, SERIAL_DEFAULT_LCR
- jmp real16SerialPortInitReturn
+ jmp real16InitDebugReturn