From nobody Tue May 14 21:41:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+110438+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+110438+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1698773842; cv=none; d=zohomail.com; s=zohoarc; b=Di8fNFNJdC3bDqO/Lm7kgZOPiYZU/WQt+QfxUpOFTFIkZXXqlWnxbucx+5DHcR5XInLCLHEQ5stiySBuruB2RcljwgOEOpwAXjkQeKRi9TIBZlYXxKn2WCdXaZ3dcQPJJN3lrCBSQalX0Z1GHCCXiX7vnTbAGT06NGNo+kd57Bc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698773842; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Sender:Subject:Subject:To:To:Message-Id; bh=yPKOsQTcLe1LUmQGAFYB22UZz1UvHneg4fKpex1xXVQ=; b=LkL1duIOw1CSCWVGorkf2qfafS9XIBIrt2GF/tzT4GrAXBbIteY/x+1kOcXF4E9pHzshu8SI1dF2CDu5c9Zh3JasdbERg6Vnp8AF6U9I3BvjFJxNAGIJtPFHpPQqftcgy/gEx1g6aR5cNL+tsgnpGCTR+ZLT5vN0ZLX1lhWyQ4M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+110438+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1698773842017172.45258099052023; Tue, 31 Oct 2023 10:37:22 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=ld554Rf5u0IsWCr8VshnxTQXr9ufTAwDApHYP/3IUnE=; 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=1698773841; v=1; b=IsaIaIX6wepBAjHCfhPIN4S0jSfxHZYoNzgyxlwR67TOUnwdz8tpXJf4yYt4pMohORgkFHyJ ecoz2HqBNEXg9r4Du7RXCokK6TfFLsLrifQ9Fv+4CUWCfSh1F613HB4X0C4wvFQwNjlWh7x0DAC l1vcTAxJn6iChBcJzByiKFKE= X-Received: by 127.0.0.2 with SMTP id Mx0lYY1788612x4LASnwJiUE; Tue, 31 Oct 2023 10:37:21 -0700 X-Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by mx.groups.io with SMTP id smtpd.web10.2026.1698773840873939950 for ; Tue, 31 Oct 2023 10:37:21 -0700 X-Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-41cd6e1d4fbso37204751cf.1 for ; Tue, 31 Oct 2023 10:37:20 -0700 (PDT) X-Gm-Message-State: aYfFN3QLENHDedKJstjPtuGWx1787277AA= X-Google-Smtp-Source: AGHT+IFB7m09sum5qoBzAg5ffcqi33yIqY+hShXLvzcq/FhNn4Ge1qs8fZ7NxSlBPeRLwfZcsrrHsw== X-Received: by 2002:a05:622a:1047:b0:419:4c70:c54e with SMTP id f7-20020a05622a104700b004194c70c54emr13754672qte.52.1698773839088; Tue, 31 Oct 2023 10:37:19 -0700 (PDT) X-Received: from Belldandy-Slimbook.tail03774.ts.net ([32.221.209.96]) by smtp.gmail.com with ESMTPSA id w26-20020ac84d1a000000b00405502aaf76sm679619qtv.57.2023.10.31.10.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 10:37:18 -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 , Laszlo Ersek Subject: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform recovery Date: Tue, 31 Oct 2023 13:37:00 -0400 Message-ID: <20231031173700.647004-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: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1698773842960100001 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 () when invoking platform recovery, 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=3D2831 Cc: Pete Batard Cc: Daniel P. Berrang=C3=A9 Cc: Gerd Hoffmann Cc: Samer El-Haj-Mahmoud Cc: Laszlo Ersek Co-authored-by: Pete Batard Signed-off-by: Neal Gompa Reviewed-by: Jeremy Linton Reviewed-by: Laszlo Ersek --- .../Library/UefiBootManagerLib/BmLoadOption.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c b/MdeMo= dulePkg/Library/UefiBootManagerLib/BmLoadOption.c index 2087f0b91d..83a2f893e4 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c @@ -1416,6 +1416,17 @@ EfiBootManagerProcessLoadOption ( return EFI_SUCCESS; } =20 + if (LoadOption->OptionType =3D=3D LoadOptionTypePlatformRecovery) { + // + // 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 signaled + // + REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_DXE_BS_DRIVER | E= FI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT)); + } + // // Load and start the load option. // --=20 2.41.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110438): https://edk2.groups.io/g/devel/message/110438 Mute This Topic: https://groups.io/mt/102302654/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-