1/** 2 * \file 3 * \brief Data sent to a newly booted ARM kernel 4 */ 5 6/* 7 * Copyright (c) 2012,2016, ETH Zurich. 8 * All rights reserved. 9 * 10 * This file is distributed under the terms in the attached LICENSE file. If 11 * you do not find this file, copies can be found by writing to: ETH Zurich 12 * D-INFK, CAB F.78, Universitaetstrasse 6, CH-8092 Zurich, Attn: Systems Group. 13 */ 14 15#ifndef _ARM_COREDATA_H 16#define _ARM_COREDATA_H 17 18#include <multiboot.h> 19 20#define MAXCMDLINE 128 21 22#define MAX_BUILD_ID 32 23 24struct gnu_build_id { 25 char data[MAX_BUILD_ID]; 26 size_t length; 27}; 28 29/** 30 * \brief Data sent to a newly booted kernel 31 * 32 */ 33struct arm_core_data { 34 /* The physical address of the multiboot header. */ 35 lvaddr_t multiboot_header; 36 37 /* The kernel page tables. */ 38 /* XXX - we can drop L1_low. */ 39 lpaddr_t kernel_l1_low, kernel_l1_high, kernel_l2_vec; 40 41 /* The CPU driver entry point. */ 42 lvaddr_t entry_point; 43 44 /* The CPU driver's stack bounds. */ 45 lpaddr_t stack_base, stack_top; 46 47 /* The module information and ELF section headers for the image used to 48 * boot this kernel. n.b. this may not be one of the modules in the 49 * initial multiboot image. */ 50 struct multiboot_modinfo kernel_module; 51 struct multiboot_elf kernel_elf; 52 53 /* The preallocated kernel control block for the new core. */ 54 lvaddr_t kcb; 55 56 /* The kernel command line. Again, this may differ from that passed to the 57 * BSP kernel. */ 58 char cmdline_buf[MAXCMDLINE]; 59 60 /* This may point to the preceeding buffer, or into the multiboot image, 61 * if the commandline hasn't been modified. */ 62 lvaddr_t cmdline; 63 64 /* Preallocated monitor channel. */ 65 uint32_t urpc_frame_base; 66 uint32_t urpc_frame_size; 67 uint32_t chan_id; 68 69 /* Monitor to start. */ 70 struct multiboot_modinfo monitor_module; 71 72 /* The contiguous memory region into which this kernel should allocate the 73 * initial process' structures. */ 74 uint32_t memory_base_start; 75 uint32_t memory_bytes; 76 77 /* The core that booted us. */ 78 coreid_t src_core_id; 79 80 /* Our core ID, as assigned by the booting core. */ 81 coreid_t dst_core_id; 82 83 /* The architecture of the core that booted us. */ 84 hwid_t src_arch_id; 85 86 /* The address of the global locks. */ 87 lvaddr_t global; 88 89 /* The address of the mailboxes within the boot driver. */ 90 lvaddr_t target_bootrecs; 91 92 /* The GNU build ID (SHA-1 hash), identifying the CPU driver binary. */ 93 struct gnu_build_id build_id; 94 95 /* The load address of the non-relocatable portion of the image. */ 96 lvaddr_t kernel_load_base; 97 98 /* The kernel-virtual address of the global offset table. */ 99 lvaddr_t got_base; 100}; 101 102#define ARM_CORE_DATA_PAGES 2200 103 104#endif 105