📄 main.cod
字号:
00000 AREA |.text| { |StoreEBootCFG| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$StoreEBootCFG|, PDATA, SELECTION=5, ASSOC=|.text| { |StoreEBootCFG| } ; comdat associative
|$T45305| DCD |$L45304|
DCD 0x40001601
00000 AREA |.rdata| { |??_C@_0DH@LOAHIMIE@ERROR?3?5StoreEBootCFG?3?5failed?5to?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DH@LOAHIMIE@ERROR?3?5StoreEBootCFG?3?5failed?5to?5@| DCB "ERROR: "
DCB "StoreEBootCFG: failed to write configuration.", 0xd, 0xa
DCB 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0BC@JOKCKMOM@StoreEBootCFG?$CI?$CJ?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BC@JOKCKMOM@StoreEBootCFG?$CI?$CJ?$AN?6?$AA@| DCB "StoreEBootCFG("
DCB ")", 0xd, 0xa, 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |StoreEBootCFG| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |StoreEBootCFG| PROC
; 1457 : {
00000 |$L45304|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M45302|
00004 e1a04000 mov r4, r0
; 1458 : EdbgOutputDebugString("StoreEBootCFG()\r\n");
00008 e59f0044 ldr r0, [pc, #0x44]
0000c eb000000 bl EdbgOutputDebugString
; 1459 : if (!BootDevice_Write(EBOOT_FLASH_CFG_START, (PUCHAR)EBootCFG, sizeof(EBOOT_CFG)))
00010 e3a01000 mov r1, #0
00014 e3a00701 mov r0, #1, 14
00018 eb000000 bl OALPAtoVA
0001c e3a0203c mov r2, #0x3C
00020 e1a01004 mov r1, r4
00024 eb000000 bl BootDevice_Write
00028 e3500000 cmp r0, #0
0002c 1a000004 bne |$L44773|
; 1460 : {
; 1461 : EdbgOutputDebugString("ERROR: StoreEBootCFG: failed to write configuration.\r\n");
00030 e59f0018 ldr r0, [pc, #0x18]
00034 eb000000 bl EdbgOutputDebugString
; 1462 : return(FALSE);
00038 e3a00000 mov r0, #0
; 1466 : }
0003c e8bd4010 ldmia sp!, {r4, lr}
00040 e12fff1e bx lr
00044 |$L44773|
; 1463 : }
; 1464 :
; 1465 : return(TRUE);
00044 e3a00001 mov r0, #1
; 1466 : }
00048 e8bd4010 ldmia sp!, {r4, lr}
0004c e12fff1e bx lr
00050 |$L45307|
00050 00000000 DCD |??_C@_0DH@LOAHIMIE@ERROR?3?5StoreEBootCFG?3?5failed?5to?5@|
00054 00000000 DCD |??_C@_0BC@JOKCKMOM@StoreEBootCFG?$CI?$CJ?$AN?6?$AA@|
00058 |$M45303|
ENDP ; |StoreEBootCFG|
EXPORT |??_C@_0CP@LKBEOLND@?$AN?6Resetting?5factory?5default?5conf@| [ DATA ] ; `string'
EXPORT |??_C@_0N@OAGNHFJJ@192?4168?480?42?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_0O@HGNGLBEC@255?4255?4255?40?$AA@| [ DATA ] ; `string'
IMPORT |inet_addr|
00000 AREA |.text| { |ResetDefaultEBootCFG| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$ResetDefaultEBootCFG|, PDATA, SELECTION=5, ASSOC=|.text| { |ResetDefaultEBootCFG| } ; comdat associative
|$T45314| DCD |$L45313|
DCD 0x40002201
00000 AREA |.rdata| { |??_C@_0CP@LKBEOLND@?$AN?6Resetting?5factory?5default?5conf@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CP@LKBEOLND@?$AN?6Resetting?5factory?5default?5conf@| DCB 0xd, 0xa
DCB "Resetting factory default configuration...", 0xd, 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0N@OAGNHFJJ@192?4168?480?42?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0N@OAGNHFJJ@192?4168?480?42?$AA@| DCB "192.168.80.2", 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0O@HGNGLBEC@255?4255?4255?40?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0O@HGNGLBEC@255?4255?4255?40?$AA@| DCB "255.255.255.0", 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |ResetDefaultEBootCFG| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |ResetDefaultEBootCFG| PROC
; 1476 : {
00000 |$L45313|
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 |$M45311|
00004 e1a04000 mov r4, r0
; 1477 :
; 1478 : EdbgOutputDebugString("\r\nResetting factory default configuration...\r\n");
00008 e59f0074 ldr r0, [pc, #0x74]
0000c eb000000 bl EdbgOutputDebugString
; 1479 :
; 1480 : pEbootCFG->autoDownloadImage = FALSE;
; 1481 : pEbootCFG->IP = inet_addr("192.168.80.2");
00010 e59f0068 ldr r0, [pc, #0x68]
00014 e3a05000 mov r5, #0
00018 e5845000 str r5, [r4]
0001c eb000000 bl inet_addr
00020 e1a03000 mov r3, r0
; 1482 : pEbootCFG->subnetMask = inet_addr("255.255.255.0");
00024 e59f0050 ldr r0, [pc, #0x50]
00028 e5843004 str r3, [r4, #4]
0002c eb000000 bl inet_addr
; 1483 : pEbootCFG->numBootMe = 50;
; 1484 : pEbootCFG->delay = 50;
; 1485 : pEbootCFG->DHCPEnable = FALSE;
; 1486 : pEbootCFG->dwLaunchAddr = 0;
; 1487 : pEbootCFG->dwPhysStart = 0;
; 1488 : pEbootCFG->dwPhysLen = 0;
; 1489 : pEbootCFG->bootDeviceOrder = 0;
; 1490 : pEbootCFG->dwDbgSerPhysAddr = BULVERDE_BASE_REG_PA_BTUART;
; 1491 : pEbootCFG->dwStoreAddr = 0;
; 1492 : pEbootCFG->CheckSignatures = FALSE;
; 1493 : pEbootCFG->ConfigMagicNumber = EBOOT_CFG_MAGIC_NUMBER;
00030 e59f2040 ldr r2, [pc, #0x40]
00034 e3a03101 mov r3, #1, 2
00038 e3833602 orr r3, r3, #2, 12
0003c e3a01032 mov r1, #0x32
00040 e5843028 str r3, [r4, #0x28]
00044 e584202c str r2, [r4, #0x2C]
00048 e5840008 str r0, [r4, #8]
0004c e584100c str r1, [r4, #0xC]
00050 e5841010 str r1, [r4, #0x10]
00054 e5845014 str r5, [r4, #0x14]
00058 e5845024 str r5, [r4, #0x24]
0005c e584501c str r5, [r4, #0x1C]
00060 e5845020 str r5, [r4, #0x20]
00064 e5845018 str r5, [r4, #0x18]
00068 e5845030 str r5, [r4, #0x30]
0006c e5845034 str r5, [r4, #0x34]
; 1494 :
; 1495 : }
00070 e8bd4030 ldmia sp!, {r4, r5, lr}
00074 e12fff1e bx lr
00078 |$L45316|
00078 01020304 DCD 0x1020304
0007c 00000000 DCD |??_C@_0O@HGNGLBEC@255?4255?4255?40?$AA@|
00080 00000000 DCD |??_C@_0N@OAGNHFJJ@192?4168?480?42?$AA@|
00084 00000000 DCD |??_C@_0CP@LKBEOLND@?$AN?6Resetting?5factory?5default?5conf@|
00088 |$M45312|
ENDP ; |ResetDefaultEBootCFG|
EXPORT |??_C@_0DF@KJLNJPCN@ERROR?3?5LoadEBootCFG?3?5failed?5to?5l@| [ DATA ] ; `string'
IMPORT |BootDevice_Read|
00000 AREA |.text| { |LoadEBootCFG| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$LoadEBootCFG|, PDATA, SELECTION=5, ASSOC=|.text| { |LoadEBootCFG| } ; comdat associative
|$T45325| DCD |$L45324|
DCD 0x40002001
00000 AREA |.rdata| { |??_C@_0DF@KJLNJPCN@ERROR?3?5LoadEBootCFG?3?5failed?5to?5l@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DF@KJLNJPCN@ERROR?3?5LoadEBootCFG?3?5failed?5to?5l@| DCB "ERROR: "
DCB "LoadEBootCFG: failed to load configuration.", 0xd, 0xa, 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |LoadEBootCFG| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |LoadEBootCFG| PROC
; 1505 : {
00000 |$L45324|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M45322|
00004 e1a04000 mov r4, r0
; 1506 :
; 1507 : if (!BootDevice_Read(EBOOT_FLASH_CFG_START, (PUCHAR)EBootCFG, sizeof(EBOOT_CFG)))
00008 e3a01000 mov r1, #0
0000c e3a00701 mov r0, #1, 14
00010 eb000000 bl OALPAtoVA
00014 e3a0203c mov r2, #0x3C
00018 e1a01004 mov r1, r4
0001c eb000000 bl BootDevice_Read
00020 e3500000 cmp r0, #0
00024 1a000004 bne |$L44787|
; 1508 : {
; 1509 : EdbgOutputDebugString("ERROR: LoadEBootCFG: failed to load configuration.\r\n");
00028 e59f004c ldr r0, [pc, #0x4C]
0002c eb000000 bl EdbgOutputDebugString
; 1510 : return(FALSE);
00030 e3a00000 mov r0, #0
; 1548 : }
00034 e8bd4010 ldmia sp!, {r4, lr}
00038 e12fff1e bx lr
0003c |$L44787|
; 1511 : }
; 1512 :
; 1513 : #if 0
; 1514 : EdbgOutputDebugString("EBootCFG->autoDownloadImage = %X.\r\n", EBootCFG->autoDownloadImage);
; 1515 : EdbgOutputDebugString("EBootCFG->IP = %X.\r\n", EBootCFG->IP);
; 1516 : EdbgOutputDebugString("EBootCFG->subnetMask = %X.\r\n", EBootCFG->subnetMask);
; 1517 : EdbgOutputDebugString("EBootCFG->numBootMe = %X.\r\n", EBootCFG->numBootMe);
; 1518 : EdbgOutputDebugString("EBootCFG->delay = %X.\r\n", EBootCFG->delay);
; 1519 : EdbgOutputDebugString("EBootCFG->DHCPEnable = %X.\r\n", EBootCFG->DHCPEnable);
; 1520 : EdbgOutputDebugString("EBootCFG->bootDeviceOrder = %X.\r\n", EBootCFG->bootDeviceOrder);
; 1521 : EdbgOutputDebugString("EBootCFG->dwPhysStart = %X.\r\n", EBootCFG->dwPhysStart);
; 1522 : EdbgOutputDebugString("EBootCFG->dwLaunchAddr = %X.\r\n", EBootCFG->dwLaunchAddr);
; 1523 : EdbgOutputDebugString("EBootCFG->dwDbgSerPhysAddr = %X.\r\n", EBootCFG->dwDbgSerPhysAddr);
; 1524 : EdbgOutputDebugString("EBootCFG->ConfigMagicNumber = %X.\r\n", EBootCFG->ConfigMagicNumber);
; 1525 : EdbgOutputDebugString("EBootCFG->dwStoreAddr = %X.\r\n", EBootCFG->dwStoreAddr);
; 1526 : EdbgOutputDebugString("EBootCFG->CheckSignatures = %X.\r\n", EBootCFG->CheckSignatures);
; 1527 : EdbgOutputDebugString("EBootCFG->DownloadMode = %X.\r\n", EBootCFG->DownloadMode);
; 1528 : #endif
; 1529 :
; 1530 : // Is the CFG data valid? Check for the magic number that was written the last time
; 1531 : // the CFG block was updated. If Eboot has never been run, there will be no configuration
; 1532 : // information, so the magic number will likely not be found. In this case, setup the
; 1533 : // factory defaults and store them into Flash.
; 1534 : //
; 1535 : if (EBootCFG->ConfigMagicNumber != EBOOT_CFG_MAGIC_NUMBER)
0003c e594202c ldr r2, [r4, #0x2C]
00040 e59f3030 ldr r3, [pc, #0x30]
00044 e1520003 cmp r2, r3
; 1536 : {
; 1537 : ResetDefaultEBootCFG(EBootCFG);
00048 11a00004 movne r0, r4
0004c 1b000000 blne ResetDefaultEBootCFG
; 1538 : }
; 1539 :
; 1540 : // Make sure a valid debug serial port address (physical) was found.
; 1541 : //
; 1542 : if (g_EbootCFG.dwDbgSerPhysAddr == 0)
00050 e59f201c ldr r2, [pc, #0x1C]
; 1543 : {
; 1544 : g_EbootCFG.dwDbgSerPhysAddr = BULVERDE_BASE_REG_PA_BTUART;
; 1545 : }
; 1546 :
; 1547 : return(TRUE);
00054 e3a00001 mov r0, #1
00058 e5923028 ldr r3, [r2, #0x28]
0005c e3530000 cmp r3, #0
00060 03a03101 moveq r3, #1, 2
00064 03833602 orreq r3, r3, #2, 12
00068 05823028 streq r3, [r2, #0x28]
; 1548 : }
0006c e8bd4010 ldmia sp!, {r4, lr}
00070 e12fff1e bx lr
00074 |$L45327|
00074 00000000 DCD |g_EbootCFG|
00078 01020304 DCD 0x1020304
0007c 00000000 DCD |??_C@_0DF@KJLNJPCN@ERROR?3?5LoadEBootCFG?3?5failed?5to?5l@|
00080 |$M45323|
ENDP ; |LoadEBootCFG|
EXPORT |??_C@_0BJ@IFGBBFMB@?$AN?6Enter?5new?5IP?5address?3?5?$AA@| [ DATA ] ; `string'
IMPORT |OEMReadDebugByte|
IMPORT |OEMWriteDebugByte|
00000 AREA |.text| { |SetIP| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$SetIP|, PDATA, SELECTION=5, ASSOC=|.text| { |SetIP| } ; comdat associative
|$T45339| DCD |$L45338|
DCD 0x40003c02
00000 AREA |.rdata| { |??_C@_0BJ@IFGBBFMB@?$AN?6Enter?5new?5IP?5address?3?5?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BJ@IFGBBFMB@?$AN?6Enter?5new?5IP?5address?3?5?$AA@| DCB 0xd, 0xa, "E"
DCB "nter new IP address: ", 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |SetIP| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |SetIP| PROC
; 1552 : {
00000 |$L45338|
00000 e92d41f0 stmdb sp!, {r4 - r8, lr}
00004 e24dd014 sub sp, sp, #0x14
00008 |$M45336|
00008 e1a07000 mov r7, r0
0000c e59f30d8 ldr r3, [pc, #0xD8]
00010 e5933000 ldr r3, [r3]
00014 e58d3010 str r3, [sp, #0x10]
; 1553 : char szDottedD[16]; // The string used to collect the dotted decimal IP address
; 1554 : WORD cwNumChars = 0;
; 1555 : UINT16 InChar = 0;
; 1556 :
; 1557 : EdbgOutputDebugString ( "\r\nEnter new IP address: ");
00018 e59f00c8 ldr r0, [pc, #0xC8]
0001c e3a05000 mov r5, #0
00020 eb000000 bl EdbgOutputDebugString
; 1558 :
; 1559 : while (!((InChar == 0x0d) || (InChar == 0x0a)))
00024 e3a06000 mov r6, #0
00028 e28d8000 add r8, sp, #0
0002c |$L44799|
0002c e356000a cmp r6, #0xA
00030 0a00001f beq |$L44800|
; 1560 : {
; 1561 : InChar = OEMReadDebugByte();
00034 eb000000 bl OEMReadDebugByte
00038 e1a04800 mov r4, r0, lsl #16
0003c e1a04824 mov r4, r4, lsr #16
; 1562 : if (InChar != OEM_DEBUG_COM_ERROR && InChar != OEM_DEBUG_READ_NODATA)
00040 e1a06004 mov r6, r4
00044 e3740002 cmn r4, #2
00048 0a000017 beq |$L44804|
0004c e3740001 cmn r4, #1
00050 0a000015 beq |$L44804|
; 1563 : {
; 1564 : // If it's a number or a period, add it to the string
; 1565 : if (InChar == '.' || (InChar >= '0' && InChar <= '9'))
00054 e354002e cmp r4, #0x2E
00058 0a00000b beq |$L44803|
0005c e3540030 cmp r4, #0x30
00060 3a000001 bcc |$L44802|
00064 e3540039 cmp r4, #0x39
00068 9a000007 bls |$L44803|
0006c |$L44802|
; 1571 : }
; 1572 : }
; 1573 : // If it's a backspace, back up
; 1574 : else if (InChar == 8)
0006c e3540008 cmp r4, #8
00070 1a00000d bne |$L44804|
; 1575 : {
; 1576 : if (cwNumChars > 0)
00074 e1b03005 movs r3, r5
00078 0a00000b beq |$L44804|
; 1577 : {
; 1578 : cwNumChars--;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -