FreeCalypso > hg > leo2moko-debug
annotate chipsetsw/system/template/gsm_ds_k5a3281_2092.template @ 18:a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Sun, 06 Sep 2015 03:05:37 +0000 |
parents | |
children |
rev | line source |
---|---|
18
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 * Integrated Protocol Stack Linker command file (all components) |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 * |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 * Target : ARM |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 * |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 * Copyright (c) Texas Instruments 2002, Condat 2002 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 * |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 * This version of the linker script template has been concocted |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 * by Spacefalcon the Outlaw, based on gsm_ds_amd8_lj3.template, |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 * in order to build the GSM firmware for the memory configuration |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 * found in the Openmoko GTA0x GSM modem, which consists of the |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 * K5A3281 flash+RAM MCP plus the 512 KiB of internal RAM in the |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 * Calypso (PD751992A) chip itself. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 -c /* Autoinitialize variables at runtime */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 /*********************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 /* SPECIFY THE SYSTEM MEMORY MAP */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 /*********************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 MEMORY |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 /* CS0: Flash 4 Mbytes ****************************************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 /* Interrupt Vectors Table */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 I_MEM (RXI) : org = 0x00000000 len = 0x00000100 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 /* Boot Sector */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 B_MEM (RXI) : org = 0x00000100 len = 0x00001f00 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 /* Magic Word for Calypso Boot ROM */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 MWC_MEM (RXI) : org = 0x00002000 len = 0x00000004 fill = 0x0000001 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 /* Program Memory */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 P_MEM1 (RXI) : org = 0x00004000 len = 0x00000700 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 P_MEM2 (RXI) : org = 0x00004700 len = 0x00000004 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 P_MEM3 (RXI) : org = 0x00004704 len = 0x0037b8fc |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 /* FFS Area */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 FFS_MEM (RX) : org = 0x00380000 len = 0x00080000 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 /**************************************************************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 /* CS1: External SRAM 1 Mbytes ********************************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 /* Data Memory */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 *** HACK by Spacefalcon the Outlaw *** |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 * |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 * The starting Leonardo version (gsm_ds_amd8_lj3.template) had two |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 * external SRAM regions: D_MEM1 and D_MEM2. When I tried removing |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 * D_MEM2 and keeping only D_MEM1, the linker started behaving oddly |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 * in that the sections were emitted in the wrong order, and the |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 * addresses printed in the map file were bogus. The resulting m0 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 * images seemed to still work correctly, but I feel that having the |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 * linker act "correctly" is better. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 * |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 * My current hack-solution is to split the 1 MiB physical XRAM |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 * into D_MEM1 and D_MEM2 of 512 KiB each. As it happens, the total |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 * XRAM usage of the current firmware is a little below 512 KiB anyway. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 D_MEM1 (RW) : org = 0x01000000 len = 0x000C0000 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 D_MEM2 (RW) : org = 0x010C0000 len = 0x00040000 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 /**************************************************************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 /* CS6: Calypso Internal SRAM 512 kbytes **********************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 /* Code & Variables Memory */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 S_MEM (RXW) : org = 0x00800000 len = 0x00080000 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 /**************************************************************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 } |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 /***********************************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 /***********************************************/ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 * Since the bootloader directly calls the INT_Initialize() routine located |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 * in int.s, this int.s code must always be mapped at the same address |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 * (usually in the second flash sector). Its length is about 0x500 bytes. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 * Then comes the code that need to be loaded into the internal RAM. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 SECTIONS |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 .intvecs : {} > I_MEM /* Interrupt Vectors Table */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 .monitor : > B_MEM /* Monitor Constants & Code */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 $(CONST_BOOT_LIB) |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 } |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 .inttext : {} > P_MEM1 /* int.s Code */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 .bss_dar : > D_MEM1 /* DAR SWE Variables */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 $(BSS_DAR_LIB) |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 } |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 * The .bss section should not be split to ensure it is initialized to 0 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 * each time the SW is reset. So the whole .bss is mapped either in D_MEM1 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 * or in D_MEM2. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 * |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 * Falcon's note for K5A3281: see the comments above where the memory |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 * regions are defined. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 .bss : > D_MEM1 | D_MEM2 /* Global & Static Variables */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 $(BSS_BOOT_LIB) |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 } |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 * All .bss sections, which must be mapped in internal RAM must be |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 * grouped in order to initialized the corresponding memory to 0. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 * This initialization is done in int.s file before calling the Nucleus |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 * routine. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 GROUP |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 S_D_Mem /* Label of start address of .bss section in Int. RAM */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 .DintMem |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 * .bss sections of the application |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 $(BSS_LIBS) |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 } |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 API_HISR_stack : {} |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 E_D_Mem /* Label of end address of .bss section in Int. RAM */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 } > S_MEM |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 * .text and .const sections which must be mapped in internal RAM. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 .ldfl : {} > P_MEM2 /* Used to know the start load address */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 GROUP load = P_MEM3, run = S_MEM |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 S_P_Mem /* Label of start address of .text & .const sections in Int. RAM */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 .PIntMem |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 * .text and .const sections of the application. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 * |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 * The .veneer sections correspond exactly to .text:v&n sections |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 * implementing the veneer functions. The .text:v$n -> .veneer |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 * translation is performed by PTOOL software when PTOOL_OPTIONS |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 * environement variable is set to veneer_section. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 $(CONST_LIBS) |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 } |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 E_P_Mem /* Label of end address of .text and .const sections in Int. RAM */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 } |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 * The rest of the code is mapped in flash, however the trampolines |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 * load address should be consistent with .text. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 COMMENT2START |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 `trampolines load = P_MEM3, run = S_MEM |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 COMMENT2END |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 .text : {} > P_MEM3 /* Code */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 /* |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 * The rest of the constants is mapped in flash. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 * The .cinit section should not be split. |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 .cinit : {} > P_MEM3 /* Initialization Tables */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 .const : {} > P_MEM3 /* Constant Data */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 KadaAPI : {} > P_MEM3 /* ROMized CLDC */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 .javastack: {} >> D_MEM1 | D_MEM2 /* Java stack */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 .stackandheap : > D_MEM1 /* System Stacks, etc... */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 { |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 /* Leave 20 32bit words for register pushes. */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 . = align(8); |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 . += 20 * 4; |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 /* Stack for abort and/or undefined modes. */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 exception_stack = .; |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 /* Leave 38 32bit words for state saving on exceptions. */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 _xdump_buffer = .; |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 . += 38 * 4; |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 . = align(8); |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 /* Beginning of stacks and heap area - 2.75 kbytes (int.s) */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 stack_segment = .; |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 . += 0xB00; |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 } |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 .data : {} > D_MEM1 /* Initialized Data */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 .sysmem : {} > D_MEM1 /* Dynamic Memory Allocation Area */ |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 |
a0c4fd5c7430
pdt_2092 builds for Openmoko memory configuration
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 } |