📄 ddma.lst
字号:
291:/mnt/hgfs/boot/booter/source/ddma.c **** * 292:/mnt/hgfs/boot/booter/source/ddma.c **** * Returns : 293:/mnt/hgfs/boot/booter/source/ddma.c **** * nothing 294:/mnt/hgfs/boot/booter/source/ddma.c **** * 295:/mnt/hgfs/boot/booter/source/ddma.c **** */ 296:/mnt/hgfs/boot/booter/source/ddma.c **** void ddma_init_descriptors( DDMA_DESCRIPTOR *list, uint32 count ) 297:/mnt/hgfs/boot/booter/source/ddma.c **** { 505 .loc 1 297 0 506 .frame $sp,48,$31 # vars= 0, regs= 7/0, args= 16, gp= 0 507 .mask 0x803f0000,-8 508 .fmask 0x00000000,0 509 .set noreorder 510 .set nomacro 511 512 0380 D0FFBD27 addiu $sp,$sp,-48 513 $LCFI14: 514 0384 1C00B3AF sw $19,28($sp) 515 $LCFI15: 298:/mnt/hgfs/boot/booter/source/ddma.c **** DDMA_DESCRIPTOR *current = list; 299:/mnt/hgfs/boot/booter/source/ddma.c **** int i; 300:/mnt/hgfs/boot/booter/source/ddma.c **** for ( i=0; i<count-1; i++) 516 .loc 1 300 0 517 0388 FFFFB324 addiu $19,$5,-1 518 .loc 1 297 0 519 038c 2400B5AF sw $21,36($sp) 520 $LCFI16: 521 0390 1800B2AF sw $18,24($sp) 522 $LCFI17: 523 0394 1400B1AF sw $17,20($sp) 524 $LCFI18: 525 0398 2800BFAF sw $31,40($sp) 526 $LCFI19: 527 039c 2000B4AF sw $20,32($sp) 528 $LCFI20: 529 03a0 1000B0AF sw $16,16($sp) 530 $LCFI21: 531 .loc 1 297 0 532 03a4 21A88000 move $21,$4 533 .loc 1 298 0 534 03a8 21888000 move $17,$4 535 .loc 1 300 0 536 03ac 10006012 beq $19,$0,$L47 537 03b0 21900000 move $18,$0 538 539 03b4 FF1F023C li $2,536805376 # 0x1fff0000 540 03b8 FFFF5434 ori $20,$2,0xffff 541 $LBB4: 301:/mnt/hgfs/boot/booter/source/ddma.c **** { 302:/mnt/hgfs/boot/booter/source/ddma.c **** DDMA_DESCRIPTOR *prev; 303:/mnt/hgfs/boot/booter/source/ddma.c **** 304:/mnt/hgfs/boot/booter/source/ddma.c **** prev = current; 542 .loc 1 304 0 543 03bc 21802002 move $16,$17 544 $L48: 305:/mnt/hgfs/boot/booter/source/ddma.c **** current++; 545 .loc 1 305 0 546 03c0 40003126 addiu $17,$17,64GAS LISTING /tmp/ccEQxguf.s page 16 306:/mnt/hgfs/boot/booter/source/ddma.c **** 307:/mnt/hgfs/boot/booter/source/ddma.c **** /* Lets make all the remaining descriptors match the first initialized one */ 308:/mnt/hgfs/boot/booter/source/ddma.c **** memcpy((void*)current, (void*)prev, sizeof(DDMA_DESCRIPTOR)); 547 .loc 1 308 0 548 03c4 21202002 move $4,$17 549 03c8 21280002 move $5,$16 550 03cc 0000000C jal memcpy 551 03d0 40000624 li $6,64 # 0x40 552 553 $LBE4: 554 .loc 1 300 0 555 03d4 01005226 addiu $18,$18,1 556 $LBB5: 309:/mnt/hgfs/boot/booter/source/ddma.c **** 310:/mnt/hgfs/boot/booter/source/ddma.c **** prev->u.std.nxt_ptr = VIRT_TO_NXTPTR(current); 557 .loc 1 310 0 558 03d8 24103402 and $2,$17,$20 559 03dc 42110200 srl $2,$2,5 560 $LBE5: 561 .loc 1 300 0 562 03e0 2B185302 sltu $3,$18,$19 563 $LBB6: 564 .loc 1 310 0 565 03e4 1C0002AE sw $2,28($16) 566 $LBE6: 567 .loc 1 304 0 568 .loc 1 300 0 569 03e8 F5FF6014 bne $3,$0,$L48 570 03ec 21802002 move $16,$17 571 572 $L47: 311:/mnt/hgfs/boot/booter/source/ddma.c **** } 312:/mnt/hgfs/boot/booter/source/ddma.c **** 313:/mnt/hgfs/boot/booter/source/ddma.c **** /* The last descriptor should point back around to the beginning of the ring */ 314:/mnt/hgfs/boot/booter/source/ddma.c **** current->u.std.nxt_ptr = VIRT_TO_NXTPTR(list); 573 .loc 1 314 0 574 03f0 FF1F023C li $2,536805376 # 0x1fff0000 575 03f4 FFFF4234 ori $2,$2,0xffff 576 03f8 2410A202 and $2,$21,$2 577 03fc 42110200 srl $2,$2,5 578 0400 1C0022AE sw $2,28($17) 579 0404 2800BF8F lw $31,40($sp) 580 0408 2400B58F lw $21,36($sp) 581 040c 2000B48F lw $20,32($sp) 582 0410 1C00B38F lw $19,28($sp) 583 0414 1800B28F lw $18,24($sp) 584 0418 1400B18F lw $17,20($sp) 585 041c 1000B08F lw $16,16($sp) 586 0420 0800E003 j $31 587 0424 3000BD27 addiu $sp,$sp,48 588 589 .set macro 590 .set reorder 591 $LFE9: 592 .end ddma_init_descriptors 593 .align 2 594 .globl ddma_next_descriptorGAS LISTING /tmp/ccEQxguf.s page 17 595 .ent ddma_next_descriptor 596 .type ddma_next_descriptor, @function 597 ddma_next_descriptor: 598 $LFB10: 315:/mnt/hgfs/boot/booter/source/ddma.c **** 316:/mnt/hgfs/boot/booter/source/ddma.c **** #ifdef DEBUG 317:/mnt/hgfs/boot/booter/source/ddma.c **** for( i=0,current=list;i<count;i++,current++) 318:/mnt/hgfs/boot/booter/source/ddma.c **** { 319:/mnt/hgfs/boot/booter/source/ddma.c **** printf("Descriptor %d: \n\t%08X %08X %08X %08X\n\t%08X %08X %08X %08X\n", i, 320:/mnt/hgfs/boot/booter/source/ddma.c **** ((uint32*)current)[0], ((uint32*)current)[1], ((uint32*)current)[2], ((uint32*)current)[3], 321:/mnt/hgfs/boot/booter/source/ddma.c **** ((uint32*)current)[4], ((uint32*)current)[5], ((uint32*)current)[6], ((uint32*)current)[7] ); 322:/mnt/hgfs/boot/booter/source/ddma.c **** } 323:/mnt/hgfs/boot/booter/source/ddma.c **** #endif 324:/mnt/hgfs/boot/booter/source/ddma.c **** 325:/mnt/hgfs/boot/booter/source/ddma.c **** } 326:/mnt/hgfs/boot/booter/source/ddma.c **** 327:/mnt/hgfs/boot/booter/source/ddma.c **** 328:/mnt/hgfs/boot/booter/source/ddma.c **** /* 329:/mnt/hgfs/boot/booter/source/ddma.c **** * Function : ddma_next_descriptor 330:/mnt/hgfs/boot/booter/source/ddma.c **** * 331:/mnt/hgfs/boot/booter/source/ddma.c **** * This function find the next available descriptor in the ring for use. 332:/mnt/hgfs/boot/booter/source/ddma.c **** * 333:/mnt/hgfs/boot/booter/source/ddma.c **** * Parameters : 334:/mnt/hgfs/boot/booter/source/ddma.c **** * channel Pointer 335:/mnt/hgfs/boot/booter/source/ddma.c **** * 336:/mnt/hgfs/boot/booter/source/ddma.c **** * Returns : 337:/mnt/hgfs/boot/booter/source/ddma.c **** * non-zero Upon finding an available descriptor 338:/mnt/hgfs/boot/booter/source/ddma.c **** * NULL Descriptor Ring is full 339:/mnt/hgfs/boot/booter/source/ddma.c **** * 340:/mnt/hgfs/boot/booter/source/ddma.c **** */ 341:/mnt/hgfs/boot/booter/source/ddma.c **** DDMA_DESCRIPTOR * ddma_next_descriptor( void *c ) 342:/mnt/hgfs/boot/booter/source/ddma.c **** { 599 .loc 1 342 0 600 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 601 .mask 0x00000000,0 602 .fmask 0x00000000,0 603 .set noreorder 604 .set nomacro 605 343:/mnt/hgfs/boot/booter/source/ddma.c **** int isempty=FALSE; 344:/mnt/hgfs/boot/booter/source/ddma.c **** DDMA_DESCRIPTOR *new=NULL; 345:/mnt/hgfs/boot/booter/source/ddma.c **** CHANNEL *channel = (CHANNEL*)c; 346:/mnt/hgfs/boot/booter/source/ddma.c **** 347:/mnt/hgfs/boot/booter/source/ddma.c **** // Is the channel enabled? 348:/mnt/hgfs/boot/booter/source/ddma.c **** if ( channel->ptr->cfg & DDMA_CHANCFG_EN ) 606 .loc 1 348 0 607 0428 0000828C lw $2,0($4) 608 .loc 1 342 0 609 042c 21388000 move $7,$4 610 .loc 1 344 0 611 0430 21300000 move $6,$0 612 .loc 1 348 0 613 0434 0000438C lw $3,0($2) 614 0438 01006330 andi $3,$3,0x1 349:/mnt/hgfs/boot/booter/source/ddma.c **** { 350:/mnt/hgfs/boot/booter/source/ddma.c **** #ifdef DEBUG 351:/mnt/hgfs/boot/booter/source/ddma.c **** printf("ddma_next_descriptor: channel->dh %X\n",channel->dh); GAS LISTING /tmp/ccEQxguf.s page 18 352:/mnt/hgfs/boot/booter/source/ddma.c **** #endif 353:/mnt/hgfs/boot/booter/source/ddma.c **** 354:/mnt/hgfs/boot/booter/source/ddma.c **** #if !defined(CONFIG_EXAMPLE_AU1XIDE) 355:/mnt/hgfs/boot/booter/source/ddma.c **** // AU1XIDE example source code allows one descriptor ddma operation at the last block transfer 356:/mnt/hgfs/boot/booter/source/ddma.c **** // Do we have room on the ring? 357:/mnt/hgfs/boot/booter/source/ddma.c **** if ( channel->dt->u.std.nxt_ptr == VIRT_TO_NXTPTR(channel->dh) ) 358:/mnt/hgfs/boot/booter/source/ddma.c **** return NULL; 615 .loc 1 358 0 616 .loc 1 348 0 617 043c 18006010 beq $3,$0,$L50 618 0440 21400000 move $8,$0 619 620 .loc 1 357 0 621 0444 2000848C lw $4,32($4) 622 0448 1C00E58C lw $5,28($7) 623 044c FF1F023C li $2,536805376 # 0x1fff0000 624 0450 FFFF4234 ori $2,$2,0xffff 625 0454 1C00838C lw $3,28($4) 626 0458 2410A200 and $2,$5,$2 627 045c 42110200 srl $2,$2,5 628 0460 10006210 beq $3,$2,$L49 629 0464 00000000 nop 630 359:/mnt/hgfs/boot/booter/source/ddma.c **** #endif 360:/mnt/hgfs/boot/booter/source/ddma.c **** // Check to see if the descriptor ring is empty 361:/mnt/hgfs/boot/booter/source/ddma.c **** if ( !(channel->dh->u.std.cmd0 & DDMA_DESCCMD_V) && channel->dh == channel->dt ) 631 .loc 1 361 0 632 0468 0000A28C lw $2,0($5) 362:/mnt/hgfs/boot/booter/source/ddma.c **** isempty = TRUE; 363:/mnt/hgfs/boot/booter/source/ddma.c **** 364:/mnt/hgfs/boot/booter/source/ddma.c **** // If the ring is empty... then point new to the current tail... otherwise point to next descript 365:/mnt/hgfs/boot/booter/source/ddma.c **** if ( isempty ) 366:/mnt/hgfs/boot/booter/source/ddma.c **** new = channel->dt; 633 .loc 1 366 0 634 .loc 1 361 0 635 046c 03004004 bltz $2,$L53 636 0470 21308000 move $6,$4 637 638 0474 0300A410 beq $5,$4,$L54 639 0478 00000000 nop 640 641 $L53: 367:/mnt/hgfs/boot/booter/source/ddma.c **** else 368:/mnt/hgfs/boot/booter/source/ddma.c **** { 369:/mnt/hgfs/boot/booter/source/ddma.c **** new = (DDMA_DESCRIPTOR*)( (uint32)(channel->dt->u.std.nxt_ptr)<<5); 642 .loc 1 369 0 643 047c 1C00828C lw $2,28($4) 644 0480 40310200 sll $6,$2,5 645 $L54: 370:/mnt/hgfs/boot/booter/source/ddma.c **** #ifdef DEBUG 371:/mnt/hgfs/boot/booter/source/ddma.c **** printf("ddma_next_descriptor: List is not empty, new:%X\n", new); 372:/mnt/hgfs/boot/booter/source/ddma.c **** #endif 373:/mnt/hgfs/boot/booter/source/ddma.c **** } 374:/mnt/hgfs/boot/booter/source/ddma.c **** 375:/mnt/hgfs/boot/booter/source/ddma.c **** // point to our new tail 376:/mnt/hgfs/boot/booter/source/ddma.c **** channel->dt = NXTPTR_TO_VIRT(channel->ring, channel->dt); 646 .loc 1 376 0GAS LISTING /tmp/ccEQxguf.s page 19 647 0484 1C00828C lw $2,28($4) 648 0488 1800E38C lw $3,24($7) 649 048c 00E0043C li $4,-536870912 # 0xffffffffe0000000 650 0490 40110200 sll $2,$2,5 651 0494 24186400 and $3,$3,$4 652 0498 25186200 or $3,$3,$2 653 049c 2000E3AC sw $3,32($7) 654 $L50: 377:/mnt/hgfs/boot/booter/source/ddma.c **** } 378:/mnt/hgfs/boot/booter/source/ddma.c **** return new; 655 .loc 1 378 0 656 04a0 2140C000 move $8,$6 657 $L49: 379:/mnt/hgfs/boot/booter/source/ddma.c **** } 658 .loc 1 379 0 659 04a4 0800E003 j $31 660 04a8 21100001 move $2,$8 661 662 .set macro 663 .set reorder 664 $LFE10: 665 .end ddma_next_descriptor 666 .align 2 667 .globl ddma_lit_wr 668 .ent ddma_lit_wr 669 .type ddma_lit_wr, @function 670 ddma_lit_wr: 671 $LFB11: 380:/mnt/hgfs/boot/booter/source/ddma.c **** 381:/mnt/hgfs/boot/booter/source/ddma.c **** /* 382:/mnt/hgfs/boot/booter/source/ddma.c **** * Function : ddma_lit_wr 383:/mnt/hgfs/boot/booter/source/ddma.c **** * 384:/mnt/hgfs/boot/booter/source/ddma.c **** * This function is a helper routine to place a user's buffer pointer 385:/mnt/hgfs/boot/booter/source/ddma.c **** * in the descriptor. Set size attribute and ring the channel's 386:/mnt/hgfs/boot/booter/source/ddma.c **** * doorbell to begin transaction. 387:/mnt/hgfs/boot/booter/source/ddma.c **** * 388:/mnt/hgfs/boot/booter/source/ddma.c **** * Parameters : 389:/mnt/hgfs/boot/booter/source/ddma.c **** * channel Pointer to the ddma channel ( local struct ) 390:/mnt/hgfs/boot/booter/source/ddma.c **** * dst Pointer where the data should go -- useful for MEM->MEM ddma 391:/mnt/hgfs/boot/booter/source/ddma.c **** * size Size of the data in bytes 392:/mnt/hgfs/boot/booter/source/ddma.c **** *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -