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 <types.h> 11 #include <sel4/bootinfo_types.h> 12 13 /* declare object-specific macros to hide the casting */ 14 #define BI_PTR(r) ((seL4_BootInfo*)(r)) 15 #define BI_REF(p) ((word_t)(p)) 16 17 #define S_REG_EMPTY (seL4_SlotRegion){ .start = 0, .end = 0 } 18 19 /* The boot info frame takes at least one page, it must be big enough to hold 20 * the seL4_BootInfo data structure. Due to internal restrictions, the boot info 21 * frame size must be of the form 2^n. Furthermore, there might still be code 22 * that makes the hard-coded assumption the boot info frame is always one page. 23 */ 24 #define BI_FRAME_SIZE_BITS PAGE_BITS 25 compile_assert(bi_size, sizeof(seL4_BootInfo) <= BIT(BI_FRAME_SIZE_BITS)) 26