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