From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 061092034C5D9 for ; Wed, 22 Nov 2017 15:54:38 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 98B4E37E87; Wed, 22 Nov 2017 23:58:54 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-45.rdu2.redhat.com [10.10.120.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFC2C4A1; Wed, 22 Nov 2017 23:58:52 +0000 (UTC) From: Laszlo Ersek To: edk2-devel-01 Cc: Anthony Perard , Ard Biesheuvel , Eric Dong , Jordan Justen , Julien Grall , Ruiyu Ni , Star Zeng Date: Thu, 23 Nov 2017 00:58:44 +0100 Message-Id: <20171122235849.4177-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 22 Nov 2017 23:58:54 +0000 (UTC) Subject: [PATCH 0/5] MdeModulePkg, OvmfPkg: more easily visible boot progress reporting X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2017 23:54:39 -0000 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 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 . 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 Cc: Ard Biesheuvel Cc: Eric Dong Cc: Jordan Justen Cc: Julien Grall Cc: Ruiyu Ni Cc: Star Zeng 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