]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CorebootModulePkg/CbSupportDxe/CbSupportDxe.c
BaseTools/VolInfo: Fix VS2010/VS2012 build failure
[mirror_edk2.git] / CorebootModulePkg / CbSupportDxe / CbSupportDxe.c
index d81b7c23b71737aaa24ffc5f4b3eb8abf00f938d..24bacf815c021c34eef18b9495e97c128be7ada1 100755 (executable)
@@ -134,6 +134,7 @@ CbDxeEntryPoint (
   EFI_HOB_GUID_TYPE  *GuidHob;\r
   SYSTEM_TABLE_INFO  *pSystemTableInfo;\r
   ACPI_BOARD_INFO    *pAcpiBoardInfo;\r
+  FRAME_BUFFER_INFO  *FbInfo;\r
 \r
   Status = EFI_SUCCESS;\r
   //\r
@@ -183,6 +184,22 @@ CbDxeEntryPoint (
   mPmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase;\r
   DEBUG ((EFI_D_ERROR, "PmCtrlReg at 0x%lx\n", (UINT64)mPmCtrlReg));\r
 \r
+  //\r
+  // Find the frame buffer information and update PCDs\r
+  //\r
+  GuidHob = GetFirstGuidHob (&gUefiFrameBufferInfoGuid);\r
+  if (GuidHob != NULL) {\r
+    FbInfo  = (FRAME_BUFFER_INFO *)GET_GUID_HOB_DATA (GuidHob);\r
+    Status = PcdSet32S (PcdVideoHorizontalResolution, FbInfo->HorizontalResolution);\r
+    ASSERT_EFI_ERROR (Status);\r
+    Status = PcdSet32S (PcdVideoVerticalResolution, FbInfo->VerticalResolution);\r
+    ASSERT_EFI_ERROR (Status);\r
+    Status = PcdSet32S (PcdSetupVideoHorizontalResolution, FbInfo->HorizontalResolution);\r
+    ASSERT_EFI_ERROR (Status);\r
+    Status = PcdSet32S (PcdSetupVideoVerticalResolution, FbInfo->VerticalResolution);\r
+    ASSERT_EFI_ERROR (Status);\r
+  }\r
+\r
   //\r
   // Register callback on the ready to boot event\r
   // in order to enable SCI\r