beautypg.com

Efi_debugport_protocol.read() – Intel Extensible Firmware Interface User Manual

Page 732

background image

Extensible Firmware Interface Specification

16-18

12/01/02

Version 1.10

EFI_DEBUGPORT_PROTOCOL.Read()

Summary

Reads data from the debugport.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_DEBUGPORT_READ) (
IN EFI_DEBUGPORT_PROTOCOL

*This,

IN UINT32

Timeout,

IN OUT UINTN

*BufferSize,

OUT VOID

*Buffer

);

Parameters

This

A pointer to the

EFI_DEBUGPORT_PROTOCOL

instance. Type

EFI_DEBUGPORT_PROTOCOL

is defined in Section 16.3.

Timeout

The number of microseconds to wait before timing out a read
operation.

BufferSize

A pointer to an integer which, on input contains the requested number
of bytes of data to read, and on output contains the actual number of
bytes of data read and returned in

Buffer

.

Buffer

A pointer to a buffer into which the data read will be saved.

Description

The

Read()

function reads a specified number of bytes from a debugport. If a timeout error or an

overrun error is detected while data is being read from the debugport, then no more characters will
be read, and

EFI_TIMEOUT

will be returned. In all cases the number of bytes actually read is

returned in *

BufferSize

.

It is the responsibility of the caller to insure all parameters are valid. There is no provision for
parameter checking by

Read()

. The implementation behavior when an invalid parameter is

passed is not defined by this specification.

Status Codes Returned

EFI_SUCCESS

The data was read.

EFI_DEVICE_ERROR

The debugport device reported an error.

EFI_TIMEOUT

The operation was stopped due to a timeout or overrun.