# HG changeset patch # User Mychaela Falconia # Date 1514132548 0 # Node ID b84fa089a560939c61e697aa93a96804676f13d8 # Parent 73039e3416c70e80e058eeefd248c85a498eacdc pirelli/fw-disasm: Switch_ON() code located diff -r 73039e3416c7 -r b84fa089a560 pirelli/fw-disasm --- a/pirelli/fw-disasm Sun Dec 24 04:43:48 2017 +0000 +++ b/pirelli/fw-disasm Sun Dec 24 16:22:28 2017 +0000 @@ -1418,6 +1418,332 @@ 39f2b0: bd10 pop {r4, pc} 39f2b2: 46c0 nop (mov r8, r8) +$Switch_ON: + 3a147c: b5f0 push {r4, r5, r6, r7, lr} + 3a147e: b082 sub sp, #8 + 3a1480: f7a7 ff44 bl 0x34930c ; $ABB_Read_Status + 3a1484: 49c8 ldr r1, =0x1774cd0 ; via 0x3a17a8 + 3a1486: 8008 strh r0, [r1, #0] + 3a1488: 2101 mov r1, #1 + 3a148a: 0902 lsr r2, r0, #4 + 3a148c: 4391 bic r1, r2 + 3a148e: 0609 lsl r1, r1, #24 + 3a1490: 0e0d lsr r5, r1, #24 + 3a1492: 09c1 lsr r1, r0, #7 + 3a1494: d309 bcc 0x3a14aa + 3a1496: 2104 mov r1, #4 + 3a1498: 4329 orr r1, r5 + 3a149a: 0609 lsl r1, r1, #24 + 3a149c: 0e0d lsr r5, r1, #24 + 3a149e: 0840 lsr r0, r0, #1 + 3a14a0: d303 bcc 0x3a14aa + 3a14a2: 2001 mov r0, #1 + 3a14a4: 4328 orr r0, r5 + 3a14a6: 0600 lsl r0, r0, #24 + 3a14a8: 0e05 lsr r5, r0, #24 + 3a14aa: 4ec0 ldr r6, =0xfffe1811 ; via 0x3a17ac + 3a14ac: 2000 mov r0, #0 + 3a14ae: 5630 ldrsb r0, [r6, r0] + 3a14b0: 09c0 lsr r0, r0, #7 + 3a14b2: d308 bcc 0x3a14c6 + 3a14b4: 2040 mov r0, #64 ; 0x40 + 3a14b6: 2100 mov r1, #0 + 3a14b8: 5671 ldrsb r1, [r6, r1] + 3a14ba: 4308 orr r0, r1 + 3a14bc: 7030 strb r0, [r6, #0] + 3a14be: 2008 mov r0, #8 + 3a14c0: 4328 orr r0, r5 + 3a14c2: 0600 lsl r0, r0, #24 + 3a14c4: 0e05 lsr r5, r0, #24 + 3a14c6: 2001 mov r0, #1 + 3a14c8: 211e mov r1, #30 ; 0x1e + 3a14ca: 2200 mov r2, #0 + 3a14cc: f7a7 fe9e bl 0x34920c + 3a14d0: 2001 mov r0, #1 + 3a14d2: f710 f9e4 bl 0x2b189e + 3a14d6: 4fb1 ldr r7, =0x1774e38 ; via 0x3a179c + 3a14d8: 2001 mov r0, #1 + 3a14da: 211e mov r1, #30 ; 0x1e + 3a14dc: f7a7 febd bl 0x34925a + 3a14e0: 6839 ldr r1, [r7, #0] + 3a14e2: 8088 strh r0, [r1, #4] + 3a14e4: f78c fb00 bl 0x32dae8 + 3a14e8: 1c04 add r4, r0, #0 + 3a14ea: 6838 ldr r0, [r7, #0] + 3a14ec: 1c02 add r2, r0, #0 + 3a14ee: 2106 mov r1, #6 + 3a14f0: 8893 ldrh r3, [r2, #4] + 3a14f2: 8283 strh r3, [r0, #20] ; 0x14 + 3a14f4: 3002 add r0, #2 + 3a14f6: 3901 sub r1, #1 + 3a14f8: 2900 cmp r1, #0 + 3a14fa: d1f9 bne 0x3a14f0 + 3a14fc: 48a9 ldr r0, =0xa0020 ; via 0x3a17a4 + 3a14fe: 9000 str r0, [sp, #0] + 3a1500: a090 add r0, pc, #576 ; 0x240 + 3a1502: 2118 mov r1, #24 ; 0x18 + 3a1504: 1c22 add r2, r4, #0 + 3a1506: 2305 mov r3, #5 + 3a1508: f039 fb94 bl 0x3dac34 + 3a150c: 48a8 ldr r0, =0x1774cd4 ; via 0x3a17b0 + 3a150e: 6802 ldr r2, [r0, #0] + 3a1510: 48a4 ldr r0, =0xa0020 ; via 0x3a17a4 + 3a1512: 9000 str r0, [sp, #0] + 3a1514: a092 add r0, pc, #584 ; 0x248 + 3a1516: 2113 mov r1, #19 ; 0x13 + 3a1518: 2305 mov r3, #5 + 3a151a: f039 fb8b bl 0x3dac34 + 3a151e: 48a5 ldr r0, =0x1774b7c ; via 0x3a17b4 + 3a1520: 8004 strh r4, [r0, #0] + 3a1522: 1c20 add r0, r4, #0 + 3a1524: f78c fd63 bl 0x32dfee + 3a1528: 1c02 add r2, r0, #0 + 3a152a: 48a3 ldr r0, =0x1774ccc ; via 0x3a17b8 + 3a152c: 8002 strh r2, [r0, #0] + 3a152e: 489d ldr r0, =0xa0020 ; via 0x3a17a4 + 3a1530: 9000 str r0, [sp, #0] + 3a1532: a090 add r0, pc, #576 ; 0x240 + 3a1534: 2114 mov r1, #20 ; 0x14 + 3a1536: 2305 mov r3, #5 + 3a1538: f039 fb7c bl 0x3dac34 + 3a153c: 489f ldr r0, =0xd2a ; via 0x3a17bc + 3a153e: 4284 cmp r4, r0 + 3a1540: da03 bge 0x3a154a + 3a1542: 2002 mov r0, #2 + 3a1544: 4328 orr r0, r5 + 3a1546: 0600 lsl r0, r0, #24 + 3a1548: 0e05 lsr r5, r0, #24 + 3a154a: 0928 lsr r0, r5, #4 + 3a154c: d309 bcc 0x3a1562 + 3a154e: 489b ldr r0, =0xd2a ; via 0x3a17bc + 3a1550: 4284 cmp r4, r0 + 3a1552: da06 bge 0x3a1562 + 3a1554: 20f7 mov r0, #247 ; 0xf7 + 3a1556: 7871 ldrb r1, [r6, #1] + 3a1558: 4008 and r0, r1 + 3a155a: 7070 strb r0, [r6, #1] + 3a155c: f7a8 f98c bl 0x349878 + 3a1560: e024 b 0x3a15ac + 3a1562: 2040 mov r0, #64 ; 0x40 + 3a1564: f03d fe5f bl 0x3df226 + 3a1568: 2107 mov r1, #7 + 3a156a: 2001 mov r0, #1 + 3a156c: 4088 lsl r0, r1 + 3a156e: 4028 and r0, r5 + 3a1570: 0600 lsl r0, r0, #24 + 3a1572: 0e00 lsr r0, r0, #24 + 3a1574: 2800 cmp r0, #0 + 3a1576: d104 bne 0x3a1582 + 3a1578: 1e49 sub r1, r1, #1 + 3a157a: 0409 lsl r1, r1, #16 + 3a157c: 1409 asr r1, r1, #16 + 3a157e: 2900 cmp r1, #0 + 3a1580: d5f3 bpl 0x3a156a + 3a1582: 2200 mov r2, #0 + 3a1584: 2802 cmp r0, #2 + 3a1586: d000 beq 0x3a158a + 3a1588: 2201 mov r2, #1 + 3a158a: 07e9 lsl r1, r5, #31 + 3a158c: 0fc9 lsr r1, r1, #31 + 3a158e: 4311 orr r1, r2 + 3a1590: 2900 cmp r1, #0 + 3a1592: d100 bne 0x3a1596 + 3a1594: 2000 mov r0, #0 + 3a1596: 08e9 lsr r1, r5, #3 + 3a1598: d204 bcs 0x3a15a4 + 3a159a: f7ff ff1f bl 0x3a13dc + 3a159e: f012 fa73 bl 0x3b3a88 + 3a15a2: e003 b 0x3a15ac + 3a15a4: f7ff ff1a bl 0x3a13dc + 3a15a8: f000 f805 bl 0x3a15b6 + 3a15ac: b002 add sp, #8 + 3a15ae: bdf0 pop {r4, r5, r6, r7, pc} + +$Power_ON_Remote: + 3a15b0: 4770 bx lr + +$Power_OFF_Remote: + 3a15b2: 4770 bx lr + +$Power_IT_WakeUp: + 3a15b4: 4770 bx lr + +$PWR_Charger_Plug: + 3a15b6: b500 push {lr} + 3a15b8: 2132 mov r1, #50 ; 0x32 + 3a15ba: 4878 ldr r0, =0x1774e38 ; via 0x3a179c + 3a15bc: 6800 ldr r0, [r0, #0] + 3a15be: 5c08 ldrb r0, [r1, r0] + 3a15c0: 2800 cmp r0, #0 + 3a15c2: d103 bne 0x3a15cc + 3a15c4: 20ff mov r0, #255 ; 0xff + 3a15c6: 30b2 add r0, #178 ; 0xb2 + 3a15c8: f710 f969 bl 0x2b189e + 3a15cc: 2003 mov r0, #3 + 3a15ce: f789 fcc9 bl 0x32af64 + 3a15d2: f7f3 fb5d bl 0x394c90 + 3a15d6: f78c fc1b bl 0x32de10 + 3a15da: bd00 pop {pc} + +$PWR_Charger_Unplug: + 3a15dc: b500 push {lr} + 3a15de: b082 sub sp, #8 + 3a15e0: f7f3 fb8f bl 0x394d02 + 3a15e4: 486f ldr r0, =0xa0020 ; via 0x3a17a4 + 3a15e6: 9000 str r0, [sp, #0] + 3a15e8: a068 add r0, pc, #416 ; 0x1a0 + 3a15ea: 210e mov r1, #14 ; 0xe + 3a15ec: 2200 mov r2, #0 + 3a15ee: 43d2 mvn r2, r2 + 3a15f0: 2305 mov r3, #5 + 3a15f2: f039 fb1f bl 0x3dac34 + 3a15f6: 4872 ldr r0, =0x1774cce ; via 0x3a17c0 + 3a15f8: 2100 mov r1, #0 + 3a15fa: 7001 strb r1, [r0, #0] + 3a15fc: f740 fe77 bl 0x2e22ee + 3a1600: 2032 mov r0, #50 ; 0x32 + 3a1602: 4966 ldr r1, =0x1774e38 ; via 0x3a179c + 3a1604: 6809 ldr r1, [r1, #0] + 3a1606: 5c40 ldrb r0, [r0, r1] + 3a1608: 2800 cmp r0, #0 + 3a160a: d00a beq 0x3a1622 + 3a160c: 486d ldr r0, =0x1774ccf ; via 0x3a17c4 + 3a160e: 7800 ldrb r0, [r0, #0] + 3a1610: 2800 cmp r0, #0 + 3a1612: d103 bne 0x3a161c + 3a1614: 486c ldr r0, =0x1774cd2 ; via 0x3a17c8 + 3a1616: 7800 ldrb r0, [r0, #0] + 3a1618: 2800 cmp r0, #0 + 3a161a: d102 bne 0x3a1622 + 3a161c: f012 fa34 bl 0x3b3a88 + 3a1620: e004 b 0x3a162c + 3a1622: 2001 mov r0, #1 + 3a1624: 213c mov r1, #60 ; 0x3c + 3a1626: 2201 mov r2, #1 + 3a1628: f7a7 fdf0 bl 0x34920c + 3a162c: b002 add sp, #8 + 3a162e: bd00 pop {pc} + + 3a1630: 4965 ldr r1, =0x1774cd2 ; via 0x3a17c8 + 3a1632: 2001 mov r0, #1 + 3a1634: 7008 strb r0, [r1, #0] + 3a1636: 4770 bx lr + + 3a1638: 4963 ldr r1, =0x1774cd2 ; via 0x3a17c8 + 3a163a: 2000 mov r0, #0 + 3a163c: 7008 strb r0, [r1, #0] + 3a163e: 4770 bx lr + + 3a1640: b500 push {lr} + 3a1642: f7a7 fe63 bl 0x34930c + 3a1646: 0980 lsr r0, r0, #6 + 3a1648: 07c0 lsl r0, r0, #31 + 3a164a: 0fc0 lsr r0, r0, #31 + 3a164c: 0600 lsl r0, r0, #24 + 3a164e: 0e00 lsr r0, r0, #24 + 3a1650: bd00 pop {pc} + + 3a1652: b530 push {r4, r5, lr} + 3a1654: 2800 cmp r0, #0 + 3a1656: d101 bne 0x3a165c + 3a1658: 203d mov r0, #61 ; 0x3d + 3a165a: e000 b 0x3a165e + 3a165c: 203c mov r0, #60 ; 0x3c + 3a165e: 4d50 ldr r5, =0x1774e98 ; via 0x3a17a0 + 3a1660: 682c ldr r4, [r5, #0] + 3a1662: f055 fdd3 bl 0x3f720c + 3a1666: 2005 mov r0, #5 + 3a1668: f710 f919 bl 0x2b189e + 3a166c: 686c ldr r4, [r5, #4] + 3a166e: f055 fdcd bl 0x3f720c + 3a1672: bd30 pop {r4, r5, pc} + + 3a1674: b500 push {lr} + 3a1676: f7a7 fe49 bl 0x34930c + 3a167a: 4a4c ldr r2, =0xfffe1811 ; via 0x3a17ac + 3a167c: 2100 mov r1, #0 + 3a167e: 5651 ldrsb r1, [r2, r1] + 3a1680: 4308 orr r0, r1 + 3a1682: 09c0 lsr r0, r0, #7 + 3a1684: d208 bcs 0x3a1698 + 3a1686: f7a7 fe41 bl 0x34930c + 3a168a: 0940 lsr r0, r0, #5 + 3a168c: d304 bcc 0x3a1698 + 3a168e: 2001 mov r0, #1 + 3a1690: 213c mov r1, #60 ; 0x3c + 3a1692: 2201 mov r2, #1 + 3a1694: f7a7 fdba bl 0x34920c + 3a1698: bd00 pop {pc} + + 3a169a: b530 push {r4, r5, lr} + 3a169c: b081 sub sp, #4 + 3a169e: 2503 mov r5, #3 + 3a16a0: 4c4a ldr r4, =0x536718 ; via 0x3a17cc + 3a16a2: 7820 ldrb r0, [r4, #0] + 3a16a4: 280a cmp r0, #10 ; 0xa + 3a16a6: d005 beq 0x3a16b4 + 3a16a8: 2850 cmp r0, #80 ; 0x50 + 3a16aa: d134 bne 0x3a1716 + 3a16ac: 4669 mov r1, sp + 3a16ae: 2079 mov r0, #121 ; 0x79 + 3a16b0: 8048 strh r0, [r1, #2] + 3a16b2: e002 b 0x3a16ba + 3a16b4: 4668 mov r0, sp + 3a16b6: 2141 mov r1, #65 ; 0x41 + 3a16b8: 8041 strh r1, [r0, #2] + 3a16ba: 2001 mov r0, #1 + 3a16bc: 2138 mov r1, #56 ; 0x38 + 3a16be: 466a mov r2, sp + 3a16c0: 8852 ldrh r2, [r2, #2] + 3a16c2: f7a7 fda3 bl 0x34920c + 3a16c6: 4842 ldr r0, =0x4c4b40 ; via 0x3a17d0 + 3a16c8: f041 fc09 bl 0x3e2ede + 3a16cc: f041 fc81 bl 0x3e2fd2 + 3a16d0: 2001 mov r0, #1 + 3a16d2: 2128 mov r1, #40 ; 0x28 + 3a16d4: 2200 mov r2, #0 + 3a16d6: f7a7 fd99 bl 0x34920c + 3a16da: 483d ldr r0, =0x4c4b40 ; via 0x3a17d0 + 3a16dc: f041 fbff bl 0x3e2ede + 3a16e0: f041 fc77 bl 0x3e2fd2 + 3a16e4: 2001 mov r0, #1 + 3a16e6: 2138 mov r1, #56 ; 0x38 + 3a16e8: 2201 mov r2, #1 + 3a16ea: f7a7 fd8f bl 0x34920c + 3a16ee: 2001 mov r0, #1 + 3a16f0: 2128 mov r1, #40 ; 0x28 + 3a16f2: f7a7 fdb2 bl 0x34925a + 3a16f6: 4669 mov r1, sp + 3a16f8: 8008 strh r0, [r1, #0] + 3a16fa: 4668 mov r0, sp + 3a16fc: 8800 ldrh r0, [r0, #0] + 3a16fe: 8861 ldrh r1, [r4, #2] + 3a1700: 4288 cmp r0, r1 + 3a1702: db08 blt 0x3a1716 + 3a1704: 4668 mov r0, sp + 3a1706: 8801 ldrh r1, [r0, #0] + 3a1708: 88a0 ldrh r0, [r4, #4] + 3a170a: 4281 cmp r1, r0 + 3a170c: dc03 bgt 0x3a1716 + 3a170e: 4828 ldr r0, =0x1774cd4 ; via 0x3a17b0 + 3a1710: 68a1 ldr r1, [r4, #8] + 3a1712: 6001 str r1, [r0, #0] + 3a1714: e006 b 0x3a1724 + 3a1716: 340c add r4, #12 ; 0xc + 3a1718: 3d01 sub r5, #1 + 3a171a: 2d00 cmp r5, #0 + 3a171c: d1c1 bne 0x3a16a2 + 3a171e: 4924 ldr r1, =0x1774cd4 ; via 0x3a17b0 + 3a1720: 2001 mov r0, #1 + 3a1722: 6008 str r0, [r1, #0] + 3a1724: b001 add sp, #4 + 3a1726: bd30 pop {r4, r5, pc} + + 3a1728: 4821 ldr r0, =0x1774cd4 ; via 0x3a17b0 + 3a172a: 6800 ldr r0, [r0, #0] + 3a172c: 4770 bx lr + 3a172e: 46c0 nop (mov r8, r8) + $Init_Target: 3bb7d4: b570 push {r4, r5, r6, lr} 3bb7d6: b081 sub sp, #4 @@ -2473,7 +2799,7 @@ 3e8cc4: 5481 strb r1, [r0, r2] 3e8cc6: 200c mov r0, #12 ; 0xc 3e8cc8: f7f6 fff1 bl 0x3dfcae ; $IQ_Unmask - 3e8ccc: f7b8 fbd6 bl 0x3a147c ; $Set_Switch_ON_Cause + 3e8ccc: f7b8 fbd6 bl 0x3a147c ; $Switch_ON 3e8cd0: 4668 mov r0, sp 3e8cd2: 7a00 ldrb r0, [r0, #8] 3e8cd4: 2800 cmp r0, #0