It consumes FV HOBs and creates read-only Firmare Volume Block protocol\r
instances for each of them.\r
\r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// FvImage buffer is not at its required alignment.\r
//\r
+ DEBUG ((\r
+ DEBUG_ERROR,\r
+ "Unaligned FvImage found at 0x%lx:0x%lx, the required alignment is 0x%x\n",\r
+ BaseAddress,\r
+ Length,\r
+ FvAlignment\r
+ ));\r
return EFI_VOLUME_CORRUPTED;\r
}\r
}\r
FvbDev->BaseAddress = BaseAddress;\r
FvbDev->FvbAttributes = FwVolHeader->Attributes;\r
FvbDev->FwVolBlockInstance.ParentHandle = ParentHandle;\r
- if (ParentHandle != NULL) {\r
- FvbDev->AuthenticationStatus = AuthenticationStatus;\r
- }\r
+ FvbDev->AuthenticationStatus = AuthenticationStatus;\r
\r
//\r
// Init the block caching fields of the device\r
CoreFreePool (FvbDev);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
- \r
+\r
//\r
// Last, fill in the cache with the linear address of the blocks\r
//\r
return EFI_OUT_OF_RESOURCES;\r
}\r
CopyGuid (\r
- &((FV_PIWG_DEVICE_PATH *)FvbDev->DevicePath)->FvDevPath.FvName, \r
+ &((FV_PIWG_DEVICE_PATH *)FvbDev->DevicePath)->FvDevPath.FvName,\r
(GUID *)(UINTN)(BaseAddress + FwVolHeader->ExtHeaderOffset)\r
);\r
}\r
- \r
+\r
//\r
//\r
// Attach FvVolBlock Protocol to new handle\r
)\r
{\r
EFI_PEI_HOB_POINTERS FvHob;\r
+ EFI_PEI_HOB_POINTERS Fv3Hob;\r
+ UINT32 AuthenticationStatus;\r
\r
//\r
// Core Needs Firmware Volumes to function\r
//\r
FvHob.Raw = GetHobList ();\r
while ((FvHob.Raw = GetNextHob (EFI_HOB_TYPE_FV, FvHob.Raw)) != NULL) {\r
+ AuthenticationStatus = 0;\r
+ //\r
+ // Get the authentication status propagated from PEI-phase to DXE.\r
+ //\r
+ Fv3Hob.Raw = GetHobList ();\r
+ while ((Fv3Hob.Raw = GetNextHob (EFI_HOB_TYPE_FV3, Fv3Hob.Raw)) != NULL) {\r
+ if ((Fv3Hob.FirmwareVolume3->BaseAddress == FvHob.FirmwareVolume->BaseAddress) &&\r
+ (Fv3Hob.FirmwareVolume3->Length == FvHob.FirmwareVolume->Length)) {\r
+ AuthenticationStatus = Fv3Hob.FirmwareVolume3->AuthenticationStatus;\r
+ break;\r
+ }\r
+ Fv3Hob.Raw = GET_NEXT_HOB (Fv3Hob);\r
+ }\r
//\r
// Produce an FVB protocol for it\r
//\r
- ProduceFVBProtocolOnBuffer (FvHob.FirmwareVolume->BaseAddress, FvHob.FirmwareVolume->Length, NULL, 0, NULL);\r
+ ProduceFVBProtocolOnBuffer (FvHob.FirmwareVolume->BaseAddress, FvHob.FirmwareVolume->Length, NULL, AuthenticationStatus, NULL);\r
FvHob.Raw = GET_NEXT_HOB (FvHob);\r
}\r
\r