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 __ARCH_KERNEL_BOOT_NODE_H
12#define __ARCH_KERNEL_BOOT_NODE_H
13
14#include <config.h>
15#include <types.h>
16#include <plat/machine/acpi.h>
17#include <kernel/boot.h>
18#include <arch/api/bootinfo_types.h>
19
20typedef struct mem_p_regs {
21    word_t count;
22    p_region_t list[MAX_NUM_FREEMEM_REG];
23} mem_p_regs_t;
24
25typedef struct ui_info {
26    p_region_t p_reg;     /* region where the userland image lies in */
27    sword_t    pv_offset; /* UI virtual address + pv_offset = UI physical address */
28    vptr_t     v_entry;   /* entry point (virtual address) of userland image */
29} ui_info_t;
30
31cap_t create_unmapped_it_frame_cap(pptr_t pptr, bool_t use_large);
32cap_t create_mapped_it_frame_cap(cap_t pd_cap, pptr_t pptr, vptr_t vptr, asid_t asid, bool_t use_large, bool_t executable);
33
34bool_t init_sys_state(
35    cpu_id_t      cpu_id,
36    mem_p_regs_t  mem_p_regs,
37    ui_info_t     ui_info,
38    p_region_t    boot_mem_reuse_p_reg,
39    /* parameters below not modeled in abstract specification */
40    uint32_t      num_drhu,
41    paddr_t*      drhu_list,
42    acpi_rmrr_list_t *rmrr_list,
43    acpi_rsdp_t      *acpi_rsdp,
44    seL4_X86_BootInfo_VBE *vbe,
45    seL4_X86_BootInfo_mmap_t *mb_mmap,
46    seL4_X86_BootInfo_fb_t *fb_info
47);
48
49bool_t init_cpu(
50    bool_t   mask_legacy_irqs
51);
52
53bool_t add_allocated_p_region(p_region_t reg);
54void init_allocated_p_regions(void);
55
56#endif
57