]>
Commit | Line | Data |
---|---|---|
5c08e117 | 1 | /** @file\r |
2 | The platform boot manager reference implement\r | |
3 | \r | |
e24fc103 | 4 | Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r |
180a5a35 | 5 | This program and the accompanying materials\r |
5c08e117 | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _EFI_BOOT_MANAGER_H_\r | |
16 | #define _EFI_BOOT_MANAGER_H_\r | |
17 | \r | |
18 | #include "Bds.h"\r | |
19 | #include "FrontPage.h"\r | |
20 | \r | |
5c08e117 | 21 | #define BOOT_MANAGER_FORM_ID 0x1000\r |
22 | \r | |
23 | #define LABEL_BOOT_OPTION 0x00\r | |
75bf9d0e | 24 | #define LABEL_BOOT_OPTION_END 0x01\r |
5c08e117 | 25 | \r |
26 | //\r | |
27 | // These are the VFR compiler generated data representing our VFR data.\r | |
28 | //\r | |
29 | extern UINT8 BootManagerVfrBin[];\r | |
30 | \r | |
31 | #define BOOT_MANAGER_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('B', 'M', 'C', 'B')\r | |
32 | \r | |
33 | typedef struct {\r | |
34 | UINTN Signature;\r | |
35 | \r | |
36 | //\r | |
37 | // HII relative handles\r | |
38 | //\r | |
39 | EFI_HII_HANDLE HiiHandle;\r | |
40 | EFI_HANDLE DriverHandle;\r | |
41 | \r | |
42 | //\r | |
43 | // Produced protocols\r | |
44 | //\r | |
45 | EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r | |
46 | } BOOT_MANAGER_CALLBACK_DATA;\r | |
47 | \r | |
48 | /**\r | |
baf46e70 | 49 | This call back function is registered with Boot Manager formset.\r |
5c08e117 | 50 | When user selects a boot option, this call back function will\r |
51 | be triggered. The boot option is saved for later processing.\r | |
52 | \r | |
53 | \r | |
54 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
55 | @param Action Specifies the type of action taken by the browser.\r | |
56 | @param QuestionId A unique value which is sent to the original exporting driver\r | |
57 | so that it can identify the type of data to expect.\r | |
58 | @param Type The type of value for the question.\r | |
59 | @param Value A pointer to the data being sent to the original exporting driver.\r | |
60 | @param ActionRequest On return, points to the action requested by the callback function.\r | |
61 | \r | |
62 | @retval EFI_SUCCESS The callback successfully handled the action.\r | |
63 | @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r | |
64 | \r | |
65 | **/\r | |
66 | EFI_STATUS\r | |
67 | EFIAPI\r | |
68 | BootManagerCallback (\r | |
69 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
70 | IN EFI_BROWSER_ACTION Action,\r | |
71 | IN EFI_QUESTION_ID QuestionId,\r | |
72 | IN UINT8 Type,\r | |
73 | IN EFI_IFR_TYPE_VALUE *Value,\r | |
74 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r | |
75 | );\r | |
76 | \r | |
77 | /**\r | |
78 | \r | |
79 | Registers HII packages for the Boot Manger to HII Database.\r | |
80 | It also registers the browser call back function.\r | |
81 | \r | |
cb7d01c0 | 82 | @retval EFI_SUCCESS HII packages for the Boot Manager were registered successfully.\r |
83 | @retval EFI_OUT_OF_RESOURCES HII packages for the Boot Manager failed to be registered.\r | |
84 | \r | |
5c08e117 | 85 | **/\r |
86 | EFI_STATUS\r | |
87 | InitializeBootManager (\r | |
88 | VOID\r | |
89 | );\r | |
90 | \r | |
91 | /**\r | |
baf46e70 | 92 | This function invokes Boot Manager. If all devices have not a chance to be connected,\r |
5c08e117 | 93 | the connect all will be triggered. It then enumerate all boot options. If \r |
94 | a boot option from the Boot Manager page is selected, Boot Manager will boot\r | |
95 | from this boot option.\r | |
96 | \r | |
97 | **/\r | |
98 | VOID\r | |
99 | CallBootManager (\r | |
100 | VOID\r | |
101 | );\r | |
102 | \r | |
103 | #endif\r |