Changeset 490 for soft/giet_vm/giet_boot/boot_entry.S
- Timestamp:
- Jan 16, 2015, 1:24:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_boot/boot_entry.S
r427 r490 2 2 * file : boot.S 3 3 * date : 01/17/2014 4 * author : Cesar Fuguet & Alain Greiner 4 * author : Cesar Fuguet & Alain Greiner & Hao Liu 5 5 * 6 6 * This file contains the boot_entry() function that is the entry … … 19 19 * to the boot_init() fuction defined in the boot.c file. 20 20 * 21 * - Processor 0 uses a larger stack: 64 Kbytes.21 * - each processor[x][y][0] uses a larger stack: 1,25 Kbytes. 22 22 * - Other processors use a smaller stack: 256 bytes. 23 * => the SEG_BOOT_STACK_SIZE cannot be smaller 320Kytes.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) 25 25 */ 26 26 … … 45 45 /* (proc_id is a "continuous" index, while proc_xyl is a "fixed format" index */ 46 46 47 47 48 mfc0 k0, CP0_PROCID 48 49 andi k0, k0, 0xFFF /* k0 <= proc_xyl */ … … 55 56 mflo t5 56 57 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 62 61 63 62 /* All processors initializes stack pointer, depending on proc_id */ 64 63 65 64 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 ) */ 68 68 69 li k1, 0x100 /* k1 <= Pi stack size == 256 bytes */70 multu k1, t 069 li k1, 0x100 /* k1 <= Pi stack size == 256 bytes */ 70 multu k1, t1 71 71 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 */ 74 73 75 74 76 75 /* All processors jump to the boot_init function */ 77 76 78 la 79 jr 77 la k0, boot_init 78 jr k0 80 79 nop 81 80
Note: See TracChangeset
for help on using the changeset viewer.