1/* 2 * Copyright 2014, General Dynamics C4 Systems 3 * 4 * This software may be distributed and modified according to the terms of 5 * the GNU General Public License version 2. Note that NO WARRANTY is provided. 6 * See "LICENSE_GPLv2.txt" for details. 7 * 8 * @TAG(GD_GPL) 9 */ 10 11#ifndef __BASIC_TYPES_H 12#define __BASIC_TYPES_H 13 14#include <stdint.h> 15#include <arch/types.h> 16 17enum _bool { 18 false = 0, 19 true = 1 20}; 21typedef word_t bool_t; 22 23typedef struct region { 24 pptr_t start; 25 pptr_t end; 26} region_t; 27 28typedef struct p_region { 29 paddr_t start; 30 paddr_t end; 31} p_region_t; 32 33typedef struct v_region { 34 vptr_t start; 35 vptr_t end; 36} v_region_t; 37 38#define REG_EMPTY (region_t){ .start = 0, .end = 0 } 39#define P_REG_EMPTY (p_region_t){ .start = 0, .end = 0 } 40 41/* equivalent to a word_t except that we tell the compiler that we may alias with 42 * any other type (similar to a char pointer) */ 43typedef word_t __attribute__((__may_alias__)) word_t_may_alias; 44 45#endif /* __BASIC_TYPES_H */ 46