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