-
Notifications
You must be signed in to change notification settings - Fork 91
/
x86_fsp_qemu_stage1.ld.in
110 lines (97 loc) · 2.33 KB
/
x86_fsp_qemu_stage1.ld.in
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
FLASH_SIZE = @BOOTLOADER_PARTITION_SIZE@;
FLASH_START = 0x100000000 - @BOOTLOADER_PARTITION_SIZE@;
BOOTLOADER_JUMP32_START = 0xfffff000;
RESETVECTOR_START = 0xffffffec;
KEYSTORE_START = 0xffffe000;
FSP_T_ORIGIN = @FSP_T_BASE@; /* default base:size 0xFFFFF000:0x3000 [0xfffff000:0x100002000] */
FSP_M_ORIGIN = @FSP_M_BASE@; /* default base:size 0xfffdd000:0x22000 [0xfffdd000:0xfffff000] */
FSP_S_ORIGIN = @FSP_S_BASE@; /* default base:size 0xfffc8000:0x15000 [0xfffdd000:0xfffdd000] */
WOLFBOOT_ORIGIN = @WOLFBOOT_ORIGIN@;
DATA_MEM_START = 0x800000; /* 8 MB */
MAX_POLICY_SIZE = 512;
OUTPUT_FORMAT(elf32-i386)
MEMORY
{
FLASH (rx) : ORIGIN = FLASH_START LENGTH = FLASH_SIZE
RAM (rwx) : ORIGIN = 0x0 LENGTH = FLASH_START
}
SECTIONS
{
.wolfboot FLASH_START :
{
_wolfboot_flash_start = .;
KEEP(*(.sig_wolfboot_raw*))
KEEP(*(.wolfboot))
_wolfboot_flash_end = .;
} > FLASH
.policy :
{
. = ALIGN(4);
_policy_size_u32 = .;
. += 4;
_start_policy = .;
. += MAX_POLICY_SIZE;
_end_policy = .;
} > FLASH
.keystore KEYSTORE_START :
{
_start_keystore = .;
KEEP(*(.keystore*))
} > FLASH
.jmpto32 BOOTLOADER_JUMP32_START :
{
_off_boot = ABSOLUTE(.) & 0xffff;
KEEP(*(.jmpto32))
} > FLASH
.reset_vector RESETVECTOR_START :
{
KEEP(*(.reset_vector))
} > FLASH
.bootloader WOLFBOOT_ORIGIN :
{
KEEP(*(.boot*))
*(.text*)
*(.rodata*)
. = ALIGN(256);
} > FLASH
_stored_data = .;
.data DATA_MEM_START : AT (_stored_data)
{
_start_data = .;
KEEP(*(.data*))
. = ALIGN(4);
KEEP(*(.ramcode))
. = ALIGN(4);
_end_data = .;
} > RAM
.bss(NOLOAD) : AT (_end_data)
{
_start_bss = .;
__bss_start__ = .;
*(.bss*)
. = ALIGN(4);
_end_bss = .;
__bss_end__ = .;
_end = .;
} > RAM
.fsp_t FSP_T_ORIGIN :
AT(FSP_T_ORIGIN)
{
_start_fsp_t = .;
KEEP(*(.fsp_t))
}
.fsp_s FSP_S_ORIGIN :
{
_fsp_s_hdr = .;
KEEP(*(.sig_fsp_s*))
_start_fsp_s = .;
KEEP(*(.fsp_s))
_end_fsp_s = .;
}
.fsp_m FSP_M_ORIGIN :
{
_start_fsp_m = .;
KEEP(*(.fsp_m))
_end_fsp_m = .;
}
}