]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h
IntelFrameworkModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMngr / BootManager.h
CommitLineData
5c08e117 1/** @file\r
2 The platform boot manager reference implement\r
3\r
0a6f4824 4Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
c0a00b14 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
5c08e117 6\r
7**/\r
8\r
9#ifndef _EFI_BOOT_MANAGER_H_\r
10#define _EFI_BOOT_MANAGER_H_\r
11\r
12#include "Bds.h"\r
13#include "FrontPage.h"\r
14\r
5c08e117 15#define BOOT_MANAGER_FORM_ID 0x1000\r
16\r
17#define LABEL_BOOT_OPTION 0x00\r
75bf9d0e 18#define LABEL_BOOT_OPTION_END 0x01\r
5c08e117 19\r
20//\r
21// These are the VFR compiler generated data representing our VFR data.\r
22//\r
23extern UINT8 BootManagerVfrBin[];\r
24\r
25#define BOOT_MANAGER_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('B', 'M', 'C', 'B')\r
26\r
27typedef struct {\r
28 UINTN Signature;\r
29\r
30 //\r
31 // HII relative handles\r
32 //\r
33 EFI_HII_HANDLE HiiHandle;\r
34 EFI_HANDLE DriverHandle;\r
35\r
36 //\r
37 // Produced protocols\r
38 //\r
39 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r
40} BOOT_MANAGER_CALLBACK_DATA;\r
41\r
42/**\r
baf46e70 43 This call back function is registered with Boot Manager formset.\r
5c08e117 44 When user selects a boot option, this call back function will\r
45 be triggered. The boot option is saved for later processing.\r
46\r
47\r
48 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
49 @param Action Specifies the type of action taken by the browser.\r
50 @param QuestionId A unique value which is sent to the original exporting driver\r
51 so that it can identify the type of data to expect.\r
52 @param Type The type of value for the question.\r
53 @param Value A pointer to the data being sent to the original exporting driver.\r
54 @param ActionRequest On return, points to the action requested by the callback function.\r
55\r
56 @retval EFI_SUCCESS The callback successfully handled the action.\r
57 @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r
58\r
59**/\r
60EFI_STATUS\r
61EFIAPI\r
62BootManagerCallback (\r
63 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
64 IN EFI_BROWSER_ACTION Action,\r
65 IN EFI_QUESTION_ID QuestionId,\r
66 IN UINT8 Type,\r
67 IN EFI_IFR_TYPE_VALUE *Value,\r
68 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
69 );\r
70\r
71/**\r
72\r
73 Registers HII packages for the Boot Manger to HII Database.\r
74 It also registers the browser call back function.\r
75\r
cb7d01c0 76 @retval EFI_SUCCESS HII packages for the Boot Manager were registered successfully.\r
77 @retval EFI_OUT_OF_RESOURCES HII packages for the Boot Manager failed to be registered.\r
78\r
5c08e117 79**/\r
80EFI_STATUS\r
81InitializeBootManager (\r
82 VOID\r
83 );\r
84\r
85/**\r
baf46e70 86 This function invokes Boot Manager. If all devices have not a chance to be connected,\r
0a6f4824 87 the connect all will be triggered. It then enumerate all boot options. If\r
5c08e117 88 a boot option from the Boot Manager page is selected, Boot Manager will boot\r
89 from this boot option.\r
0a6f4824 90\r
5c08e117 91**/\r
92VOID\r
93CallBootManager (\r
94 VOID\r
95 );\r
96\r
97#endif\r