TianoCore EDK2 master
Loading...
Searching...
No Matches
Driver.c File Reference
#include "Qemu.h"
#include <IndustryStandard/Acpi.h>

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI QemuVideoControllerDriverSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI QemuVideoControllerDriverStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI QemuVideoControllerDriverStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
VOID outb (QEMU_VIDEO_PRIVATE_DATA *Private, UINTN Address, UINT8 Data)
 
VOID outw (QEMU_VIDEO_PRIVATE_DATA *Private, UINTN Address, UINT16 Data)
 
UINT8 inb (QEMU_VIDEO_PRIVATE_DATA *Private, UINTN Address)
 
UINT16 inw (QEMU_VIDEO_PRIVATE_DATA *Private, UINTN Address)
 
VOID SetPaletteColor (QEMU_VIDEO_PRIVATE_DATA *Private, UINTN Index, UINT8 Red, UINT8 Green, UINT8 Blue)
 
VOID SetDefaultPalette (QEMU_VIDEO_PRIVATE_DATA *Private)
 
VOID ClearScreen (QEMU_VIDEO_PRIVATE_DATA *Private)
 
VOID DrawLogo (QEMU_VIDEO_PRIVATE_DATA *Private, UINTN ScreenWidth, UINTN ScreenHeight)
 
VOID InitializeCirrusGraphicsMode (QEMU_VIDEO_PRIVATE_DATA *Private, QEMU_VIDEO_CIRRUS_MODES *ModeData)
 
VOID BochsWrite (QEMU_VIDEO_PRIVATE_DATA *Private, UINT16 Reg, UINT16 Data)
 
UINT16 BochsRead (QEMU_VIDEO_PRIVATE_DATA *Private, UINT16 Reg)
 
VOID VgaOutb (QEMU_VIDEO_PRIVATE_DATA *Private, UINTN Reg, UINT8 Data)
 
STATIC UINT8 VgaInb (QEMU_VIDEO_PRIVATE_DATA *Private, UINTN Reg)
 
VOID InitializeBochsGraphicsMode (QEMU_VIDEO_PRIVATE_DATA *Private, QEMU_VIDEO_MODE_DATA *ModeData)
 
EFI_STATUS EFIAPI InitializeQemuVideo (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

EFI_DRIVER_BINDING_PROTOCOL gQemuVideoDriverBinding
 
QEMU_VIDEO_CARD gQemuVideoCardList []
 

Detailed Description

This driver is a sample implementation of the Graphics Output Protocol for the QEMU (Cirrus Logic 5446) video controller.

Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Driver.c.

Function Documentation

◆ BochsRead()

UINT16 BochsRead ( QEMU_VIDEO_PRIVATE_DATA Private,
UINT16  Reg 
)

Definition at line 928 of file Driver.c.

◆ BochsWrite()

VOID BochsWrite ( QEMU_VIDEO_PRIVATE_DATA Private,
UINT16  Reg,
UINT16  Data 
)

Definition at line 903 of file Driver.c.

◆ ClearScreen()

VOID ClearScreen ( QEMU_VIDEO_PRIVATE_DATA Private)

TODO: Add function description

Parameters
PrivateTODO: add argument description

TODO: add return values

Definition at line 806 of file Driver.c.

◆ DrawLogo()

VOID DrawLogo ( QEMU_VIDEO_PRIVATE_DATA Private,
UINTN  ScreenWidth,
UINTN  ScreenHeight 
)

TODO: Add function description

Parameters
PrivateTODO: add argument description

TODO: add return values

Definition at line 832 of file Driver.c.

◆ inb()

UINT8 inb ( QEMU_VIDEO_PRIVATE_DATA Private,
UINTN  Address 
)

TODO: Add function description

Parameters
PrivateTODO: add argument description
AddressTODO: add argument description

TODO: add return values

Definition at line 695 of file Driver.c.

◆ InitializeBochsGraphicsMode()

VOID InitializeBochsGraphicsMode ( QEMU_VIDEO_PRIVATE_DATA Private,
QEMU_VIDEO_MODE_DATA ModeData 
)

Definition at line 1007 of file Driver.c.

◆ InitializeCirrusGraphicsMode()

VOID InitializeCirrusGraphicsMode ( QEMU_VIDEO_PRIVATE_DATA Private,
QEMU_VIDEO_CIRRUS_MODES ModeData 
)

TODO: Add function description

Parameters
PrivateTODO: add argument description
ModeDataTODO: add argument description

TODO: add return values

Definition at line 850 of file Driver.c.

◆ InitializeQemuVideo()

EFI_STATUS EFIAPI InitializeQemuVideo ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Definition at line 1050 of file Driver.c.

◆ inw()

UINT16 inw ( QEMU_VIDEO_PRIVATE_DATA Private,
UINTN  Address 
)

TODO: Add function description

Parameters
PrivateTODO: add argument description
AddressTODO: add argument description

TODO: add return values

Definition at line 723 of file Driver.c.

◆ outb()

VOID outb ( QEMU_VIDEO_PRIVATE_DATA Private,
UINTN  Address,
UINT8  Data 
)

TODO: Add function description

Parameters
PrivateTODO: add argument description
AddressTODO: add argument description
DataTODO: add argument description

TODO: add return values

Definition at line 642 of file Driver.c.

◆ outw()

VOID outw ( QEMU_VIDEO_PRIVATE_DATA Private,
UINTN  Address,
UINT16  Data 
)

TODO: Add function description

Parameters
PrivateTODO: add argument description
AddressTODO: add argument description
DataTODO: add argument description

TODO: add return values

Definition at line 669 of file Driver.c.

◆ QemuVideoControllerDriverStart()

EFI_STATUS EFIAPI QemuVideoControllerDriverStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Controller,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Start to process the controller.

Parameters
ThisThe USB bus driver binding instance.
ControllerThe controller to check.
RemainingDevicePathThe remaining device patch.
Return values
EFI_SUCCESSThe controller is controlled by the usb bus.
EFI_ALREADY_STARTEDThe controller is already controlled by the usb bus.
EFI_OUT_OF_RESOURCESFailed to allocate resources.

Definition at line 193 of file Driver.c.

◆ QemuVideoControllerDriverStop()

EFI_STATUS EFIAPI QemuVideoControllerDriverStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Controller,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop this device

Parameters
ThisThe USB bus driver binding protocol.
ControllerThe controller to release.
NumberOfChildrenThe number of children of this device that opened the controller BY_CHILD.
ChildHandleBufferThe array of child handle.
Return values
EFI_SUCCESSThe controller or children are stopped.
EFI_DEVICE_ERRORFailed to stop the driver.

Definition at line 535 of file Driver.c.

◆ QemuVideoControllerDriverSupported()

EFI_STATUS EFIAPI QemuVideoControllerDriverSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Controller,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Check if this device is supported.

Parameters
ThisThe driver binding protocol.
ControllerThe controller handle to check.
RemainingDevicePathThe remaining device path.
Return values
EFI_SUCCESSThe bus supports this controller.
EFI_UNSUPPORTEDThis device isn't supported.

Definition at line 113 of file Driver.c.

◆ SetDefaultPalette()

VOID SetDefaultPalette ( QEMU_VIDEO_PRIVATE_DATA Private)

TODO: Add function description

Parameters
PrivateTODO: add argument description

TODO: add return values

Definition at line 777 of file Driver.c.

◆ SetPaletteColor()

VOID SetPaletteColor ( QEMU_VIDEO_PRIVATE_DATA Private,
UINTN  Index,
UINT8  Red,
UINT8  Green,
UINT8  Blue 
)

TODO: Add function description

Parameters
PrivateTODO: add argument description
IndexTODO: add argument description
RedTODO: add argument description
GreenTODO: add argument description
BlueTODO: add argument description

TODO: add return values

Definition at line 754 of file Driver.c.

◆ VgaInb()

STATIC UINT8 VgaInb ( QEMU_VIDEO_PRIVATE_DATA Private,
UINTN  Reg 
)

Definition at line 980 of file Driver.c.

◆ VgaOutb()

VOID VgaOutb ( QEMU_VIDEO_PRIVATE_DATA Private,
UINTN  Reg,
UINT8  Data 
)

Definition at line 955 of file Driver.c.

Variable Documentation

◆ gQemuVideoCardList

QEMU_VIDEO_CARD gQemuVideoCardList[]

Definition at line 23 of file Driver.c.

◆ gQemuVideoDriverBinding

EFI_DRIVER_BINDING_PROTOCOL gQemuVideoDriverBinding
Initial value:
= {
0x10,
}
#define NULL
Definition: Base.h:319
EFI_STATUS EFIAPI QemuVideoControllerDriverStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: Driver.c:193
EFI_STATUS EFIAPI QemuVideoControllerDriverStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: Driver.c:535
EFI_STATUS EFIAPI QemuVideoControllerDriverSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: Driver.c:113

Definition at line 14 of file Driver.c.