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

Remove the hard_config.h file include.

File:
1 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 );
Note: See TracChangeset for help on using the changeset viewer.