Not all platforms have or support graphics.  The ASSERT that the frame
buffer HOB is not NULL is fatal for these platforms.  Convert this into
an if statement and make the related PcdSet* calls conditional on
locating the frame buffer HOB.

Change-Id: Ibdc4bf5359571f3ce1555efcaf4657b8e363b2cd
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy <[email protected]>
---
 CorebootModulePkg/CbSupportDxe/CbSupportDxe.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c 
b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c
index 7671304..24bacf8 100755
--- a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c
+++ b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c
@@ -188,16 +188,17 @@ CbDxeEntryPoint (
   // 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);
+  if (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
-- 
1.9.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to