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 <config.h> 10#include <assert.h> 11#include <stdint.h> 12 13#if defined(CONFIG_ARCH_AARCH32) 14compile_assert(long_is_32bits, sizeof(unsigned long) == 4) 15#elif defined(CONFIG_ARCH_AARCH64) 16compile_assert(long_is_64bits, sizeof(unsigned long) == 8) 17#endif 18 19typedef unsigned long word_t; 20typedef signed long sword_t; 21typedef word_t vptr_t; 22typedef word_t paddr_t; 23typedef word_t pptr_t; 24typedef word_t cptr_t; 25typedef word_t node_id_t; 26typedef word_t cpu_id_t; 27typedef word_t dom_t; 28 29typedef uint8_t hw_asid_t; 30 31enum hwASIDConstants { 32 hwASIDMax = 255, 33 hwASIDBits = 8 34}; 35 36/* for libsel4 headers that the kernel shares */ 37typedef word_t seL4_Word; 38typedef cptr_t seL4_CPtr; 39typedef uint32_t seL4_Uint32; 40typedef uint16_t seL4_Uint16; 41typedef uint8_t seL4_Uint8; 42typedef node_id_t seL4_NodeId; 43typedef dom_t seL4_Domain; 44typedef paddr_t seL4_PAddr; 45 46typedef struct kernel_frame { 47 paddr_t paddr; 48 pptr_t pptr; 49 int armExecuteNever; 50 int userAvailable; 51} kernel_frame_t; 52 53