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>
This commit is contained in:
@ -134,6 +134,7 @@ CbDxeEntryPoint (
|
|||||||
EFI_HOB_GUID_TYPE *GuidHob;
|
EFI_HOB_GUID_TYPE *GuidHob;
|
||||||
SYSTEM_TABLE_INFO *pSystemTableInfo;
|
SYSTEM_TABLE_INFO *pSystemTableInfo;
|
||||||
ACPI_BOARD_INFO *pAcpiBoardInfo;
|
ACPI_BOARD_INFO *pAcpiBoardInfo;
|
||||||
|
FRAME_BUFFER_INFO *FbInfo;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
//
|
//
|
||||||
@ -183,6 +184,21 @@ CbDxeEntryPoint (
|
|||||||
mPmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase;
|
mPmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase;
|
||||||
DEBUG ((EFI_D_ERROR, "PmCtrlReg at 0x%lx\n", (UINT64)mPmCtrlReg));
|
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
|
// Register callback on the ready to boot event
|
||||||
// in order to enable SCI
|
// in order to enable SCI
|
||||||
|
@ -29,6 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Guid/SmBios.h>
|
#include <Guid/SmBios.h>
|
||||||
#include <Guid/SystemTableInfoGuid.h>
|
#include <Guid/SystemTableInfoGuid.h>
|
||||||
#include <Guid/AcpiBoardInfoGuid.h>
|
#include <Guid/AcpiBoardInfoGuid.h>
|
||||||
|
#include <Guid/FrameBufferInfoGuid.h>
|
||||||
|
|
||||||
#include <IndustryStandard/Acpi.h>
|
#include <IndustryStandard/Acpi.h>
|
||||||
|
|
||||||
|
@ -49,11 +49,18 @@
|
|||||||
IoLib
|
IoLib
|
||||||
HobLib
|
HobLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiAcpiTableGuid
|
gEfiAcpiTableGuid
|
||||||
gEfiSmbiosTableGuid
|
gEfiSmbiosTableGuid
|
||||||
gUefiSystemTableInfoGuid
|
gUefiSystemTableInfoGuid
|
||||||
gUefiAcpiBoardInfoGuid
|
gUefiAcpiBoardInfoGuid
|
||||||
|
gUefiFrameBufferInfoGuid
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
TRUE
|
||||||
|
Reference in New Issue
Block a user