Introduce a variant of BaseDebugLibSerialPort that behaves correctly with regards to the use of the serial port after ExitBootServices(). At boot time, all DEBUG() prints and ASSERT() invocations are executed normally. At runtime, DEBUG() prints are dropped entirely, and ASSERT()s omit the serial output as well, and only perform the configured post-ASSERT() action, i.e., issue a CPU breakpoint or enter a deadloop. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
22 lines
1.0 KiB
Plaintext
22 lines
1.0 KiB
Plaintext
// /** @file
|
|
// DXE runtime Debug library instance based on Serial Port library.
|
|
// It takes care not to call into SerialPortLib after ExitBootServices() has
|
|
// been called, to prevent touching hardware that is no longer owned by the
|
|
// firmware.
|
|
//
|
|
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
|
//
|
|
// 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
|
|
// http://opensource.org/licenses/bsd-license.php.
|
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
//
|
|
// **/
|
|
|
|
|
|
#string STR_MODULE_ABSTRACT #language en-US "DXE runtime Debug library instance based on Serial Port library"
|
|
|
|
#string STR_MODULE_DESCRIPTION #language en-US "It takes care not to call into SerialPortLib after ExitBootServices() has been called."
|