📄 ddma.lst
字号:
GAS LISTING /tmp/ccEQxguf.s page 1 1 .section .mdebug.abi32 2 .previous 3 .section .debug_abbrev,"",@progbits 4 $Ldebug_abbrev0: 5 .section .debug_info,"",@progbits 6 $Ldebug_info0: 7 .section .debug_line,"",@progbits 8 $Ldebug_line0: 9 0000 EE010000 .text 9 0200B100 9 00000101 9 FB0E0A00 9 01010101 10 $Ltext0: 11 .align 2 12 .globl ddma_channel_start 13 .ent ddma_channel_start 14 .type ddma_channel_start, @function 15 ddma_channel_start: 16 $LFB2: 17 .file 1 "/mnt/hgfs/boot/booter/source/ddma.c" 1:/mnt/hgfs/boot/booter/source/ddma.c **** /********************************************************************* 2:/mnt/hgfs/boot/booter/source/ddma.c **** * 3:/mnt/hgfs/boot/booter/source/ddma.c **** * Copyright: 4:/mnt/hgfs/boot/booter/source/ddma.c **** * Advanced Micro Devices, AMD. All Rights Reserved. 5:/mnt/hgfs/boot/booter/source/ddma.c **** * You are hereby granted a copyright license to use, modify, and 6:/mnt/hgfs/boot/booter/source/ddma.c **** * distribute the SOFTWARE so long as this entire notice is 7:/mnt/hgfs/boot/booter/source/ddma.c **** * retained without alteration in any modified and/or redistributed 8:/mnt/hgfs/boot/booter/source/ddma.c **** * versions, and that such modified versions are clearly identified 9:/mnt/hgfs/boot/booter/source/ddma.c **** * as such. No licenses are granted by implication, estoppel or 10:/mnt/hgfs/boot/booter/source/ddma.c **** * otherwise under any patents or trademarks of AMD. This 11:/mnt/hgfs/boot/booter/source/ddma.c **** * software is provided on an "AS IS" basis and without warranty. 12:/mnt/hgfs/boot/booter/source/ddma.c **** * 13:/mnt/hgfs/boot/booter/source/ddma.c **** * To the maximum extent permitted by applicable law, AMD 14:/mnt/hgfs/boot/booter/source/ddma.c **** * DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING 15:/mnt/hgfs/boot/booter/source/ddma.c **** * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR 16:/mnt/hgfs/boot/booter/source/ddma.c **** * PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE 17:/mnt/hgfs/boot/booter/source/ddma.c **** * SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY 18:/mnt/hgfs/boot/booter/source/ddma.c **** * ACCOMPANYING WRITTEN MATERIALS. 19:/mnt/hgfs/boot/booter/source/ddma.c **** * 20:/mnt/hgfs/boot/booter/source/ddma.c **** * To the maximum extent permitted by applicable law, IN NO EVENT 21:/mnt/hgfs/boot/booter/source/ddma.c **** * SHALL AMD BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING 22:/mnt/hgfs/boot/booter/source/ddma.c **** * WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS 23:/mnt/hgfs/boot/booter/source/ddma.c **** * INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY 24:/mnt/hgfs/boot/booter/source/ddma.c **** * LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE. 25:/mnt/hgfs/boot/booter/source/ddma.c **** * 26:/mnt/hgfs/boot/booter/source/ddma.c **** * AMD assumes no responsibility for the maintenance and support 27:/mnt/hgfs/boot/booter/source/ddma.c **** * of this software. 28:/mnt/hgfs/boot/booter/source/ddma.c **** ********************************************************************* 29:/mnt/hgfs/boot/booter/source/ddma.c **** * 30:/mnt/hgfs/boot/booter/source/ddma.c **** * File: ddma.c 31:/mnt/hgfs/boot/booter/source/ddma.c **** * 32:/mnt/hgfs/boot/booter/source/ddma.c **** * Purpose: API for Au1550 DDMA controller 33:/mnt/hgfs/boot/booter/source/ddma.c **** * 34:/mnt/hgfs/boot/booter/source/ddma.c **** * $RCSfile: ddma.c,v $ 35:/mnt/hgfs/boot/booter/source/ddma.c **** * $Author: knishio $ 36:/mnt/hgfs/boot/booter/source/ddma.c **** * $Revision: 1.16 $GAS LISTING /tmp/ccEQxguf.s page 2 37:/mnt/hgfs/boot/booter/source/ddma.c **** * $Date: 2004/05/05 18:58:58 $ 38:/mnt/hgfs/boot/booter/source/ddma.c **** * 39:/mnt/hgfs/boot/booter/source/ddma.c **** ***********************************************************************/ 40:/mnt/hgfs/boot/booter/source/ddma.c **** 41:/mnt/hgfs/boot/booter/source/ddma.c **** #include "example.h" 42:/mnt/hgfs/boot/booter/source/ddma.c **** #include "ddma_api.h" 43:/mnt/hgfs/boot/booter/source/ddma.c **** 44:/mnt/hgfs/boot/booter/source/ddma.c **** //#define DEBUG 1 45:/mnt/hgfs/boot/booter/source/ddma.c **** 46:/mnt/hgfs/boot/booter/source/ddma.c **** /********************************************************************** 47:/mnt/hgfs/boot/booter/source/ddma.c **** GLOBALS 48:/mnt/hgfs/boot/booter/source/ddma.c **** **********************************************************************/ 49:/mnt/hgfs/boot/booter/source/ddma.c **** static AU1X00_DDMA *ddma; // Points Au1550 ddma engine 50:/mnt/hgfs/boot/booter/source/ddma.c **** static CHANNEL channels[DDMA_NUM_CHANNELS]; // Local channel status 51:/mnt/hgfs/boot/booter/source/ddma.c **** 52:/mnt/hgfs/boot/booter/source/ddma.c **** /********************************************************************** 53:/mnt/hgfs/boot/booter/source/ddma.c **** Helper Functions 54:/mnt/hgfs/boot/booter/source/ddma.c **** **********************************************************************/ 55:/mnt/hgfs/boot/booter/source/ddma.c **** 56:/mnt/hgfs/boot/booter/source/ddma.c **** void ddma_channel_start( CHANNEL *channel ) { channel->ptr->cfg |= DDMA_CHANCFG_EN; } 18 .loc 1 56 0 19 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 20 .mask 0x00000000,0 21 .fmask 0x00000000,0 22 .set noreorder 23 .set nomacro 24 25 .loc 1 56 0 26 0000 0000838C lw $3,0($4) 27 0004 0000628C lw $2,0($3) 28 0008 01004234 ori $2,$2,0x1 29 000c 000062AC sw $2,0($3) 30 0010 0800E003 j $31 31 0014 00000000 nop 32 33 .set macro 34 .set reorder 35 $LFE2: 36 .end ddma_channel_start 37 .align 2 38 .globl ddma_channel_stop 39 .ent ddma_channel_stop 40 .type ddma_channel_stop, @function 41 ddma_channel_stop: 42 $LFB3: 57:/mnt/hgfs/boot/booter/source/ddma.c **** void ddma_channel_stop( CHANNEL *channel ) { channel->ptr->cfg &= ~DDMA_CHANCFG_EN; } 43 .loc 1 57 0 44 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 45 .mask 0x00000000,0 46 .fmask 0x00000000,0 47 .set noreorder 48 .set nomacro 49 50 .loc 1 57 0 51 0018 0000828C lw $2,0($4) 52 001c FEFF0424 li $4,-2 # 0xfffffffffffffffe 53 0020 0000438C lw $3,0($2)GAS LISTING /tmp/ccEQxguf.s page 3 54 0024 24186400 and $3,$3,$4 55 0028 000043AC sw $3,0($2) 56 002c 0800E003 j $31 57 0030 00000000 nop 58 59 .set macro 60 .set reorder 61 $LFE3: 62 .end ddma_channel_stop 63 .align 2 64 .globl ddma_doorbell 65 .ent ddma_doorbell 66 .type ddma_doorbell, @function 67 ddma_doorbell: 68 $LFB4: 58:/mnt/hgfs/boot/booter/source/ddma.c **** void ddma_doorbell( CHANNEL *channel ) { channel->ptr->dbell = 0xFFFFFFFF; } 69 .loc 1 58 0 70 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 71 .mask 0x00000000,0 72 .fmask 0x00000000,0 73 .set noreorder 74 .set nomacro 75 76 .loc 1 58 0 77 0034 0000838C lw $3,0($4) 78 0038 FFFF0224 li $2,-1 # 0xffffffffffffffff 79 003c 0C0062AC sw $2,12($3) 80 0040 0800E003 j $31 81 0044 00000000 nop 82 83 .set macro 84 .set reorder 85 $LFE4: 86 .end ddma_doorbell 87 .align 2 88 .ent ddma_intr_handler 89 .type ddma_intr_handler, @function 90 ddma_intr_handler: 91 $LFB5: 59:/mnt/hgfs/boot/booter/source/ddma.c **** 60:/mnt/hgfs/boot/booter/source/ddma.c **** 61:/mnt/hgfs/boot/booter/source/ddma.c **** /* 62:/mnt/hgfs/boot/booter/source/ddma.c **** * Function : ddma_intr_handler 63:/mnt/hgfs/boot/booter/source/ddma.c **** * 64:/mnt/hgfs/boot/booter/source/ddma.c **** * This function is responsible for handling DDMA interrupts. 65:/mnt/hgfs/boot/booter/source/ddma.c **** * 66:/mnt/hgfs/boot/booter/source/ddma.c **** * User specified callbacks can be used for application processing at 67:/mnt/hgfs/boot/booter/source/ddma.c **** * interrupt time. 68:/mnt/hgfs/boot/booter/source/ddma.c **** * 69:/mnt/hgfs/boot/booter/source/ddma.c **** * Parameters : 70:/mnt/hgfs/boot/booter/source/ddma.c **** * irq IRQ # 71:/mnt/hgfs/boot/booter/source/ddma.c **** * arg intr_handler data 72:/mnt/hgfs/boot/booter/source/ddma.c **** * 73:/mnt/hgfs/boot/booter/source/ddma.c **** * Returns : 74:/mnt/hgfs/boot/booter/source/ddma.c **** * Nothing 75:/mnt/hgfs/boot/booter/source/ddma.c **** * 76:/mnt/hgfs/boot/booter/source/ddma.c **** */GAS LISTING /tmp/ccEQxguf.s page 4 77:/mnt/hgfs/boot/booter/source/ddma.c **** static void ddma_intr_handler( int irq, void *arg ) 78:/mnt/hgfs/boot/booter/source/ddma.c **** { 92 .loc 1 78 0 93 .frame $sp,40,$31 # vars= 0, regs= 5/0, args= 16, gp= 0 94 .mask 0x800f0000,-8 95 .fmask 0x00000000,0 96 .set noreorder 97 .set nomacro 98 99 0048 D8FFBD27 addiu $sp,$sp,-40 100 $LCFI0: 101 004c 1800B2AF sw $18,24($sp) 102 $LCFI1: 79:/mnt/hgfs/boot/booter/source/ddma.c **** CHANNEL *channels = (CHANNEL*)arg; 80:/mnt/hgfs/boot/booter/source/ddma.c **** DDMA_DESCRIPTOR *first; 81:/mnt/hgfs/boot/booter/source/ddma.c **** int i; 82:/mnt/hgfs/boot/booter/source/ddma.c **** 83:/mnt/hgfs/boot/booter/source/ddma.c **** #ifdef DEBUG 84:/mnt/hgfs/boot/booter/source/ddma.c **** printf("ddma_intr_handler: intstat:%08X\n", ddma->intstat ); 85:/mnt/hgfs/boot/booter/source/ddma.c **** #endif 86:/mnt/hgfs/boot/booter/source/ddma.c **** for( i=0; i<DDMA_NUM_CHANNELS && ddma->intstat; i++ ) 103 .loc 1 86 0 104 0050 0000123C lui $18,%hi(ddma) 105 0054 0000438E lw $3,%lo(ddma)($18) 106 .loc 1 78 0 107 0058 1400B1AF sw $17,20($sp) 108 $LCFI2: 109 005c 2000BFAF sw $31,32($sp) 110 $LCFI3: 111 0060 1C00B3AF sw $19,28($sp) 112 $LCFI4: 113 0064 1000B0AF sw $16,16($sp) 114 $LCFI5: 115 .loc 1 86 0 116 0068 0410628C lw $2,4100($3) 117 006c 2D004010 beq $2,$0,$L6 118 0070 21880000 move $17,$0 119 120 0074 2180A000 move $16,$5 121 0078 01001324 li $19,1 # 0x1 122 $L13: 87:/mnt/hgfs/boot/booter/source/ddma.c **** { 88:/mnt/hgfs/boot/booter/source/ddma.c **** // Get the channel number -- must shift by 1 to get proper array index 89:/mnt/hgfs/boot/booter/source/ddma.c **** if ( ddma->intstat & 1<<i ) 123 .loc 1 89 0 124 007c 0410628C lw $2,4100($3) 125 0080 04183302 sll $3,$19,$17 126 0084 24104300 and $2,$2,$3 127 0088 1E004010 beq $2,$0,$L7 128 008c 00000000 nop 129 130 $LBB2: 90:/mnt/hgfs/boot/booter/source/ddma.c **** { 91:/mnt/hgfs/boot/booter/source/ddma.c **** int completed=0; 131 .loc 1 91 0 132 0090 21300000 move $6,$0 92:/mnt/hgfs/boot/booter/source/ddma.c **** GAS LISTING /tmp/ccEQxguf.s page 5 93:/mnt/hgfs/boot/booter/source/ddma.c **** first = channels[i].dh; 133 .loc 1 93 0 134 0094 1C00058E lw $5,28($16) 135 0098 2000048E lw $4,32($16) 136 009c 33000008 j $L9 137 00a0 00E0073C li $7,-536870912 # 0xffffffffe0000000 138 139 $L16: 94:/mnt/hgfs/boot/booter/source/ddma.c **** 95:/mnt/hgfs/boot/booter/source/ddma.c **** // 96:/mnt/hgfs/boot/booter/source/ddma.c **** // CTG TODO -- This will not work if there is only one descriptor in a ring :( 97:/mnt/hgfs/boot/booter/source/ddma.c **** // 98:/mnt/hgfs/boot/booter/source/ddma.c **** #ifdef DEBUG 99:/mnt/hgfs/boot/booter/source/ddma.c **** printf("dh:%x dt:%x dh_cmd0:%X\n", channels[i].dh, channels[i].dt, channels[i].dh->u.std.cmd0 ); 100:/mnt/hgfs/boot/booter/source/ddma.c **** #endif 101:/mnt/hgfs/boot/booter/source/ddma.c **** // move the head pointer along -- this allows user's to re-post in callback 102:/mnt/hgfs/boot/booter/source/ddma.c **** while( channels[i].dh != channels[i].dt && !(channels[i].dh->u.std.cmd0 & DDMA_DESCCMD_V) ) 103:/mnt/hgfs/boot/booter/source/ddma.c **** { 104:/mnt/hgfs/boot/booter/source/ddma.c **** completed++; 105:/mnt/hgfs/boot/booter/source/ddma.c **** #ifdef DEBUG 106:/mnt/hgfs/boot/booter/source/ddma.c **** printf("Descriptor:%X completed\n", channels[i].dh ); 107:/mnt/hgfs/boot/booter/source/ddma.c **** #endif 108:/mnt/hgfs/boot/booter/source/ddma.c **** /* 109:/mnt/hgfs/boot/booter/source/ddma.c **** * We need to get the next descriptor's address. We must be careful to OR in the proper 110:/mnt/hgfs/boot/booter/source/ddma.c **** * MIPS KESG0/1 address bits. These are taken from the previously configured ring pointers. 111:/mnt/hgfs/boot/booter/source/ddma.c **** * The ring pointer was passed to us by the user... so assume they are all the same. 112:/mnt/hgfs/boot/booter/source/ddma.c **** */ 113:/mnt/hgfs/boot/booter/source/ddma.c **** channels[i].dh = NXTPTR_TO_VIRT( channels[i].ring, channels[i].dh ); 140 .loc 1 113 0 141 00a4 0000628C lw $2,0($3) 142 00a8 0B004004 bltz $2,$L10 143 00ac 00000000 nop 144 145 00b0 1C00638C lw $3,28($3) 146 00b4 1800028E lw $2,24($16) 147 .loc 1 104 0 148 00b8 0100C624 addiu $6,$6,1 149 .loc 1 113 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -