1/* 2 * Copyright 2014, General Dynamics C4 Systems 3 * 4 * SPDX-License-Identifier: GPL-2.0-only 5 */ 6 7#pragma once 8 9#include <stdint.h> 10#include <arch/types.h> 11 12enum _bool { 13 false = 0, 14 true = 1 15}; 16typedef word_t bool_t; 17 18typedef struct region { 19 pptr_t start; 20 pptr_t end; 21} region_t; 22 23typedef struct p_region { 24 paddr_t start; 25 paddr_t end; 26} p_region_t; 27 28typedef struct v_region { 29 vptr_t start; 30 vptr_t end; 31} v_region_t; 32 33#define REG_EMPTY (region_t){ .start = 0, .end = 0 } 34#define P_REG_EMPTY (p_region_t){ .start = 0, .end = 0 } 35 36/* equivalent to a word_t except that we tell the compiler that we may alias with 37 * any other type (similar to a char pointer) */ 38typedef word_t __attribute__((__may_alias__)) word_t_may_alias; 39