📄 ddma2.lst
字号:
GAS LISTING /tmp/ccSUImwK.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 C2010000 .text 9 0200AF00 9 00000101 9 FB0E0A00 9 01010101 10 $Ltext0: 11 .globl flags 12 .section .bss 13 .align 2 14 .type flags, @object 15 .size flags, 4 16 flags: 17 0000 00000000 .space 4 18 .globl ddma 19 .align 2 20 .type ddma, @object 21 .size ddma, 4 22 ddma: 23 0004 00000000 .space 4 24 0008 00000000 .text 24 00000000 25 .align 2 26 .globl ddma2_get_next_channel 27 .ent ddma2_get_next_channel 28 .type ddma2_get_next_channel, @function 29 ddma2_get_next_channel: 30 $LFB5: 31 .file 1 "/mnt/hgfs/boot/booter/source/ddma2.c" 1:/mnt/hgfs/boot/booter/source/ddma2.c **** 2:/mnt/hgfs/boot/booter/source/ddma2.c **** #include "example.h" 3:/mnt/hgfs/boot/booter/source/ddma2.c **** #include "ddma2.h" 4:/mnt/hgfs/boot/booter/source/ddma2.c **** 5:/mnt/hgfs/boot/booter/source/ddma2.c **** 6:/mnt/hgfs/boot/booter/source/ddma2.c **** static void inline au1550_ddma_doorbell( DDMA_CHANNEL * chan ) { chan->dbell = 0xFFFFFFFF; } 7:/mnt/hgfs/boot/booter/source/ddma2.c **** static void inline au1550_ddma_halt( DDMA_CHANNEL * chan ) { chan->cfg &= ~DDMA_CHANCFG_EN; } 8:/mnt/hgfs/boot/booter/source/ddma2.c **** static void inline au1550_ddma_start( DDMA_CHANNEL * chan ) { chan->cfg |= DDMA_CHANCFG_EN; } 9:/mnt/hgfs/boot/booter/source/ddma2.c **** 10:/mnt/hgfs/boot/booter/source/ddma2.c **** typedef struct 11:/mnt/hgfs/boot/booter/source/ddma2.c **** { 12:/mnt/hgfs/boot/booter/source/ddma2.c **** DDMA_CHANNEL *ptr; // Pointer to physical channel 13:/mnt/hgfs/boot/booter/source/ddma2.c **** int avail; // Available? 14:/mnt/hgfs/boot/booter/source/ddma2.c **** int descriptor_lock; // Lock for our descriptor resource 15:/mnt/hgfs/boot/booter/source/ddma2.c **** DDMA_DESCRIPTOR *d_head,*d_tail; // Descriptor head/tail ptrs 16:/mnt/hgfs/boot/booter/source/ddma2.c **** unsigned long cache_bits; // Used to store the descriptor's cache bits 17:/mnt/hgfs/boot/booter/source/ddma2.c **** DDMA_CALLBACK callback; // User's Callback routine 18:/mnt/hgfs/boot/booter/source/ddma2.c **** unsigned int callback_arg; // User's callback argument 19:/mnt/hgfs/boot/booter/source/ddma2.c **** unsigned int status; // Status pointer 20:/mnt/hgfs/boot/booter/source/ddma2.c **** unsigned long int_cnt; // Interrupt count for stats only 21:/mnt/hgfs/boot/booter/source/ddma2.c **** unsigned long rx_cnt,tx_cnt; // More statsGAS LISTING /tmp/ccSUImwK.s page 2 22:/mnt/hgfs/boot/booter/source/ddma2.c **** } CHANNEL; 23:/mnt/hgfs/boot/booter/source/ddma2.c **** 24:/mnt/hgfs/boot/booter/source/ddma2.c **** typedef struct 25:/mnt/hgfs/boot/booter/source/ddma2.c **** { 26:/mnt/hgfs/boot/booter/source/ddma2.c **** void* src; 27:/mnt/hgfs/boot/booter/source/ddma2.c **** void* dst; 28:/mnt/hgfs/boot/booter/source/ddma2.c **** int len; 29:/mnt/hgfs/boot/booter/source/ddma2.c **** } DDMA_XFER; 30:/mnt/hgfs/boot/booter/source/ddma2.c **** 31:/mnt/hgfs/boot/booter/source/ddma2.c **** /********************************************************************** 32:/mnt/hgfs/boot/booter/source/ddma2.c **** GLOBALS 33:/mnt/hgfs/boot/booter/source/ddma2.c **** **********************************************************************/ 34:/mnt/hgfs/boot/booter/source/ddma2.c **** AU1X00_DDMA *ddma = NULL; 35:/mnt/hgfs/boot/booter/source/ddma2.c **** CHANNEL channels[DDMA_NUM_CHANNELS]; 36:/mnt/hgfs/boot/booter/source/ddma2.c **** 37:/mnt/hgfs/boot/booter/source/ddma2.c **** 38:/mnt/hgfs/boot/booter/source/ddma2.c **** /********************************************************************** 39:/mnt/hgfs/boot/booter/source/ddma2.c **** Function Prototypes 40:/mnt/hgfs/boot/booter/source/ddma2.c **** **********************************************************************/ 41:/mnt/hgfs/boot/booter/source/ddma2.c **** 42:/mnt/hgfs/boot/booter/source/ddma2.c **** /* 43:/mnt/hgfs/boot/booter/source/ddma2.c **** * Function : ddma_get_channel 44:/mnt/hgfs/boot/booter/source/ddma2.c **** * 45:/mnt/hgfs/boot/booter/source/ddma2.c **** * This function allocates a channel for a specific device, sets the default 46:/mnt/hgfs/boot/booter/source/ddma2.c **** * transfer size, allocates 'n' descriptors and sets the channels descriptor 47:/mnt/hgfs/boot/booter/source/ddma2.c **** * pointer to the beginning of the ring. 48:/mnt/hgfs/boot/booter/source/ddma2.c **** * 49:/mnt/hgfs/boot/booter/source/ddma2.c **** * Channels are allocated High Number to Low Numeber. I.e. 15,14,13 etc. This 50:/mnt/hgfs/boot/booter/source/ddma2.c **** * assumes lower channel numbers have higher priority when priority is enabled. 51:/mnt/hgfs/boot/booter/source/ddma2.c **** * 52:/mnt/hgfs/boot/booter/source/ddma2.c **** * Parameters : 53:/mnt/hgfs/boot/booter/source/ddma2.c **** * cnt: Number of descriptors to allocate 54:/mnt/hgfs/boot/booter/source/ddma2.c **** * 55:/mnt/hgfs/boot/booter/source/ddma2.c **** * Returns : 56:/mnt/hgfs/boot/booter/source/ddma2.c **** * Non-NULL Pointer to the newly allocated channel 57:/mnt/hgfs/boot/booter/source/ddma2.c **** * NULL Failure to allocate channel 58:/mnt/hgfs/boot/booter/source/ddma2.c **** * 59:/mnt/hgfs/boot/booter/source/ddma2.c **** */ 60:/mnt/hgfs/boot/booter/source/ddma2.c **** 61:/mnt/hgfs/boot/booter/source/ddma2.c **** CHANNEL_ID ddma2_get_next_channel(void) 62:/mnt/hgfs/boot/booter/source/ddma2.c **** { 32 .loc 1 62 0 33 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 34 .mask 0x00000000,0 35 .fmask 0x00000000,0 36 .set noreorder 37 .set nomacro 38 39 0000 0000023C lui $2,%hi(channels) 40 0004 00004224 addiu $2,$2,%lo(channels) 41 0008 D4024324 addiu $3,$2,724 63:/mnt/hgfs/boot/booter/source/ddma2.c **** int i; 64:/mnt/hgfs/boot/booter/source/ddma2.c **** for(i = DDMA_NUM_CHANNELS - 1; i >= 0; --i) 42 .loc 1 64 0 43 000c 0F000424 li $4,15 # 0xf 44 0010 01000524 li $5,1 # 0x1 45 $L6:GAS LISTING /tmp/ccSUImwK.s page 3 65:/mnt/hgfs/boot/booter/source/ddma2.c **** { 66:/mnt/hgfs/boot/booter/source/ddma2.c **** if (TRUE == channels[i].avail) 46 .loc 1 66 0 47 0014 0000628C lw $2,0($3) 48 0018 06004510 beq $2,$5,$L10 49 001c D0FF6324 addiu $3,$3,-48 50 51 .loc 1 64 0 52 0020 FFFF8424 addiu $4,$4,-1 53 0024 FBFF8104 bgez $4,$L6 54 0028 FFFF0224 li $2,-1 # 0xffffffffffffffff 55 67:/mnt/hgfs/boot/booter/source/ddma2.c **** return i; 68:/mnt/hgfs/boot/booter/source/ddma2.c **** } 69:/mnt/hgfs/boot/booter/source/ddma2.c **** 70:/mnt/hgfs/boot/booter/source/ddma2.c **** return CHANNEL_INVALID; 71:/mnt/hgfs/boot/booter/source/ddma2.c **** } 56 .loc 1 71 0 57 002c 0800E003 j $31 58 0030 00000000 nop 59 60 $L10: 61 .loc 1 67 0 62 0034 0800E003 j $31 63 0038 21108000 move $2,$4 64 65 .set macro 66 .set reorder 67 $LFE5: 68 .end ddma2_get_next_channel 69 .align 2 70 .globl ddma2_get_descriptor_pointer 71 .ent ddma2_get_descriptor_pointer 72 .type ddma2_get_descriptor_pointer, @function 73 ddma2_get_descriptor_pointer: 74 $LFB6: 72:/mnt/hgfs/boot/booter/source/ddma2.c **** 73:/mnt/hgfs/boot/booter/source/ddma2.c **** uint32 ddma2_get_descriptor_pointer(CHANNEL_ID id) 74:/mnt/hgfs/boot/booter/source/ddma2.c **** { 75 .loc 1 74 0 76 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 77 .mask 0x00000000,0 78 .fmask 0x00000000,0 79 .set noreorder 80 .set nomacro 81 75:/mnt/hgfs/boot/booter/source/ddma2.c **** return channels[id].ptr->des_ptr; 82 .loc 1 75 0 83 003c 40100400 sll $2,$4,1 84 0040 21104400 addu $2,$2,$4 85 0044 0000033C lui $3,%hi(channels) 86 0048 00006324 addiu $3,$3,%lo(channels) 87 004c 00110200 sll $2,$2,4 88 0050 21104300 addu $2,$2,$3 89 0054 0000448C lw $4,0($2) 90 0058 0400828C lw $2,4($4) 76:/mnt/hgfs/boot/booter/source/ddma2.c **** }GAS LISTING /tmp/ccSUImwK.s page 4 91 .loc 1 76 0 92 005c 0800E003 j $31 93 0060 00000000 nop 94 95 .set macro 96 .set reorder 97 $LFE6: 98 .end ddma2_get_descriptor_pointer 99 .align 2 100 .globl ddma2_enable_channel 101 .ent ddma2_enable_channel 102 .type ddma2_enable_channel, @function 103 ddma2_enable_channel: 104 $LFB7: 77:/mnt/hgfs/boot/booter/source/ddma2.c **** 78:/mnt/hgfs/boot/booter/source/ddma2.c **** void ddma2_enable_channel(CHANNEL_ID id) 79:/mnt/hgfs/boot/booter/source/ddma2.c **** { 105 .loc 1 79 0 106 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 107 .mask 0x00000000,0 108 .fmask 0x00000000,0 109 .set noreorder 110 .set nomacro 111 80:/mnt/hgfs/boot/booter/source/ddma2.c **** ddma->inten |= (1 << id); //Enable DDMA interrupt for this channel 112 .loc 1 80 0 113 0064 0000023C lui $2,%hi(ddma) 114 0068 0000478C lw $7,%lo(ddma)($2) 81:/mnt/hgfs/boot/booter/source/ddma2.c **** channels[id].ptr->cfg |= DDMA_CHANCFG_EN; 115 .loc 1 81 0 116 006c 40180400 sll $3,$4,1 117 0070 21186400 addu $3,$3,$4 118 0074 0000023C lui $2,%hi(channels) 119 .loc 1 80 0 120 0078 0C10E58C lw $5,4108($7) 121 .loc 1 81 0 122 007c 00004224 addiu $2,$2,%lo(channels) 123 0080 00190300 sll $3,$3,4 124 0084 21186200 addu $3,$3,$2 125 .loc 1 80 0 126 0088 01000224 li $2,1 # 0x1 127 .loc 1 81 0 128 008c 0000668C lw $6,0($3) 129 .loc 1 80 0 130 0090 04108200 sll $2,$2,$4 131 0094 2528A200 or $5,$5,$2 132 0098 0C10E5AC sw $5,4108($7) 133 .loc 1 81 0 134 009c 0000C28C lw $2,0($6) 135 $LBB2: 136 $LBB3: 137 .loc 1 6 0 138 00a0 FFFF0324 li $3,-1 # 0xffffffffffffffff 139 $LBE3: 140 $LBE2: 141 .loc 1 81 0 142 00a4 01004234 ori $2,$2,0x1GAS LISTING /tmp/ccSUImwK.s page 5 143 00a8 0000C2AC sw $2,0($6) 144 $LBB4: 145 $LBB5: 146 .loc 1 6 0 147 00ac 0C00C3AC sw $3,12($6) 148 $LBE5: 149 $LBE4: 150 00b0 0800E003 j $31 151 00b4 00000000 nop 152 153 .set macro 154 .set reorder 155 $LFE7: 156 .end ddma2_enable_channel 157 .align 2 158 .globl ddma2_disable_channel 159 .ent ddma2_disable_channel 160 .type ddma2_disable_channel, @function 161 ddma2_disable_channel: 162 $LFB8: 82:/mnt/hgfs/boot/booter/source/ddma2.c **** au1550_ddma_doorbell( channels[id].ptr ); 83:/mnt/hgfs/boot/booter/source/ddma2.c **** } 84:/mnt/hgfs/boot/booter/source/ddma2.c **** 85:/mnt/hgfs/boot/booter/source/ddma2.c **** void ddma2_disable_channel(CHANNEL_ID id) 86:/mnt/hgfs/boot/booter/source/ddma2.c **** { 163 .loc 1 86 0 164 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 165 .mask 0x00000000,0 166 .fmask 0x00000000,0 167 .set noreorder 168 .set nomacro 169 87:/mnt/hgfs/boot/booter/source/ddma2.c **** // ddma->inten &= ~(1 << id); //Disable DDMA interrupt for this channel 88:/mnt/hgfs/boot/booter/source/ddma2.c **** channels[id].ptr->cfg &= ~DDMA_CHANCFG_EN; 170 .loc 1 88 0 171 00b8 40100400 sll $2,$4,1 172 00bc 21104400 addu $2,$2,$4 173 00c0 0000033C lui $3,%hi(channels) 174 00c4 00006324 addiu $3,$3,%lo(channels) 175 00c8 00110200 sll $2,$2,4 176 00cc 21104300 addu $2,$2,$3 177 00d0 0000448C lw $4,0($2) 178 00d4 FEFF0224 li $2,-2 # 0xfffffffffffffffe 179 00d8 0000838C lw $3,0($4) 180 00dc 24186200 and $3,$3,$2 181 00e0 000083AC sw $3,0($4) 182 00e4 0800E003 j $31 183 00e8 00000000 nop 184 185 .set macro 186 .set reorder 187 $LFE8: 188 .end ddma2_disable_channel 189 .align 2 190 .globl ddma2_request_channel 191 .ent ddma2_request_channel 192 .type ddma2_request_channel, @functionGAS LISTING /tmp/ccSUImwK.s page 6 193 ddma2_request_channel: 194 $LFB9: 89:/mnt/hgfs/boot/booter/source/ddma2.c **** // channels[id].ptr->des_ptr = 0; 90:/mnt/hgfs/boot/booter/source/ddma2.c **** } 91:/mnt/hgfs/boot/booter/source/ddma2.c **** 92:/mnt/hgfs/boot/booter/source/ddma2.c **** CHANNEL_ID ddma2_request_channel(DDMA_CALLBACK callback, unsigned int callback_arg)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -