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

📄 nor.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 3 页
字号:
GAS LISTING /tmp/cczGDKqI.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 CC000000 		.text   9      02006B00    9      00000101    9      FB0E0A00    9      01010101   10              	$Ltext0:  11              		.align	2  12              		.globl	nor_erase  13              		.ent	nor_erase  14              		.type	nor_erase, @function  15              	nor_erase:  16              	$LFB2:  17              		.file 1 "/mnt/hgfs/boot/booter/source/nor.c"   1:/mnt/hgfs/boot/booter/source/nor.c ****    2:/mnt/hgfs/boot/booter/source/nor.c **** #include "example.h"   3:/mnt/hgfs/boot/booter/source/nor.c **** #include "nor.h"   4:/mnt/hgfs/boot/booter/source/nor.c ****    5:/mnt/hgfs/boot/booter/source/nor.c **** #define POLLING_MASK	0x0080   6:/mnt/hgfs/boot/booter/source/nor.c **** #define TIMING_LIMIT_MASK	0x0020   7:/mnt/hgfs/boot/booter/source/nor.c ****    8:/mnt/hgfs/boot/booter/source/nor.c **** #define ERASE_DATA		0xffff   9:/mnt/hgfs/boot/booter/source/nor.c ****   10:/mnt/hgfs/boot/booter/source/nor.c **** int ramcode_nor_waitready(void *address, short data) __attribute__ ((section (".ramcode")));  11:/mnt/hgfs/boot/booter/source/nor.c **** int ramcode_nor_erase(void *address) __attribute__ ((section (".ramcode")));  12:/mnt/hgfs/boot/booter/source/nor.c **** int ramcode_nor_program(void *source, int size, void *address) __attribute__ ((section (".ramcode")  13:/mnt/hgfs/boot/booter/source/nor.c ****   14:/mnt/hgfs/boot/booter/source/nor.c **** int nor_erase(void *address)  15:/mnt/hgfs/boot/booter/source/nor.c **** {  18              		.loc 1 15 0  19              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0  20              		.mask	0x00000000,0  21              		.fmask	0x00000000,0  16:/mnt/hgfs/boot/booter/source/nor.c **** 	register unsigned int program = (unsigned int)(&ramcode_nor_erase);  22              		.loc 1 16 0  23 0000 0000023C 		lui	$2,%hi(ramcode_nor_erase)  24 0004 00004224 		addiu	$2,$2,%lo(ramcode_nor_erase)  17:/mnt/hgfs/boot/booter/source/nor.c ****   18:/mnt/hgfs/boot/booter/source/nor.c **** 	asm("jr    %0" : : "r"(program));  25              		.loc 1 18 0  26              	#APP  27 0008 08004000 		jr    $2  27      00000000   19:/mnt/hgfs/boot/booter/source/nor.c **** 	return 0;  20:/mnt/hgfs/boot/booter/source/nor.c **** }  28              		.loc 1 20 0  29              	#NO_APP  30              		.set	noreorder  31              		.set	nomacro  32 0010 0800E003 		j	$31GAS LISTING /tmp/cczGDKqI.s 			page 2  33 0014 21100000 		move	$2,$0  34              		.set	macro  35              		.set	reorder  36              	  37              	$LFE2:  38              		.end	nor_erase  39              		.align	2  40              		.globl	nor_program  41              		.ent	nor_program  42              		.type	nor_program, @function  43              	nor_program:  44              	$LFB3:  21:/mnt/hgfs/boot/booter/source/nor.c ****   22:/mnt/hgfs/boot/booter/source/nor.c **** int nor_program(void *source, int size, void *address)  23:/mnt/hgfs/boot/booter/source/nor.c **** {  45              		.loc 1 23 0  46              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0  47              		.mask	0x00000000,0  48              		.fmask	0x00000000,0  24:/mnt/hgfs/boot/booter/source/nor.c **** 	register unsigned int program = (unsigned int)(&ramcode_nor_program);  49              		.loc 1 24 0  50 0018 0000023C 		lui	$2,%hi(ramcode_nor_program)  51 001c 00004224 		addiu	$2,$2,%lo(ramcode_nor_program)  25:/mnt/hgfs/boot/booter/source/nor.c ****   26:/mnt/hgfs/boot/booter/source/nor.c **** 	asm("jr    %0" : : "r"(program));  52              		.loc 1 26 0  53              	#APP  54 0020 08004000 		jr    $2  54      00000000   27:/mnt/hgfs/boot/booter/source/nor.c **** 	return 0;  28:/mnt/hgfs/boot/booter/source/nor.c **** }  55              		.loc 1 28 0  56              	#NO_APP  57              		.set	noreorder  58              		.set	nomacro  59 0028 0800E003 		j	$31  60 002c 21100000 		move	$2,$0  61              		.set	macro  62              		.set	reorder  63              	  64              	$LFE3:  65              		.end	nor_program  66              		.section	.ramcode,"ax",@progbits  67              		.align	2  68              		.globl	ramcode_nor_waitready  69              		.ent	ramcode_nor_waitready  70              		.type	ramcode_nor_waitready, @function  71              	ramcode_nor_waitready:  72              	$LFB4:  29:/mnt/hgfs/boot/booter/source/nor.c ****   30:/mnt/hgfs/boot/booter/source/nor.c **** int ramcode_nor_waitready(void *address, short data)  31:/mnt/hgfs/boot/booter/source/nor.c **** {  73              		.loc 1 31 0  74              		.frame	$sp,8,$31		# vars= 8, regs= 0/0, args= 0, gp= 0  75              		.mask	0x00000000,0  76              		.fmask	0x00000000,0  77              		.set	noreorderGAS LISTING /tmp/cczGDKqI.s 			page 3  78              		.set	nomacro  79              		  80 0000 F8FFBD27 		addiu	$sp,$sp,-8  81              	$LCFI0:  82 0004 8000A530 		andi	$5,$5,0x80  83              	$L4:  32:/mnt/hgfs/boot/booter/source/nor.c **** 	volatile short temp, *pf;  33:/mnt/hgfs/boot/booter/source/nor.c ****   34:/mnt/hgfs/boot/booter/source/nor.c **** 	pf = (volatile short *)address;  35:/mnt/hgfs/boot/booter/source/nor.c ****   36:/mnt/hgfs/boot/booter/source/nor.c **** 	while(1)  37:/mnt/hgfs/boot/booter/source/nor.c **** 	{  38:/mnt/hgfs/boot/booter/source/nor.c **** 		temp = *pf;  84              		.loc 1 38 0  85 0008 00008394 		lhu	$3,0($4)  86 000c 0000A3A7 		sh	$3,0($sp)  39:/mnt/hgfs/boot/booter/source/nor.c **** 		if ((temp & POLLING_MASK) == (data & POLLING_MASK))  87              		.loc 1 39 0  88 0010 0000A297 		lhu	$2,0($sp)  89 0014 80004230 		andi	$2,$2,0x80  40:/mnt/hgfs/boot/booter/source/nor.c **** 			return 1;  90              		.loc 1 40 0  91              		.loc 1 39 0  92 0018 0D004510 		beq	$2,$5,$L11  93 001c 01000224 		li	$2,1			# 0x1  94              	  41:/mnt/hgfs/boot/booter/source/nor.c **** 		if (temp & TIMING_LIMIT_MASK)  95              		.loc 1 41 0  96 0020 0000A297 		lhu	$2,0($sp)  97 0024 20004230 		andi	$2,$2,0x20  98 0028 F7FF4010 		beq	$2,$0,$L4  99 002c 00000000 		nop 100              	  42:/mnt/hgfs/boot/booter/source/nor.c **** 		{  43:/mnt/hgfs/boot/booter/source/nor.c **** 			temp = *pf; 101              		.loc 1 43 0 102 0030 00008394 		lhu	$3,0($4) 103 0034 0000A3A7 		sh	$3,0($sp)  44:/mnt/hgfs/boot/booter/source/nor.c **** 			if ((temp & POLLING_MASK) == (data & POLLING_MASK)) 104              		.loc 1 44 0 105 0038 0000A297 		lhu	$2,0($sp) 106 003c 80004230 		andi	$2,$2,0x80  45:/mnt/hgfs/boot/booter/source/nor.c **** 				return 1; 107              		.loc 1 45 0 108 0040 26104500 		xor	$2,$2,$5 109 0044 0100422C 		sltu	$2,$2,1  46:/mnt/hgfs/boot/booter/source/nor.c **** 			else  47:/mnt/hgfs/boot/booter/source/nor.c **** 				return 0;  48:/mnt/hgfs/boot/booter/source/nor.c **** 		}  49:/mnt/hgfs/boot/booter/source/nor.c **** 	}  50:/mnt/hgfs/boot/booter/source/nor.c ****   51:/mnt/hgfs/boot/booter/source/nor.c **** 	return 0;  52:/mnt/hgfs/boot/booter/source/nor.c **** } 110              		.loc 1 52 0 111 0048 0800E003 		j	$31 112 004c 0800BD27 		addiu	$sp,$sp,8 113              	GAS LISTING /tmp/cczGDKqI.s 			page 4 114              	$L11: 115 0050 0800E003 		j	$31 116 0054 0800BD27 		addiu	$sp,$sp,8 117              	 118              		.set	macro 119              		.set	reorder 120              	$LFE4: 121              		.end	ramcode_nor_waitready 122              		.align	2 123              		.globl	ramcode_nor_erase 124              		.ent	ramcode_nor_erase 125              		.type	ramcode_nor_erase, @function 126              	ramcode_nor_erase: 127              	$LFB5:  53:/mnt/hgfs/boot/booter/source/nor.c ****   54:/mnt/hgfs/boot/booter/source/nor.c **** int ramcode_nor_erase(void *address)  55:/mnt/hgfs/boot/booter/source/nor.c **** { 128              		.loc 1 55 0 129              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 130              		.mask	0x00000000,0 131              		.fmask	0x00000000,0 132              		.set	noreorder 133              		.set	nomacro 134              		  56:/mnt/hgfs/boot/booter/source/nor.c **** 	volatile short *pf;  57:/mnt/hgfs/boot/booter/source/nor.c ****   58:/mnt/hgfs/boot/booter/source/nor.c **** 	pf = (volatile short *)KSEG1(NOR_PHYS_ADDR); 135              		.loc 1 58 0 136 0058 00BE033C 		li	$3,-1107296256			# 0xffffffffbe000000  59:/mnt/hgfs/boot/booter/source/nor.c ****   60:/mnt/hgfs/boot/booter/source/nor.c **** 	pf[0x555] = 0x00aa; 137              		.loc 1 60 0 138 005c AA000524 		li	$5,170  61:/mnt/hgfs/boot/booter/source/nor.c **** 	pf[0x2aa] = 0x0055; 139              		.loc 1 61 0 140 0060 55000624 		li	$6,85  62:/mnt/hgfs/boot/booter/source/nor.c **** 	pf[0x555] = 0x0080; 141              		.loc 1 62 0 142 0064 80000224 		li	$2,128 143              		.loc 1 60 0 144 0068 AA0A65A4 		sh	$5,2730($3) 145              		.loc 1 61 0 146 006c 540566A4 		sh	$6,1364($3) 147              		.loc 1 62 0 148 0070 AA0A62A4 		sh	$2,2730($3)  63:/mnt/hgfs/boot/booter/source/nor.c **** 	pf[0x555] = 0x00aa;  64:/mnt/hgfs/boot/booter/source/nor.c **** 	pf[0x2aa] = 0x0055;  65:/mnt/hgfs/boot/booter/source/nor.c **** 	*((volatile short *)address) = 0x0030; 149              		.loc 1 65 0 150 0074 30000224 		li	$2,48 151              		.loc 1 63 0 152 0078 AA0A65A4 		sh	$5,2730($3) 153              		.loc 1 64 0 154 007c 540566A4 		sh	$6,1364($3)  66:/mnt/hgfs/boot/booter/source/nor.c ****   67:/mnt/hgfs/boot/booter/source/nor.c **** 	return ramcode_nor_waitready(address, ERASE_DATA); 155              		.loc 1 67 0GAS LISTING /tmp/cczGDKqI.s 			page 5 156 0080 FFFF0524 		li	$5,-1			# 0xffffffffffffffff 157              		.loc 1 65 0 158 0084 000082A4 		sh	$2,0($4) 159              		.loc 1 67 0 160 0088 00000008 		j	ramcode_nor_waitready 161 008c 00000000 		nop 162              	 163              		.set	macro 164              		.set	reorder 165              	$LFE5: 166              		.end	ramcode_nor_erase 167              		.align	2 168              		.globl	ramcode_nor_program 169              		.ent	ramcode_nor_program 170              		.type	ramcode_nor_program, @function 171              	ramcode_nor_program: 172              	$LFB6:  68:/mnt/hgfs/boot/booter/source/nor.c **** }  69:/mnt/hgfs/boot/booter/source/nor.c ****   70:/mnt/hgfs/boot/booter/source/nor.c **** int ramcode_nor_program(void *source, int size, void *address)  71:/mnt/hgfs/boot/booter/source/nor.c **** { 173              		.loc 1 71 0 174              		.frame	$sp,56,$31		# vars= 0, regs= 10/0, args= 16, gp= 0 175              		.mask	0xc0ff0000,-4 176              		.fmask	0x00000000,0 177              		.set	noreorder 178              		.set	nomacro 179              		 180 0090 C8FFBD27 		addiu	$sp,$sp,-56 181              	$LCFI1: 182 0094 2400B5AF 		sw	$21,36($sp) 183              	$LCFI2: 184 0098 2000B4AF 		sw	$20,32($sp) 185              	$LCFI3: 186 009c 1C00B3AF 		sw	$19,28($sp) 187              	$LCFI4: 188 00a0 1800B2AF 		sw	$18,24($sp) 189              	$LCFI5: 190 00a4 1400B1AF 		sw	$17,20($sp) 191              	$LCFI6: 192 00a8 3400BFAF 		sw	$31,52($sp) 193              	$LCFI7: 194 00ac 3000BEAF 		sw	$fp,48($sp) 195              	$LCFI8: 196 00b0 2C00B7AF 		sw	$23,44($sp) 197              	$LCFI9: 198 00b4 2800B6AF 		sw	$22,40($sp) 199              	$LCFI10: 200 00b8 1000B0AF 		sw	$16,16($sp) 201              	$LCFI11: 202              		.loc 1 71 0 203 00bc 21A8A000 		move	$21,$5  72:/mnt/hgfs/boot/booter/source/nor.c **** 	volatile short *psrc, *pdst, *pf;  73:/mnt/hgfs/boot/booter/source/nor.c **** 	short data;  74:/mnt/hgfs/boot/booter/source/nor.c **** 	int i;  75:/mnt/hgfs/boot/booter/source/nor.c ****   76:/mnt/hgfs/boot/booter/source/nor.c **** 	psrc = (volatile short *)source;GAS LISTING /tmp/cczGDKqI.s 			page 6 204              		.loc 1 76 0 205 00c0 21908000 		move	$18,$4  77:/mnt/hgfs/boot/booter/source/nor.c **** 	pdst = (volatile short *)address; 206              		.loc 1 77 0 207 00c4 2188C000 		move	$17,$6  78:/mnt/hgfs/boot/booter/source/nor.c **** 	pf = (volatile short *)KSEG1(NOR_PHYS_ADDR); 208              		.loc 1 78 0 209 00c8 00BE133C 		li	$19,-1107296256			# 0xffffffffbe000000  79:/mnt/hgfs/boot/booter/source/nor.c ****   80:/mnt/hgfs/boot/booter/source/nor.c **** 	for (i = 0; i < size; i += 2) 210              		.loc 1 80 0 211 00cc 1900A018 		blez	$5,$L21 212 00d0 21A00000 		move	$20,$0 213              	 214 00d4 AA001E24 		li	$fp,170 215 00d8 55001724 		li	$23,85 216 00dc A0001624 		li	$22,160 217              	$L19:  81:/mnt/hgfs/boot/booter/source/nor.c **** 	{  82:/mnt/hgfs/boot/booter/source/nor.c **** 		data = *psrc++; 218              		.loc 1 82 0 219 00e0 00004296 		lhu	$2,0($18)  83:/mnt/hgfs/boot/booter/source/nor.c **** 		pf[0x555] = 0x00aa;  84:/mnt/hgfs/boot/booter/source/nor.c **** 		pf[0x2aa] = 0x0055;  85:/mnt/hgfs/boot/booter/source/nor.c **** 		pf[0x555] = 0x00a0;  86:/mnt/hgfs/boot/booter/source/nor.c **** 		*pdst = data;  87:/mnt/hgfs/boot/booter/source/nor.c ****   88:/mnt/hgfs/boot/booter/source/nor.c **** 		if (!ramcode_nor_waitready((void *)pdst, data)) 220              		.loc 1 88 0 221 00e4 21202002 		move	$4,$17 222              		.loc 1 83 0 223 00e8 AA0A7EA6 		sh	$fp,2730($19) 224              		.loc 1 82 0 225 00ec 00840200 		sll	$16,$2,16 226 00f0 03841000 		sra	$16,$16,16 227              		.loc 1 84 0 228 00f4 540577A6 		sh	$23,1364($19) 229              		.loc 1 88 0 230 00f8 21280002 		move	$5,$16 231              		.loc 1 85 0 232 00fc AA0A76A6 		sh	$22,2730($19) 233              		.loc 1 86 0 234 0100 000030A6 		sh	$16,0($17) 235              		.loc 1 80 0 236              		.loc 1 88 0 237 0104 0000000C 		jal	ramcode_nor_waitready 238 0108 02009426 		addiu	$20,$20,2 239              	 240              		.loc 1 82 0 241 010c 02005226 		addiu	$18,$18,2 242              		.loc 1 80 0 243              		.loc 1 88 0 244 0110 09004010 		beq	$2,$0,$L13 245 0114 2A189502 		slt	$3,$20,$21 246              	  89:/mnt/hgfs/boot/booter/source/nor.c **** 			return 0;  90:/mnt/hgfs/boot/booter/source/nor.c **** GAS LISTING /tmp/cczGDKqI.s 			page 7  91:/mnt/hgfs/boot/booter/source/nor.c **** 		if (*pdst++ != data) 247              		.loc 1 91 0 248 0118 00002296 		lhu	$2,0($17) 249 011c 00140200 		sll	$2,$2,16 250 0120 03140200 		sra	$2,$2,16 251 0124 10005014 		bne	$2,$16,$L22 252 0128 02003126 		addiu	$17,$17,2 253              	 254              		.loc 1 80 0 255 012c ECFF6014 		bne	$3,$0,$L19 256 0130 00000000 		nop 257              	 258              	$L21:  92:/mnt/hgfs/boot/booter/source/nor.c **** 			return 0;  93:/mnt/hgfs/boot/booter/source/nor.c **** 	}  94:/mnt/hgfs/boot/booter/source/nor.c ****   95:/mnt/hgfs/boot/booter/source/nor.c **** 	return size; 259              		.loc 1 95 0 260 0134 2110A002 		move	$2,$21 261              	$L13:  96:/mnt/hgfs/boot/booter/source/nor.c **** } 262              		.loc 1 96 0 263 0138 3400BF8F 		lw	$31,52($sp)

⌨️ 快捷键说明

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