Ignore:
Timestamp:
Jan 16, 2015, 1:24:18 PM (9 years ago)
Author:
haoliu
Message:

Implemented a new way to construct the ptabs in boot. In the map.bin file,
each physical segment in cluster[x][y] is handled by the processor[x][y][0]. So
the constrcuting of page table is done in parrallel by all the
processor[x][y][0] at the same time.

This way spents less time than the constructing sequential by one processor(
the processor[0][0][0])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_boot/boot_entry.S

    r427 r490  
    22 * file   : boot.S
    33 * date   : 01/17/2014
    4  * author : Cesar Fuguet & Alain Greiner
     4 * author : Cesar Fuguet & Alain Greiner & Hao Liu
    55 *
    66 * This file contains the boot_entry() function that is the entry
     
    1919 * to the boot_init() fuction defined in the boot.c file.
    2020 *
    21  * - Processor 0 uses a larger stack:         64 Kbytes.
     21 * - each processor[x][y][0] uses a larger stack: 1,25 Kbytes.
    2222 * - Other processors use a smaller stack:    256 bytes.
    23  *     => the SEG_BOOT_STACK_SIZE cannot be smaller 320 Kytes.
    24  *         (64K + 1024 * 256 = 320 Kbytes = 0x50000)
     23 *     => the SEG_BOOT_STACK_SIZE cannot be smaller 512 Kytes.
     24 *         (256*(1024+256) + (1024 - 256) * 256 = 512 Kbytes = 0x80000)
    2525 */
    2626
     
    4545    /* (proc_id is a "continuous" index, while proc_xyl is a "fixed format" index */
    4646
     47
    4748    mfc0   k0,      CP0_PROCID
    4849    andi   k0,      k0,     0xFFF             /* k0 <= proc_xyl                   */
     
    5556    mflo   t5
    5657    addu   t5,      t5,     t4                /* t5 <= cluster_id                 */
    57     li     t7,      NB_PROCS_MAX
    58     multu  t5,      t7
    59     mflo   t0
    60     addu   t0,      t0,     t1                /* t0 <= proc_id                    */
    61    
     58    li     t6,      0x100 * (NB_PROCS_MAX - 1) + 0x500  /* stack size per cluster */
     59    multu  t6,      t5
     60    mflo   t7
    6261
    6362    /* All processors initializes stack pointer, depending on proc_id             */
    6463
    6564   la      k0,      SEG_BOOT_STACK_BASE
    66    li      k1,      0x10000         /* k1 <= P0 stack size == 64 Kbytes           */
    67    addu    sp,      k0,     k1      /* P0 stack from base to (base + 64K)         */
     65   addu    k0,      k0,     t7
     66   li      k1,      0x500           /* k1 <= local P0 stack size == 1,25 Kbytes            */
     67   addu    sp,      k0,     k1      /* P0 stack from base to (base + stack size * cluster_id + 1,25K )         */
    6868
    69    li      k1,      0x100           /* k1 <= Pi stack size == 256 bytes           */
    70    multu   k1,      t0             
     69   li      k1,      0x100           /* k1 <= Pi stack size == 256 bytes            */
     70   multu   k1,      t1             
    7171   mflo    k0                       /* k0 <= 256 * proc_id                        */
    72    addu    sp,      sp,     k1
    73    addu    sp,      sp,     k0      /* Pi stacks from base + 64K + proc_id*256    */
     72   addu    sp,      sp,     k0      /* Pi stacks from base + stack size * cluster_id + 1,25K + proc_id*256    */
    7473
    7574
    7675    /* All processors jump to the boot_init function                              */
    7776
    78     la      k0,     boot_init
    79     jr      k0
     77    la     k0,     boot_init
     78    jr     k0
    8079    nop
    8180
Note: See TracChangeset for help on using the changeset viewer.