3 Responsibility of this module is to load the DXE Core from a Firmware Volume.
5 Copyright (c) 2016 HP Development Company, L.P.
6 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
15 // Module Globals used in the DXE to PEI hand off
16 // These must be module globals, so the stack can be switched
18 CONST EFI_DXE_IPL_PPI mDxeIplPpi
= {
22 CONST EFI_PEI_PPI_DESCRIPTOR mDxeIplPpiList
= {
23 EFI_PEI_PPI_DESCRIPTOR_PPI
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
,
28 CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI mCustomGuidedSectionExtractionPpi
= {
29 CustomGuidedSectionExtract
32 CONST EFI_PEI_DECOMPRESS_PPI mDecompressPpi
= {
36 CONST EFI_PEI_PPI_DESCRIPTOR mDecompressPpiList
= {
37 (EFI_PEI_PPI_DESCRIPTOR_PPI
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
),
38 &gEfiPeiDecompressPpiGuid
,
39 (VOID
*) &mDecompressPpi
42 CONST EFI_PEI_PPI_DESCRIPTOR gEndOfPeiSignalPpi
= {
43 (EFI_PEI_PPI_DESCRIPTOR_PPI
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
),
44 &gEfiEndOfPeiSignalPpiGuid
,
48 CONST EFI_PEI_NOTIFY_DESCRIPTOR mMemoryDiscoveredNotifyList
= {
49 (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
),
50 &gEfiPeiMemoryDiscoveredPpiGuid
,
51 InstallIplPermanentMemoryPpis
55 Entry point of DXE IPL PEIM.
57 This function installs DXE IPL PPI. It also reloads
58 itself to memory on non-S3 resume boot path.
60 @param FileHandle Handle of the file being invoked.
61 @param PeiServices Describes the list of possible PEI Services.
63 @retval EFI_SUCESS The entry point of DXE IPL PEIM executes successfully.
64 @retval Others Some error occurs during the execution of this function.
69 PeimInitializeDxeIpl (
70 IN EFI_PEI_FILE_HANDLE FileHandle
,
71 IN CONST EFI_PEI_SERVICES
**PeiServices
75 EFI_BOOT_MODE BootMode
;
78 BootMode
= GetBootModeHob ();
80 if (BootMode
!= BOOT_ON_S3_RESUME
) {
81 Status
= PeiServicesRegisterForShadow (FileHandle
);
82 if (Status
== EFI_SUCCESS
) {
84 // EFI_SUCESS means it is the first time to call register for shadow.
90 // Ensure that DXE IPL is shadowed to permanent memory.
92 ASSERT (Status
== EFI_ALREADY_STARTED
);
95 // DXE core load requires permanent memory.
97 Status
= PeiServicesLocatePpi (
98 &gEfiPeiMemoryDiscoveredPpiGuid
,
103 ASSERT_EFI_ERROR (Status
);
104 if (EFI_ERROR (Status
)) {
109 // Now the permanent memory exists, install the PPIs for decompression
110 // and section extraction.
112 Status
= InstallIplPermanentMemoryPpis (NULL
, NULL
, NULL
);
113 ASSERT_EFI_ERROR (Status
);
116 // Install memory discovered PPI notification to install PPIs for
117 // decompression and section extraction.
119 Status
= PeiServicesNotifyPpi (&mMemoryDiscoveredNotifyList
);
120 ASSERT_EFI_ERROR (Status
);
124 // Install DxeIpl PPI.
126 Status
= PeiServicesInstallPpi (&mDxeIplPpiList
);
127 ASSERT_EFI_ERROR(Status
);
133 This function installs the PPIs that require permanent memory.
135 @param PeiServices Indirect reference to the PEI Services Table.
136 @param NotifyDescriptor Address of the notification descriptor data structure.
137 @param Ppi Address of the PPI that was installed.
139 @return EFI_SUCCESS The PPIs were installed successfully.
140 @return Others Some error occurs during the execution of this function.
145 InstallIplPermanentMemoryPpis (
146 IN EFI_PEI_SERVICES
**PeiServices
,
147 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,
152 EFI_GUID
*ExtractHandlerGuidTable
;
153 UINTN ExtractHandlerNumber
;
154 EFI_PEI_PPI_DESCRIPTOR
*GuidPpi
;
157 // Get custom extract guided section method guid list
159 ExtractHandlerNumber
= ExtractGuidedSectionGetGuidList (&ExtractHandlerGuidTable
);
162 // Install custom guided section extraction PPI
164 if (ExtractHandlerNumber
> 0) {
165 GuidPpi
= (EFI_PEI_PPI_DESCRIPTOR
*) AllocatePool (ExtractHandlerNumber
* sizeof (EFI_PEI_PPI_DESCRIPTOR
));
166 ASSERT (GuidPpi
!= NULL
);
167 while (ExtractHandlerNumber
-- > 0) {
168 GuidPpi
->Flags
= EFI_PEI_PPI_DESCRIPTOR_PPI
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
;
169 GuidPpi
->Ppi
= (VOID
*) &mCustomGuidedSectionExtractionPpi
;
170 GuidPpi
->Guid
= &ExtractHandlerGuidTable
[ExtractHandlerNumber
];
171 Status
= PeiServicesInstallPpi (GuidPpi
++);
172 ASSERT_EFI_ERROR(Status
);
177 // Install Decompress PPI.
179 Status
= PeiServicesInstallPpi (&mDecompressPpiList
);
180 ASSERT_EFI_ERROR(Status
);
186 Validate variable data for the MemoryTypeInformation.
188 @param MemoryData Variable data.
189 @param MemoryDataSize Variable data length.
191 @return TRUE The variable data is valid.
192 @return FALSE The variable data is invalid.
196 ValidateMemoryTypeInfoVariable (
197 IN EFI_MEMORY_TYPE_INFORMATION
*MemoryData
,
198 IN UINTN MemoryDataSize
204 // Check the input parameter.
205 if (MemoryData
== NULL
) {
210 Count
= MemoryDataSize
/ sizeof (*MemoryData
);
213 if (Count
* sizeof(*MemoryData
) != MemoryDataSize
) {
217 // Check last entry type filed.
218 if (MemoryData
[Count
- 1].Type
!= EfiMaxMemoryType
) {
222 // Check the type filed.
223 for (Index
= 0; Index
< Count
- 1; Index
++) {
224 if (MemoryData
[Index
].Type
>= EfiMaxMemoryType
) {
233 Main entry point to last PEIM.
235 This function finds DXE Core in the firmware volume and transfer the control to
238 @param This Entry point for DXE IPL PPI.
239 @param PeiServices General purpose services available to every PEIM.
240 @param HobList Address to the Pei HOB list.
242 @return EFI_SUCCESS DXE core was successfully loaded.
243 @return EFI_OUT_OF_RESOURCES There are not enough resources to load DXE core.
249 IN CONST EFI_DXE_IPL_PPI
*This
,
250 IN EFI_PEI_SERVICES
**PeiServices
,
251 IN EFI_PEI_HOB_POINTERS HobList
255 EFI_FV_FILE_INFO DxeCoreFileInfo
;
256 EFI_PHYSICAL_ADDRESS DxeCoreAddress
;
258 EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint
;
259 EFI_BOOT_MODE BootMode
;
260 EFI_PEI_FILE_HANDLE FileHandle
;
261 EFI_PEI_READ_ONLY_VARIABLE2_PPI
*Variable
;
262 EFI_PEI_LOAD_FILE_PPI
*LoadFile
;
264 UINT32 AuthenticationState
;
266 EFI_PEI_S3_RESUME2_PPI
*S3Resume
;
267 EFI_PEI_RECOVERY_MODULE_PPI
*PeiRecovery
;
268 EFI_MEMORY_TYPE_INFORMATION MemoryData
[EfiMaxMemoryType
+ 1];
271 // if in S3 Resume, restore configure
273 BootMode
= GetBootModeHob ();
275 if (BootMode
== BOOT_ON_S3_RESUME
) {
276 Status
= PeiServicesLocatePpi (
277 &gEfiPeiS3Resume2PpiGuid
,
282 if (EFI_ERROR (Status
)) {
284 // Report Status code that S3Resume PPI can not be found
287 EFI_ERROR_CODE
| EFI_ERROR_MAJOR
,
288 (EFI_SOFTWARE_PEI_MODULE
| EFI_SW_PEI_EC_S3_RESUME_PPI_NOT_FOUND
)
291 ASSERT_EFI_ERROR (Status
);
293 Status
= S3Resume
->S3RestoreConfig2 (S3Resume
);
294 ASSERT_EFI_ERROR (Status
);
295 } else if (BootMode
== BOOT_IN_RECOVERY_MODE
) {
296 REPORT_STATUS_CODE (EFI_PROGRESS_CODE
, (EFI_SOFTWARE_PEI_MODULE
| EFI_SW_PEI_PC_RECOVERY_BEGIN
));
297 Status
= PeiServicesLocatePpi (
298 &gEfiPeiRecoveryModulePpiGuid
,
301 (VOID
**) &PeiRecovery
304 if (EFI_ERROR (Status
)) {
305 DEBUG ((DEBUG_ERROR
, "Locate Recovery PPI Failed.(Status = %r)\n", Status
));
307 // Report Status code the failure of locating Recovery PPI
310 EFI_ERROR_CODE
| EFI_ERROR_MAJOR
,
311 (EFI_SOFTWARE_PEI_MODULE
| EFI_SW_PEI_EC_RECOVERY_PPI_NOT_FOUND
)
316 REPORT_STATUS_CODE (EFI_PROGRESS_CODE
, (EFI_SOFTWARE_PEI_MODULE
| EFI_SW_PEI_PC_CAPSULE_LOAD
));
317 Status
= PeiRecovery
->LoadRecoveryCapsule (PeiServices
, PeiRecovery
);
318 if (EFI_ERROR (Status
)) {
319 DEBUG ((DEBUG_ERROR
, "Load Recovery Capsule Failed.(Status = %r)\n", Status
));
321 // Report Status code that recovery image can not be found
324 EFI_ERROR_CODE
| EFI_ERROR_MAJOR
,
325 (EFI_SOFTWARE_PEI_MODULE
| EFI_SW_PEI_EC_NO_RECOVERY_CAPSULE
)
329 REPORT_STATUS_CODE (EFI_PROGRESS_CODE
, (EFI_SOFTWARE_PEI_MODULE
| EFI_SW_PEI_PC_CAPSULE_START
));
331 // Now should have a HOB with the DXE core
335 if (GetFirstGuidHob ((CONST EFI_GUID
*)&gEfiMemoryTypeInformationGuid
) == NULL
) {
337 // Don't build GuidHob if GuidHob has been installed.
339 Status
= PeiServicesLocatePpi (
340 &gEfiPeiReadOnlyVariable2PpiGuid
,
345 if (!EFI_ERROR (Status
)) {
346 DataSize
= sizeof (MemoryData
);
347 Status
= Variable
->GetVariable (
349 EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME
,
350 &gEfiMemoryTypeInformationGuid
,
355 if (!EFI_ERROR (Status
) && ValidateMemoryTypeInfoVariable(MemoryData
, DataSize
)) {
357 // Build the GUID'd HOB for DXE
360 &gEfiMemoryTypeInformationGuid
,
369 // Look in all the FVs present in PEI and find the DXE Core FileHandle
371 FileHandle
= DxeIplFindDxeCore ();
374 // Load the DXE Core from a Firmware Volume.
378 Status
= PeiServicesLocatePpi (&gEfiPeiLoadFilePpiGuid
, Instance
++, NULL
, (VOID
**) &LoadFile
);
380 // These must exist an instance of EFI_PEI_LOAD_FILE_PPI to support to load DxeCore file handle successfully.
382 ASSERT_EFI_ERROR (Status
);
384 Status
= LoadFile
->LoadFile (
392 } while (EFI_ERROR (Status
));
395 // Get the DxeCore File Info from the FileHandle for the DxeCore GUID file name.
397 Status
= PeiServicesFfsGetFileInfo (FileHandle
, &DxeCoreFileInfo
);
398 ASSERT_EFI_ERROR (Status
);
401 // Add HOB for the DXE Core
404 &DxeCoreFileInfo
.FileName
,
406 ALIGN_VALUE (DxeCoreSize
, EFI_PAGE_SIZE
),
411 // Report Status Code EFI_SW_PEI_PC_HANDOFF_TO_NEXT
413 REPORT_STATUS_CODE (EFI_PROGRESS_CODE
, (EFI_SOFTWARE_PEI_CORE
| EFI_SW_PEI_CORE_PC_HANDOFF_TO_NEXT
));
415 DEBUG ((DEBUG_INFO
| DEBUG_LOAD
, "Loading DXE CORE at 0x%11p EntryPoint=0x%11p\n", (VOID
*)(UINTN
)DxeCoreAddress
, FUNCTION_ENTRY_POINT (DxeCoreEntryPoint
)));
418 // Transfer control to the DXE Core
419 // The hand off state is simply a pointer to the HOB list
421 HandOffToDxeCore (DxeCoreEntryPoint
, HobList
);
423 // If we get here, then the DXE Core returned. This is an error
424 // DxeCore should not return.
429 return EFI_OUT_OF_RESOURCES
;
434 Searches DxeCore in all firmware Volumes and loads the first
435 instance that contains DxeCore.
437 @return FileHandle of DxeCore to load DxeCore.
447 EFI_PEI_FV_HANDLE VolumeHandle
;
448 EFI_PEI_FILE_HANDLE FileHandle
;
453 // Traverse all firmware volume instances
455 Status
= PeiServicesFfsFindNextVolume (Instance
, &VolumeHandle
);
457 // If some error occurs here, then we cannot find any firmware
458 // volume that may contain DxeCore.
460 if (EFI_ERROR (Status
)) {
461 REPORT_STATUS_CODE (EFI_PROGRESS_CODE
, (EFI_SOFTWARE_PEI_MODULE
| EFI_SW_PEI_CORE_EC_DXE_CORRUPT
));
463 ASSERT_EFI_ERROR (Status
);
466 // Find the DxeCore file type from the beginning in this firmware volume.
469 Status
= PeiServicesFfsFindNextFile (EFI_FV_FILETYPE_DXE_CORE
, VolumeHandle
, &FileHandle
);
470 if (!EFI_ERROR (Status
)) {
472 // Find DxeCore FileHandle in this volume, then we skip other firmware volume and
473 // return the FileHandle.
478 // We cannot find DxeCore in this firmware volume, then search the next volume.
487 The ExtractSection() function processes the input section and
488 returns a pointer to the section contents. If the section being
489 extracted does not require processing (if the section
490 GuidedSectionHeader.Attributes has the
491 EFI_GUIDED_SECTION_PROCESSING_REQUIRED field cleared), then
492 OutputBuffer is just updated to point to the start of the
493 section's contents. Otherwise, *Buffer must be allocated
494 from PEI permanent memory.
496 @param This Indicates the
497 EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI instance.
498 Buffer containing the input GUIDed section to be
499 processed. OutputBuffer OutputBuffer is
500 allocated from PEI permanent memory and contains
501 the new section stream.
502 @param InputSection A pointer to the input buffer, which contains
503 the input section to be processed.
504 @param OutputBuffer A pointer to a caller-allocated buffer, whose
505 size is specified by the contents of OutputSize.
506 @param OutputSize A pointer to a caller-allocated
507 UINTN in which the size of *OutputBuffer
508 allocation is stored. If the function
509 returns anything other than EFI_SUCCESS,
510 the value of OutputSize is undefined.
511 @param AuthenticationStatus A pointer to a caller-allocated
512 UINT32 that indicates the
513 authentication status of the
514 output buffer. If the input
515 section's GuidedSectionHeader.
516 Attributes field has the
517 EFI_GUIDED_SECTION_AUTH_STATUS_VALID
519 AuthenticationStatus must return
520 zero. These bits reflect the
521 status of the extraction
522 operation. If the function
523 returns anything other than
524 EFI_SUCCESS, the value of
525 AuthenticationStatus is
528 @retval EFI_SUCCESS The InputSection was
529 successfully processed and the
530 section contents were returned.
532 @retval EFI_OUT_OF_RESOURCES The system has insufficient
533 resources to process the request.
535 @retval EFI_INVALID_PARAMETER The GUID in InputSection does
536 not match this instance of the
537 GUIDed Section Extraction PPI.
542 CustomGuidedSectionExtract (
543 IN CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
*This
,
544 IN CONST VOID
*InputSection
,
545 OUT VOID
**OutputBuffer
,
546 OUT UINTN
*OutputSize
,
547 OUT UINT32
*AuthenticationStatus
551 UINT8
*ScratchBuffer
;
552 UINT32 ScratchBufferSize
;
553 UINT32 OutputBufferSize
;
554 UINT16 SectionAttribute
;
557 // Init local variable
559 ScratchBuffer
= NULL
;
562 // Call GetInfo to get the size and attribute of input guided section data.
564 Status
= ExtractGuidedSectionGetInfo (
571 if (EFI_ERROR (Status
)) {
572 DEBUG ((DEBUG_ERROR
, "GetInfo from guided section Failed - %r\n", Status
));
576 if (ScratchBufferSize
!= 0) {
578 // Allocate scratch buffer
580 ScratchBuffer
= AllocatePages (EFI_SIZE_TO_PAGES (ScratchBufferSize
));
581 if (ScratchBuffer
== NULL
) {
582 return EFI_OUT_OF_RESOURCES
;
586 if (((SectionAttribute
& EFI_GUIDED_SECTION_PROCESSING_REQUIRED
) != 0) && OutputBufferSize
> 0) {
588 // Allocate output buffer
590 *OutputBuffer
= AllocatePages (EFI_SIZE_TO_PAGES (OutputBufferSize
));
591 if (*OutputBuffer
== NULL
) {
592 return EFI_OUT_OF_RESOURCES
;
594 DEBUG ((DEBUG_INFO
, "Customized Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize
, *OutputBuffer
));
597 Status
= ExtractGuidedSectionDecode (
603 if (EFI_ERROR (Status
)) {
607 DEBUG ((DEBUG_ERROR
, "Extract guided section Failed - %r\n", Status
));
611 *OutputSize
= (UINTN
) OutputBufferSize
;
619 Decompresses a section to the output buffer.
621 This function looks up the compression type field in the input section and
622 applies the appropriate compression algorithm to compress the section to a
623 callee allocated buffer.
625 @param This Points to this instance of the
626 EFI_PEI_DECOMPRESS_PEI PPI.
627 @param CompressionSection Points to the compressed section.
628 @param OutputBuffer Holds the returned pointer to the decompressed
630 @param OutputSize Holds the returned size of the decompress
633 @retval EFI_SUCCESS The section was decompressed successfully.
634 OutputBuffer contains the resulting data and
635 OutputSize contains the resulting size.
641 IN CONST EFI_PEI_DECOMPRESS_PPI
*This
,
642 IN CONST EFI_COMPRESSION_SECTION
*CompressionSection
,
643 OUT VOID
**OutputBuffer
,
644 OUT UINTN
*OutputSize
649 UINT8
*ScratchBuffer
;
650 UINT32 DstBufferSize
;
651 UINT32 ScratchBufferSize
;
652 VOID
*CompressionSource
;
653 UINT32 CompressionSourceSize
;
654 UINT32 UncompressedLength
;
655 UINT8 CompressionType
;
657 if (CompressionSection
->CommonHeader
.Type
!= EFI_SECTION_COMPRESSION
) {
659 return EFI_INVALID_PARAMETER
;
662 if (IS_SECTION2 (CompressionSection
)) {
663 CompressionSource
= (VOID
*) ((UINT8
*) CompressionSection
+ sizeof (EFI_COMPRESSION_SECTION2
));
664 CompressionSourceSize
= (UINT32
) (SECTION2_SIZE (CompressionSection
) - sizeof (EFI_COMPRESSION_SECTION2
));
665 UncompressedLength
= ((EFI_COMPRESSION_SECTION2
*) CompressionSection
)->UncompressedLength
;
666 CompressionType
= ((EFI_COMPRESSION_SECTION2
*) CompressionSection
)->CompressionType
;
668 CompressionSource
= (VOID
*) ((UINT8
*) CompressionSection
+ sizeof (EFI_COMPRESSION_SECTION
));
669 CompressionSourceSize
= (UINT32
) (SECTION_SIZE (CompressionSection
) - sizeof (EFI_COMPRESSION_SECTION
));
670 UncompressedLength
= CompressionSection
->UncompressedLength
;
671 CompressionType
= CompressionSection
->CompressionType
;
675 // This is a compression set, expand it
677 switch (CompressionType
) {
678 case EFI_STANDARD_COMPRESSION
:
679 if (FeaturePcdGet(PcdDxeIplSupportUefiDecompress
)) {
681 // Load EFI standard compression.
682 // For compressed data, decompress them to destination buffer.
684 Status
= UefiDecompressGetInfo (
686 CompressionSourceSize
,
690 if (EFI_ERROR (Status
)) {
694 DEBUG ((DEBUG_ERROR
, "Decompress GetInfo Failed - %r\n", Status
));
695 return EFI_NOT_FOUND
;
698 // Allocate scratch buffer
700 ScratchBuffer
= AllocatePages (EFI_SIZE_TO_PAGES (ScratchBufferSize
));
701 if (ScratchBuffer
== NULL
) {
702 return EFI_OUT_OF_RESOURCES
;
705 // Allocate destination buffer
707 DstBuffer
= AllocatePages (EFI_SIZE_TO_PAGES (DstBufferSize
));
708 if (DstBuffer
== NULL
) {
709 return EFI_OUT_OF_RESOURCES
;
712 // Call decompress function
714 Status
= UefiDecompress (
719 if (EFI_ERROR (Status
)) {
723 DEBUG ((DEBUG_ERROR
, "Decompress Failed - %r\n", Status
));
724 return EFI_NOT_FOUND
;
729 // PcdDxeIplSupportUefiDecompress is FALSE
730 // Don't support UEFI decompression algorithm.
733 return EFI_NOT_FOUND
;
736 case EFI_NOT_COMPRESSED
:
738 // Allocate destination buffer
740 DstBufferSize
= UncompressedLength
;
741 DstBuffer
= AllocatePages (EFI_SIZE_TO_PAGES (DstBufferSize
));
742 if (DstBuffer
== NULL
) {
743 return EFI_OUT_OF_RESOURCES
;
746 // stream is not actually compressed, just encapsulated. So just copy it.
748 CopyMem (DstBuffer
, CompressionSource
, DstBufferSize
);
753 // Don't support other unknown compression type.
756 return EFI_NOT_FOUND
;
759 *OutputSize
= DstBufferSize
;
760 *OutputBuffer
= DstBuffer
;
767 Updates the Stack HOB passed to DXE phase.
769 This function traverses the whole HOB list and update the stack HOB to
770 reflect the real stack that is used by DXE core.
772 @param BaseAddress The lower address of stack used by DxeCore.
773 @param Length The length of stack used by DxeCore.
778 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
782 EFI_PEI_HOB_POINTERS Hob
;
784 Hob
.Raw
= GetHobList ();
785 while ((Hob
.Raw
= GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION
, Hob
.Raw
)) != NULL
) {
786 if (CompareGuid (&gEfiHobMemoryAllocStackGuid
, &(Hob
.MemoryAllocationStack
->AllocDescriptor
.Name
))) {
788 // Build a new memory allocation HOB with old stack info with EfiBootServicesData type. Need to
789 // avoid this region be reclaimed by DXE core as the IDT built in SEC might be on stack, and some
790 // PEIMs may also keep key information on stack
792 BuildMemoryAllocationHob (
793 Hob
.MemoryAllocationStack
->AllocDescriptor
.MemoryBaseAddress
,
794 Hob
.MemoryAllocationStack
->AllocDescriptor
.MemoryLength
,
798 // Update the BSP Stack Hob to reflect the new stack info.
800 Hob
.MemoryAllocationStack
->AllocDescriptor
.MemoryBaseAddress
= BaseAddress
;
801 Hob
.MemoryAllocationStack
->AllocDescriptor
.MemoryLength
= Length
;
804 Hob
.Raw
= GET_NEXT_HOB (Hob
);