📄 ide.lst
字号:
GAS LISTING /tmp/cc8bEnTV.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 C6000000 .text 9 02009600 9 00000101 9 FB0E0A00 9 01010101 10 $Ltext0: 11 .data 12 .align 2 13 .type ide_mem_base, @object 14 .size ide_mem_base, 4 15 ide_mem_base: 16 0000 000080B8 .word -1199570944 17 0004 00000000 .text 17 00000000 17 00000000 18 .align 2 19 .globl ide_reset 20 .ent ide_reset 21 .type ide_reset, @function 22 ide_reset: 23 $LFB2: 24 .file 1 "/mnt/hgfs/boot/booter/source/ide.c" 1:/mnt/hgfs/boot/booter/source/ide.c **** #include "example.h" 2:/mnt/hgfs/boot/booter/source/ide.c **** #include "gpio.h" 3:/mnt/hgfs/boot/booter/source/ide.c **** #include "ata.h" 4:/mnt/hgfs/boot/booter/source/ide.c **** 5:/mnt/hgfs/boot/booter/source/ide.c **** /* 6:/mnt/hgfs/boot/booter/source/ide.c **** * The address signals for IDE are routed such that each ATA register 7:/mnt/hgfs/boot/booter/source/ide.c **** * occupies 32 bytes of physical address space for cache-line DMA optimization 8:/mnt/hgfs/boot/booter/source/ide.c **** */ 9:/mnt/hgfs/boot/booter/source/ide.c **** #define IDE_REGISTER_SIZE 32 10:/mnt/hgfs/boot/booter/source/ide.c **** static uint8* ide_mem_base = (char *)KSEG1(IDE_PHYS_ADDR); 11:/mnt/hgfs/boot/booter/source/ide.c **** static char icon[] = {'-', '\\', '|', '/'}; 12:/mnt/hgfs/boot/booter/source/ide.c **** #define MAX_ICON 3 13:/mnt/hgfs/boot/booter/source/ide.c **** 14:/mnt/hgfs/boot/booter/source/ide.c **** int ide_reset() 15:/mnt/hgfs/boot/booter/source/ide.c **** { 25 .loc 1 15 0 26 .frame $sp,24,$31 # vars= 0, regs= 1/0, args= 16, gp= 0 27 .mask 0x80000000,-8 28 .fmask 0x00000000,0 29 .set noreorder 30 .set nomacro 31 32 0000 E8FFBD27 addiu $sp,$sp,-24 33 $LCFI0: 16:/mnt/hgfs/boot/booter/source/ide.c **** #if defined(PB1200) || defined(DB1200) // || defined(PB1550) 17:/mnt/hgfs/boot/booter/source/ide.c **** //DPRINTF("\n"); 18:/mnt/hgfs/boot/booter/source/ide.c **** //bcsr->resets &= ~(BCSR_RESETS_IDE);GAS LISTING /tmp/cc8bEnTV.s page 2 19:/mnt/hgfs/boot/booter/source/ide.c **** //msdelay(100); 20:/mnt/hgfs/boot/booter/source/ide.c **** //bcsr->resets |= BCSR_RESETS_IDE; 21:/mnt/hgfs/boot/booter/source/ide.c **** gpioWrite(IDE_PWR, 1); 34 .loc 1 21 0 35 0004 01000524 li $5,1 # 0x1 36 .loc 1 15 0 37 0008 1000BFAF sw $31,16($sp) 38 $LCFI1: 39 .loc 1 21 0 40 000c 0000000C jal gpioWrite 41 0010 13000424 li $4,19 # 0x13 42 22:/mnt/hgfs/boot/booter/source/ide.c **** msdelay(100); 43 .loc 1 22 0 44 0014 0000000C jal msdelay 45 0018 64000424 li $4,100 # 0x64 46 23:/mnt/hgfs/boot/booter/source/ide.c **** gpioWrite(IDE_BUF_EN, 0); 47 .loc 1 23 0 48 001c 21280000 move $5,$0 49 0020 0000000C jal gpioWrite 50 0024 0A000424 li $4,10 # 0xa 51 24:/mnt/hgfs/boot/booter/source/ide.c **** msdelay(100); 52 .loc 1 24 0 53 0028 0000000C jal msdelay 54 002c 64000424 li $4,100 # 0x64 55 25:/mnt/hgfs/boot/booter/source/ide.c **** gpioWrite(IDE_RST, 1); 56 .loc 1 25 0 57 0030 11000424 li $4,17 # 0x11 58 0034 0000000C jal gpioWrite 59 0038 01000524 li $5,1 # 0x1 60 26:/mnt/hgfs/boot/booter/source/ide.c **** #elif defined(FICMMP) 27:/mnt/hgfs/boot/booter/source/ide.c **** platformClearConfigBits(FICMMP_CONFIG_IDERST); 28:/mnt/hgfs/boot/booter/source/ide.c **** msdelay(100); 29:/mnt/hgfs/boot/booter/source/ide.c **** platformSetConfigBits(FICMMP_CONFIG_IDERST); 30:/mnt/hgfs/boot/booter/source/ide.c **** #endif 31:/mnt/hgfs/boot/booter/source/ide.c **** 32:/mnt/hgfs/boot/booter/source/ide.c **** return 1; 33:/mnt/hgfs/boot/booter/source/ide.c **** } 61 .loc 1 33 0 62 003c 1000BF8F lw $31,16($sp) 63 0040 01000224 li $2,1 # 0x1 64 0044 0800E003 j $31 65 0048 1800BD27 addiu $sp,$sp,24 66 67 .set macro 68 .set reorder 69 $LFE2: 70 .end ide_reset 71 .align 2 72 .globl ide_init 73 .ent ide_init 74 .type ide_init, @function 75 ide_init:GAS LISTING /tmp/cc8bEnTV.s page 3 76 $LFB3: 34:/mnt/hgfs/boot/booter/source/ide.c **** 35:/mnt/hgfs/boot/booter/source/ide.c **** int ide_init() 36:/mnt/hgfs/boot/booter/source/ide.c **** { 77 .loc 1 36 0 78 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 79 .mask 0x00000000,0 80 .fmask 0x00000000,0 81 .set noreorder 82 .set nomacro 83 37:/mnt/hgfs/boot/booter/source/ide.c **** #if 0 //defined(FICMMP) 38:/mnt/hgfs/boot/booter/source/ide.c **** printf("Powering up drive... "); 39:/mnt/hgfs/boot/booter/source/ide.c **** gpioWrite(FICMMP_IDE_PWR); //Power up IDE 40:/mnt/hgfs/boot/booter/source/ide.c **** int i; 41:/mnt/hgfs/boot/booter/source/ide.c **** for(i = 0; i < 100; ++i) 42:/mnt/hgfs/boot/booter/source/ide.c **** { 43:/mnt/hgfs/boot/booter/source/ide.c **** printf("\b%c", icon[i%4]); 44:/mnt/hgfs/boot/booter/source/ide.c **** msdelay(100); 45:/mnt/hgfs/boot/booter/source/ide.c **** } 46:/mnt/hgfs/boot/booter/source/ide.c **** 47:/mnt/hgfs/boot/booter/source/ide.c **** printf("\bComplete\n"); 48:/mnt/hgfs/boot/booter/source/ide.c **** #endif 49:/mnt/hgfs/boot/booter/source/ide.c **** 50:/mnt/hgfs/boot/booter/source/ide.c **** return ide_reset(); 84 .loc 1 50 0 85 004c 00000008 j ide_reset 86 0050 00000000 nop 87 88 .set macro 89 .set reorder 90 $LFE3: 91 .end ide_init 92 .align 2 93 .globl ideEject 94 .ent ideEject 95 .type ideEject, @function 96 ideEject: 97 $LFB4: 51:/mnt/hgfs/boot/booter/source/ide.c **** } 52:/mnt/hgfs/boot/booter/source/ide.c **** 53:/mnt/hgfs/boot/booter/source/ide.c **** int ideEject() 54:/mnt/hgfs/boot/booter/source/ide.c **** { 98 .loc 1 54 0 99 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 100 .mask 0x00000000,0 101 .fmask 0x00000000,0 102 .set noreorder 103 .set nomacro 104 55:/mnt/hgfs/boot/booter/source/ide.c **** DPRINTF("\n"); 56:/mnt/hgfs/boot/booter/source/ide.c **** return 1; 57:/mnt/hgfs/boot/booter/source/ide.c **** } 105 .loc 1 57 0 106 0054 0800E003 j $31 107 0058 01000224 li $2,1 # 0x1 108 GAS LISTING /tmp/cc8bEnTV.s page 4 109 .set macro 110 .set reorder 111 $LFE4: 112 .end ideEject 113 .align 2 114 .globl ideRead 115 .ent ideRead 116 .type ideRead, @function 117 ideRead: 118 $LFB5: 58:/mnt/hgfs/boot/booter/source/ide.c **** 59:/mnt/hgfs/boot/booter/source/ide.c **** int ideRead(int sect, int n, void *buf) 60:/mnt/hgfs/boot/booter/source/ide.c **** { 119 .loc 1 60 0 120 .frame $sp,32,$31 # vars= 0, regs= 1/0, args= 24, gp= 0 121 .mask 0x80000000,-8 122 .fmask 0x00000000,0 123 .set noreorder 124 .set nomacro 125 126 005c E0FFBD27 addiu $sp,$sp,-32 127 $LCFI2: 128 0060 1800BFAF sw $31,24($sp) 129 $LCFI3: 61:/mnt/hgfs/boot/booter/source/ide.c **** DPRINTF("sect: %d, n: %d, buf: %X\n", sect, n, buf); 62:/mnt/hgfs/boot/booter/source/ide.c **** return ata_read_sectors(ide_mem_base, sect, n, buf, IDE_REGISTER_SIZE); 130 .loc 1 62 0 131 0064 0000023C lui $2,%hi(ide_mem_base) 132 0068 0000438C lw $3,%lo(ide_mem_base)($2) 133 .loc 1 60 0 134 006c 21408000 move $8,$4 135 0070 2110A000 move $2,$5 136 0074 2138C000 move $7,$6 137 .loc 1 62 0 138 0078 21206000 move $4,$3 139 007c 21304000 move $6,$2 140 0080 21280001 move $5,$8 141 0084 20000224 li $2,32 # 0x20 142 0088 0000000C jal ata_read_sectors 143 008c 1000A2AF sw $2,16($sp) 144 63:/mnt/hgfs/boot/booter/source/ide.c **** } 145 .loc 1 63 0 146 0090 1800BF8F lw $31,24($sp) 147 0094 0800E003 j $31 148 0098 2000BD27 addiu $sp,$sp,32 149 150 .set macro 151 .set reorder 152 $LFE5: 153 .end ideRead 154 .align 2 155 .globl ideWrite 156 .ent ideWrite 157 .type ideWrite, @function 158 ideWrite: 159 $LFB6:GAS LISTING /tmp/cc8bEnTV.s page 5 64:/mnt/hgfs/boot/booter/source/ide.c **** 65:/mnt/hgfs/boot/booter/source/ide.c **** int ideWrite(int sect, int n, void *buf) 66:/mnt/hgfs/boot/booter/source/ide.c **** { 160 .loc 1 66 0 161 .frame $sp,32,$31 # vars= 0, regs= 1/0, args= 24, gp= 0 162 .mask 0x80000000,-8 163 .fmask 0x00000000,0 164 .set noreorder 165 .set nomacro 166 167 009c E0FFBD27 addiu $sp,$sp,-32 168 $LCFI4: 169 00a0 1800BFAF sw $31,24($sp) 170 $LCFI5: 67:/mnt/hgfs/boot/booter/source/ide.c **** DPRINTF("sect: %d, n: %d, buf: %X\n", sect, n, buf); 68:/mnt/hgfs/boot/booter/source/ide.c **** return ata_write_sectors(ide_mem_base, sect, n, buf, IDE_REGISTER_SIZE); 171 .loc 1 68 0 172 00a4 0000023C lui $2,%hi(ide_mem_base) 173 00a8 0000438C lw $3,%lo(ide_mem_base)($2) 174 .loc 1 66 0 175 00ac 21408000 move $8,$4 176 00b0 2110A000 move $2,$5 177 00b4 2138C000 move $7,$6 178 .loc 1 68 0 179 00b8 21206000 move $4,$3 180 00bc 21304000 move $6,$2 181 00c0 21280001 move $5,$8 182 00c4 20000224 li $2,32 # 0x20 183 00c8 0000000C jal ata_write_sectors 184 00cc 1000A2AF sw $2,16($sp) 185 69:/mnt/hgfs/boot/booter/source/ide.c **** } 186 .loc 1 69 0 187 00d0 1800BF8F lw $31,24($sp) 188 00d4 0800E003 j $31 189 00d8 2000BD27 addiu $sp,$sp,32 190 191 .set macro 192 .set reorder 193 $LFE6: 194 .end ideWrite 195 .align 2 196 .globl ideOpen 197 .ent ideOpen 198 .type ideOpen, @function 199 ideOpen: 200 $LFB7: 70:/mnt/hgfs/boot/booter/source/ide.c **** 71:/mnt/hgfs/boot/booter/source/ide.c **** int ideOpen() 72:/mnt/hgfs/boot/booter/source/ide.c **** { 201 .loc 1 72 0 202 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 203 .mask 0x00000000,0 204 .fmask 0x00000000,0 205 .set noreorder 206 .set nomacro 207 GAS LISTING /tmp/cc8bEnTV.s page 6 73:/mnt/hgfs/boot/booter/source/ide.c **** return ide_init(); 208 .loc 1 73 0 209 00dc 00000008 j ide_init 210 00e0 00000000 nop 211 212 .set macro 213 .set reorder 214 $LFE7: 215 .end ideOpen 216 .section .debug_frame,"",@progbits 217 $Lframe0: 218 0000 0C000000 .4byte $LECIE0-$LSCIE0 219 $LSCIE0: 220 0004 FFFFFFFF .4byte 0xffffffff 221 0008 01 .byte 0x1 222 0009 00 .ascii "\000" 223 000a 01 .uleb128 0x1 224 000b 04 .sleb128 4 225 000c 1F .byte 0x1f 226 000d 0C .byte 0xc 227 000e 1D .uleb128 0x1d 228 000f 00 .uleb128 0x0 229 .align 2 230 $LECIE0: 231 $LSFDE0: 232 0010 14000000 .4byte $LEFDE0-$LASFDE0 233 $LASFDE0: 234 0014 00000000 .4byte $Lframe0 235 0018 00000000 .4byte $LFB2 236 001c 4C000000 .4byte $LFE2-$LFB2 237 0020 44 .byte 0x4 238 .4byte $LCFI0-$LFB2 239 0021 0E .byte 0xe 240 0022 18 .uleb128 0x18 241 0023 48 .byte 0x4 242 .4byte $LCFI1-$LCFI0 243 0024 11 .byte 0x11 244 0025 1F .uleb128 0x1f 245 0026 7E .sleb128 -2 246 0027 00 .align 2 247 $LEFDE0: 248 $LSFDE2: 249 0028 0C000000 .4byte $LEFDE2-$LASFDE2 250 $LASFDE2: 251 002c 00000000 .4byte $Lframe0 252 0030 4C000000 .4byte $LFB3 253 0034 08000000 .4byte $LFE3-$LFB3 254 .align 2 255 $LEFDE2: 256 $LSFDE4: 257 0038 0C000000 .4byte $LEFDE4-$LASFDE4 258 $LASFDE4: 259 003c 00000000 .4byte $Lframe0 260 0040 54000000 .4byte $LFB4 261 0044 08000000 .4byte $LFE4-$LFB4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -