OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
ConsoleGop.c File Reference
#include "OcConsoleLibInternal.h"
#include "ConsoleGopInternal.h"
#include <Protocol/AppleEg2Info.h>
#include <Protocol/ConsoleControl.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/SimpleTextOut.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/OcBlitLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/MtrrLib.h>
#include <Library/OcConsoleLib.h>
#include <Library/OcMiscLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>

Go to the source code of this file.

Functions

STATIC EFI_STATUS EFIAPI ConsoleHandleProtocol (IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, OUT VOID **Interface)
 
EFI_STATUS OcProvideConsoleGop (IN BOOLEAN Route)
 
STATIC VOID SwitchMode (IN OUT EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN BOOLEAN UseCustom)
 
STATIC VOID RotateMode (IN OUT EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 Rotation)
 
STATIC OC_BLIT_CONFIGURE *EFIAPI DirectGopFromTarget (IN EFI_PHYSICAL_ADDRESS FramebufferBase, IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info, OUT UINTN *PageCount)
 
STATIC EFI_STATUS EFIAPI DirectGopSetMode (IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber)
 
STATIC EFI_STATUS EFIAPI DirectQueryMode (IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber, OUT UINTN *SizeOfInfo, OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info)
 
STATIC EFI_STATUS EFIAPI DirectGopBlt (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 OcReconnectConsole (VOID)
 
EFI_STATUS OcUseDirectGop (IN INT32 CacheType)
 
CONST CONSOLE_GOP_CONTEXTInternalGetDirectGopContext (VOID)
 

Variables

STATIC CONSOLE_GOP_CONTEXT mGop
 

Detailed Description

Copyright (C) 2019, vit9696. All rights reserved.

All rights reserved.

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 http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file ConsoleGop.c.

Function Documentation

◆ ConsoleHandleProtocol()

STATIC EFI_STATUS EFIAPI ConsoleHandleProtocol ( IN EFI_HANDLE Handle,
IN EFI_GUID * Protocol,
OUT VOID ** Interface )

Definition at line 40 of file ConsoleGop.c.

◆ DirectGopBlt()

STATIC EFI_STATUS EFIAPI DirectGopBlt ( 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 )

Definition at line 450 of file ConsoleGop.c.

◆ DirectGopFromTarget()

STATIC OC_BLIT_CONFIGURE *EFIAPI DirectGopFromTarget ( IN EFI_PHYSICAL_ADDRESS FramebufferBase,
IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION * Info,
OUT UINTN * PageCount )

Definition at line 309 of file ConsoleGop.c.

◆ DirectGopSetMode()

STATIC EFI_STATUS EFIAPI DirectGopSetMode ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
IN UINT32 ModeNumber )

Definition at line 355 of file ConsoleGop.c.

◆ DirectQueryMode()

STATIC EFI_STATUS EFIAPI DirectQueryMode ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
IN UINT32 ModeNumber,
OUT UINTN * SizeOfInfo,
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION ** Info )

Definition at line 420 of file ConsoleGop.c.

◆ InternalGetDirectGopContext()

CONST CONSOLE_GOP_CONTEXT * InternalGetDirectGopContext ( VOID )

Definition at line 635 of file ConsoleGop.c.

◆ OcProvideConsoleGop()

EFI_STATUS OcProvideConsoleGop ( IN BOOLEAN Route)

Ensure installed GOP protocol on ConOut handle.

Definition at line 81 of file ConsoleGop.c.

◆ OcReconnectConsole()

VOID OcReconnectConsole ( VOID )

Perform console reconnection.

Definition at line 482 of file ConsoleGop.c.

◆ OcUseDirectGop()

EFI_STATUS OcUseDirectGop ( IN INT32 CacheType)

Use direct GOP renderer for console.

Parameters
[in]CacheTypeCaching type, e.g. CacheWriteCombining or -1 to disable.
[in]RotationRotation scheme in degrees (must be one of 0, 90, 180, 270).
Return values
EFI_SUCCESSon success.

Definition at line 536 of file ConsoleGop.c.

◆ RotateMode()

STATIC VOID RotateMode ( IN OUT EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
IN UINT32 Rotation )

Translate current GOP mode to custom (rotated) mode. Both original and custom modes are saved.

Parameters
[in,out]ThisGOP protocol to update.
[in]RotationRotation angle.

Definition at line 269 of file ConsoleGop.c.

◆ SwitchMode()

STATIC VOID SwitchMode ( IN OUT EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
IN BOOLEAN UseCustom )

Update current GOP mode to represent either custom (rotated) or original mode. In general custom mode is used, but to call the original functions it is safer to switch to original.

Parameters
[in,out]ThisGOP protocol to update.
[in]SourceSource mode.

Definition at line 234 of file ConsoleGop.c.

Variable Documentation

◆ mGop

STATIC CONSOLE_GOP_CONTEXT mGop

Definition at line 35 of file ConsoleGop.c.