12CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
44 if ((This ==
NULL) || (Info ==
NULL) || (SizeOfInfo ==
NULL) || (ModeNumber >= This->Mode->MaxMode)) {
45 return EFI_INVALID_PARAMETER;
51 Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
53 GraphicsOutput =
NULL;
55 if (Private->CurrentNumberOfGraphicsOutput == 1) {
59 for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
60 GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
61 if (GraphicsOutput !=
NULL) {
67 if (GraphicsOutput !=
NULL) {
71 Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32)ModeNumber, SizeOfInfo, Info);
80 return EFI_OUT_OF_RESOURCES;
84 CopyMem (*Info, &Private->GraphicsOutputModeBuffer[ModeNumber], *SizeOfInfo);
122 if (ModeNumber >= This->Mode->MaxMode) {
123 return EFI_UNSUPPORTED;
126 Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
127 Mode = &Private->GraphicsOutputModeBuffer[ModeNumber];
130 GraphicsOutput =
NULL;
131 PhysicalGraphicsOutput =
NULL;
135 for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
136 GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
137 if (GraphicsOutput !=
NULL) {
138 PhysicalGraphicsOutput = GraphicsOutput;
142 for (NumberIndex = 0; NumberIndex < GraphicsOutput->
Mode->
MaxMode; NumberIndex++) {
143 Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32)NumberIndex, &SizeOfInfo, &Info);
144 if (EFI_ERROR (Status)) {
156 Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32)NumberIndex);
157 if (EFI_ERROR (Status)) {
158 ReturnStatus = Status;
161 UgaDraw = Private->TextOutList[Index].UgaDraw;
162 if (UgaDraw !=
NULL) {
163 Status = UgaDraw->SetMode (
170 if (EFI_ERROR (Status)) {
171 ReturnStatus = Status;
177 This->Mode->Mode = ModeNumber;
179 if ((Private->CurrentNumberOfGraphicsOutput == 1) && (PhysicalGraphicsOutput !=
NULL)) {
184 This->Mode->SizeOfInfo = PhysicalGraphicsOutput->
Mode->
SizeOfInfo;
192 CopyMem (This->Mode->Info, &Private->GraphicsOutputModeBuffer[ModeNumber], This->Mode->SizeOfInfo);
266 if ((This ==
NULL) || (((
UINTN)BltOperation) >= EfiGraphicsOutputBltOperationMax)) {
267 return EFI_INVALID_PARAMETER;
270 Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
277 for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
278 GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
279 if (GraphicsOutput !=
NULL) {
280 Status = GraphicsOutput->Blt (
292 if (EFI_ERROR (Status)) {
293 ReturnStatus = Status;
302 UgaDraw = Private->TextOutList[Index].UgaDraw;
304 Status = UgaDraw->Blt (
316 if (EFI_ERROR (Status)) {
317 ReturnStatus = Status;
348 OUT UINT32 *HorizontalResolution,
349 OUT UINT32 *VerticalResolution,
350 OUT UINT32 *ColorDepth,
351 OUT UINT32 *RefreshRate
356 if ((HorizontalResolution ==
NULL) ||
357 (VerticalResolution ==
NULL) ||
358 (RefreshRate ==
NULL) ||
359 (ColorDepth ==
NULL))
361 return EFI_INVALID_PARAMETER;
367 Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
369 *HorizontalResolution = Private->UgaHorizontalResolution;
370 *VerticalResolution = Private->UgaVerticalResolution;
371 *ColorDepth = Private->UgaColorDepth;
372 *RefreshRate = Private->UgaRefreshRate;
395 IN UINT32 HorizontalResolution,
396 IN UINT32 VerticalResolution,
397 IN UINT32 ColorDepth,
398 IN UINT32 RefreshRate
411 Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
418 Private->UgaHorizontalResolution = HorizontalResolution;
419 Private->UgaVerticalResolution = VerticalResolution;
420 Private->UgaColorDepth = ColorDepth;
421 Private->UgaRefreshRate = RefreshRate;
426 for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
427 GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
428 if (GraphicsOutput !=
NULL) {
432 for (NumberIndex = 0; NumberIndex < GraphicsOutput->
Mode->
MaxMode; NumberIndex++) {
433 Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32)NumberIndex, &SizeOfInfo, &Info);
434 if (EFI_ERROR (Status)) {
446 Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32)NumberIndex);
447 if (EFI_ERROR (Status)) {
448 ReturnStatus = Status;
451 UgaDraw = Private->TextOutList[Index].UgaDraw;
452 if (UgaDraw !=
NULL) {
453 Status = UgaDraw->SetMode (
455 HorizontalResolution,
460 if (EFI_ERROR (Status)) {
461 ReturnStatus = Status;
540 Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
546 for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
547 GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
548 if (GraphicsOutput !=
NULL) {
549 Status = GraphicsOutput->Blt (
561 if (EFI_ERROR (Status)) {
562 ReturnStatus = Status;
571 if ((Private->TextOutList[Index].UgaDraw !=
NULL) &&
FeaturePcdGet (PcdUgaConsumeSupport)) {
572 Status = Private->TextOutList[Index].UgaDraw->Blt (
573 Private->TextOutList[Index].UgaDraw,
584 if (EFI_ERROR (Status)) {
585 ReturnStatus = Status;
616 Private->TextOutMode.Mode = (INT32)ModeNumber;
617 Private->TextOutMode.CursorColumn = 0;
618 Private->TextOutMode.CursorRow = 0;
619 Private->TextOutMode.CursorVisible =
TRUE;
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
EFI_STATUS EFIAPI ConSplitterUgaDrawGetMode(IN EFI_UGA_DRAW_PROTOCOL *This, OUT UINT32 *HorizontalResolution, OUT UINT32 *VerticalResolution, OUT UINT32 *ColorDepth, OUT UINT32 *RefreshRate)
EFI_STATUS EFIAPI ConSplitterGraphicsOutputBlt(IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta OPTIONAL)
VOID TextOutSetMode(IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, IN UINTN ModeNumber)
EFI_STATUS EFIAPI ConSplitterGraphicsOutputSetMode(IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber)
EFI_STATUS EFIAPI ConSplitterGraphicsOutputQueryMode(IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber, OUT UINTN *SizeOfInfo, OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info)
EFI_STATUS EFIAPI ConSplitterUgaDrawBlt(IN EFI_UGA_DRAW_PROTOCOL *This, IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, IN EFI_UGA_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta OPTIONAL)
EFI_STATUS EFIAPI ConSplitterUgaDrawSetMode(IN EFI_UGA_DRAW_PROTOCOL *This, IN UINT32 HorizontalResolution, IN UINT32 VerticalResolution, IN UINT32 ColorDepth, IN UINT32 RefreshRate)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_GRAPHICS_OUTPUT_BLT_OPERATION
#define FeaturePcdGet(TokenName)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE * Mode
UINT32 VerticalResolution
UINT32 HorizontalResolution
EFI_PHYSICAL_ADDRESS FrameBufferBase
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION * Info