From cef65b2e9382ed4de698d03310bfefe48b374d14 Mon Sep 17 00:00:00 2001 From: Chris Fernald Date: Tue, 14 Nov 2023 17:27:02 -0800 Subject: [PATCH] MdePkg BootManagerPolicy.h: Define GUID for connecting storage devices. Some platforms require connecting storage media while booting to network, or require enumerating storage protocols that were not initially enumerated during BDS. This change adds a GUID to allow implementation of boot manager's ConnectDeviceClass to connect storage media. Signed-off-by: Aaron Pop --- MdePkg/Include/Protocol/BootManagerPolicy.h | 13 +++++++++++++ MdePkg/MdePkg.dec | 2 ++ 2 files changed, 15 insertions(+) diff --git a/MdePkg/Include/Protocol/BootManagerPolicy.h b/MdePkg/Include/Protocol/BootManagerPolicy.h index 13f1a7fcd3..0d3d7567ac 100644 --- a/MdePkg/Include/Protocol/BootManagerPolicy.h +++ b/MdePkg/Include/Protocol/BootManagerPolicy.h @@ -5,6 +5,7 @@ to connect devices using platform policy. Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -31,6 +32,11 @@ 0x113B2126, 0xFC8A, 0x11E3, { 0xBD, 0x6C, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA } \ } +#define EFI_BOOT_MANAGER_POLICY_STORAGE_GUID \ + { \ + 0xCD68FE79, 0xD3CB, 0x436E, { 0xA8, 0x50, 0xF4, 0x43, 0xC8, 0x8C, 0xFB, 0x49 } \ + } + typedef struct _EFI_BOOT_MANAGER_POLICY_PROTOCOL EFI_BOOT_MANAGER_POLICY_PROTOCOL; #define EFI_BOOT_MANAGER_POLICY_PROTOCOL_REVISION 0x00010000 @@ -98,6 +104,12 @@ EFI_STATUS EFI_BOOT_SERVICES.ConnectController(). If the Boot Manager has policy associated with connect all UEFI drivers this policy will be used. + If Class is EFI_BOOT_MANAGER_POLICY_STORAGE_GUID then the Boot Manager will + connect the protocols associated with the discoverable storage disks. This may include + EFI_BLOCK_IO_PROTOCOL, EFI_SIMPLE_FILE_SYSTEM_PROTOCOL, or other storage protocols + appropriate to the device. Some platforms may choose to restrict the connected + devices to exclude USB or other peripherals. + A platform can also define platform specific Class values as a properly generated EFI_GUID would never conflict with this specification. @@ -128,5 +140,6 @@ extern EFI_GUID gEfiBootManagerPolicyProtocolGuid; extern EFI_GUID gEfiBootManagerPolicyConsoleGuid; extern EFI_GUID gEfiBootManagerPolicyNetworkGuid; extern EFI_GUID gEfiBootManagerPolicyConnectAllGuid; +extern EFI_GUID gEfiBootManagerPolicyStorageGuid; #endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 5e476b1331..f4a60e5cc7 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -11,6 +11,7 @@ # Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.
# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
# Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -702,6 +703,7 @@ gEfiBootManagerPolicyConsoleGuid = { 0xCAB0E94C, 0xE15F, 0x11E3, { 0x91, 0x8D, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA }} gEfiBootManagerPolicyNetworkGuid = { 0xD04159DC, 0xE15F, 0x11E3, { 0xB2, 0x61, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA }} gEfiBootManagerPolicyConnectAllGuid = { 0x113B2126, 0xFC8A, 0x11E3, { 0xBD, 0x6C, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA }} + gEfiBootManagerPolicyStorageGuid = { 0xCD68FE79, 0xD3CB, 0x436E, { 0xA8, 0x50, 0xF4, 0x43, 0xC8, 0x8C, 0xFB, 0x49 }} ## Include/Protocol/DevicePath.h gEfiVirtualDiskGuid = { 0x77AB535A, 0x45FC, 0x624B, {0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }}