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 <arch/kernel/multiboot.h>
10#include <arch/kernel/multiboot2.h>
11
12/* type definitions (directly corresponding to abstract specification) */
13typedef struct boot_state {
14    p_region_t   avail_p_reg; /* region of available physical memory on platform */
15    p_region_t   ki_p_reg;    /* region where the kernel image is in */
16    ui_info_t    ui_info;     /* info about userland images */
17    uint32_t     num_ioapic;  /* number of IOAPICs detected */
18    paddr_t      ioapic_paddr[CONFIG_MAX_NUM_IOAPIC];
19    uint32_t     num_drhu; /* number of IOMMUs */
20    paddr_t      drhu_list[MAX_NUM_DRHU]; /* list of physical addresses of the IOMMUs */
21    acpi_rmrr_list_t rmrr_list;
22    acpi_rsdp_t  acpi_rsdp; /* copy of the rsdp */
23    paddr_t      mods_end_paddr; /* physical address where boot modules end */
24    paddr_t      boot_module_start; /* physical address of first boot module */
25    uint32_t     num_cpus;    /* number of detected cpus */
26    uint32_t     mem_lower;   /* lower memory size for boot code of APs to run in real mode */
27    cpu_id_t     cpus[CONFIG_MAX_NUM_NODES];
28    mem_p_regs_t mem_p_regs;  /* physical memory regions */
29    seL4_X86_BootInfo_VBE vbe_info; /* Potential VBE information from multiboot */
30    seL4_X86_BootInfo_mmap_t mb_mmap_info; /* memory map information from multiboot */
31    seL4_X86_BootInfo_fb_t fb_info; /* framebuffer information as set by bootloader */
32} boot_state_t;
33
34extern boot_state_t boot_state;
35
36void boot_sys(
37    unsigned long multiboot_magic,
38    void *multiboot
39);
40
41