diff options
author | Laszlo Ersek <lersek@redhat.com> | 2017-11-22 21:37:07 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2019-02-25 11:51:22 +0100 |
commit | 77874ceebb118cd58f518cbf6bcb63f47c993ec0 (patch) | |
tree | 4fb5638116a1de3d0fe2267ddd3f98074adb169a /OvmfPkg/Include/Library | |
parent | 5cc67962ec35579df67e603b4446557fe1243d51 (diff) | |
download | edk2-77874ceebb118cd58f518cbf6bcb63f47c993ec0.zip edk2-77874ceebb118cd58f518cbf6bcb63f47c993ec0.tar.gz edk2-77874ceebb118cd58f518cbf6bcb63f47c993ec0.tar.bz2 |
OvmfPkg: add library to track boot option loading/starting on the console
Introduce the Platform Boot Manager Print Status Code Library (for short,
PlatformBmPrintScLib) class for catching and printing the LoadImage() /
StartImage() preparations, and return statuses, that are reported by
UefiBootManagerLib.
In the primary library instance, catch only such status codes that
UefiBootManagerLib reports from the same module that contains
PlatformBmPrintScLib. The intent is to establish a reporting-printing
channel within BdsDxe, between UefiBootManagerLib and
PlatformBmPrintScLib. Ignore status codes originating elsewhence, e.g.
from UiApp's copy of UefiBootManagerLib.
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien.grall@linaro.org>
Cc: Ray Ni <ray.ni@intel.com>
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1515418
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'OvmfPkg/Include/Library')
-rw-r--r-- | OvmfPkg/Include/Library/PlatformBmPrintScLib.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/OvmfPkg/Include/Library/PlatformBmPrintScLib.h b/OvmfPkg/Include/Library/PlatformBmPrintScLib.h new file mode 100644 index 0000000..1777f9d --- /dev/null +++ b/OvmfPkg/Include/Library/PlatformBmPrintScLib.h @@ -0,0 +1,41 @@ +/** @file
+ Register a status code handler for printing the Boot Manager's LoadImage()
+ and StartImage() preparations, and return codes, to the UEFI console.
+
+ This feature enables users that are not accustomed to analyzing the firmware
+ log to glean some information about UEFI boot option processing (loading and
+ starting).
+
+ Copyright (C) 2019, Red Hat, Inc.
+
+ 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.
+**/
+
+#ifndef __PLATFORM_BM_PRINT_SC_LIB__
+#define __PLATFORM_BM_PRINT_SC_LIB__
+
+#include <Uefi/UefiBaseType.h>
+
+/**
+ Register a status code handler for printing the Boot Manager's LoadImage()
+ and StartImage() preparations, and return codes, to the UEFI console.
+
+ @retval EFI_SUCCESS The status code handler has been successfully
+ registered.
+
+ @return Error codes propagated from boot services and from
+ EFI_RSC_HANDLER_PROTOCOL.
+**/
+EFI_STATUS
+EFIAPI
+PlatformBmPrintScRegisterHandler (
+ VOID
+ );
+
+#endif // __PLATFORM_BM_PRINT_SC_LIB__
|