]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CorebootModulePkg/CbSupportDxe/CbSupportDxe.c
CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting
[mirror_edk2.git] / CorebootModulePkg / CbSupportDxe / CbSupportDxe.c
index d81b7c23b71737aaa24ffc5f4b3eb8abf00f938d..ec42f7ff3547a969a2a174a4b70fc1742f2b5360 100755 (executable)
@@ -14,7 +14,6 @@
 **/\r
 #include "CbSupportDxe.h"\r
 \r
-UINTN mPmCtrlReg = 0;\r
 /**\r
   Reserve MMIO/IO resource in GCD\r
 \r
@@ -86,31 +85,6 @@ CbReserveResourceInGcd (
   return Status;\r
 }\r
 \r
-/**\r
-  Notification function of EVT_GROUP_READY_TO_BOOT event group.\r
-\r
-  This is a notification function registered on EVT_GROUP_READY_TO_BOOT event group.\r
-  When the Boot Manager is about to load and execute a boot option, it reclaims variable\r
-  storage if free size is below the threshold.\r
-\r
-  @param  Event        Event whose notification function is being invoked.\r
-  @param  Context      Pointer to the notification function's context.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-OnReadyToBoot (\r
-  IN  EFI_EVENT  Event,\r
-  IN  VOID       *Context\r
-  )\r
-{\r
-  //\r
-  // Enable SCI\r
-  //\r
-  IoOr16 (mPmCtrlReg, BIT0);\r
-\r
-  DEBUG ((EFI_D_ERROR, "Enable SCI bit at 0x%lx before boot\n", (UINT64)mPmCtrlReg));\r
-}\r
 \r
 /**\r
   Main entry for the Coreboot Support DXE module.\r
@@ -130,18 +104,14 @@ CbDxeEntryPoint (
   )\r
 {\r
   EFI_STATUS Status;\r
-  EFI_EVENT  ReadyToBootEvent;\r
   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
@@ -174,27 +144,20 @@ CbDxeEntryPoint (
   }\r
 \r
   //\r
-  // Find the acpi board information guid hob\r
+  // Find the frame buffer information and update PCDs\r
   //\r
-  GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);\r
-  ASSERT (GuidHob != NULL);\r
-  pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);\r
-\r
-  mPmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase;\r
-  DEBUG ((EFI_D_ERROR, "PmCtrlReg at 0x%lx\n", (UINT64)mPmCtrlReg));\r
-\r
-  //\r
-  // Register callback on the ready to boot event\r
-  // in order to enable SCI\r
-  //\r
-  ReadyToBootEvent = NULL;\r
-  Status = EfiCreateEventReadyToBootEx (\r
-                    TPL_CALLBACK,\r
-                    OnReadyToBoot,\r
-                    NULL,\r
-                    &ReadyToBootEvent\r
-                    );\r
-  ASSERT_EFI_ERROR (Status);\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
   return EFI_SUCCESS;\r
 }\r