2 Implementation for a generic GOP driver.
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include "GraphicsOutput.h"
11 CONST ACPI_ADR_DEVICE_PATH mGraphicsOutputAdrNode
= {
15 { sizeof (ACPI_ADR_DEVICE_PATH
), 0 },
17 ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYPE_VGA
, 0, 0)
20 EFI_PEI_GRAPHICS_DEVICE_INFO_HOB mDefaultGraphicsDeviceInfo
= {
21 MAX_UINT16
, MAX_UINT16
, MAX_UINT16
, MAX_UINT16
, MAX_UINT8
, MAX_UINT8
25 // The driver should only start on one graphics controller.
26 // So a global flag is used to remember that the driver is already started.
28 BOOLEAN mDriverStarted
= FALSE
;
31 Returns information for an available graphics mode that the graphics device
32 and the set of active video output devices supports.
34 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
35 @param ModeNumber The mode number to return information on.
36 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
37 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
39 @retval EFI_SUCCESS Valid mode information was returned.
40 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
41 @retval EFI_INVALID_PARAMETER ModeNumber is not valid.
46 GraphicsOutputQueryMode (
47 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
49 OUT UINTN
*SizeOfInfo
,
50 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
53 if ((This
== NULL
) || (Info
== NULL
) || (SizeOfInfo
== NULL
) || (ModeNumber
>= This
->Mode
->MaxMode
)) {
54 return EFI_INVALID_PARAMETER
;
57 *SizeOfInfo
= This
->Mode
->SizeOfInfo
;
58 *Info
= AllocateCopyPool (*SizeOfInfo
, This
->Mode
->Info
);
63 Set the video device into the specified mode and clears the visible portions of
64 the output display to black.
66 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
67 @param ModeNumber Abstraction that defines the current video mode.
69 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
70 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
71 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
76 GraphicsOutputSetMode (
77 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
82 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Black
;
83 GRAPHICS_OUTPUT_PRIVATE_DATA
*Private
;
85 if (ModeNumber
>= This
->Mode
->MaxMode
) {
86 return EFI_UNSUPPORTED
;
89 Private
= GRAPHICS_OUTPUT_PRIVATE_FROM_THIS (This
);
96 Status
= FrameBufferBlt (
97 Private
->FrameBufferBltLibConfigure
,
104 This
->Mode
->Info
->HorizontalResolution
,
105 This
->Mode
->Info
->VerticalResolution
,
108 return RETURN_ERROR (Status
) ? EFI_DEVICE_ERROR
: EFI_SUCCESS
;
112 Blt a rectangle of pixels on the graphics screen. Blt stands for BLock Transfer.
114 @param This Protocol instance pointer.
115 @param BltBuffer The data to transfer to the graphics screen.
116 Size is at least Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL).
117 @param BltOperation The operation to perform when copying BltBuffer on to the graphics screen.
118 @param SourceX The X coordinate of source for the BltOperation.
119 @param SourceY The Y coordinate of source for the BltOperation.
120 @param DestinationX The X coordinate of destination for the BltOperation.
121 @param DestinationY The Y coordinate of destination for the BltOperation.
122 @param Width The width of a rectangle in the blt rectangle in pixels.
123 @param Height The height of a rectangle in the blt rectangle in pixels.
124 @param Delta Not used for EfiBltVideoFill or the EfiBltVideoToVideo operation.
125 If a Delta of zero is used, the entire BltBuffer is being operated on.
126 If a subrectangle of the BltBuffer is being used then Delta
127 represents the number of bytes in a row of the BltBuffer.
129 @retval EFI_SUCCESS BltBuffer was drawn to the graphics screen.
130 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
131 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
137 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
138 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer OPTIONAL
,
139 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
142 IN UINTN DestinationX
,
143 IN UINTN DestinationY
,
146 IN UINTN Delta OPTIONAL
149 RETURN_STATUS Status
;
151 GRAPHICS_OUTPUT_PRIVATE_DATA
*Private
;
153 Private
= GRAPHICS_OUTPUT_PRIVATE_FROM_THIS (This
);
155 // We have to raise to TPL_NOTIFY, so we make an atomic write to the frame buffer.
156 // We would not want a timer based event (Cursor, ...) to come in while we are
157 // doing this operation.
159 Tpl
= gBS
->RaiseTPL (TPL_NOTIFY
);
160 Status
= FrameBufferBlt (
161 Private
->FrameBufferBltLibConfigure
,
172 gBS
->RestoreTPL (Tpl
);
174 return RETURN_ERROR (Status
) ? EFI_INVALID_PARAMETER
: EFI_SUCCESS
;
177 CONST GRAPHICS_OUTPUT_PRIVATE_DATA mGraphicsOutputInstanceTemplate
= {
178 GRAPHICS_OUTPUT_PRIVATE_DATA_SIGNATURE
, // Signature
179 NULL
, // GraphicsOutputHandle
181 GraphicsOutputQueryMode
,
182 GraphicsOutputSetMode
,
190 sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
), // SizeOfInfo
191 0, // FrameBufferBase
197 NULL
, // FrameBufferBltLibConfigure
198 0 // FrameBufferBltLibConfigureSize
202 Test whether the Controller can be managed by the driver.
204 @param This Driver Binding protocol instance pointer.
205 @param Controller The PCI controller.
206 @param RemainingDevicePath Optional parameter use to pick a specific child
209 @retval EFI_SUCCESS The driver can manage the video device.
210 @retval other The driver cannot manage the video device.
214 GraphicsOutputDriverBindingSupported (
215 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
216 IN EFI_HANDLE Controller
,
217 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
221 EFI_PCI_IO_PROTOCOL
*PciIo
;
222 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
225 // Since there is only one GraphicsInfo HOB, the driver only manages one video device.
227 if (mDriverStarted
) {
228 return EFI_ALREADY_STARTED
;
232 // Test the PCI I/O Protocol
234 Status
= gBS
->OpenProtocol (
236 &gEfiPciIoProtocolGuid
,
238 This
->DriverBindingHandle
,
240 EFI_OPEN_PROTOCOL_BY_DRIVER
242 if (Status
== EFI_ALREADY_STARTED
) {
243 Status
= EFI_SUCCESS
;
246 if (EFI_ERROR (Status
)) {
252 &gEfiPciIoProtocolGuid
,
253 This
->DriverBindingHandle
,
258 // Test the DevicePath protocol
260 Status
= gBS
->OpenProtocol (
262 &gEfiDevicePathProtocolGuid
,
263 (VOID
**)&DevicePath
,
264 This
->DriverBindingHandle
,
266 EFI_OPEN_PROTOCOL_BY_DRIVER
268 if (Status
== EFI_ALREADY_STARTED
) {
269 Status
= EFI_SUCCESS
;
272 if (EFI_ERROR (Status
)) {
278 &gEfiDevicePathProtocolGuid
,
279 This
->DriverBindingHandle
,
283 if ((RemainingDevicePath
== NULL
) ||
284 IsDevicePathEnd (RemainingDevicePath
) ||
285 (CompareMem (RemainingDevicePath
, &mGraphicsOutputAdrNode
, sizeof (mGraphicsOutputAdrNode
)) == 0))
289 return EFI_INVALID_PARAMETER
;
294 Start the video controller.
296 @param This Driver Binding protocol instance pointer.
297 @param ControllerHandle The PCI controller.
298 @param RemainingDevicePath Optional parameter use to pick a specific child
301 @retval EFI_SUCCESS The driver starts to manage the video device.
302 @retval other The driver cannot manage the video device.
306 GraphicsOutputDriverBindingStart (
307 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
308 IN EFI_HANDLE Controller
,
309 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
313 RETURN_STATUS ReturnStatus
;
314 GRAPHICS_OUTPUT_PRIVATE_DATA
*Private
;
315 EFI_PCI_IO_PROTOCOL
*PciIo
;
316 EFI_DEVICE_PATH
*PciDevicePath
;
319 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*Resources
;
321 EFI_PEI_GRAPHICS_INFO_HOB
*GraphicsInfo
;
322 EFI_PEI_GRAPHICS_DEVICE_INFO_HOB
*DeviceInfo
;
323 EFI_PHYSICAL_ADDRESS FrameBufferBase
;
327 HobStart
= GetFirstGuidHob (&gEfiGraphicsInfoHobGuid
);
328 ASSERT ((HobStart
!= NULL
) && (GET_GUID_HOB_DATA_SIZE (HobStart
) == sizeof (EFI_PEI_GRAPHICS_INFO_HOB
)));
329 GraphicsInfo
= (EFI_PEI_GRAPHICS_INFO_HOB
*)(GET_GUID_HOB_DATA (HobStart
));
331 HobStart
= GetFirstGuidHob (&gEfiGraphicsDeviceInfoHobGuid
);
332 if ((HobStart
== NULL
) || (GET_GUID_HOB_DATA_SIZE (HobStart
) < sizeof (*DeviceInfo
))) {
334 // Use default device infomation when the device info HOB doesn't exist
336 DeviceInfo
= &mDefaultGraphicsDeviceInfo
;
337 DEBUG ((DEBUG_INFO
, "[%a]: GraphicsDeviceInfo HOB doesn't exist!\n", gEfiCallerBaseName
));
339 DeviceInfo
= (EFI_PEI_GRAPHICS_DEVICE_INFO_HOB
*)(GET_GUID_HOB_DATA (HobStart
));
342 "[%a]: GraphicsDeviceInfo HOB:\n"
343 " VendorId = %04x, DeviceId = %04x,\n"
344 " RevisionId = %02x, BarIndex = %x,\n"
345 " SubsystemVendorId = %04x, SubsystemId = %04x\n",
347 DeviceInfo
->VendorId
,
348 DeviceInfo
->DeviceId
,
349 DeviceInfo
->RevisionId
,
350 DeviceInfo
->BarIndex
,
351 DeviceInfo
->SubsystemVendorId
,
352 DeviceInfo
->SubsystemId
357 // Open the PCI I/O Protocol
359 Status
= gBS
->OpenProtocol (
361 &gEfiPciIoProtocolGuid
,
363 This
->DriverBindingHandle
,
365 EFI_OPEN_PROTOCOL_BY_DRIVER
367 if (Status
== EFI_ALREADY_STARTED
) {
368 Status
= EFI_SUCCESS
;
371 ASSERT_EFI_ERROR (Status
);
373 Status
= gBS
->OpenProtocol (
375 &gEfiDevicePathProtocolGuid
,
376 (VOID
**)&PciDevicePath
,
377 This
->DriverBindingHandle
,
379 EFI_OPEN_PROTOCOL_BY_DRIVER
381 if (Status
== EFI_ALREADY_STARTED
) {
382 Status
= EFI_SUCCESS
;
385 ASSERT_EFI_ERROR (Status
);
388 // Read the PCI Class Code from the PCI Device
390 Status
= PciIo
->Pci
.Read (PciIo
, EfiPciIoWidthUint8
, 0, sizeof (Pci
), &Pci
);
391 if (!EFI_ERROR (Status
)) {
392 if (!IS_PCI_DISPLAY (&Pci
) || (
393 ((DeviceInfo
->VendorId
!= MAX_UINT16
) && (DeviceInfo
->VendorId
!= Pci
.Hdr
.VendorId
)) ||
394 ((DeviceInfo
->DeviceId
!= MAX_UINT16
) && (DeviceInfo
->DeviceId
!= Pci
.Hdr
.DeviceId
)) ||
395 ((DeviceInfo
->RevisionId
!= MAX_UINT8
) && (DeviceInfo
->RevisionId
!= Pci
.Hdr
.RevisionID
)) ||
396 ((DeviceInfo
->SubsystemVendorId
!= MAX_UINT16
) && (DeviceInfo
->SubsystemVendorId
!= Pci
.Device
.SubsystemVendorID
)) ||
397 ((DeviceInfo
->SubsystemId
!= MAX_UINT16
) && (DeviceInfo
->SubsystemId
!= Pci
.Device
.SubsystemID
))
402 // It's not a video device, or device infomation doesn't match.
404 Status
= EFI_UNSUPPORTED
;
407 // If it's a video device and device information matches, use the BarIndex
408 // from device information, or any BAR if BarIndex is not specified
409 // whose size >= the frame buffer size from GraphicsInfo HOB.
410 // Store the new frame buffer base.
412 for (Index
= 0; Index
< MAX_PCI_BAR
; Index
++) {
413 if ((DeviceInfo
->BarIndex
!= MAX_UINT8
) && (DeviceInfo
->BarIndex
!= Index
)) {
417 Status
= PciIo
->GetBarAttributes (PciIo
, Index
, NULL
, (VOID
**)&Resources
);
418 if (!EFI_ERROR (Status
)) {
421 "[%a]: BAR[%d]: Base = %lx, Length = %lx\n",
424 Resources
->AddrRangeMin
,
427 if ((Resources
->Desc
== ACPI_ADDRESS_SPACE_DESCRIPTOR
) &&
428 (Resources
->Len
== (UINT16
)(sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
) - 3)) &&
429 (Resources
->ResType
== ACPI_ADDRESS_SPACE_TYPE_MEM
) &&
430 (Resources
->AddrLen
>= GraphicsInfo
->FrameBufferSize
)
433 if (FrameBufferBase
== 0) {
434 FrameBufferBase
= Resources
->AddrRangeMin
;
437 if (DeviceInfo
->BarIndex
== MAX_UINT8
) {
438 if (Resources
->AddrRangeMin
== GraphicsInfo
->FrameBufferBase
) {
439 FrameBufferBase
= Resources
->AddrRangeMin
;
449 if (Index
== MAX_PCI_BAR
) {
450 Status
= EFI_UNSUPPORTED
;
452 DEBUG ((DEBUG_INFO
, "[%a]: ... matched!\n", gEfiCallerBaseName
));
457 if (EFI_ERROR (Status
)) {
461 if ((RemainingDevicePath
!= NULL
) && IsDevicePathEnd (RemainingDevicePath
)) {
465 Private
= AllocateCopyPool (sizeof (mGraphicsOutputInstanceTemplate
), &mGraphicsOutputInstanceTemplate
);
466 if (Private
== NULL
) {
467 Status
= EFI_OUT_OF_RESOURCES
;
471 Private
->GraphicsOutputMode
.FrameBufferBase
= FrameBufferBase
;
472 Private
->GraphicsOutputMode
.FrameBufferSize
= GraphicsInfo
->FrameBufferSize
;
473 Private
->GraphicsOutputMode
.Info
= &GraphicsInfo
->GraphicsMode
;
476 // Fix up Mode pointer in GraphicsOutput
478 Private
->GraphicsOutput
.Mode
= &Private
->GraphicsOutputMode
;
483 Status
= PciIo
->Attributes (
485 EfiPciIoAttributeOperationGet
,
487 &Private
->PciAttributes
489 if (!EFI_ERROR (Status
)) {
490 Status
= PciIo
->Attributes (
492 EfiPciIoAttributeOperationEnable
,
493 EFI_PCI_DEVICE_ENABLE
,
498 if (EFI_ERROR (Status
)) {
503 // Create the FrameBufferBltLib configuration.
505 ReturnStatus
= FrameBufferBltConfigure (
506 (VOID
*)(UINTN
)Private
->GraphicsOutput
.Mode
->FrameBufferBase
,
507 Private
->GraphicsOutput
.Mode
->Info
,
508 Private
->FrameBufferBltLibConfigure
,
509 &Private
->FrameBufferBltLibConfigureSize
511 if (ReturnStatus
== RETURN_BUFFER_TOO_SMALL
) {
512 Private
->FrameBufferBltLibConfigure
= AllocatePool (Private
->FrameBufferBltLibConfigureSize
);
513 if (Private
->FrameBufferBltLibConfigure
!= NULL
) {
514 ReturnStatus
= FrameBufferBltConfigure (
515 (VOID
*)(UINTN
)Private
->GraphicsOutput
.Mode
->FrameBufferBase
,
516 Private
->GraphicsOutput
.Mode
->Info
,
517 Private
->FrameBufferBltLibConfigure
,
518 &Private
->FrameBufferBltLibConfigureSize
523 if (RETURN_ERROR (ReturnStatus
)) {
524 Status
= EFI_OUT_OF_RESOURCES
;
525 goto RestorePciAttributes
;
528 Private
->DevicePath
= AppendDevicePathNode (PciDevicePath
, (EFI_DEVICE_PATH_PROTOCOL
*)&mGraphicsOutputAdrNode
);
529 if (Private
->DevicePath
== NULL
) {
530 Status
= EFI_OUT_OF_RESOURCES
;
531 goto RestorePciAttributes
;
534 Status
= gBS
->InstallMultipleProtocolInterfaces (
535 &Private
->GraphicsOutputHandle
,
536 &gEfiGraphicsOutputProtocolGuid
,
537 &Private
->GraphicsOutput
,
538 &gEfiDevicePathProtocolGuid
,
543 if (!EFI_ERROR (Status
)) {
544 Status
= gBS
->OpenProtocol (
546 &gEfiPciIoProtocolGuid
,
547 (VOID
**)&Private
->PciIo
,
548 This
->DriverBindingHandle
,
549 Private
->GraphicsOutputHandle
,
550 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
552 if (!EFI_ERROR (Status
)) {
553 mDriverStarted
= TRUE
;
555 gBS
->UninstallMultipleProtocolInterfaces (
556 Private
->GraphicsOutputHandle
,
557 &gEfiGraphicsOutputProtocolGuid
,
558 &Private
->GraphicsOutput
,
559 &gEfiDevicePathProtocolGuid
,
566 RestorePciAttributes
:
567 if (EFI_ERROR (Status
)) {
569 // Restore original PCI attributes
573 EfiPciIoAttributeOperationSet
,
574 Private
->PciAttributes
,
580 if (EFI_ERROR (Status
)) {
581 if (Private
!= NULL
) {
582 if (Private
->DevicePath
!= NULL
) {
583 FreePool (Private
->DevicePath
);
586 if (Private
->FrameBufferBltLibConfigure
!= NULL
) {
587 FreePool (Private
->FrameBufferBltLibConfigure
);
595 if (EFI_ERROR (Status
)) {
597 // Close the PCI I/O Protocol
601 &gEfiDevicePathProtocolGuid
,
602 This
->DriverBindingHandle
,
607 // Close the PCI I/O Protocol
611 &gEfiPciIoProtocolGuid
,
612 This
->DriverBindingHandle
,
621 Stop the video controller.
623 @param This Driver Binding protocol instance pointer.
624 @param Controller The PCI controller.
625 @param NumberOfChildren The number of child device handles in ChildHandleBuffer.
626 @param ChildHandleBuffer An array of child handles to be freed. May be NULL
627 if NumberOfChildren is 0.
629 @retval EFI_SUCCESS The device was stopped.
630 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
634 GraphicsOutputDriverBindingStop (
635 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
636 IN EFI_HANDLE Controller
,
637 IN UINTN NumberOfChildren
,
638 IN EFI_HANDLE
*ChildHandleBuffer
642 EFI_GRAPHICS_OUTPUT_PROTOCOL
*Gop
;
643 GRAPHICS_OUTPUT_PRIVATE_DATA
*Private
;
645 if (NumberOfChildren
== 0) {
647 // Close the PCI I/O Protocol
649 Status
= gBS
->CloseProtocol (
651 &gEfiPciIoProtocolGuid
,
652 This
->DriverBindingHandle
,
655 ASSERT_EFI_ERROR (Status
);
657 Status
= gBS
->CloseProtocol (
659 &gEfiDevicePathProtocolGuid
,
660 This
->DriverBindingHandle
,
663 ASSERT_EFI_ERROR (Status
);
667 ASSERT (NumberOfChildren
== 1);
668 Status
= gBS
->OpenProtocol (
669 ChildHandleBuffer
[0],
670 &gEfiGraphicsOutputProtocolGuid
,
672 This
->DriverBindingHandle
,
673 ChildHandleBuffer
[0],
674 EFI_OPEN_PROTOCOL_GET_PROTOCOL
676 if (EFI_ERROR (Status
)) {
680 Private
= GRAPHICS_OUTPUT_PRIVATE_FROM_THIS (Gop
);
682 Status
= gBS
->CloseProtocol (
684 &gEfiPciIoProtocolGuid
,
685 This
->DriverBindingHandle
,
686 Private
->GraphicsOutputHandle
688 ASSERT_EFI_ERROR (Status
);
690 // Remove the GOP protocol interface from the system
692 Status
= gBS
->UninstallMultipleProtocolInterfaces (
693 Private
->GraphicsOutputHandle
,
694 &gEfiGraphicsOutputProtocolGuid
,
695 &Private
->GraphicsOutput
,
696 &gEfiDevicePathProtocolGuid
,
700 if (!EFI_ERROR (Status
)) {
702 // Restore original PCI attributes
704 Status
= Private
->PciIo
->Attributes (
706 EfiPciIoAttributeOperationSet
,
707 Private
->PciAttributes
,
710 ASSERT_EFI_ERROR (Status
);
712 FreePool (Private
->DevicePath
);
713 FreePool (Private
->FrameBufferBltLibConfigure
);
714 mDriverStarted
= FALSE
;
716 Status
= gBS
->OpenProtocol (
718 &gEfiPciIoProtocolGuid
,
719 (VOID
**)&Private
->PciIo
,
720 This
->DriverBindingHandle
,
721 Private
->GraphicsOutputHandle
,
722 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
724 ASSERT_EFI_ERROR (Status
);
730 EFI_DRIVER_BINDING_PROTOCOL mGraphicsOutputDriverBinding
= {
731 GraphicsOutputDriverBindingSupported
,
732 GraphicsOutputDriverBindingStart
,
733 GraphicsOutputDriverBindingStop
,
740 The Entry Point for GraphicsOutput driver.
742 It installs DriverBinding, ComponentName and ComponentName2 protocol if there is
743 GraphicsInfo HOB passed from Graphics PEIM.
745 @param[in] ImageHandle The firmware allocated handle for the EFI image.
746 @param[in] SystemTable A pointer to the EFI System Table.
748 @retval EFI_SUCCESS The entry point is executed successfully.
749 @retval other Some error occurs when executing this entry point.
754 InitializeGraphicsOutput (
755 IN EFI_HANDLE ImageHandle
,
756 IN EFI_SYSTEM_TABLE
*SystemTable
762 HobStart
= GetFirstGuidHob (&gEfiGraphicsInfoHobGuid
);
764 if ((HobStart
== NULL
) || (GET_GUID_HOB_DATA_SIZE (HobStart
) < sizeof (EFI_PEI_GRAPHICS_INFO_HOB
))) {
765 return EFI_NOT_FOUND
;
768 Status
= EfiLibInstallDriverBindingComponentName2 (
771 &mGraphicsOutputDriverBinding
,
773 &mGraphicsOutputComponentName
,
774 &mGraphicsOutputComponentName2
776 ASSERT_EFI_ERROR (Status
);