sync tracker to remove duplicate display mode in ConOut virtual handle GOP instance.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4533 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2008-01-09 05:55:46 +00:00
parent ff44fe7118
commit aec072adb2
3 changed files with 130 additions and 92 deletions

View File

@ -170,7 +170,8 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
NULL NULL
}, },
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
(TEXT_OUT_GOP_MODE *) NULL, (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,
0,
0, 0,
TRUE, TRUE,
{ {
@ -233,7 +234,8 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
NULL NULL
}, },
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
(TEXT_OUT_GOP_MODE *) NULL, (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,
0,
0, 0,
TRUE, TRUE,
{ {
@ -663,6 +665,7 @@ ConSplitterTextOutConstructor (
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
// //
// Copy protocols template // Copy protocols template
@ -722,21 +725,24 @@ ConSplitterTextOutConstructor (
} }
// //
// Setup the DevNullGraphicsOutput to 800 x 600 x 32 bits per pixel // Setup the DevNullGraphicsOutput to 800 x 600 x 32 bits per pixel
// DevNull will be updated to user-defined mode after driver has started.
// //
if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (TEXT_OUT_GOP_MODE))) == NULL) { if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
ConOutPrivate->GraphicsOutputModeBuffer[0].HorizontalResolution = 800; Info = &ConOutPrivate->GraphicsOutputModeBuffer[0];
ConOutPrivate->GraphicsOutputModeBuffer[0].VerticalResolution = 600; Info->Version = 0;
Info->HorizontalResolution = 800;
Info->VerticalResolution = 600;
Info->PixelFormat = PixelBltOnly;
Info->PixelsPerScanLine = 800;
CopyMem (ConOutPrivate->GraphicsOutput.Mode->Info, Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
// //
// Initialize the following items, theset items remain unchanged in GraphicsOutput->SetMode() // Initialize the following items, theset items remain unchanged in GraphicsOutput->SetMode()
// GraphicsOutputMode->Info->Version, GraphicsOutputMode->Info->PixelFormat // GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize
// GraphicsOutputMode->SizeOfInfo, GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize
// //
ConOutPrivate->GraphicsOutput.Mode->Info->Version = 0;
ConOutPrivate->GraphicsOutput.Mode->Info->PixelFormat = PixelBltOnly;
ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
ConOutPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL; ConOutPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL;
ConOutPrivate->GraphicsOutput.Mode->FrameBufferSize = 0; ConOutPrivate->GraphicsOutput.Mode->FrameBufferSize = 0;
@ -2464,14 +2470,15 @@ Returns:
{ {
EFI_STATUS Status; EFI_STATUS Status;
UINTN Index; UINTN Index;
TEXT_OUT_GOP_MODE *Mode; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Mode;
UINTN SizeOfInfo; UINTN SizeOfInfo;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *CurrentGraphicsOutputMode; EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *CurrentGraphicsOutputMode;
TEXT_OUT_GOP_MODE *ModeBuffer; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *ModeBuffer;
TEXT_OUT_GOP_MODE *MatchedMode; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *MatchedMode;
UINTN NumberIndex; UINTN NumberIndex;
BOOLEAN Match; BOOLEAN Match;
BOOLEAN AlreadyExist;
if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) { if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
@ -2479,6 +2486,17 @@ Returns:
CurrentGraphicsOutputMode = Private->GraphicsOutput.Mode; CurrentGraphicsOutputMode = Private->GraphicsOutput.Mode;
Index = 0;
if (Private->CurrentNumberOfUgaDraw != 0) {
//
// If any UGA device has already been added, then there is no need to
// calculate intersection of display mode of different GOP/UGA device,
// since only one display mode will be exported (i.e. user-defined mode)
//
goto Done;
}
if (GraphicsOutput != NULL) { if (GraphicsOutput != NULL) {
if (Private->CurrentNumberOfGraphicsOutput == 0) { if (Private->CurrentNumberOfGraphicsOutput == 0) {
// //
@ -2494,7 +2512,7 @@ Returns:
// //
// Allocate resource for the private mode buffer // Allocate resource for the private mode buffer
// //
ModeBuffer = AllocatePool (sizeof (TEXT_OUT_GOP_MODE) * GraphicsOutput->Mode->MaxMode); ModeBuffer = AllocatePool (GraphicsOutput->Mode->SizeOfInfo * GraphicsOutput->Mode->MaxMode);
if (ModeBuffer == NULL) { if (ModeBuffer == NULL) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -2510,8 +2528,7 @@ Returns:
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
Mode->HorizontalResolution = Info->HorizontalResolution; CopyMem (Mode, Info, SizeOfInfo);
Mode->VerticalResolution = Info->VerticalResolution;
Mode++; Mode++;
FreePool (Info); FreePool (Info);
} }
@ -2519,7 +2536,7 @@ Returns:
// //
// Check intersection of display mode // Check intersection of display mode
// //
ModeBuffer = AllocatePool (sizeof (TEXT_OUT_GOP_MODE) * CurrentGraphicsOutputMode->MaxMode); ModeBuffer = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION) * CurrentGraphicsOutputMode->MaxMode);
if (ModeBuffer == NULL) { if (ModeBuffer == NULL) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -2535,7 +2552,7 @@ Returns:
return Status; return Status;
} }
if ((Info->HorizontalResolution == Mode->HorizontalResolution) && if ((Info->HorizontalResolution == Mode->HorizontalResolution) &&
(Info->VerticalResolution == Mode->VerticalResolution)){ (Info->VerticalResolution == Mode->VerticalResolution)) {
Match = TRUE; Match = TRUE;
FreePool (Info); FreePool (Info);
break; break;
@ -2544,8 +2561,28 @@ Returns:
} }
if (Match) { if (Match) {
CopyMem (MatchedMode, Mode, sizeof (TEXT_OUT_GOP_MODE)); AlreadyExist = FALSE;
MatchedMode++;
for (Info = ModeBuffer; Info < MatchedMode; Info++) {
if ((Info->HorizontalResolution == Mode->HorizontalResolution) &&
(Info->VerticalResolution == Mode->VerticalResolution)) {
AlreadyExist = TRUE;
break;
}
}
if (!AlreadyExist) {
CopyMem (MatchedMode, Mode, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
//
// Physical frame buffer is no longer available, change PixelFormat to PixelBltOnly
//
MatchedMode->Version = 0;
MatchedMode->PixelFormat = PixelBltOnly;
ZeroMem (&MatchedMode->PixelInformation, sizeof (EFI_PIXEL_BITMASK));
MatchedMode++;
}
} }
Mode++; Mode++;
@ -2560,7 +2597,7 @@ Returns:
// //
// Physical frame buffer is no longer available when there are more than one physical GOP devices // Physical frame buffer is no longer available when there are more than one physical GOP devices
// //
CurrentGraphicsOutputMode->MaxMode = (UINT32) (((UINTN) MatchedMode - (UINTN) ModeBuffer) / sizeof (TEXT_OUT_GOP_MODE)); CurrentGraphicsOutputMode->MaxMode = (UINT32) (((UINTN) MatchedMode - (UINTN) ModeBuffer) / sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
CurrentGraphicsOutputMode->Info->PixelFormat = PixelBltOnly; CurrentGraphicsOutputMode->Info->PixelFormat = PixelBltOnly;
ZeroMem (&CurrentGraphicsOutputMode->Info->PixelInformation, sizeof (EFI_PIXEL_BITMASK)); ZeroMem (&CurrentGraphicsOutputMode->Info->PixelInformation, sizeof (EFI_PIXEL_BITMASK));
CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION); CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
@ -2584,21 +2621,19 @@ Returns:
Index = 0; Index = 0;
} }
// }
// Current mode number may need update now, so set it to an invalide mode number if (UgaDraw != NULL) {
//
CurrentGraphicsOutputMode->Mode = 0xffff;
} else {
// //
// For UGA device, it's inconvenient to retrieve all the supported display modes. // For UGA device, it's inconvenient to retrieve all the supported display modes.
// To simplify the implementation, only add one resolution(800x600, 32bit color depth) as defined in UEFI spec // To simplify the implementation, only add one resolution(800x600, 32bit color depth) as defined in UEFI spec
// //
CurrentGraphicsOutputMode->MaxMode = 1; CurrentGraphicsOutputMode->MaxMode = 1;
CurrentGraphicsOutputMode->Info->Version = 0; Info = CurrentGraphicsOutputMode->Info;
CurrentGraphicsOutputMode->Info->HorizontalResolution = 800; Info->Version = 0;
CurrentGraphicsOutputMode->Info->VerticalResolution = 600; Info->HorizontalResolution = 800;
CurrentGraphicsOutputMode->Info->PixelFormat = PixelBltOnly; Info->VerticalResolution = 600;
CurrentGraphicsOutputMode->Info->PixelsPerScanLine = 800; Info->PixelFormat = PixelBltOnly;
Info->PixelsPerScanLine = 800;
CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION); CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
CurrentGraphicsOutputMode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL; CurrentGraphicsOutputMode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL;
CurrentGraphicsOutputMode->FrameBufferSize = 0; CurrentGraphicsOutputMode->FrameBufferSize = 0;
@ -2606,26 +2641,33 @@ Returns:
// //
// Update the private mode buffer // Update the private mode buffer
// //
ModeBuffer = &Private->GraphicsOutputModeBuffer[0]; CopyMem (&Private->GraphicsOutputModeBuffer[0], Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
ModeBuffer->HorizontalResolution = 800;
ModeBuffer->VerticalResolution = 600;
// //
// Current mode is unknow now, set it to an invalid mode number 0xffff // Only mode 0 is available to be set
// //
CurrentGraphicsOutputMode->Mode = 0xffff;
Index = 0; Index = 0;
} }
Done:
if (GraphicsOutput != NULL) {
Private->CurrentNumberOfGraphicsOutput++;
}
if (UgaDraw != NULL) {
Private->CurrentNumberOfUgaDraw++;
}
// //
// Force GraphicsOutput mode to be set, // Force GraphicsOutput mode to be set,
// regardless whether the console is in EfiConsoleControlScreenGraphics or EfiConsoleControlScreenText mode // regardless whether the console is in EfiConsoleControlScreenGraphics or EfiConsoleControlScreenText mode
// //
Private->HardwareNeedsStarting = TRUE; Private->HardwareNeedsStarting = TRUE;
//
// Current mode number may need update now, so set it to an invalid mode number
//
Status = Private->GraphicsOutput.SetMode (&Private->GraphicsOutput, (UINT32) Index); Status = Private->GraphicsOutput.SetMode (&Private->GraphicsOutput, (UINT32) Index);
Private->CurrentNumberOfGraphicsOutput++;
return Status; return Status;
} }
@ -2737,7 +2779,7 @@ Returns:
// //
// The new console supports the same mode of the current console so sync up // The new console supports the same mode of the current console so sync up
// //
DevNullSyncGopStdOut (Private); DevNullSyncStdOut (Private);
} else { } else {
// //
// If ConOut, then set the mode to Mode #0 which us 80 x 25 // If ConOut, then set the mode to Mode #0 which us 80 x 25
@ -2781,6 +2823,14 @@ Returns:
if (TextOutList->TextOut == TextOut) { if (TextOutList->TextOut == TextOut) {
CopyMem (TextOutList, TextOutList + 1, sizeof (TEXT_OUT_AND_GOP_DATA) * Index); CopyMem (TextOutList, TextOutList + 1, sizeof (TEXT_OUT_AND_GOP_DATA) * Index);
CurrentNumOfConsoles--; CurrentNumOfConsoles--;
if (FeaturePcdGet (PcdConOutGopSupport)) {
if (TextOutList->UgaDraw != NULL) {
Private->CurrentNumberOfUgaDraw--;
}
if (TextOutList->GraphicsOutput != NULL) {
Private->CurrentNumberOfGraphicsOutput--;
}
}
break; break;
} }

View File

@ -106,7 +106,7 @@ typedef struct {
UINTN CurrentNumberOfExConsoles; UINTN CurrentNumberOfExConsoles;
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL **TextInExList; EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL **TextInExList;
UINTN TextInExListCount; UINTN TextInExListCount;
LIST_ENTRY NotifyList; LIST_ENTRY NotifyList;
EFI_SIMPLE_POINTER_PROTOCOL SimplePointer; EFI_SIMPLE_POINTER_PROTOCOL SimplePointer;
@ -120,7 +120,7 @@ typedef struct {
UINTN CurrentNumberOfAbsolutePointers; UINTN CurrentNumberOfAbsolutePointers;
EFI_ABSOLUTE_POINTER_PROTOCOL **AbsolutePointerList; EFI_ABSOLUTE_POINTER_PROTOCOL **AbsolutePointerList;
UINTN AbsolutePointerListCount; UINTN AbsolutePointerListCount;
BOOLEAN AbsoluteInputEventSignalState; BOOLEAN AbsoluteInputEventSignalState;
BOOLEAN PasswordEnabled; BOOLEAN PasswordEnabled;
CHAR16 Password[MAX_STD_IN_PASSWORD]; CHAR16 Password[MAX_STD_IN_PASSWORD];
@ -171,11 +171,6 @@ typedef struct {
BOOLEAN TextOutEnabled; BOOLEAN TextOutEnabled;
} TEXT_OUT_AND_GOP_DATA; } TEXT_OUT_AND_GOP_DATA;
typedef struct {
UINT32 HorizontalResolution;
UINT32 VerticalResolution;
} TEXT_OUT_GOP_MODE;
typedef struct { typedef struct {
UINT64 Signature; UINT64 Signature;
EFI_HANDLE VirtualHandle; EFI_HANDLE VirtualHandle;
@ -191,8 +186,9 @@ typedef struct {
EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput; EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt; EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt;
TEXT_OUT_GOP_MODE *GraphicsOutputModeBuffer; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GraphicsOutputModeBuffer;
UINTN CurrentNumberOfGraphicsOutput; UINTN CurrentNumberOfGraphicsOutput;
UINTN CurrentNumberOfUgaDraw;
BOOLEAN HardwareNeedsStarting; BOOLEAN HardwareNeedsStarting;
EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl; EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
@ -446,14 +442,14 @@ ConSplitterAbsolutePointerReset (
Returns: Returns:
EFI_SUCCESS - The device was reset. EFI_SUCCESS - The device was reset.
EFI_DEVICE_ERROR - The device is not functioning correctly and could EFI_DEVICE_ERROR - The device is not functioning correctly and could
not be reset. not be reset.
--*/ --*/
; ;
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterAbsolutePointerGetState ( ConSplitterAbsolutePointerGetState (
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
IN OUT EFI_ABSOLUTE_POINTER_STATE *State IN OUT EFI_ABSOLUTE_POINTER_STATE *State
@ -470,9 +466,9 @@ ConSplitterAbsolutePointerGetState (
Returns: Returns:
EFI_SUCCESS - The state of the pointer device was returned in State.. EFI_SUCCESS - The state of the pointer device was returned in State..
EFI_NOT_READY - The state of the pointer device has not changed since the last call to EFI_NOT_READY - The state of the pointer device has not changed since the last call to
GetState(). GetState().
EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer
device's current state. device's current state.
--*/ --*/
; ;
@ -964,7 +960,7 @@ ConSplitterTextInResetEx (
Returns: Returns:
EFI_SUCCESS - The device was reset. EFI_SUCCESS - The device was reset.
EFI_DEVICE_ERROR - The device is not functioning properly and could EFI_DEVICE_ERROR - The device is not functioning properly and could
not be reset. not be reset.
--*/ --*/
@ -979,20 +975,20 @@ ConSplitterTextInReadKeyStrokeEx (
/*++ /*++
Routine Description: Routine Description:
Reads the next keystroke from the input device. The WaitForKey Event can Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call. be used to test for existance of a keystroke via WaitForEvent () call.
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
KeyData - A pointer to a buffer that is filled in with the keystroke KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed. state data for the key that was pressed.
Returns: Returns:
EFI_SUCCESS - The keystroke information was returned. EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable. EFI_NOT_READY - There was no keystroke data availiable.
EFI_DEVICE_ERROR - The keystroke information was not returned due to EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors. hardware errors.
EFI_INVALID_PARAMETER - KeyData is NULL. EFI_INVALID_PARAMETER - KeyData is NULL.
--*/ --*/
; ;
@ -1010,17 +1006,17 @@ ConSplitterTextInSetState (
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
state for the input device. state for the input device.
Returns: Returns:
EFI_SUCCESS - The device state was set successfully. EFI_SUCCESS - The device state was set successfully.
EFI_DEVICE_ERROR - The device is not functioning correctly and could EFI_DEVICE_ERROR - The device is not functioning correctly and could
not have the setting adjusted. not have the setting adjusted.
EFI_UNSUPPORTED - The device does not have the ability to set its state. EFI_UNSUPPORTED - The device does not have the ability to set its state.
EFI_INVALID_PARAMETER - KeyToggleState is NULL. EFI_INVALID_PARAMETER - KeyToggleState is NULL.
--*/ --*/
; ;
EFI_STATUS EFI_STATUS
@ -1038,18 +1034,18 @@ ConSplitterTextInRegisterKeyNotify (
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
KeyData - A pointer to a buffer that is filled in with the keystroke KeyData - A pointer to a buffer that is filled in with the keystroke
information data for the key that was pressed. information data for the key that was pressed.
KeyNotificationFunction - Points to the function to be called when the key KeyNotificationFunction - Points to the function to be called when the key
sequence is typed specified by KeyData. sequence is typed specified by KeyData.
NotifyHandle - Points to the unique handle assigned to the registered notification. NotifyHandle - Points to the unique handle assigned to the registered notification.
Returns: Returns:
EFI_SUCCESS - The notification function was registered successfully. EFI_SUCCESS - The notification function was registered successfully.
EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures. EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL. EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
--*/ --*/
; ;
EFI_STATUS EFI_STATUS
@ -1064,15 +1060,15 @@ ConSplitterTextInUnregisterKeyNotify (
Remove a registered notification function from a particular keystroke. Remove a registered notification function from a particular keystroke.
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
NotificationHandle - The handle of the notification function being unregistered. NotificationHandle - The handle of the notification function being unregistered.
Returns: Returns:
EFI_SUCCESS - The notification function was unregistered successfully. EFI_SUCCESS - The notification function was unregistered successfully.
EFI_INVALID_PARAMETER - The NotificationHandle is invalid. EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
EFI_NOT_FOUND - Can not find the matching entry in database. EFI_NOT_FOUND - Can not find the matching entry in database.
--*/ --*/
; ;
VOID VOID
EFIAPI EFIAPI
@ -1369,7 +1365,7 @@ DevNullTextOutEnableCursor (
; ;
EFI_STATUS EFI_STATUS
DevNullSyncGopStdOut ( DevNullSyncStdOut (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
) )
; ;

View File

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2006 - 2007, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -15,7 +15,7 @@ Module Name:
Abstract: Abstract:
Support for ConsoleControl protocol. Support for UGA Draw spliter. Support for ConsoleControl protocol. Support for Graphics output spliter.
Support for DevNull Console Out. This console uses memory buffers Support for DevNull Console Out. This console uses memory buffers
to represnt the console. It allows a console to start very early and to represnt the console. It allows a console to start very early and
when a new console is added it is synced up with the current console when a new console is added it is synced up with the current console
@ -39,13 +39,13 @@ ConSpliterConsoleControlGetMode (
Routine Description: Routine Description:
Return the current video mode information. Also returns info about existence Return the current video mode information. Also returns info about existence
of UGA Draw devices in system, and if the Std In device is locked. All the of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the
arguments are optional and only returned if a non NULL pointer is passed in. arguments are optional and only returned if a non NULL pointer is passed in.
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
Mode - Are we in text of grahics mode. Mode - Are we in text of grahics mode.
UgaExists - TRUE if UGA Spliter has found a UGA device GopExists - TRUE if GOP Spliter has found a GOP/UGA device
StdInLocked - TRUE if StdIn device is keyboard locked StdInLocked - TRUE if StdIn device is keyboard locked
Returns: Returns:
@ -155,7 +155,7 @@ ConSpliterConsoleControlSetMode (
} }
} }
if (Mode == EfiConsoleControlScreenText) { if (Mode == EfiConsoleControlScreenText) {
DevNullSyncGopStdOut (Private); DevNullSyncStdOut (Private);
} }
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -189,7 +189,6 @@ ConSpliterGraphicsOutputQueryMode (
--*/ --*/
{ {
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private; TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
TEXT_OUT_GOP_MODE *Mode;
if (This == NULL || Info == NULL || SizeOfInfo == NULL || ModeNumber >= This->Mode->MaxMode) { if (This == NULL || Info == NULL || SizeOfInfo == NULL || ModeNumber >= This->Mode->MaxMode) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -212,11 +211,7 @@ ConSpliterGraphicsOutputQueryMode (
*SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION); *SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
CopyMem (*Info, Private->GraphicsOutput.Mode->Info, *SizeOfInfo); CopyMem (*Info, &Private->GraphicsOutputModeBuffer[ModeNumber], *SizeOfInfo);
Mode = &Private->GraphicsOutputModeBuffer[ModeNumber];
(*Info)->HorizontalResolution = Mode->HorizontalResolution;
(*Info)->VerticalResolution = Mode->VerticalResolution;
(*Info)->PixelsPerScanLine = Mode->HorizontalResolution;
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -248,7 +243,7 @@ Routine Description:
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private; TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
UINTN Index; UINTN Index;
EFI_STATUS ReturnStatus; EFI_STATUS ReturnStatus;
TEXT_OUT_GOP_MODE *Mode; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Mode;
UINTN Size; UINTN Size;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
UINTN NumberIndex; UINTN NumberIndex;
@ -335,10 +330,7 @@ Routine Description:
This->Mode->Mode = ModeNumber; This->Mode->Mode = ModeNumber;
Info = This->Mode->Info; CopyMem (This->Mode->Info, &Private->GraphicsOutputModeBuffer[ModeNumber], This->Mode->SizeOfInfo);
Info->HorizontalResolution = Mode->HorizontalResolution;
Info->VerticalResolution = Mode->VerticalResolution;
Info->PixelsPerScanLine = Mode->HorizontalResolution;
// //
// Information is not enough here, so the following items remain unchanged: // Information is not enough here, so the following items remain unchanged:
@ -1526,7 +1518,7 @@ DevNullTextOutEnableCursor (
} }
EFI_STATUS EFI_STATUS
DevNullSyncGopStdOut ( DevNullSyncStdOut (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
) )
/*++ /*++