iPXE
ns16550.h File Reference

16550-compatible UART More...

#include <stdint.h>
#include <ipxe/io.h>

Go to the source code of this file.

Macros

#define COM1_BASE   0x3f8
#define COM2_BASE   0x2f8
#define COM3_BASE   0x3e8
#define COM4_BASE   0x2e8
#define COM1   &com1
#define COM2   &com2
#define COM3   &com3
#define COM4   &com4

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static __attribute__ ((always_inline)) void ns16550_write(struct ns16550_uart *ns16550
 Write to UART register.

Variables

static unsigned int address
static unsigned int uint8_t data
struct uart com1
struct uart com2
struct uart com3
struct uart com4

Detailed Description

16550-compatible UART

Definition in file ns16550.h.

Macro Definition Documentation

◆ COM1_BASE

#define COM1_BASE   0x3f8

Definition at line 43 of file ns16550.h.

Referenced by ISA_UART().

◆ COM2_BASE

#define COM2_BASE   0x2f8

Definition at line 44 of file ns16550.h.

Referenced by ISA_UART().

◆ COM3_BASE

#define COM3_BASE   0x3e8

Definition at line 45 of file ns16550.h.

Referenced by ISA_UART().

◆ COM4_BASE

#define COM4_BASE   0x2e8

Definition at line 46 of file ns16550.h.

Referenced by ISA_UART().

◆ COM1

#define COM1   &com1

Definition at line 55 of file ns16550.h.

Referenced by uart_register_fixed().

◆ COM2

#define COM2   &com2

Definition at line 56 of file ns16550.h.

Referenced by uart_register_fixed().

◆ COM3

#define COM3   &com3

Definition at line 57 of file ns16550.h.

Referenced by uart_register_fixed().

◆ COM4

#define COM4   &com4

Definition at line 58 of file ns16550.h.

Referenced by uart_register_fixed().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ __attribute__()

__attribute__ ( (always_inline) )
inlinestatic

Write to UART register.

Read from UART register.

Parameters
ns1655016550 UART
addressRegister address
dataData
ns1655016550 UART
addressRegister address
Return values
dataData

Variable Documentation

◆ address

unsigned int address
Initial value:
{
return ioread8 ( ns16550->base + address )
uint64_t address
Base address.
Definition ena.h:13
#define ioread8(io_addr)
Definition io.h:340

Definition at line 23 of file ns16550.h.

◆ data

unsigned int uint8_t data
Initial value:
{
iowrite8 ( data, ( ns16550->base + address ) )
uint8_t data[48]
Additional event data.
Definition ena.h:11
#define iowrite8(data, io_addr)
Definition io.h:370

Definition at line 24 of file ns16550.h.

◆ com1

struct uart com1
extern

Referenced by ISA_UART().

◆ com2

struct uart com2
extern

Referenced by ISA_UART().

◆ com3

struct uart com3
extern

Referenced by ISA_UART().

◆ com4

struct uart com4
extern

Referenced by ISA_UART().