From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.groups.io with SMTP id smtpd.web10.615.1590528297962976710 for ; Tue, 26 May 2020 14:24:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=xdLennhV; spf=pass (domain: nuviainc.com, ip: 209.85.128.67, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f67.google.com with SMTP id n5so1072686wmd.0 for ; Tue, 26 May 2020 14:24:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ctzsfNVRQnlXD8VymuOjUY8pkUX4tYFvN+HHioqwY7o=; b=xdLennhVvULe1d5cs6U15Q9ZuYTR0hvvKX+WFW+uz31fT4wwvpj1h3N8P8o+dm/n6y A1fCDFhHdZhw/lqStVCnMkyMP6+PuxEApmi9Jhwn9uwE6I8qYg5xh6RHV0QdvBDkAJZC AaQM51/mLopoF3ggECb0ixFcJK77wv1K0NoUesR5xd0RMLnPm0hh9cZxuXIoX3qDf9Di /IBLpELuZYqxCWP7tGlQ3F6TgQovgw/c6rlByjO5ZVuK51yZd/G8zil/5dWqt9nz/Xpa lGdGwXIYfztU0Ta2KnxXTWGRc/LpVYVrcIR6NkrLsi+Ny7pn2tRikQPGWslgewa49Xwj 1xCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ctzsfNVRQnlXD8VymuOjUY8pkUX4tYFvN+HHioqwY7o=; b=Y4K5ALDHC3VAjrGxSkIY9km35MYOvK/JbUTIF82oN3QvzhnfrINIcKqQKu/3O7i4nT naRrf02uMB/jjm2p6rKiGry0s93qkhM/A0vbzWHOVh2S0k6e7orcHLUtO5Cz+TeBcU4w emtesEonlH89F3xReSE1zRCulXgpNxKnWjJ9KG/1Fqk80E+0ffCT0y4j7Oqre4cOXlu/ 65bpaQKJGMfSp8vbh5MmwwEihxZTZbVJY5DrWPtvBNsndQ1WBPtHjzO2jz6ZfpZ/pw+J aNRsgzDfdOErooN0iKOffHDlyRfgBg1c49GAnn62P9ItCGl7QKBB60tisCPHxiB2eXqa wWWQ== X-Gm-Message-State: AOAM533EmdpGXbA+2cv25PbYyCWRJcw+Sxd7U3MAID7QFe3fwUHC8TSg LX41NelqqxL2OicvlrPLJrfAe3XqRc4LAu6JR2jfugNUCy25xvPRk02weU2V7G/tGkob1AEEjoq 7W5hyw3Y59U2kYqg6MofM6c9Ubd7P50yd+I9LSwJt4jI7vippvjEQ5+4pzFnjJA96Dg== X-Google-Smtp-Source: ABdhPJxGiJi61GgjuwKRouHvxTB+BKiCvEMHYwoZQK6I/DaslSfXFnZI6ZJF6jpWLStDim4uqh7ExA== X-Received: by 2002:a1c:9e8a:: with SMTP id h132mr1078192wme.32.1590528296209; Tue, 26 May 2020 14:24:56 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id q5sm742335wmq.36.2020.05.26.14.24.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 14:24:55 -0700 (PDT) Date: Tue, 26 May 2020 22:24:53 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, ard.biesheuvel@arm.com Cc: jon@solid-run.com Subject: Re: [edk2-devel] [PATCH 2/5] ArmPkg/PlatformBootManagerLib: fall back to the UiApp on boot failure Message-ID: <20200526212453.GT1923@vanye> References: <20200526161359.4810-1-ard.biesheuvel@arm.com> <20200526161359.4810-3-ard.biesheuvel@arm.com> MIME-Version: 1.0 In-Reply-To: <20200526161359.4810-3-ard.biesheuvel@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 26, 2020 at 18:13:56 +0200, Ard Biesheuvel wrote: > As a last resort, drop into the UiApp application when no active boot > options could be started. Doing so will connect all devices, and so > it will allow the user to enter the Boot Manager submenu and pick a > network or removable disk option. With the right UiApp library added > in, the UiApp also gives access to the UEFI Shell. > > Signed-off-by: Ard Biesheuvel > --- > ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > index 23c925bbdb9c..f91f7cd09ca1 100644 > --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > @@ -830,5 +830,19 @@ PlatformBootManagerUnableToBoot ( > VOID > ) > { > - return; > + EFI_STATUS Status; > + EFI_BOOT_MANAGER_LOAD_OPTION BootManagerMenu; > + > + // > + // BootManagerMenu doesn't contain the correct information when return status > + // is EFI_NOT_FOUND. > + // > + Status = EfiBootManagerGetBootManagerMenu (&BootManagerMenu); > + if (EFI_ERROR (Status)) { Nitpick: comment explicitly mentions EFI_NOT_FOUND, but code checks for any EFI_ERROR match. Since there are various other error codes that could be returned, change the comment to "when return status is not EFI_SUCCESS"? / Leif > + return; > + } > + > + for (;;) { > + EfiBootManagerBoot (&BootManagerMenu); > + } > } > -- > 2.17.1 > > > >