]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
0929f1d27bdc7c6b03c95fdbad28f50479a63dc8
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / Bds.h
1 /** @file
2 Head file for BDS Architectural Protocol implementation
3
4 Copyright (c) 2004 - 2012, 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 _BDS_MODULE_H_
16 #define _BDS_MODULE_H_
17
18 #include <FrameworkDxe.h>
19 #include <IndustryStandard/PeImage.h>
20 #include <Guid/MdeModuleHii.h>
21 #include <Guid/FileSystemVolumeLabelInfo.h>
22 #include <Guid/HiiPlatformSetupFormset.h>
23 #include <Protocol/DevicePath.h>
24 #include <IndustryStandard/SmBios.h>
25 #include <Protocol/LoadFile.h>
26 #include <Guid/FileInfo.h>
27 #include <Protocol/HiiConfigRouting.h>
28 #include <Protocol/Bds.h>
29 #include <Protocol/Smbios.h>
30 #include <Protocol/UgaDraw.h>
31 #include <Protocol/BlockIo.h>
32 #include <Guid/GlobalVariable.h>
33 #include <Guid/CapsuleVendor.h>
34 #include <Guid/StatusCodeDataTypeId.h>
35 #include <Guid/LegacyDevOrder.h>
36 #include <Guid/BdsHii.h>
37 #include <Guid/ConnectConInEvent.h>
38 #include <Protocol/GenericMemoryTest.h>
39 #include <Protocol/FormBrowser2.h>
40 #include <Protocol/HiiConfigAccess.h>
41 #include <Protocol/GraphicsOutput.h>
42 #include <Protocol/SimpleFileSystem.h>
43 #include <Protocol/HiiDatabase.h>
44 #include <Protocol/HiiString.h>
45 #include <Protocol/SerialIo.h>
46 #include <Protocol/LegacyBios.h>
47 #include <Protocol/SimpleTextInEx.h>
48 #include <Protocol/DriverHealth.h>
49 #include <Protocol/BootLogo.h>
50
51 #include <Library/UefiDriverEntryPoint.h>
52 #include <Library/PrintLib.h>
53 #include <Library/DebugLib.h>
54 #include <Library/BaseMemoryLib.h>
55 #include <Library/UefiBootServicesTableLib.h>
56 #include <Library/UefiLib.h>
57 #include <Library/MemoryAllocationLib.h>
58 #include <Library/PerformanceLib.h>
59 #include <Library/ReportStatusCodeLib.h>
60 #include <Library/UefiRuntimeServicesTableLib.h>
61 #include <Library/HobLib.h>
62 #include <Library/BaseLib.h>
63 #include <Library/DevicePathLib.h>
64 #include <Library/PcdLib.h>
65 #include <Library/CapsuleLib.h>
66 #include <Library/HiiLib.h>
67 #include <Library/DevicePathLib.h>
68 #include <Library/PcdLib.h>
69 #include <Library/UefiHiiServicesLib.h>
70
71 #include <Library/GenericBdsLib.h>
72 #include <Library/PlatformBdsLib.h>
73
74 #pragma pack(1)
75
76 ///
77 /// HII specific Vendor Device Path definition.
78 ///
79 typedef struct {
80 VENDOR_DEVICE_PATH VendorDevicePath;
81 EFI_DEVICE_PATH_PROTOCOL End;
82 } HII_VENDOR_DEVICE_PATH;
83
84 #pragma pack()
85
86 /**
87
88 Show progress bar with title above it. It only works in Graphics mode.
89
90 @param TitleForeground Foreground color for Title.
91 @param TitleBackground Background color for Title.
92 @param Title Title above progress bar.
93 @param ProgressColor Progress bar color.
94 @param Progress Progress (0-100)
95 @param PreviousValue The previous value of the progress.
96
97 @retval EFI_STATUS Success update the progress bar
98
99 **/
100 EFI_STATUS
101 PlatformBdsShowProgress (
102 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground,
103 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground,
104 IN CHAR16 *Title,
105 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor,
106 IN UINTN Progress,
107 IN UINTN PreviousValue
108 );
109
110 //
111 // Prototypes
112 //
113
114 /**
115
116 Install Boot Device Selection Protocol
117
118 @param ImageHandle The image handle.
119 @param SystemTable The system table.
120
121 @retval EFI_SUCEESS BDS has finished initializing.
122 Return the dispatcher and recall BDS.Entry
123 @retval Other Return status from AllocatePool() or gBS->InstallProtocolInterface
124
125 **/
126 EFI_STATUS
127 EFIAPI
128 BdsInitialize (
129 IN EFI_HANDLE ImageHandle,
130 IN EFI_SYSTEM_TABLE *SystemTable
131 );
132
133 /**
134
135 Service routine for BdsInstance->Entry(). Devices are connected, the
136 consoles are initialized, and the boot options are tried.
137
138 @param This Protocol Instance structure.
139
140 **/
141 VOID
142 EFIAPI
143 BdsEntry (
144 IN EFI_BDS_ARCH_PROTOCOL *This
145 );
146
147
148 /**
149 Perform the memory test base on the memory test intensive level,
150 and update the memory resource.
151
152 @param Level The memory test intensive level.
153
154 @retval EFI_STATUS Success test all the system memory and update
155 the memory resource
156
157 **/
158 EFI_STATUS
159 EFIAPI
160 BdsMemoryTest (
161 IN EXTENDMEM_COVERAGE_LEVEL Level
162 );
163
164 /**
165
166 This routine is called to see if there are any capsules we need to process.
167 If the boot mode is not UPDATE, then we do nothing. Otherwise find the
168 capsule HOBS and produce firmware volumes for them via the DXE service.
169 Then call the dispatcher to dispatch drivers from them. Finally, check
170 the status of the updates.
171
172 This function should be called by BDS in case we need to do some
173 sort of processing even if there is no capsule to process. We
174 need to do this if an earlier update went away and we need to
175 clear the capsule variable so on the next reset PEI does not see it and
176 think there is a capsule available.
177
178 @param BootMode the current boot mode
179
180 @retval EFI_INVALID_PARAMETER boot mode is not correct for an update
181 @retval EFI_SUCCESS There is no error when processing capsule
182
183 **/
184 EFI_STATUS
185 EFIAPI
186 BdsProcessCapsules (
187 EFI_BOOT_MODE BootMode
188 );
189
190 #endif