From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 5FFC3AC15E4 for ; Thu, 26 Oct 2023 13:53:55 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=RmQiIgTuRHqNXi8/oWSd2pq9FTF/rakyLP5PMd3jSUc=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1698328434; v=1; b=Wwt8JkcQLTM4nZQj0NdxiUs33Tco3fX/VFDI+l3hbw+Lx+gYAp64q6kwp69znx0I8kjNf70k cpaa6AjBtak+wHbbU/HvcJkqj9Ehh2cZzgAjyRt+zaq5h6jLcoajlJnMS9RXFh8ehPH+TUE83k4 GTPrqdIeHK9wx7H19BzURFJQ= X-Received: by 127.0.0.2 with SMTP id SDizYY7687511xNDNmdFuDio; Thu, 26 Oct 2023 06:53:54 -0700 X-Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) by mx.groups.io with SMTP id smtpd.web11.71155.1698328433448353517 for ; Thu, 26 Oct 2023 06:53:53 -0700 X-Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-586abec2c8cso321845eaf.3 for ; Thu, 26 Oct 2023 06:53:53 -0700 (PDT) X-Gm-Message-State: 8k0NQ0QzjDv7hoC1I8DJmxfRx7686176AA= X-Google-Smtp-Source: AGHT+IGNokS1KnwkNMkfmQ2bWRaIVPNEBNjH7OB/VKVqpTIJoGS046SdI/NqUvQxji+ZTMAUo/IHeg== X-Received: by 2002:a05:6870:659e:b0:1dc:723d:b8d0 with SMTP id fp30-20020a056870659e00b001dc723db8d0mr22447582oab.27.1698328432186; Thu, 26 Oct 2023 06:53:52 -0700 (PDT) X-Received: from Belldandy-Slimbook.tail03774.ts.net ([32.221.209.96]) by smtp.gmail.com with ESMTPSA id dg3-20020a056214084300b00656373f9c30sm5226665qvb.75.2023.10.26.06.53.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 06:53:51 -0700 (PDT) From: "Neal Gompa" To: devel@edk2.groups.io Cc: Neal Gompa , Pete Batard , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Gerd Hoffmann , Samer El-Haj-Mahmoud Subject: [edk2-devel] [PATCH] MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform recovery Date: Thu, 26 Oct 2023 09:53:24 -0400 Message-ID: <20231026135324.15914-1-ngompa@fedoraproject.org> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ngompa13@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=Wwt8JkcQ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Neal Gompa Currently, the ReadyToBoot event is only signaled when a formal Boot Manager option is executed (in BmBoot.c -> EfiBootManagerBoot ()). However, the introduction of Platform Recovery in UEFI 2.5 makes it necessary to signal ReadyToBoot when a Platform Recovery boot loader runs because otherwise it may lead to the execution of a boot loader that has similar requirements to a regular one that is not launched as a Boot Manager option. This is especially critical to ensuring that the graphical console is actually usable during platform recovery, as some platforms do rely on the ConsolePrefDxe driver, which only performs console initialization after ReadyToBoot is triggered. This patch fixes that behavior by calling EfiSignalEventReadyToBoot () in EfiBootManagerProcessLoadOption (), which is the function that sets up the platform recovery boot process. The expected behavior has been clarified in the UEFI 2.10 specification to explicitly indicate this behavior is required for correct operation. This is a rebased version of the patch originally written by Pete Batard. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2831 Cc: Pete Batard Cc: Daniel P. Berrangé Cc: Gerd Hoffmann Cc: Samer El-Haj-Mahmoud Co-authored-by: Pete Batard Signed-off-by: Neal Gompa --- MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c index 2087f0b91d..31ed608817 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c @@ -1416,6 +1416,15 @@ EfiBootManagerProcessLoadOption ( return EFI_SUCCESS; } + // + // Signal the EVT_SIGNAL_READY_TO_BOOT event when we are about to load and execute the boot option. + // + EfiSignalEventReadyToBoot (); + // + // Report Status Code to indicate ReadyToBoot was signalled + // + REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT)); + // // Load and start the load option. // -- 2.41.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110104): https://edk2.groups.io/g/devel/message/110104 Mute This Topic: https://groups.io/mt/102200076/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-