Re: [edk2-devel] [PATCH 3/5] ArmPkg/PlatformBootManagerLib: hide UEFI Shell as a regular boot option

2020-05-27 Thread Laszlo Ersek
On 05/26/20 18:13, Ard Biesheuvel wrote:
> Without ConnectAll() being called on the boot path, the UEFI shell will
> be entered with no block devices or anything else connected, and so for
> the novice user, this is not a very accommodating environment. Now that
> we have made the UiApp the last resort when on boot failure, and made
> the UEFI Shell accessible directly via the 's hotkey if you really need
> it, let's hide it as an ordinary boot option.
> 
> Signed-off-by: Ard Biesheuvel 
> ---
>  ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c 
> b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> index f91f7cd09ca1..b465f9ff388f 100644
> --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> @@ -778,7 +778,7 @@ PlatformBootManagerAfterConsole (
>Key.ScanCode = SCAN_NULL;
>Key.UnicodeChar  = L's';
>PlatformRegisterFvBootOption (
> -&gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE, &Key
> +&gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_HIDDEN, &Key
>  );
>  }
>  
> 

This is a policy decision for ArmPkg/PlatformBootManagerLib, which
affects ArmVirtXen and probably a number of physical ARM platforms. I'm
OK with that.

This patch does two things (which I don't mean as a request to split the
patch), it clears LOAD_OPTION_ACTIVE, and sets LOAD_OPTION_HIDDEN. From
the spec:

- "If a load option is marked as LOAD_OPTION_ACTIVE, the boot manager
will attempt to boot automatically using the device path information in
the load option. This provides an easy way to disable or enable load
options without needing to delete and re-add them."

- "If any Boot load option is marked as LOAD_OPTION_HIDDEN, then the
load option will not appear in the menu (if any) provided by the boot
manager for load option selection."

So this change will both stop auto-booting the shell, and hide it from
the UiApp menu. I'm OK with that. (Maybe add this one sentence to the
commit message.)

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60359): https://edk2.groups.io/g/devel/message/60359
Mute This Topic: https://groups.io/mt/74481037/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 3/5] ArmPkg/PlatformBootManagerLib: hide UEFI Shell as a regular boot option

2020-05-26 Thread Leif Lindholm
On Tue, May 26, 2020 at 18:13:57 +0200, Ard Biesheuvel wrote:
> Without ConnectAll() being called on the boot path, the UEFI shell will
> be entered with no block devices or anything else connected, and so for
> the novice user, this is not a very accommodating environment. Now that
> we have made the UiApp the last resort when on boot failure, and made
> the UEFI Shell accessible directly via the 's hotkey if you really need

Typo 's -> 's'.

/
Leif

> it, let's hide it as an ordinary boot option.
> 
> Signed-off-by: Ard Biesheuvel 
> ---
>  ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c 
> b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> index f91f7cd09ca1..b465f9ff388f 100644
> --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> @@ -778,7 +778,7 @@ PlatformBootManagerAfterConsole (
>Key.ScanCode = SCAN_NULL;
>Key.UnicodeChar  = L's';
>PlatformRegisterFvBootOption (
> -&gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE, &Key
> +&gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_HIDDEN, &Key
>  );
>  }
>  
> -- 
> 2.17.1
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60299): https://edk2.groups.io/g/devel/message/60299
Mute This Topic: https://groups.io/mt/74481037/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-