| 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_PROCS                = 1; | 
|---|
| 35 | NB_TASKS                = 4; | 
|---|
| 36 | NB_LOCKS                = 0; | 
|---|
| 37 | NB_TIMERS               = 1; | 
|---|
| 38 |  | 
|---|
| 39 | /* Grouping sections into segments */ | 
|---|
| 40 |  | 
|---|
| 41 | SECTIONS | 
|---|
| 42 | { | 
|---|
| 43 | . = seg_kcode_base; | 
|---|
| 44 | seg_kcode : { | 
|---|
| 45 | *(.giet) | 
|---|
| 46 | *(.switch) | 
|---|
| 47 | *(.drivers) | 
|---|
| 48 | *(.isr) | 
|---|
| 49 | } | 
|---|
| 50 | . = seg_kdata_base; | 
|---|
| 51 | seg_kdata : { | 
|---|
| 52 | *(.kdata) | 
|---|
| 53 | } | 
|---|
| 54 | . = seg_kunc_base; | 
|---|
| 55 | seg_kunc : { | 
|---|
| 56 | *(.unckdata) | 
|---|
| 57 | } | 
|---|
| 58 | . = seg_kdata_base; | 
|---|
| 59 | seg_kdata : { | 
|---|
| 60 | *(.ksave) | 
|---|
| 61 | } | 
|---|
| 62 | . = seg_code_base; | 
|---|
| 63 | seg_code : { | 
|---|
| 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 |  | 
|---|