]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CorebootModulePkg/CbSupportDxe/CbSupportDxe.c
MdeModulePkg/UsbStorage: Fix "map -r" cannot detect media change
[mirror_edk2.git] / CorebootModulePkg / CbSupportDxe / CbSupportDxe.c
index d81b7c23b71737aaa24ffc5f4b3eb8abf00f938d..c526c9e871db0d4ec38809b075454d6b22a0df42 100755 (executable)
@@ -134,14 +134,12 @@ 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
   // Report MMIO/IO Resources\r
   //\r
-  Status = CbReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFEE00000, SIZE_1MB, 0, SystemTable); // LAPIC\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
   Status = CbReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFEC00000, SIZE_4KB, 0, SystemTable); // IOAPIC\r
   ASSERT_EFI_ERROR (Status);\r
 \r
@@ -183,6 +181,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