[edk2] [PATCH 0/5] MdeModulePkg, OvmfPkg: more easily visible boot progress reporting

Laszlo Ersek posted 5 patches 6 years, 4 months ago
Failed in applying to current master (apply log)
MdeModulePkg/MdeModulePkg.dec                                     |   9 +
MdeModulePkg/MdeModulePkg.uni                                     |   7 +
OvmfPkg/OvmfPkgIa32.dsc                                           |   7 +
OvmfPkg/OvmfPkgIa32X64.dsc                                        |   7 +
OvmfPkg/OvmfPkgX64.dsc                                            |   7 +
MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf    |   2 +
OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |   4 +
MdeModulePkg/Include/Guid/StatusCodeDataTypeOsLoaderDetail.h      | 109 +++++++
MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h              |  84 ++++++
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h              |  15 +
MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c                  |  51 +++-
MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c                  | 166 +++++++++++
MdeModulePkg/Universal/BdsDxe/BdsEntry.c                          |  60 +++-
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c              |   8 +
OvmfPkg/Library/PlatformBootManagerLib/StatusCodeHandler.c        | 298 ++++++++++++++++++++
15 files changed, 828 insertions(+), 6 deletions(-)
create mode 100644 MdeModulePkg/Include/Guid/StatusCodeDataTypeOsLoaderDetail.h
create mode 100644 OvmfPkg/Library/PlatformBootManagerLib/StatusCodeHandler.c
[edk2] [PATCH 0/5] MdeModulePkg, OvmfPkg: more easily visible boot progress reporting
Posted by Laszlo Ersek 6 years, 4 months ago
Repo:   https://github.com/lersek/edk2.git
Branch: boot_diags

The point of this series is to communicate OVMF boot progress and boot
failure in a way that is easier to consume for users who aren't versed
in OVMF debug log capturing and analysis. This means that we have to
write stuff about booting to the system console.

(Please read <https://bugzilla.redhat.com/show_bug.cgi?id=1515418> as
well about our use case.)

Patch #1 makes the

   DEBUG ((EFI_D_ERROR, "[Bds] Unable to boot!\n"));
   CpuDeadLoop ();

part in BdsDxe more friendly, by printing a similar message to the
console, and entering the boot manager menu after a keypress. This was
suggested by Ray earlier; please refer to
<https://bugzilla.tianocore.org/show_bug.cgi?id=513>.

Patches #2 through #4 introduce a new, structured, status code for the
reporting and routing/handling infrastructure. UefiBootManagerLib should
not write directly to the console -- it already only logs DEBUGs and
reports status codes --, but we should emit more detailed information in
status codes than we currently do. OVMF's PlatformBds is modified to
catch these status codes and print them to the console. Other platforms
are not affected (beyond any catch-all handlers picking up the new
status codes, if EFI_DEBUG_CODE reporting is enabled).

Patch #5 makes sure that RELEASE builds of OVMF are also not affected,
by clearing EFI_DEBUG_CODE reporting in those builds.

Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien.grall@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>

Thanks
Laszlo

Laszlo Ersek (5):
  MdeModulePkg/BdsDxe: fall back to a Boot Manager Menu loop before
    hanging
  MdeModulePkg: introduce the EDKII_OS_LOADER_DETAIL status code payload
  MdeModulePkg/UefiBootManagerLib: report EDKII_OS_LOADER_DETAIL status
    code
  OvmfPkg/PlatformBootManagerLib: print EDKII_OS_LOADER_DETAIL to ConOut
  OvmfPkg: disable EFI_DEBUG_CODE reporting in RELEASE builds

 MdeModulePkg/MdeModulePkg.dec                                     |   9 +
 MdeModulePkg/MdeModulePkg.uni                                     |   7 +
 OvmfPkg/OvmfPkgIa32.dsc                                           |   7 +
 OvmfPkg/OvmfPkgIa32X64.dsc                                        |   7 +
 OvmfPkg/OvmfPkgX64.dsc                                            |   7 +
 MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf    |   2 +
 OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |   4 +
 MdeModulePkg/Include/Guid/StatusCodeDataTypeOsLoaderDetail.h      | 109 +++++++
 MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h              |  84 ++++++
 OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h              |  15 +
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c                  |  51 +++-
 MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c                  | 166 +++++++++++
 MdeModulePkg/Universal/BdsDxe/BdsEntry.c                          |  60 +++-
 OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c              |   8 +
 OvmfPkg/Library/PlatformBootManagerLib/StatusCodeHandler.c        | 298 ++++++++++++++++++++
 15 files changed, 828 insertions(+), 6 deletions(-)
 create mode 100644 MdeModulePkg/Include/Guid/StatusCodeDataTypeOsLoaderDetail.h
 create mode 100644 OvmfPkg/Library/PlatformBootManagerLib/StatusCodeHandler.c

-- 
2.14.1.3.gb7cf6e02401b

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel