⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ddma.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 150 00bc 40190300 		sll	$3,$3,5 151 00c0 24104700 		and	$2,$2,$7 152 00c4 25104300 		or	$2,$2,$3 153 00c8 1C0002AE 		sw	$2,28($16) 154              	$L9: 155 00cc 1C00038E 		lw	$3,28($16) 156 00d0 F4FF6414 		bne	$3,$4,$L16 157 00d4 00000000 		nop 158              	 159              	$L10: 114:/mnt/hgfs/boot/booter/source/ddma.c **** 			}  115:/mnt/hgfs/boot/booter/source/ddma.c ****  116:/mnt/hgfs/boot/booter/source/ddma.c **** 			// Call user's callback routine 117:/mnt/hgfs/boot/booter/source/ddma.c **** 			if ( NULL != channels[i].callback ) 160              		.loc 1 117 0 161 00d8 2400028E 		lw	$2,36($16) 162 00dc 18004014 		bne	$2,$0,$L17 163 00e0 00000000 		nop 164              	GAS LISTING /tmp/ccEQxguf.s 			page 6 118:/mnt/hgfs/boot/booter/source/ddma.c **** 				channels[i].callback( (void*)&channels[i], first, completed, channels[i].arg ); 119:/mnt/hgfs/boot/booter/source/ddma.c ****  120:/mnt/hgfs/boot/booter/source/ddma.c **** 			// clear interrupt bits 121:/mnt/hgfs/boot/booter/source/ddma.c **** 			ddma->intstat &= ddma->intstat-1; 165              		.loc 1 121 0 166 00e4 0000448E 		lw	$4,%lo(ddma)($18) 167              	$L18: 122:/mnt/hgfs/boot/booter/source/ddma.c **** 			channels[i].ptr->irq = 0; 168              		.loc 1 122 0 169 00e8 0000058E 		lw	$5,0($16) 170              		.loc 1 121 0 171 00ec 0410828C 		lw	$2,4100($4) 172 00f0 0410838C 		lw	$3,4100($4) 173 00f4 FFFF4224 		addiu	$2,$2,-1 174 00f8 24186200 		and	$3,$3,$2 175 00fc 041083AC 		sw	$3,4100($4) 176              		.loc 1 122 0 177 0100 1000A0AC 		sw	$0,16($5) 178              	$L7: 179              	$LBE2: 180              		.loc 1 86 0 181 0104 01003126 		addiu	$17,$17,1 182 0108 1000222A 		slt	$2,$17,16 183 010c 05004010 		beq	$2,$0,$L6 184 0110 2C001026 		addiu	$16,$16,44 185              	 186 0114 0000438E 		lw	$3,%lo(ddma)($18) 187 0118 0410628C 		lw	$2,4100($3) 188 011c D7FF4014 		bne	$2,$0,$L13 189 0120 00000000 		nop 190              	 191              	$L6: 192 0124 2000BF8F 		lw	$31,32($sp) 193 0128 1C00B38F 		lw	$19,28($sp) 194 012c 1800B28F 		lw	$18,24($sp) 195 0130 1400B18F 		lw	$17,20($sp) 196 0134 1000B08F 		lw	$16,16($sp) 197 0138 0800E003 		j	$31 198 013c 2800BD27 		addiu	$sp,$sp,40 199              	 200              	$L17: 201              	$LBB3: 202              		.loc 1 118 0 203 0140 2800078E 		lw	$7,40($16) 204 0144 09F84000 		jal	$2 205 0148 21200002 		move	$4,$16 206              	 207              		.loc 1 121 0 208 014c 3A000008 		j	$L18 209 0150 0000448E 		lw	$4,%lo(ddma)($18) 210              	 211              	$LBE3: 212              		.set	macro 213              		.set	reorder 214              	$LFE5: 215              		.end	ddma_intr_handler 216              		.align	2GAS LISTING /tmp/ccEQxguf.s 			page 7 217              		.globl	ddma_init 218              		.ent	ddma_init 219              		.type	ddma_init, @function 220              	ddma_init: 221              	$LFB6: 123:/mnt/hgfs/boot/booter/source/ddma.c **** 			 124:/mnt/hgfs/boot/booter/source/ddma.c **** 		} 125:/mnt/hgfs/boot/booter/source/ddma.c **** 	} 126:/mnt/hgfs/boot/booter/source/ddma.c **** } 127:/mnt/hgfs/boot/booter/source/ddma.c ****  128:/mnt/hgfs/boot/booter/source/ddma.c ****  129:/mnt/hgfs/boot/booter/source/ddma.c **** /* 130:/mnt/hgfs/boot/booter/source/ddma.c ****  *   Function   :   ddma_init 131:/mnt/hgfs/boot/booter/source/ddma.c ****  * 132:/mnt/hgfs/boot/booter/source/ddma.c ****  *      This function is responsible for pointing the "ddma" structure to  133:/mnt/hgfs/boot/booter/source/ddma.c ****  *      correct physical memory location. It also initialized the channels 134:/mnt/hgfs/boot/booter/source/ddma.c ****  *      to known values. 135:/mnt/hgfs/boot/booter/source/ddma.c ****  * 136:/mnt/hgfs/boot/booter/source/ddma.c ****  *   Parameters : 137:/mnt/hgfs/boot/booter/source/ddma.c ****  *      config		User specified configuration of the channel 138:/mnt/hgfs/boot/booter/source/ddma.c ****  * 139:/mnt/hgfs/boot/booter/source/ddma.c ****  *     Returns : 140:/mnt/hgfs/boot/booter/source/ddma.c ****  *      TRUE		On Success 141:/mnt/hgfs/boot/booter/source/ddma.c ****  *		FALSE		On Failure 142:/mnt/hgfs/boot/booter/source/ddma.c ****  * 143:/mnt/hgfs/boot/booter/source/ddma.c ****  */ 144:/mnt/hgfs/boot/booter/source/ddma.c **** int			ddma_init( uint32 config ) 145:/mnt/hgfs/boot/booter/source/ddma.c **** { 222              		.loc 1 145 0 223              		.frame	$sp,32,$31		# vars= 0, regs= 4/0, args= 16, gp= 0 224              		.mask	0x80070000,-4 225              		.fmask	0x00000000,0 226              		.set	noreorder 227              		.set	nomacro 228              		 229 0154 E0FFBD27 		addiu	$sp,$sp,-32 230              	$LCFI6: 231 0158 1800B2AF 		sw	$18,24($sp) 232              	$LCFI7: 233 015c 21908000 		move	$18,$4 146:/mnt/hgfs/boot/booter/source/ddma.c **** 	int i; 147:/mnt/hgfs/boot/booter/source/ddma.c ****  148:/mnt/hgfs/boot/booter/source/ddma.c **** 	/* 149:/mnt/hgfs/boot/booter/source/ddma.c **** 	 *	Point our ddma structure to correct  150:/mnt/hgfs/boot/booter/source/ddma.c **** 	 *	memory location 151:/mnt/hgfs/boot/booter/source/ddma.c **** 	 */ 152:/mnt/hgfs/boot/booter/source/ddma.c **** 	ddma = (AU1X00_DDMA*)mapPhysicalAddress(DDMA_PHYS_ADDR, sizeof(AU1X00_DDMA), 0); 234              		.loc 1 152 0 235 0160 0014043C 		li	$4,335544320			# 0x14000000 236 0164 21380000 		move	$7,$0 237              		.loc 1 145 0 238 0168 1400B1AF 		sw	$17,20($sp) 239              	$LCFI8: 240              		.loc 1 152 0 241 016c 10100624 		li	$6,4112			# 0x1010 242 0170 00208434 		ori	$4,$4,0x2000 243 0174 21280000 		move	$5,$0GAS LISTING /tmp/ccEQxguf.s 			page 8 153:/mnt/hgfs/boot/booter/source/ddma.c ****  154:/mnt/hgfs/boot/booter/source/ddma.c **** 	/* 155:/mnt/hgfs/boot/booter/source/ddma.c **** 	 *	Initialize the local channel status to 0s 156:/mnt/hgfs/boot/booter/source/ddma.c **** 	 */ 157:/mnt/hgfs/boot/booter/source/ddma.c **** 	memset((void*)channels,0,sizeof(channels)); 244              		.loc 1 157 0 245 0178 0000113C 		lui	$17,%hi(channels) 246              		.loc 1 145 0 247 017c 1C00BFAF 		sw	$31,28($sp) 248              	$LCFI9: 249              		.loc 1 145 0 250              	$LCFI10: 251              		.loc 1 152 0 252 0180 0000000C 		jal	mapPhysicalAddress 253 0184 1000B0AF 		sw	$16,16($sp) 254              	 255 0188 0000103C 		lui	$16,%hi(ddma) 256              		.loc 1 157 0 257 018c 04002426 		addiu	$4,$17,%lo(channels) 258 0190 21280000 		move	$5,$0 259 0194 C0020624 		li	$6,704			# 0x2c0 260              		.loc 1 152 0 261              		.loc 1 157 0 262 0198 0000000C 		jal	memset 263 019c 000002AE 		sw	$2,%lo(ddma)($16) 264              	 265 01a0 0000078E 		lw	$7,%lo(ddma)($16) 266 01a4 01000624 		li	$6,1			# 0x1 267 01a8 FFFF0524 		li	$5,-1			# 0xffffffffffffffff 268 01ac 2118E000 		move	$3,$7 269 01b0 04002226 		addiu	$2,$17,%lo(channels) 270 01b4 0F000424 		li	$4,15			# 0xf 271              	$L23: 158:/mnt/hgfs/boot/booter/source/ddma.c ****  159:/mnt/hgfs/boot/booter/source/ddma.c **** 	for( i=0; i<DDMA_NUM_CHANNELS; i++ ) 272              		.loc 1 159 0 273 01b8 FFFF8424 		addiu	$4,$4,-1 160:/mnt/hgfs/boot/booter/source/ddma.c **** 	{ 161:/mnt/hgfs/boot/booter/source/ddma.c **** 		channels[i].ptr = &ddma->channel[i]; 274              		.loc 1 161 0 275 01bc 000043AC 		sw	$3,0($2) 162:/mnt/hgfs/boot/booter/source/ddma.c **** 		channels[i].avail = TRUE; 276              		.loc 1 162 0 277 01c0 040046AC 		sw	$6,4($2) 163:/mnt/hgfs/boot/booter/source/ddma.c **** 		channels[i].src_id = channels[i].dst_id = 0xFFFFFFFF; 278              		.loc 1 163 0 279 01c4 0C0045AC 		sw	$5,12($2) 280 01c8 080045AC 		sw	$5,8($2) 281 01cc 00016324 		addiu	$3,$3,256 282 01d0 F9FF8104 		bgez	$4,$L23 283 01d4 2C004224 		addiu	$2,$2,44 284              	 164:/mnt/hgfs/boot/booter/source/ddma.c **** 	} 165:/mnt/hgfs/boot/booter/source/ddma.c ****  166:/mnt/hgfs/boot/booter/source/ddma.c **** 	/* Let the user specify the ddma config settings */ 167:/mnt/hgfs/boot/booter/source/ddma.c **** 	ddma->config = config; 168:/mnt/hgfs/boot/booter/source/ddma.c **** GAS LISTING /tmp/ccEQxguf.s 			page 9 169:/mnt/hgfs/boot/booter/source/ddma.c **** 	/* Disable all channel interrupts */ 170:/mnt/hgfs/boot/booter/source/ddma.c **** 	ddma->inten = 0; 171:/mnt/hgfs/boot/booter/source/ddma.c **** 	 172:/mnt/hgfs/boot/booter/source/ddma.c **** 	/* Install the generic DDMA interrupt handler */ 173:/mnt/hgfs/boot/booter/source/ddma.c **** 	cpuIrqEnable( IRQ_DDMA, INT_HIGH_LEVEL, ddma_intr_handler, channels ); 285              		.loc 1 173 0 286 01d8 0000063C 		lui	$6,%hi(ddma_intr_handler) 287              		.loc 1 167 0 288 01dc 0010F2AC 		sw	$18,4096($7) 289              		.loc 1 173 0 290 01e0 4800C624 		addiu	$6,$6,%lo(ddma_intr_handler) 291              		.loc 1 170 0 292 01e4 0C10E0AC 		sw	$0,4108($7) 293              		.loc 1 173 0 294 01e8 0B000424 		li	$4,11			# 0xb 295 01ec 04002726 		addiu	$7,$17,%lo(channels) 296 01f0 0000000C 		jal	cpuIrqEnable 297 01f4 01000524 		li	$5,1			# 0x1 298              	 174:/mnt/hgfs/boot/booter/source/ddma.c ****  175:/mnt/hgfs/boot/booter/source/ddma.c **** 	return TRUE; 176:/mnt/hgfs/boot/booter/source/ddma.c **** } 299              		.loc 1 176 0 300 01f8 1C00BF8F 		lw	$31,28($sp) 301 01fc 1800B28F 		lw	$18,24($sp) 302 0200 1400B18F 		lw	$17,20($sp) 303 0204 1000B08F 		lw	$16,16($sp) 304 0208 01000224 		li	$2,1			# 0x1 305 020c 0800E003 		j	$31 306 0210 2000BD27 		addiu	$sp,$sp,32 307              	 308              		.set	macro 309              		.set	reorder 310              	$LFE6: 311              		.end	ddma_init 312              		.align	2 313              		.globl	ddma_get_channel 314              		.ent	ddma_get_channel 315              		.type	ddma_get_channel, @function 316              	ddma_get_channel: 317              	$LFB7: 177:/mnt/hgfs/boot/booter/source/ddma.c ****  178:/mnt/hgfs/boot/booter/source/ddma.c ****  179:/mnt/hgfs/boot/booter/source/ddma.c **** /* 180:/mnt/hgfs/boot/booter/source/ddma.c ****  *   Function   :   ddma_get_channel 181:/mnt/hgfs/boot/booter/source/ddma.c ****  * 182:/mnt/hgfs/boot/booter/source/ddma.c ****  *      This function allocates a channel for a specific device, sets the default 183:/mnt/hgfs/boot/booter/source/ddma.c ****  *		transfer size, allocates 'n' descriptors and sets the channels descriptor 184:/mnt/hgfs/boot/booter/source/ddma.c ****  *		pointer to the beginning of the ring. 185:/mnt/hgfs/boot/booter/source/ddma.c ****  * 186:/mnt/hgfs/boot/booter/source/ddma.c ****  *		Channels are allocated High Number to Low Numeber. I.e. 15,14,13 etc. This 187:/mnt/hgfs/boot/booter/source/ddma.c ****  *		assumes lower channel numbers have higher priority when priority is enabled. 188:/mnt/hgfs/boot/booter/source/ddma.c ****  * 189:/mnt/hgfs/boot/booter/source/ddma.c ****  *   Parameters : 190:/mnt/hgfs/boot/booter/source/ddma.c ****  *      config		Pointer to the CHANNEL_CONFIG structure 191:/mnt/hgfs/boot/booter/source/ddma.c ****  * 192:/mnt/hgfs/boot/booter/source/ddma.c ****  *     Returns :GAS LISTING /tmp/ccEQxguf.s 			page 10 193:/mnt/hgfs/boot/booter/source/ddma.c ****  *      Non-NULL	Pointer to the newly allocated channel 194:/mnt/hgfs/boot/booter/source/ddma.c ****  *		NULL		Failure to allocate channel 195:/mnt/hgfs/boot/booter/source/ddma.c ****  * 196:/mnt/hgfs/boot/booter/source/ddma.c ****  */ 197:/mnt/hgfs/boot/booter/source/ddma.c **** void * 	ddma_get_channel( CHANNEL_CONFIG *config ) 198:/mnt/hgfs/boot/booter/source/ddma.c **** { 318              		.loc 1 198 0 319              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 320              		.mask	0x00000000,0 321              		.fmask	0x00000000,0 322              		.set	noreorder 323              		.set	nomacro 324              		 199:/mnt/hgfs/boot/booter/source/ddma.c **** 	CHANNEL 		*chan = NULL; 200:/mnt/hgfs/boot/booter/source/ddma.c **** 	DDMA_DESCRIPTOR	*desc_ring = NULL; 201:/mnt/hgfs/boot/booter/source/ddma.c **** 	int				i; 202:/mnt/hgfs/boot/booter/source/ddma.c ****  203:/mnt/hgfs/boot/booter/source/ddma.c **** 	/*  204:/mnt/hgfs/boot/booter/source/ddma.c **** 	 *	Find a channel to use -- if the user specified a channel 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -