forked from Broadcom/aeolus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
map.lds.S
96 lines (86 loc) · 3.05 KB
/
map.lds.S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* Aeolus - a program to boot the Zephyr MIPS
* Copyright (C) 2014 Broadcom Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* BCM3384 bootloader memory map:
* For Linux on Zephyr, the offsets are based on PA 0x0000_0000
* For Linux on Viper, the offsets are based on PA 0x0600_0000
*
* +-------------+-------------------------------+----------------------------+
* | Offset | Bootloader usage | Linux usage |
* +-------------+-------------------------------+----------------------------+
* | 0x0000_0000 | Main CPU reset vector / entry | Secondary CPU reset vector |
* | | MIPS init code (asm) | (CPU1) |
* +-------------+-------------------------------+----------------------------+
* | 0x0000_0f00 | Kernel command line (from CM) | |
* +-------------+-------------------------------+----------------------------+
* | 0x0000_1000 | | Relocated MIPS exception |
* | | | vectors (CPU0 and CPU1) |
* +-------------+-------------------------------+----------------------------+
* | 0x0000_1400 | Device tree blob | Device tree blob |
* +-------------+-------------------------------+----------------------------+
* | 0x0000_c400 | Bootloader C code | |
* +-------------+-------------------------------+----------------------------+
* | 0x0001_0000 | Kernel image start, | Kernel image start, |
* | | kernel entry address | kernel entry address |
* +-------------+-------------------------------+----------------------------+
* | 0x07f0_0000 | Scratch space (stack top, | |
* | (absolute) | dtb, staging area) | |
* +-------------+-------------------------------+----------------------------+
*/
#define SCRATCH_START 0x87f00000
ENTRY(_start)
SECTIONS {
. = MEM_START;
.init : {
*(.init);
*(.mipsinit);
}
. = MEM_START + 0x0f00;
_cmdline = .;
. = MEM_START + 0x1400;
_dtb_start = .;
.dtb : {
*(.dtb);
}
. = ALIGN(4);
_dtb_end = .;
. = MEM_START + 0xc400;
.main : {
*(.text*);
*(.rodata*);
*(.data);
}
. = MEM_START + 0xfff8;
.fill : {
/* FIXME: why does this take 8 bytes? */
LONG(0);
}
. = MEM_START + 0x10000;
_linux = .;
. = SCRATCH_START;
_fbss = .;
.bss : {
*(.bss*);
*(.sbss*);
} =0x00
. = ALIGN(4);
_ebss = .;
/DISCARD/ : {
*(.MIPS.options)
*(.options)
*(.pdr)
*(.reginfo)
*(.eh_frame)
}
};