17#ifndef _L4UTIL_PORT_IO_H
18#define _L4UTIL_PORT_IO_H
26#include <l4/sys/l4int.h>
173 asm volatile (
"inb %w1, %b0" :
"=a" (value) :
"Nd" (port));
181 asm volatile (
"inw %w1, %w0" :
"=a" (value) :
"Nd" (port));
189 asm volatile (
"inl %w1, %0" :
"=a" (value) :
"Nd" (port));
197 asm volatile (
"rep insb" :
"=D"(dummy1),
"=c"(dummy2)
198 :
"d" (port),
"D" (addr),
"c"(count)
206 asm volatile (
"rep insw" :
"=D"(dummy1),
"=c"(dummy2)
207 :
"d" (port),
"D" (addr),
"c"(count)
215 asm volatile (
"rep insl" :
"=D"(dummy1),
"=c"(dummy2)
216 :
"d" (port),
"D" (addr),
"c"(count)
223 asm volatile (
"outb %b0, %w1" : :
"a" (value),
"Nd" (port));
229 asm volatile (
"outw %w0, %w1" : :
"a" (value),
"Nd" (port));
235 asm volatile (
"outl %0, %w1" : :
"a" (value),
"Nd" (port));
242 asm volatile (
"rep outsb" :
"=S"(dummy1),
"=c"(dummy2)
243 :
"d" (port),
"S" (addr),
"c"(count)
251 asm volatile (
"rep outsw" :
"=S"(dummy1),
"=c"(dummy2)
252 :
"d" (port),
"S" (addr),
"c"(count)
260 asm volatile (
"rep outsl" :
"=S"(dummy1),
"=c"(dummy2)
261 :
"d" (port),
"S" (addr),
"c"(count)
268 asm volatile (
"outb %al,$0x80");
L4 compiler related defines.
unsigned long l4_umword_t
Unsigned machine word.
unsigned char l4_uint8_t
Unsigned 8bit value.
unsigned int l4_uint32_t
Unsigned 32bit value.
unsigned short int l4_uint16_t
Unsigned 16bit value.
#define __END_DECLS
End section with C types and functions.
#define L4_INLINE
L4 Inline function attribute.
#define __BEGIN_DECLS
Start section with C types and functions.
l4_uint16_t l4util_in16(l4_uint16_t port)
Read 16-bit-value from I/O port.
void l4util_outs32(l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
Write block of 32-bit-values to I/O port.
void l4util_out32(l4_uint32_t value, l4_uint16_t port)
Write 32-bit-value to I/O port.
void l4util_out8(l4_uint8_t value, l4_uint16_t port)
Write byte to I/O port.
void l4util_outs8(l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
Write a block of bytes to I/O port.
void l4util_out16(l4_uint16_t value, l4_uint16_t port)
Write 16-bit-value to I/O port.
void l4util_ins8(l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
Read a block of 8-bit-values from I/O ports.
l4_uint8_t l4util_in8(l4_uint16_t port)
Read byte from I/O port.
l4_uint32_t l4util_in32(l4_uint16_t port)
Read 32-bit-value from I/O port.
void l4util_outs16(l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
Write a block of 16-bit-values to I/O port.
void l4util_ins32(l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
Read a block of 32-bit-values from I/O ports.
void l4util_iodelay(void)
delay I/O port access by writing to port 0x80
void l4util_ins16(l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
Read a block of 16-bit-values from I/O ports.