Changeset 1042 for trunk/softs
- Timestamp:
- May 19, 2016, 3:15:16 PM (9 years ago)
- Location:
- trunk/softs/tsar_boot
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/tsar_boot/Makefile
r1024 r1042 6 6 HARD_CONFIG_PATH ?= ../../../giet_vm 7 7 MAKECMDGOALS ?= none 8 BS_PROC ?= 0 8 BS_PROC ?= 0 9 USE_32BIT ?= 0 10 BLOCK_SIZE ?= 512 9 11 10 12 MAKECMDGOALS ?= none … … 23 25 DEFS := "-DRESET_SYSTEM_CLK=$(SYSTEM_CLK)" 24 26 endif 25 DEFS := -DBS_PROC=$(BS_PROC) 27 DEFS := -DBS_PROC=$(BS_PROC) -DBLOCK_SIZE=$(BLOCK_SIZE) -DUSE_32BIT=$(USE_32BIT) 26 28 27 29 LD := mipsel-unknown-elf-ld -
trunk/softs/tsar_boot/drivers/reset_tty.c
r992 r1042 38 38 { 39 39 iowrite32( &tty_address[TTY_WRITE], (unsigned int)c ); 40 if (c == '\n') reset_putc( '\r' );41 40 } 42 41 -
trunk/softs/tsar_boot/include/defs.h
r949 r1042 30 30 */ 31 31 32 #define BLOCK_SIZE 512 /* bytes*/32 /* BLOCK_SIZE is now defined in the makefile */ 33 33 #define CACHE_LINE_SIZE 64 /* bytes */ 34 34 -
trunk/softs/tsar_boot/src/reset.S
r949 r1042 92 92 srl t2, t0, P_WIDTH /* t2 <= cluster_xy */ 93 93 94 /* All processors initiali se the count register in CP0 */94 /* All processors initialize the count register in CP0 */ 95 95 96 96 mtc0 zero, CP0_COUNT 97 97 98 /* 98 #if USE_32BIT 99 /*** VERSION 1 : 32 bits ***/ 100 101 /* 102 * If the addresses are 32-bit wide, we need to compute the address 103 * if the XICU for each cluster 99 104 * All processors enable the WTI for XICU 100 105 * Each processor may have IRQ_PER_PROC irq outputs from the XICU 101 106 * In each cluster, the XICU base address depends on the cluster_xy 102 107 */ 103 108 la t3, SEG_XCU_BASE /* t3 <= ICU base address */ 109 li t4, 1 /* t4 <= 1 */ 110 sll t4, t4, X_WIDTH /* t4 <= 1 << X_WIDTH */ 111 li t5, 1 /* t5 <= 1 */ 112 sll t5, t5, Y_WIDTH /* t5 <= 1 << Y_WIDTH */ 113 multu t4, t5 /* X_WIDTH * Y_WIDTH */ 114 mflo t4 /* t4 <= X_WIDTH * Y_WIDTH */ 115 lui t5, 0x8000 /* t5 <= 0x80000000 */ 116 divu t5, t4 /* (Address increment per cluster) / 2*/ 117 mflo t4 /* t4 <= Increment / 2 */ 118 sll t4, t4, 1 /* t4 <= Address increment per clus. */ 119 mult t4, t2 /* Cluster increment * Cluster num. */ 120 mflo t4 /* Cluster base address */ 121 addu t3, t3, t4 /* t3 <= XICU base address in clus. */ 122 123 move t4, t1 /* t4 <= local_id */ 124 li t5, IRQ_PER_PROCESSOR /* t5 <= IRQ_PER_PROCESSOR */ 125 multu t4, t5 126 mflo t6 /* t6 <= IRQ_PER_PROC * local_id */ 127 sll t4, t6, 2 /* t4 <= OUT_INDEX = t6 * 4 */ 128 129 li t5, (0xC << 7) /* t5 <= FUNC = XICU_MSK_WTI */ 130 or t4, t4, t5 /* t4 <= FUNC | INDEX | 00 */ 131 or t5, t3, t4 /* t5 <= &XICU[MSK_WTI][OUT_INDEX] */ 132 133 /* All processors set WTI mask */ 134 135 li t4, 1 136 sllv t4, t4, t1 /* Set XICU[MSK_WTI][INDEX][local_id] */ 137 sw t4, 0(t5) /* XICU[MSK_WTI][INDEX] <= t4 */ 138 #else 139 /*** VERSION 2 : 40 bits ***/ 140 141 /* 142 * All processors enable the WTI for XICU 143 * Each processor may have IRQ_PER_PROC irq outputs from the XICU 144 * In each cluster, the XICU base address depends on the cluster_xy 145 */ 104 146 la t3, SEG_XCU_BASE /* t3 <= ICU base address */ 105 147 move t4, t1 /* t4 <= local_id */ … … 121 163 sw t4, 0(t5) /* XICU[MSK_WTI][INDEX] <= t4 */ 122 164 mtc2 zero, CP2_PADDR_EXT /* reset PADDR extension */ 123 124 /* 125 * Only processor 0 in cluster 0 loads and executes the boot-loader 165 #endif 166 167 /* 168 * Only the bootstrap processor loads and executes the boot-loader 126 169 * We have: 127 170 * t0: global pid 128 171 * t1: local pid 129 172 * t2: cluster_xy 130 * t3: xicu physical base address in cluster 0 131 */ 132 133 bne zero, t0, _reset_wait 134 nop 135 136 /* Processor 0 initializes stack pointer */ 173 * t3: xicu physical base address in bootstrap cluster 174 */ 175 176 li t4, BS_PROC 177 bne t4, t0, _reset_wait 178 nop 179 180 /* Bootstrap Processor initializes stack pointer */ 137 181 138 182 la k0, _stack … … 140 184 addu sp, k0, k1 /* P0 stack from base to (base + size) */ 141 185 142 /* Processor 0displays version for this reset code */186 /* Bootstrap Processor displays version for this reset code */ 143 187 144 188 la a0, versionstr … … 146 190 nop 147 191 148 /* Processor 0initializes the block device */192 /* Bootstrap Processor initializes the block device */ 149 193 150 194 jal reset_ioc_init … … 152 196 153 197 /* 154 * Processor 0jumps to the reset_elf_loader routine passing as argument198 * Bootstrap Processor jumps to the reset_elf_loader routine passing as argument 155 199 * the block number in which is loaded the .elf file 156 200 */ … … 161 205 162 206 /* 163 * Processor Ojumps to the entry address defined in the .elf file, and207 * Bootstrap Processor jumps to the entry address defined in the .elf file, and 164 208 * returned by reset_elf_loader function. 165 209 * First argument is pointer to the preloader function vectors other
Note: See TracChangeset
for help on using the changeset viewer.