Gop.c revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
Graphics Output Protocol functions for the QEMU video controller.
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "Qemu.h"
#include <IndustryStandard/Acpi.h>
)
{
}
}
)
{
0,
NULL,
(VOID**) &FrameBufDesc
);
DEBUG ((EFI_D_INFO, "FrameBufferBase: 0x%x, FrameBufferSize: 0x%x\n", Mode->FrameBufferBase, Mode->FrameBufferSize));
return EFI_SUCCESS;
}
//
// Graphics Output Protocol Member Functions
//
)
/*++
Routine Description:
Graphics Output protocol interface to query video mode
Arguments:
This - Protocol instance pointer.
ModeNumber - The mode number to return information on.
Info - Caller allocated buffer that returns information about ModeNumber.
SizeOfInfo - A pointer to the size, in bytes, of the Info buffer.
Returns:
EFI_SUCCESS - Mode information returned.
EFI_BUFFER_TOO_SMALL - The Info buffer was too small.
EFI_DEVICE_ERROR - A hardware error occurred trying to retrieve the video mode.
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
EFI_INVALID_PARAMETER - One of the input args was NULL.
--*/
{
if (Private->HardwareNeedsStarting) {
return EFI_NOT_STARTED;
}
return EFI_INVALID_PARAMETER;
}
return EFI_OUT_OF_RESOURCES;
}
*SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
return EFI_SUCCESS;
}
)
/*++
Routine Description:
Graphics Output protocol interface to set video mode
Arguments:
This - Protocol instance pointer.
ModeNumber - The mode number to be set.
Returns:
EFI_SUCCESS - Graphics mode was changed.
EFI_DEVICE_ERROR - The device had an error and could not complete the request.
EFI_UNSUPPORTED - ModeNumber is not supported by this device.
--*/
{
// UINTN Count;
return EFI_UNSUPPORTED;
}
if (Private->LineBuffer) {
}
return EFI_OUT_OF_RESOURCES;
}
);
return EFI_SUCCESS;
}
)
/*++
Routine Description:
Graphics Output protocol instance to block transfer for CirrusLogic device
Arguments:
This - Pointer to Graphics Output protocol instance
BltBuffer - The data to transfer to screen
BltOperation - The operation to perform
SourceX - The X coordinate of the source for BltOperation
SourceY - The Y coordinate of the source for BltOperation
DestinationX - The X coordinate of the destination for BltOperation
DestinationY - The Y coordinate of the destination for BltOperation
Width - The width of a rectangle in the blt rectangle in pixels
Height - The height of a rectangle in the blt rectangle in pixels
Delta - Not used for EfiBltVideoFill and EfiBltVideoToVideo operation.
If a Delta of 0 is used, the entire BltBuffer will be operated on.
If a subrectangle of the BltBuffer is used, then Delta represents
the number of bytes in a row of the BltBuffer.
Returns:
EFI_INVALID_PARAMETER - Invalid parameter passed in
EFI_SUCCESS - Blt operation success
--*/
{
//
// We have to raise to TPL Notify, so we make an atomic write the frame buffer.
// We would not want a timer based event (Cursor, ...) to come in while we are
// doing this operation.
//
switch (BltOperation) {
case EfiBltVideoToBltBuffer:
case EfiBltBufferToVideo:
case EfiBltVideoFill:
case EfiBltVideoToVideo:
Status = BltLibGopBlt (
);
break;
default:
}
return Status;
}
)
{
//
// Initialize the private data
//
sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE),
);
return Status;
}
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION),
);
return Status;
}
//
// Initialize the hardware
//
DrawLogo (
);
return EFI_SUCCESS;
}
)
/*++
Routine Description:
Arguments:
Returns:
None
--*/
{
}
}
return EFI_SUCCESS;
}