/**********************************************************
    File : ldscript
    Author : Alain Greiner
    Date : October 2009
**********************************************************/

/* 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_reset_base  = /* TODO */;
seg_kcode_base  = /* TODO */;
seg_kdata_base  = /* TODO */;
seg_kunc_base   = /* TODO */;
seg_code_base   = /* TODO */;
seg_data_base   = /* TODO */;
seg_stack_base  = /* TODO */;

seg_tty_base    = 0x90000000;    /* controleur TTY */
seg_timer_base  = 0x91000000;    /* controleur TIMER */
seg_ioc_base    = 0x92000000;    /* controleur I/O */
seg_dma_base    = 0x93000000;    /* controleur DMA */
seg_locks_base  = 0x94000000;    /* controleur LOCKS */
seg_gcd_base    = 0x95000000;    /* controleur GCD */
seg_fb_base     = 0x96000000;    /* controleur FRAME BUFFER */
seg_icu_base    = 0x9F000000;    /* controleur ICU */

/* 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_TTYS     = 1;
NB_LOCKS    = 0;
NB_TIMERS   = 0;
NB_PROCS    = 1;

/* Maximum number of tasks per processoir
It is referenced in the drivers.c file to compute
the global TTY index = proc_id*NB_TASKS + task_id */

NB_TASKS    = 1;

/* Grouping sections into segments */

SECTIONS
{
    . = seg_kcode_base;
    seg_kernel : {
        *(.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)
    }
}

