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

📄 partition.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 3 页
字号:
GAS LISTING /tmp/ccV2SiAd.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 0A010000 		.text   9      0200CE00    9      00000101    9      FB0E0A00    9      01010101   10              	$Ltext0:  11              		.align	2  12              		.globl	partitionIsType  13              		.ent	partitionIsType  14              		.type	partitionIsType, @function  15              	partitionIsType:  16              	$LFB2:  17              		.file 1 "/mnt/hgfs/boot/booter/source/applications/booter/partition.c"   1:/mnt/hgfs/boot/booter/source/applications/booter/partition.c ****    2:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** #include "partition.h"   3:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** #include "example.h"   4:/mnt/hgfs/boot/booter/source/applications/booter/partition.c ****    5:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** typedef struct Partition   6:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** {   7:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	uint8	active;   8:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	uint8	startingCHS[3];   9:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	uint8	type;  10:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	uint8	endingCHS[3];  11:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	uint32	start;  12:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	uint32	size;  13:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** } Partition;  14:/mnt/hgfs/boot/booter/source/applications/booter/partition.c ****   15:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** typedef struct MBR  16:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** {  17:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	uint8		bootInfo[446]		__attribute__ ((packed));	//byte align structure  18:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	Partition	partitionTable[4]	__attribute__ ((packed));  19:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	uint16		signature			__attribute__ ((packed));  20:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** } MBR;  21:/mnt/hgfs/boot/booter/source/applications/booter/partition.c ****   22:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** int partitionIsType(enum PartitionType type, uint8 code)  23:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** {  18              		.loc 1 23 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 23 0  24:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	DPRINTF("type: %X, code: %X\n", type, code);  25:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	//Type codes obtained from: http://www.win.tue.nl/~aeb/partitions/partition_types-1.html  26:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	switch(type)  26              		.loc 1 26 0  27 0000 06008010 		beq	$4,$0,$L3GAS LISTING /tmp/ccV2SiAd.s 			page 2  28 0004 FF00A530 		andi	$5,$5,0x00ff  29              	  30 0008 01000224 		li	$2,1			# 0x1  31 000c 2F008210 		beq	$4,$2,$L6  32 0010 00000000 		nop  33              	  27:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	{  28:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	case FAT:	return  29:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x01 ||  30:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x04 ||  31:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x05 ||  32:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x06 ||  33:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x0B ||  34:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x0C ||  35:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x0E ||  36:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x11 ||  37:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x14 ||  38:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x16 ||  39:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x1B ||  40:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x1C ||  41:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x1E;  42:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				break;  43:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	case EXT2:	return   44:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				code == 0x82;  45:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 				break;  46:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	}  47:/mnt/hgfs/boot/booter/source/applications/booter/partition.c ****   48:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	return 0;  34              		.loc 1 48 0  49:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** }  35              		.loc 1 49 0  36 0014 0800E003 		j	$31  37 0018 21100000 		move	$2,$0  38              	  39              	$L3:  40              		.loc 1 28 0  41 001c 01000224 		li	$2,1			# 0x1  42 0020 2700A210 		beq	$5,$2,$L5  43 0024 21180000 		move	$3,$0  44              	  45 0028 04000224 		li	$2,4			# 0x4  46 002c 2400A210 		beq	$5,$2,$L5  47 0030 00000000 		nop  48              	  49 0034 05000224 		li	$2,5			# 0x5  50 0038 2100A210 		beq	$5,$2,$L5  51 003c 00000000 		nop  52              	  53 0040 06000224 		li	$2,6			# 0x6  54 0044 1E00A210 		beq	$5,$2,$L5  55 0048 00000000 		nop  56              	  57 004c 0B000224 		li	$2,11			# 0xb  58 0050 1B00A210 		beq	$5,$2,$L5  59 0054 00000000 		nop  60              	  61 0058 0C000224 		li	$2,12			# 0xcGAS LISTING /tmp/ccV2SiAd.s 			page 3  62 005c 1800A210 		beq	$5,$2,$L5  63 0060 00000000 		nop  64              	  65 0064 0E000224 		li	$2,14			# 0xe  66 0068 1500A210 		beq	$5,$2,$L5  67 006c 00000000 		nop  68              	  69 0070 11000224 		li	$2,17			# 0x11  70 0074 1200A210 		beq	$5,$2,$L5  71 0078 00000000 		nop  72              	  73 007c 14000224 		li	$2,20			# 0x14  74 0080 0F00A210 		beq	$5,$2,$L5  75 0084 00000000 		nop  76              	  77 0088 16000224 		li	$2,22			# 0x16  78 008c 0C00A210 		beq	$5,$2,$L5  79 0090 00000000 		nop  80              	  81 0094 1B000224 		li	$2,27			# 0x1b  82 0098 0900A210 		beq	$5,$2,$L5  83 009c 00000000 		nop  84              	  85 00a0 1C000224 		li	$2,28			# 0x1c  86 00a4 0600A210 		beq	$5,$2,$L5  87 00a8 00000000 		nop  88              	  89 00ac 1E000224 		li	$2,30			# 0x1e  90 00b0 0300A210 		beq	$5,$2,$L5  91 00b4 00000000 		nop  92              	  93 00b8 0800E003 		j	$31  94 00bc 21106000 		move	$2,$3  95              	  96              	$L5:  97 00c0 01000324 		li	$3,1			# 0x1  98 00c4 0800E003 		j	$31  99 00c8 21106000 		move	$2,$3 100              	 101              	$L6: 102              		.loc 1 43 0 103 00cc 8200A238 		xori	$2,$5,0x82 104 00d0 0800E003 		j	$31 105 00d4 0100422C 		sltu	$2,$2,1 106              	 107              		.set	macro 108              		.set	reorder 109              	$LFE2: 110              		.end	partitionIsType 111              		.align	2 112              		.globl	partitionGetRootSector 113              		.ent	partitionGetRootSector 114              		.type	partitionGetRootSector, @function 115              	partitionGetRootSector: 116              	$LFB3:  50:/mnt/hgfs/boot/booter/source/applications/booter/partition.c ****   51:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** int partitionGetRootSector(enum PartitionType type, int partitionNumber, DISK_READ_FUNCTION read)GAS LISTING /tmp/ccV2SiAd.s 			page 4  52:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** { 117              		.loc 1 52 0 118              		.frame	$sp,544,$31		# vars= 512, regs= 3/0, args= 16, gp= 0 119              		.mask	0x80030000,-8 120              		.fmask	0x00000000,0 121              		.set	noreorder 122              		.set	nomacro 123              		 124 00d8 E0FDBD27 		addiu	$sp,$sp,-544 125              	$LCFI0: 126 00dc 1402B1AF 		sw	$17,532($sp) 127              	$LCFI1: 128 00e0 1002B0AF 		sw	$16,528($sp) 129              	$LCFI2: 130 00e4 21888000 		move	$17,$4 131 00e8 2180A000 		move	$16,$5 132 00ec 2110C000 		move	$2,$6  53:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	DPRINTF("type: %X, partition: %d\n", type, partitionNumber);  54:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	MBR mbr;  55:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	if(read(0, 1, &mbr)) 133              		.loc 1 55 0 134 00f0 21200000 		move	$4,$0 135              		.loc 1 52 0 136 00f4 1802BFAF 		sw	$31,536($sp) 137              	$LCFI3: 138              		.loc 1 55 0 139 00f8 1000A627 		addiu	$6,$sp,16 140 00fc 09F84000 		jal	$2 141 0100 01000524 		li	$5,1			# 0x1 142              	  56:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 		if(partitionIsType(type, mbr.partitionTable[partitionNumber].type)) 143              		.loc 1 56 0 144 0104 00811000 		sll	$16,$16,4 145 0108 1000A327 		addiu	$3,$sp,16 146 010c 21800302 		addu	$16,$16,$3 147              		.loc 1 55 0 148 0110 05004010 		beq	$2,$0,$L9 149 0114 21202002 		move	$4,$17 150              	 151              		.loc 1 56 0 152 0118 0000000C 		jal	partitionIsType 153 011c C2010592 		lbu	$5,450($16) 154              	  57:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 			return mbr.partitionTable[partitionNumber].start;  58:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	  59:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	if (mbr.bootInfo[21] == 0xF8)	// SD doesn't have MBR; medium identifier (offset 0x21) should be 0x  60:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 		return 0;					// partition boot sector is in sector 0  61:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	  62:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** 	return -1;  63:/mnt/hgfs/boot/booter/source/applications/booter/partition.c **** } 155              		.loc 1 63 0 156              		.loc 1 56 0 157 0120 0B004014 		bne	$2,$0,$L12 158 0124 1802BF8F 		lw	$31,536($sp) 159              	 160              	$L9: 161              		.loc 1 59 0GAS LISTING /tmp/ccV2SiAd.s 			page 5 162 0128 2500A293 		lbu	$2,37($sp) 163              		.loc 1 60 0 164 012c FFFF0324 		li	$3,-1			# 0xffffffffffffffff 165              		.loc 1 63 0 166 0130 1802BF8F 		lw	$31,536($sp) 167              		.loc 1 60 0 168 0134 F8004238 		xori	$2,$2,0xf8 169              		.loc 1 63 0 170 0138 1402B18F 		lw	$17,532($sp) 171 013c 1002B08F 		lw	$16,528($sp) 172              		.loc 1 60 0 173 0140 0A180200 		movz	$3,$0,$2 174 0144 21106000 		move	$2,$3 175              		.loc 1 63 0 176 0148 0800E003 		j	$31 177 014c 2002BD27 		addiu	$sp,$sp,544 178              	 179              	$L12: 180              		.loc 1 57 0 181 0150 C901028A 		lwl	$2,457($16) 182              		.loc 1 63 0 183 0154 1402B18F 		lw	$17,532($sp) 184              		.loc 1 57 0 185 0158 C601029A 		lwr	$2,454($16) 186              		.loc 1 63 0 187 015c 1002B08F 		lw	$16,528($sp) 188 0160 0800E003 		j	$31 189 0164 2002BD27 		addiu	$sp,$sp,544 190              	 191              		.set	macro 192              		.set	reorder 193              	$LFE3: 194              		.end	partitionGetRootSector 195              		.section	.debug_frame,"",@progbits 196              	$Lframe0: 197 0000 0C000000 		.4byte	$LECIE0-$LSCIE0 198              	$LSCIE0: 199 0004 FFFFFFFF 		.4byte	0xffffffff 200 0008 01       		.byte	0x1 201 0009 00       		.ascii	"\000" 202 000a 01       		.uleb128 0x1 203 000b 04       		.sleb128 4 204 000c 1F       		.byte	0x1f 205 000d 0C       		.byte	0xc 206 000e 1D       		.uleb128 0x1d 207 000f 00       		.uleb128 0x0 208              		.align	2 209              	$LECIE0: 210              	$LSFDE0: 211 0010 0C000000 		.4byte	$LEFDE0-$LASFDE0 212              	$LASFDE0: 213 0014 00000000 		.4byte	$Lframe0 214 0018 00000000 		.4byte	$LFB2 215 001c D8000000 		.4byte	$LFE2-$LFB2 216              		.align	2 217              	$LEFDE0: 218              	$LSFDE2:GAS LISTING /tmp/ccV2SiAd.s 			page 6 219 0020 1C000000 		.4byte	$LEFDE2-$LASFDE2 220              	$LASFDE2: 221 0024 00000000 		.4byte	$Lframe0 222 0028 D8000000 		.4byte	$LFB3 223 002c 90000000 		.4byte	$LFE3-$LFB3 224 0030 44       		.byte	0x4 225              		.4byte	$LCFI0-$LFB3 226 0031 0E       		.byte	0xe 227 0032 A004     		.uleb128 0x220 228 0034 48       		.byte	0x4 229              		.4byte	$LCFI2-$LCFI0 230 0035 11       		.byte	0x11 231 0036 10       		.uleb128 0x10 232 0037 7C       		.sleb128 -4 233 0038 11       		.byte	0x11 234 0039 11       		.uleb128 0x11 235 003a 7D       		.sleb128 -3 236 003b 54       		.byte	0x4 237              		.4byte	$LCFI3-$LCFI2 238 003c 11       		.byte	0x11 239 003d 1F       		.uleb128 0x1f 240 003e 7E       		.sleb128 -2 241 003f 00       		.align	2 242              	$LEFDE2: 243              		.align	0 244              		.file 2 "/mnt/hgfs/boot/booter/source/applications/booter/partition.h" 245              		.file 3 "/mnt/hgfs/boot/booter/include/example.h" 246              		.file 4 "/mnt/hgfs/boot/booter/source/applications/booter/functions.h" 247              		.file 5 "/mnt/hgfs/boot/booter/platforms/DB1200/platform.h" 248              		.text 249              	$Letext0: 250 0168 00000000 		.section	.debug_info 250      00000000  251 0000 57020000 		.4byte	0x257 252 0004 0200     		.2byte	0x2 253 0006 00000000 		.4byte	$Ldebug_abbrev0 254 000a 04       		.byte	0x4 255 000b 01       		.uleb128 0x1 256 000c 00000000 		.4byte	$Ldebug_line0 257 0010 68010000 		.4byte	$Letext0 258 0014 00000000 		.4byte	$Ltext0 259 0018 BD000000 		.4byte	$LASF29 260 001c 01       		.byte	0x1 261 001d DB000000 		.4byte	$LASF30 262 0021 02       		.uleb128 0x2 263 0022 72010000 		.4byte	$LASF0 264 0026 01       		.byte	0x1 265 0027 06       		.byte	0x6 266 0028 02       		.uleb128 0x2 267 0029 D1000000 		.4byte	$LASF1 268 002d 02       		.byte	0x2 269 002e 05       		.byte	0x5 270 002f 03       		.uleb128 0x3 271 0030 696E7400 		.ascii	"int\000" 272 0034 04       		.byte	0x4 273 0035 05       		.byte	0x5 274 0036 04       		.uleb128 0x4GAS LISTING /tmp/ccV2SiAd.s 			page 7 275 0037 91010000 		.4byte	$LASF3 276 003b 03       		.byte	0x3 277 003c 35       		.byte	0x35 278 003d 41000000 		.4byte	0x41 279 0041 02       		.uleb128 0x2 280 0042 51010000 		.4byte	$LASF2 281 0046 01       		.byte	0x1 282 0047 08       		.byte	0x8 283 0048 04       		.uleb128 0x4 284 0049 93000000 		.4byte	$LASF4 285 004d 03       		.byte	0x3 286 004e 36       		.byte	0x36 287 004f 53000000 		.4byte	0x53 288 0053 02       		.uleb128 0x2 289 0054 7E010000 		.4byte	$LASF5 290 0058 02       		.byte	0x2 291 0059 07       		.byte	0x7

⌨️ 快捷键说明

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