Files
yau07b-stm32/Debug/yau-07b.list

49153 lines
1.8 MiB

yau-07b.elf: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .isr_vector 000001ac 08000000 08000000 00010000 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .text 00014800 080001b0 080001b0 000101b0 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 000032c4 080149b0 080149b0 000249b0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .ARM.extab 00000000 08017c74 08017c74 000309e0 2**0
CONTENTS
4 .ARM 00000008 08017c74 08017c74 00027c74 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .preinit_array 00000000 08017c7c 08017c7c 000309e0 2**0
CONTENTS, ALLOC, LOAD, DATA
6 .init_array 00000008 08017c7c 08017c7c 00027c7c 2**2
CONTENTS, ALLOC, LOAD, DATA
7 .fini_array 00000004 08017c84 08017c84 00027c84 2**2
CONTENTS, ALLOC, LOAD, DATA
8 .data 000009e0 20000000 08017c88 00030000 2**3
CONTENTS, ALLOC, LOAD, DATA
9 .ccmram 00000000 10000000 10000000 000309e0 2**0
CONTENTS
10 .bss 0000839c 200009e0 200009e0 000309e0 2**2
ALLOC
11 ._user_heap_stack 00000604 20008d7c 20008d7c 000309e0 2**0
ALLOC
12 .ARM.attributes 00000030 00000000 00000000 000309e0 2**0
CONTENTS, READONLY
13 .debug_info 00018d19 00000000 00000000 00030a10 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
14 .debug_abbrev 0000484f 00000000 00000000 00049729 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
15 .debug_aranges 000011c8 00000000 00000000 0004df78 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
16 .debug_ranges 00001148 00000000 00000000 0004f140 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
17 .debug_macro 0002dfa9 00000000 00000000 00050288 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
18 .debug_line 0001e3d9 00000000 00000000 0007e231 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
19 .debug_str 000e7bec 00000000 00000000 0009c60a 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
20 .comment 00000050 00000000 00000000 001841f6 2**0
CONTENTS, READONLY
21 .debug_frame 00005abc 00000000 00000000 00184248 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
22 .stab 000000cc 00000000 00000000 00189d04 2**2
CONTENTS, READONLY, DEBUGGING
23 .stabstr 000001b9 00000000 00000000 00189dd0 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
080001b0 <__do_global_dtors_aux>:
80001b0: b510 push {r4, lr}
80001b2: 4c05 ldr r4, [pc, #20] ; (80001c8 <__do_global_dtors_aux+0x18>)
80001b4: 7823 ldrb r3, [r4, #0]
80001b6: b933 cbnz r3, 80001c6 <__do_global_dtors_aux+0x16>
80001b8: 4b04 ldr r3, [pc, #16] ; (80001cc <__do_global_dtors_aux+0x1c>)
80001ba: b113 cbz r3, 80001c2 <__do_global_dtors_aux+0x12>
80001bc: 4804 ldr r0, [pc, #16] ; (80001d0 <__do_global_dtors_aux+0x20>)
80001be: f3af 8000 nop.w
80001c2: 2301 movs r3, #1
80001c4: 7023 strb r3, [r4, #0]
80001c6: bd10 pop {r4, pc}
80001c8: 200009e0 .word 0x200009e0
80001cc: 00000000 .word 0x00000000
80001d0: 08014998 .word 0x08014998
080001d4 <frame_dummy>:
80001d4: b508 push {r3, lr}
80001d6: 4b03 ldr r3, [pc, #12] ; (80001e4 <frame_dummy+0x10>)
80001d8: b11b cbz r3, 80001e2 <frame_dummy+0xe>
80001da: 4903 ldr r1, [pc, #12] ; (80001e8 <frame_dummy+0x14>)
80001dc: 4803 ldr r0, [pc, #12] ; (80001ec <frame_dummy+0x18>)
80001de: f3af 8000 nop.w
80001e2: bd08 pop {r3, pc}
80001e4: 00000000 .word 0x00000000
80001e8: 200009e4 .word 0x200009e4
80001ec: 08014998 .word 0x08014998
080001f0 <strlen>:
80001f0: 4603 mov r3, r0
80001f2: f813 2b01 ldrb.w r2, [r3], #1
80001f6: 2a00 cmp r2, #0
80001f8: d1fb bne.n 80001f2 <strlen+0x2>
80001fa: 1a18 subs r0, r3, r0
80001fc: 3801 subs r0, #1
80001fe: 4770 bx lr
08000200 <memchr>:
8000200: f001 01ff and.w r1, r1, #255 ; 0xff
8000204: 2a10 cmp r2, #16
8000206: db2b blt.n 8000260 <memchr+0x60>
8000208: f010 0f07 tst.w r0, #7
800020c: d008 beq.n 8000220 <memchr+0x20>
800020e: f810 3b01 ldrb.w r3, [r0], #1
8000212: 3a01 subs r2, #1
8000214: 428b cmp r3, r1
8000216: d02d beq.n 8000274 <memchr+0x74>
8000218: f010 0f07 tst.w r0, #7
800021c: b342 cbz r2, 8000270 <memchr+0x70>
800021e: d1f6 bne.n 800020e <memchr+0xe>
8000220: b4f0 push {r4, r5, r6, r7}
8000222: ea41 2101 orr.w r1, r1, r1, lsl #8
8000226: ea41 4101 orr.w r1, r1, r1, lsl #16
800022a: f022 0407 bic.w r4, r2, #7
800022e: f07f 0700 mvns.w r7, #0
8000232: 2300 movs r3, #0
8000234: e8f0 5602 ldrd r5, r6, [r0], #8
8000238: 3c08 subs r4, #8
800023a: ea85 0501 eor.w r5, r5, r1
800023e: ea86 0601 eor.w r6, r6, r1
8000242: fa85 f547 uadd8 r5, r5, r7
8000246: faa3 f587 sel r5, r3, r7
800024a: fa86 f647 uadd8 r6, r6, r7
800024e: faa5 f687 sel r6, r5, r7
8000252: b98e cbnz r6, 8000278 <memchr+0x78>
8000254: d1ee bne.n 8000234 <memchr+0x34>
8000256: bcf0 pop {r4, r5, r6, r7}
8000258: f001 01ff and.w r1, r1, #255 ; 0xff
800025c: f002 0207 and.w r2, r2, #7
8000260: b132 cbz r2, 8000270 <memchr+0x70>
8000262: f810 3b01 ldrb.w r3, [r0], #1
8000266: 3a01 subs r2, #1
8000268: ea83 0301 eor.w r3, r3, r1
800026c: b113 cbz r3, 8000274 <memchr+0x74>
800026e: d1f8 bne.n 8000262 <memchr+0x62>
8000270: 2000 movs r0, #0
8000272: 4770 bx lr
8000274: 3801 subs r0, #1
8000276: 4770 bx lr
8000278: 2d00 cmp r5, #0
800027a: bf06 itte eq
800027c: 4635 moveq r5, r6
800027e: 3803 subeq r0, #3
8000280: 3807 subne r0, #7
8000282: f015 0f01 tst.w r5, #1
8000286: d107 bne.n 8000298 <memchr+0x98>
8000288: 3001 adds r0, #1
800028a: f415 7f80 tst.w r5, #256 ; 0x100
800028e: bf02 ittt eq
8000290: 3001 addeq r0, #1
8000292: f415 3fc0 tsteq.w r5, #98304 ; 0x18000
8000296: 3001 addeq r0, #1
8000298: bcf0 pop {r4, r5, r6, r7}
800029a: 3801 subs r0, #1
800029c: 4770 bx lr
800029e: bf00 nop
080002a0 <__aeabi_drsub>:
80002a0: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000
80002a4: e002 b.n 80002ac <__adddf3>
80002a6: bf00 nop
080002a8 <__aeabi_dsub>:
80002a8: f083 4300 eor.w r3, r3, #2147483648 ; 0x80000000
080002ac <__adddf3>:
80002ac: b530 push {r4, r5, lr}
80002ae: ea4f 0441 mov.w r4, r1, lsl #1
80002b2: ea4f 0543 mov.w r5, r3, lsl #1
80002b6: ea94 0f05 teq r4, r5
80002ba: bf08 it eq
80002bc: ea90 0f02 teqeq r0, r2
80002c0: bf1f itttt ne
80002c2: ea54 0c00 orrsne.w ip, r4, r0
80002c6: ea55 0c02 orrsne.w ip, r5, r2
80002ca: ea7f 5c64 mvnsne.w ip, r4, asr #21
80002ce: ea7f 5c65 mvnsne.w ip, r5, asr #21
80002d2: f000 80e2 beq.w 800049a <__adddf3+0x1ee>
80002d6: ea4f 5454 mov.w r4, r4, lsr #21
80002da: ebd4 5555 rsbs r5, r4, r5, lsr #21
80002de: bfb8 it lt
80002e0: 426d neglt r5, r5
80002e2: dd0c ble.n 80002fe <__adddf3+0x52>
80002e4: 442c add r4, r5
80002e6: ea80 0202 eor.w r2, r0, r2
80002ea: ea81 0303 eor.w r3, r1, r3
80002ee: ea82 0000 eor.w r0, r2, r0
80002f2: ea83 0101 eor.w r1, r3, r1
80002f6: ea80 0202 eor.w r2, r0, r2
80002fa: ea81 0303 eor.w r3, r1, r3
80002fe: 2d36 cmp r5, #54 ; 0x36
8000300: bf88 it hi
8000302: bd30 pophi {r4, r5, pc}
8000304: f011 4f00 tst.w r1, #2147483648 ; 0x80000000
8000308: ea4f 3101 mov.w r1, r1, lsl #12
800030c: f44f 1c80 mov.w ip, #1048576 ; 0x100000
8000310: ea4c 3111 orr.w r1, ip, r1, lsr #12
8000314: d002 beq.n 800031c <__adddf3+0x70>
8000316: 4240 negs r0, r0
8000318: eb61 0141 sbc.w r1, r1, r1, lsl #1
800031c: f013 4f00 tst.w r3, #2147483648 ; 0x80000000
8000320: ea4f 3303 mov.w r3, r3, lsl #12
8000324: ea4c 3313 orr.w r3, ip, r3, lsr #12
8000328: d002 beq.n 8000330 <__adddf3+0x84>
800032a: 4252 negs r2, r2
800032c: eb63 0343 sbc.w r3, r3, r3, lsl #1
8000330: ea94 0f05 teq r4, r5
8000334: f000 80a7 beq.w 8000486 <__adddf3+0x1da>
8000338: f1a4 0401 sub.w r4, r4, #1
800033c: f1d5 0e20 rsbs lr, r5, #32
8000340: db0d blt.n 800035e <__adddf3+0xb2>
8000342: fa02 fc0e lsl.w ip, r2, lr
8000346: fa22 f205 lsr.w r2, r2, r5
800034a: 1880 adds r0, r0, r2
800034c: f141 0100 adc.w r1, r1, #0
8000350: fa03 f20e lsl.w r2, r3, lr
8000354: 1880 adds r0, r0, r2
8000356: fa43 f305 asr.w r3, r3, r5
800035a: 4159 adcs r1, r3
800035c: e00e b.n 800037c <__adddf3+0xd0>
800035e: f1a5 0520 sub.w r5, r5, #32
8000362: f10e 0e20 add.w lr, lr, #32
8000366: 2a01 cmp r2, #1
8000368: fa03 fc0e lsl.w ip, r3, lr
800036c: bf28 it cs
800036e: f04c 0c02 orrcs.w ip, ip, #2
8000372: fa43 f305 asr.w r3, r3, r5
8000376: 18c0 adds r0, r0, r3
8000378: eb51 71e3 adcs.w r1, r1, r3, asr #31
800037c: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000
8000380: d507 bpl.n 8000392 <__adddf3+0xe6>
8000382: f04f 0e00 mov.w lr, #0
8000386: f1dc 0c00 rsbs ip, ip, #0
800038a: eb7e 0000 sbcs.w r0, lr, r0
800038e: eb6e 0101 sbc.w r1, lr, r1
8000392: f5b1 1f80 cmp.w r1, #1048576 ; 0x100000
8000396: d31b bcc.n 80003d0 <__adddf3+0x124>
8000398: f5b1 1f00 cmp.w r1, #2097152 ; 0x200000
800039c: d30c bcc.n 80003b8 <__adddf3+0x10c>
800039e: 0849 lsrs r1, r1, #1
80003a0: ea5f 0030 movs.w r0, r0, rrx
80003a4: ea4f 0c3c mov.w ip, ip, rrx
80003a8: f104 0401 add.w r4, r4, #1
80003ac: ea4f 5244 mov.w r2, r4, lsl #21
80003b0: f512 0f80 cmn.w r2, #4194304 ; 0x400000
80003b4: f080 809a bcs.w 80004ec <__adddf3+0x240>
80003b8: f1bc 4f00 cmp.w ip, #2147483648 ; 0x80000000
80003bc: bf08 it eq
80003be: ea5f 0c50 movseq.w ip, r0, lsr #1
80003c2: f150 0000 adcs.w r0, r0, #0
80003c6: eb41 5104 adc.w r1, r1, r4, lsl #20
80003ca: ea41 0105 orr.w r1, r1, r5
80003ce: bd30 pop {r4, r5, pc}
80003d0: ea5f 0c4c movs.w ip, ip, lsl #1
80003d4: 4140 adcs r0, r0
80003d6: eb41 0101 adc.w r1, r1, r1
80003da: 3c01 subs r4, #1
80003dc: bf28 it cs
80003de: f5b1 1f80 cmpcs.w r1, #1048576 ; 0x100000
80003e2: d2e9 bcs.n 80003b8 <__adddf3+0x10c>
80003e4: f091 0f00 teq r1, #0
80003e8: bf04 itt eq
80003ea: 4601 moveq r1, r0
80003ec: 2000 moveq r0, #0
80003ee: fab1 f381 clz r3, r1
80003f2: bf08 it eq
80003f4: 3320 addeq r3, #32
80003f6: f1a3 030b sub.w r3, r3, #11
80003fa: f1b3 0220 subs.w r2, r3, #32
80003fe: da0c bge.n 800041a <__adddf3+0x16e>
8000400: 320c adds r2, #12
8000402: dd08 ble.n 8000416 <__adddf3+0x16a>
8000404: f102 0c14 add.w ip, r2, #20
8000408: f1c2 020c rsb r2, r2, #12
800040c: fa01 f00c lsl.w r0, r1, ip
8000410: fa21 f102 lsr.w r1, r1, r2
8000414: e00c b.n 8000430 <__adddf3+0x184>
8000416: f102 0214 add.w r2, r2, #20
800041a: bfd8 it le
800041c: f1c2 0c20 rsble ip, r2, #32
8000420: fa01 f102 lsl.w r1, r1, r2
8000424: fa20 fc0c lsr.w ip, r0, ip
8000428: bfdc itt le
800042a: ea41 010c orrle.w r1, r1, ip
800042e: 4090 lslle r0, r2
8000430: 1ae4 subs r4, r4, r3
8000432: bfa2 ittt ge
8000434: eb01 5104 addge.w r1, r1, r4, lsl #20
8000438: 4329 orrge r1, r5
800043a: bd30 popge {r4, r5, pc}
800043c: ea6f 0404 mvn.w r4, r4
8000440: 3c1f subs r4, #31
8000442: da1c bge.n 800047e <__adddf3+0x1d2>
8000444: 340c adds r4, #12
8000446: dc0e bgt.n 8000466 <__adddf3+0x1ba>
8000448: f104 0414 add.w r4, r4, #20
800044c: f1c4 0220 rsb r2, r4, #32
8000450: fa20 f004 lsr.w r0, r0, r4
8000454: fa01 f302 lsl.w r3, r1, r2
8000458: ea40 0003 orr.w r0, r0, r3
800045c: fa21 f304 lsr.w r3, r1, r4
8000460: ea45 0103 orr.w r1, r5, r3
8000464: bd30 pop {r4, r5, pc}
8000466: f1c4 040c rsb r4, r4, #12
800046a: f1c4 0220 rsb r2, r4, #32
800046e: fa20 f002 lsr.w r0, r0, r2
8000472: fa01 f304 lsl.w r3, r1, r4
8000476: ea40 0003 orr.w r0, r0, r3
800047a: 4629 mov r1, r5
800047c: bd30 pop {r4, r5, pc}
800047e: fa21 f004 lsr.w r0, r1, r4
8000482: 4629 mov r1, r5
8000484: bd30 pop {r4, r5, pc}
8000486: f094 0f00 teq r4, #0
800048a: f483 1380 eor.w r3, r3, #1048576 ; 0x100000
800048e: bf06 itte eq
8000490: f481 1180 eoreq.w r1, r1, #1048576 ; 0x100000
8000494: 3401 addeq r4, #1
8000496: 3d01 subne r5, #1
8000498: e74e b.n 8000338 <__adddf3+0x8c>
800049a: ea7f 5c64 mvns.w ip, r4, asr #21
800049e: bf18 it ne
80004a0: ea7f 5c65 mvnsne.w ip, r5, asr #21
80004a4: d029 beq.n 80004fa <__adddf3+0x24e>
80004a6: ea94 0f05 teq r4, r5
80004aa: bf08 it eq
80004ac: ea90 0f02 teqeq r0, r2
80004b0: d005 beq.n 80004be <__adddf3+0x212>
80004b2: ea54 0c00 orrs.w ip, r4, r0
80004b6: bf04 itt eq
80004b8: 4619 moveq r1, r3
80004ba: 4610 moveq r0, r2
80004bc: bd30 pop {r4, r5, pc}
80004be: ea91 0f03 teq r1, r3
80004c2: bf1e ittt ne
80004c4: 2100 movne r1, #0
80004c6: 2000 movne r0, #0
80004c8: bd30 popne {r4, r5, pc}
80004ca: ea5f 5c54 movs.w ip, r4, lsr #21
80004ce: d105 bne.n 80004dc <__adddf3+0x230>
80004d0: 0040 lsls r0, r0, #1
80004d2: 4149 adcs r1, r1
80004d4: bf28 it cs
80004d6: f041 4100 orrcs.w r1, r1, #2147483648 ; 0x80000000
80004da: bd30 pop {r4, r5, pc}
80004dc: f514 0480 adds.w r4, r4, #4194304 ; 0x400000
80004e0: bf3c itt cc
80004e2: f501 1180 addcc.w r1, r1, #1048576 ; 0x100000
80004e6: bd30 popcc {r4, r5, pc}
80004e8: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000
80004ec: f045 41fe orr.w r1, r5, #2130706432 ; 0x7f000000
80004f0: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000
80004f4: f04f 0000 mov.w r0, #0
80004f8: bd30 pop {r4, r5, pc}
80004fa: ea7f 5c64 mvns.w ip, r4, asr #21
80004fe: bf1a itte ne
8000500: 4619 movne r1, r3
8000502: 4610 movne r0, r2
8000504: ea7f 5c65 mvnseq.w ip, r5, asr #21
8000508: bf1c itt ne
800050a: 460b movne r3, r1
800050c: 4602 movne r2, r0
800050e: ea50 3401 orrs.w r4, r0, r1, lsl #12
8000512: bf06 itte eq
8000514: ea52 3503 orrseq.w r5, r2, r3, lsl #12
8000518: ea91 0f03 teqeq r1, r3
800051c: f441 2100 orrne.w r1, r1, #524288 ; 0x80000
8000520: bd30 pop {r4, r5, pc}
8000522: bf00 nop
08000524 <__aeabi_ui2d>:
8000524: f090 0f00 teq r0, #0
8000528: bf04 itt eq
800052a: 2100 moveq r1, #0
800052c: 4770 bxeq lr
800052e: b530 push {r4, r5, lr}
8000530: f44f 6480 mov.w r4, #1024 ; 0x400
8000534: f104 0432 add.w r4, r4, #50 ; 0x32
8000538: f04f 0500 mov.w r5, #0
800053c: f04f 0100 mov.w r1, #0
8000540: e750 b.n 80003e4 <__adddf3+0x138>
8000542: bf00 nop
08000544 <__aeabi_i2d>:
8000544: f090 0f00 teq r0, #0
8000548: bf04 itt eq
800054a: 2100 moveq r1, #0
800054c: 4770 bxeq lr
800054e: b530 push {r4, r5, lr}
8000550: f44f 6480 mov.w r4, #1024 ; 0x400
8000554: f104 0432 add.w r4, r4, #50 ; 0x32
8000558: f010 4500 ands.w r5, r0, #2147483648 ; 0x80000000
800055c: bf48 it mi
800055e: 4240 negmi r0, r0
8000560: f04f 0100 mov.w r1, #0
8000564: e73e b.n 80003e4 <__adddf3+0x138>
8000566: bf00 nop
08000568 <__aeabi_f2d>:
8000568: 0042 lsls r2, r0, #1
800056a: ea4f 01e2 mov.w r1, r2, asr #3
800056e: ea4f 0131 mov.w r1, r1, rrx
8000572: ea4f 7002 mov.w r0, r2, lsl #28
8000576: bf1f itttt ne
8000578: f012 437f andsne.w r3, r2, #4278190080 ; 0xff000000
800057c: f093 4f7f teqne r3, #4278190080 ; 0xff000000
8000580: f081 5160 eorne.w r1, r1, #939524096 ; 0x38000000
8000584: 4770 bxne lr
8000586: f032 427f bics.w r2, r2, #4278190080 ; 0xff000000
800058a: bf08 it eq
800058c: 4770 bxeq lr
800058e: f093 4f7f teq r3, #4278190080 ; 0xff000000
8000592: bf04 itt eq
8000594: f441 2100 orreq.w r1, r1, #524288 ; 0x80000
8000598: 4770 bxeq lr
800059a: b530 push {r4, r5, lr}
800059c: f44f 7460 mov.w r4, #896 ; 0x380
80005a0: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000
80005a4: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000
80005a8: e71c b.n 80003e4 <__adddf3+0x138>
80005aa: bf00 nop
080005ac <__aeabi_ul2d>:
80005ac: ea50 0201 orrs.w r2, r0, r1
80005b0: bf08 it eq
80005b2: 4770 bxeq lr
80005b4: b530 push {r4, r5, lr}
80005b6: f04f 0500 mov.w r5, #0
80005ba: e00a b.n 80005d2 <__aeabi_l2d+0x16>
080005bc <__aeabi_l2d>:
80005bc: ea50 0201 orrs.w r2, r0, r1
80005c0: bf08 it eq
80005c2: 4770 bxeq lr
80005c4: b530 push {r4, r5, lr}
80005c6: f011 4500 ands.w r5, r1, #2147483648 ; 0x80000000
80005ca: d502 bpl.n 80005d2 <__aeabi_l2d+0x16>
80005cc: 4240 negs r0, r0
80005ce: eb61 0141 sbc.w r1, r1, r1, lsl #1
80005d2: f44f 6480 mov.w r4, #1024 ; 0x400
80005d6: f104 0432 add.w r4, r4, #50 ; 0x32
80005da: ea5f 5c91 movs.w ip, r1, lsr #22
80005de: f43f aed8 beq.w 8000392 <__adddf3+0xe6>
80005e2: f04f 0203 mov.w r2, #3
80005e6: ea5f 0cdc movs.w ip, ip, lsr #3
80005ea: bf18 it ne
80005ec: 3203 addne r2, #3
80005ee: ea5f 0cdc movs.w ip, ip, lsr #3
80005f2: bf18 it ne
80005f4: 3203 addne r2, #3
80005f6: eb02 02dc add.w r2, r2, ip, lsr #3
80005fa: f1c2 0320 rsb r3, r2, #32
80005fe: fa00 fc03 lsl.w ip, r0, r3
8000602: fa20 f002 lsr.w r0, r0, r2
8000606: fa01 fe03 lsl.w lr, r1, r3
800060a: ea40 000e orr.w r0, r0, lr
800060e: fa21 f102 lsr.w r1, r1, r2
8000612: 4414 add r4, r2
8000614: e6bd b.n 8000392 <__adddf3+0xe6>
8000616: bf00 nop
08000618 <__aeabi_dmul>:
8000618: b570 push {r4, r5, r6, lr}
800061a: f04f 0cff mov.w ip, #255 ; 0xff
800061e: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700
8000622: ea1c 5411 ands.w r4, ip, r1, lsr #20
8000626: bf1d ittte ne
8000628: ea1c 5513 andsne.w r5, ip, r3, lsr #20
800062c: ea94 0f0c teqne r4, ip
8000630: ea95 0f0c teqne r5, ip
8000634: f000 f8de bleq 80007f4 <__aeabi_dmul+0x1dc>
8000638: 442c add r4, r5
800063a: ea81 0603 eor.w r6, r1, r3
800063e: ea21 514c bic.w r1, r1, ip, lsl #21
8000642: ea23 534c bic.w r3, r3, ip, lsl #21
8000646: ea50 3501 orrs.w r5, r0, r1, lsl #12
800064a: bf18 it ne
800064c: ea52 3503 orrsne.w r5, r2, r3, lsl #12
8000650: f441 1180 orr.w r1, r1, #1048576 ; 0x100000
8000654: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
8000658: d038 beq.n 80006cc <__aeabi_dmul+0xb4>
800065a: fba0 ce02 umull ip, lr, r0, r2
800065e: f04f 0500 mov.w r5, #0
8000662: fbe1 e502 umlal lr, r5, r1, r2
8000666: f006 4200 and.w r2, r6, #2147483648 ; 0x80000000
800066a: fbe0 e503 umlal lr, r5, r0, r3
800066e: f04f 0600 mov.w r6, #0
8000672: fbe1 5603 umlal r5, r6, r1, r3
8000676: f09c 0f00 teq ip, #0
800067a: bf18 it ne
800067c: f04e 0e01 orrne.w lr, lr, #1
8000680: f1a4 04ff sub.w r4, r4, #255 ; 0xff
8000684: f5b6 7f00 cmp.w r6, #512 ; 0x200
8000688: f564 7440 sbc.w r4, r4, #768 ; 0x300
800068c: d204 bcs.n 8000698 <__aeabi_dmul+0x80>
800068e: ea5f 0e4e movs.w lr, lr, lsl #1
8000692: 416d adcs r5, r5
8000694: eb46 0606 adc.w r6, r6, r6
8000698: ea42 21c6 orr.w r1, r2, r6, lsl #11
800069c: ea41 5155 orr.w r1, r1, r5, lsr #21
80006a0: ea4f 20c5 mov.w r0, r5, lsl #11
80006a4: ea40 505e orr.w r0, r0, lr, lsr #21
80006a8: ea4f 2ece mov.w lr, lr, lsl #11
80006ac: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd
80006b0: bf88 it hi
80006b2: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700
80006b6: d81e bhi.n 80006f6 <__aeabi_dmul+0xde>
80006b8: f1be 4f00 cmp.w lr, #2147483648 ; 0x80000000
80006bc: bf08 it eq
80006be: ea5f 0e50 movseq.w lr, r0, lsr #1
80006c2: f150 0000 adcs.w r0, r0, #0
80006c6: eb41 5104 adc.w r1, r1, r4, lsl #20
80006ca: bd70 pop {r4, r5, r6, pc}
80006cc: f006 4600 and.w r6, r6, #2147483648 ; 0x80000000
80006d0: ea46 0101 orr.w r1, r6, r1
80006d4: ea40 0002 orr.w r0, r0, r2
80006d8: ea81 0103 eor.w r1, r1, r3
80006dc: ebb4 045c subs.w r4, r4, ip, lsr #1
80006e0: bfc2 ittt gt
80006e2: ebd4 050c rsbsgt r5, r4, ip
80006e6: ea41 5104 orrgt.w r1, r1, r4, lsl #20
80006ea: bd70 popgt {r4, r5, r6, pc}
80006ec: f441 1180 orr.w r1, r1, #1048576 ; 0x100000
80006f0: f04f 0e00 mov.w lr, #0
80006f4: 3c01 subs r4, #1
80006f6: f300 80ab bgt.w 8000850 <__aeabi_dmul+0x238>
80006fa: f114 0f36 cmn.w r4, #54 ; 0x36
80006fe: bfde ittt le
8000700: 2000 movle r0, #0
8000702: f001 4100 andle.w r1, r1, #2147483648 ; 0x80000000
8000706: bd70 pople {r4, r5, r6, pc}
8000708: f1c4 0400 rsb r4, r4, #0
800070c: 3c20 subs r4, #32
800070e: da35 bge.n 800077c <__aeabi_dmul+0x164>
8000710: 340c adds r4, #12
8000712: dc1b bgt.n 800074c <__aeabi_dmul+0x134>
8000714: f104 0414 add.w r4, r4, #20
8000718: f1c4 0520 rsb r5, r4, #32
800071c: fa00 f305 lsl.w r3, r0, r5
8000720: fa20 f004 lsr.w r0, r0, r4
8000724: fa01 f205 lsl.w r2, r1, r5
8000728: ea40 0002 orr.w r0, r0, r2
800072c: f001 4200 and.w r2, r1, #2147483648 ; 0x80000000
8000730: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000
8000734: eb10 70d3 adds.w r0, r0, r3, lsr #31
8000738: fa21 f604 lsr.w r6, r1, r4
800073c: eb42 0106 adc.w r1, r2, r6
8000740: ea5e 0e43 orrs.w lr, lr, r3, lsl #1
8000744: bf08 it eq
8000746: ea20 70d3 biceq.w r0, r0, r3, lsr #31
800074a: bd70 pop {r4, r5, r6, pc}
800074c: f1c4 040c rsb r4, r4, #12
8000750: f1c4 0520 rsb r5, r4, #32
8000754: fa00 f304 lsl.w r3, r0, r4
8000758: fa20 f005 lsr.w r0, r0, r5
800075c: fa01 f204 lsl.w r2, r1, r4
8000760: ea40 0002 orr.w r0, r0, r2
8000764: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000
8000768: eb10 70d3 adds.w r0, r0, r3, lsr #31
800076c: f141 0100 adc.w r1, r1, #0
8000770: ea5e 0e43 orrs.w lr, lr, r3, lsl #1
8000774: bf08 it eq
8000776: ea20 70d3 biceq.w r0, r0, r3, lsr #31
800077a: bd70 pop {r4, r5, r6, pc}
800077c: f1c4 0520 rsb r5, r4, #32
8000780: fa00 f205 lsl.w r2, r0, r5
8000784: ea4e 0e02 orr.w lr, lr, r2
8000788: fa20 f304 lsr.w r3, r0, r4
800078c: fa01 f205 lsl.w r2, r1, r5
8000790: ea43 0302 orr.w r3, r3, r2
8000794: fa21 f004 lsr.w r0, r1, r4
8000798: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000
800079c: fa21 f204 lsr.w r2, r1, r4
80007a0: ea20 0002 bic.w r0, r0, r2
80007a4: eb00 70d3 add.w r0, r0, r3, lsr #31
80007a8: ea5e 0e43 orrs.w lr, lr, r3, lsl #1
80007ac: bf08 it eq
80007ae: ea20 70d3 biceq.w r0, r0, r3, lsr #31
80007b2: bd70 pop {r4, r5, r6, pc}
80007b4: f094 0f00 teq r4, #0
80007b8: d10f bne.n 80007da <__aeabi_dmul+0x1c2>
80007ba: f001 4600 and.w r6, r1, #2147483648 ; 0x80000000
80007be: 0040 lsls r0, r0, #1
80007c0: eb41 0101 adc.w r1, r1, r1
80007c4: f411 1f80 tst.w r1, #1048576 ; 0x100000
80007c8: bf08 it eq
80007ca: 3c01 subeq r4, #1
80007cc: d0f7 beq.n 80007be <__aeabi_dmul+0x1a6>
80007ce: ea41 0106 orr.w r1, r1, r6
80007d2: f095 0f00 teq r5, #0
80007d6: bf18 it ne
80007d8: 4770 bxne lr
80007da: f003 4600 and.w r6, r3, #2147483648 ; 0x80000000
80007de: 0052 lsls r2, r2, #1
80007e0: eb43 0303 adc.w r3, r3, r3
80007e4: f413 1f80 tst.w r3, #1048576 ; 0x100000
80007e8: bf08 it eq
80007ea: 3d01 subeq r5, #1
80007ec: d0f7 beq.n 80007de <__aeabi_dmul+0x1c6>
80007ee: ea43 0306 orr.w r3, r3, r6
80007f2: 4770 bx lr
80007f4: ea94 0f0c teq r4, ip
80007f8: ea0c 5513 and.w r5, ip, r3, lsr #20
80007fc: bf18 it ne
80007fe: ea95 0f0c teqne r5, ip
8000802: d00c beq.n 800081e <__aeabi_dmul+0x206>
8000804: ea50 0641 orrs.w r6, r0, r1, lsl #1
8000808: bf18 it ne
800080a: ea52 0643 orrsne.w r6, r2, r3, lsl #1
800080e: d1d1 bne.n 80007b4 <__aeabi_dmul+0x19c>
8000810: ea81 0103 eor.w r1, r1, r3
8000814: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000
8000818: f04f 0000 mov.w r0, #0
800081c: bd70 pop {r4, r5, r6, pc}
800081e: ea50 0641 orrs.w r6, r0, r1, lsl #1
8000822: bf06 itte eq
8000824: 4610 moveq r0, r2
8000826: 4619 moveq r1, r3
8000828: ea52 0643 orrsne.w r6, r2, r3, lsl #1
800082c: d019 beq.n 8000862 <__aeabi_dmul+0x24a>
800082e: ea94 0f0c teq r4, ip
8000832: d102 bne.n 800083a <__aeabi_dmul+0x222>
8000834: ea50 3601 orrs.w r6, r0, r1, lsl #12
8000838: d113 bne.n 8000862 <__aeabi_dmul+0x24a>
800083a: ea95 0f0c teq r5, ip
800083e: d105 bne.n 800084c <__aeabi_dmul+0x234>
8000840: ea52 3603 orrs.w r6, r2, r3, lsl #12
8000844: bf1c itt ne
8000846: 4610 movne r0, r2
8000848: 4619 movne r1, r3
800084a: d10a bne.n 8000862 <__aeabi_dmul+0x24a>
800084c: ea81 0103 eor.w r1, r1, r3
8000850: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000
8000854: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000
8000858: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000
800085c: f04f 0000 mov.w r0, #0
8000860: bd70 pop {r4, r5, r6, pc}
8000862: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000
8000866: f441 0178 orr.w r1, r1, #16252928 ; 0xf80000
800086a: bd70 pop {r4, r5, r6, pc}
0800086c <__aeabi_ddiv>:
800086c: b570 push {r4, r5, r6, lr}
800086e: f04f 0cff mov.w ip, #255 ; 0xff
8000872: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700
8000876: ea1c 5411 ands.w r4, ip, r1, lsr #20
800087a: bf1d ittte ne
800087c: ea1c 5513 andsne.w r5, ip, r3, lsr #20
8000880: ea94 0f0c teqne r4, ip
8000884: ea95 0f0c teqne r5, ip
8000888: f000 f8a7 bleq 80009da <__aeabi_ddiv+0x16e>
800088c: eba4 0405 sub.w r4, r4, r5
8000890: ea81 0e03 eor.w lr, r1, r3
8000894: ea52 3503 orrs.w r5, r2, r3, lsl #12
8000898: ea4f 3101 mov.w r1, r1, lsl #12
800089c: f000 8088 beq.w 80009b0 <__aeabi_ddiv+0x144>
80008a0: ea4f 3303 mov.w r3, r3, lsl #12
80008a4: f04f 5580 mov.w r5, #268435456 ; 0x10000000
80008a8: ea45 1313 orr.w r3, r5, r3, lsr #4
80008ac: ea43 6312 orr.w r3, r3, r2, lsr #24
80008b0: ea4f 2202 mov.w r2, r2, lsl #8
80008b4: ea45 1511 orr.w r5, r5, r1, lsr #4
80008b8: ea45 6510 orr.w r5, r5, r0, lsr #24
80008bc: ea4f 2600 mov.w r6, r0, lsl #8
80008c0: f00e 4100 and.w r1, lr, #2147483648 ; 0x80000000
80008c4: 429d cmp r5, r3
80008c6: bf08 it eq
80008c8: 4296 cmpeq r6, r2
80008ca: f144 04fd adc.w r4, r4, #253 ; 0xfd
80008ce: f504 7440 add.w r4, r4, #768 ; 0x300
80008d2: d202 bcs.n 80008da <__aeabi_ddiv+0x6e>
80008d4: 085b lsrs r3, r3, #1
80008d6: ea4f 0232 mov.w r2, r2, rrx
80008da: 1ab6 subs r6, r6, r2
80008dc: eb65 0503 sbc.w r5, r5, r3
80008e0: 085b lsrs r3, r3, #1
80008e2: ea4f 0232 mov.w r2, r2, rrx
80008e6: f44f 1080 mov.w r0, #1048576 ; 0x100000
80008ea: f44f 2c00 mov.w ip, #524288 ; 0x80000
80008ee: ebb6 0e02 subs.w lr, r6, r2
80008f2: eb75 0e03 sbcs.w lr, r5, r3
80008f6: bf22 ittt cs
80008f8: 1ab6 subcs r6, r6, r2
80008fa: 4675 movcs r5, lr
80008fc: ea40 000c orrcs.w r0, r0, ip
8000900: 085b lsrs r3, r3, #1
8000902: ea4f 0232 mov.w r2, r2, rrx
8000906: ebb6 0e02 subs.w lr, r6, r2
800090a: eb75 0e03 sbcs.w lr, r5, r3
800090e: bf22 ittt cs
8000910: 1ab6 subcs r6, r6, r2
8000912: 4675 movcs r5, lr
8000914: ea40 005c orrcs.w r0, r0, ip, lsr #1
8000918: 085b lsrs r3, r3, #1
800091a: ea4f 0232 mov.w r2, r2, rrx
800091e: ebb6 0e02 subs.w lr, r6, r2
8000922: eb75 0e03 sbcs.w lr, r5, r3
8000926: bf22 ittt cs
8000928: 1ab6 subcs r6, r6, r2
800092a: 4675 movcs r5, lr
800092c: ea40 009c orrcs.w r0, r0, ip, lsr #2
8000930: 085b lsrs r3, r3, #1
8000932: ea4f 0232 mov.w r2, r2, rrx
8000936: ebb6 0e02 subs.w lr, r6, r2
800093a: eb75 0e03 sbcs.w lr, r5, r3
800093e: bf22 ittt cs
8000940: 1ab6 subcs r6, r6, r2
8000942: 4675 movcs r5, lr
8000944: ea40 00dc orrcs.w r0, r0, ip, lsr #3
8000948: ea55 0e06 orrs.w lr, r5, r6
800094c: d018 beq.n 8000980 <__aeabi_ddiv+0x114>
800094e: ea4f 1505 mov.w r5, r5, lsl #4
8000952: ea45 7516 orr.w r5, r5, r6, lsr #28
8000956: ea4f 1606 mov.w r6, r6, lsl #4
800095a: ea4f 03c3 mov.w r3, r3, lsl #3
800095e: ea43 7352 orr.w r3, r3, r2, lsr #29
8000962: ea4f 02c2 mov.w r2, r2, lsl #3
8000966: ea5f 1c1c movs.w ip, ip, lsr #4
800096a: d1c0 bne.n 80008ee <__aeabi_ddiv+0x82>
800096c: f411 1f80 tst.w r1, #1048576 ; 0x100000
8000970: d10b bne.n 800098a <__aeabi_ddiv+0x11e>
8000972: ea41 0100 orr.w r1, r1, r0
8000976: f04f 0000 mov.w r0, #0
800097a: f04f 4c00 mov.w ip, #2147483648 ; 0x80000000
800097e: e7b6 b.n 80008ee <__aeabi_ddiv+0x82>
8000980: f411 1f80 tst.w r1, #1048576 ; 0x100000
8000984: bf04 itt eq
8000986: 4301 orreq r1, r0
8000988: 2000 moveq r0, #0
800098a: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd
800098e: bf88 it hi
8000990: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700
8000994: f63f aeaf bhi.w 80006f6 <__aeabi_dmul+0xde>
8000998: ebb5 0c03 subs.w ip, r5, r3
800099c: bf04 itt eq
800099e: ebb6 0c02 subseq.w ip, r6, r2
80009a2: ea5f 0c50 movseq.w ip, r0, lsr #1
80009a6: f150 0000 adcs.w r0, r0, #0
80009aa: eb41 5104 adc.w r1, r1, r4, lsl #20
80009ae: bd70 pop {r4, r5, r6, pc}
80009b0: f00e 4e00 and.w lr, lr, #2147483648 ; 0x80000000
80009b4: ea4e 3111 orr.w r1, lr, r1, lsr #12
80009b8: eb14 045c adds.w r4, r4, ip, lsr #1
80009bc: bfc2 ittt gt
80009be: ebd4 050c rsbsgt r5, r4, ip
80009c2: ea41 5104 orrgt.w r1, r1, r4, lsl #20
80009c6: bd70 popgt {r4, r5, r6, pc}
80009c8: f441 1180 orr.w r1, r1, #1048576 ; 0x100000
80009cc: f04f 0e00 mov.w lr, #0
80009d0: 3c01 subs r4, #1
80009d2: e690 b.n 80006f6 <__aeabi_dmul+0xde>
80009d4: ea45 0e06 orr.w lr, r5, r6
80009d8: e68d b.n 80006f6 <__aeabi_dmul+0xde>
80009da: ea0c 5513 and.w r5, ip, r3, lsr #20
80009de: ea94 0f0c teq r4, ip
80009e2: bf08 it eq
80009e4: ea95 0f0c teqeq r5, ip
80009e8: f43f af3b beq.w 8000862 <__aeabi_dmul+0x24a>
80009ec: ea94 0f0c teq r4, ip
80009f0: d10a bne.n 8000a08 <__aeabi_ddiv+0x19c>
80009f2: ea50 3401 orrs.w r4, r0, r1, lsl #12
80009f6: f47f af34 bne.w 8000862 <__aeabi_dmul+0x24a>
80009fa: ea95 0f0c teq r5, ip
80009fe: f47f af25 bne.w 800084c <__aeabi_dmul+0x234>
8000a02: 4610 mov r0, r2
8000a04: 4619 mov r1, r3
8000a06: e72c b.n 8000862 <__aeabi_dmul+0x24a>
8000a08: ea95 0f0c teq r5, ip
8000a0c: d106 bne.n 8000a1c <__aeabi_ddiv+0x1b0>
8000a0e: ea52 3503 orrs.w r5, r2, r3, lsl #12
8000a12: f43f aefd beq.w 8000810 <__aeabi_dmul+0x1f8>
8000a16: 4610 mov r0, r2
8000a18: 4619 mov r1, r3
8000a1a: e722 b.n 8000862 <__aeabi_dmul+0x24a>
8000a1c: ea50 0641 orrs.w r6, r0, r1, lsl #1
8000a20: bf18 it ne
8000a22: ea52 0643 orrsne.w r6, r2, r3, lsl #1
8000a26: f47f aec5 bne.w 80007b4 <__aeabi_dmul+0x19c>
8000a2a: ea50 0441 orrs.w r4, r0, r1, lsl #1
8000a2e: f47f af0d bne.w 800084c <__aeabi_dmul+0x234>
8000a32: ea52 0543 orrs.w r5, r2, r3, lsl #1
8000a36: f47f aeeb bne.w 8000810 <__aeabi_dmul+0x1f8>
8000a3a: e712 b.n 8000862 <__aeabi_dmul+0x24a>
08000a3c <__gedf2>:
8000a3c: f04f 3cff mov.w ip, #4294967295
8000a40: e006 b.n 8000a50 <__cmpdf2+0x4>
8000a42: bf00 nop
08000a44 <__ledf2>:
8000a44: f04f 0c01 mov.w ip, #1
8000a48: e002 b.n 8000a50 <__cmpdf2+0x4>
8000a4a: bf00 nop
08000a4c <__cmpdf2>:
8000a4c: f04f 0c01 mov.w ip, #1
8000a50: f84d cd04 str.w ip, [sp, #-4]!
8000a54: ea4f 0c41 mov.w ip, r1, lsl #1
8000a58: ea7f 5c6c mvns.w ip, ip, asr #21
8000a5c: ea4f 0c43 mov.w ip, r3, lsl #1
8000a60: bf18 it ne
8000a62: ea7f 5c6c mvnsne.w ip, ip, asr #21
8000a66: d01b beq.n 8000aa0 <__cmpdf2+0x54>
8000a68: b001 add sp, #4
8000a6a: ea50 0c41 orrs.w ip, r0, r1, lsl #1
8000a6e: bf0c ite eq
8000a70: ea52 0c43 orrseq.w ip, r2, r3, lsl #1
8000a74: ea91 0f03 teqne r1, r3
8000a78: bf02 ittt eq
8000a7a: ea90 0f02 teqeq r0, r2
8000a7e: 2000 moveq r0, #0
8000a80: 4770 bxeq lr
8000a82: f110 0f00 cmn.w r0, #0
8000a86: ea91 0f03 teq r1, r3
8000a8a: bf58 it pl
8000a8c: 4299 cmppl r1, r3
8000a8e: bf08 it eq
8000a90: 4290 cmpeq r0, r2
8000a92: bf2c ite cs
8000a94: 17d8 asrcs r0, r3, #31
8000a96: ea6f 70e3 mvncc.w r0, r3, asr #31
8000a9a: f040 0001 orr.w r0, r0, #1
8000a9e: 4770 bx lr
8000aa0: ea4f 0c41 mov.w ip, r1, lsl #1
8000aa4: ea7f 5c6c mvns.w ip, ip, asr #21
8000aa8: d102 bne.n 8000ab0 <__cmpdf2+0x64>
8000aaa: ea50 3c01 orrs.w ip, r0, r1, lsl #12
8000aae: d107 bne.n 8000ac0 <__cmpdf2+0x74>
8000ab0: ea4f 0c43 mov.w ip, r3, lsl #1
8000ab4: ea7f 5c6c mvns.w ip, ip, asr #21
8000ab8: d1d6 bne.n 8000a68 <__cmpdf2+0x1c>
8000aba: ea52 3c03 orrs.w ip, r2, r3, lsl #12
8000abe: d0d3 beq.n 8000a68 <__cmpdf2+0x1c>
8000ac0: f85d 0b04 ldr.w r0, [sp], #4
8000ac4: 4770 bx lr
8000ac6: bf00 nop
08000ac8 <__aeabi_cdrcmple>:
8000ac8: 4684 mov ip, r0
8000aca: 4610 mov r0, r2
8000acc: 4662 mov r2, ip
8000ace: 468c mov ip, r1
8000ad0: 4619 mov r1, r3
8000ad2: 4663 mov r3, ip
8000ad4: e000 b.n 8000ad8 <__aeabi_cdcmpeq>
8000ad6: bf00 nop
08000ad8 <__aeabi_cdcmpeq>:
8000ad8: b501 push {r0, lr}
8000ada: f7ff ffb7 bl 8000a4c <__cmpdf2>
8000ade: 2800 cmp r0, #0
8000ae0: bf48 it mi
8000ae2: f110 0f00 cmnmi.w r0, #0
8000ae6: bd01 pop {r0, pc}
08000ae8 <__aeabi_dcmpeq>:
8000ae8: f84d ed08 str.w lr, [sp, #-8]!
8000aec: f7ff fff4 bl 8000ad8 <__aeabi_cdcmpeq>
8000af0: bf0c ite eq
8000af2: 2001 moveq r0, #1
8000af4: 2000 movne r0, #0
8000af6: f85d fb08 ldr.w pc, [sp], #8
8000afa: bf00 nop
08000afc <__aeabi_dcmplt>:
8000afc: f84d ed08 str.w lr, [sp, #-8]!
8000b00: f7ff ffea bl 8000ad8 <__aeabi_cdcmpeq>
8000b04: bf34 ite cc
8000b06: 2001 movcc r0, #1
8000b08: 2000 movcs r0, #0
8000b0a: f85d fb08 ldr.w pc, [sp], #8
8000b0e: bf00 nop
08000b10 <__aeabi_dcmple>:
8000b10: f84d ed08 str.w lr, [sp, #-8]!
8000b14: f7ff ffe0 bl 8000ad8 <__aeabi_cdcmpeq>
8000b18: bf94 ite ls
8000b1a: 2001 movls r0, #1
8000b1c: 2000 movhi r0, #0
8000b1e: f85d fb08 ldr.w pc, [sp], #8
8000b22: bf00 nop
08000b24 <__aeabi_dcmpge>:
8000b24: f84d ed08 str.w lr, [sp, #-8]!
8000b28: f7ff ffce bl 8000ac8 <__aeabi_cdrcmple>
8000b2c: bf94 ite ls
8000b2e: 2001 movls r0, #1
8000b30: 2000 movhi r0, #0
8000b32: f85d fb08 ldr.w pc, [sp], #8
8000b36: bf00 nop
08000b38 <__aeabi_dcmpgt>:
8000b38: f84d ed08 str.w lr, [sp, #-8]!
8000b3c: f7ff ffc4 bl 8000ac8 <__aeabi_cdrcmple>
8000b40: bf34 ite cc
8000b42: 2001 movcc r0, #1
8000b44: 2000 movcs r0, #0
8000b46: f85d fb08 ldr.w pc, [sp], #8
8000b4a: bf00 nop
08000b4c <__aeabi_dcmpun>:
8000b4c: ea4f 0c41 mov.w ip, r1, lsl #1
8000b50: ea7f 5c6c mvns.w ip, ip, asr #21
8000b54: d102 bne.n 8000b5c <__aeabi_dcmpun+0x10>
8000b56: ea50 3c01 orrs.w ip, r0, r1, lsl #12
8000b5a: d10a bne.n 8000b72 <__aeabi_dcmpun+0x26>
8000b5c: ea4f 0c43 mov.w ip, r3, lsl #1
8000b60: ea7f 5c6c mvns.w ip, ip, asr #21
8000b64: d102 bne.n 8000b6c <__aeabi_dcmpun+0x20>
8000b66: ea52 3c03 orrs.w ip, r2, r3, lsl #12
8000b6a: d102 bne.n 8000b72 <__aeabi_dcmpun+0x26>
8000b6c: f04f 0000 mov.w r0, #0
8000b70: 4770 bx lr
8000b72: f04f 0001 mov.w r0, #1
8000b76: 4770 bx lr
08000b78 <__aeabi_d2iz>:
8000b78: ea4f 0241 mov.w r2, r1, lsl #1
8000b7c: f512 1200 adds.w r2, r2, #2097152 ; 0x200000
8000b80: d215 bcs.n 8000bae <__aeabi_d2iz+0x36>
8000b82: d511 bpl.n 8000ba8 <__aeabi_d2iz+0x30>
8000b84: f46f 7378 mvn.w r3, #992 ; 0x3e0
8000b88: ebb3 5262 subs.w r2, r3, r2, asr #21
8000b8c: d912 bls.n 8000bb4 <__aeabi_d2iz+0x3c>
8000b8e: ea4f 23c1 mov.w r3, r1, lsl #11
8000b92: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000
8000b96: ea43 5350 orr.w r3, r3, r0, lsr #21
8000b9a: f011 4f00 tst.w r1, #2147483648 ; 0x80000000
8000b9e: fa23 f002 lsr.w r0, r3, r2
8000ba2: bf18 it ne
8000ba4: 4240 negne r0, r0
8000ba6: 4770 bx lr
8000ba8: f04f 0000 mov.w r0, #0
8000bac: 4770 bx lr
8000bae: ea50 3001 orrs.w r0, r0, r1, lsl #12
8000bb2: d105 bne.n 8000bc0 <__aeabi_d2iz+0x48>
8000bb4: f011 4000 ands.w r0, r1, #2147483648 ; 0x80000000
8000bb8: bf08 it eq
8000bba: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000
8000bbe: 4770 bx lr
8000bc0: f04f 0000 mov.w r0, #0
8000bc4: 4770 bx lr
8000bc6: bf00 nop
08000bc8 <__aeabi_uldivmod>:
8000bc8: b953 cbnz r3, 8000be0 <__aeabi_uldivmod+0x18>
8000bca: b94a cbnz r2, 8000be0 <__aeabi_uldivmod+0x18>
8000bcc: 2900 cmp r1, #0
8000bce: bf08 it eq
8000bd0: 2800 cmpeq r0, #0
8000bd2: bf1c itt ne
8000bd4: f04f 31ff movne.w r1, #4294967295
8000bd8: f04f 30ff movne.w r0, #4294967295
8000bdc: f000 b974 b.w 8000ec8 <__aeabi_idiv0>
8000be0: f1ad 0c08 sub.w ip, sp, #8
8000be4: e96d ce04 strd ip, lr, [sp, #-16]!
8000be8: f000 f806 bl 8000bf8 <__udivmoddi4>
8000bec: f8dd e004 ldr.w lr, [sp, #4]
8000bf0: e9dd 2302 ldrd r2, r3, [sp, #8]
8000bf4: b004 add sp, #16
8000bf6: 4770 bx lr
08000bf8 <__udivmoddi4>:
8000bf8: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
8000bfc: 9d08 ldr r5, [sp, #32]
8000bfe: 4604 mov r4, r0
8000c00: 468e mov lr, r1
8000c02: 2b00 cmp r3, #0
8000c04: d14d bne.n 8000ca2 <__udivmoddi4+0xaa>
8000c06: 428a cmp r2, r1
8000c08: 4694 mov ip, r2
8000c0a: d969 bls.n 8000ce0 <__udivmoddi4+0xe8>
8000c0c: fab2 f282 clz r2, r2
8000c10: b152 cbz r2, 8000c28 <__udivmoddi4+0x30>
8000c12: fa01 f302 lsl.w r3, r1, r2
8000c16: f1c2 0120 rsb r1, r2, #32
8000c1a: fa20 f101 lsr.w r1, r0, r1
8000c1e: fa0c fc02 lsl.w ip, ip, r2
8000c22: ea41 0e03 orr.w lr, r1, r3
8000c26: 4094 lsls r4, r2
8000c28: ea4f 481c mov.w r8, ip, lsr #16
8000c2c: 0c21 lsrs r1, r4, #16
8000c2e: fbbe f6f8 udiv r6, lr, r8
8000c32: fa1f f78c uxth.w r7, ip
8000c36: fb08 e316 mls r3, r8, r6, lr
8000c3a: ea41 4303 orr.w r3, r1, r3, lsl #16
8000c3e: fb06 f107 mul.w r1, r6, r7
8000c42: 4299 cmp r1, r3
8000c44: d90a bls.n 8000c5c <__udivmoddi4+0x64>
8000c46: eb1c 0303 adds.w r3, ip, r3
8000c4a: f106 30ff add.w r0, r6, #4294967295
8000c4e: f080 811f bcs.w 8000e90 <__udivmoddi4+0x298>
8000c52: 4299 cmp r1, r3
8000c54: f240 811c bls.w 8000e90 <__udivmoddi4+0x298>
8000c58: 3e02 subs r6, #2
8000c5a: 4463 add r3, ip
8000c5c: 1a5b subs r3, r3, r1
8000c5e: b2a4 uxth r4, r4
8000c60: fbb3 f0f8 udiv r0, r3, r8
8000c64: fb08 3310 mls r3, r8, r0, r3
8000c68: ea44 4403 orr.w r4, r4, r3, lsl #16
8000c6c: fb00 f707 mul.w r7, r0, r7
8000c70: 42a7 cmp r7, r4
8000c72: d90a bls.n 8000c8a <__udivmoddi4+0x92>
8000c74: eb1c 0404 adds.w r4, ip, r4
8000c78: f100 33ff add.w r3, r0, #4294967295
8000c7c: f080 810a bcs.w 8000e94 <__udivmoddi4+0x29c>
8000c80: 42a7 cmp r7, r4
8000c82: f240 8107 bls.w 8000e94 <__udivmoddi4+0x29c>
8000c86: 4464 add r4, ip
8000c88: 3802 subs r0, #2
8000c8a: ea40 4006 orr.w r0, r0, r6, lsl #16
8000c8e: 1be4 subs r4, r4, r7
8000c90: 2600 movs r6, #0
8000c92: b11d cbz r5, 8000c9c <__udivmoddi4+0xa4>
8000c94: 40d4 lsrs r4, r2
8000c96: 2300 movs r3, #0
8000c98: e9c5 4300 strd r4, r3, [r5]
8000c9c: 4631 mov r1, r6
8000c9e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
8000ca2: 428b cmp r3, r1
8000ca4: d909 bls.n 8000cba <__udivmoddi4+0xc2>
8000ca6: 2d00 cmp r5, #0
8000ca8: f000 80ef beq.w 8000e8a <__udivmoddi4+0x292>
8000cac: 2600 movs r6, #0
8000cae: e9c5 0100 strd r0, r1, [r5]
8000cb2: 4630 mov r0, r6
8000cb4: 4631 mov r1, r6
8000cb6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
8000cba: fab3 f683 clz r6, r3
8000cbe: 2e00 cmp r6, #0
8000cc0: d14a bne.n 8000d58 <__udivmoddi4+0x160>
8000cc2: 428b cmp r3, r1
8000cc4: d302 bcc.n 8000ccc <__udivmoddi4+0xd4>
8000cc6: 4282 cmp r2, r0
8000cc8: f200 80f9 bhi.w 8000ebe <__udivmoddi4+0x2c6>
8000ccc: 1a84 subs r4, r0, r2
8000cce: eb61 0303 sbc.w r3, r1, r3
8000cd2: 2001 movs r0, #1
8000cd4: 469e mov lr, r3
8000cd6: 2d00 cmp r5, #0
8000cd8: d0e0 beq.n 8000c9c <__udivmoddi4+0xa4>
8000cda: e9c5 4e00 strd r4, lr, [r5]
8000cde: e7dd b.n 8000c9c <__udivmoddi4+0xa4>
8000ce0: b902 cbnz r2, 8000ce4 <__udivmoddi4+0xec>
8000ce2: deff udf #255 ; 0xff
8000ce4: fab2 f282 clz r2, r2
8000ce8: 2a00 cmp r2, #0
8000cea: f040 8092 bne.w 8000e12 <__udivmoddi4+0x21a>
8000cee: eba1 010c sub.w r1, r1, ip
8000cf2: ea4f 471c mov.w r7, ip, lsr #16
8000cf6: fa1f fe8c uxth.w lr, ip
8000cfa: 2601 movs r6, #1
8000cfc: 0c20 lsrs r0, r4, #16
8000cfe: fbb1 f3f7 udiv r3, r1, r7
8000d02: fb07 1113 mls r1, r7, r3, r1
8000d06: ea40 4101 orr.w r1, r0, r1, lsl #16
8000d0a: fb0e f003 mul.w r0, lr, r3
8000d0e: 4288 cmp r0, r1
8000d10: d908 bls.n 8000d24 <__udivmoddi4+0x12c>
8000d12: eb1c 0101 adds.w r1, ip, r1
8000d16: f103 38ff add.w r8, r3, #4294967295
8000d1a: d202 bcs.n 8000d22 <__udivmoddi4+0x12a>
8000d1c: 4288 cmp r0, r1
8000d1e: f200 80cb bhi.w 8000eb8 <__udivmoddi4+0x2c0>
8000d22: 4643 mov r3, r8
8000d24: 1a09 subs r1, r1, r0
8000d26: b2a4 uxth r4, r4
8000d28: fbb1 f0f7 udiv r0, r1, r7
8000d2c: fb07 1110 mls r1, r7, r0, r1
8000d30: ea44 4401 orr.w r4, r4, r1, lsl #16
8000d34: fb0e fe00 mul.w lr, lr, r0
8000d38: 45a6 cmp lr, r4
8000d3a: d908 bls.n 8000d4e <__udivmoddi4+0x156>
8000d3c: eb1c 0404 adds.w r4, ip, r4
8000d40: f100 31ff add.w r1, r0, #4294967295
8000d44: d202 bcs.n 8000d4c <__udivmoddi4+0x154>
8000d46: 45a6 cmp lr, r4
8000d48: f200 80bb bhi.w 8000ec2 <__udivmoddi4+0x2ca>
8000d4c: 4608 mov r0, r1
8000d4e: eba4 040e sub.w r4, r4, lr
8000d52: ea40 4003 orr.w r0, r0, r3, lsl #16
8000d56: e79c b.n 8000c92 <__udivmoddi4+0x9a>
8000d58: f1c6 0720 rsb r7, r6, #32
8000d5c: 40b3 lsls r3, r6
8000d5e: fa22 fc07 lsr.w ip, r2, r7
8000d62: ea4c 0c03 orr.w ip, ip, r3
8000d66: fa20 f407 lsr.w r4, r0, r7
8000d6a: fa01 f306 lsl.w r3, r1, r6
8000d6e: 431c orrs r4, r3
8000d70: 40f9 lsrs r1, r7
8000d72: ea4f 491c mov.w r9, ip, lsr #16
8000d76: fa00 f306 lsl.w r3, r0, r6
8000d7a: fbb1 f8f9 udiv r8, r1, r9
8000d7e: 0c20 lsrs r0, r4, #16
8000d80: fa1f fe8c uxth.w lr, ip
8000d84: fb09 1118 mls r1, r9, r8, r1
8000d88: ea40 4101 orr.w r1, r0, r1, lsl #16
8000d8c: fb08 f00e mul.w r0, r8, lr
8000d90: 4288 cmp r0, r1
8000d92: fa02 f206 lsl.w r2, r2, r6
8000d96: d90b bls.n 8000db0 <__udivmoddi4+0x1b8>
8000d98: eb1c 0101 adds.w r1, ip, r1
8000d9c: f108 3aff add.w sl, r8, #4294967295
8000da0: f080 8088 bcs.w 8000eb4 <__udivmoddi4+0x2bc>
8000da4: 4288 cmp r0, r1
8000da6: f240 8085 bls.w 8000eb4 <__udivmoddi4+0x2bc>
8000daa: f1a8 0802 sub.w r8, r8, #2
8000dae: 4461 add r1, ip
8000db0: 1a09 subs r1, r1, r0
8000db2: b2a4 uxth r4, r4
8000db4: fbb1 f0f9 udiv r0, r1, r9
8000db8: fb09 1110 mls r1, r9, r0, r1
8000dbc: ea44 4101 orr.w r1, r4, r1, lsl #16
8000dc0: fb00 fe0e mul.w lr, r0, lr
8000dc4: 458e cmp lr, r1
8000dc6: d908 bls.n 8000dda <__udivmoddi4+0x1e2>
8000dc8: eb1c 0101 adds.w r1, ip, r1
8000dcc: f100 34ff add.w r4, r0, #4294967295
8000dd0: d26c bcs.n 8000eac <__udivmoddi4+0x2b4>
8000dd2: 458e cmp lr, r1
8000dd4: d96a bls.n 8000eac <__udivmoddi4+0x2b4>
8000dd6: 3802 subs r0, #2
8000dd8: 4461 add r1, ip
8000dda: ea40 4008 orr.w r0, r0, r8, lsl #16
8000dde: fba0 9402 umull r9, r4, r0, r2
8000de2: eba1 010e sub.w r1, r1, lr
8000de6: 42a1 cmp r1, r4
8000de8: 46c8 mov r8, r9
8000dea: 46a6 mov lr, r4
8000dec: d356 bcc.n 8000e9c <__udivmoddi4+0x2a4>
8000dee: d053 beq.n 8000e98 <__udivmoddi4+0x2a0>
8000df0: b15d cbz r5, 8000e0a <__udivmoddi4+0x212>
8000df2: ebb3 0208 subs.w r2, r3, r8
8000df6: eb61 010e sbc.w r1, r1, lr
8000dfa: fa01 f707 lsl.w r7, r1, r7
8000dfe: fa22 f306 lsr.w r3, r2, r6
8000e02: 40f1 lsrs r1, r6
8000e04: 431f orrs r7, r3
8000e06: e9c5 7100 strd r7, r1, [r5]
8000e0a: 2600 movs r6, #0
8000e0c: 4631 mov r1, r6
8000e0e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
8000e12: f1c2 0320 rsb r3, r2, #32
8000e16: 40d8 lsrs r0, r3
8000e18: fa0c fc02 lsl.w ip, ip, r2
8000e1c: fa21 f303 lsr.w r3, r1, r3
8000e20: 4091 lsls r1, r2
8000e22: 4301 orrs r1, r0
8000e24: ea4f 471c mov.w r7, ip, lsr #16
8000e28: fa1f fe8c uxth.w lr, ip
8000e2c: fbb3 f0f7 udiv r0, r3, r7
8000e30: fb07 3610 mls r6, r7, r0, r3
8000e34: 0c0b lsrs r3, r1, #16
8000e36: ea43 4306 orr.w r3, r3, r6, lsl #16
8000e3a: fb00 f60e mul.w r6, r0, lr
8000e3e: 429e cmp r6, r3
8000e40: fa04 f402 lsl.w r4, r4, r2
8000e44: d908 bls.n 8000e58 <__udivmoddi4+0x260>
8000e46: eb1c 0303 adds.w r3, ip, r3
8000e4a: f100 38ff add.w r8, r0, #4294967295
8000e4e: d22f bcs.n 8000eb0 <__udivmoddi4+0x2b8>
8000e50: 429e cmp r6, r3
8000e52: d92d bls.n 8000eb0 <__udivmoddi4+0x2b8>
8000e54: 3802 subs r0, #2
8000e56: 4463 add r3, ip
8000e58: 1b9b subs r3, r3, r6
8000e5a: b289 uxth r1, r1
8000e5c: fbb3 f6f7 udiv r6, r3, r7
8000e60: fb07 3316 mls r3, r7, r6, r3
8000e64: ea41 4103 orr.w r1, r1, r3, lsl #16
8000e68: fb06 f30e mul.w r3, r6, lr
8000e6c: 428b cmp r3, r1
8000e6e: d908 bls.n 8000e82 <__udivmoddi4+0x28a>
8000e70: eb1c 0101 adds.w r1, ip, r1
8000e74: f106 38ff add.w r8, r6, #4294967295
8000e78: d216 bcs.n 8000ea8 <__udivmoddi4+0x2b0>
8000e7a: 428b cmp r3, r1
8000e7c: d914 bls.n 8000ea8 <__udivmoddi4+0x2b0>
8000e7e: 3e02 subs r6, #2
8000e80: 4461 add r1, ip
8000e82: 1ac9 subs r1, r1, r3
8000e84: ea46 4600 orr.w r6, r6, r0, lsl #16
8000e88: e738 b.n 8000cfc <__udivmoddi4+0x104>
8000e8a: 462e mov r6, r5
8000e8c: 4628 mov r0, r5
8000e8e: e705 b.n 8000c9c <__udivmoddi4+0xa4>
8000e90: 4606 mov r6, r0
8000e92: e6e3 b.n 8000c5c <__udivmoddi4+0x64>
8000e94: 4618 mov r0, r3
8000e96: e6f8 b.n 8000c8a <__udivmoddi4+0x92>
8000e98: 454b cmp r3, r9
8000e9a: d2a9 bcs.n 8000df0 <__udivmoddi4+0x1f8>
8000e9c: ebb9 0802 subs.w r8, r9, r2
8000ea0: eb64 0e0c sbc.w lr, r4, ip
8000ea4: 3801 subs r0, #1
8000ea6: e7a3 b.n 8000df0 <__udivmoddi4+0x1f8>
8000ea8: 4646 mov r6, r8
8000eaa: e7ea b.n 8000e82 <__udivmoddi4+0x28a>
8000eac: 4620 mov r0, r4
8000eae: e794 b.n 8000dda <__udivmoddi4+0x1e2>
8000eb0: 4640 mov r0, r8
8000eb2: e7d1 b.n 8000e58 <__udivmoddi4+0x260>
8000eb4: 46d0 mov r8, sl
8000eb6: e77b b.n 8000db0 <__udivmoddi4+0x1b8>
8000eb8: 3b02 subs r3, #2
8000eba: 4461 add r1, ip
8000ebc: e732 b.n 8000d24 <__udivmoddi4+0x12c>
8000ebe: 4630 mov r0, r6
8000ec0: e709 b.n 8000cd6 <__udivmoddi4+0xde>
8000ec2: 4464 add r4, ip
8000ec4: 3802 subs r0, #2
8000ec6: e742 b.n 8000d4e <__udivmoddi4+0x156>
08000ec8 <__aeabi_idiv0>:
8000ec8: 4770 bx lr
8000eca: bf00 nop
08000ecc <main>:
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
8000ecc: b580 push {r7, lr}
8000ece: af00 add r7, sp, #0
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
8000ed0: f000 faca bl 8001468 <HAL_Init>
/* Configure the system clock */
SystemClock_Config();
8000ed4: f000 f808 bl 8000ee8 <SystemClock_Config>
/* Initialize all configured peripherals */
MX_GPIO_Init();
8000ed8: f000 f872 bl 8000fc0 <MX_GPIO_Init>
MX_LWIP_Init();
8000edc: f002 fb2c bl 8003538 <MX_LWIP_Init>
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
MX_LWIP_Process();
8000ee0: f002 fb98 bl 8003614 <MX_LWIP_Process>
8000ee4: e7fc b.n 8000ee0 <main+0x14>
...
08000ee8 <SystemClock_Config>:
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
8000ee8: b580 push {r7, lr}
8000eea: b094 sub sp, #80 ; 0x50
8000eec: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
8000eee: f107 0320 add.w r3, r7, #32
8000ef2: 2230 movs r2, #48 ; 0x30
8000ef4: 2100 movs r1, #0
8000ef6: 4618 mov r0, r3
8000ef8: f00e ffd6 bl 800fea8 <memset>
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
8000efc: f107 030c add.w r3, r7, #12
8000f00: 2200 movs r2, #0
8000f02: 601a str r2, [r3, #0]
8000f04: 605a str r2, [r3, #4]
8000f06: 609a str r2, [r3, #8]
8000f08: 60da str r2, [r3, #12]
8000f0a: 611a str r2, [r3, #16]
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
8000f0c: 2300 movs r3, #0
8000f0e: 60bb str r3, [r7, #8]
8000f10: 4b29 ldr r3, [pc, #164] ; (8000fb8 <SystemClock_Config+0xd0>)
8000f12: 6c1b ldr r3, [r3, #64] ; 0x40
8000f14: 4a28 ldr r2, [pc, #160] ; (8000fb8 <SystemClock_Config+0xd0>)
8000f16: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8000f1a: 6413 str r3, [r2, #64] ; 0x40
8000f1c: 4b26 ldr r3, [pc, #152] ; (8000fb8 <SystemClock_Config+0xd0>)
8000f1e: 6c1b ldr r3, [r3, #64] ; 0x40
8000f20: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8000f24: 60bb str r3, [r7, #8]
8000f26: 68bb ldr r3, [r7, #8]
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
8000f28: 2300 movs r3, #0
8000f2a: 607b str r3, [r7, #4]
8000f2c: 4b23 ldr r3, [pc, #140] ; (8000fbc <SystemClock_Config+0xd4>)
8000f2e: 681b ldr r3, [r3, #0]
8000f30: f423 4340 bic.w r3, r3, #49152 ; 0xc000
8000f34: 4a21 ldr r2, [pc, #132] ; (8000fbc <SystemClock_Config+0xd4>)
8000f36: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8000f3a: 6013 str r3, [r2, #0]
8000f3c: 4b1f ldr r3, [pc, #124] ; (8000fbc <SystemClock_Config+0xd4>)
8000f3e: 681b ldr r3, [r3, #0]
8000f40: f403 4340 and.w r3, r3, #49152 ; 0xc000
8000f44: 607b str r3, [r7, #4]
8000f46: 687b ldr r3, [r7, #4]
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
8000f48: 2302 movs r3, #2
8000f4a: 623b str r3, [r7, #32]
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
8000f4c: 2301 movs r3, #1
8000f4e: 62fb str r3, [r7, #44] ; 0x2c
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
8000f50: 2310 movs r3, #16
8000f52: 633b str r3, [r7, #48] ; 0x30
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
8000f54: 2302 movs r3, #2
8000f56: 63bb str r3, [r7, #56] ; 0x38
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
8000f58: 2300 movs r3, #0
8000f5a: 63fb str r3, [r7, #60] ; 0x3c
RCC_OscInitStruct.PLL.PLLM = 8;
8000f5c: 2308 movs r3, #8
8000f5e: 643b str r3, [r7, #64] ; 0x40
RCC_OscInitStruct.PLL.PLLN = 100;
8000f60: 2364 movs r3, #100 ; 0x64
8000f62: 647b str r3, [r7, #68] ; 0x44
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
8000f64: 2302 movs r3, #2
8000f66: 64bb str r3, [r7, #72] ; 0x48
RCC_OscInitStruct.PLL.PLLQ = 4;
8000f68: 2304 movs r3, #4
8000f6a: 64fb str r3, [r7, #76] ; 0x4c
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
8000f6c: f107 0320 add.w r3, r7, #32
8000f70: 4618 mov r0, r3
8000f72: f001 feb1 bl 8002cd8 <HAL_RCC_OscConfig>
8000f76: 4603 mov r3, r0
8000f78: 2b00 cmp r3, #0
8000f7a: d001 beq.n 8000f80 <SystemClock_Config+0x98>
{
Error_Handler();
8000f7c: f000 f880 bl 8001080 <Error_Handler>
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
8000f80: 230f movs r3, #15
8000f82: 60fb str r3, [r7, #12]
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
8000f84: 2302 movs r3, #2
8000f86: 613b str r3, [r7, #16]
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
8000f88: 2300 movs r3, #0
8000f8a: 617b str r3, [r7, #20]
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
8000f8c: f44f 53a0 mov.w r3, #5120 ; 0x1400
8000f90: 61bb str r3, [r7, #24]
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
8000f92: f44f 5380 mov.w r3, #4096 ; 0x1000
8000f96: 61fb str r3, [r7, #28]
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK)
8000f98: f107 030c add.w r3, r7, #12
8000f9c: 2103 movs r1, #3
8000f9e: 4618 mov r0, r3
8000fa0: f002 f912 bl 80031c8 <HAL_RCC_ClockConfig>
8000fa4: 4603 mov r3, r0
8000fa6: 2b00 cmp r3, #0
8000fa8: d001 beq.n 8000fae <SystemClock_Config+0xc6>
{
Error_Handler();
8000faa: f000 f869 bl 8001080 <Error_Handler>
}
}
8000fae: bf00 nop
8000fb0: 3750 adds r7, #80 ; 0x50
8000fb2: 46bd mov sp, r7
8000fb4: bd80 pop {r7, pc}
8000fb6: bf00 nop
8000fb8: 40023800 .word 0x40023800
8000fbc: 40007000 .word 0x40007000
08000fc0 <MX_GPIO_Init>:
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
8000fc0: b580 push {r7, lr}
8000fc2: b08a sub sp, #40 ; 0x28
8000fc4: af00 add r7, sp, #0
GPIO_InitTypeDef GPIO_InitStruct = {0};
8000fc6: f107 0314 add.w r3, r7, #20
8000fca: 2200 movs r2, #0
8000fcc: 601a str r2, [r3, #0]
8000fce: 605a str r2, [r3, #4]
8000fd0: 609a str r2, [r3, #8]
8000fd2: 60da str r2, [r3, #12]
8000fd4: 611a str r2, [r3, #16]
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
8000fd6: 2300 movs r3, #0
8000fd8: 613b str r3, [r7, #16]
8000fda: 4b27 ldr r3, [pc, #156] ; (8001078 <MX_GPIO_Init+0xb8>)
8000fdc: 6b1b ldr r3, [r3, #48] ; 0x30
8000fde: 4a26 ldr r2, [pc, #152] ; (8001078 <MX_GPIO_Init+0xb8>)
8000fe0: f043 0304 orr.w r3, r3, #4
8000fe4: 6313 str r3, [r2, #48] ; 0x30
8000fe6: 4b24 ldr r3, [pc, #144] ; (8001078 <MX_GPIO_Init+0xb8>)
8000fe8: 6b1b ldr r3, [r3, #48] ; 0x30
8000fea: f003 0304 and.w r3, r3, #4
8000fee: 613b str r3, [r7, #16]
8000ff0: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
8000ff2: 2300 movs r3, #0
8000ff4: 60fb str r3, [r7, #12]
8000ff6: 4b20 ldr r3, [pc, #128] ; (8001078 <MX_GPIO_Init+0xb8>)
8000ff8: 6b1b ldr r3, [r3, #48] ; 0x30
8000ffa: 4a1f ldr r2, [pc, #124] ; (8001078 <MX_GPIO_Init+0xb8>)
8000ffc: f043 0301 orr.w r3, r3, #1
8001000: 6313 str r3, [r2, #48] ; 0x30
8001002: 4b1d ldr r3, [pc, #116] ; (8001078 <MX_GPIO_Init+0xb8>)
8001004: 6b1b ldr r3, [r3, #48] ; 0x30
8001006: f003 0301 and.w r3, r3, #1
800100a: 60fb str r3, [r7, #12]
800100c: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOB_CLK_ENABLE();
800100e: 2300 movs r3, #0
8001010: 60bb str r3, [r7, #8]
8001012: 4b19 ldr r3, [pc, #100] ; (8001078 <MX_GPIO_Init+0xb8>)
8001014: 6b1b ldr r3, [r3, #48] ; 0x30
8001016: 4a18 ldr r2, [pc, #96] ; (8001078 <MX_GPIO_Init+0xb8>)
8001018: f043 0302 orr.w r3, r3, #2
800101c: 6313 str r3, [r2, #48] ; 0x30
800101e: 4b16 ldr r3, [pc, #88] ; (8001078 <MX_GPIO_Init+0xb8>)
8001020: 6b1b ldr r3, [r3, #48] ; 0x30
8001022: f003 0302 and.w r3, r3, #2
8001026: 60bb str r3, [r7, #8]
8001028: 68bb ldr r3, [r7, #8]
__HAL_RCC_GPIOG_CLK_ENABLE();
800102a: 2300 movs r3, #0
800102c: 607b str r3, [r7, #4]
800102e: 4b12 ldr r3, [pc, #72] ; (8001078 <MX_GPIO_Init+0xb8>)
8001030: 6b1b ldr r3, [r3, #48] ; 0x30
8001032: 4a11 ldr r2, [pc, #68] ; (8001078 <MX_GPIO_Init+0xb8>)
8001034: f043 0340 orr.w r3, r3, #64 ; 0x40
8001038: 6313 str r3, [r2, #48] ; 0x30
800103a: 4b0f ldr r3, [pc, #60] ; (8001078 <MX_GPIO_Init+0xb8>)
800103c: 6b1b ldr r3, [r3, #48] ; 0x30
800103e: f003 0340 and.w r3, r3, #64 ; 0x40
8001042: 607b str r3, [r7, #4]
8001044: 687b ldr r3, [r7, #4]
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_RESET);
8001046: 2200 movs r2, #0
8001048: f44f 4180 mov.w r1, #16384 ; 0x4000
800104c: 480b ldr r0, [pc, #44] ; (800107c <MX_GPIO_Init+0xbc>)
800104e: f001 fe29 bl 8002ca4 <HAL_GPIO_WritePin>
/*Configure GPIO pin : PC14 */
GPIO_InitStruct.Pin = GPIO_PIN_14;
8001052: f44f 4380 mov.w r3, #16384 ; 0x4000
8001056: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
8001058: 2301 movs r3, #1
800105a: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
800105c: 2300 movs r3, #0
800105e: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001060: 2300 movs r3, #0
8001062: 623b str r3, [r7, #32]
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
8001064: f107 0314 add.w r3, r7, #20
8001068: 4619 mov r1, r3
800106a: 4804 ldr r0, [pc, #16] ; (800107c <MX_GPIO_Init+0xbc>)
800106c: f001 fc6e bl 800294c <HAL_GPIO_Init>
}
8001070: bf00 nop
8001072: 3728 adds r7, #40 ; 0x28
8001074: 46bd mov sp, r7
8001076: bd80 pop {r7, pc}
8001078: 40023800 .word 0x40023800
800107c: 40020800 .word 0x40020800
08001080 <Error_Handler>:
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
8001080: b480 push {r7}
8001082: af00 add r7, sp, #0
\details Disables IRQ interrupts by setting the I-bit in the CPSR.
Can only be executed in Privileged modes.
*/
__STATIC_FORCEINLINE void __disable_irq(void)
{
__ASM volatile ("cpsid i" : : : "memory");
8001084: b672 cpsid i
}
8001086: bf00 nop
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
8001088: e7fe b.n 8001088 <Error_Handler+0x8>
...
0800108c <HAL_MspInit>:
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
800108c: b480 push {r7}
800108e: b083 sub sp, #12
8001090: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_SYSCFG_CLK_ENABLE();
8001092: 2300 movs r3, #0
8001094: 607b str r3, [r7, #4]
8001096: 4b10 ldr r3, [pc, #64] ; (80010d8 <HAL_MspInit+0x4c>)
8001098: 6c5b ldr r3, [r3, #68] ; 0x44
800109a: 4a0f ldr r2, [pc, #60] ; (80010d8 <HAL_MspInit+0x4c>)
800109c: f443 4380 orr.w r3, r3, #16384 ; 0x4000
80010a0: 6453 str r3, [r2, #68] ; 0x44
80010a2: 4b0d ldr r3, [pc, #52] ; (80010d8 <HAL_MspInit+0x4c>)
80010a4: 6c5b ldr r3, [r3, #68] ; 0x44
80010a6: f403 4380 and.w r3, r3, #16384 ; 0x4000
80010aa: 607b str r3, [r7, #4]
80010ac: 687b ldr r3, [r7, #4]
__HAL_RCC_PWR_CLK_ENABLE();
80010ae: 2300 movs r3, #0
80010b0: 603b str r3, [r7, #0]
80010b2: 4b09 ldr r3, [pc, #36] ; (80010d8 <HAL_MspInit+0x4c>)
80010b4: 6c1b ldr r3, [r3, #64] ; 0x40
80010b6: 4a08 ldr r2, [pc, #32] ; (80010d8 <HAL_MspInit+0x4c>)
80010b8: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
80010bc: 6413 str r3, [r2, #64] ; 0x40
80010be: 4b06 ldr r3, [pc, #24] ; (80010d8 <HAL_MspInit+0x4c>)
80010c0: 6c1b ldr r3, [r3, #64] ; 0x40
80010c2: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
80010c6: 603b str r3, [r7, #0]
80010c8: 683b ldr r3, [r7, #0]
/* System interrupt init*/
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
80010ca: bf00 nop
80010cc: 370c adds r7, #12
80010ce: 46bd mov sp, r7
80010d0: f85d 7b04 ldr.w r7, [sp], #4
80010d4: 4770 bx lr
80010d6: bf00 nop
80010d8: 40023800 .word 0x40023800
080010dc <NMI_Handler>:
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
80010dc: b480 push {r7}
80010de: af00 add r7, sp, #0
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
/* USER CODE END NonMaskableInt_IRQn 0 */
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
while (1)
80010e0: e7fe b.n 80010e0 <NMI_Handler+0x4>
080010e2 <HardFault_Handler>:
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
80010e2: b480 push {r7}
80010e4: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
80010e6: e7fe b.n 80010e6 <HardFault_Handler+0x4>
080010e8 <MemManage_Handler>:
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
80010e8: b480 push {r7}
80010ea: af00 add r7, sp, #0
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
80010ec: e7fe b.n 80010ec <MemManage_Handler+0x4>
080010ee <BusFault_Handler>:
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
80010ee: b480 push {r7}
80010f0: af00 add r7, sp, #0
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
80010f2: e7fe b.n 80010f2 <BusFault_Handler+0x4>
080010f4 <UsageFault_Handler>:
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
80010f4: b480 push {r7}
80010f6: af00 add r7, sp, #0
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
80010f8: e7fe b.n 80010f8 <UsageFault_Handler+0x4>
080010fa <SVC_Handler>:
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
80010fa: b480 push {r7}
80010fc: af00 add r7, sp, #0
/* USER CODE END SVCall_IRQn 0 */
/* USER CODE BEGIN SVCall_IRQn 1 */
/* USER CODE END SVCall_IRQn 1 */
}
80010fe: bf00 nop
8001100: 46bd mov sp, r7
8001102: f85d 7b04 ldr.w r7, [sp], #4
8001106: 4770 bx lr
08001108 <DebugMon_Handler>:
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
8001108: b480 push {r7}
800110a: af00 add r7, sp, #0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
800110c: bf00 nop
800110e: 46bd mov sp, r7
8001110: f85d 7b04 ldr.w r7, [sp], #4
8001114: 4770 bx lr
08001116 <PendSV_Handler>:
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
8001116: b480 push {r7}
8001118: af00 add r7, sp, #0
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
800111a: bf00 nop
800111c: 46bd mov sp, r7
800111e: f85d 7b04 ldr.w r7, [sp], #4
8001122: 4770 bx lr
08001124 <SysTick_Handler>:
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
8001124: b580 push {r7, lr}
8001126: af00 add r7, sp, #0
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
8001128: f000 f9f0 bl 800150c <HAL_IncTick>
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
800112c: bf00 nop
800112e: bd80 pop {r7, pc}
08001130 <SystemInit>:
* configuration.
* @param None
* @retval None
*/
void SystemInit(void)
{
8001130: b480 push {r7}
8001132: af00 add r7, sp, #0
/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
8001134: 4b06 ldr r3, [pc, #24] ; (8001150 <SystemInit+0x20>)
8001136: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
800113a: 4a05 ldr r2, [pc, #20] ; (8001150 <SystemInit+0x20>)
800113c: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
8001140: f8c2 3088 str.w r3, [r2, #136] ; 0x88
/* Configure the Vector Table location -------------------------------------*/
#if defined(USER_VECT_TAB_ADDRESS)
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#endif /* USER_VECT_TAB_ADDRESS */
}
8001144: bf00 nop
8001146: 46bd mov sp, r7
8001148: f85d 7b04 ldr.w r7, [sp], #4
800114c: 4770 bx lr
800114e: bf00 nop
8001150: e000ed00 .word 0xe000ed00
08001154 <Reset_Handler>:
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr r0, =_estack
8001154: 480d ldr r0, [pc, #52] ; (800118c <LoopForever+0x2>)
mov sp, r0 /* set stack pointer */
8001156: 4685 mov sp, r0
/* Call the clock system initialization function.*/
bl SystemInit
8001158: f7ff ffea bl 8001130 <SystemInit>
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
800115c: 480c ldr r0, [pc, #48] ; (8001190 <LoopForever+0x6>)
ldr r1, =_edata
800115e: 490d ldr r1, [pc, #52] ; (8001194 <LoopForever+0xa>)
ldr r2, =_sidata
8001160: 4a0d ldr r2, [pc, #52] ; (8001198 <LoopForever+0xe>)
movs r3, #0
8001162: 2300 movs r3, #0
b LoopCopyDataInit
8001164: e002 b.n 800116c <LoopCopyDataInit>
08001166 <CopyDataInit>:
CopyDataInit:
ldr r4, [r2, r3]
8001166: 58d4 ldr r4, [r2, r3]
str r4, [r0, r3]
8001168: 50c4 str r4, [r0, r3]
adds r3, r3, #4
800116a: 3304 adds r3, #4
0800116c <LoopCopyDataInit>:
LoopCopyDataInit:
adds r4, r0, r3
800116c: 18c4 adds r4, r0, r3
cmp r4, r1
800116e: 428c cmp r4, r1
bcc CopyDataInit
8001170: d3f9 bcc.n 8001166 <CopyDataInit>
/* Zero fill the bss segment. */
ldr r2, =_sbss
8001172: 4a0a ldr r2, [pc, #40] ; (800119c <LoopForever+0x12>)
ldr r4, =_ebss
8001174: 4c0a ldr r4, [pc, #40] ; (80011a0 <LoopForever+0x16>)
movs r3, #0
8001176: 2300 movs r3, #0
b LoopFillZerobss
8001178: e001 b.n 800117e <LoopFillZerobss>
0800117a <FillZerobss>:
FillZerobss:
str r3, [r2]
800117a: 6013 str r3, [r2, #0]
adds r2, r2, #4
800117c: 3204 adds r2, #4
0800117e <LoopFillZerobss>:
LoopFillZerobss:
cmp r2, r4
800117e: 42a2 cmp r2, r4
bcc FillZerobss
8001180: d3fb bcc.n 800117a <FillZerobss>
/* Call static constructors */
bl __libc_init_array
8001182: f00e fe35 bl 800fdf0 <__libc_init_array>
/* Call the application's entry point.*/
bl main
8001186: f7ff fea1 bl 8000ecc <main>
0800118a <LoopForever>:
LoopForever:
b LoopForever
800118a: e7fe b.n 800118a <LoopForever>
ldr r0, =_estack
800118c: 20030000 .word 0x20030000
ldr r0, =_sdata
8001190: 20000000 .word 0x20000000
ldr r1, =_edata
8001194: 200009e0 .word 0x200009e0
ldr r2, =_sidata
8001198: 08017c88 .word 0x08017c88
ldr r2, =_sbss
800119c: 200009e0 .word 0x200009e0
ldr r4, =_ebss
80011a0: 20008d7c .word 0x20008d7c
080011a4 <ADC_IRQHandler>:
* @retval : None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
80011a4: e7fe b.n 80011a4 <ADC_IRQHandler>
080011a6 <DP83848_RegisterBusIO>:
* @param ioctx: holds device IO functions.
* @retval DP83848_STATUS_OK if OK
* DP83848_STATUS_ERROR if missing mandatory function
*/
int32_t DP83848_RegisterBusIO(dp83848_Object_t *pObj, dp83848_IOCtx_t *ioctx)
{
80011a6: b480 push {r7}
80011a8: b083 sub sp, #12
80011aa: af00 add r7, sp, #0
80011ac: 6078 str r0, [r7, #4]
80011ae: 6039 str r1, [r7, #0]
if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick)
80011b0: 687b ldr r3, [r7, #4]
80011b2: 2b00 cmp r3, #0
80011b4: d00b beq.n 80011ce <DP83848_RegisterBusIO+0x28>
80011b6: 683b ldr r3, [r7, #0]
80011b8: 68db ldr r3, [r3, #12]
80011ba: 2b00 cmp r3, #0
80011bc: d007 beq.n 80011ce <DP83848_RegisterBusIO+0x28>
80011be: 683b ldr r3, [r7, #0]
80011c0: 689b ldr r3, [r3, #8]
80011c2: 2b00 cmp r3, #0
80011c4: d003 beq.n 80011ce <DP83848_RegisterBusIO+0x28>
80011c6: 683b ldr r3, [r7, #0]
80011c8: 691b ldr r3, [r3, #16]
80011ca: 2b00 cmp r3, #0
80011cc: d102 bne.n 80011d4 <DP83848_RegisterBusIO+0x2e>
{
return DP83848_STATUS_ERROR;
80011ce: f04f 33ff mov.w r3, #4294967295
80011d2: e014 b.n 80011fe <DP83848_RegisterBusIO+0x58>
}
pObj->IO.Init = ioctx->Init;
80011d4: 683b ldr r3, [r7, #0]
80011d6: 681a ldr r2, [r3, #0]
80011d8: 687b ldr r3, [r7, #4]
80011da: 609a str r2, [r3, #8]
pObj->IO.DeInit = ioctx->DeInit;
80011dc: 683b ldr r3, [r7, #0]
80011de: 685a ldr r2, [r3, #4]
80011e0: 687b ldr r3, [r7, #4]
80011e2: 60da str r2, [r3, #12]
pObj->IO.ReadReg = ioctx->ReadReg;
80011e4: 683b ldr r3, [r7, #0]
80011e6: 68da ldr r2, [r3, #12]
80011e8: 687b ldr r3, [r7, #4]
80011ea: 615a str r2, [r3, #20]
pObj->IO.WriteReg = ioctx->WriteReg;
80011ec: 683b ldr r3, [r7, #0]
80011ee: 689a ldr r2, [r3, #8]
80011f0: 687b ldr r3, [r7, #4]
80011f2: 611a str r2, [r3, #16]
pObj->IO.GetTick = ioctx->GetTick;
80011f4: 683b ldr r3, [r7, #0]
80011f6: 691a ldr r2, [r3, #16]
80011f8: 687b ldr r3, [r7, #4]
80011fa: 619a str r2, [r3, #24]
return DP83848_STATUS_OK;
80011fc: 2300 movs r3, #0
}
80011fe: 4618 mov r0, r3
8001200: 370c adds r7, #12
8001202: 46bd mov sp, r7
8001204: f85d 7b04 ldr.w r7, [sp], #4
8001208: 4770 bx lr
0800120a <DP83848_Init>:
* DP83848_STATUS_READ_ERROR if connot read register
* DP83848_STATUS_WRITE_ERROR if connot write to register
* DP83848_STATUS_RESET_TIMEOUT if cannot perform a software reset
*/
int32_t DP83848_Init(dp83848_Object_t *pObj)
{
800120a: b580 push {r7, lr}
800120c: b086 sub sp, #24
800120e: af00 add r7, sp, #0
8001210: 6078 str r0, [r7, #4]
uint32_t tickstart = 0, regvalue = 0, addr = 0;
8001212: 2300 movs r3, #0
8001214: 60fb str r3, [r7, #12]
8001216: 2300 movs r3, #0
8001218: 60bb str r3, [r7, #8]
800121a: 2300 movs r3, #0
800121c: 617b str r3, [r7, #20]
int32_t status = DP83848_STATUS_OK;
800121e: 2300 movs r3, #0
8001220: 613b str r3, [r7, #16]
if(pObj->Is_Initialized == 0)
8001222: 687b ldr r3, [r7, #4]
8001224: 685b ldr r3, [r3, #4]
8001226: 2b00 cmp r3, #0
8001228: d17c bne.n 8001324 <DP83848_Init+0x11a>
{
if(pObj->IO.Init != 0)
800122a: 687b ldr r3, [r7, #4]
800122c: 689b ldr r3, [r3, #8]
800122e: 2b00 cmp r3, #0
8001230: d002 beq.n 8001238 <DP83848_Init+0x2e>
{
/* GPIO and Clocks initialization */
pObj->IO.Init();
8001232: 687b ldr r3, [r7, #4]
8001234: 689b ldr r3, [r3, #8]
8001236: 4798 blx r3
}
/* for later check */
pObj->DevAddr = DP83848_MAX_DEV_ADDR + 1;
8001238: 687b ldr r3, [r7, #4]
800123a: 2220 movs r2, #32
800123c: 601a str r2, [r3, #0]
/* Get the device address from special mode register */
for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++)
800123e: 2300 movs r3, #0
8001240: 617b str r3, [r7, #20]
8001242: e01c b.n 800127e <DP83848_Init+0x74>
{
if(pObj->IO.ReadReg(addr, DP83848_SMR, &regvalue) < 0)
8001244: 687b ldr r3, [r7, #4]
8001246: 695b ldr r3, [r3, #20]
8001248: f107 0208 add.w r2, r7, #8
800124c: 2119 movs r1, #25
800124e: 6978 ldr r0, [r7, #20]
8001250: 4798 blx r3
8001252: 4603 mov r3, r0
8001254: 2b00 cmp r3, #0
8001256: da03 bge.n 8001260 <DP83848_Init+0x56>
{
status = DP83848_STATUS_READ_ERROR;
8001258: f06f 0304 mvn.w r3, #4
800125c: 613b str r3, [r7, #16]
/* Can't read from this device address
continue with next address */
continue;
800125e: e00b b.n 8001278 <DP83848_Init+0x6e>
}
if((regvalue & DP83848_SMR_PHY_ADDR) == addr)
8001260: 68bb ldr r3, [r7, #8]
8001262: f003 031f and.w r3, r3, #31
8001266: 697a ldr r2, [r7, #20]
8001268: 429a cmp r2, r3
800126a: d105 bne.n 8001278 <DP83848_Init+0x6e>
{
pObj->DevAddr = addr;
800126c: 687b ldr r3, [r7, #4]
800126e: 697a ldr r2, [r7, #20]
8001270: 601a str r2, [r3, #0]
status = DP83848_STATUS_OK;
8001272: 2300 movs r3, #0
8001274: 613b str r3, [r7, #16]
break;
8001276: e005 b.n 8001284 <DP83848_Init+0x7a>
for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++)
8001278: 697b ldr r3, [r7, #20]
800127a: 3301 adds r3, #1
800127c: 617b str r3, [r7, #20]
800127e: 697b ldr r3, [r7, #20]
8001280: 2b1f cmp r3, #31
8001282: d9df bls.n 8001244 <DP83848_Init+0x3a>
}
}
if(pObj->DevAddr > DP83848_MAX_DEV_ADDR)
8001284: 687b ldr r3, [r7, #4]
8001286: 681b ldr r3, [r3, #0]
8001288: 2b1f cmp r3, #31
800128a: d902 bls.n 8001292 <DP83848_Init+0x88>
{
status = DP83848_STATUS_ADDRESS_ERROR;
800128c: f06f 0302 mvn.w r3, #2
8001290: 613b str r3, [r7, #16]
}
/* if device address is matched */
if(status == DP83848_STATUS_OK)
8001292: 693b ldr r3, [r7, #16]
8001294: 2b00 cmp r3, #0
8001296: d145 bne.n 8001324 <DP83848_Init+0x11a>
{
/* set a software reset */
if(pObj->IO.WriteReg(pObj->DevAddr, DP83848_BCR, DP83848_BCR_SOFT_RESET) >= 0)
8001298: 687b ldr r3, [r7, #4]
800129a: 691b ldr r3, [r3, #16]
800129c: 687a ldr r2, [r7, #4]
800129e: 6810 ldr r0, [r2, #0]
80012a0: f44f 4200 mov.w r2, #32768 ; 0x8000
80012a4: 2100 movs r1, #0
80012a6: 4798 blx r3
80012a8: 4603 mov r3, r0
80012aa: 2b00 cmp r3, #0
80012ac: db37 blt.n 800131e <DP83848_Init+0x114>
{
/* get software reset status */
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &regvalue) >= 0)
80012ae: 687b ldr r3, [r7, #4]
80012b0: 695b ldr r3, [r3, #20]
80012b2: 687a ldr r2, [r7, #4]
80012b4: 6810 ldr r0, [r2, #0]
80012b6: f107 0208 add.w r2, r7, #8
80012ba: 2100 movs r1, #0
80012bc: 4798 blx r3
80012be: 4603 mov r3, r0
80012c0: 2b00 cmp r3, #0
80012c2: db28 blt.n 8001316 <DP83848_Init+0x10c>
{
tickstart = pObj->IO.GetTick();
80012c4: 687b ldr r3, [r7, #4]
80012c6: 699b ldr r3, [r3, #24]
80012c8: 4798 blx r3
80012ca: 4603 mov r3, r0
80012cc: 60fb str r3, [r7, #12]
/* wait until software reset is done or timeout occured */
while(regvalue & DP83848_BCR_SOFT_RESET)
80012ce: e01c b.n 800130a <DP83848_Init+0x100>
{
if((pObj->IO.GetTick() - tickstart) <= DP83848_SW_RESET_TO)
80012d0: 687b ldr r3, [r7, #4]
80012d2: 699b ldr r3, [r3, #24]
80012d4: 4798 blx r3
80012d6: 4603 mov r3, r0
80012d8: 461a mov r2, r3
80012da: 68fb ldr r3, [r7, #12]
80012dc: 1ad3 subs r3, r2, r3
80012de: f5b3 7ffa cmp.w r3, #500 ; 0x1f4
80012e2: d80e bhi.n 8001302 <DP83848_Init+0xf8>
{
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &regvalue) < 0)
80012e4: 687b ldr r3, [r7, #4]
80012e6: 695b ldr r3, [r3, #20]
80012e8: 687a ldr r2, [r7, #4]
80012ea: 6810 ldr r0, [r2, #0]
80012ec: f107 0208 add.w r2, r7, #8
80012f0: 2100 movs r1, #0
80012f2: 4798 blx r3
80012f4: 4603 mov r3, r0
80012f6: 2b00 cmp r3, #0
80012f8: da07 bge.n 800130a <DP83848_Init+0x100>
{
status = DP83848_STATUS_READ_ERROR;
80012fa: f06f 0304 mvn.w r3, #4
80012fe: 613b str r3, [r7, #16]
break;
8001300: e010 b.n 8001324 <DP83848_Init+0x11a>
}
}
else
{
status = DP83848_STATUS_RESET_TIMEOUT;
8001302: f06f 0301 mvn.w r3, #1
8001306: 613b str r3, [r7, #16]
break;
8001308: e00c b.n 8001324 <DP83848_Init+0x11a>
while(regvalue & DP83848_BCR_SOFT_RESET)
800130a: 68bb ldr r3, [r7, #8]
800130c: f403 4300 and.w r3, r3, #32768 ; 0x8000
8001310: 2b00 cmp r3, #0
8001312: d1dd bne.n 80012d0 <DP83848_Init+0xc6>
8001314: e006 b.n 8001324 <DP83848_Init+0x11a>
}
}
}
else
{
status = DP83848_STATUS_READ_ERROR;
8001316: f06f 0304 mvn.w r3, #4
800131a: 613b str r3, [r7, #16]
800131c: e002 b.n 8001324 <DP83848_Init+0x11a>
}
}
else
{
status = DP83848_STATUS_WRITE_ERROR;
800131e: f06f 0303 mvn.w r3, #3
8001322: 613b str r3, [r7, #16]
}
}
}
if(status == DP83848_STATUS_OK)
8001324: 693b ldr r3, [r7, #16]
8001326: 2b00 cmp r3, #0
8001328: d112 bne.n 8001350 <DP83848_Init+0x146>
{
tickstart = pObj->IO.GetTick();
800132a: 687b ldr r3, [r7, #4]
800132c: 699b ldr r3, [r3, #24]
800132e: 4798 blx r3
8001330: 4603 mov r3, r0
8001332: 60fb str r3, [r7, #12]
/* Wait for 2s to perform initialization */
while((pObj->IO.GetTick() - tickstart) <= DP83848_INIT_TO)
8001334: bf00 nop
8001336: 687b ldr r3, [r7, #4]
8001338: 699b ldr r3, [r3, #24]
800133a: 4798 blx r3
800133c: 4603 mov r3, r0
800133e: 461a mov r2, r3
8001340: 68fb ldr r3, [r7, #12]
8001342: 1ad3 subs r3, r2, r3
8001344: f5b3 6ffa cmp.w r3, #2000 ; 0x7d0
8001348: d9f5 bls.n 8001336 <DP83848_Init+0x12c>
{
}
pObj->Is_Initialized = 1;
800134a: 687b ldr r3, [r7, #4]
800134c: 2201 movs r2, #1
800134e: 605a str r2, [r3, #4]
}
return status;
8001350: 693b ldr r3, [r7, #16]
}
8001352: 4618 mov r0, r3
8001354: 3718 adds r7, #24
8001356: 46bd mov sp, r7
8001358: bd80 pop {r7, pc}
0800135a <DP83848_GetLinkState>:
* DP83848_STATUS_10MBITS_HALFDUPLEX if 10Mb/s HD
* DP83848_STATUS_READ_ERROR if connot read register
* DP83848_STATUS_WRITE_ERROR if connot write to register
*/
int32_t DP83848_GetLinkState(dp83848_Object_t *pObj)
{
800135a: b580 push {r7, lr}
800135c: b084 sub sp, #16
800135e: af00 add r7, sp, #0
8001360: 6078 str r0, [r7, #4]
uint32_t readval = 0;
8001362: 2300 movs r3, #0
8001364: 60fb str r3, [r7, #12]
/* Read Status register */
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0)
8001366: 687b ldr r3, [r7, #4]
8001368: 695b ldr r3, [r3, #20]
800136a: 687a ldr r2, [r7, #4]
800136c: 6810 ldr r0, [r2, #0]
800136e: f107 020c add.w r2, r7, #12
8001372: 2101 movs r1, #1
8001374: 4798 blx r3
8001376: 4603 mov r3, r0
8001378: 2b00 cmp r3, #0
800137a: da02 bge.n 8001382 <DP83848_GetLinkState+0x28>
{
return DP83848_STATUS_READ_ERROR;
800137c: f06f 0304 mvn.w r3, #4
8001380: e06e b.n 8001460 <DP83848_GetLinkState+0x106>
}
/* Read Status register again */
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0)
8001382: 687b ldr r3, [r7, #4]
8001384: 695b ldr r3, [r3, #20]
8001386: 687a ldr r2, [r7, #4]
8001388: 6810 ldr r0, [r2, #0]
800138a: f107 020c add.w r2, r7, #12
800138e: 2101 movs r1, #1
8001390: 4798 blx r3
8001392: 4603 mov r3, r0
8001394: 2b00 cmp r3, #0
8001396: da02 bge.n 800139e <DP83848_GetLinkState+0x44>
{
return DP83848_STATUS_READ_ERROR;
8001398: f06f 0304 mvn.w r3, #4
800139c: e060 b.n 8001460 <DP83848_GetLinkState+0x106>
}
if((readval & DP83848_BSR_LINK_STATUS) == 0)
800139e: 68fb ldr r3, [r7, #12]
80013a0: f003 0304 and.w r3, r3, #4
80013a4: 2b00 cmp r3, #0
80013a6: d101 bne.n 80013ac <DP83848_GetLinkState+0x52>
{
/* Return Link Down status */
return DP83848_STATUS_LINK_DOWN;
80013a8: 2301 movs r3, #1
80013aa: e059 b.n 8001460 <DP83848_GetLinkState+0x106>
}
/* Check Auto negotiaition */
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &readval) < 0)
80013ac: 687b ldr r3, [r7, #4]
80013ae: 695b ldr r3, [r3, #20]
80013b0: 687a ldr r2, [r7, #4]
80013b2: 6810 ldr r0, [r2, #0]
80013b4: f107 020c add.w r2, r7, #12
80013b8: 2100 movs r1, #0
80013ba: 4798 blx r3
80013bc: 4603 mov r3, r0
80013be: 2b00 cmp r3, #0
80013c0: da02 bge.n 80013c8 <DP83848_GetLinkState+0x6e>
{
return DP83848_STATUS_READ_ERROR;
80013c2: f06f 0304 mvn.w r3, #4
80013c6: e04b b.n 8001460 <DP83848_GetLinkState+0x106>
}
if((readval & DP83848_BCR_AUTONEGO_EN) != DP83848_BCR_AUTONEGO_EN)
80013c8: 68fb ldr r3, [r7, #12]
80013ca: f403 5380 and.w r3, r3, #4096 ; 0x1000
80013ce: 2b00 cmp r3, #0
80013d0: d11b bne.n 800140a <DP83848_GetLinkState+0xb0>
{
if(((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT) && ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE))
80013d2: 68fb ldr r3, [r7, #12]
80013d4: f403 5300 and.w r3, r3, #8192 ; 0x2000
80013d8: 2b00 cmp r3, #0
80013da: d006 beq.n 80013ea <DP83848_GetLinkState+0x90>
80013dc: 68fb ldr r3, [r7, #12]
80013de: f403 7380 and.w r3, r3, #256 ; 0x100
80013e2: 2b00 cmp r3, #0
80013e4: d001 beq.n 80013ea <DP83848_GetLinkState+0x90>
{
return DP83848_STATUS_100MBITS_FULLDUPLEX;
80013e6: 2302 movs r3, #2
80013e8: e03a b.n 8001460 <DP83848_GetLinkState+0x106>
}
else if ((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT)
80013ea: 68fb ldr r3, [r7, #12]
80013ec: f403 5300 and.w r3, r3, #8192 ; 0x2000
80013f0: 2b00 cmp r3, #0
80013f2: d001 beq.n 80013f8 <DP83848_GetLinkState+0x9e>
{
return DP83848_STATUS_100MBITS_HALFDUPLEX;
80013f4: 2303 movs r3, #3
80013f6: e033 b.n 8001460 <DP83848_GetLinkState+0x106>
}
else if ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE)
80013f8: 68fb ldr r3, [r7, #12]
80013fa: f403 7380 and.w r3, r3, #256 ; 0x100
80013fe: 2b00 cmp r3, #0
8001400: d001 beq.n 8001406 <DP83848_GetLinkState+0xac>
{
return DP83848_STATUS_10MBITS_FULLDUPLEX;
8001402: 2304 movs r3, #4
8001404: e02c b.n 8001460 <DP83848_GetLinkState+0x106>
}
else
{
return DP83848_STATUS_10MBITS_HALFDUPLEX;
8001406: 2305 movs r3, #5
8001408: e02a b.n 8001460 <DP83848_GetLinkState+0x106>
}
}
else /* Auto Nego enabled */
{
if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_PHYSCSR, &readval) < 0)
800140a: 687b ldr r3, [r7, #4]
800140c: 695b ldr r3, [r3, #20]
800140e: 687a ldr r2, [r7, #4]
8001410: 6810 ldr r0, [r2, #0]
8001412: f107 020c add.w r2, r7, #12
8001416: 2110 movs r1, #16
8001418: 4798 blx r3
800141a: 4603 mov r3, r0
800141c: 2b00 cmp r3, #0
800141e: da02 bge.n 8001426 <DP83848_GetLinkState+0xcc>
{
return DP83848_STATUS_READ_ERROR;
8001420: f06f 0304 mvn.w r3, #4
8001424: e01c b.n 8001460 <DP83848_GetLinkState+0x106>
}
/* Check if auto nego not done */
if((readval & DP83848_PHYSCSR_AUTONEGO_DONE) == 0)
8001426: 68fb ldr r3, [r7, #12]
8001428: f403 7380 and.w r3, r3, #256 ; 0x100
800142c: 2b00 cmp r3, #0
800142e: d101 bne.n 8001434 <DP83848_GetLinkState+0xda>
{
return DP83848_STATUS_AUTONEGO_NOTDONE;
8001430: 2306 movs r3, #6
8001432: e015 b.n 8001460 <DP83848_GetLinkState+0x106>
}
if((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_FD)
8001434: 68fb ldr r3, [r7, #12]
8001436: f003 0306 and.w r3, r3, #6
800143a: 2b04 cmp r3, #4
800143c: d101 bne.n 8001442 <DP83848_GetLinkState+0xe8>
{
return DP83848_STATUS_100MBITS_FULLDUPLEX;
800143e: 2302 movs r3, #2
8001440: e00e b.n 8001460 <DP83848_GetLinkState+0x106>
}
else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_HD)
8001442: 68fb ldr r3, [r7, #12]
8001444: f003 0306 and.w r3, r3, #6
8001448: 2b00 cmp r3, #0
800144a: d101 bne.n 8001450 <DP83848_GetLinkState+0xf6>
{
return DP83848_STATUS_100MBITS_HALFDUPLEX;
800144c: 2303 movs r3, #3
800144e: e007 b.n 8001460 <DP83848_GetLinkState+0x106>
}
else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_10BT_FD)
8001450: 68fb ldr r3, [r7, #12]
8001452: f003 0306 and.w r3, r3, #6
8001456: 2b06 cmp r3, #6
8001458: d101 bne.n 800145e <DP83848_GetLinkState+0x104>
{
return DP83848_STATUS_10MBITS_FULLDUPLEX;
800145a: 2304 movs r3, #4
800145c: e000 b.n 8001460 <DP83848_GetLinkState+0x106>
}
else
{
return DP83848_STATUS_10MBITS_HALFDUPLEX;
800145e: 2305 movs r3, #5
}
}
}
8001460: 4618 mov r0, r3
8001462: 3710 adds r7, #16
8001464: 46bd mov sp, r7
8001466: bd80 pop {r7, pc}
08001468 <HAL_Init>:
* need to ensure that the SysTick time base is always set to 1 millisecond
* to have correct HAL operation.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_Init(void)
{
8001468: b580 push {r7, lr}
800146a: af00 add r7, sp, #0
/* Configure Flash prefetch, Instruction cache, Data cache */
#if (INSTRUCTION_CACHE_ENABLE != 0U)
__HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
800146c: 4b0e ldr r3, [pc, #56] ; (80014a8 <HAL_Init+0x40>)
800146e: 681b ldr r3, [r3, #0]
8001470: 4a0d ldr r2, [pc, #52] ; (80014a8 <HAL_Init+0x40>)
8001472: f443 7300 orr.w r3, r3, #512 ; 0x200
8001476: 6013 str r3, [r2, #0]
#endif /* INSTRUCTION_CACHE_ENABLE */
#if (DATA_CACHE_ENABLE != 0U)
__HAL_FLASH_DATA_CACHE_ENABLE();
8001478: 4b0b ldr r3, [pc, #44] ; (80014a8 <HAL_Init+0x40>)
800147a: 681b ldr r3, [r3, #0]
800147c: 4a0a ldr r2, [pc, #40] ; (80014a8 <HAL_Init+0x40>)
800147e: f443 6380 orr.w r3, r3, #1024 ; 0x400
8001482: 6013 str r3, [r2, #0]
#endif /* DATA_CACHE_ENABLE */
#if (PREFETCH_ENABLE != 0U)
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
8001484: 4b08 ldr r3, [pc, #32] ; (80014a8 <HAL_Init+0x40>)
8001486: 681b ldr r3, [r3, #0]
8001488: 4a07 ldr r2, [pc, #28] ; (80014a8 <HAL_Init+0x40>)
800148a: f443 7380 orr.w r3, r3, #256 ; 0x100
800148e: 6013 str r3, [r2, #0]
#endif /* PREFETCH_ENABLE */
/* Set Interrupt Group Priority */
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
8001490: 2003 movs r0, #3
8001492: f000 f931 bl 80016f8 <HAL_NVIC_SetPriorityGrouping>
/* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
HAL_InitTick(TICK_INT_PRIORITY);
8001496: 200f movs r0, #15
8001498: f000 f808 bl 80014ac <HAL_InitTick>
/* Init the low level hardware */
HAL_MspInit();
800149c: f7ff fdf6 bl 800108c <HAL_MspInit>
/* Return function status */
return HAL_OK;
80014a0: 2300 movs r3, #0
}
80014a2: 4618 mov r0, r3
80014a4: bd80 pop {r7, pc}
80014a6: bf00 nop
80014a8: 40023c00 .word 0x40023c00
080014ac <HAL_InitTick>:
* implementation in user file.
* @param TickPriority Tick interrupt priority.
* @retval HAL status
*/
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
80014ac: b580 push {r7, lr}
80014ae: b082 sub sp, #8
80014b0: af00 add r7, sp, #0
80014b2: 6078 str r0, [r7, #4]
/* Configure the SysTick to have interrupt in 1ms time basis*/
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
80014b4: 4b12 ldr r3, [pc, #72] ; (8001500 <HAL_InitTick+0x54>)
80014b6: 681a ldr r2, [r3, #0]
80014b8: 4b12 ldr r3, [pc, #72] ; (8001504 <HAL_InitTick+0x58>)
80014ba: 781b ldrb r3, [r3, #0]
80014bc: 4619 mov r1, r3
80014be: f44f 737a mov.w r3, #1000 ; 0x3e8
80014c2: fbb3 f3f1 udiv r3, r3, r1
80014c6: fbb2 f3f3 udiv r3, r2, r3
80014ca: 4618 mov r0, r3
80014cc: f000 f93b bl 8001746 <HAL_SYSTICK_Config>
80014d0: 4603 mov r3, r0
80014d2: 2b00 cmp r3, #0
80014d4: d001 beq.n 80014da <HAL_InitTick+0x2e>
{
return HAL_ERROR;
80014d6: 2301 movs r3, #1
80014d8: e00e b.n 80014f8 <HAL_InitTick+0x4c>
}
/* Configure the SysTick IRQ priority */
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
80014da: 687b ldr r3, [r7, #4]
80014dc: 2b0f cmp r3, #15
80014de: d80a bhi.n 80014f6 <HAL_InitTick+0x4a>
{
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
80014e0: 2200 movs r2, #0
80014e2: 6879 ldr r1, [r7, #4]
80014e4: f04f 30ff mov.w r0, #4294967295
80014e8: f000 f911 bl 800170e <HAL_NVIC_SetPriority>
uwTickPrio = TickPriority;
80014ec: 4a06 ldr r2, [pc, #24] ; (8001508 <HAL_InitTick+0x5c>)
80014ee: 687b ldr r3, [r7, #4]
80014f0: 6013 str r3, [r2, #0]
{
return HAL_ERROR;
}
/* Return function status */
return HAL_OK;
80014f2: 2300 movs r3, #0
80014f4: e000 b.n 80014f8 <HAL_InitTick+0x4c>
return HAL_ERROR;
80014f6: 2301 movs r3, #1
}
80014f8: 4618 mov r0, r3
80014fa: 3708 adds r7, #8
80014fc: 46bd mov sp, r7
80014fe: bd80 pop {r7, pc}
8001500: 20000000 .word 0x20000000
8001504: 20000008 .word 0x20000008
8001508: 20000004 .word 0x20000004
0800150c <HAL_IncTick>:
* @note This function is declared as __weak to be overwritten in case of other
* implementations in user file.
* @retval None
*/
__weak void HAL_IncTick(void)
{
800150c: b480 push {r7}
800150e: af00 add r7, sp, #0
uwTick += uwTickFreq;
8001510: 4b06 ldr r3, [pc, #24] ; (800152c <HAL_IncTick+0x20>)
8001512: 781b ldrb r3, [r3, #0]
8001514: 461a mov r2, r3
8001516: 4b06 ldr r3, [pc, #24] ; (8001530 <HAL_IncTick+0x24>)
8001518: 681b ldr r3, [r3, #0]
800151a: 4413 add r3, r2
800151c: 4a04 ldr r2, [pc, #16] ; (8001530 <HAL_IncTick+0x24>)
800151e: 6013 str r3, [r2, #0]
}
8001520: bf00 nop
8001522: 46bd mov sp, r7
8001524: f85d 7b04 ldr.w r7, [sp], #4
8001528: 4770 bx lr
800152a: bf00 nop
800152c: 20000008 .word 0x20000008
8001530: 200009fc .word 0x200009fc
08001534 <HAL_GetTick>:
* @note This function is declared as __weak to be overwritten in case of other
* implementations in user file.
* @retval tick value
*/
__weak uint32_t HAL_GetTick(void)
{
8001534: b480 push {r7}
8001536: af00 add r7, sp, #0
return uwTick;
8001538: 4b03 ldr r3, [pc, #12] ; (8001548 <HAL_GetTick+0x14>)
800153a: 681b ldr r3, [r3, #0]
}
800153c: 4618 mov r0, r3
800153e: 46bd mov sp, r7
8001540: f85d 7b04 ldr.w r7, [sp], #4
8001544: 4770 bx lr
8001546: bf00 nop
8001548: 200009fc .word 0x200009fc
0800154c <HAL_Delay>:
* implementations in user file.
* @param Delay specifies the delay time length, in milliseconds.
* @retval None
*/
__weak void HAL_Delay(uint32_t Delay)
{
800154c: b580 push {r7, lr}
800154e: b084 sub sp, #16
8001550: af00 add r7, sp, #0
8001552: 6078 str r0, [r7, #4]
uint32_t tickstart = HAL_GetTick();
8001554: f7ff ffee bl 8001534 <HAL_GetTick>
8001558: 60b8 str r0, [r7, #8]
uint32_t wait = Delay;
800155a: 687b ldr r3, [r7, #4]
800155c: 60fb str r3, [r7, #12]
/* Add a freq to guarantee minimum wait */
if (wait < HAL_MAX_DELAY)
800155e: 68fb ldr r3, [r7, #12]
8001560: f1b3 3fff cmp.w r3, #4294967295
8001564: d005 beq.n 8001572 <HAL_Delay+0x26>
{
wait += (uint32_t)(uwTickFreq);
8001566: 4b0a ldr r3, [pc, #40] ; (8001590 <HAL_Delay+0x44>)
8001568: 781b ldrb r3, [r3, #0]
800156a: 461a mov r2, r3
800156c: 68fb ldr r3, [r7, #12]
800156e: 4413 add r3, r2
8001570: 60fb str r3, [r7, #12]
}
while((HAL_GetTick() - tickstart) < wait)
8001572: bf00 nop
8001574: f7ff ffde bl 8001534 <HAL_GetTick>
8001578: 4602 mov r2, r0
800157a: 68bb ldr r3, [r7, #8]
800157c: 1ad3 subs r3, r2, r3
800157e: 68fa ldr r2, [r7, #12]
8001580: 429a cmp r2, r3
8001582: d8f7 bhi.n 8001574 <HAL_Delay+0x28>
{
}
}
8001584: bf00 nop
8001586: bf00 nop
8001588: 3710 adds r7, #16
800158a: 46bd mov sp, r7
800158c: bd80 pop {r7, pc}
800158e: bf00 nop
8001590: 20000008 .word 0x20000008
08001594 <__NVIC_SetPriorityGrouping>:
In case of a conflict between priority grouping and available
priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
\param [in] PriorityGroup Priority grouping field.
*/
__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
{
8001594: b480 push {r7}
8001596: b085 sub sp, #20
8001598: af00 add r7, sp, #0
800159a: 6078 str r0, [r7, #4]
uint32_t reg_value;
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
800159c: 687b ldr r3, [r7, #4]
800159e: f003 0307 and.w r3, r3, #7
80015a2: 60fb str r3, [r7, #12]
reg_value = SCB->AIRCR; /* read old register configuration */
80015a4: 4b0c ldr r3, [pc, #48] ; (80015d8 <__NVIC_SetPriorityGrouping+0x44>)
80015a6: 68db ldr r3, [r3, #12]
80015a8: 60bb str r3, [r7, #8]
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
80015aa: 68ba ldr r2, [r7, #8]
80015ac: f64f 03ff movw r3, #63743 ; 0xf8ff
80015b0: 4013 ands r3, r2
80015b2: 60bb str r3, [r7, #8]
reg_value = (reg_value |
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
80015b4: 68fb ldr r3, [r7, #12]
80015b6: 021a lsls r2, r3, #8
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
80015b8: 68bb ldr r3, [r7, #8]
80015ba: 4313 orrs r3, r2
reg_value = (reg_value |
80015bc: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000
80015c0: f443 3300 orr.w r3, r3, #131072 ; 0x20000
80015c4: 60bb str r3, [r7, #8]
SCB->AIRCR = reg_value;
80015c6: 4a04 ldr r2, [pc, #16] ; (80015d8 <__NVIC_SetPriorityGrouping+0x44>)
80015c8: 68bb ldr r3, [r7, #8]
80015ca: 60d3 str r3, [r2, #12]
}
80015cc: bf00 nop
80015ce: 3714 adds r7, #20
80015d0: 46bd mov sp, r7
80015d2: f85d 7b04 ldr.w r7, [sp], #4
80015d6: 4770 bx lr
80015d8: e000ed00 .word 0xe000ed00
080015dc <__NVIC_GetPriorityGrouping>:
\brief Get Priority Grouping
\details Reads the priority grouping field from the NVIC Interrupt Controller.
\return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
*/
__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void)
{
80015dc: b480 push {r7}
80015de: af00 add r7, sp, #0
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
80015e0: 4b04 ldr r3, [pc, #16] ; (80015f4 <__NVIC_GetPriorityGrouping+0x18>)
80015e2: 68db ldr r3, [r3, #12]
80015e4: 0a1b lsrs r3, r3, #8
80015e6: f003 0307 and.w r3, r3, #7
}
80015ea: 4618 mov r0, r3
80015ec: 46bd mov sp, r7
80015ee: f85d 7b04 ldr.w r7, [sp], #4
80015f2: 4770 bx lr
80015f4: e000ed00 .word 0xe000ed00
080015f8 <__NVIC_SetPriority>:
\param [in] IRQn Interrupt number.
\param [in] priority Priority to set.
\note The priority cannot be set for every processor exception.
*/
__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
{
80015f8: b480 push {r7}
80015fa: b083 sub sp, #12
80015fc: af00 add r7, sp, #0
80015fe: 4603 mov r3, r0
8001600: 6039 str r1, [r7, #0]
8001602: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
8001604: f997 3007 ldrsb.w r3, [r7, #7]
8001608: 2b00 cmp r3, #0
800160a: db0a blt.n 8001622 <__NVIC_SetPriority+0x2a>
{
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
800160c: 683b ldr r3, [r7, #0]
800160e: b2da uxtb r2, r3
8001610: 490c ldr r1, [pc, #48] ; (8001644 <__NVIC_SetPriority+0x4c>)
8001612: f997 3007 ldrsb.w r3, [r7, #7]
8001616: 0112 lsls r2, r2, #4
8001618: b2d2 uxtb r2, r2
800161a: 440b add r3, r1
800161c: f883 2300 strb.w r2, [r3, #768] ; 0x300
}
else
{
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
}
}
8001620: e00a b.n 8001638 <__NVIC_SetPriority+0x40>
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
8001622: 683b ldr r3, [r7, #0]
8001624: b2da uxtb r2, r3
8001626: 4908 ldr r1, [pc, #32] ; (8001648 <__NVIC_SetPriority+0x50>)
8001628: 79fb ldrb r3, [r7, #7]
800162a: f003 030f and.w r3, r3, #15
800162e: 3b04 subs r3, #4
8001630: 0112 lsls r2, r2, #4
8001632: b2d2 uxtb r2, r2
8001634: 440b add r3, r1
8001636: 761a strb r2, [r3, #24]
}
8001638: bf00 nop
800163a: 370c adds r7, #12
800163c: 46bd mov sp, r7
800163e: f85d 7b04 ldr.w r7, [sp], #4
8001642: 4770 bx lr
8001644: e000e100 .word 0xe000e100
8001648: e000ed00 .word 0xe000ed00
0800164c <NVIC_EncodePriority>:
\param [in] PreemptPriority Preemptive priority value (starting from 0).
\param [in] SubPriority Subpriority value (starting from 0).
\return Encoded priority. Value can be used in the function \ref NVIC_SetPriority().
*/
__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
{
800164c: b480 push {r7}
800164e: b089 sub sp, #36 ; 0x24
8001650: af00 add r7, sp, #0
8001652: 60f8 str r0, [r7, #12]
8001654: 60b9 str r1, [r7, #8]
8001656: 607a str r2, [r7, #4]
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8001658: 68fb ldr r3, [r7, #12]
800165a: f003 0307 and.w r3, r3, #7
800165e: 61fb str r3, [r7, #28]
uint32_t PreemptPriorityBits;
uint32_t SubPriorityBits;
PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
8001660: 69fb ldr r3, [r7, #28]
8001662: f1c3 0307 rsb r3, r3, #7
8001666: 2b04 cmp r3, #4
8001668: bf28 it cs
800166a: 2304 movcs r3, #4
800166c: 61bb str r3, [r7, #24]
SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
800166e: 69fb ldr r3, [r7, #28]
8001670: 3304 adds r3, #4
8001672: 2b06 cmp r3, #6
8001674: d902 bls.n 800167c <NVIC_EncodePriority+0x30>
8001676: 69fb ldr r3, [r7, #28]
8001678: 3b03 subs r3, #3
800167a: e000 b.n 800167e <NVIC_EncodePriority+0x32>
800167c: 2300 movs r3, #0
800167e: 617b str r3, [r7, #20]
return (
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
8001680: f04f 32ff mov.w r2, #4294967295
8001684: 69bb ldr r3, [r7, #24]
8001686: fa02 f303 lsl.w r3, r2, r3
800168a: 43da mvns r2, r3
800168c: 68bb ldr r3, [r7, #8]
800168e: 401a ands r2, r3
8001690: 697b ldr r3, [r7, #20]
8001692: 409a lsls r2, r3
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
8001694: f04f 31ff mov.w r1, #4294967295
8001698: 697b ldr r3, [r7, #20]
800169a: fa01 f303 lsl.w r3, r1, r3
800169e: 43d9 mvns r1, r3
80016a0: 687b ldr r3, [r7, #4]
80016a2: 400b ands r3, r1
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
80016a4: 4313 orrs r3, r2
);
}
80016a6: 4618 mov r0, r3
80016a8: 3724 adds r7, #36 ; 0x24
80016aa: 46bd mov sp, r7
80016ac: f85d 7b04 ldr.w r7, [sp], #4
80016b0: 4770 bx lr
...
080016b4 <SysTick_Config>:
\note When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
must contain a vendor-specific implementation of this function.
*/
__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
{
80016b4: b580 push {r7, lr}
80016b6: b082 sub sp, #8
80016b8: af00 add r7, sp, #0
80016ba: 6078 str r0, [r7, #4]
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
80016bc: 687b ldr r3, [r7, #4]
80016be: 3b01 subs r3, #1
80016c0: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
80016c4: d301 bcc.n 80016ca <SysTick_Config+0x16>
{
return (1UL); /* Reload value impossible */
80016c6: 2301 movs r3, #1
80016c8: e00f b.n 80016ea <SysTick_Config+0x36>
}
SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
80016ca: 4a0a ldr r2, [pc, #40] ; (80016f4 <SysTick_Config+0x40>)
80016cc: 687b ldr r3, [r7, #4]
80016ce: 3b01 subs r3, #1
80016d0: 6053 str r3, [r2, #4]
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
80016d2: 210f movs r1, #15
80016d4: f04f 30ff mov.w r0, #4294967295
80016d8: f7ff ff8e bl 80015f8 <__NVIC_SetPriority>
SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
80016dc: 4b05 ldr r3, [pc, #20] ; (80016f4 <SysTick_Config+0x40>)
80016de: 2200 movs r2, #0
80016e0: 609a str r2, [r3, #8]
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
80016e2: 4b04 ldr r3, [pc, #16] ; (80016f4 <SysTick_Config+0x40>)
80016e4: 2207 movs r2, #7
80016e6: 601a str r2, [r3, #0]
SysTick_CTRL_TICKINT_Msk |
SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
return (0UL); /* Function successful */
80016e8: 2300 movs r3, #0
}
80016ea: 4618 mov r0, r3
80016ec: 3708 adds r7, #8
80016ee: 46bd mov sp, r7
80016f0: bd80 pop {r7, pc}
80016f2: bf00 nop
80016f4: e000e010 .word 0xe000e010
080016f8 <HAL_NVIC_SetPriorityGrouping>:
* @note When the NVIC_PriorityGroup_0 is selected, IRQ preemption is no more possible.
* The pending IRQ priority will be managed only by the subpriority.
* @retval None
*/
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
{
80016f8: b580 push {r7, lr}
80016fa: b082 sub sp, #8
80016fc: af00 add r7, sp, #0
80016fe: 6078 str r0, [r7, #4]
/* Check the parameters */
assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup));
/* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */
NVIC_SetPriorityGrouping(PriorityGroup);
8001700: 6878 ldr r0, [r7, #4]
8001702: f7ff ff47 bl 8001594 <__NVIC_SetPriorityGrouping>
}
8001706: bf00 nop
8001708: 3708 adds r7, #8
800170a: 46bd mov sp, r7
800170c: bd80 pop {r7, pc}
0800170e <HAL_NVIC_SetPriority>:
* This parameter can be a value between 0 and 15
* A lower priority value indicates a higher priority.
* @retval None
*/
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
{
800170e: b580 push {r7, lr}
8001710: b086 sub sp, #24
8001712: af00 add r7, sp, #0
8001714: 4603 mov r3, r0
8001716: 60b9 str r1, [r7, #8]
8001718: 607a str r2, [r7, #4]
800171a: 73fb strb r3, [r7, #15]
uint32_t prioritygroup = 0x00U;
800171c: 2300 movs r3, #0
800171e: 617b str r3, [r7, #20]
/* Check the parameters */
assert_param(IS_NVIC_SUB_PRIORITY(SubPriority));
assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
prioritygroup = NVIC_GetPriorityGrouping();
8001720: f7ff ff5c bl 80015dc <__NVIC_GetPriorityGrouping>
8001724: 6178 str r0, [r7, #20]
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
8001726: 687a ldr r2, [r7, #4]
8001728: 68b9 ldr r1, [r7, #8]
800172a: 6978 ldr r0, [r7, #20]
800172c: f7ff ff8e bl 800164c <NVIC_EncodePriority>
8001730: 4602 mov r2, r0
8001732: f997 300f ldrsb.w r3, [r7, #15]
8001736: 4611 mov r1, r2
8001738: 4618 mov r0, r3
800173a: f7ff ff5d bl 80015f8 <__NVIC_SetPriority>
}
800173e: bf00 nop
8001740: 3718 adds r7, #24
8001742: 46bd mov sp, r7
8001744: bd80 pop {r7, pc}
08001746 <HAL_SYSTICK_Config>:
* @param TicksNumb Specifies the ticks Number of ticks between two interrupts.
* @retval status: - 0 Function succeeded.
* - 1 Function failed.
*/
uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
{
8001746: b580 push {r7, lr}
8001748: b082 sub sp, #8
800174a: af00 add r7, sp, #0
800174c: 6078 str r0, [r7, #4]
return SysTick_Config(TicksNumb);
800174e: 6878 ldr r0, [r7, #4]
8001750: f7ff ffb0 bl 80016b4 <SysTick_Config>
8001754: 4603 mov r3, r0
}
8001756: 4618 mov r0, r3
8001758: 3708 adds r7, #8
800175a: 46bd mov sp, r7
800175c: bd80 pop {r7, pc}
...
08001760 <HAL_ETH_Init>:
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth)
{
8001760: b580 push {r7, lr}
8001762: b084 sub sp, #16
8001764: af00 add r7, sp, #0
8001766: 6078 str r0, [r7, #4]
uint32_t tickstart;
if (heth == NULL)
8001768: 687b ldr r3, [r7, #4]
800176a: 2b00 cmp r3, #0
800176c: d101 bne.n 8001772 <HAL_ETH_Init+0x12>
{
return HAL_ERROR;
800176e: 2301 movs r3, #1
8001770: e06c b.n 800184c <HAL_ETH_Init+0xec>
}
if (heth->gState == HAL_ETH_STATE_RESET)
8001772: 687b ldr r3, [r7, #4]
8001774: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8001778: 2b00 cmp r3, #0
800177a: d106 bne.n 800178a <HAL_ETH_Init+0x2a>
{
heth->gState = HAL_ETH_STATE_BUSY;
800177c: 687b ldr r3, [r7, #4]
800177e: 2223 movs r2, #35 ; 0x23
8001780: f8c3 2084 str.w r2, [r3, #132] ; 0x84
/* Init the low level hardware */
heth->MspInitCallback(heth);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC. */
HAL_ETH_MspInit(heth);
8001784: 6878 ldr r0, [r7, #4]
8001786: f002 f901 bl 800398c <HAL_ETH_MspInit>
#endif /* (USE_HAL_ETH_REGISTER_CALLBACKS) */
}
__HAL_RCC_SYSCFG_CLK_ENABLE();
800178a: 2300 movs r3, #0
800178c: 60bb str r3, [r7, #8]
800178e: 4b31 ldr r3, [pc, #196] ; (8001854 <HAL_ETH_Init+0xf4>)
8001790: 6c5b ldr r3, [r3, #68] ; 0x44
8001792: 4a30 ldr r2, [pc, #192] ; (8001854 <HAL_ETH_Init+0xf4>)
8001794: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8001798: 6453 str r3, [r2, #68] ; 0x44
800179a: 4b2e ldr r3, [pc, #184] ; (8001854 <HAL_ETH_Init+0xf4>)
800179c: 6c5b ldr r3, [r3, #68] ; 0x44
800179e: f403 4380 and.w r3, r3, #16384 ; 0x4000
80017a2: 60bb str r3, [r7, #8]
80017a4: 68bb ldr r3, [r7, #8]
/* Select MII or RMII Mode*/
SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL);
80017a6: 4b2c ldr r3, [pc, #176] ; (8001858 <HAL_ETH_Init+0xf8>)
80017a8: 685b ldr r3, [r3, #4]
80017aa: 4a2b ldr r2, [pc, #172] ; (8001858 <HAL_ETH_Init+0xf8>)
80017ac: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
80017b0: 6053 str r3, [r2, #4]
SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface;
80017b2: 4b29 ldr r3, [pc, #164] ; (8001858 <HAL_ETH_Init+0xf8>)
80017b4: 685a ldr r2, [r3, #4]
80017b6: 687b ldr r3, [r7, #4]
80017b8: 689b ldr r3, [r3, #8]
80017ba: 4927 ldr r1, [pc, #156] ; (8001858 <HAL_ETH_Init+0xf8>)
80017bc: 4313 orrs r3, r2
80017be: 604b str r3, [r1, #4]
/* Dummy read to sync SYSCFG with ETH */
(void)SYSCFG->PMC;
80017c0: 4b25 ldr r3, [pc, #148] ; (8001858 <HAL_ETH_Init+0xf8>)
80017c2: 685b ldr r3, [r3, #4]
/* Ethernet Software reset */
/* Set the SWR bit: resets all MAC subsystem internal registers and logic */
/* After reset all the registers holds their respective reset values */
SET_BIT(heth->Instance->DMABMR, ETH_DMABMR_SR);
80017c4: 687b ldr r3, [r7, #4]
80017c6: 681b ldr r3, [r3, #0]
80017c8: f503 5380 add.w r3, r3, #4096 ; 0x1000
80017cc: 681b ldr r3, [r3, #0]
80017ce: 687a ldr r2, [r7, #4]
80017d0: 6812 ldr r2, [r2, #0]
80017d2: f043 0301 orr.w r3, r3, #1
80017d6: f502 5280 add.w r2, r2, #4096 ; 0x1000
80017da: 6013 str r3, [r2, #0]
/* Get tick */
tickstart = HAL_GetTick();
80017dc: f7ff feaa bl 8001534 <HAL_GetTick>
80017e0: 60f8 str r0, [r7, #12]
/* Wait for software reset */
while (READ_BIT(heth->Instance->DMABMR, ETH_DMABMR_SR) > 0U)
80017e2: e011 b.n 8001808 <HAL_ETH_Init+0xa8>
{
if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT))
80017e4: f7ff fea6 bl 8001534 <HAL_GetTick>
80017e8: 4602 mov r2, r0
80017ea: 68fb ldr r3, [r7, #12]
80017ec: 1ad3 subs r3, r2, r3
80017ee: f5b3 7ffa cmp.w r3, #500 ; 0x1f4
80017f2: d909 bls.n 8001808 <HAL_ETH_Init+0xa8>
{
/* Set Error Code */
heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT;
80017f4: 687b ldr r3, [r7, #4]
80017f6: 2204 movs r2, #4
80017f8: f8c3 2088 str.w r2, [r3, #136] ; 0x88
/* Set State as Error */
heth->gState = HAL_ETH_STATE_ERROR;
80017fc: 687b ldr r3, [r7, #4]
80017fe: 22e0 movs r2, #224 ; 0xe0
8001800: f8c3 2084 str.w r2, [r3, #132] ; 0x84
/* Return Error */
return HAL_ERROR;
8001804: 2301 movs r3, #1
8001806: e021 b.n 800184c <HAL_ETH_Init+0xec>
while (READ_BIT(heth->Instance->DMABMR, ETH_DMABMR_SR) > 0U)
8001808: 687b ldr r3, [r7, #4]
800180a: 681b ldr r3, [r3, #0]
800180c: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001810: 681b ldr r3, [r3, #0]
8001812: f003 0301 and.w r3, r3, #1
8001816: 2b00 cmp r3, #0
8001818: d1e4 bne.n 80017e4 <HAL_ETH_Init+0x84>
}
}
/*------------------ MAC, MTL and DMA default Configuration ----------------*/
ETH_MACDMAConfig(heth);
800181a: 6878 ldr r0, [r7, #4]
800181c: f000 fdf0 bl 8002400 <ETH_MACDMAConfig>
/*------------------ DMA Tx Descriptors Configuration ----------------------*/
ETH_DMATxDescListInit(heth);
8001820: 6878 ldr r0, [r7, #4]
8001822: f000 fe97 bl 8002554 <ETH_DMATxDescListInit>
/*------------------ DMA Rx Descriptors Configuration ----------------------*/
ETH_DMARxDescListInit(heth);
8001826: 6878 ldr r0, [r7, #4]
8001828: f000 feed bl 8002606 <ETH_DMARxDescListInit>
/*--------------------- ETHERNET MAC Address Configuration ------------------*/
ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr);
800182c: 687b ldr r3, [r7, #4]
800182e: 685b ldr r3, [r3, #4]
8001830: 461a mov r2, r3
8001832: 2100 movs r1, #0
8001834: 6878 ldr r0, [r7, #4]
8001836: f000 fe55 bl 80024e4 <ETH_MACAddressConfig>
heth->ErrorCode = HAL_ETH_ERROR_NONE;
800183a: 687b ldr r3, [r7, #4]
800183c: 2200 movs r2, #0
800183e: f8c3 2088 str.w r2, [r3, #136] ; 0x88
heth->gState = HAL_ETH_STATE_READY;
8001842: 687b ldr r3, [r7, #4]
8001844: 2210 movs r2, #16
8001846: f8c3 2084 str.w r2, [r3, #132] ; 0x84
return HAL_OK;
800184a: 2300 movs r3, #0
}
800184c: 4618 mov r0, r3
800184e: 3710 adds r7, #16
8001850: 46bd mov sp, r7
8001852: bd80 pop {r7, pc}
8001854: 40023800 .word 0x40023800
8001858: 40013800 .word 0x40013800
0800185c <HAL_ETH_Start>:
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth)
{
800185c: b580 push {r7, lr}
800185e: b084 sub sp, #16
8001860: af00 add r7, sp, #0
8001862: 6078 str r0, [r7, #4]
uint32_t tmpreg1;
if (heth->gState == HAL_ETH_STATE_READY)
8001864: 687b ldr r3, [r7, #4]
8001866: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
800186a: 2b10 cmp r3, #16
800186c: d150 bne.n 8001910 <HAL_ETH_Start+0xb4>
{
heth->gState = HAL_ETH_STATE_BUSY;
800186e: 687b ldr r3, [r7, #4]
8001870: 2223 movs r2, #35 ; 0x23
8001872: f8c3 2084 str.w r2, [r3, #132] ; 0x84
/* Set nombre of descriptors to build */
heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT;
8001876: 687b ldr r3, [r7, #4]
8001878: 2204 movs r2, #4
800187a: 66da str r2, [r3, #108] ; 0x6c
/* Build all descriptors */
ETH_UpdateDescriptor(heth);
800187c: 6878 ldr r0, [r7, #4]
800187e: f000 f9fd bl 8001c7c <ETH_UpdateDescriptor>
/* Enable the MAC transmission */
SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
8001882: 687b ldr r3, [r7, #4]
8001884: 681b ldr r3, [r3, #0]
8001886: 681a ldr r2, [r3, #0]
8001888: 687b ldr r3, [r7, #4]
800188a: 681b ldr r3, [r3, #0]
800188c: f042 0208 orr.w r2, r2, #8
8001890: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg1 = (heth->Instance)->MACCR;
8001892: 687b ldr r3, [r7, #4]
8001894: 681b ldr r3, [r3, #0]
8001896: 681b ldr r3, [r3, #0]
8001898: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
800189a: 2001 movs r0, #1
800189c: f7ff fe56 bl 800154c <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
80018a0: 687b ldr r3, [r7, #4]
80018a2: 681b ldr r3, [r3, #0]
80018a4: 68fa ldr r2, [r7, #12]
80018a6: 601a str r2, [r3, #0]
/* Enable the MAC reception */
SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
80018a8: 687b ldr r3, [r7, #4]
80018aa: 681b ldr r3, [r3, #0]
80018ac: 681a ldr r2, [r3, #0]
80018ae: 687b ldr r3, [r7, #4]
80018b0: 681b ldr r3, [r3, #0]
80018b2: f042 0204 orr.w r2, r2, #4
80018b6: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg1 = (heth->Instance)->MACCR;
80018b8: 687b ldr r3, [r7, #4]
80018ba: 681b ldr r3, [r3, #0]
80018bc: 681b ldr r3, [r3, #0]
80018be: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80018c0: 2001 movs r0, #1
80018c2: f7ff fe43 bl 800154c <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
80018c6: 687b ldr r3, [r7, #4]
80018c8: 681b ldr r3, [r3, #0]
80018ca: 68fa ldr r2, [r7, #12]
80018cc: 601a str r2, [r3, #0]
/* Flush Transmit FIFO */
ETH_FlushTransmitFIFO(heth);
80018ce: 6878 ldr r0, [r7, #4]
80018d0: f000 fc36 bl 8002140 <ETH_FlushTransmitFIFO>
/* Enable the DMA transmission */
SET_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_ST);
80018d4: 687b ldr r3, [r7, #4]
80018d6: 681b ldr r3, [r3, #0]
80018d8: f503 5380 add.w r3, r3, #4096 ; 0x1000
80018dc: 699b ldr r3, [r3, #24]
80018de: 687a ldr r2, [r7, #4]
80018e0: 6812 ldr r2, [r2, #0]
80018e2: f443 5300 orr.w r3, r3, #8192 ; 0x2000
80018e6: f502 5280 add.w r2, r2, #4096 ; 0x1000
80018ea: 6193 str r3, [r2, #24]
/* Enable the DMA reception */
SET_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_SR);
80018ec: 687b ldr r3, [r7, #4]
80018ee: 681b ldr r3, [r3, #0]
80018f0: f503 5380 add.w r3, r3, #4096 ; 0x1000
80018f4: 699b ldr r3, [r3, #24]
80018f6: 687a ldr r2, [r7, #4]
80018f8: 6812 ldr r2, [r2, #0]
80018fa: f043 0302 orr.w r3, r3, #2
80018fe: f502 5280 add.w r2, r2, #4096 ; 0x1000
8001902: 6193 str r3, [r2, #24]
heth->gState = HAL_ETH_STATE_STARTED;
8001904: 687b ldr r3, [r7, #4]
8001906: 2223 movs r2, #35 ; 0x23
8001908: f8c3 2084 str.w r2, [r3, #132] ; 0x84
return HAL_OK;
800190c: 2300 movs r3, #0
800190e: e000 b.n 8001912 <HAL_ETH_Start+0xb6>
}
else
{
return HAL_ERROR;
8001910: 2301 movs r3, #1
}
}
8001912: 4618 mov r0, r3
8001914: 3710 adds r7, #16
8001916: 46bd mov sp, r7
8001918: bd80 pop {r7, pc}
0800191a <HAL_ETH_Stop>:
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth)
{
800191a: b580 push {r7, lr}
800191c: b084 sub sp, #16
800191e: af00 add r7, sp, #0
8001920: 6078 str r0, [r7, #4]
uint32_t tmpreg1;
if (heth->gState == HAL_ETH_STATE_STARTED)
8001922: 687b ldr r3, [r7, #4]
8001924: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8001928: 2b23 cmp r3, #35 ; 0x23
800192a: d14a bne.n 80019c2 <HAL_ETH_Stop+0xa8>
{
/* Set the ETH peripheral state to BUSY */
heth->gState = HAL_ETH_STATE_BUSY;
800192c: 687b ldr r3, [r7, #4]
800192e: 2223 movs r2, #35 ; 0x23
8001930: f8c3 2084 str.w r2, [r3, #132] ; 0x84
/* Disable the DMA transmission */
CLEAR_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_ST);
8001934: 687b ldr r3, [r7, #4]
8001936: 681b ldr r3, [r3, #0]
8001938: f503 5380 add.w r3, r3, #4096 ; 0x1000
800193c: 699b ldr r3, [r3, #24]
800193e: 687a ldr r2, [r7, #4]
8001940: 6812 ldr r2, [r2, #0]
8001942: f423 5300 bic.w r3, r3, #8192 ; 0x2000
8001946: f502 5280 add.w r2, r2, #4096 ; 0x1000
800194a: 6193 str r3, [r2, #24]
/* Disable the DMA reception */
CLEAR_BIT(heth->Instance->DMAOMR, ETH_DMAOMR_SR);
800194c: 687b ldr r3, [r7, #4]
800194e: 681b ldr r3, [r3, #0]
8001950: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001954: 699b ldr r3, [r3, #24]
8001956: 687a ldr r2, [r7, #4]
8001958: 6812 ldr r2, [r2, #0]
800195a: f023 0302 bic.w r3, r3, #2
800195e: f502 5280 add.w r2, r2, #4096 ; 0x1000
8001962: 6193 str r3, [r2, #24]
/* Disable the MAC reception */
CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
8001964: 687b ldr r3, [r7, #4]
8001966: 681b ldr r3, [r3, #0]
8001968: 681a ldr r2, [r3, #0]
800196a: 687b ldr r3, [r7, #4]
800196c: 681b ldr r3, [r3, #0]
800196e: f022 0204 bic.w r2, r2, #4
8001972: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg1 = (heth->Instance)->MACCR;
8001974: 687b ldr r3, [r7, #4]
8001976: 681b ldr r3, [r3, #0]
8001978: 681b ldr r3, [r3, #0]
800197a: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
800197c: 2001 movs r0, #1
800197e: f7ff fde5 bl 800154c <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
8001982: 687b ldr r3, [r7, #4]
8001984: 681b ldr r3, [r3, #0]
8001986: 68fa ldr r2, [r7, #12]
8001988: 601a str r2, [r3, #0]
/* Flush Transmit FIFO */
ETH_FlushTransmitFIFO(heth);
800198a: 6878 ldr r0, [r7, #4]
800198c: f000 fbd8 bl 8002140 <ETH_FlushTransmitFIFO>
/* Disable the MAC transmission */
CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
8001990: 687b ldr r3, [r7, #4]
8001992: 681b ldr r3, [r3, #0]
8001994: 681a ldr r2, [r3, #0]
8001996: 687b ldr r3, [r7, #4]
8001998: 681b ldr r3, [r3, #0]
800199a: f022 0208 bic.w r2, r2, #8
800199e: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg1 = (heth->Instance)->MACCR;
80019a0: 687b ldr r3, [r7, #4]
80019a2: 681b ldr r3, [r3, #0]
80019a4: 681b ldr r3, [r3, #0]
80019a6: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80019a8: 2001 movs r0, #1
80019aa: f7ff fdcf bl 800154c <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
80019ae: 687b ldr r3, [r7, #4]
80019b0: 681b ldr r3, [r3, #0]
80019b2: 68fa ldr r2, [r7, #12]
80019b4: 601a str r2, [r3, #0]
heth->gState = HAL_ETH_STATE_READY;
80019b6: 687b ldr r3, [r7, #4]
80019b8: 2210 movs r2, #16
80019ba: f8c3 2084 str.w r2, [r3, #132] ; 0x84
/* Return function status */
return HAL_OK;
80019be: 2300 movs r3, #0
80019c0: e000 b.n 80019c4 <HAL_ETH_Stop+0xaa>
}
else
{
return HAL_ERROR;
80019c2: 2301 movs r3, #1
}
}
80019c4: 4618 mov r0, r3
80019c6: 3710 adds r7, #16
80019c8: 46bd mov sp, r7
80019ca: bd80 pop {r7, pc}
080019cc <HAL_ETH_Transmit>:
* @param pTxConfig: Hold the configuration of packet to be transmitted
* @param Timeout: timeout value
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_Transmit(ETH_HandleTypeDef *heth, ETH_TxPacketConfig *pTxConfig, uint32_t Timeout)
{
80019cc: b580 push {r7, lr}
80019ce: b086 sub sp, #24
80019d0: af00 add r7, sp, #0
80019d2: 60f8 str r0, [r7, #12]
80019d4: 60b9 str r1, [r7, #8]
80019d6: 607a str r2, [r7, #4]
uint32_t tickstart;
ETH_DMADescTypeDef *dmatxdesc;
if (pTxConfig == NULL)
80019d8: 68bb ldr r3, [r7, #8]
80019da: 2b00 cmp r3, #0
80019dc: d109 bne.n 80019f2 <HAL_ETH_Transmit+0x26>
{
heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
80019de: 68fb ldr r3, [r7, #12]
80019e0: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
80019e4: f043 0201 orr.w r2, r3, #1
80019e8: 68fb ldr r3, [r7, #12]
80019ea: f8c3 2088 str.w r2, [r3, #136] ; 0x88
return HAL_ERROR;
80019ee: 2301 movs r3, #1
80019f0: e07c b.n 8001aec <HAL_ETH_Transmit+0x120>
}
if (heth->gState == HAL_ETH_STATE_STARTED)
80019f2: 68fb ldr r3, [r7, #12]
80019f4: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
80019f8: 2b23 cmp r3, #35 ; 0x23
80019fa: d176 bne.n 8001aea <HAL_ETH_Transmit+0x11e>
{
/* Config DMA Tx descriptor by Tx Packet info */
if (ETH_Prepare_Tx_Descriptors(heth, pTxConfig, 0) != HAL_ETH_ERROR_NONE)
80019fc: 2200 movs r2, #0
80019fe: 68b9 ldr r1, [r7, #8]
8001a00: 68f8 ldr r0, [r7, #12]
8001a02: f000 fe6d bl 80026e0 <ETH_Prepare_Tx_Descriptors>
8001a06: 4603 mov r3, r0
8001a08: 2b00 cmp r3, #0
8001a0a: d009 beq.n 8001a20 <HAL_ETH_Transmit+0x54>
{
/* Set the ETH error code */
heth->ErrorCode |= HAL_ETH_ERROR_BUSY;
8001a0c: 68fb ldr r3, [r7, #12]
8001a0e: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8001a12: f043 0202 orr.w r2, r3, #2
8001a16: 68fb ldr r3, [r7, #12]
8001a18: f8c3 2088 str.w r2, [r3, #136] ; 0x88
return HAL_ERROR;
8001a1c: 2301 movs r3, #1
8001a1e: e065 b.n 8001aec <HAL_ETH_Transmit+0x120>
\details Acts as a special kind of Data Memory Barrier.
It completes when all explicit memory accesses before this instruction complete.
*/
__STATIC_FORCEINLINE void __DSB(void)
{
__ASM volatile ("dsb 0xF":::"memory");
8001a20: f3bf 8f4f dsb sy
}
8001a24: bf00 nop
}
/* Ensure completion of descriptor preparation before transmission start */
__DSB();
dmatxdesc = (ETH_DMADescTypeDef *)(&heth->TxDescList)->TxDesc[heth->TxDescList.CurTxDesc];
8001a26: 68fb ldr r3, [r7, #12]
8001a28: 6a9a ldr r2, [r3, #40] ; 0x28
8001a2a: 68fb ldr r3, [r7, #12]
8001a2c: 3206 adds r2, #6
8001a2e: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001a32: 617b str r3, [r7, #20]
/* Incr current tx desc index */
INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U);
8001a34: 68fb ldr r3, [r7, #12]
8001a36: 6a9b ldr r3, [r3, #40] ; 0x28
8001a38: 1c5a adds r2, r3, #1
8001a3a: 68fb ldr r3, [r7, #12]
8001a3c: 629a str r2, [r3, #40] ; 0x28
8001a3e: 68fb ldr r3, [r7, #12]
8001a40: 6a9b ldr r3, [r3, #40] ; 0x28
8001a42: 2b03 cmp r3, #3
8001a44: d904 bls.n 8001a50 <HAL_ETH_Transmit+0x84>
8001a46: 68fb ldr r3, [r7, #12]
8001a48: 6a9b ldr r3, [r3, #40] ; 0x28
8001a4a: 1f1a subs r2, r3, #4
8001a4c: 68fb ldr r3, [r7, #12]
8001a4e: 629a str r2, [r3, #40] ; 0x28
/* Start transmission */
/* issue a poll command to Tx DMA by writing address of next immediate free descriptor */
WRITE_REG(heth->Instance->DMATPDR, (uint32_t)(heth->TxDescList.TxDesc[heth->TxDescList.CurTxDesc]));
8001a50: 68fb ldr r3, [r7, #12]
8001a52: 6a99 ldr r1, [r3, #40] ; 0x28
8001a54: 68fb ldr r3, [r7, #12]
8001a56: 681a ldr r2, [r3, #0]
8001a58: 68fb ldr r3, [r7, #12]
8001a5a: 3106 adds r1, #6
8001a5c: f853 3021 ldr.w r3, [r3, r1, lsl #2]
8001a60: f502 5280 add.w r2, r2, #4096 ; 0x1000
8001a64: 6053 str r3, [r2, #4]
tickstart = HAL_GetTick();
8001a66: f7ff fd65 bl 8001534 <HAL_GetTick>
8001a6a: 6138 str r0, [r7, #16]
/* Wait for data to be transmitted or timeout occurred */
while ((dmatxdesc->DESC0 & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
8001a6c: e037 b.n 8001ade <HAL_ETH_Transmit+0x112>
{
if ((heth->Instance->DMASR & ETH_DMASR_FBES) != (uint32_t)RESET)
8001a6e: 68fb ldr r3, [r7, #12]
8001a70: 681b ldr r3, [r3, #0]
8001a72: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001a76: 695b ldr r3, [r3, #20]
8001a78: f403 5300 and.w r3, r3, #8192 ; 0x2000
8001a7c: 2b00 cmp r3, #0
8001a7e: d011 beq.n 8001aa4 <HAL_ETH_Transmit+0xd8>
{
heth->ErrorCode |= HAL_ETH_ERROR_DMA;
8001a80: 68fb ldr r3, [r7, #12]
8001a82: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8001a86: f043 0208 orr.w r2, r3, #8
8001a8a: 68fb ldr r3, [r7, #12]
8001a8c: f8c3 2088 str.w r2, [r3, #136] ; 0x88
heth->DMAErrorCode = heth->Instance->DMASR;
8001a90: 68fb ldr r3, [r7, #12]
8001a92: 681b ldr r3, [r3, #0]
8001a94: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001a98: 695a ldr r2, [r3, #20]
8001a9a: 68fb ldr r3, [r7, #12]
8001a9c: f8c3 208c str.w r2, [r3, #140] ; 0x8c
/* Return function status */
return HAL_ERROR;
8001aa0: 2301 movs r3, #1
8001aa2: e023 b.n 8001aec <HAL_ETH_Transmit+0x120>
}
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
8001aa4: 687b ldr r3, [r7, #4]
8001aa6: f1b3 3fff cmp.w r3, #4294967295
8001aaa: d018 beq.n 8001ade <HAL_ETH_Transmit+0x112>
{
if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U))
8001aac: f7ff fd42 bl 8001534 <HAL_GetTick>
8001ab0: 4602 mov r2, r0
8001ab2: 693b ldr r3, [r7, #16]
8001ab4: 1ad3 subs r3, r2, r3
8001ab6: 687a ldr r2, [r7, #4]
8001ab8: 429a cmp r2, r3
8001aba: d302 bcc.n 8001ac2 <HAL_ETH_Transmit+0xf6>
8001abc: 687b ldr r3, [r7, #4]
8001abe: 2b00 cmp r3, #0
8001ac0: d10d bne.n 8001ade <HAL_ETH_Transmit+0x112>
{
heth->ErrorCode |= HAL_ETH_ERROR_TIMEOUT;
8001ac2: 68fb ldr r3, [r7, #12]
8001ac4: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8001ac8: f043 0204 orr.w r2, r3, #4
8001acc: 68fb ldr r3, [r7, #12]
8001ace: f8c3 2088 str.w r2, [r3, #136] ; 0x88
/* Clear TX descriptor so that we can proceed */
dmatxdesc->DESC0 = (ETH_DMATXDESC_FS | ETH_DMATXDESC_LS);
8001ad2: 697b ldr r3, [r7, #20]
8001ad4: f04f 5240 mov.w r2, #805306368 ; 0x30000000
8001ad8: 601a str r2, [r3, #0]
return HAL_ERROR;
8001ada: 2301 movs r3, #1
8001adc: e006 b.n 8001aec <HAL_ETH_Transmit+0x120>
while ((dmatxdesc->DESC0 & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
8001ade: 697b ldr r3, [r7, #20]
8001ae0: 681b ldr r3, [r3, #0]
8001ae2: 2b00 cmp r3, #0
8001ae4: dbc3 blt.n 8001a6e <HAL_ETH_Transmit+0xa2>
}
}
}
/* Return function status */
return HAL_OK;
8001ae6: 2300 movs r3, #0
8001ae8: e000 b.n 8001aec <HAL_ETH_Transmit+0x120>
}
else
{
return HAL_ERROR;
8001aea: 2301 movs r3, #1
}
}
8001aec: 4618 mov r0, r3
8001aee: 3718 adds r7, #24
8001af0: 46bd mov sp, r7
8001af2: bd80 pop {r7, pc}
08001af4 <HAL_ETH_ReadData>:
* the configuration information for ETHERNET module
* @param pAppBuff: Pointer to an application buffer to receive the packet.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_ReadData(ETH_HandleTypeDef *heth, void **pAppBuff)
{
8001af4: b580 push {r7, lr}
8001af6: b088 sub sp, #32
8001af8: af00 add r7, sp, #0
8001afa: 6078 str r0, [r7, #4]
8001afc: 6039 str r1, [r7, #0]
uint32_t descidx;
ETH_DMADescTypeDef *dmarxdesc;
uint32_t desccnt = 0U;
8001afe: 2300 movs r3, #0
8001b00: 617b str r3, [r7, #20]
uint32_t desccntmax;
uint32_t bufflength;
uint8_t rxdataready = 0U;
8001b02: 2300 movs r3, #0
8001b04: 73fb strb r3, [r7, #15]
if (pAppBuff == NULL)
8001b06: 683b ldr r3, [r7, #0]
8001b08: 2b00 cmp r3, #0
8001b0a: d109 bne.n 8001b20 <HAL_ETH_ReadData+0x2c>
{
heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
8001b0c: 687b ldr r3, [r7, #4]
8001b0e: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8001b12: f043 0201 orr.w r2, r3, #1
8001b16: 687b ldr r3, [r7, #4]
8001b18: f8c3 2088 str.w r2, [r3, #136] ; 0x88
return HAL_ERROR;
8001b1c: 2301 movs r3, #1
8001b1e: e0a8 b.n 8001c72 <HAL_ETH_ReadData+0x17e>
}
if (heth->gState != HAL_ETH_STATE_STARTED)
8001b20: 687b ldr r3, [r7, #4]
8001b22: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8001b26: 2b23 cmp r3, #35 ; 0x23
8001b28: d001 beq.n 8001b2e <HAL_ETH_ReadData+0x3a>
{
return HAL_ERROR;
8001b2a: 2301 movs r3, #1
8001b2c: e0a1 b.n 8001c72 <HAL_ETH_ReadData+0x17e>
}
descidx = heth->RxDescList.RxDescIdx;
8001b2e: 687b ldr r3, [r7, #4]
8001b30: 6ddb ldr r3, [r3, #92] ; 0x5c
8001b32: 61fb str r3, [r7, #28]
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
8001b34: 687b ldr r3, [r7, #4]
8001b36: 69fa ldr r2, [r7, #28]
8001b38: 3212 adds r2, #18
8001b3a: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001b3e: 61bb str r3, [r7, #24]
desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt;
8001b40: 687b ldr r3, [r7, #4]
8001b42: 6edb ldr r3, [r3, #108] ; 0x6c
8001b44: f1c3 0304 rsb r3, r3, #4
8001b48: 60bb str r3, [r7, #8]
/* Check if descriptor is not owned by DMA */
while ((READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_OWN) == (uint32_t)RESET) && (desccnt < desccntmax)
8001b4a: e06a b.n 8001c22 <HAL_ETH_ReadData+0x12e>
&& (rxdataready == 0U))
{
if (READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_LS) != (uint32_t)RESET)
8001b4c: 69bb ldr r3, [r7, #24]
8001b4e: 681b ldr r3, [r3, #0]
8001b50: f403 7380 and.w r3, r3, #256 ; 0x100
8001b54: 2b00 cmp r3, #0
8001b56: d007 beq.n 8001b68 <HAL_ETH_ReadData+0x74>
{
/* Get timestamp high */
heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC6;
8001b58: 69bb ldr r3, [r7, #24]
8001b5a: 699a ldr r2, [r3, #24]
8001b5c: 687b ldr r3, [r7, #4]
8001b5e: 679a str r2, [r3, #120] ; 0x78
/* Get timestamp low */
heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC7;
8001b60: 69bb ldr r3, [r7, #24]
8001b62: 69da ldr r2, [r3, #28]
8001b64: 687b ldr r3, [r7, #4]
8001b66: 675a str r2, [r3, #116] ; 0x74
}
if ((READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_FS) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL))
8001b68: 69bb ldr r3, [r7, #24]
8001b6a: 681b ldr r3, [r3, #0]
8001b6c: f403 7300 and.w r3, r3, #512 ; 0x200
8001b70: 2b00 cmp r3, #0
8001b72: d103 bne.n 8001b7c <HAL_ETH_ReadData+0x88>
8001b74: 687b ldr r3, [r7, #4]
8001b76: 6fdb ldr r3, [r3, #124] ; 0x7c
8001b78: 2b00 cmp r3, #0
8001b7a: d040 beq.n 8001bfe <HAL_ETH_ReadData+0x10a>
{
/* Check first descriptor */
if (READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_FS) != (uint32_t)RESET)
8001b7c: 69bb ldr r3, [r7, #24]
8001b7e: 681b ldr r3, [r3, #0]
8001b80: f403 7300 and.w r3, r3, #512 ; 0x200
8001b84: 2b00 cmp r3, #0
8001b86: d005 beq.n 8001b94 <HAL_ETH_ReadData+0xa0>
{
heth->RxDescList.RxDescCnt = 0;
8001b88: 687b ldr r3, [r7, #4]
8001b8a: 2200 movs r2, #0
8001b8c: 661a str r2, [r3, #96] ; 0x60
heth->RxDescList.RxDataLength = 0;
8001b8e: 687b ldr r3, [r7, #4]
8001b90: 2200 movs r2, #0
8001b92: 665a str r2, [r3, #100] ; 0x64
}
/* Check if last descriptor */
bufflength = heth->Init.RxBuffLen;
8001b94: 687b ldr r3, [r7, #4]
8001b96: 695b ldr r3, [r3, #20]
8001b98: 613b str r3, [r7, #16]
if (READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_LS) != (uint32_t)RESET)
8001b9a: 69bb ldr r3, [r7, #24]
8001b9c: 681b ldr r3, [r3, #0]
8001b9e: f403 7380 and.w r3, r3, #256 ; 0x100
8001ba2: 2b00 cmp r3, #0
8001ba4: d00c beq.n 8001bc0 <HAL_ETH_ReadData+0xcc>
{
/* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */
bufflength = ((dmarxdesc->DESC0 & ETH_DMARXDESC_FL) >> ETH_DMARXDESC_FRAMELENGTHSHIFT) - 4U;
8001ba6: 69bb ldr r3, [r7, #24]
8001ba8: 681b ldr r3, [r3, #0]
8001baa: 0c1b lsrs r3, r3, #16
8001bac: f3c3 030d ubfx r3, r3, #0, #14
8001bb0: 3b04 subs r3, #4
8001bb2: 613b str r3, [r7, #16]
/* Save Last descriptor index */
heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC0;
8001bb4: 69bb ldr r3, [r7, #24]
8001bb6: 681a ldr r2, [r3, #0]
8001bb8: 687b ldr r3, [r7, #4]
8001bba: 671a str r2, [r3, #112] ; 0x70
/* Packet ready */
rxdataready = 1;
8001bbc: 2301 movs r3, #1
8001bbe: 73fb strb r3, [r7, #15]
}
/* Link data */
WRITE_REG(dmarxdesc->BackupAddr0, dmarxdesc->DESC2);
8001bc0: 69bb ldr r3, [r7, #24]
8001bc2: 689a ldr r2, [r3, #8]
8001bc4: 69bb ldr r3, [r7, #24]
8001bc6: 621a str r2, [r3, #32]
/*Call registered Link callback*/
heth->rxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd,
(uint8_t *)dmarxdesc->BackupAddr0, bufflength);
#else
/* Link callback */
HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd,
8001bc8: 687b ldr r3, [r7, #4]
8001bca: f103 007c add.w r0, r3, #124 ; 0x7c
8001bce: 687b ldr r3, [r7, #4]
8001bd0: f103 0180 add.w r1, r3, #128 ; 0x80
(uint8_t *)dmarxdesc->BackupAddr0, (uint16_t) bufflength);
8001bd4: 69bb ldr r3, [r7, #24]
8001bd6: 6a1b ldr r3, [r3, #32]
HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd,
8001bd8: 461a mov r2, r3
8001bda: 693b ldr r3, [r7, #16]
8001bdc: b29b uxth r3, r3
8001bde: f002 f8a5 bl 8003d2c <HAL_ETH_RxLinkCallback>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
heth->RxDescList.RxDescCnt++;
8001be2: 687b ldr r3, [r7, #4]
8001be4: 6e1b ldr r3, [r3, #96] ; 0x60
8001be6: 1c5a adds r2, r3, #1
8001be8: 687b ldr r3, [r7, #4]
8001bea: 661a str r2, [r3, #96] ; 0x60
heth->RxDescList.RxDataLength += bufflength;
8001bec: 687b ldr r3, [r7, #4]
8001bee: 6e5a ldr r2, [r3, #100] ; 0x64
8001bf0: 693b ldr r3, [r7, #16]
8001bf2: 441a add r2, r3
8001bf4: 687b ldr r3, [r7, #4]
8001bf6: 665a str r2, [r3, #100] ; 0x64
/* Clear buffer pointer */
dmarxdesc->BackupAddr0 = 0;
8001bf8: 69bb ldr r3, [r7, #24]
8001bfa: 2200 movs r2, #0
8001bfc: 621a str r2, [r3, #32]
}
/* Increment current rx descriptor index */
INCR_RX_DESC_INDEX(descidx, 1U);
8001bfe: 69fb ldr r3, [r7, #28]
8001c00: 3301 adds r3, #1
8001c02: 61fb str r3, [r7, #28]
8001c04: 69fb ldr r3, [r7, #28]
8001c06: 2b03 cmp r3, #3
8001c08: d902 bls.n 8001c10 <HAL_ETH_ReadData+0x11c>
8001c0a: 69fb ldr r3, [r7, #28]
8001c0c: 3b04 subs r3, #4
8001c0e: 61fb str r3, [r7, #28]
/* Get current descriptor address */
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
8001c10: 687b ldr r3, [r7, #4]
8001c12: 69fa ldr r2, [r7, #28]
8001c14: 3212 adds r2, #18
8001c16: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001c1a: 61bb str r3, [r7, #24]
desccnt++;
8001c1c: 697b ldr r3, [r7, #20]
8001c1e: 3301 adds r3, #1
8001c20: 617b str r3, [r7, #20]
while ((READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_OWN) == (uint32_t)RESET) && (desccnt < desccntmax)
8001c22: 69bb ldr r3, [r7, #24]
8001c24: 681b ldr r3, [r3, #0]
8001c26: 2b00 cmp r3, #0
8001c28: db06 blt.n 8001c38 <HAL_ETH_ReadData+0x144>
8001c2a: 697a ldr r2, [r7, #20]
8001c2c: 68bb ldr r3, [r7, #8]
8001c2e: 429a cmp r2, r3
8001c30: d202 bcs.n 8001c38 <HAL_ETH_ReadData+0x144>
&& (rxdataready == 0U))
8001c32: 7bfb ldrb r3, [r7, #15]
8001c34: 2b00 cmp r3, #0
8001c36: d089 beq.n 8001b4c <HAL_ETH_ReadData+0x58>
}
heth->RxDescList.RxBuildDescCnt += desccnt;
8001c38: 687b ldr r3, [r7, #4]
8001c3a: 6eda ldr r2, [r3, #108] ; 0x6c
8001c3c: 697b ldr r3, [r7, #20]
8001c3e: 441a add r2, r3
8001c40: 687b ldr r3, [r7, #4]
8001c42: 66da str r2, [r3, #108] ; 0x6c
if ((heth->RxDescList.RxBuildDescCnt) != 0U)
8001c44: 687b ldr r3, [r7, #4]
8001c46: 6edb ldr r3, [r3, #108] ; 0x6c
8001c48: 2b00 cmp r3, #0
8001c4a: d002 beq.n 8001c52 <HAL_ETH_ReadData+0x15e>
{
/* Update Descriptors */
ETH_UpdateDescriptor(heth);
8001c4c: 6878 ldr r0, [r7, #4]
8001c4e: f000 f815 bl 8001c7c <ETH_UpdateDescriptor>
}
heth->RxDescList.RxDescIdx = descidx;
8001c52: 687b ldr r3, [r7, #4]
8001c54: 69fa ldr r2, [r7, #28]
8001c56: 65da str r2, [r3, #92] ; 0x5c
if (rxdataready == 1U)
8001c58: 7bfb ldrb r3, [r7, #15]
8001c5a: 2b01 cmp r3, #1
8001c5c: d108 bne.n 8001c70 <HAL_ETH_ReadData+0x17c>
{
/* Return received packet */
*pAppBuff = heth->RxDescList.pRxStart;
8001c5e: 687b ldr r3, [r7, #4]
8001c60: 6fda ldr r2, [r3, #124] ; 0x7c
8001c62: 683b ldr r3, [r7, #0]
8001c64: 601a str r2, [r3, #0]
/* Reset first element */
heth->RxDescList.pRxStart = NULL;
8001c66: 687b ldr r3, [r7, #4]
8001c68: 2200 movs r2, #0
8001c6a: 67da str r2, [r3, #124] ; 0x7c
return HAL_OK;
8001c6c: 2300 movs r3, #0
8001c6e: e000 b.n 8001c72 <HAL_ETH_ReadData+0x17e>
}
/* Packet not ready */
return HAL_ERROR;
8001c70: 2301 movs r3, #1
}
8001c72: 4618 mov r0, r3
8001c74: 3720 adds r7, #32
8001c76: 46bd mov sp, r7
8001c78: bd80 pop {r7, pc}
...
08001c7c <ETH_UpdateDescriptor>:
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
static void ETH_UpdateDescriptor(ETH_HandleTypeDef *heth)
{
8001c7c: b580 push {r7, lr}
8001c7e: b088 sub sp, #32
8001c80: af00 add r7, sp, #0
8001c82: 6078 str r0, [r7, #4]
uint32_t descidx;
uint32_t desccount;
ETH_DMADescTypeDef *dmarxdesc;
uint8_t *buff = NULL;
8001c84: 2300 movs r3, #0
8001c86: 60fb str r3, [r7, #12]
uint8_t allocStatus = 1U;
8001c88: 2301 movs r3, #1
8001c8a: 74fb strb r3, [r7, #19]
descidx = heth->RxDescList.RxBuildDescIdx;
8001c8c: 687b ldr r3, [r7, #4]
8001c8e: 6e9b ldr r3, [r3, #104] ; 0x68
8001c90: 61fb str r3, [r7, #28]
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
8001c92: 687b ldr r3, [r7, #4]
8001c94: 69fa ldr r2, [r7, #28]
8001c96: 3212 adds r2, #18
8001c98: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001c9c: 617b str r3, [r7, #20]
desccount = heth->RxDescList.RxBuildDescCnt;
8001c9e: 687b ldr r3, [r7, #4]
8001ca0: 6edb ldr r3, [r3, #108] ; 0x6c
8001ca2: 61bb str r3, [r7, #24]
while ((desccount > 0U) && (allocStatus != 0U))
8001ca4: e040 b.n 8001d28 <ETH_UpdateDescriptor+0xac>
{
/* Check if a buffer's attached the descriptor */
if (READ_REG(dmarxdesc->BackupAddr0) == 0U)
8001ca6: 697b ldr r3, [r7, #20]
8001ca8: 6a1b ldr r3, [r3, #32]
8001caa: 2b00 cmp r3, #0
8001cac: d112 bne.n 8001cd4 <ETH_UpdateDescriptor+0x58>
#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
/*Call registered Allocate callback*/
heth->rxAllocateCallback(&buff);
#else
/* Allocate callback */
HAL_ETH_RxAllocateCallback(&buff);
8001cae: f107 030c add.w r3, r7, #12
8001cb2: 4618 mov r0, r3
8001cb4: f002 f80a bl 8003ccc <HAL_ETH_RxAllocateCallback>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
if (buff == NULL)
8001cb8: 68fb ldr r3, [r7, #12]
8001cba: 2b00 cmp r3, #0
8001cbc: d102 bne.n 8001cc4 <ETH_UpdateDescriptor+0x48>
{
allocStatus = 0U;
8001cbe: 2300 movs r3, #0
8001cc0: 74fb strb r3, [r7, #19]
8001cc2: e007 b.n 8001cd4 <ETH_UpdateDescriptor+0x58>
}
else
{
WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff);
8001cc4: 68fb ldr r3, [r7, #12]
8001cc6: 461a mov r2, r3
8001cc8: 697b ldr r3, [r7, #20]
8001cca: 621a str r2, [r3, #32]
WRITE_REG(dmarxdesc->DESC2, (uint32_t)buff);
8001ccc: 68fb ldr r3, [r7, #12]
8001cce: 461a mov r2, r3
8001cd0: 697b ldr r3, [r7, #20]
8001cd2: 609a str r2, [r3, #8]
}
}
if (allocStatus != 0U)
8001cd4: 7cfb ldrb r3, [r7, #19]
8001cd6: 2b00 cmp r3, #0
8001cd8: d026 beq.n 8001d28 <ETH_UpdateDescriptor+0xac>
{
if (heth->RxDescList.ItMode == 0U)
8001cda: 687b ldr r3, [r7, #4]
8001cdc: 6d9b ldr r3, [r3, #88] ; 0x58
8001cde: 2b00 cmp r3, #0
8001ce0: d103 bne.n 8001cea <ETH_UpdateDescriptor+0x6e>
{
WRITE_REG(dmarxdesc->DESC1, ETH_DMARXDESC_DIC | ETH_RX_BUF_SIZE | ETH_DMARXDESC_RCH);
8001ce2: 697b ldr r3, [r7, #20]
8001ce4: 4a1e ldr r2, [pc, #120] ; (8001d60 <ETH_UpdateDescriptor+0xe4>)
8001ce6: 605a str r2, [r3, #4]
8001ce8: e003 b.n 8001cf2 <ETH_UpdateDescriptor+0x76>
}
else
{
WRITE_REG(dmarxdesc->DESC1, ETH_RX_BUF_SIZE | ETH_DMARXDESC_RCH);
8001cea: 697b ldr r3, [r7, #20]
8001cec: f244 52f8 movw r2, #17912 ; 0x45f8
8001cf0: 605a str r2, [r3, #4]
\details Ensures the apparent order of the explicit memory operations before
and after the instruction, without ensuring their completion.
*/
__STATIC_FORCEINLINE void __DMB(void)
{
__ASM volatile ("dmb 0xF":::"memory");
8001cf2: f3bf 8f5f dmb sy
}
8001cf6: bf00 nop
is fully performed.
The __DMB() instruction is added to avoid any potential compiler optimization that
may lead to abnormal behavior. */
__DMB();
SET_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_OWN);
8001cf8: 697b ldr r3, [r7, #20]
8001cfa: 681b ldr r3, [r3, #0]
8001cfc: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
8001d00: 697b ldr r3, [r7, #20]
8001d02: 601a str r2, [r3, #0]
/* Increment current rx descriptor index */
INCR_RX_DESC_INDEX(descidx, 1U);
8001d04: 69fb ldr r3, [r7, #28]
8001d06: 3301 adds r3, #1
8001d08: 61fb str r3, [r7, #28]
8001d0a: 69fb ldr r3, [r7, #28]
8001d0c: 2b03 cmp r3, #3
8001d0e: d902 bls.n 8001d16 <ETH_UpdateDescriptor+0x9a>
8001d10: 69fb ldr r3, [r7, #28]
8001d12: 3b04 subs r3, #4
8001d14: 61fb str r3, [r7, #28]
/* Get current descriptor address */
dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
8001d16: 687b ldr r3, [r7, #4]
8001d18: 69fa ldr r2, [r7, #28]
8001d1a: 3212 adds r2, #18
8001d1c: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8001d20: 617b str r3, [r7, #20]
desccount--;
8001d22: 69bb ldr r3, [r7, #24]
8001d24: 3b01 subs r3, #1
8001d26: 61bb str r3, [r7, #24]
while ((desccount > 0U) && (allocStatus != 0U))
8001d28: 69bb ldr r3, [r7, #24]
8001d2a: 2b00 cmp r3, #0
8001d2c: d002 beq.n 8001d34 <ETH_UpdateDescriptor+0xb8>
8001d2e: 7cfb ldrb r3, [r7, #19]
8001d30: 2b00 cmp r3, #0
8001d32: d1b8 bne.n 8001ca6 <ETH_UpdateDescriptor+0x2a>
}
}
if (heth->RxDescList.RxBuildDescCnt != desccount)
8001d34: 687b ldr r3, [r7, #4]
8001d36: 6edb ldr r3, [r3, #108] ; 0x6c
8001d38: 69ba ldr r2, [r7, #24]
8001d3a: 429a cmp r2, r3
8001d3c: d00c beq.n 8001d58 <ETH_UpdateDescriptor+0xdc>
{
/* Set the Tail pointer address */
WRITE_REG(heth->Instance->DMARPDR, 0);
8001d3e: 687b ldr r3, [r7, #4]
8001d40: 681b ldr r3, [r3, #0]
8001d42: f503 5380 add.w r3, r3, #4096 ; 0x1000
8001d46: 461a mov r2, r3
8001d48: 2300 movs r3, #0
8001d4a: 6093 str r3, [r2, #8]
heth->RxDescList.RxBuildDescIdx = descidx;
8001d4c: 687b ldr r3, [r7, #4]
8001d4e: 69fa ldr r2, [r7, #28]
8001d50: 669a str r2, [r3, #104] ; 0x68
heth->RxDescList.RxBuildDescCnt = desccount;
8001d52: 687b ldr r3, [r7, #4]
8001d54: 69ba ldr r2, [r7, #24]
8001d56: 66da str r2, [r3, #108] ; 0x6c
}
}
8001d58: bf00 nop
8001d5a: 3720 adds r7, #32
8001d5c: 46bd mov sp, r7
8001d5e: bd80 pop {r7, pc}
8001d60: 800045f8 .word 0x800045f8
08001d64 <HAL_ETH_ReadPHYRegister>:
* @param pRegValue: parameter to hold read value
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,
uint32_t *pRegValue)
{
8001d64: b580 push {r7, lr}
8001d66: b086 sub sp, #24
8001d68: af00 add r7, sp, #0
8001d6a: 60f8 str r0, [r7, #12]
8001d6c: 60b9 str r1, [r7, #8]
8001d6e: 607a str r2, [r7, #4]
8001d70: 603b str r3, [r7, #0]
uint32_t tmpreg1;
uint32_t tickstart;
/* Get the ETHERNET MACMIIAR value */
tmpreg1 = heth->Instance->MACMIIAR;
8001d72: 68fb ldr r3, [r7, #12]
8001d74: 681b ldr r3, [r3, #0]
8001d76: 691b ldr r3, [r3, #16]
8001d78: 617b str r3, [r7, #20]
/* Keep only the CSR Clock Range CR[2:0] bits value */
tmpreg1 &= ~ETH_MACMIIAR_CR_MASK;
8001d7a: 697b ldr r3, [r7, #20]
8001d7c: f003 031c and.w r3, r3, #28
8001d80: 617b str r3, [r7, #20]
/* Prepare the MII address register value */
tmpreg1 |= ((PHYAddr << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */
8001d82: 68bb ldr r3, [r7, #8]
8001d84: 02db lsls r3, r3, #11
8001d86: b29b uxth r3, r3
8001d88: 697a ldr r2, [r7, #20]
8001d8a: 4313 orrs r3, r2
8001d8c: 617b str r3, [r7, #20]
tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */
8001d8e: 687b ldr r3, [r7, #4]
8001d90: 019b lsls r3, r3, #6
8001d92: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
8001d96: 697a ldr r2, [r7, #20]
8001d98: 4313 orrs r3, r2
8001d9a: 617b str r3, [r7, #20]
tmpreg1 &= ~ETH_MACMIIAR_MW; /* Set the read mode */
8001d9c: 697b ldr r3, [r7, #20]
8001d9e: f023 0302 bic.w r3, r3, #2
8001da2: 617b str r3, [r7, #20]
tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
8001da4: 697b ldr r3, [r7, #20]
8001da6: f043 0301 orr.w r3, r3, #1
8001daa: 617b str r3, [r7, #20]
/* Write the result value into the MII Address register */
heth->Instance->MACMIIAR = tmpreg1;
8001dac: 68fb ldr r3, [r7, #12]
8001dae: 681b ldr r3, [r3, #0]
8001db0: 697a ldr r2, [r7, #20]
8001db2: 611a str r2, [r3, #16]
tickstart = HAL_GetTick();
8001db4: f7ff fbbe bl 8001534 <HAL_GetTick>
8001db8: 6138 str r0, [r7, #16]
/* Check for the Busy flag */
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8001dba: e00d b.n 8001dd8 <HAL_ETH_ReadPHYRegister+0x74>
{
/* Check for the Timeout */
if ((HAL_GetTick() - tickstart) > PHY_READ_TO)
8001dbc: f7ff fbba bl 8001534 <HAL_GetTick>
8001dc0: 4602 mov r2, r0
8001dc2: 693b ldr r3, [r7, #16]
8001dc4: 1ad3 subs r3, r2, r3
8001dc6: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8001dca: d301 bcc.n 8001dd0 <HAL_ETH_ReadPHYRegister+0x6c>
{
return HAL_ERROR;
8001dcc: 2301 movs r3, #1
8001dce: e010 b.n 8001df2 <HAL_ETH_ReadPHYRegister+0x8e>
}
tmpreg1 = heth->Instance->MACMIIAR;
8001dd0: 68fb ldr r3, [r7, #12]
8001dd2: 681b ldr r3, [r3, #0]
8001dd4: 691b ldr r3, [r3, #16]
8001dd6: 617b str r3, [r7, #20]
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8001dd8: 697b ldr r3, [r7, #20]
8001dda: f003 0301 and.w r3, r3, #1
8001dde: 2b00 cmp r3, #0
8001de0: d1ec bne.n 8001dbc <HAL_ETH_ReadPHYRegister+0x58>
}
/* Get MACMIIDR value */
*pRegValue = (uint16_t)(heth->Instance->MACMIIDR);
8001de2: 68fb ldr r3, [r7, #12]
8001de4: 681b ldr r3, [r3, #0]
8001de6: 695b ldr r3, [r3, #20]
8001de8: b29b uxth r3, r3
8001dea: 461a mov r2, r3
8001dec: 683b ldr r3, [r7, #0]
8001dee: 601a str r2, [r3, #0]
return HAL_OK;
8001df0: 2300 movs r3, #0
}
8001df2: 4618 mov r0, r3
8001df4: 3718 adds r7, #24
8001df6: 46bd mov sp, r7
8001df8: bd80 pop {r7, pc}
08001dfa <HAL_ETH_WritePHYRegister>:
* @param RegValue: the value to write
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,
uint32_t RegValue)
{
8001dfa: b580 push {r7, lr}
8001dfc: b086 sub sp, #24
8001dfe: af00 add r7, sp, #0
8001e00: 60f8 str r0, [r7, #12]
8001e02: 60b9 str r1, [r7, #8]
8001e04: 607a str r2, [r7, #4]
8001e06: 603b str r3, [r7, #0]
uint32_t tmpreg1;
uint32_t tickstart;
/* Get the ETHERNET MACMIIAR value */
tmpreg1 = heth->Instance->MACMIIAR;
8001e08: 68fb ldr r3, [r7, #12]
8001e0a: 681b ldr r3, [r3, #0]
8001e0c: 691b ldr r3, [r3, #16]
8001e0e: 617b str r3, [r7, #20]
/* Keep only the CSR Clock Range CR[2:0] bits value */
tmpreg1 &= ~ETH_MACMIIAR_CR_MASK;
8001e10: 697b ldr r3, [r7, #20]
8001e12: f003 031c and.w r3, r3, #28
8001e16: 617b str r3, [r7, #20]
/* Prepare the MII register address value */
tmpreg1 |= ((PHYAddr << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */
8001e18: 68bb ldr r3, [r7, #8]
8001e1a: 02db lsls r3, r3, #11
8001e1c: b29b uxth r3, r3
8001e1e: 697a ldr r2, [r7, #20]
8001e20: 4313 orrs r3, r2
8001e22: 617b str r3, [r7, #20]
tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */
8001e24: 687b ldr r3, [r7, #4]
8001e26: 019b lsls r3, r3, #6
8001e28: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
8001e2c: 697a ldr r2, [r7, #20]
8001e2e: 4313 orrs r3, r2
8001e30: 617b str r3, [r7, #20]
tmpreg1 |= ETH_MACMIIAR_MW; /* Set the write mode */
8001e32: 697b ldr r3, [r7, #20]
8001e34: f043 0302 orr.w r3, r3, #2
8001e38: 617b str r3, [r7, #20]
tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
8001e3a: 697b ldr r3, [r7, #20]
8001e3c: f043 0301 orr.w r3, r3, #1
8001e40: 617b str r3, [r7, #20]
/* Give the value to the MII data register */
heth->Instance->MACMIIDR = (uint16_t)RegValue;
8001e42: 683b ldr r3, [r7, #0]
8001e44: b29a uxth r2, r3
8001e46: 68fb ldr r3, [r7, #12]
8001e48: 681b ldr r3, [r3, #0]
8001e4a: 615a str r2, [r3, #20]
/* Write the result value into the MII Address register */
heth->Instance->MACMIIAR = tmpreg1;
8001e4c: 68fb ldr r3, [r7, #12]
8001e4e: 681b ldr r3, [r3, #0]
8001e50: 697a ldr r2, [r7, #20]
8001e52: 611a str r2, [r3, #16]
/* Get tick */
tickstart = HAL_GetTick();
8001e54: f7ff fb6e bl 8001534 <HAL_GetTick>
8001e58: 6138 str r0, [r7, #16]
/* Check for the Busy flag */
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8001e5a: e00d b.n 8001e78 <HAL_ETH_WritePHYRegister+0x7e>
{
/* Check for the Timeout */
if ((HAL_GetTick() - tickstart) > PHY_WRITE_TO)
8001e5c: f7ff fb6a bl 8001534 <HAL_GetTick>
8001e60: 4602 mov r2, r0
8001e62: 693b ldr r3, [r7, #16]
8001e64: 1ad3 subs r3, r2, r3
8001e66: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8001e6a: d301 bcc.n 8001e70 <HAL_ETH_WritePHYRegister+0x76>
{
return HAL_ERROR;
8001e6c: 2301 movs r3, #1
8001e6e: e009 b.n 8001e84 <HAL_ETH_WritePHYRegister+0x8a>
}
tmpreg1 = heth->Instance->MACMIIAR;
8001e70: 68fb ldr r3, [r7, #12]
8001e72: 681b ldr r3, [r3, #0]
8001e74: 691b ldr r3, [r3, #16]
8001e76: 617b str r3, [r7, #20]
while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8001e78: 697b ldr r3, [r7, #20]
8001e7a: f003 0301 and.w r3, r3, #1
8001e7e: 2b00 cmp r3, #0
8001e80: d1ec bne.n 8001e5c <HAL_ETH_WritePHYRegister+0x62>
}
return HAL_OK;
8001e82: 2300 movs r3, #0
}
8001e84: 4618 mov r0, r3
8001e86: 3718 adds r7, #24
8001e88: 46bd mov sp, r7
8001e8a: bd80 pop {r7, pc}
08001e8c <HAL_ETH_GetMACConfig>:
* @param macconf: pointer to a ETH_MACConfigTypeDef structure that will hold
* the configuration of the MAC.
* @retval HAL Status
*/
HAL_StatusTypeDef HAL_ETH_GetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf)
{
8001e8c: b480 push {r7}
8001e8e: b083 sub sp, #12
8001e90: af00 add r7, sp, #0
8001e92: 6078 str r0, [r7, #4]
8001e94: 6039 str r1, [r7, #0]
if (macconf == NULL)
8001e96: 683b ldr r3, [r7, #0]
8001e98: 2b00 cmp r3, #0
8001e9a: d101 bne.n 8001ea0 <HAL_ETH_GetMACConfig+0x14>
{
return HAL_ERROR;
8001e9c: 2301 movs r3, #1
8001e9e: e0d9 b.n 8002054 <HAL_ETH_GetMACConfig+0x1c8>
}
/* Get MAC parameters */
macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE;
8001ea0: 687b ldr r3, [r7, #4]
8001ea2: 681b ldr r3, [r3, #0]
8001ea4: 681b ldr r3, [r3, #0]
8001ea6: f003 0310 and.w r3, r3, #16
8001eaa: 2b00 cmp r3, #0
8001eac: bf14 ite ne
8001eae: 2301 movne r3, #1
8001eb0: 2300 moveq r3, #0
8001eb2: b2db uxtb r3, r3
8001eb4: 461a mov r2, r3
8001eb6: 683b ldr r3, [r7, #0]
8001eb8: f883 2028 strb.w r2, [r3, #40] ; 0x28
macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL);
8001ebc: 687b ldr r3, [r7, #4]
8001ebe: 681b ldr r3, [r3, #0]
8001ec0: 681b ldr r3, [r3, #0]
8001ec2: f003 0260 and.w r2, r3, #96 ; 0x60
8001ec6: 683b ldr r3, [r7, #0]
8001ec8: 625a str r2, [r3, #36] ; 0x24
macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_RD) >> 9) == 0U) ? ENABLE : DISABLE;
8001eca: 687b ldr r3, [r7, #4]
8001ecc: 681b ldr r3, [r3, #0]
8001ece: 681b ldr r3, [r3, #0]
8001ed0: f403 7300 and.w r3, r3, #512 ; 0x200
8001ed4: 2b00 cmp r3, #0
8001ed6: bf0c ite eq
8001ed8: 2301 moveq r3, #1
8001eda: 2300 movne r3, #0
8001edc: b2db uxtb r3, r3
8001ede: 461a mov r2, r3
8001ee0: 683b ldr r3, [r7, #0]
8001ee2: f883 2020 strb.w r2, [r3, #32]
macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CSD) >> 16) > 0U)
8001ee6: 687b ldr r3, [r7, #4]
8001ee8: 681b ldr r3, [r3, #0]
8001eea: 681b ldr r3, [r3, #0]
8001eec: f403 3380 and.w r3, r3, #65536 ; 0x10000
? ENABLE : DISABLE;
8001ef0: 2b00 cmp r3, #0
8001ef2: bf14 ite ne
8001ef4: 2301 movne r3, #1
8001ef6: 2300 moveq r3, #0
8001ef8: b2db uxtb r3, r3
8001efa: 461a mov r2, r3
macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CSD) >> 16) > 0U)
8001efc: 683b ldr r3, [r7, #0]
8001efe: 77da strb r2, [r3, #31]
macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ROD) >> 13) == 0U) ? ENABLE : DISABLE;
8001f00: 687b ldr r3, [r7, #4]
8001f02: 681b ldr r3, [r3, #0]
8001f04: 681b ldr r3, [r3, #0]
8001f06: f403 5300 and.w r3, r3, #8192 ; 0x2000
8001f0a: 2b00 cmp r3, #0
8001f0c: bf0c ite eq
8001f0e: 2301 moveq r3, #1
8001f10: 2300 movne r3, #0
8001f12: b2db uxtb r3, r3
8001f14: 461a mov r2, r3
8001f16: 683b ldr r3, [r7, #0]
8001f18: 779a strb r2, [r3, #30]
macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE;
8001f1a: 687b ldr r3, [r7, #4]
8001f1c: 681b ldr r3, [r3, #0]
8001f1e: 681b ldr r3, [r3, #0]
8001f20: f403 5380 and.w r3, r3, #4096 ; 0x1000
8001f24: 2b00 cmp r3, #0
8001f26: bf14 ite ne
8001f28: 2301 movne r3, #1
8001f2a: 2300 moveq r3, #0
8001f2c: b2db uxtb r3, r3
8001f2e: 461a mov r2, r3
8001f30: 683b ldr r3, [r7, #0]
8001f32: 771a strb r2, [r3, #28]
macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM);
8001f34: 687b ldr r3, [r7, #4]
8001f36: 681b ldr r3, [r3, #0]
8001f38: 681b ldr r3, [r3, #0]
8001f3a: f403 6200 and.w r2, r3, #2048 ; 0x800
8001f3e: 683b ldr r3, [r7, #0]
8001f40: 619a str r2, [r3, #24]
macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES);
8001f42: 687b ldr r3, [r7, #4]
8001f44: 681b ldr r3, [r3, #0]
8001f46: 681b ldr r3, [r3, #0]
8001f48: f403 4280 and.w r2, r3, #16384 ; 0x4000
8001f4c: 683b ldr r3, [r7, #0]
8001f4e: 615a str r2, [r3, #20]
macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 22) == 0U) ? ENABLE : DISABLE;
8001f50: 687b ldr r3, [r7, #4]
8001f52: 681b ldr r3, [r3, #0]
8001f54: 681b ldr r3, [r3, #0]
8001f56: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8001f5a: 2b00 cmp r3, #0
8001f5c: bf0c ite eq
8001f5e: 2301 moveq r3, #1
8001f60: 2300 movne r3, #0
8001f62: b2db uxtb r3, r3
8001f64: 461a mov r2, r3
8001f66: 683b ldr r3, [r7, #0]
8001f68: 745a strb r2, [r3, #17]
macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 23) == 0U) ? ENABLE : DISABLE;
8001f6a: 687b ldr r3, [r7, #4]
8001f6c: 681b ldr r3, [r3, #0]
8001f6e: 681b ldr r3, [r3, #0]
8001f70: f403 0300 and.w r3, r3, #8388608 ; 0x800000
8001f74: 2b00 cmp r3, #0
8001f76: bf0c ite eq
8001f78: 2301 moveq r3, #1
8001f7a: 2300 movne r3, #0
8001f7c: b2db uxtb r3, r3
8001f7e: 461a mov r2, r3
8001f80: 683b ldr r3, [r7, #0]
8001f82: 741a strb r2, [r3, #16]
macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_APCS) >> 7) > 0U) ? ENABLE : DISABLE;
8001f84: 687b ldr r3, [r7, #4]
8001f86: 681b ldr r3, [r3, #0]
8001f88: 681b ldr r3, [r3, #0]
8001f8a: f003 0380 and.w r3, r3, #128 ; 0x80
8001f8e: 2b00 cmp r3, #0
8001f90: bf14 ite ne
8001f92: 2301 movne r3, #1
8001f94: 2300 moveq r3, #0
8001f96: b2db uxtb r3, r3
8001f98: 461a mov r2, r3
8001f9a: 683b ldr r3, [r7, #0]
8001f9c: 73da strb r2, [r3, #15]
macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IFG);
8001f9e: 687b ldr r3, [r7, #4]
8001fa0: 681b ldr r3, [r3, #0]
8001fa2: 681b ldr r3, [r3, #0]
8001fa4: f403 2260 and.w r2, r3, #917504 ; 0xe0000
8001fa8: 683b ldr r3, [r7, #0]
8001faa: 609a str r2, [r3, #8]
macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPCO) >> 10U) > 0U) ? ENABLE : DISABLE;
8001fac: 687b ldr r3, [r7, #4]
8001fae: 681b ldr r3, [r3, #0]
8001fb0: 681b ldr r3, [r3, #0]
8001fb2: f403 6380 and.w r3, r3, #1024 ; 0x400
8001fb6: 2b00 cmp r3, #0
8001fb8: bf14 ite ne
8001fba: 2301 movne r3, #1
8001fbc: 2300 moveq r3, #0
8001fbe: b2db uxtb r3, r3
8001fc0: 461a mov r2, r3
8001fc2: 683b ldr r3, [r7, #0]
8001fc4: 711a strb r2, [r3, #4]
macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_TFCE) >> 1) > 0U) ? ENABLE : DISABLE;
8001fc6: 687b ldr r3, [r7, #4]
8001fc8: 681b ldr r3, [r3, #0]
8001fca: 699b ldr r3, [r3, #24]
8001fcc: f003 0302 and.w r3, r3, #2
8001fd0: 2b00 cmp r3, #0
8001fd2: bf14 ite ne
8001fd4: 2301 movne r3, #1
8001fd6: 2300 moveq r3, #0
8001fd8: b2db uxtb r3, r3
8001fda: 461a mov r2, r3
8001fdc: 683b ldr r3, [r7, #0]
8001fde: f883 2054 strb.w r2, [r3, #84] ; 0x54
macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_ZQPD) >> 7) == 0U) ? ENABLE : DISABLE;
8001fe2: 687b ldr r3, [r7, #4]
8001fe4: 681b ldr r3, [r3, #0]
8001fe6: 699b ldr r3, [r3, #24]
8001fe8: f003 0380 and.w r3, r3, #128 ; 0x80
8001fec: 2b00 cmp r3, #0
8001fee: bf0c ite eq
8001ff0: 2301 moveq r3, #1
8001ff2: 2300 movne r3, #0
8001ff4: b2db uxtb r3, r3
8001ff6: 461a mov r2, r3
8001ff8: 683b ldr r3, [r7, #0]
8001ffa: f883 204c strb.w r2, [r3, #76] ; 0x4c
macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_PLT);
8001ffe: 687b ldr r3, [r7, #4]
8002000: 681b ldr r3, [r3, #0]
8002002: 699b ldr r3, [r3, #24]
8002004: f003 0230 and.w r2, r3, #48 ; 0x30
8002008: 683b ldr r3, [r7, #0]
800200a: 651a str r2, [r3, #80] ; 0x50
macconf->PauseTime = (READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_PT) >> 16);
800200c: 687b ldr r3, [r7, #4]
800200e: 681b ldr r3, [r3, #0]
8002010: 699b ldr r3, [r3, #24]
8002012: 0c1b lsrs r3, r3, #16
8002014: b29a uxth r2, r3
8002016: 683b ldr r3, [r7, #0]
8002018: 649a str r2, [r3, #72] ; 0x48
macconf->ReceiveFlowControl = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_RFCE) >> 2U) > 0U) ? ENABLE : DISABLE;
800201a: 687b ldr r3, [r7, #4]
800201c: 681b ldr r3, [r3, #0]
800201e: 699b ldr r3, [r3, #24]
8002020: f003 0304 and.w r3, r3, #4
8002024: 2b00 cmp r3, #0
8002026: bf14 ite ne
8002028: 2301 movne r3, #1
800202a: 2300 moveq r3, #0
800202c: b2db uxtb r3, r3
800202e: 461a mov r2, r3
8002030: 683b ldr r3, [r7, #0]
8002032: f883 2056 strb.w r2, [r3, #86] ; 0x56
macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_UPFD) >> 3U) > 0U)
8002036: 687b ldr r3, [r7, #4]
8002038: 681b ldr r3, [r3, #0]
800203a: 699b ldr r3, [r3, #24]
800203c: f003 0308 and.w r3, r3, #8
? ENABLE : DISABLE;
8002040: 2b00 cmp r3, #0
8002042: bf14 ite ne
8002044: 2301 movne r3, #1
8002046: 2300 moveq r3, #0
8002048: b2db uxtb r3, r3
800204a: 461a mov r2, r3
macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACFCR, ETH_MACFCR_UPFD) >> 3U) > 0U)
800204c: 683b ldr r3, [r7, #0]
800204e: f883 2055 strb.w r2, [r3, #85] ; 0x55
return HAL_OK;
8002052: 2300 movs r3, #0
}
8002054: 4618 mov r0, r3
8002056: 370c adds r7, #12
8002058: 46bd mov sp, r7
800205a: f85d 7b04 ldr.w r7, [sp], #4
800205e: 4770 bx lr
08002060 <HAL_ETH_SetMACConfig>:
* @param macconf: pointer to a ETH_MACConfigTypeDef structure that contains
* the configuration of the MAC.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf)
{
8002060: b580 push {r7, lr}
8002062: b082 sub sp, #8
8002064: af00 add r7, sp, #0
8002066: 6078 str r0, [r7, #4]
8002068: 6039 str r1, [r7, #0]
if (macconf == NULL)
800206a: 683b ldr r3, [r7, #0]
800206c: 2b00 cmp r3, #0
800206e: d101 bne.n 8002074 <HAL_ETH_SetMACConfig+0x14>
{
return HAL_ERROR;
8002070: 2301 movs r3, #1
8002072: e00b b.n 800208c <HAL_ETH_SetMACConfig+0x2c>
}
if (heth->gState == HAL_ETH_STATE_READY)
8002074: 687b ldr r3, [r7, #4]
8002076: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
800207a: 2b10 cmp r3, #16
800207c: d105 bne.n 800208a <HAL_ETH_SetMACConfig+0x2a>
{
ETH_SetMACConfig(heth, macconf);
800207e: 6839 ldr r1, [r7, #0]
8002080: 6878 ldr r0, [r7, #4]
8002082: f000 f883 bl 800218c <ETH_SetMACConfig>
return HAL_OK;
8002086: 2300 movs r3, #0
8002088: e000 b.n 800208c <HAL_ETH_SetMACConfig+0x2c>
}
else
{
return HAL_ERROR;
800208a: 2301 movs r3, #1
}
}
800208c: 4618 mov r0, r3
800208e: 3708 adds r7, #8
8002090: 46bd mov sp, r7
8002092: bd80 pop {r7, pc}
08002094 <HAL_ETH_SetMDIOClockRange>:
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
void HAL_ETH_SetMDIOClockRange(ETH_HandleTypeDef *heth)
{
8002094: b580 push {r7, lr}
8002096: b084 sub sp, #16
8002098: af00 add r7, sp, #0
800209a: 6078 str r0, [r7, #4]
uint32_t hclk;
uint32_t tmpreg;
/* Get the ETHERNET MACMIIAR value */
tmpreg = (heth->Instance)->MACMIIAR;
800209c: 687b ldr r3, [r7, #4]
800209e: 681b ldr r3, [r3, #0]
80020a0: 691b ldr r3, [r3, #16]
80020a2: 60fb str r3, [r7, #12]
/* Clear CSR Clock Range CR[2:0] bits */
tmpreg &= ETH_MACMIIAR_CR_MASK;
80020a4: 68fb ldr r3, [r7, #12]
80020a6: f023 031c bic.w r3, r3, #28
80020aa: 60fb str r3, [r7, #12]
/* Get hclk frequency value */
hclk = HAL_RCC_GetHCLKFreq();
80020ac: f001 fa38 bl 8003520 <HAL_RCC_GetHCLKFreq>
80020b0: 60b8 str r0, [r7, #8]
/* Set CR bits depending on hclk value */
if ((hclk >= 20000000U) && (hclk < 35000000U))
80020b2: 68bb ldr r3, [r7, #8]
80020b4: 4a1d ldr r2, [pc, #116] ; (800212c <HAL_ETH_SetMDIOClockRange+0x98>)
80020b6: 4293 cmp r3, r2
80020b8: d908 bls.n 80020cc <HAL_ETH_SetMDIOClockRange+0x38>
80020ba: 68bb ldr r3, [r7, #8]
80020bc: 4a1c ldr r2, [pc, #112] ; (8002130 <HAL_ETH_SetMDIOClockRange+0x9c>)
80020be: 4293 cmp r3, r2
80020c0: d804 bhi.n 80020cc <HAL_ETH_SetMDIOClockRange+0x38>
{
/* CSR Clock Range between 20-35 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div16;
80020c2: 68fb ldr r3, [r7, #12]
80020c4: f043 0308 orr.w r3, r3, #8
80020c8: 60fb str r3, [r7, #12]
80020ca: e027 b.n 800211c <HAL_ETH_SetMDIOClockRange+0x88>
}
else if ((hclk >= 35000000U) && (hclk < 60000000U))
80020cc: 68bb ldr r3, [r7, #8]
80020ce: 4a18 ldr r2, [pc, #96] ; (8002130 <HAL_ETH_SetMDIOClockRange+0x9c>)
80020d0: 4293 cmp r3, r2
80020d2: d908 bls.n 80020e6 <HAL_ETH_SetMDIOClockRange+0x52>
80020d4: 68bb ldr r3, [r7, #8]
80020d6: 4a17 ldr r2, [pc, #92] ; (8002134 <HAL_ETH_SetMDIOClockRange+0xa0>)
80020d8: 4293 cmp r3, r2
80020da: d204 bcs.n 80020e6 <HAL_ETH_SetMDIOClockRange+0x52>
{
/* CSR Clock Range between 35-60 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div26;
80020dc: 68fb ldr r3, [r7, #12]
80020de: f043 030c orr.w r3, r3, #12
80020e2: 60fb str r3, [r7, #12]
80020e4: e01a b.n 800211c <HAL_ETH_SetMDIOClockRange+0x88>
}
else if ((hclk >= 60000000U) && (hclk < 100000000U))
80020e6: 68bb ldr r3, [r7, #8]
80020e8: 4a12 ldr r2, [pc, #72] ; (8002134 <HAL_ETH_SetMDIOClockRange+0xa0>)
80020ea: 4293 cmp r3, r2
80020ec: d303 bcc.n 80020f6 <HAL_ETH_SetMDIOClockRange+0x62>
80020ee: 68bb ldr r3, [r7, #8]
80020f0: 4a11 ldr r2, [pc, #68] ; (8002138 <HAL_ETH_SetMDIOClockRange+0xa4>)
80020f2: 4293 cmp r3, r2
80020f4: d911 bls.n 800211a <HAL_ETH_SetMDIOClockRange+0x86>
{
/* CSR Clock Range between 60-100 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
}
else if ((hclk >= 100000000U) && (hclk < 150000000U))
80020f6: 68bb ldr r3, [r7, #8]
80020f8: 4a0f ldr r2, [pc, #60] ; (8002138 <HAL_ETH_SetMDIOClockRange+0xa4>)
80020fa: 4293 cmp r3, r2
80020fc: d908 bls.n 8002110 <HAL_ETH_SetMDIOClockRange+0x7c>
80020fe: 68bb ldr r3, [r7, #8]
8002100: 4a0e ldr r2, [pc, #56] ; (800213c <HAL_ETH_SetMDIOClockRange+0xa8>)
8002102: 4293 cmp r3, r2
8002104: d804 bhi.n 8002110 <HAL_ETH_SetMDIOClockRange+0x7c>
{
/* CSR Clock Range between 100-150 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62;
8002106: 68fb ldr r3, [r7, #12]
8002108: f043 0304 orr.w r3, r3, #4
800210c: 60fb str r3, [r7, #12]
800210e: e005 b.n 800211c <HAL_ETH_SetMDIOClockRange+0x88>
}
else /* ((hclk >= 150000000)&&(hclk <= 183000000))*/
{
/* CSR Clock Range between 150-183 MHz */
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div102;
8002110: 68fb ldr r3, [r7, #12]
8002112: f043 0310 orr.w r3, r3, #16
8002116: 60fb str r3, [r7, #12]
8002118: e000 b.n 800211c <HAL_ETH_SetMDIOClockRange+0x88>
tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
800211a: bf00 nop
}
/* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */
(heth->Instance)->MACMIIAR = (uint32_t)tmpreg;
800211c: 687b ldr r3, [r7, #4]
800211e: 681b ldr r3, [r3, #0]
8002120: 68fa ldr r2, [r7, #12]
8002122: 611a str r2, [r3, #16]
}
8002124: bf00 nop
8002126: 3710 adds r7, #16
8002128: 46bd mov sp, r7
800212a: bd80 pop {r7, pc}
800212c: 01312cff .word 0x01312cff
8002130: 02160ebf .word 0x02160ebf
8002134: 03938700 .word 0x03938700
8002138: 05f5e0ff .word 0x05f5e0ff
800213c: 08f0d17f .word 0x08f0d17f
08002140 <ETH_FlushTransmitFIFO>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth)
{
8002140: b580 push {r7, lr}
8002142: b084 sub sp, #16
8002144: af00 add r7, sp, #0
8002146: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
8002148: 2300 movs r3, #0
800214a: 60fb str r3, [r7, #12]
/* Set the Flush Transmit FIFO bit */
(heth->Instance)->DMAOMR |= ETH_DMAOMR_FTF;
800214c: 687b ldr r3, [r7, #4]
800214e: 681b ldr r3, [r3, #0]
8002150: f503 5380 add.w r3, r3, #4096 ; 0x1000
8002154: 699b ldr r3, [r3, #24]
8002156: 687a ldr r2, [r7, #4]
8002158: 6812 ldr r2, [r2, #0]
800215a: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
800215e: f502 5280 add.w r2, r2, #4096 ; 0x1000
8002162: 6193 str r3, [r2, #24]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->DMAOMR;
8002164: 687b ldr r3, [r7, #4]
8002166: 681b ldr r3, [r3, #0]
8002168: f503 5380 add.w r3, r3, #4096 ; 0x1000
800216c: 699b ldr r3, [r3, #24]
800216e: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8002170: 2001 movs r0, #1
8002172: f7ff f9eb bl 800154c <HAL_Delay>
(heth->Instance)->DMAOMR = tmpreg;
8002176: 687b ldr r3, [r7, #4]
8002178: 681a ldr r2, [r3, #0]
800217a: 68fb ldr r3, [r7, #12]
800217c: f502 5280 add.w r2, r2, #4096 ; 0x1000
8002180: 6193 str r3, [r2, #24]
}
8002182: bf00 nop
8002184: 3710 adds r7, #16
8002186: 46bd mov sp, r7
8002188: bd80 pop {r7, pc}
...
0800218c <ETH_SetMACConfig>:
static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf)
{
800218c: b580 push {r7, lr}
800218e: b084 sub sp, #16
8002190: af00 add r7, sp, #0
8002192: 6078 str r0, [r7, #4]
8002194: 6039 str r1, [r7, #0]
uint32_t tmpreg1;
/*------------------------ ETHERNET MACCR Configuration --------------------*/
/* Get the ETHERNET MACCR value */
tmpreg1 = (heth->Instance)->MACCR;
8002196: 687b ldr r3, [r7, #4]
8002198: 681b ldr r3, [r3, #0]
800219a: 681b ldr r3, [r3, #0]
800219c: 60fb str r3, [r7, #12]
/* Clear WD, PCE, PS, TE and RE bits */
tmpreg1 &= ETH_MACCR_CLEAR_MASK;
800219e: 68fa ldr r2, [r7, #12]
80021a0: 4b51 ldr r3, [pc, #324] ; (80022e8 <ETH_SetMACConfig+0x15c>)
80021a2: 4013 ands r3, r2
80021a4: 60fb str r3, [r7, #12]
tmpreg1 |= (uint32_t)(((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 23U) |
80021a6: 683b ldr r3, [r7, #0]
80021a8: 7c1b ldrb r3, [r3, #16]
80021aa: 2b00 cmp r3, #0
80021ac: d102 bne.n 80021b4 <ETH_SetMACConfig+0x28>
80021ae: f44f 0200 mov.w r2, #8388608 ; 0x800000
80021b2: e000 b.n 80021b6 <ETH_SetMACConfig+0x2a>
80021b4: 2200 movs r2, #0
((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 22U) |
80021b6: 683b ldr r3, [r7, #0]
80021b8: 7c5b ldrb r3, [r3, #17]
80021ba: 2b00 cmp r3, #0
80021bc: d102 bne.n 80021c4 <ETH_SetMACConfig+0x38>
80021be: f44f 0380 mov.w r3, #4194304 ; 0x400000
80021c2: e000 b.n 80021c6 <ETH_SetMACConfig+0x3a>
80021c4: 2300 movs r3, #0
tmpreg1 |= (uint32_t)(((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 23U) |
80021c6: 431a orrs r2, r3
(uint32_t)macconf->InterPacketGapVal |
80021c8: 683b ldr r3, [r7, #0]
80021ca: 689b ldr r3, [r3, #8]
((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 22U) |
80021cc: 431a orrs r2, r3
((uint32_t)macconf->CarrierSenseDuringTransmit << 16U) |
80021ce: 683b ldr r3, [r7, #0]
80021d0: 7fdb ldrb r3, [r3, #31]
80021d2: 041b lsls r3, r3, #16
(uint32_t)macconf->InterPacketGapVal |
80021d4: 431a orrs r2, r3
macconf->Speed |
80021d6: 683b ldr r3, [r7, #0]
80021d8: 695b ldr r3, [r3, #20]
((uint32_t)macconf->CarrierSenseDuringTransmit << 16U) |
80021da: 4313 orrs r3, r2
((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 13U) |
80021dc: 683a ldr r2, [r7, #0]
80021de: 7f92 ldrb r2, [r2, #30]
80021e0: 2a00 cmp r2, #0
80021e2: d102 bne.n 80021ea <ETH_SetMACConfig+0x5e>
80021e4: f44f 5200 mov.w r2, #8192 ; 0x2000
80021e8: e000 b.n 80021ec <ETH_SetMACConfig+0x60>
80021ea: 2200 movs r2, #0
macconf->Speed |
80021ec: 431a orrs r2, r3
((uint32_t)macconf->LoopbackMode << 12U) |
80021ee: 683b ldr r3, [r7, #0]
80021f0: 7f1b ldrb r3, [r3, #28]
80021f2: 031b lsls r3, r3, #12
((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 13U) |
80021f4: 431a orrs r2, r3
macconf->DuplexMode |
80021f6: 683b ldr r3, [r7, #0]
80021f8: 699b ldr r3, [r3, #24]
((uint32_t)macconf->LoopbackMode << 12U) |
80021fa: 431a orrs r2, r3
((uint32_t)macconf->ChecksumOffload << 10U) |
80021fc: 683b ldr r3, [r7, #0]
80021fe: 791b ldrb r3, [r3, #4]
8002200: 029b lsls r3, r3, #10
macconf->DuplexMode |
8002202: 4313 orrs r3, r2
((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 9U) |
8002204: 683a ldr r2, [r7, #0]
8002206: f892 2020 ldrb.w r2, [r2, #32]
800220a: 2a00 cmp r2, #0
800220c: d102 bne.n 8002214 <ETH_SetMACConfig+0x88>
800220e: f44f 7200 mov.w r2, #512 ; 0x200
8002212: e000 b.n 8002216 <ETH_SetMACConfig+0x8a>
8002214: 2200 movs r2, #0
((uint32_t)macconf->ChecksumOffload << 10U) |
8002216: 431a orrs r2, r3
((uint32_t)macconf->AutomaticPadCRCStrip << 7U) |
8002218: 683b ldr r3, [r7, #0]
800221a: 7bdb ldrb r3, [r3, #15]
800221c: 01db lsls r3, r3, #7
((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 9U) |
800221e: 431a orrs r2, r3
macconf->BackOffLimit |
8002220: 683b ldr r3, [r7, #0]
8002222: 6a5b ldr r3, [r3, #36] ; 0x24
((uint32_t)macconf->AutomaticPadCRCStrip << 7U) |
8002224: 431a orrs r2, r3
((uint32_t)macconf->DeferralCheck << 4U));
8002226: 683b ldr r3, [r7, #0]
8002228: f893 3028 ldrb.w r3, [r3, #40] ; 0x28
800222c: 011b lsls r3, r3, #4
tmpreg1 |= (uint32_t)(((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 23U) |
800222e: 4313 orrs r3, r2
8002230: 68fa ldr r2, [r7, #12]
8002232: 4313 orrs r3, r2
8002234: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACCR */
(heth->Instance)->MACCR = (uint32_t)tmpreg1;
8002236: 687b ldr r3, [r7, #4]
8002238: 681b ldr r3, [r3, #0]
800223a: 68fa ldr r2, [r7, #12]
800223c: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg1 = (heth->Instance)->MACCR;
800223e: 687b ldr r3, [r7, #4]
8002240: 681b ldr r3, [r3, #0]
8002242: 681b ldr r3, [r3, #0]
8002244: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8002246: 2001 movs r0, #1
8002248: f7ff f980 bl 800154c <HAL_Delay>
(heth->Instance)->MACCR = tmpreg1;
800224c: 687b ldr r3, [r7, #4]
800224e: 681b ldr r3, [r3, #0]
8002250: 68fa ldr r2, [r7, #12]
8002252: 601a str r2, [r3, #0]
/*----------------------- ETHERNET MACFCR Configuration --------------------*/
/* Get the ETHERNET MACFCR value */
tmpreg1 = (heth->Instance)->MACFCR;
8002254: 687b ldr r3, [r7, #4]
8002256: 681b ldr r3, [r3, #0]
8002258: 699b ldr r3, [r3, #24]
800225a: 60fb str r3, [r7, #12]
/* Clear xx bits */
tmpreg1 &= ETH_MACFCR_CLEAR_MASK;
800225c: 68fa ldr r2, [r7, #12]
800225e: f64f 7341 movw r3, #65345 ; 0xff41
8002262: 4013 ands r3, r2
8002264: 60fb str r3, [r7, #12]
tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) |
8002266: 683b ldr r3, [r7, #0]
8002268: 6c9b ldr r3, [r3, #72] ; 0x48
800226a: 041b lsls r3, r3, #16
((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7U) |
800226c: 683a ldr r2, [r7, #0]
800226e: f892 204c ldrb.w r2, [r2, #76] ; 0x4c
8002272: 2a00 cmp r2, #0
8002274: d101 bne.n 800227a <ETH_SetMACConfig+0xee>
8002276: 2280 movs r2, #128 ; 0x80
8002278: e000 b.n 800227c <ETH_SetMACConfig+0xf0>
800227a: 2200 movs r2, #0
tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) |
800227c: 431a orrs r2, r3
macconf->PauseLowThreshold |
800227e: 683b ldr r3, [r7, #0]
8002280: 6d1b ldr r3, [r3, #80] ; 0x50
((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7U) |
8002282: 4313 orrs r3, r2
((uint32_t)((macconf->UnicastPausePacketDetect == ENABLE) ? 1U : 0U) << 3U) |
8002284: 683a ldr r2, [r7, #0]
8002286: f892 2055 ldrb.w r2, [r2, #85] ; 0x55
800228a: 2a01 cmp r2, #1
800228c: d101 bne.n 8002292 <ETH_SetMACConfig+0x106>
800228e: 2208 movs r2, #8
8002290: e000 b.n 8002294 <ETH_SetMACConfig+0x108>
8002292: 2200 movs r2, #0
macconf->PauseLowThreshold |
8002294: 4313 orrs r3, r2
((uint32_t)((macconf->ReceiveFlowControl == ENABLE) ? 1U : 0U) << 2U) |
8002296: 683a ldr r2, [r7, #0]
8002298: f892 2056 ldrb.w r2, [r2, #86] ; 0x56
800229c: 2a01 cmp r2, #1
800229e: d101 bne.n 80022a4 <ETH_SetMACConfig+0x118>
80022a0: 2204 movs r2, #4
80022a2: e000 b.n 80022a6 <ETH_SetMACConfig+0x11a>
80022a4: 2200 movs r2, #0
((uint32_t)((macconf->UnicastPausePacketDetect == ENABLE) ? 1U : 0U) << 3U) |
80022a6: 4313 orrs r3, r2
((uint32_t)((macconf->TransmitFlowControl == ENABLE) ? 1U : 0U) << 1U));
80022a8: 683a ldr r2, [r7, #0]
80022aa: f892 2054 ldrb.w r2, [r2, #84] ; 0x54
80022ae: 2a01 cmp r2, #1
80022b0: d101 bne.n 80022b6 <ETH_SetMACConfig+0x12a>
80022b2: 2202 movs r2, #2
80022b4: e000 b.n 80022b8 <ETH_SetMACConfig+0x12c>
80022b6: 2200 movs r2, #0
tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) |
80022b8: 4313 orrs r3, r2
80022ba: 68fa ldr r2, [r7, #12]
80022bc: 4313 orrs r3, r2
80022be: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACFCR */
(heth->Instance)->MACFCR = (uint32_t)tmpreg1;
80022c0: 687b ldr r3, [r7, #4]
80022c2: 681b ldr r3, [r3, #0]
80022c4: 68fa ldr r2, [r7, #12]
80022c6: 619a str r2, [r3, #24]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg1 = (heth->Instance)->MACFCR;
80022c8: 687b ldr r3, [r7, #4]
80022ca: 681b ldr r3, [r3, #0]
80022cc: 699b ldr r3, [r3, #24]
80022ce: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80022d0: 2001 movs r0, #1
80022d2: f7ff f93b bl 800154c <HAL_Delay>
(heth->Instance)->MACFCR = tmpreg1;
80022d6: 687b ldr r3, [r7, #4]
80022d8: 681b ldr r3, [r3, #0]
80022da: 68fa ldr r2, [r7, #12]
80022dc: 619a str r2, [r3, #24]
}
80022de: bf00 nop
80022e0: 3710 adds r7, #16
80022e2: 46bd mov sp, r7
80022e4: bd80 pop {r7, pc}
80022e6: bf00 nop
80022e8: ff20810f .word 0xff20810f
080022ec <ETH_SetDMAConfig>:
static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf)
{
80022ec: b580 push {r7, lr}
80022ee: b084 sub sp, #16
80022f0: af00 add r7, sp, #0
80022f2: 6078 str r0, [r7, #4]
80022f4: 6039 str r1, [r7, #0]
uint32_t tmpreg1;
/*----------------------- ETHERNET DMAOMR Configuration --------------------*/
/* Get the ETHERNET DMAOMR value */
tmpreg1 = (heth->Instance)->DMAOMR;
80022f6: 687b ldr r3, [r7, #4]
80022f8: 681b ldr r3, [r3, #0]
80022fa: f503 5380 add.w r3, r3, #4096 ; 0x1000
80022fe: 699b ldr r3, [r3, #24]
8002300: 60fb str r3, [r7, #12]
/* Clear xx bits */
tmpreg1 &= ETH_DMAOMR_CLEAR_MASK;
8002302: 68fa ldr r2, [r7, #12]
8002304: 4b3d ldr r3, [pc, #244] ; (80023fc <ETH_SetDMAConfig+0x110>)
8002306: 4013 ands r3, r2
8002308: 60fb str r3, [r7, #12]
tmpreg1 |= (uint32_t)(((uint32_t)((dmaconf->DropTCPIPChecksumErrorFrame == DISABLE) ? 1U : 0U) << 26U) |
800230a: 683b ldr r3, [r7, #0]
800230c: 7b1b ldrb r3, [r3, #12]
800230e: 2b00 cmp r3, #0
8002310: d102 bne.n 8002318 <ETH_SetDMAConfig+0x2c>
8002312: f04f 6280 mov.w r2, #67108864 ; 0x4000000
8002316: e000 b.n 800231a <ETH_SetDMAConfig+0x2e>
8002318: 2200 movs r2, #0
((uint32_t)dmaconf->ReceiveStoreForward << 25U) |
800231a: 683b ldr r3, [r7, #0]
800231c: 7b5b ldrb r3, [r3, #13]
800231e: 065b lsls r3, r3, #25
tmpreg1 |= (uint32_t)(((uint32_t)((dmaconf->DropTCPIPChecksumErrorFrame == DISABLE) ? 1U : 0U) << 26U) |
8002320: 4313 orrs r3, r2
((uint32_t)((dmaconf->FlushRxPacket == DISABLE) ? 1U : 0U) << 20U) |
8002322: 683a ldr r2, [r7, #0]
8002324: 7f52 ldrb r2, [r2, #29]
8002326: 2a00 cmp r2, #0
8002328: d102 bne.n 8002330 <ETH_SetDMAConfig+0x44>
800232a: f44f 1280 mov.w r2, #1048576 ; 0x100000
800232e: e000 b.n 8002332 <ETH_SetDMAConfig+0x46>
8002330: 2200 movs r2, #0
((uint32_t)dmaconf->ReceiveStoreForward << 25U) |
8002332: 431a orrs r2, r3
((uint32_t)dmaconf->TransmitStoreForward << 21U) |
8002334: 683b ldr r3, [r7, #0]
8002336: 7b9b ldrb r3, [r3, #14]
8002338: 055b lsls r3, r3, #21
((uint32_t)((dmaconf->FlushRxPacket == DISABLE) ? 1U : 0U) << 20U) |
800233a: 431a orrs r2, r3
dmaconf->TransmitThresholdControl |
800233c: 683b ldr r3, [r7, #0]
800233e: 695b ldr r3, [r3, #20]
((uint32_t)dmaconf->TransmitStoreForward << 21U) |
8002340: 431a orrs r2, r3
((uint32_t)dmaconf->ForwardErrorFrames << 7U) |
8002342: 683b ldr r3, [r7, #0]
8002344: 7f1b ldrb r3, [r3, #28]
8002346: 01db lsls r3, r3, #7
dmaconf->TransmitThresholdControl |
8002348: 431a orrs r2, r3
((uint32_t)dmaconf->ForwardUndersizedGoodFrames << 6U) |
800234a: 683b ldr r3, [r7, #0]
800234c: 7f9b ldrb r3, [r3, #30]
800234e: 019b lsls r3, r3, #6
((uint32_t)dmaconf->ForwardErrorFrames << 7U) |
8002350: 431a orrs r2, r3
dmaconf->ReceiveThresholdControl |
8002352: 683b ldr r3, [r7, #0]
8002354: 6a1b ldr r3, [r3, #32]
((uint32_t)dmaconf->ForwardUndersizedGoodFrames << 6U) |
8002356: 431a orrs r2, r3
((uint32_t)dmaconf->SecondFrameOperate << 2U));
8002358: 683b ldr r3, [r7, #0]
800235a: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
800235e: 009b lsls r3, r3, #2
tmpreg1 |= (uint32_t)(((uint32_t)((dmaconf->DropTCPIPChecksumErrorFrame == DISABLE) ? 1U : 0U) << 26U) |
8002360: 4313 orrs r3, r2
8002362: 68fa ldr r2, [r7, #12]
8002364: 4313 orrs r3, r2
8002366: 60fb str r3, [r7, #12]
/* Write to ETHERNET DMAOMR */
(heth->Instance)->DMAOMR = (uint32_t)tmpreg1;
8002368: 687b ldr r3, [r7, #4]
800236a: 681b ldr r3, [r3, #0]
800236c: f503 5380 add.w r3, r3, #4096 ; 0x1000
8002370: 461a mov r2, r3
8002372: 68fb ldr r3, [r7, #12]
8002374: 6193 str r3, [r2, #24]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg1 = (heth->Instance)->DMAOMR;
8002376: 687b ldr r3, [r7, #4]
8002378: 681b ldr r3, [r3, #0]
800237a: f503 5380 add.w r3, r3, #4096 ; 0x1000
800237e: 699b ldr r3, [r3, #24]
8002380: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8002382: 2001 movs r0, #1
8002384: f7ff f8e2 bl 800154c <HAL_Delay>
(heth->Instance)->DMAOMR = tmpreg1;
8002388: 687b ldr r3, [r7, #4]
800238a: 681b ldr r3, [r3, #0]
800238c: f503 5380 add.w r3, r3, #4096 ; 0x1000
8002390: 461a mov r2, r3
8002392: 68fb ldr r3, [r7, #12]
8002394: 6193 str r3, [r2, #24]
/*----------------------- ETHERNET DMABMR Configuration --------------------*/
(heth->Instance)->DMABMR = (uint32_t)(((uint32_t)dmaconf->AddressAlignedBeats << 25U) |
8002396: 683b ldr r3, [r7, #0]
8002398: 791b ldrb r3, [r3, #4]
800239a: 065a lsls r2, r3, #25
dmaconf->BurstMode |
800239c: 683b ldr r3, [r7, #0]
800239e: 689b ldr r3, [r3, #8]
(heth->Instance)->DMABMR = (uint32_t)(((uint32_t)dmaconf->AddressAlignedBeats << 25U) |
80023a0: 431a orrs r2, r3
dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or
80023a2: 683b ldr r3, [r7, #0]
80023a4: 699b ldr r3, [r3, #24]
dmaconf->BurstMode |
80023a6: 431a orrs r2, r3
Rx it is applied for the other */
dmaconf->TxDMABurstLength |
80023a8: 683b ldr r3, [r7, #0]
80023aa: 691b ldr r3, [r3, #16]
dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or
80023ac: 431a orrs r2, r3
((uint32_t)dmaconf->EnhancedDescriptorFormat << 7U) |
80023ae: 683b ldr r3, [r7, #0]
80023b0: f893 3025 ldrb.w r3, [r3, #37] ; 0x25
80023b4: 01db lsls r3, r3, #7
dmaconf->TxDMABurstLength |
80023b6: 431a orrs r2, r3
(dmaconf->DescriptorSkipLength << 2U) |
80023b8: 683b ldr r3, [r7, #0]
80023ba: 6a9b ldr r3, [r3, #40] ; 0x28
80023bc: 009b lsls r3, r3, #2
((uint32_t)dmaconf->EnhancedDescriptorFormat << 7U) |
80023be: 431a orrs r2, r3
dmaconf->DMAArbitration |
80023c0: 683b ldr r3, [r7, #0]
80023c2: 681b ldr r3, [r3, #0]
(dmaconf->DescriptorSkipLength << 2U) |
80023c4: 4313 orrs r3, r2
(heth->Instance)->DMABMR = (uint32_t)(((uint32_t)dmaconf->AddressAlignedBeats << 25U) |
80023c6: 687a ldr r2, [r7, #4]
80023c8: 6812 ldr r2, [r2, #0]
80023ca: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
80023ce: f502 5280 add.w r2, r2, #4096 ; 0x1000
80023d2: 6013 str r3, [r2, #0]
ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg1 = (heth->Instance)->DMABMR;
80023d4: 687b ldr r3, [r7, #4]
80023d6: 681b ldr r3, [r3, #0]
80023d8: f503 5380 add.w r3, r3, #4096 ; 0x1000
80023dc: 681b ldr r3, [r3, #0]
80023de: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80023e0: 2001 movs r0, #1
80023e2: f7ff f8b3 bl 800154c <HAL_Delay>
(heth->Instance)->DMABMR = tmpreg1;
80023e6: 687b ldr r3, [r7, #4]
80023e8: 681b ldr r3, [r3, #0]
80023ea: f503 5380 add.w r3, r3, #4096 ; 0x1000
80023ee: 461a mov r2, r3
80023f0: 68fb ldr r3, [r7, #12]
80023f2: 6013 str r3, [r2, #0]
}
80023f4: bf00 nop
80023f6: 3710 adds r7, #16
80023f8: 46bd mov sp, r7
80023fa: bd80 pop {r7, pc}
80023fc: f8de3f23 .word 0xf8de3f23
08002400 <ETH_MACDMAConfig>:
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth)
{
8002400: b580 push {r7, lr}
8002402: b0a6 sub sp, #152 ; 0x98
8002404: af00 add r7, sp, #0
8002406: 6078 str r0, [r7, #4]
ETH_MACConfigTypeDef macDefaultConf;
ETH_DMAConfigTypeDef dmaDefaultConf;
/*--------------- ETHERNET MAC registers default Configuration --------------*/
macDefaultConf.Watchdog = ENABLE;
8002408: 2301 movs r3, #1
800240a: f887 3044 strb.w r3, [r7, #68] ; 0x44
macDefaultConf.Jabber = ENABLE;
800240e: 2301 movs r3, #1
8002410: f887 3045 strb.w r3, [r7, #69] ; 0x45
macDefaultConf.InterPacketGapVal = ETH_INTERFRAMEGAP_96BIT;
8002414: 2300 movs r3, #0
8002416: 63fb str r3, [r7, #60] ; 0x3c
macDefaultConf.CarrierSenseDuringTransmit = DISABLE;
8002418: 2300 movs r3, #0
800241a: f887 3053 strb.w r3, [r7, #83] ; 0x53
macDefaultConf.ReceiveOwn = ENABLE;
800241e: 2301 movs r3, #1
8002420: f887 3052 strb.w r3, [r7, #82] ; 0x52
macDefaultConf.LoopbackMode = DISABLE;
8002424: 2300 movs r3, #0
8002426: f887 3050 strb.w r3, [r7, #80] ; 0x50
macDefaultConf.ChecksumOffload = ENABLE;
800242a: 2301 movs r3, #1
800242c: f887 3038 strb.w r3, [r7, #56] ; 0x38
macDefaultConf.RetryTransmission = DISABLE;
8002430: 2300 movs r3, #0
8002432: f887 3054 strb.w r3, [r7, #84] ; 0x54
macDefaultConf.AutomaticPadCRCStrip = DISABLE;
8002436: 2300 movs r3, #0
8002438: f887 3043 strb.w r3, [r7, #67] ; 0x43
macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10;
800243c: 2300 movs r3, #0
800243e: 65bb str r3, [r7, #88] ; 0x58
macDefaultConf.DeferralCheck = DISABLE;
8002440: 2300 movs r3, #0
8002442: f887 305c strb.w r3, [r7, #92] ; 0x5c
macDefaultConf.PauseTime = 0x0U;
8002446: 2300 movs r3, #0
8002448: 67fb str r3, [r7, #124] ; 0x7c
macDefaultConf.ZeroQuantaPause = DISABLE;
800244a: 2300 movs r3, #0
800244c: f887 3080 strb.w r3, [r7, #128] ; 0x80
macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4;
8002450: 2300 movs r3, #0
8002452: f8c7 3084 str.w r3, [r7, #132] ; 0x84
macDefaultConf.ReceiveFlowControl = DISABLE;
8002456: 2300 movs r3, #0
8002458: f887 308a strb.w r3, [r7, #138] ; 0x8a
macDefaultConf.TransmitFlowControl = DISABLE;
800245c: 2300 movs r3, #0
800245e: f887 3088 strb.w r3, [r7, #136] ; 0x88
macDefaultConf.Speed = ETH_SPEED_100M;
8002462: f44f 4380 mov.w r3, #16384 ; 0x4000
8002466: 64bb str r3, [r7, #72] ; 0x48
macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE;
8002468: f44f 6300 mov.w r3, #2048 ; 0x800
800246c: 64fb str r3, [r7, #76] ; 0x4c
macDefaultConf.UnicastPausePacketDetect = DISABLE;
800246e: 2300 movs r3, #0
8002470: f887 3089 strb.w r3, [r7, #137] ; 0x89
/* MAC default configuration */
ETH_SetMACConfig(heth, &macDefaultConf);
8002474: f107 0334 add.w r3, r7, #52 ; 0x34
8002478: 4619 mov r1, r3
800247a: 6878 ldr r0, [r7, #4]
800247c: f7ff fe86 bl 800218c <ETH_SetMACConfig>
/*--------------- ETHERNET DMA registers default Configuration --------------*/
dmaDefaultConf.DropTCPIPChecksumErrorFrame = ENABLE;
8002480: 2301 movs r3, #1
8002482: 753b strb r3, [r7, #20]
dmaDefaultConf.ReceiveStoreForward = ENABLE;
8002484: 2301 movs r3, #1
8002486: 757b strb r3, [r7, #21]
dmaDefaultConf.FlushRxPacket = ENABLE;
8002488: 2301 movs r3, #1
800248a: f887 3025 strb.w r3, [r7, #37] ; 0x25
dmaDefaultConf.TransmitStoreForward = ENABLE;
800248e: 2301 movs r3, #1
8002490: 75bb strb r3, [r7, #22]
dmaDefaultConf.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES;
8002492: 2300 movs r3, #0
8002494: 61fb str r3, [r7, #28]
dmaDefaultConf.ForwardErrorFrames = DISABLE;
8002496: 2300 movs r3, #0
8002498: f887 3024 strb.w r3, [r7, #36] ; 0x24
dmaDefaultConf.ForwardUndersizedGoodFrames = DISABLE;
800249c: 2300 movs r3, #0
800249e: f887 3026 strb.w r3, [r7, #38] ; 0x26
dmaDefaultConf.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES;
80024a2: 2300 movs r3, #0
80024a4: 62bb str r3, [r7, #40] ; 0x28
dmaDefaultConf.SecondFrameOperate = ENABLE;
80024a6: 2301 movs r3, #1
80024a8: f887 302c strb.w r3, [r7, #44] ; 0x2c
dmaDefaultConf.AddressAlignedBeats = ENABLE;
80024ac: 2301 movs r3, #1
80024ae: 733b strb r3, [r7, #12]
dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED;
80024b0: f44f 3380 mov.w r3, #65536 ; 0x10000
80024b4: 613b str r3, [r7, #16]
dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT;
80024b6: f44f 0380 mov.w r3, #4194304 ; 0x400000
80024ba: 623b str r3, [r7, #32]
dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT;
80024bc: f44f 5300 mov.w r3, #8192 ; 0x2000
80024c0: 61bb str r3, [r7, #24]
dmaDefaultConf.EnhancedDescriptorFormat = ENABLE;
80024c2: 2301 movs r3, #1
80024c4: f887 302d strb.w r3, [r7, #45] ; 0x2d
dmaDefaultConf.DescriptorSkipLength = 0x0U;
80024c8: 2300 movs r3, #0
80024ca: 633b str r3, [r7, #48] ; 0x30
dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1;
80024cc: 2300 movs r3, #0
80024ce: 60bb str r3, [r7, #8]
/* DMA default configuration */
ETH_SetDMAConfig(heth, &dmaDefaultConf);
80024d0: f107 0308 add.w r3, r7, #8
80024d4: 4619 mov r1, r3
80024d6: 6878 ldr r0, [r7, #4]
80024d8: f7ff ff08 bl 80022ec <ETH_SetDMAConfig>
}
80024dc: bf00 nop
80024de: 3798 adds r7, #152 ; 0x98
80024e0: 46bd mov sp, r7
80024e2: bd80 pop {r7, pc}
080024e4 <ETH_MACAddressConfig>:
* @arg ETH_MAC_Address3: MAC Address3
* @param Addr Pointer to MAC address buffer data (6 bytes)
* @retval HAL status
*/
static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr)
{
80024e4: b480 push {r7}
80024e6: b087 sub sp, #28
80024e8: af00 add r7, sp, #0
80024ea: 60f8 str r0, [r7, #12]
80024ec: 60b9 str r1, [r7, #8]
80024ee: 607a str r2, [r7, #4]
/* Prevent unused argument(s) compilation warning */
UNUSED(heth);
/* Calculate the selected MAC address high register */
tmpreg1 = ((uint32_t)Addr[5U] << 8U) | (uint32_t)Addr[4U];
80024f0: 687b ldr r3, [r7, #4]
80024f2: 3305 adds r3, #5
80024f4: 781b ldrb r3, [r3, #0]
80024f6: 021b lsls r3, r3, #8
80024f8: 687a ldr r2, [r7, #4]
80024fa: 3204 adds r2, #4
80024fc: 7812 ldrb r2, [r2, #0]
80024fe: 4313 orrs r3, r2
8002500: 617b str r3, [r7, #20]
/* Load the selected MAC address high register */
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_HBASE + MacAddr))) = tmpreg1;
8002502: 68ba ldr r2, [r7, #8]
8002504: 4b11 ldr r3, [pc, #68] ; (800254c <ETH_MACAddressConfig+0x68>)
8002506: 4413 add r3, r2
8002508: 461a mov r2, r3
800250a: 697b ldr r3, [r7, #20]
800250c: 6013 str r3, [r2, #0]
/* Calculate the selected MAC address low register */
tmpreg1 = ((uint32_t)Addr[3U] << 24U) | ((uint32_t)Addr[2U] << 16U) | ((uint32_t)Addr[1U] << 8U) | Addr[0U];
800250e: 687b ldr r3, [r7, #4]
8002510: 3303 adds r3, #3
8002512: 781b ldrb r3, [r3, #0]
8002514: 061a lsls r2, r3, #24
8002516: 687b ldr r3, [r7, #4]
8002518: 3302 adds r3, #2
800251a: 781b ldrb r3, [r3, #0]
800251c: 041b lsls r3, r3, #16
800251e: 431a orrs r2, r3
8002520: 687b ldr r3, [r7, #4]
8002522: 3301 adds r3, #1
8002524: 781b ldrb r3, [r3, #0]
8002526: 021b lsls r3, r3, #8
8002528: 4313 orrs r3, r2
800252a: 687a ldr r2, [r7, #4]
800252c: 7812 ldrb r2, [r2, #0]
800252e: 4313 orrs r3, r2
8002530: 617b str r3, [r7, #20]
/* Load the selected MAC address low register */
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_LBASE + MacAddr))) = tmpreg1;
8002532: 68ba ldr r2, [r7, #8]
8002534: 4b06 ldr r3, [pc, #24] ; (8002550 <ETH_MACAddressConfig+0x6c>)
8002536: 4413 add r3, r2
8002538: 461a mov r2, r3
800253a: 697b ldr r3, [r7, #20]
800253c: 6013 str r3, [r2, #0]
}
800253e: bf00 nop
8002540: 371c adds r7, #28
8002542: 46bd mov sp, r7
8002544: f85d 7b04 ldr.w r7, [sp], #4
8002548: 4770 bx lr
800254a: bf00 nop
800254c: 40028040 .word 0x40028040
8002550: 40028044 .word 0x40028044
08002554 <ETH_DMATxDescListInit>:
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
{
8002554: b480 push {r7}
8002556: b085 sub sp, #20
8002558: af00 add r7, sp, #0
800255a: 6078 str r0, [r7, #4]
ETH_DMADescTypeDef *dmatxdesc;
uint32_t i;
/* Fill each DMATxDesc descriptor with the right values */
for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++)
800255c: 2300 movs r3, #0
800255e: 60fb str r3, [r7, #12]
8002560: e03e b.n 80025e0 <ETH_DMATxDescListInit+0x8c>
{
dmatxdesc = heth->Init.TxDesc + i;
8002562: 687b ldr r3, [r7, #4]
8002564: 68d9 ldr r1, [r3, #12]
8002566: 68fa ldr r2, [r7, #12]
8002568: 4613 mov r3, r2
800256a: 009b lsls r3, r3, #2
800256c: 4413 add r3, r2
800256e: 00db lsls r3, r3, #3
8002570: 440b add r3, r1
8002572: 60bb str r3, [r7, #8]
WRITE_REG(dmatxdesc->DESC0, 0x0);
8002574: 68bb ldr r3, [r7, #8]
8002576: 2200 movs r2, #0
8002578: 601a str r2, [r3, #0]
WRITE_REG(dmatxdesc->DESC1, 0x0);
800257a: 68bb ldr r3, [r7, #8]
800257c: 2200 movs r2, #0
800257e: 605a str r2, [r3, #4]
WRITE_REG(dmatxdesc->DESC2, 0x0);
8002580: 68bb ldr r3, [r7, #8]
8002582: 2200 movs r2, #0
8002584: 609a str r2, [r3, #8]
WRITE_REG(dmatxdesc->DESC3, 0x0);
8002586: 68bb ldr r3, [r7, #8]
8002588: 2200 movs r2, #0
800258a: 60da str r2, [r3, #12]
WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc);
800258c: 68b9 ldr r1, [r7, #8]
800258e: 687b ldr r3, [r7, #4]
8002590: 68fa ldr r2, [r7, #12]
8002592: 3206 adds r2, #6
8002594: f843 1022 str.w r1, [r3, r2, lsl #2]
/* Set Second Address Chained bit */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_TCH);
8002598: 68bb ldr r3, [r7, #8]
800259a: 681b ldr r3, [r3, #0]
800259c: f443 1280 orr.w r2, r3, #1048576 ; 0x100000
80025a0: 68bb ldr r3, [r7, #8]
80025a2: 601a str r2, [r3, #0]
if (i < ((uint32_t)ETH_TX_DESC_CNT - 1U))
80025a4: 68fb ldr r3, [r7, #12]
80025a6: 2b02 cmp r3, #2
80025a8: d80c bhi.n 80025c4 <ETH_DMATxDescListInit+0x70>
{
WRITE_REG(dmatxdesc->DESC3, (uint32_t)(heth->Init.TxDesc + i + 1U));
80025aa: 687b ldr r3, [r7, #4]
80025ac: 68d9 ldr r1, [r3, #12]
80025ae: 68fb ldr r3, [r7, #12]
80025b0: 1c5a adds r2, r3, #1
80025b2: 4613 mov r3, r2
80025b4: 009b lsls r3, r3, #2
80025b6: 4413 add r3, r2
80025b8: 00db lsls r3, r3, #3
80025ba: 440b add r3, r1
80025bc: 461a mov r2, r3
80025be: 68bb ldr r3, [r7, #8]
80025c0: 60da str r2, [r3, #12]
80025c2: e004 b.n 80025ce <ETH_DMATxDescListInit+0x7a>
}
else
{
WRITE_REG(dmatxdesc->DESC3, (uint32_t)(heth->Init.TxDesc));
80025c4: 687b ldr r3, [r7, #4]
80025c6: 68db ldr r3, [r3, #12]
80025c8: 461a mov r2, r3
80025ca: 68bb ldr r3, [r7, #8]
80025cc: 60da str r2, [r3, #12]
}
/* Set the DMA Tx descriptors checksum insertion */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL);
80025ce: 68bb ldr r3, [r7, #8]
80025d0: 681b ldr r3, [r3, #0]
80025d2: f443 0240 orr.w r2, r3, #12582912 ; 0xc00000
80025d6: 68bb ldr r3, [r7, #8]
80025d8: 601a str r2, [r3, #0]
for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++)
80025da: 68fb ldr r3, [r7, #12]
80025dc: 3301 adds r3, #1
80025de: 60fb str r3, [r7, #12]
80025e0: 68fb ldr r3, [r7, #12]
80025e2: 2b03 cmp r3, #3
80025e4: d9bd bls.n 8002562 <ETH_DMATxDescListInit+0xe>
}
heth->TxDescList.CurTxDesc = 0;
80025e6: 687b ldr r3, [r7, #4]
80025e8: 2200 movs r2, #0
80025ea: 629a str r2, [r3, #40] ; 0x28
/* Set Transmit Descriptor List Address */
WRITE_REG(heth->Instance->DMATDLAR, (uint32_t) heth->Init.TxDesc);
80025ec: 687b ldr r3, [r7, #4]
80025ee: 68da ldr r2, [r3, #12]
80025f0: 687b ldr r3, [r7, #4]
80025f2: 681b ldr r3, [r3, #0]
80025f4: f503 5380 add.w r3, r3, #4096 ; 0x1000
80025f8: 611a str r2, [r3, #16]
}
80025fa: bf00 nop
80025fc: 3714 adds r7, #20
80025fe: 46bd mov sp, r7
8002600: f85d 7b04 ldr.w r7, [sp], #4
8002604: 4770 bx lr
08002606 <ETH_DMARxDescListInit>:
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth)
{
8002606: b480 push {r7}
8002608: b085 sub sp, #20
800260a: af00 add r7, sp, #0
800260c: 6078 str r0, [r7, #4]
ETH_DMADescTypeDef *dmarxdesc;
uint32_t i;
for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
800260e: 2300 movs r3, #0
8002610: 60fb str r3, [r7, #12]
8002612: e046 b.n 80026a2 <ETH_DMARxDescListInit+0x9c>
{
dmarxdesc = heth->Init.RxDesc + i;
8002614: 687b ldr r3, [r7, #4]
8002616: 6919 ldr r1, [r3, #16]
8002618: 68fa ldr r2, [r7, #12]
800261a: 4613 mov r3, r2
800261c: 009b lsls r3, r3, #2
800261e: 4413 add r3, r2
8002620: 00db lsls r3, r3, #3
8002622: 440b add r3, r1
8002624: 60bb str r3, [r7, #8]
WRITE_REG(dmarxdesc->DESC0, 0x0);
8002626: 68bb ldr r3, [r7, #8]
8002628: 2200 movs r2, #0
800262a: 601a str r2, [r3, #0]
WRITE_REG(dmarxdesc->DESC1, 0x0);
800262c: 68bb ldr r3, [r7, #8]
800262e: 2200 movs r2, #0
8002630: 605a str r2, [r3, #4]
WRITE_REG(dmarxdesc->DESC2, 0x0);
8002632: 68bb ldr r3, [r7, #8]
8002634: 2200 movs r2, #0
8002636: 609a str r2, [r3, #8]
WRITE_REG(dmarxdesc->DESC3, 0x0);
8002638: 68bb ldr r3, [r7, #8]
800263a: 2200 movs r2, #0
800263c: 60da str r2, [r3, #12]
WRITE_REG(dmarxdesc->BackupAddr0, 0x0);
800263e: 68bb ldr r3, [r7, #8]
8002640: 2200 movs r2, #0
8002642: 621a str r2, [r3, #32]
WRITE_REG(dmarxdesc->BackupAddr1, 0x0);
8002644: 68bb ldr r3, [r7, #8]
8002646: 2200 movs r2, #0
8002648: 625a str r2, [r3, #36] ; 0x24
/* Set Own bit of the Rx descriptor Status */
dmarxdesc->DESC0 = ETH_DMARXDESC_OWN;
800264a: 68bb ldr r3, [r7, #8]
800264c: f04f 4200 mov.w r2, #2147483648 ; 0x80000000
8002650: 601a str r2, [r3, #0]
/* Set Buffer1 size and Second Address Chained bit */
dmarxdesc->DESC1 = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE;
8002652: 68bb ldr r3, [r7, #8]
8002654: f244 52f8 movw r2, #17912 ; 0x45f8
8002658: 605a str r2, [r3, #4]
/* Enable Ethernet DMA Rx Descriptor interrupt */
dmarxdesc->DESC1 &= ~ETH_DMARXDESC_DIC;
800265a: 68bb ldr r3, [r7, #8]
800265c: 685b ldr r3, [r3, #4]
800265e: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000
8002662: 68bb ldr r3, [r7, #8]
8002664: 605a str r2, [r3, #4]
/* Set Rx descritors addresses */
WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc);
8002666: 68b9 ldr r1, [r7, #8]
8002668: 687b ldr r3, [r7, #4]
800266a: 68fa ldr r2, [r7, #12]
800266c: 3212 adds r2, #18
800266e: f843 1022 str.w r1, [r3, r2, lsl #2]
if (i < ((uint32_t)ETH_RX_DESC_CNT - 1U))
8002672: 68fb ldr r3, [r7, #12]
8002674: 2b02 cmp r3, #2
8002676: d80c bhi.n 8002692 <ETH_DMARxDescListInit+0x8c>
{
WRITE_REG(dmarxdesc->DESC3, (uint32_t)(heth->Init.RxDesc + i + 1U));
8002678: 687b ldr r3, [r7, #4]
800267a: 6919 ldr r1, [r3, #16]
800267c: 68fb ldr r3, [r7, #12]
800267e: 1c5a adds r2, r3, #1
8002680: 4613 mov r3, r2
8002682: 009b lsls r3, r3, #2
8002684: 4413 add r3, r2
8002686: 00db lsls r3, r3, #3
8002688: 440b add r3, r1
800268a: 461a mov r2, r3
800268c: 68bb ldr r3, [r7, #8]
800268e: 60da str r2, [r3, #12]
8002690: e004 b.n 800269c <ETH_DMARxDescListInit+0x96>
}
else
{
WRITE_REG(dmarxdesc->DESC3, (uint32_t)(heth->Init.RxDesc));
8002692: 687b ldr r3, [r7, #4]
8002694: 691b ldr r3, [r3, #16]
8002696: 461a mov r2, r3
8002698: 68bb ldr r3, [r7, #8]
800269a: 60da str r2, [r3, #12]
for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
800269c: 68fb ldr r3, [r7, #12]
800269e: 3301 adds r3, #1
80026a0: 60fb str r3, [r7, #12]
80026a2: 68fb ldr r3, [r7, #12]
80026a4: 2b03 cmp r3, #3
80026a6: d9b5 bls.n 8002614 <ETH_DMARxDescListInit+0xe>
}
}
WRITE_REG(heth->RxDescList.RxDescIdx, 0);
80026a8: 687b ldr r3, [r7, #4]
80026aa: 2200 movs r2, #0
80026ac: 65da str r2, [r3, #92] ; 0x5c
WRITE_REG(heth->RxDescList.RxDescCnt, 0);
80026ae: 687b ldr r3, [r7, #4]
80026b0: 2200 movs r2, #0
80026b2: 661a str r2, [r3, #96] ; 0x60
WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0);
80026b4: 687b ldr r3, [r7, #4]
80026b6: 2200 movs r2, #0
80026b8: 669a str r2, [r3, #104] ; 0x68
WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0);
80026ba: 687b ldr r3, [r7, #4]
80026bc: 2200 movs r2, #0
80026be: 66da str r2, [r3, #108] ; 0x6c
WRITE_REG(heth->RxDescList.ItMode, 0);
80026c0: 687b ldr r3, [r7, #4]
80026c2: 2200 movs r2, #0
80026c4: 659a str r2, [r3, #88] ; 0x58
/* Set Receive Descriptor List Address */
WRITE_REG(heth->Instance->DMARDLAR, (uint32_t) heth->Init.RxDesc);
80026c6: 687b ldr r3, [r7, #4]
80026c8: 691a ldr r2, [r3, #16]
80026ca: 687b ldr r3, [r7, #4]
80026cc: 681b ldr r3, [r3, #0]
80026ce: f503 5380 add.w r3, r3, #4096 ; 0x1000
80026d2: 60da str r2, [r3, #12]
}
80026d4: bf00 nop
80026d6: 3714 adds r7, #20
80026d8: 46bd mov sp, r7
80026da: f85d 7b04 ldr.w r7, [sp], #4
80026de: 4770 bx lr
080026e0 <ETH_Prepare_Tx_Descriptors>:
* @param pTxConfig: Tx packet configuration
* @param ItMode: Enable or disable Tx EOT interrept
* @retval Status
*/
static uint32_t ETH_Prepare_Tx_Descriptors(ETH_HandleTypeDef *heth, ETH_TxPacketConfig *pTxConfig, uint32_t ItMode)
{
80026e0: b480 push {r7}
80026e2: b08d sub sp, #52 ; 0x34
80026e4: af00 add r7, sp, #0
80026e6: 60f8 str r0, [r7, #12]
80026e8: 60b9 str r1, [r7, #8]
80026ea: 607a str r2, [r7, #4]
ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList;
80026ec: 68fb ldr r3, [r7, #12]
80026ee: 3318 adds r3, #24
80026f0: 617b str r3, [r7, #20]
uint32_t descidx = dmatxdesclist->CurTxDesc;
80026f2: 697b ldr r3, [r7, #20]
80026f4: 691b ldr r3, [r3, #16]
80026f6: 62fb str r3, [r7, #44] ; 0x2c
uint32_t firstdescidx = dmatxdesclist->CurTxDesc;
80026f8: 697b ldr r3, [r7, #20]
80026fa: 691b ldr r3, [r3, #16]
80026fc: 613b str r3, [r7, #16]
uint32_t idx;
uint32_t descnbr = 0;
80026fe: 2300 movs r3, #0
8002700: 627b str r3, [r7, #36] ; 0x24
ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
8002702: 697b ldr r3, [r7, #20]
8002704: 6afa ldr r2, [r7, #44] ; 0x2c
8002706: f853 3022 ldr.w r3, [r3, r2, lsl #2]
800270a: 623b str r3, [r7, #32]
ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer;
800270c: 68bb ldr r3, [r7, #8]
800270e: 689b ldr r3, [r3, #8]
8002710: 61fb str r3, [r7, #28]
uint32_t bd_count = 0;
8002712: 2300 movs r3, #0
8002714: 61bb str r3, [r7, #24]
/* Current Tx Descriptor Owned by DMA: cannot be used by the application */
if ((READ_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_OWN) == ETH_DMATXDESC_OWN)
8002716: 6a3b ldr r3, [r7, #32]
8002718: 681b ldr r3, [r3, #0]
800271a: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
800271e: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
8002722: d007 beq.n 8002734 <ETH_Prepare_Tx_Descriptors+0x54>
|| (dmatxdesclist->PacketAddress[descidx] != NULL))
8002724: 697a ldr r2, [r7, #20]
8002726: 6afb ldr r3, [r7, #44] ; 0x2c
8002728: 3304 adds r3, #4
800272a: 009b lsls r3, r3, #2
800272c: 4413 add r3, r2
800272e: 685b ldr r3, [r3, #4]
8002730: 2b00 cmp r3, #0
8002732: d001 beq.n 8002738 <ETH_Prepare_Tx_Descriptors+0x58>
{
return HAL_ETH_ERROR_BUSY;
8002734: 2302 movs r3, #2
8002736: e103 b.n 8002940 <ETH_Prepare_Tx_Descriptors+0x260>
}
descnbr += 1U;
8002738: 6a7b ldr r3, [r7, #36] ; 0x24
800273a: 3301 adds r3, #1
800273c: 627b str r3, [r7, #36] ; 0x24
/* Set header or buffer 1 address */
WRITE_REG(dmatxdesc->DESC2, (uint32_t)txbuffer->buffer);
800273e: 69fb ldr r3, [r7, #28]
8002740: 681b ldr r3, [r3, #0]
8002742: 461a mov r2, r3
8002744: 6a3b ldr r3, [r7, #32]
8002746: 609a str r2, [r3, #8]
/* Set header or buffer 1 Length */
MODIFY_REG(dmatxdesc->DESC1, ETH_DMATXDESC_TBS1, txbuffer->len);
8002748: 6a3b ldr r3, [r7, #32]
800274a: 685b ldr r3, [r3, #4]
800274c: f423 53ff bic.w r3, r3, #8160 ; 0x1fe0
8002750: f023 031f bic.w r3, r3, #31
8002754: 69fa ldr r2, [r7, #28]
8002756: 6852 ldr r2, [r2, #4]
8002758: 431a orrs r2, r3
800275a: 6a3b ldr r3, [r7, #32]
800275c: 605a str r2, [r3, #4]
if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != 0U)
800275e: 68bb ldr r3, [r7, #8]
8002760: 681b ldr r3, [r3, #0]
8002762: f003 0301 and.w r3, r3, #1
8002766: 2b00 cmp r3, #0
8002768: d008 beq.n 800277c <ETH_Prepare_Tx_Descriptors+0x9c>
{
MODIFY_REG(dmatxdesc->DESC0, ETH_DMATXDESC_CIC, pTxConfig->ChecksumCtrl);
800276a: 6a3b ldr r3, [r7, #32]
800276c: 681b ldr r3, [r3, #0]
800276e: f423 0240 bic.w r2, r3, #12582912 ; 0xc00000
8002772: 68bb ldr r3, [r7, #8]
8002774: 695b ldr r3, [r3, #20]
8002776: 431a orrs r2, r3
8002778: 6a3b ldr r3, [r7, #32]
800277a: 601a str r2, [r3, #0]
}
if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != 0U)
800277c: 68bb ldr r3, [r7, #8]
800277e: 681b ldr r3, [r3, #0]
8002780: f003 0320 and.w r3, r3, #32
8002784: 2b00 cmp r3, #0
8002786: d008 beq.n 800279a <ETH_Prepare_Tx_Descriptors+0xba>
{
MODIFY_REG(dmatxdesc->DESC0, ETH_CRC_PAD_DISABLE, pTxConfig->CRCPadCtrl);
8002788: 6a3b ldr r3, [r7, #32]
800278a: 681b ldr r3, [r3, #0]
800278c: f023 6240 bic.w r2, r3, #201326592 ; 0xc000000
8002790: 68bb ldr r3, [r7, #8]
8002792: 691b ldr r3, [r3, #16]
8002794: 431a orrs r2, r3
8002796: 6a3b ldr r3, [r7, #32]
8002798: 601a str r2, [r3, #0]
}
if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != 0U)
800279a: 68bb ldr r3, [r7, #8]
800279c: 681b ldr r3, [r3, #0]
800279e: f003 0304 and.w r3, r3, #4
80027a2: 2b00 cmp r3, #0
80027a4: d005 beq.n 80027b2 <ETH_Prepare_Tx_Descriptors+0xd2>
{
/* Set Vlan Type */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_VF);
80027a6: 6a3b ldr r3, [r7, #32]
80027a8: 681b ldr r3, [r3, #0]
80027aa: f043 0280 orr.w r2, r3, #128 ; 0x80
80027ae: 6a3b ldr r3, [r7, #32]
80027b0: 601a str r2, [r3, #0]
}
/* Mark it as First Descriptor */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_FS);
80027b2: 6a3b ldr r3, [r7, #32]
80027b4: 681b ldr r3, [r3, #0]
80027b6: f043 5280 orr.w r2, r3, #268435456 ; 0x10000000
80027ba: 6a3b ldr r3, [r7, #32]
80027bc: 601a str r2, [r3, #0]
__ASM volatile ("dmb 0xF":::"memory");
80027be: f3bf 8f5f dmb sy
}
80027c2: bf00 nop
/* Ensure rest of descriptor is written to RAM before the OWN bit */
__DMB();
/* set OWN bit of FIRST descriptor */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_OWN);
80027c4: 6a3b ldr r3, [r7, #32]
80027c6: 681b ldr r3, [r3, #0]
80027c8: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
80027cc: 6a3b ldr r3, [r7, #32]
80027ce: 601a str r2, [r3, #0]
/* only if the packet is split into more than one descriptors > 1 */
while (txbuffer->next != NULL)
80027d0: e084 b.n 80028dc <ETH_Prepare_Tx_Descriptors+0x1fc>
{
/* Clear the LD bit of previous descriptor */
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_LS);
80027d2: 6a3b ldr r3, [r7, #32]
80027d4: 681b ldr r3, [r3, #0]
80027d6: f023 5200 bic.w r2, r3, #536870912 ; 0x20000000
80027da: 6a3b ldr r3, [r7, #32]
80027dc: 601a str r2, [r3, #0]
if (ItMode != ((uint32_t)RESET))
80027de: 687b ldr r3, [r7, #4]
80027e0: 2b00 cmp r3, #0
80027e2: d006 beq.n 80027f2 <ETH_Prepare_Tx_Descriptors+0x112>
{
/* Set Interrupt on completion bit */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
80027e4: 6a3b ldr r3, [r7, #32]
80027e6: 681b ldr r3, [r3, #0]
80027e8: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000
80027ec: 6a3b ldr r3, [r7, #32]
80027ee: 601a str r2, [r3, #0]
80027f0: e005 b.n 80027fe <ETH_Prepare_Tx_Descriptors+0x11e>
}
else
{
/* Clear Interrupt on completion bit */
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
80027f2: 6a3b ldr r3, [r7, #32]
80027f4: 681b ldr r3, [r3, #0]
80027f6: f023 4280 bic.w r2, r3, #1073741824 ; 0x40000000
80027fa: 6a3b ldr r3, [r7, #32]
80027fc: 601a str r2, [r3, #0]
}
/* Increment current tx descriptor index */
INCR_TX_DESC_INDEX(descidx, 1U);
80027fe: 6afb ldr r3, [r7, #44] ; 0x2c
8002800: 3301 adds r3, #1
8002802: 62fb str r3, [r7, #44] ; 0x2c
8002804: 6afb ldr r3, [r7, #44] ; 0x2c
8002806: 2b03 cmp r3, #3
8002808: d902 bls.n 8002810 <ETH_Prepare_Tx_Descriptors+0x130>
800280a: 6afb ldr r3, [r7, #44] ; 0x2c
800280c: 3b04 subs r3, #4
800280e: 62fb str r3, [r7, #44] ; 0x2c
/* Get current descriptor address */
dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
8002810: 697b ldr r3, [r7, #20]
8002812: 6afa ldr r2, [r7, #44] ; 0x2c
8002814: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8002818: 623b str r3, [r7, #32]
/* Clear the FD bit of new Descriptor */
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_FS);
800281a: 6a3b ldr r3, [r7, #32]
800281c: 681b ldr r3, [r3, #0]
800281e: f023 5280 bic.w r2, r3, #268435456 ; 0x10000000
8002822: 6a3b ldr r3, [r7, #32]
8002824: 601a str r2, [r3, #0]
/* Current Tx Descriptor Owned by DMA: cannot be used by the application */
if ((READ_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_OWN) == ETH_DMATXDESC_OWN)
8002826: 6a3b ldr r3, [r7, #32]
8002828: 681b ldr r3, [r3, #0]
800282a: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
800282e: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
8002832: d007 beq.n 8002844 <ETH_Prepare_Tx_Descriptors+0x164>
|| (dmatxdesclist->PacketAddress[descidx] != NULL))
8002834: 697a ldr r2, [r7, #20]
8002836: 6afb ldr r3, [r7, #44] ; 0x2c
8002838: 3304 adds r3, #4
800283a: 009b lsls r3, r3, #2
800283c: 4413 add r3, r2
800283e: 685b ldr r3, [r3, #4]
8002840: 2b00 cmp r3, #0
8002842: d029 beq.n 8002898 <ETH_Prepare_Tx_Descriptors+0x1b8>
{
descidx = firstdescidx;
8002844: 693b ldr r3, [r7, #16]
8002846: 62fb str r3, [r7, #44] ; 0x2c
dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
8002848: 697b ldr r3, [r7, #20]
800284a: 6afa ldr r2, [r7, #44] ; 0x2c
800284c: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8002850: 623b str r3, [r7, #32]
/* clear previous desc own bit */
for (idx = 0; idx < descnbr; idx ++)
8002852: 2300 movs r3, #0
8002854: 62bb str r3, [r7, #40] ; 0x28
8002856: e019 b.n 800288c <ETH_Prepare_Tx_Descriptors+0x1ac>
__ASM volatile ("dmb 0xF":::"memory");
8002858: f3bf 8f5f dmb sy
}
800285c: bf00 nop
{
/* Ensure rest of descriptor is written to RAM before the OWN bit */
__DMB();
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_OWN);
800285e: 6a3b ldr r3, [r7, #32]
8002860: 681b ldr r3, [r3, #0]
8002862: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000
8002866: 6a3b ldr r3, [r7, #32]
8002868: 601a str r2, [r3, #0]
/* Increment current tx descriptor index */
INCR_TX_DESC_INDEX(descidx, 1U);
800286a: 6afb ldr r3, [r7, #44] ; 0x2c
800286c: 3301 adds r3, #1
800286e: 62fb str r3, [r7, #44] ; 0x2c
8002870: 6afb ldr r3, [r7, #44] ; 0x2c
8002872: 2b03 cmp r3, #3
8002874: d902 bls.n 800287c <ETH_Prepare_Tx_Descriptors+0x19c>
8002876: 6afb ldr r3, [r7, #44] ; 0x2c
8002878: 3b04 subs r3, #4
800287a: 62fb str r3, [r7, #44] ; 0x2c
/* Get current descriptor address */
dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
800287c: 697b ldr r3, [r7, #20]
800287e: 6afa ldr r2, [r7, #44] ; 0x2c
8002880: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8002884: 623b str r3, [r7, #32]
for (idx = 0; idx < descnbr; idx ++)
8002886: 6abb ldr r3, [r7, #40] ; 0x28
8002888: 3301 adds r3, #1
800288a: 62bb str r3, [r7, #40] ; 0x28
800288c: 6aba ldr r2, [r7, #40] ; 0x28
800288e: 6a7b ldr r3, [r7, #36] ; 0x24
8002890: 429a cmp r2, r3
8002892: d3e1 bcc.n 8002858 <ETH_Prepare_Tx_Descriptors+0x178>
}
return HAL_ETH_ERROR_BUSY;
8002894: 2302 movs r3, #2
8002896: e053 b.n 8002940 <ETH_Prepare_Tx_Descriptors+0x260>
}
descnbr += 1U;
8002898: 6a7b ldr r3, [r7, #36] ; 0x24
800289a: 3301 adds r3, #1
800289c: 627b str r3, [r7, #36] ; 0x24
/* Get the next Tx buffer in the list */
txbuffer = txbuffer->next;
800289e: 69fb ldr r3, [r7, #28]
80028a0: 689b ldr r3, [r3, #8]
80028a2: 61fb str r3, [r7, #28]
/* Set header or buffer 1 address */
WRITE_REG(dmatxdesc->DESC2, (uint32_t)txbuffer->buffer);
80028a4: 69fb ldr r3, [r7, #28]
80028a6: 681b ldr r3, [r3, #0]
80028a8: 461a mov r2, r3
80028aa: 6a3b ldr r3, [r7, #32]
80028ac: 609a str r2, [r3, #8]
/* Set header or buffer 1 Length */
MODIFY_REG(dmatxdesc->DESC1, ETH_DMATXDESC_TBS1, txbuffer->len);
80028ae: 6a3b ldr r3, [r7, #32]
80028b0: 685b ldr r3, [r3, #4]
80028b2: f423 53ff bic.w r3, r3, #8160 ; 0x1fe0
80028b6: f023 031f bic.w r3, r3, #31
80028ba: 69fa ldr r2, [r7, #28]
80028bc: 6852 ldr r2, [r2, #4]
80028be: 431a orrs r2, r3
80028c0: 6a3b ldr r3, [r7, #32]
80028c2: 605a str r2, [r3, #4]
bd_count += 1U;
80028c4: 69bb ldr r3, [r7, #24]
80028c6: 3301 adds r3, #1
80028c8: 61bb str r3, [r7, #24]
__ASM volatile ("dmb 0xF":::"memory");
80028ca: f3bf 8f5f dmb sy
}
80028ce: bf00 nop
/* Ensure rest of descriptor is written to RAM before the OWN bit */
__DMB();
/* Set Own bit */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_OWN);
80028d0: 6a3b ldr r3, [r7, #32]
80028d2: 681b ldr r3, [r3, #0]
80028d4: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
80028d8: 6a3b ldr r3, [r7, #32]
80028da: 601a str r2, [r3, #0]
while (txbuffer->next != NULL)
80028dc: 69fb ldr r3, [r7, #28]
80028de: 689b ldr r3, [r3, #8]
80028e0: 2b00 cmp r3, #0
80028e2: f47f af76 bne.w 80027d2 <ETH_Prepare_Tx_Descriptors+0xf2>
}
if (ItMode != ((uint32_t)RESET))
80028e6: 687b ldr r3, [r7, #4]
80028e8: 2b00 cmp r3, #0
80028ea: d006 beq.n 80028fa <ETH_Prepare_Tx_Descriptors+0x21a>
{
/* Set Interrupt on completion bit */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
80028ec: 6a3b ldr r3, [r7, #32]
80028ee: 681b ldr r3, [r3, #0]
80028f0: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000
80028f4: 6a3b ldr r3, [r7, #32]
80028f6: 601a str r2, [r3, #0]
80028f8: e005 b.n 8002906 <ETH_Prepare_Tx_Descriptors+0x226>
}
else
{
/* Clear Interrupt on completion bit */
CLEAR_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_IC);
80028fa: 6a3b ldr r3, [r7, #32]
80028fc: 681b ldr r3, [r3, #0]
80028fe: f023 4280 bic.w r2, r3, #1073741824 ; 0x40000000
8002902: 6a3b ldr r3, [r7, #32]
8002904: 601a str r2, [r3, #0]
}
/* Mark it as LAST descriptor */
SET_BIT(dmatxdesc->DESC0, ETH_DMATXDESC_LS);
8002906: 6a3b ldr r3, [r7, #32]
8002908: 681b ldr r3, [r3, #0]
800290a: f043 5200 orr.w r2, r3, #536870912 ; 0x20000000
800290e: 6a3b ldr r3, [r7, #32]
8002910: 601a str r2, [r3, #0]
/* Save the current packet address to expose it to the application */
dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress;
8002912: 697b ldr r3, [r7, #20]
8002914: 6a5a ldr r2, [r3, #36] ; 0x24
8002916: 6979 ldr r1, [r7, #20]
8002918: 6afb ldr r3, [r7, #44] ; 0x2c
800291a: 3304 adds r3, #4
800291c: 009b lsls r3, r3, #2
800291e: 440b add r3, r1
8002920: 605a str r2, [r3, #4]
dmatxdesclist->CurTxDesc = descidx;
8002922: 697b ldr r3, [r7, #20]
8002924: 6afa ldr r2, [r7, #44] ; 0x2c
8002926: 611a str r2, [r3, #16]
__ASM volatile ("cpsid i" : : : "memory");
8002928: b672 cpsid i
}
800292a: bf00 nop
/* disable the interrupt */
__disable_irq();
dmatxdesclist->BuffersInUse += bd_count + 1U;
800292c: 697b ldr r3, [r7, #20]
800292e: 6a9a ldr r2, [r3, #40] ; 0x28
8002930: 69bb ldr r3, [r7, #24]
8002932: 4413 add r3, r2
8002934: 1c5a adds r2, r3, #1
8002936: 697b ldr r3, [r7, #20]
8002938: 629a str r2, [r3, #40] ; 0x28
__ASM volatile ("cpsie i" : : : "memory");
800293a: b662 cpsie i
}
800293c: bf00 nop
/* Enable interrupts back */
__enable_irq();
/* Return function status */
return HAL_ETH_ERROR_NONE;
800293e: 2300 movs r3, #0
}
8002940: 4618 mov r0, r3
8002942: 3734 adds r7, #52 ; 0x34
8002944: 46bd mov sp, r7
8002946: f85d 7b04 ldr.w r7, [sp], #4
800294a: 4770 bx lr
0800294c <HAL_GPIO_Init>:
* @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains
* the configuration information for the specified GPIO peripheral.
* @retval None
*/
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
{
800294c: b480 push {r7}
800294e: b089 sub sp, #36 ; 0x24
8002950: af00 add r7, sp, #0
8002952: 6078 str r0, [r7, #4]
8002954: 6039 str r1, [r7, #0]
uint32_t position;
uint32_t ioposition = 0x00U;
8002956: 2300 movs r3, #0
8002958: 617b str r3, [r7, #20]
uint32_t iocurrent = 0x00U;
800295a: 2300 movs r3, #0
800295c: 613b str r3, [r7, #16]
uint32_t temp = 0x00U;
800295e: 2300 movs r3, #0
8002960: 61bb str r3, [r7, #24]
assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
/* Configure the port pins */
for(position = 0U; position < GPIO_NUMBER; position++)
8002962: 2300 movs r3, #0
8002964: 61fb str r3, [r7, #28]
8002966: e177 b.n 8002c58 <HAL_GPIO_Init+0x30c>
{
/* Get the IO position */
ioposition = 0x01U << position;
8002968: 2201 movs r2, #1
800296a: 69fb ldr r3, [r7, #28]
800296c: fa02 f303 lsl.w r3, r2, r3
8002970: 617b str r3, [r7, #20]
/* Get the current IO position */
iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
8002972: 683b ldr r3, [r7, #0]
8002974: 681b ldr r3, [r3, #0]
8002976: 697a ldr r2, [r7, #20]
8002978: 4013 ands r3, r2
800297a: 613b str r3, [r7, #16]
if(iocurrent == ioposition)
800297c: 693a ldr r2, [r7, #16]
800297e: 697b ldr r3, [r7, #20]
8002980: 429a cmp r2, r3
8002982: f040 8166 bne.w 8002c52 <HAL_GPIO_Init+0x306>
{
/*--------------------- GPIO Mode Configuration ------------------------*/
/* In case of Output or Alternate function mode selection */
if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
8002986: 683b ldr r3, [r7, #0]
8002988: 685b ldr r3, [r3, #4]
800298a: f003 0303 and.w r3, r3, #3
800298e: 2b01 cmp r3, #1
8002990: d005 beq.n 800299e <HAL_GPIO_Init+0x52>
(GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
8002992: 683b ldr r3, [r7, #0]
8002994: 685b ldr r3, [r3, #4]
8002996: f003 0303 and.w r3, r3, #3
if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
800299a: 2b02 cmp r3, #2
800299c: d130 bne.n 8002a00 <HAL_GPIO_Init+0xb4>
{
/* Check the Speed parameter */
assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
/* Configure the IO Speed */
temp = GPIOx->OSPEEDR;
800299e: 687b ldr r3, [r7, #4]
80029a0: 689b ldr r3, [r3, #8]
80029a2: 61bb str r3, [r7, #24]
temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2U));
80029a4: 69fb ldr r3, [r7, #28]
80029a6: 005b lsls r3, r3, #1
80029a8: 2203 movs r2, #3
80029aa: fa02 f303 lsl.w r3, r2, r3
80029ae: 43db mvns r3, r3
80029b0: 69ba ldr r2, [r7, #24]
80029b2: 4013 ands r3, r2
80029b4: 61bb str r3, [r7, #24]
temp |= (GPIO_Init->Speed << (position * 2U));
80029b6: 683b ldr r3, [r7, #0]
80029b8: 68da ldr r2, [r3, #12]
80029ba: 69fb ldr r3, [r7, #28]
80029bc: 005b lsls r3, r3, #1
80029be: fa02 f303 lsl.w r3, r2, r3
80029c2: 69ba ldr r2, [r7, #24]
80029c4: 4313 orrs r3, r2
80029c6: 61bb str r3, [r7, #24]
GPIOx->OSPEEDR = temp;
80029c8: 687b ldr r3, [r7, #4]
80029ca: 69ba ldr r2, [r7, #24]
80029cc: 609a str r2, [r3, #8]
/* Configure the IO Output Type */
temp = GPIOx->OTYPER;
80029ce: 687b ldr r3, [r7, #4]
80029d0: 685b ldr r3, [r3, #4]
80029d2: 61bb str r3, [r7, #24]
temp &= ~(GPIO_OTYPER_OT_0 << position) ;
80029d4: 2201 movs r2, #1
80029d6: 69fb ldr r3, [r7, #28]
80029d8: fa02 f303 lsl.w r3, r2, r3
80029dc: 43db mvns r3, r3
80029de: 69ba ldr r2, [r7, #24]
80029e0: 4013 ands r3, r2
80029e2: 61bb str r3, [r7, #24]
temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
80029e4: 683b ldr r3, [r7, #0]
80029e6: 685b ldr r3, [r3, #4]
80029e8: 091b lsrs r3, r3, #4
80029ea: f003 0201 and.w r2, r3, #1
80029ee: 69fb ldr r3, [r7, #28]
80029f0: fa02 f303 lsl.w r3, r2, r3
80029f4: 69ba ldr r2, [r7, #24]
80029f6: 4313 orrs r3, r2
80029f8: 61bb str r3, [r7, #24]
GPIOx->OTYPER = temp;
80029fa: 687b ldr r3, [r7, #4]
80029fc: 69ba ldr r2, [r7, #24]
80029fe: 605a str r2, [r3, #4]
}
if((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
8002a00: 683b ldr r3, [r7, #0]
8002a02: 685b ldr r3, [r3, #4]
8002a04: f003 0303 and.w r3, r3, #3
8002a08: 2b03 cmp r3, #3
8002a0a: d017 beq.n 8002a3c <HAL_GPIO_Init+0xf0>
{
/* Check the parameters */
assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
/* Activate the Pull-up or Pull down resistor for the current IO */
temp = GPIOx->PUPDR;
8002a0c: 687b ldr r3, [r7, #4]
8002a0e: 68db ldr r3, [r3, #12]
8002a10: 61bb str r3, [r7, #24]
temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2U));
8002a12: 69fb ldr r3, [r7, #28]
8002a14: 005b lsls r3, r3, #1
8002a16: 2203 movs r2, #3
8002a18: fa02 f303 lsl.w r3, r2, r3
8002a1c: 43db mvns r3, r3
8002a1e: 69ba ldr r2, [r7, #24]
8002a20: 4013 ands r3, r2
8002a22: 61bb str r3, [r7, #24]
temp |= ((GPIO_Init->Pull) << (position * 2U));
8002a24: 683b ldr r3, [r7, #0]
8002a26: 689a ldr r2, [r3, #8]
8002a28: 69fb ldr r3, [r7, #28]
8002a2a: 005b lsls r3, r3, #1
8002a2c: fa02 f303 lsl.w r3, r2, r3
8002a30: 69ba ldr r2, [r7, #24]
8002a32: 4313 orrs r3, r2
8002a34: 61bb str r3, [r7, #24]
GPIOx->PUPDR = temp;
8002a36: 687b ldr r3, [r7, #4]
8002a38: 69ba ldr r2, [r7, #24]
8002a3a: 60da str r2, [r3, #12]
}
/* In case of Alternate function mode selection */
if((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
8002a3c: 683b ldr r3, [r7, #0]
8002a3e: 685b ldr r3, [r3, #4]
8002a40: f003 0303 and.w r3, r3, #3
8002a44: 2b02 cmp r3, #2
8002a46: d123 bne.n 8002a90 <HAL_GPIO_Init+0x144>
{
/* Check the Alternate function parameter */
assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
/* Configure Alternate function mapped with the current IO */
temp = GPIOx->AFR[position >> 3U];
8002a48: 69fb ldr r3, [r7, #28]
8002a4a: 08da lsrs r2, r3, #3
8002a4c: 687b ldr r3, [r7, #4]
8002a4e: 3208 adds r2, #8
8002a50: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8002a54: 61bb str r3, [r7, #24]
temp &= ~(0xFU << ((uint32_t)(position & 0x07U) * 4U)) ;
8002a56: 69fb ldr r3, [r7, #28]
8002a58: f003 0307 and.w r3, r3, #7
8002a5c: 009b lsls r3, r3, #2
8002a5e: 220f movs r2, #15
8002a60: fa02 f303 lsl.w r3, r2, r3
8002a64: 43db mvns r3, r3
8002a66: 69ba ldr r2, [r7, #24]
8002a68: 4013 ands r3, r2
8002a6a: 61bb str r3, [r7, #24]
temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & 0x07U) * 4U));
8002a6c: 683b ldr r3, [r7, #0]
8002a6e: 691a ldr r2, [r3, #16]
8002a70: 69fb ldr r3, [r7, #28]
8002a72: f003 0307 and.w r3, r3, #7
8002a76: 009b lsls r3, r3, #2
8002a78: fa02 f303 lsl.w r3, r2, r3
8002a7c: 69ba ldr r2, [r7, #24]
8002a7e: 4313 orrs r3, r2
8002a80: 61bb str r3, [r7, #24]
GPIOx->AFR[position >> 3U] = temp;
8002a82: 69fb ldr r3, [r7, #28]
8002a84: 08da lsrs r2, r3, #3
8002a86: 687b ldr r3, [r7, #4]
8002a88: 3208 adds r2, #8
8002a8a: 69b9 ldr r1, [r7, #24]
8002a8c: f843 1022 str.w r1, [r3, r2, lsl #2]
}
/* Configure IO Direction mode (Input, Output, Alternate or Analog) */
temp = GPIOx->MODER;
8002a90: 687b ldr r3, [r7, #4]
8002a92: 681b ldr r3, [r3, #0]
8002a94: 61bb str r3, [r7, #24]
temp &= ~(GPIO_MODER_MODER0 << (position * 2U));
8002a96: 69fb ldr r3, [r7, #28]
8002a98: 005b lsls r3, r3, #1
8002a9a: 2203 movs r2, #3
8002a9c: fa02 f303 lsl.w r3, r2, r3
8002aa0: 43db mvns r3, r3
8002aa2: 69ba ldr r2, [r7, #24]
8002aa4: 4013 ands r3, r2
8002aa6: 61bb str r3, [r7, #24]
temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U));
8002aa8: 683b ldr r3, [r7, #0]
8002aaa: 685b ldr r3, [r3, #4]
8002aac: f003 0203 and.w r2, r3, #3
8002ab0: 69fb ldr r3, [r7, #28]
8002ab2: 005b lsls r3, r3, #1
8002ab4: fa02 f303 lsl.w r3, r2, r3
8002ab8: 69ba ldr r2, [r7, #24]
8002aba: 4313 orrs r3, r2
8002abc: 61bb str r3, [r7, #24]
GPIOx->MODER = temp;
8002abe: 687b ldr r3, [r7, #4]
8002ac0: 69ba ldr r2, [r7, #24]
8002ac2: 601a str r2, [r3, #0]
/*--------------------- EXTI Mode Configuration ------------------------*/
/* Configure the External Interrupt or event for the current IO */
if((GPIO_Init->Mode & EXTI_MODE) != 0x00U)
8002ac4: 683b ldr r3, [r7, #0]
8002ac6: 685b ldr r3, [r3, #4]
8002ac8: f403 3340 and.w r3, r3, #196608 ; 0x30000
8002acc: 2b00 cmp r3, #0
8002ace: f000 80c0 beq.w 8002c52 <HAL_GPIO_Init+0x306>
{
/* Enable SYSCFG Clock */
__HAL_RCC_SYSCFG_CLK_ENABLE();
8002ad2: 2300 movs r3, #0
8002ad4: 60fb str r3, [r7, #12]
8002ad6: 4b66 ldr r3, [pc, #408] ; (8002c70 <HAL_GPIO_Init+0x324>)
8002ad8: 6c5b ldr r3, [r3, #68] ; 0x44
8002ada: 4a65 ldr r2, [pc, #404] ; (8002c70 <HAL_GPIO_Init+0x324>)
8002adc: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8002ae0: 6453 str r3, [r2, #68] ; 0x44
8002ae2: 4b63 ldr r3, [pc, #396] ; (8002c70 <HAL_GPIO_Init+0x324>)
8002ae4: 6c5b ldr r3, [r3, #68] ; 0x44
8002ae6: f403 4380 and.w r3, r3, #16384 ; 0x4000
8002aea: 60fb str r3, [r7, #12]
8002aec: 68fb ldr r3, [r7, #12]
temp = SYSCFG->EXTICR[position >> 2U];
8002aee: 4a61 ldr r2, [pc, #388] ; (8002c74 <HAL_GPIO_Init+0x328>)
8002af0: 69fb ldr r3, [r7, #28]
8002af2: 089b lsrs r3, r3, #2
8002af4: 3302 adds r3, #2
8002af6: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8002afa: 61bb str r3, [r7, #24]
temp &= ~(0x0FU << (4U * (position & 0x03U)));
8002afc: 69fb ldr r3, [r7, #28]
8002afe: f003 0303 and.w r3, r3, #3
8002b02: 009b lsls r3, r3, #2
8002b04: 220f movs r2, #15
8002b06: fa02 f303 lsl.w r3, r2, r3
8002b0a: 43db mvns r3, r3
8002b0c: 69ba ldr r2, [r7, #24]
8002b0e: 4013 ands r3, r2
8002b10: 61bb str r3, [r7, #24]
temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U)));
8002b12: 687b ldr r3, [r7, #4]
8002b14: 4a58 ldr r2, [pc, #352] ; (8002c78 <HAL_GPIO_Init+0x32c>)
8002b16: 4293 cmp r3, r2
8002b18: d037 beq.n 8002b8a <HAL_GPIO_Init+0x23e>
8002b1a: 687b ldr r3, [r7, #4]
8002b1c: 4a57 ldr r2, [pc, #348] ; (8002c7c <HAL_GPIO_Init+0x330>)
8002b1e: 4293 cmp r3, r2
8002b20: d031 beq.n 8002b86 <HAL_GPIO_Init+0x23a>
8002b22: 687b ldr r3, [r7, #4]
8002b24: 4a56 ldr r2, [pc, #344] ; (8002c80 <HAL_GPIO_Init+0x334>)
8002b26: 4293 cmp r3, r2
8002b28: d02b beq.n 8002b82 <HAL_GPIO_Init+0x236>
8002b2a: 687b ldr r3, [r7, #4]
8002b2c: 4a55 ldr r2, [pc, #340] ; (8002c84 <HAL_GPIO_Init+0x338>)
8002b2e: 4293 cmp r3, r2
8002b30: d025 beq.n 8002b7e <HAL_GPIO_Init+0x232>
8002b32: 687b ldr r3, [r7, #4]
8002b34: 4a54 ldr r2, [pc, #336] ; (8002c88 <HAL_GPIO_Init+0x33c>)
8002b36: 4293 cmp r3, r2
8002b38: d01f beq.n 8002b7a <HAL_GPIO_Init+0x22e>
8002b3a: 687b ldr r3, [r7, #4]
8002b3c: 4a53 ldr r2, [pc, #332] ; (8002c8c <HAL_GPIO_Init+0x340>)
8002b3e: 4293 cmp r3, r2
8002b40: d019 beq.n 8002b76 <HAL_GPIO_Init+0x22a>
8002b42: 687b ldr r3, [r7, #4]
8002b44: 4a52 ldr r2, [pc, #328] ; (8002c90 <HAL_GPIO_Init+0x344>)
8002b46: 4293 cmp r3, r2
8002b48: d013 beq.n 8002b72 <HAL_GPIO_Init+0x226>
8002b4a: 687b ldr r3, [r7, #4]
8002b4c: 4a51 ldr r2, [pc, #324] ; (8002c94 <HAL_GPIO_Init+0x348>)
8002b4e: 4293 cmp r3, r2
8002b50: d00d beq.n 8002b6e <HAL_GPIO_Init+0x222>
8002b52: 687b ldr r3, [r7, #4]
8002b54: 4a50 ldr r2, [pc, #320] ; (8002c98 <HAL_GPIO_Init+0x34c>)
8002b56: 4293 cmp r3, r2
8002b58: d007 beq.n 8002b6a <HAL_GPIO_Init+0x21e>
8002b5a: 687b ldr r3, [r7, #4]
8002b5c: 4a4f ldr r2, [pc, #316] ; (8002c9c <HAL_GPIO_Init+0x350>)
8002b5e: 4293 cmp r3, r2
8002b60: d101 bne.n 8002b66 <HAL_GPIO_Init+0x21a>
8002b62: 2309 movs r3, #9
8002b64: e012 b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b66: 230a movs r3, #10
8002b68: e010 b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b6a: 2308 movs r3, #8
8002b6c: e00e b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b6e: 2307 movs r3, #7
8002b70: e00c b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b72: 2306 movs r3, #6
8002b74: e00a b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b76: 2305 movs r3, #5
8002b78: e008 b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b7a: 2304 movs r3, #4
8002b7c: e006 b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b7e: 2303 movs r3, #3
8002b80: e004 b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b82: 2302 movs r3, #2
8002b84: e002 b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b86: 2301 movs r3, #1
8002b88: e000 b.n 8002b8c <HAL_GPIO_Init+0x240>
8002b8a: 2300 movs r3, #0
8002b8c: 69fa ldr r2, [r7, #28]
8002b8e: f002 0203 and.w r2, r2, #3
8002b92: 0092 lsls r2, r2, #2
8002b94: 4093 lsls r3, r2
8002b96: 69ba ldr r2, [r7, #24]
8002b98: 4313 orrs r3, r2
8002b9a: 61bb str r3, [r7, #24]
SYSCFG->EXTICR[position >> 2U] = temp;
8002b9c: 4935 ldr r1, [pc, #212] ; (8002c74 <HAL_GPIO_Init+0x328>)
8002b9e: 69fb ldr r3, [r7, #28]
8002ba0: 089b lsrs r3, r3, #2
8002ba2: 3302 adds r3, #2
8002ba4: 69ba ldr r2, [r7, #24]
8002ba6: f841 2023 str.w r2, [r1, r3, lsl #2]
/* Clear Rising Falling edge configuration */
temp = EXTI->RTSR;
8002baa: 4b3d ldr r3, [pc, #244] ; (8002ca0 <HAL_GPIO_Init+0x354>)
8002bac: 689b ldr r3, [r3, #8]
8002bae: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8002bb0: 693b ldr r3, [r7, #16]
8002bb2: 43db mvns r3, r3
8002bb4: 69ba ldr r2, [r7, #24]
8002bb6: 4013 ands r3, r2
8002bb8: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U)
8002bba: 683b ldr r3, [r7, #0]
8002bbc: 685b ldr r3, [r3, #4]
8002bbe: f403 1380 and.w r3, r3, #1048576 ; 0x100000
8002bc2: 2b00 cmp r3, #0
8002bc4: d003 beq.n 8002bce <HAL_GPIO_Init+0x282>
{
temp |= iocurrent;
8002bc6: 69ba ldr r2, [r7, #24]
8002bc8: 693b ldr r3, [r7, #16]
8002bca: 4313 orrs r3, r2
8002bcc: 61bb str r3, [r7, #24]
}
EXTI->RTSR = temp;
8002bce: 4a34 ldr r2, [pc, #208] ; (8002ca0 <HAL_GPIO_Init+0x354>)
8002bd0: 69bb ldr r3, [r7, #24]
8002bd2: 6093 str r3, [r2, #8]
temp = EXTI->FTSR;
8002bd4: 4b32 ldr r3, [pc, #200] ; (8002ca0 <HAL_GPIO_Init+0x354>)
8002bd6: 68db ldr r3, [r3, #12]
8002bd8: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8002bda: 693b ldr r3, [r7, #16]
8002bdc: 43db mvns r3, r3
8002bde: 69ba ldr r2, [r7, #24]
8002be0: 4013 ands r3, r2
8002be2: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U)
8002be4: 683b ldr r3, [r7, #0]
8002be6: 685b ldr r3, [r3, #4]
8002be8: f403 1300 and.w r3, r3, #2097152 ; 0x200000
8002bec: 2b00 cmp r3, #0
8002bee: d003 beq.n 8002bf8 <HAL_GPIO_Init+0x2ac>
{
temp |= iocurrent;
8002bf0: 69ba ldr r2, [r7, #24]
8002bf2: 693b ldr r3, [r7, #16]
8002bf4: 4313 orrs r3, r2
8002bf6: 61bb str r3, [r7, #24]
}
EXTI->FTSR = temp;
8002bf8: 4a29 ldr r2, [pc, #164] ; (8002ca0 <HAL_GPIO_Init+0x354>)
8002bfa: 69bb ldr r3, [r7, #24]
8002bfc: 60d3 str r3, [r2, #12]
temp = EXTI->EMR;
8002bfe: 4b28 ldr r3, [pc, #160] ; (8002ca0 <HAL_GPIO_Init+0x354>)
8002c00: 685b ldr r3, [r3, #4]
8002c02: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8002c04: 693b ldr r3, [r7, #16]
8002c06: 43db mvns r3, r3
8002c08: 69ba ldr r2, [r7, #24]
8002c0a: 4013 ands r3, r2
8002c0c: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
8002c0e: 683b ldr r3, [r7, #0]
8002c10: 685b ldr r3, [r3, #4]
8002c12: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002c16: 2b00 cmp r3, #0
8002c18: d003 beq.n 8002c22 <HAL_GPIO_Init+0x2d6>
{
temp |= iocurrent;
8002c1a: 69ba ldr r2, [r7, #24]
8002c1c: 693b ldr r3, [r7, #16]
8002c1e: 4313 orrs r3, r2
8002c20: 61bb str r3, [r7, #24]
}
EXTI->EMR = temp;
8002c22: 4a1f ldr r2, [pc, #124] ; (8002ca0 <HAL_GPIO_Init+0x354>)
8002c24: 69bb ldr r3, [r7, #24]
8002c26: 6053 str r3, [r2, #4]
/* Clear EXTI line configuration */
temp = EXTI->IMR;
8002c28: 4b1d ldr r3, [pc, #116] ; (8002ca0 <HAL_GPIO_Init+0x354>)
8002c2a: 681b ldr r3, [r3, #0]
8002c2c: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8002c2e: 693b ldr r3, [r7, #16]
8002c30: 43db mvns r3, r3
8002c32: 69ba ldr r2, [r7, #24]
8002c34: 4013 ands r3, r2
8002c36: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & EXTI_IT) != 0x00U)
8002c38: 683b ldr r3, [r7, #0]
8002c3a: 685b ldr r3, [r3, #4]
8002c3c: f403 3380 and.w r3, r3, #65536 ; 0x10000
8002c40: 2b00 cmp r3, #0
8002c42: d003 beq.n 8002c4c <HAL_GPIO_Init+0x300>
{
temp |= iocurrent;
8002c44: 69ba ldr r2, [r7, #24]
8002c46: 693b ldr r3, [r7, #16]
8002c48: 4313 orrs r3, r2
8002c4a: 61bb str r3, [r7, #24]
}
EXTI->IMR = temp;
8002c4c: 4a14 ldr r2, [pc, #80] ; (8002ca0 <HAL_GPIO_Init+0x354>)
8002c4e: 69bb ldr r3, [r7, #24]
8002c50: 6013 str r3, [r2, #0]
for(position = 0U; position < GPIO_NUMBER; position++)
8002c52: 69fb ldr r3, [r7, #28]
8002c54: 3301 adds r3, #1
8002c56: 61fb str r3, [r7, #28]
8002c58: 69fb ldr r3, [r7, #28]
8002c5a: 2b0f cmp r3, #15
8002c5c: f67f ae84 bls.w 8002968 <HAL_GPIO_Init+0x1c>
}
}
}
}
8002c60: bf00 nop
8002c62: bf00 nop
8002c64: 3724 adds r7, #36 ; 0x24
8002c66: 46bd mov sp, r7
8002c68: f85d 7b04 ldr.w r7, [sp], #4
8002c6c: 4770 bx lr
8002c6e: bf00 nop
8002c70: 40023800 .word 0x40023800
8002c74: 40013800 .word 0x40013800
8002c78: 40020000 .word 0x40020000
8002c7c: 40020400 .word 0x40020400
8002c80: 40020800 .word 0x40020800
8002c84: 40020c00 .word 0x40020c00
8002c88: 40021000 .word 0x40021000
8002c8c: 40021400 .word 0x40021400
8002c90: 40021800 .word 0x40021800
8002c94: 40021c00 .word 0x40021c00
8002c98: 40022000 .word 0x40022000
8002c9c: 40022400 .word 0x40022400
8002ca0: 40013c00 .word 0x40013c00
08002ca4 <HAL_GPIO_WritePin>:
* @arg GPIO_PIN_RESET: to clear the port pin
* @arg GPIO_PIN_SET: to set the port pin
* @retval None
*/
void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
{
8002ca4: b480 push {r7}
8002ca6: b083 sub sp, #12
8002ca8: af00 add r7, sp, #0
8002caa: 6078 str r0, [r7, #4]
8002cac: 460b mov r3, r1
8002cae: 807b strh r3, [r7, #2]
8002cb0: 4613 mov r3, r2
8002cb2: 707b strb r3, [r7, #1]
/* Check the parameters */
assert_param(IS_GPIO_PIN(GPIO_Pin));
assert_param(IS_GPIO_PIN_ACTION(PinState));
if(PinState != GPIO_PIN_RESET)
8002cb4: 787b ldrb r3, [r7, #1]
8002cb6: 2b00 cmp r3, #0
8002cb8: d003 beq.n 8002cc2 <HAL_GPIO_WritePin+0x1e>
{
GPIOx->BSRR = GPIO_Pin;
8002cba: 887a ldrh r2, [r7, #2]
8002cbc: 687b ldr r3, [r7, #4]
8002cbe: 619a str r2, [r3, #24]
}
else
{
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
}
}
8002cc0: e003 b.n 8002cca <HAL_GPIO_WritePin+0x26>
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
8002cc2: 887b ldrh r3, [r7, #2]
8002cc4: 041a lsls r2, r3, #16
8002cc6: 687b ldr r3, [r7, #4]
8002cc8: 619a str r2, [r3, #24]
}
8002cca: bf00 nop
8002ccc: 370c adds r7, #12
8002cce: 46bd mov sp, r7
8002cd0: f85d 7b04 ldr.w r7, [sp], #4
8002cd4: 4770 bx lr
...
08002cd8 <HAL_RCC_OscConfig>:
* supported by this API. User should request a transition to HSE Off
* first and then HSE On or HSE Bypass.
* @retval HAL status
*/
__weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
{
8002cd8: b580 push {r7, lr}
8002cda: b086 sub sp, #24
8002cdc: af00 add r7, sp, #0
8002cde: 6078 str r0, [r7, #4]
uint32_t tickstart, pll_config;
/* Check Null pointer */
if(RCC_OscInitStruct == NULL)
8002ce0: 687b ldr r3, [r7, #4]
8002ce2: 2b00 cmp r3, #0
8002ce4: d101 bne.n 8002cea <HAL_RCC_OscConfig+0x12>
{
return HAL_ERROR;
8002ce6: 2301 movs r3, #1
8002ce8: e267 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
}
/* Check the parameters */
assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
/*------------------------------- HSE Configuration ------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
8002cea: 687b ldr r3, [r7, #4]
8002cec: 681b ldr r3, [r3, #0]
8002cee: f003 0301 and.w r3, r3, #1
8002cf2: 2b00 cmp r3, #0
8002cf4: d075 beq.n 8002de2 <HAL_RCC_OscConfig+0x10a>
{
/* Check the parameters */
assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
/* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
8002cf6: 4b88 ldr r3, [pc, #544] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002cf8: 689b ldr r3, [r3, #8]
8002cfa: f003 030c and.w r3, r3, #12
8002cfe: 2b04 cmp r3, #4
8002d00: d00c beq.n 8002d1c <HAL_RCC_OscConfig+0x44>
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
8002d02: 4b85 ldr r3, [pc, #532] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d04: 689b ldr r3, [r3, #8]
8002d06: f003 030c and.w r3, r3, #12
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
8002d0a: 2b08 cmp r3, #8
8002d0c: d112 bne.n 8002d34 <HAL_RCC_OscConfig+0x5c>
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
8002d0e: 4b82 ldr r3, [pc, #520] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d10: 685b ldr r3, [r3, #4]
8002d12: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8002d16: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
8002d1a: d10b bne.n 8002d34 <HAL_RCC_OscConfig+0x5c>
{
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
8002d1c: 4b7e ldr r3, [pc, #504] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d1e: 681b ldr r3, [r3, #0]
8002d20: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002d24: 2b00 cmp r3, #0
8002d26: d05b beq.n 8002de0 <HAL_RCC_OscConfig+0x108>
8002d28: 687b ldr r3, [r7, #4]
8002d2a: 685b ldr r3, [r3, #4]
8002d2c: 2b00 cmp r3, #0
8002d2e: d157 bne.n 8002de0 <HAL_RCC_OscConfig+0x108>
{
return HAL_ERROR;
8002d30: 2301 movs r3, #1
8002d32: e242 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
}
}
else
{
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
8002d34: 687b ldr r3, [r7, #4]
8002d36: 685b ldr r3, [r3, #4]
8002d38: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8002d3c: d106 bne.n 8002d4c <HAL_RCC_OscConfig+0x74>
8002d3e: 4b76 ldr r3, [pc, #472] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d40: 681b ldr r3, [r3, #0]
8002d42: 4a75 ldr r2, [pc, #468] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d44: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8002d48: 6013 str r3, [r2, #0]
8002d4a: e01d b.n 8002d88 <HAL_RCC_OscConfig+0xb0>
8002d4c: 687b ldr r3, [r7, #4]
8002d4e: 685b ldr r3, [r3, #4]
8002d50: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000
8002d54: d10c bne.n 8002d70 <HAL_RCC_OscConfig+0x98>
8002d56: 4b70 ldr r3, [pc, #448] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d58: 681b ldr r3, [r3, #0]
8002d5a: 4a6f ldr r2, [pc, #444] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d5c: f443 2380 orr.w r3, r3, #262144 ; 0x40000
8002d60: 6013 str r3, [r2, #0]
8002d62: 4b6d ldr r3, [pc, #436] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d64: 681b ldr r3, [r3, #0]
8002d66: 4a6c ldr r2, [pc, #432] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d68: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8002d6c: 6013 str r3, [r2, #0]
8002d6e: e00b b.n 8002d88 <HAL_RCC_OscConfig+0xb0>
8002d70: 4b69 ldr r3, [pc, #420] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d72: 681b ldr r3, [r3, #0]
8002d74: 4a68 ldr r2, [pc, #416] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d76: f423 3380 bic.w r3, r3, #65536 ; 0x10000
8002d7a: 6013 str r3, [r2, #0]
8002d7c: 4b66 ldr r3, [pc, #408] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d7e: 681b ldr r3, [r3, #0]
8002d80: 4a65 ldr r2, [pc, #404] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002d82: f423 2380 bic.w r3, r3, #262144 ; 0x40000
8002d86: 6013 str r3, [r2, #0]
/* Check the HSE State */
if((RCC_OscInitStruct->HSEState) != RCC_HSE_OFF)
8002d88: 687b ldr r3, [r7, #4]
8002d8a: 685b ldr r3, [r3, #4]
8002d8c: 2b00 cmp r3, #0
8002d8e: d013 beq.n 8002db8 <HAL_RCC_OscConfig+0xe0>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8002d90: f7fe fbd0 bl 8001534 <HAL_GetTick>
8002d94: 6138 str r0, [r7, #16]
/* Wait till HSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8002d96: e008 b.n 8002daa <HAL_RCC_OscConfig+0xd2>
{
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
8002d98: f7fe fbcc bl 8001534 <HAL_GetTick>
8002d9c: 4602 mov r2, r0
8002d9e: 693b ldr r3, [r7, #16]
8002da0: 1ad3 subs r3, r2, r3
8002da2: 2b64 cmp r3, #100 ; 0x64
8002da4: d901 bls.n 8002daa <HAL_RCC_OscConfig+0xd2>
{
return HAL_TIMEOUT;
8002da6: 2303 movs r3, #3
8002da8: e207 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8002daa: 4b5b ldr r3, [pc, #364] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002dac: 681b ldr r3, [r3, #0]
8002dae: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002db2: 2b00 cmp r3, #0
8002db4: d0f0 beq.n 8002d98 <HAL_RCC_OscConfig+0xc0>
8002db6: e014 b.n 8002de2 <HAL_RCC_OscConfig+0x10a>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8002db8: f7fe fbbc bl 8001534 <HAL_GetTick>
8002dbc: 6138 str r0, [r7, #16]
/* Wait till HSE is bypassed or disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
8002dbe: e008 b.n 8002dd2 <HAL_RCC_OscConfig+0xfa>
{
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
8002dc0: f7fe fbb8 bl 8001534 <HAL_GetTick>
8002dc4: 4602 mov r2, r0
8002dc6: 693b ldr r3, [r7, #16]
8002dc8: 1ad3 subs r3, r2, r3
8002dca: 2b64 cmp r3, #100 ; 0x64
8002dcc: d901 bls.n 8002dd2 <HAL_RCC_OscConfig+0xfa>
{
return HAL_TIMEOUT;
8002dce: 2303 movs r3, #3
8002dd0: e1f3 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
8002dd2: 4b51 ldr r3, [pc, #324] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002dd4: 681b ldr r3, [r3, #0]
8002dd6: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002dda: 2b00 cmp r3, #0
8002ddc: d1f0 bne.n 8002dc0 <HAL_RCC_OscConfig+0xe8>
8002dde: e000 b.n 8002de2 <HAL_RCC_OscConfig+0x10a>
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
8002de0: bf00 nop
}
}
}
}
/*----------------------------- HSI Configuration --------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
8002de2: 687b ldr r3, [r7, #4]
8002de4: 681b ldr r3, [r3, #0]
8002de6: f003 0302 and.w r3, r3, #2
8002dea: 2b00 cmp r3, #0
8002dec: d063 beq.n 8002eb6 <HAL_RCC_OscConfig+0x1de>
/* Check the parameters */
assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
/* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
8002dee: 4b4a ldr r3, [pc, #296] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002df0: 689b ldr r3, [r3, #8]
8002df2: f003 030c and.w r3, r3, #12
8002df6: 2b00 cmp r3, #0
8002df8: d00b beq.n 8002e12 <HAL_RCC_OscConfig+0x13a>
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
8002dfa: 4b47 ldr r3, [pc, #284] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002dfc: 689b ldr r3, [r3, #8]
8002dfe: f003 030c and.w r3, r3, #12
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
8002e02: 2b08 cmp r3, #8
8002e04: d11c bne.n 8002e40 <HAL_RCC_OscConfig+0x168>
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
8002e06: 4b44 ldr r3, [pc, #272] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002e08: 685b ldr r3, [r3, #4]
8002e0a: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8002e0e: 2b00 cmp r3, #0
8002e10: d116 bne.n 8002e40 <HAL_RCC_OscConfig+0x168>
{
/* When HSI is used as system clock it will not disabled */
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
8002e12: 4b41 ldr r3, [pc, #260] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002e14: 681b ldr r3, [r3, #0]
8002e16: f003 0302 and.w r3, r3, #2
8002e1a: 2b00 cmp r3, #0
8002e1c: d005 beq.n 8002e2a <HAL_RCC_OscConfig+0x152>
8002e1e: 687b ldr r3, [r7, #4]
8002e20: 68db ldr r3, [r3, #12]
8002e22: 2b01 cmp r3, #1
8002e24: d001 beq.n 8002e2a <HAL_RCC_OscConfig+0x152>
{
return HAL_ERROR;
8002e26: 2301 movs r3, #1
8002e28: e1c7 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
}
/* Otherwise, just the calibration is allowed */
else
{
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
8002e2a: 4b3b ldr r3, [pc, #236] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002e2c: 681b ldr r3, [r3, #0]
8002e2e: f023 02f8 bic.w r2, r3, #248 ; 0xf8
8002e32: 687b ldr r3, [r7, #4]
8002e34: 691b ldr r3, [r3, #16]
8002e36: 00db lsls r3, r3, #3
8002e38: 4937 ldr r1, [pc, #220] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002e3a: 4313 orrs r3, r2
8002e3c: 600b str r3, [r1, #0]
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
8002e3e: e03a b.n 8002eb6 <HAL_RCC_OscConfig+0x1de>
}
}
else
{
/* Check the HSI State */
if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF)
8002e40: 687b ldr r3, [r7, #4]
8002e42: 68db ldr r3, [r3, #12]
8002e44: 2b00 cmp r3, #0
8002e46: d020 beq.n 8002e8a <HAL_RCC_OscConfig+0x1b2>
{
/* Enable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_ENABLE();
8002e48: 4b34 ldr r3, [pc, #208] ; (8002f1c <HAL_RCC_OscConfig+0x244>)
8002e4a: 2201 movs r2, #1
8002e4c: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8002e4e: f7fe fb71 bl 8001534 <HAL_GetTick>
8002e52: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8002e54: e008 b.n 8002e68 <HAL_RCC_OscConfig+0x190>
{
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
8002e56: f7fe fb6d bl 8001534 <HAL_GetTick>
8002e5a: 4602 mov r2, r0
8002e5c: 693b ldr r3, [r7, #16]
8002e5e: 1ad3 subs r3, r2, r3
8002e60: 2b02 cmp r3, #2
8002e62: d901 bls.n 8002e68 <HAL_RCC_OscConfig+0x190>
{
return HAL_TIMEOUT;
8002e64: 2303 movs r3, #3
8002e66: e1a8 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8002e68: 4b2b ldr r3, [pc, #172] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002e6a: 681b ldr r3, [r3, #0]
8002e6c: f003 0302 and.w r3, r3, #2
8002e70: 2b00 cmp r3, #0
8002e72: d0f0 beq.n 8002e56 <HAL_RCC_OscConfig+0x17e>
}
}
/* Adjusts the Internal High Speed oscillator (HSI) calibration value. */
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
8002e74: 4b28 ldr r3, [pc, #160] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002e76: 681b ldr r3, [r3, #0]
8002e78: f023 02f8 bic.w r2, r3, #248 ; 0xf8
8002e7c: 687b ldr r3, [r7, #4]
8002e7e: 691b ldr r3, [r3, #16]
8002e80: 00db lsls r3, r3, #3
8002e82: 4925 ldr r1, [pc, #148] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002e84: 4313 orrs r3, r2
8002e86: 600b str r3, [r1, #0]
8002e88: e015 b.n 8002eb6 <HAL_RCC_OscConfig+0x1de>
}
else
{
/* Disable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_DISABLE();
8002e8a: 4b24 ldr r3, [pc, #144] ; (8002f1c <HAL_RCC_OscConfig+0x244>)
8002e8c: 2200 movs r2, #0
8002e8e: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8002e90: f7fe fb50 bl 8001534 <HAL_GetTick>
8002e94: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
8002e96: e008 b.n 8002eaa <HAL_RCC_OscConfig+0x1d2>
{
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
8002e98: f7fe fb4c bl 8001534 <HAL_GetTick>
8002e9c: 4602 mov r2, r0
8002e9e: 693b ldr r3, [r7, #16]
8002ea0: 1ad3 subs r3, r2, r3
8002ea2: 2b02 cmp r3, #2
8002ea4: d901 bls.n 8002eaa <HAL_RCC_OscConfig+0x1d2>
{
return HAL_TIMEOUT;
8002ea6: 2303 movs r3, #3
8002ea8: e187 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
8002eaa: 4b1b ldr r3, [pc, #108] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002eac: 681b ldr r3, [r3, #0]
8002eae: f003 0302 and.w r3, r3, #2
8002eb2: 2b00 cmp r3, #0
8002eb4: d1f0 bne.n 8002e98 <HAL_RCC_OscConfig+0x1c0>
}
}
}
}
/*------------------------------ LSI Configuration -------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
8002eb6: 687b ldr r3, [r7, #4]
8002eb8: 681b ldr r3, [r3, #0]
8002eba: f003 0308 and.w r3, r3, #8
8002ebe: 2b00 cmp r3, #0
8002ec0: d036 beq.n 8002f30 <HAL_RCC_OscConfig+0x258>
{
/* Check the parameters */
assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
/* Check the LSI State */
if((RCC_OscInitStruct->LSIState)!= RCC_LSI_OFF)
8002ec2: 687b ldr r3, [r7, #4]
8002ec4: 695b ldr r3, [r3, #20]
8002ec6: 2b00 cmp r3, #0
8002ec8: d016 beq.n 8002ef8 <HAL_RCC_OscConfig+0x220>
{
/* Enable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_ENABLE();
8002eca: 4b15 ldr r3, [pc, #84] ; (8002f20 <HAL_RCC_OscConfig+0x248>)
8002ecc: 2201 movs r2, #1
8002ece: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8002ed0: f7fe fb30 bl 8001534 <HAL_GetTick>
8002ed4: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
8002ed6: e008 b.n 8002eea <HAL_RCC_OscConfig+0x212>
{
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
8002ed8: f7fe fb2c bl 8001534 <HAL_GetTick>
8002edc: 4602 mov r2, r0
8002ede: 693b ldr r3, [r7, #16]
8002ee0: 1ad3 subs r3, r2, r3
8002ee2: 2b02 cmp r3, #2
8002ee4: d901 bls.n 8002eea <HAL_RCC_OscConfig+0x212>
{
return HAL_TIMEOUT;
8002ee6: 2303 movs r3, #3
8002ee8: e167 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
8002eea: 4b0b ldr r3, [pc, #44] ; (8002f18 <HAL_RCC_OscConfig+0x240>)
8002eec: 6f5b ldr r3, [r3, #116] ; 0x74
8002eee: f003 0302 and.w r3, r3, #2
8002ef2: 2b00 cmp r3, #0
8002ef4: d0f0 beq.n 8002ed8 <HAL_RCC_OscConfig+0x200>
8002ef6: e01b b.n 8002f30 <HAL_RCC_OscConfig+0x258>
}
}
else
{
/* Disable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_DISABLE();
8002ef8: 4b09 ldr r3, [pc, #36] ; (8002f20 <HAL_RCC_OscConfig+0x248>)
8002efa: 2200 movs r2, #0
8002efc: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002efe: f7fe fb19 bl 8001534 <HAL_GetTick>
8002f02: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
8002f04: e00e b.n 8002f24 <HAL_RCC_OscConfig+0x24c>
{
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
8002f06: f7fe fb15 bl 8001534 <HAL_GetTick>
8002f0a: 4602 mov r2, r0
8002f0c: 693b ldr r3, [r7, #16]
8002f0e: 1ad3 subs r3, r2, r3
8002f10: 2b02 cmp r3, #2
8002f12: d907 bls.n 8002f24 <HAL_RCC_OscConfig+0x24c>
{
return HAL_TIMEOUT;
8002f14: 2303 movs r3, #3
8002f16: e150 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
8002f18: 40023800 .word 0x40023800
8002f1c: 42470000 .word 0x42470000
8002f20: 42470e80 .word 0x42470e80
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
8002f24: 4b88 ldr r3, [pc, #544] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002f26: 6f5b ldr r3, [r3, #116] ; 0x74
8002f28: f003 0302 and.w r3, r3, #2
8002f2c: 2b00 cmp r3, #0
8002f2e: d1ea bne.n 8002f06 <HAL_RCC_OscConfig+0x22e>
}
}
}
}
/*------------------------------ LSE Configuration -------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
8002f30: 687b ldr r3, [r7, #4]
8002f32: 681b ldr r3, [r3, #0]
8002f34: f003 0304 and.w r3, r3, #4
8002f38: 2b00 cmp r3, #0
8002f3a: f000 8097 beq.w 800306c <HAL_RCC_OscConfig+0x394>
{
FlagStatus pwrclkchanged = RESET;
8002f3e: 2300 movs r3, #0
8002f40: 75fb strb r3, [r7, #23]
/* Check the parameters */
assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState));
/* Update LSE configuration in Backup Domain control register */
/* Requires to enable write access to Backup Domain of necessary */
if(__HAL_RCC_PWR_IS_CLK_DISABLED())
8002f42: 4b81 ldr r3, [pc, #516] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002f44: 6c1b ldr r3, [r3, #64] ; 0x40
8002f46: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8002f4a: 2b00 cmp r3, #0
8002f4c: d10f bne.n 8002f6e <HAL_RCC_OscConfig+0x296>
{
__HAL_RCC_PWR_CLK_ENABLE();
8002f4e: 2300 movs r3, #0
8002f50: 60bb str r3, [r7, #8]
8002f52: 4b7d ldr r3, [pc, #500] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002f54: 6c1b ldr r3, [r3, #64] ; 0x40
8002f56: 4a7c ldr r2, [pc, #496] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002f58: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8002f5c: 6413 str r3, [r2, #64] ; 0x40
8002f5e: 4b7a ldr r3, [pc, #488] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002f60: 6c1b ldr r3, [r3, #64] ; 0x40
8002f62: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8002f66: 60bb str r3, [r7, #8]
8002f68: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
8002f6a: 2301 movs r3, #1
8002f6c: 75fb strb r3, [r7, #23]
}
if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002f6e: 4b77 ldr r3, [pc, #476] ; (800314c <HAL_RCC_OscConfig+0x474>)
8002f70: 681b ldr r3, [r3, #0]
8002f72: f403 7380 and.w r3, r3, #256 ; 0x100
8002f76: 2b00 cmp r3, #0
8002f78: d118 bne.n 8002fac <HAL_RCC_OscConfig+0x2d4>
{
/* Enable write access to Backup domain */
SET_BIT(PWR->CR, PWR_CR_DBP);
8002f7a: 4b74 ldr r3, [pc, #464] ; (800314c <HAL_RCC_OscConfig+0x474>)
8002f7c: 681b ldr r3, [r3, #0]
8002f7e: 4a73 ldr r2, [pc, #460] ; (800314c <HAL_RCC_OscConfig+0x474>)
8002f80: f443 7380 orr.w r3, r3, #256 ; 0x100
8002f84: 6013 str r3, [r2, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
8002f86: f7fe fad5 bl 8001534 <HAL_GetTick>
8002f8a: 6138 str r0, [r7, #16]
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002f8c: e008 b.n 8002fa0 <HAL_RCC_OscConfig+0x2c8>
{
if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
8002f8e: f7fe fad1 bl 8001534 <HAL_GetTick>
8002f92: 4602 mov r2, r0
8002f94: 693b ldr r3, [r7, #16]
8002f96: 1ad3 subs r3, r2, r3
8002f98: 2b02 cmp r3, #2
8002f9a: d901 bls.n 8002fa0 <HAL_RCC_OscConfig+0x2c8>
{
return HAL_TIMEOUT;
8002f9c: 2303 movs r3, #3
8002f9e: e10c b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002fa0: 4b6a ldr r3, [pc, #424] ; (800314c <HAL_RCC_OscConfig+0x474>)
8002fa2: 681b ldr r3, [r3, #0]
8002fa4: f403 7380 and.w r3, r3, #256 ; 0x100
8002fa8: 2b00 cmp r3, #0
8002faa: d0f0 beq.n 8002f8e <HAL_RCC_OscConfig+0x2b6>
}
}
}
/* Set the new LSE configuration -----------------------------------------*/
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
8002fac: 687b ldr r3, [r7, #4]
8002fae: 689b ldr r3, [r3, #8]
8002fb0: 2b01 cmp r3, #1
8002fb2: d106 bne.n 8002fc2 <HAL_RCC_OscConfig+0x2ea>
8002fb4: 4b64 ldr r3, [pc, #400] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002fb6: 6f1b ldr r3, [r3, #112] ; 0x70
8002fb8: 4a63 ldr r2, [pc, #396] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002fba: f043 0301 orr.w r3, r3, #1
8002fbe: 6713 str r3, [r2, #112] ; 0x70
8002fc0: e01c b.n 8002ffc <HAL_RCC_OscConfig+0x324>
8002fc2: 687b ldr r3, [r7, #4]
8002fc4: 689b ldr r3, [r3, #8]
8002fc6: 2b05 cmp r3, #5
8002fc8: d10c bne.n 8002fe4 <HAL_RCC_OscConfig+0x30c>
8002fca: 4b5f ldr r3, [pc, #380] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002fcc: 6f1b ldr r3, [r3, #112] ; 0x70
8002fce: 4a5e ldr r2, [pc, #376] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002fd0: f043 0304 orr.w r3, r3, #4
8002fd4: 6713 str r3, [r2, #112] ; 0x70
8002fd6: 4b5c ldr r3, [pc, #368] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002fd8: 6f1b ldr r3, [r3, #112] ; 0x70
8002fda: 4a5b ldr r2, [pc, #364] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002fdc: f043 0301 orr.w r3, r3, #1
8002fe0: 6713 str r3, [r2, #112] ; 0x70
8002fe2: e00b b.n 8002ffc <HAL_RCC_OscConfig+0x324>
8002fe4: 4b58 ldr r3, [pc, #352] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002fe6: 6f1b ldr r3, [r3, #112] ; 0x70
8002fe8: 4a57 ldr r2, [pc, #348] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002fea: f023 0301 bic.w r3, r3, #1
8002fee: 6713 str r3, [r2, #112] ; 0x70
8002ff0: 4b55 ldr r3, [pc, #340] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002ff2: 6f1b ldr r3, [r3, #112] ; 0x70
8002ff4: 4a54 ldr r2, [pc, #336] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8002ff6: f023 0304 bic.w r3, r3, #4
8002ffa: 6713 str r3, [r2, #112] ; 0x70
/* Check the LSE State */
if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
8002ffc: 687b ldr r3, [r7, #4]
8002ffe: 689b ldr r3, [r3, #8]
8003000: 2b00 cmp r3, #0
8003002: d015 beq.n 8003030 <HAL_RCC_OscConfig+0x358>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003004: f7fe fa96 bl 8001534 <HAL_GetTick>
8003008: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
800300a: e00a b.n 8003022 <HAL_RCC_OscConfig+0x34a>
{
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
800300c: f7fe fa92 bl 8001534 <HAL_GetTick>
8003010: 4602 mov r2, r0
8003012: 693b ldr r3, [r7, #16]
8003014: 1ad3 subs r3, r2, r3
8003016: f241 3288 movw r2, #5000 ; 0x1388
800301a: 4293 cmp r3, r2
800301c: d901 bls.n 8003022 <HAL_RCC_OscConfig+0x34a>
{
return HAL_TIMEOUT;
800301e: 2303 movs r3, #3
8003020: e0cb b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8003022: 4b49 ldr r3, [pc, #292] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8003024: 6f1b ldr r3, [r3, #112] ; 0x70
8003026: f003 0302 and.w r3, r3, #2
800302a: 2b00 cmp r3, #0
800302c: d0ee beq.n 800300c <HAL_RCC_OscConfig+0x334>
800302e: e014 b.n 800305a <HAL_RCC_OscConfig+0x382>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8003030: f7fe fa80 bl 8001534 <HAL_GetTick>
8003034: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
8003036: e00a b.n 800304e <HAL_RCC_OscConfig+0x376>
{
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
8003038: f7fe fa7c bl 8001534 <HAL_GetTick>
800303c: 4602 mov r2, r0
800303e: 693b ldr r3, [r7, #16]
8003040: 1ad3 subs r3, r2, r3
8003042: f241 3288 movw r2, #5000 ; 0x1388
8003046: 4293 cmp r3, r2
8003048: d901 bls.n 800304e <HAL_RCC_OscConfig+0x376>
{
return HAL_TIMEOUT;
800304a: 2303 movs r3, #3
800304c: e0b5 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
800304e: 4b3e ldr r3, [pc, #248] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8003050: 6f1b ldr r3, [r3, #112] ; 0x70
8003052: f003 0302 and.w r3, r3, #2
8003056: 2b00 cmp r3, #0
8003058: d1ee bne.n 8003038 <HAL_RCC_OscConfig+0x360>
}
}
}
/* Restore clock configuration if changed */
if(pwrclkchanged == SET)
800305a: 7dfb ldrb r3, [r7, #23]
800305c: 2b01 cmp r3, #1
800305e: d105 bne.n 800306c <HAL_RCC_OscConfig+0x394>
{
__HAL_RCC_PWR_CLK_DISABLE();
8003060: 4b39 ldr r3, [pc, #228] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8003062: 6c1b ldr r3, [r3, #64] ; 0x40
8003064: 4a38 ldr r2, [pc, #224] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8003066: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
800306a: 6413 str r3, [r2, #64] ; 0x40
}
}
/*-------------------------------- PLL Configuration -----------------------*/
/* Check the parameters */
assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE)
800306c: 687b ldr r3, [r7, #4]
800306e: 699b ldr r3, [r3, #24]
8003070: 2b00 cmp r3, #0
8003072: f000 80a1 beq.w 80031b8 <HAL_RCC_OscConfig+0x4e0>
{
/* Check if the PLL is used as system clock or not */
if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL)
8003076: 4b34 ldr r3, [pc, #208] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8003078: 689b ldr r3, [r3, #8]
800307a: f003 030c and.w r3, r3, #12
800307e: 2b08 cmp r3, #8
8003080: d05c beq.n 800313c <HAL_RCC_OscConfig+0x464>
{
if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
8003082: 687b ldr r3, [r7, #4]
8003084: 699b ldr r3, [r3, #24]
8003086: 2b02 cmp r3, #2
8003088: d141 bne.n 800310e <HAL_RCC_OscConfig+0x436>
assert_param(IS_RCC_PLLN_VALUE(RCC_OscInitStruct->PLL.PLLN));
assert_param(IS_RCC_PLLP_VALUE(RCC_OscInitStruct->PLL.PLLP));
assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ));
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
800308a: 4b31 ldr r3, [pc, #196] ; (8003150 <HAL_RCC_OscConfig+0x478>)
800308c: 2200 movs r2, #0
800308e: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8003090: f7fe fa50 bl 8001534 <HAL_GetTick>
8003094: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8003096: e008 b.n 80030aa <HAL_RCC_OscConfig+0x3d2>
{
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
8003098: f7fe fa4c bl 8001534 <HAL_GetTick>
800309c: 4602 mov r2, r0
800309e: 693b ldr r3, [r7, #16]
80030a0: 1ad3 subs r3, r2, r3
80030a2: 2b02 cmp r3, #2
80030a4: d901 bls.n 80030aa <HAL_RCC_OscConfig+0x3d2>
{
return HAL_TIMEOUT;
80030a6: 2303 movs r3, #3
80030a8: e087 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
80030aa: 4b27 ldr r3, [pc, #156] ; (8003148 <HAL_RCC_OscConfig+0x470>)
80030ac: 681b ldr r3, [r3, #0]
80030ae: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
80030b2: 2b00 cmp r3, #0
80030b4: d1f0 bne.n 8003098 <HAL_RCC_OscConfig+0x3c0>
}
}
/* Configure the main PLL clock source, multiplication and division factors. */
WRITE_REG(RCC->PLLCFGR, (RCC_OscInitStruct->PLL.PLLSource | \
80030b6: 687b ldr r3, [r7, #4]
80030b8: 69da ldr r2, [r3, #28]
80030ba: 687b ldr r3, [r7, #4]
80030bc: 6a1b ldr r3, [r3, #32]
80030be: 431a orrs r2, r3
80030c0: 687b ldr r3, [r7, #4]
80030c2: 6a5b ldr r3, [r3, #36] ; 0x24
80030c4: 019b lsls r3, r3, #6
80030c6: 431a orrs r2, r3
80030c8: 687b ldr r3, [r7, #4]
80030ca: 6a9b ldr r3, [r3, #40] ; 0x28
80030cc: 085b lsrs r3, r3, #1
80030ce: 3b01 subs r3, #1
80030d0: 041b lsls r3, r3, #16
80030d2: 431a orrs r2, r3
80030d4: 687b ldr r3, [r7, #4]
80030d6: 6adb ldr r3, [r3, #44] ; 0x2c
80030d8: 061b lsls r3, r3, #24
80030da: 491b ldr r1, [pc, #108] ; (8003148 <HAL_RCC_OscConfig+0x470>)
80030dc: 4313 orrs r3, r2
80030de: 604b str r3, [r1, #4]
RCC_OscInitStruct->PLL.PLLM | \
(RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos) | \
(((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos) | \
(RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)));
/* Enable the main PLL. */
__HAL_RCC_PLL_ENABLE();
80030e0: 4b1b ldr r3, [pc, #108] ; (8003150 <HAL_RCC_OscConfig+0x478>)
80030e2: 2201 movs r2, #1
80030e4: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
80030e6: f7fe fa25 bl 8001534 <HAL_GetTick>
80030ea: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
80030ec: e008 b.n 8003100 <HAL_RCC_OscConfig+0x428>
{
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
80030ee: f7fe fa21 bl 8001534 <HAL_GetTick>
80030f2: 4602 mov r2, r0
80030f4: 693b ldr r3, [r7, #16]
80030f6: 1ad3 subs r3, r2, r3
80030f8: 2b02 cmp r3, #2
80030fa: d901 bls.n 8003100 <HAL_RCC_OscConfig+0x428>
{
return HAL_TIMEOUT;
80030fc: 2303 movs r3, #3
80030fe: e05c b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8003100: 4b11 ldr r3, [pc, #68] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8003102: 681b ldr r3, [r3, #0]
8003104: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8003108: 2b00 cmp r3, #0
800310a: d0f0 beq.n 80030ee <HAL_RCC_OscConfig+0x416>
800310c: e054 b.n 80031b8 <HAL_RCC_OscConfig+0x4e0>
}
}
else
{
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
800310e: 4b10 ldr r3, [pc, #64] ; (8003150 <HAL_RCC_OscConfig+0x478>)
8003110: 2200 movs r2, #0
8003112: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8003114: f7fe fa0e bl 8001534 <HAL_GetTick>
8003118: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
800311a: e008 b.n 800312e <HAL_RCC_OscConfig+0x456>
{
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
800311c: f7fe fa0a bl 8001534 <HAL_GetTick>
8003120: 4602 mov r2, r0
8003122: 693b ldr r3, [r7, #16]
8003124: 1ad3 subs r3, r2, r3
8003126: 2b02 cmp r3, #2
8003128: d901 bls.n 800312e <HAL_RCC_OscConfig+0x456>
{
return HAL_TIMEOUT;
800312a: 2303 movs r3, #3
800312c: e045 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
800312e: 4b06 ldr r3, [pc, #24] ; (8003148 <HAL_RCC_OscConfig+0x470>)
8003130: 681b ldr r3, [r3, #0]
8003132: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8003136: 2b00 cmp r3, #0
8003138: d1f0 bne.n 800311c <HAL_RCC_OscConfig+0x444>
800313a: e03d b.n 80031b8 <HAL_RCC_OscConfig+0x4e0>
}
}
else
{
/* Check if there is a request to disable the PLL used as System clock source */
if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
800313c: 687b ldr r3, [r7, #4]
800313e: 699b ldr r3, [r3, #24]
8003140: 2b01 cmp r3, #1
8003142: d107 bne.n 8003154 <HAL_RCC_OscConfig+0x47c>
{
return HAL_ERROR;
8003144: 2301 movs r3, #1
8003146: e038 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
8003148: 40023800 .word 0x40023800
800314c: 40007000 .word 0x40007000
8003150: 42470060 .word 0x42470060
}
else
{
/* Do not return HAL_ERROR if request repeats the current configuration */
pll_config = RCC->PLLCFGR;
8003154: 4b1b ldr r3, [pc, #108] ; (80031c4 <HAL_RCC_OscConfig+0x4ec>)
8003156: 685b ldr r3, [r3, #4]
8003158: 60fb str r3, [r7, #12]
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)) ||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLR) != (RCC_OscInitStruct->PLL.PLLR << RCC_PLLCFGR_PLLR_Pos)))
#else
if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
800315a: 687b ldr r3, [r7, #4]
800315c: 699b ldr r3, [r3, #24]
800315e: 2b01 cmp r3, #1
8003160: d028 beq.n 80031b4 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
8003162: 68fb ldr r3, [r7, #12]
8003164: f403 0280 and.w r2, r3, #4194304 ; 0x400000
8003168: 687b ldr r3, [r7, #4]
800316a: 69db ldr r3, [r3, #28]
if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
800316c: 429a cmp r2, r3
800316e: d121 bne.n 80031b4 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
8003170: 68fb ldr r3, [r7, #12]
8003172: f003 023f and.w r2, r3, #63 ; 0x3f
8003176: 687b ldr r3, [r7, #4]
8003178: 6a1b ldr r3, [r3, #32]
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
800317a: 429a cmp r2, r3
800317c: d11a bne.n 80031b4 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
800317e: 68fa ldr r2, [r7, #12]
8003180: f647 73c0 movw r3, #32704 ; 0x7fc0
8003184: 4013 ands r3, r2
8003186: 687a ldr r2, [r7, #4]
8003188: 6a52 ldr r2, [r2, #36] ; 0x24
800318a: 0192 lsls r2, r2, #6
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
800318c: 4293 cmp r3, r2
800318e: d111 bne.n 80031b4 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
8003190: 68fb ldr r3, [r7, #12]
8003192: f403 3240 and.w r2, r3, #196608 ; 0x30000
8003196: 687b ldr r3, [r7, #4]
8003198: 6a9b ldr r3, [r3, #40] ; 0x28
800319a: 085b lsrs r3, r3, #1
800319c: 3b01 subs r3, #1
800319e: 041b lsls r3, r3, #16
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
80031a0: 429a cmp r2, r3
80031a2: d107 bne.n 80031b4 <HAL_RCC_OscConfig+0x4dc>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
80031a4: 68fb ldr r3, [r7, #12]
80031a6: f003 6270 and.w r2, r3, #251658240 ; 0xf000000
80031aa: 687b ldr r3, [r7, #4]
80031ac: 6adb ldr r3, [r3, #44] ; 0x2c
80031ae: 061b lsls r3, r3, #24
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
80031b0: 429a cmp r2, r3
80031b2: d001 beq.n 80031b8 <HAL_RCC_OscConfig+0x4e0>
#endif
{
return HAL_ERROR;
80031b4: 2301 movs r3, #1
80031b6: e000 b.n 80031ba <HAL_RCC_OscConfig+0x4e2>
}
}
}
}
return HAL_OK;
80031b8: 2300 movs r3, #0
}
80031ba: 4618 mov r0, r3
80031bc: 3718 adds r7, #24
80031be: 46bd mov sp, r7
80031c0: bd80 pop {r7, pc}
80031c2: bf00 nop
80031c4: 40023800 .word 0x40023800
080031c8 <HAL_RCC_ClockConfig>:
* HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency
* (for more details refer to section above "Initialization/de-initialization functions")
* @retval None
*/
HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
{
80031c8: b580 push {r7, lr}
80031ca: b084 sub sp, #16
80031cc: af00 add r7, sp, #0
80031ce: 6078 str r0, [r7, #4]
80031d0: 6039 str r1, [r7, #0]
uint32_t tickstart;
/* Check Null pointer */
if(RCC_ClkInitStruct == NULL)
80031d2: 687b ldr r3, [r7, #4]
80031d4: 2b00 cmp r3, #0
80031d6: d101 bne.n 80031dc <HAL_RCC_ClockConfig+0x14>
{
return HAL_ERROR;
80031d8: 2301 movs r3, #1
80031da: e0cc b.n 8003376 <HAL_RCC_ClockConfig+0x1ae>
/* To correctly read data from FLASH memory, the number of wait states (LATENCY)
must be correctly programmed according to the frequency of the CPU clock
(HCLK) and the supply voltage of the device. */
/* Increasing the number of wait states because of higher CPU frequency */
if(FLatency > __HAL_FLASH_GET_LATENCY())
80031dc: 4b68 ldr r3, [pc, #416] ; (8003380 <HAL_RCC_ClockConfig+0x1b8>)
80031de: 681b ldr r3, [r3, #0]
80031e0: f003 030f and.w r3, r3, #15
80031e4: 683a ldr r2, [r7, #0]
80031e6: 429a cmp r2, r3
80031e8: d90c bls.n 8003204 <HAL_RCC_ClockConfig+0x3c>
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
__HAL_FLASH_SET_LATENCY(FLatency);
80031ea: 4b65 ldr r3, [pc, #404] ; (8003380 <HAL_RCC_ClockConfig+0x1b8>)
80031ec: 683a ldr r2, [r7, #0]
80031ee: b2d2 uxtb r2, r2
80031f0: 701a strb r2, [r3, #0]
/* Check that the new number of wait states is taken into account to access the Flash
memory by reading the FLASH_ACR register */
if(__HAL_FLASH_GET_LATENCY() != FLatency)
80031f2: 4b63 ldr r3, [pc, #396] ; (8003380 <HAL_RCC_ClockConfig+0x1b8>)
80031f4: 681b ldr r3, [r3, #0]
80031f6: f003 030f and.w r3, r3, #15
80031fa: 683a ldr r2, [r7, #0]
80031fc: 429a cmp r2, r3
80031fe: d001 beq.n 8003204 <HAL_RCC_ClockConfig+0x3c>
{
return HAL_ERROR;
8003200: 2301 movs r3, #1
8003202: e0b8 b.n 8003376 <HAL_RCC_ClockConfig+0x1ae>
}
}
/*-------------------------- HCLK Configuration --------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
8003204: 687b ldr r3, [r7, #4]
8003206: 681b ldr r3, [r3, #0]
8003208: f003 0302 and.w r3, r3, #2
800320c: 2b00 cmp r3, #0
800320e: d020 beq.n 8003252 <HAL_RCC_ClockConfig+0x8a>
{
/* Set the highest APBx dividers in order to ensure that we do not go through
a non-spec phase whatever we decrease or increase HCLK. */
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
8003210: 687b ldr r3, [r7, #4]
8003212: 681b ldr r3, [r3, #0]
8003214: f003 0304 and.w r3, r3, #4
8003218: 2b00 cmp r3, #0
800321a: d005 beq.n 8003228 <HAL_RCC_ClockConfig+0x60>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
800321c: 4b59 ldr r3, [pc, #356] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
800321e: 689b ldr r3, [r3, #8]
8003220: 4a58 ldr r2, [pc, #352] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
8003222: f443 53e0 orr.w r3, r3, #7168 ; 0x1c00
8003226: 6093 str r3, [r2, #8]
}
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
8003228: 687b ldr r3, [r7, #4]
800322a: 681b ldr r3, [r3, #0]
800322c: f003 0308 and.w r3, r3, #8
8003230: 2b00 cmp r3, #0
8003232: d005 beq.n 8003240 <HAL_RCC_ClockConfig+0x78>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
8003234: 4b53 ldr r3, [pc, #332] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
8003236: 689b ldr r3, [r3, #8]
8003238: 4a52 ldr r2, [pc, #328] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
800323a: f443 4360 orr.w r3, r3, #57344 ; 0xe000
800323e: 6093 str r3, [r2, #8]
}
assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
8003240: 4b50 ldr r3, [pc, #320] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
8003242: 689b ldr r3, [r3, #8]
8003244: f023 02f0 bic.w r2, r3, #240 ; 0xf0
8003248: 687b ldr r3, [r7, #4]
800324a: 689b ldr r3, [r3, #8]
800324c: 494d ldr r1, [pc, #308] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
800324e: 4313 orrs r3, r2
8003250: 608b str r3, [r1, #8]
}
/*------------------------- SYSCLK Configuration ---------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
8003252: 687b ldr r3, [r7, #4]
8003254: 681b ldr r3, [r3, #0]
8003256: f003 0301 and.w r3, r3, #1
800325a: 2b00 cmp r3, #0
800325c: d044 beq.n 80032e8 <HAL_RCC_ClockConfig+0x120>
{
assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
/* HSE is selected as System Clock Source */
if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
800325e: 687b ldr r3, [r7, #4]
8003260: 685b ldr r3, [r3, #4]
8003262: 2b01 cmp r3, #1
8003264: d107 bne.n 8003276 <HAL_RCC_ClockConfig+0xae>
{
/* Check the HSE ready flag */
if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8003266: 4b47 ldr r3, [pc, #284] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
8003268: 681b ldr r3, [r3, #0]
800326a: f403 3300 and.w r3, r3, #131072 ; 0x20000
800326e: 2b00 cmp r3, #0
8003270: d119 bne.n 80032a6 <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
8003272: 2301 movs r3, #1
8003274: e07f b.n 8003376 <HAL_RCC_ClockConfig+0x1ae>
}
}
/* PLL is selected as System Clock Source */
else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
8003276: 687b ldr r3, [r7, #4]
8003278: 685b ldr r3, [r3, #4]
800327a: 2b02 cmp r3, #2
800327c: d003 beq.n 8003286 <HAL_RCC_ClockConfig+0xbe>
(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLRCLK))
800327e: 687b ldr r3, [r7, #4]
8003280: 685b ldr r3, [r3, #4]
else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
8003282: 2b03 cmp r3, #3
8003284: d107 bne.n 8003296 <HAL_RCC_ClockConfig+0xce>
{
/* Check the PLL ready flag */
if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8003286: 4b3f ldr r3, [pc, #252] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
8003288: 681b ldr r3, [r3, #0]
800328a: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800328e: 2b00 cmp r3, #0
8003290: d109 bne.n 80032a6 <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
8003292: 2301 movs r3, #1
8003294: e06f b.n 8003376 <HAL_RCC_ClockConfig+0x1ae>
}
/* HSI is selected as System Clock Source */
else
{
/* Check the HSI ready flag */
if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8003296: 4b3b ldr r3, [pc, #236] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
8003298: 681b ldr r3, [r3, #0]
800329a: f003 0302 and.w r3, r3, #2
800329e: 2b00 cmp r3, #0
80032a0: d101 bne.n 80032a6 <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
80032a2: 2301 movs r3, #1
80032a4: e067 b.n 8003376 <HAL_RCC_ClockConfig+0x1ae>
}
}
__HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
80032a6: 4b37 ldr r3, [pc, #220] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
80032a8: 689b ldr r3, [r3, #8]
80032aa: f023 0203 bic.w r2, r3, #3
80032ae: 687b ldr r3, [r7, #4]
80032b0: 685b ldr r3, [r3, #4]
80032b2: 4934 ldr r1, [pc, #208] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
80032b4: 4313 orrs r3, r2
80032b6: 608b str r3, [r1, #8]
/* Get Start Tick */
tickstart = HAL_GetTick();
80032b8: f7fe f93c bl 8001534 <HAL_GetTick>
80032bc: 60f8 str r0, [r7, #12]
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
80032be: e00a b.n 80032d6 <HAL_RCC_ClockConfig+0x10e>
{
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
80032c0: f7fe f938 bl 8001534 <HAL_GetTick>
80032c4: 4602 mov r2, r0
80032c6: 68fb ldr r3, [r7, #12]
80032c8: 1ad3 subs r3, r2, r3
80032ca: f241 3288 movw r2, #5000 ; 0x1388
80032ce: 4293 cmp r3, r2
80032d0: d901 bls.n 80032d6 <HAL_RCC_ClockConfig+0x10e>
{
return HAL_TIMEOUT;
80032d2: 2303 movs r3, #3
80032d4: e04f b.n 8003376 <HAL_RCC_ClockConfig+0x1ae>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
80032d6: 4b2b ldr r3, [pc, #172] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
80032d8: 689b ldr r3, [r3, #8]
80032da: f003 020c and.w r2, r3, #12
80032de: 687b ldr r3, [r7, #4]
80032e0: 685b ldr r3, [r3, #4]
80032e2: 009b lsls r3, r3, #2
80032e4: 429a cmp r2, r3
80032e6: d1eb bne.n 80032c0 <HAL_RCC_ClockConfig+0xf8>
}
}
}
/* Decreasing the number of wait states because of lower CPU frequency */
if(FLatency < __HAL_FLASH_GET_LATENCY())
80032e8: 4b25 ldr r3, [pc, #148] ; (8003380 <HAL_RCC_ClockConfig+0x1b8>)
80032ea: 681b ldr r3, [r3, #0]
80032ec: f003 030f and.w r3, r3, #15
80032f0: 683a ldr r2, [r7, #0]
80032f2: 429a cmp r2, r3
80032f4: d20c bcs.n 8003310 <HAL_RCC_ClockConfig+0x148>
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
__HAL_FLASH_SET_LATENCY(FLatency);
80032f6: 4b22 ldr r3, [pc, #136] ; (8003380 <HAL_RCC_ClockConfig+0x1b8>)
80032f8: 683a ldr r2, [r7, #0]
80032fa: b2d2 uxtb r2, r2
80032fc: 701a strb r2, [r3, #0]
/* Check that the new number of wait states is taken into account to access the Flash
memory by reading the FLASH_ACR register */
if(__HAL_FLASH_GET_LATENCY() != FLatency)
80032fe: 4b20 ldr r3, [pc, #128] ; (8003380 <HAL_RCC_ClockConfig+0x1b8>)
8003300: 681b ldr r3, [r3, #0]
8003302: f003 030f and.w r3, r3, #15
8003306: 683a ldr r2, [r7, #0]
8003308: 429a cmp r2, r3
800330a: d001 beq.n 8003310 <HAL_RCC_ClockConfig+0x148>
{
return HAL_ERROR;
800330c: 2301 movs r3, #1
800330e: e032 b.n 8003376 <HAL_RCC_ClockConfig+0x1ae>
}
}
/*-------------------------- PCLK1 Configuration ---------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
8003310: 687b ldr r3, [r7, #4]
8003312: 681b ldr r3, [r3, #0]
8003314: f003 0304 and.w r3, r3, #4
8003318: 2b00 cmp r3, #0
800331a: d008 beq.n 800332e <HAL_RCC_ClockConfig+0x166>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
800331c: 4b19 ldr r3, [pc, #100] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
800331e: 689b ldr r3, [r3, #8]
8003320: f423 52e0 bic.w r2, r3, #7168 ; 0x1c00
8003324: 687b ldr r3, [r7, #4]
8003326: 68db ldr r3, [r3, #12]
8003328: 4916 ldr r1, [pc, #88] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
800332a: 4313 orrs r3, r2
800332c: 608b str r3, [r1, #8]
}
/*-------------------------- PCLK2 Configuration ---------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
800332e: 687b ldr r3, [r7, #4]
8003330: 681b ldr r3, [r3, #0]
8003332: f003 0308 and.w r3, r3, #8
8003336: 2b00 cmp r3, #0
8003338: d009 beq.n 800334e <HAL_RCC_ClockConfig+0x186>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U));
800333a: 4b12 ldr r3, [pc, #72] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
800333c: 689b ldr r3, [r3, #8]
800333e: f423 4260 bic.w r2, r3, #57344 ; 0xe000
8003342: 687b ldr r3, [r7, #4]
8003344: 691b ldr r3, [r3, #16]
8003346: 00db lsls r3, r3, #3
8003348: 490e ldr r1, [pc, #56] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
800334a: 4313 orrs r3, r2
800334c: 608b str r3, [r1, #8]
}
/* Update the SystemCoreClock global variable */
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> RCC_CFGR_HPRE_Pos];
800334e: f000 f821 bl 8003394 <HAL_RCC_GetSysClockFreq>
8003352: 4602 mov r2, r0
8003354: 4b0b ldr r3, [pc, #44] ; (8003384 <HAL_RCC_ClockConfig+0x1bc>)
8003356: 689b ldr r3, [r3, #8]
8003358: 091b lsrs r3, r3, #4
800335a: f003 030f and.w r3, r3, #15
800335e: 490a ldr r1, [pc, #40] ; (8003388 <HAL_RCC_ClockConfig+0x1c0>)
8003360: 5ccb ldrb r3, [r1, r3]
8003362: fa22 f303 lsr.w r3, r2, r3
8003366: 4a09 ldr r2, [pc, #36] ; (800338c <HAL_RCC_ClockConfig+0x1c4>)
8003368: 6013 str r3, [r2, #0]
/* Configure the source of time base considering new system clocks settings */
HAL_InitTick (uwTickPrio);
800336a: 4b09 ldr r3, [pc, #36] ; (8003390 <HAL_RCC_ClockConfig+0x1c8>)
800336c: 681b ldr r3, [r3, #0]
800336e: 4618 mov r0, r3
8003370: f7fe f89c bl 80014ac <HAL_InitTick>
return HAL_OK;
8003374: 2300 movs r3, #0
}
8003376: 4618 mov r0, r3
8003378: 3710 adds r7, #16
800337a: 46bd mov sp, r7
800337c: bd80 pop {r7, pc}
800337e: bf00 nop
8003380: 40023c00 .word 0x40023c00
8003384: 40023800 .word 0x40023800
8003388: 080177c8 .word 0x080177c8
800338c: 20000000 .word 0x20000000
8003390: 20000004 .word 0x20000004
08003394 <HAL_RCC_GetSysClockFreq>:
*
*
* @retval SYSCLK frequency
*/
__weak uint32_t HAL_RCC_GetSysClockFreq(void)
{
8003394: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr}
8003398: b090 sub sp, #64 ; 0x40
800339a: af00 add r7, sp, #0
uint32_t pllm = 0U, pllvco = 0U, pllp = 0U;
800339c: 2300 movs r3, #0
800339e: 637b str r3, [r7, #52] ; 0x34
80033a0: 2300 movs r3, #0
80033a2: 63fb str r3, [r7, #60] ; 0x3c
80033a4: 2300 movs r3, #0
80033a6: 633b str r3, [r7, #48] ; 0x30
uint32_t sysclockfreq = 0U;
80033a8: 2300 movs r3, #0
80033aa: 63bb str r3, [r7, #56] ; 0x38
/* Get SYSCLK source -------------------------------------------------------*/
switch (RCC->CFGR & RCC_CFGR_SWS)
80033ac: 4b59 ldr r3, [pc, #356] ; (8003514 <HAL_RCC_GetSysClockFreq+0x180>)
80033ae: 689b ldr r3, [r3, #8]
80033b0: f003 030c and.w r3, r3, #12
80033b4: 2b08 cmp r3, #8
80033b6: d00d beq.n 80033d4 <HAL_RCC_GetSysClockFreq+0x40>
80033b8: 2b08 cmp r3, #8
80033ba: f200 80a1 bhi.w 8003500 <HAL_RCC_GetSysClockFreq+0x16c>
80033be: 2b00 cmp r3, #0
80033c0: d002 beq.n 80033c8 <HAL_RCC_GetSysClockFreq+0x34>
80033c2: 2b04 cmp r3, #4
80033c4: d003 beq.n 80033ce <HAL_RCC_GetSysClockFreq+0x3a>
80033c6: e09b b.n 8003500 <HAL_RCC_GetSysClockFreq+0x16c>
{
case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */
{
sysclockfreq = HSI_VALUE;
80033c8: 4b53 ldr r3, [pc, #332] ; (8003518 <HAL_RCC_GetSysClockFreq+0x184>)
80033ca: 63bb str r3, [r7, #56] ; 0x38
break;
80033cc: e09b b.n 8003506 <HAL_RCC_GetSysClockFreq+0x172>
}
case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */
{
sysclockfreq = HSE_VALUE;
80033ce: 4b53 ldr r3, [pc, #332] ; (800351c <HAL_RCC_GetSysClockFreq+0x188>)
80033d0: 63bb str r3, [r7, #56] ; 0x38
break;
80033d2: e098 b.n 8003506 <HAL_RCC_GetSysClockFreq+0x172>
}
case RCC_CFGR_SWS_PLL: /* PLL used as system clock source */
{
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN
SYSCLK = PLL_VCO / PLLP */
pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
80033d4: 4b4f ldr r3, [pc, #316] ; (8003514 <HAL_RCC_GetSysClockFreq+0x180>)
80033d6: 685b ldr r3, [r3, #4]
80033d8: f003 033f and.w r3, r3, #63 ; 0x3f
80033dc: 637b str r3, [r7, #52] ; 0x34
if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI)
80033de: 4b4d ldr r3, [pc, #308] ; (8003514 <HAL_RCC_GetSysClockFreq+0x180>)
80033e0: 685b ldr r3, [r3, #4]
80033e2: f403 0380 and.w r3, r3, #4194304 ; 0x400000
80033e6: 2b00 cmp r3, #0
80033e8: d028 beq.n 800343c <HAL_RCC_GetSysClockFreq+0xa8>
{
/* HSE used as PLL clock source */
pllvco = (uint32_t) ((((uint64_t) HSE_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
80033ea: 4b4a ldr r3, [pc, #296] ; (8003514 <HAL_RCC_GetSysClockFreq+0x180>)
80033ec: 685b ldr r3, [r3, #4]
80033ee: 099b lsrs r3, r3, #6
80033f0: 2200 movs r2, #0
80033f2: 623b str r3, [r7, #32]
80033f4: 627a str r2, [r7, #36] ; 0x24
80033f6: 6a3b ldr r3, [r7, #32]
80033f8: f3c3 0008 ubfx r0, r3, #0, #9
80033fc: 2100 movs r1, #0
80033fe: 4b47 ldr r3, [pc, #284] ; (800351c <HAL_RCC_GetSysClockFreq+0x188>)
8003400: fb03 f201 mul.w r2, r3, r1
8003404: 2300 movs r3, #0
8003406: fb00 f303 mul.w r3, r0, r3
800340a: 4413 add r3, r2
800340c: 4a43 ldr r2, [pc, #268] ; (800351c <HAL_RCC_GetSysClockFreq+0x188>)
800340e: fba0 1202 umull r1, r2, r0, r2
8003412: 62fa str r2, [r7, #44] ; 0x2c
8003414: 460a mov r2, r1
8003416: 62ba str r2, [r7, #40] ; 0x28
8003418: 6afa ldr r2, [r7, #44] ; 0x2c
800341a: 4413 add r3, r2
800341c: 62fb str r3, [r7, #44] ; 0x2c
800341e: 6b7b ldr r3, [r7, #52] ; 0x34
8003420: 2200 movs r2, #0
8003422: 61bb str r3, [r7, #24]
8003424: 61fa str r2, [r7, #28]
8003426: e9d7 2306 ldrd r2, r3, [r7, #24]
800342a: e9d7 010a ldrd r0, r1, [r7, #40] ; 0x28
800342e: f7fd fbcb bl 8000bc8 <__aeabi_uldivmod>
8003432: 4602 mov r2, r0
8003434: 460b mov r3, r1
8003436: 4613 mov r3, r2
8003438: 63fb str r3, [r7, #60] ; 0x3c
800343a: e053 b.n 80034e4 <HAL_RCC_GetSysClockFreq+0x150>
}
else
{
/* HSI used as PLL clock source */
pllvco = (uint32_t) ((((uint64_t) HSI_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
800343c: 4b35 ldr r3, [pc, #212] ; (8003514 <HAL_RCC_GetSysClockFreq+0x180>)
800343e: 685b ldr r3, [r3, #4]
8003440: 099b lsrs r3, r3, #6
8003442: 2200 movs r2, #0
8003444: 613b str r3, [r7, #16]
8003446: 617a str r2, [r7, #20]
8003448: 693b ldr r3, [r7, #16]
800344a: f3c3 0a08 ubfx sl, r3, #0, #9
800344e: f04f 0b00 mov.w fp, #0
8003452: 4652 mov r2, sl
8003454: 465b mov r3, fp
8003456: f04f 0000 mov.w r0, #0
800345a: f04f 0100 mov.w r1, #0
800345e: 0159 lsls r1, r3, #5
8003460: ea41 61d2 orr.w r1, r1, r2, lsr #27
8003464: 0150 lsls r0, r2, #5
8003466: 4602 mov r2, r0
8003468: 460b mov r3, r1
800346a: ebb2 080a subs.w r8, r2, sl
800346e: eb63 090b sbc.w r9, r3, fp
8003472: f04f 0200 mov.w r2, #0
8003476: f04f 0300 mov.w r3, #0
800347a: ea4f 1389 mov.w r3, r9, lsl #6
800347e: ea43 6398 orr.w r3, r3, r8, lsr #26
8003482: ea4f 1288 mov.w r2, r8, lsl #6
8003486: ebb2 0408 subs.w r4, r2, r8
800348a: eb63 0509 sbc.w r5, r3, r9
800348e: f04f 0200 mov.w r2, #0
8003492: f04f 0300 mov.w r3, #0
8003496: 00eb lsls r3, r5, #3
8003498: ea43 7354 orr.w r3, r3, r4, lsr #29
800349c: 00e2 lsls r2, r4, #3
800349e: 4614 mov r4, r2
80034a0: 461d mov r5, r3
80034a2: eb14 030a adds.w r3, r4, sl
80034a6: 603b str r3, [r7, #0]
80034a8: eb45 030b adc.w r3, r5, fp
80034ac: 607b str r3, [r7, #4]
80034ae: f04f 0200 mov.w r2, #0
80034b2: f04f 0300 mov.w r3, #0
80034b6: e9d7 4500 ldrd r4, r5, [r7]
80034ba: 4629 mov r1, r5
80034bc: 028b lsls r3, r1, #10
80034be: 4621 mov r1, r4
80034c0: ea43 5391 orr.w r3, r3, r1, lsr #22
80034c4: 4621 mov r1, r4
80034c6: 028a lsls r2, r1, #10
80034c8: 4610 mov r0, r2
80034ca: 4619 mov r1, r3
80034cc: 6b7b ldr r3, [r7, #52] ; 0x34
80034ce: 2200 movs r2, #0
80034d0: 60bb str r3, [r7, #8]
80034d2: 60fa str r2, [r7, #12]
80034d4: e9d7 2302 ldrd r2, r3, [r7, #8]
80034d8: f7fd fb76 bl 8000bc8 <__aeabi_uldivmod>
80034dc: 4602 mov r2, r0
80034de: 460b mov r3, r1
80034e0: 4613 mov r3, r2
80034e2: 63fb str r3, [r7, #60] ; 0x3c
}
pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1U) *2U);
80034e4: 4b0b ldr r3, [pc, #44] ; (8003514 <HAL_RCC_GetSysClockFreq+0x180>)
80034e6: 685b ldr r3, [r3, #4]
80034e8: 0c1b lsrs r3, r3, #16
80034ea: f003 0303 and.w r3, r3, #3
80034ee: 3301 adds r3, #1
80034f0: 005b lsls r3, r3, #1
80034f2: 633b str r3, [r7, #48] ; 0x30
sysclockfreq = pllvco/pllp;
80034f4: 6bfa ldr r2, [r7, #60] ; 0x3c
80034f6: 6b3b ldr r3, [r7, #48] ; 0x30
80034f8: fbb2 f3f3 udiv r3, r2, r3
80034fc: 63bb str r3, [r7, #56] ; 0x38
break;
80034fe: e002 b.n 8003506 <HAL_RCC_GetSysClockFreq+0x172>
}
default:
{
sysclockfreq = HSI_VALUE;
8003500: 4b05 ldr r3, [pc, #20] ; (8003518 <HAL_RCC_GetSysClockFreq+0x184>)
8003502: 63bb str r3, [r7, #56] ; 0x38
break;
8003504: bf00 nop
}
}
return sysclockfreq;
8003506: 6bbb ldr r3, [r7, #56] ; 0x38
}
8003508: 4618 mov r0, r3
800350a: 3740 adds r7, #64 ; 0x40
800350c: 46bd mov sp, r7
800350e: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc}
8003512: bf00 nop
8003514: 40023800 .word 0x40023800
8003518: 00f42400 .word 0x00f42400
800351c: 017d7840 .word 0x017d7840
08003520 <HAL_RCC_GetHCLKFreq>:
* @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency
* and updated within this function
* @retval HCLK frequency
*/
uint32_t HAL_RCC_GetHCLKFreq(void)
{
8003520: b480 push {r7}
8003522: af00 add r7, sp, #0
return SystemCoreClock;
8003524: 4b03 ldr r3, [pc, #12] ; (8003534 <HAL_RCC_GetHCLKFreq+0x14>)
8003526: 681b ldr r3, [r3, #0]
}
8003528: 4618 mov r0, r3
800352a: 46bd mov sp, r7
800352c: f85d 7b04 ldr.w r7, [sp], #4
8003530: 4770 bx lr
8003532: bf00 nop
8003534: 20000000 .word 0x20000000
08003538 <MX_LWIP_Init>:
/**
* LwIP initialization function
*/
void MX_LWIP_Init(void)
{
8003538: b580 push {r7, lr}
800353a: b084 sub sp, #16
800353c: af04 add r7, sp, #16
/* Initilialize the LwIP stack without RTOS */
lwip_init();
800353e: f000 fc63 bl 8003e08 <lwip_init>
/* IP addresses initialization with DHCP (IPv4) */
ipaddr.addr = ipaddr_addr("10.1.1.69");
8003542: 481d ldr r0, [pc, #116] ; (80035b8 <MX_LWIP_Init+0x80>)
8003544: f00b fc01 bl 800ed4a <ipaddr_addr>
8003548: 4603 mov r3, r0
800354a: 4a1c ldr r2, [pc, #112] ; (80035bc <MX_LWIP_Init+0x84>)
800354c: 6013 str r3, [r2, #0]
netmask.addr = ipaddr_addr("255.255.255.0");
800354e: 481c ldr r0, [pc, #112] ; (80035c0 <MX_LWIP_Init+0x88>)
8003550: f00b fbfb bl 800ed4a <ipaddr_addr>
8003554: 4603 mov r3, r0
8003556: 4a1b ldr r2, [pc, #108] ; (80035c4 <MX_LWIP_Init+0x8c>)
8003558: 6013 str r3, [r2, #0]
gw.addr = ipaddr_addr("10.1.1.1");
800355a: 481b ldr r0, [pc, #108] ; (80035c8 <MX_LWIP_Init+0x90>)
800355c: f00b fbf5 bl 800ed4a <ipaddr_addr>
8003560: 4603 mov r3, r0
8003562: 4a1a ldr r2, [pc, #104] ; (80035cc <MX_LWIP_Init+0x94>)
8003564: 6013 str r3, [r2, #0]
/* add the network interface (IPv4/IPv6) without RTOS */
netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &ethernet_input);
8003566: 4b1a ldr r3, [pc, #104] ; (80035d0 <MX_LWIP_Init+0x98>)
8003568: 9302 str r3, [sp, #8]
800356a: 4b1a ldr r3, [pc, #104] ; (80035d4 <MX_LWIP_Init+0x9c>)
800356c: 9301 str r3, [sp, #4]
800356e: 2300 movs r3, #0
8003570: 9300 str r3, [sp, #0]
8003572: 4b16 ldr r3, [pc, #88] ; (80035cc <MX_LWIP_Init+0x94>)
8003574: 4a13 ldr r2, [pc, #76] ; (80035c4 <MX_LWIP_Init+0x8c>)
8003576: 4911 ldr r1, [pc, #68] ; (80035bc <MX_LWIP_Init+0x84>)
8003578: 4817 ldr r0, [pc, #92] ; (80035d8 <MX_LWIP_Init+0xa0>)
800357a: f001 f931 bl 80047e0 <netif_add>
/* Registers the default network interface */
netif_set_default(&gnetif);
800357e: 4816 ldr r0, [pc, #88] ; (80035d8 <MX_LWIP_Init+0xa0>)
8003580: f001 fae8 bl 8004b54 <netif_set_default>
if (netif_is_link_up(&gnetif))
8003584: 4b14 ldr r3, [pc, #80] ; (80035d8 <MX_LWIP_Init+0xa0>)
8003586: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800358a: 089b lsrs r3, r3, #2
800358c: f003 0301 and.w r3, r3, #1
8003590: b2db uxtb r3, r3
8003592: 2b00 cmp r3, #0
8003594: d003 beq.n 800359e <MX_LWIP_Init+0x66>
{
/* When the netif is fully configured this function must be called */
netif_set_up(&gnetif);
8003596: 4810 ldr r0, [pc, #64] ; (80035d8 <MX_LWIP_Init+0xa0>)
8003598: f001 faec bl 8004b74 <netif_set_up>
800359c: e002 b.n 80035a4 <MX_LWIP_Init+0x6c>
}
else
{
/* When the netif link is down this function must be called */
netif_set_down(&gnetif);
800359e: 480e ldr r0, [pc, #56] ; (80035d8 <MX_LWIP_Init+0xa0>)
80035a0: f001 fb54 bl 8004c4c <netif_set_down>
}
/* Set the link callback function, this function is called on change of link status*/
netif_set_link_callback(&gnetif, ethernet_link_status_updated);
80035a4: 490d ldr r1, [pc, #52] ; (80035dc <MX_LWIP_Init+0xa4>)
80035a6: 480c ldr r0, [pc, #48] ; (80035d8 <MX_LWIP_Init+0xa0>)
80035a8: f001 fbea bl 8004d80 <netif_set_link_callback>
/* Create the Ethernet link handler thread */
/* Start DHCP negotiation for a network interface (IPv4) */
dhcp_start(&gnetif);
80035ac: 480a ldr r0, [pc, #40] ; (80035d8 <MX_LWIP_Init+0xa0>)
80035ae: f008 fce3 bl 800bf78 <dhcp_start>
/* USER CODE BEGIN 3 */
/* USER CODE END 3 */
}
80035b2: bf00 nop
80035b4: 46bd mov sp, r7
80035b6: bd80 pop {r7, pc}
80035b8: 080149b0 .word 0x080149b0
80035bc: 20000a3c .word 0x20000a3c
80035c0: 080149bc .word 0x080149bc
80035c4: 20000a40 .word 0x20000a40
80035c8: 080149cc .word 0x080149cc
80035cc: 20000a44 .word 0x20000a44
80035d0: 0800fc45 .word 0x0800fc45
80035d4: 080038ed .word 0x080038ed
80035d8: 20000a04 .word 0x20000a04
80035dc: 08003631 .word 0x08003631
080035e0 <Ethernet_Link_Periodic_Handle>:
* @brief Ethernet Link periodic check
* @param netif
* @retval None
*/
static void Ethernet_Link_Periodic_Handle(struct netif *netif)
{
80035e0: b580 push {r7, lr}
80035e2: b082 sub sp, #8
80035e4: af00 add r7, sp, #0
80035e6: 6078 str r0, [r7, #4]
/* USER CODE BEGIN 4_4_1 */
/* USER CODE END 4_4_1 */
/* Ethernet Link every 100ms */
if (HAL_GetTick() - EthernetLinkTimer >= 100)
80035e8: f7fd ffa4 bl 8001534 <HAL_GetTick>
80035ec: 4602 mov r2, r0
80035ee: 4b08 ldr r3, [pc, #32] ; (8003610 <Ethernet_Link_Periodic_Handle+0x30>)
80035f0: 681b ldr r3, [r3, #0]
80035f2: 1ad3 subs r3, r2, r3
80035f4: 2b63 cmp r3, #99 ; 0x63
80035f6: d907 bls.n 8003608 <Ethernet_Link_Periodic_Handle+0x28>
{
EthernetLinkTimer = HAL_GetTick();
80035f8: f7fd ff9c bl 8001534 <HAL_GetTick>
80035fc: 4603 mov r3, r0
80035fe: 4a04 ldr r2, [pc, #16] ; (8003610 <Ethernet_Link_Periodic_Handle+0x30>)
8003600: 6013 str r3, [r2, #0]
ethernet_link_check_state(netif);
8003602: 6878 ldr r0, [r7, #4]
8003604: f000 fad6 bl 8003bb4 <ethernet_link_check_state>
}
/* USER CODE BEGIN 4_4 */
/* USER CODE END 4_4 */
}
8003608: bf00 nop
800360a: 3708 adds r7, #8
800360c: 46bd mov sp, r7
800360e: bd80 pop {r7, pc}
8003610: 20000a00 .word 0x20000a00
08003614 <MX_LWIP_Process>:
* Send it to the lwIP stack for handling
* Handle timeouts if LWIP_TIMERS is set and without RTOS
* Handle the llink status if LWIP_NETIF_LINK_CALLBACK is set and without RTOS
*/
void MX_LWIP_Process(void)
{
8003614: b580 push {r7, lr}
8003616: af00 add r7, sp, #0
/* USER CODE BEGIN 4_1 */
/* USER CODE END 4_1 */
ethernetif_input(&gnetif);
8003618: 4804 ldr r0, [pc, #16] ; (800362c <MX_LWIP_Process+0x18>)
800361a: f000 f947 bl 80038ac <ethernetif_input>
/* USER CODE BEGIN 4_2 */
/* USER CODE END 4_2 */
/* Handle timeouts */
sys_check_timeouts();
800361e: f007 fc31 bl 800ae84 <sys_check_timeouts>
Ethernet_Link_Periodic_Handle(&gnetif);
8003622: 4802 ldr r0, [pc, #8] ; (800362c <MX_LWIP_Process+0x18>)
8003624: f7ff ffdc bl 80035e0 <Ethernet_Link_Periodic_Handle>
/* USER CODE BEGIN 4_3 */
/* USER CODE END 4_3 */
}
8003628: bf00 nop
800362a: bd80 pop {r7, pc}
800362c: 20000a04 .word 0x20000a04
08003630 <ethernet_link_status_updated>:
* @brief Notify the User about the network interface config status
* @param netif: the network interface
* @retval None
*/
static void ethernet_link_status_updated(struct netif *netif)
{
8003630: b480 push {r7}
8003632: b083 sub sp, #12
8003634: af00 add r7, sp, #0
8003636: 6078 str r0, [r7, #4]
else /* netif is down */
{
/* USER CODE BEGIN 6 */
/* USER CODE END 6 */
}
}
8003638: bf00 nop
800363a: 370c adds r7, #12
800363c: 46bd mov sp, r7
800363e: f85d 7b04 ldr.w r7, [sp], #4
8003642: 4770 bx lr
08003644 <low_level_init>:
*
* @param netif the already initialized lwip network interface structure
* for this ethernetif
*/
static void low_level_init(struct netif *netif)
{
8003644: b580 push {r7, lr}
8003646: b084 sub sp, #16
8003648: af00 add r7, sp, #0
800364a: 6078 str r0, [r7, #4]
HAL_StatusTypeDef hal_eth_init_status = HAL_OK;
800364c: 2300 movs r3, #0
800364e: 73fb strb r3, [r7, #15]
/* Start ETH HAL Init */
uint8_t MACAddr[6] ;
heth.Instance = ETH;
8003650: 4b40 ldr r3, [pc, #256] ; (8003754 <low_level_init+0x110>)
8003652: 4a41 ldr r2, [pc, #260] ; (8003758 <low_level_init+0x114>)
8003654: 601a str r2, [r3, #0]
MACAddr[0] = 0xFB;
8003656: 23fb movs r3, #251 ; 0xfb
8003658: 723b strb r3, [r7, #8]
MACAddr[1] = 0x80;
800365a: 2380 movs r3, #128 ; 0x80
800365c: 727b strb r3, [r7, #9]
MACAddr[2] = 0xE1;
800365e: 23e1 movs r3, #225 ; 0xe1
8003660: 72bb strb r3, [r7, #10]
MACAddr[3] = 0x15;
8003662: 2315 movs r3, #21
8003664: 72fb strb r3, [r7, #11]
MACAddr[4] = 0x85;
8003666: 2385 movs r3, #133 ; 0x85
8003668: 733b strb r3, [r7, #12]
MACAddr[5] = 0xA3;
800366a: 23a3 movs r3, #163 ; 0xa3
800366c: 737b strb r3, [r7, #13]
heth.Init.MACAddr = &MACAddr[0];
800366e: 4a39 ldr r2, [pc, #228] ; (8003754 <low_level_init+0x110>)
8003670: f107 0308 add.w r3, r7, #8
8003674: 6053 str r3, [r2, #4]
heth.Init.MediaInterface = HAL_ETH_RMII_MODE;
8003676: 4b37 ldr r3, [pc, #220] ; (8003754 <low_level_init+0x110>)
8003678: f44f 0200 mov.w r2, #8388608 ; 0x800000
800367c: 609a str r2, [r3, #8]
heth.Init.TxDesc = DMATxDscrTab;
800367e: 4b35 ldr r3, [pc, #212] ; (8003754 <low_level_init+0x110>)
8003680: 4a36 ldr r2, [pc, #216] ; (800375c <low_level_init+0x118>)
8003682: 60da str r2, [r3, #12]
heth.Init.RxDesc = DMARxDscrTab;
8003684: 4b33 ldr r3, [pc, #204] ; (8003754 <low_level_init+0x110>)
8003686: 4a36 ldr r2, [pc, #216] ; (8003760 <low_level_init+0x11c>)
8003688: 611a str r2, [r3, #16]
heth.Init.RxBuffLen = 1536;
800368a: 4b32 ldr r3, [pc, #200] ; (8003754 <low_level_init+0x110>)
800368c: f44f 62c0 mov.w r2, #1536 ; 0x600
8003690: 615a str r2, [r3, #20]
/* USER CODE BEGIN MACADDRESS */
/* USER CODE END MACADDRESS */
hal_eth_init_status = HAL_ETH_Init(&heth);
8003692: 4830 ldr r0, [pc, #192] ; (8003754 <low_level_init+0x110>)
8003694: f7fe f864 bl 8001760 <HAL_ETH_Init>
8003698: 4603 mov r3, r0
800369a: 73fb strb r3, [r7, #15]
memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig));
800369c: 2238 movs r2, #56 ; 0x38
800369e: 2100 movs r1, #0
80036a0: 4830 ldr r0, [pc, #192] ; (8003764 <low_level_init+0x120>)
80036a2: f00c fc01 bl 800fea8 <memset>
TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD;
80036a6: 4b2f ldr r3, [pc, #188] ; (8003764 <low_level_init+0x120>)
80036a8: 2221 movs r2, #33 ; 0x21
80036aa: 601a str r2, [r3, #0]
TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC;
80036ac: 4b2d ldr r3, [pc, #180] ; (8003764 <low_level_init+0x120>)
80036ae: f44f 0240 mov.w r2, #12582912 ; 0xc00000
80036b2: 615a str r2, [r3, #20]
TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT;
80036b4: 4b2b ldr r3, [pc, #172] ; (8003764 <low_level_init+0x120>)
80036b6: 2200 movs r2, #0
80036b8: 611a str r2, [r3, #16]
/* End ETH HAL Init */
/* Initialize the RX POOL */
LWIP_MEMPOOL_INIT(RX_POOL);
80036ba: 482b ldr r0, [pc, #172] ; (8003768 <low_level_init+0x124>)
80036bc: f000 ff58 bl 8004570 <memp_init_pool>
#if LWIP_ARP || LWIP_ETHERNET
/* set MAC hardware address length */
netif->hwaddr_len = ETH_HWADDR_LEN;
80036c0: 687b ldr r3, [r7, #4]
80036c2: 2206 movs r2, #6
80036c4: f883 2030 strb.w r2, [r3, #48] ; 0x30
/* set MAC hardware address */
netif->hwaddr[0] = heth.Init.MACAddr[0];
80036c8: 4b22 ldr r3, [pc, #136] ; (8003754 <low_level_init+0x110>)
80036ca: 685b ldr r3, [r3, #4]
80036cc: 781a ldrb r2, [r3, #0]
80036ce: 687b ldr r3, [r7, #4]
80036d0: f883 202a strb.w r2, [r3, #42] ; 0x2a
netif->hwaddr[1] = heth.Init.MACAddr[1];
80036d4: 4b1f ldr r3, [pc, #124] ; (8003754 <low_level_init+0x110>)
80036d6: 685b ldr r3, [r3, #4]
80036d8: 785a ldrb r2, [r3, #1]
80036da: 687b ldr r3, [r7, #4]
80036dc: f883 202b strb.w r2, [r3, #43] ; 0x2b
netif->hwaddr[2] = heth.Init.MACAddr[2];
80036e0: 4b1c ldr r3, [pc, #112] ; (8003754 <low_level_init+0x110>)
80036e2: 685b ldr r3, [r3, #4]
80036e4: 789a ldrb r2, [r3, #2]
80036e6: 687b ldr r3, [r7, #4]
80036e8: f883 202c strb.w r2, [r3, #44] ; 0x2c
netif->hwaddr[3] = heth.Init.MACAddr[3];
80036ec: 4b19 ldr r3, [pc, #100] ; (8003754 <low_level_init+0x110>)
80036ee: 685b ldr r3, [r3, #4]
80036f0: 78da ldrb r2, [r3, #3]
80036f2: 687b ldr r3, [r7, #4]
80036f4: f883 202d strb.w r2, [r3, #45] ; 0x2d
netif->hwaddr[4] = heth.Init.MACAddr[4];
80036f8: 4b16 ldr r3, [pc, #88] ; (8003754 <low_level_init+0x110>)
80036fa: 685b ldr r3, [r3, #4]
80036fc: 791a ldrb r2, [r3, #4]
80036fe: 687b ldr r3, [r7, #4]
8003700: f883 202e strb.w r2, [r3, #46] ; 0x2e
netif->hwaddr[5] = heth.Init.MACAddr[5];
8003704: 4b13 ldr r3, [pc, #76] ; (8003754 <low_level_init+0x110>)
8003706: 685b ldr r3, [r3, #4]
8003708: 795a ldrb r2, [r3, #5]
800370a: 687b ldr r3, [r7, #4]
800370c: f883 202f strb.w r2, [r3, #47] ; 0x2f
/* maximum transfer unit */
netif->mtu = ETH_MAX_PAYLOAD;
8003710: 687b ldr r3, [r7, #4]
8003712: f240 52dc movw r2, #1500 ; 0x5dc
8003716: 851a strh r2, [r3, #40] ; 0x28
/* Accept broadcast address and ARP traffic */
/* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */
#if LWIP_ARP
netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP;
8003718: 687b ldr r3, [r7, #4]
800371a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800371e: f043 030a orr.w r3, r3, #10
8003722: b2da uxtb r2, r3
8003724: 687b ldr r3, [r7, #4]
8003726: f883 2031 strb.w r2, [r3, #49] ; 0x31
/* USER CODE BEGIN PHY_PRE_CONFIG */
/* USER CODE END PHY_PRE_CONFIG */
/* Set PHY IO functions */
DP83848_RegisterBusIO(&DP83848, &DP83848_IOCtx);
800372a: 4910 ldr r1, [pc, #64] ; (800376c <low_level_init+0x128>)
800372c: 4810 ldr r0, [pc, #64] ; (8003770 <low_level_init+0x12c>)
800372e: f7fd fd3a bl 80011a6 <DP83848_RegisterBusIO>
/* Initialize the DP83848 ETH PHY */
DP83848_Init(&DP83848);
8003732: 480f ldr r0, [pc, #60] ; (8003770 <low_level_init+0x12c>)
8003734: f7fd fd69 bl 800120a <DP83848_Init>
if (hal_eth_init_status == HAL_OK)
8003738: 7bfb ldrb r3, [r7, #15]
800373a: 2b00 cmp r3, #0
800373c: d103 bne.n 8003746 <low_level_init+0x102>
{
/* Get link state */
ethernet_link_check_state(netif);
800373e: 6878 ldr r0, [r7, #4]
8003740: f000 fa38 bl 8003bb4 <ethernet_link_check_state>
#endif /* LWIP_ARP || LWIP_ETHERNET */
/* USER CODE BEGIN LOW_LEVEL_INIT */
/* USER CODE END LOW_LEVEL_INIT */
}
8003744: e001 b.n 800374a <low_level_init+0x106>
Error_Handler();
8003746: f7fd fc9b bl 8001080 <Error_Handler>
}
800374a: bf00 nop
800374c: 3710 adds r7, #16
800374e: 46bd mov sp, r7
8003750: bd80 pop {r7, pc}
8003752: bf00 nop
8003754: 20005514 .word 0x20005514
8003758: 40028000 .word 0x40028000
800375c: 20005474 .word 0x20005474
8003760: 200053d4 .word 0x200053d4
8003764: 200055c4 .word 0x200055c4
8003768: 080177d8 .word 0x080177d8
800376c: 2000000c .word 0x2000000c
8003770: 200055fc .word 0x200055fc
08003774 <low_level_output>:
* to become available since the stack doesn't retry to send a packet
* dropped because of memory failure (except for the TCP timers).
*/
static err_t low_level_output(struct netif *netif, struct pbuf *p)
{
8003774: b580 push {r7, lr}
8003776: b092 sub sp, #72 ; 0x48
8003778: af00 add r7, sp, #0
800377a: 6078 str r0, [r7, #4]
800377c: 6039 str r1, [r7, #0]
uint32_t i = 0U;
800377e: 2300 movs r3, #0
8003780: 647b str r3, [r7, #68] ; 0x44
struct pbuf *q = NULL;
8003782: 2300 movs r3, #0
8003784: 643b str r3, [r7, #64] ; 0x40
err_t errval = ERR_OK;
8003786: 2300 movs r3, #0
8003788: f887 303f strb.w r3, [r7, #63] ; 0x3f
ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT] = {0};
800378c: f107 030c add.w r3, r7, #12
8003790: 2230 movs r2, #48 ; 0x30
8003792: 2100 movs r1, #0
8003794: 4618 mov r0, r3
8003796: f00c fb87 bl 800fea8 <memset>
memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef));
800379a: f107 030c add.w r3, r7, #12
800379e: 2230 movs r2, #48 ; 0x30
80037a0: 2100 movs r1, #0
80037a2: 4618 mov r0, r3
80037a4: f00c fb80 bl 800fea8 <memset>
for(q = p; q != NULL; q = q->next)
80037a8: 683b ldr r3, [r7, #0]
80037aa: 643b str r3, [r7, #64] ; 0x40
80037ac: e045 b.n 800383a <low_level_output+0xc6>
{
if(i >= ETH_TX_DESC_CNT)
80037ae: 6c7b ldr r3, [r7, #68] ; 0x44
80037b0: 2b03 cmp r3, #3
80037b2: d902 bls.n 80037ba <low_level_output+0x46>
return ERR_IF;
80037b4: f06f 030b mvn.w r3, #11
80037b8: e055 b.n 8003866 <low_level_output+0xf2>
Txbuffer[i].buffer = q->payload;
80037ba: 6c3b ldr r3, [r7, #64] ; 0x40
80037bc: 6859 ldr r1, [r3, #4]
80037be: 6c7a ldr r2, [r7, #68] ; 0x44
80037c0: 4613 mov r3, r2
80037c2: 005b lsls r3, r3, #1
80037c4: 4413 add r3, r2
80037c6: 009b lsls r3, r3, #2
80037c8: 3348 adds r3, #72 ; 0x48
80037ca: 443b add r3, r7
80037cc: 3b3c subs r3, #60 ; 0x3c
80037ce: 6019 str r1, [r3, #0]
Txbuffer[i].len = q->len;
80037d0: 6c3b ldr r3, [r7, #64] ; 0x40
80037d2: 895b ldrh r3, [r3, #10]
80037d4: 4619 mov r1, r3
80037d6: 6c7a ldr r2, [r7, #68] ; 0x44
80037d8: 4613 mov r3, r2
80037da: 005b lsls r3, r3, #1
80037dc: 4413 add r3, r2
80037de: 009b lsls r3, r3, #2
80037e0: 3348 adds r3, #72 ; 0x48
80037e2: 443b add r3, r7
80037e4: 3b38 subs r3, #56 ; 0x38
80037e6: 6019 str r1, [r3, #0]
if(i>0)
80037e8: 6c7b ldr r3, [r7, #68] ; 0x44
80037ea: 2b00 cmp r3, #0
80037ec: d011 beq.n 8003812 <low_level_output+0x9e>
{
Txbuffer[i-1].next = &Txbuffer[i];
80037ee: 6c7b ldr r3, [r7, #68] ; 0x44
80037f0: 1e5a subs r2, r3, #1
80037f2: f107 000c add.w r0, r7, #12
80037f6: 6c79 ldr r1, [r7, #68] ; 0x44
80037f8: 460b mov r3, r1
80037fa: 005b lsls r3, r3, #1
80037fc: 440b add r3, r1
80037fe: 009b lsls r3, r3, #2
8003800: 18c1 adds r1, r0, r3
8003802: 4613 mov r3, r2
8003804: 005b lsls r3, r3, #1
8003806: 4413 add r3, r2
8003808: 009b lsls r3, r3, #2
800380a: 3348 adds r3, #72 ; 0x48
800380c: 443b add r3, r7
800380e: 3b34 subs r3, #52 ; 0x34
8003810: 6019 str r1, [r3, #0]
}
if(q->next == NULL)
8003812: 6c3b ldr r3, [r7, #64] ; 0x40
8003814: 681b ldr r3, [r3, #0]
8003816: 2b00 cmp r3, #0
8003818: d109 bne.n 800382e <low_level_output+0xba>
{
Txbuffer[i].next = NULL;
800381a: 6c7a ldr r2, [r7, #68] ; 0x44
800381c: 4613 mov r3, r2
800381e: 005b lsls r3, r3, #1
8003820: 4413 add r3, r2
8003822: 009b lsls r3, r3, #2
8003824: 3348 adds r3, #72 ; 0x48
8003826: 443b add r3, r7
8003828: 3b34 subs r3, #52 ; 0x34
800382a: 2200 movs r2, #0
800382c: 601a str r2, [r3, #0]
}
i++;
800382e: 6c7b ldr r3, [r7, #68] ; 0x44
8003830: 3301 adds r3, #1
8003832: 647b str r3, [r7, #68] ; 0x44
for(q = p; q != NULL; q = q->next)
8003834: 6c3b ldr r3, [r7, #64] ; 0x40
8003836: 681b ldr r3, [r3, #0]
8003838: 643b str r3, [r7, #64] ; 0x40
800383a: 6c3b ldr r3, [r7, #64] ; 0x40
800383c: 2b00 cmp r3, #0
800383e: d1b6 bne.n 80037ae <low_level_output+0x3a>
}
TxConfig.Length = p->tot_len;
8003840: 683b ldr r3, [r7, #0]
8003842: 891b ldrh r3, [r3, #8]
8003844: 461a mov r2, r3
8003846: 4b0a ldr r3, [pc, #40] ; (8003870 <low_level_output+0xfc>)
8003848: 605a str r2, [r3, #4]
TxConfig.TxBuffer = Txbuffer;
800384a: 4a09 ldr r2, [pc, #36] ; (8003870 <low_level_output+0xfc>)
800384c: f107 030c add.w r3, r7, #12
8003850: 6093 str r3, [r2, #8]
TxConfig.pData = p;
8003852: 4a07 ldr r2, [pc, #28] ; (8003870 <low_level_output+0xfc>)
8003854: 683b ldr r3, [r7, #0]
8003856: 6353 str r3, [r2, #52] ; 0x34
HAL_ETH_Transmit(&heth, &TxConfig, ETH_DMA_TRANSMIT_TIMEOUT);
8003858: 2214 movs r2, #20
800385a: 4905 ldr r1, [pc, #20] ; (8003870 <low_level_output+0xfc>)
800385c: 4805 ldr r0, [pc, #20] ; (8003874 <low_level_output+0x100>)
800385e: f7fe f8b5 bl 80019cc <HAL_ETH_Transmit>
return errval;
8003862: f997 303f ldrsb.w r3, [r7, #63] ; 0x3f
}
8003866: 4618 mov r0, r3
8003868: 3748 adds r7, #72 ; 0x48
800386a: 46bd mov sp, r7
800386c: bd80 pop {r7, pc}
800386e: bf00 nop
8003870: 200055c4 .word 0x200055c4
8003874: 20005514 .word 0x20005514
08003878 <low_level_input>:
* @param netif the lwip network interface structure for this ethernetif
* @return a pbuf filled with the received packet (including MAC header)
* NULL on memory error
*/
static struct pbuf * low_level_input(struct netif *netif)
{
8003878: b580 push {r7, lr}
800387a: b084 sub sp, #16
800387c: af00 add r7, sp, #0
800387e: 6078 str r0, [r7, #4]
struct pbuf *p = NULL;
8003880: 2300 movs r3, #0
8003882: 60fb str r3, [r7, #12]
if(RxAllocStatus == RX_ALLOC_OK)
8003884: 4b07 ldr r3, [pc, #28] ; (80038a4 <low_level_input+0x2c>)
8003886: 781b ldrb r3, [r3, #0]
8003888: 2b00 cmp r3, #0
800388a: d105 bne.n 8003898 <low_level_input+0x20>
{
HAL_ETH_ReadData(&heth, (void **)&p);
800388c: f107 030c add.w r3, r7, #12
8003890: 4619 mov r1, r3
8003892: 4805 ldr r0, [pc, #20] ; (80038a8 <low_level_input+0x30>)
8003894: f7fe f92e bl 8001af4 <HAL_ETH_ReadData>
}
return p;
8003898: 68fb ldr r3, [r7, #12]
}
800389a: 4618 mov r0, r3
800389c: 3710 adds r7, #16
800389e: 46bd mov sp, r7
80038a0: bd80 pop {r7, pc}
80038a2: bf00 nop
80038a4: 200053d0 .word 0x200053d0
80038a8: 20005514 .word 0x20005514
080038ac <ethernetif_input>:
* the appropriate input function is called.
*
* @param netif the lwip network interface structure for this ethernetif
*/
void ethernetif_input(struct netif *netif)
{
80038ac: b580 push {r7, lr}
80038ae: b084 sub sp, #16
80038b0: af00 add r7, sp, #0
80038b2: 6078 str r0, [r7, #4]
struct pbuf *p = NULL;
80038b4: 2300 movs r3, #0
80038b6: 60fb str r3, [r7, #12]
do
{
p = low_level_input( netif );
80038b8: 6878 ldr r0, [r7, #4]
80038ba: f7ff ffdd bl 8003878 <low_level_input>
80038be: 60f8 str r0, [r7, #12]
if (p != NULL)
80038c0: 68fb ldr r3, [r7, #12]
80038c2: 2b00 cmp r3, #0
80038c4: d00a beq.n 80038dc <ethernetif_input+0x30>
{
if (netif->input( p, netif) != ERR_OK )
80038c6: 687b ldr r3, [r7, #4]
80038c8: 691b ldr r3, [r3, #16]
80038ca: 6879 ldr r1, [r7, #4]
80038cc: 68f8 ldr r0, [r7, #12]
80038ce: 4798 blx r3
80038d0: 4603 mov r3, r0
80038d2: 2b00 cmp r3, #0
80038d4: d002 beq.n 80038dc <ethernetif_input+0x30>
{
pbuf_free(p);
80038d6: 68f8 ldr r0, [r7, #12]
80038d8: f001 fdd2 bl 8005480 <pbuf_free>
}
}
} while(p!=NULL);
80038dc: 68fb ldr r3, [r7, #12]
80038de: 2b00 cmp r3, #0
80038e0: d1ea bne.n 80038b8 <ethernetif_input+0xc>
}
80038e2: bf00 nop
80038e4: bf00 nop
80038e6: 3710 adds r7, #16
80038e8: 46bd mov sp, r7
80038ea: bd80 pop {r7, pc}
080038ec <ethernetif_init>:
* @return ERR_OK if the loopif is initialized
* ERR_MEM if private data couldn't be allocated
* any other err_t on error
*/
err_t ethernetif_init(struct netif *netif)
{
80038ec: b580 push {r7, lr}
80038ee: b082 sub sp, #8
80038f0: af00 add r7, sp, #0
80038f2: 6078 str r0, [r7, #4]
LWIP_ASSERT("netif != NULL", (netif != NULL));
80038f4: 687b ldr r3, [r7, #4]
80038f6: 2b00 cmp r3, #0
80038f8: d106 bne.n 8003908 <ethernetif_init+0x1c>
80038fa: 4b0e ldr r3, [pc, #56] ; (8003934 <ethernetif_init+0x48>)
80038fc: f44f 72b6 mov.w r2, #364 ; 0x16c
8003900: 490d ldr r1, [pc, #52] ; (8003938 <ethernetif_init+0x4c>)
8003902: 480e ldr r0, [pc, #56] ; (800393c <ethernetif_init+0x50>)
8003904: f00c fad8 bl 800feb8 <printf>
* The last argument should be replaced with your link speed, in units
* of bits per second.
*/
// MIB2_INIT_NETIF(netif, snmp_ifType_ethernet_csmacd, LINK_SPEED_OF_YOUR_NETIF_IN_BPS);
netif->name[0] = IFNAME0;
8003908: 687b ldr r3, [r7, #4]
800390a: 2273 movs r2, #115 ; 0x73
800390c: f883 2032 strb.w r2, [r3, #50] ; 0x32
netif->name[1] = IFNAME1;
8003910: 687b ldr r3, [r7, #4]
8003912: 2274 movs r2, #116 ; 0x74
8003914: f883 2033 strb.w r2, [r3, #51] ; 0x33
* is available...) */
#if LWIP_IPV4
#if LWIP_ARP || LWIP_ETHERNET
#if LWIP_ARP
netif->output = etharp_output;
8003918: 687b ldr r3, [r7, #4]
800391a: 4a09 ldr r2, [pc, #36] ; (8003940 <ethernetif_init+0x54>)
800391c: 615a str r2, [r3, #20]
#if LWIP_IPV6
netif->output_ip6 = ethip6_output;
#endif /* LWIP_IPV6 */
netif->linkoutput = low_level_output;
800391e: 687b ldr r3, [r7, #4]
8003920: 4a08 ldr r2, [pc, #32] ; (8003944 <ethernetif_init+0x58>)
8003922: 619a str r2, [r3, #24]
/* initialize the hardware */
low_level_init(netif);
8003924: 6878 ldr r0, [r7, #4]
8003926: f7ff fe8d bl 8003644 <low_level_init>
return ERR_OK;
800392a: 2300 movs r3, #0
}
800392c: 4618 mov r0, r3
800392e: 3708 adds r7, #8
8003930: 46bd mov sp, r7
8003932: bd80 pop {r7, pc}
8003934: 080149d8 .word 0x080149d8
8003938: 080149f4 .word 0x080149f4
800393c: 08014a04 .word 0x08014a04
8003940: 0800de45 .word 0x0800de45
8003944: 08003775 .word 0x08003775
08003948 <pbuf_free_custom>:
* @brief Custom Rx pbuf free callback
* @param pbuf: pbuf to be freed
* @retval None
*/
void pbuf_free_custom(struct pbuf *p)
{
8003948: b580 push {r7, lr}
800394a: b084 sub sp, #16
800394c: af00 add r7, sp, #0
800394e: 6078 str r0, [r7, #4]
struct pbuf_custom* custom_pbuf = (struct pbuf_custom*)p;
8003950: 687b ldr r3, [r7, #4]
8003952: 60fb str r3, [r7, #12]
LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf);
8003954: 68f9 ldr r1, [r7, #12]
8003956: 4807 ldr r0, [pc, #28] ; (8003974 <pbuf_free_custom+0x2c>)
8003958: f000 feec bl 8004734 <memp_free_pool>
/* If the Rx Buffer Pool was exhausted, signal the ethernetif_input task to
* call HAL_ETH_GetRxDataBuffer to rebuild the Rx descriptors. */
if (RxAllocStatus == RX_ALLOC_ERROR)
800395c: 4b06 ldr r3, [pc, #24] ; (8003978 <pbuf_free_custom+0x30>)
800395e: 781b ldrb r3, [r3, #0]
8003960: 2b01 cmp r3, #1
8003962: d102 bne.n 800396a <pbuf_free_custom+0x22>
{
RxAllocStatus = RX_ALLOC_OK;
8003964: 4b04 ldr r3, [pc, #16] ; (8003978 <pbuf_free_custom+0x30>)
8003966: 2200 movs r2, #0
8003968: 701a strb r2, [r3, #0]
}
}
800396a: bf00 nop
800396c: 3710 adds r7, #16
800396e: 46bd mov sp, r7
8003970: bd80 pop {r7, pc}
8003972: bf00 nop
8003974: 080177d8 .word 0x080177d8
8003978: 200053d0 .word 0x200053d0
0800397c <sys_now>:
* when LWIP_TIMERS == 1 and NO_SYS == 1
* @param None
* @retval Current Time value
*/
u32_t sys_now(void)
{
800397c: b580 push {r7, lr}
800397e: af00 add r7, sp, #0
return HAL_GetTick();
8003980: f7fd fdd8 bl 8001534 <HAL_GetTick>
8003984: 4603 mov r3, r0
}
8003986: 4618 mov r0, r3
8003988: bd80 pop {r7, pc}
...
0800398c <HAL_ETH_MspInit>:
* @param ethHandle: ETH handle
* @retval None
*/
void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle)
{
800398c: b580 push {r7, lr}
800398e: b08e sub sp, #56 ; 0x38
8003990: af00 add r7, sp, #0
8003992: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8003994: f107 0324 add.w r3, r7, #36 ; 0x24
8003998: 2200 movs r2, #0
800399a: 601a str r2, [r3, #0]
800399c: 605a str r2, [r3, #4]
800399e: 609a str r2, [r3, #8]
80039a0: 60da str r2, [r3, #12]
80039a2: 611a str r2, [r3, #16]
if(ethHandle->Instance==ETH)
80039a4: 687b ldr r3, [r7, #4]
80039a6: 681b ldr r3, [r3, #0]
80039a8: 4a55 ldr r2, [pc, #340] ; (8003b00 <HAL_ETH_MspInit+0x174>)
80039aa: 4293 cmp r3, r2
80039ac: f040 80a4 bne.w 8003af8 <HAL_ETH_MspInit+0x16c>
{
/* USER CODE BEGIN ETH_MspInit 0 */
/* USER CODE END ETH_MspInit 0 */
/* Enable Peripheral clock */
__HAL_RCC_ETH_CLK_ENABLE();
80039b0: 2300 movs r3, #0
80039b2: 623b str r3, [r7, #32]
80039b4: 4b53 ldr r3, [pc, #332] ; (8003b04 <HAL_ETH_MspInit+0x178>)
80039b6: 6b1b ldr r3, [r3, #48] ; 0x30
80039b8: 4a52 ldr r2, [pc, #328] ; (8003b04 <HAL_ETH_MspInit+0x178>)
80039ba: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000
80039be: 6313 str r3, [r2, #48] ; 0x30
80039c0: 4b50 ldr r3, [pc, #320] ; (8003b04 <HAL_ETH_MspInit+0x178>)
80039c2: 6b1b ldr r3, [r3, #48] ; 0x30
80039c4: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
80039c8: 623b str r3, [r7, #32]
80039ca: 6a3b ldr r3, [r7, #32]
80039cc: 2300 movs r3, #0
80039ce: 61fb str r3, [r7, #28]
80039d0: 4b4c ldr r3, [pc, #304] ; (8003b04 <HAL_ETH_MspInit+0x178>)
80039d2: 6b1b ldr r3, [r3, #48] ; 0x30
80039d4: 4a4b ldr r2, [pc, #300] ; (8003b04 <HAL_ETH_MspInit+0x178>)
80039d6: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
80039da: 6313 str r3, [r2, #48] ; 0x30
80039dc: 4b49 ldr r3, [pc, #292] ; (8003b04 <HAL_ETH_MspInit+0x178>)
80039de: 6b1b ldr r3, [r3, #48] ; 0x30
80039e0: f003 6380 and.w r3, r3, #67108864 ; 0x4000000
80039e4: 61fb str r3, [r7, #28]
80039e6: 69fb ldr r3, [r7, #28]
80039e8: 2300 movs r3, #0
80039ea: 61bb str r3, [r7, #24]
80039ec: 4b45 ldr r3, [pc, #276] ; (8003b04 <HAL_ETH_MspInit+0x178>)
80039ee: 6b1b ldr r3, [r3, #48] ; 0x30
80039f0: 4a44 ldr r2, [pc, #272] ; (8003b04 <HAL_ETH_MspInit+0x178>)
80039f2: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000
80039f6: 6313 str r3, [r2, #48] ; 0x30
80039f8: 4b42 ldr r3, [pc, #264] ; (8003b04 <HAL_ETH_MspInit+0x178>)
80039fa: 6b1b ldr r3, [r3, #48] ; 0x30
80039fc: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
8003a00: 61bb str r3, [r7, #24]
8003a02: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOC_CLK_ENABLE();
8003a04: 2300 movs r3, #0
8003a06: 617b str r3, [r7, #20]
8003a08: 4b3e ldr r3, [pc, #248] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a0a: 6b1b ldr r3, [r3, #48] ; 0x30
8003a0c: 4a3d ldr r2, [pc, #244] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a0e: f043 0304 orr.w r3, r3, #4
8003a12: 6313 str r3, [r2, #48] ; 0x30
8003a14: 4b3b ldr r3, [pc, #236] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a16: 6b1b ldr r3, [r3, #48] ; 0x30
8003a18: f003 0304 and.w r3, r3, #4
8003a1c: 617b str r3, [r7, #20]
8003a1e: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOA_CLK_ENABLE();
8003a20: 2300 movs r3, #0
8003a22: 613b str r3, [r7, #16]
8003a24: 4b37 ldr r3, [pc, #220] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a26: 6b1b ldr r3, [r3, #48] ; 0x30
8003a28: 4a36 ldr r2, [pc, #216] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a2a: f043 0301 orr.w r3, r3, #1
8003a2e: 6313 str r3, [r2, #48] ; 0x30
8003a30: 4b34 ldr r3, [pc, #208] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a32: 6b1b ldr r3, [r3, #48] ; 0x30
8003a34: f003 0301 and.w r3, r3, #1
8003a38: 613b str r3, [r7, #16]
8003a3a: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOB_CLK_ENABLE();
8003a3c: 2300 movs r3, #0
8003a3e: 60fb str r3, [r7, #12]
8003a40: 4b30 ldr r3, [pc, #192] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a42: 6b1b ldr r3, [r3, #48] ; 0x30
8003a44: 4a2f ldr r2, [pc, #188] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a46: f043 0302 orr.w r3, r3, #2
8003a4a: 6313 str r3, [r2, #48] ; 0x30
8003a4c: 4b2d ldr r3, [pc, #180] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a4e: 6b1b ldr r3, [r3, #48] ; 0x30
8003a50: f003 0302 and.w r3, r3, #2
8003a54: 60fb str r3, [r7, #12]
8003a56: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOG_CLK_ENABLE();
8003a58: 2300 movs r3, #0
8003a5a: 60bb str r3, [r7, #8]
8003a5c: 4b29 ldr r3, [pc, #164] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a5e: 6b1b ldr r3, [r3, #48] ; 0x30
8003a60: 4a28 ldr r2, [pc, #160] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a62: f043 0340 orr.w r3, r3, #64 ; 0x40
8003a66: 6313 str r3, [r2, #48] ; 0x30
8003a68: 4b26 ldr r3, [pc, #152] ; (8003b04 <HAL_ETH_MspInit+0x178>)
8003a6a: 6b1b ldr r3, [r3, #48] ; 0x30
8003a6c: f003 0340 and.w r3, r3, #64 ; 0x40
8003a70: 60bb str r3, [r7, #8]
8003a72: 68bb ldr r3, [r7, #8]
PC5 ------> ETH_RXD1
PB11 ------> ETH_TX_EN
PB12 ------> ETH_TXD0
PG14 ------> ETH_TXD1
*/
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5;
8003a74: 2332 movs r3, #50 ; 0x32
8003a76: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8003a78: 2302 movs r3, #2
8003a7a: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003a7c: 2300 movs r3, #0
8003a7e: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8003a80: 2303 movs r3, #3
8003a82: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
8003a84: 230b movs r3, #11
8003a86: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
8003a88: f107 0324 add.w r3, r7, #36 ; 0x24
8003a8c: 4619 mov r1, r3
8003a8e: 481e ldr r0, [pc, #120] ; (8003b08 <HAL_ETH_MspInit+0x17c>)
8003a90: f7fe ff5c bl 800294c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7;
8003a94: 2386 movs r3, #134 ; 0x86
8003a96: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8003a98: 2302 movs r3, #2
8003a9a: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003a9c: 2300 movs r3, #0
8003a9e: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8003aa0: 2303 movs r3, #3
8003aa2: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
8003aa4: 230b movs r3, #11
8003aa6: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
8003aa8: f107 0324 add.w r3, r7, #36 ; 0x24
8003aac: 4619 mov r1, r3
8003aae: 4817 ldr r0, [pc, #92] ; (8003b0c <HAL_ETH_MspInit+0x180>)
8003ab0: f7fe ff4c bl 800294c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
8003ab4: f44f 53c0 mov.w r3, #6144 ; 0x1800
8003ab8: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8003aba: 2302 movs r3, #2
8003abc: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003abe: 2300 movs r3, #0
8003ac0: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8003ac2: 2303 movs r3, #3
8003ac4: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
8003ac6: 230b movs r3, #11
8003ac8: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8003aca: f107 0324 add.w r3, r7, #36 ; 0x24
8003ace: 4619 mov r1, r3
8003ad0: 480f ldr r0, [pc, #60] ; (8003b10 <HAL_ETH_MspInit+0x184>)
8003ad2: f7fe ff3b bl 800294c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_14;
8003ad6: f44f 4380 mov.w r3, #16384 ; 0x4000
8003ada: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8003adc: 2302 movs r3, #2
8003ade: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003ae0: 2300 movs r3, #0
8003ae2: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8003ae4: 2303 movs r3, #3
8003ae6: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
8003ae8: 230b movs r3, #11
8003aea: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
8003aec: f107 0324 add.w r3, r7, #36 ; 0x24
8003af0: 4619 mov r1, r3
8003af2: 4808 ldr r0, [pc, #32] ; (8003b14 <HAL_ETH_MspInit+0x188>)
8003af4: f7fe ff2a bl 800294c <HAL_GPIO_Init>
/* USER CODE BEGIN ETH_MspInit 1 */
/* USER CODE END ETH_MspInit 1 */
}
}
8003af8: bf00 nop
8003afa: 3738 adds r7, #56 ; 0x38
8003afc: 46bd mov sp, r7
8003afe: bd80 pop {r7, pc}
8003b00: 40028000 .word 0x40028000
8003b04: 40023800 .word 0x40023800
8003b08: 40020800 .word 0x40020800
8003b0c: 40020000 .word 0x40020000
8003b10: 40020400 .word 0x40020400
8003b14: 40021800 .word 0x40021800
08003b18 <ETH_PHY_IO_Init>:
* @brief Initializes the MDIO interface GPIO and clocks.
* @param None
* @retval 0 if OK, -1 if ERROR
*/
int32_t ETH_PHY_IO_Init(void)
{
8003b18: b580 push {r7, lr}
8003b1a: af00 add r7, sp, #0
/* We assume that MDIO GPIO configuration is already done
in the ETH_MspInit() else it should be done here
*/
/* Configure the MDIO Clock */
HAL_ETH_SetMDIOClockRange(&heth);
8003b1c: 4802 ldr r0, [pc, #8] ; (8003b28 <ETH_PHY_IO_Init+0x10>)
8003b1e: f7fe fab9 bl 8002094 <HAL_ETH_SetMDIOClockRange>
return 0;
8003b22: 2300 movs r3, #0
}
8003b24: 4618 mov r0, r3
8003b26: bd80 pop {r7, pc}
8003b28: 20005514 .word 0x20005514
08003b2c <ETH_PHY_IO_DeInit>:
* @brief De-Initializes the MDIO interface .
* @param None
* @retval 0 if OK, -1 if ERROR
*/
int32_t ETH_PHY_IO_DeInit (void)
{
8003b2c: b480 push {r7}
8003b2e: af00 add r7, sp, #0
return 0;
8003b30: 2300 movs r3, #0
}
8003b32: 4618 mov r0, r3
8003b34: 46bd mov sp, r7
8003b36: f85d 7b04 ldr.w r7, [sp], #4
8003b3a: 4770 bx lr
08003b3c <ETH_PHY_IO_ReadReg>:
* @param RegAddr: PHY register address
* @param pRegVal: pointer to hold the register value
* @retval 0 if OK -1 if Error
*/
int32_t ETH_PHY_IO_ReadReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t *pRegVal)
{
8003b3c: b580 push {r7, lr}
8003b3e: b084 sub sp, #16
8003b40: af00 add r7, sp, #0
8003b42: 60f8 str r0, [r7, #12]
8003b44: 60b9 str r1, [r7, #8]
8003b46: 607a str r2, [r7, #4]
if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK)
8003b48: 687b ldr r3, [r7, #4]
8003b4a: 68ba ldr r2, [r7, #8]
8003b4c: 68f9 ldr r1, [r7, #12]
8003b4e: 4807 ldr r0, [pc, #28] ; (8003b6c <ETH_PHY_IO_ReadReg+0x30>)
8003b50: f7fe f908 bl 8001d64 <HAL_ETH_ReadPHYRegister>
8003b54: 4603 mov r3, r0
8003b56: 2b00 cmp r3, #0
8003b58: d002 beq.n 8003b60 <ETH_PHY_IO_ReadReg+0x24>
{
return -1;
8003b5a: f04f 33ff mov.w r3, #4294967295
8003b5e: e000 b.n 8003b62 <ETH_PHY_IO_ReadReg+0x26>
}
return 0;
8003b60: 2300 movs r3, #0
}
8003b62: 4618 mov r0, r3
8003b64: 3710 adds r7, #16
8003b66: 46bd mov sp, r7
8003b68: bd80 pop {r7, pc}
8003b6a: bf00 nop
8003b6c: 20005514 .word 0x20005514
08003b70 <ETH_PHY_IO_WriteReg>:
* @param RegAddr: PHY register address
* @param RegVal: Value to be written
* @retval 0 if OK -1 if Error
*/
int32_t ETH_PHY_IO_WriteReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t RegVal)
{
8003b70: b580 push {r7, lr}
8003b72: b084 sub sp, #16
8003b74: af00 add r7, sp, #0
8003b76: 60f8 str r0, [r7, #12]
8003b78: 60b9 str r1, [r7, #8]
8003b7a: 607a str r2, [r7, #4]
if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK)
8003b7c: 687b ldr r3, [r7, #4]
8003b7e: 68ba ldr r2, [r7, #8]
8003b80: 68f9 ldr r1, [r7, #12]
8003b82: 4807 ldr r0, [pc, #28] ; (8003ba0 <ETH_PHY_IO_WriteReg+0x30>)
8003b84: f7fe f939 bl 8001dfa <HAL_ETH_WritePHYRegister>
8003b88: 4603 mov r3, r0
8003b8a: 2b00 cmp r3, #0
8003b8c: d002 beq.n 8003b94 <ETH_PHY_IO_WriteReg+0x24>
{
return -1;
8003b8e: f04f 33ff mov.w r3, #4294967295
8003b92: e000 b.n 8003b96 <ETH_PHY_IO_WriteReg+0x26>
}
return 0;
8003b94: 2300 movs r3, #0
}
8003b96: 4618 mov r0, r3
8003b98: 3710 adds r7, #16
8003b9a: 46bd mov sp, r7
8003b9c: bd80 pop {r7, pc}
8003b9e: bf00 nop
8003ba0: 20005514 .word 0x20005514
08003ba4 <ETH_PHY_IO_GetTick>:
/**
* @brief Get the time in millisecons used for internal PHY driver process.
* @retval Time value
*/
int32_t ETH_PHY_IO_GetTick(void)
{
8003ba4: b580 push {r7, lr}
8003ba6: af00 add r7, sp, #0
return HAL_GetTick();
8003ba8: f7fd fcc4 bl 8001534 <HAL_GetTick>
8003bac: 4603 mov r3, r0
}
8003bae: 4618 mov r0, r3
8003bb0: bd80 pop {r7, pc}
...
08003bb4 <ethernet_link_check_state>:
/**
* @brief Check the ETH link state then update ETH driver and netif link accordingly.
* @retval None
*/
void ethernet_link_check_state(struct netif *netif)
{
8003bb4: b580 push {r7, lr}
8003bb6: b0a0 sub sp, #128 ; 0x80
8003bb8: af00 add r7, sp, #0
8003bba: 6078 str r0, [r7, #4]
ETH_MACConfigTypeDef MACConf = {0};
8003bbc: f107 030c add.w r3, r7, #12
8003bc0: 2264 movs r2, #100 ; 0x64
8003bc2: 2100 movs r1, #0
8003bc4: 4618 mov r0, r3
8003bc6: f00c f96f bl 800fea8 <memset>
int32_t PHYLinkState = 0;
8003bca: 2300 movs r3, #0
8003bcc: 673b str r3, [r7, #112] ; 0x70
uint32_t linkchanged = 0U, speed = 0U, duplex = 0U;
8003bce: 2300 movs r3, #0
8003bd0: 67fb str r3, [r7, #124] ; 0x7c
8003bd2: 2300 movs r3, #0
8003bd4: 67bb str r3, [r7, #120] ; 0x78
8003bd6: 2300 movs r3, #0
8003bd8: 677b str r3, [r7, #116] ; 0x74
PHYLinkState = DP83848_GetLinkState(&DP83848);
8003bda: 483a ldr r0, [pc, #232] ; (8003cc4 <ethernet_link_check_state+0x110>)
8003bdc: f7fd fbbd bl 800135a <DP83848_GetLinkState>
8003be0: 6738 str r0, [r7, #112] ; 0x70
if(netif_is_link_up(netif) && (PHYLinkState <= DP83848_STATUS_LINK_DOWN))
8003be2: 687b ldr r3, [r7, #4]
8003be4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8003be8: 089b lsrs r3, r3, #2
8003bea: f003 0301 and.w r3, r3, #1
8003bee: b2db uxtb r3, r3
8003bf0: 2b00 cmp r3, #0
8003bf2: d00c beq.n 8003c0e <ethernet_link_check_state+0x5a>
8003bf4: 6f3b ldr r3, [r7, #112] ; 0x70
8003bf6: 2b01 cmp r3, #1
8003bf8: dc09 bgt.n 8003c0e <ethernet_link_check_state+0x5a>
{
HAL_ETH_Stop(&heth);
8003bfa: 4833 ldr r0, [pc, #204] ; (8003cc8 <ethernet_link_check_state+0x114>)
8003bfc: f7fd fe8d bl 800191a <HAL_ETH_Stop>
netif_set_down(netif);
8003c00: 6878 ldr r0, [r7, #4]
8003c02: f001 f823 bl 8004c4c <netif_set_down>
netif_set_link_down(netif);
8003c06: 6878 ldr r0, [r7, #4]
8003c08: f001 f88a bl 8004d20 <netif_set_link_down>
netif_set_up(netif);
netif_set_link_up(netif);
}
}
}
8003c0c: e055 b.n 8003cba <ethernet_link_check_state+0x106>
else if(!netif_is_link_up(netif) && (PHYLinkState > DP83848_STATUS_LINK_DOWN))
8003c0e: 687b ldr r3, [r7, #4]
8003c10: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8003c14: f003 0304 and.w r3, r3, #4
8003c18: 2b00 cmp r3, #0
8003c1a: d14e bne.n 8003cba <ethernet_link_check_state+0x106>
8003c1c: 6f3b ldr r3, [r7, #112] ; 0x70
8003c1e: 2b01 cmp r3, #1
8003c20: dd4b ble.n 8003cba <ethernet_link_check_state+0x106>
switch (PHYLinkState)
8003c22: 6f3b ldr r3, [r7, #112] ; 0x70
8003c24: 3b02 subs r3, #2
8003c26: 2b03 cmp r3, #3
8003c28: d82a bhi.n 8003c80 <ethernet_link_check_state+0xcc>
8003c2a: a201 add r2, pc, #4 ; (adr r2, 8003c30 <ethernet_link_check_state+0x7c>)
8003c2c: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8003c30: 08003c41 .word 0x08003c41
8003c34: 08003c53 .word 0x08003c53
8003c38: 08003c63 .word 0x08003c63
8003c3c: 08003c73 .word 0x08003c73
duplex = ETH_FULLDUPLEX_MODE;
8003c40: f44f 6300 mov.w r3, #2048 ; 0x800
8003c44: 677b str r3, [r7, #116] ; 0x74
speed = ETH_SPEED_100M;
8003c46: f44f 4380 mov.w r3, #16384 ; 0x4000
8003c4a: 67bb str r3, [r7, #120] ; 0x78
linkchanged = 1;
8003c4c: 2301 movs r3, #1
8003c4e: 67fb str r3, [r7, #124] ; 0x7c
break;
8003c50: e017 b.n 8003c82 <ethernet_link_check_state+0xce>
duplex = ETH_HALFDUPLEX_MODE;
8003c52: 2300 movs r3, #0
8003c54: 677b str r3, [r7, #116] ; 0x74
speed = ETH_SPEED_100M;
8003c56: f44f 4380 mov.w r3, #16384 ; 0x4000
8003c5a: 67bb str r3, [r7, #120] ; 0x78
linkchanged = 1;
8003c5c: 2301 movs r3, #1
8003c5e: 67fb str r3, [r7, #124] ; 0x7c
break;
8003c60: e00f b.n 8003c82 <ethernet_link_check_state+0xce>
duplex = ETH_FULLDUPLEX_MODE;
8003c62: f44f 6300 mov.w r3, #2048 ; 0x800
8003c66: 677b str r3, [r7, #116] ; 0x74
speed = ETH_SPEED_10M;
8003c68: 2300 movs r3, #0
8003c6a: 67bb str r3, [r7, #120] ; 0x78
linkchanged = 1;
8003c6c: 2301 movs r3, #1
8003c6e: 67fb str r3, [r7, #124] ; 0x7c
break;
8003c70: e007 b.n 8003c82 <ethernet_link_check_state+0xce>
duplex = ETH_HALFDUPLEX_MODE;
8003c72: 2300 movs r3, #0
8003c74: 677b str r3, [r7, #116] ; 0x74
speed = ETH_SPEED_10M;
8003c76: 2300 movs r3, #0
8003c78: 67bb str r3, [r7, #120] ; 0x78
linkchanged = 1;
8003c7a: 2301 movs r3, #1
8003c7c: 67fb str r3, [r7, #124] ; 0x7c
break;
8003c7e: e000 b.n 8003c82 <ethernet_link_check_state+0xce>
break;
8003c80: bf00 nop
if(linkchanged)
8003c82: 6ffb ldr r3, [r7, #124] ; 0x7c
8003c84: 2b00 cmp r3, #0
8003c86: d018 beq.n 8003cba <ethernet_link_check_state+0x106>
HAL_ETH_GetMACConfig(&heth, &MACConf);
8003c88: f107 030c add.w r3, r7, #12
8003c8c: 4619 mov r1, r3
8003c8e: 480e ldr r0, [pc, #56] ; (8003cc8 <ethernet_link_check_state+0x114>)
8003c90: f7fe f8fc bl 8001e8c <HAL_ETH_GetMACConfig>
MACConf.DuplexMode = duplex;
8003c94: 6f7b ldr r3, [r7, #116] ; 0x74
8003c96: 627b str r3, [r7, #36] ; 0x24
MACConf.Speed = speed;
8003c98: 6fbb ldr r3, [r7, #120] ; 0x78
8003c9a: 623b str r3, [r7, #32]
HAL_ETH_SetMACConfig(&heth, &MACConf);
8003c9c: f107 030c add.w r3, r7, #12
8003ca0: 4619 mov r1, r3
8003ca2: 4809 ldr r0, [pc, #36] ; (8003cc8 <ethernet_link_check_state+0x114>)
8003ca4: f7fe f9dc bl 8002060 <HAL_ETH_SetMACConfig>
HAL_ETH_Start(&heth);
8003ca8: 4807 ldr r0, [pc, #28] ; (8003cc8 <ethernet_link_check_state+0x114>)
8003caa: f7fd fdd7 bl 800185c <HAL_ETH_Start>
netif_set_up(netif);
8003cae: 6878 ldr r0, [r7, #4]
8003cb0: f000 ff60 bl 8004b74 <netif_set_up>
netif_set_link_up(netif);
8003cb4: 6878 ldr r0, [r7, #4]
8003cb6: f000 fffb bl 8004cb0 <netif_set_link_up>
}
8003cba: bf00 nop
8003cbc: 3780 adds r7, #128 ; 0x80
8003cbe: 46bd mov sp, r7
8003cc0: bd80 pop {r7, pc}
8003cc2: bf00 nop
8003cc4: 200055fc .word 0x200055fc
8003cc8: 20005514 .word 0x20005514
08003ccc <HAL_ETH_RxAllocateCallback>:
void HAL_ETH_RxAllocateCallback(uint8_t **buff)
{
8003ccc: b580 push {r7, lr}
8003cce: b086 sub sp, #24
8003cd0: af02 add r7, sp, #8
8003cd2: 6078 str r0, [r7, #4]
/* USER CODE BEGIN HAL ETH RxAllocateCallback */
struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL);
8003cd4: 4812 ldr r0, [pc, #72] ; (8003d20 <HAL_ETH_RxAllocateCallback+0x54>)
8003cd6: f000 fcbf bl 8004658 <memp_malloc_pool>
8003cda: 60f8 str r0, [r7, #12]
if (p)
8003cdc: 68fb ldr r3, [r7, #12]
8003cde: 2b00 cmp r3, #0
8003ce0: d014 beq.n 8003d0c <HAL_ETH_RxAllocateCallback+0x40>
{
/* Get the buff from the struct pbuf address. */
*buff = (uint8_t *)p + offsetof(RxBuff_t, buff);
8003ce2: 68fb ldr r3, [r7, #12]
8003ce4: f103 0220 add.w r2, r3, #32
8003ce8: 687b ldr r3, [r7, #4]
8003cea: 601a str r2, [r3, #0]
p->custom_free_function = pbuf_free_custom;
8003cec: 68fb ldr r3, [r7, #12]
8003cee: 4a0d ldr r2, [pc, #52] ; (8003d24 <HAL_ETH_RxAllocateCallback+0x58>)
8003cf0: 611a str r2, [r3, #16]
/* Initialize the struct pbuf.
* This must be performed whenever a buffer's allocated because it may be
* changed by lwIP or the app, e.g., pbuf_free decrements ref. */
pbuf_alloced_custom(PBUF_RAW, 0, PBUF_REF, p, *buff, ETH_RX_BUFFER_SIZE);
8003cf2: 687b ldr r3, [r7, #4]
8003cf4: 681b ldr r3, [r3, #0]
8003cf6: f44f 62c0 mov.w r2, #1536 ; 0x600
8003cfa: 9201 str r2, [sp, #4]
8003cfc: 9300 str r3, [sp, #0]
8003cfe: 68fb ldr r3, [r7, #12]
8003d00: 2241 movs r2, #65 ; 0x41
8003d02: 2100 movs r1, #0
8003d04: 2000 movs r0, #0
8003d06: f001 fa01 bl 800510c <pbuf_alloced_custom>
{
RxAllocStatus = RX_ALLOC_ERROR;
*buff = NULL;
}
/* USER CODE END HAL ETH RxAllocateCallback */
}
8003d0a: e005 b.n 8003d18 <HAL_ETH_RxAllocateCallback+0x4c>
RxAllocStatus = RX_ALLOC_ERROR;
8003d0c: 4b06 ldr r3, [pc, #24] ; (8003d28 <HAL_ETH_RxAllocateCallback+0x5c>)
8003d0e: 2201 movs r2, #1
8003d10: 701a strb r2, [r3, #0]
*buff = NULL;
8003d12: 687b ldr r3, [r7, #4]
8003d14: 2200 movs r2, #0
8003d16: 601a str r2, [r3, #0]
}
8003d18: bf00 nop
8003d1a: 3710 adds r7, #16
8003d1c: 46bd mov sp, r7
8003d1e: bd80 pop {r7, pc}
8003d20: 080177d8 .word 0x080177d8
8003d24: 08003949 .word 0x08003949
8003d28: 200053d0 .word 0x200053d0
08003d2c <HAL_ETH_RxLinkCallback>:
void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length)
{
8003d2c: b480 push {r7}
8003d2e: b089 sub sp, #36 ; 0x24
8003d30: af00 add r7, sp, #0
8003d32: 60f8 str r0, [r7, #12]
8003d34: 60b9 str r1, [r7, #8]
8003d36: 607a str r2, [r7, #4]
8003d38: 807b strh r3, [r7, #2]
/* USER CODE BEGIN HAL ETH RxLinkCallback */
struct pbuf **ppStart = (struct pbuf **)pStart;
8003d3a: 68fb ldr r3, [r7, #12]
8003d3c: 61bb str r3, [r7, #24]
struct pbuf **ppEnd = (struct pbuf **)pEnd;
8003d3e: 68bb ldr r3, [r7, #8]
8003d40: 617b str r3, [r7, #20]
struct pbuf *p = NULL;
8003d42: 2300 movs r3, #0
8003d44: 61fb str r3, [r7, #28]
/* Get the struct pbuf from the buff address. */
p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff));
8003d46: 687b ldr r3, [r7, #4]
8003d48: 3b20 subs r3, #32
8003d4a: 61fb str r3, [r7, #28]
p->next = NULL;
8003d4c: 69fb ldr r3, [r7, #28]
8003d4e: 2200 movs r2, #0
8003d50: 601a str r2, [r3, #0]
p->tot_len = 0;
8003d52: 69fb ldr r3, [r7, #28]
8003d54: 2200 movs r2, #0
8003d56: 811a strh r2, [r3, #8]
p->len = Length;
8003d58: 69fb ldr r3, [r7, #28]
8003d5a: 887a ldrh r2, [r7, #2]
8003d5c: 815a strh r2, [r3, #10]
/* Chain the buffer. */
if (!*ppStart)
8003d5e: 69bb ldr r3, [r7, #24]
8003d60: 681b ldr r3, [r3, #0]
8003d62: 2b00 cmp r3, #0
8003d64: d103 bne.n 8003d6e <HAL_ETH_RxLinkCallback+0x42>
{
/* The first buffer of the packet. */
*ppStart = p;
8003d66: 69bb ldr r3, [r7, #24]
8003d68: 69fa ldr r2, [r7, #28]
8003d6a: 601a str r2, [r3, #0]
8003d6c: e003 b.n 8003d76 <HAL_ETH_RxLinkCallback+0x4a>
}
else
{
/* Chain the buffer to the end of the packet. */
(*ppEnd)->next = p;
8003d6e: 697b ldr r3, [r7, #20]
8003d70: 681b ldr r3, [r3, #0]
8003d72: 69fa ldr r2, [r7, #28]
8003d74: 601a str r2, [r3, #0]
}
*ppEnd = p;
8003d76: 697b ldr r3, [r7, #20]
8003d78: 69fa ldr r2, [r7, #28]
8003d7a: 601a str r2, [r3, #0]
/* Update the total length of all the buffers of the chain. Each pbuf in the chain should have its tot_len
* set to its own length, plus the length of all the following pbufs in the chain. */
for (p = *ppStart; p != NULL; p = p->next)
8003d7c: 69bb ldr r3, [r7, #24]
8003d7e: 681b ldr r3, [r3, #0]
8003d80: 61fb str r3, [r7, #28]
8003d82: e009 b.n 8003d98 <HAL_ETH_RxLinkCallback+0x6c>
{
p->tot_len += Length;
8003d84: 69fb ldr r3, [r7, #28]
8003d86: 891a ldrh r2, [r3, #8]
8003d88: 887b ldrh r3, [r7, #2]
8003d8a: 4413 add r3, r2
8003d8c: b29a uxth r2, r3
8003d8e: 69fb ldr r3, [r7, #28]
8003d90: 811a strh r2, [r3, #8]
for (p = *ppStart; p != NULL; p = p->next)
8003d92: 69fb ldr r3, [r7, #28]
8003d94: 681b ldr r3, [r3, #0]
8003d96: 61fb str r3, [r7, #28]
8003d98: 69fb ldr r3, [r7, #28]
8003d9a: 2b00 cmp r3, #0
8003d9c: d1f2 bne.n 8003d84 <HAL_ETH_RxLinkCallback+0x58>
}
/* USER CODE END HAL ETH RxLinkCallback */
}
8003d9e: bf00 nop
8003da0: bf00 nop
8003da2: 3724 adds r7, #36 ; 0x24
8003da4: 46bd mov sp, r7
8003da6: f85d 7b04 ldr.w r7, [sp], #4
8003daa: 4770 bx lr
08003dac <lwip_htons>:
* @param n u16_t in host byte order
* @return n in network byte order
*/
u16_t
lwip_htons(u16_t n)
{
8003dac: b480 push {r7}
8003dae: b083 sub sp, #12
8003db0: af00 add r7, sp, #0
8003db2: 4603 mov r3, r0
8003db4: 80fb strh r3, [r7, #6]
return PP_HTONS(n);
8003db6: 88fb ldrh r3, [r7, #6]
8003db8: 021b lsls r3, r3, #8
8003dba: b21a sxth r2, r3
8003dbc: 88fb ldrh r3, [r7, #6]
8003dbe: 0a1b lsrs r3, r3, #8
8003dc0: b29b uxth r3, r3
8003dc2: b21b sxth r3, r3
8003dc4: 4313 orrs r3, r2
8003dc6: b21b sxth r3, r3
8003dc8: b29b uxth r3, r3
}
8003dca: 4618 mov r0, r3
8003dcc: 370c adds r7, #12
8003dce: 46bd mov sp, r7
8003dd0: f85d 7b04 ldr.w r7, [sp], #4
8003dd4: 4770 bx lr
08003dd6 <lwip_htonl>:
* @param n u32_t in host byte order
* @return n in network byte order
*/
u32_t
lwip_htonl(u32_t n)
{
8003dd6: b480 push {r7}
8003dd8: b083 sub sp, #12
8003dda: af00 add r7, sp, #0
8003ddc: 6078 str r0, [r7, #4]
return PP_HTONL(n);
8003dde: 687b ldr r3, [r7, #4]
8003de0: 061a lsls r2, r3, #24
8003de2: 687b ldr r3, [r7, #4]
8003de4: 021b lsls r3, r3, #8
8003de6: f403 037f and.w r3, r3, #16711680 ; 0xff0000
8003dea: 431a orrs r2, r3
8003dec: 687b ldr r3, [r7, #4]
8003dee: 0a1b lsrs r3, r3, #8
8003df0: f403 437f and.w r3, r3, #65280 ; 0xff00
8003df4: 431a orrs r2, r3
8003df6: 687b ldr r3, [r7, #4]
8003df8: 0e1b lsrs r3, r3, #24
8003dfa: 4313 orrs r3, r2
}
8003dfc: 4618 mov r0, r3
8003dfe: 370c adds r7, #12
8003e00: 46bd mov sp, r7
8003e02: f85d 7b04 ldr.w r7, [sp], #4
8003e06: 4770 bx lr
08003e08 <lwip_init>:
* Initialize all modules.
* Use this in NO_SYS mode. Use tcpip_init() otherwise.
*/
void
lwip_init(void)
{
8003e08: b580 push {r7, lr}
8003e0a: b082 sub sp, #8
8003e0c: af00 add r7, sp, #0
#ifndef LWIP_SKIP_CONST_CHECK
int a = 0;
8003e0e: 2300 movs r3, #0
8003e10: 607b str r3, [r7, #4]
/* Modules initialization */
stats_init();
#if !NO_SYS
sys_init();
#endif /* !NO_SYS */
mem_init();
8003e12: f000 f8d5 bl 8003fc0 <mem_init>
memp_init();
8003e16: f000 fbdb bl 80045d0 <memp_init>
pbuf_init();
netif_init();
8003e1a: f000 fcd9 bl 80047d0 <netif_init>
#endif /* LWIP_IPV4 */
#if LWIP_RAW
raw_init();
#endif /* LWIP_RAW */
#if LWIP_UDP
udp_init();
8003e1e: f007 f873 bl 800af08 <udp_init>
#endif /* LWIP_UDP */
#if LWIP_TCP
tcp_init();
8003e22: f001 fdcb bl 80059bc <tcp_init>
#if PPP_SUPPORT
ppp_init();
#endif
#if LWIP_TIMERS
sys_timeouts_init();
8003e26: f006 ffe5 bl 800adf4 <sys_timeouts_init>
#endif /* LWIP_TIMERS */
}
8003e2a: bf00 nop
8003e2c: 3708 adds r7, #8
8003e2e: 46bd mov sp, r7
8003e30: bd80 pop {r7, pc}
...
08003e34 <ptr_to_mem>:
#define mem_overflow_check_element(mem)
#endif /* MEM_OVERFLOW_CHECK */
static struct mem *
ptr_to_mem(mem_size_t ptr)
{
8003e34: b480 push {r7}
8003e36: b083 sub sp, #12
8003e38: af00 add r7, sp, #0
8003e3a: 4603 mov r3, r0
8003e3c: 80fb strh r3, [r7, #6]
return (struct mem *)(void *)&ram[ptr];
8003e3e: 4b05 ldr r3, [pc, #20] ; (8003e54 <ptr_to_mem+0x20>)
8003e40: 681a ldr r2, [r3, #0]
8003e42: 88fb ldrh r3, [r7, #6]
8003e44: 4413 add r3, r2
}
8003e46: 4618 mov r0, r3
8003e48: 370c adds r7, #12
8003e4a: 46bd mov sp, r7
8003e4c: f85d 7b04 ldr.w r7, [sp], #4
8003e50: 4770 bx lr
8003e52: bf00 nop
8003e54: 20005c88 .word 0x20005c88
08003e58 <mem_to_ptr>:
static mem_size_t
mem_to_ptr(void *mem)
{
8003e58: b480 push {r7}
8003e5a: b083 sub sp, #12
8003e5c: af00 add r7, sp, #0
8003e5e: 6078 str r0, [r7, #4]
return (mem_size_t)((u8_t *)mem - ram);
8003e60: 4b05 ldr r3, [pc, #20] ; (8003e78 <mem_to_ptr+0x20>)
8003e62: 681b ldr r3, [r3, #0]
8003e64: 687a ldr r2, [r7, #4]
8003e66: 1ad3 subs r3, r2, r3
8003e68: b29b uxth r3, r3
}
8003e6a: 4618 mov r0, r3
8003e6c: 370c adds r7, #12
8003e6e: 46bd mov sp, r7
8003e70: f85d 7b04 ldr.w r7, [sp], #4
8003e74: 4770 bx lr
8003e76: bf00 nop
8003e78: 20005c88 .word 0x20005c88
08003e7c <plug_holes>:
* This assumes access to the heap is protected by the calling function
* already.
*/
static void
plug_holes(struct mem *mem)
{
8003e7c: b590 push {r4, r7, lr}
8003e7e: b085 sub sp, #20
8003e80: af00 add r7, sp, #0
8003e82: 6078 str r0, [r7, #4]
struct mem *nmem;
struct mem *pmem;
LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram);
8003e84: 4b45 ldr r3, [pc, #276] ; (8003f9c <plug_holes+0x120>)
8003e86: 681b ldr r3, [r3, #0]
8003e88: 687a ldr r2, [r7, #4]
8003e8a: 429a cmp r2, r3
8003e8c: d206 bcs.n 8003e9c <plug_holes+0x20>
8003e8e: 4b44 ldr r3, [pc, #272] ; (8003fa0 <plug_holes+0x124>)
8003e90: f240 12df movw r2, #479 ; 0x1df
8003e94: 4943 ldr r1, [pc, #268] ; (8003fa4 <plug_holes+0x128>)
8003e96: 4844 ldr r0, [pc, #272] ; (8003fa8 <plug_holes+0x12c>)
8003e98: f00c f80e bl 800feb8 <printf>
LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end);
8003e9c: 4b43 ldr r3, [pc, #268] ; (8003fac <plug_holes+0x130>)
8003e9e: 681b ldr r3, [r3, #0]
8003ea0: 687a ldr r2, [r7, #4]
8003ea2: 429a cmp r2, r3
8003ea4: d306 bcc.n 8003eb4 <plug_holes+0x38>
8003ea6: 4b3e ldr r3, [pc, #248] ; (8003fa0 <plug_holes+0x124>)
8003ea8: f44f 72f0 mov.w r2, #480 ; 0x1e0
8003eac: 4940 ldr r1, [pc, #256] ; (8003fb0 <plug_holes+0x134>)
8003eae: 483e ldr r0, [pc, #248] ; (8003fa8 <plug_holes+0x12c>)
8003eb0: f00c f802 bl 800feb8 <printf>
LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0);
8003eb4: 687b ldr r3, [r7, #4]
8003eb6: 791b ldrb r3, [r3, #4]
8003eb8: 2b00 cmp r3, #0
8003eba: d006 beq.n 8003eca <plug_holes+0x4e>
8003ebc: 4b38 ldr r3, [pc, #224] ; (8003fa0 <plug_holes+0x124>)
8003ebe: f240 12e1 movw r2, #481 ; 0x1e1
8003ec2: 493c ldr r1, [pc, #240] ; (8003fb4 <plug_holes+0x138>)
8003ec4: 4838 ldr r0, [pc, #224] ; (8003fa8 <plug_holes+0x12c>)
8003ec6: f00b fff7 bl 800feb8 <printf>
/* plug hole forward */
LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED);
8003eca: 687b ldr r3, [r7, #4]
8003ecc: 881b ldrh r3, [r3, #0]
8003ece: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8003ed2: d906 bls.n 8003ee2 <plug_holes+0x66>
8003ed4: 4b32 ldr r3, [pc, #200] ; (8003fa0 <plug_holes+0x124>)
8003ed6: f44f 72f2 mov.w r2, #484 ; 0x1e4
8003eda: 4937 ldr r1, [pc, #220] ; (8003fb8 <plug_holes+0x13c>)
8003edc: 4832 ldr r0, [pc, #200] ; (8003fa8 <plug_holes+0x12c>)
8003ede: f00b ffeb bl 800feb8 <printf>
nmem = ptr_to_mem(mem->next);
8003ee2: 687b ldr r3, [r7, #4]
8003ee4: 881b ldrh r3, [r3, #0]
8003ee6: 4618 mov r0, r3
8003ee8: f7ff ffa4 bl 8003e34 <ptr_to_mem>
8003eec: 60f8 str r0, [r7, #12]
if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) {
8003eee: 687a ldr r2, [r7, #4]
8003ef0: 68fb ldr r3, [r7, #12]
8003ef2: 429a cmp r2, r3
8003ef4: d024 beq.n 8003f40 <plug_holes+0xc4>
8003ef6: 68fb ldr r3, [r7, #12]
8003ef8: 791b ldrb r3, [r3, #4]
8003efa: 2b00 cmp r3, #0
8003efc: d120 bne.n 8003f40 <plug_holes+0xc4>
8003efe: 4b2b ldr r3, [pc, #172] ; (8003fac <plug_holes+0x130>)
8003f00: 681b ldr r3, [r3, #0]
8003f02: 68fa ldr r2, [r7, #12]
8003f04: 429a cmp r2, r3
8003f06: d01b beq.n 8003f40 <plug_holes+0xc4>
/* if mem->next is unused and not end of ram, combine mem and mem->next */
if (lfree == nmem) {
8003f08: 4b2c ldr r3, [pc, #176] ; (8003fbc <plug_holes+0x140>)
8003f0a: 681b ldr r3, [r3, #0]
8003f0c: 68fa ldr r2, [r7, #12]
8003f0e: 429a cmp r2, r3
8003f10: d102 bne.n 8003f18 <plug_holes+0x9c>
lfree = mem;
8003f12: 4a2a ldr r2, [pc, #168] ; (8003fbc <plug_holes+0x140>)
8003f14: 687b ldr r3, [r7, #4]
8003f16: 6013 str r3, [r2, #0]
}
mem->next = nmem->next;
8003f18: 68fb ldr r3, [r7, #12]
8003f1a: 881a ldrh r2, [r3, #0]
8003f1c: 687b ldr r3, [r7, #4]
8003f1e: 801a strh r2, [r3, #0]
if (nmem->next != MEM_SIZE_ALIGNED) {
8003f20: 68fb ldr r3, [r7, #12]
8003f22: 881b ldrh r3, [r3, #0]
8003f24: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8003f28: d00a beq.n 8003f40 <plug_holes+0xc4>
ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem);
8003f2a: 68fb ldr r3, [r7, #12]
8003f2c: 881b ldrh r3, [r3, #0]
8003f2e: 4618 mov r0, r3
8003f30: f7ff ff80 bl 8003e34 <ptr_to_mem>
8003f34: 4604 mov r4, r0
8003f36: 6878 ldr r0, [r7, #4]
8003f38: f7ff ff8e bl 8003e58 <mem_to_ptr>
8003f3c: 4603 mov r3, r0
8003f3e: 8063 strh r3, [r4, #2]
}
}
/* plug hole backward */
pmem = ptr_to_mem(mem->prev);
8003f40: 687b ldr r3, [r7, #4]
8003f42: 885b ldrh r3, [r3, #2]
8003f44: 4618 mov r0, r3
8003f46: f7ff ff75 bl 8003e34 <ptr_to_mem>
8003f4a: 60b8 str r0, [r7, #8]
if (pmem != mem && pmem->used == 0) {
8003f4c: 68ba ldr r2, [r7, #8]
8003f4e: 687b ldr r3, [r7, #4]
8003f50: 429a cmp r2, r3
8003f52: d01f beq.n 8003f94 <plug_holes+0x118>
8003f54: 68bb ldr r3, [r7, #8]
8003f56: 791b ldrb r3, [r3, #4]
8003f58: 2b00 cmp r3, #0
8003f5a: d11b bne.n 8003f94 <plug_holes+0x118>
/* if mem->prev is unused, combine mem and mem->prev */
if (lfree == mem) {
8003f5c: 4b17 ldr r3, [pc, #92] ; (8003fbc <plug_holes+0x140>)
8003f5e: 681b ldr r3, [r3, #0]
8003f60: 687a ldr r2, [r7, #4]
8003f62: 429a cmp r2, r3
8003f64: d102 bne.n 8003f6c <plug_holes+0xf0>
lfree = pmem;
8003f66: 4a15 ldr r2, [pc, #84] ; (8003fbc <plug_holes+0x140>)
8003f68: 68bb ldr r3, [r7, #8]
8003f6a: 6013 str r3, [r2, #0]
}
pmem->next = mem->next;
8003f6c: 687b ldr r3, [r7, #4]
8003f6e: 881a ldrh r2, [r3, #0]
8003f70: 68bb ldr r3, [r7, #8]
8003f72: 801a strh r2, [r3, #0]
if (mem->next != MEM_SIZE_ALIGNED) {
8003f74: 687b ldr r3, [r7, #4]
8003f76: 881b ldrh r3, [r3, #0]
8003f78: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8003f7c: d00a beq.n 8003f94 <plug_holes+0x118>
ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem);
8003f7e: 687b ldr r3, [r7, #4]
8003f80: 881b ldrh r3, [r3, #0]
8003f82: 4618 mov r0, r3
8003f84: f7ff ff56 bl 8003e34 <ptr_to_mem>
8003f88: 4604 mov r4, r0
8003f8a: 68b8 ldr r0, [r7, #8]
8003f8c: f7ff ff64 bl 8003e58 <mem_to_ptr>
8003f90: 4603 mov r3, r0
8003f92: 8063 strh r3, [r4, #2]
}
}
}
8003f94: bf00 nop
8003f96: 3714 adds r7, #20
8003f98: 46bd mov sp, r7
8003f9a: bd90 pop {r4, r7, pc}
8003f9c: 20005c88 .word 0x20005c88
8003fa0: 08014a2c .word 0x08014a2c
8003fa4: 08014a5c .word 0x08014a5c
8003fa8: 08014a74 .word 0x08014a74
8003fac: 20005c8c .word 0x20005c8c
8003fb0: 08014a9c .word 0x08014a9c
8003fb4: 08014ab8 .word 0x08014ab8
8003fb8: 08014ad4 .word 0x08014ad4
8003fbc: 20005c90 .word 0x20005c90
08003fc0 <mem_init>:
/**
* Zero the heap and initialize start, end and lowest-free
*/
void
mem_init(void)
{
8003fc0: b580 push {r7, lr}
8003fc2: b082 sub sp, #8
8003fc4: af00 add r7, sp, #0
LWIP_ASSERT("Sanity check alignment",
(SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT - 1)) == 0);
/* align the heap */
ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER);
8003fc6: 4b18 ldr r3, [pc, #96] ; (8004028 <mem_init+0x68>)
8003fc8: 3303 adds r3, #3
8003fca: f023 0303 bic.w r3, r3, #3
8003fce: 461a mov r2, r3
8003fd0: 4b16 ldr r3, [pc, #88] ; (800402c <mem_init+0x6c>)
8003fd2: 601a str r2, [r3, #0]
/* initialize the start of the heap */
mem = (struct mem *)(void *)ram;
8003fd4: 4b15 ldr r3, [pc, #84] ; (800402c <mem_init+0x6c>)
8003fd6: 681b ldr r3, [r3, #0]
8003fd8: 607b str r3, [r7, #4]
mem->next = MEM_SIZE_ALIGNED;
8003fda: 687b ldr r3, [r7, #4]
8003fdc: f44f 62c8 mov.w r2, #1600 ; 0x640
8003fe0: 801a strh r2, [r3, #0]
mem->prev = 0;
8003fe2: 687b ldr r3, [r7, #4]
8003fe4: 2200 movs r2, #0
8003fe6: 805a strh r2, [r3, #2]
mem->used = 0;
8003fe8: 687b ldr r3, [r7, #4]
8003fea: 2200 movs r2, #0
8003fec: 711a strb r2, [r3, #4]
/* initialize the end of the heap */
ram_end = ptr_to_mem(MEM_SIZE_ALIGNED);
8003fee: f44f 60c8 mov.w r0, #1600 ; 0x640
8003ff2: f7ff ff1f bl 8003e34 <ptr_to_mem>
8003ff6: 4603 mov r3, r0
8003ff8: 4a0d ldr r2, [pc, #52] ; (8004030 <mem_init+0x70>)
8003ffa: 6013 str r3, [r2, #0]
ram_end->used = 1;
8003ffc: 4b0c ldr r3, [pc, #48] ; (8004030 <mem_init+0x70>)
8003ffe: 681b ldr r3, [r3, #0]
8004000: 2201 movs r2, #1
8004002: 711a strb r2, [r3, #4]
ram_end->next = MEM_SIZE_ALIGNED;
8004004: 4b0a ldr r3, [pc, #40] ; (8004030 <mem_init+0x70>)
8004006: 681b ldr r3, [r3, #0]
8004008: f44f 62c8 mov.w r2, #1600 ; 0x640
800400c: 801a strh r2, [r3, #0]
ram_end->prev = MEM_SIZE_ALIGNED;
800400e: 4b08 ldr r3, [pc, #32] ; (8004030 <mem_init+0x70>)
8004010: 681b ldr r3, [r3, #0]
8004012: f44f 62c8 mov.w r2, #1600 ; 0x640
8004016: 805a strh r2, [r3, #2]
MEM_SANITY();
/* initialize the lowest-free pointer to the start of the heap */
lfree = (struct mem *)(void *)ram;
8004018: 4b04 ldr r3, [pc, #16] ; (800402c <mem_init+0x6c>)
800401a: 681b ldr r3, [r3, #0]
800401c: 4a05 ldr r2, [pc, #20] ; (8004034 <mem_init+0x74>)
800401e: 6013 str r3, [r2, #0]
MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED);
if (sys_mutex_new(&mem_mutex) != ERR_OK) {
LWIP_ASSERT("failed to create mem_mutex", 0);
}
}
8004020: bf00 nop
8004022: 3708 adds r7, #8
8004024: 46bd mov sp, r7
8004026: bd80 pop {r7, pc}
8004028: 20005634 .word 0x20005634
800402c: 20005c88 .word 0x20005c88
8004030: 20005c8c .word 0x20005c8c
8004034: 20005c90 .word 0x20005c90
08004038 <mem_link_valid>:
/* Check if a struct mem is correctly linked.
* If not, double-free is a possible reason.
*/
static int
mem_link_valid(struct mem *mem)
{
8004038: b580 push {r7, lr}
800403a: b086 sub sp, #24
800403c: af00 add r7, sp, #0
800403e: 6078 str r0, [r7, #4]
struct mem *nmem, *pmem;
mem_size_t rmem_idx;
rmem_idx = mem_to_ptr(mem);
8004040: 6878 ldr r0, [r7, #4]
8004042: f7ff ff09 bl 8003e58 <mem_to_ptr>
8004046: 4603 mov r3, r0
8004048: 82fb strh r3, [r7, #22]
nmem = ptr_to_mem(mem->next);
800404a: 687b ldr r3, [r7, #4]
800404c: 881b ldrh r3, [r3, #0]
800404e: 4618 mov r0, r3
8004050: f7ff fef0 bl 8003e34 <ptr_to_mem>
8004054: 6138 str r0, [r7, #16]
pmem = ptr_to_mem(mem->prev);
8004056: 687b ldr r3, [r7, #4]
8004058: 885b ldrh r3, [r3, #2]
800405a: 4618 mov r0, r3
800405c: f7ff feea bl 8003e34 <ptr_to_mem>
8004060: 60f8 str r0, [r7, #12]
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
8004062: 687b ldr r3, [r7, #4]
8004064: 881b ldrh r3, [r3, #0]
8004066: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
800406a: d818 bhi.n 800409e <mem_link_valid+0x66>
800406c: 687b ldr r3, [r7, #4]
800406e: 885b ldrh r3, [r3, #2]
8004070: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8004074: d813 bhi.n 800409e <mem_link_valid+0x66>
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
8004076: 687b ldr r3, [r7, #4]
8004078: 885b ldrh r3, [r3, #2]
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
800407a: 8afa ldrh r2, [r7, #22]
800407c: 429a cmp r2, r3
800407e: d004 beq.n 800408a <mem_link_valid+0x52>
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
8004080: 68fb ldr r3, [r7, #12]
8004082: 881b ldrh r3, [r3, #0]
8004084: 8afa ldrh r2, [r7, #22]
8004086: 429a cmp r2, r3
8004088: d109 bne.n 800409e <mem_link_valid+0x66>
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
800408a: 4b08 ldr r3, [pc, #32] ; (80040ac <mem_link_valid+0x74>)
800408c: 681b ldr r3, [r3, #0]
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
800408e: 693a ldr r2, [r7, #16]
8004090: 429a cmp r2, r3
8004092: d006 beq.n 80040a2 <mem_link_valid+0x6a>
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
8004094: 693b ldr r3, [r7, #16]
8004096: 885b ldrh r3, [r3, #2]
8004098: 8afa ldrh r2, [r7, #22]
800409a: 429a cmp r2, r3
800409c: d001 beq.n 80040a2 <mem_link_valid+0x6a>
return 0;
800409e: 2300 movs r3, #0
80040a0: e000 b.n 80040a4 <mem_link_valid+0x6c>
}
return 1;
80040a2: 2301 movs r3, #1
}
80040a4: 4618 mov r0, r3
80040a6: 3718 adds r7, #24
80040a8: 46bd mov sp, r7
80040aa: bd80 pop {r7, pc}
80040ac: 20005c8c .word 0x20005c8c
080040b0 <mem_free>:
* @param rmem is the data portion of a struct mem as returned by a previous
* call to mem_malloc()
*/
void
mem_free(void *rmem)
{
80040b0: b580 push {r7, lr}
80040b2: b084 sub sp, #16
80040b4: af00 add r7, sp, #0
80040b6: 6078 str r0, [r7, #4]
struct mem *mem;
LWIP_MEM_FREE_DECL_PROTECT();
if (rmem == NULL) {
80040b8: 687b ldr r3, [r7, #4]
80040ba: 2b00 cmp r3, #0
80040bc: d04c beq.n 8004158 <mem_free+0xa8>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n"));
return;
}
if ((((mem_ptr_t)rmem) & (MEM_ALIGNMENT - 1)) != 0) {
80040be: 687b ldr r3, [r7, #4]
80040c0: f003 0303 and.w r3, r3, #3
80040c4: 2b00 cmp r3, #0
80040c6: d007 beq.n 80040d8 <mem_free+0x28>
LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment");
80040c8: 4b25 ldr r3, [pc, #148] ; (8004160 <mem_free+0xb0>)
80040ca: f240 2273 movw r2, #627 ; 0x273
80040ce: 4925 ldr r1, [pc, #148] ; (8004164 <mem_free+0xb4>)
80040d0: 4825 ldr r0, [pc, #148] ; (8004168 <mem_free+0xb8>)
80040d2: f00b fef1 bl 800feb8 <printf>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: sanity check alignment\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
return;
80040d6: e040 b.n 800415a <mem_free+0xaa>
}
/* Get the corresponding struct mem: */
/* cast through void* to get rid of alignment warnings */
mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET));
80040d8: 687b ldr r3, [r7, #4]
80040da: 3b08 subs r3, #8
80040dc: 60fb str r3, [r7, #12]
if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) {
80040de: 4b23 ldr r3, [pc, #140] ; (800416c <mem_free+0xbc>)
80040e0: 681b ldr r3, [r3, #0]
80040e2: 68fa ldr r2, [r7, #12]
80040e4: 429a cmp r2, r3
80040e6: d306 bcc.n 80040f6 <mem_free+0x46>
80040e8: 687b ldr r3, [r7, #4]
80040ea: f103 020c add.w r2, r3, #12
80040ee: 4b20 ldr r3, [pc, #128] ; (8004170 <mem_free+0xc0>)
80040f0: 681b ldr r3, [r3, #0]
80040f2: 429a cmp r2, r3
80040f4: d907 bls.n 8004106 <mem_free+0x56>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory");
80040f6: 4b1a ldr r3, [pc, #104] ; (8004160 <mem_free+0xb0>)
80040f8: f240 227f movw r2, #639 ; 0x27f
80040fc: 491d ldr r1, [pc, #116] ; (8004174 <mem_free+0xc4>)
80040fe: 481a ldr r0, [pc, #104] ; (8004168 <mem_free+0xb8>)
8004100: f00b feda bl 800feb8 <printf>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
return;
8004104: e029 b.n 800415a <mem_free+0xaa>
mem_overflow_check_element(mem);
#endif
/* protect the heap from concurrent access */
LWIP_MEM_FREE_PROTECT();
/* mem has to be in a used state */
if (!mem->used) {
8004106: 68fb ldr r3, [r7, #12]
8004108: 791b ldrb r3, [r3, #4]
800410a: 2b00 cmp r3, #0
800410c: d107 bne.n 800411e <mem_free+0x6e>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free");
800410e: 4b14 ldr r3, [pc, #80] ; (8004160 <mem_free+0xb0>)
8004110: f44f 7223 mov.w r2, #652 ; 0x28c
8004114: 4918 ldr r1, [pc, #96] ; (8004178 <mem_free+0xc8>)
8004116: 4814 ldr r0, [pc, #80] ; (8004168 <mem_free+0xb8>)
8004118: f00b fece bl 800feb8 <printf>
LWIP_MEM_FREE_UNPROTECT();
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory: double free?\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
return;
800411c: e01d b.n 800415a <mem_free+0xaa>
}
if (!mem_link_valid(mem)) {
800411e: 68f8 ldr r0, [r7, #12]
8004120: f7ff ff8a bl 8004038 <mem_link_valid>
8004124: 4603 mov r3, r0
8004126: 2b00 cmp r3, #0
8004128: d107 bne.n 800413a <mem_free+0x8a>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free");
800412a: 4b0d ldr r3, [pc, #52] ; (8004160 <mem_free+0xb0>)
800412c: f240 2295 movw r2, #661 ; 0x295
8004130: 4912 ldr r1, [pc, #72] ; (800417c <mem_free+0xcc>)
8004132: 480d ldr r0, [pc, #52] ; (8004168 <mem_free+0xb8>)
8004134: f00b fec0 bl 800feb8 <printf>
LWIP_MEM_FREE_UNPROTECT();
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory: non-linked: double free?\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
return;
8004138: e00f b.n 800415a <mem_free+0xaa>
}
/* mem is now unused. */
mem->used = 0;
800413a: 68fb ldr r3, [r7, #12]
800413c: 2200 movs r2, #0
800413e: 711a strb r2, [r3, #4]
if (mem < lfree) {
8004140: 4b0f ldr r3, [pc, #60] ; (8004180 <mem_free+0xd0>)
8004142: 681b ldr r3, [r3, #0]
8004144: 68fa ldr r2, [r7, #12]
8004146: 429a cmp r2, r3
8004148: d202 bcs.n 8004150 <mem_free+0xa0>
/* the newly freed struct is now the lowest */
lfree = mem;
800414a: 4a0d ldr r2, [pc, #52] ; (8004180 <mem_free+0xd0>)
800414c: 68fb ldr r3, [r7, #12]
800414e: 6013 str r3, [r2, #0]
}
MEM_STATS_DEC_USED(used, mem->next - (mem_size_t)(((u8_t *)mem - ram)));
/* finally, see if prev or next are free also */
plug_holes(mem);
8004150: 68f8 ldr r0, [r7, #12]
8004152: f7ff fe93 bl 8003e7c <plug_holes>
8004156: e000 b.n 800415a <mem_free+0xaa>
return;
8004158: bf00 nop
MEM_SANITY();
#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
mem_free_count = 1;
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
LWIP_MEM_FREE_UNPROTECT();
}
800415a: 3710 adds r7, #16
800415c: 46bd mov sp, r7
800415e: bd80 pop {r7, pc}
8004160: 08014a2c .word 0x08014a2c
8004164: 08014b00 .word 0x08014b00
8004168: 08014a74 .word 0x08014a74
800416c: 20005c88 .word 0x20005c88
8004170: 20005c8c .word 0x20005c8c
8004174: 08014b24 .word 0x08014b24
8004178: 08014b40 .word 0x08014b40
800417c: 08014b68 .word 0x08014b68
8004180: 20005c90 .word 0x20005c90
08004184 <mem_trim>:
* or NULL if newsize is > old size, in which case rmem is NOT touched
* or freed!
*/
void *
mem_trim(void *rmem, mem_size_t new_size)
{
8004184: b580 push {r7, lr}
8004186: b088 sub sp, #32
8004188: af00 add r7, sp, #0
800418a: 6078 str r0, [r7, #4]
800418c: 460b mov r3, r1
800418e: 807b strh r3, [r7, #2]
/* use the FREE_PROTECT here: it protects with sem OR SYS_ARCH_PROTECT */
LWIP_MEM_FREE_DECL_PROTECT();
/* Expand the size of the allocated memory region so that we can
adjust for alignment. */
newsize = (mem_size_t)LWIP_MEM_ALIGN_SIZE(new_size);
8004190: 887b ldrh r3, [r7, #2]
8004192: 3303 adds r3, #3
8004194: b29b uxth r3, r3
8004196: f023 0303 bic.w r3, r3, #3
800419a: 83fb strh r3, [r7, #30]
if (newsize < MIN_SIZE_ALIGNED) {
800419c: 8bfb ldrh r3, [r7, #30]
800419e: 2b0b cmp r3, #11
80041a0: d801 bhi.n 80041a6 <mem_trim+0x22>
/* every data block must be at least MIN_SIZE_ALIGNED long */
newsize = MIN_SIZE_ALIGNED;
80041a2: 230c movs r3, #12
80041a4: 83fb strh r3, [r7, #30]
}
#if MEM_OVERFLOW_CHECK
newsize += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED;
#endif
if ((newsize > MEM_SIZE_ALIGNED) || (newsize < new_size)) {
80041a6: 8bfb ldrh r3, [r7, #30]
80041a8: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80041ac: d803 bhi.n 80041b6 <mem_trim+0x32>
80041ae: 8bfa ldrh r2, [r7, #30]
80041b0: 887b ldrh r3, [r7, #2]
80041b2: 429a cmp r2, r3
80041b4: d201 bcs.n 80041ba <mem_trim+0x36>
return NULL;
80041b6: 2300 movs r3, #0
80041b8: e0cc b.n 8004354 <mem_trim+0x1d0>
}
LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
80041ba: 4b68 ldr r3, [pc, #416] ; (800435c <mem_trim+0x1d8>)
80041bc: 681b ldr r3, [r3, #0]
80041be: 687a ldr r2, [r7, #4]
80041c0: 429a cmp r2, r3
80041c2: d304 bcc.n 80041ce <mem_trim+0x4a>
80041c4: 4b66 ldr r3, [pc, #408] ; (8004360 <mem_trim+0x1dc>)
80041c6: 681b ldr r3, [r3, #0]
80041c8: 687a ldr r2, [r7, #4]
80041ca: 429a cmp r2, r3
80041cc: d306 bcc.n 80041dc <mem_trim+0x58>
80041ce: 4b65 ldr r3, [pc, #404] ; (8004364 <mem_trim+0x1e0>)
80041d0: f240 22d1 movw r2, #721 ; 0x2d1
80041d4: 4964 ldr r1, [pc, #400] ; (8004368 <mem_trim+0x1e4>)
80041d6: 4865 ldr r0, [pc, #404] ; (800436c <mem_trim+0x1e8>)
80041d8: f00b fe6e bl 800feb8 <printf>
(u8_t *)rmem < (u8_t *)ram_end);
if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
80041dc: 4b5f ldr r3, [pc, #380] ; (800435c <mem_trim+0x1d8>)
80041de: 681b ldr r3, [r3, #0]
80041e0: 687a ldr r2, [r7, #4]
80041e2: 429a cmp r2, r3
80041e4: d304 bcc.n 80041f0 <mem_trim+0x6c>
80041e6: 4b5e ldr r3, [pc, #376] ; (8004360 <mem_trim+0x1dc>)
80041e8: 681b ldr r3, [r3, #0]
80041ea: 687a ldr r2, [r7, #4]
80041ec: 429a cmp r2, r3
80041ee: d301 bcc.n 80041f4 <mem_trim+0x70>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
return rmem;
80041f0: 687b ldr r3, [r7, #4]
80041f2: e0af b.n 8004354 <mem_trim+0x1d0>
}
/* Get the corresponding struct mem ... */
/* cast through void* to get rid of alignment warnings */
mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET));
80041f4: 687b ldr r3, [r7, #4]
80041f6: 3b08 subs r3, #8
80041f8: 61bb str r3, [r7, #24]
#if MEM_OVERFLOW_CHECK
mem_overflow_check_element(mem);
#endif
/* ... and its offset pointer */
ptr = mem_to_ptr(mem);
80041fa: 69b8 ldr r0, [r7, #24]
80041fc: f7ff fe2c bl 8003e58 <mem_to_ptr>
8004200: 4603 mov r3, r0
8004202: 82fb strh r3, [r7, #22]
size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD));
8004204: 69bb ldr r3, [r7, #24]
8004206: 881a ldrh r2, [r3, #0]
8004208: 8afb ldrh r3, [r7, #22]
800420a: 1ad3 subs r3, r2, r3
800420c: b29b uxth r3, r3
800420e: 3b08 subs r3, #8
8004210: 82bb strh r3, [r7, #20]
LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size);
8004212: 8bfa ldrh r2, [r7, #30]
8004214: 8abb ldrh r3, [r7, #20]
8004216: 429a cmp r2, r3
8004218: d906 bls.n 8004228 <mem_trim+0xa4>
800421a: 4b52 ldr r3, [pc, #328] ; (8004364 <mem_trim+0x1e0>)
800421c: f44f 7239 mov.w r2, #740 ; 0x2e4
8004220: 4953 ldr r1, [pc, #332] ; (8004370 <mem_trim+0x1ec>)
8004222: 4852 ldr r0, [pc, #328] ; (800436c <mem_trim+0x1e8>)
8004224: f00b fe48 bl 800feb8 <printf>
if (newsize > size) {
8004228: 8bfa ldrh r2, [r7, #30]
800422a: 8abb ldrh r3, [r7, #20]
800422c: 429a cmp r2, r3
800422e: d901 bls.n 8004234 <mem_trim+0xb0>
/* not supported */
return NULL;
8004230: 2300 movs r3, #0
8004232: e08f b.n 8004354 <mem_trim+0x1d0>
}
if (newsize == size) {
8004234: 8bfa ldrh r2, [r7, #30]
8004236: 8abb ldrh r3, [r7, #20]
8004238: 429a cmp r2, r3
800423a: d101 bne.n 8004240 <mem_trim+0xbc>
/* No change in size, simply return */
return rmem;
800423c: 687b ldr r3, [r7, #4]
800423e: e089 b.n 8004354 <mem_trim+0x1d0>
}
/* protect the heap from concurrent access */
LWIP_MEM_FREE_PROTECT();
mem2 = ptr_to_mem(mem->next);
8004240: 69bb ldr r3, [r7, #24]
8004242: 881b ldrh r3, [r3, #0]
8004244: 4618 mov r0, r3
8004246: f7ff fdf5 bl 8003e34 <ptr_to_mem>
800424a: 6138 str r0, [r7, #16]
if (mem2->used == 0) {
800424c: 693b ldr r3, [r7, #16]
800424e: 791b ldrb r3, [r3, #4]
8004250: 2b00 cmp r3, #0
8004252: d13f bne.n 80042d4 <mem_trim+0x150>
/* The next struct is unused, we can simply move it at little */
mem_size_t next;
LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
8004254: 69bb ldr r3, [r7, #24]
8004256: 881b ldrh r3, [r3, #0]
8004258: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
800425c: d106 bne.n 800426c <mem_trim+0xe8>
800425e: 4b41 ldr r3, [pc, #260] ; (8004364 <mem_trim+0x1e0>)
8004260: f240 22f5 movw r2, #757 ; 0x2f5
8004264: 4943 ldr r1, [pc, #268] ; (8004374 <mem_trim+0x1f0>)
8004266: 4841 ldr r0, [pc, #260] ; (800436c <mem_trim+0x1e8>)
8004268: f00b fe26 bl 800feb8 <printf>
/* remember the old next pointer */
next = mem2->next;
800426c: 693b ldr r3, [r7, #16]
800426e: 881b ldrh r3, [r3, #0]
8004270: 81bb strh r3, [r7, #12]
/* create new struct mem which is moved directly after the shrinked mem */
ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize);
8004272: 8afa ldrh r2, [r7, #22]
8004274: 8bfb ldrh r3, [r7, #30]
8004276: 4413 add r3, r2
8004278: b29b uxth r3, r3
800427a: 3308 adds r3, #8
800427c: 81fb strh r3, [r7, #14]
if (lfree == mem2) {
800427e: 4b3e ldr r3, [pc, #248] ; (8004378 <mem_trim+0x1f4>)
8004280: 681b ldr r3, [r3, #0]
8004282: 693a ldr r2, [r7, #16]
8004284: 429a cmp r2, r3
8004286: d106 bne.n 8004296 <mem_trim+0x112>
lfree = ptr_to_mem(ptr2);
8004288: 89fb ldrh r3, [r7, #14]
800428a: 4618 mov r0, r3
800428c: f7ff fdd2 bl 8003e34 <ptr_to_mem>
8004290: 4603 mov r3, r0
8004292: 4a39 ldr r2, [pc, #228] ; (8004378 <mem_trim+0x1f4>)
8004294: 6013 str r3, [r2, #0]
}
mem2 = ptr_to_mem(ptr2);
8004296: 89fb ldrh r3, [r7, #14]
8004298: 4618 mov r0, r3
800429a: f7ff fdcb bl 8003e34 <ptr_to_mem>
800429e: 6138 str r0, [r7, #16]
mem2->used = 0;
80042a0: 693b ldr r3, [r7, #16]
80042a2: 2200 movs r2, #0
80042a4: 711a strb r2, [r3, #4]
/* restore the next pointer */
mem2->next = next;
80042a6: 693b ldr r3, [r7, #16]
80042a8: 89ba ldrh r2, [r7, #12]
80042aa: 801a strh r2, [r3, #0]
/* link it back to mem */
mem2->prev = ptr;
80042ac: 693b ldr r3, [r7, #16]
80042ae: 8afa ldrh r2, [r7, #22]
80042b0: 805a strh r2, [r3, #2]
/* link mem to it */
mem->next = ptr2;
80042b2: 69bb ldr r3, [r7, #24]
80042b4: 89fa ldrh r2, [r7, #14]
80042b6: 801a strh r2, [r3, #0]
/* last thing to restore linked list: as we have moved mem2,
* let 'mem2->next->prev' point to mem2 again. but only if mem2->next is not
* the end of the heap */
if (mem2->next != MEM_SIZE_ALIGNED) {
80042b8: 693b ldr r3, [r7, #16]
80042ba: 881b ldrh r3, [r3, #0]
80042bc: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80042c0: d047 beq.n 8004352 <mem_trim+0x1ce>
ptr_to_mem(mem2->next)->prev = ptr2;
80042c2: 693b ldr r3, [r7, #16]
80042c4: 881b ldrh r3, [r3, #0]
80042c6: 4618 mov r0, r3
80042c8: f7ff fdb4 bl 8003e34 <ptr_to_mem>
80042cc: 4602 mov r2, r0
80042ce: 89fb ldrh r3, [r7, #14]
80042d0: 8053 strh r3, [r2, #2]
80042d2: e03e b.n 8004352 <mem_trim+0x1ce>
}
MEM_STATS_DEC_USED(used, (size - newsize));
/* no need to plug holes, we've already done that */
} else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) {
80042d4: 8bfb ldrh r3, [r7, #30]
80042d6: f103 0214 add.w r2, r3, #20
80042da: 8abb ldrh r3, [r7, #20]
80042dc: 429a cmp r2, r3
80042de: d838 bhi.n 8004352 <mem_trim+0x1ce>
* Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem
* ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED').
* @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty
* region that couldn't hold data, but when mem->next gets freed,
* the 2 regions would be combined, resulting in more free memory */
ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize);
80042e0: 8afa ldrh r2, [r7, #22]
80042e2: 8bfb ldrh r3, [r7, #30]
80042e4: 4413 add r3, r2
80042e6: b29b uxth r3, r3
80042e8: 3308 adds r3, #8
80042ea: 81fb strh r3, [r7, #14]
LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
80042ec: 69bb ldr r3, [r7, #24]
80042ee: 881b ldrh r3, [r3, #0]
80042f0: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80042f4: d106 bne.n 8004304 <mem_trim+0x180>
80042f6: 4b1b ldr r3, [pc, #108] ; (8004364 <mem_trim+0x1e0>)
80042f8: f240 3216 movw r2, #790 ; 0x316
80042fc: 491d ldr r1, [pc, #116] ; (8004374 <mem_trim+0x1f0>)
80042fe: 481b ldr r0, [pc, #108] ; (800436c <mem_trim+0x1e8>)
8004300: f00b fdda bl 800feb8 <printf>
mem2 = ptr_to_mem(ptr2);
8004304: 89fb ldrh r3, [r7, #14]
8004306: 4618 mov r0, r3
8004308: f7ff fd94 bl 8003e34 <ptr_to_mem>
800430c: 6138 str r0, [r7, #16]
if (mem2 < lfree) {
800430e: 4b1a ldr r3, [pc, #104] ; (8004378 <mem_trim+0x1f4>)
8004310: 681b ldr r3, [r3, #0]
8004312: 693a ldr r2, [r7, #16]
8004314: 429a cmp r2, r3
8004316: d202 bcs.n 800431e <mem_trim+0x19a>
lfree = mem2;
8004318: 4a17 ldr r2, [pc, #92] ; (8004378 <mem_trim+0x1f4>)
800431a: 693b ldr r3, [r7, #16]
800431c: 6013 str r3, [r2, #0]
}
mem2->used = 0;
800431e: 693b ldr r3, [r7, #16]
8004320: 2200 movs r2, #0
8004322: 711a strb r2, [r3, #4]
mem2->next = mem->next;
8004324: 69bb ldr r3, [r7, #24]
8004326: 881a ldrh r2, [r3, #0]
8004328: 693b ldr r3, [r7, #16]
800432a: 801a strh r2, [r3, #0]
mem2->prev = ptr;
800432c: 693b ldr r3, [r7, #16]
800432e: 8afa ldrh r2, [r7, #22]
8004330: 805a strh r2, [r3, #2]
mem->next = ptr2;
8004332: 69bb ldr r3, [r7, #24]
8004334: 89fa ldrh r2, [r7, #14]
8004336: 801a strh r2, [r3, #0]
if (mem2->next != MEM_SIZE_ALIGNED) {
8004338: 693b ldr r3, [r7, #16]
800433a: 881b ldrh r3, [r3, #0]
800433c: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8004340: d007 beq.n 8004352 <mem_trim+0x1ce>
ptr_to_mem(mem2->next)->prev = ptr2;
8004342: 693b ldr r3, [r7, #16]
8004344: 881b ldrh r3, [r3, #0]
8004346: 4618 mov r0, r3
8004348: f7ff fd74 bl 8003e34 <ptr_to_mem>
800434c: 4602 mov r2, r0
800434e: 89fb ldrh r3, [r7, #14]
8004350: 8053 strh r3, [r2, #2]
MEM_SANITY();
#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
mem_free_count = 1;
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
LWIP_MEM_FREE_UNPROTECT();
return rmem;
8004352: 687b ldr r3, [r7, #4]
}
8004354: 4618 mov r0, r3
8004356: 3720 adds r7, #32
8004358: 46bd mov sp, r7
800435a: bd80 pop {r7, pc}
800435c: 20005c88 .word 0x20005c88
8004360: 20005c8c .word 0x20005c8c
8004364: 08014a2c .word 0x08014a2c
8004368: 08014b9c .word 0x08014b9c
800436c: 08014a74 .word 0x08014a74
8004370: 08014bb4 .word 0x08014bb4
8004374: 08014bd4 .word 0x08014bd4
8004378: 20005c90 .word 0x20005c90
0800437c <mem_malloc>:
*
* Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT).
*/
void *
mem_malloc(mem_size_t size_in)
{
800437c: b580 push {r7, lr}
800437e: b088 sub sp, #32
8004380: af00 add r7, sp, #0
8004382: 4603 mov r3, r0
8004384: 80fb strh r3, [r7, #6]
#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
u8_t local_mem_free_count = 0;
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
LWIP_MEM_ALLOC_DECL_PROTECT();
if (size_in == 0) {
8004386: 88fb ldrh r3, [r7, #6]
8004388: 2b00 cmp r3, #0
800438a: d101 bne.n 8004390 <mem_malloc+0x14>
return NULL;
800438c: 2300 movs r3, #0
800438e: e0d9 b.n 8004544 <mem_malloc+0x1c8>
}
/* Expand the size of the allocated memory region so that we can
adjust for alignment. */
size = (mem_size_t)LWIP_MEM_ALIGN_SIZE(size_in);
8004390: 88fb ldrh r3, [r7, #6]
8004392: 3303 adds r3, #3
8004394: b29b uxth r3, r3
8004396: f023 0303 bic.w r3, r3, #3
800439a: 83bb strh r3, [r7, #28]
if (size < MIN_SIZE_ALIGNED) {
800439c: 8bbb ldrh r3, [r7, #28]
800439e: 2b0b cmp r3, #11
80043a0: d801 bhi.n 80043a6 <mem_malloc+0x2a>
/* every data block must be at least MIN_SIZE_ALIGNED long */
size = MIN_SIZE_ALIGNED;
80043a2: 230c movs r3, #12
80043a4: 83bb strh r3, [r7, #28]
}
#if MEM_OVERFLOW_CHECK
size += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED;
#endif
if ((size > MEM_SIZE_ALIGNED) || (size < size_in)) {
80043a6: 8bbb ldrh r3, [r7, #28]
80043a8: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80043ac: d803 bhi.n 80043b6 <mem_malloc+0x3a>
80043ae: 8bba ldrh r2, [r7, #28]
80043b0: 88fb ldrh r3, [r7, #6]
80043b2: 429a cmp r2, r3
80043b4: d201 bcs.n 80043ba <mem_malloc+0x3e>
return NULL;
80043b6: 2300 movs r3, #0
80043b8: e0c4 b.n 8004544 <mem_malloc+0x1c8>
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
/* Scan through the heap searching for a free block that is big enough,
* beginning with the lowest free block.
*/
for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
80043ba: 4b64 ldr r3, [pc, #400] ; (800454c <mem_malloc+0x1d0>)
80043bc: 681b ldr r3, [r3, #0]
80043be: 4618 mov r0, r3
80043c0: f7ff fd4a bl 8003e58 <mem_to_ptr>
80043c4: 4603 mov r3, r0
80043c6: 83fb strh r3, [r7, #30]
80043c8: e0b4 b.n 8004534 <mem_malloc+0x1b8>
ptr = ptr_to_mem(ptr)->next) {
mem = ptr_to_mem(ptr);
80043ca: 8bfb ldrh r3, [r7, #30]
80043cc: 4618 mov r0, r3
80043ce: f7ff fd31 bl 8003e34 <ptr_to_mem>
80043d2: 6178 str r0, [r7, #20]
local_mem_free_count = 1;
break;
}
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
if ((!mem->used) &&
80043d4: 697b ldr r3, [r7, #20]
80043d6: 791b ldrb r3, [r3, #4]
80043d8: 2b00 cmp r3, #0
80043da: f040 80a4 bne.w 8004526 <mem_malloc+0x1aa>
(mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
80043de: 697b ldr r3, [r7, #20]
80043e0: 881b ldrh r3, [r3, #0]
80043e2: 461a mov r2, r3
80043e4: 8bfb ldrh r3, [r7, #30]
80043e6: 1ad3 subs r3, r2, r3
80043e8: f1a3 0208 sub.w r2, r3, #8
80043ec: 8bbb ldrh r3, [r7, #28]
if ((!mem->used) &&
80043ee: 429a cmp r2, r3
80043f0: f0c0 8099 bcc.w 8004526 <mem_malloc+0x1aa>
/* mem is not used and at least perfect fit is possible:
* mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */
if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) {
80043f4: 697b ldr r3, [r7, #20]
80043f6: 881b ldrh r3, [r3, #0]
80043f8: 461a mov r2, r3
80043fa: 8bfb ldrh r3, [r7, #30]
80043fc: 1ad3 subs r3, r2, r3
80043fe: f1a3 0208 sub.w r2, r3, #8
8004402: 8bbb ldrh r3, [r7, #28]
8004404: 3314 adds r3, #20
8004406: 429a cmp r2, r3
8004408: d333 bcc.n 8004472 <mem_malloc+0xf6>
* struct mem would fit in but no data between mem2 and mem2->next
* @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty
* region that couldn't hold data, but when mem->next gets freed,
* the 2 regions would be combined, resulting in more free memory
*/
ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + size);
800440a: 8bfa ldrh r2, [r7, #30]
800440c: 8bbb ldrh r3, [r7, #28]
800440e: 4413 add r3, r2
8004410: b29b uxth r3, r3
8004412: 3308 adds r3, #8
8004414: 827b strh r3, [r7, #18]
LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED);
8004416: 8a7b ldrh r3, [r7, #18]
8004418: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
800441c: d106 bne.n 800442c <mem_malloc+0xb0>
800441e: 4b4c ldr r3, [pc, #304] ; (8004550 <mem_malloc+0x1d4>)
8004420: f240 3287 movw r2, #903 ; 0x387
8004424: 494b ldr r1, [pc, #300] ; (8004554 <mem_malloc+0x1d8>)
8004426: 484c ldr r0, [pc, #304] ; (8004558 <mem_malloc+0x1dc>)
8004428: f00b fd46 bl 800feb8 <printf>
/* create mem2 struct */
mem2 = ptr_to_mem(ptr2);
800442c: 8a7b ldrh r3, [r7, #18]
800442e: 4618 mov r0, r3
8004430: f7ff fd00 bl 8003e34 <ptr_to_mem>
8004434: 60f8 str r0, [r7, #12]
mem2->used = 0;
8004436: 68fb ldr r3, [r7, #12]
8004438: 2200 movs r2, #0
800443a: 711a strb r2, [r3, #4]
mem2->next = mem->next;
800443c: 697b ldr r3, [r7, #20]
800443e: 881a ldrh r2, [r3, #0]
8004440: 68fb ldr r3, [r7, #12]
8004442: 801a strh r2, [r3, #0]
mem2->prev = ptr;
8004444: 68fb ldr r3, [r7, #12]
8004446: 8bfa ldrh r2, [r7, #30]
8004448: 805a strh r2, [r3, #2]
/* and insert it between mem and mem->next */
mem->next = ptr2;
800444a: 697b ldr r3, [r7, #20]
800444c: 8a7a ldrh r2, [r7, #18]
800444e: 801a strh r2, [r3, #0]
mem->used = 1;
8004450: 697b ldr r3, [r7, #20]
8004452: 2201 movs r2, #1
8004454: 711a strb r2, [r3, #4]
if (mem2->next != MEM_SIZE_ALIGNED) {
8004456: 68fb ldr r3, [r7, #12]
8004458: 881b ldrh r3, [r3, #0]
800445a: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
800445e: d00b beq.n 8004478 <mem_malloc+0xfc>
ptr_to_mem(mem2->next)->prev = ptr2;
8004460: 68fb ldr r3, [r7, #12]
8004462: 881b ldrh r3, [r3, #0]
8004464: 4618 mov r0, r3
8004466: f7ff fce5 bl 8003e34 <ptr_to_mem>
800446a: 4602 mov r2, r0
800446c: 8a7b ldrh r3, [r7, #18]
800446e: 8053 strh r3, [r2, #2]
8004470: e002 b.n 8004478 <mem_malloc+0xfc>
* take care of this).
* -> near fit or exact fit: do not split, no mem2 creation
* also can't move mem->next directly behind mem, since mem->next
* will always be used at this point!
*/
mem->used = 1;
8004472: 697b ldr r3, [r7, #20]
8004474: 2201 movs r2, #1
8004476: 711a strb r2, [r3, #4]
MEM_STATS_INC_USED(used, mem->next - mem_to_ptr(mem));
}
#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
mem_malloc_adjust_lfree:
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
if (mem == lfree) {
8004478: 4b34 ldr r3, [pc, #208] ; (800454c <mem_malloc+0x1d0>)
800447a: 681b ldr r3, [r3, #0]
800447c: 697a ldr r2, [r7, #20]
800447e: 429a cmp r2, r3
8004480: d127 bne.n 80044d2 <mem_malloc+0x156>
struct mem *cur = lfree;
8004482: 4b32 ldr r3, [pc, #200] ; (800454c <mem_malloc+0x1d0>)
8004484: 681b ldr r3, [r3, #0]
8004486: 61bb str r3, [r7, #24]
/* Find next free block after mem and update lowest free pointer */
while (cur->used && cur != ram_end) {
8004488: e005 b.n 8004496 <mem_malloc+0x11a>
/* If mem_free or mem_trim have run, we have to restart since they
could have altered our current struct mem or lfree. */
goto mem_malloc_adjust_lfree;
}
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
cur = ptr_to_mem(cur->next);
800448a: 69bb ldr r3, [r7, #24]
800448c: 881b ldrh r3, [r3, #0]
800448e: 4618 mov r0, r3
8004490: f7ff fcd0 bl 8003e34 <ptr_to_mem>
8004494: 61b8 str r0, [r7, #24]
while (cur->used && cur != ram_end) {
8004496: 69bb ldr r3, [r7, #24]
8004498: 791b ldrb r3, [r3, #4]
800449a: 2b00 cmp r3, #0
800449c: d004 beq.n 80044a8 <mem_malloc+0x12c>
800449e: 4b2f ldr r3, [pc, #188] ; (800455c <mem_malloc+0x1e0>)
80044a0: 681b ldr r3, [r3, #0]
80044a2: 69ba ldr r2, [r7, #24]
80044a4: 429a cmp r2, r3
80044a6: d1f0 bne.n 800448a <mem_malloc+0x10e>
}
lfree = cur;
80044a8: 4a28 ldr r2, [pc, #160] ; (800454c <mem_malloc+0x1d0>)
80044aa: 69bb ldr r3, [r7, #24]
80044ac: 6013 str r3, [r2, #0]
LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
80044ae: 4b27 ldr r3, [pc, #156] ; (800454c <mem_malloc+0x1d0>)
80044b0: 681a ldr r2, [r3, #0]
80044b2: 4b2a ldr r3, [pc, #168] ; (800455c <mem_malloc+0x1e0>)
80044b4: 681b ldr r3, [r3, #0]
80044b6: 429a cmp r2, r3
80044b8: d00b beq.n 80044d2 <mem_malloc+0x156>
80044ba: 4b24 ldr r3, [pc, #144] ; (800454c <mem_malloc+0x1d0>)
80044bc: 681b ldr r3, [r3, #0]
80044be: 791b ldrb r3, [r3, #4]
80044c0: 2b00 cmp r3, #0
80044c2: d006 beq.n 80044d2 <mem_malloc+0x156>
80044c4: 4b22 ldr r3, [pc, #136] ; (8004550 <mem_malloc+0x1d4>)
80044c6: f240 32b5 movw r2, #949 ; 0x3b5
80044ca: 4925 ldr r1, [pc, #148] ; (8004560 <mem_malloc+0x1e4>)
80044cc: 4822 ldr r0, [pc, #136] ; (8004558 <mem_malloc+0x1dc>)
80044ce: f00b fcf3 bl 800feb8 <printf>
}
LWIP_MEM_ALLOC_UNPROTECT();
sys_mutex_unlock(&mem_mutex);
LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
80044d2: 8bba ldrh r2, [r7, #28]
80044d4: 697b ldr r3, [r7, #20]
80044d6: 4413 add r3, r2
80044d8: 3308 adds r3, #8
80044da: 4a20 ldr r2, [pc, #128] ; (800455c <mem_malloc+0x1e0>)
80044dc: 6812 ldr r2, [r2, #0]
80044de: 4293 cmp r3, r2
80044e0: d906 bls.n 80044f0 <mem_malloc+0x174>
80044e2: 4b1b ldr r3, [pc, #108] ; (8004550 <mem_malloc+0x1d4>)
80044e4: f240 32b9 movw r2, #953 ; 0x3b9
80044e8: 491e ldr r1, [pc, #120] ; (8004564 <mem_malloc+0x1e8>)
80044ea: 481b ldr r0, [pc, #108] ; (8004558 <mem_malloc+0x1dc>)
80044ec: f00b fce4 bl 800feb8 <printf>
(mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
80044f0: 697b ldr r3, [r7, #20]
80044f2: f003 0303 and.w r3, r3, #3
80044f6: 2b00 cmp r3, #0
80044f8: d006 beq.n 8004508 <mem_malloc+0x18c>
80044fa: 4b15 ldr r3, [pc, #84] ; (8004550 <mem_malloc+0x1d4>)
80044fc: f240 32bb movw r2, #955 ; 0x3bb
8004500: 4919 ldr r1, [pc, #100] ; (8004568 <mem_malloc+0x1ec>)
8004502: 4815 ldr r0, [pc, #84] ; (8004558 <mem_malloc+0x1dc>)
8004504: f00b fcd8 bl 800feb8 <printf>
((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
LWIP_ASSERT("mem_malloc: sanity check alignment",
8004508: 697b ldr r3, [r7, #20]
800450a: f003 0303 and.w r3, r3, #3
800450e: 2b00 cmp r3, #0
8004510: d006 beq.n 8004520 <mem_malloc+0x1a4>
8004512: 4b0f ldr r3, [pc, #60] ; (8004550 <mem_malloc+0x1d4>)
8004514: f240 32bd movw r2, #957 ; 0x3bd
8004518: 4914 ldr r1, [pc, #80] ; (800456c <mem_malloc+0x1f0>)
800451a: 480f ldr r0, [pc, #60] ; (8004558 <mem_malloc+0x1dc>)
800451c: f00b fccc bl 800feb8 <printf>
#if MEM_OVERFLOW_CHECK
mem_overflow_init_element(mem, size_in);
#endif
MEM_SANITY();
return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET;
8004520: 697b ldr r3, [r7, #20]
8004522: 3308 adds r3, #8
8004524: e00e b.n 8004544 <mem_malloc+0x1c8>
ptr = ptr_to_mem(ptr)->next) {
8004526: 8bfb ldrh r3, [r7, #30]
8004528: 4618 mov r0, r3
800452a: f7ff fc83 bl 8003e34 <ptr_to_mem>
800452e: 4603 mov r3, r0
8004530: 881b ldrh r3, [r3, #0]
8004532: 83fb strh r3, [r7, #30]
for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
8004534: 8bfa ldrh r2, [r7, #30]
8004536: 8bbb ldrh r3, [r7, #28]
8004538: f5c3 63c8 rsb r3, r3, #1600 ; 0x640
800453c: 429a cmp r2, r3
800453e: f4ff af44 bcc.w 80043ca <mem_malloc+0x4e>
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
MEM_STATS_INC(err);
LWIP_MEM_ALLOC_UNPROTECT();
sys_mutex_unlock(&mem_mutex);
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size));
return NULL;
8004542: 2300 movs r3, #0
}
8004544: 4618 mov r0, r3
8004546: 3720 adds r7, #32
8004548: 46bd mov sp, r7
800454a: bd80 pop {r7, pc}
800454c: 20005c90 .word 0x20005c90
8004550: 08014a2c .word 0x08014a2c
8004554: 08014bd4 .word 0x08014bd4
8004558: 08014a74 .word 0x08014a74
800455c: 20005c8c .word 0x20005c8c
8004560: 08014be8 .word 0x08014be8
8004564: 08014c04 .word 0x08014c04
8004568: 08014c34 .word 0x08014c34
800456c: 08014c64 .word 0x08014c64
08004570 <memp_init_pool>:
*
* @param desc pool to initialize
*/
void
memp_init_pool(const struct memp_desc *desc)
{
8004570: b480 push {r7}
8004572: b085 sub sp, #20
8004574: af00 add r7, sp, #0
8004576: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(desc);
#else
int i;
struct memp *memp;
*desc->tab = NULL;
8004578: 687b ldr r3, [r7, #4]
800457a: 689b ldr r3, [r3, #8]
800457c: 2200 movs r2, #0
800457e: 601a str r2, [r3, #0]
memp = (struct memp *)LWIP_MEM_ALIGN(desc->base);
8004580: 687b ldr r3, [r7, #4]
8004582: 685b ldr r3, [r3, #4]
8004584: 3303 adds r3, #3
8004586: f023 0303 bic.w r3, r3, #3
800458a: 60bb str r3, [r7, #8]
+ MEM_SANITY_REGION_AFTER_ALIGNED
#endif
));
#endif
/* create a linked list of memp elements */
for (i = 0; i < desc->num; ++i) {
800458c: 2300 movs r3, #0
800458e: 60fb str r3, [r7, #12]
8004590: e011 b.n 80045b6 <memp_init_pool+0x46>
memp->next = *desc->tab;
8004592: 687b ldr r3, [r7, #4]
8004594: 689b ldr r3, [r3, #8]
8004596: 681a ldr r2, [r3, #0]
8004598: 68bb ldr r3, [r7, #8]
800459a: 601a str r2, [r3, #0]
*desc->tab = memp;
800459c: 687b ldr r3, [r7, #4]
800459e: 689b ldr r3, [r3, #8]
80045a0: 68ba ldr r2, [r7, #8]
80045a2: 601a str r2, [r3, #0]
#if MEMP_OVERFLOW_CHECK
memp_overflow_init_element(memp, desc);
#endif /* MEMP_OVERFLOW_CHECK */
/* cast through void* to get rid of alignment warnings */
memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size
80045a4: 687b ldr r3, [r7, #4]
80045a6: 881b ldrh r3, [r3, #0]
80045a8: 461a mov r2, r3
80045aa: 68bb ldr r3, [r7, #8]
80045ac: 4413 add r3, r2
80045ae: 60bb str r3, [r7, #8]
for (i = 0; i < desc->num; ++i) {
80045b0: 68fb ldr r3, [r7, #12]
80045b2: 3301 adds r3, #1
80045b4: 60fb str r3, [r7, #12]
80045b6: 687b ldr r3, [r7, #4]
80045b8: 885b ldrh r3, [r3, #2]
80045ba: 461a mov r2, r3
80045bc: 68fb ldr r3, [r7, #12]
80045be: 4293 cmp r3, r2
80045c0: dbe7 blt.n 8004592 <memp_init_pool+0x22>
#endif /* !MEMP_MEM_MALLOC */
#if MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY)
desc->stats->name = desc->desc;
#endif /* MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) */
}
80045c2: bf00 nop
80045c4: bf00 nop
80045c6: 3714 adds r7, #20
80045c8: 46bd mov sp, r7
80045ca: f85d 7b04 ldr.w r7, [sp], #4
80045ce: 4770 bx lr
080045d0 <memp_init>:
*
* Carves out memp_memory into linked lists for each pool-type.
*/
void
memp_init(void)
{
80045d0: b580 push {r7, lr}
80045d2: b082 sub sp, #8
80045d4: af00 add r7, sp, #0
u16_t i;
/* for every pool: */
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
80045d6: 2300 movs r3, #0
80045d8: 80fb strh r3, [r7, #6]
80045da: e009 b.n 80045f0 <memp_init+0x20>
memp_init_pool(memp_pools[i]);
80045dc: 88fb ldrh r3, [r7, #6]
80045de: 4a08 ldr r2, [pc, #32] ; (8004600 <memp_init+0x30>)
80045e0: f852 3023 ldr.w r3, [r2, r3, lsl #2]
80045e4: 4618 mov r0, r3
80045e6: f7ff ffc3 bl 8004570 <memp_init_pool>
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
80045ea: 88fb ldrh r3, [r7, #6]
80045ec: 3301 adds r3, #1
80045ee: 80fb strh r3, [r7, #6]
80045f0: 88fb ldrh r3, [r7, #6]
80045f2: 2b08 cmp r3, #8
80045f4: d9f2 bls.n 80045dc <memp_init+0xc>
#if MEMP_OVERFLOW_CHECK >= 2
/* check everything a first time to see if it worked */
memp_overflow_check_all();
#endif /* MEMP_OVERFLOW_CHECK >= 2 */
}
80045f6: bf00 nop
80045f8: bf00 nop
80045fa: 3708 adds r7, #8
80045fc: 46bd mov sp, r7
80045fe: bd80 pop {r7, pc}
8004600: 08017850 .word 0x08017850
08004604 <do_memp_malloc_pool>:
#if !MEMP_OVERFLOW_CHECK
do_memp_malloc_pool(const struct memp_desc *desc)
#else
do_memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int line)
#endif
{
8004604: b580 push {r7, lr}
8004606: b084 sub sp, #16
8004608: af00 add r7, sp, #0
800460a: 6078 str r0, [r7, #4]
memp = (struct memp *)mem_malloc(MEMP_SIZE + MEMP_ALIGN_SIZE(desc->size));
SYS_ARCH_PROTECT(old_level);
#else /* MEMP_MEM_MALLOC */
SYS_ARCH_PROTECT(old_level);
memp = *desc->tab;
800460c: 687b ldr r3, [r7, #4]
800460e: 689b ldr r3, [r3, #8]
8004610: 681b ldr r3, [r3, #0]
8004612: 60fb str r3, [r7, #12]
#endif /* MEMP_MEM_MALLOC */
if (memp != NULL) {
8004614: 68fb ldr r3, [r7, #12]
8004616: 2b00 cmp r3, #0
8004618: d012 beq.n 8004640 <do_memp_malloc_pool+0x3c>
#if !MEMP_MEM_MALLOC
#if MEMP_OVERFLOW_CHECK == 1
memp_overflow_check_element(memp, desc);
#endif /* MEMP_OVERFLOW_CHECK */
*desc->tab = memp->next;
800461a: 687b ldr r3, [r7, #4]
800461c: 689b ldr r3, [r3, #8]
800461e: 68fa ldr r2, [r7, #12]
8004620: 6812 ldr r2, [r2, #0]
8004622: 601a str r2, [r3, #0]
memp->line = line;
#if MEMP_MEM_MALLOC
memp_overflow_init_element(memp, desc);
#endif /* MEMP_MEM_MALLOC */
#endif /* MEMP_OVERFLOW_CHECK */
LWIP_ASSERT("memp_malloc: memp properly aligned",
8004624: 68fb ldr r3, [r7, #12]
8004626: f003 0303 and.w r3, r3, #3
800462a: 2b00 cmp r3, #0
800462c: d006 beq.n 800463c <do_memp_malloc_pool+0x38>
800462e: 4b07 ldr r3, [pc, #28] ; (800464c <do_memp_malloc_pool+0x48>)
8004630: f44f 728c mov.w r2, #280 ; 0x118
8004634: 4906 ldr r1, [pc, #24] ; (8004650 <do_memp_malloc_pool+0x4c>)
8004636: 4807 ldr r0, [pc, #28] ; (8004654 <do_memp_malloc_pool+0x50>)
8004638: f00b fc3e bl 800feb8 <printf>
desc->stats->max = desc->stats->used;
}
#endif
SYS_ARCH_UNPROTECT(old_level);
/* cast through u8_t* to get rid of alignment warnings */
return ((u8_t *)memp + MEMP_SIZE);
800463c: 68fb ldr r3, [r7, #12]
800463e: e000 b.n 8004642 <do_memp_malloc_pool+0x3e>
#endif
SYS_ARCH_UNPROTECT(old_level);
LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc));
}
return NULL;
8004640: 2300 movs r3, #0
}
8004642: 4618 mov r0, r3
8004644: 3710 adds r7, #16
8004646: 46bd mov sp, r7
8004648: bd80 pop {r7, pc}
800464a: bf00 nop
800464c: 08014c88 .word 0x08014c88
8004650: 08014cb8 .word 0x08014cb8
8004654: 08014cdc .word 0x08014cdc
08004658 <memp_malloc_pool>:
#if !MEMP_OVERFLOW_CHECK
memp_malloc_pool(const struct memp_desc *desc)
#else
memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int line)
#endif
{
8004658: b580 push {r7, lr}
800465a: b082 sub sp, #8
800465c: af00 add r7, sp, #0
800465e: 6078 str r0, [r7, #4]
LWIP_ASSERT("invalid pool desc", desc != NULL);
8004660: 687b ldr r3, [r7, #4]
8004662: 2b00 cmp r3, #0
8004664: d106 bne.n 8004674 <memp_malloc_pool+0x1c>
8004666: 4b0a ldr r3, [pc, #40] ; (8004690 <memp_malloc_pool+0x38>)
8004668: f44f 729e mov.w r2, #316 ; 0x13c
800466c: 4909 ldr r1, [pc, #36] ; (8004694 <memp_malloc_pool+0x3c>)
800466e: 480a ldr r0, [pc, #40] ; (8004698 <memp_malloc_pool+0x40>)
8004670: f00b fc22 bl 800feb8 <printf>
if (desc == NULL) {
8004674: 687b ldr r3, [r7, #4]
8004676: 2b00 cmp r3, #0
8004678: d101 bne.n 800467e <memp_malloc_pool+0x26>
return NULL;
800467a: 2300 movs r3, #0
800467c: e003 b.n 8004686 <memp_malloc_pool+0x2e>
}
#if !MEMP_OVERFLOW_CHECK
return do_memp_malloc_pool(desc);
800467e: 6878 ldr r0, [r7, #4]
8004680: f7ff ffc0 bl 8004604 <do_memp_malloc_pool>
8004684: 4603 mov r3, r0
#else
return do_memp_malloc_pool_fn(desc, file, line);
#endif
}
8004686: 4618 mov r0, r3
8004688: 3708 adds r7, #8
800468a: 46bd mov sp, r7
800468c: bd80 pop {r7, pc}
800468e: bf00 nop
8004690: 08014c88 .word 0x08014c88
8004694: 08014d04 .word 0x08014d04
8004698: 08014cdc .word 0x08014cdc
0800469c <memp_malloc>:
#if !MEMP_OVERFLOW_CHECK
memp_malloc(memp_t type)
#else
memp_malloc_fn(memp_t type, const char *file, const int line)
#endif
{
800469c: b580 push {r7, lr}
800469e: b084 sub sp, #16
80046a0: af00 add r7, sp, #0
80046a2: 4603 mov r3, r0
80046a4: 71fb strb r3, [r7, #7]
void *memp;
LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;);
80046a6: 79fb ldrb r3, [r7, #7]
80046a8: 2b08 cmp r3, #8
80046aa: d908 bls.n 80046be <memp_malloc+0x22>
80046ac: 4b0a ldr r3, [pc, #40] ; (80046d8 <memp_malloc+0x3c>)
80046ae: f240 1257 movw r2, #343 ; 0x157
80046b2: 490a ldr r1, [pc, #40] ; (80046dc <memp_malloc+0x40>)
80046b4: 480a ldr r0, [pc, #40] ; (80046e0 <memp_malloc+0x44>)
80046b6: f00b fbff bl 800feb8 <printf>
80046ba: 2300 movs r3, #0
80046bc: e008 b.n 80046d0 <memp_malloc+0x34>
#if MEMP_OVERFLOW_CHECK >= 2
memp_overflow_check_all();
#endif /* MEMP_OVERFLOW_CHECK >= 2 */
#if !MEMP_OVERFLOW_CHECK
memp = do_memp_malloc_pool(memp_pools[type]);
80046be: 79fb ldrb r3, [r7, #7]
80046c0: 4a08 ldr r2, [pc, #32] ; (80046e4 <memp_malloc+0x48>)
80046c2: f852 3023 ldr.w r3, [r2, r3, lsl #2]
80046c6: 4618 mov r0, r3
80046c8: f7ff ff9c bl 8004604 <do_memp_malloc_pool>
80046cc: 60f8 str r0, [r7, #12]
#else
memp = do_memp_malloc_pool_fn(memp_pools[type], file, line);
#endif
return memp;
80046ce: 68fb ldr r3, [r7, #12]
}
80046d0: 4618 mov r0, r3
80046d2: 3710 adds r7, #16
80046d4: 46bd mov sp, r7
80046d6: bd80 pop {r7, pc}
80046d8: 08014c88 .word 0x08014c88
80046dc: 08014d18 .word 0x08014d18
80046e0: 08014cdc .word 0x08014cdc
80046e4: 08017850 .word 0x08017850
080046e8 <do_memp_free_pool>:
static void
do_memp_free_pool(const struct memp_desc *desc, void *mem)
{
80046e8: b580 push {r7, lr}
80046ea: b084 sub sp, #16
80046ec: af00 add r7, sp, #0
80046ee: 6078 str r0, [r7, #4]
80046f0: 6039 str r1, [r7, #0]
struct memp *memp;
SYS_ARCH_DECL_PROTECT(old_level);
LWIP_ASSERT("memp_free: mem properly aligned",
80046f2: 683b ldr r3, [r7, #0]
80046f4: f003 0303 and.w r3, r3, #3
80046f8: 2b00 cmp r3, #0
80046fa: d006 beq.n 800470a <do_memp_free_pool+0x22>
80046fc: 4b0a ldr r3, [pc, #40] ; (8004728 <do_memp_free_pool+0x40>)
80046fe: f44f 72b6 mov.w r2, #364 ; 0x16c
8004702: 490a ldr r1, [pc, #40] ; (800472c <do_memp_free_pool+0x44>)
8004704: 480a ldr r0, [pc, #40] ; (8004730 <do_memp_free_pool+0x48>)
8004706: f00b fbd7 bl 800feb8 <printf>
((mem_ptr_t)mem % MEM_ALIGNMENT) == 0);
/* cast through void* to get rid of alignment warnings */
memp = (struct memp *)(void *)((u8_t *)mem - MEMP_SIZE);
800470a: 683b ldr r3, [r7, #0]
800470c: 60fb str r3, [r7, #12]
#if MEMP_MEM_MALLOC
LWIP_UNUSED_ARG(desc);
SYS_ARCH_UNPROTECT(old_level);
mem_free(memp);
#else /* MEMP_MEM_MALLOC */
memp->next = *desc->tab;
800470e: 687b ldr r3, [r7, #4]
8004710: 689b ldr r3, [r3, #8]
8004712: 681a ldr r2, [r3, #0]
8004714: 68fb ldr r3, [r7, #12]
8004716: 601a str r2, [r3, #0]
*desc->tab = memp;
8004718: 687b ldr r3, [r7, #4]
800471a: 689b ldr r3, [r3, #8]
800471c: 68fa ldr r2, [r7, #12]
800471e: 601a str r2, [r3, #0]
LWIP_ASSERT("memp sanity", memp_sanity(desc));
#endif /* MEMP_SANITY_CHECK */
SYS_ARCH_UNPROTECT(old_level);
#endif /* !MEMP_MEM_MALLOC */
}
8004720: bf00 nop
8004722: 3710 adds r7, #16
8004724: 46bd mov sp, r7
8004726: bd80 pop {r7, pc}
8004728: 08014c88 .word 0x08014c88
800472c: 08014d38 .word 0x08014d38
8004730: 08014cdc .word 0x08014cdc
08004734 <memp_free_pool>:
* @param desc the pool where to put mem
* @param mem the memp element to free
*/
void
memp_free_pool(const struct memp_desc *desc, void *mem)
{
8004734: b580 push {r7, lr}
8004736: b082 sub sp, #8
8004738: af00 add r7, sp, #0
800473a: 6078 str r0, [r7, #4]
800473c: 6039 str r1, [r7, #0]
LWIP_ASSERT("invalid pool desc", desc != NULL);
800473e: 687b ldr r3, [r7, #4]
8004740: 2b00 cmp r3, #0
8004742: d106 bne.n 8004752 <memp_free_pool+0x1e>
8004744: 4b0a ldr r3, [pc, #40] ; (8004770 <memp_free_pool+0x3c>)
8004746: f240 1295 movw r2, #405 ; 0x195
800474a: 490a ldr r1, [pc, #40] ; (8004774 <memp_free_pool+0x40>)
800474c: 480a ldr r0, [pc, #40] ; (8004778 <memp_free_pool+0x44>)
800474e: f00b fbb3 bl 800feb8 <printf>
if ((desc == NULL) || (mem == NULL)) {
8004752: 687b ldr r3, [r7, #4]
8004754: 2b00 cmp r3, #0
8004756: d007 beq.n 8004768 <memp_free_pool+0x34>
8004758: 683b ldr r3, [r7, #0]
800475a: 2b00 cmp r3, #0
800475c: d004 beq.n 8004768 <memp_free_pool+0x34>
return;
}
do_memp_free_pool(desc, mem);
800475e: 6839 ldr r1, [r7, #0]
8004760: 6878 ldr r0, [r7, #4]
8004762: f7ff ffc1 bl 80046e8 <do_memp_free_pool>
8004766: e000 b.n 800476a <memp_free_pool+0x36>
return;
8004768: bf00 nop
}
800476a: 3708 adds r7, #8
800476c: 46bd mov sp, r7
800476e: bd80 pop {r7, pc}
8004770: 08014c88 .word 0x08014c88
8004774: 08014d04 .word 0x08014d04
8004778: 08014cdc .word 0x08014cdc
0800477c <memp_free>:
* @param type the pool where to put mem
* @param mem the memp element to free
*/
void
memp_free(memp_t type, void *mem)
{
800477c: b580 push {r7, lr}
800477e: b082 sub sp, #8
8004780: af00 add r7, sp, #0
8004782: 4603 mov r3, r0
8004784: 6039 str r1, [r7, #0]
8004786: 71fb strb r3, [r7, #7]
#ifdef LWIP_HOOK_MEMP_AVAILABLE
struct memp *old_first;
#endif
LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;);
8004788: 79fb ldrb r3, [r7, #7]
800478a: 2b08 cmp r3, #8
800478c: d907 bls.n 800479e <memp_free+0x22>
800478e: 4b0c ldr r3, [pc, #48] ; (80047c0 <memp_free+0x44>)
8004790: f44f 72d5 mov.w r2, #426 ; 0x1aa
8004794: 490b ldr r1, [pc, #44] ; (80047c4 <memp_free+0x48>)
8004796: 480c ldr r0, [pc, #48] ; (80047c8 <memp_free+0x4c>)
8004798: f00b fb8e bl 800feb8 <printf>
800479c: e00c b.n 80047b8 <memp_free+0x3c>
if (mem == NULL) {
800479e: 683b ldr r3, [r7, #0]
80047a0: 2b00 cmp r3, #0
80047a2: d008 beq.n 80047b6 <memp_free+0x3a>
#ifdef LWIP_HOOK_MEMP_AVAILABLE
old_first = *memp_pools[type]->tab;
#endif
do_memp_free_pool(memp_pools[type], mem);
80047a4: 79fb ldrb r3, [r7, #7]
80047a6: 4a09 ldr r2, [pc, #36] ; (80047cc <memp_free+0x50>)
80047a8: f852 3023 ldr.w r3, [r2, r3, lsl #2]
80047ac: 6839 ldr r1, [r7, #0]
80047ae: 4618 mov r0, r3
80047b0: f7ff ff9a bl 80046e8 <do_memp_free_pool>
80047b4: e000 b.n 80047b8 <memp_free+0x3c>
return;
80047b6: bf00 nop
#ifdef LWIP_HOOK_MEMP_AVAILABLE
if (old_first == NULL) {
LWIP_HOOK_MEMP_AVAILABLE(type);
}
#endif
}
80047b8: 3708 adds r7, #8
80047ba: 46bd mov sp, r7
80047bc: bd80 pop {r7, pc}
80047be: bf00 nop
80047c0: 08014c88 .word 0x08014c88
80047c4: 08014d58 .word 0x08014d58
80047c8: 08014cdc .word 0x08014cdc
80047cc: 08017850 .word 0x08017850
080047d0 <netif_init>:
}
#endif /* LWIP_HAVE_LOOPIF */
void
netif_init(void)
{
80047d0: b480 push {r7}
80047d2: af00 add r7, sp, #0
netif_set_link_up(&loop_netif);
netif_set_up(&loop_netif);
#endif /* LWIP_HAVE_LOOPIF */
}
80047d4: bf00 nop
80047d6: 46bd mov sp, r7
80047d8: f85d 7b04 ldr.w r7, [sp], #4
80047dc: 4770 bx lr
...
080047e0 <netif_add>:
netif_add(struct netif *netif,
#if LWIP_IPV4
const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
#endif /* LWIP_IPV4 */
void *state, netif_init_fn init, netif_input_fn input)
{
80047e0: b580 push {r7, lr}
80047e2: b086 sub sp, #24
80047e4: af00 add r7, sp, #0
80047e6: 60f8 str r0, [r7, #12]
80047e8: 60b9 str r1, [r7, #8]
80047ea: 607a str r2, [r7, #4]
80047ec: 603b str r3, [r7, #0]
LWIP_ASSERT("single netif already set", 0);
return NULL;
}
#endif
LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL);
80047ee: 68fb ldr r3, [r7, #12]
80047f0: 2b00 cmp r3, #0
80047f2: d108 bne.n 8004806 <netif_add+0x26>
80047f4: 4b5b ldr r3, [pc, #364] ; (8004964 <netif_add+0x184>)
80047f6: f240 1227 movw r2, #295 ; 0x127
80047fa: 495b ldr r1, [pc, #364] ; (8004968 <netif_add+0x188>)
80047fc: 485b ldr r0, [pc, #364] ; (800496c <netif_add+0x18c>)
80047fe: f00b fb5b bl 800feb8 <printf>
8004802: 2300 movs r3, #0
8004804: e0a9 b.n 800495a <netif_add+0x17a>
LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL);
8004806: 6a7b ldr r3, [r7, #36] ; 0x24
8004808: 2b00 cmp r3, #0
800480a: d108 bne.n 800481e <netif_add+0x3e>
800480c: 4b55 ldr r3, [pc, #340] ; (8004964 <netif_add+0x184>)
800480e: f44f 7294 mov.w r2, #296 ; 0x128
8004812: 4957 ldr r1, [pc, #348] ; (8004970 <netif_add+0x190>)
8004814: 4855 ldr r0, [pc, #340] ; (800496c <netif_add+0x18c>)
8004816: f00b fb4f bl 800feb8 <printf>
800481a: 2300 movs r3, #0
800481c: e09d b.n 800495a <netif_add+0x17a>
#if LWIP_IPV4
if (ipaddr == NULL) {
800481e: 68bb ldr r3, [r7, #8]
8004820: 2b00 cmp r3, #0
8004822: d101 bne.n 8004828 <netif_add+0x48>
ipaddr = ip_2_ip4(IP4_ADDR_ANY);
8004824: 4b53 ldr r3, [pc, #332] ; (8004974 <netif_add+0x194>)
8004826: 60bb str r3, [r7, #8]
}
if (netmask == NULL) {
8004828: 687b ldr r3, [r7, #4]
800482a: 2b00 cmp r3, #0
800482c: d101 bne.n 8004832 <netif_add+0x52>
netmask = ip_2_ip4(IP4_ADDR_ANY);
800482e: 4b51 ldr r3, [pc, #324] ; (8004974 <netif_add+0x194>)
8004830: 607b str r3, [r7, #4]
}
if (gw == NULL) {
8004832: 683b ldr r3, [r7, #0]
8004834: 2b00 cmp r3, #0
8004836: d101 bne.n 800483c <netif_add+0x5c>
gw = ip_2_ip4(IP4_ADDR_ANY);
8004838: 4b4e ldr r3, [pc, #312] ; (8004974 <netif_add+0x194>)
800483a: 603b str r3, [r7, #0]
}
/* reset new interface configuration state */
ip_addr_set_zero_ip4(&netif->ip_addr);
800483c: 68fb ldr r3, [r7, #12]
800483e: 2200 movs r2, #0
8004840: 605a str r2, [r3, #4]
ip_addr_set_zero_ip4(&netif->netmask);
8004842: 68fb ldr r3, [r7, #12]
8004844: 2200 movs r2, #0
8004846: 609a str r2, [r3, #8]
ip_addr_set_zero_ip4(&netif->gw);
8004848: 68fb ldr r3, [r7, #12]
800484a: 2200 movs r2, #0
800484c: 60da str r2, [r3, #12]
netif->output = netif_null_output_ip4;
800484e: 68fb ldr r3, [r7, #12]
8004850: 4a49 ldr r2, [pc, #292] ; (8004978 <netif_add+0x198>)
8004852: 615a str r2, [r3, #20]
#endif /* LWIP_IPV6_ADDRESS_LIFETIMES */
}
netif->output_ip6 = netif_null_output_ip6;
#endif /* LWIP_IPV6 */
NETIF_SET_CHECKSUM_CTRL(netif, NETIF_CHECKSUM_ENABLE_ALL);
netif->mtu = 0;
8004854: 68fb ldr r3, [r7, #12]
8004856: 2200 movs r2, #0
8004858: 851a strh r2, [r3, #40] ; 0x28
netif->flags = 0;
800485a: 68fb ldr r3, [r7, #12]
800485c: 2200 movs r2, #0
800485e: f883 2031 strb.w r2, [r3, #49] ; 0x31
#ifdef netif_get_client_data
memset(netif->client_data, 0, sizeof(netif->client_data));
8004862: 68fb ldr r3, [r7, #12]
8004864: 3324 adds r3, #36 ; 0x24
8004866: 2204 movs r2, #4
8004868: 2100 movs r1, #0
800486a: 4618 mov r0, r3
800486c: f00b fb1c bl 800fea8 <memset>
#endif /* LWIP_IPV6 */
#if LWIP_NETIF_STATUS_CALLBACK
netif->status_callback = NULL;
#endif /* LWIP_NETIF_STATUS_CALLBACK */
#if LWIP_NETIF_LINK_CALLBACK
netif->link_callback = NULL;
8004870: 68fb ldr r3, [r7, #12]
8004872: 2200 movs r2, #0
8004874: 61da str r2, [r3, #28]
netif->loop_first = NULL;
netif->loop_last = NULL;
#endif /* ENABLE_LOOPBACK */
/* remember netif specific state information data */
netif->state = state;
8004876: 68fb ldr r3, [r7, #12]
8004878: 6a3a ldr r2, [r7, #32]
800487a: 621a str r2, [r3, #32]
netif->num = netif_num;
800487c: 4b3f ldr r3, [pc, #252] ; (800497c <netif_add+0x19c>)
800487e: 781a ldrb r2, [r3, #0]
8004880: 68fb ldr r3, [r7, #12]
8004882: f883 2034 strb.w r2, [r3, #52] ; 0x34
netif->input = input;
8004886: 68fb ldr r3, [r7, #12]
8004888: 6aba ldr r2, [r7, #40] ; 0x28
800488a: 611a str r2, [r3, #16]
#if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS
netif->loop_cnt_current = 0;
#endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */
#if LWIP_IPV4
netif_set_addr(netif, ipaddr, netmask, gw);
800488c: 683b ldr r3, [r7, #0]
800488e: 687a ldr r2, [r7, #4]
8004890: 68b9 ldr r1, [r7, #8]
8004892: 68f8 ldr r0, [r7, #12]
8004894: f000 f914 bl 8004ac0 <netif_set_addr>
#endif /* LWIP_IPV4 */
/* call user specified initialization function for netif */
if (init(netif) != ERR_OK) {
8004898: 6a7b ldr r3, [r7, #36] ; 0x24
800489a: 68f8 ldr r0, [r7, #12]
800489c: 4798 blx r3
800489e: 4603 mov r3, r0
80048a0: 2b00 cmp r3, #0
80048a2: d001 beq.n 80048a8 <netif_add+0xc8>
return NULL;
80048a4: 2300 movs r3, #0
80048a6: e058 b.n 800495a <netif_add+0x17a>
*/
{
struct netif *netif2;
int num_netifs;
do {
if (netif->num == 255) {
80048a8: 68fb ldr r3, [r7, #12]
80048aa: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80048ae: 2bff cmp r3, #255 ; 0xff
80048b0: d103 bne.n 80048ba <netif_add+0xda>
netif->num = 0;
80048b2: 68fb ldr r3, [r7, #12]
80048b4: 2200 movs r2, #0
80048b6: f883 2034 strb.w r2, [r3, #52] ; 0x34
}
num_netifs = 0;
80048ba: 2300 movs r3, #0
80048bc: 613b str r3, [r7, #16]
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
80048be: 4b30 ldr r3, [pc, #192] ; (8004980 <netif_add+0x1a0>)
80048c0: 681b ldr r3, [r3, #0]
80048c2: 617b str r3, [r7, #20]
80048c4: e02b b.n 800491e <netif_add+0x13e>
LWIP_ASSERT("netif already added", netif2 != netif);
80048c6: 697a ldr r2, [r7, #20]
80048c8: 68fb ldr r3, [r7, #12]
80048ca: 429a cmp r2, r3
80048cc: d106 bne.n 80048dc <netif_add+0xfc>
80048ce: 4b25 ldr r3, [pc, #148] ; (8004964 <netif_add+0x184>)
80048d0: f240 128b movw r2, #395 ; 0x18b
80048d4: 492b ldr r1, [pc, #172] ; (8004984 <netif_add+0x1a4>)
80048d6: 4825 ldr r0, [pc, #148] ; (800496c <netif_add+0x18c>)
80048d8: f00b faee bl 800feb8 <printf>
num_netifs++;
80048dc: 693b ldr r3, [r7, #16]
80048de: 3301 adds r3, #1
80048e0: 613b str r3, [r7, #16]
LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255);
80048e2: 693b ldr r3, [r7, #16]
80048e4: 2bff cmp r3, #255 ; 0xff
80048e6: dd06 ble.n 80048f6 <netif_add+0x116>
80048e8: 4b1e ldr r3, [pc, #120] ; (8004964 <netif_add+0x184>)
80048ea: f240 128d movw r2, #397 ; 0x18d
80048ee: 4926 ldr r1, [pc, #152] ; (8004988 <netif_add+0x1a8>)
80048f0: 481e ldr r0, [pc, #120] ; (800496c <netif_add+0x18c>)
80048f2: f00b fae1 bl 800feb8 <printf>
if (netif2->num == netif->num) {
80048f6: 697b ldr r3, [r7, #20]
80048f8: f893 2034 ldrb.w r2, [r3, #52] ; 0x34
80048fc: 68fb ldr r3, [r7, #12]
80048fe: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8004902: 429a cmp r2, r3
8004904: d108 bne.n 8004918 <netif_add+0x138>
netif->num++;
8004906: 68fb ldr r3, [r7, #12]
8004908: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
800490c: 3301 adds r3, #1
800490e: b2da uxtb r2, r3
8004910: 68fb ldr r3, [r7, #12]
8004912: f883 2034 strb.w r2, [r3, #52] ; 0x34
break;
8004916: e005 b.n 8004924 <netif_add+0x144>
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
8004918: 697b ldr r3, [r7, #20]
800491a: 681b ldr r3, [r3, #0]
800491c: 617b str r3, [r7, #20]
800491e: 697b ldr r3, [r7, #20]
8004920: 2b00 cmp r3, #0
8004922: d1d0 bne.n 80048c6 <netif_add+0xe6>
}
}
} while (netif2 != NULL);
8004924: 697b ldr r3, [r7, #20]
8004926: 2b00 cmp r3, #0
8004928: d1be bne.n 80048a8 <netif_add+0xc8>
}
if (netif->num == 254) {
800492a: 68fb ldr r3, [r7, #12]
800492c: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8004930: 2bfe cmp r3, #254 ; 0xfe
8004932: d103 bne.n 800493c <netif_add+0x15c>
netif_num = 0;
8004934: 4b11 ldr r3, [pc, #68] ; (800497c <netif_add+0x19c>)
8004936: 2200 movs r2, #0
8004938: 701a strb r2, [r3, #0]
800493a: e006 b.n 800494a <netif_add+0x16a>
} else {
netif_num = (u8_t)(netif->num + 1);
800493c: 68fb ldr r3, [r7, #12]
800493e: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8004942: 3301 adds r3, #1
8004944: b2da uxtb r2, r3
8004946: 4b0d ldr r3, [pc, #52] ; (800497c <netif_add+0x19c>)
8004948: 701a strb r2, [r3, #0]
}
/* add this netif to the list */
netif->next = netif_list;
800494a: 4b0d ldr r3, [pc, #52] ; (8004980 <netif_add+0x1a0>)
800494c: 681a ldr r2, [r3, #0]
800494e: 68fb ldr r3, [r7, #12]
8004950: 601a str r2, [r3, #0]
netif_list = netif;
8004952: 4a0b ldr r2, [pc, #44] ; (8004980 <netif_add+0x1a0>)
8004954: 68fb ldr r3, [r7, #12]
8004956: 6013 str r3, [r2, #0]
#endif /* LWIP_IPV4 */
LWIP_DEBUGF(NETIF_DEBUG, ("\n"));
netif_invoke_ext_callback(netif, LWIP_NSC_NETIF_ADDED, NULL);
return netif;
8004958: 68fb ldr r3, [r7, #12]
}
800495a: 4618 mov r0, r3
800495c: 3718 adds r7, #24
800495e: 46bd mov sp, r7
8004960: bd80 pop {r7, pc}
8004962: bf00 nop
8004964: 08014d74 .word 0x08014d74
8004968: 08014e08 .word 0x08014e08
800496c: 08014dc4 .word 0x08014dc4
8004970: 08014e24 .word 0x08014e24
8004974: 080178c4 .word 0x080178c4
8004978: 08004da3 .word 0x08004da3
800497c: 20008ba8 .word 0x20008ba8
8004980: 20008ba0 .word 0x20008ba0
8004984: 08014e48 .word 0x08014e48
8004988: 08014e5c .word 0x08014e5c
0800498c <netif_do_ip_addr_changed>:
static void
netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
{
800498c: b580 push {r7, lr}
800498e: b082 sub sp, #8
8004990: af00 add r7, sp, #0
8004992: 6078 str r0, [r7, #4]
8004994: 6039 str r1, [r7, #0]
#if LWIP_TCP
tcp_netif_ip_addr_changed(old_addr, new_addr);
8004996: 6839 ldr r1, [r7, #0]
8004998: 6878 ldr r0, [r7, #4]
800499a: f002 fb57 bl 800704c <tcp_netif_ip_addr_changed>
#endif /* LWIP_TCP */
#if LWIP_UDP
udp_netif_ip_addr_changed(old_addr, new_addr);
800499e: 6839 ldr r1, [r7, #0]
80049a0: 6878 ldr r0, [r7, #4]
80049a2: f006 ff3d bl 800b820 <udp_netif_ip_addr_changed>
#endif /* LWIP_UDP */
#if LWIP_RAW
raw_netif_ip_addr_changed(old_addr, new_addr);
#endif /* LWIP_RAW */
}
80049a6: bf00 nop
80049a8: 3708 adds r7, #8
80049aa: 46bd mov sp, r7
80049ac: bd80 pop {r7, pc}
...
080049b0 <netif_do_set_ipaddr>:
#if LWIP_IPV4
static int
netif_do_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr, ip_addr_t *old_addr)
{
80049b0: b580 push {r7, lr}
80049b2: b086 sub sp, #24
80049b4: af00 add r7, sp, #0
80049b6: 60f8 str r0, [r7, #12]
80049b8: 60b9 str r1, [r7, #8]
80049ba: 607a str r2, [r7, #4]
LWIP_ASSERT("invalid pointer", ipaddr != NULL);
80049bc: 68bb ldr r3, [r7, #8]
80049be: 2b00 cmp r3, #0
80049c0: d106 bne.n 80049d0 <netif_do_set_ipaddr+0x20>
80049c2: 4b1d ldr r3, [pc, #116] ; (8004a38 <netif_do_set_ipaddr+0x88>)
80049c4: f240 12cb movw r2, #459 ; 0x1cb
80049c8: 491c ldr r1, [pc, #112] ; (8004a3c <netif_do_set_ipaddr+0x8c>)
80049ca: 481d ldr r0, [pc, #116] ; (8004a40 <netif_do_set_ipaddr+0x90>)
80049cc: f00b fa74 bl 800feb8 <printf>
LWIP_ASSERT("invalid pointer", old_addr != NULL);
80049d0: 687b ldr r3, [r7, #4]
80049d2: 2b00 cmp r3, #0
80049d4: d106 bne.n 80049e4 <netif_do_set_ipaddr+0x34>
80049d6: 4b18 ldr r3, [pc, #96] ; (8004a38 <netif_do_set_ipaddr+0x88>)
80049d8: f44f 72e6 mov.w r2, #460 ; 0x1cc
80049dc: 4917 ldr r1, [pc, #92] ; (8004a3c <netif_do_set_ipaddr+0x8c>)
80049de: 4818 ldr r0, [pc, #96] ; (8004a40 <netif_do_set_ipaddr+0x90>)
80049e0: f00b fa6a bl 800feb8 <printf>
/* address is actually being changed? */
if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) {
80049e4: 68bb ldr r3, [r7, #8]
80049e6: 681a ldr r2, [r3, #0]
80049e8: 68fb ldr r3, [r7, #12]
80049ea: 3304 adds r3, #4
80049ec: 681b ldr r3, [r3, #0]
80049ee: 429a cmp r2, r3
80049f0: d01c beq.n 8004a2c <netif_do_set_ipaddr+0x7c>
ip_addr_t new_addr;
*ip_2_ip4(&new_addr) = *ipaddr;
80049f2: 68bb ldr r3, [r7, #8]
80049f4: 681b ldr r3, [r3, #0]
80049f6: 617b str r3, [r7, #20]
IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4);
ip_addr_copy(*old_addr, *netif_ip_addr4(netif));
80049f8: 68fb ldr r3, [r7, #12]
80049fa: 3304 adds r3, #4
80049fc: 681a ldr r2, [r3, #0]
80049fe: 687b ldr r3, [r7, #4]
8004a00: 601a str r2, [r3, #0]
LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n"));
netif_do_ip_addr_changed(old_addr, &new_addr);
8004a02: f107 0314 add.w r3, r7, #20
8004a06: 4619 mov r1, r3
8004a08: 6878 ldr r0, [r7, #4]
8004a0a: f7ff ffbf bl 800498c <netif_do_ip_addr_changed>
mib2_remove_ip4(netif);
mib2_remove_route_ip4(0, netif);
/* set new IP address to netif */
ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr);
8004a0e: 68bb ldr r3, [r7, #8]
8004a10: 2b00 cmp r3, #0
8004a12: d002 beq.n 8004a1a <netif_do_set_ipaddr+0x6a>
8004a14: 68bb ldr r3, [r7, #8]
8004a16: 681b ldr r3, [r3, #0]
8004a18: e000 b.n 8004a1c <netif_do_set_ipaddr+0x6c>
8004a1a: 2300 movs r3, #0
8004a1c: 68fa ldr r2, [r7, #12]
8004a1e: 6053 str r3, [r2, #4]
IP_SET_TYPE_VAL(netif->ip_addr, IPADDR_TYPE_V4);
mib2_add_ip4(netif);
mib2_add_route_ip4(0, netif);
netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4);
8004a20: 2101 movs r1, #1
8004a22: 68f8 ldr r0, [r7, #12]
8004a24: f000 f8d2 bl 8004bcc <netif_issue_reports>
NETIF_STATUS_CALLBACK(netif);
return 1; /* address changed */
8004a28: 2301 movs r3, #1
8004a2a: e000 b.n 8004a2e <netif_do_set_ipaddr+0x7e>
}
return 0; /* address unchanged */
8004a2c: 2300 movs r3, #0
}
8004a2e: 4618 mov r0, r3
8004a30: 3718 adds r7, #24
8004a32: 46bd mov sp, r7
8004a34: bd80 pop {r7, pc}
8004a36: bf00 nop
8004a38: 08014d74 .word 0x08014d74
8004a3c: 08014e8c .word 0x08014e8c
8004a40: 08014dc4 .word 0x08014dc4
08004a44 <netif_do_set_netmask>:
}
}
static int
netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm)
{
8004a44: b480 push {r7}
8004a46: b085 sub sp, #20
8004a48: af00 add r7, sp, #0
8004a4a: 60f8 str r0, [r7, #12]
8004a4c: 60b9 str r1, [r7, #8]
8004a4e: 607a str r2, [r7, #4]
/* address is actually being changed? */
if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) {
8004a50: 68bb ldr r3, [r7, #8]
8004a52: 681a ldr r2, [r3, #0]
8004a54: 68fb ldr r3, [r7, #12]
8004a56: 3308 adds r3, #8
8004a58: 681b ldr r3, [r3, #0]
8004a5a: 429a cmp r2, r3
8004a5c: d00a beq.n 8004a74 <netif_do_set_netmask+0x30>
#else
LWIP_UNUSED_ARG(old_nm);
#endif
mib2_remove_route_ip4(0, netif);
/* set new netmask to netif */
ip4_addr_set(ip_2_ip4(&netif->netmask), netmask);
8004a5e: 68bb ldr r3, [r7, #8]
8004a60: 2b00 cmp r3, #0
8004a62: d002 beq.n 8004a6a <netif_do_set_netmask+0x26>
8004a64: 68bb ldr r3, [r7, #8]
8004a66: 681b ldr r3, [r3, #0]
8004a68: e000 b.n 8004a6c <netif_do_set_netmask+0x28>
8004a6a: 2300 movs r3, #0
8004a6c: 68fa ldr r2, [r7, #12]
8004a6e: 6093 str r3, [r2, #8]
netif->name[0], netif->name[1],
ip4_addr1_16(netif_ip4_netmask(netif)),
ip4_addr2_16(netif_ip4_netmask(netif)),
ip4_addr3_16(netif_ip4_netmask(netif)),
ip4_addr4_16(netif_ip4_netmask(netif))));
return 1; /* netmask changed */
8004a70: 2301 movs r3, #1
8004a72: e000 b.n 8004a76 <netif_do_set_netmask+0x32>
}
return 0; /* netmask unchanged */
8004a74: 2300 movs r3, #0
}
8004a76: 4618 mov r0, r3
8004a78: 3714 adds r7, #20
8004a7a: 46bd mov sp, r7
8004a7c: f85d 7b04 ldr.w r7, [sp], #4
8004a80: 4770 bx lr
08004a82 <netif_do_set_gw>:
}
}
static int
netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw)
{
8004a82: b480 push {r7}
8004a84: b085 sub sp, #20
8004a86: af00 add r7, sp, #0
8004a88: 60f8 str r0, [r7, #12]
8004a8a: 60b9 str r1, [r7, #8]
8004a8c: 607a str r2, [r7, #4]
/* address is actually being changed? */
if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) {
8004a8e: 68bb ldr r3, [r7, #8]
8004a90: 681a ldr r2, [r3, #0]
8004a92: 68fb ldr r3, [r7, #12]
8004a94: 330c adds r3, #12
8004a96: 681b ldr r3, [r3, #0]
8004a98: 429a cmp r2, r3
8004a9a: d00a beq.n 8004ab2 <netif_do_set_gw+0x30>
ip_addr_copy(*old_gw, *netif_ip_gw4(netif));
#else
LWIP_UNUSED_ARG(old_gw);
#endif
ip4_addr_set(ip_2_ip4(&netif->gw), gw);
8004a9c: 68bb ldr r3, [r7, #8]
8004a9e: 2b00 cmp r3, #0
8004aa0: d002 beq.n 8004aa8 <netif_do_set_gw+0x26>
8004aa2: 68bb ldr r3, [r7, #8]
8004aa4: 681b ldr r3, [r3, #0]
8004aa6: e000 b.n 8004aaa <netif_do_set_gw+0x28>
8004aa8: 2300 movs r3, #0
8004aaa: 68fa ldr r2, [r7, #12]
8004aac: 60d3 str r3, [r2, #12]
netif->name[0], netif->name[1],
ip4_addr1_16(netif_ip4_gw(netif)),
ip4_addr2_16(netif_ip4_gw(netif)),
ip4_addr3_16(netif_ip4_gw(netif)),
ip4_addr4_16(netif_ip4_gw(netif))));
return 1; /* gateway changed */
8004aae: 2301 movs r3, #1
8004ab0: e000 b.n 8004ab4 <netif_do_set_gw+0x32>
}
return 0; /* gateway unchanged */
8004ab2: 2300 movs r3, #0
}
8004ab4: 4618 mov r0, r3
8004ab6: 3714 adds r7, #20
8004ab8: 46bd mov sp, r7
8004aba: f85d 7b04 ldr.w r7, [sp], #4
8004abe: 4770 bx lr
08004ac0 <netif_set_addr>:
* @param gw the new default gateway
*/
void
netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,
const ip4_addr_t *gw)
{
8004ac0: b580 push {r7, lr}
8004ac2: b088 sub sp, #32
8004ac4: af00 add r7, sp, #0
8004ac6: 60f8 str r0, [r7, #12]
8004ac8: 60b9 str r1, [r7, #8]
8004aca: 607a str r2, [r7, #4]
8004acc: 603b str r3, [r7, #0]
ip_addr_t old_nm_val;
ip_addr_t old_gw_val;
ip_addr_t *old_nm = &old_nm_val;
ip_addr_t *old_gw = &old_gw_val;
#else
ip_addr_t *old_nm = NULL;
8004ace: 2300 movs r3, #0
8004ad0: 61fb str r3, [r7, #28]
ip_addr_t *old_gw = NULL;
8004ad2: 2300 movs r3, #0
8004ad4: 61bb str r3, [r7, #24]
int remove;
LWIP_ASSERT_CORE_LOCKED();
/* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
if (ipaddr == NULL) {
8004ad6: 68bb ldr r3, [r7, #8]
8004ad8: 2b00 cmp r3, #0
8004ada: d101 bne.n 8004ae0 <netif_set_addr+0x20>
ipaddr = IP4_ADDR_ANY4;
8004adc: 4b1c ldr r3, [pc, #112] ; (8004b50 <netif_set_addr+0x90>)
8004ade: 60bb str r3, [r7, #8]
}
if (netmask == NULL) {
8004ae0: 687b ldr r3, [r7, #4]
8004ae2: 2b00 cmp r3, #0
8004ae4: d101 bne.n 8004aea <netif_set_addr+0x2a>
netmask = IP4_ADDR_ANY4;
8004ae6: 4b1a ldr r3, [pc, #104] ; (8004b50 <netif_set_addr+0x90>)
8004ae8: 607b str r3, [r7, #4]
}
if (gw == NULL) {
8004aea: 683b ldr r3, [r7, #0]
8004aec: 2b00 cmp r3, #0
8004aee: d101 bne.n 8004af4 <netif_set_addr+0x34>
gw = IP4_ADDR_ANY4;
8004af0: 4b17 ldr r3, [pc, #92] ; (8004b50 <netif_set_addr+0x90>)
8004af2: 603b str r3, [r7, #0]
}
remove = ip4_addr_isany(ipaddr);
8004af4: 68bb ldr r3, [r7, #8]
8004af6: 2b00 cmp r3, #0
8004af8: d003 beq.n 8004b02 <netif_set_addr+0x42>
8004afa: 68bb ldr r3, [r7, #8]
8004afc: 681b ldr r3, [r3, #0]
8004afe: 2b00 cmp r3, #0
8004b00: d101 bne.n 8004b06 <netif_set_addr+0x46>
8004b02: 2301 movs r3, #1
8004b04: e000 b.n 8004b08 <netif_set_addr+0x48>
8004b06: 2300 movs r3, #0
8004b08: 617b str r3, [r7, #20]
if (remove) {
8004b0a: 697b ldr r3, [r7, #20]
8004b0c: 2b00 cmp r3, #0
8004b0e: d006 beq.n 8004b1e <netif_set_addr+0x5e>
/* when removing an address, we have to remove it *before* changing netmask/gw
to ensure that tcp RST segment can be sent correctly */
if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) {
8004b10: f107 0310 add.w r3, r7, #16
8004b14: 461a mov r2, r3
8004b16: 68b9 ldr r1, [r7, #8]
8004b18: 68f8 ldr r0, [r7, #12]
8004b1a: f7ff ff49 bl 80049b0 <netif_do_set_ipaddr>
change_reason |= LWIP_NSC_IPV4_ADDRESS_CHANGED;
cb_args.ipv4_changed.old_address = &old_addr;
#endif
}
}
if (netif_do_set_netmask(netif, netmask, old_nm)) {
8004b1e: 69fa ldr r2, [r7, #28]
8004b20: 6879 ldr r1, [r7, #4]
8004b22: 68f8 ldr r0, [r7, #12]
8004b24: f7ff ff8e bl 8004a44 <netif_do_set_netmask>
#if LWIP_NETIF_EXT_STATUS_CALLBACK
change_reason |= LWIP_NSC_IPV4_NETMASK_CHANGED;
cb_args.ipv4_changed.old_netmask = old_nm;
#endif
}
if (netif_do_set_gw(netif, gw, old_gw)) {
8004b28: 69ba ldr r2, [r7, #24]
8004b2a: 6839 ldr r1, [r7, #0]
8004b2c: 68f8 ldr r0, [r7, #12]
8004b2e: f7ff ffa8 bl 8004a82 <netif_do_set_gw>
#if LWIP_NETIF_EXT_STATUS_CALLBACK
change_reason |= LWIP_NSC_IPV4_GATEWAY_CHANGED;
cb_args.ipv4_changed.old_gw = old_gw;
#endif
}
if (!remove) {
8004b32: 697b ldr r3, [r7, #20]
8004b34: 2b00 cmp r3, #0
8004b36: d106 bne.n 8004b46 <netif_set_addr+0x86>
/* set ipaddr last to ensure netmask/gw have been set when status callback is called */
if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) {
8004b38: f107 0310 add.w r3, r7, #16
8004b3c: 461a mov r2, r3
8004b3e: 68b9 ldr r1, [r7, #8]
8004b40: 68f8 ldr r0, [r7, #12]
8004b42: f7ff ff35 bl 80049b0 <netif_do_set_ipaddr>
if (change_reason != LWIP_NSC_NONE) {
change_reason |= LWIP_NSC_IPV4_SETTINGS_CHANGED;
netif_invoke_ext_callback(netif, change_reason, &cb_args);
}
#endif
}
8004b46: bf00 nop
8004b48: 3720 adds r7, #32
8004b4a: 46bd mov sp, r7
8004b4c: bd80 pop {r7, pc}
8004b4e: bf00 nop
8004b50: 080178c4 .word 0x080178c4
08004b54 <netif_set_default>:
*
* @param netif the default network interface
*/
void
netif_set_default(struct netif *netif)
{
8004b54: b480 push {r7}
8004b56: b083 sub sp, #12
8004b58: af00 add r7, sp, #0
8004b5a: 6078 str r0, [r7, #4]
mib2_remove_route_ip4(1, netif);
} else {
/* install default route */
mib2_add_route_ip4(1, netif);
}
netif_default = netif;
8004b5c: 4a04 ldr r2, [pc, #16] ; (8004b70 <netif_set_default+0x1c>)
8004b5e: 687b ldr r3, [r7, #4]
8004b60: 6013 str r3, [r2, #0]
LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n",
netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\''));
}
8004b62: bf00 nop
8004b64: 370c adds r7, #12
8004b66: 46bd mov sp, r7
8004b68: f85d 7b04 ldr.w r7, [sp], #4
8004b6c: 4770 bx lr
8004b6e: bf00 nop
8004b70: 20008ba4 .word 0x20008ba4
08004b74 <netif_set_up>:
* Bring an interface up, available for processing
* traffic.
*/
void
netif_set_up(struct netif *netif)
{
8004b74: b580 push {r7, lr}
8004b76: b082 sub sp, #8
8004b78: af00 add r7, sp, #0
8004b7a: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return);
8004b7c: 687b ldr r3, [r7, #4]
8004b7e: 2b00 cmp r3, #0
8004b80: d107 bne.n 8004b92 <netif_set_up+0x1e>
8004b82: 4b0f ldr r3, [pc, #60] ; (8004bc0 <netif_set_up+0x4c>)
8004b84: f44f 7254 mov.w r2, #848 ; 0x350
8004b88: 490e ldr r1, [pc, #56] ; (8004bc4 <netif_set_up+0x50>)
8004b8a: 480f ldr r0, [pc, #60] ; (8004bc8 <netif_set_up+0x54>)
8004b8c: f00b f994 bl 800feb8 <printf>
8004b90: e013 b.n 8004bba <netif_set_up+0x46>
if (!(netif->flags & NETIF_FLAG_UP)) {
8004b92: 687b ldr r3, [r7, #4]
8004b94: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004b98: f003 0301 and.w r3, r3, #1
8004b9c: 2b00 cmp r3, #0
8004b9e: d10c bne.n 8004bba <netif_set_up+0x46>
netif_set_flags(netif, NETIF_FLAG_UP);
8004ba0: 687b ldr r3, [r7, #4]
8004ba2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004ba6: f043 0301 orr.w r3, r3, #1
8004baa: b2da uxtb r2, r3
8004bac: 687b ldr r3, [r7, #4]
8004bae: f883 2031 strb.w r2, [r3, #49] ; 0x31
args.status_changed.state = 1;
netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args);
}
#endif
netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6);
8004bb2: 2103 movs r1, #3
8004bb4: 6878 ldr r0, [r7, #4]
8004bb6: f000 f809 bl 8004bcc <netif_issue_reports>
#if LWIP_IPV6
nd6_restart_netif(netif);
#endif /* LWIP_IPV6 */
}
}
8004bba: 3708 adds r7, #8
8004bbc: 46bd mov sp, r7
8004bbe: bd80 pop {r7, pc}
8004bc0: 08014d74 .word 0x08014d74
8004bc4: 08014efc .word 0x08014efc
8004bc8: 08014dc4 .word 0x08014dc4
08004bcc <netif_issue_reports>:
/** Send ARP/IGMP/MLD/RS events, e.g. on link-up/netif-up or addr-change
*/
static void
netif_issue_reports(struct netif *netif, u8_t report_type)
{
8004bcc: b580 push {r7, lr}
8004bce: b082 sub sp, #8
8004bd0: af00 add r7, sp, #0
8004bd2: 6078 str r0, [r7, #4]
8004bd4: 460b mov r3, r1
8004bd6: 70fb strb r3, [r7, #3]
LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL);
8004bd8: 687b ldr r3, [r7, #4]
8004bda: 2b00 cmp r3, #0
8004bdc: d106 bne.n 8004bec <netif_issue_reports+0x20>
8004bde: 4b18 ldr r3, [pc, #96] ; (8004c40 <netif_issue_reports+0x74>)
8004be0: f240 326d movw r2, #877 ; 0x36d
8004be4: 4917 ldr r1, [pc, #92] ; (8004c44 <netif_issue_reports+0x78>)
8004be6: 4818 ldr r0, [pc, #96] ; (8004c48 <netif_issue_reports+0x7c>)
8004be8: f00b f966 bl 800feb8 <printf>
/* Only send reports when both link and admin states are up */
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
8004bec: 687b ldr r3, [r7, #4]
8004bee: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004bf2: f003 0304 and.w r3, r3, #4
8004bf6: 2b00 cmp r3, #0
8004bf8: d01e beq.n 8004c38 <netif_issue_reports+0x6c>
!(netif->flags & NETIF_FLAG_UP)) {
8004bfa: 687b ldr r3, [r7, #4]
8004bfc: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004c00: f003 0301 and.w r3, r3, #1
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
8004c04: 2b00 cmp r3, #0
8004c06: d017 beq.n 8004c38 <netif_issue_reports+0x6c>
return;
}
#if LWIP_IPV4
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
8004c08: 78fb ldrb r3, [r7, #3]
8004c0a: f003 0301 and.w r3, r3, #1
8004c0e: 2b00 cmp r3, #0
8004c10: d013 beq.n 8004c3a <netif_issue_reports+0x6e>
!ip4_addr_isany_val(*netif_ip4_addr(netif))) {
8004c12: 687b ldr r3, [r7, #4]
8004c14: 3304 adds r3, #4
8004c16: 681b ldr r3, [r3, #0]
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
8004c18: 2b00 cmp r3, #0
8004c1a: d00e beq.n 8004c3a <netif_issue_reports+0x6e>
#if LWIP_ARP
/* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */
if (netif->flags & (NETIF_FLAG_ETHARP)) {
8004c1c: 687b ldr r3, [r7, #4]
8004c1e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004c22: f003 0308 and.w r3, r3, #8
8004c26: 2b00 cmp r3, #0
8004c28: d007 beq.n 8004c3a <netif_issue_reports+0x6e>
etharp_gratuitous(netif);
8004c2a: 687b ldr r3, [r7, #4]
8004c2c: 3304 adds r3, #4
8004c2e: 4619 mov r1, r3
8004c30: 6878 ldr r0, [r7, #4]
8004c32: f009 fbf5 bl 800e420 <etharp_request>
8004c36: e000 b.n 8004c3a <netif_issue_reports+0x6e>
return;
8004c38: bf00 nop
/* send mld memberships */
mld6_report_groups(netif);
#endif /* LWIP_IPV6_MLD */
}
#endif /* LWIP_IPV6 */
}
8004c3a: 3708 adds r7, #8
8004c3c: 46bd mov sp, r7
8004c3e: bd80 pop {r7, pc}
8004c40: 08014d74 .word 0x08014d74
8004c44: 08014f18 .word 0x08014f18
8004c48: 08014dc4 .word 0x08014dc4
08004c4c <netif_set_down>:
* @ingroup netif
* Bring an interface down, disabling any traffic processing.
*/
void
netif_set_down(struct netif *netif)
{
8004c4c: b580 push {r7, lr}
8004c4e: b082 sub sp, #8
8004c50: af00 add r7, sp, #0
8004c52: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return);
8004c54: 687b ldr r3, [r7, #4]
8004c56: 2b00 cmp r3, #0
8004c58: d107 bne.n 8004c6a <netif_set_down+0x1e>
8004c5a: 4b12 ldr r3, [pc, #72] ; (8004ca4 <netif_set_down+0x58>)
8004c5c: f240 329b movw r2, #923 ; 0x39b
8004c60: 4911 ldr r1, [pc, #68] ; (8004ca8 <netif_set_down+0x5c>)
8004c62: 4812 ldr r0, [pc, #72] ; (8004cac <netif_set_down+0x60>)
8004c64: f00b f928 bl 800feb8 <printf>
8004c68: e019 b.n 8004c9e <netif_set_down+0x52>
if (netif->flags & NETIF_FLAG_UP) {
8004c6a: 687b ldr r3, [r7, #4]
8004c6c: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004c70: f003 0301 and.w r3, r3, #1
8004c74: 2b00 cmp r3, #0
8004c76: d012 beq.n 8004c9e <netif_set_down+0x52>
args.status_changed.state = 0;
netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args);
}
#endif
netif_clear_flags(netif, NETIF_FLAG_UP);
8004c78: 687b ldr r3, [r7, #4]
8004c7a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004c7e: f023 0301 bic.w r3, r3, #1
8004c82: b2da uxtb r2, r3
8004c84: 687b ldr r3, [r7, #4]
8004c86: f883 2031 strb.w r2, [r3, #49] ; 0x31
MIB2_COPY_SYSUPTIME_TO(&netif->ts);
#if LWIP_IPV4 && LWIP_ARP
if (netif->flags & NETIF_FLAG_ETHARP) {
8004c8a: 687b ldr r3, [r7, #4]
8004c8c: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004c90: f003 0308 and.w r3, r3, #8
8004c94: 2b00 cmp r3, #0
8004c96: d002 beq.n 8004c9e <netif_set_down+0x52>
etharp_cleanup_netif(netif);
8004c98: 6878 ldr r0, [r7, #4]
8004c9a: f008 ff7b bl 800db94 <etharp_cleanup_netif>
nd6_cleanup_netif(netif);
#endif /* LWIP_IPV6 */
NETIF_STATUS_CALLBACK(netif);
}
}
8004c9e: 3708 adds r7, #8
8004ca0: 46bd mov sp, r7
8004ca2: bd80 pop {r7, pc}
8004ca4: 08014d74 .word 0x08014d74
8004ca8: 08014f3c .word 0x08014f3c
8004cac: 08014dc4 .word 0x08014dc4
08004cb0 <netif_set_link_up>:
* @ingroup netif
* Called by a driver when its link goes up
*/
void
netif_set_link_up(struct netif *netif)
{
8004cb0: b580 push {r7, lr}
8004cb2: b082 sub sp, #8
8004cb4: af00 add r7, sp, #0
8004cb6: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return);
8004cb8: 687b ldr r3, [r7, #4]
8004cba: 2b00 cmp r3, #0
8004cbc: d107 bne.n 8004cce <netif_set_link_up+0x1e>
8004cbe: 4b15 ldr r3, [pc, #84] ; (8004d14 <netif_set_link_up+0x64>)
8004cc0: f44f 7278 mov.w r2, #992 ; 0x3e0
8004cc4: 4914 ldr r1, [pc, #80] ; (8004d18 <netif_set_link_up+0x68>)
8004cc6: 4815 ldr r0, [pc, #84] ; (8004d1c <netif_set_link_up+0x6c>)
8004cc8: f00b f8f6 bl 800feb8 <printf>
8004ccc: e01e b.n 8004d0c <netif_set_link_up+0x5c>
if (!(netif->flags & NETIF_FLAG_LINK_UP)) {
8004cce: 687b ldr r3, [r7, #4]
8004cd0: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004cd4: f003 0304 and.w r3, r3, #4
8004cd8: 2b00 cmp r3, #0
8004cda: d117 bne.n 8004d0c <netif_set_link_up+0x5c>
netif_set_flags(netif, NETIF_FLAG_LINK_UP);
8004cdc: 687b ldr r3, [r7, #4]
8004cde: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004ce2: f043 0304 orr.w r3, r3, #4
8004ce6: b2da uxtb r2, r3
8004ce8: 687b ldr r3, [r7, #4]
8004cea: f883 2031 strb.w r2, [r3, #49] ; 0x31
#if LWIP_DHCP
dhcp_network_changed(netif);
8004cee: 6878 ldr r0, [r7, #4]
8004cf0: f007 f9c0 bl 800c074 <dhcp_network_changed>
#if LWIP_AUTOIP
autoip_network_changed(netif);
#endif /* LWIP_AUTOIP */
netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6);
8004cf4: 2103 movs r1, #3
8004cf6: 6878 ldr r0, [r7, #4]
8004cf8: f7ff ff68 bl 8004bcc <netif_issue_reports>
#if LWIP_IPV6
nd6_restart_netif(netif);
#endif /* LWIP_IPV6 */
NETIF_LINK_CALLBACK(netif);
8004cfc: 687b ldr r3, [r7, #4]
8004cfe: 69db ldr r3, [r3, #28]
8004d00: 2b00 cmp r3, #0
8004d02: d003 beq.n 8004d0c <netif_set_link_up+0x5c>
8004d04: 687b ldr r3, [r7, #4]
8004d06: 69db ldr r3, [r3, #28]
8004d08: 6878 ldr r0, [r7, #4]
8004d0a: 4798 blx r3
args.link_changed.state = 1;
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
}
#endif
}
}
8004d0c: 3708 adds r7, #8
8004d0e: 46bd mov sp, r7
8004d10: bd80 pop {r7, pc}
8004d12: bf00 nop
8004d14: 08014d74 .word 0x08014d74
8004d18: 08014f5c .word 0x08014f5c
8004d1c: 08014dc4 .word 0x08014dc4
08004d20 <netif_set_link_down>:
* @ingroup netif
* Called by a driver when its link goes down
*/
void
netif_set_link_down(struct netif *netif)
{
8004d20: b580 push {r7, lr}
8004d22: b082 sub sp, #8
8004d24: af00 add r7, sp, #0
8004d26: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return);
8004d28: 687b ldr r3, [r7, #4]
8004d2a: 2b00 cmp r3, #0
8004d2c: d107 bne.n 8004d3e <netif_set_link_down+0x1e>
8004d2e: 4b11 ldr r3, [pc, #68] ; (8004d74 <netif_set_link_down+0x54>)
8004d30: f240 4206 movw r2, #1030 ; 0x406
8004d34: 4910 ldr r1, [pc, #64] ; (8004d78 <netif_set_link_down+0x58>)
8004d36: 4811 ldr r0, [pc, #68] ; (8004d7c <netif_set_link_down+0x5c>)
8004d38: f00b f8be bl 800feb8 <printf>
8004d3c: e017 b.n 8004d6e <netif_set_link_down+0x4e>
if (netif->flags & NETIF_FLAG_LINK_UP) {
8004d3e: 687b ldr r3, [r7, #4]
8004d40: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004d44: f003 0304 and.w r3, r3, #4
8004d48: 2b00 cmp r3, #0
8004d4a: d010 beq.n 8004d6e <netif_set_link_down+0x4e>
netif_clear_flags(netif, NETIF_FLAG_LINK_UP);
8004d4c: 687b ldr r3, [r7, #4]
8004d4e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8004d52: f023 0304 bic.w r3, r3, #4
8004d56: b2da uxtb r2, r3
8004d58: 687b ldr r3, [r7, #4]
8004d5a: f883 2031 strb.w r2, [r3, #49] ; 0x31
NETIF_LINK_CALLBACK(netif);
8004d5e: 687b ldr r3, [r7, #4]
8004d60: 69db ldr r3, [r3, #28]
8004d62: 2b00 cmp r3, #0
8004d64: d003 beq.n 8004d6e <netif_set_link_down+0x4e>
8004d66: 687b ldr r3, [r7, #4]
8004d68: 69db ldr r3, [r3, #28]
8004d6a: 6878 ldr r0, [r7, #4]
8004d6c: 4798 blx r3
args.link_changed.state = 0;
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
}
#endif
}
}
8004d6e: 3708 adds r7, #8
8004d70: 46bd mov sp, r7
8004d72: bd80 pop {r7, pc}
8004d74: 08014d74 .word 0x08014d74
8004d78: 08014f80 .word 0x08014f80
8004d7c: 08014dc4 .word 0x08014dc4
08004d80 <netif_set_link_callback>:
* @ingroup netif
* Set callback to be called when link is brought up/down
*/
void
netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback)
{
8004d80: b480 push {r7}
8004d82: b083 sub sp, #12
8004d84: af00 add r7, sp, #0
8004d86: 6078 str r0, [r7, #4]
8004d88: 6039 str r1, [r7, #0]
LWIP_ASSERT_CORE_LOCKED();
if (netif) {
8004d8a: 687b ldr r3, [r7, #4]
8004d8c: 2b00 cmp r3, #0
8004d8e: d002 beq.n 8004d96 <netif_set_link_callback+0x16>
netif->link_callback = link_callback;
8004d90: 687b ldr r3, [r7, #4]
8004d92: 683a ldr r2, [r7, #0]
8004d94: 61da str r2, [r3, #28]
}
}
8004d96: bf00 nop
8004d98: 370c adds r7, #12
8004d9a: 46bd mov sp, r7
8004d9c: f85d 7b04 ldr.w r7, [sp], #4
8004da0: 4770 bx lr
08004da2 <netif_null_output_ip4>:
#if LWIP_IPV4
/** Dummy IPv4 output function for netifs not supporting IPv4
*/
static err_t
netif_null_output_ip4(struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr)
{
8004da2: b480 push {r7}
8004da4: b085 sub sp, #20
8004da6: af00 add r7, sp, #0
8004da8: 60f8 str r0, [r7, #12]
8004daa: 60b9 str r1, [r7, #8]
8004dac: 607a str r2, [r7, #4]
LWIP_UNUSED_ARG(netif);
LWIP_UNUSED_ARG(p);
LWIP_UNUSED_ARG(ipaddr);
return ERR_IF;
8004dae: f06f 030b mvn.w r3, #11
}
8004db2: 4618 mov r0, r3
8004db4: 3714 adds r7, #20
8004db6: 46bd mov sp, r7
8004db8: f85d 7b04 ldr.w r7, [sp], #4
8004dbc: 4770 bx lr
...
08004dc0 <netif_get_by_index>:
*
* @param idx index of netif to find
*/
struct netif *
netif_get_by_index(u8_t idx)
{
8004dc0: b480 push {r7}
8004dc2: b085 sub sp, #20
8004dc4: af00 add r7, sp, #0
8004dc6: 4603 mov r3, r0
8004dc8: 71fb strb r3, [r7, #7]
struct netif *netif;
LWIP_ASSERT_CORE_LOCKED();
if (idx != NETIF_NO_INDEX) {
8004dca: 79fb ldrb r3, [r7, #7]
8004dcc: 2b00 cmp r3, #0
8004dce: d013 beq.n 8004df8 <netif_get_by_index+0x38>
NETIF_FOREACH(netif) {
8004dd0: 4b0d ldr r3, [pc, #52] ; (8004e08 <netif_get_by_index+0x48>)
8004dd2: 681b ldr r3, [r3, #0]
8004dd4: 60fb str r3, [r7, #12]
8004dd6: e00c b.n 8004df2 <netif_get_by_index+0x32>
if (idx == netif_get_index(netif)) {
8004dd8: 68fb ldr r3, [r7, #12]
8004dda: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8004dde: 3301 adds r3, #1
8004de0: b2db uxtb r3, r3
8004de2: 79fa ldrb r2, [r7, #7]
8004de4: 429a cmp r2, r3
8004de6: d101 bne.n 8004dec <netif_get_by_index+0x2c>
return netif; /* found! */
8004de8: 68fb ldr r3, [r7, #12]
8004dea: e006 b.n 8004dfa <netif_get_by_index+0x3a>
NETIF_FOREACH(netif) {
8004dec: 68fb ldr r3, [r7, #12]
8004dee: 681b ldr r3, [r3, #0]
8004df0: 60fb str r3, [r7, #12]
8004df2: 68fb ldr r3, [r7, #12]
8004df4: 2b00 cmp r3, #0
8004df6: d1ef bne.n 8004dd8 <netif_get_by_index+0x18>
}
}
}
return NULL;
8004df8: 2300 movs r3, #0
}
8004dfa: 4618 mov r0, r3
8004dfc: 3714 adds r7, #20
8004dfe: 46bd mov sp, r7
8004e00: f85d 7b04 ldr.w r7, [sp], #4
8004e04: 4770 bx lr
8004e06: bf00 nop
8004e08: 20008ba0 .word 0x20008ba0
08004e0c <pbuf_free_ooseq>:
#if !NO_SYS
static
#endif /* !NO_SYS */
void
pbuf_free_ooseq(void)
{
8004e0c: b580 push {r7, lr}
8004e0e: b082 sub sp, #8
8004e10: af00 add r7, sp, #0
struct tcp_pcb *pcb;
SYS_ARCH_SET(pbuf_free_ooseq_pending, 0);
8004e12: 4b0c ldr r3, [pc, #48] ; (8004e44 <pbuf_free_ooseq+0x38>)
8004e14: 2200 movs r2, #0
8004e16: 701a strb r2, [r3, #0]
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
8004e18: 4b0b ldr r3, [pc, #44] ; (8004e48 <pbuf_free_ooseq+0x3c>)
8004e1a: 681b ldr r3, [r3, #0]
8004e1c: 607b str r3, [r7, #4]
8004e1e: e00a b.n 8004e36 <pbuf_free_ooseq+0x2a>
if (pcb->ooseq != NULL) {
8004e20: 687b ldr r3, [r7, #4]
8004e22: 6f5b ldr r3, [r3, #116] ; 0x74
8004e24: 2b00 cmp r3, #0
8004e26: d003 beq.n 8004e30 <pbuf_free_ooseq+0x24>
/** Free the ooseq pbufs of one PCB only */
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free_ooseq: freeing out-of-sequence pbufs\n"));
tcp_free_ooseq(pcb);
8004e28: 6878 ldr r0, [r7, #4]
8004e2a: f002 f94d bl 80070c8 <tcp_free_ooseq>
return;
8004e2e: e005 b.n 8004e3c <pbuf_free_ooseq+0x30>
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
8004e30: 687b ldr r3, [r7, #4]
8004e32: 68db ldr r3, [r3, #12]
8004e34: 607b str r3, [r7, #4]
8004e36: 687b ldr r3, [r7, #4]
8004e38: 2b00 cmp r3, #0
8004e3a: d1f1 bne.n 8004e20 <pbuf_free_ooseq+0x14>
}
}
}
8004e3c: 3708 adds r7, #8
8004e3e: 46bd mov sp, r7
8004e40: bd80 pop {r7, pc}
8004e42: bf00 nop
8004e44: 20008ba9 .word 0x20008ba9
8004e48: 20008bb8 .word 0x20008bb8
08004e4c <pbuf_pool_is_empty>:
#endif /* !NO_SYS */
/** Queue a call to pbuf_free_ooseq if not already queued. */
static void
pbuf_pool_is_empty(void)
{
8004e4c: b480 push {r7}
8004e4e: af00 add r7, sp, #0
#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL
SYS_ARCH_SET(pbuf_free_ooseq_pending, 1);
8004e50: 4b03 ldr r3, [pc, #12] ; (8004e60 <pbuf_pool_is_empty+0x14>)
8004e52: 2201 movs r2, #1
8004e54: 701a strb r2, [r3, #0]
if (!queued) {
/* queue a call to pbuf_free_ooseq if not already queued */
PBUF_POOL_FREE_OOSEQ_QUEUE_CALL();
}
#endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */
}
8004e56: bf00 nop
8004e58: 46bd mov sp, r7
8004e5a: f85d 7b04 ldr.w r7, [sp], #4
8004e5e: 4770 bx lr
8004e60: 20008ba9 .word 0x20008ba9
08004e64 <pbuf_init_alloced_pbuf>:
#endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */
/* Initialize members of struct pbuf after allocation */
static void
pbuf_init_alloced_pbuf(struct pbuf *p, void *payload, u16_t tot_len, u16_t len, pbuf_type type, u8_t flags)
{
8004e64: b480 push {r7}
8004e66: b085 sub sp, #20
8004e68: af00 add r7, sp, #0
8004e6a: 60f8 str r0, [r7, #12]
8004e6c: 60b9 str r1, [r7, #8]
8004e6e: 4611 mov r1, r2
8004e70: 461a mov r2, r3
8004e72: 460b mov r3, r1
8004e74: 80fb strh r3, [r7, #6]
8004e76: 4613 mov r3, r2
8004e78: 80bb strh r3, [r7, #4]
p->next = NULL;
8004e7a: 68fb ldr r3, [r7, #12]
8004e7c: 2200 movs r2, #0
8004e7e: 601a str r2, [r3, #0]
p->payload = payload;
8004e80: 68fb ldr r3, [r7, #12]
8004e82: 68ba ldr r2, [r7, #8]
8004e84: 605a str r2, [r3, #4]
p->tot_len = tot_len;
8004e86: 68fb ldr r3, [r7, #12]
8004e88: 88fa ldrh r2, [r7, #6]
8004e8a: 811a strh r2, [r3, #8]
p->len = len;
8004e8c: 68fb ldr r3, [r7, #12]
8004e8e: 88ba ldrh r2, [r7, #4]
8004e90: 815a strh r2, [r3, #10]
p->type_internal = (u8_t)type;
8004e92: 8b3b ldrh r3, [r7, #24]
8004e94: b2da uxtb r2, r3
8004e96: 68fb ldr r3, [r7, #12]
8004e98: 731a strb r2, [r3, #12]
p->flags = flags;
8004e9a: 68fb ldr r3, [r7, #12]
8004e9c: 7f3a ldrb r2, [r7, #28]
8004e9e: 735a strb r2, [r3, #13]
p->ref = 1;
8004ea0: 68fb ldr r3, [r7, #12]
8004ea2: 2201 movs r2, #1
8004ea4: 739a strb r2, [r3, #14]
p->if_idx = NETIF_NO_INDEX;
8004ea6: 68fb ldr r3, [r7, #12]
8004ea8: 2200 movs r2, #0
8004eaa: 73da strb r2, [r3, #15]
}
8004eac: bf00 nop
8004eae: 3714 adds r7, #20
8004eb0: 46bd mov sp, r7
8004eb2: f85d 7b04 ldr.w r7, [sp], #4
8004eb6: 4770 bx lr
08004eb8 <pbuf_alloc>:
* @return the allocated pbuf. If multiple pbufs where allocated, this
* is the first pbuf of a pbuf chain.
*/
struct pbuf *
pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
{
8004eb8: b580 push {r7, lr}
8004eba: b08c sub sp, #48 ; 0x30
8004ebc: af02 add r7, sp, #8
8004ebe: 4603 mov r3, r0
8004ec0: 71fb strb r3, [r7, #7]
8004ec2: 460b mov r3, r1
8004ec4: 80bb strh r3, [r7, #4]
8004ec6: 4613 mov r3, r2
8004ec8: 807b strh r3, [r7, #2]
struct pbuf *p;
u16_t offset = (u16_t)layer;
8004eca: 79fb ldrb r3, [r7, #7]
8004ecc: 847b strh r3, [r7, #34] ; 0x22
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length));
switch (type) {
8004ece: 887b ldrh r3, [r7, #2]
8004ed0: f5b3 7f20 cmp.w r3, #640 ; 0x280
8004ed4: d07f beq.n 8004fd6 <pbuf_alloc+0x11e>
8004ed6: f5b3 7f20 cmp.w r3, #640 ; 0x280
8004eda: f300 80c8 bgt.w 800506e <pbuf_alloc+0x1b6>
8004ede: f5b3 7fc1 cmp.w r3, #386 ; 0x182
8004ee2: d010 beq.n 8004f06 <pbuf_alloc+0x4e>
8004ee4: f5b3 7fc1 cmp.w r3, #386 ; 0x182
8004ee8: f300 80c1 bgt.w 800506e <pbuf_alloc+0x1b6>
8004eec: 2b01 cmp r3, #1
8004eee: d002 beq.n 8004ef6 <pbuf_alloc+0x3e>
8004ef0: 2b41 cmp r3, #65 ; 0x41
8004ef2: f040 80bc bne.w 800506e <pbuf_alloc+0x1b6>
case PBUF_REF: /* fall through */
case PBUF_ROM:
p = pbuf_alloc_reference(NULL, length, type);
8004ef6: 887a ldrh r2, [r7, #2]
8004ef8: 88bb ldrh r3, [r7, #4]
8004efa: 4619 mov r1, r3
8004efc: 2000 movs r0, #0
8004efe: f000 f8d1 bl 80050a4 <pbuf_alloc_reference>
8004f02: 6278 str r0, [r7, #36] ; 0x24
break;
8004f04: e0bd b.n 8005082 <pbuf_alloc+0x1ca>
case PBUF_POOL: {
struct pbuf *q, *last;
u16_t rem_len; /* remaining length */
p = NULL;
8004f06: 2300 movs r3, #0
8004f08: 627b str r3, [r7, #36] ; 0x24
last = NULL;
8004f0a: 2300 movs r3, #0
8004f0c: 61fb str r3, [r7, #28]
rem_len = length;
8004f0e: 88bb ldrh r3, [r7, #4]
8004f10: 837b strh r3, [r7, #26]
do {
u16_t qlen;
q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL);
8004f12: 2008 movs r0, #8
8004f14: f7ff fbc2 bl 800469c <memp_malloc>
8004f18: 6138 str r0, [r7, #16]
if (q == NULL) {
8004f1a: 693b ldr r3, [r7, #16]
8004f1c: 2b00 cmp r3, #0
8004f1e: d109 bne.n 8004f34 <pbuf_alloc+0x7c>
PBUF_POOL_IS_EMPTY();
8004f20: f7ff ff94 bl 8004e4c <pbuf_pool_is_empty>
/* free chain so far allocated */
if (p) {
8004f24: 6a7b ldr r3, [r7, #36] ; 0x24
8004f26: 2b00 cmp r3, #0
8004f28: d002 beq.n 8004f30 <pbuf_alloc+0x78>
pbuf_free(p);
8004f2a: 6a78 ldr r0, [r7, #36] ; 0x24
8004f2c: f000 faa8 bl 8005480 <pbuf_free>
}
/* bail out unsuccessfully */
return NULL;
8004f30: 2300 movs r3, #0
8004f32: e0a7 b.n 8005084 <pbuf_alloc+0x1cc>
}
qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)));
8004f34: 8c7b ldrh r3, [r7, #34] ; 0x22
8004f36: 3303 adds r3, #3
8004f38: b29b uxth r3, r3
8004f3a: f023 0303 bic.w r3, r3, #3
8004f3e: b29b uxth r3, r3
8004f40: f5c3 7314 rsb r3, r3, #592 ; 0x250
8004f44: b29b uxth r3, r3
8004f46: 8b7a ldrh r2, [r7, #26]
8004f48: 4293 cmp r3, r2
8004f4a: bf28 it cs
8004f4c: 4613 movcs r3, r2
8004f4e: 81fb strh r3, [r7, #14]
pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)),
8004f50: 8c7b ldrh r3, [r7, #34] ; 0x22
8004f52: 3310 adds r3, #16
8004f54: 693a ldr r2, [r7, #16]
8004f56: 4413 add r3, r2
8004f58: 3303 adds r3, #3
8004f5a: f023 0303 bic.w r3, r3, #3
8004f5e: 4618 mov r0, r3
8004f60: 89f9 ldrh r1, [r7, #14]
8004f62: 8b7a ldrh r2, [r7, #26]
8004f64: 2300 movs r3, #0
8004f66: 9301 str r3, [sp, #4]
8004f68: 887b ldrh r3, [r7, #2]
8004f6a: 9300 str r3, [sp, #0]
8004f6c: 460b mov r3, r1
8004f6e: 4601 mov r1, r0
8004f70: 6938 ldr r0, [r7, #16]
8004f72: f7ff ff77 bl 8004e64 <pbuf_init_alloced_pbuf>
rem_len, qlen, type, 0);
LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned",
8004f76: 693b ldr r3, [r7, #16]
8004f78: 685b ldr r3, [r3, #4]
8004f7a: f003 0303 and.w r3, r3, #3
8004f7e: 2b00 cmp r3, #0
8004f80: d006 beq.n 8004f90 <pbuf_alloc+0xd8>
8004f82: 4b42 ldr r3, [pc, #264] ; (800508c <pbuf_alloc+0x1d4>)
8004f84: f44f 7280 mov.w r2, #256 ; 0x100
8004f88: 4941 ldr r1, [pc, #260] ; (8005090 <pbuf_alloc+0x1d8>)
8004f8a: 4842 ldr r0, [pc, #264] ; (8005094 <pbuf_alloc+0x1dc>)
8004f8c: f00a ff94 bl 800feb8 <printf>
((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0);
LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT",
8004f90: 8c7b ldrh r3, [r7, #34] ; 0x22
8004f92: 3303 adds r3, #3
8004f94: f023 0303 bic.w r3, r3, #3
8004f98: f5b3 7f14 cmp.w r3, #592 ; 0x250
8004f9c: d106 bne.n 8004fac <pbuf_alloc+0xf4>
8004f9e: 4b3b ldr r3, [pc, #236] ; (800508c <pbuf_alloc+0x1d4>)
8004fa0: f44f 7281 mov.w r2, #258 ; 0x102
8004fa4: 493c ldr r1, [pc, #240] ; (8005098 <pbuf_alloc+0x1e0>)
8004fa6: 483b ldr r0, [pc, #236] ; (8005094 <pbuf_alloc+0x1dc>)
8004fa8: f00a ff86 bl 800feb8 <printf>
(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 );
if (p == NULL) {
8004fac: 6a7b ldr r3, [r7, #36] ; 0x24
8004fae: 2b00 cmp r3, #0
8004fb0: d102 bne.n 8004fb8 <pbuf_alloc+0x100>
/* allocated head of pbuf chain (into p) */
p = q;
8004fb2: 693b ldr r3, [r7, #16]
8004fb4: 627b str r3, [r7, #36] ; 0x24
8004fb6: e002 b.n 8004fbe <pbuf_alloc+0x106>
} else {
/* make previous pbuf point to this pbuf */
last->next = q;
8004fb8: 69fb ldr r3, [r7, #28]
8004fba: 693a ldr r2, [r7, #16]
8004fbc: 601a str r2, [r3, #0]
}
last = q;
8004fbe: 693b ldr r3, [r7, #16]
8004fc0: 61fb str r3, [r7, #28]
rem_len = (u16_t)(rem_len - qlen);
8004fc2: 8b7a ldrh r2, [r7, #26]
8004fc4: 89fb ldrh r3, [r7, #14]
8004fc6: 1ad3 subs r3, r2, r3
8004fc8: 837b strh r3, [r7, #26]
offset = 0;
8004fca: 2300 movs r3, #0
8004fcc: 847b strh r3, [r7, #34] ; 0x22
} while (rem_len > 0);
8004fce: 8b7b ldrh r3, [r7, #26]
8004fd0: 2b00 cmp r3, #0
8004fd2: d19e bne.n 8004f12 <pbuf_alloc+0x5a>
break;
8004fd4: e055 b.n 8005082 <pbuf_alloc+0x1ca>
}
case PBUF_RAM: {
u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
8004fd6: 8c7b ldrh r3, [r7, #34] ; 0x22
8004fd8: 3303 adds r3, #3
8004fda: b29b uxth r3, r3
8004fdc: f023 0303 bic.w r3, r3, #3
8004fe0: b29a uxth r2, r3
8004fe2: 88bb ldrh r3, [r7, #4]
8004fe4: 3303 adds r3, #3
8004fe6: b29b uxth r3, r3
8004fe8: f023 0303 bic.w r3, r3, #3
8004fec: b29b uxth r3, r3
8004fee: 4413 add r3, r2
8004ff0: 833b strh r3, [r7, #24]
mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len);
8004ff2: 8b3b ldrh r3, [r7, #24]
8004ff4: 3310 adds r3, #16
8004ff6: 82fb strh r3, [r7, #22]
/* bug #50040: Check for integer overflow when calculating alloc_len */
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
8004ff8: 8b3a ldrh r2, [r7, #24]
8004ffa: 88bb ldrh r3, [r7, #4]
8004ffc: 3303 adds r3, #3
8004ffe: f023 0303 bic.w r3, r3, #3
8005002: 429a cmp r2, r3
8005004: d306 bcc.n 8005014 <pbuf_alloc+0x15c>
(alloc_len < LWIP_MEM_ALIGN_SIZE(length))) {
8005006: 8afa ldrh r2, [r7, #22]
8005008: 88bb ldrh r3, [r7, #4]
800500a: 3303 adds r3, #3
800500c: f023 0303 bic.w r3, r3, #3
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
8005010: 429a cmp r2, r3
8005012: d201 bcs.n 8005018 <pbuf_alloc+0x160>
return NULL;
8005014: 2300 movs r3, #0
8005016: e035 b.n 8005084 <pbuf_alloc+0x1cc>
}
/* If pbuf is to be allocated in RAM, allocate memory for it. */
p = (struct pbuf *)mem_malloc(alloc_len);
8005018: 8afb ldrh r3, [r7, #22]
800501a: 4618 mov r0, r3
800501c: f7ff f9ae bl 800437c <mem_malloc>
8005020: 6278 str r0, [r7, #36] ; 0x24
if (p == NULL) {
8005022: 6a7b ldr r3, [r7, #36] ; 0x24
8005024: 2b00 cmp r3, #0
8005026: d101 bne.n 800502c <pbuf_alloc+0x174>
return NULL;
8005028: 2300 movs r3, #0
800502a: e02b b.n 8005084 <pbuf_alloc+0x1cc>
}
pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)),
800502c: 8c7b ldrh r3, [r7, #34] ; 0x22
800502e: 3310 adds r3, #16
8005030: 6a7a ldr r2, [r7, #36] ; 0x24
8005032: 4413 add r3, r2
8005034: 3303 adds r3, #3
8005036: f023 0303 bic.w r3, r3, #3
800503a: 4618 mov r0, r3
800503c: 88b9 ldrh r1, [r7, #4]
800503e: 88ba ldrh r2, [r7, #4]
8005040: 2300 movs r3, #0
8005042: 9301 str r3, [sp, #4]
8005044: 887b ldrh r3, [r7, #2]
8005046: 9300 str r3, [sp, #0]
8005048: 460b mov r3, r1
800504a: 4601 mov r1, r0
800504c: 6a78 ldr r0, [r7, #36] ; 0x24
800504e: f7ff ff09 bl 8004e64 <pbuf_init_alloced_pbuf>
length, length, type, 0);
LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned",
8005052: 6a7b ldr r3, [r7, #36] ; 0x24
8005054: 685b ldr r3, [r3, #4]
8005056: f003 0303 and.w r3, r3, #3
800505a: 2b00 cmp r3, #0
800505c: d010 beq.n 8005080 <pbuf_alloc+0x1c8>
800505e: 4b0b ldr r3, [pc, #44] ; (800508c <pbuf_alloc+0x1d4>)
8005060: f44f 7291 mov.w r2, #290 ; 0x122
8005064: 490d ldr r1, [pc, #52] ; (800509c <pbuf_alloc+0x1e4>)
8005066: 480b ldr r0, [pc, #44] ; (8005094 <pbuf_alloc+0x1dc>)
8005068: f00a ff26 bl 800feb8 <printf>
((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0);
break;
800506c: e008 b.n 8005080 <pbuf_alloc+0x1c8>
}
default:
LWIP_ASSERT("pbuf_alloc: erroneous type", 0);
800506e: 4b07 ldr r3, [pc, #28] ; (800508c <pbuf_alloc+0x1d4>)
8005070: f240 1227 movw r2, #295 ; 0x127
8005074: 490a ldr r1, [pc, #40] ; (80050a0 <pbuf_alloc+0x1e8>)
8005076: 4807 ldr r0, [pc, #28] ; (8005094 <pbuf_alloc+0x1dc>)
8005078: f00a ff1e bl 800feb8 <printf>
return NULL;
800507c: 2300 movs r3, #0
800507e: e001 b.n 8005084 <pbuf_alloc+0x1cc>
break;
8005080: bf00 nop
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p));
return p;
8005082: 6a7b ldr r3, [r7, #36] ; 0x24
}
8005084: 4618 mov r0, r3
8005086: 3728 adds r7, #40 ; 0x28
8005088: 46bd mov sp, r7
800508a: bd80 pop {r7, pc}
800508c: 08014fa4 .word 0x08014fa4
8005090: 08014fd4 .word 0x08014fd4
8005094: 08015004 .word 0x08015004
8005098: 0801502c .word 0x0801502c
800509c: 08015060 .word 0x08015060
80050a0: 0801508c .word 0x0801508c
080050a4 <pbuf_alloc_reference>:
*
* @return the allocated pbuf.
*/
struct pbuf *
pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type)
{
80050a4: b580 push {r7, lr}
80050a6: b086 sub sp, #24
80050a8: af02 add r7, sp, #8
80050aa: 6078 str r0, [r7, #4]
80050ac: 460b mov r3, r1
80050ae: 807b strh r3, [r7, #2]
80050b0: 4613 mov r3, r2
80050b2: 803b strh r3, [r7, #0]
struct pbuf *p;
LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM));
80050b4: 883b ldrh r3, [r7, #0]
80050b6: 2b41 cmp r3, #65 ; 0x41
80050b8: d009 beq.n 80050ce <pbuf_alloc_reference+0x2a>
80050ba: 883b ldrh r3, [r7, #0]
80050bc: 2b01 cmp r3, #1
80050be: d006 beq.n 80050ce <pbuf_alloc_reference+0x2a>
80050c0: 4b0f ldr r3, [pc, #60] ; (8005100 <pbuf_alloc_reference+0x5c>)
80050c2: f44f 72a5 mov.w r2, #330 ; 0x14a
80050c6: 490f ldr r1, [pc, #60] ; (8005104 <pbuf_alloc_reference+0x60>)
80050c8: 480f ldr r0, [pc, #60] ; (8005108 <pbuf_alloc_reference+0x64>)
80050ca: f00a fef5 bl 800feb8 <printf>
/* only allocate memory for the pbuf structure */
p = (struct pbuf *)memp_malloc(MEMP_PBUF);
80050ce: 2007 movs r0, #7
80050d0: f7ff fae4 bl 800469c <memp_malloc>
80050d4: 60f8 str r0, [r7, #12]
if (p == NULL) {
80050d6: 68fb ldr r3, [r7, #12]
80050d8: 2b00 cmp r3, #0
80050da: d101 bne.n 80050e0 <pbuf_alloc_reference+0x3c>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
("pbuf_alloc_reference: Could not allocate MEMP_PBUF for PBUF_%s.\n",
(type == PBUF_ROM) ? "ROM" : "REF"));
return NULL;
80050dc: 2300 movs r3, #0
80050de: e00b b.n 80050f8 <pbuf_alloc_reference+0x54>
}
pbuf_init_alloced_pbuf(p, payload, length, length, type, 0);
80050e0: 8879 ldrh r1, [r7, #2]
80050e2: 887a ldrh r2, [r7, #2]
80050e4: 2300 movs r3, #0
80050e6: 9301 str r3, [sp, #4]
80050e8: 883b ldrh r3, [r7, #0]
80050ea: 9300 str r3, [sp, #0]
80050ec: 460b mov r3, r1
80050ee: 6879 ldr r1, [r7, #4]
80050f0: 68f8 ldr r0, [r7, #12]
80050f2: f7ff feb7 bl 8004e64 <pbuf_init_alloced_pbuf>
return p;
80050f6: 68fb ldr r3, [r7, #12]
}
80050f8: 4618 mov r0, r3
80050fa: 3710 adds r7, #16
80050fc: 46bd mov sp, r7
80050fe: bd80 pop {r7, pc}
8005100: 08014fa4 .word 0x08014fa4
8005104: 080150a8 .word 0x080150a8
8005108: 08015004 .word 0x08015004
0800510c <pbuf_alloced_custom>:
* big enough to hold 'length' plus the header size
*/
struct pbuf *
pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p,
void *payload_mem, u16_t payload_mem_len)
{
800510c: b580 push {r7, lr}
800510e: b088 sub sp, #32
8005110: af02 add r7, sp, #8
8005112: 607b str r3, [r7, #4]
8005114: 4603 mov r3, r0
8005116: 73fb strb r3, [r7, #15]
8005118: 460b mov r3, r1
800511a: 81bb strh r3, [r7, #12]
800511c: 4613 mov r3, r2
800511e: 817b strh r3, [r7, #10]
u16_t offset = (u16_t)l;
8005120: 7bfb ldrb r3, [r7, #15]
8005122: 827b strh r3, [r7, #18]
void *payload;
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloced_custom(length=%"U16_F")\n", length));
if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) {
8005124: 8a7b ldrh r3, [r7, #18]
8005126: 3303 adds r3, #3
8005128: f023 0203 bic.w r2, r3, #3
800512c: 89bb ldrh r3, [r7, #12]
800512e: 441a add r2, r3
8005130: 8cbb ldrh r3, [r7, #36] ; 0x24
8005132: 429a cmp r2, r3
8005134: d901 bls.n 800513a <pbuf_alloced_custom+0x2e>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length));
return NULL;
8005136: 2300 movs r3, #0
8005138: e018 b.n 800516c <pbuf_alloced_custom+0x60>
}
if (payload_mem != NULL) {
800513a: 6a3b ldr r3, [r7, #32]
800513c: 2b00 cmp r3, #0
800513e: d007 beq.n 8005150 <pbuf_alloced_custom+0x44>
payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset);
8005140: 8a7b ldrh r3, [r7, #18]
8005142: 3303 adds r3, #3
8005144: f023 0303 bic.w r3, r3, #3
8005148: 6a3a ldr r2, [r7, #32]
800514a: 4413 add r3, r2
800514c: 617b str r3, [r7, #20]
800514e: e001 b.n 8005154 <pbuf_alloced_custom+0x48>
} else {
payload = NULL;
8005150: 2300 movs r3, #0
8005152: 617b str r3, [r7, #20]
}
pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM);
8005154: 6878 ldr r0, [r7, #4]
8005156: 89b9 ldrh r1, [r7, #12]
8005158: 89ba ldrh r2, [r7, #12]
800515a: 2302 movs r3, #2
800515c: 9301 str r3, [sp, #4]
800515e: 897b ldrh r3, [r7, #10]
8005160: 9300 str r3, [sp, #0]
8005162: 460b mov r3, r1
8005164: 6979 ldr r1, [r7, #20]
8005166: f7ff fe7d bl 8004e64 <pbuf_init_alloced_pbuf>
return &p->pbuf;
800516a: 687b ldr r3, [r7, #4]
}
800516c: 4618 mov r0, r3
800516e: 3718 adds r7, #24
8005170: 46bd mov sp, r7
8005172: bd80 pop {r7, pc}
08005174 <pbuf_realloc>:
*
* @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain).
*/
void
pbuf_realloc(struct pbuf *p, u16_t new_len)
{
8005174: b580 push {r7, lr}
8005176: b084 sub sp, #16
8005178: af00 add r7, sp, #0
800517a: 6078 str r0, [r7, #4]
800517c: 460b mov r3, r1
800517e: 807b strh r3, [r7, #2]
struct pbuf *q;
u16_t rem_len; /* remaining length */
u16_t shrink;
LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL);
8005180: 687b ldr r3, [r7, #4]
8005182: 2b00 cmp r3, #0
8005184: d106 bne.n 8005194 <pbuf_realloc+0x20>
8005186: 4b3a ldr r3, [pc, #232] ; (8005270 <pbuf_realloc+0xfc>)
8005188: f44f 72cc mov.w r2, #408 ; 0x198
800518c: 4939 ldr r1, [pc, #228] ; (8005274 <pbuf_realloc+0x100>)
800518e: 483a ldr r0, [pc, #232] ; (8005278 <pbuf_realloc+0x104>)
8005190: f00a fe92 bl 800feb8 <printf>
/* desired length larger than current length? */
if (new_len >= p->tot_len) {
8005194: 687b ldr r3, [r7, #4]
8005196: 891b ldrh r3, [r3, #8]
8005198: 887a ldrh r2, [r7, #2]
800519a: 429a cmp r2, r3
800519c: d263 bcs.n 8005266 <pbuf_realloc+0xf2>
return;
}
/* the pbuf chain grows by (new_len - p->tot_len) bytes
* (which may be negative in case of shrinking) */
shrink = (u16_t)(p->tot_len - new_len);
800519e: 687b ldr r3, [r7, #4]
80051a0: 891a ldrh r2, [r3, #8]
80051a2: 887b ldrh r3, [r7, #2]
80051a4: 1ad3 subs r3, r2, r3
80051a6: 813b strh r3, [r7, #8]
/* first, step over any pbufs that should remain in the chain */
rem_len = new_len;
80051a8: 887b ldrh r3, [r7, #2]
80051aa: 817b strh r3, [r7, #10]
q = p;
80051ac: 687b ldr r3, [r7, #4]
80051ae: 60fb str r3, [r7, #12]
/* should this pbuf be kept? */
while (rem_len > q->len) {
80051b0: e018 b.n 80051e4 <pbuf_realloc+0x70>
/* decrease remaining length by pbuf length */
rem_len = (u16_t)(rem_len - q->len);
80051b2: 68fb ldr r3, [r7, #12]
80051b4: 895b ldrh r3, [r3, #10]
80051b6: 897a ldrh r2, [r7, #10]
80051b8: 1ad3 subs r3, r2, r3
80051ba: 817b strh r3, [r7, #10]
/* decrease total length indicator */
q->tot_len = (u16_t)(q->tot_len - shrink);
80051bc: 68fb ldr r3, [r7, #12]
80051be: 891a ldrh r2, [r3, #8]
80051c0: 893b ldrh r3, [r7, #8]
80051c2: 1ad3 subs r3, r2, r3
80051c4: b29a uxth r2, r3
80051c6: 68fb ldr r3, [r7, #12]
80051c8: 811a strh r2, [r3, #8]
/* proceed to next pbuf in chain */
q = q->next;
80051ca: 68fb ldr r3, [r7, #12]
80051cc: 681b ldr r3, [r3, #0]
80051ce: 60fb str r3, [r7, #12]
LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL);
80051d0: 68fb ldr r3, [r7, #12]
80051d2: 2b00 cmp r3, #0
80051d4: d106 bne.n 80051e4 <pbuf_realloc+0x70>
80051d6: 4b26 ldr r3, [pc, #152] ; (8005270 <pbuf_realloc+0xfc>)
80051d8: f240 12af movw r2, #431 ; 0x1af
80051dc: 4927 ldr r1, [pc, #156] ; (800527c <pbuf_realloc+0x108>)
80051de: 4826 ldr r0, [pc, #152] ; (8005278 <pbuf_realloc+0x104>)
80051e0: f00a fe6a bl 800feb8 <printf>
while (rem_len > q->len) {
80051e4: 68fb ldr r3, [r7, #12]
80051e6: 895b ldrh r3, [r3, #10]
80051e8: 897a ldrh r2, [r7, #10]
80051ea: 429a cmp r2, r3
80051ec: d8e1 bhi.n 80051b2 <pbuf_realloc+0x3e>
/* we have now reached the new last pbuf (in q) */
/* rem_len == desired length for pbuf q */
/* shrink allocated memory for PBUF_RAM */
/* (other types merely adjust their length fields */
if (pbuf_match_allocsrc(q, PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) && (rem_len != q->len)
80051ee: 68fb ldr r3, [r7, #12]
80051f0: 7b1b ldrb r3, [r3, #12]
80051f2: f003 030f and.w r3, r3, #15
80051f6: 2b00 cmp r3, #0
80051f8: d121 bne.n 800523e <pbuf_realloc+0xca>
80051fa: 68fb ldr r3, [r7, #12]
80051fc: 895b ldrh r3, [r3, #10]
80051fe: 897a ldrh r2, [r7, #10]
8005200: 429a cmp r2, r3
8005202: d01c beq.n 800523e <pbuf_realloc+0xca>
#if LWIP_SUPPORT_CUSTOM_PBUF
&& ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0)
8005204: 68fb ldr r3, [r7, #12]
8005206: 7b5b ldrb r3, [r3, #13]
8005208: f003 0302 and.w r3, r3, #2
800520c: 2b00 cmp r3, #0
800520e: d116 bne.n 800523e <pbuf_realloc+0xca>
#endif /* LWIP_SUPPORT_CUSTOM_PBUF */
) {
/* reallocate and adjust the length of the pbuf that will be split */
q = (struct pbuf *)mem_trim(q, (mem_size_t)(((u8_t *)q->payload - (u8_t *)q) + rem_len));
8005210: 68fb ldr r3, [r7, #12]
8005212: 685a ldr r2, [r3, #4]
8005214: 68fb ldr r3, [r7, #12]
8005216: 1ad3 subs r3, r2, r3
8005218: b29a uxth r2, r3
800521a: 897b ldrh r3, [r7, #10]
800521c: 4413 add r3, r2
800521e: b29b uxth r3, r3
8005220: 4619 mov r1, r3
8005222: 68f8 ldr r0, [r7, #12]
8005224: f7fe ffae bl 8004184 <mem_trim>
8005228: 60f8 str r0, [r7, #12]
LWIP_ASSERT("mem_trim returned q == NULL", q != NULL);
800522a: 68fb ldr r3, [r7, #12]
800522c: 2b00 cmp r3, #0
800522e: d106 bne.n 800523e <pbuf_realloc+0xca>
8005230: 4b0f ldr r3, [pc, #60] ; (8005270 <pbuf_realloc+0xfc>)
8005232: f240 12bd movw r2, #445 ; 0x1bd
8005236: 4912 ldr r1, [pc, #72] ; (8005280 <pbuf_realloc+0x10c>)
8005238: 480f ldr r0, [pc, #60] ; (8005278 <pbuf_realloc+0x104>)
800523a: f00a fe3d bl 800feb8 <printf>
}
/* adjust length fields for new last pbuf */
q->len = rem_len;
800523e: 68fb ldr r3, [r7, #12]
8005240: 897a ldrh r2, [r7, #10]
8005242: 815a strh r2, [r3, #10]
q->tot_len = q->len;
8005244: 68fb ldr r3, [r7, #12]
8005246: 895a ldrh r2, [r3, #10]
8005248: 68fb ldr r3, [r7, #12]
800524a: 811a strh r2, [r3, #8]
/* any remaining pbufs in chain? */
if (q->next != NULL) {
800524c: 68fb ldr r3, [r7, #12]
800524e: 681b ldr r3, [r3, #0]
8005250: 2b00 cmp r3, #0
8005252: d004 beq.n 800525e <pbuf_realloc+0xea>
/* free remaining pbufs in chain */
pbuf_free(q->next);
8005254: 68fb ldr r3, [r7, #12]
8005256: 681b ldr r3, [r3, #0]
8005258: 4618 mov r0, r3
800525a: f000 f911 bl 8005480 <pbuf_free>
}
/* q is last packet in chain */
q->next = NULL;
800525e: 68fb ldr r3, [r7, #12]
8005260: 2200 movs r2, #0
8005262: 601a str r2, [r3, #0]
8005264: e000 b.n 8005268 <pbuf_realloc+0xf4>
return;
8005266: bf00 nop
}
8005268: 3710 adds r7, #16
800526a: 46bd mov sp, r7
800526c: bd80 pop {r7, pc}
800526e: bf00 nop
8005270: 08014fa4 .word 0x08014fa4
8005274: 080150bc .word 0x080150bc
8005278: 08015004 .word 0x08015004
800527c: 080150d4 .word 0x080150d4
8005280: 080150ec .word 0x080150ec
08005284 <pbuf_add_header_impl>:
* @return non-zero on failure, zero on success.
*
*/
static u8_t
pbuf_add_header_impl(struct pbuf *p, size_t header_size_increment, u8_t force)
{
8005284: b580 push {r7, lr}
8005286: b086 sub sp, #24
8005288: af00 add r7, sp, #0
800528a: 60f8 str r0, [r7, #12]
800528c: 60b9 str r1, [r7, #8]
800528e: 4613 mov r3, r2
8005290: 71fb strb r3, [r7, #7]
u16_t type_internal;
void *payload;
u16_t increment_magnitude;
LWIP_ASSERT("p != NULL", p != NULL);
8005292: 68fb ldr r3, [r7, #12]
8005294: 2b00 cmp r3, #0
8005296: d106 bne.n 80052a6 <pbuf_add_header_impl+0x22>
8005298: 4b2b ldr r3, [pc, #172] ; (8005348 <pbuf_add_header_impl+0xc4>)
800529a: f240 12df movw r2, #479 ; 0x1df
800529e: 492b ldr r1, [pc, #172] ; (800534c <pbuf_add_header_impl+0xc8>)
80052a0: 482b ldr r0, [pc, #172] ; (8005350 <pbuf_add_header_impl+0xcc>)
80052a2: f00a fe09 bl 800feb8 <printf>
if ((p == NULL) || (header_size_increment > 0xFFFF)) {
80052a6: 68fb ldr r3, [r7, #12]
80052a8: 2b00 cmp r3, #0
80052aa: d003 beq.n 80052b4 <pbuf_add_header_impl+0x30>
80052ac: 68bb ldr r3, [r7, #8]
80052ae: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80052b2: d301 bcc.n 80052b8 <pbuf_add_header_impl+0x34>
return 1;
80052b4: 2301 movs r3, #1
80052b6: e043 b.n 8005340 <pbuf_add_header_impl+0xbc>
}
if (header_size_increment == 0) {
80052b8: 68bb ldr r3, [r7, #8]
80052ba: 2b00 cmp r3, #0
80052bc: d101 bne.n 80052c2 <pbuf_add_header_impl+0x3e>
return 0;
80052be: 2300 movs r3, #0
80052c0: e03e b.n 8005340 <pbuf_add_header_impl+0xbc>
}
increment_magnitude = (u16_t)header_size_increment;
80052c2: 68bb ldr r3, [r7, #8]
80052c4: 827b strh r3, [r7, #18]
/* Do not allow tot_len to wrap as a result. */
if ((u16_t)(increment_magnitude + p->tot_len) < increment_magnitude) {
80052c6: 68fb ldr r3, [r7, #12]
80052c8: 891a ldrh r2, [r3, #8]
80052ca: 8a7b ldrh r3, [r7, #18]
80052cc: 4413 add r3, r2
80052ce: b29b uxth r3, r3
80052d0: 8a7a ldrh r2, [r7, #18]
80052d2: 429a cmp r2, r3
80052d4: d901 bls.n 80052da <pbuf_add_header_impl+0x56>
return 1;
80052d6: 2301 movs r3, #1
80052d8: e032 b.n 8005340 <pbuf_add_header_impl+0xbc>
}
type_internal = p->type_internal;
80052da: 68fb ldr r3, [r7, #12]
80052dc: 7b1b ldrb r3, [r3, #12]
80052de: 823b strh r3, [r7, #16]
/* pbuf types containing payloads? */
if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) {
80052e0: 8a3b ldrh r3, [r7, #16]
80052e2: f003 0380 and.w r3, r3, #128 ; 0x80
80052e6: 2b00 cmp r3, #0
80052e8: d00c beq.n 8005304 <pbuf_add_header_impl+0x80>
/* set new payload pointer */
payload = (u8_t *)p->payload - header_size_increment;
80052ea: 68fb ldr r3, [r7, #12]
80052ec: 685a ldr r2, [r3, #4]
80052ee: 68bb ldr r3, [r7, #8]
80052f0: 425b negs r3, r3
80052f2: 4413 add r3, r2
80052f4: 617b str r3, [r7, #20]
/* boundary check fails? */
if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) {
80052f6: 68fb ldr r3, [r7, #12]
80052f8: 3310 adds r3, #16
80052fa: 697a ldr r2, [r7, #20]
80052fc: 429a cmp r2, r3
80052fe: d20d bcs.n 800531c <pbuf_add_header_impl+0x98>
LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE,
("pbuf_add_header: failed as %p < %p (not enough space for new header size)\n",
(void *)payload, (void *)((u8_t *)p + SIZEOF_STRUCT_PBUF)));
/* bail out unsuccessfully */
return 1;
8005300: 2301 movs r3, #1
8005302: e01d b.n 8005340 <pbuf_add_header_impl+0xbc>
}
/* pbuf types referring to external payloads? */
} else {
/* hide a header in the payload? */
if (force) {
8005304: 79fb ldrb r3, [r7, #7]
8005306: 2b00 cmp r3, #0
8005308: d006 beq.n 8005318 <pbuf_add_header_impl+0x94>
payload = (u8_t *)p->payload - header_size_increment;
800530a: 68fb ldr r3, [r7, #12]
800530c: 685a ldr r2, [r3, #4]
800530e: 68bb ldr r3, [r7, #8]
8005310: 425b negs r3, r3
8005312: 4413 add r3, r2
8005314: 617b str r3, [r7, #20]
8005316: e001 b.n 800531c <pbuf_add_header_impl+0x98>
} else {
/* cannot expand payload to front (yet!)
* bail out unsuccessfully */
return 1;
8005318: 2301 movs r3, #1
800531a: e011 b.n 8005340 <pbuf_add_header_impl+0xbc>
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_add_header: old %p new %p (%"U16_F")\n",
(void *)p->payload, (void *)payload, increment_magnitude));
/* modify pbuf fields */
p->payload = payload;
800531c: 68fb ldr r3, [r7, #12]
800531e: 697a ldr r2, [r7, #20]
8005320: 605a str r2, [r3, #4]
p->len = (u16_t)(p->len + increment_magnitude);
8005322: 68fb ldr r3, [r7, #12]
8005324: 895a ldrh r2, [r3, #10]
8005326: 8a7b ldrh r3, [r7, #18]
8005328: 4413 add r3, r2
800532a: b29a uxth r2, r3
800532c: 68fb ldr r3, [r7, #12]
800532e: 815a strh r2, [r3, #10]
p->tot_len = (u16_t)(p->tot_len + increment_magnitude);
8005330: 68fb ldr r3, [r7, #12]
8005332: 891a ldrh r2, [r3, #8]
8005334: 8a7b ldrh r3, [r7, #18]
8005336: 4413 add r3, r2
8005338: b29a uxth r2, r3
800533a: 68fb ldr r3, [r7, #12]
800533c: 811a strh r2, [r3, #8]
return 0;
800533e: 2300 movs r3, #0
}
8005340: 4618 mov r0, r3
8005342: 3718 adds r7, #24
8005344: 46bd mov sp, r7
8005346: bd80 pop {r7, pc}
8005348: 08014fa4 .word 0x08014fa4
800534c: 08015108 .word 0x08015108
8005350: 08015004 .word 0x08015004
08005354 <pbuf_add_header>:
* @return non-zero on failure, zero on success.
*
*/
u8_t
pbuf_add_header(struct pbuf *p, size_t header_size_increment)
{
8005354: b580 push {r7, lr}
8005356: b082 sub sp, #8
8005358: af00 add r7, sp, #0
800535a: 6078 str r0, [r7, #4]
800535c: 6039 str r1, [r7, #0]
return pbuf_add_header_impl(p, header_size_increment, 0);
800535e: 2200 movs r2, #0
8005360: 6839 ldr r1, [r7, #0]
8005362: 6878 ldr r0, [r7, #4]
8005364: f7ff ff8e bl 8005284 <pbuf_add_header_impl>
8005368: 4603 mov r3, r0
}
800536a: 4618 mov r0, r3
800536c: 3708 adds r7, #8
800536e: 46bd mov sp, r7
8005370: bd80 pop {r7, pc}
...
08005374 <pbuf_remove_header>:
* @return non-zero on failure, zero on success.
*
*/
u8_t
pbuf_remove_header(struct pbuf *p, size_t header_size_decrement)
{
8005374: b580 push {r7, lr}
8005376: b084 sub sp, #16
8005378: af00 add r7, sp, #0
800537a: 6078 str r0, [r7, #4]
800537c: 6039 str r1, [r7, #0]
void *payload;
u16_t increment_magnitude;
LWIP_ASSERT("p != NULL", p != NULL);
800537e: 687b ldr r3, [r7, #4]
8005380: 2b00 cmp r3, #0
8005382: d106 bne.n 8005392 <pbuf_remove_header+0x1e>
8005384: 4b20 ldr r3, [pc, #128] ; (8005408 <pbuf_remove_header+0x94>)
8005386: f240 224b movw r2, #587 ; 0x24b
800538a: 4920 ldr r1, [pc, #128] ; (800540c <pbuf_remove_header+0x98>)
800538c: 4820 ldr r0, [pc, #128] ; (8005410 <pbuf_remove_header+0x9c>)
800538e: f00a fd93 bl 800feb8 <printf>
if ((p == NULL) || (header_size_decrement > 0xFFFF)) {
8005392: 687b ldr r3, [r7, #4]
8005394: 2b00 cmp r3, #0
8005396: d003 beq.n 80053a0 <pbuf_remove_header+0x2c>
8005398: 683b ldr r3, [r7, #0]
800539a: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800539e: d301 bcc.n 80053a4 <pbuf_remove_header+0x30>
return 1;
80053a0: 2301 movs r3, #1
80053a2: e02c b.n 80053fe <pbuf_remove_header+0x8a>
}
if (header_size_decrement == 0) {
80053a4: 683b ldr r3, [r7, #0]
80053a6: 2b00 cmp r3, #0
80053a8: d101 bne.n 80053ae <pbuf_remove_header+0x3a>
return 0;
80053aa: 2300 movs r3, #0
80053ac: e027 b.n 80053fe <pbuf_remove_header+0x8a>
}
increment_magnitude = (u16_t)header_size_decrement;
80053ae: 683b ldr r3, [r7, #0]
80053b0: 81fb strh r3, [r7, #14]
/* Check that we aren't going to move off the end of the pbuf */
LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;);
80053b2: 687b ldr r3, [r7, #4]
80053b4: 895b ldrh r3, [r3, #10]
80053b6: 89fa ldrh r2, [r7, #14]
80053b8: 429a cmp r2, r3
80053ba: d908 bls.n 80053ce <pbuf_remove_header+0x5a>
80053bc: 4b12 ldr r3, [pc, #72] ; (8005408 <pbuf_remove_header+0x94>)
80053be: f240 2255 movw r2, #597 ; 0x255
80053c2: 4914 ldr r1, [pc, #80] ; (8005414 <pbuf_remove_header+0xa0>)
80053c4: 4812 ldr r0, [pc, #72] ; (8005410 <pbuf_remove_header+0x9c>)
80053c6: f00a fd77 bl 800feb8 <printf>
80053ca: 2301 movs r3, #1
80053cc: e017 b.n 80053fe <pbuf_remove_header+0x8a>
/* remember current payload pointer */
payload = p->payload;
80053ce: 687b ldr r3, [r7, #4]
80053d0: 685b ldr r3, [r3, #4]
80053d2: 60bb str r3, [r7, #8]
LWIP_UNUSED_ARG(payload); /* only used in LWIP_DEBUGF below */
/* increase payload pointer (guarded by length check above) */
p->payload = (u8_t *)p->payload + header_size_decrement;
80053d4: 687b ldr r3, [r7, #4]
80053d6: 685a ldr r2, [r3, #4]
80053d8: 683b ldr r3, [r7, #0]
80053da: 441a add r2, r3
80053dc: 687b ldr r3, [r7, #4]
80053de: 605a str r2, [r3, #4]
/* modify pbuf length fields */
p->len = (u16_t)(p->len - increment_magnitude);
80053e0: 687b ldr r3, [r7, #4]
80053e2: 895a ldrh r2, [r3, #10]
80053e4: 89fb ldrh r3, [r7, #14]
80053e6: 1ad3 subs r3, r2, r3
80053e8: b29a uxth r2, r3
80053ea: 687b ldr r3, [r7, #4]
80053ec: 815a strh r2, [r3, #10]
p->tot_len = (u16_t)(p->tot_len - increment_magnitude);
80053ee: 687b ldr r3, [r7, #4]
80053f0: 891a ldrh r2, [r3, #8]
80053f2: 89fb ldrh r3, [r7, #14]
80053f4: 1ad3 subs r3, r2, r3
80053f6: b29a uxth r2, r3
80053f8: 687b ldr r3, [r7, #4]
80053fa: 811a strh r2, [r3, #8]
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_remove_header: old %p new %p (%"U16_F")\n",
(void *)payload, (void *)p->payload, increment_magnitude));
return 0;
80053fc: 2300 movs r3, #0
}
80053fe: 4618 mov r0, r3
8005400: 3710 adds r7, #16
8005402: 46bd mov sp, r7
8005404: bd80 pop {r7, pc}
8005406: bf00 nop
8005408: 08014fa4 .word 0x08014fa4
800540c: 08015108 .word 0x08015108
8005410: 08015004 .word 0x08015004
8005414: 08015114 .word 0x08015114
08005418 <pbuf_header_impl>:
static u8_t
pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force)
{
8005418: b580 push {r7, lr}
800541a: b082 sub sp, #8
800541c: af00 add r7, sp, #0
800541e: 6078 str r0, [r7, #4]
8005420: 460b mov r3, r1
8005422: 807b strh r3, [r7, #2]
8005424: 4613 mov r3, r2
8005426: 707b strb r3, [r7, #1]
if (header_size_increment < 0) {
8005428: f9b7 3002 ldrsh.w r3, [r7, #2]
800542c: 2b00 cmp r3, #0
800542e: da08 bge.n 8005442 <pbuf_header_impl+0x2a>
return pbuf_remove_header(p, (size_t) - header_size_increment);
8005430: f9b7 3002 ldrsh.w r3, [r7, #2]
8005434: 425b negs r3, r3
8005436: 4619 mov r1, r3
8005438: 6878 ldr r0, [r7, #4]
800543a: f7ff ff9b bl 8005374 <pbuf_remove_header>
800543e: 4603 mov r3, r0
8005440: e007 b.n 8005452 <pbuf_header_impl+0x3a>
} else {
return pbuf_add_header_impl(p, (size_t)header_size_increment, force);
8005442: f9b7 3002 ldrsh.w r3, [r7, #2]
8005446: 787a ldrb r2, [r7, #1]
8005448: 4619 mov r1, r3
800544a: 6878 ldr r0, [r7, #4]
800544c: f7ff ff1a bl 8005284 <pbuf_add_header_impl>
8005450: 4603 mov r3, r0
}
}
8005452: 4618 mov r0, r3
8005454: 3708 adds r7, #8
8005456: 46bd mov sp, r7
8005458: bd80 pop {r7, pc}
0800545a <pbuf_header_force>:
* Same as pbuf_header but does not check if 'header_size > 0' is allowed.
* This is used internally only, to allow PBUF_REF for RX.
*/
u8_t
pbuf_header_force(struct pbuf *p, s16_t header_size_increment)
{
800545a: b580 push {r7, lr}
800545c: b082 sub sp, #8
800545e: af00 add r7, sp, #0
8005460: 6078 str r0, [r7, #4]
8005462: 460b mov r3, r1
8005464: 807b strh r3, [r7, #2]
return pbuf_header_impl(p, header_size_increment, 1);
8005466: f9b7 3002 ldrsh.w r3, [r7, #2]
800546a: 2201 movs r2, #1
800546c: 4619 mov r1, r3
800546e: 6878 ldr r0, [r7, #4]
8005470: f7ff ffd2 bl 8005418 <pbuf_header_impl>
8005474: 4603 mov r3, r0
}
8005476: 4618 mov r0, r3
8005478: 3708 adds r7, #8
800547a: 46bd mov sp, r7
800547c: bd80 pop {r7, pc}
...
08005480 <pbuf_free>:
* 1->1->1 becomes .......
*
*/
u8_t
pbuf_free(struct pbuf *p)
{
8005480: b580 push {r7, lr}
8005482: b086 sub sp, #24
8005484: af00 add r7, sp, #0
8005486: 6078 str r0, [r7, #4]
u8_t alloc_src;
struct pbuf *q;
u8_t count;
if (p == NULL) {
8005488: 687b ldr r3, [r7, #4]
800548a: 2b00 cmp r3, #0
800548c: d10b bne.n 80054a6 <pbuf_free+0x26>
LWIP_ASSERT("p != NULL", p != NULL);
800548e: 687b ldr r3, [r7, #4]
8005490: 2b00 cmp r3, #0
8005492: d106 bne.n 80054a2 <pbuf_free+0x22>
8005494: 4b38 ldr r3, [pc, #224] ; (8005578 <pbuf_free+0xf8>)
8005496: f44f 7237 mov.w r2, #732 ; 0x2dc
800549a: 4938 ldr r1, [pc, #224] ; (800557c <pbuf_free+0xfc>)
800549c: 4838 ldr r0, [pc, #224] ; (8005580 <pbuf_free+0x100>)
800549e: f00a fd0b bl 800feb8 <printf>
/* if assertions are disabled, proceed with debug output */
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
("pbuf_free(p == NULL) was called.\n"));
return 0;
80054a2: 2300 movs r3, #0
80054a4: e063 b.n 800556e <pbuf_free+0xee>
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p));
PERF_START;
count = 0;
80054a6: 2300 movs r3, #0
80054a8: 75fb strb r3, [r7, #23]
/* de-allocate all consecutive pbufs from the head of the chain that
* obtain a zero reference count after decrementing*/
while (p != NULL) {
80054aa: e05c b.n 8005566 <pbuf_free+0xe6>
/* Since decrementing ref cannot be guaranteed to be a single machine operation
* we must protect it. We put the new ref into a local variable to prevent
* further protection. */
SYS_ARCH_PROTECT(old_level);
/* all pbufs in a chain are referenced at least once */
LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);
80054ac: 687b ldr r3, [r7, #4]
80054ae: 7b9b ldrb r3, [r3, #14]
80054b0: 2b00 cmp r3, #0
80054b2: d106 bne.n 80054c2 <pbuf_free+0x42>
80054b4: 4b30 ldr r3, [pc, #192] ; (8005578 <pbuf_free+0xf8>)
80054b6: f240 22f1 movw r2, #753 ; 0x2f1
80054ba: 4932 ldr r1, [pc, #200] ; (8005584 <pbuf_free+0x104>)
80054bc: 4830 ldr r0, [pc, #192] ; (8005580 <pbuf_free+0x100>)
80054be: f00a fcfb bl 800feb8 <printf>
/* decrease reference count (number of pointers to pbuf) */
ref = --(p->ref);
80054c2: 687b ldr r3, [r7, #4]
80054c4: 7b9b ldrb r3, [r3, #14]
80054c6: 3b01 subs r3, #1
80054c8: b2da uxtb r2, r3
80054ca: 687b ldr r3, [r7, #4]
80054cc: 739a strb r2, [r3, #14]
80054ce: 687b ldr r3, [r7, #4]
80054d0: 7b9b ldrb r3, [r3, #14]
80054d2: 75bb strb r3, [r7, #22]
SYS_ARCH_UNPROTECT(old_level);
/* this pbuf is no longer referenced to? */
if (ref == 0) {
80054d4: 7dbb ldrb r3, [r7, #22]
80054d6: 2b00 cmp r3, #0
80054d8: d143 bne.n 8005562 <pbuf_free+0xe2>
/* remember next pbuf in chain for next iteration */
q = p->next;
80054da: 687b ldr r3, [r7, #4]
80054dc: 681b ldr r3, [r3, #0]
80054de: 613b str r3, [r7, #16]
LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: deallocating %p\n", (void *)p));
alloc_src = pbuf_get_allocsrc(p);
80054e0: 687b ldr r3, [r7, #4]
80054e2: 7b1b ldrb r3, [r3, #12]
80054e4: f003 030f and.w r3, r3, #15
80054e8: 73fb strb r3, [r7, #15]
#if LWIP_SUPPORT_CUSTOM_PBUF
/* is this a custom pbuf? */
if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) {
80054ea: 687b ldr r3, [r7, #4]
80054ec: 7b5b ldrb r3, [r3, #13]
80054ee: f003 0302 and.w r3, r3, #2
80054f2: 2b00 cmp r3, #0
80054f4: d011 beq.n 800551a <pbuf_free+0x9a>
struct pbuf_custom *pc = (struct pbuf_custom *)p;
80054f6: 687b ldr r3, [r7, #4]
80054f8: 60bb str r3, [r7, #8]
LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL);
80054fa: 68bb ldr r3, [r7, #8]
80054fc: 691b ldr r3, [r3, #16]
80054fe: 2b00 cmp r3, #0
8005500: d106 bne.n 8005510 <pbuf_free+0x90>
8005502: 4b1d ldr r3, [pc, #116] ; (8005578 <pbuf_free+0xf8>)
8005504: f240 22ff movw r2, #767 ; 0x2ff
8005508: 491f ldr r1, [pc, #124] ; (8005588 <pbuf_free+0x108>)
800550a: 481d ldr r0, [pc, #116] ; (8005580 <pbuf_free+0x100>)
800550c: f00a fcd4 bl 800feb8 <printf>
pc->custom_free_function(p);
8005510: 68bb ldr r3, [r7, #8]
8005512: 691b ldr r3, [r3, #16]
8005514: 6878 ldr r0, [r7, #4]
8005516: 4798 blx r3
8005518: e01d b.n 8005556 <pbuf_free+0xd6>
} else
#endif /* LWIP_SUPPORT_CUSTOM_PBUF */
{
/* is this a pbuf from the pool? */
if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL) {
800551a: 7bfb ldrb r3, [r7, #15]
800551c: 2b02 cmp r3, #2
800551e: d104 bne.n 800552a <pbuf_free+0xaa>
memp_free(MEMP_PBUF_POOL, p);
8005520: 6879 ldr r1, [r7, #4]
8005522: 2008 movs r0, #8
8005524: f7ff f92a bl 800477c <memp_free>
8005528: e015 b.n 8005556 <pbuf_free+0xd6>
/* is this a ROM or RAM referencing pbuf? */
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) {
800552a: 7bfb ldrb r3, [r7, #15]
800552c: 2b01 cmp r3, #1
800552e: d104 bne.n 800553a <pbuf_free+0xba>
memp_free(MEMP_PBUF, p);
8005530: 6879 ldr r1, [r7, #4]
8005532: 2007 movs r0, #7
8005534: f7ff f922 bl 800477c <memp_free>
8005538: e00d b.n 8005556 <pbuf_free+0xd6>
/* type == PBUF_RAM */
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) {
800553a: 7bfb ldrb r3, [r7, #15]
800553c: 2b00 cmp r3, #0
800553e: d103 bne.n 8005548 <pbuf_free+0xc8>
mem_free(p);
8005540: 6878 ldr r0, [r7, #4]
8005542: f7fe fdb5 bl 80040b0 <mem_free>
8005546: e006 b.n 8005556 <pbuf_free+0xd6>
} else {
/* @todo: support freeing other types */
LWIP_ASSERT("invalid pbuf type", 0);
8005548: 4b0b ldr r3, [pc, #44] ; (8005578 <pbuf_free+0xf8>)
800554a: f240 320f movw r2, #783 ; 0x30f
800554e: 490f ldr r1, [pc, #60] ; (800558c <pbuf_free+0x10c>)
8005550: 480b ldr r0, [pc, #44] ; (8005580 <pbuf_free+0x100>)
8005552: f00a fcb1 bl 800feb8 <printf>
}
}
count++;
8005556: 7dfb ldrb r3, [r7, #23]
8005558: 3301 adds r3, #1
800555a: 75fb strb r3, [r7, #23]
/* proceed to next pbuf */
p = q;
800555c: 693b ldr r3, [r7, #16]
800555e: 607b str r3, [r7, #4]
8005560: e001 b.n 8005566 <pbuf_free+0xe6>
/* p->ref > 0, this pbuf is still referenced to */
/* (and so the remaining pbufs in chain as well) */
} else {
LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, (u16_t)ref));
/* stop walking through the chain */
p = NULL;
8005562: 2300 movs r3, #0
8005564: 607b str r3, [r7, #4]
while (p != NULL) {
8005566: 687b ldr r3, [r7, #4]
8005568: 2b00 cmp r3, #0
800556a: d19f bne.n 80054ac <pbuf_free+0x2c>
}
}
PERF_STOP("pbuf_free");
/* return number of de-allocated pbufs */
return count;
800556c: 7dfb ldrb r3, [r7, #23]
}
800556e: 4618 mov r0, r3
8005570: 3718 adds r7, #24
8005572: 46bd mov sp, r7
8005574: bd80 pop {r7, pc}
8005576: bf00 nop
8005578: 08014fa4 .word 0x08014fa4
800557c: 08015108 .word 0x08015108
8005580: 08015004 .word 0x08015004
8005584: 08015134 .word 0x08015134
8005588: 0801514c .word 0x0801514c
800558c: 08015170 .word 0x08015170
08005590 <pbuf_clen>:
* @param p first pbuf of chain
* @return the number of pbufs in a chain
*/
u16_t
pbuf_clen(const struct pbuf *p)
{
8005590: b480 push {r7}
8005592: b085 sub sp, #20
8005594: af00 add r7, sp, #0
8005596: 6078 str r0, [r7, #4]
u16_t len;
len = 0;
8005598: 2300 movs r3, #0
800559a: 81fb strh r3, [r7, #14]
while (p != NULL) {
800559c: e005 b.n 80055aa <pbuf_clen+0x1a>
++len;
800559e: 89fb ldrh r3, [r7, #14]
80055a0: 3301 adds r3, #1
80055a2: 81fb strh r3, [r7, #14]
p = p->next;
80055a4: 687b ldr r3, [r7, #4]
80055a6: 681b ldr r3, [r3, #0]
80055a8: 607b str r3, [r7, #4]
while (p != NULL) {
80055aa: 687b ldr r3, [r7, #4]
80055ac: 2b00 cmp r3, #0
80055ae: d1f6 bne.n 800559e <pbuf_clen+0xe>
}
return len;
80055b0: 89fb ldrh r3, [r7, #14]
}
80055b2: 4618 mov r0, r3
80055b4: 3714 adds r7, #20
80055b6: 46bd mov sp, r7
80055b8: f85d 7b04 ldr.w r7, [sp], #4
80055bc: 4770 bx lr
...
080055c0 <pbuf_ref>:
* @param p pbuf to increase reference counter of
*
*/
void
pbuf_ref(struct pbuf *p)
{
80055c0: b580 push {r7, lr}
80055c2: b082 sub sp, #8
80055c4: af00 add r7, sp, #0
80055c6: 6078 str r0, [r7, #4]
/* pbuf given? */
if (p != NULL) {
80055c8: 687b ldr r3, [r7, #4]
80055ca: 2b00 cmp r3, #0
80055cc: d010 beq.n 80055f0 <pbuf_ref+0x30>
SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1));
80055ce: 687b ldr r3, [r7, #4]
80055d0: 7b9b ldrb r3, [r3, #14]
80055d2: 3301 adds r3, #1
80055d4: b2da uxtb r2, r3
80055d6: 687b ldr r3, [r7, #4]
80055d8: 739a strb r2, [r3, #14]
LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
80055da: 687b ldr r3, [r7, #4]
80055dc: 7b9b ldrb r3, [r3, #14]
80055de: 2b00 cmp r3, #0
80055e0: d106 bne.n 80055f0 <pbuf_ref+0x30>
80055e2: 4b05 ldr r3, [pc, #20] ; (80055f8 <pbuf_ref+0x38>)
80055e4: f240 3242 movw r2, #834 ; 0x342
80055e8: 4904 ldr r1, [pc, #16] ; (80055fc <pbuf_ref+0x3c>)
80055ea: 4805 ldr r0, [pc, #20] ; (8005600 <pbuf_ref+0x40>)
80055ec: f00a fc64 bl 800feb8 <printf>
}
}
80055f0: bf00 nop
80055f2: 3708 adds r7, #8
80055f4: 46bd mov sp, r7
80055f6: bd80 pop {r7, pc}
80055f8: 08014fa4 .word 0x08014fa4
80055fc: 08015184 .word 0x08015184
8005600: 08015004 .word 0x08015004
08005604 <pbuf_cat>:
*
* @see pbuf_chain()
*/
void
pbuf_cat(struct pbuf *h, struct pbuf *t)
{
8005604: b580 push {r7, lr}
8005606: b084 sub sp, #16
8005608: af00 add r7, sp, #0
800560a: 6078 str r0, [r7, #4]
800560c: 6039 str r1, [r7, #0]
struct pbuf *p;
LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)",
800560e: 687b ldr r3, [r7, #4]
8005610: 2b00 cmp r3, #0
8005612: d002 beq.n 800561a <pbuf_cat+0x16>
8005614: 683b ldr r3, [r7, #0]
8005616: 2b00 cmp r3, #0
8005618: d107 bne.n 800562a <pbuf_cat+0x26>
800561a: 4b20 ldr r3, [pc, #128] ; (800569c <pbuf_cat+0x98>)
800561c: f240 3259 movw r2, #857 ; 0x359
8005620: 491f ldr r1, [pc, #124] ; (80056a0 <pbuf_cat+0x9c>)
8005622: 4820 ldr r0, [pc, #128] ; (80056a4 <pbuf_cat+0xa0>)
8005624: f00a fc48 bl 800feb8 <printf>
8005628: e034 b.n 8005694 <pbuf_cat+0x90>
((h != NULL) && (t != NULL)), return;);
/* proceed to last pbuf of chain */
for (p = h; p->next != NULL; p = p->next) {
800562a: 687b ldr r3, [r7, #4]
800562c: 60fb str r3, [r7, #12]
800562e: e00a b.n 8005646 <pbuf_cat+0x42>
/* add total length of second chain to all totals of first chain */
p->tot_len = (u16_t)(p->tot_len + t->tot_len);
8005630: 68fb ldr r3, [r7, #12]
8005632: 891a ldrh r2, [r3, #8]
8005634: 683b ldr r3, [r7, #0]
8005636: 891b ldrh r3, [r3, #8]
8005638: 4413 add r3, r2
800563a: b29a uxth r2, r3
800563c: 68fb ldr r3, [r7, #12]
800563e: 811a strh r2, [r3, #8]
for (p = h; p->next != NULL; p = p->next) {
8005640: 68fb ldr r3, [r7, #12]
8005642: 681b ldr r3, [r3, #0]
8005644: 60fb str r3, [r7, #12]
8005646: 68fb ldr r3, [r7, #12]
8005648: 681b ldr r3, [r3, #0]
800564a: 2b00 cmp r3, #0
800564c: d1f0 bne.n 8005630 <pbuf_cat+0x2c>
}
/* { p is last pbuf of first h chain, p->next == NULL } */
LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len);
800564e: 68fb ldr r3, [r7, #12]
8005650: 891a ldrh r2, [r3, #8]
8005652: 68fb ldr r3, [r7, #12]
8005654: 895b ldrh r3, [r3, #10]
8005656: 429a cmp r2, r3
8005658: d006 beq.n 8005668 <pbuf_cat+0x64>
800565a: 4b10 ldr r3, [pc, #64] ; (800569c <pbuf_cat+0x98>)
800565c: f240 3262 movw r2, #866 ; 0x362
8005660: 4911 ldr r1, [pc, #68] ; (80056a8 <pbuf_cat+0xa4>)
8005662: 4810 ldr r0, [pc, #64] ; (80056a4 <pbuf_cat+0xa0>)
8005664: f00a fc28 bl 800feb8 <printf>
LWIP_ASSERT("p->next == NULL", p->next == NULL);
8005668: 68fb ldr r3, [r7, #12]
800566a: 681b ldr r3, [r3, #0]
800566c: 2b00 cmp r3, #0
800566e: d006 beq.n 800567e <pbuf_cat+0x7a>
8005670: 4b0a ldr r3, [pc, #40] ; (800569c <pbuf_cat+0x98>)
8005672: f240 3263 movw r2, #867 ; 0x363
8005676: 490d ldr r1, [pc, #52] ; (80056ac <pbuf_cat+0xa8>)
8005678: 480a ldr r0, [pc, #40] ; (80056a4 <pbuf_cat+0xa0>)
800567a: f00a fc1d bl 800feb8 <printf>
/* add total length of second chain to last pbuf total of first chain */
p->tot_len = (u16_t)(p->tot_len + t->tot_len);
800567e: 68fb ldr r3, [r7, #12]
8005680: 891a ldrh r2, [r3, #8]
8005682: 683b ldr r3, [r7, #0]
8005684: 891b ldrh r3, [r3, #8]
8005686: 4413 add r3, r2
8005688: b29a uxth r2, r3
800568a: 68fb ldr r3, [r7, #12]
800568c: 811a strh r2, [r3, #8]
/* chain last pbuf of head (p) with first of tail (t) */
p->next = t;
800568e: 68fb ldr r3, [r7, #12]
8005690: 683a ldr r2, [r7, #0]
8005692: 601a str r2, [r3, #0]
/* p->next now references t, but the caller will drop its reference to t,
* so netto there is no change to the reference count of t.
*/
}
8005694: 3710 adds r7, #16
8005696: 46bd mov sp, r7
8005698: bd80 pop {r7, pc}
800569a: bf00 nop
800569c: 08014fa4 .word 0x08014fa4
80056a0: 08015198 .word 0x08015198
80056a4: 08015004 .word 0x08015004
80056a8: 080151d0 .word 0x080151d0
80056ac: 08015200 .word 0x08015200
080056b0 <pbuf_chain>:
* The ->ref field of the first pbuf of the tail chain is adjusted.
*
*/
void
pbuf_chain(struct pbuf *h, struct pbuf *t)
{
80056b0: b580 push {r7, lr}
80056b2: b082 sub sp, #8
80056b4: af00 add r7, sp, #0
80056b6: 6078 str r0, [r7, #4]
80056b8: 6039 str r1, [r7, #0]
pbuf_cat(h, t);
80056ba: 6839 ldr r1, [r7, #0]
80056bc: 6878 ldr r0, [r7, #4]
80056be: f7ff ffa1 bl 8005604 <pbuf_cat>
/* t is now referenced by h */
pbuf_ref(t);
80056c2: 6838 ldr r0, [r7, #0]
80056c4: f7ff ff7c bl 80055c0 <pbuf_ref>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t));
}
80056c8: bf00 nop
80056ca: 3708 adds r7, #8
80056cc: 46bd mov sp, r7
80056ce: bd80 pop {r7, pc}
080056d0 <pbuf_copy>:
* ERR_ARG if one of the pbufs is NULL or p_to is not big
* enough to hold p_from
*/
err_t
pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from)
{
80056d0: b580 push {r7, lr}
80056d2: b086 sub sp, #24
80056d4: af00 add r7, sp, #0
80056d6: 6078 str r0, [r7, #4]
80056d8: 6039 str r1, [r7, #0]
size_t offset_to = 0, offset_from = 0, len;
80056da: 2300 movs r3, #0
80056dc: 617b str r3, [r7, #20]
80056de: 2300 movs r3, #0
80056e0: 613b str r3, [r7, #16]
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy(%p, %p)\n",
(const void *)p_to, (const void *)p_from));
/* is the target big enough to hold the source? */
LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) &&
80056e2: 687b ldr r3, [r7, #4]
80056e4: 2b00 cmp r3, #0
80056e6: d008 beq.n 80056fa <pbuf_copy+0x2a>
80056e8: 683b ldr r3, [r7, #0]
80056ea: 2b00 cmp r3, #0
80056ec: d005 beq.n 80056fa <pbuf_copy+0x2a>
80056ee: 687b ldr r3, [r7, #4]
80056f0: 891a ldrh r2, [r3, #8]
80056f2: 683b ldr r3, [r7, #0]
80056f4: 891b ldrh r3, [r3, #8]
80056f6: 429a cmp r2, r3
80056f8: d209 bcs.n 800570e <pbuf_copy+0x3e>
80056fa: 4b57 ldr r3, [pc, #348] ; (8005858 <pbuf_copy+0x188>)
80056fc: f240 32c9 movw r2, #969 ; 0x3c9
8005700: 4956 ldr r1, [pc, #344] ; (800585c <pbuf_copy+0x18c>)
8005702: 4857 ldr r0, [pc, #348] ; (8005860 <pbuf_copy+0x190>)
8005704: f00a fbd8 bl 800feb8 <printf>
8005708: f06f 030f mvn.w r3, #15
800570c: e09f b.n 800584e <pbuf_copy+0x17e>
(p_from != NULL) && (p_to->tot_len >= p_from->tot_len)), return ERR_ARG;);
/* iterate through pbuf chain */
do {
/* copy one part of the original chain */
if ((p_to->len - offset_to) >= (p_from->len - offset_from)) {
800570e: 687b ldr r3, [r7, #4]
8005710: 895b ldrh r3, [r3, #10]
8005712: 461a mov r2, r3
8005714: 697b ldr r3, [r7, #20]
8005716: 1ad2 subs r2, r2, r3
8005718: 683b ldr r3, [r7, #0]
800571a: 895b ldrh r3, [r3, #10]
800571c: 4619 mov r1, r3
800571e: 693b ldr r3, [r7, #16]
8005720: 1acb subs r3, r1, r3
8005722: 429a cmp r2, r3
8005724: d306 bcc.n 8005734 <pbuf_copy+0x64>
/* complete current p_from fits into current p_to */
len = p_from->len - offset_from;
8005726: 683b ldr r3, [r7, #0]
8005728: 895b ldrh r3, [r3, #10]
800572a: 461a mov r2, r3
800572c: 693b ldr r3, [r7, #16]
800572e: 1ad3 subs r3, r2, r3
8005730: 60fb str r3, [r7, #12]
8005732: e005 b.n 8005740 <pbuf_copy+0x70>
} else {
/* current p_from does not fit into current p_to */
len = p_to->len - offset_to;
8005734: 687b ldr r3, [r7, #4]
8005736: 895b ldrh r3, [r3, #10]
8005738: 461a mov r2, r3
800573a: 697b ldr r3, [r7, #20]
800573c: 1ad3 subs r3, r2, r3
800573e: 60fb str r3, [r7, #12]
}
MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len);
8005740: 687b ldr r3, [r7, #4]
8005742: 685a ldr r2, [r3, #4]
8005744: 697b ldr r3, [r7, #20]
8005746: 18d0 adds r0, r2, r3
8005748: 683b ldr r3, [r7, #0]
800574a: 685a ldr r2, [r3, #4]
800574c: 693b ldr r3, [r7, #16]
800574e: 4413 add r3, r2
8005750: 68fa ldr r2, [r7, #12]
8005752: 4619 mov r1, r3
8005754: f00a fb80 bl 800fe58 <memcpy>
offset_to += len;
8005758: 697a ldr r2, [r7, #20]
800575a: 68fb ldr r3, [r7, #12]
800575c: 4413 add r3, r2
800575e: 617b str r3, [r7, #20]
offset_from += len;
8005760: 693a ldr r2, [r7, #16]
8005762: 68fb ldr r3, [r7, #12]
8005764: 4413 add r3, r2
8005766: 613b str r3, [r7, #16]
LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
8005768: 687b ldr r3, [r7, #4]
800576a: 895b ldrh r3, [r3, #10]
800576c: 461a mov r2, r3
800576e: 697b ldr r3, [r7, #20]
8005770: 4293 cmp r3, r2
8005772: d906 bls.n 8005782 <pbuf_copy+0xb2>
8005774: 4b38 ldr r3, [pc, #224] ; (8005858 <pbuf_copy+0x188>)
8005776: f240 32d9 movw r2, #985 ; 0x3d9
800577a: 493a ldr r1, [pc, #232] ; (8005864 <pbuf_copy+0x194>)
800577c: 4838 ldr r0, [pc, #224] ; (8005860 <pbuf_copy+0x190>)
800577e: f00a fb9b bl 800feb8 <printf>
LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
8005782: 683b ldr r3, [r7, #0]
8005784: 895b ldrh r3, [r3, #10]
8005786: 461a mov r2, r3
8005788: 693b ldr r3, [r7, #16]
800578a: 4293 cmp r3, r2
800578c: d906 bls.n 800579c <pbuf_copy+0xcc>
800578e: 4b32 ldr r3, [pc, #200] ; (8005858 <pbuf_copy+0x188>)
8005790: f240 32da movw r2, #986 ; 0x3da
8005794: 4934 ldr r1, [pc, #208] ; (8005868 <pbuf_copy+0x198>)
8005796: 4832 ldr r0, [pc, #200] ; (8005860 <pbuf_copy+0x190>)
8005798: f00a fb8e bl 800feb8 <printf>
if (offset_from >= p_from->len) {
800579c: 683b ldr r3, [r7, #0]
800579e: 895b ldrh r3, [r3, #10]
80057a0: 461a mov r2, r3
80057a2: 693b ldr r3, [r7, #16]
80057a4: 4293 cmp r3, r2
80057a6: d304 bcc.n 80057b2 <pbuf_copy+0xe2>
/* on to next p_from (if any) */
offset_from = 0;
80057a8: 2300 movs r3, #0
80057aa: 613b str r3, [r7, #16]
p_from = p_from->next;
80057ac: 683b ldr r3, [r7, #0]
80057ae: 681b ldr r3, [r3, #0]
80057b0: 603b str r3, [r7, #0]
}
if (offset_to == p_to->len) {
80057b2: 687b ldr r3, [r7, #4]
80057b4: 895b ldrh r3, [r3, #10]
80057b6: 461a mov r2, r3
80057b8: 697b ldr r3, [r7, #20]
80057ba: 4293 cmp r3, r2
80057bc: d114 bne.n 80057e8 <pbuf_copy+0x118>
/* on to next p_to (if any) */
offset_to = 0;
80057be: 2300 movs r3, #0
80057c0: 617b str r3, [r7, #20]
p_to = p_to->next;
80057c2: 687b ldr r3, [r7, #4]
80057c4: 681b ldr r3, [r3, #0]
80057c6: 607b str r3, [r7, #4]
LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;);
80057c8: 687b ldr r3, [r7, #4]
80057ca: 2b00 cmp r3, #0
80057cc: d10c bne.n 80057e8 <pbuf_copy+0x118>
80057ce: 683b ldr r3, [r7, #0]
80057d0: 2b00 cmp r3, #0
80057d2: d009 beq.n 80057e8 <pbuf_copy+0x118>
80057d4: 4b20 ldr r3, [pc, #128] ; (8005858 <pbuf_copy+0x188>)
80057d6: f44f 7279 mov.w r2, #996 ; 0x3e4
80057da: 4924 ldr r1, [pc, #144] ; (800586c <pbuf_copy+0x19c>)
80057dc: 4820 ldr r0, [pc, #128] ; (8005860 <pbuf_copy+0x190>)
80057de: f00a fb6b bl 800feb8 <printf>
80057e2: f06f 030f mvn.w r3, #15
80057e6: e032 b.n 800584e <pbuf_copy+0x17e>
}
if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
80057e8: 683b ldr r3, [r7, #0]
80057ea: 2b00 cmp r3, #0
80057ec: d013 beq.n 8005816 <pbuf_copy+0x146>
80057ee: 683b ldr r3, [r7, #0]
80057f0: 895a ldrh r2, [r3, #10]
80057f2: 683b ldr r3, [r7, #0]
80057f4: 891b ldrh r3, [r3, #8]
80057f6: 429a cmp r2, r3
80057f8: d10d bne.n 8005816 <pbuf_copy+0x146>
/* don't copy more than one packet! */
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
80057fa: 683b ldr r3, [r7, #0]
80057fc: 681b ldr r3, [r3, #0]
80057fe: 2b00 cmp r3, #0
8005800: d009 beq.n 8005816 <pbuf_copy+0x146>
8005802: 4b15 ldr r3, [pc, #84] ; (8005858 <pbuf_copy+0x188>)
8005804: f240 32e9 movw r2, #1001 ; 0x3e9
8005808: 4919 ldr r1, [pc, #100] ; (8005870 <pbuf_copy+0x1a0>)
800580a: 4815 ldr r0, [pc, #84] ; (8005860 <pbuf_copy+0x190>)
800580c: f00a fb54 bl 800feb8 <printf>
8005810: f06f 0305 mvn.w r3, #5
8005814: e01b b.n 800584e <pbuf_copy+0x17e>
(p_from->next == NULL), return ERR_VAL;);
}
if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
8005816: 687b ldr r3, [r7, #4]
8005818: 2b00 cmp r3, #0
800581a: d013 beq.n 8005844 <pbuf_copy+0x174>
800581c: 687b ldr r3, [r7, #4]
800581e: 895a ldrh r2, [r3, #10]
8005820: 687b ldr r3, [r7, #4]
8005822: 891b ldrh r3, [r3, #8]
8005824: 429a cmp r2, r3
8005826: d10d bne.n 8005844 <pbuf_copy+0x174>
/* don't copy more than one packet! */
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
8005828: 687b ldr r3, [r7, #4]
800582a: 681b ldr r3, [r3, #0]
800582c: 2b00 cmp r3, #0
800582e: d009 beq.n 8005844 <pbuf_copy+0x174>
8005830: 4b09 ldr r3, [pc, #36] ; (8005858 <pbuf_copy+0x188>)
8005832: f240 32ee movw r2, #1006 ; 0x3ee
8005836: 490e ldr r1, [pc, #56] ; (8005870 <pbuf_copy+0x1a0>)
8005838: 4809 ldr r0, [pc, #36] ; (8005860 <pbuf_copy+0x190>)
800583a: f00a fb3d bl 800feb8 <printf>
800583e: f06f 0305 mvn.w r3, #5
8005842: e004 b.n 800584e <pbuf_copy+0x17e>
(p_to->next == NULL), return ERR_VAL;);
}
} while (p_from);
8005844: 683b ldr r3, [r7, #0]
8005846: 2b00 cmp r3, #0
8005848: f47f af61 bne.w 800570e <pbuf_copy+0x3e>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n"));
return ERR_OK;
800584c: 2300 movs r3, #0
}
800584e: 4618 mov r0, r3
8005850: 3718 adds r7, #24
8005852: 46bd mov sp, r7
8005854: bd80 pop {r7, pc}
8005856: bf00 nop
8005858: 08014fa4 .word 0x08014fa4
800585c: 0801524c .word 0x0801524c
8005860: 08015004 .word 0x08015004
8005864: 0801527c .word 0x0801527c
8005868: 08015294 .word 0x08015294
800586c: 080152b0 .word 0x080152b0
8005870: 080152c0 .word 0x080152c0
08005874 <pbuf_copy_partial>:
* @param offset offset into the packet buffer from where to begin copying len bytes
* @return the number of bytes copied, or 0 on failure
*/
u16_t
pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset)
{
8005874: b580 push {r7, lr}
8005876: b088 sub sp, #32
8005878: af00 add r7, sp, #0
800587a: 60f8 str r0, [r7, #12]
800587c: 60b9 str r1, [r7, #8]
800587e: 4611 mov r1, r2
8005880: 461a mov r2, r3
8005882: 460b mov r3, r1
8005884: 80fb strh r3, [r7, #6]
8005886: 4613 mov r3, r2
8005888: 80bb strh r3, [r7, #4]
const struct pbuf *p;
u16_t left = 0;
800588a: 2300 movs r3, #0
800588c: 837b strh r3, [r7, #26]
u16_t buf_copy_len;
u16_t copied_total = 0;
800588e: 2300 movs r3, #0
8005890: 82fb strh r3, [r7, #22]
LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;);
8005892: 68fb ldr r3, [r7, #12]
8005894: 2b00 cmp r3, #0
8005896: d108 bne.n 80058aa <pbuf_copy_partial+0x36>
8005898: 4b2b ldr r3, [pc, #172] ; (8005948 <pbuf_copy_partial+0xd4>)
800589a: f240 420a movw r2, #1034 ; 0x40a
800589e: 492b ldr r1, [pc, #172] ; (800594c <pbuf_copy_partial+0xd8>)
80058a0: 482b ldr r0, [pc, #172] ; (8005950 <pbuf_copy_partial+0xdc>)
80058a2: f00a fb09 bl 800feb8 <printf>
80058a6: 2300 movs r3, #0
80058a8: e04a b.n 8005940 <pbuf_copy_partial+0xcc>
LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;);
80058aa: 68bb ldr r3, [r7, #8]
80058ac: 2b00 cmp r3, #0
80058ae: d108 bne.n 80058c2 <pbuf_copy_partial+0x4e>
80058b0: 4b25 ldr r3, [pc, #148] ; (8005948 <pbuf_copy_partial+0xd4>)
80058b2: f240 420b movw r2, #1035 ; 0x40b
80058b6: 4927 ldr r1, [pc, #156] ; (8005954 <pbuf_copy_partial+0xe0>)
80058b8: 4825 ldr r0, [pc, #148] ; (8005950 <pbuf_copy_partial+0xdc>)
80058ba: f00a fafd bl 800feb8 <printf>
80058be: 2300 movs r3, #0
80058c0: e03e b.n 8005940 <pbuf_copy_partial+0xcc>
/* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */
for (p = buf; len != 0 && p != NULL; p = p->next) {
80058c2: 68fb ldr r3, [r7, #12]
80058c4: 61fb str r3, [r7, #28]
80058c6: e034 b.n 8005932 <pbuf_copy_partial+0xbe>
if ((offset != 0) && (offset >= p->len)) {
80058c8: 88bb ldrh r3, [r7, #4]
80058ca: 2b00 cmp r3, #0
80058cc: d00a beq.n 80058e4 <pbuf_copy_partial+0x70>
80058ce: 69fb ldr r3, [r7, #28]
80058d0: 895b ldrh r3, [r3, #10]
80058d2: 88ba ldrh r2, [r7, #4]
80058d4: 429a cmp r2, r3
80058d6: d305 bcc.n 80058e4 <pbuf_copy_partial+0x70>
/* don't copy from this buffer -> on to the next */
offset = (u16_t)(offset - p->len);
80058d8: 69fb ldr r3, [r7, #28]
80058da: 895b ldrh r3, [r3, #10]
80058dc: 88ba ldrh r2, [r7, #4]
80058de: 1ad3 subs r3, r2, r3
80058e0: 80bb strh r3, [r7, #4]
80058e2: e023 b.n 800592c <pbuf_copy_partial+0xb8>
} else {
/* copy from this buffer. maybe only partially. */
buf_copy_len = (u16_t)(p->len - offset);
80058e4: 69fb ldr r3, [r7, #28]
80058e6: 895a ldrh r2, [r3, #10]
80058e8: 88bb ldrh r3, [r7, #4]
80058ea: 1ad3 subs r3, r2, r3
80058ec: 833b strh r3, [r7, #24]
if (buf_copy_len > len) {
80058ee: 8b3a ldrh r2, [r7, #24]
80058f0: 88fb ldrh r3, [r7, #6]
80058f2: 429a cmp r2, r3
80058f4: d901 bls.n 80058fa <pbuf_copy_partial+0x86>
buf_copy_len = len;
80058f6: 88fb ldrh r3, [r7, #6]
80058f8: 833b strh r3, [r7, #24]
}
/* copy the necessary parts of the buffer */
MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len);
80058fa: 8b7b ldrh r3, [r7, #26]
80058fc: 68ba ldr r2, [r7, #8]
80058fe: 18d0 adds r0, r2, r3
8005900: 69fb ldr r3, [r7, #28]
8005902: 685a ldr r2, [r3, #4]
8005904: 88bb ldrh r3, [r7, #4]
8005906: 4413 add r3, r2
8005908: 8b3a ldrh r2, [r7, #24]
800590a: 4619 mov r1, r3
800590c: f00a faa4 bl 800fe58 <memcpy>
copied_total = (u16_t)(copied_total + buf_copy_len);
8005910: 8afa ldrh r2, [r7, #22]
8005912: 8b3b ldrh r3, [r7, #24]
8005914: 4413 add r3, r2
8005916: 82fb strh r3, [r7, #22]
left = (u16_t)(left + buf_copy_len);
8005918: 8b7a ldrh r2, [r7, #26]
800591a: 8b3b ldrh r3, [r7, #24]
800591c: 4413 add r3, r2
800591e: 837b strh r3, [r7, #26]
len = (u16_t)(len - buf_copy_len);
8005920: 88fa ldrh r2, [r7, #6]
8005922: 8b3b ldrh r3, [r7, #24]
8005924: 1ad3 subs r3, r2, r3
8005926: 80fb strh r3, [r7, #6]
offset = 0;
8005928: 2300 movs r3, #0
800592a: 80bb strh r3, [r7, #4]
for (p = buf; len != 0 && p != NULL; p = p->next) {
800592c: 69fb ldr r3, [r7, #28]
800592e: 681b ldr r3, [r3, #0]
8005930: 61fb str r3, [r7, #28]
8005932: 88fb ldrh r3, [r7, #6]
8005934: 2b00 cmp r3, #0
8005936: d002 beq.n 800593e <pbuf_copy_partial+0xca>
8005938: 69fb ldr r3, [r7, #28]
800593a: 2b00 cmp r3, #0
800593c: d1c4 bne.n 80058c8 <pbuf_copy_partial+0x54>
}
}
return copied_total;
800593e: 8afb ldrh r3, [r7, #22]
}
8005940: 4618 mov r0, r3
8005942: 3720 adds r7, #32
8005944: 46bd mov sp, r7
8005946: bd80 pop {r7, pc}
8005948: 08014fa4 .word 0x08014fa4
800594c: 080152ec .word 0x080152ec
8005950: 08015004 .word 0x08015004
8005954: 0801530c .word 0x0801530c
08005958 <pbuf_clone>:
*
* @return a new pbuf or NULL if allocation fails
*/
struct pbuf *
pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p)
{
8005958: b580 push {r7, lr}
800595a: b084 sub sp, #16
800595c: af00 add r7, sp, #0
800595e: 4603 mov r3, r0
8005960: 603a str r2, [r7, #0]
8005962: 71fb strb r3, [r7, #7]
8005964: 460b mov r3, r1
8005966: 80bb strh r3, [r7, #4]
struct pbuf *q;
err_t err;
q = pbuf_alloc(layer, p->tot_len, type);
8005968: 683b ldr r3, [r7, #0]
800596a: 8919 ldrh r1, [r3, #8]
800596c: 88ba ldrh r2, [r7, #4]
800596e: 79fb ldrb r3, [r7, #7]
8005970: 4618 mov r0, r3
8005972: f7ff faa1 bl 8004eb8 <pbuf_alloc>
8005976: 60f8 str r0, [r7, #12]
if (q == NULL) {
8005978: 68fb ldr r3, [r7, #12]
800597a: 2b00 cmp r3, #0
800597c: d101 bne.n 8005982 <pbuf_clone+0x2a>
return NULL;
800597e: 2300 movs r3, #0
8005980: e011 b.n 80059a6 <pbuf_clone+0x4e>
}
err = pbuf_copy(q, p);
8005982: 6839 ldr r1, [r7, #0]
8005984: 68f8 ldr r0, [r7, #12]
8005986: f7ff fea3 bl 80056d0 <pbuf_copy>
800598a: 4603 mov r3, r0
800598c: 72fb strb r3, [r7, #11]
LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */
LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
800598e: f997 300b ldrsb.w r3, [r7, #11]
8005992: 2b00 cmp r3, #0
8005994: d006 beq.n 80059a4 <pbuf_clone+0x4c>
8005996: 4b06 ldr r3, [pc, #24] ; (80059b0 <pbuf_clone+0x58>)
8005998: f240 5224 movw r2, #1316 ; 0x524
800599c: 4905 ldr r1, [pc, #20] ; (80059b4 <pbuf_clone+0x5c>)
800599e: 4806 ldr r0, [pc, #24] ; (80059b8 <pbuf_clone+0x60>)
80059a0: f00a fa8a bl 800feb8 <printf>
return q;
80059a4: 68fb ldr r3, [r7, #12]
}
80059a6: 4618 mov r0, r3
80059a8: 3710 adds r7, #16
80059aa: 46bd mov sp, r7
80059ac: bd80 pop {r7, pc}
80059ae: bf00 nop
80059b0: 08014fa4 .word 0x08014fa4
80059b4: 08015418 .word 0x08015418
80059b8: 08015004 .word 0x08015004
080059bc <tcp_init>:
/**
* Initialize this module.
*/
void
tcp_init(void)
{
80059bc: b580 push {r7, lr}
80059be: af00 add r7, sp, #0
#ifdef LWIP_RAND
tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
80059c0: f00a fa8c bl 800fedc <rand>
80059c4: 4603 mov r3, r0
80059c6: b29b uxth r3, r3
80059c8: f3c3 030d ubfx r3, r3, #0, #14
80059cc: b29b uxth r3, r3
80059ce: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
80059d2: b29a uxth r2, r3
80059d4: 4b01 ldr r3, [pc, #4] ; (80059dc <tcp_init+0x20>)
80059d6: 801a strh r2, [r3, #0]
#endif /* LWIP_RAND */
}
80059d8: bf00 nop
80059da: bd80 pop {r7, pc}
80059dc: 20000020 .word 0x20000020
080059e0 <tcp_free>:
/** Free a tcp pcb */
void
tcp_free(struct tcp_pcb *pcb)
{
80059e0: b580 push {r7, lr}
80059e2: b082 sub sp, #8
80059e4: af00 add r7, sp, #0
80059e6: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
80059e8: 687b ldr r3, [r7, #4]
80059ea: 7d1b ldrb r3, [r3, #20]
80059ec: 2b01 cmp r3, #1
80059ee: d105 bne.n 80059fc <tcp_free+0x1c>
80059f0: 4b06 ldr r3, [pc, #24] ; (8005a0c <tcp_free+0x2c>)
80059f2: 22d4 movs r2, #212 ; 0xd4
80059f4: 4906 ldr r1, [pc, #24] ; (8005a10 <tcp_free+0x30>)
80059f6: 4807 ldr r0, [pc, #28] ; (8005a14 <tcp_free+0x34>)
80059f8: f00a fa5e bl 800feb8 <printf>
#if LWIP_TCP_PCB_NUM_EXT_ARGS
tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args);
#endif
memp_free(MEMP_TCP_PCB, pcb);
80059fc: 6879 ldr r1, [r7, #4]
80059fe: 2001 movs r0, #1
8005a00: f7fe febc bl 800477c <memp_free>
}
8005a04: bf00 nop
8005a06: 3708 adds r7, #8
8005a08: 46bd mov sp, r7
8005a0a: bd80 pop {r7, pc}
8005a0c: 080154a4 .word 0x080154a4
8005a10: 080154d4 .word 0x080154d4
8005a14: 080154e8 .word 0x080154e8
08005a18 <tcp_free_listen>:
/** Free a tcp listen pcb */
static void
tcp_free_listen(struct tcp_pcb *pcb)
{
8005a18: b580 push {r7, lr}
8005a1a: b082 sub sp, #8
8005a1c: af00 add r7, sp, #0
8005a1e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
8005a20: 687b ldr r3, [r7, #4]
8005a22: 7d1b ldrb r3, [r3, #20]
8005a24: 2b01 cmp r3, #1
8005a26: d105 bne.n 8005a34 <tcp_free_listen+0x1c>
8005a28: 4b06 ldr r3, [pc, #24] ; (8005a44 <tcp_free_listen+0x2c>)
8005a2a: 22df movs r2, #223 ; 0xdf
8005a2c: 4906 ldr r1, [pc, #24] ; (8005a48 <tcp_free_listen+0x30>)
8005a2e: 4807 ldr r0, [pc, #28] ; (8005a4c <tcp_free_listen+0x34>)
8005a30: f00a fa42 bl 800feb8 <printf>
#if LWIP_TCP_PCB_NUM_EXT_ARGS
tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args);
#endif
memp_free(MEMP_TCP_PCB_LISTEN, pcb);
8005a34: 6879 ldr r1, [r7, #4]
8005a36: 2002 movs r0, #2
8005a38: f7fe fea0 bl 800477c <memp_free>
}
8005a3c: bf00 nop
8005a3e: 3708 adds r7, #8
8005a40: 46bd mov sp, r7
8005a42: bd80 pop {r7, pc}
8005a44: 080154a4 .word 0x080154a4
8005a48: 08015510 .word 0x08015510
8005a4c: 080154e8 .word 0x080154e8
08005a50 <tcp_tmr>:
/**
* Called periodically to dispatch TCP timers.
*/
void
tcp_tmr(void)
{
8005a50: b580 push {r7, lr}
8005a52: af00 add r7, sp, #0
/* Call tcp_fasttmr() every 250 ms */
tcp_fasttmr();
8005a54: f000 fea2 bl 800679c <tcp_fasttmr>
if (++tcp_timer & 1) {
8005a58: 4b07 ldr r3, [pc, #28] ; (8005a78 <tcp_tmr+0x28>)
8005a5a: 781b ldrb r3, [r3, #0]
8005a5c: 3301 adds r3, #1
8005a5e: b2da uxtb r2, r3
8005a60: 4b05 ldr r3, [pc, #20] ; (8005a78 <tcp_tmr+0x28>)
8005a62: 701a strb r2, [r3, #0]
8005a64: 4b04 ldr r3, [pc, #16] ; (8005a78 <tcp_tmr+0x28>)
8005a66: 781b ldrb r3, [r3, #0]
8005a68: f003 0301 and.w r3, r3, #1
8005a6c: 2b00 cmp r3, #0
8005a6e: d001 beq.n 8005a74 <tcp_tmr+0x24>
/* Call tcp_slowtmr() every 500 ms, i.e., every other timer
tcp_tmr() is called. */
tcp_slowtmr();
8005a70: f000 fb54 bl 800611c <tcp_slowtmr>
}
}
8005a74: bf00 nop
8005a76: bd80 pop {r7, pc}
8005a78: 20008bc1 .word 0x20008bc1
08005a7c <tcp_remove_listener>:
/** Called when a listen pcb is closed. Iterates one pcb list and removes the
* closed listener pcb from pcb->listener if matching.
*/
static void
tcp_remove_listener(struct tcp_pcb *list, struct tcp_pcb_listen *lpcb)
{
8005a7c: b580 push {r7, lr}
8005a7e: b084 sub sp, #16
8005a80: af00 add r7, sp, #0
8005a82: 6078 str r0, [r7, #4]
8005a84: 6039 str r1, [r7, #0]
struct tcp_pcb *pcb;
LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL);
8005a86: 683b ldr r3, [r7, #0]
8005a88: 2b00 cmp r3, #0
8005a8a: d105 bne.n 8005a98 <tcp_remove_listener+0x1c>
8005a8c: 4b0d ldr r3, [pc, #52] ; (8005ac4 <tcp_remove_listener+0x48>)
8005a8e: 22ff movs r2, #255 ; 0xff
8005a90: 490d ldr r1, [pc, #52] ; (8005ac8 <tcp_remove_listener+0x4c>)
8005a92: 480e ldr r0, [pc, #56] ; (8005acc <tcp_remove_listener+0x50>)
8005a94: f00a fa10 bl 800feb8 <printf>
for (pcb = list; pcb != NULL; pcb = pcb->next) {
8005a98: 687b ldr r3, [r7, #4]
8005a9a: 60fb str r3, [r7, #12]
8005a9c: e00a b.n 8005ab4 <tcp_remove_listener+0x38>
if (pcb->listener == lpcb) {
8005a9e: 68fb ldr r3, [r7, #12]
8005aa0: 6fdb ldr r3, [r3, #124] ; 0x7c
8005aa2: 683a ldr r2, [r7, #0]
8005aa4: 429a cmp r2, r3
8005aa6: d102 bne.n 8005aae <tcp_remove_listener+0x32>
pcb->listener = NULL;
8005aa8: 68fb ldr r3, [r7, #12]
8005aaa: 2200 movs r2, #0
8005aac: 67da str r2, [r3, #124] ; 0x7c
for (pcb = list; pcb != NULL; pcb = pcb->next) {
8005aae: 68fb ldr r3, [r7, #12]
8005ab0: 68db ldr r3, [r3, #12]
8005ab2: 60fb str r3, [r7, #12]
8005ab4: 68fb ldr r3, [r7, #12]
8005ab6: 2b00 cmp r3, #0
8005ab8: d1f1 bne.n 8005a9e <tcp_remove_listener+0x22>
}
}
}
8005aba: bf00 nop
8005abc: bf00 nop
8005abe: 3710 adds r7, #16
8005ac0: 46bd mov sp, r7
8005ac2: bd80 pop {r7, pc}
8005ac4: 080154a4 .word 0x080154a4
8005ac8: 0801552c .word 0x0801552c
8005acc: 080154e8 .word 0x080154e8
08005ad0 <tcp_listen_closed>:
/** Called when a listen pcb is closed. Iterates all pcb lists and removes the
* closed listener pcb from pcb->listener if matching.
*/
static void
tcp_listen_closed(struct tcp_pcb *pcb)
{
8005ad0: b580 push {r7, lr}
8005ad2: b084 sub sp, #16
8005ad4: af00 add r7, sp, #0
8005ad6: 6078 str r0, [r7, #4]
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
size_t i;
LWIP_ASSERT("pcb != NULL", pcb != NULL);
8005ad8: 687b ldr r3, [r7, #4]
8005ada: 2b00 cmp r3, #0
8005adc: d106 bne.n 8005aec <tcp_listen_closed+0x1c>
8005ade: 4b14 ldr r3, [pc, #80] ; (8005b30 <tcp_listen_closed+0x60>)
8005ae0: f240 1211 movw r2, #273 ; 0x111
8005ae4: 4913 ldr r1, [pc, #76] ; (8005b34 <tcp_listen_closed+0x64>)
8005ae6: 4814 ldr r0, [pc, #80] ; (8005b38 <tcp_listen_closed+0x68>)
8005ae8: f00a f9e6 bl 800feb8 <printf>
LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
8005aec: 687b ldr r3, [r7, #4]
8005aee: 7d1b ldrb r3, [r3, #20]
8005af0: 2b01 cmp r3, #1
8005af2: d006 beq.n 8005b02 <tcp_listen_closed+0x32>
8005af4: 4b0e ldr r3, [pc, #56] ; (8005b30 <tcp_listen_closed+0x60>)
8005af6: f44f 7289 mov.w r2, #274 ; 0x112
8005afa: 4910 ldr r1, [pc, #64] ; (8005b3c <tcp_listen_closed+0x6c>)
8005afc: 480e ldr r0, [pc, #56] ; (8005b38 <tcp_listen_closed+0x68>)
8005afe: f00a f9db bl 800feb8 <printf>
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
8005b02: 2301 movs r3, #1
8005b04: 60fb str r3, [r7, #12]
8005b06: e00b b.n 8005b20 <tcp_listen_closed+0x50>
tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb);
8005b08: 4a0d ldr r2, [pc, #52] ; (8005b40 <tcp_listen_closed+0x70>)
8005b0a: 68fb ldr r3, [r7, #12]
8005b0c: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8005b10: 681b ldr r3, [r3, #0]
8005b12: 6879 ldr r1, [r7, #4]
8005b14: 4618 mov r0, r3
8005b16: f7ff ffb1 bl 8005a7c <tcp_remove_listener>
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
8005b1a: 68fb ldr r3, [r7, #12]
8005b1c: 3301 adds r3, #1
8005b1e: 60fb str r3, [r7, #12]
8005b20: 68fb ldr r3, [r7, #12]
8005b22: 2b03 cmp r3, #3
8005b24: d9f0 bls.n 8005b08 <tcp_listen_closed+0x38>
}
#endif
LWIP_UNUSED_ARG(pcb);
}
8005b26: bf00 nop
8005b28: bf00 nop
8005b2a: 3710 adds r7, #16
8005b2c: 46bd mov sp, r7
8005b2e: bd80 pop {r7, pc}
8005b30: 080154a4 .word 0x080154a4
8005b34: 08015554 .word 0x08015554
8005b38: 080154e8 .word 0x080154e8
8005b3c: 08015560 .word 0x08015560
8005b40: 0801788c .word 0x0801788c
08005b44 <tcp_close_shutdown>:
* @return ERR_OK if connection has been closed
* another err_t if closing failed and pcb is not freed
*/
static err_t
tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data)
{
8005b44: b5b0 push {r4, r5, r7, lr}
8005b46: b088 sub sp, #32
8005b48: af04 add r7, sp, #16
8005b4a: 6078 str r0, [r7, #4]
8005b4c: 460b mov r3, r1
8005b4e: 70fb strb r3, [r7, #3]
LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL);
8005b50: 687b ldr r3, [r7, #4]
8005b52: 2b00 cmp r3, #0
8005b54: d106 bne.n 8005b64 <tcp_close_shutdown+0x20>
8005b56: 4b63 ldr r3, [pc, #396] ; (8005ce4 <tcp_close_shutdown+0x1a0>)
8005b58: f44f 72af mov.w r2, #350 ; 0x15e
8005b5c: 4962 ldr r1, [pc, #392] ; (8005ce8 <tcp_close_shutdown+0x1a4>)
8005b5e: 4863 ldr r0, [pc, #396] ; (8005cec <tcp_close_shutdown+0x1a8>)
8005b60: f00a f9aa bl 800feb8 <printf>
if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) {
8005b64: 78fb ldrb r3, [r7, #3]
8005b66: 2b00 cmp r3, #0
8005b68: d066 beq.n 8005c38 <tcp_close_shutdown+0xf4>
8005b6a: 687b ldr r3, [r7, #4]
8005b6c: 7d1b ldrb r3, [r3, #20]
8005b6e: 2b04 cmp r3, #4
8005b70: d003 beq.n 8005b7a <tcp_close_shutdown+0x36>
8005b72: 687b ldr r3, [r7, #4]
8005b74: 7d1b ldrb r3, [r3, #20]
8005b76: 2b07 cmp r3, #7
8005b78: d15e bne.n 8005c38 <tcp_close_shutdown+0xf4>
if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) {
8005b7a: 687b ldr r3, [r7, #4]
8005b7c: 6f9b ldr r3, [r3, #120] ; 0x78
8005b7e: 2b00 cmp r3, #0
8005b80: d104 bne.n 8005b8c <tcp_close_shutdown+0x48>
8005b82: 687b ldr r3, [r7, #4]
8005b84: 8d1b ldrh r3, [r3, #40] ; 0x28
8005b86: f5b3 6f06 cmp.w r3, #2144 ; 0x860
8005b8a: d055 beq.n 8005c38 <tcp_close_shutdown+0xf4>
/* Not all data received by application, send RST to tell the remote
side about this. */
LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED);
8005b8c: 687b ldr r3, [r7, #4]
8005b8e: 8b5b ldrh r3, [r3, #26]
8005b90: f003 0310 and.w r3, r3, #16
8005b94: 2b00 cmp r3, #0
8005b96: d106 bne.n 8005ba6 <tcp_close_shutdown+0x62>
8005b98: 4b52 ldr r3, [pc, #328] ; (8005ce4 <tcp_close_shutdown+0x1a0>)
8005b9a: f44f 72b2 mov.w r2, #356 ; 0x164
8005b9e: 4954 ldr r1, [pc, #336] ; (8005cf0 <tcp_close_shutdown+0x1ac>)
8005ba0: 4852 ldr r0, [pc, #328] ; (8005cec <tcp_close_shutdown+0x1a8>)
8005ba2: f00a f989 bl 800feb8 <printf>
/* don't call tcp_abort here: we must not deallocate the pcb since
that might not be expected when calling tcp_close */
tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
8005ba6: 687b ldr r3, [r7, #4]
8005ba8: 6d18 ldr r0, [r3, #80] ; 0x50
8005baa: 687b ldr r3, [r7, #4]
8005bac: 6a5c ldr r4, [r3, #36] ; 0x24
8005bae: 687d ldr r5, [r7, #4]
8005bb0: 687b ldr r3, [r7, #4]
8005bb2: 3304 adds r3, #4
8005bb4: 687a ldr r2, [r7, #4]
8005bb6: 8ad2 ldrh r2, [r2, #22]
8005bb8: 6879 ldr r1, [r7, #4]
8005bba: 8b09 ldrh r1, [r1, #24]
8005bbc: 9102 str r1, [sp, #8]
8005bbe: 9201 str r2, [sp, #4]
8005bc0: 9300 str r3, [sp, #0]
8005bc2: 462b mov r3, r5
8005bc4: 4622 mov r2, r4
8005bc6: 4601 mov r1, r0
8005bc8: 6878 ldr r0, [r7, #4]
8005bca: f004 fe91 bl 800a8f0 <tcp_rst>
pcb->local_port, pcb->remote_port);
tcp_pcb_purge(pcb);
8005bce: 6878 ldr r0, [r7, #4]
8005bd0: f001 f8c6 bl 8006d60 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8005bd4: 4b47 ldr r3, [pc, #284] ; (8005cf4 <tcp_close_shutdown+0x1b0>)
8005bd6: 681b ldr r3, [r3, #0]
8005bd8: 687a ldr r2, [r7, #4]
8005bda: 429a cmp r2, r3
8005bdc: d105 bne.n 8005bea <tcp_close_shutdown+0xa6>
8005bde: 4b45 ldr r3, [pc, #276] ; (8005cf4 <tcp_close_shutdown+0x1b0>)
8005be0: 681b ldr r3, [r3, #0]
8005be2: 68db ldr r3, [r3, #12]
8005be4: 4a43 ldr r2, [pc, #268] ; (8005cf4 <tcp_close_shutdown+0x1b0>)
8005be6: 6013 str r3, [r2, #0]
8005be8: e013 b.n 8005c12 <tcp_close_shutdown+0xce>
8005bea: 4b42 ldr r3, [pc, #264] ; (8005cf4 <tcp_close_shutdown+0x1b0>)
8005bec: 681b ldr r3, [r3, #0]
8005bee: 60fb str r3, [r7, #12]
8005bf0: e00c b.n 8005c0c <tcp_close_shutdown+0xc8>
8005bf2: 68fb ldr r3, [r7, #12]
8005bf4: 68db ldr r3, [r3, #12]
8005bf6: 687a ldr r2, [r7, #4]
8005bf8: 429a cmp r2, r3
8005bfa: d104 bne.n 8005c06 <tcp_close_shutdown+0xc2>
8005bfc: 687b ldr r3, [r7, #4]
8005bfe: 68da ldr r2, [r3, #12]
8005c00: 68fb ldr r3, [r7, #12]
8005c02: 60da str r2, [r3, #12]
8005c04: e005 b.n 8005c12 <tcp_close_shutdown+0xce>
8005c06: 68fb ldr r3, [r7, #12]
8005c08: 68db ldr r3, [r3, #12]
8005c0a: 60fb str r3, [r7, #12]
8005c0c: 68fb ldr r3, [r7, #12]
8005c0e: 2b00 cmp r3, #0
8005c10: d1ef bne.n 8005bf2 <tcp_close_shutdown+0xae>
8005c12: 687b ldr r3, [r7, #4]
8005c14: 2200 movs r2, #0
8005c16: 60da str r2, [r3, #12]
8005c18: 4b37 ldr r3, [pc, #220] ; (8005cf8 <tcp_close_shutdown+0x1b4>)
8005c1a: 2201 movs r2, #1
8005c1c: 701a strb r2, [r3, #0]
/* Deallocate the pcb since we already sent a RST for it */
if (tcp_input_pcb == pcb) {
8005c1e: 4b37 ldr r3, [pc, #220] ; (8005cfc <tcp_close_shutdown+0x1b8>)
8005c20: 681b ldr r3, [r3, #0]
8005c22: 687a ldr r2, [r7, #4]
8005c24: 429a cmp r2, r3
8005c26: d102 bne.n 8005c2e <tcp_close_shutdown+0xea>
/* prevent using a deallocated pcb: free it from tcp_input later */
tcp_trigger_input_pcb_close();
8005c28: f003 fd5e bl 80096e8 <tcp_trigger_input_pcb_close>
8005c2c: e002 b.n 8005c34 <tcp_close_shutdown+0xf0>
} else {
tcp_free(pcb);
8005c2e: 6878 ldr r0, [r7, #4]
8005c30: f7ff fed6 bl 80059e0 <tcp_free>
}
return ERR_OK;
8005c34: 2300 movs r3, #0
8005c36: e050 b.n 8005cda <tcp_close_shutdown+0x196>
}
}
/* - states which free the pcb are handled here,
- states which send FIN and change state are handled in tcp_close_shutdown_fin() */
switch (pcb->state) {
8005c38: 687b ldr r3, [r7, #4]
8005c3a: 7d1b ldrb r3, [r3, #20]
8005c3c: 2b02 cmp r3, #2
8005c3e: d03b beq.n 8005cb8 <tcp_close_shutdown+0x174>
8005c40: 2b02 cmp r3, #2
8005c42: dc44 bgt.n 8005cce <tcp_close_shutdown+0x18a>
8005c44: 2b00 cmp r3, #0
8005c46: d002 beq.n 8005c4e <tcp_close_shutdown+0x10a>
8005c48: 2b01 cmp r3, #1
8005c4a: d02a beq.n 8005ca2 <tcp_close_shutdown+0x15e>
8005c4c: e03f b.n 8005cce <tcp_close_shutdown+0x18a>
* and the user needs some way to free it should the need arise.
* Calling tcp_close() with a pcb that has already been closed, (i.e. twice)
* or for a pcb that has been used and then entered the CLOSED state
* is erroneous, but this should never happen as the pcb has in those cases
* been freed, and so any remaining handles are bogus. */
if (pcb->local_port != 0) {
8005c4e: 687b ldr r3, [r7, #4]
8005c50: 8adb ldrh r3, [r3, #22]
8005c52: 2b00 cmp r3, #0
8005c54: d021 beq.n 8005c9a <tcp_close_shutdown+0x156>
TCP_RMV(&tcp_bound_pcbs, pcb);
8005c56: 4b2a ldr r3, [pc, #168] ; (8005d00 <tcp_close_shutdown+0x1bc>)
8005c58: 681b ldr r3, [r3, #0]
8005c5a: 687a ldr r2, [r7, #4]
8005c5c: 429a cmp r2, r3
8005c5e: d105 bne.n 8005c6c <tcp_close_shutdown+0x128>
8005c60: 4b27 ldr r3, [pc, #156] ; (8005d00 <tcp_close_shutdown+0x1bc>)
8005c62: 681b ldr r3, [r3, #0]
8005c64: 68db ldr r3, [r3, #12]
8005c66: 4a26 ldr r2, [pc, #152] ; (8005d00 <tcp_close_shutdown+0x1bc>)
8005c68: 6013 str r3, [r2, #0]
8005c6a: e013 b.n 8005c94 <tcp_close_shutdown+0x150>
8005c6c: 4b24 ldr r3, [pc, #144] ; (8005d00 <tcp_close_shutdown+0x1bc>)
8005c6e: 681b ldr r3, [r3, #0]
8005c70: 60bb str r3, [r7, #8]
8005c72: e00c b.n 8005c8e <tcp_close_shutdown+0x14a>
8005c74: 68bb ldr r3, [r7, #8]
8005c76: 68db ldr r3, [r3, #12]
8005c78: 687a ldr r2, [r7, #4]
8005c7a: 429a cmp r2, r3
8005c7c: d104 bne.n 8005c88 <tcp_close_shutdown+0x144>
8005c7e: 687b ldr r3, [r7, #4]
8005c80: 68da ldr r2, [r3, #12]
8005c82: 68bb ldr r3, [r7, #8]
8005c84: 60da str r2, [r3, #12]
8005c86: e005 b.n 8005c94 <tcp_close_shutdown+0x150>
8005c88: 68bb ldr r3, [r7, #8]
8005c8a: 68db ldr r3, [r3, #12]
8005c8c: 60bb str r3, [r7, #8]
8005c8e: 68bb ldr r3, [r7, #8]
8005c90: 2b00 cmp r3, #0
8005c92: d1ef bne.n 8005c74 <tcp_close_shutdown+0x130>
8005c94: 687b ldr r3, [r7, #4]
8005c96: 2200 movs r2, #0
8005c98: 60da str r2, [r3, #12]
}
tcp_free(pcb);
8005c9a: 6878 ldr r0, [r7, #4]
8005c9c: f7ff fea0 bl 80059e0 <tcp_free>
break;
8005ca0: e01a b.n 8005cd8 <tcp_close_shutdown+0x194>
case LISTEN:
tcp_listen_closed(pcb);
8005ca2: 6878 ldr r0, [r7, #4]
8005ca4: f7ff ff14 bl 8005ad0 <tcp_listen_closed>
tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb);
8005ca8: 6879 ldr r1, [r7, #4]
8005caa: 4816 ldr r0, [pc, #88] ; (8005d04 <tcp_close_shutdown+0x1c0>)
8005cac: f001 f8a8 bl 8006e00 <tcp_pcb_remove>
tcp_free_listen(pcb);
8005cb0: 6878 ldr r0, [r7, #4]
8005cb2: f7ff feb1 bl 8005a18 <tcp_free_listen>
break;
8005cb6: e00f b.n 8005cd8 <tcp_close_shutdown+0x194>
case SYN_SENT:
TCP_PCB_REMOVE_ACTIVE(pcb);
8005cb8: 6879 ldr r1, [r7, #4]
8005cba: 480e ldr r0, [pc, #56] ; (8005cf4 <tcp_close_shutdown+0x1b0>)
8005cbc: f001 f8a0 bl 8006e00 <tcp_pcb_remove>
8005cc0: 4b0d ldr r3, [pc, #52] ; (8005cf8 <tcp_close_shutdown+0x1b4>)
8005cc2: 2201 movs r2, #1
8005cc4: 701a strb r2, [r3, #0]
tcp_free(pcb);
8005cc6: 6878 ldr r0, [r7, #4]
8005cc8: f7ff fe8a bl 80059e0 <tcp_free>
MIB2_STATS_INC(mib2.tcpattemptfails);
break;
8005ccc: e004 b.n 8005cd8 <tcp_close_shutdown+0x194>
default:
return tcp_close_shutdown_fin(pcb);
8005cce: 6878 ldr r0, [r7, #4]
8005cd0: f000 f81a bl 8005d08 <tcp_close_shutdown_fin>
8005cd4: 4603 mov r3, r0
8005cd6: e000 b.n 8005cda <tcp_close_shutdown+0x196>
}
return ERR_OK;
8005cd8: 2300 movs r3, #0
}
8005cda: 4618 mov r0, r3
8005cdc: 3710 adds r7, #16
8005cde: 46bd mov sp, r7
8005ce0: bdb0 pop {r4, r5, r7, pc}
8005ce2: bf00 nop
8005ce4: 080154a4 .word 0x080154a4
8005ce8: 08015578 .word 0x08015578
8005cec: 080154e8 .word 0x080154e8
8005cf0: 08015598 .word 0x08015598
8005cf4: 20008bb8 .word 0x20008bb8
8005cf8: 20008bc0 .word 0x20008bc0
8005cfc: 20008bf8 .word 0x20008bf8
8005d00: 20008bb0 .word 0x20008bb0
8005d04: 20008bb4 .word 0x20008bb4
08005d08 <tcp_close_shutdown_fin>:
static err_t
tcp_close_shutdown_fin(struct tcp_pcb *pcb)
{
8005d08: b580 push {r7, lr}
8005d0a: b084 sub sp, #16
8005d0c: af00 add r7, sp, #0
8005d0e: 6078 str r0, [r7, #4]
err_t err;
LWIP_ASSERT("pcb != NULL", pcb != NULL);
8005d10: 687b ldr r3, [r7, #4]
8005d12: 2b00 cmp r3, #0
8005d14: d106 bne.n 8005d24 <tcp_close_shutdown_fin+0x1c>
8005d16: 4b2e ldr r3, [pc, #184] ; (8005dd0 <tcp_close_shutdown_fin+0xc8>)
8005d18: f44f 72ce mov.w r2, #412 ; 0x19c
8005d1c: 492d ldr r1, [pc, #180] ; (8005dd4 <tcp_close_shutdown_fin+0xcc>)
8005d1e: 482e ldr r0, [pc, #184] ; (8005dd8 <tcp_close_shutdown_fin+0xd0>)
8005d20: f00a f8ca bl 800feb8 <printf>
switch (pcb->state) {
8005d24: 687b ldr r3, [r7, #4]
8005d26: 7d1b ldrb r3, [r3, #20]
8005d28: 2b07 cmp r3, #7
8005d2a: d020 beq.n 8005d6e <tcp_close_shutdown_fin+0x66>
8005d2c: 2b07 cmp r3, #7
8005d2e: dc2b bgt.n 8005d88 <tcp_close_shutdown_fin+0x80>
8005d30: 2b03 cmp r3, #3
8005d32: d002 beq.n 8005d3a <tcp_close_shutdown_fin+0x32>
8005d34: 2b04 cmp r3, #4
8005d36: d00d beq.n 8005d54 <tcp_close_shutdown_fin+0x4c>
8005d38: e026 b.n 8005d88 <tcp_close_shutdown_fin+0x80>
case SYN_RCVD:
err = tcp_send_fin(pcb);
8005d3a: 6878 ldr r0, [r7, #4]
8005d3c: f003 fee6 bl 8009b0c <tcp_send_fin>
8005d40: 4603 mov r3, r0
8005d42: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8005d44: f997 300f ldrsb.w r3, [r7, #15]
8005d48: 2b00 cmp r3, #0
8005d4a: d11f bne.n 8005d8c <tcp_close_shutdown_fin+0x84>
tcp_backlog_accepted(pcb);
MIB2_STATS_INC(mib2.tcpattemptfails);
pcb->state = FIN_WAIT_1;
8005d4c: 687b ldr r3, [r7, #4]
8005d4e: 2205 movs r2, #5
8005d50: 751a strb r2, [r3, #20]
}
break;
8005d52: e01b b.n 8005d8c <tcp_close_shutdown_fin+0x84>
case ESTABLISHED:
err = tcp_send_fin(pcb);
8005d54: 6878 ldr r0, [r7, #4]
8005d56: f003 fed9 bl 8009b0c <tcp_send_fin>
8005d5a: 4603 mov r3, r0
8005d5c: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8005d5e: f997 300f ldrsb.w r3, [r7, #15]
8005d62: 2b00 cmp r3, #0
8005d64: d114 bne.n 8005d90 <tcp_close_shutdown_fin+0x88>
MIB2_STATS_INC(mib2.tcpestabresets);
pcb->state = FIN_WAIT_1;
8005d66: 687b ldr r3, [r7, #4]
8005d68: 2205 movs r2, #5
8005d6a: 751a strb r2, [r3, #20]
}
break;
8005d6c: e010 b.n 8005d90 <tcp_close_shutdown_fin+0x88>
case CLOSE_WAIT:
err = tcp_send_fin(pcb);
8005d6e: 6878 ldr r0, [r7, #4]
8005d70: f003 fecc bl 8009b0c <tcp_send_fin>
8005d74: 4603 mov r3, r0
8005d76: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8005d78: f997 300f ldrsb.w r3, [r7, #15]
8005d7c: 2b00 cmp r3, #0
8005d7e: d109 bne.n 8005d94 <tcp_close_shutdown_fin+0x8c>
MIB2_STATS_INC(mib2.tcpestabresets);
pcb->state = LAST_ACK;
8005d80: 687b ldr r3, [r7, #4]
8005d82: 2209 movs r2, #9
8005d84: 751a strb r2, [r3, #20]
}
break;
8005d86: e005 b.n 8005d94 <tcp_close_shutdown_fin+0x8c>
default:
/* Has already been closed, do nothing. */
return ERR_OK;
8005d88: 2300 movs r3, #0
8005d8a: e01c b.n 8005dc6 <tcp_close_shutdown_fin+0xbe>
break;
8005d8c: bf00 nop
8005d8e: e002 b.n 8005d96 <tcp_close_shutdown_fin+0x8e>
break;
8005d90: bf00 nop
8005d92: e000 b.n 8005d96 <tcp_close_shutdown_fin+0x8e>
break;
8005d94: bf00 nop
}
if (err == ERR_OK) {
8005d96: f997 300f ldrsb.w r3, [r7, #15]
8005d9a: 2b00 cmp r3, #0
8005d9c: d103 bne.n 8005da6 <tcp_close_shutdown_fin+0x9e>
/* To ensure all data has been sent when tcp_close returns, we have
to make sure tcp_output doesn't fail.
Since we don't really have to ensure all data has been sent when tcp_close
returns (unsent data is sent from tcp timer functions, also), we don't care
for the return value of tcp_output for now. */
tcp_output(pcb);
8005d9e: 6878 ldr r0, [r7, #4]
8005da0: f003 fff2 bl 8009d88 <tcp_output>
8005da4: e00d b.n 8005dc2 <tcp_close_shutdown_fin+0xba>
} else if (err == ERR_MEM) {
8005da6: f997 300f ldrsb.w r3, [r7, #15]
8005daa: f1b3 3fff cmp.w r3, #4294967295
8005dae: d108 bne.n 8005dc2 <tcp_close_shutdown_fin+0xba>
/* Mark this pcb for closing. Closing is retried from tcp_tmr. */
tcp_set_flags(pcb, TF_CLOSEPEND);
8005db0: 687b ldr r3, [r7, #4]
8005db2: 8b5b ldrh r3, [r3, #26]
8005db4: f043 0308 orr.w r3, r3, #8
8005db8: b29a uxth r2, r3
8005dba: 687b ldr r3, [r7, #4]
8005dbc: 835a strh r2, [r3, #26]
/* We have to return ERR_OK from here to indicate to the callers that this
pcb should not be used any more as it will be freed soon via tcp_tmr.
This is OK here since sending FIN does not guarantee a time frime for
actually freeing the pcb, either (it is left in closure states for
remote ACK or timeout) */
return ERR_OK;
8005dbe: 2300 movs r3, #0
8005dc0: e001 b.n 8005dc6 <tcp_close_shutdown_fin+0xbe>
}
return err;
8005dc2: f997 300f ldrsb.w r3, [r7, #15]
}
8005dc6: 4618 mov r0, r3
8005dc8: 3710 adds r7, #16
8005dca: 46bd mov sp, r7
8005dcc: bd80 pop {r7, pc}
8005dce: bf00 nop
8005dd0: 080154a4 .word 0x080154a4
8005dd4: 08015554 .word 0x08015554
8005dd8: 080154e8 .word 0x080154e8
08005ddc <tcp_close>:
* @return ERR_OK if connection has been closed
* another err_t if closing failed and pcb is not freed
*/
err_t
tcp_close(struct tcp_pcb *pcb)
{
8005ddc: b580 push {r7, lr}
8005dde: b082 sub sp, #8
8005de0: af00 add r7, sp, #0
8005de2: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG);
8005de4: 687b ldr r3, [r7, #4]
8005de6: 2b00 cmp r3, #0
8005de8: d109 bne.n 8005dfe <tcp_close+0x22>
8005dea: 4b0f ldr r3, [pc, #60] ; (8005e28 <tcp_close+0x4c>)
8005dec: f44f 72f4 mov.w r2, #488 ; 0x1e8
8005df0: 490e ldr r1, [pc, #56] ; (8005e2c <tcp_close+0x50>)
8005df2: 480f ldr r0, [pc, #60] ; (8005e30 <tcp_close+0x54>)
8005df4: f00a f860 bl 800feb8 <printf>
8005df8: f06f 030f mvn.w r3, #15
8005dfc: e00f b.n 8005e1e <tcp_close+0x42>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in "));
tcp_debug_print_state(pcb->state);
if (pcb->state != LISTEN) {
8005dfe: 687b ldr r3, [r7, #4]
8005e00: 7d1b ldrb r3, [r3, #20]
8005e02: 2b01 cmp r3, #1
8005e04: d006 beq.n 8005e14 <tcp_close+0x38>
/* Set a flag not to receive any more data... */
tcp_set_flags(pcb, TF_RXCLOSED);
8005e06: 687b ldr r3, [r7, #4]
8005e08: 8b5b ldrh r3, [r3, #26]
8005e0a: f043 0310 orr.w r3, r3, #16
8005e0e: b29a uxth r2, r3
8005e10: 687b ldr r3, [r7, #4]
8005e12: 835a strh r2, [r3, #26]
}
/* ... and close */
return tcp_close_shutdown(pcb, 1);
8005e14: 2101 movs r1, #1
8005e16: 6878 ldr r0, [r7, #4]
8005e18: f7ff fe94 bl 8005b44 <tcp_close_shutdown>
8005e1c: 4603 mov r3, r0
}
8005e1e: 4618 mov r0, r3
8005e20: 3708 adds r7, #8
8005e22: 46bd mov sp, r7
8005e24: bd80 pop {r7, pc}
8005e26: bf00 nop
8005e28: 080154a4 .word 0x080154a4
8005e2c: 080155b4 .word 0x080155b4
8005e30: 080154e8 .word 0x080154e8
08005e34 <tcp_abandon>:
* @param pcb the tcp_pcb to abort
* @param reset boolean to indicate whether a reset should be sent
*/
void
tcp_abandon(struct tcp_pcb *pcb, int reset)
{
8005e34: b580 push {r7, lr}
8005e36: b08e sub sp, #56 ; 0x38
8005e38: af04 add r7, sp, #16
8005e3a: 6078 str r0, [r7, #4]
8005e3c: 6039 str r1, [r7, #0]
#endif /* LWIP_CALLBACK_API */
void *errf_arg;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return);
8005e3e: 687b ldr r3, [r7, #4]
8005e40: 2b00 cmp r3, #0
8005e42: d107 bne.n 8005e54 <tcp_abandon+0x20>
8005e44: 4b52 ldr r3, [pc, #328] ; (8005f90 <tcp_abandon+0x15c>)
8005e46: f240 223d movw r2, #573 ; 0x23d
8005e4a: 4952 ldr r1, [pc, #328] ; (8005f94 <tcp_abandon+0x160>)
8005e4c: 4852 ldr r0, [pc, #328] ; (8005f98 <tcp_abandon+0x164>)
8005e4e: f00a f833 bl 800feb8 <printf>
8005e52: e099 b.n 8005f88 <tcp_abandon+0x154>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs",
8005e54: 687b ldr r3, [r7, #4]
8005e56: 7d1b ldrb r3, [r3, #20]
8005e58: 2b01 cmp r3, #1
8005e5a: d106 bne.n 8005e6a <tcp_abandon+0x36>
8005e5c: 4b4c ldr r3, [pc, #304] ; (8005f90 <tcp_abandon+0x15c>)
8005e5e: f44f 7210 mov.w r2, #576 ; 0x240
8005e62: 494e ldr r1, [pc, #312] ; (8005f9c <tcp_abandon+0x168>)
8005e64: 484c ldr r0, [pc, #304] ; (8005f98 <tcp_abandon+0x164>)
8005e66: f00a f827 bl 800feb8 <printf>
pcb->state != LISTEN);
/* Figure out on which TCP PCB list we are, and remove us. If we
are in an active state, call the receive function associated with
the PCB with a NULL argument, and send an RST to the remote end. */
if (pcb->state == TIME_WAIT) {
8005e6a: 687b ldr r3, [r7, #4]
8005e6c: 7d1b ldrb r3, [r3, #20]
8005e6e: 2b0a cmp r3, #10
8005e70: d107 bne.n 8005e82 <tcp_abandon+0x4e>
tcp_pcb_remove(&tcp_tw_pcbs, pcb);
8005e72: 6879 ldr r1, [r7, #4]
8005e74: 484a ldr r0, [pc, #296] ; (8005fa0 <tcp_abandon+0x16c>)
8005e76: f000 ffc3 bl 8006e00 <tcp_pcb_remove>
tcp_free(pcb);
8005e7a: 6878 ldr r0, [r7, #4]
8005e7c: f7ff fdb0 bl 80059e0 <tcp_free>
8005e80: e082 b.n 8005f88 <tcp_abandon+0x154>
} else {
int send_rst = 0;
8005e82: 2300 movs r3, #0
8005e84: 627b str r3, [r7, #36] ; 0x24
u16_t local_port = 0;
8005e86: 2300 movs r3, #0
8005e88: 847b strh r3, [r7, #34] ; 0x22
enum tcp_state last_state;
seqno = pcb->snd_nxt;
8005e8a: 687b ldr r3, [r7, #4]
8005e8c: 6d1b ldr r3, [r3, #80] ; 0x50
8005e8e: 61bb str r3, [r7, #24]
ackno = pcb->rcv_nxt;
8005e90: 687b ldr r3, [r7, #4]
8005e92: 6a5b ldr r3, [r3, #36] ; 0x24
8005e94: 617b str r3, [r7, #20]
#if LWIP_CALLBACK_API
errf = pcb->errf;
8005e96: 687b ldr r3, [r7, #4]
8005e98: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8005e9c: 613b str r3, [r7, #16]
#endif /* LWIP_CALLBACK_API */
errf_arg = pcb->callback_arg;
8005e9e: 687b ldr r3, [r7, #4]
8005ea0: 691b ldr r3, [r3, #16]
8005ea2: 60fb str r3, [r7, #12]
if (pcb->state == CLOSED) {
8005ea4: 687b ldr r3, [r7, #4]
8005ea6: 7d1b ldrb r3, [r3, #20]
8005ea8: 2b00 cmp r3, #0
8005eaa: d126 bne.n 8005efa <tcp_abandon+0xc6>
if (pcb->local_port != 0) {
8005eac: 687b ldr r3, [r7, #4]
8005eae: 8adb ldrh r3, [r3, #22]
8005eb0: 2b00 cmp r3, #0
8005eb2: d02e beq.n 8005f12 <tcp_abandon+0xde>
/* bound, not yet opened */
TCP_RMV(&tcp_bound_pcbs, pcb);
8005eb4: 4b3b ldr r3, [pc, #236] ; (8005fa4 <tcp_abandon+0x170>)
8005eb6: 681b ldr r3, [r3, #0]
8005eb8: 687a ldr r2, [r7, #4]
8005eba: 429a cmp r2, r3
8005ebc: d105 bne.n 8005eca <tcp_abandon+0x96>
8005ebe: 4b39 ldr r3, [pc, #228] ; (8005fa4 <tcp_abandon+0x170>)
8005ec0: 681b ldr r3, [r3, #0]
8005ec2: 68db ldr r3, [r3, #12]
8005ec4: 4a37 ldr r2, [pc, #220] ; (8005fa4 <tcp_abandon+0x170>)
8005ec6: 6013 str r3, [r2, #0]
8005ec8: e013 b.n 8005ef2 <tcp_abandon+0xbe>
8005eca: 4b36 ldr r3, [pc, #216] ; (8005fa4 <tcp_abandon+0x170>)
8005ecc: 681b ldr r3, [r3, #0]
8005ece: 61fb str r3, [r7, #28]
8005ed0: e00c b.n 8005eec <tcp_abandon+0xb8>
8005ed2: 69fb ldr r3, [r7, #28]
8005ed4: 68db ldr r3, [r3, #12]
8005ed6: 687a ldr r2, [r7, #4]
8005ed8: 429a cmp r2, r3
8005eda: d104 bne.n 8005ee6 <tcp_abandon+0xb2>
8005edc: 687b ldr r3, [r7, #4]
8005ede: 68da ldr r2, [r3, #12]
8005ee0: 69fb ldr r3, [r7, #28]
8005ee2: 60da str r2, [r3, #12]
8005ee4: e005 b.n 8005ef2 <tcp_abandon+0xbe>
8005ee6: 69fb ldr r3, [r7, #28]
8005ee8: 68db ldr r3, [r3, #12]
8005eea: 61fb str r3, [r7, #28]
8005eec: 69fb ldr r3, [r7, #28]
8005eee: 2b00 cmp r3, #0
8005ef0: d1ef bne.n 8005ed2 <tcp_abandon+0x9e>
8005ef2: 687b ldr r3, [r7, #4]
8005ef4: 2200 movs r2, #0
8005ef6: 60da str r2, [r3, #12]
8005ef8: e00b b.n 8005f12 <tcp_abandon+0xde>
}
} else {
send_rst = reset;
8005efa: 683b ldr r3, [r7, #0]
8005efc: 627b str r3, [r7, #36] ; 0x24
local_port = pcb->local_port;
8005efe: 687b ldr r3, [r7, #4]
8005f00: 8adb ldrh r3, [r3, #22]
8005f02: 847b strh r3, [r7, #34] ; 0x22
TCP_PCB_REMOVE_ACTIVE(pcb);
8005f04: 6879 ldr r1, [r7, #4]
8005f06: 4828 ldr r0, [pc, #160] ; (8005fa8 <tcp_abandon+0x174>)
8005f08: f000 ff7a bl 8006e00 <tcp_pcb_remove>
8005f0c: 4b27 ldr r3, [pc, #156] ; (8005fac <tcp_abandon+0x178>)
8005f0e: 2201 movs r2, #1
8005f10: 701a strb r2, [r3, #0]
}
if (pcb->unacked != NULL) {
8005f12: 687b ldr r3, [r7, #4]
8005f14: 6f1b ldr r3, [r3, #112] ; 0x70
8005f16: 2b00 cmp r3, #0
8005f18: d004 beq.n 8005f24 <tcp_abandon+0xf0>
tcp_segs_free(pcb->unacked);
8005f1a: 687b ldr r3, [r7, #4]
8005f1c: 6f1b ldr r3, [r3, #112] ; 0x70
8005f1e: 4618 mov r0, r3
8005f20: f000 fd1c bl 800695c <tcp_segs_free>
}
if (pcb->unsent != NULL) {
8005f24: 687b ldr r3, [r7, #4]
8005f26: 6edb ldr r3, [r3, #108] ; 0x6c
8005f28: 2b00 cmp r3, #0
8005f2a: d004 beq.n 8005f36 <tcp_abandon+0x102>
tcp_segs_free(pcb->unsent);
8005f2c: 687b ldr r3, [r7, #4]
8005f2e: 6edb ldr r3, [r3, #108] ; 0x6c
8005f30: 4618 mov r0, r3
8005f32: f000 fd13 bl 800695c <tcp_segs_free>
}
#if TCP_QUEUE_OOSEQ
if (pcb->ooseq != NULL) {
8005f36: 687b ldr r3, [r7, #4]
8005f38: 6f5b ldr r3, [r3, #116] ; 0x74
8005f3a: 2b00 cmp r3, #0
8005f3c: d004 beq.n 8005f48 <tcp_abandon+0x114>
tcp_segs_free(pcb->ooseq);
8005f3e: 687b ldr r3, [r7, #4]
8005f40: 6f5b ldr r3, [r3, #116] ; 0x74
8005f42: 4618 mov r0, r3
8005f44: f000 fd0a bl 800695c <tcp_segs_free>
}
#endif /* TCP_QUEUE_OOSEQ */
tcp_backlog_accepted(pcb);
if (send_rst) {
8005f48: 6a7b ldr r3, [r7, #36] ; 0x24
8005f4a: 2b00 cmp r3, #0
8005f4c: d00e beq.n 8005f6c <tcp_abandon+0x138>
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_abandon: sending RST\n"));
tcp_rst(pcb, seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port);
8005f4e: 6879 ldr r1, [r7, #4]
8005f50: 687b ldr r3, [r7, #4]
8005f52: 3304 adds r3, #4
8005f54: 687a ldr r2, [r7, #4]
8005f56: 8b12 ldrh r2, [r2, #24]
8005f58: 9202 str r2, [sp, #8]
8005f5a: 8c7a ldrh r2, [r7, #34] ; 0x22
8005f5c: 9201 str r2, [sp, #4]
8005f5e: 9300 str r3, [sp, #0]
8005f60: 460b mov r3, r1
8005f62: 697a ldr r2, [r7, #20]
8005f64: 69b9 ldr r1, [r7, #24]
8005f66: 6878 ldr r0, [r7, #4]
8005f68: f004 fcc2 bl 800a8f0 <tcp_rst>
}
last_state = pcb->state;
8005f6c: 687b ldr r3, [r7, #4]
8005f6e: 7d1b ldrb r3, [r3, #20]
8005f70: 72fb strb r3, [r7, #11]
tcp_free(pcb);
8005f72: 6878 ldr r0, [r7, #4]
8005f74: f7ff fd34 bl 80059e0 <tcp_free>
TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT);
8005f78: 693b ldr r3, [r7, #16]
8005f7a: 2b00 cmp r3, #0
8005f7c: d004 beq.n 8005f88 <tcp_abandon+0x154>
8005f7e: 693b ldr r3, [r7, #16]
8005f80: f06f 010c mvn.w r1, #12
8005f84: 68f8 ldr r0, [r7, #12]
8005f86: 4798 blx r3
}
}
8005f88: 3728 adds r7, #40 ; 0x28
8005f8a: 46bd mov sp, r7
8005f8c: bd80 pop {r7, pc}
8005f8e: bf00 nop
8005f90: 080154a4 .word 0x080154a4
8005f94: 080155e8 .word 0x080155e8
8005f98: 080154e8 .word 0x080154e8
8005f9c: 08015604 .word 0x08015604
8005fa0: 20008bbc .word 0x20008bbc
8005fa4: 20008bb0 .word 0x20008bb0
8005fa8: 20008bb8 .word 0x20008bb8
8005fac: 20008bc0 .word 0x20008bc0
08005fb0 <tcp_abort>:
*
* @param pcb the tcp pcb to abort
*/
void
tcp_abort(struct tcp_pcb *pcb)
{
8005fb0: b580 push {r7, lr}
8005fb2: b082 sub sp, #8
8005fb4: af00 add r7, sp, #0
8005fb6: 6078 str r0, [r7, #4]
tcp_abandon(pcb, 1);
8005fb8: 2101 movs r1, #1
8005fba: 6878 ldr r0, [r7, #4]
8005fbc: f7ff ff3a bl 8005e34 <tcp_abandon>
}
8005fc0: bf00 nop
8005fc2: 3708 adds r7, #8
8005fc4: 46bd mov sp, r7
8005fc6: bd80 pop {r7, pc}
08005fc8 <tcp_update_rcv_ann_wnd>:
* Returns how much extra window would be advertised if we sent an
* update now.
*/
u32_t
tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb)
{
8005fc8: b580 push {r7, lr}
8005fca: b084 sub sp, #16
8005fcc: af00 add r7, sp, #0
8005fce: 6078 str r0, [r7, #4]
u32_t new_right_edge;
LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
8005fd0: 687b ldr r3, [r7, #4]
8005fd2: 2b00 cmp r3, #0
8005fd4: d106 bne.n 8005fe4 <tcp_update_rcv_ann_wnd+0x1c>
8005fd6: 4b25 ldr r3, [pc, #148] ; (800606c <tcp_update_rcv_ann_wnd+0xa4>)
8005fd8: f240 32a6 movw r2, #934 ; 0x3a6
8005fdc: 4924 ldr r1, [pc, #144] ; (8006070 <tcp_update_rcv_ann_wnd+0xa8>)
8005fde: 4825 ldr r0, [pc, #148] ; (8006074 <tcp_update_rcv_ann_wnd+0xac>)
8005fe0: f009 ff6a bl 800feb8 <printf>
new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd;
8005fe4: 687b ldr r3, [r7, #4]
8005fe6: 6a5b ldr r3, [r3, #36] ; 0x24
8005fe8: 687a ldr r2, [r7, #4]
8005fea: 8d12 ldrh r2, [r2, #40] ; 0x28
8005fec: 4413 add r3, r2
8005fee: 60fb str r3, [r7, #12]
if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) {
8005ff0: 687b ldr r3, [r7, #4]
8005ff2: 6adb ldr r3, [r3, #44] ; 0x2c
8005ff4: 687a ldr r2, [r7, #4]
8005ff6: 8e52 ldrh r2, [r2, #50] ; 0x32
8005ff8: f5b2 6f86 cmp.w r2, #1072 ; 0x430
8005ffc: bf28 it cs
8005ffe: f44f 6286 movcs.w r2, #1072 ; 0x430
8006002: b292 uxth r2, r2
8006004: 4413 add r3, r2
8006006: 68fa ldr r2, [r7, #12]
8006008: 1ad3 subs r3, r2, r3
800600a: 2b00 cmp r3, #0
800600c: db08 blt.n 8006020 <tcp_update_rcv_ann_wnd+0x58>
/* we can advertise more window */
pcb->rcv_ann_wnd = pcb->rcv_wnd;
800600e: 687b ldr r3, [r7, #4]
8006010: 8d1a ldrh r2, [r3, #40] ; 0x28
8006012: 687b ldr r3, [r7, #4]
8006014: 855a strh r2, [r3, #42] ; 0x2a
return new_right_edge - pcb->rcv_ann_right_edge;
8006016: 687b ldr r3, [r7, #4]
8006018: 6adb ldr r3, [r3, #44] ; 0x2c
800601a: 68fa ldr r2, [r7, #12]
800601c: 1ad3 subs r3, r2, r3
800601e: e020 b.n 8006062 <tcp_update_rcv_ann_wnd+0x9a>
} else {
if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) {
8006020: 687b ldr r3, [r7, #4]
8006022: 6a5a ldr r2, [r3, #36] ; 0x24
8006024: 687b ldr r3, [r7, #4]
8006026: 6adb ldr r3, [r3, #44] ; 0x2c
8006028: 1ad3 subs r3, r2, r3
800602a: 2b00 cmp r3, #0
800602c: dd03 ble.n 8006036 <tcp_update_rcv_ann_wnd+0x6e>
/* Can happen due to other end sending out of advertised window,
* but within actual available (but not yet advertised) window */
pcb->rcv_ann_wnd = 0;
800602e: 687b ldr r3, [r7, #4]
8006030: 2200 movs r2, #0
8006032: 855a strh r2, [r3, #42] ; 0x2a
8006034: e014 b.n 8006060 <tcp_update_rcv_ann_wnd+0x98>
} else {
/* keep the right edge of window constant */
u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt;
8006036: 687b ldr r3, [r7, #4]
8006038: 6ada ldr r2, [r3, #44] ; 0x2c
800603a: 687b ldr r3, [r7, #4]
800603c: 6a5b ldr r3, [r3, #36] ; 0x24
800603e: 1ad3 subs r3, r2, r3
8006040: 60bb str r3, [r7, #8]
#if !LWIP_WND_SCALE
LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
8006042: 68bb ldr r3, [r7, #8]
8006044: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8006048: d306 bcc.n 8006058 <tcp_update_rcv_ann_wnd+0x90>
800604a: 4b08 ldr r3, [pc, #32] ; (800606c <tcp_update_rcv_ann_wnd+0xa4>)
800604c: f240 32b6 movw r2, #950 ; 0x3b6
8006050: 4909 ldr r1, [pc, #36] ; (8006078 <tcp_update_rcv_ann_wnd+0xb0>)
8006052: 4808 ldr r0, [pc, #32] ; (8006074 <tcp_update_rcv_ann_wnd+0xac>)
8006054: f009 ff30 bl 800feb8 <printf>
#endif
pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd;
8006058: 68bb ldr r3, [r7, #8]
800605a: b29a uxth r2, r3
800605c: 687b ldr r3, [r7, #4]
800605e: 855a strh r2, [r3, #42] ; 0x2a
}
return 0;
8006060: 2300 movs r3, #0
}
}
8006062: 4618 mov r0, r3
8006064: 3710 adds r7, #16
8006066: 46bd mov sp, r7
8006068: bd80 pop {r7, pc}
800606a: bf00 nop
800606c: 080154a4 .word 0x080154a4
8006070: 08015700 .word 0x08015700
8006074: 080154e8 .word 0x080154e8
8006078: 08015724 .word 0x08015724
0800607c <tcp_recved>:
* @param pcb the tcp_pcb for which data is read
* @param len the amount of bytes that have been read by the application
*/
void
tcp_recved(struct tcp_pcb *pcb, u16_t len)
{
800607c: b580 push {r7, lr}
800607e: b084 sub sp, #16
8006080: af00 add r7, sp, #0
8006082: 6078 str r0, [r7, #4]
8006084: 460b mov r3, r1
8006086: 807b strh r3, [r7, #2]
u32_t wnd_inflation;
tcpwnd_size_t rcv_wnd;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return);
8006088: 687b ldr r3, [r7, #4]
800608a: 2b00 cmp r3, #0
800608c: d107 bne.n 800609e <tcp_recved+0x22>
800608e: 4b1f ldr r3, [pc, #124] ; (800610c <tcp_recved+0x90>)
8006090: f240 32cf movw r2, #975 ; 0x3cf
8006094: 491e ldr r1, [pc, #120] ; (8006110 <tcp_recved+0x94>)
8006096: 481f ldr r0, [pc, #124] ; (8006114 <tcp_recved+0x98>)
8006098: f009 ff0e bl 800feb8 <printf>
800609c: e032 b.n 8006104 <tcp_recved+0x88>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
800609e: 687b ldr r3, [r7, #4]
80060a0: 7d1b ldrb r3, [r3, #20]
80060a2: 2b01 cmp r3, #1
80060a4: d106 bne.n 80060b4 <tcp_recved+0x38>
80060a6: 4b19 ldr r3, [pc, #100] ; (800610c <tcp_recved+0x90>)
80060a8: f240 32d2 movw r2, #978 ; 0x3d2
80060ac: 491a ldr r1, [pc, #104] ; (8006118 <tcp_recved+0x9c>)
80060ae: 4819 ldr r0, [pc, #100] ; (8006114 <tcp_recved+0x98>)
80060b0: f009 ff02 bl 800feb8 <printf>
pcb->state != LISTEN);
rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len);
80060b4: 687b ldr r3, [r7, #4]
80060b6: 8d1a ldrh r2, [r3, #40] ; 0x28
80060b8: 887b ldrh r3, [r7, #2]
80060ba: 4413 add r3, r2
80060bc: 81fb strh r3, [r7, #14]
if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) {
80060be: 89fb ldrh r3, [r7, #14]
80060c0: f5b3 6f06 cmp.w r3, #2144 ; 0x860
80060c4: d804 bhi.n 80060d0 <tcp_recved+0x54>
80060c6: 687b ldr r3, [r7, #4]
80060c8: 8d1b ldrh r3, [r3, #40] ; 0x28
80060ca: 89fa ldrh r2, [r7, #14]
80060cc: 429a cmp r2, r3
80060ce: d204 bcs.n 80060da <tcp_recved+0x5e>
/* window got too big or tcpwnd_size_t overflow */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: window got too big or tcpwnd_size_t overflow\n"));
pcb->rcv_wnd = TCP_WND_MAX(pcb);
80060d0: 687b ldr r3, [r7, #4]
80060d2: f44f 6206 mov.w r2, #2144 ; 0x860
80060d6: 851a strh r2, [r3, #40] ; 0x28
80060d8: e002 b.n 80060e0 <tcp_recved+0x64>
} else {
pcb->rcv_wnd = rcv_wnd;
80060da: 687b ldr r3, [r7, #4]
80060dc: 89fa ldrh r2, [r7, #14]
80060de: 851a strh r2, [r3, #40] ; 0x28
}
wnd_inflation = tcp_update_rcv_ann_wnd(pcb);
80060e0: 6878 ldr r0, [r7, #4]
80060e2: f7ff ff71 bl 8005fc8 <tcp_update_rcv_ann_wnd>
80060e6: 60b8 str r0, [r7, #8]
/* If the change in the right edge of window is significant (default
* watermark is TCP_WND/4), then send an explicit update now.
* Otherwise wait for a packet to be sent in the normal course of
* events (or more window to be available later) */
if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) {
80060e8: 68bb ldr r3, [r7, #8]
80060ea: f5b3 7f06 cmp.w r3, #536 ; 0x218
80060ee: d309 bcc.n 8006104 <tcp_recved+0x88>
tcp_ack_now(pcb);
80060f0: 687b ldr r3, [r7, #4]
80060f2: 8b5b ldrh r3, [r3, #26]
80060f4: f043 0302 orr.w r3, r3, #2
80060f8: b29a uxth r2, r3
80060fa: 687b ldr r3, [r7, #4]
80060fc: 835a strh r2, [r3, #26]
tcp_output(pcb);
80060fe: 6878 ldr r0, [r7, #4]
8006100: f003 fe42 bl 8009d88 <tcp_output>
}
LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n",
len, pcb->rcv_wnd, (u16_t)(TCP_WND_MAX(pcb) - pcb->rcv_wnd)));
}
8006104: 3710 adds r7, #16
8006106: 46bd mov sp, r7
8006108: bd80 pop {r7, pc}
800610a: bf00 nop
800610c: 080154a4 .word 0x080154a4
8006110: 08015740 .word 0x08015740
8006114: 080154e8 .word 0x080154e8
8006118: 08015758 .word 0x08015758
0800611c <tcp_slowtmr>:
*
* Automatically called from tcp_tmr().
*/
void
tcp_slowtmr(void)
{
800611c: b5b0 push {r4, r5, r7, lr}
800611e: b090 sub sp, #64 ; 0x40
8006120: af04 add r7, sp, #16
tcpwnd_size_t eff_wnd;
u8_t pcb_remove; /* flag if a PCB should be removed */
u8_t pcb_reset; /* flag if a RST should be sent when removing */
err_t err;
err = ERR_OK;
8006122: 2300 movs r3, #0
8006124: f887 3025 strb.w r3, [r7, #37] ; 0x25
++tcp_ticks;
8006128: 4b94 ldr r3, [pc, #592] ; (800637c <tcp_slowtmr+0x260>)
800612a: 681b ldr r3, [r3, #0]
800612c: 3301 adds r3, #1
800612e: 4a93 ldr r2, [pc, #588] ; (800637c <tcp_slowtmr+0x260>)
8006130: 6013 str r3, [r2, #0]
++tcp_timer_ctr;
8006132: 4b93 ldr r3, [pc, #588] ; (8006380 <tcp_slowtmr+0x264>)
8006134: 781b ldrb r3, [r3, #0]
8006136: 3301 adds r3, #1
8006138: b2da uxtb r2, r3
800613a: 4b91 ldr r3, [pc, #580] ; (8006380 <tcp_slowtmr+0x264>)
800613c: 701a strb r2, [r3, #0]
tcp_slowtmr_start:
/* Steps through all of the active PCBs. */
prev = NULL;
800613e: 2300 movs r3, #0
8006140: 62bb str r3, [r7, #40] ; 0x28
pcb = tcp_active_pcbs;
8006142: 4b90 ldr r3, [pc, #576] ; (8006384 <tcp_slowtmr+0x268>)
8006144: 681b ldr r3, [r3, #0]
8006146: 62fb str r3, [r7, #44] ; 0x2c
if (pcb == NULL) {
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n"));
}
while (pcb != NULL) {
8006148: e29f b.n 800668a <tcp_slowtmr+0x56e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n"));
LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED);
800614a: 6afb ldr r3, [r7, #44] ; 0x2c
800614c: 7d1b ldrb r3, [r3, #20]
800614e: 2b00 cmp r3, #0
8006150: d106 bne.n 8006160 <tcp_slowtmr+0x44>
8006152: 4b8d ldr r3, [pc, #564] ; (8006388 <tcp_slowtmr+0x26c>)
8006154: f240 42be movw r2, #1214 ; 0x4be
8006158: 498c ldr r1, [pc, #560] ; (800638c <tcp_slowtmr+0x270>)
800615a: 488d ldr r0, [pc, #564] ; (8006390 <tcp_slowtmr+0x274>)
800615c: f009 feac bl 800feb8 <printf>
LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
8006160: 6afb ldr r3, [r7, #44] ; 0x2c
8006162: 7d1b ldrb r3, [r3, #20]
8006164: 2b01 cmp r3, #1
8006166: d106 bne.n 8006176 <tcp_slowtmr+0x5a>
8006168: 4b87 ldr r3, [pc, #540] ; (8006388 <tcp_slowtmr+0x26c>)
800616a: f240 42bf movw r2, #1215 ; 0x4bf
800616e: 4989 ldr r1, [pc, #548] ; (8006394 <tcp_slowtmr+0x278>)
8006170: 4887 ldr r0, [pc, #540] ; (8006390 <tcp_slowtmr+0x274>)
8006172: f009 fea1 bl 800feb8 <printf>
LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
8006176: 6afb ldr r3, [r7, #44] ; 0x2c
8006178: 7d1b ldrb r3, [r3, #20]
800617a: 2b0a cmp r3, #10
800617c: d106 bne.n 800618c <tcp_slowtmr+0x70>
800617e: 4b82 ldr r3, [pc, #520] ; (8006388 <tcp_slowtmr+0x26c>)
8006180: f44f 6298 mov.w r2, #1216 ; 0x4c0
8006184: 4984 ldr r1, [pc, #528] ; (8006398 <tcp_slowtmr+0x27c>)
8006186: 4882 ldr r0, [pc, #520] ; (8006390 <tcp_slowtmr+0x274>)
8006188: f009 fe96 bl 800feb8 <printf>
if (pcb->last_timer == tcp_timer_ctr) {
800618c: 6afb ldr r3, [r7, #44] ; 0x2c
800618e: 7f9a ldrb r2, [r3, #30]
8006190: 4b7b ldr r3, [pc, #492] ; (8006380 <tcp_slowtmr+0x264>)
8006192: 781b ldrb r3, [r3, #0]
8006194: 429a cmp r2, r3
8006196: d105 bne.n 80061a4 <tcp_slowtmr+0x88>
/* skip this pcb, we have already processed it */
prev = pcb;
8006198: 6afb ldr r3, [r7, #44] ; 0x2c
800619a: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
800619c: 6afb ldr r3, [r7, #44] ; 0x2c
800619e: 68db ldr r3, [r3, #12]
80061a0: 62fb str r3, [r7, #44] ; 0x2c
continue;
80061a2: e272 b.n 800668a <tcp_slowtmr+0x56e>
}
pcb->last_timer = tcp_timer_ctr;
80061a4: 4b76 ldr r3, [pc, #472] ; (8006380 <tcp_slowtmr+0x264>)
80061a6: 781a ldrb r2, [r3, #0]
80061a8: 6afb ldr r3, [r7, #44] ; 0x2c
80061aa: 779a strb r2, [r3, #30]
pcb_remove = 0;
80061ac: 2300 movs r3, #0
80061ae: f887 3027 strb.w r3, [r7, #39] ; 0x27
pcb_reset = 0;
80061b2: 2300 movs r3, #0
80061b4: f887 3026 strb.w r3, [r7, #38] ; 0x26
if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
80061b8: 6afb ldr r3, [r7, #44] ; 0x2c
80061ba: 7d1b ldrb r3, [r3, #20]
80061bc: 2b02 cmp r3, #2
80061be: d10a bne.n 80061d6 <tcp_slowtmr+0xba>
80061c0: 6afb ldr r3, [r7, #44] ; 0x2c
80061c2: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
80061c6: 2b05 cmp r3, #5
80061c8: d905 bls.n 80061d6 <tcp_slowtmr+0xba>
++pcb_remove;
80061ca: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80061ce: 3301 adds r3, #1
80061d0: f887 3027 strb.w r3, [r7, #39] ; 0x27
80061d4: e11e b.n 8006414 <tcp_slowtmr+0x2f8>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n"));
} else if (pcb->nrtx >= TCP_MAXRTX) {
80061d6: 6afb ldr r3, [r7, #44] ; 0x2c
80061d8: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
80061dc: 2b0b cmp r3, #11
80061de: d905 bls.n 80061ec <tcp_slowtmr+0xd0>
++pcb_remove;
80061e0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80061e4: 3301 adds r3, #1
80061e6: f887 3027 strb.w r3, [r7, #39] ; 0x27
80061ea: e113 b.n 8006414 <tcp_slowtmr+0x2f8>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n"));
} else {
if (pcb->persist_backoff > 0) {
80061ec: 6afb ldr r3, [r7, #44] ; 0x2c
80061ee: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
80061f2: 2b00 cmp r3, #0
80061f4: d075 beq.n 80062e2 <tcp_slowtmr+0x1c6>
LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL);
80061f6: 6afb ldr r3, [r7, #44] ; 0x2c
80061f8: 6f1b ldr r3, [r3, #112] ; 0x70
80061fa: 2b00 cmp r3, #0
80061fc: d006 beq.n 800620c <tcp_slowtmr+0xf0>
80061fe: 4b62 ldr r3, [pc, #392] ; (8006388 <tcp_slowtmr+0x26c>)
8006200: f240 42d4 movw r2, #1236 ; 0x4d4
8006204: 4965 ldr r1, [pc, #404] ; (800639c <tcp_slowtmr+0x280>)
8006206: 4862 ldr r0, [pc, #392] ; (8006390 <tcp_slowtmr+0x274>)
8006208: f009 fe56 bl 800feb8 <printf>
LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL);
800620c: 6afb ldr r3, [r7, #44] ; 0x2c
800620e: 6edb ldr r3, [r3, #108] ; 0x6c
8006210: 2b00 cmp r3, #0
8006212: d106 bne.n 8006222 <tcp_slowtmr+0x106>
8006214: 4b5c ldr r3, [pc, #368] ; (8006388 <tcp_slowtmr+0x26c>)
8006216: f240 42d5 movw r2, #1237 ; 0x4d5
800621a: 4961 ldr r1, [pc, #388] ; (80063a0 <tcp_slowtmr+0x284>)
800621c: 485c ldr r0, [pc, #368] ; (8006390 <tcp_slowtmr+0x274>)
800621e: f009 fe4b bl 800feb8 <printf>
if (pcb->persist_probe >= TCP_MAXRTX) {
8006222: 6afb ldr r3, [r7, #44] ; 0x2c
8006224: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
8006228: 2b0b cmp r3, #11
800622a: d905 bls.n 8006238 <tcp_slowtmr+0x11c>
++pcb_remove; /* max probes reached */
800622c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006230: 3301 adds r3, #1
8006232: f887 3027 strb.w r3, [r7, #39] ; 0x27
8006236: e0ed b.n 8006414 <tcp_slowtmr+0x2f8>
} else {
u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1];
8006238: 6afb ldr r3, [r7, #44] ; 0x2c
800623a: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
800623e: 3b01 subs r3, #1
8006240: 4a58 ldr r2, [pc, #352] ; (80063a4 <tcp_slowtmr+0x288>)
8006242: 5cd3 ldrb r3, [r2, r3]
8006244: 747b strb r3, [r7, #17]
if (pcb->persist_cnt < backoff_cnt) {
8006246: 6afb ldr r3, [r7, #44] ; 0x2c
8006248: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
800624c: 7c7a ldrb r2, [r7, #17]
800624e: 429a cmp r2, r3
8006250: d907 bls.n 8006262 <tcp_slowtmr+0x146>
pcb->persist_cnt++;
8006252: 6afb ldr r3, [r7, #44] ; 0x2c
8006254: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
8006258: 3301 adds r3, #1
800625a: b2da uxtb r2, r3
800625c: 6afb ldr r3, [r7, #44] ; 0x2c
800625e: f883 2098 strb.w r2, [r3, #152] ; 0x98
}
if (pcb->persist_cnt >= backoff_cnt) {
8006262: 6afb ldr r3, [r7, #44] ; 0x2c
8006264: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
8006268: 7c7a ldrb r2, [r7, #17]
800626a: 429a cmp r2, r3
800626c: f200 80d2 bhi.w 8006414 <tcp_slowtmr+0x2f8>
int next_slot = 1; /* increment timer to next slot */
8006270: 2301 movs r3, #1
8006272: 623b str r3, [r7, #32]
/* If snd_wnd is zero, send 1 byte probes */
if (pcb->snd_wnd == 0) {
8006274: 6afb ldr r3, [r7, #44] ; 0x2c
8006276: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
800627a: 2b00 cmp r3, #0
800627c: d108 bne.n 8006290 <tcp_slowtmr+0x174>
if (tcp_zero_window_probe(pcb) != ERR_OK) {
800627e: 6af8 ldr r0, [r7, #44] ; 0x2c
8006280: f004 fc2a bl 800aad8 <tcp_zero_window_probe>
8006284: 4603 mov r3, r0
8006286: 2b00 cmp r3, #0
8006288: d014 beq.n 80062b4 <tcp_slowtmr+0x198>
next_slot = 0; /* try probe again with current slot */
800628a: 2300 movs r3, #0
800628c: 623b str r3, [r7, #32]
800628e: e011 b.n 80062b4 <tcp_slowtmr+0x198>
}
/* snd_wnd not fully closed, split unsent head and fill window */
} else {
if (tcp_split_unsent_seg(pcb, (u16_t)pcb->snd_wnd) == ERR_OK) {
8006290: 6afb ldr r3, [r7, #44] ; 0x2c
8006292: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8006296: 4619 mov r1, r3
8006298: 6af8 ldr r0, [r7, #44] ; 0x2c
800629a: f003 faef bl 800987c <tcp_split_unsent_seg>
800629e: 4603 mov r3, r0
80062a0: 2b00 cmp r3, #0
80062a2: d107 bne.n 80062b4 <tcp_slowtmr+0x198>
if (tcp_output(pcb) == ERR_OK) {
80062a4: 6af8 ldr r0, [r7, #44] ; 0x2c
80062a6: f003 fd6f bl 8009d88 <tcp_output>
80062aa: 4603 mov r3, r0
80062ac: 2b00 cmp r3, #0
80062ae: d101 bne.n 80062b4 <tcp_slowtmr+0x198>
/* sending will cancel persist timer, else retry with current slot */
next_slot = 0;
80062b0: 2300 movs r3, #0
80062b2: 623b str r3, [r7, #32]
}
}
}
if (next_slot) {
80062b4: 6a3b ldr r3, [r7, #32]
80062b6: 2b00 cmp r3, #0
80062b8: f000 80ac beq.w 8006414 <tcp_slowtmr+0x2f8>
pcb->persist_cnt = 0;
80062bc: 6afb ldr r3, [r7, #44] ; 0x2c
80062be: 2200 movs r2, #0
80062c0: f883 2098 strb.w r2, [r3, #152] ; 0x98
if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) {
80062c4: 6afb ldr r3, [r7, #44] ; 0x2c
80062c6: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
80062ca: 2b06 cmp r3, #6
80062cc: f200 80a2 bhi.w 8006414 <tcp_slowtmr+0x2f8>
pcb->persist_backoff++;
80062d0: 6afb ldr r3, [r7, #44] ; 0x2c
80062d2: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
80062d6: 3301 adds r3, #1
80062d8: b2da uxtb r2, r3
80062da: 6afb ldr r3, [r7, #44] ; 0x2c
80062dc: f883 2099 strb.w r2, [r3, #153] ; 0x99
80062e0: e098 b.n 8006414 <tcp_slowtmr+0x2f8>
}
}
}
} else {
/* Increase the retransmission timer if it is running */
if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) {
80062e2: 6afb ldr r3, [r7, #44] ; 0x2c
80062e4: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
80062e8: 2b00 cmp r3, #0
80062ea: db0f blt.n 800630c <tcp_slowtmr+0x1f0>
80062ec: 6afb ldr r3, [r7, #44] ; 0x2c
80062ee: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
80062f2: f647 72ff movw r2, #32767 ; 0x7fff
80062f6: 4293 cmp r3, r2
80062f8: d008 beq.n 800630c <tcp_slowtmr+0x1f0>
++pcb->rtime;
80062fa: 6afb ldr r3, [r7, #44] ; 0x2c
80062fc: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8006300: b29b uxth r3, r3
8006302: 3301 adds r3, #1
8006304: b29b uxth r3, r3
8006306: b21a sxth r2, r3
8006308: 6afb ldr r3, [r7, #44] ; 0x2c
800630a: 861a strh r2, [r3, #48] ; 0x30
}
if (pcb->rtime >= pcb->rto) {
800630c: 6afb ldr r3, [r7, #44] ; 0x2c
800630e: f9b3 2030 ldrsh.w r2, [r3, #48] ; 0x30
8006312: 6afb ldr r3, [r7, #44] ; 0x2c
8006314: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
8006318: 429a cmp r2, r3
800631a: db7b blt.n 8006414 <tcp_slowtmr+0x2f8>
" pcb->rto %"S16_F"\n",
pcb->rtime, pcb->rto));
/* If prepare phase fails but we have unsent data but no unacked data,
still execute the backoff calculations below, as this means we somehow
failed to send segment. */
if ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) {
800631c: 6af8 ldr r0, [r7, #44] ; 0x2c
800631e: f004 f825 bl 800a36c <tcp_rexmit_rto_prepare>
8006322: 4603 mov r3, r0
8006324: 2b00 cmp r3, #0
8006326: d007 beq.n 8006338 <tcp_slowtmr+0x21c>
8006328: 6afb ldr r3, [r7, #44] ; 0x2c
800632a: 6f1b ldr r3, [r3, #112] ; 0x70
800632c: 2b00 cmp r3, #0
800632e: d171 bne.n 8006414 <tcp_slowtmr+0x2f8>
8006330: 6afb ldr r3, [r7, #44] ; 0x2c
8006332: 6edb ldr r3, [r3, #108] ; 0x6c
8006334: 2b00 cmp r3, #0
8006336: d06d beq.n 8006414 <tcp_slowtmr+0x2f8>
/* Double retransmission time-out unless we are trying to
* connect to somebody (i.e., we are in SYN_SENT). */
if (pcb->state != SYN_SENT) {
8006338: 6afb ldr r3, [r7, #44] ; 0x2c
800633a: 7d1b ldrb r3, [r3, #20]
800633c: 2b02 cmp r3, #2
800633e: d03a beq.n 80063b6 <tcp_slowtmr+0x29a>
u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1);
8006340: 6afb ldr r3, [r7, #44] ; 0x2c
8006342: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8006346: 2b0c cmp r3, #12
8006348: bf28 it cs
800634a: 230c movcs r3, #12
800634c: 76fb strb r3, [r7, #27]
int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx];
800634e: 6afb ldr r3, [r7, #44] ; 0x2c
8006350: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8006354: 10db asrs r3, r3, #3
8006356: b21b sxth r3, r3
8006358: 461a mov r2, r3
800635a: 6afb ldr r3, [r7, #44] ; 0x2c
800635c: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8006360: 4413 add r3, r2
8006362: 7efa ldrb r2, [r7, #27]
8006364: 4910 ldr r1, [pc, #64] ; (80063a8 <tcp_slowtmr+0x28c>)
8006366: 5c8a ldrb r2, [r1, r2]
8006368: 4093 lsls r3, r2
800636a: 617b str r3, [r7, #20]
pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF);
800636c: 697b ldr r3, [r7, #20]
800636e: f647 72fe movw r2, #32766 ; 0x7ffe
8006372: 4293 cmp r3, r2
8006374: dc1a bgt.n 80063ac <tcp_slowtmr+0x290>
8006376: 697b ldr r3, [r7, #20]
8006378: b21a sxth r2, r3
800637a: e019 b.n 80063b0 <tcp_slowtmr+0x294>
800637c: 20008bac .word 0x20008bac
8006380: 20008bc2 .word 0x20008bc2
8006384: 20008bb8 .word 0x20008bb8
8006388: 080154a4 .word 0x080154a4
800638c: 080157e8 .word 0x080157e8
8006390: 080154e8 .word 0x080154e8
8006394: 08015814 .word 0x08015814
8006398: 08015840 .word 0x08015840
800639c: 08015870 .word 0x08015870
80063a0: 080158a4 .word 0x080158a4
80063a4: 08017884 .word 0x08017884
80063a8: 08017874 .word 0x08017874
80063ac: f647 72ff movw r2, #32767 ; 0x7fff
80063b0: 6afb ldr r3, [r7, #44] ; 0x2c
80063b2: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
}
/* Reset the retransmission timer. */
pcb->rtime = 0;
80063b6: 6afb ldr r3, [r7, #44] ; 0x2c
80063b8: 2200 movs r2, #0
80063ba: 861a strh r2, [r3, #48] ; 0x30
/* Reduce congestion window and ssthresh. */
eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
80063bc: 6afb ldr r3, [r7, #44] ; 0x2c
80063be: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
80063c2: 6afb ldr r3, [r7, #44] ; 0x2c
80063c4: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
80063c8: 4293 cmp r3, r2
80063ca: bf28 it cs
80063cc: 4613 movcs r3, r2
80063ce: 827b strh r3, [r7, #18]
pcb->ssthresh = eff_wnd >> 1;
80063d0: 8a7b ldrh r3, [r7, #18]
80063d2: 085b lsrs r3, r3, #1
80063d4: b29a uxth r2, r3
80063d6: 6afb ldr r3, [r7, #44] ; 0x2c
80063d8: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) {
80063dc: 6afb ldr r3, [r7, #44] ; 0x2c
80063de: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
80063e2: 6afb ldr r3, [r7, #44] ; 0x2c
80063e4: 8e5b ldrh r3, [r3, #50] ; 0x32
80063e6: 005b lsls r3, r3, #1
80063e8: b29b uxth r3, r3
80063ea: 429a cmp r2, r3
80063ec: d206 bcs.n 80063fc <tcp_slowtmr+0x2e0>
pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1);
80063ee: 6afb ldr r3, [r7, #44] ; 0x2c
80063f0: 8e5b ldrh r3, [r3, #50] ; 0x32
80063f2: 005b lsls r3, r3, #1
80063f4: b29a uxth r2, r3
80063f6: 6afb ldr r3, [r7, #44] ; 0x2c
80063f8: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
}
pcb->cwnd = pcb->mss;
80063fc: 6afb ldr r3, [r7, #44] ; 0x2c
80063fe: 8e5a ldrh r2, [r3, #50] ; 0x32
8006400: 6afb ldr r3, [r7, #44] ; 0x2c
8006402: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: cwnd %"TCPWNDSIZE_F
" ssthresh %"TCPWNDSIZE_F"\n",
pcb->cwnd, pcb->ssthresh));
pcb->bytes_acked = 0;
8006406: 6afb ldr r3, [r7, #44] ; 0x2c
8006408: 2200 movs r2, #0
800640a: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
/* The following needs to be called AFTER cwnd is set to one
mss - STJ */
tcp_rexmit_rto_commit(pcb);
800640e: 6af8 ldr r0, [r7, #44] ; 0x2c
8006410: f004 f81c bl 800a44c <tcp_rexmit_rto_commit>
}
}
}
}
/* Check if this PCB has stayed too long in FIN-WAIT-2 */
if (pcb->state == FIN_WAIT_2) {
8006414: 6afb ldr r3, [r7, #44] ; 0x2c
8006416: 7d1b ldrb r3, [r3, #20]
8006418: 2b06 cmp r3, #6
800641a: d111 bne.n 8006440 <tcp_slowtmr+0x324>
/* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */
if (pcb->flags & TF_RXCLOSED) {
800641c: 6afb ldr r3, [r7, #44] ; 0x2c
800641e: 8b5b ldrh r3, [r3, #26]
8006420: f003 0310 and.w r3, r3, #16
8006424: 2b00 cmp r3, #0
8006426: d00b beq.n 8006440 <tcp_slowtmr+0x324>
/* PCB was fully closed (either through close() or SHUT_RDWR):
normal FIN-WAIT timeout handling. */
if ((u32_t)(tcp_ticks - pcb->tmr) >
8006428: 4b9d ldr r3, [pc, #628] ; (80066a0 <tcp_slowtmr+0x584>)
800642a: 681a ldr r2, [r3, #0]
800642c: 6afb ldr r3, [r7, #44] ; 0x2c
800642e: 6a1b ldr r3, [r3, #32]
8006430: 1ad3 subs r3, r2, r3
8006432: 2b28 cmp r3, #40 ; 0x28
8006434: d904 bls.n 8006440 <tcp_slowtmr+0x324>
TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
8006436: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800643a: 3301 adds r3, #1
800643c: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
}
}
/* Check if KEEPALIVE should be sent */
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
8006440: 6afb ldr r3, [r7, #44] ; 0x2c
8006442: 7a5b ldrb r3, [r3, #9]
8006444: f003 0308 and.w r3, r3, #8
8006448: 2b00 cmp r3, #0
800644a: d04c beq.n 80064e6 <tcp_slowtmr+0x3ca>
((pcb->state == ESTABLISHED) ||
800644c: 6afb ldr r3, [r7, #44] ; 0x2c
800644e: 7d1b ldrb r3, [r3, #20]
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
8006450: 2b04 cmp r3, #4
8006452: d003 beq.n 800645c <tcp_slowtmr+0x340>
(pcb->state == CLOSE_WAIT))) {
8006454: 6afb ldr r3, [r7, #44] ; 0x2c
8006456: 7d1b ldrb r3, [r3, #20]
((pcb->state == ESTABLISHED) ||
8006458: 2b07 cmp r3, #7
800645a: d144 bne.n 80064e6 <tcp_slowtmr+0x3ca>
if ((u32_t)(tcp_ticks - pcb->tmr) >
800645c: 4b90 ldr r3, [pc, #576] ; (80066a0 <tcp_slowtmr+0x584>)
800645e: 681a ldr r2, [r3, #0]
8006460: 6afb ldr r3, [r7, #44] ; 0x2c
8006462: 6a1b ldr r3, [r3, #32]
8006464: 1ad2 subs r2, r2, r3
(pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) {
8006466: 6afb ldr r3, [r7, #44] ; 0x2c
8006468: f8d3 3094 ldr.w r3, [r3, #148] ; 0x94
800646c: f503 2324 add.w r3, r3, #671744 ; 0xa4000
8006470: f603 43b8 addw r3, r3, #3256 ; 0xcb8
8006474: 498b ldr r1, [pc, #556] ; (80066a4 <tcp_slowtmr+0x588>)
8006476: fba1 1303 umull r1, r3, r1, r3
800647a: 095b lsrs r3, r3, #5
if ((u32_t)(tcp_ticks - pcb->tmr) >
800647c: 429a cmp r2, r3
800647e: d90a bls.n 8006496 <tcp_slowtmr+0x37a>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: KEEPALIVE timeout. Aborting connection to "));
ip_addr_debug_print_val(TCP_DEBUG, pcb->remote_ip);
LWIP_DEBUGF(TCP_DEBUG, ("\n"));
++pcb_remove;
8006480: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006484: 3301 adds r3, #1
8006486: f887 3027 strb.w r3, [r7, #39] ; 0x27
++pcb_reset;
800648a: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800648e: 3301 adds r3, #1
8006490: f887 3026 strb.w r3, [r7, #38] ; 0x26
8006494: e027 b.n 80064e6 <tcp_slowtmr+0x3ca>
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
8006496: 4b82 ldr r3, [pc, #520] ; (80066a0 <tcp_slowtmr+0x584>)
8006498: 681a ldr r2, [r3, #0]
800649a: 6afb ldr r3, [r7, #44] ; 0x2c
800649c: 6a1b ldr r3, [r3, #32]
800649e: 1ad2 subs r2, r2, r3
(pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb))
80064a0: 6afb ldr r3, [r7, #44] ; 0x2c
80064a2: f8d3 1094 ldr.w r1, [r3, #148] ; 0x94
80064a6: 6afb ldr r3, [r7, #44] ; 0x2c
80064a8: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
80064ac: 4618 mov r0, r3
80064ae: 4b7e ldr r3, [pc, #504] ; (80066a8 <tcp_slowtmr+0x58c>)
80064b0: fb00 f303 mul.w r3, r0, r3
80064b4: 440b add r3, r1
/ TCP_SLOW_INTERVAL) {
80064b6: 497b ldr r1, [pc, #492] ; (80066a4 <tcp_slowtmr+0x588>)
80064b8: fba1 1303 umull r1, r3, r1, r3
80064bc: 095b lsrs r3, r3, #5
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
80064be: 429a cmp r2, r3
80064c0: d911 bls.n 80064e6 <tcp_slowtmr+0x3ca>
err = tcp_keepalive(pcb);
80064c2: 6af8 ldr r0, [r7, #44] ; 0x2c
80064c4: f004 fac8 bl 800aa58 <tcp_keepalive>
80064c8: 4603 mov r3, r0
80064ca: f887 3025 strb.w r3, [r7, #37] ; 0x25
if (err == ERR_OK) {
80064ce: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
80064d2: 2b00 cmp r3, #0
80064d4: d107 bne.n 80064e6 <tcp_slowtmr+0x3ca>
pcb->keep_cnt_sent++;
80064d6: 6afb ldr r3, [r7, #44] ; 0x2c
80064d8: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
80064dc: 3301 adds r3, #1
80064de: b2da uxtb r2, r3
80064e0: 6afb ldr r3, [r7, #44] ; 0x2c
80064e2: f883 209b strb.w r2, [r3, #155] ; 0x9b
/* If this PCB has queued out of sequence data, but has been
inactive for too long, will drop the data (it will eventually
be retransmitted). */
#if TCP_QUEUE_OOSEQ
if (pcb->ooseq != NULL &&
80064e6: 6afb ldr r3, [r7, #44] ; 0x2c
80064e8: 6f5b ldr r3, [r3, #116] ; 0x74
80064ea: 2b00 cmp r3, #0
80064ec: d011 beq.n 8006512 <tcp_slowtmr+0x3f6>
(tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) {
80064ee: 4b6c ldr r3, [pc, #432] ; (80066a0 <tcp_slowtmr+0x584>)
80064f0: 681a ldr r2, [r3, #0]
80064f2: 6afb ldr r3, [r7, #44] ; 0x2c
80064f4: 6a1b ldr r3, [r3, #32]
80064f6: 1ad2 subs r2, r2, r3
80064f8: 6afb ldr r3, [r7, #44] ; 0x2c
80064fa: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
80064fe: 4619 mov r1, r3
8006500: 460b mov r3, r1
8006502: 005b lsls r3, r3, #1
8006504: 440b add r3, r1
8006506: 005b lsls r3, r3, #1
if (pcb->ooseq != NULL &&
8006508: 429a cmp r2, r3
800650a: d302 bcc.n 8006512 <tcp_slowtmr+0x3f6>
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n"));
tcp_free_ooseq(pcb);
800650c: 6af8 ldr r0, [r7, #44] ; 0x2c
800650e: f000 fddb bl 80070c8 <tcp_free_ooseq>
}
#endif /* TCP_QUEUE_OOSEQ */
/* Check if this PCB has stayed too long in SYN-RCVD */
if (pcb->state == SYN_RCVD) {
8006512: 6afb ldr r3, [r7, #44] ; 0x2c
8006514: 7d1b ldrb r3, [r3, #20]
8006516: 2b03 cmp r3, #3
8006518: d10b bne.n 8006532 <tcp_slowtmr+0x416>
if ((u32_t)(tcp_ticks - pcb->tmr) >
800651a: 4b61 ldr r3, [pc, #388] ; (80066a0 <tcp_slowtmr+0x584>)
800651c: 681a ldr r2, [r3, #0]
800651e: 6afb ldr r3, [r7, #44] ; 0x2c
8006520: 6a1b ldr r3, [r3, #32]
8006522: 1ad3 subs r3, r2, r3
8006524: 2b28 cmp r3, #40 ; 0x28
8006526: d904 bls.n 8006532 <tcp_slowtmr+0x416>
TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
8006528: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800652c: 3301 adds r3, #1
800652e: f887 3027 strb.w r3, [r7, #39] ; 0x27
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n"));
}
}
/* Check if this PCB has stayed too long in LAST-ACK */
if (pcb->state == LAST_ACK) {
8006532: 6afb ldr r3, [r7, #44] ; 0x2c
8006534: 7d1b ldrb r3, [r3, #20]
8006536: 2b09 cmp r3, #9
8006538: d10b bne.n 8006552 <tcp_slowtmr+0x436>
if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
800653a: 4b59 ldr r3, [pc, #356] ; (80066a0 <tcp_slowtmr+0x584>)
800653c: 681a ldr r2, [r3, #0]
800653e: 6afb ldr r3, [r7, #44] ; 0x2c
8006540: 6a1b ldr r3, [r3, #32]
8006542: 1ad3 subs r3, r2, r3
8006544: 2bf0 cmp r3, #240 ; 0xf0
8006546: d904 bls.n 8006552 <tcp_slowtmr+0x436>
++pcb_remove;
8006548: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800654c: 3301 adds r3, #1
800654e: f887 3027 strb.w r3, [r7, #39] ; 0x27
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n"));
}
}
/* If the PCB should be removed, do it. */
if (pcb_remove) {
8006552: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006556: 2b00 cmp r3, #0
8006558: d060 beq.n 800661c <tcp_slowtmr+0x500>
struct tcp_pcb *pcb2;
#if LWIP_CALLBACK_API
tcp_err_fn err_fn = pcb->errf;
800655a: 6afb ldr r3, [r7, #44] ; 0x2c
800655c: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8006560: 60fb str r3, [r7, #12]
#endif /* LWIP_CALLBACK_API */
void *err_arg;
enum tcp_state last_state;
tcp_pcb_purge(pcb);
8006562: 6af8 ldr r0, [r7, #44] ; 0x2c
8006564: f000 fbfc bl 8006d60 <tcp_pcb_purge>
/* Remove PCB from tcp_active_pcbs list. */
if (prev != NULL) {
8006568: 6abb ldr r3, [r7, #40] ; 0x28
800656a: 2b00 cmp r3, #0
800656c: d010 beq.n 8006590 <tcp_slowtmr+0x474>
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs);
800656e: 4b4f ldr r3, [pc, #316] ; (80066ac <tcp_slowtmr+0x590>)
8006570: 681b ldr r3, [r3, #0]
8006572: 6afa ldr r2, [r7, #44] ; 0x2c
8006574: 429a cmp r2, r3
8006576: d106 bne.n 8006586 <tcp_slowtmr+0x46a>
8006578: 4b4d ldr r3, [pc, #308] ; (80066b0 <tcp_slowtmr+0x594>)
800657a: f240 526d movw r2, #1389 ; 0x56d
800657e: 494d ldr r1, [pc, #308] ; (80066b4 <tcp_slowtmr+0x598>)
8006580: 484d ldr r0, [pc, #308] ; (80066b8 <tcp_slowtmr+0x59c>)
8006582: f009 fc99 bl 800feb8 <printf>
prev->next = pcb->next;
8006586: 6afb ldr r3, [r7, #44] ; 0x2c
8006588: 68da ldr r2, [r3, #12]
800658a: 6abb ldr r3, [r7, #40] ; 0x28
800658c: 60da str r2, [r3, #12]
800658e: e00f b.n 80065b0 <tcp_slowtmr+0x494>
} else {
/* This PCB was the first. */
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb);
8006590: 4b46 ldr r3, [pc, #280] ; (80066ac <tcp_slowtmr+0x590>)
8006592: 681b ldr r3, [r3, #0]
8006594: 6afa ldr r2, [r7, #44] ; 0x2c
8006596: 429a cmp r2, r3
8006598: d006 beq.n 80065a8 <tcp_slowtmr+0x48c>
800659a: 4b45 ldr r3, [pc, #276] ; (80066b0 <tcp_slowtmr+0x594>)
800659c: f240 5271 movw r2, #1393 ; 0x571
80065a0: 4946 ldr r1, [pc, #280] ; (80066bc <tcp_slowtmr+0x5a0>)
80065a2: 4845 ldr r0, [pc, #276] ; (80066b8 <tcp_slowtmr+0x59c>)
80065a4: f009 fc88 bl 800feb8 <printf>
tcp_active_pcbs = pcb->next;
80065a8: 6afb ldr r3, [r7, #44] ; 0x2c
80065aa: 68db ldr r3, [r3, #12]
80065ac: 4a3f ldr r2, [pc, #252] ; (80066ac <tcp_slowtmr+0x590>)
80065ae: 6013 str r3, [r2, #0]
}
if (pcb_reset) {
80065b0: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
80065b4: 2b00 cmp r3, #0
80065b6: d013 beq.n 80065e0 <tcp_slowtmr+0x4c4>
tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
80065b8: 6afb ldr r3, [r7, #44] ; 0x2c
80065ba: 6d18 ldr r0, [r3, #80] ; 0x50
80065bc: 6afb ldr r3, [r7, #44] ; 0x2c
80065be: 6a5c ldr r4, [r3, #36] ; 0x24
80065c0: 6afd ldr r5, [r7, #44] ; 0x2c
80065c2: 6afb ldr r3, [r7, #44] ; 0x2c
80065c4: 3304 adds r3, #4
80065c6: 6afa ldr r2, [r7, #44] ; 0x2c
80065c8: 8ad2 ldrh r2, [r2, #22]
80065ca: 6af9 ldr r1, [r7, #44] ; 0x2c
80065cc: 8b09 ldrh r1, [r1, #24]
80065ce: 9102 str r1, [sp, #8]
80065d0: 9201 str r2, [sp, #4]
80065d2: 9300 str r3, [sp, #0]
80065d4: 462b mov r3, r5
80065d6: 4622 mov r2, r4
80065d8: 4601 mov r1, r0
80065da: 6af8 ldr r0, [r7, #44] ; 0x2c
80065dc: f004 f988 bl 800a8f0 <tcp_rst>
pcb->local_port, pcb->remote_port);
}
err_arg = pcb->callback_arg;
80065e0: 6afb ldr r3, [r7, #44] ; 0x2c
80065e2: 691b ldr r3, [r3, #16]
80065e4: 60bb str r3, [r7, #8]
last_state = pcb->state;
80065e6: 6afb ldr r3, [r7, #44] ; 0x2c
80065e8: 7d1b ldrb r3, [r3, #20]
80065ea: 71fb strb r3, [r7, #7]
pcb2 = pcb;
80065ec: 6afb ldr r3, [r7, #44] ; 0x2c
80065ee: 603b str r3, [r7, #0]
pcb = pcb->next;
80065f0: 6afb ldr r3, [r7, #44] ; 0x2c
80065f2: 68db ldr r3, [r3, #12]
80065f4: 62fb str r3, [r7, #44] ; 0x2c
tcp_free(pcb2);
80065f6: 6838 ldr r0, [r7, #0]
80065f8: f7ff f9f2 bl 80059e0 <tcp_free>
tcp_active_pcbs_changed = 0;
80065fc: 4b30 ldr r3, [pc, #192] ; (80066c0 <tcp_slowtmr+0x5a4>)
80065fe: 2200 movs r2, #0
8006600: 701a strb r2, [r3, #0]
TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT);
8006602: 68fb ldr r3, [r7, #12]
8006604: 2b00 cmp r3, #0
8006606: d004 beq.n 8006612 <tcp_slowtmr+0x4f6>
8006608: 68fb ldr r3, [r7, #12]
800660a: f06f 010c mvn.w r1, #12
800660e: 68b8 ldr r0, [r7, #8]
8006610: 4798 blx r3
if (tcp_active_pcbs_changed) {
8006612: 4b2b ldr r3, [pc, #172] ; (80066c0 <tcp_slowtmr+0x5a4>)
8006614: 781b ldrb r3, [r3, #0]
8006616: 2b00 cmp r3, #0
8006618: d037 beq.n 800668a <tcp_slowtmr+0x56e>
goto tcp_slowtmr_start;
800661a: e590 b.n 800613e <tcp_slowtmr+0x22>
}
} else {
/* get the 'next' element now and work with 'prev' below (in case of abort) */
prev = pcb;
800661c: 6afb ldr r3, [r7, #44] ; 0x2c
800661e: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
8006620: 6afb ldr r3, [r7, #44] ; 0x2c
8006622: 68db ldr r3, [r3, #12]
8006624: 62fb str r3, [r7, #44] ; 0x2c
/* We check if we should poll the connection. */
++prev->polltmr;
8006626: 6abb ldr r3, [r7, #40] ; 0x28
8006628: 7f1b ldrb r3, [r3, #28]
800662a: 3301 adds r3, #1
800662c: b2da uxtb r2, r3
800662e: 6abb ldr r3, [r7, #40] ; 0x28
8006630: 771a strb r2, [r3, #28]
if (prev->polltmr >= prev->pollinterval) {
8006632: 6abb ldr r3, [r7, #40] ; 0x28
8006634: 7f1a ldrb r2, [r3, #28]
8006636: 6abb ldr r3, [r7, #40] ; 0x28
8006638: 7f5b ldrb r3, [r3, #29]
800663a: 429a cmp r2, r3
800663c: d325 bcc.n 800668a <tcp_slowtmr+0x56e>
prev->polltmr = 0;
800663e: 6abb ldr r3, [r7, #40] ; 0x28
8006640: 2200 movs r2, #0
8006642: 771a strb r2, [r3, #28]
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n"));
tcp_active_pcbs_changed = 0;
8006644: 4b1e ldr r3, [pc, #120] ; (80066c0 <tcp_slowtmr+0x5a4>)
8006646: 2200 movs r2, #0
8006648: 701a strb r2, [r3, #0]
TCP_EVENT_POLL(prev, err);
800664a: 6abb ldr r3, [r7, #40] ; 0x28
800664c: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8006650: 2b00 cmp r3, #0
8006652: d00b beq.n 800666c <tcp_slowtmr+0x550>
8006654: 6abb ldr r3, [r7, #40] ; 0x28
8006656: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
800665a: 6aba ldr r2, [r7, #40] ; 0x28
800665c: 6912 ldr r2, [r2, #16]
800665e: 6ab9 ldr r1, [r7, #40] ; 0x28
8006660: 4610 mov r0, r2
8006662: 4798 blx r3
8006664: 4603 mov r3, r0
8006666: f887 3025 strb.w r3, [r7, #37] ; 0x25
800666a: e002 b.n 8006672 <tcp_slowtmr+0x556>
800666c: 2300 movs r3, #0
800666e: f887 3025 strb.w r3, [r7, #37] ; 0x25
if (tcp_active_pcbs_changed) {
8006672: 4b13 ldr r3, [pc, #76] ; (80066c0 <tcp_slowtmr+0x5a4>)
8006674: 781b ldrb r3, [r3, #0]
8006676: 2b00 cmp r3, #0
8006678: d000 beq.n 800667c <tcp_slowtmr+0x560>
goto tcp_slowtmr_start;
800667a: e560 b.n 800613e <tcp_slowtmr+0x22>
}
/* if err == ERR_ABRT, 'prev' is already deallocated */
if (err == ERR_OK) {
800667c: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
8006680: 2b00 cmp r3, #0
8006682: d102 bne.n 800668a <tcp_slowtmr+0x56e>
tcp_output(prev);
8006684: 6ab8 ldr r0, [r7, #40] ; 0x28
8006686: f003 fb7f bl 8009d88 <tcp_output>
while (pcb != NULL) {
800668a: 6afb ldr r3, [r7, #44] ; 0x2c
800668c: 2b00 cmp r3, #0
800668e: f47f ad5c bne.w 800614a <tcp_slowtmr+0x2e>
}
}
/* Steps through all of the TIME-WAIT PCBs. */
prev = NULL;
8006692: 2300 movs r3, #0
8006694: 62bb str r3, [r7, #40] ; 0x28
pcb = tcp_tw_pcbs;
8006696: 4b0b ldr r3, [pc, #44] ; (80066c4 <tcp_slowtmr+0x5a8>)
8006698: 681b ldr r3, [r3, #0]
800669a: 62fb str r3, [r7, #44] ; 0x2c
while (pcb != NULL) {
800669c: e067 b.n 800676e <tcp_slowtmr+0x652>
800669e: bf00 nop
80066a0: 20008bac .word 0x20008bac
80066a4: 10624dd3 .word 0x10624dd3
80066a8: 000124f8 .word 0x000124f8
80066ac: 20008bb8 .word 0x20008bb8
80066b0: 080154a4 .word 0x080154a4
80066b4: 080158dc .word 0x080158dc
80066b8: 080154e8 .word 0x080154e8
80066bc: 08015908 .word 0x08015908
80066c0: 20008bc0 .word 0x20008bc0
80066c4: 20008bbc .word 0x20008bbc
LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
80066c8: 6afb ldr r3, [r7, #44] ; 0x2c
80066ca: 7d1b ldrb r3, [r3, #20]
80066cc: 2b0a cmp r3, #10
80066ce: d006 beq.n 80066de <tcp_slowtmr+0x5c2>
80066d0: 4b2b ldr r3, [pc, #172] ; (8006780 <tcp_slowtmr+0x664>)
80066d2: f240 52a1 movw r2, #1441 ; 0x5a1
80066d6: 492b ldr r1, [pc, #172] ; (8006784 <tcp_slowtmr+0x668>)
80066d8: 482b ldr r0, [pc, #172] ; (8006788 <tcp_slowtmr+0x66c>)
80066da: f009 fbed bl 800feb8 <printf>
pcb_remove = 0;
80066de: 2300 movs r3, #0
80066e0: f887 3027 strb.w r3, [r7, #39] ; 0x27
/* Check if this PCB has stayed long enough in TIME-WAIT */
if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
80066e4: 4b29 ldr r3, [pc, #164] ; (800678c <tcp_slowtmr+0x670>)
80066e6: 681a ldr r2, [r3, #0]
80066e8: 6afb ldr r3, [r7, #44] ; 0x2c
80066ea: 6a1b ldr r3, [r3, #32]
80066ec: 1ad3 subs r3, r2, r3
80066ee: 2bf0 cmp r3, #240 ; 0xf0
80066f0: d904 bls.n 80066fc <tcp_slowtmr+0x5e0>
++pcb_remove;
80066f2: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80066f6: 3301 adds r3, #1
80066f8: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
/* If the PCB should be removed, do it. */
if (pcb_remove) {
80066fc: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8006700: 2b00 cmp r3, #0
8006702: d02f beq.n 8006764 <tcp_slowtmr+0x648>
struct tcp_pcb *pcb2;
tcp_pcb_purge(pcb);
8006704: 6af8 ldr r0, [r7, #44] ; 0x2c
8006706: f000 fb2b bl 8006d60 <tcp_pcb_purge>
/* Remove PCB from tcp_tw_pcbs list. */
if (prev != NULL) {
800670a: 6abb ldr r3, [r7, #40] ; 0x28
800670c: 2b00 cmp r3, #0
800670e: d010 beq.n 8006732 <tcp_slowtmr+0x616>
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs);
8006710: 4b1f ldr r3, [pc, #124] ; (8006790 <tcp_slowtmr+0x674>)
8006712: 681b ldr r3, [r3, #0]
8006714: 6afa ldr r2, [r7, #44] ; 0x2c
8006716: 429a cmp r2, r3
8006718: d106 bne.n 8006728 <tcp_slowtmr+0x60c>
800671a: 4b19 ldr r3, [pc, #100] ; (8006780 <tcp_slowtmr+0x664>)
800671c: f240 52af movw r2, #1455 ; 0x5af
8006720: 491c ldr r1, [pc, #112] ; (8006794 <tcp_slowtmr+0x678>)
8006722: 4819 ldr r0, [pc, #100] ; (8006788 <tcp_slowtmr+0x66c>)
8006724: f009 fbc8 bl 800feb8 <printf>
prev->next = pcb->next;
8006728: 6afb ldr r3, [r7, #44] ; 0x2c
800672a: 68da ldr r2, [r3, #12]
800672c: 6abb ldr r3, [r7, #40] ; 0x28
800672e: 60da str r2, [r3, #12]
8006730: e00f b.n 8006752 <tcp_slowtmr+0x636>
} else {
/* This PCB was the first. */
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb);
8006732: 4b17 ldr r3, [pc, #92] ; (8006790 <tcp_slowtmr+0x674>)
8006734: 681b ldr r3, [r3, #0]
8006736: 6afa ldr r2, [r7, #44] ; 0x2c
8006738: 429a cmp r2, r3
800673a: d006 beq.n 800674a <tcp_slowtmr+0x62e>
800673c: 4b10 ldr r3, [pc, #64] ; (8006780 <tcp_slowtmr+0x664>)
800673e: f240 52b3 movw r2, #1459 ; 0x5b3
8006742: 4915 ldr r1, [pc, #84] ; (8006798 <tcp_slowtmr+0x67c>)
8006744: 4810 ldr r0, [pc, #64] ; (8006788 <tcp_slowtmr+0x66c>)
8006746: f009 fbb7 bl 800feb8 <printf>
tcp_tw_pcbs = pcb->next;
800674a: 6afb ldr r3, [r7, #44] ; 0x2c
800674c: 68db ldr r3, [r3, #12]
800674e: 4a10 ldr r2, [pc, #64] ; (8006790 <tcp_slowtmr+0x674>)
8006750: 6013 str r3, [r2, #0]
}
pcb2 = pcb;
8006752: 6afb ldr r3, [r7, #44] ; 0x2c
8006754: 61fb str r3, [r7, #28]
pcb = pcb->next;
8006756: 6afb ldr r3, [r7, #44] ; 0x2c
8006758: 68db ldr r3, [r3, #12]
800675a: 62fb str r3, [r7, #44] ; 0x2c
tcp_free(pcb2);
800675c: 69f8 ldr r0, [r7, #28]
800675e: f7ff f93f bl 80059e0 <tcp_free>
8006762: e004 b.n 800676e <tcp_slowtmr+0x652>
} else {
prev = pcb;
8006764: 6afb ldr r3, [r7, #44] ; 0x2c
8006766: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
8006768: 6afb ldr r3, [r7, #44] ; 0x2c
800676a: 68db ldr r3, [r3, #12]
800676c: 62fb str r3, [r7, #44] ; 0x2c
while (pcb != NULL) {
800676e: 6afb ldr r3, [r7, #44] ; 0x2c
8006770: 2b00 cmp r3, #0
8006772: d1a9 bne.n 80066c8 <tcp_slowtmr+0x5ac>
}
}
}
8006774: bf00 nop
8006776: bf00 nop
8006778: 3730 adds r7, #48 ; 0x30
800677a: 46bd mov sp, r7
800677c: bdb0 pop {r4, r5, r7, pc}
800677e: bf00 nop
8006780: 080154a4 .word 0x080154a4
8006784: 08015934 .word 0x08015934
8006788: 080154e8 .word 0x080154e8
800678c: 20008bac .word 0x20008bac
8006790: 20008bbc .word 0x20008bbc
8006794: 08015964 .word 0x08015964
8006798: 0801598c .word 0x0801598c
0800679c <tcp_fasttmr>:
*
* Automatically called from tcp_tmr().
*/
void
tcp_fasttmr(void)
{
800679c: b580 push {r7, lr}
800679e: b082 sub sp, #8
80067a0: af00 add r7, sp, #0
struct tcp_pcb *pcb;
++tcp_timer_ctr;
80067a2: 4b2d ldr r3, [pc, #180] ; (8006858 <tcp_fasttmr+0xbc>)
80067a4: 781b ldrb r3, [r3, #0]
80067a6: 3301 adds r3, #1
80067a8: b2da uxtb r2, r3
80067aa: 4b2b ldr r3, [pc, #172] ; (8006858 <tcp_fasttmr+0xbc>)
80067ac: 701a strb r2, [r3, #0]
tcp_fasttmr_start:
pcb = tcp_active_pcbs;
80067ae: 4b2b ldr r3, [pc, #172] ; (800685c <tcp_fasttmr+0xc0>)
80067b0: 681b ldr r3, [r3, #0]
80067b2: 607b str r3, [r7, #4]
while (pcb != NULL) {
80067b4: e048 b.n 8006848 <tcp_fasttmr+0xac>
if (pcb->last_timer != tcp_timer_ctr) {
80067b6: 687b ldr r3, [r7, #4]
80067b8: 7f9a ldrb r2, [r3, #30]
80067ba: 4b27 ldr r3, [pc, #156] ; (8006858 <tcp_fasttmr+0xbc>)
80067bc: 781b ldrb r3, [r3, #0]
80067be: 429a cmp r2, r3
80067c0: d03f beq.n 8006842 <tcp_fasttmr+0xa6>
struct tcp_pcb *next;
pcb->last_timer = tcp_timer_ctr;
80067c2: 4b25 ldr r3, [pc, #148] ; (8006858 <tcp_fasttmr+0xbc>)
80067c4: 781a ldrb r2, [r3, #0]
80067c6: 687b ldr r3, [r7, #4]
80067c8: 779a strb r2, [r3, #30]
/* send delayed ACKs */
if (pcb->flags & TF_ACK_DELAY) {
80067ca: 687b ldr r3, [r7, #4]
80067cc: 8b5b ldrh r3, [r3, #26]
80067ce: f003 0301 and.w r3, r3, #1
80067d2: 2b00 cmp r3, #0
80067d4: d010 beq.n 80067f8 <tcp_fasttmr+0x5c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n"));
tcp_ack_now(pcb);
80067d6: 687b ldr r3, [r7, #4]
80067d8: 8b5b ldrh r3, [r3, #26]
80067da: f043 0302 orr.w r3, r3, #2
80067de: b29a uxth r2, r3
80067e0: 687b ldr r3, [r7, #4]
80067e2: 835a strh r2, [r3, #26]
tcp_output(pcb);
80067e4: 6878 ldr r0, [r7, #4]
80067e6: f003 facf bl 8009d88 <tcp_output>
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
80067ea: 687b ldr r3, [r7, #4]
80067ec: 8b5b ldrh r3, [r3, #26]
80067ee: f023 0303 bic.w r3, r3, #3
80067f2: b29a uxth r2, r3
80067f4: 687b ldr r3, [r7, #4]
80067f6: 835a strh r2, [r3, #26]
}
/* send pending FIN */
if (pcb->flags & TF_CLOSEPEND) {
80067f8: 687b ldr r3, [r7, #4]
80067fa: 8b5b ldrh r3, [r3, #26]
80067fc: f003 0308 and.w r3, r3, #8
8006800: 2b00 cmp r3, #0
8006802: d009 beq.n 8006818 <tcp_fasttmr+0x7c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n"));
tcp_clear_flags(pcb, TF_CLOSEPEND);
8006804: 687b ldr r3, [r7, #4]
8006806: 8b5b ldrh r3, [r3, #26]
8006808: f023 0308 bic.w r3, r3, #8
800680c: b29a uxth r2, r3
800680e: 687b ldr r3, [r7, #4]
8006810: 835a strh r2, [r3, #26]
tcp_close_shutdown_fin(pcb);
8006812: 6878 ldr r0, [r7, #4]
8006814: f7ff fa78 bl 8005d08 <tcp_close_shutdown_fin>
}
next = pcb->next;
8006818: 687b ldr r3, [r7, #4]
800681a: 68db ldr r3, [r3, #12]
800681c: 603b str r3, [r7, #0]
/* If there is data which was previously "refused" by upper layer */
if (pcb->refused_data != NULL) {
800681e: 687b ldr r3, [r7, #4]
8006820: 6f9b ldr r3, [r3, #120] ; 0x78
8006822: 2b00 cmp r3, #0
8006824: d00a beq.n 800683c <tcp_fasttmr+0xa0>
tcp_active_pcbs_changed = 0;
8006826: 4b0e ldr r3, [pc, #56] ; (8006860 <tcp_fasttmr+0xc4>)
8006828: 2200 movs r2, #0
800682a: 701a strb r2, [r3, #0]
tcp_process_refused_data(pcb);
800682c: 6878 ldr r0, [r7, #4]
800682e: f000 f819 bl 8006864 <tcp_process_refused_data>
if (tcp_active_pcbs_changed) {
8006832: 4b0b ldr r3, [pc, #44] ; (8006860 <tcp_fasttmr+0xc4>)
8006834: 781b ldrb r3, [r3, #0]
8006836: 2b00 cmp r3, #0
8006838: d000 beq.n 800683c <tcp_fasttmr+0xa0>
/* application callback has changed the pcb list: restart the loop */
goto tcp_fasttmr_start;
800683a: e7b8 b.n 80067ae <tcp_fasttmr+0x12>
}
}
pcb = next;
800683c: 683b ldr r3, [r7, #0]
800683e: 607b str r3, [r7, #4]
8006840: e002 b.n 8006848 <tcp_fasttmr+0xac>
} else {
pcb = pcb->next;
8006842: 687b ldr r3, [r7, #4]
8006844: 68db ldr r3, [r3, #12]
8006846: 607b str r3, [r7, #4]
while (pcb != NULL) {
8006848: 687b ldr r3, [r7, #4]
800684a: 2b00 cmp r3, #0
800684c: d1b3 bne.n 80067b6 <tcp_fasttmr+0x1a>
}
}
}
800684e: bf00 nop
8006850: bf00 nop
8006852: 3708 adds r7, #8
8006854: 46bd mov sp, r7
8006856: bd80 pop {r7, pc}
8006858: 20008bc2 .word 0x20008bc2
800685c: 20008bb8 .word 0x20008bb8
8006860: 20008bc0 .word 0x20008bc0
08006864 <tcp_process_refused_data>:
}
/** Pass pcb->refused_data to the recv callback */
err_t
tcp_process_refused_data(struct tcp_pcb *pcb)
{
8006864: b590 push {r4, r7, lr}
8006866: b085 sub sp, #20
8006868: af00 add r7, sp, #0
800686a: 6078 str r0, [r7, #4]
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
struct pbuf *rest;
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG);
800686c: 687b ldr r3, [r7, #4]
800686e: 2b00 cmp r3, #0
8006870: d109 bne.n 8006886 <tcp_process_refused_data+0x22>
8006872: 4b37 ldr r3, [pc, #220] ; (8006950 <tcp_process_refused_data+0xec>)
8006874: f240 6209 movw r2, #1545 ; 0x609
8006878: 4936 ldr r1, [pc, #216] ; (8006954 <tcp_process_refused_data+0xf0>)
800687a: 4837 ldr r0, [pc, #220] ; (8006958 <tcp_process_refused_data+0xf4>)
800687c: f009 fb1c bl 800feb8 <printf>
8006880: f06f 030f mvn.w r3, #15
8006884: e060 b.n 8006948 <tcp_process_refused_data+0xe4>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
while (pcb->refused_data != NULL)
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
{
err_t err;
u8_t refused_flags = pcb->refused_data->flags;
8006886: 687b ldr r3, [r7, #4]
8006888: 6f9b ldr r3, [r3, #120] ; 0x78
800688a: 7b5b ldrb r3, [r3, #13]
800688c: 73bb strb r3, [r7, #14]
/* set pcb->refused_data to NULL in case the callback frees it and then
closes the pcb */
struct pbuf *refused_data = pcb->refused_data;
800688e: 687b ldr r3, [r7, #4]
8006890: 6f9b ldr r3, [r3, #120] ; 0x78
8006892: 60bb str r3, [r7, #8]
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
pbuf_split_64k(refused_data, &rest);
pcb->refused_data = rest;
#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
pcb->refused_data = NULL;
8006894: 687b ldr r3, [r7, #4]
8006896: 2200 movs r2, #0
8006898: 679a str r2, [r3, #120] ; 0x78
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
/* Notify again application with data previously received. */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n"));
TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err);
800689a: 687b ldr r3, [r7, #4]
800689c: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
80068a0: 2b00 cmp r3, #0
80068a2: d00b beq.n 80068bc <tcp_process_refused_data+0x58>
80068a4: 687b ldr r3, [r7, #4]
80068a6: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
80068aa: 687b ldr r3, [r7, #4]
80068ac: 6918 ldr r0, [r3, #16]
80068ae: 2300 movs r3, #0
80068b0: 68ba ldr r2, [r7, #8]
80068b2: 6879 ldr r1, [r7, #4]
80068b4: 47a0 blx r4
80068b6: 4603 mov r3, r0
80068b8: 73fb strb r3, [r7, #15]
80068ba: e007 b.n 80068cc <tcp_process_refused_data+0x68>
80068bc: 2300 movs r3, #0
80068be: 68ba ldr r2, [r7, #8]
80068c0: 6879 ldr r1, [r7, #4]
80068c2: 2000 movs r0, #0
80068c4: f000 f8a4 bl 8006a10 <tcp_recv_null>
80068c8: 4603 mov r3, r0
80068ca: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
80068cc: f997 300f ldrsb.w r3, [r7, #15]
80068d0: 2b00 cmp r3, #0
80068d2: d12a bne.n 800692a <tcp_process_refused_data+0xc6>
/* did refused_data include a FIN? */
if ((refused_flags & PBUF_FLAG_TCP_FIN)
80068d4: 7bbb ldrb r3, [r7, #14]
80068d6: f003 0320 and.w r3, r3, #32
80068da: 2b00 cmp r3, #0
80068dc: d033 beq.n 8006946 <tcp_process_refused_data+0xe2>
&& (rest == NULL)
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
) {
/* correct rcv_wnd as the application won't call tcp_recved()
for the FIN's seqno */
if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) {
80068de: 687b ldr r3, [r7, #4]
80068e0: 8d1b ldrh r3, [r3, #40] ; 0x28
80068e2: f5b3 6f06 cmp.w r3, #2144 ; 0x860
80068e6: d005 beq.n 80068f4 <tcp_process_refused_data+0x90>
pcb->rcv_wnd++;
80068e8: 687b ldr r3, [r7, #4]
80068ea: 8d1b ldrh r3, [r3, #40] ; 0x28
80068ec: 3301 adds r3, #1
80068ee: b29a uxth r2, r3
80068f0: 687b ldr r3, [r7, #4]
80068f2: 851a strh r2, [r3, #40] ; 0x28
}
TCP_EVENT_CLOSED(pcb, err);
80068f4: 687b ldr r3, [r7, #4]
80068f6: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
80068fa: 2b00 cmp r3, #0
80068fc: d00b beq.n 8006916 <tcp_process_refused_data+0xb2>
80068fe: 687b ldr r3, [r7, #4]
8006900: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8006904: 687b ldr r3, [r7, #4]
8006906: 6918 ldr r0, [r3, #16]
8006908: 2300 movs r3, #0
800690a: 2200 movs r2, #0
800690c: 6879 ldr r1, [r7, #4]
800690e: 47a0 blx r4
8006910: 4603 mov r3, r0
8006912: 73fb strb r3, [r7, #15]
8006914: e001 b.n 800691a <tcp_process_refused_data+0xb6>
8006916: 2300 movs r3, #0
8006918: 73fb strb r3, [r7, #15]
if (err == ERR_ABRT) {
800691a: f997 300f ldrsb.w r3, [r7, #15]
800691e: f113 0f0d cmn.w r3, #13
8006922: d110 bne.n 8006946 <tcp_process_refused_data+0xe2>
return ERR_ABRT;
8006924: f06f 030c mvn.w r3, #12
8006928: e00e b.n 8006948 <tcp_process_refused_data+0xe4>
}
}
} else if (err == ERR_ABRT) {
800692a: f997 300f ldrsb.w r3, [r7, #15]
800692e: f113 0f0d cmn.w r3, #13
8006932: d102 bne.n 800693a <tcp_process_refused_data+0xd6>
/* if err == ERR_ABRT, 'pcb' is already deallocated */
/* Drop incoming packets because pcb is "full" (only if the incoming
segment contains data). */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: drop incoming packets, because pcb is \"full\"\n"));
return ERR_ABRT;
8006934: f06f 030c mvn.w r3, #12
8006938: e006 b.n 8006948 <tcp_process_refused_data+0xe4>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
if (rest != NULL) {
pbuf_cat(refused_data, rest);
}
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
pcb->refused_data = refused_data;
800693a: 687b ldr r3, [r7, #4]
800693c: 68ba ldr r2, [r7, #8]
800693e: 679a str r2, [r3, #120] ; 0x78
return ERR_INPROGRESS;
8006940: f06f 0304 mvn.w r3, #4
8006944: e000 b.n 8006948 <tcp_process_refused_data+0xe4>
}
}
return ERR_OK;
8006946: 2300 movs r3, #0
}
8006948: 4618 mov r0, r3
800694a: 3714 adds r7, #20
800694c: 46bd mov sp, r7
800694e: bd90 pop {r4, r7, pc}
8006950: 080154a4 .word 0x080154a4
8006954: 080159b4 .word 0x080159b4
8006958: 080154e8 .word 0x080154e8
0800695c <tcp_segs_free>:
*
* @param seg tcp_seg list of TCP segments to free
*/
void
tcp_segs_free(struct tcp_seg *seg)
{
800695c: b580 push {r7, lr}
800695e: b084 sub sp, #16
8006960: af00 add r7, sp, #0
8006962: 6078 str r0, [r7, #4]
while (seg != NULL) {
8006964: e007 b.n 8006976 <tcp_segs_free+0x1a>
struct tcp_seg *next = seg->next;
8006966: 687b ldr r3, [r7, #4]
8006968: 681b ldr r3, [r3, #0]
800696a: 60fb str r3, [r7, #12]
tcp_seg_free(seg);
800696c: 6878 ldr r0, [r7, #4]
800696e: f000 f80a bl 8006986 <tcp_seg_free>
seg = next;
8006972: 68fb ldr r3, [r7, #12]
8006974: 607b str r3, [r7, #4]
while (seg != NULL) {
8006976: 687b ldr r3, [r7, #4]
8006978: 2b00 cmp r3, #0
800697a: d1f4 bne.n 8006966 <tcp_segs_free+0xa>
}
}
800697c: bf00 nop
800697e: bf00 nop
8006980: 3710 adds r7, #16
8006982: 46bd mov sp, r7
8006984: bd80 pop {r7, pc}
08006986 <tcp_seg_free>:
*
* @param seg single tcp_seg to free
*/
void
tcp_seg_free(struct tcp_seg *seg)
{
8006986: b580 push {r7, lr}
8006988: b082 sub sp, #8
800698a: af00 add r7, sp, #0
800698c: 6078 str r0, [r7, #4]
if (seg != NULL) {
800698e: 687b ldr r3, [r7, #4]
8006990: 2b00 cmp r3, #0
8006992: d00c beq.n 80069ae <tcp_seg_free+0x28>
if (seg->p != NULL) {
8006994: 687b ldr r3, [r7, #4]
8006996: 685b ldr r3, [r3, #4]
8006998: 2b00 cmp r3, #0
800699a: d004 beq.n 80069a6 <tcp_seg_free+0x20>
pbuf_free(seg->p);
800699c: 687b ldr r3, [r7, #4]
800699e: 685b ldr r3, [r3, #4]
80069a0: 4618 mov r0, r3
80069a2: f7fe fd6d bl 8005480 <pbuf_free>
#if TCP_DEBUG
seg->p = NULL;
#endif /* TCP_DEBUG */
}
memp_free(MEMP_TCP_SEG, seg);
80069a6: 6879 ldr r1, [r7, #4]
80069a8: 2003 movs r0, #3
80069aa: f7fd fee7 bl 800477c <memp_free>
}
}
80069ae: bf00 nop
80069b0: 3708 adds r7, #8
80069b2: 46bd mov sp, r7
80069b4: bd80 pop {r7, pc}
...
080069b8 <tcp_seg_copy>:
* @param seg the old tcp_seg
* @return a copy of seg
*/
struct tcp_seg *
tcp_seg_copy(struct tcp_seg *seg)
{
80069b8: b580 push {r7, lr}
80069ba: b084 sub sp, #16
80069bc: af00 add r7, sp, #0
80069be: 6078 str r0, [r7, #4]
struct tcp_seg *cseg;
LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);
80069c0: 687b ldr r3, [r7, #4]
80069c2: 2b00 cmp r3, #0
80069c4: d106 bne.n 80069d4 <tcp_seg_copy+0x1c>
80069c6: 4b0f ldr r3, [pc, #60] ; (8006a04 <tcp_seg_copy+0x4c>)
80069c8: f240 6282 movw r2, #1666 ; 0x682
80069cc: 490e ldr r1, [pc, #56] ; (8006a08 <tcp_seg_copy+0x50>)
80069ce: 480f ldr r0, [pc, #60] ; (8006a0c <tcp_seg_copy+0x54>)
80069d0: f009 fa72 bl 800feb8 <printf>
cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG);
80069d4: 2003 movs r0, #3
80069d6: f7fd fe61 bl 800469c <memp_malloc>
80069da: 60f8 str r0, [r7, #12]
if (cseg == NULL) {
80069dc: 68fb ldr r3, [r7, #12]
80069de: 2b00 cmp r3, #0
80069e0: d101 bne.n 80069e6 <tcp_seg_copy+0x2e>
return NULL;
80069e2: 2300 movs r3, #0
80069e4: e00a b.n 80069fc <tcp_seg_copy+0x44>
}
SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg));
80069e6: 2210 movs r2, #16
80069e8: 6879 ldr r1, [r7, #4]
80069ea: 68f8 ldr r0, [r7, #12]
80069ec: f009 fa34 bl 800fe58 <memcpy>
pbuf_ref(cseg->p);
80069f0: 68fb ldr r3, [r7, #12]
80069f2: 685b ldr r3, [r3, #4]
80069f4: 4618 mov r0, r3
80069f6: f7fe fde3 bl 80055c0 <pbuf_ref>
return cseg;
80069fa: 68fb ldr r3, [r7, #12]
}
80069fc: 4618 mov r0, r3
80069fe: 3710 adds r7, #16
8006a00: 46bd mov sp, r7
8006a02: bd80 pop {r7, pc}
8006a04: 080154a4 .word 0x080154a4
8006a08: 080159f8 .word 0x080159f8
8006a0c: 080154e8 .word 0x080154e8
08006a10 <tcp_recv_null>:
* Default receive callback that is called if the user didn't register
* a recv callback for the pcb.
*/
err_t
tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
{
8006a10: b580 push {r7, lr}
8006a12: b084 sub sp, #16
8006a14: af00 add r7, sp, #0
8006a16: 60f8 str r0, [r7, #12]
8006a18: 60b9 str r1, [r7, #8]
8006a1a: 607a str r2, [r7, #4]
8006a1c: 70fb strb r3, [r7, #3]
LWIP_UNUSED_ARG(arg);
LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);
8006a1e: 68bb ldr r3, [r7, #8]
8006a20: 2b00 cmp r3, #0
8006a22: d109 bne.n 8006a38 <tcp_recv_null+0x28>
8006a24: 4b12 ldr r3, [pc, #72] ; (8006a70 <tcp_recv_null+0x60>)
8006a26: f44f 62d3 mov.w r2, #1688 ; 0x698
8006a2a: 4912 ldr r1, [pc, #72] ; (8006a74 <tcp_recv_null+0x64>)
8006a2c: 4812 ldr r0, [pc, #72] ; (8006a78 <tcp_recv_null+0x68>)
8006a2e: f009 fa43 bl 800feb8 <printf>
8006a32: f06f 030f mvn.w r3, #15
8006a36: e016 b.n 8006a66 <tcp_recv_null+0x56>
if (p != NULL) {
8006a38: 687b ldr r3, [r7, #4]
8006a3a: 2b00 cmp r3, #0
8006a3c: d009 beq.n 8006a52 <tcp_recv_null+0x42>
tcp_recved(pcb, p->tot_len);
8006a3e: 687b ldr r3, [r7, #4]
8006a40: 891b ldrh r3, [r3, #8]
8006a42: 4619 mov r1, r3
8006a44: 68b8 ldr r0, [r7, #8]
8006a46: f7ff fb19 bl 800607c <tcp_recved>
pbuf_free(p);
8006a4a: 6878 ldr r0, [r7, #4]
8006a4c: f7fe fd18 bl 8005480 <pbuf_free>
8006a50: e008 b.n 8006a64 <tcp_recv_null+0x54>
} else if (err == ERR_OK) {
8006a52: f997 3003 ldrsb.w r3, [r7, #3]
8006a56: 2b00 cmp r3, #0
8006a58: d104 bne.n 8006a64 <tcp_recv_null+0x54>
return tcp_close(pcb);
8006a5a: 68b8 ldr r0, [r7, #8]
8006a5c: f7ff f9be bl 8005ddc <tcp_close>
8006a60: 4603 mov r3, r0
8006a62: e000 b.n 8006a66 <tcp_recv_null+0x56>
}
return ERR_OK;
8006a64: 2300 movs r3, #0
}
8006a66: 4618 mov r0, r3
8006a68: 3710 adds r7, #16
8006a6a: 46bd mov sp, r7
8006a6c: bd80 pop {r7, pc}
8006a6e: bf00 nop
8006a70: 080154a4 .word 0x080154a4
8006a74: 08015a14 .word 0x08015a14
8006a78: 080154e8 .word 0x080154e8
08006a7c <tcp_kill_prio>:
*
* @param prio minimum priority
*/
static void
tcp_kill_prio(u8_t prio)
{
8006a7c: b580 push {r7, lr}
8006a7e: b086 sub sp, #24
8006a80: af00 add r7, sp, #0
8006a82: 4603 mov r3, r0
8006a84: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
u8_t mprio;
mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
8006a86: f997 3007 ldrsb.w r3, [r7, #7]
8006a8a: 2b00 cmp r3, #0
8006a8c: db01 blt.n 8006a92 <tcp_kill_prio+0x16>
8006a8e: 79fb ldrb r3, [r7, #7]
8006a90: e000 b.n 8006a94 <tcp_kill_prio+0x18>
8006a92: 237f movs r3, #127 ; 0x7f
8006a94: 72fb strb r3, [r7, #11]
/* We want to kill connections with a lower prio, so bail out if
* supplied prio is 0 - there can never be a lower prio
*/
if (mprio == 0) {
8006a96: 7afb ldrb r3, [r7, #11]
8006a98: 2b00 cmp r3, #0
8006a9a: d034 beq.n 8006b06 <tcp_kill_prio+0x8a>
/* We only want kill connections with a lower prio, so decrement prio by one
* and start searching for oldest connection with same or lower priority than mprio.
* We want to find the connections with the lowest possible prio, and among
* these the one with the longest inactivity time.
*/
mprio--;
8006a9c: 7afb ldrb r3, [r7, #11]
8006a9e: 3b01 subs r3, #1
8006aa0: 72fb strb r3, [r7, #11]
inactivity = 0;
8006aa2: 2300 movs r3, #0
8006aa4: 60fb str r3, [r7, #12]
inactive = NULL;
8006aa6: 2300 movs r3, #0
8006aa8: 613b str r3, [r7, #16]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8006aaa: 4b19 ldr r3, [pc, #100] ; (8006b10 <tcp_kill_prio+0x94>)
8006aac: 681b ldr r3, [r3, #0]
8006aae: 617b str r3, [r7, #20]
8006ab0: e01f b.n 8006af2 <tcp_kill_prio+0x76>
/* lower prio is always a kill candidate */
if ((pcb->prio < mprio) ||
8006ab2: 697b ldr r3, [r7, #20]
8006ab4: 7d5b ldrb r3, [r3, #21]
8006ab6: 7afa ldrb r2, [r7, #11]
8006ab8: 429a cmp r2, r3
8006aba: d80c bhi.n 8006ad6 <tcp_kill_prio+0x5a>
/* longer inactivity is also a kill candidate */
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
8006abc: 697b ldr r3, [r7, #20]
8006abe: 7d5b ldrb r3, [r3, #21]
if ((pcb->prio < mprio) ||
8006ac0: 7afa ldrb r2, [r7, #11]
8006ac2: 429a cmp r2, r3
8006ac4: d112 bne.n 8006aec <tcp_kill_prio+0x70>
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
8006ac6: 4b13 ldr r3, [pc, #76] ; (8006b14 <tcp_kill_prio+0x98>)
8006ac8: 681a ldr r2, [r3, #0]
8006aca: 697b ldr r3, [r7, #20]
8006acc: 6a1b ldr r3, [r3, #32]
8006ace: 1ad3 subs r3, r2, r3
8006ad0: 68fa ldr r2, [r7, #12]
8006ad2: 429a cmp r2, r3
8006ad4: d80a bhi.n 8006aec <tcp_kill_prio+0x70>
inactivity = tcp_ticks - pcb->tmr;
8006ad6: 4b0f ldr r3, [pc, #60] ; (8006b14 <tcp_kill_prio+0x98>)
8006ad8: 681a ldr r2, [r3, #0]
8006ada: 697b ldr r3, [r7, #20]
8006adc: 6a1b ldr r3, [r3, #32]
8006ade: 1ad3 subs r3, r2, r3
8006ae0: 60fb str r3, [r7, #12]
inactive = pcb;
8006ae2: 697b ldr r3, [r7, #20]
8006ae4: 613b str r3, [r7, #16]
mprio = pcb->prio;
8006ae6: 697b ldr r3, [r7, #20]
8006ae8: 7d5b ldrb r3, [r3, #21]
8006aea: 72fb strb r3, [r7, #11]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8006aec: 697b ldr r3, [r7, #20]
8006aee: 68db ldr r3, [r3, #12]
8006af0: 617b str r3, [r7, #20]
8006af2: 697b ldr r3, [r7, #20]
8006af4: 2b00 cmp r3, #0
8006af6: d1dc bne.n 8006ab2 <tcp_kill_prio+0x36>
}
}
if (inactive != NULL) {
8006af8: 693b ldr r3, [r7, #16]
8006afa: 2b00 cmp r3, #0
8006afc: d004 beq.n 8006b08 <tcp_kill_prio+0x8c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n",
(void *)inactive, inactivity));
tcp_abort(inactive);
8006afe: 6938 ldr r0, [r7, #16]
8006b00: f7ff fa56 bl 8005fb0 <tcp_abort>
8006b04: e000 b.n 8006b08 <tcp_kill_prio+0x8c>
return;
8006b06: bf00 nop
}
}
8006b08: 3718 adds r7, #24
8006b0a: 46bd mov sp, r7
8006b0c: bd80 pop {r7, pc}
8006b0e: bf00 nop
8006b10: 20008bb8 .word 0x20008bb8
8006b14: 20008bac .word 0x20008bac
08006b18 <tcp_kill_state>:
* Kills the oldest connection that is in specific state.
* Called from tcp_alloc() for LAST_ACK and CLOSING if no more connections are available.
*/
static void
tcp_kill_state(enum tcp_state state)
{
8006b18: b580 push {r7, lr}
8006b1a: b086 sub sp, #24
8006b1c: af00 add r7, sp, #0
8006b1e: 4603 mov r3, r0
8006b20: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
8006b22: 79fb ldrb r3, [r7, #7]
8006b24: 2b08 cmp r3, #8
8006b26: d009 beq.n 8006b3c <tcp_kill_state+0x24>
8006b28: 79fb ldrb r3, [r7, #7]
8006b2a: 2b09 cmp r3, #9
8006b2c: d006 beq.n 8006b3c <tcp_kill_state+0x24>
8006b2e: 4b1a ldr r3, [pc, #104] ; (8006b98 <tcp_kill_state+0x80>)
8006b30: f240 62dd movw r2, #1757 ; 0x6dd
8006b34: 4919 ldr r1, [pc, #100] ; (8006b9c <tcp_kill_state+0x84>)
8006b36: 481a ldr r0, [pc, #104] ; (8006ba0 <tcp_kill_state+0x88>)
8006b38: f009 f9be bl 800feb8 <printf>
inactivity = 0;
8006b3c: 2300 movs r3, #0
8006b3e: 60fb str r3, [r7, #12]
inactive = NULL;
8006b40: 2300 movs r3, #0
8006b42: 613b str r3, [r7, #16]
/* Go through the list of active pcbs and get the oldest pcb that is in state
CLOSING/LAST_ACK. */
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8006b44: 4b17 ldr r3, [pc, #92] ; (8006ba4 <tcp_kill_state+0x8c>)
8006b46: 681b ldr r3, [r3, #0]
8006b48: 617b str r3, [r7, #20]
8006b4a: e017 b.n 8006b7c <tcp_kill_state+0x64>
if (pcb->state == state) {
8006b4c: 697b ldr r3, [r7, #20]
8006b4e: 7d1b ldrb r3, [r3, #20]
8006b50: 79fa ldrb r2, [r7, #7]
8006b52: 429a cmp r2, r3
8006b54: d10f bne.n 8006b76 <tcp_kill_state+0x5e>
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
8006b56: 4b14 ldr r3, [pc, #80] ; (8006ba8 <tcp_kill_state+0x90>)
8006b58: 681a ldr r2, [r3, #0]
8006b5a: 697b ldr r3, [r7, #20]
8006b5c: 6a1b ldr r3, [r3, #32]
8006b5e: 1ad3 subs r3, r2, r3
8006b60: 68fa ldr r2, [r7, #12]
8006b62: 429a cmp r2, r3
8006b64: d807 bhi.n 8006b76 <tcp_kill_state+0x5e>
inactivity = tcp_ticks - pcb->tmr;
8006b66: 4b10 ldr r3, [pc, #64] ; (8006ba8 <tcp_kill_state+0x90>)
8006b68: 681a ldr r2, [r3, #0]
8006b6a: 697b ldr r3, [r7, #20]
8006b6c: 6a1b ldr r3, [r3, #32]
8006b6e: 1ad3 subs r3, r2, r3
8006b70: 60fb str r3, [r7, #12]
inactive = pcb;
8006b72: 697b ldr r3, [r7, #20]
8006b74: 613b str r3, [r7, #16]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8006b76: 697b ldr r3, [r7, #20]
8006b78: 68db ldr r3, [r3, #12]
8006b7a: 617b str r3, [r7, #20]
8006b7c: 697b ldr r3, [r7, #20]
8006b7e: 2b00 cmp r3, #0
8006b80: d1e4 bne.n 8006b4c <tcp_kill_state+0x34>
}
}
}
if (inactive != NULL) {
8006b82: 693b ldr r3, [r7, #16]
8006b84: 2b00 cmp r3, #0
8006b86: d003 beq.n 8006b90 <tcp_kill_state+0x78>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_closing: killing oldest %s PCB %p (%"S32_F")\n",
tcp_state_str[state], (void *)inactive, inactivity));
/* Don't send a RST, since no data is lost. */
tcp_abandon(inactive, 0);
8006b88: 2100 movs r1, #0
8006b8a: 6938 ldr r0, [r7, #16]
8006b8c: f7ff f952 bl 8005e34 <tcp_abandon>
}
}
8006b90: bf00 nop
8006b92: 3718 adds r7, #24
8006b94: 46bd mov sp, r7
8006b96: bd80 pop {r7, pc}
8006b98: 080154a4 .word 0x080154a4
8006b9c: 08015a30 .word 0x08015a30
8006ba0: 080154e8 .word 0x080154e8
8006ba4: 20008bb8 .word 0x20008bb8
8006ba8: 20008bac .word 0x20008bac
08006bac <tcp_kill_timewait>:
* Kills the oldest connection that is in TIME_WAIT state.
* Called from tcp_alloc() if no more connections are available.
*/
static void
tcp_kill_timewait(void)
{
8006bac: b580 push {r7, lr}
8006bae: b084 sub sp, #16
8006bb0: af00 add r7, sp, #0
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
inactivity = 0;
8006bb2: 2300 movs r3, #0
8006bb4: 607b str r3, [r7, #4]
inactive = NULL;
8006bb6: 2300 movs r3, #0
8006bb8: 60bb str r3, [r7, #8]
/* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
8006bba: 4b12 ldr r3, [pc, #72] ; (8006c04 <tcp_kill_timewait+0x58>)
8006bbc: 681b ldr r3, [r3, #0]
8006bbe: 60fb str r3, [r7, #12]
8006bc0: e012 b.n 8006be8 <tcp_kill_timewait+0x3c>
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
8006bc2: 4b11 ldr r3, [pc, #68] ; (8006c08 <tcp_kill_timewait+0x5c>)
8006bc4: 681a ldr r2, [r3, #0]
8006bc6: 68fb ldr r3, [r7, #12]
8006bc8: 6a1b ldr r3, [r3, #32]
8006bca: 1ad3 subs r3, r2, r3
8006bcc: 687a ldr r2, [r7, #4]
8006bce: 429a cmp r2, r3
8006bd0: d807 bhi.n 8006be2 <tcp_kill_timewait+0x36>
inactivity = tcp_ticks - pcb->tmr;
8006bd2: 4b0d ldr r3, [pc, #52] ; (8006c08 <tcp_kill_timewait+0x5c>)
8006bd4: 681a ldr r2, [r3, #0]
8006bd6: 68fb ldr r3, [r7, #12]
8006bd8: 6a1b ldr r3, [r3, #32]
8006bda: 1ad3 subs r3, r2, r3
8006bdc: 607b str r3, [r7, #4]
inactive = pcb;
8006bde: 68fb ldr r3, [r7, #12]
8006be0: 60bb str r3, [r7, #8]
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
8006be2: 68fb ldr r3, [r7, #12]
8006be4: 68db ldr r3, [r3, #12]
8006be6: 60fb str r3, [r7, #12]
8006be8: 68fb ldr r3, [r7, #12]
8006bea: 2b00 cmp r3, #0
8006bec: d1e9 bne.n 8006bc2 <tcp_kill_timewait+0x16>
}
}
if (inactive != NULL) {
8006bee: 68bb ldr r3, [r7, #8]
8006bf0: 2b00 cmp r3, #0
8006bf2: d002 beq.n 8006bfa <tcp_kill_timewait+0x4e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n",
(void *)inactive, inactivity));
tcp_abort(inactive);
8006bf4: 68b8 ldr r0, [r7, #8]
8006bf6: f7ff f9db bl 8005fb0 <tcp_abort>
}
}
8006bfa: bf00 nop
8006bfc: 3710 adds r7, #16
8006bfe: 46bd mov sp, r7
8006c00: bd80 pop {r7, pc}
8006c02: bf00 nop
8006c04: 20008bbc .word 0x20008bbc
8006c08: 20008bac .word 0x20008bac
08006c0c <tcp_handle_closepend>:
* now send the FIN (which failed before), the pcb might be in a state that is
* OK for us to now free it.
*/
static void
tcp_handle_closepend(void)
{
8006c0c: b580 push {r7, lr}
8006c0e: b082 sub sp, #8
8006c10: af00 add r7, sp, #0
struct tcp_pcb *pcb = tcp_active_pcbs;
8006c12: 4b10 ldr r3, [pc, #64] ; (8006c54 <tcp_handle_closepend+0x48>)
8006c14: 681b ldr r3, [r3, #0]
8006c16: 607b str r3, [r7, #4]
while (pcb != NULL) {
8006c18: e014 b.n 8006c44 <tcp_handle_closepend+0x38>
struct tcp_pcb *next = pcb->next;
8006c1a: 687b ldr r3, [r7, #4]
8006c1c: 68db ldr r3, [r3, #12]
8006c1e: 603b str r3, [r7, #0]
/* send pending FIN */
if (pcb->flags & TF_CLOSEPEND) {
8006c20: 687b ldr r3, [r7, #4]
8006c22: 8b5b ldrh r3, [r3, #26]
8006c24: f003 0308 and.w r3, r3, #8
8006c28: 2b00 cmp r3, #0
8006c2a: d009 beq.n 8006c40 <tcp_handle_closepend+0x34>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n"));
tcp_clear_flags(pcb, TF_CLOSEPEND);
8006c2c: 687b ldr r3, [r7, #4]
8006c2e: 8b5b ldrh r3, [r3, #26]
8006c30: f023 0308 bic.w r3, r3, #8
8006c34: b29a uxth r2, r3
8006c36: 687b ldr r3, [r7, #4]
8006c38: 835a strh r2, [r3, #26]
tcp_close_shutdown_fin(pcb);
8006c3a: 6878 ldr r0, [r7, #4]
8006c3c: f7ff f864 bl 8005d08 <tcp_close_shutdown_fin>
}
pcb = next;
8006c40: 683b ldr r3, [r7, #0]
8006c42: 607b str r3, [r7, #4]
while (pcb != NULL) {
8006c44: 687b ldr r3, [r7, #4]
8006c46: 2b00 cmp r3, #0
8006c48: d1e7 bne.n 8006c1a <tcp_handle_closepend+0xe>
}
}
8006c4a: bf00 nop
8006c4c: bf00 nop
8006c4e: 3708 adds r7, #8
8006c50: 46bd mov sp, r7
8006c52: bd80 pop {r7, pc}
8006c54: 20008bb8 .word 0x20008bb8
08006c58 <tcp_alloc>:
* @param prio priority for the new pcb
* @return a new tcp_pcb that initially is in state CLOSED
*/
struct tcp_pcb *
tcp_alloc(u8_t prio)
{
8006c58: b580 push {r7, lr}
8006c5a: b084 sub sp, #16
8006c5c: af00 add r7, sp, #0
8006c5e: 4603 mov r3, r0
8006c60: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb;
LWIP_ASSERT_CORE_LOCKED();
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8006c62: 2001 movs r0, #1
8006c64: f7fd fd1a bl 800469c <memp_malloc>
8006c68: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8006c6a: 68fb ldr r3, [r7, #12]
8006c6c: 2b00 cmp r3, #0
8006c6e: d126 bne.n 8006cbe <tcp_alloc+0x66>
/* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */
tcp_handle_closepend();
8006c70: f7ff ffcc bl 8006c0c <tcp_handle_closepend>
/* Try killing oldest connection in TIME-WAIT. */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n"));
tcp_kill_timewait();
8006c74: f7ff ff9a bl 8006bac <tcp_kill_timewait>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8006c78: 2001 movs r0, #1
8006c7a: f7fd fd0f bl 800469c <memp_malloc>
8006c7e: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8006c80: 68fb ldr r3, [r7, #12]
8006c82: 2b00 cmp r3, #0
8006c84: d11b bne.n 8006cbe <tcp_alloc+0x66>
/* Try killing oldest connection in LAST-ACK (these wouldn't go to TIME-WAIT). */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest LAST-ACK connection\n"));
tcp_kill_state(LAST_ACK);
8006c86: 2009 movs r0, #9
8006c88: f7ff ff46 bl 8006b18 <tcp_kill_state>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8006c8c: 2001 movs r0, #1
8006c8e: f7fd fd05 bl 800469c <memp_malloc>
8006c92: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8006c94: 68fb ldr r3, [r7, #12]
8006c96: 2b00 cmp r3, #0
8006c98: d111 bne.n 8006cbe <tcp_alloc+0x66>
/* Try killing oldest connection in CLOSING. */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n"));
tcp_kill_state(CLOSING);
8006c9a: 2008 movs r0, #8
8006c9c: f7ff ff3c bl 8006b18 <tcp_kill_state>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8006ca0: 2001 movs r0, #1
8006ca2: f7fd fcfb bl 800469c <memp_malloc>
8006ca6: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8006ca8: 68fb ldr r3, [r7, #12]
8006caa: 2b00 cmp r3, #0
8006cac: d107 bne.n 8006cbe <tcp_alloc+0x66>
/* Try killing oldest active connection with lower priority than the new one. */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing oldest connection with prio lower than %d\n", prio));
tcp_kill_prio(prio);
8006cae: 79fb ldrb r3, [r7, #7]
8006cb0: 4618 mov r0, r3
8006cb2: f7ff fee3 bl 8006a7c <tcp_kill_prio>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8006cb6: 2001 movs r0, #1
8006cb8: f7fd fcf0 bl 800469c <memp_malloc>
8006cbc: 60f8 str r0, [r7, #12]
if (pcb != NULL) {
/* adjust err stats: memp_malloc failed above */
MEMP_STATS_DEC(err, MEMP_TCP_PCB);
}
}
if (pcb != NULL) {
8006cbe: 68fb ldr r3, [r7, #12]
8006cc0: 2b00 cmp r3, #0
8006cc2: d03f beq.n 8006d44 <tcp_alloc+0xec>
/* zero out the whole pcb, so there is no need to initialize members to zero */
memset(pcb, 0, sizeof(struct tcp_pcb));
8006cc4: 229c movs r2, #156 ; 0x9c
8006cc6: 2100 movs r1, #0
8006cc8: 68f8 ldr r0, [r7, #12]
8006cca: f009 f8ed bl 800fea8 <memset>
pcb->prio = prio;
8006cce: 68fb ldr r3, [r7, #12]
8006cd0: 79fa ldrb r2, [r7, #7]
8006cd2: 755a strb r2, [r3, #21]
pcb->snd_buf = TCP_SND_BUF;
8006cd4: 68fb ldr r3, [r7, #12]
8006cd6: f44f 6286 mov.w r2, #1072 ; 0x430
8006cda: f8a3 2064 strh.w r2, [r3, #100] ; 0x64
/* Start with a window that does not need scaling. When window scaling is
enabled and used, the window is enlarged when both sides agree on scaling. */
pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND);
8006cde: 68fb ldr r3, [r7, #12]
8006ce0: f44f 6206 mov.w r2, #2144 ; 0x860
8006ce4: 855a strh r2, [r3, #42] ; 0x2a
8006ce6: 68fb ldr r3, [r7, #12]
8006ce8: 8d5a ldrh r2, [r3, #42] ; 0x2a
8006cea: 68fb ldr r3, [r7, #12]
8006cec: 851a strh r2, [r3, #40] ; 0x28
pcb->ttl = TCP_TTL;
8006cee: 68fb ldr r3, [r7, #12]
8006cf0: 22ff movs r2, #255 ; 0xff
8006cf2: 72da strb r2, [r3, #11]
/* As initial send MSS, we use TCP_MSS but limit it to 536.
The send MSS is updated when an MSS option is received. */
pcb->mss = INITIAL_MSS;
8006cf4: 68fb ldr r3, [r7, #12]
8006cf6: f44f 7206 mov.w r2, #536 ; 0x218
8006cfa: 865a strh r2, [r3, #50] ; 0x32
pcb->rto = 3000 / TCP_SLOW_INTERVAL;
8006cfc: 68fb ldr r3, [r7, #12]
8006cfe: 2206 movs r2, #6
8006d00: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
pcb->sv = 3000 / TCP_SLOW_INTERVAL;
8006d04: 68fb ldr r3, [r7, #12]
8006d06: 2206 movs r2, #6
8006d08: 87da strh r2, [r3, #62] ; 0x3e
pcb->rtime = -1;
8006d0a: 68fb ldr r3, [r7, #12]
8006d0c: f64f 72ff movw r2, #65535 ; 0xffff
8006d10: 861a strh r2, [r3, #48] ; 0x30
pcb->cwnd = 1;
8006d12: 68fb ldr r3, [r7, #12]
8006d14: 2201 movs r2, #1
8006d16: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->tmr = tcp_ticks;
8006d1a: 4b0d ldr r3, [pc, #52] ; (8006d50 <tcp_alloc+0xf8>)
8006d1c: 681a ldr r2, [r3, #0]
8006d1e: 68fb ldr r3, [r7, #12]
8006d20: 621a str r2, [r3, #32]
pcb->last_timer = tcp_timer_ctr;
8006d22: 4b0c ldr r3, [pc, #48] ; (8006d54 <tcp_alloc+0xfc>)
8006d24: 781a ldrb r2, [r3, #0]
8006d26: 68fb ldr r3, [r7, #12]
8006d28: 779a strb r2, [r3, #30]
of using the largest advertised receive window. We've seen complications with
receiving TCPs that use window scaling and/or window auto-tuning where the
initial advertised window is very small and then grows rapidly once the
connection is established. To avoid these complications, we set ssthresh to the
largest effective cwnd (amount of in-flight data) that the sender can have. */
pcb->ssthresh = TCP_SND_BUF;
8006d2a: 68fb ldr r3, [r7, #12]
8006d2c: f44f 6286 mov.w r2, #1072 ; 0x430
8006d30: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
#if LWIP_CALLBACK_API
pcb->recv = tcp_recv_null;
8006d34: 68fb ldr r3, [r7, #12]
8006d36: 4a08 ldr r2, [pc, #32] ; (8006d58 <tcp_alloc+0x100>)
8006d38: f8c3 2084 str.w r2, [r3, #132] ; 0x84
#endif /* LWIP_CALLBACK_API */
/* Init KEEPALIVE timer */
pcb->keep_idle = TCP_KEEPIDLE_DEFAULT;
8006d3c: 68fb ldr r3, [r7, #12]
8006d3e: 4a07 ldr r2, [pc, #28] ; (8006d5c <tcp_alloc+0x104>)
8006d40: f8c3 2094 str.w r2, [r3, #148] ; 0x94
#if LWIP_TCP_KEEPALIVE
pcb->keep_intvl = TCP_KEEPINTVL_DEFAULT;
pcb->keep_cnt = TCP_KEEPCNT_DEFAULT;
#endif /* LWIP_TCP_KEEPALIVE */
}
return pcb;
8006d44: 68fb ldr r3, [r7, #12]
}
8006d46: 4618 mov r0, r3
8006d48: 3710 adds r7, #16
8006d4a: 46bd mov sp, r7
8006d4c: bd80 pop {r7, pc}
8006d4e: bf00 nop
8006d50: 20008bac .word 0x20008bac
8006d54: 20008bc2 .word 0x20008bc2
8006d58: 08006a11 .word 0x08006a11
8006d5c: 006ddd00 .word 0x006ddd00
08006d60 <tcp_pcb_purge>:
*
* @param pcb tcp_pcb to purge. The pcb itself is not deallocated!
*/
void
tcp_pcb_purge(struct tcp_pcb *pcb)
{
8006d60: b580 push {r7, lr}
8006d62: b082 sub sp, #8
8006d64: af00 add r7, sp, #0
8006d66: 6078 str r0, [r7, #4]
LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);
8006d68: 687b ldr r3, [r7, #4]
8006d6a: 2b00 cmp r3, #0
8006d6c: d107 bne.n 8006d7e <tcp_pcb_purge+0x1e>
8006d6e: 4b21 ldr r3, [pc, #132] ; (8006df4 <tcp_pcb_purge+0x94>)
8006d70: f640 0251 movw r2, #2129 ; 0x851
8006d74: 4920 ldr r1, [pc, #128] ; (8006df8 <tcp_pcb_purge+0x98>)
8006d76: 4821 ldr r0, [pc, #132] ; (8006dfc <tcp_pcb_purge+0x9c>)
8006d78: f009 f89e bl 800feb8 <printf>
8006d7c: e037 b.n 8006dee <tcp_pcb_purge+0x8e>
if (pcb->state != CLOSED &&
8006d7e: 687b ldr r3, [r7, #4]
8006d80: 7d1b ldrb r3, [r3, #20]
8006d82: 2b00 cmp r3, #0
8006d84: d033 beq.n 8006dee <tcp_pcb_purge+0x8e>
pcb->state != TIME_WAIT &&
8006d86: 687b ldr r3, [r7, #4]
8006d88: 7d1b ldrb r3, [r3, #20]
if (pcb->state != CLOSED &&
8006d8a: 2b0a cmp r3, #10
8006d8c: d02f beq.n 8006dee <tcp_pcb_purge+0x8e>
pcb->state != LISTEN) {
8006d8e: 687b ldr r3, [r7, #4]
8006d90: 7d1b ldrb r3, [r3, #20]
pcb->state != TIME_WAIT &&
8006d92: 2b01 cmp r3, #1
8006d94: d02b beq.n 8006dee <tcp_pcb_purge+0x8e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n"));
tcp_backlog_accepted(pcb);
if (pcb->refused_data != NULL) {
8006d96: 687b ldr r3, [r7, #4]
8006d98: 6f9b ldr r3, [r3, #120] ; 0x78
8006d9a: 2b00 cmp r3, #0
8006d9c: d007 beq.n 8006dae <tcp_pcb_purge+0x4e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n"));
pbuf_free(pcb->refused_data);
8006d9e: 687b ldr r3, [r7, #4]
8006da0: 6f9b ldr r3, [r3, #120] ; 0x78
8006da2: 4618 mov r0, r3
8006da4: f7fe fb6c bl 8005480 <pbuf_free>
pcb->refused_data = NULL;
8006da8: 687b ldr r3, [r7, #4]
8006daa: 2200 movs r2, #0
8006dac: 679a str r2, [r3, #120] ; 0x78
}
if (pcb->unacked != NULL) {
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->unacked\n"));
}
#if TCP_QUEUE_OOSEQ
if (pcb->ooseq != NULL) {
8006dae: 687b ldr r3, [r7, #4]
8006db0: 6f5b ldr r3, [r3, #116] ; 0x74
8006db2: 2b00 cmp r3, #0
8006db4: d002 beq.n 8006dbc <tcp_pcb_purge+0x5c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n"));
tcp_free_ooseq(pcb);
8006db6: 6878 ldr r0, [r7, #4]
8006db8: f000 f986 bl 80070c8 <tcp_free_ooseq>
}
#endif /* TCP_QUEUE_OOSEQ */
/* Stop the retransmission timer as it will expect data on unacked
queue if it fires */
pcb->rtime = -1;
8006dbc: 687b ldr r3, [r7, #4]
8006dbe: f64f 72ff movw r2, #65535 ; 0xffff
8006dc2: 861a strh r2, [r3, #48] ; 0x30
tcp_segs_free(pcb->unsent);
8006dc4: 687b ldr r3, [r7, #4]
8006dc6: 6edb ldr r3, [r3, #108] ; 0x6c
8006dc8: 4618 mov r0, r3
8006dca: f7ff fdc7 bl 800695c <tcp_segs_free>
tcp_segs_free(pcb->unacked);
8006dce: 687b ldr r3, [r7, #4]
8006dd0: 6f1b ldr r3, [r3, #112] ; 0x70
8006dd2: 4618 mov r0, r3
8006dd4: f7ff fdc2 bl 800695c <tcp_segs_free>
pcb->unacked = pcb->unsent = NULL;
8006dd8: 687b ldr r3, [r7, #4]
8006dda: 2200 movs r2, #0
8006ddc: 66da str r2, [r3, #108] ; 0x6c
8006dde: 687b ldr r3, [r7, #4]
8006de0: 6eda ldr r2, [r3, #108] ; 0x6c
8006de2: 687b ldr r3, [r7, #4]
8006de4: 671a str r2, [r3, #112] ; 0x70
#if TCP_OVERSIZE
pcb->unsent_oversize = 0;
8006de6: 687b ldr r3, [r7, #4]
8006de8: 2200 movs r2, #0
8006dea: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
#endif /* TCP_OVERSIZE */
}
}
8006dee: 3708 adds r7, #8
8006df0: 46bd mov sp, r7
8006df2: bd80 pop {r7, pc}
8006df4: 080154a4 .word 0x080154a4
8006df8: 08015af0 .word 0x08015af0
8006dfc: 080154e8 .word 0x080154e8
08006e00 <tcp_pcb_remove>:
* @param pcblist PCB list to purge.
* @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated!
*/
void
tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb)
{
8006e00: b580 push {r7, lr}
8006e02: b084 sub sp, #16
8006e04: af00 add r7, sp, #0
8006e06: 6078 str r0, [r7, #4]
8006e08: 6039 str r1, [r7, #0]
LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL);
8006e0a: 683b ldr r3, [r7, #0]
8006e0c: 2b00 cmp r3, #0
8006e0e: d106 bne.n 8006e1e <tcp_pcb_remove+0x1e>
8006e10: 4b3e ldr r3, [pc, #248] ; (8006f0c <tcp_pcb_remove+0x10c>)
8006e12: f640 0283 movw r2, #2179 ; 0x883
8006e16: 493e ldr r1, [pc, #248] ; (8006f10 <tcp_pcb_remove+0x110>)
8006e18: 483e ldr r0, [pc, #248] ; (8006f14 <tcp_pcb_remove+0x114>)
8006e1a: f009 f84d bl 800feb8 <printf>
LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL);
8006e1e: 687b ldr r3, [r7, #4]
8006e20: 2b00 cmp r3, #0
8006e22: d106 bne.n 8006e32 <tcp_pcb_remove+0x32>
8006e24: 4b39 ldr r3, [pc, #228] ; (8006f0c <tcp_pcb_remove+0x10c>)
8006e26: f640 0284 movw r2, #2180 ; 0x884
8006e2a: 493b ldr r1, [pc, #236] ; (8006f18 <tcp_pcb_remove+0x118>)
8006e2c: 4839 ldr r0, [pc, #228] ; (8006f14 <tcp_pcb_remove+0x114>)
8006e2e: f009 f843 bl 800feb8 <printf>
TCP_RMV(pcblist, pcb);
8006e32: 687b ldr r3, [r7, #4]
8006e34: 681b ldr r3, [r3, #0]
8006e36: 683a ldr r2, [r7, #0]
8006e38: 429a cmp r2, r3
8006e3a: d105 bne.n 8006e48 <tcp_pcb_remove+0x48>
8006e3c: 687b ldr r3, [r7, #4]
8006e3e: 681b ldr r3, [r3, #0]
8006e40: 68da ldr r2, [r3, #12]
8006e42: 687b ldr r3, [r7, #4]
8006e44: 601a str r2, [r3, #0]
8006e46: e013 b.n 8006e70 <tcp_pcb_remove+0x70>
8006e48: 687b ldr r3, [r7, #4]
8006e4a: 681b ldr r3, [r3, #0]
8006e4c: 60fb str r3, [r7, #12]
8006e4e: e00c b.n 8006e6a <tcp_pcb_remove+0x6a>
8006e50: 68fb ldr r3, [r7, #12]
8006e52: 68db ldr r3, [r3, #12]
8006e54: 683a ldr r2, [r7, #0]
8006e56: 429a cmp r2, r3
8006e58: d104 bne.n 8006e64 <tcp_pcb_remove+0x64>
8006e5a: 683b ldr r3, [r7, #0]
8006e5c: 68da ldr r2, [r3, #12]
8006e5e: 68fb ldr r3, [r7, #12]
8006e60: 60da str r2, [r3, #12]
8006e62: e005 b.n 8006e70 <tcp_pcb_remove+0x70>
8006e64: 68fb ldr r3, [r7, #12]
8006e66: 68db ldr r3, [r3, #12]
8006e68: 60fb str r3, [r7, #12]
8006e6a: 68fb ldr r3, [r7, #12]
8006e6c: 2b00 cmp r3, #0
8006e6e: d1ef bne.n 8006e50 <tcp_pcb_remove+0x50>
8006e70: 683b ldr r3, [r7, #0]
8006e72: 2200 movs r2, #0
8006e74: 60da str r2, [r3, #12]
tcp_pcb_purge(pcb);
8006e76: 6838 ldr r0, [r7, #0]
8006e78: f7ff ff72 bl 8006d60 <tcp_pcb_purge>
/* if there is an outstanding delayed ACKs, send it */
if ((pcb->state != TIME_WAIT) &&
8006e7c: 683b ldr r3, [r7, #0]
8006e7e: 7d1b ldrb r3, [r3, #20]
8006e80: 2b0a cmp r3, #10
8006e82: d013 beq.n 8006eac <tcp_pcb_remove+0xac>
(pcb->state != LISTEN) &&
8006e84: 683b ldr r3, [r7, #0]
8006e86: 7d1b ldrb r3, [r3, #20]
if ((pcb->state != TIME_WAIT) &&
8006e88: 2b01 cmp r3, #1
8006e8a: d00f beq.n 8006eac <tcp_pcb_remove+0xac>
(pcb->flags & TF_ACK_DELAY)) {
8006e8c: 683b ldr r3, [r7, #0]
8006e8e: 8b5b ldrh r3, [r3, #26]
8006e90: f003 0301 and.w r3, r3, #1
(pcb->state != LISTEN) &&
8006e94: 2b00 cmp r3, #0
8006e96: d009 beq.n 8006eac <tcp_pcb_remove+0xac>
tcp_ack_now(pcb);
8006e98: 683b ldr r3, [r7, #0]
8006e9a: 8b5b ldrh r3, [r3, #26]
8006e9c: f043 0302 orr.w r3, r3, #2
8006ea0: b29a uxth r2, r3
8006ea2: 683b ldr r3, [r7, #0]
8006ea4: 835a strh r2, [r3, #26]
tcp_output(pcb);
8006ea6: 6838 ldr r0, [r7, #0]
8006ea8: f002 ff6e bl 8009d88 <tcp_output>
}
if (pcb->state != LISTEN) {
8006eac: 683b ldr r3, [r7, #0]
8006eae: 7d1b ldrb r3, [r3, #20]
8006eb0: 2b01 cmp r3, #1
8006eb2: d020 beq.n 8006ef6 <tcp_pcb_remove+0xf6>
LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL);
8006eb4: 683b ldr r3, [r7, #0]
8006eb6: 6edb ldr r3, [r3, #108] ; 0x6c
8006eb8: 2b00 cmp r3, #0
8006eba: d006 beq.n 8006eca <tcp_pcb_remove+0xca>
8006ebc: 4b13 ldr r3, [pc, #76] ; (8006f0c <tcp_pcb_remove+0x10c>)
8006ebe: f640 0293 movw r2, #2195 ; 0x893
8006ec2: 4916 ldr r1, [pc, #88] ; (8006f1c <tcp_pcb_remove+0x11c>)
8006ec4: 4813 ldr r0, [pc, #76] ; (8006f14 <tcp_pcb_remove+0x114>)
8006ec6: f008 fff7 bl 800feb8 <printf>
LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL);
8006eca: 683b ldr r3, [r7, #0]
8006ecc: 6f1b ldr r3, [r3, #112] ; 0x70
8006ece: 2b00 cmp r3, #0
8006ed0: d006 beq.n 8006ee0 <tcp_pcb_remove+0xe0>
8006ed2: 4b0e ldr r3, [pc, #56] ; (8006f0c <tcp_pcb_remove+0x10c>)
8006ed4: f640 0294 movw r2, #2196 ; 0x894
8006ed8: 4911 ldr r1, [pc, #68] ; (8006f20 <tcp_pcb_remove+0x120>)
8006eda: 480e ldr r0, [pc, #56] ; (8006f14 <tcp_pcb_remove+0x114>)
8006edc: f008 ffec bl 800feb8 <printf>
#if TCP_QUEUE_OOSEQ
LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL);
8006ee0: 683b ldr r3, [r7, #0]
8006ee2: 6f5b ldr r3, [r3, #116] ; 0x74
8006ee4: 2b00 cmp r3, #0
8006ee6: d006 beq.n 8006ef6 <tcp_pcb_remove+0xf6>
8006ee8: 4b08 ldr r3, [pc, #32] ; (8006f0c <tcp_pcb_remove+0x10c>)
8006eea: f640 0296 movw r2, #2198 ; 0x896
8006eee: 490d ldr r1, [pc, #52] ; (8006f24 <tcp_pcb_remove+0x124>)
8006ef0: 4808 ldr r0, [pc, #32] ; (8006f14 <tcp_pcb_remove+0x114>)
8006ef2: f008 ffe1 bl 800feb8 <printf>
#endif /* TCP_QUEUE_OOSEQ */
}
pcb->state = CLOSED;
8006ef6: 683b ldr r3, [r7, #0]
8006ef8: 2200 movs r2, #0
8006efa: 751a strb r2, [r3, #20]
/* reset the local port to prevent the pcb from being 'bound' */
pcb->local_port = 0;
8006efc: 683b ldr r3, [r7, #0]
8006efe: 2200 movs r2, #0
8006f00: 82da strh r2, [r3, #22]
LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane());
}
8006f02: bf00 nop
8006f04: 3710 adds r7, #16
8006f06: 46bd mov sp, r7
8006f08: bd80 pop {r7, pc}
8006f0a: bf00 nop
8006f0c: 080154a4 .word 0x080154a4
8006f10: 08015b0c .word 0x08015b0c
8006f14: 080154e8 .word 0x080154e8
8006f18: 08015b28 .word 0x08015b28
8006f1c: 08015b48 .word 0x08015b48
8006f20: 08015b60 .word 0x08015b60
8006f24: 08015b7c .word 0x08015b7c
08006f28 <tcp_next_iss>:
*
* @return u32_t pseudo random sequence number
*/
u32_t
tcp_next_iss(struct tcp_pcb *pcb)
{
8006f28: b580 push {r7, lr}
8006f2a: b082 sub sp, #8
8006f2c: af00 add r7, sp, #0
8006f2e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
return LWIP_HOOK_TCP_ISN(&pcb->local_ip, pcb->local_port, &pcb->remote_ip, pcb->remote_port);
#else /* LWIP_HOOK_TCP_ISN */
static u32_t iss = 6510;
LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
8006f30: 687b ldr r3, [r7, #4]
8006f32: 2b00 cmp r3, #0
8006f34: d106 bne.n 8006f44 <tcp_next_iss+0x1c>
8006f36: 4b0a ldr r3, [pc, #40] ; (8006f60 <tcp_next_iss+0x38>)
8006f38: f640 02af movw r2, #2223 ; 0x8af
8006f3c: 4909 ldr r1, [pc, #36] ; (8006f64 <tcp_next_iss+0x3c>)
8006f3e: 480a ldr r0, [pc, #40] ; (8006f68 <tcp_next_iss+0x40>)
8006f40: f008 ffba bl 800feb8 <printf>
LWIP_UNUSED_ARG(pcb);
iss += tcp_ticks; /* XXX */
8006f44: 4b09 ldr r3, [pc, #36] ; (8006f6c <tcp_next_iss+0x44>)
8006f46: 681a ldr r2, [r3, #0]
8006f48: 4b09 ldr r3, [pc, #36] ; (8006f70 <tcp_next_iss+0x48>)
8006f4a: 681b ldr r3, [r3, #0]
8006f4c: 4413 add r3, r2
8006f4e: 4a07 ldr r2, [pc, #28] ; (8006f6c <tcp_next_iss+0x44>)
8006f50: 6013 str r3, [r2, #0]
return iss;
8006f52: 4b06 ldr r3, [pc, #24] ; (8006f6c <tcp_next_iss+0x44>)
8006f54: 681b ldr r3, [r3, #0]
#endif /* LWIP_HOOK_TCP_ISN */
}
8006f56: 4618 mov r0, r3
8006f58: 3708 adds r7, #8
8006f5a: 46bd mov sp, r7
8006f5c: bd80 pop {r7, pc}
8006f5e: bf00 nop
8006f60: 080154a4 .word 0x080154a4
8006f64: 08015b94 .word 0x08015b94
8006f68: 080154e8 .word 0x080154e8
8006f6c: 20000024 .word 0x20000024
8006f70: 20008bac .word 0x20008bac
08006f74 <tcp_eff_send_mss_netif>:
* by calculating the minimum of TCP_MSS and the mtu (if set) of the target
* netif (if not NULL).
*/
u16_t
tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest)
{
8006f74: b580 push {r7, lr}
8006f76: b086 sub sp, #24
8006f78: af00 add r7, sp, #0
8006f7a: 4603 mov r3, r0
8006f7c: 60b9 str r1, [r7, #8]
8006f7e: 607a str r2, [r7, #4]
8006f80: 81fb strh r3, [r7, #14]
u16_t mss_s;
u16_t mtu;
LWIP_UNUSED_ARG(dest); /* in case IPv6 is disabled */
LWIP_ASSERT("tcp_eff_send_mss_netif: invalid dst_ip", dest != NULL);
8006f82: 687b ldr r3, [r7, #4]
8006f84: 2b00 cmp r3, #0
8006f86: d106 bne.n 8006f96 <tcp_eff_send_mss_netif+0x22>
8006f88: 4b14 ldr r3, [pc, #80] ; (8006fdc <tcp_eff_send_mss_netif+0x68>)
8006f8a: f640 02c5 movw r2, #2245 ; 0x8c5
8006f8e: 4914 ldr r1, [pc, #80] ; (8006fe0 <tcp_eff_send_mss_netif+0x6c>)
8006f90: 4814 ldr r0, [pc, #80] ; (8006fe4 <tcp_eff_send_mss_netif+0x70>)
8006f92: f008 ff91 bl 800feb8 <printf>
else
#endif /* LWIP_IPV4 */
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
{
if (outif == NULL) {
8006f96: 68bb ldr r3, [r7, #8]
8006f98: 2b00 cmp r3, #0
8006f9a: d101 bne.n 8006fa0 <tcp_eff_send_mss_netif+0x2c>
return sendmss;
8006f9c: 89fb ldrh r3, [r7, #14]
8006f9e: e019 b.n 8006fd4 <tcp_eff_send_mss_netif+0x60>
}
mtu = outif->mtu;
8006fa0: 68bb ldr r3, [r7, #8]
8006fa2: 8d1b ldrh r3, [r3, #40] ; 0x28
8006fa4: 82fb strh r3, [r7, #22]
}
#endif /* LWIP_IPV4 */
if (mtu != 0) {
8006fa6: 8afb ldrh r3, [r7, #22]
8006fa8: 2b00 cmp r3, #0
8006faa: d012 beq.n 8006fd2 <tcp_eff_send_mss_netif+0x5e>
else
#endif /* LWIP_IPV4 */
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
{
offset = IP_HLEN + TCP_HLEN;
8006fac: 2328 movs r3, #40 ; 0x28
8006fae: 82bb strh r3, [r7, #20]
}
#endif /* LWIP_IPV4 */
mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0;
8006fb0: 8afa ldrh r2, [r7, #22]
8006fb2: 8abb ldrh r3, [r7, #20]
8006fb4: 429a cmp r2, r3
8006fb6: d904 bls.n 8006fc2 <tcp_eff_send_mss_netif+0x4e>
8006fb8: 8afa ldrh r2, [r7, #22]
8006fba: 8abb ldrh r3, [r7, #20]
8006fbc: 1ad3 subs r3, r2, r3
8006fbe: b29b uxth r3, r3
8006fc0: e000 b.n 8006fc4 <tcp_eff_send_mss_netif+0x50>
8006fc2: 2300 movs r3, #0
8006fc4: 827b strh r3, [r7, #18]
/* RFC 1122, chap 4.2.2.6:
* Eff.snd.MSS = min(SendMSS+20, MMS_S) - TCPhdrsize - IPoptionsize
* We correct for TCP options in tcp_write(), and don't support IP options.
*/
sendmss = LWIP_MIN(sendmss, mss_s);
8006fc6: 8a7a ldrh r2, [r7, #18]
8006fc8: 89fb ldrh r3, [r7, #14]
8006fca: 4293 cmp r3, r2
8006fcc: bf28 it cs
8006fce: 4613 movcs r3, r2
8006fd0: 81fb strh r3, [r7, #14]
}
return sendmss;
8006fd2: 89fb ldrh r3, [r7, #14]
}
8006fd4: 4618 mov r0, r3
8006fd6: 3718 adds r7, #24
8006fd8: 46bd mov sp, r7
8006fda: bd80 pop {r7, pc}
8006fdc: 080154a4 .word 0x080154a4
8006fe0: 08015bb0 .word 0x08015bb0
8006fe4: 080154e8 .word 0x080154e8
08006fe8 <tcp_netif_ip_addr_changed_pcblist>:
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
/** Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list */
static void
tcp_netif_ip_addr_changed_pcblist(const ip_addr_t *old_addr, struct tcp_pcb *pcb_list)
{
8006fe8: b580 push {r7, lr}
8006fea: b084 sub sp, #16
8006fec: af00 add r7, sp, #0
8006fee: 6078 str r0, [r7, #4]
8006ff0: 6039 str r1, [r7, #0]
struct tcp_pcb *pcb;
pcb = pcb_list;
8006ff2: 683b ldr r3, [r7, #0]
8006ff4: 60fb str r3, [r7, #12]
LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL);
8006ff6: 687b ldr r3, [r7, #4]
8006ff8: 2b00 cmp r3, #0
8006ffa: d119 bne.n 8007030 <tcp_netif_ip_addr_changed_pcblist+0x48>
8006ffc: 4b10 ldr r3, [pc, #64] ; (8007040 <tcp_netif_ip_addr_changed_pcblist+0x58>)
8006ffe: f44f 6210 mov.w r2, #2304 ; 0x900
8007002: 4910 ldr r1, [pc, #64] ; (8007044 <tcp_netif_ip_addr_changed_pcblist+0x5c>)
8007004: 4810 ldr r0, [pc, #64] ; (8007048 <tcp_netif_ip_addr_changed_pcblist+0x60>)
8007006: f008 ff57 bl 800feb8 <printf>
while (pcb != NULL) {
800700a: e011 b.n 8007030 <tcp_netif_ip_addr_changed_pcblist+0x48>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&pcb->local_ip, old_addr)
800700c: 68fb ldr r3, [r7, #12]
800700e: 681a ldr r2, [r3, #0]
8007010: 687b ldr r3, [r7, #4]
8007012: 681b ldr r3, [r3, #0]
8007014: 429a cmp r2, r3
8007016: d108 bne.n 800702a <tcp_netif_ip_addr_changed_pcblist+0x42>
/* connections to link-local addresses must persist (RFC3927 ch. 1.9) */
&& (!IP_IS_V4_VAL(pcb->local_ip) || !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip)))
#endif /* LWIP_AUTOIP */
) {
/* this connection must be aborted */
struct tcp_pcb *next = pcb->next;
8007018: 68fb ldr r3, [r7, #12]
800701a: 68db ldr r3, [r3, #12]
800701c: 60bb str r3, [r7, #8]
LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb));
tcp_abort(pcb);
800701e: 68f8 ldr r0, [r7, #12]
8007020: f7fe ffc6 bl 8005fb0 <tcp_abort>
pcb = next;
8007024: 68bb ldr r3, [r7, #8]
8007026: 60fb str r3, [r7, #12]
8007028: e002 b.n 8007030 <tcp_netif_ip_addr_changed_pcblist+0x48>
} else {
pcb = pcb->next;
800702a: 68fb ldr r3, [r7, #12]
800702c: 68db ldr r3, [r3, #12]
800702e: 60fb str r3, [r7, #12]
while (pcb != NULL) {
8007030: 68fb ldr r3, [r7, #12]
8007032: 2b00 cmp r3, #0
8007034: d1ea bne.n 800700c <tcp_netif_ip_addr_changed_pcblist+0x24>
}
}
}
8007036: bf00 nop
8007038: bf00 nop
800703a: 3710 adds r7, #16
800703c: 46bd mov sp, r7
800703e: bd80 pop {r7, pc}
8007040: 080154a4 .word 0x080154a4
8007044: 08015bd8 .word 0x08015bd8
8007048: 080154e8 .word 0x080154e8
0800704c <tcp_netif_ip_addr_changed>:
* @param old_addr IP address of the netif before change
* @param new_addr IP address of the netif after change or NULL if netif has been removed
*/
void
tcp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
{
800704c: b580 push {r7, lr}
800704e: b084 sub sp, #16
8007050: af00 add r7, sp, #0
8007052: 6078 str r0, [r7, #4]
8007054: 6039 str r1, [r7, #0]
struct tcp_pcb_listen *lpcb;
if (!ip_addr_isany(old_addr)) {
8007056: 687b ldr r3, [r7, #4]
8007058: 2b00 cmp r3, #0
800705a: d02a beq.n 80070b2 <tcp_netif_ip_addr_changed+0x66>
800705c: 687b ldr r3, [r7, #4]
800705e: 681b ldr r3, [r3, #0]
8007060: 2b00 cmp r3, #0
8007062: d026 beq.n 80070b2 <tcp_netif_ip_addr_changed+0x66>
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs);
8007064: 4b15 ldr r3, [pc, #84] ; (80070bc <tcp_netif_ip_addr_changed+0x70>)
8007066: 681b ldr r3, [r3, #0]
8007068: 4619 mov r1, r3
800706a: 6878 ldr r0, [r7, #4]
800706c: f7ff ffbc bl 8006fe8 <tcp_netif_ip_addr_changed_pcblist>
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs);
8007070: 4b13 ldr r3, [pc, #76] ; (80070c0 <tcp_netif_ip_addr_changed+0x74>)
8007072: 681b ldr r3, [r3, #0]
8007074: 4619 mov r1, r3
8007076: 6878 ldr r0, [r7, #4]
8007078: f7ff ffb6 bl 8006fe8 <tcp_netif_ip_addr_changed_pcblist>
if (!ip_addr_isany(new_addr)) {
800707c: 683b ldr r3, [r7, #0]
800707e: 2b00 cmp r3, #0
8007080: d017 beq.n 80070b2 <tcp_netif_ip_addr_changed+0x66>
8007082: 683b ldr r3, [r7, #0]
8007084: 681b ldr r3, [r3, #0]
8007086: 2b00 cmp r3, #0
8007088: d013 beq.n 80070b2 <tcp_netif_ip_addr_changed+0x66>
/* PCB bound to current local interface address? */
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
800708a: 4b0e ldr r3, [pc, #56] ; (80070c4 <tcp_netif_ip_addr_changed+0x78>)
800708c: 681b ldr r3, [r3, #0]
800708e: 60fb str r3, [r7, #12]
8007090: e00c b.n 80070ac <tcp_netif_ip_addr_changed+0x60>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&lpcb->local_ip, old_addr)) {
8007092: 68fb ldr r3, [r7, #12]
8007094: 681a ldr r2, [r3, #0]
8007096: 687b ldr r3, [r7, #4]
8007098: 681b ldr r3, [r3, #0]
800709a: 429a cmp r2, r3
800709c: d103 bne.n 80070a6 <tcp_netif_ip_addr_changed+0x5a>
/* The PCB is listening to the old ipaddr and
* is set to listen to the new one instead */
ip_addr_copy(lpcb->local_ip, *new_addr);
800709e: 683b ldr r3, [r7, #0]
80070a0: 681a ldr r2, [r3, #0]
80070a2: 68fb ldr r3, [r7, #12]
80070a4: 601a str r2, [r3, #0]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
80070a6: 68fb ldr r3, [r7, #12]
80070a8: 68db ldr r3, [r3, #12]
80070aa: 60fb str r3, [r7, #12]
80070ac: 68fb ldr r3, [r7, #12]
80070ae: 2b00 cmp r3, #0
80070b0: d1ef bne.n 8007092 <tcp_netif_ip_addr_changed+0x46>
}
}
}
}
}
80070b2: bf00 nop
80070b4: 3710 adds r7, #16
80070b6: 46bd mov sp, r7
80070b8: bd80 pop {r7, pc}
80070ba: bf00 nop
80070bc: 20008bb8 .word 0x20008bb8
80070c0: 20008bb0 .word 0x20008bb0
80070c4: 20008bb4 .word 0x20008bb4
080070c8 <tcp_free_ooseq>:
#if TCP_QUEUE_OOSEQ
/* Free all ooseq pbufs (and possibly reset SACK state) */
void
tcp_free_ooseq(struct tcp_pcb *pcb)
{
80070c8: b580 push {r7, lr}
80070ca: b082 sub sp, #8
80070cc: af00 add r7, sp, #0
80070ce: 6078 str r0, [r7, #4]
if (pcb->ooseq) {
80070d0: 687b ldr r3, [r7, #4]
80070d2: 6f5b ldr r3, [r3, #116] ; 0x74
80070d4: 2b00 cmp r3, #0
80070d6: d007 beq.n 80070e8 <tcp_free_ooseq+0x20>
tcp_segs_free(pcb->ooseq);
80070d8: 687b ldr r3, [r7, #4]
80070da: 6f5b ldr r3, [r3, #116] ; 0x74
80070dc: 4618 mov r0, r3
80070de: f7ff fc3d bl 800695c <tcp_segs_free>
pcb->ooseq = NULL;
80070e2: 687b ldr r3, [r7, #4]
80070e4: 2200 movs r2, #0
80070e6: 675a str r2, [r3, #116] ; 0x74
#if LWIP_TCP_SACK_OUT
memset(pcb->rcv_sacks, 0, sizeof(pcb->rcv_sacks));
#endif /* LWIP_TCP_SACK_OUT */
}
}
80070e8: bf00 nop
80070ea: 3708 adds r7, #8
80070ec: 46bd mov sp, r7
80070ee: bd80 pop {r7, pc}
080070f0 <tcp_input>:
* @param p received TCP segment to process (p->payload pointing to the TCP header)
* @param inp network interface on which this segment was received
*/
void
tcp_input(struct pbuf *p, struct netif *inp)
{
80070f0: b590 push {r4, r7, lr}
80070f2: b08d sub sp, #52 ; 0x34
80070f4: af04 add r7, sp, #16
80070f6: 6078 str r0, [r7, #4]
80070f8: 6039 str r1, [r7, #0]
u8_t hdrlen_bytes;
err_t err;
LWIP_UNUSED_ARG(inp);
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL);
80070fa: 687b ldr r3, [r7, #4]
80070fc: 2b00 cmp r3, #0
80070fe: d105 bne.n 800710c <tcp_input+0x1c>
8007100: 4b9b ldr r3, [pc, #620] ; (8007370 <tcp_input+0x280>)
8007102: 2283 movs r2, #131 ; 0x83
8007104: 499b ldr r1, [pc, #620] ; (8007374 <tcp_input+0x284>)
8007106: 489c ldr r0, [pc, #624] ; (8007378 <tcp_input+0x288>)
8007108: f008 fed6 bl 800feb8 <printf>
PERF_START;
TCP_STATS_INC(tcp.recv);
MIB2_STATS_INC(mib2.tcpinsegs);
tcphdr = (struct tcp_hdr *)p->payload;
800710c: 687b ldr r3, [r7, #4]
800710e: 685b ldr r3, [r3, #4]
8007110: 4a9a ldr r2, [pc, #616] ; (800737c <tcp_input+0x28c>)
8007112: 6013 str r3, [r2, #0]
#if TCP_INPUT_DEBUG
tcp_debug_print(tcphdr);
#endif
/* Check that TCP header fits in payload */
if (p->len < TCP_HLEN) {
8007114: 687b ldr r3, [r7, #4]
8007116: 895b ldrh r3, [r3, #10]
8007118: 2b13 cmp r3, #19
800711a: f240 83d1 bls.w 80078c0 <tcp_input+0x7d0>
TCP_STATS_INC(tcp.lenerr);
goto dropped;
}
/* Don't even process incoming broadcasts/multicasts. */
if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
800711e: 4b98 ldr r3, [pc, #608] ; (8007380 <tcp_input+0x290>)
8007120: 695b ldr r3, [r3, #20]
8007122: 4a97 ldr r2, [pc, #604] ; (8007380 <tcp_input+0x290>)
8007124: 6812 ldr r2, [r2, #0]
8007126: 4611 mov r1, r2
8007128: 4618 mov r0, r3
800712a: f007 fdcd bl 800ecc8 <ip4_addr_isbroadcast_u32>
800712e: 4603 mov r3, r0
8007130: 2b00 cmp r3, #0
8007132: f040 83c7 bne.w 80078c4 <tcp_input+0x7d4>
ip_addr_ismulticast(ip_current_dest_addr())) {
8007136: 4b92 ldr r3, [pc, #584] ; (8007380 <tcp_input+0x290>)
8007138: 695b ldr r3, [r3, #20]
800713a: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
800713e: 2be0 cmp r3, #224 ; 0xe0
8007140: f000 83c0 beq.w 80078c4 <tcp_input+0x7d4>
}
}
#endif /* CHECKSUM_CHECK_TCP */
/* sanity-check header length */
hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr);
8007144: 4b8d ldr r3, [pc, #564] ; (800737c <tcp_input+0x28c>)
8007146: 681b ldr r3, [r3, #0]
8007148: 899b ldrh r3, [r3, #12]
800714a: b29b uxth r3, r3
800714c: 4618 mov r0, r3
800714e: f7fc fe2d bl 8003dac <lwip_htons>
8007152: 4603 mov r3, r0
8007154: 0b1b lsrs r3, r3, #12
8007156: b29b uxth r3, r3
8007158: b2db uxtb r3, r3
800715a: 009b lsls r3, r3, #2
800715c: 74bb strb r3, [r7, #18]
if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) {
800715e: 7cbb ldrb r3, [r7, #18]
8007160: 2b13 cmp r3, #19
8007162: f240 83b1 bls.w 80078c8 <tcp_input+0x7d8>
8007166: 7cbb ldrb r3, [r7, #18]
8007168: b29a uxth r2, r3
800716a: 687b ldr r3, [r7, #4]
800716c: 891b ldrh r3, [r3, #8]
800716e: 429a cmp r2, r3
8007170: f200 83aa bhi.w 80078c8 <tcp_input+0x7d8>
goto dropped;
}
/* Move the payload pointer in the pbuf so that it points to the
TCP data instead of the TCP header. */
tcphdr_optlen = (u16_t)(hdrlen_bytes - TCP_HLEN);
8007174: 7cbb ldrb r3, [r7, #18]
8007176: b29b uxth r3, r3
8007178: 3b14 subs r3, #20
800717a: b29a uxth r2, r3
800717c: 4b81 ldr r3, [pc, #516] ; (8007384 <tcp_input+0x294>)
800717e: 801a strh r2, [r3, #0]
tcphdr_opt2 = NULL;
8007180: 4b81 ldr r3, [pc, #516] ; (8007388 <tcp_input+0x298>)
8007182: 2200 movs r2, #0
8007184: 601a str r2, [r3, #0]
if (p->len >= hdrlen_bytes) {
8007186: 687b ldr r3, [r7, #4]
8007188: 895a ldrh r2, [r3, #10]
800718a: 7cbb ldrb r3, [r7, #18]
800718c: b29b uxth r3, r3
800718e: 429a cmp r2, r3
8007190: d309 bcc.n 80071a6 <tcp_input+0xb6>
/* all options are in the first pbuf */
tcphdr_opt1len = tcphdr_optlen;
8007192: 4b7c ldr r3, [pc, #496] ; (8007384 <tcp_input+0x294>)
8007194: 881a ldrh r2, [r3, #0]
8007196: 4b7d ldr r3, [pc, #500] ; (800738c <tcp_input+0x29c>)
8007198: 801a strh r2, [r3, #0]
pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */
800719a: 7cbb ldrb r3, [r7, #18]
800719c: 4619 mov r1, r3
800719e: 6878 ldr r0, [r7, #4]
80071a0: f7fe f8e8 bl 8005374 <pbuf_remove_header>
80071a4: e04e b.n 8007244 <tcp_input+0x154>
} else {
u16_t opt2len;
/* TCP header fits into first pbuf, options don't - data is in the next pbuf */
/* there must be a next pbuf, due to hdrlen_bytes sanity check above */
LWIP_ASSERT("p->next != NULL", p->next != NULL);
80071a6: 687b ldr r3, [r7, #4]
80071a8: 681b ldr r3, [r3, #0]
80071aa: 2b00 cmp r3, #0
80071ac: d105 bne.n 80071ba <tcp_input+0xca>
80071ae: 4b70 ldr r3, [pc, #448] ; (8007370 <tcp_input+0x280>)
80071b0: 22c2 movs r2, #194 ; 0xc2
80071b2: 4977 ldr r1, [pc, #476] ; (8007390 <tcp_input+0x2a0>)
80071b4: 4870 ldr r0, [pc, #448] ; (8007378 <tcp_input+0x288>)
80071b6: f008 fe7f bl 800feb8 <printf>
/* advance over the TCP header (cannot fail) */
pbuf_remove_header(p, TCP_HLEN);
80071ba: 2114 movs r1, #20
80071bc: 6878 ldr r0, [r7, #4]
80071be: f7fe f8d9 bl 8005374 <pbuf_remove_header>
/* determine how long the first and second parts of the options are */
tcphdr_opt1len = p->len;
80071c2: 687b ldr r3, [r7, #4]
80071c4: 895a ldrh r2, [r3, #10]
80071c6: 4b71 ldr r3, [pc, #452] ; (800738c <tcp_input+0x29c>)
80071c8: 801a strh r2, [r3, #0]
opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len);
80071ca: 4b6e ldr r3, [pc, #440] ; (8007384 <tcp_input+0x294>)
80071cc: 881a ldrh r2, [r3, #0]
80071ce: 4b6f ldr r3, [pc, #444] ; (800738c <tcp_input+0x29c>)
80071d0: 881b ldrh r3, [r3, #0]
80071d2: 1ad3 subs r3, r2, r3
80071d4: 823b strh r3, [r7, #16]
/* options continue in the next pbuf: set p to zero length and hide the
options in the next pbuf (adjusting p->tot_len) */
pbuf_remove_header(p, tcphdr_opt1len);
80071d6: 4b6d ldr r3, [pc, #436] ; (800738c <tcp_input+0x29c>)
80071d8: 881b ldrh r3, [r3, #0]
80071da: 4619 mov r1, r3
80071dc: 6878 ldr r0, [r7, #4]
80071de: f7fe f8c9 bl 8005374 <pbuf_remove_header>
/* check that the options fit in the second pbuf */
if (opt2len > p->next->len) {
80071e2: 687b ldr r3, [r7, #4]
80071e4: 681b ldr r3, [r3, #0]
80071e6: 895b ldrh r3, [r3, #10]
80071e8: 8a3a ldrh r2, [r7, #16]
80071ea: 429a cmp r2, r3
80071ec: f200 836e bhi.w 80078cc <tcp_input+0x7dc>
TCP_STATS_INC(tcp.lenerr);
goto dropped;
}
/* remember the pointer to the second part of the options */
tcphdr_opt2 = (u8_t *)p->next->payload;
80071f0: 687b ldr r3, [r7, #4]
80071f2: 681b ldr r3, [r3, #0]
80071f4: 685b ldr r3, [r3, #4]
80071f6: 4a64 ldr r2, [pc, #400] ; (8007388 <tcp_input+0x298>)
80071f8: 6013 str r3, [r2, #0]
/* advance p->next to point after the options, and manually
adjust p->tot_len to keep it consistent with the changed p->next */
pbuf_remove_header(p->next, opt2len);
80071fa: 687b ldr r3, [r7, #4]
80071fc: 681b ldr r3, [r3, #0]
80071fe: 8a3a ldrh r2, [r7, #16]
8007200: 4611 mov r1, r2
8007202: 4618 mov r0, r3
8007204: f7fe f8b6 bl 8005374 <pbuf_remove_header>
p->tot_len = (u16_t)(p->tot_len - opt2len);
8007208: 687b ldr r3, [r7, #4]
800720a: 891a ldrh r2, [r3, #8]
800720c: 8a3b ldrh r3, [r7, #16]
800720e: 1ad3 subs r3, r2, r3
8007210: b29a uxth r2, r3
8007212: 687b ldr r3, [r7, #4]
8007214: 811a strh r2, [r3, #8]
LWIP_ASSERT("p->len == 0", p->len == 0);
8007216: 687b ldr r3, [r7, #4]
8007218: 895b ldrh r3, [r3, #10]
800721a: 2b00 cmp r3, #0
800721c: d005 beq.n 800722a <tcp_input+0x13a>
800721e: 4b54 ldr r3, [pc, #336] ; (8007370 <tcp_input+0x280>)
8007220: 22df movs r2, #223 ; 0xdf
8007222: 495c ldr r1, [pc, #368] ; (8007394 <tcp_input+0x2a4>)
8007224: 4854 ldr r0, [pc, #336] ; (8007378 <tcp_input+0x288>)
8007226: f008 fe47 bl 800feb8 <printf>
LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len);
800722a: 687b ldr r3, [r7, #4]
800722c: 891a ldrh r2, [r3, #8]
800722e: 687b ldr r3, [r7, #4]
8007230: 681b ldr r3, [r3, #0]
8007232: 891b ldrh r3, [r3, #8]
8007234: 429a cmp r2, r3
8007236: d005 beq.n 8007244 <tcp_input+0x154>
8007238: 4b4d ldr r3, [pc, #308] ; (8007370 <tcp_input+0x280>)
800723a: 22e0 movs r2, #224 ; 0xe0
800723c: 4956 ldr r1, [pc, #344] ; (8007398 <tcp_input+0x2a8>)
800723e: 484e ldr r0, [pc, #312] ; (8007378 <tcp_input+0x288>)
8007240: f008 fe3a bl 800feb8 <printf>
}
/* Convert fields in TCP header to host byte order. */
tcphdr->src = lwip_ntohs(tcphdr->src);
8007244: 4b4d ldr r3, [pc, #308] ; (800737c <tcp_input+0x28c>)
8007246: 681b ldr r3, [r3, #0]
8007248: 881b ldrh r3, [r3, #0]
800724a: b29b uxth r3, r3
800724c: 4a4b ldr r2, [pc, #300] ; (800737c <tcp_input+0x28c>)
800724e: 6814 ldr r4, [r2, #0]
8007250: 4618 mov r0, r3
8007252: f7fc fdab bl 8003dac <lwip_htons>
8007256: 4603 mov r3, r0
8007258: 8023 strh r3, [r4, #0]
tcphdr->dest = lwip_ntohs(tcphdr->dest);
800725a: 4b48 ldr r3, [pc, #288] ; (800737c <tcp_input+0x28c>)
800725c: 681b ldr r3, [r3, #0]
800725e: 885b ldrh r3, [r3, #2]
8007260: b29b uxth r3, r3
8007262: 4a46 ldr r2, [pc, #280] ; (800737c <tcp_input+0x28c>)
8007264: 6814 ldr r4, [r2, #0]
8007266: 4618 mov r0, r3
8007268: f7fc fda0 bl 8003dac <lwip_htons>
800726c: 4603 mov r3, r0
800726e: 8063 strh r3, [r4, #2]
seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno);
8007270: 4b42 ldr r3, [pc, #264] ; (800737c <tcp_input+0x28c>)
8007272: 681b ldr r3, [r3, #0]
8007274: 685b ldr r3, [r3, #4]
8007276: 4a41 ldr r2, [pc, #260] ; (800737c <tcp_input+0x28c>)
8007278: 6814 ldr r4, [r2, #0]
800727a: 4618 mov r0, r3
800727c: f7fc fdab bl 8003dd6 <lwip_htonl>
8007280: 4603 mov r3, r0
8007282: 6063 str r3, [r4, #4]
8007284: 6863 ldr r3, [r4, #4]
8007286: 4a45 ldr r2, [pc, #276] ; (800739c <tcp_input+0x2ac>)
8007288: 6013 str r3, [r2, #0]
ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno);
800728a: 4b3c ldr r3, [pc, #240] ; (800737c <tcp_input+0x28c>)
800728c: 681b ldr r3, [r3, #0]
800728e: 689b ldr r3, [r3, #8]
8007290: 4a3a ldr r2, [pc, #232] ; (800737c <tcp_input+0x28c>)
8007292: 6814 ldr r4, [r2, #0]
8007294: 4618 mov r0, r3
8007296: f7fc fd9e bl 8003dd6 <lwip_htonl>
800729a: 4603 mov r3, r0
800729c: 60a3 str r3, [r4, #8]
800729e: 68a3 ldr r3, [r4, #8]
80072a0: 4a3f ldr r2, [pc, #252] ; (80073a0 <tcp_input+0x2b0>)
80072a2: 6013 str r3, [r2, #0]
tcphdr->wnd = lwip_ntohs(tcphdr->wnd);
80072a4: 4b35 ldr r3, [pc, #212] ; (800737c <tcp_input+0x28c>)
80072a6: 681b ldr r3, [r3, #0]
80072a8: 89db ldrh r3, [r3, #14]
80072aa: b29b uxth r3, r3
80072ac: 4a33 ldr r2, [pc, #204] ; (800737c <tcp_input+0x28c>)
80072ae: 6814 ldr r4, [r2, #0]
80072b0: 4618 mov r0, r3
80072b2: f7fc fd7b bl 8003dac <lwip_htons>
80072b6: 4603 mov r3, r0
80072b8: 81e3 strh r3, [r4, #14]
flags = TCPH_FLAGS(tcphdr);
80072ba: 4b30 ldr r3, [pc, #192] ; (800737c <tcp_input+0x28c>)
80072bc: 681b ldr r3, [r3, #0]
80072be: 899b ldrh r3, [r3, #12]
80072c0: b29b uxth r3, r3
80072c2: 4618 mov r0, r3
80072c4: f7fc fd72 bl 8003dac <lwip_htons>
80072c8: 4603 mov r3, r0
80072ca: b2db uxtb r3, r3
80072cc: f003 033f and.w r3, r3, #63 ; 0x3f
80072d0: b2da uxtb r2, r3
80072d2: 4b34 ldr r3, [pc, #208] ; (80073a4 <tcp_input+0x2b4>)
80072d4: 701a strb r2, [r3, #0]
tcplen = p->tot_len;
80072d6: 687b ldr r3, [r7, #4]
80072d8: 891a ldrh r2, [r3, #8]
80072da: 4b33 ldr r3, [pc, #204] ; (80073a8 <tcp_input+0x2b8>)
80072dc: 801a strh r2, [r3, #0]
if (flags & (TCP_FIN | TCP_SYN)) {
80072de: 4b31 ldr r3, [pc, #196] ; (80073a4 <tcp_input+0x2b4>)
80072e0: 781b ldrb r3, [r3, #0]
80072e2: f003 0303 and.w r3, r3, #3
80072e6: 2b00 cmp r3, #0
80072e8: d00c beq.n 8007304 <tcp_input+0x214>
tcplen++;
80072ea: 4b2f ldr r3, [pc, #188] ; (80073a8 <tcp_input+0x2b8>)
80072ec: 881b ldrh r3, [r3, #0]
80072ee: 3301 adds r3, #1
80072f0: b29a uxth r2, r3
80072f2: 4b2d ldr r3, [pc, #180] ; (80073a8 <tcp_input+0x2b8>)
80072f4: 801a strh r2, [r3, #0]
if (tcplen < p->tot_len) {
80072f6: 687b ldr r3, [r7, #4]
80072f8: 891a ldrh r2, [r3, #8]
80072fa: 4b2b ldr r3, [pc, #172] ; (80073a8 <tcp_input+0x2b8>)
80072fc: 881b ldrh r3, [r3, #0]
80072fe: 429a cmp r2, r3
8007300: f200 82e6 bhi.w 80078d0 <tcp_input+0x7e0>
}
}
/* Demultiplex an incoming segment. First, we check if it is destined
for an active connection. */
prev = NULL;
8007304: 2300 movs r3, #0
8007306: 61bb str r3, [r7, #24]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8007308: 4b28 ldr r3, [pc, #160] ; (80073ac <tcp_input+0x2bc>)
800730a: 681b ldr r3, [r3, #0]
800730c: 61fb str r3, [r7, #28]
800730e: e09d b.n 800744c <tcp_input+0x35c>
LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED);
8007310: 69fb ldr r3, [r7, #28]
8007312: 7d1b ldrb r3, [r3, #20]
8007314: 2b00 cmp r3, #0
8007316: d105 bne.n 8007324 <tcp_input+0x234>
8007318: 4b15 ldr r3, [pc, #84] ; (8007370 <tcp_input+0x280>)
800731a: 22fb movs r2, #251 ; 0xfb
800731c: 4924 ldr r1, [pc, #144] ; (80073b0 <tcp_input+0x2c0>)
800731e: 4816 ldr r0, [pc, #88] ; (8007378 <tcp_input+0x288>)
8007320: f008 fdca bl 800feb8 <printf>
LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
8007324: 69fb ldr r3, [r7, #28]
8007326: 7d1b ldrb r3, [r3, #20]
8007328: 2b0a cmp r3, #10
800732a: d105 bne.n 8007338 <tcp_input+0x248>
800732c: 4b10 ldr r3, [pc, #64] ; (8007370 <tcp_input+0x280>)
800732e: 22fc movs r2, #252 ; 0xfc
8007330: 4920 ldr r1, [pc, #128] ; (80073b4 <tcp_input+0x2c4>)
8007332: 4811 ldr r0, [pc, #68] ; (8007378 <tcp_input+0x288>)
8007334: f008 fdc0 bl 800feb8 <printf>
LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN);
8007338: 69fb ldr r3, [r7, #28]
800733a: 7d1b ldrb r3, [r3, #20]
800733c: 2b01 cmp r3, #1
800733e: d105 bne.n 800734c <tcp_input+0x25c>
8007340: 4b0b ldr r3, [pc, #44] ; (8007370 <tcp_input+0x280>)
8007342: 22fd movs r2, #253 ; 0xfd
8007344: 491c ldr r1, [pc, #112] ; (80073b8 <tcp_input+0x2c8>)
8007346: 480c ldr r0, [pc, #48] ; (8007378 <tcp_input+0x288>)
8007348: f008 fdb6 bl 800feb8 <printf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
800734c: 69fb ldr r3, [r7, #28]
800734e: 7a1b ldrb r3, [r3, #8]
8007350: 2b00 cmp r3, #0
8007352: d033 beq.n 80073bc <tcp_input+0x2cc>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
8007354: 69fb ldr r3, [r7, #28]
8007356: 7a1a ldrb r2, [r3, #8]
8007358: 4b09 ldr r3, [pc, #36] ; (8007380 <tcp_input+0x290>)
800735a: 685b ldr r3, [r3, #4]
800735c: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8007360: 3301 adds r3, #1
8007362: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8007364: 429a cmp r2, r3
8007366: d029 beq.n 80073bc <tcp_input+0x2cc>
prev = pcb;
8007368: 69fb ldr r3, [r7, #28]
800736a: 61bb str r3, [r7, #24]
continue;
800736c: e06b b.n 8007446 <tcp_input+0x356>
800736e: bf00 nop
8007370: 08015c0c .word 0x08015c0c
8007374: 08015c40 .word 0x08015c40
8007378: 08015c58 .word 0x08015c58
800737c: 20008bd4 .word 0x20008bd4
8007380: 2000561c .word 0x2000561c
8007384: 20008bd8 .word 0x20008bd8
8007388: 20008bdc .word 0x20008bdc
800738c: 20008bda .word 0x20008bda
8007390: 08015c80 .word 0x08015c80
8007394: 08015c90 .word 0x08015c90
8007398: 08015c9c .word 0x08015c9c
800739c: 20008be4 .word 0x20008be4
80073a0: 20008be8 .word 0x20008be8
80073a4: 20008bf0 .word 0x20008bf0
80073a8: 20008bee .word 0x20008bee
80073ac: 20008bb8 .word 0x20008bb8
80073b0: 08015cbc .word 0x08015cbc
80073b4: 08015ce4 .word 0x08015ce4
80073b8: 08015d10 .word 0x08015d10
}
if (pcb->remote_port == tcphdr->src &&
80073bc: 69fb ldr r3, [r7, #28]
80073be: 8b1a ldrh r2, [r3, #24]
80073c0: 4b72 ldr r3, [pc, #456] ; (800758c <tcp_input+0x49c>)
80073c2: 681b ldr r3, [r3, #0]
80073c4: 881b ldrh r3, [r3, #0]
80073c6: b29b uxth r3, r3
80073c8: 429a cmp r2, r3
80073ca: d13a bne.n 8007442 <tcp_input+0x352>
pcb->local_port == tcphdr->dest &&
80073cc: 69fb ldr r3, [r7, #28]
80073ce: 8ada ldrh r2, [r3, #22]
80073d0: 4b6e ldr r3, [pc, #440] ; (800758c <tcp_input+0x49c>)
80073d2: 681b ldr r3, [r3, #0]
80073d4: 885b ldrh r3, [r3, #2]
80073d6: b29b uxth r3, r3
if (pcb->remote_port == tcphdr->src &&
80073d8: 429a cmp r2, r3
80073da: d132 bne.n 8007442 <tcp_input+0x352>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80073dc: 69fb ldr r3, [r7, #28]
80073de: 685a ldr r2, [r3, #4]
80073e0: 4b6b ldr r3, [pc, #428] ; (8007590 <tcp_input+0x4a0>)
80073e2: 691b ldr r3, [r3, #16]
pcb->local_port == tcphdr->dest &&
80073e4: 429a cmp r2, r3
80073e6: d12c bne.n 8007442 <tcp_input+0x352>
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
80073e8: 69fb ldr r3, [r7, #28]
80073ea: 681a ldr r2, [r3, #0]
80073ec: 4b68 ldr r3, [pc, #416] ; (8007590 <tcp_input+0x4a0>)
80073ee: 695b ldr r3, [r3, #20]
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80073f0: 429a cmp r2, r3
80073f2: d126 bne.n 8007442 <tcp_input+0x352>
/* Move this PCB to the front of the list so that subsequent
lookups will be faster (we exploit locality in TCP segment
arrivals). */
LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb);
80073f4: 69fb ldr r3, [r7, #28]
80073f6: 68db ldr r3, [r3, #12]
80073f8: 69fa ldr r2, [r7, #28]
80073fa: 429a cmp r2, r3
80073fc: d106 bne.n 800740c <tcp_input+0x31c>
80073fe: 4b65 ldr r3, [pc, #404] ; (8007594 <tcp_input+0x4a4>)
8007400: f240 120d movw r2, #269 ; 0x10d
8007404: 4964 ldr r1, [pc, #400] ; (8007598 <tcp_input+0x4a8>)
8007406: 4865 ldr r0, [pc, #404] ; (800759c <tcp_input+0x4ac>)
8007408: f008 fd56 bl 800feb8 <printf>
if (prev != NULL) {
800740c: 69bb ldr r3, [r7, #24]
800740e: 2b00 cmp r3, #0
8007410: d00a beq.n 8007428 <tcp_input+0x338>
prev->next = pcb->next;
8007412: 69fb ldr r3, [r7, #28]
8007414: 68da ldr r2, [r3, #12]
8007416: 69bb ldr r3, [r7, #24]
8007418: 60da str r2, [r3, #12]
pcb->next = tcp_active_pcbs;
800741a: 4b61 ldr r3, [pc, #388] ; (80075a0 <tcp_input+0x4b0>)
800741c: 681a ldr r2, [r3, #0]
800741e: 69fb ldr r3, [r7, #28]
8007420: 60da str r2, [r3, #12]
tcp_active_pcbs = pcb;
8007422: 4a5f ldr r2, [pc, #380] ; (80075a0 <tcp_input+0x4b0>)
8007424: 69fb ldr r3, [r7, #28]
8007426: 6013 str r3, [r2, #0]
} else {
TCP_STATS_INC(tcp.cachehit);
}
LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
8007428: 69fb ldr r3, [r7, #28]
800742a: 68db ldr r3, [r3, #12]
800742c: 69fa ldr r2, [r7, #28]
800742e: 429a cmp r2, r3
8007430: d111 bne.n 8007456 <tcp_input+0x366>
8007432: 4b58 ldr r3, [pc, #352] ; (8007594 <tcp_input+0x4a4>)
8007434: f240 1215 movw r2, #277 ; 0x115
8007438: 495a ldr r1, [pc, #360] ; (80075a4 <tcp_input+0x4b4>)
800743a: 4858 ldr r0, [pc, #352] ; (800759c <tcp_input+0x4ac>)
800743c: f008 fd3c bl 800feb8 <printf>
break;
8007440: e009 b.n 8007456 <tcp_input+0x366>
}
prev = pcb;
8007442: 69fb ldr r3, [r7, #28]
8007444: 61bb str r3, [r7, #24]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8007446: 69fb ldr r3, [r7, #28]
8007448: 68db ldr r3, [r3, #12]
800744a: 61fb str r3, [r7, #28]
800744c: 69fb ldr r3, [r7, #28]
800744e: 2b00 cmp r3, #0
8007450: f47f af5e bne.w 8007310 <tcp_input+0x220>
8007454: e000 b.n 8007458 <tcp_input+0x368>
break;
8007456: bf00 nop
}
if (pcb == NULL) {
8007458: 69fb ldr r3, [r7, #28]
800745a: 2b00 cmp r3, #0
800745c: f040 80aa bne.w 80075b4 <tcp_input+0x4c4>
/* If it did not go to an active connection, we check the connections
in the TIME-WAIT state. */
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
8007460: 4b51 ldr r3, [pc, #324] ; (80075a8 <tcp_input+0x4b8>)
8007462: 681b ldr r3, [r3, #0]
8007464: 61fb str r3, [r7, #28]
8007466: e03f b.n 80074e8 <tcp_input+0x3f8>
LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
8007468: 69fb ldr r3, [r7, #28]
800746a: 7d1b ldrb r3, [r3, #20]
800746c: 2b0a cmp r3, #10
800746e: d006 beq.n 800747e <tcp_input+0x38e>
8007470: 4b48 ldr r3, [pc, #288] ; (8007594 <tcp_input+0x4a4>)
8007472: f240 121f movw r2, #287 ; 0x11f
8007476: 494d ldr r1, [pc, #308] ; (80075ac <tcp_input+0x4bc>)
8007478: 4848 ldr r0, [pc, #288] ; (800759c <tcp_input+0x4ac>)
800747a: f008 fd1d bl 800feb8 <printf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
800747e: 69fb ldr r3, [r7, #28]
8007480: 7a1b ldrb r3, [r3, #8]
8007482: 2b00 cmp r3, #0
8007484: d009 beq.n 800749a <tcp_input+0x3aa>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
8007486: 69fb ldr r3, [r7, #28]
8007488: 7a1a ldrb r2, [r3, #8]
800748a: 4b41 ldr r3, [pc, #260] ; (8007590 <tcp_input+0x4a0>)
800748c: 685b ldr r3, [r3, #4]
800748e: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8007492: 3301 adds r3, #1
8007494: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8007496: 429a cmp r2, r3
8007498: d122 bne.n 80074e0 <tcp_input+0x3f0>
continue;
}
if (pcb->remote_port == tcphdr->src &&
800749a: 69fb ldr r3, [r7, #28]
800749c: 8b1a ldrh r2, [r3, #24]
800749e: 4b3b ldr r3, [pc, #236] ; (800758c <tcp_input+0x49c>)
80074a0: 681b ldr r3, [r3, #0]
80074a2: 881b ldrh r3, [r3, #0]
80074a4: b29b uxth r3, r3
80074a6: 429a cmp r2, r3
80074a8: d11b bne.n 80074e2 <tcp_input+0x3f2>
pcb->local_port == tcphdr->dest &&
80074aa: 69fb ldr r3, [r7, #28]
80074ac: 8ada ldrh r2, [r3, #22]
80074ae: 4b37 ldr r3, [pc, #220] ; (800758c <tcp_input+0x49c>)
80074b0: 681b ldr r3, [r3, #0]
80074b2: 885b ldrh r3, [r3, #2]
80074b4: b29b uxth r3, r3
if (pcb->remote_port == tcphdr->src &&
80074b6: 429a cmp r2, r3
80074b8: d113 bne.n 80074e2 <tcp_input+0x3f2>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80074ba: 69fb ldr r3, [r7, #28]
80074bc: 685a ldr r2, [r3, #4]
80074be: 4b34 ldr r3, [pc, #208] ; (8007590 <tcp_input+0x4a0>)
80074c0: 691b ldr r3, [r3, #16]
pcb->local_port == tcphdr->dest &&
80074c2: 429a cmp r2, r3
80074c4: d10d bne.n 80074e2 <tcp_input+0x3f2>
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
80074c6: 69fb ldr r3, [r7, #28]
80074c8: 681a ldr r2, [r3, #0]
80074ca: 4b31 ldr r3, [pc, #196] ; (8007590 <tcp_input+0x4a0>)
80074cc: 695b ldr r3, [r3, #20]
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80074ce: 429a cmp r2, r3
80074d0: d107 bne.n 80074e2 <tcp_input+0x3f2>
#ifdef LWIP_HOOK_TCP_INPACKET_PCB
if (LWIP_HOOK_TCP_INPACKET_PCB(pcb, tcphdr, tcphdr_optlen, tcphdr_opt1len,
tcphdr_opt2, p) == ERR_OK)
#endif
{
tcp_timewait_input(pcb);
80074d2: 69f8 ldr r0, [r7, #28]
80074d4: f000 fb56 bl 8007b84 <tcp_timewait_input>
}
pbuf_free(p);
80074d8: 6878 ldr r0, [r7, #4]
80074da: f7fd ffd1 bl 8005480 <pbuf_free>
return;
80074de: e1fd b.n 80078dc <tcp_input+0x7ec>
continue;
80074e0: bf00 nop
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
80074e2: 69fb ldr r3, [r7, #28]
80074e4: 68db ldr r3, [r3, #12]
80074e6: 61fb str r3, [r7, #28]
80074e8: 69fb ldr r3, [r7, #28]
80074ea: 2b00 cmp r3, #0
80074ec: d1bc bne.n 8007468 <tcp_input+0x378>
}
}
/* Finally, if we still did not get a match, we check all PCBs that
are LISTENing for incoming connections. */
prev = NULL;
80074ee: 2300 movs r3, #0
80074f0: 61bb str r3, [r7, #24]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
80074f2: 4b2f ldr r3, [pc, #188] ; (80075b0 <tcp_input+0x4c0>)
80074f4: 681b ldr r3, [r3, #0]
80074f6: 617b str r3, [r7, #20]
80074f8: e02a b.n 8007550 <tcp_input+0x460>
/* check if PCB is bound to specific netif */
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
80074fa: 697b ldr r3, [r7, #20]
80074fc: 7a1b ldrb r3, [r3, #8]
80074fe: 2b00 cmp r3, #0
8007500: d00c beq.n 800751c <tcp_input+0x42c>
(lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
8007502: 697b ldr r3, [r7, #20]
8007504: 7a1a ldrb r2, [r3, #8]
8007506: 4b22 ldr r3, [pc, #136] ; (8007590 <tcp_input+0x4a0>)
8007508: 685b ldr r3, [r3, #4]
800750a: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
800750e: 3301 adds r3, #1
8007510: b2db uxtb r3, r3
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
8007512: 429a cmp r2, r3
8007514: d002 beq.n 800751c <tcp_input+0x42c>
prev = (struct tcp_pcb *)lpcb;
8007516: 697b ldr r3, [r7, #20]
8007518: 61bb str r3, [r7, #24]
continue;
800751a: e016 b.n 800754a <tcp_input+0x45a>
}
if (lpcb->local_port == tcphdr->dest) {
800751c: 697b ldr r3, [r7, #20]
800751e: 8ada ldrh r2, [r3, #22]
8007520: 4b1a ldr r3, [pc, #104] ; (800758c <tcp_input+0x49c>)
8007522: 681b ldr r3, [r3, #0]
8007524: 885b ldrh r3, [r3, #2]
8007526: b29b uxth r3, r3
8007528: 429a cmp r2, r3
800752a: d10c bne.n 8007546 <tcp_input+0x456>
lpcb_prev = prev;
#else /* SO_REUSE */
break;
#endif /* SO_REUSE */
} else if (IP_ADDR_PCB_VERSION_MATCH_EXACT(lpcb, ip_current_dest_addr())) {
if (ip_addr_cmp(&lpcb->local_ip, ip_current_dest_addr())) {
800752c: 697b ldr r3, [r7, #20]
800752e: 681a ldr r2, [r3, #0]
8007530: 4b17 ldr r3, [pc, #92] ; (8007590 <tcp_input+0x4a0>)
8007532: 695b ldr r3, [r3, #20]
8007534: 429a cmp r2, r3
8007536: d00f beq.n 8007558 <tcp_input+0x468>
/* found an exact match */
break;
} else if (ip_addr_isany(&lpcb->local_ip)) {
8007538: 697b ldr r3, [r7, #20]
800753a: 2b00 cmp r3, #0
800753c: d00d beq.n 800755a <tcp_input+0x46a>
800753e: 697b ldr r3, [r7, #20]
8007540: 681b ldr r3, [r3, #0]
8007542: 2b00 cmp r3, #0
8007544: d009 beq.n 800755a <tcp_input+0x46a>
break;
#endif /* SO_REUSE */
}
}
}
prev = (struct tcp_pcb *)lpcb;
8007546: 697b ldr r3, [r7, #20]
8007548: 61bb str r3, [r7, #24]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
800754a: 697b ldr r3, [r7, #20]
800754c: 68db ldr r3, [r3, #12]
800754e: 617b str r3, [r7, #20]
8007550: 697b ldr r3, [r7, #20]
8007552: 2b00 cmp r3, #0
8007554: d1d1 bne.n 80074fa <tcp_input+0x40a>
8007556: e000 b.n 800755a <tcp_input+0x46a>
break;
8007558: bf00 nop
/* only pass to ANY if no specific local IP has been found */
lpcb = lpcb_any;
prev = lpcb_prev;
}
#endif /* SO_REUSE */
if (lpcb != NULL) {
800755a: 697b ldr r3, [r7, #20]
800755c: 2b00 cmp r3, #0
800755e: d029 beq.n 80075b4 <tcp_input+0x4c4>
/* Move this PCB to the front of the list so that subsequent
lookups will be faster (we exploit locality in TCP segment
arrivals). */
if (prev != NULL) {
8007560: 69bb ldr r3, [r7, #24]
8007562: 2b00 cmp r3, #0
8007564: d00a beq.n 800757c <tcp_input+0x48c>
((struct tcp_pcb_listen *)prev)->next = lpcb->next;
8007566: 697b ldr r3, [r7, #20]
8007568: 68da ldr r2, [r3, #12]
800756a: 69bb ldr r3, [r7, #24]
800756c: 60da str r2, [r3, #12]
/* our successor is the remainder of the listening list */
lpcb->next = tcp_listen_pcbs.listen_pcbs;
800756e: 4b10 ldr r3, [pc, #64] ; (80075b0 <tcp_input+0x4c0>)
8007570: 681a ldr r2, [r3, #0]
8007572: 697b ldr r3, [r7, #20]
8007574: 60da str r2, [r3, #12]
/* put this listening pcb at the head of the listening list */
tcp_listen_pcbs.listen_pcbs = lpcb;
8007576: 4a0e ldr r2, [pc, #56] ; (80075b0 <tcp_input+0x4c0>)
8007578: 697b ldr r3, [r7, #20]
800757a: 6013 str r3, [r2, #0]
#ifdef LWIP_HOOK_TCP_INPACKET_PCB
if (LWIP_HOOK_TCP_INPACKET_PCB((struct tcp_pcb *)lpcb, tcphdr, tcphdr_optlen,
tcphdr_opt1len, tcphdr_opt2, p) == ERR_OK)
#endif
{
tcp_listen_input(lpcb);
800757c: 6978 ldr r0, [r7, #20]
800757e: f000 fa03 bl 8007988 <tcp_listen_input>
}
pbuf_free(p);
8007582: 6878 ldr r0, [r7, #4]
8007584: f7fd ff7c bl 8005480 <pbuf_free>
return;
8007588: e1a8 b.n 80078dc <tcp_input+0x7ec>
800758a: bf00 nop
800758c: 20008bd4 .word 0x20008bd4
8007590: 2000561c .word 0x2000561c
8007594: 08015c0c .word 0x08015c0c
8007598: 08015d38 .word 0x08015d38
800759c: 08015c58 .word 0x08015c58
80075a0: 20008bb8 .word 0x20008bb8
80075a4: 08015d64 .word 0x08015d64
80075a8: 20008bbc .word 0x20008bbc
80075ac: 08015d90 .word 0x08015d90
80075b0: 20008bb4 .word 0x20008bb4
tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) {
pbuf_free(p);
return;
}
#endif
if (pcb != NULL) {
80075b4: 69fb ldr r3, [r7, #28]
80075b6: 2b00 cmp r3, #0
80075b8: f000 8158 beq.w 800786c <tcp_input+0x77c>
#if TCP_INPUT_DEBUG
tcp_debug_print_state(pcb->state);
#endif /* TCP_INPUT_DEBUG */
/* Set up a tcp_seg structure. */
inseg.next = NULL;
80075bc: 4b95 ldr r3, [pc, #596] ; (8007814 <tcp_input+0x724>)
80075be: 2200 movs r2, #0
80075c0: 601a str r2, [r3, #0]
inseg.len = p->tot_len;
80075c2: 687b ldr r3, [r7, #4]
80075c4: 891a ldrh r2, [r3, #8]
80075c6: 4b93 ldr r3, [pc, #588] ; (8007814 <tcp_input+0x724>)
80075c8: 811a strh r2, [r3, #8]
inseg.p = p;
80075ca: 4a92 ldr r2, [pc, #584] ; (8007814 <tcp_input+0x724>)
80075cc: 687b ldr r3, [r7, #4]
80075ce: 6053 str r3, [r2, #4]
inseg.tcphdr = tcphdr;
80075d0: 4b91 ldr r3, [pc, #580] ; (8007818 <tcp_input+0x728>)
80075d2: 681b ldr r3, [r3, #0]
80075d4: 4a8f ldr r2, [pc, #572] ; (8007814 <tcp_input+0x724>)
80075d6: 60d3 str r3, [r2, #12]
recv_data = NULL;
80075d8: 4b90 ldr r3, [pc, #576] ; (800781c <tcp_input+0x72c>)
80075da: 2200 movs r2, #0
80075dc: 601a str r2, [r3, #0]
recv_flags = 0;
80075de: 4b90 ldr r3, [pc, #576] ; (8007820 <tcp_input+0x730>)
80075e0: 2200 movs r2, #0
80075e2: 701a strb r2, [r3, #0]
recv_acked = 0;
80075e4: 4b8f ldr r3, [pc, #572] ; (8007824 <tcp_input+0x734>)
80075e6: 2200 movs r2, #0
80075e8: 801a strh r2, [r3, #0]
if (flags & TCP_PSH) {
80075ea: 4b8f ldr r3, [pc, #572] ; (8007828 <tcp_input+0x738>)
80075ec: 781b ldrb r3, [r3, #0]
80075ee: f003 0308 and.w r3, r3, #8
80075f2: 2b00 cmp r3, #0
80075f4: d006 beq.n 8007604 <tcp_input+0x514>
p->flags |= PBUF_FLAG_PUSH;
80075f6: 687b ldr r3, [r7, #4]
80075f8: 7b5b ldrb r3, [r3, #13]
80075fa: f043 0301 orr.w r3, r3, #1
80075fe: b2da uxtb r2, r3
8007600: 687b ldr r3, [r7, #4]
8007602: 735a strb r2, [r3, #13]
}
/* If there is data which was previously "refused" by upper layer */
if (pcb->refused_data != NULL) {
8007604: 69fb ldr r3, [r7, #28]
8007606: 6f9b ldr r3, [r3, #120] ; 0x78
8007608: 2b00 cmp r3, #0
800760a: d017 beq.n 800763c <tcp_input+0x54c>
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
800760c: 69f8 ldr r0, [r7, #28]
800760e: f7ff f929 bl 8006864 <tcp_process_refused_data>
8007612: 4603 mov r3, r0
8007614: f113 0f0d cmn.w r3, #13
8007618: d007 beq.n 800762a <tcp_input+0x53a>
((pcb->refused_data != NULL) && (tcplen > 0))) {
800761a: 69fb ldr r3, [r7, #28]
800761c: 6f9b ldr r3, [r3, #120] ; 0x78
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
800761e: 2b00 cmp r3, #0
8007620: d00c beq.n 800763c <tcp_input+0x54c>
((pcb->refused_data != NULL) && (tcplen > 0))) {
8007622: 4b82 ldr r3, [pc, #520] ; (800782c <tcp_input+0x73c>)
8007624: 881b ldrh r3, [r3, #0]
8007626: 2b00 cmp r3, #0
8007628: d008 beq.n 800763c <tcp_input+0x54c>
/* pcb has been aborted or refused data is still refused and the new
segment contains data */
if (pcb->rcv_ann_wnd == 0) {
800762a: 69fb ldr r3, [r7, #28]
800762c: 8d5b ldrh r3, [r3, #42] ; 0x2a
800762e: 2b00 cmp r3, #0
8007630: f040 80e3 bne.w 80077fa <tcp_input+0x70a>
/* this is a zero-window probe, we respond to it with current RCV.NXT
and drop the data segment */
tcp_send_empty_ack(pcb);
8007634: 69f8 ldr r0, [r7, #28]
8007636: f003 f9ad bl 800a994 <tcp_send_empty_ack>
}
TCP_STATS_INC(tcp.drop);
MIB2_STATS_INC(mib2.tcpinerrs);
goto aborted;
800763a: e0de b.n 80077fa <tcp_input+0x70a>
}
}
tcp_input_pcb = pcb;
800763c: 4a7c ldr r2, [pc, #496] ; (8007830 <tcp_input+0x740>)
800763e: 69fb ldr r3, [r7, #28]
8007640: 6013 str r3, [r2, #0]
err = tcp_process(pcb);
8007642: 69f8 ldr r0, [r7, #28]
8007644: f000 fb18 bl 8007c78 <tcp_process>
8007648: 4603 mov r3, r0
800764a: 74fb strb r3, [r7, #19]
/* A return value of ERR_ABRT means that tcp_abort() was called
and that the pcb has been freed. If so, we don't do anything. */
if (err != ERR_ABRT) {
800764c: f997 3013 ldrsb.w r3, [r7, #19]
8007650: f113 0f0d cmn.w r3, #13
8007654: f000 80d3 beq.w 80077fe <tcp_input+0x70e>
if (recv_flags & TF_RESET) {
8007658: 4b71 ldr r3, [pc, #452] ; (8007820 <tcp_input+0x730>)
800765a: 781b ldrb r3, [r3, #0]
800765c: f003 0308 and.w r3, r3, #8
8007660: 2b00 cmp r3, #0
8007662: d015 beq.n 8007690 <tcp_input+0x5a0>
/* TF_RESET means that the connection was reset by the other
end. We then call the error callback to inform the
application that the connection is dead before we
deallocate the PCB. */
TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST);
8007664: 69fb ldr r3, [r7, #28]
8007666: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800766a: 2b00 cmp r3, #0
800766c: d008 beq.n 8007680 <tcp_input+0x590>
800766e: 69fb ldr r3, [r7, #28]
8007670: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8007674: 69fa ldr r2, [r7, #28]
8007676: 6912 ldr r2, [r2, #16]
8007678: f06f 010d mvn.w r1, #13
800767c: 4610 mov r0, r2
800767e: 4798 blx r3
tcp_pcb_remove(&tcp_active_pcbs, pcb);
8007680: 69f9 ldr r1, [r7, #28]
8007682: 486c ldr r0, [pc, #432] ; (8007834 <tcp_input+0x744>)
8007684: f7ff fbbc bl 8006e00 <tcp_pcb_remove>
tcp_free(pcb);
8007688: 69f8 ldr r0, [r7, #28]
800768a: f7fe f9a9 bl 80059e0 <tcp_free>
800768e: e0da b.n 8007846 <tcp_input+0x756>
} else {
err = ERR_OK;
8007690: 2300 movs r3, #0
8007692: 74fb strb r3, [r7, #19]
/* If the application has registered a "sent" function to be
called when new send buffer space is available, we call it
now. */
if (recv_acked > 0) {
8007694: 4b63 ldr r3, [pc, #396] ; (8007824 <tcp_input+0x734>)
8007696: 881b ldrh r3, [r3, #0]
8007698: 2b00 cmp r3, #0
800769a: d01d beq.n 80076d8 <tcp_input+0x5e8>
while (acked > 0) {
acked16 = (u16_t)LWIP_MIN(acked, 0xffffu);
acked -= acked16;
#else
{
acked16 = recv_acked;
800769c: 4b61 ldr r3, [pc, #388] ; (8007824 <tcp_input+0x734>)
800769e: 881b ldrh r3, [r3, #0]
80076a0: 81fb strh r3, [r7, #14]
#endif
TCP_EVENT_SENT(pcb, (u16_t)acked16, err);
80076a2: 69fb ldr r3, [r7, #28]
80076a4: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
80076a8: 2b00 cmp r3, #0
80076aa: d00a beq.n 80076c2 <tcp_input+0x5d2>
80076ac: 69fb ldr r3, [r7, #28]
80076ae: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
80076b2: 69fa ldr r2, [r7, #28]
80076b4: 6910 ldr r0, [r2, #16]
80076b6: 89fa ldrh r2, [r7, #14]
80076b8: 69f9 ldr r1, [r7, #28]
80076ba: 4798 blx r3
80076bc: 4603 mov r3, r0
80076be: 74fb strb r3, [r7, #19]
80076c0: e001 b.n 80076c6 <tcp_input+0x5d6>
80076c2: 2300 movs r3, #0
80076c4: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
80076c6: f997 3013 ldrsb.w r3, [r7, #19]
80076ca: f113 0f0d cmn.w r3, #13
80076ce: f000 8098 beq.w 8007802 <tcp_input+0x712>
goto aborted;
}
}
recv_acked = 0;
80076d2: 4b54 ldr r3, [pc, #336] ; (8007824 <tcp_input+0x734>)
80076d4: 2200 movs r2, #0
80076d6: 801a strh r2, [r3, #0]
}
if (tcp_input_delayed_close(pcb)) {
80076d8: 69f8 ldr r0, [r7, #28]
80076da: f000 f915 bl 8007908 <tcp_input_delayed_close>
80076de: 4603 mov r3, r0
80076e0: 2b00 cmp r3, #0
80076e2: f040 8090 bne.w 8007806 <tcp_input+0x716>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
while (recv_data != NULL) {
struct pbuf *rest = NULL;
pbuf_split_64k(recv_data, &rest);
#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
if (recv_data != NULL) {
80076e6: 4b4d ldr r3, [pc, #308] ; (800781c <tcp_input+0x72c>)
80076e8: 681b ldr r3, [r3, #0]
80076ea: 2b00 cmp r3, #0
80076ec: d041 beq.n 8007772 <tcp_input+0x682>
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL);
80076ee: 69fb ldr r3, [r7, #28]
80076f0: 6f9b ldr r3, [r3, #120] ; 0x78
80076f2: 2b00 cmp r3, #0
80076f4: d006 beq.n 8007704 <tcp_input+0x614>
80076f6: 4b50 ldr r3, [pc, #320] ; (8007838 <tcp_input+0x748>)
80076f8: f44f 72f3 mov.w r2, #486 ; 0x1e6
80076fc: 494f ldr r1, [pc, #316] ; (800783c <tcp_input+0x74c>)
80076fe: 4850 ldr r0, [pc, #320] ; (8007840 <tcp_input+0x750>)
8007700: f008 fbda bl 800feb8 <printf>
if (pcb->flags & TF_RXCLOSED) {
8007704: 69fb ldr r3, [r7, #28]
8007706: 8b5b ldrh r3, [r3, #26]
8007708: f003 0310 and.w r3, r3, #16
800770c: 2b00 cmp r3, #0
800770e: d008 beq.n 8007722 <tcp_input+0x632>
/* received data although already closed -> abort (send RST) to
notify the remote host that not all data has been processed */
pbuf_free(recv_data);
8007710: 4b42 ldr r3, [pc, #264] ; (800781c <tcp_input+0x72c>)
8007712: 681b ldr r3, [r3, #0]
8007714: 4618 mov r0, r3
8007716: f7fd feb3 bl 8005480 <pbuf_free>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
if (rest != NULL) {
pbuf_free(rest);
}
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
tcp_abort(pcb);
800771a: 69f8 ldr r0, [r7, #28]
800771c: f7fe fc48 bl 8005fb0 <tcp_abort>
goto aborted;
8007720: e091 b.n 8007846 <tcp_input+0x756>
}
/* Notify application that data has been received. */
TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
8007722: 69fb ldr r3, [r7, #28]
8007724: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8007728: 2b00 cmp r3, #0
800772a: d00c beq.n 8007746 <tcp_input+0x656>
800772c: 69fb ldr r3, [r7, #28]
800772e: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8007732: 69fb ldr r3, [r7, #28]
8007734: 6918 ldr r0, [r3, #16]
8007736: 4b39 ldr r3, [pc, #228] ; (800781c <tcp_input+0x72c>)
8007738: 681a ldr r2, [r3, #0]
800773a: 2300 movs r3, #0
800773c: 69f9 ldr r1, [r7, #28]
800773e: 47a0 blx r4
8007740: 4603 mov r3, r0
8007742: 74fb strb r3, [r7, #19]
8007744: e008 b.n 8007758 <tcp_input+0x668>
8007746: 4b35 ldr r3, [pc, #212] ; (800781c <tcp_input+0x72c>)
8007748: 681a ldr r2, [r3, #0]
800774a: 2300 movs r3, #0
800774c: 69f9 ldr r1, [r7, #28]
800774e: 2000 movs r0, #0
8007750: f7ff f95e bl 8006a10 <tcp_recv_null>
8007754: 4603 mov r3, r0
8007756: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
8007758: f997 3013 ldrsb.w r3, [r7, #19]
800775c: f113 0f0d cmn.w r3, #13
8007760: d053 beq.n 800780a <tcp_input+0x71a>
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
goto aborted;
}
/* If the upper layer can't receive this data, store it */
if (err != ERR_OK) {
8007762: f997 3013 ldrsb.w r3, [r7, #19]
8007766: 2b00 cmp r3, #0
8007768: d003 beq.n 8007772 <tcp_input+0x682>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
if (rest != NULL) {
pbuf_cat(recv_data, rest);
}
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
pcb->refused_data = recv_data;
800776a: 4b2c ldr r3, [pc, #176] ; (800781c <tcp_input+0x72c>)
800776c: 681a ldr r2, [r3, #0]
800776e: 69fb ldr r3, [r7, #28]
8007770: 679a str r2, [r3, #120] ; 0x78
}
}
/* If a FIN segment was received, we call the callback
function with a NULL buffer to indicate EOF. */
if (recv_flags & TF_GOT_FIN) {
8007772: 4b2b ldr r3, [pc, #172] ; (8007820 <tcp_input+0x730>)
8007774: 781b ldrb r3, [r3, #0]
8007776: f003 0320 and.w r3, r3, #32
800777a: 2b00 cmp r3, #0
800777c: d030 beq.n 80077e0 <tcp_input+0x6f0>
if (pcb->refused_data != NULL) {
800777e: 69fb ldr r3, [r7, #28]
8007780: 6f9b ldr r3, [r3, #120] ; 0x78
8007782: 2b00 cmp r3, #0
8007784: d009 beq.n 800779a <tcp_input+0x6aa>
/* Delay this if we have refused data. */
pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN;
8007786: 69fb ldr r3, [r7, #28]
8007788: 6f9b ldr r3, [r3, #120] ; 0x78
800778a: 7b5a ldrb r2, [r3, #13]
800778c: 69fb ldr r3, [r7, #28]
800778e: 6f9b ldr r3, [r3, #120] ; 0x78
8007790: f042 0220 orr.w r2, r2, #32
8007794: b2d2 uxtb r2, r2
8007796: 735a strb r2, [r3, #13]
8007798: e022 b.n 80077e0 <tcp_input+0x6f0>
} else {
/* correct rcv_wnd as the application won't call tcp_recved()
for the FIN's seqno */
if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) {
800779a: 69fb ldr r3, [r7, #28]
800779c: 8d1b ldrh r3, [r3, #40] ; 0x28
800779e: f5b3 6f06 cmp.w r3, #2144 ; 0x860
80077a2: d005 beq.n 80077b0 <tcp_input+0x6c0>
pcb->rcv_wnd++;
80077a4: 69fb ldr r3, [r7, #28]
80077a6: 8d1b ldrh r3, [r3, #40] ; 0x28
80077a8: 3301 adds r3, #1
80077aa: b29a uxth r2, r3
80077ac: 69fb ldr r3, [r7, #28]
80077ae: 851a strh r2, [r3, #40] ; 0x28
}
TCP_EVENT_CLOSED(pcb, err);
80077b0: 69fb ldr r3, [r7, #28]
80077b2: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
80077b6: 2b00 cmp r3, #0
80077b8: d00b beq.n 80077d2 <tcp_input+0x6e2>
80077ba: 69fb ldr r3, [r7, #28]
80077bc: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
80077c0: 69fb ldr r3, [r7, #28]
80077c2: 6918 ldr r0, [r3, #16]
80077c4: 2300 movs r3, #0
80077c6: 2200 movs r2, #0
80077c8: 69f9 ldr r1, [r7, #28]
80077ca: 47a0 blx r4
80077cc: 4603 mov r3, r0
80077ce: 74fb strb r3, [r7, #19]
80077d0: e001 b.n 80077d6 <tcp_input+0x6e6>
80077d2: 2300 movs r3, #0
80077d4: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
80077d6: f997 3013 ldrsb.w r3, [r7, #19]
80077da: f113 0f0d cmn.w r3, #13
80077de: d016 beq.n 800780e <tcp_input+0x71e>
goto aborted;
}
}
}
tcp_input_pcb = NULL;
80077e0: 4b13 ldr r3, [pc, #76] ; (8007830 <tcp_input+0x740>)
80077e2: 2200 movs r2, #0
80077e4: 601a str r2, [r3, #0]
if (tcp_input_delayed_close(pcb)) {
80077e6: 69f8 ldr r0, [r7, #28]
80077e8: f000 f88e bl 8007908 <tcp_input_delayed_close>
80077ec: 4603 mov r3, r0
80077ee: 2b00 cmp r3, #0
80077f0: d128 bne.n 8007844 <tcp_input+0x754>
goto aborted;
}
/* Try to send something out. */
tcp_output(pcb);
80077f2: 69f8 ldr r0, [r7, #28]
80077f4: f002 fac8 bl 8009d88 <tcp_output>
80077f8: e025 b.n 8007846 <tcp_input+0x756>
goto aborted;
80077fa: bf00 nop
80077fc: e023 b.n 8007846 <tcp_input+0x756>
#endif /* TCP_INPUT_DEBUG */
}
}
/* Jump target if pcb has been aborted in a callback (by calling tcp_abort()).
Below this line, 'pcb' may not be dereferenced! */
aborted:
80077fe: bf00 nop
8007800: e021 b.n 8007846 <tcp_input+0x756>
goto aborted;
8007802: bf00 nop
8007804: e01f b.n 8007846 <tcp_input+0x756>
goto aborted;
8007806: bf00 nop
8007808: e01d b.n 8007846 <tcp_input+0x756>
goto aborted;
800780a: bf00 nop
800780c: e01b b.n 8007846 <tcp_input+0x756>
goto aborted;
800780e: bf00 nop
8007810: e019 b.n 8007846 <tcp_input+0x756>
8007812: bf00 nop
8007814: 20008bc4 .word 0x20008bc4
8007818: 20008bd4 .word 0x20008bd4
800781c: 20008bf4 .word 0x20008bf4
8007820: 20008bf1 .word 0x20008bf1
8007824: 20008bec .word 0x20008bec
8007828: 20008bf0 .word 0x20008bf0
800782c: 20008bee .word 0x20008bee
8007830: 20008bf8 .word 0x20008bf8
8007834: 20008bb8 .word 0x20008bb8
8007838: 08015c0c .word 0x08015c0c
800783c: 08015dc0 .word 0x08015dc0
8007840: 08015c58 .word 0x08015c58
goto aborted;
8007844: bf00 nop
tcp_input_pcb = NULL;
8007846: 4b27 ldr r3, [pc, #156] ; (80078e4 <tcp_input+0x7f4>)
8007848: 2200 movs r2, #0
800784a: 601a str r2, [r3, #0]
recv_data = NULL;
800784c: 4b26 ldr r3, [pc, #152] ; (80078e8 <tcp_input+0x7f8>)
800784e: 2200 movs r2, #0
8007850: 601a str r2, [r3, #0]
/* give up our reference to inseg.p */
if (inseg.p != NULL) {
8007852: 4b26 ldr r3, [pc, #152] ; (80078ec <tcp_input+0x7fc>)
8007854: 685b ldr r3, [r3, #4]
8007856: 2b00 cmp r3, #0
8007858: d03f beq.n 80078da <tcp_input+0x7ea>
pbuf_free(inseg.p);
800785a: 4b24 ldr r3, [pc, #144] ; (80078ec <tcp_input+0x7fc>)
800785c: 685b ldr r3, [r3, #4]
800785e: 4618 mov r0, r3
8007860: f7fd fe0e bl 8005480 <pbuf_free>
inseg.p = NULL;
8007864: 4b21 ldr r3, [pc, #132] ; (80078ec <tcp_input+0x7fc>)
8007866: 2200 movs r2, #0
8007868: 605a str r2, [r3, #4]
pbuf_free(p);
}
LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane());
PERF_STOP("tcp_input");
return;
800786a: e036 b.n 80078da <tcp_input+0x7ea>
if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) {
800786c: 4b20 ldr r3, [pc, #128] ; (80078f0 <tcp_input+0x800>)
800786e: 681b ldr r3, [r3, #0]
8007870: 899b ldrh r3, [r3, #12]
8007872: b29b uxth r3, r3
8007874: 4618 mov r0, r3
8007876: f7fc fa99 bl 8003dac <lwip_htons>
800787a: 4603 mov r3, r0
800787c: b2db uxtb r3, r3
800787e: f003 0304 and.w r3, r3, #4
8007882: 2b00 cmp r3, #0
8007884: d118 bne.n 80078b8 <tcp_input+0x7c8>
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
8007886: 4b1b ldr r3, [pc, #108] ; (80078f4 <tcp_input+0x804>)
8007888: 6819 ldr r1, [r3, #0]
800788a: 4b1b ldr r3, [pc, #108] ; (80078f8 <tcp_input+0x808>)
800788c: 881b ldrh r3, [r3, #0]
800788e: 461a mov r2, r3
8007890: 4b1a ldr r3, [pc, #104] ; (80078fc <tcp_input+0x80c>)
8007892: 681b ldr r3, [r3, #0]
8007894: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8007896: 4b16 ldr r3, [pc, #88] ; (80078f0 <tcp_input+0x800>)
8007898: 681b ldr r3, [r3, #0]
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
800789a: 885b ldrh r3, [r3, #2]
800789c: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
800789e: 4a14 ldr r2, [pc, #80] ; (80078f0 <tcp_input+0x800>)
80078a0: 6812 ldr r2, [r2, #0]
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
80078a2: 8812 ldrh r2, [r2, #0]
80078a4: b292 uxth r2, r2
80078a6: 9202 str r2, [sp, #8]
80078a8: 9301 str r3, [sp, #4]
80078aa: 4b15 ldr r3, [pc, #84] ; (8007900 <tcp_input+0x810>)
80078ac: 9300 str r3, [sp, #0]
80078ae: 4b15 ldr r3, [pc, #84] ; (8007904 <tcp_input+0x814>)
80078b0: 4602 mov r2, r0
80078b2: 2000 movs r0, #0
80078b4: f003 f81c bl 800a8f0 <tcp_rst>
pbuf_free(p);
80078b8: 6878 ldr r0, [r7, #4]
80078ba: f7fd fde1 bl 8005480 <pbuf_free>
return;
80078be: e00c b.n 80078da <tcp_input+0x7ea>
goto dropped;
80078c0: bf00 nop
80078c2: e006 b.n 80078d2 <tcp_input+0x7e2>
goto dropped;
80078c4: bf00 nop
80078c6: e004 b.n 80078d2 <tcp_input+0x7e2>
goto dropped;
80078c8: bf00 nop
80078ca: e002 b.n 80078d2 <tcp_input+0x7e2>
goto dropped;
80078cc: bf00 nop
80078ce: e000 b.n 80078d2 <tcp_input+0x7e2>
goto dropped;
80078d0: bf00 nop
dropped:
TCP_STATS_INC(tcp.drop);
MIB2_STATS_INC(mib2.tcpinerrs);
pbuf_free(p);
80078d2: 6878 ldr r0, [r7, #4]
80078d4: f7fd fdd4 bl 8005480 <pbuf_free>
80078d8: e000 b.n 80078dc <tcp_input+0x7ec>
return;
80078da: bf00 nop
}
80078dc: 3724 adds r7, #36 ; 0x24
80078de: 46bd mov sp, r7
80078e0: bd90 pop {r4, r7, pc}
80078e2: bf00 nop
80078e4: 20008bf8 .word 0x20008bf8
80078e8: 20008bf4 .word 0x20008bf4
80078ec: 20008bc4 .word 0x20008bc4
80078f0: 20008bd4 .word 0x20008bd4
80078f4: 20008be8 .word 0x20008be8
80078f8: 20008bee .word 0x20008bee
80078fc: 20008be4 .word 0x20008be4
8007900: 2000562c .word 0x2000562c
8007904: 20005630 .word 0x20005630
08007908 <tcp_input_delayed_close>:
* any more.
* @returns 1 if the pcb has been closed and deallocated, 0 otherwise
*/
static int
tcp_input_delayed_close(struct tcp_pcb *pcb)
{
8007908: b580 push {r7, lr}
800790a: b082 sub sp, #8
800790c: af00 add r7, sp, #0
800790e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);
8007910: 687b ldr r3, [r7, #4]
8007912: 2b00 cmp r3, #0
8007914: d106 bne.n 8007924 <tcp_input_delayed_close+0x1c>
8007916: 4b17 ldr r3, [pc, #92] ; (8007974 <tcp_input_delayed_close+0x6c>)
8007918: f240 225a movw r2, #602 ; 0x25a
800791c: 4916 ldr r1, [pc, #88] ; (8007978 <tcp_input_delayed_close+0x70>)
800791e: 4817 ldr r0, [pc, #92] ; (800797c <tcp_input_delayed_close+0x74>)
8007920: f008 faca bl 800feb8 <printf>
if (recv_flags & TF_CLOSED) {
8007924: 4b16 ldr r3, [pc, #88] ; (8007980 <tcp_input_delayed_close+0x78>)
8007926: 781b ldrb r3, [r3, #0]
8007928: f003 0310 and.w r3, r3, #16
800792c: 2b00 cmp r3, #0
800792e: d01c beq.n 800796a <tcp_input_delayed_close+0x62>
/* The connection has been closed and we will deallocate the
PCB. */
if (!(pcb->flags & TF_RXCLOSED)) {
8007930: 687b ldr r3, [r7, #4]
8007932: 8b5b ldrh r3, [r3, #26]
8007934: f003 0310 and.w r3, r3, #16
8007938: 2b00 cmp r3, #0
800793a: d10d bne.n 8007958 <tcp_input_delayed_close+0x50>
/* Connection closed although the application has only shut down the
tx side: call the PCB's err callback and indicate the closure to
ensure the application doesn't continue using the PCB. */
TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD);
800793c: 687b ldr r3, [r7, #4]
800793e: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8007942: 2b00 cmp r3, #0
8007944: d008 beq.n 8007958 <tcp_input_delayed_close+0x50>
8007946: 687b ldr r3, [r7, #4]
8007948: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800794c: 687a ldr r2, [r7, #4]
800794e: 6912 ldr r2, [r2, #16]
8007950: f06f 010e mvn.w r1, #14
8007954: 4610 mov r0, r2
8007956: 4798 blx r3
}
tcp_pcb_remove(&tcp_active_pcbs, pcb);
8007958: 6879 ldr r1, [r7, #4]
800795a: 480a ldr r0, [pc, #40] ; (8007984 <tcp_input_delayed_close+0x7c>)
800795c: f7ff fa50 bl 8006e00 <tcp_pcb_remove>
tcp_free(pcb);
8007960: 6878 ldr r0, [r7, #4]
8007962: f7fe f83d bl 80059e0 <tcp_free>
return 1;
8007966: 2301 movs r3, #1
8007968: e000 b.n 800796c <tcp_input_delayed_close+0x64>
}
return 0;
800796a: 2300 movs r3, #0
}
800796c: 4618 mov r0, r3
800796e: 3708 adds r7, #8
8007970: 46bd mov sp, r7
8007972: bd80 pop {r7, pc}
8007974: 08015c0c .word 0x08015c0c
8007978: 08015ddc .word 0x08015ddc
800797c: 08015c58 .word 0x08015c58
8007980: 20008bf1 .word 0x20008bf1
8007984: 20008bb8 .word 0x20008bb8
08007988 <tcp_listen_input>:
* @note the segment which arrived is saved in global variables, therefore only the pcb
* involved is passed as a parameter to this function
*/
static void
tcp_listen_input(struct tcp_pcb_listen *pcb)
{
8007988: b590 push {r4, r7, lr}
800798a: b08b sub sp, #44 ; 0x2c
800798c: af04 add r7, sp, #16
800798e: 6078 str r0, [r7, #4]
struct tcp_pcb *npcb;
u32_t iss;
err_t rc;
if (flags & TCP_RST) {
8007990: 4b6f ldr r3, [pc, #444] ; (8007b50 <tcp_listen_input+0x1c8>)
8007992: 781b ldrb r3, [r3, #0]
8007994: f003 0304 and.w r3, r3, #4
8007998: 2b00 cmp r3, #0
800799a: f040 80d2 bne.w 8007b42 <tcp_listen_input+0x1ba>
/* An incoming RST should be ignored. Return. */
return;
}
LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL);
800799e: 687b ldr r3, [r7, #4]
80079a0: 2b00 cmp r3, #0
80079a2: d106 bne.n 80079b2 <tcp_listen_input+0x2a>
80079a4: 4b6b ldr r3, [pc, #428] ; (8007b54 <tcp_listen_input+0x1cc>)
80079a6: f240 2281 movw r2, #641 ; 0x281
80079aa: 496b ldr r1, [pc, #428] ; (8007b58 <tcp_listen_input+0x1d0>)
80079ac: 486b ldr r0, [pc, #428] ; (8007b5c <tcp_listen_input+0x1d4>)
80079ae: f008 fa83 bl 800feb8 <printf>
/* In the LISTEN state, we check for incoming SYN segments,
creates a new PCB, and responds with a SYN|ACK. */
if (flags & TCP_ACK) {
80079b2: 4b67 ldr r3, [pc, #412] ; (8007b50 <tcp_listen_input+0x1c8>)
80079b4: 781b ldrb r3, [r3, #0]
80079b6: f003 0310 and.w r3, r3, #16
80079ba: 2b00 cmp r3, #0
80079bc: d019 beq.n 80079f2 <tcp_listen_input+0x6a>
/* For incoming segments with the ACK flag set, respond with a
RST. */
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n"));
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80079be: 4b68 ldr r3, [pc, #416] ; (8007b60 <tcp_listen_input+0x1d8>)
80079c0: 6819 ldr r1, [r3, #0]
80079c2: 4b68 ldr r3, [pc, #416] ; (8007b64 <tcp_listen_input+0x1dc>)
80079c4: 881b ldrh r3, [r3, #0]
80079c6: 461a mov r2, r3
80079c8: 4b67 ldr r3, [pc, #412] ; (8007b68 <tcp_listen_input+0x1e0>)
80079ca: 681b ldr r3, [r3, #0]
80079cc: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
80079ce: 4b67 ldr r3, [pc, #412] ; (8007b6c <tcp_listen_input+0x1e4>)
80079d0: 681b ldr r3, [r3, #0]
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80079d2: 885b ldrh r3, [r3, #2]
80079d4: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
80079d6: 4a65 ldr r2, [pc, #404] ; (8007b6c <tcp_listen_input+0x1e4>)
80079d8: 6812 ldr r2, [r2, #0]
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80079da: 8812 ldrh r2, [r2, #0]
80079dc: b292 uxth r2, r2
80079de: 9202 str r2, [sp, #8]
80079e0: 9301 str r3, [sp, #4]
80079e2: 4b63 ldr r3, [pc, #396] ; (8007b70 <tcp_listen_input+0x1e8>)
80079e4: 9300 str r3, [sp, #0]
80079e6: 4b63 ldr r3, [pc, #396] ; (8007b74 <tcp_listen_input+0x1ec>)
80079e8: 4602 mov r2, r0
80079ea: 6878 ldr r0, [r7, #4]
80079ec: f002 ff80 bl 800a8f0 <tcp_rst>
tcp_abandon(npcb, 0);
return;
}
tcp_output(npcb);
}
return;
80079f0: e0a9 b.n 8007b46 <tcp_listen_input+0x1be>
} else if (flags & TCP_SYN) {
80079f2: 4b57 ldr r3, [pc, #348] ; (8007b50 <tcp_listen_input+0x1c8>)
80079f4: 781b ldrb r3, [r3, #0]
80079f6: f003 0302 and.w r3, r3, #2
80079fa: 2b00 cmp r3, #0
80079fc: f000 80a3 beq.w 8007b46 <tcp_listen_input+0x1be>
npcb = tcp_alloc(pcb->prio);
8007a00: 687b ldr r3, [r7, #4]
8007a02: 7d5b ldrb r3, [r3, #21]
8007a04: 4618 mov r0, r3
8007a06: f7ff f927 bl 8006c58 <tcp_alloc>
8007a0a: 6178 str r0, [r7, #20]
if (npcb == NULL) {
8007a0c: 697b ldr r3, [r7, #20]
8007a0e: 2b00 cmp r3, #0
8007a10: d111 bne.n 8007a36 <tcp_listen_input+0xae>
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
8007a12: 687b ldr r3, [r7, #4]
8007a14: 699b ldr r3, [r3, #24]
8007a16: 2b00 cmp r3, #0
8007a18: d00a beq.n 8007a30 <tcp_listen_input+0xa8>
8007a1a: 687b ldr r3, [r7, #4]
8007a1c: 699b ldr r3, [r3, #24]
8007a1e: 687a ldr r2, [r7, #4]
8007a20: 6910 ldr r0, [r2, #16]
8007a22: f04f 32ff mov.w r2, #4294967295
8007a26: 2100 movs r1, #0
8007a28: 4798 blx r3
8007a2a: 4603 mov r3, r0
8007a2c: 73bb strb r3, [r7, #14]
return;
8007a2e: e08b b.n 8007b48 <tcp_listen_input+0x1c0>
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
8007a30: 23f0 movs r3, #240 ; 0xf0
8007a32: 73bb strb r3, [r7, #14]
return;
8007a34: e088 b.n 8007b48 <tcp_listen_input+0x1c0>
ip_addr_copy(npcb->local_ip, *ip_current_dest_addr());
8007a36: 4b50 ldr r3, [pc, #320] ; (8007b78 <tcp_listen_input+0x1f0>)
8007a38: 695a ldr r2, [r3, #20]
8007a3a: 697b ldr r3, [r7, #20]
8007a3c: 601a str r2, [r3, #0]
ip_addr_copy(npcb->remote_ip, *ip_current_src_addr());
8007a3e: 4b4e ldr r3, [pc, #312] ; (8007b78 <tcp_listen_input+0x1f0>)
8007a40: 691a ldr r2, [r3, #16]
8007a42: 697b ldr r3, [r7, #20]
8007a44: 605a str r2, [r3, #4]
npcb->local_port = pcb->local_port;
8007a46: 687b ldr r3, [r7, #4]
8007a48: 8ada ldrh r2, [r3, #22]
8007a4a: 697b ldr r3, [r7, #20]
8007a4c: 82da strh r2, [r3, #22]
npcb->remote_port = tcphdr->src;
8007a4e: 4b47 ldr r3, [pc, #284] ; (8007b6c <tcp_listen_input+0x1e4>)
8007a50: 681b ldr r3, [r3, #0]
8007a52: 881b ldrh r3, [r3, #0]
8007a54: b29a uxth r2, r3
8007a56: 697b ldr r3, [r7, #20]
8007a58: 831a strh r2, [r3, #24]
npcb->state = SYN_RCVD;
8007a5a: 697b ldr r3, [r7, #20]
8007a5c: 2203 movs r2, #3
8007a5e: 751a strb r2, [r3, #20]
npcb->rcv_nxt = seqno + 1;
8007a60: 4b41 ldr r3, [pc, #260] ; (8007b68 <tcp_listen_input+0x1e0>)
8007a62: 681b ldr r3, [r3, #0]
8007a64: 1c5a adds r2, r3, #1
8007a66: 697b ldr r3, [r7, #20]
8007a68: 625a str r2, [r3, #36] ; 0x24
npcb->rcv_ann_right_edge = npcb->rcv_nxt;
8007a6a: 697b ldr r3, [r7, #20]
8007a6c: 6a5a ldr r2, [r3, #36] ; 0x24
8007a6e: 697b ldr r3, [r7, #20]
8007a70: 62da str r2, [r3, #44] ; 0x2c
iss = tcp_next_iss(npcb);
8007a72: 6978 ldr r0, [r7, #20]
8007a74: f7ff fa58 bl 8006f28 <tcp_next_iss>
8007a78: 6138 str r0, [r7, #16]
npcb->snd_wl2 = iss;
8007a7a: 697b ldr r3, [r7, #20]
8007a7c: 693a ldr r2, [r7, #16]
8007a7e: 659a str r2, [r3, #88] ; 0x58
npcb->snd_nxt = iss;
8007a80: 697b ldr r3, [r7, #20]
8007a82: 693a ldr r2, [r7, #16]
8007a84: 651a str r2, [r3, #80] ; 0x50
npcb->lastack = iss;
8007a86: 697b ldr r3, [r7, #20]
8007a88: 693a ldr r2, [r7, #16]
8007a8a: 645a str r2, [r3, #68] ; 0x44
npcb->snd_lbb = iss;
8007a8c: 697b ldr r3, [r7, #20]
8007a8e: 693a ldr r2, [r7, #16]
8007a90: 65da str r2, [r3, #92] ; 0x5c
npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */
8007a92: 4b35 ldr r3, [pc, #212] ; (8007b68 <tcp_listen_input+0x1e0>)
8007a94: 681b ldr r3, [r3, #0]
8007a96: 1e5a subs r2, r3, #1
8007a98: 697b ldr r3, [r7, #20]
8007a9a: 655a str r2, [r3, #84] ; 0x54
npcb->callback_arg = pcb->callback_arg;
8007a9c: 687b ldr r3, [r7, #4]
8007a9e: 691a ldr r2, [r3, #16]
8007aa0: 697b ldr r3, [r7, #20]
8007aa2: 611a str r2, [r3, #16]
npcb->listener = pcb;
8007aa4: 697b ldr r3, [r7, #20]
8007aa6: 687a ldr r2, [r7, #4]
8007aa8: 67da str r2, [r3, #124] ; 0x7c
npcb->so_options = pcb->so_options & SOF_INHERITED;
8007aaa: 687b ldr r3, [r7, #4]
8007aac: 7a5b ldrb r3, [r3, #9]
8007aae: f003 030c and.w r3, r3, #12
8007ab2: b2da uxtb r2, r3
8007ab4: 697b ldr r3, [r7, #20]
8007ab6: 725a strb r2, [r3, #9]
npcb->netif_idx = pcb->netif_idx;
8007ab8: 687b ldr r3, [r7, #4]
8007aba: 7a1a ldrb r2, [r3, #8]
8007abc: 697b ldr r3, [r7, #20]
8007abe: 721a strb r2, [r3, #8]
TCP_REG_ACTIVE(npcb);
8007ac0: 4b2e ldr r3, [pc, #184] ; (8007b7c <tcp_listen_input+0x1f4>)
8007ac2: 681a ldr r2, [r3, #0]
8007ac4: 697b ldr r3, [r7, #20]
8007ac6: 60da str r2, [r3, #12]
8007ac8: 4a2c ldr r2, [pc, #176] ; (8007b7c <tcp_listen_input+0x1f4>)
8007aca: 697b ldr r3, [r7, #20]
8007acc: 6013 str r3, [r2, #0]
8007ace: f003 f8d1 bl 800ac74 <tcp_timer_needed>
8007ad2: 4b2b ldr r3, [pc, #172] ; (8007b80 <tcp_listen_input+0x1f8>)
8007ad4: 2201 movs r2, #1
8007ad6: 701a strb r2, [r3, #0]
tcp_parseopt(npcb);
8007ad8: 6978 ldr r0, [r7, #20]
8007ada: f001 fd8f bl 80095fc <tcp_parseopt>
npcb->snd_wnd = tcphdr->wnd;
8007ade: 4b23 ldr r3, [pc, #140] ; (8007b6c <tcp_listen_input+0x1e4>)
8007ae0: 681b ldr r3, [r3, #0]
8007ae2: 89db ldrh r3, [r3, #14]
8007ae4: b29a uxth r2, r3
8007ae6: 697b ldr r3, [r7, #20]
8007ae8: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
npcb->snd_wnd_max = npcb->snd_wnd;
8007aec: 697b ldr r3, [r7, #20]
8007aee: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8007af2: 697b ldr r3, [r7, #20]
8007af4: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip);
8007af8: 697b ldr r3, [r7, #20]
8007afa: 8e5c ldrh r4, [r3, #50] ; 0x32
8007afc: 697b ldr r3, [r7, #20]
8007afe: 3304 adds r3, #4
8007b00: 4618 mov r0, r3
8007b02: f006 fe2d bl 800e760 <ip4_route>
8007b06: 4601 mov r1, r0
8007b08: 697b ldr r3, [r7, #20]
8007b0a: 3304 adds r3, #4
8007b0c: 461a mov r2, r3
8007b0e: 4620 mov r0, r4
8007b10: f7ff fa30 bl 8006f74 <tcp_eff_send_mss_netif>
8007b14: 4603 mov r3, r0
8007b16: 461a mov r2, r3
8007b18: 697b ldr r3, [r7, #20]
8007b1a: 865a strh r2, [r3, #50] ; 0x32
rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK);
8007b1c: 2112 movs r1, #18
8007b1e: 6978 ldr r0, [r7, #20]
8007b20: f002 f844 bl 8009bac <tcp_enqueue_flags>
8007b24: 4603 mov r3, r0
8007b26: 73fb strb r3, [r7, #15]
if (rc != ERR_OK) {
8007b28: f997 300f ldrsb.w r3, [r7, #15]
8007b2c: 2b00 cmp r3, #0
8007b2e: d004 beq.n 8007b3a <tcp_listen_input+0x1b2>
tcp_abandon(npcb, 0);
8007b30: 2100 movs r1, #0
8007b32: 6978 ldr r0, [r7, #20]
8007b34: f7fe f97e bl 8005e34 <tcp_abandon>
return;
8007b38: e006 b.n 8007b48 <tcp_listen_input+0x1c0>
tcp_output(npcb);
8007b3a: 6978 ldr r0, [r7, #20]
8007b3c: f002 f924 bl 8009d88 <tcp_output>
return;
8007b40: e001 b.n 8007b46 <tcp_listen_input+0x1be>
return;
8007b42: bf00 nop
8007b44: e000 b.n 8007b48 <tcp_listen_input+0x1c0>
return;
8007b46: bf00 nop
}
8007b48: 371c adds r7, #28
8007b4a: 46bd mov sp, r7
8007b4c: bd90 pop {r4, r7, pc}
8007b4e: bf00 nop
8007b50: 20008bf0 .word 0x20008bf0
8007b54: 08015c0c .word 0x08015c0c
8007b58: 08015e04 .word 0x08015e04
8007b5c: 08015c58 .word 0x08015c58
8007b60: 20008be8 .word 0x20008be8
8007b64: 20008bee .word 0x20008bee
8007b68: 20008be4 .word 0x20008be4
8007b6c: 20008bd4 .word 0x20008bd4
8007b70: 2000562c .word 0x2000562c
8007b74: 20005630 .word 0x20005630
8007b78: 2000561c .word 0x2000561c
8007b7c: 20008bb8 .word 0x20008bb8
8007b80: 20008bc0 .word 0x20008bc0
08007b84 <tcp_timewait_input>:
* @note the segment which arrived is saved in global variables, therefore only the pcb
* involved is passed as a parameter to this function
*/
static void
tcp_timewait_input(struct tcp_pcb *pcb)
{
8007b84: b580 push {r7, lr}
8007b86: b086 sub sp, #24
8007b88: af04 add r7, sp, #16
8007b8a: 6078 str r0, [r7, #4]
/* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable' segments */
/* RFC 793 3.9 Event Processing - Segment Arrives:
* - first check sequence number - we skip that one in TIME_WAIT (always
* acceptable since we only send ACKs)
* - second check the RST bit (... return) */
if (flags & TCP_RST) {
8007b8c: 4b2f ldr r3, [pc, #188] ; (8007c4c <tcp_timewait_input+0xc8>)
8007b8e: 781b ldrb r3, [r3, #0]
8007b90: f003 0304 and.w r3, r3, #4
8007b94: 2b00 cmp r3, #0
8007b96: d153 bne.n 8007c40 <tcp_timewait_input+0xbc>
return;
}
LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);
8007b98: 687b ldr r3, [r7, #4]
8007b9a: 2b00 cmp r3, #0
8007b9c: d106 bne.n 8007bac <tcp_timewait_input+0x28>
8007b9e: 4b2c ldr r3, [pc, #176] ; (8007c50 <tcp_timewait_input+0xcc>)
8007ba0: f240 22ee movw r2, #750 ; 0x2ee
8007ba4: 492b ldr r1, [pc, #172] ; (8007c54 <tcp_timewait_input+0xd0>)
8007ba6: 482c ldr r0, [pc, #176] ; (8007c58 <tcp_timewait_input+0xd4>)
8007ba8: f008 f986 bl 800feb8 <printf>
/* - fourth, check the SYN bit, */
if (flags & TCP_SYN) {
8007bac: 4b27 ldr r3, [pc, #156] ; (8007c4c <tcp_timewait_input+0xc8>)
8007bae: 781b ldrb r3, [r3, #0]
8007bb0: f003 0302 and.w r3, r3, #2
8007bb4: 2b00 cmp r3, #0
8007bb6: d02a beq.n 8007c0e <tcp_timewait_input+0x8a>
/* If an incoming segment is not acceptable, an acknowledgment
should be sent in reply */
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) {
8007bb8: 4b28 ldr r3, [pc, #160] ; (8007c5c <tcp_timewait_input+0xd8>)
8007bba: 681a ldr r2, [r3, #0]
8007bbc: 687b ldr r3, [r7, #4]
8007bbe: 6a5b ldr r3, [r3, #36] ; 0x24
8007bc0: 1ad3 subs r3, r2, r3
8007bc2: 2b00 cmp r3, #0
8007bc4: db2d blt.n 8007c22 <tcp_timewait_input+0x9e>
8007bc6: 4b25 ldr r3, [pc, #148] ; (8007c5c <tcp_timewait_input+0xd8>)
8007bc8: 681a ldr r2, [r3, #0]
8007bca: 687b ldr r3, [r7, #4]
8007bcc: 6a5b ldr r3, [r3, #36] ; 0x24
8007bce: 6879 ldr r1, [r7, #4]
8007bd0: 8d09 ldrh r1, [r1, #40] ; 0x28
8007bd2: 440b add r3, r1
8007bd4: 1ad3 subs r3, r2, r3
8007bd6: 2b00 cmp r3, #0
8007bd8: dc23 bgt.n 8007c22 <tcp_timewait_input+0x9e>
/* If the SYN is in the window it is an error, send a reset */
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8007bda: 4b21 ldr r3, [pc, #132] ; (8007c60 <tcp_timewait_input+0xdc>)
8007bdc: 6819 ldr r1, [r3, #0]
8007bde: 4b21 ldr r3, [pc, #132] ; (8007c64 <tcp_timewait_input+0xe0>)
8007be0: 881b ldrh r3, [r3, #0]
8007be2: 461a mov r2, r3
8007be4: 4b1d ldr r3, [pc, #116] ; (8007c5c <tcp_timewait_input+0xd8>)
8007be6: 681b ldr r3, [r3, #0]
8007be8: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8007bea: 4b1f ldr r3, [pc, #124] ; (8007c68 <tcp_timewait_input+0xe4>)
8007bec: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8007bee: 885b ldrh r3, [r3, #2]
8007bf0: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8007bf2: 4a1d ldr r2, [pc, #116] ; (8007c68 <tcp_timewait_input+0xe4>)
8007bf4: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8007bf6: 8812 ldrh r2, [r2, #0]
8007bf8: b292 uxth r2, r2
8007bfa: 9202 str r2, [sp, #8]
8007bfc: 9301 str r3, [sp, #4]
8007bfe: 4b1b ldr r3, [pc, #108] ; (8007c6c <tcp_timewait_input+0xe8>)
8007c00: 9300 str r3, [sp, #0]
8007c02: 4b1b ldr r3, [pc, #108] ; (8007c70 <tcp_timewait_input+0xec>)
8007c04: 4602 mov r2, r0
8007c06: 6878 ldr r0, [r7, #4]
8007c08: f002 fe72 bl 800a8f0 <tcp_rst>
return;
8007c0c: e01b b.n 8007c46 <tcp_timewait_input+0xc2>
}
} else if (flags & TCP_FIN) {
8007c0e: 4b0f ldr r3, [pc, #60] ; (8007c4c <tcp_timewait_input+0xc8>)
8007c10: 781b ldrb r3, [r3, #0]
8007c12: f003 0301 and.w r3, r3, #1
8007c16: 2b00 cmp r3, #0
8007c18: d003 beq.n 8007c22 <tcp_timewait_input+0x9e>
/* - eighth, check the FIN bit: Remain in the TIME-WAIT state.
Restart the 2 MSL time-wait timeout.*/
pcb->tmr = tcp_ticks;
8007c1a: 4b16 ldr r3, [pc, #88] ; (8007c74 <tcp_timewait_input+0xf0>)
8007c1c: 681a ldr r2, [r3, #0]
8007c1e: 687b ldr r3, [r7, #4]
8007c20: 621a str r2, [r3, #32]
}
if ((tcplen > 0)) {
8007c22: 4b10 ldr r3, [pc, #64] ; (8007c64 <tcp_timewait_input+0xe0>)
8007c24: 881b ldrh r3, [r3, #0]
8007c26: 2b00 cmp r3, #0
8007c28: d00c beq.n 8007c44 <tcp_timewait_input+0xc0>
/* Acknowledge data, FIN or out-of-window SYN */
tcp_ack_now(pcb);
8007c2a: 687b ldr r3, [r7, #4]
8007c2c: 8b5b ldrh r3, [r3, #26]
8007c2e: f043 0302 orr.w r3, r3, #2
8007c32: b29a uxth r2, r3
8007c34: 687b ldr r3, [r7, #4]
8007c36: 835a strh r2, [r3, #26]
tcp_output(pcb);
8007c38: 6878 ldr r0, [r7, #4]
8007c3a: f002 f8a5 bl 8009d88 <tcp_output>
}
return;
8007c3e: e001 b.n 8007c44 <tcp_timewait_input+0xc0>
return;
8007c40: bf00 nop
8007c42: e000 b.n 8007c46 <tcp_timewait_input+0xc2>
return;
8007c44: bf00 nop
}
8007c46: 3708 adds r7, #8
8007c48: 46bd mov sp, r7
8007c4a: bd80 pop {r7, pc}
8007c4c: 20008bf0 .word 0x20008bf0
8007c50: 08015c0c .word 0x08015c0c
8007c54: 08015e24 .word 0x08015e24
8007c58: 08015c58 .word 0x08015c58
8007c5c: 20008be4 .word 0x20008be4
8007c60: 20008be8 .word 0x20008be8
8007c64: 20008bee .word 0x20008bee
8007c68: 20008bd4 .word 0x20008bd4
8007c6c: 2000562c .word 0x2000562c
8007c70: 20005630 .word 0x20005630
8007c74: 20008bac .word 0x20008bac
08007c78 <tcp_process>:
* @note the segment which arrived is saved in global variables, therefore only the pcb
* involved is passed as a parameter to this function
*/
static err_t
tcp_process(struct tcp_pcb *pcb)
{
8007c78: b590 push {r4, r7, lr}
8007c7a: b08d sub sp, #52 ; 0x34
8007c7c: af04 add r7, sp, #16
8007c7e: 6078 str r0, [r7, #4]
struct tcp_seg *rseg;
u8_t acceptable = 0;
8007c80: 2300 movs r3, #0
8007c82: 76fb strb r3, [r7, #27]
err_t err;
err = ERR_OK;
8007c84: 2300 movs r3, #0
8007c86: 76bb strb r3, [r7, #26]
LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);
8007c88: 687b ldr r3, [r7, #4]
8007c8a: 2b00 cmp r3, #0
8007c8c: d106 bne.n 8007c9c <tcp_process+0x24>
8007c8e: 4b9d ldr r3, [pc, #628] ; (8007f04 <tcp_process+0x28c>)
8007c90: f44f 7247 mov.w r2, #796 ; 0x31c
8007c94: 499c ldr r1, [pc, #624] ; (8007f08 <tcp_process+0x290>)
8007c96: 489d ldr r0, [pc, #628] ; (8007f0c <tcp_process+0x294>)
8007c98: f008 f90e bl 800feb8 <printf>
/* Process incoming RST segments. */
if (flags & TCP_RST) {
8007c9c: 4b9c ldr r3, [pc, #624] ; (8007f10 <tcp_process+0x298>)
8007c9e: 781b ldrb r3, [r3, #0]
8007ca0: f003 0304 and.w r3, r3, #4
8007ca4: 2b00 cmp r3, #0
8007ca6: d04e beq.n 8007d46 <tcp_process+0xce>
/* First, determine if the reset is acceptable. */
if (pcb->state == SYN_SENT) {
8007ca8: 687b ldr r3, [r7, #4]
8007caa: 7d1b ldrb r3, [r3, #20]
8007cac: 2b02 cmp r3, #2
8007cae: d108 bne.n 8007cc2 <tcp_process+0x4a>
/* "In the SYN-SENT state (a RST received in response to an initial SYN),
the RST is acceptable if the ACK field acknowledges the SYN." */
if (ackno == pcb->snd_nxt) {
8007cb0: 687b ldr r3, [r7, #4]
8007cb2: 6d1a ldr r2, [r3, #80] ; 0x50
8007cb4: 4b97 ldr r3, [pc, #604] ; (8007f14 <tcp_process+0x29c>)
8007cb6: 681b ldr r3, [r3, #0]
8007cb8: 429a cmp r2, r3
8007cba: d123 bne.n 8007d04 <tcp_process+0x8c>
acceptable = 1;
8007cbc: 2301 movs r3, #1
8007cbe: 76fb strb r3, [r7, #27]
8007cc0: e020 b.n 8007d04 <tcp_process+0x8c>
}
} else {
/* "In all states except SYN-SENT, all reset (RST) segments are validated
by checking their SEQ-fields." */
if (seqno == pcb->rcv_nxt) {
8007cc2: 687b ldr r3, [r7, #4]
8007cc4: 6a5a ldr r2, [r3, #36] ; 0x24
8007cc6: 4b94 ldr r3, [pc, #592] ; (8007f18 <tcp_process+0x2a0>)
8007cc8: 681b ldr r3, [r3, #0]
8007cca: 429a cmp r2, r3
8007ccc: d102 bne.n 8007cd4 <tcp_process+0x5c>
acceptable = 1;
8007cce: 2301 movs r3, #1
8007cd0: 76fb strb r3, [r7, #27]
8007cd2: e017 b.n 8007d04 <tcp_process+0x8c>
} else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
8007cd4: 4b90 ldr r3, [pc, #576] ; (8007f18 <tcp_process+0x2a0>)
8007cd6: 681a ldr r2, [r3, #0]
8007cd8: 687b ldr r3, [r7, #4]
8007cda: 6a5b ldr r3, [r3, #36] ; 0x24
8007cdc: 1ad3 subs r3, r2, r3
8007cde: 2b00 cmp r3, #0
8007ce0: db10 blt.n 8007d04 <tcp_process+0x8c>
8007ce2: 4b8d ldr r3, [pc, #564] ; (8007f18 <tcp_process+0x2a0>)
8007ce4: 681a ldr r2, [r3, #0]
8007ce6: 687b ldr r3, [r7, #4]
8007ce8: 6a5b ldr r3, [r3, #36] ; 0x24
8007cea: 6879 ldr r1, [r7, #4]
8007cec: 8d09 ldrh r1, [r1, #40] ; 0x28
8007cee: 440b add r3, r1
8007cf0: 1ad3 subs r3, r2, r3
8007cf2: 2b00 cmp r3, #0
8007cf4: dc06 bgt.n 8007d04 <tcp_process+0x8c>
pcb->rcv_nxt + pcb->rcv_wnd)) {
/* If the sequence number is inside the window, we send a challenge ACK
and wait for a re-send with matching sequence number.
This follows RFC 5961 section 3.2 and addresses CVE-2004-0230
(RST spoofing attack), which is present in RFC 793 RST handling. */
tcp_ack_now(pcb);
8007cf6: 687b ldr r3, [r7, #4]
8007cf8: 8b5b ldrh r3, [r3, #26]
8007cfa: f043 0302 orr.w r3, r3, #2
8007cfe: b29a uxth r2, r3
8007d00: 687b ldr r3, [r7, #4]
8007d02: 835a strh r2, [r3, #26]
}
}
if (acceptable) {
8007d04: 7efb ldrb r3, [r7, #27]
8007d06: 2b00 cmp r3, #0
8007d08: d01b beq.n 8007d42 <tcp_process+0xca>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n"));
LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
8007d0a: 687b ldr r3, [r7, #4]
8007d0c: 7d1b ldrb r3, [r3, #20]
8007d0e: 2b00 cmp r3, #0
8007d10: d106 bne.n 8007d20 <tcp_process+0xa8>
8007d12: 4b7c ldr r3, [pc, #496] ; (8007f04 <tcp_process+0x28c>)
8007d14: f44f 724e mov.w r2, #824 ; 0x338
8007d18: 4980 ldr r1, [pc, #512] ; (8007f1c <tcp_process+0x2a4>)
8007d1a: 487c ldr r0, [pc, #496] ; (8007f0c <tcp_process+0x294>)
8007d1c: f008 f8cc bl 800feb8 <printf>
recv_flags |= TF_RESET;
8007d20: 4b7f ldr r3, [pc, #508] ; (8007f20 <tcp_process+0x2a8>)
8007d22: 781b ldrb r3, [r3, #0]
8007d24: f043 0308 orr.w r3, r3, #8
8007d28: b2da uxtb r2, r3
8007d2a: 4b7d ldr r3, [pc, #500] ; (8007f20 <tcp_process+0x2a8>)
8007d2c: 701a strb r2, [r3, #0]
tcp_clear_flags(pcb, TF_ACK_DELAY);
8007d2e: 687b ldr r3, [r7, #4]
8007d30: 8b5b ldrh r3, [r3, #26]
8007d32: f023 0301 bic.w r3, r3, #1
8007d36: b29a uxth r2, r3
8007d38: 687b ldr r3, [r7, #4]
8007d3a: 835a strh r2, [r3, #26]
return ERR_RST;
8007d3c: f06f 030d mvn.w r3, #13
8007d40: e37a b.n 8008438 <tcp_process+0x7c0>
} else {
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n",
seqno, pcb->rcv_nxt));
LWIP_DEBUGF(TCP_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n",
seqno, pcb->rcv_nxt));
return ERR_OK;
8007d42: 2300 movs r3, #0
8007d44: e378 b.n 8008438 <tcp_process+0x7c0>
}
}
if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) {
8007d46: 4b72 ldr r3, [pc, #456] ; (8007f10 <tcp_process+0x298>)
8007d48: 781b ldrb r3, [r3, #0]
8007d4a: f003 0302 and.w r3, r3, #2
8007d4e: 2b00 cmp r3, #0
8007d50: d010 beq.n 8007d74 <tcp_process+0xfc>
8007d52: 687b ldr r3, [r7, #4]
8007d54: 7d1b ldrb r3, [r3, #20]
8007d56: 2b02 cmp r3, #2
8007d58: d00c beq.n 8007d74 <tcp_process+0xfc>
8007d5a: 687b ldr r3, [r7, #4]
8007d5c: 7d1b ldrb r3, [r3, #20]
8007d5e: 2b03 cmp r3, #3
8007d60: d008 beq.n 8007d74 <tcp_process+0xfc>
/* Cope with new connection attempt after remote end crashed */
tcp_ack_now(pcb);
8007d62: 687b ldr r3, [r7, #4]
8007d64: 8b5b ldrh r3, [r3, #26]
8007d66: f043 0302 orr.w r3, r3, #2
8007d6a: b29a uxth r2, r3
8007d6c: 687b ldr r3, [r7, #4]
8007d6e: 835a strh r2, [r3, #26]
return ERR_OK;
8007d70: 2300 movs r3, #0
8007d72: e361 b.n 8008438 <tcp_process+0x7c0>
}
if ((pcb->flags & TF_RXCLOSED) == 0) {
8007d74: 687b ldr r3, [r7, #4]
8007d76: 8b5b ldrh r3, [r3, #26]
8007d78: f003 0310 and.w r3, r3, #16
8007d7c: 2b00 cmp r3, #0
8007d7e: d103 bne.n 8007d88 <tcp_process+0x110>
/* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */
pcb->tmr = tcp_ticks;
8007d80: 4b68 ldr r3, [pc, #416] ; (8007f24 <tcp_process+0x2ac>)
8007d82: 681a ldr r2, [r3, #0]
8007d84: 687b ldr r3, [r7, #4]
8007d86: 621a str r2, [r3, #32]
}
pcb->keep_cnt_sent = 0;
8007d88: 687b ldr r3, [r7, #4]
8007d8a: 2200 movs r2, #0
8007d8c: f883 209b strb.w r2, [r3, #155] ; 0x9b
pcb->persist_probe = 0;
8007d90: 687b ldr r3, [r7, #4]
8007d92: 2200 movs r2, #0
8007d94: f883 209a strb.w r2, [r3, #154] ; 0x9a
tcp_parseopt(pcb);
8007d98: 6878 ldr r0, [r7, #4]
8007d9a: f001 fc2f bl 80095fc <tcp_parseopt>
/* Do different things depending on the TCP state. */
switch (pcb->state) {
8007d9e: 687b ldr r3, [r7, #4]
8007da0: 7d1b ldrb r3, [r3, #20]
8007da2: 3b02 subs r3, #2
8007da4: 2b07 cmp r3, #7
8007da6: f200 8337 bhi.w 8008418 <tcp_process+0x7a0>
8007daa: a201 add r2, pc, #4 ; (adr r2, 8007db0 <tcp_process+0x138>)
8007dac: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8007db0: 08007dd1 .word 0x08007dd1
8007db4: 08008001 .word 0x08008001
8007db8: 08008179 .word 0x08008179
8007dbc: 080081a3 .word 0x080081a3
8007dc0: 080082c7 .word 0x080082c7
8007dc4: 08008179 .word 0x08008179
8007dc8: 08008353 .word 0x08008353
8007dcc: 080083e3 .word 0x080083e3
case SYN_SENT:
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno,
pcb->snd_nxt, lwip_ntohl(pcb->unacked->tcphdr->seqno)));
/* received SYN ACK with expected sequence number? */
if ((flags & TCP_ACK) && (flags & TCP_SYN)
8007dd0: 4b4f ldr r3, [pc, #316] ; (8007f10 <tcp_process+0x298>)
8007dd2: 781b ldrb r3, [r3, #0]
8007dd4: f003 0310 and.w r3, r3, #16
8007dd8: 2b00 cmp r3, #0
8007dda: f000 80e4 beq.w 8007fa6 <tcp_process+0x32e>
8007dde: 4b4c ldr r3, [pc, #304] ; (8007f10 <tcp_process+0x298>)
8007de0: 781b ldrb r3, [r3, #0]
8007de2: f003 0302 and.w r3, r3, #2
8007de6: 2b00 cmp r3, #0
8007de8: f000 80dd beq.w 8007fa6 <tcp_process+0x32e>
&& (ackno == pcb->lastack + 1)) {
8007dec: 687b ldr r3, [r7, #4]
8007dee: 6c5b ldr r3, [r3, #68] ; 0x44
8007df0: 1c5a adds r2, r3, #1
8007df2: 4b48 ldr r3, [pc, #288] ; (8007f14 <tcp_process+0x29c>)
8007df4: 681b ldr r3, [r3, #0]
8007df6: 429a cmp r2, r3
8007df8: f040 80d5 bne.w 8007fa6 <tcp_process+0x32e>
pcb->rcv_nxt = seqno + 1;
8007dfc: 4b46 ldr r3, [pc, #280] ; (8007f18 <tcp_process+0x2a0>)
8007dfe: 681b ldr r3, [r3, #0]
8007e00: 1c5a adds r2, r3, #1
8007e02: 687b ldr r3, [r7, #4]
8007e04: 625a str r2, [r3, #36] ; 0x24
pcb->rcv_ann_right_edge = pcb->rcv_nxt;
8007e06: 687b ldr r3, [r7, #4]
8007e08: 6a5a ldr r2, [r3, #36] ; 0x24
8007e0a: 687b ldr r3, [r7, #4]
8007e0c: 62da str r2, [r3, #44] ; 0x2c
pcb->lastack = ackno;
8007e0e: 4b41 ldr r3, [pc, #260] ; (8007f14 <tcp_process+0x29c>)
8007e10: 681a ldr r2, [r3, #0]
8007e12: 687b ldr r3, [r7, #4]
8007e14: 645a str r2, [r3, #68] ; 0x44
pcb->snd_wnd = tcphdr->wnd;
8007e16: 4b44 ldr r3, [pc, #272] ; (8007f28 <tcp_process+0x2b0>)
8007e18: 681b ldr r3, [r3, #0]
8007e1a: 89db ldrh r3, [r3, #14]
8007e1c: b29a uxth r2, r3
8007e1e: 687b ldr r3, [r7, #4]
8007e20: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
pcb->snd_wnd_max = pcb->snd_wnd;
8007e24: 687b ldr r3, [r7, #4]
8007e26: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8007e2a: 687b ldr r3, [r7, #4]
8007e2c: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
8007e30: 4b39 ldr r3, [pc, #228] ; (8007f18 <tcp_process+0x2a0>)
8007e32: 681b ldr r3, [r3, #0]
8007e34: 1e5a subs r2, r3, #1
8007e36: 687b ldr r3, [r7, #4]
8007e38: 655a str r2, [r3, #84] ; 0x54
pcb->state = ESTABLISHED;
8007e3a: 687b ldr r3, [r7, #4]
8007e3c: 2204 movs r2, #4
8007e3e: 751a strb r2, [r3, #20]
#if TCP_CALCULATE_EFF_SEND_MSS
pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip);
8007e40: 687b ldr r3, [r7, #4]
8007e42: 8e5c ldrh r4, [r3, #50] ; 0x32
8007e44: 687b ldr r3, [r7, #4]
8007e46: 3304 adds r3, #4
8007e48: 4618 mov r0, r3
8007e4a: f006 fc89 bl 800e760 <ip4_route>
8007e4e: 4601 mov r1, r0
8007e50: 687b ldr r3, [r7, #4]
8007e52: 3304 adds r3, #4
8007e54: 461a mov r2, r3
8007e56: 4620 mov r0, r4
8007e58: f7ff f88c bl 8006f74 <tcp_eff_send_mss_netif>
8007e5c: 4603 mov r3, r0
8007e5e: 461a mov r2, r3
8007e60: 687b ldr r3, [r7, #4]
8007e62: 865a strh r2, [r3, #50] ; 0x32
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
8007e64: 687b ldr r3, [r7, #4]
8007e66: 8e5b ldrh r3, [r3, #50] ; 0x32
8007e68: 009a lsls r2, r3, #2
8007e6a: 687b ldr r3, [r7, #4]
8007e6c: 8e5b ldrh r3, [r3, #50] ; 0x32
8007e6e: 005b lsls r3, r3, #1
8007e70: f241 111c movw r1, #4380 ; 0x111c
8007e74: 428b cmp r3, r1
8007e76: bf38 it cc
8007e78: 460b movcc r3, r1
8007e7a: 429a cmp r2, r3
8007e7c: d204 bcs.n 8007e88 <tcp_process+0x210>
8007e7e: 687b ldr r3, [r7, #4]
8007e80: 8e5b ldrh r3, [r3, #50] ; 0x32
8007e82: 009b lsls r3, r3, #2
8007e84: b29b uxth r3, r3
8007e86: e00d b.n 8007ea4 <tcp_process+0x22c>
8007e88: 687b ldr r3, [r7, #4]
8007e8a: 8e5b ldrh r3, [r3, #50] ; 0x32
8007e8c: 005b lsls r3, r3, #1
8007e8e: f241 121c movw r2, #4380 ; 0x111c
8007e92: 4293 cmp r3, r2
8007e94: d904 bls.n 8007ea0 <tcp_process+0x228>
8007e96: 687b ldr r3, [r7, #4]
8007e98: 8e5b ldrh r3, [r3, #50] ; 0x32
8007e9a: 005b lsls r3, r3, #1
8007e9c: b29b uxth r3, r3
8007e9e: e001 b.n 8007ea4 <tcp_process+0x22c>
8007ea0: f241 131c movw r3, #4380 ; 0x111c
8007ea4: 687a ldr r2, [r7, #4]
8007ea6: f8a2 3048 strh.w r3, [r2, #72] ; 0x48
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SENT): cwnd %"TCPWNDSIZE_F
" ssthresh %"TCPWNDSIZE_F"\n",
pcb->cwnd, pcb->ssthresh));
LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0));
8007eaa: 687b ldr r3, [r7, #4]
8007eac: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8007eb0: 2b00 cmp r3, #0
8007eb2: d106 bne.n 8007ec2 <tcp_process+0x24a>
8007eb4: 4b13 ldr r3, [pc, #76] ; (8007f04 <tcp_process+0x28c>)
8007eb6: f44f 725b mov.w r2, #876 ; 0x36c
8007eba: 491c ldr r1, [pc, #112] ; (8007f2c <tcp_process+0x2b4>)
8007ebc: 4813 ldr r0, [pc, #76] ; (8007f0c <tcp_process+0x294>)
8007ebe: f007 fffb bl 800feb8 <printf>
--pcb->snd_queuelen;
8007ec2: 687b ldr r3, [r7, #4]
8007ec4: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8007ec8: 3b01 subs r3, #1
8007eca: b29a uxth r2, r3
8007ecc: 687b ldr r3, [r7, #4]
8007ece: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen));
rseg = pcb->unacked;
8007ed2: 687b ldr r3, [r7, #4]
8007ed4: 6f1b ldr r3, [r3, #112] ; 0x70
8007ed6: 61fb str r3, [r7, #28]
if (rseg == NULL) {
8007ed8: 69fb ldr r3, [r7, #28]
8007eda: 2b00 cmp r3, #0
8007edc: d12a bne.n 8007f34 <tcp_process+0x2bc>
/* might happen if tcp_output fails in tcp_rexmit_rto()
in which case the segment is on the unsent list */
rseg = pcb->unsent;
8007ede: 687b ldr r3, [r7, #4]
8007ee0: 6edb ldr r3, [r3, #108] ; 0x6c
8007ee2: 61fb str r3, [r7, #28]
LWIP_ASSERT("no segment to free", rseg != NULL);
8007ee4: 69fb ldr r3, [r7, #28]
8007ee6: 2b00 cmp r3, #0
8007ee8: d106 bne.n 8007ef8 <tcp_process+0x280>
8007eea: 4b06 ldr r3, [pc, #24] ; (8007f04 <tcp_process+0x28c>)
8007eec: f44f 725d mov.w r2, #884 ; 0x374
8007ef0: 490f ldr r1, [pc, #60] ; (8007f30 <tcp_process+0x2b8>)
8007ef2: 4806 ldr r0, [pc, #24] ; (8007f0c <tcp_process+0x294>)
8007ef4: f007 ffe0 bl 800feb8 <printf>
pcb->unsent = rseg->next;
8007ef8: 69fb ldr r3, [r7, #28]
8007efa: 681a ldr r2, [r3, #0]
8007efc: 687b ldr r3, [r7, #4]
8007efe: 66da str r2, [r3, #108] ; 0x6c
8007f00: e01c b.n 8007f3c <tcp_process+0x2c4>
8007f02: bf00 nop
8007f04: 08015c0c .word 0x08015c0c
8007f08: 08015e44 .word 0x08015e44
8007f0c: 08015c58 .word 0x08015c58
8007f10: 20008bf0 .word 0x20008bf0
8007f14: 20008be8 .word 0x20008be8
8007f18: 20008be4 .word 0x20008be4
8007f1c: 08015e60 .word 0x08015e60
8007f20: 20008bf1 .word 0x20008bf1
8007f24: 20008bac .word 0x20008bac
8007f28: 20008bd4 .word 0x20008bd4
8007f2c: 08015e80 .word 0x08015e80
8007f30: 08015e98 .word 0x08015e98
} else {
pcb->unacked = rseg->next;
8007f34: 69fb ldr r3, [r7, #28]
8007f36: 681a ldr r2, [r3, #0]
8007f38: 687b ldr r3, [r7, #4]
8007f3a: 671a str r2, [r3, #112] ; 0x70
}
tcp_seg_free(rseg);
8007f3c: 69f8 ldr r0, [r7, #28]
8007f3e: f7fe fd22 bl 8006986 <tcp_seg_free>
/* If there's nothing left to acknowledge, stop the retransmit
timer, otherwise reset it to start again */
if (pcb->unacked == NULL) {
8007f42: 687b ldr r3, [r7, #4]
8007f44: 6f1b ldr r3, [r3, #112] ; 0x70
8007f46: 2b00 cmp r3, #0
8007f48: d104 bne.n 8007f54 <tcp_process+0x2dc>
pcb->rtime = -1;
8007f4a: 687b ldr r3, [r7, #4]
8007f4c: f64f 72ff movw r2, #65535 ; 0xffff
8007f50: 861a strh r2, [r3, #48] ; 0x30
8007f52: e006 b.n 8007f62 <tcp_process+0x2ea>
} else {
pcb->rtime = 0;
8007f54: 687b ldr r3, [r7, #4]
8007f56: 2200 movs r2, #0
8007f58: 861a strh r2, [r3, #48] ; 0x30
pcb->nrtx = 0;
8007f5a: 687b ldr r3, [r7, #4]
8007f5c: 2200 movs r2, #0
8007f5e: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Call the user specified function to call when successfully
* connected. */
TCP_EVENT_CONNECTED(pcb, ERR_OK, err);
8007f62: 687b ldr r3, [r7, #4]
8007f64: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8007f68: 2b00 cmp r3, #0
8007f6a: d00a beq.n 8007f82 <tcp_process+0x30a>
8007f6c: 687b ldr r3, [r7, #4]
8007f6e: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8007f72: 687a ldr r2, [r7, #4]
8007f74: 6910 ldr r0, [r2, #16]
8007f76: 2200 movs r2, #0
8007f78: 6879 ldr r1, [r7, #4]
8007f7a: 4798 blx r3
8007f7c: 4603 mov r3, r0
8007f7e: 76bb strb r3, [r7, #26]
8007f80: e001 b.n 8007f86 <tcp_process+0x30e>
8007f82: 2300 movs r3, #0
8007f84: 76bb strb r3, [r7, #26]
if (err == ERR_ABRT) {
8007f86: f997 301a ldrsb.w r3, [r7, #26]
8007f8a: f113 0f0d cmn.w r3, #13
8007f8e: d102 bne.n 8007f96 <tcp_process+0x31e>
return ERR_ABRT;
8007f90: f06f 030c mvn.w r3, #12
8007f94: e250 b.n 8008438 <tcp_process+0x7c0>
}
tcp_ack_now(pcb);
8007f96: 687b ldr r3, [r7, #4]
8007f98: 8b5b ldrh r3, [r3, #26]
8007f9a: f043 0302 orr.w r3, r3, #2
8007f9e: b29a uxth r2, r3
8007fa0: 687b ldr r3, [r7, #4]
8007fa2: 835a strh r2, [r3, #26]
if (pcb->nrtx < TCP_SYNMAXRTX) {
pcb->rtime = 0;
tcp_rexmit_rto(pcb);
}
}
break;
8007fa4: e23a b.n 800841c <tcp_process+0x7a4>
else if (flags & TCP_ACK) {
8007fa6: 4b98 ldr r3, [pc, #608] ; (8008208 <tcp_process+0x590>)
8007fa8: 781b ldrb r3, [r3, #0]
8007faa: f003 0310 and.w r3, r3, #16
8007fae: 2b00 cmp r3, #0
8007fb0: f000 8234 beq.w 800841c <tcp_process+0x7a4>
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8007fb4: 4b95 ldr r3, [pc, #596] ; (800820c <tcp_process+0x594>)
8007fb6: 6819 ldr r1, [r3, #0]
8007fb8: 4b95 ldr r3, [pc, #596] ; (8008210 <tcp_process+0x598>)
8007fba: 881b ldrh r3, [r3, #0]
8007fbc: 461a mov r2, r3
8007fbe: 4b95 ldr r3, [pc, #596] ; (8008214 <tcp_process+0x59c>)
8007fc0: 681b ldr r3, [r3, #0]
8007fc2: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8007fc4: 4b94 ldr r3, [pc, #592] ; (8008218 <tcp_process+0x5a0>)
8007fc6: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8007fc8: 885b ldrh r3, [r3, #2]
8007fca: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8007fcc: 4a92 ldr r2, [pc, #584] ; (8008218 <tcp_process+0x5a0>)
8007fce: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8007fd0: 8812 ldrh r2, [r2, #0]
8007fd2: b292 uxth r2, r2
8007fd4: 9202 str r2, [sp, #8]
8007fd6: 9301 str r3, [sp, #4]
8007fd8: 4b90 ldr r3, [pc, #576] ; (800821c <tcp_process+0x5a4>)
8007fda: 9300 str r3, [sp, #0]
8007fdc: 4b90 ldr r3, [pc, #576] ; (8008220 <tcp_process+0x5a8>)
8007fde: 4602 mov r2, r0
8007fe0: 6878 ldr r0, [r7, #4]
8007fe2: f002 fc85 bl 800a8f0 <tcp_rst>
if (pcb->nrtx < TCP_SYNMAXRTX) {
8007fe6: 687b ldr r3, [r7, #4]
8007fe8: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8007fec: 2b05 cmp r3, #5
8007fee: f200 8215 bhi.w 800841c <tcp_process+0x7a4>
pcb->rtime = 0;
8007ff2: 687b ldr r3, [r7, #4]
8007ff4: 2200 movs r2, #0
8007ff6: 861a strh r2, [r3, #48] ; 0x30
tcp_rexmit_rto(pcb);
8007ff8: 6878 ldr r0, [r7, #4]
8007ffa: f002 fa4f bl 800a49c <tcp_rexmit_rto>
break;
8007ffe: e20d b.n 800841c <tcp_process+0x7a4>
case SYN_RCVD:
if (flags & TCP_ACK) {
8008000: 4b81 ldr r3, [pc, #516] ; (8008208 <tcp_process+0x590>)
8008002: 781b ldrb r3, [r3, #0]
8008004: f003 0310 and.w r3, r3, #16
8008008: 2b00 cmp r3, #0
800800a: f000 80a1 beq.w 8008150 <tcp_process+0x4d8>
/* expected ACK number? */
if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
800800e: 4b7f ldr r3, [pc, #508] ; (800820c <tcp_process+0x594>)
8008010: 681a ldr r2, [r3, #0]
8008012: 687b ldr r3, [r7, #4]
8008014: 6c5b ldr r3, [r3, #68] ; 0x44
8008016: 1ad3 subs r3, r2, r3
8008018: 3b01 subs r3, #1
800801a: 2b00 cmp r3, #0
800801c: db7e blt.n 800811c <tcp_process+0x4a4>
800801e: 4b7b ldr r3, [pc, #492] ; (800820c <tcp_process+0x594>)
8008020: 681a ldr r2, [r3, #0]
8008022: 687b ldr r3, [r7, #4]
8008024: 6d1b ldr r3, [r3, #80] ; 0x50
8008026: 1ad3 subs r3, r2, r3
8008028: 2b00 cmp r3, #0
800802a: dc77 bgt.n 800811c <tcp_process+0x4a4>
pcb->state = ESTABLISHED;
800802c: 687b ldr r3, [r7, #4]
800802e: 2204 movs r2, #4
8008030: 751a strb r2, [r3, #20]
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
if (pcb->listener == NULL) {
8008032: 687b ldr r3, [r7, #4]
8008034: 6fdb ldr r3, [r3, #124] ; 0x7c
8008036: 2b00 cmp r3, #0
8008038: d102 bne.n 8008040 <tcp_process+0x3c8>
/* listen pcb might be closed by now */
err = ERR_VAL;
800803a: 23fa movs r3, #250 ; 0xfa
800803c: 76bb strb r3, [r7, #26]
800803e: e01d b.n 800807c <tcp_process+0x404>
} else
#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */
{
#if LWIP_CALLBACK_API
LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL);
8008040: 687b ldr r3, [r7, #4]
8008042: 6fdb ldr r3, [r3, #124] ; 0x7c
8008044: 699b ldr r3, [r3, #24]
8008046: 2b00 cmp r3, #0
8008048: d106 bne.n 8008058 <tcp_process+0x3e0>
800804a: 4b76 ldr r3, [pc, #472] ; (8008224 <tcp_process+0x5ac>)
800804c: f44f 726a mov.w r2, #936 ; 0x3a8
8008050: 4975 ldr r1, [pc, #468] ; (8008228 <tcp_process+0x5b0>)
8008052: 4876 ldr r0, [pc, #472] ; (800822c <tcp_process+0x5b4>)
8008054: f007 ff30 bl 800feb8 <printf>
#endif
tcp_backlog_accepted(pcb);
/* Call the accept function. */
TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
8008058: 687b ldr r3, [r7, #4]
800805a: 6fdb ldr r3, [r3, #124] ; 0x7c
800805c: 699b ldr r3, [r3, #24]
800805e: 2b00 cmp r3, #0
8008060: d00a beq.n 8008078 <tcp_process+0x400>
8008062: 687b ldr r3, [r7, #4]
8008064: 6fdb ldr r3, [r3, #124] ; 0x7c
8008066: 699b ldr r3, [r3, #24]
8008068: 687a ldr r2, [r7, #4]
800806a: 6910 ldr r0, [r2, #16]
800806c: 2200 movs r2, #0
800806e: 6879 ldr r1, [r7, #4]
8008070: 4798 blx r3
8008072: 4603 mov r3, r0
8008074: 76bb strb r3, [r7, #26]
8008076: e001 b.n 800807c <tcp_process+0x404>
8008078: 23f0 movs r3, #240 ; 0xf0
800807a: 76bb strb r3, [r7, #26]
}
if (err != ERR_OK) {
800807c: f997 301a ldrsb.w r3, [r7, #26]
8008080: 2b00 cmp r3, #0
8008082: d00a beq.n 800809a <tcp_process+0x422>
/* If the accept function returns with an error, we abort
* the connection. */
/* Already aborted? */
if (err != ERR_ABRT) {
8008084: f997 301a ldrsb.w r3, [r7, #26]
8008088: f113 0f0d cmn.w r3, #13
800808c: d002 beq.n 8008094 <tcp_process+0x41c>
tcp_abort(pcb);
800808e: 6878 ldr r0, [r7, #4]
8008090: f7fd ff8e bl 8005fb0 <tcp_abort>
}
return ERR_ABRT;
8008094: f06f 030c mvn.w r3, #12
8008098: e1ce b.n 8008438 <tcp_process+0x7c0>
}
/* If there was any data contained within this ACK,
* we'd better pass it on to the application as well. */
tcp_receive(pcb);
800809a: 6878 ldr r0, [r7, #4]
800809c: f000 fae0 bl 8008660 <tcp_receive>
/* Prevent ACK for SYN to generate a sent event */
if (recv_acked != 0) {
80080a0: 4b63 ldr r3, [pc, #396] ; (8008230 <tcp_process+0x5b8>)
80080a2: 881b ldrh r3, [r3, #0]
80080a4: 2b00 cmp r3, #0
80080a6: d005 beq.n 80080b4 <tcp_process+0x43c>
recv_acked--;
80080a8: 4b61 ldr r3, [pc, #388] ; (8008230 <tcp_process+0x5b8>)
80080aa: 881b ldrh r3, [r3, #0]
80080ac: 3b01 subs r3, #1
80080ae: b29a uxth r2, r3
80080b0: 4b5f ldr r3, [pc, #380] ; (8008230 <tcp_process+0x5b8>)
80080b2: 801a strh r2, [r3, #0]
}
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
80080b4: 687b ldr r3, [r7, #4]
80080b6: 8e5b ldrh r3, [r3, #50] ; 0x32
80080b8: 009a lsls r2, r3, #2
80080ba: 687b ldr r3, [r7, #4]
80080bc: 8e5b ldrh r3, [r3, #50] ; 0x32
80080be: 005b lsls r3, r3, #1
80080c0: f241 111c movw r1, #4380 ; 0x111c
80080c4: 428b cmp r3, r1
80080c6: bf38 it cc
80080c8: 460b movcc r3, r1
80080ca: 429a cmp r2, r3
80080cc: d204 bcs.n 80080d8 <tcp_process+0x460>
80080ce: 687b ldr r3, [r7, #4]
80080d0: 8e5b ldrh r3, [r3, #50] ; 0x32
80080d2: 009b lsls r3, r3, #2
80080d4: b29b uxth r3, r3
80080d6: e00d b.n 80080f4 <tcp_process+0x47c>
80080d8: 687b ldr r3, [r7, #4]
80080da: 8e5b ldrh r3, [r3, #50] ; 0x32
80080dc: 005b lsls r3, r3, #1
80080de: f241 121c movw r2, #4380 ; 0x111c
80080e2: 4293 cmp r3, r2
80080e4: d904 bls.n 80080f0 <tcp_process+0x478>
80080e6: 687b ldr r3, [r7, #4]
80080e8: 8e5b ldrh r3, [r3, #50] ; 0x32
80080ea: 005b lsls r3, r3, #1
80080ec: b29b uxth r3, r3
80080ee: e001 b.n 80080f4 <tcp_process+0x47c>
80080f0: f241 131c movw r3, #4380 ; 0x111c
80080f4: 687a ldr r2, [r7, #4]
80080f6: f8a2 3048 strh.w r3, [r2, #72] ; 0x48
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SYN_RCVD): cwnd %"TCPWNDSIZE_F
" ssthresh %"TCPWNDSIZE_F"\n",
pcb->cwnd, pcb->ssthresh));
if (recv_flags & TF_GOT_FIN) {
80080fa: 4b4e ldr r3, [pc, #312] ; (8008234 <tcp_process+0x5bc>)
80080fc: 781b ldrb r3, [r3, #0]
80080fe: f003 0320 and.w r3, r3, #32
8008102: 2b00 cmp r3, #0
8008104: d037 beq.n 8008176 <tcp_process+0x4fe>
tcp_ack_now(pcb);
8008106: 687b ldr r3, [r7, #4]
8008108: 8b5b ldrh r3, [r3, #26]
800810a: f043 0302 orr.w r3, r3, #2
800810e: b29a uxth r2, r3
8008110: 687b ldr r3, [r7, #4]
8008112: 835a strh r2, [r3, #26]
pcb->state = CLOSE_WAIT;
8008114: 687b ldr r3, [r7, #4]
8008116: 2207 movs r2, #7
8008118: 751a strb r2, [r3, #20]
if (recv_flags & TF_GOT_FIN) {
800811a: e02c b.n 8008176 <tcp_process+0x4fe>
}
} else {
/* incorrect ACK number, send RST */
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
800811c: 4b3b ldr r3, [pc, #236] ; (800820c <tcp_process+0x594>)
800811e: 6819 ldr r1, [r3, #0]
8008120: 4b3b ldr r3, [pc, #236] ; (8008210 <tcp_process+0x598>)
8008122: 881b ldrh r3, [r3, #0]
8008124: 461a mov r2, r3
8008126: 4b3b ldr r3, [pc, #236] ; (8008214 <tcp_process+0x59c>)
8008128: 681b ldr r3, [r3, #0]
800812a: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
800812c: 4b3a ldr r3, [pc, #232] ; (8008218 <tcp_process+0x5a0>)
800812e: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8008130: 885b ldrh r3, [r3, #2]
8008132: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8008134: 4a38 ldr r2, [pc, #224] ; (8008218 <tcp_process+0x5a0>)
8008136: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8008138: 8812 ldrh r2, [r2, #0]
800813a: b292 uxth r2, r2
800813c: 9202 str r2, [sp, #8]
800813e: 9301 str r3, [sp, #4]
8008140: 4b36 ldr r3, [pc, #216] ; (800821c <tcp_process+0x5a4>)
8008142: 9300 str r3, [sp, #0]
8008144: 4b36 ldr r3, [pc, #216] ; (8008220 <tcp_process+0x5a8>)
8008146: 4602 mov r2, r0
8008148: 6878 ldr r0, [r7, #4]
800814a: f002 fbd1 bl 800a8f0 <tcp_rst>
}
} else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
/* Looks like another copy of the SYN - retransmit our SYN-ACK */
tcp_rexmit(pcb);
}
break;
800814e: e167 b.n 8008420 <tcp_process+0x7a8>
} else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
8008150: 4b2d ldr r3, [pc, #180] ; (8008208 <tcp_process+0x590>)
8008152: 781b ldrb r3, [r3, #0]
8008154: f003 0302 and.w r3, r3, #2
8008158: 2b00 cmp r3, #0
800815a: f000 8161 beq.w 8008420 <tcp_process+0x7a8>
800815e: 687b ldr r3, [r7, #4]
8008160: 6a5b ldr r3, [r3, #36] ; 0x24
8008162: 1e5a subs r2, r3, #1
8008164: 4b2b ldr r3, [pc, #172] ; (8008214 <tcp_process+0x59c>)
8008166: 681b ldr r3, [r3, #0]
8008168: 429a cmp r2, r3
800816a: f040 8159 bne.w 8008420 <tcp_process+0x7a8>
tcp_rexmit(pcb);
800816e: 6878 ldr r0, [r7, #4]
8008170: f002 f9b6 bl 800a4e0 <tcp_rexmit>
break;
8008174: e154 b.n 8008420 <tcp_process+0x7a8>
8008176: e153 b.n 8008420 <tcp_process+0x7a8>
case CLOSE_WAIT:
/* FALLTHROUGH */
case ESTABLISHED:
tcp_receive(pcb);
8008178: 6878 ldr r0, [r7, #4]
800817a: f000 fa71 bl 8008660 <tcp_receive>
if (recv_flags & TF_GOT_FIN) { /* passive close */
800817e: 4b2d ldr r3, [pc, #180] ; (8008234 <tcp_process+0x5bc>)
8008180: 781b ldrb r3, [r3, #0]
8008182: f003 0320 and.w r3, r3, #32
8008186: 2b00 cmp r3, #0
8008188: f000 814c beq.w 8008424 <tcp_process+0x7ac>
tcp_ack_now(pcb);
800818c: 687b ldr r3, [r7, #4]
800818e: 8b5b ldrh r3, [r3, #26]
8008190: f043 0302 orr.w r3, r3, #2
8008194: b29a uxth r2, r3
8008196: 687b ldr r3, [r7, #4]
8008198: 835a strh r2, [r3, #26]
pcb->state = CLOSE_WAIT;
800819a: 687b ldr r3, [r7, #4]
800819c: 2207 movs r2, #7
800819e: 751a strb r2, [r3, #20]
}
break;
80081a0: e140 b.n 8008424 <tcp_process+0x7ac>
case FIN_WAIT_1:
tcp_receive(pcb);
80081a2: 6878 ldr r0, [r7, #4]
80081a4: f000 fa5c bl 8008660 <tcp_receive>
if (recv_flags & TF_GOT_FIN) {
80081a8: 4b22 ldr r3, [pc, #136] ; (8008234 <tcp_process+0x5bc>)
80081aa: 781b ldrb r3, [r3, #0]
80081ac: f003 0320 and.w r3, r3, #32
80081b0: 2b00 cmp r3, #0
80081b2: d071 beq.n 8008298 <tcp_process+0x620>
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80081b4: 4b14 ldr r3, [pc, #80] ; (8008208 <tcp_process+0x590>)
80081b6: 781b ldrb r3, [r3, #0]
80081b8: f003 0310 and.w r3, r3, #16
80081bc: 2b00 cmp r3, #0
80081be: d060 beq.n 8008282 <tcp_process+0x60a>
80081c0: 687b ldr r3, [r7, #4]
80081c2: 6d1a ldr r2, [r3, #80] ; 0x50
80081c4: 4b11 ldr r3, [pc, #68] ; (800820c <tcp_process+0x594>)
80081c6: 681b ldr r3, [r3, #0]
80081c8: 429a cmp r2, r3
80081ca: d15a bne.n 8008282 <tcp_process+0x60a>
pcb->unsent == NULL) {
80081cc: 687b ldr r3, [r7, #4]
80081ce: 6edb ldr r3, [r3, #108] ; 0x6c
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80081d0: 2b00 cmp r3, #0
80081d2: d156 bne.n 8008282 <tcp_process+0x60a>
LWIP_DEBUGF(TCP_DEBUG,
("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
tcp_ack_now(pcb);
80081d4: 687b ldr r3, [r7, #4]
80081d6: 8b5b ldrh r3, [r3, #26]
80081d8: f043 0302 orr.w r3, r3, #2
80081dc: b29a uxth r2, r3
80081de: 687b ldr r3, [r7, #4]
80081e0: 835a strh r2, [r3, #26]
tcp_pcb_purge(pcb);
80081e2: 6878 ldr r0, [r7, #4]
80081e4: f7fe fdbc bl 8006d60 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
80081e8: 4b13 ldr r3, [pc, #76] ; (8008238 <tcp_process+0x5c0>)
80081ea: 681b ldr r3, [r3, #0]
80081ec: 687a ldr r2, [r7, #4]
80081ee: 429a cmp r2, r3
80081f0: d105 bne.n 80081fe <tcp_process+0x586>
80081f2: 4b11 ldr r3, [pc, #68] ; (8008238 <tcp_process+0x5c0>)
80081f4: 681b ldr r3, [r3, #0]
80081f6: 68db ldr r3, [r3, #12]
80081f8: 4a0f ldr r2, [pc, #60] ; (8008238 <tcp_process+0x5c0>)
80081fa: 6013 str r3, [r2, #0]
80081fc: e02e b.n 800825c <tcp_process+0x5e4>
80081fe: 4b0e ldr r3, [pc, #56] ; (8008238 <tcp_process+0x5c0>)
8008200: 681b ldr r3, [r3, #0]
8008202: 617b str r3, [r7, #20]
8008204: e027 b.n 8008256 <tcp_process+0x5de>
8008206: bf00 nop
8008208: 20008bf0 .word 0x20008bf0
800820c: 20008be8 .word 0x20008be8
8008210: 20008bee .word 0x20008bee
8008214: 20008be4 .word 0x20008be4
8008218: 20008bd4 .word 0x20008bd4
800821c: 2000562c .word 0x2000562c
8008220: 20005630 .word 0x20005630
8008224: 08015c0c .word 0x08015c0c
8008228: 08015eac .word 0x08015eac
800822c: 08015c58 .word 0x08015c58
8008230: 20008bec .word 0x20008bec
8008234: 20008bf1 .word 0x20008bf1
8008238: 20008bb8 .word 0x20008bb8
800823c: 697b ldr r3, [r7, #20]
800823e: 68db ldr r3, [r3, #12]
8008240: 687a ldr r2, [r7, #4]
8008242: 429a cmp r2, r3
8008244: d104 bne.n 8008250 <tcp_process+0x5d8>
8008246: 687b ldr r3, [r7, #4]
8008248: 68da ldr r2, [r3, #12]
800824a: 697b ldr r3, [r7, #20]
800824c: 60da str r2, [r3, #12]
800824e: e005 b.n 800825c <tcp_process+0x5e4>
8008250: 697b ldr r3, [r7, #20]
8008252: 68db ldr r3, [r3, #12]
8008254: 617b str r3, [r7, #20]
8008256: 697b ldr r3, [r7, #20]
8008258: 2b00 cmp r3, #0
800825a: d1ef bne.n 800823c <tcp_process+0x5c4>
800825c: 687b ldr r3, [r7, #4]
800825e: 2200 movs r2, #0
8008260: 60da str r2, [r3, #12]
8008262: 4b77 ldr r3, [pc, #476] ; (8008440 <tcp_process+0x7c8>)
8008264: 2201 movs r2, #1
8008266: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
8008268: 687b ldr r3, [r7, #4]
800826a: 220a movs r2, #10
800826c: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
800826e: 4b75 ldr r3, [pc, #468] ; (8008444 <tcp_process+0x7cc>)
8008270: 681a ldr r2, [r3, #0]
8008272: 687b ldr r3, [r7, #4]
8008274: 60da str r2, [r3, #12]
8008276: 4a73 ldr r2, [pc, #460] ; (8008444 <tcp_process+0x7cc>)
8008278: 687b ldr r3, [r7, #4]
800827a: 6013 str r3, [r2, #0]
800827c: f002 fcfa bl 800ac74 <tcp_timer_needed>
}
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
pcb->unsent == NULL) {
pcb->state = FIN_WAIT_2;
}
break;
8008280: e0d2 b.n 8008428 <tcp_process+0x7b0>
tcp_ack_now(pcb);
8008282: 687b ldr r3, [r7, #4]
8008284: 8b5b ldrh r3, [r3, #26]
8008286: f043 0302 orr.w r3, r3, #2
800828a: b29a uxth r2, r3
800828c: 687b ldr r3, [r7, #4]
800828e: 835a strh r2, [r3, #26]
pcb->state = CLOSING;
8008290: 687b ldr r3, [r7, #4]
8008292: 2208 movs r2, #8
8008294: 751a strb r2, [r3, #20]
break;
8008296: e0c7 b.n 8008428 <tcp_process+0x7b0>
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
8008298: 4b6b ldr r3, [pc, #428] ; (8008448 <tcp_process+0x7d0>)
800829a: 781b ldrb r3, [r3, #0]
800829c: f003 0310 and.w r3, r3, #16
80082a0: 2b00 cmp r3, #0
80082a2: f000 80c1 beq.w 8008428 <tcp_process+0x7b0>
80082a6: 687b ldr r3, [r7, #4]
80082a8: 6d1a ldr r2, [r3, #80] ; 0x50
80082aa: 4b68 ldr r3, [pc, #416] ; (800844c <tcp_process+0x7d4>)
80082ac: 681b ldr r3, [r3, #0]
80082ae: 429a cmp r2, r3
80082b0: f040 80ba bne.w 8008428 <tcp_process+0x7b0>
pcb->unsent == NULL) {
80082b4: 687b ldr r3, [r7, #4]
80082b6: 6edb ldr r3, [r3, #108] ; 0x6c
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80082b8: 2b00 cmp r3, #0
80082ba: f040 80b5 bne.w 8008428 <tcp_process+0x7b0>
pcb->state = FIN_WAIT_2;
80082be: 687b ldr r3, [r7, #4]
80082c0: 2206 movs r2, #6
80082c2: 751a strb r2, [r3, #20]
break;
80082c4: e0b0 b.n 8008428 <tcp_process+0x7b0>
case FIN_WAIT_2:
tcp_receive(pcb);
80082c6: 6878 ldr r0, [r7, #4]
80082c8: f000 f9ca bl 8008660 <tcp_receive>
if (recv_flags & TF_GOT_FIN) {
80082cc: 4b60 ldr r3, [pc, #384] ; (8008450 <tcp_process+0x7d8>)
80082ce: 781b ldrb r3, [r3, #0]
80082d0: f003 0320 and.w r3, r3, #32
80082d4: 2b00 cmp r3, #0
80082d6: f000 80a9 beq.w 800842c <tcp_process+0x7b4>
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
tcp_ack_now(pcb);
80082da: 687b ldr r3, [r7, #4]
80082dc: 8b5b ldrh r3, [r3, #26]
80082de: f043 0302 orr.w r3, r3, #2
80082e2: b29a uxth r2, r3
80082e4: 687b ldr r3, [r7, #4]
80082e6: 835a strh r2, [r3, #26]
tcp_pcb_purge(pcb);
80082e8: 6878 ldr r0, [r7, #4]
80082ea: f7fe fd39 bl 8006d60 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
80082ee: 4b59 ldr r3, [pc, #356] ; (8008454 <tcp_process+0x7dc>)
80082f0: 681b ldr r3, [r3, #0]
80082f2: 687a ldr r2, [r7, #4]
80082f4: 429a cmp r2, r3
80082f6: d105 bne.n 8008304 <tcp_process+0x68c>
80082f8: 4b56 ldr r3, [pc, #344] ; (8008454 <tcp_process+0x7dc>)
80082fa: 681b ldr r3, [r3, #0]
80082fc: 68db ldr r3, [r3, #12]
80082fe: 4a55 ldr r2, [pc, #340] ; (8008454 <tcp_process+0x7dc>)
8008300: 6013 str r3, [r2, #0]
8008302: e013 b.n 800832c <tcp_process+0x6b4>
8008304: 4b53 ldr r3, [pc, #332] ; (8008454 <tcp_process+0x7dc>)
8008306: 681b ldr r3, [r3, #0]
8008308: 613b str r3, [r7, #16]
800830a: e00c b.n 8008326 <tcp_process+0x6ae>
800830c: 693b ldr r3, [r7, #16]
800830e: 68db ldr r3, [r3, #12]
8008310: 687a ldr r2, [r7, #4]
8008312: 429a cmp r2, r3
8008314: d104 bne.n 8008320 <tcp_process+0x6a8>
8008316: 687b ldr r3, [r7, #4]
8008318: 68da ldr r2, [r3, #12]
800831a: 693b ldr r3, [r7, #16]
800831c: 60da str r2, [r3, #12]
800831e: e005 b.n 800832c <tcp_process+0x6b4>
8008320: 693b ldr r3, [r7, #16]
8008322: 68db ldr r3, [r3, #12]
8008324: 613b str r3, [r7, #16]
8008326: 693b ldr r3, [r7, #16]
8008328: 2b00 cmp r3, #0
800832a: d1ef bne.n 800830c <tcp_process+0x694>
800832c: 687b ldr r3, [r7, #4]
800832e: 2200 movs r2, #0
8008330: 60da str r2, [r3, #12]
8008332: 4b43 ldr r3, [pc, #268] ; (8008440 <tcp_process+0x7c8>)
8008334: 2201 movs r2, #1
8008336: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
8008338: 687b ldr r3, [r7, #4]
800833a: 220a movs r2, #10
800833c: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
800833e: 4b41 ldr r3, [pc, #260] ; (8008444 <tcp_process+0x7cc>)
8008340: 681a ldr r2, [r3, #0]
8008342: 687b ldr r3, [r7, #4]
8008344: 60da str r2, [r3, #12]
8008346: 4a3f ldr r2, [pc, #252] ; (8008444 <tcp_process+0x7cc>)
8008348: 687b ldr r3, [r7, #4]
800834a: 6013 str r3, [r2, #0]
800834c: f002 fc92 bl 800ac74 <tcp_timer_needed>
}
break;
8008350: e06c b.n 800842c <tcp_process+0x7b4>
case CLOSING:
tcp_receive(pcb);
8008352: 6878 ldr r0, [r7, #4]
8008354: f000 f984 bl 8008660 <tcp_receive>
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
8008358: 4b3b ldr r3, [pc, #236] ; (8008448 <tcp_process+0x7d0>)
800835a: 781b ldrb r3, [r3, #0]
800835c: f003 0310 and.w r3, r3, #16
8008360: 2b00 cmp r3, #0
8008362: d065 beq.n 8008430 <tcp_process+0x7b8>
8008364: 687b ldr r3, [r7, #4]
8008366: 6d1a ldr r2, [r3, #80] ; 0x50
8008368: 4b38 ldr r3, [pc, #224] ; (800844c <tcp_process+0x7d4>)
800836a: 681b ldr r3, [r3, #0]
800836c: 429a cmp r2, r3
800836e: d15f bne.n 8008430 <tcp_process+0x7b8>
8008370: 687b ldr r3, [r7, #4]
8008372: 6edb ldr r3, [r3, #108] ; 0x6c
8008374: 2b00 cmp r3, #0
8008376: d15b bne.n 8008430 <tcp_process+0x7b8>
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
tcp_pcb_purge(pcb);
8008378: 6878 ldr r0, [r7, #4]
800837a: f7fe fcf1 bl 8006d60 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
800837e: 4b35 ldr r3, [pc, #212] ; (8008454 <tcp_process+0x7dc>)
8008380: 681b ldr r3, [r3, #0]
8008382: 687a ldr r2, [r7, #4]
8008384: 429a cmp r2, r3
8008386: d105 bne.n 8008394 <tcp_process+0x71c>
8008388: 4b32 ldr r3, [pc, #200] ; (8008454 <tcp_process+0x7dc>)
800838a: 681b ldr r3, [r3, #0]
800838c: 68db ldr r3, [r3, #12]
800838e: 4a31 ldr r2, [pc, #196] ; (8008454 <tcp_process+0x7dc>)
8008390: 6013 str r3, [r2, #0]
8008392: e013 b.n 80083bc <tcp_process+0x744>
8008394: 4b2f ldr r3, [pc, #188] ; (8008454 <tcp_process+0x7dc>)
8008396: 681b ldr r3, [r3, #0]
8008398: 60fb str r3, [r7, #12]
800839a: e00c b.n 80083b6 <tcp_process+0x73e>
800839c: 68fb ldr r3, [r7, #12]
800839e: 68db ldr r3, [r3, #12]
80083a0: 687a ldr r2, [r7, #4]
80083a2: 429a cmp r2, r3
80083a4: d104 bne.n 80083b0 <tcp_process+0x738>
80083a6: 687b ldr r3, [r7, #4]
80083a8: 68da ldr r2, [r3, #12]
80083aa: 68fb ldr r3, [r7, #12]
80083ac: 60da str r2, [r3, #12]
80083ae: e005 b.n 80083bc <tcp_process+0x744>
80083b0: 68fb ldr r3, [r7, #12]
80083b2: 68db ldr r3, [r3, #12]
80083b4: 60fb str r3, [r7, #12]
80083b6: 68fb ldr r3, [r7, #12]
80083b8: 2b00 cmp r3, #0
80083ba: d1ef bne.n 800839c <tcp_process+0x724>
80083bc: 687b ldr r3, [r7, #4]
80083be: 2200 movs r2, #0
80083c0: 60da str r2, [r3, #12]
80083c2: 4b1f ldr r3, [pc, #124] ; (8008440 <tcp_process+0x7c8>)
80083c4: 2201 movs r2, #1
80083c6: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
80083c8: 687b ldr r3, [r7, #4]
80083ca: 220a movs r2, #10
80083cc: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
80083ce: 4b1d ldr r3, [pc, #116] ; (8008444 <tcp_process+0x7cc>)
80083d0: 681a ldr r2, [r3, #0]
80083d2: 687b ldr r3, [r7, #4]
80083d4: 60da str r2, [r3, #12]
80083d6: 4a1b ldr r2, [pc, #108] ; (8008444 <tcp_process+0x7cc>)
80083d8: 687b ldr r3, [r7, #4]
80083da: 6013 str r3, [r2, #0]
80083dc: f002 fc4a bl 800ac74 <tcp_timer_needed>
}
break;
80083e0: e026 b.n 8008430 <tcp_process+0x7b8>
case LAST_ACK:
tcp_receive(pcb);
80083e2: 6878 ldr r0, [r7, #4]
80083e4: f000 f93c bl 8008660 <tcp_receive>
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
80083e8: 4b17 ldr r3, [pc, #92] ; (8008448 <tcp_process+0x7d0>)
80083ea: 781b ldrb r3, [r3, #0]
80083ec: f003 0310 and.w r3, r3, #16
80083f0: 2b00 cmp r3, #0
80083f2: d01f beq.n 8008434 <tcp_process+0x7bc>
80083f4: 687b ldr r3, [r7, #4]
80083f6: 6d1a ldr r2, [r3, #80] ; 0x50
80083f8: 4b14 ldr r3, [pc, #80] ; (800844c <tcp_process+0x7d4>)
80083fa: 681b ldr r3, [r3, #0]
80083fc: 429a cmp r2, r3
80083fe: d119 bne.n 8008434 <tcp_process+0x7bc>
8008400: 687b ldr r3, [r7, #4]
8008402: 6edb ldr r3, [r3, #108] ; 0x6c
8008404: 2b00 cmp r3, #0
8008406: d115 bne.n 8008434 <tcp_process+0x7bc>
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
/* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */
recv_flags |= TF_CLOSED;
8008408: 4b11 ldr r3, [pc, #68] ; (8008450 <tcp_process+0x7d8>)
800840a: 781b ldrb r3, [r3, #0]
800840c: f043 0310 orr.w r3, r3, #16
8008410: b2da uxtb r2, r3
8008412: 4b0f ldr r3, [pc, #60] ; (8008450 <tcp_process+0x7d8>)
8008414: 701a strb r2, [r3, #0]
}
break;
8008416: e00d b.n 8008434 <tcp_process+0x7bc>
default:
break;
8008418: bf00 nop
800841a: e00c b.n 8008436 <tcp_process+0x7be>
break;
800841c: bf00 nop
800841e: e00a b.n 8008436 <tcp_process+0x7be>
break;
8008420: bf00 nop
8008422: e008 b.n 8008436 <tcp_process+0x7be>
break;
8008424: bf00 nop
8008426: e006 b.n 8008436 <tcp_process+0x7be>
break;
8008428: bf00 nop
800842a: e004 b.n 8008436 <tcp_process+0x7be>
break;
800842c: bf00 nop
800842e: e002 b.n 8008436 <tcp_process+0x7be>
break;
8008430: bf00 nop
8008432: e000 b.n 8008436 <tcp_process+0x7be>
break;
8008434: bf00 nop
}
return ERR_OK;
8008436: 2300 movs r3, #0
}
8008438: 4618 mov r0, r3
800843a: 3724 adds r7, #36 ; 0x24
800843c: 46bd mov sp, r7
800843e: bd90 pop {r4, r7, pc}
8008440: 20008bc0 .word 0x20008bc0
8008444: 20008bbc .word 0x20008bbc
8008448: 20008bf0 .word 0x20008bf0
800844c: 20008be8 .word 0x20008be8
8008450: 20008bf1 .word 0x20008bf1
8008454: 20008bb8 .word 0x20008bb8
08008458 <tcp_oos_insert_segment>:
*
* Called from tcp_receive()
*/
static void
tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next)
{
8008458: b590 push {r4, r7, lr}
800845a: b085 sub sp, #20
800845c: af00 add r7, sp, #0
800845e: 6078 str r0, [r7, #4]
8008460: 6039 str r1, [r7, #0]
struct tcp_seg *old_seg;
LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL);
8008462: 687b ldr r3, [r7, #4]
8008464: 2b00 cmp r3, #0
8008466: d106 bne.n 8008476 <tcp_oos_insert_segment+0x1e>
8008468: 4b3b ldr r3, [pc, #236] ; (8008558 <tcp_oos_insert_segment+0x100>)
800846a: f240 421f movw r2, #1055 ; 0x41f
800846e: 493b ldr r1, [pc, #236] ; (800855c <tcp_oos_insert_segment+0x104>)
8008470: 483b ldr r0, [pc, #236] ; (8008560 <tcp_oos_insert_segment+0x108>)
8008472: f007 fd21 bl 800feb8 <printf>
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
8008476: 687b ldr r3, [r7, #4]
8008478: 68db ldr r3, [r3, #12]
800847a: 899b ldrh r3, [r3, #12]
800847c: b29b uxth r3, r3
800847e: 4618 mov r0, r3
8008480: f7fb fc94 bl 8003dac <lwip_htons>
8008484: 4603 mov r3, r0
8008486: b2db uxtb r3, r3
8008488: f003 0301 and.w r3, r3, #1
800848c: 2b00 cmp r3, #0
800848e: d028 beq.n 80084e2 <tcp_oos_insert_segment+0x8a>
/* received segment overlaps all following segments */
tcp_segs_free(next);
8008490: 6838 ldr r0, [r7, #0]
8008492: f7fe fa63 bl 800695c <tcp_segs_free>
next = NULL;
8008496: 2300 movs r3, #0
8008498: 603b str r3, [r7, #0]
800849a: e056 b.n 800854a <tcp_oos_insert_segment+0xf2>
oos queue may have segments with FIN flag */
while (next &&
TCP_SEQ_GEQ((seqno + cseg->len),
(next->tcphdr->seqno + next->len))) {
/* cseg with FIN already processed */
if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
800849c: 683b ldr r3, [r7, #0]
800849e: 68db ldr r3, [r3, #12]
80084a0: 899b ldrh r3, [r3, #12]
80084a2: b29b uxth r3, r3
80084a4: 4618 mov r0, r3
80084a6: f7fb fc81 bl 8003dac <lwip_htons>
80084aa: 4603 mov r3, r0
80084ac: b2db uxtb r3, r3
80084ae: f003 0301 and.w r3, r3, #1
80084b2: 2b00 cmp r3, #0
80084b4: d00d beq.n 80084d2 <tcp_oos_insert_segment+0x7a>
TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN);
80084b6: 687b ldr r3, [r7, #4]
80084b8: 68db ldr r3, [r3, #12]
80084ba: 899b ldrh r3, [r3, #12]
80084bc: b29c uxth r4, r3
80084be: 2001 movs r0, #1
80084c0: f7fb fc74 bl 8003dac <lwip_htons>
80084c4: 4603 mov r3, r0
80084c6: 461a mov r2, r3
80084c8: 687b ldr r3, [r7, #4]
80084ca: 68db ldr r3, [r3, #12]
80084cc: 4322 orrs r2, r4
80084ce: b292 uxth r2, r2
80084d0: 819a strh r2, [r3, #12]
}
old_seg = next;
80084d2: 683b ldr r3, [r7, #0]
80084d4: 60fb str r3, [r7, #12]
next = next->next;
80084d6: 683b ldr r3, [r7, #0]
80084d8: 681b ldr r3, [r3, #0]
80084da: 603b str r3, [r7, #0]
tcp_seg_free(old_seg);
80084dc: 68f8 ldr r0, [r7, #12]
80084de: f7fe fa52 bl 8006986 <tcp_seg_free>
while (next &&
80084e2: 683b ldr r3, [r7, #0]
80084e4: 2b00 cmp r3, #0
80084e6: d00e beq.n 8008506 <tcp_oos_insert_segment+0xae>
TCP_SEQ_GEQ((seqno + cseg->len),
80084e8: 687b ldr r3, [r7, #4]
80084ea: 891b ldrh r3, [r3, #8]
80084ec: 461a mov r2, r3
80084ee: 4b1d ldr r3, [pc, #116] ; (8008564 <tcp_oos_insert_segment+0x10c>)
80084f0: 681b ldr r3, [r3, #0]
80084f2: 441a add r2, r3
80084f4: 683b ldr r3, [r7, #0]
80084f6: 68db ldr r3, [r3, #12]
80084f8: 685b ldr r3, [r3, #4]
80084fa: 6839 ldr r1, [r7, #0]
80084fc: 8909 ldrh r1, [r1, #8]
80084fe: 440b add r3, r1
8008500: 1ad3 subs r3, r2, r3
while (next &&
8008502: 2b00 cmp r3, #0
8008504: daca bge.n 800849c <tcp_oos_insert_segment+0x44>
}
if (next &&
8008506: 683b ldr r3, [r7, #0]
8008508: 2b00 cmp r3, #0
800850a: d01e beq.n 800854a <tcp_oos_insert_segment+0xf2>
TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
800850c: 687b ldr r3, [r7, #4]
800850e: 891b ldrh r3, [r3, #8]
8008510: 461a mov r2, r3
8008512: 4b14 ldr r3, [pc, #80] ; (8008564 <tcp_oos_insert_segment+0x10c>)
8008514: 681b ldr r3, [r3, #0]
8008516: 441a add r2, r3
8008518: 683b ldr r3, [r7, #0]
800851a: 68db ldr r3, [r3, #12]
800851c: 685b ldr r3, [r3, #4]
800851e: 1ad3 subs r3, r2, r3
if (next &&
8008520: 2b00 cmp r3, #0
8008522: dd12 ble.n 800854a <tcp_oos_insert_segment+0xf2>
/* We need to trim the incoming segment. */
cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
8008524: 683b ldr r3, [r7, #0]
8008526: 68db ldr r3, [r3, #12]
8008528: 685b ldr r3, [r3, #4]
800852a: b29a uxth r2, r3
800852c: 4b0d ldr r3, [pc, #52] ; (8008564 <tcp_oos_insert_segment+0x10c>)
800852e: 681b ldr r3, [r3, #0]
8008530: b29b uxth r3, r3
8008532: 1ad3 subs r3, r2, r3
8008534: b29a uxth r2, r3
8008536: 687b ldr r3, [r7, #4]
8008538: 811a strh r2, [r3, #8]
pbuf_realloc(cseg->p, cseg->len);
800853a: 687b ldr r3, [r7, #4]
800853c: 685a ldr r2, [r3, #4]
800853e: 687b ldr r3, [r7, #4]
8008540: 891b ldrh r3, [r3, #8]
8008542: 4619 mov r1, r3
8008544: 4610 mov r0, r2
8008546: f7fc fe15 bl 8005174 <pbuf_realloc>
}
}
cseg->next = next;
800854a: 687b ldr r3, [r7, #4]
800854c: 683a ldr r2, [r7, #0]
800854e: 601a str r2, [r3, #0]
}
8008550: bf00 nop
8008552: 3714 adds r7, #20
8008554: 46bd mov sp, r7
8008556: bd90 pop {r4, r7, pc}
8008558: 08015c0c .word 0x08015c0c
800855c: 08015ecc .word 0x08015ecc
8008560: 08015c58 .word 0x08015c58
8008564: 20008be4 .word 0x20008be4
08008568 <tcp_free_acked_segments>:
/** Remove segments from a list if the incoming ACK acknowledges them */
static struct tcp_seg *
tcp_free_acked_segments(struct tcp_pcb *pcb, struct tcp_seg *seg_list, const char *dbg_list_name,
struct tcp_seg *dbg_other_seg_list)
{
8008568: b5b0 push {r4, r5, r7, lr}
800856a: b086 sub sp, #24
800856c: af00 add r7, sp, #0
800856e: 60f8 str r0, [r7, #12]
8008570: 60b9 str r1, [r7, #8]
8008572: 607a str r2, [r7, #4]
8008574: 603b str r3, [r7, #0]
u16_t clen;
LWIP_UNUSED_ARG(dbg_list_name);
LWIP_UNUSED_ARG(dbg_other_seg_list);
while (seg_list != NULL &&
8008576: e03e b.n 80085f6 <tcp_free_acked_segments+0x8e>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->%s\n",
lwip_ntohl(seg_list->tcphdr->seqno),
lwip_ntohl(seg_list->tcphdr->seqno) + TCP_TCPLEN(seg_list),
dbg_list_name));
next = seg_list;
8008578: 68bb ldr r3, [r7, #8]
800857a: 617b str r3, [r7, #20]
seg_list = seg_list->next;
800857c: 68bb ldr r3, [r7, #8]
800857e: 681b ldr r3, [r3, #0]
8008580: 60bb str r3, [r7, #8]
clen = pbuf_clen(next->p);
8008582: 697b ldr r3, [r7, #20]
8008584: 685b ldr r3, [r3, #4]
8008586: 4618 mov r0, r3
8008588: f7fd f802 bl 8005590 <pbuf_clen>
800858c: 4603 mov r3, r0
800858e: 827b strh r3, [r7, #18]
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ",
(tcpwnd_size_t)pcb->snd_queuelen));
LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen));
8008590: 68fb ldr r3, [r7, #12]
8008592: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8008596: 8a7a ldrh r2, [r7, #18]
8008598: 429a cmp r2, r3
800859a: d906 bls.n 80085aa <tcp_free_acked_segments+0x42>
800859c: 4b2a ldr r3, [pc, #168] ; (8008648 <tcp_free_acked_segments+0xe0>)
800859e: f240 4257 movw r2, #1111 ; 0x457
80085a2: 492a ldr r1, [pc, #168] ; (800864c <tcp_free_acked_segments+0xe4>)
80085a4: 482a ldr r0, [pc, #168] ; (8008650 <tcp_free_acked_segments+0xe8>)
80085a6: f007 fc87 bl 800feb8 <printf>
pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen);
80085aa: 68fb ldr r3, [r7, #12]
80085ac: f8b3 2066 ldrh.w r2, [r3, #102] ; 0x66
80085b0: 8a7b ldrh r3, [r7, #18]
80085b2: 1ad3 subs r3, r2, r3
80085b4: b29a uxth r2, r3
80085b6: 68fb ldr r3, [r7, #12]
80085b8: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
recv_acked = (tcpwnd_size_t)(recv_acked + next->len);
80085bc: 697b ldr r3, [r7, #20]
80085be: 891a ldrh r2, [r3, #8]
80085c0: 4b24 ldr r3, [pc, #144] ; (8008654 <tcp_free_acked_segments+0xec>)
80085c2: 881b ldrh r3, [r3, #0]
80085c4: 4413 add r3, r2
80085c6: b29a uxth r2, r3
80085c8: 4b22 ldr r3, [pc, #136] ; (8008654 <tcp_free_acked_segments+0xec>)
80085ca: 801a strh r2, [r3, #0]
tcp_seg_free(next);
80085cc: 6978 ldr r0, [r7, #20]
80085ce: f7fe f9da bl 8006986 <tcp_seg_free>
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing %s)\n",
(tcpwnd_size_t)pcb->snd_queuelen,
dbg_list_name));
if (pcb->snd_queuelen != 0) {
80085d2: 68fb ldr r3, [r7, #12]
80085d4: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
80085d8: 2b00 cmp r3, #0
80085da: d00c beq.n 80085f6 <tcp_free_acked_segments+0x8e>
LWIP_ASSERT("tcp_receive: valid queue length",
80085dc: 68bb ldr r3, [r7, #8]
80085de: 2b00 cmp r3, #0
80085e0: d109 bne.n 80085f6 <tcp_free_acked_segments+0x8e>
80085e2: 683b ldr r3, [r7, #0]
80085e4: 2b00 cmp r3, #0
80085e6: d106 bne.n 80085f6 <tcp_free_acked_segments+0x8e>
80085e8: 4b17 ldr r3, [pc, #92] ; (8008648 <tcp_free_acked_segments+0xe0>)
80085ea: f240 4261 movw r2, #1121 ; 0x461
80085ee: 491a ldr r1, [pc, #104] ; (8008658 <tcp_free_acked_segments+0xf0>)
80085f0: 4817 ldr r0, [pc, #92] ; (8008650 <tcp_free_acked_segments+0xe8>)
80085f2: f007 fc61 bl 800feb8 <printf>
while (seg_list != NULL &&
80085f6: 68bb ldr r3, [r7, #8]
80085f8: 2b00 cmp r3, #0
80085fa: d020 beq.n 800863e <tcp_free_acked_segments+0xd6>
TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) +
80085fc: 68bb ldr r3, [r7, #8]
80085fe: 68db ldr r3, [r3, #12]
8008600: 685b ldr r3, [r3, #4]
8008602: 4618 mov r0, r3
8008604: f7fb fbe7 bl 8003dd6 <lwip_htonl>
8008608: 4604 mov r4, r0
800860a: 68bb ldr r3, [r7, #8]
800860c: 891b ldrh r3, [r3, #8]
800860e: 461d mov r5, r3
8008610: 68bb ldr r3, [r7, #8]
8008612: 68db ldr r3, [r3, #12]
8008614: 899b ldrh r3, [r3, #12]
8008616: b29b uxth r3, r3
8008618: 4618 mov r0, r3
800861a: f7fb fbc7 bl 8003dac <lwip_htons>
800861e: 4603 mov r3, r0
8008620: b2db uxtb r3, r3
8008622: f003 0303 and.w r3, r3, #3
8008626: 2b00 cmp r3, #0
8008628: d001 beq.n 800862e <tcp_free_acked_segments+0xc6>
800862a: 2301 movs r3, #1
800862c: e000 b.n 8008630 <tcp_free_acked_segments+0xc8>
800862e: 2300 movs r3, #0
8008630: 442b add r3, r5
8008632: 18e2 adds r2, r4, r3
8008634: 4b09 ldr r3, [pc, #36] ; (800865c <tcp_free_acked_segments+0xf4>)
8008636: 681b ldr r3, [r3, #0]
8008638: 1ad3 subs r3, r2, r3
while (seg_list != NULL &&
800863a: 2b00 cmp r3, #0
800863c: dd9c ble.n 8008578 <tcp_free_acked_segments+0x10>
seg_list != NULL || dbg_other_seg_list != NULL);
}
}
return seg_list;
800863e: 68bb ldr r3, [r7, #8]
}
8008640: 4618 mov r0, r3
8008642: 3718 adds r7, #24
8008644: 46bd mov sp, r7
8008646: bdb0 pop {r4, r5, r7, pc}
8008648: 08015c0c .word 0x08015c0c
800864c: 08015ef4 .word 0x08015ef4
8008650: 08015c58 .word 0x08015c58
8008654: 20008bec .word 0x20008bec
8008658: 08015f1c .word 0x08015f1c
800865c: 20008be8 .word 0x20008be8
08008660 <tcp_receive>:
*
* Called from tcp_process().
*/
static void
tcp_receive(struct tcp_pcb *pcb)
{
8008660: b5b0 push {r4, r5, r7, lr}
8008662: b094 sub sp, #80 ; 0x50
8008664: af00 add r7, sp, #0
8008666: 6078 str r0, [r7, #4]
s16_t m;
u32_t right_wnd_edge;
int found_dupack = 0;
8008668: 2300 movs r3, #0
800866a: 64bb str r3, [r7, #72] ; 0x48
LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
800866c: 687b ldr r3, [r7, #4]
800866e: 2b00 cmp r3, #0
8008670: d106 bne.n 8008680 <tcp_receive+0x20>
8008672: 4b91 ldr r3, [pc, #580] ; (80088b8 <tcp_receive+0x258>)
8008674: f240 427b movw r2, #1147 ; 0x47b
8008678: 4990 ldr r1, [pc, #576] ; (80088bc <tcp_receive+0x25c>)
800867a: 4891 ldr r0, [pc, #580] ; (80088c0 <tcp_receive+0x260>)
800867c: f007 fc1c bl 800feb8 <printf>
LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
8008680: 687b ldr r3, [r7, #4]
8008682: 7d1b ldrb r3, [r3, #20]
8008684: 2b03 cmp r3, #3
8008686: d806 bhi.n 8008696 <tcp_receive+0x36>
8008688: 4b8b ldr r3, [pc, #556] ; (80088b8 <tcp_receive+0x258>)
800868a: f240 427c movw r2, #1148 ; 0x47c
800868e: 498d ldr r1, [pc, #564] ; (80088c4 <tcp_receive+0x264>)
8008690: 488b ldr r0, [pc, #556] ; (80088c0 <tcp_receive+0x260>)
8008692: f007 fc11 bl 800feb8 <printf>
if (flags & TCP_ACK) {
8008696: 4b8c ldr r3, [pc, #560] ; (80088c8 <tcp_receive+0x268>)
8008698: 781b ldrb r3, [r3, #0]
800869a: f003 0310 and.w r3, r3, #16
800869e: 2b00 cmp r3, #0
80086a0: f000 8264 beq.w 8008b6c <tcp_receive+0x50c>
right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2;
80086a4: 687b ldr r3, [r7, #4]
80086a6: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
80086aa: 461a mov r2, r3
80086ac: 687b ldr r3, [r7, #4]
80086ae: 6d9b ldr r3, [r3, #88] ; 0x58
80086b0: 4413 add r3, r2
80086b2: 633b str r3, [r7, #48] ; 0x30
/* Update window. */
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
80086b4: 687b ldr r3, [r7, #4]
80086b6: 6d5a ldr r2, [r3, #84] ; 0x54
80086b8: 4b84 ldr r3, [pc, #528] ; (80088cc <tcp_receive+0x26c>)
80086ba: 681b ldr r3, [r3, #0]
80086bc: 1ad3 subs r3, r2, r3
80086be: 2b00 cmp r3, #0
80086c0: db1b blt.n 80086fa <tcp_receive+0x9a>
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
80086c2: 687b ldr r3, [r7, #4]
80086c4: 6d5a ldr r2, [r3, #84] ; 0x54
80086c6: 4b81 ldr r3, [pc, #516] ; (80088cc <tcp_receive+0x26c>)
80086c8: 681b ldr r3, [r3, #0]
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
80086ca: 429a cmp r2, r3
80086cc: d106 bne.n 80086dc <tcp_receive+0x7c>
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
80086ce: 687b ldr r3, [r7, #4]
80086d0: 6d9a ldr r2, [r3, #88] ; 0x58
80086d2: 4b7f ldr r3, [pc, #508] ; (80088d0 <tcp_receive+0x270>)
80086d4: 681b ldr r3, [r3, #0]
80086d6: 1ad3 subs r3, r2, r3
80086d8: 2b00 cmp r3, #0
80086da: db0e blt.n 80086fa <tcp_receive+0x9a>
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
80086dc: 687b ldr r3, [r7, #4]
80086de: 6d9a ldr r2, [r3, #88] ; 0x58
80086e0: 4b7b ldr r3, [pc, #492] ; (80088d0 <tcp_receive+0x270>)
80086e2: 681b ldr r3, [r3, #0]
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
80086e4: 429a cmp r2, r3
80086e6: d125 bne.n 8008734 <tcp_receive+0xd4>
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
80086e8: 4b7a ldr r3, [pc, #488] ; (80088d4 <tcp_receive+0x274>)
80086ea: 681b ldr r3, [r3, #0]
80086ec: 89db ldrh r3, [r3, #14]
80086ee: b29a uxth r2, r3
80086f0: 687b ldr r3, [r7, #4]
80086f2: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
80086f6: 429a cmp r2, r3
80086f8: d91c bls.n 8008734 <tcp_receive+0xd4>
pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd);
80086fa: 4b76 ldr r3, [pc, #472] ; (80088d4 <tcp_receive+0x274>)
80086fc: 681b ldr r3, [r3, #0]
80086fe: 89db ldrh r3, [r3, #14]
8008700: b29a uxth r2, r3
8008702: 687b ldr r3, [r7, #4]
8008704: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
/* keep track of the biggest window announced by the remote host to calculate
the maximum segment size */
if (pcb->snd_wnd_max < pcb->snd_wnd) {
8008708: 687b ldr r3, [r7, #4]
800870a: f8b3 2062 ldrh.w r2, [r3, #98] ; 0x62
800870e: 687b ldr r3, [r7, #4]
8008710: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8008714: 429a cmp r2, r3
8008716: d205 bcs.n 8008724 <tcp_receive+0xc4>
pcb->snd_wnd_max = pcb->snd_wnd;
8008718: 687b ldr r3, [r7, #4]
800871a: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
800871e: 687b ldr r3, [r7, #4]
8008720: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
}
pcb->snd_wl1 = seqno;
8008724: 4b69 ldr r3, [pc, #420] ; (80088cc <tcp_receive+0x26c>)
8008726: 681a ldr r2, [r3, #0]
8008728: 687b ldr r3, [r7, #4]
800872a: 655a str r2, [r3, #84] ; 0x54
pcb->snd_wl2 = ackno;
800872c: 4b68 ldr r3, [pc, #416] ; (80088d0 <tcp_receive+0x270>)
800872e: 681a ldr r2, [r3, #0]
8008730: 687b ldr r3, [r7, #4]
8008732: 659a str r2, [r3, #88] ; 0x58
* If it only passes 1, should reset dupack counter
*
*/
/* Clause 1 */
if (TCP_SEQ_LEQ(ackno, pcb->lastack)) {
8008734: 4b66 ldr r3, [pc, #408] ; (80088d0 <tcp_receive+0x270>)
8008736: 681a ldr r2, [r3, #0]
8008738: 687b ldr r3, [r7, #4]
800873a: 6c5b ldr r3, [r3, #68] ; 0x44
800873c: 1ad3 subs r3, r2, r3
800873e: 2b00 cmp r3, #0
8008740: dc58 bgt.n 80087f4 <tcp_receive+0x194>
/* Clause 2 */
if (tcplen == 0) {
8008742: 4b65 ldr r3, [pc, #404] ; (80088d8 <tcp_receive+0x278>)
8008744: 881b ldrh r3, [r3, #0]
8008746: 2b00 cmp r3, #0
8008748: d14b bne.n 80087e2 <tcp_receive+0x182>
/* Clause 3 */
if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) {
800874a: 687b ldr r3, [r7, #4]
800874c: 6d9b ldr r3, [r3, #88] ; 0x58
800874e: 687a ldr r2, [r7, #4]
8008750: f8b2 2060 ldrh.w r2, [r2, #96] ; 0x60
8008754: 4413 add r3, r2
8008756: 6b3a ldr r2, [r7, #48] ; 0x30
8008758: 429a cmp r2, r3
800875a: d142 bne.n 80087e2 <tcp_receive+0x182>
/* Clause 4 */
if (pcb->rtime >= 0) {
800875c: 687b ldr r3, [r7, #4]
800875e: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8008762: 2b00 cmp r3, #0
8008764: db3d blt.n 80087e2 <tcp_receive+0x182>
/* Clause 5 */
if (pcb->lastack == ackno) {
8008766: 687b ldr r3, [r7, #4]
8008768: 6c5a ldr r2, [r3, #68] ; 0x44
800876a: 4b59 ldr r3, [pc, #356] ; (80088d0 <tcp_receive+0x270>)
800876c: 681b ldr r3, [r3, #0]
800876e: 429a cmp r2, r3
8008770: d137 bne.n 80087e2 <tcp_receive+0x182>
found_dupack = 1;
8008772: 2301 movs r3, #1
8008774: 64bb str r3, [r7, #72] ; 0x48
if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) {
8008776: 687b ldr r3, [r7, #4]
8008778: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
800877c: 2bff cmp r3, #255 ; 0xff
800877e: d007 beq.n 8008790 <tcp_receive+0x130>
++pcb->dupacks;
8008780: 687b ldr r3, [r7, #4]
8008782: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8008786: 3301 adds r3, #1
8008788: b2da uxtb r2, r3
800878a: 687b ldr r3, [r7, #4]
800878c: f883 2043 strb.w r2, [r3, #67] ; 0x43
}
if (pcb->dupacks > 3) {
8008790: 687b ldr r3, [r7, #4]
8008792: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8008796: 2b03 cmp r3, #3
8008798: d91b bls.n 80087d2 <tcp_receive+0x172>
/* Inflate the congestion window */
TCP_WND_INC(pcb->cwnd, pcb->mss);
800879a: 687b ldr r3, [r7, #4]
800879c: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
80087a0: 687b ldr r3, [r7, #4]
80087a2: 8e5b ldrh r3, [r3, #50] ; 0x32
80087a4: 4413 add r3, r2
80087a6: b29a uxth r2, r3
80087a8: 687b ldr r3, [r7, #4]
80087aa: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
80087ae: 429a cmp r2, r3
80087b0: d30a bcc.n 80087c8 <tcp_receive+0x168>
80087b2: 687b ldr r3, [r7, #4]
80087b4: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
80087b8: 687b ldr r3, [r7, #4]
80087ba: 8e5b ldrh r3, [r3, #50] ; 0x32
80087bc: 4413 add r3, r2
80087be: b29a uxth r2, r3
80087c0: 687b ldr r3, [r7, #4]
80087c2: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
80087c6: e004 b.n 80087d2 <tcp_receive+0x172>
80087c8: 687b ldr r3, [r7, #4]
80087ca: f64f 72ff movw r2, #65535 ; 0xffff
80087ce: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
}
if (pcb->dupacks >= 3) {
80087d2: 687b ldr r3, [r7, #4]
80087d4: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
80087d8: 2b02 cmp r3, #2
80087da: d902 bls.n 80087e2 <tcp_receive+0x182>
/* Do fast retransmit (checked via TF_INFR, not via dupacks count) */
tcp_rexmit_fast(pcb);
80087dc: 6878 ldr r0, [r7, #4]
80087de: f001 feeb bl 800a5b8 <tcp_rexmit_fast>
}
}
}
/* If Clause (1) or more is true, but not a duplicate ack, reset
* count of consecutive duplicate acks */
if (!found_dupack) {
80087e2: 6cbb ldr r3, [r7, #72] ; 0x48
80087e4: 2b00 cmp r3, #0
80087e6: f040 8161 bne.w 8008aac <tcp_receive+0x44c>
pcb->dupacks = 0;
80087ea: 687b ldr r3, [r7, #4]
80087ec: 2200 movs r2, #0
80087ee: f883 2043 strb.w r2, [r3, #67] ; 0x43
80087f2: e15b b.n 8008aac <tcp_receive+0x44c>
}
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
80087f4: 4b36 ldr r3, [pc, #216] ; (80088d0 <tcp_receive+0x270>)
80087f6: 681a ldr r2, [r3, #0]
80087f8: 687b ldr r3, [r7, #4]
80087fa: 6c5b ldr r3, [r3, #68] ; 0x44
80087fc: 1ad3 subs r3, r2, r3
80087fe: 3b01 subs r3, #1
8008800: 2b00 cmp r3, #0
8008802: f2c0 814e blt.w 8008aa2 <tcp_receive+0x442>
8008806: 4b32 ldr r3, [pc, #200] ; (80088d0 <tcp_receive+0x270>)
8008808: 681a ldr r2, [r3, #0]
800880a: 687b ldr r3, [r7, #4]
800880c: 6d1b ldr r3, [r3, #80] ; 0x50
800880e: 1ad3 subs r3, r2, r3
8008810: 2b00 cmp r3, #0
8008812: f300 8146 bgt.w 8008aa2 <tcp_receive+0x442>
tcpwnd_size_t acked;
/* Reset the "IN Fast Retransmit" flag, since we are no longer
in fast retransmit. Also reset the congestion window to the
slow start threshold. */
if (pcb->flags & TF_INFR) {
8008816: 687b ldr r3, [r7, #4]
8008818: 8b5b ldrh r3, [r3, #26]
800881a: f003 0304 and.w r3, r3, #4
800881e: 2b00 cmp r3, #0
8008820: d010 beq.n 8008844 <tcp_receive+0x1e4>
tcp_clear_flags(pcb, TF_INFR);
8008822: 687b ldr r3, [r7, #4]
8008824: 8b5b ldrh r3, [r3, #26]
8008826: f023 0304 bic.w r3, r3, #4
800882a: b29a uxth r2, r3
800882c: 687b ldr r3, [r7, #4]
800882e: 835a strh r2, [r3, #26]
pcb->cwnd = pcb->ssthresh;
8008830: 687b ldr r3, [r7, #4]
8008832: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
8008836: 687b ldr r3, [r7, #4]
8008838: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->bytes_acked = 0;
800883c: 687b ldr r3, [r7, #4]
800883e: 2200 movs r2, #0
8008840: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
}
/* Reset the number of retransmissions. */
pcb->nrtx = 0;
8008844: 687b ldr r3, [r7, #4]
8008846: 2200 movs r2, #0
8008848: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Reset the retransmission time-out. */
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
800884c: 687b ldr r3, [r7, #4]
800884e: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8008852: 10db asrs r3, r3, #3
8008854: b21b sxth r3, r3
8008856: b29a uxth r2, r3
8008858: 687b ldr r3, [r7, #4]
800885a: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
800885e: b29b uxth r3, r3
8008860: 4413 add r3, r2
8008862: b29b uxth r3, r3
8008864: b21a sxth r2, r3
8008866: 687b ldr r3, [r7, #4]
8008868: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* Record how much data this ACK acks */
acked = (tcpwnd_size_t)(ackno - pcb->lastack);
800886c: 4b18 ldr r3, [pc, #96] ; (80088d0 <tcp_receive+0x270>)
800886e: 681b ldr r3, [r3, #0]
8008870: b29a uxth r2, r3
8008872: 687b ldr r3, [r7, #4]
8008874: 6c5b ldr r3, [r3, #68] ; 0x44
8008876: b29b uxth r3, r3
8008878: 1ad3 subs r3, r2, r3
800887a: 85fb strh r3, [r7, #46] ; 0x2e
/* Reset the fast retransmit variables. */
pcb->dupacks = 0;
800887c: 687b ldr r3, [r7, #4]
800887e: 2200 movs r2, #0
8008880: f883 2043 strb.w r2, [r3, #67] ; 0x43
pcb->lastack = ackno;
8008884: 4b12 ldr r3, [pc, #72] ; (80088d0 <tcp_receive+0x270>)
8008886: 681a ldr r2, [r3, #0]
8008888: 687b ldr r3, [r7, #4]
800888a: 645a str r2, [r3, #68] ; 0x44
/* Update the congestion control variables (cwnd and
ssthresh). */
if (pcb->state >= ESTABLISHED) {
800888c: 687b ldr r3, [r7, #4]
800888e: 7d1b ldrb r3, [r3, #20]
8008890: 2b03 cmp r3, #3
8008892: f240 8097 bls.w 80089c4 <tcp_receive+0x364>
if (pcb->cwnd < pcb->ssthresh) {
8008896: 687b ldr r3, [r7, #4]
8008898: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
800889c: 687b ldr r3, [r7, #4]
800889e: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
80088a2: 429a cmp r2, r3
80088a4: d245 bcs.n 8008932 <tcp_receive+0x2d2>
tcpwnd_size_t increase;
/* limit to 1 SMSS segment during period following RTO */
u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2;
80088a6: 687b ldr r3, [r7, #4]
80088a8: 8b5b ldrh r3, [r3, #26]
80088aa: f403 6300 and.w r3, r3, #2048 ; 0x800
80088ae: 2b00 cmp r3, #0
80088b0: d014 beq.n 80088dc <tcp_receive+0x27c>
80088b2: 2301 movs r3, #1
80088b4: e013 b.n 80088de <tcp_receive+0x27e>
80088b6: bf00 nop
80088b8: 08015c0c .word 0x08015c0c
80088bc: 08015f3c .word 0x08015f3c
80088c0: 08015c58 .word 0x08015c58
80088c4: 08015f58 .word 0x08015f58
80088c8: 20008bf0 .word 0x20008bf0
80088cc: 20008be4 .word 0x20008be4
80088d0: 20008be8 .word 0x20008be8
80088d4: 20008bd4 .word 0x20008bd4
80088d8: 20008bee .word 0x20008bee
80088dc: 2302 movs r3, #2
80088de: f887 302d strb.w r3, [r7, #45] ; 0x2d
/* RFC 3465, section 2.2 Slow Start */
increase = LWIP_MIN(acked, (tcpwnd_size_t)(num_seg * pcb->mss));
80088e2: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
80088e6: b29a uxth r2, r3
80088e8: 687b ldr r3, [r7, #4]
80088ea: 8e5b ldrh r3, [r3, #50] ; 0x32
80088ec: fb12 f303 smulbb r3, r2, r3
80088f0: b29b uxth r3, r3
80088f2: 8dfa ldrh r2, [r7, #46] ; 0x2e
80088f4: 4293 cmp r3, r2
80088f6: bf28 it cs
80088f8: 4613 movcs r3, r2
80088fa: 857b strh r3, [r7, #42] ; 0x2a
TCP_WND_INC(pcb->cwnd, increase);
80088fc: 687b ldr r3, [r7, #4]
80088fe: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008902: 8d7b ldrh r3, [r7, #42] ; 0x2a
8008904: 4413 add r3, r2
8008906: b29a uxth r2, r3
8008908: 687b ldr r3, [r7, #4]
800890a: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
800890e: 429a cmp r2, r3
8008910: d309 bcc.n 8008926 <tcp_receive+0x2c6>
8008912: 687b ldr r3, [r7, #4]
8008914: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008918: 8d7b ldrh r3, [r7, #42] ; 0x2a
800891a: 4413 add r3, r2
800891c: b29a uxth r2, r3
800891e: 687b ldr r3, [r7, #4]
8008920: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8008924: e04e b.n 80089c4 <tcp_receive+0x364>
8008926: 687b ldr r3, [r7, #4]
8008928: f64f 72ff movw r2, #65535 ; 0xffff
800892c: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8008930: e048 b.n 80089c4 <tcp_receive+0x364>
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: slow start cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd));
} else {
/* RFC 3465, section 2.1 Congestion Avoidance */
TCP_WND_INC(pcb->bytes_acked, acked);
8008932: 687b ldr r3, [r7, #4]
8008934: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8008938: 8dfb ldrh r3, [r7, #46] ; 0x2e
800893a: 4413 add r3, r2
800893c: b29a uxth r2, r3
800893e: 687b ldr r3, [r7, #4]
8008940: f8b3 306a ldrh.w r3, [r3, #106] ; 0x6a
8008944: 429a cmp r2, r3
8008946: d309 bcc.n 800895c <tcp_receive+0x2fc>
8008948: 687b ldr r3, [r7, #4]
800894a: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
800894e: 8dfb ldrh r3, [r7, #46] ; 0x2e
8008950: 4413 add r3, r2
8008952: b29a uxth r2, r3
8008954: 687b ldr r3, [r7, #4]
8008956: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
800895a: e004 b.n 8008966 <tcp_receive+0x306>
800895c: 687b ldr r3, [r7, #4]
800895e: f64f 72ff movw r2, #65535 ; 0xffff
8008962: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
if (pcb->bytes_acked >= pcb->cwnd) {
8008966: 687b ldr r3, [r7, #4]
8008968: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
800896c: 687b ldr r3, [r7, #4]
800896e: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8008972: 429a cmp r2, r3
8008974: d326 bcc.n 80089c4 <tcp_receive+0x364>
pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd);
8008976: 687b ldr r3, [r7, #4]
8008978: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
800897c: 687b ldr r3, [r7, #4]
800897e: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8008982: 1ad3 subs r3, r2, r3
8008984: b29a uxth r2, r3
8008986: 687b ldr r3, [r7, #4]
8008988: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
TCP_WND_INC(pcb->cwnd, pcb->mss);
800898c: 687b ldr r3, [r7, #4]
800898e: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8008992: 687b ldr r3, [r7, #4]
8008994: 8e5b ldrh r3, [r3, #50] ; 0x32
8008996: 4413 add r3, r2
8008998: b29a uxth r2, r3
800899a: 687b ldr r3, [r7, #4]
800899c: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
80089a0: 429a cmp r2, r3
80089a2: d30a bcc.n 80089ba <tcp_receive+0x35a>
80089a4: 687b ldr r3, [r7, #4]
80089a6: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
80089aa: 687b ldr r3, [r7, #4]
80089ac: 8e5b ldrh r3, [r3, #50] ; 0x32
80089ae: 4413 add r3, r2
80089b0: b29a uxth r2, r3
80089b2: 687b ldr r3, [r7, #4]
80089b4: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
80089b8: e004 b.n 80089c4 <tcp_receive+0x364>
80089ba: 687b ldr r3, [r7, #4]
80089bc: f64f 72ff movw r2, #65535 ; 0xffff
80089c0: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->unacked != NULL ?
lwip_ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked) : 0));
/* Remove segment from the unacknowledged list if the incoming
ACK acknowledges them. */
pcb->unacked = tcp_free_acked_segments(pcb, pcb->unacked, "unacked", pcb->unsent);
80089c4: 687b ldr r3, [r7, #4]
80089c6: 6f19 ldr r1, [r3, #112] ; 0x70
80089c8: 687b ldr r3, [r7, #4]
80089ca: 6edb ldr r3, [r3, #108] ; 0x6c
80089cc: 4a98 ldr r2, [pc, #608] ; (8008c30 <tcp_receive+0x5d0>)
80089ce: 6878 ldr r0, [r7, #4]
80089d0: f7ff fdca bl 8008568 <tcp_free_acked_segments>
80089d4: 4602 mov r2, r0
80089d6: 687b ldr r3, [r7, #4]
80089d8: 671a str r2, [r3, #112] ; 0x70
on the list are acknowledged by the ACK. This may seem
strange since an "unsent" segment shouldn't be acked. The
rationale is that lwIP puts all outstanding segments on the
->unsent list after a retransmission, so these segments may
in fact have been sent once. */
pcb->unsent = tcp_free_acked_segments(pcb, pcb->unsent, "unsent", pcb->unacked);
80089da: 687b ldr r3, [r7, #4]
80089dc: 6ed9 ldr r1, [r3, #108] ; 0x6c
80089de: 687b ldr r3, [r7, #4]
80089e0: 6f1b ldr r3, [r3, #112] ; 0x70
80089e2: 4a94 ldr r2, [pc, #592] ; (8008c34 <tcp_receive+0x5d4>)
80089e4: 6878 ldr r0, [r7, #4]
80089e6: f7ff fdbf bl 8008568 <tcp_free_acked_segments>
80089ea: 4602 mov r2, r0
80089ec: 687b ldr r3, [r7, #4]
80089ee: 66da str r2, [r3, #108] ; 0x6c
/* If there's nothing left to acknowledge, stop the retransmit
timer, otherwise reset it to start again */
if (pcb->unacked == NULL) {
80089f0: 687b ldr r3, [r7, #4]
80089f2: 6f1b ldr r3, [r3, #112] ; 0x70
80089f4: 2b00 cmp r3, #0
80089f6: d104 bne.n 8008a02 <tcp_receive+0x3a2>
pcb->rtime = -1;
80089f8: 687b ldr r3, [r7, #4]
80089fa: f64f 72ff movw r2, #65535 ; 0xffff
80089fe: 861a strh r2, [r3, #48] ; 0x30
8008a00: e002 b.n 8008a08 <tcp_receive+0x3a8>
} else {
pcb->rtime = 0;
8008a02: 687b ldr r3, [r7, #4]
8008a04: 2200 movs r2, #0
8008a06: 861a strh r2, [r3, #48] ; 0x30
}
pcb->polltmr = 0;
8008a08: 687b ldr r3, [r7, #4]
8008a0a: 2200 movs r2, #0
8008a0c: 771a strb r2, [r3, #28]
#if TCP_OVERSIZE
if (pcb->unsent == NULL) {
8008a0e: 687b ldr r3, [r7, #4]
8008a10: 6edb ldr r3, [r3, #108] ; 0x6c
8008a12: 2b00 cmp r3, #0
8008a14: d103 bne.n 8008a1e <tcp_receive+0x3be>
pcb->unsent_oversize = 0;
8008a16: 687b ldr r3, [r7, #4]
8008a18: 2200 movs r2, #0
8008a1a: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
/* Inform neighbor reachability of forward progress. */
nd6_reachability_hint(ip6_current_src_addr());
}
#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/
pcb->snd_buf = (tcpwnd_size_t)(pcb->snd_buf + recv_acked);
8008a1e: 687b ldr r3, [r7, #4]
8008a20: f8b3 2064 ldrh.w r2, [r3, #100] ; 0x64
8008a24: 4b84 ldr r3, [pc, #528] ; (8008c38 <tcp_receive+0x5d8>)
8008a26: 881b ldrh r3, [r3, #0]
8008a28: 4413 add r3, r2
8008a2a: b29a uxth r2, r3
8008a2c: 687b ldr r3, [r7, #4]
8008a2e: f8a3 2064 strh.w r2, [r3, #100] ; 0x64
/* check if this ACK ends our retransmission of in-flight data */
if (pcb->flags & TF_RTO) {
8008a32: 687b ldr r3, [r7, #4]
8008a34: 8b5b ldrh r3, [r3, #26]
8008a36: f403 6300 and.w r3, r3, #2048 ; 0x800
8008a3a: 2b00 cmp r3, #0
8008a3c: d035 beq.n 8008aaa <tcp_receive+0x44a>
/* RTO is done if
1) both queues are empty or
2) unacked is empty and unsent head contains data not part of RTO or
3) unacked head contains data not part of RTO */
if (pcb->unacked == NULL) {
8008a3e: 687b ldr r3, [r7, #4]
8008a40: 6f1b ldr r3, [r3, #112] ; 0x70
8008a42: 2b00 cmp r3, #0
8008a44: d118 bne.n 8008a78 <tcp_receive+0x418>
if ((pcb->unsent == NULL) ||
8008a46: 687b ldr r3, [r7, #4]
8008a48: 6edb ldr r3, [r3, #108] ; 0x6c
8008a4a: 2b00 cmp r3, #0
8008a4c: d00c beq.n 8008a68 <tcp_receive+0x408>
(TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) {
8008a4e: 687b ldr r3, [r7, #4]
8008a50: 6cdc ldr r4, [r3, #76] ; 0x4c
8008a52: 687b ldr r3, [r7, #4]
8008a54: 6edb ldr r3, [r3, #108] ; 0x6c
8008a56: 68db ldr r3, [r3, #12]
8008a58: 685b ldr r3, [r3, #4]
8008a5a: 4618 mov r0, r3
8008a5c: f7fb f9bb bl 8003dd6 <lwip_htonl>
8008a60: 4603 mov r3, r0
8008a62: 1ae3 subs r3, r4, r3
if ((pcb->unsent == NULL) ||
8008a64: 2b00 cmp r3, #0
8008a66: dc20 bgt.n 8008aaa <tcp_receive+0x44a>
tcp_clear_flags(pcb, TF_RTO);
8008a68: 687b ldr r3, [r7, #4]
8008a6a: 8b5b ldrh r3, [r3, #26]
8008a6c: f423 6300 bic.w r3, r3, #2048 ; 0x800
8008a70: b29a uxth r2, r3
8008a72: 687b ldr r3, [r7, #4]
8008a74: 835a strh r2, [r3, #26]
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8008a76: e018 b.n 8008aaa <tcp_receive+0x44a>
}
} else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) {
8008a78: 687b ldr r3, [r7, #4]
8008a7a: 6cdc ldr r4, [r3, #76] ; 0x4c
8008a7c: 687b ldr r3, [r7, #4]
8008a7e: 6f1b ldr r3, [r3, #112] ; 0x70
8008a80: 68db ldr r3, [r3, #12]
8008a82: 685b ldr r3, [r3, #4]
8008a84: 4618 mov r0, r3
8008a86: f7fb f9a6 bl 8003dd6 <lwip_htonl>
8008a8a: 4603 mov r3, r0
8008a8c: 1ae3 subs r3, r4, r3
8008a8e: 2b00 cmp r3, #0
8008a90: dc0b bgt.n 8008aaa <tcp_receive+0x44a>
tcp_clear_flags(pcb, TF_RTO);
8008a92: 687b ldr r3, [r7, #4]
8008a94: 8b5b ldrh r3, [r3, #26]
8008a96: f423 6300 bic.w r3, r3, #2048 ; 0x800
8008a9a: b29a uxth r2, r3
8008a9c: 687b ldr r3, [r7, #4]
8008a9e: 835a strh r2, [r3, #26]
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8008aa0: e003 b.n 8008aaa <tcp_receive+0x44a>
}
}
/* End of ACK for new data processing. */
} else {
/* Out of sequence ACK, didn't really ack anything */
tcp_send_empty_ack(pcb);
8008aa2: 6878 ldr r0, [r7, #4]
8008aa4: f001 ff76 bl 800a994 <tcp_send_empty_ack>
8008aa8: e000 b.n 8008aac <tcp_receive+0x44c>
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8008aaa: bf00 nop
pcb->rttest, pcb->rtseq, ackno));
/* RTT estimation calculations. This is done by checking if the
incoming segment acknowledges the segment we use to take a
round-trip time measurement. */
if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) {
8008aac: 687b ldr r3, [r7, #4]
8008aae: 6b5b ldr r3, [r3, #52] ; 0x34
8008ab0: 2b00 cmp r3, #0
8008ab2: d05b beq.n 8008b6c <tcp_receive+0x50c>
8008ab4: 687b ldr r3, [r7, #4]
8008ab6: 6b9a ldr r2, [r3, #56] ; 0x38
8008ab8: 4b60 ldr r3, [pc, #384] ; (8008c3c <tcp_receive+0x5dc>)
8008aba: 681b ldr r3, [r3, #0]
8008abc: 1ad3 subs r3, r2, r3
8008abe: 2b00 cmp r3, #0
8008ac0: da54 bge.n 8008b6c <tcp_receive+0x50c>
/* diff between this shouldn't exceed 32K since this are tcp timer ticks
and a round-trip shouldn't be that long... */
m = (s16_t)(tcp_ticks - pcb->rttest);
8008ac2: 4b5f ldr r3, [pc, #380] ; (8008c40 <tcp_receive+0x5e0>)
8008ac4: 681b ldr r3, [r3, #0]
8008ac6: b29a uxth r2, r3
8008ac8: 687b ldr r3, [r7, #4]
8008aca: 6b5b ldr r3, [r3, #52] ; 0x34
8008acc: b29b uxth r3, r3
8008ace: 1ad3 subs r3, r2, r3
8008ad0: b29b uxth r3, r3
8008ad2: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n",
m, (u16_t)(m * TCP_SLOW_INTERVAL)));
/* This is taken directly from VJs original code in his paper */
m = (s16_t)(m - (pcb->sa >> 3));
8008ad6: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
8008ada: 687b ldr r3, [r7, #4]
8008adc: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8008ae0: 10db asrs r3, r3, #3
8008ae2: b21b sxth r3, r3
8008ae4: b29b uxth r3, r3
8008ae6: 1ad3 subs r3, r2, r3
8008ae8: b29b uxth r3, r3
8008aea: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
pcb->sa = (s16_t)(pcb->sa + m);
8008aee: 687b ldr r3, [r7, #4]
8008af0: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8008af4: b29a uxth r2, r3
8008af6: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
8008afa: 4413 add r3, r2
8008afc: b29b uxth r3, r3
8008afe: b21a sxth r2, r3
8008b00: 687b ldr r3, [r7, #4]
8008b02: 879a strh r2, [r3, #60] ; 0x3c
if (m < 0) {
8008b04: f9b7 304e ldrsh.w r3, [r7, #78] ; 0x4e
8008b08: 2b00 cmp r3, #0
8008b0a: da05 bge.n 8008b18 <tcp_receive+0x4b8>
m = (s16_t) - m;
8008b0c: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
8008b10: 425b negs r3, r3
8008b12: b29b uxth r3, r3
8008b14: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
}
m = (s16_t)(m - (pcb->sv >> 2));
8008b18: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
8008b1c: 687b ldr r3, [r7, #4]
8008b1e: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8008b22: 109b asrs r3, r3, #2
8008b24: b21b sxth r3, r3
8008b26: b29b uxth r3, r3
8008b28: 1ad3 subs r3, r2, r3
8008b2a: b29b uxth r3, r3
8008b2c: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
pcb->sv = (s16_t)(pcb->sv + m);
8008b30: 687b ldr r3, [r7, #4]
8008b32: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8008b36: b29a uxth r2, r3
8008b38: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
8008b3c: 4413 add r3, r2
8008b3e: b29b uxth r3, r3
8008b40: b21a sxth r2, r3
8008b42: 687b ldr r3, [r7, #4]
8008b44: 87da strh r2, [r3, #62] ; 0x3e
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
8008b46: 687b ldr r3, [r7, #4]
8008b48: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8008b4c: 10db asrs r3, r3, #3
8008b4e: b21b sxth r3, r3
8008b50: b29a uxth r2, r3
8008b52: 687b ldr r3, [r7, #4]
8008b54: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8008b58: b29b uxth r3, r3
8008b5a: 4413 add r3, r2
8008b5c: b29b uxth r3, r3
8008b5e: b21a sxth r2, r3
8008b60: 687b ldr r3, [r7, #4]
8008b62: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: RTO %"U16_F" (%"U16_F" milliseconds)\n",
pcb->rto, (u16_t)(pcb->rto * TCP_SLOW_INTERVAL)));
pcb->rttest = 0;
8008b66: 687b ldr r3, [r7, #4]
8008b68: 2200 movs r2, #0
8008b6a: 635a str r2, [r3, #52] ; 0x34
/* If the incoming segment contains data, we must process it
further unless the pcb already received a FIN.
(RFC 793, chapter 3.9, "SEGMENT ARRIVES" in states CLOSE-WAIT, CLOSING,
LAST-ACK and TIME-WAIT: "Ignore the segment text.") */
if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) {
8008b6c: 4b35 ldr r3, [pc, #212] ; (8008c44 <tcp_receive+0x5e4>)
8008b6e: 881b ldrh r3, [r3, #0]
8008b70: 2b00 cmp r3, #0
8008b72: f000 84e2 beq.w 800953a <tcp_receive+0xeda>
8008b76: 687b ldr r3, [r7, #4]
8008b78: 7d1b ldrb r3, [r3, #20]
8008b7a: 2b06 cmp r3, #6
8008b7c: f200 84dd bhi.w 800953a <tcp_receive+0xeda>
this if the sequence number of the incoming segment is less
than rcv_nxt, and the sequence number plus the length of the
segment is larger than rcv_nxt. */
/* if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) {
if (TCP_SEQ_LT(pcb->rcv_nxt, seqno + tcplen)) {*/
if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
8008b80: 687b ldr r3, [r7, #4]
8008b82: 6a5a ldr r2, [r3, #36] ; 0x24
8008b84: 4b30 ldr r3, [pc, #192] ; (8008c48 <tcp_receive+0x5e8>)
8008b86: 681b ldr r3, [r3, #0]
8008b88: 1ad3 subs r3, r2, r3
8008b8a: 3b01 subs r3, #1
8008b8c: 2b00 cmp r3, #0
8008b8e: f2c0 808f blt.w 8008cb0 <tcp_receive+0x650>
8008b92: 687b ldr r3, [r7, #4]
8008b94: 6a5a ldr r2, [r3, #36] ; 0x24
8008b96: 4b2b ldr r3, [pc, #172] ; (8008c44 <tcp_receive+0x5e4>)
8008b98: 881b ldrh r3, [r3, #0]
8008b9a: 4619 mov r1, r3
8008b9c: 4b2a ldr r3, [pc, #168] ; (8008c48 <tcp_receive+0x5e8>)
8008b9e: 681b ldr r3, [r3, #0]
8008ba0: 440b add r3, r1
8008ba2: 1ad3 subs r3, r2, r3
8008ba4: 3301 adds r3, #1
8008ba6: 2b00 cmp r3, #0
8008ba8: f300 8082 bgt.w 8008cb0 <tcp_receive+0x650>
After we are done with adjusting the pbuf pointers we must
adjust the ->data pointer in the seg and the segment
length.*/
struct pbuf *p = inseg.p;
8008bac: 4b27 ldr r3, [pc, #156] ; (8008c4c <tcp_receive+0x5ec>)
8008bae: 685b ldr r3, [r3, #4]
8008bb0: 647b str r3, [r7, #68] ; 0x44
u32_t off32 = pcb->rcv_nxt - seqno;
8008bb2: 687b ldr r3, [r7, #4]
8008bb4: 6a5a ldr r2, [r3, #36] ; 0x24
8008bb6: 4b24 ldr r3, [pc, #144] ; (8008c48 <tcp_receive+0x5e8>)
8008bb8: 681b ldr r3, [r3, #0]
8008bba: 1ad3 subs r3, r2, r3
8008bbc: 627b str r3, [r7, #36] ; 0x24
u16_t new_tot_len, off;
LWIP_ASSERT("inseg.p != NULL", inseg.p);
8008bbe: 4b23 ldr r3, [pc, #140] ; (8008c4c <tcp_receive+0x5ec>)
8008bc0: 685b ldr r3, [r3, #4]
8008bc2: 2b00 cmp r3, #0
8008bc4: d106 bne.n 8008bd4 <tcp_receive+0x574>
8008bc6: 4b22 ldr r3, [pc, #136] ; (8008c50 <tcp_receive+0x5f0>)
8008bc8: f240 5294 movw r2, #1428 ; 0x594
8008bcc: 4921 ldr r1, [pc, #132] ; (8008c54 <tcp_receive+0x5f4>)
8008bce: 4822 ldr r0, [pc, #136] ; (8008c58 <tcp_receive+0x5f8>)
8008bd0: f007 f972 bl 800feb8 <printf>
LWIP_ASSERT("insane offset!", (off32 < 0xffff));
8008bd4: 6a7b ldr r3, [r7, #36] ; 0x24
8008bd6: f64f 72fe movw r2, #65534 ; 0xfffe
8008bda: 4293 cmp r3, r2
8008bdc: d906 bls.n 8008bec <tcp_receive+0x58c>
8008bde: 4b1c ldr r3, [pc, #112] ; (8008c50 <tcp_receive+0x5f0>)
8008be0: f240 5295 movw r2, #1429 ; 0x595
8008be4: 491d ldr r1, [pc, #116] ; (8008c5c <tcp_receive+0x5fc>)
8008be6: 481c ldr r0, [pc, #112] ; (8008c58 <tcp_receive+0x5f8>)
8008be8: f007 f966 bl 800feb8 <printf>
off = (u16_t)off32;
8008bec: 6a7b ldr r3, [r7, #36] ; 0x24
8008bee: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
8008bf2: 4b16 ldr r3, [pc, #88] ; (8008c4c <tcp_receive+0x5ec>)
8008bf4: 685b ldr r3, [r3, #4]
8008bf6: 891b ldrh r3, [r3, #8]
8008bf8: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
8008bfc: 429a cmp r2, r3
8008bfe: d906 bls.n 8008c0e <tcp_receive+0x5ae>
8008c00: 4b13 ldr r3, [pc, #76] ; (8008c50 <tcp_receive+0x5f0>)
8008c02: f240 5297 movw r2, #1431 ; 0x597
8008c06: 4916 ldr r1, [pc, #88] ; (8008c60 <tcp_receive+0x600>)
8008c08: 4813 ldr r0, [pc, #76] ; (8008c58 <tcp_receive+0x5f8>)
8008c0a: f007 f955 bl 800feb8 <printf>
inseg.len -= off;
8008c0e: 4b0f ldr r3, [pc, #60] ; (8008c4c <tcp_receive+0x5ec>)
8008c10: 891a ldrh r2, [r3, #8]
8008c12: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8008c16: 1ad3 subs r3, r2, r3
8008c18: b29a uxth r2, r3
8008c1a: 4b0c ldr r3, [pc, #48] ; (8008c4c <tcp_receive+0x5ec>)
8008c1c: 811a strh r2, [r3, #8]
new_tot_len = (u16_t)(inseg.p->tot_len - off);
8008c1e: 4b0b ldr r3, [pc, #44] ; (8008c4c <tcp_receive+0x5ec>)
8008c20: 685b ldr r3, [r3, #4]
8008c22: 891a ldrh r2, [r3, #8]
8008c24: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8008c28: 1ad3 subs r3, r2, r3
8008c2a: 847b strh r3, [r7, #34] ; 0x22
while (p->len < off) {
8008c2c: e02a b.n 8008c84 <tcp_receive+0x624>
8008c2e: bf00 nop
8008c30: 08015f74 .word 0x08015f74
8008c34: 08015f7c .word 0x08015f7c
8008c38: 20008bec .word 0x20008bec
8008c3c: 20008be8 .word 0x20008be8
8008c40: 20008bac .word 0x20008bac
8008c44: 20008bee .word 0x20008bee
8008c48: 20008be4 .word 0x20008be4
8008c4c: 20008bc4 .word 0x20008bc4
8008c50: 08015c0c .word 0x08015c0c
8008c54: 08015f84 .word 0x08015f84
8008c58: 08015c58 .word 0x08015c58
8008c5c: 08015f94 .word 0x08015f94
8008c60: 08015fa4 .word 0x08015fa4
off -= p->len;
8008c64: 6c7b ldr r3, [r7, #68] ; 0x44
8008c66: 895b ldrh r3, [r3, #10]
8008c68: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
8008c6c: 1ad3 subs r3, r2, r3
8008c6e: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
/* all pbufs up to and including this one have len==0, so tot_len is equal */
p->tot_len = new_tot_len;
8008c72: 6c7b ldr r3, [r7, #68] ; 0x44
8008c74: 8c7a ldrh r2, [r7, #34] ; 0x22
8008c76: 811a strh r2, [r3, #8]
p->len = 0;
8008c78: 6c7b ldr r3, [r7, #68] ; 0x44
8008c7a: 2200 movs r2, #0
8008c7c: 815a strh r2, [r3, #10]
p = p->next;
8008c7e: 6c7b ldr r3, [r7, #68] ; 0x44
8008c80: 681b ldr r3, [r3, #0]
8008c82: 647b str r3, [r7, #68] ; 0x44
while (p->len < off) {
8008c84: 6c7b ldr r3, [r7, #68] ; 0x44
8008c86: 895b ldrh r3, [r3, #10]
8008c88: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
8008c8c: 429a cmp r2, r3
8008c8e: d8e9 bhi.n 8008c64 <tcp_receive+0x604>
}
/* cannot fail... */
pbuf_remove_header(p, off);
8008c90: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8008c94: 4619 mov r1, r3
8008c96: 6c78 ldr r0, [r7, #68] ; 0x44
8008c98: f7fc fb6c bl 8005374 <pbuf_remove_header>
inseg.tcphdr->seqno = seqno = pcb->rcv_nxt;
8008c9c: 687b ldr r3, [r7, #4]
8008c9e: 6a5b ldr r3, [r3, #36] ; 0x24
8008ca0: 4a91 ldr r2, [pc, #580] ; (8008ee8 <tcp_receive+0x888>)
8008ca2: 6013 str r3, [r2, #0]
8008ca4: 4b91 ldr r3, [pc, #580] ; (8008eec <tcp_receive+0x88c>)
8008ca6: 68db ldr r3, [r3, #12]
8008ca8: 4a8f ldr r2, [pc, #572] ; (8008ee8 <tcp_receive+0x888>)
8008caa: 6812 ldr r2, [r2, #0]
8008cac: 605a str r2, [r3, #4]
if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
8008cae: e00d b.n 8008ccc <tcp_receive+0x66c>
} else {
if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) {
8008cb0: 4b8d ldr r3, [pc, #564] ; (8008ee8 <tcp_receive+0x888>)
8008cb2: 681a ldr r2, [r3, #0]
8008cb4: 687b ldr r3, [r7, #4]
8008cb6: 6a5b ldr r3, [r3, #36] ; 0x24
8008cb8: 1ad3 subs r3, r2, r3
8008cba: 2b00 cmp r3, #0
8008cbc: da06 bge.n 8008ccc <tcp_receive+0x66c>
/* the whole segment is < rcv_nxt */
/* must be a duplicate of a packet that has already been correctly handled */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: duplicate seqno %"U32_F"\n", seqno));
tcp_ack_now(pcb);
8008cbe: 687b ldr r3, [r7, #4]
8008cc0: 8b5b ldrh r3, [r3, #26]
8008cc2: f043 0302 orr.w r3, r3, #2
8008cc6: b29a uxth r2, r3
8008cc8: 687b ldr r3, [r7, #4]
8008cca: 835a strh r2, [r3, #26]
}
/* The sequence number must be within the window (above rcv_nxt
and below rcv_nxt + rcv_wnd) in order to be further
processed. */
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
8008ccc: 4b86 ldr r3, [pc, #536] ; (8008ee8 <tcp_receive+0x888>)
8008cce: 681a ldr r2, [r3, #0]
8008cd0: 687b ldr r3, [r7, #4]
8008cd2: 6a5b ldr r3, [r3, #36] ; 0x24
8008cd4: 1ad3 subs r3, r2, r3
8008cd6: 2b00 cmp r3, #0
8008cd8: f2c0 842a blt.w 8009530 <tcp_receive+0xed0>
8008cdc: 4b82 ldr r3, [pc, #520] ; (8008ee8 <tcp_receive+0x888>)
8008cde: 681a ldr r2, [r3, #0]
8008ce0: 687b ldr r3, [r7, #4]
8008ce2: 6a5b ldr r3, [r3, #36] ; 0x24
8008ce4: 6879 ldr r1, [r7, #4]
8008ce6: 8d09 ldrh r1, [r1, #40] ; 0x28
8008ce8: 440b add r3, r1
8008cea: 1ad3 subs r3, r2, r3
8008cec: 3301 adds r3, #1
8008cee: 2b00 cmp r3, #0
8008cf0: f300 841e bgt.w 8009530 <tcp_receive+0xed0>
pcb->rcv_nxt + pcb->rcv_wnd - 1)) {
if (pcb->rcv_nxt == seqno) {
8008cf4: 687b ldr r3, [r7, #4]
8008cf6: 6a5a ldr r2, [r3, #36] ; 0x24
8008cf8: 4b7b ldr r3, [pc, #492] ; (8008ee8 <tcp_receive+0x888>)
8008cfa: 681b ldr r3, [r3, #0]
8008cfc: 429a cmp r2, r3
8008cfe: f040 829a bne.w 8009236 <tcp_receive+0xbd6>
/* The incoming segment is the next in sequence. We check if
we have to trim the end of the segment and update rcv_nxt
and pass the data to the application. */
tcplen = TCP_TCPLEN(&inseg);
8008d02: 4b7a ldr r3, [pc, #488] ; (8008eec <tcp_receive+0x88c>)
8008d04: 891c ldrh r4, [r3, #8]
8008d06: 4b79 ldr r3, [pc, #484] ; (8008eec <tcp_receive+0x88c>)
8008d08: 68db ldr r3, [r3, #12]
8008d0a: 899b ldrh r3, [r3, #12]
8008d0c: b29b uxth r3, r3
8008d0e: 4618 mov r0, r3
8008d10: f7fb f84c bl 8003dac <lwip_htons>
8008d14: 4603 mov r3, r0
8008d16: b2db uxtb r3, r3
8008d18: f003 0303 and.w r3, r3, #3
8008d1c: 2b00 cmp r3, #0
8008d1e: d001 beq.n 8008d24 <tcp_receive+0x6c4>
8008d20: 2301 movs r3, #1
8008d22: e000 b.n 8008d26 <tcp_receive+0x6c6>
8008d24: 2300 movs r3, #0
8008d26: 4423 add r3, r4
8008d28: b29a uxth r2, r3
8008d2a: 4b71 ldr r3, [pc, #452] ; (8008ef0 <tcp_receive+0x890>)
8008d2c: 801a strh r2, [r3, #0]
if (tcplen > pcb->rcv_wnd) {
8008d2e: 687b ldr r3, [r7, #4]
8008d30: 8d1a ldrh r2, [r3, #40] ; 0x28
8008d32: 4b6f ldr r3, [pc, #444] ; (8008ef0 <tcp_receive+0x890>)
8008d34: 881b ldrh r3, [r3, #0]
8008d36: 429a cmp r2, r3
8008d38: d275 bcs.n 8008e26 <tcp_receive+0x7c6>
LWIP_DEBUGF(TCP_INPUT_DEBUG,
("tcp_receive: other end overran receive window"
"seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n",
seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd));
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
8008d3a: 4b6c ldr r3, [pc, #432] ; (8008eec <tcp_receive+0x88c>)
8008d3c: 68db ldr r3, [r3, #12]
8008d3e: 899b ldrh r3, [r3, #12]
8008d40: b29b uxth r3, r3
8008d42: 4618 mov r0, r3
8008d44: f7fb f832 bl 8003dac <lwip_htons>
8008d48: 4603 mov r3, r0
8008d4a: b2db uxtb r3, r3
8008d4c: f003 0301 and.w r3, r3, #1
8008d50: 2b00 cmp r3, #0
8008d52: d01f beq.n 8008d94 <tcp_receive+0x734>
/* Must remove the FIN from the header as we're trimming
* that byte of sequence-space from the packet */
TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) & ~(unsigned int)TCP_FIN);
8008d54: 4b65 ldr r3, [pc, #404] ; (8008eec <tcp_receive+0x88c>)
8008d56: 68db ldr r3, [r3, #12]
8008d58: 899b ldrh r3, [r3, #12]
8008d5a: b29b uxth r3, r3
8008d5c: b21b sxth r3, r3
8008d5e: f423 537c bic.w r3, r3, #16128 ; 0x3f00
8008d62: b21c sxth r4, r3
8008d64: 4b61 ldr r3, [pc, #388] ; (8008eec <tcp_receive+0x88c>)
8008d66: 68db ldr r3, [r3, #12]
8008d68: 899b ldrh r3, [r3, #12]
8008d6a: b29b uxth r3, r3
8008d6c: 4618 mov r0, r3
8008d6e: f7fb f81d bl 8003dac <lwip_htons>
8008d72: 4603 mov r3, r0
8008d74: b2db uxtb r3, r3
8008d76: b29b uxth r3, r3
8008d78: f003 033e and.w r3, r3, #62 ; 0x3e
8008d7c: b29b uxth r3, r3
8008d7e: 4618 mov r0, r3
8008d80: f7fb f814 bl 8003dac <lwip_htons>
8008d84: 4603 mov r3, r0
8008d86: b21b sxth r3, r3
8008d88: 4323 orrs r3, r4
8008d8a: b21a sxth r2, r3
8008d8c: 4b57 ldr r3, [pc, #348] ; (8008eec <tcp_receive+0x88c>)
8008d8e: 68db ldr r3, [r3, #12]
8008d90: b292 uxth r2, r2
8008d92: 819a strh r2, [r3, #12]
}
/* Adjust length of segment to fit in the window. */
TCPWND_CHECK16(pcb->rcv_wnd);
inseg.len = (u16_t)pcb->rcv_wnd;
8008d94: 687b ldr r3, [r7, #4]
8008d96: 8d1a ldrh r2, [r3, #40] ; 0x28
8008d98: 4b54 ldr r3, [pc, #336] ; (8008eec <tcp_receive+0x88c>)
8008d9a: 811a strh r2, [r3, #8]
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
8008d9c: 4b53 ldr r3, [pc, #332] ; (8008eec <tcp_receive+0x88c>)
8008d9e: 68db ldr r3, [r3, #12]
8008da0: 899b ldrh r3, [r3, #12]
8008da2: b29b uxth r3, r3
8008da4: 4618 mov r0, r3
8008da6: f7fb f801 bl 8003dac <lwip_htons>
8008daa: 4603 mov r3, r0
8008dac: b2db uxtb r3, r3
8008dae: f003 0302 and.w r3, r3, #2
8008db2: 2b00 cmp r3, #0
8008db4: d005 beq.n 8008dc2 <tcp_receive+0x762>
inseg.len -= 1;
8008db6: 4b4d ldr r3, [pc, #308] ; (8008eec <tcp_receive+0x88c>)
8008db8: 891b ldrh r3, [r3, #8]
8008dba: 3b01 subs r3, #1
8008dbc: b29a uxth r2, r3
8008dbe: 4b4b ldr r3, [pc, #300] ; (8008eec <tcp_receive+0x88c>)
8008dc0: 811a strh r2, [r3, #8]
}
pbuf_realloc(inseg.p, inseg.len);
8008dc2: 4b4a ldr r3, [pc, #296] ; (8008eec <tcp_receive+0x88c>)
8008dc4: 685b ldr r3, [r3, #4]
8008dc6: 4a49 ldr r2, [pc, #292] ; (8008eec <tcp_receive+0x88c>)
8008dc8: 8912 ldrh r2, [r2, #8]
8008dca: 4611 mov r1, r2
8008dcc: 4618 mov r0, r3
8008dce: f7fc f9d1 bl 8005174 <pbuf_realloc>
tcplen = TCP_TCPLEN(&inseg);
8008dd2: 4b46 ldr r3, [pc, #280] ; (8008eec <tcp_receive+0x88c>)
8008dd4: 891c ldrh r4, [r3, #8]
8008dd6: 4b45 ldr r3, [pc, #276] ; (8008eec <tcp_receive+0x88c>)
8008dd8: 68db ldr r3, [r3, #12]
8008dda: 899b ldrh r3, [r3, #12]
8008ddc: b29b uxth r3, r3
8008dde: 4618 mov r0, r3
8008de0: f7fa ffe4 bl 8003dac <lwip_htons>
8008de4: 4603 mov r3, r0
8008de6: b2db uxtb r3, r3
8008de8: f003 0303 and.w r3, r3, #3
8008dec: 2b00 cmp r3, #0
8008dee: d001 beq.n 8008df4 <tcp_receive+0x794>
8008df0: 2301 movs r3, #1
8008df2: e000 b.n 8008df6 <tcp_receive+0x796>
8008df4: 2300 movs r3, #0
8008df6: 4423 add r3, r4
8008df8: b29a uxth r2, r3
8008dfa: 4b3d ldr r3, [pc, #244] ; (8008ef0 <tcp_receive+0x890>)
8008dfc: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
8008dfe: 4b3c ldr r3, [pc, #240] ; (8008ef0 <tcp_receive+0x890>)
8008e00: 881b ldrh r3, [r3, #0]
8008e02: 461a mov r2, r3
8008e04: 4b38 ldr r3, [pc, #224] ; (8008ee8 <tcp_receive+0x888>)
8008e06: 681b ldr r3, [r3, #0]
8008e08: 441a add r2, r3
8008e0a: 687b ldr r3, [r7, #4]
8008e0c: 6a5b ldr r3, [r3, #36] ; 0x24
8008e0e: 6879 ldr r1, [r7, #4]
8008e10: 8d09 ldrh r1, [r1, #40] ; 0x28
8008e12: 440b add r3, r1
8008e14: 429a cmp r2, r3
8008e16: d006 beq.n 8008e26 <tcp_receive+0x7c6>
8008e18: 4b36 ldr r3, [pc, #216] ; (8008ef4 <tcp_receive+0x894>)
8008e1a: f240 52cb movw r2, #1483 ; 0x5cb
8008e1e: 4936 ldr r1, [pc, #216] ; (8008ef8 <tcp_receive+0x898>)
8008e20: 4836 ldr r0, [pc, #216] ; (8008efc <tcp_receive+0x89c>)
8008e22: f007 f849 bl 800feb8 <printf>
}
#if TCP_QUEUE_OOSEQ
/* Received in-sequence data, adjust ooseq data if:
- FIN has been received or
- inseq overlaps with ooseq */
if (pcb->ooseq != NULL) {
8008e26: 687b ldr r3, [r7, #4]
8008e28: 6f5b ldr r3, [r3, #116] ; 0x74
8008e2a: 2b00 cmp r3, #0
8008e2c: f000 80e7 beq.w 8008ffe <tcp_receive+0x99e>
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
8008e30: 4b2e ldr r3, [pc, #184] ; (8008eec <tcp_receive+0x88c>)
8008e32: 68db ldr r3, [r3, #12]
8008e34: 899b ldrh r3, [r3, #12]
8008e36: b29b uxth r3, r3
8008e38: 4618 mov r0, r3
8008e3a: f7fa ffb7 bl 8003dac <lwip_htons>
8008e3e: 4603 mov r3, r0
8008e40: b2db uxtb r3, r3
8008e42: f003 0301 and.w r3, r3, #1
8008e46: 2b00 cmp r3, #0
8008e48: d010 beq.n 8008e6c <tcp_receive+0x80c>
LWIP_DEBUGF(TCP_INPUT_DEBUG,
("tcp_receive: received in-order FIN, binning ooseq queue\n"));
/* Received in-order FIN means anything that was received
* out of order must now have been received in-order, so
* bin the ooseq queue */
while (pcb->ooseq != NULL) {
8008e4a: e00a b.n 8008e62 <tcp_receive+0x802>
struct tcp_seg *old_ooseq = pcb->ooseq;
8008e4c: 687b ldr r3, [r7, #4]
8008e4e: 6f5b ldr r3, [r3, #116] ; 0x74
8008e50: 60fb str r3, [r7, #12]
pcb->ooseq = pcb->ooseq->next;
8008e52: 687b ldr r3, [r7, #4]
8008e54: 6f5b ldr r3, [r3, #116] ; 0x74
8008e56: 681a ldr r2, [r3, #0]
8008e58: 687b ldr r3, [r7, #4]
8008e5a: 675a str r2, [r3, #116] ; 0x74
tcp_seg_free(old_ooseq);
8008e5c: 68f8 ldr r0, [r7, #12]
8008e5e: f7fd fd92 bl 8006986 <tcp_seg_free>
while (pcb->ooseq != NULL) {
8008e62: 687b ldr r3, [r7, #4]
8008e64: 6f5b ldr r3, [r3, #116] ; 0x74
8008e66: 2b00 cmp r3, #0
8008e68: d1f0 bne.n 8008e4c <tcp_receive+0x7ec>
8008e6a: e0c8 b.n 8008ffe <tcp_receive+0x99e>
}
} else {
struct tcp_seg *next = pcb->ooseq;
8008e6c: 687b ldr r3, [r7, #4]
8008e6e: 6f5b ldr r3, [r3, #116] ; 0x74
8008e70: 63fb str r3, [r7, #60] ; 0x3c
/* Remove all segments on ooseq that are covered by inseg already.
* FIN is copied from ooseq to inseg if present. */
while (next &&
8008e72: e052 b.n 8008f1a <tcp_receive+0x8ba>
TCP_SEQ_GEQ(seqno + tcplen,
next->tcphdr->seqno + next->len)) {
struct tcp_seg *tmp;
/* inseg cannot have FIN here (already processed above) */
if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
8008e74: 6bfb ldr r3, [r7, #60] ; 0x3c
8008e76: 68db ldr r3, [r3, #12]
8008e78: 899b ldrh r3, [r3, #12]
8008e7a: b29b uxth r3, r3
8008e7c: 4618 mov r0, r3
8008e7e: f7fa ff95 bl 8003dac <lwip_htons>
8008e82: 4603 mov r3, r0
8008e84: b2db uxtb r3, r3
8008e86: f003 0301 and.w r3, r3, #1
8008e8a: 2b00 cmp r3, #0
8008e8c: d03d beq.n 8008f0a <tcp_receive+0x8aa>
(TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) {
8008e8e: 4b17 ldr r3, [pc, #92] ; (8008eec <tcp_receive+0x88c>)
8008e90: 68db ldr r3, [r3, #12]
8008e92: 899b ldrh r3, [r3, #12]
8008e94: b29b uxth r3, r3
8008e96: 4618 mov r0, r3
8008e98: f7fa ff88 bl 8003dac <lwip_htons>
8008e9c: 4603 mov r3, r0
8008e9e: b2db uxtb r3, r3
8008ea0: f003 0302 and.w r3, r3, #2
if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
8008ea4: 2b00 cmp r3, #0
8008ea6: d130 bne.n 8008f0a <tcp_receive+0x8aa>
TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN);
8008ea8: 4b10 ldr r3, [pc, #64] ; (8008eec <tcp_receive+0x88c>)
8008eaa: 68db ldr r3, [r3, #12]
8008eac: 899b ldrh r3, [r3, #12]
8008eae: b29c uxth r4, r3
8008eb0: 2001 movs r0, #1
8008eb2: f7fa ff7b bl 8003dac <lwip_htons>
8008eb6: 4603 mov r3, r0
8008eb8: 461a mov r2, r3
8008eba: 4b0c ldr r3, [pc, #48] ; (8008eec <tcp_receive+0x88c>)
8008ebc: 68db ldr r3, [r3, #12]
8008ebe: 4322 orrs r2, r4
8008ec0: b292 uxth r2, r2
8008ec2: 819a strh r2, [r3, #12]
tcplen = TCP_TCPLEN(&inseg);
8008ec4: 4b09 ldr r3, [pc, #36] ; (8008eec <tcp_receive+0x88c>)
8008ec6: 891c ldrh r4, [r3, #8]
8008ec8: 4b08 ldr r3, [pc, #32] ; (8008eec <tcp_receive+0x88c>)
8008eca: 68db ldr r3, [r3, #12]
8008ecc: 899b ldrh r3, [r3, #12]
8008ece: b29b uxth r3, r3
8008ed0: 4618 mov r0, r3
8008ed2: f7fa ff6b bl 8003dac <lwip_htons>
8008ed6: 4603 mov r3, r0
8008ed8: b2db uxtb r3, r3
8008eda: f003 0303 and.w r3, r3, #3
8008ede: 2b00 cmp r3, #0
8008ee0: d00e beq.n 8008f00 <tcp_receive+0x8a0>
8008ee2: 2301 movs r3, #1
8008ee4: e00d b.n 8008f02 <tcp_receive+0x8a2>
8008ee6: bf00 nop
8008ee8: 20008be4 .word 0x20008be4
8008eec: 20008bc4 .word 0x20008bc4
8008ef0: 20008bee .word 0x20008bee
8008ef4: 08015c0c .word 0x08015c0c
8008ef8: 08015fb4 .word 0x08015fb4
8008efc: 08015c58 .word 0x08015c58
8008f00: 2300 movs r3, #0
8008f02: 4423 add r3, r4
8008f04: b29a uxth r2, r3
8008f06: 4b98 ldr r3, [pc, #608] ; (8009168 <tcp_receive+0xb08>)
8008f08: 801a strh r2, [r3, #0]
}
tmp = next;
8008f0a: 6bfb ldr r3, [r7, #60] ; 0x3c
8008f0c: 613b str r3, [r7, #16]
next = next->next;
8008f0e: 6bfb ldr r3, [r7, #60] ; 0x3c
8008f10: 681b ldr r3, [r3, #0]
8008f12: 63fb str r3, [r7, #60] ; 0x3c
tcp_seg_free(tmp);
8008f14: 6938 ldr r0, [r7, #16]
8008f16: f7fd fd36 bl 8006986 <tcp_seg_free>
while (next &&
8008f1a: 6bfb ldr r3, [r7, #60] ; 0x3c
8008f1c: 2b00 cmp r3, #0
8008f1e: d00e beq.n 8008f3e <tcp_receive+0x8de>
TCP_SEQ_GEQ(seqno + tcplen,
8008f20: 4b91 ldr r3, [pc, #580] ; (8009168 <tcp_receive+0xb08>)
8008f22: 881b ldrh r3, [r3, #0]
8008f24: 461a mov r2, r3
8008f26: 4b91 ldr r3, [pc, #580] ; (800916c <tcp_receive+0xb0c>)
8008f28: 681b ldr r3, [r3, #0]
8008f2a: 441a add r2, r3
8008f2c: 6bfb ldr r3, [r7, #60] ; 0x3c
8008f2e: 68db ldr r3, [r3, #12]
8008f30: 685b ldr r3, [r3, #4]
8008f32: 6bf9 ldr r1, [r7, #60] ; 0x3c
8008f34: 8909 ldrh r1, [r1, #8]
8008f36: 440b add r3, r1
8008f38: 1ad3 subs r3, r2, r3
while (next &&
8008f3a: 2b00 cmp r3, #0
8008f3c: da9a bge.n 8008e74 <tcp_receive+0x814>
}
/* Now trim right side of inseg if it overlaps with the first
* segment on ooseq */
if (next &&
8008f3e: 6bfb ldr r3, [r7, #60] ; 0x3c
8008f40: 2b00 cmp r3, #0
8008f42: d059 beq.n 8008ff8 <tcp_receive+0x998>
TCP_SEQ_GT(seqno + tcplen,
8008f44: 4b88 ldr r3, [pc, #544] ; (8009168 <tcp_receive+0xb08>)
8008f46: 881b ldrh r3, [r3, #0]
8008f48: 461a mov r2, r3
8008f4a: 4b88 ldr r3, [pc, #544] ; (800916c <tcp_receive+0xb0c>)
8008f4c: 681b ldr r3, [r3, #0]
8008f4e: 441a add r2, r3
8008f50: 6bfb ldr r3, [r7, #60] ; 0x3c
8008f52: 68db ldr r3, [r3, #12]
8008f54: 685b ldr r3, [r3, #4]
8008f56: 1ad3 subs r3, r2, r3
if (next &&
8008f58: 2b00 cmp r3, #0
8008f5a: dd4d ble.n 8008ff8 <tcp_receive+0x998>
next->tcphdr->seqno)) {
/* inseg cannot have FIN here (already processed above) */
inseg.len = (u16_t)(next->tcphdr->seqno - seqno);
8008f5c: 6bfb ldr r3, [r7, #60] ; 0x3c
8008f5e: 68db ldr r3, [r3, #12]
8008f60: 685b ldr r3, [r3, #4]
8008f62: b29a uxth r2, r3
8008f64: 4b81 ldr r3, [pc, #516] ; (800916c <tcp_receive+0xb0c>)
8008f66: 681b ldr r3, [r3, #0]
8008f68: b29b uxth r3, r3
8008f6a: 1ad3 subs r3, r2, r3
8008f6c: b29a uxth r2, r3
8008f6e: 4b80 ldr r3, [pc, #512] ; (8009170 <tcp_receive+0xb10>)
8008f70: 811a strh r2, [r3, #8]
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
8008f72: 4b7f ldr r3, [pc, #508] ; (8009170 <tcp_receive+0xb10>)
8008f74: 68db ldr r3, [r3, #12]
8008f76: 899b ldrh r3, [r3, #12]
8008f78: b29b uxth r3, r3
8008f7a: 4618 mov r0, r3
8008f7c: f7fa ff16 bl 8003dac <lwip_htons>
8008f80: 4603 mov r3, r0
8008f82: b2db uxtb r3, r3
8008f84: f003 0302 and.w r3, r3, #2
8008f88: 2b00 cmp r3, #0
8008f8a: d005 beq.n 8008f98 <tcp_receive+0x938>
inseg.len -= 1;
8008f8c: 4b78 ldr r3, [pc, #480] ; (8009170 <tcp_receive+0xb10>)
8008f8e: 891b ldrh r3, [r3, #8]
8008f90: 3b01 subs r3, #1
8008f92: b29a uxth r2, r3
8008f94: 4b76 ldr r3, [pc, #472] ; (8009170 <tcp_receive+0xb10>)
8008f96: 811a strh r2, [r3, #8]
}
pbuf_realloc(inseg.p, inseg.len);
8008f98: 4b75 ldr r3, [pc, #468] ; (8009170 <tcp_receive+0xb10>)
8008f9a: 685b ldr r3, [r3, #4]
8008f9c: 4a74 ldr r2, [pc, #464] ; (8009170 <tcp_receive+0xb10>)
8008f9e: 8912 ldrh r2, [r2, #8]
8008fa0: 4611 mov r1, r2
8008fa2: 4618 mov r0, r3
8008fa4: f7fc f8e6 bl 8005174 <pbuf_realloc>
tcplen = TCP_TCPLEN(&inseg);
8008fa8: 4b71 ldr r3, [pc, #452] ; (8009170 <tcp_receive+0xb10>)
8008faa: 891c ldrh r4, [r3, #8]
8008fac: 4b70 ldr r3, [pc, #448] ; (8009170 <tcp_receive+0xb10>)
8008fae: 68db ldr r3, [r3, #12]
8008fb0: 899b ldrh r3, [r3, #12]
8008fb2: b29b uxth r3, r3
8008fb4: 4618 mov r0, r3
8008fb6: f7fa fef9 bl 8003dac <lwip_htons>
8008fba: 4603 mov r3, r0
8008fbc: b2db uxtb r3, r3
8008fbe: f003 0303 and.w r3, r3, #3
8008fc2: 2b00 cmp r3, #0
8008fc4: d001 beq.n 8008fca <tcp_receive+0x96a>
8008fc6: 2301 movs r3, #1
8008fc8: e000 b.n 8008fcc <tcp_receive+0x96c>
8008fca: 2300 movs r3, #0
8008fcc: 4423 add r3, r4
8008fce: b29a uxth r2, r3
8008fd0: 4b65 ldr r3, [pc, #404] ; (8009168 <tcp_receive+0xb08>)
8008fd2: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n",
8008fd4: 4b64 ldr r3, [pc, #400] ; (8009168 <tcp_receive+0xb08>)
8008fd6: 881b ldrh r3, [r3, #0]
8008fd8: 461a mov r2, r3
8008fda: 4b64 ldr r3, [pc, #400] ; (800916c <tcp_receive+0xb0c>)
8008fdc: 681b ldr r3, [r3, #0]
8008fde: 441a add r2, r3
8008fe0: 6bfb ldr r3, [r7, #60] ; 0x3c
8008fe2: 68db ldr r3, [r3, #12]
8008fe4: 685b ldr r3, [r3, #4]
8008fe6: 429a cmp r2, r3
8008fe8: d006 beq.n 8008ff8 <tcp_receive+0x998>
8008fea: 4b62 ldr r3, [pc, #392] ; (8009174 <tcp_receive+0xb14>)
8008fec: f240 52fc movw r2, #1532 ; 0x5fc
8008ff0: 4961 ldr r1, [pc, #388] ; (8009178 <tcp_receive+0xb18>)
8008ff2: 4862 ldr r0, [pc, #392] ; (800917c <tcp_receive+0xb1c>)
8008ff4: f006 ff60 bl 800feb8 <printf>
(seqno + tcplen) == next->tcphdr->seqno);
}
pcb->ooseq = next;
8008ff8: 687b ldr r3, [r7, #4]
8008ffa: 6bfa ldr r2, [r7, #60] ; 0x3c
8008ffc: 675a str r2, [r3, #116] ; 0x74
}
}
#endif /* TCP_QUEUE_OOSEQ */
pcb->rcv_nxt = seqno + tcplen;
8008ffe: 4b5a ldr r3, [pc, #360] ; (8009168 <tcp_receive+0xb08>)
8009000: 881b ldrh r3, [r3, #0]
8009002: 461a mov r2, r3
8009004: 4b59 ldr r3, [pc, #356] ; (800916c <tcp_receive+0xb0c>)
8009006: 681b ldr r3, [r3, #0]
8009008: 441a add r2, r3
800900a: 687b ldr r3, [r7, #4]
800900c: 625a str r2, [r3, #36] ; 0x24
/* Update the receiver's (our) window. */
LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen);
800900e: 687b ldr r3, [r7, #4]
8009010: 8d1a ldrh r2, [r3, #40] ; 0x28
8009012: 4b55 ldr r3, [pc, #340] ; (8009168 <tcp_receive+0xb08>)
8009014: 881b ldrh r3, [r3, #0]
8009016: 429a cmp r2, r3
8009018: d206 bcs.n 8009028 <tcp_receive+0x9c8>
800901a: 4b56 ldr r3, [pc, #344] ; (8009174 <tcp_receive+0xb14>)
800901c: f240 6207 movw r2, #1543 ; 0x607
8009020: 4957 ldr r1, [pc, #348] ; (8009180 <tcp_receive+0xb20>)
8009022: 4856 ldr r0, [pc, #344] ; (800917c <tcp_receive+0xb1c>)
8009024: f006 ff48 bl 800feb8 <printf>
pcb->rcv_wnd -= tcplen;
8009028: 687b ldr r3, [r7, #4]
800902a: 8d1a ldrh r2, [r3, #40] ; 0x28
800902c: 4b4e ldr r3, [pc, #312] ; (8009168 <tcp_receive+0xb08>)
800902e: 881b ldrh r3, [r3, #0]
8009030: 1ad3 subs r3, r2, r3
8009032: b29a uxth r2, r3
8009034: 687b ldr r3, [r7, #4]
8009036: 851a strh r2, [r3, #40] ; 0x28
tcp_update_rcv_ann_wnd(pcb);
8009038: 6878 ldr r0, [r7, #4]
800903a: f7fc ffc5 bl 8005fc8 <tcp_update_rcv_ann_wnd>
chains its data on this pbuf as well.
If the segment was a FIN, we set the TF_GOT_FIN flag that will
be used to indicate to the application that the remote side has
closed its end of the connection. */
if (inseg.p->tot_len > 0) {
800903e: 4b4c ldr r3, [pc, #304] ; (8009170 <tcp_receive+0xb10>)
8009040: 685b ldr r3, [r3, #4]
8009042: 891b ldrh r3, [r3, #8]
8009044: 2b00 cmp r3, #0
8009046: d006 beq.n 8009056 <tcp_receive+0x9f6>
recv_data = inseg.p;
8009048: 4b49 ldr r3, [pc, #292] ; (8009170 <tcp_receive+0xb10>)
800904a: 685b ldr r3, [r3, #4]
800904c: 4a4d ldr r2, [pc, #308] ; (8009184 <tcp_receive+0xb24>)
800904e: 6013 str r3, [r2, #0]
/* Since this pbuf now is the responsibility of the
application, we delete our reference to it so that we won't
(mistakingly) deallocate it. */
inseg.p = NULL;
8009050: 4b47 ldr r3, [pc, #284] ; (8009170 <tcp_receive+0xb10>)
8009052: 2200 movs r2, #0
8009054: 605a str r2, [r3, #4]
}
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
8009056: 4b46 ldr r3, [pc, #280] ; (8009170 <tcp_receive+0xb10>)
8009058: 68db ldr r3, [r3, #12]
800905a: 899b ldrh r3, [r3, #12]
800905c: b29b uxth r3, r3
800905e: 4618 mov r0, r3
8009060: f7fa fea4 bl 8003dac <lwip_htons>
8009064: 4603 mov r3, r0
8009066: b2db uxtb r3, r3
8009068: f003 0301 and.w r3, r3, #1
800906c: 2b00 cmp r3, #0
800906e: f000 80b8 beq.w 80091e2 <tcp_receive+0xb82>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n"));
recv_flags |= TF_GOT_FIN;
8009072: 4b45 ldr r3, [pc, #276] ; (8009188 <tcp_receive+0xb28>)
8009074: 781b ldrb r3, [r3, #0]
8009076: f043 0320 orr.w r3, r3, #32
800907a: b2da uxtb r2, r3
800907c: 4b42 ldr r3, [pc, #264] ; (8009188 <tcp_receive+0xb28>)
800907e: 701a strb r2, [r3, #0]
}
#if TCP_QUEUE_OOSEQ
/* We now check if we have segments on the ->ooseq queue that
are now in sequence. */
while (pcb->ooseq != NULL &&
8009080: e0af b.n 80091e2 <tcp_receive+0xb82>
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
struct tcp_seg *cseg = pcb->ooseq;
8009082: 687b ldr r3, [r7, #4]
8009084: 6f5b ldr r3, [r3, #116] ; 0x74
8009086: 60bb str r3, [r7, #8]
seqno = pcb->ooseq->tcphdr->seqno;
8009088: 687b ldr r3, [r7, #4]
800908a: 6f5b ldr r3, [r3, #116] ; 0x74
800908c: 68db ldr r3, [r3, #12]
800908e: 685b ldr r3, [r3, #4]
8009090: 4a36 ldr r2, [pc, #216] ; (800916c <tcp_receive+0xb0c>)
8009092: 6013 str r3, [r2, #0]
pcb->rcv_nxt += TCP_TCPLEN(cseg);
8009094: 68bb ldr r3, [r7, #8]
8009096: 891b ldrh r3, [r3, #8]
8009098: 461c mov r4, r3
800909a: 68bb ldr r3, [r7, #8]
800909c: 68db ldr r3, [r3, #12]
800909e: 899b ldrh r3, [r3, #12]
80090a0: b29b uxth r3, r3
80090a2: 4618 mov r0, r3
80090a4: f7fa fe82 bl 8003dac <lwip_htons>
80090a8: 4603 mov r3, r0
80090aa: b2db uxtb r3, r3
80090ac: f003 0303 and.w r3, r3, #3
80090b0: 2b00 cmp r3, #0
80090b2: d001 beq.n 80090b8 <tcp_receive+0xa58>
80090b4: 2301 movs r3, #1
80090b6: e000 b.n 80090ba <tcp_receive+0xa5a>
80090b8: 2300 movs r3, #0
80090ba: 191a adds r2, r3, r4
80090bc: 687b ldr r3, [r7, #4]
80090be: 6a5b ldr r3, [r3, #36] ; 0x24
80090c0: 441a add r2, r3
80090c2: 687b ldr r3, [r7, #4]
80090c4: 625a str r2, [r3, #36] ; 0x24
LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n",
80090c6: 687b ldr r3, [r7, #4]
80090c8: 8d1b ldrh r3, [r3, #40] ; 0x28
80090ca: 461c mov r4, r3
80090cc: 68bb ldr r3, [r7, #8]
80090ce: 891b ldrh r3, [r3, #8]
80090d0: 461d mov r5, r3
80090d2: 68bb ldr r3, [r7, #8]
80090d4: 68db ldr r3, [r3, #12]
80090d6: 899b ldrh r3, [r3, #12]
80090d8: b29b uxth r3, r3
80090da: 4618 mov r0, r3
80090dc: f7fa fe66 bl 8003dac <lwip_htons>
80090e0: 4603 mov r3, r0
80090e2: b2db uxtb r3, r3
80090e4: f003 0303 and.w r3, r3, #3
80090e8: 2b00 cmp r3, #0
80090ea: d001 beq.n 80090f0 <tcp_receive+0xa90>
80090ec: 2301 movs r3, #1
80090ee: e000 b.n 80090f2 <tcp_receive+0xa92>
80090f0: 2300 movs r3, #0
80090f2: 442b add r3, r5
80090f4: 429c cmp r4, r3
80090f6: d206 bcs.n 8009106 <tcp_receive+0xaa6>
80090f8: 4b1e ldr r3, [pc, #120] ; (8009174 <tcp_receive+0xb14>)
80090fa: f240 622b movw r2, #1579 ; 0x62b
80090fe: 4923 ldr r1, [pc, #140] ; (800918c <tcp_receive+0xb2c>)
8009100: 481e ldr r0, [pc, #120] ; (800917c <tcp_receive+0xb1c>)
8009102: f006 fed9 bl 800feb8 <printf>
pcb->rcv_wnd >= TCP_TCPLEN(cseg));
pcb->rcv_wnd -= TCP_TCPLEN(cseg);
8009106: 68bb ldr r3, [r7, #8]
8009108: 891b ldrh r3, [r3, #8]
800910a: 461c mov r4, r3
800910c: 68bb ldr r3, [r7, #8]
800910e: 68db ldr r3, [r3, #12]
8009110: 899b ldrh r3, [r3, #12]
8009112: b29b uxth r3, r3
8009114: 4618 mov r0, r3
8009116: f7fa fe49 bl 8003dac <lwip_htons>
800911a: 4603 mov r3, r0
800911c: b2db uxtb r3, r3
800911e: f003 0303 and.w r3, r3, #3
8009122: 2b00 cmp r3, #0
8009124: d001 beq.n 800912a <tcp_receive+0xaca>
8009126: 2301 movs r3, #1
8009128: e000 b.n 800912c <tcp_receive+0xacc>
800912a: 2300 movs r3, #0
800912c: 1919 adds r1, r3, r4
800912e: 687b ldr r3, [r7, #4]
8009130: 8d1a ldrh r2, [r3, #40] ; 0x28
8009132: b28b uxth r3, r1
8009134: 1ad3 subs r3, r2, r3
8009136: b29a uxth r2, r3
8009138: 687b ldr r3, [r7, #4]
800913a: 851a strh r2, [r3, #40] ; 0x28
tcp_update_rcv_ann_wnd(pcb);
800913c: 6878 ldr r0, [r7, #4]
800913e: f7fc ff43 bl 8005fc8 <tcp_update_rcv_ann_wnd>
if (cseg->p->tot_len > 0) {
8009142: 68bb ldr r3, [r7, #8]
8009144: 685b ldr r3, [r3, #4]
8009146: 891b ldrh r3, [r3, #8]
8009148: 2b00 cmp r3, #0
800914a: d028 beq.n 800919e <tcp_receive+0xb3e>
/* Chain this pbuf onto the pbuf that we will pass to
the application. */
/* With window scaling, this can overflow recv_data->tot_len, but
that's not a problem since we explicitly fix that before passing
recv_data to the application. */
if (recv_data) {
800914c: 4b0d ldr r3, [pc, #52] ; (8009184 <tcp_receive+0xb24>)
800914e: 681b ldr r3, [r3, #0]
8009150: 2b00 cmp r3, #0
8009152: d01d beq.n 8009190 <tcp_receive+0xb30>
pbuf_cat(recv_data, cseg->p);
8009154: 4b0b ldr r3, [pc, #44] ; (8009184 <tcp_receive+0xb24>)
8009156: 681a ldr r2, [r3, #0]
8009158: 68bb ldr r3, [r7, #8]
800915a: 685b ldr r3, [r3, #4]
800915c: 4619 mov r1, r3
800915e: 4610 mov r0, r2
8009160: f7fc fa50 bl 8005604 <pbuf_cat>
8009164: e018 b.n 8009198 <tcp_receive+0xb38>
8009166: bf00 nop
8009168: 20008bee .word 0x20008bee
800916c: 20008be4 .word 0x20008be4
8009170: 20008bc4 .word 0x20008bc4
8009174: 08015c0c .word 0x08015c0c
8009178: 08015fec .word 0x08015fec
800917c: 08015c58 .word 0x08015c58
8009180: 08016028 .word 0x08016028
8009184: 20008bf4 .word 0x20008bf4
8009188: 20008bf1 .word 0x20008bf1
800918c: 08016048 .word 0x08016048
} else {
recv_data = cseg->p;
8009190: 68bb ldr r3, [r7, #8]
8009192: 685b ldr r3, [r3, #4]
8009194: 4a70 ldr r2, [pc, #448] ; (8009358 <tcp_receive+0xcf8>)
8009196: 6013 str r3, [r2, #0]
}
cseg->p = NULL;
8009198: 68bb ldr r3, [r7, #8]
800919a: 2200 movs r2, #0
800919c: 605a str r2, [r3, #4]
}
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
800919e: 68bb ldr r3, [r7, #8]
80091a0: 68db ldr r3, [r3, #12]
80091a2: 899b ldrh r3, [r3, #12]
80091a4: b29b uxth r3, r3
80091a6: 4618 mov r0, r3
80091a8: f7fa fe00 bl 8003dac <lwip_htons>
80091ac: 4603 mov r3, r0
80091ae: b2db uxtb r3, r3
80091b0: f003 0301 and.w r3, r3, #1
80091b4: 2b00 cmp r3, #0
80091b6: d00d beq.n 80091d4 <tcp_receive+0xb74>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n"));
recv_flags |= TF_GOT_FIN;
80091b8: 4b68 ldr r3, [pc, #416] ; (800935c <tcp_receive+0xcfc>)
80091ba: 781b ldrb r3, [r3, #0]
80091bc: f043 0320 orr.w r3, r3, #32
80091c0: b2da uxtb r2, r3
80091c2: 4b66 ldr r3, [pc, #408] ; (800935c <tcp_receive+0xcfc>)
80091c4: 701a strb r2, [r3, #0]
if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */
80091c6: 687b ldr r3, [r7, #4]
80091c8: 7d1b ldrb r3, [r3, #20]
80091ca: 2b04 cmp r3, #4
80091cc: d102 bne.n 80091d4 <tcp_receive+0xb74>
pcb->state = CLOSE_WAIT;
80091ce: 687b ldr r3, [r7, #4]
80091d0: 2207 movs r2, #7
80091d2: 751a strb r2, [r3, #20]
}
}
pcb->ooseq = cseg->next;
80091d4: 68bb ldr r3, [r7, #8]
80091d6: 681a ldr r2, [r3, #0]
80091d8: 687b ldr r3, [r7, #4]
80091da: 675a str r2, [r3, #116] ; 0x74
tcp_seg_free(cseg);
80091dc: 68b8 ldr r0, [r7, #8]
80091de: f7fd fbd2 bl 8006986 <tcp_seg_free>
while (pcb->ooseq != NULL &&
80091e2: 687b ldr r3, [r7, #4]
80091e4: 6f5b ldr r3, [r3, #116] ; 0x74
80091e6: 2b00 cmp r3, #0
80091e8: d008 beq.n 80091fc <tcp_receive+0xb9c>
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
80091ea: 687b ldr r3, [r7, #4]
80091ec: 6f5b ldr r3, [r3, #116] ; 0x74
80091ee: 68db ldr r3, [r3, #12]
80091f0: 685a ldr r2, [r3, #4]
80091f2: 687b ldr r3, [r7, #4]
80091f4: 6a5b ldr r3, [r3, #36] ; 0x24
while (pcb->ooseq != NULL &&
80091f6: 429a cmp r2, r3
80091f8: f43f af43 beq.w 8009082 <tcp_receive+0xa22>
#endif /* LWIP_TCP_SACK_OUT */
#endif /* TCP_QUEUE_OOSEQ */
/* Acknowledge the segment(s). */
tcp_ack(pcb);
80091fc: 687b ldr r3, [r7, #4]
80091fe: 8b5b ldrh r3, [r3, #26]
8009200: f003 0301 and.w r3, r3, #1
8009204: 2b00 cmp r3, #0
8009206: d00e beq.n 8009226 <tcp_receive+0xbc6>
8009208: 687b ldr r3, [r7, #4]
800920a: 8b5b ldrh r3, [r3, #26]
800920c: f023 0301 bic.w r3, r3, #1
8009210: b29a uxth r2, r3
8009212: 687b ldr r3, [r7, #4]
8009214: 835a strh r2, [r3, #26]
8009216: 687b ldr r3, [r7, #4]
8009218: 8b5b ldrh r3, [r3, #26]
800921a: f043 0302 orr.w r3, r3, #2
800921e: b29a uxth r2, r3
8009220: 687b ldr r3, [r7, #4]
8009222: 835a strh r2, [r3, #26]
if (pcb->rcv_nxt == seqno) {
8009224: e188 b.n 8009538 <tcp_receive+0xed8>
tcp_ack(pcb);
8009226: 687b ldr r3, [r7, #4]
8009228: 8b5b ldrh r3, [r3, #26]
800922a: f043 0301 orr.w r3, r3, #1
800922e: b29a uxth r2, r3
8009230: 687b ldr r3, [r7, #4]
8009232: 835a strh r2, [r3, #26]
if (pcb->rcv_nxt == seqno) {
8009234: e180 b.n 8009538 <tcp_receive+0xed8>
} else {
/* We get here if the incoming segment is out-of-sequence. */
#if TCP_QUEUE_OOSEQ
/* We queue the segment on the ->ooseq queue. */
if (pcb->ooseq == NULL) {
8009236: 687b ldr r3, [r7, #4]
8009238: 6f5b ldr r3, [r3, #116] ; 0x74
800923a: 2b00 cmp r3, #0
800923c: d106 bne.n 800924c <tcp_receive+0xbec>
pcb->ooseq = tcp_seg_copy(&inseg);
800923e: 4848 ldr r0, [pc, #288] ; (8009360 <tcp_receive+0xd00>)
8009240: f7fd fbba bl 80069b8 <tcp_seg_copy>
8009244: 4602 mov r2, r0
8009246: 687b ldr r3, [r7, #4]
8009248: 675a str r2, [r3, #116] ; 0x74
800924a: e16d b.n 8009528 <tcp_receive+0xec8>
#if LWIP_TCP_SACK_OUT
/* This is the left edge of the lowest possible SACK range.
It may start before the newly received segment (possibly adjusted below). */
u32_t sackbeg = TCP_SEQ_LT(seqno, pcb->ooseq->tcphdr->seqno) ? seqno : pcb->ooseq->tcphdr->seqno;
#endif /* LWIP_TCP_SACK_OUT */
struct tcp_seg *next, *prev = NULL;
800924c: 2300 movs r3, #0
800924e: 637b str r3, [r7, #52] ; 0x34
for (next = pcb->ooseq; next != NULL; next = next->next) {
8009250: 687b ldr r3, [r7, #4]
8009252: 6f5b ldr r3, [r3, #116] ; 0x74
8009254: 63bb str r3, [r7, #56] ; 0x38
8009256: e157 b.n 8009508 <tcp_receive+0xea8>
if (seqno == next->tcphdr->seqno) {
8009258: 6bbb ldr r3, [r7, #56] ; 0x38
800925a: 68db ldr r3, [r3, #12]
800925c: 685a ldr r2, [r3, #4]
800925e: 4b41 ldr r3, [pc, #260] ; (8009364 <tcp_receive+0xd04>)
8009260: 681b ldr r3, [r3, #0]
8009262: 429a cmp r2, r3
8009264: d11d bne.n 80092a2 <tcp_receive+0xc42>
/* The sequence number of the incoming segment is the
same as the sequence number of the segment on
->ooseq. We check the lengths to see which one to
discard. */
if (inseg.len > next->len) {
8009266: 4b3e ldr r3, [pc, #248] ; (8009360 <tcp_receive+0xd00>)
8009268: 891a ldrh r2, [r3, #8]
800926a: 6bbb ldr r3, [r7, #56] ; 0x38
800926c: 891b ldrh r3, [r3, #8]
800926e: 429a cmp r2, r3
8009270: f240 814f bls.w 8009512 <tcp_receive+0xeb2>
/* The incoming segment is larger than the old
segment. We replace some segments with the new
one. */
struct tcp_seg *cseg = tcp_seg_copy(&inseg);
8009274: 483a ldr r0, [pc, #232] ; (8009360 <tcp_receive+0xd00>)
8009276: f7fd fb9f bl 80069b8 <tcp_seg_copy>
800927a: 6178 str r0, [r7, #20]
if (cseg != NULL) {
800927c: 697b ldr r3, [r7, #20]
800927e: 2b00 cmp r3, #0
8009280: f000 8149 beq.w 8009516 <tcp_receive+0xeb6>
if (prev != NULL) {
8009284: 6b7b ldr r3, [r7, #52] ; 0x34
8009286: 2b00 cmp r3, #0
8009288: d003 beq.n 8009292 <tcp_receive+0xc32>
prev->next = cseg;
800928a: 6b7b ldr r3, [r7, #52] ; 0x34
800928c: 697a ldr r2, [r7, #20]
800928e: 601a str r2, [r3, #0]
8009290: e002 b.n 8009298 <tcp_receive+0xc38>
} else {
pcb->ooseq = cseg;
8009292: 687b ldr r3, [r7, #4]
8009294: 697a ldr r2, [r7, #20]
8009296: 675a str r2, [r3, #116] ; 0x74
}
tcp_oos_insert_segment(cseg, next);
8009298: 6bb9 ldr r1, [r7, #56] ; 0x38
800929a: 6978 ldr r0, [r7, #20]
800929c: f7ff f8dc bl 8008458 <tcp_oos_insert_segment>
}
break;
80092a0: e139 b.n 8009516 <tcp_receive+0xeb6>
segment was smaller than the old one; in either
case, we ditch the incoming segment. */
break;
}
} else {
if (prev == NULL) {
80092a2: 6b7b ldr r3, [r7, #52] ; 0x34
80092a4: 2b00 cmp r3, #0
80092a6: d117 bne.n 80092d8 <tcp_receive+0xc78>
if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {
80092a8: 4b2e ldr r3, [pc, #184] ; (8009364 <tcp_receive+0xd04>)
80092aa: 681a ldr r2, [r3, #0]
80092ac: 6bbb ldr r3, [r7, #56] ; 0x38
80092ae: 68db ldr r3, [r3, #12]
80092b0: 685b ldr r3, [r3, #4]
80092b2: 1ad3 subs r3, r2, r3
80092b4: 2b00 cmp r3, #0
80092b6: da57 bge.n 8009368 <tcp_receive+0xd08>
/* The sequence number of the incoming segment is lower
than the sequence number of the first segment on the
queue. We put the incoming segment first on the
queue. */
struct tcp_seg *cseg = tcp_seg_copy(&inseg);
80092b8: 4829 ldr r0, [pc, #164] ; (8009360 <tcp_receive+0xd00>)
80092ba: f7fd fb7d bl 80069b8 <tcp_seg_copy>
80092be: 61b8 str r0, [r7, #24]
if (cseg != NULL) {
80092c0: 69bb ldr r3, [r7, #24]
80092c2: 2b00 cmp r3, #0
80092c4: f000 8129 beq.w 800951a <tcp_receive+0xeba>
pcb->ooseq = cseg;
80092c8: 687b ldr r3, [r7, #4]
80092ca: 69ba ldr r2, [r7, #24]
80092cc: 675a str r2, [r3, #116] ; 0x74
tcp_oos_insert_segment(cseg, next);
80092ce: 6bb9 ldr r1, [r7, #56] ; 0x38
80092d0: 69b8 ldr r0, [r7, #24]
80092d2: f7ff f8c1 bl 8008458 <tcp_oos_insert_segment>
}
break;
80092d6: e120 b.n 800951a <tcp_receive+0xeba>
}
} else {
/*if (TCP_SEQ_LT(prev->tcphdr->seqno, seqno) &&
TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {*/
if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno + 1, next->tcphdr->seqno - 1)) {
80092d8: 4b22 ldr r3, [pc, #136] ; (8009364 <tcp_receive+0xd04>)
80092da: 681a ldr r2, [r3, #0]
80092dc: 6b7b ldr r3, [r7, #52] ; 0x34
80092de: 68db ldr r3, [r3, #12]
80092e0: 685b ldr r3, [r3, #4]
80092e2: 1ad3 subs r3, r2, r3
80092e4: 3b01 subs r3, #1
80092e6: 2b00 cmp r3, #0
80092e8: db3e blt.n 8009368 <tcp_receive+0xd08>
80092ea: 4b1e ldr r3, [pc, #120] ; (8009364 <tcp_receive+0xd04>)
80092ec: 681a ldr r2, [r3, #0]
80092ee: 6bbb ldr r3, [r7, #56] ; 0x38
80092f0: 68db ldr r3, [r3, #12]
80092f2: 685b ldr r3, [r3, #4]
80092f4: 1ad3 subs r3, r2, r3
80092f6: 3301 adds r3, #1
80092f8: 2b00 cmp r3, #0
80092fa: dc35 bgt.n 8009368 <tcp_receive+0xd08>
/* The sequence number of the incoming segment is in
between the sequence numbers of the previous and
the next segment on ->ooseq. We trim trim the previous
segment, delete next segments that included in received segment
and trim received, if needed. */
struct tcp_seg *cseg = tcp_seg_copy(&inseg);
80092fc: 4818 ldr r0, [pc, #96] ; (8009360 <tcp_receive+0xd00>)
80092fe: f7fd fb5b bl 80069b8 <tcp_seg_copy>
8009302: 61f8 str r0, [r7, #28]
if (cseg != NULL) {
8009304: 69fb ldr r3, [r7, #28]
8009306: 2b00 cmp r3, #0
8009308: f000 8109 beq.w 800951e <tcp_receive+0xebe>
if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) {
800930c: 6b7b ldr r3, [r7, #52] ; 0x34
800930e: 68db ldr r3, [r3, #12]
8009310: 685b ldr r3, [r3, #4]
8009312: 6b7a ldr r2, [r7, #52] ; 0x34
8009314: 8912 ldrh r2, [r2, #8]
8009316: 441a add r2, r3
8009318: 4b12 ldr r3, [pc, #72] ; (8009364 <tcp_receive+0xd04>)
800931a: 681b ldr r3, [r3, #0]
800931c: 1ad3 subs r3, r2, r3
800931e: 2b00 cmp r3, #0
8009320: dd12 ble.n 8009348 <tcp_receive+0xce8>
/* We need to trim the prev segment. */
prev->len = (u16_t)(seqno - prev->tcphdr->seqno);
8009322: 4b10 ldr r3, [pc, #64] ; (8009364 <tcp_receive+0xd04>)
8009324: 681b ldr r3, [r3, #0]
8009326: b29a uxth r2, r3
8009328: 6b7b ldr r3, [r7, #52] ; 0x34
800932a: 68db ldr r3, [r3, #12]
800932c: 685b ldr r3, [r3, #4]
800932e: b29b uxth r3, r3
8009330: 1ad3 subs r3, r2, r3
8009332: b29a uxth r2, r3
8009334: 6b7b ldr r3, [r7, #52] ; 0x34
8009336: 811a strh r2, [r3, #8]
pbuf_realloc(prev->p, prev->len);
8009338: 6b7b ldr r3, [r7, #52] ; 0x34
800933a: 685a ldr r2, [r3, #4]
800933c: 6b7b ldr r3, [r7, #52] ; 0x34
800933e: 891b ldrh r3, [r3, #8]
8009340: 4619 mov r1, r3
8009342: 4610 mov r0, r2
8009344: f7fb ff16 bl 8005174 <pbuf_realloc>
}
prev->next = cseg;
8009348: 6b7b ldr r3, [r7, #52] ; 0x34
800934a: 69fa ldr r2, [r7, #28]
800934c: 601a str r2, [r3, #0]
tcp_oos_insert_segment(cseg, next);
800934e: 6bb9 ldr r1, [r7, #56] ; 0x38
8009350: 69f8 ldr r0, [r7, #28]
8009352: f7ff f881 bl 8008458 <tcp_oos_insert_segment>
}
break;
8009356: e0e2 b.n 800951e <tcp_receive+0xebe>
8009358: 20008bf4 .word 0x20008bf4
800935c: 20008bf1 .word 0x20008bf1
8009360: 20008bc4 .word 0x20008bc4
8009364: 20008be4 .word 0x20008be4
#endif /* LWIP_TCP_SACK_OUT */
/* We don't use 'prev' below, so let's set it to current 'next'.
This way even if we break the loop below, 'prev' will be pointing
at the segment right in front of the newly added one. */
prev = next;
8009368: 6bbb ldr r3, [r7, #56] ; 0x38
800936a: 637b str r3, [r7, #52] ; 0x34
/* If the "next" segment is the last segment on the
ooseq queue, we add the incoming segment to the end
of the list. */
if (next->next == NULL &&
800936c: 6bbb ldr r3, [r7, #56] ; 0x38
800936e: 681b ldr r3, [r3, #0]
8009370: 2b00 cmp r3, #0
8009372: f040 80c6 bne.w 8009502 <tcp_receive+0xea2>
TCP_SEQ_GT(seqno, next->tcphdr->seqno)) {
8009376: 4b80 ldr r3, [pc, #512] ; (8009578 <tcp_receive+0xf18>)
8009378: 681a ldr r2, [r3, #0]
800937a: 6bbb ldr r3, [r7, #56] ; 0x38
800937c: 68db ldr r3, [r3, #12]
800937e: 685b ldr r3, [r3, #4]
8009380: 1ad3 subs r3, r2, r3
if (next->next == NULL &&
8009382: 2b00 cmp r3, #0
8009384: f340 80bd ble.w 8009502 <tcp_receive+0xea2>
if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
8009388: 6bbb ldr r3, [r7, #56] ; 0x38
800938a: 68db ldr r3, [r3, #12]
800938c: 899b ldrh r3, [r3, #12]
800938e: b29b uxth r3, r3
8009390: 4618 mov r0, r3
8009392: f7fa fd0b bl 8003dac <lwip_htons>
8009396: 4603 mov r3, r0
8009398: b2db uxtb r3, r3
800939a: f003 0301 and.w r3, r3, #1
800939e: 2b00 cmp r3, #0
80093a0: f040 80bf bne.w 8009522 <tcp_receive+0xec2>
/* segment "next" already contains all data */
break;
}
next->next = tcp_seg_copy(&inseg);
80093a4: 4875 ldr r0, [pc, #468] ; (800957c <tcp_receive+0xf1c>)
80093a6: f7fd fb07 bl 80069b8 <tcp_seg_copy>
80093aa: 4602 mov r2, r0
80093ac: 6bbb ldr r3, [r7, #56] ; 0x38
80093ae: 601a str r2, [r3, #0]
if (next->next != NULL) {
80093b0: 6bbb ldr r3, [r7, #56] ; 0x38
80093b2: 681b ldr r3, [r3, #0]
80093b4: 2b00 cmp r3, #0
80093b6: f000 80b6 beq.w 8009526 <tcp_receive+0xec6>
if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) {
80093ba: 6bbb ldr r3, [r7, #56] ; 0x38
80093bc: 68db ldr r3, [r3, #12]
80093be: 685b ldr r3, [r3, #4]
80093c0: 6bba ldr r2, [r7, #56] ; 0x38
80093c2: 8912 ldrh r2, [r2, #8]
80093c4: 441a add r2, r3
80093c6: 4b6c ldr r3, [pc, #432] ; (8009578 <tcp_receive+0xf18>)
80093c8: 681b ldr r3, [r3, #0]
80093ca: 1ad3 subs r3, r2, r3
80093cc: 2b00 cmp r3, #0
80093ce: dd12 ble.n 80093f6 <tcp_receive+0xd96>
/* We need to trim the last segment. */
next->len = (u16_t)(seqno - next->tcphdr->seqno);
80093d0: 4b69 ldr r3, [pc, #420] ; (8009578 <tcp_receive+0xf18>)
80093d2: 681b ldr r3, [r3, #0]
80093d4: b29a uxth r2, r3
80093d6: 6bbb ldr r3, [r7, #56] ; 0x38
80093d8: 68db ldr r3, [r3, #12]
80093da: 685b ldr r3, [r3, #4]
80093dc: b29b uxth r3, r3
80093de: 1ad3 subs r3, r2, r3
80093e0: b29a uxth r2, r3
80093e2: 6bbb ldr r3, [r7, #56] ; 0x38
80093e4: 811a strh r2, [r3, #8]
pbuf_realloc(next->p, next->len);
80093e6: 6bbb ldr r3, [r7, #56] ; 0x38
80093e8: 685a ldr r2, [r3, #4]
80093ea: 6bbb ldr r3, [r7, #56] ; 0x38
80093ec: 891b ldrh r3, [r3, #8]
80093ee: 4619 mov r1, r3
80093f0: 4610 mov r0, r2
80093f2: f7fb febf bl 8005174 <pbuf_realloc>
}
/* check if the remote side overruns our receive window */
if (TCP_SEQ_GT((u32_t)tcplen + seqno, pcb->rcv_nxt + (u32_t)pcb->rcv_wnd)) {
80093f6: 4b62 ldr r3, [pc, #392] ; (8009580 <tcp_receive+0xf20>)
80093f8: 881b ldrh r3, [r3, #0]
80093fa: 461a mov r2, r3
80093fc: 4b5e ldr r3, [pc, #376] ; (8009578 <tcp_receive+0xf18>)
80093fe: 681b ldr r3, [r3, #0]
8009400: 441a add r2, r3
8009402: 687b ldr r3, [r7, #4]
8009404: 6a5b ldr r3, [r3, #36] ; 0x24
8009406: 6879 ldr r1, [r7, #4]
8009408: 8d09 ldrh r1, [r1, #40] ; 0x28
800940a: 440b add r3, r1
800940c: 1ad3 subs r3, r2, r3
800940e: 2b00 cmp r3, #0
8009410: f340 8089 ble.w 8009526 <tcp_receive+0xec6>
LWIP_DEBUGF(TCP_INPUT_DEBUG,
("tcp_receive: other end overran receive window"
"seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n",
seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd));
if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) {
8009414: 6bbb ldr r3, [r7, #56] ; 0x38
8009416: 681b ldr r3, [r3, #0]
8009418: 68db ldr r3, [r3, #12]
800941a: 899b ldrh r3, [r3, #12]
800941c: b29b uxth r3, r3
800941e: 4618 mov r0, r3
8009420: f7fa fcc4 bl 8003dac <lwip_htons>
8009424: 4603 mov r3, r0
8009426: b2db uxtb r3, r3
8009428: f003 0301 and.w r3, r3, #1
800942c: 2b00 cmp r3, #0
800942e: d022 beq.n 8009476 <tcp_receive+0xe16>
/* Must remove the FIN from the header as we're trimming
* that byte of sequence-space from the packet */
TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) & ~TCP_FIN);
8009430: 6bbb ldr r3, [r7, #56] ; 0x38
8009432: 681b ldr r3, [r3, #0]
8009434: 68db ldr r3, [r3, #12]
8009436: 899b ldrh r3, [r3, #12]
8009438: b29b uxth r3, r3
800943a: b21b sxth r3, r3
800943c: f423 537c bic.w r3, r3, #16128 ; 0x3f00
8009440: b21c sxth r4, r3
8009442: 6bbb ldr r3, [r7, #56] ; 0x38
8009444: 681b ldr r3, [r3, #0]
8009446: 68db ldr r3, [r3, #12]
8009448: 899b ldrh r3, [r3, #12]
800944a: b29b uxth r3, r3
800944c: 4618 mov r0, r3
800944e: f7fa fcad bl 8003dac <lwip_htons>
8009452: 4603 mov r3, r0
8009454: b2db uxtb r3, r3
8009456: b29b uxth r3, r3
8009458: f003 033e and.w r3, r3, #62 ; 0x3e
800945c: b29b uxth r3, r3
800945e: 4618 mov r0, r3
8009460: f7fa fca4 bl 8003dac <lwip_htons>
8009464: 4603 mov r3, r0
8009466: b21b sxth r3, r3
8009468: 4323 orrs r3, r4
800946a: b21a sxth r2, r3
800946c: 6bbb ldr r3, [r7, #56] ; 0x38
800946e: 681b ldr r3, [r3, #0]
8009470: 68db ldr r3, [r3, #12]
8009472: b292 uxth r2, r2
8009474: 819a strh r2, [r3, #12]
}
/* Adjust length of segment to fit in the window. */
next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno);
8009476: 687b ldr r3, [r7, #4]
8009478: 6a5b ldr r3, [r3, #36] ; 0x24
800947a: b29a uxth r2, r3
800947c: 687b ldr r3, [r7, #4]
800947e: 8d1b ldrh r3, [r3, #40] ; 0x28
8009480: 4413 add r3, r2
8009482: b299 uxth r1, r3
8009484: 4b3c ldr r3, [pc, #240] ; (8009578 <tcp_receive+0xf18>)
8009486: 681b ldr r3, [r3, #0]
8009488: b29a uxth r2, r3
800948a: 6bbb ldr r3, [r7, #56] ; 0x38
800948c: 681b ldr r3, [r3, #0]
800948e: 1a8a subs r2, r1, r2
8009490: b292 uxth r2, r2
8009492: 811a strh r2, [r3, #8]
pbuf_realloc(next->next->p, next->next->len);
8009494: 6bbb ldr r3, [r7, #56] ; 0x38
8009496: 681b ldr r3, [r3, #0]
8009498: 685a ldr r2, [r3, #4]
800949a: 6bbb ldr r3, [r7, #56] ; 0x38
800949c: 681b ldr r3, [r3, #0]
800949e: 891b ldrh r3, [r3, #8]
80094a0: 4619 mov r1, r3
80094a2: 4610 mov r0, r2
80094a4: f7fb fe66 bl 8005174 <pbuf_realloc>
tcplen = TCP_TCPLEN(next->next);
80094a8: 6bbb ldr r3, [r7, #56] ; 0x38
80094aa: 681b ldr r3, [r3, #0]
80094ac: 891c ldrh r4, [r3, #8]
80094ae: 6bbb ldr r3, [r7, #56] ; 0x38
80094b0: 681b ldr r3, [r3, #0]
80094b2: 68db ldr r3, [r3, #12]
80094b4: 899b ldrh r3, [r3, #12]
80094b6: b29b uxth r3, r3
80094b8: 4618 mov r0, r3
80094ba: f7fa fc77 bl 8003dac <lwip_htons>
80094be: 4603 mov r3, r0
80094c0: b2db uxtb r3, r3
80094c2: f003 0303 and.w r3, r3, #3
80094c6: 2b00 cmp r3, #0
80094c8: d001 beq.n 80094ce <tcp_receive+0xe6e>
80094ca: 2301 movs r3, #1
80094cc: e000 b.n 80094d0 <tcp_receive+0xe70>
80094ce: 2300 movs r3, #0
80094d0: 4423 add r3, r4
80094d2: b29a uxth r2, r3
80094d4: 4b2a ldr r3, [pc, #168] ; (8009580 <tcp_receive+0xf20>)
80094d6: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
80094d8: 4b29 ldr r3, [pc, #164] ; (8009580 <tcp_receive+0xf20>)
80094da: 881b ldrh r3, [r3, #0]
80094dc: 461a mov r2, r3
80094de: 4b26 ldr r3, [pc, #152] ; (8009578 <tcp_receive+0xf18>)
80094e0: 681b ldr r3, [r3, #0]
80094e2: 441a add r2, r3
80094e4: 687b ldr r3, [r7, #4]
80094e6: 6a5b ldr r3, [r3, #36] ; 0x24
80094e8: 6879 ldr r1, [r7, #4]
80094ea: 8d09 ldrh r1, [r1, #40] ; 0x28
80094ec: 440b add r3, r1
80094ee: 429a cmp r2, r3
80094f0: d019 beq.n 8009526 <tcp_receive+0xec6>
80094f2: 4b24 ldr r3, [pc, #144] ; (8009584 <tcp_receive+0xf24>)
80094f4: f44f 62df mov.w r2, #1784 ; 0x6f8
80094f8: 4923 ldr r1, [pc, #140] ; (8009588 <tcp_receive+0xf28>)
80094fa: 4824 ldr r0, [pc, #144] ; (800958c <tcp_receive+0xf2c>)
80094fc: f006 fcdc bl 800feb8 <printf>
(seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd));
}
}
break;
8009500: e011 b.n 8009526 <tcp_receive+0xec6>
for (next = pcb->ooseq; next != NULL; next = next->next) {
8009502: 6bbb ldr r3, [r7, #56] ; 0x38
8009504: 681b ldr r3, [r3, #0]
8009506: 63bb str r3, [r7, #56] ; 0x38
8009508: 6bbb ldr r3, [r7, #56] ; 0x38
800950a: 2b00 cmp r3, #0
800950c: f47f aea4 bne.w 8009258 <tcp_receive+0xbf8>
8009510: e00a b.n 8009528 <tcp_receive+0xec8>
break;
8009512: bf00 nop
8009514: e008 b.n 8009528 <tcp_receive+0xec8>
break;
8009516: bf00 nop
8009518: e006 b.n 8009528 <tcp_receive+0xec8>
break;
800951a: bf00 nop
800951c: e004 b.n 8009528 <tcp_receive+0xec8>
break;
800951e: bf00 nop
8009520: e002 b.n 8009528 <tcp_receive+0xec8>
break;
8009522: bf00 nop
8009524: e000 b.n 8009528 <tcp_receive+0xec8>
break;
8009526: bf00 nop
#endif /* TCP_OOSEQ_BYTES_LIMIT || TCP_OOSEQ_PBUFS_LIMIT */
#endif /* TCP_QUEUE_OOSEQ */
/* We send the ACK packet after we've (potentially) dealt with SACKs,
so they can be included in the acknowledgment. */
tcp_send_empty_ack(pcb);
8009528: 6878 ldr r0, [r7, #4]
800952a: f001 fa33 bl 800a994 <tcp_send_empty_ack>
if (pcb->rcv_nxt == seqno) {
800952e: e003 b.n 8009538 <tcp_receive+0xed8>
}
} else {
/* The incoming segment is not within the window. */
tcp_send_empty_ack(pcb);
8009530: 6878 ldr r0, [r7, #4]
8009532: f001 fa2f bl 800a994 <tcp_send_empty_ack>
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
8009536: e01a b.n 800956e <tcp_receive+0xf0e>
8009538: e019 b.n 800956e <tcp_receive+0xf0e>
}
} else {
/* Segments with length 0 is taken care of here. Segments that
fall out of the window are ACKed. */
if (!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd - 1)) {
800953a: 4b0f ldr r3, [pc, #60] ; (8009578 <tcp_receive+0xf18>)
800953c: 681a ldr r2, [r3, #0]
800953e: 687b ldr r3, [r7, #4]
8009540: 6a5b ldr r3, [r3, #36] ; 0x24
8009542: 1ad3 subs r3, r2, r3
8009544: 2b00 cmp r3, #0
8009546: db0a blt.n 800955e <tcp_receive+0xefe>
8009548: 4b0b ldr r3, [pc, #44] ; (8009578 <tcp_receive+0xf18>)
800954a: 681a ldr r2, [r3, #0]
800954c: 687b ldr r3, [r7, #4]
800954e: 6a5b ldr r3, [r3, #36] ; 0x24
8009550: 6879 ldr r1, [r7, #4]
8009552: 8d09 ldrh r1, [r1, #40] ; 0x28
8009554: 440b add r3, r1
8009556: 1ad3 subs r3, r2, r3
8009558: 3301 adds r3, #1
800955a: 2b00 cmp r3, #0
800955c: dd07 ble.n 800956e <tcp_receive+0xf0e>
tcp_ack_now(pcb);
800955e: 687b ldr r3, [r7, #4]
8009560: 8b5b ldrh r3, [r3, #26]
8009562: f043 0302 orr.w r3, r3, #2
8009566: b29a uxth r2, r3
8009568: 687b ldr r3, [r7, #4]
800956a: 835a strh r2, [r3, #26]
}
}
}
800956c: e7ff b.n 800956e <tcp_receive+0xf0e>
800956e: bf00 nop
8009570: 3750 adds r7, #80 ; 0x50
8009572: 46bd mov sp, r7
8009574: bdb0 pop {r4, r5, r7, pc}
8009576: bf00 nop
8009578: 20008be4 .word 0x20008be4
800957c: 20008bc4 .word 0x20008bc4
8009580: 20008bee .word 0x20008bee
8009584: 08015c0c .word 0x08015c0c
8009588: 08015fb4 .word 0x08015fb4
800958c: 08015c58 .word 0x08015c58
08009590 <tcp_get_next_optbyte>:
static u8_t
tcp_get_next_optbyte(void)
{
8009590: b480 push {r7}
8009592: b083 sub sp, #12
8009594: af00 add r7, sp, #0
u16_t optidx = tcp_optidx++;
8009596: 4b15 ldr r3, [pc, #84] ; (80095ec <tcp_get_next_optbyte+0x5c>)
8009598: 881b ldrh r3, [r3, #0]
800959a: 1c5a adds r2, r3, #1
800959c: b291 uxth r1, r2
800959e: 4a13 ldr r2, [pc, #76] ; (80095ec <tcp_get_next_optbyte+0x5c>)
80095a0: 8011 strh r1, [r2, #0]
80095a2: 80fb strh r3, [r7, #6]
if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) {
80095a4: 4b12 ldr r3, [pc, #72] ; (80095f0 <tcp_get_next_optbyte+0x60>)
80095a6: 681b ldr r3, [r3, #0]
80095a8: 2b00 cmp r3, #0
80095aa: d004 beq.n 80095b6 <tcp_get_next_optbyte+0x26>
80095ac: 4b11 ldr r3, [pc, #68] ; (80095f4 <tcp_get_next_optbyte+0x64>)
80095ae: 881b ldrh r3, [r3, #0]
80095b0: 88fa ldrh r2, [r7, #6]
80095b2: 429a cmp r2, r3
80095b4: d208 bcs.n 80095c8 <tcp_get_next_optbyte+0x38>
u8_t *opts = (u8_t *)tcphdr + TCP_HLEN;
80095b6: 4b10 ldr r3, [pc, #64] ; (80095f8 <tcp_get_next_optbyte+0x68>)
80095b8: 681b ldr r3, [r3, #0]
80095ba: 3314 adds r3, #20
80095bc: 603b str r3, [r7, #0]
return opts[optidx];
80095be: 88fb ldrh r3, [r7, #6]
80095c0: 683a ldr r2, [r7, #0]
80095c2: 4413 add r3, r2
80095c4: 781b ldrb r3, [r3, #0]
80095c6: e00b b.n 80095e0 <tcp_get_next_optbyte+0x50>
} else {
u8_t idx = (u8_t)(optidx - tcphdr_opt1len);
80095c8: 88fb ldrh r3, [r7, #6]
80095ca: b2da uxtb r2, r3
80095cc: 4b09 ldr r3, [pc, #36] ; (80095f4 <tcp_get_next_optbyte+0x64>)
80095ce: 881b ldrh r3, [r3, #0]
80095d0: b2db uxtb r3, r3
80095d2: 1ad3 subs r3, r2, r3
80095d4: 717b strb r3, [r7, #5]
return tcphdr_opt2[idx];
80095d6: 4b06 ldr r3, [pc, #24] ; (80095f0 <tcp_get_next_optbyte+0x60>)
80095d8: 681a ldr r2, [r3, #0]
80095da: 797b ldrb r3, [r7, #5]
80095dc: 4413 add r3, r2
80095de: 781b ldrb r3, [r3, #0]
}
}
80095e0: 4618 mov r0, r3
80095e2: 370c adds r7, #12
80095e4: 46bd mov sp, r7
80095e6: f85d 7b04 ldr.w r7, [sp], #4
80095ea: 4770 bx lr
80095ec: 20008be0 .word 0x20008be0
80095f0: 20008bdc .word 0x20008bdc
80095f4: 20008bda .word 0x20008bda
80095f8: 20008bd4 .word 0x20008bd4
080095fc <tcp_parseopt>:
*
* @param pcb the tcp_pcb for which a segment arrived
*/
static void
tcp_parseopt(struct tcp_pcb *pcb)
{
80095fc: b580 push {r7, lr}
80095fe: b084 sub sp, #16
8009600: af00 add r7, sp, #0
8009602: 6078 str r0, [r7, #4]
u16_t mss;
#if LWIP_TCP_TIMESTAMPS
u32_t tsval;
#endif
LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL);
8009604: 687b ldr r3, [r7, #4]
8009606: 2b00 cmp r3, #0
8009608: d106 bne.n 8009618 <tcp_parseopt+0x1c>
800960a: 4b32 ldr r3, [pc, #200] ; (80096d4 <tcp_parseopt+0xd8>)
800960c: f240 727d movw r2, #1917 ; 0x77d
8009610: 4931 ldr r1, [pc, #196] ; (80096d8 <tcp_parseopt+0xdc>)
8009612: 4832 ldr r0, [pc, #200] ; (80096dc <tcp_parseopt+0xe0>)
8009614: f006 fc50 bl 800feb8 <printf>
/* Parse the TCP MSS option, if present. */
if (tcphdr_optlen != 0) {
8009618: 4b31 ldr r3, [pc, #196] ; (80096e0 <tcp_parseopt+0xe4>)
800961a: 881b ldrh r3, [r3, #0]
800961c: 2b00 cmp r3, #0
800961e: d055 beq.n 80096cc <tcp_parseopt+0xd0>
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
8009620: 4b30 ldr r3, [pc, #192] ; (80096e4 <tcp_parseopt+0xe8>)
8009622: 2200 movs r2, #0
8009624: 801a strh r2, [r3, #0]
8009626: e045 b.n 80096b4 <tcp_parseopt+0xb8>
u8_t opt = tcp_get_next_optbyte();
8009628: f7ff ffb2 bl 8009590 <tcp_get_next_optbyte>
800962c: 4603 mov r3, r0
800962e: 73fb strb r3, [r7, #15]
switch (opt) {
8009630: 7bfb ldrb r3, [r7, #15]
8009632: 2b02 cmp r3, #2
8009634: d006 beq.n 8009644 <tcp_parseopt+0x48>
8009636: 2b02 cmp r3, #2
8009638: dc2b bgt.n 8009692 <tcp_parseopt+0x96>
800963a: 2b00 cmp r3, #0
800963c: d041 beq.n 80096c2 <tcp_parseopt+0xc6>
800963e: 2b01 cmp r3, #1
8009640: d127 bne.n 8009692 <tcp_parseopt+0x96>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n"));
return;
case LWIP_TCP_OPT_NOP:
/* NOP option. */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n"));
break;
8009642: e037 b.n 80096b4 <tcp_parseopt+0xb8>
case LWIP_TCP_OPT_MSS:
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n"));
if (tcp_get_next_optbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) {
8009644: f7ff ffa4 bl 8009590 <tcp_get_next_optbyte>
8009648: 4603 mov r3, r0
800964a: 2b04 cmp r3, #4
800964c: d13b bne.n 80096c6 <tcp_parseopt+0xca>
800964e: 4b25 ldr r3, [pc, #148] ; (80096e4 <tcp_parseopt+0xe8>)
8009650: 881b ldrh r3, [r3, #0]
8009652: 3301 adds r3, #1
8009654: 4a22 ldr r2, [pc, #136] ; (80096e0 <tcp_parseopt+0xe4>)
8009656: 8812 ldrh r2, [r2, #0]
8009658: 4293 cmp r3, r2
800965a: da34 bge.n 80096c6 <tcp_parseopt+0xca>
/* Bad length */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n"));
return;
}
/* An MSS option with the right option length. */
mss = (u16_t)(tcp_get_next_optbyte() << 8);
800965c: f7ff ff98 bl 8009590 <tcp_get_next_optbyte>
8009660: 4603 mov r3, r0
8009662: b29b uxth r3, r3
8009664: 021b lsls r3, r3, #8
8009666: 81bb strh r3, [r7, #12]
mss |= tcp_get_next_optbyte();
8009668: f7ff ff92 bl 8009590 <tcp_get_next_optbyte>
800966c: 4603 mov r3, r0
800966e: b29a uxth r2, r3
8009670: 89bb ldrh r3, [r7, #12]
8009672: 4313 orrs r3, r2
8009674: 81bb strh r3, [r7, #12]
/* Limit the mss to the configured TCP_MSS and prevent division by zero */
pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss;
8009676: 89bb ldrh r3, [r7, #12]
8009678: f5b3 7f06 cmp.w r3, #536 ; 0x218
800967c: d804 bhi.n 8009688 <tcp_parseopt+0x8c>
800967e: 89bb ldrh r3, [r7, #12]
8009680: 2b00 cmp r3, #0
8009682: d001 beq.n 8009688 <tcp_parseopt+0x8c>
8009684: 89ba ldrh r2, [r7, #12]
8009686: e001 b.n 800968c <tcp_parseopt+0x90>
8009688: f44f 7206 mov.w r2, #536 ; 0x218
800968c: 687b ldr r3, [r7, #4]
800968e: 865a strh r2, [r3, #50] ; 0x32
break;
8009690: e010 b.n 80096b4 <tcp_parseopt+0xb8>
}
break;
#endif /* LWIP_TCP_SACK_OUT */
default:
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n"));
data = tcp_get_next_optbyte();
8009692: f7ff ff7d bl 8009590 <tcp_get_next_optbyte>
8009696: 4603 mov r3, r0
8009698: 72fb strb r3, [r7, #11]
if (data < 2) {
800969a: 7afb ldrb r3, [r7, #11]
800969c: 2b01 cmp r3, #1
800969e: d914 bls.n 80096ca <tcp_parseopt+0xce>
and we don't process them further. */
return;
}
/* All other options have a length field, so that we easily
can skip past them. */
tcp_optidx += data - 2;
80096a0: 7afb ldrb r3, [r7, #11]
80096a2: b29a uxth r2, r3
80096a4: 4b0f ldr r3, [pc, #60] ; (80096e4 <tcp_parseopt+0xe8>)
80096a6: 881b ldrh r3, [r3, #0]
80096a8: 4413 add r3, r2
80096aa: b29b uxth r3, r3
80096ac: 3b02 subs r3, #2
80096ae: b29a uxth r2, r3
80096b0: 4b0c ldr r3, [pc, #48] ; (80096e4 <tcp_parseopt+0xe8>)
80096b2: 801a strh r2, [r3, #0]
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
80096b4: 4b0b ldr r3, [pc, #44] ; (80096e4 <tcp_parseopt+0xe8>)
80096b6: 881a ldrh r2, [r3, #0]
80096b8: 4b09 ldr r3, [pc, #36] ; (80096e0 <tcp_parseopt+0xe4>)
80096ba: 881b ldrh r3, [r3, #0]
80096bc: 429a cmp r2, r3
80096be: d3b3 bcc.n 8009628 <tcp_parseopt+0x2c>
80096c0: e004 b.n 80096cc <tcp_parseopt+0xd0>
return;
80096c2: bf00 nop
80096c4: e002 b.n 80096cc <tcp_parseopt+0xd0>
return;
80096c6: bf00 nop
80096c8: e000 b.n 80096cc <tcp_parseopt+0xd0>
return;
80096ca: bf00 nop
}
}
}
}
80096cc: 3710 adds r7, #16
80096ce: 46bd mov sp, r7
80096d0: bd80 pop {r7, pc}
80096d2: bf00 nop
80096d4: 08015c0c .word 0x08015c0c
80096d8: 08016070 .word 0x08016070
80096dc: 08015c58 .word 0x08015c58
80096e0: 20008bd8 .word 0x20008bd8
80096e4: 20008be0 .word 0x20008be0
080096e8 <tcp_trigger_input_pcb_close>:
void
tcp_trigger_input_pcb_close(void)
{
80096e8: b480 push {r7}
80096ea: af00 add r7, sp, #0
recv_flags |= TF_CLOSED;
80096ec: 4b05 ldr r3, [pc, #20] ; (8009704 <tcp_trigger_input_pcb_close+0x1c>)
80096ee: 781b ldrb r3, [r3, #0]
80096f0: f043 0310 orr.w r3, r3, #16
80096f4: b2da uxtb r2, r3
80096f6: 4b03 ldr r3, [pc, #12] ; (8009704 <tcp_trigger_input_pcb_close+0x1c>)
80096f8: 701a strb r2, [r3, #0]
}
80096fa: bf00 nop
80096fc: 46bd mov sp, r7
80096fe: f85d 7b04 ldr.w r7, [sp], #4
8009702: 4770 bx lr
8009704: 20008bf1 .word 0x20008bf1
08009708 <tcp_route>:
static err_t tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif);
/* tcp_route: common code that returns a fixed bound netif or calls ip_route */
static struct netif *
tcp_route(const struct tcp_pcb *pcb, const ip_addr_t *src, const ip_addr_t *dst)
{
8009708: b580 push {r7, lr}
800970a: b084 sub sp, #16
800970c: af00 add r7, sp, #0
800970e: 60f8 str r0, [r7, #12]
8009710: 60b9 str r1, [r7, #8]
8009712: 607a str r2, [r7, #4]
LWIP_UNUSED_ARG(src); /* in case IPv4-only and source-based routing is disabled */
if ((pcb != NULL) && (pcb->netif_idx != NETIF_NO_INDEX)) {
8009714: 68fb ldr r3, [r7, #12]
8009716: 2b00 cmp r3, #0
8009718: d00a beq.n 8009730 <tcp_route+0x28>
800971a: 68fb ldr r3, [r7, #12]
800971c: 7a1b ldrb r3, [r3, #8]
800971e: 2b00 cmp r3, #0
8009720: d006 beq.n 8009730 <tcp_route+0x28>
return netif_get_by_index(pcb->netif_idx);
8009722: 68fb ldr r3, [r7, #12]
8009724: 7a1b ldrb r3, [r3, #8]
8009726: 4618 mov r0, r3
8009728: f7fb fb4a bl 8004dc0 <netif_get_by_index>
800972c: 4603 mov r3, r0
800972e: e003 b.n 8009738 <tcp_route+0x30>
} else {
return ip_route(src, dst);
8009730: 6878 ldr r0, [r7, #4]
8009732: f005 f815 bl 800e760 <ip4_route>
8009736: 4603 mov r3, r0
}
}
8009738: 4618 mov r0, r3
800973a: 3710 adds r7, #16
800973c: 46bd mov sp, r7
800973e: bd80 pop {r7, pc}
08009740 <tcp_create_segment>:
* The TCP header is filled in except ackno and wnd.
* p is freed on failure.
*/
static struct tcp_seg *
tcp_create_segment(const struct tcp_pcb *pcb, struct pbuf *p, u8_t hdrflags, u32_t seqno, u8_t optflags)
{
8009740: b590 push {r4, r7, lr}
8009742: b087 sub sp, #28
8009744: af00 add r7, sp, #0
8009746: 60f8 str r0, [r7, #12]
8009748: 60b9 str r1, [r7, #8]
800974a: 603b str r3, [r7, #0]
800974c: 4613 mov r3, r2
800974e: 71fb strb r3, [r7, #7]
struct tcp_seg *seg;
u8_t optlen;
LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL);
8009750: 68fb ldr r3, [r7, #12]
8009752: 2b00 cmp r3, #0
8009754: d105 bne.n 8009762 <tcp_create_segment+0x22>
8009756: 4b44 ldr r3, [pc, #272] ; (8009868 <tcp_create_segment+0x128>)
8009758: 22a3 movs r2, #163 ; 0xa3
800975a: 4944 ldr r1, [pc, #272] ; (800986c <tcp_create_segment+0x12c>)
800975c: 4844 ldr r0, [pc, #272] ; (8009870 <tcp_create_segment+0x130>)
800975e: f006 fbab bl 800feb8 <printf>
LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL);
8009762: 68bb ldr r3, [r7, #8]
8009764: 2b00 cmp r3, #0
8009766: d105 bne.n 8009774 <tcp_create_segment+0x34>
8009768: 4b3f ldr r3, [pc, #252] ; (8009868 <tcp_create_segment+0x128>)
800976a: 22a4 movs r2, #164 ; 0xa4
800976c: 4941 ldr r1, [pc, #260] ; (8009874 <tcp_create_segment+0x134>)
800976e: 4840 ldr r0, [pc, #256] ; (8009870 <tcp_create_segment+0x130>)
8009770: f006 fba2 bl 800feb8 <printf>
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
8009774: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
8009778: 009b lsls r3, r3, #2
800977a: b2db uxtb r3, r3
800977c: f003 0304 and.w r3, r3, #4
8009780: 75fb strb r3, [r7, #23]
if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) {
8009782: 2003 movs r0, #3
8009784: f7fa ff8a bl 800469c <memp_malloc>
8009788: 6138 str r0, [r7, #16]
800978a: 693b ldr r3, [r7, #16]
800978c: 2b00 cmp r3, #0
800978e: d104 bne.n 800979a <tcp_create_segment+0x5a>
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n"));
pbuf_free(p);
8009790: 68b8 ldr r0, [r7, #8]
8009792: f7fb fe75 bl 8005480 <pbuf_free>
return NULL;
8009796: 2300 movs r3, #0
8009798: e061 b.n 800985e <tcp_create_segment+0x11e>
}
seg->flags = optflags;
800979a: 693b ldr r3, [r7, #16]
800979c: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
80097a0: 729a strb r2, [r3, #10]
seg->next = NULL;
80097a2: 693b ldr r3, [r7, #16]
80097a4: 2200 movs r2, #0
80097a6: 601a str r2, [r3, #0]
seg->p = p;
80097a8: 693b ldr r3, [r7, #16]
80097aa: 68ba ldr r2, [r7, #8]
80097ac: 605a str r2, [r3, #4]
LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
80097ae: 68bb ldr r3, [r7, #8]
80097b0: 891a ldrh r2, [r3, #8]
80097b2: 7dfb ldrb r3, [r7, #23]
80097b4: b29b uxth r3, r3
80097b6: 429a cmp r2, r3
80097b8: d205 bcs.n 80097c6 <tcp_create_segment+0x86>
80097ba: 4b2b ldr r3, [pc, #172] ; (8009868 <tcp_create_segment+0x128>)
80097bc: 22b0 movs r2, #176 ; 0xb0
80097be: 492e ldr r1, [pc, #184] ; (8009878 <tcp_create_segment+0x138>)
80097c0: 482b ldr r0, [pc, #172] ; (8009870 <tcp_create_segment+0x130>)
80097c2: f006 fb79 bl 800feb8 <printf>
seg->len = p->tot_len - optlen;
80097c6: 68bb ldr r3, [r7, #8]
80097c8: 891a ldrh r2, [r3, #8]
80097ca: 7dfb ldrb r3, [r7, #23]
80097cc: b29b uxth r3, r3
80097ce: 1ad3 subs r3, r2, r3
80097d0: b29a uxth r2, r3
80097d2: 693b ldr r3, [r7, #16]
80097d4: 811a strh r2, [r3, #8]
LWIP_ASSERT("invalid optflags passed: TF_SEG_DATA_CHECKSUMMED",
(optflags & TF_SEG_DATA_CHECKSUMMED) == 0);
#endif /* TCP_CHECKSUM_ON_COPY */
/* build TCP header */
if (pbuf_add_header(p, TCP_HLEN)) {
80097d6: 2114 movs r1, #20
80097d8: 68b8 ldr r0, [r7, #8]
80097da: f7fb fdbb bl 8005354 <pbuf_add_header>
80097de: 4603 mov r3, r0
80097e0: 2b00 cmp r3, #0
80097e2: d004 beq.n 80097ee <tcp_create_segment+0xae>
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no room for TCP header in pbuf.\n"));
TCP_STATS_INC(tcp.err);
tcp_seg_free(seg);
80097e4: 6938 ldr r0, [r7, #16]
80097e6: f7fd f8ce bl 8006986 <tcp_seg_free>
return NULL;
80097ea: 2300 movs r3, #0
80097ec: e037 b.n 800985e <tcp_create_segment+0x11e>
}
seg->tcphdr = (struct tcp_hdr *)seg->p->payload;
80097ee: 693b ldr r3, [r7, #16]
80097f0: 685b ldr r3, [r3, #4]
80097f2: 685a ldr r2, [r3, #4]
80097f4: 693b ldr r3, [r7, #16]
80097f6: 60da str r2, [r3, #12]
seg->tcphdr->src = lwip_htons(pcb->local_port);
80097f8: 68fb ldr r3, [r7, #12]
80097fa: 8ada ldrh r2, [r3, #22]
80097fc: 693b ldr r3, [r7, #16]
80097fe: 68dc ldr r4, [r3, #12]
8009800: 4610 mov r0, r2
8009802: f7fa fad3 bl 8003dac <lwip_htons>
8009806: 4603 mov r3, r0
8009808: 8023 strh r3, [r4, #0]
seg->tcphdr->dest = lwip_htons(pcb->remote_port);
800980a: 68fb ldr r3, [r7, #12]
800980c: 8b1a ldrh r2, [r3, #24]
800980e: 693b ldr r3, [r7, #16]
8009810: 68dc ldr r4, [r3, #12]
8009812: 4610 mov r0, r2
8009814: f7fa faca bl 8003dac <lwip_htons>
8009818: 4603 mov r3, r0
800981a: 8063 strh r3, [r4, #2]
seg->tcphdr->seqno = lwip_htonl(seqno);
800981c: 693b ldr r3, [r7, #16]
800981e: 68dc ldr r4, [r3, #12]
8009820: 6838 ldr r0, [r7, #0]
8009822: f7fa fad8 bl 8003dd6 <lwip_htonl>
8009826: 4603 mov r3, r0
8009828: 6063 str r3, [r4, #4]
/* ackno is set in tcp_output */
TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags);
800982a: 7dfb ldrb r3, [r7, #23]
800982c: 089b lsrs r3, r3, #2
800982e: b2db uxtb r3, r3
8009830: b29b uxth r3, r3
8009832: 3305 adds r3, #5
8009834: b29b uxth r3, r3
8009836: 031b lsls r3, r3, #12
8009838: b29a uxth r2, r3
800983a: 79fb ldrb r3, [r7, #7]
800983c: b29b uxth r3, r3
800983e: 4313 orrs r3, r2
8009840: b29a uxth r2, r3
8009842: 693b ldr r3, [r7, #16]
8009844: 68dc ldr r4, [r3, #12]
8009846: 4610 mov r0, r2
8009848: f7fa fab0 bl 8003dac <lwip_htons>
800984c: 4603 mov r3, r0
800984e: 81a3 strh r3, [r4, #12]
/* wnd and chksum are set in tcp_output */
seg->tcphdr->urgp = 0;
8009850: 693b ldr r3, [r7, #16]
8009852: 68db ldr r3, [r3, #12]
8009854: 2200 movs r2, #0
8009856: 749a strb r2, [r3, #18]
8009858: 2200 movs r2, #0
800985a: 74da strb r2, [r3, #19]
return seg;
800985c: 693b ldr r3, [r7, #16]
}
800985e: 4618 mov r0, r3
8009860: 371c adds r7, #28
8009862: 46bd mov sp, r7
8009864: bd90 pop {r4, r7, pc}
8009866: bf00 nop
8009868: 0801608c .word 0x0801608c
800986c: 080160c0 .word 0x080160c0
8009870: 080160e0 .word 0x080160e0
8009874: 08016108 .word 0x08016108
8009878: 0801612c .word 0x0801612c
0800987c <tcp_split_unsent_seg>:
* @param pcb the tcp_pcb for which to split the unsent head
* @param split the amount of payload to remain in the head
*/
err_t
tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split)
{
800987c: b590 push {r4, r7, lr}
800987e: b08b sub sp, #44 ; 0x2c
8009880: af02 add r7, sp, #8
8009882: 6078 str r0, [r7, #4]
8009884: 460b mov r3, r1
8009886: 807b strh r3, [r7, #2]
struct tcp_seg *seg = NULL, *useg = NULL;
8009888: 2300 movs r3, #0
800988a: 61fb str r3, [r7, #28]
800988c: 2300 movs r3, #0
800988e: 617b str r3, [r7, #20]
struct pbuf *p = NULL;
8009890: 2300 movs r3, #0
8009892: 613b str r3, [r7, #16]
u16_t chksum = 0;
u8_t chksum_swapped = 0;
struct pbuf *q;
#endif /* TCP_CHECKSUM_ON_COPY */
LWIP_ASSERT("tcp_split_unsent_seg: invalid pcb", pcb != NULL);
8009894: 687b ldr r3, [r7, #4]
8009896: 2b00 cmp r3, #0
8009898: d106 bne.n 80098a8 <tcp_split_unsent_seg+0x2c>
800989a: 4b95 ldr r3, [pc, #596] ; (8009af0 <tcp_split_unsent_seg+0x274>)
800989c: f240 324b movw r2, #843 ; 0x34b
80098a0: 4994 ldr r1, [pc, #592] ; (8009af4 <tcp_split_unsent_seg+0x278>)
80098a2: 4895 ldr r0, [pc, #596] ; (8009af8 <tcp_split_unsent_seg+0x27c>)
80098a4: f006 fb08 bl 800feb8 <printf>
useg = pcb->unsent;
80098a8: 687b ldr r3, [r7, #4]
80098aa: 6edb ldr r3, [r3, #108] ; 0x6c
80098ac: 617b str r3, [r7, #20]
if (useg == NULL) {
80098ae: 697b ldr r3, [r7, #20]
80098b0: 2b00 cmp r3, #0
80098b2: d102 bne.n 80098ba <tcp_split_unsent_seg+0x3e>
return ERR_MEM;
80098b4: f04f 33ff mov.w r3, #4294967295
80098b8: e116 b.n 8009ae8 <tcp_split_unsent_seg+0x26c>
}
if (split == 0) {
80098ba: 887b ldrh r3, [r7, #2]
80098bc: 2b00 cmp r3, #0
80098be: d109 bne.n 80098d4 <tcp_split_unsent_seg+0x58>
LWIP_ASSERT("Can't split segment into length 0", 0);
80098c0: 4b8b ldr r3, [pc, #556] ; (8009af0 <tcp_split_unsent_seg+0x274>)
80098c2: f240 3253 movw r2, #851 ; 0x353
80098c6: 498d ldr r1, [pc, #564] ; (8009afc <tcp_split_unsent_seg+0x280>)
80098c8: 488b ldr r0, [pc, #556] ; (8009af8 <tcp_split_unsent_seg+0x27c>)
80098ca: f006 faf5 bl 800feb8 <printf>
return ERR_VAL;
80098ce: f06f 0305 mvn.w r3, #5
80098d2: e109 b.n 8009ae8 <tcp_split_unsent_seg+0x26c>
}
if (useg->len <= split) {
80098d4: 697b ldr r3, [r7, #20]
80098d6: 891b ldrh r3, [r3, #8]
80098d8: 887a ldrh r2, [r7, #2]
80098da: 429a cmp r2, r3
80098dc: d301 bcc.n 80098e2 <tcp_split_unsent_seg+0x66>
return ERR_OK;
80098de: 2300 movs r3, #0
80098e0: e102 b.n 8009ae8 <tcp_split_unsent_seg+0x26c>
}
LWIP_ASSERT("split <= mss", split <= pcb->mss);
80098e2: 687b ldr r3, [r7, #4]
80098e4: 8e5b ldrh r3, [r3, #50] ; 0x32
80098e6: 887a ldrh r2, [r7, #2]
80098e8: 429a cmp r2, r3
80098ea: d906 bls.n 80098fa <tcp_split_unsent_seg+0x7e>
80098ec: 4b80 ldr r3, [pc, #512] ; (8009af0 <tcp_split_unsent_seg+0x274>)
80098ee: f240 325b movw r2, #859 ; 0x35b
80098f2: 4983 ldr r1, [pc, #524] ; (8009b00 <tcp_split_unsent_seg+0x284>)
80098f4: 4880 ldr r0, [pc, #512] ; (8009af8 <tcp_split_unsent_seg+0x27c>)
80098f6: f006 fadf bl 800feb8 <printf>
LWIP_ASSERT("useg->len > 0", useg->len > 0);
80098fa: 697b ldr r3, [r7, #20]
80098fc: 891b ldrh r3, [r3, #8]
80098fe: 2b00 cmp r3, #0
8009900: d106 bne.n 8009910 <tcp_split_unsent_seg+0x94>
8009902: 4b7b ldr r3, [pc, #492] ; (8009af0 <tcp_split_unsent_seg+0x274>)
8009904: f44f 7257 mov.w r2, #860 ; 0x35c
8009908: 497e ldr r1, [pc, #504] ; (8009b04 <tcp_split_unsent_seg+0x288>)
800990a: 487b ldr r0, [pc, #492] ; (8009af8 <tcp_split_unsent_seg+0x27c>)
800990c: f006 fad4 bl 800feb8 <printf>
* to split this packet so we may actually exceed the max value by
* one!
*/
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue: split_unsent_seg: %u\n", (unsigned int)pcb->snd_queuelen));
optflags = useg->flags;
8009910: 697b ldr r3, [r7, #20]
8009912: 7a9b ldrb r3, [r3, #10]
8009914: 73fb strb r3, [r7, #15]
#if TCP_CHECKSUM_ON_COPY
/* Remove since checksum is not stored until after tcp_create_segment() */
optflags &= ~TF_SEG_DATA_CHECKSUMMED;
#endif /* TCP_CHECKSUM_ON_COPY */
optlen = LWIP_TCP_OPT_LENGTH(optflags);
8009916: 7bfb ldrb r3, [r7, #15]
8009918: 009b lsls r3, r3, #2
800991a: b2db uxtb r3, r3
800991c: f003 0304 and.w r3, r3, #4
8009920: 73bb strb r3, [r7, #14]
remainder = useg->len - split;
8009922: 697b ldr r3, [r7, #20]
8009924: 891a ldrh r2, [r3, #8]
8009926: 887b ldrh r3, [r7, #2]
8009928: 1ad3 subs r3, r2, r3
800992a: 81bb strh r3, [r7, #12]
/* Create new pbuf for the remainder of the split */
p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM);
800992c: 7bbb ldrb r3, [r7, #14]
800992e: b29a uxth r2, r3
8009930: 89bb ldrh r3, [r7, #12]
8009932: 4413 add r3, r2
8009934: b29b uxth r3, r3
8009936: f44f 7220 mov.w r2, #640 ; 0x280
800993a: 4619 mov r1, r3
800993c: 2036 movs r0, #54 ; 0x36
800993e: f7fb fabb bl 8004eb8 <pbuf_alloc>
8009942: 6138 str r0, [r7, #16]
if (p == NULL) {
8009944: 693b ldr r3, [r7, #16]
8009946: 2b00 cmp r3, #0
8009948: f000 80b7 beq.w 8009aba <tcp_split_unsent_seg+0x23e>
("tcp_split_unsent_seg: could not allocate memory for pbuf remainder %u\n", remainder));
goto memerr;
}
/* Offset into the original pbuf is past TCP/IP headers, options, and split amount */
offset = useg->p->tot_len - useg->len + split;
800994c: 697b ldr r3, [r7, #20]
800994e: 685b ldr r3, [r3, #4]
8009950: 891a ldrh r2, [r3, #8]
8009952: 697b ldr r3, [r7, #20]
8009954: 891b ldrh r3, [r3, #8]
8009956: 1ad3 subs r3, r2, r3
8009958: b29a uxth r2, r3
800995a: 887b ldrh r3, [r7, #2]
800995c: 4413 add r3, r2
800995e: 817b strh r3, [r7, #10]
/* Copy remainder into new pbuf, headers and options will not be filled out */
if (pbuf_copy_partial(useg->p, (u8_t *)p->payload + optlen, remainder, offset ) != remainder) {
8009960: 697b ldr r3, [r7, #20]
8009962: 6858 ldr r0, [r3, #4]
8009964: 693b ldr r3, [r7, #16]
8009966: 685a ldr r2, [r3, #4]
8009968: 7bbb ldrb r3, [r7, #14]
800996a: 18d1 adds r1, r2, r3
800996c: 897b ldrh r3, [r7, #10]
800996e: 89ba ldrh r2, [r7, #12]
8009970: f7fb ff80 bl 8005874 <pbuf_copy_partial>
8009974: 4603 mov r3, r0
8009976: 461a mov r2, r3
8009978: 89bb ldrh r3, [r7, #12]
800997a: 4293 cmp r3, r2
800997c: f040 809f bne.w 8009abe <tcp_split_unsent_seg+0x242>
#endif /* TCP_CHECKSUM_ON_COPY */
/* Options are created when calling tcp_output() */
/* Migrate flags from original segment */
split_flags = TCPH_FLAGS(useg->tcphdr);
8009980: 697b ldr r3, [r7, #20]
8009982: 68db ldr r3, [r3, #12]
8009984: 899b ldrh r3, [r3, #12]
8009986: b29b uxth r3, r3
8009988: 4618 mov r0, r3
800998a: f7fa fa0f bl 8003dac <lwip_htons>
800998e: 4603 mov r3, r0
8009990: b2db uxtb r3, r3
8009992: f003 033f and.w r3, r3, #63 ; 0x3f
8009996: 76fb strb r3, [r7, #27]
remainder_flags = 0; /* ACK added in tcp_output() */
8009998: 2300 movs r3, #0
800999a: 76bb strb r3, [r7, #26]
if (split_flags & TCP_PSH) {
800999c: 7efb ldrb r3, [r7, #27]
800999e: f003 0308 and.w r3, r3, #8
80099a2: 2b00 cmp r3, #0
80099a4: d007 beq.n 80099b6 <tcp_split_unsent_seg+0x13a>
split_flags &= ~TCP_PSH;
80099a6: 7efb ldrb r3, [r7, #27]
80099a8: f023 0308 bic.w r3, r3, #8
80099ac: 76fb strb r3, [r7, #27]
remainder_flags |= TCP_PSH;
80099ae: 7ebb ldrb r3, [r7, #26]
80099b0: f043 0308 orr.w r3, r3, #8
80099b4: 76bb strb r3, [r7, #26]
}
if (split_flags & TCP_FIN) {
80099b6: 7efb ldrb r3, [r7, #27]
80099b8: f003 0301 and.w r3, r3, #1
80099bc: 2b00 cmp r3, #0
80099be: d007 beq.n 80099d0 <tcp_split_unsent_seg+0x154>
split_flags &= ~TCP_FIN;
80099c0: 7efb ldrb r3, [r7, #27]
80099c2: f023 0301 bic.w r3, r3, #1
80099c6: 76fb strb r3, [r7, #27]
remainder_flags |= TCP_FIN;
80099c8: 7ebb ldrb r3, [r7, #26]
80099ca: f043 0301 orr.w r3, r3, #1
80099ce: 76bb strb r3, [r7, #26]
}
/* SYN should be left on split, RST should not be present with data */
seg = tcp_create_segment(pcb, p, remainder_flags, lwip_ntohl(useg->tcphdr->seqno) + split, optflags);
80099d0: 697b ldr r3, [r7, #20]
80099d2: 68db ldr r3, [r3, #12]
80099d4: 685b ldr r3, [r3, #4]
80099d6: 4618 mov r0, r3
80099d8: f7fa f9fd bl 8003dd6 <lwip_htonl>
80099dc: 4602 mov r2, r0
80099de: 887b ldrh r3, [r7, #2]
80099e0: 18d1 adds r1, r2, r3
80099e2: 7eba ldrb r2, [r7, #26]
80099e4: 7bfb ldrb r3, [r7, #15]
80099e6: 9300 str r3, [sp, #0]
80099e8: 460b mov r3, r1
80099ea: 6939 ldr r1, [r7, #16]
80099ec: 6878 ldr r0, [r7, #4]
80099ee: f7ff fea7 bl 8009740 <tcp_create_segment>
80099f2: 61f8 str r0, [r7, #28]
if (seg == NULL) {
80099f4: 69fb ldr r3, [r7, #28]
80099f6: 2b00 cmp r3, #0
80099f8: d063 beq.n 8009ac2 <tcp_split_unsent_seg+0x246>
seg->chksum_swapped = chksum_swapped;
seg->flags |= TF_SEG_DATA_CHECKSUMMED;
#endif /* TCP_CHECKSUM_ON_COPY */
/* Remove this segment from the queue since trimming it may free pbufs */
pcb->snd_queuelen -= pbuf_clen(useg->p);
80099fa: 697b ldr r3, [r7, #20]
80099fc: 685b ldr r3, [r3, #4]
80099fe: 4618 mov r0, r3
8009a00: f7fb fdc6 bl 8005590 <pbuf_clen>
8009a04: 4603 mov r3, r0
8009a06: 461a mov r2, r3
8009a08: 687b ldr r3, [r7, #4]
8009a0a: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8009a0e: 1a9b subs r3, r3, r2
8009a10: b29a uxth r2, r3
8009a12: 687b ldr r3, [r7, #4]
8009a14: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
/* Trim the original pbuf into our split size. At this point our remainder segment must be setup
successfully because we are modifying the original segment */
pbuf_realloc(useg->p, useg->p->tot_len - remainder);
8009a18: 697b ldr r3, [r7, #20]
8009a1a: 6858 ldr r0, [r3, #4]
8009a1c: 697b ldr r3, [r7, #20]
8009a1e: 685b ldr r3, [r3, #4]
8009a20: 891a ldrh r2, [r3, #8]
8009a22: 89bb ldrh r3, [r7, #12]
8009a24: 1ad3 subs r3, r2, r3
8009a26: b29b uxth r3, r3
8009a28: 4619 mov r1, r3
8009a2a: f7fb fba3 bl 8005174 <pbuf_realloc>
useg->len -= remainder;
8009a2e: 697b ldr r3, [r7, #20]
8009a30: 891a ldrh r2, [r3, #8]
8009a32: 89bb ldrh r3, [r7, #12]
8009a34: 1ad3 subs r3, r2, r3
8009a36: b29a uxth r2, r3
8009a38: 697b ldr r3, [r7, #20]
8009a3a: 811a strh r2, [r3, #8]
TCPH_SET_FLAG(useg->tcphdr, split_flags);
8009a3c: 697b ldr r3, [r7, #20]
8009a3e: 68db ldr r3, [r3, #12]
8009a40: 899b ldrh r3, [r3, #12]
8009a42: b29c uxth r4, r3
8009a44: 7efb ldrb r3, [r7, #27]
8009a46: b29b uxth r3, r3
8009a48: 4618 mov r0, r3
8009a4a: f7fa f9af bl 8003dac <lwip_htons>
8009a4e: 4603 mov r3, r0
8009a50: 461a mov r2, r3
8009a52: 697b ldr r3, [r7, #20]
8009a54: 68db ldr r3, [r3, #12]
8009a56: 4322 orrs r2, r4
8009a58: b292 uxth r2, r2
8009a5a: 819a strh r2, [r3, #12]
/* By trimming, realloc may have actually shrunk the pbuf, so clear oversize_left */
useg->oversize_left = 0;
#endif /* TCP_OVERSIZE_DBGCHECK */
/* Add back to the queue with new trimmed pbuf */
pcb->snd_queuelen += pbuf_clen(useg->p);
8009a5c: 697b ldr r3, [r7, #20]
8009a5e: 685b ldr r3, [r3, #4]
8009a60: 4618 mov r0, r3
8009a62: f7fb fd95 bl 8005590 <pbuf_clen>
8009a66: 4603 mov r3, r0
8009a68: 461a mov r2, r3
8009a6a: 687b ldr r3, [r7, #4]
8009a6c: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8009a70: 4413 add r3, r2
8009a72: b29a uxth r2, r3
8009a74: 687b ldr r3, [r7, #4]
8009a76: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
#endif /* TCP_CHECKSUM_ON_COPY */
/* Update number of segments on the queues. Note that length now may
* exceed TCP_SND_QUEUELEN! We don't have to touch pcb->snd_buf
* because the total amount of data is constant when packet is split */
pcb->snd_queuelen += pbuf_clen(seg->p);
8009a7a: 69fb ldr r3, [r7, #28]
8009a7c: 685b ldr r3, [r3, #4]
8009a7e: 4618 mov r0, r3
8009a80: f7fb fd86 bl 8005590 <pbuf_clen>
8009a84: 4603 mov r3, r0
8009a86: 461a mov r2, r3
8009a88: 687b ldr r3, [r7, #4]
8009a8a: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8009a8e: 4413 add r3, r2
8009a90: b29a uxth r2, r3
8009a92: 687b ldr r3, [r7, #4]
8009a94: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
/* Finally insert remainder into queue after split (which stays head) */
seg->next = useg->next;
8009a98: 697b ldr r3, [r7, #20]
8009a9a: 681a ldr r2, [r3, #0]
8009a9c: 69fb ldr r3, [r7, #28]
8009a9e: 601a str r2, [r3, #0]
useg->next = seg;
8009aa0: 697b ldr r3, [r7, #20]
8009aa2: 69fa ldr r2, [r7, #28]
8009aa4: 601a str r2, [r3, #0]
#if TCP_OVERSIZE
/* If remainder is last segment on the unsent, ensure we clear the oversize amount
* because the remainder is always sized to the exact remaining amount */
if (seg->next == NULL) {
8009aa6: 69fb ldr r3, [r7, #28]
8009aa8: 681b ldr r3, [r3, #0]
8009aaa: 2b00 cmp r3, #0
8009aac: d103 bne.n 8009ab6 <tcp_split_unsent_seg+0x23a>
pcb->unsent_oversize = 0;
8009aae: 687b ldr r3, [r7, #4]
8009ab0: 2200 movs r2, #0
8009ab2: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
}
#endif /* TCP_OVERSIZE */
return ERR_OK;
8009ab6: 2300 movs r3, #0
8009ab8: e016 b.n 8009ae8 <tcp_split_unsent_seg+0x26c>
goto memerr;
8009aba: bf00 nop
8009abc: e002 b.n 8009ac4 <tcp_split_unsent_seg+0x248>
goto memerr;
8009abe: bf00 nop
8009ac0: e000 b.n 8009ac4 <tcp_split_unsent_seg+0x248>
goto memerr;
8009ac2: bf00 nop
memerr:
TCP_STATS_INC(tcp.memerr);
LWIP_ASSERT("seg == NULL", seg == NULL);
8009ac4: 69fb ldr r3, [r7, #28]
8009ac6: 2b00 cmp r3, #0
8009ac8: d006 beq.n 8009ad8 <tcp_split_unsent_seg+0x25c>
8009aca: 4b09 ldr r3, [pc, #36] ; (8009af0 <tcp_split_unsent_seg+0x274>)
8009acc: f44f 7276 mov.w r2, #984 ; 0x3d8
8009ad0: 490d ldr r1, [pc, #52] ; (8009b08 <tcp_split_unsent_seg+0x28c>)
8009ad2: 4809 ldr r0, [pc, #36] ; (8009af8 <tcp_split_unsent_seg+0x27c>)
8009ad4: f006 f9f0 bl 800feb8 <printf>
if (p != NULL) {
8009ad8: 693b ldr r3, [r7, #16]
8009ada: 2b00 cmp r3, #0
8009adc: d002 beq.n 8009ae4 <tcp_split_unsent_seg+0x268>
pbuf_free(p);
8009ade: 6938 ldr r0, [r7, #16]
8009ae0: f7fb fcce bl 8005480 <pbuf_free>
}
return ERR_MEM;
8009ae4: f04f 33ff mov.w r3, #4294967295
}
8009ae8: 4618 mov r0, r3
8009aea: 3724 adds r7, #36 ; 0x24
8009aec: 46bd mov sp, r7
8009aee: bd90 pop {r4, r7, pc}
8009af0: 0801608c .word 0x0801608c
8009af4: 08016420 .word 0x08016420
8009af8: 080160e0 .word 0x080160e0
8009afc: 08016444 .word 0x08016444
8009b00: 08016468 .word 0x08016468
8009b04: 08016478 .word 0x08016478
8009b08: 08016488 .word 0x08016488
08009b0c <tcp_send_fin>:
* @param pcb the tcp_pcb over which to send a segment
* @return ERR_OK if sent, another err_t otherwise
*/
err_t
tcp_send_fin(struct tcp_pcb *pcb)
{
8009b0c: b590 push {r4, r7, lr}
8009b0e: b085 sub sp, #20
8009b10: af00 add r7, sp, #0
8009b12: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
8009b14: 687b ldr r3, [r7, #4]
8009b16: 2b00 cmp r3, #0
8009b18: d106 bne.n 8009b28 <tcp_send_fin+0x1c>
8009b1a: 4b21 ldr r3, [pc, #132] ; (8009ba0 <tcp_send_fin+0x94>)
8009b1c: f240 32eb movw r2, #1003 ; 0x3eb
8009b20: 4920 ldr r1, [pc, #128] ; (8009ba4 <tcp_send_fin+0x98>)
8009b22: 4821 ldr r0, [pc, #132] ; (8009ba8 <tcp_send_fin+0x9c>)
8009b24: f006 f9c8 bl 800feb8 <printf>
/* first, try to add the fin to the last unsent segment */
if (pcb->unsent != NULL) {
8009b28: 687b ldr r3, [r7, #4]
8009b2a: 6edb ldr r3, [r3, #108] ; 0x6c
8009b2c: 2b00 cmp r3, #0
8009b2e: d02e beq.n 8009b8e <tcp_send_fin+0x82>
struct tcp_seg *last_unsent;
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
8009b30: 687b ldr r3, [r7, #4]
8009b32: 6edb ldr r3, [r3, #108] ; 0x6c
8009b34: 60fb str r3, [r7, #12]
8009b36: e002 b.n 8009b3e <tcp_send_fin+0x32>
last_unsent = last_unsent->next);
8009b38: 68fb ldr r3, [r7, #12]
8009b3a: 681b ldr r3, [r3, #0]
8009b3c: 60fb str r3, [r7, #12]
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
8009b3e: 68fb ldr r3, [r7, #12]
8009b40: 681b ldr r3, [r3, #0]
8009b42: 2b00 cmp r3, #0
8009b44: d1f8 bne.n 8009b38 <tcp_send_fin+0x2c>
if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) {
8009b46: 68fb ldr r3, [r7, #12]
8009b48: 68db ldr r3, [r3, #12]
8009b4a: 899b ldrh r3, [r3, #12]
8009b4c: b29b uxth r3, r3
8009b4e: 4618 mov r0, r3
8009b50: f7fa f92c bl 8003dac <lwip_htons>
8009b54: 4603 mov r3, r0
8009b56: b2db uxtb r3, r3
8009b58: f003 0307 and.w r3, r3, #7
8009b5c: 2b00 cmp r3, #0
8009b5e: d116 bne.n 8009b8e <tcp_send_fin+0x82>
/* no SYN/FIN/RST flag in the header, we can add the FIN flag */
TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN);
8009b60: 68fb ldr r3, [r7, #12]
8009b62: 68db ldr r3, [r3, #12]
8009b64: 899b ldrh r3, [r3, #12]
8009b66: b29c uxth r4, r3
8009b68: 2001 movs r0, #1
8009b6a: f7fa f91f bl 8003dac <lwip_htons>
8009b6e: 4603 mov r3, r0
8009b70: 461a mov r2, r3
8009b72: 68fb ldr r3, [r7, #12]
8009b74: 68db ldr r3, [r3, #12]
8009b76: 4322 orrs r2, r4
8009b78: b292 uxth r2, r2
8009b7a: 819a strh r2, [r3, #12]
tcp_set_flags(pcb, TF_FIN);
8009b7c: 687b ldr r3, [r7, #4]
8009b7e: 8b5b ldrh r3, [r3, #26]
8009b80: f043 0320 orr.w r3, r3, #32
8009b84: b29a uxth r2, r3
8009b86: 687b ldr r3, [r7, #4]
8009b88: 835a strh r2, [r3, #26]
return ERR_OK;
8009b8a: 2300 movs r3, #0
8009b8c: e004 b.n 8009b98 <tcp_send_fin+0x8c>
}
}
/* no data, no length, flags, copy=1, no optdata */
return tcp_enqueue_flags(pcb, TCP_FIN);
8009b8e: 2101 movs r1, #1
8009b90: 6878 ldr r0, [r7, #4]
8009b92: f000 f80b bl 8009bac <tcp_enqueue_flags>
8009b96: 4603 mov r3, r0
}
8009b98: 4618 mov r0, r3
8009b9a: 3714 adds r7, #20
8009b9c: 46bd mov sp, r7
8009b9e: bd90 pop {r4, r7, pc}
8009ba0: 0801608c .word 0x0801608c
8009ba4: 08016494 .word 0x08016494
8009ba8: 080160e0 .word 0x080160e0
08009bac <tcp_enqueue_flags>:
* @param pcb Protocol control block for the TCP connection.
* @param flags TCP header flags to set in the outgoing segment.
*/
err_t
tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags)
{
8009bac: b580 push {r7, lr}
8009bae: b08a sub sp, #40 ; 0x28
8009bb0: af02 add r7, sp, #8
8009bb2: 6078 str r0, [r7, #4]
8009bb4: 460b mov r3, r1
8009bb6: 70fb strb r3, [r7, #3]
struct pbuf *p;
struct tcp_seg *seg;
u8_t optflags = 0;
8009bb8: 2300 movs r3, #0
8009bba: 77fb strb r3, [r7, #31]
u8_t optlen = 0;
8009bbc: 2300 movs r3, #0
8009bbe: 75fb strb r3, [r7, #23]
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: queuelen: %"U16_F"\n", (u16_t)pcb->snd_queuelen));
LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)",
8009bc0: 78fb ldrb r3, [r7, #3]
8009bc2: f003 0303 and.w r3, r3, #3
8009bc6: 2b00 cmp r3, #0
8009bc8: d106 bne.n 8009bd8 <tcp_enqueue_flags+0x2c>
8009bca: 4b67 ldr r3, [pc, #412] ; (8009d68 <tcp_enqueue_flags+0x1bc>)
8009bcc: f240 4211 movw r2, #1041 ; 0x411
8009bd0: 4966 ldr r1, [pc, #408] ; (8009d6c <tcp_enqueue_flags+0x1c0>)
8009bd2: 4867 ldr r0, [pc, #412] ; (8009d70 <tcp_enqueue_flags+0x1c4>)
8009bd4: f006 f970 bl 800feb8 <printf>
(flags & (TCP_SYN | TCP_FIN)) != 0);
LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL);
8009bd8: 687b ldr r3, [r7, #4]
8009bda: 2b00 cmp r3, #0
8009bdc: d106 bne.n 8009bec <tcp_enqueue_flags+0x40>
8009bde: 4b62 ldr r3, [pc, #392] ; (8009d68 <tcp_enqueue_flags+0x1bc>)
8009be0: f240 4213 movw r2, #1043 ; 0x413
8009be4: 4963 ldr r1, [pc, #396] ; (8009d74 <tcp_enqueue_flags+0x1c8>)
8009be6: 4862 ldr r0, [pc, #392] ; (8009d70 <tcp_enqueue_flags+0x1c4>)
8009be8: f006 f966 bl 800feb8 <printf>
/* No need to check pcb->snd_queuelen if only SYN or FIN are allowed! */
/* Get options for this segment. This is a special case since this is the
only place where a SYN can be sent. */
if (flags & TCP_SYN) {
8009bec: 78fb ldrb r3, [r7, #3]
8009bee: f003 0302 and.w r3, r3, #2
8009bf2: 2b00 cmp r3, #0
8009bf4: d001 beq.n 8009bfa <tcp_enqueue_flags+0x4e>
optflags = TF_SEG_OPTS_MSS;
8009bf6: 2301 movs r3, #1
8009bf8: 77fb strb r3, [r7, #31]
/* Make sure the timestamp option is only included in data segments if we
agreed about it with the remote host (and in active open SYN segments). */
optflags |= TF_SEG_OPTS_TS;
}
#endif /* LWIP_TCP_TIMESTAMPS */
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
8009bfa: 7ffb ldrb r3, [r7, #31]
8009bfc: 009b lsls r3, r3, #2
8009bfe: b2db uxtb r3, r3
8009c00: f003 0304 and.w r3, r3, #4
8009c04: 75fb strb r3, [r7, #23]
/* Allocate pbuf with room for TCP header + options */
if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) {
8009c06: 7dfb ldrb r3, [r7, #23]
8009c08: b29b uxth r3, r3
8009c0a: f44f 7220 mov.w r2, #640 ; 0x280
8009c0e: 4619 mov r1, r3
8009c10: 2036 movs r0, #54 ; 0x36
8009c12: f7fb f951 bl 8004eb8 <pbuf_alloc>
8009c16: 6138 str r0, [r7, #16]
8009c18: 693b ldr r3, [r7, #16]
8009c1a: 2b00 cmp r3, #0
8009c1c: d109 bne.n 8009c32 <tcp_enqueue_flags+0x86>
tcp_set_flags(pcb, TF_NAGLEMEMERR);
8009c1e: 687b ldr r3, [r7, #4]
8009c20: 8b5b ldrh r3, [r3, #26]
8009c22: f043 0380 orr.w r3, r3, #128 ; 0x80
8009c26: b29a uxth r2, r3
8009c28: 687b ldr r3, [r7, #4]
8009c2a: 835a strh r2, [r3, #26]
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
8009c2c: f04f 33ff mov.w r3, #4294967295
8009c30: e095 b.n 8009d5e <tcp_enqueue_flags+0x1b2>
}
LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
8009c32: 693b ldr r3, [r7, #16]
8009c34: 895a ldrh r2, [r3, #10]
8009c36: 7dfb ldrb r3, [r7, #23]
8009c38: b29b uxth r3, r3
8009c3a: 429a cmp r2, r3
8009c3c: d206 bcs.n 8009c4c <tcp_enqueue_flags+0xa0>
8009c3e: 4b4a ldr r3, [pc, #296] ; (8009d68 <tcp_enqueue_flags+0x1bc>)
8009c40: f240 4239 movw r2, #1081 ; 0x439
8009c44: 494c ldr r1, [pc, #304] ; (8009d78 <tcp_enqueue_flags+0x1cc>)
8009c46: 484a ldr r0, [pc, #296] ; (8009d70 <tcp_enqueue_flags+0x1c4>)
8009c48: f006 f936 bl 800feb8 <printf>
(p->len >= optlen));
/* Allocate memory for tcp_seg, and fill in fields. */
if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) {
8009c4c: 687b ldr r3, [r7, #4]
8009c4e: 6dd9 ldr r1, [r3, #92] ; 0x5c
8009c50: 78fa ldrb r2, [r7, #3]
8009c52: 7ffb ldrb r3, [r7, #31]
8009c54: 9300 str r3, [sp, #0]
8009c56: 460b mov r3, r1
8009c58: 6939 ldr r1, [r7, #16]
8009c5a: 6878 ldr r0, [r7, #4]
8009c5c: f7ff fd70 bl 8009740 <tcp_create_segment>
8009c60: 60f8 str r0, [r7, #12]
8009c62: 68fb ldr r3, [r7, #12]
8009c64: 2b00 cmp r3, #0
8009c66: d109 bne.n 8009c7c <tcp_enqueue_flags+0xd0>
tcp_set_flags(pcb, TF_NAGLEMEMERR);
8009c68: 687b ldr r3, [r7, #4]
8009c6a: 8b5b ldrh r3, [r3, #26]
8009c6c: f043 0380 orr.w r3, r3, #128 ; 0x80
8009c70: b29a uxth r2, r3
8009c72: 687b ldr r3, [r7, #4]
8009c74: 835a strh r2, [r3, #26]
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
8009c76: f04f 33ff mov.w r3, #4294967295
8009c7a: e070 b.n 8009d5e <tcp_enqueue_flags+0x1b2>
}
LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0);
8009c7c: 68fb ldr r3, [r7, #12]
8009c7e: 68db ldr r3, [r3, #12]
8009c80: f003 0303 and.w r3, r3, #3
8009c84: 2b00 cmp r3, #0
8009c86: d006 beq.n 8009c96 <tcp_enqueue_flags+0xea>
8009c88: 4b37 ldr r3, [pc, #220] ; (8009d68 <tcp_enqueue_flags+0x1bc>)
8009c8a: f240 4242 movw r2, #1090 ; 0x442
8009c8e: 493b ldr r1, [pc, #236] ; (8009d7c <tcp_enqueue_flags+0x1d0>)
8009c90: 4837 ldr r0, [pc, #220] ; (8009d70 <tcp_enqueue_flags+0x1c4>)
8009c92: f006 f911 bl 800feb8 <printf>
LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
8009c96: 68fb ldr r3, [r7, #12]
8009c98: 891b ldrh r3, [r3, #8]
8009c9a: 2b00 cmp r3, #0
8009c9c: d006 beq.n 8009cac <tcp_enqueue_flags+0x100>
8009c9e: 4b32 ldr r3, [pc, #200] ; (8009d68 <tcp_enqueue_flags+0x1bc>)
8009ca0: f240 4243 movw r2, #1091 ; 0x443
8009ca4: 4936 ldr r1, [pc, #216] ; (8009d80 <tcp_enqueue_flags+0x1d4>)
8009ca6: 4832 ldr r0, [pc, #200] ; (8009d70 <tcp_enqueue_flags+0x1c4>)
8009ca8: f006 f906 bl 800feb8 <printf>
lwip_ntohl(seg->tcphdr->seqno),
lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg),
(u16_t)flags));
/* Now append seg to pcb->unsent queue */
if (pcb->unsent == NULL) {
8009cac: 687b ldr r3, [r7, #4]
8009cae: 6edb ldr r3, [r3, #108] ; 0x6c
8009cb0: 2b00 cmp r3, #0
8009cb2: d103 bne.n 8009cbc <tcp_enqueue_flags+0x110>
pcb->unsent = seg;
8009cb4: 687b ldr r3, [r7, #4]
8009cb6: 68fa ldr r2, [r7, #12]
8009cb8: 66da str r2, [r3, #108] ; 0x6c
8009cba: e00d b.n 8009cd8 <tcp_enqueue_flags+0x12c>
} else {
struct tcp_seg *useg;
for (useg = pcb->unsent; useg->next != NULL; useg = useg->next);
8009cbc: 687b ldr r3, [r7, #4]
8009cbe: 6edb ldr r3, [r3, #108] ; 0x6c
8009cc0: 61bb str r3, [r7, #24]
8009cc2: e002 b.n 8009cca <tcp_enqueue_flags+0x11e>
8009cc4: 69bb ldr r3, [r7, #24]
8009cc6: 681b ldr r3, [r3, #0]
8009cc8: 61bb str r3, [r7, #24]
8009cca: 69bb ldr r3, [r7, #24]
8009ccc: 681b ldr r3, [r3, #0]
8009cce: 2b00 cmp r3, #0
8009cd0: d1f8 bne.n 8009cc4 <tcp_enqueue_flags+0x118>
useg->next = seg;
8009cd2: 69bb ldr r3, [r7, #24]
8009cd4: 68fa ldr r2, [r7, #12]
8009cd6: 601a str r2, [r3, #0]
}
#if TCP_OVERSIZE
/* The new unsent tail has no space */
pcb->unsent_oversize = 0;
8009cd8: 687b ldr r3, [r7, #4]
8009cda: 2200 movs r2, #0
8009cdc: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
#endif /* TCP_OVERSIZE */
/* SYN and FIN bump the sequence number */
if ((flags & TCP_SYN) || (flags & TCP_FIN)) {
8009ce0: 78fb ldrb r3, [r7, #3]
8009ce2: f003 0302 and.w r3, r3, #2
8009ce6: 2b00 cmp r3, #0
8009ce8: d104 bne.n 8009cf4 <tcp_enqueue_flags+0x148>
8009cea: 78fb ldrb r3, [r7, #3]
8009cec: f003 0301 and.w r3, r3, #1
8009cf0: 2b00 cmp r3, #0
8009cf2: d004 beq.n 8009cfe <tcp_enqueue_flags+0x152>
pcb->snd_lbb++;
8009cf4: 687b ldr r3, [r7, #4]
8009cf6: 6ddb ldr r3, [r3, #92] ; 0x5c
8009cf8: 1c5a adds r2, r3, #1
8009cfa: 687b ldr r3, [r7, #4]
8009cfc: 65da str r2, [r3, #92] ; 0x5c
/* optlen does not influence snd_buf */
}
if (flags & TCP_FIN) {
8009cfe: 78fb ldrb r3, [r7, #3]
8009d00: f003 0301 and.w r3, r3, #1
8009d04: 2b00 cmp r3, #0
8009d06: d006 beq.n 8009d16 <tcp_enqueue_flags+0x16a>
tcp_set_flags(pcb, TF_FIN);
8009d08: 687b ldr r3, [r7, #4]
8009d0a: 8b5b ldrh r3, [r3, #26]
8009d0c: f043 0320 orr.w r3, r3, #32
8009d10: b29a uxth r2, r3
8009d12: 687b ldr r3, [r7, #4]
8009d14: 835a strh r2, [r3, #26]
}
/* update number of segments on the queues */
pcb->snd_queuelen += pbuf_clen(seg->p);
8009d16: 68fb ldr r3, [r7, #12]
8009d18: 685b ldr r3, [r3, #4]
8009d1a: 4618 mov r0, r3
8009d1c: f7fb fc38 bl 8005590 <pbuf_clen>
8009d20: 4603 mov r3, r0
8009d22: 461a mov r2, r3
8009d24: 687b ldr r3, [r7, #4]
8009d26: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8009d2a: 4413 add r3, r2
8009d2c: b29a uxth r2, r3
8009d2e: 687b ldr r3, [r7, #4]
8009d30: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: %"S16_F" (after enqueued)\n", pcb->snd_queuelen));
if (pcb->snd_queuelen != 0) {
8009d34: 687b ldr r3, [r7, #4]
8009d36: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8009d3a: 2b00 cmp r3, #0
8009d3c: d00e beq.n 8009d5c <tcp_enqueue_flags+0x1b0>
LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
8009d3e: 687b ldr r3, [r7, #4]
8009d40: 6f1b ldr r3, [r3, #112] ; 0x70
8009d42: 2b00 cmp r3, #0
8009d44: d10a bne.n 8009d5c <tcp_enqueue_flags+0x1b0>
8009d46: 687b ldr r3, [r7, #4]
8009d48: 6edb ldr r3, [r3, #108] ; 0x6c
8009d4a: 2b00 cmp r3, #0
8009d4c: d106 bne.n 8009d5c <tcp_enqueue_flags+0x1b0>
8009d4e: 4b06 ldr r3, [pc, #24] ; (8009d68 <tcp_enqueue_flags+0x1bc>)
8009d50: f240 4265 movw r2, #1125 ; 0x465
8009d54: 490b ldr r1, [pc, #44] ; (8009d84 <tcp_enqueue_flags+0x1d8>)
8009d56: 4806 ldr r0, [pc, #24] ; (8009d70 <tcp_enqueue_flags+0x1c4>)
8009d58: f006 f8ae bl 800feb8 <printf>
pcb->unacked != NULL || pcb->unsent != NULL);
}
return ERR_OK;
8009d5c: 2300 movs r3, #0
}
8009d5e: 4618 mov r0, r3
8009d60: 3720 adds r7, #32
8009d62: 46bd mov sp, r7
8009d64: bd80 pop {r7, pc}
8009d66: bf00 nop
8009d68: 0801608c .word 0x0801608c
8009d6c: 080164b0 .word 0x080164b0
8009d70: 080160e0 .word 0x080160e0
8009d74: 08016508 .word 0x08016508
8009d78: 08016528 .word 0x08016528
8009d7c: 08016564 .word 0x08016564
8009d80: 0801657c .word 0x0801657c
8009d84: 080165a8 .word 0x080165a8
08009d88 <tcp_output>:
* @return ERR_OK if data has been sent or nothing to send
* another err_t on error
*/
err_t
tcp_output(struct tcp_pcb *pcb)
{
8009d88: b5b0 push {r4, r5, r7, lr}
8009d8a: b08a sub sp, #40 ; 0x28
8009d8c: af00 add r7, sp, #0
8009d8e: 6078 str r0, [r7, #4]
s16_t i = 0;
#endif /* TCP_CWND_DEBUG */
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL);
8009d90: 687b ldr r3, [r7, #4]
8009d92: 2b00 cmp r3, #0
8009d94: d106 bne.n 8009da4 <tcp_output+0x1c>
8009d96: 4b8a ldr r3, [pc, #552] ; (8009fc0 <tcp_output+0x238>)
8009d98: f240 42e1 movw r2, #1249 ; 0x4e1
8009d9c: 4989 ldr r1, [pc, #548] ; (8009fc4 <tcp_output+0x23c>)
8009d9e: 488a ldr r0, [pc, #552] ; (8009fc8 <tcp_output+0x240>)
8009da0: f006 f88a bl 800feb8 <printf>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_output for listen-pcbs",
8009da4: 687b ldr r3, [r7, #4]
8009da6: 7d1b ldrb r3, [r3, #20]
8009da8: 2b01 cmp r3, #1
8009daa: d106 bne.n 8009dba <tcp_output+0x32>
8009dac: 4b84 ldr r3, [pc, #528] ; (8009fc0 <tcp_output+0x238>)
8009dae: f240 42e3 movw r2, #1251 ; 0x4e3
8009db2: 4986 ldr r1, [pc, #536] ; (8009fcc <tcp_output+0x244>)
8009db4: 4884 ldr r0, [pc, #528] ; (8009fc8 <tcp_output+0x240>)
8009db6: f006 f87f bl 800feb8 <printf>
/* First, check if we are invoked by the TCP input processing
code. If so, we do not output anything. Instead, we rely on the
input processing code to call us when input processing is done
with. */
if (tcp_input_pcb == pcb) {
8009dba: 4b85 ldr r3, [pc, #532] ; (8009fd0 <tcp_output+0x248>)
8009dbc: 681b ldr r3, [r3, #0]
8009dbe: 687a ldr r2, [r7, #4]
8009dc0: 429a cmp r2, r3
8009dc2: d101 bne.n 8009dc8 <tcp_output+0x40>
return ERR_OK;
8009dc4: 2300 movs r3, #0
8009dc6: e1ce b.n 800a166 <tcp_output+0x3de>
}
wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);
8009dc8: 687b ldr r3, [r7, #4]
8009dca: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8009dce: 687b ldr r3, [r7, #4]
8009dd0: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8009dd4: 4293 cmp r3, r2
8009dd6: bf28 it cs
8009dd8: 4613 movcs r3, r2
8009dda: b29b uxth r3, r3
8009ddc: 61bb str r3, [r7, #24]
seg = pcb->unsent;
8009dde: 687b ldr r3, [r7, #4]
8009de0: 6edb ldr r3, [r3, #108] ; 0x6c
8009de2: 627b str r3, [r7, #36] ; 0x24
if (seg == NULL) {
8009de4: 6a7b ldr r3, [r7, #36] ; 0x24
8009de6: 2b00 cmp r3, #0
8009de8: d10b bne.n 8009e02 <tcp_output+0x7a>
", seg == NULL, ack %"U32_F"\n",
pcb->snd_wnd, pcb->cwnd, wnd, pcb->lastack));
/* If the TF_ACK_NOW flag is set and the ->unsent queue is empty, construct
* an empty ACK segment and send it. */
if (pcb->flags & TF_ACK_NOW) {
8009dea: 687b ldr r3, [r7, #4]
8009dec: 8b5b ldrh r3, [r3, #26]
8009dee: f003 0302 and.w r3, r3, #2
8009df2: 2b00 cmp r3, #0
8009df4: f000 81aa beq.w 800a14c <tcp_output+0x3c4>
return tcp_send_empty_ack(pcb);
8009df8: 6878 ldr r0, [r7, #4]
8009dfa: f000 fdcb bl 800a994 <tcp_send_empty_ack>
8009dfe: 4603 mov r3, r0
8009e00: e1b1 b.n 800a166 <tcp_output+0x3de>
pcb->snd_wnd, pcb->cwnd, wnd,
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len,
lwip_ntohl(seg->tcphdr->seqno), pcb->lastack));
}
netif = tcp_route(pcb, &pcb->local_ip, &pcb->remote_ip);
8009e02: 6879 ldr r1, [r7, #4]
8009e04: 687b ldr r3, [r7, #4]
8009e06: 3304 adds r3, #4
8009e08: 461a mov r2, r3
8009e0a: 6878 ldr r0, [r7, #4]
8009e0c: f7ff fc7c bl 8009708 <tcp_route>
8009e10: 6178 str r0, [r7, #20]
if (netif == NULL) {
8009e12: 697b ldr r3, [r7, #20]
8009e14: 2b00 cmp r3, #0
8009e16: d102 bne.n 8009e1e <tcp_output+0x96>
return ERR_RTE;
8009e18: f06f 0303 mvn.w r3, #3
8009e1c: e1a3 b.n 800a166 <tcp_output+0x3de>
}
/* If we don't have a local IP address, we get one from netif */
if (ip_addr_isany(&pcb->local_ip)) {
8009e1e: 687b ldr r3, [r7, #4]
8009e20: 2b00 cmp r3, #0
8009e22: d003 beq.n 8009e2c <tcp_output+0xa4>
8009e24: 687b ldr r3, [r7, #4]
8009e26: 681b ldr r3, [r3, #0]
8009e28: 2b00 cmp r3, #0
8009e2a: d111 bne.n 8009e50 <tcp_output+0xc8>
const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip);
8009e2c: 697b ldr r3, [r7, #20]
8009e2e: 2b00 cmp r3, #0
8009e30: d002 beq.n 8009e38 <tcp_output+0xb0>
8009e32: 697b ldr r3, [r7, #20]
8009e34: 3304 adds r3, #4
8009e36: e000 b.n 8009e3a <tcp_output+0xb2>
8009e38: 2300 movs r3, #0
8009e3a: 613b str r3, [r7, #16]
if (local_ip == NULL) {
8009e3c: 693b ldr r3, [r7, #16]
8009e3e: 2b00 cmp r3, #0
8009e40: d102 bne.n 8009e48 <tcp_output+0xc0>
return ERR_RTE;
8009e42: f06f 0303 mvn.w r3, #3
8009e46: e18e b.n 800a166 <tcp_output+0x3de>
}
ip_addr_copy(pcb->local_ip, *local_ip);
8009e48: 693b ldr r3, [r7, #16]
8009e4a: 681a ldr r2, [r3, #0]
8009e4c: 687b ldr r3, [r7, #4]
8009e4e: 601a str r2, [r3, #0]
}
/* Handle the current segment not fitting within the window */
if (lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd) {
8009e50: 6a7b ldr r3, [r7, #36] ; 0x24
8009e52: 68db ldr r3, [r3, #12]
8009e54: 685b ldr r3, [r3, #4]
8009e56: 4618 mov r0, r3
8009e58: f7f9 ffbd bl 8003dd6 <lwip_htonl>
8009e5c: 4602 mov r2, r0
8009e5e: 687b ldr r3, [r7, #4]
8009e60: 6c5b ldr r3, [r3, #68] ; 0x44
8009e62: 1ad3 subs r3, r2, r3
8009e64: 6a7a ldr r2, [r7, #36] ; 0x24
8009e66: 8912 ldrh r2, [r2, #8]
8009e68: 4413 add r3, r2
8009e6a: 69ba ldr r2, [r7, #24]
8009e6c: 429a cmp r2, r3
8009e6e: d227 bcs.n 8009ec0 <tcp_output+0x138>
* within the remaining (could be 0) send window and RTO timer is not running (we
* have no in-flight data). If window is still too small after persist timer fires,
* then we split the segment. We don't consider the congestion window since a cwnd
* smaller than 1 SMSS implies in-flight data
*/
if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) {
8009e70: 687b ldr r3, [r7, #4]
8009e72: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8009e76: 461a mov r2, r3
8009e78: 69bb ldr r3, [r7, #24]
8009e7a: 4293 cmp r3, r2
8009e7c: d114 bne.n 8009ea8 <tcp_output+0x120>
8009e7e: 687b ldr r3, [r7, #4]
8009e80: 6f1b ldr r3, [r3, #112] ; 0x70
8009e82: 2b00 cmp r3, #0
8009e84: d110 bne.n 8009ea8 <tcp_output+0x120>
8009e86: 687b ldr r3, [r7, #4]
8009e88: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
8009e8c: 2b00 cmp r3, #0
8009e8e: d10b bne.n 8009ea8 <tcp_output+0x120>
pcb->persist_cnt = 0;
8009e90: 687b ldr r3, [r7, #4]
8009e92: 2200 movs r2, #0
8009e94: f883 2098 strb.w r2, [r3, #152] ; 0x98
pcb->persist_backoff = 1;
8009e98: 687b ldr r3, [r7, #4]
8009e9a: 2201 movs r2, #1
8009e9c: f883 2099 strb.w r2, [r3, #153] ; 0x99
pcb->persist_probe = 0;
8009ea0: 687b ldr r3, [r7, #4]
8009ea2: 2200 movs r2, #0
8009ea4: f883 209a strb.w r2, [r3, #154] ; 0x9a
}
/* We need an ACK, but can't send data now, so send an empty ACK */
if (pcb->flags & TF_ACK_NOW) {
8009ea8: 687b ldr r3, [r7, #4]
8009eaa: 8b5b ldrh r3, [r3, #26]
8009eac: f003 0302 and.w r3, r3, #2
8009eb0: 2b00 cmp r3, #0
8009eb2: f000 814d beq.w 800a150 <tcp_output+0x3c8>
return tcp_send_empty_ack(pcb);
8009eb6: 6878 ldr r0, [r7, #4]
8009eb8: f000 fd6c bl 800a994 <tcp_send_empty_ack>
8009ebc: 4603 mov r3, r0
8009ebe: e152 b.n 800a166 <tcp_output+0x3de>
}
goto output_done;
}
/* Stop persist timer, above conditions are not active */
pcb->persist_backoff = 0;
8009ec0: 687b ldr r3, [r7, #4]
8009ec2: 2200 movs r2, #0
8009ec4: f883 2099 strb.w r2, [r3, #153] ; 0x99
/* useg should point to last segment on unacked queue */
useg = pcb->unacked;
8009ec8: 687b ldr r3, [r7, #4]
8009eca: 6f1b ldr r3, [r3, #112] ; 0x70
8009ecc: 623b str r3, [r7, #32]
if (useg != NULL) {
8009ece: 6a3b ldr r3, [r7, #32]
8009ed0: 2b00 cmp r3, #0
8009ed2: f000 811c beq.w 800a10e <tcp_output+0x386>
for (; useg->next != NULL; useg = useg->next);
8009ed6: e002 b.n 8009ede <tcp_output+0x156>
8009ed8: 6a3b ldr r3, [r7, #32]
8009eda: 681b ldr r3, [r3, #0]
8009edc: 623b str r3, [r7, #32]
8009ede: 6a3b ldr r3, [r7, #32]
8009ee0: 681b ldr r3, [r3, #0]
8009ee2: 2b00 cmp r3, #0
8009ee4: d1f8 bne.n 8009ed8 <tcp_output+0x150>
}
/* data available and window allows it to be sent? */
while (seg != NULL &&
8009ee6: e112 b.n 800a10e <tcp_output+0x386>
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
LWIP_ASSERT("RST not expected here!",
8009ee8: 6a7b ldr r3, [r7, #36] ; 0x24
8009eea: 68db ldr r3, [r3, #12]
8009eec: 899b ldrh r3, [r3, #12]
8009eee: b29b uxth r3, r3
8009ef0: 4618 mov r0, r3
8009ef2: f7f9 ff5b bl 8003dac <lwip_htons>
8009ef6: 4603 mov r3, r0
8009ef8: b2db uxtb r3, r3
8009efa: f003 0304 and.w r3, r3, #4
8009efe: 2b00 cmp r3, #0
8009f00: d006 beq.n 8009f10 <tcp_output+0x188>
8009f02: 4b2f ldr r3, [pc, #188] ; (8009fc0 <tcp_output+0x238>)
8009f04: f240 5236 movw r2, #1334 ; 0x536
8009f08: 4932 ldr r1, [pc, #200] ; (8009fd4 <tcp_output+0x24c>)
8009f0a: 482f ldr r0, [pc, #188] ; (8009fc8 <tcp_output+0x240>)
8009f0c: f005 ffd4 bl 800feb8 <printf>
* - if tcp_write had a memory error before (prevent delayed ACK timeout) or
* - if FIN was already enqueued for this PCB (SYN is always alone in a segment -
* either seg->next != NULL or pcb->unacked == NULL;
* RST is no sent using tcp_write/tcp_output.
*/
if ((tcp_do_output_nagle(pcb) == 0) &&
8009f10: 687b ldr r3, [r7, #4]
8009f12: 6f1b ldr r3, [r3, #112] ; 0x70
8009f14: 2b00 cmp r3, #0
8009f16: d01f beq.n 8009f58 <tcp_output+0x1d0>
8009f18: 687b ldr r3, [r7, #4]
8009f1a: 8b5b ldrh r3, [r3, #26]
8009f1c: f003 0344 and.w r3, r3, #68 ; 0x44
8009f20: 2b00 cmp r3, #0
8009f22: d119 bne.n 8009f58 <tcp_output+0x1d0>
8009f24: 687b ldr r3, [r7, #4]
8009f26: 6edb ldr r3, [r3, #108] ; 0x6c
8009f28: 2b00 cmp r3, #0
8009f2a: d00b beq.n 8009f44 <tcp_output+0x1bc>
8009f2c: 687b ldr r3, [r7, #4]
8009f2e: 6edb ldr r3, [r3, #108] ; 0x6c
8009f30: 681b ldr r3, [r3, #0]
8009f32: 2b00 cmp r3, #0
8009f34: d110 bne.n 8009f58 <tcp_output+0x1d0>
8009f36: 687b ldr r3, [r7, #4]
8009f38: 6edb ldr r3, [r3, #108] ; 0x6c
8009f3a: 891a ldrh r2, [r3, #8]
8009f3c: 687b ldr r3, [r7, #4]
8009f3e: 8e5b ldrh r3, [r3, #50] ; 0x32
8009f40: 429a cmp r2, r3
8009f42: d209 bcs.n 8009f58 <tcp_output+0x1d0>
8009f44: 687b ldr r3, [r7, #4]
8009f46: f8b3 3064 ldrh.w r3, [r3, #100] ; 0x64
8009f4a: 2b00 cmp r3, #0
8009f4c: d004 beq.n 8009f58 <tcp_output+0x1d0>
8009f4e: 687b ldr r3, [r7, #4]
8009f50: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8009f54: 2b08 cmp r3, #8
8009f56: d901 bls.n 8009f5c <tcp_output+0x1d4>
8009f58: 2301 movs r3, #1
8009f5a: e000 b.n 8009f5e <tcp_output+0x1d6>
8009f5c: 2300 movs r3, #0
8009f5e: 2b00 cmp r3, #0
8009f60: d106 bne.n 8009f70 <tcp_output+0x1e8>
((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) {
8009f62: 687b ldr r3, [r7, #4]
8009f64: 8b5b ldrh r3, [r3, #26]
8009f66: f003 03a0 and.w r3, r3, #160 ; 0xa0
if ((tcp_do_output_nagle(pcb) == 0) &&
8009f6a: 2b00 cmp r3, #0
8009f6c: f000 80e4 beq.w 800a138 <tcp_output+0x3b0>
pcb->lastack,
lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i));
++i;
#endif /* TCP_CWND_DEBUG */
if (pcb->state != SYN_SENT) {
8009f70: 687b ldr r3, [r7, #4]
8009f72: 7d1b ldrb r3, [r3, #20]
8009f74: 2b02 cmp r3, #2
8009f76: d00d beq.n 8009f94 <tcp_output+0x20c>
TCPH_SET_FLAG(seg->tcphdr, TCP_ACK);
8009f78: 6a7b ldr r3, [r7, #36] ; 0x24
8009f7a: 68db ldr r3, [r3, #12]
8009f7c: 899b ldrh r3, [r3, #12]
8009f7e: b29c uxth r4, r3
8009f80: 2010 movs r0, #16
8009f82: f7f9 ff13 bl 8003dac <lwip_htons>
8009f86: 4603 mov r3, r0
8009f88: 461a mov r2, r3
8009f8a: 6a7b ldr r3, [r7, #36] ; 0x24
8009f8c: 68db ldr r3, [r3, #12]
8009f8e: 4322 orrs r2, r4
8009f90: b292 uxth r2, r2
8009f92: 819a strh r2, [r3, #12]
}
err = tcp_output_segment(seg, pcb, netif);
8009f94: 697a ldr r2, [r7, #20]
8009f96: 6879 ldr r1, [r7, #4]
8009f98: 6a78 ldr r0, [r7, #36] ; 0x24
8009f9a: f000 f909 bl 800a1b0 <tcp_output_segment>
8009f9e: 4603 mov r3, r0
8009fa0: 73fb strb r3, [r7, #15]
if (err != ERR_OK) {
8009fa2: f997 300f ldrsb.w r3, [r7, #15]
8009fa6: 2b00 cmp r3, #0
8009fa8: d016 beq.n 8009fd8 <tcp_output+0x250>
/* segment could not be sent, for whatever reason */
tcp_set_flags(pcb, TF_NAGLEMEMERR);
8009faa: 687b ldr r3, [r7, #4]
8009fac: 8b5b ldrh r3, [r3, #26]
8009fae: f043 0380 orr.w r3, r3, #128 ; 0x80
8009fb2: b29a uxth r2, r3
8009fb4: 687b ldr r3, [r7, #4]
8009fb6: 835a strh r2, [r3, #26]
return err;
8009fb8: f997 300f ldrsb.w r3, [r7, #15]
8009fbc: e0d3 b.n 800a166 <tcp_output+0x3de>
8009fbe: bf00 nop
8009fc0: 0801608c .word 0x0801608c
8009fc4: 080165d0 .word 0x080165d0
8009fc8: 080160e0 .word 0x080160e0
8009fcc: 080165e8 .word 0x080165e8
8009fd0: 20008bf8 .word 0x20008bf8
8009fd4: 08016610 .word 0x08016610
}
#if TCP_OVERSIZE_DBGCHECK
seg->oversize_left = 0;
#endif /* TCP_OVERSIZE_DBGCHECK */
pcb->unsent = seg->next;
8009fd8: 6a7b ldr r3, [r7, #36] ; 0x24
8009fda: 681a ldr r2, [r3, #0]
8009fdc: 687b ldr r3, [r7, #4]
8009fde: 66da str r2, [r3, #108] ; 0x6c
if (pcb->state != SYN_SENT) {
8009fe0: 687b ldr r3, [r7, #4]
8009fe2: 7d1b ldrb r3, [r3, #20]
8009fe4: 2b02 cmp r3, #2
8009fe6: d006 beq.n 8009ff6 <tcp_output+0x26e>
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8009fe8: 687b ldr r3, [r7, #4]
8009fea: 8b5b ldrh r3, [r3, #26]
8009fec: f023 0303 bic.w r3, r3, #3
8009ff0: b29a uxth r2, r3
8009ff2: 687b ldr r3, [r7, #4]
8009ff4: 835a strh r2, [r3, #26]
}
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
8009ff6: 6a7b ldr r3, [r7, #36] ; 0x24
8009ff8: 68db ldr r3, [r3, #12]
8009ffa: 685b ldr r3, [r3, #4]
8009ffc: 4618 mov r0, r3
8009ffe: f7f9 feea bl 8003dd6 <lwip_htonl>
800a002: 4604 mov r4, r0
800a004: 6a7b ldr r3, [r7, #36] ; 0x24
800a006: 891b ldrh r3, [r3, #8]
800a008: 461d mov r5, r3
800a00a: 6a7b ldr r3, [r7, #36] ; 0x24
800a00c: 68db ldr r3, [r3, #12]
800a00e: 899b ldrh r3, [r3, #12]
800a010: b29b uxth r3, r3
800a012: 4618 mov r0, r3
800a014: f7f9 feca bl 8003dac <lwip_htons>
800a018: 4603 mov r3, r0
800a01a: b2db uxtb r3, r3
800a01c: f003 0303 and.w r3, r3, #3
800a020: 2b00 cmp r3, #0
800a022: d001 beq.n 800a028 <tcp_output+0x2a0>
800a024: 2301 movs r3, #1
800a026: e000 b.n 800a02a <tcp_output+0x2a2>
800a028: 2300 movs r3, #0
800a02a: 442b add r3, r5
800a02c: 4423 add r3, r4
800a02e: 60bb str r3, [r7, #8]
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
800a030: 687b ldr r3, [r7, #4]
800a032: 6d1a ldr r2, [r3, #80] ; 0x50
800a034: 68bb ldr r3, [r7, #8]
800a036: 1ad3 subs r3, r2, r3
800a038: 2b00 cmp r3, #0
800a03a: da02 bge.n 800a042 <tcp_output+0x2ba>
pcb->snd_nxt = snd_nxt;
800a03c: 687b ldr r3, [r7, #4]
800a03e: 68ba ldr r2, [r7, #8]
800a040: 651a str r2, [r3, #80] ; 0x50
}
/* put segment on unacknowledged list if length > 0 */
if (TCP_TCPLEN(seg) > 0) {
800a042: 6a7b ldr r3, [r7, #36] ; 0x24
800a044: 891b ldrh r3, [r3, #8]
800a046: 461c mov r4, r3
800a048: 6a7b ldr r3, [r7, #36] ; 0x24
800a04a: 68db ldr r3, [r3, #12]
800a04c: 899b ldrh r3, [r3, #12]
800a04e: b29b uxth r3, r3
800a050: 4618 mov r0, r3
800a052: f7f9 feab bl 8003dac <lwip_htons>
800a056: 4603 mov r3, r0
800a058: b2db uxtb r3, r3
800a05a: f003 0303 and.w r3, r3, #3
800a05e: 2b00 cmp r3, #0
800a060: d001 beq.n 800a066 <tcp_output+0x2de>
800a062: 2301 movs r3, #1
800a064: e000 b.n 800a068 <tcp_output+0x2e0>
800a066: 2300 movs r3, #0
800a068: 4423 add r3, r4
800a06a: 2b00 cmp r3, #0
800a06c: d049 beq.n 800a102 <tcp_output+0x37a>
seg->next = NULL;
800a06e: 6a7b ldr r3, [r7, #36] ; 0x24
800a070: 2200 movs r2, #0
800a072: 601a str r2, [r3, #0]
/* unacked list is empty? */
if (pcb->unacked == NULL) {
800a074: 687b ldr r3, [r7, #4]
800a076: 6f1b ldr r3, [r3, #112] ; 0x70
800a078: 2b00 cmp r3, #0
800a07a: d105 bne.n 800a088 <tcp_output+0x300>
pcb->unacked = seg;
800a07c: 687b ldr r3, [r7, #4]
800a07e: 6a7a ldr r2, [r7, #36] ; 0x24
800a080: 671a str r2, [r3, #112] ; 0x70
useg = seg;
800a082: 6a7b ldr r3, [r7, #36] ; 0x24
800a084: 623b str r3, [r7, #32]
800a086: e03f b.n 800a108 <tcp_output+0x380>
/* unacked list is not empty? */
} else {
/* In the case of fast retransmit, the packet should not go to the tail
* of the unacked queue, but rather somewhere before it. We need to check for
* this case. -STJ Jul 27, 2004 */
if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) {
800a088: 6a7b ldr r3, [r7, #36] ; 0x24
800a08a: 68db ldr r3, [r3, #12]
800a08c: 685b ldr r3, [r3, #4]
800a08e: 4618 mov r0, r3
800a090: f7f9 fea1 bl 8003dd6 <lwip_htonl>
800a094: 4604 mov r4, r0
800a096: 6a3b ldr r3, [r7, #32]
800a098: 68db ldr r3, [r3, #12]
800a09a: 685b ldr r3, [r3, #4]
800a09c: 4618 mov r0, r3
800a09e: f7f9 fe9a bl 8003dd6 <lwip_htonl>
800a0a2: 4603 mov r3, r0
800a0a4: 1ae3 subs r3, r4, r3
800a0a6: 2b00 cmp r3, #0
800a0a8: da24 bge.n 800a0f4 <tcp_output+0x36c>
/* add segment to before tail of unacked list, keeping the list sorted */
struct tcp_seg **cur_seg = &(pcb->unacked);
800a0aa: 687b ldr r3, [r7, #4]
800a0ac: 3370 adds r3, #112 ; 0x70
800a0ae: 61fb str r3, [r7, #28]
while (*cur_seg &&
800a0b0: e002 b.n 800a0b8 <tcp_output+0x330>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
cur_seg = &((*cur_seg)->next );
800a0b2: 69fb ldr r3, [r7, #28]
800a0b4: 681b ldr r3, [r3, #0]
800a0b6: 61fb str r3, [r7, #28]
while (*cur_seg &&
800a0b8: 69fb ldr r3, [r7, #28]
800a0ba: 681b ldr r3, [r3, #0]
800a0bc: 2b00 cmp r3, #0
800a0be: d011 beq.n 800a0e4 <tcp_output+0x35c>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
800a0c0: 69fb ldr r3, [r7, #28]
800a0c2: 681b ldr r3, [r3, #0]
800a0c4: 68db ldr r3, [r3, #12]
800a0c6: 685b ldr r3, [r3, #4]
800a0c8: 4618 mov r0, r3
800a0ca: f7f9 fe84 bl 8003dd6 <lwip_htonl>
800a0ce: 4604 mov r4, r0
800a0d0: 6a7b ldr r3, [r7, #36] ; 0x24
800a0d2: 68db ldr r3, [r3, #12]
800a0d4: 685b ldr r3, [r3, #4]
800a0d6: 4618 mov r0, r3
800a0d8: f7f9 fe7d bl 8003dd6 <lwip_htonl>
800a0dc: 4603 mov r3, r0
800a0de: 1ae3 subs r3, r4, r3
while (*cur_seg &&
800a0e0: 2b00 cmp r3, #0
800a0e2: dbe6 blt.n 800a0b2 <tcp_output+0x32a>
}
seg->next = (*cur_seg);
800a0e4: 69fb ldr r3, [r7, #28]
800a0e6: 681a ldr r2, [r3, #0]
800a0e8: 6a7b ldr r3, [r7, #36] ; 0x24
800a0ea: 601a str r2, [r3, #0]
(*cur_seg) = seg;
800a0ec: 69fb ldr r3, [r7, #28]
800a0ee: 6a7a ldr r2, [r7, #36] ; 0x24
800a0f0: 601a str r2, [r3, #0]
800a0f2: e009 b.n 800a108 <tcp_output+0x380>
} else {
/* add segment to tail of unacked list */
useg->next = seg;
800a0f4: 6a3b ldr r3, [r7, #32]
800a0f6: 6a7a ldr r2, [r7, #36] ; 0x24
800a0f8: 601a str r2, [r3, #0]
useg = useg->next;
800a0fa: 6a3b ldr r3, [r7, #32]
800a0fc: 681b ldr r3, [r3, #0]
800a0fe: 623b str r3, [r7, #32]
800a100: e002 b.n 800a108 <tcp_output+0x380>
}
}
/* do not queue empty segments on the unacked list */
} else {
tcp_seg_free(seg);
800a102: 6a78 ldr r0, [r7, #36] ; 0x24
800a104: f7fc fc3f bl 8006986 <tcp_seg_free>
}
seg = pcb->unsent;
800a108: 687b ldr r3, [r7, #4]
800a10a: 6edb ldr r3, [r3, #108] ; 0x6c
800a10c: 627b str r3, [r7, #36] ; 0x24
while (seg != NULL &&
800a10e: 6a7b ldr r3, [r7, #36] ; 0x24
800a110: 2b00 cmp r3, #0
800a112: d012 beq.n 800a13a <tcp_output+0x3b2>
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
800a114: 6a7b ldr r3, [r7, #36] ; 0x24
800a116: 68db ldr r3, [r3, #12]
800a118: 685b ldr r3, [r3, #4]
800a11a: 4618 mov r0, r3
800a11c: f7f9 fe5b bl 8003dd6 <lwip_htonl>
800a120: 4602 mov r2, r0
800a122: 687b ldr r3, [r7, #4]
800a124: 6c5b ldr r3, [r3, #68] ; 0x44
800a126: 1ad3 subs r3, r2, r3
800a128: 6a7a ldr r2, [r7, #36] ; 0x24
800a12a: 8912 ldrh r2, [r2, #8]
800a12c: 4413 add r3, r2
while (seg != NULL &&
800a12e: 69ba ldr r2, [r7, #24]
800a130: 429a cmp r2, r3
800a132: f4bf aed9 bcs.w 8009ee8 <tcp_output+0x160>
800a136: e000 b.n 800a13a <tcp_output+0x3b2>
break;
800a138: bf00 nop
}
#if TCP_OVERSIZE
if (pcb->unsent == NULL) {
800a13a: 687b ldr r3, [r7, #4]
800a13c: 6edb ldr r3, [r3, #108] ; 0x6c
800a13e: 2b00 cmp r3, #0
800a140: d108 bne.n 800a154 <tcp_output+0x3cc>
/* last unsent has been removed, reset unsent_oversize */
pcb->unsent_oversize = 0;
800a142: 687b ldr r3, [r7, #4]
800a144: 2200 movs r2, #0
800a146: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
800a14a: e004 b.n 800a156 <tcp_output+0x3ce>
goto output_done;
800a14c: bf00 nop
800a14e: e002 b.n 800a156 <tcp_output+0x3ce>
goto output_done;
800a150: bf00 nop
800a152: e000 b.n 800a156 <tcp_output+0x3ce>
}
#endif /* TCP_OVERSIZE */
output_done:
800a154: bf00 nop
tcp_clear_flags(pcb, TF_NAGLEMEMERR);
800a156: 687b ldr r3, [r7, #4]
800a158: 8b5b ldrh r3, [r3, #26]
800a15a: f023 0380 bic.w r3, r3, #128 ; 0x80
800a15e: b29a uxth r2, r3
800a160: 687b ldr r3, [r7, #4]
800a162: 835a strh r2, [r3, #26]
return ERR_OK;
800a164: 2300 movs r3, #0
}
800a166: 4618 mov r0, r3
800a168: 3728 adds r7, #40 ; 0x28
800a16a: 46bd mov sp, r7
800a16c: bdb0 pop {r4, r5, r7, pc}
800a16e: bf00 nop
0800a170 <tcp_output_segment_busy>:
* @arg seg the tcp segment to check
* @return 1 if ref != 1, 0 if ref == 1
*/
static int
tcp_output_segment_busy(const struct tcp_seg *seg)
{
800a170: b580 push {r7, lr}
800a172: b082 sub sp, #8
800a174: af00 add r7, sp, #0
800a176: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL);
800a178: 687b ldr r3, [r7, #4]
800a17a: 2b00 cmp r3, #0
800a17c: d106 bne.n 800a18c <tcp_output_segment_busy+0x1c>
800a17e: 4b09 ldr r3, [pc, #36] ; (800a1a4 <tcp_output_segment_busy+0x34>)
800a180: f240 529a movw r2, #1434 ; 0x59a
800a184: 4908 ldr r1, [pc, #32] ; (800a1a8 <tcp_output_segment_busy+0x38>)
800a186: 4809 ldr r0, [pc, #36] ; (800a1ac <tcp_output_segment_busy+0x3c>)
800a188: f005 fe96 bl 800feb8 <printf>
/* We only need to check the first pbuf here:
If a pbuf is queued for transmission, a driver calls pbuf_ref(),
which only changes the ref count of the first pbuf */
if (seg->p->ref != 1) {
800a18c: 687b ldr r3, [r7, #4]
800a18e: 685b ldr r3, [r3, #4]
800a190: 7b9b ldrb r3, [r3, #14]
800a192: 2b01 cmp r3, #1
800a194: d001 beq.n 800a19a <tcp_output_segment_busy+0x2a>
/* other reference found */
return 1;
800a196: 2301 movs r3, #1
800a198: e000 b.n 800a19c <tcp_output_segment_busy+0x2c>
}
/* no other references found */
return 0;
800a19a: 2300 movs r3, #0
}
800a19c: 4618 mov r0, r3
800a19e: 3708 adds r7, #8
800a1a0: 46bd mov sp, r7
800a1a2: bd80 pop {r7, pc}
800a1a4: 0801608c .word 0x0801608c
800a1a8: 08016628 .word 0x08016628
800a1ac: 080160e0 .word 0x080160e0
0800a1b0 <tcp_output_segment>:
* @param pcb the tcp_pcb for the TCP connection used to send the segment
* @param netif the netif used to send the segment
*/
static err_t
tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif)
{
800a1b0: b5b0 push {r4, r5, r7, lr}
800a1b2: b08c sub sp, #48 ; 0x30
800a1b4: af04 add r7, sp, #16
800a1b6: 60f8 str r0, [r7, #12]
800a1b8: 60b9 str r1, [r7, #8]
800a1ba: 607a str r2, [r7, #4]
u32_t *opts;
#if TCP_CHECKSUM_ON_COPY
int seg_chksum_was_swapped = 0;
#endif
LWIP_ASSERT("tcp_output_segment: invalid seg", seg != NULL);
800a1bc: 68fb ldr r3, [r7, #12]
800a1be: 2b00 cmp r3, #0
800a1c0: d106 bne.n 800a1d0 <tcp_output_segment+0x20>
800a1c2: 4b63 ldr r3, [pc, #396] ; (800a350 <tcp_output_segment+0x1a0>)
800a1c4: f44f 62b7 mov.w r2, #1464 ; 0x5b8
800a1c8: 4962 ldr r1, [pc, #392] ; (800a354 <tcp_output_segment+0x1a4>)
800a1ca: 4863 ldr r0, [pc, #396] ; (800a358 <tcp_output_segment+0x1a8>)
800a1cc: f005 fe74 bl 800feb8 <printf>
LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL);
800a1d0: 68bb ldr r3, [r7, #8]
800a1d2: 2b00 cmp r3, #0
800a1d4: d106 bne.n 800a1e4 <tcp_output_segment+0x34>
800a1d6: 4b5e ldr r3, [pc, #376] ; (800a350 <tcp_output_segment+0x1a0>)
800a1d8: f240 52b9 movw r2, #1465 ; 0x5b9
800a1dc: 495f ldr r1, [pc, #380] ; (800a35c <tcp_output_segment+0x1ac>)
800a1de: 485e ldr r0, [pc, #376] ; (800a358 <tcp_output_segment+0x1a8>)
800a1e0: f005 fe6a bl 800feb8 <printf>
LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL);
800a1e4: 687b ldr r3, [r7, #4]
800a1e6: 2b00 cmp r3, #0
800a1e8: d106 bne.n 800a1f8 <tcp_output_segment+0x48>
800a1ea: 4b59 ldr r3, [pc, #356] ; (800a350 <tcp_output_segment+0x1a0>)
800a1ec: f240 52ba movw r2, #1466 ; 0x5ba
800a1f0: 495b ldr r1, [pc, #364] ; (800a360 <tcp_output_segment+0x1b0>)
800a1f2: 4859 ldr r0, [pc, #356] ; (800a358 <tcp_output_segment+0x1a8>)
800a1f4: f005 fe60 bl 800feb8 <printf>
if (tcp_output_segment_busy(seg)) {
800a1f8: 68f8 ldr r0, [r7, #12]
800a1fa: f7ff ffb9 bl 800a170 <tcp_output_segment_busy>
800a1fe: 4603 mov r3, r0
800a200: 2b00 cmp r3, #0
800a202: d001 beq.n 800a208 <tcp_output_segment+0x58>
/* This should not happen: rexmit functions should have checked this.
However, since this function modifies p->len, we must not continue in this case. */
LWIP_DEBUGF(TCP_RTO_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_output_segment: segment busy\n"));
return ERR_OK;
800a204: 2300 movs r3, #0
800a206: e09f b.n 800a348 <tcp_output_segment+0x198>
}
/* The TCP header has already been constructed, but the ackno and
wnd fields remain. */
seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt);
800a208: 68bb ldr r3, [r7, #8]
800a20a: 6a5a ldr r2, [r3, #36] ; 0x24
800a20c: 68fb ldr r3, [r7, #12]
800a20e: 68dc ldr r4, [r3, #12]
800a210: 4610 mov r0, r2
800a212: f7f9 fde0 bl 8003dd6 <lwip_htonl>
800a216: 4603 mov r3, r0
800a218: 60a3 str r3, [r4, #8]
the window scale option) is never scaled. */
seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(pcb->rcv_ann_wnd));
} else
#endif /* LWIP_WND_SCALE */
{
seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd)));
800a21a: 68bb ldr r3, [r7, #8]
800a21c: 8d5a ldrh r2, [r3, #42] ; 0x2a
800a21e: 68fb ldr r3, [r7, #12]
800a220: 68dc ldr r4, [r3, #12]
800a222: 4610 mov r0, r2
800a224: f7f9 fdc2 bl 8003dac <lwip_htons>
800a228: 4603 mov r3, r0
800a22a: 81e3 strh r3, [r4, #14]
}
pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
800a22c: 68bb ldr r3, [r7, #8]
800a22e: 6a5b ldr r3, [r3, #36] ; 0x24
800a230: 68ba ldr r2, [r7, #8]
800a232: 8d52 ldrh r2, [r2, #42] ; 0x2a
800a234: 441a add r2, r3
800a236: 68bb ldr r3, [r7, #8]
800a238: 62da str r2, [r3, #44] ; 0x2c
/* Add any requested options. NB MSS option is only set on SYN
packets, so ignore it here */
/* cast through void* to get rid of alignment warnings */
opts = (u32_t *)(void *)(seg->tcphdr + 1);
800a23a: 68fb ldr r3, [r7, #12]
800a23c: 68db ldr r3, [r3, #12]
800a23e: 3314 adds r3, #20
800a240: 61fb str r3, [r7, #28]
if (seg->flags & TF_SEG_OPTS_MSS) {
800a242: 68fb ldr r3, [r7, #12]
800a244: 7a9b ldrb r3, [r3, #10]
800a246: f003 0301 and.w r3, r3, #1
800a24a: 2b00 cmp r3, #0
800a24c: d015 beq.n 800a27a <tcp_output_segment+0xca>
u16_t mss;
#if TCP_CALCULATE_EFF_SEND_MSS
mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip);
800a24e: 68bb ldr r3, [r7, #8]
800a250: 3304 adds r3, #4
800a252: 461a mov r2, r3
800a254: 6879 ldr r1, [r7, #4]
800a256: f44f 7006 mov.w r0, #536 ; 0x218
800a25a: f7fc fe8b bl 8006f74 <tcp_eff_send_mss_netif>
800a25e: 4603 mov r3, r0
800a260: 837b strh r3, [r7, #26]
#else /* TCP_CALCULATE_EFF_SEND_MSS */
mss = TCP_MSS;
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
*opts = TCP_BUILD_MSS_OPTION(mss);
800a262: 8b7b ldrh r3, [r7, #26]
800a264: f043 7301 orr.w r3, r3, #33816576 ; 0x2040000
800a268: 4618 mov r0, r3
800a26a: f7f9 fdb4 bl 8003dd6 <lwip_htonl>
800a26e: 4602 mov r2, r0
800a270: 69fb ldr r3, [r7, #28]
800a272: 601a str r2, [r3, #0]
opts += 1;
800a274: 69fb ldr r3, [r7, #28]
800a276: 3304 adds r3, #4
800a278: 61fb str r3, [r7, #28]
}
#endif
/* Set retransmission timer running if it is not currently enabled
This must be set before checking the route. */
if (pcb->rtime < 0) {
800a27a: 68bb ldr r3, [r7, #8]
800a27c: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
800a280: 2b00 cmp r3, #0
800a282: da02 bge.n 800a28a <tcp_output_segment+0xda>
pcb->rtime = 0;
800a284: 68bb ldr r3, [r7, #8]
800a286: 2200 movs r2, #0
800a288: 861a strh r2, [r3, #48] ; 0x30
}
if (pcb->rttest == 0) {
800a28a: 68bb ldr r3, [r7, #8]
800a28c: 6b5b ldr r3, [r3, #52] ; 0x34
800a28e: 2b00 cmp r3, #0
800a290: d10c bne.n 800a2ac <tcp_output_segment+0xfc>
pcb->rttest = tcp_ticks;
800a292: 4b34 ldr r3, [pc, #208] ; (800a364 <tcp_output_segment+0x1b4>)
800a294: 681a ldr r2, [r3, #0]
800a296: 68bb ldr r3, [r7, #8]
800a298: 635a str r2, [r3, #52] ; 0x34
pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno);
800a29a: 68fb ldr r3, [r7, #12]
800a29c: 68db ldr r3, [r3, #12]
800a29e: 685b ldr r3, [r3, #4]
800a2a0: 4618 mov r0, r3
800a2a2: f7f9 fd98 bl 8003dd6 <lwip_htonl>
800a2a6: 4602 mov r2, r0
800a2a8: 68bb ldr r3, [r7, #8]
800a2aa: 639a str r2, [r3, #56] ; 0x38
}
LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n",
lwip_htonl(seg->tcphdr->seqno), lwip_htonl(seg->tcphdr->seqno) +
seg->len));
len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload);
800a2ac: 68fb ldr r3, [r7, #12]
800a2ae: 68da ldr r2, [r3, #12]
800a2b0: 68fb ldr r3, [r7, #12]
800a2b2: 685b ldr r3, [r3, #4]
800a2b4: 685b ldr r3, [r3, #4]
800a2b6: 1ad3 subs r3, r2, r3
800a2b8: 833b strh r3, [r7, #24]
if (len == 0) {
/** Exclude retransmitted segments from this count. */
MIB2_STATS_INC(mib2.tcpoutsegs);
}
seg->p->len -= len;
800a2ba: 68fb ldr r3, [r7, #12]
800a2bc: 685b ldr r3, [r3, #4]
800a2be: 8959 ldrh r1, [r3, #10]
800a2c0: 68fb ldr r3, [r7, #12]
800a2c2: 685b ldr r3, [r3, #4]
800a2c4: 8b3a ldrh r2, [r7, #24]
800a2c6: 1a8a subs r2, r1, r2
800a2c8: b292 uxth r2, r2
800a2ca: 815a strh r2, [r3, #10]
seg->p->tot_len -= len;
800a2cc: 68fb ldr r3, [r7, #12]
800a2ce: 685b ldr r3, [r3, #4]
800a2d0: 8919 ldrh r1, [r3, #8]
800a2d2: 68fb ldr r3, [r7, #12]
800a2d4: 685b ldr r3, [r3, #4]
800a2d6: 8b3a ldrh r2, [r7, #24]
800a2d8: 1a8a subs r2, r1, r2
800a2da: b292 uxth r2, r2
800a2dc: 811a strh r2, [r3, #8]
seg->p->payload = seg->tcphdr;
800a2de: 68fb ldr r3, [r7, #12]
800a2e0: 685b ldr r3, [r3, #4]
800a2e2: 68fa ldr r2, [r7, #12]
800a2e4: 68d2 ldr r2, [r2, #12]
800a2e6: 605a str r2, [r3, #4]
seg->tcphdr->chksum = 0;
800a2e8: 68fb ldr r3, [r7, #12]
800a2ea: 68db ldr r3, [r3, #12]
800a2ec: 2200 movs r2, #0
800a2ee: 741a strb r2, [r3, #16]
800a2f0: 2200 movs r2, #0
800a2f2: 745a strb r2, [r3, #17]
#ifdef LWIP_HOOK_TCP_OUT_ADD_TCPOPTS
opts = LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(seg->p, seg->tcphdr, pcb, opts);
#endif
LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(seg->tcphdr + 1)) + LWIP_TCP_OPT_LENGTH_SEGMENT(seg->flags, pcb));
800a2f4: 68fb ldr r3, [r7, #12]
800a2f6: 68db ldr r3, [r3, #12]
800a2f8: f103 0214 add.w r2, r3, #20
800a2fc: 68fb ldr r3, [r7, #12]
800a2fe: 7a9b ldrb r3, [r3, #10]
800a300: 009b lsls r3, r3, #2
800a302: f003 0304 and.w r3, r3, #4
800a306: 4413 add r3, r2
800a308: 69fa ldr r2, [r7, #28]
800a30a: 429a cmp r2, r3
800a30c: d006 beq.n 800a31c <tcp_output_segment+0x16c>
800a30e: 4b10 ldr r3, [pc, #64] ; (800a350 <tcp_output_segment+0x1a0>)
800a310: f240 621c movw r2, #1564 ; 0x61c
800a314: 4914 ldr r1, [pc, #80] ; (800a368 <tcp_output_segment+0x1b8>)
800a316: 4810 ldr r0, [pc, #64] ; (800a358 <tcp_output_segment+0x1a8>)
800a318: f005 fdce bl 800feb8 <printf>
}
#endif /* CHECKSUM_GEN_TCP */
TCP_STATS_INC(tcp.xmit);
NETIF_SET_HINTS(netif, &(pcb->netif_hints));
err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl,
800a31c: 68fb ldr r3, [r7, #12]
800a31e: 6858 ldr r0, [r3, #4]
800a320: 68b9 ldr r1, [r7, #8]
800a322: 68bb ldr r3, [r7, #8]
800a324: 1d1c adds r4, r3, #4
800a326: 68bb ldr r3, [r7, #8]
800a328: 7add ldrb r5, [r3, #11]
800a32a: 68bb ldr r3, [r7, #8]
800a32c: 7a9b ldrb r3, [r3, #10]
800a32e: 687a ldr r2, [r7, #4]
800a330: 9202 str r2, [sp, #8]
800a332: 2206 movs r2, #6
800a334: 9201 str r2, [sp, #4]
800a336: 9300 str r3, [sp, #0]
800a338: 462b mov r3, r5
800a33a: 4622 mov r2, r4
800a33c: f004 fbec bl 800eb18 <ip4_output_if>
800a340: 4603 mov r3, r0
800a342: 75fb strb r3, [r7, #23]
seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum);
seg->chksum_swapped = 1;
}
#endif
return err;
800a344: f997 3017 ldrsb.w r3, [r7, #23]
}
800a348: 4618 mov r0, r3
800a34a: 3720 adds r7, #32
800a34c: 46bd mov sp, r7
800a34e: bdb0 pop {r4, r5, r7, pc}
800a350: 0801608c .word 0x0801608c
800a354: 08016650 .word 0x08016650
800a358: 080160e0 .word 0x080160e0
800a35c: 08016670 .word 0x08016670
800a360: 08016690 .word 0x08016690
800a364: 20008bac .word 0x20008bac
800a368: 080166b4 .word 0x080166b4
0800a36c <tcp_rexmit_rto_prepare>:
*
* @param pcb the tcp_pcb for which to re-enqueue all unacked segments
*/
err_t
tcp_rexmit_rto_prepare(struct tcp_pcb *pcb)
{
800a36c: b5b0 push {r4, r5, r7, lr}
800a36e: b084 sub sp, #16
800a370: af00 add r7, sp, #0
800a372: 6078 str r0, [r7, #4]
struct tcp_seg *seg;
LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL);
800a374: 687b ldr r3, [r7, #4]
800a376: 2b00 cmp r3, #0
800a378: d106 bne.n 800a388 <tcp_rexmit_rto_prepare+0x1c>
800a37a: 4b31 ldr r3, [pc, #196] ; (800a440 <tcp_rexmit_rto_prepare+0xd4>)
800a37c: f240 6263 movw r2, #1635 ; 0x663
800a380: 4930 ldr r1, [pc, #192] ; (800a444 <tcp_rexmit_rto_prepare+0xd8>)
800a382: 4831 ldr r0, [pc, #196] ; (800a448 <tcp_rexmit_rto_prepare+0xdc>)
800a384: f005 fd98 bl 800feb8 <printf>
if (pcb->unacked == NULL) {
800a388: 687b ldr r3, [r7, #4]
800a38a: 6f1b ldr r3, [r3, #112] ; 0x70
800a38c: 2b00 cmp r3, #0
800a38e: d102 bne.n 800a396 <tcp_rexmit_rto_prepare+0x2a>
return ERR_VAL;
800a390: f06f 0305 mvn.w r3, #5
800a394: e050 b.n 800a438 <tcp_rexmit_rto_prepare+0xcc>
/* Move all unacked segments to the head of the unsent queue.
However, give up if any of the unsent pbufs are still referenced by the
netif driver due to deferred transmission. No point loading the link further
if it is struggling to flush its buffered writes. */
for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
800a396: 687b ldr r3, [r7, #4]
800a398: 6f1b ldr r3, [r3, #112] ; 0x70
800a39a: 60fb str r3, [r7, #12]
800a39c: e00b b.n 800a3b6 <tcp_rexmit_rto_prepare+0x4a>
if (tcp_output_segment_busy(seg)) {
800a39e: 68f8 ldr r0, [r7, #12]
800a3a0: f7ff fee6 bl 800a170 <tcp_output_segment_busy>
800a3a4: 4603 mov r3, r0
800a3a6: 2b00 cmp r3, #0
800a3a8: d002 beq.n 800a3b0 <tcp_rexmit_rto_prepare+0x44>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
return ERR_VAL;
800a3aa: f06f 0305 mvn.w r3, #5
800a3ae: e043 b.n 800a438 <tcp_rexmit_rto_prepare+0xcc>
for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
800a3b0: 68fb ldr r3, [r7, #12]
800a3b2: 681b ldr r3, [r3, #0]
800a3b4: 60fb str r3, [r7, #12]
800a3b6: 68fb ldr r3, [r7, #12]
800a3b8: 681b ldr r3, [r3, #0]
800a3ba: 2b00 cmp r3, #0
800a3bc: d1ef bne.n 800a39e <tcp_rexmit_rto_prepare+0x32>
}
}
if (tcp_output_segment_busy(seg)) {
800a3be: 68f8 ldr r0, [r7, #12]
800a3c0: f7ff fed6 bl 800a170 <tcp_output_segment_busy>
800a3c4: 4603 mov r3, r0
800a3c6: 2b00 cmp r3, #0
800a3c8: d002 beq.n 800a3d0 <tcp_rexmit_rto_prepare+0x64>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
return ERR_VAL;
800a3ca: f06f 0305 mvn.w r3, #5
800a3ce: e033 b.n 800a438 <tcp_rexmit_rto_prepare+0xcc>
}
/* concatenate unsent queue after unacked queue */
seg->next = pcb->unsent;
800a3d0: 687b ldr r3, [r7, #4]
800a3d2: 6eda ldr r2, [r3, #108] ; 0x6c
800a3d4: 68fb ldr r3, [r7, #12]
800a3d6: 601a str r2, [r3, #0]
if (pcb->unsent == NULL) {
pcb->unsent_oversize = seg->oversize_left;
}
#endif /* TCP_OVERSIZE_DBGCHECK */
/* unsent queue is the concatenated queue (of unacked, unsent) */
pcb->unsent = pcb->unacked;
800a3d8: 687b ldr r3, [r7, #4]
800a3da: 6f1a ldr r2, [r3, #112] ; 0x70
800a3dc: 687b ldr r3, [r7, #4]
800a3de: 66da str r2, [r3, #108] ; 0x6c
/* unacked queue is now empty */
pcb->unacked = NULL;
800a3e0: 687b ldr r3, [r7, #4]
800a3e2: 2200 movs r2, #0
800a3e4: 671a str r2, [r3, #112] ; 0x70
/* Mark RTO in-progress */
tcp_set_flags(pcb, TF_RTO);
800a3e6: 687b ldr r3, [r7, #4]
800a3e8: 8b5b ldrh r3, [r3, #26]
800a3ea: f443 6300 orr.w r3, r3, #2048 ; 0x800
800a3ee: b29a uxth r2, r3
800a3f0: 687b ldr r3, [r7, #4]
800a3f2: 835a strh r2, [r3, #26]
/* Record the next byte following retransmit */
pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
800a3f4: 68fb ldr r3, [r7, #12]
800a3f6: 68db ldr r3, [r3, #12]
800a3f8: 685b ldr r3, [r3, #4]
800a3fa: 4618 mov r0, r3
800a3fc: f7f9 fceb bl 8003dd6 <lwip_htonl>
800a400: 4604 mov r4, r0
800a402: 68fb ldr r3, [r7, #12]
800a404: 891b ldrh r3, [r3, #8]
800a406: 461d mov r5, r3
800a408: 68fb ldr r3, [r7, #12]
800a40a: 68db ldr r3, [r3, #12]
800a40c: 899b ldrh r3, [r3, #12]
800a40e: b29b uxth r3, r3
800a410: 4618 mov r0, r3
800a412: f7f9 fccb bl 8003dac <lwip_htons>
800a416: 4603 mov r3, r0
800a418: b2db uxtb r3, r3
800a41a: f003 0303 and.w r3, r3, #3
800a41e: 2b00 cmp r3, #0
800a420: d001 beq.n 800a426 <tcp_rexmit_rto_prepare+0xba>
800a422: 2301 movs r3, #1
800a424: e000 b.n 800a428 <tcp_rexmit_rto_prepare+0xbc>
800a426: 2300 movs r3, #0
800a428: 442b add r3, r5
800a42a: 18e2 adds r2, r4, r3
800a42c: 687b ldr r3, [r7, #4]
800a42e: 64da str r2, [r3, #76] ; 0x4c
/* Don't take any RTT measurements after retransmitting. */
pcb->rttest = 0;
800a430: 687b ldr r3, [r7, #4]
800a432: 2200 movs r2, #0
800a434: 635a str r2, [r3, #52] ; 0x34
return ERR_OK;
800a436: 2300 movs r3, #0
}
800a438: 4618 mov r0, r3
800a43a: 3710 adds r7, #16
800a43c: 46bd mov sp, r7
800a43e: bdb0 pop {r4, r5, r7, pc}
800a440: 0801608c .word 0x0801608c
800a444: 080166c8 .word 0x080166c8
800a448: 080160e0 .word 0x080160e0
0800a44c <tcp_rexmit_rto_commit>:
*
* @param pcb the tcp_pcb for which to re-enqueue all unacked segments
*/
void
tcp_rexmit_rto_commit(struct tcp_pcb *pcb)
{
800a44c: b580 push {r7, lr}
800a44e: b082 sub sp, #8
800a450: af00 add r7, sp, #0
800a452: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL);
800a454: 687b ldr r3, [r7, #4]
800a456: 2b00 cmp r3, #0
800a458: d106 bne.n 800a468 <tcp_rexmit_rto_commit+0x1c>
800a45a: 4b0d ldr r3, [pc, #52] ; (800a490 <tcp_rexmit_rto_commit+0x44>)
800a45c: f44f 62d3 mov.w r2, #1688 ; 0x698
800a460: 490c ldr r1, [pc, #48] ; (800a494 <tcp_rexmit_rto_commit+0x48>)
800a462: 480d ldr r0, [pc, #52] ; (800a498 <tcp_rexmit_rto_commit+0x4c>)
800a464: f005 fd28 bl 800feb8 <printf>
/* increment number of retransmissions */
if (pcb->nrtx < 0xFF) {
800a468: 687b ldr r3, [r7, #4]
800a46a: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
800a46e: 2bff cmp r3, #255 ; 0xff
800a470: d007 beq.n 800a482 <tcp_rexmit_rto_commit+0x36>
++pcb->nrtx;
800a472: 687b ldr r3, [r7, #4]
800a474: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
800a478: 3301 adds r3, #1
800a47a: b2da uxtb r2, r3
800a47c: 687b ldr r3, [r7, #4]
800a47e: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Do the actual retransmission */
tcp_output(pcb);
800a482: 6878 ldr r0, [r7, #4]
800a484: f7ff fc80 bl 8009d88 <tcp_output>
}
800a488: bf00 nop
800a48a: 3708 adds r7, #8
800a48c: 46bd mov sp, r7
800a48e: bd80 pop {r7, pc}
800a490: 0801608c .word 0x0801608c
800a494: 080166ec .word 0x080166ec
800a498: 080160e0 .word 0x080160e0
0800a49c <tcp_rexmit_rto>:
*
* @param pcb the tcp_pcb for which to re-enqueue all unacked segments
*/
void
tcp_rexmit_rto(struct tcp_pcb *pcb)
{
800a49c: b580 push {r7, lr}
800a49e: b082 sub sp, #8
800a4a0: af00 add r7, sp, #0
800a4a2: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL);
800a4a4: 687b ldr r3, [r7, #4]
800a4a6: 2b00 cmp r3, #0
800a4a8: d106 bne.n 800a4b8 <tcp_rexmit_rto+0x1c>
800a4aa: 4b0a ldr r3, [pc, #40] ; (800a4d4 <tcp_rexmit_rto+0x38>)
800a4ac: f240 62ad movw r2, #1709 ; 0x6ad
800a4b0: 4909 ldr r1, [pc, #36] ; (800a4d8 <tcp_rexmit_rto+0x3c>)
800a4b2: 480a ldr r0, [pc, #40] ; (800a4dc <tcp_rexmit_rto+0x40>)
800a4b4: f005 fd00 bl 800feb8 <printf>
if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) {
800a4b8: 6878 ldr r0, [r7, #4]
800a4ba: f7ff ff57 bl 800a36c <tcp_rexmit_rto_prepare>
800a4be: 4603 mov r3, r0
800a4c0: 2b00 cmp r3, #0
800a4c2: d102 bne.n 800a4ca <tcp_rexmit_rto+0x2e>
tcp_rexmit_rto_commit(pcb);
800a4c4: 6878 ldr r0, [r7, #4]
800a4c6: f7ff ffc1 bl 800a44c <tcp_rexmit_rto_commit>
}
}
800a4ca: bf00 nop
800a4cc: 3708 adds r7, #8
800a4ce: 46bd mov sp, r7
800a4d0: bd80 pop {r7, pc}
800a4d2: bf00 nop
800a4d4: 0801608c .word 0x0801608c
800a4d8: 08016710 .word 0x08016710
800a4dc: 080160e0 .word 0x080160e0
0800a4e0 <tcp_rexmit>:
*
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
*/
err_t
tcp_rexmit(struct tcp_pcb *pcb)
{
800a4e0: b590 push {r4, r7, lr}
800a4e2: b085 sub sp, #20
800a4e4: af00 add r7, sp, #0
800a4e6: 6078 str r0, [r7, #4]
struct tcp_seg *seg;
struct tcp_seg **cur_seg;
LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL);
800a4e8: 687b ldr r3, [r7, #4]
800a4ea: 2b00 cmp r3, #0
800a4ec: d106 bne.n 800a4fc <tcp_rexmit+0x1c>
800a4ee: 4b2f ldr r3, [pc, #188] ; (800a5ac <tcp_rexmit+0xcc>)
800a4f0: f240 62c1 movw r2, #1729 ; 0x6c1
800a4f4: 492e ldr r1, [pc, #184] ; (800a5b0 <tcp_rexmit+0xd0>)
800a4f6: 482f ldr r0, [pc, #188] ; (800a5b4 <tcp_rexmit+0xd4>)
800a4f8: f005 fcde bl 800feb8 <printf>
if (pcb->unacked == NULL) {
800a4fc: 687b ldr r3, [r7, #4]
800a4fe: 6f1b ldr r3, [r3, #112] ; 0x70
800a500: 2b00 cmp r3, #0
800a502: d102 bne.n 800a50a <tcp_rexmit+0x2a>
return ERR_VAL;
800a504: f06f 0305 mvn.w r3, #5
800a508: e04c b.n 800a5a4 <tcp_rexmit+0xc4>
}
seg = pcb->unacked;
800a50a: 687b ldr r3, [r7, #4]
800a50c: 6f1b ldr r3, [r3, #112] ; 0x70
800a50e: 60bb str r3, [r7, #8]
/* Give up if the segment is still referenced by the netif driver
due to deferred transmission. */
if (tcp_output_segment_busy(seg)) {
800a510: 68b8 ldr r0, [r7, #8]
800a512: f7ff fe2d bl 800a170 <tcp_output_segment_busy>
800a516: 4603 mov r3, r0
800a518: 2b00 cmp r3, #0
800a51a: d002 beq.n 800a522 <tcp_rexmit+0x42>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n"));
return ERR_VAL;
800a51c: f06f 0305 mvn.w r3, #5
800a520: e040 b.n 800a5a4 <tcp_rexmit+0xc4>
}
/* Move the first unacked segment to the unsent queue */
/* Keep the unsent queue sorted. */
pcb->unacked = seg->next;
800a522: 68bb ldr r3, [r7, #8]
800a524: 681a ldr r2, [r3, #0]
800a526: 687b ldr r3, [r7, #4]
800a528: 671a str r2, [r3, #112] ; 0x70
cur_seg = &(pcb->unsent);
800a52a: 687b ldr r3, [r7, #4]
800a52c: 336c adds r3, #108 ; 0x6c
800a52e: 60fb str r3, [r7, #12]
while (*cur_seg &&
800a530: e002 b.n 800a538 <tcp_rexmit+0x58>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
cur_seg = &((*cur_seg)->next );
800a532: 68fb ldr r3, [r7, #12]
800a534: 681b ldr r3, [r3, #0]
800a536: 60fb str r3, [r7, #12]
while (*cur_seg &&
800a538: 68fb ldr r3, [r7, #12]
800a53a: 681b ldr r3, [r3, #0]
800a53c: 2b00 cmp r3, #0
800a53e: d011 beq.n 800a564 <tcp_rexmit+0x84>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
800a540: 68fb ldr r3, [r7, #12]
800a542: 681b ldr r3, [r3, #0]
800a544: 68db ldr r3, [r3, #12]
800a546: 685b ldr r3, [r3, #4]
800a548: 4618 mov r0, r3
800a54a: f7f9 fc44 bl 8003dd6 <lwip_htonl>
800a54e: 4604 mov r4, r0
800a550: 68bb ldr r3, [r7, #8]
800a552: 68db ldr r3, [r3, #12]
800a554: 685b ldr r3, [r3, #4]
800a556: 4618 mov r0, r3
800a558: f7f9 fc3d bl 8003dd6 <lwip_htonl>
800a55c: 4603 mov r3, r0
800a55e: 1ae3 subs r3, r4, r3
while (*cur_seg &&
800a560: 2b00 cmp r3, #0
800a562: dbe6 blt.n 800a532 <tcp_rexmit+0x52>
}
seg->next = *cur_seg;
800a564: 68fb ldr r3, [r7, #12]
800a566: 681a ldr r2, [r3, #0]
800a568: 68bb ldr r3, [r7, #8]
800a56a: 601a str r2, [r3, #0]
*cur_seg = seg;
800a56c: 68fb ldr r3, [r7, #12]
800a56e: 68ba ldr r2, [r7, #8]
800a570: 601a str r2, [r3, #0]
#if TCP_OVERSIZE
if (seg->next == NULL) {
800a572: 68bb ldr r3, [r7, #8]
800a574: 681b ldr r3, [r3, #0]
800a576: 2b00 cmp r3, #0
800a578: d103 bne.n 800a582 <tcp_rexmit+0xa2>
/* the retransmitted segment is last in unsent, so reset unsent_oversize */
pcb->unsent_oversize = 0;
800a57a: 687b ldr r3, [r7, #4]
800a57c: 2200 movs r2, #0
800a57e: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
}
#endif /* TCP_OVERSIZE */
if (pcb->nrtx < 0xFF) {
800a582: 687b ldr r3, [r7, #4]
800a584: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
800a588: 2bff cmp r3, #255 ; 0xff
800a58a: d007 beq.n 800a59c <tcp_rexmit+0xbc>
++pcb->nrtx;
800a58c: 687b ldr r3, [r7, #4]
800a58e: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
800a592: 3301 adds r3, #1
800a594: b2da uxtb r2, r3
800a596: 687b ldr r3, [r7, #4]
800a598: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Don't take any rtt measurements after retransmitting. */
pcb->rttest = 0;
800a59c: 687b ldr r3, [r7, #4]
800a59e: 2200 movs r2, #0
800a5a0: 635a str r2, [r3, #52] ; 0x34
/* Do the actual retransmission. */
MIB2_STATS_INC(mib2.tcpretranssegs);
/* No need to call tcp_output: we are always called from tcp_input()
and thus tcp_output directly returns. */
return ERR_OK;
800a5a2: 2300 movs r3, #0
}
800a5a4: 4618 mov r0, r3
800a5a6: 3714 adds r7, #20
800a5a8: 46bd mov sp, r7
800a5aa: bd90 pop {r4, r7, pc}
800a5ac: 0801608c .word 0x0801608c
800a5b0: 0801672c .word 0x0801672c
800a5b4: 080160e0 .word 0x080160e0
0800a5b8 <tcp_rexmit_fast>:
*
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
*/
void
tcp_rexmit_fast(struct tcp_pcb *pcb)
{
800a5b8: b580 push {r7, lr}
800a5ba: b082 sub sp, #8
800a5bc: af00 add r7, sp, #0
800a5be: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL);
800a5c0: 687b ldr r3, [r7, #4]
800a5c2: 2b00 cmp r3, #0
800a5c4: d106 bne.n 800a5d4 <tcp_rexmit_fast+0x1c>
800a5c6: 4b2a ldr r3, [pc, #168] ; (800a670 <tcp_rexmit_fast+0xb8>)
800a5c8: f240 62f9 movw r2, #1785 ; 0x6f9
800a5cc: 4929 ldr r1, [pc, #164] ; (800a674 <tcp_rexmit_fast+0xbc>)
800a5ce: 482a ldr r0, [pc, #168] ; (800a678 <tcp_rexmit_fast+0xc0>)
800a5d0: f005 fc72 bl 800feb8 <printf>
if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) {
800a5d4: 687b ldr r3, [r7, #4]
800a5d6: 6f1b ldr r3, [r3, #112] ; 0x70
800a5d8: 2b00 cmp r3, #0
800a5da: d044 beq.n 800a666 <tcp_rexmit_fast+0xae>
800a5dc: 687b ldr r3, [r7, #4]
800a5de: 8b5b ldrh r3, [r3, #26]
800a5e0: f003 0304 and.w r3, r3, #4
800a5e4: 2b00 cmp r3, #0
800a5e6: d13e bne.n 800a666 <tcp_rexmit_fast+0xae>
LWIP_DEBUGF(TCP_FR_DEBUG,
("tcp_receive: dupacks %"U16_F" (%"U32_F
"), fast retransmit %"U32_F"\n",
(u16_t)pcb->dupacks, pcb->lastack,
lwip_ntohl(pcb->unacked->tcphdr->seqno)));
if (tcp_rexmit(pcb) == ERR_OK) {
800a5e8: 6878 ldr r0, [r7, #4]
800a5ea: f7ff ff79 bl 800a4e0 <tcp_rexmit>
800a5ee: 4603 mov r3, r0
800a5f0: 2b00 cmp r3, #0
800a5f2: d138 bne.n 800a666 <tcp_rexmit_fast+0xae>
/* Set ssthresh to half of the minimum of the current
* cwnd and the advertised window */
pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2;
800a5f4: 687b ldr r3, [r7, #4]
800a5f6: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
800a5fa: 687b ldr r3, [r7, #4]
800a5fc: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
800a600: 4293 cmp r3, r2
800a602: bf28 it cs
800a604: 4613 movcs r3, r2
800a606: b29b uxth r3, r3
800a608: 0fda lsrs r2, r3, #31
800a60a: 4413 add r3, r2
800a60c: 105b asrs r3, r3, #1
800a60e: b29a uxth r2, r3
800a610: 687b ldr r3, [r7, #4]
800a612: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
/* The minimum value for ssthresh should be 2 MSS */
if (pcb->ssthresh < (2U * pcb->mss)) {
800a616: 687b ldr r3, [r7, #4]
800a618: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
800a61c: 461a mov r2, r3
800a61e: 687b ldr r3, [r7, #4]
800a620: 8e5b ldrh r3, [r3, #50] ; 0x32
800a622: 005b lsls r3, r3, #1
800a624: 429a cmp r2, r3
800a626: d206 bcs.n 800a636 <tcp_rexmit_fast+0x7e>
LWIP_DEBUGF(TCP_FR_DEBUG,
("tcp_receive: The minimum value for ssthresh %"TCPWNDSIZE_F
" should be min 2 mss %"U16_F"...\n",
pcb->ssthresh, (u16_t)(2 * pcb->mss)));
pcb->ssthresh = 2 * pcb->mss;
800a628: 687b ldr r3, [r7, #4]
800a62a: 8e5b ldrh r3, [r3, #50] ; 0x32
800a62c: 005b lsls r3, r3, #1
800a62e: b29a uxth r2, r3
800a630: 687b ldr r3, [r7, #4]
800a632: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
}
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
800a636: 687b ldr r3, [r7, #4]
800a638: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
800a63c: 687b ldr r3, [r7, #4]
800a63e: 8e5b ldrh r3, [r3, #50] ; 0x32
800a640: 4619 mov r1, r3
800a642: 0049 lsls r1, r1, #1
800a644: 440b add r3, r1
800a646: b29b uxth r3, r3
800a648: 4413 add r3, r2
800a64a: b29a uxth r2, r3
800a64c: 687b ldr r3, [r7, #4]
800a64e: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
tcp_set_flags(pcb, TF_INFR);
800a652: 687b ldr r3, [r7, #4]
800a654: 8b5b ldrh r3, [r3, #26]
800a656: f043 0304 orr.w r3, r3, #4
800a65a: b29a uxth r2, r3
800a65c: 687b ldr r3, [r7, #4]
800a65e: 835a strh r2, [r3, #26]
/* Reset the retransmission timer to prevent immediate rto retransmissions */
pcb->rtime = 0;
800a660: 687b ldr r3, [r7, #4]
800a662: 2200 movs r2, #0
800a664: 861a strh r2, [r3, #48] ; 0x30
}
}
}
800a666: bf00 nop
800a668: 3708 adds r7, #8
800a66a: 46bd mov sp, r7
800a66c: bd80 pop {r7, pc}
800a66e: bf00 nop
800a670: 0801608c .word 0x0801608c
800a674: 08016744 .word 0x08016744
800a678: 080160e0 .word 0x080160e0
0800a67c <tcp_output_alloc_header_common>:
static struct pbuf *
tcp_output_alloc_header_common(u32_t ackno, u16_t optlen, u16_t datalen,
u32_t seqno_be /* already in network byte order */,
u16_t src_port, u16_t dst_port, u8_t flags, u16_t wnd)
{
800a67c: b580 push {r7, lr}
800a67e: b086 sub sp, #24
800a680: af00 add r7, sp, #0
800a682: 60f8 str r0, [r7, #12]
800a684: 607b str r3, [r7, #4]
800a686: 460b mov r3, r1
800a688: 817b strh r3, [r7, #10]
800a68a: 4613 mov r3, r2
800a68c: 813b strh r3, [r7, #8]
struct tcp_hdr *tcphdr;
struct pbuf *p;
p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM);
800a68e: 897a ldrh r2, [r7, #10]
800a690: 893b ldrh r3, [r7, #8]
800a692: 4413 add r3, r2
800a694: b29b uxth r3, r3
800a696: 3314 adds r3, #20
800a698: b29b uxth r3, r3
800a69a: f44f 7220 mov.w r2, #640 ; 0x280
800a69e: 4619 mov r1, r3
800a6a0: 2022 movs r0, #34 ; 0x22
800a6a2: f7fa fc09 bl 8004eb8 <pbuf_alloc>
800a6a6: 6178 str r0, [r7, #20]
if (p != NULL) {
800a6a8: 697b ldr r3, [r7, #20]
800a6aa: 2b00 cmp r3, #0
800a6ac: d04d beq.n 800a74a <tcp_output_alloc_header_common+0xce>
LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
800a6ae: 897b ldrh r3, [r7, #10]
800a6b0: 3313 adds r3, #19
800a6b2: 697a ldr r2, [r7, #20]
800a6b4: 8952 ldrh r2, [r2, #10]
800a6b6: 4293 cmp r3, r2
800a6b8: db06 blt.n 800a6c8 <tcp_output_alloc_header_common+0x4c>
800a6ba: 4b26 ldr r3, [pc, #152] ; (800a754 <tcp_output_alloc_header_common+0xd8>)
800a6bc: f240 7223 movw r2, #1827 ; 0x723
800a6c0: 4925 ldr r1, [pc, #148] ; (800a758 <tcp_output_alloc_header_common+0xdc>)
800a6c2: 4826 ldr r0, [pc, #152] ; (800a75c <tcp_output_alloc_header_common+0xe0>)
800a6c4: f005 fbf8 bl 800feb8 <printf>
(p->len >= TCP_HLEN + optlen));
tcphdr = (struct tcp_hdr *)p->payload;
800a6c8: 697b ldr r3, [r7, #20]
800a6ca: 685b ldr r3, [r3, #4]
800a6cc: 613b str r3, [r7, #16]
tcphdr->src = lwip_htons(src_port);
800a6ce: 8c3b ldrh r3, [r7, #32]
800a6d0: 4618 mov r0, r3
800a6d2: f7f9 fb6b bl 8003dac <lwip_htons>
800a6d6: 4603 mov r3, r0
800a6d8: 461a mov r2, r3
800a6da: 693b ldr r3, [r7, #16]
800a6dc: 801a strh r2, [r3, #0]
tcphdr->dest = lwip_htons(dst_port);
800a6de: 8cbb ldrh r3, [r7, #36] ; 0x24
800a6e0: 4618 mov r0, r3
800a6e2: f7f9 fb63 bl 8003dac <lwip_htons>
800a6e6: 4603 mov r3, r0
800a6e8: 461a mov r2, r3
800a6ea: 693b ldr r3, [r7, #16]
800a6ec: 805a strh r2, [r3, #2]
tcphdr->seqno = seqno_be;
800a6ee: 693b ldr r3, [r7, #16]
800a6f0: 687a ldr r2, [r7, #4]
800a6f2: 605a str r2, [r3, #4]
tcphdr->ackno = lwip_htonl(ackno);
800a6f4: 68f8 ldr r0, [r7, #12]
800a6f6: f7f9 fb6e bl 8003dd6 <lwip_htonl>
800a6fa: 4602 mov r2, r0
800a6fc: 693b ldr r3, [r7, #16]
800a6fe: 609a str r2, [r3, #8]
TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags);
800a700: 897b ldrh r3, [r7, #10]
800a702: 089b lsrs r3, r3, #2
800a704: b29b uxth r3, r3
800a706: 3305 adds r3, #5
800a708: b29b uxth r3, r3
800a70a: 031b lsls r3, r3, #12
800a70c: b29a uxth r2, r3
800a70e: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
800a712: b29b uxth r3, r3
800a714: 4313 orrs r3, r2
800a716: b29b uxth r3, r3
800a718: 4618 mov r0, r3
800a71a: f7f9 fb47 bl 8003dac <lwip_htons>
800a71e: 4603 mov r3, r0
800a720: 461a mov r2, r3
800a722: 693b ldr r3, [r7, #16]
800a724: 819a strh r2, [r3, #12]
tcphdr->wnd = lwip_htons(wnd);
800a726: 8dbb ldrh r3, [r7, #44] ; 0x2c
800a728: 4618 mov r0, r3
800a72a: f7f9 fb3f bl 8003dac <lwip_htons>
800a72e: 4603 mov r3, r0
800a730: 461a mov r2, r3
800a732: 693b ldr r3, [r7, #16]
800a734: 81da strh r2, [r3, #14]
tcphdr->chksum = 0;
800a736: 693b ldr r3, [r7, #16]
800a738: 2200 movs r2, #0
800a73a: 741a strb r2, [r3, #16]
800a73c: 2200 movs r2, #0
800a73e: 745a strb r2, [r3, #17]
tcphdr->urgp = 0;
800a740: 693b ldr r3, [r7, #16]
800a742: 2200 movs r2, #0
800a744: 749a strb r2, [r3, #18]
800a746: 2200 movs r2, #0
800a748: 74da strb r2, [r3, #19]
}
return p;
800a74a: 697b ldr r3, [r7, #20]
}
800a74c: 4618 mov r0, r3
800a74e: 3718 adds r7, #24
800a750: 46bd mov sp, r7
800a752: bd80 pop {r7, pc}
800a754: 0801608c .word 0x0801608c
800a758: 08016764 .word 0x08016764
800a75c: 080160e0 .word 0x080160e0
0800a760 <tcp_output_alloc_header>:
* @return pbuf with p->payload being the tcp_hdr
*/
static struct pbuf *
tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen,
u32_t seqno_be /* already in network byte order */)
{
800a760: b5b0 push {r4, r5, r7, lr}
800a762: b08a sub sp, #40 ; 0x28
800a764: af04 add r7, sp, #16
800a766: 60f8 str r0, [r7, #12]
800a768: 607b str r3, [r7, #4]
800a76a: 460b mov r3, r1
800a76c: 817b strh r3, [r7, #10]
800a76e: 4613 mov r3, r2
800a770: 813b strh r3, [r7, #8]
struct pbuf *p;
LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL);
800a772: 68fb ldr r3, [r7, #12]
800a774: 2b00 cmp r3, #0
800a776: d106 bne.n 800a786 <tcp_output_alloc_header+0x26>
800a778: 4b15 ldr r3, [pc, #84] ; (800a7d0 <tcp_output_alloc_header+0x70>)
800a77a: f240 7242 movw r2, #1858 ; 0x742
800a77e: 4915 ldr r1, [pc, #84] ; (800a7d4 <tcp_output_alloc_header+0x74>)
800a780: 4815 ldr r0, [pc, #84] ; (800a7d8 <tcp_output_alloc_header+0x78>)
800a782: f005 fb99 bl 800feb8 <printf>
p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen,
800a786: 68fb ldr r3, [r7, #12]
800a788: 6a58 ldr r0, [r3, #36] ; 0x24
800a78a: 68fb ldr r3, [r7, #12]
800a78c: 8adb ldrh r3, [r3, #22]
800a78e: 68fa ldr r2, [r7, #12]
800a790: 8b12 ldrh r2, [r2, #24]
800a792: 68f9 ldr r1, [r7, #12]
800a794: 8d49 ldrh r1, [r1, #42] ; 0x2a
800a796: 893d ldrh r5, [r7, #8]
800a798: 897c ldrh r4, [r7, #10]
800a79a: 9103 str r1, [sp, #12]
800a79c: 2110 movs r1, #16
800a79e: 9102 str r1, [sp, #8]
800a7a0: 9201 str r2, [sp, #4]
800a7a2: 9300 str r3, [sp, #0]
800a7a4: 687b ldr r3, [r7, #4]
800a7a6: 462a mov r2, r5
800a7a8: 4621 mov r1, r4
800a7aa: f7ff ff67 bl 800a67c <tcp_output_alloc_header_common>
800a7ae: 6178 str r0, [r7, #20]
seqno_be, pcb->local_port, pcb->remote_port, TCP_ACK,
TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd)));
if (p != NULL) {
800a7b0: 697b ldr r3, [r7, #20]
800a7b2: 2b00 cmp r3, #0
800a7b4: d006 beq.n 800a7c4 <tcp_output_alloc_header+0x64>
/* If we're sending a packet, update the announced right window edge */
pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
800a7b6: 68fb ldr r3, [r7, #12]
800a7b8: 6a5b ldr r3, [r3, #36] ; 0x24
800a7ba: 68fa ldr r2, [r7, #12]
800a7bc: 8d52 ldrh r2, [r2, #42] ; 0x2a
800a7be: 441a add r2, r3
800a7c0: 68fb ldr r3, [r7, #12]
800a7c2: 62da str r2, [r3, #44] ; 0x2c
}
return p;
800a7c4: 697b ldr r3, [r7, #20]
}
800a7c6: 4618 mov r0, r3
800a7c8: 3718 adds r7, #24
800a7ca: 46bd mov sp, r7
800a7cc: bdb0 pop {r4, r5, r7, pc}
800a7ce: bf00 nop
800a7d0: 0801608c .word 0x0801608c
800a7d4: 08016794 .word 0x08016794
800a7d8: 080160e0 .word 0x080160e0
0800a7dc <tcp_output_fill_options>:
/* Fill in options for control segments */
static void
tcp_output_fill_options(const struct tcp_pcb *pcb, struct pbuf *p, u8_t optflags, u8_t num_sacks)
{
800a7dc: b580 push {r7, lr}
800a7de: b088 sub sp, #32
800a7e0: af00 add r7, sp, #0
800a7e2: 60f8 str r0, [r7, #12]
800a7e4: 60b9 str r1, [r7, #8]
800a7e6: 4611 mov r1, r2
800a7e8: 461a mov r2, r3
800a7ea: 460b mov r3, r1
800a7ec: 71fb strb r3, [r7, #7]
800a7ee: 4613 mov r3, r2
800a7f0: 71bb strb r3, [r7, #6]
struct tcp_hdr *tcphdr;
u32_t *opts;
u16_t sacks_len = 0;
800a7f2: 2300 movs r3, #0
800a7f4: 83fb strh r3, [r7, #30]
LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL);
800a7f6: 68bb ldr r3, [r7, #8]
800a7f8: 2b00 cmp r3, #0
800a7fa: d106 bne.n 800a80a <tcp_output_fill_options+0x2e>
800a7fc: 4b13 ldr r3, [pc, #76] ; (800a84c <tcp_output_fill_options+0x70>)
800a7fe: f240 7256 movw r2, #1878 ; 0x756
800a802: 4913 ldr r1, [pc, #76] ; (800a850 <tcp_output_fill_options+0x74>)
800a804: 4813 ldr r0, [pc, #76] ; (800a854 <tcp_output_fill_options+0x78>)
800a806: f005 fb57 bl 800feb8 <printf>
tcphdr = (struct tcp_hdr *)p->payload;
800a80a: 68bb ldr r3, [r7, #8]
800a80c: 685b ldr r3, [r3, #4]
800a80e: 61bb str r3, [r7, #24]
opts = (u32_t *)(void *)(tcphdr + 1);
800a810: 69bb ldr r3, [r7, #24]
800a812: 3314 adds r3, #20
800a814: 617b str r3, [r7, #20]
opts = LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(p, tcphdr, pcb, opts);
#endif
LWIP_UNUSED_ARG(pcb);
LWIP_UNUSED_ARG(sacks_len);
LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(tcphdr + 1)) + sacks_len * 4 + LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb));
800a816: 69bb ldr r3, [r7, #24]
800a818: f103 0214 add.w r2, r3, #20
800a81c: 8bfb ldrh r3, [r7, #30]
800a81e: 009b lsls r3, r3, #2
800a820: 4619 mov r1, r3
800a822: 79fb ldrb r3, [r7, #7]
800a824: 009b lsls r3, r3, #2
800a826: f003 0304 and.w r3, r3, #4
800a82a: 440b add r3, r1
800a82c: 4413 add r3, r2
800a82e: 697a ldr r2, [r7, #20]
800a830: 429a cmp r2, r3
800a832: d006 beq.n 800a842 <tcp_output_fill_options+0x66>
800a834: 4b05 ldr r3, [pc, #20] ; (800a84c <tcp_output_fill_options+0x70>)
800a836: f240 7275 movw r2, #1909 ; 0x775
800a83a: 4907 ldr r1, [pc, #28] ; (800a858 <tcp_output_fill_options+0x7c>)
800a83c: 4805 ldr r0, [pc, #20] ; (800a854 <tcp_output_fill_options+0x78>)
800a83e: f005 fb3b bl 800feb8 <printf>
LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */
LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */
}
800a842: bf00 nop
800a844: 3720 adds r7, #32
800a846: 46bd mov sp, r7
800a848: bd80 pop {r7, pc}
800a84a: bf00 nop
800a84c: 0801608c .word 0x0801608c
800a850: 080167bc .word 0x080167bc
800a854: 080160e0 .word 0x080160e0
800a858: 080166b4 .word 0x080166b4
0800a85c <tcp_output_control_segment>:
* header checksum and calling ip_output_if while handling netif hints and stats.
*/
static err_t
tcp_output_control_segment(const struct tcp_pcb *pcb, struct pbuf *p,
const ip_addr_t *src, const ip_addr_t *dst)
{
800a85c: b580 push {r7, lr}
800a85e: b08a sub sp, #40 ; 0x28
800a860: af04 add r7, sp, #16
800a862: 60f8 str r0, [r7, #12]
800a864: 60b9 str r1, [r7, #8]
800a866: 607a str r2, [r7, #4]
800a868: 603b str r3, [r7, #0]
err_t err;
struct netif *netif;
LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL);
800a86a: 68bb ldr r3, [r7, #8]
800a86c: 2b00 cmp r3, #0
800a86e: d106 bne.n 800a87e <tcp_output_control_segment+0x22>
800a870: 4b1c ldr r3, [pc, #112] ; (800a8e4 <tcp_output_control_segment+0x88>)
800a872: f240 7287 movw r2, #1927 ; 0x787
800a876: 491c ldr r1, [pc, #112] ; (800a8e8 <tcp_output_control_segment+0x8c>)
800a878: 481c ldr r0, [pc, #112] ; (800a8ec <tcp_output_control_segment+0x90>)
800a87a: f005 fb1d bl 800feb8 <printf>
netif = tcp_route(pcb, src, dst);
800a87e: 683a ldr r2, [r7, #0]
800a880: 6879 ldr r1, [r7, #4]
800a882: 68f8 ldr r0, [r7, #12]
800a884: f7fe ff40 bl 8009708 <tcp_route>
800a888: 6138 str r0, [r7, #16]
if (netif == NULL) {
800a88a: 693b ldr r3, [r7, #16]
800a88c: 2b00 cmp r3, #0
800a88e: d102 bne.n 800a896 <tcp_output_control_segment+0x3a>
err = ERR_RTE;
800a890: 23fc movs r3, #252 ; 0xfc
800a892: 75fb strb r3, [r7, #23]
800a894: e01c b.n 800a8d0 <tcp_output_control_segment+0x74>
struct tcp_hdr *tcphdr = (struct tcp_hdr *)p->payload;
tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len,
src, dst);
}
#endif
if (pcb != NULL) {
800a896: 68fb ldr r3, [r7, #12]
800a898: 2b00 cmp r3, #0
800a89a: d006 beq.n 800a8aa <tcp_output_control_segment+0x4e>
NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints)));
ttl = pcb->ttl;
800a89c: 68fb ldr r3, [r7, #12]
800a89e: 7adb ldrb r3, [r3, #11]
800a8a0: 75bb strb r3, [r7, #22]
tos = pcb->tos;
800a8a2: 68fb ldr r3, [r7, #12]
800a8a4: 7a9b ldrb r3, [r3, #10]
800a8a6: 757b strb r3, [r7, #21]
800a8a8: e003 b.n 800a8b2 <tcp_output_control_segment+0x56>
} else {
/* Send output with hardcoded TTL/HL since we have no access to the pcb */
ttl = TCP_TTL;
800a8aa: 23ff movs r3, #255 ; 0xff
800a8ac: 75bb strb r3, [r7, #22]
tos = 0;
800a8ae: 2300 movs r3, #0
800a8b0: 757b strb r3, [r7, #21]
}
TCP_STATS_INC(tcp.xmit);
err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif);
800a8b2: 7dba ldrb r2, [r7, #22]
800a8b4: 693b ldr r3, [r7, #16]
800a8b6: 9302 str r3, [sp, #8]
800a8b8: 2306 movs r3, #6
800a8ba: 9301 str r3, [sp, #4]
800a8bc: 7d7b ldrb r3, [r7, #21]
800a8be: 9300 str r3, [sp, #0]
800a8c0: 4613 mov r3, r2
800a8c2: 683a ldr r2, [r7, #0]
800a8c4: 6879 ldr r1, [r7, #4]
800a8c6: 68b8 ldr r0, [r7, #8]
800a8c8: f004 f926 bl 800eb18 <ip4_output_if>
800a8cc: 4603 mov r3, r0
800a8ce: 75fb strb r3, [r7, #23]
NETIF_RESET_HINTS(netif);
}
pbuf_free(p);
800a8d0: 68b8 ldr r0, [r7, #8]
800a8d2: f7fa fdd5 bl 8005480 <pbuf_free>
return err;
800a8d6: f997 3017 ldrsb.w r3, [r7, #23]
}
800a8da: 4618 mov r0, r3
800a8dc: 3718 adds r7, #24
800a8de: 46bd mov sp, r7
800a8e0: bd80 pop {r7, pc}
800a8e2: bf00 nop
800a8e4: 0801608c .word 0x0801608c
800a8e8: 080167e4 .word 0x080167e4
800a8ec: 080160e0 .word 0x080160e0
0800a8f0 <tcp_rst>:
*/
void
tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno,
const ip_addr_t *local_ip, const ip_addr_t *remote_ip,
u16_t local_port, u16_t remote_port)
{
800a8f0: b590 push {r4, r7, lr}
800a8f2: b08b sub sp, #44 ; 0x2c
800a8f4: af04 add r7, sp, #16
800a8f6: 60f8 str r0, [r7, #12]
800a8f8: 60b9 str r1, [r7, #8]
800a8fa: 607a str r2, [r7, #4]
800a8fc: 603b str r3, [r7, #0]
struct pbuf *p;
u16_t wnd;
u8_t optlen;
LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
800a8fe: 683b ldr r3, [r7, #0]
800a900: 2b00 cmp r3, #0
800a902: d106 bne.n 800a912 <tcp_rst+0x22>
800a904: 4b1f ldr r3, [pc, #124] ; (800a984 <tcp_rst+0x94>)
800a906: f240 72c4 movw r2, #1988 ; 0x7c4
800a90a: 491f ldr r1, [pc, #124] ; (800a988 <tcp_rst+0x98>)
800a90c: 481f ldr r0, [pc, #124] ; (800a98c <tcp_rst+0x9c>)
800a90e: f005 fad3 bl 800feb8 <printf>
LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
800a912: 6abb ldr r3, [r7, #40] ; 0x28
800a914: 2b00 cmp r3, #0
800a916: d106 bne.n 800a926 <tcp_rst+0x36>
800a918: 4b1a ldr r3, [pc, #104] ; (800a984 <tcp_rst+0x94>)
800a91a: f240 72c5 movw r2, #1989 ; 0x7c5
800a91e: 491c ldr r1, [pc, #112] ; (800a990 <tcp_rst+0xa0>)
800a920: 481a ldr r0, [pc, #104] ; (800a98c <tcp_rst+0x9c>)
800a922: f005 fac9 bl 800feb8 <printf>
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
800a926: 2300 movs r3, #0
800a928: 75fb strb r3, [r7, #23]
#if LWIP_WND_SCALE
wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF));
#else
wnd = PP_HTONS(TCP_WND);
800a92a: f246 0308 movw r3, #24584 ; 0x6008
800a92e: 82bb strh r3, [r7, #20]
#endif
p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port,
800a930: 7dfb ldrb r3, [r7, #23]
800a932: b29c uxth r4, r3
800a934: 68b8 ldr r0, [r7, #8]
800a936: f7f9 fa4e bl 8003dd6 <lwip_htonl>
800a93a: 4602 mov r2, r0
800a93c: 8abb ldrh r3, [r7, #20]
800a93e: 9303 str r3, [sp, #12]
800a940: 2314 movs r3, #20
800a942: 9302 str r3, [sp, #8]
800a944: 8e3b ldrh r3, [r7, #48] ; 0x30
800a946: 9301 str r3, [sp, #4]
800a948: 8dbb ldrh r3, [r7, #44] ; 0x2c
800a94a: 9300 str r3, [sp, #0]
800a94c: 4613 mov r3, r2
800a94e: 2200 movs r2, #0
800a950: 4621 mov r1, r4
800a952: 6878 ldr r0, [r7, #4]
800a954: f7ff fe92 bl 800a67c <tcp_output_alloc_header_common>
800a958: 6138 str r0, [r7, #16]
remote_port, TCP_RST | TCP_ACK, wnd);
if (p == NULL) {
800a95a: 693b ldr r3, [r7, #16]
800a95c: 2b00 cmp r3, #0
800a95e: d00c beq.n 800a97a <tcp_rst+0x8a>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n"));
return;
}
tcp_output_fill_options(pcb, p, 0, optlen);
800a960: 7dfb ldrb r3, [r7, #23]
800a962: 2200 movs r2, #0
800a964: 6939 ldr r1, [r7, #16]
800a966: 68f8 ldr r0, [r7, #12]
800a968: f7ff ff38 bl 800a7dc <tcp_output_fill_options>
MIB2_STATS_INC(mib2.tcpoutrsts);
tcp_output_control_segment(pcb, p, local_ip, remote_ip);
800a96c: 6abb ldr r3, [r7, #40] ; 0x28
800a96e: 683a ldr r2, [r7, #0]
800a970: 6939 ldr r1, [r7, #16]
800a972: 68f8 ldr r0, [r7, #12]
800a974: f7ff ff72 bl 800a85c <tcp_output_control_segment>
800a978: e000 b.n 800a97c <tcp_rst+0x8c>
return;
800a97a: bf00 nop
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno));
}
800a97c: 371c adds r7, #28
800a97e: 46bd mov sp, r7
800a980: bd90 pop {r4, r7, pc}
800a982: bf00 nop
800a984: 0801608c .word 0x0801608c
800a988: 08016810 .word 0x08016810
800a98c: 080160e0 .word 0x080160e0
800a990: 0801682c .word 0x0801682c
0800a994 <tcp_send_empty_ack>:
*
* @param pcb Protocol control block for the TCP connection to send the ACK
*/
err_t
tcp_send_empty_ack(struct tcp_pcb *pcb)
{
800a994: b590 push {r4, r7, lr}
800a996: b087 sub sp, #28
800a998: af00 add r7, sp, #0
800a99a: 6078 str r0, [r7, #4]
err_t err;
struct pbuf *p;
u8_t optlen, optflags = 0;
800a99c: 2300 movs r3, #0
800a99e: 75fb strb r3, [r7, #23]
u8_t num_sacks = 0;
800a9a0: 2300 movs r3, #0
800a9a2: 75bb strb r3, [r7, #22]
LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL);
800a9a4: 687b ldr r3, [r7, #4]
800a9a6: 2b00 cmp r3, #0
800a9a8: d106 bne.n 800a9b8 <tcp_send_empty_ack+0x24>
800a9aa: 4b28 ldr r3, [pc, #160] ; (800aa4c <tcp_send_empty_ack+0xb8>)
800a9ac: f240 72ea movw r2, #2026 ; 0x7ea
800a9b0: 4927 ldr r1, [pc, #156] ; (800aa50 <tcp_send_empty_ack+0xbc>)
800a9b2: 4828 ldr r0, [pc, #160] ; (800aa54 <tcp_send_empty_ack+0xc0>)
800a9b4: f005 fa80 bl 800feb8 <printf>
#if LWIP_TCP_TIMESTAMPS
if (pcb->flags & TF_TIMESTAMP) {
optflags = TF_SEG_OPTS_TS;
}
#endif
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
800a9b8: 7dfb ldrb r3, [r7, #23]
800a9ba: 009b lsls r3, r3, #2
800a9bc: b2db uxtb r3, r3
800a9be: f003 0304 and.w r3, r3, #4
800a9c2: 757b strb r3, [r7, #21]
if ((num_sacks = tcp_get_num_sacks(pcb, optlen)) > 0) {
optlen += 4 + num_sacks * 8; /* 4 bytes for header (including 2*NOP), plus 8B for each SACK */
}
#endif
p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt));
800a9c4: 7d7b ldrb r3, [r7, #21]
800a9c6: b29c uxth r4, r3
800a9c8: 687b ldr r3, [r7, #4]
800a9ca: 6d1b ldr r3, [r3, #80] ; 0x50
800a9cc: 4618 mov r0, r3
800a9ce: f7f9 fa02 bl 8003dd6 <lwip_htonl>
800a9d2: 4603 mov r3, r0
800a9d4: 2200 movs r2, #0
800a9d6: 4621 mov r1, r4
800a9d8: 6878 ldr r0, [r7, #4]
800a9da: f7ff fec1 bl 800a760 <tcp_output_alloc_header>
800a9de: 6138 str r0, [r7, #16]
if (p == NULL) {
800a9e0: 693b ldr r3, [r7, #16]
800a9e2: 2b00 cmp r3, #0
800a9e4: d109 bne.n 800a9fa <tcp_send_empty_ack+0x66>
/* let tcp_fasttmr retry sending this ACK */
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
800a9e6: 687b ldr r3, [r7, #4]
800a9e8: 8b5b ldrh r3, [r3, #26]
800a9ea: f043 0303 orr.w r3, r3, #3
800a9ee: b29a uxth r2, r3
800a9f0: 687b ldr r3, [r7, #4]
800a9f2: 835a strh r2, [r3, #26]
LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n"));
return ERR_BUF;
800a9f4: f06f 0301 mvn.w r3, #1
800a9f8: e023 b.n 800aa42 <tcp_send_empty_ack+0xae>
}
tcp_output_fill_options(pcb, p, optflags, num_sacks);
800a9fa: 7dbb ldrb r3, [r7, #22]
800a9fc: 7dfa ldrb r2, [r7, #23]
800a9fe: 6939 ldr r1, [r7, #16]
800aa00: 6878 ldr r0, [r7, #4]
800aa02: f7ff feeb bl 800a7dc <tcp_output_fill_options>
pcb->ts_lastacksent = pcb->rcv_nxt;
#endif
LWIP_DEBUGF(TCP_OUTPUT_DEBUG,
("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt));
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
800aa06: 687a ldr r2, [r7, #4]
800aa08: 687b ldr r3, [r7, #4]
800aa0a: 3304 adds r3, #4
800aa0c: 6939 ldr r1, [r7, #16]
800aa0e: 6878 ldr r0, [r7, #4]
800aa10: f7ff ff24 bl 800a85c <tcp_output_control_segment>
800aa14: 4603 mov r3, r0
800aa16: 73fb strb r3, [r7, #15]
if (err != ERR_OK) {
800aa18: f997 300f ldrsb.w r3, [r7, #15]
800aa1c: 2b00 cmp r3, #0
800aa1e: d007 beq.n 800aa30 <tcp_send_empty_ack+0x9c>
/* let tcp_fasttmr retry sending this ACK */
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
800aa20: 687b ldr r3, [r7, #4]
800aa22: 8b5b ldrh r3, [r3, #26]
800aa24: f043 0303 orr.w r3, r3, #3
800aa28: b29a uxth r2, r3
800aa2a: 687b ldr r3, [r7, #4]
800aa2c: 835a strh r2, [r3, #26]
800aa2e: e006 b.n 800aa3e <tcp_send_empty_ack+0xaa>
} else {
/* remove ACK flags from the PCB, as we sent an empty ACK now */
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
800aa30: 687b ldr r3, [r7, #4]
800aa32: 8b5b ldrh r3, [r3, #26]
800aa34: f023 0303 bic.w r3, r3, #3
800aa38: b29a uxth r2, r3
800aa3a: 687b ldr r3, [r7, #4]
800aa3c: 835a strh r2, [r3, #26]
}
return err;
800aa3e: f997 300f ldrsb.w r3, [r7, #15]
}
800aa42: 4618 mov r0, r3
800aa44: 371c adds r7, #28
800aa46: 46bd mov sp, r7
800aa48: bd90 pop {r4, r7, pc}
800aa4a: bf00 nop
800aa4c: 0801608c .word 0x0801608c
800aa50: 08016848 .word 0x08016848
800aa54: 080160e0 .word 0x080160e0
0800aa58 <tcp_keepalive>:
*
* @param pcb the tcp_pcb for which to send a keepalive packet
*/
err_t
tcp_keepalive(struct tcp_pcb *pcb)
{
800aa58: b590 push {r4, r7, lr}
800aa5a: b087 sub sp, #28
800aa5c: af00 add r7, sp, #0
800aa5e: 6078 str r0, [r7, #4]
err_t err;
struct pbuf *p;
u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
800aa60: 2300 movs r3, #0
800aa62: 75fb strb r3, [r7, #23]
LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL);
800aa64: 687b ldr r3, [r7, #4]
800aa66: 2b00 cmp r3, #0
800aa68: d106 bne.n 800aa78 <tcp_keepalive+0x20>
800aa6a: 4b18 ldr r3, [pc, #96] ; (800aacc <tcp_keepalive+0x74>)
800aa6c: f640 0224 movw r2, #2084 ; 0x824
800aa70: 4917 ldr r1, [pc, #92] ; (800aad0 <tcp_keepalive+0x78>)
800aa72: 4818 ldr r0, [pc, #96] ; (800aad4 <tcp_keepalive+0x7c>)
800aa74: f005 fa20 bl 800feb8 <printf>
LWIP_DEBUGF(TCP_DEBUG, ("\n"));
LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %"U32_F" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent));
p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt - 1));
800aa78: 7dfb ldrb r3, [r7, #23]
800aa7a: b29c uxth r4, r3
800aa7c: 687b ldr r3, [r7, #4]
800aa7e: 6d1b ldr r3, [r3, #80] ; 0x50
800aa80: 3b01 subs r3, #1
800aa82: 4618 mov r0, r3
800aa84: f7f9 f9a7 bl 8003dd6 <lwip_htonl>
800aa88: 4603 mov r3, r0
800aa8a: 2200 movs r2, #0
800aa8c: 4621 mov r1, r4
800aa8e: 6878 ldr r0, [r7, #4]
800aa90: f7ff fe66 bl 800a760 <tcp_output_alloc_header>
800aa94: 6138 str r0, [r7, #16]
if (p == NULL) {
800aa96: 693b ldr r3, [r7, #16]
800aa98: 2b00 cmp r3, #0
800aa9a: d102 bne.n 800aaa2 <tcp_keepalive+0x4a>
LWIP_DEBUGF(TCP_DEBUG,
("tcp_keepalive: could not allocate memory for pbuf\n"));
return ERR_MEM;
800aa9c: f04f 33ff mov.w r3, #4294967295
800aaa0: e010 b.n 800aac4 <tcp_keepalive+0x6c>
}
tcp_output_fill_options(pcb, p, 0, optlen);
800aaa2: 7dfb ldrb r3, [r7, #23]
800aaa4: 2200 movs r2, #0
800aaa6: 6939 ldr r1, [r7, #16]
800aaa8: 6878 ldr r0, [r7, #4]
800aaaa: f7ff fe97 bl 800a7dc <tcp_output_fill_options>
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
800aaae: 687a ldr r2, [r7, #4]
800aab0: 687b ldr r3, [r7, #4]
800aab2: 3304 adds r3, #4
800aab4: 6939 ldr r1, [r7, #16]
800aab6: 6878 ldr r0, [r7, #4]
800aab8: f7ff fed0 bl 800a85c <tcp_output_control_segment>
800aabc: 4603 mov r3, r0
800aabe: 73fb strb r3, [r7, #15]
LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F" err %d.\n",
pcb->snd_nxt - 1, pcb->rcv_nxt, (int)err));
return err;
800aac0: f997 300f ldrsb.w r3, [r7, #15]
}
800aac4: 4618 mov r0, r3
800aac6: 371c adds r7, #28
800aac8: 46bd mov sp, r7
800aaca: bd90 pop {r4, r7, pc}
800aacc: 0801608c .word 0x0801608c
800aad0: 08016868 .word 0x08016868
800aad4: 080160e0 .word 0x080160e0
0800aad8 <tcp_zero_window_probe>:
*
* @param pcb the tcp_pcb for which to send a zero-window probe packet
*/
err_t
tcp_zero_window_probe(struct tcp_pcb *pcb)
{
800aad8: b590 push {r4, r7, lr}
800aada: b08b sub sp, #44 ; 0x2c
800aadc: af00 add r7, sp, #0
800aade: 6078 str r0, [r7, #4]
struct tcp_hdr *tcphdr;
struct tcp_seg *seg;
u16_t len;
u8_t is_fin;
u32_t snd_nxt;
u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
800aae0: 2300 movs r3, #0
800aae2: f887 3027 strb.w r3, [r7, #39] ; 0x27
LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL);
800aae6: 687b ldr r3, [r7, #4]
800aae8: 2b00 cmp r3, #0
800aaea: d106 bne.n 800aafa <tcp_zero_window_probe+0x22>
800aaec: 4b4c ldr r3, [pc, #304] ; (800ac20 <tcp_zero_window_probe+0x148>)
800aaee: f640 024f movw r2, #2127 ; 0x84f
800aaf2: 494c ldr r1, [pc, #304] ; (800ac24 <tcp_zero_window_probe+0x14c>)
800aaf4: 484c ldr r0, [pc, #304] ; (800ac28 <tcp_zero_window_probe+0x150>)
800aaf6: f005 f9df bl 800feb8 <printf>
("tcp_zero_window_probe: tcp_ticks %"U32_F
" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent));
/* Only consider unsent, persist timer should be off when there is data in-flight */
seg = pcb->unsent;
800aafa: 687b ldr r3, [r7, #4]
800aafc: 6edb ldr r3, [r3, #108] ; 0x6c
800aafe: 623b str r3, [r7, #32]
if (seg == NULL) {
800ab00: 6a3b ldr r3, [r7, #32]
800ab02: 2b00 cmp r3, #0
800ab04: d101 bne.n 800ab0a <tcp_zero_window_probe+0x32>
/* Not expected, persist timer should be off when the send buffer is empty */
return ERR_OK;
800ab06: 2300 movs r3, #0
800ab08: e086 b.n 800ac18 <tcp_zero_window_probe+0x140>
/* increment probe count. NOTE: we record probe even if it fails
to actually transmit due to an error. This ensures memory exhaustion/
routing problem doesn't leave a zero-window pcb as an indefinite zombie.
RTO mechanism has similar behavior, see pcb->nrtx */
if (pcb->persist_probe < 0xFF) {
800ab0a: 687b ldr r3, [r7, #4]
800ab0c: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
800ab10: 2bff cmp r3, #255 ; 0xff
800ab12: d007 beq.n 800ab24 <tcp_zero_window_probe+0x4c>
++pcb->persist_probe;
800ab14: 687b ldr r3, [r7, #4]
800ab16: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
800ab1a: 3301 adds r3, #1
800ab1c: b2da uxtb r2, r3
800ab1e: 687b ldr r3, [r7, #4]
800ab20: f883 209a strb.w r2, [r3, #154] ; 0x9a
}
is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
800ab24: 6a3b ldr r3, [r7, #32]
800ab26: 68db ldr r3, [r3, #12]
800ab28: 899b ldrh r3, [r3, #12]
800ab2a: b29b uxth r3, r3
800ab2c: 4618 mov r0, r3
800ab2e: f7f9 f93d bl 8003dac <lwip_htons>
800ab32: 4603 mov r3, r0
800ab34: b2db uxtb r3, r3
800ab36: f003 0301 and.w r3, r3, #1
800ab3a: 2b00 cmp r3, #0
800ab3c: d005 beq.n 800ab4a <tcp_zero_window_probe+0x72>
800ab3e: 6a3b ldr r3, [r7, #32]
800ab40: 891b ldrh r3, [r3, #8]
800ab42: 2b00 cmp r3, #0
800ab44: d101 bne.n 800ab4a <tcp_zero_window_probe+0x72>
800ab46: 2301 movs r3, #1
800ab48: e000 b.n 800ab4c <tcp_zero_window_probe+0x74>
800ab4a: 2300 movs r3, #0
800ab4c: 77fb strb r3, [r7, #31]
/* we want to send one seqno: either FIN or data (no options) */
len = is_fin ? 0 : 1;
800ab4e: 7ffb ldrb r3, [r7, #31]
800ab50: 2b00 cmp r3, #0
800ab52: bf0c ite eq
800ab54: 2301 moveq r3, #1
800ab56: 2300 movne r3, #0
800ab58: b2db uxtb r3, r3
800ab5a: 83bb strh r3, [r7, #28]
p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno);
800ab5c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800ab60: b299 uxth r1, r3
800ab62: 6a3b ldr r3, [r7, #32]
800ab64: 68db ldr r3, [r3, #12]
800ab66: 685b ldr r3, [r3, #4]
800ab68: 8bba ldrh r2, [r7, #28]
800ab6a: 6878 ldr r0, [r7, #4]
800ab6c: f7ff fdf8 bl 800a760 <tcp_output_alloc_header>
800ab70: 61b8 str r0, [r7, #24]
if (p == NULL) {
800ab72: 69bb ldr r3, [r7, #24]
800ab74: 2b00 cmp r3, #0
800ab76: d102 bne.n 800ab7e <tcp_zero_window_probe+0xa6>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n"));
return ERR_MEM;
800ab78: f04f 33ff mov.w r3, #4294967295
800ab7c: e04c b.n 800ac18 <tcp_zero_window_probe+0x140>
}
tcphdr = (struct tcp_hdr *)p->payload;
800ab7e: 69bb ldr r3, [r7, #24]
800ab80: 685b ldr r3, [r3, #4]
800ab82: 617b str r3, [r7, #20]
if (is_fin) {
800ab84: 7ffb ldrb r3, [r7, #31]
800ab86: 2b00 cmp r3, #0
800ab88: d011 beq.n 800abae <tcp_zero_window_probe+0xd6>
/* FIN segment, no data */
TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN);
800ab8a: 697b ldr r3, [r7, #20]
800ab8c: 899b ldrh r3, [r3, #12]
800ab8e: b29b uxth r3, r3
800ab90: b21b sxth r3, r3
800ab92: f423 537c bic.w r3, r3, #16128 ; 0x3f00
800ab96: b21c sxth r4, r3
800ab98: 2011 movs r0, #17
800ab9a: f7f9 f907 bl 8003dac <lwip_htons>
800ab9e: 4603 mov r3, r0
800aba0: b21b sxth r3, r3
800aba2: 4323 orrs r3, r4
800aba4: b21b sxth r3, r3
800aba6: b29a uxth r2, r3
800aba8: 697b ldr r3, [r7, #20]
800abaa: 819a strh r2, [r3, #12]
800abac: e010 b.n 800abd0 <tcp_zero_window_probe+0xf8>
} else {
/* Data segment, copy in one byte from the head of the unacked queue */
char *d = ((char *)p->payload + TCP_HLEN);
800abae: 69bb ldr r3, [r7, #24]
800abb0: 685b ldr r3, [r3, #4]
800abb2: 3314 adds r3, #20
800abb4: 613b str r3, [r7, #16]
/* Depending on whether the segment has already been sent (unacked) or not
(unsent), seg->p->payload points to the IP header or TCP header.
Ensure we copy the first TCP data byte: */
pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len);
800abb6: 6a3b ldr r3, [r7, #32]
800abb8: 6858 ldr r0, [r3, #4]
800abba: 6a3b ldr r3, [r7, #32]
800abbc: 685b ldr r3, [r3, #4]
800abbe: 891a ldrh r2, [r3, #8]
800abc0: 6a3b ldr r3, [r7, #32]
800abc2: 891b ldrh r3, [r3, #8]
800abc4: 1ad3 subs r3, r2, r3
800abc6: b29b uxth r3, r3
800abc8: 2201 movs r2, #1
800abca: 6939 ldr r1, [r7, #16]
800abcc: f7fa fe52 bl 8005874 <pbuf_copy_partial>
}
/* The byte may be acknowledged without the window being opened. */
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1;
800abd0: 6a3b ldr r3, [r7, #32]
800abd2: 68db ldr r3, [r3, #12]
800abd4: 685b ldr r3, [r3, #4]
800abd6: 4618 mov r0, r3
800abd8: f7f9 f8fd bl 8003dd6 <lwip_htonl>
800abdc: 4603 mov r3, r0
800abde: 3301 adds r3, #1
800abe0: 60fb str r3, [r7, #12]
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
800abe2: 687b ldr r3, [r7, #4]
800abe4: 6d1a ldr r2, [r3, #80] ; 0x50
800abe6: 68fb ldr r3, [r7, #12]
800abe8: 1ad3 subs r3, r2, r3
800abea: 2b00 cmp r3, #0
800abec: da02 bge.n 800abf4 <tcp_zero_window_probe+0x11c>
pcb->snd_nxt = snd_nxt;
800abee: 687b ldr r3, [r7, #4]
800abf0: 68fa ldr r2, [r7, #12]
800abf2: 651a str r2, [r3, #80] ; 0x50
}
tcp_output_fill_options(pcb, p, 0, optlen);
800abf4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800abf8: 2200 movs r2, #0
800abfa: 69b9 ldr r1, [r7, #24]
800abfc: 6878 ldr r0, [r7, #4]
800abfe: f7ff fded bl 800a7dc <tcp_output_fill_options>
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
800ac02: 687a ldr r2, [r7, #4]
800ac04: 687b ldr r3, [r7, #4]
800ac06: 3304 adds r3, #4
800ac08: 69b9 ldr r1, [r7, #24]
800ac0a: 6878 ldr r0, [r7, #4]
800ac0c: f7ff fe26 bl 800a85c <tcp_output_control_segment>
800ac10: 4603 mov r3, r0
800ac12: 72fb strb r3, [r7, #11]
LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F
" ackno %"U32_F" err %d.\n",
pcb->snd_nxt - 1, pcb->rcv_nxt, (int)err));
return err;
800ac14: f997 300b ldrsb.w r3, [r7, #11]
}
800ac18: 4618 mov r0, r3
800ac1a: 372c adds r7, #44 ; 0x2c
800ac1c: 46bd mov sp, r7
800ac1e: bd90 pop {r4, r7, pc}
800ac20: 0801608c .word 0x0801608c
800ac24: 08016884 .word 0x08016884
800ac28: 080160e0 .word 0x080160e0
0800ac2c <tcpip_tcp_timer>:
*
* @param arg unused argument
*/
static void
tcpip_tcp_timer(void *arg)
{
800ac2c: b580 push {r7, lr}
800ac2e: b082 sub sp, #8
800ac30: af00 add r7, sp, #0
800ac32: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(arg);
/* call TCP timer handler */
tcp_tmr();
800ac34: f7fa ff0c bl 8005a50 <tcp_tmr>
/* timer still needed? */
if (tcp_active_pcbs || tcp_tw_pcbs) {
800ac38: 4b0a ldr r3, [pc, #40] ; (800ac64 <tcpip_tcp_timer+0x38>)
800ac3a: 681b ldr r3, [r3, #0]
800ac3c: 2b00 cmp r3, #0
800ac3e: d103 bne.n 800ac48 <tcpip_tcp_timer+0x1c>
800ac40: 4b09 ldr r3, [pc, #36] ; (800ac68 <tcpip_tcp_timer+0x3c>)
800ac42: 681b ldr r3, [r3, #0]
800ac44: 2b00 cmp r3, #0
800ac46: d005 beq.n 800ac54 <tcpip_tcp_timer+0x28>
/* restart timer */
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
800ac48: 2200 movs r2, #0
800ac4a: 4908 ldr r1, [pc, #32] ; (800ac6c <tcpip_tcp_timer+0x40>)
800ac4c: 20fa movs r0, #250 ; 0xfa
800ac4e: f000 f8f3 bl 800ae38 <sys_timeout>
800ac52: e003 b.n 800ac5c <tcpip_tcp_timer+0x30>
} else {
/* disable timer */
tcpip_tcp_timer_active = 0;
800ac54: 4b06 ldr r3, [pc, #24] ; (800ac70 <tcpip_tcp_timer+0x44>)
800ac56: 2200 movs r2, #0
800ac58: 601a str r2, [r3, #0]
}
}
800ac5a: bf00 nop
800ac5c: bf00 nop
800ac5e: 3708 adds r7, #8
800ac60: 46bd mov sp, r7
800ac62: bd80 pop {r7, pc}
800ac64: 20008bb8 .word 0x20008bb8
800ac68: 20008bbc .word 0x20008bbc
800ac6c: 0800ac2d .word 0x0800ac2d
800ac70: 20008c04 .word 0x20008c04
0800ac74 <tcp_timer_needed>:
* the reason is to have the TCP timer only running when
* there are active (or time-wait) PCBs.
*/
void
tcp_timer_needed(void)
{
800ac74: b580 push {r7, lr}
800ac76: af00 add r7, sp, #0
LWIP_ASSERT_CORE_LOCKED();
/* timer is off but needed again? */
if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) {
800ac78: 4b0a ldr r3, [pc, #40] ; (800aca4 <tcp_timer_needed+0x30>)
800ac7a: 681b ldr r3, [r3, #0]
800ac7c: 2b00 cmp r3, #0
800ac7e: d10f bne.n 800aca0 <tcp_timer_needed+0x2c>
800ac80: 4b09 ldr r3, [pc, #36] ; (800aca8 <tcp_timer_needed+0x34>)
800ac82: 681b ldr r3, [r3, #0]
800ac84: 2b00 cmp r3, #0
800ac86: d103 bne.n 800ac90 <tcp_timer_needed+0x1c>
800ac88: 4b08 ldr r3, [pc, #32] ; (800acac <tcp_timer_needed+0x38>)
800ac8a: 681b ldr r3, [r3, #0]
800ac8c: 2b00 cmp r3, #0
800ac8e: d007 beq.n 800aca0 <tcp_timer_needed+0x2c>
/* enable and start timer */
tcpip_tcp_timer_active = 1;
800ac90: 4b04 ldr r3, [pc, #16] ; (800aca4 <tcp_timer_needed+0x30>)
800ac92: 2201 movs r2, #1
800ac94: 601a str r2, [r3, #0]
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
800ac96: 2200 movs r2, #0
800ac98: 4905 ldr r1, [pc, #20] ; (800acb0 <tcp_timer_needed+0x3c>)
800ac9a: 20fa movs r0, #250 ; 0xfa
800ac9c: f000 f8cc bl 800ae38 <sys_timeout>
}
}
800aca0: bf00 nop
800aca2: bd80 pop {r7, pc}
800aca4: 20008c04 .word 0x20008c04
800aca8: 20008bb8 .word 0x20008bb8
800acac: 20008bbc .word 0x20008bbc
800acb0: 0800ac2d .word 0x0800ac2d
0800acb4 <sys_timeout_abs>:
#if LWIP_DEBUG_TIMERNAMES
sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg, const char *handler_name)
#else /* LWIP_DEBUG_TIMERNAMES */
sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg)
#endif
{
800acb4: b580 push {r7, lr}
800acb6: b086 sub sp, #24
800acb8: af00 add r7, sp, #0
800acba: 60f8 str r0, [r7, #12]
800acbc: 60b9 str r1, [r7, #8]
800acbe: 607a str r2, [r7, #4]
struct sys_timeo *timeout, *t;
timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT);
800acc0: 2006 movs r0, #6
800acc2: f7f9 fceb bl 800469c <memp_malloc>
800acc6: 6138 str r0, [r7, #16]
if (timeout == NULL) {
800acc8: 693b ldr r3, [r7, #16]
800acca: 2b00 cmp r3, #0
800accc: d109 bne.n 800ace2 <sys_timeout_abs+0x2e>
LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL);
800acce: 693b ldr r3, [r7, #16]
800acd0: 2b00 cmp r3, #0
800acd2: d151 bne.n 800ad78 <sys_timeout_abs+0xc4>
800acd4: 4b2a ldr r3, [pc, #168] ; (800ad80 <sys_timeout_abs+0xcc>)
800acd6: 22be movs r2, #190 ; 0xbe
800acd8: 492a ldr r1, [pc, #168] ; (800ad84 <sys_timeout_abs+0xd0>)
800acda: 482b ldr r0, [pc, #172] ; (800ad88 <sys_timeout_abs+0xd4>)
800acdc: f005 f8ec bl 800feb8 <printf>
return;
800ace0: e04a b.n 800ad78 <sys_timeout_abs+0xc4>
}
timeout->next = NULL;
800ace2: 693b ldr r3, [r7, #16]
800ace4: 2200 movs r2, #0
800ace6: 601a str r2, [r3, #0]
timeout->h = handler;
800ace8: 693b ldr r3, [r7, #16]
800acea: 68ba ldr r2, [r7, #8]
800acec: 609a str r2, [r3, #8]
timeout->arg = arg;
800acee: 693b ldr r3, [r7, #16]
800acf0: 687a ldr r2, [r7, #4]
800acf2: 60da str r2, [r3, #12]
timeout->time = abs_time;
800acf4: 693b ldr r3, [r7, #16]
800acf6: 68fa ldr r2, [r7, #12]
800acf8: 605a str r2, [r3, #4]
timeout->handler_name = handler_name;
LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p abs_time=%"U32_F" handler=%s arg=%p\n",
(void *)timeout, abs_time, handler_name, (void *)arg));
#endif /* LWIP_DEBUG_TIMERNAMES */
if (next_timeout == NULL) {
800acfa: 4b24 ldr r3, [pc, #144] ; (800ad8c <sys_timeout_abs+0xd8>)
800acfc: 681b ldr r3, [r3, #0]
800acfe: 2b00 cmp r3, #0
800ad00: d103 bne.n 800ad0a <sys_timeout_abs+0x56>
next_timeout = timeout;
800ad02: 4a22 ldr r2, [pc, #136] ; (800ad8c <sys_timeout_abs+0xd8>)
800ad04: 693b ldr r3, [r7, #16]
800ad06: 6013 str r3, [r2, #0]
return;
800ad08: e037 b.n 800ad7a <sys_timeout_abs+0xc6>
}
if (TIME_LESS_THAN(timeout->time, next_timeout->time)) {
800ad0a: 693b ldr r3, [r7, #16]
800ad0c: 685a ldr r2, [r3, #4]
800ad0e: 4b1f ldr r3, [pc, #124] ; (800ad8c <sys_timeout_abs+0xd8>)
800ad10: 681b ldr r3, [r3, #0]
800ad12: 685b ldr r3, [r3, #4]
800ad14: 1ad3 subs r3, r2, r3
800ad16: 0fdb lsrs r3, r3, #31
800ad18: f003 0301 and.w r3, r3, #1
800ad1c: b2db uxtb r3, r3
800ad1e: 2b00 cmp r3, #0
800ad20: d007 beq.n 800ad32 <sys_timeout_abs+0x7e>
timeout->next = next_timeout;
800ad22: 4b1a ldr r3, [pc, #104] ; (800ad8c <sys_timeout_abs+0xd8>)
800ad24: 681a ldr r2, [r3, #0]
800ad26: 693b ldr r3, [r7, #16]
800ad28: 601a str r2, [r3, #0]
next_timeout = timeout;
800ad2a: 4a18 ldr r2, [pc, #96] ; (800ad8c <sys_timeout_abs+0xd8>)
800ad2c: 693b ldr r3, [r7, #16]
800ad2e: 6013 str r3, [r2, #0]
800ad30: e023 b.n 800ad7a <sys_timeout_abs+0xc6>
} else {
for (t = next_timeout; t != NULL; t = t->next) {
800ad32: 4b16 ldr r3, [pc, #88] ; (800ad8c <sys_timeout_abs+0xd8>)
800ad34: 681b ldr r3, [r3, #0]
800ad36: 617b str r3, [r7, #20]
800ad38: e01a b.n 800ad70 <sys_timeout_abs+0xbc>
if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) {
800ad3a: 697b ldr r3, [r7, #20]
800ad3c: 681b ldr r3, [r3, #0]
800ad3e: 2b00 cmp r3, #0
800ad40: d00b beq.n 800ad5a <sys_timeout_abs+0xa6>
800ad42: 693b ldr r3, [r7, #16]
800ad44: 685a ldr r2, [r3, #4]
800ad46: 697b ldr r3, [r7, #20]
800ad48: 681b ldr r3, [r3, #0]
800ad4a: 685b ldr r3, [r3, #4]
800ad4c: 1ad3 subs r3, r2, r3
800ad4e: 0fdb lsrs r3, r3, #31
800ad50: f003 0301 and.w r3, r3, #1
800ad54: b2db uxtb r3, r3
800ad56: 2b00 cmp r3, #0
800ad58: d007 beq.n 800ad6a <sys_timeout_abs+0xb6>
timeout->next = t->next;
800ad5a: 697b ldr r3, [r7, #20]
800ad5c: 681a ldr r2, [r3, #0]
800ad5e: 693b ldr r3, [r7, #16]
800ad60: 601a str r2, [r3, #0]
t->next = timeout;
800ad62: 697b ldr r3, [r7, #20]
800ad64: 693a ldr r2, [r7, #16]
800ad66: 601a str r2, [r3, #0]
break;
800ad68: e007 b.n 800ad7a <sys_timeout_abs+0xc6>
for (t = next_timeout; t != NULL; t = t->next) {
800ad6a: 697b ldr r3, [r7, #20]
800ad6c: 681b ldr r3, [r3, #0]
800ad6e: 617b str r3, [r7, #20]
800ad70: 697b ldr r3, [r7, #20]
800ad72: 2b00 cmp r3, #0
800ad74: d1e1 bne.n 800ad3a <sys_timeout_abs+0x86>
800ad76: e000 b.n 800ad7a <sys_timeout_abs+0xc6>
return;
800ad78: bf00 nop
}
}
}
}
800ad7a: 3718 adds r7, #24
800ad7c: 46bd mov sp, r7
800ad7e: bd80 pop {r7, pc}
800ad80: 080168a8 .word 0x080168a8
800ad84: 080168dc .word 0x080168dc
800ad88: 0801691c .word 0x0801691c
800ad8c: 20008bfc .word 0x20008bfc
0800ad90 <lwip_cyclic_timer>:
#if !LWIP_TESTMODE
static
#endif
void
lwip_cyclic_timer(void *arg)
{
800ad90: b580 push {r7, lr}
800ad92: b086 sub sp, #24
800ad94: af00 add r7, sp, #0
800ad96: 6078 str r0, [r7, #4]
u32_t now;
u32_t next_timeout_time;
const struct lwip_cyclic_timer *cyclic = (const struct lwip_cyclic_timer *)arg;
800ad98: 687b ldr r3, [r7, #4]
800ad9a: 617b str r3, [r7, #20]
#if LWIP_DEBUG_TIMERNAMES
LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name));
#endif
cyclic->handler();
800ad9c: 697b ldr r3, [r7, #20]
800ad9e: 685b ldr r3, [r3, #4]
800ada0: 4798 blx r3
now = sys_now();
800ada2: f7f8 fdeb bl 800397c <sys_now>
800ada6: 6138 str r0, [r7, #16]
next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */
800ada8: 697b ldr r3, [r7, #20]
800adaa: 681a ldr r2, [r3, #0]
800adac: 4b0f ldr r3, [pc, #60] ; (800adec <lwip_cyclic_timer+0x5c>)
800adae: 681b ldr r3, [r3, #0]
800adb0: 4413 add r3, r2
800adb2: 60fb str r3, [r7, #12]
if (TIME_LESS_THAN(next_timeout_time, now)) {
800adb4: 68fa ldr r2, [r7, #12]
800adb6: 693b ldr r3, [r7, #16]
800adb8: 1ad3 subs r3, r2, r3
800adba: 0fdb lsrs r3, r3, #31
800adbc: f003 0301 and.w r3, r3, #1
800adc0: b2db uxtb r3, r3
800adc2: 2b00 cmp r3, #0
800adc4: d009 beq.n 800adda <lwip_cyclic_timer+0x4a>
/* timer would immediately expire again -> "overload" -> restart without any correction */
#if LWIP_DEBUG_TIMERNAMES
sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg, cyclic->handler_name);
#else
sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg);
800adc6: 697b ldr r3, [r7, #20]
800adc8: 681a ldr r2, [r3, #0]
800adca: 693b ldr r3, [r7, #16]
800adcc: 4413 add r3, r2
800adce: 687a ldr r2, [r7, #4]
800add0: 4907 ldr r1, [pc, #28] ; (800adf0 <lwip_cyclic_timer+0x60>)
800add2: 4618 mov r0, r3
800add4: f7ff ff6e bl 800acb4 <sys_timeout_abs>
sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg, cyclic->handler_name);
#else
sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
#endif
}
}
800add8: e004 b.n 800ade4 <lwip_cyclic_timer+0x54>
sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
800adda: 687a ldr r2, [r7, #4]
800addc: 4904 ldr r1, [pc, #16] ; (800adf0 <lwip_cyclic_timer+0x60>)
800adde: 68f8 ldr r0, [r7, #12]
800ade0: f7ff ff68 bl 800acb4 <sys_timeout_abs>
}
800ade4: bf00 nop
800ade6: 3718 adds r7, #24
800ade8: 46bd mov sp, r7
800adea: bd80 pop {r7, pc}
800adec: 20008c00 .word 0x20008c00
800adf0: 0800ad91 .word 0x0800ad91
0800adf4 <sys_timeouts_init>:
/** Initialize this module */
void sys_timeouts_init(void)
{
800adf4: b580 push {r7, lr}
800adf6: b082 sub sp, #8
800adf8: af00 add r7, sp, #0
size_t i;
/* tcp_tmr() at index 0 is started on demand */
for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
800adfa: 2301 movs r3, #1
800adfc: 607b str r3, [r7, #4]
800adfe: e00e b.n 800ae1e <sys_timeouts_init+0x2a>
/* we have to cast via size_t to get rid of const warning
(this is OK as cyclic_timer() casts back to const* */
sys_timeout(lwip_cyclic_timers[i].interval_ms, lwip_cyclic_timer, LWIP_CONST_CAST(void *, &lwip_cyclic_timers[i]));
800ae00: 4a0b ldr r2, [pc, #44] ; (800ae30 <sys_timeouts_init+0x3c>)
800ae02: 687b ldr r3, [r7, #4]
800ae04: f852 0033 ldr.w r0, [r2, r3, lsl #3]
800ae08: 687b ldr r3, [r7, #4]
800ae0a: 00db lsls r3, r3, #3
800ae0c: 4a08 ldr r2, [pc, #32] ; (800ae30 <sys_timeouts_init+0x3c>)
800ae0e: 4413 add r3, r2
800ae10: 461a mov r2, r3
800ae12: 4908 ldr r1, [pc, #32] ; (800ae34 <sys_timeouts_init+0x40>)
800ae14: f000 f810 bl 800ae38 <sys_timeout>
for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
800ae18: 687b ldr r3, [r7, #4]
800ae1a: 3301 adds r3, #1
800ae1c: 607b str r3, [r7, #4]
800ae1e: 687b ldr r3, [r7, #4]
800ae20: 2b04 cmp r3, #4
800ae22: d9ed bls.n 800ae00 <sys_timeouts_init+0xc>
}
}
800ae24: bf00 nop
800ae26: bf00 nop
800ae28: 3708 adds r7, #8
800ae2a: 46bd mov sp, r7
800ae2c: bd80 pop {r7, pc}
800ae2e: bf00 nop
800ae30: 0801789c .word 0x0801789c
800ae34: 0800ad91 .word 0x0800ad91
0800ae38 <sys_timeout>:
sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char *handler_name)
#else /* LWIP_DEBUG_TIMERNAMES */
void
sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg)
#endif /* LWIP_DEBUG_TIMERNAMES */
{
800ae38: b580 push {r7, lr}
800ae3a: b086 sub sp, #24
800ae3c: af00 add r7, sp, #0
800ae3e: 60f8 str r0, [r7, #12]
800ae40: 60b9 str r1, [r7, #8]
800ae42: 607a str r2, [r7, #4]
u32_t next_timeout_time;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4));
800ae44: 68fb ldr r3, [r7, #12]
800ae46: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800ae4a: d306 bcc.n 800ae5a <sys_timeout+0x22>
800ae4c: 4b0a ldr r3, [pc, #40] ; (800ae78 <sys_timeout+0x40>)
800ae4e: f240 1229 movw r2, #297 ; 0x129
800ae52: 490a ldr r1, [pc, #40] ; (800ae7c <sys_timeout+0x44>)
800ae54: 480a ldr r0, [pc, #40] ; (800ae80 <sys_timeout+0x48>)
800ae56: f005 f82f bl 800feb8 <printf>
next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
800ae5a: f7f8 fd8f bl 800397c <sys_now>
800ae5e: 4602 mov r2, r0
800ae60: 68fb ldr r3, [r7, #12]
800ae62: 4413 add r3, r2
800ae64: 617b str r3, [r7, #20]
#if LWIP_DEBUG_TIMERNAMES
sys_timeout_abs(next_timeout_time, handler, arg, handler_name);
#else
sys_timeout_abs(next_timeout_time, handler, arg);
800ae66: 687a ldr r2, [r7, #4]
800ae68: 68b9 ldr r1, [r7, #8]
800ae6a: 6978 ldr r0, [r7, #20]
800ae6c: f7ff ff22 bl 800acb4 <sys_timeout_abs>
#endif
}
800ae70: bf00 nop
800ae72: 3718 adds r7, #24
800ae74: 46bd mov sp, r7
800ae76: bd80 pop {r7, pc}
800ae78: 080168a8 .word 0x080168a8
800ae7c: 08016944 .word 0x08016944
800ae80: 0801691c .word 0x0801691c
0800ae84 <sys_check_timeouts>:
*
* Must be called periodically from your main loop.
*/
void
sys_check_timeouts(void)
{
800ae84: b580 push {r7, lr}
800ae86: b084 sub sp, #16
800ae88: af00 add r7, sp, #0
u32_t now;
LWIP_ASSERT_CORE_LOCKED();
/* Process only timers expired at the start of the function. */
now = sys_now();
800ae8a: f7f8 fd77 bl 800397c <sys_now>
800ae8e: 60f8 str r0, [r7, #12]
do {
struct sys_timeo *tmptimeout;
sys_timeout_handler handler;
void *arg;
PBUF_CHECK_FREE_OOSEQ();
800ae90: 4b1a ldr r3, [pc, #104] ; (800aefc <sys_check_timeouts+0x78>)
800ae92: 781b ldrb r3, [r3, #0]
800ae94: b2db uxtb r3, r3
800ae96: 2b00 cmp r3, #0
800ae98: d001 beq.n 800ae9e <sys_check_timeouts+0x1a>
800ae9a: f7f9 ffb7 bl 8004e0c <pbuf_free_ooseq>
tmptimeout = next_timeout;
800ae9e: 4b18 ldr r3, [pc, #96] ; (800af00 <sys_check_timeouts+0x7c>)
800aea0: 681b ldr r3, [r3, #0]
800aea2: 60bb str r3, [r7, #8]
if (tmptimeout == NULL) {
800aea4: 68bb ldr r3, [r7, #8]
800aea6: 2b00 cmp r3, #0
800aea8: d022 beq.n 800aef0 <sys_check_timeouts+0x6c>
return;
}
if (TIME_LESS_THAN(now, tmptimeout->time)) {
800aeaa: 68bb ldr r3, [r7, #8]
800aeac: 685b ldr r3, [r3, #4]
800aeae: 68fa ldr r2, [r7, #12]
800aeb0: 1ad3 subs r3, r2, r3
800aeb2: 0fdb lsrs r3, r3, #31
800aeb4: f003 0301 and.w r3, r3, #1
800aeb8: b2db uxtb r3, r3
800aeba: 2b00 cmp r3, #0
800aebc: d11a bne.n 800aef4 <sys_check_timeouts+0x70>
return;
}
/* Timeout has expired */
next_timeout = tmptimeout->next;
800aebe: 68bb ldr r3, [r7, #8]
800aec0: 681b ldr r3, [r3, #0]
800aec2: 4a0f ldr r2, [pc, #60] ; (800af00 <sys_check_timeouts+0x7c>)
800aec4: 6013 str r3, [r2, #0]
handler = tmptimeout->h;
800aec6: 68bb ldr r3, [r7, #8]
800aec8: 689b ldr r3, [r3, #8]
800aeca: 607b str r3, [r7, #4]
arg = tmptimeout->arg;
800aecc: 68bb ldr r3, [r7, #8]
800aece: 68db ldr r3, [r3, #12]
800aed0: 603b str r3, [r7, #0]
current_timeout_due_time = tmptimeout->time;
800aed2: 68bb ldr r3, [r7, #8]
800aed4: 685b ldr r3, [r3, #4]
800aed6: 4a0b ldr r2, [pc, #44] ; (800af04 <sys_check_timeouts+0x80>)
800aed8: 6013 str r3, [r2, #0]
if (handler != NULL) {
LWIP_DEBUGF(TIMERS_DEBUG, ("sct calling h=%s t=%"U32_F" arg=%p\n",
tmptimeout->handler_name, sys_now() - tmptimeout->time, arg));
}
#endif /* LWIP_DEBUG_TIMERNAMES */
memp_free(MEMP_SYS_TIMEOUT, tmptimeout);
800aeda: 68b9 ldr r1, [r7, #8]
800aedc: 2006 movs r0, #6
800aede: f7f9 fc4d bl 800477c <memp_free>
if (handler != NULL) {
800aee2: 687b ldr r3, [r7, #4]
800aee4: 2b00 cmp r3, #0
800aee6: d0d3 beq.n 800ae90 <sys_check_timeouts+0xc>
handler(arg);
800aee8: 687b ldr r3, [r7, #4]
800aeea: 6838 ldr r0, [r7, #0]
800aeec: 4798 blx r3
do {
800aeee: e7cf b.n 800ae90 <sys_check_timeouts+0xc>
return;
800aef0: bf00 nop
800aef2: e000 b.n 800aef6 <sys_check_timeouts+0x72>
return;
800aef4: bf00 nop
}
LWIP_TCPIP_THREAD_ALIVE();
/* Repeat until all expired timers have been called */
} while (1);
}
800aef6: 3710 adds r7, #16
800aef8: 46bd mov sp, r7
800aefa: bd80 pop {r7, pc}
800aefc: 20008ba9 .word 0x20008ba9
800af00: 20008bfc .word 0x20008bfc
800af04: 20008c00 .word 0x20008c00
0800af08 <udp_init>:
/**
* Initialize this module.
*/
void
udp_init(void)
{
800af08: b580 push {r7, lr}
800af0a: af00 add r7, sp, #0
#ifdef LWIP_RAND
udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
800af0c: f004 ffe6 bl 800fedc <rand>
800af10: 4603 mov r3, r0
800af12: b29b uxth r3, r3
800af14: f3c3 030d ubfx r3, r3, #0, #14
800af18: b29b uxth r3, r3
800af1a: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
800af1e: b29a uxth r2, r3
800af20: 4b01 ldr r3, [pc, #4] ; (800af28 <udp_init+0x20>)
800af22: 801a strh r2, [r3, #0]
#endif /* LWIP_RAND */
}
800af24: bf00 nop
800af26: bd80 pop {r7, pc}
800af28: 20000028 .word 0x20000028
0800af2c <udp_new_port>:
*
* @return a new (free) local UDP port number
*/
static u16_t
udp_new_port(void)
{
800af2c: b480 push {r7}
800af2e: b083 sub sp, #12
800af30: af00 add r7, sp, #0
u16_t n = 0;
800af32: 2300 movs r3, #0
800af34: 80fb strh r3, [r7, #6]
struct udp_pcb *pcb;
again:
if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) {
800af36: 4b17 ldr r3, [pc, #92] ; (800af94 <udp_new_port+0x68>)
800af38: 881b ldrh r3, [r3, #0]
800af3a: 1c5a adds r2, r3, #1
800af3c: b291 uxth r1, r2
800af3e: 4a15 ldr r2, [pc, #84] ; (800af94 <udp_new_port+0x68>)
800af40: 8011 strh r1, [r2, #0]
800af42: f64f 72ff movw r2, #65535 ; 0xffff
800af46: 4293 cmp r3, r2
800af48: d103 bne.n 800af52 <udp_new_port+0x26>
udp_port = UDP_LOCAL_PORT_RANGE_START;
800af4a: 4b12 ldr r3, [pc, #72] ; (800af94 <udp_new_port+0x68>)
800af4c: f44f 4240 mov.w r2, #49152 ; 0xc000
800af50: 801a strh r2, [r3, #0]
}
/* Check all PCBs. */
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
800af52: 4b11 ldr r3, [pc, #68] ; (800af98 <udp_new_port+0x6c>)
800af54: 681b ldr r3, [r3, #0]
800af56: 603b str r3, [r7, #0]
800af58: e011 b.n 800af7e <udp_new_port+0x52>
if (pcb->local_port == udp_port) {
800af5a: 683b ldr r3, [r7, #0]
800af5c: 8a5a ldrh r2, [r3, #18]
800af5e: 4b0d ldr r3, [pc, #52] ; (800af94 <udp_new_port+0x68>)
800af60: 881b ldrh r3, [r3, #0]
800af62: 429a cmp r2, r3
800af64: d108 bne.n 800af78 <udp_new_port+0x4c>
if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) {
800af66: 88fb ldrh r3, [r7, #6]
800af68: 3301 adds r3, #1
800af6a: 80fb strh r3, [r7, #6]
800af6c: 88fb ldrh r3, [r7, #6]
800af6e: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
800af72: d3e0 bcc.n 800af36 <udp_new_port+0xa>
return 0;
800af74: 2300 movs r3, #0
800af76: e007 b.n 800af88 <udp_new_port+0x5c>
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
800af78: 683b ldr r3, [r7, #0]
800af7a: 68db ldr r3, [r3, #12]
800af7c: 603b str r3, [r7, #0]
800af7e: 683b ldr r3, [r7, #0]
800af80: 2b00 cmp r3, #0
800af82: d1ea bne.n 800af5a <udp_new_port+0x2e>
}
goto again;
}
}
return udp_port;
800af84: 4b03 ldr r3, [pc, #12] ; (800af94 <udp_new_port+0x68>)
800af86: 881b ldrh r3, [r3, #0]
}
800af88: 4618 mov r0, r3
800af8a: 370c adds r7, #12
800af8c: 46bd mov sp, r7
800af8e: f85d 7b04 ldr.w r7, [sp], #4
800af92: 4770 bx lr
800af94: 20000028 .word 0x20000028
800af98: 20008c08 .word 0x20008c08
0800af9c <udp_input_local_match>:
* @param broadcast 1 if his is an IPv4 broadcast (global or subnet-only), 0 otherwise (only used for IPv4)
* @return 1 on match, 0 otherwise
*/
static u8_t
udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast)
{
800af9c: b580 push {r7, lr}
800af9e: b084 sub sp, #16
800afa0: af00 add r7, sp, #0
800afa2: 60f8 str r0, [r7, #12]
800afa4: 60b9 str r1, [r7, #8]
800afa6: 4613 mov r3, r2
800afa8: 71fb strb r3, [r7, #7]
LWIP_UNUSED_ARG(inp); /* in IPv6 only case */
LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */
LWIP_ASSERT("udp_input_local_match: invalid pcb", pcb != NULL);
800afaa: 68fb ldr r3, [r7, #12]
800afac: 2b00 cmp r3, #0
800afae: d105 bne.n 800afbc <udp_input_local_match+0x20>
800afb0: 4b27 ldr r3, [pc, #156] ; (800b050 <udp_input_local_match+0xb4>)
800afb2: 2287 movs r2, #135 ; 0x87
800afb4: 4927 ldr r1, [pc, #156] ; (800b054 <udp_input_local_match+0xb8>)
800afb6: 4828 ldr r0, [pc, #160] ; (800b058 <udp_input_local_match+0xbc>)
800afb8: f004 ff7e bl 800feb8 <printf>
LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL);
800afbc: 68bb ldr r3, [r7, #8]
800afbe: 2b00 cmp r3, #0
800afc0: d105 bne.n 800afce <udp_input_local_match+0x32>
800afc2: 4b23 ldr r3, [pc, #140] ; (800b050 <udp_input_local_match+0xb4>)
800afc4: 2288 movs r2, #136 ; 0x88
800afc6: 4925 ldr r1, [pc, #148] ; (800b05c <udp_input_local_match+0xc0>)
800afc8: 4823 ldr r0, [pc, #140] ; (800b058 <udp_input_local_match+0xbc>)
800afca: f004 ff75 bl 800feb8 <printf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
800afce: 68fb ldr r3, [r7, #12]
800afd0: 7a1b ldrb r3, [r3, #8]
800afd2: 2b00 cmp r3, #0
800afd4: d00b beq.n 800afee <udp_input_local_match+0x52>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
800afd6: 68fb ldr r3, [r7, #12]
800afd8: 7a1a ldrb r2, [r3, #8]
800afda: 4b21 ldr r3, [pc, #132] ; (800b060 <udp_input_local_match+0xc4>)
800afdc: 685b ldr r3, [r3, #4]
800afde: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
800afe2: 3301 adds r3, #1
800afe4: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
800afe6: 429a cmp r2, r3
800afe8: d001 beq.n 800afee <udp_input_local_match+0x52>
return 0;
800afea: 2300 movs r3, #0
800afec: e02b b.n 800b046 <udp_input_local_match+0xaa>
/* Only need to check PCB if incoming IP version matches PCB IP version */
if (IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ip_current_dest_addr())) {
#if LWIP_IPV4
/* Special case: IPv4 broadcast: all or broadcasts in my subnet
* Note: broadcast variable can only be 1 if it is an IPv4 broadcast */
if (broadcast != 0) {
800afee: 79fb ldrb r3, [r7, #7]
800aff0: 2b00 cmp r3, #0
800aff2: d018 beq.n 800b026 <udp_input_local_match+0x8a>
#if IP_SOF_BROADCAST_RECV
if (ip_get_option(pcb, SOF_BROADCAST))
#endif /* IP_SOF_BROADCAST_RECV */
{
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
800aff4: 68fb ldr r3, [r7, #12]
800aff6: 2b00 cmp r3, #0
800aff8: d013 beq.n 800b022 <udp_input_local_match+0x86>
800affa: 68fb ldr r3, [r7, #12]
800affc: 681b ldr r3, [r3, #0]
800affe: 2b00 cmp r3, #0
800b000: d00f beq.n 800b022 <udp_input_local_match+0x86>
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
800b002: 4b17 ldr r3, [pc, #92] ; (800b060 <udp_input_local_match+0xc4>)
800b004: 695b ldr r3, [r3, #20]
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
800b006: f1b3 3fff cmp.w r3, #4294967295
800b00a: d00a beq.n 800b022 <udp_input_local_match+0x86>
ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) {
800b00c: 68fb ldr r3, [r7, #12]
800b00e: 681a ldr r2, [r3, #0]
800b010: 4b13 ldr r3, [pc, #76] ; (800b060 <udp_input_local_match+0xc4>)
800b012: 695b ldr r3, [r3, #20]
800b014: 405a eors r2, r3
800b016: 68bb ldr r3, [r7, #8]
800b018: 3308 adds r3, #8
800b01a: 681b ldr r3, [r3, #0]
800b01c: 4013 ands r3, r2
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
800b01e: 2b00 cmp r3, #0
800b020: d110 bne.n 800b044 <udp_input_local_match+0xa8>
return 1;
800b022: 2301 movs r3, #1
800b024: e00f b.n 800b046 <udp_input_local_match+0xaa>
}
}
} else
#endif /* LWIP_IPV4 */
/* Handle IPv4 and IPv6: all or exact match */
if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
800b026: 68fb ldr r3, [r7, #12]
800b028: 2b00 cmp r3, #0
800b02a: d009 beq.n 800b040 <udp_input_local_match+0xa4>
800b02c: 68fb ldr r3, [r7, #12]
800b02e: 681b ldr r3, [r3, #0]
800b030: 2b00 cmp r3, #0
800b032: d005 beq.n 800b040 <udp_input_local_match+0xa4>
800b034: 68fb ldr r3, [r7, #12]
800b036: 681a ldr r2, [r3, #0]
800b038: 4b09 ldr r3, [pc, #36] ; (800b060 <udp_input_local_match+0xc4>)
800b03a: 695b ldr r3, [r3, #20]
800b03c: 429a cmp r2, r3
800b03e: d101 bne.n 800b044 <udp_input_local_match+0xa8>
return 1;
800b040: 2301 movs r3, #1
800b042: e000 b.n 800b046 <udp_input_local_match+0xaa>
}
}
return 0;
800b044: 2300 movs r3, #0
}
800b046: 4618 mov r0, r3
800b048: 3710 adds r7, #16
800b04a: 46bd mov sp, r7
800b04c: bd80 pop {r7, pc}
800b04e: bf00 nop
800b050: 08016990 .word 0x08016990
800b054: 080169c0 .word 0x080169c0
800b058: 080169e4 .word 0x080169e4
800b05c: 08016a0c .word 0x08016a0c
800b060: 2000561c .word 0x2000561c
0800b064 <udp_input>:
* @param inp network interface on which the datagram was received.
*
*/
void
udp_input(struct pbuf *p, struct netif *inp)
{
800b064: b590 push {r4, r7, lr}
800b066: b08d sub sp, #52 ; 0x34
800b068: af02 add r7, sp, #8
800b06a: 6078 str r0, [r7, #4]
800b06c: 6039 str r1, [r7, #0]
struct udp_hdr *udphdr;
struct udp_pcb *pcb, *prev;
struct udp_pcb *uncon_pcb;
u16_t src, dest;
u8_t broadcast;
u8_t for_us = 0;
800b06e: 2300 movs r3, #0
800b070: 76fb strb r3, [r7, #27]
LWIP_UNUSED_ARG(inp);
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("udp_input: invalid pbuf", p != NULL);
800b072: 687b ldr r3, [r7, #4]
800b074: 2b00 cmp r3, #0
800b076: d105 bne.n 800b084 <udp_input+0x20>
800b078: 4b7c ldr r3, [pc, #496] ; (800b26c <udp_input+0x208>)
800b07a: 22cf movs r2, #207 ; 0xcf
800b07c: 497c ldr r1, [pc, #496] ; (800b270 <udp_input+0x20c>)
800b07e: 487d ldr r0, [pc, #500] ; (800b274 <udp_input+0x210>)
800b080: f004 ff1a bl 800feb8 <printf>
LWIP_ASSERT("udp_input: invalid netif", inp != NULL);
800b084: 683b ldr r3, [r7, #0]
800b086: 2b00 cmp r3, #0
800b088: d105 bne.n 800b096 <udp_input+0x32>
800b08a: 4b78 ldr r3, [pc, #480] ; (800b26c <udp_input+0x208>)
800b08c: 22d0 movs r2, #208 ; 0xd0
800b08e: 497a ldr r1, [pc, #488] ; (800b278 <udp_input+0x214>)
800b090: 4878 ldr r0, [pc, #480] ; (800b274 <udp_input+0x210>)
800b092: f004 ff11 bl 800feb8 <printf>
PERF_START;
UDP_STATS_INC(udp.recv);
/* Check minimum length (UDP header) */
if (p->len < UDP_HLEN) {
800b096: 687b ldr r3, [r7, #4]
800b098: 895b ldrh r3, [r3, #10]
800b09a: 2b07 cmp r3, #7
800b09c: d803 bhi.n 800b0a6 <udp_input+0x42>
LWIP_DEBUGF(UDP_DEBUG,
("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len));
UDP_STATS_INC(udp.lenerr);
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
800b09e: 6878 ldr r0, [r7, #4]
800b0a0: f7fa f9ee bl 8005480 <pbuf_free>
goto end;
800b0a4: e0de b.n 800b264 <udp_input+0x200>
}
udphdr = (struct udp_hdr *)p->payload;
800b0a6: 687b ldr r3, [r7, #4]
800b0a8: 685b ldr r3, [r3, #4]
800b0aa: 617b str r3, [r7, #20]
/* is broadcast packet ? */
broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif());
800b0ac: 4b73 ldr r3, [pc, #460] ; (800b27c <udp_input+0x218>)
800b0ae: 695b ldr r3, [r3, #20]
800b0b0: 4a72 ldr r2, [pc, #456] ; (800b27c <udp_input+0x218>)
800b0b2: 6812 ldr r2, [r2, #0]
800b0b4: 4611 mov r1, r2
800b0b6: 4618 mov r0, r3
800b0b8: f003 fe06 bl 800ecc8 <ip4_addr_isbroadcast_u32>
800b0bc: 4603 mov r3, r0
800b0be: 74fb strb r3, [r7, #19]
LWIP_DEBUGF(UDP_DEBUG, ("udp_input: received datagram of length %"U16_F"\n", p->tot_len));
/* convert src and dest ports to host byte order */
src = lwip_ntohs(udphdr->src);
800b0c0: 697b ldr r3, [r7, #20]
800b0c2: 881b ldrh r3, [r3, #0]
800b0c4: b29b uxth r3, r3
800b0c6: 4618 mov r0, r3
800b0c8: f7f8 fe70 bl 8003dac <lwip_htons>
800b0cc: 4603 mov r3, r0
800b0ce: 823b strh r3, [r7, #16]
dest = lwip_ntohs(udphdr->dest);
800b0d0: 697b ldr r3, [r7, #20]
800b0d2: 885b ldrh r3, [r3, #2]
800b0d4: b29b uxth r3, r3
800b0d6: 4618 mov r0, r3
800b0d8: f7f8 fe68 bl 8003dac <lwip_htons>
800b0dc: 4603 mov r3, r0
800b0de: 81fb strh r3, [r7, #14]
ip_addr_debug_print_val(UDP_DEBUG, *ip_current_dest_addr());
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", lwip_ntohs(udphdr->dest)));
ip_addr_debug_print_val(UDP_DEBUG, *ip_current_src_addr());
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", lwip_ntohs(udphdr->src)));
pcb = NULL;
800b0e0: 2300 movs r3, #0
800b0e2: 627b str r3, [r7, #36] ; 0x24
prev = NULL;
800b0e4: 2300 movs r3, #0
800b0e6: 623b str r3, [r7, #32]
uncon_pcb = NULL;
800b0e8: 2300 movs r3, #0
800b0ea: 61fb str r3, [r7, #28]
/* Iterate through the UDP pcb list for a matching pcb.
* 'Perfect match' pcbs (connected to the remote port & ip address) are
* preferred. If no perfect match is found, the first unconnected pcb that
* matches the local port and ip address gets the datagram. */
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
800b0ec: 4b64 ldr r3, [pc, #400] ; (800b280 <udp_input+0x21c>)
800b0ee: 681b ldr r3, [r3, #0]
800b0f0: 627b str r3, [r7, #36] ; 0x24
800b0f2: e054 b.n 800b19e <udp_input+0x13a>
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", pcb->local_port));
ip_addr_debug_print_val(UDP_DEBUG, pcb->remote_ip);
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", pcb->remote_port));
/* compare PCB local addr+port to UDP destination addr+port */
if ((pcb->local_port == dest) &&
800b0f4: 6a7b ldr r3, [r7, #36] ; 0x24
800b0f6: 8a5b ldrh r3, [r3, #18]
800b0f8: 89fa ldrh r2, [r7, #14]
800b0fa: 429a cmp r2, r3
800b0fc: d14a bne.n 800b194 <udp_input+0x130>
(udp_input_local_match(pcb, inp, broadcast) != 0)) {
800b0fe: 7cfb ldrb r3, [r7, #19]
800b100: 461a mov r2, r3
800b102: 6839 ldr r1, [r7, #0]
800b104: 6a78 ldr r0, [r7, #36] ; 0x24
800b106: f7ff ff49 bl 800af9c <udp_input_local_match>
800b10a: 4603 mov r3, r0
if ((pcb->local_port == dest) &&
800b10c: 2b00 cmp r3, #0
800b10e: d041 beq.n 800b194 <udp_input+0x130>
if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) {
800b110: 6a7b ldr r3, [r7, #36] ; 0x24
800b112: 7c1b ldrb r3, [r3, #16]
800b114: f003 0304 and.w r3, r3, #4
800b118: 2b00 cmp r3, #0
800b11a: d11d bne.n 800b158 <udp_input+0xf4>
if (uncon_pcb == NULL) {
800b11c: 69fb ldr r3, [r7, #28]
800b11e: 2b00 cmp r3, #0
800b120: d102 bne.n 800b128 <udp_input+0xc4>
/* the first unconnected matching PCB */
uncon_pcb = pcb;
800b122: 6a7b ldr r3, [r7, #36] ; 0x24
800b124: 61fb str r3, [r7, #28]
800b126: e017 b.n 800b158 <udp_input+0xf4>
#if LWIP_IPV4
} else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) {
800b128: 7cfb ldrb r3, [r7, #19]
800b12a: 2b00 cmp r3, #0
800b12c: d014 beq.n 800b158 <udp_input+0xf4>
800b12e: 4b53 ldr r3, [pc, #332] ; (800b27c <udp_input+0x218>)
800b130: 695b ldr r3, [r3, #20]
800b132: f1b3 3fff cmp.w r3, #4294967295
800b136: d10f bne.n 800b158 <udp_input+0xf4>
/* global broadcast address (only valid for IPv4; match was checked before) */
if (!IP_IS_V4_VAL(uncon_pcb->local_ip) || !ip4_addr_cmp(ip_2_ip4(&uncon_pcb->local_ip), netif_ip4_addr(inp))) {
800b138: 69fb ldr r3, [r7, #28]
800b13a: 681a ldr r2, [r3, #0]
800b13c: 683b ldr r3, [r7, #0]
800b13e: 3304 adds r3, #4
800b140: 681b ldr r3, [r3, #0]
800b142: 429a cmp r2, r3
800b144: d008 beq.n 800b158 <udp_input+0xf4>
/* uncon_pcb does not match the input netif, check this pcb */
if (IP_IS_V4_VAL(pcb->local_ip) && ip4_addr_cmp(ip_2_ip4(&pcb->local_ip), netif_ip4_addr(inp))) {
800b146: 6a7b ldr r3, [r7, #36] ; 0x24
800b148: 681a ldr r2, [r3, #0]
800b14a: 683b ldr r3, [r7, #0]
800b14c: 3304 adds r3, #4
800b14e: 681b ldr r3, [r3, #0]
800b150: 429a cmp r2, r3
800b152: d101 bne.n 800b158 <udp_input+0xf4>
/* better match */
uncon_pcb = pcb;
800b154: 6a7b ldr r3, [r7, #36] ; 0x24
800b156: 61fb str r3, [r7, #28]
}
#endif /* SO_REUSE */
}
/* compare PCB remote addr+port to UDP source addr+port */
if ((pcb->remote_port == src) &&
800b158: 6a7b ldr r3, [r7, #36] ; 0x24
800b15a: 8a9b ldrh r3, [r3, #20]
800b15c: 8a3a ldrh r2, [r7, #16]
800b15e: 429a cmp r2, r3
800b160: d118 bne.n 800b194 <udp_input+0x130>
(ip_addr_isany_val(pcb->remote_ip) ||
800b162: 6a7b ldr r3, [r7, #36] ; 0x24
800b164: 685b ldr r3, [r3, #4]
if ((pcb->remote_port == src) &&
800b166: 2b00 cmp r3, #0
800b168: d005 beq.n 800b176 <udp_input+0x112>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) {
800b16a: 6a7b ldr r3, [r7, #36] ; 0x24
800b16c: 685a ldr r2, [r3, #4]
800b16e: 4b43 ldr r3, [pc, #268] ; (800b27c <udp_input+0x218>)
800b170: 691b ldr r3, [r3, #16]
(ip_addr_isany_val(pcb->remote_ip) ||
800b172: 429a cmp r2, r3
800b174: d10e bne.n 800b194 <udp_input+0x130>
/* the first fully matching PCB */
if (prev != NULL) {
800b176: 6a3b ldr r3, [r7, #32]
800b178: 2b00 cmp r3, #0
800b17a: d014 beq.n 800b1a6 <udp_input+0x142>
/* move the pcb to the front of udp_pcbs so that is
found faster next time */
prev->next = pcb->next;
800b17c: 6a7b ldr r3, [r7, #36] ; 0x24
800b17e: 68da ldr r2, [r3, #12]
800b180: 6a3b ldr r3, [r7, #32]
800b182: 60da str r2, [r3, #12]
pcb->next = udp_pcbs;
800b184: 4b3e ldr r3, [pc, #248] ; (800b280 <udp_input+0x21c>)
800b186: 681a ldr r2, [r3, #0]
800b188: 6a7b ldr r3, [r7, #36] ; 0x24
800b18a: 60da str r2, [r3, #12]
udp_pcbs = pcb;
800b18c: 4a3c ldr r2, [pc, #240] ; (800b280 <udp_input+0x21c>)
800b18e: 6a7b ldr r3, [r7, #36] ; 0x24
800b190: 6013 str r3, [r2, #0]
} else {
UDP_STATS_INC(udp.cachehit);
}
break;
800b192: e008 b.n 800b1a6 <udp_input+0x142>
}
}
prev = pcb;
800b194: 6a7b ldr r3, [r7, #36] ; 0x24
800b196: 623b str r3, [r7, #32]
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
800b198: 6a7b ldr r3, [r7, #36] ; 0x24
800b19a: 68db ldr r3, [r3, #12]
800b19c: 627b str r3, [r7, #36] ; 0x24
800b19e: 6a7b ldr r3, [r7, #36] ; 0x24
800b1a0: 2b00 cmp r3, #0
800b1a2: d1a7 bne.n 800b0f4 <udp_input+0x90>
800b1a4: e000 b.n 800b1a8 <udp_input+0x144>
break;
800b1a6: bf00 nop
}
/* no fully matching pcb found? then look for an unconnected pcb */
if (pcb == NULL) {
800b1a8: 6a7b ldr r3, [r7, #36] ; 0x24
800b1aa: 2b00 cmp r3, #0
800b1ac: d101 bne.n 800b1b2 <udp_input+0x14e>
pcb = uncon_pcb;
800b1ae: 69fb ldr r3, [r7, #28]
800b1b0: 627b str r3, [r7, #36] ; 0x24
}
/* Check checksum if this is a match or if it was directed at us. */
if (pcb != NULL) {
800b1b2: 6a7b ldr r3, [r7, #36] ; 0x24
800b1b4: 2b00 cmp r3, #0
800b1b6: d002 beq.n 800b1be <udp_input+0x15a>
for_us = 1;
800b1b8: 2301 movs r3, #1
800b1ba: 76fb strb r3, [r7, #27]
800b1bc: e00a b.n 800b1d4 <udp_input+0x170>
for_us = netif_get_ip6_addr_match(inp, ip6_current_dest_addr()) >= 0;
}
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
if (!ip_current_is_v6()) {
for_us = ip4_addr_cmp(netif_ip4_addr(inp), ip4_current_dest_addr());
800b1be: 683b ldr r3, [r7, #0]
800b1c0: 3304 adds r3, #4
800b1c2: 681a ldr r2, [r3, #0]
800b1c4: 4b2d ldr r3, [pc, #180] ; (800b27c <udp_input+0x218>)
800b1c6: 695b ldr r3, [r3, #20]
800b1c8: 429a cmp r2, r3
800b1ca: bf0c ite eq
800b1cc: 2301 moveq r3, #1
800b1ce: 2300 movne r3, #0
800b1d0: b2db uxtb r3, r3
800b1d2: 76fb strb r3, [r7, #27]
}
#endif /* LWIP_IPV4 */
}
if (for_us) {
800b1d4: 7efb ldrb r3, [r7, #27]
800b1d6: 2b00 cmp r3, #0
800b1d8: d041 beq.n 800b25e <udp_input+0x1fa>
}
}
}
}
#endif /* CHECKSUM_CHECK_UDP */
if (pbuf_remove_header(p, UDP_HLEN)) {
800b1da: 2108 movs r1, #8
800b1dc: 6878 ldr r0, [r7, #4]
800b1de: f7fa f8c9 bl 8005374 <pbuf_remove_header>
800b1e2: 4603 mov r3, r0
800b1e4: 2b00 cmp r3, #0
800b1e6: d00a beq.n 800b1fe <udp_input+0x19a>
/* Can we cope with this failing? Just assert for now */
LWIP_ASSERT("pbuf_remove_header failed\n", 0);
800b1e8: 4b20 ldr r3, [pc, #128] ; (800b26c <udp_input+0x208>)
800b1ea: f44f 72b8 mov.w r2, #368 ; 0x170
800b1ee: 4925 ldr r1, [pc, #148] ; (800b284 <udp_input+0x220>)
800b1f0: 4820 ldr r0, [pc, #128] ; (800b274 <udp_input+0x210>)
800b1f2: f004 fe61 bl 800feb8 <printf>
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
800b1f6: 6878 ldr r0, [r7, #4]
800b1f8: f7fa f942 bl 8005480 <pbuf_free>
goto end;
800b1fc: e032 b.n 800b264 <udp_input+0x200>
}
if (pcb != NULL) {
800b1fe: 6a7b ldr r3, [r7, #36] ; 0x24
800b200: 2b00 cmp r3, #0
800b202: d012 beq.n 800b22a <udp_input+0x1c6>
}
}
}
#endif /* SO_REUSE && SO_REUSE_RXTOALL */
/* callback */
if (pcb->recv != NULL) {
800b204: 6a7b ldr r3, [r7, #36] ; 0x24
800b206: 699b ldr r3, [r3, #24]
800b208: 2b00 cmp r3, #0
800b20a: d00a beq.n 800b222 <udp_input+0x1be>
/* now the recv function is responsible for freeing p */
pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src);
800b20c: 6a7b ldr r3, [r7, #36] ; 0x24
800b20e: 699c ldr r4, [r3, #24]
800b210: 6a7b ldr r3, [r7, #36] ; 0x24
800b212: 69d8 ldr r0, [r3, #28]
800b214: 8a3b ldrh r3, [r7, #16]
800b216: 9300 str r3, [sp, #0]
800b218: 4b1b ldr r3, [pc, #108] ; (800b288 <udp_input+0x224>)
800b21a: 687a ldr r2, [r7, #4]
800b21c: 6a79 ldr r1, [r7, #36] ; 0x24
800b21e: 47a0 blx r4
} else {
pbuf_free(p);
}
end:
PERF_STOP("udp_input");
return;
800b220: e021 b.n 800b266 <udp_input+0x202>
pbuf_free(p);
800b222: 6878 ldr r0, [r7, #4]
800b224: f7fa f92c bl 8005480 <pbuf_free>
goto end;
800b228: e01c b.n 800b264 <udp_input+0x200>
if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) {
800b22a: 7cfb ldrb r3, [r7, #19]
800b22c: 2b00 cmp r3, #0
800b22e: d112 bne.n 800b256 <udp_input+0x1f2>
800b230: 4b12 ldr r3, [pc, #72] ; (800b27c <udp_input+0x218>)
800b232: 695b ldr r3, [r3, #20]
800b234: f003 03f0 and.w r3, r3, #240 ; 0xf0
800b238: 2be0 cmp r3, #224 ; 0xe0
800b23a: d00c beq.n 800b256 <udp_input+0x1f2>
pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN));
800b23c: 4b0f ldr r3, [pc, #60] ; (800b27c <udp_input+0x218>)
800b23e: 899b ldrh r3, [r3, #12]
800b240: 3308 adds r3, #8
800b242: b29b uxth r3, r3
800b244: b21b sxth r3, r3
800b246: 4619 mov r1, r3
800b248: 6878 ldr r0, [r7, #4]
800b24a: f7fa f906 bl 800545a <pbuf_header_force>
icmp_port_unreach(ip_current_is_v6(), p);
800b24e: 2103 movs r1, #3
800b250: 6878 ldr r0, [r7, #4]
800b252: f003 f9fb bl 800e64c <icmp_dest_unreach>
pbuf_free(p);
800b256: 6878 ldr r0, [r7, #4]
800b258: f7fa f912 bl 8005480 <pbuf_free>
return;
800b25c: e003 b.n 800b266 <udp_input+0x202>
pbuf_free(p);
800b25e: 6878 ldr r0, [r7, #4]
800b260: f7fa f90e bl 8005480 <pbuf_free>
return;
800b264: bf00 nop
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
PERF_STOP("udp_input");
#endif /* CHECKSUM_CHECK_UDP */
}
800b266: 372c adds r7, #44 ; 0x2c
800b268: 46bd mov sp, r7
800b26a: bd90 pop {r4, r7, pc}
800b26c: 08016990 .word 0x08016990
800b270: 08016a34 .word 0x08016a34
800b274: 080169e4 .word 0x080169e4
800b278: 08016a4c .word 0x08016a4c
800b27c: 2000561c .word 0x2000561c
800b280: 20008c08 .word 0x20008c08
800b284: 08016a68 .word 0x08016a68
800b288: 2000562c .word 0x2000562c
0800b28c <udp_sendto_if>:
* @see udp_disconnect() udp_send()
*/
err_t
udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p,
const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif)
{
800b28c: b580 push {r7, lr}
800b28e: b088 sub sp, #32
800b290: af02 add r7, sp, #8
800b292: 60f8 str r0, [r7, #12]
800b294: 60b9 str r1, [r7, #8]
800b296: 607a str r2, [r7, #4]
800b298: 807b strh r3, [r7, #2]
u16_t chksum)
{
#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
const ip_addr_t *src_ip;
LWIP_ERROR("udp_sendto_if: invalid pcb", pcb != NULL, return ERR_ARG);
800b29a: 68fb ldr r3, [r7, #12]
800b29c: 2b00 cmp r3, #0
800b29e: d109 bne.n 800b2b4 <udp_sendto_if+0x28>
800b2a0: 4b2e ldr r3, [pc, #184] ; (800b35c <udp_sendto_if+0xd0>)
800b2a2: f44f 7220 mov.w r2, #640 ; 0x280
800b2a6: 492e ldr r1, [pc, #184] ; (800b360 <udp_sendto_if+0xd4>)
800b2a8: 482e ldr r0, [pc, #184] ; (800b364 <udp_sendto_if+0xd8>)
800b2aa: f004 fe05 bl 800feb8 <printf>
800b2ae: f06f 030f mvn.w r3, #15
800b2b2: e04f b.n 800b354 <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG);
800b2b4: 68bb ldr r3, [r7, #8]
800b2b6: 2b00 cmp r3, #0
800b2b8: d109 bne.n 800b2ce <udp_sendto_if+0x42>
800b2ba: 4b28 ldr r3, [pc, #160] ; (800b35c <udp_sendto_if+0xd0>)
800b2bc: f240 2281 movw r2, #641 ; 0x281
800b2c0: 4929 ldr r1, [pc, #164] ; (800b368 <udp_sendto_if+0xdc>)
800b2c2: 4828 ldr r0, [pc, #160] ; (800b364 <udp_sendto_if+0xd8>)
800b2c4: f004 fdf8 bl 800feb8 <printf>
800b2c8: f06f 030f mvn.w r3, #15
800b2cc: e042 b.n 800b354 <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
800b2ce: 687b ldr r3, [r7, #4]
800b2d0: 2b00 cmp r3, #0
800b2d2: d109 bne.n 800b2e8 <udp_sendto_if+0x5c>
800b2d4: 4b21 ldr r3, [pc, #132] ; (800b35c <udp_sendto_if+0xd0>)
800b2d6: f240 2282 movw r2, #642 ; 0x282
800b2da: 4924 ldr r1, [pc, #144] ; (800b36c <udp_sendto_if+0xe0>)
800b2dc: 4821 ldr r0, [pc, #132] ; (800b364 <udp_sendto_if+0xd8>)
800b2de: f004 fdeb bl 800feb8 <printf>
800b2e2: f06f 030f mvn.w r3, #15
800b2e6: e035 b.n 800b354 <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG);
800b2e8: 6a3b ldr r3, [r7, #32]
800b2ea: 2b00 cmp r3, #0
800b2ec: d109 bne.n 800b302 <udp_sendto_if+0x76>
800b2ee: 4b1b ldr r3, [pc, #108] ; (800b35c <udp_sendto_if+0xd0>)
800b2f0: f240 2283 movw r2, #643 ; 0x283
800b2f4: 491e ldr r1, [pc, #120] ; (800b370 <udp_sendto_if+0xe4>)
800b2f6: 481b ldr r0, [pc, #108] ; (800b364 <udp_sendto_if+0xd8>)
800b2f8: f004 fdde bl 800feb8 <printf>
800b2fc: f06f 030f mvn.w r3, #15
800b300: e028 b.n 800b354 <udp_sendto_if+0xc8>
#endif /* LWIP_IPV6 */
#if LWIP_IPV4 && LWIP_IPV6
else
#endif /* LWIP_IPV4 && LWIP_IPV6 */
#if LWIP_IPV4
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
800b302: 68fb ldr r3, [r7, #12]
800b304: 2b00 cmp r3, #0
800b306: d009 beq.n 800b31c <udp_sendto_if+0x90>
800b308: 68fb ldr r3, [r7, #12]
800b30a: 681b ldr r3, [r3, #0]
800b30c: 2b00 cmp r3, #0
800b30e: d005 beq.n 800b31c <udp_sendto_if+0x90>
ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) {
800b310: 68fb ldr r3, [r7, #12]
800b312: 681b ldr r3, [r3, #0]
800b314: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
800b318: 2be0 cmp r3, #224 ; 0xe0
800b31a: d103 bne.n 800b324 <udp_sendto_if+0x98>
/* if the local_ip is any or multicast
* use the outgoing network interface IP address as source address */
src_ip = netif_ip_addr4(netif);
800b31c: 6a3b ldr r3, [r7, #32]
800b31e: 3304 adds r3, #4
800b320: 617b str r3, [r7, #20]
800b322: e00b b.n 800b33c <udp_sendto_if+0xb0>
} else {
/* check if UDP PCB local IP address is correct
* this could be an old address if netif->ip_addr has changed */
if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) {
800b324: 68fb ldr r3, [r7, #12]
800b326: 681a ldr r2, [r3, #0]
800b328: 6a3b ldr r3, [r7, #32]
800b32a: 3304 adds r3, #4
800b32c: 681b ldr r3, [r3, #0]
800b32e: 429a cmp r2, r3
800b330: d002 beq.n 800b338 <udp_sendto_if+0xac>
/* local_ip doesn't match, drop the packet */
return ERR_RTE;
800b332: f06f 0303 mvn.w r3, #3
800b336: e00d b.n 800b354 <udp_sendto_if+0xc8>
}
/* use UDP PCB local IP address as source address */
src_ip = &pcb->local_ip;
800b338: 68fb ldr r3, [r7, #12]
800b33a: 617b str r3, [r7, #20]
}
#endif /* LWIP_IPV4 */
#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP
return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum, src_ip);
#else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
return udp_sendto_if_src(pcb, p, dst_ip, dst_port, netif, src_ip);
800b33c: 887a ldrh r2, [r7, #2]
800b33e: 697b ldr r3, [r7, #20]
800b340: 9301 str r3, [sp, #4]
800b342: 6a3b ldr r3, [r7, #32]
800b344: 9300 str r3, [sp, #0]
800b346: 4613 mov r3, r2
800b348: 687a ldr r2, [r7, #4]
800b34a: 68b9 ldr r1, [r7, #8]
800b34c: 68f8 ldr r0, [r7, #12]
800b34e: f000 f811 bl 800b374 <udp_sendto_if_src>
800b352: 4603 mov r3, r0
#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
}
800b354: 4618 mov r0, r3
800b356: 3718 adds r7, #24
800b358: 46bd mov sp, r7
800b35a: bd80 pop {r7, pc}
800b35c: 08016990 .word 0x08016990
800b360: 08016b04 .word 0x08016b04
800b364: 080169e4 .word 0x080169e4
800b368: 08016b20 .word 0x08016b20
800b36c: 08016b3c .word 0x08016b3c
800b370: 08016b5c .word 0x08016b5c
0800b374 <udp_sendto_if_src>:
/** @ingroup udp_raw
* Same as @ref udp_sendto_if, but with source address */
err_t
udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p,
const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip)
{
800b374: b580 push {r7, lr}
800b376: b08c sub sp, #48 ; 0x30
800b378: af04 add r7, sp, #16
800b37a: 60f8 str r0, [r7, #12]
800b37c: 60b9 str r1, [r7, #8]
800b37e: 607a str r2, [r7, #4]
800b380: 807b strh r3, [r7, #2]
u8_t ip_proto;
u8_t ttl;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG);
800b382: 68fb ldr r3, [r7, #12]
800b384: 2b00 cmp r3, #0
800b386: d109 bne.n 800b39c <udp_sendto_if_src+0x28>
800b388: 4b65 ldr r3, [pc, #404] ; (800b520 <udp_sendto_if_src+0x1ac>)
800b38a: f240 22d1 movw r2, #721 ; 0x2d1
800b38e: 4965 ldr r1, [pc, #404] ; (800b524 <udp_sendto_if_src+0x1b0>)
800b390: 4865 ldr r0, [pc, #404] ; (800b528 <udp_sendto_if_src+0x1b4>)
800b392: f004 fd91 bl 800feb8 <printf>
800b396: f06f 030f mvn.w r3, #15
800b39a: e0bc b.n 800b516 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG);
800b39c: 68bb ldr r3, [r7, #8]
800b39e: 2b00 cmp r3, #0
800b3a0: d109 bne.n 800b3b6 <udp_sendto_if_src+0x42>
800b3a2: 4b5f ldr r3, [pc, #380] ; (800b520 <udp_sendto_if_src+0x1ac>)
800b3a4: f240 22d2 movw r2, #722 ; 0x2d2
800b3a8: 4960 ldr r1, [pc, #384] ; (800b52c <udp_sendto_if_src+0x1b8>)
800b3aa: 485f ldr r0, [pc, #380] ; (800b528 <udp_sendto_if_src+0x1b4>)
800b3ac: f004 fd84 bl 800feb8 <printf>
800b3b0: f06f 030f mvn.w r3, #15
800b3b4: e0af b.n 800b516 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
800b3b6: 687b ldr r3, [r7, #4]
800b3b8: 2b00 cmp r3, #0
800b3ba: d109 bne.n 800b3d0 <udp_sendto_if_src+0x5c>
800b3bc: 4b58 ldr r3, [pc, #352] ; (800b520 <udp_sendto_if_src+0x1ac>)
800b3be: f240 22d3 movw r2, #723 ; 0x2d3
800b3c2: 495b ldr r1, [pc, #364] ; (800b530 <udp_sendto_if_src+0x1bc>)
800b3c4: 4858 ldr r0, [pc, #352] ; (800b528 <udp_sendto_if_src+0x1b4>)
800b3c6: f004 fd77 bl 800feb8 <printf>
800b3ca: f06f 030f mvn.w r3, #15
800b3ce: e0a2 b.n 800b516 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG);
800b3d0: 6afb ldr r3, [r7, #44] ; 0x2c
800b3d2: 2b00 cmp r3, #0
800b3d4: d109 bne.n 800b3ea <udp_sendto_if_src+0x76>
800b3d6: 4b52 ldr r3, [pc, #328] ; (800b520 <udp_sendto_if_src+0x1ac>)
800b3d8: f44f 7235 mov.w r2, #724 ; 0x2d4
800b3dc: 4955 ldr r1, [pc, #340] ; (800b534 <udp_sendto_if_src+0x1c0>)
800b3de: 4852 ldr r0, [pc, #328] ; (800b528 <udp_sendto_if_src+0x1b4>)
800b3e0: f004 fd6a bl 800feb8 <printf>
800b3e4: f06f 030f mvn.w r3, #15
800b3e8: e095 b.n 800b516 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG);
800b3ea: 6abb ldr r3, [r7, #40] ; 0x28
800b3ec: 2b00 cmp r3, #0
800b3ee: d109 bne.n 800b404 <udp_sendto_if_src+0x90>
800b3f0: 4b4b ldr r3, [pc, #300] ; (800b520 <udp_sendto_if_src+0x1ac>)
800b3f2: f240 22d5 movw r2, #725 ; 0x2d5
800b3f6: 4950 ldr r1, [pc, #320] ; (800b538 <udp_sendto_if_src+0x1c4>)
800b3f8: 484b ldr r0, [pc, #300] ; (800b528 <udp_sendto_if_src+0x1b4>)
800b3fa: f004 fd5d bl 800feb8 <printf>
800b3fe: f06f 030f mvn.w r3, #15
800b402: e088 b.n 800b516 <udp_sendto_if_src+0x1a2>
return ERR_VAL;
}
#endif /* LWIP_IPV4 && IP_SOF_BROADCAST */
/* if the PCB is not yet bound to a port, bind it here */
if (pcb->local_port == 0) {
800b404: 68fb ldr r3, [r7, #12]
800b406: 8a5b ldrh r3, [r3, #18]
800b408: 2b00 cmp r3, #0
800b40a: d10f bne.n 800b42c <udp_sendto_if_src+0xb8>
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send: not yet bound to a port, binding now\n"));
err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
800b40c: 68f9 ldr r1, [r7, #12]
800b40e: 68fb ldr r3, [r7, #12]
800b410: 8a5b ldrh r3, [r3, #18]
800b412: 461a mov r2, r3
800b414: 68f8 ldr r0, [r7, #12]
800b416: f000 f893 bl 800b540 <udp_bind>
800b41a: 4603 mov r3, r0
800b41c: 76fb strb r3, [r7, #27]
if (err != ERR_OK) {
800b41e: f997 301b ldrsb.w r3, [r7, #27]
800b422: 2b00 cmp r3, #0
800b424: d002 beq.n 800b42c <udp_sendto_if_src+0xb8>
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: forced port bind failed\n"));
return err;
800b426: f997 301b ldrsb.w r3, [r7, #27]
800b42a: e074 b.n 800b516 <udp_sendto_if_src+0x1a2>
}
}
/* packet too large to add a UDP header without causing an overflow? */
if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) {
800b42c: 68bb ldr r3, [r7, #8]
800b42e: 891b ldrh r3, [r3, #8]
800b430: f64f 72f7 movw r2, #65527 ; 0xfff7
800b434: 4293 cmp r3, r2
800b436: d902 bls.n 800b43e <udp_sendto_if_src+0xca>
return ERR_MEM;
800b438: f04f 33ff mov.w r3, #4294967295
800b43c: e06b b.n 800b516 <udp_sendto_if_src+0x1a2>
}
/* not enough space to add an UDP header to first pbuf in given p chain? */
if (pbuf_add_header(p, UDP_HLEN)) {
800b43e: 2108 movs r1, #8
800b440: 68b8 ldr r0, [r7, #8]
800b442: f7f9 ff87 bl 8005354 <pbuf_add_header>
800b446: 4603 mov r3, r0
800b448: 2b00 cmp r3, #0
800b44a: d015 beq.n 800b478 <udp_sendto_if_src+0x104>
/* allocate header in a separate new pbuf */
q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
800b44c: f44f 7220 mov.w r2, #640 ; 0x280
800b450: 2108 movs r1, #8
800b452: 2022 movs r0, #34 ; 0x22
800b454: f7f9 fd30 bl 8004eb8 <pbuf_alloc>
800b458: 61f8 str r0, [r7, #28]
/* new header pbuf could not be allocated? */
if (q == NULL) {
800b45a: 69fb ldr r3, [r7, #28]
800b45c: 2b00 cmp r3, #0
800b45e: d102 bne.n 800b466 <udp_sendto_if_src+0xf2>
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n"));
return ERR_MEM;
800b460: f04f 33ff mov.w r3, #4294967295
800b464: e057 b.n 800b516 <udp_sendto_if_src+0x1a2>
}
if (p->tot_len != 0) {
800b466: 68bb ldr r3, [r7, #8]
800b468: 891b ldrh r3, [r3, #8]
800b46a: 2b00 cmp r3, #0
800b46c: d006 beq.n 800b47c <udp_sendto_if_src+0x108>
/* chain header q in front of given pbuf p (only if p contains data) */
pbuf_chain(q, p);
800b46e: 68b9 ldr r1, [r7, #8]
800b470: 69f8 ldr r0, [r7, #28]
800b472: f7fa f91d bl 80056b0 <pbuf_chain>
800b476: e001 b.n 800b47c <udp_sendto_if_src+0x108>
LWIP_DEBUGF(UDP_DEBUG,
("udp_send: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p));
} else {
/* adding space for header within p succeeded */
/* first pbuf q equals given pbuf */
q = p;
800b478: 68bb ldr r3, [r7, #8]
800b47a: 61fb str r3, [r7, #28]
LWIP_DEBUGF(UDP_DEBUG, ("udp_send: added header in given pbuf %p\n", (void *)p));
}
LWIP_ASSERT("check that first pbuf can hold struct udp_hdr",
800b47c: 69fb ldr r3, [r7, #28]
800b47e: 895b ldrh r3, [r3, #10]
800b480: 2b07 cmp r3, #7
800b482: d806 bhi.n 800b492 <udp_sendto_if_src+0x11e>
800b484: 4b26 ldr r3, [pc, #152] ; (800b520 <udp_sendto_if_src+0x1ac>)
800b486: f240 320d movw r2, #781 ; 0x30d
800b48a: 492c ldr r1, [pc, #176] ; (800b53c <udp_sendto_if_src+0x1c8>)
800b48c: 4826 ldr r0, [pc, #152] ; (800b528 <udp_sendto_if_src+0x1b4>)
800b48e: f004 fd13 bl 800feb8 <printf>
(q->len >= sizeof(struct udp_hdr)));
/* q now represents the packet to be sent */
udphdr = (struct udp_hdr *)q->payload;
800b492: 69fb ldr r3, [r7, #28]
800b494: 685b ldr r3, [r3, #4]
800b496: 617b str r3, [r7, #20]
udphdr->src = lwip_htons(pcb->local_port);
800b498: 68fb ldr r3, [r7, #12]
800b49a: 8a5b ldrh r3, [r3, #18]
800b49c: 4618 mov r0, r3
800b49e: f7f8 fc85 bl 8003dac <lwip_htons>
800b4a2: 4603 mov r3, r0
800b4a4: 461a mov r2, r3
800b4a6: 697b ldr r3, [r7, #20]
800b4a8: 801a strh r2, [r3, #0]
udphdr->dest = lwip_htons(dst_port);
800b4aa: 887b ldrh r3, [r7, #2]
800b4ac: 4618 mov r0, r3
800b4ae: f7f8 fc7d bl 8003dac <lwip_htons>
800b4b2: 4603 mov r3, r0
800b4b4: 461a mov r2, r3
800b4b6: 697b ldr r3, [r7, #20]
800b4b8: 805a strh r2, [r3, #2]
/* in UDP, 0 checksum means 'no checksum' */
udphdr->chksum = 0x0000;
800b4ba: 697b ldr r3, [r7, #20]
800b4bc: 2200 movs r2, #0
800b4be: 719a strb r2, [r3, #6]
800b4c0: 2200 movs r2, #0
800b4c2: 71da strb r2, [r3, #7]
ip_proto = IP_PROTO_UDPLITE;
} else
#endif /* LWIP_UDPLITE */
{ /* UDP */
LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP packet length %"U16_F"\n", q->tot_len));
udphdr->len = lwip_htons(q->tot_len);
800b4c4: 69fb ldr r3, [r7, #28]
800b4c6: 891b ldrh r3, [r3, #8]
800b4c8: 4618 mov r0, r3
800b4ca: f7f8 fc6f bl 8003dac <lwip_htons>
800b4ce: 4603 mov r3, r0
800b4d0: 461a mov r2, r3
800b4d2: 697b ldr r3, [r7, #20]
800b4d4: 809a strh r2, [r3, #4]
}
udphdr->chksum = udpchksum;
}
}
#endif /* CHECKSUM_GEN_UDP */
ip_proto = IP_PROTO_UDP;
800b4d6: 2311 movs r3, #17
800b4d8: 74fb strb r3, [r7, #19]
/* Determine TTL to use */
#if LWIP_MULTICAST_TX_OPTIONS
ttl = (ip_addr_ismulticast(dst_ip) ? udp_get_multicast_ttl(pcb) : pcb->ttl);
#else /* LWIP_MULTICAST_TX_OPTIONS */
ttl = pcb->ttl;
800b4da: 68fb ldr r3, [r7, #12]
800b4dc: 7adb ldrb r3, [r3, #11]
800b4de: 74bb strb r3, [r7, #18]
LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04"X16_F"\n", udphdr->chksum));
LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,0x%02"X16_F",)\n", (u16_t)ip_proto));
/* output to IP */
NETIF_SET_HINTS(netif, &(pcb->netif_hints));
err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif);
800b4e0: 68fb ldr r3, [r7, #12]
800b4e2: 7a9b ldrb r3, [r3, #10]
800b4e4: 7cb9 ldrb r1, [r7, #18]
800b4e6: 6aba ldr r2, [r7, #40] ; 0x28
800b4e8: 9202 str r2, [sp, #8]
800b4ea: 7cfa ldrb r2, [r7, #19]
800b4ec: 9201 str r2, [sp, #4]
800b4ee: 9300 str r3, [sp, #0]
800b4f0: 460b mov r3, r1
800b4f2: 687a ldr r2, [r7, #4]
800b4f4: 6af9 ldr r1, [r7, #44] ; 0x2c
800b4f6: 69f8 ldr r0, [r7, #28]
800b4f8: f003 fb38 bl 800eb6c <ip4_output_if_src>
800b4fc: 4603 mov r3, r0
800b4fe: 76fb strb r3, [r7, #27]
/* @todo: must this be increased even if error occurred? */
MIB2_STATS_INC(mib2.udpoutdatagrams);
/* did we chain a separate header pbuf earlier? */
if (q != p) {
800b500: 69fa ldr r2, [r7, #28]
800b502: 68bb ldr r3, [r7, #8]
800b504: 429a cmp r2, r3
800b506: d004 beq.n 800b512 <udp_sendto_if_src+0x19e>
/* free the header pbuf */
pbuf_free(q);
800b508: 69f8 ldr r0, [r7, #28]
800b50a: f7f9 ffb9 bl 8005480 <pbuf_free>
q = NULL;
800b50e: 2300 movs r3, #0
800b510: 61fb str r3, [r7, #28]
/* p is still referenced by the caller, and will live on */
}
UDP_STATS_INC(udp.xmit);
return err;
800b512: f997 301b ldrsb.w r3, [r7, #27]
}
800b516: 4618 mov r0, r3
800b518: 3720 adds r7, #32
800b51a: 46bd mov sp, r7
800b51c: bd80 pop {r7, pc}
800b51e: bf00 nop
800b520: 08016990 .word 0x08016990
800b524: 08016b7c .word 0x08016b7c
800b528: 080169e4 .word 0x080169e4
800b52c: 08016b9c .word 0x08016b9c
800b530: 08016bbc .word 0x08016bbc
800b534: 08016be0 .word 0x08016be0
800b538: 08016c04 .word 0x08016c04
800b53c: 08016c28 .word 0x08016c28
0800b540 <udp_bind>:
*
* @see udp_disconnect()
*/
err_t
udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
{
800b540: b580 push {r7, lr}
800b542: b086 sub sp, #24
800b544: af00 add r7, sp, #0
800b546: 60f8 str r0, [r7, #12]
800b548: 60b9 str r1, [r7, #8]
800b54a: 4613 mov r3, r2
800b54c: 80fb strh r3, [r7, #6]
LWIP_ASSERT_CORE_LOCKED();
#if LWIP_IPV4
/* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
if (ipaddr == NULL) {
800b54e: 68bb ldr r3, [r7, #8]
800b550: 2b00 cmp r3, #0
800b552: d101 bne.n 800b558 <udp_bind+0x18>
ipaddr = IP4_ADDR_ANY;
800b554: 4b39 ldr r3, [pc, #228] ; (800b63c <udp_bind+0xfc>)
800b556: 60bb str r3, [r7, #8]
}
#else /* LWIP_IPV4 */
LWIP_ERROR("udp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
#endif /* LWIP_IPV4 */
LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
800b558: 68fb ldr r3, [r7, #12]
800b55a: 2b00 cmp r3, #0
800b55c: d109 bne.n 800b572 <udp_bind+0x32>
800b55e: 4b38 ldr r3, [pc, #224] ; (800b640 <udp_bind+0x100>)
800b560: f240 32b7 movw r2, #951 ; 0x3b7
800b564: 4937 ldr r1, [pc, #220] ; (800b644 <udp_bind+0x104>)
800b566: 4838 ldr r0, [pc, #224] ; (800b648 <udp_bind+0x108>)
800b568: f004 fca6 bl 800feb8 <printf>
800b56c: f06f 030f mvn.w r3, #15
800b570: e060 b.n 800b634 <udp_bind+0xf4>
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = "));
ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr);
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port));
rebind = 0;
800b572: 2300 movs r3, #0
800b574: 74fb strb r3, [r7, #19]
/* Check for double bind and rebind of the same pcb */
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800b576: 4b35 ldr r3, [pc, #212] ; (800b64c <udp_bind+0x10c>)
800b578: 681b ldr r3, [r3, #0]
800b57a: 617b str r3, [r7, #20]
800b57c: e009 b.n 800b592 <udp_bind+0x52>
/* is this UDP PCB already on active list? */
if (pcb == ipcb) {
800b57e: 68fa ldr r2, [r7, #12]
800b580: 697b ldr r3, [r7, #20]
800b582: 429a cmp r2, r3
800b584: d102 bne.n 800b58c <udp_bind+0x4c>
rebind = 1;
800b586: 2301 movs r3, #1
800b588: 74fb strb r3, [r7, #19]
break;
800b58a: e005 b.n 800b598 <udp_bind+0x58>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800b58c: 697b ldr r3, [r7, #20]
800b58e: 68db ldr r3, [r3, #12]
800b590: 617b str r3, [r7, #20]
800b592: 697b ldr r3, [r7, #20]
800b594: 2b00 cmp r3, #0
800b596: d1f2 bne.n 800b57e <udp_bind+0x3e>
ipaddr = &zoned_ipaddr;
}
#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
/* no port specified? */
if (port == 0) {
800b598: 88fb ldrh r3, [r7, #6]
800b59a: 2b00 cmp r3, #0
800b59c: d109 bne.n 800b5b2 <udp_bind+0x72>
port = udp_new_port();
800b59e: f7ff fcc5 bl 800af2c <udp_new_port>
800b5a2: 4603 mov r3, r0
800b5a4: 80fb strh r3, [r7, #6]
if (port == 0) {
800b5a6: 88fb ldrh r3, [r7, #6]
800b5a8: 2b00 cmp r3, #0
800b5aa: d12c bne.n 800b606 <udp_bind+0xc6>
/* no more ports available in local range */
LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n"));
return ERR_USE;
800b5ac: f06f 0307 mvn.w r3, #7
800b5b0: e040 b.n 800b634 <udp_bind+0xf4>
}
} else {
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800b5b2: 4b26 ldr r3, [pc, #152] ; (800b64c <udp_bind+0x10c>)
800b5b4: 681b ldr r3, [r3, #0]
800b5b6: 617b str r3, [r7, #20]
800b5b8: e022 b.n 800b600 <udp_bind+0xc0>
if (pcb != ipcb) {
800b5ba: 68fa ldr r2, [r7, #12]
800b5bc: 697b ldr r3, [r7, #20]
800b5be: 429a cmp r2, r3
800b5c0: d01b beq.n 800b5fa <udp_bind+0xba>
if (!ip_get_option(pcb, SOF_REUSEADDR) ||
!ip_get_option(ipcb, SOF_REUSEADDR))
#endif /* SO_REUSE */
{
/* port matches that of PCB in list and REUSEADDR not set -> reject */
if ((ipcb->local_port == port) &&
800b5c2: 697b ldr r3, [r7, #20]
800b5c4: 8a5b ldrh r3, [r3, #18]
800b5c6: 88fa ldrh r2, [r7, #6]
800b5c8: 429a cmp r2, r3
800b5ca: d116 bne.n 800b5fa <udp_bind+0xba>
/* IP address matches or any IP used? */
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
800b5cc: 697b ldr r3, [r7, #20]
800b5ce: 681a ldr r2, [r3, #0]
800b5d0: 68bb ldr r3, [r7, #8]
800b5d2: 681b ldr r3, [r3, #0]
if ((ipcb->local_port == port) &&
800b5d4: 429a cmp r2, r3
800b5d6: d00d beq.n 800b5f4 <udp_bind+0xb4>
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
800b5d8: 68bb ldr r3, [r7, #8]
800b5da: 2b00 cmp r3, #0
800b5dc: d00a beq.n 800b5f4 <udp_bind+0xb4>
800b5de: 68bb ldr r3, [r7, #8]
800b5e0: 681b ldr r3, [r3, #0]
800b5e2: 2b00 cmp r3, #0
800b5e4: d006 beq.n 800b5f4 <udp_bind+0xb4>
ip_addr_isany(&ipcb->local_ip))) {
800b5e6: 697b ldr r3, [r7, #20]
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
800b5e8: 2b00 cmp r3, #0
800b5ea: d003 beq.n 800b5f4 <udp_bind+0xb4>
ip_addr_isany(&ipcb->local_ip))) {
800b5ec: 697b ldr r3, [r7, #20]
800b5ee: 681b ldr r3, [r3, #0]
800b5f0: 2b00 cmp r3, #0
800b5f2: d102 bne.n 800b5fa <udp_bind+0xba>
/* other PCB already binds to this local IP and port */
LWIP_DEBUGF(UDP_DEBUG,
("udp_bind: local port %"U16_F" already bound by another pcb\n", port));
return ERR_USE;
800b5f4: f06f 0307 mvn.w r3, #7
800b5f8: e01c b.n 800b634 <udp_bind+0xf4>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800b5fa: 697b ldr r3, [r7, #20]
800b5fc: 68db ldr r3, [r3, #12]
800b5fe: 617b str r3, [r7, #20]
800b600: 697b ldr r3, [r7, #20]
800b602: 2b00 cmp r3, #0
800b604: d1d9 bne.n 800b5ba <udp_bind+0x7a>
}
}
}
}
ip_addr_set_ipaddr(&pcb->local_ip, ipaddr);
800b606: 68bb ldr r3, [r7, #8]
800b608: 2b00 cmp r3, #0
800b60a: d002 beq.n 800b612 <udp_bind+0xd2>
800b60c: 68bb ldr r3, [r7, #8]
800b60e: 681b ldr r3, [r3, #0]
800b610: e000 b.n 800b614 <udp_bind+0xd4>
800b612: 2300 movs r3, #0
800b614: 68fa ldr r2, [r7, #12]
800b616: 6013 str r3, [r2, #0]
pcb->local_port = port;
800b618: 68fb ldr r3, [r7, #12]
800b61a: 88fa ldrh r2, [r7, #6]
800b61c: 825a strh r2, [r3, #18]
mib2_udp_bind(pcb);
/* pcb not active yet? */
if (rebind == 0) {
800b61e: 7cfb ldrb r3, [r7, #19]
800b620: 2b00 cmp r3, #0
800b622: d106 bne.n 800b632 <udp_bind+0xf2>
/* place the PCB on the active list if not already there */
pcb->next = udp_pcbs;
800b624: 4b09 ldr r3, [pc, #36] ; (800b64c <udp_bind+0x10c>)
800b626: 681a ldr r2, [r3, #0]
800b628: 68fb ldr r3, [r7, #12]
800b62a: 60da str r2, [r3, #12]
udp_pcbs = pcb;
800b62c: 4a07 ldr r2, [pc, #28] ; (800b64c <udp_bind+0x10c>)
800b62e: 68fb ldr r3, [r7, #12]
800b630: 6013 str r3, [r2, #0]
}
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to "));
ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, pcb->local_ip);
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->local_port));
return ERR_OK;
800b632: 2300 movs r3, #0
}
800b634: 4618 mov r0, r3
800b636: 3718 adds r7, #24
800b638: 46bd mov sp, r7
800b63a: bd80 pop {r7, pc}
800b63c: 080178c4 .word 0x080178c4
800b640: 08016990 .word 0x08016990
800b644: 08016c58 .word 0x08016c58
800b648: 080169e4 .word 0x080169e4
800b64c: 20008c08 .word 0x20008c08
0800b650 <udp_connect>:
*
* @see udp_disconnect()
*/
err_t
udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
{
800b650: b580 push {r7, lr}
800b652: b086 sub sp, #24
800b654: af00 add r7, sp, #0
800b656: 60f8 str r0, [r7, #12]
800b658: 60b9 str r1, [r7, #8]
800b65a: 4613 mov r3, r2
800b65c: 80fb strh r3, [r7, #6]
struct udp_pcb *ipcb;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
800b65e: 68fb ldr r3, [r7, #12]
800b660: 2b00 cmp r3, #0
800b662: d109 bne.n 800b678 <udp_connect+0x28>
800b664: 4b2c ldr r3, [pc, #176] ; (800b718 <udp_connect+0xc8>)
800b666: f240 4235 movw r2, #1077 ; 0x435
800b66a: 492c ldr r1, [pc, #176] ; (800b71c <udp_connect+0xcc>)
800b66c: 482c ldr r0, [pc, #176] ; (800b720 <udp_connect+0xd0>)
800b66e: f004 fc23 bl 800feb8 <printf>
800b672: f06f 030f mvn.w r3, #15
800b676: e04b b.n 800b710 <udp_connect+0xc0>
LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
800b678: 68bb ldr r3, [r7, #8]
800b67a: 2b00 cmp r3, #0
800b67c: d109 bne.n 800b692 <udp_connect+0x42>
800b67e: 4b26 ldr r3, [pc, #152] ; (800b718 <udp_connect+0xc8>)
800b680: f240 4236 movw r2, #1078 ; 0x436
800b684: 4927 ldr r1, [pc, #156] ; (800b724 <udp_connect+0xd4>)
800b686: 4826 ldr r0, [pc, #152] ; (800b720 <udp_connect+0xd0>)
800b688: f004 fc16 bl 800feb8 <printf>
800b68c: f06f 030f mvn.w r3, #15
800b690: e03e b.n 800b710 <udp_connect+0xc0>
if (pcb->local_port == 0) {
800b692: 68fb ldr r3, [r7, #12]
800b694: 8a5b ldrh r3, [r3, #18]
800b696: 2b00 cmp r3, #0
800b698: d10f bne.n 800b6ba <udp_connect+0x6a>
err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
800b69a: 68f9 ldr r1, [r7, #12]
800b69c: 68fb ldr r3, [r7, #12]
800b69e: 8a5b ldrh r3, [r3, #18]
800b6a0: 461a mov r2, r3
800b6a2: 68f8 ldr r0, [r7, #12]
800b6a4: f7ff ff4c bl 800b540 <udp_bind>
800b6a8: 4603 mov r3, r0
800b6aa: 74fb strb r3, [r7, #19]
if (err != ERR_OK) {
800b6ac: f997 3013 ldrsb.w r3, [r7, #19]
800b6b0: 2b00 cmp r3, #0
800b6b2: d002 beq.n 800b6ba <udp_connect+0x6a>
return err;
800b6b4: f997 3013 ldrsb.w r3, [r7, #19]
800b6b8: e02a b.n 800b710 <udp_connect+0xc0>
}
}
ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr);
800b6ba: 68bb ldr r3, [r7, #8]
800b6bc: 2b00 cmp r3, #0
800b6be: d002 beq.n 800b6c6 <udp_connect+0x76>
800b6c0: 68bb ldr r3, [r7, #8]
800b6c2: 681b ldr r3, [r3, #0]
800b6c4: e000 b.n 800b6c8 <udp_connect+0x78>
800b6c6: 2300 movs r3, #0
800b6c8: 68fa ldr r2, [r7, #12]
800b6ca: 6053 str r3, [r2, #4]
ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNKNOWN)) {
ip6_addr_select_zone(ip_2_ip6(&pcb->remote_ip), ip_2_ip6(&pcb->local_ip));
}
#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
pcb->remote_port = port;
800b6cc: 68fb ldr r3, [r7, #12]
800b6ce: 88fa ldrh r2, [r7, #6]
800b6d0: 829a strh r2, [r3, #20]
pcb->flags |= UDP_FLAGS_CONNECTED;
800b6d2: 68fb ldr r3, [r7, #12]
800b6d4: 7c1b ldrb r3, [r3, #16]
800b6d6: f043 0304 orr.w r3, r3, #4
800b6da: b2da uxtb r2, r3
800b6dc: 68fb ldr r3, [r7, #12]
800b6de: 741a strb r2, [r3, #16]
ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
pcb->remote_ip);
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->remote_port));
/* Insert UDP PCB into the list of active UDP PCBs. */
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800b6e0: 4b11 ldr r3, [pc, #68] ; (800b728 <udp_connect+0xd8>)
800b6e2: 681b ldr r3, [r3, #0]
800b6e4: 617b str r3, [r7, #20]
800b6e6: e008 b.n 800b6fa <udp_connect+0xaa>
if (pcb == ipcb) {
800b6e8: 68fa ldr r2, [r7, #12]
800b6ea: 697b ldr r3, [r7, #20]
800b6ec: 429a cmp r2, r3
800b6ee: d101 bne.n 800b6f4 <udp_connect+0xa4>
/* already on the list, just return */
return ERR_OK;
800b6f0: 2300 movs r3, #0
800b6f2: e00d b.n 800b710 <udp_connect+0xc0>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
800b6f4: 697b ldr r3, [r7, #20]
800b6f6: 68db ldr r3, [r3, #12]
800b6f8: 617b str r3, [r7, #20]
800b6fa: 697b ldr r3, [r7, #20]
800b6fc: 2b00 cmp r3, #0
800b6fe: d1f3 bne.n 800b6e8 <udp_connect+0x98>
}
}
/* PCB not yet on the list, add PCB now */
pcb->next = udp_pcbs;
800b700: 4b09 ldr r3, [pc, #36] ; (800b728 <udp_connect+0xd8>)
800b702: 681a ldr r2, [r3, #0]
800b704: 68fb ldr r3, [r7, #12]
800b706: 60da str r2, [r3, #12]
udp_pcbs = pcb;
800b708: 4a07 ldr r2, [pc, #28] ; (800b728 <udp_connect+0xd8>)
800b70a: 68fb ldr r3, [r7, #12]
800b70c: 6013 str r3, [r2, #0]
return ERR_OK;
800b70e: 2300 movs r3, #0
}
800b710: 4618 mov r0, r3
800b712: 3718 adds r7, #24
800b714: 46bd mov sp, r7
800b716: bd80 pop {r7, pc}
800b718: 08016990 .word 0x08016990
800b71c: 08016c70 .word 0x08016c70
800b720: 080169e4 .word 0x080169e4
800b724: 08016c8c .word 0x08016c8c
800b728: 20008c08 .word 0x20008c08
0800b72c <udp_recv>:
* @param recv function pointer of the callback function
* @param recv_arg additional argument to pass to the callback function
*/
void
udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg)
{
800b72c: b580 push {r7, lr}
800b72e: b084 sub sp, #16
800b730: af00 add r7, sp, #0
800b732: 60f8 str r0, [r7, #12]
800b734: 60b9 str r1, [r7, #8]
800b736: 607a str r2, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return);
800b738: 68fb ldr r3, [r7, #12]
800b73a: 2b00 cmp r3, #0
800b73c: d107 bne.n 800b74e <udp_recv+0x22>
800b73e: 4b08 ldr r3, [pc, #32] ; (800b760 <udp_recv+0x34>)
800b740: f240 428a movw r2, #1162 ; 0x48a
800b744: 4907 ldr r1, [pc, #28] ; (800b764 <udp_recv+0x38>)
800b746: 4808 ldr r0, [pc, #32] ; (800b768 <udp_recv+0x3c>)
800b748: f004 fbb6 bl 800feb8 <printf>
800b74c: e005 b.n 800b75a <udp_recv+0x2e>
/* remember recv() callback and user data */
pcb->recv = recv;
800b74e: 68fb ldr r3, [r7, #12]
800b750: 68ba ldr r2, [r7, #8]
800b752: 619a str r2, [r3, #24]
pcb->recv_arg = recv_arg;
800b754: 68fb ldr r3, [r7, #12]
800b756: 687a ldr r2, [r7, #4]
800b758: 61da str r2, [r3, #28]
}
800b75a: 3710 adds r7, #16
800b75c: 46bd mov sp, r7
800b75e: bd80 pop {r7, pc}
800b760: 08016990 .word 0x08016990
800b764: 08016cc4 .word 0x08016cc4
800b768: 080169e4 .word 0x080169e4
0800b76c <udp_remove>:
*
* @see udp_new()
*/
void
udp_remove(struct udp_pcb *pcb)
{
800b76c: b580 push {r7, lr}
800b76e: b084 sub sp, #16
800b770: af00 add r7, sp, #0
800b772: 6078 str r0, [r7, #4]
struct udp_pcb *pcb2;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return);
800b774: 687b ldr r3, [r7, #4]
800b776: 2b00 cmp r3, #0
800b778: d107 bne.n 800b78a <udp_remove+0x1e>
800b77a: 4b19 ldr r3, [pc, #100] ; (800b7e0 <udp_remove+0x74>)
800b77c: f240 42a1 movw r2, #1185 ; 0x4a1
800b780: 4918 ldr r1, [pc, #96] ; (800b7e4 <udp_remove+0x78>)
800b782: 4819 ldr r0, [pc, #100] ; (800b7e8 <udp_remove+0x7c>)
800b784: f004 fb98 bl 800feb8 <printf>
800b788: e026 b.n 800b7d8 <udp_remove+0x6c>
mib2_udp_unbind(pcb);
/* pcb to be removed is first in list? */
if (udp_pcbs == pcb) {
800b78a: 4b18 ldr r3, [pc, #96] ; (800b7ec <udp_remove+0x80>)
800b78c: 681b ldr r3, [r3, #0]
800b78e: 687a ldr r2, [r7, #4]
800b790: 429a cmp r2, r3
800b792: d105 bne.n 800b7a0 <udp_remove+0x34>
/* make list start at 2nd pcb */
udp_pcbs = udp_pcbs->next;
800b794: 4b15 ldr r3, [pc, #84] ; (800b7ec <udp_remove+0x80>)
800b796: 681b ldr r3, [r3, #0]
800b798: 68db ldr r3, [r3, #12]
800b79a: 4a14 ldr r2, [pc, #80] ; (800b7ec <udp_remove+0x80>)
800b79c: 6013 str r3, [r2, #0]
800b79e: e017 b.n 800b7d0 <udp_remove+0x64>
/* pcb not 1st in list */
} else {
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
800b7a0: 4b12 ldr r3, [pc, #72] ; (800b7ec <udp_remove+0x80>)
800b7a2: 681b ldr r3, [r3, #0]
800b7a4: 60fb str r3, [r7, #12]
800b7a6: e010 b.n 800b7ca <udp_remove+0x5e>
/* find pcb in udp_pcbs list */
if (pcb2->next != NULL && pcb2->next == pcb) {
800b7a8: 68fb ldr r3, [r7, #12]
800b7aa: 68db ldr r3, [r3, #12]
800b7ac: 2b00 cmp r3, #0
800b7ae: d009 beq.n 800b7c4 <udp_remove+0x58>
800b7b0: 68fb ldr r3, [r7, #12]
800b7b2: 68db ldr r3, [r3, #12]
800b7b4: 687a ldr r2, [r7, #4]
800b7b6: 429a cmp r2, r3
800b7b8: d104 bne.n 800b7c4 <udp_remove+0x58>
/* remove pcb from list */
pcb2->next = pcb->next;
800b7ba: 687b ldr r3, [r7, #4]
800b7bc: 68da ldr r2, [r3, #12]
800b7be: 68fb ldr r3, [r7, #12]
800b7c0: 60da str r2, [r3, #12]
break;
800b7c2: e005 b.n 800b7d0 <udp_remove+0x64>
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
800b7c4: 68fb ldr r3, [r7, #12]
800b7c6: 68db ldr r3, [r3, #12]
800b7c8: 60fb str r3, [r7, #12]
800b7ca: 68fb ldr r3, [r7, #12]
800b7cc: 2b00 cmp r3, #0
800b7ce: d1eb bne.n 800b7a8 <udp_remove+0x3c>
}
}
}
memp_free(MEMP_UDP_PCB, pcb);
800b7d0: 6879 ldr r1, [r7, #4]
800b7d2: 2000 movs r0, #0
800b7d4: f7f8 ffd2 bl 800477c <memp_free>
}
800b7d8: 3710 adds r7, #16
800b7da: 46bd mov sp, r7
800b7dc: bd80 pop {r7, pc}
800b7de: bf00 nop
800b7e0: 08016990 .word 0x08016990
800b7e4: 08016cdc .word 0x08016cdc
800b7e8: 080169e4 .word 0x080169e4
800b7ec: 20008c08 .word 0x20008c08
0800b7f0 <udp_new>:
*
* @see udp_remove()
*/
struct udp_pcb *
udp_new(void)
{
800b7f0: b580 push {r7, lr}
800b7f2: b082 sub sp, #8
800b7f4: af00 add r7, sp, #0
struct udp_pcb *pcb;
LWIP_ASSERT_CORE_LOCKED();
pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB);
800b7f6: 2000 movs r0, #0
800b7f8: f7f8 ff50 bl 800469c <memp_malloc>
800b7fc: 6078 str r0, [r7, #4]
/* could allocate UDP PCB? */
if (pcb != NULL) {
800b7fe: 687b ldr r3, [r7, #4]
800b800: 2b00 cmp r3, #0
800b802: d007 beq.n 800b814 <udp_new+0x24>
/* UDP Lite: by initializing to all zeroes, chksum_len is set to 0
* which means checksum is generated over the whole datagram per default
* (recommended as default by RFC 3828). */
/* initialize PCB to all zeroes */
memset(pcb, 0, sizeof(struct udp_pcb));
800b804: 2220 movs r2, #32
800b806: 2100 movs r1, #0
800b808: 6878 ldr r0, [r7, #4]
800b80a: f004 fb4d bl 800fea8 <memset>
pcb->ttl = UDP_TTL;
800b80e: 687b ldr r3, [r7, #4]
800b810: 22ff movs r2, #255 ; 0xff
800b812: 72da strb r2, [r3, #11]
#if LWIP_MULTICAST_TX_OPTIONS
udp_set_multicast_ttl(pcb, UDP_TTL);
#endif /* LWIP_MULTICAST_TX_OPTIONS */
}
return pcb;
800b814: 687b ldr r3, [r7, #4]
}
800b816: 4618 mov r0, r3
800b818: 3708 adds r7, #8
800b81a: 46bd mov sp, r7
800b81c: bd80 pop {r7, pc}
...
0800b820 <udp_netif_ip_addr_changed>:
*
* @param old_addr IP address of the netif before change
* @param new_addr IP address of the netif after change
*/
void udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
{
800b820: b480 push {r7}
800b822: b085 sub sp, #20
800b824: af00 add r7, sp, #0
800b826: 6078 str r0, [r7, #4]
800b828: 6039 str r1, [r7, #0]
struct udp_pcb *upcb;
if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) {
800b82a: 687b ldr r3, [r7, #4]
800b82c: 2b00 cmp r3, #0
800b82e: d01e beq.n 800b86e <udp_netif_ip_addr_changed+0x4e>
800b830: 687b ldr r3, [r7, #4]
800b832: 681b ldr r3, [r3, #0]
800b834: 2b00 cmp r3, #0
800b836: d01a beq.n 800b86e <udp_netif_ip_addr_changed+0x4e>
800b838: 683b ldr r3, [r7, #0]
800b83a: 2b00 cmp r3, #0
800b83c: d017 beq.n 800b86e <udp_netif_ip_addr_changed+0x4e>
800b83e: 683b ldr r3, [r7, #0]
800b840: 681b ldr r3, [r3, #0]
800b842: 2b00 cmp r3, #0
800b844: d013 beq.n 800b86e <udp_netif_ip_addr_changed+0x4e>
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
800b846: 4b0d ldr r3, [pc, #52] ; (800b87c <udp_netif_ip_addr_changed+0x5c>)
800b848: 681b ldr r3, [r3, #0]
800b84a: 60fb str r3, [r7, #12]
800b84c: e00c b.n 800b868 <udp_netif_ip_addr_changed+0x48>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&upcb->local_ip, old_addr)) {
800b84e: 68fb ldr r3, [r7, #12]
800b850: 681a ldr r2, [r3, #0]
800b852: 687b ldr r3, [r7, #4]
800b854: 681b ldr r3, [r3, #0]
800b856: 429a cmp r2, r3
800b858: d103 bne.n 800b862 <udp_netif_ip_addr_changed+0x42>
/* The PCB is bound to the old ipaddr and
* is set to bound to the new one instead */
ip_addr_copy(upcb->local_ip, *new_addr);
800b85a: 683b ldr r3, [r7, #0]
800b85c: 681a ldr r2, [r3, #0]
800b85e: 68fb ldr r3, [r7, #12]
800b860: 601a str r2, [r3, #0]
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
800b862: 68fb ldr r3, [r7, #12]
800b864: 68db ldr r3, [r3, #12]
800b866: 60fb str r3, [r7, #12]
800b868: 68fb ldr r3, [r7, #12]
800b86a: 2b00 cmp r3, #0
800b86c: d1ef bne.n 800b84e <udp_netif_ip_addr_changed+0x2e>
}
}
}
}
800b86e: bf00 nop
800b870: 3714 adds r7, #20
800b872: 46bd mov sp, r7
800b874: f85d 7b04 ldr.w r7, [sp], #4
800b878: 4770 bx lr
800b87a: bf00 nop
800b87c: 20008c08 .word 0x20008c08
0800b880 <dhcp_inc_pcb_refcount>:
static void dhcp_option_trailer(u16_t options_out_len, u8_t *options, struct pbuf *p_out);
/** Ensure DHCP PCB is allocated and bound */
static err_t
dhcp_inc_pcb_refcount(void)
{
800b880: b580 push {r7, lr}
800b882: af00 add r7, sp, #0
if (dhcp_pcb_refcount == 0) {
800b884: 4b20 ldr r3, [pc, #128] ; (800b908 <dhcp_inc_pcb_refcount+0x88>)
800b886: 781b ldrb r3, [r3, #0]
800b888: 2b00 cmp r3, #0
800b88a: d133 bne.n 800b8f4 <dhcp_inc_pcb_refcount+0x74>
LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL);
800b88c: 4b1f ldr r3, [pc, #124] ; (800b90c <dhcp_inc_pcb_refcount+0x8c>)
800b88e: 681b ldr r3, [r3, #0]
800b890: 2b00 cmp r3, #0
800b892: d005 beq.n 800b8a0 <dhcp_inc_pcb_refcount+0x20>
800b894: 4b1e ldr r3, [pc, #120] ; (800b910 <dhcp_inc_pcb_refcount+0x90>)
800b896: 22e5 movs r2, #229 ; 0xe5
800b898: 491e ldr r1, [pc, #120] ; (800b914 <dhcp_inc_pcb_refcount+0x94>)
800b89a: 481f ldr r0, [pc, #124] ; (800b918 <dhcp_inc_pcb_refcount+0x98>)
800b89c: f004 fb0c bl 800feb8 <printf>
/* allocate UDP PCB */
dhcp_pcb = udp_new();
800b8a0: f7ff ffa6 bl 800b7f0 <udp_new>
800b8a4: 4603 mov r3, r0
800b8a6: 4a19 ldr r2, [pc, #100] ; (800b90c <dhcp_inc_pcb_refcount+0x8c>)
800b8a8: 6013 str r3, [r2, #0]
if (dhcp_pcb == NULL) {
800b8aa: 4b18 ldr r3, [pc, #96] ; (800b90c <dhcp_inc_pcb_refcount+0x8c>)
800b8ac: 681b ldr r3, [r3, #0]
800b8ae: 2b00 cmp r3, #0
800b8b0: d102 bne.n 800b8b8 <dhcp_inc_pcb_refcount+0x38>
return ERR_MEM;
800b8b2: f04f 33ff mov.w r3, #4294967295
800b8b6: e024 b.n 800b902 <dhcp_inc_pcb_refcount+0x82>
}
ip_set_option(dhcp_pcb, SOF_BROADCAST);
800b8b8: 4b14 ldr r3, [pc, #80] ; (800b90c <dhcp_inc_pcb_refcount+0x8c>)
800b8ba: 681b ldr r3, [r3, #0]
800b8bc: 7a5a ldrb r2, [r3, #9]
800b8be: 4b13 ldr r3, [pc, #76] ; (800b90c <dhcp_inc_pcb_refcount+0x8c>)
800b8c0: 681b ldr r3, [r3, #0]
800b8c2: f042 0220 orr.w r2, r2, #32
800b8c6: b2d2 uxtb r2, r2
800b8c8: 725a strb r2, [r3, #9]
/* set up local and remote port for the pcb -> listen on all interfaces on all src/dest IPs */
udp_bind(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_CLIENT);
800b8ca: 4b10 ldr r3, [pc, #64] ; (800b90c <dhcp_inc_pcb_refcount+0x8c>)
800b8cc: 681b ldr r3, [r3, #0]
800b8ce: 2244 movs r2, #68 ; 0x44
800b8d0: 4912 ldr r1, [pc, #72] ; (800b91c <dhcp_inc_pcb_refcount+0x9c>)
800b8d2: 4618 mov r0, r3
800b8d4: f7ff fe34 bl 800b540 <udp_bind>
udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER);
800b8d8: 4b0c ldr r3, [pc, #48] ; (800b90c <dhcp_inc_pcb_refcount+0x8c>)
800b8da: 681b ldr r3, [r3, #0]
800b8dc: 2243 movs r2, #67 ; 0x43
800b8de: 490f ldr r1, [pc, #60] ; (800b91c <dhcp_inc_pcb_refcount+0x9c>)
800b8e0: 4618 mov r0, r3
800b8e2: f7ff feb5 bl 800b650 <udp_connect>
udp_recv(dhcp_pcb, dhcp_recv, NULL);
800b8e6: 4b09 ldr r3, [pc, #36] ; (800b90c <dhcp_inc_pcb_refcount+0x8c>)
800b8e8: 681b ldr r3, [r3, #0]
800b8ea: 2200 movs r2, #0
800b8ec: 490c ldr r1, [pc, #48] ; (800b920 <dhcp_inc_pcb_refcount+0xa0>)
800b8ee: 4618 mov r0, r3
800b8f0: f7ff ff1c bl 800b72c <udp_recv>
}
dhcp_pcb_refcount++;
800b8f4: 4b04 ldr r3, [pc, #16] ; (800b908 <dhcp_inc_pcb_refcount+0x88>)
800b8f6: 781b ldrb r3, [r3, #0]
800b8f8: 3301 adds r3, #1
800b8fa: b2da uxtb r2, r3
800b8fc: 4b02 ldr r3, [pc, #8] ; (800b908 <dhcp_inc_pcb_refcount+0x88>)
800b8fe: 701a strb r2, [r3, #0]
return ERR_OK;
800b900: 2300 movs r3, #0
}
800b902: 4618 mov r0, r3
800b904: bd80 pop {r7, pc}
800b906: bf00 nop
800b908: 20008c38 .word 0x20008c38
800b90c: 20008c34 .word 0x20008c34
800b910: 08016cf4 .word 0x08016cf4
800b914: 08016d2c .word 0x08016d2c
800b918: 08016d54 .word 0x08016d54
800b91c: 080178c4 .word 0x080178c4
800b920: 0800d1b5 .word 0x0800d1b5
0800b924 <dhcp_dec_pcb_refcount>:
/** Free DHCP PCB if the last netif stops using it */
static void
dhcp_dec_pcb_refcount(void)
{
800b924: b580 push {r7, lr}
800b926: af00 add r7, sp, #0
LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0));
800b928: 4b0e ldr r3, [pc, #56] ; (800b964 <dhcp_dec_pcb_refcount+0x40>)
800b92a: 781b ldrb r3, [r3, #0]
800b92c: 2b00 cmp r3, #0
800b92e: d105 bne.n 800b93c <dhcp_dec_pcb_refcount+0x18>
800b930: 4b0d ldr r3, [pc, #52] ; (800b968 <dhcp_dec_pcb_refcount+0x44>)
800b932: 22ff movs r2, #255 ; 0xff
800b934: 490d ldr r1, [pc, #52] ; (800b96c <dhcp_dec_pcb_refcount+0x48>)
800b936: 480e ldr r0, [pc, #56] ; (800b970 <dhcp_dec_pcb_refcount+0x4c>)
800b938: f004 fabe bl 800feb8 <printf>
dhcp_pcb_refcount--;
800b93c: 4b09 ldr r3, [pc, #36] ; (800b964 <dhcp_dec_pcb_refcount+0x40>)
800b93e: 781b ldrb r3, [r3, #0]
800b940: 3b01 subs r3, #1
800b942: b2da uxtb r2, r3
800b944: 4b07 ldr r3, [pc, #28] ; (800b964 <dhcp_dec_pcb_refcount+0x40>)
800b946: 701a strb r2, [r3, #0]
if (dhcp_pcb_refcount == 0) {
800b948: 4b06 ldr r3, [pc, #24] ; (800b964 <dhcp_dec_pcb_refcount+0x40>)
800b94a: 781b ldrb r3, [r3, #0]
800b94c: 2b00 cmp r3, #0
800b94e: d107 bne.n 800b960 <dhcp_dec_pcb_refcount+0x3c>
udp_remove(dhcp_pcb);
800b950: 4b08 ldr r3, [pc, #32] ; (800b974 <dhcp_dec_pcb_refcount+0x50>)
800b952: 681b ldr r3, [r3, #0]
800b954: 4618 mov r0, r3
800b956: f7ff ff09 bl 800b76c <udp_remove>
dhcp_pcb = NULL;
800b95a: 4b06 ldr r3, [pc, #24] ; (800b974 <dhcp_dec_pcb_refcount+0x50>)
800b95c: 2200 movs r2, #0
800b95e: 601a str r2, [r3, #0]
}
}
800b960: bf00 nop
800b962: bd80 pop {r7, pc}
800b964: 20008c38 .word 0x20008c38
800b968: 08016cf4 .word 0x08016cf4
800b96c: 08016d7c .word 0x08016d7c
800b970: 08016d54 .word 0x08016d54
800b974: 20008c34 .word 0x20008c34
0800b978 <dhcp_handle_nak>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_nak(struct netif *netif)
{
800b978: b580 push {r7, lr}
800b97a: b084 sub sp, #16
800b97c: af00 add r7, sp, #0
800b97e: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800b980: 687b ldr r3, [r7, #4]
800b982: 6a5b ldr r3, [r3, #36] ; 0x24
800b984: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n",
(void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
/* Change to a defined state - set this before assigning the address
to ensure the callback can use dhcp_supplied_address() */
dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF);
800b986: 210c movs r1, #12
800b988: 68f8 ldr r0, [r7, #12]
800b98a: f001 f855 bl 800ca38 <dhcp_set_state>
/* remove IP address from interface (must no longer be used, as per RFC2131) */
netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
800b98e: 4b06 ldr r3, [pc, #24] ; (800b9a8 <dhcp_handle_nak+0x30>)
800b990: 4a05 ldr r2, [pc, #20] ; (800b9a8 <dhcp_handle_nak+0x30>)
800b992: 4905 ldr r1, [pc, #20] ; (800b9a8 <dhcp_handle_nak+0x30>)
800b994: 6878 ldr r0, [r7, #4]
800b996: f7f9 f893 bl 8004ac0 <netif_set_addr>
/* We can immediately restart discovery */
dhcp_discover(netif);
800b99a: 6878 ldr r0, [r7, #4]
800b99c: f000 fc48 bl 800c230 <dhcp_discover>
}
800b9a0: bf00 nop
800b9a2: 3710 adds r7, #16
800b9a4: 46bd mov sp, r7
800b9a6: bd80 pop {r7, pc}
800b9a8: 080178c4 .word 0x080178c4
0800b9ac <dhcp_check>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_check(struct netif *netif)
{
800b9ac: b580 push {r7, lr}
800b9ae: b084 sub sp, #16
800b9b0: af00 add r7, sp, #0
800b9b2: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800b9b4: 687b ldr r3, [r7, #4]
800b9b6: 6a5b ldr r3, [r3, #36] ; 0x24
800b9b8: 60fb str r3, [r7, #12]
err_t result;
u16_t msecs;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_check(netif=%p) %c%c\n", (void *)netif, (s16_t)netif->name[0],
(s16_t)netif->name[1]));
dhcp_set_state(dhcp, DHCP_STATE_CHECKING);
800b9ba: 2108 movs r1, #8
800b9bc: 68f8 ldr r0, [r7, #12]
800b9be: f001 f83b bl 800ca38 <dhcp_set_state>
/* create an ARP query for the offered IP address, expecting that no host
responds, as the IP address should not be in use. */
result = etharp_query(netif, &dhcp->offered_ip_addr, NULL);
800b9c2: 68fb ldr r3, [r7, #12]
800b9c4: 331c adds r3, #28
800b9c6: 2200 movs r2, #0
800b9c8: 4619 mov r1, r3
800b9ca: 6878 ldr r0, [r7, #4]
800b9cc: f002 fb3c bl 800e048 <etharp_query>
800b9d0: 4603 mov r3, r0
800b9d2: 72fb strb r3, [r7, #11]
if (result != ERR_OK) {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_check: could not perform ARP query\n"));
}
if (dhcp->tries < 255) {
800b9d4: 68fb ldr r3, [r7, #12]
800b9d6: 799b ldrb r3, [r3, #6]
800b9d8: 2bff cmp r3, #255 ; 0xff
800b9da: d005 beq.n 800b9e8 <dhcp_check+0x3c>
dhcp->tries++;
800b9dc: 68fb ldr r3, [r7, #12]
800b9de: 799b ldrb r3, [r3, #6]
800b9e0: 3301 adds r3, #1
800b9e2: b2da uxtb r2, r3
800b9e4: 68fb ldr r3, [r7, #12]
800b9e6: 719a strb r2, [r3, #6]
}
msecs = 500;
800b9e8: f44f 73fa mov.w r3, #500 ; 0x1f4
800b9ec: 813b strh r3, [r7, #8]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800b9ee: 893b ldrh r3, [r7, #8]
800b9f0: f203 13f3 addw r3, r3, #499 ; 0x1f3
800b9f4: 4a06 ldr r2, [pc, #24] ; (800ba10 <dhcp_check+0x64>)
800b9f6: fb82 1203 smull r1, r2, r2, r3
800b9fa: 1152 asrs r2, r2, #5
800b9fc: 17db asrs r3, r3, #31
800b9fe: 1ad3 subs r3, r2, r3
800ba00: b29a uxth r2, r3
800ba02: 68fb ldr r3, [r7, #12]
800ba04: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_check(): set request timeout %"U16_F" msecs\n", msecs));
}
800ba06: bf00 nop
800ba08: 3710 adds r7, #16
800ba0a: 46bd mov sp, r7
800ba0c: bd80 pop {r7, pc}
800ba0e: bf00 nop
800ba10: 10624dd3 .word 0x10624dd3
0800ba14 <dhcp_handle_offer>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_offer(struct netif *netif, struct dhcp_msg *msg_in)
{
800ba14: b580 push {r7, lr}
800ba16: b084 sub sp, #16
800ba18: af00 add r7, sp, #0
800ba1a: 6078 str r0, [r7, #4]
800ba1c: 6039 str r1, [r7, #0]
struct dhcp *dhcp = netif_dhcp_data(netif);
800ba1e: 687b ldr r3, [r7, #4]
800ba20: 6a5b ldr r3, [r3, #36] ; 0x24
800ba22: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n",
(void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
/* obtain the server address */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) {
800ba24: 4b0c ldr r3, [pc, #48] ; (800ba58 <dhcp_handle_offer+0x44>)
800ba26: 789b ldrb r3, [r3, #2]
800ba28: 2b00 cmp r3, #0
800ba2a: d011 beq.n 800ba50 <dhcp_handle_offer+0x3c>
dhcp->request_timeout = 0; /* stop timer */
800ba2c: 68fb ldr r3, [r7, #12]
800ba2e: 2200 movs r2, #0
800ba30: 811a strh r2, [r3, #8]
ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID)));
800ba32: 4b0a ldr r3, [pc, #40] ; (800ba5c <dhcp_handle_offer+0x48>)
800ba34: 689b ldr r3, [r3, #8]
800ba36: 4618 mov r0, r3
800ba38: f7f8 f9cd bl 8003dd6 <lwip_htonl>
800ba3c: 4602 mov r2, r0
800ba3e: 68fb ldr r3, [r7, #12]
800ba40: 619a str r2, [r3, #24]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n",
ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr))));
/* remember offered address */
ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
800ba42: 683b ldr r3, [r7, #0]
800ba44: 691a ldr r2, [r3, #16]
800ba46: 68fb ldr r3, [r7, #12]
800ba48: 61da str r2, [r3, #28]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n",
ip4_addr_get_u32(&dhcp->offered_ip_addr)));
dhcp_select(netif);
800ba4a: 6878 ldr r0, [r7, #4]
800ba4c: f000 f808 bl 800ba60 <dhcp_select>
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("dhcp_handle_offer(netif=%p) did not get server ID!\n", (void *)netif));
}
}
800ba50: bf00 nop
800ba52: 3710 adds r7, #16
800ba54: 46bd mov sp, r7
800ba56: bd80 pop {r7, pc}
800ba58: 20008c2c .word 0x20008c2c
800ba5c: 20008c0c .word 0x20008c0c
0800ba60 <dhcp_select>:
* @param netif the netif under DHCP control
* @return lwIP specific error (see error.h)
*/
static err_t
dhcp_select(struct netif *netif)
{
800ba60: b5b0 push {r4, r5, r7, lr}
800ba62: b08a sub sp, #40 ; 0x28
800ba64: af02 add r7, sp, #8
800ba66: 6078 str r0, [r7, #4]
u16_t msecs;
u8_t i;
struct pbuf *p_out;
u16_t options_out_len;
LWIP_ERROR("dhcp_select: netif != NULL", (netif != NULL), return ERR_ARG;);
800ba68: 687b ldr r3, [r7, #4]
800ba6a: 2b00 cmp r3, #0
800ba6c: d109 bne.n 800ba82 <dhcp_select+0x22>
800ba6e: 4b71 ldr r3, [pc, #452] ; (800bc34 <dhcp_select+0x1d4>)
800ba70: f240 1277 movw r2, #375 ; 0x177
800ba74: 4970 ldr r1, [pc, #448] ; (800bc38 <dhcp_select+0x1d8>)
800ba76: 4871 ldr r0, [pc, #452] ; (800bc3c <dhcp_select+0x1dc>)
800ba78: f004 fa1e bl 800feb8 <printf>
800ba7c: f06f 030f mvn.w r3, #15
800ba80: e0d3 b.n 800bc2a <dhcp_select+0x1ca>
dhcp = netif_dhcp_data(netif);
800ba82: 687b ldr r3, [r7, #4]
800ba84: 6a5b ldr r3, [r3, #36] ; 0x24
800ba86: 61bb str r3, [r7, #24]
LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;);
800ba88: 69bb ldr r3, [r7, #24]
800ba8a: 2b00 cmp r3, #0
800ba8c: d109 bne.n 800baa2 <dhcp_select+0x42>
800ba8e: 4b69 ldr r3, [pc, #420] ; (800bc34 <dhcp_select+0x1d4>)
800ba90: f240 1279 movw r2, #377 ; 0x179
800ba94: 496a ldr r1, [pc, #424] ; (800bc40 <dhcp_select+0x1e0>)
800ba96: 4869 ldr r0, [pc, #420] ; (800bc3c <dhcp_select+0x1dc>)
800ba98: f004 fa0e bl 800feb8 <printf>
800ba9c: f06f 0305 mvn.w r3, #5
800baa0: e0c3 b.n 800bc2a <dhcp_select+0x1ca>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
dhcp_set_state(dhcp, DHCP_STATE_REQUESTING);
800baa2: 2101 movs r1, #1
800baa4: 69b8 ldr r0, [r7, #24]
800baa6: f000 ffc7 bl 800ca38 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
800baaa: f107 030c add.w r3, r7, #12
800baae: 2203 movs r2, #3
800bab0: 69b9 ldr r1, [r7, #24]
800bab2: 6878 ldr r0, [r7, #4]
800bab4: f001 fc4c bl 800d350 <dhcp_create_msg>
800bab8: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800baba: 697b ldr r3, [r7, #20]
800babc: 2b00 cmp r3, #0
800babe: f000 8085 beq.w 800bbcc <dhcp_select+0x16c>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800bac2: 697b ldr r3, [r7, #20]
800bac4: 685b ldr r3, [r3, #4]
800bac6: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
800bac8: 89b8 ldrh r0, [r7, #12]
800baca: 693b ldr r3, [r7, #16]
800bacc: f103 01f0 add.w r1, r3, #240 ; 0xf0
800bad0: 2302 movs r3, #2
800bad2: 2239 movs r2, #57 ; 0x39
800bad4: f000 ffca bl 800ca6c <dhcp_option>
800bad8: 4603 mov r3, r0
800bada: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
800badc: 89b8 ldrh r0, [r7, #12]
800bade: 693b ldr r3, [r7, #16]
800bae0: f103 01f0 add.w r1, r3, #240 ; 0xf0
800bae4: 687b ldr r3, [r7, #4]
800bae6: 8d1b ldrh r3, [r3, #40] ; 0x28
800bae8: 461a mov r2, r3
800baea: f001 f819 bl 800cb20 <dhcp_option_short>
800baee: 4603 mov r3, r0
800baf0: 81bb strh r3, [r7, #12]
/* MUST request the offered IP address */
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
800baf2: 89b8 ldrh r0, [r7, #12]
800baf4: 693b ldr r3, [r7, #16]
800baf6: f103 01f0 add.w r1, r3, #240 ; 0xf0
800bafa: 2304 movs r3, #4
800bafc: 2232 movs r2, #50 ; 0x32
800bafe: f000 ffb5 bl 800ca6c <dhcp_option>
800bb02: 4603 mov r3, r0
800bb04: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
800bb06: 89bc ldrh r4, [r7, #12]
800bb08: 693b ldr r3, [r7, #16]
800bb0a: f103 05f0 add.w r5, r3, #240 ; 0xf0
800bb0e: 69bb ldr r3, [r7, #24]
800bb10: 69db ldr r3, [r3, #28]
800bb12: 4618 mov r0, r3
800bb14: f7f8 f95f bl 8003dd6 <lwip_htonl>
800bb18: 4603 mov r3, r0
800bb1a: 461a mov r2, r3
800bb1c: 4629 mov r1, r5
800bb1e: 4620 mov r0, r4
800bb20: f001 f830 bl 800cb84 <dhcp_option_long>
800bb24: 4603 mov r3, r0
800bb26: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
800bb28: 89b8 ldrh r0, [r7, #12]
800bb2a: 693b ldr r3, [r7, #16]
800bb2c: f103 01f0 add.w r1, r3, #240 ; 0xf0
800bb30: 2304 movs r3, #4
800bb32: 2236 movs r2, #54 ; 0x36
800bb34: f000 ff9a bl 800ca6c <dhcp_option>
800bb38: 4603 mov r3, r0
800bb3a: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr))));
800bb3c: 89bc ldrh r4, [r7, #12]
800bb3e: 693b ldr r3, [r7, #16]
800bb40: f103 05f0 add.w r5, r3, #240 ; 0xf0
800bb44: 69bb ldr r3, [r7, #24]
800bb46: 699b ldr r3, [r3, #24]
800bb48: 4618 mov r0, r3
800bb4a: f7f8 f944 bl 8003dd6 <lwip_htonl>
800bb4e: 4603 mov r3, r0
800bb50: 461a mov r2, r3
800bb52: 4629 mov r1, r5
800bb54: 4620 mov r0, r4
800bb56: f001 f815 bl 800cb84 <dhcp_option_long>
800bb5a: 4603 mov r3, r0
800bb5c: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
800bb5e: 89b8 ldrh r0, [r7, #12]
800bb60: 693b ldr r3, [r7, #16]
800bb62: f103 01f0 add.w r1, r3, #240 ; 0xf0
800bb66: 2303 movs r3, #3
800bb68: 2237 movs r2, #55 ; 0x37
800bb6a: f000 ff7f bl 800ca6c <dhcp_option>
800bb6e: 4603 mov r3, r0
800bb70: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800bb72: 2300 movs r3, #0
800bb74: 77bb strb r3, [r7, #30]
800bb76: e00e b.n 800bb96 <dhcp_select+0x136>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800bb78: 89b8 ldrh r0, [r7, #12]
800bb7a: 693b ldr r3, [r7, #16]
800bb7c: f103 01f0 add.w r1, r3, #240 ; 0xf0
800bb80: 7fbb ldrb r3, [r7, #30]
800bb82: 4a30 ldr r2, [pc, #192] ; (800bc44 <dhcp_select+0x1e4>)
800bb84: 5cd3 ldrb r3, [r2, r3]
800bb86: 461a mov r2, r3
800bb88: f000 ffa4 bl 800cad4 <dhcp_option_byte>
800bb8c: 4603 mov r3, r0
800bb8e: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800bb90: 7fbb ldrb r3, [r7, #30]
800bb92: 3301 adds r3, #1
800bb94: 77bb strb r3, [r7, #30]
800bb96: 7fbb ldrb r3, [r7, #30]
800bb98: 2b02 cmp r3, #2
800bb9a: d9ed bls.n 800bb78 <dhcp_select+0x118>
#if LWIP_NETIF_HOSTNAME
options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif);
#endif /* LWIP_NETIF_HOSTNAME */
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REQUESTING, msg_out, DHCP_REQUEST, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
800bb9c: 89b8 ldrh r0, [r7, #12]
800bb9e: 693b ldr r3, [r7, #16]
800bba0: 33f0 adds r3, #240 ; 0xf0
800bba2: 697a ldr r2, [r7, #20]
800bba4: 4619 mov r1, r3
800bba6: f001 fca9 bl 800d4fc <dhcp_option_trailer>
/* send broadcast to any DHCP server */
result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
800bbaa: 4b27 ldr r3, [pc, #156] ; (800bc48 <dhcp_select+0x1e8>)
800bbac: 6818 ldr r0, [r3, #0]
800bbae: 4b27 ldr r3, [pc, #156] ; (800bc4c <dhcp_select+0x1ec>)
800bbb0: 9301 str r3, [sp, #4]
800bbb2: 687b ldr r3, [r7, #4]
800bbb4: 9300 str r3, [sp, #0]
800bbb6: 2343 movs r3, #67 ; 0x43
800bbb8: 4a25 ldr r2, [pc, #148] ; (800bc50 <dhcp_select+0x1f0>)
800bbba: 6979 ldr r1, [r7, #20]
800bbbc: f7ff fbda bl 800b374 <udp_sendto_if_src>
800bbc0: 4603 mov r3, r0
800bbc2: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800bbc4: 6978 ldr r0, [r7, #20]
800bbc6: f7f9 fc5b bl 8005480 <pbuf_free>
800bbca: e001 b.n 800bbd0 <dhcp_select+0x170>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n"));
result = ERR_MEM;
800bbcc: 23ff movs r3, #255 ; 0xff
800bbce: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800bbd0: 69bb ldr r3, [r7, #24]
800bbd2: 799b ldrb r3, [r3, #6]
800bbd4: 2bff cmp r3, #255 ; 0xff
800bbd6: d005 beq.n 800bbe4 <dhcp_select+0x184>
dhcp->tries++;
800bbd8: 69bb ldr r3, [r7, #24]
800bbda: 799b ldrb r3, [r3, #6]
800bbdc: 3301 adds r3, #1
800bbde: b2da uxtb r2, r3
800bbe0: 69bb ldr r3, [r7, #24]
800bbe2: 719a strb r2, [r3, #6]
}
msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
800bbe4: 69bb ldr r3, [r7, #24]
800bbe6: 799b ldrb r3, [r3, #6]
800bbe8: 2b05 cmp r3, #5
800bbea: d80d bhi.n 800bc08 <dhcp_select+0x1a8>
800bbec: 69bb ldr r3, [r7, #24]
800bbee: 799b ldrb r3, [r3, #6]
800bbf0: 461a mov r2, r3
800bbf2: 2301 movs r3, #1
800bbf4: 4093 lsls r3, r2
800bbf6: b29b uxth r3, r3
800bbf8: 461a mov r2, r3
800bbfa: 0152 lsls r2, r2, #5
800bbfc: 1ad2 subs r2, r2, r3
800bbfe: 0092 lsls r2, r2, #2
800bc00: 4413 add r3, r2
800bc02: 00db lsls r3, r3, #3
800bc04: b29b uxth r3, r3
800bc06: e001 b.n 800bc0c <dhcp_select+0x1ac>
800bc08: f64e 2360 movw r3, #60000 ; 0xea60
800bc0c: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800bc0e: 89fb ldrh r3, [r7, #14]
800bc10: f203 13f3 addw r3, r3, #499 ; 0x1f3
800bc14: 4a0f ldr r2, [pc, #60] ; (800bc54 <dhcp_select+0x1f4>)
800bc16: fb82 1203 smull r1, r2, r2, r3
800bc1a: 1152 asrs r2, r2, #5
800bc1c: 17db asrs r3, r3, #31
800bc1e: 1ad3 subs r3, r2, r3
800bc20: b29a uxth r2, r3
800bc22: 69bb ldr r3, [r7, #24]
800bc24: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs));
return result;
800bc26: f997 301f ldrsb.w r3, [r7, #31]
}
800bc2a: 4618 mov r0, r3
800bc2c: 3720 adds r7, #32
800bc2e: 46bd mov sp, r7
800bc30: bdb0 pop {r4, r5, r7, pc}
800bc32: bf00 nop
800bc34: 08016cf4 .word 0x08016cf4
800bc38: 08016da0 .word 0x08016da0
800bc3c: 08016d54 .word 0x08016d54
800bc40: 08016dbc .word 0x08016dbc
800bc44: 2000002c .word 0x2000002c
800bc48: 20008c34 .word 0x20008c34
800bc4c: 080178c4 .word 0x080178c4
800bc50: 080178c8 .word 0x080178c8
800bc54: 10624dd3 .word 0x10624dd3
0800bc58 <dhcp_coarse_tmr>:
* The DHCP timer that checks for lease renewal/rebind timeouts.
* Must be called once a minute (see @ref DHCP_COARSE_TIMER_SECS).
*/
void
dhcp_coarse_tmr(void)
{
800bc58: b580 push {r7, lr}
800bc5a: b082 sub sp, #8
800bc5c: af00 add r7, sp, #0
struct netif *netif;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n"));
/* iterate through all network interfaces */
NETIF_FOREACH(netif) {
800bc5e: 4b27 ldr r3, [pc, #156] ; (800bcfc <dhcp_coarse_tmr+0xa4>)
800bc60: 681b ldr r3, [r3, #0]
800bc62: 607b str r3, [r7, #4]
800bc64: e042 b.n 800bcec <dhcp_coarse_tmr+0x94>
/* only act on DHCP configured interfaces */
struct dhcp *dhcp = netif_dhcp_data(netif);
800bc66: 687b ldr r3, [r7, #4]
800bc68: 6a5b ldr r3, [r3, #36] ; 0x24
800bc6a: 603b str r3, [r7, #0]
if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) {
800bc6c: 683b ldr r3, [r7, #0]
800bc6e: 2b00 cmp r3, #0
800bc70: d039 beq.n 800bce6 <dhcp_coarse_tmr+0x8e>
800bc72: 683b ldr r3, [r7, #0]
800bc74: 795b ldrb r3, [r3, #5]
800bc76: 2b00 cmp r3, #0
800bc78: d035 beq.n 800bce6 <dhcp_coarse_tmr+0x8e>
/* compare lease time to expire timeout */
if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) {
800bc7a: 683b ldr r3, [r7, #0]
800bc7c: 8a9b ldrh r3, [r3, #20]
800bc7e: 2b00 cmp r3, #0
800bc80: d012 beq.n 800bca8 <dhcp_coarse_tmr+0x50>
800bc82: 683b ldr r3, [r7, #0]
800bc84: 8a5b ldrh r3, [r3, #18]
800bc86: 3301 adds r3, #1
800bc88: b29a uxth r2, r3
800bc8a: 683b ldr r3, [r7, #0]
800bc8c: 825a strh r2, [r3, #18]
800bc8e: 683b ldr r3, [r7, #0]
800bc90: 8a5a ldrh r2, [r3, #18]
800bc92: 683b ldr r3, [r7, #0]
800bc94: 8a9b ldrh r3, [r3, #20]
800bc96: 429a cmp r2, r3
800bc98: d106 bne.n 800bca8 <dhcp_coarse_tmr+0x50>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t0 timeout\n"));
/* this clients' lease time has expired */
dhcp_release_and_stop(netif);
800bc9a: 6878 ldr r0, [r7, #4]
800bc9c: f000 fe32 bl 800c904 <dhcp_release_and_stop>
dhcp_start(netif);
800bca0: 6878 ldr r0, [r7, #4]
800bca2: f000 f969 bl 800bf78 <dhcp_start>
800bca6: e01e b.n 800bce6 <dhcp_coarse_tmr+0x8e>
/* timer is active (non zero), and triggers (zeroes) now? */
} else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) {
800bca8: 683b ldr r3, [r7, #0]
800bcaa: 8a1b ldrh r3, [r3, #16]
800bcac: 2b00 cmp r3, #0
800bcae: d00b beq.n 800bcc8 <dhcp_coarse_tmr+0x70>
800bcb0: 683b ldr r3, [r7, #0]
800bcb2: 8a1b ldrh r3, [r3, #16]
800bcb4: 1e5a subs r2, r3, #1
800bcb6: b291 uxth r1, r2
800bcb8: 683a ldr r2, [r7, #0]
800bcba: 8211 strh r1, [r2, #16]
800bcbc: 2b01 cmp r3, #1
800bcbe: d103 bne.n 800bcc8 <dhcp_coarse_tmr+0x70>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t2 timeout\n"));
/* this clients' rebind timeout triggered */
dhcp_t2_timeout(netif);
800bcc0: 6878 ldr r0, [r7, #4]
800bcc2: f000 f8c6 bl 800be52 <dhcp_t2_timeout>
800bcc6: e00e b.n 800bce6 <dhcp_coarse_tmr+0x8e>
/* timer is active (non zero), and triggers (zeroes) now */
} else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) {
800bcc8: 683b ldr r3, [r7, #0]
800bcca: 89db ldrh r3, [r3, #14]
800bccc: 2b00 cmp r3, #0
800bcce: d00a beq.n 800bce6 <dhcp_coarse_tmr+0x8e>
800bcd0: 683b ldr r3, [r7, #0]
800bcd2: 89db ldrh r3, [r3, #14]
800bcd4: 1e5a subs r2, r3, #1
800bcd6: b291 uxth r1, r2
800bcd8: 683a ldr r2, [r7, #0]
800bcda: 81d1 strh r1, [r2, #14]
800bcdc: 2b01 cmp r3, #1
800bcde: d102 bne.n 800bce6 <dhcp_coarse_tmr+0x8e>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t1 timeout\n"));
/* this clients' renewal timeout triggered */
dhcp_t1_timeout(netif);
800bce0: 6878 ldr r0, [r7, #4]
800bce2: f000 f888 bl 800bdf6 <dhcp_t1_timeout>
NETIF_FOREACH(netif) {
800bce6: 687b ldr r3, [r7, #4]
800bce8: 681b ldr r3, [r3, #0]
800bcea: 607b str r3, [r7, #4]
800bcec: 687b ldr r3, [r7, #4]
800bcee: 2b00 cmp r3, #0
800bcf0: d1b9 bne.n 800bc66 <dhcp_coarse_tmr+0xe>
}
}
}
}
800bcf2: bf00 nop
800bcf4: bf00 nop
800bcf6: 3708 adds r7, #8
800bcf8: 46bd mov sp, r7
800bcfa: bd80 pop {r7, pc}
800bcfc: 20008ba0 .word 0x20008ba0
0800bd00 <dhcp_fine_tmr>:
* A DHCP server is expected to respond within a short period of time.
* This timer checks whether an outstanding DHCP request is timed out.
*/
void
dhcp_fine_tmr(void)
{
800bd00: b580 push {r7, lr}
800bd02: b082 sub sp, #8
800bd04: af00 add r7, sp, #0
struct netif *netif;
/* loop through netif's */
NETIF_FOREACH(netif) {
800bd06: 4b16 ldr r3, [pc, #88] ; (800bd60 <dhcp_fine_tmr+0x60>)
800bd08: 681b ldr r3, [r3, #0]
800bd0a: 607b str r3, [r7, #4]
800bd0c: e020 b.n 800bd50 <dhcp_fine_tmr+0x50>
struct dhcp *dhcp = netif_dhcp_data(netif);
800bd0e: 687b ldr r3, [r7, #4]
800bd10: 6a5b ldr r3, [r3, #36] ; 0x24
800bd12: 603b str r3, [r7, #0]
/* only act on DHCP configured interfaces */
if (dhcp != NULL) {
800bd14: 683b ldr r3, [r7, #0]
800bd16: 2b00 cmp r3, #0
800bd18: d017 beq.n 800bd4a <dhcp_fine_tmr+0x4a>
/* timer is active (non zero), and is about to trigger now */
if (dhcp->request_timeout > 1) {
800bd1a: 683b ldr r3, [r7, #0]
800bd1c: 891b ldrh r3, [r3, #8]
800bd1e: 2b01 cmp r3, #1
800bd20: d906 bls.n 800bd30 <dhcp_fine_tmr+0x30>
dhcp->request_timeout--;
800bd22: 683b ldr r3, [r7, #0]
800bd24: 891b ldrh r3, [r3, #8]
800bd26: 3b01 subs r3, #1
800bd28: b29a uxth r2, r3
800bd2a: 683b ldr r3, [r7, #0]
800bd2c: 811a strh r2, [r3, #8]
800bd2e: e00c b.n 800bd4a <dhcp_fine_tmr+0x4a>
} else if (dhcp->request_timeout == 1) {
800bd30: 683b ldr r3, [r7, #0]
800bd32: 891b ldrh r3, [r3, #8]
800bd34: 2b01 cmp r3, #1
800bd36: d108 bne.n 800bd4a <dhcp_fine_tmr+0x4a>
dhcp->request_timeout--;
800bd38: 683b ldr r3, [r7, #0]
800bd3a: 891b ldrh r3, [r3, #8]
800bd3c: 3b01 subs r3, #1
800bd3e: b29a uxth r2, r3
800bd40: 683b ldr r3, [r7, #0]
800bd42: 811a strh r2, [r3, #8]
/* { dhcp->request_timeout == 0 } */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_fine_tmr(): request timeout\n"));
/* this client's request timeout triggered */
dhcp_timeout(netif);
800bd44: 6878 ldr r0, [r7, #4]
800bd46: f000 f80d bl 800bd64 <dhcp_timeout>
NETIF_FOREACH(netif) {
800bd4a: 687b ldr r3, [r7, #4]
800bd4c: 681b ldr r3, [r3, #0]
800bd4e: 607b str r3, [r7, #4]
800bd50: 687b ldr r3, [r7, #4]
800bd52: 2b00 cmp r3, #0
800bd54: d1db bne.n 800bd0e <dhcp_fine_tmr+0xe>
}
}
}
}
800bd56: bf00 nop
800bd58: bf00 nop
800bd5a: 3708 adds r7, #8
800bd5c: 46bd mov sp, r7
800bd5e: bd80 pop {r7, pc}
800bd60: 20008ba0 .word 0x20008ba0
0800bd64 <dhcp_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_timeout(struct netif *netif)
{
800bd64: b580 push {r7, lr}
800bd66: b084 sub sp, #16
800bd68: af00 add r7, sp, #0
800bd6a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800bd6c: 687b ldr r3, [r7, #4]
800bd6e: 6a5b ldr r3, [r3, #36] ; 0x24
800bd70: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n"));
/* back-off period has passed, or server selection timed out */
if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) {
800bd72: 68fb ldr r3, [r7, #12]
800bd74: 795b ldrb r3, [r3, #5]
800bd76: 2b0c cmp r3, #12
800bd78: d003 beq.n 800bd82 <dhcp_timeout+0x1e>
800bd7a: 68fb ldr r3, [r7, #12]
800bd7c: 795b ldrb r3, [r3, #5]
800bd7e: 2b06 cmp r3, #6
800bd80: d103 bne.n 800bd8a <dhcp_timeout+0x26>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n"));
dhcp_discover(netif);
800bd82: 6878 ldr r0, [r7, #4]
800bd84: f000 fa54 bl 800c230 <dhcp_discover>
dhcp_reboot(netif);
} else {
dhcp_discover(netif);
}
}
}
800bd88: e031 b.n 800bdee <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_REQUESTING) {
800bd8a: 68fb ldr r3, [r7, #12]
800bd8c: 795b ldrb r3, [r3, #5]
800bd8e: 2b01 cmp r3, #1
800bd90: d10e bne.n 800bdb0 <dhcp_timeout+0x4c>
if (dhcp->tries <= 5) {
800bd92: 68fb ldr r3, [r7, #12]
800bd94: 799b ldrb r3, [r3, #6]
800bd96: 2b05 cmp r3, #5
800bd98: d803 bhi.n 800bda2 <dhcp_timeout+0x3e>
dhcp_select(netif);
800bd9a: 6878 ldr r0, [r7, #4]
800bd9c: f7ff fe60 bl 800ba60 <dhcp_select>
}
800bda0: e025 b.n 800bdee <dhcp_timeout+0x8a>
dhcp_release_and_stop(netif);
800bda2: 6878 ldr r0, [r7, #4]
800bda4: f000 fdae bl 800c904 <dhcp_release_and_stop>
dhcp_start(netif);
800bda8: 6878 ldr r0, [r7, #4]
800bdaa: f000 f8e5 bl 800bf78 <dhcp_start>
}
800bdae: e01e b.n 800bdee <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_CHECKING) {
800bdb0: 68fb ldr r3, [r7, #12]
800bdb2: 795b ldrb r3, [r3, #5]
800bdb4: 2b08 cmp r3, #8
800bdb6: d10b bne.n 800bdd0 <dhcp_timeout+0x6c>
if (dhcp->tries <= 1) {
800bdb8: 68fb ldr r3, [r7, #12]
800bdba: 799b ldrb r3, [r3, #6]
800bdbc: 2b01 cmp r3, #1
800bdbe: d803 bhi.n 800bdc8 <dhcp_timeout+0x64>
dhcp_check(netif);
800bdc0: 6878 ldr r0, [r7, #4]
800bdc2: f7ff fdf3 bl 800b9ac <dhcp_check>
}
800bdc6: e012 b.n 800bdee <dhcp_timeout+0x8a>
dhcp_bind(netif);
800bdc8: 6878 ldr r0, [r7, #4]
800bdca: f000 fad3 bl 800c374 <dhcp_bind>
}
800bdce: e00e b.n 800bdee <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_REBOOTING) {
800bdd0: 68fb ldr r3, [r7, #12]
800bdd2: 795b ldrb r3, [r3, #5]
800bdd4: 2b03 cmp r3, #3
800bdd6: d10a bne.n 800bdee <dhcp_timeout+0x8a>
if (dhcp->tries < REBOOT_TRIES) {
800bdd8: 68fb ldr r3, [r7, #12]
800bdda: 799b ldrb r3, [r3, #6]
800bddc: 2b01 cmp r3, #1
800bdde: d803 bhi.n 800bde8 <dhcp_timeout+0x84>
dhcp_reboot(netif);
800bde0: 6878 ldr r0, [r7, #4]
800bde2: f000 fcd9 bl 800c798 <dhcp_reboot>
}
800bde6: e002 b.n 800bdee <dhcp_timeout+0x8a>
dhcp_discover(netif);
800bde8: 6878 ldr r0, [r7, #4]
800bdea: f000 fa21 bl 800c230 <dhcp_discover>
}
800bdee: bf00 nop
800bdf0: 3710 adds r7, #16
800bdf2: 46bd mov sp, r7
800bdf4: bd80 pop {r7, pc}
0800bdf6 <dhcp_t1_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_t1_timeout(struct netif *netif)
{
800bdf6: b580 push {r7, lr}
800bdf8: b084 sub sp, #16
800bdfa: af00 add r7, sp, #0
800bdfc: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800bdfe: 687b ldr r3, [r7, #4]
800be00: 6a5b ldr r3, [r3, #36] ; 0x24
800be02: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_t1_timeout()\n"));
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
800be04: 68fb ldr r3, [r7, #12]
800be06: 795b ldrb r3, [r3, #5]
800be08: 2b01 cmp r3, #1
800be0a: d007 beq.n 800be1c <dhcp_t1_timeout+0x26>
800be0c: 68fb ldr r3, [r7, #12]
800be0e: 795b ldrb r3, [r3, #5]
800be10: 2b0a cmp r3, #10
800be12: d003 beq.n 800be1c <dhcp_t1_timeout+0x26>
(dhcp->state == DHCP_STATE_RENEWING)) {
800be14: 68fb ldr r3, [r7, #12]
800be16: 795b ldrb r3, [r3, #5]
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
800be18: 2b05 cmp r3, #5
800be1a: d116 bne.n 800be4a <dhcp_t1_timeout+0x54>
* eventually time-out if renew tries fail. */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
("dhcp_t1_timeout(): must renew\n"));
/* This slightly different to RFC2131: DHCPREQUEST will be sent from state
DHCP_STATE_RENEWING, not DHCP_STATE_BOUND */
dhcp_renew(netif);
800be1c: 6878 ldr r0, [r7, #4]
800be1e: f000 fb83 bl 800c528 <dhcp_renew>
/* Calculate next timeout */
if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
800be22: 68fb ldr r3, [r7, #12]
800be24: 899b ldrh r3, [r3, #12]
800be26: 461a mov r2, r3
800be28: 68fb ldr r3, [r7, #12]
800be2a: 8a5b ldrh r3, [r3, #18]
800be2c: 1ad3 subs r3, r2, r3
800be2e: 2b01 cmp r3, #1
800be30: dd0b ble.n 800be4a <dhcp_t1_timeout+0x54>
dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2);
800be32: 68fb ldr r3, [r7, #12]
800be34: 899b ldrh r3, [r3, #12]
800be36: 461a mov r2, r3
800be38: 68fb ldr r3, [r7, #12]
800be3a: 8a5b ldrh r3, [r3, #18]
800be3c: 1ad3 subs r3, r2, r3
800be3e: 0fda lsrs r2, r3, #31
800be40: 4413 add r3, r2
800be42: 105b asrs r3, r3, #1
800be44: b29a uxth r2, r3
800be46: 68fb ldr r3, [r7, #12]
800be48: 81da strh r2, [r3, #14]
}
}
}
800be4a: bf00 nop
800be4c: 3710 adds r7, #16
800be4e: 46bd mov sp, r7
800be50: bd80 pop {r7, pc}
0800be52 <dhcp_t2_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_t2_timeout(struct netif *netif)
{
800be52: b580 push {r7, lr}
800be54: b084 sub sp, #16
800be56: af00 add r7, sp, #0
800be58: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800be5a: 687b ldr r3, [r7, #4]
800be5c: 6a5b ldr r3, [r3, #36] ; 0x24
800be5e: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t2_timeout()\n"));
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
800be60: 68fb ldr r3, [r7, #12]
800be62: 795b ldrb r3, [r3, #5]
800be64: 2b01 cmp r3, #1
800be66: d00b beq.n 800be80 <dhcp_t2_timeout+0x2e>
800be68: 68fb ldr r3, [r7, #12]
800be6a: 795b ldrb r3, [r3, #5]
800be6c: 2b0a cmp r3, #10
800be6e: d007 beq.n 800be80 <dhcp_t2_timeout+0x2e>
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
800be70: 68fb ldr r3, [r7, #12]
800be72: 795b ldrb r3, [r3, #5]
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
800be74: 2b05 cmp r3, #5
800be76: d003 beq.n 800be80 <dhcp_t2_timeout+0x2e>
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
800be78: 68fb ldr r3, [r7, #12]
800be7a: 795b ldrb r3, [r3, #5]
800be7c: 2b04 cmp r3, #4
800be7e: d116 bne.n 800beae <dhcp_t2_timeout+0x5c>
/* just retry to rebind */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
("dhcp_t2_timeout(): must rebind\n"));
/* This slightly different to RFC2131: DHCPREQUEST will be sent from state
DHCP_STATE_REBINDING, not DHCP_STATE_BOUND */
dhcp_rebind(netif);
800be80: 6878 ldr r0, [r7, #4]
800be82: f000 fbed bl 800c660 <dhcp_rebind>
/* Calculate next timeout */
if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
800be86: 68fb ldr r3, [r7, #12]
800be88: 8a9b ldrh r3, [r3, #20]
800be8a: 461a mov r2, r3
800be8c: 68fb ldr r3, [r7, #12]
800be8e: 8a5b ldrh r3, [r3, #18]
800be90: 1ad3 subs r3, r2, r3
800be92: 2b01 cmp r3, #1
800be94: dd0b ble.n 800beae <dhcp_t2_timeout+0x5c>
dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2);
800be96: 68fb ldr r3, [r7, #12]
800be98: 8a9b ldrh r3, [r3, #20]
800be9a: 461a mov r2, r3
800be9c: 68fb ldr r3, [r7, #12]
800be9e: 8a5b ldrh r3, [r3, #18]
800bea0: 1ad3 subs r3, r2, r3
800bea2: 0fda lsrs r2, r3, #31
800bea4: 4413 add r3, r2
800bea6: 105b asrs r3, r3, #1
800bea8: b29a uxth r2, r3
800beaa: 68fb ldr r3, [r7, #12]
800beac: 821a strh r2, [r3, #16]
}
}
}
800beae: bf00 nop
800beb0: 3710 adds r7, #16
800beb2: 46bd mov sp, r7
800beb4: bd80 pop {r7, pc}
...
0800beb8 <dhcp_handle_ack>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_ack(struct netif *netif, struct dhcp_msg *msg_in)
{
800beb8: b580 push {r7, lr}
800beba: b084 sub sp, #16
800bebc: af00 add r7, sp, #0
800bebe: 6078 str r0, [r7, #4]
800bec0: 6039 str r1, [r7, #0]
struct dhcp *dhcp = netif_dhcp_data(netif);
800bec2: 687b ldr r3, [r7, #4]
800bec4: 6a5b ldr r3, [r3, #36] ; 0x24
800bec6: 60fb str r3, [r7, #12]
#if LWIP_DHCP_GET_NTP_SRV
ip4_addr_t ntp_server_addrs[LWIP_DHCP_MAX_NTP_SERVERS];
#endif
/* clear options we might not get from the ACK */
ip4_addr_set_zero(&dhcp->offered_sn_mask);
800bec8: 68fb ldr r3, [r7, #12]
800beca: 2200 movs r2, #0
800becc: 621a str r2, [r3, #32]
ip4_addr_set_zero(&dhcp->offered_gw_addr);
800bece: 68fb ldr r3, [r7, #12]
800bed0: 2200 movs r2, #0
800bed2: 625a str r2, [r3, #36] ; 0x24
#if LWIP_DHCP_BOOTP_FILE
ip4_addr_set_zero(&dhcp->offered_si_addr);
#endif /* LWIP_DHCP_BOOTP_FILE */
/* lease time given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) {
800bed4: 4b26 ldr r3, [pc, #152] ; (800bf70 <dhcp_handle_ack+0xb8>)
800bed6: 78db ldrb r3, [r3, #3]
800bed8: 2b00 cmp r3, #0
800beda: d003 beq.n 800bee4 <dhcp_handle_ack+0x2c>
/* remember offered lease time */
dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME);
800bedc: 4b25 ldr r3, [pc, #148] ; (800bf74 <dhcp_handle_ack+0xbc>)
800bede: 68da ldr r2, [r3, #12]
800bee0: 68fb ldr r3, [r7, #12]
800bee2: 629a str r2, [r3, #40] ; 0x28
}
/* renewal period given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) {
800bee4: 4b22 ldr r3, [pc, #136] ; (800bf70 <dhcp_handle_ack+0xb8>)
800bee6: 791b ldrb r3, [r3, #4]
800bee8: 2b00 cmp r3, #0
800beea: d004 beq.n 800bef6 <dhcp_handle_ack+0x3e>
/* remember given renewal period */
dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1);
800beec: 4b21 ldr r3, [pc, #132] ; (800bf74 <dhcp_handle_ack+0xbc>)
800beee: 691a ldr r2, [r3, #16]
800bef0: 68fb ldr r3, [r7, #12]
800bef2: 62da str r2, [r3, #44] ; 0x2c
800bef4: e004 b.n 800bf00 <dhcp_handle_ack+0x48>
} else {
/* calculate safe periods for renewal */
dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2;
800bef6: 68fb ldr r3, [r7, #12]
800bef8: 6a9b ldr r3, [r3, #40] ; 0x28
800befa: 085a lsrs r2, r3, #1
800befc: 68fb ldr r3, [r7, #12]
800befe: 62da str r2, [r3, #44] ; 0x2c
}
/* renewal period given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) {
800bf00: 4b1b ldr r3, [pc, #108] ; (800bf70 <dhcp_handle_ack+0xb8>)
800bf02: 795b ldrb r3, [r3, #5]
800bf04: 2b00 cmp r3, #0
800bf06: d004 beq.n 800bf12 <dhcp_handle_ack+0x5a>
/* remember given rebind period */
dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2);
800bf08: 4b1a ldr r3, [pc, #104] ; (800bf74 <dhcp_handle_ack+0xbc>)
800bf0a: 695a ldr r2, [r3, #20]
800bf0c: 68fb ldr r3, [r7, #12]
800bf0e: 631a str r2, [r3, #48] ; 0x30
800bf10: e007 b.n 800bf22 <dhcp_handle_ack+0x6a>
} else {
/* calculate safe periods for rebinding (offered_t0_lease * 0.875 -> 87.5%)*/
dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U;
800bf12: 68fb ldr r3, [r7, #12]
800bf14: 6a9a ldr r2, [r3, #40] ; 0x28
800bf16: 4613 mov r3, r2
800bf18: 00db lsls r3, r3, #3
800bf1a: 1a9b subs r3, r3, r2
800bf1c: 08da lsrs r2, r3, #3
800bf1e: 68fb ldr r3, [r7, #12]
800bf20: 631a str r2, [r3, #48] ; 0x30
}
/* (y)our internet address */
ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
800bf22: 683b ldr r3, [r7, #0]
800bf24: 691a ldr r2, [r3, #16]
800bf26: 68fb ldr r3, [r7, #12]
800bf28: 61da str r2, [r3, #28]
boot file name copied in dhcp_parse_reply if not overloaded */
ip4_addr_copy(dhcp->offered_si_addr, msg_in->siaddr);
#endif /* LWIP_DHCP_BOOTP_FILE */
/* subnet mask given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) {
800bf2a: 4b11 ldr r3, [pc, #68] ; (800bf70 <dhcp_handle_ack+0xb8>)
800bf2c: 799b ldrb r3, [r3, #6]
800bf2e: 2b00 cmp r3, #0
800bf30: d00b beq.n 800bf4a <dhcp_handle_ack+0x92>
/* remember given subnet mask */
ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)));
800bf32: 4b10 ldr r3, [pc, #64] ; (800bf74 <dhcp_handle_ack+0xbc>)
800bf34: 699b ldr r3, [r3, #24]
800bf36: 4618 mov r0, r3
800bf38: f7f7 ff4d bl 8003dd6 <lwip_htonl>
800bf3c: 4602 mov r2, r0
800bf3e: 68fb ldr r3, [r7, #12]
800bf40: 621a str r2, [r3, #32]
dhcp->subnet_mask_given = 1;
800bf42: 68fb ldr r3, [r7, #12]
800bf44: 2201 movs r2, #1
800bf46: 71da strb r2, [r3, #7]
800bf48: e002 b.n 800bf50 <dhcp_handle_ack+0x98>
} else {
dhcp->subnet_mask_given = 0;
800bf4a: 68fb ldr r3, [r7, #12]
800bf4c: 2200 movs r2, #0
800bf4e: 71da strb r2, [r3, #7]
}
/* gateway router */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) {
800bf50: 4b07 ldr r3, [pc, #28] ; (800bf70 <dhcp_handle_ack+0xb8>)
800bf52: 79db ldrb r3, [r3, #7]
800bf54: 2b00 cmp r3, #0
800bf56: d007 beq.n 800bf68 <dhcp_handle_ack+0xb0>
ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER)));
800bf58: 4b06 ldr r3, [pc, #24] ; (800bf74 <dhcp_handle_ack+0xbc>)
800bf5a: 69db ldr r3, [r3, #28]
800bf5c: 4618 mov r0, r3
800bf5e: f7f7 ff3a bl 8003dd6 <lwip_htonl>
800bf62: 4602 mov r2, r0
800bf64: 68fb ldr r3, [r7, #12]
800bf66: 625a str r2, [r3, #36] ; 0x24
ip_addr_t dns_addr;
ip_addr_set_ip4_u32_val(dns_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n)));
dns_setserver(n, &dns_addr);
}
#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */
}
800bf68: bf00 nop
800bf6a: 3710 adds r7, #16
800bf6c: 46bd mov sp, r7
800bf6e: bd80 pop {r7, pc}
800bf70: 20008c2c .word 0x20008c2c
800bf74: 20008c0c .word 0x20008c0c
0800bf78 <dhcp_start>:
* - ERR_OK - No error
* - ERR_MEM - Out of memory
*/
err_t
dhcp_start(struct netif *netif)
{
800bf78: b580 push {r7, lr}
800bf7a: b084 sub sp, #16
800bf7c: af00 add r7, sp, #0
800bf7e: 6078 str r0, [r7, #4]
struct dhcp *dhcp;
err_t result;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
800bf80: 687b ldr r3, [r7, #4]
800bf82: 2b00 cmp r3, #0
800bf84: d109 bne.n 800bf9a <dhcp_start+0x22>
800bf86: 4b37 ldr r3, [pc, #220] ; (800c064 <dhcp_start+0xec>)
800bf88: f240 22e7 movw r2, #743 ; 0x2e7
800bf8c: 4936 ldr r1, [pc, #216] ; (800c068 <dhcp_start+0xf0>)
800bf8e: 4837 ldr r0, [pc, #220] ; (800c06c <dhcp_start+0xf4>)
800bf90: f003 ff92 bl 800feb8 <printf>
800bf94: f06f 030f mvn.w r3, #15
800bf98: e060 b.n 800c05c <dhcp_start+0xe4>
LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;);
800bf9a: 687b ldr r3, [r7, #4]
800bf9c: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800bfa0: f003 0301 and.w r3, r3, #1
800bfa4: 2b00 cmp r3, #0
800bfa6: d109 bne.n 800bfbc <dhcp_start+0x44>
800bfa8: 4b2e ldr r3, [pc, #184] ; (800c064 <dhcp_start+0xec>)
800bfaa: f44f 723a mov.w r2, #744 ; 0x2e8
800bfae: 4930 ldr r1, [pc, #192] ; (800c070 <dhcp_start+0xf8>)
800bfb0: 482e ldr r0, [pc, #184] ; (800c06c <dhcp_start+0xf4>)
800bfb2: f003 ff81 bl 800feb8 <printf>
800bfb6: f06f 030f mvn.w r3, #15
800bfba: e04f b.n 800c05c <dhcp_start+0xe4>
dhcp = netif_dhcp_data(netif);
800bfbc: 687b ldr r3, [r7, #4]
800bfbe: 6a5b ldr r3, [r3, #36] ; 0x24
800bfc0: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
/* check MTU of the netif */
if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) {
800bfc2: 687b ldr r3, [r7, #4]
800bfc4: 8d1b ldrh r3, [r3, #40] ; 0x28
800bfc6: f5b3 7f10 cmp.w r3, #576 ; 0x240
800bfca: d202 bcs.n 800bfd2 <dhcp_start+0x5a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n"));
return ERR_MEM;
800bfcc: f04f 33ff mov.w r3, #4294967295
800bfd0: e044 b.n 800c05c <dhcp_start+0xe4>
}
/* no DHCP client attached yet? */
if (dhcp == NULL) {
800bfd2: 68fb ldr r3, [r7, #12]
800bfd4: 2b00 cmp r3, #0
800bfd6: d10d bne.n 800bff4 <dhcp_start+0x7c>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): mallocing new DHCP client\n"));
dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp));
800bfd8: 2034 movs r0, #52 ; 0x34
800bfda: f7f8 f9cf bl 800437c <mem_malloc>
800bfde: 60f8 str r0, [r7, #12]
if (dhcp == NULL) {
800bfe0: 68fb ldr r3, [r7, #12]
800bfe2: 2b00 cmp r3, #0
800bfe4: d102 bne.n 800bfec <dhcp_start+0x74>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n"));
return ERR_MEM;
800bfe6: f04f 33ff mov.w r3, #4294967295
800bfea: e037 b.n 800c05c <dhcp_start+0xe4>
}
/* store this dhcp client in the netif */
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
800bfec: 687b ldr r3, [r7, #4]
800bfee: 68fa ldr r2, [r7, #12]
800bff0: 625a str r2, [r3, #36] ; 0x24
800bff2: e005 b.n 800c000 <dhcp_start+0x88>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp"));
/* already has DHCP client attached */
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(): restarting DHCP configuration\n"));
if (dhcp->pcb_allocated != 0) {
800bff4: 68fb ldr r3, [r7, #12]
800bff6: 791b ldrb r3, [r3, #4]
800bff8: 2b00 cmp r3, #0
800bffa: d001 beq.n 800c000 <dhcp_start+0x88>
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
800bffc: f7ff fc92 bl 800b924 <dhcp_dec_pcb_refcount>
}
/* dhcp is cleared below, no need to reset flag*/
}
/* clear data structure */
memset(dhcp, 0, sizeof(struct dhcp));
800c000: 2234 movs r2, #52 ; 0x34
800c002: 2100 movs r1, #0
800c004: 68f8 ldr r0, [r7, #12]
800c006: f003 ff4f bl 800fea8 <memset>
/* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n"));
if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */
800c00a: f7ff fc39 bl 800b880 <dhcp_inc_pcb_refcount>
800c00e: 4603 mov r3, r0
800c010: 2b00 cmp r3, #0
800c012: d002 beq.n 800c01a <dhcp_start+0xa2>
return ERR_MEM;
800c014: f04f 33ff mov.w r3, #4294967295
800c018: e020 b.n 800c05c <dhcp_start+0xe4>
}
dhcp->pcb_allocated = 1;
800c01a: 68fb ldr r3, [r7, #12]
800c01c: 2201 movs r2, #1
800c01e: 711a strb r2, [r3, #4]
if (!netif_is_link_up(netif)) {
800c020: 687b ldr r3, [r7, #4]
800c022: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800c026: f003 0304 and.w r3, r3, #4
800c02a: 2b00 cmp r3, #0
800c02c: d105 bne.n 800c03a <dhcp_start+0xc2>
/* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */
dhcp_set_state(dhcp, DHCP_STATE_INIT);
800c02e: 2102 movs r1, #2
800c030: 68f8 ldr r0, [r7, #12]
800c032: f000 fd01 bl 800ca38 <dhcp_set_state>
return ERR_OK;
800c036: 2300 movs r3, #0
800c038: e010 b.n 800c05c <dhcp_start+0xe4>
}
/* (re)start the DHCP negotiation */
result = dhcp_discover(netif);
800c03a: 6878 ldr r0, [r7, #4]
800c03c: f000 f8f8 bl 800c230 <dhcp_discover>
800c040: 4603 mov r3, r0
800c042: 72fb strb r3, [r7, #11]
if (result != ERR_OK) {
800c044: f997 300b ldrsb.w r3, [r7, #11]
800c048: 2b00 cmp r3, #0
800c04a: d005 beq.n 800c058 <dhcp_start+0xe0>
/* free resources allocated above */
dhcp_release_and_stop(netif);
800c04c: 6878 ldr r0, [r7, #4]
800c04e: f000 fc59 bl 800c904 <dhcp_release_and_stop>
return ERR_MEM;
800c052: f04f 33ff mov.w r3, #4294967295
800c056: e001 b.n 800c05c <dhcp_start+0xe4>
}
return result;
800c058: f997 300b ldrsb.w r3, [r7, #11]
}
800c05c: 4618 mov r0, r3
800c05e: 3710 adds r7, #16
800c060: 46bd mov sp, r7
800c062: bd80 pop {r7, pc}
800c064: 08016cf4 .word 0x08016cf4
800c068: 08016dd8 .word 0x08016dd8
800c06c: 08016d54 .word 0x08016d54
800c070: 08016e1c .word 0x08016e1c
0800c074 <dhcp_network_changed>:
* This enters the REBOOTING state to verify that the currently bound
* address is still valid.
*/
void
dhcp_network_changed(struct netif *netif)
{
800c074: b580 push {r7, lr}
800c076: b084 sub sp, #16
800c078: af00 add r7, sp, #0
800c07a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c07c: 687b ldr r3, [r7, #4]
800c07e: 6a5b ldr r3, [r3, #36] ; 0x24
800c080: 60fb str r3, [r7, #12]
if (!dhcp) {
800c082: 68fb ldr r3, [r7, #12]
800c084: 2b00 cmp r3, #0
800c086: d025 beq.n 800c0d4 <dhcp_network_changed+0x60>
return;
}
switch (dhcp->state) {
800c088: 68fb ldr r3, [r7, #12]
800c08a: 795b ldrb r3, [r3, #5]
800c08c: 2b0a cmp r3, #10
800c08e: d008 beq.n 800c0a2 <dhcp_network_changed+0x2e>
800c090: 2b0a cmp r3, #10
800c092: dc0d bgt.n 800c0b0 <dhcp_network_changed+0x3c>
800c094: 2b00 cmp r3, #0
800c096: d01f beq.n 800c0d8 <dhcp_network_changed+0x64>
800c098: 2b00 cmp r3, #0
800c09a: db09 blt.n 800c0b0 <dhcp_network_changed+0x3c>
800c09c: 3b03 subs r3, #3
800c09e: 2b02 cmp r3, #2
800c0a0: d806 bhi.n 800c0b0 <dhcp_network_changed+0x3c>
case DHCP_STATE_REBINDING:
case DHCP_STATE_RENEWING:
case DHCP_STATE_BOUND:
case DHCP_STATE_REBOOTING:
dhcp->tries = 0;
800c0a2: 68fb ldr r3, [r7, #12]
800c0a4: 2200 movs r2, #0
800c0a6: 719a strb r2, [r3, #6]
dhcp_reboot(netif);
800c0a8: 6878 ldr r0, [r7, #4]
800c0aa: f000 fb75 bl 800c798 <dhcp_reboot>
break;
800c0ae: e014 b.n 800c0da <dhcp_network_changed+0x66>
case DHCP_STATE_OFF:
/* stay off */
break;
default:
LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
800c0b0: 68fb ldr r3, [r7, #12]
800c0b2: 795b ldrb r3, [r3, #5]
800c0b4: 2b0c cmp r3, #12
800c0b6: d906 bls.n 800c0c6 <dhcp_network_changed+0x52>
800c0b8: 4b09 ldr r3, [pc, #36] ; (800c0e0 <dhcp_network_changed+0x6c>)
800c0ba: f240 326d movw r2, #877 ; 0x36d
800c0be: 4909 ldr r1, [pc, #36] ; (800c0e4 <dhcp_network_changed+0x70>)
800c0c0: 4809 ldr r0, [pc, #36] ; (800c0e8 <dhcp_network_changed+0x74>)
800c0c2: f003 fef9 bl 800feb8 <printf>
autoip_stop(netif);
dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF;
}
#endif /* LWIP_DHCP_AUTOIP_COOP */
/* ensure we start with short timeouts, even if already discovering */
dhcp->tries = 0;
800c0c6: 68fb ldr r3, [r7, #12]
800c0c8: 2200 movs r2, #0
800c0ca: 719a strb r2, [r3, #6]
dhcp_discover(netif);
800c0cc: 6878 ldr r0, [r7, #4]
800c0ce: f000 f8af bl 800c230 <dhcp_discover>
break;
800c0d2: e002 b.n 800c0da <dhcp_network_changed+0x66>
return;
800c0d4: bf00 nop
800c0d6: e000 b.n 800c0da <dhcp_network_changed+0x66>
break;
800c0d8: bf00 nop
}
}
800c0da: 3710 adds r7, #16
800c0dc: 46bd mov sp, r7
800c0de: bd80 pop {r7, pc}
800c0e0: 08016cf4 .word 0x08016cf4
800c0e4: 08016e40 .word 0x08016e40
800c0e8: 08016d54 .word 0x08016d54
0800c0ec <dhcp_arp_reply>:
* @param netif the network interface on which the reply was received
* @param addr The IP address we received a reply from
*/
void
dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr)
{
800c0ec: b580 push {r7, lr}
800c0ee: b084 sub sp, #16
800c0f0: af00 add r7, sp, #0
800c0f2: 6078 str r0, [r7, #4]
800c0f4: 6039 str r1, [r7, #0]
struct dhcp *dhcp;
LWIP_ERROR("netif != NULL", (netif != NULL), return;);
800c0f6: 687b ldr r3, [r7, #4]
800c0f8: 2b00 cmp r3, #0
800c0fa: d107 bne.n 800c10c <dhcp_arp_reply+0x20>
800c0fc: 4b0e ldr r3, [pc, #56] ; (800c138 <dhcp_arp_reply+0x4c>)
800c0fe: f240 328b movw r2, #907 ; 0x38b
800c102: 490e ldr r1, [pc, #56] ; (800c13c <dhcp_arp_reply+0x50>)
800c104: 480e ldr r0, [pc, #56] ; (800c140 <dhcp_arp_reply+0x54>)
800c106: f003 fed7 bl 800feb8 <printf>
800c10a: e012 b.n 800c132 <dhcp_arp_reply+0x46>
dhcp = netif_dhcp_data(netif);
800c10c: 687b ldr r3, [r7, #4]
800c10e: 6a5b ldr r3, [r3, #36] ; 0x24
800c110: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_arp_reply()\n"));
/* is a DHCP client doing an ARP check? */
if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) {
800c112: 68fb ldr r3, [r7, #12]
800c114: 2b00 cmp r3, #0
800c116: d00c beq.n 800c132 <dhcp_arp_reply+0x46>
800c118: 68fb ldr r3, [r7, #12]
800c11a: 795b ldrb r3, [r3, #5]
800c11c: 2b08 cmp r3, #8
800c11e: d108 bne.n 800c132 <dhcp_arp_reply+0x46>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_arp_reply(): CHECKING, arp reply for 0x%08"X32_F"\n",
ip4_addr_get_u32(addr)));
/* did a host respond with the address we
were offered by the DHCP server? */
if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) {
800c120: 683b ldr r3, [r7, #0]
800c122: 681a ldr r2, [r3, #0]
800c124: 68fb ldr r3, [r7, #12]
800c126: 69db ldr r3, [r3, #28]
800c128: 429a cmp r2, r3
800c12a: d102 bne.n 800c132 <dhcp_arp_reply+0x46>
/* we will not accept the offered address */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING,
("dhcp_arp_reply(): arp reply matched with offered address, declining\n"));
dhcp_decline(netif);
800c12c: 6878 ldr r0, [r7, #4]
800c12e: f000 f809 bl 800c144 <dhcp_decline>
}
}
}
800c132: 3710 adds r7, #16
800c134: 46bd mov sp, r7
800c136: bd80 pop {r7, pc}
800c138: 08016cf4 .word 0x08016cf4
800c13c: 08016dd8 .word 0x08016dd8
800c140: 08016d54 .word 0x08016d54
0800c144 <dhcp_decline>:
*
* @param netif the netif under DHCP control
*/
static err_t
dhcp_decline(struct netif *netif)
{
800c144: b5b0 push {r4, r5, r7, lr}
800c146: b08a sub sp, #40 ; 0x28
800c148: af02 add r7, sp, #8
800c14a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c14c: 687b ldr r3, [r7, #4]
800c14e: 6a5b ldr r3, [r3, #36] ; 0x24
800c150: 61bb str r3, [r7, #24]
u16_t msecs;
struct pbuf *p_out;
u16_t options_out_len;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline()\n"));
dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF);
800c152: 210c movs r1, #12
800c154: 69b8 ldr r0, [r7, #24]
800c156: f000 fc6f bl 800ca38 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len);
800c15a: f107 030c add.w r3, r7, #12
800c15e: 2204 movs r2, #4
800c160: 69b9 ldr r1, [r7, #24]
800c162: 6878 ldr r0, [r7, #4]
800c164: f001 f8f4 bl 800d350 <dhcp_create_msg>
800c168: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800c16a: 697b ldr r3, [r7, #20]
800c16c: 2b00 cmp r3, #0
800c16e: d035 beq.n 800c1dc <dhcp_decline+0x98>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800c170: 697b ldr r3, [r7, #20]
800c172: 685b ldr r3, [r3, #4]
800c174: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
800c176: 89b8 ldrh r0, [r7, #12]
800c178: 693b ldr r3, [r7, #16]
800c17a: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c17e: 2304 movs r3, #4
800c180: 2232 movs r2, #50 ; 0x32
800c182: f000 fc73 bl 800ca6c <dhcp_option>
800c186: 4603 mov r3, r0
800c188: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
800c18a: 89bc ldrh r4, [r7, #12]
800c18c: 693b ldr r3, [r7, #16]
800c18e: f103 05f0 add.w r5, r3, #240 ; 0xf0
800c192: 69bb ldr r3, [r7, #24]
800c194: 69db ldr r3, [r3, #28]
800c196: 4618 mov r0, r3
800c198: f7f7 fe1d bl 8003dd6 <lwip_htonl>
800c19c: 4603 mov r3, r0
800c19e: 461a mov r2, r3
800c1a0: 4629 mov r1, r5
800c1a2: 4620 mov r0, r4
800c1a4: f000 fcee bl 800cb84 <dhcp_option_long>
800c1a8: 4603 mov r3, r0
800c1aa: 81bb strh r3, [r7, #12]
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_BACKING_OFF, msg_out, DHCP_DECLINE, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
800c1ac: 89b8 ldrh r0, [r7, #12]
800c1ae: 693b ldr r3, [r7, #16]
800c1b0: 33f0 adds r3, #240 ; 0xf0
800c1b2: 697a ldr r2, [r7, #20]
800c1b4: 4619 mov r1, r3
800c1b6: f001 f9a1 bl 800d4fc <dhcp_option_trailer>
/* per section 4.4.4, broadcast DECLINE messages */
result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
800c1ba: 4b19 ldr r3, [pc, #100] ; (800c220 <dhcp_decline+0xdc>)
800c1bc: 6818 ldr r0, [r3, #0]
800c1be: 4b19 ldr r3, [pc, #100] ; (800c224 <dhcp_decline+0xe0>)
800c1c0: 9301 str r3, [sp, #4]
800c1c2: 687b ldr r3, [r7, #4]
800c1c4: 9300 str r3, [sp, #0]
800c1c6: 2343 movs r3, #67 ; 0x43
800c1c8: 4a17 ldr r2, [pc, #92] ; (800c228 <dhcp_decline+0xe4>)
800c1ca: 6979 ldr r1, [r7, #20]
800c1cc: f7ff f8d2 bl 800b374 <udp_sendto_if_src>
800c1d0: 4603 mov r3, r0
800c1d2: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800c1d4: 6978 ldr r0, [r7, #20]
800c1d6: f7f9 f953 bl 8005480 <pbuf_free>
800c1da: e001 b.n 800c1e0 <dhcp_decline+0x9c>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_decline: BACKING OFF\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("dhcp_decline: could not allocate DHCP request\n"));
result = ERR_MEM;
800c1dc: 23ff movs r3, #255 ; 0xff
800c1de: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800c1e0: 69bb ldr r3, [r7, #24]
800c1e2: 799b ldrb r3, [r3, #6]
800c1e4: 2bff cmp r3, #255 ; 0xff
800c1e6: d005 beq.n 800c1f4 <dhcp_decline+0xb0>
dhcp->tries++;
800c1e8: 69bb ldr r3, [r7, #24]
800c1ea: 799b ldrb r3, [r3, #6]
800c1ec: 3301 adds r3, #1
800c1ee: b2da uxtb r2, r3
800c1f0: 69bb ldr r3, [r7, #24]
800c1f2: 719a strb r2, [r3, #6]
}
msecs = 10 * 1000;
800c1f4: f242 7310 movw r3, #10000 ; 0x2710
800c1f8: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800c1fa: 89fb ldrh r3, [r7, #14]
800c1fc: f203 13f3 addw r3, r3, #499 ; 0x1f3
800c200: 4a0a ldr r2, [pc, #40] ; (800c22c <dhcp_decline+0xe8>)
800c202: fb82 1203 smull r1, r2, r2, r3
800c206: 1152 asrs r2, r2, #5
800c208: 17db asrs r3, r3, #31
800c20a: 1ad3 subs r3, r2, r3
800c20c: b29a uxth r2, r3
800c20e: 69bb ldr r3, [r7, #24]
800c210: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs));
return result;
800c212: f997 301f ldrsb.w r3, [r7, #31]
}
800c216: 4618 mov r0, r3
800c218: 3720 adds r7, #32
800c21a: 46bd mov sp, r7
800c21c: bdb0 pop {r4, r5, r7, pc}
800c21e: bf00 nop
800c220: 20008c34 .word 0x20008c34
800c224: 080178c4 .word 0x080178c4
800c228: 080178c8 .word 0x080178c8
800c22c: 10624dd3 .word 0x10624dd3
0800c230 <dhcp_discover>:
*
* @param netif the netif under DHCP control
*/
static err_t
dhcp_discover(struct netif *netif)
{
800c230: b580 push {r7, lr}
800c232: b08a sub sp, #40 ; 0x28
800c234: af02 add r7, sp, #8
800c236: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c238: 687b ldr r3, [r7, #4]
800c23a: 6a5b ldr r3, [r3, #36] ; 0x24
800c23c: 61bb str r3, [r7, #24]
err_t result = ERR_OK;
800c23e: 2300 movs r3, #0
800c240: 75fb strb r3, [r7, #23]
struct pbuf *p_out;
u16_t options_out_len;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n"));
ip4_addr_set_any(&dhcp->offered_ip_addr);
800c242: 69bb ldr r3, [r7, #24]
800c244: 2200 movs r2, #0
800c246: 61da str r2, [r3, #28]
dhcp_set_state(dhcp, DHCP_STATE_SELECTING);
800c248: 2106 movs r1, #6
800c24a: 69b8 ldr r0, [r7, #24]
800c24c: f000 fbf4 bl 800ca38 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len);
800c250: f107 0308 add.w r3, r7, #8
800c254: 2201 movs r2, #1
800c256: 69b9 ldr r1, [r7, #24]
800c258: 6878 ldr r0, [r7, #4]
800c25a: f001 f879 bl 800d350 <dhcp_create_msg>
800c25e: 6138 str r0, [r7, #16]
if (p_out != NULL) {
800c260: 693b ldr r3, [r7, #16]
800c262: 2b00 cmp r3, #0
800c264: d04b beq.n 800c2fe <dhcp_discover+0xce>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800c266: 693b ldr r3, [r7, #16]
800c268: 685b ldr r3, [r3, #4]
800c26a: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: making request\n"));
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
800c26c: 8938 ldrh r0, [r7, #8]
800c26e: 68fb ldr r3, [r7, #12]
800c270: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c274: 2302 movs r3, #2
800c276: 2239 movs r2, #57 ; 0x39
800c278: f000 fbf8 bl 800ca6c <dhcp_option>
800c27c: 4603 mov r3, r0
800c27e: 813b strh r3, [r7, #8]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
800c280: 8938 ldrh r0, [r7, #8]
800c282: 68fb ldr r3, [r7, #12]
800c284: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c288: 687b ldr r3, [r7, #4]
800c28a: 8d1b ldrh r3, [r3, #40] ; 0x28
800c28c: 461a mov r2, r3
800c28e: f000 fc47 bl 800cb20 <dhcp_option_short>
800c292: 4603 mov r3, r0
800c294: 813b strh r3, [r7, #8]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
800c296: 8938 ldrh r0, [r7, #8]
800c298: 68fb ldr r3, [r7, #12]
800c29a: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c29e: 2303 movs r3, #3
800c2a0: 2237 movs r2, #55 ; 0x37
800c2a2: f000 fbe3 bl 800ca6c <dhcp_option>
800c2a6: 4603 mov r3, r0
800c2a8: 813b strh r3, [r7, #8]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c2aa: 2300 movs r3, #0
800c2ac: 77fb strb r3, [r7, #31]
800c2ae: e00e b.n 800c2ce <dhcp_discover+0x9e>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800c2b0: 8938 ldrh r0, [r7, #8]
800c2b2: 68fb ldr r3, [r7, #12]
800c2b4: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c2b8: 7ffb ldrb r3, [r7, #31]
800c2ba: 4a29 ldr r2, [pc, #164] ; (800c360 <dhcp_discover+0x130>)
800c2bc: 5cd3 ldrb r3, [r2, r3]
800c2be: 461a mov r2, r3
800c2c0: f000 fc08 bl 800cad4 <dhcp_option_byte>
800c2c4: 4603 mov r3, r0
800c2c6: 813b strh r3, [r7, #8]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c2c8: 7ffb ldrb r3, [r7, #31]
800c2ca: 3301 adds r3, #1
800c2cc: 77fb strb r3, [r7, #31]
800c2ce: 7ffb ldrb r3, [r7, #31]
800c2d0: 2b02 cmp r3, #2
800c2d2: d9ed bls.n 800c2b0 <dhcp_discover+0x80>
}
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_SELECTING, msg_out, DHCP_DISCOVER, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
800c2d4: 8938 ldrh r0, [r7, #8]
800c2d6: 68fb ldr r3, [r7, #12]
800c2d8: 33f0 adds r3, #240 ; 0xf0
800c2da: 693a ldr r2, [r7, #16]
800c2dc: 4619 mov r1, r3
800c2de: f001 f90d bl 800d4fc <dhcp_option_trailer>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)\n"));
udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
800c2e2: 4b20 ldr r3, [pc, #128] ; (800c364 <dhcp_discover+0x134>)
800c2e4: 6818 ldr r0, [r3, #0]
800c2e6: 4b20 ldr r3, [pc, #128] ; (800c368 <dhcp_discover+0x138>)
800c2e8: 9301 str r3, [sp, #4]
800c2ea: 687b ldr r3, [r7, #4]
800c2ec: 9300 str r3, [sp, #0]
800c2ee: 2343 movs r3, #67 ; 0x43
800c2f0: 4a1e ldr r2, [pc, #120] ; (800c36c <dhcp_discover+0x13c>)
800c2f2: 6939 ldr r1, [r7, #16]
800c2f4: f7ff f83e bl 800b374 <udp_sendto_if_src>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n"));
pbuf_free(p_out);
800c2f8: 6938 ldr r0, [r7, #16]
800c2fa: f7f9 f8c1 bl 8005480 <pbuf_free>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n"));
}
if (dhcp->tries < 255) {
800c2fe: 69bb ldr r3, [r7, #24]
800c300: 799b ldrb r3, [r3, #6]
800c302: 2bff cmp r3, #255 ; 0xff
800c304: d005 beq.n 800c312 <dhcp_discover+0xe2>
dhcp->tries++;
800c306: 69bb ldr r3, [r7, #24]
800c308: 799b ldrb r3, [r3, #6]
800c30a: 3301 adds r3, #1
800c30c: b2da uxtb r2, r3
800c30e: 69bb ldr r3, [r7, #24]
800c310: 719a strb r2, [r3, #6]
if (dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) {
dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON;
autoip_start(netif);
}
#endif /* LWIP_DHCP_AUTOIP_COOP */
msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
800c312: 69bb ldr r3, [r7, #24]
800c314: 799b ldrb r3, [r3, #6]
800c316: 2b05 cmp r3, #5
800c318: d80d bhi.n 800c336 <dhcp_discover+0x106>
800c31a: 69bb ldr r3, [r7, #24]
800c31c: 799b ldrb r3, [r3, #6]
800c31e: 461a mov r2, r3
800c320: 2301 movs r3, #1
800c322: 4093 lsls r3, r2
800c324: b29b uxth r3, r3
800c326: 461a mov r2, r3
800c328: 0152 lsls r2, r2, #5
800c32a: 1ad2 subs r2, r2, r3
800c32c: 0092 lsls r2, r2, #2
800c32e: 4413 add r3, r2
800c330: 00db lsls r3, r3, #3
800c332: b29b uxth r3, r3
800c334: e001 b.n 800c33a <dhcp_discover+0x10a>
800c336: f64e 2360 movw r3, #60000 ; 0xea60
800c33a: 817b strh r3, [r7, #10]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800c33c: 897b ldrh r3, [r7, #10]
800c33e: f203 13f3 addw r3, r3, #499 ; 0x1f3
800c342: 4a0b ldr r2, [pc, #44] ; (800c370 <dhcp_discover+0x140>)
800c344: fb82 1203 smull r1, r2, r2, r3
800c348: 1152 asrs r2, r2, #5
800c34a: 17db asrs r3, r3, #31
800c34c: 1ad3 subs r3, r2, r3
800c34e: b29a uxth r2, r3
800c350: 69bb ldr r3, [r7, #24]
800c352: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover(): set request timeout %"U16_F" msecs\n", msecs));
return result;
800c354: f997 3017 ldrsb.w r3, [r7, #23]
}
800c358: 4618 mov r0, r3
800c35a: 3720 adds r7, #32
800c35c: 46bd mov sp, r7
800c35e: bd80 pop {r7, pc}
800c360: 2000002c .word 0x2000002c
800c364: 20008c34 .word 0x20008c34
800c368: 080178c4 .word 0x080178c4
800c36c: 080178c8 .word 0x080178c8
800c370: 10624dd3 .word 0x10624dd3
0800c374 <dhcp_bind>:
*
* @param netif network interface to bind to the offered address
*/
static void
dhcp_bind(struct netif *netif)
{
800c374: b580 push {r7, lr}
800c376: b088 sub sp, #32
800c378: af00 add r7, sp, #0
800c37a: 6078 str r0, [r7, #4]
u32_t timeout;
struct dhcp *dhcp;
ip4_addr_t sn_mask, gw_addr;
LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;);
800c37c: 687b ldr r3, [r7, #4]
800c37e: 2b00 cmp r3, #0
800c380: d107 bne.n 800c392 <dhcp_bind+0x1e>
800c382: 4b64 ldr r3, [pc, #400] ; (800c514 <dhcp_bind+0x1a0>)
800c384: f240 4215 movw r2, #1045 ; 0x415
800c388: 4963 ldr r1, [pc, #396] ; (800c518 <dhcp_bind+0x1a4>)
800c38a: 4864 ldr r0, [pc, #400] ; (800c51c <dhcp_bind+0x1a8>)
800c38c: f003 fd94 bl 800feb8 <printf>
800c390: e0bc b.n 800c50c <dhcp_bind+0x198>
dhcp = netif_dhcp_data(netif);
800c392: 687b ldr r3, [r7, #4]
800c394: 6a5b ldr r3, [r3, #36] ; 0x24
800c396: 61bb str r3, [r7, #24]
LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;);
800c398: 69bb ldr r3, [r7, #24]
800c39a: 2b00 cmp r3, #0
800c39c: d107 bne.n 800c3ae <dhcp_bind+0x3a>
800c39e: 4b5d ldr r3, [pc, #372] ; (800c514 <dhcp_bind+0x1a0>)
800c3a0: f240 4217 movw r2, #1047 ; 0x417
800c3a4: 495e ldr r1, [pc, #376] ; (800c520 <dhcp_bind+0x1ac>)
800c3a6: 485d ldr r0, [pc, #372] ; (800c51c <dhcp_bind+0x1a8>)
800c3a8: f003 fd86 bl 800feb8 <printf>
800c3ac: e0ae b.n 800c50c <dhcp_bind+0x198>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
/* reset time used of lease */
dhcp->lease_used = 0;
800c3ae: 69bb ldr r3, [r7, #24]
800c3b0: 2200 movs r2, #0
800c3b2: 825a strh r2, [r3, #18]
if (dhcp->offered_t0_lease != 0xffffffffUL) {
800c3b4: 69bb ldr r3, [r7, #24]
800c3b6: 6a9b ldr r3, [r3, #40] ; 0x28
800c3b8: f1b3 3fff cmp.w r3, #4294967295
800c3bc: d019 beq.n 800c3f2 <dhcp_bind+0x7e>
/* set renewal period timer */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t0 renewal timer %"U32_F" secs\n", dhcp->offered_t0_lease));
timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
800c3be: 69bb ldr r3, [r7, #24]
800c3c0: 6a9b ldr r3, [r3, #40] ; 0x28
800c3c2: 331e adds r3, #30
800c3c4: 4a57 ldr r2, [pc, #348] ; (800c524 <dhcp_bind+0x1b0>)
800c3c6: fba2 2303 umull r2, r3, r2, r3
800c3ca: 095b lsrs r3, r3, #5
800c3cc: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
800c3ce: 69fb ldr r3, [r7, #28]
800c3d0: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c3d4: d302 bcc.n 800c3dc <dhcp_bind+0x68>
timeout = 0xffff;
800c3d6: f64f 73ff movw r3, #65535 ; 0xffff
800c3da: 61fb str r3, [r7, #28]
}
dhcp->t0_timeout = (u16_t)timeout;
800c3dc: 69fb ldr r3, [r7, #28]
800c3de: b29a uxth r2, r3
800c3e0: 69bb ldr r3, [r7, #24]
800c3e2: 829a strh r2, [r3, #20]
if (dhcp->t0_timeout == 0) {
800c3e4: 69bb ldr r3, [r7, #24]
800c3e6: 8a9b ldrh r3, [r3, #20]
800c3e8: 2b00 cmp r3, #0
800c3ea: d102 bne.n 800c3f2 <dhcp_bind+0x7e>
dhcp->t0_timeout = 1;
800c3ec: 69bb ldr r3, [r7, #24]
800c3ee: 2201 movs r2, #1
800c3f0: 829a strh r2, [r3, #20]
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t0_lease * 1000));
}
/* temporary DHCP lease? */
if (dhcp->offered_t1_renew != 0xffffffffUL) {
800c3f2: 69bb ldr r3, [r7, #24]
800c3f4: 6adb ldr r3, [r3, #44] ; 0x2c
800c3f6: f1b3 3fff cmp.w r3, #4294967295
800c3fa: d01d beq.n 800c438 <dhcp_bind+0xc4>
/* set renewal period timer */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t1 renewal timer %"U32_F" secs\n", dhcp->offered_t1_renew));
timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
800c3fc: 69bb ldr r3, [r7, #24]
800c3fe: 6adb ldr r3, [r3, #44] ; 0x2c
800c400: 331e adds r3, #30
800c402: 4a48 ldr r2, [pc, #288] ; (800c524 <dhcp_bind+0x1b0>)
800c404: fba2 2303 umull r2, r3, r2, r3
800c408: 095b lsrs r3, r3, #5
800c40a: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
800c40c: 69fb ldr r3, [r7, #28]
800c40e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c412: d302 bcc.n 800c41a <dhcp_bind+0xa6>
timeout = 0xffff;
800c414: f64f 73ff movw r3, #65535 ; 0xffff
800c418: 61fb str r3, [r7, #28]
}
dhcp->t1_timeout = (u16_t)timeout;
800c41a: 69fb ldr r3, [r7, #28]
800c41c: b29a uxth r2, r3
800c41e: 69bb ldr r3, [r7, #24]
800c420: 815a strh r2, [r3, #10]
if (dhcp->t1_timeout == 0) {
800c422: 69bb ldr r3, [r7, #24]
800c424: 895b ldrh r3, [r3, #10]
800c426: 2b00 cmp r3, #0
800c428: d102 bne.n 800c430 <dhcp_bind+0xbc>
dhcp->t1_timeout = 1;
800c42a: 69bb ldr r3, [r7, #24]
800c42c: 2201 movs r2, #1
800c42e: 815a strh r2, [r3, #10]
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew * 1000));
dhcp->t1_renew_time = dhcp->t1_timeout;
800c430: 69bb ldr r3, [r7, #24]
800c432: 895a ldrh r2, [r3, #10]
800c434: 69bb ldr r3, [r7, #24]
800c436: 81da strh r2, [r3, #14]
}
/* set renewal period timer */
if (dhcp->offered_t2_rebind != 0xffffffffUL) {
800c438: 69bb ldr r3, [r7, #24]
800c43a: 6b1b ldr r3, [r3, #48] ; 0x30
800c43c: f1b3 3fff cmp.w r3, #4294967295
800c440: d01d beq.n 800c47e <dhcp_bind+0x10a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t2 rebind timer %"U32_F" secs\n", dhcp->offered_t2_rebind));
timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
800c442: 69bb ldr r3, [r7, #24]
800c444: 6b1b ldr r3, [r3, #48] ; 0x30
800c446: 331e adds r3, #30
800c448: 4a36 ldr r2, [pc, #216] ; (800c524 <dhcp_bind+0x1b0>)
800c44a: fba2 2303 umull r2, r3, r2, r3
800c44e: 095b lsrs r3, r3, #5
800c450: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
800c452: 69fb ldr r3, [r7, #28]
800c454: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c458: d302 bcc.n 800c460 <dhcp_bind+0xec>
timeout = 0xffff;
800c45a: f64f 73ff movw r3, #65535 ; 0xffff
800c45e: 61fb str r3, [r7, #28]
}
dhcp->t2_timeout = (u16_t)timeout;
800c460: 69fb ldr r3, [r7, #28]
800c462: b29a uxth r2, r3
800c464: 69bb ldr r3, [r7, #24]
800c466: 819a strh r2, [r3, #12]
if (dhcp->t2_timeout == 0) {
800c468: 69bb ldr r3, [r7, #24]
800c46a: 899b ldrh r3, [r3, #12]
800c46c: 2b00 cmp r3, #0
800c46e: d102 bne.n 800c476 <dhcp_bind+0x102>
dhcp->t2_timeout = 1;
800c470: 69bb ldr r3, [r7, #24]
800c472: 2201 movs r2, #1
800c474: 819a strh r2, [r3, #12]
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind * 1000));
dhcp->t2_rebind_time = dhcp->t2_timeout;
800c476: 69bb ldr r3, [r7, #24]
800c478: 899a ldrh r2, [r3, #12]
800c47a: 69bb ldr r3, [r7, #24]
800c47c: 821a strh r2, [r3, #16]
}
/* If we have sub 1 minute lease, t2 and t1 will kick in at the same time. */
if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) {
800c47e: 69bb ldr r3, [r7, #24]
800c480: 895a ldrh r2, [r3, #10]
800c482: 69bb ldr r3, [r7, #24]
800c484: 899b ldrh r3, [r3, #12]
800c486: 429a cmp r2, r3
800c488: d306 bcc.n 800c498 <dhcp_bind+0x124>
800c48a: 69bb ldr r3, [r7, #24]
800c48c: 899b ldrh r3, [r3, #12]
800c48e: 2b00 cmp r3, #0
800c490: d002 beq.n 800c498 <dhcp_bind+0x124>
dhcp->t1_timeout = 0;
800c492: 69bb ldr r3, [r7, #24]
800c494: 2200 movs r2, #0
800c496: 815a strh r2, [r3, #10]
}
if (dhcp->subnet_mask_given) {
800c498: 69bb ldr r3, [r7, #24]
800c49a: 79db ldrb r3, [r3, #7]
800c49c: 2b00 cmp r3, #0
800c49e: d003 beq.n 800c4a8 <dhcp_bind+0x134>
/* copy offered network mask */
ip4_addr_copy(sn_mask, dhcp->offered_sn_mask);
800c4a0: 69bb ldr r3, [r7, #24]
800c4a2: 6a1b ldr r3, [r3, #32]
800c4a4: 613b str r3, [r7, #16]
800c4a6: e014 b.n 800c4d2 <dhcp_bind+0x15e>
} else {
/* subnet mask not given, choose a safe subnet mask given the network class */
u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr);
800c4a8: 69bb ldr r3, [r7, #24]
800c4aa: 331c adds r3, #28
800c4ac: 781b ldrb r3, [r3, #0]
800c4ae: 75fb strb r3, [r7, #23]
if (first_octet <= 127) {
800c4b0: f997 3017 ldrsb.w r3, [r7, #23]
800c4b4: 2b00 cmp r3, #0
800c4b6: db02 blt.n 800c4be <dhcp_bind+0x14a>
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL));
800c4b8: 23ff movs r3, #255 ; 0xff
800c4ba: 613b str r3, [r7, #16]
800c4bc: e009 b.n 800c4d2 <dhcp_bind+0x15e>
} else if (first_octet >= 192) {
800c4be: 7dfb ldrb r3, [r7, #23]
800c4c0: 2bbf cmp r3, #191 ; 0xbf
800c4c2: d903 bls.n 800c4cc <dhcp_bind+0x158>
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL));
800c4c4: f06f 437f mvn.w r3, #4278190080 ; 0xff000000
800c4c8: 613b str r3, [r7, #16]
800c4ca: e002 b.n 800c4d2 <dhcp_bind+0x15e>
} else {
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL));
800c4cc: f64f 73ff movw r3, #65535 ; 0xffff
800c4d0: 613b str r3, [r7, #16]
}
}
ip4_addr_copy(gw_addr, dhcp->offered_gw_addr);
800c4d2: 69bb ldr r3, [r7, #24]
800c4d4: 6a5b ldr r3, [r3, #36] ; 0x24
800c4d6: 60fb str r3, [r7, #12]
/* gateway address not given? */
if (ip4_addr_isany_val(gw_addr)) {
800c4d8: 68fb ldr r3, [r7, #12]
800c4da: 2b00 cmp r3, #0
800c4dc: d108 bne.n 800c4f0 <dhcp_bind+0x17c>
/* copy network address */
ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask);
800c4de: 69bb ldr r3, [r7, #24]
800c4e0: 69da ldr r2, [r3, #28]
800c4e2: 693b ldr r3, [r7, #16]
800c4e4: 4013 ands r3, r2
800c4e6: 60fb str r3, [r7, #12]
/* use first host address on network as gateway */
ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL));
800c4e8: 68fb ldr r3, [r7, #12]
800c4ea: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
800c4ee: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): IP: 0x%08"X32_F" SN: 0x%08"X32_F" GW: 0x%08"X32_F"\n",
ip4_addr_get_u32(&dhcp->offered_ip_addr), ip4_addr_get_u32(&sn_mask), ip4_addr_get_u32(&gw_addr)));
/* netif is now bound to DHCP leased address - set this before assigning the address
to ensure the callback can use dhcp_supplied_address() */
dhcp_set_state(dhcp, DHCP_STATE_BOUND);
800c4f0: 210a movs r1, #10
800c4f2: 69b8 ldr r0, [r7, #24]
800c4f4: f000 faa0 bl 800ca38 <dhcp_set_state>
netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr);
800c4f8: 69bb ldr r3, [r7, #24]
800c4fa: f103 011c add.w r1, r3, #28
800c4fe: f107 030c add.w r3, r7, #12
800c502: f107 0210 add.w r2, r7, #16
800c506: 6878 ldr r0, [r7, #4]
800c508: f7f8 fada bl 8004ac0 <netif_set_addr>
/* interface is used by routing now that an address is set */
}
800c50c: 3720 adds r7, #32
800c50e: 46bd mov sp, r7
800c510: bd80 pop {r7, pc}
800c512: bf00 nop
800c514: 08016cf4 .word 0x08016cf4
800c518: 08016e54 .word 0x08016e54
800c51c: 08016d54 .word 0x08016d54
800c520: 08016e70 .word 0x08016e70
800c524: 88888889 .word 0x88888889
0800c528 <dhcp_renew>:
*
* @param netif network interface which must renew its lease
*/
err_t
dhcp_renew(struct netif *netif)
{
800c528: b580 push {r7, lr}
800c52a: b08a sub sp, #40 ; 0x28
800c52c: af02 add r7, sp, #8
800c52e: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c530: 687b ldr r3, [r7, #4]
800c532: 6a5b ldr r3, [r3, #36] ; 0x24
800c534: 61bb str r3, [r7, #24]
struct pbuf *p_out;
u16_t options_out_len;
LWIP_ASSERT_CORE_LOCKED();
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n"));
dhcp_set_state(dhcp, DHCP_STATE_RENEWING);
800c536: 2105 movs r1, #5
800c538: 69b8 ldr r0, [r7, #24]
800c53a: f000 fa7d bl 800ca38 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
800c53e: f107 030c add.w r3, r7, #12
800c542: 2203 movs r2, #3
800c544: 69b9 ldr r1, [r7, #24]
800c546: 6878 ldr r0, [r7, #4]
800c548: f000 ff02 bl 800d350 <dhcp_create_msg>
800c54c: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800c54e: 697b ldr r3, [r7, #20]
800c550: 2b00 cmp r3, #0
800c552: d04e beq.n 800c5f2 <dhcp_renew+0xca>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800c554: 697b ldr r3, [r7, #20]
800c556: 685b ldr r3, [r3, #4]
800c558: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
800c55a: 89b8 ldrh r0, [r7, #12]
800c55c: 693b ldr r3, [r7, #16]
800c55e: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c562: 2302 movs r3, #2
800c564: 2239 movs r2, #57 ; 0x39
800c566: f000 fa81 bl 800ca6c <dhcp_option>
800c56a: 4603 mov r3, r0
800c56c: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
800c56e: 89b8 ldrh r0, [r7, #12]
800c570: 693b ldr r3, [r7, #16]
800c572: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c576: 687b ldr r3, [r7, #4]
800c578: 8d1b ldrh r3, [r3, #40] ; 0x28
800c57a: 461a mov r2, r3
800c57c: f000 fad0 bl 800cb20 <dhcp_option_short>
800c580: 4603 mov r3, r0
800c582: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
800c584: 89b8 ldrh r0, [r7, #12]
800c586: 693b ldr r3, [r7, #16]
800c588: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c58c: 2303 movs r3, #3
800c58e: 2237 movs r2, #55 ; 0x37
800c590: f000 fa6c bl 800ca6c <dhcp_option>
800c594: 4603 mov r3, r0
800c596: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c598: 2300 movs r3, #0
800c59a: 77bb strb r3, [r7, #30]
800c59c: e00e b.n 800c5bc <dhcp_renew+0x94>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800c59e: 89b8 ldrh r0, [r7, #12]
800c5a0: 693b ldr r3, [r7, #16]
800c5a2: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c5a6: 7fbb ldrb r3, [r7, #30]
800c5a8: 4a2a ldr r2, [pc, #168] ; (800c654 <dhcp_renew+0x12c>)
800c5aa: 5cd3 ldrb r3, [r2, r3]
800c5ac: 461a mov r2, r3
800c5ae: f000 fa91 bl 800cad4 <dhcp_option_byte>
800c5b2: 4603 mov r3, r0
800c5b4: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c5b6: 7fbb ldrb r3, [r7, #30]
800c5b8: 3301 adds r3, #1
800c5ba: 77bb strb r3, [r7, #30]
800c5bc: 7fbb ldrb r3, [r7, #30]
800c5be: 2b02 cmp r3, #2
800c5c0: d9ed bls.n 800c59e <dhcp_renew+0x76>
#if LWIP_NETIF_HOSTNAME
options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif);
#endif /* LWIP_NETIF_HOSTNAME */
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_RENEWING, msg_out, DHCP_REQUEST, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
800c5c2: 89b8 ldrh r0, [r7, #12]
800c5c4: 693b ldr r3, [r7, #16]
800c5c6: 33f0 adds r3, #240 ; 0xf0
800c5c8: 697a ldr r2, [r7, #20]
800c5ca: 4619 mov r1, r3
800c5cc: f000 ff96 bl 800d4fc <dhcp_option_trailer>
result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
800c5d0: 4b21 ldr r3, [pc, #132] ; (800c658 <dhcp_renew+0x130>)
800c5d2: 6818 ldr r0, [r3, #0]
800c5d4: 69bb ldr r3, [r7, #24]
800c5d6: f103 0218 add.w r2, r3, #24
800c5da: 687b ldr r3, [r7, #4]
800c5dc: 9300 str r3, [sp, #0]
800c5de: 2343 movs r3, #67 ; 0x43
800c5e0: 6979 ldr r1, [r7, #20]
800c5e2: f7fe fe53 bl 800b28c <udp_sendto_if>
800c5e6: 4603 mov r3, r0
800c5e8: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800c5ea: 6978 ldr r0, [r7, #20]
800c5ec: f7f8 ff48 bl 8005480 <pbuf_free>
800c5f0: e001 b.n 800c5f6 <dhcp_renew+0xce>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n"));
result = ERR_MEM;
800c5f2: 23ff movs r3, #255 ; 0xff
800c5f4: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800c5f6: 69bb ldr r3, [r7, #24]
800c5f8: 799b ldrb r3, [r3, #6]
800c5fa: 2bff cmp r3, #255 ; 0xff
800c5fc: d005 beq.n 800c60a <dhcp_renew+0xe2>
dhcp->tries++;
800c5fe: 69bb ldr r3, [r7, #24]
800c600: 799b ldrb r3, [r3, #6]
800c602: 3301 adds r3, #1
800c604: b2da uxtb r2, r3
800c606: 69bb ldr r3, [r7, #24]
800c608: 719a strb r2, [r3, #6]
}
/* back-off on retries, but to a maximum of 20 seconds */
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000);
800c60a: 69bb ldr r3, [r7, #24]
800c60c: 799b ldrb r3, [r3, #6]
800c60e: 2b09 cmp r3, #9
800c610: d80a bhi.n 800c628 <dhcp_renew+0x100>
800c612: 69bb ldr r3, [r7, #24]
800c614: 799b ldrb r3, [r3, #6]
800c616: b29b uxth r3, r3
800c618: 461a mov r2, r3
800c61a: 0152 lsls r2, r2, #5
800c61c: 1ad2 subs r2, r2, r3
800c61e: 0092 lsls r2, r2, #2
800c620: 4413 add r3, r2
800c622: 011b lsls r3, r3, #4
800c624: b29b uxth r3, r3
800c626: e001 b.n 800c62c <dhcp_renew+0x104>
800c628: f644 6320 movw r3, #20000 ; 0x4e20
800c62c: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800c62e: 89fb ldrh r3, [r7, #14]
800c630: f203 13f3 addw r3, r3, #499 ; 0x1f3
800c634: 4a09 ldr r2, [pc, #36] ; (800c65c <dhcp_renew+0x134>)
800c636: fb82 1203 smull r1, r2, r2, r3
800c63a: 1152 asrs r2, r2, #5
800c63c: 17db asrs r3, r3, #31
800c63e: 1ad3 subs r3, r2, r3
800c640: b29a uxth r2, r3
800c642: 69bb ldr r3, [r7, #24]
800c644: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew(): set request timeout %"U16_F" msecs\n", msecs));
return result;
800c646: f997 301f ldrsb.w r3, [r7, #31]
}
800c64a: 4618 mov r0, r3
800c64c: 3720 adds r7, #32
800c64e: 46bd mov sp, r7
800c650: bd80 pop {r7, pc}
800c652: bf00 nop
800c654: 2000002c .word 0x2000002c
800c658: 20008c34 .word 0x20008c34
800c65c: 10624dd3 .word 0x10624dd3
0800c660 <dhcp_rebind>:
*
* @param netif network interface which must rebind with a DHCP server
*/
static err_t
dhcp_rebind(struct netif *netif)
{
800c660: b580 push {r7, lr}
800c662: b08a sub sp, #40 ; 0x28
800c664: af02 add r7, sp, #8
800c666: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c668: 687b ldr r3, [r7, #4]
800c66a: 6a5b ldr r3, [r3, #36] ; 0x24
800c66c: 61bb str r3, [r7, #24]
u8_t i;
struct pbuf *p_out;
u16_t options_out_len;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind()\n"));
dhcp_set_state(dhcp, DHCP_STATE_REBINDING);
800c66e: 2104 movs r1, #4
800c670: 69b8 ldr r0, [r7, #24]
800c672: f000 f9e1 bl 800ca38 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
800c676: f107 030c add.w r3, r7, #12
800c67a: 2203 movs r2, #3
800c67c: 69b9 ldr r1, [r7, #24]
800c67e: 6878 ldr r0, [r7, #4]
800c680: f000 fe66 bl 800d350 <dhcp_create_msg>
800c684: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800c686: 697b ldr r3, [r7, #20]
800c688: 2b00 cmp r3, #0
800c68a: d04c beq.n 800c726 <dhcp_rebind+0xc6>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800c68c: 697b ldr r3, [r7, #20]
800c68e: 685b ldr r3, [r3, #4]
800c690: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
800c692: 89b8 ldrh r0, [r7, #12]
800c694: 693b ldr r3, [r7, #16]
800c696: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c69a: 2302 movs r3, #2
800c69c: 2239 movs r2, #57 ; 0x39
800c69e: f000 f9e5 bl 800ca6c <dhcp_option>
800c6a2: 4603 mov r3, r0
800c6a4: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
800c6a6: 89b8 ldrh r0, [r7, #12]
800c6a8: 693b ldr r3, [r7, #16]
800c6aa: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c6ae: 687b ldr r3, [r7, #4]
800c6b0: 8d1b ldrh r3, [r3, #40] ; 0x28
800c6b2: 461a mov r2, r3
800c6b4: f000 fa34 bl 800cb20 <dhcp_option_short>
800c6b8: 4603 mov r3, r0
800c6ba: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
800c6bc: 89b8 ldrh r0, [r7, #12]
800c6be: 693b ldr r3, [r7, #16]
800c6c0: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c6c4: 2303 movs r3, #3
800c6c6: 2237 movs r2, #55 ; 0x37
800c6c8: f000 f9d0 bl 800ca6c <dhcp_option>
800c6cc: 4603 mov r3, r0
800c6ce: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c6d0: 2300 movs r3, #0
800c6d2: 77bb strb r3, [r7, #30]
800c6d4: e00e b.n 800c6f4 <dhcp_rebind+0x94>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800c6d6: 89b8 ldrh r0, [r7, #12]
800c6d8: 693b ldr r3, [r7, #16]
800c6da: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c6de: 7fbb ldrb r3, [r7, #30]
800c6e0: 4a29 ldr r2, [pc, #164] ; (800c788 <dhcp_rebind+0x128>)
800c6e2: 5cd3 ldrb r3, [r2, r3]
800c6e4: 461a mov r2, r3
800c6e6: f000 f9f5 bl 800cad4 <dhcp_option_byte>
800c6ea: 4603 mov r3, r0
800c6ec: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c6ee: 7fbb ldrb r3, [r7, #30]
800c6f0: 3301 adds r3, #1
800c6f2: 77bb strb r3, [r7, #30]
800c6f4: 7fbb ldrb r3, [r7, #30]
800c6f6: 2b02 cmp r3, #2
800c6f8: d9ed bls.n 800c6d6 <dhcp_rebind+0x76>
#if LWIP_NETIF_HOSTNAME
options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif);
#endif /* LWIP_NETIF_HOSTNAME */
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REBINDING, msg_out, DHCP_DISCOVER, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
800c6fa: 89b8 ldrh r0, [r7, #12]
800c6fc: 693b ldr r3, [r7, #16]
800c6fe: 33f0 adds r3, #240 ; 0xf0
800c700: 697a ldr r2, [r7, #20]
800c702: 4619 mov r1, r3
800c704: f000 fefa bl 800d4fc <dhcp_option_trailer>
/* broadcast to server */
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
800c708: 4b20 ldr r3, [pc, #128] ; (800c78c <dhcp_rebind+0x12c>)
800c70a: 6818 ldr r0, [r3, #0]
800c70c: 687b ldr r3, [r7, #4]
800c70e: 9300 str r3, [sp, #0]
800c710: 2343 movs r3, #67 ; 0x43
800c712: 4a1f ldr r2, [pc, #124] ; (800c790 <dhcp_rebind+0x130>)
800c714: 6979 ldr r1, [r7, #20]
800c716: f7fe fdb9 bl 800b28c <udp_sendto_if>
800c71a: 4603 mov r3, r0
800c71c: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800c71e: 6978 ldr r0, [r7, #20]
800c720: f7f8 feae bl 8005480 <pbuf_free>
800c724: e001 b.n 800c72a <dhcp_rebind+0xca>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n"));
result = ERR_MEM;
800c726: 23ff movs r3, #255 ; 0xff
800c728: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800c72a: 69bb ldr r3, [r7, #24]
800c72c: 799b ldrb r3, [r3, #6]
800c72e: 2bff cmp r3, #255 ; 0xff
800c730: d005 beq.n 800c73e <dhcp_rebind+0xde>
dhcp->tries++;
800c732: 69bb ldr r3, [r7, #24]
800c734: 799b ldrb r3, [r3, #6]
800c736: 3301 adds r3, #1
800c738: b2da uxtb r2, r3
800c73a: 69bb ldr r3, [r7, #24]
800c73c: 719a strb r2, [r3, #6]
}
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
800c73e: 69bb ldr r3, [r7, #24]
800c740: 799b ldrb r3, [r3, #6]
800c742: 2b09 cmp r3, #9
800c744: d80a bhi.n 800c75c <dhcp_rebind+0xfc>
800c746: 69bb ldr r3, [r7, #24]
800c748: 799b ldrb r3, [r3, #6]
800c74a: b29b uxth r3, r3
800c74c: 461a mov r2, r3
800c74e: 0152 lsls r2, r2, #5
800c750: 1ad2 subs r2, r2, r3
800c752: 0092 lsls r2, r2, #2
800c754: 4413 add r3, r2
800c756: 00db lsls r3, r3, #3
800c758: b29b uxth r3, r3
800c75a: e001 b.n 800c760 <dhcp_rebind+0x100>
800c75c: f242 7310 movw r3, #10000 ; 0x2710
800c760: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800c762: 89fb ldrh r3, [r7, #14]
800c764: f203 13f3 addw r3, r3, #499 ; 0x1f3
800c768: 4a0a ldr r2, [pc, #40] ; (800c794 <dhcp_rebind+0x134>)
800c76a: fb82 1203 smull r1, r2, r2, r3
800c76e: 1152 asrs r2, r2, #5
800c770: 17db asrs r3, r3, #31
800c772: 1ad3 subs r3, r2, r3
800c774: b29a uxth r2, r3
800c776: 69bb ldr r3, [r7, #24]
800c778: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind(): set request timeout %"U16_F" msecs\n", msecs));
return result;
800c77a: f997 301f ldrsb.w r3, [r7, #31]
}
800c77e: 4618 mov r0, r3
800c780: 3720 adds r7, #32
800c782: 46bd mov sp, r7
800c784: bd80 pop {r7, pc}
800c786: bf00 nop
800c788: 2000002c .word 0x2000002c
800c78c: 20008c34 .word 0x20008c34
800c790: 080178c8 .word 0x080178c8
800c794: 10624dd3 .word 0x10624dd3
0800c798 <dhcp_reboot>:
*
* @param netif network interface which must reboot
*/
static err_t
dhcp_reboot(struct netif *netif)
{
800c798: b5b0 push {r4, r5, r7, lr}
800c79a: b08a sub sp, #40 ; 0x28
800c79c: af02 add r7, sp, #8
800c79e: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c7a0: 687b ldr r3, [r7, #4]
800c7a2: 6a5b ldr r3, [r3, #36] ; 0x24
800c7a4: 61bb str r3, [r7, #24]
u8_t i;
struct pbuf *p_out;
u16_t options_out_len;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n"));
dhcp_set_state(dhcp, DHCP_STATE_REBOOTING);
800c7a6: 2103 movs r1, #3
800c7a8: 69b8 ldr r0, [r7, #24]
800c7aa: f000 f945 bl 800ca38 <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
800c7ae: f107 030c add.w r3, r7, #12
800c7b2: 2203 movs r2, #3
800c7b4: 69b9 ldr r1, [r7, #24]
800c7b6: 6878 ldr r0, [r7, #4]
800c7b8: f000 fdca bl 800d350 <dhcp_create_msg>
800c7bc: 6178 str r0, [r7, #20]
if (p_out != NULL) {
800c7be: 697b ldr r3, [r7, #20]
800c7c0: 2b00 cmp r3, #0
800c7c2: d066 beq.n 800c892 <dhcp_reboot+0xfa>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800c7c4: 697b ldr r3, [r7, #20]
800c7c6: 685b ldr r3, [r3, #4]
800c7c8: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
800c7ca: 89b8 ldrh r0, [r7, #12]
800c7cc: 693b ldr r3, [r7, #16]
800c7ce: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c7d2: 2302 movs r3, #2
800c7d4: 2239 movs r2, #57 ; 0x39
800c7d6: f000 f949 bl 800ca6c <dhcp_option>
800c7da: 4603 mov r3, r0
800c7dc: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED);
800c7de: 89b8 ldrh r0, [r7, #12]
800c7e0: 693b ldr r3, [r7, #16]
800c7e2: 33f0 adds r3, #240 ; 0xf0
800c7e4: f44f 7210 mov.w r2, #576 ; 0x240
800c7e8: 4619 mov r1, r3
800c7ea: f000 f999 bl 800cb20 <dhcp_option_short>
800c7ee: 4603 mov r3, r0
800c7f0: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
800c7f2: 89b8 ldrh r0, [r7, #12]
800c7f4: 693b ldr r3, [r7, #16]
800c7f6: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c7fa: 2304 movs r3, #4
800c7fc: 2232 movs r2, #50 ; 0x32
800c7fe: f000 f935 bl 800ca6c <dhcp_option>
800c802: 4603 mov r3, r0
800c804: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
800c806: 89bc ldrh r4, [r7, #12]
800c808: 693b ldr r3, [r7, #16]
800c80a: f103 05f0 add.w r5, r3, #240 ; 0xf0
800c80e: 69bb ldr r3, [r7, #24]
800c810: 69db ldr r3, [r3, #28]
800c812: 4618 mov r0, r3
800c814: f7f7 fadf bl 8003dd6 <lwip_htonl>
800c818: 4603 mov r3, r0
800c81a: 461a mov r2, r3
800c81c: 4629 mov r1, r5
800c81e: 4620 mov r0, r4
800c820: f000 f9b0 bl 800cb84 <dhcp_option_long>
800c824: 4603 mov r3, r0
800c826: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
800c828: 89b8 ldrh r0, [r7, #12]
800c82a: 693b ldr r3, [r7, #16]
800c82c: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c830: 2303 movs r3, #3
800c832: 2237 movs r2, #55 ; 0x37
800c834: f000 f91a bl 800ca6c <dhcp_option>
800c838: 4603 mov r3, r0
800c83a: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c83c: 2300 movs r3, #0
800c83e: 77bb strb r3, [r7, #30]
800c840: e00e b.n 800c860 <dhcp_reboot+0xc8>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
800c842: 89b8 ldrh r0, [r7, #12]
800c844: 693b ldr r3, [r7, #16]
800c846: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c84a: 7fbb ldrb r3, [r7, #30]
800c84c: 4a29 ldr r2, [pc, #164] ; (800c8f4 <dhcp_reboot+0x15c>)
800c84e: 5cd3 ldrb r3, [r2, r3]
800c850: 461a mov r2, r3
800c852: f000 f93f bl 800cad4 <dhcp_option_byte>
800c856: 4603 mov r3, r0
800c858: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
800c85a: 7fbb ldrb r3, [r7, #30]
800c85c: 3301 adds r3, #1
800c85e: 77bb strb r3, [r7, #30]
800c860: 7fbb ldrb r3, [r7, #30]
800c862: 2b02 cmp r3, #2
800c864: d9ed bls.n 800c842 <dhcp_reboot+0xaa>
#if LWIP_NETIF_HOSTNAME
options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif);
#endif /* LWIP_NETIF_HOSTNAME */
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REBOOTING, msg_out, DHCP_REQUEST, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
800c866: 89b8 ldrh r0, [r7, #12]
800c868: 693b ldr r3, [r7, #16]
800c86a: 33f0 adds r3, #240 ; 0xf0
800c86c: 697a ldr r2, [r7, #20]
800c86e: 4619 mov r1, r3
800c870: f000 fe44 bl 800d4fc <dhcp_option_trailer>
/* broadcast to server */
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
800c874: 4b20 ldr r3, [pc, #128] ; (800c8f8 <dhcp_reboot+0x160>)
800c876: 6818 ldr r0, [r3, #0]
800c878: 687b ldr r3, [r7, #4]
800c87a: 9300 str r3, [sp, #0]
800c87c: 2343 movs r3, #67 ; 0x43
800c87e: 4a1f ldr r2, [pc, #124] ; (800c8fc <dhcp_reboot+0x164>)
800c880: 6979 ldr r1, [r7, #20]
800c882: f7fe fd03 bl 800b28c <udp_sendto_if>
800c886: 4603 mov r3, r0
800c888: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
800c88a: 6978 ldr r0, [r7, #20]
800c88c: f7f8 fdf8 bl 8005480 <pbuf_free>
800c890: e001 b.n 800c896 <dhcp_reboot+0xfe>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n"));
result = ERR_MEM;
800c892: 23ff movs r3, #255 ; 0xff
800c894: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
800c896: 69bb ldr r3, [r7, #24]
800c898: 799b ldrb r3, [r3, #6]
800c89a: 2bff cmp r3, #255 ; 0xff
800c89c: d005 beq.n 800c8aa <dhcp_reboot+0x112>
dhcp->tries++;
800c89e: 69bb ldr r3, [r7, #24]
800c8a0: 799b ldrb r3, [r3, #6]
800c8a2: 3301 adds r3, #1
800c8a4: b2da uxtb r2, r3
800c8a6: 69bb ldr r3, [r7, #24]
800c8a8: 719a strb r2, [r3, #6]
}
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
800c8aa: 69bb ldr r3, [r7, #24]
800c8ac: 799b ldrb r3, [r3, #6]
800c8ae: 2b09 cmp r3, #9
800c8b0: d80a bhi.n 800c8c8 <dhcp_reboot+0x130>
800c8b2: 69bb ldr r3, [r7, #24]
800c8b4: 799b ldrb r3, [r3, #6]
800c8b6: b29b uxth r3, r3
800c8b8: 461a mov r2, r3
800c8ba: 0152 lsls r2, r2, #5
800c8bc: 1ad2 subs r2, r2, r3
800c8be: 0092 lsls r2, r2, #2
800c8c0: 4413 add r3, r2
800c8c2: 00db lsls r3, r3, #3
800c8c4: b29b uxth r3, r3
800c8c6: e001 b.n 800c8cc <dhcp_reboot+0x134>
800c8c8: f242 7310 movw r3, #10000 ; 0x2710
800c8cc: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
800c8ce: 89fb ldrh r3, [r7, #14]
800c8d0: f203 13f3 addw r3, r3, #499 ; 0x1f3
800c8d4: 4a0a ldr r2, [pc, #40] ; (800c900 <dhcp_reboot+0x168>)
800c8d6: fb82 1203 smull r1, r2, r2, r3
800c8da: 1152 asrs r2, r2, #5
800c8dc: 17db asrs r3, r3, #31
800c8de: 1ad3 subs r3, r2, r3
800c8e0: b29a uxth r2, r3
800c8e2: 69bb ldr r3, [r7, #24]
800c8e4: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot(): set request timeout %"U16_F" msecs\n", msecs));
return result;
800c8e6: f997 301f ldrsb.w r3, [r7, #31]
}
800c8ea: 4618 mov r0, r3
800c8ec: 3720 adds r7, #32
800c8ee: 46bd mov sp, r7
800c8f0: bdb0 pop {r4, r5, r7, pc}
800c8f2: bf00 nop
800c8f4: 2000002c .word 0x2000002c
800c8f8: 20008c34 .word 0x20008c34
800c8fc: 080178c8 .word 0x080178c8
800c900: 10624dd3 .word 0x10624dd3
0800c904 <dhcp_release_and_stop>:
*
* @param netif network interface
*/
void
dhcp_release_and_stop(struct netif *netif)
{
800c904: b5b0 push {r4, r5, r7, lr}
800c906: b08a sub sp, #40 ; 0x28
800c908: af02 add r7, sp, #8
800c90a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
800c90c: 687b ldr r3, [r7, #4]
800c90e: 6a5b ldr r3, [r3, #36] ; 0x24
800c910: 61fb str r3, [r7, #28]
ip_addr_t server_ip_addr;
LWIP_ASSERT_CORE_LOCKED();
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release_and_stop()\n"));
if (dhcp == NULL) {
800c912: 69fb ldr r3, [r7, #28]
800c914: 2b00 cmp r3, #0
800c916: f000 8084 beq.w 800ca22 <dhcp_release_and_stop+0x11e>
return;
}
/* already off? -> nothing to do */
if (dhcp->state == DHCP_STATE_OFF) {
800c91a: 69fb ldr r3, [r7, #28]
800c91c: 795b ldrb r3, [r3, #5]
800c91e: 2b00 cmp r3, #0
800c920: f000 8081 beq.w 800ca26 <dhcp_release_and_stop+0x122>
return;
}
ip_addr_copy(server_ip_addr, dhcp->server_ip_addr);
800c924: 69fb ldr r3, [r7, #28]
800c926: 699b ldr r3, [r3, #24]
800c928: 613b str r3, [r7, #16]
/* clean old DHCP offer */
ip_addr_set_zero_ip4(&dhcp->server_ip_addr);
800c92a: 69fb ldr r3, [r7, #28]
800c92c: 2200 movs r2, #0
800c92e: 619a str r2, [r3, #24]
ip4_addr_set_zero(&dhcp->offered_ip_addr);
800c930: 69fb ldr r3, [r7, #28]
800c932: 2200 movs r2, #0
800c934: 61da str r2, [r3, #28]
ip4_addr_set_zero(&dhcp->offered_sn_mask);
800c936: 69fb ldr r3, [r7, #28]
800c938: 2200 movs r2, #0
800c93a: 621a str r2, [r3, #32]
ip4_addr_set_zero(&dhcp->offered_gw_addr);
800c93c: 69fb ldr r3, [r7, #28]
800c93e: 2200 movs r2, #0
800c940: 625a str r2, [r3, #36] ; 0x24
#if LWIP_DHCP_BOOTP_FILE
ip4_addr_set_zero(&dhcp->offered_si_addr);
#endif /* LWIP_DHCP_BOOTP_FILE */
dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0;
800c942: 69fb ldr r3, [r7, #28]
800c944: 2200 movs r2, #0
800c946: 631a str r2, [r3, #48] ; 0x30
800c948: 69fb ldr r3, [r7, #28]
800c94a: 6b1a ldr r2, [r3, #48] ; 0x30
800c94c: 69fb ldr r3, [r7, #28]
800c94e: 62da str r2, [r3, #44] ; 0x2c
800c950: 69fb ldr r3, [r7, #28]
800c952: 6ada ldr r2, [r3, #44] ; 0x2c
800c954: 69fb ldr r3, [r7, #28]
800c956: 629a str r2, [r3, #40] ; 0x28
dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0;
800c958: 69fb ldr r3, [r7, #28]
800c95a: 2200 movs r2, #0
800c95c: 829a strh r2, [r3, #20]
800c95e: 69fb ldr r3, [r7, #28]
800c960: 8a9a ldrh r2, [r3, #20]
800c962: 69fb ldr r3, [r7, #28]
800c964: 825a strh r2, [r3, #18]
800c966: 69fb ldr r3, [r7, #28]
800c968: 8a5a ldrh r2, [r3, #18]
800c96a: 69fb ldr r3, [r7, #28]
800c96c: 821a strh r2, [r3, #16]
800c96e: 69fb ldr r3, [r7, #28]
800c970: 8a1a ldrh r2, [r3, #16]
800c972: 69fb ldr r3, [r7, #28]
800c974: 81da strh r2, [r3, #14]
/* send release message when current IP was assigned via DHCP */
if (dhcp_supplied_address(netif)) {
800c976: 6878 ldr r0, [r7, #4]
800c978: f000 fdee bl 800d558 <dhcp_supplied_address>
800c97c: 4603 mov r3, r0
800c97e: 2b00 cmp r3, #0
800c980: d03b beq.n 800c9fa <dhcp_release_and_stop+0xf6>
/* create and initialize the DHCP message header */
struct pbuf *p_out;
u16_t options_out_len;
p_out = dhcp_create_msg(netif, dhcp, DHCP_RELEASE, &options_out_len);
800c982: f107 030e add.w r3, r7, #14
800c986: 2207 movs r2, #7
800c988: 69f9 ldr r1, [r7, #28]
800c98a: 6878 ldr r0, [r7, #4]
800c98c: f000 fce0 bl 800d350 <dhcp_create_msg>
800c990: 61b8 str r0, [r7, #24]
if (p_out != NULL) {
800c992: 69bb ldr r3, [r7, #24]
800c994: 2b00 cmp r3, #0
800c996: d030 beq.n 800c9fa <dhcp_release_and_stop+0xf6>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
800c998: 69bb ldr r3, [r7, #24]
800c99a: 685b ldr r3, [r3, #4]
800c99c: 617b str r3, [r7, #20]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
800c99e: 89f8 ldrh r0, [r7, #14]
800c9a0: 697b ldr r3, [r7, #20]
800c9a2: f103 01f0 add.w r1, r3, #240 ; 0xf0
800c9a6: 2304 movs r3, #4
800c9a8: 2236 movs r2, #54 ; 0x36
800c9aa: f000 f85f bl 800ca6c <dhcp_option>
800c9ae: 4603 mov r3, r0
800c9b0: 81fb strh r3, [r7, #14]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr))));
800c9b2: 89fc ldrh r4, [r7, #14]
800c9b4: 697b ldr r3, [r7, #20]
800c9b6: f103 05f0 add.w r5, r3, #240 ; 0xf0
800c9ba: 693b ldr r3, [r7, #16]
800c9bc: 4618 mov r0, r3
800c9be: f7f7 fa0a bl 8003dd6 <lwip_htonl>
800c9c2: 4603 mov r3, r0
800c9c4: 461a mov r2, r3
800c9c6: 4629 mov r1, r5
800c9c8: 4620 mov r0, r4
800c9ca: f000 f8db bl 800cb84 <dhcp_option_long>
800c9ce: 4603 mov r3, r0
800c9d0: 81fb strh r3, [r7, #14]
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, dhcp->state, msg_out, DHCP_RELEASE, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
800c9d2: 89f8 ldrh r0, [r7, #14]
800c9d4: 697b ldr r3, [r7, #20]
800c9d6: 33f0 adds r3, #240 ; 0xf0
800c9d8: 69ba ldr r2, [r7, #24]
800c9da: 4619 mov r1, r3
800c9dc: f000 fd8e bl 800d4fc <dhcp_option_trailer>
udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
800c9e0: 4b13 ldr r3, [pc, #76] ; (800ca30 <dhcp_release_and_stop+0x12c>)
800c9e2: 6818 ldr r0, [r3, #0]
800c9e4: f107 0210 add.w r2, r7, #16
800c9e8: 687b ldr r3, [r7, #4]
800c9ea: 9300 str r3, [sp, #0]
800c9ec: 2343 movs r3, #67 ; 0x43
800c9ee: 69b9 ldr r1, [r7, #24]
800c9f0: f7fe fc4c bl 800b28c <udp_sendto_if>
pbuf_free(p_out);
800c9f4: 69b8 ldr r0, [r7, #24]
800c9f6: f7f8 fd43 bl 8005480 <pbuf_free>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n"));
}
}
/* remove IP address from interface (prevents routing from selecting this interface) */
netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
800c9fa: 4b0e ldr r3, [pc, #56] ; (800ca34 <dhcp_release_and_stop+0x130>)
800c9fc: 4a0d ldr r2, [pc, #52] ; (800ca34 <dhcp_release_and_stop+0x130>)
800c9fe: 490d ldr r1, [pc, #52] ; (800ca34 <dhcp_release_and_stop+0x130>)
800ca00: 6878 ldr r0, [r7, #4]
800ca02: f7f8 f85d bl 8004ac0 <netif_set_addr>
autoip_stop(netif);
dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF;
}
#endif /* LWIP_DHCP_AUTOIP_COOP */
dhcp_set_state(dhcp, DHCP_STATE_OFF);
800ca06: 2100 movs r1, #0
800ca08: 69f8 ldr r0, [r7, #28]
800ca0a: f000 f815 bl 800ca38 <dhcp_set_state>
if (dhcp->pcb_allocated != 0) {
800ca0e: 69fb ldr r3, [r7, #28]
800ca10: 791b ldrb r3, [r3, #4]
800ca12: 2b00 cmp r3, #0
800ca14: d008 beq.n 800ca28 <dhcp_release_and_stop+0x124>
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
800ca16: f7fe ff85 bl 800b924 <dhcp_dec_pcb_refcount>
dhcp->pcb_allocated = 0;
800ca1a: 69fb ldr r3, [r7, #28]
800ca1c: 2200 movs r2, #0
800ca1e: 711a strb r2, [r3, #4]
800ca20: e002 b.n 800ca28 <dhcp_release_and_stop+0x124>
return;
800ca22: bf00 nop
800ca24: e000 b.n 800ca28 <dhcp_release_and_stop+0x124>
return;
800ca26: bf00 nop
}
}
800ca28: 3720 adds r7, #32
800ca2a: 46bd mov sp, r7
800ca2c: bdb0 pop {r4, r5, r7, pc}
800ca2e: bf00 nop
800ca30: 20008c34 .word 0x20008c34
800ca34: 080178c4 .word 0x080178c4
0800ca38 <dhcp_set_state>:
*
* If the state changed, reset the number of tries.
*/
static void
dhcp_set_state(struct dhcp *dhcp, u8_t new_state)
{
800ca38: b480 push {r7}
800ca3a: b083 sub sp, #12
800ca3c: af00 add r7, sp, #0
800ca3e: 6078 str r0, [r7, #4]
800ca40: 460b mov r3, r1
800ca42: 70fb strb r3, [r7, #3]
if (new_state != dhcp->state) {
800ca44: 687b ldr r3, [r7, #4]
800ca46: 795b ldrb r3, [r3, #5]
800ca48: 78fa ldrb r2, [r7, #3]
800ca4a: 429a cmp r2, r3
800ca4c: d008 beq.n 800ca60 <dhcp_set_state+0x28>
dhcp->state = new_state;
800ca4e: 687b ldr r3, [r7, #4]
800ca50: 78fa ldrb r2, [r7, #3]
800ca52: 715a strb r2, [r3, #5]
dhcp->tries = 0;
800ca54: 687b ldr r3, [r7, #4]
800ca56: 2200 movs r2, #0
800ca58: 719a strb r2, [r3, #6]
dhcp->request_timeout = 0;
800ca5a: 687b ldr r3, [r7, #4]
800ca5c: 2200 movs r2, #0
800ca5e: 811a strh r2, [r3, #8]
}
}
800ca60: bf00 nop
800ca62: 370c adds r7, #12
800ca64: 46bd mov sp, r7
800ca66: f85d 7b04 ldr.w r7, [sp], #4
800ca6a: 4770 bx lr
0800ca6c <dhcp_option>:
* DHCP message.
*
*/
static u16_t
dhcp_option(u16_t options_out_len, u8_t *options, u8_t option_type, u8_t option_len)
{
800ca6c: b580 push {r7, lr}
800ca6e: b082 sub sp, #8
800ca70: af00 add r7, sp, #0
800ca72: 6039 str r1, [r7, #0]
800ca74: 4611 mov r1, r2
800ca76: 461a mov r2, r3
800ca78: 4603 mov r3, r0
800ca7a: 80fb strh r3, [r7, #6]
800ca7c: 460b mov r3, r1
800ca7e: 717b strb r3, [r7, #5]
800ca80: 4613 mov r3, r2
800ca82: 713b strb r3, [r7, #4]
LWIP_ASSERT("dhcp_option: options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN);
800ca84: 88fa ldrh r2, [r7, #6]
800ca86: 793b ldrb r3, [r7, #4]
800ca88: 4413 add r3, r2
800ca8a: 3302 adds r3, #2
800ca8c: 2b44 cmp r3, #68 ; 0x44
800ca8e: d906 bls.n 800ca9e <dhcp_option+0x32>
800ca90: 4b0d ldr r3, [pc, #52] ; (800cac8 <dhcp_option+0x5c>)
800ca92: f240 529a movw r2, #1434 ; 0x59a
800ca96: 490d ldr r1, [pc, #52] ; (800cacc <dhcp_option+0x60>)
800ca98: 480d ldr r0, [pc, #52] ; (800cad0 <dhcp_option+0x64>)
800ca9a: f003 fa0d bl 800feb8 <printf>
options[options_out_len++] = option_type;
800ca9e: 88fb ldrh r3, [r7, #6]
800caa0: 1c5a adds r2, r3, #1
800caa2: 80fa strh r2, [r7, #6]
800caa4: 461a mov r2, r3
800caa6: 683b ldr r3, [r7, #0]
800caa8: 4413 add r3, r2
800caaa: 797a ldrb r2, [r7, #5]
800caac: 701a strb r2, [r3, #0]
options[options_out_len++] = option_len;
800caae: 88fb ldrh r3, [r7, #6]
800cab0: 1c5a adds r2, r3, #1
800cab2: 80fa strh r2, [r7, #6]
800cab4: 461a mov r2, r3
800cab6: 683b ldr r3, [r7, #0]
800cab8: 4413 add r3, r2
800caba: 793a ldrb r2, [r7, #4]
800cabc: 701a strb r2, [r3, #0]
return options_out_len;
800cabe: 88fb ldrh r3, [r7, #6]
}
800cac0: 4618 mov r0, r3
800cac2: 3708 adds r7, #8
800cac4: 46bd mov sp, r7
800cac6: bd80 pop {r7, pc}
800cac8: 08016cf4 .word 0x08016cf4
800cacc: 08016e88 .word 0x08016e88
800cad0: 08016d54 .word 0x08016d54
0800cad4 <dhcp_option_byte>:
* Concatenate a single byte to the outgoing DHCP message.
*
*/
static u16_t
dhcp_option_byte(u16_t options_out_len, u8_t *options, u8_t value)
{
800cad4: b580 push {r7, lr}
800cad6: b082 sub sp, #8
800cad8: af00 add r7, sp, #0
800cada: 4603 mov r3, r0
800cadc: 6039 str r1, [r7, #0]
800cade: 80fb strh r3, [r7, #6]
800cae0: 4613 mov r3, r2
800cae2: 717b strb r3, [r7, #5]
LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN);
800cae4: 88fb ldrh r3, [r7, #6]
800cae6: 2b43 cmp r3, #67 ; 0x43
800cae8: d906 bls.n 800caf8 <dhcp_option_byte+0x24>
800caea: 4b0a ldr r3, [pc, #40] ; (800cb14 <dhcp_option_byte+0x40>)
800caec: f240 52a6 movw r2, #1446 ; 0x5a6
800caf0: 4909 ldr r1, [pc, #36] ; (800cb18 <dhcp_option_byte+0x44>)
800caf2: 480a ldr r0, [pc, #40] ; (800cb1c <dhcp_option_byte+0x48>)
800caf4: f003 f9e0 bl 800feb8 <printf>
options[options_out_len++] = value;
800caf8: 88fb ldrh r3, [r7, #6]
800cafa: 1c5a adds r2, r3, #1
800cafc: 80fa strh r2, [r7, #6]
800cafe: 461a mov r2, r3
800cb00: 683b ldr r3, [r7, #0]
800cb02: 4413 add r3, r2
800cb04: 797a ldrb r2, [r7, #5]
800cb06: 701a strb r2, [r3, #0]
return options_out_len;
800cb08: 88fb ldrh r3, [r7, #6]
}
800cb0a: 4618 mov r0, r3
800cb0c: 3708 adds r7, #8
800cb0e: 46bd mov sp, r7
800cb10: bd80 pop {r7, pc}
800cb12: bf00 nop
800cb14: 08016cf4 .word 0x08016cf4
800cb18: 08016ecc .word 0x08016ecc
800cb1c: 08016d54 .word 0x08016d54
0800cb20 <dhcp_option_short>:
static u16_t
dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value)
{
800cb20: b580 push {r7, lr}
800cb22: b082 sub sp, #8
800cb24: af00 add r7, sp, #0
800cb26: 4603 mov r3, r0
800cb28: 6039 str r1, [r7, #0]
800cb2a: 80fb strh r3, [r7, #6]
800cb2c: 4613 mov r3, r2
800cb2e: 80bb strh r3, [r7, #4]
LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN);
800cb30: 88fb ldrh r3, [r7, #6]
800cb32: 3302 adds r3, #2
800cb34: 2b44 cmp r3, #68 ; 0x44
800cb36: d906 bls.n 800cb46 <dhcp_option_short+0x26>
800cb38: 4b0f ldr r3, [pc, #60] ; (800cb78 <dhcp_option_short+0x58>)
800cb3a: f240 52ae movw r2, #1454 ; 0x5ae
800cb3e: 490f ldr r1, [pc, #60] ; (800cb7c <dhcp_option_short+0x5c>)
800cb40: 480f ldr r0, [pc, #60] ; (800cb80 <dhcp_option_short+0x60>)
800cb42: f003 f9b9 bl 800feb8 <printf>
options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8);
800cb46: 88bb ldrh r3, [r7, #4]
800cb48: 0a1b lsrs r3, r3, #8
800cb4a: b29a uxth r2, r3
800cb4c: 88fb ldrh r3, [r7, #6]
800cb4e: 1c59 adds r1, r3, #1
800cb50: 80f9 strh r1, [r7, #6]
800cb52: 4619 mov r1, r3
800cb54: 683b ldr r3, [r7, #0]
800cb56: 440b add r3, r1
800cb58: b2d2 uxtb r2, r2
800cb5a: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t) (value & 0x00ffU);
800cb5c: 88fb ldrh r3, [r7, #6]
800cb5e: 1c5a adds r2, r3, #1
800cb60: 80fa strh r2, [r7, #6]
800cb62: 461a mov r2, r3
800cb64: 683b ldr r3, [r7, #0]
800cb66: 4413 add r3, r2
800cb68: 88ba ldrh r2, [r7, #4]
800cb6a: b2d2 uxtb r2, r2
800cb6c: 701a strb r2, [r3, #0]
return options_out_len;
800cb6e: 88fb ldrh r3, [r7, #6]
}
800cb70: 4618 mov r0, r3
800cb72: 3708 adds r7, #8
800cb74: 46bd mov sp, r7
800cb76: bd80 pop {r7, pc}
800cb78: 08016cf4 .word 0x08016cf4
800cb7c: 08016f04 .word 0x08016f04
800cb80: 08016d54 .word 0x08016d54
0800cb84 <dhcp_option_long>:
static u16_t
dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value)
{
800cb84: b580 push {r7, lr}
800cb86: b084 sub sp, #16
800cb88: af00 add r7, sp, #0
800cb8a: 4603 mov r3, r0
800cb8c: 60b9 str r1, [r7, #8]
800cb8e: 607a str r2, [r7, #4]
800cb90: 81fb strh r3, [r7, #14]
LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN);
800cb92: 89fb ldrh r3, [r7, #14]
800cb94: 3304 adds r3, #4
800cb96: 2b44 cmp r3, #68 ; 0x44
800cb98: d906 bls.n 800cba8 <dhcp_option_long+0x24>
800cb9a: 4b19 ldr r3, [pc, #100] ; (800cc00 <dhcp_option_long+0x7c>)
800cb9c: f240 52b7 movw r2, #1463 ; 0x5b7
800cba0: 4918 ldr r1, [pc, #96] ; (800cc04 <dhcp_option_long+0x80>)
800cba2: 4819 ldr r0, [pc, #100] ; (800cc08 <dhcp_option_long+0x84>)
800cba4: f003 f988 bl 800feb8 <printf>
options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24);
800cba8: 687b ldr r3, [r7, #4]
800cbaa: 0e1a lsrs r2, r3, #24
800cbac: 89fb ldrh r3, [r7, #14]
800cbae: 1c59 adds r1, r3, #1
800cbb0: 81f9 strh r1, [r7, #14]
800cbb2: 4619 mov r1, r3
800cbb4: 68bb ldr r3, [r7, #8]
800cbb6: 440b add r3, r1
800cbb8: b2d2 uxtb r2, r2
800cbba: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16);
800cbbc: 687b ldr r3, [r7, #4]
800cbbe: 0c1a lsrs r2, r3, #16
800cbc0: 89fb ldrh r3, [r7, #14]
800cbc2: 1c59 adds r1, r3, #1
800cbc4: 81f9 strh r1, [r7, #14]
800cbc6: 4619 mov r1, r3
800cbc8: 68bb ldr r3, [r7, #8]
800cbca: 440b add r3, r1
800cbcc: b2d2 uxtb r2, r2
800cbce: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8);
800cbd0: 687b ldr r3, [r7, #4]
800cbd2: 0a1a lsrs r2, r3, #8
800cbd4: 89fb ldrh r3, [r7, #14]
800cbd6: 1c59 adds r1, r3, #1
800cbd8: 81f9 strh r1, [r7, #14]
800cbda: 4619 mov r1, r3
800cbdc: 68bb ldr r3, [r7, #8]
800cbde: 440b add r3, r1
800cbe0: b2d2 uxtb r2, r2
800cbe2: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x000000ffUL));
800cbe4: 89fb ldrh r3, [r7, #14]
800cbe6: 1c5a adds r2, r3, #1
800cbe8: 81fa strh r2, [r7, #14]
800cbea: 461a mov r2, r3
800cbec: 68bb ldr r3, [r7, #8]
800cbee: 4413 add r3, r2
800cbf0: 687a ldr r2, [r7, #4]
800cbf2: b2d2 uxtb r2, r2
800cbf4: 701a strb r2, [r3, #0]
return options_out_len;
800cbf6: 89fb ldrh r3, [r7, #14]
}
800cbf8: 4618 mov r0, r3
800cbfa: 3710 adds r7, #16
800cbfc: 46bd mov sp, r7
800cbfe: bd80 pop {r7, pc}
800cc00: 08016cf4 .word 0x08016cf4
800cc04: 08016f40 .word 0x08016f40
800cc08: 08016d54 .word 0x08016d54
0800cc0c <dhcp_parse_reply>:
* use that further on.
*
*/
static err_t
dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp)
{
800cc0c: b580 push {r7, lr}
800cc0e: b090 sub sp, #64 ; 0x40
800cc10: af00 add r7, sp, #0
800cc12: 6078 str r0, [r7, #4]
800cc14: 6039 str r1, [r7, #0]
u16_t offset;
u16_t offset_max;
u16_t options_idx;
u16_t options_idx_max;
struct pbuf *q;
int parse_file_as_options = 0;
800cc16: 2300 movs r3, #0
800cc18: 62fb str r3, [r7, #44] ; 0x2c
int parse_sname_as_options = 0;
800cc1a: 2300 movs r3, #0
800cc1c: 62bb str r3, [r7, #40] ; 0x28
#endif
LWIP_UNUSED_ARG(dhcp);
/* clear received options */
dhcp_clear_all_options(dhcp);
800cc1e: 2208 movs r2, #8
800cc20: 2100 movs r1, #0
800cc22: 48b5 ldr r0, [pc, #724] ; (800cef8 <dhcp_parse_reply+0x2ec>)
800cc24: f003 f940 bl 800fea8 <memset>
/* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */
if (p->len < DHCP_SNAME_OFS) {
800cc28: 687b ldr r3, [r7, #4]
800cc2a: 895b ldrh r3, [r3, #10]
800cc2c: 2b2b cmp r3, #43 ; 0x2b
800cc2e: d802 bhi.n 800cc36 <dhcp_parse_reply+0x2a>
return ERR_BUF;
800cc30: f06f 0301 mvn.w r3, #1
800cc34: e2a7 b.n 800d186 <dhcp_parse_reply+0x57a>
}
msg_in = (struct dhcp_msg *)p->payload;
800cc36: 687b ldr r3, [r7, #4]
800cc38: 685b ldr r3, [r3, #4]
800cc3a: 61bb str r3, [r7, #24]
#endif /* LWIP_DHCP_BOOTP_FILE */
/* parse options */
/* start with options field */
options_idx = DHCP_OPTIONS_OFS;
800cc3c: 23f0 movs r3, #240 ; 0xf0
800cc3e: 86fb strh r3, [r7, #54] ; 0x36
/* parse options to the end of the received packet */
options_idx_max = p->tot_len;
800cc40: 687b ldr r3, [r7, #4]
800cc42: 891b ldrh r3, [r3, #8]
800cc44: 86bb strh r3, [r7, #52] ; 0x34
again:
q = p;
800cc46: 687b ldr r3, [r7, #4]
800cc48: 633b str r3, [r7, #48] ; 0x30
while ((q != NULL) && (options_idx >= q->len)) {
800cc4a: e00c b.n 800cc66 <dhcp_parse_reply+0x5a>
options_idx = (u16_t)(options_idx - q->len);
800cc4c: 6b3b ldr r3, [r7, #48] ; 0x30
800cc4e: 895b ldrh r3, [r3, #10]
800cc50: 8efa ldrh r2, [r7, #54] ; 0x36
800cc52: 1ad3 subs r3, r2, r3
800cc54: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = (u16_t)(options_idx_max - q->len);
800cc56: 6b3b ldr r3, [r7, #48] ; 0x30
800cc58: 895b ldrh r3, [r3, #10]
800cc5a: 8eba ldrh r2, [r7, #52] ; 0x34
800cc5c: 1ad3 subs r3, r2, r3
800cc5e: 86bb strh r3, [r7, #52] ; 0x34
q = q->next;
800cc60: 6b3b ldr r3, [r7, #48] ; 0x30
800cc62: 681b ldr r3, [r3, #0]
800cc64: 633b str r3, [r7, #48] ; 0x30
while ((q != NULL) && (options_idx >= q->len)) {
800cc66: 6b3b ldr r3, [r7, #48] ; 0x30
800cc68: 2b00 cmp r3, #0
800cc6a: d004 beq.n 800cc76 <dhcp_parse_reply+0x6a>
800cc6c: 6b3b ldr r3, [r7, #48] ; 0x30
800cc6e: 895b ldrh r3, [r3, #10]
800cc70: 8efa ldrh r2, [r7, #54] ; 0x36
800cc72: 429a cmp r2, r3
800cc74: d2ea bcs.n 800cc4c <dhcp_parse_reply+0x40>
}
if (q == NULL) {
800cc76: 6b3b ldr r3, [r7, #48] ; 0x30
800cc78: 2b00 cmp r3, #0
800cc7a: d102 bne.n 800cc82 <dhcp_parse_reply+0x76>
return ERR_BUF;
800cc7c: f06f 0301 mvn.w r3, #1
800cc80: e281 b.n 800d186 <dhcp_parse_reply+0x57a>
}
offset = options_idx;
800cc82: 8efb ldrh r3, [r7, #54] ; 0x36
800cc84: 877b strh r3, [r7, #58] ; 0x3a
offset_max = options_idx_max;
800cc86: 8ebb ldrh r3, [r7, #52] ; 0x34
800cc88: 873b strh r3, [r7, #56] ; 0x38
options = (u8_t *)q->payload;
800cc8a: 6b3b ldr r3, [r7, #48] ; 0x30
800cc8c: 685b ldr r3, [r3, #4]
800cc8e: 63fb str r3, [r7, #60] ; 0x3c
/* at least 1 byte to read and no end marker, then at least 3 bytes to read? */
while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
800cc90: e239 b.n 800d106 <dhcp_parse_reply+0x4fa>
u8_t op = options[offset];
800cc92: 8f7b ldrh r3, [r7, #58] ; 0x3a
800cc94: 6bfa ldr r2, [r7, #60] ; 0x3c
800cc96: 4413 add r3, r2
800cc98: 781b ldrb r3, [r3, #0]
800cc9a: 75fb strb r3, [r7, #23]
u8_t len;
u8_t decode_len = 0;
800cc9c: 2300 movs r3, #0
800cc9e: f887 3026 strb.w r3, [r7, #38] ; 0x26
int decode_idx = -1;
800cca2: f04f 33ff mov.w r3, #4294967295
800cca6: 623b str r3, [r7, #32]
u16_t val_offset = (u16_t)(offset + 2);
800cca8: 8f7b ldrh r3, [r7, #58] ; 0x3a
800ccaa: 3302 adds r3, #2
800ccac: 83fb strh r3, [r7, #30]
if (val_offset < offset) {
800ccae: 8bfa ldrh r2, [r7, #30]
800ccb0: 8f7b ldrh r3, [r7, #58] ; 0x3a
800ccb2: 429a cmp r2, r3
800ccb4: d202 bcs.n 800ccbc <dhcp_parse_reply+0xb0>
/* overflow */
return ERR_BUF;
800ccb6: f06f 0301 mvn.w r3, #1
800ccba: e264 b.n 800d186 <dhcp_parse_reply+0x57a>
}
/* len byte might be in the next pbuf */
if ((offset + 1) < q->len) {
800ccbc: 8f7b ldrh r3, [r7, #58] ; 0x3a
800ccbe: 3301 adds r3, #1
800ccc0: 6b3a ldr r2, [r7, #48] ; 0x30
800ccc2: 8952 ldrh r2, [r2, #10]
800ccc4: 4293 cmp r3, r2
800ccc6: da07 bge.n 800ccd8 <dhcp_parse_reply+0xcc>
len = options[offset + 1];
800ccc8: 8f7b ldrh r3, [r7, #58] ; 0x3a
800ccca: 3301 adds r3, #1
800cccc: 6bfa ldr r2, [r7, #60] ; 0x3c
800ccce: 4413 add r3, r2
800ccd0: 781b ldrb r3, [r3, #0]
800ccd2: f887 3027 strb.w r3, [r7, #39] ; 0x27
800ccd6: e00b b.n 800ccf0 <dhcp_parse_reply+0xe4>
} else {
len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0);
800ccd8: 6b3b ldr r3, [r7, #48] ; 0x30
800ccda: 681b ldr r3, [r3, #0]
800ccdc: 2b00 cmp r3, #0
800ccde: d004 beq.n 800ccea <dhcp_parse_reply+0xde>
800cce0: 6b3b ldr r3, [r7, #48] ; 0x30
800cce2: 681b ldr r3, [r3, #0]
800cce4: 685b ldr r3, [r3, #4]
800cce6: 781b ldrb r3, [r3, #0]
800cce8: e000 b.n 800ccec <dhcp_parse_reply+0xe0>
800ccea: 2300 movs r3, #0
800ccec: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
/* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */
decode_len = len;
800ccf0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800ccf4: f887 3026 strb.w r3, [r7, #38] ; 0x26
switch (op) {
800ccf8: 7dfb ldrb r3, [r7, #23]
800ccfa: 2b3b cmp r3, #59 ; 0x3b
800ccfc: f200 812c bhi.w 800cf58 <dhcp_parse_reply+0x34c>
800cd00: a201 add r2, pc, #4 ; (adr r2, 800cd08 <dhcp_parse_reply+0xfc>)
800cd02: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800cd06: bf00 nop
800cd08: 0800cdf9 .word 0x0800cdf9
800cd0c: 0800ce09 .word 0x0800ce09
800cd10: 0800cf59 .word 0x0800cf59
800cd14: 0800ce2b .word 0x0800ce2b
800cd18: 0800cf59 .word 0x0800cf59
800cd1c: 0800cf59 .word 0x0800cf59
800cd20: 0800cf59 .word 0x0800cf59
800cd24: 0800cf59 .word 0x0800cf59
800cd28: 0800cf59 .word 0x0800cf59
800cd2c: 0800cf59 .word 0x0800cf59
800cd30: 0800cf59 .word 0x0800cf59
800cd34: 0800cf59 .word 0x0800cf59
800cd38: 0800cf59 .word 0x0800cf59
800cd3c: 0800cf59 .word 0x0800cf59
800cd40: 0800cf59 .word 0x0800cf59
800cd44: 0800cf59 .word 0x0800cf59
800cd48: 0800cf59 .word 0x0800cf59
800cd4c: 0800cf59 .word 0x0800cf59
800cd50: 0800cf59 .word 0x0800cf59
800cd54: 0800cf59 .word 0x0800cf59
800cd58: 0800cf59 .word 0x0800cf59
800cd5c: 0800cf59 .word 0x0800cf59
800cd60: 0800cf59 .word 0x0800cf59
800cd64: 0800cf59 .word 0x0800cf59
800cd68: 0800cf59 .word 0x0800cf59
800cd6c: 0800cf59 .word 0x0800cf59
800cd70: 0800cf59 .word 0x0800cf59
800cd74: 0800cf59 .word 0x0800cf59
800cd78: 0800cf59 .word 0x0800cf59
800cd7c: 0800cf59 .word 0x0800cf59
800cd80: 0800cf59 .word 0x0800cf59
800cd84: 0800cf59 .word 0x0800cf59
800cd88: 0800cf59 .word 0x0800cf59
800cd8c: 0800cf59 .word 0x0800cf59
800cd90: 0800cf59 .word 0x0800cf59
800cd94: 0800cf59 .word 0x0800cf59
800cd98: 0800cf59 .word 0x0800cf59
800cd9c: 0800cf59 .word 0x0800cf59
800cda0: 0800cf59 .word 0x0800cf59
800cda4: 0800cf59 .word 0x0800cf59
800cda8: 0800cf59 .word 0x0800cf59
800cdac: 0800cf59 .word 0x0800cf59
800cdb0: 0800cf59 .word 0x0800cf59
800cdb4: 0800cf59 .word 0x0800cf59
800cdb8: 0800cf59 .word 0x0800cf59
800cdbc: 0800cf59 .word 0x0800cf59
800cdc0: 0800cf59 .word 0x0800cf59
800cdc4: 0800cf59 .word 0x0800cf59
800cdc8: 0800cf59 .word 0x0800cf59
800cdcc: 0800cf59 .word 0x0800cf59
800cdd0: 0800cf59 .word 0x0800cf59
800cdd4: 0800ce57 .word 0x0800ce57
800cdd8: 0800ce79 .word 0x0800ce79
800cddc: 0800ceb5 .word 0x0800ceb5
800cde0: 0800ced7 .word 0x0800ced7
800cde4: 0800cf59 .word 0x0800cf59
800cde8: 0800cf59 .word 0x0800cf59
800cdec: 0800cf59 .word 0x0800cf59
800cdf0: 0800cf15 .word 0x0800cf15
800cdf4: 0800cf37 .word 0x0800cf37
/* case(DHCP_OPTION_END): handled above */
case (DHCP_OPTION_PAD):
/* special option: no len encoded */
decode_len = len = 0;
800cdf8: 2300 movs r3, #0
800cdfa: f887 3027 strb.w r3, [r7, #39] ; 0x27
800cdfe: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800ce02: f887 3026 strb.w r3, [r7, #38] ; 0x26
/* will be increased below */
break;
800ce06: e0ab b.n 800cf60 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_SUBNET_MASK):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
800ce08: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800ce0c: 2b04 cmp r3, #4
800ce0e: d009 beq.n 800ce24 <dhcp_parse_reply+0x218>
800ce10: 4b3a ldr r3, [pc, #232] ; (800cefc <dhcp_parse_reply+0x2f0>)
800ce12: f240 622e movw r2, #1582 ; 0x62e
800ce16: 493a ldr r1, [pc, #232] ; (800cf00 <dhcp_parse_reply+0x2f4>)
800ce18: 483a ldr r0, [pc, #232] ; (800cf04 <dhcp_parse_reply+0x2f8>)
800ce1a: f003 f84d bl 800feb8 <printf>
800ce1e: f06f 0305 mvn.w r3, #5
800ce22: e1b0 b.n 800d186 <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_SUBNET_MASK;
800ce24: 2306 movs r3, #6
800ce26: 623b str r3, [r7, #32]
break;
800ce28: e09a b.n 800cf60 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_ROUTER):
decode_len = 4; /* only copy the first given router */
800ce2a: 2304 movs r3, #4
800ce2c: f887 3026 strb.w r3, [r7, #38] ; 0x26
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
800ce30: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
800ce34: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800ce38: 429a cmp r2, r3
800ce3a: d209 bcs.n 800ce50 <dhcp_parse_reply+0x244>
800ce3c: 4b2f ldr r3, [pc, #188] ; (800cefc <dhcp_parse_reply+0x2f0>)
800ce3e: f240 6233 movw r2, #1587 ; 0x633
800ce42: 4931 ldr r1, [pc, #196] ; (800cf08 <dhcp_parse_reply+0x2fc>)
800ce44: 482f ldr r0, [pc, #188] ; (800cf04 <dhcp_parse_reply+0x2f8>)
800ce46: f003 f837 bl 800feb8 <printf>
800ce4a: f06f 0305 mvn.w r3, #5
800ce4e: e19a b.n 800d186 <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_ROUTER;
800ce50: 2307 movs r3, #7
800ce52: 623b str r3, [r7, #32]
break;
800ce54: e084 b.n 800cf60 <dhcp_parse_reply+0x354>
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
decode_idx = DHCP_OPTION_IDX_DNS_SERVER;
break;
#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */
case (DHCP_OPTION_LEASE_TIME):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
800ce56: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800ce5a: 2b04 cmp r3, #4
800ce5c: d009 beq.n 800ce72 <dhcp_parse_reply+0x266>
800ce5e: 4b27 ldr r3, [pc, #156] ; (800cefc <dhcp_parse_reply+0x2f0>)
800ce60: f240 6241 movw r2, #1601 ; 0x641
800ce64: 4926 ldr r1, [pc, #152] ; (800cf00 <dhcp_parse_reply+0x2f4>)
800ce66: 4827 ldr r0, [pc, #156] ; (800cf04 <dhcp_parse_reply+0x2f8>)
800ce68: f003 f826 bl 800feb8 <printf>
800ce6c: f06f 0305 mvn.w r3, #5
800ce70: e189 b.n 800d186 <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_LEASE_TIME;
800ce72: 2303 movs r3, #3
800ce74: 623b str r3, [r7, #32]
break;
800ce76: e073 b.n 800cf60 <dhcp_parse_reply+0x354>
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
decode_idx = DHCP_OPTION_IDX_NTP_SERVER;
break;
#endif /* LWIP_DHCP_GET_NTP_SRV*/
case (DHCP_OPTION_OVERLOAD):
LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
800ce78: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800ce7c: 2b01 cmp r3, #1
800ce7e: d009 beq.n 800ce94 <dhcp_parse_reply+0x288>
800ce80: 4b1e ldr r3, [pc, #120] ; (800cefc <dhcp_parse_reply+0x2f0>)
800ce82: f240 624f movw r2, #1615 ; 0x64f
800ce86: 4921 ldr r1, [pc, #132] ; (800cf0c <dhcp_parse_reply+0x300>)
800ce88: 481e ldr r0, [pc, #120] ; (800cf04 <dhcp_parse_reply+0x2f8>)
800ce8a: f003 f815 bl 800feb8 <printf>
800ce8e: f06f 0305 mvn.w r3, #5
800ce92: e178 b.n 800d186 <dhcp_parse_reply+0x57a>
/* decode overload only in options, not in file/sname: invalid packet */
LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;);
800ce94: 8efb ldrh r3, [r7, #54] ; 0x36
800ce96: 2bf0 cmp r3, #240 ; 0xf0
800ce98: d009 beq.n 800ceae <dhcp_parse_reply+0x2a2>
800ce9a: 4b18 ldr r3, [pc, #96] ; (800cefc <dhcp_parse_reply+0x2f0>)
800ce9c: f240 6251 movw r2, #1617 ; 0x651
800cea0: 491b ldr r1, [pc, #108] ; (800cf10 <dhcp_parse_reply+0x304>)
800cea2: 4818 ldr r0, [pc, #96] ; (800cf04 <dhcp_parse_reply+0x2f8>)
800cea4: f003 f808 bl 800feb8 <printf>
800cea8: f06f 0305 mvn.w r3, #5
800ceac: e16b b.n 800d186 <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_OVERLOAD;
800ceae: 2300 movs r3, #0
800ceb0: 623b str r3, [r7, #32]
break;
800ceb2: e055 b.n 800cf60 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_MESSAGE_TYPE):
LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
800ceb4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800ceb8: 2b01 cmp r3, #1
800ceba: d009 beq.n 800ced0 <dhcp_parse_reply+0x2c4>
800cebc: 4b0f ldr r3, [pc, #60] ; (800cefc <dhcp_parse_reply+0x2f0>)
800cebe: f240 6255 movw r2, #1621 ; 0x655
800cec2: 4912 ldr r1, [pc, #72] ; (800cf0c <dhcp_parse_reply+0x300>)
800cec4: 480f ldr r0, [pc, #60] ; (800cf04 <dhcp_parse_reply+0x2f8>)
800cec6: f002 fff7 bl 800feb8 <printf>
800ceca: f06f 0305 mvn.w r3, #5
800cece: e15a b.n 800d186 <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_MSG_TYPE;
800ced0: 2301 movs r3, #1
800ced2: 623b str r3, [r7, #32]
break;
800ced4: e044 b.n 800cf60 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_SERVER_ID):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
800ced6: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800ceda: 2b04 cmp r3, #4
800cedc: d009 beq.n 800cef2 <dhcp_parse_reply+0x2e6>
800cede: 4b07 ldr r3, [pc, #28] ; (800cefc <dhcp_parse_reply+0x2f0>)
800cee0: f240 6259 movw r2, #1625 ; 0x659
800cee4: 4906 ldr r1, [pc, #24] ; (800cf00 <dhcp_parse_reply+0x2f4>)
800cee6: 4807 ldr r0, [pc, #28] ; (800cf04 <dhcp_parse_reply+0x2f8>)
800cee8: f002 ffe6 bl 800feb8 <printf>
800ceec: f06f 0305 mvn.w r3, #5
800cef0: e149 b.n 800d186 <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_SERVER_ID;
800cef2: 2302 movs r3, #2
800cef4: 623b str r3, [r7, #32]
break;
800cef6: e033 b.n 800cf60 <dhcp_parse_reply+0x354>
800cef8: 20008c2c .word 0x20008c2c
800cefc: 08016cf4 .word 0x08016cf4
800cf00: 08016f7c .word 0x08016f7c
800cf04: 08016d54 .word 0x08016d54
800cf08: 08016f88 .word 0x08016f88
800cf0c: 08016f9c .word 0x08016f9c
800cf10: 08016fa8 .word 0x08016fa8
case (DHCP_OPTION_T1):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
800cf14: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800cf18: 2b04 cmp r3, #4
800cf1a: d009 beq.n 800cf30 <dhcp_parse_reply+0x324>
800cf1c: 4b9c ldr r3, [pc, #624] ; (800d190 <dhcp_parse_reply+0x584>)
800cf1e: f240 625d movw r2, #1629 ; 0x65d
800cf22: 499c ldr r1, [pc, #624] ; (800d194 <dhcp_parse_reply+0x588>)
800cf24: 489c ldr r0, [pc, #624] ; (800d198 <dhcp_parse_reply+0x58c>)
800cf26: f002 ffc7 bl 800feb8 <printf>
800cf2a: f06f 0305 mvn.w r3, #5
800cf2e: e12a b.n 800d186 <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_T1;
800cf30: 2304 movs r3, #4
800cf32: 623b str r3, [r7, #32]
break;
800cf34: e014 b.n 800cf60 <dhcp_parse_reply+0x354>
case (DHCP_OPTION_T2):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
800cf36: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800cf3a: 2b04 cmp r3, #4
800cf3c: d009 beq.n 800cf52 <dhcp_parse_reply+0x346>
800cf3e: 4b94 ldr r3, [pc, #592] ; (800d190 <dhcp_parse_reply+0x584>)
800cf40: f240 6261 movw r2, #1633 ; 0x661
800cf44: 4993 ldr r1, [pc, #588] ; (800d194 <dhcp_parse_reply+0x588>)
800cf46: 4894 ldr r0, [pc, #592] ; (800d198 <dhcp_parse_reply+0x58c>)
800cf48: f002 ffb6 bl 800feb8 <printf>
800cf4c: f06f 0305 mvn.w r3, #5
800cf50: e119 b.n 800d186 <dhcp_parse_reply+0x57a>
decode_idx = DHCP_OPTION_IDX_T2;
800cf52: 2305 movs r3, #5
800cf54: 623b str r3, [r7, #32]
break;
800cf56: e003 b.n 800cf60 <dhcp_parse_reply+0x354>
default:
decode_len = 0;
800cf58: 2300 movs r3, #0
800cf5a: f887 3026 strb.w r3, [r7, #38] ; 0x26
LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", (u16_t)op));
LWIP_HOOK_DHCP_PARSE_OPTION(ip_current_netif(), dhcp, dhcp->state, msg_in,
dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE) ? (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE) : 0,
op, len, q, val_offset);
break;
800cf5e: bf00 nop
}
if (op == DHCP_OPTION_PAD) {
800cf60: 7dfb ldrb r3, [r7, #23]
800cf62: 2b00 cmp r3, #0
800cf64: d103 bne.n 800cf6e <dhcp_parse_reply+0x362>
offset++;
800cf66: 8f7b ldrh r3, [r7, #58] ; 0x3a
800cf68: 3301 adds r3, #1
800cf6a: 877b strh r3, [r7, #58] ; 0x3a
800cf6c: e0a1 b.n 800d0b2 <dhcp_parse_reply+0x4a6>
} else {
if (offset + len + 2 > 0xFFFF) {
800cf6e: 8f7a ldrh r2, [r7, #58] ; 0x3a
800cf70: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800cf74: 4413 add r3, r2
800cf76: f64f 72fd movw r2, #65533 ; 0xfffd
800cf7a: 4293 cmp r3, r2
800cf7c: dd02 ble.n 800cf84 <dhcp_parse_reply+0x378>
/* overflow */
return ERR_BUF;
800cf7e: f06f 0301 mvn.w r3, #1
800cf82: e100 b.n 800d186 <dhcp_parse_reply+0x57a>
}
offset = (u16_t)(offset + len + 2);
800cf84: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800cf88: b29a uxth r2, r3
800cf8a: 8f7b ldrh r3, [r7, #58] ; 0x3a
800cf8c: 4413 add r3, r2
800cf8e: b29b uxth r3, r3
800cf90: 3302 adds r3, #2
800cf92: 877b strh r3, [r7, #58] ; 0x3a
if (decode_len > 0) {
800cf94: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800cf98: 2b00 cmp r3, #0
800cf9a: f000 808a beq.w 800d0b2 <dhcp_parse_reply+0x4a6>
u32_t value = 0;
800cf9e: 2300 movs r3, #0
800cfa0: 60bb str r3, [r7, #8]
u16_t copy_len;
decode_next:
LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX);
800cfa2: 6a3b ldr r3, [r7, #32]
800cfa4: 2b00 cmp r3, #0
800cfa6: db02 blt.n 800cfae <dhcp_parse_reply+0x3a2>
800cfa8: 6a3b ldr r3, [r7, #32]
800cfaa: 2b07 cmp r3, #7
800cfac: dd06 ble.n 800cfbc <dhcp_parse_reply+0x3b0>
800cfae: 4b78 ldr r3, [pc, #480] ; (800d190 <dhcp_parse_reply+0x584>)
800cfb0: f44f 62cf mov.w r2, #1656 ; 0x678
800cfb4: 4979 ldr r1, [pc, #484] ; (800d19c <dhcp_parse_reply+0x590>)
800cfb6: 4878 ldr r0, [pc, #480] ; (800d198 <dhcp_parse_reply+0x58c>)
800cfb8: f002 ff7e bl 800feb8 <printf>
if (!dhcp_option_given(dhcp, decode_idx)) {
800cfbc: 4a78 ldr r2, [pc, #480] ; (800d1a0 <dhcp_parse_reply+0x594>)
800cfbe: 6a3b ldr r3, [r7, #32]
800cfc0: 4413 add r3, r2
800cfc2: 781b ldrb r3, [r3, #0]
800cfc4: 2b00 cmp r3, #0
800cfc6: d174 bne.n 800d0b2 <dhcp_parse_reply+0x4a6>
copy_len = LWIP_MIN(decode_len, 4);
800cfc8: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800cfcc: 2b04 cmp r3, #4
800cfce: bf28 it cs
800cfd0: 2304 movcs r3, #4
800cfd2: b2db uxtb r3, r3
800cfd4: 82bb strh r3, [r7, #20]
if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) {
800cfd6: 8bfb ldrh r3, [r7, #30]
800cfd8: 8aba ldrh r2, [r7, #20]
800cfda: f107 0108 add.w r1, r7, #8
800cfde: 6b38 ldr r0, [r7, #48] ; 0x30
800cfe0: f7f8 fc48 bl 8005874 <pbuf_copy_partial>
800cfe4: 4603 mov r3, r0
800cfe6: 461a mov r2, r3
800cfe8: 8abb ldrh r3, [r7, #20]
800cfea: 4293 cmp r3, r2
800cfec: d002 beq.n 800cff4 <dhcp_parse_reply+0x3e8>
return ERR_BUF;
800cfee: f06f 0301 mvn.w r3, #1
800cff2: e0c8 b.n 800d186 <dhcp_parse_reply+0x57a>
}
if (decode_len > 4) {
800cff4: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800cff8: 2b04 cmp r3, #4
800cffa: d933 bls.n 800d064 <dhcp_parse_reply+0x458>
/* decode more than one u32_t */
u16_t next_val_offset;
LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;);
800cffc: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d000: f003 0303 and.w r3, r3, #3
800d004: b2db uxtb r3, r3
800d006: 2b00 cmp r3, #0
800d008: d009 beq.n 800d01e <dhcp_parse_reply+0x412>
800d00a: 4b61 ldr r3, [pc, #388] ; (800d190 <dhcp_parse_reply+0x584>)
800d00c: f240 6281 movw r2, #1665 ; 0x681
800d010: 4964 ldr r1, [pc, #400] ; (800d1a4 <dhcp_parse_reply+0x598>)
800d012: 4861 ldr r0, [pc, #388] ; (800d198 <dhcp_parse_reply+0x58c>)
800d014: f002 ff50 bl 800feb8 <printf>
800d018: f06f 0305 mvn.w r3, #5
800d01c: e0b3 b.n 800d186 <dhcp_parse_reply+0x57a>
dhcp_got_option(dhcp, decode_idx);
800d01e: 4a60 ldr r2, [pc, #384] ; (800d1a0 <dhcp_parse_reply+0x594>)
800d020: 6a3b ldr r3, [r7, #32]
800d022: 4413 add r3, r2
800d024: 2201 movs r2, #1
800d026: 701a strb r2, [r3, #0]
dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value));
800d028: 68bb ldr r3, [r7, #8]
800d02a: 4618 mov r0, r3
800d02c: f7f6 fed3 bl 8003dd6 <lwip_htonl>
800d030: 4602 mov r2, r0
800d032: 495d ldr r1, [pc, #372] ; (800d1a8 <dhcp_parse_reply+0x59c>)
800d034: 6a3b ldr r3, [r7, #32]
800d036: f841 2023 str.w r2, [r1, r3, lsl #2]
decode_len = (u8_t)(decode_len - 4);
800d03a: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d03e: 3b04 subs r3, #4
800d040: f887 3026 strb.w r3, [r7, #38] ; 0x26
next_val_offset = (u16_t)(val_offset + 4);
800d044: 8bfb ldrh r3, [r7, #30]
800d046: 3304 adds r3, #4
800d048: 827b strh r3, [r7, #18]
if (next_val_offset < val_offset) {
800d04a: 8a7a ldrh r2, [r7, #18]
800d04c: 8bfb ldrh r3, [r7, #30]
800d04e: 429a cmp r2, r3
800d050: d202 bcs.n 800d058 <dhcp_parse_reply+0x44c>
/* overflow */
return ERR_BUF;
800d052: f06f 0301 mvn.w r3, #1
800d056: e096 b.n 800d186 <dhcp_parse_reply+0x57a>
}
val_offset = next_val_offset;
800d058: 8a7b ldrh r3, [r7, #18]
800d05a: 83fb strh r3, [r7, #30]
decode_idx++;
800d05c: 6a3b ldr r3, [r7, #32]
800d05e: 3301 adds r3, #1
800d060: 623b str r3, [r7, #32]
goto decode_next;
800d062: e79e b.n 800cfa2 <dhcp_parse_reply+0x396>
} else if (decode_len == 4) {
800d064: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d068: 2b04 cmp r3, #4
800d06a: d106 bne.n 800d07a <dhcp_parse_reply+0x46e>
value = lwip_ntohl(value);
800d06c: 68bb ldr r3, [r7, #8]
800d06e: 4618 mov r0, r3
800d070: f7f6 feb1 bl 8003dd6 <lwip_htonl>
800d074: 4603 mov r3, r0
800d076: 60bb str r3, [r7, #8]
800d078: e011 b.n 800d09e <dhcp_parse_reply+0x492>
} else {
LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;);
800d07a: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
800d07e: 2b01 cmp r3, #1
800d080: d009 beq.n 800d096 <dhcp_parse_reply+0x48a>
800d082: 4b43 ldr r3, [pc, #268] ; (800d190 <dhcp_parse_reply+0x584>)
800d084: f44f 62d2 mov.w r2, #1680 ; 0x690
800d088: 4948 ldr r1, [pc, #288] ; (800d1ac <dhcp_parse_reply+0x5a0>)
800d08a: 4843 ldr r0, [pc, #268] ; (800d198 <dhcp_parse_reply+0x58c>)
800d08c: f002 ff14 bl 800feb8 <printf>
800d090: f06f 0305 mvn.w r3, #5
800d094: e077 b.n 800d186 <dhcp_parse_reply+0x57a>
value = ((u8_t *)&value)[0];
800d096: f107 0308 add.w r3, r7, #8
800d09a: 781b ldrb r3, [r3, #0]
800d09c: 60bb str r3, [r7, #8]
}
dhcp_got_option(dhcp, decode_idx);
800d09e: 4a40 ldr r2, [pc, #256] ; (800d1a0 <dhcp_parse_reply+0x594>)
800d0a0: 6a3b ldr r3, [r7, #32]
800d0a2: 4413 add r3, r2
800d0a4: 2201 movs r2, #1
800d0a6: 701a strb r2, [r3, #0]
dhcp_set_option_value(dhcp, decode_idx, value);
800d0a8: 68ba ldr r2, [r7, #8]
800d0aa: 493f ldr r1, [pc, #252] ; (800d1a8 <dhcp_parse_reply+0x59c>)
800d0ac: 6a3b ldr r3, [r7, #32]
800d0ae: f841 2023 str.w r2, [r1, r3, lsl #2]
}
}
}
if (offset >= q->len) {
800d0b2: 6b3b ldr r3, [r7, #48] ; 0x30
800d0b4: 895b ldrh r3, [r3, #10]
800d0b6: 8f7a ldrh r2, [r7, #58] ; 0x3a
800d0b8: 429a cmp r2, r3
800d0ba: d324 bcc.n 800d106 <dhcp_parse_reply+0x4fa>
offset = (u16_t)(offset - q->len);
800d0bc: 6b3b ldr r3, [r7, #48] ; 0x30
800d0be: 895b ldrh r3, [r3, #10]
800d0c0: 8f7a ldrh r2, [r7, #58] ; 0x3a
800d0c2: 1ad3 subs r3, r2, r3
800d0c4: 877b strh r3, [r7, #58] ; 0x3a
offset_max = (u16_t)(offset_max - q->len);
800d0c6: 6b3b ldr r3, [r7, #48] ; 0x30
800d0c8: 895b ldrh r3, [r3, #10]
800d0ca: 8f3a ldrh r2, [r7, #56] ; 0x38
800d0cc: 1ad3 subs r3, r2, r3
800d0ce: 873b strh r3, [r7, #56] ; 0x38
if (offset < offset_max) {
800d0d0: 8f7a ldrh r2, [r7, #58] ; 0x3a
800d0d2: 8f3b ldrh r3, [r7, #56] ; 0x38
800d0d4: 429a cmp r2, r3
800d0d6: d213 bcs.n 800d100 <dhcp_parse_reply+0x4f4>
q = q->next;
800d0d8: 6b3b ldr r3, [r7, #48] ; 0x30
800d0da: 681b ldr r3, [r3, #0]
800d0dc: 633b str r3, [r7, #48] ; 0x30
LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;);
800d0de: 6b3b ldr r3, [r7, #48] ; 0x30
800d0e0: 2b00 cmp r3, #0
800d0e2: d109 bne.n 800d0f8 <dhcp_parse_reply+0x4ec>
800d0e4: 4b2a ldr r3, [pc, #168] ; (800d190 <dhcp_parse_reply+0x584>)
800d0e6: f240 629d movw r2, #1693 ; 0x69d
800d0ea: 4931 ldr r1, [pc, #196] ; (800d1b0 <dhcp_parse_reply+0x5a4>)
800d0ec: 482a ldr r0, [pc, #168] ; (800d198 <dhcp_parse_reply+0x58c>)
800d0ee: f002 fee3 bl 800feb8 <printf>
800d0f2: f06f 0305 mvn.w r3, #5
800d0f6: e046 b.n 800d186 <dhcp_parse_reply+0x57a>
options = (u8_t *)q->payload;
800d0f8: 6b3b ldr r3, [r7, #48] ; 0x30
800d0fa: 685b ldr r3, [r3, #4]
800d0fc: 63fb str r3, [r7, #60] ; 0x3c
800d0fe: e002 b.n 800d106 <dhcp_parse_reply+0x4fa>
} else {
/* We've run out of bytes, probably no end marker. Don't proceed. */
return ERR_BUF;
800d100: f06f 0301 mvn.w r3, #1
800d104: e03f b.n 800d186 <dhcp_parse_reply+0x57a>
while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
800d106: 6b3b ldr r3, [r7, #48] ; 0x30
800d108: 2b00 cmp r3, #0
800d10a: d00a beq.n 800d122 <dhcp_parse_reply+0x516>
800d10c: 8f7a ldrh r2, [r7, #58] ; 0x3a
800d10e: 8f3b ldrh r3, [r7, #56] ; 0x38
800d110: 429a cmp r2, r3
800d112: d206 bcs.n 800d122 <dhcp_parse_reply+0x516>
800d114: 8f7b ldrh r3, [r7, #58] ; 0x3a
800d116: 6bfa ldr r2, [r7, #60] ; 0x3c
800d118: 4413 add r3, r2
800d11a: 781b ldrb r3, [r3, #0]
800d11c: 2bff cmp r3, #255 ; 0xff
800d11e: f47f adb8 bne.w 800cc92 <dhcp_parse_reply+0x86>
}
}
}
/* is this an overloaded message? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) {
800d122: 4b1f ldr r3, [pc, #124] ; (800d1a0 <dhcp_parse_reply+0x594>)
800d124: 781b ldrb r3, [r3, #0]
800d126: 2b00 cmp r3, #0
800d128: d018 beq.n 800d15c <dhcp_parse_reply+0x550>
u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD);
800d12a: 4b1f ldr r3, [pc, #124] ; (800d1a8 <dhcp_parse_reply+0x59c>)
800d12c: 681b ldr r3, [r3, #0]
800d12e: 60fb str r3, [r7, #12]
dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD);
800d130: 4b1b ldr r3, [pc, #108] ; (800d1a0 <dhcp_parse_reply+0x594>)
800d132: 2200 movs r2, #0
800d134: 701a strb r2, [r3, #0]
if (overload == DHCP_OVERLOAD_FILE) {
800d136: 68fb ldr r3, [r7, #12]
800d138: 2b01 cmp r3, #1
800d13a: d102 bne.n 800d142 <dhcp_parse_reply+0x536>
parse_file_as_options = 1;
800d13c: 2301 movs r3, #1
800d13e: 62fb str r3, [r7, #44] ; 0x2c
800d140: e00c b.n 800d15c <dhcp_parse_reply+0x550>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n"));
} else if (overload == DHCP_OVERLOAD_SNAME) {
800d142: 68fb ldr r3, [r7, #12]
800d144: 2b02 cmp r3, #2
800d146: d102 bne.n 800d14e <dhcp_parse_reply+0x542>
parse_sname_as_options = 1;
800d148: 2301 movs r3, #1
800d14a: 62bb str r3, [r7, #40] ; 0x28
800d14c: e006 b.n 800d15c <dhcp_parse_reply+0x550>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n"));
} else if (overload == DHCP_OVERLOAD_SNAME_FILE) {
800d14e: 68fb ldr r3, [r7, #12]
800d150: 2b03 cmp r3, #3
800d152: d103 bne.n 800d15c <dhcp_parse_reply+0x550>
parse_sname_as_options = 1;
800d154: 2301 movs r3, #1
800d156: 62bb str r3, [r7, #40] ; 0x28
parse_file_as_options = 1;
800d158: 2301 movs r3, #1
800d15a: 62fb str r3, [r7, #44] ; 0x2c
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname and file field\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("invalid overload option: %d\n", (int)overload));
}
}
if (parse_file_as_options) {
800d15c: 6afb ldr r3, [r7, #44] ; 0x2c
800d15e: 2b00 cmp r3, #0
800d160: d006 beq.n 800d170 <dhcp_parse_reply+0x564>
/* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */
parse_file_as_options = 0;
800d162: 2300 movs r3, #0
800d164: 62fb str r3, [r7, #44] ; 0x2c
options_idx = DHCP_FILE_OFS;
800d166: 236c movs r3, #108 ; 0x6c
800d168: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN;
800d16a: 23ec movs r3, #236 ; 0xec
800d16c: 86bb strh r3, [r7, #52] ; 0x34
#if LWIP_DHCP_BOOTP_FILE
file_overloaded = 1;
#endif
goto again;
800d16e: e56a b.n 800cc46 <dhcp_parse_reply+0x3a>
} else if (parse_sname_as_options) {
800d170: 6abb ldr r3, [r7, #40] ; 0x28
800d172: 2b00 cmp r3, #0
800d174: d006 beq.n 800d184 <dhcp_parse_reply+0x578>
parse_sname_as_options = 0;
800d176: 2300 movs r3, #0
800d178: 62bb str r3, [r7, #40] ; 0x28
options_idx = DHCP_SNAME_OFS;
800d17a: 232c movs r3, #44 ; 0x2c
800d17c: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN;
800d17e: 236c movs r3, #108 ; 0x6c
800d180: 86bb strh r3, [r7, #52] ; 0x34
goto again;
800d182: e560 b.n 800cc46 <dhcp_parse_reply+0x3a>
}
/* make sure the string is really NULL-terminated */
dhcp->boot_file_name[DHCP_FILE_LEN-1] = 0;
}
#endif /* LWIP_DHCP_BOOTP_FILE */
return ERR_OK;
800d184: 2300 movs r3, #0
}
800d186: 4618 mov r0, r3
800d188: 3740 adds r7, #64 ; 0x40
800d18a: 46bd mov sp, r7
800d18c: bd80 pop {r7, pc}
800d18e: bf00 nop
800d190: 08016cf4 .word 0x08016cf4
800d194: 08016f7c .word 0x08016f7c
800d198: 08016d54 .word 0x08016d54
800d19c: 08016fc0 .word 0x08016fc0
800d1a0: 20008c2c .word 0x20008c2c
800d1a4: 08016fd4 .word 0x08016fd4
800d1a8: 20008c0c .word 0x20008c0c
800d1ac: 08016fec .word 0x08016fec
800d1b0: 08017000 .word 0x08017000
0800d1b4 <dhcp_recv>:
/**
* If an incoming DHCP message is in response to us, then trigger the state machine
*/
static void
dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
{
800d1b4: b580 push {r7, lr}
800d1b6: b08a sub sp, #40 ; 0x28
800d1b8: af00 add r7, sp, #0
800d1ba: 60f8 str r0, [r7, #12]
800d1bc: 60b9 str r1, [r7, #8]
800d1be: 607a str r2, [r7, #4]
800d1c0: 603b str r3, [r7, #0]
struct netif *netif = ip_current_input_netif();
800d1c2: 4b60 ldr r3, [pc, #384] ; (800d344 <dhcp_recv+0x190>)
800d1c4: 685b ldr r3, [r3, #4]
800d1c6: 623b str r3, [r7, #32]
struct dhcp *dhcp = netif_dhcp_data(netif);
800d1c8: 6a3b ldr r3, [r7, #32]
800d1ca: 6a5b ldr r3, [r3, #36] ; 0x24
800d1cc: 61fb str r3, [r7, #28]
struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload;
800d1ce: 687b ldr r3, [r7, #4]
800d1d0: 685b ldr r3, [r3, #4]
800d1d2: 61bb str r3, [r7, #24]
struct dhcp_msg *msg_in;
LWIP_UNUSED_ARG(arg);
/* Caught DHCP message from netif that does not have DHCP enabled? -> not interested */
if ((dhcp == NULL) || (dhcp->pcb_allocated == 0)) {
800d1d4: 69fb ldr r3, [r7, #28]
800d1d6: 2b00 cmp r3, #0
800d1d8: f000 809d beq.w 800d316 <dhcp_recv+0x162>
800d1dc: 69fb ldr r3, [r7, #28]
800d1de: 791b ldrb r3, [r3, #4]
800d1e0: 2b00 cmp r3, #0
800d1e2: f000 8098 beq.w 800d316 <dhcp_recv+0x162>
/* prevent warnings about unused arguments */
LWIP_UNUSED_ARG(pcb);
LWIP_UNUSED_ARG(addr);
LWIP_UNUSED_ARG(port);
if (p->len < DHCP_MIN_REPLY_LEN) {
800d1e6: 687b ldr r3, [r7, #4]
800d1e8: 895b ldrh r3, [r3, #10]
800d1ea: 2b2b cmp r3, #43 ; 0x2b
800d1ec: f240 8095 bls.w 800d31a <dhcp_recv+0x166>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP reply message or pbuf too short\n"));
goto free_pbuf_and_return;
}
if (reply_msg->op != DHCP_BOOTREPLY) {
800d1f0: 69bb ldr r3, [r7, #24]
800d1f2: 781b ldrb r3, [r3, #0]
800d1f4: 2b02 cmp r3, #2
800d1f6: f040 8092 bne.w 800d31e <dhcp_recv+0x16a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op));
goto free_pbuf_and_return;
}
/* iterate through hardware address and match against DHCP message */
for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
800d1fa: 2300 movs r3, #0
800d1fc: f887 3027 strb.w r3, [r7, #39] ; 0x27
800d200: e012 b.n 800d228 <dhcp_recv+0x74>
if (netif->hwaddr[i] != reply_msg->chaddr[i]) {
800d202: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d206: 6a3a ldr r2, [r7, #32]
800d208: 4413 add r3, r2
800d20a: f893 202a ldrb.w r2, [r3, #42] ; 0x2a
800d20e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d212: 69b9 ldr r1, [r7, #24]
800d214: 440b add r3, r1
800d216: 7f1b ldrb r3, [r3, #28]
800d218: 429a cmp r2, r3
800d21a: f040 8082 bne.w 800d322 <dhcp_recv+0x16e>
for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
800d21e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d222: 3301 adds r3, #1
800d224: f887 3027 strb.w r3, [r7, #39] ; 0x27
800d228: 6a3b ldr r3, [r7, #32]
800d22a: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
800d22e: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
800d232: 429a cmp r2, r3
800d234: d203 bcs.n 800d23e <dhcp_recv+0x8a>
800d236: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800d23a: 2b05 cmp r3, #5
800d23c: d9e1 bls.n 800d202 <dhcp_recv+0x4e>
(u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i]));
goto free_pbuf_and_return;
}
}
/* match transaction ID against what we expected */
if (lwip_ntohl(reply_msg->xid) != dhcp->xid) {
800d23e: 69bb ldr r3, [r7, #24]
800d240: 685b ldr r3, [r3, #4]
800d242: 4618 mov r0, r3
800d244: f7f6 fdc7 bl 8003dd6 <lwip_htonl>
800d248: 4602 mov r2, r0
800d24a: 69fb ldr r3, [r7, #28]
800d24c: 681b ldr r3, [r3, #0]
800d24e: 429a cmp r2, r3
800d250: d169 bne.n 800d326 <dhcp_recv+0x172>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING,
("transaction id mismatch reply_msg->xid(%"X32_F")!=dhcp->xid(%"X32_F")\n", lwip_ntohl(reply_msg->xid), dhcp->xid));
goto free_pbuf_and_return;
}
/* option fields could be unfold? */
if (dhcp_parse_reply(p, dhcp) != ERR_OK) {
800d252: 69f9 ldr r1, [r7, #28]
800d254: 6878 ldr r0, [r7, #4]
800d256: f7ff fcd9 bl 800cc0c <dhcp_parse_reply>
800d25a: 4603 mov r3, r0
800d25c: 2b00 cmp r3, #0
800d25e: d164 bne.n 800d32a <dhcp_recv+0x176>
goto free_pbuf_and_return;
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("searching DHCP_OPTION_MESSAGE_TYPE\n"));
/* obtain pointer to DHCP message type */
if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) {
800d260: 4b39 ldr r3, [pc, #228] ; (800d348 <dhcp_recv+0x194>)
800d262: 785b ldrb r3, [r3, #1]
800d264: 2b00 cmp r3, #0
800d266: d062 beq.n 800d32e <dhcp_recv+0x17a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP_OPTION_MESSAGE_TYPE option not found\n"));
goto free_pbuf_and_return;
}
msg_in = (struct dhcp_msg *)p->payload;
800d268: 687b ldr r3, [r7, #4]
800d26a: 685b ldr r3, [r3, #4]
800d26c: 617b str r3, [r7, #20]
/* read DHCP message type */
msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE);
800d26e: 4b37 ldr r3, [pc, #220] ; (800d34c <dhcp_recv+0x198>)
800d270: 685b ldr r3, [r3, #4]
800d272: 74fb strb r3, [r7, #19]
/* message type is DHCP ACK? */
if (msg_type == DHCP_ACK) {
800d274: 7cfb ldrb r3, [r7, #19]
800d276: 2b05 cmp r3, #5
800d278: d12a bne.n 800d2d0 <dhcp_recv+0x11c>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n"));
/* in requesting state? */
if (dhcp->state == DHCP_STATE_REQUESTING) {
800d27a: 69fb ldr r3, [r7, #28]
800d27c: 795b ldrb r3, [r3, #5]
800d27e: 2b01 cmp r3, #1
800d280: d112 bne.n 800d2a8 <dhcp_recv+0xf4>
dhcp_handle_ack(netif, msg_in);
800d282: 6979 ldr r1, [r7, #20]
800d284: 6a38 ldr r0, [r7, #32]
800d286: f7fe fe17 bl 800beb8 <dhcp_handle_ack>
#if DHCP_DOES_ARP_CHECK
if ((netif->flags & NETIF_FLAG_ETHARP) != 0) {
800d28a: 6a3b ldr r3, [r7, #32]
800d28c: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800d290: f003 0308 and.w r3, r3, #8
800d294: 2b00 cmp r3, #0
800d296: d003 beq.n 800d2a0 <dhcp_recv+0xec>
/* check if the acknowledged lease address is already in use */
dhcp_check(netif);
800d298: 6a38 ldr r0, [r7, #32]
800d29a: f7fe fb87 bl 800b9ac <dhcp_check>
800d29e: e049 b.n 800d334 <dhcp_recv+0x180>
} else {
/* bind interface to the acknowledged lease address */
dhcp_bind(netif);
800d2a0: 6a38 ldr r0, [r7, #32]
800d2a2: f7ff f867 bl 800c374 <dhcp_bind>
800d2a6: e045 b.n 800d334 <dhcp_recv+0x180>
/* bind interface to the acknowledged lease address */
dhcp_bind(netif);
#endif
}
/* already bound to the given lease address? */
else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) ||
800d2a8: 69fb ldr r3, [r7, #28]
800d2aa: 795b ldrb r3, [r3, #5]
800d2ac: 2b03 cmp r3, #3
800d2ae: d007 beq.n 800d2c0 <dhcp_recv+0x10c>
800d2b0: 69fb ldr r3, [r7, #28]
800d2b2: 795b ldrb r3, [r3, #5]
800d2b4: 2b04 cmp r3, #4
800d2b6: d003 beq.n 800d2c0 <dhcp_recv+0x10c>
(dhcp->state == DHCP_STATE_RENEWING)) {
800d2b8: 69fb ldr r3, [r7, #28]
800d2ba: 795b ldrb r3, [r3, #5]
else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) ||
800d2bc: 2b05 cmp r3, #5
800d2be: d139 bne.n 800d334 <dhcp_recv+0x180>
dhcp_handle_ack(netif, msg_in);
800d2c0: 6979 ldr r1, [r7, #20]
800d2c2: 6a38 ldr r0, [r7, #32]
800d2c4: f7fe fdf8 bl 800beb8 <dhcp_handle_ack>
dhcp_bind(netif);
800d2c8: 6a38 ldr r0, [r7, #32]
800d2ca: f7ff f853 bl 800c374 <dhcp_bind>
800d2ce: e031 b.n 800d334 <dhcp_recv+0x180>
}
}
/* received a DHCP_NAK in appropriate state? */
else if ((msg_type == DHCP_NAK) &&
800d2d0: 7cfb ldrb r3, [r7, #19]
800d2d2: 2b06 cmp r3, #6
800d2d4: d113 bne.n 800d2fe <dhcp_recv+0x14a>
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
800d2d6: 69fb ldr r3, [r7, #28]
800d2d8: 795b ldrb r3, [r3, #5]
else if ((msg_type == DHCP_NAK) &&
800d2da: 2b03 cmp r3, #3
800d2dc: d00b beq.n 800d2f6 <dhcp_recv+0x142>
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
800d2de: 69fb ldr r3, [r7, #28]
800d2e0: 795b ldrb r3, [r3, #5]
800d2e2: 2b01 cmp r3, #1
800d2e4: d007 beq.n 800d2f6 <dhcp_recv+0x142>
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
800d2e6: 69fb ldr r3, [r7, #28]
800d2e8: 795b ldrb r3, [r3, #5]
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
800d2ea: 2b04 cmp r3, #4
800d2ec: d003 beq.n 800d2f6 <dhcp_recv+0x142>
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
800d2ee: 69fb ldr r3, [r7, #28]
800d2f0: 795b ldrb r3, [r3, #5]
800d2f2: 2b05 cmp r3, #5
800d2f4: d103 bne.n 800d2fe <dhcp_recv+0x14a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n"));
dhcp_handle_nak(netif);
800d2f6: 6a38 ldr r0, [r7, #32]
800d2f8: f7fe fb3e bl 800b978 <dhcp_handle_nak>
800d2fc: e01a b.n 800d334 <dhcp_recv+0x180>
}
/* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */
else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) {
800d2fe: 7cfb ldrb r3, [r7, #19]
800d300: 2b02 cmp r3, #2
800d302: d116 bne.n 800d332 <dhcp_recv+0x17e>
800d304: 69fb ldr r3, [r7, #28]
800d306: 795b ldrb r3, [r3, #5]
800d308: 2b06 cmp r3, #6
800d30a: d112 bne.n 800d332 <dhcp_recv+0x17e>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_OFFER received in DHCP_STATE_SELECTING state\n"));
/* remember offered lease */
dhcp_handle_offer(netif, msg_in);
800d30c: 6979 ldr r1, [r7, #20]
800d30e: 6a38 ldr r0, [r7, #32]
800d310: f7fe fb80 bl 800ba14 <dhcp_handle_offer>
800d314: e00e b.n 800d334 <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d316: bf00 nop
800d318: e00c b.n 800d334 <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d31a: bf00 nop
800d31c: e00a b.n 800d334 <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d31e: bf00 nop
800d320: e008 b.n 800d334 <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d322: bf00 nop
800d324: e006 b.n 800d334 <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d326: bf00 nop
800d328: e004 b.n 800d334 <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d32a: bf00 nop
800d32c: e002 b.n 800d334 <dhcp_recv+0x180>
goto free_pbuf_and_return;
800d32e: bf00 nop
800d330: e000 b.n 800d334 <dhcp_recv+0x180>
}
free_pbuf_and_return:
800d332: bf00 nop
pbuf_free(p);
800d334: 6878 ldr r0, [r7, #4]
800d336: f7f8 f8a3 bl 8005480 <pbuf_free>
}
800d33a: bf00 nop
800d33c: 3728 adds r7, #40 ; 0x28
800d33e: 46bd mov sp, r7
800d340: bd80 pop {r7, pc}
800d342: bf00 nop
800d344: 2000561c .word 0x2000561c
800d348: 20008c2c .word 0x20008c2c
800d34c: 20008c0c .word 0x20008c0c
0800d350 <dhcp_create_msg>:
* @param dhcp dhcp control struct
* @param message_type message type of the request
*/
static struct pbuf *
dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type, u16_t *options_out_len)
{
800d350: b580 push {r7, lr}
800d352: b088 sub sp, #32
800d354: af00 add r7, sp, #0
800d356: 60f8 str r0, [r7, #12]
800d358: 60b9 str r1, [r7, #8]
800d35a: 603b str r3, [r7, #0]
800d35c: 4613 mov r3, r2
800d35e: 71fb strb r3, [r7, #7]
if (!xid_initialised) {
xid = DHCP_GLOBAL_XID;
xid_initialised = !xid_initialised;
}
#endif
LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return NULL;);
800d360: 68fb ldr r3, [r7, #12]
800d362: 2b00 cmp r3, #0
800d364: d108 bne.n 800d378 <dhcp_create_msg+0x28>
800d366: 4b5f ldr r3, [pc, #380] ; (800d4e4 <dhcp_create_msg+0x194>)
800d368: f240 7269 movw r2, #1897 ; 0x769
800d36c: 495e ldr r1, [pc, #376] ; (800d4e8 <dhcp_create_msg+0x198>)
800d36e: 485f ldr r0, [pc, #380] ; (800d4ec <dhcp_create_msg+0x19c>)
800d370: f002 fda2 bl 800feb8 <printf>
800d374: 2300 movs r3, #0
800d376: e0b1 b.n 800d4dc <dhcp_create_msg+0x18c>
LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;);
800d378: 68bb ldr r3, [r7, #8]
800d37a: 2b00 cmp r3, #0
800d37c: d108 bne.n 800d390 <dhcp_create_msg+0x40>
800d37e: 4b59 ldr r3, [pc, #356] ; (800d4e4 <dhcp_create_msg+0x194>)
800d380: f240 726a movw r2, #1898 ; 0x76a
800d384: 495a ldr r1, [pc, #360] ; (800d4f0 <dhcp_create_msg+0x1a0>)
800d386: 4859 ldr r0, [pc, #356] ; (800d4ec <dhcp_create_msg+0x19c>)
800d388: f002 fd96 bl 800feb8 <printf>
800d38c: 2300 movs r3, #0
800d38e: e0a5 b.n 800d4dc <dhcp_create_msg+0x18c>
p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM);
800d390: f44f 7220 mov.w r2, #640 ; 0x280
800d394: f44f 719a mov.w r1, #308 ; 0x134
800d398: 2036 movs r0, #54 ; 0x36
800d39a: f7f7 fd8d bl 8004eb8 <pbuf_alloc>
800d39e: 61b8 str r0, [r7, #24]
if (p_out == NULL) {
800d3a0: 69bb ldr r3, [r7, #24]
800d3a2: 2b00 cmp r3, #0
800d3a4: d101 bne.n 800d3aa <dhcp_create_msg+0x5a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("dhcp_create_msg(): could not allocate pbuf\n"));
return NULL;
800d3a6: 2300 movs r3, #0
800d3a8: e098 b.n 800d4dc <dhcp_create_msg+0x18c>
}
LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
800d3aa: 69bb ldr r3, [r7, #24]
800d3ac: 895b ldrh r3, [r3, #10]
800d3ae: f5b3 7f9a cmp.w r3, #308 ; 0x134
800d3b2: d206 bcs.n 800d3c2 <dhcp_create_msg+0x72>
800d3b4: 4b4b ldr r3, [pc, #300] ; (800d4e4 <dhcp_create_msg+0x194>)
800d3b6: f240 7271 movw r2, #1905 ; 0x771
800d3ba: 494e ldr r1, [pc, #312] ; (800d4f4 <dhcp_create_msg+0x1a4>)
800d3bc: 484b ldr r0, [pc, #300] ; (800d4ec <dhcp_create_msg+0x19c>)
800d3be: f002 fd7b bl 800feb8 <printf>
(p_out->len >= sizeof(struct dhcp_msg)));
/* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */
if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) {
800d3c2: 79fb ldrb r3, [r7, #7]
800d3c4: 2b03 cmp r3, #3
800d3c6: d103 bne.n 800d3d0 <dhcp_create_msg+0x80>
800d3c8: 68bb ldr r3, [r7, #8]
800d3ca: 795b ldrb r3, [r3, #5]
800d3cc: 2b03 cmp r3, #3
800d3ce: d10d bne.n 800d3ec <dhcp_create_msg+0x9c>
/* reuse transaction identifier in retransmissions */
if (dhcp->tries == 0) {
800d3d0: 68bb ldr r3, [r7, #8]
800d3d2: 799b ldrb r3, [r3, #6]
800d3d4: 2b00 cmp r3, #0
800d3d6: d105 bne.n 800d3e4 <dhcp_create_msg+0x94>
#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND)
xid = LWIP_RAND();
800d3d8: f002 fd80 bl 800fedc <rand>
800d3dc: 4603 mov r3, r0
800d3de: 461a mov r2, r3
800d3e0: 4b45 ldr r3, [pc, #276] ; (800d4f8 <dhcp_create_msg+0x1a8>)
800d3e2: 601a str r2, [r3, #0]
#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
xid++;
#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
}
dhcp->xid = xid;
800d3e4: 4b44 ldr r3, [pc, #272] ; (800d4f8 <dhcp_create_msg+0x1a8>)
800d3e6: 681a ldr r2, [r3, #0]
800d3e8: 68bb ldr r3, [r7, #8]
800d3ea: 601a str r2, [r3, #0]
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
("transaction id xid(%"X32_F")\n", xid));
msg_out = (struct dhcp_msg *)p_out->payload;
800d3ec: 69bb ldr r3, [r7, #24]
800d3ee: 685b ldr r3, [r3, #4]
800d3f0: 617b str r3, [r7, #20]
memset(msg_out, 0, sizeof(struct dhcp_msg));
800d3f2: f44f 729a mov.w r2, #308 ; 0x134
800d3f6: 2100 movs r1, #0
800d3f8: 6978 ldr r0, [r7, #20]
800d3fa: f002 fd55 bl 800fea8 <memset>
msg_out->op = DHCP_BOOTREQUEST;
800d3fe: 697b ldr r3, [r7, #20]
800d400: 2201 movs r2, #1
800d402: 701a strb r2, [r3, #0]
/* @todo: make link layer independent */
msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET;
800d404: 697b ldr r3, [r7, #20]
800d406: 2201 movs r2, #1
800d408: 705a strb r2, [r3, #1]
msg_out->hlen = netif->hwaddr_len;
800d40a: 68fb ldr r3, [r7, #12]
800d40c: f893 2030 ldrb.w r2, [r3, #48] ; 0x30
800d410: 697b ldr r3, [r7, #20]
800d412: 709a strb r2, [r3, #2]
msg_out->xid = lwip_htonl(dhcp->xid);
800d414: 68bb ldr r3, [r7, #8]
800d416: 681b ldr r3, [r3, #0]
800d418: 4618 mov r0, r3
800d41a: f7f6 fcdc bl 8003dd6 <lwip_htonl>
800d41e: 4602 mov r2, r0
800d420: 697b ldr r3, [r7, #20]
800d422: 605a str r2, [r3, #4]
/* we don't need the broadcast flag since we can receive unicast traffic
before being fully configured! */
/* set ciaddr to netif->ip_addr based on message_type and state */
if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || (message_type == DHCP_RELEASE) ||
800d424: 79fb ldrb r3, [r7, #7]
800d426: 2b08 cmp r3, #8
800d428: d010 beq.n 800d44c <dhcp_create_msg+0xfc>
800d42a: 79fb ldrb r3, [r7, #7]
800d42c: 2b04 cmp r3, #4
800d42e: d00d beq.n 800d44c <dhcp_create_msg+0xfc>
800d430: 79fb ldrb r3, [r7, #7]
800d432: 2b07 cmp r3, #7
800d434: d00a beq.n 800d44c <dhcp_create_msg+0xfc>
800d436: 79fb ldrb r3, [r7, #7]
800d438: 2b03 cmp r3, #3
800d43a: d10c bne.n 800d456 <dhcp_create_msg+0x106>
((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) {
800d43c: 68bb ldr r3, [r7, #8]
800d43e: 795b ldrb r3, [r3, #5]
((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
800d440: 2b05 cmp r3, #5
800d442: d003 beq.n 800d44c <dhcp_create_msg+0xfc>
((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) {
800d444: 68bb ldr r3, [r7, #8]
800d446: 795b ldrb r3, [r3, #5]
800d448: 2b04 cmp r3, #4
800d44a: d104 bne.n 800d456 <dhcp_create_msg+0x106>
ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif));
800d44c: 68fb ldr r3, [r7, #12]
800d44e: 3304 adds r3, #4
800d450: 681a ldr r2, [r3, #0]
800d452: 697b ldr r3, [r7, #20]
800d454: 60da str r2, [r3, #12]
}
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
800d456: 2300 movs r3, #0
800d458: 83fb strh r3, [r7, #30]
800d45a: e00c b.n 800d476 <dhcp_create_msg+0x126>
/* copy netif hardware address (padded with zeroes through memset already) */
msg_out->chaddr[i] = netif->hwaddr[i];
800d45c: 8bfa ldrh r2, [r7, #30]
800d45e: 8bfb ldrh r3, [r7, #30]
800d460: 68f9 ldr r1, [r7, #12]
800d462: 440a add r2, r1
800d464: f892 102a ldrb.w r1, [r2, #42] ; 0x2a
800d468: 697a ldr r2, [r7, #20]
800d46a: 4413 add r3, r2
800d46c: 460a mov r2, r1
800d46e: 771a strb r2, [r3, #28]
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
800d470: 8bfb ldrh r3, [r7, #30]
800d472: 3301 adds r3, #1
800d474: 83fb strh r3, [r7, #30]
800d476: 8bfb ldrh r3, [r7, #30]
800d478: 2b05 cmp r3, #5
800d47a: d9ef bls.n 800d45c <dhcp_create_msg+0x10c>
}
msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE);
800d47c: 697b ldr r3, [r7, #20]
800d47e: 2200 movs r2, #0
800d480: f042 0263 orr.w r2, r2, #99 ; 0x63
800d484: f883 20ec strb.w r2, [r3, #236] ; 0xec
800d488: 2200 movs r2, #0
800d48a: f062 027d orn r2, r2, #125 ; 0x7d
800d48e: f883 20ed strb.w r2, [r3, #237] ; 0xed
800d492: 2200 movs r2, #0
800d494: f042 0253 orr.w r2, r2, #83 ; 0x53
800d498: f883 20ee strb.w r2, [r3, #238] ; 0xee
800d49c: 2200 movs r2, #0
800d49e: f042 0263 orr.w r2, r2, #99 ; 0x63
800d4a2: f883 20ef strb.w r2, [r3, #239] ; 0xef
/* Add option MESSAGE_TYPE */
options_out_len_loc = dhcp_option(0, msg_out->options, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN);
800d4a6: 697b ldr r3, [r7, #20]
800d4a8: f103 01f0 add.w r1, r3, #240 ; 0xf0
800d4ac: 2301 movs r3, #1
800d4ae: 2235 movs r2, #53 ; 0x35
800d4b0: 2000 movs r0, #0
800d4b2: f7ff fadb bl 800ca6c <dhcp_option>
800d4b6: 4603 mov r3, r0
800d4b8: 827b strh r3, [r7, #18]
options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type);
800d4ba: 697b ldr r3, [r7, #20]
800d4bc: f103 01f0 add.w r1, r3, #240 ; 0xf0
800d4c0: 79fa ldrb r2, [r7, #7]
800d4c2: 8a7b ldrh r3, [r7, #18]
800d4c4: 4618 mov r0, r3
800d4c6: f7ff fb05 bl 800cad4 <dhcp_option_byte>
800d4ca: 4603 mov r3, r0
800d4cc: 827b strh r3, [r7, #18]
if (options_out_len) {
800d4ce: 683b ldr r3, [r7, #0]
800d4d0: 2b00 cmp r3, #0
800d4d2: d002 beq.n 800d4da <dhcp_create_msg+0x18a>
*options_out_len = options_out_len_loc;
800d4d4: 683b ldr r3, [r7, #0]
800d4d6: 8a7a ldrh r2, [r7, #18]
800d4d8: 801a strh r2, [r3, #0]
}
return p_out;
800d4da: 69bb ldr r3, [r7, #24]
}
800d4dc: 4618 mov r0, r3
800d4de: 3720 adds r7, #32
800d4e0: 46bd mov sp, r7
800d4e2: bd80 pop {r7, pc}
800d4e4: 08016cf4 .word 0x08016cf4
800d4e8: 08017014 .word 0x08017014
800d4ec: 08016d54 .word 0x08016d54
800d4f0: 08017034 .word 0x08017034
800d4f4: 08017054 .word 0x08017054
800d4f8: 20008c3c .word 0x20008c3c
0800d4fc <dhcp_option_trailer>:
* Adds the END option to the DHCP message, and if
* necessary, up to three padding bytes.
*/
static void
dhcp_option_trailer(u16_t options_out_len, u8_t *options, struct pbuf *p_out)
{
800d4fc: b580 push {r7, lr}
800d4fe: b084 sub sp, #16
800d500: af00 add r7, sp, #0
800d502: 4603 mov r3, r0
800d504: 60b9 str r1, [r7, #8]
800d506: 607a str r2, [r7, #4]
800d508: 81fb strh r3, [r7, #14]
options[options_out_len++] = DHCP_OPTION_END;
800d50a: 89fb ldrh r3, [r7, #14]
800d50c: 1c5a adds r2, r3, #1
800d50e: 81fa strh r2, [r7, #14]
800d510: 461a mov r2, r3
800d512: 68bb ldr r3, [r7, #8]
800d514: 4413 add r3, r2
800d516: 22ff movs r2, #255 ; 0xff
800d518: 701a strb r2, [r3, #0]
/* packet is too small, or not 4 byte aligned? */
while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
800d51a: e007 b.n 800d52c <dhcp_option_trailer+0x30>
(options_out_len < DHCP_OPTIONS_LEN)) {
/* add a fill/padding byte */
options[options_out_len++] = 0;
800d51c: 89fb ldrh r3, [r7, #14]
800d51e: 1c5a adds r2, r3, #1
800d520: 81fa strh r2, [r7, #14]
800d522: 461a mov r2, r3
800d524: 68bb ldr r3, [r7, #8]
800d526: 4413 add r3, r2
800d528: 2200 movs r2, #0
800d52a: 701a strb r2, [r3, #0]
while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
800d52c: 89fb ldrh r3, [r7, #14]
800d52e: 2b43 cmp r3, #67 ; 0x43
800d530: d904 bls.n 800d53c <dhcp_option_trailer+0x40>
800d532: 89fb ldrh r3, [r7, #14]
800d534: f003 0303 and.w r3, r3, #3
800d538: 2b00 cmp r3, #0
800d53a: d002 beq.n 800d542 <dhcp_option_trailer+0x46>
800d53c: 89fb ldrh r3, [r7, #14]
800d53e: 2b43 cmp r3, #67 ; 0x43
800d540: d9ec bls.n 800d51c <dhcp_option_trailer+0x20>
}
/* shrink the pbuf to the actual content length */
pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + options_out_len));
800d542: 89fb ldrh r3, [r7, #14]
800d544: 33f0 adds r3, #240 ; 0xf0
800d546: b29b uxth r3, r3
800d548: 4619 mov r1, r3
800d54a: 6878 ldr r0, [r7, #4]
800d54c: f7f7 fe12 bl 8005174 <pbuf_realloc>
}
800d550: bf00 nop
800d552: 3710 adds r7, #16
800d554: 46bd mov sp, r7
800d556: bd80 pop {r7, pc}
0800d558 <dhcp_supplied_address>:
* @return 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING),
* 0 otherwise
*/
u8_t
dhcp_supplied_address(const struct netif *netif)
{
800d558: b480 push {r7}
800d55a: b085 sub sp, #20
800d55c: af00 add r7, sp, #0
800d55e: 6078 str r0, [r7, #4]
if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) {
800d560: 687b ldr r3, [r7, #4]
800d562: 2b00 cmp r3, #0
800d564: d017 beq.n 800d596 <dhcp_supplied_address+0x3e>
800d566: 687b ldr r3, [r7, #4]
800d568: 6a5b ldr r3, [r3, #36] ; 0x24
800d56a: 2b00 cmp r3, #0
800d56c: d013 beq.n 800d596 <dhcp_supplied_address+0x3e>
struct dhcp *dhcp = netif_dhcp_data(netif);
800d56e: 687b ldr r3, [r7, #4]
800d570: 6a5b ldr r3, [r3, #36] ; 0x24
800d572: 60fb str r3, [r7, #12]
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
800d574: 68fb ldr r3, [r7, #12]
800d576: 795b ldrb r3, [r3, #5]
800d578: 2b0a cmp r3, #10
800d57a: d007 beq.n 800d58c <dhcp_supplied_address+0x34>
800d57c: 68fb ldr r3, [r7, #12]
800d57e: 795b ldrb r3, [r3, #5]
800d580: 2b05 cmp r3, #5
800d582: d003 beq.n 800d58c <dhcp_supplied_address+0x34>
(dhcp->state == DHCP_STATE_REBINDING);
800d584: 68fb ldr r3, [r7, #12]
800d586: 795b ldrb r3, [r3, #5]
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
800d588: 2b04 cmp r3, #4
800d58a: d101 bne.n 800d590 <dhcp_supplied_address+0x38>
800d58c: 2301 movs r3, #1
800d58e: e000 b.n 800d592 <dhcp_supplied_address+0x3a>
800d590: 2300 movs r3, #0
800d592: b2db uxtb r3, r3
800d594: e000 b.n 800d598 <dhcp_supplied_address+0x40>
}
return 0;
800d596: 2300 movs r3, #0
}
800d598: 4618 mov r0, r3
800d59a: 3714 adds r7, #20
800d59c: 46bd mov sp, r7
800d59e: f85d 7b04 ldr.w r7, [sp], #4
800d5a2: 4770 bx lr
0800d5a4 <etharp_free_entry>:
#endif /* ARP_QUEUEING */
/** Clean up ARP table entries */
static void
etharp_free_entry(int i)
{
800d5a4: b580 push {r7, lr}
800d5a6: b082 sub sp, #8
800d5a8: af00 add r7, sp, #0
800d5aa: 6078 str r0, [r7, #4]
/* remove from SNMP ARP index tree */
mib2_remove_arp_entry(arp_table[i].netif, &arp_table[i].ipaddr);
/* and empty packet queue */
if (arp_table[i].q != NULL) {
800d5ac: 4915 ldr r1, [pc, #84] ; (800d604 <etharp_free_entry+0x60>)
800d5ae: 687a ldr r2, [r7, #4]
800d5b0: 4613 mov r3, r2
800d5b2: 005b lsls r3, r3, #1
800d5b4: 4413 add r3, r2
800d5b6: 00db lsls r3, r3, #3
800d5b8: 440b add r3, r1
800d5ba: 681b ldr r3, [r3, #0]
800d5bc: 2b00 cmp r3, #0
800d5be: d013 beq.n 800d5e8 <etharp_free_entry+0x44>
/* remove all queued packets */
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_free_entry: freeing entry %"U16_F", packet queue %p.\n", (u16_t)i, (void *)(arp_table[i].q)));
free_etharp_q(arp_table[i].q);
800d5c0: 4910 ldr r1, [pc, #64] ; (800d604 <etharp_free_entry+0x60>)
800d5c2: 687a ldr r2, [r7, #4]
800d5c4: 4613 mov r3, r2
800d5c6: 005b lsls r3, r3, #1
800d5c8: 4413 add r3, r2
800d5ca: 00db lsls r3, r3, #3
800d5cc: 440b add r3, r1
800d5ce: 681b ldr r3, [r3, #0]
800d5d0: 4618 mov r0, r3
800d5d2: f7f7 ff55 bl 8005480 <pbuf_free>
arp_table[i].q = NULL;
800d5d6: 490b ldr r1, [pc, #44] ; (800d604 <etharp_free_entry+0x60>)
800d5d8: 687a ldr r2, [r7, #4]
800d5da: 4613 mov r3, r2
800d5dc: 005b lsls r3, r3, #1
800d5de: 4413 add r3, r2
800d5e0: 00db lsls r3, r3, #3
800d5e2: 440b add r3, r1
800d5e4: 2200 movs r2, #0
800d5e6: 601a str r2, [r3, #0]
}
/* recycle entry for re-use */
arp_table[i].state = ETHARP_STATE_EMPTY;
800d5e8: 4906 ldr r1, [pc, #24] ; (800d604 <etharp_free_entry+0x60>)
800d5ea: 687a ldr r2, [r7, #4]
800d5ec: 4613 mov r3, r2
800d5ee: 005b lsls r3, r3, #1
800d5f0: 4413 add r3, r2
800d5f2: 00db lsls r3, r3, #3
800d5f4: 440b add r3, r1
800d5f6: 3314 adds r3, #20
800d5f8: 2200 movs r2, #0
800d5fa: 701a strb r2, [r3, #0]
arp_table[i].ctime = 0;
arp_table[i].netif = NULL;
ip4_addr_set_zero(&arp_table[i].ipaddr);
arp_table[i].ethaddr = ethzero;
#endif /* LWIP_DEBUG */
}
800d5fc: bf00 nop
800d5fe: 3708 adds r7, #8
800d600: 46bd mov sp, r7
800d602: bd80 pop {r7, pc}
800d604: 20008c40 .word 0x20008c40
0800d608 <etharp_tmr>:
* This function should be called every ARP_TMR_INTERVAL milliseconds (1 second),
* in order to expire entries in the ARP table.
*/
void
etharp_tmr(void)
{
800d608: b580 push {r7, lr}
800d60a: b082 sub sp, #8
800d60c: af00 add r7, sp, #0
int i;
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n"));
/* remove expired entries from the ARP table */
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800d60e: 2300 movs r3, #0
800d610: 607b str r3, [r7, #4]
800d612: e096 b.n 800d742 <etharp_tmr+0x13a>
u8_t state = arp_table[i].state;
800d614: 494f ldr r1, [pc, #316] ; (800d754 <etharp_tmr+0x14c>)
800d616: 687a ldr r2, [r7, #4]
800d618: 4613 mov r3, r2
800d61a: 005b lsls r3, r3, #1
800d61c: 4413 add r3, r2
800d61e: 00db lsls r3, r3, #3
800d620: 440b add r3, r1
800d622: 3314 adds r3, #20
800d624: 781b ldrb r3, [r3, #0]
800d626: 70fb strb r3, [r7, #3]
if (state != ETHARP_STATE_EMPTY
800d628: 78fb ldrb r3, [r7, #3]
800d62a: 2b00 cmp r3, #0
800d62c: f000 8086 beq.w 800d73c <etharp_tmr+0x134>
#if ETHARP_SUPPORT_STATIC_ENTRIES
&& (state != ETHARP_STATE_STATIC)
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
) {
arp_table[i].ctime++;
800d630: 4948 ldr r1, [pc, #288] ; (800d754 <etharp_tmr+0x14c>)
800d632: 687a ldr r2, [r7, #4]
800d634: 4613 mov r3, r2
800d636: 005b lsls r3, r3, #1
800d638: 4413 add r3, r2
800d63a: 00db lsls r3, r3, #3
800d63c: 440b add r3, r1
800d63e: 3312 adds r3, #18
800d640: 881b ldrh r3, [r3, #0]
800d642: 3301 adds r3, #1
800d644: b298 uxth r0, r3
800d646: 4943 ldr r1, [pc, #268] ; (800d754 <etharp_tmr+0x14c>)
800d648: 687a ldr r2, [r7, #4]
800d64a: 4613 mov r3, r2
800d64c: 005b lsls r3, r3, #1
800d64e: 4413 add r3, r2
800d650: 00db lsls r3, r3, #3
800d652: 440b add r3, r1
800d654: 3312 adds r3, #18
800d656: 4602 mov r2, r0
800d658: 801a strh r2, [r3, #0]
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
800d65a: 493e ldr r1, [pc, #248] ; (800d754 <etharp_tmr+0x14c>)
800d65c: 687a ldr r2, [r7, #4]
800d65e: 4613 mov r3, r2
800d660: 005b lsls r3, r3, #1
800d662: 4413 add r3, r2
800d664: 00db lsls r3, r3, #3
800d666: 440b add r3, r1
800d668: 3312 adds r3, #18
800d66a: 881b ldrh r3, [r3, #0]
800d66c: f5b3 7f96 cmp.w r3, #300 ; 0x12c
800d670: d215 bcs.n 800d69e <etharp_tmr+0x96>
((arp_table[i].state == ETHARP_STATE_PENDING) &&
800d672: 4938 ldr r1, [pc, #224] ; (800d754 <etharp_tmr+0x14c>)
800d674: 687a ldr r2, [r7, #4]
800d676: 4613 mov r3, r2
800d678: 005b lsls r3, r3, #1
800d67a: 4413 add r3, r2
800d67c: 00db lsls r3, r3, #3
800d67e: 440b add r3, r1
800d680: 3314 adds r3, #20
800d682: 781b ldrb r3, [r3, #0]
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
800d684: 2b01 cmp r3, #1
800d686: d10e bne.n 800d6a6 <etharp_tmr+0x9e>
(arp_table[i].ctime >= ARP_MAXPENDING))) {
800d688: 4932 ldr r1, [pc, #200] ; (800d754 <etharp_tmr+0x14c>)
800d68a: 687a ldr r2, [r7, #4]
800d68c: 4613 mov r3, r2
800d68e: 005b lsls r3, r3, #1
800d690: 4413 add r3, r2
800d692: 00db lsls r3, r3, #3
800d694: 440b add r3, r1
800d696: 3312 adds r3, #18
800d698: 881b ldrh r3, [r3, #0]
((arp_table[i].state == ETHARP_STATE_PENDING) &&
800d69a: 2b04 cmp r3, #4
800d69c: d903 bls.n 800d6a6 <etharp_tmr+0x9e>
/* pending or stable entry has become old! */
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %d.\n",
arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", i));
/* clean up entries that have just been expired */
etharp_free_entry(i);
800d69e: 6878 ldr r0, [r7, #4]
800d6a0: f7ff ff80 bl 800d5a4 <etharp_free_entry>
800d6a4: e04a b.n 800d73c <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) {
800d6a6: 492b ldr r1, [pc, #172] ; (800d754 <etharp_tmr+0x14c>)
800d6a8: 687a ldr r2, [r7, #4]
800d6aa: 4613 mov r3, r2
800d6ac: 005b lsls r3, r3, #1
800d6ae: 4413 add r3, r2
800d6b0: 00db lsls r3, r3, #3
800d6b2: 440b add r3, r1
800d6b4: 3314 adds r3, #20
800d6b6: 781b ldrb r3, [r3, #0]
800d6b8: 2b03 cmp r3, #3
800d6ba: d10a bne.n 800d6d2 <etharp_tmr+0xca>
/* Don't send more than one request every 2 seconds. */
arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2;
800d6bc: 4925 ldr r1, [pc, #148] ; (800d754 <etharp_tmr+0x14c>)
800d6be: 687a ldr r2, [r7, #4]
800d6c0: 4613 mov r3, r2
800d6c2: 005b lsls r3, r3, #1
800d6c4: 4413 add r3, r2
800d6c6: 00db lsls r3, r3, #3
800d6c8: 440b add r3, r1
800d6ca: 3314 adds r3, #20
800d6cc: 2204 movs r2, #4
800d6ce: 701a strb r2, [r3, #0]
800d6d0: e034 b.n 800d73c <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) {
800d6d2: 4920 ldr r1, [pc, #128] ; (800d754 <etharp_tmr+0x14c>)
800d6d4: 687a ldr r2, [r7, #4]
800d6d6: 4613 mov r3, r2
800d6d8: 005b lsls r3, r3, #1
800d6da: 4413 add r3, r2
800d6dc: 00db lsls r3, r3, #3
800d6de: 440b add r3, r1
800d6e0: 3314 adds r3, #20
800d6e2: 781b ldrb r3, [r3, #0]
800d6e4: 2b04 cmp r3, #4
800d6e6: d10a bne.n 800d6fe <etharp_tmr+0xf6>
/* Reset state to stable, so that the next transmitted packet will
re-send an ARP request. */
arp_table[i].state = ETHARP_STATE_STABLE;
800d6e8: 491a ldr r1, [pc, #104] ; (800d754 <etharp_tmr+0x14c>)
800d6ea: 687a ldr r2, [r7, #4]
800d6ec: 4613 mov r3, r2
800d6ee: 005b lsls r3, r3, #1
800d6f0: 4413 add r3, r2
800d6f2: 00db lsls r3, r3, #3
800d6f4: 440b add r3, r1
800d6f6: 3314 adds r3, #20
800d6f8: 2202 movs r2, #2
800d6fa: 701a strb r2, [r3, #0]
800d6fc: e01e b.n 800d73c <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
800d6fe: 4915 ldr r1, [pc, #84] ; (800d754 <etharp_tmr+0x14c>)
800d700: 687a ldr r2, [r7, #4]
800d702: 4613 mov r3, r2
800d704: 005b lsls r3, r3, #1
800d706: 4413 add r3, r2
800d708: 00db lsls r3, r3, #3
800d70a: 440b add r3, r1
800d70c: 3314 adds r3, #20
800d70e: 781b ldrb r3, [r3, #0]
800d710: 2b01 cmp r3, #1
800d712: d113 bne.n 800d73c <etharp_tmr+0x134>
/* still pending, resend an ARP query */
etharp_request(arp_table[i].netif, &arp_table[i].ipaddr);
800d714: 490f ldr r1, [pc, #60] ; (800d754 <etharp_tmr+0x14c>)
800d716: 687a ldr r2, [r7, #4]
800d718: 4613 mov r3, r2
800d71a: 005b lsls r3, r3, #1
800d71c: 4413 add r3, r2
800d71e: 00db lsls r3, r3, #3
800d720: 440b add r3, r1
800d722: 3308 adds r3, #8
800d724: 6818 ldr r0, [r3, #0]
800d726: 687a ldr r2, [r7, #4]
800d728: 4613 mov r3, r2
800d72a: 005b lsls r3, r3, #1
800d72c: 4413 add r3, r2
800d72e: 00db lsls r3, r3, #3
800d730: 4a08 ldr r2, [pc, #32] ; (800d754 <etharp_tmr+0x14c>)
800d732: 4413 add r3, r2
800d734: 3304 adds r3, #4
800d736: 4619 mov r1, r3
800d738: f000 fe72 bl 800e420 <etharp_request>
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800d73c: 687b ldr r3, [r7, #4]
800d73e: 3301 adds r3, #1
800d740: 607b str r3, [r7, #4]
800d742: 687b ldr r3, [r7, #4]
800d744: 2b09 cmp r3, #9
800d746: f77f af65 ble.w 800d614 <etharp_tmr+0xc>
}
}
}
}
800d74a: bf00 nop
800d74c: bf00 nop
800d74e: 3708 adds r7, #8
800d750: 46bd mov sp, r7
800d752: bd80 pop {r7, pc}
800d754: 20008c40 .word 0x20008c40
0800d758 <etharp_find_entry>:
* @return The ARP entry index that matched or is created, ERR_MEM if no
* entry is found or could be recycled.
*/
static s16_t
etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif *netif)
{
800d758: b580 push {r7, lr}
800d75a: b08a sub sp, #40 ; 0x28
800d75c: af00 add r7, sp, #0
800d75e: 60f8 str r0, [r7, #12]
800d760: 460b mov r3, r1
800d762: 607a str r2, [r7, #4]
800d764: 72fb strb r3, [r7, #11]
s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE;
800d766: 230a movs r3, #10
800d768: 84fb strh r3, [r7, #38] ; 0x26
800d76a: 230a movs r3, #10
800d76c: 84bb strh r3, [r7, #36] ; 0x24
s16_t empty = ARP_TABLE_SIZE;
800d76e: 230a movs r3, #10
800d770: 847b strh r3, [r7, #34] ; 0x22
s16_t i = 0;
800d772: 2300 movs r3, #0
800d774: 843b strh r3, [r7, #32]
/* oldest entry with packets on queue */
s16_t old_queue = ARP_TABLE_SIZE;
800d776: 230a movs r3, #10
800d778: 83fb strh r3, [r7, #30]
/* its age */
u16_t age_queue = 0, age_pending = 0, age_stable = 0;
800d77a: 2300 movs r3, #0
800d77c: 83bb strh r3, [r7, #28]
800d77e: 2300 movs r3, #0
800d780: 837b strh r3, [r7, #26]
800d782: 2300 movs r3, #0
800d784: 833b strh r3, [r7, #24]
* 4) remember the oldest pending entry with queued packets (if any)
* 5) search for a matching IP entry, either pending or stable
* until 5 matches, or all entries are searched for.
*/
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800d786: 2300 movs r3, #0
800d788: 843b strh r3, [r7, #32]
800d78a: e0ae b.n 800d8ea <etharp_find_entry+0x192>
u8_t state = arp_table[i].state;
800d78c: f9b7 2020 ldrsh.w r2, [r7, #32]
800d790: 49a6 ldr r1, [pc, #664] ; (800da2c <etharp_find_entry+0x2d4>)
800d792: 4613 mov r3, r2
800d794: 005b lsls r3, r3, #1
800d796: 4413 add r3, r2
800d798: 00db lsls r3, r3, #3
800d79a: 440b add r3, r1
800d79c: 3314 adds r3, #20
800d79e: 781b ldrb r3, [r3, #0]
800d7a0: 75fb strb r3, [r7, #23]
/* no empty entry found yet and now we do find one? */
if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) {
800d7a2: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
800d7a6: 2b0a cmp r3, #10
800d7a8: d105 bne.n 800d7b6 <etharp_find_entry+0x5e>
800d7aa: 7dfb ldrb r3, [r7, #23]
800d7ac: 2b00 cmp r3, #0
800d7ae: d102 bne.n 800d7b6 <etharp_find_entry+0x5e>
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i));
/* remember first empty entry */
empty = i;
800d7b0: 8c3b ldrh r3, [r7, #32]
800d7b2: 847b strh r3, [r7, #34] ; 0x22
800d7b4: e095 b.n 800d8e2 <etharp_find_entry+0x18a>
} else if (state != ETHARP_STATE_EMPTY) {
800d7b6: 7dfb ldrb r3, [r7, #23]
800d7b8: 2b00 cmp r3, #0
800d7ba: f000 8092 beq.w 800d8e2 <etharp_find_entry+0x18a>
LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE",
800d7be: 7dfb ldrb r3, [r7, #23]
800d7c0: 2b01 cmp r3, #1
800d7c2: d009 beq.n 800d7d8 <etharp_find_entry+0x80>
800d7c4: 7dfb ldrb r3, [r7, #23]
800d7c6: 2b01 cmp r3, #1
800d7c8: d806 bhi.n 800d7d8 <etharp_find_entry+0x80>
800d7ca: 4b99 ldr r3, [pc, #612] ; (800da30 <etharp_find_entry+0x2d8>)
800d7cc: f240 1223 movw r2, #291 ; 0x123
800d7d0: 4998 ldr r1, [pc, #608] ; (800da34 <etharp_find_entry+0x2dc>)
800d7d2: 4899 ldr r0, [pc, #612] ; (800da38 <etharp_find_entry+0x2e0>)
800d7d4: f002 fb70 bl 800feb8 <printf>
state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE);
/* if given, does IP address match IP address in ARP entry? */
if (ipaddr && ip4_addr_cmp(ipaddr, &arp_table[i].ipaddr)
800d7d8: 68fb ldr r3, [r7, #12]
800d7da: 2b00 cmp r3, #0
800d7dc: d020 beq.n 800d820 <etharp_find_entry+0xc8>
800d7de: 68fb ldr r3, [r7, #12]
800d7e0: 6819 ldr r1, [r3, #0]
800d7e2: f9b7 2020 ldrsh.w r2, [r7, #32]
800d7e6: 4891 ldr r0, [pc, #580] ; (800da2c <etharp_find_entry+0x2d4>)
800d7e8: 4613 mov r3, r2
800d7ea: 005b lsls r3, r3, #1
800d7ec: 4413 add r3, r2
800d7ee: 00db lsls r3, r3, #3
800d7f0: 4403 add r3, r0
800d7f2: 3304 adds r3, #4
800d7f4: 681b ldr r3, [r3, #0]
800d7f6: 4299 cmp r1, r3
800d7f8: d112 bne.n 800d820 <etharp_find_entry+0xc8>
#if ETHARP_TABLE_MATCH_NETIF
&& ((netif == NULL) || (netif == arp_table[i].netif))
800d7fa: 687b ldr r3, [r7, #4]
800d7fc: 2b00 cmp r3, #0
800d7fe: d00c beq.n 800d81a <etharp_find_entry+0xc2>
800d800: f9b7 2020 ldrsh.w r2, [r7, #32]
800d804: 4989 ldr r1, [pc, #548] ; (800da2c <etharp_find_entry+0x2d4>)
800d806: 4613 mov r3, r2
800d808: 005b lsls r3, r3, #1
800d80a: 4413 add r3, r2
800d80c: 00db lsls r3, r3, #3
800d80e: 440b add r3, r1
800d810: 3308 adds r3, #8
800d812: 681b ldr r3, [r3, #0]
800d814: 687a ldr r2, [r7, #4]
800d816: 429a cmp r2, r3
800d818: d102 bne.n 800d820 <etharp_find_entry+0xc8>
#endif /* ETHARP_TABLE_MATCH_NETIF */
) {
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %d\n", (int)i));
/* found exact IP address match, simply bail out */
return i;
800d81a: f9b7 3020 ldrsh.w r3, [r7, #32]
800d81e: e100 b.n 800da22 <etharp_find_entry+0x2ca>
}
/* pending entry? */
if (state == ETHARP_STATE_PENDING) {
800d820: 7dfb ldrb r3, [r7, #23]
800d822: 2b01 cmp r3, #1
800d824: d140 bne.n 800d8a8 <etharp_find_entry+0x150>
/* pending with queued packets? */
if (arp_table[i].q != NULL) {
800d826: f9b7 2020 ldrsh.w r2, [r7, #32]
800d82a: 4980 ldr r1, [pc, #512] ; (800da2c <etharp_find_entry+0x2d4>)
800d82c: 4613 mov r3, r2
800d82e: 005b lsls r3, r3, #1
800d830: 4413 add r3, r2
800d832: 00db lsls r3, r3, #3
800d834: 440b add r3, r1
800d836: 681b ldr r3, [r3, #0]
800d838: 2b00 cmp r3, #0
800d83a: d01a beq.n 800d872 <etharp_find_entry+0x11a>
if (arp_table[i].ctime >= age_queue) {
800d83c: f9b7 2020 ldrsh.w r2, [r7, #32]
800d840: 497a ldr r1, [pc, #488] ; (800da2c <etharp_find_entry+0x2d4>)
800d842: 4613 mov r3, r2
800d844: 005b lsls r3, r3, #1
800d846: 4413 add r3, r2
800d848: 00db lsls r3, r3, #3
800d84a: 440b add r3, r1
800d84c: 3312 adds r3, #18
800d84e: 881b ldrh r3, [r3, #0]
800d850: 8bba ldrh r2, [r7, #28]
800d852: 429a cmp r2, r3
800d854: d845 bhi.n 800d8e2 <etharp_find_entry+0x18a>
old_queue = i;
800d856: 8c3b ldrh r3, [r7, #32]
800d858: 83fb strh r3, [r7, #30]
age_queue = arp_table[i].ctime;
800d85a: f9b7 2020 ldrsh.w r2, [r7, #32]
800d85e: 4973 ldr r1, [pc, #460] ; (800da2c <etharp_find_entry+0x2d4>)
800d860: 4613 mov r3, r2
800d862: 005b lsls r3, r3, #1
800d864: 4413 add r3, r2
800d866: 00db lsls r3, r3, #3
800d868: 440b add r3, r1
800d86a: 3312 adds r3, #18
800d86c: 881b ldrh r3, [r3, #0]
800d86e: 83bb strh r3, [r7, #28]
800d870: e037 b.n 800d8e2 <etharp_find_entry+0x18a>
}
} else
/* pending without queued packets? */
{
if (arp_table[i].ctime >= age_pending) {
800d872: f9b7 2020 ldrsh.w r2, [r7, #32]
800d876: 496d ldr r1, [pc, #436] ; (800da2c <etharp_find_entry+0x2d4>)
800d878: 4613 mov r3, r2
800d87a: 005b lsls r3, r3, #1
800d87c: 4413 add r3, r2
800d87e: 00db lsls r3, r3, #3
800d880: 440b add r3, r1
800d882: 3312 adds r3, #18
800d884: 881b ldrh r3, [r3, #0]
800d886: 8b7a ldrh r2, [r7, #26]
800d888: 429a cmp r2, r3
800d88a: d82a bhi.n 800d8e2 <etharp_find_entry+0x18a>
old_pending = i;
800d88c: 8c3b ldrh r3, [r7, #32]
800d88e: 84fb strh r3, [r7, #38] ; 0x26
age_pending = arp_table[i].ctime;
800d890: f9b7 2020 ldrsh.w r2, [r7, #32]
800d894: 4965 ldr r1, [pc, #404] ; (800da2c <etharp_find_entry+0x2d4>)
800d896: 4613 mov r3, r2
800d898: 005b lsls r3, r3, #1
800d89a: 4413 add r3, r2
800d89c: 00db lsls r3, r3, #3
800d89e: 440b add r3, r1
800d8a0: 3312 adds r3, #18
800d8a2: 881b ldrh r3, [r3, #0]
800d8a4: 837b strh r3, [r7, #26]
800d8a6: e01c b.n 800d8e2 <etharp_find_entry+0x18a>
}
}
/* stable entry? */
} else if (state >= ETHARP_STATE_STABLE) {
800d8a8: 7dfb ldrb r3, [r7, #23]
800d8aa: 2b01 cmp r3, #1
800d8ac: d919 bls.n 800d8e2 <etharp_find_entry+0x18a>
/* don't record old_stable for static entries since they never expire */
if (state < ETHARP_STATE_STATIC)
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
{
/* remember entry with oldest stable entry in oldest, its age in maxtime */
if (arp_table[i].ctime >= age_stable) {
800d8ae: f9b7 2020 ldrsh.w r2, [r7, #32]
800d8b2: 495e ldr r1, [pc, #376] ; (800da2c <etharp_find_entry+0x2d4>)
800d8b4: 4613 mov r3, r2
800d8b6: 005b lsls r3, r3, #1
800d8b8: 4413 add r3, r2
800d8ba: 00db lsls r3, r3, #3
800d8bc: 440b add r3, r1
800d8be: 3312 adds r3, #18
800d8c0: 881b ldrh r3, [r3, #0]
800d8c2: 8b3a ldrh r2, [r7, #24]
800d8c4: 429a cmp r2, r3
800d8c6: d80c bhi.n 800d8e2 <etharp_find_entry+0x18a>
old_stable = i;
800d8c8: 8c3b ldrh r3, [r7, #32]
800d8ca: 84bb strh r3, [r7, #36] ; 0x24
age_stable = arp_table[i].ctime;
800d8cc: f9b7 2020 ldrsh.w r2, [r7, #32]
800d8d0: 4956 ldr r1, [pc, #344] ; (800da2c <etharp_find_entry+0x2d4>)
800d8d2: 4613 mov r3, r2
800d8d4: 005b lsls r3, r3, #1
800d8d6: 4413 add r3, r2
800d8d8: 00db lsls r3, r3, #3
800d8da: 440b add r3, r1
800d8dc: 3312 adds r3, #18
800d8de: 881b ldrh r3, [r3, #0]
800d8e0: 833b strh r3, [r7, #24]
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800d8e2: 8c3b ldrh r3, [r7, #32]
800d8e4: 3301 adds r3, #1
800d8e6: b29b uxth r3, r3
800d8e8: 843b strh r3, [r7, #32]
800d8ea: f9b7 3020 ldrsh.w r3, [r7, #32]
800d8ee: 2b09 cmp r3, #9
800d8f0: f77f af4c ble.w 800d78c <etharp_find_entry+0x34>
}
}
/* { we have no match } => try to create a new entry */
/* don't create new entry, only search? */
if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) ||
800d8f4: 7afb ldrb r3, [r7, #11]
800d8f6: f003 0302 and.w r3, r3, #2
800d8fa: 2b00 cmp r3, #0
800d8fc: d108 bne.n 800d910 <etharp_find_entry+0x1b8>
800d8fe: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
800d902: 2b0a cmp r3, #10
800d904: d107 bne.n 800d916 <etharp_find_entry+0x1be>
/* or no empty entry found and not allowed to recycle? */
((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) {
800d906: 7afb ldrb r3, [r7, #11]
800d908: f003 0301 and.w r3, r3, #1
800d90c: 2b00 cmp r3, #0
800d90e: d102 bne.n 800d916 <etharp_find_entry+0x1be>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty entry found and not allowed to recycle\n"));
return (s16_t)ERR_MEM;
800d910: f04f 33ff mov.w r3, #4294967295
800d914: e085 b.n 800da22 <etharp_find_entry+0x2ca>
*
* { ETHARP_FLAG_TRY_HARD is set at this point }
*/
/* 1) empty entry available? */
if (empty < ARP_TABLE_SIZE) {
800d916: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
800d91a: 2b09 cmp r3, #9
800d91c: dc02 bgt.n 800d924 <etharp_find_entry+0x1cc>
i = empty;
800d91e: 8c7b ldrh r3, [r7, #34] ; 0x22
800d920: 843b strh r3, [r7, #32]
800d922: e039 b.n 800d998 <etharp_find_entry+0x240>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %d\n", (int)i));
} else {
/* 2) found recyclable stable entry? */
if (old_stable < ARP_TABLE_SIZE) {
800d924: f9b7 3024 ldrsh.w r3, [r7, #36] ; 0x24
800d928: 2b09 cmp r3, #9
800d92a: dc14 bgt.n 800d956 <etharp_find_entry+0x1fe>
/* recycle oldest stable*/
i = old_stable;
800d92c: 8cbb ldrh r3, [r7, #36] ; 0x24
800d92e: 843b strh r3, [r7, #32]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %d\n", (int)i));
/* no queued packets should exist on stable entries */
LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL);
800d930: f9b7 2020 ldrsh.w r2, [r7, #32]
800d934: 493d ldr r1, [pc, #244] ; (800da2c <etharp_find_entry+0x2d4>)
800d936: 4613 mov r3, r2
800d938: 005b lsls r3, r3, #1
800d93a: 4413 add r3, r2
800d93c: 00db lsls r3, r3, #3
800d93e: 440b add r3, r1
800d940: 681b ldr r3, [r3, #0]
800d942: 2b00 cmp r3, #0
800d944: d018 beq.n 800d978 <etharp_find_entry+0x220>
800d946: 4b3a ldr r3, [pc, #232] ; (800da30 <etharp_find_entry+0x2d8>)
800d948: f240 126d movw r2, #365 ; 0x16d
800d94c: 493b ldr r1, [pc, #236] ; (800da3c <etharp_find_entry+0x2e4>)
800d94e: 483a ldr r0, [pc, #232] ; (800da38 <etharp_find_entry+0x2e0>)
800d950: f002 fab2 bl 800feb8 <printf>
800d954: e010 b.n 800d978 <etharp_find_entry+0x220>
/* 3) found recyclable pending entry without queued packets? */
} else if (old_pending < ARP_TABLE_SIZE) {
800d956: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26
800d95a: 2b09 cmp r3, #9
800d95c: dc02 bgt.n 800d964 <etharp_find_entry+0x20c>
/* recycle oldest pending */
i = old_pending;
800d95e: 8cfb ldrh r3, [r7, #38] ; 0x26
800d960: 843b strh r3, [r7, #32]
800d962: e009 b.n 800d978 <etharp_find_entry+0x220>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %d (without queue)\n", (int)i));
/* 4) found recyclable pending entry with queued packets? */
} else if (old_queue < ARP_TABLE_SIZE) {
800d964: f9b7 301e ldrsh.w r3, [r7, #30]
800d968: 2b09 cmp r3, #9
800d96a: dc02 bgt.n 800d972 <etharp_find_entry+0x21a>
/* recycle oldest pending (queued packets are free in etharp_free_entry) */
i = old_queue;
800d96c: 8bfb ldrh r3, [r7, #30]
800d96e: 843b strh r3, [r7, #32]
800d970: e002 b.n 800d978 <etharp_find_entry+0x220>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %d, freeing packet queue %p\n", (int)i, (void *)(arp_table[i].q)));
/* no empty or recyclable entries found */
} else {
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty or recyclable entries found\n"));
return (s16_t)ERR_MEM;
800d972: f04f 33ff mov.w r3, #4294967295
800d976: e054 b.n 800da22 <etharp_find_entry+0x2ca>
}
/* { empty or recyclable entry found } */
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
800d978: f9b7 3020 ldrsh.w r3, [r7, #32]
800d97c: 2b09 cmp r3, #9
800d97e: dd06 ble.n 800d98e <etharp_find_entry+0x236>
800d980: 4b2b ldr r3, [pc, #172] ; (800da30 <etharp_find_entry+0x2d8>)
800d982: f240 127f movw r2, #383 ; 0x17f
800d986: 492e ldr r1, [pc, #184] ; (800da40 <etharp_find_entry+0x2e8>)
800d988: 482b ldr r0, [pc, #172] ; (800da38 <etharp_find_entry+0x2e0>)
800d98a: f002 fa95 bl 800feb8 <printf>
etharp_free_entry(i);
800d98e: f9b7 3020 ldrsh.w r3, [r7, #32]
800d992: 4618 mov r0, r3
800d994: f7ff fe06 bl 800d5a4 <etharp_free_entry>
}
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
800d998: f9b7 3020 ldrsh.w r3, [r7, #32]
800d99c: 2b09 cmp r3, #9
800d99e: dd06 ble.n 800d9ae <etharp_find_entry+0x256>
800d9a0: 4b23 ldr r3, [pc, #140] ; (800da30 <etharp_find_entry+0x2d8>)
800d9a2: f240 1283 movw r2, #387 ; 0x183
800d9a6: 4926 ldr r1, [pc, #152] ; (800da40 <etharp_find_entry+0x2e8>)
800d9a8: 4823 ldr r0, [pc, #140] ; (800da38 <etharp_find_entry+0x2e0>)
800d9aa: f002 fa85 bl 800feb8 <printf>
LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY",
800d9ae: f9b7 2020 ldrsh.w r2, [r7, #32]
800d9b2: 491e ldr r1, [pc, #120] ; (800da2c <etharp_find_entry+0x2d4>)
800d9b4: 4613 mov r3, r2
800d9b6: 005b lsls r3, r3, #1
800d9b8: 4413 add r3, r2
800d9ba: 00db lsls r3, r3, #3
800d9bc: 440b add r3, r1
800d9be: 3314 adds r3, #20
800d9c0: 781b ldrb r3, [r3, #0]
800d9c2: 2b00 cmp r3, #0
800d9c4: d006 beq.n 800d9d4 <etharp_find_entry+0x27c>
800d9c6: 4b1a ldr r3, [pc, #104] ; (800da30 <etharp_find_entry+0x2d8>)
800d9c8: f44f 72c2 mov.w r2, #388 ; 0x184
800d9cc: 491d ldr r1, [pc, #116] ; (800da44 <etharp_find_entry+0x2ec>)
800d9ce: 481a ldr r0, [pc, #104] ; (800da38 <etharp_find_entry+0x2e0>)
800d9d0: f002 fa72 bl 800feb8 <printf>
arp_table[i].state == ETHARP_STATE_EMPTY);
/* IP address given? */
if (ipaddr != NULL) {
800d9d4: 68fb ldr r3, [r7, #12]
800d9d6: 2b00 cmp r3, #0
800d9d8: d00b beq.n 800d9f2 <etharp_find_entry+0x29a>
/* set IP address */
ip4_addr_copy(arp_table[i].ipaddr, *ipaddr);
800d9da: f9b7 2020 ldrsh.w r2, [r7, #32]
800d9de: 68fb ldr r3, [r7, #12]
800d9e0: 6819 ldr r1, [r3, #0]
800d9e2: 4812 ldr r0, [pc, #72] ; (800da2c <etharp_find_entry+0x2d4>)
800d9e4: 4613 mov r3, r2
800d9e6: 005b lsls r3, r3, #1
800d9e8: 4413 add r3, r2
800d9ea: 00db lsls r3, r3, #3
800d9ec: 4403 add r3, r0
800d9ee: 3304 adds r3, #4
800d9f0: 6019 str r1, [r3, #0]
}
arp_table[i].ctime = 0;
800d9f2: f9b7 2020 ldrsh.w r2, [r7, #32]
800d9f6: 490d ldr r1, [pc, #52] ; (800da2c <etharp_find_entry+0x2d4>)
800d9f8: 4613 mov r3, r2
800d9fa: 005b lsls r3, r3, #1
800d9fc: 4413 add r3, r2
800d9fe: 00db lsls r3, r3, #3
800da00: 440b add r3, r1
800da02: 3312 adds r3, #18
800da04: 2200 movs r2, #0
800da06: 801a strh r2, [r3, #0]
#if ETHARP_TABLE_MATCH_NETIF
arp_table[i].netif = netif;
800da08: f9b7 2020 ldrsh.w r2, [r7, #32]
800da0c: 4907 ldr r1, [pc, #28] ; (800da2c <etharp_find_entry+0x2d4>)
800da0e: 4613 mov r3, r2
800da10: 005b lsls r3, r3, #1
800da12: 4413 add r3, r2
800da14: 00db lsls r3, r3, #3
800da16: 440b add r3, r1
800da18: 3308 adds r3, #8
800da1a: 687a ldr r2, [r7, #4]
800da1c: 601a str r2, [r3, #0]
#endif /* ETHARP_TABLE_MATCH_NETIF */
return (s16_t)i;
800da1e: f9b7 3020 ldrsh.w r3, [r7, #32]
}
800da22: 4618 mov r0, r3
800da24: 3728 adds r7, #40 ; 0x28
800da26: 46bd mov sp, r7
800da28: bd80 pop {r7, pc}
800da2a: bf00 nop
800da2c: 20008c40 .word 0x20008c40
800da30: 08017094 .word 0x08017094
800da34: 080170cc .word 0x080170cc
800da38: 0801710c .word 0x0801710c
800da3c: 08017134 .word 0x08017134
800da40: 0801714c .word 0x0801714c
800da44: 08017160 .word 0x08017160
0800da48 <etharp_update_arp_entry>:
*
* @see pbuf_free()
*/
static err_t
etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, u8_t flags)
{
800da48: b580 push {r7, lr}
800da4a: b088 sub sp, #32
800da4c: af02 add r7, sp, #8
800da4e: 60f8 str r0, [r7, #12]
800da50: 60b9 str r1, [r7, #8]
800da52: 607a str r2, [r7, #4]
800da54: 70fb strb r3, [r7, #3]
s16_t i;
LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN);
800da56: 68fb ldr r3, [r7, #12]
800da58: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
800da5c: 2b06 cmp r3, #6
800da5e: d006 beq.n 800da6e <etharp_update_arp_entry+0x26>
800da60: 4b48 ldr r3, [pc, #288] ; (800db84 <etharp_update_arp_entry+0x13c>)
800da62: f240 12a9 movw r2, #425 ; 0x1a9
800da66: 4948 ldr r1, [pc, #288] ; (800db88 <etharp_update_arp_entry+0x140>)
800da68: 4848 ldr r0, [pc, #288] ; (800db8c <etharp_update_arp_entry+0x144>)
800da6a: f002 fa25 bl 800feb8 <printf>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n",
ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr),
(u16_t)ethaddr->addr[0], (u16_t)ethaddr->addr[1], (u16_t)ethaddr->addr[2],
(u16_t)ethaddr->addr[3], (u16_t)ethaddr->addr[4], (u16_t)ethaddr->addr[5]));
/* non-unicast address? */
if (ip4_addr_isany(ipaddr) ||
800da6e: 68bb ldr r3, [r7, #8]
800da70: 2b00 cmp r3, #0
800da72: d012 beq.n 800da9a <etharp_update_arp_entry+0x52>
800da74: 68bb ldr r3, [r7, #8]
800da76: 681b ldr r3, [r3, #0]
800da78: 2b00 cmp r3, #0
800da7a: d00e beq.n 800da9a <etharp_update_arp_entry+0x52>
ip4_addr_isbroadcast(ipaddr, netif) ||
800da7c: 68bb ldr r3, [r7, #8]
800da7e: 681b ldr r3, [r3, #0]
800da80: 68f9 ldr r1, [r7, #12]
800da82: 4618 mov r0, r3
800da84: f001 f920 bl 800ecc8 <ip4_addr_isbroadcast_u32>
800da88: 4603 mov r3, r0
if (ip4_addr_isany(ipaddr) ||
800da8a: 2b00 cmp r3, #0
800da8c: d105 bne.n 800da9a <etharp_update_arp_entry+0x52>
ip4_addr_ismulticast(ipaddr)) {
800da8e: 68bb ldr r3, [r7, #8]
800da90: 681b ldr r3, [r3, #0]
800da92: f003 03f0 and.w r3, r3, #240 ; 0xf0
ip4_addr_isbroadcast(ipaddr, netif) ||
800da96: 2be0 cmp r3, #224 ; 0xe0
800da98: d102 bne.n 800daa0 <etharp_update_arp_entry+0x58>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: will not add non-unicast IP address to ARP cache\n"));
return ERR_ARG;
800da9a: f06f 030f mvn.w r3, #15
800da9e: e06c b.n 800db7a <etharp_update_arp_entry+0x132>
}
/* find or create ARP entry */
i = etharp_find_entry(ipaddr, flags, netif);
800daa0: 78fb ldrb r3, [r7, #3]
800daa2: 68fa ldr r2, [r7, #12]
800daa4: 4619 mov r1, r3
800daa6: 68b8 ldr r0, [r7, #8]
800daa8: f7ff fe56 bl 800d758 <etharp_find_entry>
800daac: 4603 mov r3, r0
800daae: 82fb strh r3, [r7, #22]
/* bail out if no entry could be found */
if (i < 0) {
800dab0: f9b7 3016 ldrsh.w r3, [r7, #22]
800dab4: 2b00 cmp r3, #0
800dab6: da02 bge.n 800dabe <etharp_update_arp_entry+0x76>
return (err_t)i;
800dab8: 8afb ldrh r3, [r7, #22]
800daba: b25b sxtb r3, r3
800dabc: e05d b.n 800db7a <etharp_update_arp_entry+0x132>
return ERR_VAL;
} else
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
{
/* mark it stable */
arp_table[i].state = ETHARP_STATE_STABLE;
800dabe: f9b7 2016 ldrsh.w r2, [r7, #22]
800dac2: 4933 ldr r1, [pc, #204] ; (800db90 <etharp_update_arp_entry+0x148>)
800dac4: 4613 mov r3, r2
800dac6: 005b lsls r3, r3, #1
800dac8: 4413 add r3, r2
800daca: 00db lsls r3, r3, #3
800dacc: 440b add r3, r1
800dace: 3314 adds r3, #20
800dad0: 2202 movs r2, #2
800dad2: 701a strb r2, [r3, #0]
}
/* record network interface */
arp_table[i].netif = netif;
800dad4: f9b7 2016 ldrsh.w r2, [r7, #22]
800dad8: 492d ldr r1, [pc, #180] ; (800db90 <etharp_update_arp_entry+0x148>)
800dada: 4613 mov r3, r2
800dadc: 005b lsls r3, r3, #1
800dade: 4413 add r3, r2
800dae0: 00db lsls r3, r3, #3
800dae2: 440b add r3, r1
800dae4: 3308 adds r3, #8
800dae6: 68fa ldr r2, [r7, #12]
800dae8: 601a str r2, [r3, #0]
/* insert in SNMP ARP index tree */
mib2_add_arp_entry(netif, &arp_table[i].ipaddr);
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: updating stable entry %"S16_F"\n", i));
/* update address */
SMEMCPY(&arp_table[i].ethaddr, ethaddr, ETH_HWADDR_LEN);
800daea: f9b7 2016 ldrsh.w r2, [r7, #22]
800daee: 4613 mov r3, r2
800daf0: 005b lsls r3, r3, #1
800daf2: 4413 add r3, r2
800daf4: 00db lsls r3, r3, #3
800daf6: 3308 adds r3, #8
800daf8: 4a25 ldr r2, [pc, #148] ; (800db90 <etharp_update_arp_entry+0x148>)
800dafa: 4413 add r3, r2
800dafc: 3304 adds r3, #4
800dafe: 2206 movs r2, #6
800db00: 6879 ldr r1, [r7, #4]
800db02: 4618 mov r0, r3
800db04: f002 f9a8 bl 800fe58 <memcpy>
/* reset time stamp */
arp_table[i].ctime = 0;
800db08: f9b7 2016 ldrsh.w r2, [r7, #22]
800db0c: 4920 ldr r1, [pc, #128] ; (800db90 <etharp_update_arp_entry+0x148>)
800db0e: 4613 mov r3, r2
800db10: 005b lsls r3, r3, #1
800db12: 4413 add r3, r2
800db14: 00db lsls r3, r3, #3
800db16: 440b add r3, r1
800db18: 3312 adds r3, #18
800db1a: 2200 movs r2, #0
800db1c: 801a strh r2, [r3, #0]
/* get the packet pointer */
p = q->p;
/* now queue entry can be freed */
memp_free(MEMP_ARP_QUEUE, q);
#else /* ARP_QUEUEING */
if (arp_table[i].q != NULL) {
800db1e: f9b7 2016 ldrsh.w r2, [r7, #22]
800db22: 491b ldr r1, [pc, #108] ; (800db90 <etharp_update_arp_entry+0x148>)
800db24: 4613 mov r3, r2
800db26: 005b lsls r3, r3, #1
800db28: 4413 add r3, r2
800db2a: 00db lsls r3, r3, #3
800db2c: 440b add r3, r1
800db2e: 681b ldr r3, [r3, #0]
800db30: 2b00 cmp r3, #0
800db32: d021 beq.n 800db78 <etharp_update_arp_entry+0x130>
struct pbuf *p = arp_table[i].q;
800db34: f9b7 2016 ldrsh.w r2, [r7, #22]
800db38: 4915 ldr r1, [pc, #84] ; (800db90 <etharp_update_arp_entry+0x148>)
800db3a: 4613 mov r3, r2
800db3c: 005b lsls r3, r3, #1
800db3e: 4413 add r3, r2
800db40: 00db lsls r3, r3, #3
800db42: 440b add r3, r1
800db44: 681b ldr r3, [r3, #0]
800db46: 613b str r3, [r7, #16]
arp_table[i].q = NULL;
800db48: f9b7 2016 ldrsh.w r2, [r7, #22]
800db4c: 4910 ldr r1, [pc, #64] ; (800db90 <etharp_update_arp_entry+0x148>)
800db4e: 4613 mov r3, r2
800db50: 005b lsls r3, r3, #1
800db52: 4413 add r3, r2
800db54: 00db lsls r3, r3, #3
800db56: 440b add r3, r1
800db58: 2200 movs r2, #0
800db5a: 601a str r2, [r3, #0]
#endif /* ARP_QUEUEING */
/* send the queued IP packet */
ethernet_output(netif, p, (struct eth_addr *)(netif->hwaddr), ethaddr, ETHTYPE_IP);
800db5c: 68fb ldr r3, [r7, #12]
800db5e: f103 022a add.w r2, r3, #42 ; 0x2a
800db62: f44f 6300 mov.w r3, #2048 ; 0x800
800db66: 9300 str r3, [sp, #0]
800db68: 687b ldr r3, [r7, #4]
800db6a: 6939 ldr r1, [r7, #16]
800db6c: 68f8 ldr r0, [r7, #12]
800db6e: f002 f8f7 bl 800fd60 <ethernet_output>
/* free the queued IP packet */
pbuf_free(p);
800db72: 6938 ldr r0, [r7, #16]
800db74: f7f7 fc84 bl 8005480 <pbuf_free>
}
return ERR_OK;
800db78: 2300 movs r3, #0
}
800db7a: 4618 mov r0, r3
800db7c: 3718 adds r7, #24
800db7e: 46bd mov sp, r7
800db80: bd80 pop {r7, pc}
800db82: bf00 nop
800db84: 08017094 .word 0x08017094
800db88: 0801718c .word 0x0801718c
800db8c: 0801710c .word 0x0801710c
800db90: 20008c40 .word 0x20008c40
0800db94 <etharp_cleanup_netif>:
*
* @param netif points to a network interface
*/
void
etharp_cleanup_netif(struct netif *netif)
{
800db94: b580 push {r7, lr}
800db96: b084 sub sp, #16
800db98: af00 add r7, sp, #0
800db9a: 6078 str r0, [r7, #4]
int i;
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800db9c: 2300 movs r3, #0
800db9e: 60fb str r3, [r7, #12]
800dba0: e01e b.n 800dbe0 <etharp_cleanup_netif+0x4c>
u8_t state = arp_table[i].state;
800dba2: 4913 ldr r1, [pc, #76] ; (800dbf0 <etharp_cleanup_netif+0x5c>)
800dba4: 68fa ldr r2, [r7, #12]
800dba6: 4613 mov r3, r2
800dba8: 005b lsls r3, r3, #1
800dbaa: 4413 add r3, r2
800dbac: 00db lsls r3, r3, #3
800dbae: 440b add r3, r1
800dbb0: 3314 adds r3, #20
800dbb2: 781b ldrb r3, [r3, #0]
800dbb4: 72fb strb r3, [r7, #11]
if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) {
800dbb6: 7afb ldrb r3, [r7, #11]
800dbb8: 2b00 cmp r3, #0
800dbba: d00e beq.n 800dbda <etharp_cleanup_netif+0x46>
800dbbc: 490c ldr r1, [pc, #48] ; (800dbf0 <etharp_cleanup_netif+0x5c>)
800dbbe: 68fa ldr r2, [r7, #12]
800dbc0: 4613 mov r3, r2
800dbc2: 005b lsls r3, r3, #1
800dbc4: 4413 add r3, r2
800dbc6: 00db lsls r3, r3, #3
800dbc8: 440b add r3, r1
800dbca: 3308 adds r3, #8
800dbcc: 681b ldr r3, [r3, #0]
800dbce: 687a ldr r2, [r7, #4]
800dbd0: 429a cmp r2, r3
800dbd2: d102 bne.n 800dbda <etharp_cleanup_netif+0x46>
etharp_free_entry(i);
800dbd4: 68f8 ldr r0, [r7, #12]
800dbd6: f7ff fce5 bl 800d5a4 <etharp_free_entry>
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
800dbda: 68fb ldr r3, [r7, #12]
800dbdc: 3301 adds r3, #1
800dbde: 60fb str r3, [r7, #12]
800dbe0: 68fb ldr r3, [r7, #12]
800dbe2: 2b09 cmp r3, #9
800dbe4: dddd ble.n 800dba2 <etharp_cleanup_netif+0xe>
}
}
}
800dbe6: bf00 nop
800dbe8: bf00 nop
800dbea: 3710 adds r7, #16
800dbec: 46bd mov sp, r7
800dbee: bd80 pop {r7, pc}
800dbf0: 20008c40 .word 0x20008c40
0800dbf4 <etharp_input>:
*
* @see pbuf_free()
*/
void
etharp_input(struct pbuf *p, struct netif *netif)
{
800dbf4: b5b0 push {r4, r5, r7, lr}
800dbf6: b08a sub sp, #40 ; 0x28
800dbf8: af04 add r7, sp, #16
800dbfa: 6078 str r0, [r7, #4]
800dbfc: 6039 str r1, [r7, #0]
ip4_addr_t sipaddr, dipaddr;
u8_t for_us;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif != NULL", (netif != NULL), return;);
800dbfe: 683b ldr r3, [r7, #0]
800dc00: 2b00 cmp r3, #0
800dc02: d107 bne.n 800dc14 <etharp_input+0x20>
800dc04: 4b3f ldr r3, [pc, #252] ; (800dd04 <etharp_input+0x110>)
800dc06: f240 228a movw r2, #650 ; 0x28a
800dc0a: 493f ldr r1, [pc, #252] ; (800dd08 <etharp_input+0x114>)
800dc0c: 483f ldr r0, [pc, #252] ; (800dd0c <etharp_input+0x118>)
800dc0e: f002 f953 bl 800feb8 <printf>
800dc12: e074 b.n 800dcfe <etharp_input+0x10a>
hdr = (struct etharp_hdr *)p->payload;
800dc14: 687b ldr r3, [r7, #4]
800dc16: 685b ldr r3, [r3, #4]
800dc18: 613b str r3, [r7, #16]
/* RFC 826 "Packet Reception": */
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
800dc1a: 693b ldr r3, [r7, #16]
800dc1c: 881b ldrh r3, [r3, #0]
800dc1e: b29b uxth r3, r3
800dc20: f5b3 7f80 cmp.w r3, #256 ; 0x100
800dc24: d10c bne.n 800dc40 <etharp_input+0x4c>
(hdr->hwlen != ETH_HWADDR_LEN) ||
800dc26: 693b ldr r3, [r7, #16]
800dc28: 791b ldrb r3, [r3, #4]
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
800dc2a: 2b06 cmp r3, #6
800dc2c: d108 bne.n 800dc40 <etharp_input+0x4c>
(hdr->protolen != sizeof(ip4_addr_t)) ||
800dc2e: 693b ldr r3, [r7, #16]
800dc30: 795b ldrb r3, [r3, #5]
(hdr->hwlen != ETH_HWADDR_LEN) ||
800dc32: 2b04 cmp r3, #4
800dc34: d104 bne.n 800dc40 <etharp_input+0x4c>
(hdr->proto != PP_HTONS(ETHTYPE_IP))) {
800dc36: 693b ldr r3, [r7, #16]
800dc38: 885b ldrh r3, [r3, #2]
800dc3a: b29b uxth r3, r3
(hdr->protolen != sizeof(ip4_addr_t)) ||
800dc3c: 2b08 cmp r3, #8
800dc3e: d003 beq.n 800dc48 <etharp_input+0x54>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING,
("etharp_input: packet dropped, wrong hw type, hwlen, proto, protolen or ethernet type (%"U16_F"/%"U16_F"/%"U16_F"/%"U16_F")\n",
hdr->hwtype, (u16_t)hdr->hwlen, hdr->proto, (u16_t)hdr->protolen));
ETHARP_STATS_INC(etharp.proterr);
ETHARP_STATS_INC(etharp.drop);
pbuf_free(p);
800dc40: 6878 ldr r0, [r7, #4]
800dc42: f7f7 fc1d bl 8005480 <pbuf_free>
return;
800dc46: e05a b.n 800dcfe <etharp_input+0x10a>
autoip_arp_reply(netif, hdr);
#endif /* LWIP_AUTOIP */
/* Copy struct ip4_addr_wordaligned to aligned ip4_addr, to support compilers without
* structure packing (not using structure copy which breaks strict-aliasing rules). */
IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&sipaddr, &hdr->sipaddr);
800dc48: 693b ldr r3, [r7, #16]
800dc4a: 330e adds r3, #14
800dc4c: 681b ldr r3, [r3, #0]
800dc4e: 60fb str r3, [r7, #12]
IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr);
800dc50: 693b ldr r3, [r7, #16]
800dc52: 3318 adds r3, #24
800dc54: 681b ldr r3, [r3, #0]
800dc56: 60bb str r3, [r7, #8]
/* this interface is not configured? */
if (ip4_addr_isany_val(*netif_ip4_addr(netif))) {
800dc58: 683b ldr r3, [r7, #0]
800dc5a: 3304 adds r3, #4
800dc5c: 681b ldr r3, [r3, #0]
800dc5e: 2b00 cmp r3, #0
800dc60: d102 bne.n 800dc68 <etharp_input+0x74>
for_us = 0;
800dc62: 2300 movs r3, #0
800dc64: 75fb strb r3, [r7, #23]
800dc66: e009 b.n 800dc7c <etharp_input+0x88>
} else {
/* ARP packet directed to us? */
for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif));
800dc68: 68ba ldr r2, [r7, #8]
800dc6a: 683b ldr r3, [r7, #0]
800dc6c: 3304 adds r3, #4
800dc6e: 681b ldr r3, [r3, #0]
800dc70: 429a cmp r2, r3
800dc72: bf0c ite eq
800dc74: 2301 moveq r3, #1
800dc76: 2300 movne r3, #0
800dc78: b2db uxtb r3, r3
800dc7a: 75fb strb r3, [r7, #23]
/* ARP message directed to us?
-> add IP address in ARP cache; assume requester wants to talk to us,
can result in directly sending the queued packets for this host.
ARP message not directed to us?
-> update the source IP address in the cache, if present */
etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr),
800dc7c: 693b ldr r3, [r7, #16]
800dc7e: f103 0208 add.w r2, r3, #8
800dc82: 7dfb ldrb r3, [r7, #23]
800dc84: 2b00 cmp r3, #0
800dc86: d001 beq.n 800dc8c <etharp_input+0x98>
800dc88: 2301 movs r3, #1
800dc8a: e000 b.n 800dc8e <etharp_input+0x9a>
800dc8c: 2302 movs r3, #2
800dc8e: f107 010c add.w r1, r7, #12
800dc92: 6838 ldr r0, [r7, #0]
800dc94: f7ff fed8 bl 800da48 <etharp_update_arp_entry>
for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY);
/* now act on the message itself */
switch (hdr->opcode) {
800dc98: 693b ldr r3, [r7, #16]
800dc9a: 88db ldrh r3, [r3, #6]
800dc9c: b29b uxth r3, r3
800dc9e: f5b3 7f80 cmp.w r3, #256 ; 0x100
800dca2: d003 beq.n 800dcac <etharp_input+0xb8>
800dca4: f5b3 7f00 cmp.w r3, #512 ; 0x200
800dca8: d01e beq.n 800dce8 <etharp_input+0xf4>
#endif /* (LWIP_DHCP && DHCP_DOES_ARP_CHECK) */
break;
default:
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP unknown opcode type %"S16_F"\n", lwip_htons(hdr->opcode)));
ETHARP_STATS_INC(etharp.err);
break;
800dcaa: e025 b.n 800dcf8 <etharp_input+0x104>
if (for_us) {
800dcac: 7dfb ldrb r3, [r7, #23]
800dcae: 2b00 cmp r3, #0
800dcb0: d021 beq.n 800dcf6 <etharp_input+0x102>
(struct eth_addr *)netif->hwaddr, &hdr->shwaddr,
800dcb2: 683b ldr r3, [r7, #0]
800dcb4: f103 002a add.w r0, r3, #42 ; 0x2a
800dcb8: 693b ldr r3, [r7, #16]
800dcba: f103 0408 add.w r4, r3, #8
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif),
800dcbe: 683b ldr r3, [r7, #0]
800dcc0: f103 052a add.w r5, r3, #42 ; 0x2a
800dcc4: 683b ldr r3, [r7, #0]
800dcc6: 3304 adds r3, #4
&hdr->shwaddr, &sipaddr,
800dcc8: 693a ldr r2, [r7, #16]
800dcca: 3208 adds r2, #8
etharp_raw(netif,
800dccc: 2102 movs r1, #2
800dcce: 9103 str r1, [sp, #12]
800dcd0: f107 010c add.w r1, r7, #12
800dcd4: 9102 str r1, [sp, #8]
800dcd6: 9201 str r2, [sp, #4]
800dcd8: 9300 str r3, [sp, #0]
800dcda: 462b mov r3, r5
800dcdc: 4622 mov r2, r4
800dcde: 4601 mov r1, r0
800dce0: 6838 ldr r0, [r7, #0]
800dce2: f000 faef bl 800e2c4 <etharp_raw>
break;
800dce6: e006 b.n 800dcf6 <etharp_input+0x102>
dhcp_arp_reply(netif, &sipaddr);
800dce8: f107 030c add.w r3, r7, #12
800dcec: 4619 mov r1, r3
800dcee: 6838 ldr r0, [r7, #0]
800dcf0: f7fe f9fc bl 800c0ec <dhcp_arp_reply>
break;
800dcf4: e000 b.n 800dcf8 <etharp_input+0x104>
break;
800dcf6: bf00 nop
}
/* free ARP packet */
pbuf_free(p);
800dcf8: 6878 ldr r0, [r7, #4]
800dcfa: f7f7 fbc1 bl 8005480 <pbuf_free>
}
800dcfe: 3718 adds r7, #24
800dd00: 46bd mov sp, r7
800dd02: bdb0 pop {r4, r5, r7, pc}
800dd04: 08017094 .word 0x08017094
800dd08: 080171e4 .word 0x080171e4
800dd0c: 0801710c .word 0x0801710c
0800dd10 <etharp_output_to_arp_index>:
/** Just a small helper function that sends a pbuf to an ethernet address
* in the arp_table specified by the index 'arp_idx'.
*/
static err_t
etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, netif_addr_idx_t arp_idx)
{
800dd10: b580 push {r7, lr}
800dd12: b086 sub sp, #24
800dd14: af02 add r7, sp, #8
800dd16: 60f8 str r0, [r7, #12]
800dd18: 60b9 str r1, [r7, #8]
800dd1a: 4613 mov r3, r2
800dd1c: 71fb strb r3, [r7, #7]
LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE",
800dd1e: 79fa ldrb r2, [r7, #7]
800dd20: 4944 ldr r1, [pc, #272] ; (800de34 <etharp_output_to_arp_index+0x124>)
800dd22: 4613 mov r3, r2
800dd24: 005b lsls r3, r3, #1
800dd26: 4413 add r3, r2
800dd28: 00db lsls r3, r3, #3
800dd2a: 440b add r3, r1
800dd2c: 3314 adds r3, #20
800dd2e: 781b ldrb r3, [r3, #0]
800dd30: 2b01 cmp r3, #1
800dd32: d806 bhi.n 800dd42 <etharp_output_to_arp_index+0x32>
800dd34: 4b40 ldr r3, [pc, #256] ; (800de38 <etharp_output_to_arp_index+0x128>)
800dd36: f240 22ee movw r2, #750 ; 0x2ee
800dd3a: 4940 ldr r1, [pc, #256] ; (800de3c <etharp_output_to_arp_index+0x12c>)
800dd3c: 4840 ldr r0, [pc, #256] ; (800de40 <etharp_output_to_arp_index+0x130>)
800dd3e: f002 f8bb bl 800feb8 <printf>
arp_table[arp_idx].state >= ETHARP_STATE_STABLE);
/* if arp table entry is about to expire: re-request it,
but only if its state is ETHARP_STATE_STABLE to prevent flooding the
network with ARP requests if this address is used frequently. */
if (arp_table[arp_idx].state == ETHARP_STATE_STABLE) {
800dd42: 79fa ldrb r2, [r7, #7]
800dd44: 493b ldr r1, [pc, #236] ; (800de34 <etharp_output_to_arp_index+0x124>)
800dd46: 4613 mov r3, r2
800dd48: 005b lsls r3, r3, #1
800dd4a: 4413 add r3, r2
800dd4c: 00db lsls r3, r3, #3
800dd4e: 440b add r3, r1
800dd50: 3314 adds r3, #20
800dd52: 781b ldrb r3, [r3, #0]
800dd54: 2b02 cmp r3, #2
800dd56: d153 bne.n 800de00 <etharp_output_to_arp_index+0xf0>
if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) {
800dd58: 79fa ldrb r2, [r7, #7]
800dd5a: 4936 ldr r1, [pc, #216] ; (800de34 <etharp_output_to_arp_index+0x124>)
800dd5c: 4613 mov r3, r2
800dd5e: 005b lsls r3, r3, #1
800dd60: 4413 add r3, r2
800dd62: 00db lsls r3, r3, #3
800dd64: 440b add r3, r1
800dd66: 3312 adds r3, #18
800dd68: 881b ldrh r3, [r3, #0]
800dd6a: f5b3 7f8e cmp.w r3, #284 ; 0x11c
800dd6e: d919 bls.n 800dda4 <etharp_output_to_arp_index+0x94>
/* issue a standard request using broadcast */
if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) {
800dd70: 79fa ldrb r2, [r7, #7]
800dd72: 4613 mov r3, r2
800dd74: 005b lsls r3, r3, #1
800dd76: 4413 add r3, r2
800dd78: 00db lsls r3, r3, #3
800dd7a: 4a2e ldr r2, [pc, #184] ; (800de34 <etharp_output_to_arp_index+0x124>)
800dd7c: 4413 add r3, r2
800dd7e: 3304 adds r3, #4
800dd80: 4619 mov r1, r3
800dd82: 68f8 ldr r0, [r7, #12]
800dd84: f000 fb4c bl 800e420 <etharp_request>
800dd88: 4603 mov r3, r0
800dd8a: 2b00 cmp r3, #0
800dd8c: d138 bne.n 800de00 <etharp_output_to_arp_index+0xf0>
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
800dd8e: 79fa ldrb r2, [r7, #7]
800dd90: 4928 ldr r1, [pc, #160] ; (800de34 <etharp_output_to_arp_index+0x124>)
800dd92: 4613 mov r3, r2
800dd94: 005b lsls r3, r3, #1
800dd96: 4413 add r3, r2
800dd98: 00db lsls r3, r3, #3
800dd9a: 440b add r3, r1
800dd9c: 3314 adds r3, #20
800dd9e: 2203 movs r2, #3
800dda0: 701a strb r2, [r3, #0]
800dda2: e02d b.n 800de00 <etharp_output_to_arp_index+0xf0>
}
} else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) {
800dda4: 79fa ldrb r2, [r7, #7]
800dda6: 4923 ldr r1, [pc, #140] ; (800de34 <etharp_output_to_arp_index+0x124>)
800dda8: 4613 mov r3, r2
800ddaa: 005b lsls r3, r3, #1
800ddac: 4413 add r3, r2
800ddae: 00db lsls r3, r3, #3
800ddb0: 440b add r3, r1
800ddb2: 3312 adds r3, #18
800ddb4: 881b ldrh r3, [r3, #0]
800ddb6: f5b3 7f87 cmp.w r3, #270 ; 0x10e
800ddba: d321 bcc.n 800de00 <etharp_output_to_arp_index+0xf0>
/* issue a unicast request (for 15 seconds) to prevent unnecessary broadcast */
if (etharp_request_dst(netif, &arp_table[arp_idx].ipaddr, &arp_table[arp_idx].ethaddr) == ERR_OK) {
800ddbc: 79fa ldrb r2, [r7, #7]
800ddbe: 4613 mov r3, r2
800ddc0: 005b lsls r3, r3, #1
800ddc2: 4413 add r3, r2
800ddc4: 00db lsls r3, r3, #3
800ddc6: 4a1b ldr r2, [pc, #108] ; (800de34 <etharp_output_to_arp_index+0x124>)
800ddc8: 4413 add r3, r2
800ddca: 1d19 adds r1, r3, #4
800ddcc: 79fa ldrb r2, [r7, #7]
800ddce: 4613 mov r3, r2
800ddd0: 005b lsls r3, r3, #1
800ddd2: 4413 add r3, r2
800ddd4: 00db lsls r3, r3, #3
800ddd6: 3308 adds r3, #8
800ddd8: 4a16 ldr r2, [pc, #88] ; (800de34 <etharp_output_to_arp_index+0x124>)
800ddda: 4413 add r3, r2
800dddc: 3304 adds r3, #4
800ddde: 461a mov r2, r3
800dde0: 68f8 ldr r0, [r7, #12]
800dde2: f000 fafb bl 800e3dc <etharp_request_dst>
800dde6: 4603 mov r3, r0
800dde8: 2b00 cmp r3, #0
800ddea: d109 bne.n 800de00 <etharp_output_to_arp_index+0xf0>
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
800ddec: 79fa ldrb r2, [r7, #7]
800ddee: 4911 ldr r1, [pc, #68] ; (800de34 <etharp_output_to_arp_index+0x124>)
800ddf0: 4613 mov r3, r2
800ddf2: 005b lsls r3, r3, #1
800ddf4: 4413 add r3, r2
800ddf6: 00db lsls r3, r3, #3
800ddf8: 440b add r3, r1
800ddfa: 3314 adds r3, #20
800ddfc: 2203 movs r2, #3
800ddfe: 701a strb r2, [r3, #0]
}
}
}
return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP);
800de00: 68fb ldr r3, [r7, #12]
800de02: f103 012a add.w r1, r3, #42 ; 0x2a
800de06: 79fa ldrb r2, [r7, #7]
800de08: 4613 mov r3, r2
800de0a: 005b lsls r3, r3, #1
800de0c: 4413 add r3, r2
800de0e: 00db lsls r3, r3, #3
800de10: 3308 adds r3, #8
800de12: 4a08 ldr r2, [pc, #32] ; (800de34 <etharp_output_to_arp_index+0x124>)
800de14: 4413 add r3, r2
800de16: 3304 adds r3, #4
800de18: f44f 6200 mov.w r2, #2048 ; 0x800
800de1c: 9200 str r2, [sp, #0]
800de1e: 460a mov r2, r1
800de20: 68b9 ldr r1, [r7, #8]
800de22: 68f8 ldr r0, [r7, #12]
800de24: f001 ff9c bl 800fd60 <ethernet_output>
800de28: 4603 mov r3, r0
}
800de2a: 4618 mov r0, r3
800de2c: 3710 adds r7, #16
800de2e: 46bd mov sp, r7
800de30: bd80 pop {r7, pc}
800de32: bf00 nop
800de34: 20008c40 .word 0x20008c40
800de38: 08017094 .word 0x08017094
800de3c: 08017204 .word 0x08017204
800de40: 0801710c .word 0x0801710c
0800de44 <etharp_output>:
* - ERR_RTE No route to destination (no gateway to external networks),
* or the return type of either etharp_query() or ethernet_output().
*/
err_t
etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr)
{
800de44: b580 push {r7, lr}
800de46: b08a sub sp, #40 ; 0x28
800de48: af02 add r7, sp, #8
800de4a: 60f8 str r0, [r7, #12]
800de4c: 60b9 str r1, [r7, #8]
800de4e: 607a str r2, [r7, #4]
const struct eth_addr *dest;
struct eth_addr mcastaddr;
const ip4_addr_t *dst_addr = ipaddr;
800de50: 687b ldr r3, [r7, #4]
800de52: 61bb str r3, [r7, #24]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("netif != NULL", netif != NULL);
800de54: 68fb ldr r3, [r7, #12]
800de56: 2b00 cmp r3, #0
800de58: d106 bne.n 800de68 <etharp_output+0x24>
800de5a: 4b73 ldr r3, [pc, #460] ; (800e028 <etharp_output+0x1e4>)
800de5c: f240 321e movw r2, #798 ; 0x31e
800de60: 4972 ldr r1, [pc, #456] ; (800e02c <etharp_output+0x1e8>)
800de62: 4873 ldr r0, [pc, #460] ; (800e030 <etharp_output+0x1ec>)
800de64: f002 f828 bl 800feb8 <printf>
LWIP_ASSERT("q != NULL", q != NULL);
800de68: 68bb ldr r3, [r7, #8]
800de6a: 2b00 cmp r3, #0
800de6c: d106 bne.n 800de7c <etharp_output+0x38>
800de6e: 4b6e ldr r3, [pc, #440] ; (800e028 <etharp_output+0x1e4>)
800de70: f240 321f movw r2, #799 ; 0x31f
800de74: 496f ldr r1, [pc, #444] ; (800e034 <etharp_output+0x1f0>)
800de76: 486e ldr r0, [pc, #440] ; (800e030 <etharp_output+0x1ec>)
800de78: f002 f81e bl 800feb8 <printf>
LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL);
800de7c: 687b ldr r3, [r7, #4]
800de7e: 2b00 cmp r3, #0
800de80: d106 bne.n 800de90 <etharp_output+0x4c>
800de82: 4b69 ldr r3, [pc, #420] ; (800e028 <etharp_output+0x1e4>)
800de84: f44f 7248 mov.w r2, #800 ; 0x320
800de88: 496b ldr r1, [pc, #428] ; (800e038 <etharp_output+0x1f4>)
800de8a: 4869 ldr r0, [pc, #420] ; (800e030 <etharp_output+0x1ec>)
800de8c: f002 f814 bl 800feb8 <printf>
/* Determine on destination hardware address. Broadcasts and multicasts
* are special, other IP addresses are looked up in the ARP table. */
/* broadcast destination IP address? */
if (ip4_addr_isbroadcast(ipaddr, netif)) {
800de90: 687b ldr r3, [r7, #4]
800de92: 681b ldr r3, [r3, #0]
800de94: 68f9 ldr r1, [r7, #12]
800de96: 4618 mov r0, r3
800de98: f000 ff16 bl 800ecc8 <ip4_addr_isbroadcast_u32>
800de9c: 4603 mov r3, r0
800de9e: 2b00 cmp r3, #0
800dea0: d002 beq.n 800dea8 <etharp_output+0x64>
/* broadcast on Ethernet also */
dest = (const struct eth_addr *)&ethbroadcast;
800dea2: 4b66 ldr r3, [pc, #408] ; (800e03c <etharp_output+0x1f8>)
800dea4: 61fb str r3, [r7, #28]
800dea6: e0af b.n 800e008 <etharp_output+0x1c4>
/* multicast destination IP address? */
} else if (ip4_addr_ismulticast(ipaddr)) {
800dea8: 687b ldr r3, [r7, #4]
800deaa: 681b ldr r3, [r3, #0]
800deac: f003 03f0 and.w r3, r3, #240 ; 0xf0
800deb0: 2be0 cmp r3, #224 ; 0xe0
800deb2: d118 bne.n 800dee6 <etharp_output+0xa2>
/* Hash IP multicast address to MAC address.*/
mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0;
800deb4: 2301 movs r3, #1
800deb6: 743b strb r3, [r7, #16]
mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1;
800deb8: 2300 movs r3, #0
800deba: 747b strb r3, [r7, #17]
mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2;
800debc: 235e movs r3, #94 ; 0x5e
800debe: 74bb strb r3, [r7, #18]
mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f;
800dec0: 687b ldr r3, [r7, #4]
800dec2: 3301 adds r3, #1
800dec4: 781b ldrb r3, [r3, #0]
800dec6: f003 037f and.w r3, r3, #127 ; 0x7f
800deca: b2db uxtb r3, r3
800decc: 74fb strb r3, [r7, #19]
mcastaddr.addr[4] = ip4_addr3(ipaddr);
800dece: 687b ldr r3, [r7, #4]
800ded0: 3302 adds r3, #2
800ded2: 781b ldrb r3, [r3, #0]
800ded4: 753b strb r3, [r7, #20]
mcastaddr.addr[5] = ip4_addr4(ipaddr);
800ded6: 687b ldr r3, [r7, #4]
800ded8: 3303 adds r3, #3
800deda: 781b ldrb r3, [r3, #0]
800dedc: 757b strb r3, [r7, #21]
/* destination Ethernet address is multicast */
dest = &mcastaddr;
800dede: f107 0310 add.w r3, r7, #16
800dee2: 61fb str r3, [r7, #28]
800dee4: e090 b.n 800e008 <etharp_output+0x1c4>
/* unicast destination IP address? */
} else {
netif_addr_idx_t i;
/* outside local network? if so, this can neither be a global broadcast nor
a subnet broadcast. */
if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
800dee6: 687b ldr r3, [r7, #4]
800dee8: 681a ldr r2, [r3, #0]
800deea: 68fb ldr r3, [r7, #12]
800deec: 3304 adds r3, #4
800deee: 681b ldr r3, [r3, #0]
800def0: 405a eors r2, r3
800def2: 68fb ldr r3, [r7, #12]
800def4: 3308 adds r3, #8
800def6: 681b ldr r3, [r3, #0]
800def8: 4013 ands r3, r2
800defa: 2b00 cmp r3, #0
800defc: d012 beq.n 800df24 <etharp_output+0xe0>
!ip4_addr_islinklocal(ipaddr)) {
800defe: 687b ldr r3, [r7, #4]
800df00: 681b ldr r3, [r3, #0]
800df02: b29b uxth r3, r3
if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
800df04: f64f 62a9 movw r2, #65193 ; 0xfea9
800df08: 4293 cmp r3, r2
800df0a: d00b beq.n 800df24 <etharp_output+0xe0>
dst_addr = LWIP_HOOK_ETHARP_GET_GW(netif, ipaddr);
if (dst_addr == NULL)
#endif /* LWIP_HOOK_ETHARP_GET_GW */
{
/* interface has default gateway? */
if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) {
800df0c: 68fb ldr r3, [r7, #12]
800df0e: 330c adds r3, #12
800df10: 681b ldr r3, [r3, #0]
800df12: 2b00 cmp r3, #0
800df14: d003 beq.n 800df1e <etharp_output+0xda>
/* send to hardware address of default gateway IP address */
dst_addr = netif_ip4_gw(netif);
800df16: 68fb ldr r3, [r7, #12]
800df18: 330c adds r3, #12
800df1a: 61bb str r3, [r7, #24]
800df1c: e002 b.n 800df24 <etharp_output+0xe0>
/* no default gateway available */
} else {
/* no route to destination error (default gateway missing) */
return ERR_RTE;
800df1e: f06f 0303 mvn.w r3, #3
800df22: e07d b.n 800e020 <etharp_output+0x1dc>
if (netif->hints != NULL) {
/* per-pcb cached entry was given */
netif_addr_idx_t etharp_cached_entry = netif->hints->addr_hint;
if (etharp_cached_entry < ARP_TABLE_SIZE) {
#endif /* LWIP_NETIF_HWADDRHINT */
if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
800df24: 4b46 ldr r3, [pc, #280] ; (800e040 <etharp_output+0x1fc>)
800df26: 781b ldrb r3, [r3, #0]
800df28: 4619 mov r1, r3
800df2a: 4a46 ldr r2, [pc, #280] ; (800e044 <etharp_output+0x200>)
800df2c: 460b mov r3, r1
800df2e: 005b lsls r3, r3, #1
800df30: 440b add r3, r1
800df32: 00db lsls r3, r3, #3
800df34: 4413 add r3, r2
800df36: 3314 adds r3, #20
800df38: 781b ldrb r3, [r3, #0]
800df3a: 2b01 cmp r3, #1
800df3c: d925 bls.n 800df8a <etharp_output+0x146>
#if ETHARP_TABLE_MATCH_NETIF
(arp_table[etharp_cached_entry].netif == netif) &&
800df3e: 4b40 ldr r3, [pc, #256] ; (800e040 <etharp_output+0x1fc>)
800df40: 781b ldrb r3, [r3, #0]
800df42: 4619 mov r1, r3
800df44: 4a3f ldr r2, [pc, #252] ; (800e044 <etharp_output+0x200>)
800df46: 460b mov r3, r1
800df48: 005b lsls r3, r3, #1
800df4a: 440b add r3, r1
800df4c: 00db lsls r3, r3, #3
800df4e: 4413 add r3, r2
800df50: 3308 adds r3, #8
800df52: 681b ldr r3, [r3, #0]
if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
800df54: 68fa ldr r2, [r7, #12]
800df56: 429a cmp r2, r3
800df58: d117 bne.n 800df8a <etharp_output+0x146>
#endif
(ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) {
800df5a: 69bb ldr r3, [r7, #24]
800df5c: 681a ldr r2, [r3, #0]
800df5e: 4b38 ldr r3, [pc, #224] ; (800e040 <etharp_output+0x1fc>)
800df60: 781b ldrb r3, [r3, #0]
800df62: 4618 mov r0, r3
800df64: 4937 ldr r1, [pc, #220] ; (800e044 <etharp_output+0x200>)
800df66: 4603 mov r3, r0
800df68: 005b lsls r3, r3, #1
800df6a: 4403 add r3, r0
800df6c: 00db lsls r3, r3, #3
800df6e: 440b add r3, r1
800df70: 3304 adds r3, #4
800df72: 681b ldr r3, [r3, #0]
(arp_table[etharp_cached_entry].netif == netif) &&
800df74: 429a cmp r2, r3
800df76: d108 bne.n 800df8a <etharp_output+0x146>
/* the per-pcb-cached entry is stable and the right one! */
ETHARP_STATS_INC(etharp.cachehit);
return etharp_output_to_arp_index(netif, q, etharp_cached_entry);
800df78: 4b31 ldr r3, [pc, #196] ; (800e040 <etharp_output+0x1fc>)
800df7a: 781b ldrb r3, [r3, #0]
800df7c: 461a mov r2, r3
800df7e: 68b9 ldr r1, [r7, #8]
800df80: 68f8 ldr r0, [r7, #12]
800df82: f7ff fec5 bl 800dd10 <etharp_output_to_arp_index>
800df86: 4603 mov r3, r0
800df88: e04a b.n 800e020 <etharp_output+0x1dc>
}
#endif /* LWIP_NETIF_HWADDRHINT */
/* find stable entry: do this here since this is a critical path for
throughput and etharp_find_entry() is kind of slow */
for (i = 0; i < ARP_TABLE_SIZE; i++) {
800df8a: 2300 movs r3, #0
800df8c: 75fb strb r3, [r7, #23]
800df8e: e031 b.n 800dff4 <etharp_output+0x1b0>
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
800df90: 7dfa ldrb r2, [r7, #23]
800df92: 492c ldr r1, [pc, #176] ; (800e044 <etharp_output+0x200>)
800df94: 4613 mov r3, r2
800df96: 005b lsls r3, r3, #1
800df98: 4413 add r3, r2
800df9a: 00db lsls r3, r3, #3
800df9c: 440b add r3, r1
800df9e: 3314 adds r3, #20
800dfa0: 781b ldrb r3, [r3, #0]
800dfa2: 2b01 cmp r3, #1
800dfa4: d923 bls.n 800dfee <etharp_output+0x1aa>
#if ETHARP_TABLE_MATCH_NETIF
(arp_table[i].netif == netif) &&
800dfa6: 7dfa ldrb r2, [r7, #23]
800dfa8: 4926 ldr r1, [pc, #152] ; (800e044 <etharp_output+0x200>)
800dfaa: 4613 mov r3, r2
800dfac: 005b lsls r3, r3, #1
800dfae: 4413 add r3, r2
800dfb0: 00db lsls r3, r3, #3
800dfb2: 440b add r3, r1
800dfb4: 3308 adds r3, #8
800dfb6: 681b ldr r3, [r3, #0]
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
800dfb8: 68fa ldr r2, [r7, #12]
800dfba: 429a cmp r2, r3
800dfbc: d117 bne.n 800dfee <etharp_output+0x1aa>
#endif
(ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) {
800dfbe: 69bb ldr r3, [r7, #24]
800dfc0: 6819 ldr r1, [r3, #0]
800dfc2: 7dfa ldrb r2, [r7, #23]
800dfc4: 481f ldr r0, [pc, #124] ; (800e044 <etharp_output+0x200>)
800dfc6: 4613 mov r3, r2
800dfc8: 005b lsls r3, r3, #1
800dfca: 4413 add r3, r2
800dfcc: 00db lsls r3, r3, #3
800dfce: 4403 add r3, r0
800dfd0: 3304 adds r3, #4
800dfd2: 681b ldr r3, [r3, #0]
(arp_table[i].netif == netif) &&
800dfd4: 4299 cmp r1, r3
800dfd6: d10a bne.n 800dfee <etharp_output+0x1aa>
/* found an existing, stable entry */
ETHARP_SET_ADDRHINT(netif, i);
800dfd8: 4a19 ldr r2, [pc, #100] ; (800e040 <etharp_output+0x1fc>)
800dfda: 7dfb ldrb r3, [r7, #23]
800dfdc: 7013 strb r3, [r2, #0]
return etharp_output_to_arp_index(netif, q, i);
800dfde: 7dfb ldrb r3, [r7, #23]
800dfe0: 461a mov r2, r3
800dfe2: 68b9 ldr r1, [r7, #8]
800dfe4: 68f8 ldr r0, [r7, #12]
800dfe6: f7ff fe93 bl 800dd10 <etharp_output_to_arp_index>
800dfea: 4603 mov r3, r0
800dfec: e018 b.n 800e020 <etharp_output+0x1dc>
for (i = 0; i < ARP_TABLE_SIZE; i++) {
800dfee: 7dfb ldrb r3, [r7, #23]
800dff0: 3301 adds r3, #1
800dff2: 75fb strb r3, [r7, #23]
800dff4: 7dfb ldrb r3, [r7, #23]
800dff6: 2b09 cmp r3, #9
800dff8: d9ca bls.n 800df90 <etharp_output+0x14c>
}
}
/* no stable entry found, use the (slower) query function:
queue on destination Ethernet address belonging to ipaddr */
return etharp_query(netif, dst_addr, q);
800dffa: 68ba ldr r2, [r7, #8]
800dffc: 69b9 ldr r1, [r7, #24]
800dffe: 68f8 ldr r0, [r7, #12]
800e000: f000 f822 bl 800e048 <etharp_query>
800e004: 4603 mov r3, r0
800e006: e00b b.n 800e020 <etharp_output+0x1dc>
}
/* continuation for multicast/broadcast destinations */
/* obtain source Ethernet address of the given interface */
/* send packet directly on the link */
return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), dest, ETHTYPE_IP);
800e008: 68fb ldr r3, [r7, #12]
800e00a: f103 022a add.w r2, r3, #42 ; 0x2a
800e00e: f44f 6300 mov.w r3, #2048 ; 0x800
800e012: 9300 str r3, [sp, #0]
800e014: 69fb ldr r3, [r7, #28]
800e016: 68b9 ldr r1, [r7, #8]
800e018: 68f8 ldr r0, [r7, #12]
800e01a: f001 fea1 bl 800fd60 <ethernet_output>
800e01e: 4603 mov r3, r0
}
800e020: 4618 mov r0, r3
800e022: 3720 adds r7, #32
800e024: 46bd mov sp, r7
800e026: bd80 pop {r7, pc}
800e028: 08017094 .word 0x08017094
800e02c: 080171e4 .word 0x080171e4
800e030: 0801710c .word 0x0801710c
800e034: 08017234 .word 0x08017234
800e038: 080171d4 .word 0x080171d4
800e03c: 080178cc .word 0x080178cc
800e040: 20008d30 .word 0x20008d30
800e044: 20008c40 .word 0x20008c40
0800e048 <etharp_query>:
* - ERR_ARG Non-unicast address given, those will not appear in ARP cache.
*
*/
err_t
etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q)
{
800e048: b580 push {r7, lr}
800e04a: b08c sub sp, #48 ; 0x30
800e04c: af02 add r7, sp, #8
800e04e: 60f8 str r0, [r7, #12]
800e050: 60b9 str r1, [r7, #8]
800e052: 607a str r2, [r7, #4]
struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr;
800e054: 68fb ldr r3, [r7, #12]
800e056: 332a adds r3, #42 ; 0x2a
800e058: 617b str r3, [r7, #20]
err_t result = ERR_MEM;
800e05a: 23ff movs r3, #255 ; 0xff
800e05c: f887 3027 strb.w r3, [r7, #39] ; 0x27
int is_new_entry = 0;
800e060: 2300 movs r3, #0
800e062: 623b str r3, [r7, #32]
s16_t i_err;
netif_addr_idx_t i;
/* non-unicast address? */
if (ip4_addr_isbroadcast(ipaddr, netif) ||
800e064: 68bb ldr r3, [r7, #8]
800e066: 681b ldr r3, [r3, #0]
800e068: 68f9 ldr r1, [r7, #12]
800e06a: 4618 mov r0, r3
800e06c: f000 fe2c bl 800ecc8 <ip4_addr_isbroadcast_u32>
800e070: 4603 mov r3, r0
800e072: 2b00 cmp r3, #0
800e074: d10c bne.n 800e090 <etharp_query+0x48>
ip4_addr_ismulticast(ipaddr) ||
800e076: 68bb ldr r3, [r7, #8]
800e078: 681b ldr r3, [r3, #0]
800e07a: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip4_addr_isbroadcast(ipaddr, netif) ||
800e07e: 2be0 cmp r3, #224 ; 0xe0
800e080: d006 beq.n 800e090 <etharp_query+0x48>
ip4_addr_ismulticast(ipaddr) ||
800e082: 68bb ldr r3, [r7, #8]
800e084: 2b00 cmp r3, #0
800e086: d003 beq.n 800e090 <etharp_query+0x48>
ip4_addr_isany(ipaddr)) {
800e088: 68bb ldr r3, [r7, #8]
800e08a: 681b ldr r3, [r3, #0]
800e08c: 2b00 cmp r3, #0
800e08e: d102 bne.n 800e096 <etharp_query+0x4e>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n"));
return ERR_ARG;
800e090: f06f 030f mvn.w r3, #15
800e094: e101 b.n 800e29a <etharp_query+0x252>
}
/* find entry in ARP cache, ask to create entry if queueing packet */
i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif);
800e096: 68fa ldr r2, [r7, #12]
800e098: 2101 movs r1, #1
800e09a: 68b8 ldr r0, [r7, #8]
800e09c: f7ff fb5c bl 800d758 <etharp_find_entry>
800e0a0: 4603 mov r3, r0
800e0a2: 827b strh r3, [r7, #18]
/* could not find or create entry? */
if (i_err < 0) {
800e0a4: f9b7 3012 ldrsh.w r3, [r7, #18]
800e0a8: 2b00 cmp r3, #0
800e0aa: da02 bge.n 800e0b2 <etharp_query+0x6a>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not create ARP entry\n"));
if (q) {
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: packet dropped\n"));
ETHARP_STATS_INC(etharp.memerr);
}
return (err_t)i_err;
800e0ac: 8a7b ldrh r3, [r7, #18]
800e0ae: b25b sxtb r3, r3
800e0b0: e0f3 b.n 800e29a <etharp_query+0x252>
}
LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX);
800e0b2: 8a7b ldrh r3, [r7, #18]
800e0b4: 2b7e cmp r3, #126 ; 0x7e
800e0b6: d906 bls.n 800e0c6 <etharp_query+0x7e>
800e0b8: 4b7a ldr r3, [pc, #488] ; (800e2a4 <etharp_query+0x25c>)
800e0ba: f240 32c1 movw r2, #961 ; 0x3c1
800e0be: 497a ldr r1, [pc, #488] ; (800e2a8 <etharp_query+0x260>)
800e0c0: 487a ldr r0, [pc, #488] ; (800e2ac <etharp_query+0x264>)
800e0c2: f001 fef9 bl 800feb8 <printf>
i = (netif_addr_idx_t)i_err;
800e0c6: 8a7b ldrh r3, [r7, #18]
800e0c8: 747b strb r3, [r7, #17]
/* mark a fresh entry as pending (we just sent a request) */
if (arp_table[i].state == ETHARP_STATE_EMPTY) {
800e0ca: 7c7a ldrb r2, [r7, #17]
800e0cc: 4978 ldr r1, [pc, #480] ; (800e2b0 <etharp_query+0x268>)
800e0ce: 4613 mov r3, r2
800e0d0: 005b lsls r3, r3, #1
800e0d2: 4413 add r3, r2
800e0d4: 00db lsls r3, r3, #3
800e0d6: 440b add r3, r1
800e0d8: 3314 adds r3, #20
800e0da: 781b ldrb r3, [r3, #0]
800e0dc: 2b00 cmp r3, #0
800e0de: d115 bne.n 800e10c <etharp_query+0xc4>
is_new_entry = 1;
800e0e0: 2301 movs r3, #1
800e0e2: 623b str r3, [r7, #32]
arp_table[i].state = ETHARP_STATE_PENDING;
800e0e4: 7c7a ldrb r2, [r7, #17]
800e0e6: 4972 ldr r1, [pc, #456] ; (800e2b0 <etharp_query+0x268>)
800e0e8: 4613 mov r3, r2
800e0ea: 005b lsls r3, r3, #1
800e0ec: 4413 add r3, r2
800e0ee: 00db lsls r3, r3, #3
800e0f0: 440b add r3, r1
800e0f2: 3314 adds r3, #20
800e0f4: 2201 movs r2, #1
800e0f6: 701a strb r2, [r3, #0]
/* record network interface for re-sending arp request in etharp_tmr */
arp_table[i].netif = netif;
800e0f8: 7c7a ldrb r2, [r7, #17]
800e0fa: 496d ldr r1, [pc, #436] ; (800e2b0 <etharp_query+0x268>)
800e0fc: 4613 mov r3, r2
800e0fe: 005b lsls r3, r3, #1
800e100: 4413 add r3, r2
800e102: 00db lsls r3, r3, #3
800e104: 440b add r3, r1
800e106: 3308 adds r3, #8
800e108: 68fa ldr r2, [r7, #12]
800e10a: 601a str r2, [r3, #0]
}
/* { i is either a STABLE or (new or existing) PENDING entry } */
LWIP_ASSERT("arp_table[i].state == PENDING or STABLE",
800e10c: 7c7a ldrb r2, [r7, #17]
800e10e: 4968 ldr r1, [pc, #416] ; (800e2b0 <etharp_query+0x268>)
800e110: 4613 mov r3, r2
800e112: 005b lsls r3, r3, #1
800e114: 4413 add r3, r2
800e116: 00db lsls r3, r3, #3
800e118: 440b add r3, r1
800e11a: 3314 adds r3, #20
800e11c: 781b ldrb r3, [r3, #0]
800e11e: 2b01 cmp r3, #1
800e120: d011 beq.n 800e146 <etharp_query+0xfe>
800e122: 7c7a ldrb r2, [r7, #17]
800e124: 4962 ldr r1, [pc, #392] ; (800e2b0 <etharp_query+0x268>)
800e126: 4613 mov r3, r2
800e128: 005b lsls r3, r3, #1
800e12a: 4413 add r3, r2
800e12c: 00db lsls r3, r3, #3
800e12e: 440b add r3, r1
800e130: 3314 adds r3, #20
800e132: 781b ldrb r3, [r3, #0]
800e134: 2b01 cmp r3, #1
800e136: d806 bhi.n 800e146 <etharp_query+0xfe>
800e138: 4b5a ldr r3, [pc, #360] ; (800e2a4 <etharp_query+0x25c>)
800e13a: f240 32cd movw r2, #973 ; 0x3cd
800e13e: 495d ldr r1, [pc, #372] ; (800e2b4 <etharp_query+0x26c>)
800e140: 485a ldr r0, [pc, #360] ; (800e2ac <etharp_query+0x264>)
800e142: f001 feb9 bl 800feb8 <printf>
((arp_table[i].state == ETHARP_STATE_PENDING) ||
(arp_table[i].state >= ETHARP_STATE_STABLE)));
/* do we have a new entry? or an implicit query request? */
if (is_new_entry || (q == NULL)) {
800e146: 6a3b ldr r3, [r7, #32]
800e148: 2b00 cmp r3, #0
800e14a: d102 bne.n 800e152 <etharp_query+0x10a>
800e14c: 687b ldr r3, [r7, #4]
800e14e: 2b00 cmp r3, #0
800e150: d10c bne.n 800e16c <etharp_query+0x124>
/* try to resolve it; send out ARP request */
result = etharp_request(netif, ipaddr);
800e152: 68b9 ldr r1, [r7, #8]
800e154: 68f8 ldr r0, [r7, #12]
800e156: f000 f963 bl 800e420 <etharp_request>
800e15a: 4603 mov r3, r0
800e15c: f887 3027 strb.w r3, [r7, #39] ; 0x27
/* ARP request couldn't be sent */
/* We don't re-send arp request in etharp_tmr, but we still queue packets,
since this failure could be temporary, and the next packet calling
etharp_query again could lead to sending the queued packets. */
}
if (q == NULL) {
800e160: 687b ldr r3, [r7, #4]
800e162: 2b00 cmp r3, #0
800e164: d102 bne.n 800e16c <etharp_query+0x124>
return result;
800e166: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
800e16a: e096 b.n 800e29a <etharp_query+0x252>
}
}
/* packet given? */
LWIP_ASSERT("q != NULL", q != NULL);
800e16c: 687b ldr r3, [r7, #4]
800e16e: 2b00 cmp r3, #0
800e170: d106 bne.n 800e180 <etharp_query+0x138>
800e172: 4b4c ldr r3, [pc, #304] ; (800e2a4 <etharp_query+0x25c>)
800e174: f240 32e1 movw r2, #993 ; 0x3e1
800e178: 494f ldr r1, [pc, #316] ; (800e2b8 <etharp_query+0x270>)
800e17a: 484c ldr r0, [pc, #304] ; (800e2ac <etharp_query+0x264>)
800e17c: f001 fe9c bl 800feb8 <printf>
/* stable entry? */
if (arp_table[i].state >= ETHARP_STATE_STABLE) {
800e180: 7c7a ldrb r2, [r7, #17]
800e182: 494b ldr r1, [pc, #300] ; (800e2b0 <etharp_query+0x268>)
800e184: 4613 mov r3, r2
800e186: 005b lsls r3, r3, #1
800e188: 4413 add r3, r2
800e18a: 00db lsls r3, r3, #3
800e18c: 440b add r3, r1
800e18e: 3314 adds r3, #20
800e190: 781b ldrb r3, [r3, #0]
800e192: 2b01 cmp r3, #1
800e194: d917 bls.n 800e1c6 <etharp_query+0x17e>
/* we have a valid IP->Ethernet address mapping */
ETHARP_SET_ADDRHINT(netif, i);
800e196: 4a49 ldr r2, [pc, #292] ; (800e2bc <etharp_query+0x274>)
800e198: 7c7b ldrb r3, [r7, #17]
800e19a: 7013 strb r3, [r2, #0]
/* send the packet */
result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP);
800e19c: 7c7a ldrb r2, [r7, #17]
800e19e: 4613 mov r3, r2
800e1a0: 005b lsls r3, r3, #1
800e1a2: 4413 add r3, r2
800e1a4: 00db lsls r3, r3, #3
800e1a6: 3308 adds r3, #8
800e1a8: 4a41 ldr r2, [pc, #260] ; (800e2b0 <etharp_query+0x268>)
800e1aa: 4413 add r3, r2
800e1ac: 3304 adds r3, #4
800e1ae: f44f 6200 mov.w r2, #2048 ; 0x800
800e1b2: 9200 str r2, [sp, #0]
800e1b4: 697a ldr r2, [r7, #20]
800e1b6: 6879 ldr r1, [r7, #4]
800e1b8: 68f8 ldr r0, [r7, #12]
800e1ba: f001 fdd1 bl 800fd60 <ethernet_output>
800e1be: 4603 mov r3, r0
800e1c0: f887 3027 strb.w r3, [r7, #39] ; 0x27
800e1c4: e067 b.n 800e296 <etharp_query+0x24e>
/* pending entry? (either just created or already pending */
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
800e1c6: 7c7a ldrb r2, [r7, #17]
800e1c8: 4939 ldr r1, [pc, #228] ; (800e2b0 <etharp_query+0x268>)
800e1ca: 4613 mov r3, r2
800e1cc: 005b lsls r3, r3, #1
800e1ce: 4413 add r3, r2
800e1d0: 00db lsls r3, r3, #3
800e1d2: 440b add r3, r1
800e1d4: 3314 adds r3, #20
800e1d6: 781b ldrb r3, [r3, #0]
800e1d8: 2b01 cmp r3, #1
800e1da: d15c bne.n 800e296 <etharp_query+0x24e>
/* entry is still pending, queue the given packet 'q' */
struct pbuf *p;
int copy_needed = 0;
800e1dc: 2300 movs r3, #0
800e1de: 61bb str r3, [r7, #24]
/* IF q includes a pbuf that must be copied, copy the whole chain into a
* new PBUF_RAM. See the definition of PBUF_NEEDS_COPY for details. */
p = q;
800e1e0: 687b ldr r3, [r7, #4]
800e1e2: 61fb str r3, [r7, #28]
while (p) {
800e1e4: e01c b.n 800e220 <etharp_query+0x1d8>
LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0));
800e1e6: 69fb ldr r3, [r7, #28]
800e1e8: 895a ldrh r2, [r3, #10]
800e1ea: 69fb ldr r3, [r7, #28]
800e1ec: 891b ldrh r3, [r3, #8]
800e1ee: 429a cmp r2, r3
800e1f0: d10a bne.n 800e208 <etharp_query+0x1c0>
800e1f2: 69fb ldr r3, [r7, #28]
800e1f4: 681b ldr r3, [r3, #0]
800e1f6: 2b00 cmp r3, #0
800e1f8: d006 beq.n 800e208 <etharp_query+0x1c0>
800e1fa: 4b2a ldr r3, [pc, #168] ; (800e2a4 <etharp_query+0x25c>)
800e1fc: f240 32f1 movw r2, #1009 ; 0x3f1
800e200: 492f ldr r1, [pc, #188] ; (800e2c0 <etharp_query+0x278>)
800e202: 482a ldr r0, [pc, #168] ; (800e2ac <etharp_query+0x264>)
800e204: f001 fe58 bl 800feb8 <printf>
if (PBUF_NEEDS_COPY(p)) {
800e208: 69fb ldr r3, [r7, #28]
800e20a: 7b1b ldrb r3, [r3, #12]
800e20c: f003 0340 and.w r3, r3, #64 ; 0x40
800e210: 2b00 cmp r3, #0
800e212: d002 beq.n 800e21a <etharp_query+0x1d2>
copy_needed = 1;
800e214: 2301 movs r3, #1
800e216: 61bb str r3, [r7, #24]
break;
800e218: e005 b.n 800e226 <etharp_query+0x1de>
}
p = p->next;
800e21a: 69fb ldr r3, [r7, #28]
800e21c: 681b ldr r3, [r3, #0]
800e21e: 61fb str r3, [r7, #28]
while (p) {
800e220: 69fb ldr r3, [r7, #28]
800e222: 2b00 cmp r3, #0
800e224: d1df bne.n 800e1e6 <etharp_query+0x19e>
}
if (copy_needed) {
800e226: 69bb ldr r3, [r7, #24]
800e228: 2b00 cmp r3, #0
800e22a: d007 beq.n 800e23c <etharp_query+0x1f4>
/* copy the whole packet into new pbufs */
p = pbuf_clone(PBUF_LINK, PBUF_RAM, q);
800e22c: 687a ldr r2, [r7, #4]
800e22e: f44f 7120 mov.w r1, #640 ; 0x280
800e232: 200e movs r0, #14
800e234: f7f7 fb90 bl 8005958 <pbuf_clone>
800e238: 61f8 str r0, [r7, #28]
800e23a: e004 b.n 800e246 <etharp_query+0x1fe>
} else {
/* referencing the old pbuf is enough */
p = q;
800e23c: 687b ldr r3, [r7, #4]
800e23e: 61fb str r3, [r7, #28]
pbuf_ref(p);
800e240: 69f8 ldr r0, [r7, #28]
800e242: f7f7 f9bd bl 80055c0 <pbuf_ref>
}
/* packet could be taken over? */
if (p != NULL) {
800e246: 69fb ldr r3, [r7, #28]
800e248: 2b00 cmp r3, #0
800e24a: d021 beq.n 800e290 <etharp_query+0x248>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q));
result = ERR_MEM;
}
#else /* ARP_QUEUEING */
/* always queue one packet per ARP request only, freeing a previously queued packet */
if (arp_table[i].q != NULL) {
800e24c: 7c7a ldrb r2, [r7, #17]
800e24e: 4918 ldr r1, [pc, #96] ; (800e2b0 <etharp_query+0x268>)
800e250: 4613 mov r3, r2
800e252: 005b lsls r3, r3, #1
800e254: 4413 add r3, r2
800e256: 00db lsls r3, r3, #3
800e258: 440b add r3, r1
800e25a: 681b ldr r3, [r3, #0]
800e25c: 2b00 cmp r3, #0
800e25e: d00a beq.n 800e276 <etharp_query+0x22e>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"U16_F"\n", (void *)q, (u16_t)i));
pbuf_free(arp_table[i].q);
800e260: 7c7a ldrb r2, [r7, #17]
800e262: 4913 ldr r1, [pc, #76] ; (800e2b0 <etharp_query+0x268>)
800e264: 4613 mov r3, r2
800e266: 005b lsls r3, r3, #1
800e268: 4413 add r3, r2
800e26a: 00db lsls r3, r3, #3
800e26c: 440b add r3, r1
800e26e: 681b ldr r3, [r3, #0]
800e270: 4618 mov r0, r3
800e272: f7f7 f905 bl 8005480 <pbuf_free>
}
arp_table[i].q = p;
800e276: 7c7a ldrb r2, [r7, #17]
800e278: 490d ldr r1, [pc, #52] ; (800e2b0 <etharp_query+0x268>)
800e27a: 4613 mov r3, r2
800e27c: 005b lsls r3, r3, #1
800e27e: 4413 add r3, r2
800e280: 00db lsls r3, r3, #3
800e282: 440b add r3, r1
800e284: 69fa ldr r2, [r7, #28]
800e286: 601a str r2, [r3, #0]
result = ERR_OK;
800e288: 2300 movs r3, #0
800e28a: f887 3027 strb.w r3, [r7, #39] ; 0x27
800e28e: e002 b.n 800e296 <etharp_query+0x24e>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"U16_F"\n", (void *)q, (u16_t)i));
#endif /* ARP_QUEUEING */
} else {
ETHARP_STATS_INC(etharp.memerr);
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q));
result = ERR_MEM;
800e290: 23ff movs r3, #255 ; 0xff
800e292: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
}
return result;
800e296: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
}
800e29a: 4618 mov r0, r3
800e29c: 3728 adds r7, #40 ; 0x28
800e29e: 46bd mov sp, r7
800e2a0: bd80 pop {r7, pc}
800e2a2: bf00 nop
800e2a4: 08017094 .word 0x08017094
800e2a8: 08017240 .word 0x08017240
800e2ac: 0801710c .word 0x0801710c
800e2b0: 20008c40 .word 0x20008c40
800e2b4: 08017250 .word 0x08017250
800e2b8: 08017234 .word 0x08017234
800e2bc: 20008d30 .word 0x20008d30
800e2c0: 08017278 .word 0x08017278
0800e2c4 <etharp_raw>:
etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr,
const struct eth_addr *ethdst_addr,
const struct eth_addr *hwsrc_addr, const ip4_addr_t *ipsrc_addr,
const struct eth_addr *hwdst_addr, const ip4_addr_t *ipdst_addr,
const u16_t opcode)
{
800e2c4: b580 push {r7, lr}
800e2c6: b08a sub sp, #40 ; 0x28
800e2c8: af02 add r7, sp, #8
800e2ca: 60f8 str r0, [r7, #12]
800e2cc: 60b9 str r1, [r7, #8]
800e2ce: 607a str r2, [r7, #4]
800e2d0: 603b str r3, [r7, #0]
struct pbuf *p;
err_t result = ERR_OK;
800e2d2: 2300 movs r3, #0
800e2d4: 77fb strb r3, [r7, #31]
struct etharp_hdr *hdr;
LWIP_ASSERT("netif != NULL", netif != NULL);
800e2d6: 68fb ldr r3, [r7, #12]
800e2d8: 2b00 cmp r3, #0
800e2da: d106 bne.n 800e2ea <etharp_raw+0x26>
800e2dc: 4b3a ldr r3, [pc, #232] ; (800e3c8 <etharp_raw+0x104>)
800e2de: f240 4257 movw r2, #1111 ; 0x457
800e2e2: 493a ldr r1, [pc, #232] ; (800e3cc <etharp_raw+0x108>)
800e2e4: 483a ldr r0, [pc, #232] ; (800e3d0 <etharp_raw+0x10c>)
800e2e6: f001 fde7 bl 800feb8 <printf>
/* allocate a pbuf for the outgoing ARP request packet */
p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM);
800e2ea: f44f 7220 mov.w r2, #640 ; 0x280
800e2ee: 211c movs r1, #28
800e2f0: 200e movs r0, #14
800e2f2: f7f6 fde1 bl 8004eb8 <pbuf_alloc>
800e2f6: 61b8 str r0, [r7, #24]
/* could allocate a pbuf for an ARP request? */
if (p == NULL) {
800e2f8: 69bb ldr r3, [r7, #24]
800e2fa: 2b00 cmp r3, #0
800e2fc: d102 bne.n 800e304 <etharp_raw+0x40>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("etharp_raw: could not allocate pbuf for ARP request.\n"));
ETHARP_STATS_INC(etharp.memerr);
return ERR_MEM;
800e2fe: f04f 33ff mov.w r3, #4294967295
800e302: e05d b.n 800e3c0 <etharp_raw+0xfc>
}
LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
800e304: 69bb ldr r3, [r7, #24]
800e306: 895b ldrh r3, [r3, #10]
800e308: 2b1b cmp r3, #27
800e30a: d806 bhi.n 800e31a <etharp_raw+0x56>
800e30c: 4b2e ldr r3, [pc, #184] ; (800e3c8 <etharp_raw+0x104>)
800e30e: f240 4262 movw r2, #1122 ; 0x462
800e312: 4930 ldr r1, [pc, #192] ; (800e3d4 <etharp_raw+0x110>)
800e314: 482e ldr r0, [pc, #184] ; (800e3d0 <etharp_raw+0x10c>)
800e316: f001 fdcf bl 800feb8 <printf>
(p->len >= SIZEOF_ETHARP_HDR));
hdr = (struct etharp_hdr *)p->payload;
800e31a: 69bb ldr r3, [r7, #24]
800e31c: 685b ldr r3, [r3, #4]
800e31e: 617b str r3, [r7, #20]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));
hdr->opcode = lwip_htons(opcode);
800e320: 8ebb ldrh r3, [r7, #52] ; 0x34
800e322: 4618 mov r0, r3
800e324: f7f5 fd42 bl 8003dac <lwip_htons>
800e328: 4603 mov r3, r0
800e32a: 461a mov r2, r3
800e32c: 697b ldr r3, [r7, #20]
800e32e: 80da strh r2, [r3, #6]
LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!",
800e330: 68fb ldr r3, [r7, #12]
800e332: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
800e336: 2b06 cmp r3, #6
800e338: d006 beq.n 800e348 <etharp_raw+0x84>
800e33a: 4b23 ldr r3, [pc, #140] ; (800e3c8 <etharp_raw+0x104>)
800e33c: f240 4269 movw r2, #1129 ; 0x469
800e340: 4925 ldr r1, [pc, #148] ; (800e3d8 <etharp_raw+0x114>)
800e342: 4823 ldr r0, [pc, #140] ; (800e3d0 <etharp_raw+0x10c>)
800e344: f001 fdb8 bl 800feb8 <printf>
(netif->hwaddr_len == ETH_HWADDR_LEN));
/* Write the ARP MAC-Addresses */
SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN);
800e348: 697b ldr r3, [r7, #20]
800e34a: 3308 adds r3, #8
800e34c: 2206 movs r2, #6
800e34e: 6839 ldr r1, [r7, #0]
800e350: 4618 mov r0, r3
800e352: f001 fd81 bl 800fe58 <memcpy>
SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN);
800e356: 697b ldr r3, [r7, #20]
800e358: 3312 adds r3, #18
800e35a: 2206 movs r2, #6
800e35c: 6af9 ldr r1, [r7, #44] ; 0x2c
800e35e: 4618 mov r0, r3
800e360: f001 fd7a bl 800fe58 <memcpy>
/* Copy struct ip4_addr_wordaligned to aligned ip4_addr, to support compilers without
* structure packing. */
IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->sipaddr, ipsrc_addr);
800e364: 697b ldr r3, [r7, #20]
800e366: 330e adds r3, #14
800e368: 6aba ldr r2, [r7, #40] ; 0x28
800e36a: 6812 ldr r2, [r2, #0]
800e36c: 601a str r2, [r3, #0]
IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr);
800e36e: 697b ldr r3, [r7, #20]
800e370: 3318 adds r3, #24
800e372: 6b3a ldr r2, [r7, #48] ; 0x30
800e374: 6812 ldr r2, [r2, #0]
800e376: 601a str r2, [r3, #0]
hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET);
800e378: 697b ldr r3, [r7, #20]
800e37a: 2200 movs r2, #0
800e37c: 701a strb r2, [r3, #0]
800e37e: 2200 movs r2, #0
800e380: f042 0201 orr.w r2, r2, #1
800e384: 705a strb r2, [r3, #1]
hdr->proto = PP_HTONS(ETHTYPE_IP);
800e386: 697b ldr r3, [r7, #20]
800e388: 2200 movs r2, #0
800e38a: f042 0208 orr.w r2, r2, #8
800e38e: 709a strb r2, [r3, #2]
800e390: 2200 movs r2, #0
800e392: 70da strb r2, [r3, #3]
/* set hwlen and protolen */
hdr->hwlen = ETH_HWADDR_LEN;
800e394: 697b ldr r3, [r7, #20]
800e396: 2206 movs r2, #6
800e398: 711a strb r2, [r3, #4]
hdr->protolen = sizeof(ip4_addr_t);
800e39a: 697b ldr r3, [r7, #20]
800e39c: 2204 movs r2, #4
800e39e: 715a strb r2, [r3, #5]
if (ip4_addr_islinklocal(ipsrc_addr)) {
ethernet_output(netif, p, ethsrc_addr, &ethbroadcast, ETHTYPE_ARP);
} else
#endif /* LWIP_AUTOIP */
{
ethernet_output(netif, p, ethsrc_addr, ethdst_addr, ETHTYPE_ARP);
800e3a0: f640 0306 movw r3, #2054 ; 0x806
800e3a4: 9300 str r3, [sp, #0]
800e3a6: 687b ldr r3, [r7, #4]
800e3a8: 68ba ldr r2, [r7, #8]
800e3aa: 69b9 ldr r1, [r7, #24]
800e3ac: 68f8 ldr r0, [r7, #12]
800e3ae: f001 fcd7 bl 800fd60 <ethernet_output>
}
ETHARP_STATS_INC(etharp.xmit);
/* free ARP query packet */
pbuf_free(p);
800e3b2: 69b8 ldr r0, [r7, #24]
800e3b4: f7f7 f864 bl 8005480 <pbuf_free>
p = NULL;
800e3b8: 2300 movs r3, #0
800e3ba: 61bb str r3, [r7, #24]
/* could not allocate pbuf for ARP request */
return result;
800e3bc: f997 301f ldrsb.w r3, [r7, #31]
}
800e3c0: 4618 mov r0, r3
800e3c2: 3720 adds r7, #32
800e3c4: 46bd mov sp, r7
800e3c6: bd80 pop {r7, pc}
800e3c8: 08017094 .word 0x08017094
800e3cc: 080171e4 .word 0x080171e4
800e3d0: 0801710c .word 0x0801710c
800e3d4: 08017294 .word 0x08017294
800e3d8: 080172c8 .word 0x080172c8
0800e3dc <etharp_request_dst>:
* ERR_MEM if the ARP packet couldn't be allocated
* any other err_t on failure
*/
static err_t
etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr *hw_dst_addr)
{
800e3dc: b580 push {r7, lr}
800e3de: b088 sub sp, #32
800e3e0: af04 add r7, sp, #16
800e3e2: 60f8 str r0, [r7, #12]
800e3e4: 60b9 str r1, [r7, #8]
800e3e6: 607a str r2, [r7, #4]
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
800e3e8: 68fb ldr r3, [r7, #12]
800e3ea: f103 012a add.w r1, r3, #42 ; 0x2a
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), &ethzero,
800e3ee: 68fb ldr r3, [r7, #12]
800e3f0: f103 002a add.w r0, r3, #42 ; 0x2a
800e3f4: 68fb ldr r3, [r7, #12]
800e3f6: 3304 adds r3, #4
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
800e3f8: 2201 movs r2, #1
800e3fa: 9203 str r2, [sp, #12]
800e3fc: 68ba ldr r2, [r7, #8]
800e3fe: 9202 str r2, [sp, #8]
800e400: 4a06 ldr r2, [pc, #24] ; (800e41c <etharp_request_dst+0x40>)
800e402: 9201 str r2, [sp, #4]
800e404: 9300 str r3, [sp, #0]
800e406: 4603 mov r3, r0
800e408: 687a ldr r2, [r7, #4]
800e40a: 68f8 ldr r0, [r7, #12]
800e40c: f7ff ff5a bl 800e2c4 <etharp_raw>
800e410: 4603 mov r3, r0
ipaddr, ARP_REQUEST);
}
800e412: 4618 mov r0, r3
800e414: 3710 adds r7, #16
800e416: 46bd mov sp, r7
800e418: bd80 pop {r7, pc}
800e41a: bf00 nop
800e41c: 080178d4 .word 0x080178d4
0800e420 <etharp_request>:
* ERR_MEM if the ARP packet couldn't be allocated
* any other err_t on failure
*/
err_t
etharp_request(struct netif *netif, const ip4_addr_t *ipaddr)
{
800e420: b580 push {r7, lr}
800e422: b082 sub sp, #8
800e424: af00 add r7, sp, #0
800e426: 6078 str r0, [r7, #4]
800e428: 6039 str r1, [r7, #0]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n"));
return etharp_request_dst(netif, ipaddr, &ethbroadcast);
800e42a: 4a05 ldr r2, [pc, #20] ; (800e440 <etharp_request+0x20>)
800e42c: 6839 ldr r1, [r7, #0]
800e42e: 6878 ldr r0, [r7, #4]
800e430: f7ff ffd4 bl 800e3dc <etharp_request_dst>
800e434: 4603 mov r3, r0
}
800e436: 4618 mov r0, r3
800e438: 3708 adds r7, #8
800e43a: 46bd mov sp, r7
800e43c: bd80 pop {r7, pc}
800e43e: bf00 nop
800e440: 080178cc .word 0x080178cc
0800e444 <icmp_input>:
* @param p the icmp echo request packet, p->payload pointing to the icmp header
* @param inp the netif on which this packet was received
*/
void
icmp_input(struct pbuf *p, struct netif *inp)
{
800e444: b580 push {r7, lr}
800e446: b08e sub sp, #56 ; 0x38
800e448: af04 add r7, sp, #16
800e44a: 6078 str r0, [r7, #4]
800e44c: 6039 str r1, [r7, #0]
const ip4_addr_t *src;
ICMP_STATS_INC(icmp.recv);
MIB2_STATS_INC(mib2.icmpinmsgs);
iphdr_in = ip4_current_header();
800e44e: 4b79 ldr r3, [pc, #484] ; (800e634 <icmp_input+0x1f0>)
800e450: 689b ldr r3, [r3, #8]
800e452: 627b str r3, [r7, #36] ; 0x24
hlen = IPH_HL_BYTES(iphdr_in);
800e454: 6a7b ldr r3, [r7, #36] ; 0x24
800e456: 781b ldrb r3, [r3, #0]
800e458: f003 030f and.w r3, r3, #15
800e45c: b2db uxtb r3, r3
800e45e: 009b lsls r3, r3, #2
800e460: b2db uxtb r3, r3
800e462: 847b strh r3, [r7, #34] ; 0x22
if (hlen < IP_HLEN) {
800e464: 8c7b ldrh r3, [r7, #34] ; 0x22
800e466: 2b13 cmp r3, #19
800e468: f240 80cd bls.w 800e606 <icmp_input+0x1c2>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen));
goto lenerr;
}
if (p->len < sizeof(u16_t) * 2) {
800e46c: 687b ldr r3, [r7, #4]
800e46e: 895b ldrh r3, [r3, #10]
800e470: 2b03 cmp r3, #3
800e472: f240 80ca bls.w 800e60a <icmp_input+0x1c6>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len));
goto lenerr;
}
type = *((u8_t *)p->payload);
800e476: 687b ldr r3, [r7, #4]
800e478: 685b ldr r3, [r3, #4]
800e47a: 781b ldrb r3, [r3, #0]
800e47c: f887 3021 strb.w r3, [r7, #33] ; 0x21
#ifdef LWIP_DEBUG
code = *(((u8_t *)p->payload) + 1);
/* if debug is enabled but debug statement below is somehow disabled: */
LWIP_UNUSED_ARG(code);
#endif /* LWIP_DEBUG */
switch (type) {
800e480: f897 3021 ldrb.w r3, [r7, #33] ; 0x21
800e484: 2b00 cmp r3, #0
800e486: f000 80b7 beq.w 800e5f8 <icmp_input+0x1b4>
800e48a: 2b08 cmp r3, #8
800e48c: f040 80b7 bne.w 800e5fe <icmp_input+0x1ba>
(as obviously, an echo request has been sent, too). */
MIB2_STATS_INC(mib2.icmpinechoreps);
break;
case ICMP_ECHO:
MIB2_STATS_INC(mib2.icmpinechos);
src = ip4_current_dest_addr();
800e490: 4b69 ldr r3, [pc, #420] ; (800e638 <icmp_input+0x1f4>)
800e492: 61fb str r3, [r7, #28]
/* multicast destination address? */
if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
800e494: 4b67 ldr r3, [pc, #412] ; (800e634 <icmp_input+0x1f0>)
800e496: 695b ldr r3, [r3, #20]
800e498: f003 03f0 and.w r3, r3, #240 ; 0xf0
800e49c: 2be0 cmp r3, #224 ; 0xe0
800e49e: f000 80bb beq.w 800e618 <icmp_input+0x1d4>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n"));
goto icmperr;
#endif /* LWIP_MULTICAST_PING */
}
/* broadcast destination address? */
if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) {
800e4a2: 4b64 ldr r3, [pc, #400] ; (800e634 <icmp_input+0x1f0>)
800e4a4: 695b ldr r3, [r3, #20]
800e4a6: 4a63 ldr r2, [pc, #396] ; (800e634 <icmp_input+0x1f0>)
800e4a8: 6812 ldr r2, [r2, #0]
800e4aa: 4611 mov r1, r2
800e4ac: 4618 mov r0, r3
800e4ae: f000 fc0b bl 800ecc8 <ip4_addr_isbroadcast_u32>
800e4b2: 4603 mov r3, r0
800e4b4: 2b00 cmp r3, #0
800e4b6: f040 80b1 bne.w 800e61c <icmp_input+0x1d8>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to broadcast pings\n"));
goto icmperr;
#endif /* LWIP_BROADCAST_PING */
}
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n"));
if (p->tot_len < sizeof(struct icmp_echo_hdr)) {
800e4ba: 687b ldr r3, [r7, #4]
800e4bc: 891b ldrh r3, [r3, #8]
800e4be: 2b07 cmp r3, #7
800e4c0: f240 80a5 bls.w 800e60e <icmp_input+0x1ca>
return;
}
}
#endif
#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN
if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) {
800e4c4: 8c7b ldrh r3, [r7, #34] ; 0x22
800e4c6: 330e adds r3, #14
800e4c8: 4619 mov r1, r3
800e4ca: 6878 ldr r0, [r7, #4]
800e4cc: f7f6 ff42 bl 8005354 <pbuf_add_header>
800e4d0: 4603 mov r3, r0
800e4d2: 2b00 cmp r3, #0
800e4d4: d04b beq.n 800e56e <icmp_input+0x12a>
/* p is not big enough to contain link headers
* allocate a new one and copy p into it
*/
struct pbuf *r;
u16_t alloc_len = (u16_t)(p->tot_len + hlen);
800e4d6: 687b ldr r3, [r7, #4]
800e4d8: 891a ldrh r2, [r3, #8]
800e4da: 8c7b ldrh r3, [r7, #34] ; 0x22
800e4dc: 4413 add r3, r2
800e4de: 837b strh r3, [r7, #26]
if (alloc_len < p->tot_len) {
800e4e0: 687b ldr r3, [r7, #4]
800e4e2: 891b ldrh r3, [r3, #8]
800e4e4: 8b7a ldrh r2, [r7, #26]
800e4e6: 429a cmp r2, r3
800e4e8: f0c0 809a bcc.w 800e620 <icmp_input+0x1dc>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed (tot_len overflow)\n"));
goto icmperr;
}
/* allocate new packet buffer with space for link headers */
r = pbuf_alloc(PBUF_LINK, alloc_len, PBUF_RAM);
800e4ec: 8b7b ldrh r3, [r7, #26]
800e4ee: f44f 7220 mov.w r2, #640 ; 0x280
800e4f2: 4619 mov r1, r3
800e4f4: 200e movs r0, #14
800e4f6: f7f6 fcdf bl 8004eb8 <pbuf_alloc>
800e4fa: 6178 str r0, [r7, #20]
if (r == NULL) {
800e4fc: 697b ldr r3, [r7, #20]
800e4fe: 2b00 cmp r3, #0
800e500: f000 8090 beq.w 800e624 <icmp_input+0x1e0>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n"));
goto icmperr;
}
if (r->len < hlen + sizeof(struct icmp_echo_hdr)) {
800e504: 697b ldr r3, [r7, #20]
800e506: 895b ldrh r3, [r3, #10]
800e508: 461a mov r2, r3
800e50a: 8c7b ldrh r3, [r7, #34] ; 0x22
800e50c: 3308 adds r3, #8
800e50e: 429a cmp r2, r3
800e510: d203 bcs.n 800e51a <icmp_input+0xd6>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header"));
pbuf_free(r);
800e512: 6978 ldr r0, [r7, #20]
800e514: f7f6 ffb4 bl 8005480 <pbuf_free>
goto icmperr;
800e518: e085 b.n 800e626 <icmp_input+0x1e2>
}
/* copy the ip header */
MEMCPY(r->payload, iphdr_in, hlen);
800e51a: 697b ldr r3, [r7, #20]
800e51c: 685b ldr r3, [r3, #4]
800e51e: 8c7a ldrh r2, [r7, #34] ; 0x22
800e520: 6a79 ldr r1, [r7, #36] ; 0x24
800e522: 4618 mov r0, r3
800e524: f001 fc98 bl 800fe58 <memcpy>
/* switch r->payload back to icmp header (cannot fail) */
if (pbuf_remove_header(r, hlen)) {
800e528: 8c7b ldrh r3, [r7, #34] ; 0x22
800e52a: 4619 mov r1, r3
800e52c: 6978 ldr r0, [r7, #20]
800e52e: f7f6 ff21 bl 8005374 <pbuf_remove_header>
800e532: 4603 mov r3, r0
800e534: 2b00 cmp r3, #0
800e536: d009 beq.n 800e54c <icmp_input+0x108>
LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0);
800e538: 4b40 ldr r3, [pc, #256] ; (800e63c <icmp_input+0x1f8>)
800e53a: 22b6 movs r2, #182 ; 0xb6
800e53c: 4940 ldr r1, [pc, #256] ; (800e640 <icmp_input+0x1fc>)
800e53e: 4841 ldr r0, [pc, #260] ; (800e644 <icmp_input+0x200>)
800e540: f001 fcba bl 800feb8 <printf>
pbuf_free(r);
800e544: 6978 ldr r0, [r7, #20]
800e546: f7f6 ff9b bl 8005480 <pbuf_free>
goto icmperr;
800e54a: e06c b.n 800e626 <icmp_input+0x1e2>
}
/* copy the rest of the packet without ip header */
if (pbuf_copy(r, p) != ERR_OK) {
800e54c: 6879 ldr r1, [r7, #4]
800e54e: 6978 ldr r0, [r7, #20]
800e550: f7f7 f8be bl 80056d0 <pbuf_copy>
800e554: 4603 mov r3, r0
800e556: 2b00 cmp r3, #0
800e558: d003 beq.n 800e562 <icmp_input+0x11e>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed"));
pbuf_free(r);
800e55a: 6978 ldr r0, [r7, #20]
800e55c: f7f6 ff90 bl 8005480 <pbuf_free>
goto icmperr;
800e560: e061 b.n 800e626 <icmp_input+0x1e2>
}
/* free the original p */
pbuf_free(p);
800e562: 6878 ldr r0, [r7, #4]
800e564: f7f6 ff8c bl 8005480 <pbuf_free>
/* we now have an identical copy of p that has room for link headers */
p = r;
800e568: 697b ldr r3, [r7, #20]
800e56a: 607b str r3, [r7, #4]
800e56c: e00f b.n 800e58e <icmp_input+0x14a>
} else {
/* restore p->payload to point to icmp header (cannot fail) */
if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) {
800e56e: 8c7b ldrh r3, [r7, #34] ; 0x22
800e570: 330e adds r3, #14
800e572: 4619 mov r1, r3
800e574: 6878 ldr r0, [r7, #4]
800e576: f7f6 fefd bl 8005374 <pbuf_remove_header>
800e57a: 4603 mov r3, r0
800e57c: 2b00 cmp r3, #0
800e57e: d006 beq.n 800e58e <icmp_input+0x14a>
LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0);
800e580: 4b2e ldr r3, [pc, #184] ; (800e63c <icmp_input+0x1f8>)
800e582: 22c7 movs r2, #199 ; 0xc7
800e584: 4930 ldr r1, [pc, #192] ; (800e648 <icmp_input+0x204>)
800e586: 482f ldr r0, [pc, #188] ; (800e644 <icmp_input+0x200>)
800e588: f001 fc96 bl 800feb8 <printf>
goto icmperr;
800e58c: e04b b.n 800e626 <icmp_input+0x1e2>
}
#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */
/* At this point, all checks are OK. */
/* We generate an answer by switching the dest and src ip addresses,
* setting the icmp type to ECHO_RESPONSE and updating the checksum. */
iecho = (struct icmp_echo_hdr *)p->payload;
800e58e: 687b ldr r3, [r7, #4]
800e590: 685b ldr r3, [r3, #4]
800e592: 613b str r3, [r7, #16]
if (pbuf_add_header(p, hlen)) {
800e594: 8c7b ldrh r3, [r7, #34] ; 0x22
800e596: 4619 mov r1, r3
800e598: 6878 ldr r0, [r7, #4]
800e59a: f7f6 fedb bl 8005354 <pbuf_add_header>
800e59e: 4603 mov r3, r0
800e5a0: 2b00 cmp r3, #0
800e5a2: d12b bne.n 800e5fc <icmp_input+0x1b8>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Can't move over header in packet"));
} else {
err_t ret;
struct ip_hdr *iphdr = (struct ip_hdr *)p->payload;
800e5a4: 687b ldr r3, [r7, #4]
800e5a6: 685b ldr r3, [r3, #4]
800e5a8: 60fb str r3, [r7, #12]
ip4_addr_copy(iphdr->src, *src);
800e5aa: 69fb ldr r3, [r7, #28]
800e5ac: 681a ldr r2, [r3, #0]
800e5ae: 68fb ldr r3, [r7, #12]
800e5b0: 60da str r2, [r3, #12]
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
800e5b2: 4b20 ldr r3, [pc, #128] ; (800e634 <icmp_input+0x1f0>)
800e5b4: 691a ldr r2, [r3, #16]
800e5b6: 68fb ldr r3, [r7, #12]
800e5b8: 611a str r2, [r3, #16]
ICMPH_TYPE_SET(iecho, ICMP_ER);
800e5ba: 693b ldr r3, [r7, #16]
800e5bc: 2200 movs r2, #0
800e5be: 701a strb r2, [r3, #0]
else {
iecho->chksum = 0;
}
#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */
#else /* CHECKSUM_GEN_ICMP */
iecho->chksum = 0;
800e5c0: 693b ldr r3, [r7, #16]
800e5c2: 2200 movs r2, #0
800e5c4: 709a strb r2, [r3, #2]
800e5c6: 2200 movs r2, #0
800e5c8: 70da strb r2, [r3, #3]
#endif /* CHECKSUM_GEN_ICMP */
/* Set the correct TTL and recalculate the header checksum. */
IPH_TTL_SET(iphdr, ICMP_TTL);
800e5ca: 68fb ldr r3, [r7, #12]
800e5cc: 22ff movs r2, #255 ; 0xff
800e5ce: 721a strb r2, [r3, #8]
IPH_CHKSUM_SET(iphdr, 0);
800e5d0: 68fb ldr r3, [r7, #12]
800e5d2: 2200 movs r2, #0
800e5d4: 729a strb r2, [r3, #10]
800e5d6: 2200 movs r2, #0
800e5d8: 72da strb r2, [r3, #11]
MIB2_STATS_INC(mib2.icmpoutmsgs);
/* increase number of echo replies attempted to send */
MIB2_STATS_INC(mib2.icmpoutechoreps);
/* send an ICMP packet */
ret = ip4_output_if(p, src, LWIP_IP_HDRINCL,
800e5da: 683b ldr r3, [r7, #0]
800e5dc: 9302 str r3, [sp, #8]
800e5de: 2301 movs r3, #1
800e5e0: 9301 str r3, [sp, #4]
800e5e2: 2300 movs r3, #0
800e5e4: 9300 str r3, [sp, #0]
800e5e6: 23ff movs r3, #255 ; 0xff
800e5e8: 2200 movs r2, #0
800e5ea: 69f9 ldr r1, [r7, #28]
800e5ec: 6878 ldr r0, [r7, #4]
800e5ee: f000 fa93 bl 800eb18 <ip4_output_if>
800e5f2: 4603 mov r3, r0
800e5f4: 72fb strb r3, [r7, #11]
ICMP_TTL, 0, IP_PROTO_ICMP, inp);
if (ret != ERR_OK) {
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %s\n", lwip_strerr(ret)));
}
}
break;
800e5f6: e001 b.n 800e5fc <icmp_input+0x1b8>
break;
800e5f8: bf00 nop
800e5fa: e000 b.n 800e5fe <icmp_input+0x1ba>
break;
800e5fc: bf00 nop
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n",
(s16_t)type, (s16_t)code));
ICMP_STATS_INC(icmp.proterr);
ICMP_STATS_INC(icmp.drop);
}
pbuf_free(p);
800e5fe: 6878 ldr r0, [r7, #4]
800e600: f7f6 ff3e bl 8005480 <pbuf_free>
return;
800e604: e013 b.n 800e62e <icmp_input+0x1ea>
goto lenerr;
800e606: bf00 nop
800e608: e002 b.n 800e610 <icmp_input+0x1cc>
goto lenerr;
800e60a: bf00 nop
800e60c: e000 b.n 800e610 <icmp_input+0x1cc>
goto lenerr;
800e60e: bf00 nop
lenerr:
pbuf_free(p);
800e610: 6878 ldr r0, [r7, #4]
800e612: f7f6 ff35 bl 8005480 <pbuf_free>
ICMP_STATS_INC(icmp.lenerr);
MIB2_STATS_INC(mib2.icmpinerrors);
return;
800e616: e00a b.n 800e62e <icmp_input+0x1ea>
goto icmperr;
800e618: bf00 nop
800e61a: e004 b.n 800e626 <icmp_input+0x1e2>
goto icmperr;
800e61c: bf00 nop
800e61e: e002 b.n 800e626 <icmp_input+0x1e2>
goto icmperr;
800e620: bf00 nop
800e622: e000 b.n 800e626 <icmp_input+0x1e2>
goto icmperr;
800e624: bf00 nop
#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING
icmperr:
pbuf_free(p);
800e626: 6878 ldr r0, [r7, #4]
800e628: f7f6 ff2a bl 8005480 <pbuf_free>
ICMP_STATS_INC(icmp.err);
MIB2_STATS_INC(mib2.icmpinerrors);
return;
800e62c: bf00 nop
#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */
}
800e62e: 3728 adds r7, #40 ; 0x28
800e630: 46bd mov sp, r7
800e632: bd80 pop {r7, pc}
800e634: 2000561c .word 0x2000561c
800e638: 20005630 .word 0x20005630
800e63c: 0801730c .word 0x0801730c
800e640: 08017344 .word 0x08017344
800e644: 0801737c .word 0x0801737c
800e648: 080173a4 .word 0x080173a4
0800e64c <icmp_dest_unreach>:
* p->payload pointing to the IP header
* @param t type of the 'unreachable' packet
*/
void
icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t)
{
800e64c: b580 push {r7, lr}
800e64e: b082 sub sp, #8
800e650: af00 add r7, sp, #0
800e652: 6078 str r0, [r7, #4]
800e654: 460b mov r3, r1
800e656: 70fb strb r3, [r7, #3]
MIB2_STATS_INC(mib2.icmpoutdestunreachs);
icmp_send_response(p, ICMP_DUR, t);
800e658: 78fb ldrb r3, [r7, #3]
800e65a: 461a mov r2, r3
800e65c: 2103 movs r1, #3
800e65e: 6878 ldr r0, [r7, #4]
800e660: f000 f814 bl 800e68c <icmp_send_response>
}
800e664: bf00 nop
800e666: 3708 adds r7, #8
800e668: 46bd mov sp, r7
800e66a: bd80 pop {r7, pc}
0800e66c <icmp_time_exceeded>:
* p->payload pointing to the IP header
* @param t type of the 'time exceeded' packet
*/
void
icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t)
{
800e66c: b580 push {r7, lr}
800e66e: b082 sub sp, #8
800e670: af00 add r7, sp, #0
800e672: 6078 str r0, [r7, #4]
800e674: 460b mov r3, r1
800e676: 70fb strb r3, [r7, #3]
MIB2_STATS_INC(mib2.icmpouttimeexcds);
icmp_send_response(p, ICMP_TE, t);
800e678: 78fb ldrb r3, [r7, #3]
800e67a: 461a mov r2, r3
800e67c: 210b movs r1, #11
800e67e: 6878 ldr r0, [r7, #4]
800e680: f000 f804 bl 800e68c <icmp_send_response>
}
800e684: bf00 nop
800e686: 3708 adds r7, #8
800e688: 46bd mov sp, r7
800e68a: bd80 pop {r7, pc}
0800e68c <icmp_send_response>:
* @param type Type of the ICMP header
* @param code Code of the ICMP header
*/
static void
icmp_send_response(struct pbuf *p, u8_t type, u8_t code)
{
800e68c: b580 push {r7, lr}
800e68e: b08c sub sp, #48 ; 0x30
800e690: af04 add r7, sp, #16
800e692: 6078 str r0, [r7, #4]
800e694: 460b mov r3, r1
800e696: 70fb strb r3, [r7, #3]
800e698: 4613 mov r3, r2
800e69a: 70bb strb r3, [r7, #2]
/* increase number of messages attempted to send */
MIB2_STATS_INC(mib2.icmpoutmsgs);
/* ICMP header + IP header + 8 bytes of data */
q = pbuf_alloc(PBUF_IP, sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE,
800e69c: f44f 7220 mov.w r2, #640 ; 0x280
800e6a0: 2124 movs r1, #36 ; 0x24
800e6a2: 2022 movs r0, #34 ; 0x22
800e6a4: f7f6 fc08 bl 8004eb8 <pbuf_alloc>
800e6a8: 61f8 str r0, [r7, #28]
PBUF_RAM);
if (q == NULL) {
800e6aa: 69fb ldr r3, [r7, #28]
800e6ac: 2b00 cmp r3, #0
800e6ae: d04c beq.n 800e74a <icmp_send_response+0xbe>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMP packet.\n"));
MIB2_STATS_INC(mib2.icmpouterrors);
return;
}
LWIP_ASSERT("check that first pbuf can hold icmp message",
800e6b0: 69fb ldr r3, [r7, #28]
800e6b2: 895b ldrh r3, [r3, #10]
800e6b4: 2b23 cmp r3, #35 ; 0x23
800e6b6: d806 bhi.n 800e6c6 <icmp_send_response+0x3a>
800e6b8: 4b26 ldr r3, [pc, #152] ; (800e754 <icmp_send_response+0xc8>)
800e6ba: f44f 72b4 mov.w r2, #360 ; 0x168
800e6be: 4926 ldr r1, [pc, #152] ; (800e758 <icmp_send_response+0xcc>)
800e6c0: 4826 ldr r0, [pc, #152] ; (800e75c <icmp_send_response+0xd0>)
800e6c2: f001 fbf9 bl 800feb8 <printf>
(q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE)));
iphdr = (struct ip_hdr *)p->payload;
800e6c6: 687b ldr r3, [r7, #4]
800e6c8: 685b ldr r3, [r3, #4]
800e6ca: 61bb str r3, [r7, #24]
ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->src);
LWIP_DEBUGF(ICMP_DEBUG, (" to "));
ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->dest);
LWIP_DEBUGF(ICMP_DEBUG, ("\n"));
icmphdr = (struct icmp_echo_hdr *)q->payload;
800e6cc: 69fb ldr r3, [r7, #28]
800e6ce: 685b ldr r3, [r3, #4]
800e6d0: 617b str r3, [r7, #20]
icmphdr->type = type;
800e6d2: 697b ldr r3, [r7, #20]
800e6d4: 78fa ldrb r2, [r7, #3]
800e6d6: 701a strb r2, [r3, #0]
icmphdr->code = code;
800e6d8: 697b ldr r3, [r7, #20]
800e6da: 78ba ldrb r2, [r7, #2]
800e6dc: 705a strb r2, [r3, #1]
icmphdr->id = 0;
800e6de: 697b ldr r3, [r7, #20]
800e6e0: 2200 movs r2, #0
800e6e2: 711a strb r2, [r3, #4]
800e6e4: 2200 movs r2, #0
800e6e6: 715a strb r2, [r3, #5]
icmphdr->seqno = 0;
800e6e8: 697b ldr r3, [r7, #20]
800e6ea: 2200 movs r2, #0
800e6ec: 719a strb r2, [r3, #6]
800e6ee: 2200 movs r2, #0
800e6f0: 71da strb r2, [r3, #7]
/* copy fields from original packet */
SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload,
800e6f2: 69fb ldr r3, [r7, #28]
800e6f4: 685b ldr r3, [r3, #4]
800e6f6: f103 0008 add.w r0, r3, #8
800e6fa: 687b ldr r3, [r7, #4]
800e6fc: 685b ldr r3, [r3, #4]
800e6fe: 221c movs r2, #28
800e700: 4619 mov r1, r3
800e702: f001 fba9 bl 800fe58 <memcpy>
IP_HLEN + ICMP_DEST_UNREACH_DATASIZE);
ip4_addr_copy(iphdr_src, iphdr->src);
800e706: 69bb ldr r3, [r7, #24]
800e708: 68db ldr r3, [r3, #12]
800e70a: 60fb str r3, [r7, #12]
ip4_addr_t iphdr_dst;
ip4_addr_copy(iphdr_dst, iphdr->dest);
netif = ip4_route_src(&iphdr_dst, &iphdr_src);
}
#else
netif = ip4_route(&iphdr_src);
800e70c: f107 030c add.w r3, r7, #12
800e710: 4618 mov r0, r3
800e712: f000 f825 bl 800e760 <ip4_route>
800e716: 6138 str r0, [r7, #16]
#endif
if (netif != NULL) {
800e718: 693b ldr r3, [r7, #16]
800e71a: 2b00 cmp r3, #0
800e71c: d011 beq.n 800e742 <icmp_send_response+0xb6>
/* calculate checksum */
icmphdr->chksum = 0;
800e71e: 697b ldr r3, [r7, #20]
800e720: 2200 movs r2, #0
800e722: 709a strb r2, [r3, #2]
800e724: 2200 movs r2, #0
800e726: 70da strb r2, [r3, #3]
IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) {
icmphdr->chksum = inet_chksum(icmphdr, q->len);
}
#endif
ICMP_STATS_INC(icmp.xmit);
ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif);
800e728: f107 020c add.w r2, r7, #12
800e72c: 693b ldr r3, [r7, #16]
800e72e: 9302 str r3, [sp, #8]
800e730: 2301 movs r3, #1
800e732: 9301 str r3, [sp, #4]
800e734: 2300 movs r3, #0
800e736: 9300 str r3, [sp, #0]
800e738: 23ff movs r3, #255 ; 0xff
800e73a: 2100 movs r1, #0
800e73c: 69f8 ldr r0, [r7, #28]
800e73e: f000 f9eb bl 800eb18 <ip4_output_if>
}
pbuf_free(q);
800e742: 69f8 ldr r0, [r7, #28]
800e744: f7f6 fe9c bl 8005480 <pbuf_free>
800e748: e000 b.n 800e74c <icmp_send_response+0xc0>
return;
800e74a: bf00 nop
}
800e74c: 3720 adds r7, #32
800e74e: 46bd mov sp, r7
800e750: bd80 pop {r7, pc}
800e752: bf00 nop
800e754: 0801730c .word 0x0801730c
800e758: 080173d8 .word 0x080173d8
800e75c: 0801737c .word 0x0801737c
0800e760 <ip4_route>:
* @param dest the destination IP address for which to find the route
* @return the netif on which to send to reach dest
*/
struct netif *
ip4_route(const ip4_addr_t *dest)
{
800e760: b480 push {r7}
800e762: b085 sub sp, #20
800e764: af00 add r7, sp, #0
800e766: 6078 str r0, [r7, #4]
/* bug #54569: in case LWIP_SINGLE_NETIF=1 and LWIP_DEBUGF() disabled, the following loop is optimized away */
LWIP_UNUSED_ARG(dest);
/* iterate through netifs */
NETIF_FOREACH(netif) {
800e768: 4b33 ldr r3, [pc, #204] ; (800e838 <ip4_route+0xd8>)
800e76a: 681b ldr r3, [r3, #0]
800e76c: 60fb str r3, [r7, #12]
800e76e: e036 b.n 800e7de <ip4_route+0x7e>
/* is the netif up, does it have a link and a valid address? */
if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) {
800e770: 68fb ldr r3, [r7, #12]
800e772: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800e776: f003 0301 and.w r3, r3, #1
800e77a: b2db uxtb r3, r3
800e77c: 2b00 cmp r3, #0
800e77e: d02b beq.n 800e7d8 <ip4_route+0x78>
800e780: 68fb ldr r3, [r7, #12]
800e782: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800e786: 089b lsrs r3, r3, #2
800e788: f003 0301 and.w r3, r3, #1
800e78c: b2db uxtb r3, r3
800e78e: 2b00 cmp r3, #0
800e790: d022 beq.n 800e7d8 <ip4_route+0x78>
800e792: 68fb ldr r3, [r7, #12]
800e794: 3304 adds r3, #4
800e796: 681b ldr r3, [r3, #0]
800e798: 2b00 cmp r3, #0
800e79a: d01d beq.n 800e7d8 <ip4_route+0x78>
/* network mask matches? */
if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) {
800e79c: 687b ldr r3, [r7, #4]
800e79e: 681a ldr r2, [r3, #0]
800e7a0: 68fb ldr r3, [r7, #12]
800e7a2: 3304 adds r3, #4
800e7a4: 681b ldr r3, [r3, #0]
800e7a6: 405a eors r2, r3
800e7a8: 68fb ldr r3, [r7, #12]
800e7aa: 3308 adds r3, #8
800e7ac: 681b ldr r3, [r3, #0]
800e7ae: 4013 ands r3, r2
800e7b0: 2b00 cmp r3, #0
800e7b2: d101 bne.n 800e7b8 <ip4_route+0x58>
/* return netif on which to forward IP packet */
return netif;
800e7b4: 68fb ldr r3, [r7, #12]
800e7b6: e038 b.n 800e82a <ip4_route+0xca>
}
/* gateway matches on a non broadcast interface? (i.e. peer in a point to point interface) */
if (((netif->flags & NETIF_FLAG_BROADCAST) == 0) && ip4_addr_cmp(dest, netif_ip4_gw(netif))) {
800e7b8: 68fb ldr r3, [r7, #12]
800e7ba: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800e7be: f003 0302 and.w r3, r3, #2
800e7c2: 2b00 cmp r3, #0
800e7c4: d108 bne.n 800e7d8 <ip4_route+0x78>
800e7c6: 687b ldr r3, [r7, #4]
800e7c8: 681a ldr r2, [r3, #0]
800e7ca: 68fb ldr r3, [r7, #12]
800e7cc: 330c adds r3, #12
800e7ce: 681b ldr r3, [r3, #0]
800e7d0: 429a cmp r2, r3
800e7d2: d101 bne.n 800e7d8 <ip4_route+0x78>
/* return netif on which to forward IP packet */
return netif;
800e7d4: 68fb ldr r3, [r7, #12]
800e7d6: e028 b.n 800e82a <ip4_route+0xca>
NETIF_FOREACH(netif) {
800e7d8: 68fb ldr r3, [r7, #12]
800e7da: 681b ldr r3, [r3, #0]
800e7dc: 60fb str r3, [r7, #12]
800e7de: 68fb ldr r3, [r7, #12]
800e7e0: 2b00 cmp r3, #0
800e7e2: d1c5 bne.n 800e770 <ip4_route+0x10>
return netif;
}
#endif
#endif /* !LWIP_SINGLE_NETIF */
if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
800e7e4: 4b15 ldr r3, [pc, #84] ; (800e83c <ip4_route+0xdc>)
800e7e6: 681b ldr r3, [r3, #0]
800e7e8: 2b00 cmp r3, #0
800e7ea: d01a beq.n 800e822 <ip4_route+0xc2>
800e7ec: 4b13 ldr r3, [pc, #76] ; (800e83c <ip4_route+0xdc>)
800e7ee: 681b ldr r3, [r3, #0]
800e7f0: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800e7f4: f003 0301 and.w r3, r3, #1
800e7f8: 2b00 cmp r3, #0
800e7fa: d012 beq.n 800e822 <ip4_route+0xc2>
800e7fc: 4b0f ldr r3, [pc, #60] ; (800e83c <ip4_route+0xdc>)
800e7fe: 681b ldr r3, [r3, #0]
800e800: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800e804: f003 0304 and.w r3, r3, #4
800e808: 2b00 cmp r3, #0
800e80a: d00a beq.n 800e822 <ip4_route+0xc2>
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
800e80c: 4b0b ldr r3, [pc, #44] ; (800e83c <ip4_route+0xdc>)
800e80e: 681b ldr r3, [r3, #0]
800e810: 3304 adds r3, #4
800e812: 681b ldr r3, [r3, #0]
if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
800e814: 2b00 cmp r3, #0
800e816: d004 beq.n 800e822 <ip4_route+0xc2>
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
800e818: 687b ldr r3, [r7, #4]
800e81a: 681b ldr r3, [r3, #0]
800e81c: b2db uxtb r3, r3
800e81e: 2b7f cmp r3, #127 ; 0x7f
800e820: d101 bne.n 800e826 <ip4_route+0xc6>
If this is not good enough for you, use LWIP_HOOK_IP4_ROUTE() */
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_route: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n",
ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest)));
IP_STATS_INC(ip.rterr);
MIB2_STATS_INC(mib2.ipoutnoroutes);
return NULL;
800e822: 2300 movs r3, #0
800e824: e001 b.n 800e82a <ip4_route+0xca>
}
return netif_default;
800e826: 4b05 ldr r3, [pc, #20] ; (800e83c <ip4_route+0xdc>)
800e828: 681b ldr r3, [r3, #0]
}
800e82a: 4618 mov r0, r3
800e82c: 3714 adds r7, #20
800e82e: 46bd mov sp, r7
800e830: f85d 7b04 ldr.w r7, [sp], #4
800e834: 4770 bx lr
800e836: bf00 nop
800e838: 20008ba0 .word 0x20008ba0
800e83c: 20008ba4 .word 0x20008ba4
0800e840 <ip4_input_accept>:
#endif /* IP_FORWARD */
/** Return true if the current input packet should be accepted on this netif */
static int
ip4_input_accept(struct netif *netif)
{
800e840: b580 push {r7, lr}
800e842: b082 sub sp, #8
800e844: af00 add r7, sp, #0
800e846: 6078 str r0, [r7, #4]
ip4_addr_get_u32(ip4_current_dest_addr()) & ip4_addr_get_u32(netif_ip4_netmask(netif)),
ip4_addr_get_u32(netif_ip4_addr(netif)) & ip4_addr_get_u32(netif_ip4_netmask(netif)),
ip4_addr_get_u32(ip4_current_dest_addr()) & ~ip4_addr_get_u32(netif_ip4_netmask(netif))));
/* interface is up and configured? */
if ((netif_is_up(netif)) && (!ip4_addr_isany_val(*netif_ip4_addr(netif)))) {
800e848: 687b ldr r3, [r7, #4]
800e84a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800e84e: f003 0301 and.w r3, r3, #1
800e852: b2db uxtb r3, r3
800e854: 2b00 cmp r3, #0
800e856: d016 beq.n 800e886 <ip4_input_accept+0x46>
800e858: 687b ldr r3, [r7, #4]
800e85a: 3304 adds r3, #4
800e85c: 681b ldr r3, [r3, #0]
800e85e: 2b00 cmp r3, #0
800e860: d011 beq.n 800e886 <ip4_input_accept+0x46>
/* unicast to this interface address? */
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
800e862: 4b0b ldr r3, [pc, #44] ; (800e890 <ip4_input_accept+0x50>)
800e864: 695a ldr r2, [r3, #20]
800e866: 687b ldr r3, [r7, #4]
800e868: 3304 adds r3, #4
800e86a: 681b ldr r3, [r3, #0]
800e86c: 429a cmp r2, r3
800e86e: d008 beq.n 800e882 <ip4_input_accept+0x42>
/* or broadcast on this interface network address? */
ip4_addr_isbroadcast(ip4_current_dest_addr(), netif)
800e870: 4b07 ldr r3, [pc, #28] ; (800e890 <ip4_input_accept+0x50>)
800e872: 695b ldr r3, [r3, #20]
800e874: 6879 ldr r1, [r7, #4]
800e876: 4618 mov r0, r3
800e878: f000 fa26 bl 800ecc8 <ip4_addr_isbroadcast_u32>
800e87c: 4603 mov r3, r0
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
800e87e: 2b00 cmp r3, #0
800e880: d001 beq.n 800e886 <ip4_input_accept+0x46>
#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */
) {
LWIP_DEBUGF(IP_DEBUG, ("ip4_input: packet accepted on interface %c%c\n",
netif->name[0], netif->name[1]));
/* accept on this netif */
return 1;
800e882: 2301 movs r3, #1
800e884: e000 b.n 800e888 <ip4_input_accept+0x48>
/* accept on this netif */
return 1;
}
#endif /* LWIP_AUTOIP */
}
return 0;
800e886: 2300 movs r3, #0
}
800e888: 4618 mov r0, r3
800e88a: 3708 adds r7, #8
800e88c: 46bd mov sp, r7
800e88e: bd80 pop {r7, pc}
800e890: 2000561c .word 0x2000561c
0800e894 <ip4_input>:
* @return ERR_OK if the packet was processed (could return ERR_* if it wasn't
* processed, but currently always returns ERR_OK)
*/
err_t
ip4_input(struct pbuf *p, struct netif *inp)
{
800e894: b580 push {r7, lr}
800e896: b088 sub sp, #32
800e898: af00 add r7, sp, #0
800e89a: 6078 str r0, [r7, #4]
800e89c: 6039 str r1, [r7, #0]
const struct ip_hdr *iphdr;
struct netif *netif;
u16_t iphdr_hlen;
u16_t iphdr_len;
#if IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP
int check_ip_src = 1;
800e89e: 2301 movs r3, #1
800e8a0: 617b str r3, [r7, #20]
IP_STATS_INC(ip.recv);
MIB2_STATS_INC(mib2.ipinreceives);
/* identify the IP header */
iphdr = (struct ip_hdr *)p->payload;
800e8a2: 687b ldr r3, [r7, #4]
800e8a4: 685b ldr r3, [r3, #4]
800e8a6: 61fb str r3, [r7, #28]
if (IPH_V(iphdr) != 4) {
800e8a8: 69fb ldr r3, [r7, #28]
800e8aa: 781b ldrb r3, [r3, #0]
800e8ac: 091b lsrs r3, r3, #4
800e8ae: b2db uxtb r3, r3
800e8b0: 2b04 cmp r3, #4
800e8b2: d004 beq.n 800e8be <ip4_input+0x2a>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_WARNING, ("IP packet dropped due to bad version number %"U16_F"\n", (u16_t)IPH_V(iphdr)));
ip4_debug_print(p);
pbuf_free(p);
800e8b4: 6878 ldr r0, [r7, #4]
800e8b6: f7f6 fde3 bl 8005480 <pbuf_free>
IP_STATS_INC(ip.err);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinhdrerrors);
return ERR_OK;
800e8ba: 2300 movs r3, #0
800e8bc: e123 b.n 800eb06 <ip4_input+0x272>
return ERR_OK;
}
#endif
/* obtain IP header length in bytes */
iphdr_hlen = IPH_HL_BYTES(iphdr);
800e8be: 69fb ldr r3, [r7, #28]
800e8c0: 781b ldrb r3, [r3, #0]
800e8c2: f003 030f and.w r3, r3, #15
800e8c6: b2db uxtb r3, r3
800e8c8: 009b lsls r3, r3, #2
800e8ca: b2db uxtb r3, r3
800e8cc: 827b strh r3, [r7, #18]
/* obtain ip length in bytes */
iphdr_len = lwip_ntohs(IPH_LEN(iphdr));
800e8ce: 69fb ldr r3, [r7, #28]
800e8d0: 885b ldrh r3, [r3, #2]
800e8d2: b29b uxth r3, r3
800e8d4: 4618 mov r0, r3
800e8d6: f7f5 fa69 bl 8003dac <lwip_htons>
800e8da: 4603 mov r3, r0
800e8dc: 823b strh r3, [r7, #16]
/* Trim pbuf. This is especially required for packets < 60 bytes. */
if (iphdr_len < p->tot_len) {
800e8de: 687b ldr r3, [r7, #4]
800e8e0: 891b ldrh r3, [r3, #8]
800e8e2: 8a3a ldrh r2, [r7, #16]
800e8e4: 429a cmp r2, r3
800e8e6: d204 bcs.n 800e8f2 <ip4_input+0x5e>
pbuf_realloc(p, iphdr_len);
800e8e8: 8a3b ldrh r3, [r7, #16]
800e8ea: 4619 mov r1, r3
800e8ec: 6878 ldr r0, [r7, #4]
800e8ee: f7f6 fc41 bl 8005174 <pbuf_realloc>
}
/* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */
if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) {
800e8f2: 687b ldr r3, [r7, #4]
800e8f4: 895b ldrh r3, [r3, #10]
800e8f6: 8a7a ldrh r2, [r7, #18]
800e8f8: 429a cmp r2, r3
800e8fa: d807 bhi.n 800e90c <ip4_input+0x78>
800e8fc: 687b ldr r3, [r7, #4]
800e8fe: 891b ldrh r3, [r3, #8]
800e900: 8a3a ldrh r2, [r7, #16]
800e902: 429a cmp r2, r3
800e904: d802 bhi.n 800e90c <ip4_input+0x78>
800e906: 8a7b ldrh r3, [r7, #18]
800e908: 2b13 cmp r3, #19
800e90a: d804 bhi.n 800e916 <ip4_input+0x82>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n",
iphdr_len, p->tot_len));
}
/* free (drop) packet pbufs */
pbuf_free(p);
800e90c: 6878 ldr r0, [r7, #4]
800e90e: f7f6 fdb7 bl 8005480 <pbuf_free>
IP_STATS_INC(ip.lenerr);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipindiscards);
return ERR_OK;
800e912: 2300 movs r3, #0
800e914: e0f7 b.n 800eb06 <ip4_input+0x272>
}
}
#endif
/* copy IP addresses to aligned ip_addr_t */
ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest);
800e916: 69fb ldr r3, [r7, #28]
800e918: 691b ldr r3, [r3, #16]
800e91a: 4a7d ldr r2, [pc, #500] ; (800eb10 <ip4_input+0x27c>)
800e91c: 6153 str r3, [r2, #20]
ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
800e91e: 69fb ldr r3, [r7, #28]
800e920: 68db ldr r3, [r3, #12]
800e922: 4a7b ldr r2, [pc, #492] ; (800eb10 <ip4_input+0x27c>)
800e924: 6113 str r3, [r2, #16]
/* match packet against an interface, i.e. is this packet for us? */
if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
800e926: 4b7a ldr r3, [pc, #488] ; (800eb10 <ip4_input+0x27c>)
800e928: 695b ldr r3, [r3, #20]
800e92a: f003 03f0 and.w r3, r3, #240 ; 0xf0
800e92e: 2be0 cmp r3, #224 ; 0xe0
800e930: d112 bne.n 800e958 <ip4_input+0xc4>
netif = inp;
} else {
netif = NULL;
}
#else /* LWIP_IGMP */
if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) {
800e932: 683b ldr r3, [r7, #0]
800e934: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800e938: f003 0301 and.w r3, r3, #1
800e93c: b2db uxtb r3, r3
800e93e: 2b00 cmp r3, #0
800e940: d007 beq.n 800e952 <ip4_input+0xbe>
800e942: 683b ldr r3, [r7, #0]
800e944: 3304 adds r3, #4
800e946: 681b ldr r3, [r3, #0]
800e948: 2b00 cmp r3, #0
800e94a: d002 beq.n 800e952 <ip4_input+0xbe>
netif = inp;
800e94c: 683b ldr r3, [r7, #0]
800e94e: 61bb str r3, [r7, #24]
800e950: e02a b.n 800e9a8 <ip4_input+0x114>
} else {
netif = NULL;
800e952: 2300 movs r3, #0
800e954: 61bb str r3, [r7, #24]
800e956: e027 b.n 800e9a8 <ip4_input+0x114>
}
#endif /* LWIP_IGMP */
} else {
/* start trying with inp. if that's not acceptable, start walking the
list of configured netifs. */
if (ip4_input_accept(inp)) {
800e958: 6838 ldr r0, [r7, #0]
800e95a: f7ff ff71 bl 800e840 <ip4_input_accept>
800e95e: 4603 mov r3, r0
800e960: 2b00 cmp r3, #0
800e962: d002 beq.n 800e96a <ip4_input+0xd6>
netif = inp;
800e964: 683b ldr r3, [r7, #0]
800e966: 61bb str r3, [r7, #24]
800e968: e01e b.n 800e9a8 <ip4_input+0x114>
} else {
netif = NULL;
800e96a: 2300 movs r3, #0
800e96c: 61bb str r3, [r7, #24]
#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF
/* Packets sent to the loopback address must not be accepted on an
* interface that does not have the loopback address assigned to it,
* unless a non-loopback interface is used for loopback traffic. */
if (!ip4_addr_isloopback(ip4_current_dest_addr()))
800e96e: 4b68 ldr r3, [pc, #416] ; (800eb10 <ip4_input+0x27c>)
800e970: 695b ldr r3, [r3, #20]
800e972: b2db uxtb r3, r3
800e974: 2b7f cmp r3, #127 ; 0x7f
800e976: d017 beq.n 800e9a8 <ip4_input+0x114>
#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */
{
#if !LWIP_SINGLE_NETIF
NETIF_FOREACH(netif) {
800e978: 4b66 ldr r3, [pc, #408] ; (800eb14 <ip4_input+0x280>)
800e97a: 681b ldr r3, [r3, #0]
800e97c: 61bb str r3, [r7, #24]
800e97e: e00e b.n 800e99e <ip4_input+0x10a>
if (netif == inp) {
800e980: 69ba ldr r2, [r7, #24]
800e982: 683b ldr r3, [r7, #0]
800e984: 429a cmp r2, r3
800e986: d006 beq.n 800e996 <ip4_input+0x102>
/* we checked that before already */
continue;
}
if (ip4_input_accept(netif)) {
800e988: 69b8 ldr r0, [r7, #24]
800e98a: f7ff ff59 bl 800e840 <ip4_input_accept>
800e98e: 4603 mov r3, r0
800e990: 2b00 cmp r3, #0
800e992: d108 bne.n 800e9a6 <ip4_input+0x112>
800e994: e000 b.n 800e998 <ip4_input+0x104>
continue;
800e996: bf00 nop
NETIF_FOREACH(netif) {
800e998: 69bb ldr r3, [r7, #24]
800e99a: 681b ldr r3, [r3, #0]
800e99c: 61bb str r3, [r7, #24]
800e99e: 69bb ldr r3, [r7, #24]
800e9a0: 2b00 cmp r3, #0
800e9a2: d1ed bne.n 800e980 <ip4_input+0xec>
800e9a4: e000 b.n 800e9a8 <ip4_input+0x114>
break;
800e9a6: bf00 nop
* If you want to accept private broadcast communication while a netif is down,
* define LWIP_IP_ACCEPT_UDP_PORT(dst_port), e.g.:
*
* #define LWIP_IP_ACCEPT_UDP_PORT(dst_port) ((dst_port) == PP_NTOHS(12345))
*/
if (netif == NULL) {
800e9a8: 69bb ldr r3, [r7, #24]
800e9aa: 2b00 cmp r3, #0
800e9ac: d111 bne.n 800e9d2 <ip4_input+0x13e>
/* remote port is DHCP server? */
if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
800e9ae: 69fb ldr r3, [r7, #28]
800e9b0: 7a5b ldrb r3, [r3, #9]
800e9b2: 2b11 cmp r3, #17
800e9b4: d10d bne.n 800e9d2 <ip4_input+0x13e>
const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen);
800e9b6: 8a7b ldrh r3, [r7, #18]
800e9b8: 69fa ldr r2, [r7, #28]
800e9ba: 4413 add r3, r2
800e9bc: 60fb str r3, [r7, #12]
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: UDP packet to DHCP client port %"U16_F"\n",
lwip_ntohs(udphdr->dest)));
if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) {
800e9be: 68fb ldr r3, [r7, #12]
800e9c0: 885b ldrh r3, [r3, #2]
800e9c2: b29b uxth r3, r3
800e9c4: f5b3 4f88 cmp.w r3, #17408 ; 0x4400
800e9c8: d103 bne.n 800e9d2 <ip4_input+0x13e>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n"));
netif = inp;
800e9ca: 683b ldr r3, [r7, #0]
800e9cc: 61bb str r3, [r7, #24]
check_ip_src = 0;
800e9ce: 2300 movs r3, #0
800e9d0: 617b str r3, [r7, #20]
}
#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */
/* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */
#if LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING
if (check_ip_src
800e9d2: 697b ldr r3, [r7, #20]
800e9d4: 2b00 cmp r3, #0
800e9d6: d017 beq.n 800ea08 <ip4_input+0x174>
#if IP_ACCEPT_LINK_LAYER_ADDRESSING
/* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */
&& !ip4_addr_isany_val(*ip4_current_src_addr())
800e9d8: 4b4d ldr r3, [pc, #308] ; (800eb10 <ip4_input+0x27c>)
800e9da: 691b ldr r3, [r3, #16]
800e9dc: 2b00 cmp r3, #0
800e9de: d013 beq.n 800ea08 <ip4_input+0x174>
#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */
)
#endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */
{
if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
800e9e0: 4b4b ldr r3, [pc, #300] ; (800eb10 <ip4_input+0x27c>)
800e9e2: 691b ldr r3, [r3, #16]
800e9e4: 6839 ldr r1, [r7, #0]
800e9e6: 4618 mov r0, r3
800e9e8: f000 f96e bl 800ecc8 <ip4_addr_isbroadcast_u32>
800e9ec: 4603 mov r3, r0
800e9ee: 2b00 cmp r3, #0
800e9f0: d105 bne.n 800e9fe <ip4_input+0x16a>
(ip4_addr_ismulticast(ip4_current_src_addr()))) {
800e9f2: 4b47 ldr r3, [pc, #284] ; (800eb10 <ip4_input+0x27c>)
800e9f4: 691b ldr r3, [r3, #16]
800e9f6: f003 03f0 and.w r3, r3, #240 ; 0xf0
if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
800e9fa: 2be0 cmp r3, #224 ; 0xe0
800e9fc: d104 bne.n 800ea08 <ip4_input+0x174>
/* packet source is not valid */
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("ip4_input: packet source is not valid.\n"));
/* free (drop) packet pbufs */
pbuf_free(p);
800e9fe: 6878 ldr r0, [r7, #4]
800ea00: f7f6 fd3e bl 8005480 <pbuf_free>
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinaddrerrors);
MIB2_STATS_INC(mib2.ipindiscards);
return ERR_OK;
800ea04: 2300 movs r3, #0
800ea06: e07e b.n 800eb06 <ip4_input+0x272>
}
}
/* packet not for us? */
if (netif == NULL) {
800ea08: 69bb ldr r3, [r7, #24]
800ea0a: 2b00 cmp r3, #0
800ea0c: d104 bne.n 800ea18 <ip4_input+0x184>
{
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinaddrerrors);
MIB2_STATS_INC(mib2.ipindiscards);
}
pbuf_free(p);
800ea0e: 6878 ldr r0, [r7, #4]
800ea10: f7f6 fd36 bl 8005480 <pbuf_free>
return ERR_OK;
800ea14: 2300 movs r3, #0
800ea16: e076 b.n 800eb06 <ip4_input+0x272>
}
/* packet consists of multiple fragments? */
if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
800ea18: 69fb ldr r3, [r7, #28]
800ea1a: 88db ldrh r3, [r3, #6]
800ea1c: b29b uxth r3, r3
800ea1e: 461a mov r2, r3
800ea20: f64f 733f movw r3, #65343 ; 0xff3f
800ea24: 4013 ands r3, r2
800ea26: 2b00 cmp r3, #0
800ea28: d00b beq.n 800ea42 <ip4_input+0x1ae>
#if IP_REASSEMBLY /* packet fragment reassembly code present? */
LWIP_DEBUGF(IP_DEBUG, ("IP packet is a fragment (id=0x%04"X16_F" tot_len=%"U16_F" len=%"U16_F" MF=%"U16_F" offset=%"U16_F"), calling ip4_reass()\n",
lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)((lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK) * 8)));
/* reassemble the packet*/
p = ip4_reass(p);
800ea2a: 6878 ldr r0, [r7, #4]
800ea2c: f000 fdd0 bl 800f5d0 <ip4_reass>
800ea30: 6078 str r0, [r7, #4]
/* packet not fully reassembled yet? */
if (p == NULL) {
800ea32: 687b ldr r3, [r7, #4]
800ea34: 2b00 cmp r3, #0
800ea36: d101 bne.n 800ea3c <ip4_input+0x1a8>
return ERR_OK;
800ea38: 2300 movs r3, #0
800ea3a: e064 b.n 800eb06 <ip4_input+0x272>
}
iphdr = (const struct ip_hdr *)p->payload;
800ea3c: 687b ldr r3, [r7, #4]
800ea3e: 685b ldr r3, [r3, #4]
800ea40: 61fb str r3, [r7, #28]
/* send to upper layers */
LWIP_DEBUGF(IP_DEBUG, ("ip4_input: \n"));
ip4_debug_print(p);
LWIP_DEBUGF(IP_DEBUG, ("ip4_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len));
ip_data.current_netif = netif;
800ea42: 4a33 ldr r2, [pc, #204] ; (800eb10 <ip4_input+0x27c>)
800ea44: 69bb ldr r3, [r7, #24]
800ea46: 6013 str r3, [r2, #0]
ip_data.current_input_netif = inp;
800ea48: 4a31 ldr r2, [pc, #196] ; (800eb10 <ip4_input+0x27c>)
800ea4a: 683b ldr r3, [r7, #0]
800ea4c: 6053 str r3, [r2, #4]
ip_data.current_ip4_header = iphdr;
800ea4e: 4a30 ldr r2, [pc, #192] ; (800eb10 <ip4_input+0x27c>)
800ea50: 69fb ldr r3, [r7, #28]
800ea52: 6093 str r3, [r2, #8]
ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr);
800ea54: 69fb ldr r3, [r7, #28]
800ea56: 781b ldrb r3, [r3, #0]
800ea58: f003 030f and.w r3, r3, #15
800ea5c: b2db uxtb r3, r3
800ea5e: 009b lsls r3, r3, #2
800ea60: b2db uxtb r3, r3
800ea62: b29a uxth r2, r3
800ea64: 4b2a ldr r3, [pc, #168] ; (800eb10 <ip4_input+0x27c>)
800ea66: 819a strh r2, [r3, #12]
/* raw input did not eat the packet? */
raw_status = raw_input(p, inp);
if (raw_status != RAW_INPUT_EATEN)
#endif /* LWIP_RAW */
{
pbuf_remove_header(p, iphdr_hlen); /* Move to payload, no check necessary. */
800ea68: 8a7b ldrh r3, [r7, #18]
800ea6a: 4619 mov r1, r3
800ea6c: 6878 ldr r0, [r7, #4]
800ea6e: f7f6 fc81 bl 8005374 <pbuf_remove_header>
switch (IPH_PROTO(iphdr)) {
800ea72: 69fb ldr r3, [r7, #28]
800ea74: 7a5b ldrb r3, [r3, #9]
800ea76: 2b11 cmp r3, #17
800ea78: d006 beq.n 800ea88 <ip4_input+0x1f4>
800ea7a: 2b11 cmp r3, #17
800ea7c: dc13 bgt.n 800eaa6 <ip4_input+0x212>
800ea7e: 2b01 cmp r3, #1
800ea80: d00c beq.n 800ea9c <ip4_input+0x208>
800ea82: 2b06 cmp r3, #6
800ea84: d005 beq.n 800ea92 <ip4_input+0x1fe>
800ea86: e00e b.n 800eaa6 <ip4_input+0x212>
case IP_PROTO_UDP:
#if LWIP_UDPLITE
case IP_PROTO_UDPLITE:
#endif /* LWIP_UDPLITE */
MIB2_STATS_INC(mib2.ipindelivers);
udp_input(p, inp);
800ea88: 6839 ldr r1, [r7, #0]
800ea8a: 6878 ldr r0, [r7, #4]
800ea8c: f7fc faea bl 800b064 <udp_input>
break;
800ea90: e026 b.n 800eae0 <ip4_input+0x24c>
#endif /* LWIP_UDP */
#if LWIP_TCP
case IP_PROTO_TCP:
MIB2_STATS_INC(mib2.ipindelivers);
tcp_input(p, inp);
800ea92: 6839 ldr r1, [r7, #0]
800ea94: 6878 ldr r0, [r7, #4]
800ea96: f7f8 fb2b bl 80070f0 <tcp_input>
break;
800ea9a: e021 b.n 800eae0 <ip4_input+0x24c>
#endif /* LWIP_TCP */
#if LWIP_ICMP
case IP_PROTO_ICMP:
MIB2_STATS_INC(mib2.ipindelivers);
icmp_input(p, inp);
800ea9c: 6839 ldr r1, [r7, #0]
800ea9e: 6878 ldr r0, [r7, #4]
800eaa0: f7ff fcd0 bl 800e444 <icmp_input>
break;
800eaa4: e01c b.n 800eae0 <ip4_input+0x24c>
} else
#endif /* LWIP_RAW */
{
#if LWIP_ICMP
/* send ICMP destination protocol unreachable unless is was a broadcast */
if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
800eaa6: 4b1a ldr r3, [pc, #104] ; (800eb10 <ip4_input+0x27c>)
800eaa8: 695b ldr r3, [r3, #20]
800eaaa: 69b9 ldr r1, [r7, #24]
800eaac: 4618 mov r0, r3
800eaae: f000 f90b bl 800ecc8 <ip4_addr_isbroadcast_u32>
800eab2: 4603 mov r3, r0
800eab4: 2b00 cmp r3, #0
800eab6: d10f bne.n 800ead8 <ip4_input+0x244>
!ip4_addr_ismulticast(ip4_current_dest_addr())) {
800eab8: 4b15 ldr r3, [pc, #84] ; (800eb10 <ip4_input+0x27c>)
800eaba: 695b ldr r3, [r3, #20]
800eabc: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
800eac0: 2be0 cmp r3, #224 ; 0xe0
800eac2: d009 beq.n 800ead8 <ip4_input+0x244>
pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */
800eac4: f9b7 3012 ldrsh.w r3, [r7, #18]
800eac8: 4619 mov r1, r3
800eaca: 6878 ldr r0, [r7, #4]
800eacc: f7f6 fcc5 bl 800545a <pbuf_header_force>
icmp_dest_unreach(p, ICMP_DUR_PROTO);
800ead0: 2102 movs r1, #2
800ead2: 6878 ldr r0, [r7, #4]
800ead4: f7ff fdba bl 800e64c <icmp_dest_unreach>
IP_STATS_INC(ip.proterr);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinunknownprotos);
}
pbuf_free(p);
800ead8: 6878 ldr r0, [r7, #4]
800eada: f7f6 fcd1 bl 8005480 <pbuf_free>
break;
800eade: bf00 nop
}
}
/* @todo: this is not really necessary... */
ip_data.current_netif = NULL;
800eae0: 4b0b ldr r3, [pc, #44] ; (800eb10 <ip4_input+0x27c>)
800eae2: 2200 movs r2, #0
800eae4: 601a str r2, [r3, #0]
ip_data.current_input_netif = NULL;
800eae6: 4b0a ldr r3, [pc, #40] ; (800eb10 <ip4_input+0x27c>)
800eae8: 2200 movs r2, #0
800eaea: 605a str r2, [r3, #4]
ip_data.current_ip4_header = NULL;
800eaec: 4b08 ldr r3, [pc, #32] ; (800eb10 <ip4_input+0x27c>)
800eaee: 2200 movs r2, #0
800eaf0: 609a str r2, [r3, #8]
ip_data.current_ip_header_tot_len = 0;
800eaf2: 4b07 ldr r3, [pc, #28] ; (800eb10 <ip4_input+0x27c>)
800eaf4: 2200 movs r2, #0
800eaf6: 819a strh r2, [r3, #12]
ip4_addr_set_any(ip4_current_src_addr());
800eaf8: 4b05 ldr r3, [pc, #20] ; (800eb10 <ip4_input+0x27c>)
800eafa: 2200 movs r2, #0
800eafc: 611a str r2, [r3, #16]
ip4_addr_set_any(ip4_current_dest_addr());
800eafe: 4b04 ldr r3, [pc, #16] ; (800eb10 <ip4_input+0x27c>)
800eb00: 2200 movs r2, #0
800eb02: 615a str r2, [r3, #20]
return ERR_OK;
800eb04: 2300 movs r3, #0
}
800eb06: 4618 mov r0, r3
800eb08: 3720 adds r7, #32
800eb0a: 46bd mov sp, r7
800eb0c: bd80 pop {r7, pc}
800eb0e: bf00 nop
800eb10: 2000561c .word 0x2000561c
800eb14: 20008ba0 .word 0x20008ba0
0800eb18 <ip4_output_if>:
*/
err_t
ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest,
u8_t ttl, u8_t tos,
u8_t proto, struct netif *netif)
{
800eb18: b580 push {r7, lr}
800eb1a: b08a sub sp, #40 ; 0x28
800eb1c: af04 add r7, sp, #16
800eb1e: 60f8 str r0, [r7, #12]
800eb20: 60b9 str r1, [r7, #8]
800eb22: 607a str r2, [r7, #4]
800eb24: 70fb strb r3, [r7, #3]
ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest,
u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options,
u16_t optlen)
{
#endif /* IP_OPTIONS_SEND */
const ip4_addr_t *src_used = src;
800eb26: 68bb ldr r3, [r7, #8]
800eb28: 617b str r3, [r7, #20]
if (dest != LWIP_IP_HDRINCL) {
800eb2a: 687b ldr r3, [r7, #4]
800eb2c: 2b00 cmp r3, #0
800eb2e: d009 beq.n 800eb44 <ip4_output_if+0x2c>
if (ip4_addr_isany(src)) {
800eb30: 68bb ldr r3, [r7, #8]
800eb32: 2b00 cmp r3, #0
800eb34: d003 beq.n 800eb3e <ip4_output_if+0x26>
800eb36: 68bb ldr r3, [r7, #8]
800eb38: 681b ldr r3, [r3, #0]
800eb3a: 2b00 cmp r3, #0
800eb3c: d102 bne.n 800eb44 <ip4_output_if+0x2c>
src_used = netif_ip4_addr(netif);
800eb3e: 6abb ldr r3, [r7, #40] ; 0x28
800eb40: 3304 adds r3, #4
800eb42: 617b str r3, [r7, #20]
#if IP_OPTIONS_SEND
return ip4_output_if_opt_src(p, src_used, dest, ttl, tos, proto, netif,
ip_options, optlen);
#else /* IP_OPTIONS_SEND */
return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif);
800eb44: 78fa ldrb r2, [r7, #3]
800eb46: 6abb ldr r3, [r7, #40] ; 0x28
800eb48: 9302 str r3, [sp, #8]
800eb4a: f897 3024 ldrb.w r3, [r7, #36] ; 0x24
800eb4e: 9301 str r3, [sp, #4]
800eb50: f897 3020 ldrb.w r3, [r7, #32]
800eb54: 9300 str r3, [sp, #0]
800eb56: 4613 mov r3, r2
800eb58: 687a ldr r2, [r7, #4]
800eb5a: 6979 ldr r1, [r7, #20]
800eb5c: 68f8 ldr r0, [r7, #12]
800eb5e: f000 f805 bl 800eb6c <ip4_output_if_src>
800eb62: 4603 mov r3, r0
#endif /* IP_OPTIONS_SEND */
}
800eb64: 4618 mov r0, r3
800eb66: 3718 adds r7, #24
800eb68: 46bd mov sp, r7
800eb6a: bd80 pop {r7, pc}
0800eb6c <ip4_output_if_src>:
*/
err_t
ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest,
u8_t ttl, u8_t tos,
u8_t proto, struct netif *netif)
{
800eb6c: b580 push {r7, lr}
800eb6e: b088 sub sp, #32
800eb70: af00 add r7, sp, #0
800eb72: 60f8 str r0, [r7, #12]
800eb74: 60b9 str r1, [r7, #8]
800eb76: 607a str r2, [r7, #4]
800eb78: 70fb strb r3, [r7, #3]
#if CHECKSUM_GEN_IP_INLINE
u32_t chk_sum = 0;
#endif /* CHECKSUM_GEN_IP_INLINE */
LWIP_ASSERT_CORE_LOCKED();
LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p);
800eb7a: 68fb ldr r3, [r7, #12]
800eb7c: 7b9b ldrb r3, [r3, #14]
800eb7e: 2b01 cmp r3, #1
800eb80: d006 beq.n 800eb90 <ip4_output_if_src+0x24>
800eb82: 4b4b ldr r3, [pc, #300] ; (800ecb0 <ip4_output_if_src+0x144>)
800eb84: f44f 7255 mov.w r2, #852 ; 0x354
800eb88: 494a ldr r1, [pc, #296] ; (800ecb4 <ip4_output_if_src+0x148>)
800eb8a: 484b ldr r0, [pc, #300] ; (800ecb8 <ip4_output_if_src+0x14c>)
800eb8c: f001 f994 bl 800feb8 <printf>
MIB2_STATS_INC(mib2.ipoutrequests);
/* Should the IP header be generated or is it already included in p? */
if (dest != LWIP_IP_HDRINCL) {
800eb90: 687b ldr r3, [r7, #4]
800eb92: 2b00 cmp r3, #0
800eb94: d060 beq.n 800ec58 <ip4_output_if_src+0xec>
u16_t ip_hlen = IP_HLEN;
800eb96: 2314 movs r3, #20
800eb98: 837b strh r3, [r7, #26]
}
#endif /* CHECKSUM_GEN_IP_INLINE */
}
#endif /* IP_OPTIONS_SEND */
/* generate IP header */
if (pbuf_add_header(p, IP_HLEN)) {
800eb9a: 2114 movs r1, #20
800eb9c: 68f8 ldr r0, [r7, #12]
800eb9e: f7f6 fbd9 bl 8005354 <pbuf_add_header>
800eba2: 4603 mov r3, r0
800eba4: 2b00 cmp r3, #0
800eba6: d002 beq.n 800ebae <ip4_output_if_src+0x42>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: not enough room for IP header in pbuf\n"));
IP_STATS_INC(ip.err);
MIB2_STATS_INC(mib2.ipoutdiscards);
return ERR_BUF;
800eba8: f06f 0301 mvn.w r3, #1
800ebac: e07c b.n 800eca8 <ip4_output_if_src+0x13c>
}
iphdr = (struct ip_hdr *)p->payload;
800ebae: 68fb ldr r3, [r7, #12]
800ebb0: 685b ldr r3, [r3, #4]
800ebb2: 61fb str r3, [r7, #28]
LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
800ebb4: 68fb ldr r3, [r7, #12]
800ebb6: 895b ldrh r3, [r3, #10]
800ebb8: 2b13 cmp r3, #19
800ebba: d806 bhi.n 800ebca <ip4_output_if_src+0x5e>
800ebbc: 4b3c ldr r3, [pc, #240] ; (800ecb0 <ip4_output_if_src+0x144>)
800ebbe: f44f 7262 mov.w r2, #904 ; 0x388
800ebc2: 493e ldr r1, [pc, #248] ; (800ecbc <ip4_output_if_src+0x150>)
800ebc4: 483c ldr r0, [pc, #240] ; (800ecb8 <ip4_output_if_src+0x14c>)
800ebc6: f001 f977 bl 800feb8 <printf>
(p->len >= sizeof(struct ip_hdr)));
IPH_TTL_SET(iphdr, ttl);
800ebca: 69fb ldr r3, [r7, #28]
800ebcc: 78fa ldrb r2, [r7, #3]
800ebce: 721a strb r2, [r3, #8]
IPH_PROTO_SET(iphdr, proto);
800ebd0: 69fb ldr r3, [r7, #28]
800ebd2: f897 202c ldrb.w r2, [r7, #44] ; 0x2c
800ebd6: 725a strb r2, [r3, #9]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += PP_NTOHS(proto | (ttl << 8));
#endif /* CHECKSUM_GEN_IP_INLINE */
/* dest cannot be NULL here */
ip4_addr_copy(iphdr->dest, *dest);
800ebd8: 687b ldr r3, [r7, #4]
800ebda: 681a ldr r2, [r3, #0]
800ebdc: 69fb ldr r3, [r7, #28]
800ebde: 611a str r2, [r3, #16]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += ip4_addr_get_u32(&iphdr->dest) & 0xFFFF;
chk_sum += ip4_addr_get_u32(&iphdr->dest) >> 16;
#endif /* CHECKSUM_GEN_IP_INLINE */
IPH_VHL_SET(iphdr, 4, ip_hlen / 4);
800ebe0: 8b7b ldrh r3, [r7, #26]
800ebe2: 089b lsrs r3, r3, #2
800ebe4: b29b uxth r3, r3
800ebe6: b2db uxtb r3, r3
800ebe8: f043 0340 orr.w r3, r3, #64 ; 0x40
800ebec: b2da uxtb r2, r3
800ebee: 69fb ldr r3, [r7, #28]
800ebf0: 701a strb r2, [r3, #0]
IPH_TOS_SET(iphdr, tos);
800ebf2: 69fb ldr r3, [r7, #28]
800ebf4: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
800ebf8: 705a strb r2, [r3, #1]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += PP_NTOHS(tos | (iphdr->_v_hl << 8));
#endif /* CHECKSUM_GEN_IP_INLINE */
IPH_LEN_SET(iphdr, lwip_htons(p->tot_len));
800ebfa: 68fb ldr r3, [r7, #12]
800ebfc: 891b ldrh r3, [r3, #8]
800ebfe: 4618 mov r0, r3
800ec00: f7f5 f8d4 bl 8003dac <lwip_htons>
800ec04: 4603 mov r3, r0
800ec06: 461a mov r2, r3
800ec08: 69fb ldr r3, [r7, #28]
800ec0a: 805a strh r2, [r3, #2]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += iphdr->_len;
#endif /* CHECKSUM_GEN_IP_INLINE */
IPH_OFFSET_SET(iphdr, 0);
800ec0c: 69fb ldr r3, [r7, #28]
800ec0e: 2200 movs r2, #0
800ec10: 719a strb r2, [r3, #6]
800ec12: 2200 movs r2, #0
800ec14: 71da strb r2, [r3, #7]
IPH_ID_SET(iphdr, lwip_htons(ip_id));
800ec16: 4b2a ldr r3, [pc, #168] ; (800ecc0 <ip4_output_if_src+0x154>)
800ec18: 881b ldrh r3, [r3, #0]
800ec1a: 4618 mov r0, r3
800ec1c: f7f5 f8c6 bl 8003dac <lwip_htons>
800ec20: 4603 mov r3, r0
800ec22: 461a mov r2, r3
800ec24: 69fb ldr r3, [r7, #28]
800ec26: 809a strh r2, [r3, #4]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += iphdr->_id;
#endif /* CHECKSUM_GEN_IP_INLINE */
++ip_id;
800ec28: 4b25 ldr r3, [pc, #148] ; (800ecc0 <ip4_output_if_src+0x154>)
800ec2a: 881b ldrh r3, [r3, #0]
800ec2c: 3301 adds r3, #1
800ec2e: b29a uxth r2, r3
800ec30: 4b23 ldr r3, [pc, #140] ; (800ecc0 <ip4_output_if_src+0x154>)
800ec32: 801a strh r2, [r3, #0]
if (src == NULL) {
800ec34: 68bb ldr r3, [r7, #8]
800ec36: 2b00 cmp r3, #0
800ec38: d104 bne.n 800ec44 <ip4_output_if_src+0xd8>
ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4);
800ec3a: 4b22 ldr r3, [pc, #136] ; (800ecc4 <ip4_output_if_src+0x158>)
800ec3c: 681a ldr r2, [r3, #0]
800ec3e: 69fb ldr r3, [r7, #28]
800ec40: 60da str r2, [r3, #12]
800ec42: e003 b.n 800ec4c <ip4_output_if_src+0xe0>
} else {
/* src cannot be NULL here */
ip4_addr_copy(iphdr->src, *src);
800ec44: 68bb ldr r3, [r7, #8]
800ec46: 681a ldr r2, [r3, #0]
800ec48: 69fb ldr r3, [r7, #28]
800ec4a: 60da str r2, [r3, #12]
else {
IPH_CHKSUM_SET(iphdr, 0);
}
#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/
#else /* CHECKSUM_GEN_IP_INLINE */
IPH_CHKSUM_SET(iphdr, 0);
800ec4c: 69fb ldr r3, [r7, #28]
800ec4e: 2200 movs r2, #0
800ec50: 729a strb r2, [r3, #10]
800ec52: 2200 movs r2, #0
800ec54: 72da strb r2, [r3, #11]
800ec56: e00f b.n 800ec78 <ip4_output_if_src+0x10c>
}
#endif /* CHECKSUM_GEN_IP */
#endif /* CHECKSUM_GEN_IP_INLINE */
} else {
/* IP header already included in p */
if (p->len < IP_HLEN) {
800ec58: 68fb ldr r3, [r7, #12]
800ec5a: 895b ldrh r3, [r3, #10]
800ec5c: 2b13 cmp r3, #19
800ec5e: d802 bhi.n 800ec66 <ip4_output_if_src+0xfa>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: LWIP_IP_HDRINCL but pbuf is too short\n"));
IP_STATS_INC(ip.err);
MIB2_STATS_INC(mib2.ipoutdiscards);
return ERR_BUF;
800ec60: f06f 0301 mvn.w r3, #1
800ec64: e020 b.n 800eca8 <ip4_output_if_src+0x13c>
}
iphdr = (struct ip_hdr *)p->payload;
800ec66: 68fb ldr r3, [r7, #12]
800ec68: 685b ldr r3, [r3, #4]
800ec6a: 61fb str r3, [r7, #28]
ip4_addr_copy(dest_addr, iphdr->dest);
800ec6c: 69fb ldr r3, [r7, #28]
800ec6e: 691b ldr r3, [r3, #16]
800ec70: 617b str r3, [r7, #20]
dest = &dest_addr;
800ec72: f107 0314 add.w r3, r7, #20
800ec76: 607b str r3, [r7, #4]
}
#endif /* LWIP_MULTICAST_TX_OPTIONS */
#endif /* ENABLE_LOOPBACK */
#if IP_FRAG
/* don't fragment if interface has mtu set to 0 [loopif] */
if (netif->mtu && (p->tot_len > netif->mtu)) {
800ec78: 6b3b ldr r3, [r7, #48] ; 0x30
800ec7a: 8d1b ldrh r3, [r3, #40] ; 0x28
800ec7c: 2b00 cmp r3, #0
800ec7e: d00c beq.n 800ec9a <ip4_output_if_src+0x12e>
800ec80: 68fb ldr r3, [r7, #12]
800ec82: 891a ldrh r2, [r3, #8]
800ec84: 6b3b ldr r3, [r7, #48] ; 0x30
800ec86: 8d1b ldrh r3, [r3, #40] ; 0x28
800ec88: 429a cmp r2, r3
800ec8a: d906 bls.n 800ec9a <ip4_output_if_src+0x12e>
return ip4_frag(p, netif, dest);
800ec8c: 687a ldr r2, [r7, #4]
800ec8e: 6b39 ldr r1, [r7, #48] ; 0x30
800ec90: 68f8 ldr r0, [r7, #12]
800ec92: f000 fe91 bl 800f9b8 <ip4_frag>
800ec96: 4603 mov r3, r0
800ec98: e006 b.n 800eca8 <ip4_output_if_src+0x13c>
}
#endif /* IP_FRAG */
LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));
return netif->output(netif, p, dest);
800ec9a: 6b3b ldr r3, [r7, #48] ; 0x30
800ec9c: 695b ldr r3, [r3, #20]
800ec9e: 687a ldr r2, [r7, #4]
800eca0: 68f9 ldr r1, [r7, #12]
800eca2: 6b38 ldr r0, [r7, #48] ; 0x30
800eca4: 4798 blx r3
800eca6: 4603 mov r3, r0
}
800eca8: 4618 mov r0, r3
800ecaa: 3720 adds r7, #32
800ecac: 46bd mov sp, r7
800ecae: bd80 pop {r7, pc}
800ecb0: 08017404 .word 0x08017404
800ecb4: 08017438 .word 0x08017438
800ecb8: 08017444 .word 0x08017444
800ecbc: 0801746c .word 0x0801746c
800ecc0: 20008d32 .word 0x20008d32
800ecc4: 080178c4 .word 0x080178c4
0800ecc8 <ip4_addr_isbroadcast_u32>:
* @param netif the network interface against which the address is checked
* @return returns non-zero if the address is a broadcast address
*/
u8_t
ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif)
{
800ecc8: b480 push {r7}
800ecca: b085 sub sp, #20
800eccc: af00 add r7, sp, #0
800ecce: 6078 str r0, [r7, #4]
800ecd0: 6039 str r1, [r7, #0]
ip4_addr_t ipaddr;
ip4_addr_set_u32(&ipaddr, addr);
800ecd2: 687b ldr r3, [r7, #4]
800ecd4: 60fb str r3, [r7, #12]
/* all ones (broadcast) or all zeroes (old skool broadcast) */
if ((~addr == IPADDR_ANY) ||
800ecd6: 687b ldr r3, [r7, #4]
800ecd8: f1b3 3fff cmp.w r3, #4294967295
800ecdc: d002 beq.n 800ece4 <ip4_addr_isbroadcast_u32+0x1c>
800ecde: 687b ldr r3, [r7, #4]
800ece0: 2b00 cmp r3, #0
800ece2: d101 bne.n 800ece8 <ip4_addr_isbroadcast_u32+0x20>
(addr == IPADDR_ANY)) {
return 1;
800ece4: 2301 movs r3, #1
800ece6: e02a b.n 800ed3e <ip4_addr_isbroadcast_u32+0x76>
/* no broadcast support on this network interface? */
} else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) {
800ece8: 683b ldr r3, [r7, #0]
800ecea: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ecee: f003 0302 and.w r3, r3, #2
800ecf2: 2b00 cmp r3, #0
800ecf4: d101 bne.n 800ecfa <ip4_addr_isbroadcast_u32+0x32>
/* the given address cannot be a broadcast address
* nor can we check against any broadcast addresses */
return 0;
800ecf6: 2300 movs r3, #0
800ecf8: e021 b.n 800ed3e <ip4_addr_isbroadcast_u32+0x76>
/* address matches network interface address exactly? => no broadcast */
} else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) {
800ecfa: 683b ldr r3, [r7, #0]
800ecfc: 3304 adds r3, #4
800ecfe: 681b ldr r3, [r3, #0]
800ed00: 687a ldr r2, [r7, #4]
800ed02: 429a cmp r2, r3
800ed04: d101 bne.n 800ed0a <ip4_addr_isbroadcast_u32+0x42>
return 0;
800ed06: 2300 movs r3, #0
800ed08: e019 b.n 800ed3e <ip4_addr_isbroadcast_u32+0x76>
/* on the same (sub) network... */
} else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif))
800ed0a: 68fa ldr r2, [r7, #12]
800ed0c: 683b ldr r3, [r7, #0]
800ed0e: 3304 adds r3, #4
800ed10: 681b ldr r3, [r3, #0]
800ed12: 405a eors r2, r3
800ed14: 683b ldr r3, [r7, #0]
800ed16: 3308 adds r3, #8
800ed18: 681b ldr r3, [r3, #0]
800ed1a: 4013 ands r3, r2
800ed1c: 2b00 cmp r3, #0
800ed1e: d10d bne.n 800ed3c <ip4_addr_isbroadcast_u32+0x74>
/* ...and host identifier bits are all ones? =>... */
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
800ed20: 683b ldr r3, [r7, #0]
800ed22: 3308 adds r3, #8
800ed24: 681b ldr r3, [r3, #0]
800ed26: 43da mvns r2, r3
800ed28: 687b ldr r3, [r7, #4]
800ed2a: 401a ands r2, r3
(IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) {
800ed2c: 683b ldr r3, [r7, #0]
800ed2e: 3308 adds r3, #8
800ed30: 681b ldr r3, [r3, #0]
800ed32: 43db mvns r3, r3
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
800ed34: 429a cmp r2, r3
800ed36: d101 bne.n 800ed3c <ip4_addr_isbroadcast_u32+0x74>
/* => network broadcast address */
return 1;
800ed38: 2301 movs r3, #1
800ed3a: e000 b.n 800ed3e <ip4_addr_isbroadcast_u32+0x76>
} else {
return 0;
800ed3c: 2300 movs r3, #0
}
}
800ed3e: 4618 mov r0, r3
800ed40: 3714 adds r7, #20
800ed42: 46bd mov sp, r7
800ed44: f85d 7b04 ldr.w r7, [sp], #4
800ed48: 4770 bx lr
0800ed4a <ipaddr_addr>:
* @param cp IP address in ascii representation (e.g. "127.0.0.1")
* @return ip address in network order
*/
u32_t
ipaddr_addr(const char *cp)
{
800ed4a: b580 push {r7, lr}
800ed4c: b084 sub sp, #16
800ed4e: af00 add r7, sp, #0
800ed50: 6078 str r0, [r7, #4]
ip4_addr_t val;
if (ip4addr_aton(cp, &val)) {
800ed52: f107 030c add.w r3, r7, #12
800ed56: 4619 mov r1, r3
800ed58: 6878 ldr r0, [r7, #4]
800ed5a: f000 f80b bl 800ed74 <ip4addr_aton>
800ed5e: 4603 mov r3, r0
800ed60: 2b00 cmp r3, #0
800ed62: d001 beq.n 800ed68 <ipaddr_addr+0x1e>
return ip4_addr_get_u32(&val);
800ed64: 68fb ldr r3, [r7, #12]
800ed66: e001 b.n 800ed6c <ipaddr_addr+0x22>
}
return (IPADDR_NONE);
800ed68: f04f 33ff mov.w r3, #4294967295
}
800ed6c: 4618 mov r0, r3
800ed6e: 3710 adds r7, #16
800ed70: 46bd mov sp, r7
800ed72: bd80 pop {r7, pc}
0800ed74 <ip4addr_aton>:
* @param addr pointer to which to save the ip address in network order
* @return 1 if cp could be converted to addr, 0 on failure
*/
int
ip4addr_aton(const char *cp, ip4_addr_t *addr)
{
800ed74: b580 push {r7, lr}
800ed76: b08a sub sp, #40 ; 0x28
800ed78: af00 add r7, sp, #0
800ed7a: 6078 str r0, [r7, #4]
800ed7c: 6039 str r1, [r7, #0]
u32_t val;
u8_t base;
char c;
u32_t parts[4];
u32_t *pp = parts;
800ed7e: f107 030c add.w r3, r7, #12
800ed82: 61fb str r3, [r7, #28]
c = *cp;
800ed84: 687b ldr r3, [r7, #4]
800ed86: 781b ldrb r3, [r3, #0]
800ed88: f887 3022 strb.w r3, [r7, #34] ; 0x22
/*
* Collect number up to ``.''.
* Values are specified as for C:
* 0x=hex, 0=octal, 1-9=decimal.
*/
if (!lwip_isdigit(c)) {
800ed8c: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800ed90: 3301 adds r3, #1
800ed92: 4a89 ldr r2, [pc, #548] ; (800efb8 <ip4addr_aton+0x244>)
800ed94: 4413 add r3, r2
800ed96: 781b ldrb r3, [r3, #0]
800ed98: f003 0304 and.w r3, r3, #4
800ed9c: 2b00 cmp r3, #0
800ed9e: d101 bne.n 800eda4 <ip4addr_aton+0x30>
return 0;
800eda0: 2300 movs r3, #0
800eda2: e105 b.n 800efb0 <ip4addr_aton+0x23c>
}
val = 0;
800eda4: 2300 movs r3, #0
800eda6: 627b str r3, [r7, #36] ; 0x24
base = 10;
800eda8: 230a movs r3, #10
800edaa: f887 3023 strb.w r3, [r7, #35] ; 0x23
if (c == '0') {
800edae: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800edb2: 2b30 cmp r3, #48 ; 0x30
800edb4: d11c bne.n 800edf0 <ip4addr_aton+0x7c>
c = *++cp;
800edb6: 687b ldr r3, [r7, #4]
800edb8: 3301 adds r3, #1
800edba: 607b str r3, [r7, #4]
800edbc: 687b ldr r3, [r7, #4]
800edbe: 781b ldrb r3, [r3, #0]
800edc0: f887 3022 strb.w r3, [r7, #34] ; 0x22
if (c == 'x' || c == 'X') {
800edc4: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800edc8: 2b78 cmp r3, #120 ; 0x78
800edca: d003 beq.n 800edd4 <ip4addr_aton+0x60>
800edcc: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800edd0: 2b58 cmp r3, #88 ; 0x58
800edd2: d10a bne.n 800edea <ip4addr_aton+0x76>
base = 16;
800edd4: 2310 movs r3, #16
800edd6: f887 3023 strb.w r3, [r7, #35] ; 0x23
c = *++cp;
800edda: 687b ldr r3, [r7, #4]
800eddc: 3301 adds r3, #1
800edde: 607b str r3, [r7, #4]
800ede0: 687b ldr r3, [r7, #4]
800ede2: 781b ldrb r3, [r3, #0]
800ede4: f887 3022 strb.w r3, [r7, #34] ; 0x22
800ede8: e002 b.n 800edf0 <ip4addr_aton+0x7c>
} else {
base = 8;
800edea: 2308 movs r3, #8
800edec: f887 3023 strb.w r3, [r7, #35] ; 0x23
}
}
for (;;) {
if (lwip_isdigit(c)) {
800edf0: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800edf4: 3301 adds r3, #1
800edf6: 4a70 ldr r2, [pc, #448] ; (800efb8 <ip4addr_aton+0x244>)
800edf8: 4413 add r3, r2
800edfa: 781b ldrb r3, [r3, #0]
800edfc: f003 0304 and.w r3, r3, #4
800ee00: 2b00 cmp r3, #0
800ee02: d011 beq.n 800ee28 <ip4addr_aton+0xb4>
val = (val * base) + (u32_t)(c - '0');
800ee04: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
800ee08: 6a7a ldr r2, [r7, #36] ; 0x24
800ee0a: fb03 f202 mul.w r2, r3, r2
800ee0e: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800ee12: 4413 add r3, r2
800ee14: 3b30 subs r3, #48 ; 0x30
800ee16: 627b str r3, [r7, #36] ; 0x24
c = *++cp;
800ee18: 687b ldr r3, [r7, #4]
800ee1a: 3301 adds r3, #1
800ee1c: 607b str r3, [r7, #4]
800ee1e: 687b ldr r3, [r7, #4]
800ee20: 781b ldrb r3, [r3, #0]
800ee22: f887 3022 strb.w r3, [r7, #34] ; 0x22
800ee26: e7e3 b.n 800edf0 <ip4addr_aton+0x7c>
} else if (base == 16 && lwip_isxdigit(c)) {
800ee28: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
800ee2c: 2b10 cmp r3, #16
800ee2e: d127 bne.n 800ee80 <ip4addr_aton+0x10c>
800ee30: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800ee34: 3301 adds r3, #1
800ee36: 4a60 ldr r2, [pc, #384] ; (800efb8 <ip4addr_aton+0x244>)
800ee38: 4413 add r3, r2
800ee3a: 781b ldrb r3, [r3, #0]
800ee3c: f003 0344 and.w r3, r3, #68 ; 0x44
800ee40: 2b00 cmp r3, #0
800ee42: d01d beq.n 800ee80 <ip4addr_aton+0x10c>
val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A'));
800ee44: 6a7b ldr r3, [r7, #36] ; 0x24
800ee46: 011b lsls r3, r3, #4
800ee48: f897 2022 ldrb.w r2, [r7, #34] ; 0x22
800ee4c: f102 010a add.w r1, r2, #10
800ee50: f897 2022 ldrb.w r2, [r7, #34] ; 0x22
800ee54: 3201 adds r2, #1
800ee56: 4858 ldr r0, [pc, #352] ; (800efb8 <ip4addr_aton+0x244>)
800ee58: 4402 add r2, r0
800ee5a: 7812 ldrb r2, [r2, #0]
800ee5c: f002 0203 and.w r2, r2, #3
800ee60: 2a02 cmp r2, #2
800ee62: d101 bne.n 800ee68 <ip4addr_aton+0xf4>
800ee64: 2261 movs r2, #97 ; 0x61
800ee66: e000 b.n 800ee6a <ip4addr_aton+0xf6>
800ee68: 2241 movs r2, #65 ; 0x41
800ee6a: 1a8a subs r2, r1, r2
800ee6c: 4313 orrs r3, r2
800ee6e: 627b str r3, [r7, #36] ; 0x24
c = *++cp;
800ee70: 687b ldr r3, [r7, #4]
800ee72: 3301 adds r3, #1
800ee74: 607b str r3, [r7, #4]
800ee76: 687b ldr r3, [r7, #4]
800ee78: 781b ldrb r3, [r3, #0]
800ee7a: f887 3022 strb.w r3, [r7, #34] ; 0x22
if (lwip_isdigit(c)) {
800ee7e: e7b7 b.n 800edf0 <ip4addr_aton+0x7c>
} else {
break;
}
}
if (c == '.') {
800ee80: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800ee84: 2b2e cmp r3, #46 ; 0x2e
800ee86: d114 bne.n 800eeb2 <ip4addr_aton+0x13e>
* Internet format:
* a.b.c.d
* a.b.c (with c treated as 16 bits)
* a.b (with b treated as 24 bits)
*/
if (pp >= parts + 3) {
800ee88: f107 030c add.w r3, r7, #12
800ee8c: 330c adds r3, #12
800ee8e: 69fa ldr r2, [r7, #28]
800ee90: 429a cmp r2, r3
800ee92: d301 bcc.n 800ee98 <ip4addr_aton+0x124>
return 0;
800ee94: 2300 movs r3, #0
800ee96: e08b b.n 800efb0 <ip4addr_aton+0x23c>
}
*pp++ = val;
800ee98: 69fb ldr r3, [r7, #28]
800ee9a: 1d1a adds r2, r3, #4
800ee9c: 61fa str r2, [r7, #28]
800ee9e: 6a7a ldr r2, [r7, #36] ; 0x24
800eea0: 601a str r2, [r3, #0]
c = *++cp;
800eea2: 687b ldr r3, [r7, #4]
800eea4: 3301 adds r3, #1
800eea6: 607b str r3, [r7, #4]
800eea8: 687b ldr r3, [r7, #4]
800eeaa: 781b ldrb r3, [r3, #0]
800eeac: f887 3022 strb.w r3, [r7, #34] ; 0x22
if (!lwip_isdigit(c)) {
800eeb0: e76c b.n 800ed8c <ip4addr_aton+0x18>
} else {
break;
800eeb2: bf00 nop
}
}
/*
* Check for trailing characters.
*/
if (c != '\0' && !lwip_isspace(c)) {
800eeb4: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800eeb8: 2b00 cmp r3, #0
800eeba: d00b beq.n 800eed4 <ip4addr_aton+0x160>
800eebc: f897 3022 ldrb.w r3, [r7, #34] ; 0x22
800eec0: 3301 adds r3, #1
800eec2: 4a3d ldr r2, [pc, #244] ; (800efb8 <ip4addr_aton+0x244>)
800eec4: 4413 add r3, r2
800eec6: 781b ldrb r3, [r3, #0]
800eec8: f003 0308 and.w r3, r3, #8
800eecc: 2b00 cmp r3, #0
800eece: d101 bne.n 800eed4 <ip4addr_aton+0x160>
return 0;
800eed0: 2300 movs r3, #0
800eed2: e06d b.n 800efb0 <ip4addr_aton+0x23c>
}
/*
* Concoct the address according to
* the number of parts specified.
*/
switch (pp - parts + 1) {
800eed4: f107 030c add.w r3, r7, #12
800eed8: 69fa ldr r2, [r7, #28]
800eeda: 1ad3 subs r3, r2, r3
800eedc: 109b asrs r3, r3, #2
800eede: 3301 adds r3, #1
800eee0: 2b04 cmp r3, #4
800eee2: d853 bhi.n 800ef8c <ip4addr_aton+0x218>
800eee4: a201 add r2, pc, #4 ; (adr r2, 800eeec <ip4addr_aton+0x178>)
800eee6: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800eeea: bf00 nop
800eeec: 0800ef01 .word 0x0800ef01
800eef0: 0800ef9b .word 0x0800ef9b
800eef4: 0800ef05 .word 0x0800ef05
800eef8: 0800ef27 .word 0x0800ef27
800eefc: 0800ef55 .word 0x0800ef55
case 0:
return 0; /* initial nondigit */
800ef00: 2300 movs r3, #0
800ef02: e055 b.n 800efb0 <ip4addr_aton+0x23c>
case 1: /* a -- 32 bits */
break;
case 2: /* a.b -- 8.24 bits */
if (val > 0xffffffUL) {
800ef04: 6a7b ldr r3, [r7, #36] ; 0x24
800ef06: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
800ef0a: d301 bcc.n 800ef10 <ip4addr_aton+0x19c>
return 0;
800ef0c: 2300 movs r3, #0
800ef0e: e04f b.n 800efb0 <ip4addr_aton+0x23c>
}
if (parts[0] > 0xff) {
800ef10: 68fb ldr r3, [r7, #12]
800ef12: 2bff cmp r3, #255 ; 0xff
800ef14: d901 bls.n 800ef1a <ip4addr_aton+0x1a6>
return 0;
800ef16: 2300 movs r3, #0
800ef18: e04a b.n 800efb0 <ip4addr_aton+0x23c>
}
val |= parts[0] << 24;
800ef1a: 68fb ldr r3, [r7, #12]
800ef1c: 061b lsls r3, r3, #24
800ef1e: 6a7a ldr r2, [r7, #36] ; 0x24
800ef20: 4313 orrs r3, r2
800ef22: 627b str r3, [r7, #36] ; 0x24
break;
800ef24: e03a b.n 800ef9c <ip4addr_aton+0x228>
case 3: /* a.b.c -- 8.8.16 bits */
if (val > 0xffff) {
800ef26: 6a7b ldr r3, [r7, #36] ; 0x24
800ef28: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800ef2c: d301 bcc.n 800ef32 <ip4addr_aton+0x1be>
return 0;
800ef2e: 2300 movs r3, #0
800ef30: e03e b.n 800efb0 <ip4addr_aton+0x23c>
}
if ((parts[0] > 0xff) || (parts[1] > 0xff)) {
800ef32: 68fb ldr r3, [r7, #12]
800ef34: 2bff cmp r3, #255 ; 0xff
800ef36: d802 bhi.n 800ef3e <ip4addr_aton+0x1ca>
800ef38: 693b ldr r3, [r7, #16]
800ef3a: 2bff cmp r3, #255 ; 0xff
800ef3c: d901 bls.n 800ef42 <ip4addr_aton+0x1ce>
return 0;
800ef3e: 2300 movs r3, #0
800ef40: e036 b.n 800efb0 <ip4addr_aton+0x23c>
}
val |= (parts[0] << 24) | (parts[1] << 16);
800ef42: 68fb ldr r3, [r7, #12]
800ef44: 061a lsls r2, r3, #24
800ef46: 693b ldr r3, [r7, #16]
800ef48: 041b lsls r3, r3, #16
800ef4a: 4313 orrs r3, r2
800ef4c: 6a7a ldr r2, [r7, #36] ; 0x24
800ef4e: 4313 orrs r3, r2
800ef50: 627b str r3, [r7, #36] ; 0x24
break;
800ef52: e023 b.n 800ef9c <ip4addr_aton+0x228>
case 4: /* a.b.c.d -- 8.8.8.8 bits */
if (val > 0xff) {
800ef54: 6a7b ldr r3, [r7, #36] ; 0x24
800ef56: 2bff cmp r3, #255 ; 0xff
800ef58: d901 bls.n 800ef5e <ip4addr_aton+0x1ea>
return 0;
800ef5a: 2300 movs r3, #0
800ef5c: e028 b.n 800efb0 <ip4addr_aton+0x23c>
}
if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) {
800ef5e: 68fb ldr r3, [r7, #12]
800ef60: 2bff cmp r3, #255 ; 0xff
800ef62: d805 bhi.n 800ef70 <ip4addr_aton+0x1fc>
800ef64: 693b ldr r3, [r7, #16]
800ef66: 2bff cmp r3, #255 ; 0xff
800ef68: d802 bhi.n 800ef70 <ip4addr_aton+0x1fc>
800ef6a: 697b ldr r3, [r7, #20]
800ef6c: 2bff cmp r3, #255 ; 0xff
800ef6e: d901 bls.n 800ef74 <ip4addr_aton+0x200>
return 0;
800ef70: 2300 movs r3, #0
800ef72: e01d b.n 800efb0 <ip4addr_aton+0x23c>
}
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
800ef74: 68fb ldr r3, [r7, #12]
800ef76: 061a lsls r2, r3, #24
800ef78: 693b ldr r3, [r7, #16]
800ef7a: 041b lsls r3, r3, #16
800ef7c: 431a orrs r2, r3
800ef7e: 697b ldr r3, [r7, #20]
800ef80: 021b lsls r3, r3, #8
800ef82: 4313 orrs r3, r2
800ef84: 6a7a ldr r2, [r7, #36] ; 0x24
800ef86: 4313 orrs r3, r2
800ef88: 627b str r3, [r7, #36] ; 0x24
break;
800ef8a: e007 b.n 800ef9c <ip4addr_aton+0x228>
default:
LWIP_ASSERT("unhandled", 0);
800ef8c: 4b0b ldr r3, [pc, #44] ; (800efbc <ip4addr_aton+0x248>)
800ef8e: 22f9 movs r2, #249 ; 0xf9
800ef90: 490b ldr r1, [pc, #44] ; (800efc0 <ip4addr_aton+0x24c>)
800ef92: 480c ldr r0, [pc, #48] ; (800efc4 <ip4addr_aton+0x250>)
800ef94: f000 ff90 bl 800feb8 <printf>
break;
800ef98: e000 b.n 800ef9c <ip4addr_aton+0x228>
break;
800ef9a: bf00 nop
}
if (addr) {
800ef9c: 683b ldr r3, [r7, #0]
800ef9e: 2b00 cmp r3, #0
800efa0: d005 beq.n 800efae <ip4addr_aton+0x23a>
ip4_addr_set_u32(addr, lwip_htonl(val));
800efa2: 6a78 ldr r0, [r7, #36] ; 0x24
800efa4: f7f4 ff17 bl 8003dd6 <lwip_htonl>
800efa8: 4602 mov r2, r0
800efaa: 683b ldr r3, [r7, #0]
800efac: 601a str r2, [r3, #0]
}
return 1;
800efae: 2301 movs r3, #1
}
800efb0: 4618 mov r0, r3
800efb2: 3728 adds r7, #40 ; 0x28
800efb4: 46bd mov sp, r7
800efb6: bd80 pop {r7, pc}
800efb8: 080178da .word 0x080178da
800efbc: 0801749c .word 0x0801749c
800efc0: 080174d8 .word 0x080174d8
800efc4: 080174e4 .word 0x080174e4
0800efc8 <ip_reass_tmr>:
*
* Should be called every 1000 msec (defined by IP_TMR_INTERVAL).
*/
void
ip_reass_tmr(void)
{
800efc8: b580 push {r7, lr}
800efca: b084 sub sp, #16
800efcc: af00 add r7, sp, #0
struct ip_reassdata *r, *prev = NULL;
800efce: 2300 movs r3, #0
800efd0: 60bb str r3, [r7, #8]
r = reassdatagrams;
800efd2: 4b12 ldr r3, [pc, #72] ; (800f01c <ip_reass_tmr+0x54>)
800efd4: 681b ldr r3, [r3, #0]
800efd6: 60fb str r3, [r7, #12]
while (r != NULL) {
800efd8: e018 b.n 800f00c <ip_reass_tmr+0x44>
/* Decrement the timer. Once it reaches 0,
* clean up the incomplete fragment assembly */
if (r->timer > 0) {
800efda: 68fb ldr r3, [r7, #12]
800efdc: 7fdb ldrb r3, [r3, #31]
800efde: 2b00 cmp r3, #0
800efe0: d00b beq.n 800effa <ip_reass_tmr+0x32>
r->timer--;
800efe2: 68fb ldr r3, [r7, #12]
800efe4: 7fdb ldrb r3, [r3, #31]
800efe6: 3b01 subs r3, #1
800efe8: b2da uxtb r2, r3
800efea: 68fb ldr r3, [r7, #12]
800efec: 77da strb r2, [r3, #31]
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer));
prev = r;
800efee: 68fb ldr r3, [r7, #12]
800eff0: 60bb str r3, [r7, #8]
r = r->next;
800eff2: 68fb ldr r3, [r7, #12]
800eff4: 681b ldr r3, [r3, #0]
800eff6: 60fb str r3, [r7, #12]
800eff8: e008 b.n 800f00c <ip_reass_tmr+0x44>
} else {
/* reassembly timed out */
struct ip_reassdata *tmp;
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n"));
tmp = r;
800effa: 68fb ldr r3, [r7, #12]
800effc: 607b str r3, [r7, #4]
/* get the next pointer before freeing */
r = r->next;
800effe: 68fb ldr r3, [r7, #12]
800f000: 681b ldr r3, [r3, #0]
800f002: 60fb str r3, [r7, #12]
/* free the helper struct and all enqueued pbufs */
ip_reass_free_complete_datagram(tmp, prev);
800f004: 68b9 ldr r1, [r7, #8]
800f006: 6878 ldr r0, [r7, #4]
800f008: f000 f80a bl 800f020 <ip_reass_free_complete_datagram>
while (r != NULL) {
800f00c: 68fb ldr r3, [r7, #12]
800f00e: 2b00 cmp r3, #0
800f010: d1e3 bne.n 800efda <ip_reass_tmr+0x12>
}
}
}
800f012: bf00 nop
800f014: bf00 nop
800f016: 3710 adds r7, #16
800f018: 46bd mov sp, r7
800f01a: bd80 pop {r7, pc}
800f01c: 20008d34 .word 0x20008d34
0800f020 <ip_reass_free_complete_datagram>:
* @param prev the previous datagram in the linked list
* @return the number of pbufs freed
*/
static int
ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev)
{
800f020: b580 push {r7, lr}
800f022: b088 sub sp, #32
800f024: af00 add r7, sp, #0
800f026: 6078 str r0, [r7, #4]
800f028: 6039 str r1, [r7, #0]
u16_t pbufs_freed = 0;
800f02a: 2300 movs r3, #0
800f02c: 83fb strh r3, [r7, #30]
u16_t clen;
struct pbuf *p;
struct ip_reass_helper *iprh;
LWIP_ASSERT("prev != ipr", prev != ipr);
800f02e: 683a ldr r2, [r7, #0]
800f030: 687b ldr r3, [r7, #4]
800f032: 429a cmp r2, r3
800f034: d105 bne.n 800f042 <ip_reass_free_complete_datagram+0x22>
800f036: 4b45 ldr r3, [pc, #276] ; (800f14c <ip_reass_free_complete_datagram+0x12c>)
800f038: 22ab movs r2, #171 ; 0xab
800f03a: 4945 ldr r1, [pc, #276] ; (800f150 <ip_reass_free_complete_datagram+0x130>)
800f03c: 4845 ldr r0, [pc, #276] ; (800f154 <ip_reass_free_complete_datagram+0x134>)
800f03e: f000 ff3b bl 800feb8 <printf>
if (prev != NULL) {
800f042: 683b ldr r3, [r7, #0]
800f044: 2b00 cmp r3, #0
800f046: d00a beq.n 800f05e <ip_reass_free_complete_datagram+0x3e>
LWIP_ASSERT("prev->next == ipr", prev->next == ipr);
800f048: 683b ldr r3, [r7, #0]
800f04a: 681b ldr r3, [r3, #0]
800f04c: 687a ldr r2, [r7, #4]
800f04e: 429a cmp r2, r3
800f050: d005 beq.n 800f05e <ip_reass_free_complete_datagram+0x3e>
800f052: 4b3e ldr r3, [pc, #248] ; (800f14c <ip_reass_free_complete_datagram+0x12c>)
800f054: 22ad movs r2, #173 ; 0xad
800f056: 4940 ldr r1, [pc, #256] ; (800f158 <ip_reass_free_complete_datagram+0x138>)
800f058: 483e ldr r0, [pc, #248] ; (800f154 <ip_reass_free_complete_datagram+0x134>)
800f05a: f000 ff2d bl 800feb8 <printf>
}
MIB2_STATS_INC(mib2.ipreasmfails);
#if LWIP_ICMP
iprh = (struct ip_reass_helper *)ipr->p->payload;
800f05e: 687b ldr r3, [r7, #4]
800f060: 685b ldr r3, [r3, #4]
800f062: 685b ldr r3, [r3, #4]
800f064: 617b str r3, [r7, #20]
if (iprh->start == 0) {
800f066: 697b ldr r3, [r7, #20]
800f068: 889b ldrh r3, [r3, #4]
800f06a: b29b uxth r3, r3
800f06c: 2b00 cmp r3, #0
800f06e: d12a bne.n 800f0c6 <ip_reass_free_complete_datagram+0xa6>
/* The first fragment was received, send ICMP time exceeded. */
/* First, de-queue the first pbuf from r->p. */
p = ipr->p;
800f070: 687b ldr r3, [r7, #4]
800f072: 685b ldr r3, [r3, #4]
800f074: 61bb str r3, [r7, #24]
ipr->p = iprh->next_pbuf;
800f076: 697b ldr r3, [r7, #20]
800f078: 681a ldr r2, [r3, #0]
800f07a: 687b ldr r3, [r7, #4]
800f07c: 605a str r2, [r3, #4]
/* Then, copy the original header into it. */
SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
800f07e: 69bb ldr r3, [r7, #24]
800f080: 6858 ldr r0, [r3, #4]
800f082: 687b ldr r3, [r7, #4]
800f084: 3308 adds r3, #8
800f086: 2214 movs r2, #20
800f088: 4619 mov r1, r3
800f08a: f000 fee5 bl 800fe58 <memcpy>
icmp_time_exceeded(p, ICMP_TE_FRAG);
800f08e: 2101 movs r1, #1
800f090: 69b8 ldr r0, [r7, #24]
800f092: f7ff faeb bl 800e66c <icmp_time_exceeded>
clen = pbuf_clen(p);
800f096: 69b8 ldr r0, [r7, #24]
800f098: f7f6 fa7a bl 8005590 <pbuf_clen>
800f09c: 4603 mov r3, r0
800f09e: 827b strh r3, [r7, #18]
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
800f0a0: 8bfa ldrh r2, [r7, #30]
800f0a2: 8a7b ldrh r3, [r7, #18]
800f0a4: 4413 add r3, r2
800f0a6: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800f0aa: db05 blt.n 800f0b8 <ip_reass_free_complete_datagram+0x98>
800f0ac: 4b27 ldr r3, [pc, #156] ; (800f14c <ip_reass_free_complete_datagram+0x12c>)
800f0ae: 22bc movs r2, #188 ; 0xbc
800f0b0: 492a ldr r1, [pc, #168] ; (800f15c <ip_reass_free_complete_datagram+0x13c>)
800f0b2: 4828 ldr r0, [pc, #160] ; (800f154 <ip_reass_free_complete_datagram+0x134>)
800f0b4: f000 ff00 bl 800feb8 <printf>
pbufs_freed = (u16_t)(pbufs_freed + clen);
800f0b8: 8bfa ldrh r2, [r7, #30]
800f0ba: 8a7b ldrh r3, [r7, #18]
800f0bc: 4413 add r3, r2
800f0be: 83fb strh r3, [r7, #30]
pbuf_free(p);
800f0c0: 69b8 ldr r0, [r7, #24]
800f0c2: f7f6 f9dd bl 8005480 <pbuf_free>
}
#endif /* LWIP_ICMP */
/* First, free all received pbufs. The individual pbufs need to be released
separately as they have not yet been chained */
p = ipr->p;
800f0c6: 687b ldr r3, [r7, #4]
800f0c8: 685b ldr r3, [r3, #4]
800f0ca: 61bb str r3, [r7, #24]
while (p != NULL) {
800f0cc: e01f b.n 800f10e <ip_reass_free_complete_datagram+0xee>
struct pbuf *pcur;
iprh = (struct ip_reass_helper *)p->payload;
800f0ce: 69bb ldr r3, [r7, #24]
800f0d0: 685b ldr r3, [r3, #4]
800f0d2: 617b str r3, [r7, #20]
pcur = p;
800f0d4: 69bb ldr r3, [r7, #24]
800f0d6: 60fb str r3, [r7, #12]
/* get the next pointer before freeing */
p = iprh->next_pbuf;
800f0d8: 697b ldr r3, [r7, #20]
800f0da: 681b ldr r3, [r3, #0]
800f0dc: 61bb str r3, [r7, #24]
clen = pbuf_clen(pcur);
800f0de: 68f8 ldr r0, [r7, #12]
800f0e0: f7f6 fa56 bl 8005590 <pbuf_clen>
800f0e4: 4603 mov r3, r0
800f0e6: 827b strh r3, [r7, #18]
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
800f0e8: 8bfa ldrh r2, [r7, #30]
800f0ea: 8a7b ldrh r3, [r7, #18]
800f0ec: 4413 add r3, r2
800f0ee: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800f0f2: db05 blt.n 800f100 <ip_reass_free_complete_datagram+0xe0>
800f0f4: 4b15 ldr r3, [pc, #84] ; (800f14c <ip_reass_free_complete_datagram+0x12c>)
800f0f6: 22cc movs r2, #204 ; 0xcc
800f0f8: 4918 ldr r1, [pc, #96] ; (800f15c <ip_reass_free_complete_datagram+0x13c>)
800f0fa: 4816 ldr r0, [pc, #88] ; (800f154 <ip_reass_free_complete_datagram+0x134>)
800f0fc: f000 fedc bl 800feb8 <printf>
pbufs_freed = (u16_t)(pbufs_freed + clen);
800f100: 8bfa ldrh r2, [r7, #30]
800f102: 8a7b ldrh r3, [r7, #18]
800f104: 4413 add r3, r2
800f106: 83fb strh r3, [r7, #30]
pbuf_free(pcur);
800f108: 68f8 ldr r0, [r7, #12]
800f10a: f7f6 f9b9 bl 8005480 <pbuf_free>
while (p != NULL) {
800f10e: 69bb ldr r3, [r7, #24]
800f110: 2b00 cmp r3, #0
800f112: d1dc bne.n 800f0ce <ip_reass_free_complete_datagram+0xae>
}
/* Then, unchain the struct ip_reassdata from the list and free it. */
ip_reass_dequeue_datagram(ipr, prev);
800f114: 6839 ldr r1, [r7, #0]
800f116: 6878 ldr r0, [r7, #4]
800f118: f000 f8c2 bl 800f2a0 <ip_reass_dequeue_datagram>
LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
800f11c: 4b10 ldr r3, [pc, #64] ; (800f160 <ip_reass_free_complete_datagram+0x140>)
800f11e: 881b ldrh r3, [r3, #0]
800f120: 8bfa ldrh r2, [r7, #30]
800f122: 429a cmp r2, r3
800f124: d905 bls.n 800f132 <ip_reass_free_complete_datagram+0x112>
800f126: 4b09 ldr r3, [pc, #36] ; (800f14c <ip_reass_free_complete_datagram+0x12c>)
800f128: 22d2 movs r2, #210 ; 0xd2
800f12a: 490e ldr r1, [pc, #56] ; (800f164 <ip_reass_free_complete_datagram+0x144>)
800f12c: 4809 ldr r0, [pc, #36] ; (800f154 <ip_reass_free_complete_datagram+0x134>)
800f12e: f000 fec3 bl 800feb8 <printf>
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed);
800f132: 4b0b ldr r3, [pc, #44] ; (800f160 <ip_reass_free_complete_datagram+0x140>)
800f134: 881a ldrh r2, [r3, #0]
800f136: 8bfb ldrh r3, [r7, #30]
800f138: 1ad3 subs r3, r2, r3
800f13a: b29a uxth r2, r3
800f13c: 4b08 ldr r3, [pc, #32] ; (800f160 <ip_reass_free_complete_datagram+0x140>)
800f13e: 801a strh r2, [r3, #0]
return pbufs_freed;
800f140: 8bfb ldrh r3, [r7, #30]
}
800f142: 4618 mov r0, r3
800f144: 3720 adds r7, #32
800f146: 46bd mov sp, r7
800f148: bd80 pop {r7, pc}
800f14a: bf00 nop
800f14c: 0801750c .word 0x0801750c
800f150: 08017548 .word 0x08017548
800f154: 08017554 .word 0x08017554
800f158: 0801757c .word 0x0801757c
800f15c: 08017590 .word 0x08017590
800f160: 20008d38 .word 0x20008d38
800f164: 080175b0 .word 0x080175b0
0800f168 <ip_reass_remove_oldest_datagram>:
* (used for freeing other datagrams if not enough space)
* @return the number of pbufs freed
*/
static int
ip_reass_remove_oldest_datagram(struct ip_hdr *fraghdr, int pbufs_needed)
{
800f168: b580 push {r7, lr}
800f16a: b08a sub sp, #40 ; 0x28
800f16c: af00 add r7, sp, #0
800f16e: 6078 str r0, [r7, #4]
800f170: 6039 str r1, [r7, #0]
/* @todo Can't we simply remove the last datagram in the
* linked list behind reassdatagrams?
*/
struct ip_reassdata *r, *oldest, *prev, *oldest_prev;
int pbufs_freed = 0, pbufs_freed_current;
800f172: 2300 movs r3, #0
800f174: 617b str r3, [r7, #20]
int other_datagrams;
/* Free datagrams until being allowed to enqueue 'pbufs_needed' pbufs,
* but don't free the datagram that 'fraghdr' belongs to! */
do {
oldest = NULL;
800f176: 2300 movs r3, #0
800f178: 623b str r3, [r7, #32]
prev = NULL;
800f17a: 2300 movs r3, #0
800f17c: 61fb str r3, [r7, #28]
oldest_prev = NULL;
800f17e: 2300 movs r3, #0
800f180: 61bb str r3, [r7, #24]
other_datagrams = 0;
800f182: 2300 movs r3, #0
800f184: 613b str r3, [r7, #16]
r = reassdatagrams;
800f186: 4b28 ldr r3, [pc, #160] ; (800f228 <ip_reass_remove_oldest_datagram+0xc0>)
800f188: 681b ldr r3, [r3, #0]
800f18a: 627b str r3, [r7, #36] ; 0x24
while (r != NULL) {
800f18c: e030 b.n 800f1f0 <ip_reass_remove_oldest_datagram+0x88>
if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
800f18e: 6a7b ldr r3, [r7, #36] ; 0x24
800f190: 695a ldr r2, [r3, #20]
800f192: 687b ldr r3, [r7, #4]
800f194: 68db ldr r3, [r3, #12]
800f196: 429a cmp r2, r3
800f198: d10c bne.n 800f1b4 <ip_reass_remove_oldest_datagram+0x4c>
800f19a: 6a7b ldr r3, [r7, #36] ; 0x24
800f19c: 699a ldr r2, [r3, #24]
800f19e: 687b ldr r3, [r7, #4]
800f1a0: 691b ldr r3, [r3, #16]
800f1a2: 429a cmp r2, r3
800f1a4: d106 bne.n 800f1b4 <ip_reass_remove_oldest_datagram+0x4c>
800f1a6: 6a7b ldr r3, [r7, #36] ; 0x24
800f1a8: 899a ldrh r2, [r3, #12]
800f1aa: 687b ldr r3, [r7, #4]
800f1ac: 889b ldrh r3, [r3, #4]
800f1ae: b29b uxth r3, r3
800f1b0: 429a cmp r2, r3
800f1b2: d014 beq.n 800f1de <ip_reass_remove_oldest_datagram+0x76>
/* Not the same datagram as fraghdr */
other_datagrams++;
800f1b4: 693b ldr r3, [r7, #16]
800f1b6: 3301 adds r3, #1
800f1b8: 613b str r3, [r7, #16]
if (oldest == NULL) {
800f1ba: 6a3b ldr r3, [r7, #32]
800f1bc: 2b00 cmp r3, #0
800f1be: d104 bne.n 800f1ca <ip_reass_remove_oldest_datagram+0x62>
oldest = r;
800f1c0: 6a7b ldr r3, [r7, #36] ; 0x24
800f1c2: 623b str r3, [r7, #32]
oldest_prev = prev;
800f1c4: 69fb ldr r3, [r7, #28]
800f1c6: 61bb str r3, [r7, #24]
800f1c8: e009 b.n 800f1de <ip_reass_remove_oldest_datagram+0x76>
} else if (r->timer <= oldest->timer) {
800f1ca: 6a7b ldr r3, [r7, #36] ; 0x24
800f1cc: 7fda ldrb r2, [r3, #31]
800f1ce: 6a3b ldr r3, [r7, #32]
800f1d0: 7fdb ldrb r3, [r3, #31]
800f1d2: 429a cmp r2, r3
800f1d4: d803 bhi.n 800f1de <ip_reass_remove_oldest_datagram+0x76>
/* older than the previous oldest */
oldest = r;
800f1d6: 6a7b ldr r3, [r7, #36] ; 0x24
800f1d8: 623b str r3, [r7, #32]
oldest_prev = prev;
800f1da: 69fb ldr r3, [r7, #28]
800f1dc: 61bb str r3, [r7, #24]
}
}
if (r->next != NULL) {
800f1de: 6a7b ldr r3, [r7, #36] ; 0x24
800f1e0: 681b ldr r3, [r3, #0]
800f1e2: 2b00 cmp r3, #0
800f1e4: d001 beq.n 800f1ea <ip_reass_remove_oldest_datagram+0x82>
prev = r;
800f1e6: 6a7b ldr r3, [r7, #36] ; 0x24
800f1e8: 61fb str r3, [r7, #28]
}
r = r->next;
800f1ea: 6a7b ldr r3, [r7, #36] ; 0x24
800f1ec: 681b ldr r3, [r3, #0]
800f1ee: 627b str r3, [r7, #36] ; 0x24
while (r != NULL) {
800f1f0: 6a7b ldr r3, [r7, #36] ; 0x24
800f1f2: 2b00 cmp r3, #0
800f1f4: d1cb bne.n 800f18e <ip_reass_remove_oldest_datagram+0x26>
}
if (oldest != NULL) {
800f1f6: 6a3b ldr r3, [r7, #32]
800f1f8: 2b00 cmp r3, #0
800f1fa: d008 beq.n 800f20e <ip_reass_remove_oldest_datagram+0xa6>
pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev);
800f1fc: 69b9 ldr r1, [r7, #24]
800f1fe: 6a38 ldr r0, [r7, #32]
800f200: f7ff ff0e bl 800f020 <ip_reass_free_complete_datagram>
800f204: 60f8 str r0, [r7, #12]
pbufs_freed += pbufs_freed_current;
800f206: 697a ldr r2, [r7, #20]
800f208: 68fb ldr r3, [r7, #12]
800f20a: 4413 add r3, r2
800f20c: 617b str r3, [r7, #20]
}
} while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1));
800f20e: 697a ldr r2, [r7, #20]
800f210: 683b ldr r3, [r7, #0]
800f212: 429a cmp r2, r3
800f214: da02 bge.n 800f21c <ip_reass_remove_oldest_datagram+0xb4>
800f216: 693b ldr r3, [r7, #16]
800f218: 2b01 cmp r3, #1
800f21a: dcac bgt.n 800f176 <ip_reass_remove_oldest_datagram+0xe>
return pbufs_freed;
800f21c: 697b ldr r3, [r7, #20]
}
800f21e: 4618 mov r0, r3
800f220: 3728 adds r7, #40 ; 0x28
800f222: 46bd mov sp, r7
800f224: bd80 pop {r7, pc}
800f226: bf00 nop
800f228: 20008d34 .word 0x20008d34
0800f22c <ip_reass_enqueue_new_datagram>:
* @param clen number of pbufs needed to enqueue (used for freeing other datagrams if not enough space)
* @return A pointer to the queue location into which the fragment was enqueued
*/
static struct ip_reassdata *
ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen)
{
800f22c: b580 push {r7, lr}
800f22e: b084 sub sp, #16
800f230: af00 add r7, sp, #0
800f232: 6078 str r0, [r7, #4]
800f234: 6039 str r1, [r7, #0]
#if ! IP_REASS_FREE_OLDEST
LWIP_UNUSED_ARG(clen);
#endif
/* No matching previous fragment found, allocate a new reassdata struct */
ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
800f236: 2004 movs r0, #4
800f238: f7f5 fa30 bl 800469c <memp_malloc>
800f23c: 60f8 str r0, [r7, #12]
if (ipr == NULL) {
800f23e: 68fb ldr r3, [r7, #12]
800f240: 2b00 cmp r3, #0
800f242: d110 bne.n 800f266 <ip_reass_enqueue_new_datagram+0x3a>
#if IP_REASS_FREE_OLDEST
if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) {
800f244: 6839 ldr r1, [r7, #0]
800f246: 6878 ldr r0, [r7, #4]
800f248: f7ff ff8e bl 800f168 <ip_reass_remove_oldest_datagram>
800f24c: 4602 mov r2, r0
800f24e: 683b ldr r3, [r7, #0]
800f250: 4293 cmp r3, r2
800f252: dc03 bgt.n 800f25c <ip_reass_enqueue_new_datagram+0x30>
ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
800f254: 2004 movs r0, #4
800f256: f7f5 fa21 bl 800469c <memp_malloc>
800f25a: 60f8 str r0, [r7, #12]
}
if (ipr == NULL)
800f25c: 68fb ldr r3, [r7, #12]
800f25e: 2b00 cmp r3, #0
800f260: d101 bne.n 800f266 <ip_reass_enqueue_new_datagram+0x3a>
#endif /* IP_REASS_FREE_OLDEST */
{
IPFRAG_STATS_INC(ip_frag.memerr);
LWIP_DEBUGF(IP_REASS_DEBUG, ("Failed to alloc reassdata struct\n"));
return NULL;
800f262: 2300 movs r3, #0
800f264: e016 b.n 800f294 <ip_reass_enqueue_new_datagram+0x68>
}
}
memset(ipr, 0, sizeof(struct ip_reassdata));
800f266: 2220 movs r2, #32
800f268: 2100 movs r1, #0
800f26a: 68f8 ldr r0, [r7, #12]
800f26c: f000 fe1c bl 800fea8 <memset>
ipr->timer = IP_REASS_MAXAGE;
800f270: 68fb ldr r3, [r7, #12]
800f272: 220f movs r2, #15
800f274: 77da strb r2, [r3, #31]
/* enqueue the new structure to the front of the list */
ipr->next = reassdatagrams;
800f276: 4b09 ldr r3, [pc, #36] ; (800f29c <ip_reass_enqueue_new_datagram+0x70>)
800f278: 681a ldr r2, [r3, #0]
800f27a: 68fb ldr r3, [r7, #12]
800f27c: 601a str r2, [r3, #0]
reassdatagrams = ipr;
800f27e: 4a07 ldr r2, [pc, #28] ; (800f29c <ip_reass_enqueue_new_datagram+0x70>)
800f280: 68fb ldr r3, [r7, #12]
800f282: 6013 str r3, [r2, #0]
/* copy the ip header for later tests and input */
/* @todo: no ip options supported? */
SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN);
800f284: 68fb ldr r3, [r7, #12]
800f286: 3308 adds r3, #8
800f288: 2214 movs r2, #20
800f28a: 6879 ldr r1, [r7, #4]
800f28c: 4618 mov r0, r3
800f28e: f000 fde3 bl 800fe58 <memcpy>
return ipr;
800f292: 68fb ldr r3, [r7, #12]
}
800f294: 4618 mov r0, r3
800f296: 3710 adds r7, #16
800f298: 46bd mov sp, r7
800f29a: bd80 pop {r7, pc}
800f29c: 20008d34 .word 0x20008d34
0800f2a0 <ip_reass_dequeue_datagram>:
* Dequeues a datagram from the datagram queue. Doesn't deallocate the pbufs.
* @param ipr points to the queue entry to dequeue
*/
static void
ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev)
{
800f2a0: b580 push {r7, lr}
800f2a2: b082 sub sp, #8
800f2a4: af00 add r7, sp, #0
800f2a6: 6078 str r0, [r7, #4]
800f2a8: 6039 str r1, [r7, #0]
/* dequeue the reass struct */
if (reassdatagrams == ipr) {
800f2aa: 4b10 ldr r3, [pc, #64] ; (800f2ec <ip_reass_dequeue_datagram+0x4c>)
800f2ac: 681b ldr r3, [r3, #0]
800f2ae: 687a ldr r2, [r7, #4]
800f2b0: 429a cmp r2, r3
800f2b2: d104 bne.n 800f2be <ip_reass_dequeue_datagram+0x1e>
/* it was the first in the list */
reassdatagrams = ipr->next;
800f2b4: 687b ldr r3, [r7, #4]
800f2b6: 681b ldr r3, [r3, #0]
800f2b8: 4a0c ldr r2, [pc, #48] ; (800f2ec <ip_reass_dequeue_datagram+0x4c>)
800f2ba: 6013 str r3, [r2, #0]
800f2bc: e00d b.n 800f2da <ip_reass_dequeue_datagram+0x3a>
} else {
/* it wasn't the first, so it must have a valid 'prev' */
LWIP_ASSERT("sanity check linked list", prev != NULL);
800f2be: 683b ldr r3, [r7, #0]
800f2c0: 2b00 cmp r3, #0
800f2c2: d106 bne.n 800f2d2 <ip_reass_dequeue_datagram+0x32>
800f2c4: 4b0a ldr r3, [pc, #40] ; (800f2f0 <ip_reass_dequeue_datagram+0x50>)
800f2c6: f240 1245 movw r2, #325 ; 0x145
800f2ca: 490a ldr r1, [pc, #40] ; (800f2f4 <ip_reass_dequeue_datagram+0x54>)
800f2cc: 480a ldr r0, [pc, #40] ; (800f2f8 <ip_reass_dequeue_datagram+0x58>)
800f2ce: f000 fdf3 bl 800feb8 <printf>
prev->next = ipr->next;
800f2d2: 687b ldr r3, [r7, #4]
800f2d4: 681a ldr r2, [r3, #0]
800f2d6: 683b ldr r3, [r7, #0]
800f2d8: 601a str r2, [r3, #0]
}
/* now we can free the ip_reassdata struct */
memp_free(MEMP_REASSDATA, ipr);
800f2da: 6879 ldr r1, [r7, #4]
800f2dc: 2004 movs r0, #4
800f2de: f7f5 fa4d bl 800477c <memp_free>
}
800f2e2: bf00 nop
800f2e4: 3708 adds r7, #8
800f2e6: 46bd mov sp, r7
800f2e8: bd80 pop {r7, pc}
800f2ea: bf00 nop
800f2ec: 20008d34 .word 0x20008d34
800f2f0: 0801750c .word 0x0801750c
800f2f4: 080175d4 .word 0x080175d4
800f2f8: 08017554 .word 0x08017554
0800f2fc <ip_reass_chain_frag_into_datagram_and_validate>:
* @param is_last is 1 if this pbuf has MF==0 (ipr->flags not updated yet)
* @return see IP_REASS_VALIDATE_* defines
*/
static int
ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct pbuf *new_p, int is_last)
{
800f2fc: b580 push {r7, lr}
800f2fe: b08c sub sp, #48 ; 0x30
800f300: af00 add r7, sp, #0
800f302: 60f8 str r0, [r7, #12]
800f304: 60b9 str r1, [r7, #8]
800f306: 607a str r2, [r7, #4]
struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL;
800f308: 2300 movs r3, #0
800f30a: 62bb str r3, [r7, #40] ; 0x28
struct pbuf *q;
u16_t offset, len;
u8_t hlen;
struct ip_hdr *fraghdr;
int valid = 1;
800f30c: 2301 movs r3, #1
800f30e: 623b str r3, [r7, #32]
/* Extract length and fragment offset from current fragment */
fraghdr = (struct ip_hdr *)new_p->payload;
800f310: 68bb ldr r3, [r7, #8]
800f312: 685b ldr r3, [r3, #4]
800f314: 61fb str r3, [r7, #28]
len = lwip_ntohs(IPH_LEN(fraghdr));
800f316: 69fb ldr r3, [r7, #28]
800f318: 885b ldrh r3, [r3, #2]
800f31a: b29b uxth r3, r3
800f31c: 4618 mov r0, r3
800f31e: f7f4 fd45 bl 8003dac <lwip_htons>
800f322: 4603 mov r3, r0
800f324: 837b strh r3, [r7, #26]
hlen = IPH_HL_BYTES(fraghdr);
800f326: 69fb ldr r3, [r7, #28]
800f328: 781b ldrb r3, [r3, #0]
800f32a: f003 030f and.w r3, r3, #15
800f32e: b2db uxtb r3, r3
800f330: 009b lsls r3, r3, #2
800f332: 767b strb r3, [r7, #25]
if (hlen > len) {
800f334: 7e7b ldrb r3, [r7, #25]
800f336: b29b uxth r3, r3
800f338: 8b7a ldrh r2, [r7, #26]
800f33a: 429a cmp r2, r3
800f33c: d202 bcs.n 800f344 <ip_reass_chain_frag_into_datagram_and_validate+0x48>
/* invalid datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f33e: f04f 33ff mov.w r3, #4294967295
800f342: e135 b.n 800f5b0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
len = (u16_t)(len - hlen);
800f344: 7e7b ldrb r3, [r7, #25]
800f346: b29b uxth r3, r3
800f348: 8b7a ldrh r2, [r7, #26]
800f34a: 1ad3 subs r3, r2, r3
800f34c: 837b strh r3, [r7, #26]
offset = IPH_OFFSET_BYTES(fraghdr);
800f34e: 69fb ldr r3, [r7, #28]
800f350: 88db ldrh r3, [r3, #6]
800f352: b29b uxth r3, r3
800f354: 4618 mov r0, r3
800f356: f7f4 fd29 bl 8003dac <lwip_htons>
800f35a: 4603 mov r3, r0
800f35c: f3c3 030c ubfx r3, r3, #0, #13
800f360: b29b uxth r3, r3
800f362: 00db lsls r3, r3, #3
800f364: 82fb strh r3, [r7, #22]
/* overwrite the fragment's ip header from the pbuf with our helper struct,
* and setup the embedded helper structure. */
/* make sure the struct ip_reass_helper fits into the IP header */
LWIP_ASSERT("sizeof(struct ip_reass_helper) <= IP_HLEN",
sizeof(struct ip_reass_helper) <= IP_HLEN);
iprh = (struct ip_reass_helper *)new_p->payload;
800f366: 68bb ldr r3, [r7, #8]
800f368: 685b ldr r3, [r3, #4]
800f36a: 62fb str r3, [r7, #44] ; 0x2c
iprh->next_pbuf = NULL;
800f36c: 6afb ldr r3, [r7, #44] ; 0x2c
800f36e: 2200 movs r2, #0
800f370: 701a strb r2, [r3, #0]
800f372: 2200 movs r2, #0
800f374: 705a strb r2, [r3, #1]
800f376: 2200 movs r2, #0
800f378: 709a strb r2, [r3, #2]
800f37a: 2200 movs r2, #0
800f37c: 70da strb r2, [r3, #3]
iprh->start = offset;
800f37e: 6afb ldr r3, [r7, #44] ; 0x2c
800f380: 8afa ldrh r2, [r7, #22]
800f382: 809a strh r2, [r3, #4]
iprh->end = (u16_t)(offset + len);
800f384: 8afa ldrh r2, [r7, #22]
800f386: 8b7b ldrh r3, [r7, #26]
800f388: 4413 add r3, r2
800f38a: b29a uxth r2, r3
800f38c: 6afb ldr r3, [r7, #44] ; 0x2c
800f38e: 80da strh r2, [r3, #6]
if (iprh->end < offset) {
800f390: 6afb ldr r3, [r7, #44] ; 0x2c
800f392: 88db ldrh r3, [r3, #6]
800f394: b29b uxth r3, r3
800f396: 8afa ldrh r2, [r7, #22]
800f398: 429a cmp r2, r3
800f39a: d902 bls.n 800f3a2 <ip_reass_chain_frag_into_datagram_and_validate+0xa6>
/* u16_t overflow, cannot handle this */
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f39c: f04f 33ff mov.w r3, #4294967295
800f3a0: e106 b.n 800f5b0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
/* Iterate through until we either get to the end of the list (append),
* or we find one with a larger offset (insert). */
for (q = ipr->p; q != NULL;) {
800f3a2: 68fb ldr r3, [r7, #12]
800f3a4: 685b ldr r3, [r3, #4]
800f3a6: 627b str r3, [r7, #36] ; 0x24
800f3a8: e068 b.n 800f47c <ip_reass_chain_frag_into_datagram_and_validate+0x180>
iprh_tmp = (struct ip_reass_helper *)q->payload;
800f3aa: 6a7b ldr r3, [r7, #36] ; 0x24
800f3ac: 685b ldr r3, [r3, #4]
800f3ae: 613b str r3, [r7, #16]
if (iprh->start < iprh_tmp->start) {
800f3b0: 6afb ldr r3, [r7, #44] ; 0x2c
800f3b2: 889b ldrh r3, [r3, #4]
800f3b4: b29a uxth r2, r3
800f3b6: 693b ldr r3, [r7, #16]
800f3b8: 889b ldrh r3, [r3, #4]
800f3ba: b29b uxth r3, r3
800f3bc: 429a cmp r2, r3
800f3be: d235 bcs.n 800f42c <ip_reass_chain_frag_into_datagram_and_validate+0x130>
/* the new pbuf should be inserted before this */
iprh->next_pbuf = q;
800f3c0: 6afb ldr r3, [r7, #44] ; 0x2c
800f3c2: 6a7a ldr r2, [r7, #36] ; 0x24
800f3c4: 601a str r2, [r3, #0]
if (iprh_prev != NULL) {
800f3c6: 6abb ldr r3, [r7, #40] ; 0x28
800f3c8: 2b00 cmp r3, #0
800f3ca: d020 beq.n 800f40e <ip_reass_chain_frag_into_datagram_and_validate+0x112>
/* not the fragment with the lowest offset */
#if IP_REASS_CHECK_OVERLAP
if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) {
800f3cc: 6afb ldr r3, [r7, #44] ; 0x2c
800f3ce: 889b ldrh r3, [r3, #4]
800f3d0: b29a uxth r2, r3
800f3d2: 6abb ldr r3, [r7, #40] ; 0x28
800f3d4: 88db ldrh r3, [r3, #6]
800f3d6: b29b uxth r3, r3
800f3d8: 429a cmp r2, r3
800f3da: d307 bcc.n 800f3ec <ip_reass_chain_frag_into_datagram_and_validate+0xf0>
800f3dc: 6afb ldr r3, [r7, #44] ; 0x2c
800f3de: 88db ldrh r3, [r3, #6]
800f3e0: b29a uxth r2, r3
800f3e2: 693b ldr r3, [r7, #16]
800f3e4: 889b ldrh r3, [r3, #4]
800f3e6: b29b uxth r3, r3
800f3e8: 429a cmp r2, r3
800f3ea: d902 bls.n 800f3f2 <ip_reass_chain_frag_into_datagram_and_validate+0xf6>
/* fragment overlaps with previous or following, throw away */
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f3ec: f04f 33ff mov.w r3, #4294967295
800f3f0: e0de b.n 800f5b0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
#endif /* IP_REASS_CHECK_OVERLAP */
iprh_prev->next_pbuf = new_p;
800f3f2: 6abb ldr r3, [r7, #40] ; 0x28
800f3f4: 68ba ldr r2, [r7, #8]
800f3f6: 601a str r2, [r3, #0]
if (iprh_prev->end != iprh->start) {
800f3f8: 6abb ldr r3, [r7, #40] ; 0x28
800f3fa: 88db ldrh r3, [r3, #6]
800f3fc: b29a uxth r2, r3
800f3fe: 6afb ldr r3, [r7, #44] ; 0x2c
800f400: 889b ldrh r3, [r3, #4]
800f402: b29b uxth r3, r3
800f404: 429a cmp r2, r3
800f406: d03d beq.n 800f484 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
/* There is a fragment missing between the current
* and the previous fragment */
valid = 0;
800f408: 2300 movs r3, #0
800f40a: 623b str r3, [r7, #32]
}
#endif /* IP_REASS_CHECK_OVERLAP */
/* fragment with the lowest offset */
ipr->p = new_p;
}
break;
800f40c: e03a b.n 800f484 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
if (iprh->end > iprh_tmp->start) {
800f40e: 6afb ldr r3, [r7, #44] ; 0x2c
800f410: 88db ldrh r3, [r3, #6]
800f412: b29a uxth r2, r3
800f414: 693b ldr r3, [r7, #16]
800f416: 889b ldrh r3, [r3, #4]
800f418: b29b uxth r3, r3
800f41a: 429a cmp r2, r3
800f41c: d902 bls.n 800f424 <ip_reass_chain_frag_into_datagram_and_validate+0x128>
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f41e: f04f 33ff mov.w r3, #4294967295
800f422: e0c5 b.n 800f5b0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
ipr->p = new_p;
800f424: 68fb ldr r3, [r7, #12]
800f426: 68ba ldr r2, [r7, #8]
800f428: 605a str r2, [r3, #4]
break;
800f42a: e02b b.n 800f484 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
} else if (iprh->start == iprh_tmp->start) {
800f42c: 6afb ldr r3, [r7, #44] ; 0x2c
800f42e: 889b ldrh r3, [r3, #4]
800f430: b29a uxth r2, r3
800f432: 693b ldr r3, [r7, #16]
800f434: 889b ldrh r3, [r3, #4]
800f436: b29b uxth r3, r3
800f438: 429a cmp r2, r3
800f43a: d102 bne.n 800f442 <ip_reass_chain_frag_into_datagram_and_validate+0x146>
/* received the same datagram twice: no need to keep the datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f43c: f04f 33ff mov.w r3, #4294967295
800f440: e0b6 b.n 800f5b0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
#if IP_REASS_CHECK_OVERLAP
} else if (iprh->start < iprh_tmp->end) {
800f442: 6afb ldr r3, [r7, #44] ; 0x2c
800f444: 889b ldrh r3, [r3, #4]
800f446: b29a uxth r2, r3
800f448: 693b ldr r3, [r7, #16]
800f44a: 88db ldrh r3, [r3, #6]
800f44c: b29b uxth r3, r3
800f44e: 429a cmp r2, r3
800f450: d202 bcs.n 800f458 <ip_reass_chain_frag_into_datagram_and_validate+0x15c>
/* overlap: no need to keep the new datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
800f452: f04f 33ff mov.w r3, #4294967295
800f456: e0ab b.n 800f5b0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
#endif /* IP_REASS_CHECK_OVERLAP */
} else {
/* Check if the fragments received so far have no holes. */
if (iprh_prev != NULL) {
800f458: 6abb ldr r3, [r7, #40] ; 0x28
800f45a: 2b00 cmp r3, #0
800f45c: d009 beq.n 800f472 <ip_reass_chain_frag_into_datagram_and_validate+0x176>
if (iprh_prev->end != iprh_tmp->start) {
800f45e: 6abb ldr r3, [r7, #40] ; 0x28
800f460: 88db ldrh r3, [r3, #6]
800f462: b29a uxth r2, r3
800f464: 693b ldr r3, [r7, #16]
800f466: 889b ldrh r3, [r3, #4]
800f468: b29b uxth r3, r3
800f46a: 429a cmp r2, r3
800f46c: d001 beq.n 800f472 <ip_reass_chain_frag_into_datagram_and_validate+0x176>
/* There is a fragment missing between the current
* and the previous fragment */
valid = 0;
800f46e: 2300 movs r3, #0
800f470: 623b str r3, [r7, #32]
}
}
}
q = iprh_tmp->next_pbuf;
800f472: 693b ldr r3, [r7, #16]
800f474: 681b ldr r3, [r3, #0]
800f476: 627b str r3, [r7, #36] ; 0x24
iprh_prev = iprh_tmp;
800f478: 693b ldr r3, [r7, #16]
800f47a: 62bb str r3, [r7, #40] ; 0x28
for (q = ipr->p; q != NULL;) {
800f47c: 6a7b ldr r3, [r7, #36] ; 0x24
800f47e: 2b00 cmp r3, #0
800f480: d193 bne.n 800f3aa <ip_reass_chain_frag_into_datagram_and_validate+0xae>
800f482: e000 b.n 800f486 <ip_reass_chain_frag_into_datagram_and_validate+0x18a>
break;
800f484: bf00 nop
}
/* If q is NULL, then we made it to the end of the list. Determine what to do now */
if (q == NULL) {
800f486: 6a7b ldr r3, [r7, #36] ; 0x24
800f488: 2b00 cmp r3, #0
800f48a: d12d bne.n 800f4e8 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
if (iprh_prev != NULL) {
800f48c: 6abb ldr r3, [r7, #40] ; 0x28
800f48e: 2b00 cmp r3, #0
800f490: d01c beq.n 800f4cc <ip_reass_chain_frag_into_datagram_and_validate+0x1d0>
/* this is (for now), the fragment with the highest offset:
* chain it to the last fragment */
#if IP_REASS_CHECK_OVERLAP
LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start);
800f492: 6abb ldr r3, [r7, #40] ; 0x28
800f494: 88db ldrh r3, [r3, #6]
800f496: b29a uxth r2, r3
800f498: 6afb ldr r3, [r7, #44] ; 0x2c
800f49a: 889b ldrh r3, [r3, #4]
800f49c: b29b uxth r3, r3
800f49e: 429a cmp r2, r3
800f4a0: d906 bls.n 800f4b0 <ip_reass_chain_frag_into_datagram_and_validate+0x1b4>
800f4a2: 4b45 ldr r3, [pc, #276] ; (800f5b8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800f4a4: f44f 72db mov.w r2, #438 ; 0x1b6
800f4a8: 4944 ldr r1, [pc, #272] ; (800f5bc <ip_reass_chain_frag_into_datagram_and_validate+0x2c0>)
800f4aa: 4845 ldr r0, [pc, #276] ; (800f5c0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800f4ac: f000 fd04 bl 800feb8 <printf>
#endif /* IP_REASS_CHECK_OVERLAP */
iprh_prev->next_pbuf = new_p;
800f4b0: 6abb ldr r3, [r7, #40] ; 0x28
800f4b2: 68ba ldr r2, [r7, #8]
800f4b4: 601a str r2, [r3, #0]
if (iprh_prev->end != iprh->start) {
800f4b6: 6abb ldr r3, [r7, #40] ; 0x28
800f4b8: 88db ldrh r3, [r3, #6]
800f4ba: b29a uxth r2, r3
800f4bc: 6afb ldr r3, [r7, #44] ; 0x2c
800f4be: 889b ldrh r3, [r3, #4]
800f4c0: b29b uxth r3, r3
800f4c2: 429a cmp r2, r3
800f4c4: d010 beq.n 800f4e8 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
valid = 0;
800f4c6: 2300 movs r3, #0
800f4c8: 623b str r3, [r7, #32]
800f4ca: e00d b.n 800f4e8 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
}
} else {
#if IP_REASS_CHECK_OVERLAP
LWIP_ASSERT("no previous fragment, this must be the first fragment!",
800f4cc: 68fb ldr r3, [r7, #12]
800f4ce: 685b ldr r3, [r3, #4]
800f4d0: 2b00 cmp r3, #0
800f4d2: d006 beq.n 800f4e2 <ip_reass_chain_frag_into_datagram_and_validate+0x1e6>
800f4d4: 4b38 ldr r3, [pc, #224] ; (800f5b8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800f4d6: f44f 72df mov.w r2, #446 ; 0x1be
800f4da: 493a ldr r1, [pc, #232] ; (800f5c4 <ip_reass_chain_frag_into_datagram_and_validate+0x2c8>)
800f4dc: 4838 ldr r0, [pc, #224] ; (800f5c0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800f4de: f000 fceb bl 800feb8 <printf>
ipr->p == NULL);
#endif /* IP_REASS_CHECK_OVERLAP */
/* this is the first fragment we ever received for this ip datagram */
ipr->p = new_p;
800f4e2: 68fb ldr r3, [r7, #12]
800f4e4: 68ba ldr r2, [r7, #8]
800f4e6: 605a str r2, [r3, #4]
}
}
/* At this point, the validation part begins: */
/* If we already received the last fragment */
if (is_last || ((ipr->flags & IP_REASS_FLAG_LASTFRAG) != 0)) {
800f4e8: 687b ldr r3, [r7, #4]
800f4ea: 2b00 cmp r3, #0
800f4ec: d105 bne.n 800f4fa <ip_reass_chain_frag_into_datagram_and_validate+0x1fe>
800f4ee: 68fb ldr r3, [r7, #12]
800f4f0: 7f9b ldrb r3, [r3, #30]
800f4f2: f003 0301 and.w r3, r3, #1
800f4f6: 2b00 cmp r3, #0
800f4f8: d059 beq.n 800f5ae <ip_reass_chain_frag_into_datagram_and_validate+0x2b2>
/* and had no holes so far */
if (valid) {
800f4fa: 6a3b ldr r3, [r7, #32]
800f4fc: 2b00 cmp r3, #0
800f4fe: d04f beq.n 800f5a0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
/* then check if the rest of the fragments is here */
/* Check if the queue starts with the first datagram */
if ((ipr->p == NULL) || (((struct ip_reass_helper *)ipr->p->payload)->start != 0)) {
800f500: 68fb ldr r3, [r7, #12]
800f502: 685b ldr r3, [r3, #4]
800f504: 2b00 cmp r3, #0
800f506: d006 beq.n 800f516 <ip_reass_chain_frag_into_datagram_and_validate+0x21a>
800f508: 68fb ldr r3, [r7, #12]
800f50a: 685b ldr r3, [r3, #4]
800f50c: 685b ldr r3, [r3, #4]
800f50e: 889b ldrh r3, [r3, #4]
800f510: b29b uxth r3, r3
800f512: 2b00 cmp r3, #0
800f514: d002 beq.n 800f51c <ip_reass_chain_frag_into_datagram_and_validate+0x220>
valid = 0;
800f516: 2300 movs r3, #0
800f518: 623b str r3, [r7, #32]
800f51a: e041 b.n 800f5a0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
} else {
/* and check that there are no holes after this datagram */
iprh_prev = iprh;
800f51c: 6afb ldr r3, [r7, #44] ; 0x2c
800f51e: 62bb str r3, [r7, #40] ; 0x28
q = iprh->next_pbuf;
800f520: 6afb ldr r3, [r7, #44] ; 0x2c
800f522: 681b ldr r3, [r3, #0]
800f524: 627b str r3, [r7, #36] ; 0x24
while (q != NULL) {
800f526: e012 b.n 800f54e <ip_reass_chain_frag_into_datagram_and_validate+0x252>
iprh = (struct ip_reass_helper *)q->payload;
800f528: 6a7b ldr r3, [r7, #36] ; 0x24
800f52a: 685b ldr r3, [r3, #4]
800f52c: 62fb str r3, [r7, #44] ; 0x2c
if (iprh_prev->end != iprh->start) {
800f52e: 6abb ldr r3, [r7, #40] ; 0x28
800f530: 88db ldrh r3, [r3, #6]
800f532: b29a uxth r2, r3
800f534: 6afb ldr r3, [r7, #44] ; 0x2c
800f536: 889b ldrh r3, [r3, #4]
800f538: b29b uxth r3, r3
800f53a: 429a cmp r2, r3
800f53c: d002 beq.n 800f544 <ip_reass_chain_frag_into_datagram_and_validate+0x248>
valid = 0;
800f53e: 2300 movs r3, #0
800f540: 623b str r3, [r7, #32]
break;
800f542: e007 b.n 800f554 <ip_reass_chain_frag_into_datagram_and_validate+0x258>
}
iprh_prev = iprh;
800f544: 6afb ldr r3, [r7, #44] ; 0x2c
800f546: 62bb str r3, [r7, #40] ; 0x28
q = iprh->next_pbuf;
800f548: 6afb ldr r3, [r7, #44] ; 0x2c
800f54a: 681b ldr r3, [r3, #0]
800f54c: 627b str r3, [r7, #36] ; 0x24
while (q != NULL) {
800f54e: 6a7b ldr r3, [r7, #36] ; 0x24
800f550: 2b00 cmp r3, #0
800f552: d1e9 bne.n 800f528 <ip_reass_chain_frag_into_datagram_and_validate+0x22c>
}
/* if still valid, all fragments are received
* (because to the MF==0 already arrived */
if (valid) {
800f554: 6a3b ldr r3, [r7, #32]
800f556: 2b00 cmp r3, #0
800f558: d022 beq.n 800f5a0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
LWIP_ASSERT("sanity check", ipr->p != NULL);
800f55a: 68fb ldr r3, [r7, #12]
800f55c: 685b ldr r3, [r3, #4]
800f55e: 2b00 cmp r3, #0
800f560: d106 bne.n 800f570 <ip_reass_chain_frag_into_datagram_and_validate+0x274>
800f562: 4b15 ldr r3, [pc, #84] ; (800f5b8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800f564: f240 12df movw r2, #479 ; 0x1df
800f568: 4917 ldr r1, [pc, #92] ; (800f5c8 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
800f56a: 4815 ldr r0, [pc, #84] ; (800f5c0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800f56c: f000 fca4 bl 800feb8 <printf>
LWIP_ASSERT("sanity check",
800f570: 68fb ldr r3, [r7, #12]
800f572: 685b ldr r3, [r3, #4]
800f574: 685b ldr r3, [r3, #4]
800f576: 6afa ldr r2, [r7, #44] ; 0x2c
800f578: 429a cmp r2, r3
800f57a: d106 bne.n 800f58a <ip_reass_chain_frag_into_datagram_and_validate+0x28e>
800f57c: 4b0e ldr r3, [pc, #56] ; (800f5b8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800f57e: f44f 72f0 mov.w r2, #480 ; 0x1e0
800f582: 4911 ldr r1, [pc, #68] ; (800f5c8 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
800f584: 480e ldr r0, [pc, #56] ; (800f5c0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800f586: f000 fc97 bl 800feb8 <printf>
((struct ip_reass_helper *)ipr->p->payload) != iprh);
LWIP_ASSERT("validate_datagram:next_pbuf!=NULL",
800f58a: 6afb ldr r3, [r7, #44] ; 0x2c
800f58c: 681b ldr r3, [r3, #0]
800f58e: 2b00 cmp r3, #0
800f590: d006 beq.n 800f5a0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
800f592: 4b09 ldr r3, [pc, #36] ; (800f5b8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
800f594: f44f 72f1 mov.w r2, #482 ; 0x1e2
800f598: 490c ldr r1, [pc, #48] ; (800f5cc <ip_reass_chain_frag_into_datagram_and_validate+0x2d0>)
800f59a: 4809 ldr r0, [pc, #36] ; (800f5c0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
800f59c: f000 fc8c bl 800feb8 <printf>
}
}
/* If valid is 0 here, there are some fragments missing in the middle
* (since MF == 0 has already arrived). Such datagrams simply time out if
* no more fragments are received... */
return valid ? IP_REASS_VALIDATE_TELEGRAM_FINISHED : IP_REASS_VALIDATE_PBUF_QUEUED;
800f5a0: 6a3b ldr r3, [r7, #32]
800f5a2: 2b00 cmp r3, #0
800f5a4: bf14 ite ne
800f5a6: 2301 movne r3, #1
800f5a8: 2300 moveq r3, #0
800f5aa: b2db uxtb r3, r3
800f5ac: e000 b.n 800f5b0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
/* If we come here, not all fragments were received, yet! */
return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */
800f5ae: 2300 movs r3, #0
}
800f5b0: 4618 mov r0, r3
800f5b2: 3730 adds r7, #48 ; 0x30
800f5b4: 46bd mov sp, r7
800f5b6: bd80 pop {r7, pc}
800f5b8: 0801750c .word 0x0801750c
800f5bc: 080175f0 .word 0x080175f0
800f5c0: 08017554 .word 0x08017554
800f5c4: 08017610 .word 0x08017610
800f5c8: 08017648 .word 0x08017648
800f5cc: 08017658 .word 0x08017658
0800f5d0 <ip4_reass>:
* @param p points to a pbuf chain of the fragment
* @return NULL if reassembly is incomplete, ? otherwise
*/
struct pbuf *
ip4_reass(struct pbuf *p)
{
800f5d0: b580 push {r7, lr}
800f5d2: b08e sub sp, #56 ; 0x38
800f5d4: af00 add r7, sp, #0
800f5d6: 6078 str r0, [r7, #4]
int is_last;
IPFRAG_STATS_INC(ip_frag.recv);
MIB2_STATS_INC(mib2.ipreasmreqds);
fraghdr = (struct ip_hdr *)p->payload;
800f5d8: 687b ldr r3, [r7, #4]
800f5da: 685b ldr r3, [r3, #4]
800f5dc: 62bb str r3, [r7, #40] ; 0x28
if (IPH_HL_BYTES(fraghdr) != IP_HLEN) {
800f5de: 6abb ldr r3, [r7, #40] ; 0x28
800f5e0: 781b ldrb r3, [r3, #0]
800f5e2: f003 030f and.w r3, r3, #15
800f5e6: b2db uxtb r3, r3
800f5e8: 009b lsls r3, r3, #2
800f5ea: b2db uxtb r3, r3
800f5ec: 2b14 cmp r3, #20
800f5ee: f040 8171 bne.w 800f8d4 <ip4_reass+0x304>
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: IP options currently not supported!\n"));
IPFRAG_STATS_INC(ip_frag.err);
goto nullreturn;
}
offset = IPH_OFFSET_BYTES(fraghdr);
800f5f2: 6abb ldr r3, [r7, #40] ; 0x28
800f5f4: 88db ldrh r3, [r3, #6]
800f5f6: b29b uxth r3, r3
800f5f8: 4618 mov r0, r3
800f5fa: f7f4 fbd7 bl 8003dac <lwip_htons>
800f5fe: 4603 mov r3, r0
800f600: f3c3 030c ubfx r3, r3, #0, #13
800f604: b29b uxth r3, r3
800f606: 00db lsls r3, r3, #3
800f608: 84fb strh r3, [r7, #38] ; 0x26
len = lwip_ntohs(IPH_LEN(fraghdr));
800f60a: 6abb ldr r3, [r7, #40] ; 0x28
800f60c: 885b ldrh r3, [r3, #2]
800f60e: b29b uxth r3, r3
800f610: 4618 mov r0, r3
800f612: f7f4 fbcb bl 8003dac <lwip_htons>
800f616: 4603 mov r3, r0
800f618: 84bb strh r3, [r7, #36] ; 0x24
hlen = IPH_HL_BYTES(fraghdr);
800f61a: 6abb ldr r3, [r7, #40] ; 0x28
800f61c: 781b ldrb r3, [r3, #0]
800f61e: f003 030f and.w r3, r3, #15
800f622: b2db uxtb r3, r3
800f624: 009b lsls r3, r3, #2
800f626: f887 3023 strb.w r3, [r7, #35] ; 0x23
if (hlen > len) {
800f62a: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
800f62e: b29b uxth r3, r3
800f630: 8cba ldrh r2, [r7, #36] ; 0x24
800f632: 429a cmp r2, r3
800f634: f0c0 8150 bcc.w 800f8d8 <ip4_reass+0x308>
/* invalid datagram */
goto nullreturn;
}
len = (u16_t)(len - hlen);
800f638: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
800f63c: b29b uxth r3, r3
800f63e: 8cba ldrh r2, [r7, #36] ; 0x24
800f640: 1ad3 subs r3, r2, r3
800f642: 84bb strh r3, [r7, #36] ; 0x24
/* Check if we are allowed to enqueue more datagrams. */
clen = pbuf_clen(p);
800f644: 6878 ldr r0, [r7, #4]
800f646: f7f5 ffa3 bl 8005590 <pbuf_clen>
800f64a: 4603 mov r3, r0
800f64c: 843b strh r3, [r7, #32]
if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) {
800f64e: 4b8c ldr r3, [pc, #560] ; (800f880 <ip4_reass+0x2b0>)
800f650: 881b ldrh r3, [r3, #0]
800f652: 461a mov r2, r3
800f654: 8c3b ldrh r3, [r7, #32]
800f656: 4413 add r3, r2
800f658: 2b0a cmp r3, #10
800f65a: dd10 ble.n 800f67e <ip4_reass+0xae>
#if IP_REASS_FREE_OLDEST
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
800f65c: 8c3b ldrh r3, [r7, #32]
800f65e: 4619 mov r1, r3
800f660: 6ab8 ldr r0, [r7, #40] ; 0x28
800f662: f7ff fd81 bl 800f168 <ip_reass_remove_oldest_datagram>
800f666: 4603 mov r3, r0
800f668: 2b00 cmp r3, #0
800f66a: f000 8137 beq.w 800f8dc <ip4_reass+0x30c>
((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS))
800f66e: 4b84 ldr r3, [pc, #528] ; (800f880 <ip4_reass+0x2b0>)
800f670: 881b ldrh r3, [r3, #0]
800f672: 461a mov r2, r3
800f674: 8c3b ldrh r3, [r7, #32]
800f676: 4413 add r3, r2
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
800f678: 2b0a cmp r3, #10
800f67a: f300 812f bgt.w 800f8dc <ip4_reass+0x30c>
}
}
/* Look for the datagram the fragment belongs to in the current datagram queue,
* remembering the previous in the queue for later dequeueing. */
for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
800f67e: 4b81 ldr r3, [pc, #516] ; (800f884 <ip4_reass+0x2b4>)
800f680: 681b ldr r3, [r3, #0]
800f682: 633b str r3, [r7, #48] ; 0x30
800f684: e015 b.n 800f6b2 <ip4_reass+0xe2>
/* Check if the incoming fragment matches the one currently present
in the reassembly buffer. If so, we proceed with copying the
fragment into the buffer. */
if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) {
800f686: 6b3b ldr r3, [r7, #48] ; 0x30
800f688: 695a ldr r2, [r3, #20]
800f68a: 6abb ldr r3, [r7, #40] ; 0x28
800f68c: 68db ldr r3, [r3, #12]
800f68e: 429a cmp r2, r3
800f690: d10c bne.n 800f6ac <ip4_reass+0xdc>
800f692: 6b3b ldr r3, [r7, #48] ; 0x30
800f694: 699a ldr r2, [r3, #24]
800f696: 6abb ldr r3, [r7, #40] ; 0x28
800f698: 691b ldr r3, [r3, #16]
800f69a: 429a cmp r2, r3
800f69c: d106 bne.n 800f6ac <ip4_reass+0xdc>
800f69e: 6b3b ldr r3, [r7, #48] ; 0x30
800f6a0: 899a ldrh r2, [r3, #12]
800f6a2: 6abb ldr r3, [r7, #40] ; 0x28
800f6a4: 889b ldrh r3, [r3, #4]
800f6a6: b29b uxth r3, r3
800f6a8: 429a cmp r2, r3
800f6aa: d006 beq.n 800f6ba <ip4_reass+0xea>
for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
800f6ac: 6b3b ldr r3, [r7, #48] ; 0x30
800f6ae: 681b ldr r3, [r3, #0]
800f6b0: 633b str r3, [r7, #48] ; 0x30
800f6b2: 6b3b ldr r3, [r7, #48] ; 0x30
800f6b4: 2b00 cmp r3, #0
800f6b6: d1e6 bne.n 800f686 <ip4_reass+0xb6>
800f6b8: e000 b.n 800f6bc <ip4_reass+0xec>
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: matching previous fragment ID=%"X16_F"\n",
lwip_ntohs(IPH_ID(fraghdr))));
IPFRAG_STATS_INC(ip_frag.cachehit);
break;
800f6ba: bf00 nop
}
}
if (ipr == NULL) {
800f6bc: 6b3b ldr r3, [r7, #48] ; 0x30
800f6be: 2b00 cmp r3, #0
800f6c0: d109 bne.n 800f6d6 <ip4_reass+0x106>
/* Enqueue a new datagram into the datagram queue */
ipr = ip_reass_enqueue_new_datagram(fraghdr, clen);
800f6c2: 8c3b ldrh r3, [r7, #32]
800f6c4: 4619 mov r1, r3
800f6c6: 6ab8 ldr r0, [r7, #40] ; 0x28
800f6c8: f7ff fdb0 bl 800f22c <ip_reass_enqueue_new_datagram>
800f6cc: 6338 str r0, [r7, #48] ; 0x30
/* Bail if unable to enqueue */
if (ipr == NULL) {
800f6ce: 6b3b ldr r3, [r7, #48] ; 0x30
800f6d0: 2b00 cmp r3, #0
800f6d2: d11c bne.n 800f70e <ip4_reass+0x13e>
goto nullreturn;
800f6d4: e105 b.n 800f8e2 <ip4_reass+0x312>
}
} else {
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
800f6d6: 6abb ldr r3, [r7, #40] ; 0x28
800f6d8: 88db ldrh r3, [r3, #6]
800f6da: b29b uxth r3, r3
800f6dc: 4618 mov r0, r3
800f6de: f7f4 fb65 bl 8003dac <lwip_htons>
800f6e2: 4603 mov r3, r0
800f6e4: f3c3 030c ubfx r3, r3, #0, #13
800f6e8: 2b00 cmp r3, #0
800f6ea: d110 bne.n 800f70e <ip4_reass+0x13e>
((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) {
800f6ec: 6b3b ldr r3, [r7, #48] ; 0x30
800f6ee: 89db ldrh r3, [r3, #14]
800f6f0: 4618 mov r0, r3
800f6f2: f7f4 fb5b bl 8003dac <lwip_htons>
800f6f6: 4603 mov r3, r0
800f6f8: f3c3 030c ubfx r3, r3, #0, #13
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
800f6fc: 2b00 cmp r3, #0
800f6fe: d006 beq.n 800f70e <ip4_reass+0x13e>
/* ipr->iphdr is not the header from the first fragment, but fraghdr is
* -> copy fraghdr into ipr->iphdr since we want to have the header
* of the first fragment (for ICMP time exceeded and later, for copying
* all options, if supported)*/
SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN);
800f700: 6b3b ldr r3, [r7, #48] ; 0x30
800f702: 3308 adds r3, #8
800f704: 2214 movs r2, #20
800f706: 6ab9 ldr r1, [r7, #40] ; 0x28
800f708: 4618 mov r0, r3
800f70a: f000 fba5 bl 800fe58 <memcpy>
/* At this point, we have either created a new entry or pointing
* to an existing one */
/* check for 'no more fragments', and update queue entry*/
is_last = (IPH_OFFSET(fraghdr) & PP_NTOHS(IP_MF)) == 0;
800f70e: 6abb ldr r3, [r7, #40] ; 0x28
800f710: 88db ldrh r3, [r3, #6]
800f712: b29b uxth r3, r3
800f714: f003 0320 and.w r3, r3, #32
800f718: 2b00 cmp r3, #0
800f71a: bf0c ite eq
800f71c: 2301 moveq r3, #1
800f71e: 2300 movne r3, #0
800f720: b2db uxtb r3, r3
800f722: 61fb str r3, [r7, #28]
if (is_last) {
800f724: 69fb ldr r3, [r7, #28]
800f726: 2b00 cmp r3, #0
800f728: d00e beq.n 800f748 <ip4_reass+0x178>
u16_t datagram_len = (u16_t)(offset + len);
800f72a: 8cfa ldrh r2, [r7, #38] ; 0x26
800f72c: 8cbb ldrh r3, [r7, #36] ; 0x24
800f72e: 4413 add r3, r2
800f730: 837b strh r3, [r7, #26]
if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) {
800f732: 8b7a ldrh r2, [r7, #26]
800f734: 8cfb ldrh r3, [r7, #38] ; 0x26
800f736: 429a cmp r2, r3
800f738: f0c0 80a0 bcc.w 800f87c <ip4_reass+0x2ac>
800f73c: 8b7b ldrh r3, [r7, #26]
800f73e: f64f 72eb movw r2, #65515 ; 0xffeb
800f742: 4293 cmp r3, r2
800f744: f200 809a bhi.w 800f87c <ip4_reass+0x2ac>
goto nullreturn_ipr;
}
}
/* find the right place to insert this pbuf */
/* @todo: trim pbufs if fragments are overlapping */
valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last);
800f748: 69fa ldr r2, [r7, #28]
800f74a: 6879 ldr r1, [r7, #4]
800f74c: 6b38 ldr r0, [r7, #48] ; 0x30
800f74e: f7ff fdd5 bl 800f2fc <ip_reass_chain_frag_into_datagram_and_validate>
800f752: 6178 str r0, [r7, #20]
if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) {
800f754: 697b ldr r3, [r7, #20]
800f756: f1b3 3fff cmp.w r3, #4294967295
800f75a: f000 809b beq.w 800f894 <ip4_reass+0x2c4>
/* if we come here, the pbuf has been enqueued */
/* Track the current number of pbufs current 'in-flight', in order to limit
the number of fragments that may be enqueued at any one time
(overflow checked by testing against IP_REASS_MAX_PBUFS) */
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount + clen);
800f75e: 4b48 ldr r3, [pc, #288] ; (800f880 <ip4_reass+0x2b0>)
800f760: 881a ldrh r2, [r3, #0]
800f762: 8c3b ldrh r3, [r7, #32]
800f764: 4413 add r3, r2
800f766: b29a uxth r2, r3
800f768: 4b45 ldr r3, [pc, #276] ; (800f880 <ip4_reass+0x2b0>)
800f76a: 801a strh r2, [r3, #0]
if (is_last) {
800f76c: 69fb ldr r3, [r7, #28]
800f76e: 2b00 cmp r3, #0
800f770: d00d beq.n 800f78e <ip4_reass+0x1be>
u16_t datagram_len = (u16_t)(offset + len);
800f772: 8cfa ldrh r2, [r7, #38] ; 0x26
800f774: 8cbb ldrh r3, [r7, #36] ; 0x24
800f776: 4413 add r3, r2
800f778: 827b strh r3, [r7, #18]
ipr->datagram_len = datagram_len;
800f77a: 6b3b ldr r3, [r7, #48] ; 0x30
800f77c: 8a7a ldrh r2, [r7, #18]
800f77e: 839a strh r2, [r3, #28]
ipr->flags |= IP_REASS_FLAG_LASTFRAG;
800f780: 6b3b ldr r3, [r7, #48] ; 0x30
800f782: 7f9b ldrb r3, [r3, #30]
800f784: f043 0301 orr.w r3, r3, #1
800f788: b2da uxtb r2, r3
800f78a: 6b3b ldr r3, [r7, #48] ; 0x30
800f78c: 779a strb r2, [r3, #30]
LWIP_DEBUGF(IP_REASS_DEBUG,
("ip4_reass: last fragment seen, total len %"S16_F"\n",
ipr->datagram_len));
}
if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) {
800f78e: 697b ldr r3, [r7, #20]
800f790: 2b01 cmp r3, #1
800f792: d171 bne.n 800f878 <ip4_reass+0x2a8>
struct ip_reassdata *ipr_prev;
/* the totally last fragment (flag more fragments = 0) was received at least
* once AND all fragments are received */
u16_t datagram_len = (u16_t)(ipr->datagram_len + IP_HLEN);
800f794: 6b3b ldr r3, [r7, #48] ; 0x30
800f796: 8b9b ldrh r3, [r3, #28]
800f798: 3314 adds r3, #20
800f79a: 823b strh r3, [r7, #16]
/* save the second pbuf before copying the header over the pointer */
r = ((struct ip_reass_helper *)ipr->p->payload)->next_pbuf;
800f79c: 6b3b ldr r3, [r7, #48] ; 0x30
800f79e: 685b ldr r3, [r3, #4]
800f7a0: 685b ldr r3, [r3, #4]
800f7a2: 681b ldr r3, [r3, #0]
800f7a4: 637b str r3, [r7, #52] ; 0x34
/* copy the original ip header back to the first pbuf */
fraghdr = (struct ip_hdr *)(ipr->p->payload);
800f7a6: 6b3b ldr r3, [r7, #48] ; 0x30
800f7a8: 685b ldr r3, [r3, #4]
800f7aa: 685b ldr r3, [r3, #4]
800f7ac: 62bb str r3, [r7, #40] ; 0x28
SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN);
800f7ae: 6b3b ldr r3, [r7, #48] ; 0x30
800f7b0: 3308 adds r3, #8
800f7b2: 2214 movs r2, #20
800f7b4: 4619 mov r1, r3
800f7b6: 6ab8 ldr r0, [r7, #40] ; 0x28
800f7b8: f000 fb4e bl 800fe58 <memcpy>
IPH_LEN_SET(fraghdr, lwip_htons(datagram_len));
800f7bc: 8a3b ldrh r3, [r7, #16]
800f7be: 4618 mov r0, r3
800f7c0: f7f4 faf4 bl 8003dac <lwip_htons>
800f7c4: 4603 mov r3, r0
800f7c6: 461a mov r2, r3
800f7c8: 6abb ldr r3, [r7, #40] ; 0x28
800f7ca: 805a strh r2, [r3, #2]
IPH_OFFSET_SET(fraghdr, 0);
800f7cc: 6abb ldr r3, [r7, #40] ; 0x28
800f7ce: 2200 movs r2, #0
800f7d0: 719a strb r2, [r3, #6]
800f7d2: 2200 movs r2, #0
800f7d4: 71da strb r2, [r3, #7]
IPH_CHKSUM_SET(fraghdr, 0);
800f7d6: 6abb ldr r3, [r7, #40] ; 0x28
800f7d8: 2200 movs r2, #0
800f7da: 729a strb r2, [r3, #10]
800f7dc: 2200 movs r2, #0
800f7de: 72da strb r2, [r3, #11]
IF__NETIF_CHECKSUM_ENABLED(ip_current_input_netif(), NETIF_CHECKSUM_GEN_IP) {
IPH_CHKSUM_SET(fraghdr, inet_chksum(fraghdr, IP_HLEN));
}
#endif /* CHECKSUM_GEN_IP */
p = ipr->p;
800f7e0: 6b3b ldr r3, [r7, #48] ; 0x30
800f7e2: 685b ldr r3, [r3, #4]
800f7e4: 607b str r3, [r7, #4]
/* chain together the pbufs contained within the reass_data list. */
while (r != NULL) {
800f7e6: e00d b.n 800f804 <ip4_reass+0x234>
iprh = (struct ip_reass_helper *)r->payload;
800f7e8: 6b7b ldr r3, [r7, #52] ; 0x34
800f7ea: 685b ldr r3, [r3, #4]
800f7ec: 60fb str r3, [r7, #12]
/* hide the ip header for every succeeding fragment */
pbuf_remove_header(r, IP_HLEN);
800f7ee: 2114 movs r1, #20
800f7f0: 6b78 ldr r0, [r7, #52] ; 0x34
800f7f2: f7f5 fdbf bl 8005374 <pbuf_remove_header>
pbuf_cat(p, r);
800f7f6: 6b79 ldr r1, [r7, #52] ; 0x34
800f7f8: 6878 ldr r0, [r7, #4]
800f7fa: f7f5 ff03 bl 8005604 <pbuf_cat>
r = iprh->next_pbuf;
800f7fe: 68fb ldr r3, [r7, #12]
800f800: 681b ldr r3, [r3, #0]
800f802: 637b str r3, [r7, #52] ; 0x34
while (r != NULL) {
800f804: 6b7b ldr r3, [r7, #52] ; 0x34
800f806: 2b00 cmp r3, #0
800f808: d1ee bne.n 800f7e8 <ip4_reass+0x218>
}
/* find the previous entry in the linked list */
if (ipr == reassdatagrams) {
800f80a: 4b1e ldr r3, [pc, #120] ; (800f884 <ip4_reass+0x2b4>)
800f80c: 681b ldr r3, [r3, #0]
800f80e: 6b3a ldr r2, [r7, #48] ; 0x30
800f810: 429a cmp r2, r3
800f812: d102 bne.n 800f81a <ip4_reass+0x24a>
ipr_prev = NULL;
800f814: 2300 movs r3, #0
800f816: 62fb str r3, [r7, #44] ; 0x2c
800f818: e010 b.n 800f83c <ip4_reass+0x26c>
} else {
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
800f81a: 4b1a ldr r3, [pc, #104] ; (800f884 <ip4_reass+0x2b4>)
800f81c: 681b ldr r3, [r3, #0]
800f81e: 62fb str r3, [r7, #44] ; 0x2c
800f820: e007 b.n 800f832 <ip4_reass+0x262>
if (ipr_prev->next == ipr) {
800f822: 6afb ldr r3, [r7, #44] ; 0x2c
800f824: 681b ldr r3, [r3, #0]
800f826: 6b3a ldr r2, [r7, #48] ; 0x30
800f828: 429a cmp r2, r3
800f82a: d006 beq.n 800f83a <ip4_reass+0x26a>
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
800f82c: 6afb ldr r3, [r7, #44] ; 0x2c
800f82e: 681b ldr r3, [r3, #0]
800f830: 62fb str r3, [r7, #44] ; 0x2c
800f832: 6afb ldr r3, [r7, #44] ; 0x2c
800f834: 2b00 cmp r3, #0
800f836: d1f4 bne.n 800f822 <ip4_reass+0x252>
800f838: e000 b.n 800f83c <ip4_reass+0x26c>
break;
800f83a: bf00 nop
}
}
}
/* release the sources allocate for the fragment queue entry */
ip_reass_dequeue_datagram(ipr, ipr_prev);
800f83c: 6af9 ldr r1, [r7, #44] ; 0x2c
800f83e: 6b38 ldr r0, [r7, #48] ; 0x30
800f840: f7ff fd2e bl 800f2a0 <ip_reass_dequeue_datagram>
/* and adjust the number of pbufs currently queued for reassembly. */
clen = pbuf_clen(p);
800f844: 6878 ldr r0, [r7, #4]
800f846: f7f5 fea3 bl 8005590 <pbuf_clen>
800f84a: 4603 mov r3, r0
800f84c: 843b strh r3, [r7, #32]
LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
800f84e: 4b0c ldr r3, [pc, #48] ; (800f880 <ip4_reass+0x2b0>)
800f850: 881b ldrh r3, [r3, #0]
800f852: 8c3a ldrh r2, [r7, #32]
800f854: 429a cmp r2, r3
800f856: d906 bls.n 800f866 <ip4_reass+0x296>
800f858: 4b0b ldr r3, [pc, #44] ; (800f888 <ip4_reass+0x2b8>)
800f85a: f240 229b movw r2, #667 ; 0x29b
800f85e: 490b ldr r1, [pc, #44] ; (800f88c <ip4_reass+0x2bc>)
800f860: 480b ldr r0, [pc, #44] ; (800f890 <ip4_reass+0x2c0>)
800f862: f000 fb29 bl 800feb8 <printf>
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen);
800f866: 4b06 ldr r3, [pc, #24] ; (800f880 <ip4_reass+0x2b0>)
800f868: 881a ldrh r2, [r3, #0]
800f86a: 8c3b ldrh r3, [r7, #32]
800f86c: 1ad3 subs r3, r2, r3
800f86e: b29a uxth r2, r3
800f870: 4b03 ldr r3, [pc, #12] ; (800f880 <ip4_reass+0x2b0>)
800f872: 801a strh r2, [r3, #0]
MIB2_STATS_INC(mib2.ipreasmoks);
/* Return the pbuf chain */
return p;
800f874: 687b ldr r3, [r7, #4]
800f876: e038 b.n 800f8ea <ip4_reass+0x31a>
}
/* the datagram is not (yet?) reassembled completely */
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount));
return NULL;
800f878: 2300 movs r3, #0
800f87a: e036 b.n 800f8ea <ip4_reass+0x31a>
goto nullreturn_ipr;
800f87c: bf00 nop
800f87e: e00a b.n 800f896 <ip4_reass+0x2c6>
800f880: 20008d38 .word 0x20008d38
800f884: 20008d34 .word 0x20008d34
800f888: 0801750c .word 0x0801750c
800f88c: 0801767c .word 0x0801767c
800f890: 08017554 .word 0x08017554
goto nullreturn_ipr;
800f894: bf00 nop
nullreturn_ipr:
LWIP_ASSERT("ipr != NULL", ipr != NULL);
800f896: 6b3b ldr r3, [r7, #48] ; 0x30
800f898: 2b00 cmp r3, #0
800f89a: d106 bne.n 800f8aa <ip4_reass+0x2da>
800f89c: 4b15 ldr r3, [pc, #84] ; (800f8f4 <ip4_reass+0x324>)
800f89e: f44f 722a mov.w r2, #680 ; 0x2a8
800f8a2: 4915 ldr r1, [pc, #84] ; (800f8f8 <ip4_reass+0x328>)
800f8a4: 4815 ldr r0, [pc, #84] ; (800f8fc <ip4_reass+0x32c>)
800f8a6: f000 fb07 bl 800feb8 <printf>
if (ipr->p == NULL) {
800f8aa: 6b3b ldr r3, [r7, #48] ; 0x30
800f8ac: 685b ldr r3, [r3, #4]
800f8ae: 2b00 cmp r3, #0
800f8b0: d116 bne.n 800f8e0 <ip4_reass+0x310>
/* dropped pbuf after creating a new datagram entry: remove the entry, too */
LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams);
800f8b2: 4b13 ldr r3, [pc, #76] ; (800f900 <ip4_reass+0x330>)
800f8b4: 681b ldr r3, [r3, #0]
800f8b6: 6b3a ldr r2, [r7, #48] ; 0x30
800f8b8: 429a cmp r2, r3
800f8ba: d006 beq.n 800f8ca <ip4_reass+0x2fa>
800f8bc: 4b0d ldr r3, [pc, #52] ; (800f8f4 <ip4_reass+0x324>)
800f8be: f240 22ab movw r2, #683 ; 0x2ab
800f8c2: 4910 ldr r1, [pc, #64] ; (800f904 <ip4_reass+0x334>)
800f8c4: 480d ldr r0, [pc, #52] ; (800f8fc <ip4_reass+0x32c>)
800f8c6: f000 faf7 bl 800feb8 <printf>
ip_reass_dequeue_datagram(ipr, NULL);
800f8ca: 2100 movs r1, #0
800f8cc: 6b38 ldr r0, [r7, #48] ; 0x30
800f8ce: f7ff fce7 bl 800f2a0 <ip_reass_dequeue_datagram>
800f8d2: e006 b.n 800f8e2 <ip4_reass+0x312>
goto nullreturn;
800f8d4: bf00 nop
800f8d6: e004 b.n 800f8e2 <ip4_reass+0x312>
goto nullreturn;
800f8d8: bf00 nop
800f8da: e002 b.n 800f8e2 <ip4_reass+0x312>
goto nullreturn;
800f8dc: bf00 nop
800f8de: e000 b.n 800f8e2 <ip4_reass+0x312>
}
nullreturn:
800f8e0: bf00 nop
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n"));
IPFRAG_STATS_INC(ip_frag.drop);
pbuf_free(p);
800f8e2: 6878 ldr r0, [r7, #4]
800f8e4: f7f5 fdcc bl 8005480 <pbuf_free>
return NULL;
800f8e8: 2300 movs r3, #0
}
800f8ea: 4618 mov r0, r3
800f8ec: 3738 adds r7, #56 ; 0x38
800f8ee: 46bd mov sp, r7
800f8f0: bd80 pop {r7, pc}
800f8f2: bf00 nop
800f8f4: 0801750c .word 0x0801750c
800f8f8: 08017698 .word 0x08017698
800f8fc: 08017554 .word 0x08017554
800f900: 20008d34 .word 0x20008d34
800f904: 080176a4 .word 0x080176a4
0800f908 <ip_frag_alloc_pbuf_custom_ref>:
#if IP_FRAG
#if !LWIP_NETIF_TX_SINGLE_PBUF
/** Allocate a new struct pbuf_custom_ref */
static struct pbuf_custom_ref *
ip_frag_alloc_pbuf_custom_ref(void)
{
800f908: b580 push {r7, lr}
800f90a: af00 add r7, sp, #0
return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF);
800f90c: 2005 movs r0, #5
800f90e: f7f4 fec5 bl 800469c <memp_malloc>
800f912: 4603 mov r3, r0
}
800f914: 4618 mov r0, r3
800f916: bd80 pop {r7, pc}
0800f918 <ip_frag_free_pbuf_custom_ref>:
/** Free a struct pbuf_custom_ref */
static void
ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p)
{
800f918: b580 push {r7, lr}
800f91a: b082 sub sp, #8
800f91c: af00 add r7, sp, #0
800f91e: 6078 str r0, [r7, #4]
LWIP_ASSERT("p != NULL", p != NULL);
800f920: 687b ldr r3, [r7, #4]
800f922: 2b00 cmp r3, #0
800f924: d106 bne.n 800f934 <ip_frag_free_pbuf_custom_ref+0x1c>
800f926: 4b07 ldr r3, [pc, #28] ; (800f944 <ip_frag_free_pbuf_custom_ref+0x2c>)
800f928: f44f 7231 mov.w r2, #708 ; 0x2c4
800f92c: 4906 ldr r1, [pc, #24] ; (800f948 <ip_frag_free_pbuf_custom_ref+0x30>)
800f92e: 4807 ldr r0, [pc, #28] ; (800f94c <ip_frag_free_pbuf_custom_ref+0x34>)
800f930: f000 fac2 bl 800feb8 <printf>
memp_free(MEMP_FRAG_PBUF, p);
800f934: 6879 ldr r1, [r7, #4]
800f936: 2005 movs r0, #5
800f938: f7f4 ff20 bl 800477c <memp_free>
}
800f93c: bf00 nop
800f93e: 3708 adds r7, #8
800f940: 46bd mov sp, r7
800f942: bd80 pop {r7, pc}
800f944: 0801750c .word 0x0801750c
800f948: 080176c4 .word 0x080176c4
800f94c: 08017554 .word 0x08017554
0800f950 <ipfrag_free_pbuf_custom>:
/** Free-callback function to free a 'struct pbuf_custom_ref', called by
* pbuf_free. */
static void
ipfrag_free_pbuf_custom(struct pbuf *p)
{
800f950: b580 push {r7, lr}
800f952: b084 sub sp, #16
800f954: af00 add r7, sp, #0
800f956: 6078 str r0, [r7, #4]
struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p;
800f958: 687b ldr r3, [r7, #4]
800f95a: 60fb str r3, [r7, #12]
LWIP_ASSERT("pcr != NULL", pcr != NULL);
800f95c: 68fb ldr r3, [r7, #12]
800f95e: 2b00 cmp r3, #0
800f960: d106 bne.n 800f970 <ipfrag_free_pbuf_custom+0x20>
800f962: 4b11 ldr r3, [pc, #68] ; (800f9a8 <ipfrag_free_pbuf_custom+0x58>)
800f964: f240 22ce movw r2, #718 ; 0x2ce
800f968: 4910 ldr r1, [pc, #64] ; (800f9ac <ipfrag_free_pbuf_custom+0x5c>)
800f96a: 4811 ldr r0, [pc, #68] ; (800f9b0 <ipfrag_free_pbuf_custom+0x60>)
800f96c: f000 faa4 bl 800feb8 <printf>
LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p);
800f970: 68fa ldr r2, [r7, #12]
800f972: 687b ldr r3, [r7, #4]
800f974: 429a cmp r2, r3
800f976: d006 beq.n 800f986 <ipfrag_free_pbuf_custom+0x36>
800f978: 4b0b ldr r3, [pc, #44] ; (800f9a8 <ipfrag_free_pbuf_custom+0x58>)
800f97a: f240 22cf movw r2, #719 ; 0x2cf
800f97e: 490d ldr r1, [pc, #52] ; (800f9b4 <ipfrag_free_pbuf_custom+0x64>)
800f980: 480b ldr r0, [pc, #44] ; (800f9b0 <ipfrag_free_pbuf_custom+0x60>)
800f982: f000 fa99 bl 800feb8 <printf>
if (pcr->original != NULL) {
800f986: 68fb ldr r3, [r7, #12]
800f988: 695b ldr r3, [r3, #20]
800f98a: 2b00 cmp r3, #0
800f98c: d004 beq.n 800f998 <ipfrag_free_pbuf_custom+0x48>
pbuf_free(pcr->original);
800f98e: 68fb ldr r3, [r7, #12]
800f990: 695b ldr r3, [r3, #20]
800f992: 4618 mov r0, r3
800f994: f7f5 fd74 bl 8005480 <pbuf_free>
}
ip_frag_free_pbuf_custom_ref(pcr);
800f998: 68f8 ldr r0, [r7, #12]
800f99a: f7ff ffbd bl 800f918 <ip_frag_free_pbuf_custom_ref>
}
800f99e: bf00 nop
800f9a0: 3710 adds r7, #16
800f9a2: 46bd mov sp, r7
800f9a4: bd80 pop {r7, pc}
800f9a6: bf00 nop
800f9a8: 0801750c .word 0x0801750c
800f9ac: 080176d0 .word 0x080176d0
800f9b0: 08017554 .word 0x08017554
800f9b4: 080176dc .word 0x080176dc
0800f9b8 <ip4_frag>:
*
* @return ERR_OK if sent successfully, err_t otherwise
*/
err_t
ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest)
{
800f9b8: b580 push {r7, lr}
800f9ba: b094 sub sp, #80 ; 0x50
800f9bc: af02 add r7, sp, #8
800f9be: 60f8 str r0, [r7, #12]
800f9c0: 60b9 str r1, [r7, #8]
800f9c2: 607a str r2, [r7, #4]
struct pbuf *rambuf;
#if !LWIP_NETIF_TX_SINGLE_PBUF
struct pbuf *newpbuf;
u16_t newpbuflen = 0;
800f9c4: 2300 movs r3, #0
800f9c6: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
u16_t left_to_copy;
#endif
struct ip_hdr *original_iphdr;
struct ip_hdr *iphdr;
const u16_t nfb = (u16_t)((netif->mtu - IP_HLEN) / 8);
800f9ca: 68bb ldr r3, [r7, #8]
800f9cc: 8d1b ldrh r3, [r3, #40] ; 0x28
800f9ce: 3b14 subs r3, #20
800f9d0: 2b00 cmp r3, #0
800f9d2: da00 bge.n 800f9d6 <ip4_frag+0x1e>
800f9d4: 3307 adds r3, #7
800f9d6: 10db asrs r3, r3, #3
800f9d8: 877b strh r3, [r7, #58] ; 0x3a
u16_t left, fragsize;
u16_t ofo;
int last;
u16_t poff = IP_HLEN;
800f9da: 2314 movs r3, #20
800f9dc: 87fb strh r3, [r7, #62] ; 0x3e
u16_t tmp;
int mf_set;
original_iphdr = (struct ip_hdr *)p->payload;
800f9de: 68fb ldr r3, [r7, #12]
800f9e0: 685b ldr r3, [r3, #4]
800f9e2: 637b str r3, [r7, #52] ; 0x34
iphdr = original_iphdr;
800f9e4: 6b7b ldr r3, [r7, #52] ; 0x34
800f9e6: 633b str r3, [r7, #48] ; 0x30
if (IPH_HL_BYTES(iphdr) != IP_HLEN) {
800f9e8: 6b3b ldr r3, [r7, #48] ; 0x30
800f9ea: 781b ldrb r3, [r3, #0]
800f9ec: f003 030f and.w r3, r3, #15
800f9f0: b2db uxtb r3, r3
800f9f2: 009b lsls r3, r3, #2
800f9f4: b2db uxtb r3, r3
800f9f6: 2b14 cmp r3, #20
800f9f8: d002 beq.n 800fa00 <ip4_frag+0x48>
/* ip4_frag() does not support IP options */
return ERR_VAL;
800f9fa: f06f 0305 mvn.w r3, #5
800f9fe: e110 b.n 800fc22 <ip4_frag+0x26a>
}
LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL);
800fa00: 68fb ldr r3, [r7, #12]
800fa02: 895b ldrh r3, [r3, #10]
800fa04: 2b13 cmp r3, #19
800fa06: d809 bhi.n 800fa1c <ip4_frag+0x64>
800fa08: 4b88 ldr r3, [pc, #544] ; (800fc2c <ip4_frag+0x274>)
800fa0a: f44f 723f mov.w r2, #764 ; 0x2fc
800fa0e: 4988 ldr r1, [pc, #544] ; (800fc30 <ip4_frag+0x278>)
800fa10: 4888 ldr r0, [pc, #544] ; (800fc34 <ip4_frag+0x27c>)
800fa12: f000 fa51 bl 800feb8 <printf>
800fa16: f06f 0305 mvn.w r3, #5
800fa1a: e102 b.n 800fc22 <ip4_frag+0x26a>
/* Save original offset */
tmp = lwip_ntohs(IPH_OFFSET(iphdr));
800fa1c: 6b3b ldr r3, [r7, #48] ; 0x30
800fa1e: 88db ldrh r3, [r3, #6]
800fa20: b29b uxth r3, r3
800fa22: 4618 mov r0, r3
800fa24: f7f4 f9c2 bl 8003dac <lwip_htons>
800fa28: 4603 mov r3, r0
800fa2a: 87bb strh r3, [r7, #60] ; 0x3c
ofo = tmp & IP_OFFMASK;
800fa2c: 8fbb ldrh r3, [r7, #60] ; 0x3c
800fa2e: f3c3 030c ubfx r3, r3, #0, #13
800fa32: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
/* already fragmented? if so, the last fragment we create must have MF, too */
mf_set = tmp & IP_MF;
800fa36: 8fbb ldrh r3, [r7, #60] ; 0x3c
800fa38: f403 5300 and.w r3, r3, #8192 ; 0x2000
800fa3c: 62fb str r3, [r7, #44] ; 0x2c
left = (u16_t)(p->tot_len - IP_HLEN);
800fa3e: 68fb ldr r3, [r7, #12]
800fa40: 891b ldrh r3, [r3, #8]
800fa42: 3b14 subs r3, #20
800fa44: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
while (left) {
800fa48: e0e1 b.n 800fc0e <ip4_frag+0x256>
/* Fill this fragment */
fragsize = LWIP_MIN(left, (u16_t)(nfb * 8));
800fa4a: 8f7b ldrh r3, [r7, #58] ; 0x3a
800fa4c: 00db lsls r3, r3, #3
800fa4e: b29b uxth r3, r3
800fa50: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
800fa54: 4293 cmp r3, r2
800fa56: bf28 it cs
800fa58: 4613 movcs r3, r2
800fa5a: 857b strh r3, [r7, #42] ; 0x2a
/* When not using a static buffer, create a chain of pbufs.
* The first will be a PBUF_RAM holding the link and IP header.
* The rest will be PBUF_REFs mirroring the pbuf chain to be fragged,
* but limited to the size of an mtu.
*/
rambuf = pbuf_alloc(PBUF_LINK, IP_HLEN, PBUF_RAM);
800fa5c: f44f 7220 mov.w r2, #640 ; 0x280
800fa60: 2114 movs r1, #20
800fa62: 200e movs r0, #14
800fa64: f7f5 fa28 bl 8004eb8 <pbuf_alloc>
800fa68: 6278 str r0, [r7, #36] ; 0x24
if (rambuf == NULL) {
800fa6a: 6a7b ldr r3, [r7, #36] ; 0x24
800fa6c: 2b00 cmp r3, #0
800fa6e: f000 80d5 beq.w 800fc1c <ip4_frag+0x264>
goto memerr;
}
LWIP_ASSERT("this needs a pbuf in one piece!",
800fa72: 6a7b ldr r3, [r7, #36] ; 0x24
800fa74: 895b ldrh r3, [r3, #10]
800fa76: 2b13 cmp r3, #19
800fa78: d806 bhi.n 800fa88 <ip4_frag+0xd0>
800fa7a: 4b6c ldr r3, [pc, #432] ; (800fc2c <ip4_frag+0x274>)
800fa7c: f44f 7249 mov.w r2, #804 ; 0x324
800fa80: 496d ldr r1, [pc, #436] ; (800fc38 <ip4_frag+0x280>)
800fa82: 486c ldr r0, [pc, #432] ; (800fc34 <ip4_frag+0x27c>)
800fa84: f000 fa18 bl 800feb8 <printf>
(rambuf->len >= (IP_HLEN)));
SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN);
800fa88: 6a7b ldr r3, [r7, #36] ; 0x24
800fa8a: 685b ldr r3, [r3, #4]
800fa8c: 2214 movs r2, #20
800fa8e: 6b79 ldr r1, [r7, #52] ; 0x34
800fa90: 4618 mov r0, r3
800fa92: f000 f9e1 bl 800fe58 <memcpy>
iphdr = (struct ip_hdr *)rambuf->payload;
800fa96: 6a7b ldr r3, [r7, #36] ; 0x24
800fa98: 685b ldr r3, [r3, #4]
800fa9a: 633b str r3, [r7, #48] ; 0x30
left_to_copy = fragsize;
800fa9c: 8d7b ldrh r3, [r7, #42] ; 0x2a
800fa9e: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
while (left_to_copy) {
800faa2: e064 b.n 800fb6e <ip4_frag+0x1b6>
struct pbuf_custom_ref *pcr;
u16_t plen = (u16_t)(p->len - poff);
800faa4: 68fb ldr r3, [r7, #12]
800faa6: 895a ldrh r2, [r3, #10]
800faa8: 8ffb ldrh r3, [r7, #62] ; 0x3e
800faaa: 1ad3 subs r3, r2, r3
800faac: 83fb strh r3, [r7, #30]
LWIP_ASSERT("p->len >= poff", p->len >= poff);
800faae: 68fb ldr r3, [r7, #12]
800fab0: 895b ldrh r3, [r3, #10]
800fab2: 8ffa ldrh r2, [r7, #62] ; 0x3e
800fab4: 429a cmp r2, r3
800fab6: d906 bls.n 800fac6 <ip4_frag+0x10e>
800fab8: 4b5c ldr r3, [pc, #368] ; (800fc2c <ip4_frag+0x274>)
800faba: f240 322d movw r2, #813 ; 0x32d
800fabe: 495f ldr r1, [pc, #380] ; (800fc3c <ip4_frag+0x284>)
800fac0: 485c ldr r0, [pc, #368] ; (800fc34 <ip4_frag+0x27c>)
800fac2: f000 f9f9 bl 800feb8 <printf>
newpbuflen = LWIP_MIN(left_to_copy, plen);
800fac6: 8bfa ldrh r2, [r7, #30]
800fac8: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
800facc: 4293 cmp r3, r2
800face: bf28 it cs
800fad0: 4613 movcs r3, r2
800fad2: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
/* Is this pbuf already empty? */
if (!newpbuflen) {
800fad6: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
800fada: 2b00 cmp r3, #0
800fadc: d105 bne.n 800faea <ip4_frag+0x132>
poff = 0;
800fade: 2300 movs r3, #0
800fae0: 87fb strh r3, [r7, #62] ; 0x3e
p = p->next;
800fae2: 68fb ldr r3, [r7, #12]
800fae4: 681b ldr r3, [r3, #0]
800fae6: 60fb str r3, [r7, #12]
continue;
800fae8: e041 b.n 800fb6e <ip4_frag+0x1b6>
}
pcr = ip_frag_alloc_pbuf_custom_ref();
800faea: f7ff ff0d bl 800f908 <ip_frag_alloc_pbuf_custom_ref>
800faee: 61b8 str r0, [r7, #24]
if (pcr == NULL) {
800faf0: 69bb ldr r3, [r7, #24]
800faf2: 2b00 cmp r3, #0
800faf4: d103 bne.n 800fafe <ip4_frag+0x146>
pbuf_free(rambuf);
800faf6: 6a78 ldr r0, [r7, #36] ; 0x24
800faf8: f7f5 fcc2 bl 8005480 <pbuf_free>
goto memerr;
800fafc: e08f b.n 800fc1e <ip4_frag+0x266>
}
/* Mirror this pbuf, although we might not need all of it. */
newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
800fafe: 69b8 ldr r0, [r7, #24]
(u8_t *)p->payload + poff, newpbuflen);
800fb00: 68fb ldr r3, [r7, #12]
800fb02: 685a ldr r2, [r3, #4]
newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
800fb04: 8ffb ldrh r3, [r7, #62] ; 0x3e
800fb06: 4413 add r3, r2
800fb08: f8b7 1046 ldrh.w r1, [r7, #70] ; 0x46
800fb0c: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46
800fb10: 9201 str r2, [sp, #4]
800fb12: 9300 str r3, [sp, #0]
800fb14: 4603 mov r3, r0
800fb16: 2241 movs r2, #65 ; 0x41
800fb18: 2000 movs r0, #0
800fb1a: f7f5 faf7 bl 800510c <pbuf_alloced_custom>
800fb1e: 6178 str r0, [r7, #20]
if (newpbuf == NULL) {
800fb20: 697b ldr r3, [r7, #20]
800fb22: 2b00 cmp r3, #0
800fb24: d106 bne.n 800fb34 <ip4_frag+0x17c>
ip_frag_free_pbuf_custom_ref(pcr);
800fb26: 69b8 ldr r0, [r7, #24]
800fb28: f7ff fef6 bl 800f918 <ip_frag_free_pbuf_custom_ref>
pbuf_free(rambuf);
800fb2c: 6a78 ldr r0, [r7, #36] ; 0x24
800fb2e: f7f5 fca7 bl 8005480 <pbuf_free>
goto memerr;
800fb32: e074 b.n 800fc1e <ip4_frag+0x266>
}
pbuf_ref(p);
800fb34: 68f8 ldr r0, [r7, #12]
800fb36: f7f5 fd43 bl 80055c0 <pbuf_ref>
pcr->original = p;
800fb3a: 69bb ldr r3, [r7, #24]
800fb3c: 68fa ldr r2, [r7, #12]
800fb3e: 615a str r2, [r3, #20]
pcr->pc.custom_free_function = ipfrag_free_pbuf_custom;
800fb40: 69bb ldr r3, [r7, #24]
800fb42: 4a3f ldr r2, [pc, #252] ; (800fc40 <ip4_frag+0x288>)
800fb44: 611a str r2, [r3, #16]
/* Add it to end of rambuf's chain, but using pbuf_cat, not pbuf_chain
* so that it is removed when pbuf_dechain is later called on rambuf.
*/
pbuf_cat(rambuf, newpbuf);
800fb46: 6979 ldr r1, [r7, #20]
800fb48: 6a78 ldr r0, [r7, #36] ; 0x24
800fb4a: f7f5 fd5b bl 8005604 <pbuf_cat>
left_to_copy = (u16_t)(left_to_copy - newpbuflen);
800fb4e: f8b7 2044 ldrh.w r2, [r7, #68] ; 0x44
800fb52: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
800fb56: 1ad3 subs r3, r2, r3
800fb58: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
if (left_to_copy) {
800fb5c: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
800fb60: 2b00 cmp r3, #0
800fb62: d004 beq.n 800fb6e <ip4_frag+0x1b6>
poff = 0;
800fb64: 2300 movs r3, #0
800fb66: 87fb strh r3, [r7, #62] ; 0x3e
p = p->next;
800fb68: 68fb ldr r3, [r7, #12]
800fb6a: 681b ldr r3, [r3, #0]
800fb6c: 60fb str r3, [r7, #12]
while (left_to_copy) {
800fb6e: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
800fb72: 2b00 cmp r3, #0
800fb74: d196 bne.n 800faa4 <ip4_frag+0xec>
}
}
poff = (u16_t)(poff + newpbuflen);
800fb76: 8ffa ldrh r2, [r7, #62] ; 0x3e
800fb78: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
800fb7c: 4413 add r3, r2
800fb7e: 87fb strh r3, [r7, #62] ; 0x3e
#endif /* LWIP_NETIF_TX_SINGLE_PBUF */
/* Correct header */
last = (left <= netif->mtu - IP_HLEN);
800fb80: 68bb ldr r3, [r7, #8]
800fb82: 8d1b ldrh r3, [r3, #40] ; 0x28
800fb84: f1a3 0213 sub.w r2, r3, #19
800fb88: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
800fb8c: 429a cmp r2, r3
800fb8e: bfcc ite gt
800fb90: 2301 movgt r3, #1
800fb92: 2300 movle r3, #0
800fb94: b2db uxtb r3, r3
800fb96: 623b str r3, [r7, #32]
/* Set new offset and MF flag */
tmp = (IP_OFFMASK & (ofo));
800fb98: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
800fb9c: f3c3 030c ubfx r3, r3, #0, #13
800fba0: 87bb strh r3, [r7, #60] ; 0x3c
if (!last || mf_set) {
800fba2: 6a3b ldr r3, [r7, #32]
800fba4: 2b00 cmp r3, #0
800fba6: d002 beq.n 800fbae <ip4_frag+0x1f6>
800fba8: 6afb ldr r3, [r7, #44] ; 0x2c
800fbaa: 2b00 cmp r3, #0
800fbac: d003 beq.n 800fbb6 <ip4_frag+0x1fe>
/* the last fragment has MF set if the input frame had it */
tmp = tmp | IP_MF;
800fbae: 8fbb ldrh r3, [r7, #60] ; 0x3c
800fbb0: f443 5300 orr.w r3, r3, #8192 ; 0x2000
800fbb4: 87bb strh r3, [r7, #60] ; 0x3c
}
IPH_OFFSET_SET(iphdr, lwip_htons(tmp));
800fbb6: 8fbb ldrh r3, [r7, #60] ; 0x3c
800fbb8: 4618 mov r0, r3
800fbba: f7f4 f8f7 bl 8003dac <lwip_htons>
800fbbe: 4603 mov r3, r0
800fbc0: 461a mov r2, r3
800fbc2: 6b3b ldr r3, [r7, #48] ; 0x30
800fbc4: 80da strh r2, [r3, #6]
IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN)));
800fbc6: 8d7b ldrh r3, [r7, #42] ; 0x2a
800fbc8: 3314 adds r3, #20
800fbca: b29b uxth r3, r3
800fbcc: 4618 mov r0, r3
800fbce: f7f4 f8ed bl 8003dac <lwip_htons>
800fbd2: 4603 mov r3, r0
800fbd4: 461a mov r2, r3
800fbd6: 6b3b ldr r3, [r7, #48] ; 0x30
800fbd8: 805a strh r2, [r3, #2]
IPH_CHKSUM_SET(iphdr, 0);
800fbda: 6b3b ldr r3, [r7, #48] ; 0x30
800fbdc: 2200 movs r2, #0
800fbde: 729a strb r2, [r3, #10]
800fbe0: 2200 movs r2, #0
800fbe2: 72da strb r2, [r3, #11]
#endif /* CHECKSUM_GEN_IP */
/* No need for separate header pbuf - we allowed room for it in rambuf
* when allocated.
*/
netif->output(netif, rambuf, dest);
800fbe4: 68bb ldr r3, [r7, #8]
800fbe6: 695b ldr r3, [r3, #20]
800fbe8: 687a ldr r2, [r7, #4]
800fbea: 6a79 ldr r1, [r7, #36] ; 0x24
800fbec: 68b8 ldr r0, [r7, #8]
800fbee: 4798 blx r3
* recreate it next time round the loop. If we're lucky the hardware
* will have already sent the packet, the free will really free, and
* there will be zero memory penalty.
*/
pbuf_free(rambuf);
800fbf0: 6a78 ldr r0, [r7, #36] ; 0x24
800fbf2: f7f5 fc45 bl 8005480 <pbuf_free>
left = (u16_t)(left - fragsize);
800fbf6: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
800fbfa: 8d7b ldrh r3, [r7, #42] ; 0x2a
800fbfc: 1ad3 subs r3, r2, r3
800fbfe: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
ofo = (u16_t)(ofo + nfb);
800fc02: f8b7 2040 ldrh.w r2, [r7, #64] ; 0x40
800fc06: 8f7b ldrh r3, [r7, #58] ; 0x3a
800fc08: 4413 add r3, r2
800fc0a: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
while (left) {
800fc0e: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
800fc12: 2b00 cmp r3, #0
800fc14: f47f af19 bne.w 800fa4a <ip4_frag+0x92>
}
MIB2_STATS_INC(mib2.ipfragoks);
return ERR_OK;
800fc18: 2300 movs r3, #0
800fc1a: e002 b.n 800fc22 <ip4_frag+0x26a>
goto memerr;
800fc1c: bf00 nop
memerr:
MIB2_STATS_INC(mib2.ipfragfails);
return ERR_MEM;
800fc1e: f04f 33ff mov.w r3, #4294967295
}
800fc22: 4618 mov r0, r3
800fc24: 3748 adds r7, #72 ; 0x48
800fc26: 46bd mov sp, r7
800fc28: bd80 pop {r7, pc}
800fc2a: bf00 nop
800fc2c: 0801750c .word 0x0801750c
800fc30: 080176e8 .word 0x080176e8
800fc34: 08017554 .word 0x08017554
800fc38: 08017704 .word 0x08017704
800fc3c: 08017724 .word 0x08017724
800fc40: 0800f951 .word 0x0800f951
0800fc44 <ethernet_input>:
* @see ETHARP_SUPPORT_VLAN
* @see LWIP_HOOK_VLAN_CHECK
*/
err_t
ethernet_input(struct pbuf *p, struct netif *netif)
{
800fc44: b580 push {r7, lr}
800fc46: b086 sub sp, #24
800fc48: af00 add r7, sp, #0
800fc4a: 6078 str r0, [r7, #4]
800fc4c: 6039 str r1, [r7, #0]
struct eth_hdr *ethhdr;
u16_t type;
#if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6
u16_t next_hdr_offset = SIZEOF_ETH_HDR;
800fc4e: 230e movs r3, #14
800fc50: 82fb strh r3, [r7, #22]
#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
LWIP_ASSERT_CORE_LOCKED();
if (p->len <= SIZEOF_ETH_HDR) {
800fc52: 687b ldr r3, [r7, #4]
800fc54: 895b ldrh r3, [r3, #10]
800fc56: 2b0e cmp r3, #14
800fc58: d96e bls.n 800fd38 <ethernet_input+0xf4>
ETHARP_STATS_INC(etharp.drop);
MIB2_STATS_NETIF_INC(netif, ifinerrors);
goto free_and_return;
}
if (p->if_idx == NETIF_NO_INDEX) {
800fc5a: 687b ldr r3, [r7, #4]
800fc5c: 7bdb ldrb r3, [r3, #15]
800fc5e: 2b00 cmp r3, #0
800fc60: d106 bne.n 800fc70 <ethernet_input+0x2c>
p->if_idx = netif_get_index(netif);
800fc62: 683b ldr r3, [r7, #0]
800fc64: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
800fc68: 3301 adds r3, #1
800fc6a: b2da uxtb r2, r3
800fc6c: 687b ldr r3, [r7, #4]
800fc6e: 73da strb r2, [r3, #15]
}
/* points to packet payload, which starts with an Ethernet header */
ethhdr = (struct eth_hdr *)p->payload;
800fc70: 687b ldr r3, [r7, #4]
800fc72: 685b ldr r3, [r3, #4]
800fc74: 613b str r3, [r7, #16]
(unsigned char)ethhdr->dest.addr[3], (unsigned char)ethhdr->dest.addr[4], (unsigned char)ethhdr->dest.addr[5],
(unsigned char)ethhdr->src.addr[0], (unsigned char)ethhdr->src.addr[1], (unsigned char)ethhdr->src.addr[2],
(unsigned char)ethhdr->src.addr[3], (unsigned char)ethhdr->src.addr[4], (unsigned char)ethhdr->src.addr[5],
lwip_htons(ethhdr->type)));
type = ethhdr->type;
800fc76: 693b ldr r3, [r7, #16]
800fc78: 7b1a ldrb r2, [r3, #12]
800fc7a: 7b5b ldrb r3, [r3, #13]
800fc7c: 021b lsls r3, r3, #8
800fc7e: 4313 orrs r3, r2
800fc80: 81fb strh r3, [r7, #14]
#if LWIP_ARP_FILTER_NETIF
netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, lwip_htons(type));
#endif /* LWIP_ARP_FILTER_NETIF*/
if (ethhdr->dest.addr[0] & 1) {
800fc82: 693b ldr r3, [r7, #16]
800fc84: 781b ldrb r3, [r3, #0]
800fc86: f003 0301 and.w r3, r3, #1
800fc8a: 2b00 cmp r3, #0
800fc8c: d023 beq.n 800fcd6 <ethernet_input+0x92>
/* this might be a multicast or broadcast packet */
if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) {
800fc8e: 693b ldr r3, [r7, #16]
800fc90: 781b ldrb r3, [r3, #0]
800fc92: 2b01 cmp r3, #1
800fc94: d10f bne.n 800fcb6 <ethernet_input+0x72>
#if LWIP_IPV4
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
800fc96: 693b ldr r3, [r7, #16]
800fc98: 785b ldrb r3, [r3, #1]
800fc9a: 2b00 cmp r3, #0
800fc9c: d11b bne.n 800fcd6 <ethernet_input+0x92>
(ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) {
800fc9e: 693b ldr r3, [r7, #16]
800fca0: 789b ldrb r3, [r3, #2]
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
800fca2: 2b5e cmp r3, #94 ; 0x5e
800fca4: d117 bne.n 800fcd6 <ethernet_input+0x92>
/* mark the pbuf as link-layer multicast */
p->flags |= PBUF_FLAG_LLMCAST;
800fca6: 687b ldr r3, [r7, #4]
800fca8: 7b5b ldrb r3, [r3, #13]
800fcaa: f043 0310 orr.w r3, r3, #16
800fcae: b2da uxtb r2, r3
800fcb0: 687b ldr r3, [r7, #4]
800fcb2: 735a strb r2, [r3, #13]
800fcb4: e00f b.n 800fcd6 <ethernet_input+0x92>
(ethhdr->dest.addr[1] == LL_IP6_MULTICAST_ADDR_1)) {
/* mark the pbuf as link-layer multicast */
p->flags |= PBUF_FLAG_LLMCAST;
}
#endif /* LWIP_IPV6 */
else if (eth_addr_cmp(&ethhdr->dest, &ethbroadcast)) {
800fcb6: 693b ldr r3, [r7, #16]
800fcb8: 2206 movs r2, #6
800fcba: 4928 ldr r1, [pc, #160] ; (800fd5c <ethernet_input+0x118>)
800fcbc: 4618 mov r0, r3
800fcbe: f000 f8bb bl 800fe38 <memcmp>
800fcc2: 4603 mov r3, r0
800fcc4: 2b00 cmp r3, #0
800fcc6: d106 bne.n 800fcd6 <ethernet_input+0x92>
/* mark the pbuf as link-layer broadcast */
p->flags |= PBUF_FLAG_LLBCAST;
800fcc8: 687b ldr r3, [r7, #4]
800fcca: 7b5b ldrb r3, [r3, #13]
800fccc: f043 0308 orr.w r3, r3, #8
800fcd0: b2da uxtb r2, r3
800fcd2: 687b ldr r3, [r7, #4]
800fcd4: 735a strb r2, [r3, #13]
}
}
switch (type) {
800fcd6: 89fb ldrh r3, [r7, #14]
800fcd8: 2b08 cmp r3, #8
800fcda: d003 beq.n 800fce4 <ethernet_input+0xa0>
800fcdc: f5b3 6fc1 cmp.w r3, #1544 ; 0x608
800fce0: d014 beq.n 800fd0c <ethernet_input+0xc8>
}
#endif
ETHARP_STATS_INC(etharp.proterr);
ETHARP_STATS_INC(etharp.drop);
MIB2_STATS_NETIF_INC(netif, ifinunknownprotos);
goto free_and_return;
800fce2: e032 b.n 800fd4a <ethernet_input+0x106>
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
800fce4: 683b ldr r3, [r7, #0]
800fce6: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800fcea: f003 0308 and.w r3, r3, #8
800fcee: 2b00 cmp r3, #0
800fcf0: d024 beq.n 800fd3c <ethernet_input+0xf8>
if (pbuf_remove_header(p, next_hdr_offset)) {
800fcf2: 8afb ldrh r3, [r7, #22]
800fcf4: 4619 mov r1, r3
800fcf6: 6878 ldr r0, [r7, #4]
800fcf8: f7f5 fb3c bl 8005374 <pbuf_remove_header>
800fcfc: 4603 mov r3, r0
800fcfe: 2b00 cmp r3, #0
800fd00: d11e bne.n 800fd40 <ethernet_input+0xfc>
ip4_input(p, netif);
800fd02: 6839 ldr r1, [r7, #0]
800fd04: 6878 ldr r0, [r7, #4]
800fd06: f7fe fdc5 bl 800e894 <ip4_input>
break;
800fd0a: e013 b.n 800fd34 <ethernet_input+0xf0>
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
800fd0c: 683b ldr r3, [r7, #0]
800fd0e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800fd12: f003 0308 and.w r3, r3, #8
800fd16: 2b00 cmp r3, #0
800fd18: d014 beq.n 800fd44 <ethernet_input+0x100>
if (pbuf_remove_header(p, next_hdr_offset)) {
800fd1a: 8afb ldrh r3, [r7, #22]
800fd1c: 4619 mov r1, r3
800fd1e: 6878 ldr r0, [r7, #4]
800fd20: f7f5 fb28 bl 8005374 <pbuf_remove_header>
800fd24: 4603 mov r3, r0
800fd26: 2b00 cmp r3, #0
800fd28: d10e bne.n 800fd48 <ethernet_input+0x104>
etharp_input(p, netif);
800fd2a: 6839 ldr r1, [r7, #0]
800fd2c: 6878 ldr r0, [r7, #4]
800fd2e: f7fd ff61 bl 800dbf4 <etharp_input>
break;
800fd32: bf00 nop
}
/* This means the pbuf is freed or consumed,
so the caller doesn't have to free it again */
return ERR_OK;
800fd34: 2300 movs r3, #0
800fd36: e00c b.n 800fd52 <ethernet_input+0x10e>
goto free_and_return;
800fd38: bf00 nop
800fd3a: e006 b.n 800fd4a <ethernet_input+0x106>
goto free_and_return;
800fd3c: bf00 nop
800fd3e: e004 b.n 800fd4a <ethernet_input+0x106>
goto free_and_return;
800fd40: bf00 nop
800fd42: e002 b.n 800fd4a <ethernet_input+0x106>
goto free_and_return;
800fd44: bf00 nop
800fd46: e000 b.n 800fd4a <ethernet_input+0x106>
goto free_and_return;
800fd48: bf00 nop
free_and_return:
pbuf_free(p);
800fd4a: 6878 ldr r0, [r7, #4]
800fd4c: f7f5 fb98 bl 8005480 <pbuf_free>
return ERR_OK;
800fd50: 2300 movs r3, #0
}
800fd52: 4618 mov r0, r3
800fd54: 3718 adds r7, #24
800fd56: 46bd mov sp, r7
800fd58: bd80 pop {r7, pc}
800fd5a: bf00 nop
800fd5c: 080178cc .word 0x080178cc
0800fd60 <ethernet_output>:
* @return ERR_OK if the packet was sent, any other err_t on failure
*/
err_t
ethernet_output(struct netif * netif, struct pbuf * p,
const struct eth_addr * src, const struct eth_addr * dst,
u16_t eth_type) {
800fd60: b580 push {r7, lr}
800fd62: b086 sub sp, #24
800fd64: af00 add r7, sp, #0
800fd66: 60f8 str r0, [r7, #12]
800fd68: 60b9 str r1, [r7, #8]
800fd6a: 607a str r2, [r7, #4]
800fd6c: 603b str r3, [r7, #0]
struct eth_hdr *ethhdr;
u16_t eth_type_be = lwip_htons(eth_type);
800fd6e: 8c3b ldrh r3, [r7, #32]
800fd70: 4618 mov r0, r3
800fd72: f7f4 f81b bl 8003dac <lwip_htons>
800fd76: 4603 mov r3, r0
800fd78: 82fb strh r3, [r7, #22]
eth_type_be = PP_HTONS(ETHTYPE_VLAN);
} else
#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */
{
if (pbuf_add_header(p, SIZEOF_ETH_HDR) != 0) {
800fd7a: 210e movs r1, #14
800fd7c: 68b8 ldr r0, [r7, #8]
800fd7e: f7f5 fae9 bl 8005354 <pbuf_add_header>
800fd82: 4603 mov r3, r0
800fd84: 2b00 cmp r3, #0
800fd86: d125 bne.n 800fdd4 <ethernet_output+0x74>
}
}
LWIP_ASSERT_CORE_LOCKED();
ethhdr = (struct eth_hdr *)p->payload;
800fd88: 68bb ldr r3, [r7, #8]
800fd8a: 685b ldr r3, [r3, #4]
800fd8c: 613b str r3, [r7, #16]
ethhdr->type = eth_type_be;
800fd8e: 693b ldr r3, [r7, #16]
800fd90: 8afa ldrh r2, [r7, #22]
800fd92: 819a strh r2, [r3, #12]
SMEMCPY(&ethhdr->dest, dst, ETH_HWADDR_LEN);
800fd94: 693b ldr r3, [r7, #16]
800fd96: 2206 movs r2, #6
800fd98: 6839 ldr r1, [r7, #0]
800fd9a: 4618 mov r0, r3
800fd9c: f000 f85c bl 800fe58 <memcpy>
SMEMCPY(&ethhdr->src, src, ETH_HWADDR_LEN);
800fda0: 693b ldr r3, [r7, #16]
800fda2: 3306 adds r3, #6
800fda4: 2206 movs r2, #6
800fda6: 6879 ldr r1, [r7, #4]
800fda8: 4618 mov r0, r3
800fdaa: f000 f855 bl 800fe58 <memcpy>
LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",
800fdae: 68fb ldr r3, [r7, #12]
800fdb0: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
800fdb4: 2b06 cmp r3, #6
800fdb6: d006 beq.n 800fdc6 <ethernet_output+0x66>
800fdb8: 4b0a ldr r3, [pc, #40] ; (800fde4 <ethernet_output+0x84>)
800fdba: f44f 7299 mov.w r2, #306 ; 0x132
800fdbe: 490a ldr r1, [pc, #40] ; (800fde8 <ethernet_output+0x88>)
800fdc0: 480a ldr r0, [pc, #40] ; (800fdec <ethernet_output+0x8c>)
800fdc2: f000 f879 bl 800feb8 <printf>
(netif->hwaddr_len == ETH_HWADDR_LEN));
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE,
("ethernet_output: sending packet %p\n", (void *)p));
/* send the packet */
return netif->linkoutput(netif, p);
800fdc6: 68fb ldr r3, [r7, #12]
800fdc8: 699b ldr r3, [r3, #24]
800fdca: 68b9 ldr r1, [r7, #8]
800fdcc: 68f8 ldr r0, [r7, #12]
800fdce: 4798 blx r3
800fdd0: 4603 mov r3, r0
800fdd2: e002 b.n 800fdda <ethernet_output+0x7a>
goto pbuf_header_failed;
800fdd4: bf00 nop
pbuf_header_failed:
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("ethernet_output: could not allocate room for header.\n"));
LINK_STATS_INC(link.lenerr);
return ERR_BUF;
800fdd6: f06f 0301 mvn.w r3, #1
}
800fdda: 4618 mov r0, r3
800fddc: 3718 adds r7, #24
800fdde: 46bd mov sp, r7
800fde0: bd80 pop {r7, pc}
800fde2: bf00 nop
800fde4: 08017734 .word 0x08017734
800fde8: 0801776c .word 0x0801776c
800fdec: 080177a0 .word 0x080177a0
0800fdf0 <__libc_init_array>:
800fdf0: b570 push {r4, r5, r6, lr}
800fdf2: 4d0d ldr r5, [pc, #52] ; (800fe28 <__libc_init_array+0x38>)
800fdf4: 4c0d ldr r4, [pc, #52] ; (800fe2c <__libc_init_array+0x3c>)
800fdf6: 1b64 subs r4, r4, r5
800fdf8: 10a4 asrs r4, r4, #2
800fdfa: 2600 movs r6, #0
800fdfc: 42a6 cmp r6, r4
800fdfe: d109 bne.n 800fe14 <__libc_init_array+0x24>
800fe00: 4d0b ldr r5, [pc, #44] ; (800fe30 <__libc_init_array+0x40>)
800fe02: 4c0c ldr r4, [pc, #48] ; (800fe34 <__libc_init_array+0x44>)
800fe04: f004 fdc8 bl 8014998 <_init>
800fe08: 1b64 subs r4, r4, r5
800fe0a: 10a4 asrs r4, r4, #2
800fe0c: 2600 movs r6, #0
800fe0e: 42a6 cmp r6, r4
800fe10: d105 bne.n 800fe1e <__libc_init_array+0x2e>
800fe12: bd70 pop {r4, r5, r6, pc}
800fe14: f855 3b04 ldr.w r3, [r5], #4
800fe18: 4798 blx r3
800fe1a: 3601 adds r6, #1
800fe1c: e7ee b.n 800fdfc <__libc_init_array+0xc>
800fe1e: f855 3b04 ldr.w r3, [r5], #4
800fe22: 4798 blx r3
800fe24: 3601 adds r6, #1
800fe26: e7f2 b.n 800fe0e <__libc_init_array+0x1e>
800fe28: 08017c7c .word 0x08017c7c
800fe2c: 08017c7c .word 0x08017c7c
800fe30: 08017c7c .word 0x08017c7c
800fe34: 08017c84 .word 0x08017c84
0800fe38 <memcmp>:
800fe38: b510 push {r4, lr}
800fe3a: 3901 subs r1, #1
800fe3c: 4402 add r2, r0
800fe3e: 4290 cmp r0, r2
800fe40: d101 bne.n 800fe46 <memcmp+0xe>
800fe42: 2000 movs r0, #0
800fe44: e005 b.n 800fe52 <memcmp+0x1a>
800fe46: 7803 ldrb r3, [r0, #0]
800fe48: f811 4f01 ldrb.w r4, [r1, #1]!
800fe4c: 42a3 cmp r3, r4
800fe4e: d001 beq.n 800fe54 <memcmp+0x1c>
800fe50: 1b18 subs r0, r3, r4
800fe52: bd10 pop {r4, pc}
800fe54: 3001 adds r0, #1
800fe56: e7f2 b.n 800fe3e <memcmp+0x6>
0800fe58 <memcpy>:
800fe58: 440a add r2, r1
800fe5a: 4291 cmp r1, r2
800fe5c: f100 33ff add.w r3, r0, #4294967295
800fe60: d100 bne.n 800fe64 <memcpy+0xc>
800fe62: 4770 bx lr
800fe64: b510 push {r4, lr}
800fe66: f811 4b01 ldrb.w r4, [r1], #1
800fe6a: f803 4f01 strb.w r4, [r3, #1]!
800fe6e: 4291 cmp r1, r2
800fe70: d1f9 bne.n 800fe66 <memcpy+0xe>
800fe72: bd10 pop {r4, pc}
0800fe74 <memmove>:
800fe74: 4288 cmp r0, r1
800fe76: b510 push {r4, lr}
800fe78: eb01 0402 add.w r4, r1, r2
800fe7c: d902 bls.n 800fe84 <memmove+0x10>
800fe7e: 4284 cmp r4, r0
800fe80: 4623 mov r3, r4
800fe82: d807 bhi.n 800fe94 <memmove+0x20>
800fe84: 1e43 subs r3, r0, #1
800fe86: 42a1 cmp r1, r4
800fe88: d008 beq.n 800fe9c <memmove+0x28>
800fe8a: f811 2b01 ldrb.w r2, [r1], #1
800fe8e: f803 2f01 strb.w r2, [r3, #1]!
800fe92: e7f8 b.n 800fe86 <memmove+0x12>
800fe94: 4402 add r2, r0
800fe96: 4601 mov r1, r0
800fe98: 428a cmp r2, r1
800fe9a: d100 bne.n 800fe9e <memmove+0x2a>
800fe9c: bd10 pop {r4, pc}
800fe9e: f813 4d01 ldrb.w r4, [r3, #-1]!
800fea2: f802 4d01 strb.w r4, [r2, #-1]!
800fea6: e7f7 b.n 800fe98 <memmove+0x24>
0800fea8 <memset>:
800fea8: 4402 add r2, r0
800feaa: 4603 mov r3, r0
800feac: 4293 cmp r3, r2
800feae: d100 bne.n 800feb2 <memset+0xa>
800feb0: 4770 bx lr
800feb2: f803 1b01 strb.w r1, [r3], #1
800feb6: e7f9 b.n 800feac <memset+0x4>
0800feb8 <printf>:
800feb8: b40f push {r0, r1, r2, r3}
800feba: b507 push {r0, r1, r2, lr}
800febc: 4906 ldr r1, [pc, #24] ; (800fed8 <printf+0x20>)
800febe: ab04 add r3, sp, #16
800fec0: 6808 ldr r0, [r1, #0]
800fec2: f853 2b04 ldr.w r2, [r3], #4
800fec6: 6881 ldr r1, [r0, #8]
800fec8: 9301 str r3, [sp, #4]
800feca: f000 f825 bl 800ff18 <_vfprintf_r>
800fece: b003 add sp, #12
800fed0: f85d eb04 ldr.w lr, [sp], #4
800fed4: b004 add sp, #16
800fed6: 4770 bx lr
800fed8: 20000030 .word 0x20000030
0800fedc <rand>:
800fedc: 4b0a ldr r3, [pc, #40] ; (800ff08 <rand+0x2c>)
800fede: 4a0b ldr r2, [pc, #44] ; (800ff0c <rand+0x30>)
800fee0: 490b ldr r1, [pc, #44] ; (800ff10 <rand+0x34>)
800fee2: b510 push {r4, lr}
800fee4: 681c ldr r4, [r3, #0]
800fee6: f8d4 00a8 ldr.w r0, [r4, #168] ; 0xa8
800feea: f8d4 30ac ldr.w r3, [r4, #172] ; 0xac
800feee: 4342 muls r2, r0
800fef0: fb01 2203 mla r2, r1, r3, r2
800fef4: fba0 0101 umull r0, r1, r0, r1
800fef8: 1c43 adds r3, r0, #1
800fefa: eb42 0001 adc.w r0, r2, r1
800fefe: e9c4 302a strd r3, r0, [r4, #168] ; 0xa8
800ff02: f020 4000 bic.w r0, r0, #2147483648 ; 0x80000000
800ff06: bd10 pop {r4, pc}
800ff08: 20000030 .word 0x20000030
800ff0c: 5851f42d .word 0x5851f42d
800ff10: 4c957f2d .word 0x4c957f2d
800ff14: 00000000 .word 0x00000000
0800ff18 <_vfprintf_r>:
800ff18: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
800ff1c: ed2d 8b04 vpush {d8-d9}
800ff20: b0cf sub sp, #316 ; 0x13c
800ff22: 4689 mov r9, r1
800ff24: 4690 mov r8, r2
800ff26: 461c mov r4, r3
800ff28: 461e mov r6, r3
800ff2a: 4682 mov sl, r0
800ff2c: f002 fbaa bl 8012684 <_localeconv_r>
800ff30: 6803 ldr r3, [r0, #0]
800ff32: 9313 str r3, [sp, #76] ; 0x4c
800ff34: 4618 mov r0, r3
800ff36: f7f0 f95b bl 80001f0 <strlen>
800ff3a: 900e str r0, [sp, #56] ; 0x38
800ff3c: f1ba 0f00 cmp.w sl, #0
800ff40: d005 beq.n 800ff4e <_vfprintf_r+0x36>
800ff42: f8da 3038 ldr.w r3, [sl, #56] ; 0x38
800ff46: b913 cbnz r3, 800ff4e <_vfprintf_r+0x36>
800ff48: 4650 mov r0, sl
800ff4a: f002 fa2b bl 80123a4 <__sinit>
800ff4e: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
800ff52: 07d8 lsls r0, r3, #31
800ff54: d407 bmi.n 800ff66 <_vfprintf_r+0x4e>
800ff56: f8b9 300c ldrh.w r3, [r9, #12]
800ff5a: 0599 lsls r1, r3, #22
800ff5c: d403 bmi.n 800ff66 <_vfprintf_r+0x4e>
800ff5e: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
800ff62: f002 fb95 bl 8012690 <__retarget_lock_acquire_recursive>
800ff66: f9b9 300c ldrsh.w r3, [r9, #12]
800ff6a: 049a lsls r2, r3, #18
800ff6c: d409 bmi.n 800ff82 <_vfprintf_r+0x6a>
800ff6e: f443 5300 orr.w r3, r3, #8192 ; 0x2000
800ff72: f8a9 300c strh.w r3, [r9, #12]
800ff76: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
800ff7a: f423 5300 bic.w r3, r3, #8192 ; 0x2000
800ff7e: f8c9 3064 str.w r3, [r9, #100] ; 0x64
800ff82: f8b9 300c ldrh.w r3, [r9, #12]
800ff86: 071b lsls r3, r3, #28
800ff88: d502 bpl.n 800ff90 <_vfprintf_r+0x78>
800ff8a: f8d9 3010 ldr.w r3, [r9, #16]
800ff8e: b9d3 cbnz r3, 800ffc6 <_vfprintf_r+0xae>
800ff90: 4649 mov r1, r9
800ff92: 4650 mov r0, sl
800ff94: f001 fa3a bl 801140c <__swsetup_r>
800ff98: b1a8 cbz r0, 800ffc6 <_vfprintf_r+0xae>
800ff9a: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
800ff9e: 07df lsls r7, r3, #31
800ffa0: d508 bpl.n 800ffb4 <_vfprintf_r+0x9c>
800ffa2: f04f 33ff mov.w r3, #4294967295
800ffa6: 930f str r3, [sp, #60] ; 0x3c
800ffa8: 980f ldr r0, [sp, #60] ; 0x3c
800ffaa: b04f add sp, #316 ; 0x13c
800ffac: ecbd 8b04 vpop {d8-d9}
800ffb0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
800ffb4: f8b9 300c ldrh.w r3, [r9, #12]
800ffb8: 059e lsls r6, r3, #22
800ffba: d4f2 bmi.n 800ffa2 <_vfprintf_r+0x8a>
800ffbc: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
800ffc0: f002 fb67 bl 8012692 <__retarget_lock_release_recursive>
800ffc4: e7ed b.n 800ffa2 <_vfprintf_r+0x8a>
800ffc6: f8b9 300c ldrh.w r3, [r9, #12]
800ffca: f003 021a and.w r2, r3, #26
800ffce: 2a0a cmp r2, #10
800ffd0: d118 bne.n 8010004 <_vfprintf_r+0xec>
800ffd2: f9b9 200e ldrsh.w r2, [r9, #14]
800ffd6: 2a00 cmp r2, #0
800ffd8: db14 blt.n 8010004 <_vfprintf_r+0xec>
800ffda: f8d9 2064 ldr.w r2, [r9, #100] ; 0x64
800ffde: 07d5 lsls r5, r2, #31
800ffe0: d405 bmi.n 800ffee <_vfprintf_r+0xd6>
800ffe2: 0598 lsls r0, r3, #22
800ffe4: d403 bmi.n 800ffee <_vfprintf_r+0xd6>
800ffe6: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
800ffea: f002 fb52 bl 8012692 <__retarget_lock_release_recursive>
800ffee: 4623 mov r3, r4
800fff0: 4642 mov r2, r8
800fff2: 4649 mov r1, r9
800fff4: 4650 mov r0, sl
800fff6: b04f add sp, #316 ; 0x13c
800fff8: ecbd 8b04 vpop {d8-d9}
800fffc: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
8010000: f001 b9c4 b.w 801138c <__sbprintf>
8010004: ed9f 7b92 vldr d7, [pc, #584] ; 8010250 <_vfprintf_r+0x338>
8010008: 2500 movs r5, #0
801000a: e9cd 5523 strd r5, r5, [sp, #140] ; 0x8c
801000e: ed8d 7b0c vstr d7, [sp, #48] ; 0x30
8010012: e9cd 5515 strd r5, r5, [sp, #84] ; 0x54
8010016: ac25 add r4, sp, #148 ; 0x94
8010018: 9422 str r4, [sp, #136] ; 0x88
801001a: 9505 str r5, [sp, #20]
801001c: 950a str r5, [sp, #40] ; 0x28
801001e: 9512 str r5, [sp, #72] ; 0x48
8010020: 9514 str r5, [sp, #80] ; 0x50
8010022: 950f str r5, [sp, #60] ; 0x3c
8010024: 4643 mov r3, r8
8010026: 461d mov r5, r3
8010028: f813 2b01 ldrb.w r2, [r3], #1
801002c: b10a cbz r2, 8010032 <_vfprintf_r+0x11a>
801002e: 2a25 cmp r2, #37 ; 0x25
8010030: d1f9 bne.n 8010026 <_vfprintf_r+0x10e>
8010032: ebb5 0708 subs.w r7, r5, r8
8010036: d00d beq.n 8010054 <_vfprintf_r+0x13c>
8010038: 9b24 ldr r3, [sp, #144] ; 0x90
801003a: 443b add r3, r7
801003c: 9324 str r3, [sp, #144] ; 0x90
801003e: 9b23 ldr r3, [sp, #140] ; 0x8c
8010040: 3301 adds r3, #1
8010042: 2b07 cmp r3, #7
8010044: e9c4 8700 strd r8, r7, [r4]
8010048: 9323 str r3, [sp, #140] ; 0x8c
801004a: dc79 bgt.n 8010140 <_vfprintf_r+0x228>
801004c: 3408 adds r4, #8
801004e: 9b0f ldr r3, [sp, #60] ; 0x3c
8010050: 443b add r3, r7
8010052: 930f str r3, [sp, #60] ; 0x3c
8010054: 782b ldrb r3, [r5, #0]
8010056: 2b00 cmp r3, #0
8010058: f001 8154 beq.w 8011304 <_vfprintf_r+0x13ec>
801005c: 2300 movs r3, #0
801005e: f04f 32ff mov.w r2, #4294967295
8010062: 3501 adds r5, #1
8010064: f88d 306b strb.w r3, [sp, #107] ; 0x6b
8010068: 9204 str r2, [sp, #16]
801006a: 9310 str r3, [sp, #64] ; 0x40
801006c: 469b mov fp, r3
801006e: 270a movs r7, #10
8010070: 212b movs r1, #43 ; 0x2b
8010072: 462b mov r3, r5
8010074: f813 2b01 ldrb.w r2, [r3], #1
8010078: 9206 str r2, [sp, #24]
801007a: 930b str r3, [sp, #44] ; 0x2c
801007c: 9b06 ldr r3, [sp, #24]
801007e: 3b20 subs r3, #32
8010080: 2b5a cmp r3, #90 ; 0x5a
8010082: f200 85c8 bhi.w 8010c16 <_vfprintf_r+0xcfe>
8010086: e8df f013 tbh [pc, r3, lsl #1]
801008a: 007e .short 0x007e
801008c: 05c605c6 .word 0x05c605c6
8010090: 05c60086 .word 0x05c60086
8010094: 05c605c6 .word 0x05c605c6
8010098: 05c60065 .word 0x05c60065
801009c: 008905c6 .word 0x008905c6
80100a0: 05c60093 .word 0x05c60093
80100a4: 00960090 .word 0x00960090
80100a8: 00b205c6 .word 0x00b205c6
80100ac: 00b500b5 .word 0x00b500b5
80100b0: 00b500b5 .word 0x00b500b5
80100b4: 00b500b5 .word 0x00b500b5
80100b8: 00b500b5 .word 0x00b500b5
80100bc: 05c600b5 .word 0x05c600b5
80100c0: 05c605c6 .word 0x05c605c6
80100c4: 05c605c6 .word 0x05c605c6
80100c8: 05c605c6 .word 0x05c605c6
80100cc: 05c6012a .word 0x05c6012a
80100d0: 00fa00e7 .word 0x00fa00e7
80100d4: 012a012a .word 0x012a012a
80100d8: 05c6012a .word 0x05c6012a
80100dc: 05c605c6 .word 0x05c605c6
80100e0: 00c505c6 .word 0x00c505c6
80100e4: 05c605c6 .word 0x05c605c6
80100e8: 05c604a0 .word 0x05c604a0
80100ec: 05c605c6 .word 0x05c605c6
80100f0: 05c604ea .word 0x05c604ea
80100f4: 05c6050b .word 0x05c6050b
80100f8: 052d05c6 .word 0x052d05c6
80100fc: 05c605c6 .word 0x05c605c6
8010100: 05c605c6 .word 0x05c605c6
8010104: 05c605c6 .word 0x05c605c6
8010108: 05c605c6 .word 0x05c605c6
801010c: 05c6012a .word 0x05c6012a
8010110: 00fc00e7 .word 0x00fc00e7
8010114: 012a012a .word 0x012a012a
8010118: 00c8012a .word 0x00c8012a
801011c: 00dc00fc .word 0x00dc00fc
8010120: 00d505c6 .word 0x00d505c6
8010124: 047b05c6 .word 0x047b05c6
8010128: 04d804a2 .word 0x04d804a2
801012c: 05c600dc .word 0x05c600dc
8010130: 007c04ea .word 0x007c04ea
8010134: 05c6050d .word 0x05c6050d
8010138: 054c05c6 .word 0x054c05c6
801013c: 007c05c6 .word 0x007c05c6
8010140: aa22 add r2, sp, #136 ; 0x88
8010142: 4649 mov r1, r9
8010144: 4650 mov r0, sl
8010146: f003 f93a bl 80133be <__sprint_r>
801014a: 2800 cmp r0, #0
801014c: f040 8135 bne.w 80103ba <_vfprintf_r+0x4a2>
8010150: ac25 add r4, sp, #148 ; 0x94
8010152: e77c b.n 801004e <_vfprintf_r+0x136>
8010154: 4650 mov r0, sl
8010156: f002 fa95 bl 8012684 <_localeconv_r>
801015a: 6843 ldr r3, [r0, #4]
801015c: 9314 str r3, [sp, #80] ; 0x50
801015e: 4618 mov r0, r3
8010160: f7f0 f846 bl 80001f0 <strlen>
8010164: 9012 str r0, [sp, #72] ; 0x48
8010166: 4650 mov r0, sl
8010168: f002 fa8c bl 8012684 <_localeconv_r>
801016c: 6883 ldr r3, [r0, #8]
801016e: 930a str r3, [sp, #40] ; 0x28
8010170: 9b12 ldr r3, [sp, #72] ; 0x48
8010172: 212b movs r1, #43 ; 0x2b
8010174: b12b cbz r3, 8010182 <_vfprintf_r+0x26a>
8010176: 9b0a ldr r3, [sp, #40] ; 0x28
8010178: b11b cbz r3, 8010182 <_vfprintf_r+0x26a>
801017a: 781b ldrb r3, [r3, #0]
801017c: b10b cbz r3, 8010182 <_vfprintf_r+0x26a>
801017e: f44b 6b80 orr.w fp, fp, #1024 ; 0x400
8010182: 9d0b ldr r5, [sp, #44] ; 0x2c
8010184: e775 b.n 8010072 <_vfprintf_r+0x15a>
8010186: f89d 306b ldrb.w r3, [sp, #107] ; 0x6b
801018a: 2b00 cmp r3, #0
801018c: d1f9 bne.n 8010182 <_vfprintf_r+0x26a>
801018e: 2320 movs r3, #32
8010190: f88d 306b strb.w r3, [sp, #107] ; 0x6b
8010194: e7f5 b.n 8010182 <_vfprintf_r+0x26a>
8010196: f04b 0b01 orr.w fp, fp, #1
801019a: e7f2 b.n 8010182 <_vfprintf_r+0x26a>
801019c: f856 3b04 ldr.w r3, [r6], #4
80101a0: 9310 str r3, [sp, #64] ; 0x40
80101a2: 2b00 cmp r3, #0
80101a4: daed bge.n 8010182 <_vfprintf_r+0x26a>
80101a6: 425b negs r3, r3
80101a8: 9310 str r3, [sp, #64] ; 0x40
80101aa: f04b 0b04 orr.w fp, fp, #4
80101ae: e7e8 b.n 8010182 <_vfprintf_r+0x26a>
80101b0: f88d 106b strb.w r1, [sp, #107] ; 0x6b
80101b4: e7e5 b.n 8010182 <_vfprintf_r+0x26a>
80101b6: 9b0b ldr r3, [sp, #44] ; 0x2c
80101b8: f813 2b01 ldrb.w r2, [r3], #1
80101bc: 9206 str r2, [sp, #24]
80101be: 2a2a cmp r2, #42 ; 0x2a
80101c0: d112 bne.n 80101e8 <_vfprintf_r+0x2d0>
80101c2: f856 0b04 ldr.w r0, [r6], #4
80101c6: 930b str r3, [sp, #44] ; 0x2c
80101c8: ea40 72e0 orr.w r2, r0, r0, asr #31
80101cc: 9204 str r2, [sp, #16]
80101ce: e7d8 b.n 8010182 <_vfprintf_r+0x26a>
80101d0: 9804 ldr r0, [sp, #16]
80101d2: fb07 2200 mla r2, r7, r0, r2
80101d6: 9204 str r2, [sp, #16]
80101d8: f813 2b01 ldrb.w r2, [r3], #1
80101dc: 9206 str r2, [sp, #24]
80101de: 9a06 ldr r2, [sp, #24]
80101e0: 3a30 subs r2, #48 ; 0x30
80101e2: 2a09 cmp r2, #9
80101e4: d9f4 bls.n 80101d0 <_vfprintf_r+0x2b8>
80101e6: e748 b.n 801007a <_vfprintf_r+0x162>
80101e8: 2200 movs r2, #0
80101ea: 9204 str r2, [sp, #16]
80101ec: e7f7 b.n 80101de <_vfprintf_r+0x2c6>
80101ee: f04b 0b80 orr.w fp, fp, #128 ; 0x80
80101f2: e7c6 b.n 8010182 <_vfprintf_r+0x26a>
80101f4: 2200 movs r2, #0
80101f6: 9b0b ldr r3, [sp, #44] ; 0x2c
80101f8: 9210 str r2, [sp, #64] ; 0x40
80101fa: 9a06 ldr r2, [sp, #24]
80101fc: 9810 ldr r0, [sp, #64] ; 0x40
80101fe: 3a30 subs r2, #48 ; 0x30
8010200: fb07 2200 mla r2, r7, r0, r2
8010204: 9210 str r2, [sp, #64] ; 0x40
8010206: f813 2b01 ldrb.w r2, [r3], #1
801020a: 9206 str r2, [sp, #24]
801020c: 3a30 subs r2, #48 ; 0x30
801020e: 2a09 cmp r2, #9
8010210: d9f3 bls.n 80101fa <_vfprintf_r+0x2e2>
8010212: e732 b.n 801007a <_vfprintf_r+0x162>
8010214: f04b 0b08 orr.w fp, fp, #8
8010218: e7b3 b.n 8010182 <_vfprintf_r+0x26a>
801021a: 9b0b ldr r3, [sp, #44] ; 0x2c
801021c: 781b ldrb r3, [r3, #0]
801021e: 2b68 cmp r3, #104 ; 0x68
8010220: bf01 itttt eq
8010222: 9b0b ldreq r3, [sp, #44] ; 0x2c
8010224: 3301 addeq r3, #1
8010226: 930b streq r3, [sp, #44] ; 0x2c
8010228: f44b 7b00 orreq.w fp, fp, #512 ; 0x200
801022c: bf18 it ne
801022e: f04b 0b40 orrne.w fp, fp, #64 ; 0x40
8010232: e7a6 b.n 8010182 <_vfprintf_r+0x26a>
8010234: 9b0b ldr r3, [sp, #44] ; 0x2c
8010236: 781b ldrb r3, [r3, #0]
8010238: 2b6c cmp r3, #108 ; 0x6c
801023a: d105 bne.n 8010248 <_vfprintf_r+0x330>
801023c: 9b0b ldr r3, [sp, #44] ; 0x2c
801023e: 3301 adds r3, #1
8010240: 930b str r3, [sp, #44] ; 0x2c
8010242: f04b 0b20 orr.w fp, fp, #32
8010246: e79c b.n 8010182 <_vfprintf_r+0x26a>
8010248: f04b 0b10 orr.w fp, fp, #16
801024c: e799 b.n 8010182 <_vfprintf_r+0x26a>
801024e: bf00 nop
...
8010258: 4632 mov r2, r6
801025a: 2000 movs r0, #0
801025c: f852 3b04 ldr.w r3, [r2], #4
8010260: 9207 str r2, [sp, #28]
8010262: f88d 30d4 strb.w r3, [sp, #212] ; 0xd4
8010266: f88d 006b strb.w r0, [sp, #107] ; 0x6b
801026a: 2301 movs r3, #1
801026c: e9cd 0008 strd r0, r0, [sp, #32]
8010270: 9003 str r0, [sp, #12]
8010272: 9304 str r3, [sp, #16]
8010274: 4606 mov r6, r0
8010276: 4605 mov r5, r0
8010278: f10d 08d4 add.w r8, sp, #212 ; 0xd4
801027c: e1c6 b.n 801060c <_vfprintf_r+0x6f4>
801027e: f04b 0b10 orr.w fp, fp, #16
8010282: f01b 0f20 tst.w fp, #32
8010286: d012 beq.n 80102ae <_vfprintf_r+0x396>
8010288: 3607 adds r6, #7
801028a: f026 0307 bic.w r3, r6, #7
801028e: 461a mov r2, r3
8010290: 685d ldr r5, [r3, #4]
8010292: f852 6b08 ldr.w r6, [r2], #8
8010296: 9207 str r2, [sp, #28]
8010298: 2d00 cmp r5, #0
801029a: da06 bge.n 80102aa <_vfprintf_r+0x392>
801029c: 4276 negs r6, r6
801029e: f04f 032d mov.w r3, #45 ; 0x2d
80102a2: eb65 0545 sbc.w r5, r5, r5, lsl #1
80102a6: f88d 306b strb.w r3, [sp, #107] ; 0x6b
80102aa: 2301 movs r3, #1
80102ac: e3a0 b.n 80109f0 <_vfprintf_r+0xad8>
80102ae: 4633 mov r3, r6
80102b0: f01b 0f10 tst.w fp, #16
80102b4: f853 5b04 ldr.w r5, [r3], #4
80102b8: 9307 str r3, [sp, #28]
80102ba: d002 beq.n 80102c2 <_vfprintf_r+0x3aa>
80102bc: 462e mov r6, r5
80102be: 17ed asrs r5, r5, #31
80102c0: e7ea b.n 8010298 <_vfprintf_r+0x380>
80102c2: f01b 0f40 tst.w fp, #64 ; 0x40
80102c6: d003 beq.n 80102d0 <_vfprintf_r+0x3b8>
80102c8: b22e sxth r6, r5
80102ca: f345 35c0 sbfx r5, r5, #15, #1
80102ce: e7e3 b.n 8010298 <_vfprintf_r+0x380>
80102d0: f41b 7f00 tst.w fp, #512 ; 0x200
80102d4: d0f2 beq.n 80102bc <_vfprintf_r+0x3a4>
80102d6: b26e sxtb r6, r5
80102d8: f345 15c0 sbfx r5, r5, #7, #1
80102dc: e7dc b.n 8010298 <_vfprintf_r+0x380>
80102de: 3607 adds r6, #7
80102e0: f026 0307 bic.w r3, r6, #7
80102e4: ecb3 7b02 vldmia r3!, {d7}
80102e8: ed8d 7b0c vstr d7, [sp, #48] ; 0x30
80102ec: 9307 str r3, [sp, #28]
80102ee: 9b0c ldr r3, [sp, #48] ; 0x30
80102f0: ee09 3a10 vmov s18, r3
80102f4: 9b0d ldr r3, [sp, #52] ; 0x34
80102f6: f023 4300 bic.w r3, r3, #2147483648 ; 0x80000000
80102fa: ee09 3a90 vmov s19, r3
80102fe: f04f 32ff mov.w r2, #4294967295
8010302: 4b3f ldr r3, [pc, #252] ; (8010400 <_vfprintf_r+0x4e8>)
8010304: ec51 0b19 vmov r0, r1, d9
8010308: f7f0 fc20 bl 8000b4c <__aeabi_dcmpun>
801030c: bb10 cbnz r0, 8010354 <_vfprintf_r+0x43c>
801030e: 4b3c ldr r3, [pc, #240] ; (8010400 <_vfprintf_r+0x4e8>)
8010310: ec51 0b19 vmov r0, r1, d9
8010314: f04f 32ff mov.w r2, #4294967295
8010318: f7f0 fbfa bl 8000b10 <__aeabi_dcmple>
801031c: b9d0 cbnz r0, 8010354 <_vfprintf_r+0x43c>
801031e: e9dd 010c ldrd r0, r1, [sp, #48] ; 0x30
8010322: 2200 movs r2, #0
8010324: 2300 movs r3, #0
8010326: f7f0 fbe9 bl 8000afc <__aeabi_dcmplt>
801032a: b110 cbz r0, 8010332 <_vfprintf_r+0x41a>
801032c: 232d movs r3, #45 ; 0x2d
801032e: f88d 306b strb.w r3, [sp, #107] ; 0x6b
8010332: 4a34 ldr r2, [pc, #208] ; (8010404 <_vfprintf_r+0x4ec>)
8010334: 4834 ldr r0, [pc, #208] ; (8010408 <_vfprintf_r+0x4f0>)
8010336: 9b06 ldr r3, [sp, #24]
8010338: 2100 movs r1, #0
801033a: 2b47 cmp r3, #71 ; 0x47
801033c: bfd4 ite le
801033e: 4690 movle r8, r2
8010340: 4680 movgt r8, r0
8010342: 2303 movs r3, #3
8010344: e9cd 1303 strd r1, r3, [sp, #12]
8010348: f02b 0b80 bic.w fp, fp, #128 ; 0x80
801034c: 2600 movs r6, #0
801034e: 4633 mov r3, r6
8010350: f001 b812 b.w 8011378 <_vfprintf_r+0x1460>
8010354: e9dd 230c ldrd r2, r3, [sp, #48] ; 0x30
8010358: 4610 mov r0, r2
801035a: 4619 mov r1, r3
801035c: f7f0 fbf6 bl 8000b4c <__aeabi_dcmpun>
8010360: b140 cbz r0, 8010374 <_vfprintf_r+0x45c>
8010362: 9b0d ldr r3, [sp, #52] ; 0x34
8010364: 4a29 ldr r2, [pc, #164] ; (801040c <_vfprintf_r+0x4f4>)
8010366: 482a ldr r0, [pc, #168] ; (8010410 <_vfprintf_r+0x4f8>)
8010368: 2b00 cmp r3, #0
801036a: bfbc itt lt
801036c: 232d movlt r3, #45 ; 0x2d
801036e: f88d 306b strblt.w r3, [sp, #107] ; 0x6b
8010372: e7e0 b.n 8010336 <_vfprintf_r+0x41e>
8010374: 9b06 ldr r3, [sp, #24]
8010376: f023 0320 bic.w r3, r3, #32
801037a: 2b41 cmp r3, #65 ; 0x41
801037c: 9308 str r3, [sp, #32]
801037e: d12e bne.n 80103de <_vfprintf_r+0x4c6>
8010380: 2330 movs r3, #48 ; 0x30
8010382: f88d 306c strb.w r3, [sp, #108] ; 0x6c
8010386: 9b06 ldr r3, [sp, #24]
8010388: 2b61 cmp r3, #97 ; 0x61
801038a: bf0c ite eq
801038c: 2378 moveq r3, #120 ; 0x78
801038e: 2358 movne r3, #88 ; 0x58
8010390: f88d 306d strb.w r3, [sp, #109] ; 0x6d
8010394: 9b04 ldr r3, [sp, #16]
8010396: 2b63 cmp r3, #99 ; 0x63
8010398: f04b 0b02 orr.w fp, fp, #2
801039c: dd3a ble.n 8010414 <_vfprintf_r+0x4fc>
801039e: 1c59 adds r1, r3, #1
80103a0: 4650 mov r0, sl
80103a2: f002 f9e3 bl 801276c <_malloc_r>
80103a6: 4680 mov r8, r0
80103a8: 2800 cmp r0, #0
80103aa: f040 8207 bne.w 80107bc <_vfprintf_r+0x8a4>
80103ae: f8b9 300c ldrh.w r3, [r9, #12]
80103b2: f043 0340 orr.w r3, r3, #64 ; 0x40
80103b6: f8a9 300c strh.w r3, [r9, #12]
80103ba: f8d9 3064 ldr.w r3, [r9, #100] ; 0x64
80103be: 07d9 lsls r1, r3, #31
80103c0: d407 bmi.n 80103d2 <_vfprintf_r+0x4ba>
80103c2: f8b9 300c ldrh.w r3, [r9, #12]
80103c6: 059a lsls r2, r3, #22
80103c8: d403 bmi.n 80103d2 <_vfprintf_r+0x4ba>
80103ca: f8d9 0058 ldr.w r0, [r9, #88] ; 0x58
80103ce: f002 f960 bl 8012692 <__retarget_lock_release_recursive>
80103d2: f8b9 300c ldrh.w r3, [r9, #12]
80103d6: 065b lsls r3, r3, #25
80103d8: f57f ade6 bpl.w 800ffa8 <_vfprintf_r+0x90>
80103dc: e5e1 b.n 800ffa2 <_vfprintf_r+0x8a>
80103de: 9b04 ldr r3, [sp, #16]
80103e0: 3301 adds r3, #1
80103e2: f000 81ed beq.w 80107c0 <_vfprintf_r+0x8a8>
80103e6: 9b08 ldr r3, [sp, #32]
80103e8: 2b47 cmp r3, #71 ; 0x47
80103ea: f040 81ec bne.w 80107c6 <_vfprintf_r+0x8ae>
80103ee: 9b04 ldr r3, [sp, #16]
80103f0: 2b00 cmp r3, #0
80103f2: f040 81e8 bne.w 80107c6 <_vfprintf_r+0x8ae>
80103f6: 9303 str r3, [sp, #12]
80103f8: 2301 movs r3, #1
80103fa: 9304 str r3, [sp, #16]
80103fc: e00d b.n 801041a <_vfprintf_r+0x502>
80103fe: bf00 nop
8010400: 7fefffff .word 0x7fefffff
8010404: 080179e0 .word 0x080179e0
8010408: 080179e4 .word 0x080179e4
801040c: 080179e8 .word 0x080179e8
8010410: 080179ec .word 0x080179ec
8010414: 9003 str r0, [sp, #12]
8010416: f10d 08d4 add.w r8, sp, #212 ; 0xd4
801041a: f44b 7380 orr.w r3, fp, #256 ; 0x100
801041e: 9311 str r3, [sp, #68] ; 0x44
8010420: 9b0d ldr r3, [sp, #52] ; 0x34
8010422: 2b00 cmp r3, #0
8010424: f280 81d1 bge.w 80107ca <_vfprintf_r+0x8b2>
8010428: 9b0c ldr r3, [sp, #48] ; 0x30
801042a: ee08 3a10 vmov s16, r3
801042e: 9b0d ldr r3, [sp, #52] ; 0x34
8010430: f103 4300 add.w r3, r3, #2147483648 ; 0x80000000
8010434: ee08 3a90 vmov s17, r3
8010438: 232d movs r3, #45 ; 0x2d
801043a: 9318 str r3, [sp, #96] ; 0x60
801043c: 9b08 ldr r3, [sp, #32]
801043e: 2b41 cmp r3, #65 ; 0x41
8010440: f040 81e1 bne.w 8010806 <_vfprintf_r+0x8ee>
8010444: eeb0 0a48 vmov.f32 s0, s16
8010448: eef0 0a68 vmov.f32 s1, s17
801044c: a81c add r0, sp, #112 ; 0x70
801044e: f002 ff0b bl 8013268 <frexp>
8010452: 2200 movs r2, #0
8010454: f04f 537f mov.w r3, #1069547520 ; 0x3fc00000
8010458: ec51 0b10 vmov r0, r1, d0
801045c: f7f0 f8dc bl 8000618 <__aeabi_dmul>
8010460: 2200 movs r2, #0
8010462: 2300 movs r3, #0
8010464: 4606 mov r6, r0
8010466: 460f mov r7, r1
8010468: f7f0 fb3e bl 8000ae8 <__aeabi_dcmpeq>
801046c: b108 cbz r0, 8010472 <_vfprintf_r+0x55a>
801046e: 2301 movs r3, #1
8010470: 931c str r3, [sp, #112] ; 0x70
8010472: 4ba7 ldr r3, [pc, #668] ; (8010710 <_vfprintf_r+0x7f8>)
8010474: 4aa7 ldr r2, [pc, #668] ; (8010714 <_vfprintf_r+0x7fc>)
8010476: 9906 ldr r1, [sp, #24]
8010478: 2961 cmp r1, #97 ; 0x61
801047a: bf18 it ne
801047c: 461a movne r2, r3
801047e: 9b04 ldr r3, [sp, #16]
8010480: 9217 str r2, [sp, #92] ; 0x5c
8010482: 3b01 subs r3, #1
8010484: 9305 str r3, [sp, #20]
8010486: 4645 mov r5, r8
8010488: 4ba3 ldr r3, [pc, #652] ; (8010718 <_vfprintf_r+0x800>)
801048a: 2200 movs r2, #0
801048c: 4630 mov r0, r6
801048e: 4639 mov r1, r7
8010490: f7f0 f8c2 bl 8000618 <__aeabi_dmul>
8010494: 460f mov r7, r1
8010496: 4606 mov r6, r0
8010498: f7f0 fb6e bl 8000b78 <__aeabi_d2iz>
801049c: 9019 str r0, [sp, #100] ; 0x64
801049e: f7f0 f851 bl 8000544 <__aeabi_i2d>
80104a2: 4602 mov r2, r0
80104a4: 460b mov r3, r1
80104a6: 4630 mov r0, r6
80104a8: 4639 mov r1, r7
80104aa: f7ef fefd bl 80002a8 <__aeabi_dsub>
80104ae: 9a19 ldr r2, [sp, #100] ; 0x64
80104b0: 9b17 ldr r3, [sp, #92] ; 0x5c
80104b2: 5c9b ldrb r3, [r3, r2]
80104b4: f805 3b01 strb.w r3, [r5], #1
80104b8: 9b05 ldr r3, [sp, #20]
80104ba: 9309 str r3, [sp, #36] ; 0x24
80104bc: 1c5a adds r2, r3, #1
80104be: 4606 mov r6, r0
80104c0: 460f mov r7, r1
80104c2: d007 beq.n 80104d4 <_vfprintf_r+0x5bc>
80104c4: 3b01 subs r3, #1
80104c6: 9305 str r3, [sp, #20]
80104c8: 2200 movs r2, #0
80104ca: 2300 movs r3, #0
80104cc: f7f0 fb0c bl 8000ae8 <__aeabi_dcmpeq>
80104d0: 2800 cmp r0, #0
80104d2: d0d9 beq.n 8010488 <_vfprintf_r+0x570>
80104d4: 4b91 ldr r3, [pc, #580] ; (801071c <_vfprintf_r+0x804>)
80104d6: 2200 movs r2, #0
80104d8: 4630 mov r0, r6
80104da: 4639 mov r1, r7
80104dc: f7f0 fb2c bl 8000b38 <__aeabi_dcmpgt>
80104e0: b960 cbnz r0, 80104fc <_vfprintf_r+0x5e4>
80104e2: 4b8e ldr r3, [pc, #568] ; (801071c <_vfprintf_r+0x804>)
80104e4: 2200 movs r2, #0
80104e6: 4630 mov r0, r6
80104e8: 4639 mov r1, r7
80104ea: f7f0 fafd bl 8000ae8 <__aeabi_dcmpeq>
80104ee: 2800 cmp r0, #0
80104f0: f000 8184 beq.w 80107fc <_vfprintf_r+0x8e4>
80104f4: 9b19 ldr r3, [sp, #100] ; 0x64
80104f6: 07da lsls r2, r3, #31
80104f8: f140 8180 bpl.w 80107fc <_vfprintf_r+0x8e4>
80104fc: 9b17 ldr r3, [sp, #92] ; 0x5c
80104fe: 9520 str r5, [sp, #128] ; 0x80
8010500: 7bd9 ldrb r1, [r3, #15]
8010502: 2030 movs r0, #48 ; 0x30
8010504: 9a20 ldr r2, [sp, #128] ; 0x80
8010506: 1e53 subs r3, r2, #1
8010508: 9320 str r3, [sp, #128] ; 0x80
801050a: f812 3c01 ldrb.w r3, [r2, #-1]
801050e: 428b cmp r3, r1
8010510: f000 8163 beq.w 80107da <_vfprintf_r+0x8c2>
8010514: 2b39 cmp r3, #57 ; 0x39
8010516: bf0b itete eq
8010518: 9b17 ldreq r3, [sp, #92] ; 0x5c
801051a: 3301 addne r3, #1
801051c: 7a9b ldrbeq r3, [r3, #10]
801051e: b2db uxtbne r3, r3
8010520: f802 3c01 strb.w r3, [r2, #-1]
8010524: eba5 0308 sub.w r3, r5, r8
8010528: 9305 str r3, [sp, #20]
801052a: 9b08 ldr r3, [sp, #32]
801052c: 9d1c ldr r5, [sp, #112] ; 0x70
801052e: 2b47 cmp r3, #71 ; 0x47
8010530: f040 81b1 bne.w 8010896 <_vfprintf_r+0x97e>
8010534: 1ceb adds r3, r5, #3
8010536: db03 blt.n 8010540 <_vfprintf_r+0x628>
8010538: 9b04 ldr r3, [sp, #16]
801053a: 42ab cmp r3, r5
801053c: f280 81d6 bge.w 80108ec <_vfprintf_r+0x9d4>
8010540: 9b06 ldr r3, [sp, #24]
8010542: 3b02 subs r3, #2
8010544: 9306 str r3, [sp, #24]
8010546: 9906 ldr r1, [sp, #24]
8010548: f89d 2018 ldrb.w r2, [sp, #24]
801054c: f021 0120 bic.w r1, r1, #32
8010550: 2941 cmp r1, #65 ; 0x41
8010552: bf08 it eq
8010554: 320f addeq r2, #15
8010556: f105 33ff add.w r3, r5, #4294967295
801055a: bf06 itte eq
801055c: b2d2 uxtbeq r2, r2
801055e: 2101 moveq r1, #1
8010560: 2100 movne r1, #0
8010562: 2b00 cmp r3, #0
8010564: 931c str r3, [sp, #112] ; 0x70
8010566: bfb8 it lt
8010568: f1c5 0301 rsblt r3, r5, #1
801056c: f88d 2078 strb.w r2, [sp, #120] ; 0x78
8010570: bfb4 ite lt
8010572: 222d movlt r2, #45 ; 0x2d
8010574: 222b movge r2, #43 ; 0x2b
8010576: 2b09 cmp r3, #9
8010578: f88d 2079 strb.w r2, [sp, #121] ; 0x79
801057c: f340 81a4 ble.w 80108c8 <_vfprintf_r+0x9b0>
8010580: f10d 0287 add.w r2, sp, #135 ; 0x87
8010584: 260a movs r6, #10
8010586: 4611 mov r1, r2
8010588: fb93 f5f6 sdiv r5, r3, r6
801058c: fb06 3015 mls r0, r6, r5, r3
8010590: 3030 adds r0, #48 ; 0x30
8010592: f801 0c01 strb.w r0, [r1, #-1]
8010596: 4618 mov r0, r3
8010598: 2863 cmp r0, #99 ; 0x63
801059a: f102 32ff add.w r2, r2, #4294967295
801059e: 462b mov r3, r5
80105a0: dcf1 bgt.n 8010586 <_vfprintf_r+0x66e>
80105a2: 3330 adds r3, #48 ; 0x30
80105a4: 1e88 subs r0, r1, #2
80105a6: f802 3c01 strb.w r3, [r2, #-1]
80105aa: f10d 0587 add.w r5, sp, #135 ; 0x87
80105ae: f10d 027a add.w r2, sp, #122 ; 0x7a
80105b2: 4603 mov r3, r0
80105b4: 42ab cmp r3, r5
80105b6: f0c0 8182 bcc.w 80108be <_vfprintf_r+0x9a6>
80105ba: f10d 0289 add.w r2, sp, #137 ; 0x89
80105be: 1a52 subs r2, r2, r1
80105c0: 42a8 cmp r0, r5
80105c2: bf88 it hi
80105c4: 2200 movhi r2, #0
80105c6: f10d 037a add.w r3, sp, #122 ; 0x7a
80105ca: 441a add r2, r3
80105cc: ab1e add r3, sp, #120 ; 0x78
80105ce: 1ad3 subs r3, r2, r3
80105d0: 9a05 ldr r2, [sp, #20]
80105d2: 9315 str r3, [sp, #84] ; 0x54
80105d4: 2a01 cmp r2, #1
80105d6: 4413 add r3, r2
80105d8: 9304 str r3, [sp, #16]
80105da: dc02 bgt.n 80105e2 <_vfprintf_r+0x6ca>
80105dc: f01b 0f01 tst.w fp, #1
80105e0: d003 beq.n 80105ea <_vfprintf_r+0x6d2>
80105e2: 9b04 ldr r3, [sp, #16]
80105e4: 9a0e ldr r2, [sp, #56] ; 0x38
80105e6: 4413 add r3, r2
80105e8: 9304 str r3, [sp, #16]
80105ea: f42b 6380 bic.w r3, fp, #1024 ; 0x400
80105ee: f443 7380 orr.w r3, r3, #256 ; 0x100
80105f2: 9311 str r3, [sp, #68] ; 0x44
80105f4: 2300 movs r3, #0
80105f6: e9cd 3308 strd r3, r3, [sp, #32]
80105fa: 461d mov r5, r3
80105fc: 9b18 ldr r3, [sp, #96] ; 0x60
80105fe: b113 cbz r3, 8010606 <_vfprintf_r+0x6ee>
8010600: 232d movs r3, #45 ; 0x2d
8010602: f88d 306b strb.w r3, [sp, #107] ; 0x6b
8010606: f8dd b044 ldr.w fp, [sp, #68] ; 0x44
801060a: 2600 movs r6, #0
801060c: 9b04 ldr r3, [sp, #16]
801060e: 42b3 cmp r3, r6
8010610: bfb8 it lt
8010612: 4633 movlt r3, r6
8010614: 9311 str r3, [sp, #68] ; 0x44
8010616: f89d 306b ldrb.w r3, [sp, #107] ; 0x6b
801061a: b113 cbz r3, 8010622 <_vfprintf_r+0x70a>
801061c: 9b11 ldr r3, [sp, #68] ; 0x44
801061e: 3301 adds r3, #1
8010620: 9311 str r3, [sp, #68] ; 0x44
8010622: f01b 0302 ands.w r3, fp, #2
8010626: 9317 str r3, [sp, #92] ; 0x5c
8010628: bf1e ittt ne
801062a: 9b11 ldrne r3, [sp, #68] ; 0x44
801062c: 3302 addne r3, #2
801062e: 9311 strne r3, [sp, #68] ; 0x44
8010630: f01b 0384 ands.w r3, fp, #132 ; 0x84
8010634: 9318 str r3, [sp, #96] ; 0x60
8010636: d11f bne.n 8010678 <_vfprintf_r+0x760>
8010638: e9dd 3210 ldrd r3, r2, [sp, #64] ; 0x40
801063c: 1a9f subs r7, r3, r2
801063e: 2f00 cmp r7, #0
8010640: dd1a ble.n 8010678 <_vfprintf_r+0x760>
8010642: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8010646: 4836 ldr r0, [pc, #216] ; (8010720 <_vfprintf_r+0x808>)
8010648: 6020 str r0, [r4, #0]
801064a: 2f10 cmp r7, #16
801064c: f103 0301 add.w r3, r3, #1
8010650: f104 0108 add.w r1, r4, #8
8010654: f300 82ee bgt.w 8010c34 <_vfprintf_r+0xd1c>
8010658: 443a add r2, r7
801065a: 2b07 cmp r3, #7
801065c: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8010660: 6067 str r7, [r4, #4]
8010662: f340 82fa ble.w 8010c5a <_vfprintf_r+0xd42>
8010666: aa22 add r2, sp, #136 ; 0x88
8010668: 4649 mov r1, r9
801066a: 4650 mov r0, sl
801066c: f002 fea7 bl 80133be <__sprint_r>
8010670: 2800 cmp r0, #0
8010672: f040 8625 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010676: ac25 add r4, sp, #148 ; 0x94
8010678: f89d 306b ldrb.w r3, [sp, #107] ; 0x6b
801067c: b173 cbz r3, 801069c <_vfprintf_r+0x784>
801067e: f10d 036b add.w r3, sp, #107 ; 0x6b
8010682: 6023 str r3, [r4, #0]
8010684: 2301 movs r3, #1
8010686: 6063 str r3, [r4, #4]
8010688: 9b24 ldr r3, [sp, #144] ; 0x90
801068a: 3301 adds r3, #1
801068c: 9324 str r3, [sp, #144] ; 0x90
801068e: 9b23 ldr r3, [sp, #140] ; 0x8c
8010690: 3301 adds r3, #1
8010692: 2b07 cmp r3, #7
8010694: 9323 str r3, [sp, #140] ; 0x8c
8010696: f300 82e2 bgt.w 8010c5e <_vfprintf_r+0xd46>
801069a: 3408 adds r4, #8
801069c: 9b17 ldr r3, [sp, #92] ; 0x5c
801069e: b16b cbz r3, 80106bc <_vfprintf_r+0x7a4>
80106a0: ab1b add r3, sp, #108 ; 0x6c
80106a2: 6023 str r3, [r4, #0]
80106a4: 2302 movs r3, #2
80106a6: 6063 str r3, [r4, #4]
80106a8: 9b24 ldr r3, [sp, #144] ; 0x90
80106aa: 3302 adds r3, #2
80106ac: 9324 str r3, [sp, #144] ; 0x90
80106ae: 9b23 ldr r3, [sp, #140] ; 0x8c
80106b0: 3301 adds r3, #1
80106b2: 2b07 cmp r3, #7
80106b4: 9323 str r3, [sp, #140] ; 0x8c
80106b6: f300 82dc bgt.w 8010c72 <_vfprintf_r+0xd5a>
80106ba: 3408 adds r4, #8
80106bc: 9b18 ldr r3, [sp, #96] ; 0x60
80106be: 2b80 cmp r3, #128 ; 0x80
80106c0: d11f bne.n 8010702 <_vfprintf_r+0x7ea>
80106c2: e9dd 3210 ldrd r3, r2, [sp, #64] ; 0x40
80106c6: 1a9f subs r7, r3, r2
80106c8: 2f00 cmp r7, #0
80106ca: dd1a ble.n 8010702 <_vfprintf_r+0x7ea>
80106cc: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
80106d0: 4814 ldr r0, [pc, #80] ; (8010724 <_vfprintf_r+0x80c>)
80106d2: 6020 str r0, [r4, #0]
80106d4: 2f10 cmp r7, #16
80106d6: f103 0301 add.w r3, r3, #1
80106da: f104 0108 add.w r1, r4, #8
80106de: f300 82d2 bgt.w 8010c86 <_vfprintf_r+0xd6e>
80106e2: 6067 str r7, [r4, #4]
80106e4: 2b07 cmp r3, #7
80106e6: 4417 add r7, r2
80106e8: e9cd 3723 strd r3, r7, [sp, #140] ; 0x8c
80106ec: f340 82de ble.w 8010cac <_vfprintf_r+0xd94>
80106f0: aa22 add r2, sp, #136 ; 0x88
80106f2: 4649 mov r1, r9
80106f4: 4650 mov r0, sl
80106f6: f002 fe62 bl 80133be <__sprint_r>
80106fa: 2800 cmp r0, #0
80106fc: f040 85e0 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010700: ac25 add r4, sp, #148 ; 0x94
8010702: 9b04 ldr r3, [sp, #16]
8010704: 1af6 subs r6, r6, r3
8010706: 2e00 cmp r6, #0
8010708: dd28 ble.n 801075c <_vfprintf_r+0x844>
801070a: 4f06 ldr r7, [pc, #24] ; (8010724 <_vfprintf_r+0x80c>)
801070c: e00c b.n 8010728 <_vfprintf_r+0x810>
801070e: bf00 nop
8010710: 08017a01 .word 0x08017a01
8010714: 080179f0 .word 0x080179f0
8010718: 40300000 .word 0x40300000
801071c: 3fe00000 .word 0x3fe00000
8010720: 08017a14 .word 0x08017a14
8010724: 08017a24 .word 0x08017a24
8010728: 6027 str r7, [r4, #0]
801072a: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
801072e: 2e10 cmp r6, #16
8010730: f103 0301 add.w r3, r3, #1
8010734: f104 0108 add.w r1, r4, #8
8010738: f300 82ba bgt.w 8010cb0 <_vfprintf_r+0xd98>
801073c: 6066 str r6, [r4, #4]
801073e: 2b07 cmp r3, #7
8010740: 4416 add r6, r2
8010742: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
8010746: f340 82c6 ble.w 8010cd6 <_vfprintf_r+0xdbe>
801074a: aa22 add r2, sp, #136 ; 0x88
801074c: 4649 mov r1, r9
801074e: 4650 mov r0, sl
8010750: f002 fe35 bl 80133be <__sprint_r>
8010754: 2800 cmp r0, #0
8010756: f040 85b3 bne.w 80112c0 <_vfprintf_r+0x13a8>
801075a: ac25 add r4, sp, #148 ; 0x94
801075c: f41b 7f80 tst.w fp, #256 ; 0x100
8010760: 9e24 ldr r6, [sp, #144] ; 0x90
8010762: f040 82bf bne.w 8010ce4 <_vfprintf_r+0xdcc>
8010766: 9b04 ldr r3, [sp, #16]
8010768: f8c4 8000 str.w r8, [r4]
801076c: 441e add r6, r3
801076e: 6063 str r3, [r4, #4]
8010770: 9624 str r6, [sp, #144] ; 0x90
8010772: 9b23 ldr r3, [sp, #140] ; 0x8c
8010774: 3301 adds r3, #1
8010776: 2b07 cmp r3, #7
8010778: 9323 str r3, [sp, #140] ; 0x8c
801077a: f300 82f8 bgt.w 8010d6e <_vfprintf_r+0xe56>
801077e: 3408 adds r4, #8
8010780: f01b 0f04 tst.w fp, #4
8010784: f040 857e bne.w 8011284 <_vfprintf_r+0x136c>
8010788: e9dd 320f ldrd r3, r2, [sp, #60] ; 0x3c
801078c: 9911 ldr r1, [sp, #68] ; 0x44
801078e: 428a cmp r2, r1
8010790: bfac ite ge
8010792: 189b addge r3, r3, r2
8010794: 185b addlt r3, r3, r1
8010796: 930f str r3, [sp, #60] ; 0x3c
8010798: 9b24 ldr r3, [sp, #144] ; 0x90
801079a: b13b cbz r3, 80107ac <_vfprintf_r+0x894>
801079c: aa22 add r2, sp, #136 ; 0x88
801079e: 4649 mov r1, r9
80107a0: 4650 mov r0, sl
80107a2: f002 fe0c bl 80133be <__sprint_r>
80107a6: 2800 cmp r0, #0
80107a8: f040 858a bne.w 80112c0 <_vfprintf_r+0x13a8>
80107ac: 2300 movs r3, #0
80107ae: 9323 str r3, [sp, #140] ; 0x8c
80107b0: 9b03 ldr r3, [sp, #12]
80107b2: 2b00 cmp r3, #0
80107b4: f040 85a0 bne.w 80112f8 <_vfprintf_r+0x13e0>
80107b8: ac25 add r4, sp, #148 ; 0x94
80107ba: e0ec b.n 8010996 <_vfprintf_r+0xa7e>
80107bc: 9003 str r0, [sp, #12]
80107be: e62c b.n 801041a <_vfprintf_r+0x502>
80107c0: 9003 str r0, [sp, #12]
80107c2: 2306 movs r3, #6
80107c4: e619 b.n 80103fa <_vfprintf_r+0x4e2>
80107c6: 9003 str r0, [sp, #12]
80107c8: e627 b.n 801041a <_vfprintf_r+0x502>
80107ca: ed9d 7b0c vldr d7, [sp, #48] ; 0x30
80107ce: 2300 movs r3, #0
80107d0: eeb0 8a47 vmov.f32 s16, s14
80107d4: eef0 8a67 vmov.f32 s17, s15
80107d8: e62f b.n 801043a <_vfprintf_r+0x522>
80107da: f802 0c01 strb.w r0, [r2, #-1]
80107de: e691 b.n 8010504 <_vfprintf_r+0x5ec>
80107e0: f803 0b01 strb.w r0, [r3], #1
80107e4: 1aca subs r2, r1, r3
80107e6: 2a00 cmp r2, #0
80107e8: dafa bge.n 80107e0 <_vfprintf_r+0x8c8>
80107ea: 9a09 ldr r2, [sp, #36] ; 0x24
80107ec: 9b09 ldr r3, [sp, #36] ; 0x24
80107ee: 3201 adds r2, #1
80107f0: f103 0301 add.w r3, r3, #1
80107f4: bfb8 it lt
80107f6: 2300 movlt r3, #0
80107f8: 441d add r5, r3
80107fa: e693 b.n 8010524 <_vfprintf_r+0x60c>
80107fc: 9a09 ldr r2, [sp, #36] ; 0x24
80107fe: 462b mov r3, r5
8010800: 18a9 adds r1, r5, r2
8010802: 2030 movs r0, #48 ; 0x30
8010804: e7ee b.n 80107e4 <_vfprintf_r+0x8cc>
8010806: 9b08 ldr r3, [sp, #32]
8010808: 2b46 cmp r3, #70 ; 0x46
801080a: d005 beq.n 8010818 <_vfprintf_r+0x900>
801080c: 2b45 cmp r3, #69 ; 0x45
801080e: d11b bne.n 8010848 <_vfprintf_r+0x930>
8010810: 9b04 ldr r3, [sp, #16]
8010812: 1c5d adds r5, r3, #1
8010814: 2102 movs r1, #2
8010816: e001 b.n 801081c <_vfprintf_r+0x904>
8010818: 9d04 ldr r5, [sp, #16]
801081a: 2103 movs r1, #3
801081c: ab20 add r3, sp, #128 ; 0x80
801081e: 9301 str r3, [sp, #4]
8010820: ab1d add r3, sp, #116 ; 0x74
8010822: 9300 str r3, [sp, #0]
8010824: 462a mov r2, r5
8010826: ab1c add r3, sp, #112 ; 0x70
8010828: 4650 mov r0, sl
801082a: eeb0 0a48 vmov.f32 s0, s16
801082e: eef0 0a68 vmov.f32 s1, s17
8010832: f000 fee1 bl 80115f8 <_dtoa_r>
8010836: 9b08 ldr r3, [sp, #32]
8010838: 2b47 cmp r3, #71 ; 0x47
801083a: 4680 mov r8, r0
801083c: d106 bne.n 801084c <_vfprintf_r+0x934>
801083e: f01b 0f01 tst.w fp, #1
8010842: d103 bne.n 801084c <_vfprintf_r+0x934>
8010844: 9d20 ldr r5, [sp, #128] ; 0x80
8010846: e66d b.n 8010524 <_vfprintf_r+0x60c>
8010848: 9d04 ldr r5, [sp, #16]
801084a: e7e3 b.n 8010814 <_vfprintf_r+0x8fc>
801084c: 9b08 ldr r3, [sp, #32]
801084e: 2b46 cmp r3, #70 ; 0x46
8010850: eb08 0605 add.w r6, r8, r5
8010854: d10f bne.n 8010876 <_vfprintf_r+0x95e>
8010856: f898 3000 ldrb.w r3, [r8]
801085a: 2b30 cmp r3, #48 ; 0x30
801085c: d109 bne.n 8010872 <_vfprintf_r+0x95a>
801085e: ec51 0b18 vmov r0, r1, d8
8010862: 2200 movs r2, #0
8010864: 2300 movs r3, #0
8010866: f7f0 f93f bl 8000ae8 <__aeabi_dcmpeq>
801086a: b910 cbnz r0, 8010872 <_vfprintf_r+0x95a>
801086c: f1c5 0501 rsb r5, r5, #1
8010870: 951c str r5, [sp, #112] ; 0x70
8010872: 9b1c ldr r3, [sp, #112] ; 0x70
8010874: 441e add r6, r3
8010876: ec51 0b18 vmov r0, r1, d8
801087a: 2200 movs r2, #0
801087c: 2300 movs r3, #0
801087e: f7f0 f933 bl 8000ae8 <__aeabi_dcmpeq>
8010882: b100 cbz r0, 8010886 <_vfprintf_r+0x96e>
8010884: 9620 str r6, [sp, #128] ; 0x80
8010886: 2230 movs r2, #48 ; 0x30
8010888: 9b20 ldr r3, [sp, #128] ; 0x80
801088a: 429e cmp r6, r3
801088c: d9da bls.n 8010844 <_vfprintf_r+0x92c>
801088e: 1c59 adds r1, r3, #1
8010890: 9120 str r1, [sp, #128] ; 0x80
8010892: 701a strb r2, [r3, #0]
8010894: e7f8 b.n 8010888 <_vfprintf_r+0x970>
8010896: 9b08 ldr r3, [sp, #32]
8010898: 2b46 cmp r3, #70 ; 0x46
801089a: f47f ae54 bne.w 8010546 <_vfprintf_r+0x62e>
801089e: 9a04 ldr r2, [sp, #16]
80108a0: f00b 0301 and.w r3, fp, #1
80108a4: 2d00 cmp r5, #0
80108a6: ea43 0302 orr.w r3, r3, r2
80108aa: dd1a ble.n 80108e2 <_vfprintf_r+0x9ca>
80108ac: 2b00 cmp r3, #0
80108ae: d034 beq.n 801091a <_vfprintf_r+0xa02>
80108b0: 9b0e ldr r3, [sp, #56] ; 0x38
80108b2: 18eb adds r3, r5, r3
80108b4: 441a add r2, r3
80108b6: 9204 str r2, [sp, #16]
80108b8: 2366 movs r3, #102 ; 0x66
80108ba: 9306 str r3, [sp, #24]
80108bc: e033 b.n 8010926 <_vfprintf_r+0xa0e>
80108be: f813 6b01 ldrb.w r6, [r3], #1
80108c2: f802 6b01 strb.w r6, [r2], #1
80108c6: e675 b.n 80105b4 <_vfprintf_r+0x69c>
80108c8: b941 cbnz r1, 80108dc <_vfprintf_r+0x9c4>
80108ca: 2230 movs r2, #48 ; 0x30
80108cc: f88d 207a strb.w r2, [sp, #122] ; 0x7a
80108d0: f10d 027b add.w r2, sp, #123 ; 0x7b
80108d4: 3330 adds r3, #48 ; 0x30
80108d6: f802 3b01 strb.w r3, [r2], #1
80108da: e677 b.n 80105cc <_vfprintf_r+0x6b4>
80108dc: f10d 027a add.w r2, sp, #122 ; 0x7a
80108e0: e7f8 b.n 80108d4 <_vfprintf_r+0x9bc>
80108e2: b1e3 cbz r3, 801091e <_vfprintf_r+0xa06>
80108e4: 9b0e ldr r3, [sp, #56] ; 0x38
80108e6: 9a04 ldr r2, [sp, #16]
80108e8: 3301 adds r3, #1
80108ea: e7e3 b.n 80108b4 <_vfprintf_r+0x99c>
80108ec: 9b05 ldr r3, [sp, #20]
80108ee: 42ab cmp r3, r5
80108f0: dc07 bgt.n 8010902 <_vfprintf_r+0x9ea>
80108f2: f01b 0f01 tst.w fp, #1
80108f6: d02d beq.n 8010954 <_vfprintf_r+0xa3c>
80108f8: 9b0e ldr r3, [sp, #56] ; 0x38
80108fa: 18eb adds r3, r5, r3
80108fc: 9304 str r3, [sp, #16]
80108fe: 2367 movs r3, #103 ; 0x67
8010900: e7db b.n 80108ba <_vfprintf_r+0x9a2>
8010902: 9b05 ldr r3, [sp, #20]
8010904: 9a0e ldr r2, [sp, #56] ; 0x38
8010906: 2d00 cmp r5, #0
8010908: 4413 add r3, r2
801090a: 9304 str r3, [sp, #16]
801090c: dcf7 bgt.n 80108fe <_vfprintf_r+0x9e6>
801090e: 9a04 ldr r2, [sp, #16]
8010910: f1c5 0301 rsb r3, r5, #1
8010914: 441a add r2, r3
8010916: 9204 str r2, [sp, #16]
8010918: e7f1 b.n 80108fe <_vfprintf_r+0x9e6>
801091a: 9504 str r5, [sp, #16]
801091c: e7cc b.n 80108b8 <_vfprintf_r+0x9a0>
801091e: 2366 movs r3, #102 ; 0x66
8010920: 9306 str r3, [sp, #24]
8010922: 2301 movs r3, #1
8010924: 9304 str r3, [sp, #16]
8010926: f41b 6380 ands.w r3, fp, #1024 ; 0x400
801092a: 9309 str r3, [sp, #36] ; 0x24
801092c: d025 beq.n 801097a <_vfprintf_r+0xa62>
801092e: 2300 movs r3, #0
8010930: 2d00 cmp r5, #0
8010932: e9cd 3308 strd r3, r3, [sp, #32]
8010936: f77f ae61 ble.w 80105fc <_vfprintf_r+0x6e4>
801093a: 9b0a ldr r3, [sp, #40] ; 0x28
801093c: 781b ldrb r3, [r3, #0]
801093e: 2bff cmp r3, #255 ; 0xff
8010940: d10a bne.n 8010958 <_vfprintf_r+0xa40>
8010942: e9dd 2308 ldrd r2, r3, [sp, #32]
8010946: 9912 ldr r1, [sp, #72] ; 0x48
8010948: 4413 add r3, r2
801094a: 9a04 ldr r2, [sp, #16]
801094c: fb01 2303 mla r3, r1, r3, r2
8010950: 9304 str r3, [sp, #16]
8010952: e653 b.n 80105fc <_vfprintf_r+0x6e4>
8010954: 9504 str r5, [sp, #16]
8010956: e7d2 b.n 80108fe <_vfprintf_r+0x9e6>
8010958: 42ab cmp r3, r5
801095a: daf2 bge.n 8010942 <_vfprintf_r+0xa2a>
801095c: 1aed subs r5, r5, r3
801095e: 9b0a ldr r3, [sp, #40] ; 0x28
8010960: 785b ldrb r3, [r3, #1]
8010962: b133 cbz r3, 8010972 <_vfprintf_r+0xa5a>
8010964: 9b09 ldr r3, [sp, #36] ; 0x24
8010966: 3301 adds r3, #1
8010968: 9309 str r3, [sp, #36] ; 0x24
801096a: 9b0a ldr r3, [sp, #40] ; 0x28
801096c: 3301 adds r3, #1
801096e: 930a str r3, [sp, #40] ; 0x28
8010970: e7e3 b.n 801093a <_vfprintf_r+0xa22>
8010972: 9b08 ldr r3, [sp, #32]
8010974: 3301 adds r3, #1
8010976: 9308 str r3, [sp, #32]
8010978: e7df b.n 801093a <_vfprintf_r+0xa22>
801097a: 9b09 ldr r3, [sp, #36] ; 0x24
801097c: 9308 str r3, [sp, #32]
801097e: e63d b.n 80105fc <_vfprintf_r+0x6e4>
8010980: 1d33 adds r3, r6, #4
8010982: f01b 0f20 tst.w fp, #32
8010986: 9307 str r3, [sp, #28]
8010988: d00a beq.n 80109a0 <_vfprintf_r+0xa88>
801098a: 9a0f ldr r2, [sp, #60] ; 0x3c
801098c: 6833 ldr r3, [r6, #0]
801098e: 990f ldr r1, [sp, #60] ; 0x3c
8010990: 17d2 asrs r2, r2, #31
8010992: e9c3 1200 strd r1, r2, [r3]
8010996: 9e07 ldr r6, [sp, #28]
8010998: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c
801099c: f7ff bb42 b.w 8010024 <_vfprintf_r+0x10c>
80109a0: f01b 0f10 tst.w fp, #16
80109a4: d003 beq.n 80109ae <_vfprintf_r+0xa96>
80109a6: 6833 ldr r3, [r6, #0]
80109a8: 9a0f ldr r2, [sp, #60] ; 0x3c
80109aa: 601a str r2, [r3, #0]
80109ac: e7f3 b.n 8010996 <_vfprintf_r+0xa7e>
80109ae: f01b 0f40 tst.w fp, #64 ; 0x40
80109b2: d003 beq.n 80109bc <_vfprintf_r+0xaa4>
80109b4: 6833 ldr r3, [r6, #0]
80109b6: 9a0f ldr r2, [sp, #60] ; 0x3c
80109b8: 801a strh r2, [r3, #0]
80109ba: e7ec b.n 8010996 <_vfprintf_r+0xa7e>
80109bc: f41b 7f00 tst.w fp, #512 ; 0x200
80109c0: d0f1 beq.n 80109a6 <_vfprintf_r+0xa8e>
80109c2: 6833 ldr r3, [r6, #0]
80109c4: 9a0f ldr r2, [sp, #60] ; 0x3c
80109c6: 701a strb r2, [r3, #0]
80109c8: e7e5 b.n 8010996 <_vfprintf_r+0xa7e>
80109ca: f04b 0b10 orr.w fp, fp, #16
80109ce: f01b 0320 ands.w r3, fp, #32
80109d2: d01f beq.n 8010a14 <_vfprintf_r+0xafc>
80109d4: 3607 adds r6, #7
80109d6: f026 0307 bic.w r3, r6, #7
80109da: 461a mov r2, r3
80109dc: 685d ldr r5, [r3, #4]
80109de: f852 6b08 ldr.w r6, [r2], #8
80109e2: 9207 str r2, [sp, #28]
80109e4: f42b 6b80 bic.w fp, fp, #1024 ; 0x400
80109e8: 2300 movs r3, #0
80109ea: 2200 movs r2, #0
80109ec: f88d 206b strb.w r2, [sp, #107] ; 0x6b
80109f0: 9a04 ldr r2, [sp, #16]
80109f2: 3201 adds r2, #1
80109f4: f000 8495 beq.w 8011322 <_vfprintf_r+0x140a>
80109f8: ea56 0205 orrs.w r2, r6, r5
80109fc: f02b 0780 bic.w r7, fp, #128 ; 0x80
8010a00: f040 8494 bne.w 801132c <_vfprintf_r+0x1414>
8010a04: 9a04 ldr r2, [sp, #16]
8010a06: 2a00 cmp r2, #0
8010a08: f000 80fa beq.w 8010c00 <_vfprintf_r+0xce8>
8010a0c: 2b01 cmp r3, #1
8010a0e: f040 8490 bne.w 8011332 <_vfprintf_r+0x141a>
8010a12: e09f b.n 8010b54 <_vfprintf_r+0xc3c>
8010a14: 4632 mov r2, r6
8010a16: f01b 0510 ands.w r5, fp, #16
8010a1a: f852 6b04 ldr.w r6, [r2], #4
8010a1e: 9207 str r2, [sp, #28]
8010a20: d001 beq.n 8010a26 <_vfprintf_r+0xb0e>
8010a22: 461d mov r5, r3
8010a24: e7de b.n 80109e4 <_vfprintf_r+0xacc>
8010a26: f01b 0340 ands.w r3, fp, #64 ; 0x40
8010a2a: d001 beq.n 8010a30 <_vfprintf_r+0xb18>
8010a2c: b2b6 uxth r6, r6
8010a2e: e7d9 b.n 80109e4 <_vfprintf_r+0xacc>
8010a30: f41b 7500 ands.w r5, fp, #512 ; 0x200
8010a34: d0d6 beq.n 80109e4 <_vfprintf_r+0xacc>
8010a36: b2f6 uxtb r6, r6
8010a38: e7f3 b.n 8010a22 <_vfprintf_r+0xb0a>
8010a3a: 4633 mov r3, r6
8010a3c: 2278 movs r2, #120 ; 0x78
8010a3e: f853 6b04 ldr.w r6, [r3], #4
8010a42: 9307 str r3, [sp, #28]
8010a44: 2330 movs r3, #48 ; 0x30
8010a46: f88d 306c strb.w r3, [sp, #108] ; 0x6c
8010a4a: 4ba4 ldr r3, [pc, #656] ; (8010cdc <_vfprintf_r+0xdc4>)
8010a4c: 9316 str r3, [sp, #88] ; 0x58
8010a4e: 2500 movs r5, #0
8010a50: f04b 0b02 orr.w fp, fp, #2
8010a54: f88d 206d strb.w r2, [sp, #109] ; 0x6d
8010a58: 2302 movs r3, #2
8010a5a: 9206 str r2, [sp, #24]
8010a5c: e7c5 b.n 80109ea <_vfprintf_r+0xad2>
8010a5e: 4633 mov r3, r6
8010a60: 2500 movs r5, #0
8010a62: f853 8b04 ldr.w r8, [r3], #4
8010a66: 9307 str r3, [sp, #28]
8010a68: 9b04 ldr r3, [sp, #16]
8010a6a: f88d 506b strb.w r5, [sp, #107] ; 0x6b
8010a6e: 1c5e adds r6, r3, #1
8010a70: d010 beq.n 8010a94 <_vfprintf_r+0xb7c>
8010a72: 461a mov r2, r3
8010a74: 4629 mov r1, r5
8010a76: 4640 mov r0, r8
8010a78: f7ef fbc2 bl 8000200 <memchr>
8010a7c: 9003 str r0, [sp, #12]
8010a7e: 2800 cmp r0, #0
8010a80: f000 80d5 beq.w 8010c2e <_vfprintf_r+0xd16>
8010a84: eba0 0308 sub.w r3, r0, r8
8010a88: e9cd 5303 strd r5, r3, [sp, #12]
8010a8c: e9cd 5508 strd r5, r5, [sp, #32]
8010a90: 462e mov r6, r5
8010a92: e5bb b.n 801060c <_vfprintf_r+0x6f4>
8010a94: 4640 mov r0, r8
8010a96: f7ef fbab bl 80001f0 <strlen>
8010a9a: e9cd 5003 strd r5, r0, [sp, #12]
8010a9e: e455 b.n 801034c <_vfprintf_r+0x434>
8010aa0: f04b 0b10 orr.w fp, fp, #16
8010aa4: f01b 0320 ands.w r3, fp, #32
8010aa8: d009 beq.n 8010abe <_vfprintf_r+0xba6>
8010aaa: 3607 adds r6, #7
8010aac: f026 0307 bic.w r3, r6, #7
8010ab0: 461a mov r2, r3
8010ab2: 685d ldr r5, [r3, #4]
8010ab4: f852 6b08 ldr.w r6, [r2], #8
8010ab8: 9207 str r2, [sp, #28]
8010aba: 2301 movs r3, #1
8010abc: e795 b.n 80109ea <_vfprintf_r+0xad2>
8010abe: 4632 mov r2, r6
8010ac0: f01b 0510 ands.w r5, fp, #16
8010ac4: f852 6b04 ldr.w r6, [r2], #4
8010ac8: 9207 str r2, [sp, #28]
8010aca: d001 beq.n 8010ad0 <_vfprintf_r+0xbb8>
8010acc: 461d mov r5, r3
8010ace: e7f4 b.n 8010aba <_vfprintf_r+0xba2>
8010ad0: f01b 0340 ands.w r3, fp, #64 ; 0x40
8010ad4: d001 beq.n 8010ada <_vfprintf_r+0xbc2>
8010ad6: b2b6 uxth r6, r6
8010ad8: e7ef b.n 8010aba <_vfprintf_r+0xba2>
8010ada: f41b 7500 ands.w r5, fp, #512 ; 0x200
8010ade: d0ec beq.n 8010aba <_vfprintf_r+0xba2>
8010ae0: b2f6 uxtb r6, r6
8010ae2: e7f3 b.n 8010acc <_vfprintf_r+0xbb4>
8010ae4: 4b7e ldr r3, [pc, #504] ; (8010ce0 <_vfprintf_r+0xdc8>)
8010ae6: 9316 str r3, [sp, #88] ; 0x58
8010ae8: f01b 0320 ands.w r3, fp, #32
8010aec: d01b beq.n 8010b26 <_vfprintf_r+0xc0e>
8010aee: 3607 adds r6, #7
8010af0: f026 0307 bic.w r3, r6, #7
8010af4: 461a mov r2, r3
8010af6: 685d ldr r5, [r3, #4]
8010af8: f852 6b08 ldr.w r6, [r2], #8
8010afc: 9207 str r2, [sp, #28]
8010afe: f01b 0f01 tst.w fp, #1
8010b02: d00a beq.n 8010b1a <_vfprintf_r+0xc02>
8010b04: ea56 0305 orrs.w r3, r6, r5
8010b08: d007 beq.n 8010b1a <_vfprintf_r+0xc02>
8010b0a: 2330 movs r3, #48 ; 0x30
8010b0c: f88d 306c strb.w r3, [sp, #108] ; 0x6c
8010b10: 9b06 ldr r3, [sp, #24]
8010b12: f88d 306d strb.w r3, [sp, #109] ; 0x6d
8010b16: f04b 0b02 orr.w fp, fp, #2
8010b1a: f42b 6b80 bic.w fp, fp, #1024 ; 0x400
8010b1e: 2302 movs r3, #2
8010b20: e763 b.n 80109ea <_vfprintf_r+0xad2>
8010b22: 4b6e ldr r3, [pc, #440] ; (8010cdc <_vfprintf_r+0xdc4>)
8010b24: e7df b.n 8010ae6 <_vfprintf_r+0xbce>
8010b26: 4632 mov r2, r6
8010b28: f01b 0510 ands.w r5, fp, #16
8010b2c: f852 6b04 ldr.w r6, [r2], #4
8010b30: 9207 str r2, [sp, #28]
8010b32: d001 beq.n 8010b38 <_vfprintf_r+0xc20>
8010b34: 461d mov r5, r3
8010b36: e7e2 b.n 8010afe <_vfprintf_r+0xbe6>
8010b38: f01b 0340 ands.w r3, fp, #64 ; 0x40
8010b3c: d001 beq.n 8010b42 <_vfprintf_r+0xc2a>
8010b3e: b2b6 uxth r6, r6
8010b40: e7dd b.n 8010afe <_vfprintf_r+0xbe6>
8010b42: f41b 7500 ands.w r5, fp, #512 ; 0x200
8010b46: d0da beq.n 8010afe <_vfprintf_r+0xbe6>
8010b48: b2f6 uxtb r6, r6
8010b4a: e7f3 b.n 8010b34 <_vfprintf_r+0xc1c>
8010b4c: 2e0a cmp r6, #10
8010b4e: f175 0300 sbcs.w r3, r5, #0
8010b52: d206 bcs.n 8010b62 <_vfprintf_r+0xc4a>
8010b54: 3630 adds r6, #48 ; 0x30
8010b56: f88d 6137 strb.w r6, [sp, #311] ; 0x137
8010b5a: f20d 1837 addw r8, sp, #311 ; 0x137
8010b5e: f000 bc03 b.w 8011368 <_vfprintf_r+0x1450>
8010b62: 2300 movs r3, #0
8010b64: 9305 str r3, [sp, #20]
8010b66: f407 6380 and.w r3, r7, #1024 ; 0x400
8010b6a: f50d 7b9c add.w fp, sp, #312 ; 0x138
8010b6e: 9303 str r3, [sp, #12]
8010b70: 220a movs r2, #10
8010b72: 2300 movs r3, #0
8010b74: 4630 mov r0, r6
8010b76: 4629 mov r1, r5
8010b78: f7f0 f826 bl 8000bc8 <__aeabi_uldivmod>
8010b7c: 9b05 ldr r3, [sp, #20]
8010b7e: 3301 adds r3, #1
8010b80: 9305 str r3, [sp, #20]
8010b82: 9b03 ldr r3, [sp, #12]
8010b84: 3230 adds r2, #48 ; 0x30
8010b86: f10b 38ff add.w r8, fp, #4294967295
8010b8a: f80b 2c01 strb.w r2, [fp, #-1]
8010b8e: b1d3 cbz r3, 8010bc6 <_vfprintf_r+0xcae>
8010b90: 9b0a ldr r3, [sp, #40] ; 0x28
8010b92: 9a05 ldr r2, [sp, #20]
8010b94: 781b ldrb r3, [r3, #0]
8010b96: 429a cmp r2, r3
8010b98: d115 bne.n 8010bc6 <_vfprintf_r+0xcae>
8010b9a: 2aff cmp r2, #255 ; 0xff
8010b9c: d013 beq.n 8010bc6 <_vfprintf_r+0xcae>
8010b9e: 2e0a cmp r6, #10
8010ba0: f175 0300 sbcs.w r3, r5, #0
8010ba4: d30f bcc.n 8010bc6 <_vfprintf_r+0xcae>
8010ba6: 9b12 ldr r3, [sp, #72] ; 0x48
8010ba8: 9914 ldr r1, [sp, #80] ; 0x50
8010baa: eba8 0803 sub.w r8, r8, r3
8010bae: 461a mov r2, r3
8010bb0: 4640 mov r0, r8
8010bb2: f002 fbe4 bl 801337e <strncpy>
8010bb6: 9b0a ldr r3, [sp, #40] ; 0x28
8010bb8: 785b ldrb r3, [r3, #1]
8010bba: b11b cbz r3, 8010bc4 <_vfprintf_r+0xcac>
8010bbc: 9b0a ldr r3, [sp, #40] ; 0x28
8010bbe: 3301 adds r3, #1
8010bc0: 930a str r3, [sp, #40] ; 0x28
8010bc2: 2300 movs r3, #0
8010bc4: 9305 str r3, [sp, #20]
8010bc6: 2300 movs r3, #0
8010bc8: 220a movs r2, #10
8010bca: 4630 mov r0, r6
8010bcc: 4629 mov r1, r5
8010bce: f7ef fffb bl 8000bc8 <__aeabi_uldivmod>
8010bd2: 2e0a cmp r6, #10
8010bd4: f175 0300 sbcs.w r3, r5, #0
8010bd8: f0c0 83c6 bcc.w 8011368 <_vfprintf_r+0x1450>
8010bdc: 4606 mov r6, r0
8010bde: 460d mov r5, r1
8010be0: 46c3 mov fp, r8
8010be2: e7c5 b.n 8010b70 <_vfprintf_r+0xc58>
8010be4: f006 030f and.w r3, r6, #15
8010be8: 9a16 ldr r2, [sp, #88] ; 0x58
8010bea: 0936 lsrs r6, r6, #4
8010bec: 5cd3 ldrb r3, [r2, r3]
8010bee: f808 3d01 strb.w r3, [r8, #-1]!
8010bf2: ea46 7605 orr.w r6, r6, r5, lsl #28
8010bf6: 092d lsrs r5, r5, #4
8010bf8: ea56 0305 orrs.w r3, r6, r5
8010bfc: d1f2 bne.n 8010be4 <_vfprintf_r+0xccc>
8010bfe: e3b3 b.n 8011368 <_vfprintf_r+0x1450>
8010c00: b933 cbnz r3, 8010c10 <_vfprintf_r+0xcf8>
8010c02: f01b 0f01 tst.w fp, #1
8010c06: d003 beq.n 8010c10 <_vfprintf_r+0xcf8>
8010c08: 2330 movs r3, #48 ; 0x30
8010c0a: f88d 3137 strb.w r3, [sp, #311] ; 0x137
8010c0e: e7a4 b.n 8010b5a <_vfprintf_r+0xc42>
8010c10: f50d 789c add.w r8, sp, #312 ; 0x138
8010c14: e3a8 b.n 8011368 <_vfprintf_r+0x1450>
8010c16: 9b06 ldr r3, [sp, #24]
8010c18: 2b00 cmp r3, #0
8010c1a: f000 8373 beq.w 8011304 <_vfprintf_r+0x13ec>
8010c1e: 2000 movs r0, #0
8010c20: f88d 30d4 strb.w r3, [sp, #212] ; 0xd4
8010c24: f88d 006b strb.w r0, [sp, #107] ; 0x6b
8010c28: 9607 str r6, [sp, #28]
8010c2a: f7ff bb1e b.w 801026a <_vfprintf_r+0x352>
8010c2e: 9e03 ldr r6, [sp, #12]
8010c30: f7ff bb8d b.w 801034e <_vfprintf_r+0x436>
8010c34: 2010 movs r0, #16
8010c36: 4402 add r2, r0
8010c38: 2b07 cmp r3, #7
8010c3a: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8010c3e: 6060 str r0, [r4, #4]
8010c40: dd08 ble.n 8010c54 <_vfprintf_r+0xd3c>
8010c42: aa22 add r2, sp, #136 ; 0x88
8010c44: 4649 mov r1, r9
8010c46: 4650 mov r0, sl
8010c48: f002 fbb9 bl 80133be <__sprint_r>
8010c4c: 2800 cmp r0, #0
8010c4e: f040 8337 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010c52: a925 add r1, sp, #148 ; 0x94
8010c54: 3f10 subs r7, #16
8010c56: 460c mov r4, r1
8010c58: e4f3 b.n 8010642 <_vfprintf_r+0x72a>
8010c5a: 460c mov r4, r1
8010c5c: e50c b.n 8010678 <_vfprintf_r+0x760>
8010c5e: aa22 add r2, sp, #136 ; 0x88
8010c60: 4649 mov r1, r9
8010c62: 4650 mov r0, sl
8010c64: f002 fbab bl 80133be <__sprint_r>
8010c68: 2800 cmp r0, #0
8010c6a: f040 8329 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010c6e: ac25 add r4, sp, #148 ; 0x94
8010c70: e514 b.n 801069c <_vfprintf_r+0x784>
8010c72: aa22 add r2, sp, #136 ; 0x88
8010c74: 4649 mov r1, r9
8010c76: 4650 mov r0, sl
8010c78: f002 fba1 bl 80133be <__sprint_r>
8010c7c: 2800 cmp r0, #0
8010c7e: f040 831f bne.w 80112c0 <_vfprintf_r+0x13a8>
8010c82: ac25 add r4, sp, #148 ; 0x94
8010c84: e51a b.n 80106bc <_vfprintf_r+0x7a4>
8010c86: 2010 movs r0, #16
8010c88: 4402 add r2, r0
8010c8a: 2b07 cmp r3, #7
8010c8c: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8010c90: 6060 str r0, [r4, #4]
8010c92: dd08 ble.n 8010ca6 <_vfprintf_r+0xd8e>
8010c94: aa22 add r2, sp, #136 ; 0x88
8010c96: 4649 mov r1, r9
8010c98: 4650 mov r0, sl
8010c9a: f002 fb90 bl 80133be <__sprint_r>
8010c9e: 2800 cmp r0, #0
8010ca0: f040 830e bne.w 80112c0 <_vfprintf_r+0x13a8>
8010ca4: a925 add r1, sp, #148 ; 0x94
8010ca6: 3f10 subs r7, #16
8010ca8: 460c mov r4, r1
8010caa: e50f b.n 80106cc <_vfprintf_r+0x7b4>
8010cac: 460c mov r4, r1
8010cae: e528 b.n 8010702 <_vfprintf_r+0x7ea>
8010cb0: 2010 movs r0, #16
8010cb2: 4402 add r2, r0
8010cb4: 2b07 cmp r3, #7
8010cb6: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8010cba: 6060 str r0, [r4, #4]
8010cbc: dd08 ble.n 8010cd0 <_vfprintf_r+0xdb8>
8010cbe: aa22 add r2, sp, #136 ; 0x88
8010cc0: 4649 mov r1, r9
8010cc2: 4650 mov r0, sl
8010cc4: f002 fb7b bl 80133be <__sprint_r>
8010cc8: 2800 cmp r0, #0
8010cca: f040 82f9 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010cce: a925 add r1, sp, #148 ; 0x94
8010cd0: 3e10 subs r6, #16
8010cd2: 460c mov r4, r1
8010cd4: e528 b.n 8010728 <_vfprintf_r+0x810>
8010cd6: 460c mov r4, r1
8010cd8: e540 b.n 801075c <_vfprintf_r+0x844>
8010cda: bf00 nop
8010cdc: 080179f0 .word 0x080179f0
8010ce0: 08017a01 .word 0x08017a01
8010ce4: 9b06 ldr r3, [sp, #24]
8010ce6: 2b65 cmp r3, #101 ; 0x65
8010ce8: f340 8232 ble.w 8011150 <_vfprintf_r+0x1238>
8010cec: e9dd 010c ldrd r0, r1, [sp, #48] ; 0x30
8010cf0: 2200 movs r2, #0
8010cf2: 2300 movs r3, #0
8010cf4: f7ef fef8 bl 8000ae8 <__aeabi_dcmpeq>
8010cf8: 2800 cmp r0, #0
8010cfa: d068 beq.n 8010dce <_vfprintf_r+0xeb6>
8010cfc: 4b6d ldr r3, [pc, #436] ; (8010eb4 <_vfprintf_r+0xf9c>)
8010cfe: 6023 str r3, [r4, #0]
8010d00: 2301 movs r3, #1
8010d02: 441e add r6, r3
8010d04: 6063 str r3, [r4, #4]
8010d06: 9b23 ldr r3, [sp, #140] ; 0x8c
8010d08: 9624 str r6, [sp, #144] ; 0x90
8010d0a: 3301 adds r3, #1
8010d0c: 2b07 cmp r3, #7
8010d0e: 9323 str r3, [sp, #140] ; 0x8c
8010d10: dc37 bgt.n 8010d82 <_vfprintf_r+0xe6a>
8010d12: 3408 adds r4, #8
8010d14: 9b1c ldr r3, [sp, #112] ; 0x70
8010d16: 9a05 ldr r2, [sp, #20]
8010d18: 4293 cmp r3, r2
8010d1a: db03 blt.n 8010d24 <_vfprintf_r+0xe0c>
8010d1c: f01b 0f01 tst.w fp, #1
8010d20: f43f ad2e beq.w 8010780 <_vfprintf_r+0x868>
8010d24: 9b13 ldr r3, [sp, #76] ; 0x4c
8010d26: 6023 str r3, [r4, #0]
8010d28: 9b0e ldr r3, [sp, #56] ; 0x38
8010d2a: 9a0e ldr r2, [sp, #56] ; 0x38
8010d2c: 6063 str r3, [r4, #4]
8010d2e: 9b24 ldr r3, [sp, #144] ; 0x90
8010d30: 4413 add r3, r2
8010d32: 9324 str r3, [sp, #144] ; 0x90
8010d34: 9b23 ldr r3, [sp, #140] ; 0x8c
8010d36: 3301 adds r3, #1
8010d38: 2b07 cmp r3, #7
8010d3a: 9323 str r3, [sp, #140] ; 0x8c
8010d3c: dc2b bgt.n 8010d96 <_vfprintf_r+0xe7e>
8010d3e: 3408 adds r4, #8
8010d40: 9b05 ldr r3, [sp, #20]
8010d42: 1e5d subs r5, r3, #1
8010d44: 2d00 cmp r5, #0
8010d46: f77f ad1b ble.w 8010780 <_vfprintf_r+0x868>
8010d4a: 4e5b ldr r6, [pc, #364] ; (8010eb8 <_vfprintf_r+0xfa0>)
8010d4c: 2710 movs r7, #16
8010d4e: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8010d52: 2d10 cmp r5, #16
8010d54: f103 0301 add.w r3, r3, #1
8010d58: f104 0108 add.w r1, r4, #8
8010d5c: 6026 str r6, [r4, #0]
8010d5e: dc24 bgt.n 8010daa <_vfprintf_r+0xe92>
8010d60: 442a add r2, r5
8010d62: 6065 str r5, [r4, #4]
8010d64: 9224 str r2, [sp, #144] ; 0x90
8010d66: 2b07 cmp r3, #7
8010d68: 9323 str r3, [sp, #140] ; 0x8c
8010d6a: f340 8288 ble.w 801127e <_vfprintf_r+0x1366>
8010d6e: aa22 add r2, sp, #136 ; 0x88
8010d70: 4649 mov r1, r9
8010d72: 4650 mov r0, sl
8010d74: f002 fb23 bl 80133be <__sprint_r>
8010d78: 2800 cmp r0, #0
8010d7a: f040 82a1 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010d7e: ac25 add r4, sp, #148 ; 0x94
8010d80: e4fe b.n 8010780 <_vfprintf_r+0x868>
8010d82: aa22 add r2, sp, #136 ; 0x88
8010d84: 4649 mov r1, r9
8010d86: 4650 mov r0, sl
8010d88: f002 fb19 bl 80133be <__sprint_r>
8010d8c: 2800 cmp r0, #0
8010d8e: f040 8297 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010d92: ac25 add r4, sp, #148 ; 0x94
8010d94: e7be b.n 8010d14 <_vfprintf_r+0xdfc>
8010d96: aa22 add r2, sp, #136 ; 0x88
8010d98: 4649 mov r1, r9
8010d9a: 4650 mov r0, sl
8010d9c: f002 fb0f bl 80133be <__sprint_r>
8010da0: 2800 cmp r0, #0
8010da2: f040 828d bne.w 80112c0 <_vfprintf_r+0x13a8>
8010da6: ac25 add r4, sp, #148 ; 0x94
8010da8: e7ca b.n 8010d40 <_vfprintf_r+0xe28>
8010daa: 3210 adds r2, #16
8010dac: 2b07 cmp r3, #7
8010dae: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8010db2: 6067 str r7, [r4, #4]
8010db4: dd08 ble.n 8010dc8 <_vfprintf_r+0xeb0>
8010db6: aa22 add r2, sp, #136 ; 0x88
8010db8: 4649 mov r1, r9
8010dba: 4650 mov r0, sl
8010dbc: f002 faff bl 80133be <__sprint_r>
8010dc0: 2800 cmp r0, #0
8010dc2: f040 827d bne.w 80112c0 <_vfprintf_r+0x13a8>
8010dc6: a925 add r1, sp, #148 ; 0x94
8010dc8: 3d10 subs r5, #16
8010dca: 460c mov r4, r1
8010dcc: e7bf b.n 8010d4e <_vfprintf_r+0xe36>
8010dce: 9b1c ldr r3, [sp, #112] ; 0x70
8010dd0: 2b00 cmp r3, #0
8010dd2: dc73 bgt.n 8010ebc <_vfprintf_r+0xfa4>
8010dd4: 4b37 ldr r3, [pc, #220] ; (8010eb4 <_vfprintf_r+0xf9c>)
8010dd6: 6023 str r3, [r4, #0]
8010dd8: 2301 movs r3, #1
8010dda: 441e add r6, r3
8010ddc: 6063 str r3, [r4, #4]
8010dde: 9b23 ldr r3, [sp, #140] ; 0x8c
8010de0: 9624 str r6, [sp, #144] ; 0x90
8010de2: 3301 adds r3, #1
8010de4: 2b07 cmp r3, #7
8010de6: 9323 str r3, [sp, #140] ; 0x8c
8010de8: dc3d bgt.n 8010e66 <_vfprintf_r+0xf4e>
8010dea: 3408 adds r4, #8
8010dec: 9905 ldr r1, [sp, #20]
8010dee: 9a1c ldr r2, [sp, #112] ; 0x70
8010df0: 9b24 ldr r3, [sp, #144] ; 0x90
8010df2: 430a orrs r2, r1
8010df4: f00b 0101 and.w r1, fp, #1
8010df8: 430a orrs r2, r1
8010dfa: f43f acc1 beq.w 8010780 <_vfprintf_r+0x868>
8010dfe: 9a13 ldr r2, [sp, #76] ; 0x4c
8010e00: 6022 str r2, [r4, #0]
8010e02: 9a0e ldr r2, [sp, #56] ; 0x38
8010e04: 6062 str r2, [r4, #4]
8010e06: 4413 add r3, r2
8010e08: 9324 str r3, [sp, #144] ; 0x90
8010e0a: 9b23 ldr r3, [sp, #140] ; 0x8c
8010e0c: 3301 adds r3, #1
8010e0e: 2b07 cmp r3, #7
8010e10: 9323 str r3, [sp, #140] ; 0x8c
8010e12: dc32 bgt.n 8010e7a <_vfprintf_r+0xf62>
8010e14: 3408 adds r4, #8
8010e16: 9d1c ldr r5, [sp, #112] ; 0x70
8010e18: 2d00 cmp r5, #0
8010e1a: da1b bge.n 8010e54 <_vfprintf_r+0xf3c>
8010e1c: 4e26 ldr r6, [pc, #152] ; (8010eb8 <_vfprintf_r+0xfa0>)
8010e1e: 426d negs r5, r5
8010e20: 4623 mov r3, r4
8010e22: 2710 movs r7, #16
8010e24: e9dd 2123 ldrd r2, r1, [sp, #140] ; 0x8c
8010e28: 2d10 cmp r5, #16
8010e2a: f102 0201 add.w r2, r2, #1
8010e2e: f104 0408 add.w r4, r4, #8
8010e32: 601e str r6, [r3, #0]
8010e34: dc2b bgt.n 8010e8e <_vfprintf_r+0xf76>
8010e36: 605d str r5, [r3, #4]
8010e38: 2a07 cmp r2, #7
8010e3a: 440d add r5, r1
8010e3c: e9cd 2523 strd r2, r5, [sp, #140] ; 0x8c
8010e40: dd08 ble.n 8010e54 <_vfprintf_r+0xf3c>
8010e42: aa22 add r2, sp, #136 ; 0x88
8010e44: 4649 mov r1, r9
8010e46: 4650 mov r0, sl
8010e48: f002 fab9 bl 80133be <__sprint_r>
8010e4c: 2800 cmp r0, #0
8010e4e: f040 8237 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010e52: ac25 add r4, sp, #148 ; 0x94
8010e54: 9b05 ldr r3, [sp, #20]
8010e56: 9a05 ldr r2, [sp, #20]
8010e58: 6063 str r3, [r4, #4]
8010e5a: 9b24 ldr r3, [sp, #144] ; 0x90
8010e5c: f8c4 8000 str.w r8, [r4]
8010e60: 4413 add r3, r2
8010e62: 9324 str r3, [sp, #144] ; 0x90
8010e64: e485 b.n 8010772 <_vfprintf_r+0x85a>
8010e66: aa22 add r2, sp, #136 ; 0x88
8010e68: 4649 mov r1, r9
8010e6a: 4650 mov r0, sl
8010e6c: f002 faa7 bl 80133be <__sprint_r>
8010e70: 2800 cmp r0, #0
8010e72: f040 8225 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010e76: ac25 add r4, sp, #148 ; 0x94
8010e78: e7b8 b.n 8010dec <_vfprintf_r+0xed4>
8010e7a: aa22 add r2, sp, #136 ; 0x88
8010e7c: 4649 mov r1, r9
8010e7e: 4650 mov r0, sl
8010e80: f002 fa9d bl 80133be <__sprint_r>
8010e84: 2800 cmp r0, #0
8010e86: f040 821b bne.w 80112c0 <_vfprintf_r+0x13a8>
8010e8a: ac25 add r4, sp, #148 ; 0x94
8010e8c: e7c3 b.n 8010e16 <_vfprintf_r+0xefe>
8010e8e: 3110 adds r1, #16
8010e90: 2a07 cmp r2, #7
8010e92: e9cd 2123 strd r2, r1, [sp, #140] ; 0x8c
8010e96: 605f str r7, [r3, #4]
8010e98: dd08 ble.n 8010eac <_vfprintf_r+0xf94>
8010e9a: aa22 add r2, sp, #136 ; 0x88
8010e9c: 4649 mov r1, r9
8010e9e: 4650 mov r0, sl
8010ea0: f002 fa8d bl 80133be <__sprint_r>
8010ea4: 2800 cmp r0, #0
8010ea6: f040 820b bne.w 80112c0 <_vfprintf_r+0x13a8>
8010eaa: ac25 add r4, sp, #148 ; 0x94
8010eac: 3d10 subs r5, #16
8010eae: 4623 mov r3, r4
8010eb0: e7b8 b.n 8010e24 <_vfprintf_r+0xf0c>
8010eb2: bf00 nop
8010eb4: 08017a12 .word 0x08017a12
8010eb8: 08017a24 .word 0x08017a24
8010ebc: 9f05 ldr r7, [sp, #20]
8010ebe: 42af cmp r7, r5
8010ec0: bfa8 it ge
8010ec2: 462f movge r7, r5
8010ec4: 2f00 cmp r7, #0
8010ec6: dd09 ble.n 8010edc <_vfprintf_r+0xfc4>
8010ec8: 9b23 ldr r3, [sp, #140] ; 0x8c
8010eca: 3301 adds r3, #1
8010ecc: 443e add r6, r7
8010ece: 2b07 cmp r3, #7
8010ed0: e9c4 8700 strd r8, r7, [r4]
8010ed4: 9624 str r6, [sp, #144] ; 0x90
8010ed6: 9323 str r3, [sp, #140] ; 0x8c
8010ed8: dc75 bgt.n 8010fc6 <_vfprintf_r+0x10ae>
8010eda: 3408 adds r4, #8
8010edc: 2f00 cmp r7, #0
8010ede: bfac ite ge
8010ee0: 1bee subge r6, r5, r7
8010ee2: 462e movlt r6, r5
8010ee4: 2e00 cmp r6, #0
8010ee6: dd18 ble.n 8010f1a <_vfprintf_r+0x1002>
8010ee8: 4f98 ldr r7, [pc, #608] ; (801114c <_vfprintf_r+0x1234>)
8010eea: 6027 str r7, [r4, #0]
8010eec: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8010ef0: 2e10 cmp r6, #16
8010ef2: f103 0301 add.w r3, r3, #1
8010ef6: f104 0108 add.w r1, r4, #8
8010efa: dc6e bgt.n 8010fda <_vfprintf_r+0x10c2>
8010efc: 6066 str r6, [r4, #4]
8010efe: 2b07 cmp r3, #7
8010f00: 4416 add r6, r2
8010f02: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
8010f06: dd7b ble.n 8011000 <_vfprintf_r+0x10e8>
8010f08: aa22 add r2, sp, #136 ; 0x88
8010f0a: 4649 mov r1, r9
8010f0c: 4650 mov r0, sl
8010f0e: f002 fa56 bl 80133be <__sprint_r>
8010f12: 2800 cmp r0, #0
8010f14: f040 81d4 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010f18: ac25 add r4, sp, #148 ; 0x94
8010f1a: f41b 6f80 tst.w fp, #1024 ; 0x400
8010f1e: 4445 add r5, r8
8010f20: d00a beq.n 8010f38 <_vfprintf_r+0x1020>
8010f22: 9b09 ldr r3, [sp, #36] ; 0x24
8010f24: 2b00 cmp r3, #0
8010f26: d16d bne.n 8011004 <_vfprintf_r+0x10ec>
8010f28: 9b08 ldr r3, [sp, #32]
8010f2a: 2b00 cmp r3, #0
8010f2c: d16d bne.n 801100a <_vfprintf_r+0x10f2>
8010f2e: 9b05 ldr r3, [sp, #20]
8010f30: 4443 add r3, r8
8010f32: 429d cmp r5, r3
8010f34: bf28 it cs
8010f36: 461d movcs r5, r3
8010f38: 9b1c ldr r3, [sp, #112] ; 0x70
8010f3a: 9a05 ldr r2, [sp, #20]
8010f3c: 4293 cmp r3, r2
8010f3e: db02 blt.n 8010f46 <_vfprintf_r+0x102e>
8010f40: f01b 0f01 tst.w fp, #1
8010f44: d00e beq.n 8010f64 <_vfprintf_r+0x104c>
8010f46: 9b13 ldr r3, [sp, #76] ; 0x4c
8010f48: 6023 str r3, [r4, #0]
8010f4a: 9b0e ldr r3, [sp, #56] ; 0x38
8010f4c: 9a0e ldr r2, [sp, #56] ; 0x38
8010f4e: 6063 str r3, [r4, #4]
8010f50: 9b24 ldr r3, [sp, #144] ; 0x90
8010f52: 4413 add r3, r2
8010f54: 9324 str r3, [sp, #144] ; 0x90
8010f56: 9b23 ldr r3, [sp, #140] ; 0x8c
8010f58: 3301 adds r3, #1
8010f5a: 2b07 cmp r3, #7
8010f5c: 9323 str r3, [sp, #140] ; 0x8c
8010f5e: f300 80cf bgt.w 8011100 <_vfprintf_r+0x11e8>
8010f62: 3408 adds r4, #8
8010f64: 9b05 ldr r3, [sp, #20]
8010f66: 9e1c ldr r6, [sp, #112] ; 0x70
8010f68: eb08 0203 add.w r2, r8, r3
8010f6c: 1b9e subs r6, r3, r6
8010f6e: 1b52 subs r2, r2, r5
8010f70: 4296 cmp r6, r2
8010f72: bfa8 it ge
8010f74: 4616 movge r6, r2
8010f76: 2e00 cmp r6, #0
8010f78: dd0b ble.n 8010f92 <_vfprintf_r+0x107a>
8010f7a: 9b24 ldr r3, [sp, #144] ; 0x90
8010f7c: 4433 add r3, r6
8010f7e: 9324 str r3, [sp, #144] ; 0x90
8010f80: 9b23 ldr r3, [sp, #140] ; 0x8c
8010f82: 3301 adds r3, #1
8010f84: 2b07 cmp r3, #7
8010f86: e9c4 5600 strd r5, r6, [r4]
8010f8a: 9323 str r3, [sp, #140] ; 0x8c
8010f8c: f300 80c2 bgt.w 8011114 <_vfprintf_r+0x11fc>
8010f90: 3408 adds r4, #8
8010f92: 9d1c ldr r5, [sp, #112] ; 0x70
8010f94: 9b05 ldr r3, [sp, #20]
8010f96: 2e00 cmp r6, #0
8010f98: eba3 0505 sub.w r5, r3, r5
8010f9c: bfa8 it ge
8010f9e: 1bad subge r5, r5, r6
8010fa0: 2d00 cmp r5, #0
8010fa2: f77f abed ble.w 8010780 <_vfprintf_r+0x868>
8010fa6: 4e69 ldr r6, [pc, #420] ; (801114c <_vfprintf_r+0x1234>)
8010fa8: 2710 movs r7, #16
8010faa: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8010fae: 2d10 cmp r5, #16
8010fb0: f103 0301 add.w r3, r3, #1
8010fb4: f104 0108 add.w r1, r4, #8
8010fb8: 6026 str r6, [r4, #0]
8010fba: f300 80b5 bgt.w 8011128 <_vfprintf_r+0x1210>
8010fbe: 6065 str r5, [r4, #4]
8010fc0: 4415 add r5, r2
8010fc2: 9524 str r5, [sp, #144] ; 0x90
8010fc4: e6cf b.n 8010d66 <_vfprintf_r+0xe4e>
8010fc6: aa22 add r2, sp, #136 ; 0x88
8010fc8: 4649 mov r1, r9
8010fca: 4650 mov r0, sl
8010fcc: f002 f9f7 bl 80133be <__sprint_r>
8010fd0: 2800 cmp r0, #0
8010fd2: f040 8175 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010fd6: ac25 add r4, sp, #148 ; 0x94
8010fd8: e780 b.n 8010edc <_vfprintf_r+0xfc4>
8010fda: 2010 movs r0, #16
8010fdc: 4402 add r2, r0
8010fde: 2b07 cmp r3, #7
8010fe0: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8010fe4: 6060 str r0, [r4, #4]
8010fe6: dd08 ble.n 8010ffa <_vfprintf_r+0x10e2>
8010fe8: aa22 add r2, sp, #136 ; 0x88
8010fea: 4649 mov r1, r9
8010fec: 4650 mov r0, sl
8010fee: f002 f9e6 bl 80133be <__sprint_r>
8010ff2: 2800 cmp r0, #0
8010ff4: f040 8164 bne.w 80112c0 <_vfprintf_r+0x13a8>
8010ff8: a925 add r1, sp, #148 ; 0x94
8010ffa: 3e10 subs r6, #16
8010ffc: 460c mov r4, r1
8010ffe: e774 b.n 8010eea <_vfprintf_r+0xfd2>
8011000: 460c mov r4, r1
8011002: e78a b.n 8010f1a <_vfprintf_r+0x1002>
8011004: 9b08 ldr r3, [sp, #32]
8011006: 2b00 cmp r3, #0
8011008: d04a beq.n 80110a0 <_vfprintf_r+0x1188>
801100a: 9b08 ldr r3, [sp, #32]
801100c: 3b01 subs r3, #1
801100e: 9308 str r3, [sp, #32]
8011010: 9b14 ldr r3, [sp, #80] ; 0x50
8011012: 6023 str r3, [r4, #0]
8011014: 9b12 ldr r3, [sp, #72] ; 0x48
8011016: 9a12 ldr r2, [sp, #72] ; 0x48
8011018: 6063 str r3, [r4, #4]
801101a: 9b24 ldr r3, [sp, #144] ; 0x90
801101c: 4413 add r3, r2
801101e: 9324 str r3, [sp, #144] ; 0x90
8011020: 9b23 ldr r3, [sp, #140] ; 0x8c
8011022: 3301 adds r3, #1
8011024: 2b07 cmp r3, #7
8011026: 9323 str r3, [sp, #140] ; 0x8c
8011028: dc41 bgt.n 80110ae <_vfprintf_r+0x1196>
801102a: 3408 adds r4, #8
801102c: 9b05 ldr r3, [sp, #20]
801102e: 9a0a ldr r2, [sp, #40] ; 0x28
8011030: eb08 0703 add.w r7, r8, r3
8011034: 1b7b subs r3, r7, r5
8011036: 7817 ldrb r7, [r2, #0]
8011038: 429f cmp r7, r3
801103a: bfa8 it ge
801103c: 461f movge r7, r3
801103e: 2f00 cmp r7, #0
8011040: dd0a ble.n 8011058 <_vfprintf_r+0x1140>
8011042: 9b24 ldr r3, [sp, #144] ; 0x90
8011044: 443b add r3, r7
8011046: 9324 str r3, [sp, #144] ; 0x90
8011048: 9b23 ldr r3, [sp, #140] ; 0x8c
801104a: 3301 adds r3, #1
801104c: 2b07 cmp r3, #7
801104e: e9c4 5700 strd r5, r7, [r4]
8011052: 9323 str r3, [sp, #140] ; 0x8c
8011054: dc35 bgt.n 80110c2 <_vfprintf_r+0x11aa>
8011056: 3408 adds r4, #8
8011058: 9b0a ldr r3, [sp, #40] ; 0x28
801105a: 781e ldrb r6, [r3, #0]
801105c: 2f00 cmp r7, #0
801105e: bfa8 it ge
8011060: 1bf6 subge r6, r6, r7
8011062: 2e00 cmp r6, #0
8011064: dd18 ble.n 8011098 <_vfprintf_r+0x1180>
8011066: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
801106a: 4838 ldr r0, [pc, #224] ; (801114c <_vfprintf_r+0x1234>)
801106c: 6020 str r0, [r4, #0]
801106e: 2e10 cmp r6, #16
8011070: f103 0301 add.w r3, r3, #1
8011074: f104 0108 add.w r1, r4, #8
8011078: dc2d bgt.n 80110d6 <_vfprintf_r+0x11be>
801107a: 6066 str r6, [r4, #4]
801107c: 2b07 cmp r3, #7
801107e: 4416 add r6, r2
8011080: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
8011084: dd3a ble.n 80110fc <_vfprintf_r+0x11e4>
8011086: aa22 add r2, sp, #136 ; 0x88
8011088: 4649 mov r1, r9
801108a: 4650 mov r0, sl
801108c: f002 f997 bl 80133be <__sprint_r>
8011090: 2800 cmp r0, #0
8011092: f040 8115 bne.w 80112c0 <_vfprintf_r+0x13a8>
8011096: ac25 add r4, sp, #148 ; 0x94
8011098: 9b0a ldr r3, [sp, #40] ; 0x28
801109a: 781b ldrb r3, [r3, #0]
801109c: 441d add r5, r3
801109e: e740 b.n 8010f22 <_vfprintf_r+0x100a>
80110a0: 9b0a ldr r3, [sp, #40] ; 0x28
80110a2: 3b01 subs r3, #1
80110a4: 930a str r3, [sp, #40] ; 0x28
80110a6: 9b09 ldr r3, [sp, #36] ; 0x24
80110a8: 3b01 subs r3, #1
80110aa: 9309 str r3, [sp, #36] ; 0x24
80110ac: e7b0 b.n 8011010 <_vfprintf_r+0x10f8>
80110ae: aa22 add r2, sp, #136 ; 0x88
80110b0: 4649 mov r1, r9
80110b2: 4650 mov r0, sl
80110b4: f002 f983 bl 80133be <__sprint_r>
80110b8: 2800 cmp r0, #0
80110ba: f040 8101 bne.w 80112c0 <_vfprintf_r+0x13a8>
80110be: ac25 add r4, sp, #148 ; 0x94
80110c0: e7b4 b.n 801102c <_vfprintf_r+0x1114>
80110c2: aa22 add r2, sp, #136 ; 0x88
80110c4: 4649 mov r1, r9
80110c6: 4650 mov r0, sl
80110c8: f002 f979 bl 80133be <__sprint_r>
80110cc: 2800 cmp r0, #0
80110ce: f040 80f7 bne.w 80112c0 <_vfprintf_r+0x13a8>
80110d2: ac25 add r4, sp, #148 ; 0x94
80110d4: e7c0 b.n 8011058 <_vfprintf_r+0x1140>
80110d6: 2010 movs r0, #16
80110d8: 4402 add r2, r0
80110da: 2b07 cmp r3, #7
80110dc: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
80110e0: 6060 str r0, [r4, #4]
80110e2: dd08 ble.n 80110f6 <_vfprintf_r+0x11de>
80110e4: aa22 add r2, sp, #136 ; 0x88
80110e6: 4649 mov r1, r9
80110e8: 4650 mov r0, sl
80110ea: f002 f968 bl 80133be <__sprint_r>
80110ee: 2800 cmp r0, #0
80110f0: f040 80e6 bne.w 80112c0 <_vfprintf_r+0x13a8>
80110f4: a925 add r1, sp, #148 ; 0x94
80110f6: 3e10 subs r6, #16
80110f8: 460c mov r4, r1
80110fa: e7b4 b.n 8011066 <_vfprintf_r+0x114e>
80110fc: 460c mov r4, r1
80110fe: e7cb b.n 8011098 <_vfprintf_r+0x1180>
8011100: aa22 add r2, sp, #136 ; 0x88
8011102: 4649 mov r1, r9
8011104: 4650 mov r0, sl
8011106: f002 f95a bl 80133be <__sprint_r>
801110a: 2800 cmp r0, #0
801110c: f040 80d8 bne.w 80112c0 <_vfprintf_r+0x13a8>
8011110: ac25 add r4, sp, #148 ; 0x94
8011112: e727 b.n 8010f64 <_vfprintf_r+0x104c>
8011114: aa22 add r2, sp, #136 ; 0x88
8011116: 4649 mov r1, r9
8011118: 4650 mov r0, sl
801111a: f002 f950 bl 80133be <__sprint_r>
801111e: 2800 cmp r0, #0
8011120: f040 80ce bne.w 80112c0 <_vfprintf_r+0x13a8>
8011124: ac25 add r4, sp, #148 ; 0x94
8011126: e734 b.n 8010f92 <_vfprintf_r+0x107a>
8011128: 3210 adds r2, #16
801112a: 2b07 cmp r3, #7
801112c: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8011130: 6067 str r7, [r4, #4]
8011132: dd08 ble.n 8011146 <_vfprintf_r+0x122e>
8011134: aa22 add r2, sp, #136 ; 0x88
8011136: 4649 mov r1, r9
8011138: 4650 mov r0, sl
801113a: f002 f940 bl 80133be <__sprint_r>
801113e: 2800 cmp r0, #0
8011140: f040 80be bne.w 80112c0 <_vfprintf_r+0x13a8>
8011144: a925 add r1, sp, #148 ; 0x94
8011146: 3d10 subs r5, #16
8011148: 460c mov r4, r1
801114a: e72e b.n 8010faa <_vfprintf_r+0x1092>
801114c: 08017a24 .word 0x08017a24
8011150: 9a05 ldr r2, [sp, #20]
8011152: 9b23 ldr r3, [sp, #140] ; 0x8c
8011154: 2a01 cmp r2, #1
8011156: f106 0601 add.w r6, r6, #1
801115a: f103 0301 add.w r3, r3, #1
801115e: f104 0508 add.w r5, r4, #8
8011162: dc02 bgt.n 801116a <_vfprintf_r+0x1252>
8011164: f01b 0f01 tst.w fp, #1
8011168: d07e beq.n 8011268 <_vfprintf_r+0x1350>
801116a: 2201 movs r2, #1
801116c: 2b07 cmp r3, #7
801116e: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
8011172: f8c4 8000 str.w r8, [r4]
8011176: 6062 str r2, [r4, #4]
8011178: dd08 ble.n 801118c <_vfprintf_r+0x1274>
801117a: aa22 add r2, sp, #136 ; 0x88
801117c: 4649 mov r1, r9
801117e: 4650 mov r0, sl
8011180: f002 f91d bl 80133be <__sprint_r>
8011184: 2800 cmp r0, #0
8011186: f040 809b bne.w 80112c0 <_vfprintf_r+0x13a8>
801118a: ad25 add r5, sp, #148 ; 0x94
801118c: 9b13 ldr r3, [sp, #76] ; 0x4c
801118e: 602b str r3, [r5, #0]
8011190: 9b0e ldr r3, [sp, #56] ; 0x38
8011192: 9a0e ldr r2, [sp, #56] ; 0x38
8011194: 606b str r3, [r5, #4]
8011196: 9b24 ldr r3, [sp, #144] ; 0x90
8011198: 4413 add r3, r2
801119a: 9324 str r3, [sp, #144] ; 0x90
801119c: 9b23 ldr r3, [sp, #140] ; 0x8c
801119e: 3301 adds r3, #1
80111a0: 2b07 cmp r3, #7
80111a2: 9323 str r3, [sp, #140] ; 0x8c
80111a4: dc32 bgt.n 801120c <_vfprintf_r+0x12f4>
80111a6: 3508 adds r5, #8
80111a8: 9b05 ldr r3, [sp, #20]
80111aa: e9dd 010c ldrd r0, r1, [sp, #48] ; 0x30
80111ae: 1e5c subs r4, r3, #1
80111b0: 2200 movs r2, #0
80111b2: 2300 movs r3, #0
80111b4: f7ef fc98 bl 8000ae8 <__aeabi_dcmpeq>
80111b8: 2800 cmp r0, #0
80111ba: d130 bne.n 801121e <_vfprintf_r+0x1306>
80111bc: 9923 ldr r1, [sp, #140] ; 0x8c
80111be: 9b24 ldr r3, [sp, #144] ; 0x90
80111c0: 9a05 ldr r2, [sp, #20]
80111c2: 3101 adds r1, #1
80111c4: 3b01 subs r3, #1
80111c6: f108 0001 add.w r0, r8, #1
80111ca: 4413 add r3, r2
80111cc: 2907 cmp r1, #7
80111ce: e9c5 0400 strd r0, r4, [r5]
80111d2: e9cd 1323 strd r1, r3, [sp, #140] ; 0x8c
80111d6: dd50 ble.n 801127a <_vfprintf_r+0x1362>
80111d8: aa22 add r2, sp, #136 ; 0x88
80111da: 4649 mov r1, r9
80111dc: 4650 mov r0, sl
80111de: f002 f8ee bl 80133be <__sprint_r>
80111e2: 2800 cmp r0, #0
80111e4: d16c bne.n 80112c0 <_vfprintf_r+0x13a8>
80111e6: ad25 add r5, sp, #148 ; 0x94
80111e8: ab1e add r3, sp, #120 ; 0x78
80111ea: 602b str r3, [r5, #0]
80111ec: 9b15 ldr r3, [sp, #84] ; 0x54
80111ee: 9a15 ldr r2, [sp, #84] ; 0x54
80111f0: 606b str r3, [r5, #4]
80111f2: 9b24 ldr r3, [sp, #144] ; 0x90
80111f4: 4413 add r3, r2
80111f6: 9324 str r3, [sp, #144] ; 0x90
80111f8: 9b23 ldr r3, [sp, #140] ; 0x8c
80111fa: 3301 adds r3, #1
80111fc: 2b07 cmp r3, #7
80111fe: 9323 str r3, [sp, #140] ; 0x8c
8011200: f73f adb5 bgt.w 8010d6e <_vfprintf_r+0xe56>
8011204: f105 0408 add.w r4, r5, #8
8011208: f7ff baba b.w 8010780 <_vfprintf_r+0x868>
801120c: aa22 add r2, sp, #136 ; 0x88
801120e: 4649 mov r1, r9
8011210: 4650 mov r0, sl
8011212: f002 f8d4 bl 80133be <__sprint_r>
8011216: 2800 cmp r0, #0
8011218: d152 bne.n 80112c0 <_vfprintf_r+0x13a8>
801121a: ad25 add r5, sp, #148 ; 0x94
801121c: e7c4 b.n 80111a8 <_vfprintf_r+0x1290>
801121e: 2c00 cmp r4, #0
8011220: dde2 ble.n 80111e8 <_vfprintf_r+0x12d0>
8011222: 4e58 ldr r6, [pc, #352] ; (8011384 <_vfprintf_r+0x146c>)
8011224: 2710 movs r7, #16
8011226: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
801122a: 2c10 cmp r4, #16
801122c: f103 0301 add.w r3, r3, #1
8011230: f105 0108 add.w r1, r5, #8
8011234: 602e str r6, [r5, #0]
8011236: dc07 bgt.n 8011248 <_vfprintf_r+0x1330>
8011238: 606c str r4, [r5, #4]
801123a: 2b07 cmp r3, #7
801123c: 4414 add r4, r2
801123e: e9cd 3423 strd r3, r4, [sp, #140] ; 0x8c
8011242: dcc9 bgt.n 80111d8 <_vfprintf_r+0x12c0>
8011244: 460d mov r5, r1
8011246: e7cf b.n 80111e8 <_vfprintf_r+0x12d0>
8011248: 3210 adds r2, #16
801124a: 2b07 cmp r3, #7
801124c: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
8011250: 606f str r7, [r5, #4]
8011252: dd06 ble.n 8011262 <_vfprintf_r+0x134a>
8011254: aa22 add r2, sp, #136 ; 0x88
8011256: 4649 mov r1, r9
8011258: 4650 mov r0, sl
801125a: f002 f8b0 bl 80133be <__sprint_r>
801125e: bb78 cbnz r0, 80112c0 <_vfprintf_r+0x13a8>
8011260: a925 add r1, sp, #148 ; 0x94
8011262: 3c10 subs r4, #16
8011264: 460d mov r5, r1
8011266: e7de b.n 8011226 <_vfprintf_r+0x130e>
8011268: 2201 movs r2, #1
801126a: 2b07 cmp r3, #7
801126c: e9cd 3623 strd r3, r6, [sp, #140] ; 0x8c
8011270: f8c4 8000 str.w r8, [r4]
8011274: 6062 str r2, [r4, #4]
8011276: ddb7 ble.n 80111e8 <_vfprintf_r+0x12d0>
8011278: e7ae b.n 80111d8 <_vfprintf_r+0x12c0>
801127a: 3508 adds r5, #8
801127c: e7b4 b.n 80111e8 <_vfprintf_r+0x12d0>
801127e: 460c mov r4, r1
8011280: f7ff ba7e b.w 8010780 <_vfprintf_r+0x868>
8011284: e9dd 3210 ldrd r3, r2, [sp, #64] ; 0x40
8011288: 1a9d subs r5, r3, r2
801128a: 2d00 cmp r5, #0
801128c: f77f aa7c ble.w 8010788 <_vfprintf_r+0x870>
8011290: 4e3d ldr r6, [pc, #244] ; (8011388 <_vfprintf_r+0x1470>)
8011292: 2710 movs r7, #16
8011294: e9dd 3223 ldrd r3, r2, [sp, #140] ; 0x8c
8011298: 2d10 cmp r5, #16
801129a: f103 0301 add.w r3, r3, #1
801129e: 6026 str r6, [r4, #0]
80112a0: dc18 bgt.n 80112d4 <_vfprintf_r+0x13bc>
80112a2: 6065 str r5, [r4, #4]
80112a4: 2b07 cmp r3, #7
80112a6: 4415 add r5, r2
80112a8: e9cd 3523 strd r3, r5, [sp, #140] ; 0x8c
80112ac: f77f aa6c ble.w 8010788 <_vfprintf_r+0x870>
80112b0: aa22 add r2, sp, #136 ; 0x88
80112b2: 4649 mov r1, r9
80112b4: 4650 mov r0, sl
80112b6: f002 f882 bl 80133be <__sprint_r>
80112ba: 2800 cmp r0, #0
80112bc: f43f aa64 beq.w 8010788 <_vfprintf_r+0x870>
80112c0: 9b03 ldr r3, [sp, #12]
80112c2: 2b00 cmp r3, #0
80112c4: f43f a879 beq.w 80103ba <_vfprintf_r+0x4a2>
80112c8: 4619 mov r1, r3
80112ca: 4650 mov r0, sl
80112cc: f001 f8fa bl 80124c4 <_free_r>
80112d0: f7ff b873 b.w 80103ba <_vfprintf_r+0x4a2>
80112d4: 3210 adds r2, #16
80112d6: 2b07 cmp r3, #7
80112d8: e9cd 3223 strd r3, r2, [sp, #140] ; 0x8c
80112dc: 6067 str r7, [r4, #4]
80112de: dc02 bgt.n 80112e6 <_vfprintf_r+0x13ce>
80112e0: 3408 adds r4, #8
80112e2: 3d10 subs r5, #16
80112e4: e7d6 b.n 8011294 <_vfprintf_r+0x137c>
80112e6: aa22 add r2, sp, #136 ; 0x88
80112e8: 4649 mov r1, r9
80112ea: 4650 mov r0, sl
80112ec: f002 f867 bl 80133be <__sprint_r>
80112f0: 2800 cmp r0, #0
80112f2: d1e5 bne.n 80112c0 <_vfprintf_r+0x13a8>
80112f4: ac25 add r4, sp, #148 ; 0x94
80112f6: e7f4 b.n 80112e2 <_vfprintf_r+0x13ca>
80112f8: 9903 ldr r1, [sp, #12]
80112fa: 4650 mov r0, sl
80112fc: f001 f8e2 bl 80124c4 <_free_r>
8011300: f7ff ba5a b.w 80107b8 <_vfprintf_r+0x8a0>
8011304: 9b24 ldr r3, [sp, #144] ; 0x90
8011306: b91b cbnz r3, 8011310 <_vfprintf_r+0x13f8>
8011308: 2300 movs r3, #0
801130a: 9323 str r3, [sp, #140] ; 0x8c
801130c: f7ff b855 b.w 80103ba <_vfprintf_r+0x4a2>
8011310: aa22 add r2, sp, #136 ; 0x88
8011312: 4649 mov r1, r9
8011314: 4650 mov r0, sl
8011316: f002 f852 bl 80133be <__sprint_r>
801131a: 2800 cmp r0, #0
801131c: d0f4 beq.n 8011308 <_vfprintf_r+0x13f0>
801131e: f7ff b84c b.w 80103ba <_vfprintf_r+0x4a2>
8011322: ea56 0205 orrs.w r2, r6, r5
8011326: 465f mov r7, fp
8011328: f43f ab70 beq.w 8010a0c <_vfprintf_r+0xaf4>
801132c: 2b01 cmp r3, #1
801132e: f43f ac0d beq.w 8010b4c <_vfprintf_r+0xc34>
8011332: 2b02 cmp r3, #2
8011334: f50d 789c add.w r8, sp, #312 ; 0x138
8011338: f43f ac54 beq.w 8010be4 <_vfprintf_r+0xccc>
801133c: f006 0307 and.w r3, r6, #7
8011340: 08f6 lsrs r6, r6, #3
8011342: ea46 7645 orr.w r6, r6, r5, lsl #29
8011346: 08ed lsrs r5, r5, #3
8011348: 3330 adds r3, #48 ; 0x30
801134a: ea56 0105 orrs.w r1, r6, r5
801134e: 4642 mov r2, r8
8011350: f808 3d01 strb.w r3, [r8, #-1]!
8011354: d1f2 bne.n 801133c <_vfprintf_r+0x1424>
8011356: 07f8 lsls r0, r7, #31
8011358: d506 bpl.n 8011368 <_vfprintf_r+0x1450>
801135a: 2b30 cmp r3, #48 ; 0x30
801135c: d004 beq.n 8011368 <_vfprintf_r+0x1450>
801135e: 2330 movs r3, #48 ; 0x30
8011360: f808 3c01 strb.w r3, [r8, #-1]
8011364: f1a2 0802 sub.w r8, r2, #2
8011368: ab4e add r3, sp, #312 ; 0x138
801136a: eba3 0308 sub.w r3, r3, r8
801136e: 9e04 ldr r6, [sp, #16]
8011370: 9304 str r3, [sp, #16]
8011372: 2300 movs r3, #0
8011374: 46bb mov fp, r7
8011376: 9303 str r3, [sp, #12]
8011378: e9cd 3308 strd r3, r3, [sp, #32]
801137c: 461d mov r5, r3
801137e: f7ff b945 b.w 801060c <_vfprintf_r+0x6f4>
8011382: bf00 nop
8011384: 08017a24 .word 0x08017a24
8011388: 08017a14 .word 0x08017a14
0801138c <__sbprintf>:
801138c: b570 push {r4, r5, r6, lr}
801138e: 460c mov r4, r1
8011390: 8989 ldrh r1, [r1, #12]
8011392: f5ad 6d8e sub.w sp, sp, #1136 ; 0x470
8011396: f021 0102 bic.w r1, r1, #2
801139a: f8ad 1014 strh.w r1, [sp, #20]
801139e: 6e61 ldr r1, [r4, #100] ; 0x64
80113a0: 911b str r1, [sp, #108] ; 0x6c
80113a2: 89e1 ldrh r1, [r4, #14]
80113a4: f8ad 1016 strh.w r1, [sp, #22]
80113a8: 69e1 ldr r1, [r4, #28]
80113aa: 9109 str r1, [sp, #36] ; 0x24
80113ac: 6a61 ldr r1, [r4, #36] ; 0x24
80113ae: 910b str r1, [sp, #44] ; 0x2c
80113b0: a91c add r1, sp, #112 ; 0x70
80113b2: 9102 str r1, [sp, #8]
80113b4: 9106 str r1, [sp, #24]
80113b6: f44f 6180 mov.w r1, #1024 ; 0x400
80113ba: 4606 mov r6, r0
80113bc: 9104 str r1, [sp, #16]
80113be: 9107 str r1, [sp, #28]
80113c0: a818 add r0, sp, #96 ; 0x60
80113c2: 2100 movs r1, #0
80113c4: e9cd 3200 strd r3, r2, [sp]
80113c8: 9108 str r1, [sp, #32]
80113ca: f001 f95f bl 801268c <__retarget_lock_init_recursive>
80113ce: e9dd 3200 ldrd r3, r2, [sp]
80113d2: a902 add r1, sp, #8
80113d4: 4630 mov r0, r6
80113d6: f7fe fd9f bl 800ff18 <_vfprintf_r>
80113da: 1e05 subs r5, r0, #0
80113dc: db07 blt.n 80113ee <__sbprintf+0x62>
80113de: a902 add r1, sp, #8
80113e0: 4630 mov r0, r6
80113e2: f000 ff73 bl 80122cc <_fflush_r>
80113e6: 2800 cmp r0, #0
80113e8: bf18 it ne
80113ea: f04f 35ff movne.w r5, #4294967295
80113ee: f8bd 3014 ldrh.w r3, [sp, #20]
80113f2: 9818 ldr r0, [sp, #96] ; 0x60
80113f4: 065b lsls r3, r3, #25
80113f6: bf42 ittt mi
80113f8: 89a3 ldrhmi r3, [r4, #12]
80113fa: f043 0340 orrmi.w r3, r3, #64 ; 0x40
80113fe: 81a3 strhmi r3, [r4, #12]
8011400: f001 f945 bl 801268e <__retarget_lock_close_recursive>
8011404: 4628 mov r0, r5
8011406: f50d 6d8e add.w sp, sp, #1136 ; 0x470
801140a: bd70 pop {r4, r5, r6, pc}
0801140c <__swsetup_r>:
801140c: b538 push {r3, r4, r5, lr}
801140e: 4b2a ldr r3, [pc, #168] ; (80114b8 <__swsetup_r+0xac>)
8011410: 4605 mov r5, r0
8011412: 6818 ldr r0, [r3, #0]
8011414: 460c mov r4, r1
8011416: b118 cbz r0, 8011420 <__swsetup_r+0x14>
8011418: 6b83 ldr r3, [r0, #56] ; 0x38
801141a: b90b cbnz r3, 8011420 <__swsetup_r+0x14>
801141c: f000 ffc2 bl 80123a4 <__sinit>
8011420: 89a3 ldrh r3, [r4, #12]
8011422: f9b4 200c ldrsh.w r2, [r4, #12]
8011426: 0718 lsls r0, r3, #28
8011428: d422 bmi.n 8011470 <__swsetup_r+0x64>
801142a: 06d9 lsls r1, r3, #27
801142c: d407 bmi.n 801143e <__swsetup_r+0x32>
801142e: 2309 movs r3, #9
8011430: 602b str r3, [r5, #0]
8011432: f042 0340 orr.w r3, r2, #64 ; 0x40
8011436: 81a3 strh r3, [r4, #12]
8011438: f04f 30ff mov.w r0, #4294967295
801143c: e034 b.n 80114a8 <__swsetup_r+0x9c>
801143e: 0758 lsls r0, r3, #29
8011440: d512 bpl.n 8011468 <__swsetup_r+0x5c>
8011442: 6b21 ldr r1, [r4, #48] ; 0x30
8011444: b141 cbz r1, 8011458 <__swsetup_r+0x4c>
8011446: f104 0340 add.w r3, r4, #64 ; 0x40
801144a: 4299 cmp r1, r3
801144c: d002 beq.n 8011454 <__swsetup_r+0x48>
801144e: 4628 mov r0, r5
8011450: f001 f838 bl 80124c4 <_free_r>
8011454: 2300 movs r3, #0
8011456: 6323 str r3, [r4, #48] ; 0x30
8011458: 89a3 ldrh r3, [r4, #12]
801145a: f023 0324 bic.w r3, r3, #36 ; 0x24
801145e: 81a3 strh r3, [r4, #12]
8011460: 2300 movs r3, #0
8011462: 6063 str r3, [r4, #4]
8011464: 6923 ldr r3, [r4, #16]
8011466: 6023 str r3, [r4, #0]
8011468: 89a3 ldrh r3, [r4, #12]
801146a: f043 0308 orr.w r3, r3, #8
801146e: 81a3 strh r3, [r4, #12]
8011470: 6923 ldr r3, [r4, #16]
8011472: b94b cbnz r3, 8011488 <__swsetup_r+0x7c>
8011474: 89a3 ldrh r3, [r4, #12]
8011476: f403 7320 and.w r3, r3, #640 ; 0x280
801147a: f5b3 7f00 cmp.w r3, #512 ; 0x200
801147e: d003 beq.n 8011488 <__swsetup_r+0x7c>
8011480: 4621 mov r1, r4
8011482: 4628 mov r0, r5
8011484: f001 f932 bl 80126ec <__smakebuf_r>
8011488: 89a0 ldrh r0, [r4, #12]
801148a: f9b4 200c ldrsh.w r2, [r4, #12]
801148e: f010 0301 ands.w r3, r0, #1
8011492: d00a beq.n 80114aa <__swsetup_r+0x9e>
8011494: 2300 movs r3, #0
8011496: 60a3 str r3, [r4, #8]
8011498: 6963 ldr r3, [r4, #20]
801149a: 425b negs r3, r3
801149c: 61a3 str r3, [r4, #24]
801149e: 6923 ldr r3, [r4, #16]
80114a0: b943 cbnz r3, 80114b4 <__swsetup_r+0xa8>
80114a2: f010 0080 ands.w r0, r0, #128 ; 0x80
80114a6: d1c4 bne.n 8011432 <__swsetup_r+0x26>
80114a8: bd38 pop {r3, r4, r5, pc}
80114aa: 0781 lsls r1, r0, #30
80114ac: bf58 it pl
80114ae: 6963 ldrpl r3, [r4, #20]
80114b0: 60a3 str r3, [r4, #8]
80114b2: e7f4 b.n 801149e <__swsetup_r+0x92>
80114b4: 2000 movs r0, #0
80114b6: e7f7 b.n 80114a8 <__swsetup_r+0x9c>
80114b8: 20000030 .word 0x20000030
080114bc <register_fini>:
80114bc: 4b02 ldr r3, [pc, #8] ; (80114c8 <register_fini+0xc>)
80114be: b113 cbz r3, 80114c6 <register_fini+0xa>
80114c0: 4802 ldr r0, [pc, #8] ; (80114cc <register_fini+0x10>)
80114c2: f000 b805 b.w 80114d0 <atexit>
80114c6: 4770 bx lr
80114c8: 00000000 .word 0x00000000
80114cc: 080123f5 .word 0x080123f5
080114d0 <atexit>:
80114d0: 2300 movs r3, #0
80114d2: 4601 mov r1, r0
80114d4: 461a mov r2, r3
80114d6: 4618 mov r0, r3
80114d8: f002 bc8c b.w 8013df4 <__register_exitproc>
080114dc <quorem>:
80114dc: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
80114e0: 6903 ldr r3, [r0, #16]
80114e2: 690c ldr r4, [r1, #16]
80114e4: 42a3 cmp r3, r4
80114e6: 4607 mov r7, r0
80114e8: f2c0 8081 blt.w 80115ee <quorem+0x112>
80114ec: 3c01 subs r4, #1
80114ee: f101 0814 add.w r8, r1, #20
80114f2: f100 0514 add.w r5, r0, #20
80114f6: eb05 0384 add.w r3, r5, r4, lsl #2
80114fa: 9301 str r3, [sp, #4]
80114fc: f858 3024 ldr.w r3, [r8, r4, lsl #2]
8011500: f855 2024 ldr.w r2, [r5, r4, lsl #2]
8011504: 3301 adds r3, #1
8011506: 429a cmp r2, r3
8011508: ea4f 0b84 mov.w fp, r4, lsl #2
801150c: eb08 0984 add.w r9, r8, r4, lsl #2
8011510: fbb2 f6f3 udiv r6, r2, r3
8011514: d331 bcc.n 801157a <quorem+0x9e>
8011516: f04f 0e00 mov.w lr, #0
801151a: 4640 mov r0, r8
801151c: 46ac mov ip, r5
801151e: 46f2 mov sl, lr
8011520: f850 2b04 ldr.w r2, [r0], #4
8011524: b293 uxth r3, r2
8011526: fb06 e303 mla r3, r6, r3, lr
801152a: ea4f 4e13 mov.w lr, r3, lsr #16
801152e: b29b uxth r3, r3
8011530: ebaa 0303 sub.w r3, sl, r3
8011534: f8dc a000 ldr.w sl, [ip]
8011538: 0c12 lsrs r2, r2, #16
801153a: fa13 f38a uxtah r3, r3, sl
801153e: fb06 e202 mla r2, r6, r2, lr
8011542: 9300 str r3, [sp, #0]
8011544: 9b00 ldr r3, [sp, #0]
8011546: ea4f 4e12 mov.w lr, r2, lsr #16
801154a: b292 uxth r2, r2
801154c: ebc2 421a rsb r2, r2, sl, lsr #16
8011550: eb02 4223 add.w r2, r2, r3, asr #16
8011554: f8bd 3000 ldrh.w r3, [sp]
8011558: 4581 cmp r9, r0
801155a: ea43 4302 orr.w r3, r3, r2, lsl #16
801155e: f84c 3b04 str.w r3, [ip], #4
8011562: ea4f 4a22 mov.w sl, r2, asr #16
8011566: d2db bcs.n 8011520 <quorem+0x44>
8011568: f855 300b ldr.w r3, [r5, fp]
801156c: b92b cbnz r3, 801157a <quorem+0x9e>
801156e: 9b01 ldr r3, [sp, #4]
8011570: 3b04 subs r3, #4
8011572: 429d cmp r5, r3
8011574: 461a mov r2, r3
8011576: d32e bcc.n 80115d6 <quorem+0xfa>
8011578: 613c str r4, [r7, #16]
801157a: 4638 mov r0, r7
801157c: f001 fd72 bl 8013064 <__mcmp>
8011580: 2800 cmp r0, #0
8011582: db24 blt.n 80115ce <quorem+0xf2>
8011584: 3601 adds r6, #1
8011586: 4628 mov r0, r5
8011588: f04f 0c00 mov.w ip, #0
801158c: f858 2b04 ldr.w r2, [r8], #4
8011590: f8d0 e000 ldr.w lr, [r0]
8011594: b293 uxth r3, r2
8011596: ebac 0303 sub.w r3, ip, r3
801159a: 0c12 lsrs r2, r2, #16
801159c: fa13 f38e uxtah r3, r3, lr
80115a0: ebc2 421e rsb r2, r2, lr, lsr #16
80115a4: eb02 4223 add.w r2, r2, r3, asr #16
80115a8: b29b uxth r3, r3
80115aa: ea43 4302 orr.w r3, r3, r2, lsl #16
80115ae: 45c1 cmp r9, r8
80115b0: f840 3b04 str.w r3, [r0], #4
80115b4: ea4f 4c22 mov.w ip, r2, asr #16
80115b8: d2e8 bcs.n 801158c <quorem+0xb0>
80115ba: f855 2024 ldr.w r2, [r5, r4, lsl #2]
80115be: eb05 0384 add.w r3, r5, r4, lsl #2
80115c2: b922 cbnz r2, 80115ce <quorem+0xf2>
80115c4: 3b04 subs r3, #4
80115c6: 429d cmp r5, r3
80115c8: 461a mov r2, r3
80115ca: d30a bcc.n 80115e2 <quorem+0x106>
80115cc: 613c str r4, [r7, #16]
80115ce: 4630 mov r0, r6
80115d0: b003 add sp, #12
80115d2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
80115d6: 6812 ldr r2, [r2, #0]
80115d8: 3b04 subs r3, #4
80115da: 2a00 cmp r2, #0
80115dc: d1cc bne.n 8011578 <quorem+0x9c>
80115de: 3c01 subs r4, #1
80115e0: e7c7 b.n 8011572 <quorem+0x96>
80115e2: 6812 ldr r2, [r2, #0]
80115e4: 3b04 subs r3, #4
80115e6: 2a00 cmp r2, #0
80115e8: d1f0 bne.n 80115cc <quorem+0xf0>
80115ea: 3c01 subs r4, #1
80115ec: e7eb b.n 80115c6 <quorem+0xea>
80115ee: 2000 movs r0, #0
80115f0: e7ee b.n 80115d0 <quorem+0xf4>
80115f2: 0000 movs r0, r0
80115f4: 0000 movs r0, r0
...
080115f8 <_dtoa_r>:
80115f8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
80115fc: ed2d 8b04 vpush {d8-d9}
8011600: b093 sub sp, #76 ; 0x4c
8011602: ec57 6b10 vmov r6, r7, d0
8011606: 9106 str r1, [sp, #24]
8011608: 6c01 ldr r1, [r0, #64] ; 0x40
801160a: 9d20 ldr r5, [sp, #128] ; 0x80
801160c: 9209 str r2, [sp, #36] ; 0x24
801160e: ee10 aa10 vmov sl, s0
8011612: 4604 mov r4, r0
8011614: 930c str r3, [sp, #48] ; 0x30
8011616: 46bb mov fp, r7
8011618: b141 cbz r1, 801162c <_dtoa_r+0x34>
801161a: 6c42 ldr r2, [r0, #68] ; 0x44
801161c: 604a str r2, [r1, #4]
801161e: 2301 movs r3, #1
8011620: 4093 lsls r3, r2
8011622: 608b str r3, [r1, #8]
8011624: f001 fb0f bl 8012c46 <_Bfree>
8011628: 2300 movs r3, #0
801162a: 6423 str r3, [r4, #64] ; 0x40
801162c: 1e3b subs r3, r7, #0
801162e: bfaa itet ge
8011630: 2300 movge r3, #0
8011632: f023 4b00 biclt.w fp, r3, #2147483648 ; 0x80000000
8011636: 602b strge r3, [r5, #0]
8011638: 4ba3 ldr r3, [pc, #652] ; (80118c8 <_dtoa_r+0x2d0>)
801163a: bfbc itt lt
801163c: 2201 movlt r2, #1
801163e: 602a strlt r2, [r5, #0]
8011640: ea33 030b bics.w r3, r3, fp
8011644: d11b bne.n 801167e <_dtoa_r+0x86>
8011646: 9a0c ldr r2, [sp, #48] ; 0x30
8011648: f242 730f movw r3, #9999 ; 0x270f
801164c: 6013 str r3, [r2, #0]
801164e: f3cb 0313 ubfx r3, fp, #0, #20
8011652: 4333 orrs r3, r6
8011654: f000 8590 beq.w 8012178 <_dtoa_r+0xb80>
8011658: 9b21 ldr r3, [sp, #132] ; 0x84
801165a: b90b cbnz r3, 8011660 <_dtoa_r+0x68>
801165c: 4b9b ldr r3, [pc, #620] ; (80118cc <_dtoa_r+0x2d4>)
801165e: e022 b.n 80116a6 <_dtoa_r+0xae>
8011660: 4b9a ldr r3, [pc, #616] ; (80118cc <_dtoa_r+0x2d4>)
8011662: 9301 str r3, [sp, #4]
8011664: 3303 adds r3, #3
8011666: 9a21 ldr r2, [sp, #132] ; 0x84
8011668: 6013 str r3, [r2, #0]
801166a: 9801 ldr r0, [sp, #4]
801166c: b013 add sp, #76 ; 0x4c
801166e: ecbd 8b04 vpop {d8-d9}
8011672: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8011676: 4b96 ldr r3, [pc, #600] ; (80118d0 <_dtoa_r+0x2d8>)
8011678: 9301 str r3, [sp, #4]
801167a: 3308 adds r3, #8
801167c: e7f3 b.n 8011666 <_dtoa_r+0x6e>
801167e: 2200 movs r2, #0
8011680: 2300 movs r3, #0
8011682: 4650 mov r0, sl
8011684: 4659 mov r1, fp
8011686: f7ef fa2f bl 8000ae8 <__aeabi_dcmpeq>
801168a: ec4b ab19 vmov d9, sl, fp
801168e: 4680 mov r8, r0
8011690: b158 cbz r0, 80116aa <_dtoa_r+0xb2>
8011692: 9a0c ldr r2, [sp, #48] ; 0x30
8011694: 2301 movs r3, #1
8011696: 6013 str r3, [r2, #0]
8011698: 9b21 ldr r3, [sp, #132] ; 0x84
801169a: 2b00 cmp r3, #0
801169c: f000 8569 beq.w 8012172 <_dtoa_r+0xb7a>
80116a0: 488c ldr r0, [pc, #560] ; (80118d4 <_dtoa_r+0x2dc>)
80116a2: 6018 str r0, [r3, #0]
80116a4: 1e43 subs r3, r0, #1
80116a6: 9301 str r3, [sp, #4]
80116a8: e7df b.n 801166a <_dtoa_r+0x72>
80116aa: ec4b ab10 vmov d0, sl, fp
80116ae: aa10 add r2, sp, #64 ; 0x40
80116b0: a911 add r1, sp, #68 ; 0x44
80116b2: 4620 mov r0, r4
80116b4: f001 fd7c bl 80131b0 <__d2b>
80116b8: f3cb 550a ubfx r5, fp, #20, #11
80116bc: ee08 0a10 vmov s16, r0
80116c0: 2d00 cmp r5, #0
80116c2: f000 8082 beq.w 80117ca <_dtoa_r+0x1d2>
80116c6: ee19 3a90 vmov r3, s19
80116ca: f3c3 0313 ubfx r3, r3, #0, #20
80116ce: f043 577f orr.w r7, r3, #1069547520 ; 0x3fc00000
80116d2: 4656 mov r6, sl
80116d4: f447 1740 orr.w r7, r7, #3145728 ; 0x300000
80116d8: f2a5 35ff subw r5, r5, #1023 ; 0x3ff
80116dc: f8cd 8038 str.w r8, [sp, #56] ; 0x38
80116e0: 4b7d ldr r3, [pc, #500] ; (80118d8 <_dtoa_r+0x2e0>)
80116e2: 2200 movs r2, #0
80116e4: 4630 mov r0, r6
80116e6: 4639 mov r1, r7
80116e8: f7ee fdde bl 80002a8 <__aeabi_dsub>
80116ec: a370 add r3, pc, #448 ; (adr r3, 80118b0 <_dtoa_r+0x2b8>)
80116ee: e9d3 2300 ldrd r2, r3, [r3]
80116f2: f7ee ff91 bl 8000618 <__aeabi_dmul>
80116f6: a370 add r3, pc, #448 ; (adr r3, 80118b8 <_dtoa_r+0x2c0>)
80116f8: e9d3 2300 ldrd r2, r3, [r3]
80116fc: f7ee fdd6 bl 80002ac <__adddf3>
8011700: 4606 mov r6, r0
8011702: 4628 mov r0, r5
8011704: 460f mov r7, r1
8011706: f7ee ff1d bl 8000544 <__aeabi_i2d>
801170a: a36d add r3, pc, #436 ; (adr r3, 80118c0 <_dtoa_r+0x2c8>)
801170c: e9d3 2300 ldrd r2, r3, [r3]
8011710: f7ee ff82 bl 8000618 <__aeabi_dmul>
8011714: 4602 mov r2, r0
8011716: 460b mov r3, r1
8011718: 4630 mov r0, r6
801171a: 4639 mov r1, r7
801171c: f7ee fdc6 bl 80002ac <__adddf3>
8011720: 4606 mov r6, r0
8011722: 460f mov r7, r1
8011724: f7ef fa28 bl 8000b78 <__aeabi_d2iz>
8011728: 2200 movs r2, #0
801172a: 9000 str r0, [sp, #0]
801172c: 2300 movs r3, #0
801172e: 4630 mov r0, r6
8011730: 4639 mov r1, r7
8011732: f7ef f9e3 bl 8000afc <__aeabi_dcmplt>
8011736: b150 cbz r0, 801174e <_dtoa_r+0x156>
8011738: 9800 ldr r0, [sp, #0]
801173a: f7ee ff03 bl 8000544 <__aeabi_i2d>
801173e: 4632 mov r2, r6
8011740: 463b mov r3, r7
8011742: f7ef f9d1 bl 8000ae8 <__aeabi_dcmpeq>
8011746: b910 cbnz r0, 801174e <_dtoa_r+0x156>
8011748: 9b00 ldr r3, [sp, #0]
801174a: 3b01 subs r3, #1
801174c: 9300 str r3, [sp, #0]
801174e: 9b00 ldr r3, [sp, #0]
8011750: 2b16 cmp r3, #22
8011752: d858 bhi.n 8011806 <_dtoa_r+0x20e>
8011754: 9a00 ldr r2, [sp, #0]
8011756: 4b61 ldr r3, [pc, #388] ; (80118dc <_dtoa_r+0x2e4>)
8011758: eb03 03c2 add.w r3, r3, r2, lsl #3
801175c: e9d3 2300 ldrd r2, r3, [r3]
8011760: ec51 0b19 vmov r0, r1, d9
8011764: f7ef f9ca bl 8000afc <__aeabi_dcmplt>
8011768: 2800 cmp r0, #0
801176a: d04e beq.n 801180a <_dtoa_r+0x212>
801176c: 9b00 ldr r3, [sp, #0]
801176e: 3b01 subs r3, #1
8011770: 9300 str r3, [sp, #0]
8011772: 2300 movs r3, #0
8011774: 930b str r3, [sp, #44] ; 0x2c
8011776: 9b10 ldr r3, [sp, #64] ; 0x40
8011778: 1b5d subs r5, r3, r5
801177a: 1e6b subs r3, r5, #1
801177c: 9305 str r3, [sp, #20]
801177e: bf45 ittet mi
8011780: f1c5 0301 rsbmi r3, r5, #1
8011784: 9304 strmi r3, [sp, #16]
8011786: 2300 movpl r3, #0
8011788: 2300 movmi r3, #0
801178a: bf4c ite mi
801178c: 9305 strmi r3, [sp, #20]
801178e: 9304 strpl r3, [sp, #16]
8011790: 9b00 ldr r3, [sp, #0]
8011792: 2b00 cmp r3, #0
8011794: db3b blt.n 801180e <_dtoa_r+0x216>
8011796: 9b05 ldr r3, [sp, #20]
8011798: 9a00 ldr r2, [sp, #0]
801179a: 920a str r2, [sp, #40] ; 0x28
801179c: 4413 add r3, r2
801179e: 9305 str r3, [sp, #20]
80117a0: 2300 movs r3, #0
80117a2: 9307 str r3, [sp, #28]
80117a4: 9b06 ldr r3, [sp, #24]
80117a6: 2b09 cmp r3, #9
80117a8: d869 bhi.n 801187e <_dtoa_r+0x286>
80117aa: 2b05 cmp r3, #5
80117ac: bfc4 itt gt
80117ae: 3b04 subgt r3, #4
80117b0: 9306 strgt r3, [sp, #24]
80117b2: 9b06 ldr r3, [sp, #24]
80117b4: f1a3 0302 sub.w r3, r3, #2
80117b8: bfcc ite gt
80117ba: 2500 movgt r5, #0
80117bc: 2501 movle r5, #1
80117be: 2b03 cmp r3, #3
80117c0: d868 bhi.n 8011894 <_dtoa_r+0x29c>
80117c2: e8df f003 tbb [pc, r3]
80117c6: 3a2d .short 0x3a2d
80117c8: 5a38 .short 0x5a38
80117ca: e9dd 5310 ldrd r5, r3, [sp, #64] ; 0x40
80117ce: 441d add r5, r3
80117d0: f205 4332 addw r3, r5, #1074 ; 0x432
80117d4: 2b20 cmp r3, #32
80117d6: bfc1 itttt gt
80117d8: f1c3 0340 rsbgt r3, r3, #64 ; 0x40
80117dc: f205 4012 addwgt r0, r5, #1042 ; 0x412
80117e0: fa0b f303 lslgt.w r3, fp, r3
80117e4: fa26 f000 lsrgt.w r0, r6, r0
80117e8: bfda itte le
80117ea: f1c3 0320 rsble r3, r3, #32
80117ee: fa06 f003 lslle.w r0, r6, r3
80117f2: 4318 orrgt r0, r3
80117f4: f7ee fe96 bl 8000524 <__aeabi_ui2d>
80117f8: 2301 movs r3, #1
80117fa: 4606 mov r6, r0
80117fc: f1a1 77f8 sub.w r7, r1, #32505856 ; 0x1f00000
8011800: 3d01 subs r5, #1
8011802: 930e str r3, [sp, #56] ; 0x38
8011804: e76c b.n 80116e0 <_dtoa_r+0xe8>
8011806: 2301 movs r3, #1
8011808: e7b4 b.n 8011774 <_dtoa_r+0x17c>
801180a: 900b str r0, [sp, #44] ; 0x2c
801180c: e7b3 b.n 8011776 <_dtoa_r+0x17e>
801180e: 9b04 ldr r3, [sp, #16]
8011810: 9a00 ldr r2, [sp, #0]
8011812: 1a9b subs r3, r3, r2
8011814: 9304 str r3, [sp, #16]
8011816: 4253 negs r3, r2
8011818: 9307 str r3, [sp, #28]
801181a: 2300 movs r3, #0
801181c: 930a str r3, [sp, #40] ; 0x28
801181e: e7c1 b.n 80117a4 <_dtoa_r+0x1ac>
8011820: 2300 movs r3, #0
8011822: 9308 str r3, [sp, #32]
8011824: 9b09 ldr r3, [sp, #36] ; 0x24
8011826: 2b00 cmp r3, #0
8011828: dc37 bgt.n 801189a <_dtoa_r+0x2a2>
801182a: 2301 movs r3, #1
801182c: e9cd 3302 strd r3, r3, [sp, #8]
8011830: 461a mov r2, r3
8011832: 9209 str r2, [sp, #36] ; 0x24
8011834: e00c b.n 8011850 <_dtoa_r+0x258>
8011836: 2301 movs r3, #1
8011838: e7f3 b.n 8011822 <_dtoa_r+0x22a>
801183a: 2300 movs r3, #0
801183c: 9a09 ldr r2, [sp, #36] ; 0x24
801183e: 9308 str r3, [sp, #32]
8011840: 9b00 ldr r3, [sp, #0]
8011842: 4413 add r3, r2
8011844: 9302 str r3, [sp, #8]
8011846: 3301 adds r3, #1
8011848: 2b01 cmp r3, #1
801184a: 9303 str r3, [sp, #12]
801184c: bfb8 it lt
801184e: 2301 movlt r3, #1
8011850: 2200 movs r2, #0
8011852: 6462 str r2, [r4, #68] ; 0x44
8011854: 2204 movs r2, #4
8011856: f102 0014 add.w r0, r2, #20
801185a: 4298 cmp r0, r3
801185c: 6c61 ldr r1, [r4, #68] ; 0x44
801185e: d920 bls.n 80118a2 <_dtoa_r+0x2aa>
8011860: 4620 mov r0, r4
8011862: f001 f9cb bl 8012bfc <_Balloc>
8011866: 9001 str r0, [sp, #4]
8011868: 2800 cmp r0, #0
801186a: d13d bne.n 80118e8 <_dtoa_r+0x2f0>
801186c: 4b1c ldr r3, [pc, #112] ; (80118e0 <_dtoa_r+0x2e8>)
801186e: 4602 mov r2, r0
8011870: f44f 71d5 mov.w r1, #426 ; 0x1aa
8011874: 481b ldr r0, [pc, #108] ; (80118e4 <_dtoa_r+0x2ec>)
8011876: f002 faff bl 8013e78 <__assert_func>
801187a: 2301 movs r3, #1
801187c: e7de b.n 801183c <_dtoa_r+0x244>
801187e: 2501 movs r5, #1
8011880: 2300 movs r3, #0
8011882: 9306 str r3, [sp, #24]
8011884: 9508 str r5, [sp, #32]
8011886: f04f 33ff mov.w r3, #4294967295
801188a: e9cd 3302 strd r3, r3, [sp, #8]
801188e: 2200 movs r2, #0
8011890: 2312 movs r3, #18
8011892: e7ce b.n 8011832 <_dtoa_r+0x23a>
8011894: 2301 movs r3, #1
8011896: 9308 str r3, [sp, #32]
8011898: e7f5 b.n 8011886 <_dtoa_r+0x28e>
801189a: 9b09 ldr r3, [sp, #36] ; 0x24
801189c: e9cd 3302 strd r3, r3, [sp, #8]
80118a0: e7d6 b.n 8011850 <_dtoa_r+0x258>
80118a2: 3101 adds r1, #1
80118a4: 6461 str r1, [r4, #68] ; 0x44
80118a6: 0052 lsls r2, r2, #1
80118a8: e7d5 b.n 8011856 <_dtoa_r+0x25e>
80118aa: bf00 nop
80118ac: f3af 8000 nop.w
80118b0: 636f4361 .word 0x636f4361
80118b4: 3fd287a7 .word 0x3fd287a7
80118b8: 8b60c8b3 .word 0x8b60c8b3
80118bc: 3fc68a28 .word 0x3fc68a28
80118c0: 509f79fb .word 0x509f79fb
80118c4: 3fd34413 .word 0x3fd34413
80118c8: 7ff00000 .word 0x7ff00000
80118cc: 08017a34 .word 0x08017a34
80118d0: 08017a38 .word 0x08017a38
80118d4: 08017a13 .word 0x08017a13
80118d8: 3ff80000 .word 0x3ff80000
80118dc: 08017b38 .word 0x08017b38
80118e0: 08017a41 .word 0x08017a41
80118e4: 08017a52 .word 0x08017a52
80118e8: 9b01 ldr r3, [sp, #4]
80118ea: 6423 str r3, [r4, #64] ; 0x40
80118ec: 9b03 ldr r3, [sp, #12]
80118ee: 2b0e cmp r3, #14
80118f0: f200 809d bhi.w 8011a2e <_dtoa_r+0x436>
80118f4: 2d00 cmp r5, #0
80118f6: f000 809a beq.w 8011a2e <_dtoa_r+0x436>
80118fa: 9b00 ldr r3, [sp, #0]
80118fc: 2b00 cmp r3, #0
80118fe: dd32 ble.n 8011966 <_dtoa_r+0x36e>
8011900: 4ab7 ldr r2, [pc, #732] ; (8011be0 <_dtoa_r+0x5e8>)
8011902: f003 030f and.w r3, r3, #15
8011906: eb02 03c3 add.w r3, r2, r3, lsl #3
801190a: e9d3 8900 ldrd r8, r9, [r3]
801190e: 9b00 ldr r3, [sp, #0]
8011910: 05d8 lsls r0, r3, #23
8011912: ea4f 1723 mov.w r7, r3, asr #4
8011916: d516 bpl.n 8011946 <_dtoa_r+0x34e>
8011918: 4bb2 ldr r3, [pc, #712] ; (8011be4 <_dtoa_r+0x5ec>)
801191a: ec51 0b19 vmov r0, r1, d9
801191e: e9d3 2308 ldrd r2, r3, [r3, #32]
8011922: f7ee ffa3 bl 800086c <__aeabi_ddiv>
8011926: f007 070f and.w r7, r7, #15
801192a: 4682 mov sl, r0
801192c: 468b mov fp, r1
801192e: 2503 movs r5, #3
8011930: 4eac ldr r6, [pc, #688] ; (8011be4 <_dtoa_r+0x5ec>)
8011932: b957 cbnz r7, 801194a <_dtoa_r+0x352>
8011934: 4642 mov r2, r8
8011936: 464b mov r3, r9
8011938: 4650 mov r0, sl
801193a: 4659 mov r1, fp
801193c: f7ee ff96 bl 800086c <__aeabi_ddiv>
8011940: 4682 mov sl, r0
8011942: 468b mov fp, r1
8011944: e028 b.n 8011998 <_dtoa_r+0x3a0>
8011946: 2502 movs r5, #2
8011948: e7f2 b.n 8011930 <_dtoa_r+0x338>
801194a: 07f9 lsls r1, r7, #31
801194c: d508 bpl.n 8011960 <_dtoa_r+0x368>
801194e: 4640 mov r0, r8
8011950: 4649 mov r1, r9
8011952: e9d6 2300 ldrd r2, r3, [r6]
8011956: f7ee fe5f bl 8000618 <__aeabi_dmul>
801195a: 3501 adds r5, #1
801195c: 4680 mov r8, r0
801195e: 4689 mov r9, r1
8011960: 107f asrs r7, r7, #1
8011962: 3608 adds r6, #8
8011964: e7e5 b.n 8011932 <_dtoa_r+0x33a>
8011966: f000 809b beq.w 8011aa0 <_dtoa_r+0x4a8>
801196a: 9b00 ldr r3, [sp, #0]
801196c: 4f9d ldr r7, [pc, #628] ; (8011be4 <_dtoa_r+0x5ec>)
801196e: 425e negs r6, r3
8011970: 4b9b ldr r3, [pc, #620] ; (8011be0 <_dtoa_r+0x5e8>)
8011972: f006 020f and.w r2, r6, #15
8011976: eb03 03c2 add.w r3, r3, r2, lsl #3
801197a: e9d3 2300 ldrd r2, r3, [r3]
801197e: ec51 0b19 vmov r0, r1, d9
8011982: f7ee fe49 bl 8000618 <__aeabi_dmul>
8011986: 1136 asrs r6, r6, #4
8011988: 4682 mov sl, r0
801198a: 468b mov fp, r1
801198c: 2300 movs r3, #0
801198e: 2502 movs r5, #2
8011990: 2e00 cmp r6, #0
8011992: d17a bne.n 8011a8a <_dtoa_r+0x492>
8011994: 2b00 cmp r3, #0
8011996: d1d3 bne.n 8011940 <_dtoa_r+0x348>
8011998: 9b0b ldr r3, [sp, #44] ; 0x2c
801199a: 2b00 cmp r3, #0
801199c: f000 8082 beq.w 8011aa4 <_dtoa_r+0x4ac>
80119a0: 4b91 ldr r3, [pc, #580] ; (8011be8 <_dtoa_r+0x5f0>)
80119a2: 2200 movs r2, #0
80119a4: 4650 mov r0, sl
80119a6: 4659 mov r1, fp
80119a8: f7ef f8a8 bl 8000afc <__aeabi_dcmplt>
80119ac: 2800 cmp r0, #0
80119ae: d079 beq.n 8011aa4 <_dtoa_r+0x4ac>
80119b0: 9b03 ldr r3, [sp, #12]
80119b2: 2b00 cmp r3, #0
80119b4: d076 beq.n 8011aa4 <_dtoa_r+0x4ac>
80119b6: 9b02 ldr r3, [sp, #8]
80119b8: 2b00 cmp r3, #0
80119ba: dd36 ble.n 8011a2a <_dtoa_r+0x432>
80119bc: 9b00 ldr r3, [sp, #0]
80119be: 4650 mov r0, sl
80119c0: 4659 mov r1, fp
80119c2: 1e5f subs r7, r3, #1
80119c4: 2200 movs r2, #0
80119c6: 4b89 ldr r3, [pc, #548] ; (8011bec <_dtoa_r+0x5f4>)
80119c8: f7ee fe26 bl 8000618 <__aeabi_dmul>
80119cc: 9e02 ldr r6, [sp, #8]
80119ce: 4682 mov sl, r0
80119d0: 468b mov fp, r1
80119d2: 3501 adds r5, #1
80119d4: 4628 mov r0, r5
80119d6: f7ee fdb5 bl 8000544 <__aeabi_i2d>
80119da: 4652 mov r2, sl
80119dc: 465b mov r3, fp
80119de: f7ee fe1b bl 8000618 <__aeabi_dmul>
80119e2: 4b83 ldr r3, [pc, #524] ; (8011bf0 <_dtoa_r+0x5f8>)
80119e4: 2200 movs r2, #0
80119e6: f7ee fc61 bl 80002ac <__adddf3>
80119ea: 46d0 mov r8, sl
80119ec: 46d9 mov r9, fp
80119ee: 4682 mov sl, r0
80119f0: f1a1 7b50 sub.w fp, r1, #54525952 ; 0x3400000
80119f4: 2e00 cmp r6, #0
80119f6: d158 bne.n 8011aaa <_dtoa_r+0x4b2>
80119f8: 4b7e ldr r3, [pc, #504] ; (8011bf4 <_dtoa_r+0x5fc>)
80119fa: 2200 movs r2, #0
80119fc: 4640 mov r0, r8
80119fe: 4649 mov r1, r9
8011a00: f7ee fc52 bl 80002a8 <__aeabi_dsub>
8011a04: 4652 mov r2, sl
8011a06: 465b mov r3, fp
8011a08: 4680 mov r8, r0
8011a0a: 4689 mov r9, r1
8011a0c: f7ef f894 bl 8000b38 <__aeabi_dcmpgt>
8011a10: 2800 cmp r0, #0
8011a12: f040 8296 bne.w 8011f42 <_dtoa_r+0x94a>
8011a16: 4652 mov r2, sl
8011a18: f10b 4300 add.w r3, fp, #2147483648 ; 0x80000000
8011a1c: 4640 mov r0, r8
8011a1e: 4649 mov r1, r9
8011a20: f7ef f86c bl 8000afc <__aeabi_dcmplt>
8011a24: 2800 cmp r0, #0
8011a26: f040 828a bne.w 8011f3e <_dtoa_r+0x946>
8011a2a: ec5b ab19 vmov sl, fp, d9
8011a2e: 9b11 ldr r3, [sp, #68] ; 0x44
8011a30: 2b00 cmp r3, #0
8011a32: f2c0 8149 blt.w 8011cc8 <_dtoa_r+0x6d0>
8011a36: 9a00 ldr r2, [sp, #0]
8011a38: 2a0e cmp r2, #14
8011a3a: f300 8145 bgt.w 8011cc8 <_dtoa_r+0x6d0>
8011a3e: 4b68 ldr r3, [pc, #416] ; (8011be0 <_dtoa_r+0x5e8>)
8011a40: eb03 03c2 add.w r3, r3, r2, lsl #3
8011a44: e9d3 8900 ldrd r8, r9, [r3]
8011a48: 9b09 ldr r3, [sp, #36] ; 0x24
8011a4a: 2b00 cmp r3, #0
8011a4c: f280 80d6 bge.w 8011bfc <_dtoa_r+0x604>
8011a50: 9b03 ldr r3, [sp, #12]
8011a52: 2b00 cmp r3, #0
8011a54: f300 80d2 bgt.w 8011bfc <_dtoa_r+0x604>
8011a58: f040 8270 bne.w 8011f3c <_dtoa_r+0x944>
8011a5c: 4b65 ldr r3, [pc, #404] ; (8011bf4 <_dtoa_r+0x5fc>)
8011a5e: 2200 movs r2, #0
8011a60: 4640 mov r0, r8
8011a62: 4649 mov r1, r9
8011a64: f7ee fdd8 bl 8000618 <__aeabi_dmul>
8011a68: 4652 mov r2, sl
8011a6a: 465b mov r3, fp
8011a6c: f7ef f85a bl 8000b24 <__aeabi_dcmpge>
8011a70: 9e03 ldr r6, [sp, #12]
8011a72: 4637 mov r7, r6
8011a74: 2800 cmp r0, #0
8011a76: f040 8246 bne.w 8011f06 <_dtoa_r+0x90e>
8011a7a: 9d01 ldr r5, [sp, #4]
8011a7c: 2331 movs r3, #49 ; 0x31
8011a7e: f805 3b01 strb.w r3, [r5], #1
8011a82: 9b00 ldr r3, [sp, #0]
8011a84: 3301 adds r3, #1
8011a86: 9300 str r3, [sp, #0]
8011a88: e241 b.n 8011f0e <_dtoa_r+0x916>
8011a8a: 07f2 lsls r2, r6, #31
8011a8c: d505 bpl.n 8011a9a <_dtoa_r+0x4a2>
8011a8e: e9d7 2300 ldrd r2, r3, [r7]
8011a92: f7ee fdc1 bl 8000618 <__aeabi_dmul>
8011a96: 3501 adds r5, #1
8011a98: 2301 movs r3, #1
8011a9a: 1076 asrs r6, r6, #1
8011a9c: 3708 adds r7, #8
8011a9e: e777 b.n 8011990 <_dtoa_r+0x398>
8011aa0: 2502 movs r5, #2
8011aa2: e779 b.n 8011998 <_dtoa_r+0x3a0>
8011aa4: 9f00 ldr r7, [sp, #0]
8011aa6: 9e03 ldr r6, [sp, #12]
8011aa8: e794 b.n 80119d4 <_dtoa_r+0x3dc>
8011aaa: 9901 ldr r1, [sp, #4]
8011aac: 4b4c ldr r3, [pc, #304] ; (8011be0 <_dtoa_r+0x5e8>)
8011aae: 4431 add r1, r6
8011ab0: 910d str r1, [sp, #52] ; 0x34
8011ab2: 9908 ldr r1, [sp, #32]
8011ab4: eb03 03c6 add.w r3, r3, r6, lsl #3
8011ab8: e953 2302 ldrd r2, r3, [r3, #-8]
8011abc: 2900 cmp r1, #0
8011abe: d043 beq.n 8011b48 <_dtoa_r+0x550>
8011ac0: 494d ldr r1, [pc, #308] ; (8011bf8 <_dtoa_r+0x600>)
8011ac2: 2000 movs r0, #0
8011ac4: f7ee fed2 bl 800086c <__aeabi_ddiv>
8011ac8: 4652 mov r2, sl
8011aca: 465b mov r3, fp
8011acc: f7ee fbec bl 80002a8 <__aeabi_dsub>
8011ad0: 9d01 ldr r5, [sp, #4]
8011ad2: 4682 mov sl, r0
8011ad4: 468b mov fp, r1
8011ad6: 4649 mov r1, r9
8011ad8: 4640 mov r0, r8
8011ada: f7ef f84d bl 8000b78 <__aeabi_d2iz>
8011ade: 4606 mov r6, r0
8011ae0: f7ee fd30 bl 8000544 <__aeabi_i2d>
8011ae4: 4602 mov r2, r0
8011ae6: 460b mov r3, r1
8011ae8: 4640 mov r0, r8
8011aea: 4649 mov r1, r9
8011aec: f7ee fbdc bl 80002a8 <__aeabi_dsub>
8011af0: 3630 adds r6, #48 ; 0x30
8011af2: f805 6b01 strb.w r6, [r5], #1
8011af6: 4652 mov r2, sl
8011af8: 465b mov r3, fp
8011afa: 4680 mov r8, r0
8011afc: 4689 mov r9, r1
8011afe: f7ee fffd bl 8000afc <__aeabi_dcmplt>
8011b02: 2800 cmp r0, #0
8011b04: d163 bne.n 8011bce <_dtoa_r+0x5d6>
8011b06: 4642 mov r2, r8
8011b08: 464b mov r3, r9
8011b0a: 4937 ldr r1, [pc, #220] ; (8011be8 <_dtoa_r+0x5f0>)
8011b0c: 2000 movs r0, #0
8011b0e: f7ee fbcb bl 80002a8 <__aeabi_dsub>
8011b12: 4652 mov r2, sl
8011b14: 465b mov r3, fp
8011b16: f7ee fff1 bl 8000afc <__aeabi_dcmplt>
8011b1a: 2800 cmp r0, #0
8011b1c: f040 80b6 bne.w 8011c8c <_dtoa_r+0x694>
8011b20: 9b0d ldr r3, [sp, #52] ; 0x34
8011b22: 429d cmp r5, r3
8011b24: d081 beq.n 8011a2a <_dtoa_r+0x432>
8011b26: 4b31 ldr r3, [pc, #196] ; (8011bec <_dtoa_r+0x5f4>)
8011b28: 2200 movs r2, #0
8011b2a: 4650 mov r0, sl
8011b2c: 4659 mov r1, fp
8011b2e: f7ee fd73 bl 8000618 <__aeabi_dmul>
8011b32: 4b2e ldr r3, [pc, #184] ; (8011bec <_dtoa_r+0x5f4>)
8011b34: 4682 mov sl, r0
8011b36: 468b mov fp, r1
8011b38: 4640 mov r0, r8
8011b3a: 4649 mov r1, r9
8011b3c: 2200 movs r2, #0
8011b3e: f7ee fd6b bl 8000618 <__aeabi_dmul>
8011b42: 4680 mov r8, r0
8011b44: 4689 mov r9, r1
8011b46: e7c6 b.n 8011ad6 <_dtoa_r+0x4de>
8011b48: 4650 mov r0, sl
8011b4a: 4659 mov r1, fp
8011b4c: f7ee fd64 bl 8000618 <__aeabi_dmul>
8011b50: 9b0d ldr r3, [sp, #52] ; 0x34
8011b52: 9d01 ldr r5, [sp, #4]
8011b54: 930f str r3, [sp, #60] ; 0x3c
8011b56: 4682 mov sl, r0
8011b58: 468b mov fp, r1
8011b5a: 4649 mov r1, r9
8011b5c: 4640 mov r0, r8
8011b5e: f7ef f80b bl 8000b78 <__aeabi_d2iz>
8011b62: 4606 mov r6, r0
8011b64: f7ee fcee bl 8000544 <__aeabi_i2d>
8011b68: 3630 adds r6, #48 ; 0x30
8011b6a: 4602 mov r2, r0
8011b6c: 460b mov r3, r1
8011b6e: 4640 mov r0, r8
8011b70: 4649 mov r1, r9
8011b72: f7ee fb99 bl 80002a8 <__aeabi_dsub>
8011b76: f805 6b01 strb.w r6, [r5], #1
8011b7a: 9b0d ldr r3, [sp, #52] ; 0x34
8011b7c: 429d cmp r5, r3
8011b7e: 4680 mov r8, r0
8011b80: 4689 mov r9, r1
8011b82: f04f 0200 mov.w r2, #0
8011b86: d124 bne.n 8011bd2 <_dtoa_r+0x5da>
8011b88: 4b1b ldr r3, [pc, #108] ; (8011bf8 <_dtoa_r+0x600>)
8011b8a: 4650 mov r0, sl
8011b8c: 4659 mov r1, fp
8011b8e: f7ee fb8d bl 80002ac <__adddf3>
8011b92: 4602 mov r2, r0
8011b94: 460b mov r3, r1
8011b96: 4640 mov r0, r8
8011b98: 4649 mov r1, r9
8011b9a: f7ee ffcd bl 8000b38 <__aeabi_dcmpgt>
8011b9e: 2800 cmp r0, #0
8011ba0: d174 bne.n 8011c8c <_dtoa_r+0x694>
8011ba2: 4652 mov r2, sl
8011ba4: 465b mov r3, fp
8011ba6: 4914 ldr r1, [pc, #80] ; (8011bf8 <_dtoa_r+0x600>)
8011ba8: 2000 movs r0, #0
8011baa: f7ee fb7d bl 80002a8 <__aeabi_dsub>
8011bae: 4602 mov r2, r0
8011bb0: 460b mov r3, r1
8011bb2: 4640 mov r0, r8
8011bb4: 4649 mov r1, r9
8011bb6: f7ee ffa1 bl 8000afc <__aeabi_dcmplt>
8011bba: 2800 cmp r0, #0
8011bbc: f43f af35 beq.w 8011a2a <_dtoa_r+0x432>
8011bc0: 9d0f ldr r5, [sp, #60] ; 0x3c
8011bc2: 1e6b subs r3, r5, #1
8011bc4: 930f str r3, [sp, #60] ; 0x3c
8011bc6: f815 3c01 ldrb.w r3, [r5, #-1]
8011bca: 2b30 cmp r3, #48 ; 0x30
8011bcc: d0f8 beq.n 8011bc0 <_dtoa_r+0x5c8>
8011bce: 9700 str r7, [sp, #0]
8011bd0: e04a b.n 8011c68 <_dtoa_r+0x670>
8011bd2: 4b06 ldr r3, [pc, #24] ; (8011bec <_dtoa_r+0x5f4>)
8011bd4: f7ee fd20 bl 8000618 <__aeabi_dmul>
8011bd8: 4680 mov r8, r0
8011bda: 4689 mov r9, r1
8011bdc: e7bd b.n 8011b5a <_dtoa_r+0x562>
8011bde: bf00 nop
8011be0: 08017b38 .word 0x08017b38
8011be4: 08017b10 .word 0x08017b10
8011be8: 3ff00000 .word 0x3ff00000
8011bec: 40240000 .word 0x40240000
8011bf0: 401c0000 .word 0x401c0000
8011bf4: 40140000 .word 0x40140000
8011bf8: 3fe00000 .word 0x3fe00000
8011bfc: 9d01 ldr r5, [sp, #4]
8011bfe: 4656 mov r6, sl
8011c00: 465f mov r7, fp
8011c02: 4642 mov r2, r8
8011c04: 464b mov r3, r9
8011c06: 4630 mov r0, r6
8011c08: 4639 mov r1, r7
8011c0a: f7ee fe2f bl 800086c <__aeabi_ddiv>
8011c0e: f7ee ffb3 bl 8000b78 <__aeabi_d2iz>
8011c12: 4682 mov sl, r0
8011c14: f7ee fc96 bl 8000544 <__aeabi_i2d>
8011c18: 4642 mov r2, r8
8011c1a: 464b mov r3, r9
8011c1c: f7ee fcfc bl 8000618 <__aeabi_dmul>
8011c20: 4602 mov r2, r0
8011c22: 460b mov r3, r1
8011c24: 4630 mov r0, r6
8011c26: 4639 mov r1, r7
8011c28: f10a 0630 add.w r6, sl, #48 ; 0x30
8011c2c: f7ee fb3c bl 80002a8 <__aeabi_dsub>
8011c30: f805 6b01 strb.w r6, [r5], #1
8011c34: 9e01 ldr r6, [sp, #4]
8011c36: 9f03 ldr r7, [sp, #12]
8011c38: 1bae subs r6, r5, r6
8011c3a: 42b7 cmp r7, r6
8011c3c: 4602 mov r2, r0
8011c3e: 460b mov r3, r1
8011c40: d135 bne.n 8011cae <_dtoa_r+0x6b6>
8011c42: f7ee fb33 bl 80002ac <__adddf3>
8011c46: 4642 mov r2, r8
8011c48: 464b mov r3, r9
8011c4a: 4606 mov r6, r0
8011c4c: 460f mov r7, r1
8011c4e: f7ee ff73 bl 8000b38 <__aeabi_dcmpgt>
8011c52: b9d0 cbnz r0, 8011c8a <_dtoa_r+0x692>
8011c54: 4642 mov r2, r8
8011c56: 464b mov r3, r9
8011c58: 4630 mov r0, r6
8011c5a: 4639 mov r1, r7
8011c5c: f7ee ff44 bl 8000ae8 <__aeabi_dcmpeq>
8011c60: b110 cbz r0, 8011c68 <_dtoa_r+0x670>
8011c62: f01a 0f01 tst.w sl, #1
8011c66: d110 bne.n 8011c8a <_dtoa_r+0x692>
8011c68: 4620 mov r0, r4
8011c6a: ee18 1a10 vmov r1, s16
8011c6e: f000 ffea bl 8012c46 <_Bfree>
8011c72: 2300 movs r3, #0
8011c74: 9800 ldr r0, [sp, #0]
8011c76: 702b strb r3, [r5, #0]
8011c78: 9b0c ldr r3, [sp, #48] ; 0x30
8011c7a: 3001 adds r0, #1
8011c7c: 6018 str r0, [r3, #0]
8011c7e: 9b21 ldr r3, [sp, #132] ; 0x84
8011c80: 2b00 cmp r3, #0
8011c82: f43f acf2 beq.w 801166a <_dtoa_r+0x72>
8011c86: 601d str r5, [r3, #0]
8011c88: e4ef b.n 801166a <_dtoa_r+0x72>
8011c8a: 9f00 ldr r7, [sp, #0]
8011c8c: 462b mov r3, r5
8011c8e: 461d mov r5, r3
8011c90: f813 2d01 ldrb.w r2, [r3, #-1]!
8011c94: 2a39 cmp r2, #57 ; 0x39
8011c96: d106 bne.n 8011ca6 <_dtoa_r+0x6ae>
8011c98: 9a01 ldr r2, [sp, #4]
8011c9a: 429a cmp r2, r3
8011c9c: d1f7 bne.n 8011c8e <_dtoa_r+0x696>
8011c9e: 9901 ldr r1, [sp, #4]
8011ca0: 2230 movs r2, #48 ; 0x30
8011ca2: 3701 adds r7, #1
8011ca4: 700a strb r2, [r1, #0]
8011ca6: 781a ldrb r2, [r3, #0]
8011ca8: 3201 adds r2, #1
8011caa: 701a strb r2, [r3, #0]
8011cac: e78f b.n 8011bce <_dtoa_r+0x5d6>
8011cae: 4ba6 ldr r3, [pc, #664] ; (8011f48 <_dtoa_r+0x950>)
8011cb0: 2200 movs r2, #0
8011cb2: f7ee fcb1 bl 8000618 <__aeabi_dmul>
8011cb6: 2200 movs r2, #0
8011cb8: 2300 movs r3, #0
8011cba: 4606 mov r6, r0
8011cbc: 460f mov r7, r1
8011cbe: f7ee ff13 bl 8000ae8 <__aeabi_dcmpeq>
8011cc2: 2800 cmp r0, #0
8011cc4: d09d beq.n 8011c02 <_dtoa_r+0x60a>
8011cc6: e7cf b.n 8011c68 <_dtoa_r+0x670>
8011cc8: 9a08 ldr r2, [sp, #32]
8011cca: 2a00 cmp r2, #0
8011ccc: f000 80d7 beq.w 8011e7e <_dtoa_r+0x886>
8011cd0: 9a06 ldr r2, [sp, #24]
8011cd2: 2a01 cmp r2, #1
8011cd4: f300 80ba bgt.w 8011e4c <_dtoa_r+0x854>
8011cd8: 9a0e ldr r2, [sp, #56] ; 0x38
8011cda: 2a00 cmp r2, #0
8011cdc: f000 80b2 beq.w 8011e44 <_dtoa_r+0x84c>
8011ce0: f203 4333 addw r3, r3, #1075 ; 0x433
8011ce4: 9e07 ldr r6, [sp, #28]
8011ce6: 9d04 ldr r5, [sp, #16]
8011ce8: 9a04 ldr r2, [sp, #16]
8011cea: 441a add r2, r3
8011cec: 9204 str r2, [sp, #16]
8011cee: 9a05 ldr r2, [sp, #20]
8011cf0: 2101 movs r1, #1
8011cf2: 441a add r2, r3
8011cf4: 4620 mov r0, r4
8011cf6: 9205 str r2, [sp, #20]
8011cf8: f001 f844 bl 8012d84 <__i2b>
8011cfc: 4607 mov r7, r0
8011cfe: 2d00 cmp r5, #0
8011d00: dd0c ble.n 8011d1c <_dtoa_r+0x724>
8011d02: 9b05 ldr r3, [sp, #20]
8011d04: 2b00 cmp r3, #0
8011d06: dd09 ble.n 8011d1c <_dtoa_r+0x724>
8011d08: 42ab cmp r3, r5
8011d0a: 9a04 ldr r2, [sp, #16]
8011d0c: bfa8 it ge
8011d0e: 462b movge r3, r5
8011d10: 1ad2 subs r2, r2, r3
8011d12: 9204 str r2, [sp, #16]
8011d14: 9a05 ldr r2, [sp, #20]
8011d16: 1aed subs r5, r5, r3
8011d18: 1ad3 subs r3, r2, r3
8011d1a: 9305 str r3, [sp, #20]
8011d1c: 9b07 ldr r3, [sp, #28]
8011d1e: b31b cbz r3, 8011d68 <_dtoa_r+0x770>
8011d20: 9b08 ldr r3, [sp, #32]
8011d22: 2b00 cmp r3, #0
8011d24: f000 80af beq.w 8011e86 <_dtoa_r+0x88e>
8011d28: 2e00 cmp r6, #0
8011d2a: dd13 ble.n 8011d54 <_dtoa_r+0x75c>
8011d2c: 4639 mov r1, r7
8011d2e: 4632 mov r2, r6
8011d30: 4620 mov r0, r4
8011d32: f001 f8e7 bl 8012f04 <__pow5mult>
8011d36: ee18 2a10 vmov r2, s16
8011d3a: 4601 mov r1, r0
8011d3c: 4607 mov r7, r0
8011d3e: 4620 mov r0, r4
8011d40: f001 f836 bl 8012db0 <__multiply>
8011d44: ee18 1a10 vmov r1, s16
8011d48: 4680 mov r8, r0
8011d4a: 4620 mov r0, r4
8011d4c: f000 ff7b bl 8012c46 <_Bfree>
8011d50: ee08 8a10 vmov s16, r8
8011d54: 9b07 ldr r3, [sp, #28]
8011d56: 1b9a subs r2, r3, r6
8011d58: d006 beq.n 8011d68 <_dtoa_r+0x770>
8011d5a: ee18 1a10 vmov r1, s16
8011d5e: 4620 mov r0, r4
8011d60: f001 f8d0 bl 8012f04 <__pow5mult>
8011d64: ee08 0a10 vmov s16, r0
8011d68: 2101 movs r1, #1
8011d6a: 4620 mov r0, r4
8011d6c: f001 f80a bl 8012d84 <__i2b>
8011d70: 9b0a ldr r3, [sp, #40] ; 0x28
8011d72: 2b00 cmp r3, #0
8011d74: 4606 mov r6, r0
8011d76: f340 8088 ble.w 8011e8a <_dtoa_r+0x892>
8011d7a: 461a mov r2, r3
8011d7c: 4601 mov r1, r0
8011d7e: 4620 mov r0, r4
8011d80: f001 f8c0 bl 8012f04 <__pow5mult>
8011d84: 9b06 ldr r3, [sp, #24]
8011d86: 2b01 cmp r3, #1
8011d88: 4606 mov r6, r0
8011d8a: f340 8081 ble.w 8011e90 <_dtoa_r+0x898>
8011d8e: f04f 0800 mov.w r8, #0
8011d92: 6933 ldr r3, [r6, #16]
8011d94: eb06 0383 add.w r3, r6, r3, lsl #2
8011d98: 6918 ldr r0, [r3, #16]
8011d9a: f000 ffa3 bl 8012ce4 <__hi0bits>
8011d9e: f1c0 0020 rsb r0, r0, #32
8011da2: 9b05 ldr r3, [sp, #20]
8011da4: 4418 add r0, r3
8011da6: f010 001f ands.w r0, r0, #31
8011daa: f000 8092 beq.w 8011ed2 <_dtoa_r+0x8da>
8011dae: f1c0 0320 rsb r3, r0, #32
8011db2: 2b04 cmp r3, #4
8011db4: f340 808a ble.w 8011ecc <_dtoa_r+0x8d4>
8011db8: f1c0 001c rsb r0, r0, #28
8011dbc: 9b04 ldr r3, [sp, #16]
8011dbe: 4403 add r3, r0
8011dc0: 9304 str r3, [sp, #16]
8011dc2: 9b05 ldr r3, [sp, #20]
8011dc4: 4403 add r3, r0
8011dc6: 4405 add r5, r0
8011dc8: 9305 str r3, [sp, #20]
8011dca: 9b04 ldr r3, [sp, #16]
8011dcc: 2b00 cmp r3, #0
8011dce: dd07 ble.n 8011de0 <_dtoa_r+0x7e8>
8011dd0: ee18 1a10 vmov r1, s16
8011dd4: 461a mov r2, r3
8011dd6: 4620 mov r0, r4
8011dd8: f001 f8d4 bl 8012f84 <__lshift>
8011ddc: ee08 0a10 vmov s16, r0
8011de0: 9b05 ldr r3, [sp, #20]
8011de2: 2b00 cmp r3, #0
8011de4: dd05 ble.n 8011df2 <_dtoa_r+0x7fa>
8011de6: 4631 mov r1, r6
8011de8: 461a mov r2, r3
8011dea: 4620 mov r0, r4
8011dec: f001 f8ca bl 8012f84 <__lshift>
8011df0: 4606 mov r6, r0
8011df2: 9b0b ldr r3, [sp, #44] ; 0x2c
8011df4: 2b00 cmp r3, #0
8011df6: d06e beq.n 8011ed6 <_dtoa_r+0x8de>
8011df8: ee18 0a10 vmov r0, s16
8011dfc: 4631 mov r1, r6
8011dfe: f001 f931 bl 8013064 <__mcmp>
8011e02: 2800 cmp r0, #0
8011e04: da67 bge.n 8011ed6 <_dtoa_r+0x8de>
8011e06: 9b00 ldr r3, [sp, #0]
8011e08: 3b01 subs r3, #1
8011e0a: ee18 1a10 vmov r1, s16
8011e0e: 9300 str r3, [sp, #0]
8011e10: 220a movs r2, #10
8011e12: 2300 movs r3, #0
8011e14: 4620 mov r0, r4
8011e16: f000 ff1f bl 8012c58 <__multadd>
8011e1a: 9b08 ldr r3, [sp, #32]
8011e1c: ee08 0a10 vmov s16, r0
8011e20: 2b00 cmp r3, #0
8011e22: f000 81b0 beq.w 8012186 <_dtoa_r+0xb8e>
8011e26: 2300 movs r3, #0
8011e28: 4639 mov r1, r7
8011e2a: 220a movs r2, #10
8011e2c: 4620 mov r0, r4
8011e2e: f000 ff13 bl 8012c58 <__multadd>
8011e32: 9b02 ldr r3, [sp, #8]
8011e34: 2b00 cmp r3, #0
8011e36: 4607 mov r7, r0
8011e38: f300 808e bgt.w 8011f58 <_dtoa_r+0x960>
8011e3c: 9b06 ldr r3, [sp, #24]
8011e3e: 2b02 cmp r3, #2
8011e40: dc51 bgt.n 8011ee6 <_dtoa_r+0x8ee>
8011e42: e089 b.n 8011f58 <_dtoa_r+0x960>
8011e44: 9b10 ldr r3, [sp, #64] ; 0x40
8011e46: f1c3 0336 rsb r3, r3, #54 ; 0x36
8011e4a: e74b b.n 8011ce4 <_dtoa_r+0x6ec>
8011e4c: 9b03 ldr r3, [sp, #12]
8011e4e: 1e5e subs r6, r3, #1
8011e50: 9b07 ldr r3, [sp, #28]
8011e52: 42b3 cmp r3, r6
8011e54: bfbf itttt lt
8011e56: 9b07 ldrlt r3, [sp, #28]
8011e58: 9607 strlt r6, [sp, #28]
8011e5a: 1af2 sublt r2, r6, r3
8011e5c: 9b0a ldrlt r3, [sp, #40] ; 0x28
8011e5e: bfb6 itet lt
8011e60: 189b addlt r3, r3, r2
8011e62: 1b9e subge r6, r3, r6
8011e64: 930a strlt r3, [sp, #40] ; 0x28
8011e66: 9b03 ldr r3, [sp, #12]
8011e68: bfb8 it lt
8011e6a: 2600 movlt r6, #0
8011e6c: 2b00 cmp r3, #0
8011e6e: bfb7 itett lt
8011e70: e9dd 2303 ldrdlt r2, r3, [sp, #12]
8011e74: e9dd 3503 ldrdge r3, r5, [sp, #12]
8011e78: 1a9d sublt r5, r3, r2
8011e7a: 2300 movlt r3, #0
8011e7c: e734 b.n 8011ce8 <_dtoa_r+0x6f0>
8011e7e: 9e07 ldr r6, [sp, #28]
8011e80: 9d04 ldr r5, [sp, #16]
8011e82: 9f08 ldr r7, [sp, #32]
8011e84: e73b b.n 8011cfe <_dtoa_r+0x706>
8011e86: 9a07 ldr r2, [sp, #28]
8011e88: e767 b.n 8011d5a <_dtoa_r+0x762>
8011e8a: 9b06 ldr r3, [sp, #24]
8011e8c: 2b01 cmp r3, #1
8011e8e: dc18 bgt.n 8011ec2 <_dtoa_r+0x8ca>
8011e90: f1ba 0f00 cmp.w sl, #0
8011e94: d115 bne.n 8011ec2 <_dtoa_r+0x8ca>
8011e96: f3cb 0313 ubfx r3, fp, #0, #20
8011e9a: b993 cbnz r3, 8011ec2 <_dtoa_r+0x8ca>
8011e9c: f02b 4300 bic.w r3, fp, #2147483648 ; 0x80000000
8011ea0: 0d1b lsrs r3, r3, #20
8011ea2: 051b lsls r3, r3, #20
8011ea4: b183 cbz r3, 8011ec8 <_dtoa_r+0x8d0>
8011ea6: 9b04 ldr r3, [sp, #16]
8011ea8: 3301 adds r3, #1
8011eaa: 9304 str r3, [sp, #16]
8011eac: 9b05 ldr r3, [sp, #20]
8011eae: 3301 adds r3, #1
8011eb0: 9305 str r3, [sp, #20]
8011eb2: f04f 0801 mov.w r8, #1
8011eb6: 9b0a ldr r3, [sp, #40] ; 0x28
8011eb8: 2b00 cmp r3, #0
8011eba: f47f af6a bne.w 8011d92 <_dtoa_r+0x79a>
8011ebe: 2001 movs r0, #1
8011ec0: e76f b.n 8011da2 <_dtoa_r+0x7aa>
8011ec2: f04f 0800 mov.w r8, #0
8011ec6: e7f6 b.n 8011eb6 <_dtoa_r+0x8be>
8011ec8: 4698 mov r8, r3
8011eca: e7f4 b.n 8011eb6 <_dtoa_r+0x8be>
8011ecc: f43f af7d beq.w 8011dca <_dtoa_r+0x7d2>
8011ed0: 4618 mov r0, r3
8011ed2: 301c adds r0, #28
8011ed4: e772 b.n 8011dbc <_dtoa_r+0x7c4>
8011ed6: 9b03 ldr r3, [sp, #12]
8011ed8: 2b00 cmp r3, #0
8011eda: dc37 bgt.n 8011f4c <_dtoa_r+0x954>
8011edc: 9b06 ldr r3, [sp, #24]
8011ede: 2b02 cmp r3, #2
8011ee0: dd34 ble.n 8011f4c <_dtoa_r+0x954>
8011ee2: 9b03 ldr r3, [sp, #12]
8011ee4: 9302 str r3, [sp, #8]
8011ee6: 9b02 ldr r3, [sp, #8]
8011ee8: b96b cbnz r3, 8011f06 <_dtoa_r+0x90e>
8011eea: 4631 mov r1, r6
8011eec: 2205 movs r2, #5
8011eee: 4620 mov r0, r4
8011ef0: f000 feb2 bl 8012c58 <__multadd>
8011ef4: 4601 mov r1, r0
8011ef6: 4606 mov r6, r0
8011ef8: ee18 0a10 vmov r0, s16
8011efc: f001 f8b2 bl 8013064 <__mcmp>
8011f00: 2800 cmp r0, #0
8011f02: f73f adba bgt.w 8011a7a <_dtoa_r+0x482>
8011f06: 9b09 ldr r3, [sp, #36] ; 0x24
8011f08: 9d01 ldr r5, [sp, #4]
8011f0a: 43db mvns r3, r3
8011f0c: 9300 str r3, [sp, #0]
8011f0e: f04f 0800 mov.w r8, #0
8011f12: 4631 mov r1, r6
8011f14: 4620 mov r0, r4
8011f16: f000 fe96 bl 8012c46 <_Bfree>
8011f1a: 2f00 cmp r7, #0
8011f1c: f43f aea4 beq.w 8011c68 <_dtoa_r+0x670>
8011f20: f1b8 0f00 cmp.w r8, #0
8011f24: d005 beq.n 8011f32 <_dtoa_r+0x93a>
8011f26: 45b8 cmp r8, r7
8011f28: d003 beq.n 8011f32 <_dtoa_r+0x93a>
8011f2a: 4641 mov r1, r8
8011f2c: 4620 mov r0, r4
8011f2e: f000 fe8a bl 8012c46 <_Bfree>
8011f32: 4639 mov r1, r7
8011f34: 4620 mov r0, r4
8011f36: f000 fe86 bl 8012c46 <_Bfree>
8011f3a: e695 b.n 8011c68 <_dtoa_r+0x670>
8011f3c: 2600 movs r6, #0
8011f3e: 4637 mov r7, r6
8011f40: e7e1 b.n 8011f06 <_dtoa_r+0x90e>
8011f42: 9700 str r7, [sp, #0]
8011f44: 4637 mov r7, r6
8011f46: e598 b.n 8011a7a <_dtoa_r+0x482>
8011f48: 40240000 .word 0x40240000
8011f4c: 9b08 ldr r3, [sp, #32]
8011f4e: 2b00 cmp r3, #0
8011f50: f000 80c9 beq.w 80120e6 <_dtoa_r+0xaee>
8011f54: 9b03 ldr r3, [sp, #12]
8011f56: 9302 str r3, [sp, #8]
8011f58: 2d00 cmp r5, #0
8011f5a: dd05 ble.n 8011f68 <_dtoa_r+0x970>
8011f5c: 4639 mov r1, r7
8011f5e: 462a mov r2, r5
8011f60: 4620 mov r0, r4
8011f62: f001 f80f bl 8012f84 <__lshift>
8011f66: 4607 mov r7, r0
8011f68: f1b8 0f00 cmp.w r8, #0
8011f6c: d05a beq.n 8012024 <_dtoa_r+0xa2c>
8011f6e: 6879 ldr r1, [r7, #4]
8011f70: 4620 mov r0, r4
8011f72: f000 fe43 bl 8012bfc <_Balloc>
8011f76: 4605 mov r5, r0
8011f78: b920 cbnz r0, 8011f84 <_dtoa_r+0x98c>
8011f7a: 4b87 ldr r3, [pc, #540] ; (8012198 <_dtoa_r+0xba0>)
8011f7c: 4602 mov r2, r0
8011f7e: f240 21ea movw r1, #746 ; 0x2ea
8011f82: e477 b.n 8011874 <_dtoa_r+0x27c>
8011f84: 693a ldr r2, [r7, #16]
8011f86: 3202 adds r2, #2
8011f88: 0092 lsls r2, r2, #2
8011f8a: f107 010c add.w r1, r7, #12
8011f8e: 300c adds r0, #12
8011f90: f7fd ff62 bl 800fe58 <memcpy>
8011f94: 2201 movs r2, #1
8011f96: 4629 mov r1, r5
8011f98: 4620 mov r0, r4
8011f9a: f000 fff3 bl 8012f84 <__lshift>
8011f9e: 9b01 ldr r3, [sp, #4]
8011fa0: f103 0901 add.w r9, r3, #1
8011fa4: e9dd 2301 ldrd r2, r3, [sp, #4]
8011fa8: 4413 add r3, r2
8011faa: 9305 str r3, [sp, #20]
8011fac: f00a 0301 and.w r3, sl, #1
8011fb0: 46b8 mov r8, r7
8011fb2: 9304 str r3, [sp, #16]
8011fb4: 4607 mov r7, r0
8011fb6: 4631 mov r1, r6
8011fb8: ee18 0a10 vmov r0, s16
8011fbc: f7ff fa8e bl 80114dc <quorem>
8011fc0: 4641 mov r1, r8
8011fc2: 9002 str r0, [sp, #8]
8011fc4: f100 0a30 add.w sl, r0, #48 ; 0x30
8011fc8: ee18 0a10 vmov r0, s16
8011fcc: f001 f84a bl 8013064 <__mcmp>
8011fd0: 463a mov r2, r7
8011fd2: 9003 str r0, [sp, #12]
8011fd4: 4631 mov r1, r6
8011fd6: 4620 mov r0, r4
8011fd8: f001 f860 bl 801309c <__mdiff>
8011fdc: 68c2 ldr r2, [r0, #12]
8011fde: f109 3bff add.w fp, r9, #4294967295
8011fe2: 4605 mov r5, r0
8011fe4: bb02 cbnz r2, 8012028 <_dtoa_r+0xa30>
8011fe6: 4601 mov r1, r0
8011fe8: ee18 0a10 vmov r0, s16
8011fec: f001 f83a bl 8013064 <__mcmp>
8011ff0: 4602 mov r2, r0
8011ff2: 4629 mov r1, r5
8011ff4: 4620 mov r0, r4
8011ff6: 9207 str r2, [sp, #28]
8011ff8: f000 fe25 bl 8012c46 <_Bfree>
8011ffc: e9dd 3206 ldrd r3, r2, [sp, #24]
8012000: ea43 0102 orr.w r1, r3, r2
8012004: 9b04 ldr r3, [sp, #16]
8012006: 430b orrs r3, r1
8012008: 464d mov r5, r9
801200a: d10f bne.n 801202c <_dtoa_r+0xa34>
801200c: f1ba 0f39 cmp.w sl, #57 ; 0x39
8012010: d02a beq.n 8012068 <_dtoa_r+0xa70>
8012012: 9b03 ldr r3, [sp, #12]
8012014: 2b00 cmp r3, #0
8012016: dd02 ble.n 801201e <_dtoa_r+0xa26>
8012018: 9b02 ldr r3, [sp, #8]
801201a: f103 0a31 add.w sl, r3, #49 ; 0x31
801201e: f88b a000 strb.w sl, [fp]
8012022: e776 b.n 8011f12 <_dtoa_r+0x91a>
8012024: 4638 mov r0, r7
8012026: e7ba b.n 8011f9e <_dtoa_r+0x9a6>
8012028: 2201 movs r2, #1
801202a: e7e2 b.n 8011ff2 <_dtoa_r+0x9fa>
801202c: 9b03 ldr r3, [sp, #12]
801202e: 2b00 cmp r3, #0
8012030: db04 blt.n 801203c <_dtoa_r+0xa44>
8012032: 9906 ldr r1, [sp, #24]
8012034: 430b orrs r3, r1
8012036: 9904 ldr r1, [sp, #16]
8012038: 430b orrs r3, r1
801203a: d122 bne.n 8012082 <_dtoa_r+0xa8a>
801203c: 2a00 cmp r2, #0
801203e: ddee ble.n 801201e <_dtoa_r+0xa26>
8012040: ee18 1a10 vmov r1, s16
8012044: 2201 movs r2, #1
8012046: 4620 mov r0, r4
8012048: f000 ff9c bl 8012f84 <__lshift>
801204c: 4631 mov r1, r6
801204e: ee08 0a10 vmov s16, r0
8012052: f001 f807 bl 8013064 <__mcmp>
8012056: 2800 cmp r0, #0
8012058: dc03 bgt.n 8012062 <_dtoa_r+0xa6a>
801205a: d1e0 bne.n 801201e <_dtoa_r+0xa26>
801205c: f01a 0f01 tst.w sl, #1
8012060: d0dd beq.n 801201e <_dtoa_r+0xa26>
8012062: f1ba 0f39 cmp.w sl, #57 ; 0x39
8012066: d1d7 bne.n 8012018 <_dtoa_r+0xa20>
8012068: 2339 movs r3, #57 ; 0x39
801206a: f88b 3000 strb.w r3, [fp]
801206e: 462b mov r3, r5
8012070: 461d mov r5, r3
8012072: 3b01 subs r3, #1
8012074: f815 2c01 ldrb.w r2, [r5, #-1]
8012078: 2a39 cmp r2, #57 ; 0x39
801207a: d071 beq.n 8012160 <_dtoa_r+0xb68>
801207c: 3201 adds r2, #1
801207e: 701a strb r2, [r3, #0]
8012080: e747 b.n 8011f12 <_dtoa_r+0x91a>
8012082: 2a00 cmp r2, #0
8012084: dd07 ble.n 8012096 <_dtoa_r+0xa9e>
8012086: f1ba 0f39 cmp.w sl, #57 ; 0x39
801208a: d0ed beq.n 8012068 <_dtoa_r+0xa70>
801208c: f10a 0301 add.w r3, sl, #1
8012090: f88b 3000 strb.w r3, [fp]
8012094: e73d b.n 8011f12 <_dtoa_r+0x91a>
8012096: 9b05 ldr r3, [sp, #20]
8012098: f809 ac01 strb.w sl, [r9, #-1]
801209c: 4599 cmp r9, r3
801209e: d047 beq.n 8012130 <_dtoa_r+0xb38>
80120a0: ee18 1a10 vmov r1, s16
80120a4: 2300 movs r3, #0
80120a6: 220a movs r2, #10
80120a8: 4620 mov r0, r4
80120aa: f000 fdd5 bl 8012c58 <__multadd>
80120ae: 45b8 cmp r8, r7
80120b0: ee08 0a10 vmov s16, r0
80120b4: f04f 0300 mov.w r3, #0
80120b8: f04f 020a mov.w r2, #10
80120bc: 4641 mov r1, r8
80120be: 4620 mov r0, r4
80120c0: d106 bne.n 80120d0 <_dtoa_r+0xad8>
80120c2: f000 fdc9 bl 8012c58 <__multadd>
80120c6: 4680 mov r8, r0
80120c8: 4607 mov r7, r0
80120ca: f109 0901 add.w r9, r9, #1
80120ce: e772 b.n 8011fb6 <_dtoa_r+0x9be>
80120d0: f000 fdc2 bl 8012c58 <__multadd>
80120d4: 4639 mov r1, r7
80120d6: 4680 mov r8, r0
80120d8: 2300 movs r3, #0
80120da: 220a movs r2, #10
80120dc: 4620 mov r0, r4
80120de: f000 fdbb bl 8012c58 <__multadd>
80120e2: 4607 mov r7, r0
80120e4: e7f1 b.n 80120ca <_dtoa_r+0xad2>
80120e6: 9b03 ldr r3, [sp, #12]
80120e8: 9302 str r3, [sp, #8]
80120ea: 9d01 ldr r5, [sp, #4]
80120ec: ee18 0a10 vmov r0, s16
80120f0: 4631 mov r1, r6
80120f2: f7ff f9f3 bl 80114dc <quorem>
80120f6: f100 0a30 add.w sl, r0, #48 ; 0x30
80120fa: 9b01 ldr r3, [sp, #4]
80120fc: f805 ab01 strb.w sl, [r5], #1
8012100: 1aea subs r2, r5, r3
8012102: 9b02 ldr r3, [sp, #8]
8012104: 4293 cmp r3, r2
8012106: dd09 ble.n 801211c <_dtoa_r+0xb24>
8012108: ee18 1a10 vmov r1, s16
801210c: 2300 movs r3, #0
801210e: 220a movs r2, #10
8012110: 4620 mov r0, r4
8012112: f000 fda1 bl 8012c58 <__multadd>
8012116: ee08 0a10 vmov s16, r0
801211a: e7e7 b.n 80120ec <_dtoa_r+0xaf4>
801211c: 9b02 ldr r3, [sp, #8]
801211e: 2b00 cmp r3, #0
8012120: bfc8 it gt
8012122: 461d movgt r5, r3
8012124: 9b01 ldr r3, [sp, #4]
8012126: bfd8 it le
8012128: 2501 movle r5, #1
801212a: 441d add r5, r3
801212c: f04f 0800 mov.w r8, #0
8012130: ee18 1a10 vmov r1, s16
8012134: 2201 movs r2, #1
8012136: 4620 mov r0, r4
8012138: f000 ff24 bl 8012f84 <__lshift>
801213c: 4631 mov r1, r6
801213e: ee08 0a10 vmov s16, r0
8012142: f000 ff8f bl 8013064 <__mcmp>
8012146: 2800 cmp r0, #0
8012148: dc91 bgt.n 801206e <_dtoa_r+0xa76>
801214a: d102 bne.n 8012152 <_dtoa_r+0xb5a>
801214c: f01a 0f01 tst.w sl, #1
8012150: d18d bne.n 801206e <_dtoa_r+0xa76>
8012152: 462b mov r3, r5
8012154: 461d mov r5, r3
8012156: f813 2d01 ldrb.w r2, [r3, #-1]!
801215a: 2a30 cmp r2, #48 ; 0x30
801215c: d0fa beq.n 8012154 <_dtoa_r+0xb5c>
801215e: e6d8 b.n 8011f12 <_dtoa_r+0x91a>
8012160: 9a01 ldr r2, [sp, #4]
8012162: 429a cmp r2, r3
8012164: d184 bne.n 8012070 <_dtoa_r+0xa78>
8012166: 9b00 ldr r3, [sp, #0]
8012168: 3301 adds r3, #1
801216a: 9300 str r3, [sp, #0]
801216c: 2331 movs r3, #49 ; 0x31
801216e: 7013 strb r3, [r2, #0]
8012170: e6cf b.n 8011f12 <_dtoa_r+0x91a>
8012172: 4b0a ldr r3, [pc, #40] ; (801219c <_dtoa_r+0xba4>)
8012174: f7ff ba97 b.w 80116a6 <_dtoa_r+0xae>
8012178: 9b21 ldr r3, [sp, #132] ; 0x84
801217a: 2b00 cmp r3, #0
801217c: f47f aa7b bne.w 8011676 <_dtoa_r+0x7e>
8012180: 4b07 ldr r3, [pc, #28] ; (80121a0 <_dtoa_r+0xba8>)
8012182: f7ff ba90 b.w 80116a6 <_dtoa_r+0xae>
8012186: 9b02 ldr r3, [sp, #8]
8012188: 2b00 cmp r3, #0
801218a: dcae bgt.n 80120ea <_dtoa_r+0xaf2>
801218c: 9b06 ldr r3, [sp, #24]
801218e: 2b02 cmp r3, #2
8012190: f73f aea9 bgt.w 8011ee6 <_dtoa_r+0x8ee>
8012194: e7a9 b.n 80120ea <_dtoa_r+0xaf2>
8012196: bf00 nop
8012198: 08017a41 .word 0x08017a41
801219c: 08017a12 .word 0x08017a12
80121a0: 08017a38 .word 0x08017a38
080121a4 <__errno>:
80121a4: 4b01 ldr r3, [pc, #4] ; (80121ac <__errno+0x8>)
80121a6: 6818 ldr r0, [r3, #0]
80121a8: 4770 bx lr
80121aa: bf00 nop
80121ac: 20000030 .word 0x20000030
080121b0 <__sflush_r>:
80121b0: 898b ldrh r3, [r1, #12]
80121b2: f9b1 200c ldrsh.w r2, [r1, #12]
80121b6: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
80121ba: 4605 mov r5, r0
80121bc: 0718 lsls r0, r3, #28
80121be: 460c mov r4, r1
80121c0: d45f bmi.n 8012282 <__sflush_r+0xd2>
80121c2: 684b ldr r3, [r1, #4]
80121c4: f442 6200 orr.w r2, r2, #2048 ; 0x800
80121c8: 2b00 cmp r3, #0
80121ca: 818a strh r2, [r1, #12]
80121cc: dc05 bgt.n 80121da <__sflush_r+0x2a>
80121ce: 6bcb ldr r3, [r1, #60] ; 0x3c
80121d0: 2b00 cmp r3, #0
80121d2: dc02 bgt.n 80121da <__sflush_r+0x2a>
80121d4: 2000 movs r0, #0
80121d6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
80121da: 6aa6 ldr r6, [r4, #40] ; 0x28
80121dc: 2e00 cmp r6, #0
80121de: d0f9 beq.n 80121d4 <__sflush_r+0x24>
80121e0: 2300 movs r3, #0
80121e2: f412 5280 ands.w r2, r2, #4096 ; 0x1000
80121e6: 682f ldr r7, [r5, #0]
80121e8: 602b str r3, [r5, #0]
80121ea: d036 beq.n 801225a <__sflush_r+0xaa>
80121ec: 6d20 ldr r0, [r4, #80] ; 0x50
80121ee: 89a3 ldrh r3, [r4, #12]
80121f0: 075a lsls r2, r3, #29
80121f2: d505 bpl.n 8012200 <__sflush_r+0x50>
80121f4: 6863 ldr r3, [r4, #4]
80121f6: 1ac0 subs r0, r0, r3
80121f8: 6b23 ldr r3, [r4, #48] ; 0x30
80121fa: b10b cbz r3, 8012200 <__sflush_r+0x50>
80121fc: 6be3 ldr r3, [r4, #60] ; 0x3c
80121fe: 1ac0 subs r0, r0, r3
8012200: 2300 movs r3, #0
8012202: 4602 mov r2, r0
8012204: 6aa6 ldr r6, [r4, #40] ; 0x28
8012206: 69e1 ldr r1, [r4, #28]
8012208: 4628 mov r0, r5
801220a: 47b0 blx r6
801220c: 1c43 adds r3, r0, #1
801220e: 89a3 ldrh r3, [r4, #12]
8012210: d106 bne.n 8012220 <__sflush_r+0x70>
8012212: 6829 ldr r1, [r5, #0]
8012214: 291d cmp r1, #29
8012216: d830 bhi.n 801227a <__sflush_r+0xca>
8012218: 4a2b ldr r2, [pc, #172] ; (80122c8 <__sflush_r+0x118>)
801221a: 40ca lsrs r2, r1
801221c: 07d6 lsls r6, r2, #31
801221e: d52c bpl.n 801227a <__sflush_r+0xca>
8012220: f423 6300 bic.w r3, r3, #2048 ; 0x800
8012224: b21b sxth r3, r3
8012226: 2200 movs r2, #0
8012228: 6062 str r2, [r4, #4]
801222a: 04d9 lsls r1, r3, #19
801222c: 6922 ldr r2, [r4, #16]
801222e: 81a3 strh r3, [r4, #12]
8012230: 6022 str r2, [r4, #0]
8012232: d504 bpl.n 801223e <__sflush_r+0x8e>
8012234: 1c42 adds r2, r0, #1
8012236: d101 bne.n 801223c <__sflush_r+0x8c>
8012238: 682b ldr r3, [r5, #0]
801223a: b903 cbnz r3, 801223e <__sflush_r+0x8e>
801223c: 6520 str r0, [r4, #80] ; 0x50
801223e: 6b21 ldr r1, [r4, #48] ; 0x30
8012240: 602f str r7, [r5, #0]
8012242: 2900 cmp r1, #0
8012244: d0c6 beq.n 80121d4 <__sflush_r+0x24>
8012246: f104 0340 add.w r3, r4, #64 ; 0x40
801224a: 4299 cmp r1, r3
801224c: d002 beq.n 8012254 <__sflush_r+0xa4>
801224e: 4628 mov r0, r5
8012250: f000 f938 bl 80124c4 <_free_r>
8012254: 2000 movs r0, #0
8012256: 6320 str r0, [r4, #48] ; 0x30
8012258: e7bd b.n 80121d6 <__sflush_r+0x26>
801225a: 69e1 ldr r1, [r4, #28]
801225c: 2301 movs r3, #1
801225e: 4628 mov r0, r5
8012260: 47b0 blx r6
8012262: 1c41 adds r1, r0, #1
8012264: d1c3 bne.n 80121ee <__sflush_r+0x3e>
8012266: 682b ldr r3, [r5, #0]
8012268: 2b00 cmp r3, #0
801226a: d0c0 beq.n 80121ee <__sflush_r+0x3e>
801226c: 2b1d cmp r3, #29
801226e: d001 beq.n 8012274 <__sflush_r+0xc4>
8012270: 2b16 cmp r3, #22
8012272: d101 bne.n 8012278 <__sflush_r+0xc8>
8012274: 602f str r7, [r5, #0]
8012276: e7ad b.n 80121d4 <__sflush_r+0x24>
8012278: 89a3 ldrh r3, [r4, #12]
801227a: f043 0340 orr.w r3, r3, #64 ; 0x40
801227e: 81a3 strh r3, [r4, #12]
8012280: e7a9 b.n 80121d6 <__sflush_r+0x26>
8012282: 690f ldr r7, [r1, #16]
8012284: 2f00 cmp r7, #0
8012286: d0a5 beq.n 80121d4 <__sflush_r+0x24>
8012288: 079b lsls r3, r3, #30
801228a: 680e ldr r6, [r1, #0]
801228c: bf08 it eq
801228e: 694b ldreq r3, [r1, #20]
8012290: 600f str r7, [r1, #0]
8012292: bf18 it ne
8012294: 2300 movne r3, #0
8012296: eba6 0807 sub.w r8, r6, r7
801229a: 608b str r3, [r1, #8]
801229c: f1b8 0f00 cmp.w r8, #0
80122a0: dd98 ble.n 80121d4 <__sflush_r+0x24>
80122a2: 69e1 ldr r1, [r4, #28]
80122a4: 6a66 ldr r6, [r4, #36] ; 0x24
80122a6: 4643 mov r3, r8
80122a8: 463a mov r2, r7
80122aa: 4628 mov r0, r5
80122ac: 47b0 blx r6
80122ae: 2800 cmp r0, #0
80122b0: dc06 bgt.n 80122c0 <__sflush_r+0x110>
80122b2: 89a3 ldrh r3, [r4, #12]
80122b4: f043 0340 orr.w r3, r3, #64 ; 0x40
80122b8: 81a3 strh r3, [r4, #12]
80122ba: f04f 30ff mov.w r0, #4294967295
80122be: e78a b.n 80121d6 <__sflush_r+0x26>
80122c0: 4407 add r7, r0
80122c2: eba8 0800 sub.w r8, r8, r0
80122c6: e7e9 b.n 801229c <__sflush_r+0xec>
80122c8: 20400001 .word 0x20400001
080122cc <_fflush_r>:
80122cc: b538 push {r3, r4, r5, lr}
80122ce: 460c mov r4, r1
80122d0: 4605 mov r5, r0
80122d2: b118 cbz r0, 80122dc <_fflush_r+0x10>
80122d4: 6b83 ldr r3, [r0, #56] ; 0x38
80122d6: b90b cbnz r3, 80122dc <_fflush_r+0x10>
80122d8: f000 f864 bl 80123a4 <__sinit>
80122dc: f9b4 300c ldrsh.w r3, [r4, #12]
80122e0: b1bb cbz r3, 8012312 <_fflush_r+0x46>
80122e2: 6e62 ldr r2, [r4, #100] ; 0x64
80122e4: 07d0 lsls r0, r2, #31
80122e6: d404 bmi.n 80122f2 <_fflush_r+0x26>
80122e8: 0599 lsls r1, r3, #22
80122ea: d402 bmi.n 80122f2 <_fflush_r+0x26>
80122ec: 6da0 ldr r0, [r4, #88] ; 0x58
80122ee: f000 f9cf bl 8012690 <__retarget_lock_acquire_recursive>
80122f2: 4628 mov r0, r5
80122f4: 4621 mov r1, r4
80122f6: f7ff ff5b bl 80121b0 <__sflush_r>
80122fa: 6e63 ldr r3, [r4, #100] ; 0x64
80122fc: 07da lsls r2, r3, #31
80122fe: 4605 mov r5, r0
8012300: d405 bmi.n 801230e <_fflush_r+0x42>
8012302: 89a3 ldrh r3, [r4, #12]
8012304: 059b lsls r3, r3, #22
8012306: d402 bmi.n 801230e <_fflush_r+0x42>
8012308: 6da0 ldr r0, [r4, #88] ; 0x58
801230a: f000 f9c2 bl 8012692 <__retarget_lock_release_recursive>
801230e: 4628 mov r0, r5
8012310: bd38 pop {r3, r4, r5, pc}
8012312: 461d mov r5, r3
8012314: e7fb b.n 801230e <_fflush_r+0x42>
...
08012318 <std>:
8012318: 2300 movs r3, #0
801231a: b510 push {r4, lr}
801231c: 4604 mov r4, r0
801231e: e9c0 3300 strd r3, r3, [r0]
8012322: e9c0 3304 strd r3, r3, [r0, #16]
8012326: 6083 str r3, [r0, #8]
8012328: 8181 strh r1, [r0, #12]
801232a: 6643 str r3, [r0, #100] ; 0x64
801232c: 81c2 strh r2, [r0, #14]
801232e: 6183 str r3, [r0, #24]
8012330: 4619 mov r1, r3
8012332: 2208 movs r2, #8
8012334: 305c adds r0, #92 ; 0x5c
8012336: f7fd fdb7 bl 800fea8 <memset>
801233a: 4b07 ldr r3, [pc, #28] ; (8012358 <std+0x40>)
801233c: 6223 str r3, [r4, #32]
801233e: 4b07 ldr r3, [pc, #28] ; (801235c <std+0x44>)
8012340: 6263 str r3, [r4, #36] ; 0x24
8012342: 4b07 ldr r3, [pc, #28] ; (8012360 <std+0x48>)
8012344: 62a3 str r3, [r4, #40] ; 0x28
8012346: 4b07 ldr r3, [pc, #28] ; (8012364 <std+0x4c>)
8012348: 61e4 str r4, [r4, #28]
801234a: 62e3 str r3, [r4, #44] ; 0x2c
801234c: f104 0058 add.w r0, r4, #88 ; 0x58
8012350: e8bd 4010 ldmia.w sp!, {r4, lr}
8012354: f000 b99a b.w 801268c <__retarget_lock_init_recursive>
8012358: 080132f9 .word 0x080132f9
801235c: 0801331b .word 0x0801331b
8012360: 08013353 .word 0x08013353
8012364: 08013377 .word 0x08013377
08012368 <_cleanup_r>:
8012368: 4901 ldr r1, [pc, #4] ; (8012370 <_cleanup_r+0x8>)
801236a: f000 b96b b.w 8012644 <_fwalk_reent>
801236e: bf00 nop
8012370: 08013f41 .word 0x08013f41
08012374 <__sfp_lock_acquire>:
8012374: 4801 ldr r0, [pc, #4] ; (801237c <__sfp_lock_acquire+0x8>)
8012376: f000 b98b b.w 8012690 <__retarget_lock_acquire_recursive>
801237a: bf00 nop
801237c: 20008d3c .word 0x20008d3c
08012380 <__sfp_lock_release>:
8012380: 4801 ldr r0, [pc, #4] ; (8012388 <__sfp_lock_release+0x8>)
8012382: f000 b986 b.w 8012692 <__retarget_lock_release_recursive>
8012386: bf00 nop
8012388: 20008d3c .word 0x20008d3c
0801238c <__sinit_lock_acquire>:
801238c: 4801 ldr r0, [pc, #4] ; (8012394 <__sinit_lock_acquire+0x8>)
801238e: f000 b97f b.w 8012690 <__retarget_lock_acquire_recursive>
8012392: bf00 nop
8012394: 20008d3d .word 0x20008d3d
08012398 <__sinit_lock_release>:
8012398: 4801 ldr r0, [pc, #4] ; (80123a0 <__sinit_lock_release+0x8>)
801239a: f000 b97a b.w 8012692 <__retarget_lock_release_recursive>
801239e: bf00 nop
80123a0: 20008d3d .word 0x20008d3d
080123a4 <__sinit>:
80123a4: b510 push {r4, lr}
80123a6: 4604 mov r4, r0
80123a8: f7ff fff0 bl 801238c <__sinit_lock_acquire>
80123ac: 6ba2 ldr r2, [r4, #56] ; 0x38
80123ae: b11a cbz r2, 80123b8 <__sinit+0x14>
80123b0: e8bd 4010 ldmia.w sp!, {r4, lr}
80123b4: f7ff bff0 b.w 8012398 <__sinit_lock_release>
80123b8: 4b0d ldr r3, [pc, #52] ; (80123f0 <__sinit+0x4c>)
80123ba: 63e3 str r3, [r4, #60] ; 0x3c
80123bc: 2303 movs r3, #3
80123be: f8c4 32e4 str.w r3, [r4, #740] ; 0x2e4
80123c2: f504 733b add.w r3, r4, #748 ; 0x2ec
80123c6: f8c4 32e8 str.w r3, [r4, #744] ; 0x2e8
80123ca: 6860 ldr r0, [r4, #4]
80123cc: f8c4 22e0 str.w r2, [r4, #736] ; 0x2e0
80123d0: 2104 movs r1, #4
80123d2: f7ff ffa1 bl 8012318 <std>
80123d6: 68a0 ldr r0, [r4, #8]
80123d8: 2201 movs r2, #1
80123da: 2109 movs r1, #9
80123dc: f7ff ff9c bl 8012318 <std>
80123e0: 68e0 ldr r0, [r4, #12]
80123e2: 2202 movs r2, #2
80123e4: 2112 movs r1, #18
80123e6: f7ff ff97 bl 8012318 <std>
80123ea: 2301 movs r3, #1
80123ec: 63a3 str r3, [r4, #56] ; 0x38
80123ee: e7df b.n 80123b0 <__sinit+0xc>
80123f0: 08012369 .word 0x08012369
080123f4 <__libc_fini_array>:
80123f4: b538 push {r3, r4, r5, lr}
80123f6: 4d07 ldr r5, [pc, #28] ; (8012414 <__libc_fini_array+0x20>)
80123f8: 4c07 ldr r4, [pc, #28] ; (8012418 <__libc_fini_array+0x24>)
80123fa: 1b64 subs r4, r4, r5
80123fc: 10a4 asrs r4, r4, #2
80123fe: b91c cbnz r4, 8012408 <__libc_fini_array+0x14>
8012400: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
8012404: f002 bace b.w 80149a4 <_fini>
8012408: 3c01 subs r4, #1
801240a: f855 3024 ldr.w r3, [r5, r4, lsl #2]
801240e: 4798 blx r3
8012410: e7f5 b.n 80123fe <__libc_fini_array+0xa>
8012412: bf00 nop
8012414: 08017c84 .word 0x08017c84
8012418: 08017c88 .word 0x08017c88
0801241c <_malloc_trim_r>:
801241c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
8012420: 4606 mov r6, r0
8012422: 2008 movs r0, #8
8012424: 460c mov r4, r1
8012426: f000 ffbd bl 80133a4 <sysconf>
801242a: 4f23 ldr r7, [pc, #140] ; (80124b8 <_malloc_trim_r+0x9c>)
801242c: 4680 mov r8, r0
801242e: 4630 mov r0, r6
8012430: f000 fbd8 bl 8012be4 <__malloc_lock>
8012434: 68bb ldr r3, [r7, #8]
8012436: 685d ldr r5, [r3, #4]
8012438: f025 0503 bic.w r5, r5, #3
801243c: 1b2c subs r4, r5, r4
801243e: 3c11 subs r4, #17
8012440: 4444 add r4, r8
8012442: fbb4 f4f8 udiv r4, r4, r8
8012446: 3c01 subs r4, #1
8012448: fb08 f404 mul.w r4, r8, r4
801244c: 45a0 cmp r8, r4
801244e: dd05 ble.n 801245c <_malloc_trim_r+0x40>
8012450: 4630 mov r0, r6
8012452: f000 fbcd bl 8012bf0 <__malloc_unlock>
8012456: 2000 movs r0, #0
8012458: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
801245c: 2100 movs r1, #0
801245e: 4630 mov r0, r6
8012460: f000 ff3a bl 80132d8 <_sbrk_r>
8012464: 68bb ldr r3, [r7, #8]
8012466: 442b add r3, r5
8012468: 4298 cmp r0, r3
801246a: d1f1 bne.n 8012450 <_malloc_trim_r+0x34>
801246c: 4261 negs r1, r4
801246e: 4630 mov r0, r6
8012470: f000 ff32 bl 80132d8 <_sbrk_r>
8012474: 3001 adds r0, #1
8012476: d110 bne.n 801249a <_malloc_trim_r+0x7e>
8012478: 2100 movs r1, #0
801247a: 4630 mov r0, r6
801247c: f000 ff2c bl 80132d8 <_sbrk_r>
8012480: 68ba ldr r2, [r7, #8]
8012482: 1a83 subs r3, r0, r2
8012484: 2b0f cmp r3, #15
8012486: dde3 ble.n 8012450 <_malloc_trim_r+0x34>
8012488: 490c ldr r1, [pc, #48] ; (80124bc <_malloc_trim_r+0xa0>)
801248a: 6809 ldr r1, [r1, #0]
801248c: 1a40 subs r0, r0, r1
801248e: 490c ldr r1, [pc, #48] ; (80124c0 <_malloc_trim_r+0xa4>)
8012490: f043 0301 orr.w r3, r3, #1
8012494: 6008 str r0, [r1, #0]
8012496: 6053 str r3, [r2, #4]
8012498: e7da b.n 8012450 <_malloc_trim_r+0x34>
801249a: 68bb ldr r3, [r7, #8]
801249c: 4a08 ldr r2, [pc, #32] ; (80124c0 <_malloc_trim_r+0xa4>)
801249e: 1b2d subs r5, r5, r4
80124a0: f045 0501 orr.w r5, r5, #1
80124a4: 605d str r5, [r3, #4]
80124a6: 6813 ldr r3, [r2, #0]
80124a8: 4630 mov r0, r6
80124aa: 1b1b subs r3, r3, r4
80124ac: 6013 str r3, [r2, #0]
80124ae: f000 fb9f bl 8012bf0 <__malloc_unlock>
80124b2: 2001 movs r0, #1
80124b4: e7d0 b.n 8012458 <_malloc_trim_r+0x3c>
80124b6: bf00 nop
80124b8: 20000464 .word 0x20000464
80124bc: 2000086c .word 0x2000086c
80124c0: 20008d40 .word 0x20008d40
080124c4 <_free_r>:
80124c4: b5f8 push {r3, r4, r5, r6, r7, lr}
80124c6: 4605 mov r5, r0
80124c8: 460f mov r7, r1
80124ca: 2900 cmp r1, #0
80124cc: f000 80b1 beq.w 8012632 <_free_r+0x16e>
80124d0: f000 fb88 bl 8012be4 <__malloc_lock>
80124d4: f857 2c04 ldr.w r2, [r7, #-4]
80124d8: 4856 ldr r0, [pc, #344] ; (8012634 <_free_r+0x170>)
80124da: f022 0401 bic.w r4, r2, #1
80124de: f1a7 0308 sub.w r3, r7, #8
80124e2: eb03 0c04 add.w ip, r3, r4
80124e6: 6881 ldr r1, [r0, #8]
80124e8: f8dc 6004 ldr.w r6, [ip, #4]
80124ec: 4561 cmp r1, ip
80124ee: f026 0603 bic.w r6, r6, #3
80124f2: f002 0201 and.w r2, r2, #1
80124f6: d11b bne.n 8012530 <_free_r+0x6c>
80124f8: 4434 add r4, r6
80124fa: b93a cbnz r2, 801250c <_free_r+0x48>
80124fc: f857 2c08 ldr.w r2, [r7, #-8]
8012500: 1a9b subs r3, r3, r2
8012502: 4414 add r4, r2
8012504: e9d3 1202 ldrd r1, r2, [r3, #8]
8012508: 60ca str r2, [r1, #12]
801250a: 6091 str r1, [r2, #8]
801250c: f044 0201 orr.w r2, r4, #1
8012510: 605a str r2, [r3, #4]
8012512: 6083 str r3, [r0, #8]
8012514: 4b48 ldr r3, [pc, #288] ; (8012638 <_free_r+0x174>)
8012516: 681b ldr r3, [r3, #0]
8012518: 42a3 cmp r3, r4
801251a: d804 bhi.n 8012526 <_free_r+0x62>
801251c: 4b47 ldr r3, [pc, #284] ; (801263c <_free_r+0x178>)
801251e: 4628 mov r0, r5
8012520: 6819 ldr r1, [r3, #0]
8012522: f7ff ff7b bl 801241c <_malloc_trim_r>
8012526: 4628 mov r0, r5
8012528: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr}
801252c: f000 bb60 b.w 8012bf0 <__malloc_unlock>
8012530: f8cc 6004 str.w r6, [ip, #4]
8012534: 2a00 cmp r2, #0
8012536: d138 bne.n 80125aa <_free_r+0xe6>
8012538: f857 1c08 ldr.w r1, [r7, #-8]
801253c: 1a5b subs r3, r3, r1
801253e: 440c add r4, r1
8012540: 6899 ldr r1, [r3, #8]
8012542: f100 0708 add.w r7, r0, #8
8012546: 42b9 cmp r1, r7
8012548: d031 beq.n 80125ae <_free_r+0xea>
801254a: 68df ldr r7, [r3, #12]
801254c: 60cf str r7, [r1, #12]
801254e: 60b9 str r1, [r7, #8]
8012550: eb0c 0106 add.w r1, ip, r6
8012554: 6849 ldr r1, [r1, #4]
8012556: 07c9 lsls r1, r1, #31
8012558: d40b bmi.n 8012572 <_free_r+0xae>
801255a: f8dc 1008 ldr.w r1, [ip, #8]
801255e: 4434 add r4, r6
8012560: bb3a cbnz r2, 80125b2 <_free_r+0xee>
8012562: 4e37 ldr r6, [pc, #220] ; (8012640 <_free_r+0x17c>)
8012564: 42b1 cmp r1, r6
8012566: d124 bne.n 80125b2 <_free_r+0xee>
8012568: e9c0 3304 strd r3, r3, [r0, #16]
801256c: e9c3 1102 strd r1, r1, [r3, #8]
8012570: 2201 movs r2, #1
8012572: f044 0101 orr.w r1, r4, #1
8012576: 6059 str r1, [r3, #4]
8012578: 511c str r4, [r3, r4]
801257a: 2a00 cmp r2, #0
801257c: d1d3 bne.n 8012526 <_free_r+0x62>
801257e: f5b4 7f00 cmp.w r4, #512 ; 0x200
8012582: d21b bcs.n 80125bc <_free_r+0xf8>
8012584: 0961 lsrs r1, r4, #5
8012586: 08e2 lsrs r2, r4, #3
8012588: 2401 movs r4, #1
801258a: 408c lsls r4, r1
801258c: 6841 ldr r1, [r0, #4]
801258e: 3201 adds r2, #1
8012590: 430c orrs r4, r1
8012592: 6044 str r4, [r0, #4]
8012594: eb00 01c2 add.w r1, r0, r2, lsl #3
8012598: f850 4032 ldr.w r4, [r0, r2, lsl #3]
801259c: 3908 subs r1, #8
801259e: e9c3 4102 strd r4, r1, [r3, #8]
80125a2: f840 3032 str.w r3, [r0, r2, lsl #3]
80125a6: 60e3 str r3, [r4, #12]
80125a8: e7bd b.n 8012526 <_free_r+0x62>
80125aa: 2200 movs r2, #0
80125ac: e7d0 b.n 8012550 <_free_r+0x8c>
80125ae: 2201 movs r2, #1
80125b0: e7ce b.n 8012550 <_free_r+0x8c>
80125b2: f8dc 600c ldr.w r6, [ip, #12]
80125b6: 60ce str r6, [r1, #12]
80125b8: 60b1 str r1, [r6, #8]
80125ba: e7da b.n 8012572 <_free_r+0xae>
80125bc: f5b4 6f20 cmp.w r4, #2560 ; 0xa00
80125c0: ea4f 2254 mov.w r2, r4, lsr #9
80125c4: d214 bcs.n 80125f0 <_free_r+0x12c>
80125c6: 09a2 lsrs r2, r4, #6
80125c8: 3238 adds r2, #56 ; 0x38
80125ca: 1c51 adds r1, r2, #1
80125cc: eb00 06c2 add.w r6, r0, r2, lsl #3
80125d0: f850 1031 ldr.w r1, [r0, r1, lsl #3]
80125d4: 428e cmp r6, r1
80125d6: d125 bne.n 8012624 <_free_r+0x160>
80125d8: 2401 movs r4, #1
80125da: 1092 asrs r2, r2, #2
80125dc: fa04 f202 lsl.w r2, r4, r2
80125e0: 6844 ldr r4, [r0, #4]
80125e2: 4322 orrs r2, r4
80125e4: 6042 str r2, [r0, #4]
80125e6: e9c3 1602 strd r1, r6, [r3, #8]
80125ea: 60b3 str r3, [r6, #8]
80125ec: 60cb str r3, [r1, #12]
80125ee: e79a b.n 8012526 <_free_r+0x62>
80125f0: 2a14 cmp r2, #20
80125f2: d801 bhi.n 80125f8 <_free_r+0x134>
80125f4: 325b adds r2, #91 ; 0x5b
80125f6: e7e8 b.n 80125ca <_free_r+0x106>
80125f8: 2a54 cmp r2, #84 ; 0x54
80125fa: d802 bhi.n 8012602 <_free_r+0x13e>
80125fc: 0b22 lsrs r2, r4, #12
80125fe: 326e adds r2, #110 ; 0x6e
8012600: e7e3 b.n 80125ca <_free_r+0x106>
8012602: f5b2 7faa cmp.w r2, #340 ; 0x154
8012606: d802 bhi.n 801260e <_free_r+0x14a>
8012608: 0be2 lsrs r2, r4, #15
801260a: 3277 adds r2, #119 ; 0x77
801260c: e7dd b.n 80125ca <_free_r+0x106>
801260e: f240 5154 movw r1, #1364 ; 0x554
8012612: 428a cmp r2, r1
8012614: bf9a itte ls
8012616: 0ca2 lsrls r2, r4, #18
8012618: 327c addls r2, #124 ; 0x7c
801261a: 227e movhi r2, #126 ; 0x7e
801261c: e7d5 b.n 80125ca <_free_r+0x106>
801261e: 6889 ldr r1, [r1, #8]
8012620: 428e cmp r6, r1
8012622: d004 beq.n 801262e <_free_r+0x16a>
8012624: 684a ldr r2, [r1, #4]
8012626: f022 0203 bic.w r2, r2, #3
801262a: 42a2 cmp r2, r4
801262c: d8f7 bhi.n 801261e <_free_r+0x15a>
801262e: 68ce ldr r6, [r1, #12]
8012630: e7d9 b.n 80125e6 <_free_r+0x122>
8012632: bdf8 pop {r3, r4, r5, r6, r7, pc}
8012634: 20000464 .word 0x20000464
8012638: 20000870 .word 0x20000870
801263c: 20008d70 .word 0x20008d70
8012640: 2000046c .word 0x2000046c
08012644 <_fwalk_reent>:
8012644: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
8012648: 4606 mov r6, r0
801264a: 4688 mov r8, r1
801264c: f500 7438 add.w r4, r0, #736 ; 0x2e0
8012650: 2700 movs r7, #0
8012652: e9d4 9501 ldrd r9, r5, [r4, #4]
8012656: f1b9 0901 subs.w r9, r9, #1
801265a: d505 bpl.n 8012668 <_fwalk_reent+0x24>
801265c: 6824 ldr r4, [r4, #0]
801265e: 2c00 cmp r4, #0
8012660: d1f7 bne.n 8012652 <_fwalk_reent+0xe>
8012662: 4638 mov r0, r7
8012664: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
8012668: 89ab ldrh r3, [r5, #12]
801266a: 2b01 cmp r3, #1
801266c: d907 bls.n 801267e <_fwalk_reent+0x3a>
801266e: f9b5 300e ldrsh.w r3, [r5, #14]
8012672: 3301 adds r3, #1
8012674: d003 beq.n 801267e <_fwalk_reent+0x3a>
8012676: 4629 mov r1, r5
8012678: 4630 mov r0, r6
801267a: 47c0 blx r8
801267c: 4307 orrs r7, r0
801267e: 3568 adds r5, #104 ; 0x68
8012680: e7e9 b.n 8012656 <_fwalk_reent+0x12>
...
08012684 <_localeconv_r>:
8012684: 4800 ldr r0, [pc, #0] ; (8012688 <_localeconv_r+0x4>)
8012686: 4770 bx lr
8012688: 20000964 .word 0x20000964
0801268c <__retarget_lock_init_recursive>:
801268c: 4770 bx lr
0801268e <__retarget_lock_close_recursive>:
801268e: 4770 bx lr
08012690 <__retarget_lock_acquire_recursive>:
8012690: 4770 bx lr
08012692 <__retarget_lock_release_recursive>:
8012692: 4770 bx lr
08012694 <__swhatbuf_r>:
8012694: b570 push {r4, r5, r6, lr}
8012696: 460e mov r6, r1
8012698: f9b1 100e ldrsh.w r1, [r1, #14]
801269c: 2900 cmp r1, #0
801269e: b096 sub sp, #88 ; 0x58
80126a0: 4614 mov r4, r2
80126a2: 461d mov r5, r3
80126a4: da0a bge.n 80126bc <__swhatbuf_r+0x28>
80126a6: f9b6 100c ldrsh.w r1, [r6, #12]
80126aa: 2300 movs r3, #0
80126ac: f011 0080 ands.w r0, r1, #128 ; 0x80
80126b0: 602b str r3, [r5, #0]
80126b2: d116 bne.n 80126e2 <__swhatbuf_r+0x4e>
80126b4: f44f 6380 mov.w r3, #1024 ; 0x400
80126b8: 6023 str r3, [r4, #0]
80126ba: e015 b.n 80126e8 <__swhatbuf_r+0x54>
80126bc: 466a mov r2, sp
80126be: f001 fd15 bl 80140ec <_fstat_r>
80126c2: 2800 cmp r0, #0
80126c4: dbef blt.n 80126a6 <__swhatbuf_r+0x12>
80126c6: 9a01 ldr r2, [sp, #4]
80126c8: f402 4270 and.w r2, r2, #61440 ; 0xf000
80126cc: f5a2 5300 sub.w r3, r2, #8192 ; 0x2000
80126d0: 425a negs r2, r3
80126d2: 415a adcs r2, r3
80126d4: f44f 6380 mov.w r3, #1024 ; 0x400
80126d8: 602a str r2, [r5, #0]
80126da: f44f 6000 mov.w r0, #2048 ; 0x800
80126de: 6023 str r3, [r4, #0]
80126e0: e002 b.n 80126e8 <__swhatbuf_r+0x54>
80126e2: 2240 movs r2, #64 ; 0x40
80126e4: 6022 str r2, [r4, #0]
80126e6: 4618 mov r0, r3
80126e8: b016 add sp, #88 ; 0x58
80126ea: bd70 pop {r4, r5, r6, pc}
080126ec <__smakebuf_r>:
80126ec: 898b ldrh r3, [r1, #12]
80126ee: b573 push {r0, r1, r4, r5, r6, lr}
80126f0: 079d lsls r5, r3, #30
80126f2: 4606 mov r6, r0
80126f4: 460c mov r4, r1
80126f6: d507 bpl.n 8012708 <__smakebuf_r+0x1c>
80126f8: f104 0343 add.w r3, r4, #67 ; 0x43
80126fc: 6023 str r3, [r4, #0]
80126fe: 6123 str r3, [r4, #16]
8012700: 2301 movs r3, #1
8012702: 6163 str r3, [r4, #20]
8012704: b002 add sp, #8
8012706: bd70 pop {r4, r5, r6, pc}
8012708: ab01 add r3, sp, #4
801270a: 466a mov r2, sp
801270c: f7ff ffc2 bl 8012694 <__swhatbuf_r>
8012710: 9900 ldr r1, [sp, #0]
8012712: 4605 mov r5, r0
8012714: 4630 mov r0, r6
8012716: f000 f829 bl 801276c <_malloc_r>
801271a: b948 cbnz r0, 8012730 <__smakebuf_r+0x44>
801271c: f9b4 300c ldrsh.w r3, [r4, #12]
8012720: 059a lsls r2, r3, #22
8012722: d4ef bmi.n 8012704 <__smakebuf_r+0x18>
8012724: f023 0303 bic.w r3, r3, #3
8012728: f043 0302 orr.w r3, r3, #2
801272c: 81a3 strh r3, [r4, #12]
801272e: e7e3 b.n 80126f8 <__smakebuf_r+0xc>
8012730: 4b0d ldr r3, [pc, #52] ; (8012768 <__smakebuf_r+0x7c>)
8012732: 63f3 str r3, [r6, #60] ; 0x3c
8012734: 89a3 ldrh r3, [r4, #12]
8012736: 6020 str r0, [r4, #0]
8012738: f043 0380 orr.w r3, r3, #128 ; 0x80
801273c: 81a3 strh r3, [r4, #12]
801273e: 9b00 ldr r3, [sp, #0]
8012740: 6163 str r3, [r4, #20]
8012742: 9b01 ldr r3, [sp, #4]
8012744: 6120 str r0, [r4, #16]
8012746: b15b cbz r3, 8012760 <__smakebuf_r+0x74>
8012748: f9b4 100e ldrsh.w r1, [r4, #14]
801274c: 4630 mov r0, r6
801274e: f001 fe29 bl 80143a4 <_isatty_r>
8012752: b128 cbz r0, 8012760 <__smakebuf_r+0x74>
8012754: 89a3 ldrh r3, [r4, #12]
8012756: f023 0303 bic.w r3, r3, #3
801275a: f043 0301 orr.w r3, r3, #1
801275e: 81a3 strh r3, [r4, #12]
8012760: 89a0 ldrh r0, [r4, #12]
8012762: 4305 orrs r5, r0
8012764: 81a5 strh r5, [r4, #12]
8012766: e7cd b.n 8012704 <__smakebuf_r+0x18>
8012768: 08012369 .word 0x08012369
0801276c <_malloc_r>:
801276c: f101 030b add.w r3, r1, #11
8012770: 2b16 cmp r3, #22
8012772: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
8012776: 4605 mov r5, r0
8012778: d906 bls.n 8012788 <_malloc_r+0x1c>
801277a: f033 0707 bics.w r7, r3, #7
801277e: d504 bpl.n 801278a <_malloc_r+0x1e>
8012780: 230c movs r3, #12
8012782: 602b str r3, [r5, #0]
8012784: 2400 movs r4, #0
8012786: e1a5 b.n 8012ad4 <_malloc_r+0x368>
8012788: 2710 movs r7, #16
801278a: 42b9 cmp r1, r7
801278c: d8f8 bhi.n 8012780 <_malloc_r+0x14>
801278e: 4628 mov r0, r5
8012790: f000 fa28 bl 8012be4 <__malloc_lock>
8012794: f5b7 7ffc cmp.w r7, #504 ; 0x1f8
8012798: 4eb0 ldr r6, [pc, #704] ; (8012a5c <_malloc_r+0x2f0>)
801279a: d237 bcs.n 801280c <_malloc_r+0xa0>
801279c: f107 0208 add.w r2, r7, #8
80127a0: 4432 add r2, r6
80127a2: f1a2 0108 sub.w r1, r2, #8
80127a6: 6854 ldr r4, [r2, #4]
80127a8: 428c cmp r4, r1
80127aa: ea4f 03d7 mov.w r3, r7, lsr #3
80127ae: d102 bne.n 80127b6 <_malloc_r+0x4a>
80127b0: 68d4 ldr r4, [r2, #12]
80127b2: 42a2 cmp r2, r4
80127b4: d010 beq.n 80127d8 <_malloc_r+0x6c>
80127b6: 6863 ldr r3, [r4, #4]
80127b8: e9d4 1202 ldrd r1, r2, [r4, #8]
80127bc: f023 0303 bic.w r3, r3, #3
80127c0: 60ca str r2, [r1, #12]
80127c2: 4423 add r3, r4
80127c4: 6091 str r1, [r2, #8]
80127c6: 685a ldr r2, [r3, #4]
80127c8: f042 0201 orr.w r2, r2, #1
80127cc: 605a str r2, [r3, #4]
80127ce: 4628 mov r0, r5
80127d0: f000 fa0e bl 8012bf0 <__malloc_unlock>
80127d4: 3408 adds r4, #8
80127d6: e17d b.n 8012ad4 <_malloc_r+0x368>
80127d8: 3302 adds r3, #2
80127da: 6934 ldr r4, [r6, #16]
80127dc: 49a0 ldr r1, [pc, #640] ; (8012a60 <_malloc_r+0x2f4>)
80127de: 428c cmp r4, r1
80127e0: d077 beq.n 80128d2 <_malloc_r+0x166>
80127e2: 6862 ldr r2, [r4, #4]
80127e4: f022 0c03 bic.w ip, r2, #3
80127e8: ebac 0007 sub.w r0, ip, r7
80127ec: 280f cmp r0, #15
80127ee: dd48 ble.n 8012882 <_malloc_r+0x116>
80127f0: 19e2 adds r2, r4, r7
80127f2: f040 0301 orr.w r3, r0, #1
80127f6: f047 0701 orr.w r7, r7, #1
80127fa: 6067 str r7, [r4, #4]
80127fc: e9c6 2204 strd r2, r2, [r6, #16]
8012800: e9c2 1102 strd r1, r1, [r2, #8]
8012804: 6053 str r3, [r2, #4]
8012806: f844 000c str.w r0, [r4, ip]
801280a: e7e0 b.n 80127ce <_malloc_r+0x62>
801280c: 0a7b lsrs r3, r7, #9
801280e: d02a beq.n 8012866 <_malloc_r+0xfa>
8012810: 2b04 cmp r3, #4
8012812: d812 bhi.n 801283a <_malloc_r+0xce>
8012814: 09bb lsrs r3, r7, #6
8012816: 3338 adds r3, #56 ; 0x38
8012818: 1c5a adds r2, r3, #1
801281a: eb06 02c2 add.w r2, r6, r2, lsl #3
801281e: f1a2 0c08 sub.w ip, r2, #8
8012822: 6854 ldr r4, [r2, #4]
8012824: 4564 cmp r4, ip
8012826: d006 beq.n 8012836 <_malloc_r+0xca>
8012828: 6862 ldr r2, [r4, #4]
801282a: f022 0203 bic.w r2, r2, #3
801282e: 1bd0 subs r0, r2, r7
8012830: 280f cmp r0, #15
8012832: dd1c ble.n 801286e <_malloc_r+0x102>
8012834: 3b01 subs r3, #1
8012836: 3301 adds r3, #1
8012838: e7cf b.n 80127da <_malloc_r+0x6e>
801283a: 2b14 cmp r3, #20
801283c: d801 bhi.n 8012842 <_malloc_r+0xd6>
801283e: 335b adds r3, #91 ; 0x5b
8012840: e7ea b.n 8012818 <_malloc_r+0xac>
8012842: 2b54 cmp r3, #84 ; 0x54
8012844: d802 bhi.n 801284c <_malloc_r+0xe0>
8012846: 0b3b lsrs r3, r7, #12
8012848: 336e adds r3, #110 ; 0x6e
801284a: e7e5 b.n 8012818 <_malloc_r+0xac>
801284c: f5b3 7faa cmp.w r3, #340 ; 0x154
8012850: d802 bhi.n 8012858 <_malloc_r+0xec>
8012852: 0bfb lsrs r3, r7, #15
8012854: 3377 adds r3, #119 ; 0x77
8012856: e7df b.n 8012818 <_malloc_r+0xac>
8012858: f240 5254 movw r2, #1364 ; 0x554
801285c: 4293 cmp r3, r2
801285e: d804 bhi.n 801286a <_malloc_r+0xfe>
8012860: 0cbb lsrs r3, r7, #18
8012862: 337c adds r3, #124 ; 0x7c
8012864: e7d8 b.n 8012818 <_malloc_r+0xac>
8012866: 233f movs r3, #63 ; 0x3f
8012868: e7d6 b.n 8012818 <_malloc_r+0xac>
801286a: 237e movs r3, #126 ; 0x7e
801286c: e7d4 b.n 8012818 <_malloc_r+0xac>
801286e: 2800 cmp r0, #0
8012870: 68e1 ldr r1, [r4, #12]
8012872: db04 blt.n 801287e <_malloc_r+0x112>
8012874: 68a3 ldr r3, [r4, #8]
8012876: 60d9 str r1, [r3, #12]
8012878: 608b str r3, [r1, #8]
801287a: 18a3 adds r3, r4, r2
801287c: e7a3 b.n 80127c6 <_malloc_r+0x5a>
801287e: 460c mov r4, r1
8012880: e7d0 b.n 8012824 <_malloc_r+0xb8>
8012882: 2800 cmp r0, #0
8012884: e9c6 1104 strd r1, r1, [r6, #16]
8012888: db07 blt.n 801289a <_malloc_r+0x12e>
801288a: 44a4 add ip, r4
801288c: f8dc 3004 ldr.w r3, [ip, #4]
8012890: f043 0301 orr.w r3, r3, #1
8012894: f8cc 3004 str.w r3, [ip, #4]
8012898: e799 b.n 80127ce <_malloc_r+0x62>
801289a: f5bc 7f00 cmp.w ip, #512 ; 0x200
801289e: 6870 ldr r0, [r6, #4]
80128a0: f080 8096 bcs.w 80129d0 <_malloc_r+0x264>
80128a4: ea4f 02dc mov.w r2, ip, lsr #3
80128a8: ea4f 1e5c mov.w lr, ip, lsr #5
80128ac: f04f 0c01 mov.w ip, #1
80128b0: 3201 adds r2, #1
80128b2: fa0c fc0e lsl.w ip, ip, lr
80128b6: ea4c 0000 orr.w r0, ip, r0
80128ba: 6070 str r0, [r6, #4]
80128bc: f856 c032 ldr.w ip, [r6, r2, lsl #3]
80128c0: eb06 00c2 add.w r0, r6, r2, lsl #3
80128c4: 3808 subs r0, #8
80128c6: e9c4 c002 strd ip, r0, [r4, #8]
80128ca: f846 4032 str.w r4, [r6, r2, lsl #3]
80128ce: f8cc 400c str.w r4, [ip, #12]
80128d2: 2001 movs r0, #1
80128d4: 109a asrs r2, r3, #2
80128d6: fa00 f202 lsl.w r2, r0, r2
80128da: 6870 ldr r0, [r6, #4]
80128dc: 4290 cmp r0, r2
80128de: d326 bcc.n 801292e <_malloc_r+0x1c2>
80128e0: 4210 tst r0, r2
80128e2: d106 bne.n 80128f2 <_malloc_r+0x186>
80128e4: f023 0303 bic.w r3, r3, #3
80128e8: 0052 lsls r2, r2, #1
80128ea: 4210 tst r0, r2
80128ec: f103 0304 add.w r3, r3, #4
80128f0: d0fa beq.n 80128e8 <_malloc_r+0x17c>
80128f2: eb06 08c3 add.w r8, r6, r3, lsl #3
80128f6: 46c1 mov r9, r8
80128f8: 469e mov lr, r3
80128fa: f8d9 400c ldr.w r4, [r9, #12]
80128fe: 454c cmp r4, r9
8012900: f040 80ba bne.w 8012a78 <_malloc_r+0x30c>
8012904: f10e 0e01 add.w lr, lr, #1
8012908: f01e 0f03 tst.w lr, #3
801290c: f109 0908 add.w r9, r9, #8
8012910: d1f3 bne.n 80128fa <_malloc_r+0x18e>
8012912: 0798 lsls r0, r3, #30
8012914: f040 80e4 bne.w 8012ae0 <_malloc_r+0x374>
8012918: 6873 ldr r3, [r6, #4]
801291a: ea23 0302 bic.w r3, r3, r2
801291e: 6073 str r3, [r6, #4]
8012920: 6870 ldr r0, [r6, #4]
8012922: 0052 lsls r2, r2, #1
8012924: 4290 cmp r0, r2
8012926: d302 bcc.n 801292e <_malloc_r+0x1c2>
8012928: 2a00 cmp r2, #0
801292a: f040 80e6 bne.w 8012afa <_malloc_r+0x38e>
801292e: f8d6 a008 ldr.w sl, [r6, #8]
8012932: f8da 3004 ldr.w r3, [sl, #4]
8012936: f023 0903 bic.w r9, r3, #3
801293a: 45b9 cmp r9, r7
801293c: d304 bcc.n 8012948 <_malloc_r+0x1dc>
801293e: eba9 0207 sub.w r2, r9, r7
8012942: 2a0f cmp r2, #15
8012944: f300 8142 bgt.w 8012bcc <_malloc_r+0x460>
8012948: 4b46 ldr r3, [pc, #280] ; (8012a64 <_malloc_r+0x2f8>)
801294a: 6819 ldr r1, [r3, #0]
801294c: 3110 adds r1, #16
801294e: 4439 add r1, r7
8012950: 2008 movs r0, #8
8012952: 9101 str r1, [sp, #4]
8012954: f000 fd26 bl 80133a4 <sysconf>
8012958: 4a43 ldr r2, [pc, #268] ; (8012a68 <_malloc_r+0x2fc>)
801295a: 9901 ldr r1, [sp, #4]
801295c: 6813 ldr r3, [r2, #0]
801295e: 3301 adds r3, #1
8012960: bf1f itttt ne
8012962: f101 31ff addne.w r1, r1, #4294967295
8012966: 1809 addne r1, r1, r0
8012968: 4243 negne r3, r0
801296a: 4019 andne r1, r3
801296c: 4680 mov r8, r0
801296e: 4628 mov r0, r5
8012970: 9101 str r1, [sp, #4]
8012972: f000 fcb1 bl 80132d8 <_sbrk_r>
8012976: 1c42 adds r2, r0, #1
8012978: eb0a 0b09 add.w fp, sl, r9
801297c: 4604 mov r4, r0
801297e: f000 80f8 beq.w 8012b72 <_malloc_r+0x406>
8012982: 4583 cmp fp, r0
8012984: 9901 ldr r1, [sp, #4]
8012986: 4a38 ldr r2, [pc, #224] ; (8012a68 <_malloc_r+0x2fc>)
8012988: d902 bls.n 8012990 <_malloc_r+0x224>
801298a: 45b2 cmp sl, r6
801298c: f040 80f1 bne.w 8012b72 <_malloc_r+0x406>
8012990: 4b36 ldr r3, [pc, #216] ; (8012a6c <_malloc_r+0x300>)
8012992: 6818 ldr r0, [r3, #0]
8012994: 45a3 cmp fp, r4
8012996: eb00 0e01 add.w lr, r0, r1
801299a: f8c3 e000 str.w lr, [r3]
801299e: f108 3cff add.w ip, r8, #4294967295
80129a2: f040 80ac bne.w 8012afe <_malloc_r+0x392>
80129a6: ea1b 0f0c tst.w fp, ip
80129aa: f040 80a8 bne.w 8012afe <_malloc_r+0x392>
80129ae: 68b2 ldr r2, [r6, #8]
80129b0: 4449 add r1, r9
80129b2: f041 0101 orr.w r1, r1, #1
80129b6: 6051 str r1, [r2, #4]
80129b8: 4a2d ldr r2, [pc, #180] ; (8012a70 <_malloc_r+0x304>)
80129ba: 681b ldr r3, [r3, #0]
80129bc: 6811 ldr r1, [r2, #0]
80129be: 428b cmp r3, r1
80129c0: bf88 it hi
80129c2: 6013 strhi r3, [r2, #0]
80129c4: 4a2b ldr r2, [pc, #172] ; (8012a74 <_malloc_r+0x308>)
80129c6: 6811 ldr r1, [r2, #0]
80129c8: 428b cmp r3, r1
80129ca: bf88 it hi
80129cc: 6013 strhi r3, [r2, #0]
80129ce: e0d0 b.n 8012b72 <_malloc_r+0x406>
80129d0: f5bc 6f20 cmp.w ip, #2560 ; 0xa00
80129d4: ea4f 225c mov.w r2, ip, lsr #9
80129d8: d218 bcs.n 8012a0c <_malloc_r+0x2a0>
80129da: ea4f 129c mov.w r2, ip, lsr #6
80129de: 3238 adds r2, #56 ; 0x38
80129e0: f102 0e01 add.w lr, r2, #1
80129e4: eb06 08c2 add.w r8, r6, r2, lsl #3
80129e8: f856 e03e ldr.w lr, [r6, lr, lsl #3]
80129ec: 45f0 cmp r8, lr
80129ee: d12b bne.n 8012a48 <_malloc_r+0x2dc>
80129f0: 1092 asrs r2, r2, #2
80129f2: f04f 0c01 mov.w ip, #1
80129f6: fa0c f202 lsl.w r2, ip, r2
80129fa: 4310 orrs r0, r2
80129fc: 6070 str r0, [r6, #4]
80129fe: e9c4 e802 strd lr, r8, [r4, #8]
8012a02: f8c8 4008 str.w r4, [r8, #8]
8012a06: f8ce 400c str.w r4, [lr, #12]
8012a0a: e762 b.n 80128d2 <_malloc_r+0x166>
8012a0c: 2a14 cmp r2, #20
8012a0e: d801 bhi.n 8012a14 <_malloc_r+0x2a8>
8012a10: 325b adds r2, #91 ; 0x5b
8012a12: e7e5 b.n 80129e0 <_malloc_r+0x274>
8012a14: 2a54 cmp r2, #84 ; 0x54
8012a16: d803 bhi.n 8012a20 <_malloc_r+0x2b4>
8012a18: ea4f 321c mov.w r2, ip, lsr #12
8012a1c: 326e adds r2, #110 ; 0x6e
8012a1e: e7df b.n 80129e0 <_malloc_r+0x274>
8012a20: f5b2 7faa cmp.w r2, #340 ; 0x154
8012a24: d803 bhi.n 8012a2e <_malloc_r+0x2c2>
8012a26: ea4f 32dc mov.w r2, ip, lsr #15
8012a2a: 3277 adds r2, #119 ; 0x77
8012a2c: e7d8 b.n 80129e0 <_malloc_r+0x274>
8012a2e: f240 5e54 movw lr, #1364 ; 0x554
8012a32: 4572 cmp r2, lr
8012a34: bf9a itte ls
8012a36: ea4f 429c movls.w r2, ip, lsr #18
8012a3a: 327c addls r2, #124 ; 0x7c
8012a3c: 227e movhi r2, #126 ; 0x7e
8012a3e: e7cf b.n 80129e0 <_malloc_r+0x274>
8012a40: f8de e008 ldr.w lr, [lr, #8]
8012a44: 45f0 cmp r8, lr
8012a46: d005 beq.n 8012a54 <_malloc_r+0x2e8>
8012a48: f8de 2004 ldr.w r2, [lr, #4]
8012a4c: f022 0203 bic.w r2, r2, #3
8012a50: 4562 cmp r2, ip
8012a52: d8f5 bhi.n 8012a40 <_malloc_r+0x2d4>
8012a54: f8de 800c ldr.w r8, [lr, #12]
8012a58: e7d1 b.n 80129fe <_malloc_r+0x292>
8012a5a: bf00 nop
8012a5c: 20000464 .word 0x20000464
8012a60: 2000046c .word 0x2000046c
8012a64: 20008d70 .word 0x20008d70
8012a68: 2000086c .word 0x2000086c
8012a6c: 20008d40 .word 0x20008d40
8012a70: 20008d68 .word 0x20008d68
8012a74: 20008d6c .word 0x20008d6c
8012a78: 6860 ldr r0, [r4, #4]
8012a7a: f8d4 c00c ldr.w ip, [r4, #12]
8012a7e: f020 0003 bic.w r0, r0, #3
8012a82: eba0 0a07 sub.w sl, r0, r7
8012a86: f1ba 0f0f cmp.w sl, #15
8012a8a: dd12 ble.n 8012ab2 <_malloc_r+0x346>
8012a8c: 68a3 ldr r3, [r4, #8]
8012a8e: 19e2 adds r2, r4, r7
8012a90: f047 0701 orr.w r7, r7, #1
8012a94: 6067 str r7, [r4, #4]
8012a96: f8c3 c00c str.w ip, [r3, #12]
8012a9a: f8cc 3008 str.w r3, [ip, #8]
8012a9e: f04a 0301 orr.w r3, sl, #1
8012aa2: e9c6 2204 strd r2, r2, [r6, #16]
8012aa6: e9c2 1102 strd r1, r1, [r2, #8]
8012aaa: 6053 str r3, [r2, #4]
8012aac: f844 a000 str.w sl, [r4, r0]
8012ab0: e68d b.n 80127ce <_malloc_r+0x62>
8012ab2: f1ba 0f00 cmp.w sl, #0
8012ab6: db11 blt.n 8012adc <_malloc_r+0x370>
8012ab8: 4420 add r0, r4
8012aba: 6843 ldr r3, [r0, #4]
8012abc: f043 0301 orr.w r3, r3, #1
8012ac0: 6043 str r3, [r0, #4]
8012ac2: f854 3f08 ldr.w r3, [r4, #8]!
8012ac6: 4628 mov r0, r5
8012ac8: f8c3 c00c str.w ip, [r3, #12]
8012acc: f8cc 3008 str.w r3, [ip, #8]
8012ad0: f000 f88e bl 8012bf0 <__malloc_unlock>
8012ad4: 4620 mov r0, r4
8012ad6: b003 add sp, #12
8012ad8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8012adc: 4664 mov r4, ip
8012ade: e70e b.n 80128fe <_malloc_r+0x192>
8012ae0: f858 0908 ldr.w r0, [r8], #-8
8012ae4: 4540 cmp r0, r8
8012ae6: f103 33ff add.w r3, r3, #4294967295
8012aea: f43f af12 beq.w 8012912 <_malloc_r+0x1a6>
8012aee: e717 b.n 8012920 <_malloc_r+0x1b4>
8012af0: 3304 adds r3, #4
8012af2: 0052 lsls r2, r2, #1
8012af4: 4210 tst r0, r2
8012af6: d0fb beq.n 8012af0 <_malloc_r+0x384>
8012af8: e6fb b.n 80128f2 <_malloc_r+0x186>
8012afa: 4673 mov r3, lr
8012afc: e7fa b.n 8012af4 <_malloc_r+0x388>
8012afe: 6810 ldr r0, [r2, #0]
8012b00: 3001 adds r0, #1
8012b02: bf1b ittet ne
8012b04: eba4 0b0b subne.w fp, r4, fp
8012b08: eb0b 020e addne.w r2, fp, lr
8012b0c: 6014 streq r4, [r2, #0]
8012b0e: 601a strne r2, [r3, #0]
8012b10: f014 0b07 ands.w fp, r4, #7
8012b14: bf1a itte ne
8012b16: f1cb 0008 rsbne r0, fp, #8
8012b1a: 1824 addne r4, r4, r0
8012b1c: 4658 moveq r0, fp
8012b1e: 1862 adds r2, r4, r1
8012b20: ea02 010c and.w r1, r2, ip
8012b24: 4480 add r8, r0
8012b26: eba8 0801 sub.w r8, r8, r1
8012b2a: ea08 080c and.w r8, r8, ip
8012b2e: 4641 mov r1, r8
8012b30: 4628 mov r0, r5
8012b32: 9201 str r2, [sp, #4]
8012b34: f000 fbd0 bl 80132d8 <_sbrk_r>
8012b38: 1c43 adds r3, r0, #1
8012b3a: 9a01 ldr r2, [sp, #4]
8012b3c: 4b28 ldr r3, [pc, #160] ; (8012be0 <_malloc_r+0x474>)
8012b3e: d107 bne.n 8012b50 <_malloc_r+0x3e4>
8012b40: f1bb 0f00 cmp.w fp, #0
8012b44: d023 beq.n 8012b8e <_malloc_r+0x422>
8012b46: f1ab 0008 sub.w r0, fp, #8
8012b4a: 4410 add r0, r2
8012b4c: f04f 0800 mov.w r8, #0
8012b50: 681a ldr r2, [r3, #0]
8012b52: 60b4 str r4, [r6, #8]
8012b54: 1b00 subs r0, r0, r4
8012b56: 4440 add r0, r8
8012b58: 4442 add r2, r8
8012b5a: f040 0001 orr.w r0, r0, #1
8012b5e: 45b2 cmp sl, r6
8012b60: 601a str r2, [r3, #0]
8012b62: 6060 str r0, [r4, #4]
8012b64: f43f af28 beq.w 80129b8 <_malloc_r+0x24c>
8012b68: f1b9 0f0f cmp.w r9, #15
8012b6c: d812 bhi.n 8012b94 <_malloc_r+0x428>
8012b6e: 2301 movs r3, #1
8012b70: 6063 str r3, [r4, #4]
8012b72: 68b3 ldr r3, [r6, #8]
8012b74: 685b ldr r3, [r3, #4]
8012b76: f023 0303 bic.w r3, r3, #3
8012b7a: 42bb cmp r3, r7
8012b7c: eba3 0207 sub.w r2, r3, r7
8012b80: d301 bcc.n 8012b86 <_malloc_r+0x41a>
8012b82: 2a0f cmp r2, #15
8012b84: dc22 bgt.n 8012bcc <_malloc_r+0x460>
8012b86: 4628 mov r0, r5
8012b88: f000 f832 bl 8012bf0 <__malloc_unlock>
8012b8c: e5fa b.n 8012784 <_malloc_r+0x18>
8012b8e: 4610 mov r0, r2
8012b90: 46d8 mov r8, fp
8012b92: e7dd b.n 8012b50 <_malloc_r+0x3e4>
8012b94: f8da 2004 ldr.w r2, [sl, #4]
8012b98: f1a9 090c sub.w r9, r9, #12
8012b9c: f029 0907 bic.w r9, r9, #7
8012ba0: f002 0201 and.w r2, r2, #1
8012ba4: ea42 0209 orr.w r2, r2, r9
8012ba8: f8ca 2004 str.w r2, [sl, #4]
8012bac: 2105 movs r1, #5
8012bae: eb0a 0209 add.w r2, sl, r9
8012bb2: f1b9 0f0f cmp.w r9, #15
8012bb6: e9c2 1101 strd r1, r1, [r2, #4]
8012bba: f67f aefd bls.w 80129b8 <_malloc_r+0x24c>
8012bbe: f10a 0108 add.w r1, sl, #8
8012bc2: 4628 mov r0, r5
8012bc4: f7ff fc7e bl 80124c4 <_free_r>
8012bc8: 4b05 ldr r3, [pc, #20] ; (8012be0 <_malloc_r+0x474>)
8012bca: e6f5 b.n 80129b8 <_malloc_r+0x24c>
8012bcc: 68b4 ldr r4, [r6, #8]
8012bce: f047 0301 orr.w r3, r7, #1
8012bd2: 4427 add r7, r4
8012bd4: f042 0201 orr.w r2, r2, #1
8012bd8: 6063 str r3, [r4, #4]
8012bda: 60b7 str r7, [r6, #8]
8012bdc: 607a str r2, [r7, #4]
8012bde: e5f6 b.n 80127ce <_malloc_r+0x62>
8012be0: 20008d40 .word 0x20008d40
08012be4 <__malloc_lock>:
8012be4: 4801 ldr r0, [pc, #4] ; (8012bec <__malloc_lock+0x8>)
8012be6: f7ff bd53 b.w 8012690 <__retarget_lock_acquire_recursive>
8012bea: bf00 nop
8012bec: 20008d3b .word 0x20008d3b
08012bf0 <__malloc_unlock>:
8012bf0: 4801 ldr r0, [pc, #4] ; (8012bf8 <__malloc_unlock+0x8>)
8012bf2: f7ff bd4e b.w 8012692 <__retarget_lock_release_recursive>
8012bf6: bf00 nop
8012bf8: 20008d3b .word 0x20008d3b
08012bfc <_Balloc>:
8012bfc: 6cc3 ldr r3, [r0, #76] ; 0x4c
8012bfe: b570 push {r4, r5, r6, lr}
8012c00: 4605 mov r5, r0
8012c02: 460c mov r4, r1
8012c04: b17b cbz r3, 8012c26 <_Balloc+0x2a>
8012c06: 6ceb ldr r3, [r5, #76] ; 0x4c
8012c08: f853 0024 ldr.w r0, [r3, r4, lsl #2]
8012c0c: b9a0 cbnz r0, 8012c38 <_Balloc+0x3c>
8012c0e: 2101 movs r1, #1
8012c10: fa01 f604 lsl.w r6, r1, r4
8012c14: 1d72 adds r2, r6, #5
8012c16: 0092 lsls r2, r2, #2
8012c18: 4628 mov r0, r5
8012c1a: f001 f94b bl 8013eb4 <_calloc_r>
8012c1e: b148 cbz r0, 8012c34 <_Balloc+0x38>
8012c20: e9c0 4601 strd r4, r6, [r0, #4]
8012c24: e00b b.n 8012c3e <_Balloc+0x42>
8012c26: 2221 movs r2, #33 ; 0x21
8012c28: 2104 movs r1, #4
8012c2a: f001 f943 bl 8013eb4 <_calloc_r>
8012c2e: 64e8 str r0, [r5, #76] ; 0x4c
8012c30: 2800 cmp r0, #0
8012c32: d1e8 bne.n 8012c06 <_Balloc+0xa>
8012c34: 2000 movs r0, #0
8012c36: bd70 pop {r4, r5, r6, pc}
8012c38: 6802 ldr r2, [r0, #0]
8012c3a: f843 2024 str.w r2, [r3, r4, lsl #2]
8012c3e: 2300 movs r3, #0
8012c40: e9c0 3303 strd r3, r3, [r0, #12]
8012c44: e7f7 b.n 8012c36 <_Balloc+0x3a>
08012c46 <_Bfree>:
8012c46: b131 cbz r1, 8012c56 <_Bfree+0x10>
8012c48: 6cc3 ldr r3, [r0, #76] ; 0x4c
8012c4a: 684a ldr r2, [r1, #4]
8012c4c: f853 0022 ldr.w r0, [r3, r2, lsl #2]
8012c50: 6008 str r0, [r1, #0]
8012c52: f843 1022 str.w r1, [r3, r2, lsl #2]
8012c56: 4770 bx lr
08012c58 <__multadd>:
8012c58: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
8012c5c: 690d ldr r5, [r1, #16]
8012c5e: 4607 mov r7, r0
8012c60: 460c mov r4, r1
8012c62: 461e mov r6, r3
8012c64: f101 0c14 add.w ip, r1, #20
8012c68: 2000 movs r0, #0
8012c6a: f8dc 3000 ldr.w r3, [ip]
8012c6e: b299 uxth r1, r3
8012c70: fb02 6101 mla r1, r2, r1, r6
8012c74: 0c1e lsrs r6, r3, #16
8012c76: 0c0b lsrs r3, r1, #16
8012c78: fb02 3306 mla r3, r2, r6, r3
8012c7c: b289 uxth r1, r1
8012c7e: 3001 adds r0, #1
8012c80: eb01 4103 add.w r1, r1, r3, lsl #16
8012c84: 4285 cmp r5, r0
8012c86: f84c 1b04 str.w r1, [ip], #4
8012c8a: ea4f 4613 mov.w r6, r3, lsr #16
8012c8e: dcec bgt.n 8012c6a <__multadd+0x12>
8012c90: b30e cbz r6, 8012cd6 <__multadd+0x7e>
8012c92: 68a3 ldr r3, [r4, #8]
8012c94: 42ab cmp r3, r5
8012c96: dc19 bgt.n 8012ccc <__multadd+0x74>
8012c98: 6861 ldr r1, [r4, #4]
8012c9a: 4638 mov r0, r7
8012c9c: 3101 adds r1, #1
8012c9e: f7ff ffad bl 8012bfc <_Balloc>
8012ca2: 4680 mov r8, r0
8012ca4: b928 cbnz r0, 8012cb2 <__multadd+0x5a>
8012ca6: 4602 mov r2, r0
8012ca8: 4b0c ldr r3, [pc, #48] ; (8012cdc <__multadd+0x84>)
8012caa: 480d ldr r0, [pc, #52] ; (8012ce0 <__multadd+0x88>)
8012cac: 21b5 movs r1, #181 ; 0xb5
8012cae: f001 f8e3 bl 8013e78 <__assert_func>
8012cb2: 6922 ldr r2, [r4, #16]
8012cb4: 3202 adds r2, #2
8012cb6: f104 010c add.w r1, r4, #12
8012cba: 0092 lsls r2, r2, #2
8012cbc: 300c adds r0, #12
8012cbe: f7fd f8cb bl 800fe58 <memcpy>
8012cc2: 4621 mov r1, r4
8012cc4: 4638 mov r0, r7
8012cc6: f7ff ffbe bl 8012c46 <_Bfree>
8012cca: 4644 mov r4, r8
8012ccc: eb04 0385 add.w r3, r4, r5, lsl #2
8012cd0: 3501 adds r5, #1
8012cd2: 615e str r6, [r3, #20]
8012cd4: 6125 str r5, [r4, #16]
8012cd6: 4620 mov r0, r4
8012cd8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
8012cdc: 08017a41 .word 0x08017a41
8012ce0: 08017aad .word 0x08017aad
08012ce4 <__hi0bits>:
8012ce4: 0c03 lsrs r3, r0, #16
8012ce6: 041b lsls r3, r3, #16
8012ce8: b9d3 cbnz r3, 8012d20 <__hi0bits+0x3c>
8012cea: 0400 lsls r0, r0, #16
8012cec: 2310 movs r3, #16
8012cee: f010 4f7f tst.w r0, #4278190080 ; 0xff000000
8012cf2: bf04 itt eq
8012cf4: 0200 lsleq r0, r0, #8
8012cf6: 3308 addeq r3, #8
8012cf8: f010 4f70 tst.w r0, #4026531840 ; 0xf0000000
8012cfc: bf04 itt eq
8012cfe: 0100 lsleq r0, r0, #4
8012d00: 3304 addeq r3, #4
8012d02: f010 4f40 tst.w r0, #3221225472 ; 0xc0000000
8012d06: bf04 itt eq
8012d08: 0080 lsleq r0, r0, #2
8012d0a: 3302 addeq r3, #2
8012d0c: 2800 cmp r0, #0
8012d0e: db05 blt.n 8012d1c <__hi0bits+0x38>
8012d10: f010 4f80 tst.w r0, #1073741824 ; 0x40000000
8012d14: f103 0301 add.w r3, r3, #1
8012d18: bf08 it eq
8012d1a: 2320 moveq r3, #32
8012d1c: 4618 mov r0, r3
8012d1e: 4770 bx lr
8012d20: 2300 movs r3, #0
8012d22: e7e4 b.n 8012cee <__hi0bits+0xa>
08012d24 <__lo0bits>:
8012d24: 6803 ldr r3, [r0, #0]
8012d26: f013 0207 ands.w r2, r3, #7
8012d2a: 4601 mov r1, r0
8012d2c: d00b beq.n 8012d46 <__lo0bits+0x22>
8012d2e: 07da lsls r2, r3, #31
8012d30: d423 bmi.n 8012d7a <__lo0bits+0x56>
8012d32: 0798 lsls r0, r3, #30
8012d34: bf49 itett mi
8012d36: 085b lsrmi r3, r3, #1
8012d38: 089b lsrpl r3, r3, #2
8012d3a: 2001 movmi r0, #1
8012d3c: 600b strmi r3, [r1, #0]
8012d3e: bf5c itt pl
8012d40: 600b strpl r3, [r1, #0]
8012d42: 2002 movpl r0, #2
8012d44: 4770 bx lr
8012d46: b298 uxth r0, r3
8012d48: b9a8 cbnz r0, 8012d76 <__lo0bits+0x52>
8012d4a: 0c1b lsrs r3, r3, #16
8012d4c: 2010 movs r0, #16
8012d4e: b2da uxtb r2, r3
8012d50: b90a cbnz r2, 8012d56 <__lo0bits+0x32>
8012d52: 3008 adds r0, #8
8012d54: 0a1b lsrs r3, r3, #8
8012d56: 071a lsls r2, r3, #28
8012d58: bf04 itt eq
8012d5a: 091b lsreq r3, r3, #4
8012d5c: 3004 addeq r0, #4
8012d5e: 079a lsls r2, r3, #30
8012d60: bf04 itt eq
8012d62: 089b lsreq r3, r3, #2
8012d64: 3002 addeq r0, #2
8012d66: 07da lsls r2, r3, #31
8012d68: d403 bmi.n 8012d72 <__lo0bits+0x4e>
8012d6a: 085b lsrs r3, r3, #1
8012d6c: f100 0001 add.w r0, r0, #1
8012d70: d005 beq.n 8012d7e <__lo0bits+0x5a>
8012d72: 600b str r3, [r1, #0]
8012d74: 4770 bx lr
8012d76: 4610 mov r0, r2
8012d78: e7e9 b.n 8012d4e <__lo0bits+0x2a>
8012d7a: 2000 movs r0, #0
8012d7c: 4770 bx lr
8012d7e: 2020 movs r0, #32
8012d80: 4770 bx lr
...
08012d84 <__i2b>:
8012d84: b510 push {r4, lr}
8012d86: 460c mov r4, r1
8012d88: 2101 movs r1, #1
8012d8a: f7ff ff37 bl 8012bfc <_Balloc>
8012d8e: 4602 mov r2, r0
8012d90: b928 cbnz r0, 8012d9e <__i2b+0x1a>
8012d92: 4b05 ldr r3, [pc, #20] ; (8012da8 <__i2b+0x24>)
8012d94: 4805 ldr r0, [pc, #20] ; (8012dac <__i2b+0x28>)
8012d96: f44f 71a0 mov.w r1, #320 ; 0x140
8012d9a: f001 f86d bl 8013e78 <__assert_func>
8012d9e: 2301 movs r3, #1
8012da0: 6144 str r4, [r0, #20]
8012da2: 6103 str r3, [r0, #16]
8012da4: bd10 pop {r4, pc}
8012da6: bf00 nop
8012da8: 08017a41 .word 0x08017a41
8012dac: 08017aad .word 0x08017aad
08012db0 <__multiply>:
8012db0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
8012db4: 4691 mov r9, r2
8012db6: 690a ldr r2, [r1, #16]
8012db8: f8d9 3010 ldr.w r3, [r9, #16]
8012dbc: 429a cmp r2, r3
8012dbe: bfb8 it lt
8012dc0: 460b movlt r3, r1
8012dc2: 460c mov r4, r1
8012dc4: bfbc itt lt
8012dc6: 464c movlt r4, r9
8012dc8: 4699 movlt r9, r3
8012dca: 6927 ldr r7, [r4, #16]
8012dcc: f8d9 a010 ldr.w sl, [r9, #16]
8012dd0: 68a3 ldr r3, [r4, #8]
8012dd2: 6861 ldr r1, [r4, #4]
8012dd4: eb07 060a add.w r6, r7, sl
8012dd8: 42b3 cmp r3, r6
8012dda: b085 sub sp, #20
8012ddc: bfb8 it lt
8012dde: 3101 addlt r1, #1
8012de0: f7ff ff0c bl 8012bfc <_Balloc>
8012de4: b930 cbnz r0, 8012df4 <__multiply+0x44>
8012de6: 4602 mov r2, r0
8012de8: 4b44 ldr r3, [pc, #272] ; (8012efc <__multiply+0x14c>)
8012dea: 4845 ldr r0, [pc, #276] ; (8012f00 <__multiply+0x150>)
8012dec: f240 115d movw r1, #349 ; 0x15d
8012df0: f001 f842 bl 8013e78 <__assert_func>
8012df4: f100 0514 add.w r5, r0, #20
8012df8: eb05 0886 add.w r8, r5, r6, lsl #2
8012dfc: 462b mov r3, r5
8012dfe: 2200 movs r2, #0
8012e00: 4543 cmp r3, r8
8012e02: d321 bcc.n 8012e48 <__multiply+0x98>
8012e04: f104 0314 add.w r3, r4, #20
8012e08: eb03 0787 add.w r7, r3, r7, lsl #2
8012e0c: f109 0314 add.w r3, r9, #20
8012e10: eb03 028a add.w r2, r3, sl, lsl #2
8012e14: 9202 str r2, [sp, #8]
8012e16: 1b3a subs r2, r7, r4
8012e18: 3a15 subs r2, #21
8012e1a: f022 0203 bic.w r2, r2, #3
8012e1e: 3204 adds r2, #4
8012e20: f104 0115 add.w r1, r4, #21
8012e24: 428f cmp r7, r1
8012e26: bf38 it cc
8012e28: 2204 movcc r2, #4
8012e2a: 9201 str r2, [sp, #4]
8012e2c: 9a02 ldr r2, [sp, #8]
8012e2e: 9303 str r3, [sp, #12]
8012e30: 429a cmp r2, r3
8012e32: d80c bhi.n 8012e4e <__multiply+0x9e>
8012e34: 2e00 cmp r6, #0
8012e36: dd03 ble.n 8012e40 <__multiply+0x90>
8012e38: f858 3d04 ldr.w r3, [r8, #-4]!
8012e3c: 2b00 cmp r3, #0
8012e3e: d05a beq.n 8012ef6 <__multiply+0x146>
8012e40: 6106 str r6, [r0, #16]
8012e42: b005 add sp, #20
8012e44: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8012e48: f843 2b04 str.w r2, [r3], #4
8012e4c: e7d8 b.n 8012e00 <__multiply+0x50>
8012e4e: f8b3 a000 ldrh.w sl, [r3]
8012e52: f1ba 0f00 cmp.w sl, #0
8012e56: d024 beq.n 8012ea2 <__multiply+0xf2>
8012e58: f104 0e14 add.w lr, r4, #20
8012e5c: 46a9 mov r9, r5
8012e5e: f04f 0c00 mov.w ip, #0
8012e62: f85e 2b04 ldr.w r2, [lr], #4
8012e66: f8d9 1000 ldr.w r1, [r9]
8012e6a: fa1f fb82 uxth.w fp, r2
8012e6e: b289 uxth r1, r1
8012e70: fb0a 110b mla r1, sl, fp, r1
8012e74: ea4f 4b12 mov.w fp, r2, lsr #16
8012e78: f8d9 2000 ldr.w r2, [r9]
8012e7c: 4461 add r1, ip
8012e7e: ea4f 4c12 mov.w ip, r2, lsr #16
8012e82: fb0a c20b mla r2, sl, fp, ip
8012e86: eb02 4211 add.w r2, r2, r1, lsr #16
8012e8a: b289 uxth r1, r1
8012e8c: ea41 4102 orr.w r1, r1, r2, lsl #16
8012e90: 4577 cmp r7, lr
8012e92: f849 1b04 str.w r1, [r9], #4
8012e96: ea4f 4c12 mov.w ip, r2, lsr #16
8012e9a: d8e2 bhi.n 8012e62 <__multiply+0xb2>
8012e9c: 9a01 ldr r2, [sp, #4]
8012e9e: f845 c002 str.w ip, [r5, r2]
8012ea2: 9a03 ldr r2, [sp, #12]
8012ea4: f8b2 9002 ldrh.w r9, [r2, #2]
8012ea8: 3304 adds r3, #4
8012eaa: f1b9 0f00 cmp.w r9, #0
8012eae: d020 beq.n 8012ef2 <__multiply+0x142>
8012eb0: 6829 ldr r1, [r5, #0]
8012eb2: f104 0c14 add.w ip, r4, #20
8012eb6: 46ae mov lr, r5
8012eb8: f04f 0a00 mov.w sl, #0
8012ebc: f8bc b000 ldrh.w fp, [ip]
8012ec0: f8be 2002 ldrh.w r2, [lr, #2]
8012ec4: fb09 220b mla r2, r9, fp, r2
8012ec8: 4492 add sl, r2
8012eca: b289 uxth r1, r1
8012ecc: ea41 410a orr.w r1, r1, sl, lsl #16
8012ed0: f84e 1b04 str.w r1, [lr], #4
8012ed4: f85c 2b04 ldr.w r2, [ip], #4
8012ed8: f8be 1000 ldrh.w r1, [lr]
8012edc: 0c12 lsrs r2, r2, #16
8012ede: fb09 1102 mla r1, r9, r2, r1
8012ee2: eb01 411a add.w r1, r1, sl, lsr #16
8012ee6: 4567 cmp r7, ip
8012ee8: ea4f 4a11 mov.w sl, r1, lsr #16
8012eec: d8e6 bhi.n 8012ebc <__multiply+0x10c>
8012eee: 9a01 ldr r2, [sp, #4]
8012ef0: 50a9 str r1, [r5, r2]
8012ef2: 3504 adds r5, #4
8012ef4: e79a b.n 8012e2c <__multiply+0x7c>
8012ef6: 3e01 subs r6, #1
8012ef8: e79c b.n 8012e34 <__multiply+0x84>
8012efa: bf00 nop
8012efc: 08017a41 .word 0x08017a41
8012f00: 08017aad .word 0x08017aad
08012f04 <__pow5mult>:
8012f04: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
8012f08: 4615 mov r5, r2
8012f0a: f012 0203 ands.w r2, r2, #3
8012f0e: 4606 mov r6, r0
8012f10: 460f mov r7, r1
8012f12: d007 beq.n 8012f24 <__pow5mult+0x20>
8012f14: 4c1a ldr r4, [pc, #104] ; (8012f80 <__pow5mult+0x7c>)
8012f16: 3a01 subs r2, #1
8012f18: 2300 movs r3, #0
8012f1a: f854 2022 ldr.w r2, [r4, r2, lsl #2]
8012f1e: f7ff fe9b bl 8012c58 <__multadd>
8012f22: 4607 mov r7, r0
8012f24: 10ad asrs r5, r5, #2
8012f26: d027 beq.n 8012f78 <__pow5mult+0x74>
8012f28: 6cb4 ldr r4, [r6, #72] ; 0x48
8012f2a: b944 cbnz r4, 8012f3e <__pow5mult+0x3a>
8012f2c: f240 2171 movw r1, #625 ; 0x271
8012f30: 4630 mov r0, r6
8012f32: f7ff ff27 bl 8012d84 <__i2b>
8012f36: 2300 movs r3, #0
8012f38: 64b0 str r0, [r6, #72] ; 0x48
8012f3a: 4604 mov r4, r0
8012f3c: 6003 str r3, [r0, #0]
8012f3e: f04f 0900 mov.w r9, #0
8012f42: 07eb lsls r3, r5, #31
8012f44: d50a bpl.n 8012f5c <__pow5mult+0x58>
8012f46: 4639 mov r1, r7
8012f48: 4622 mov r2, r4
8012f4a: 4630 mov r0, r6
8012f4c: f7ff ff30 bl 8012db0 <__multiply>
8012f50: 4639 mov r1, r7
8012f52: 4680 mov r8, r0
8012f54: 4630 mov r0, r6
8012f56: f7ff fe76 bl 8012c46 <_Bfree>
8012f5a: 4647 mov r7, r8
8012f5c: 106d asrs r5, r5, #1
8012f5e: d00b beq.n 8012f78 <__pow5mult+0x74>
8012f60: 6820 ldr r0, [r4, #0]
8012f62: b938 cbnz r0, 8012f74 <__pow5mult+0x70>
8012f64: 4622 mov r2, r4
8012f66: 4621 mov r1, r4
8012f68: 4630 mov r0, r6
8012f6a: f7ff ff21 bl 8012db0 <__multiply>
8012f6e: 6020 str r0, [r4, #0]
8012f70: f8c0 9000 str.w r9, [r0]
8012f74: 4604 mov r4, r0
8012f76: e7e4 b.n 8012f42 <__pow5mult+0x3e>
8012f78: 4638 mov r0, r7
8012f7a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
8012f7e: bf00 nop
8012f80: 08017c00 .word 0x08017c00
08012f84 <__lshift>:
8012f84: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
8012f88: 460c mov r4, r1
8012f8a: 6849 ldr r1, [r1, #4]
8012f8c: 6923 ldr r3, [r4, #16]
8012f8e: eb03 1862 add.w r8, r3, r2, asr #5
8012f92: 68a3 ldr r3, [r4, #8]
8012f94: 4607 mov r7, r0
8012f96: 4691 mov r9, r2
8012f98: ea4f 1a62 mov.w sl, r2, asr #5
8012f9c: f108 0601 add.w r6, r8, #1
8012fa0: 42b3 cmp r3, r6
8012fa2: db0b blt.n 8012fbc <__lshift+0x38>
8012fa4: 4638 mov r0, r7
8012fa6: f7ff fe29 bl 8012bfc <_Balloc>
8012faa: 4605 mov r5, r0
8012fac: b948 cbnz r0, 8012fc2 <__lshift+0x3e>
8012fae: 4602 mov r2, r0
8012fb0: 4b2a ldr r3, [pc, #168] ; (801305c <__lshift+0xd8>)
8012fb2: 482b ldr r0, [pc, #172] ; (8013060 <__lshift+0xdc>)
8012fb4: f240 11d9 movw r1, #473 ; 0x1d9
8012fb8: f000 ff5e bl 8013e78 <__assert_func>
8012fbc: 3101 adds r1, #1
8012fbe: 005b lsls r3, r3, #1
8012fc0: e7ee b.n 8012fa0 <__lshift+0x1c>
8012fc2: 2300 movs r3, #0
8012fc4: f100 0114 add.w r1, r0, #20
8012fc8: f100 0210 add.w r2, r0, #16
8012fcc: 4618 mov r0, r3
8012fce: 4553 cmp r3, sl
8012fd0: db37 blt.n 8013042 <__lshift+0xbe>
8012fd2: 6920 ldr r0, [r4, #16]
8012fd4: ea2a 7aea bic.w sl, sl, sl, asr #31
8012fd8: f104 0314 add.w r3, r4, #20
8012fdc: f019 091f ands.w r9, r9, #31
8012fe0: eb01 018a add.w r1, r1, sl, lsl #2
8012fe4: eb03 0080 add.w r0, r3, r0, lsl #2
8012fe8: d02f beq.n 801304a <__lshift+0xc6>
8012fea: f1c9 0e20 rsb lr, r9, #32
8012fee: 468a mov sl, r1
8012ff0: f04f 0c00 mov.w ip, #0
8012ff4: 681a ldr r2, [r3, #0]
8012ff6: fa02 f209 lsl.w r2, r2, r9
8012ffa: ea42 020c orr.w r2, r2, ip
8012ffe: f84a 2b04 str.w r2, [sl], #4
8013002: f853 2b04 ldr.w r2, [r3], #4
8013006: 4298 cmp r0, r3
8013008: fa22 fc0e lsr.w ip, r2, lr
801300c: d8f2 bhi.n 8012ff4 <__lshift+0x70>
801300e: 1b03 subs r3, r0, r4
8013010: 3b15 subs r3, #21
8013012: f023 0303 bic.w r3, r3, #3
8013016: 3304 adds r3, #4
8013018: f104 0215 add.w r2, r4, #21
801301c: 4290 cmp r0, r2
801301e: bf38 it cc
8013020: 2304 movcc r3, #4
8013022: f841 c003 str.w ip, [r1, r3]
8013026: f1bc 0f00 cmp.w ip, #0
801302a: d001 beq.n 8013030 <__lshift+0xac>
801302c: f108 0602 add.w r6, r8, #2
8013030: 3e01 subs r6, #1
8013032: 4638 mov r0, r7
8013034: 612e str r6, [r5, #16]
8013036: 4621 mov r1, r4
8013038: f7ff fe05 bl 8012c46 <_Bfree>
801303c: 4628 mov r0, r5
801303e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
8013042: f842 0f04 str.w r0, [r2, #4]!
8013046: 3301 adds r3, #1
8013048: e7c1 b.n 8012fce <__lshift+0x4a>
801304a: 3904 subs r1, #4
801304c: f853 2b04 ldr.w r2, [r3], #4
8013050: f841 2f04 str.w r2, [r1, #4]!
8013054: 4298 cmp r0, r3
8013056: d8f9 bhi.n 801304c <__lshift+0xc8>
8013058: e7ea b.n 8013030 <__lshift+0xac>
801305a: bf00 nop
801305c: 08017a41 .word 0x08017a41
8013060: 08017aad .word 0x08017aad
08013064 <__mcmp>:
8013064: b530 push {r4, r5, lr}
8013066: 6902 ldr r2, [r0, #16]
8013068: 690c ldr r4, [r1, #16]
801306a: 1b12 subs r2, r2, r4
801306c: d10e bne.n 801308c <__mcmp+0x28>
801306e: f100 0314 add.w r3, r0, #20
8013072: 3114 adds r1, #20
8013074: eb03 0084 add.w r0, r3, r4, lsl #2
8013078: eb01 0184 add.w r1, r1, r4, lsl #2
801307c: f850 5d04 ldr.w r5, [r0, #-4]!
8013080: f851 4d04 ldr.w r4, [r1, #-4]!
8013084: 42a5 cmp r5, r4
8013086: d003 beq.n 8013090 <__mcmp+0x2c>
8013088: d305 bcc.n 8013096 <__mcmp+0x32>
801308a: 2201 movs r2, #1
801308c: 4610 mov r0, r2
801308e: bd30 pop {r4, r5, pc}
8013090: 4283 cmp r3, r0
8013092: d3f3 bcc.n 801307c <__mcmp+0x18>
8013094: e7fa b.n 801308c <__mcmp+0x28>
8013096: f04f 32ff mov.w r2, #4294967295
801309a: e7f7 b.n 801308c <__mcmp+0x28>
0801309c <__mdiff>:
801309c: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
80130a0: 460c mov r4, r1
80130a2: 4606 mov r6, r0
80130a4: 4611 mov r1, r2
80130a6: 4620 mov r0, r4
80130a8: 4690 mov r8, r2
80130aa: f7ff ffdb bl 8013064 <__mcmp>
80130ae: 1e05 subs r5, r0, #0
80130b0: d110 bne.n 80130d4 <__mdiff+0x38>
80130b2: 4629 mov r1, r5
80130b4: 4630 mov r0, r6
80130b6: f7ff fda1 bl 8012bfc <_Balloc>
80130ba: b930 cbnz r0, 80130ca <__mdiff+0x2e>
80130bc: 4b3a ldr r3, [pc, #232] ; (80131a8 <__mdiff+0x10c>)
80130be: 4602 mov r2, r0
80130c0: f240 2132 movw r1, #562 ; 0x232
80130c4: 4839 ldr r0, [pc, #228] ; (80131ac <__mdiff+0x110>)
80130c6: f000 fed7 bl 8013e78 <__assert_func>
80130ca: 2301 movs r3, #1
80130cc: e9c0 3504 strd r3, r5, [r0, #16]
80130d0: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
80130d4: bfa4 itt ge
80130d6: 4643 movge r3, r8
80130d8: 46a0 movge r8, r4
80130da: 4630 mov r0, r6
80130dc: f8d8 1004 ldr.w r1, [r8, #4]
80130e0: bfa6 itte ge
80130e2: 461c movge r4, r3
80130e4: 2500 movge r5, #0
80130e6: 2501 movlt r5, #1
80130e8: f7ff fd88 bl 8012bfc <_Balloc>
80130ec: b920 cbnz r0, 80130f8 <__mdiff+0x5c>
80130ee: 4b2e ldr r3, [pc, #184] ; (80131a8 <__mdiff+0x10c>)
80130f0: 4602 mov r2, r0
80130f2: f44f 7110 mov.w r1, #576 ; 0x240
80130f6: e7e5 b.n 80130c4 <__mdiff+0x28>
80130f8: f8d8 7010 ldr.w r7, [r8, #16]
80130fc: 6926 ldr r6, [r4, #16]
80130fe: 60c5 str r5, [r0, #12]
8013100: f104 0914 add.w r9, r4, #20
8013104: f108 0514 add.w r5, r8, #20
8013108: f100 0e14 add.w lr, r0, #20
801310c: eb05 0c87 add.w ip, r5, r7, lsl #2
8013110: eb09 0686 add.w r6, r9, r6, lsl #2
8013114: f108 0210 add.w r2, r8, #16
8013118: 46f2 mov sl, lr
801311a: 2100 movs r1, #0
801311c: f859 3b04 ldr.w r3, [r9], #4
8013120: f852 bf04 ldr.w fp, [r2, #4]!
8013124: fa1f f883 uxth.w r8, r3
8013128: fa11 f18b uxtah r1, r1, fp
801312c: 0c1b lsrs r3, r3, #16
801312e: eba1 0808 sub.w r8, r1, r8
8013132: ebc3 431b rsb r3, r3, fp, lsr #16
8013136: eb03 4328 add.w r3, r3, r8, asr #16
801313a: fa1f f888 uxth.w r8, r8
801313e: 1419 asrs r1, r3, #16
8013140: 454e cmp r6, r9
8013142: ea48 4303 orr.w r3, r8, r3, lsl #16
8013146: f84a 3b04 str.w r3, [sl], #4
801314a: d8e7 bhi.n 801311c <__mdiff+0x80>
801314c: 1b33 subs r3, r6, r4
801314e: 3b15 subs r3, #21
8013150: f023 0303 bic.w r3, r3, #3
8013154: 3304 adds r3, #4
8013156: 3415 adds r4, #21
8013158: 42a6 cmp r6, r4
801315a: bf38 it cc
801315c: 2304 movcc r3, #4
801315e: 441d add r5, r3
8013160: 4473 add r3, lr
8013162: 469e mov lr, r3
8013164: 462e mov r6, r5
8013166: 4566 cmp r6, ip
8013168: d30e bcc.n 8013188 <__mdiff+0xec>
801316a: f10c 0203 add.w r2, ip, #3
801316e: 1b52 subs r2, r2, r5
8013170: f022 0203 bic.w r2, r2, #3
8013174: 3d03 subs r5, #3
8013176: 45ac cmp ip, r5
8013178: bf38 it cc
801317a: 2200 movcc r2, #0
801317c: 441a add r2, r3
801317e: f852 3d04 ldr.w r3, [r2, #-4]!
8013182: b17b cbz r3, 80131a4 <__mdiff+0x108>
8013184: 6107 str r7, [r0, #16]
8013186: e7a3 b.n 80130d0 <__mdiff+0x34>
8013188: f856 8b04 ldr.w r8, [r6], #4
801318c: fa11 f288 uxtah r2, r1, r8
8013190: 1414 asrs r4, r2, #16
8013192: eb04 4418 add.w r4, r4, r8, lsr #16
8013196: b292 uxth r2, r2
8013198: ea42 4204 orr.w r2, r2, r4, lsl #16
801319c: f84e 2b04 str.w r2, [lr], #4
80131a0: 1421 asrs r1, r4, #16
80131a2: e7e0 b.n 8013166 <__mdiff+0xca>
80131a4: 3f01 subs r7, #1
80131a6: e7ea b.n 801317e <__mdiff+0xe2>
80131a8: 08017a41 .word 0x08017a41
80131ac: 08017aad .word 0x08017aad
080131b0 <__d2b>:
80131b0: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr}
80131b4: 4689 mov r9, r1
80131b6: 2101 movs r1, #1
80131b8: ec57 6b10 vmov r6, r7, d0
80131bc: 4690 mov r8, r2
80131be: f7ff fd1d bl 8012bfc <_Balloc>
80131c2: 4604 mov r4, r0
80131c4: b930 cbnz r0, 80131d4 <__d2b+0x24>
80131c6: 4602 mov r2, r0
80131c8: 4b25 ldr r3, [pc, #148] ; (8013260 <__d2b+0xb0>)
80131ca: 4826 ldr r0, [pc, #152] ; (8013264 <__d2b+0xb4>)
80131cc: f240 310a movw r1, #778 ; 0x30a
80131d0: f000 fe52 bl 8013e78 <__assert_func>
80131d4: f3c7 550a ubfx r5, r7, #20, #11
80131d8: f3c7 0313 ubfx r3, r7, #0, #20
80131dc: bb35 cbnz r5, 801322c <__d2b+0x7c>
80131de: 2e00 cmp r6, #0
80131e0: 9301 str r3, [sp, #4]
80131e2: d028 beq.n 8013236 <__d2b+0x86>
80131e4: 4668 mov r0, sp
80131e6: 9600 str r6, [sp, #0]
80131e8: f7ff fd9c bl 8012d24 <__lo0bits>
80131ec: 9900 ldr r1, [sp, #0]
80131ee: b300 cbz r0, 8013232 <__d2b+0x82>
80131f0: 9a01 ldr r2, [sp, #4]
80131f2: f1c0 0320 rsb r3, r0, #32
80131f6: fa02 f303 lsl.w r3, r2, r3
80131fa: 430b orrs r3, r1
80131fc: 40c2 lsrs r2, r0
80131fe: 6163 str r3, [r4, #20]
8013200: 9201 str r2, [sp, #4]
8013202: 9b01 ldr r3, [sp, #4]
8013204: 61a3 str r3, [r4, #24]
8013206: 2b00 cmp r3, #0
8013208: bf14 ite ne
801320a: 2202 movne r2, #2
801320c: 2201 moveq r2, #1
801320e: 6122 str r2, [r4, #16]
8013210: b1d5 cbz r5, 8013248 <__d2b+0x98>
8013212: f2a5 4533 subw r5, r5, #1075 ; 0x433
8013216: 4405 add r5, r0
8013218: f8c9 5000 str.w r5, [r9]
801321c: f1c0 0035 rsb r0, r0, #53 ; 0x35
8013220: f8c8 0000 str.w r0, [r8]
8013224: 4620 mov r0, r4
8013226: b003 add sp, #12
8013228: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
801322c: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
8013230: e7d5 b.n 80131de <__d2b+0x2e>
8013232: 6161 str r1, [r4, #20]
8013234: e7e5 b.n 8013202 <__d2b+0x52>
8013236: a801 add r0, sp, #4
8013238: f7ff fd74 bl 8012d24 <__lo0bits>
801323c: 9b01 ldr r3, [sp, #4]
801323e: 6163 str r3, [r4, #20]
8013240: 2201 movs r2, #1
8013242: 6122 str r2, [r4, #16]
8013244: 3020 adds r0, #32
8013246: e7e3 b.n 8013210 <__d2b+0x60>
8013248: eb04 0382 add.w r3, r4, r2, lsl #2
801324c: f2a0 4032 subw r0, r0, #1074 ; 0x432
8013250: f8c9 0000 str.w r0, [r9]
8013254: 6918 ldr r0, [r3, #16]
8013256: f7ff fd45 bl 8012ce4 <__hi0bits>
801325a: ebc0 1042 rsb r0, r0, r2, lsl #5
801325e: e7df b.n 8013220 <__d2b+0x70>
8013260: 08017a41 .word 0x08017a41
8013264: 08017aad .word 0x08017aad
08013268 <frexp>:
8013268: b570 push {r4, r5, r6, lr}
801326a: 2100 movs r1, #0
801326c: ec55 4b10 vmov r4, r5, d0
8013270: 6001 str r1, [r0, #0]
8013272: 4916 ldr r1, [pc, #88] ; (80132cc <frexp+0x64>)
8013274: f025 4200 bic.w r2, r5, #2147483648 ; 0x80000000
8013278: 428a cmp r2, r1
801327a: 4606 mov r6, r0
801327c: 462b mov r3, r5
801327e: dc22 bgt.n 80132c6 <frexp+0x5e>
8013280: ee10 1a10 vmov r1, s0
8013284: 4311 orrs r1, r2
8013286: d01e beq.n 80132c6 <frexp+0x5e>
8013288: 4911 ldr r1, [pc, #68] ; (80132d0 <frexp+0x68>)
801328a: 4029 ands r1, r5
801328c: b969 cbnz r1, 80132aa <frexp+0x42>
801328e: 4b11 ldr r3, [pc, #68] ; (80132d4 <frexp+0x6c>)
8013290: 2200 movs r2, #0
8013292: ee10 0a10 vmov r0, s0
8013296: 4629 mov r1, r5
8013298: f7ed f9be bl 8000618 <__aeabi_dmul>
801329c: 460b mov r3, r1
801329e: f021 4200 bic.w r2, r1, #2147483648 ; 0x80000000
80132a2: f06f 0135 mvn.w r1, #53 ; 0x35
80132a6: 4604 mov r4, r0
80132a8: 6031 str r1, [r6, #0]
80132aa: 6831 ldr r1, [r6, #0]
80132ac: 1512 asrs r2, r2, #20
80132ae: f023 43ff bic.w r3, r3, #2139095040 ; 0x7f800000
80132b2: f2a2 32fe subw r2, r2, #1022 ; 0x3fe
80132b6: f423 03e0 bic.w r3, r3, #7340032 ; 0x700000
80132ba: 440a add r2, r1
80132bc: f043 557f orr.w r5, r3, #1069547520 ; 0x3fc00000
80132c0: 6032 str r2, [r6, #0]
80132c2: f445 1500 orr.w r5, r5, #2097152 ; 0x200000
80132c6: ec45 4b10 vmov d0, r4, r5
80132ca: bd70 pop {r4, r5, r6, pc}
80132cc: 7fefffff .word 0x7fefffff
80132d0: 7ff00000 .word 0x7ff00000
80132d4: 43500000 .word 0x43500000
080132d8 <_sbrk_r>:
80132d8: b538 push {r3, r4, r5, lr}
80132da: 4d06 ldr r5, [pc, #24] ; (80132f4 <_sbrk_r+0x1c>)
80132dc: 2300 movs r3, #0
80132de: 4604 mov r4, r0
80132e0: 4608 mov r0, r1
80132e2: 602b str r3, [r5, #0]
80132e4: f001 fb40 bl 8014968 <_sbrk>
80132e8: 1c43 adds r3, r0, #1
80132ea: d102 bne.n 80132f2 <_sbrk_r+0x1a>
80132ec: 682b ldr r3, [r5, #0]
80132ee: b103 cbz r3, 80132f2 <_sbrk_r+0x1a>
80132f0: 6023 str r3, [r4, #0]
80132f2: bd38 pop {r3, r4, r5, pc}
80132f4: 20008d74 .word 0x20008d74
080132f8 <__sread>:
80132f8: b510 push {r4, lr}
80132fa: 460c mov r4, r1
80132fc: f9b1 100e ldrsh.w r1, [r1, #14]
8013300: f001 f88a bl 8014418 <_read_r>
8013304: 2800 cmp r0, #0
8013306: bfab itete ge
8013308: 6d23 ldrge r3, [r4, #80] ; 0x50
801330a: 89a3 ldrhlt r3, [r4, #12]
801330c: 181b addge r3, r3, r0
801330e: f423 5380 biclt.w r3, r3, #4096 ; 0x1000
8013312: bfac ite ge
8013314: 6523 strge r3, [r4, #80] ; 0x50
8013316: 81a3 strhlt r3, [r4, #12]
8013318: bd10 pop {r4, pc}
0801331a <__swrite>:
801331a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
801331e: 461f mov r7, r3
8013320: 898b ldrh r3, [r1, #12]
8013322: 05db lsls r3, r3, #23
8013324: 4605 mov r5, r0
8013326: 460c mov r4, r1
8013328: 4616 mov r6, r2
801332a: d505 bpl.n 8013338 <__swrite+0x1e>
801332c: f9b1 100e ldrsh.w r1, [r1, #14]
8013330: 2302 movs r3, #2
8013332: 2200 movs r2, #0
8013334: f001 f84c bl 80143d0 <_lseek_r>
8013338: 89a3 ldrh r3, [r4, #12]
801333a: f9b4 100e ldrsh.w r1, [r4, #14]
801333e: f423 5380 bic.w r3, r3, #4096 ; 0x1000
8013342: 81a3 strh r3, [r4, #12]
8013344: 4632 mov r2, r6
8013346: 463b mov r3, r7
8013348: 4628 mov r0, r5
801334a: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr}
801334e: f000 bd3f b.w 8013dd0 <_write_r>
08013352 <__sseek>:
8013352: b510 push {r4, lr}
8013354: 460c mov r4, r1
8013356: f9b1 100e ldrsh.w r1, [r1, #14]
801335a: f001 f839 bl 80143d0 <_lseek_r>
801335e: 1c43 adds r3, r0, #1
8013360: 89a3 ldrh r3, [r4, #12]
8013362: bf15 itete ne
8013364: 6520 strne r0, [r4, #80] ; 0x50
8013366: f423 5380 biceq.w r3, r3, #4096 ; 0x1000
801336a: f443 5380 orrne.w r3, r3, #4096 ; 0x1000
801336e: 81a3 strheq r3, [r4, #12]
8013370: bf18 it ne
8013372: 81a3 strhne r3, [r4, #12]
8013374: bd10 pop {r4, pc}
08013376 <__sclose>:
8013376: f9b1 100e ldrsh.w r1, [r1, #14]
801337a: f000 bdd1 b.w 8013f20 <_close_r>
0801337e <strncpy>:
801337e: b510 push {r4, lr}
8013380: 3901 subs r1, #1
8013382: 4603 mov r3, r0
8013384: b132 cbz r2, 8013394 <strncpy+0x16>
8013386: f811 4f01 ldrb.w r4, [r1, #1]!
801338a: f803 4b01 strb.w r4, [r3], #1
801338e: 3a01 subs r2, #1
8013390: 2c00 cmp r4, #0
8013392: d1f7 bne.n 8013384 <strncpy+0x6>
8013394: 441a add r2, r3
8013396: 2100 movs r1, #0
8013398: 4293 cmp r3, r2
801339a: d100 bne.n 801339e <strncpy+0x20>
801339c: bd10 pop {r4, pc}
801339e: f803 1b01 strb.w r1, [r3], #1
80133a2: e7f9 b.n 8013398 <strncpy+0x1a>
080133a4 <sysconf>:
80133a4: 2808 cmp r0, #8
80133a6: b508 push {r3, lr}
80133a8: d006 beq.n 80133b8 <sysconf+0x14>
80133aa: f7fe fefb bl 80121a4 <__errno>
80133ae: 2316 movs r3, #22
80133b0: 6003 str r3, [r0, #0]
80133b2: f04f 30ff mov.w r0, #4294967295
80133b6: bd08 pop {r3, pc}
80133b8: f44f 5080 mov.w r0, #4096 ; 0x1000
80133bc: e7fb b.n 80133b6 <sysconf+0x12>
080133be <__sprint_r>:
80133be: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
80133c2: 6893 ldr r3, [r2, #8]
80133c4: 4680 mov r8, r0
80133c6: 460f mov r7, r1
80133c8: 4614 mov r4, r2
80133ca: b91b cbnz r3, 80133d4 <__sprint_r+0x16>
80133cc: 6053 str r3, [r2, #4]
80133ce: 4618 mov r0, r3
80133d0: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
80133d4: 6e4b ldr r3, [r1, #100] ; 0x64
80133d6: 049d lsls r5, r3, #18
80133d8: d520 bpl.n 801341c <__sprint_r+0x5e>
80133da: 6815 ldr r5, [r2, #0]
80133dc: 3508 adds r5, #8
80133de: e955 b602 ldrd fp, r6, [r5, #-8]
80133e2: f04f 0900 mov.w r9, #0
80133e6: ea4f 0a96 mov.w sl, r6, lsr #2
80133ea: 45ca cmp sl, r9
80133ec: dc0b bgt.n 8013406 <__sprint_r+0x48>
80133ee: 68a3 ldr r3, [r4, #8]
80133f0: f026 0003 bic.w r0, r6, #3
80133f4: 1a18 subs r0, r3, r0
80133f6: 60a0 str r0, [r4, #8]
80133f8: 3508 adds r5, #8
80133fa: 2800 cmp r0, #0
80133fc: d1ef bne.n 80133de <__sprint_r+0x20>
80133fe: 2300 movs r3, #0
8013400: e9c4 3301 strd r3, r3, [r4, #4]
8013404: e7e4 b.n 80133d0 <__sprint_r+0x12>
8013406: f85b 1029 ldr.w r1, [fp, r9, lsl #2]
801340a: 463a mov r2, r7
801340c: 4640 mov r0, r8
801340e: f000 fe42 bl 8014096 <_fputwc_r>
8013412: 1c43 adds r3, r0, #1
8013414: d0f3 beq.n 80133fe <__sprint_r+0x40>
8013416: f109 0901 add.w r9, r9, #1
801341a: e7e6 b.n 80133ea <__sprint_r+0x2c>
801341c: f000 fe78 bl 8014110 <__sfvwrite_r>
8013420: e7ed b.n 80133fe <__sprint_r+0x40>
...
08013424 <_vfiprintf_r>:
8013424: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
8013428: ed2d 8b02 vpush {d8}
801342c: b0b9 sub sp, #228 ; 0xe4
801342e: 460f mov r7, r1
8013430: 9201 str r2, [sp, #4]
8013432: 461d mov r5, r3
8013434: 461c mov r4, r3
8013436: 4681 mov r9, r0
8013438: b118 cbz r0, 8013442 <_vfiprintf_r+0x1e>
801343a: 6b83 ldr r3, [r0, #56] ; 0x38
801343c: b90b cbnz r3, 8013442 <_vfiprintf_r+0x1e>
801343e: f7fe ffb1 bl 80123a4 <__sinit>
8013442: 6e7b ldr r3, [r7, #100] ; 0x64
8013444: 07d8 lsls r0, r3, #31
8013446: d405 bmi.n 8013454 <_vfiprintf_r+0x30>
8013448: 89bb ldrh r3, [r7, #12]
801344a: 0599 lsls r1, r3, #22
801344c: d402 bmi.n 8013454 <_vfiprintf_r+0x30>
801344e: 6db8 ldr r0, [r7, #88] ; 0x58
8013450: f7ff f91e bl 8012690 <__retarget_lock_acquire_recursive>
8013454: f9b7 300c ldrsh.w r3, [r7, #12]
8013458: 049a lsls r2, r3, #18
801345a: d406 bmi.n 801346a <_vfiprintf_r+0x46>
801345c: f443 5300 orr.w r3, r3, #8192 ; 0x2000
8013460: 81bb strh r3, [r7, #12]
8013462: 6e7b ldr r3, [r7, #100] ; 0x64
8013464: f423 5300 bic.w r3, r3, #8192 ; 0x2000
8013468: 667b str r3, [r7, #100] ; 0x64
801346a: 89bb ldrh r3, [r7, #12]
801346c: 071e lsls r6, r3, #28
801346e: d501 bpl.n 8013474 <_vfiprintf_r+0x50>
8013470: 693b ldr r3, [r7, #16]
8013472: b9bb cbnz r3, 80134a4 <_vfiprintf_r+0x80>
8013474: 4639 mov r1, r7
8013476: 4648 mov r0, r9
8013478: f7fd ffc8 bl 801140c <__swsetup_r>
801347c: b190 cbz r0, 80134a4 <_vfiprintf_r+0x80>
801347e: 6e7b ldr r3, [r7, #100] ; 0x64
8013480: 07d8 lsls r0, r3, #31
8013482: d508 bpl.n 8013496 <_vfiprintf_r+0x72>
8013484: f04f 33ff mov.w r3, #4294967295
8013488: 9302 str r3, [sp, #8]
801348a: 9802 ldr r0, [sp, #8]
801348c: b039 add sp, #228 ; 0xe4
801348e: ecbd 8b02 vpop {d8}
8013492: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8013496: 89bb ldrh r3, [r7, #12]
8013498: 0599 lsls r1, r3, #22
801349a: d4f3 bmi.n 8013484 <_vfiprintf_r+0x60>
801349c: 6db8 ldr r0, [r7, #88] ; 0x58
801349e: f7ff f8f8 bl 8012692 <__retarget_lock_release_recursive>
80134a2: e7ef b.n 8013484 <_vfiprintf_r+0x60>
80134a4: 89bb ldrh r3, [r7, #12]
80134a6: f003 021a and.w r2, r3, #26
80134aa: 2a0a cmp r2, #10
80134ac: d116 bne.n 80134dc <_vfiprintf_r+0xb8>
80134ae: f9b7 200e ldrsh.w r2, [r7, #14]
80134b2: 2a00 cmp r2, #0
80134b4: db12 blt.n 80134dc <_vfiprintf_r+0xb8>
80134b6: 6e7a ldr r2, [r7, #100] ; 0x64
80134b8: 07d2 lsls r2, r2, #31
80134ba: d404 bmi.n 80134c6 <_vfiprintf_r+0xa2>
80134bc: 059e lsls r6, r3, #22
80134be: d402 bmi.n 80134c6 <_vfiprintf_r+0xa2>
80134c0: 6db8 ldr r0, [r7, #88] ; 0x58
80134c2: f7ff f8e6 bl 8012692 <__retarget_lock_release_recursive>
80134c6: 9a01 ldr r2, [sp, #4]
80134c8: 462b mov r3, r5
80134ca: 4639 mov r1, r7
80134cc: 4648 mov r0, r9
80134ce: b039 add sp, #228 ; 0xe4
80134d0: ecbd 8b02 vpop {d8}
80134d4: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
80134d8: f000 bc3a b.w 8013d50 <__sbprintf>
80134dc: 2300 movs r3, #0
80134de: e9cd 330d strd r3, r3, [sp, #52] ; 0x34
80134e2: e9cd 3305 strd r3, r3, [sp, #20]
80134e6: ae0f add r6, sp, #60 ; 0x3c
80134e8: ee08 3a10 vmov s16, r3
80134ec: 960c str r6, [sp, #48] ; 0x30
80134ee: 9307 str r3, [sp, #28]
80134f0: 9302 str r3, [sp, #8]
80134f2: 9b01 ldr r3, [sp, #4]
80134f4: 461d mov r5, r3
80134f6: f813 2b01 ldrb.w r2, [r3], #1
80134fa: b10a cbz r2, 8013500 <_vfiprintf_r+0xdc>
80134fc: 2a25 cmp r2, #37 ; 0x25
80134fe: d1f9 bne.n 80134f4 <_vfiprintf_r+0xd0>
8013500: 9b01 ldr r3, [sp, #4]
8013502: ebb5 0803 subs.w r8, r5, r3
8013506: d00d beq.n 8013524 <_vfiprintf_r+0x100>
8013508: e9c6 3800 strd r3, r8, [r6]
801350c: 9b0e ldr r3, [sp, #56] ; 0x38
801350e: 4443 add r3, r8
8013510: 930e str r3, [sp, #56] ; 0x38
8013512: 9b0d ldr r3, [sp, #52] ; 0x34
8013514: 3301 adds r3, #1
8013516: 2b07 cmp r3, #7
8013518: 930d str r3, [sp, #52] ; 0x34
801351a: dc75 bgt.n 8013608 <_vfiprintf_r+0x1e4>
801351c: 3608 adds r6, #8
801351e: 9b02 ldr r3, [sp, #8]
8013520: 4443 add r3, r8
8013522: 9302 str r3, [sp, #8]
8013524: 782b ldrb r3, [r5, #0]
8013526: 2b00 cmp r3, #0
8013528: f000 83d6 beq.w 8013cd8 <_vfiprintf_r+0x8b4>
801352c: 2300 movs r3, #0
801352e: f04f 31ff mov.w r1, #4294967295
8013532: 1c6a adds r2, r5, #1
8013534: f88d 302b strb.w r3, [sp, #43] ; 0x2b
8013538: 9100 str r1, [sp, #0]
801353a: 9303 str r3, [sp, #12]
801353c: 469a mov sl, r3
801353e: f812 3b01 ldrb.w r3, [r2], #1
8013542: 9201 str r2, [sp, #4]
8013544: f1a3 0220 sub.w r2, r3, #32
8013548: 2a5a cmp r2, #90 ; 0x5a
801354a: f200 831f bhi.w 8013b8c <_vfiprintf_r+0x768>
801354e: e8df f012 tbh [pc, r2, lsl #1]
8013552: 009b .short 0x009b
8013554: 031d031d .word 0x031d031d
8013558: 031d00a3 .word 0x031d00a3
801355c: 031d031d .word 0x031d031d
8013560: 031d0082 .word 0x031d0082
8013564: 00a6031d .word 0x00a6031d
8013568: 031d00b0 .word 0x031d00b0
801356c: 00b200ad .word 0x00b200ad
8013570: 00cd031d .word 0x00cd031d
8013574: 00d000d0 .word 0x00d000d0
8013578: 00d000d0 .word 0x00d000d0
801357c: 00d000d0 .word 0x00d000d0
8013580: 00d000d0 .word 0x00d000d0
8013584: 031d00d0 .word 0x031d00d0
8013588: 031d031d .word 0x031d031d
801358c: 031d031d .word 0x031d031d
8013590: 031d031d .word 0x031d031d
8013594: 031d031d .word 0x031d031d
8013598: 010800fa .word 0x010800fa
801359c: 031d031d .word 0x031d031d
80135a0: 031d031d .word 0x031d031d
80135a4: 031d031d .word 0x031d031d
80135a8: 031d031d .word 0x031d031d
80135ac: 031d031d .word 0x031d031d
80135b0: 031d0158 .word 0x031d0158
80135b4: 031d031d .word 0x031d031d
80135b8: 031d01a1 .word 0x031d01a1
80135bc: 031d027e .word 0x031d027e
80135c0: 029e031d .word 0x029e031d
80135c4: 031d031d .word 0x031d031d
80135c8: 031d031d .word 0x031d031d
80135cc: 031d031d .word 0x031d031d
80135d0: 031d031d .word 0x031d031d
80135d4: 031d031d .word 0x031d031d
80135d8: 010a00fa .word 0x010a00fa
80135dc: 031d031d .word 0x031d031d
80135e0: 00e0031d .word 0x00e0031d
80135e4: 00f4010a .word 0x00f4010a
80135e8: 00ed031d .word 0x00ed031d
80135ec: 0136031d .word 0x0136031d
80135f0: 018f015a .word 0x018f015a
80135f4: 031d00f4 .word 0x031d00f4
80135f8: 009901a1 .word 0x009901a1
80135fc: 031d0280 .word 0x031d0280
8013600: 0065031d .word 0x0065031d
8013604: 0099031d .word 0x0099031d
8013608: aa0c add r2, sp, #48 ; 0x30
801360a: 4639 mov r1, r7
801360c: 4648 mov r0, r9
801360e: f7ff fed6 bl 80133be <__sprint_r>
8013612: 2800 cmp r0, #0
8013614: f040 833f bne.w 8013c96 <_vfiprintf_r+0x872>
8013618: ae0f add r6, sp, #60 ; 0x3c
801361a: e780 b.n 801351e <_vfiprintf_r+0xfa>
801361c: 4a9c ldr r2, [pc, #624] ; (8013890 <_vfiprintf_r+0x46c>)
801361e: 9205 str r2, [sp, #20]
8013620: f01a 0220 ands.w r2, sl, #32
8013624: f000 8235 beq.w 8013a92 <_vfiprintf_r+0x66e>
8013628: 3407 adds r4, #7
801362a: f024 0207 bic.w r2, r4, #7
801362e: 4693 mov fp, r2
8013630: 6855 ldr r5, [r2, #4]
8013632: f85b 4b08 ldr.w r4, [fp], #8
8013636: f01a 0f01 tst.w sl, #1
801363a: d009 beq.n 8013650 <_vfiprintf_r+0x22c>
801363c: ea54 0205 orrs.w r2, r4, r5
8013640: bf1f itttt ne
8013642: 2230 movne r2, #48 ; 0x30
8013644: f88d 202c strbne.w r2, [sp, #44] ; 0x2c
8013648: f88d 302d strbne.w r3, [sp, #45] ; 0x2d
801364c: f04a 0a02 orrne.w sl, sl, #2
8013650: f42a 6a80 bic.w sl, sl, #1024 ; 0x400
8013654: e11a b.n 801388c <_vfiprintf_r+0x468>
8013656: 4648 mov r0, r9
8013658: f7ff f814 bl 8012684 <_localeconv_r>
801365c: 6843 ldr r3, [r0, #4]
801365e: 4618 mov r0, r3
8013660: ee08 3a10 vmov s16, r3
8013664: f7ec fdc4 bl 80001f0 <strlen>
8013668: 9007 str r0, [sp, #28]
801366a: 4648 mov r0, r9
801366c: f7ff f80a bl 8012684 <_localeconv_r>
8013670: 6883 ldr r3, [r0, #8]
8013672: 9306 str r3, [sp, #24]
8013674: 9b07 ldr r3, [sp, #28]
8013676: b12b cbz r3, 8013684 <_vfiprintf_r+0x260>
8013678: 9b06 ldr r3, [sp, #24]
801367a: b11b cbz r3, 8013684 <_vfiprintf_r+0x260>
801367c: 781b ldrb r3, [r3, #0]
801367e: b10b cbz r3, 8013684 <_vfiprintf_r+0x260>
8013680: f44a 6a80 orr.w sl, sl, #1024 ; 0x400
8013684: 9a01 ldr r2, [sp, #4]
8013686: e75a b.n 801353e <_vfiprintf_r+0x11a>
8013688: f89d 302b ldrb.w r3, [sp, #43] ; 0x2b
801368c: 2b00 cmp r3, #0
801368e: d1f9 bne.n 8013684 <_vfiprintf_r+0x260>
8013690: 2320 movs r3, #32
8013692: f88d 302b strb.w r3, [sp, #43] ; 0x2b
8013696: e7f5 b.n 8013684 <_vfiprintf_r+0x260>
8013698: f04a 0a01 orr.w sl, sl, #1
801369c: e7f2 b.n 8013684 <_vfiprintf_r+0x260>
801369e: f854 3b04 ldr.w r3, [r4], #4
80136a2: 9303 str r3, [sp, #12]
80136a4: 2b00 cmp r3, #0
80136a6: daed bge.n 8013684 <_vfiprintf_r+0x260>
80136a8: 425b negs r3, r3
80136aa: 9303 str r3, [sp, #12]
80136ac: f04a 0a04 orr.w sl, sl, #4
80136b0: e7e8 b.n 8013684 <_vfiprintf_r+0x260>
80136b2: 232b movs r3, #43 ; 0x2b
80136b4: e7ed b.n 8013692 <_vfiprintf_r+0x26e>
80136b6: 9a01 ldr r2, [sp, #4]
80136b8: f812 3b01 ldrb.w r3, [r2], #1
80136bc: 2b2a cmp r3, #42 ; 0x2a
80136be: d112 bne.n 80136e6 <_vfiprintf_r+0x2c2>
80136c0: f854 0b04 ldr.w r0, [r4], #4
80136c4: ea40 73e0 orr.w r3, r0, r0, asr #31
80136c8: e9cd 3200 strd r3, r2, [sp]
80136cc: e7da b.n 8013684 <_vfiprintf_r+0x260>
80136ce: 9b00 ldr r3, [sp, #0]
80136d0: 200a movs r0, #10
80136d2: fb00 1303 mla r3, r0, r3, r1
80136d6: 9300 str r3, [sp, #0]
80136d8: f812 3b01 ldrb.w r3, [r2], #1
80136dc: f1a3 0130 sub.w r1, r3, #48 ; 0x30
80136e0: 2909 cmp r1, #9
80136e2: d9f4 bls.n 80136ce <_vfiprintf_r+0x2aa>
80136e4: e72d b.n 8013542 <_vfiprintf_r+0x11e>
80136e6: 2100 movs r1, #0
80136e8: 9100 str r1, [sp, #0]
80136ea: e7f7 b.n 80136dc <_vfiprintf_r+0x2b8>
80136ec: f04a 0a80 orr.w sl, sl, #128 ; 0x80
80136f0: e7c8 b.n 8013684 <_vfiprintf_r+0x260>
80136f2: 2100 movs r1, #0
80136f4: 9a01 ldr r2, [sp, #4]
80136f6: 9103 str r1, [sp, #12]
80136f8: 9903 ldr r1, [sp, #12]
80136fa: 3b30 subs r3, #48 ; 0x30
80136fc: 200a movs r0, #10
80136fe: fb00 3301 mla r3, r0, r1, r3
8013702: 9303 str r3, [sp, #12]
8013704: f812 3b01 ldrb.w r3, [r2], #1
8013708: f1a3 0130 sub.w r1, r3, #48 ; 0x30
801370c: 2909 cmp r1, #9
801370e: d9f3 bls.n 80136f8 <_vfiprintf_r+0x2d4>
8013710: e717 b.n 8013542 <_vfiprintf_r+0x11e>
8013712: 9b01 ldr r3, [sp, #4]
8013714: 781b ldrb r3, [r3, #0]
8013716: 2b68 cmp r3, #104 ; 0x68
8013718: bf01 itttt eq
801371a: 9b01 ldreq r3, [sp, #4]
801371c: 3301 addeq r3, #1
801371e: 9301 streq r3, [sp, #4]
8013720: f44a 7a00 orreq.w sl, sl, #512 ; 0x200
8013724: bf18 it ne
8013726: f04a 0a40 orrne.w sl, sl, #64 ; 0x40
801372a: e7ab b.n 8013684 <_vfiprintf_r+0x260>
801372c: 9b01 ldr r3, [sp, #4]
801372e: 781b ldrb r3, [r3, #0]
8013730: 2b6c cmp r3, #108 ; 0x6c
8013732: d105 bne.n 8013740 <_vfiprintf_r+0x31c>
8013734: 9b01 ldr r3, [sp, #4]
8013736: 3301 adds r3, #1
8013738: 9301 str r3, [sp, #4]
801373a: f04a 0a20 orr.w sl, sl, #32
801373e: e7a1 b.n 8013684 <_vfiprintf_r+0x260>
8013740: f04a 0a10 orr.w sl, sl, #16
8013744: e79e b.n 8013684 <_vfiprintf_r+0x260>
8013746: 46a3 mov fp, r4
8013748: 2100 movs r1, #0
801374a: f85b 3b04 ldr.w r3, [fp], #4
801374e: f88d 307c strb.w r3, [sp, #124] ; 0x7c
8013752: f88d 102b strb.w r1, [sp, #43] ; 0x2b
8013756: 2301 movs r3, #1
8013758: 9300 str r3, [sp, #0]
801375a: 460d mov r5, r1
801375c: f10d 087c add.w r8, sp, #124 ; 0x7c
8013760: e0ad b.n 80138be <_vfiprintf_r+0x49a>
8013762: f04a 0a10 orr.w sl, sl, #16
8013766: f01a 0f20 tst.w sl, #32
801376a: d011 beq.n 8013790 <_vfiprintf_r+0x36c>
801376c: 3407 adds r4, #7
801376e: f024 0307 bic.w r3, r4, #7
8013772: 469b mov fp, r3
8013774: 685d ldr r5, [r3, #4]
8013776: f85b 4b08 ldr.w r4, [fp], #8
801377a: 2d00 cmp r5, #0
801377c: da06 bge.n 801378c <_vfiprintf_r+0x368>
801377e: 4264 negs r4, r4
8013780: f04f 032d mov.w r3, #45 ; 0x2d
8013784: eb65 0545 sbc.w r5, r5, r5, lsl #1
8013788: f88d 302b strb.w r3, [sp, #43] ; 0x2b
801378c: 2301 movs r3, #1
801378e: e04a b.n 8013826 <_vfiprintf_r+0x402>
8013790: 46a3 mov fp, r4
8013792: f01a 0f10 tst.w sl, #16
8013796: f85b 5b04 ldr.w r5, [fp], #4
801379a: d002 beq.n 80137a2 <_vfiprintf_r+0x37e>
801379c: 462c mov r4, r5
801379e: 17ed asrs r5, r5, #31
80137a0: e7eb b.n 801377a <_vfiprintf_r+0x356>
80137a2: f01a 0f40 tst.w sl, #64 ; 0x40
80137a6: d003 beq.n 80137b0 <_vfiprintf_r+0x38c>
80137a8: b22c sxth r4, r5
80137aa: f345 35c0 sbfx r5, r5, #15, #1
80137ae: e7e4 b.n 801377a <_vfiprintf_r+0x356>
80137b0: f41a 7f00 tst.w sl, #512 ; 0x200
80137b4: d0f2 beq.n 801379c <_vfiprintf_r+0x378>
80137b6: b26c sxtb r4, r5
80137b8: f345 15c0 sbfx r5, r5, #7, #1
80137bc: e7dd b.n 801377a <_vfiprintf_r+0x356>
80137be: f01a 0f20 tst.w sl, #32
80137c2: f104 0b04 add.w fp, r4, #4
80137c6: d007 beq.n 80137d8 <_vfiprintf_r+0x3b4>
80137c8: 9a02 ldr r2, [sp, #8]
80137ca: 6823 ldr r3, [r4, #0]
80137cc: 9902 ldr r1, [sp, #8]
80137ce: 17d2 asrs r2, r2, #31
80137d0: e9c3 1200 strd r1, r2, [r3]
80137d4: 465c mov r4, fp
80137d6: e68c b.n 80134f2 <_vfiprintf_r+0xce>
80137d8: f01a 0f10 tst.w sl, #16
80137dc: d003 beq.n 80137e6 <_vfiprintf_r+0x3c2>
80137de: 6823 ldr r3, [r4, #0]
80137e0: 9a02 ldr r2, [sp, #8]
80137e2: 601a str r2, [r3, #0]
80137e4: e7f6 b.n 80137d4 <_vfiprintf_r+0x3b0>
80137e6: f01a 0f40 tst.w sl, #64 ; 0x40
80137ea: d003 beq.n 80137f4 <_vfiprintf_r+0x3d0>
80137ec: 6823 ldr r3, [r4, #0]
80137ee: 9a02 ldr r2, [sp, #8]
80137f0: 801a strh r2, [r3, #0]
80137f2: e7ef b.n 80137d4 <_vfiprintf_r+0x3b0>
80137f4: f41a 7f00 tst.w sl, #512 ; 0x200
80137f8: d0f1 beq.n 80137de <_vfiprintf_r+0x3ba>
80137fa: 6823 ldr r3, [r4, #0]
80137fc: 9a02 ldr r2, [sp, #8]
80137fe: 701a strb r2, [r3, #0]
8013800: e7e8 b.n 80137d4 <_vfiprintf_r+0x3b0>
8013802: f04a 0a10 orr.w sl, sl, #16
8013806: f01a 0320 ands.w r3, sl, #32
801380a: d01f beq.n 801384c <_vfiprintf_r+0x428>
801380c: 3407 adds r4, #7
801380e: f024 0307 bic.w r3, r4, #7
8013812: 469b mov fp, r3
8013814: 685d ldr r5, [r3, #4]
8013816: f85b 4b08 ldr.w r4, [fp], #8
801381a: f42a 6a80 bic.w sl, sl, #1024 ; 0x400
801381e: 2300 movs r3, #0
8013820: 2200 movs r2, #0
8013822: f88d 202b strb.w r2, [sp, #43] ; 0x2b
8013826: 9a00 ldr r2, [sp, #0]
8013828: 3201 adds r2, #1
801382a: f000 8262 beq.w 8013cf2 <_vfiprintf_r+0x8ce>
801382e: f02a 0280 bic.w r2, sl, #128 ; 0x80
8013832: 9204 str r2, [sp, #16]
8013834: ea54 0205 orrs.w r2, r4, r5
8013838: f040 8261 bne.w 8013cfe <_vfiprintf_r+0x8da>
801383c: 9a00 ldr r2, [sp, #0]
801383e: 2a00 cmp r2, #0
8013840: f000 8199 beq.w 8013b76 <_vfiprintf_r+0x752>
8013844: 2b01 cmp r3, #1
8013846: f040 825d bne.w 8013d04 <_vfiprintf_r+0x8e0>
801384a: e139 b.n 8013ac0 <_vfiprintf_r+0x69c>
801384c: 46a3 mov fp, r4
801384e: f01a 0510 ands.w r5, sl, #16
8013852: f85b 4b04 ldr.w r4, [fp], #4
8013856: d001 beq.n 801385c <_vfiprintf_r+0x438>
8013858: 461d mov r5, r3
801385a: e7de b.n 801381a <_vfiprintf_r+0x3f6>
801385c: f01a 0340 ands.w r3, sl, #64 ; 0x40
8013860: d001 beq.n 8013866 <_vfiprintf_r+0x442>
8013862: b2a4 uxth r4, r4
8013864: e7d9 b.n 801381a <_vfiprintf_r+0x3f6>
8013866: f41a 7500 ands.w r5, sl, #512 ; 0x200
801386a: d0d6 beq.n 801381a <_vfiprintf_r+0x3f6>
801386c: b2e4 uxtb r4, r4
801386e: e7f3 b.n 8013858 <_vfiprintf_r+0x434>
8013870: 2330 movs r3, #48 ; 0x30
8013872: 46a3 mov fp, r4
8013874: f88d 302c strb.w r3, [sp, #44] ; 0x2c
8013878: 2378 movs r3, #120 ; 0x78
801387a: f88d 302d strb.w r3, [sp, #45] ; 0x2d
801387e: f85b 4b04 ldr.w r4, [fp], #4
8013882: 4b03 ldr r3, [pc, #12] ; (8013890 <_vfiprintf_r+0x46c>)
8013884: 9305 str r3, [sp, #20]
8013886: 2500 movs r5, #0
8013888: f04a 0a02 orr.w sl, sl, #2
801388c: 2302 movs r3, #2
801388e: e7c7 b.n 8013820 <_vfiprintf_r+0x3fc>
8013890: 080179f0 .word 0x080179f0
8013894: 9b00 ldr r3, [sp, #0]
8013896: 46a3 mov fp, r4
8013898: 2500 movs r5, #0
801389a: 1c5c adds r4, r3, #1
801389c: f85b 8b04 ldr.w r8, [fp], #4
80138a0: f88d 502b strb.w r5, [sp, #43] ; 0x2b
80138a4: f000 80ce beq.w 8013a44 <_vfiprintf_r+0x620>
80138a8: 461a mov r2, r3
80138aa: 4629 mov r1, r5
80138ac: 4640 mov r0, r8
80138ae: f7ec fca7 bl 8000200 <memchr>
80138b2: 2800 cmp r0, #0
80138b4: f000 8174 beq.w 8013ba0 <_vfiprintf_r+0x77c>
80138b8: eba0 0308 sub.w r3, r0, r8
80138bc: 9300 str r3, [sp, #0]
80138be: 9b00 ldr r3, [sp, #0]
80138c0: 42ab cmp r3, r5
80138c2: bfb8 it lt
80138c4: 462b movlt r3, r5
80138c6: 9304 str r3, [sp, #16]
80138c8: f89d 302b ldrb.w r3, [sp, #43] ; 0x2b
80138cc: b113 cbz r3, 80138d4 <_vfiprintf_r+0x4b0>
80138ce: 9b04 ldr r3, [sp, #16]
80138d0: 3301 adds r3, #1
80138d2: 9304 str r3, [sp, #16]
80138d4: f01a 0302 ands.w r3, sl, #2
80138d8: 9308 str r3, [sp, #32]
80138da: bf1e ittt ne
80138dc: 9b04 ldrne r3, [sp, #16]
80138de: 3302 addne r3, #2
80138e0: 9304 strne r3, [sp, #16]
80138e2: f01a 0384 ands.w r3, sl, #132 ; 0x84
80138e6: 9309 str r3, [sp, #36] ; 0x24
80138e8: d11f bne.n 801392a <_vfiprintf_r+0x506>
80138ea: e9dd 3203 ldrd r3, r2, [sp, #12]
80138ee: 1a9c subs r4, r3, r2
80138f0: 2c00 cmp r4, #0
80138f2: dd1a ble.n 801392a <_vfiprintf_r+0x506>
80138f4: e9dd 320d ldrd r3, r2, [sp, #52] ; 0x34
80138f8: 48aa ldr r0, [pc, #680] ; (8013ba4 <_vfiprintf_r+0x780>)
80138fa: 6030 str r0, [r6, #0]
80138fc: 2c10 cmp r4, #16
80138fe: f103 0301 add.w r3, r3, #1
8013902: f106 0108 add.w r1, r6, #8
8013906: f300 8153 bgt.w 8013bb0 <_vfiprintf_r+0x78c>
801390a: 6074 str r4, [r6, #4]
801390c: 2b07 cmp r3, #7
801390e: 4414 add r4, r2
8013910: e9cd 340d strd r3, r4, [sp, #52] ; 0x34
8013914: f340 815e ble.w 8013bd4 <_vfiprintf_r+0x7b0>
8013918: aa0c add r2, sp, #48 ; 0x30
801391a: 4639 mov r1, r7
801391c: 4648 mov r0, r9
801391e: f7ff fd4e bl 80133be <__sprint_r>
8013922: 2800 cmp r0, #0
8013924: f040 81b7 bne.w 8013c96 <_vfiprintf_r+0x872>
8013928: ae0f add r6, sp, #60 ; 0x3c
801392a: f89d 302b ldrb.w r3, [sp, #43] ; 0x2b
801392e: b173 cbz r3, 801394e <_vfiprintf_r+0x52a>
8013930: f10d 022b add.w r2, sp, #43 ; 0x2b
8013934: 9b0d ldr r3, [sp, #52] ; 0x34
8013936: 6032 str r2, [r6, #0]
8013938: 2201 movs r2, #1
801393a: 6072 str r2, [r6, #4]
801393c: 9a0e ldr r2, [sp, #56] ; 0x38
801393e: 3301 adds r3, #1
8013940: 3201 adds r2, #1
8013942: 2b07 cmp r3, #7
8013944: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
8013948: f300 8146 bgt.w 8013bd8 <_vfiprintf_r+0x7b4>
801394c: 3608 adds r6, #8
801394e: 9b08 ldr r3, [sp, #32]
8013950: b16b cbz r3, 801396e <_vfiprintf_r+0x54a>
8013952: aa0b add r2, sp, #44 ; 0x2c
8013954: 9b0d ldr r3, [sp, #52] ; 0x34
8013956: 6032 str r2, [r6, #0]
8013958: 2202 movs r2, #2
801395a: 6072 str r2, [r6, #4]
801395c: 9a0e ldr r2, [sp, #56] ; 0x38
801395e: 3301 adds r3, #1
8013960: 3202 adds r2, #2
8013962: 2b07 cmp r3, #7
8013964: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
8013968: f300 813f bgt.w 8013bea <_vfiprintf_r+0x7c6>
801396c: 3608 adds r6, #8
801396e: 9b09 ldr r3, [sp, #36] ; 0x24
8013970: 2b80 cmp r3, #128 ; 0x80
8013972: d11f bne.n 80139b4 <_vfiprintf_r+0x590>
8013974: e9dd 3203 ldrd r3, r2, [sp, #12]
8013978: 1a9c subs r4, r3, r2
801397a: 2c00 cmp r4, #0
801397c: dd1a ble.n 80139b4 <_vfiprintf_r+0x590>
801397e: e9dd 320d ldrd r3, r2, [sp, #52] ; 0x34
8013982: 4889 ldr r0, [pc, #548] ; (8013ba8 <_vfiprintf_r+0x784>)
8013984: 6030 str r0, [r6, #0]
8013986: 2c10 cmp r4, #16
8013988: f103 0301 add.w r3, r3, #1
801398c: f106 0108 add.w r1, r6, #8
8013990: f300 8134 bgt.w 8013bfc <_vfiprintf_r+0x7d8>
8013994: 6074 str r4, [r6, #4]
8013996: 2b07 cmp r3, #7
8013998: 4414 add r4, r2
801399a: e9cd 340d strd r3, r4, [sp, #52] ; 0x34
801399e: f340 813f ble.w 8013c20 <_vfiprintf_r+0x7fc>
80139a2: aa0c add r2, sp, #48 ; 0x30
80139a4: 4639 mov r1, r7
80139a6: 4648 mov r0, r9
80139a8: f7ff fd09 bl 80133be <__sprint_r>
80139ac: 2800 cmp r0, #0
80139ae: f040 8172 bne.w 8013c96 <_vfiprintf_r+0x872>
80139b2: ae0f add r6, sp, #60 ; 0x3c
80139b4: 9b00 ldr r3, [sp, #0]
80139b6: 1aec subs r4, r5, r3
80139b8: 2c00 cmp r4, #0
80139ba: dd1a ble.n 80139f2 <_vfiprintf_r+0x5ce>
80139bc: 4d7a ldr r5, [pc, #488] ; (8013ba8 <_vfiprintf_r+0x784>)
80139be: 6035 str r5, [r6, #0]
80139c0: e9dd 310d ldrd r3, r1, [sp, #52] ; 0x34
80139c4: 2c10 cmp r4, #16
80139c6: f103 0301 add.w r3, r3, #1
80139ca: f106 0208 add.w r2, r6, #8
80139ce: f300 8129 bgt.w 8013c24 <_vfiprintf_r+0x800>
80139d2: 6074 str r4, [r6, #4]
80139d4: 2b07 cmp r3, #7
80139d6: 440c add r4, r1
80139d8: e9cd 340d strd r3, r4, [sp, #52] ; 0x34
80139dc: f340 8133 ble.w 8013c46 <_vfiprintf_r+0x822>
80139e0: aa0c add r2, sp, #48 ; 0x30
80139e2: 4639 mov r1, r7
80139e4: 4648 mov r0, r9
80139e6: f7ff fcea bl 80133be <__sprint_r>
80139ea: 2800 cmp r0, #0
80139ec: f040 8153 bne.w 8013c96 <_vfiprintf_r+0x872>
80139f0: ae0f add r6, sp, #60 ; 0x3c
80139f2: 9b00 ldr r3, [sp, #0]
80139f4: 980e ldr r0, [sp, #56] ; 0x38
80139f6: 6073 str r3, [r6, #4]
80139f8: 4418 add r0, r3
80139fa: 9b0d ldr r3, [sp, #52] ; 0x34
80139fc: f8c6 8000 str.w r8, [r6]
8013a00: 3301 adds r3, #1
8013a02: 2b07 cmp r3, #7
8013a04: 900e str r0, [sp, #56] ; 0x38
8013a06: 930d str r3, [sp, #52] ; 0x34
8013a08: f300 811f bgt.w 8013c4a <_vfiprintf_r+0x826>
8013a0c: f106 0308 add.w r3, r6, #8
8013a10: f01a 0f04 tst.w sl, #4
8013a14: f040 8121 bne.w 8013c5a <_vfiprintf_r+0x836>
8013a18: e9dd 3202 ldrd r3, r2, [sp, #8]
8013a1c: 9904 ldr r1, [sp, #16]
8013a1e: 428a cmp r2, r1
8013a20: bfac ite ge
8013a22: 189b addge r3, r3, r2
8013a24: 185b addlt r3, r3, r1
8013a26: 9302 str r3, [sp, #8]
8013a28: 9b0e ldr r3, [sp, #56] ; 0x38
8013a2a: b13b cbz r3, 8013a3c <_vfiprintf_r+0x618>
8013a2c: aa0c add r2, sp, #48 ; 0x30
8013a2e: 4639 mov r1, r7
8013a30: 4648 mov r0, r9
8013a32: f7ff fcc4 bl 80133be <__sprint_r>
8013a36: 2800 cmp r0, #0
8013a38: f040 812d bne.w 8013c96 <_vfiprintf_r+0x872>
8013a3c: 2300 movs r3, #0
8013a3e: 930d str r3, [sp, #52] ; 0x34
8013a40: ae0f add r6, sp, #60 ; 0x3c
8013a42: e6c7 b.n 80137d4 <_vfiprintf_r+0x3b0>
8013a44: 4640 mov r0, r8
8013a46: f7ec fbd3 bl 80001f0 <strlen>
8013a4a: 9000 str r0, [sp, #0]
8013a4c: e737 b.n 80138be <_vfiprintf_r+0x49a>
8013a4e: f04a 0a10 orr.w sl, sl, #16
8013a52: f01a 0320 ands.w r3, sl, #32
8013a56: d008 beq.n 8013a6a <_vfiprintf_r+0x646>
8013a58: 3407 adds r4, #7
8013a5a: f024 0307 bic.w r3, r4, #7
8013a5e: 469b mov fp, r3
8013a60: 685d ldr r5, [r3, #4]
8013a62: f85b 4b08 ldr.w r4, [fp], #8
8013a66: 2301 movs r3, #1
8013a68: e6da b.n 8013820 <_vfiprintf_r+0x3fc>
8013a6a: 46a3 mov fp, r4
8013a6c: f01a 0510 ands.w r5, sl, #16
8013a70: f85b 4b04 ldr.w r4, [fp], #4
8013a74: d001 beq.n 8013a7a <_vfiprintf_r+0x656>
8013a76: 461d mov r5, r3
8013a78: e7f5 b.n 8013a66 <_vfiprintf_r+0x642>
8013a7a: f01a 0340 ands.w r3, sl, #64 ; 0x40
8013a7e: d001 beq.n 8013a84 <_vfiprintf_r+0x660>
8013a80: b2a4 uxth r4, r4
8013a82: e7f0 b.n 8013a66 <_vfiprintf_r+0x642>
8013a84: f41a 7500 ands.w r5, sl, #512 ; 0x200
8013a88: d0ed beq.n 8013a66 <_vfiprintf_r+0x642>
8013a8a: b2e4 uxtb r4, r4
8013a8c: e7f3 b.n 8013a76 <_vfiprintf_r+0x652>
8013a8e: 4a47 ldr r2, [pc, #284] ; (8013bac <_vfiprintf_r+0x788>)
8013a90: e5c5 b.n 801361e <_vfiprintf_r+0x1fa>
8013a92: 46a3 mov fp, r4
8013a94: f01a 0510 ands.w r5, sl, #16
8013a98: f85b 4b04 ldr.w r4, [fp], #4
8013a9c: d001 beq.n 8013aa2 <_vfiprintf_r+0x67e>
8013a9e: 4615 mov r5, r2
8013aa0: e5c9 b.n 8013636 <_vfiprintf_r+0x212>
8013aa2: f01a 0240 ands.w r2, sl, #64 ; 0x40
8013aa6: d001 beq.n 8013aac <_vfiprintf_r+0x688>
8013aa8: b2a4 uxth r4, r4
8013aaa: e5c4 b.n 8013636 <_vfiprintf_r+0x212>
8013aac: f41a 7500 ands.w r5, sl, #512 ; 0x200
8013ab0: f43f adc1 beq.w 8013636 <_vfiprintf_r+0x212>
8013ab4: b2e4 uxtb r4, r4
8013ab6: e7f2 b.n 8013a9e <_vfiprintf_r+0x67a>
8013ab8: 2c0a cmp r4, #10
8013aba: f175 0300 sbcs.w r3, r5, #0
8013abe: d205 bcs.n 8013acc <_vfiprintf_r+0x6a8>
8013ac0: 3430 adds r4, #48 ; 0x30
8013ac2: f88d 40df strb.w r4, [sp, #223] ; 0xdf
8013ac6: f10d 08df add.w r8, sp, #223 ; 0xdf
8013aca: e137 b.n 8013d3c <_vfiprintf_r+0x918>
8013acc: ab38 add r3, sp, #224 ; 0xe0
8013ace: 9308 str r3, [sp, #32]
8013ad0: 9b04 ldr r3, [sp, #16]
8013ad2: f403 6380 and.w r3, r3, #1024 ; 0x400
8013ad6: f04f 0a00 mov.w sl, #0
8013ada: 9309 str r3, [sp, #36] ; 0x24
8013adc: 9b08 ldr r3, [sp, #32]
8013ade: 220a movs r2, #10
8013ae0: f103 38ff add.w r8, r3, #4294967295
8013ae4: 4620 mov r0, r4
8013ae6: 2300 movs r3, #0
8013ae8: 4629 mov r1, r5
8013aea: f7ed f86d bl 8000bc8 <__aeabi_uldivmod>
8013aee: 9b08 ldr r3, [sp, #32]
8013af0: 3230 adds r2, #48 ; 0x30
8013af2: f803 2c01 strb.w r2, [r3, #-1]
8013af6: 9b09 ldr r3, [sp, #36] ; 0x24
8013af8: f10a 0a01 add.w sl, sl, #1
8013afc: b1db cbz r3, 8013b36 <_vfiprintf_r+0x712>
8013afe: 9b06 ldr r3, [sp, #24]
8013b00: 781b ldrb r3, [r3, #0]
8013b02: 4553 cmp r3, sl
8013b04: d117 bne.n 8013b36 <_vfiprintf_r+0x712>
8013b06: f1ba 0fff cmp.w sl, #255 ; 0xff
8013b0a: d014 beq.n 8013b36 <_vfiprintf_r+0x712>
8013b0c: 2c0a cmp r4, #10
8013b0e: f175 0300 sbcs.w r3, r5, #0
8013b12: d310 bcc.n 8013b36 <_vfiprintf_r+0x712>
8013b14: 9b07 ldr r3, [sp, #28]
8013b16: eba8 0803 sub.w r8, r8, r3
8013b1a: 461a mov r2, r3
8013b1c: ee18 1a10 vmov r1, s16
8013b20: 4640 mov r0, r8
8013b22: f7ff fc2c bl 801337e <strncpy>
8013b26: 9b06 ldr r3, [sp, #24]
8013b28: 785b ldrb r3, [r3, #1]
8013b2a: b1a3 cbz r3, 8013b56 <_vfiprintf_r+0x732>
8013b2c: 9b06 ldr r3, [sp, #24]
8013b2e: 3301 adds r3, #1
8013b30: 9306 str r3, [sp, #24]
8013b32: f04f 0a00 mov.w sl, #0
8013b36: 2300 movs r3, #0
8013b38: 220a movs r2, #10
8013b3a: 4620 mov r0, r4
8013b3c: 4629 mov r1, r5
8013b3e: f7ed f843 bl 8000bc8 <__aeabi_uldivmod>
8013b42: 2c0a cmp r4, #10
8013b44: f175 0300 sbcs.w r3, r5, #0
8013b48: f0c0 80f8 bcc.w 8013d3c <_vfiprintf_r+0x918>
8013b4c: 4604 mov r4, r0
8013b4e: 460d mov r5, r1
8013b50: f8cd 8020 str.w r8, [sp, #32]
8013b54: e7c2 b.n 8013adc <_vfiprintf_r+0x6b8>
8013b56: 469a mov sl, r3
8013b58: e7ed b.n 8013b36 <_vfiprintf_r+0x712>
8013b5a: f004 030f and.w r3, r4, #15
8013b5e: 9a05 ldr r2, [sp, #20]
8013b60: 0924 lsrs r4, r4, #4
8013b62: 5cd3 ldrb r3, [r2, r3]
8013b64: f808 3d01 strb.w r3, [r8, #-1]!
8013b68: ea44 7405 orr.w r4, r4, r5, lsl #28
8013b6c: 092d lsrs r5, r5, #4
8013b6e: ea54 0305 orrs.w r3, r4, r5
8013b72: d1f2 bne.n 8013b5a <_vfiprintf_r+0x736>
8013b74: e0e2 b.n 8013d3c <_vfiprintf_r+0x918>
8013b76: b933 cbnz r3, 8013b86 <_vfiprintf_r+0x762>
8013b78: f01a 0f01 tst.w sl, #1
8013b7c: d003 beq.n 8013b86 <_vfiprintf_r+0x762>
8013b7e: 2330 movs r3, #48 ; 0x30
8013b80: f88d 30df strb.w r3, [sp, #223] ; 0xdf
8013b84: e79f b.n 8013ac6 <_vfiprintf_r+0x6a2>
8013b86: f10d 08e0 add.w r8, sp, #224 ; 0xe0
8013b8a: e0d7 b.n 8013d3c <_vfiprintf_r+0x918>
8013b8c: 2b00 cmp r3, #0
8013b8e: f000 80a3 beq.w 8013cd8 <_vfiprintf_r+0x8b4>
8013b92: 2100 movs r1, #0
8013b94: f88d 307c strb.w r3, [sp, #124] ; 0x7c
8013b98: f88d 102b strb.w r1, [sp, #43] ; 0x2b
8013b9c: 46a3 mov fp, r4
8013b9e: e5da b.n 8013756 <_vfiprintf_r+0x332>
8013ba0: 4605 mov r5, r0
8013ba2: e68c b.n 80138be <_vfiprintf_r+0x49a>
8013ba4: 08017c0c .word 0x08017c0c
8013ba8: 08017c1c .word 0x08017c1c
8013bac: 08017a01 .word 0x08017a01
8013bb0: 2010 movs r0, #16
8013bb2: 4402 add r2, r0
8013bb4: 2b07 cmp r3, #7
8013bb6: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
8013bba: 6070 str r0, [r6, #4]
8013bbc: dd07 ble.n 8013bce <_vfiprintf_r+0x7aa>
8013bbe: aa0c add r2, sp, #48 ; 0x30
8013bc0: 4639 mov r1, r7
8013bc2: 4648 mov r0, r9
8013bc4: f7ff fbfb bl 80133be <__sprint_r>
8013bc8: 2800 cmp r0, #0
8013bca: d164 bne.n 8013c96 <_vfiprintf_r+0x872>
8013bcc: a90f add r1, sp, #60 ; 0x3c
8013bce: 3c10 subs r4, #16
8013bd0: 460e mov r6, r1
8013bd2: e68f b.n 80138f4 <_vfiprintf_r+0x4d0>
8013bd4: 460e mov r6, r1
8013bd6: e6a8 b.n 801392a <_vfiprintf_r+0x506>
8013bd8: aa0c add r2, sp, #48 ; 0x30
8013bda: 4639 mov r1, r7
8013bdc: 4648 mov r0, r9
8013bde: f7ff fbee bl 80133be <__sprint_r>
8013be2: 2800 cmp r0, #0
8013be4: d157 bne.n 8013c96 <_vfiprintf_r+0x872>
8013be6: ae0f add r6, sp, #60 ; 0x3c
8013be8: e6b1 b.n 801394e <_vfiprintf_r+0x52a>
8013bea: aa0c add r2, sp, #48 ; 0x30
8013bec: 4639 mov r1, r7
8013bee: 4648 mov r0, r9
8013bf0: f7ff fbe5 bl 80133be <__sprint_r>
8013bf4: 2800 cmp r0, #0
8013bf6: d14e bne.n 8013c96 <_vfiprintf_r+0x872>
8013bf8: ae0f add r6, sp, #60 ; 0x3c
8013bfa: e6b8 b.n 801396e <_vfiprintf_r+0x54a>
8013bfc: 2010 movs r0, #16
8013bfe: 4402 add r2, r0
8013c00: 2b07 cmp r3, #7
8013c02: e9cd 320d strd r3, r2, [sp, #52] ; 0x34
8013c06: 6070 str r0, [r6, #4]
8013c08: dd07 ble.n 8013c1a <_vfiprintf_r+0x7f6>
8013c0a: aa0c add r2, sp, #48 ; 0x30
8013c0c: 4639 mov r1, r7
8013c0e: 4648 mov r0, r9
8013c10: f7ff fbd5 bl 80133be <__sprint_r>
8013c14: 2800 cmp r0, #0
8013c16: d13e bne.n 8013c96 <_vfiprintf_r+0x872>
8013c18: a90f add r1, sp, #60 ; 0x3c
8013c1a: 3c10 subs r4, #16
8013c1c: 460e mov r6, r1
8013c1e: e6ae b.n 801397e <_vfiprintf_r+0x55a>
8013c20: 460e mov r6, r1
8013c22: e6c7 b.n 80139b4 <_vfiprintf_r+0x590>
8013c24: 2010 movs r0, #16
8013c26: 4401 add r1, r0
8013c28: 2b07 cmp r3, #7
8013c2a: e9cd 310d strd r3, r1, [sp, #52] ; 0x34
8013c2e: 6070 str r0, [r6, #4]
8013c30: dd06 ble.n 8013c40 <_vfiprintf_r+0x81c>
8013c32: aa0c add r2, sp, #48 ; 0x30
8013c34: 4639 mov r1, r7
8013c36: 4648 mov r0, r9
8013c38: f7ff fbc1 bl 80133be <__sprint_r>
8013c3c: bb58 cbnz r0, 8013c96 <_vfiprintf_r+0x872>
8013c3e: aa0f add r2, sp, #60 ; 0x3c
8013c40: 3c10 subs r4, #16
8013c42: 4616 mov r6, r2
8013c44: e6bb b.n 80139be <_vfiprintf_r+0x59a>
8013c46: 4616 mov r6, r2
8013c48: e6d3 b.n 80139f2 <_vfiprintf_r+0x5ce>
8013c4a: aa0c add r2, sp, #48 ; 0x30
8013c4c: 4639 mov r1, r7
8013c4e: 4648 mov r0, r9
8013c50: f7ff fbb5 bl 80133be <__sprint_r>
8013c54: b9f8 cbnz r0, 8013c96 <_vfiprintf_r+0x872>
8013c56: ab0f add r3, sp, #60 ; 0x3c
8013c58: e6da b.n 8013a10 <_vfiprintf_r+0x5ec>
8013c5a: e9dd 2103 ldrd r2, r1, [sp, #12]
8013c5e: 1a54 subs r4, r2, r1
8013c60: 2c00 cmp r4, #0
8013c62: f77f aed9 ble.w 8013a18 <_vfiprintf_r+0x5f4>
8013c66: 4d39 ldr r5, [pc, #228] ; (8013d4c <_vfiprintf_r+0x928>)
8013c68: 2610 movs r6, #16
8013c6a: e9dd 210d ldrd r2, r1, [sp, #52] ; 0x34
8013c6e: 2c10 cmp r4, #16
8013c70: f102 0201 add.w r2, r2, #1
8013c74: 601d str r5, [r3, #0]
8013c76: dc1d bgt.n 8013cb4 <_vfiprintf_r+0x890>
8013c78: 605c str r4, [r3, #4]
8013c7a: 2a07 cmp r2, #7
8013c7c: 440c add r4, r1
8013c7e: e9cd 240d strd r2, r4, [sp, #52] ; 0x34
8013c82: f77f aec9 ble.w 8013a18 <_vfiprintf_r+0x5f4>
8013c86: aa0c add r2, sp, #48 ; 0x30
8013c88: 4639 mov r1, r7
8013c8a: 4648 mov r0, r9
8013c8c: f7ff fb97 bl 80133be <__sprint_r>
8013c90: 2800 cmp r0, #0
8013c92: f43f aec1 beq.w 8013a18 <_vfiprintf_r+0x5f4>
8013c96: 6e7b ldr r3, [r7, #100] ; 0x64
8013c98: 07d9 lsls r1, r3, #31
8013c9a: d405 bmi.n 8013ca8 <_vfiprintf_r+0x884>
8013c9c: 89bb ldrh r3, [r7, #12]
8013c9e: 059a lsls r2, r3, #22
8013ca0: d402 bmi.n 8013ca8 <_vfiprintf_r+0x884>
8013ca2: 6db8 ldr r0, [r7, #88] ; 0x58
8013ca4: f7fe fcf5 bl 8012692 <__retarget_lock_release_recursive>
8013ca8: 89bb ldrh r3, [r7, #12]
8013caa: 065b lsls r3, r3, #25
8013cac: f57f abed bpl.w 801348a <_vfiprintf_r+0x66>
8013cb0: f7ff bbe8 b.w 8013484 <_vfiprintf_r+0x60>
8013cb4: 3110 adds r1, #16
8013cb6: 2a07 cmp r2, #7
8013cb8: e9cd 210d strd r2, r1, [sp, #52] ; 0x34
8013cbc: 605e str r6, [r3, #4]
8013cbe: dc02 bgt.n 8013cc6 <_vfiprintf_r+0x8a2>
8013cc0: 3308 adds r3, #8
8013cc2: 3c10 subs r4, #16
8013cc4: e7d1 b.n 8013c6a <_vfiprintf_r+0x846>
8013cc6: aa0c add r2, sp, #48 ; 0x30
8013cc8: 4639 mov r1, r7
8013cca: 4648 mov r0, r9
8013ccc: f7ff fb77 bl 80133be <__sprint_r>
8013cd0: 2800 cmp r0, #0
8013cd2: d1e0 bne.n 8013c96 <_vfiprintf_r+0x872>
8013cd4: ab0f add r3, sp, #60 ; 0x3c
8013cd6: e7f4 b.n 8013cc2 <_vfiprintf_r+0x89e>
8013cd8: 9b0e ldr r3, [sp, #56] ; 0x38
8013cda: b913 cbnz r3, 8013ce2 <_vfiprintf_r+0x8be>
8013cdc: 2300 movs r3, #0
8013cde: 930d str r3, [sp, #52] ; 0x34
8013ce0: e7d9 b.n 8013c96 <_vfiprintf_r+0x872>
8013ce2: aa0c add r2, sp, #48 ; 0x30
8013ce4: 4639 mov r1, r7
8013ce6: 4648 mov r0, r9
8013ce8: f7ff fb69 bl 80133be <__sprint_r>
8013cec: 2800 cmp r0, #0
8013cee: d0f5 beq.n 8013cdc <_vfiprintf_r+0x8b8>
8013cf0: e7d1 b.n 8013c96 <_vfiprintf_r+0x872>
8013cf2: ea54 0205 orrs.w r2, r4, r5
8013cf6: f8cd a010 str.w sl, [sp, #16]
8013cfa: f43f ada3 beq.w 8013844 <_vfiprintf_r+0x420>
8013cfe: 2b01 cmp r3, #1
8013d00: f43f aeda beq.w 8013ab8 <_vfiprintf_r+0x694>
8013d04: 2b02 cmp r3, #2
8013d06: f10d 08e0 add.w r8, sp, #224 ; 0xe0
8013d0a: f43f af26 beq.w 8013b5a <_vfiprintf_r+0x736>
8013d0e: f004 0307 and.w r3, r4, #7
8013d12: 08e4 lsrs r4, r4, #3
8013d14: ea44 7445 orr.w r4, r4, r5, lsl #29
8013d18: 08ed lsrs r5, r5, #3
8013d1a: 3330 adds r3, #48 ; 0x30
8013d1c: ea54 0105 orrs.w r1, r4, r5
8013d20: 4642 mov r2, r8
8013d22: f808 3d01 strb.w r3, [r8, #-1]!
8013d26: d1f2 bne.n 8013d0e <_vfiprintf_r+0x8ea>
8013d28: 9904 ldr r1, [sp, #16]
8013d2a: 07c8 lsls r0, r1, #31
8013d2c: d506 bpl.n 8013d3c <_vfiprintf_r+0x918>
8013d2e: 2b30 cmp r3, #48 ; 0x30
8013d30: d004 beq.n 8013d3c <_vfiprintf_r+0x918>
8013d32: 2330 movs r3, #48 ; 0x30
8013d34: f808 3c01 strb.w r3, [r8, #-1]
8013d38: f1a2 0802 sub.w r8, r2, #2
8013d3c: ab38 add r3, sp, #224 ; 0xe0
8013d3e: eba3 0308 sub.w r3, r3, r8
8013d42: 9d00 ldr r5, [sp, #0]
8013d44: f8dd a010 ldr.w sl, [sp, #16]
8013d48: 9300 str r3, [sp, #0]
8013d4a: e5b8 b.n 80138be <_vfiprintf_r+0x49a>
8013d4c: 08017c0c .word 0x08017c0c
08013d50 <__sbprintf>:
8013d50: b570 push {r4, r5, r6, lr}
8013d52: 460c mov r4, r1
8013d54: 8989 ldrh r1, [r1, #12]
8013d56: f5ad 6d8e sub.w sp, sp, #1136 ; 0x470
8013d5a: f021 0102 bic.w r1, r1, #2
8013d5e: f8ad 1014 strh.w r1, [sp, #20]
8013d62: 6e61 ldr r1, [r4, #100] ; 0x64
8013d64: 911b str r1, [sp, #108] ; 0x6c
8013d66: 89e1 ldrh r1, [r4, #14]
8013d68: f8ad 1016 strh.w r1, [sp, #22]
8013d6c: 69e1 ldr r1, [r4, #28]
8013d6e: 9109 str r1, [sp, #36] ; 0x24
8013d70: 6a61 ldr r1, [r4, #36] ; 0x24
8013d72: 910b str r1, [sp, #44] ; 0x2c
8013d74: a91c add r1, sp, #112 ; 0x70
8013d76: 9102 str r1, [sp, #8]
8013d78: 9106 str r1, [sp, #24]
8013d7a: f44f 6180 mov.w r1, #1024 ; 0x400
8013d7e: 4606 mov r6, r0
8013d80: 9104 str r1, [sp, #16]
8013d82: 9107 str r1, [sp, #28]
8013d84: a818 add r0, sp, #96 ; 0x60
8013d86: 2100 movs r1, #0
8013d88: e9cd 3200 strd r3, r2, [sp]
8013d8c: 9108 str r1, [sp, #32]
8013d8e: f7fe fc7d bl 801268c <__retarget_lock_init_recursive>
8013d92: e9dd 3200 ldrd r3, r2, [sp]
8013d96: a902 add r1, sp, #8
8013d98: 4630 mov r0, r6
8013d9a: f7ff fb43 bl 8013424 <_vfiprintf_r>
8013d9e: 1e05 subs r5, r0, #0
8013da0: db07 blt.n 8013db2 <__sbprintf+0x62>
8013da2: a902 add r1, sp, #8
8013da4: 4630 mov r0, r6
8013da6: f7fe fa91 bl 80122cc <_fflush_r>
8013daa: 2800 cmp r0, #0
8013dac: bf18 it ne
8013dae: f04f 35ff movne.w r5, #4294967295
8013db2: f8bd 3014 ldrh.w r3, [sp, #20]
8013db6: 9818 ldr r0, [sp, #96] ; 0x60
8013db8: 065b lsls r3, r3, #25
8013dba: bf42 ittt mi
8013dbc: 89a3 ldrhmi r3, [r4, #12]
8013dbe: f043 0340 orrmi.w r3, r3, #64 ; 0x40
8013dc2: 81a3 strhmi r3, [r4, #12]
8013dc4: f7fe fc63 bl 801268e <__retarget_lock_close_recursive>
8013dc8: 4628 mov r0, r5
8013dca: f50d 6d8e add.w sp, sp, #1136 ; 0x470
8013dce: bd70 pop {r4, r5, r6, pc}
08013dd0 <_write_r>:
8013dd0: b538 push {r3, r4, r5, lr}
8013dd2: 4d07 ldr r5, [pc, #28] ; (8013df0 <_write_r+0x20>)
8013dd4: 4604 mov r4, r0
8013dd6: 4608 mov r0, r1
8013dd8: 4611 mov r1, r2
8013dda: 2200 movs r2, #0
8013ddc: 602a str r2, [r5, #0]
8013dde: 461a mov r2, r3
8013de0: f000 fdd0 bl 8014984 <_write>
8013de4: 1c43 adds r3, r0, #1
8013de6: d102 bne.n 8013dee <_write_r+0x1e>
8013de8: 682b ldr r3, [r5, #0]
8013dea: b103 cbz r3, 8013dee <_write_r+0x1e>
8013dec: 6023 str r3, [r4, #0]
8013dee: bd38 pop {r3, r4, r5, pc}
8013df0: 20008d74 .word 0x20008d74
08013df4 <__register_exitproc>:
8013df4: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
8013df8: f8df a078 ldr.w sl, [pc, #120] ; 8013e74 <__register_exitproc+0x80>
8013dfc: 4606 mov r6, r0
8013dfe: f8da 0000 ldr.w r0, [sl]
8013e02: 4698 mov r8, r3
8013e04: 460f mov r7, r1
8013e06: 4691 mov r9, r2
8013e08: f7fe fc42 bl 8012690 <__retarget_lock_acquire_recursive>
8013e0c: 4b18 ldr r3, [pc, #96] ; (8013e70 <__register_exitproc+0x7c>)
8013e0e: 681b ldr r3, [r3, #0]
8013e10: f8d3 4148 ldr.w r4, [r3, #328] ; 0x148
8013e14: b91c cbnz r4, 8013e1e <__register_exitproc+0x2a>
8013e16: f503 74a6 add.w r4, r3, #332 ; 0x14c
8013e1a: f8c3 4148 str.w r4, [r3, #328] ; 0x148
8013e1e: 6865 ldr r5, [r4, #4]
8013e20: f8da 0000 ldr.w r0, [sl]
8013e24: 2d1f cmp r5, #31
8013e26: dd05 ble.n 8013e34 <__register_exitproc+0x40>
8013e28: f7fe fc33 bl 8012692 <__retarget_lock_release_recursive>
8013e2c: f04f 30ff mov.w r0, #4294967295
8013e30: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
8013e34: b19e cbz r6, 8013e5e <__register_exitproc+0x6a>
8013e36: eb04 0185 add.w r1, r4, r5, lsl #2
8013e3a: 2201 movs r2, #1
8013e3c: f8c1 9088 str.w r9, [r1, #136] ; 0x88
8013e40: f8d4 3188 ldr.w r3, [r4, #392] ; 0x188
8013e44: 40aa lsls r2, r5
8013e46: 4313 orrs r3, r2
8013e48: f8c4 3188 str.w r3, [r4, #392] ; 0x188
8013e4c: 2e02 cmp r6, #2
8013e4e: f8c1 8108 str.w r8, [r1, #264] ; 0x108
8013e52: bf02 ittt eq
8013e54: f8d4 318c ldreq.w r3, [r4, #396] ; 0x18c
8013e58: 4313 orreq r3, r2
8013e5a: f8c4 318c streq.w r3, [r4, #396] ; 0x18c
8013e5e: 1c6b adds r3, r5, #1
8013e60: 3502 adds r5, #2
8013e62: 6063 str r3, [r4, #4]
8013e64: f844 7025 str.w r7, [r4, r5, lsl #2]
8013e68: f7fe fc13 bl 8012692 <__retarget_lock_release_recursive>
8013e6c: 2000 movs r0, #0
8013e6e: e7df b.n 8013e30 <__register_exitproc+0x3c>
8013e70: 080179dc .word 0x080179dc
8013e74: 20000460 .word 0x20000460
08013e78 <__assert_func>:
8013e78: b51f push {r0, r1, r2, r3, r4, lr}
8013e7a: 4614 mov r4, r2
8013e7c: 461a mov r2, r3
8013e7e: 4b09 ldr r3, [pc, #36] ; (8013ea4 <__assert_func+0x2c>)
8013e80: 681b ldr r3, [r3, #0]
8013e82: 4605 mov r5, r0
8013e84: 68d8 ldr r0, [r3, #12]
8013e86: b14c cbz r4, 8013e9c <__assert_func+0x24>
8013e88: 4b07 ldr r3, [pc, #28] ; (8013ea8 <__assert_func+0x30>)
8013e8a: 9100 str r1, [sp, #0]
8013e8c: e9cd 3401 strd r3, r4, [sp, #4]
8013e90: 4906 ldr r1, [pc, #24] ; (8013eac <__assert_func+0x34>)
8013e92: 462b mov r3, r5
8013e94: f000 f8ac bl 8013ff0 <fiprintf>
8013e98: f000 fce1 bl 801485e <abort>
8013e9c: 4b04 ldr r3, [pc, #16] ; (8013eb0 <__assert_func+0x38>)
8013e9e: 461c mov r4, r3
8013ea0: e7f3 b.n 8013e8a <__assert_func+0x12>
8013ea2: bf00 nop
8013ea4: 20000030 .word 0x20000030
8013ea8: 08017c2c .word 0x08017c2c
8013eac: 08017c39 .word 0x08017c39
8013eb0: 08017c67 .word 0x08017c67
08013eb4 <_calloc_r>:
8013eb4: b538 push {r3, r4, r5, lr}
8013eb6: fba1 1502 umull r1, r5, r1, r2
8013eba: b92d cbnz r5, 8013ec8 <_calloc_r+0x14>
8013ebc: f7fe fc56 bl 801276c <_malloc_r>
8013ec0: 4604 mov r4, r0
8013ec2: b938 cbnz r0, 8013ed4 <_calloc_r+0x20>
8013ec4: 4620 mov r0, r4
8013ec6: bd38 pop {r3, r4, r5, pc}
8013ec8: f7fe f96c bl 80121a4 <__errno>
8013ecc: 230c movs r3, #12
8013ece: 6003 str r3, [r0, #0]
8013ed0: 2400 movs r4, #0
8013ed2: e7f7 b.n 8013ec4 <_calloc_r+0x10>
8013ed4: f850 2c04 ldr.w r2, [r0, #-4]
8013ed8: f022 0203 bic.w r2, r2, #3
8013edc: 3a04 subs r2, #4
8013ede: 2a24 cmp r2, #36 ; 0x24
8013ee0: d819 bhi.n 8013f16 <_calloc_r+0x62>
8013ee2: 2a13 cmp r2, #19
8013ee4: d915 bls.n 8013f12 <_calloc_r+0x5e>
8013ee6: 2a1b cmp r2, #27
8013ee8: e9c0 5500 strd r5, r5, [r0]
8013eec: d806 bhi.n 8013efc <_calloc_r+0x48>
8013eee: f100 0308 add.w r3, r0, #8
8013ef2: 2200 movs r2, #0
8013ef4: e9c3 2200 strd r2, r2, [r3]
8013ef8: 609a str r2, [r3, #8]
8013efa: e7e3 b.n 8013ec4 <_calloc_r+0x10>
8013efc: 2a24 cmp r2, #36 ; 0x24
8013efe: e9c0 5502 strd r5, r5, [r0, #8]
8013f02: bf11 iteee ne
8013f04: f100 0310 addne.w r3, r0, #16
8013f08: 6105 streq r5, [r0, #16]
8013f0a: f100 0318 addeq.w r3, r0, #24
8013f0e: 6145 streq r5, [r0, #20]
8013f10: e7ef b.n 8013ef2 <_calloc_r+0x3e>
8013f12: 4603 mov r3, r0
8013f14: e7ed b.n 8013ef2 <_calloc_r+0x3e>
8013f16: 4629 mov r1, r5
8013f18: f7fb ffc6 bl 800fea8 <memset>
8013f1c: e7d2 b.n 8013ec4 <_calloc_r+0x10>
...
08013f20 <_close_r>:
8013f20: b538 push {r3, r4, r5, lr}
8013f22: 4d06 ldr r5, [pc, #24] ; (8013f3c <_close_r+0x1c>)
8013f24: 2300 movs r3, #0
8013f26: 4604 mov r4, r0
8013f28: 4608 mov r0, r1
8013f2a: 602b str r3, [r5, #0]
8013f2c: f000 fce4 bl 80148f8 <_close>
8013f30: 1c43 adds r3, r0, #1
8013f32: d102 bne.n 8013f3a <_close_r+0x1a>
8013f34: 682b ldr r3, [r5, #0]
8013f36: b103 cbz r3, 8013f3a <_close_r+0x1a>
8013f38: 6023 str r3, [r4, #0]
8013f3a: bd38 pop {r3, r4, r5, pc}
8013f3c: 20008d74 .word 0x20008d74
08013f40 <_fclose_r>:
8013f40: b570 push {r4, r5, r6, lr}
8013f42: 4606 mov r6, r0
8013f44: 460c mov r4, r1
8013f46: b911 cbnz r1, 8013f4e <_fclose_r+0xe>
8013f48: 2500 movs r5, #0
8013f4a: 4628 mov r0, r5
8013f4c: bd70 pop {r4, r5, r6, pc}
8013f4e: b118 cbz r0, 8013f58 <_fclose_r+0x18>
8013f50: 6b83 ldr r3, [r0, #56] ; 0x38
8013f52: b90b cbnz r3, 8013f58 <_fclose_r+0x18>
8013f54: f7fe fa26 bl 80123a4 <__sinit>
8013f58: 6e63 ldr r3, [r4, #100] ; 0x64
8013f5a: 07d8 lsls r0, r3, #31
8013f5c: d405 bmi.n 8013f6a <_fclose_r+0x2a>
8013f5e: 89a3 ldrh r3, [r4, #12]
8013f60: 0599 lsls r1, r3, #22
8013f62: d402 bmi.n 8013f6a <_fclose_r+0x2a>
8013f64: 6da0 ldr r0, [r4, #88] ; 0x58
8013f66: f7fe fb93 bl 8012690 <__retarget_lock_acquire_recursive>
8013f6a: f9b4 300c ldrsh.w r3, [r4, #12]
8013f6e: b93b cbnz r3, 8013f80 <_fclose_r+0x40>
8013f70: 6e65 ldr r5, [r4, #100] ; 0x64
8013f72: f015 0501 ands.w r5, r5, #1
8013f76: d1e7 bne.n 8013f48 <_fclose_r+0x8>
8013f78: 6da0 ldr r0, [r4, #88] ; 0x58
8013f7a: f7fe fb8a bl 8012692 <__retarget_lock_release_recursive>
8013f7e: e7e4 b.n 8013f4a <_fclose_r+0xa>
8013f80: 4621 mov r1, r4
8013f82: 4630 mov r0, r6
8013f84: f7fe f914 bl 80121b0 <__sflush_r>
8013f88: 6ae3 ldr r3, [r4, #44] ; 0x2c
8013f8a: 4605 mov r5, r0
8013f8c: b133 cbz r3, 8013f9c <_fclose_r+0x5c>
8013f8e: 69e1 ldr r1, [r4, #28]
8013f90: 4630 mov r0, r6
8013f92: 4798 blx r3
8013f94: 2800 cmp r0, #0
8013f96: bfb8 it lt
8013f98: f04f 35ff movlt.w r5, #4294967295
8013f9c: 89a3 ldrh r3, [r4, #12]
8013f9e: 061a lsls r2, r3, #24
8013fa0: d503 bpl.n 8013faa <_fclose_r+0x6a>
8013fa2: 6921 ldr r1, [r4, #16]
8013fa4: 4630 mov r0, r6
8013fa6: f7fe fa8d bl 80124c4 <_free_r>
8013faa: 6b21 ldr r1, [r4, #48] ; 0x30
8013fac: b141 cbz r1, 8013fc0 <_fclose_r+0x80>
8013fae: f104 0340 add.w r3, r4, #64 ; 0x40
8013fb2: 4299 cmp r1, r3
8013fb4: d002 beq.n 8013fbc <_fclose_r+0x7c>
8013fb6: 4630 mov r0, r6
8013fb8: f7fe fa84 bl 80124c4 <_free_r>
8013fbc: 2300 movs r3, #0
8013fbe: 6323 str r3, [r4, #48] ; 0x30
8013fc0: 6c61 ldr r1, [r4, #68] ; 0x44
8013fc2: b121 cbz r1, 8013fce <_fclose_r+0x8e>
8013fc4: 4630 mov r0, r6
8013fc6: f7fe fa7d bl 80124c4 <_free_r>
8013fca: 2300 movs r3, #0
8013fcc: 6463 str r3, [r4, #68] ; 0x44
8013fce: f7fe f9d1 bl 8012374 <__sfp_lock_acquire>
8013fd2: 2300 movs r3, #0
8013fd4: 81a3 strh r3, [r4, #12]
8013fd6: 6e63 ldr r3, [r4, #100] ; 0x64
8013fd8: 07db lsls r3, r3, #31
8013fda: d402 bmi.n 8013fe2 <_fclose_r+0xa2>
8013fdc: 6da0 ldr r0, [r4, #88] ; 0x58
8013fde: f7fe fb58 bl 8012692 <__retarget_lock_release_recursive>
8013fe2: 6da0 ldr r0, [r4, #88] ; 0x58
8013fe4: f7fe fb53 bl 801268e <__retarget_lock_close_recursive>
8013fe8: f7fe f9ca bl 8012380 <__sfp_lock_release>
8013fec: e7ad b.n 8013f4a <_fclose_r+0xa>
...
08013ff0 <fiprintf>:
8013ff0: b40e push {r1, r2, r3}
8013ff2: b503 push {r0, r1, lr}
8013ff4: 4601 mov r1, r0
8013ff6: ab03 add r3, sp, #12
8013ff8: 4805 ldr r0, [pc, #20] ; (8014010 <fiprintf+0x20>)
8013ffa: f853 2b04 ldr.w r2, [r3], #4
8013ffe: 6800 ldr r0, [r0, #0]
8014000: 9301 str r3, [sp, #4]
8014002: f7ff fa0f bl 8013424 <_vfiprintf_r>
8014006: b002 add sp, #8
8014008: f85d eb04 ldr.w lr, [sp], #4
801400c: b003 add sp, #12
801400e: 4770 bx lr
8014010: 20000030 .word 0x20000030
08014014 <__fputwc>:
8014014: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr}
8014018: 4680 mov r8, r0
801401a: 460e mov r6, r1
801401c: 4615 mov r5, r2
801401e: f000 f9d1 bl 80143c4 <__locale_mb_cur_max>
8014022: 2801 cmp r0, #1
8014024: d11c bne.n 8014060 <__fputwc+0x4c>
8014026: 1e73 subs r3, r6, #1
8014028: 2bfe cmp r3, #254 ; 0xfe
801402a: d819 bhi.n 8014060 <__fputwc+0x4c>
801402c: f88d 6004 strb.w r6, [sp, #4]
8014030: 4604 mov r4, r0
8014032: 2700 movs r7, #0
8014034: f10d 0904 add.w r9, sp, #4
8014038: 42a7 cmp r7, r4
801403a: d020 beq.n 801407e <__fputwc+0x6a>
801403c: 68ab ldr r3, [r5, #8]
801403e: f817 1009 ldrb.w r1, [r7, r9]
8014042: 3b01 subs r3, #1
8014044: 2b00 cmp r3, #0
8014046: 60ab str r3, [r5, #8]
8014048: da04 bge.n 8014054 <__fputwc+0x40>
801404a: 69aa ldr r2, [r5, #24]
801404c: 4293 cmp r3, r2
801404e: db1a blt.n 8014086 <__fputwc+0x72>
8014050: 290a cmp r1, #10
8014052: d018 beq.n 8014086 <__fputwc+0x72>
8014054: 682b ldr r3, [r5, #0]
8014056: 1c5a adds r2, r3, #1
8014058: 602a str r2, [r5, #0]
801405a: 7019 strb r1, [r3, #0]
801405c: 3701 adds r7, #1
801405e: e7eb b.n 8014038 <__fputwc+0x24>
8014060: a901 add r1, sp, #4
8014062: f105 035c add.w r3, r5, #92 ; 0x5c
8014066: 4632 mov r2, r6
8014068: 4640 mov r0, r8
801406a: f000 fbd5 bl 8014818 <_wcrtomb_r>
801406e: 1c41 adds r1, r0, #1
8014070: 4604 mov r4, r0
8014072: d1de bne.n 8014032 <__fputwc+0x1e>
8014074: 89ab ldrh r3, [r5, #12]
8014076: f043 0340 orr.w r3, r3, #64 ; 0x40
801407a: 81ab strh r3, [r5, #12]
801407c: 4606 mov r6, r0
801407e: 4630 mov r0, r6
8014080: b003 add sp, #12
8014082: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
8014086: 462a mov r2, r5
8014088: 4640 mov r0, r8
801408a: f000 fb7b bl 8014784 <__swbuf_r>
801408e: 1c42 adds r2, r0, #1
8014090: d1e4 bne.n 801405c <__fputwc+0x48>
8014092: 4606 mov r6, r0
8014094: e7f3 b.n 801407e <__fputwc+0x6a>
08014096 <_fputwc_r>:
8014096: 6e53 ldr r3, [r2, #100] ; 0x64
8014098: b537 push {r0, r1, r2, r4, r5, lr}
801409a: 4614 mov r4, r2
801409c: 07da lsls r2, r3, #31
801409e: 4605 mov r5, r0
80140a0: d407 bmi.n 80140b2 <_fputwc_r+0x1c>
80140a2: 89a3 ldrh r3, [r4, #12]
80140a4: 059b lsls r3, r3, #22
80140a6: d404 bmi.n 80140b2 <_fputwc_r+0x1c>
80140a8: 6da0 ldr r0, [r4, #88] ; 0x58
80140aa: 9101 str r1, [sp, #4]
80140ac: f7fe faf0 bl 8012690 <__retarget_lock_acquire_recursive>
80140b0: 9901 ldr r1, [sp, #4]
80140b2: f9b4 300c ldrsh.w r3, [r4, #12]
80140b6: 0498 lsls r0, r3, #18
80140b8: d406 bmi.n 80140c8 <_fputwc_r+0x32>
80140ba: f443 5300 orr.w r3, r3, #8192 ; 0x2000
80140be: 81a3 strh r3, [r4, #12]
80140c0: 6e63 ldr r3, [r4, #100] ; 0x64
80140c2: f443 5300 orr.w r3, r3, #8192 ; 0x2000
80140c6: 6663 str r3, [r4, #100] ; 0x64
80140c8: 4622 mov r2, r4
80140ca: 4628 mov r0, r5
80140cc: f7ff ffa2 bl 8014014 <__fputwc>
80140d0: 6e63 ldr r3, [r4, #100] ; 0x64
80140d2: 07da lsls r2, r3, #31
80140d4: 4605 mov r5, r0
80140d6: d405 bmi.n 80140e4 <_fputwc_r+0x4e>
80140d8: 89a3 ldrh r3, [r4, #12]
80140da: 059b lsls r3, r3, #22
80140dc: d402 bmi.n 80140e4 <_fputwc_r+0x4e>
80140de: 6da0 ldr r0, [r4, #88] ; 0x58
80140e0: f7fe fad7 bl 8012692 <__retarget_lock_release_recursive>
80140e4: 4628 mov r0, r5
80140e6: b003 add sp, #12
80140e8: bd30 pop {r4, r5, pc}
...
080140ec <_fstat_r>:
80140ec: b538 push {r3, r4, r5, lr}
80140ee: 4d07 ldr r5, [pc, #28] ; (801410c <_fstat_r+0x20>)
80140f0: 2300 movs r3, #0
80140f2: 4604 mov r4, r0
80140f4: 4608 mov r0, r1
80140f6: 4611 mov r1, r2
80140f8: 602b str r3, [r5, #0]
80140fa: f000 fc05 bl 8014908 <_fstat>
80140fe: 1c43 adds r3, r0, #1
8014100: d102 bne.n 8014108 <_fstat_r+0x1c>
8014102: 682b ldr r3, [r5, #0]
8014104: b103 cbz r3, 8014108 <_fstat_r+0x1c>
8014106: 6023 str r3, [r4, #0]
8014108: bd38 pop {r3, r4, r5, pc}
801410a: bf00 nop
801410c: 20008d74 .word 0x20008d74
08014110 <__sfvwrite_r>:
8014110: 6893 ldr r3, [r2, #8]
8014112: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
8014116: 4606 mov r6, r0
8014118: 460c mov r4, r1
801411a: 4690 mov r8, r2
801411c: b91b cbnz r3, 8014126 <__sfvwrite_r+0x16>
801411e: 2000 movs r0, #0
8014120: b003 add sp, #12
8014122: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
8014126: 898b ldrh r3, [r1, #12]
8014128: 0718 lsls r0, r3, #28
801412a: d550 bpl.n 80141ce <__sfvwrite_r+0xbe>
801412c: 690b ldr r3, [r1, #16]
801412e: 2b00 cmp r3, #0
8014130: d04d beq.n 80141ce <__sfvwrite_r+0xbe>
8014132: 89a3 ldrh r3, [r4, #12]
8014134: f8d8 7000 ldr.w r7, [r8]
8014138: f013 0902 ands.w r9, r3, #2
801413c: d16c bne.n 8014218 <__sfvwrite_r+0x108>
801413e: f013 0301 ands.w r3, r3, #1
8014142: f000 809c beq.w 801427e <__sfvwrite_r+0x16e>
8014146: 4648 mov r0, r9
8014148: 46ca mov sl, r9
801414a: 46cb mov fp, r9
801414c: f1bb 0f00 cmp.w fp, #0
8014150: f000 8103 beq.w 801435a <__sfvwrite_r+0x24a>
8014154: b950 cbnz r0, 801416c <__sfvwrite_r+0x5c>
8014156: 465a mov r2, fp
8014158: 210a movs r1, #10
801415a: 4650 mov r0, sl
801415c: f7ec f850 bl 8000200 <memchr>
8014160: 2800 cmp r0, #0
8014162: f000 80ff beq.w 8014364 <__sfvwrite_r+0x254>
8014166: 3001 adds r0, #1
8014168: eba0 090a sub.w r9, r0, sl
801416c: 6820 ldr r0, [r4, #0]
801416e: 6921 ldr r1, [r4, #16]
8014170: 6963 ldr r3, [r4, #20]
8014172: 45d9 cmp r9, fp
8014174: 464a mov r2, r9
8014176: bf28 it cs
8014178: 465a movcs r2, fp
801417a: 4288 cmp r0, r1
801417c: f240 80f5 bls.w 801436a <__sfvwrite_r+0x25a>
8014180: 68a5 ldr r5, [r4, #8]
8014182: 441d add r5, r3
8014184: 42aa cmp r2, r5
8014186: f340 80f0 ble.w 801436a <__sfvwrite_r+0x25a>
801418a: 4651 mov r1, sl
801418c: 462a mov r2, r5
801418e: f7fb fe71 bl 800fe74 <memmove>
8014192: 6823 ldr r3, [r4, #0]
8014194: 442b add r3, r5
8014196: 6023 str r3, [r4, #0]
8014198: 4621 mov r1, r4
801419a: 4630 mov r0, r6
801419c: f7fe f896 bl 80122cc <_fflush_r>
80141a0: 2800 cmp r0, #0
80141a2: d167 bne.n 8014274 <__sfvwrite_r+0x164>
80141a4: ebb9 0905 subs.w r9, r9, r5
80141a8: f040 80f7 bne.w 801439a <__sfvwrite_r+0x28a>
80141ac: 4621 mov r1, r4
80141ae: 4630 mov r0, r6
80141b0: f7fe f88c bl 80122cc <_fflush_r>
80141b4: 2800 cmp r0, #0
80141b6: d15d bne.n 8014274 <__sfvwrite_r+0x164>
80141b8: f8d8 2008 ldr.w r2, [r8, #8]
80141bc: 44aa add sl, r5
80141be: ebab 0b05 sub.w fp, fp, r5
80141c2: 1b55 subs r5, r2, r5
80141c4: f8c8 5008 str.w r5, [r8, #8]
80141c8: 2d00 cmp r5, #0
80141ca: d1bf bne.n 801414c <__sfvwrite_r+0x3c>
80141cc: e7a7 b.n 801411e <__sfvwrite_r+0xe>
80141ce: 4621 mov r1, r4
80141d0: 4630 mov r0, r6
80141d2: f7fd f91b bl 801140c <__swsetup_r>
80141d6: 2800 cmp r0, #0
80141d8: d0ab beq.n 8014132 <__sfvwrite_r+0x22>
80141da: f04f 30ff mov.w r0, #4294967295
80141de: e79f b.n 8014120 <__sfvwrite_r+0x10>
80141e0: e9d7 b900 ldrd fp, r9, [r7]
80141e4: 3708 adds r7, #8
80141e6: f1b9 0f00 cmp.w r9, #0
80141ea: d0f9 beq.n 80141e0 <__sfvwrite_r+0xd0>
80141ec: 45d1 cmp r9, sl
80141ee: 464b mov r3, r9
80141f0: 69e1 ldr r1, [r4, #28]
80141f2: 6a65 ldr r5, [r4, #36] ; 0x24
80141f4: bf28 it cs
80141f6: 4653 movcs r3, sl
80141f8: 465a mov r2, fp
80141fa: 4630 mov r0, r6
80141fc: 47a8 blx r5
80141fe: 2800 cmp r0, #0
8014200: dd38 ble.n 8014274 <__sfvwrite_r+0x164>
8014202: f8d8 3008 ldr.w r3, [r8, #8]
8014206: 4483 add fp, r0
8014208: eba9 0900 sub.w r9, r9, r0
801420c: 1a18 subs r0, r3, r0
801420e: f8c8 0008 str.w r0, [r8, #8]
8014212: 2800 cmp r0, #0
8014214: d1e7 bne.n 80141e6 <__sfvwrite_r+0xd6>
8014216: e782 b.n 801411e <__sfvwrite_r+0xe>
8014218: f04f 0b00 mov.w fp, #0
801421c: f8df a180 ldr.w sl, [pc, #384] ; 80143a0 <__sfvwrite_r+0x290>
8014220: 46d9 mov r9, fp
8014222: e7e0 b.n 80141e6 <__sfvwrite_r+0xd6>
8014224: e9d7 9a00 ldrd r9, sl, [r7]
8014228: 3708 adds r7, #8
801422a: f1ba 0f00 cmp.w sl, #0
801422e: d0f9 beq.n 8014224 <__sfvwrite_r+0x114>
8014230: 89a3 ldrh r3, [r4, #12]
8014232: 6820 ldr r0, [r4, #0]
8014234: 68a2 ldr r2, [r4, #8]
8014236: 0599 lsls r1, r3, #22
8014238: d563 bpl.n 8014302 <__sfvwrite_r+0x1f2>
801423a: 4552 cmp r2, sl
801423c: d836 bhi.n 80142ac <__sfvwrite_r+0x19c>
801423e: f413 6f90 tst.w r3, #1152 ; 0x480
8014242: d033 beq.n 80142ac <__sfvwrite_r+0x19c>
8014244: 6921 ldr r1, [r4, #16]
8014246: 6965 ldr r5, [r4, #20]
8014248: eba0 0b01 sub.w fp, r0, r1
801424c: eb05 0545 add.w r5, r5, r5, lsl #1
8014250: eb05 75d5 add.w r5, r5, r5, lsr #31
8014254: f10b 0201 add.w r2, fp, #1
8014258: 106d asrs r5, r5, #1
801425a: 4452 add r2, sl
801425c: 4295 cmp r5, r2
801425e: bf38 it cc
8014260: 4615 movcc r5, r2
8014262: 055b lsls r3, r3, #21
8014264: d53d bpl.n 80142e2 <__sfvwrite_r+0x1d2>
8014266: 4629 mov r1, r5
8014268: 4630 mov r0, r6
801426a: f7fe fa7f bl 801276c <_malloc_r>
801426e: b948 cbnz r0, 8014284 <__sfvwrite_r+0x174>
8014270: 230c movs r3, #12
8014272: 6033 str r3, [r6, #0]
8014274: 89a3 ldrh r3, [r4, #12]
8014276: f043 0340 orr.w r3, r3, #64 ; 0x40
801427a: 81a3 strh r3, [r4, #12]
801427c: e7ad b.n 80141da <__sfvwrite_r+0xca>
801427e: 4699 mov r9, r3
8014280: 469a mov sl, r3
8014282: e7d2 b.n 801422a <__sfvwrite_r+0x11a>
8014284: 465a mov r2, fp
8014286: 6921 ldr r1, [r4, #16]
8014288: 9001 str r0, [sp, #4]
801428a: f7fb fde5 bl 800fe58 <memcpy>
801428e: 89a2 ldrh r2, [r4, #12]
8014290: 9b01 ldr r3, [sp, #4]
8014292: f422 6290 bic.w r2, r2, #1152 ; 0x480
8014296: f042 0280 orr.w r2, r2, #128 ; 0x80
801429a: 81a2 strh r2, [r4, #12]
801429c: 6123 str r3, [r4, #16]
801429e: 6165 str r5, [r4, #20]
80142a0: 445b add r3, fp
80142a2: eba5 050b sub.w r5, r5, fp
80142a6: 6023 str r3, [r4, #0]
80142a8: 4652 mov r2, sl
80142aa: 60a5 str r5, [r4, #8]
80142ac: 4552 cmp r2, sl
80142ae: bf28 it cs
80142b0: 4652 movcs r2, sl
80142b2: 6820 ldr r0, [r4, #0]
80142b4: 9201 str r2, [sp, #4]
80142b6: 4649 mov r1, r9
80142b8: f7fb fddc bl 800fe74 <memmove>
80142bc: 68a3 ldr r3, [r4, #8]
80142be: 9a01 ldr r2, [sp, #4]
80142c0: 1a9b subs r3, r3, r2
80142c2: 60a3 str r3, [r4, #8]
80142c4: 6823 ldr r3, [r4, #0]
80142c6: 441a add r2, r3
80142c8: 4655 mov r5, sl
80142ca: 6022 str r2, [r4, #0]
80142cc: f8d8 0008 ldr.w r0, [r8, #8]
80142d0: 44a9 add r9, r5
80142d2: ebaa 0a05 sub.w sl, sl, r5
80142d6: 1b45 subs r5, r0, r5
80142d8: f8c8 5008 str.w r5, [r8, #8]
80142dc: 2d00 cmp r5, #0
80142de: d1a4 bne.n 801422a <__sfvwrite_r+0x11a>
80142e0: e71d b.n 801411e <__sfvwrite_r+0xe>
80142e2: 462a mov r2, r5
80142e4: 4630 mov r0, r6
80142e6: f000 f8a9 bl 801443c <_realloc_r>
80142ea: 4603 mov r3, r0
80142ec: 2800 cmp r0, #0
80142ee: d1d5 bne.n 801429c <__sfvwrite_r+0x18c>
80142f0: 6921 ldr r1, [r4, #16]
80142f2: 4630 mov r0, r6
80142f4: f7fe f8e6 bl 80124c4 <_free_r>
80142f8: 89a3 ldrh r3, [r4, #12]
80142fa: f023 0380 bic.w r3, r3, #128 ; 0x80
80142fe: 81a3 strh r3, [r4, #12]
8014300: e7b6 b.n 8014270 <__sfvwrite_r+0x160>
8014302: 6923 ldr r3, [r4, #16]
8014304: 4283 cmp r3, r0
8014306: d302 bcc.n 801430e <__sfvwrite_r+0x1fe>
8014308: 6961 ldr r1, [r4, #20]
801430a: 4551 cmp r1, sl
801430c: d915 bls.n 801433a <__sfvwrite_r+0x22a>
801430e: 4552 cmp r2, sl
8014310: bf28 it cs
8014312: 4652 movcs r2, sl
8014314: 4649 mov r1, r9
8014316: 4615 mov r5, r2
8014318: f7fb fdac bl 800fe74 <memmove>
801431c: 68a3 ldr r3, [r4, #8]
801431e: 6822 ldr r2, [r4, #0]
8014320: 1b5b subs r3, r3, r5
8014322: 442a add r2, r5
8014324: 60a3 str r3, [r4, #8]
8014326: 6022 str r2, [r4, #0]
8014328: 2b00 cmp r3, #0
801432a: d1cf bne.n 80142cc <__sfvwrite_r+0x1bc>
801432c: 4621 mov r1, r4
801432e: 4630 mov r0, r6
8014330: f7fd ffcc bl 80122cc <_fflush_r>
8014334: 2800 cmp r0, #0
8014336: d0c9 beq.n 80142cc <__sfvwrite_r+0x1bc>
8014338: e79c b.n 8014274 <__sfvwrite_r+0x164>
801433a: f06f 4300 mvn.w r3, #2147483648 ; 0x80000000
801433e: 459a cmp sl, r3
8014340: bf38 it cc
8014342: 4653 movcc r3, sl
8014344: 6a65 ldr r5, [r4, #36] ; 0x24
8014346: fb93 f3f1 sdiv r3, r3, r1
801434a: 464a mov r2, r9
801434c: 434b muls r3, r1
801434e: 4630 mov r0, r6
8014350: 69e1 ldr r1, [r4, #28]
8014352: 47a8 blx r5
8014354: 1e05 subs r5, r0, #0
8014356: dcb9 bgt.n 80142cc <__sfvwrite_r+0x1bc>
8014358: e78c b.n 8014274 <__sfvwrite_r+0x164>
801435a: e9d7 ab00 ldrd sl, fp, [r7]
801435e: 2000 movs r0, #0
8014360: 3708 adds r7, #8
8014362: e6f3 b.n 801414c <__sfvwrite_r+0x3c>
8014364: f10b 0901 add.w r9, fp, #1
8014368: e700 b.n 801416c <__sfvwrite_r+0x5c>
801436a: 4293 cmp r3, r2
801436c: dc08 bgt.n 8014380 <__sfvwrite_r+0x270>
801436e: 6a65 ldr r5, [r4, #36] ; 0x24
8014370: 69e1 ldr r1, [r4, #28]
8014372: 4652 mov r2, sl
8014374: 4630 mov r0, r6
8014376: 47a8 blx r5
8014378: 1e05 subs r5, r0, #0
801437a: f73f af13 bgt.w 80141a4 <__sfvwrite_r+0x94>
801437e: e779 b.n 8014274 <__sfvwrite_r+0x164>
8014380: 4651 mov r1, sl
8014382: 9201 str r2, [sp, #4]
8014384: f7fb fd76 bl 800fe74 <memmove>
8014388: 9a01 ldr r2, [sp, #4]
801438a: 68a3 ldr r3, [r4, #8]
801438c: 1a9b subs r3, r3, r2
801438e: 60a3 str r3, [r4, #8]
8014390: 6823 ldr r3, [r4, #0]
8014392: 4413 add r3, r2
8014394: 6023 str r3, [r4, #0]
8014396: 4615 mov r5, r2
8014398: e704 b.n 80141a4 <__sfvwrite_r+0x94>
801439a: 2001 movs r0, #1
801439c: e70c b.n 80141b8 <__sfvwrite_r+0xa8>
801439e: bf00 nop
80143a0: 7ffffc00 .word 0x7ffffc00
080143a4 <_isatty_r>:
80143a4: b538 push {r3, r4, r5, lr}
80143a6: 4d06 ldr r5, [pc, #24] ; (80143c0 <_isatty_r+0x1c>)
80143a8: 2300 movs r3, #0
80143aa: 4604 mov r4, r0
80143ac: 4608 mov r0, r1
80143ae: 602b str r3, [r5, #0]
80143b0: f000 faba bl 8014928 <_isatty>
80143b4: 1c43 adds r3, r0, #1
80143b6: d102 bne.n 80143be <_isatty_r+0x1a>
80143b8: 682b ldr r3, [r5, #0]
80143ba: b103 cbz r3, 80143be <_isatty_r+0x1a>
80143bc: 6023 str r3, [r4, #0]
80143be: bd38 pop {r3, r4, r5, pc}
80143c0: 20008d74 .word 0x20008d74
080143c4 <__locale_mb_cur_max>:
80143c4: 4b01 ldr r3, [pc, #4] ; (80143cc <__locale_mb_cur_max+0x8>)
80143c6: f893 0128 ldrb.w r0, [r3, #296] ; 0x128
80143ca: 4770 bx lr
80143cc: 20000874 .word 0x20000874
080143d0 <_lseek_r>:
80143d0: b538 push {r3, r4, r5, lr}
80143d2: 4d07 ldr r5, [pc, #28] ; (80143f0 <_lseek_r+0x20>)
80143d4: 4604 mov r4, r0
80143d6: 4608 mov r0, r1
80143d8: 4611 mov r1, r2
80143da: 2200 movs r2, #0
80143dc: 602a str r2, [r5, #0]
80143de: 461a mov r2, r3
80143e0: f000 fab2 bl 8014948 <_lseek>
80143e4: 1c43 adds r3, r0, #1
80143e6: d102 bne.n 80143ee <_lseek_r+0x1e>
80143e8: 682b ldr r3, [r5, #0]
80143ea: b103 cbz r3, 80143ee <_lseek_r+0x1e>
80143ec: 6023 str r3, [r4, #0]
80143ee: bd38 pop {r3, r4, r5, pc}
80143f0: 20008d74 .word 0x20008d74
080143f4 <__ascii_mbtowc>:
80143f4: b082 sub sp, #8
80143f6: b901 cbnz r1, 80143fa <__ascii_mbtowc+0x6>
80143f8: a901 add r1, sp, #4
80143fa: b142 cbz r2, 801440e <__ascii_mbtowc+0x1a>
80143fc: b14b cbz r3, 8014412 <__ascii_mbtowc+0x1e>
80143fe: 7813 ldrb r3, [r2, #0]
8014400: 600b str r3, [r1, #0]
8014402: 7812 ldrb r2, [r2, #0]
8014404: 1e10 subs r0, r2, #0
8014406: bf18 it ne
8014408: 2001 movne r0, #1
801440a: b002 add sp, #8
801440c: 4770 bx lr
801440e: 4610 mov r0, r2
8014410: e7fb b.n 801440a <__ascii_mbtowc+0x16>
8014412: f06f 0001 mvn.w r0, #1
8014416: e7f8 b.n 801440a <__ascii_mbtowc+0x16>
08014418 <_read_r>:
8014418: b538 push {r3, r4, r5, lr}
801441a: 4d07 ldr r5, [pc, #28] ; (8014438 <_read_r+0x20>)
801441c: 4604 mov r4, r0
801441e: 4608 mov r0, r1
8014420: 4611 mov r1, r2
8014422: 2200 movs r2, #0
8014424: 602a str r2, [r5, #0]
8014426: 461a mov r2, r3
8014428: f000 fa96 bl 8014958 <_read>
801442c: 1c43 adds r3, r0, #1
801442e: d102 bne.n 8014436 <_read_r+0x1e>
8014430: 682b ldr r3, [r5, #0]
8014432: b103 cbz r3, 8014436 <_read_r+0x1e>
8014434: 6023 str r3, [r4, #0]
8014436: bd38 pop {r3, r4, r5, pc}
8014438: 20008d74 .word 0x20008d74
0801443c <_realloc_r>:
801443c: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
8014440: 4681 mov r9, r0
8014442: 460c mov r4, r1
8014444: b929 cbnz r1, 8014452 <_realloc_r+0x16>
8014446: 4611 mov r1, r2
8014448: b003 add sp, #12
801444a: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
801444e: f7fe b98d b.w 801276c <_malloc_r>
8014452: 9201 str r2, [sp, #4]
8014454: f7fe fbc6 bl 8012be4 <__malloc_lock>
8014458: 9a01 ldr r2, [sp, #4]
801445a: f102 080b add.w r8, r2, #11
801445e: f1b8 0f16 cmp.w r8, #22
8014462: d90b bls.n 801447c <_realloc_r+0x40>
8014464: f038 0807 bics.w r8, r8, #7
8014468: d50a bpl.n 8014480 <_realloc_r+0x44>
801446a: 230c movs r3, #12
801446c: f8c9 3000 str.w r3, [r9]
8014470: f04f 0b00 mov.w fp, #0
8014474: 4658 mov r0, fp
8014476: b003 add sp, #12
8014478: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
801447c: f04f 0810 mov.w r8, #16
8014480: 4590 cmp r8, r2
8014482: d3f2 bcc.n 801446a <_realloc_r+0x2e>
8014484: f854 5c04 ldr.w r5, [r4, #-4]
8014488: f025 0603 bic.w r6, r5, #3
801448c: 45b0 cmp r8, r6
801448e: f1a4 0a08 sub.w sl, r4, #8
8014492: f340 816e ble.w 8014772 <_realloc_r+0x336>
8014496: 499b ldr r1, [pc, #620] ; (8014704 <_realloc_r+0x2c8>)
8014498: f8d1 c008 ldr.w ip, [r1, #8]
801449c: eb0a 0306 add.w r3, sl, r6
80144a0: 459c cmp ip, r3
80144a2: 6859 ldr r1, [r3, #4]
80144a4: d005 beq.n 80144b2 <_realloc_r+0x76>
80144a6: f021 0001 bic.w r0, r1, #1
80144aa: 4418 add r0, r3
80144ac: 6840 ldr r0, [r0, #4]
80144ae: 07c7 lsls r7, r0, #31
80144b0: d427 bmi.n 8014502 <_realloc_r+0xc6>
80144b2: f021 0103 bic.w r1, r1, #3
80144b6: 459c cmp ip, r3
80144b8: eb06 0701 add.w r7, r6, r1
80144bc: d119 bne.n 80144f2 <_realloc_r+0xb6>
80144be: f108 0010 add.w r0, r8, #16
80144c2: 42b8 cmp r0, r7
80144c4: dc1f bgt.n 8014506 <_realloc_r+0xca>
80144c6: eb0a 0308 add.w r3, sl, r8
80144ca: 4a8e ldr r2, [pc, #568] ; (8014704 <_realloc_r+0x2c8>)
80144cc: eba7 0708 sub.w r7, r7, r8
80144d0: f047 0701 orr.w r7, r7, #1
80144d4: 6093 str r3, [r2, #8]
80144d6: 605f str r7, [r3, #4]
80144d8: f854 3c04 ldr.w r3, [r4, #-4]
80144dc: f003 0301 and.w r3, r3, #1
80144e0: ea43 0308 orr.w r3, r3, r8
80144e4: f844 3c04 str.w r3, [r4, #-4]
80144e8: 4648 mov r0, r9
80144ea: f7fe fb81 bl 8012bf0 <__malloc_unlock>
80144ee: 46a3 mov fp, r4
80144f0: e7c0 b.n 8014474 <_realloc_r+0x38>
80144f2: 45b8 cmp r8, r7
80144f4: dc07 bgt.n 8014506 <_realloc_r+0xca>
80144f6: e9d3 3202 ldrd r3, r2, [r3, #8]
80144fa: 60da str r2, [r3, #12]
80144fc: 6093 str r3, [r2, #8]
80144fe: 4655 mov r5, sl
8014500: e07f b.n 8014602 <_realloc_r+0x1c6>
8014502: 2100 movs r1, #0
8014504: 460b mov r3, r1
8014506: 07e8 lsls r0, r5, #31
8014508: f100 80e5 bmi.w 80146d6 <_realloc_r+0x29a>
801450c: f854 5c08 ldr.w r5, [r4, #-8]
8014510: ebaa 0505 sub.w r5, sl, r5
8014514: 6868 ldr r0, [r5, #4]
8014516: f020 0003 bic.w r0, r0, #3
801451a: eb00 0b06 add.w fp, r0, r6
801451e: 2b00 cmp r3, #0
8014520: f000 80a5 beq.w 801466e <_realloc_r+0x232>
8014524: 459c cmp ip, r3
8014526: eb01 070b add.w r7, r1, fp
801452a: d14a bne.n 80145c2 <_realloc_r+0x186>
801452c: f108 0310 add.w r3, r8, #16
8014530: 42bb cmp r3, r7
8014532: f300 809c bgt.w 801466e <_realloc_r+0x232>
8014536: 46ab mov fp, r5
8014538: 68eb ldr r3, [r5, #12]
801453a: f85b 2f08 ldr.w r2, [fp, #8]!
801453e: 60d3 str r3, [r2, #12]
8014540: 609a str r2, [r3, #8]
8014542: 1f32 subs r2, r6, #4
8014544: 2a24 cmp r2, #36 ; 0x24
8014546: d837 bhi.n 80145b8 <_realloc_r+0x17c>
8014548: 2a13 cmp r2, #19
801454a: d933 bls.n 80145b4 <_realloc_r+0x178>
801454c: 6823 ldr r3, [r4, #0]
801454e: 60ab str r3, [r5, #8]
8014550: 6863 ldr r3, [r4, #4]
8014552: 60eb str r3, [r5, #12]
8014554: 2a1b cmp r2, #27
8014556: d81b bhi.n 8014590 <_realloc_r+0x154>
8014558: 3408 adds r4, #8
801455a: f105 0310 add.w r3, r5, #16
801455e: 6822 ldr r2, [r4, #0]
8014560: 601a str r2, [r3, #0]
8014562: 6862 ldr r2, [r4, #4]
8014564: 605a str r2, [r3, #4]
8014566: 68a2 ldr r2, [r4, #8]
8014568: 609a str r2, [r3, #8]
801456a: eb05 0308 add.w r3, r5, r8
801456e: 4a65 ldr r2, [pc, #404] ; (8014704 <_realloc_r+0x2c8>)
8014570: eba7 0708 sub.w r7, r7, r8
8014574: f047 0701 orr.w r7, r7, #1
8014578: 6093 str r3, [r2, #8]
801457a: 605f str r7, [r3, #4]
801457c: 686b ldr r3, [r5, #4]
801457e: f003 0301 and.w r3, r3, #1
8014582: ea43 0308 orr.w r3, r3, r8
8014586: 606b str r3, [r5, #4]
8014588: 4648 mov r0, r9
801458a: f7fe fb31 bl 8012bf0 <__malloc_unlock>
801458e: e771 b.n 8014474 <_realloc_r+0x38>
8014590: 68a3 ldr r3, [r4, #8]
8014592: 612b str r3, [r5, #16]
8014594: 68e3 ldr r3, [r4, #12]
8014596: 616b str r3, [r5, #20]
8014598: 2a24 cmp r2, #36 ; 0x24
801459a: bf01 itttt eq
801459c: 6923 ldreq r3, [r4, #16]
801459e: 61ab streq r3, [r5, #24]
80145a0: 6962 ldreq r2, [r4, #20]
80145a2: 61ea streq r2, [r5, #28]
80145a4: bf19 ittee ne
80145a6: 3410 addne r4, #16
80145a8: f105 0318 addne.w r3, r5, #24
80145ac: f105 0320 addeq.w r3, r5, #32
80145b0: 3418 addeq r4, #24
80145b2: e7d4 b.n 801455e <_realloc_r+0x122>
80145b4: 465b mov r3, fp
80145b6: e7d2 b.n 801455e <_realloc_r+0x122>
80145b8: 4621 mov r1, r4
80145ba: 4658 mov r0, fp
80145bc: f7fb fc5a bl 800fe74 <memmove>
80145c0: e7d3 b.n 801456a <_realloc_r+0x12e>
80145c2: 45b8 cmp r8, r7
80145c4: dc53 bgt.n 801466e <_realloc_r+0x232>
80145c6: e9d3 3202 ldrd r3, r2, [r3, #8]
80145ca: 4628 mov r0, r5
80145cc: 60da str r2, [r3, #12]
80145ce: 6093 str r3, [r2, #8]
80145d0: f850 2f08 ldr.w r2, [r0, #8]!
80145d4: 68eb ldr r3, [r5, #12]
80145d6: 60d3 str r3, [r2, #12]
80145d8: 609a str r2, [r3, #8]
80145da: 1f32 subs r2, r6, #4
80145dc: 2a24 cmp r2, #36 ; 0x24
80145de: d842 bhi.n 8014666 <_realloc_r+0x22a>
80145e0: 2a13 cmp r2, #19
80145e2: d908 bls.n 80145f6 <_realloc_r+0x1ba>
80145e4: 6823 ldr r3, [r4, #0]
80145e6: 60ab str r3, [r5, #8]
80145e8: 6863 ldr r3, [r4, #4]
80145ea: 60eb str r3, [r5, #12]
80145ec: 2a1b cmp r2, #27
80145ee: d828 bhi.n 8014642 <_realloc_r+0x206>
80145f0: 3408 adds r4, #8
80145f2: f105 0010 add.w r0, r5, #16
80145f6: 6823 ldr r3, [r4, #0]
80145f8: 6003 str r3, [r0, #0]
80145fa: 6863 ldr r3, [r4, #4]
80145fc: 6043 str r3, [r0, #4]
80145fe: 68a3 ldr r3, [r4, #8]
8014600: 6083 str r3, [r0, #8]
8014602: 686b ldr r3, [r5, #4]
8014604: eba7 0008 sub.w r0, r7, r8
8014608: 280f cmp r0, #15
801460a: f003 0301 and.w r3, r3, #1
801460e: eb05 0207 add.w r2, r5, r7
8014612: f240 80b0 bls.w 8014776 <_realloc_r+0x33a>
8014616: eb05 0108 add.w r1, r5, r8
801461a: ea48 0303 orr.w r3, r8, r3
801461e: f040 0001 orr.w r0, r0, #1
8014622: 606b str r3, [r5, #4]
8014624: 6048 str r0, [r1, #4]
8014626: 6853 ldr r3, [r2, #4]
8014628: f043 0301 orr.w r3, r3, #1
801462c: 6053 str r3, [r2, #4]
801462e: 3108 adds r1, #8
8014630: 4648 mov r0, r9
8014632: f7fd ff47 bl 80124c4 <_free_r>
8014636: 4648 mov r0, r9
8014638: f7fe fada bl 8012bf0 <__malloc_unlock>
801463c: f105 0b08 add.w fp, r5, #8
8014640: e718 b.n 8014474 <_realloc_r+0x38>
8014642: 68a3 ldr r3, [r4, #8]
8014644: 612b str r3, [r5, #16]
8014646: 68e3 ldr r3, [r4, #12]
8014648: 616b str r3, [r5, #20]
801464a: 2a24 cmp r2, #36 ; 0x24
801464c: bf01 itttt eq
801464e: 6923 ldreq r3, [r4, #16]
8014650: 61ab streq r3, [r5, #24]
8014652: 6963 ldreq r3, [r4, #20]
8014654: 61eb streq r3, [r5, #28]
8014656: bf19 ittee ne
8014658: 3410 addne r4, #16
801465a: f105 0018 addne.w r0, r5, #24
801465e: f105 0020 addeq.w r0, r5, #32
8014662: 3418 addeq r4, #24
8014664: e7c7 b.n 80145f6 <_realloc_r+0x1ba>
8014666: 4621 mov r1, r4
8014668: f7fb fc04 bl 800fe74 <memmove>
801466c: e7c9 b.n 8014602 <_realloc_r+0x1c6>
801466e: 45d8 cmp r8, fp
8014670: dc31 bgt.n 80146d6 <_realloc_r+0x29a>
8014672: 4628 mov r0, r5
8014674: 68eb ldr r3, [r5, #12]
8014676: f850 2f08 ldr.w r2, [r0, #8]!
801467a: 60d3 str r3, [r2, #12]
801467c: 609a str r2, [r3, #8]
801467e: 1f32 subs r2, r6, #4
8014680: 2a24 cmp r2, #36 ; 0x24
8014682: d824 bhi.n 80146ce <_realloc_r+0x292>
8014684: 2a13 cmp r2, #19
8014686: d908 bls.n 801469a <_realloc_r+0x25e>
8014688: 6823 ldr r3, [r4, #0]
801468a: 60ab str r3, [r5, #8]
801468c: 6863 ldr r3, [r4, #4]
801468e: 60eb str r3, [r5, #12]
8014690: 2a1b cmp r2, #27
8014692: d80a bhi.n 80146aa <_realloc_r+0x26e>
8014694: 3408 adds r4, #8
8014696: f105 0010 add.w r0, r5, #16
801469a: 6823 ldr r3, [r4, #0]
801469c: 6003 str r3, [r0, #0]
801469e: 6863 ldr r3, [r4, #4]
80146a0: 6043 str r3, [r0, #4]
80146a2: 68a3 ldr r3, [r4, #8]
80146a4: 6083 str r3, [r0, #8]
80146a6: 465f mov r7, fp
80146a8: e7ab b.n 8014602 <_realloc_r+0x1c6>
80146aa: 68a3 ldr r3, [r4, #8]
80146ac: 612b str r3, [r5, #16]
80146ae: 68e3 ldr r3, [r4, #12]
80146b0: 616b str r3, [r5, #20]
80146b2: 2a24 cmp r2, #36 ; 0x24
80146b4: bf01 itttt eq
80146b6: 6923 ldreq r3, [r4, #16]
80146b8: 61ab streq r3, [r5, #24]
80146ba: 6963 ldreq r3, [r4, #20]
80146bc: 61eb streq r3, [r5, #28]
80146be: bf19 ittee ne
80146c0: 3410 addne r4, #16
80146c2: f105 0018 addne.w r0, r5, #24
80146c6: f105 0020 addeq.w r0, r5, #32
80146ca: 3418 addeq r4, #24
80146cc: e7e5 b.n 801469a <_realloc_r+0x25e>
80146ce: 4621 mov r1, r4
80146d0: f7fb fbd0 bl 800fe74 <memmove>
80146d4: e7e7 b.n 80146a6 <_realloc_r+0x26a>
80146d6: 4611 mov r1, r2
80146d8: 4648 mov r0, r9
80146da: f7fe f847 bl 801276c <_malloc_r>
80146de: 4683 mov fp, r0
80146e0: 2800 cmp r0, #0
80146e2: f43f af51 beq.w 8014588 <_realloc_r+0x14c>
80146e6: f854 3c04 ldr.w r3, [r4, #-4]
80146ea: f023 0301 bic.w r3, r3, #1
80146ee: 4453 add r3, sl
80146f0: f1a0 0208 sub.w r2, r0, #8
80146f4: 4293 cmp r3, r2
80146f6: d107 bne.n 8014708 <_realloc_r+0x2cc>
80146f8: f850 7c04 ldr.w r7, [r0, #-4]
80146fc: f027 0703 bic.w r7, r7, #3
8014700: 4437 add r7, r6
8014702: e6fc b.n 80144fe <_realloc_r+0xc2>
8014704: 20000464 .word 0x20000464
8014708: 1f32 subs r2, r6, #4
801470a: 2a24 cmp r2, #36 ; 0x24
801470c: d82d bhi.n 801476a <_realloc_r+0x32e>
801470e: 2a13 cmp r2, #19
8014710: d928 bls.n 8014764 <_realloc_r+0x328>
8014712: 6823 ldr r3, [r4, #0]
8014714: 6003 str r3, [r0, #0]
8014716: 6863 ldr r3, [r4, #4]
8014718: 6043 str r3, [r0, #4]
801471a: 2a1b cmp r2, #27
801471c: d80e bhi.n 801473c <_realloc_r+0x300>
801471e: f104 0208 add.w r2, r4, #8
8014722: f100 0308 add.w r3, r0, #8
8014726: 6811 ldr r1, [r2, #0]
8014728: 6019 str r1, [r3, #0]
801472a: 6851 ldr r1, [r2, #4]
801472c: 6059 str r1, [r3, #4]
801472e: 6892 ldr r2, [r2, #8]
8014730: 609a str r2, [r3, #8]
8014732: 4621 mov r1, r4
8014734: 4648 mov r0, r9
8014736: f7fd fec5 bl 80124c4 <_free_r>
801473a: e725 b.n 8014588 <_realloc_r+0x14c>
801473c: 68a3 ldr r3, [r4, #8]
801473e: 6083 str r3, [r0, #8]
8014740: 68e3 ldr r3, [r4, #12]
8014742: 60c3 str r3, [r0, #12]
8014744: 2a24 cmp r2, #36 ; 0x24
8014746: bf01 itttt eq
8014748: 6923 ldreq r3, [r4, #16]
801474a: 6103 streq r3, [r0, #16]
801474c: 6961 ldreq r1, [r4, #20]
801474e: 6141 streq r1, [r0, #20]
8014750: bf19 ittee ne
8014752: f104 0210 addne.w r2, r4, #16
8014756: f100 0310 addne.w r3, r0, #16
801475a: f104 0218 addeq.w r2, r4, #24
801475e: f100 0318 addeq.w r3, r0, #24
8014762: e7e0 b.n 8014726 <_realloc_r+0x2ea>
8014764: 4603 mov r3, r0
8014766: 4622 mov r2, r4
8014768: e7dd b.n 8014726 <_realloc_r+0x2ea>
801476a: 4621 mov r1, r4
801476c: f7fb fb82 bl 800fe74 <memmove>
8014770: e7df b.n 8014732 <_realloc_r+0x2f6>
8014772: 4637 mov r7, r6
8014774: e6c3 b.n 80144fe <_realloc_r+0xc2>
8014776: 431f orrs r7, r3
8014778: 606f str r7, [r5, #4]
801477a: 6853 ldr r3, [r2, #4]
801477c: f043 0301 orr.w r3, r3, #1
8014780: 6053 str r3, [r2, #4]
8014782: e758 b.n 8014636 <_realloc_r+0x1fa>
08014784 <__swbuf_r>:
8014784: b5f8 push {r3, r4, r5, r6, r7, lr}
8014786: 460e mov r6, r1
8014788: 4614 mov r4, r2
801478a: 4605 mov r5, r0
801478c: b118 cbz r0, 8014796 <__swbuf_r+0x12>
801478e: 6b83 ldr r3, [r0, #56] ; 0x38
8014790: b90b cbnz r3, 8014796 <__swbuf_r+0x12>
8014792: f7fd fe07 bl 80123a4 <__sinit>
8014796: 69a3 ldr r3, [r4, #24]
8014798: 60a3 str r3, [r4, #8]
801479a: 89a3 ldrh r3, [r4, #12]
801479c: 0719 lsls r1, r3, #28
801479e: d529 bpl.n 80147f4 <__swbuf_r+0x70>
80147a0: 6923 ldr r3, [r4, #16]
80147a2: b33b cbz r3, 80147f4 <__swbuf_r+0x70>
80147a4: f9b4 300c ldrsh.w r3, [r4, #12]
80147a8: b2f6 uxtb r6, r6
80147aa: 049a lsls r2, r3, #18
80147ac: 4637 mov r7, r6
80147ae: d52a bpl.n 8014806 <__swbuf_r+0x82>
80147b0: 6823 ldr r3, [r4, #0]
80147b2: 6920 ldr r0, [r4, #16]
80147b4: 1a18 subs r0, r3, r0
80147b6: 6963 ldr r3, [r4, #20]
80147b8: 4283 cmp r3, r0
80147ba: dc04 bgt.n 80147c6 <__swbuf_r+0x42>
80147bc: 4621 mov r1, r4
80147be: 4628 mov r0, r5
80147c0: f7fd fd84 bl 80122cc <_fflush_r>
80147c4: b9e0 cbnz r0, 8014800 <__swbuf_r+0x7c>
80147c6: 68a3 ldr r3, [r4, #8]
80147c8: 3b01 subs r3, #1
80147ca: 60a3 str r3, [r4, #8]
80147cc: 6823 ldr r3, [r4, #0]
80147ce: 1c5a adds r2, r3, #1
80147d0: 6022 str r2, [r4, #0]
80147d2: 701e strb r6, [r3, #0]
80147d4: 6962 ldr r2, [r4, #20]
80147d6: 1c43 adds r3, r0, #1
80147d8: 429a cmp r2, r3
80147da: d004 beq.n 80147e6 <__swbuf_r+0x62>
80147dc: 89a3 ldrh r3, [r4, #12]
80147de: 07db lsls r3, r3, #31
80147e0: d506 bpl.n 80147f0 <__swbuf_r+0x6c>
80147e2: 2e0a cmp r6, #10
80147e4: d104 bne.n 80147f0 <__swbuf_r+0x6c>
80147e6: 4621 mov r1, r4
80147e8: 4628 mov r0, r5
80147ea: f7fd fd6f bl 80122cc <_fflush_r>
80147ee: b938 cbnz r0, 8014800 <__swbuf_r+0x7c>
80147f0: 4638 mov r0, r7
80147f2: bdf8 pop {r3, r4, r5, r6, r7, pc}
80147f4: 4621 mov r1, r4
80147f6: 4628 mov r0, r5
80147f8: f7fc fe08 bl 801140c <__swsetup_r>
80147fc: 2800 cmp r0, #0
80147fe: d0d1 beq.n 80147a4 <__swbuf_r+0x20>
8014800: f04f 37ff mov.w r7, #4294967295
8014804: e7f4 b.n 80147f0 <__swbuf_r+0x6c>
8014806: f443 5300 orr.w r3, r3, #8192 ; 0x2000
801480a: 81a3 strh r3, [r4, #12]
801480c: 6e63 ldr r3, [r4, #100] ; 0x64
801480e: f423 5300 bic.w r3, r3, #8192 ; 0x2000
8014812: 6663 str r3, [r4, #100] ; 0x64
8014814: e7cc b.n 80147b0 <__swbuf_r+0x2c>
...
08014818 <_wcrtomb_r>:
8014818: b5f0 push {r4, r5, r6, r7, lr}
801481a: 4c09 ldr r4, [pc, #36] ; (8014840 <_wcrtomb_r+0x28>)
801481c: b085 sub sp, #20
801481e: f8d4 70e0 ldr.w r7, [r4, #224] ; 0xe0
8014822: 4605 mov r5, r0
8014824: 461e mov r6, r3
8014826: b909 cbnz r1, 801482c <_wcrtomb_r+0x14>
8014828: 460a mov r2, r1
801482a: a901 add r1, sp, #4
801482c: 47b8 blx r7
801482e: 1c43 adds r3, r0, #1
8014830: bf01 itttt eq
8014832: 2300 moveq r3, #0
8014834: 6033 streq r3, [r6, #0]
8014836: 238a moveq r3, #138 ; 0x8a
8014838: 602b streq r3, [r5, #0]
801483a: b005 add sp, #20
801483c: bdf0 pop {r4, r5, r6, r7, pc}
801483e: bf00 nop
8014840: 20000874 .word 0x20000874
08014844 <__ascii_wctomb>:
8014844: b149 cbz r1, 801485a <__ascii_wctomb+0x16>
8014846: 2aff cmp r2, #255 ; 0xff
8014848: bf85 ittet hi
801484a: 238a movhi r3, #138 ; 0x8a
801484c: 6003 strhi r3, [r0, #0]
801484e: 700a strbls r2, [r1, #0]
8014850: f04f 30ff movhi.w r0, #4294967295
8014854: bf98 it ls
8014856: 2001 movls r0, #1
8014858: 4770 bx lr
801485a: 4608 mov r0, r1
801485c: 4770 bx lr
0801485e <abort>:
801485e: b508 push {r3, lr}
8014860: 2006 movs r0, #6
8014862: f000 f82d bl 80148c0 <raise>
8014866: 2001 movs r0, #1
8014868: f000 f894 bl 8014994 <_exit>
0801486c <_raise_r>:
801486c: 291f cmp r1, #31
801486e: b538 push {r3, r4, r5, lr}
8014870: 4604 mov r4, r0
8014872: 460d mov r5, r1
8014874: d904 bls.n 8014880 <_raise_r+0x14>
8014876: 2316 movs r3, #22
8014878: 6003 str r3, [r0, #0]
801487a: f04f 30ff mov.w r0, #4294967295
801487e: bd38 pop {r3, r4, r5, pc}
8014880: f8d0 22dc ldr.w r2, [r0, #732] ; 0x2dc
8014884: b112 cbz r2, 801488c <_raise_r+0x20>
8014886: f852 3021 ldr.w r3, [r2, r1, lsl #2]
801488a: b94b cbnz r3, 80148a0 <_raise_r+0x34>
801488c: 4620 mov r0, r4
801488e: f000 f831 bl 80148f4 <_getpid_r>
8014892: 462a mov r2, r5
8014894: 4601 mov r1, r0
8014896: 4620 mov r0, r4
8014898: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
801489c: f000 b818 b.w 80148d0 <_kill_r>
80148a0: 2b01 cmp r3, #1
80148a2: d00a beq.n 80148ba <_raise_r+0x4e>
80148a4: 1c59 adds r1, r3, #1
80148a6: d103 bne.n 80148b0 <_raise_r+0x44>
80148a8: 2316 movs r3, #22
80148aa: 6003 str r3, [r0, #0]
80148ac: 2001 movs r0, #1
80148ae: e7e6 b.n 801487e <_raise_r+0x12>
80148b0: 2400 movs r4, #0
80148b2: f842 4025 str.w r4, [r2, r5, lsl #2]
80148b6: 4628 mov r0, r5
80148b8: 4798 blx r3
80148ba: 2000 movs r0, #0
80148bc: e7df b.n 801487e <_raise_r+0x12>
...
080148c0 <raise>:
80148c0: 4b02 ldr r3, [pc, #8] ; (80148cc <raise+0xc>)
80148c2: 4601 mov r1, r0
80148c4: 6818 ldr r0, [r3, #0]
80148c6: f7ff bfd1 b.w 801486c <_raise_r>
80148ca: bf00 nop
80148cc: 20000030 .word 0x20000030
080148d0 <_kill_r>:
80148d0: b538 push {r3, r4, r5, lr}
80148d2: 4d07 ldr r5, [pc, #28] ; (80148f0 <_kill_r+0x20>)
80148d4: 2300 movs r3, #0
80148d6: 4604 mov r4, r0
80148d8: 4608 mov r0, r1
80148da: 4611 mov r1, r2
80148dc: 602b str r3, [r5, #0]
80148de: f000 f82b bl 8014938 <_kill>
80148e2: 1c43 adds r3, r0, #1
80148e4: d102 bne.n 80148ec <_kill_r+0x1c>
80148e6: 682b ldr r3, [r5, #0]
80148e8: b103 cbz r3, 80148ec <_kill_r+0x1c>
80148ea: 6023 str r3, [r4, #0]
80148ec: bd38 pop {r3, r4, r5, pc}
80148ee: bf00 nop
80148f0: 20008d74 .word 0x20008d74
080148f4 <_getpid_r>:
80148f4: f000 b810 b.w 8014918 <_getpid>
080148f8 <_close>:
80148f8: 4b02 ldr r3, [pc, #8] ; (8014904 <_close+0xc>)
80148fa: 2258 movs r2, #88 ; 0x58
80148fc: 601a str r2, [r3, #0]
80148fe: f04f 30ff mov.w r0, #4294967295
8014902: 4770 bx lr
8014904: 20008d74 .word 0x20008d74
08014908 <_fstat>:
8014908: 4b02 ldr r3, [pc, #8] ; (8014914 <_fstat+0xc>)
801490a: 2258 movs r2, #88 ; 0x58
801490c: 601a str r2, [r3, #0]
801490e: f04f 30ff mov.w r0, #4294967295
8014912: 4770 bx lr
8014914: 20008d74 .word 0x20008d74
08014918 <_getpid>:
8014918: 4b02 ldr r3, [pc, #8] ; (8014924 <_getpid+0xc>)
801491a: 2258 movs r2, #88 ; 0x58
801491c: 601a str r2, [r3, #0]
801491e: f04f 30ff mov.w r0, #4294967295
8014922: 4770 bx lr
8014924: 20008d74 .word 0x20008d74
08014928 <_isatty>:
8014928: 4b02 ldr r3, [pc, #8] ; (8014934 <_isatty+0xc>)
801492a: 2258 movs r2, #88 ; 0x58
801492c: 601a str r2, [r3, #0]
801492e: 2000 movs r0, #0
8014930: 4770 bx lr
8014932: bf00 nop
8014934: 20008d74 .word 0x20008d74
08014938 <_kill>:
8014938: 4b02 ldr r3, [pc, #8] ; (8014944 <_kill+0xc>)
801493a: 2258 movs r2, #88 ; 0x58
801493c: 601a str r2, [r3, #0]
801493e: f04f 30ff mov.w r0, #4294967295
8014942: 4770 bx lr
8014944: 20008d74 .word 0x20008d74
08014948 <_lseek>:
8014948: 4b02 ldr r3, [pc, #8] ; (8014954 <_lseek+0xc>)
801494a: 2258 movs r2, #88 ; 0x58
801494c: 601a str r2, [r3, #0]
801494e: f04f 30ff mov.w r0, #4294967295
8014952: 4770 bx lr
8014954: 20008d74 .word 0x20008d74
08014958 <_read>:
8014958: 4b02 ldr r3, [pc, #8] ; (8014964 <_read+0xc>)
801495a: 2258 movs r2, #88 ; 0x58
801495c: 601a str r2, [r3, #0]
801495e: f04f 30ff mov.w r0, #4294967295
8014962: 4770 bx lr
8014964: 20008d74 .word 0x20008d74
08014968 <_sbrk>:
8014968: 4a04 ldr r2, [pc, #16] ; (801497c <_sbrk+0x14>)
801496a: 6811 ldr r1, [r2, #0]
801496c: 4603 mov r3, r0
801496e: b909 cbnz r1, 8014974 <_sbrk+0xc>
8014970: 4903 ldr r1, [pc, #12] ; (8014980 <_sbrk+0x18>)
8014972: 6011 str r1, [r2, #0]
8014974: 6810 ldr r0, [r2, #0]
8014976: 4403 add r3, r0
8014978: 6013 str r3, [r2, #0]
801497a: 4770 bx lr
801497c: 20008d78 .word 0x20008d78
8014980: 20008d80 .word 0x20008d80
08014984 <_write>:
8014984: 4b02 ldr r3, [pc, #8] ; (8014990 <_write+0xc>)
8014986: 2258 movs r2, #88 ; 0x58
8014988: 601a str r2, [r3, #0]
801498a: f04f 30ff mov.w r0, #4294967295
801498e: 4770 bx lr
8014990: 20008d74 .word 0x20008d74
08014994 <_exit>:
8014994: e7fe b.n 8014994 <_exit>
...
08014998 <_init>:
8014998: b5f8 push {r3, r4, r5, r6, r7, lr}
801499a: bf00 nop
801499c: bcf8 pop {r3, r4, r5, r6, r7}
801499e: bc08 pop {r3}
80149a0: 469e mov lr, r3
80149a2: 4770 bx lr
080149a4 <_fini>:
80149a4: b5f8 push {r3, r4, r5, r6, r7, lr}
80149a6: bf00 nop
80149a8: bcf8 pop {r3, r4, r5, r6, r7}
80149aa: bc08 pop {r3}
80149ac: 469e mov lr, r3
80149ae: 4770 bx lr