--- /dev/null
+/** @file\r
+ Boot Manager Policy Protocol as defined in UEFI Specification.\r
+\r
+ This protocol is used by EFI Applications to request the UEFI Boot Manager\r
+ to connect devices using platform policy.\r
+\r
+ Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+**/\r
+\r
+#ifndef __BOOT_MANAGER_POLICY_H__\r
+#define __BOOT_MANAGER_POLICY_H__\r
+\r
+#define EFI_BOOT_MANAGER_POLICY_PROTOCOL_GUID \\r
+ { \\r
+ 0xFEDF8E0C, 0xE147, 0x11E3, { 0x99, 0x03, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA } \\r
+ }\r
+\r
+#define EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID \\r
+ { \\r
+ 0xCAB0E94C, 0xE15F, 0x11E3, { 0x91, 0x8D, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA } \\r
+ }\r
+\r
+#define EFI_BOOT_MANAGER_POLICY_NETWORK_GUID \\r
+ { \\r
+ 0xD04159DC, 0xE15F, 0x11E3, { 0xB2, 0x61, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA } \\r
+ }\r
+\r
+#define EFI_BOOT_MANAGER_POLICY_CONNECT_ALL_GUID \\r
+ { \\r
+ 0x113B2126, 0xFC8A, 0x11E3, { 0xBD, 0x6C, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA } \\r
+ }\r
+\r
+typedef struct _EFI_BOOT_MANAGER_POLICY_PROTOCOL EFI_BOOT_MANAGER_POLICY_PROTOCOL;\r
+\r
+#define EFI_BOOT_MANAGER_POLICY_PROTOCOL_REVISION 0x00010000\r
+\r
+/**\r
+ Connect a device path following the platforms EFI Boot Manager policy.\r
+\r
+ The ConnectDevicePath() function allows the caller to connect a DevicePath using the\r
+ same policy as the EFI Boot Manger.\r
+\r
+ @param[in] This A pointer to the EFI_BOOT_MANAGER_POLICY_PROTOCOL instance.\r
+ @param[in] DevicePath Points to the start of the EFI device path to connect.\r
+ If DevicePath is NULL then all the controllers in the\r
+ system will be connected using the platforms EFI Boot\r
+ Manager policy.\r
+ @param[in] Recursive If TRUE, then ConnectController() is called recursively\r
+ until the entire tree of controllers below the \r
+ controller specified by DevicePath have been created.\r
+ If FALSE, then the tree of controllers is only expanded\r
+ one level. If DevicePath is NULL then Recursive is ignored.\r
+\r
+ @retval EFI_SUCCESS The DevicePath was connected.\r
+ @retval EFI_NOT_FOUND The DevicePath was not found.\r
+ @retval EFI_NOT_FOUND No driver was connected to DevicePath.\r
+ @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device \r
+ drivers on the DevicePath.\r
+ @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_PATH)(\r
+ IN EFI_BOOT_MANAGER_POLICY_PROTOCOL *This,\r
+ IN EFI_DEVICE_PATH *DevicePath,\r
+ IN BOOLEAN Recursive\r
+ );\r
+\r
+/**\r
+ Connect a class of devices using the platform Boot Manager policy.\r
+\r
+ The ConnectDeviceClass() function allows the caller to request that the Boot\r
+ Manager connect a class of devices.\r
+\r
+ If Class is EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID then the Boot Manager will\r
+ use platform policy to connect consoles. Some platforms may restrict the \r
+ number of consoles connected as they attempt to fast boot, and calling\r
+ ConnectDeviceClass() with a Class value of EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID\r
+ must connect the set of consoles that follow the Boot Manager platform policy,\r
+ and the EFI_SIMPLE_TEXT_INPUT_PROTOCOL, EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL, and\r
+ the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL are produced on the connected handles.\r
+ The Boot Manager may restrict which consoles get connect due to platform policy,\r
+ for example a security policy may require that a given console is not connected.\r
+\r
+ If Class is EFI_BOOT_MANAGER_POLICY_NETWORK_GUID then the Boot Manager will\r
+ connect the protocols the platforms supports for UEFI general purpose network\r
+ applications on one or more handles. If more than one network controller is\r
+ available a platform will connect, one, many, or all of the networks based\r
+ on platform policy. Connecting UEFI networking protocols, like EFI_DHCP4_PROTOCOL,\r
+ does not establish connections on the network. The UEFI general purpose network\r
+ application that called ConnectDeviceClass() may need to use the published\r
+ protocols to establish the network connection. The Boot Manager can optionally\r
+ have a policy to establish a network connection.\r
+ \r
+ If Class is EFI_BOOT_MANAGER_POLICY_CONNECT_ALL_GUID then the Boot Manager\r
+ will connect all UEFI drivers using the UEFI Boot Service\r
+ EFI_BOOT_SERVICES.ConnectController(). If the Boot Manager has policy\r
+ associated with connect all UEFI drivers this policy will be used.\r
+\r
+ A platform can also define platform specific Class values as a properly generated\r
+ EFI_GUID would never conflict with this specification.\r
+\r
+ @param[in] This A pointer to the EFI_BOOT_MANAGER_POLICY_PROTOCOL instance.\r
+ @param[in] Class A pointer to an EFI_GUID that represents a class of devices\r
+ that will be connected using the Boot Mangers platform policy.\r
+\r
+ @retval EFI_SUCCESS At least one devices of the Class was connected.\r
+ @retval EFI_DEVICE_ERROR Devices were not connected due to an error.\r
+ @retval EFI_NOT_FOUND The Class is not supported by the platform.\r
+ @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.\r
+**/ \r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_CLASS)(\r
+ IN EFI_BOOT_MANAGER_POLICY_PROTOCOL *This,\r
+ IN EFI_GUID *Class\r
+ );\r
+\r
+struct _EFI_BOOT_MANAGER_POLICY_PROTOCOL {\r
+ UINT64 Revision;\r
+ EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_PATH ConnectDevicePath;\r
+ EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_CLASS ConnectDeviceClass;\r
+};\r
+\r
+extern EFI_GUID gEfiBootManagerPolicyProtocolGuid;\r
+\r
+extern EFI_GUID gEfiBootManagerPolicyConsoleGuid;\r
+extern EFI_GUID gEfiBootManagerPolicyNetworkGuid;\r
+extern EFI_GUID gEfiBootManagerPolicyConnectAllGuid;\r
+\r
+#endif\r
## Include/Guid/SmBios.h\r
gEfiSmbios3TableGuid = { 0xF2FD1544, 0x9794, 0x4A2C, { 0x99, 0x2E, 0xE5, 0xBB, 0xCF, 0x20, 0xE3, 0x94 }}\r
\r
+ ## Include/Protocol/BootManagerPolicy.h\r
+ gEfiBootManagerPolicyConsoleGuid = { 0xCAB0E94C, 0xE15F, 0x11E3, { 0x91, 0x8D, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA }}\r
+ gEfiBootManagerPolicyNetworkGuid = { 0xD04159DC, 0xE15F, 0x11E3, { 0xB2, 0x61, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA }}\r
+ gEfiBootManagerPolicyConnectAllGuid = { 0x113B2126, 0xFC8A, 0x11E3, { 0xBD, 0x6C, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA }}\r
+\r
#\r
# GUID defined in PI1.0\r
#\r
## Include/Protocol/RegularExpressionProtocol.h\r
gEfiRegularExpressionProtocolGuid = { 0xB3F79D9A, 0x436C, 0xDC11, {0xB0, 0x52, 0xCD, 0x85, 0xDF, 0x52, 0x4C, 0xE6 }}\r
\r
+ ## Include/Protocol/BootManagerPolicy.h\r
+ gEfiBootManagerPolicyProtocolGuid = { 0xfedf8e0c, 0xe147, 0x11e3, { 0x99, 0x03, 0xb8, 0xe8, 0x56, 0x2c, 0xba, 0xfa }}\r
+\r
#\r
# [Error.gEfiMdePkgTokenSpaceGuid]\r
# 0x80000001 | Invalid value provided.\r