1/*
2 * Copyright 2016, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
8 * See "LICENSE_BSD2.txt" for details.
9 *
10 * @TAG(D61_BSD)
11 */
12
13/*! @file
14    @brief Common helper functions and global definitions.
15
16    Useful global definitions and general inline helper functions that every process server module
17    should know about.
18*/
19
20#ifndef _REFOS_PROCESS_SERVER_COMMON_H_
21#define _REFOS_PROCESS_SERVER_COMMON_H_
22
23#include <autoconf.h>
24#include <stdio.h>
25#include <stdlib.h>
26#include <stdint.h>
27#include <stdbool.h>
28#include <assert.h>
29
30#include <sel4/sel4.h>
31#include <cpio/cpio.h>
32#include <refos/refos.h>
33
34// Macros.
35
36#define MiB(x) (1024*1024*(x))
37#define die( ... ) while (1) { printf(__VA_ARGS__); seL4_DebugHalt(); }
38
39/* Debug printing. */
40#include <refos-util/dprintf.h>
41
42#include "badge.h"
43
44typedef seL4_Word vaddr_t;
45typedef seL4_Word paddr_t;
46
47#define kmalloc malloc
48#define krealloc realloc
49#define kfree free
50
51#endif /* _REFOS_PROCESS_SERVER_COMMON_H_ */