Ignore:
Timestamp:
Jul 24, 2014, 3:19:18 PM (10 years ago)
Author:
cfuguet
Message:

tsar_boot: improving configuration infrastructure

  • Using hard_config.h which respects the same sintax that the hard_config.h file of all TSAR platforms. This file can be then generated by the GIET-VM genmap tool or written manually.
  • All peripheral drivers have been moved to a drivers directory and they are compiled as a static library. This allows GCC to only include in the final .ELF the object files of used peripherals and not all of them.
  • Example hard_config.h and ldscripts have been introduced in the conf directory.
  • Improving comments in all files
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/README

    r702 r758  
    1 TSAR BOOT LOADER
     1\author: Cesar Fuguet
     2\date  : July 24, 2014
     3
     4TSAR BOOT-LOADER
    25
    36Files:
    4 ===============================================================================
    57src/        Source files
    68            The entry point of this boot loader is the file reset.S
     
    810include/    Header files
    911
    10 conf/       Platform specific files and ldscript examples.
     12driver/     Drivers source files and headers
     13
     14conf/       Platform specific files and ldscript
    1115            For each platform, we must define a new directory.
     16            Mandatory files:
    1217
    13             - defs_platform.h:
     18              - hard_config.h (can be generated using giet-vm genmap tool)
    1419
    15               This file is mandatory. This file defines the NB_PROCS per
    16               cluster, the NB_CLUSTERS and the base address of the TTY, IOC,
    17               XICU and MEMC (config) devices. It defines also:
     20              - ldscript
    1821
    19                 #define USE_IOB
     22            Optional files:
    2023
    21                   This constant is used by the boot_ioc_read function to know
    22                   if the buffer used to store the blocks from the block_device
    23                   must be invalidated in the memory cache after the transfert
    24                   has finished.
     24              - platform.dts (platform device tree)
    2525
    26                 #define CACHE_COHERENCE
     26Makefile    Makefile to compile the boot loader.
     27            Mandatory arguments:
    2728
    28                   This constant is used by the boot_ioc_read function to know
    29                   if the buffer used to store the blocks from the block_device
    30                   must be invalidated in the dcache after the transfert has
    31                   finished.
     29              - PLATFORM_DIR=<platform_dir>
    3230
    33                 #define CACHE_LINE_SIZE
    34                  
    35                   This constant is mandatory if CACHE_COHERENCE=0 or USE_IOB=1
    36                   This constant defines the size in bytes of a cache line.
    37 
    38                 #define RESET_DEBUG
    39 
    40                   Set value to 1 to show some debug messages during loading
    41 
    42                 #define IRQ_PER_PROC
    43 
    44                   This constant is used to know how many XICU irq outputs are
    45                   connected to each processor.
    46 
    47             - platform_soclib.dts:
    48 
    49               Device tree file. It is mandatory if compiling for a SOCLIB
    50               platform and USE_DT=1.
    51 
    52             - platform_fpga.dts:
    53 
    54               Device tree file. It is mandatory if compiling for a FPGA
    55               platform and USE_DT=1.
    56 
    57             - ldscript:
    58 
    59               LD script defining the segments of this boot loader.
    60               We define two segments:
    61 
    62                 seg_stack_base:
    63 
    64                   Base address of the stack used by processor 0 during the boot
    65                   process. read-write data and bss will also be there.
    66 
    67                 seg_boot_base:
    68                
    69                   Base address of the code and read-only data defined for this
    70                   loader
    71            
    72 Makefile    Makefile to compile the boot loader. Arguments to pass:
    73 
    74               PLATFORM_DIR=<platform_dir>
    75    
    7631                Defines the directory where to find the plateform specific
    7732                files
    7833
    79               SOCLIB=1
     34           Optional arguments:
    8035
    81                 If using SOCLIB, define this flag to use the BLOCK DEVICE
    82                 driver and to choose the platform_soclib device tree.
     36              - USE_DT=<value>
    8337
    84               RAMDISK=1
    85 
    86                 If using SOCLIB, define this flag to use a RAMDISK instead of
    87                 BLOCK DEVICE (Set this flag when the SOCLIB flag is also set)
    88 
    89               USE_DT=0
    90 
     38                Value can be 1 or 0.
    9139                If a device tree file is not used, set this flag to 0. It is
    9240                set by default to 1.
    9341
    94               e.g. make PLATFORM_DIR=<platform_conf> \
    95                         SOCLIB=1 \
    96                         USE_DT=0 \
    97                         RAMDISK=0
     42              - SYSTEM_CLK=<platform clock frequency>
     43
     44                Platform clock frequency in KHz
     45
     46              - DTS=<file.dts>
     47
     48                Platform device tree (by default is platform.dts)
     49
     50Examples:
     51
     52    make PLATFORM_DIR=<platform_dir> USE_DT=0
     53
     54        Compile for <platform_dir> and do not compile device tree file
     55
     56    make PLATFORM_DIR=<platform_dir> DTS=platform_fpga.dts SYSTEM_CLK=25000
     57
     58        Compile for <platform_dir> and compile the 'platform_dpga.dts'
     59        device tree file. System clock frequency is 25 MHz
     60
     61    make PLATFORM_DIR=<platform_conf> SYSTEM_CLK=25000
     62
     63        Compile for <platform_dir> and compile the 'platform.dts'
     64        device tree file (default name). System clock frequency is 25 MHz
     65
Note: See TracChangeset for help on using the changeset viewer.