Ignore:
Timestamp:
Apr 26, 2017, 2:14:33 PM (7 years ago)
Author:
alain
Message:

Modify the boot_info_t struct to describe external peripherals in all clusters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bootloader_tsar/boot_entry.S

    r1 r6  
     1/*
     2 * boot_entry.S - TSAR bootloader entry point.
     3 *
     4 * Authors :   Alain Greiner / Vu Son  (2016)
     5 *
     6 * Copyright (c) UPMC Sorbonne Universites
     7 *
     8 * This file is part of ALMOS-MKH.
     9 *
     10 * ALMOS-MKH is free software; you can redistribute it and/or modify it
     11 * under the terms of the GNU General Public License as published by
     12 * the Free Software Foundation; version 2.0 of the License.
     13 *
     14 * ALMOS-MKH is distributed in the hope that it will be useful, but
     15 * WITHOUT ANY WARRANTY; without even the implied warranty of
     16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     17 * General Public License for more details.
     18 *
     19 * You should have received a copy of the GNU General Public License
     20 * along with ALMOS-MKH; if not, write to the Free Software Foundation,
     21 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
     22 */
     23
    124/*************************************************************************************************
    225 * This file contains the entry point of the ALMOS-MK boot-loader for TSAR architecture.         *
     
    6184    mfc0    k0,     CP0_PROCID         
    6285    andi    k0,     k0,     0xFFF                       /* k0 <= gid                        */
    63     andi    t1,     k0,     ((1 << PADDR_WIDTH) - 1)    /* t1 <= lid                        */
    64     srl     t2,     k0,     PADDR_WIDTH                 /* t2 <= cxy                        */
     86    andi    t1,     k0,     ((1 << P_WIDTH) - 1)        /* t1 <= lid                        */
     87    srl     t2,     k0,     P_WIDTH                     /* t2 <= cxy                        */
    6588   
    66     /*
    67      * Initializing stack pointer from previously retrieved lid value.
    68      */
     89    /* Initialize stack pointer from previously retrieved lid value  */
    6990   
    7091    la      t0,     BOOT_STACK_BASE                     /* t0 <= BOOT_STACK_BASE            */
    7192    li      k1,     BOOT_STACK_SIZE                     /* k1 <= BOOT_STACK_SIZE            */
    7293    multu   k1,     t1
    73     mflo    k0,                                         /* k0 <= BOOT_STACK_SIZE * lid      */
     94    mflo    k0                                          /* k0 <= BOOT_STACK_SIZE * lid      */
    7495    subu    sp,     t0,     k0                          /* P[cxy,lid] stack top initialized */
    7596
    76     /*
    77      * Switching to local DSPACE by changing the value of the address extension registers.
    78      */
     97    /* Switch to local DSPACE by changing the value of the address extension registers  */
    7998
    8099    mtc2    t2,     CP2_DATA_PADDR_EXT
    81100
    82     /*
    83      * Jumping to boot_loader() function after passing 2 arguments in the registers.
    84      */
     101    /* Jump to boot_loader() function after passing 2 arguments in the registers  */
    85102
    86103    or      a0,     zero,   t1                          /* a0 <= lid                        */     
     
    96113 *************/
    97114
    98     /*
    99      * Testing if this is bscpu.
    100      */
     115    /* Test if this is bscpu  */
    101116
    102117    mfc0    k0,     CP0_PROCID         
     
    108123    li      t4,     BOOT_CORE_CXY                       /* t4 <= bscpu cxy                  */
    109124
    110     /*
    111      * Getting base address of the core descriptor table in 'arch_info.bin' file.
    112      */
     125    /* Get base address of the core descriptor table in 'arch_info.bin' file */
    113126
    114127    la      t0,     ARCHINFO_BASE                       /* t0 <= ARCHINFO_BASE              */
     
    116129    addu    t2,     t0,     t1                          /* t2 <= ARCHINFO_CORE_BASE         */
    117130
    118     /*
    119      * Scanning the core descriptor table if this is not bscpu. TODO If not found?
    120      */
     131    /* scan the core descriptor table if this is not bscpu. TODO If not found?  */
    121132
    122133    li      t3,     0x8                                 /* t3 <= ARCHINFO_CORE_SIZE         */
     
    127138    addu    t2,     t2,     t3                          /* t2 <= @ next archinfo_core       */
    128139
    129     /*
    130      * Getting (cxy, lid) values from the found core descriptor.
    131      */
     140    /* Get (cxy, lid) values from the found core descriptor  */
    132141   
    133142    lw      t3,     -8(t2)                              /* t3 <= lid                        */
    134143    lw      t4,     -4(t2)                              /* t4 <= cxy                        */
    135144
    136     /*
    137      * Initializing stack pointer from previously retrieved lid value.
    138      */
     145    /* Initialize stack pointer from previously retrieved lid value  */
    139146
    140147bscpu_exit:   
     
    145152    subu    sp,     t0,     k0                          /* P[cxy,lid] stack top initialized */
    146153
    147     /*
    148      * Switching to local DSPACE by changing the value of the address extension registers.
    149      */
     154    /* Switch to local DSPACE by changing the value of the address extension registers  */
    150155
    151156    mtc2    t4,     CP2_DATA_PADDR_EXT
    152157
    153     /*
    154      * Jumping to boot_loader() function after passing 2 arguments in the registers.
    155      */
     158    /* Jumping to boot_loader() function after passing 2 arguments in registers */
    156159
    157160    or      a0,     zero,   t3                          /* a0 <= lid                        */     
Note: See TracChangeset for help on using the changeset viewer.