diff options
author | Maurice Ma <maurice.ma@intel.com> | 2016-05-17 09:30:49 -0700 |
---|---|---|
committer | Maurice Ma <maurice.ma@intel.com> | 2016-05-20 10:11:53 -0700 |
commit | 3aa865685a1292aef17d2efa812376d180fc00f9 (patch) | |
tree | b1dcc82048fb4792df314a15ed61e88a59a4f892 /CorebootModulePkg | |
parent | f3a90fbf8b8d816def4be94914295b479f218a1a (diff) | |
download | edk2-platforms-3aa865685a1292aef17d2efa812376d180fc00f9.tar.xz |
CorebootModulePkg: Add video resolution PCD initialization
The video console resolution related PCDs are required to be
initialized after switching to use the generic BdsDxe driver
in MdeModulePkg.
Cc: Prince Agyeman <prince.agyeman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
Diffstat (limited to 'CorebootModulePkg')
-rwxr-xr-x | CorebootModulePkg/CbSupportDxe/CbSupportDxe.c | 16 | ||||
-rw-r--r-- | CorebootModulePkg/CbSupportDxe/CbSupportDxe.h | 1 | ||||
-rw-r--r-- | CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf | 9 |
3 files changed, 25 insertions, 1 deletions
diff --git a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c index d81b7c23b7..7671304753 100755 --- a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c +++ b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c @@ -134,6 +134,7 @@ CbDxeEntryPoint ( EFI_HOB_GUID_TYPE *GuidHob;
SYSTEM_TABLE_INFO *pSystemTableInfo;
ACPI_BOARD_INFO *pAcpiBoardInfo;
+ FRAME_BUFFER_INFO *FbInfo;
Status = EFI_SUCCESS;
//
@@ -184,6 +185,21 @@ CbDxeEntryPoint ( DEBUG ((EFI_D_ERROR, "PmCtrlReg at 0x%lx\n", (UINT64)mPmCtrlReg));
//
+ // Find the frame buffer information and update PCDs
+ //
+ GuidHob = GetFirstGuidHob (&gUefiFrameBufferInfoGuid);
+ ASSERT (GuidHob != NULL);
+ FbInfo = (FRAME_BUFFER_INFO *)GET_GUID_HOB_DATA (GuidHob);
+ Status = PcdSet32S (PcdVideoHorizontalResolution, FbInfo->HorizontalResolution);
+ ASSERT_EFI_ERROR (Status);
+ Status = PcdSet32S (PcdVideoVerticalResolution, FbInfo->VerticalResolution);
+ ASSERT_EFI_ERROR (Status);
+ Status = PcdSet32S (PcdSetupVideoHorizontalResolution, FbInfo->HorizontalResolution);
+ ASSERT_EFI_ERROR (Status);
+ Status = PcdSet32S (PcdSetupVideoVerticalResolution, FbInfo->VerticalResolution);
+ ASSERT_EFI_ERROR (Status);
+
+ //
// Register callback on the ready to boot event
// in order to enable SCI
//
diff --git a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.h b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.h index bace2728e6..4c59ed94d7 100644 --- a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.h +++ b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.h @@ -29,6 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Guid/SmBios.h>
#include <Guid/SystemTableInfoGuid.h>
#include <Guid/AcpiBoardInfoGuid.h>
+#include <Guid/FrameBufferInfoGuid.h>
#include <IndustryStandard/Acpi.h>
diff --git a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf index c92db8ded4..99245183ea 100644 --- a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf +++ b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf @@ -49,11 +49,18 @@ IoLib
HobLib
-[Guids]
+[Guids]
gEfiAcpiTableGuid
gEfiSmbiosTableGuid
gUefiSystemTableInfoGuid
gUefiAcpiBoardInfoGuid
+ gUefiFrameBufferInfoGuid
+
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
+ gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution
[Depex]
TRUE
|