1/*
2 * Copyright 2017, DornerWorks
3 * Copyright 2014, General Dynamics C4 Systems
4 *
5 * This software may be distributed and modified according to the terms of
6 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
7 * See "LICENSE_GPLv2.txt" for details.
8 *
9 * @TAG(GD_DORNERWORKS_GPL)
10 */
11/*
12 * This data was produced by DornerWorks, Ltd. of Grand Rapids, MI, USA under
13 * a DARPA SBIR, Contract Number D16PC00107.
14 *
15 * Approved for Public Release, Distribution Unlimited.
16 */
17
18#include <config.h>
19
20ENTRY(_start)
21
22/* WARNING: constants also defined in plat/machine/hardware.h */
23#if defined(CONFIG_ARCH_AARCH32)
24PHYS_BASE = 0x00000000;
25KERNEL_BASE = 0xe0000000;
26#elif defined(CONFIG_ARCH_AARCH64)
27PHYS_BASE = 0x00000000;
28KERNEL_BASE = 0xffffff8000000000;
29#endif
30KERNEL_OFFSET = KERNEL_BASE - PHYS_BASE;
31
32SECTIONS
33{
34    . = KERNEL_BASE;
35
36    .boot . : AT(ADDR(.boot) - KERNEL_OFFSET)
37    {
38        *(.boot.text)
39        *(.boot.rodata)
40        *(.boot.data)
41        . = ALIGN(64K);
42    }
43
44    ki_boot_end = .;
45
46    .text . : AT(ADDR(.text) - KERNEL_OFFSET)
47    {
48        /* Sit inside a large frame */
49        . = ALIGN(64K);
50        *(.vectors)
51
52        /* Fastpath code */
53        *(.vectors.fastpath_call)
54        *(.vectors.fastpath_reply_recv)
55        *(.vectors.text)
56
57        /* Anything else that should be in the vectors page. */
58        *(.vectors.*)
59
60        /* Hopefully all that fits into 4K! */
61
62        /* Standard kernel */
63        *(.text)
64    }
65
66    .rodata . : AT(ADDR(.rodata) - KERNEL_OFFSET)
67    {
68        *(.rodata)
69        *(.rodata.*)
70    }
71
72    .data . : AT(ADDR(.data) - KERNEL_OFFSET)
73    {
74        *(.data)
75    }
76
77    .bss . : AT(ADDR(.bss) - KERNEL_OFFSET)
78    {
79        *(.bss)
80
81        /* 4k breakpoint stack */
82        _breakpoint_stack_bottom = .;
83        . = . + 4K;
84        _breakpoint_stack_top = .;
85
86        /* large data such as the globals frame and global PD */
87        *(.bss.aligned)
88    }
89
90    . = ALIGN(4K);
91    ki_end = .;
92
93    /DISCARD/ :
94    {
95        *(.note.gnu.build-id)
96        *(.comment)
97    }
98}
99