[15] | 1 | /********************************************************** |
---|
| 2 | File : ldscript |
---|
| 3 | Author : Alain Greiner |
---|
| 4 | Date : October 2009 |
---|
| 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; /* le code de boot */ |
---|
| 13 | seg_kcode_base = 0x80000000; /* le code du système */ |
---|
| 14 | seg_kdata_base = 0x81000000; /* les donnees du système */ |
---|
| 15 | seg_kunc_base = 0x82000000; /* les données non cachées du système */ |
---|
| 16 | seg_code_base = 0x00400000; /* le code utilisateur */ |
---|
| 17 | seg_data_base = 0x10000000; /* les données utilisateur */ |
---|
| 18 | seg_stack_base = 0x20000000; /* la pile utilisateur */ |
---|
| 19 | |
---|
| 20 | seg_tty_base = 0x90000000; /* controleur TTY */ |
---|
| 21 | seg_timer_base = 0x91000000; /* controleur TIMER */ |
---|
| 22 | seg_ioc_base = 0x92000000; /* controleur I/O */ |
---|
| 23 | seg_dma_base = 0x93000000; /* controleur DMA */ |
---|
| 24 | seg_locks_base = 0x94000000; /* controleur LOCKS */ |
---|
| 25 | seg_gcd_base = 0x95000000; /* controleur GCD */ |
---|
| 26 | seg_fb_base = 0x96000000; /* controleur FRAME BUFFER */ |
---|
| 27 | seg_icu_base = 0x9F000000; /* controleur ICU */ |
---|
| 28 | |
---|
| 29 | /* definition of various hardware parameters. |
---|
| 30 | These variables are referenced in the drivers.c file, |
---|
| 31 | and must be defined, even if the corresponding |
---|
| 32 | peripherals are not present in the architecture */ |
---|
| 33 | |
---|
| 34 | NB_TTYS = 1; |
---|
| 35 | NB_LOCKS = 0; |
---|
| 36 | NB_TIMERS = 1; |
---|
| 37 | NB_PROCS = 1; |
---|
| 38 | |
---|
| 39 | /* Maximum number of tasks per processoir |
---|
| 40 | It is referenced in the drivers.c file to compute |
---|
| 41 | the global TTY index = proc_id*NB_TASKS + task_id */ |
---|
| 42 | |
---|
| 43 | NB_TASKS = 1; |
---|
| 44 | |
---|
| 45 | /* Grouping sections into segments */ |
---|
| 46 | |
---|
| 47 | SECTIONS |
---|
| 48 | { |
---|
| 49 | . = seg_kcode_base; |
---|
| 50 | seg_kcode : { |
---|
| 51 | *(.giet) |
---|
| 52 | *(.switch) |
---|
| 53 | *(.drivers) |
---|
| 54 | *(.isr) |
---|
| 55 | } |
---|
| 56 | . = seg_kdata_base; |
---|
| 57 | seg_kdata : { |
---|
| 58 | *(.kdata) |
---|
| 59 | } |
---|
| 60 | . = seg_kunc_base; |
---|
| 61 | seg_kunc : { |
---|
| 62 | *(.unckdata) |
---|
| 63 | } |
---|
| 64 | . = seg_kdata_base; |
---|
| 65 | seg_kdata : { |
---|
| 66 | *(.ksave) |
---|
| 67 | } |
---|
| 68 | . = seg_code_base; |
---|
| 69 | seg_code : { |
---|
| 70 | *(.text) |
---|
| 71 | } |
---|
| 72 | . = seg_reset_base; |
---|
| 73 | seg_reset : { |
---|
| 74 | *(.reset) |
---|
| 75 | } |
---|
| 76 | . = seg_data_base; |
---|
| 77 | seg_data : { |
---|
| 78 | *(.rodata) |
---|
| 79 | . = ALIGN(4); |
---|
| 80 | *(.rodata.*) |
---|
| 81 | . = ALIGN(4); |
---|
| 82 | *(.data) |
---|
| 83 | . = ALIGN(4); |
---|
| 84 | *(.sdata) |
---|
| 85 | . = ALIGN(4); |
---|
| 86 | *(.bss) |
---|
| 87 | *(COMMON) |
---|
| 88 | *(.sbss) |
---|
| 89 | } |
---|
| 90 | } |
---|
| 91 | |
---|