From: "Benjamin Doron" <benjamin.doron00@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>,devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH 00/12] Introduce Bootlog DEBUG() output
Date: Wed, 01 Jun 2022 09:58:40 -0700 [thread overview]
Message-ID: <30076.1654102720972535874@groups.io> (raw)
In-Reply-To: <20220601093352.hx4w447n7myc7re6@sirius.home.kraxel.org>
[-- Attachment #1: Type: text/plain, Size: 1928 bytes --]
On Wed, Jun 1, 2022 at 05:33 AM, Gerd Hoffmann wrote:
>
> Hmm. Maybe it's time to tackle the log performance problem for virtual
> machines? Create a debug log device with DMA support, so we don't need
> a vmexit for every single character we want log?
Of course, that doesn't work for native systems. I don't know how other developers perform debugging (possibly via a serial port), but I developed a library stack similar to this one to help me with GSoC last year ( https://github.com/benjamindoron/edk2/commit/db888a928c1c6fc94f6a7670f3402718c10c01d2 ). It's WIP, modelled after the simple coreboot ringbuffer and is missing tracing facilities.
Regardless, having a true complement to PcdStatusCodeUseSerial would often be helpful, I suspect (presently, PcdStatusCodeUseMemory only logs the PI status code for the debug messages).
>
> How does that relate to coreboot? coreboot has logging-to-memory too.
> Not sure what the state is, there have been discussions on the coreboot
> list about changing that from a pure text log to something structed with
> timestamps a while back. Don't know whenever this did actually happen.
>
> So, when adding logging-to-memory to edk2 it surely make sense to
> coordinate that with coreboot, so we'll have both coreboot and edk2 logs
> there in case edk2 runs as coreboot payload.
I'm working on getting a SerialPortLib that logs to CBMEM merged. It's on the list at the moment.
Some comments on DebugLibBootlog:
- It's possible to support ASSERTs. If PcdDebugPropertyMask & 0x31 == 0x01, then non-fatal ASSERTs are logged. As a DebugLib, this would require handling in `DebugAssert()`.
- SMM-phase logging can be implemented, but I'm not convinced that sharing DXE's buffer is entirely safe. Using SMM communicate could be safer, but would be more complicated. I stopped working on it when the return-on-investment was too low.
Regards,
Benjamin
[-- Attachment #2: Type: text/html, Size: 2157 bytes --]
next prev parent reply other threads:[~2022-06-01 16:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 2:43 [PATCH 00/12] Introduce Bootlog DEBUG() output Alexander Graf
2022-05-27 2:43 ` [PATCH 01/12] MdePkg: Add DebugBootlog header Alexander Graf
2022-05-27 2:43 ` [PATCH 02/12] MdePkg: Add Null BaseDebugBootlog Alexander Graf
2022-05-27 2:43 ` [PATCH 03/12] MdePkg: Add Fallback timer support for BaseDebugBootlog Alexander Graf
2022-05-27 2:43 ` [PATCH 04/12] MdePkg: Add X86 " Alexander Graf
2022-05-27 2:43 ` [PATCH 05/12] MdePkg: Add ARM " Alexander Graf
2022-05-27 2:43 ` [PATCH 06/12] MdePkg: Add Pei phase BaseDebugBootlog Alexander Graf
2022-05-27 2:43 ` [PATCH 07/12] MdePkg: Add Dxe " Alexander Graf
2022-05-27 2:43 ` [PATCH 08/12] MdePkg: Add BaseDebugLibBootlog Alexander Graf
2022-05-27 2:43 ` [PATCH 09/12] Scripts: Add bootlog decyphering script Alexander Graf
2022-05-27 2:43 ` [PATCH 10/12] BaseDebugLibSerialPort: Include BaseDebugBootlog in all dscs Alexander Graf
2022-05-27 2:43 ` [PATCH 11/12] BaseDebugLibSerialPort: Emit messages to boot log Alexander Graf
2022-05-27 2:43 ` [PATCH 12/12] OvmfPkg/PlatformDebugLibIoPort: Add Bootlog support Alexander Graf
2022-06-01 9:33 ` [edk2-devel] [PATCH 00/12] Introduce Bootlog DEBUG() output Gerd Hoffmann
2022-06-01 16:58 ` Benjamin Doron [this message]
2022-06-02 8:35 ` Gerd Hoffmann
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=30076.1654102720972535874@groups.io \
--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