2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) Siemens AG, 2013
7 * Jan Kiszka <jan.kiszka@siemens.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
13 #include <jailhouse/types.h>
15 static inline void outb(u8 v, u16 port)
17 asm volatile("outb %0,%1" : : "a" (v), "dN" (port));
20 static inline u8 inb(u16 port)
24 asm volatile("inb %1,%0" : "=a" (v) : "dN" (port));
28 static inline void outw(u16 value, u16 port)
30 asm volatile("outw %w0,%w1" : : "a" (value), "Nd" (port));
33 static inline u16 inw(u16 port)
37 asm volatile("inw %w1,%0" : "=a" (v) : "Nd" (port));
41 static inline void outl(u32 value, u16 port)
43 asm volatile("outl %0,%1" : : "a" (value), "Nd" (port));
46 static inline u32 inl(u16 port)
50 asm volatile("inl %1,%0" : "=a" (v) : "dN" (port));