| 1 | /**********************************************************
|
|---|
| 2 | File : ldscript
|
|---|
| 3 | Author : Alain Greiner
|
|---|
| 4 | Date : January 2014
|
|---|
| 5 | **********************************************************/
|
|---|
| 6 |
|
|---|
| 7 | /* definition of the base address for all segments
|
|---|
| 8 | The peripherals base addresses are referenced by the
|
|---|
| 9 | software drivers and must be defined, even if the
|
|---|
| 10 | peripherals are not present in the architecture */
|
|---|
| 11 |
|
|---|
| 12 | seg_reset_base = 0xBFC00000; /* boot code */
|
|---|
| 13 |
|
|---|
| 14 | seg_kcode_base = 0x00010000; /* kernel code */
|
|---|
| 15 | seg_kdata_base = 0x00020000; /* kernel cacheable data */
|
|---|
| 16 | seg_kunc_base = 0x00030000; /* kernel uncacheable data */
|
|---|
| 17 |
|
|---|
| 18 | seg_code_base = 0x00040000; /* application code */
|
|---|
| 19 | seg_data_base = 0x00050000; /* application data */
|
|---|
| 20 |
|
|---|
| 21 | seg_heap_base = 0x00100000; /* heaps for applications */
|
|---|
| 22 | seg_stack_base = 0x00300000; /* stacks for applications */
|
|---|
| 23 |
|
|---|
| 24 | seg_ramdisk_base = 0xFFFFFFFF; /* virtual disk */
|
|---|
| 25 |
|
|---|
| 26 | seg_xcu_base = 0xB0000000; /* XCU controller */
|
|---|
| 27 | seg_dma_base = 0xB1000000; /* DMA controller */
|
|---|
| 28 | seg_mmc_base = 0xB2000000; /* config MMC */
|
|---|
| 29 | seg_ioc_base = 0xB3000000; /* IOC controller */
|
|---|
| 30 | seg_tty_base = 0xB4000000; /* TTY controller */
|
|---|
| 31 | seg_nic_base = 0xB5000000; /* NIC controller */
|
|---|
| 32 | seg_cma_base = 0xB6000000; /* CMA controller */
|
|---|
| 33 | seg_fbf_base = 0xB7000000; /* FBF controller */
|
|---|
| 34 | seg_pic_base = 0xB8000000; /* PIC controller */
|
|---|
| 35 |
|
|---|
| 36 | ENTRY(reset)
|
|---|
| 37 |
|
|---|
| 38 | /* Grouping sections into segments */
|
|---|
| 39 |
|
|---|
| 40 | SECTIONS
|
|---|
| 41 | {
|
|---|
| 42 | . = seg_kcode_base;
|
|---|
| 43 | seg_kcode : {
|
|---|
| 44 | *(.giet)
|
|---|
| 45 | *(.switch)
|
|---|
| 46 | *(.drivers)
|
|---|
| 47 | *(.isr)
|
|---|
| 48 | }
|
|---|
| 49 | . = seg_kdata_base;
|
|---|
| 50 | seg_kdata : {
|
|---|
| 51 | *(.kdata)
|
|---|
| 52 | }
|
|---|
| 53 | . = seg_kunc_base;
|
|---|
| 54 | seg_kunc : {
|
|---|
| 55 | *(.unckdata)
|
|---|
| 56 | }
|
|---|
| 57 | . = seg_kdata_base;
|
|---|
| 58 | seg_kdata : {
|
|---|
| 59 | *(.ksave)
|
|---|
| 60 | }
|
|---|
| 61 | . = seg_code_base;
|
|---|
| 62 | seg_code : {
|
|---|
| 63 | *(.text)
|
|---|
| 64 | *(.text.*)
|
|---|
| 65 | }
|
|---|
| 66 | . = seg_reset_base;
|
|---|
| 67 | seg_reset : {
|
|---|
| 68 | *(.reset)
|
|---|
| 69 | }
|
|---|
| 70 | . = seg_data_base;
|
|---|
| 71 | seg_data : {
|
|---|
| 72 | *(.rodata)
|
|---|
| 73 | . = ALIGN(4);
|
|---|
| 74 | *(.rodata.*)
|
|---|
| 75 | . = ALIGN(4);
|
|---|
| 76 | *(.data)
|
|---|
| 77 | . = ALIGN(4);
|
|---|
| 78 | *(.sdata)
|
|---|
| 79 | . = ALIGN(4);
|
|---|
| 80 | *(.bss)
|
|---|
| 81 | *(COMMON)
|
|---|
| 82 | *(.sbss)
|
|---|
| 83 | }
|
|---|
| 84 | }
|
|---|
| 85 |
|
|---|