]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Application/UiApp/BootMngr/BootManager.h
UiApp: Update copyright info, cover old code existed in old BdsDxe driver.
[mirror_edk2.git] / MdeModulePkg / Application / UiApp / BootMngr / BootManager.h
1 /** @file
2 The platform boot manager reference implement
3
4 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _EFI_BOOT_MANAGER_H_
16 #define _EFI_BOOT_MANAGER_H_
17
18 #include "Ui.h"
19 #include "FrontPage.h"
20
21 //
22 // These are defined as the same with vfr file
23 //
24 #define BOOT_MANAGER_FORMSET_GUID \
25 { \
26 0x847bc3fe, 0xb974, 0x446d, {0x94, 0x49, 0x5a, 0xd5, 0x41, 0x2e, 0x99, 0x3b} \
27 }
28
29 #define BOOT_MANAGER_FORM_ID 0x1000
30
31 #define LABEL_BOOT_OPTION 0x00
32 #define LABEL_BOOT_OPTION_END 0x01
33
34 //
35 // These are the VFR compiler generated data representing our VFR data.
36 //
37 extern UINT8 BootManagerVfrBin[];
38
39 #define BOOT_MANAGER_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('B', 'M', 'C', 'B')
40
41 typedef struct {
42 UINTN Signature;
43
44 //
45 // HII relative handles
46 //
47 EFI_HII_HANDLE HiiHandle;
48 EFI_HANDLE DriverHandle;
49
50 //
51 // Produced protocols
52 //
53 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;
54 } BOOT_MANAGER_CALLBACK_DATA;
55
56 /**
57 This call back function is registered with Boot Manager formset.
58 When user selects a boot option, this call back function will
59 be triggered. The boot option is saved for later processing.
60
61
62 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
63 @param Action Specifies the type of action taken by the browser.
64 @param QuestionId A unique value which is sent to the original exporting driver
65 so that it can identify the type of data to expect.
66 @param Type The type of value for the question.
67 @param Value A pointer to the data being sent to the original exporting driver.
68 @param ActionRequest On return, points to the action requested by the callback function.
69
70 @retval EFI_SUCCESS The callback successfully handled the action.
71 @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.
72
73 **/
74 EFI_STATUS
75 EFIAPI
76 BootManagerCallback (
77 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
78 IN EFI_BROWSER_ACTION Action,
79 IN EFI_QUESTION_ID QuestionId,
80 IN UINT8 Type,
81 IN EFI_IFR_TYPE_VALUE *Value,
82 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
83 );
84
85 /**
86 Register HII packages to HII database.
87
88 **/
89 VOID
90 InitializeBootManager (
91 VOID
92 );
93
94 /**
95 Enumerate possible boot options.
96
97 **/
98 VOID
99 EnumerateBootOptions (
100 VOID
101 );
102
103 /**
104 Remove the installed packages from the HII Database.
105
106 **/
107 VOID
108 FreeBootManager (
109 VOID
110 );
111
112 #endif