From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web11.7262.1592301397669911029 for ; Tue, 16 Jun 2020 02:56:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=at426WCA; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.128.65, mailfrom: pete@akeo.ie) Received: by mail-wm1-f65.google.com with SMTP id r15so2394090wmh.5 for ; Tue, 16 Jun 2020 02:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yLI11IdbLU9rsed0PL0embMq+9/pdK+Zo0qsaB1/8N4=; b=at426WCAGjthKOgflrxfKvnWGjfqXQ3M5aJb5CPBP2crREvJvs/f2mCgTa1m3yAeHY xM5sMkgBExktIavz+5375tUxui1oWHGTOlI6WaG7HT26T5YGUlXD6A1fTaqXbFFUTdb8 8pxd7R2ehBLh0ajlKEUEwyQyycTTJR8ko8DvFRD0Wth7pq3B1hpIiV89G4hL8aSzAE8y oM8R52WpoSOXx9sivCWBPKiya6wUVU2nsMUhhFPRD2L6yc0oyNm8Wfs0uOFjbS02Zz3z 20bd8UkHwbehpv100bxwJihUlpgXOJDQP9imZzPGLSlteXiJAqd40+yHIL+lAy9ie5lv a2UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yLI11IdbLU9rsed0PL0embMq+9/pdK+Zo0qsaB1/8N4=; b=R1Bp16bUXbKZpAhNFfWEo/NScALgwezS6dxsUN8oYMMab0DUP0V3x0+2TNZszxhb38 hLBNDu7wVofQr+LcyiNaDNrls0gDogZa2Z4cJAZEKzEPfBGjBLDgXQJJ5/Fuf5KT+Zsg 0454WlJqrFcPKv4tjXebl3Wo73+/pkUl1khQ1Q3noyB+y1r5s+7Wk8wUH6X97cL4CVE7 OOgQut2F3rMDMzA3wGyvbusPXp/C1KcTpOAxPMrBjiT3lNBN5jPmltTC0BSCDh/2Km9B 5d1Rpt0mlNqpxB7Be9FgVmJegQgIMI9gry7QegUa4COR5xpgG+R01DA8HahMasgnwIpi CCGQ== X-Gm-Message-State: AOAM531dp3nKmpE/MJLHlKk4MDUqQYDrsNdIwCbWcoymXqrEzfUNZ9f8 2g7Qg823PdjI8jE/zfFZzzwuDoVClg6Teg== X-Google-Smtp-Source: ABdhPJzqG1NiF+Qa/QfzKkC10HAvpraw7UAnAatak8mSVwNGyXMCIeulOqCNz8BJO422q+XsPsLdNA== X-Received: by 2002:a05:600c:645:: with SMTP id p5mr2279559wmm.156.1592301395917; Tue, 16 Jun 2020 02:56:35 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.48.247]) by smtp.gmail.com with ESMTPSA id o15sm29113111wrv.48.2020.06.16.02.56.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2020 02:56:35 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: zhichao.gao@intel.com, ray.ni@intel.com, ard.biesheuvel@arm.com, leif@nuviainc.com Subject: [edk2][PATCH 1/1] MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform recovery Date: Tue, 16 Jun 2020 10:56:22 +0100 Message-Id: <20200616095622.2820-2-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200616095622.2820-1-pete@akeo.ie> References: <20200616095622.2820-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently, the ReadyToBoot event is only signaled when a formal Boot Manager option is executed (in BmBoot.c -> EfiBootManagerBoot ()). However, with the introduction of Platform Recovery in UEFI 2.5, which may lead to the execution of a boot loader that has similar requirements to a regular one, yet is not launched as a Boot Manager option, it also becomes necessary to signal ReadyToBoot when a Platform Recovery boot loader runs. Especially, this can be 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 behaviour by calling EfiSignalEventReadyToBoot () in EfiBootManagerProcessLoadOption (), which is the function that sets up the platform recovery boot process. Signed-off-by: Pete Batard --- 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 89372b3b97b8..117f1f5b124c 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c @@ -1376,6 +1376,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.21.0.windows.1