Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
Macros | Functions
port.h File Reference

Include file for IO-ports operations. More...

#include <stdint.h>

Go to the source code of this file.

Macros

#define FAULT_FORBIDDEN   64
 

Functions

void outb (uint16_t port, uint8_t value)
 IO port write byte. More...
 
void outw (uint16_t port, uint16_t value)
 IO port write word. More...
 
uint8_t inb (uint16_t port)
 IO port read byte. More...
 
uint16_t inw (uint16_t port)
 IO port read word. More...
 
void cg_outb (uint32_t port, uint32_t value)
 Outb callgate method. More...
 
uint32_t cg_inb (uint32_t port)
 Inb callgate method. More...
 
void cg_outw (uint32_t port, uint32_t value)
 Outw callgate method. More...
 
uint32_t cg_inw (uint32_t port)
 Inw callgate method. More...
 
void cg_outl (uint32_t port, uint32_t value)
 Outl callgate method. More...
 
void cg_outaddrl (uint32_t port, uint32_t value)
 Outaddrl callgate method. More...
 
uint32_t cg_inl (uint32_t port)
 Inl callgate method. More...
 

Detailed Description

Include file for IO-ports operations.

Macro Definition Documentation

◆ FAULT_FORBIDDEN

#define FAULT_FORBIDDEN   64

Function Documentation

◆ cg_inb()

uint32_t cg_inb ( uint32_t  port)

Inb callgate method.

◆ cg_inl()

uint32_t cg_inl ( uint32_t  port)

Inl callgate method.

◆ cg_inw()

uint32_t cg_inw ( uint32_t  port)

Inw callgate method.

◆ cg_outaddrl()

void cg_outaddrl ( uint32_t  port,
uint32_t  value 
)

Outaddrl callgate method.

◆ cg_outb()

void cg_outb ( uint32_t  port,
uint32_t  value 
)

Outb callgate method.

◆ cg_outl()

void cg_outl ( uint32_t  port,
uint32_t  value 
)

Outl callgate method.

◆ cg_outw()

void cg_outw ( uint32_t  port,
uint32_t  value 
)

Outw callgate method.

◆ inb()

uint8_t inb ( uint16_t  port)

IO port read byte.

In operation on 1-byte value.

Parameters
portThe port number
Returns
The value returned by the IO operation

◆ inw()

uint16_t inw ( uint16_t  port)

IO port read word.

In operation on a 2-bytes value.

Parameters
portThe port number
Returns
The value returned by the IO operation

◆ outb()

void outb ( uint16_t  port,
uint8_t  value 
)

IO port write byte.

Out operation on 1-byte value.

Parameters
portThe port number
valueThe value to write

◆ outw()

void outw ( uint16_t  port,
uint16_t  value 
)

IO port write word.

Out operation on 2-byte value.

Parameters
portThe port number
valueThe value to write