diff options
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Common')
6 files changed, 24 insertions, 78 deletions
diff --git a/Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtEdp.bin b/Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtEdp.bin Binary files differdeleted file mode 100644 index 7b4e32699b..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtEdp.bin +++ /dev/null diff --git a/Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtMipi.bin b/Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtMipi.bin Binary files differdeleted file mode 100644 index 23b52baea1..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtMipi.bin +++ /dev/null diff --git a/Platform/BroxtonPlatformPkg/Common/Console/PlatformGopPolicyDxe/PlatformGopPolicy.c b/Platform/BroxtonPlatformPkg/Common/Console/PlatformGopPolicyDxe/PlatformGopPolicy.c index 8f3bc44287..71ab6b575c 100644 --- a/Platform/BroxtonPlatformPkg/Common/Console/PlatformGopPolicyDxe/PlatformGopPolicy.c +++ b/Platform/BroxtonPlatformPkg/Common/Console/PlatformGopPolicyDxe/PlatformGopPolicy.c @@ -27,12 +27,6 @@ extern EFI_BOOT_SERVICES *gBS; PLATFORM_GOP_POLICY_PROTOCOL mPlatformGOPPolicy;
-extern EFI_GUID gPeiDefaultVbtGuid;
-extern EFI_GUID gVbtMipiAuoGuid;
-extern EFI_GUID gVbtMipiSharpGuid;
-extern EFI_GUID gVbtMipiJdiGuid;
-extern EFI_GUID gVbtEdpTypeCGuid;
-
//
// Function implementations
//
@@ -79,71 +73,27 @@ GetVbtData ( OUT UINT32 *VbtSize
)
{
- SYSTEM_CONFIGURATION SystemConfiguration;
- UINTN VarSize;
- EFI_STATUS Status;
- EFI_GUID BmpImageGuid = { 0xE08CA6D5, 0x8D02, 0x43ae, {0xAB, 0xB1, 0x95, 0x2C, 0xC7, 0x87, 0xC9, 0x33} };
- UINTN FvProtocolCount;
- EFI_HANDLE *FvHandles;
- EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
- UINTN Index;
- UINT32 AuthenticationStatus;
- UINT8 *Buffer;
- UINTN VbtBufferSize;
-
- if (VbtAddress == NULL || VbtSize == NULL){
- return EFI_INVALID_PARAMETER;
- }
- VarSize = sizeof (SYSTEM_CONFIGURATION);
- Status = gRT->GetVariable (
- L"Setup",
- &gEfiSetupVariableGuid,
- NULL,
- &VarSize,
- &SystemConfiguration
- );
- ASSERT_EFI_ERROR (Status);
-
- BmpImageGuid = gPeiDefaultVbtGuid;
-
- Fv = NULL;
- Buffer = 0;
- FvHandles = NULL;
- Status = gBS->LocateHandleBuffer(
- ByProtocol,
- &gEfiFirmwareVolume2ProtocolGuid,
- NULL,
- &FvProtocolCount,
- &FvHandles
- );
- if (!EFI_ERROR (Status)) {
- for (Index = 0; Index < FvProtocolCount; Index++) {
- Status = gBS->HandleProtocol(
- FvHandles[Index],
- &gEfiFirmwareVolume2ProtocolGuid,
- (VOID **) &Fv
- );
- VbtBufferSize = 0;
- Status = Fv->ReadSection (
- Fv,
- &BmpImageGuid,
- EFI_SECTION_RAW,
- 0,
- (VOID **)&Buffer,
- &VbtBufferSize,
- &AuthenticationStatus
- );
- if (!EFI_ERROR (Status)) {
- *VbtAddress = (EFI_PHYSICAL_ADDRESS) Buffer;
- *VbtSize = (UINT32) VbtBufferSize;
+ VBT_INFO *VbtInfo = NULL;
+ EFI_PEI_HOB_POINTERS GuidHob;
+ EFI_STATUS Status;
+
+ //
+ // Get VBT data from HOB, which has been created in PEI phase.
+ //
+ Status = EFI_NOT_FOUND;
+ DEBUG ((DEBUG_ERROR, "GOP Policy Protocol GetVbtData from HOB\n"));
+
+ GuidHob.Raw = GetHobList ();
+ if (GuidHob.Raw != NULL) {
+ if ((GuidHob.Raw = GetNextGuidHob (&gVbtInfoGuid, GuidHob.Raw)) != NULL) {
+ VbtInfo = GET_GUID_HOB_DATA (GuidHob.Guid);
+ *VbtAddress = VbtInfo->VbtAddress;
+ *VbtSize = VbtInfo->VbtSize;
Status = EFI_SUCCESS;
- break;
- }
- }
- } else {
- Status = EFI_NOT_FOUND;
- }
+ DEBUG ((DEBUG_ERROR, "Found VBT.\n"));
+ }
+ }
return Status;
}
diff --git a/Platform/BroxtonPlatformPkg/Common/Console/PlatformGopPolicyDxe/PlatformGopPolicyDxe.inf b/Platform/BroxtonPlatformPkg/Common/Console/PlatformGopPolicyDxe/PlatformGopPolicyDxe.inf index ae7fd1c2ae..3f61a0928c 100644 --- a/Platform/BroxtonPlatformPkg/Common/Console/PlatformGopPolicyDxe/PlatformGopPolicyDxe.inf +++ b/Platform/BroxtonPlatformPkg/Common/Console/PlatformGopPolicyDxe/PlatformGopPolicyDxe.inf @@ -47,7 +47,6 @@ [Guids]
gEfiSetupVariableGuid
gVbtInfoGuid
- gPeiDefaultVbtGuid
gVbtMipiAuoGuid
gVbtMipiSharpGuid
gVbtMipiJdiGuid
@@ -59,7 +58,8 @@ gEfiFirmwareVolume2ProtocolGuid
gPlatformGOPPolicyGuid
-[Pcd]
+[Pcd.common]
+ gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid
[Depex]
gEfiCpuIo2ProtocolGuid AND
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf index b4099b2ea1..f0e6bf710c 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf @@ -76,11 +76,6 @@ [Guids]
gEfiSetupVariableGuid
- gPeiDefaultVbtGuid
- gVbtMipiAuoGuid
- gVbtMipiSharpGuid
- gVbtMipiJdiGuid
- gVbtEdpTypeCGuid
gEfiPlatformInfoGuid
gPeiLogoGuid
@@ -89,6 +84,7 @@ gEfiBxtTokenSpaceGuid.PcdP2SBBaseAddress
gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress
gPlatformModuleTokenSpaceGuid.PcdResetType
+ gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid
[Ppis]
gSiPolicyPpiGuid ## CONSUMES
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c index 1dc31a08ca..c76f433332 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c @@ -233,9 +233,9 @@ PeiFspSaPolicyInit ( }
//
- // Update VbtGuid based on VbtSelect opion from setup
+ // Update VbtGuid.
//
- PeiVbtGuid = gPeiDefaultVbtGuid;
+ CopyMem (&PeiVbtGuid, PcdGetPtr (PcdBoardVbtFileGuid), sizeof (EFI_GUID));
//
// Update UPD:LogoPtr
|