]>
Commit | Line | Data |
---|---|---|
fd6a62f3 | 1 | /** @file\r |
2 | The platform boot manager reference implement\r | |
93e3992d | 3 | \r |
fd6a62f3 | 4 | Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r |
93e3992d | 5 | All rights reserved. This program and the accompanying materials\r |
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 | |
fd6a62f3 | 13 | **/\r |
93e3992d | 14 | \r |
2fbae53e | 15 | #ifndef _EFI_BOOT_MANAGER_H_\r |
16 | #define _EFI_BOOT_MANAGER_H_\r | |
93e3992d | 17 | \r |
18 | #include "Bds.h"\r | |
19 | #include "FrontPage.h"\r | |
20 | \r | |
21 | //\r | |
22 | // These are defined as the same with vfr file\r | |
23 | //\r | |
24 | #define BOOT_MANAGER_FORMSET_GUID \\r | |
25 | { \\r | |
26 | 0x847bc3fe, 0xb974, 0x446d, {0x94, 0x49, 0x5a, 0xd5, 0x41, 0x2e, 0x99, 0x3b} \\r | |
27 | }\r | |
28 | \r | |
29 | #define BOOT_MANAGER_FORM_ID 0x1000\r | |
30 | \r | |
31 | #define LABEL_BOOT_OPTION 0x00\r | |
32 | \r | |
33 | //\r | |
34 | // These are the VFR compiler generated data representing our VFR data.\r | |
35 | //\r | |
36 | extern UINT8 BootManagerVfrBin[];\r | |
37 | \r | |
38 | #define BOOT_MANAGER_CALLBACK_DATA_SIGNATURE EFI_SIGNATURE_32 ('B', 'M', 'C', 'B')\r | |
39 | \r | |
40 | typedef struct {\r | |
41 | UINTN Signature;\r | |
42 | \r | |
43 | //\r | |
44 | // HII relative handles\r | |
45 | //\r | |
46 | EFI_HII_HANDLE HiiHandle;\r | |
47 | EFI_HANDLE DriverHandle;\r | |
48 | \r | |
49 | //\r | |
50 | // Produced protocols\r | |
51 | //\r | |
52 | EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r | |
53 | } BOOT_MANAGER_CALLBACK_DATA;\r | |
54 | \r | |
b30312ba | 55 | /**\r |
2fbae53e | 56 | This call back funtion is registered with Boot Manager formset.\r |
57 | When user selects a boot option, this call back function will\r | |
58 | be triggered. The boot option is saved for later processing.\r | |
b30312ba | 59 | \r |
b30312ba | 60 | \r |
2fbae53e | 61 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r |
62 | @param Action Specifies the type of action taken by the browser.\r | |
63 | @param QuestionId A unique value which is sent to the original exporting driver\r | |
64 | so that it can identify the type of data to expect.\r | |
65 | @param Type The type of value for the question.\r | |
66 | @param Value A pointer to the data being sent to the original exporting driver.\r | |
67 | @param ActionRequest On return, points to the action requested by the callback function.\r | |
68 | \r | |
69 | @retval EFI_SUCCESS The callback successfully handled the action.\r | |
70 | @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r | |
b30312ba | 71 | \r |
72 | **/\r | |
93e3992d | 73 | EFI_STATUS\r |
74 | EFIAPI\r | |
75 | BootManagerCallback (\r | |
76 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
77 | IN EFI_BROWSER_ACTION Action,\r | |
78 | IN EFI_QUESTION_ID QuestionId,\r | |
79 | IN UINT8 Type,\r | |
80 | IN EFI_IFR_TYPE_VALUE *Value,\r | |
81 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r | |
82 | )\r | |
83 | ;\r | |
84 | \r | |
b30312ba | 85 | /**\r |
b30312ba | 86 | \r |
2fbae53e | 87 | Registers HII packages for the Boot Manger to HII Database.\r |
88 | It also registers the browser call back function.\r | |
89 | \r | |
30394aa1 | 90 | @return Status of HiiLibCreateHiiDriverHandle() and gHiiDatabase->NewPackageList()\r |
b30312ba | 91 | **/\r |
93e3992d | 92 | EFI_STATUS\r |
93 | InitializeBootManager (\r | |
94 | VOID\r | |
95 | )\r | |
96 | ;\r | |
97 | \r | |
b30312ba | 98 | /**\r |
2fbae53e | 99 | This funtion invokees Boot Manager. If all devices have not a chance to be connected,\r |
100 | the connect all will be triggered. It then enumerate all boot options. If \r | |
101 | a boot option from the Boot Manager page is selected, Boot Manager will boot\r | |
102 | from this boot option.\r | |
103 | \r | |
b30312ba | 104 | **/\r |
93e3992d | 105 | VOID\r |
106 | CallBootManager (\r | |
107 | VOID\r | |
108 | )\r | |
109 | ;\r | |
110 | \r | |
111 | #endif\r |