Changeset 653


Ignore:
Timestamp:
Nov 14, 2019, 4:00:51 PM (2 years ago)
Author:
alain
Message:

Remove the hard_config.h file include.

Location:
trunk/boot/tsar_mips32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/boot/tsar_mips32/boot.c

    r637 r653  
    3030 *                                                                          *
    3131 * The 'boot.elf' file (containing the boot-loader binary code) is stored   *
    32  * on disk (not in the FAT file system), and must be loaded into memory by  *
    33  * the preloader running on the core[0][0] (cxy = 0 / lid = 0).             *
     32 * on disk (not in the FAT file system), and must be loaded into memory     *
     33 * by the generic (OS undependant) preloader.                               *
    3434 *                                                                          *
    3535 * The main task of the boot-loader is to load in the first physical page   *
     
    3737 * and to build - in each cluster - a cluster specific description of the   *
    3838 * hardware archtecture, stored in the "kdata" segment as the boot_info_t   *
    39  * structure. The "kernel.elf" and "arch_info.bin" files are supposed to be *
    40  * stored on disk in a FAT32 file system.                                   *
     39 * structure. These "kernel.elf" and "arch_info.bin" files are supposed    *
     40 * to be stored on disk in a FAT32 file system.                             *
    4141 *                                                                          *
    4242 * All cores contribute to the boot procedure, but all cores are not        *
     
    4949 * actual kernel initialisation.                                            *
    5050 *                                                                          *
    51  * Implementation note:                                                     *                      *                                                                          *
     51 * Implementation note:                                                     *
     52 *                                                                          *
    5253 * To allows each core to use the local copy of both the boot code and the  *
    5354 * kernel code, the boot-loader builds a minimal and temporary BPT (Boot    *
     
    768769    {
    769770        /************************************i**********************
    770          * PHASE Sequencial : only core[0][0] executes it
     771         * PHASE Sequencial : only core[0,0] executes it
    771772         **********************************************************/
    772773        if (cxy == 0)
    773774        {
    774             boot_printf("\n[BOOT] core[%x,%d] active at cycle %d\n",
    775             cxy, lid, boot_get_proctime() );
    776 
    777775            // Initialize IOC driver
    778776            if      (USE_IOC_BDV) boot_bdv_init();
     
    830828            boot_activate_ins_mmu( 0 );
    831829
    832             // Activate other core[cxy][0] / get number of activated cores
     830            // Activate other core[cxy,0] / set number of activated cores
    833831            active_cores_nr = boot_wake_all_cp0s() + 1;
    834832
    835             // Wait until all clusters (i.e all CP0s) ready to enter kernel.
     833            // Wait until all clusters (i.e all core[cxy,0]) ready to enter kernel.
    836834            boot_remote_barrier( XPTR( BOOT_CORE_CXY , &global_barrier ) ,
    837835                                 active_cores_nr );
     
    845843        }
    846844        /**************************************************************************
    847          * PHASE partially parallel : all core[cxy][0] with (cxy != 0) execute it
     845         * PHASE partially parallel : all core[cxy,0] with (cxy != 0) execute it
    848846         **************************************************************************/
    849847        else
    850848        {
    851849            // at this point, the DATA extension registers point
    852             // already on the local cluster cxy to use the local stack,
     850            // on the local cluster cxy to use the local stack,
    853851            // but all cores must access the code stored in cluster 0
    854852
    855 #if DEBUG_BOOT_MULTI
    856 boot_printf("\n[BOOT] core[%x,%d] active at cycle %d\n",
    857 cxy, lid, boot_get_proctime() );
    858 #endif
    859             // Each core[cxy][0] copies the boot code (data and instructions)
     853            // Each core[cxy,0] copies the boot code (data and instructions)
    860854            // from the cluster 0 to the local cluster.
    861855            boot_remote_memcpy( XPTR( cxy           , BOOT_BASE ),
     
    864858
    865859            // from now, it is safe to refer to the boot global variables
    866             boot_printf("\n[BOOT] core[%x,%d] replicated boot code at cycle %d\n",
    867             cxy , lid , boot_get_proctime() );
    868 
     860
     861#if DEBUG_BOOT_MULTI
     862boot_printf("\n[BOOT] core[%x,%d] replicated boot code at cycle %d\n",
     863cxy , lid , boot_get_proctime() );
     864#endif
    869865            // identity maps two big pages for the boot and kernel code,
    870866            boot_page_table_init( cxy );
     
    873869            boot_activate_ins_mmu( cxy );
    874870
    875             // Each CP0 copies the arch_info.bin into the local memory.
     871            // Each core[cxy,0] copies the arch_info.bin into the local memory.
    876872            boot_remote_memcpy(XPTR(cxy,           ARCHINFO_BASE),
    877873                               XPTR(BOOT_CORE_CXY, ARCHINFO_BASE),
    878874                               ARCHINFO_MAX_SIZE );
    879 
    880             boot_printf("\n[BOOT] core[%x,%d] replicated arch_info at cycle %d\n",
    881             cxy , lid , boot_get_proctime() );
    882 
     875#if DEBUG_BOOT_MULTI
     876boot_printf("\n[BOOT] core[%x,%d] replicated arch_info at cycle %d\n",
     877cxy , lid , boot_get_proctime() );
     878#endif
    883879            // copy the kcode segment into local memory
    884880            boot_remote_memcpy( XPTR( cxy           , seg_kcode_base ),
     
    886882                                seg_kcode_size );
    887883
    888             // Each CP0 copies the kdata segment into local memory
     884            // Each core[cxy,0] copies the kdata segment into local memory
    889885            boot_remote_memcpy( XPTR( cxy           , seg_kdata_base ),
    890886                                XPTR( BOOT_CORE_CXY , seg_kdata_base ),
    891887                                seg_kdata_size );
    892 
    893             boot_printf("\n[BOOT] core[%x,%d] replicated kernel code at cycle %d\n",
    894             cxy , lid , boot_get_proctime() );
    895 
    896             // Each CP0 get local boot_info_t structure base address.
     888#if DEBUG_BOOT_MULTI
     889boot_printf("\n[BOOT] core[%x,%d] replicated kernel code at cycle %d\n",
     890cxy , lid , boot_get_proctime() );
     891#endif
     892            // Each core[cxy,0] get local boot_info_t structure base address.
    897893            boot_info = (boot_info_t*)seg_kdata_base;
    898894
    899             // Each CP0 initializes local boot_info_t structure.
     895            // Each core[cxy,0] initializes local boot_info_t structure.
    900896            boot_info_init( boot_info , cxy );
    901897
    902             boot_printf("\n[BOOT] core[%x,%d] initialised boot_info at cycle %d\n",
    903             cxy , lid , boot_get_proctime() );
    904 
    905             // Each CP0 checks core information.
     898#if DEBUG_BOOT_MULTI
     899boot_printf("\n[BOOT] core[%x,%d] initialised boot_info at cycle %d\n",
     900cxy , lid , boot_get_proctime() );
     901#endif
     902            // Each core[cxy,0] checks core information.
    906903            boot_check_core( boot_info , lid );
    907904
    908             // Each CP0 get number of active clusters from BOOT_CORE cluster
     905            // Each core[cxy,0] get number of active clusters from BOOT_CORE cluster
    909906            uint32_t count = boot_remote_lw( XPTR( 0 , &active_cores_nr ) );
    910907
     
    923920    {
    924921        /***********************************************************************
    925          * PHASE fully parallel : all cores[cxy][lid] with (lid! = 0) execute it
     922         * PHASE fully parallel : all cores[cxy,lid] with (lid! = 0) execute it
    926923         **********************************************************************/
    927924
    928 #if DEBUG_BOOT_MULTI
    929 boot_printf("\n[BOOT] core[%x,%d] active at cycle %d\n",
    930 cxy, lid, boot_get_proctime() );
    931 #endif
    932925        // activate the instruction MMU to use the local copy of the boot code
    933926        boot_activate_ins_mmu( cxy );
  • trunk/boot/tsar_mips32/boot_config.h

    r624 r653  
    1919// cache line
    2020#define CACHE_LINE_SIZE     64
     21
     22// core[x][y][p] identifier format
     23#define X_WIDTH             4
     24#define Y_WIDTH             4
     25#define P_WIDTH             2
    2126
    2227// paths for kernel.elf and arch_info.bin files
  • trunk/boot/tsar_mips32/boot_entry.S

    r623 r653  
    2222 */
    2323
    24 /**********************************************************************************************
    25  * This file contains the entry point of the ALMOS-MK boot-loader for TSAR architecture,      *
    26  * that is a generic multi-clusters / multi-processors architecture.                          *
    27  *                                                                                            *
    28  * - The number of clusters is defined by the (X_SIZE, Y_SIZE) parameters in the              *
    29  *   hard_config.h file (up to 256 clusters).                                                 *
    30  * - The number of processors per cluster is defined by the NB_PROCS_MAX parameter in the     *
    31  *   hard_config.h file (up to 4 processors per cluster).                                     *
    32  *                                                                                            *
    33  * This assembly code is executed by all cores, but at the same time, because all cores       *
    34  * are not simultaneously activated. It makes the assuption that the CPO register containing  *
    35  * the core gid (global hardware identifier) has a fixed format:                              *
    36  *    gid == (((x << Y_WIDTH) + y) << P_WIDTH) + lid                                          *
    37  *                                                                                            *
    38  * It does 3 things:                                                                          *
    39  * - It initializes the stack pointer depending on the lid extracted from the gid,            *
    40  *   using the BOOT_STACK_BASE and BOOT_STACK_SIZE parameters defined in the                  *
    41  *   'boot_config.h' file,                                                                    *
    42  * - It changes the value of the DATA address extension register using the cxy extracted      *
    43  *   from the gid,                                                                            *
    44  * - It jumps to the boot_loader() function defined in the 'boot.c' file, passing the two     *
    45  *   arguments (cxy and lid).                                                                 *
    46  *********************************************************************************************/
     24/**********************************************************************************************/
     25/* This file contains the entry point of the ALMOS-MK boot-loader for the TSAR architecture,  */
     26/* that is a generic multi-clusters / multi-processors architecture.                          */
     27/*                                                                                            */
     28/* This assembly code is executed by all cores, but not at the same time, because all cores   */
     29/* are not simultaneously activated. It makes the assuption that the CPO register containing  */
     30/* the core gid (global hardware identifier) has a fixed format:                              */
     31/*    gid == (((x << Y_WIDTH) + y) << P_WIDTH) + lid                                          */
     32/*                                                                                            */
     33/* It does 3 things:                                                                          */
     34/* - It initializes the stack pointer depending on the lid extracted from the gid,            */
     35/*   using the BOOT_STACK_BASE and BOOT_STACK_SIZE parameters that are defined in             */
     36/*   the boot_config.h file,                                                                  */
     37/* - It changes the value of the DATA address extension register using the cxy extracted      */
     38/*   from the gid, with X_WIDTH, Y_WIDTH, P_WIDTH defined in the boot¨config.h file.          */
     39/* - It jumps to the boot_loader() function defined in the 'boot.c' file, passing the two     */
     40/*   arguments (cxy and lid).                                                                 */
     41/**********************************************************************************************/
    4742
    4843#include "mips32_registers.h"
    49 #include "hard_config.h"
    5044#include "boot_config.h"
    5145
Note: See TracChangeset for help on using the changeset viewer.