TianoCore EDK2 master
Loading...
Searching...
No Matches
VirtioSerial.h File Reference

Go to the source code of this file.

Data Structures

struct  _VIRTIO_SERIAL_RING
 
struct  _VIRTIO_SERIAL_PORT
 
struct  _VIRTIO_SERIAL_DEV
 
struct  _VIRTIO_SERIAL_IO_PROTOCOL
 

Macros

#define VIRTIO_SERIAL_SIG   SIGNATURE_32 ('V', 'S', 'I', 'O')
 
#define MAX_PORTS   8
 
#define MAX_RINGS   (MAX_PORTS * 2 + 2)
 
#define CTRL_RX_BUFSIZE   128
 
#define CTRL_TX_BUFSIZE   sizeof(VIRTIO_SERIAL_CONTROL)
 
#define PORT_RX_BUFSIZE   128
 
#define PORT_TX_BUFSIZE   128
 

Typedefs

typedef struct _VIRTIO_SERIAL_DEV VIRTIO_SERIAL_DEV
 
typedef struct _VIRTIO_SERIAL_RING VIRTIO_SERIAL_RING
 
typedef struct _VIRTIO_SERIAL_PORT VIRTIO_SERIAL_PORT
 
typedef struct _VIRTIO_SERIAL_IO_PROTOCOL VIRTIO_SERIAL_IO_PROTOCOL
 

Functions

VOID EFIAPI LogDevicePath (UINT32 Level, const CHAR8 *Func, CHAR16 *Note, EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS EFIAPI VirtioSerialTxControl (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT32 Id, IN UINT16 Event, IN UINT16 Value)
 
EFI_STATUS EFIAPI VirtioSerialInitRing (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT16 Index, IN UINT32 BufferSize)
 
VOID EFIAPI VirtioSerialUninitRing (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT16 Index)
 
VOID EFIAPI VirtioSerialRingFillRx (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT16 Index)
 
VOID EFIAPI VirtioSerialRingClearTx (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT16 Index)
 
EFI_STATUS EFIAPI VirtioSerialRingSendBuffer (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT16 Index, IN VOID *Data, IN UINT32 DataSize, IN BOOLEAN Notify)
 
BOOLEAN EFIAPI VirtioSerialRingHasBuffer (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT16 Index)
 
BOOLEAN EFIAPI VirtioSerialRingGetBuffer (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT16 Index, OUT VOID *Data, OUT UINT32 *DataSize)
 
EFI_STATUS EFIAPI VirtioSerialPortAdd (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT32 PortId)
 
VOID EFIAPI VirtioSerialPortSetConsole (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT32 PortId)
 
VOID EFIAPI VirtioSerialPortSetName (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT32 PortId, IN UINT8 *Name)
 
VOID EFIAPI VirtioSerialPortSetDeviceOpen (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT32 PortId, IN UINT16 Value)
 
VOID EFIAPI VirtioSerialPortRemove (IN OUT VIRTIO_SERIAL_DEV *Dev, IN UINT32 PortId)
 

Detailed Description

Private definitions of the VirtioRng RNG driver

Copyright (C) 2016, Linaro Ltd.

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

Definition in file VirtioSerial.h.

Macro Definition Documentation

◆ CTRL_RX_BUFSIZE

#define CTRL_RX_BUFSIZE   128

Definition at line 26 of file VirtioSerial.h.

◆ CTRL_TX_BUFSIZE

#define CTRL_TX_BUFSIZE   sizeof(VIRTIO_SERIAL_CONTROL)

Definition at line 27 of file VirtioSerial.h.

◆ MAX_PORTS

#define MAX_PORTS   8

Definition at line 23 of file VirtioSerial.h.

◆ MAX_RINGS

#define MAX_RINGS   (MAX_PORTS * 2 + 2)

Definition at line 24 of file VirtioSerial.h.

◆ PORT_RX_BUFSIZE

#define PORT_RX_BUFSIZE   128

Definition at line 28 of file VirtioSerial.h.

◆ PORT_TX_BUFSIZE

#define PORT_TX_BUFSIZE   128

Definition at line 29 of file VirtioSerial.h.

◆ VIRTIO_SERIAL_SIG

#define VIRTIO_SERIAL_SIG   SIGNATURE_32 ('V', 'S', 'I', 'O')

Definition at line 21 of file VirtioSerial.h.

Typedef Documentation

◆ VIRTIO_SERIAL_DEV

Definition at line 35 of file VirtioSerial.h.

◆ VIRTIO_SERIAL_IO_PROTOCOL

Definition at line 38 of file VirtioSerial.h.

◆ VIRTIO_SERIAL_PORT

Definition at line 37 of file VirtioSerial.h.

◆ VIRTIO_SERIAL_RING

Definition at line 36 of file VirtioSerial.h.

Function Documentation

◆ LogDevicePath()

VOID EFIAPI LogDevicePath ( UINT32  Level,
const CHAR8 *  Func,
CHAR16 *  Note,
EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

Definition at line 41 of file VirtioSerial.c.

◆ VirtioSerialInitRing()

EFI_STATUS EFIAPI VirtioSerialInitRing ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT16  Index,
IN UINT32  BufferSize 
)

Definition at line 51 of file VirtioSerialRing.c.

◆ VirtioSerialPortAdd()

EFI_STATUS EFIAPI VirtioSerialPortAdd ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT32  PortId 
)

Definition at line 367 of file VirtioSerialPort.c.

◆ VirtioSerialPortRemove()

VOID EFIAPI VirtioSerialPortRemove ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT32  PortId 
)

Definition at line 446 of file VirtioSerialPort.c.

◆ VirtioSerialPortSetConsole()

VOID EFIAPI VirtioSerialPortSetConsole ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT32  PortId 
)

Definition at line 402 of file VirtioSerialPort.c.

◆ VirtioSerialPortSetDeviceOpen()

VOID EFIAPI VirtioSerialPortSetDeviceOpen ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT32  PortId,
IN UINT16  Value 
)

Definition at line 430 of file VirtioSerialPort.c.

◆ VirtioSerialPortSetName()

VOID EFIAPI VirtioSerialPortSetName ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT32  PortId,
IN UINT8 *  Name 
)

Definition at line 416 of file VirtioSerialPort.c.

◆ VirtioSerialRingClearTx()

VOID EFIAPI VirtioSerialRingClearTx ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT16  Index 
)

Definition at line 226 of file VirtioSerialRing.c.

◆ VirtioSerialRingFillRx()

VOID EFIAPI VirtioSerialRingFillRx ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT16  Index 
)

Definition at line 209 of file VirtioSerialRing.c.

◆ VirtioSerialRingGetBuffer()

BOOLEAN EFIAPI VirtioSerialRingGetBuffer ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT16  Index,
OUT VOID *  Data,
OUT UINT32 *  DataSize 
)

Definition at line 307 of file VirtioSerialRing.c.

◆ VirtioSerialRingHasBuffer()

BOOLEAN EFIAPI VirtioSerialRingHasBuffer ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT16  Index 
)

Definition at line 286 of file VirtioSerialRing.c.

◆ VirtioSerialRingSendBuffer()

EFI_STATUS EFIAPI VirtioSerialRingSendBuffer ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT16  Index,
IN VOID *  Data,
IN UINT32  DataSize,
IN BOOLEAN  Notify 
)

Definition at line 237 of file VirtioSerialRing.c.

◆ VirtioSerialTxControl()

EFI_STATUS EFIAPI VirtioSerialTxControl ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT32  Id,
IN UINT16  Event,
IN UINT16  Value 
)

Definition at line 62 of file VirtioSerial.c.

◆ VirtioSerialUninitRing()

VOID EFIAPI VirtioSerialUninitRing ( IN OUT VIRTIO_SERIAL_DEV Dev,
IN UINT16  Index 
)

Definition at line 174 of file VirtioSerialRing.c.