]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / EntryPoints / EdkIIGlueSmmDriverEntryPoint.c
CommitLineData
3eb9473e 1/*++\r
2\r
3Copyright (c) 2004 - 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 EdkIIGlueSmmDriverEntryPoint.c\r
16 \r
17Abstract: \r
18\r
19 Smm Driver entry point template file\r
20\r
21--*/\r
22\r
23#include "EdkIIGlueDxe.h"\r
24#include "Common/EdkIIGlueDependencies.h"\r
25\r
26\r
27//\r
28// Module Unload Handler\r
29//\r
30#ifdef __EDKII_GLUE_MODULE_UNLOAD_HANDLER__\r
31EFI_STATUS\r
32EFIAPI\r
33__EDKII_GLUE_MODULE_UNLOAD_HANDLER__ (\r
34 EFI_HANDLE ImageHandle\r
35 );\r
36#endif\r
37\r
38EFI_STATUS\r
39EFIAPI\r
40ProcessModuleUnloadList (\r
41 EFI_HANDLE ImageHandle\r
42 )\r
43{\r
44#ifdef __EDKII_GLUE_MODULE_UNLOAD_HANDLER__\r
45 return (__EDKII_GLUE_MODULE_UNLOAD_HANDLER__ (ImageHandle));\r
46#else\r
47 return EFI_SUCCESS;\r
48#endif\r
49}\r
50\r
51#ifdef __EDKII_GLUE_EFI_CALLER_ID_GUID__\r
52 GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiCallerIdGuid = __EDKII_GLUE_EFI_CALLER_ID_GUID__;\r
53#endif\r
54\r
55//\r
56// Library constructors\r
57//\r
58VOID\r
59ProcessLibraryConstructorList (\r
60 IN EFI_HANDLE ImageHandle,\r
61 IN EFI_SYSTEM_TABLE *SystemTable\r
62 )\r
63{\r
64//\r
65// Declare "Status" if any of the following libraries are used\r
66//\r
67#if defined(__EDKII_GLUE_DXE_HOB_LIB__) \\r
68 || defined(__EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__) \\r
69 || defined(__EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__) \\r
70 || defined(__EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__) \\r
71 || defined(__EDKII_GLUE_DXE_SERVICES_TABLE_LIB__) \\r
72 || defined(__EDKII_GLUE_DXE_SMBUS_LIB__) \\r
73 || defined(__EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__) \\r
74 || defined(__EDKII_GLUE_DXE_IO_LIB_CPU_IO__)\r
75 EFI_STATUS Status;\r
76#endif\r
77\r
78//\r
79// EdkII Glue Library Constructors: \r
80// NOTE: the constructors must be called according to dependency order\r
81//\r
82// UefiBootServicesTableLib UefiBootServicesTableLibConstructor()\r
83// DxeIoLibCpuIo IoLibConstructor \r
84// EdkDxeRuntimeDriverLib RuntimeDriverLibConstruct() \r
85// DxeHobLib HobLibConstructor()\r
86// UefiDriverModelLib UefiDriverModelLibConstructor()\r
87// DxeSmbusLib SmbusLibConstructor() \r
88// DxeServicesTableLib DxeServicesTableLibConstructor()\r
89// UefiRuntimeServicesTableLib UefiRuntimeServicesTableLibConstructor() \r
90// check here: check lib usage\r
91#ifdef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__\r
92 Status = UefiBootServicesTableLibConstructor (ImageHandle, SystemTable);\r
93 ASSERT_EFI_ERROR (Status);\r
94#endif\r
95\r
96#ifdef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__\r
97 Status = IoLibConstructor (ImageHandle, SystemTable);\r
98 ASSERT_EFI_ERROR (Status);\r
99#endif\r
100\r
101#ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__\r
102 Status = RuntimeDriverLibConstruct (ImageHandle, SystemTable);\r
103 ASSERT_EFI_ERROR (Status);\r
104#endif\r
105\r
106#ifdef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__\r
107 Status = UefiRuntimeServicesTableLibConstructor (ImageHandle, SystemTable);\r
108 ASSERT_EFI_ERROR (Status);\r
109#endif\r
110\r
111#ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__\r
112 Status = UefiDriverModelLibConstructor (ImageHandle, SystemTable);\r
113 ASSERT_EFI_ERROR (Status);\r
114#endif\r
115\r
116#ifdef __EDKII_GLUE_DXE_SERVICES_TABLE_LIB__\r
117 Status = DxeServicesTableLibConstructor (ImageHandle, SystemTable);\r
118 ASSERT_EFI_ERROR (Status); \r
119#endif\r
120\r
121#ifdef __EDKII_GLUE_DXE_HOB_LIB__\r
122 Status = HobLibConstructor (ImageHandle, SystemTable);\r
123 ASSERT_EFI_ERROR (Status);\r
124#endif\r
125\r
126#ifdef __EDKII_GLUE_DXE_SMBUS_LIB__\r
127 Status = SmbusLibConstructor (ImageHandle, SystemTable);\r
128 ASSERT_EFI_ERROR (Status);\r
129#endif\r
130}\r
131\r
132//\r
133// Library destructors\r
134//\r
135VOID\r
136ProcessLibraryDestructorList (\r
137 IN EFI_HANDLE ImageHandle,\r
138 IN EFI_SYSTEM_TABLE *SystemTable\r
139 )\r
140{\r
141}\r
142\r
143EFI_BOOT_SERVICES *mBS;\r
144\r
145/**\r
146 This function returns the size, in bytes, \r
147 of the device path data structure specified by DevicePath.\r
148 If DevicePath is NULL, then 0 is returned.\r
149\r
150 @param DevicePath A pointer to a device path data structure.\r
151\r
152 @return The size of a device path in bytes.\r
153\r
154**/\r
155STATIC\r
156UINTN\r
157EFIAPI\r
158SmmGetDevicePathSize (\r
159 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
160 )\r
161{\r
162 CONST EFI_DEVICE_PATH_PROTOCOL *Start;\r
163\r
164 if (DevicePath == NULL) {\r
165 return 0;\r
166 }\r
167\r
168 //\r
169 // Search for the end of the device path structure\r
170 //\r
171 Start = DevicePath;\r
172 while (!EfiIsDevicePathEnd (DevicePath)) {\r
173 DevicePath = EfiNextDevicePathNode (DevicePath);\r
174 }\r
175\r
176 //\r
177 // Compute the size and add back in the size of the end device path structure\r
178 //\r
179 return ((UINTN) DevicePath - (UINTN) Start) + sizeof (EFI_DEVICE_PATH_PROTOCOL);\r
180}\r
181\r
182/**\r
183 This function appends the device path SecondDevicePath\r
184 to every device path instance in FirstDevicePath. \r
185\r
186 @param FirstDevicePath A pointer to a device path data structure.\r
187 \r
188 @param SecondDevicePath A pointer to a device path data structure.\r
189\r
190 @return A pointer to the new device path is returned.\r
191 NULL is returned if space for the new device path could not be allocated from pool.\r
192 It is up to the caller to free the memory used by FirstDevicePath and SecondDevicePath\r
193 if they are no longer needed.\r
194\r
195**/\r
196EFI_DEVICE_PATH_PROTOCOL *\r
197EFIAPI\r
198SmmAppendDevicePath (\r
199 IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath,\r
200 IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath\r
201 )\r
202{\r
203 EFI_STATUS Status;\r
204 UINTN Size;\r
205 UINTN Size1;\r
206 UINTN Size2;\r
207 EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;\r
208 EFI_DEVICE_PATH_PROTOCOL *DevicePath2;\r
209\r
210 ASSERT (FirstDevicePath != NULL && SecondDevicePath != NULL);\r
211\r
212 //\r
213 // Allocate space for the combined device path. It only has one end node of\r
214 // length EFI_DEVICE_PATH_PROTOCOL\r
215 //\r
216 Size1 = SmmGetDevicePathSize (FirstDevicePath);\r
217 Size2 = SmmGetDevicePathSize (SecondDevicePath);\r
218 Size = Size1 + Size2 - sizeof (EFI_DEVICE_PATH_PROTOCOL);\r
219\r
220 Status = (mBS->AllocatePool) (EfiBootServicesData, Size, (VOID **) &NewDevicePath);\r
221\r
222 if (EFI_SUCCESS == Status) {\r
223 (mBS->CopyMem) ((VOID *) NewDevicePath, (VOID *) FirstDevicePath, Size1);\r
224 //\r
225 // Over write Src1 EndNode and do the copy\r
226 //\r
227 DevicePath2 = (EFI_DEVICE_PATH_PROTOCOL *) ((CHAR8 *) NewDevicePath + (Size1 - sizeof (EFI_DEVICE_PATH_PROTOCOL)));\r
228 (mBS->CopyMem) ((VOID *) DevicePath2, (VOID *) SecondDevicePath, Size2);\r
229 }\r
230\r
231 return NewDevicePath;\r
232}\r
233\r
234/**\r
235 Unload function that is registered in the LoadImage protocol. It un-installs\r
236 protocols produced and deallocates pool used by the driver. Called by the core\r
237 when unloading the driver.\r
238\r
239 @param ImageHandle ImageHandle of the unloaded driver\r
240\r
241 @return Status of the ProcessModuleUnloadList.\r
242\r
243**/\r
244EFI_STATUS\r
245EFIAPI\r
246_DriverUnloadHandler (\r
247 EFI_HANDLE ImageHandle\r
248 )\r
249{\r
250 EFI_STATUS Status;\r
251\r
252 //\r
253 // Call the unload handlers for all the modules\r
254 //\r
255 Status = ProcessModuleUnloadList (ImageHandle);\r
256\r
257 //\r
258 // If the driver specific unload handler does not return an error, then call all of the\r
259 // library destructors. If the unload handler returned an error, then the driver can not be\r
260 // unloaded, and the library destructors should not be called\r
261 //\r
262 if (!EFI_ERROR (Status)) {\r
263 //\r
264 // NOTE: To allow passing in gST here, any library instance having a destructor\r
265 // must depend on EfiDriverLib\r
266 //\r
267 }\r
268\r
269 //\r
270 // Return the status from the driver specific unload handler\r
271 //\r
272 return Status;\r
273}\r
274\r
275EFI_DRIVER_ENTRY_POINT (_ModuleEntryPoint);\r
276\r
277//\r
278// Module Entry Point\r
279//\r
280#ifdef __EDKII_GLUE_MODULE_ENTRY_POINT__\r
281EFI_STATUS\r
282EFIAPI\r
283__EDKII_GLUE_MODULE_ENTRY_POINT__ (\r
284 EFI_HANDLE ImageHandle,\r
285 EFI_SYSTEM_TABLE *SystemTable\r
286 );\r
287#endif\r
288\r
289/**\r
290 Enrty point to DXE SMM Driver.\r
291\r
292 @param ImageHandle ImageHandle of the loaded driver.\r
293 @param SystemTable Pointer to the EFI System Table.\r
294\r
295 @retval EFI_SUCCESS One or more of the drivers returned a success code.\r
296 @retval !EFI_SUCESS The return status from the last driver entry point in the list.\r
297\r
298**/\r
299EFI_STATUS\r
300EFIAPI\r
301_ModuleEntryPoint (\r
302 IN EFI_HANDLE ImageHandle,\r
303 IN EFI_SYSTEM_TABLE *SystemTable\r
304 )\r
305{\r
306 EFI_STATUS Status;\r
307 EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;\r
308 EFI_SMM_BASE_PROTOCOL *SmmBase;\r
309 BOOLEAN InSmm;\r
310 EFI_DEVICE_PATH_PROTOCOL *CompleteFilePath;\r
311 EFI_DEVICE_PATH_PROTOCOL *ImageDevicePath;\r
312 EFI_HANDLE Handle;\r
313\r
314 //\r
315 // Cache a pointer to the Boot Services Table \r
316 //\r
317 mBS = SystemTable->BootServices;\r
318\r
319 //\r
320 // Retrieve the Loaded Image Protocol\r
321 //\r
322 Status = mBS->HandleProtocol (\r
323 ImageHandle, \r
324 &gEfiLoadedImageProtocolGuid,\r
325 (VOID*)&LoadedImage\r
326 );\r
327 ASSERT_EFI_ERROR (Status);\r
328\r
329 //\r
330 // Retrieve SMM Base Protocol\r
331 //\r
332 Status = mBS->LocateProtocol (\r
333 &gEfiSmmBaseProtocolGuid, \r
334 NULL, \r
335 (VOID **) &SmmBase\r
336 );\r
337 ASSERT_EFI_ERROR (Status);\r
338\r
339 //\r
340 // Check to see if we are already in SMM\r
341 //\r
342 SmmBase->InSmm (SmmBase, &InSmm);\r
343\r
344 //\r
345 //\r
346 //\r
347 if (!InSmm) {\r
348 //\r
349 // Retrieve the Device Path Protocol from the DeviceHandle tha this driver was loaded from\r
350 //\r
351 Status = mBS->HandleProtocol (\r
352 LoadedImage->DeviceHandle, \r
353 &gEfiDevicePathProtocolGuid,\r
354 (VOID*)&ImageDevicePath\r
355 );\r
356 ASSERT_EFI_ERROR (Status);\r
357\r
358 //\r
359 // Build the full device path to the currently execuing image\r
360 //\r
361 CompleteFilePath = SmmAppendDevicePath (ImageDevicePath, LoadedImage->FilePath);\r
362\r
363 //\r
364 // Load the image in memory to SMRAM; it will automatically generate the\r
365 // SMI.\r
366 //\r
367 Status = SmmBase->Register (SmmBase, CompleteFilePath, NULL, 0, &Handle, FALSE);\r
368 ASSERT_EFI_ERROR (Status);\r
369 return Status;\r
370 }\r
371\r
372 //\r
373 // Call constructor for all libraries\r
374 //\r
375 ProcessLibraryConstructorList (ImageHandle, SystemTable);\r
376\r
377 //\r
378 // Install the unload handler\r
379 //\r
380 Status = mBS->HandleProtocol (\r
381 ImageHandle,\r
382 &gEfiLoadedImageProtocolGuid,\r
383 (VOID **)&LoadedImage\r
384 );\r
385 ASSERT_EFI_ERROR (Status);\r
386 LoadedImage->Unload = _DriverUnloadHandler;\r
387\r
388 //\r
389 // Call the list of driver entry points\r
390 //\r
391 #ifdef __EDKII_GLUE_MODULE_ENTRY_POINT__\r
392 Status = (__EDKII_GLUE_MODULE_ENTRY_POINT__ (ImageHandle, SystemTable));\r
393 #else\r
394 Status = EFI_SUCCESS;\r
395 #endif\r
396\r
397 if (EFI_ERROR (Status)) {\r
398 ProcessLibraryDestructorList (ImageHandle, SystemTable);\r
399 }\r
400\r
401 return Status;\r
402}\r
403\r
404/**\r
405 Enrty point wrapper of DXE SMM Driver.\r
406\r
407 @param ImageHandle ImageHandle of the loaded driver.\r
408 @param SystemTable Pointer to the EFI System Table.\r
409\r
410 @retval EFI_SUCCESS One or more of the drivers returned a success code.\r
411 @retval !EFI_SUCESS The return status from the last driver entry point in the list.\r
412\r
413**/\r
414EFI_STATUS\r
415EFIAPI\r
416EfiMain (\r
417 IN EFI_HANDLE ImageHandle,\r
418 IN EFI_SYSTEM_TABLE *SystemTable\r
419 )\r
420{\r
421 return _ModuleEntryPoint (ImageHandle, SystemTable);\r
422}\r
423\r
424//\r
425// Guids not present in R8.6 code base\r
426//\r
427\r
428//\r
429// Protocol/Arch Protocol GUID globals\r
430//\r
431GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gUefiDriverConfigurationProtocolGuid = { 0xbfd7dc1d, 0x24f1, 0x40d9, { 0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe } };\r
432GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gUefiDriverDiagnosticsProtocolGuid = { 0x4d330321, 0x025f, 0x4aac, { 0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63 } };\r
433GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiArpProtocolGuid = { 0xf4b427bb, 0xba21, 0x4f16, { 0xbc, 0x4e, 0x43, 0xe4, 0x16, 0xab, 0x61, 0x9c } };\r
434GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiArpServiceBindingProtocolGuid = { 0xf44c00ee, 0x1f2c, 0x4a00, { 0xaa, 0x09, 0x1c, 0x9f, 0x3e, 0x08, 0x00, 0xa3 } };\r
435GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDhcp4ProtocolGuid = { 0x8a219718, 0x4ef5, 0x4761, { 0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56 } };\r
436GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid = { 0x9d9a39d8, 0xbd42, 0x4a73, { 0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80 } };\r
437GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ProtocolGuid = { 0x41d94cd2, 0x35b6, 0x455a, { 0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd } };\r
438GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ServiceBindingProtocolGuid = { 0xc51711e7, 0xb4bf, 0x404a, { 0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4 } };\r
439GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ConfigProtocolGuid = { 0x3b95aa31, 0x3793, 0x434b, { 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } };\r
440GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkProtocolGuid = { 0x3b95aa31, 0x3793, 0x434b, { 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } };\r
441GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid = { 0xf36ff770, 0xa7e1, 0x42cf, { 0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } };\r
442GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiMtftp4ProtocolGuid = { 0x3ad9df29, 0x4501, 0x478d, { 0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } };\r
443GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid = { 0x2FE800BE, 0x8F01, 0x4aa6, { 0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F } };\r
444GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiTcp4ProtocolGuid = { 0x65530BC7, 0xA359, 0x410f, { 0xB0, 0x10, 0x5A, 0xAD, 0xC7, 0xEC, 0x2B, 0x62 } }; \r
445GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiTcp4ServiceBindingProtocolGuid = { 0x00720665, 0x67EB, 0x4a99, { 0xBA, 0xF7, 0xD3, 0xC3, 0x3A, 0x1C, 0x7C, 0xC9 } };\r
446GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiUdp4ProtocolGuid = { 0x3ad9df29, 0x4501, 0x478d, { 0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } };\r
447GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiUdp4ServiceBindingProtocolGuid = { 0x83f01464, 0x99bd, 0x45e5, { 0xb3, 0x83, 0xaf, 0x63, 0x05, 0xd8, 0xe9, 0xe6 } };\r
448GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiAuthenticationInfoProtocolGuid = { 0x7671d9d0, 0x53db, 0x4173, { 0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 } };\r
449GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDevicePathFromTextProtocolGuid = { 0x5c99a21, 0xc70f, 0x4ad2, { 0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } };\r
450GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDevicePathToTextProtocolGuid = { 0x8b843e20, 0x8132, 0x4852, { 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } };\r
451GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDevicePathUtilitiesProtocolGuid = { 0x379be4e, 0xd706, 0x437d, { 0xb0, 0x37, 0xed, 0xb8, 0x2f, 0xb7, 0x72, 0xa4 } };\r
452GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashProtocolGuid = { 0xc5184932, 0xdba5, 0x46db, { 0xa5, 0xba, 0xcc, 0x0b, 0xda, 0x9c, 0x14, 0x35 } };\r
453GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashServiceBindingProtocolGuid = { 0x42881c98, 0xa4f3, 0x44b0, { 0xa3, 0x9d, 0xdf, 0xa1, 0x86, 0x67, 0xd8, 0xcd } };\r
454GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIScsiInitiatorNameProtocolGuid = { 0xa6a72875, 0x2962, 0x4c18, { 0x9f, 0x46, 0x8d, 0xa6, 0x44, 0xcc, 0xfe, 0x00 } };\r
455GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiExtScsiPassThruProtocolGuid = { 0x1d3de7f0, 0x0807, 0x424f, { 0xaa, 0x69, 0x11, 0xa5, 0x4e, 0x19, 0xa4, 0x6f } };\r
456GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiTapeIoProtocolGuid = { 0x1e93e633, 0xd65a, 0x459e, { 0xab, 0x84, 0x93, 0xd9, 0xec, 0x26, 0x6d, 0x18 } };\r
457GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiUsb2HcProtocolGuid = { 0x3e745226, 0x9818, 0x45b6, { 0xa2, 0xac, 0xd7, 0xcd, 0x0e, 0x8b, 0xa2, 0xbc } };\r
458\r
459//\r
460// PPI GUID globals\r
461//\r
462\r
463//\r
464// GUID globals\r
465//\r
466GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHobMemoryAllocBspStoreGuid = { 0x564b33cd, 0xc92a, 0x4593, { 0x90, 0xbf, 0x24, 0x73, 0xe4, 0x3c, 0x63, 0x22 } };\r
467GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHobMemoryAllocStackGuid = { 0x4ed4bf27, 0x4092, 0x42e9, { 0x80, 0x7d, 0x52, 0x7b, 0x1d, 0x00, 0xc9, 0xbd } }; \r
468GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHobMemoryAllocModuleGuid = { 0xf8e21975, 0x0899, 0x4f58, { 0xa4, 0xbe, 0x55, 0x25, 0xa9, 0xc6, 0xd7, 0x7a } }; \r
469GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiAuthenticationChapRadiusGuid = { 0xd6062b50, 0x15ca, 0x11da, { 0x92, 0x19, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } };\r
470GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiAuthenticationChapLocalGuid = { 0xc280c73e, 0x15ca, 0x11da, { 0xb0, 0xca, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } };\r
471GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha1Guid = { 0x2ae9d80f, 0x3fb2, 0x4095, { 0xb7, 0xb1, 0xe9, 0x31, 0x57, 0xb9, 0x46, 0xb6 } };\r
472GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha224Guid = { 0x8df01a06, 0x9bd5, 0x4bf7, { 0xb0, 0x21, 0xdb, 0x4f, 0xd9, 0xcc, 0xf4, 0x5b } }; \r
473GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha256Guid = { 0x51aa59de, 0xfdf2, 0x4ea3, { 0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } };\r
474GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha384Guid = { 0xefa96432, 0xde33, 0x4dd2, { 0xae, 0xe6, 0x32, 0x8c, 0x33, 0xdf, 0x77, 0x7a } }; \r
475GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha512Guid = { 0xcaa4381e, 0x750c, 0x4770, { 0xb8, 0x70, 0x7a, 0x23, 0xb4, 0xe4, 0x21, 0x30 } }; \r
476GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmMD5Guid = { 0xaf7c79c, 0x65b5, 0x4319, { 0xb0, 0xae, 0x44, 0xec, 0x48, 0x4e, 0x4a, 0xd7 } };\r
477GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gBootObjectAuthorizationParmsetGuid = { 0xedd35e31, 0x7b9, 0x11d2, { 0x83, 0xa3, 0x00, 0xa0, 0xc9, 0x1f, 0xad, 0xcf } };\r
478GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gSmmCommunicateHeaderGuid = { 0xf328e36c, 0x23b6, 0x4a95, { 0x85, 0x4b, 0x32, 0xe1, 0x95, 0x34, 0xcd, 0x75 } };\r
479GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiCapsuleGuid = { 0x3B6686BD, 0x0D76, 0x4030, { 0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0 } };\r
480GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiConfigFileNameGuid = { 0x98B8D59B, 0xE8BA, 0x48EE, { 0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB } };\r