1/**
2 * \file
3 * \brief Data sent to a newly booted x86 kernel
4 */
5
6/*
7 * Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich.
8 * All rights reserved.
9 *
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
13 */
14
15#ifndef _X86_COREDATA_H
16#define _X86_COREDATA_H
17
18struct x86_coredata_modinfo {
19    uint32_t    mod_start;
20    uint32_t    mod_end;
21    uint32_t    string;
22    uint32_t    reserved;
23};
24
25struct x86_coredata_mmap {
26    uint32_t    size;
27    uint64_t    base_addr;
28    uint64_t    length;
29    uint32_t    type;
30} __attribute__ ((packed));
31
32struct x86_coredata_elf {
33    uint32_t    num;
34    uint32_t    size;
35    uint32_t    addr;
36    uint32_t    shndx;
37};
38
39/**
40 * \brief Data sent to a newly booted kernel
41 *
42 * \bug Should use mackerel to define this struct instead of packing
43 * it so that it matches up between heterogeneous cores.
44 */
45struct x86_core_data {
46    uint32_t multiboot_flags; ///< The multiboot flags of the cpu module
47    struct x86_coredata_elf elf; ///< elf structure for the cpu module
48    genpaddr_t module_start;  ///< The start of the cpu module
49    genpaddr_t module_end;    ///< The end of the cpu module
50    genpaddr_t urpc_frame_base;
51    uint8_t urpc_frame_bits;
52    genpaddr_t monitor_binary;
53    genpaddr_t monitor_binary_size;
54    genpaddr_t memory_base_start;
55    uint8_t memory_bits;
56    coreid_t src_core_id;
57    hwid_t src_arch_id;
58    coreid_t dst_core_id;
59    char kernel_cmdline[128];
60
61    uint32_t    cmdline;
62    uint32_t    mods_count;
63    uint32_t    mods_addr;
64
65    uint32_t    mmap_length;
66    uint32_t    mmap_addr;
67
68    uint32_t    start_free_ram;
69
70    uint32_t    chan_id;
71
72    genpaddr_t kcb; ///< The kernel control block, this should fully replace x86_core_data at some point
73
74#ifdef __k1om__
75    struct xeon_phi_boot_params *bp;
76    uint8_t  xeon_phi_id;
77#endif
78} __attribute__ ((packed));
79
80#define X86_CORE_DATA_PAGES 1100
81
82#endif
83