Changeset 1016 for branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/reset.S
- Timestamp:
- Sep 14, 2015, 9:42:16 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/reset.S
r934 r1016 21 21 #define Y_MASK ((1<<Y_WIDTH)-1) 22 22 23 #define XCU_REG(func, idx) ((((func)<<5)|(idx)) << 2) 24 #define XCU_CFG_REG 17 25 #define XCU_BARRIER 5 26 27 #define MEMC_REG(func,idx) (((func<<7)|idx) << 2) 28 #define MEMC_CONFIG 0 29 #define MEMC_SCRATCHPAD 4 30 23 31 reset: 24 32 .set noreorder … … 33 41 34 42 /* 35 * All processors compute: 36 * cid = (x * Y_SIZE) + y 37 * pid = (cid * NB_PROCS_MAX) + lpid 43 * Get processor ID 38 44 */ 39 45 mfc0 k0, CP0_PROCID 40 andi k0, k0, 0xFFF /* k0 <= proc_xyl */46 andi k0, k0, 0xFFF /* k0 <= proc_xyl */ 41 47 42 /* Only the processor 0 continues the execution */ 48 /* 49 * Release local gateway hardware barrier 50 */ 51 la k1, SEG_XCU_BASE /* k1 <= ICU base address */ 52 li t0, XCU_REG(XCU_CFG_REG, XCU_BARRIER) 53 or k1, k1, t0 /* k1 <= &XICU[CFG_REG][BARRIER] */ 54 li t0, 0xFFFFFFFF 55 sw t0, 0(k1) 56 57 /* 58 * Disable the scratchpad mode on the local memory cache 59 */ 60 la k1, SEG_MMC_BASE /* k1 <= MMC base address */ 61 li t0, MEMC_REG(MEMC_CONFIG, MEMC_SCRATCHPAD) 62 or k1, k1, t0 /* k1 <= &MEMC[CONFIG][SCRATCHPAD] */ 63 sw zero, 0(k1) 64 65 /* Only the processor 0 continues the execution */ 43 66 beqz k0, 1f 44 67 nop … … 47 70 1: /* processor 0 initializes stack pointer (16K) */ 48 71 la sp, _stack 49 addiu sp, sp, (1<<14) /* sp <= _stack + 16K */72 addiu sp, sp, (1<<14) /* sp <= _stack + 16K */ 50 73 51 74 /* jumps to main in kernel mode */
Note: See TracChangeset
for help on using the changeset viewer.