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