From: "Erdem Aktas via groups.io" <erdemaktas=google.com@groups.io>
To: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
devel@edk2.groups.io, Oliver Steffen <osteffen@redhat.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Laszlo Ersek <lersek@redhat.com>,
Michael Roth <michael.roth@amd.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Min Xu <min.m.xu@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/ResetVector: send post codes to qemu debug console
Date: Fri, 26 Jan 2024 17:17:03 -0800 [thread overview]
Message-ID: <CAAYXXYw-ovcpc_FSsN6O6H=7er0n6e5JYsP4cCYysOGF2WGjVQ@mail.gmail.com> (raw)
In-Reply-To: <65d6a640-9e5c-85b8-2cc1-55cd0cde338a@amd.com>
On Fri, Jan 26, 2024 at 8:16 AM Tom Lendacky <thomas.lendacky@amd.com> wrote:
>
> On 1/26/24 08:29, Gerd Hoffmann wrote:
> > Neat when doing ResetVector coding.
> > Incompatible with TDX and SEV, therefore not enabled by default.
> >
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>
> Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
>
Acked-by: Erdem Aktas <erdemaktas@google.com>
>
> > ---
> > OvmfPkg/ResetVector/QemuDebugCon.asm | 35 +++++++++++++++++++++++++++
> > OvmfPkg/ResetVector/ResetVector.nasmb | 4 +++
> > 2 files changed, 39 insertions(+)
> > create mode 100644 OvmfPkg/ResetVector/QemuDebugCon.asm
> >
> > diff --git a/OvmfPkg/ResetVector/QemuDebugCon.asm b/OvmfPkg/ResetVector/QemuDebugCon.asm
> > new file mode 100644
> > index 000000000000..e385ca1be83a
> > --- /dev/null
> > +++ b/OvmfPkg/ResetVector/QemuDebugCon.asm
> > @@ -0,0 +1,35 @@
> > +;------------------------------------------------------------------------------
> > +; @file
> > +; qemu debug console support macros (based on serial port macros)
> > +;
> > +; Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
> > +; SPDX-License-Identifier: BSD-2-Clause-Patent
> > +;
> > +;------------------------------------------------------------------------------
> > +
> > +%macro debugShowCharacter 1
> > + mov dx, 0x402
> > + mov al, %1
> > + out dx, al
> > +%endmacro
> > +
> > +%macro debugShowHexDigit 1
> > + %if (%1 < 0xa)
> > + debugShowCharacter BYTE ('0' + (%1))
> > + %else
> > + debugShowCharacter BYTE ('a' + ((%1) - 0xa))
> > + %endif
> > +%endmacro
> > +
> > +%macro debugShowPostCode 1
> > + debugShowHexDigit (((%1) >> 4) & 0xf)
> > + debugShowHexDigit ((%1) & 0xf)
> > + debugShowCharacter `\r`
> > + debugShowCharacter `\n`
> > +%endmacro
> > +
> > +BITS 16
> > +
> > +%macro debugInitialize 0
> > + ; not required
> > +%endmacro
> > diff --git a/OvmfPkg/ResetVector/ResetVector.nasmb b/OvmfPkg/ResetVector/ResetVector.nasmb
> > index 5832aaa8abf7..69ce43ef6a96 100644
> > --- a/OvmfPkg/ResetVector/ResetVector.nasmb
> > +++ b/OvmfPkg/ResetVector/ResetVector.nasmb
> > @@ -40,6 +40,10 @@
> > %include "Port80Debug.asm"
> > %elifdef DEBUG_SERIAL
> > %include "SerialDebug.asm"
> > +%elif 0
> > +; Set ^ this to 1 to enable postcodes on the qemu debug console.
> > +; Disabled by default because it is incompatible with SEV and TDX.
> > + %include "QemuDebugCon.asm"
> > %else
> > %include "DebugDisabled.asm"
> > %endif
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114646): https://edk2.groups.io/g/devel/message/114646
Mute This Topic: https://groups.io/mt/103976858/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-01-27 1:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-26 14:29 [edk2-devel] [PATCH v2 1/1] OvmfPkg/ResetVector: send post codes to qemu debug console Gerd Hoffmann
2024-01-26 16:16 ` Lendacky, Thomas via groups.io
2024-01-27 1:17 ` Erdem Aktas via groups.io [this message]
2024-01-29 12:11 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAYXXYw-ovcpc_FSsN6O6H=7er0n6e5JYsP4cCYysOGF2WGjVQ@mail.gmail.com' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox