]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/BootManagerPolicy.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Protocol / BootManagerPolicy.h
CommitLineData
b9eb59f8
RN
1/** @file\r
2 Boot Manager Policy Protocol as defined in UEFI Specification.\r
3\r
4 This protocol is used by EFI Applications to request the UEFI Boot Manager\r
5 to connect devices using platform policy.\r
6\r
9095d37b 7 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 8 SPDX-License-Identifier: BSD-2-Clause-Patent\r
b9eb59f8
RN
9**/\r
10\r
11#ifndef __BOOT_MANAGER_POLICY_H__\r
12#define __BOOT_MANAGER_POLICY_H__\r
13\r
14#define EFI_BOOT_MANAGER_POLICY_PROTOCOL_GUID \\r
15 { \\r
16 0xFEDF8E0C, 0xE147, 0x11E3, { 0x99, 0x03, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA } \\r
17 }\r
18\r
19#define EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID \\r
20 { \\r
21 0xCAB0E94C, 0xE15F, 0x11E3, { 0x91, 0x8D, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA } \\r
22 }\r
23\r
24#define EFI_BOOT_MANAGER_POLICY_NETWORK_GUID \\r
25 { \\r
26 0xD04159DC, 0xE15F, 0x11E3, { 0xB2, 0x61, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA } \\r
27 }\r
28\r
29#define EFI_BOOT_MANAGER_POLICY_CONNECT_ALL_GUID \\r
30 { \\r
31 0x113B2126, 0xFC8A, 0x11E3, { 0xBD, 0x6C, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA } \\r
32 }\r
33\r
34typedef struct _EFI_BOOT_MANAGER_POLICY_PROTOCOL EFI_BOOT_MANAGER_POLICY_PROTOCOL;\r
35\r
2f88bd3a 36#define EFI_BOOT_MANAGER_POLICY_PROTOCOL_REVISION 0x00010000\r
b9eb59f8
RN
37\r
38/**\r
39 Connect a device path following the platforms EFI Boot Manager policy.\r
40\r
41 The ConnectDevicePath() function allows the caller to connect a DevicePath using the\r
42 same policy as the EFI Boot Manger.\r
43\r
44 @param[in] This A pointer to the EFI_BOOT_MANAGER_POLICY_PROTOCOL instance.\r
45 @param[in] DevicePath Points to the start of the EFI device path to connect.\r
46 If DevicePath is NULL then all the controllers in the\r
47 system will be connected using the platforms EFI Boot\r
48 Manager policy.\r
49 @param[in] Recursive If TRUE, then ConnectController() is called recursively\r
9095d37b 50 until the entire tree of controllers below the\r
b9eb59f8
RN
51 controller specified by DevicePath have been created.\r
52 If FALSE, then the tree of controllers is only expanded\r
53 one level. If DevicePath is NULL then Recursive is ignored.\r
54\r
55 @retval EFI_SUCCESS The DevicePath was connected.\r
56 @retval EFI_NOT_FOUND The DevicePath was not found.\r
57 @retval EFI_NOT_FOUND No driver was connected to DevicePath.\r
9095d37b 58 @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device\r
b9eb59f8
RN
59 drivers on the DevicePath.\r
60 @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.\r
61**/\r
62typedef\r
63EFI_STATUS\r
64(EFIAPI *EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_PATH)(\r
65 IN EFI_BOOT_MANAGER_POLICY_PROTOCOL *This,\r
66 IN EFI_DEVICE_PATH *DevicePath,\r
67 IN BOOLEAN Recursive\r
68 );\r
69\r
70/**\r
71 Connect a class of devices using the platform Boot Manager policy.\r
72\r
73 The ConnectDeviceClass() function allows the caller to request that the Boot\r
74 Manager connect a class of devices.\r
75\r
76 If Class is EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID then the Boot Manager will\r
9095d37b 77 use platform policy to connect consoles. Some platforms may restrict the\r
b9eb59f8
RN
78 number of consoles connected as they attempt to fast boot, and calling\r
79 ConnectDeviceClass() with a Class value of EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID\r
80 must connect the set of consoles that follow the Boot Manager platform policy,\r
81 and the EFI_SIMPLE_TEXT_INPUT_PROTOCOL, EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL, and\r
82 the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL are produced on the connected handles.\r
83 The Boot Manager may restrict which consoles get connect due to platform policy,\r
84 for example a security policy may require that a given console is not connected.\r
85\r
86 If Class is EFI_BOOT_MANAGER_POLICY_NETWORK_GUID then the Boot Manager will\r
87 connect the protocols the platforms supports for UEFI general purpose network\r
88 applications on one or more handles. If more than one network controller is\r
89 available a platform will connect, one, many, or all of the networks based\r
90 on platform policy. Connecting UEFI networking protocols, like EFI_DHCP4_PROTOCOL,\r
91 does not establish connections on the network. The UEFI general purpose network\r
92 application that called ConnectDeviceClass() may need to use the published\r
93 protocols to establish the network connection. The Boot Manager can optionally\r
94 have a policy to establish a network connection.\r
9095d37b 95\r
b9eb59f8
RN
96 If Class is EFI_BOOT_MANAGER_POLICY_CONNECT_ALL_GUID then the Boot Manager\r
97 will connect all UEFI drivers using the UEFI Boot Service\r
98 EFI_BOOT_SERVICES.ConnectController(). If the Boot Manager has policy\r
99 associated with connect all UEFI drivers this policy will be used.\r
100\r
101 A platform can also define platform specific Class values as a properly generated\r
102 EFI_GUID would never conflict with this specification.\r
103\r
104 @param[in] This A pointer to the EFI_BOOT_MANAGER_POLICY_PROTOCOL instance.\r
105 @param[in] Class A pointer to an EFI_GUID that represents a class of devices\r
106 that will be connected using the Boot Mangers platform policy.\r
107\r
108 @retval EFI_SUCCESS At least one devices of the Class was connected.\r
109 @retval EFI_DEVICE_ERROR Devices were not connected due to an error.\r
110 @retval EFI_NOT_FOUND The Class is not supported by the platform.\r
111 @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.\r
9095d37b 112**/\r
b9eb59f8
RN
113typedef\r
114EFI_STATUS\r
115(EFIAPI *EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_CLASS)(\r
116 IN EFI_BOOT_MANAGER_POLICY_PROTOCOL *This,\r
117 IN EFI_GUID *Class\r
118 );\r
119\r
120struct _EFI_BOOT_MANAGER_POLICY_PROTOCOL {\r
2f88bd3a
MK
121 UINT64 Revision;\r
122 EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_PATH ConnectDevicePath;\r
123 EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_CLASS ConnectDeviceClass;\r
b9eb59f8
RN
124};\r
125\r
2f88bd3a 126extern EFI_GUID gEfiBootManagerPolicyProtocolGuid;\r
b9eb59f8 127\r
2f88bd3a
MK
128extern EFI_GUID gEfiBootManagerPolicyConsoleGuid;\r
129extern EFI_GUID gEfiBootManagerPolicyNetworkGuid;\r
130extern EFI_GUID gEfiBootManagerPolicyConnectAllGuid;\r
b9eb59f8
RN
131\r
132#endif\r