/**********************************************************
	File : ldscript 
	Author : Alain Greiner
	Date : March 2011  
**********************************************************/

/* definition of various hardware parameters.
These variables are referenced in the drivers.c file,
and must be defined, even if the corresponding
peripherals are not present in the architecture */

NB_CLUSTERS		= 4;		/* number of clusters */
NB_PROCS		= 4;		/* number of processors per cluster */
NB_TASKS		= 1;		/* number of tasks per processor */
NB_TIMERS       	= 1;		/* max number of timers per processor */
NB_LOCKS        	= 8;		/* number of spin_locks */

/* definition of the base address for all segments 
The peripherals base addresses are referenced by the
software drivers and must be defined, even if the 
peripherals are not present in the architecture */

seg_code_base   = 0x00000000;       /* le code utilisateur */ 
seg_data_base   = 0x00100000;       /* les données utilisateur */

seg_heap_base   = 0x00300000;       /* le tas utilisateur */
seg_stack_base  = 0x00800000;       /* la pile utilisateur */

seg_kcode_base  = 0x80000000;       /* le code du système */
seg_kdata_base  = 0x80100000;       /* les donnees du système */
seg_kunc_base   = 0x80200000;       /* les données non cachées du système */

seg_icu_base    = 0x00F00000;       /* controleur ICU */
seg_tty_base    = 0xBFF20000;       /* controleur TTY */
seg_dma_base    = 0x00F30000;       /* controleur DMA */

seg_reset_base  = 0xBFC00000;       /* le code de boot */
seg_fb_base     = 0xBFD00000;       /* controleur FRAME BUFFER */
seg_ioc_base    = 0xBFF10000;       /* controleur I/O */

seg_timer_base  = 0x00F00000;       /* controleur TIMER */
seg_gcd_base    = 0xBFF50000;       /* controleur GCD */

/* Grouping sections into segments */

SECTIONS
{
   . = seg_kcode_base;
   seg_kcode : {
      *(.giet)
      *(.switch)
      *(.drivers)
      *(.isr)
   } 
   . = seg_kdata_base;
   seg_kdata : {
      *(.kdata)
   } 
   . = seg_kunc_base;
   seg_kunc : {
      *(.unckdata)
   } 
   . = seg_kdata_base;
   seg_kdata : {
      *(.ksave)
   } 
   . = seg_code_base;
   seg_code : {
      *(.text)
   } 
   . = seg_reset_base;
   seg_reset : {
      *(.reset)
   } 
   . = seg_data_base;
   seg_data : {
      *(.rodata)
      . = ALIGN(4);
      *(.rodata.*)
      . = ALIGN(4);
      *(.data)
      . = ALIGN(4);
      *(.sdata)
      . = ALIGN(4);
      *(.bss)
      *(COMMON)
      *(.sbss)
   } 
}

