+ VOID *BaseOfStack;\r
+ VOID *TopOfStack;\r
+ EFI_STATUS Status;\r
+ UINTN PageTables;\r
+ UINT32 Index;\r
+ EFI_VECTOR_HANDOFF_INFO *VectorInfo;\r
+ EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;\r
+ VOID *GhcbBase;\r
+ UINTN GhcbSize;\r
+\r
+ //\r
+ // Clear page 0 and mark it as allocated if NULL pointer detection is enabled.\r
+ //\r
+ if (IsNullDetectionEnabled ()) {\r
+ ClearFirst4KPage (HobList.Raw);\r
+ BuildMemoryAllocationHob (0, EFI_PAGES_TO_SIZE (1), EfiBootServicesData);\r
+ }\r
+\r
+ //\r
+ // Get Vector Hand-off Info PPI and build Guided HOB\r
+ //\r
+ Status = PeiServicesLocatePpi (\r
+ &gEfiVectorHandoffInfoPpiGuid,\r
+ 0,\r
+ NULL,\r
+ (VOID **)&VectorHandoffInfoPpi\r
+ );\r
+ if (Status == EFI_SUCCESS) {\r
+ DEBUG ((DEBUG_INFO, "Vector Hand-off Info PPI is gotten, GUIDed HOB is created!\n"));\r
+ VectorInfo = VectorHandoffInfoPpi->Info;\r
+ Index = 1;\r
+ while (VectorInfo->Attribute != EFI_VECTOR_HANDOFF_LAST_ENTRY) {\r
+ VectorInfo++;\r
+ Index++;\r
+ }\r
+\r
+ BuildGuidDataHob (\r
+ &gEfiVectorHandoffInfoPpiGuid,\r
+ VectorHandoffInfoPpi->Info,\r
+ sizeof (EFI_VECTOR_HANDOFF_INFO) * Index\r
+ );\r
+ }\r