📄 deviceinfo.cod
字号:
EXPORT |??_C@_0L@OPLKAENE@EDB9307?11X?$AA@| [ DATA ] ; `string'
IMPORT |gBoardInformation|
IMPORT |gBoardInformationValid|
IMPORT |memcpy|
IMPORT |strlen|
00000 AREA |.text| { |CreateDeviceName| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$CreateDeviceName|, PDATA, SELECTION=5, ASSOC=|.text| { |CreateDeviceName| } ; comdat associative
|$T15305| DCD |$L15304|
DCD 0x40002d01
00000 AREA |.rdata| { |??_C@_0L@OPLKAENE@EDB9307?11X?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0L@OPLKAENE@EDB9307?11X?$AA@| DCB "EDB9307/1X", 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |CreateDeviceName| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |CreateDeviceName| PROC
; 100 : {
00000 |$L15304|
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 |$M15302|
00004 e1a04001 mov r4, r1
00008 e1a05000 mov r5, r0
; 101 : DWORD dwUpperMAC;
; 102 :
; 103 : if(gBoardInformationValid &&
; 104 : ( gBoardInformation.strEdbgName[0] != 0xFF ||
; 105 : gBoardInformation.strEdbgName[1] != 0xFF ||
; 106 : gBoardInformation.strEdbgName[2] != 0xFF ||
; 107 : gBoardInformation.strEdbgName[3] != 0xFF ))
0000c e59f309c ldr r3, [pc, #0x9C]
00010 e5933000 ldr r3, [r3]
00014 e3530000 cmp r3, #0
00018 0a000014 beq |$L15214|
0001c e59f2088 ldr r2, [pc, #0x88]
00020 e1d231d0 ldrsb r3, [r2, #0x10]
00024 e35300ff cmp r3, #0xFF
00028 1a000008 bne |$L15215|
0002c e1d231d1 ldrsb r3, [r2, #0x11]
00030 e35300ff cmp r3, #0xFF
00034 1a000005 bne |$L15215|
00038 e1d231d2 ldrsb r3, [r2, #0x12]
0003c e35300ff cmp r3, #0xFF
00040 1a000002 bne |$L15215|
00044 e1d231d3 ldrsb r3, [r2, #0x13]
00048 e35300ff cmp r3, #0xFF
0004c 0a000007 beq |$L15214|
00050 |$L15215|
; 108 : {
; 109 : //
; 110 : // Copy the device name from the EEPROM.
; 111 : //
; 112 : memcpy( szDeviceName, gBoardInformation.strEdbgName, EDBG_MAX_DEV_NAMELEN);
00050 e2821010 add r1, r2, #0x10
00054 e3a02010 mov r2, #0x10
00058 e1a00004 mov r0, r4
0005c eb000000 bl memcpy
; 113 : szDeviceName[EDBG_MAX_DEV_NAMELEN - 1] = 0;
00060 e3a03000 mov r3, #0
00064 e5c4300f strb r3, [r4, #0xF]
; 121 : }
; 122 : }
00068 e8bd4030 ldmia sp!, {r4, r5, lr}
0006c e12fff1e bx lr
00070 |$L15214|
; 114 : }
; 115 : else
; 116 : {
; 117 : dwUpperMAC = UpperDWFromMAC(pMyAddr);
; 118 : strcpy(szDeviceName,EBOOT_PLATFORM_STRING);
00070 e59f1030 ldr r1, [pc, #0x30]
00074 e3a0200b mov r2, #0xB
00078 e1a00004 mov r0, r4
0007c eb000000 bl memcpy
; 119 : szDeviceName += strlen(szDeviceName);
00080 e1a00004 mov r0, r4
00084 eb000000 bl strlen
; 120 : itoa10(((pMyAddr->wMAC[2]>>8) | ((pMyAddr->wMAC[2] & 0x00ff) << 8)), szDeviceName);
00088 e1d520b8 ldrh r2, [r5, #8]
0008c e0801004 add r1, r0, r4
00090 e20230ff and r3, r2, #0xFF
00094 e1a03403 mov r3, r3, lsl #8
00098 e1830422 orr r0, r3, r2, lsr #8
0009c eb000000 bl itoa10
; 121 : }
; 122 : }
000a0 e8bd4030 ldmia sp!, {r4, r5, lr}
000a4 e12fff1e bx lr
000a8 |$L15307|
000a8 00000000 DCD |??_C@_0L@OPLKAENE@EDB9307?11X?$AA@|
000ac 00000000 DCD |gBoardInformation|
000b0 00000000 DCD |gBoardInformationValid|
000b4 |$M15303|
ENDP ; |CreateDeviceName|
EXPORT |GetDeviceMacAddress|
00000 AREA |.text| { |GetDeviceMacAddress| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$GetDeviceMacAddress|, PDATA, SELECTION=5, ASSOC=|.text| { |GetDeviceMacAddress| } ; comdat associative
|$T15315| DCD |$L15314|
DCD 0x40001801
; Function compile flags: /Ogsy
00000 AREA |.text| { |GetDeviceMacAddress| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |GetDeviceMacAddress| PROC
; 135 : {
00000 |$L15314|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M15312|
; 136 : //
; 137 : // We need to do this since the board does not have a MAC address.
; 138 : // Lets use the same mac address as eboot.
; 139 : //
; 140 : if( gBoardInformationValid &&
; 141 : ( gBoardInformation.MACAddress[0] != 0xFFFF ||
; 142 : gBoardInformation.MACAddress[1] != 0xFFFF ||
; 143 : gBoardInformation.MACAddress[2] != 0xFFFF ))
00004 e59f3050 ldr r3, [pc, #0x50]
00008 e5933000 ldr r3, [r3]
0000c e3530000 cmp r3, #0
00010 0a00000c beq |$L15224|
00014 e59f203c ldr r2, [pc, #0x3C]
00018 e3a0ecff mov lr, #0xFF, 24
0001c e38ee0ff orr lr, lr, #0xFF
00020 e1d230b4 ldrh r3, [r2, #4]
00024 e153000e cmp r3, lr
00028 1a000005 bne |$L15225|
0002c e1d230b6 ldrh r3, [r2, #6]
00030 e153000e cmp r3, lr
00034 1a000002 bne |$L15225|
00038 e1d230b8 ldrh r3, [r2, #8]
0003c e153000e cmp r3, lr
00040 0a000000 beq |$L15224|
00044 |$L15225|
; 144 : {
; 145 : memcpy(pusMACAddress, gBoardInformation.MACAddress, 6);
00044 e2821004 add r1, r2, #4
00048 |$L15224|
; 146 : }
; 147 : else
; 148 : {
; 149 : memcpy(pusMACAddress, pusDefaultMACAddress, 6 );
00048 e3a02006 mov r2, #6
0004c eb000000 bl memcpy
; 150 : }
; 151 : }
00050 e49de004 ldr lr, [sp], #4
00054 e12fff1e bx lr
00058 |$L15317|
00058 00000000 DCD |gBoardInformation|
0005c 00000000 DCD |gBoardInformationValid|
00060 |$M15313|
ENDP ; |GetDeviceMacAddress|
EXPORT |GetPlatformString|
00000 AREA |.text| { |GetPlatformString| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$GetPlatformString|, PDATA, SELECTION=5, ASSOC=|.text| { |GetPlatformString| } ; comdat associative
|$T15324| DCD |$L15323|
DCD 0x40002401
; Function compile flags: /Ogsy
00000 AREA |.text| { |GetPlatformString| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |GetPlatformString| PROC
; 164 : {
00000 |$L15323|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M15321|
00004 e1a04000 mov r4, r0
; 165 : //
; 166 : // Create device name based on Ethernet address.
; 167 : //
; 168 : if( gBoardInformationValid &&
; 169 : ( gBoardInformation.strEdbgName[0] != 0xFF ||
; 170 : gBoardInformation.strEdbgName[1] != 0xFF ||
; 171 : gBoardInformation.strEdbgName[2] != 0xFF ||
; 172 : gBoardInformation.strEdbgName[3] != 0xFF ))
00008 e59f307c ldr r3, [pc, #0x7C]
0000c e5933000 ldr r3, [r3]
00010 e3530000 cmp r3, #0
00014 0a000014 beq |$L15231|
00018 e59f2068 ldr r2, [pc, #0x68]
0001c e1d231d0 ldrsb r3, [r2, #0x10]
00020 e35300ff cmp r3, #0xFF
00024 1a000008 bne |$L15232|
00028 e1d231d1 ldrsb r3, [r2, #0x11]
0002c e35300ff cmp r3, #0xFF
00030 1a000005 bne |$L15232|
00034 e1d231d2 ldrsb r3, [r2, #0x12]
00038 e35300ff cmp r3, #0xFF
0003c 1a000002 bne |$L15232|
00040 e1d231d3 ldrsb r3, [r2, #0x13]
00044 e35300ff cmp r3, #0xFF
00048 0a000007 beq |$L15231|
0004c |$L15232|
; 173 : {
; 174 : //
; 175 : // Copy the board information from the platform string.
; 176 : //
; 177 : memcpy( szPlatformString, gBoardInformation.strEdbgName, 7);
0004c e2821010 add r1, r2, #0x10
00050 e3a02007 mov r2, #7
00054 e1a00004 mov r0, r4
00058 eb000000 bl memcpy
; 178 : szPlatformString[7] = 0;
0005c e3a03000 mov r3, #0
00060 e5c43007 strb r3, [r4, #7]
; 183 : }
; 184 : }
00064 e8bd4010 ldmia sp!, {r4, lr}
00068 e12fff1e bx lr
0006c |$L15231|
; 179 : }
; 180 : else
; 181 : {
; 182 : memcpy(szPlatformString, EBOOT_PLATFORM_STRING, sizeof(EBOOT_PLATFORM_STRING));
0006c e59f1010 ldr r1, [pc, #0x10]
00070 e3a0200b mov r2, #0xB
00074 e1a00004 mov r0, r4
00078 eb000000 bl memcpy
; 183 : }
; 184 : }
0007c e8bd4010 ldmia sp!, {r4, lr}
00080 e12fff1e bx lr
00084 |$L15326|
00084 00000000 DCD |??_C@_0L@OPLKAENE@EDB9307?11X?$AA@|
00088 00000000 DCD |gBoardInformation|
0008c 00000000 DCD |gBoardInformationValid|
00090 |$M15322|
ENDP ; |GetPlatformString|
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -