2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) ARM Limited, 2014
7 * Jean-Philippe Brucker <jean-philippe.brucker@arm.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 #ifndef _JAILHOUSE_INMATE_H
14 #define _JAILHOUSE_INMATE_H
17 typedef signed char s8;
18 typedef unsigned char u8;
20 typedef signed short s16;
21 typedef unsigned short u16;
23 typedef signed int s32;
24 typedef unsigned int u32;
26 typedef signed long long s64;
27 typedef unsigned long long u64;
29 static inline u32 mmio_read32(void *address)
31 return *(volatile u32 *)address;
34 static inline void mmio_write32(void *address, u32 value)
36 *(volatile u32 *)address = value;
39 static inline void *memset(void *addr, int val, unsigned int size)
43 for (i = 0; i < size; i++)
49 extern unsigned long printk_uart_base;
50 void printk(const char *fmt, ...);
51 void inmate_main(void);
53 void __attribute__((interrupt("IRQ"))) __attribute__((used)) vector_irq(void);
55 typedef void (*irq_handler_t)(unsigned int);
56 void gic_setup(irq_handler_t handler);
57 void gic_enable_irq(unsigned int irq);
59 unsigned long timer_get_frequency(void);
60 u64 timer_get_ticks(void);
61 u64 timer_ticks_to_ns(u64 ticks);
62 void timer_start(u64 timeout);
64 #endif /* !__ASSEMBLY__ */
65 #endif /* !_JAILHOUSE_INMATE_H */