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