📄 aes.lst
字号:
160 .loc 1 166 0 161 00e8 10004230 andi $2,$2,0x10 162 .loc 1 147 0 163 .loc 1 166 0 164 00ec 02004014 bne $2,$0,$L13 165 00f0 2800A78F lw $7,40($sp) 166 167:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, number_of_blocks); 167 .loc 1 167 0 168 00f4 0400C9AC sw $9,4($6) 169 $L13: 168:/mnt/hgfs/boot/booter/source/aes.c **** 169:/mnt/hgfs/boot/booter/source/aes.c **** //*** key sequence (KS, Rx Reg )GAS LISTING /tmp/ccZgMeXN.s page 7 170:/mnt/hgfs/boot/booter/source/aes.c **** // ************************************************ 171:/mnt/hgfs/boot/booter/source/aes.c **** if(!(aes->config & AES_CONFIG_RK)) 170 .loc 1 171 0 171 00f8 1000C28C lw $2,16($6) 172 00fc 08004230 andi $2,$2,0x8 173 0100 09004014 bne $2,$0,$L14 174 0104 00000000 nop 175 172:/mnt/hgfs/boot/booter/source/aes.c **** { 173:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, key[0]); 174:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, key[1]); 175:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, key[2]); 176:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, key[3]); 176 .loc 1 176 0 177 0108 0C00858C lw $5,12($4) 178 .loc 1 173 0 179 010c 0000828C lw $2,0($4) 180 .loc 1 174 0 181 0110 0400838C lw $3,4($4) 182 .loc 1 175 0 183 0114 0800848C lw $4,8($4) 184 .loc 1 173 0 185 0118 0400C2AC sw $2,4($6) 186 .loc 1 174 0 187 011c 0400C3AC sw $3,4($6) 188 .loc 1 175 0 189 0120 0400C4AC sw $4,4($6) 190 .loc 1 176 0 191 0124 0400C5AC sw $5,4($6) 192 $L14: 177:/mnt/hgfs/boot/booter/source/aes.c **** } 178:/mnt/hgfs/boot/booter/source/aes.c **** 179:/mnt/hgfs/boot/booter/source/aes.c **** //*** Initialization Vector Sequence (IVS, Rx Reg ) 180:/mnt/hgfs/boot/booter/source/aes.c **** // ************************************************ 181:/mnt/hgfs/boot/booter/source/aes.c **** int mode = (aes->config)>>5 & 0x03; 193 .loc 1 181 0 194 0128 1000C28C lw $2,16($6) 195 012c 42110200 srl $2,$2,5 196 0130 03004230 andi $2,$2,0x3 182:/mnt/hgfs/boot/booter/source/aes.c **** // printf("\nmode is : 0x%x", mode); 183:/mnt/hgfs/boot/booter/source/aes.c **** if(mode > 0 && mode < 4) 197 .loc 1 183 0 198 0134 FFFF4224 addiu $2,$2,-1 199 0138 0300422C sltu $2,$2,3 200 013c 09004010 beq $2,$0,$L16 201 0140 00000000 nop 202 184:/mnt/hgfs/boot/booter/source/aes.c **** { 185:/mnt/hgfs/boot/booter/source/aes.c **** PRINT_LINE_NUM("Must enter here for CBC, CFB, OFB IV! "); 186:/mnt/hgfs/boot/booter/source/aes.c **** 187:/mnt/hgfs/boot/booter/source/aes.c **** // WAIT_FOR_STATUS(AES_STATUS_IN) 188:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, IV[0]); 189:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, IV[1]); 190:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, IV[2]); 191:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, IV[3]); 203 .loc 1 191 0 204 0144 0C00658D lw $5,12($11)GAS LISTING /tmp/ccZgMeXN.s page 8 205 .loc 1 188 0 206 0148 0000628D lw $2,0($11) 207 .loc 1 189 0 208 014c 0400638D lw $3,4($11) 209 .loc 1 190 0 210 0150 0800648D lw $4,8($11) 211 .loc 1 188 0 212 0154 0400C2AC sw $2,4($6) 213 .loc 1 189 0 214 0158 0400C3AC sw $3,4($6) 215 .loc 1 190 0 216 015c 0400C4AC sw $4,4($6) 217 .loc 1 191 0 218 0160 0400C5AC sw $5,4($6) 219 $L16: 192:/mnt/hgfs/boot/booter/source/aes.c **** } 193:/mnt/hgfs/boot/booter/source/aes.c **** 194:/mnt/hgfs/boot/booter/source/aes.c **** //*** Payload Sequence (PS,Rx Reg ) 195:/mnt/hgfs/boot/booter/source/aes.c **** // ************************************************ 196:/mnt/hgfs/boot/booter/source/aes.c **** // write block 0 first 197:/mnt/hgfs/boot/booter/source/aes.c **** WAIT_FOR_STATUS(AES_STATUS_IN); 220 .loc 1 197 0 221 0164 0000C28C lw $2,0($6) 222 0168 20004230 andi $2,$2,0x20 223 016c FDFF4010 beq $2,$0,$L16 224 0170 03000324 li $3,3 # 0x3 225 226 $L21: 198:/mnt/hgfs/boot/booter/source/aes.c **** for(i=0; i<4; i++) 199:/mnt/hgfs/boot/booter/source/aes.c **** { 200:/mnt/hgfs/boot/booter/source/aes.c **** // aes->indata = *input_data_block++; 201:/mnt/hgfs/boot/booter/source/aes.c **** longTemp = *input_data_block++; 227 .loc 1 201 0 228 0174 0000028D lw $2,0($8) 229 .loc 1 198 0 230 0178 FFFF6324 addiu $3,$3,-1 231 .loc 1 201 0 232 017c 04000825 addiu $8,$8,4 202:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, longTemp); 233 .loc 1 202 0 234 0180 0400C2AC sw $2,4($6) 235 0184 FBFF6104 bgez $3,$L21 236 0188 00000000 nop 237 203:/mnt/hgfs/boot/booter/source/aes.c **** } 204:/mnt/hgfs/boot/booter/source/aes.c **** number_of_blocks--; 205:/mnt/hgfs/boot/booter/source/aes.c **** 206:/mnt/hgfs/boot/booter/source/aes.c **** // write block 1...N. 207:/mnt/hgfs/boot/booter/source/aes.c **** // Note: For now, all En/Description should have defined number of blocks 208:/mnt/hgfs/boot/booter/source/aes.c **** if(!(aes_tc.config & AES_CONFIG_UC)) 238 .loc 1 208 0 239 018c 1000A28F lw $2,16($sp) 240 0190 10004230 andi $2,$2,0x10 241 .loc 1 204 0 242 .loc 1 208 0 243 0194 1B004014 bne $2,$0,$L38 244 0198 FFFF2925 addiu $9,$9,-1GAS LISTING /tmp/ccZgMeXN.s page 9 245 209:/mnt/hgfs/boot/booter/source/aes.c **** { 210:/mnt/hgfs/boot/booter/source/aes.c **** DPRINTF("\n number_of_blocks = %X", number_of_blocks); 211:/mnt/hgfs/boot/booter/source/aes.c **** 212:/mnt/hgfs/boot/booter/source/aes.c **** while( number_of_blocks > 0) 213:/mnt/hgfs/boot/booter/source/aes.c **** { 214:/mnt/hgfs/boot/booter/source/aes.c **** // Write data block (Rx Reg) 215:/mnt/hgfs/boot/booter/source/aes.c **** WAIT_FOR_STATUS(AES_STATUS_IN); /* In buffer is available*/ 216:/mnt/hgfs/boot/booter/source/aes.c **** for(i=0; i<4; i++) 217:/mnt/hgfs/boot/booter/source/aes.c **** { 218:/mnt/hgfs/boot/booter/source/aes.c **** //aes->indata = *input_data_block++; 219:/mnt/hgfs/boot/booter/source/aes.c **** longTemp = *input_data_block++; 220:/mnt/hgfs/boot/booter/source/aes.c **** WRITE_REG(aes->indata, longTemp); 221:/mnt/hgfs/boot/booter/source/aes.c **** } 222:/mnt/hgfs/boot/booter/source/aes.c **** // read enc/decrypted data block (Tx Reg) 223:/mnt/hgfs/boot/booter/source/aes.c **** PRINT_AES_REG; 224:/mnt/hgfs/boot/booter/source/aes.c **** WAIT_FOR_STATUS(AES_STATUS_OUT); /* Out buffer is available*/ 225:/mnt/hgfs/boot/booter/source/aes.c **** for(i=0; i<4; i++) 226:/mnt/hgfs/boot/booter/source/aes.c **** { 227:/mnt/hgfs/boot/booter/source/aes.c **** // *output_data_block++ = aes->outdata; 228:/mnt/hgfs/boot/booter/source/aes.c **** READ_REG(longTemp, aes->outdata); 229:/mnt/hgfs/boot/booter/source/aes.c **** *output_data_block++ = longTemp; 230:/mnt/hgfs/boot/booter/source/aes.c **** } 231:/mnt/hgfs/boot/booter/source/aes.c **** number_of_blocks--; 246 .loc 1 231 0 247 019c 19002011 beq $9,$0,$L38 248 01a0 00000000 nop 249 250 $L60: 251 .loc 1 215 0 252 01a4 0000C28C lw $2,0($6) 253 01a8 20004230 andi $2,$2,0x20 254 01ac FDFF4010 beq $2,$0,$L60 255 01b0 00000000 nop 256 257 01b4 03000324 li $3,3 # 0x3 258 $L30: 259 .loc 1 219 0 260 01b8 0000028D lw $2,0($8) 261 .loc 1 216 0 262 01bc FFFF6324 addiu $3,$3,-1 263 .loc 1 219 0 264 01c0 04000825 addiu $8,$8,4 265 .loc 1 220 0 266 01c4 0400C2AC sw $2,4($6) 267 01c8 FBFF6104 bgez $3,$L30 268 01cc 00000000 nop 269 270 $L31: 271 .loc 1 224 0 272 01d0 0000C28C lw $2,0($6) 273 01d4 10004230 andi $2,$2,0x10 274 01d8 FDFF4010 beq $2,$0,$L31 275 01dc 00000000 nop 276 277 01e0 03000324 li $3,3 # 0x3 278 $L36:GAS LISTING /tmp/ccZgMeXN.s page 10 279 .loc 1 228 0 280 01e4 0800C28C lw $2,8($6) 281 .loc 1 225 0 282 01e8 FFFF6324 addiu $3,$3,-1 283 .loc 1 229 0 284 01ec 0000E2AC sw $2,0($7) 285 01f0 FCFF6104 bgez $3,$L36 286 01f4 0400E724 addiu $7,$7,4 287 288 .loc 1 231 0 289 01f8 FFFF2925 addiu $9,$9,-1 290 01fc E9FF2015 bne $9,$0,$L60 291 0200 00000000 nop 292 293 $L38: 232:/mnt/hgfs/boot/booter/source/aes.c **** 233:/mnt/hgfs/boot/booter/source/aes.c **** } 234:/mnt/hgfs/boot/booter/source/aes.c **** } 235:/mnt/hgfs/boot/booter/source/aes.c **** 236:/mnt/hgfs/boot/booter/source/aes.c **** // read the last enc/decrypted data block (Tx Reg) 237:/mnt/hgfs/boot/booter/source/aes.c **** WAIT_FOR_STATUS(AES_STATUS_OUT); /* Out buffer is available*/ 294 .loc 1 237 0 295 0204 0000C28C lw $2,0($6) 296 0208 10004230 andi $2,$2,0x10 297 020c FDFF4010 beq $2,$0,$L38 298 0210 00000000 nop 299 300 0214 03000324 li $3,3 # 0x3 301 $L43: 238:/mnt/hgfs/boot/booter/source/aes.c **** for(i=0; i<4; i++) 239:/mnt/hgfs/boot/booter/source/aes.c **** { 240:/mnt/hgfs/boot/booter/source/aes.c **** // *output_data_block++ = aes->outdata; 241:/mnt/hgfs/boot/booter/source/aes.c **** READ_REG(longTemp, aes->outdata); 302 .loc 1 241 0 303 0218 0800C28C lw $2,8($6) 304 .loc 1 238 0 305 021c FFFF6324 addiu $3,$3,-1 242:/mnt/hgfs/boot/booter/source/aes.c **** *output_data_block++ = longTemp; 306 .loc 1 242 0 307 0220 0000E2AC sw $2,0($7) 308 0224 FCFF6104 bgez $3,$L43 309 0228 0400E724 addiu $7,$7,4 310 243:/mnt/hgfs/boot/booter/source/aes.c **** } 244:/mnt/hgfs/boot/booter/source/aes.c **** //*** key replay Sequence (KRS, Tx Reg) 245:/mnt/hgfs/boot/booter/source/aes.c **** // ************************************************ 246:/mnt/hgfs/boot/booter/source/aes.c **** if(aes_tc.config & AES_CONFIG_RPK) 311 .loc 1 246 0 312 022c 1000A28F lw $2,16($sp) 313 0230 04004230 andi $2,$2,0x4 314 0234 07004010 beq $2,$0,$L62 315 0238 00000000 nop 316 317 023c 03000324 li $3,3 # 0x3 318 $L48: 247:/mnt/hgfs/boot/booter/source/aes.c **** { 248:/mnt/hgfs/boot/booter/source/aes.c **** PRINT_LINE_NUM("\n Replay key... ");GAS LISTING /tmp/ccZgMeXN.s page 11 249:/mnt/hgfs/boot/booter/source/aes.c **** // WAIT_FOR_STATUS(AES_STATUS_OUT); /* Out buffer is available*/ 250:/mnt/hgfs/boot/booter/source/aes.c **** for(i=0; i<4; i++) 251:/mnt/hgfs/boot/booter/source/aes.c **** { 252:/mnt/hgfs/boot/booter/source/aes.c **** READ_REG(longTemp, aes->outdata); 319 .loc 1 252 0 320 0240 0800C28C lw $2,8($6) 321 .loc 1 250 0 322 0244 FFFF6324 addiu $3,$3,-1 253:/mnt/hgfs/boot/booter/source/aes.c **** *replaykey++ = longTemp; 323 .loc 1 253 0 324 0248 000042AD sw $2,0($10) 325 024c FCFF6104 bgez $3,$L48 326 0250 04004A25 addiu $10,$10,4 327 328 $L62: 254:/mnt/hgfs/boot/booter/source/aes.c **** } 255:/mnt/hgfs/boot/booter/source/aes.c **** } 256:/mnt/hgfs/boot/booter/source/aes.c **** 257:/mnt/hgfs/boot/booter/source/aes.c **** 258:/mnt/hgfs/boot/booter/source/aes.c **** } 329 .loc 1 258 0 330 0254 0800E003 j $31 331 0258 00000000 nop 332 333 .set macro 334 .set reorder 335 $LFE5: 336 .end AES_driver 337 .section .debug_frame,"",@progbits 338 $Lframe0: 339 0000 0C000000 .4byte $LECIE0-$LSCIE0 340 $LSCIE0: 341 0004 FFFFFFFF .4byte 0xffffffff 342 0008 01 .byte 0x1 343 0009 00 .ascii "\000" 344 000a 01 .uleb128 0x1 345 000b 04 .sleb128 4 346 000c 1F .byte 0x1f 347 000d 0C .byte 0xc 348 000e 1D .uleb128 0x1d 349 000f 00 .uleb128 0x0 350 .align 2 351 $LECIE0: 352 $LSFDE0: 353 0010 0C000000 .4byte $LEFDE0-$LASFDE0 354 $LASFDE0: 355 0014 00000000 .4byte $Lframe0 356 0018 00000000 .4byte $LFB3 357 001c 40000000 .4byte $LFE3-$LFB3 358 .align 2 359 $LEFDE0: 360 $LSFDE2: 361 0020 0C000000 .4byte $LEFDE2-$LASFDE2 362 $LASFDE2: 363 0024 00000000 .4byte $Lframe0 364 0028 40000000 .4byte $LFB4 365 002c 68000000 .4byte $LFE4-$LFB4GAS LISTING /tmp/ccZgMeXN.s page 12 366 .align 2 367 $LEFDE2: 368 $LSFDE4: 369 0030 0C000000 .4byte $LEFDE4-$LASFDE4 370 $LASFDE4: 371 0034 00000000 .4byte $Lframe0 372 0038 A8000000 .4byte $LFB5 373 003c B4010000 .4byte $LFE5-$LFB5 374 .align 2 375 $LEFDE4: 376 .align 0 377 .file 2 "/mnt/hgfs/boot/booter/include/au1x00.h" 378 .file 3 "/mnt/hgfs/boot/booter/include/example.h" 379 .file 4 "/mnt/hgfs/boot/booter/platforms/DB1200/platform.h" 380 .text 381 $Letext0: 382 025c 00000000 .section .debug_info 383 0000 0D020000 .4byte 0x20d 384 0004 0200 .2byte 0x2 385 0006 00000000 .4byte $Ldebug_abbrev0 386 000a 04 .byte 0x4 387 000b 01 .uleb128 0x1 388 000c 00000000 .4byte $Ldebug_line0 389 0010 5C020000 .4byte $Letext0 390 0014 00000000 .4byte $Ltext0 391 0018 C9000000 .4byte $LASF24 392 001c 01 .byte 0x1 393 001d 4F000000 .4byte $LASF25 394 0021 02 .uleb128 0x2 395 0022 36010000 .4byte $LASF0 396 0026 01 .byte 0x1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -