From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=david.wei@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9A1F921F30413 for ; Fri, 29 Sep 2017 03:10:46 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP; 29 Sep 2017 03:14:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,452,1500966000"; d="scan'208";a="1176978880" Received: from zwei4-mobl1.ccr.corp.intel.com ([10.239.193.27]) by orsmga001.jf.intel.com with ESMTP; 29 Sep 2017 03:13:59 -0700 From: zwei4 To: edk2-devel@lists.01.org Cc: Loeppert, Anthony Date: Fri, 29 Sep 2017 18:13:53 +0800 Message-Id: <20170929101353.16532-1-david.wei@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] VBT table change X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Sep 2017 10:10:46 -0000 Move VBT tables from common folder into board specific folders. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: zwei4 Cc: Loeppert, Anthony --- .../BensonGlacier/BoardInitPostMem/BoardInit.c | 7 ++ .../BoardInitPostMem/BoardInitPostMem.inf | 2 + .../BensonGlacier}/Vbt/VbtBxtEdp.bin | Bin .../BensonGlacier}/Vbt/VbtBxtMipi.bin | Bin .../Board/LeafHill/BoardInitPostMem/BoardInit.c | 7 ++ .../LeafHill/BoardInitPostMem/BoardInitPostMem.inf | 2 + .../Board/LeafHill/Vbt/VbtBxtEdp.bin | Bin 0 -> 5632 bytes .../Board/LeafHill/Vbt/VbtBxtMipi.bin | Bin 0 -> 5632 bytes .../MinnowBoard3/BoardInitPostMem/BoardInit.c | 7 ++ .../BoardInitPostMem/BoardInitPostMem.inf | 2 + .../Board/MinnowBoard3/Vbt/VbtBxtEdp.bin | Bin 0 -> 5632 bytes .../Board/MinnowBoard3/Vbt/VbtBxtMipi.bin | Bin 0 -> 5632 bytes .../PlatformGopPolicyDxe/PlatformGopPolicy.c | 88 +++++---------------- .../PlatformGopPolicyDxe/PlatformGopPolicyDxe.inf | 4 +- .../PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf | 6 +- .../PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c | 4 +- Platform/BroxtonPlatformPkg/PlatformPkg.dec | 7 +- Platform/BroxtonPlatformPkg/PlatformPkg.fdf | 22 ++++-- 18 files changed, 72 insertions(+), 86 deletions(-) rename Platform/BroxtonPlatformPkg/{Common/Binaries => Board/BensonGlacier}/Vbt/VbtBxtEdp.bin (100%) rename Platform/BroxtonPlatformPkg/{Common/Binaries => Board/BensonGlacier}/Vbt/VbtBxtMipi.bin (100%) create mode 100644 Platform/BroxtonPlatformPkg/Board/LeafHill/Vbt/VbtBxtEdp.bin create mode 100644 Platform/BroxtonPlatformPkg/Board/LeafHill/Vbt/VbtBxtMipi.bin create mode 100644 Platform/BroxtonPlatformPkg/Board/MinnowBoard3/Vbt/VbtBxtEdp.bin create mode 100644 Platform/BroxtonPlatformPkg/Board/MinnowBoard3/Vbt/VbtBxtMipi.bin diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c index a4f3414b4..8b21b50a7 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c @@ -49,6 +49,7 @@ BensonGlacierPostMemInitCallback ( UINT8 BoardId; UINT8 FabId; UINT8 ResetType; + UINTN BufferSize; Status = PeiServicesLocatePpi ( &gBoardPostMemInitDoneGuid, @@ -82,6 +83,12 @@ BensonGlacierPostMemInitCallback ( ResetType = V_RST_CNT_HARDRESET; PcdSet8 (PcdResetType, (UINT8) ResetType); + // + // Board specific VBT table. + // + BufferSize = sizeof (EFI_GUID); + PcdSetPtr(PcdBoardVbtFileGuid, &BufferSize, (UINT8 *)&gPeiBensonGlacierVbtGuid); + // // Add init steps here // diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf index 4ce6ab2db..c22bfadb5 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf @@ -62,6 +62,7 @@ gPlatformModuleTokenSpaceGuid.PcdBoardId gPlatformModuleTokenSpaceGuid.PcdFabId gPlatformModuleTokenSpaceGuid.PcdResetType + gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid [Guids] gEfiPlatformInfoGuid @@ -73,6 +74,7 @@ gEfiTpmDeviceInstanceTpm12Guid gEfiTpmDeviceInstanceTpm20DtpmGuid gTpmDeviceInstanceTpm20PttPtpGuid + gPeiBensonGlacierVbtGuid [Ppis] gBoardPostMemInitStartGuid diff --git a/Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtEdp.bin b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/Vbt/VbtBxtEdp.bin similarity index 100% rename from Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtEdp.bin rename to Platform/BroxtonPlatformPkg/Board/BensonGlacier/Vbt/VbtBxtEdp.bin diff --git a/Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtMipi.bin b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/Vbt/VbtBxtMipi.bin similarity index 100% rename from Platform/BroxtonPlatformPkg/Common/Binaries/Vbt/VbtBxtMipi.bin rename to Platform/BroxtonPlatformPkg/Board/BensonGlacier/Vbt/VbtBxtMipi.bin diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c index e591b1d1f..60fe1a31a 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c @@ -57,6 +57,7 @@ LeafHillPostMemInitCallback ( UINT8 BoardId; UINT8 FabId; UINT8 ResetType; + UINTN BufferSize; Status = PeiServicesLocatePpi ( &gBoardPostMemInitDoneGuid, @@ -90,6 +91,12 @@ LeafHillPostMemInitCallback ( ResetType = V_RST_CNT_FULLRESET; PcdSet8 (PcdResetType, (UINT8) ResetType); + // + // Board specific VBT table. + // + BufferSize = sizeof (EFI_GUID); + PcdSetPtr(PcdBoardVbtFileGuid, &BufferSize, (UINT8 *)&gPeiLeafHillVbtGuid); + // // Add init steps here // diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf index 01931b8c6..0717bc3dc 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf @@ -60,6 +60,7 @@ gPlatformModuleTokenSpaceGuid.PcdBoardId gPlatformModuleTokenSpaceGuid.PcdFabId gPlatformModuleTokenSpaceGuid.PcdResetType + gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid [Guids] gEfiPlatformInfoGuid @@ -71,6 +72,7 @@ gEfiTpmDeviceInstanceTpm12Guid gEfiTpmDeviceInstanceTpm20DtpmGuid gTpmDeviceInstanceTpm20PttPtpGuid + gPeiLeafHillVbtGuid [Ppis] gBoardPostMemInitStartGuid diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/Vbt/VbtBxtEdp.bin b/Platform/BroxtonPlatformPkg/Board/LeafHill/Vbt/VbtBxtEdp.bin new file mode 100644 index 0000000000000000000000000000000000000000..7b4e32699b6bda9b95c951e531fd4fbf3349c40d GIT binary patch literal 5632 zcmeHLU2GIp6h1T4{kt=>yPXy(OD&fl%eFu}El^6WcD7qe7h1a8mbylhZp$vZvCz^M zEh2W*k~A@xeNcmjXpJ!%d}*RS86!RzNr>1!fZ@p!VuC~x5;6J!tY?1O-4-`p5TXcY zbLO0T@44T-_uO;;c2#G62d!^w4R^Hepe98@2J50%@q07X2U^>^8hjnTuKMOy|8{yB z9)dIZH!cB08D@!4AFbI2#>yLFgU=21_0ym~Kz+M*#d>1{-9xb` zZSUObqZ*z_>i5TcqjbmqJw3638j2t?TGNURW$QOkTDhrQUSD1*S8T+Rnu@BLjhjW% zu*Kin5)3r^Is(}7);8J@X!o_ZZ)vG-ev$^;TAKp(fsQQ=BAGJ;e_#KBf%r4e4pFba zgjQlZ>vUYb%hcaD&|gME zWMtUwD1xn=7lt?%UgoM{Mb1gEJ1DGixZ!c+5b`MtfiuWIA^(E>8}fBzo0UK=@>1kS zkjs%bBm0qCke@*AMz-#UYe`nsrT|H0Oqpv)aOc1qC7>QN^N*SNjw?9XNW_%9DfP@O zKFOrb1~-zY3m}=aKc@9SK?EE&(_kVsnX*}z92Ydx9Vj(lh0Sy_>4;#G)kEWMeaR^; zkPS*E?{!VcgKfCNIeYDBp+1(K0Lk}74u*l`;vzFi5@v!@&&YodtRADtRy$)eU;djV z9&K}2`YStWBQR;Z%8cdxH?{db%bZRob4|)@^PuE@_CR41oOP%PI{mQQ9$8^{qUiQ= zmOYIpE6acb&wLgvxIqYbXg5F;_|iO#WehCGtR^%wO!TZKw2Z(i@B+nJdR7h!1(OcU zv;d{xV$*>BM)i8I;lVit$4vq#c@wxt3GF7*AR&hc{g6ms5b`ylKNIN>LKvQ|=B3R% z@$)p!O9y#!n5Uoe(pNnBj;EJ-DajLuK+6TmCy?y|-6u$|3FL@CKNF;H1@ePHe-|X1 zNODEGNt6O2X&31MQF>h@Z;A9vQTkpaKZ^9aD7lPjy8c(^KC#7lx4|{F20_DQ&!U*Fo3Kii(>Q(a%9~D)N7zZBC z6mI7WBSe>g;)7zjV64hOD5x6Y^!phi;EZbswRm02JPNrKj)p*1+bK4_tWBn(?T zSs@J5kjJgK(-4@1YTST? zPD?hP+`YW>cnFH*#)LT+nkN(b*@<1r#t$!*CB`G3B1NX=T;OcxB=8Q4o>XnwjKW*1 zj`vTjM1)eU762kx68b$w7`KdO5fAT{j8BF}SIEJ47SAGZz-zjoShGQpOO=z6(WqPy zGVX&~A2Aqs1mx8WjJHUTg;OZSAjUf%@_ z7jLM-$W34%>1%4P+woMXL)PBSc!5WrG#_o+T6B#ptIJ1UXg5C&K;imXzJss j%Tu!`3n+T~a>|Iom$pgz>4Jw#hW3>^(*8_i_n-U=ai&r( literal 0 HcmV?d00001 diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/Vbt/VbtBxtMipi.bin b/Platform/BroxtonPlatformPkg/Board/LeafHill/Vbt/VbtBxtMipi.bin new file mode 100644 index 0000000000000000000000000000000000000000..23b52baea1f7ab470ad7f6c375893e453ba9cb42 GIT binary patch literal 5632 zcmeHKU2GIp6h1T4{kt=>ot+jbOD&fl%eFu}El^6WcD7qe7h1a8mbylhZp$v(SZHaB z77;qek~A@xeNcl+w8j_>zBEyvj1eDZ&!CuytFPp@Z4Z;9}NY9)W2g#yeHn@IT(-8 z*7nVQs^f{Ic5io2jBeYzt1I4LMG-_nZ(6plWbHai%QuuNYfH`FN~EBs$P>aAq+8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=z6(WqPy zGVX&~A2Aqs1mx8WjJHUTg;OZSAjUf%@_ z7jLM-$W34%>1%4P+woMXL)PBSc!5WrG#_o+T6B#ptIJ1UXg5C&K;imXzJss j%Tu!`3n+T~a>|Iom$pgz>4Jw#hW3>^(*8_i_n-U=ai&r( literal 0 HcmV?d00001 diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/Vbt/VbtBxtMipi.bin b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/Vbt/VbtBxtMipi.bin new file mode 100644 index 0000000000000000000000000000000000000000..23b52baea1f7ab470ad7f6c375893e453ba9cb42 GIT binary patch literal 5632 zcmeHKU2GIp6h1T4{kt=>ot+jbOD&fl%eFu}El^6WcD7qe7h1a8mbylhZp$v(SZHaB z77;qek~A@xeNcl+w8j_>zBEyvj1eDZ&!CuytFPp@Z4Z;9}NY9)W2g#yeHn@IT(-8 z*7nVQs^f{Ic5io2jBeYzt1I4LMG-_nZ(6plWbHai%QuuNYfH`FN~EBs$P>aAq+8j196?VBlIgKo)=s zKmnYy+DTWCfL+h9Sg8>Gb8mQIbwGFyg@kZ=(V{H)AqtWN7tx)fO>Z5A1QJ7a#UvHZ z7+zN`FRL#SP|M43rIxqbWnx)H6f?0>)|)$7b8D{ zT#CFAIe^@R`~-3*vVAXHO|lv|j3H`_B|WADDGOdJ0_~_}KWf=smvOR@h$VST8paG> z$)v*p*ORC6AenSNruRTa1ROR~XCXCMveA$n7qZH2DD_xHta38xieiz)=kC49Nj;HG zN+$1hO~`>QxWYMS^+>)kmhAw^_e2hcfOxD$hIU!Fk(7p0?z>?3nnQO~n{w{^-~8g$ zGhp$r?1Y2BgyRY`n)Bb(=0+`@C7JYCl+NRU{r-+Xegm9wX$d;@u;h#`GhOg+?1t z3fb%opubUlUTk<^)`w#j0TjIs+@pkc5_y1-1B8A+y+D5#WQRyR zBHbX$L6NkIbe|}{Dv~!u`h_TeCz2mUdQFtG-DHuQ*0|-cn>^(fi&>k-PBEItZCrGm z{Q~Yi5mqqd6-Gj7%U+46+}ug27{SNIvyx)(xwmV%R+PaHeoO zpC2K%2vk25DtV(7W|Z?PhB@PYh6p(0IzlyG*V2zdDTX6qP*kNa$3(zB=&6Dv4B5OH zAq>&5S5l=J2u#9u3kV;V4o!u&3r_XA(O3T|* zxkinwNzDZZ*#-h`V)pshMUe_o4RWHA12syMP(u zbrqPo2}~qoP0bEFo+>rS<{!8IS2AJ!wCQUxdw5ArF2+KSNjj>o24{J9VSNPy%e!}% z;|zBAssVrh^`B6q(u0;$v3n5hJD*`!81os;xpgfyGqW|jK^s^`1Kf-?yn&`jn^w*B zl!v!AUE_Ih=NDJjw{>;*y|8cpfrFY;gZJUGetVariable ( - 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 ae7fd1c2a..3f61a0928 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 b4099b2ea..f0e6bf710 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 1dc31a08c..c76f43333 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 diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.dec b/Platform/BroxtonPlatformPkg/PlatformPkg.dec index 208f2a534..4813145d0 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkg.dec +++ b/Platform/BroxtonPlatformPkg/PlatformPkg.dec @@ -58,7 +58,9 @@ gVbtMipiSharpGuid = { 0xC7DCFF6F, 0x6F2A, 0x4DC1, { 0x91, 0xC6, 0xDF, 0x0B, 0xAF, 0xDB, 0xDA, 0x46 } } gVbtMipiJdiGuid = { 0xB850A139, 0xBABB, 0x4D91, { 0x9F, 0x27, 0x72, 0xD2, 0xEF, 0x01, 0xBF, 0x3A } } gVbtEdpTypeCGuid = { 0x21E70404, 0xDF72, 0x4122, { 0xB0, 0x30, 0x28, 0x13, 0x06, 0xEB, 0x7B, 0xE3 } } - gPeiDefaultVbtGuid = { 0xE08CA6D5, 0x8D02, 0x43ae, { 0xAB, 0xB1, 0x95, 0x2C, 0xC7, 0x87, 0xC9, 0x33 } } + gPeiLeafHillVbtGuid = { 0x6ae80680, 0x5e3f, 0x4e63, { 0xa5, 0xf5, 0x78, 0xe5, 0x21, 0x4f, 0x13, 0xfe } } + gPeiMinnowBoard3VbtGuid = { 0xE08CA6D5, 0x8D02, 0x43ae, { 0xAB, 0xB1, 0x95, 0x2C, 0xC7, 0x87, 0xC9, 0x33 } } + gPeiBensonGlacierVbtGuid = { 0xbfde308e, 0x2d5a, 0x4ca7, { 0xaa, 0x76, 0x19, 0x93, 0x8a, 0xaa, 0xe4, 0xda } } gPeiLogoGuid = { 0x7BB28B99, 0x61BB, 0x11d5, { 0x9A, 0x5D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } } gPlatformEmmcHs400TuningInfoGuid = { 0xb0ae3e81, 0xc6b0, 0x4d35, { 0xad, 0x51, 0x91, 0x17, 0xe0, 0x65, 0x1e, 0xa3 } } gEfiTraceHubDebugLibIa32Guid = { 0x23a3e7ba, 0x75d1, 0x4cb9, { 0x9c, 0x8f, 0x56, 0xfa, 0x4e, 0x48, 0xd9, 0x9e } } @@ -179,7 +181,8 @@ gPlatformModuleTokenSpaceGuid.PcdDramCreatePolicyDefaultsFunc|0|UINT64|0x80000011 gPlatformModuleTokenSpaceGuid.PcdGetBoardNameFunc|0|UINT64|0x80000012 gPlatformModuleTokenSpaceGuid.PcdResetType|0x0E|UINT8|0x80000013 - + gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid|{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }|VOID*|0x80000014 + ## MemoryCheck value for checking memory before boot OS. ## To save the boot performance, the default MemoryCheck is set to 0. gClientCommonModuleTokenSpaceGuid.PcdPlatformMemoryCheck|0|UINT8|0x40000005 diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf index c975a4c2a..1c1eb475f 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf +++ b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf @@ -242,13 +242,27 @@ INF $(PLATFORM_PACKAGE_COMMON)/SampleCode/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf INF $(PLATFORM_PACKAGE_COMMON)/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf + !if $(PEI_DISPLAY_ENABLE) == TRUE FILE FREEFORM = 7BB28B99-61BB-11D5-9A5D-0090273FC14D { SECTION RAW = $(PLATFORM_PACKAGE_COMMON)/Binaries/Logo/Logo.bmp } - + + # VBT For Leaf Hill (File Guid is gPeiLeafHillVbtGuid) + FILE FREEFORM = 6AE80680-5E3F-4E63-A5F5-78E5214F13FE { + SECTION RAW = $(PLATFORM_NAME)/Board/LeafHill/Vbt/VbtBxtMipi.bin + SECTION UI = "IntelGopVbt1" + } + + # VBT For Minnowboard 3 (File Guid is gPeiMinnowBoard3VbtGuid) FILE FREEFORM = E08CA6D5-8D02-43ae-ABB1-952CC787C933 { - SECTION RAW = $(PLATFORM_PACKAGE_COMMON)/Binaries/Vbt/VbtBxtMipi.bin + SECTION RAW = $(PLATFORM_NAME)/Board/MinnowBoard3/Vbt/VbtBxtMipi.bin + SECTION UI = "IntelGopVbt1" + } + + # VBT For Benson Glacier (File Guid is gPeiBensonGlacierVbtGuid) + FILE FREEFORM = BFDE308E-2D5A-4CA7-AA76-19938AAAE4DA { + SECTION RAW = $(PLATFORM_NAME)/Board/BensonGlacier/Vbt/VbtBxtMipi.bin SECTION UI = "IntelGopVbt1" } !endif @@ -561,10 +575,6 @@ APRIORI DXE { !if $(GOP_DRIVER_ENABLE) == TRUE INF $(PLATFORM_PACKAGE_COMMON)/Console/PlatformGopPolicyDxe/PlatformGopPolicyDxe.inf - FILE FREEFORM = E08CA6D5-8D02-43ae-ABB1-952CC787C933 { - SECTION RAW = $(PLATFORM_PACKAGE_COMMON)/Binaries/Vbt/VbtBxtMipi.bin - SECTION UI = "IntelGopVbt1" - } !endif INF $(PLATFORM_PACKAGE_COMMON)/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf -- 2.14.1.windows.1