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 #define FSEGMENT_BASE 0xf0000
15 #define INMATE_CS32 0x8
16 #define INMATE_CS64 0x10
17 #define INMATE_DS32 0x18
20 typedef signed char s8;
21 typedef unsigned char u8;
23 typedef signed short s16;
24 typedef unsigned short u16;
26 typedef signed int s32;
27 typedef unsigned int u32;
29 typedef signed long s64;
30 typedef unsigned long u64;
44 typedef enum { true=1, false=0 } bool;
46 #include <jailhouse/hypercall.h>
48 static inline void cpu_relax(void)
50 asm volatile("rep; nop" : : : "memory");
53 static inline void outb(u8 v, u16 port)
55 asm volatile("outb %0,%1" : : "a" (v), "dN" (port));
58 static inline u8 inb(u16 port)
61 asm volatile("inb %1,%0" : "=a" (v) : "dN" (port));
65 static inline u32 inl(u16 port)
68 asm volatile("inl %1,%0" : "=a" (v) : "dN" (port));
72 extern unsigned int printk_uart_base;
73 void printk(const char *fmt, ...);
75 void *memset(void *s, int c, unsigned long n);
77 extern u8 irq_entry[];
78 void irq_handler(void);
80 void inmate_main(void);
82 unsigned long read_pm_timer(struct jailhouse_comm_region *comm_region);