public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, lersek@redhat.com,
	liming.gao@intel.com, michael.d.kinney@intel.com,
	afish@apple.com, star.zeng@intel.com, ruiyu.ni@intel.com,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH edk2-platforms v2 0/2] Create UART DebugLib implementation for runtime drivers
Date: Thu, 22 Feb 2018 16:28:20 +0000	[thread overview]
Message-ID: <20180222162822.22703-1-ard.biesheuvel@linaro.org> (raw)

Commit 4bf95a9f361e ("MdeModulePkg/ResetSystemRuntimeDxe: Add more debug
message") broke the DEBUG build for systems using a MMIO mapped UART for
DEBUG output. In other words, it broke the build for all ARM and AARCH64
systems, given that port I/O does not exist on those architectures.

Instead of patching it up locally, let's fix this issue once and for all,
by creating a UART DebugLib implementation for DXE_RUNTIME_DRIVER modules
that does the right thing by default.

v2:
- incorporate Laszlo's feedback into patch #1
- add Laszlo's R-b to patch #2
- dropped patch #3 that blacklists the original BASE implementation for
  DXE_RUNTIME_DRIVER modules

Note that I retained the deadloop/breakpoint code for ASSERT()s at runtime.
I think it is perfectly reasonable behavior for a DEBUG build at runtime,
even if other cores may be up and running as well: the purpose of these
facilities is to allow a debugger to attach to the CPU to figure out what
has happened, and both deadloops and breakpoints can achieve that just
fine even at runtime.

Ard Biesheuvel (2):
  MdePkg: introduce DxeRuntimeDebugLibSerialPort
  ArmVirtPkg: switch to DXE runtime version of DebugLib where
    appropriate

 ArmVirtPkg/ArmVirt.dsc.inc                                                   |   3 +
 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c                       | 373 ++++++++++++++++++++
 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf |  56 +++
 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.uni |  21 ++
 4 files changed, 453 insertions(+)
 create mode 100644 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c
 create mode 100644 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
 create mode 100644 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.uni

-- 
2.11.0



             reply	other threads:[~2018-02-22 16:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 16:28 Ard Biesheuvel [this message]
2018-02-22 16:28 ` [PATCH edk2-platforms v2 1/2] MdePkg: introduce DxeRuntimeDebugLibSerialPort Ard Biesheuvel
2018-02-22 17:45   ` Ard Biesheuvel
2018-02-22 17:46   ` Kinney, Michael D
2018-02-22 17:50     ` Ard Biesheuvel
2018-02-22 18:26       ` Laszlo Ersek
2018-02-22 18:15   ` Laszlo Ersek
2018-02-22 16:28 ` [PATCH edk2-platforms v2 2/2] ArmVirtPkg: switch to DXE runtime version of DebugLib where appropriate Ard Biesheuvel

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=20180222162822.22703-1-ard.biesheuvel@linaro.org \
    --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