TianoCore EDK2 master
Loading...
Searching...
No Matches
DxeCapsuleProcessLib.c
Go to the documentation of this file.
1
17#include <PiDxe.h>
20
21#include <Library/BaseLib.h>
22#include <Library/DebugLib.h>
27#include <Library/UefiLib.h>
28#include <Library/PcdLib.h>
29#include <Library/HobLib.h>
31#include <Library/CapsuleLib.h>
33
35
37
46BOOLEAN
48 IN EFI_CAPSULE_HEADER *CapsuleHeader
49 );
50
73 IN EFI_CAPSULE_HEADER *CapsuleHeader,
74 OUT UINT16 *EmbeddedDriverCount OPTIONAL
75 );
76
89BOOLEAN
91 IN EFI_CAPSULE_HEADER *CapsuleHeader,
92 IN UINT64 CapsuleSize
93 );
94
103BOOLEAN
105 IN EFI_CAPSULE_HEADER *CapsuleHeader
106 );
107
121 IN EFI_CAPSULE_HEADER *CapsuleHeader,
122 OUT UINTN *CapsuleNameNum
123 );
124
125extern BOOLEAN mDxeCapsuleLibEndOfDxe;
126BOOLEAN mNeedReset = FALSE;
127
128VOID **mCapsulePtr;
129CHAR16 **mCapsuleNamePtr;
130EFI_STATUS *mCapsuleStatusArray;
131UINT32 mCapsuleTotalNumber;
132
148EFIAPI
150 IN EFI_CAPSULE_HEADER *CapsuleHeader,
151 IN CHAR16 *CapFileName OPTIONAL,
152 OUT BOOLEAN *ResetRequired OPTIONAL
153 );
154
166EFIAPI
168 IN UINTN Completion
169 )
170{
171 EFI_STATUS Status;
172 UINTN Seconds;
174
175 DEBUG ((DEBUG_INFO, "Update Progress - %d%%\n", Completion));
176
177 if (Completion > 100) {
178 return EFI_INVALID_PARAMETER;
179 }
180
181 //
182 // Use a default timeout of 5 minutes if there is not FMP Progress Protocol.
183 //
184 Seconds = 5 * 60;
185 Color = NULL;
186 if (mFmpProgress != NULL) {
187 Seconds = mFmpProgress->WatchdogSeconds;
189 }
190
191 //
192 // Cancel the watchdog timer
193 //
194 gBS->SetWatchdogTimer (0, 0x0000, 0, NULL);
195
196 if (Completion != 100) {
197 //
198 // Arm the watchdog timer from PCD setting
199 //
200 if (Seconds != 0) {
201 DEBUG ((DEBUG_VERBOSE, "Arm watchdog timer %d seconds\n", Seconds));
202 gBS->SetWatchdogTimer (Seconds, 0x0000, 0, NULL);
203 }
204 }
205
206 Status = DisplayUpdateProgress (Completion, Color);
207
208 return Status;
209}
210
214VOID
216 VOID
217 )
218{
219 EFI_PEI_HOB_POINTERS HobPointer;
220 UINTN Index;
221 UINTN Index2;
222 UINTN Index3;
223 UINTN CapsuleNameNumber;
224 UINTN CapsuleNameTotalNumber;
225 UINTN CapsuleNameCapsuleTotalNumber;
226 VOID **CapsuleNameCapsulePtr;
227 EFI_PHYSICAL_ADDRESS *CapsuleNameAddress;
228
229 CapsuleNameNumber = 0;
230 CapsuleNameTotalNumber = 0;
231 CapsuleNameCapsuleTotalNumber = 0;
232 CapsuleNameCapsulePtr = NULL;
233
234 //
235 // Find all capsule images from hob
236 //
237 HobPointer.Raw = GetHobList ();
238 while ((HobPointer.Raw = GetNextHob (EFI_HOB_TYPE_UEFI_CAPSULE, HobPointer.Raw)) != NULL) {
239 if (!IsValidCapsuleHeader ((VOID *)(UINTN)HobPointer.Capsule->BaseAddress, HobPointer.Capsule->Length)) {
240 HobPointer.Header->HobType = EFI_HOB_TYPE_UNUSED; // Mark this hob as invalid
241 } else {
242 if (IsCapsuleNameCapsule ((VOID *)(UINTN)HobPointer.Capsule->BaseAddress)) {
243 CapsuleNameCapsuleTotalNumber++;
244 } else {
245 mCapsuleTotalNumber++;
246 }
247 }
248
249 HobPointer.Raw = GET_NEXT_HOB (HobPointer);
250 }
251
252 DEBUG ((DEBUG_INFO, "mCapsuleTotalNumber - 0x%x\n", mCapsuleTotalNumber));
253
254 if (mCapsuleTotalNumber == 0) {
255 return;
256 }
257
258 //
259 // Init temp Capsule Data table.
260 //
261 mCapsulePtr = (VOID **)AllocateZeroPool (sizeof (VOID *) * mCapsuleTotalNumber);
262 if (mCapsulePtr == NULL) {
263 DEBUG ((DEBUG_ERROR, "Allocate mCapsulePtr fail!\n"));
264 mCapsuleTotalNumber = 0;
265 return;
266 }
267
268 mCapsuleStatusArray = (EFI_STATUS *)AllocateZeroPool (sizeof (EFI_STATUS) * mCapsuleTotalNumber);
269 if (mCapsuleStatusArray == NULL) {
270 DEBUG ((DEBUG_ERROR, "Allocate mCapsuleStatusArray fail!\n"));
271 FreePool (mCapsulePtr);
272 mCapsulePtr = NULL;
273 mCapsuleTotalNumber = 0;
274 return;
275 }
276
277 SetMemN (mCapsuleStatusArray, sizeof (EFI_STATUS) * mCapsuleTotalNumber, EFI_NOT_READY);
278
279 CapsuleNameCapsulePtr = (VOID **)AllocateZeroPool (sizeof (VOID *) * CapsuleNameCapsuleTotalNumber);
280 if (CapsuleNameCapsulePtr == NULL) {
281 DEBUG ((DEBUG_ERROR, "Allocate CapsuleNameCapsulePtr fail!\n"));
282 FreePool (mCapsulePtr);
283 FreePool (mCapsuleStatusArray);
284 mCapsulePtr = NULL;
285 mCapsuleStatusArray = NULL;
286 mCapsuleTotalNumber = 0;
287 return;
288 }
289
290 //
291 // Find all capsule images from hob
292 //
293 HobPointer.Raw = GetHobList ();
294 Index = 0;
295 Index2 = 0;
296 while ((HobPointer.Raw = GetNextHob (EFI_HOB_TYPE_UEFI_CAPSULE, HobPointer.Raw)) != NULL) {
297 if (IsCapsuleNameCapsule ((VOID *)(UINTN)HobPointer.Capsule->BaseAddress)) {
298 CapsuleNameCapsulePtr[Index2++] = (VOID *)(UINTN)HobPointer.Capsule->BaseAddress;
299 } else {
300 mCapsulePtr[Index++] = (VOID *)(UINTN)HobPointer.Capsule->BaseAddress;
301 }
302
303 HobPointer.Raw = GET_NEXT_HOB (HobPointer);
304 }
305
306 //
307 // Find Capsule On Disk Names
308 //
309 for (Index = 0; Index < CapsuleNameCapsuleTotalNumber; Index++) {
310 CapsuleNameAddress = ValidateCapsuleNameCapsuleIntegrity (CapsuleNameCapsulePtr[Index], &CapsuleNameNumber);
311 if (CapsuleNameAddress != NULL ) {
312 CapsuleNameTotalNumber += CapsuleNameNumber;
313 }
314 }
315
316 if (CapsuleNameTotalNumber == mCapsuleTotalNumber) {
317 mCapsuleNamePtr = (CHAR16 **)AllocateZeroPool (sizeof (CHAR16 *) * mCapsuleTotalNumber);
318 if (mCapsuleNamePtr == NULL) {
319 DEBUG ((DEBUG_ERROR, "Allocate mCapsuleNamePtr fail!\n"));
320 FreePool (mCapsulePtr);
321 FreePool (mCapsuleStatusArray);
322 FreePool (CapsuleNameCapsulePtr);
323 mCapsulePtr = NULL;
324 mCapsuleStatusArray = NULL;
325 mCapsuleTotalNumber = 0;
326 return;
327 }
328
329 for (Index = 0, Index3 = 0; Index < CapsuleNameCapsuleTotalNumber; Index++) {
330 CapsuleNameAddress = ValidateCapsuleNameCapsuleIntegrity (CapsuleNameCapsulePtr[Index], &CapsuleNameNumber);
331 if (CapsuleNameAddress != NULL ) {
332 for (Index2 = 0; Index2 < CapsuleNameNumber; Index2++) {
333 mCapsuleNamePtr[Index3++] = (CHAR16 *)(UINTN)CapsuleNameAddress[Index2];
334 }
335 }
336 }
337 } else {
338 mCapsuleNamePtr = NULL;
339 }
340
341 FreePool (CapsuleNameCapsulePtr);
342}
343
350BOOLEAN
352 VOID
353 )
354{
355 UINTN Index;
356
357 for (Index = 0; Index < mCapsuleTotalNumber; Index++) {
358 if (mCapsuleStatusArray[Index] == EFI_NOT_READY) {
359 return FALSE;
360 }
361 }
362
363 return TRUE;
364}
365
369VOID
371 VOID
372 )
373{
374 VOID **CapsulePtrCache;
375 EFI_GUID *CapsuleGuidCache;
376 EFI_CAPSULE_HEADER *CapsuleHeader;
377 EFI_CAPSULE_TABLE *CapsuleTable;
378 UINT32 CacheIndex;
379 UINT32 CacheNumber;
380 UINT32 CapsuleNumber;
381 UINTN Index;
382 UINTN Size;
383 EFI_STATUS Status;
384
385 if (mCapsuleTotalNumber == 0) {
386 return;
387 }
388
389 CapsulePtrCache = NULL;
390 CapsuleGuidCache = NULL;
391 CacheIndex = 0;
392 CacheNumber = 0;
393
394 CapsulePtrCache = (VOID **)AllocateZeroPool (sizeof (VOID *) * mCapsuleTotalNumber);
395 if (CapsulePtrCache == NULL) {
396 DEBUG ((DEBUG_ERROR, "Allocate CapsulePtrCache fail!\n"));
397 return;
398 }
399
400 CapsuleGuidCache = (EFI_GUID *)AllocateZeroPool (sizeof (EFI_GUID) * mCapsuleTotalNumber);
401 if (CapsuleGuidCache == NULL) {
402 DEBUG ((DEBUG_ERROR, "Allocate CapsuleGuidCache fail!\n"));
403 FreePool (CapsulePtrCache);
404 return;
405 }
406
407 //
408 // Capsules who have CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE always are used for operating
409 // System to have information persist across a system reset. EFI System Table must
410 // point to an array of capsules that contains the same CapsuleGuid value. And agents
411 // searching for this type capsule will look in EFI System Table and search for the
412 // capsule's Guid and associated pointer to retrieve the data. Two steps below describes
413 // how to sorting the capsules by the unique guid and install the array to EFI System Table.
414 // Firstly, Loop for all coalesced capsules, record unique CapsuleGuids and cache them in an
415 // array for later sorting capsules by CapsuleGuid.
416 //
417 for (Index = 0; Index < mCapsuleTotalNumber; Index++) {
418 CapsuleHeader = (EFI_CAPSULE_HEADER *)mCapsulePtr[Index];
419 if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0) {
420 //
421 // For each capsule, we compare it with known CapsuleGuid in the CacheArray.
422 // If already has the Guid, skip it. Whereas, record it in the CacheArray as
423 // an additional one.
424 //
425 CacheIndex = 0;
426 while (CacheIndex < CacheNumber) {
427 if (CompareGuid (&CapsuleGuidCache[CacheIndex], &CapsuleHeader->CapsuleGuid)) {
428 break;
429 }
430
431 CacheIndex++;
432 }
433
434 if (CacheIndex == CacheNumber) {
435 CopyMem (&CapsuleGuidCache[CacheNumber++], &CapsuleHeader->CapsuleGuid, sizeof (EFI_GUID));
436 }
437 }
438 }
439
440 //
441 // Secondly, for each unique CapsuleGuid in CacheArray, gather all coalesced capsules
442 // whose guid is the same as it, and malloc memory for an array which preceding
443 // with UINT32. The array fills with entry point of capsules that have the same
444 // CapsuleGuid, and UINT32 represents the size of the array of capsules. Then install
445 // this array into EFI System Table, so that agents searching for this type capsule
446 // will look in EFI System Table and search for the capsule's Guid and associated
447 // pointer to retrieve the data.
448 //
449 for (CacheIndex = 0; CacheIndex < CacheNumber; CacheIndex++) {
450 CapsuleNumber = 0;
451 for (Index = 0; Index < mCapsuleTotalNumber; Index++) {
452 CapsuleHeader = (EFI_CAPSULE_HEADER *)mCapsulePtr[Index];
453 if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0) {
454 if (CompareGuid (&CapsuleGuidCache[CacheIndex], &CapsuleHeader->CapsuleGuid)) {
455 //
456 // Cache Caspuleheader to the array, this array is uniqued with certain CapsuleGuid.
457 //
458 CapsulePtrCache[CapsuleNumber++] = (VOID *)CapsuleHeader;
459 }
460 }
461 }
462
463 if (CapsuleNumber != 0) {
464 Size = sizeof (EFI_CAPSULE_TABLE) + (CapsuleNumber - 1) * sizeof (VOID *);
465 CapsuleTable = AllocateRuntimePool (Size);
466 if (CapsuleTable == NULL) {
467 DEBUG ((DEBUG_ERROR, "Allocate CapsuleTable (%g) fail!\n", &CapsuleGuidCache[CacheIndex]));
468 continue;
469 }
470
471 CapsuleTable->CapsuleArrayNumber = CapsuleNumber;
472 CopyMem (&CapsuleTable->CapsulePtr[0], CapsulePtrCache, CapsuleNumber * sizeof (VOID *));
473 Status = gBS->InstallConfigurationTable (&CapsuleGuidCache[CacheIndex], (VOID *)CapsuleTable);
474 if (EFI_ERROR (Status)) {
475 DEBUG ((DEBUG_ERROR, "InstallConfigurationTable (%g) fail!\n", &CapsuleGuidCache[CacheIndex]));
476 }
477 }
478 }
479
480 FreePool (CapsuleGuidCache);
481 FreePool (CapsulePtrCache);
482}
483
501 IN BOOLEAN FirstRound
502 )
503{
504 EFI_STATUS Status;
505 EFI_CAPSULE_HEADER *CapsuleHeader;
506 UINT32 Index;
507 ESRT_MANAGEMENT_PROTOCOL *EsrtManagement;
508 UINT16 EmbeddedDriverCount;
509 BOOLEAN ResetRequired;
510 CHAR16 *CapsuleName;
511
512 REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE | PcdGet32 (PcdStatusCodeSubClassCapsule) | PcdGet32 (PcdCapsuleStatusCodeProcessCapsulesBegin)));
513
514 if (FirstRound) {
516 }
517
518 if (mCapsuleTotalNumber == 0) {
519 //
520 // We didn't find a hob, so had no errors.
521 //
522 DEBUG ((DEBUG_ERROR, "We can not find capsule data in capsule update boot mode.\n"));
523 mNeedReset = TRUE;
524 return EFI_SUCCESS;
525 }
526
527 if (AreAllImagesProcessed ()) {
528 return EFI_SUCCESS;
529 }
530
531 //
532 // Check the capsule flags,if contains CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE, install
533 // capsuleTable to configure table with EFI_CAPSULE_GUID
534 //
535 if (FirstRound) {
537 }
538
539 REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE | PcdGet32 (PcdStatusCodeSubClassCapsule) | PcdGet32 (PcdCapsuleStatusCodeUpdatingFirmware)));
540
541 //
542 // If Windows UX capsule exist, process it first
543 //
544 for (Index = 0; Index < mCapsuleTotalNumber; Index++) {
545 CapsuleHeader = (EFI_CAPSULE_HEADER *)mCapsulePtr[Index];
546 CapsuleName = (mCapsuleNamePtr == NULL) ? NULL : mCapsuleNamePtr[Index];
547 if (CompareGuid (&CapsuleHeader->CapsuleGuid, &gWindowsUxCapsuleGuid)) {
548 DEBUG ((DEBUG_INFO, "ProcessThisCapsuleImage (Ux) - 0x%x\n", CapsuleHeader));
549 DEBUG ((DEBUG_INFO, "Display logo capsule is found.\n"));
550 Status = ProcessThisCapsuleImage (CapsuleHeader, CapsuleName, NULL);
551 mCapsuleStatusArray[Index] = EFI_SUCCESS;
552 DEBUG ((DEBUG_INFO, "ProcessThisCapsuleImage (Ux) - %r\n", Status));
553 break;
554 }
555 }
556
557 DEBUG ((DEBUG_INFO, "Updating the firmware ......\n"));
558
559 //
560 // All capsules left are recognized by platform.
561 //
562 for (Index = 0; Index < mCapsuleTotalNumber; Index++) {
563 if (mCapsuleStatusArray[Index] != EFI_NOT_READY) {
564 // already processed
565 continue;
566 }
567
568 CapsuleHeader = (EFI_CAPSULE_HEADER *)mCapsulePtr[Index];
569 CapsuleName = (mCapsuleNamePtr == NULL) ? NULL : mCapsuleNamePtr[Index];
570 if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gWindowsUxCapsuleGuid)) {
571 //
572 // Call capsule library to process capsule image.
573 //
574 EmbeddedDriverCount = 0;
575 if (IsFmpCapsule (CapsuleHeader)) {
576 Status = ValidateFmpCapsule (CapsuleHeader, &EmbeddedDriverCount);
577 if (EFI_ERROR (Status)) {
578 DEBUG ((DEBUG_ERROR, "ValidateFmpCapsule failed. Ignore!\n"));
579 mCapsuleStatusArray[Index] = EFI_ABORTED;
580 continue;
581 }
582 } else {
583 mCapsuleStatusArray[Index] = EFI_ABORTED;
584 continue;
585 }
586
587 if ((!FirstRound) || (EmbeddedDriverCount == 0)) {
588 DEBUG ((DEBUG_INFO, "ProcessThisCapsuleImage - 0x%x\n", CapsuleHeader));
589 ResetRequired = FALSE;
590 Status = ProcessThisCapsuleImage (CapsuleHeader, CapsuleName, &ResetRequired);
591 mCapsuleStatusArray[Index] = Status;
592 DEBUG ((DEBUG_INFO, "ProcessThisCapsuleImage - %r\n", Status));
593
594 if (Status != EFI_NOT_READY) {
595 if (EFI_ERROR (Status)) {
596 REPORT_STATUS_CODE (EFI_ERROR_CODE, (EFI_SOFTWARE | PcdGet32 (PcdStatusCodeSubClassCapsule) | PcdGet32 (PcdCapsuleStatusCodeUpdateFirmwareFailed)));
597 DEBUG ((DEBUG_ERROR, "Capsule process failed!\n"));
598 } else {
599 REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE | PcdGet32 (PcdStatusCodeSubClassCapsule) | PcdGet32 (PcdCapsuleStatusCodeUpdateFirmwareSuccess)));
600 }
601
602 mNeedReset |= ResetRequired;
603 if ((CapsuleHeader->Flags & PcdGet16 (PcdSystemRebootAfterCapsuleProcessFlag)) != 0) {
604 mNeedReset = TRUE;
605 }
606 }
607 }
608 }
609 }
610
611 Status = gBS->LocateProtocol (&gEsrtManagementProtocolGuid, NULL, (VOID **)&EsrtManagement);
612 //
613 // Always sync ESRT Cache from FMP Instance
614 //
615 if (!EFI_ERROR (Status)) {
616 EsrtManagement->SyncEsrtFmp ();
617 }
618
619 Status = EFI_SUCCESS;
620
621 REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE | PcdGet32 (PcdStatusCodeSubClassCapsule) | PcdGet32 (PcdCapsuleStatusCodeProcessCapsulesEnd)));
622
623 return Status;
624}
625
629VOID
631 VOID
632 )
633{
634 DEBUG ((DEBUG_INFO, "Capsule Request Cold Reboot."));
635
636 REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE | PcdGet32 (PcdStatusCodeSubClassCapsule) | PcdGet32 (PcdCapsuleStatusCodeResettingSystem)));
637
638 gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
639
640 CpuDeadLoop ();
641}
642
675EFIAPI
677 VOID
678 )
679{
680 EFI_STATUS Status;
681
682 if (!mDxeCapsuleLibEndOfDxe) {
683 Status = ProcessTheseCapsules (TRUE);
684
685 //
686 // Reboot System if and only if all capsule processed.
687 // If not, defer reset to 2nd process.
688 //
689 if (mNeedReset && AreAllImagesProcessed ()) {
690 DoResetSystem ();
691 }
692 } else {
693 Status = ProcessTheseCapsules (FALSE);
694 //
695 // Reboot System if required after all capsule processed
696 //
697 if (mNeedReset) {
698 DoResetSystem ();
699 }
700 }
701
702 return Status;
703}
UINT64 UINTN
VOID *EFIAPI GetNextHob(IN UINT16 Type, IN CONST VOID *HobStart)
Definition: HobLib.c:103
VOID *EFIAPI GetHobList(VOID)
Definition: HobLib.c:76
VOID EFIAPI CpuDeadLoop(VOID)
Definition: CpuDeadLoop.c:25
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI SetMemN(OUT VOID *Buffer, IN UINTN Length, IN UINTN Value)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
EFI_STATUS EFIAPI DisplayUpdateProgress(IN UINTN Completion, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION *Color OPTIONAL)
VOID DoResetSystem(VOID)
EFI_STATUS ValidateFmpCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader, OUT UINT16 *EmbeddedDriverCount OPTIONAL)
BOOLEAN IsFmpCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader)
VOID InitCapsulePtr(VOID)
EDKII_FIRMWARE_MANAGEMENT_PROGRESS_PROTOCOL * mFmpProgress
Definition: FmpDxe.c:36
EFI_STATUS ProcessTheseCapsules(IN BOOLEAN FirstRound)
BOOLEAN AreAllImagesProcessed(VOID)
EFI_PHYSICAL_ADDRESS * ValidateCapsuleNameCapsuleIntegrity(IN EFI_CAPSULE_HEADER *CapsuleHeader, OUT UINTN *CapsuleNameNum)
Definition: CapsuleOnDisk.c:39
BOOLEAN IsCapsuleNameCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader)
EFI_STATUS EFIAPI ProcessThisCapsuleImage(IN EFI_CAPSULE_HEADER *CapsuleHeader, IN CHAR16 *CapFileName OPTIONAL, OUT BOOLEAN *ResetRequired OPTIONAL)
EFI_STATUS EFIAPI UpdateImageProgress(IN UINTN Completion)
BOOLEAN IsValidCapsuleHeader(IN EFI_CAPSULE_HEADER *CapsuleHeader, IN UINT64 CapsuleSize)
Definition: CapsuleApp.c:247
VOID PopulateCapsuleInConfigurationTable(VOID)
EFI_STATUS EFIAPI ProcessCapsules(VOID)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateRuntimePool(IN UINTN AllocationSize)
EFI_RUNTIME_SERVICES * gRT
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define REPORT_STATUS_CODE(Type, Value)
#define PcdGet16(TokenName)
Definition: PcdLib.h:349
#define PcdGet32(TokenName)
Definition: PcdLib.h:362
#define EFI_PROGRESS_CODE
Definition: PiStatusCode.h:43
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
@ EfiResetCold
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION ProgressBarForegroundColor
EFI_GUID CapsuleGuid
Definition: UefiSpec.h:1682
UINT32 CapsuleArrayNumber
Definition: UefiSpec.h:1710
VOID * CapsulePtr[1]
Definition: UefiSpec.h:1714
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:486
Definition: Base.h:213