8 implementation rules for an efi uga driver – Intel Extensible Firmware Interface User Manual

Page 336

Advertising
background image

Extensible Firmware Interface Specification

10-42

12/01/02

Version 1.10

10.8 Implementation Rules for an EFI UGA Driver

An EFI driver designed to manage the UGA controller must follow the EFI 1.10 driver model and
thus produce an

EFI_DRIVER_BINDING_PROTOCOL

and follow the rules on implementing the

Supported()

,

Start()

, and

Stop()

. The

Start()

function must not initialize or start the

video hardware, and it should just register an

EFI_UGA_IO_PROTOCOL

and one or more

EFI_UGA_DRAW_PROTOCOL

(s). The video hardware must be initialized via

EFI_UGA_IO_PROTOCOL

I/O requests or via the first call to

EFI_UGA_DRAW_PROTOCOL.SetMode()

.

An

EFI_UGA_DRAW_PROTOCOL

must be implemented for every video frame buffer that exists

on a video adapter. In most cases there will be a single

EFI_UGA_DRAW_PROTOCOL

placed on

the Controller handle passed into the

EFI_DRIVER_BINDING.Start()

function

.

As a UGA

ROM can contain more than one EFI Image, the

EFI_UGA_DRAW_PROTOCOL

can be produced

by a separate driver that consumes the

EFI_UGA_IO_PROTOCOL

.

An

EFI_UGA_IO_PROTOCOL

must be produced on the Controller handle passed into the

EFI_DRIVER_BINDING.Start()

function

.

There is only one

EFI_UGA_IO_PROTOCOL

produced for every device being managed by an UGA ROM.

For PCI based video device all hardware access will be done via

EFI_UGA_IO_PROTOCOL

. This

includes IO, MMIO, BAR based access, and DMA.

The EFI Boot Service and Runtime APIs are used to allocate memory and register protocol
interfaces.

Every UGA device must support an 800 x 600 x 32-bit color per pixel at 60 Hz by video mode.

The

EFI_UGA_IO_PROTOCOL.UgaIoDispatchServce()

function must support the

following

UGA_IO_REQUEST

s:

UgaIoCopyRectangle

UgaIoFlushDevice

UgaIoGetChildDevice

UgaIoGetDeviceProperty

UgaIoGetDevicePropertySize

UgaIoGetDeviceState

UgaIoGetMemoryConfiguration

UgaIoResetDevice

UgaIoSetDeviceState

UgaIoSetPowerState

UgaIoSetVideoMode

UgaIoStartDevice

UgaIoStopDevice

Advertising