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