Changeset 567 for trunk/softs/tsar_boot
- Timestamp:
- Oct 30, 2013, 11:03:43 AM (11 years ago)
- Location:
- trunk/softs/tsar_boot
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/tsar_boot/include/mips32_registers.h
r292 r567 54 54 #define CP0_EBASE $15,1 55 55 56 /* CP2 registers */ 57 58 #define CP2_PTPR $0 59 #define CP2_MODE $1 60 #define CP2_ICACHE_FLUSH $2 61 #define CP2_DCACHE_FLUSH $3 62 #define CP2_ITLB_INVAL $4 63 #define CP2_DTLB_INVAL $5 64 #define CP2_ICACHE_INVAL $6 65 #define CP2_DCACHE_INVAL $7 66 #define CP2_ICACHE_PREFETCH $8 67 #define CP2_DCACHE_PREFETCH $9 68 #define CP2_SYNC $10 69 #define CP2_IETR $11 70 #define CP2_DETR $12 71 #define CP2_IBVAR $13 72 #define CP2_DBVAR $14 73 #define CP2_PARAMS $15 74 #define CP2_RELEASE $16 75 #define CP2_DATA_LO $17 76 #define CP2_DATA_HI $18 77 #define CP2_ICACHE_INVAL_PA $19 78 #define CP2_DCACHE_INVAL_PA $20 79 #define CP2_PADDR_EXT $24 80 56 81 #endif -
trunk/softs/tsar_boot/src/reset.S
r554 r567 83 83 84 84 la k0, NB_CLUSTERS 85 li t3, 0x80000000 86 divu t3, k0 87 mflo t4 88 sll t4, 1 /* t4 <= cluster_increment = 4G / NB_CLUSTERS */ 89 90 mult t4, t2 91 mflo t5 /* t5 <= cluster_id * cluster_increment */ 92 85 sll k1, t2, 8 /* k1 <= 256*cluster_id */ 86 div k1, k0 /* LO <= cluster_id * 256 / NB_CLUSTERS */ 87 mflo k1 /* k1 <= physical address extension (8 MSB) */ 88 93 89 /* Initialization of the count register in the coprocessor 0 */ 94 90 95 91 mtc0 zero, CP0_COUNT 96 97 /* In each cluster, the ICU base address depends on the cluster_id */98 99 la t3, ICU_BASE100 addu t3, t3, t5 /* t3 <= ICU_BASE + */101 /* (cluster_id * cluster_increment) */102 92 103 93 /** 104 94 * Compute the output index for the Write Triggered Interruption mask. 105 95 * Each processor enable the WTI for its irq output 106 * Each processor may have IRQ_PER_PROC private irq outputs from 107 * the XICU 108 */ 109 96 * Each processor may have IRQ_PER_PROC private irq outputs from the XICU 97 * In each cluster, the ICU base address depends on the cluster_id 98 */ 99 100 la t3, ICU_BASE 110 101 move t4, t1 /* t4 <= local_id */ 111 102 li t5, IRQ_PER_PROC /* t5 <= IRQ_PER_PROC */ … … 118 109 or t5, t3, t4 /* t5 <= &XICU[MSK_WTI][OUT_INDEX] */ 119 110 120 /* Compute and set WTI mask */111 /* Compute and set WTI mask using the physical address extension */ 121 112 122 113 li t4, 1 123 114 sllv t4, t4, t1 /* Set XICU[MSK_WTI][INDEX][local_id] */ 124 sw t4, 0(t5) /* XICU[MSK_WTI][INDEX] <= t4 */ 115 116 mtc2 k1, CP2_PADDR_EXT /* set PADDR extension */ 117 sw t4, 0(t3) /* XICU[MSK_WTI][INDEX] <= t4 */ 118 mtc2 zero, CP2_PADDR_EXT /* reset PADDR extension */ 125 119 126 120 /** … … 130 124 * t2: cluster id 131 125 * t3: xicu base address 126 * k1: Paddr extension depending on cluster_id 132 127 * 133 128 * Only processor 0 in cluster 0 executes the boot loader … … 193 188 * t2: cluster id 194 189 * t3: xicu base address 190 * k1: Paddr extension depending on cluster_id 195 191 */ 196 192 … … 200 196 wait 201 197 202 lw k0, 0(t5) /* k0 <= XICU[WTI_REG][local_id] */ 198 /* read the address to jump with a physical read */ 199 200 mtc2 k1, CP2_PADDR_EXT /* set PADDR extension */ 201 lw k0, 0(t5) /* k0 <= XICU[WTI_REG][local_id] */ 202 mtc2 zero, CP2_PADDR_EXT /* reset PADDR extension */ 203 203 204 jr k0 204 205 nop
Note: See TracChangeset
for help on using the changeset viewer.