AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
io.h File Reference

Go to the source code of this file.

Functions

static uintptr_t io_reg (struct ioaddr *io, uintptr_t off)
 Returns the kernel address of register off.
static uint8_t io_in8 (struct ioaddr *io, uintptr_t off)
 Reads an 8-, 16- or 32-bit register.
static uint16_t io_in16 (struct ioaddr *io, uintptr_t off)
static uint32_t io_in32 (struct ioaddr *io, uintptr_t off)
static void io_out8 (struct ioaddr *io, uintptr_t off, uint8_t val)
 Writes an 8-, 16- or 32-bit register.
static void io_out16 (struct ioaddr *io, uintptr_t off, uint16_t val)
static void io_out32 (struct ioaddr *io, uintptr_t off, uint32_t val)
static uint32_t mmio_read32 (uintptr_t addr)
 Reads, or writes, a 32-bit register at a kernel address.
static void mmio_write32 (uintptr_t addr, uint32_t val)

Function Documentation

◆ io_in16()

uint16_t io_in16 ( struct ioaddr * io,
uintptr_t off )
inlinestatic

Definition at line 33 of file io.h.

References io_in16(), and io_reg().

Referenced by ata_detect_drive(), io_in16(), and pm1_read().

◆ io_in32()

uint32_t io_in32 ( struct ioaddr * io,
uintptr_t off )
inlinestatic

Definition at line 38 of file io.h.

References io_in32(), and io_reg().

Referenced by io_in32(), pci_conf1_read(), pci_ecam_read(), pl011_irq(), pl011_receive(), pl011_transmit(), and reg_read().

◆ io_in8()

◆ io_out16()

void io_out16 ( struct ioaddr * io,
uintptr_t off,
uint16_t val )
inlinestatic

Definition at line 49 of file io.h.

References io_out16(), and io_reg().

Referenced by io_out16(), and pm1_write().

◆ io_out32()

void io_out32 ( struct ioaddr * io,
uintptr_t off,
uint32_t val )
inlinestatic

◆ io_out8()

◆ io_reg()

uintptr_t io_reg ( struct ioaddr * io,
uintptr_t off )
inlinestatic

Returns the kernel address of register off.

Definition at line 15 of file io.h.

References ioaddr::addr, io_reg(), IOADDR_MMIO16, IOADDR_MMIO32, and ioaddr::type.

Referenced by io_in16(), io_in32(), io_in8(), io_out16(), io_out32(), io_out8(), and io_reg().

◆ mmio_read32()

uint32_t mmio_read32 ( uintptr_t addr)
inlinestatic

Reads, or writes, a 32-bit register at a kernel address.

Definition at line 60 of file io.h.

◆ mmio_write32()

void mmio_write32 ( uintptr_t addr,
uint32_t val )
inlinestatic

Definition at line 65 of file io.h.