Changeset 654 for trunk/hal/tsar_mips32/core/hal_uspace.c
- Timestamp:
- Nov 14, 2019, 4:03:25 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_uspace.c
r647 r654 36 36 // It works in a critical section, as it modifies two CP2 registers: 37 37 // It activates briefly the DATA_MMU by writing into the CP2_MODE register to access the 38 // user buffer, and modifies the CP2_D ATA_EXT register to access the kernel buffer.38 // user buffer, and modifies the CP2_DEXT register to access the kernel buffer. 39 39 // If the two buffers are aligned on a word boundary, it moves the data word per word 40 40 // in a first loop, and moves byte per byte the remaining bytes in a second loop. … … 80 80 "ori $13, $12, 0x4 \n" /* $13 <= MMU_MODE with DTLB */ 81 81 82 /* save old MMU_DATA_EXT and set cxy in it*/83 "mfc2 $16, $24 \n" /* $16 <= old MMU_D ATA_EXT*/84 "mtc2 %4, $24 \n" /* MMU_D ATA_EXT <=cxy */82 /* save MMU_DEXT register */ 83 "mfc2 $16, $24 \n" /* $16 <= old MMU_DEXT */ 84 "mtc2 %4, $24 \n" /* MMU_DEXT <= dst_cxy */ 85 85 86 86 /* transfer one word per iteration in first loop if aligned */ … … 113 113 "addi $9, $9, 1 \n" /* dst += 1 byte */ 114 114 115 /* restore old MMU_DATA_EXT register*/115 /* restore MMU_DEXT register */ 116 116 "4: \n" 117 "mtc2 $16, $24 \n" /* MMU_ _DATA_EXT <= $16*/117 "mtc2 $16, $24 \n" /* MMU_DEXT <= $16 */ 118 118 ".set reorder \n" 119 119 : … … 139 139 // It works in a critical section, as it modifies two CP2 registers: 140 140 // It activates briefly the DATA_MMU by writing into the CP2_MODE register to access the 141 // user buffer, and modifies the CP2_D ATA_EXT register to access the kernel buffer.141 // user buffer, and modifies the CP2_DEXT register to access the kernel buffer. 142 142 // If the two buffers are aligned on a word boundary, it moves the data word per word 143 143 // in a first loop, and moves byte per byte the remaining bytes in a second loop. … … 182 182 "ori $13, $12, 0x4 \n" /* $13 <= MMU_MODE with DTLB */ 183 183 184 /* save old MMU_DATA_EXT and set cxy in it*/185 "mfc2 $16, $24 \n" /* $16 <= old MMU_D ATA_EXT*/186 "mtc2 %4, $24 \n" /* MMU_D ATA_EXT <= cxy*/184 /* save MMU_DEXT register */ 185 "mfc2 $16, $24 \n" /* $16 <= old MMU_DEXT */ 186 "mtc2 %4, $24 \n" /* MMU_DEXT <= cxy */ 187 187 188 188 /* transfer one word per iteration in first loop if aligned */ … … 215 215 "addi $9, $9, 1 \n" /* dst += 1 byte */ 216 216 217 /* restore old MMU_DATA_EXT register*/217 /* restore MMU_DEXT register */ 218 218 "4: \n" 219 "mtc2 $16, $24 \n" /* MMU_ _DATA_EXT <= $16*/219 "mtc2 $16, $24 \n" /* MMU_DEXT <= $16 */ 220 220 ".set reorder \n" 221 221 : … … 252 252 ".set noreorder \n" 253 253 254 /* save old MMU_D ATA_EXT and set cxy in it*/255 "mfc2 $16, $24 \n" /* $16 <= old MMU_D ATA_EXT*/256 "mtc2 %3, $24 \n" /* MMU_D ATA_EXT <= cxy*/254 /* save old MMU_DEXT and set cxy in it */ 255 "mfc2 $16, $24 \n" /* $16 <= old MMU_DEXT */ 256 "mtc2 %3, $24 \n" /* MMU_DEXT <= cxy */ 257 257 258 258 "move $11, %0 \n" /* $11 <= count == size */ … … 276 276 "nop \n" 277 277 278 /* restore old MMU_D ATA_EXT register*/279 "mtc2 $16, $24 \n" /* MMU_D ATA_EXT <= $16*/278 /* restore old MMU_DEXT register */ 279 "mtc2 $16, $24 \n" /* MMU_DEXT <= $16 */ 280 280 281 281 ".set reorder \n" … … 305 305 ".set noreorder \n" 306 306 307 /* save old MMU_D ATA_EXT and set cxy in it*/308 "mfc2 $16, $24 \n" /* $16 <= old MMU_D ATA_EXT*/309 "mtc2 %3, $24 \n" /* MMU_D ATA_EXT <= cxy*/307 /* save old MMU_DEXT and set cxy in it */ 308 "mfc2 $16, $24 \n" /* $16 <= old MMU_DEXT */ 309 "mtc2 %3, $24 \n" /* MMU_DEXT <= cxy */ 310 310 311 311 "move $11, %0 \n" /* $11 <= count == size */ … … 329 329 "nop \n" 330 330 331 /* restore old MMU_D ATA_EXT register*/332 "mtc2 $16, $24 \n" /* MMU_D ATA_EXT <= $16*/331 /* restore old MMU_DEXT register */ 332 "mtc2 $16, $24 \n" /* MMU_DEXT <= $16 */ 333 333 334 334 ".set reorder \n"
Note: See TracChangeset
for help on using the changeset viewer.